From: Stefan Monnier Date: Tue, 27 Apr 2010 17:57:32 +0000 (-0400) Subject: * emacs-lisp/lisp.el (lisp-complete-symbol): Fail gracefully. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~364 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ccaa47655d21a7c5b37d4e3607deb9c729b34d70;p=emacs.git * emacs-lisp/lisp.el (lisp-complete-symbol): Fail gracefully. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1d07fc85a15..e17b075759b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2010-04-27 Stefan Monnier + + * emacs-lisp/lisp.el (lisp-complete-symbol): Fail gracefully. + 2010-04-27 Sam Steingold * progmodes/bug-reference.el (bug-reference-url-format): Mark as diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index 58289660a3c..6e209156b92 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el @@ -624,9 +624,12 @@ considered." (interactive) (let* ((data (lisp-completion-at-point predicate)) (plist (nthcdr 3 data))) - (let ((completion-annotate-function (plist-get plist :annotate-function))) - (completion-in-region (nth 0 data) (nth 1 data) (nth 2 data) - (plist-get plist :predicate))))) + (if (null data) + (minibuffer-message "Nothing to complete") + (let ((completion-annotate-function + (plist-get plist :annotate-function))) + (completion-in-region (nth 0 data) (nth 1 data) (nth 2 data) + (plist-get plist :predicate)))))) (defun lisp-completion-at-point (&optional predicate)