diff options
| -rw-r--r-- | lisp/info.el | 38 |
1 files changed, 31 insertions, 7 deletions
diff --git a/lisp/info.el b/lisp/info.el index 67fdec75f88..b099fe2a15e 100644 --- a/lisp/info.el +++ b/lisp/info.el | |||
| @@ -963,7 +963,8 @@ Bind this in case the user sets it to nil." | |||
| 963 | 963 | ||
| 964 | (defun Info-goto-node (nodename &optional fork) | 964 | (defun Info-goto-node (nodename &optional fork) |
| 965 | "Go to info node named NAME. Give just NODENAME or (FILENAME)NODENAME. | 965 | "Go to info node named NAME. Give just NODENAME or (FILENAME)NODENAME. |
| 966 | If FORK is non-nil, show the node in a new info buffer. | 966 | If FORK is non-nil (interactively with a prefix arg), show the node in |
| 967 | a new info buffer. | ||
| 967 | If FORK is a string, it is the name to use for the new buffer." | 968 | If FORK is a string, it is the name to use for the new buffer." |
| 968 | (interactive (list (Info-read-node-name "Goto node: ") current-prefix-arg)) | 969 | (interactive (list (Info-read-node-name "Goto node: ") current-prefix-arg)) |
| 969 | (info-initialize) | 970 | (info-initialize) |
| @@ -1369,7 +1370,10 @@ FOOTNOTENAME may be an abbreviation of the reference name." | |||
| 1369 | 1370 | ||
| 1370 | (defun Info-menu (menu-item &optional fork) | 1371 | (defun Info-menu (menu-item &optional fork) |
| 1371 | "Go to node for menu item named (or abbreviated) NAME. | 1372 | "Go to node for menu item named (or abbreviated) NAME. |
| 1372 | Completion is allowed, and the menu item point is on is the default." | 1373 | Completion is allowed, and the menu item point is on is the default. |
| 1374 | If FORK is non-nil (interactively with a prefix arg), show the node in | ||
| 1375 | a new info buffer. If FORK is a string, it is the name to use for the | ||
| 1376 | new buffer." | ||
| 1373 | (interactive | 1377 | (interactive |
| 1374 | (let ((completions '()) | 1378 | (let ((completions '()) |
| 1375 | ;; If point is within a menu item, use that item as the default | 1379 | ;; If point is within a menu item, use that item as the default |
| @@ -1987,6 +1991,8 @@ If no reference to follow, moves to the next node, or up if none." | |||
| 1987 | :help "Go backward one node, considering all as a sequence"] | 1991 | :help "Go backward one node, considering all as a sequence"] |
| 1988 | ["Forward" Info-forward-node | 1992 | ["Forward" Info-forward-node |
| 1989 | :help "Go forward one node, considering all as a sequence"] | 1993 | :help "Go forward one node, considering all as a sequence"] |
| 1994 | ["Beginning" beginning-of-buffer | ||
| 1995 | :help "Go to beginning of this node"] | ||
| 1990 | ["Top" Info-top-node | 1996 | ["Top" Info-top-node |
| 1991 | :help "Go to top node of file"] | 1997 | :help "Go to top node of file"] |
| 1992 | ["Final Node" Info-final-node | 1998 | ["Final Node" Info-final-node |
| @@ -2004,8 +2010,24 @@ If no reference to follow, moves to the next node, or up if none." | |||
| 2004 | :help "Look for a string in the index items"] | 2010 | :help "Look for a string in the index items"] |
| 2005 | ["Next Matching Item" Info-index-next | 2011 | ["Next Matching Item" Info-index-next |
| 2006 | :help "Look for another occurrence of previous item"]) | 2012 | :help "Look for another occurrence of previous item"]) |
| 2013 | ["Edit" Info-edit :help "Edit contents of this node" | ||
| 2014 | :active Info-enable-edit] | ||
| 2007 | ["Exit" Info-exit t])) | 2015 | ["Exit" Info-exit t])) |
| 2008 | 2016 | ||
| 2017 | |||
| 2018 | (defvar info-tool-bar-map | ||
| 2019 | (if (display-graphic-p) | ||
| 2020 | (let ((tool-bar-map (make-sparse-keymap))) | ||
| 2021 | (tool-bar-add-item-from-menu 'Info-exit "close" Info-mode-map) | ||
| 2022 | (tool-bar-add-item-from-menu 'Info-prev "left_arrow" Info-mode-map) | ||
| 2023 | (tool-bar-add-item-from-menu 'Info-next "right_arrow" Info-mode-map) | ||
| 2024 | (tool-bar-add-item-from-menu 'Info-up "up_arrow" Info-mode-map) | ||
| 2025 | (tool-bar-add-item-from-menu 'Info-top-node "home" Info-mode-map) | ||
| 2026 | (tool-bar-add-item-from-menu 'Info-index "index" Info-mode-map) | ||
| 2027 | (tool-bar-add-item-from-menu 'Info-goto-node "jump_to" Info-mode-map) | ||
| 2028 | (tool-bar-add-item-from-menu 'Info-search "search" Info-mode-map) | ||
| 2029 | tool-bar-map))) | ||
| 2030 | |||
| 2009 | (defvar Info-menu-last-node nil) | 2031 | (defvar Info-menu-last-node nil) |
| 2010 | ;; Last node the menu was created for. | 2032 | ;; Last node the menu was created for. |
| 2011 | ;; Value is a list, (FILE-NAME NODE-NAME). | 2033 | ;; Value is a list, (FILE-NAME NODE-NAME). |
| @@ -2152,6 +2174,7 @@ Advanced commands: | |||
| 2152 | (setq Info-tag-table-buffer nil) | 2174 | (setq Info-tag-table-buffer nil) |
| 2153 | (make-local-variable 'Info-history) | 2175 | (make-local-variable 'Info-history) |
| 2154 | (make-local-variable 'Info-index-alternatives) | 2176 | (make-local-variable 'Info-index-alternatives) |
| 2177 | (set (make-local-variable 'tool-bar-map) info-tool-bar-map) | ||
| 2155 | ;; This is for the sake of the invisible text we use handling titles. | 2178 | ;; This is for the sake of the invisible text we use handling titles. |
| 2156 | (make-local-variable 'line-move-ignore-invisible) | 2179 | (make-local-variable 'line-move-ignore-invisible) |
| 2157 | (setq line-move-ignore-invisible t) | 2180 | (setq line-move-ignore-invisible t) |
| @@ -2169,12 +2192,11 @@ Advanced commands: | |||
| 2169 | (with-current-buffer Info-tag-table-buffer | 2192 | (with-current-buffer Info-tag-table-buffer |
| 2170 | (copy-marker (marker-position m)))))))) | 2193 | (copy-marker (marker-position m)))))))) |
| 2171 | 2194 | ||
| 2172 | (defvar Info-edit-map nil | 2195 | (defvar Info-edit-map (let ((map (make-sparse-keymap))) |
| 2196 | (set-keymap-parent map text-mode-map) | ||
| 2197 | (define-key map "\C-c\C-c" 'Info-cease-edit) | ||
| 2198 | map) | ||
| 2173 | "Local keymap used within `e' command of Info.") | 2199 | "Local keymap used within `e' command of Info.") |
| 2174 | (if Info-edit-map | ||
| 2175 | nil | ||
| 2176 | (setq Info-edit-map (nconc (make-sparse-keymap) text-mode-map)) | ||
| 2177 | (define-key Info-edit-map "\C-c\C-c" 'Info-cease-edit)) | ||
| 2178 | 2200 | ||
| 2179 | ;; Info-edit mode is suitable only for specially formatted data. | 2201 | ;; Info-edit mode is suitable only for specially formatted data. |
| 2180 | (put 'Info-edit-mode 'mode-class 'special) | 2202 | (put 'Info-edit-mode 'mode-class 'special) |
| @@ -2493,6 +2515,8 @@ This will add a speedbar major display mode." | |||
| 2493 | (speedbar-change-initial-expansion-list "Info") | 2515 | (speedbar-change-initial-expansion-list "Info") |
| 2494 | ) | 2516 | ) |
| 2495 | 2517 | ||
| 2518 | (eval-when-compile (defvar speedbar-attached-frame)) | ||
| 2519 | |||
| 2496 | (defun Info-speedbar-hierarchy-buttons (directory depth &optional node) | 2520 | (defun Info-speedbar-hierarchy-buttons (directory depth &optional node) |
| 2497 | "Display an Info directory hierarchy in speedbar. | 2521 | "Display an Info directory hierarchy in speedbar. |
| 2498 | DIRECTORY is the current directory in the attached frame. | 2522 | DIRECTORY is the current directory in the attached frame. |