aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorKarl Heuer1999-07-25 05:47:46 +0000
committerKarl Heuer1999-07-25 05:47:46 +0000
commitb108eac242e94b396179bc0e58de3952d0abf64f (patch)
treeb0956d294d604993a3a8a149d997779f2f9ac10b /lisp
parente4773f3943bfd08ad03ff075faf6d6d2e99edf4b (diff)
downloademacs-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.el28
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."
264When this command is called interactively, it reads SYMBOL from the minibuffer. 264When this command is called interactively, it reads SYMBOL from the minibuffer.
265In the minibuffer, use M-n to yank the default argument value 265In the minibuffer, use M-n to yank the default argument value
266into the minibuffer so you can edit it. 266into the minibuffer so you can edit it.
267The default symbol is the one found at point." 267The default symbol is the one found at point.
268
269With 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."
275When this command is called interactively, it reads FILE from the minibuffer. 277When this command is called interactively, it reads FILE from the minibuffer.
276In the minibuffer, use M-n to yank the default file name 278In the minibuffer, use M-n to yank the default file name
277into the minibuffer so you can edit it. 279into the minibuffer so you can edit it.
278The default file name is the one found at point." 280The default file name is the one found at point.
281
282With 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)) 289If 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*"))