25 |
|
|
26 |
;;; Commentary: |
;;; Commentary: |
27 |
|
|
28 |
;; Note that nowadays we expect info files to be made using makeinfo. |
;; Note that nowadays we expect Info files to be made using makeinfo. |
29 |
;; In particular we make these assumptions: |
;; In particular we make these assumptions: |
30 |
;; - a menu item MAY contain colons but not colon-space ": " |
;; - a menu item MAY contain colons but not colon-space ": " |
31 |
;; - a menu item ending with ": " (but not ":: ") is an index entry |
;; - a menu item ending with ": " (but not ":: ") is an index entry |
44 |
|
|
45 |
|
|
46 |
(defvar Info-history nil |
(defvar Info-history nil |
47 |
"Stack of info nodes user has visited. |
"Stack of Info nodes user has visited. |
48 |
Each element of the stack is a list (FILENAME NODENAME BUFFERPOS).") |
Each element of the stack is a list (FILENAME NODENAME BUFFERPOS).") |
49 |
|
|
50 |
(defvar Info-history-forward nil |
(defvar Info-history-forward nil |
51 |
"Stack of info nodes user has visited with `Info-history-back' command. |
"Stack of Info nodes user has visited with `Info-history-back' command. |
52 |
Each element of the stack is a list (FILENAME NODENAME BUFFERPOS).") |
Each element of the stack is a list (FILENAME NODENAME BUFFERPOS).") |
53 |
|
|
54 |
(defvar Info-history-list nil |
(defvar Info-history-list nil |
55 |
"List of all info nodes user has visited. |
"List of all Info nodes user has visited. |
56 |
Each element of the list is a list (FILENAME NODENAME).") |
Each element of the list is a list (FILENAME NODENAME).") |
57 |
|
|
58 |
(defcustom Info-enable-edit nil |
(defcustom Info-enable-edit nil |
59 |
"*Non-nil means the \\<Info-mode-map>\\[Info-edit] command in Info can edit the current node. |
"*Non-nil means the \\<Info-mode-map>\\[Info-edit] command in Info can edit the current node. |
60 |
This is convenient if you want to write info files by hand. |
This is convenient if you want to write Info files by hand. |
61 |
However, we recommend that you not do this. |
However, we recommend that you not do this. |
62 |
It is better to write a Texinfo file and generate the Info file from that, |
It is better to write a Texinfo file and generate the Info file from that, |
63 |
because that gives you a printed manual as well." |
because that gives you a printed manual as well." |
76 |
"Face for Info node names." |
"Face for Info node names." |
77 |
:group 'info) |
:group 'info) |
78 |
|
|
79 |
(defface info-menu-5 |
(defface info-title-1 |
80 |
|
'((((type tty pc) (class color) (background light)) |
81 |
|
:foreground "green" :weight bold) |
82 |
|
(((type tty pc) (class color) (background dark)) |
83 |
|
:foreground "yellow" :weight bold) |
84 |
|
(t :height 1.2 :inherit info-title-2)) |
85 |
|
"Face for info titles at level 1." |
86 |
|
:group 'info) |
87 |
|
;; backward-compatibility alias |
88 |
|
(put 'Info-title-1-face 'face-alias 'info-title-1) |
89 |
|
|
90 |
|
(defface info-title-2 |
91 |
|
'((((type tty pc) (class color)) :foreground "lightblue" :weight bold) |
92 |
|
(t :height 1.2 :inherit info-title-3)) |
93 |
|
"Face for info titles at level 2." |
94 |
|
:group 'info) |
95 |
|
;; backward-compatibility alias |
96 |
|
(put 'Info-title-2-face 'face-alias 'info-title-2) |
97 |
|
|
98 |
|
(defface info-title-3 |
99 |
|
'((((type tty pc) (class color)) :weight bold) |
100 |
|
(t :height 1.2 :inherit info-title-4)) |
101 |
|
"Face for info titles at level 3." |
102 |
|
:group 'info) |
103 |
|
;; backward-compatibility alias |
104 |
|
(put 'Info-title-3-face 'face-alias 'info-title-3) |
105 |
|
|
106 |
|
(defface info-title-4 |
107 |
|
'((((type tty pc) (class color)) :weight bold) |
108 |
|
(t :weight bold :inherit variable-pitch)) |
109 |
|
"Face for info titles at level 4." |
110 |
|
:group 'info) |
111 |
|
;; backward-compatibility alias |
112 |
|
(put 'Info-title-4-face 'face-alias 'info-title-4) |
113 |
|
|
114 |
|
(defface info-menu-header |
115 |
|
'((((type tty pc)) |
116 |
|
:underline t |
117 |
|
:weight bold) |
118 |
|
(t |
119 |
|
:inherit variable-pitch |
120 |
|
:weight bold)) |
121 |
|
"Face for headers in Info menus." |
122 |
|
:group 'info) |
123 |
|
|
124 |
|
(defface info-menu-star |
125 |
'((((class color)) :foreground "red1") |
'((((class color)) :foreground "red1") |
126 |
(t :underline t)) |
(t :underline t)) |
127 |
"Face for every third `*' in an Info menu." |
"Face for every third `*' in an Info menu." |
128 |
:group 'info) |
:group 'info) |
129 |
|
(put 'info-menu-5 'face-alias 'info-menu-star) |
130 |
|
|
131 |
(defface info-xref |
(defface info-xref |
132 |
'((((min-colors 88) |
'((((min-colors 88) |
147 |
:group 'info) |
:group 'info) |
148 |
|
|
149 |
(defcustom Info-fontify-visited-nodes t |
(defcustom Info-fontify-visited-nodes t |
150 |
"*Non-nil means to fontify visited nodes in a different face." |
"*Non-nil to fontify references to visited nodes in `info-xref-visited' face." |
151 |
:version "22.1" |
:version "22.1" |
152 |
:type 'boolean |
:type 'boolean |
153 |
:group 'info) |
:group 'info) |
211 |
|
|
212 |
(defcustom Info-scroll-prefer-subnodes nil |
(defcustom Info-scroll-prefer-subnodes nil |
213 |
"*If non-nil, \\<Info-mode-map>\\[Info-scroll-up] in a menu visits subnodes. |
"*If non-nil, \\<Info-mode-map>\\[Info-scroll-up] in a menu visits subnodes. |
214 |
|
|
215 |
If this is non-nil, and you scroll far enough in a node that its menu |
If this is non-nil, and you scroll far enough in a node that its menu |
216 |
appears on the screen, the next \\<Info-mode-map>\\[Info-scroll-up] |
appears on the screen, the next \\<Info-mode-map>\\[Info-scroll-up] |
217 |
moves to a subnode indicated by the following menu item. This means |
moves to a subnode indicated by the following menu item. This means |
227 |
(defcustom Info-hide-note-references t |
(defcustom Info-hide-note-references t |
228 |
"*If non-nil, hide the tag and section reference in *note and * menu items. |
"*If non-nil, hide the tag and section reference in *note and * menu items. |
229 |
If value is non-nil but not `hide', also replaces the \"*note\" with \"see\". |
If value is non-nil but not `hide', also replaces the \"*note\" with \"see\". |
230 |
If value is non-nil but not t or `hide', the reference section is still shown." |
If value is non-nil but not t or `hide', the reference section is still shown. |
231 |
|
`nil' completely disables this feature." |
232 |
:version "22.1" |
:version "22.1" |
233 |
:type '(choice (const :tag "No hiding" nil) |
:type '(choice (const :tag "No hiding" nil) |
234 |
(const :tag "Replace tag and hide reference" t) |
(const :tag "Replace tag and hide reference" t) |
238 |
|
|
239 |
(defcustom Info-refill-paragraphs nil |
(defcustom Info-refill-paragraphs nil |
240 |
"*If non-nil, attempt to refill paragraphs with hidden references. |
"*If non-nil, attempt to refill paragraphs with hidden references. |
241 |
This refilling may accidentally remove explicit line breaks in the info |
This refilling may accidentally remove explicit line breaks in the Info |
242 |
file, so be prepared for a few surprises if you enable this feature." |
file, so be prepared for a few surprises if you enable this feature." |
243 |
:version "22.1" |
:version "22.1" |
244 |
:type 'boolean |
:type 'boolean |
295 |
|
|
296 |
(defvar Info-current-subfile nil |
(defvar Info-current-subfile nil |
297 |
"Info subfile that is actually in the *info* buffer now. |
"Info subfile that is actually in the *info* buffer now. |
298 |
nil if current info file is not split into subfiles.") |
nil if current Info file is not split into subfiles.") |
299 |
|
|
300 |
(defvar Info-current-node nil |
(defvar Info-current-node nil |
301 |
"Name of node that Info is now looking at, or nil.") |
"Name of node that Info is now looking at, or nil.") |
405 |
(not (file-directory-p filename)))) |
(not (file-directory-p filename)))) |
406 |
|
|
407 |
(defun info-insert-file-contents (filename &optional visit) |
(defun info-insert-file-contents (filename &optional visit) |
408 |
"Insert the contents of an info file in the current buffer. |
"Insert the contents of an Info file in the current buffer. |
409 |
Do the right thing if the file has been compressed or zipped." |
Do the right thing if the file has been compressed or zipped." |
410 |
(let* ((tail Info-suffix-list) |
(let* ((tail Info-suffix-list) |
411 |
(lfn (if (fboundp 'msdos-long-file-names) |
(lfn (if (fboundp 'msdos-long-file-names) |
680 |
filename))) |
filename))) |
681 |
|
|
682 |
(defun Info-find-node (filename nodename &optional no-going-back) |
(defun Info-find-node (filename nodename &optional no-going-back) |
683 |
"Go to an info node specified as separate FILENAME and NODENAME. |
"Go to an Info node specified as separate FILENAME and NODENAME. |
684 |
NO-GOING-BACK is non-nil if recovering from an error in this function; |
NO-GOING-BACK is non-nil if recovering from an error in this function; |
685 |
it says do not attempt further (recursive) error recovery." |
it says do not attempt further (recursive) error recovery." |
686 |
(info-initialize) |
(info-initialize) |
687 |
(setq filename (Info-find-file filename)) |
(setq filename (Info-find-file filename)) |
688 |
;; Go into info buffer. |
;; Go into Info buffer. |
689 |
(or (eq major-mode 'Info-mode) (pop-to-buffer "*info*")) |
(or (eq major-mode 'Info-mode) (pop-to-buffer "*info*")) |
690 |
;; Record the node we are leaving. |
;; Record the node we are leaving. |
691 |
(if (and Info-current-file (not no-going-back)) |
(if (and Info-current-file (not no-going-back)) |
695 |
(Info-find-node-2 filename nodename no-going-back)) |
(Info-find-node-2 filename nodename no-going-back)) |
696 |
|
|
697 |
(defun Info-on-current-buffer (&optional nodename) |
(defun Info-on-current-buffer (&optional nodename) |
698 |
"Use the `Info-mode' to browse the current info buffer. |
"Use the `Info-mode' to browse the current Info buffer. |
699 |
If a prefix arg is provided, it queries for the NODENAME which |
If a prefix arg is provided, it queries for the NODENAME which |
700 |
else defaults to \"Top\"." |
else defaults to \"Top\"." |
701 |
(interactive |
(interactive |
713 |
;; makeinfo-buffer) out of the way of normal operations. |
;; makeinfo-buffer) out of the way of normal operations. |
714 |
;; |
;; |
715 |
(defun Info-revert-find-node (filename nodename) |
(defun Info-revert-find-node (filename nodename) |
716 |
"Go to an info node FILENAME and NODENAME, re-reading disk contents. |
"Go to an Info node FILENAME and NODENAME, re-reading disk contents. |
717 |
When *info* is already displaying FILENAME and NODENAME, the window position |
When *info* is already displaying FILENAME and NODENAME, the window position |
718 |
is preserved, if possible." |
is preserved, if possible." |
719 |
(pop-to-buffer "*info*") |
(pop-to-buffer "*info*") |
1076 |
;; Insert the entire original dir file as a start; note that we've |
;; Insert the entire original dir file as a start; note that we've |
1077 |
;; already saved its default directory to use as the default |
;; already saved its default directory to use as the default |
1078 |
;; directory for the whole concatenation. |
;; directory for the whole concatenation. |
1079 |
(insert-buffer-substring buffer) |
(goto-char (prog1 (point) (insert-buffer-substring buffer))) |
1080 |
|
|
1081 |
;; Look at each of the other buffers one by one. |
;; Look at each of the other buffers one by one. |
1082 |
(dolist (other others) |
(dolist (other others) |
1335 |
(set-buffer-modified-p nil))) |
(set-buffer-modified-p nil))) |
1336 |
|
|
1337 |
(defun Info-select-node () |
(defun Info-select-node () |
1338 |
"Select the info node that point is in." |
"Select the Info node that point is in." |
1339 |
;; Bind this in case the user sets it to nil. |
;; Bind this in case the user sets it to nil. |
1340 |
(let ((case-fold-search t)) |
(let ((case-fold-search t)) |
1341 |
(save-excursion |
(save-excursion |
1391 |
") " |
") " |
1392 |
(or Info-current-node "")))))) |
(or Info-current-node "")))))) |
1393 |
|
|
1394 |
;; Go to an info node specified with a filename-and-nodename string |
;; Go to an Info node specified with a filename-and-nodename string |
1395 |
;; of the sort that is found in pointers in nodes. |
;; of the sort that is found in pointers in nodes. |
1396 |
|
|
1397 |
;; Don't autoload this function: the correct entry point for other packages |
;; Don't autoload this function: the correct entry point for other packages |
1398 |
;; to use is `info'. --Stef |
;; to use is `info'. --Stef |
1399 |
;; ;;;###autoload |
;; ;;;###autoload |
1400 |
(defun Info-goto-node (nodename &optional fork) |
(defun Info-goto-node (nodename &optional fork) |
1401 |
"Go to info node named NODENAME. Give just NODENAME or (FILENAME)NODENAME. |
"Go to Info node named NODENAME. Give just NODENAME or (FILENAME)NODENAME. |
1402 |
If NODENAME is of the form (FILENAME)NODENAME, the node is in the Info file |
If NODENAME is of the form (FILENAME)NODENAME, the node is in the Info file |
1403 |
FILENAME; otherwise, NODENAME should be in the current Info file (or one of |
FILENAME; otherwise, NODENAME should be in the current Info file (or one of |
1404 |
its sub-files). |
its sub-files). |
1405 |
Completion is available, but only for node names in the current Info file. |
Completion is available, but only for node names in the current Info file. |
1406 |
If FORK is non-nil (interactively with a prefix arg), show the node in |
If FORK is non-nil (interactively with a prefix arg), show the node in |
1407 |
a new info buffer. |
a new Info buffer. |
1408 |
If FORK is a string, it is the name to use for the new buffer." |
If FORK is a string, it is the name to use for the new buffer." |
1409 |
(interactive (list (Info-read-node-name "Go to node: ") current-prefix-arg)) |
(interactive (list (Info-read-node-name "Go to node: ") current-prefix-arg)) |
1410 |
(info-initialize) |
(info-initialize) |
1450 |
;; include it. |
;; include it. |
1451 |
(and (or (null (file-name-extension file)) |
(and (or (null (file-name-extension file)) |
1452 |
(string-match suffix file)) |
(string-match suffix file)) |
1453 |
;; But exclude subfiles of split info files. |
;; But exclude subfiles of split Info files. |
1454 |
(not (string-match "-[0-9]+\\'" file)) |
(not (string-match "-[0-9]+\\'" file)) |
1455 |
;; And exclude backup files. |
;; And exclude backup files. |
1456 |
(not (string-match "~\\'" file)) |
(not (string-match "~\\'" file)) |
1870 |
(concat "\n\\* +\\(" (regexp-quote old-node) |
(concat "\n\\* +\\(" (regexp-quote old-node) |
1871 |
":\\|[^:]+: +" (regexp-quote old-node) "\\)")) |
":\\|[^:]+: +" (regexp-quote old-node) "\\)")) |
1872 |
nil t)) |
nil t)) |
1873 |
(beginning-of-line) |
(progn (beginning-of-line) (if (looking-at "^\\* ") (forward-char 2))) |
1874 |
(goto-char p) |
(goto-char p) |
1875 |
(Info-restore-point Info-history)))) |
(Info-restore-point Info-history)))) |
1876 |
|
|
2059 |
"Follow cross reference named FOOTNOTENAME to the node it refers to. |
"Follow cross reference named FOOTNOTENAME to the node it refers to. |
2060 |
FOOTNOTENAME may be an abbreviation of the reference name. |
FOOTNOTENAME may be an abbreviation of the reference name. |
2061 |
If FORK is non-nil (interactively with a prefix arg), show the node in |
If FORK is non-nil (interactively with a prefix arg), show the node in |
2062 |
a new info buffer. If FORK is a string, it is the name to use for the |
a new Info buffer. If FORK is a string, it is the name to use for the |
2063 |
new buffer." |
new buffer." |
2064 |
(interactive |
(interactive |
2065 |
(let ((completion-ignore-case t) |
(let ((completion-ignore-case t) |
2270 |
The menu item should one of those listed in the current node's menu. |
The menu item should one of those listed in the current node's menu. |
2271 |
Completion is allowed, and the default menu item is the one point is on. |
Completion is allowed, and the default menu item is the one point is on. |
2272 |
If FORK is non-nil (interactively with a prefix arg), show the node in |
If FORK is non-nil (interactively with a prefix arg), show the node in |
2273 |
a new info buffer. If FORK is a string, it is the name to use for the |
a new Info buffer. If FORK is a string, it is the name to use for the |
2274 |
new buffer." |
new buffer." |
2275 |
(interactive |
(interactive |
2276 |
(let ((completions '()) |
(let ((completions '()) |
2595 |
(if (looking-at "\\* Menu:") |
(if (looking-at "\\* Menu:") |
2596 |
(if recur |
(if recur |
2597 |
(error "No cross references in this node") |
(error "No cross references in this node") |
2598 |
(Info-next-reference t))))) |
(Info-next-reference t)) |
2599 |
|
(if (looking-at "^\\* ") |
2600 |
|
(forward-char 2))))) |
2601 |
|
|
2602 |
(defun Info-prev-reference (&optional recur) |
(defun Info-prev-reference (&optional recur) |
2603 |
"Move cursor to the previous cross-reference or menu item in the node." |
"Move cursor to the previous cross-reference or menu item in the node." |
2616 |
(if (looking-at "\\* Menu:") |
(if (looking-at "\\* Menu:") |
2617 |
(if recur |
(if recur |
2618 |
(error "No cross references in this node") |
(error "No cross references in this node") |
2619 |
(Info-prev-reference t))))) |
(Info-prev-reference t)) |
2620 |
|
(if (looking-at "^\\* ") |
2621 |
|
(forward-char 2))))) |
2622 |
|
|
2623 |
(defvar Info-index-nodes nil |
(defvar Info-index-nodes nil |
2624 |
"Alist of cached index node names of visited Info files. |
"Alist of cached index node names of visited Info files. |
2852 |
(goto-char (point-min)) |
(goto-char (point-min)) |
2853 |
(re-search-forward "\\* Menu: *\n" nil t) |
(re-search-forward "\\* Menu: *\n" nil t) |
2854 |
(while (re-search-forward "\\*.*: *(\\([^)]+\\))" nil t) |
(while (re-search-forward "\\*.*: *(\\([^)]+\\))" nil t) |
2855 |
(add-to-list 'manuals (match-string 1))) |
(setq manuals (cons (match-string 1) manuals))) |
2856 |
(dolist (manual manuals) |
(dolist (manual (nreverse manuals)) |
2857 |
(message "Searching %s" manual) |
(message "Searching %s" manual) |
2858 |
(if (setq nodes (Info-index-nodes (Info-find-file manual))) |
(condition-case err |
2859 |
(condition-case nil |
(if (setq nodes (Info-index-nodes (Info-find-file manual))) |
2860 |
(save-excursion |
(save-excursion |
2861 |
(Info-find-node manual (car nodes)) |
(Info-find-node manual (car nodes)) |
2862 |
(while |
(while |
2863 |
(progn |
(progn |
2864 |
(goto-char (point-min)) |
(goto-char (point-min)) |
2865 |
(while (re-search-forward pattern nil t) |
(while (re-search-forward pattern nil t) |
2866 |
(add-to-list 'matches |
(setq matches |
2867 |
(list manual |
(cons (list manual |
2868 |
(match-string-no-properties 1) |
(match-string-no-properties 1) |
2869 |
(match-string-no-properties 2) |
(match-string-no-properties 2) |
2870 |
(match-string-no-properties 3)))) |
(match-string-no-properties 3)) |
2871 |
|
matches))) |
2872 |
(setq nodes (cdr nodes) node (car nodes))) |
(setq nodes (cdr nodes) node (car nodes))) |
2873 |
(Info-goto-node node))) |
(Info-goto-node node)))) |
2874 |
(error nil))))) |
(error |
2875 |
|
(message "%s" (if (eq (car-safe err) 'error) |
2876 |
|
(nth 1 err) err)) |
2877 |
|
(sit-for 1 t))))) |
2878 |
(Info-goto-node (concat "(" current-file ")" current-node)) |
(Info-goto-node (concat "(" current-file ")" current-node)) |
2879 |
(setq Info-history ohist |
(setq Info-history ohist |
2880 |
Info-history-list ohist-list) |
Info-history-list ohist-list) |
2884 |
(with-current-buffer (get-buffer-create " *info-apropos*") |
(with-current-buffer (get-buffer-create " *info-apropos*") |
2885 |
(erase-buffer) |
(erase-buffer) |
2886 |
(insert "\n\^_\nFile: apropos, Node: Index, Up: (dir)\n") |
(insert "\n\^_\nFile: apropos, Node: Index, Up: (dir)\n") |
2887 |
(insert "* Menu: \nNodes whose indices contain \"" string "\"\n\n") |
(insert "* Menu: \nNodes whose indices contain `" string "':\n\n") |
2888 |
(dolist (entry matches) |
(dolist (entry (nreverse matches)) |
2889 |
(insert |
(insert |
2890 |
(format "* %-38s (%s)%s.%s\n" |
(format "* %-38s (%s)%s.%s\n" |
2891 |
(concat (nth 1 entry) " [" (nth 0 entry) "]:") |
(concat (nth 1 entry) " [" (nth 0 entry) "]:") |
3058 |
(define-key Info-mode-map "<" 'Info-top-node) |
(define-key Info-mode-map "<" 'Info-top-node) |
3059 |
(define-key Info-mode-map ">" 'Info-final-node) |
(define-key Info-mode-map ">" 'Info-final-node) |
3060 |
(define-key Info-mode-map "b" 'beginning-of-buffer) |
(define-key Info-mode-map "b" 'beginning-of-buffer) |
|
(define-key Info-mode-map "c" 'Info-copy-current-node-name) |
|
3061 |
(define-key Info-mode-map "d" 'Info-directory) |
(define-key Info-mode-map "d" 'Info-directory) |
3062 |
(define-key Info-mode-map "e" 'Info-edit) |
(define-key Info-mode-map "e" 'Info-edit) |
3063 |
(define-key Info-mode-map "f" 'Info-follow-reference) |
(define-key Info-mode-map "f" 'Info-follow-reference) |
3079 |
(define-key Info-mode-map "t" 'Info-top-node) |
(define-key Info-mode-map "t" 'Info-top-node) |
3080 |
(define-key Info-mode-map "T" 'Info-toc) |
(define-key Info-mode-map "T" 'Info-toc) |
3081 |
(define-key Info-mode-map "u" 'Info-up) |
(define-key Info-mode-map "u" 'Info-up) |
3082 |
;; For consistency with dired-copy-filename-as-kill. |
;; `w' for consistency with `dired-copy-filename-as-kill'. |
3083 |
(define-key Info-mode-map "w" 'Info-copy-current-node-name) |
(define-key Info-mode-map "w" 'Info-copy-current-node-name) |
3084 |
|
(define-key Info-mode-map "c" 'Info-copy-current-node-name) |
3085 |
|
;; `^' for consistency with `dired-up-directory'. |
3086 |
|
(define-key Info-mode-map "^" 'Info-up) |
3087 |
(define-key Info-mode-map "," 'Info-index-next) |
(define-key Info-mode-map "," 'Info-index-next) |
3088 |
(define-key Info-mode-map "\177" 'Info-scroll-down) |
(define-key Info-mode-map "\177" 'Info-scroll-down) |
3089 |
(define-key Info-mode-map [mouse-2] 'Info-mouse-follow-nearest-node) |
(define-key Info-mode-map [mouse-2] 'Info-mouse-follow-nearest-node) |
3098 |
|
|
3099 |
(easy-menu-define |
(easy-menu-define |
3100 |
Info-mode-menu Info-mode-map |
Info-mode-menu Info-mode-map |
3101 |
"Menu for info files." |
"Menu for Info files." |
3102 |
'("Info" |
'("Info" |
3103 |
["Up" Info-up :active (Info-check-pointer "up") |
["Up" Info-up :active (Info-check-pointer "up") |
3104 |
:help "Go up in the Info tree"] |
:help "Go up in the Info tree"] |
3120 |
("Reference" ["You should never see this" report-emacs-bug t]) |
("Reference" ["You should never see this" report-emacs-bug t]) |
3121 |
["Search..." Info-search |
["Search..." Info-search |
3122 |
:help "Search for regular expression in this Info file"] |
:help "Search for regular expression in this Info file"] |
|
["Search Case-Sensitively..." Info-search-case-sensitively |
|
|
:help "Search for regular expression case sensitively"] |
|
3123 |
["Search Next" Info-search-next |
["Search Next" Info-search-next |
3124 |
:help "Search for another occurrence of regular expression"] |
:help "Search for another occurrence of regular expression"] |
3125 |
["Go to Node..." Info-goto-node |
["Go to Node..." Info-goto-node |
3231 |
|
|
3232 |
|
|
3233 |
(defun Info-copy-current-node-name (&optional arg) |
(defun Info-copy-current-node-name (&optional arg) |
3234 |
"Put the name of the current info node into the kill ring. |
"Put the name of the current Info node into the kill ring. |
3235 |
The name of the info file is prepended to the node name in parentheses. |
The name of the Info file is prepended to the node name in parentheses. |
3236 |
With a zero prefix arg, put the name inside a function call to `info'." |
With a zero prefix arg, put the name inside a function call to `info'." |
3237 |
(interactive "P") |
(interactive "P") |
3238 |
(unless Info-current-node |
(unless Info-current-node |
3239 |
(error "No current info node")) |
(error "No current Info node")) |
3240 |
(let ((node (concat "(" (file-name-nondirectory |
(let ((node (concat "(" (file-name-nondirectory |
3241 |
(or (and (stringp Info-current-file) |
(or (and (stringp Info-current-file) |
3242 |
Info-current-file) |
Info-current-file) |
3302 |
\\[beginning-of-buffer] Go to beginning of node. |
\\[beginning-of-buffer] Go to beginning of node. |
3303 |
|
|
3304 |
Advanced commands: |
Advanced commands: |
3305 |
\\[Info-copy-current-node-name] Put name of current info node in the kill ring. |
\\[Info-copy-current-node-name] Put name of current Info node in the kill ring. |
3306 |
\\[clone-buffer] Select a new cloned Info buffer in another window. |
\\[clone-buffer] Select a new cloned Info buffer in another window. |
3307 |
\\[Info-edit] Edit contents of selected node. |
\\[Info-edit] Edit contents of selected node. |
3308 |
1 .. 9 Pick first ... ninth item in node's menu. |
1 .. 9 Pick first ... ninth item in node's menu. |
3412 |
Allowed only if variable `Info-enable-edit' is non-nil." |
Allowed only if variable `Info-enable-edit' is non-nil." |
3413 |
(interactive) |
(interactive) |
3414 |
(or Info-enable-edit |
(or Info-enable-edit |
3415 |
(error "Editing info nodes is not enabled")) |
(error "Editing Info nodes is not enabled")) |
3416 |
(Info-edit-mode) |
(Info-edit-mode) |
3417 |
(message "%s" (substitute-command-keys |
(message "%s" (substitute-command-keys |
3418 |
"Editing: Type \\<Info-edit-map>\\[Info-cease-edit] to return to info"))) |
"Editing: Type \\<Info-edit-map>\\[Info-cease-edit] to return to info"))) |
3474 |
"\\( <[0-9]+>\\)?:\\s *\\(.*\\)\\." |
"\\( <[0-9]+>\\)?:\\s *\\(.*\\)\\." |
3475 |
"\\(?:[ \t\n]+(line +\\([0-9]+\\))\\)?")) |
"\\(?:[ \t\n]+(line +\\([0-9]+\\))\\)?")) |
3476 |
(info-file "emacs")) ;default |
(info-file "emacs")) ;default |
3477 |
;; Determine which info file this command is documented in. |
;; Determine which Info file this command is documented in. |
3478 |
(if (get command 'info-file) |
(if (get command 'info-file) |
3479 |
(setq info-file (get command 'info-file)) |
(setq info-file (get command 'info-file)) |
3480 |
;; If it doesn't say explicitly, test its name against |
;; If it doesn't say explicitly, test its name against |
3583 |
(t |
(t |
3584 |
(Info-goto-emacs-command-node command))))) |
(Info-goto-emacs-command-node command))))) |
3585 |
|
|
|
(defface info-title-1 |
|
|
'((((type tty pc) (class color) (background light)) |
|
|
:foreground "green" :weight bold) |
|
|
(((type tty pc) (class color) (background dark)) |
|
|
:foreground "yellow" :weight bold) |
|
|
(t :height 1.2 :inherit info-title-2)) |
|
|
"Face for info titles at level 1." |
|
|
:group 'info) |
|
|
;; backward-compatibility alias |
|
|
(put 'Info-title-1-face 'face-alias 'info-title-1) |
|
|
|
|
|
(defface info-title-2 |
|
|
'((((type tty pc) (class color)) :foreground "lightblue" :weight bold) |
|
|
(t :height 1.2 :inherit info-title-3)) |
|
|
"Face for info titles at level 2." |
|
|
:group 'info) |
|
|
;; backward-compatibility alias |
|
|
(put 'Info-title-2-face 'face-alias 'info-title-2) |
|
|
|
|
|
(defface info-title-3 |
|
|
'((((type tty pc) (class color)) :weight bold) |
|
|
(t :height 1.2 :inherit info-title-4)) |
|
|
"Face for info titles at level 3." |
|
|
:group 'info) |
|
|
;; backward-compatibility alias |
|
|
(put 'Info-title-3-face 'face-alias 'info-title-3) |
|
|
|
|
|
(defface info-title-4 |
|
|
'((((type tty pc) (class color)) :weight bold) |
|
|
(t :weight bold :inherit variable-pitch)) |
|
|
"Face for info titles at level 4." |
|
|
:group 'info) |
|
|
;; backward-compatibility alias |
|
|
(put 'Info-title-4-face 'face-alias 'info-title-4) |
|
|
|
|
|
(defface info-menu-header |
|
|
'((((type tty pc)) |
|
|
:underline t |
|
|
:weight bold) |
|
|
(t |
|
|
:inherit variable-pitch |
|
|
:weight bold)) |
|
|
"Face for headers in Info menus." |
|
|
:group 'info) |
|
|
|
|
3586 |
(defun Info-escape-percent (string) |
(defun Info-escape-percent (string) |
3587 |
"Double all occurrences of `%' in STRING. |
"Double all occurrences of `%' in STRING. |
3588 |
|
|
3879 |
(if (and (<= n 9) (zerop (% n 3))) ; visual aids to help with 1-9 keys |
(if (and (<= n 9) (zerop (% n 3))) ; visual aids to help with 1-9 keys |
3880 |
(put-text-property (match-beginning 0) |
(put-text-property (match-beginning 0) |
3881 |
(1+ (match-beginning 0)) |
(1+ (match-beginning 0)) |
3882 |
'font-lock-face 'info-menu-5))) |
'font-lock-face 'info-menu-star))) |
3883 |
(when not-fontified-p |
(when not-fontified-p |
3884 |
(add-text-properties |
(add-text-properties |
3885 |
(match-beginning 1) (match-end 1) |
(match-beginning 1) (match-end 1) |
3973 |
|
|
3974 |
;;; Speedbar support: |
;;; Speedbar support: |
3975 |
;; These functions permit speedbar to display the "tags" in the |
;; These functions permit speedbar to display the "tags" in the |
3976 |
;; current info node. |
;; current Info node. |
3977 |
(eval-when-compile (require 'speedbar)) |
(eval-when-compile (require 'speedbar)) |
3978 |
|
|
3979 |
(defvar Info-speedbar-key-map nil |
(defvar Info-speedbar-key-map nil |
4015 |
;;; Info hierarchy display method |
;;; Info hierarchy display method |
4016 |
;;;###autoload |
;;;###autoload |
4017 |
(defun Info-speedbar-browser () |
(defun Info-speedbar-browser () |
4018 |
"Initialize speedbar to display an info node browser. |
"Initialize speedbar to display an Info node browser. |
4019 |
This will add a speedbar major display mode." |
This will add a speedbar major display mode." |
4020 |
(interactive) |
(interactive) |
4021 |
(require 'speedbar) |
(require 'speedbar) |
4156 |
"^No `.*' in index$" |
"^No `.*' in index$" |
4157 |
"^No cross-reference named" |
"^No cross-reference named" |
4158 |
"^No cross.references in this node$" |
"^No cross.references in this node$" |
4159 |
"^No current info node$" |
"^No current Info node$" |
4160 |
"^No menu in this node$" |
"^No menu in this node$" |
4161 |
"^No more items in menu$" |
"^No more items in menu$" |
4162 |
"^No more nodes$" |
"^No more nodes$" |
4183 |
(defun Info-restore-desktop-buffer (desktop-buffer-file-name |
(defun Info-restore-desktop-buffer (desktop-buffer-file-name |
4184 |
desktop-buffer-name |
desktop-buffer-name |
4185 |
desktop-buffer-misc) |
desktop-buffer-misc) |
4186 |
"Restore an info buffer specified in a desktop file." |
"Restore an Info buffer specified in a desktop file." |
4187 |
(let ((first (nth 0 desktop-buffer-misc)) |
(let ((first (nth 0 desktop-buffer-misc)) |
4188 |
(second (nth 1 desktop-buffer-misc))) |
(second (nth 1 desktop-buffer-misc))) |
4189 |
(when (and first second) |
(when (and first second) |