diff options
| author | Karl Heuer | 1999-06-12 03:52:13 +0000 |
|---|---|---|
| committer | Karl Heuer | 1999-06-12 03:52:13 +0000 |
| commit | 3481a5c0f6f25772ca5f576576e913cc8d89909d (patch) | |
| tree | 5efc701a33a27011b39c8baf9d3e5a41c87c35b6 | |
| parent | a9a679b70ee79a68f2865c60572baa8acf6d44a5 (diff) | |
| download | emacs-3481a5c0f6f25772ca5f576576e913cc8d89909d.tar.gz emacs-3481a5c0f6f25772ca5f576576e913cc8d89909d.zip | |
(info-lookup-file, info-lookup-symbol): Doc fix.
(info-lookup-interactive-arguments): Never insert the default
into the minibuffer automatically.
| -rw-r--r-- | lisp/info-look.el | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/lisp/info-look.el b/lisp/info-look.el index 5183ef60230..943ae3bad0e 100644 --- a/lisp/info-look.el +++ b/lisp/info-look.el | |||
| @@ -260,10 +260,10 @@ system." | |||
| 260 | 260 | ||
| 261 | ;;;###autoload | 261 | ;;;###autoload |
| 262 | (defun info-lookup-symbol (symbol &optional mode) | 262 | (defun info-lookup-symbol (symbol &optional mode) |
| 263 | "Display the documentation of a symbol. | 263 | "Display the definition of SYMBOL, as found in the relevant manual. |
| 264 | If called interactively, SYMBOL will be read from the mini-buffer. | 264 | When this command is called interactively, it reads SYMBOL from the minibuffer. |
| 265 | Prefix argument means unconditionally insert the default symbol name | 265 | In the minibuffer, use M-n to yank the default argument value |
| 266 | into the mini-buffer so that it can be edited. | 266 | into the minibuffer so you can edit it. |
| 267 | The default symbol is the one found at point." | 267 | The default symbol is the one found at point." |
| 268 | (interactive | 268 | (interactive |
| 269 | (info-lookup-interactive-arguments 'symbol)) | 269 | (info-lookup-interactive-arguments 'symbol)) |
| @@ -272,30 +272,28 @@ The default symbol is the one found at point." | |||
| 272 | ;;;###autoload | 272 | ;;;###autoload |
| 273 | (defun info-lookup-file (file &optional mode) | 273 | (defun info-lookup-file (file &optional mode) |
| 274 | "Display the documentation of a file. | 274 | "Display the documentation of a file. |
| 275 | If called interactively, FILE will be read from the mini-buffer. | 275 | When this command is called interactively, it reads FILE from the minibuffer. |
| 276 | Prefix argument means unconditionally insert the default file name | 276 | In the minibuffer, use M-n to yank the default file name |
| 277 | into the mini-buffer so that it can be edited. | 277 | into the minibuffer so you can edit it. |
| 278 | The default file name is the one found at point." | 278 | The default file name is the one found at point." |
| 279 | (interactive | 279 | (interactive |
| 280 | (info-lookup-interactive-arguments 'file)) | 280 | (info-lookup-interactive-arguments 'file)) |
| 281 | (info-lookup 'file file mode)) | 281 | (info-lookup 'file file mode)) |
| 282 | 282 | ||
| 283 | (defun info-lookup-interactive-arguments (topic) | 283 | (defun info-lookup-interactive-arguments (topic) |
| 284 | "Return default value and help mode for help topic TOPIC." | 284 | "Read and return argument value (and help mode) for help topic TOPIC." |
| 285 | (let* ((mode (if (info-lookup->mode-value topic (info-lookup-select-mode)) | 285 | (let* ((mode (if (info-lookup->mode-value topic (info-lookup-select-mode)) |
| 286 | info-lookup-mode | 286 | info-lookup-mode |
| 287 | (info-lookup-change-mode topic))) | 287 | (info-lookup-change-mode topic))) |
| 288 | (completions (info-lookup->completions topic mode)) | 288 | (completions (info-lookup->completions topic mode)) |
| 289 | (default (info-lookup-guess-default topic mode)) | 289 | (default (info-lookup-guess-default topic mode)) |
| 290 | (input (if (or current-prefix-arg (not (assoc default completions))) | ||
| 291 | default)) | ||
| 292 | (completion-ignore-case (info-lookup->ignore-case topic mode)) | 290 | (completion-ignore-case (info-lookup->ignore-case topic mode)) |
| 293 | (enable-recursive-minibuffers t) | 291 | (enable-recursive-minibuffers t) |
| 294 | (value (completing-read | 292 | (value (completing-read |
| 295 | (if (and default (not input)) | 293 | (if default |
| 296 | (format "Describe %s (default %s): " topic default) | 294 | (format "Describe %s (default %s): " topic default) |
| 297 | (format "Describe %s: " topic)) | 295 | (format "Describe %s: " topic)) |
| 298 | completions nil nil input 'info-lookup-history))) | 296 | completions nil nil nil 'info-lookup-history default))) |
| 299 | (list (if (equal value "") default value) mode))) | 297 | (list (if (equal value "") default value) mode))) |
| 300 | 298 | ||
| 301 | (defun info-lookup-select-mode () | 299 | (defun info-lookup-select-mode () |