Mercurial > emacs
comparison lisp/icomplete.el @ 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 | 436059aff075 |
children | 5de002dfa264 |
comparison
equal
deleted
inserted
replaced
95447:30cb6279e994 | 95448:27c911ed0a73 |
---|---|
143 Use `icomplete-mode' function to set it up properly for incremental | 143 Use `icomplete-mode' function to set it up properly for incremental |
144 minibuffer completion.") | 144 minibuffer completion.") |
145 (add-hook 'icomplete-post-command-hook 'icomplete-exhibit) | 145 (add-hook 'icomplete-post-command-hook 'icomplete-exhibit) |
146 | 146 |
147 (defun icomplete-get-keys (func-name) | 147 (defun icomplete-get-keys (func-name) |
148 "Return strings naming keys bound to `func-name', or nil if none. | 148 "Return strings naming keys bound to FUNC-NAME, or nil if none. |
149 Examines the prior, not current, buffer, presuming that current buffer | 149 Examines the prior, not current, buffer, presuming that current buffer |
150 is minibuffer." | 150 is minibuffer." |
151 (if (commandp func-name) | 151 (when (commandp func-name) |
152 (save-excursion | 152 (save-excursion |
153 (let* ((sym (intern func-name)) | 153 (let* ((sym (intern func-name)) |
154 (buf (other-buffer nil t)) | 154 (buf (other-buffer nil t)) |
155 (keys (with-current-buffer buf (where-is-internal sym)))) | 155 (keys (with-current-buffer buf (where-is-internal sym)))) |
156 (if keys | 156 (when keys |
157 (concat "<" | 157 (concat "<" |
158 (mapconcat 'key-description | 158 (mapconcat 'key-description |
159 (sort keys | 159 (sort keys |
160 #'(lambda (x y) | 160 #'(lambda (x y) |
161 (< (length x) (length y)))) | 161 (< (length x) (length y)))) |
162 ", ") | 162 ", ") |
163 ">")))))) | 163 ">")))))) |
164 ;;;_ = icomplete-with-completion-tables | 164 ;;;_ = icomplete-with-completion-tables |
165 (defvar icomplete-with-completion-tables '(internal-complete-buffer) | 165 (defvar icomplete-with-completion-tables '(internal-complete-buffer) |
166 "Specialized completion tables with which icomplete should operate. | 166 "Specialized completion tables with which icomplete should operate. |
167 | 167 |
168 Icomplete does not operate with any specialized completion tables | 168 Icomplete does not operate with any specialized completion tables |