Commit 62c5b459 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

(lisp-completion-at-point): Try and handle errors.

parent e765bf58
2010-04-21 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/lisp.el (lisp-completion-at-point): Try and handle errors.
2010-04-21 Jan Djärv <jan.h.d@swipnet.se>
* vc-dir.el (vc-dir-tool-bar-map): Add :label on some tool bar items.
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment