summaryrefslogtreecommitdiff
path: root/elisp/geiser-company.el
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
commitcc8f043da48ffe49e5273b0478e3d30c998e358e (patch)
treed12dfd17a103741351a96eac036b8d889583af70 /elisp/geiser-company.el
parent20a1a2a6a3db2259765be232ab45e83b82a6b6d3 (diff)
downloadgeiser-guile-cc8f043da48ffe49e5273b0478e3d30c998e358e.tar.gz
geiser-guile-cc8f043da48ffe49e5273b0478e3d30c998e358e.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.
Diffstat (limited to 'elisp/geiser-company.el')
-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