From 8793dabb232253360e3e4df00d10f8419fe3da57 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Sat, 31 May 2008 23:51:57 +0000 Subject: [PATCH] (icomplete-get-keys): Doc fix. Use `when'. --- lisp/ChangeLog | 8 ++++++-- lisp/icomplete.el | 20 ++++++++++---------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cc632f0edd0..f5002a8a0dd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2008-05-31 Juanma Barranquero + + * icomplete.el (icomplete-get-keys): Doc fix. Use `when'. + 2008-05-31 Dan Nicolaescu * vc-cvs.el (vc-cvs-after-dir-status): Support spaces in file @@ -15,8 +19,8 @@ 2008-05-30 Stefan Monnier - * 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". 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. -- 2.11.4.GIT