From 70d0a9b7da7a170c7f14794bd3c5e1401929b25d Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Fri, 26 Aug 2016 01:27:48 +0200 Subject: 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. --- elisp/geiser-company.el | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) (limited to 'elisp/geiser-company.el') 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 -- cgit v1.2.3