changeset 108143:624169215019

* emacs-lisp/lisp.el (lisp-complete-symbol): Fail gracefully.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 27 Apr 2010 13:57:32 -0400
parents 087c3dc49930
children c46b2d0614cb
files lisp/ChangeLog lisp/emacs-lisp/lisp.el
diffstat 2 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Tue Apr 27 11:13:42 2010 -0400
+++ b/lisp/ChangeLog	Tue Apr 27 13:57:32 2010 -0400
@@ -1,3 +1,7 @@
+2010-04-27  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* emacs-lisp/lisp.el (lisp-complete-symbol): Fail gracefully.
+
 2010-04-27  Sam Steingold  <sds@gnu.org>
 
 	* progmodes/bug-reference.el (bug-reference-url-format): Mark as
--- a/lisp/emacs-lisp/lisp.el	Tue Apr 27 11:13:42 2010 -0400
+++ b/lisp/emacs-lisp/lisp.el	Tue Apr 27 13:57:32 2010 -0400
@@ -624,9 +624,12 @@
   (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)