Mercurial > emacs
changeset 95448:27c911ed0a73
(icomplete-get-keys): Doc fix. Use `when'.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Sat, 31 May 2008 23:49:27 +0000 |
parents | 30cb6279e994 |
children | c405fd939290 |
files | lisp/icomplete.el |
diffstat | 1 files changed, 10 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- 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.