From ccaa47655d21a7c5b37d4e3607deb9c729b34d70 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 27 Apr 2010 13:57:32 -0400 Subject: [PATCH] * emacs-lisp/lisp.el (lisp-complete-symbol): Fail gracefully. --- lisp/ChangeLog | 4 ++++ lisp/emacs-lisp/lisp.el | 9 ++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) 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) -- 2.39.2