aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorStefan Monnier <[email protected]>2010-04-21 13:53:03 -0400
committerStefan Monnier <[email protected]>2010-04-21 13:53:03 -0400
commit62c5b459af269682e0749a9598eadcfec33469fc (patch)
tree5ddc64ae2f351789a0c86addb9212c6fc5ccd304 /lisp/emacs-lisp
parente765bf582cd4da0092f431536bc06aed78d5b762 (diff)
(lisp-completion-at-point): Try and handle errors.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/lisp.el24
1 files changed, 14 insertions, 10 deletions
diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el
index e6b9af95a7..58289660a3 100644
--- a/lisp/emacs-lisp/lisp.el
+++ b/lisp/emacs-lisp/lisp.el
@@ -633,10 +633,12 @@ considered."
;; FIXME: the `end' could be after point?
(let* ((pos (point))
(beg (with-syntax-table emacs-lisp-mode-syntax-table
- (save-excursion
- (backward-sexp 1)
- (skip-syntax-forward "'")
- (point))))
+ (condition-case nil
+ (save-excursion
+ (backward-sexp 1)
+ (skip-syntax-forward "'")
+ (point))
+ (scan-error pos))))
(predicate
(or predicate
(save-excursion
@@ -658,12 +660,14 @@ considered."
'fboundp)))))
(end
(unless (or (eq beg (point-max))
- (member (char-syntax (char-after beg)) '(?\( ?\))))
- (save-excursion
- (goto-char beg)
- (forward-sexp 1)
- (when (>= (point) pos)
- (point))))))
+ (member (char-syntax (char-after beg)) '(?\" ?\( ?\))))
+ (condition-case nil
+ (save-excursion
+ (goto-char beg)
+ (forward-sexp 1)
+ (when (>= (point) pos)
+ (point)))
+ (scan-error pos)))))
(when end
(list beg end obarray
:predicate predicate