summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2016-08-26 01:27:48 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2016-08-26 01:27:48 +0200
commit70d0a9b7da7a170c7f14794bd3c5e1401929b25d (patch)
treebb344c594f9490656913437e11bbbab41b0fb47a
parentaca3d7adc98ae5081e225365d36f6e06d91038e0 (diff)
downloadgeiser-70d0a9b7da7a170c7f14794bd3c5e1401929b25d.tar.gz
geiser-70d0a9b7da7a170c7f14794bd3c5e1401929b25d.tar.bz2
Not signalling errors for company-mode completions
... so that we don't interfere with other active backends, and following the same policy as in the rest of company-mode geiser methods. See also the discussion in github's #173.
-rw-r--r--elisp/geiser-company.el33
1 files changed, 17 insertions, 16 deletions
diff --git a/elisp/geiser-company.el b/elisp/geiser-company.el
index 4572984..a7e21aa 100644
--- a/elisp/geiser-company.el
+++ b/elisp/geiser-company.el
@@ -1,6 +1,6 @@
;; geiser-company.el -- integration with company-mode
-;; Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014 Jose Antonio Ortega Ruiz
+;; Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2016 Jose Antonio Ortega Ruiz
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the Modified BSD License. You should
@@ -61,21 +61,22 @@
(error (geiser-edit-symbol id 'noselect)))))))
(defun geiser-company--prefix-at-point ()
- (when (and (not (geiser-autodoc--inhibit)) geiser-company--enabled-flag)
- (if (nth 8 (syntax-ppss)) 'stop
- (let* ((prefix (and (looking-at-p "\\_>")
- (geiser-completion--prefix nil)))
- (cmps1 (and prefix
- (geiser-completion--complete prefix nil)))
- (cmps2 (and prefix
- (geiser-completion--complete prefix t)))
- (mprefix (and (not cmps1) (not cmps2)
- (geiser-completion--prefix t)))
- (cmps3 (and mprefix (geiser-completion--complete mprefix t)))
- (cmps (or cmps3 (append cmps1 cmps2)))
- (prefix (or mprefix prefix)))
- (setq geiser-company--completions (cons prefix cmps))
- prefix))))
+ (ignore-errors
+ (when (and (not (geiser-autodoc--inhibit)) geiser-company--enabled-flag)
+ (if (nth 8 (syntax-ppss)) 'stop
+ (let* ((prefix (and (looking-at-p "\\_>")
+ (geiser-completion--prefix nil)))
+ (cmps1 (and prefix
+ (geiser-completion--complete prefix nil)))
+ (cmps2 (and prefix
+ (geiser-completion--complete prefix t)))
+ (mprefix (and (not cmps1) (not cmps2)
+ (geiser-completion--prefix t)))
+ (cmps3 (and mprefix (geiser-completion--complete mprefix t)))
+ (cmps (or cmps3 (append cmps1 cmps2)))
+ (prefix (or mprefix prefix)))
+ (setq geiser-company--completions (cons prefix cmps))
+ prefix)))))
;;; Activation