# HG changeset patch # User Juanma Barranquero # Date 1212277767 0 # Node ID 27c911ed0a73fbde213c33334439de9d46f8c730 # Parent 30cb6279e99461a863c65823c3d64bde00ed7482 (icomplete-get-keys): Doc fix. Use `when'. diff -r 30cb6279e994 -r 27c911ed0a73 lisp/icomplete.el --- a/lisp/icomplete.el Sat May 31 20:09:42 2008 +0000 +++ b/lisp/icomplete.el Sat May 31 23:49:27 2008 +0000 @@ -145,22 +145,22 @@ (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.