diff options
| author | Karl Heuer | 1999-07-25 05:47:46 +0000 |
|---|---|---|
| committer | Karl Heuer | 1999-07-25 05:47:46 +0000 |
| commit | b108eac242e94b396179bc0e58de3952d0abf64f (patch) | |
| tree | b0956d294d604993a3a8a149d997779f2f9ac10b /lisp | |
| parent | e4773f3943bfd08ad03ff075faf6d6d2e99edf4b (diff) | |
| download | emacs-b108eac242e94b396179bc0e58de3952d0abf64f.tar.gz emacs-b108eac242e94b396179bc0e58de3952d0abf64f.zip | |
(info-lookup-interactive-arguments): Add optional
argument query for new choice of help mode.
(info-lookup-symbol): Use it.
(info-lookup-file): Ditto.
(info-lookup): Don't switch to other window, if already in Info buffer.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/info-look.el | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/lisp/info-look.el b/lisp/info-look.el index 9b1bdc791f1..9b0a0c2ed11 100644 --- a/lisp/info-look.el +++ b/lisp/info-look.el | |||
| @@ -264,9 +264,11 @@ system." | |||
| 264 | When this command is called interactively, it reads SYMBOL from the minibuffer. | 264 | When this command is called interactively, it reads SYMBOL from the minibuffer. |
| 265 | In the minibuffer, use M-n to yank the default argument value | 265 | In the minibuffer, use M-n to yank the default argument value |
| 266 | into the minibuffer so you can edit it. | 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 | |||
| 269 | With prefix arg a query for the symbol help mode is offered." | ||
| 268 | (interactive | 270 | (interactive |
| 269 | (info-lookup-interactive-arguments 'symbol)) | 271 | (info-lookup-interactive-arguments 'symbol current-prefix-arg)) |
| 270 | (info-lookup 'symbol symbol mode)) | 272 | (info-lookup 'symbol symbol mode)) |
| 271 | 273 | ||
| 272 | ;;;###autoload | 274 | ;;;###autoload |
| @@ -275,16 +277,21 @@ The default symbol is the one found at point." | |||
| 275 | When this command is called interactively, it reads FILE from the minibuffer. | 277 | When this command is called interactively, it reads FILE from the minibuffer. |
| 276 | In the minibuffer, use M-n to yank the default file name | 278 | In the minibuffer, use M-n to yank the default file name |
| 277 | into the minibuffer so you can edit it. | 279 | into the minibuffer so you can edit it. |
| 278 | The default file name is the one found at point." | 280 | The default file name is the one found at point. |
| 281 | |||
| 282 | With prefix arg a query for the file help mode is offered." | ||
| 279 | (interactive | 283 | (interactive |
| 280 | (info-lookup-interactive-arguments 'file)) | 284 | (info-lookup-interactive-arguments 'file current-prefix-arg)) |
| 281 | (info-lookup 'file file mode)) | 285 | (info-lookup 'file file mode)) |
| 282 | 286 | ||
| 283 | (defun info-lookup-interactive-arguments (topic) | 287 | (defun info-lookup-interactive-arguments (topic &optional query) |
| 284 | "Read and return argument value (and help mode) for help topic TOPIC." | 288 | "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)) | 289 | If optional argument QUERY is non-nil, query for the help mode." |
| 286 | info-lookup-mode | 290 | (let* ((mode (cond (query |
| 287 | (info-lookup-change-mode topic))) | 291 | (info-lookup-change-mode topic)) |
| 292 | ((info-lookup->mode-value topic (info-lookup-select-mode)) | ||
| 293 | info-lookup-mode) | ||
| 294 | ((info-lookup-change-mode topic)))) | ||
| 288 | (completions (info-lookup->completions topic mode)) | 295 | (completions (info-lookup->completions topic mode)) |
| 289 | (default (info-lookup-guess-default topic mode)) | 296 | (default (info-lookup-guess-default topic mode)) |
| 290 | (completion-ignore-case (info-lookup->ignore-case topic mode)) | 297 | (completion-ignore-case (info-lookup->ignore-case topic mode)) |
| @@ -331,7 +338,8 @@ The default file name is the one found at point." | |||
| 331 | (modes (info-lookup->all-modes topic mode)) | 338 | (modes (info-lookup->all-modes topic mode)) |
| 332 | (window (selected-window)) | 339 | (window (selected-window)) |
| 333 | found doc-spec node prefix suffix doc-found) | 340 | found doc-spec node prefix suffix doc-found) |
| 334 | (if (not info-lookup-other-window-flag) | 341 | (if (or (not info-lookup-other-window-flag) |
| 342 | (eq (current-buffer) (get-buffer "*info*"))) | ||
| 335 | (info) | 343 | (info) |
| 336 | (save-window-excursion (info)) | 344 | (save-window-excursion (info)) |
| 337 | (switch-to-buffer-other-window "*info*")) | 345 | (switch-to-buffer-other-window "*info*")) |