diff options
author | Juanma Barranquero <lekktu@gmail.com> | 2008-05-31 23:51:57 +0000 |
---|---|---|
committer | Juanma Barranquero <lekktu@gmail.com> | 2008-05-31 23:51:57 +0000 |
commit | 8793dabb232253360e3e4df00d10f8419fe3da57 (patch) | |
tree | 6c95d5936c512298f3643797468dd484a14d7cf5 /lisp/icomplete.el | |
parent | 7a9f749438c92f7783febf3142084325f5b7664e (diff) | |
download | emacs-8793dabb232253360e3e4df00d10f8419fe3da57.tar.gz |
(icomplete-get-keys): Doc fix. Use `when'.
Diffstat (limited to 'lisp/icomplete.el')
-rw-r--r-- | lisp/icomplete.el | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lisp/icomplete.el b/lisp/icomplete.el index 52636274633..7f395019825 100644 --- a/lisp/icomplete.el +++ b/lisp/icomplete.el @@ -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. |