diff options
| author | Stefan Monnier | 2010-04-21 13:53:03 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2010-04-21 13:53:03 -0400 |
| commit | 62c5b459af269682e0749a9598eadcfec33469fc (patch) | |
| tree | 5ddc64ae2f351789a0c86addb9212c6fc5ccd304 | |
| parent | e765bf582cd4da0092f431536bc06aed78d5b762 (diff) | |
| download | emacs-62c5b459af269682e0749a9598eadcfec33469fc.tar.gz emacs-62c5b459af269682e0749a9598eadcfec33469fc.zip | |
(lisp-completion-at-point): Try and handle errors.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/emacs-lisp/lisp.el | 24 |
2 files changed, 18 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5ac61d146cd..451498175ca 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2010-04-21 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * emacs-lisp/lisp.el (lisp-completion-at-point): Try and handle errors. | ||
| 4 | |||
| 1 | 2010-04-21 Jan Djärv <jan.h.d@swipnet.se> | 5 | 2010-04-21 Jan Djärv <jan.h.d@swipnet.se> |
| 2 | 6 | ||
| 3 | * vc-dir.el (vc-dir-tool-bar-map): Add :label on some tool bar items. | 7 | * vc-dir.el (vc-dir-tool-bar-map): Add :label on some tool bar items. |
diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index e6b9af95a73..58289660a3c 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el | |||
| @@ -633,10 +633,12 @@ considered." | |||
| 633 | ;; FIXME: the `end' could be after point? | 633 | ;; FIXME: the `end' could be after point? |
| 634 | (let* ((pos (point)) | 634 | (let* ((pos (point)) |
| 635 | (beg (with-syntax-table emacs-lisp-mode-syntax-table | 635 | (beg (with-syntax-table emacs-lisp-mode-syntax-table |
| 636 | (save-excursion | 636 | (condition-case nil |
| 637 | (backward-sexp 1) | 637 | (save-excursion |
| 638 | (skip-syntax-forward "'") | 638 | (backward-sexp 1) |
| 639 | (point)))) | 639 | (skip-syntax-forward "'") |
| 640 | (point)) | ||
| 641 | (scan-error pos)))) | ||
| 640 | (predicate | 642 | (predicate |
| 641 | (or predicate | 643 | (or predicate |
| 642 | (save-excursion | 644 | (save-excursion |
| @@ -658,12 +660,14 @@ considered." | |||
| 658 | 'fboundp))))) | 660 | 'fboundp))))) |
| 659 | (end | 661 | (end |
| 660 | (unless (or (eq beg (point-max)) | 662 | (unless (or (eq beg (point-max)) |
| 661 | (member (char-syntax (char-after beg)) '(?\( ?\)))) | 663 | (member (char-syntax (char-after beg)) '(?\" ?\( ?\)))) |
| 662 | (save-excursion | 664 | (condition-case nil |
| 663 | (goto-char beg) | 665 | (save-excursion |
| 664 | (forward-sexp 1) | 666 | (goto-char beg) |
| 665 | (when (>= (point) pos) | 667 | (forward-sexp 1) |
| 666 | (point)))))) | 668 | (when (>= (point) pos) |
| 669 | (point))) | ||
| 670 | (scan-error pos))))) | ||
| 667 | (when end | 671 | (when end |
| 668 | (list beg end obarray | 672 | (list beg end obarray |
| 669 | :predicate predicate | 673 | :predicate predicate |