(icomplete-get-keys): Doc fix. Use `when'.
authorJuanma Barranquero <lekktu@gmail.com>
Sat, 31 May 2008 23:51:57 +0000 (23:51 +0000)
committerJuanma Barranquero <lekktu@gmail.com>
Sat, 31 May 2008 23:51:57 +0000 (23:51 +0000)
lisp/ChangeLog
lisp/icomplete.el

index cc632f0..f5002a8 100644 (file)
@@ -1,3 +1,7 @@
+2008-05-31  Juanma Barranquero  <lekktu@gmail.com>
+
+       * icomplete.el (icomplete-get-keys): Doc fix.  Use `when'.
+
 2008-05-31  Dan Nicolaescu  <dann@ics.uci.edu>
 
        * vc-cvs.el (vc-cvs-after-dir-status): Support spaces in file
@@ -15,8 +19,8 @@
 
 2008-05-30  Stefan Monnier  <monnier@iro.umontreal.ca>
 
-       * vc-cvs.el (vc-cvs-state-heuristic, vc-cvs-parse-status): Try and
-       return `unregistered' when applicable.
+       * vc-cvs.el (vc-cvs-state-heuristic, vc-cvs-parse-status):
+       Try and return `unregistered' when applicable.
 
        * emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine):
        Don't encourage naming variables with "-flag".
index 5263627..7f39501 100644 (file)
@@ -145,22 +145,22 @@ minibuffer completion.")
 (add-hook 'icomplete-post-command-hook 'icomplete-exhibit)
 
 (defun icomplete-get-keys (func-name)
-  "Return strings naming keys bound to `func-name', or nil if none.
+  "Return strings naming keys bound to FUNC-NAME, or nil if none.
 Examines the prior, not current, buffer, presuming that current buffer
 is minibuffer."
-  (if (commandp func-name)
+  (when (commandp func-name)
     (save-excursion
       (let* ((sym (intern func-name))
             (buf (other-buffer nil t))
             (keys (with-current-buffer buf (where-is-internal sym))))
-       (if keys
-           (concat "<"
-                   (mapconcat 'key-description
-                              (sort keys
-                                    #'(lambda (x y)
-                                        (< (length x) (length y))))
-                              ", ")
-                   ">"))))))
+       (when keys
+         (concat "<"
+                 (mapconcat 'key-description
+                            (sort keys
+                                  #'(lambda (x y)
+                                      (< (length x) (length y))))
+                            ", ")
+                 ">"))))))
 ;;;_  = icomplete-with-completion-tables
 (defvar icomplete-with-completion-tables '(internal-complete-buffer)
   "Specialized completion tables with which icomplete should operate.