aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorJuri Linkov2005-12-23 21:52:00 +0000
committerJuri Linkov2005-12-23 21:52:00 +0000
commit948072537209b320213a34b098dc2e43eca3a302 (patch)
tree7cf610819ed595e4c8ce4329c5db53e3dd26b697 /lisp
parent7979163c337e3ad126a917531f0fdbb3ff74d370 (diff)
downloademacs-948072537209b320213a34b098dc2e43eca3a302.tar.gz
emacs-948072537209b320213a34b098dc2e43eca3a302.zip
(info-other-window, info): Rename function argument
`file' to `file-or-node'. (Info-complete-menu-item): Use local variable `complete-nodes' to keep the global value of `Info-complete-nodes' unchanged for subsequent completions. (info-tool-bar-map): Put `Info-index' icon just before `Info-search'.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/info.el29
1 files changed, 15 insertions, 14 deletions
diff --git a/lisp/info.el b/lisp/info.el
index 79a8a5d0a30..e3ca18e0ede 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -521,22 +521,22 @@ Do the right thing if the file has been compressed or zipped."
521 (Info-default-dirs))))))) 521 (Info-default-dirs)))))))
522 522
523;;;###autoload 523;;;###autoload
524(defun info-other-window (&optional file) 524(defun info-other-window (&optional file-or-node)
525 "Like `info' but show the Info buffer in another window." 525 "Like `info' but show the Info buffer in another window."
526 (interactive (if current-prefix-arg 526 (interactive (if current-prefix-arg
527 (list (read-file-name "Info file name: " nil nil t)))) 527 (list (read-file-name "Info file name: " nil nil t))))
528 (let (same-window-buffer-names same-window-regexps) 528 (let (same-window-buffer-names same-window-regexps)
529 (info file))) 529 (info file-or-node)))
530 530
531;;;###autoload (add-hook 'same-window-regexps "\\*info\\*\\(\\|<[0-9]+>\\)") 531;;;###autoload (add-hook 'same-window-regexps "\\*info\\*\\(\\|<[0-9]+>\\)")
532 532
533;;;###autoload (put 'info 'info-file "emacs") 533;;;###autoload (put 'info 'info-file "emacs")
534;;;###autoload 534;;;###autoload
535(defun info (&optional file buffer) 535(defun info (&optional file-or-node buffer)
536 "Enter Info, the documentation browser. 536 "Enter Info, the documentation browser.
537Optional argument FILE specifies the file to examine; 537Optional argument FILE-OR-NODE specifies the file to examine;
538the default is the top-level directory of Info. 538the default is the top-level directory of Info.
539Called from a program, FILE may specify an Info node of the form 539Called from a program, FILE-OR-NODE may specify an Info node of the form
540`(FILENAME)NODENAME'. 540`(FILENAME)NODENAME'.
541Optional argument BUFFER specifies the Info buffer name; 541Optional argument BUFFER specifies the Info buffer name;
542the default buffer name is *info*. If BUFFER exists, 542the default buffer name is *info*. If BUFFER exists,
@@ -559,15 +559,15 @@ in all the directories in that path."
559 (pop-to-buffer (or buffer "*info*")) 559 (pop-to-buffer (or buffer "*info*"))
560 (if (and buffer (not (eq major-mode 'Info-mode))) 560 (if (and buffer (not (eq major-mode 'Info-mode)))
561 (Info-mode)) 561 (Info-mode))
562 (if file 562 (if file-or-node
563 ;; If argument already contains parentheses, don't add another set 563 ;; If argument already contains parentheses, don't add another set
564 ;; since the argument will then be parsed improperly. This also 564 ;; since the argument will then be parsed improperly. This also
565 ;; has the added benefit of allowing node names to be included 565 ;; has the added benefit of allowing node names to be included
566 ;; following the parenthesized filename. 566 ;; following the parenthesized filename.
567 (Info-goto-node 567 (Info-goto-node
568 (if (and (stringp file) (string-match "(.*)" file)) 568 (if (and (stringp file-or-node) (string-match "(.*)" file-or-node))
569 file 569 file-or-node
570 (concat "(" file ")"))) 570 (concat "(" file-or-node ")")))
571 (if (zerop (buffer-size)) 571 (if (zerop (buffer-size))
572 (Info-directory)))) 572 (Info-directory))))
573 573
@@ -2260,7 +2260,8 @@ Because of ambiguities, this should be concatenated with something like
2260 (let ((pattern (concat "\n\\* +\\(" 2260 (let ((pattern (concat "\n\\* +\\("
2261 (regexp-quote string) 2261 (regexp-quote string)
2262 Info-menu-entry-name-re "\\):" Info-node-spec-re)) 2262 Info-menu-entry-name-re "\\):" Info-node-spec-re))
2263 completions) 2263 completions
2264 (complete-nodes Info-complete-nodes))
2264 ;; Check the cache. 2265 ;; Check the cache.
2265 (if (and (equal (nth 0 Info-complete-cache) Info-current-file) 2266 (if (and (equal (nth 0 Info-complete-cache) Info-current-file)
2266 (equal (nth 1 Info-complete-cache) Info-current-node) 2267 (equal (nth 1 Info-complete-cache) Info-current-node)
@@ -2281,9 +2282,9 @@ Because of ambiguities, this should be concatenated with something like
2281 (or (and Info-complete-next-re 2282 (or (and Info-complete-next-re
2282 (setq nextnode (Info-extract-pointer "next" t)) 2283 (setq nextnode (Info-extract-pointer "next" t))
2283 (string-match Info-complete-next-re nextnode)) 2284 (string-match Info-complete-next-re nextnode))
2284 (and Info-complete-nodes 2285 (and complete-nodes
2285 (setq Info-complete-nodes (cdr Info-complete-nodes) 2286 (setq complete-nodes (cdr complete-nodes)
2286 nextnode (car Info-complete-nodes))))) 2287 nextnode (car complete-nodes)))))
2287 (Info-goto-node nextnode)) 2288 (Info-goto-node nextnode))
2288 ;; Go back to the start node (for the next completion). 2289 ;; Go back to the start node (for the next completion).
2289 (unless (equal Info-current-node orignode) 2290 (unless (equal Info-current-node orignode)
@@ -3192,8 +3193,8 @@ if point is in a menu item description, follow that menu item."
3192 (tool-bar-local-item-from-menu 'Info-next "next-node" map Info-mode-map) 3193 (tool-bar-local-item-from-menu 'Info-next "next-node" map Info-mode-map)
3193 (tool-bar-local-item-from-menu 'Info-up "up-node" map Info-mode-map) 3194 (tool-bar-local-item-from-menu 'Info-up "up-node" map Info-mode-map)
3194 (tool-bar-local-item-from-menu 'Info-top-node "home" map Info-mode-map) 3195 (tool-bar-local-item-from-menu 'Info-top-node "home" map Info-mode-map)
3195 (tool-bar-local-item-from-menu 'Info-index "index" map Info-mode-map)
3196 (tool-bar-local-item-from-menu 'Info-goto-node "jump-to" map Info-mode-map) 3196 (tool-bar-local-item-from-menu 'Info-goto-node "jump-to" map Info-mode-map)
3197 (tool-bar-local-item-from-menu 'Info-index "index" map Info-mode-map)
3197 (tool-bar-local-item-from-menu 'Info-search "search" map Info-mode-map) 3198 (tool-bar-local-item-from-menu 'Info-search "search" map Info-mode-map)
3198 map))) 3199 map)))
3199 3200