diff options
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/info.el | 68 |
2 files changed, 39 insertions, 34 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e722f4c643c..72dc27ae943 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2000-06-13 Dave Love <fx@gnu.org> | ||
| 2 | |||
| 3 | * info.el Doc fixes. | ||
| 4 | (Info-build-node-completions): Match Ref tags. | ||
| 5 | |||
| 1 | 2000-06-13 Eli Zaretskii <eliz@is.elta.co.il> | 6 | 2000-06-13 Eli Zaretskii <eliz@is.elta.co.il> |
| 2 | 7 | ||
| 3 | * frame.el (display-multi-frame-p, display-multi-font-p): New | 8 | * frame.el (display-multi-frame-p, display-multi-font-p): New |
diff --git a/lisp/info.el b/lisp/info.el index a4caf19fb62..abc21a6a13c 100644 --- a/lisp/info.el +++ b/lisp/info.el | |||
| @@ -109,8 +109,8 @@ It doesn't contain directory names or file name extensions added by Info. | |||
| 109 | Can also be t when using `Info-on-current-buffer'.") | 109 | Can also be t when using `Info-on-current-buffer'.") |
| 110 | 110 | ||
| 111 | (defvar Info-current-subfile nil | 111 | (defvar Info-current-subfile nil |
| 112 | "Info subfile that is actually in the *info* buffer now, | 112 | "Info subfile that is actually in the *info* buffer now. |
| 113 | or nil if current info file is not split into subfiles.") | 113 | nil if current info file is not split into subfiles.") |
| 114 | 114 | ||
| 115 | (defvar Info-current-node nil | 115 | (defvar Info-current-node nil |
| 116 | "Name of node that Info is now looking at, or nil.") | 116 | "Name of node that Info is now looking at, or nil.") |
| @@ -126,7 +126,7 @@ Marker points nowhere if file has no tag table.") | |||
| 126 | "Cached completion list for current Info file.") | 126 | "Cached completion list for current Info file.") |
| 127 | 127 | ||
| 128 | (defvar Info-index-alternatives nil | 128 | (defvar Info-index-alternatives nil |
| 129 | "List of possible matches for last Info-index command.") | 129 | "List of possible matches for last `Info-index' command.") |
| 130 | 130 | ||
| 131 | (defvar Info-standalone nil | 131 | (defvar Info-standalone nil |
| 132 | "Non-nil if Emacs was started solely as an Info browser.") | 132 | "Non-nil if Emacs was started solely as an Info browser.") |
| @@ -250,8 +250,8 @@ Do the right thing if the file has been compressed or zipped." | |||
| 250 | (call-process-region (point-min) (point-max) decoder t t))) | 250 | (call-process-region (point-min) (point-max) decoder t t))) |
| 251 | (insert-file-contents fullname visit)))) | 251 | (insert-file-contents fullname visit)))) |
| 252 | 252 | ||
| 253 | ;; Initialize Info-directory-list, if that hasn't been done yet. | ||
| 254 | (defun info-initialize () | 253 | (defun info-initialize () |
| 254 | "Initialize `Info-directory-list', if that hasn't been done yet." | ||
| 255 | (unless Info-directory-list | 255 | (unless Info-directory-list |
| 256 | (let ((path (getenv "INFOPATH")) | 256 | (let ((path (getenv "INFOPATH")) |
| 257 | (source (expand-file-name "info/" source-directory)) | 257 | (source (expand-file-name "info/" source-directory)) |
| @@ -362,10 +362,10 @@ In standalone mode, \\<Info-mode-map>\\[Info-exit] exits Emacs itself." | |||
| 362 | (forward-line 1) ; does the line after delimiter match REGEXP? | 362 | (forward-line 1) ; does the line after delimiter match REGEXP? |
| 363 | (re-search-backward regexp beg t)))) | 363 | (re-search-backward regexp beg t)))) |
| 364 | 364 | ||
| 365 | ;; Go to an info node specified as separate filename and nodename. | ||
| 366 | ;; no-going-back is non-nil if recovering from an error in this function; | ||
| 367 | ;; it says do not attempt further (recursive) error recovery. | ||
| 368 | (defun Info-find-node (filename nodename &optional no-going-back) | 365 | (defun Info-find-node (filename nodename &optional no-going-back) |
| 366 | "Go to an info node specified as separate FILENAME and NODENAME. | ||
| 367 | NO-GOING-BACK is non-nil if recovering from an error in this function; | ||
| 368 | it says do not attempt further (recursive) error recovery." | ||
| 369 | (info-initialize) | 369 | (info-initialize) |
| 370 | ;; Convert filename to lower case if not found as specified. | 370 | ;; Convert filename to lower case if not found as specified. |
| 371 | ;; Expand it. | 371 | ;; Expand it. |
| @@ -714,8 +714,8 @@ else defaults to `Top'." | |||
| 714 | (setq problems t) | 714 | (setq problems t) |
| 715 | (message "No `top' node in %s" Info-dir-file-name)))) | 715 | (message "No `top' node in %s" Info-dir-file-name)))) |
| 716 | (setq others (cdr others))) | 716 | (setq others (cdr others))) |
| 717 | ;; Add to the main menu a menu item for each other node. | 717 | ;; Add to the main menu a menu item for each other node. |
| 718 | (let ((case-fold-search t) | 718 | (let ((case-fold-search t) |
| 719 | (re-search-forward "^\\* Menu:"))) | 719 | (re-search-forward "^\\* Menu:"))) |
| 720 | (forward-line 1) | 720 | (forward-line 1) |
| 721 | (let ((menu-items '("top")) | 721 | (let ((menu-items '("top")) |
| @@ -816,9 +816,9 @@ else defaults to `Top'." | |||
| 816 | (if (numberp nodepos) | 816 | (if (numberp nodepos) |
| 817 | (+ (- nodepos lastfilepos) (point))))) | 817 | (+ (- nodepos lastfilepos) (point))))) |
| 818 | 818 | ||
| 819 | ;; Select the info node that point is in. | ||
| 820 | (defun Info-select-node () | 819 | (defun Info-select-node () |
| 821 | ;; Bind this in case the user sets it to nil. | 820 | "Select the info node that point is in. |
| 821 | Bind this in case the user sets it to nil." | ||
| 822 | (let ((case-fold-search t)) | 822 | (let ((case-fold-search t)) |
| 823 | (save-excursion | 823 | (save-excursion |
| 824 | ;; Find beginning of node. | 824 | ;; Find beginning of node. |
| @@ -933,9 +933,9 @@ If FORK is a string, it is the name to use for the new buffer." | |||
| 933 | (set-buffer (marker-buffer marker)) | 933 | (set-buffer (marker-buffer marker)) |
| 934 | (widen) | 934 | (widen) |
| 935 | (goto-char marker) | 935 | (goto-char marker) |
| 936 | (while (re-search-forward "\nNode: \\(.*\\)\177" nil t) | 936 | (while (re-search-forward "\n\\(Node\\|Ref\\): \\(.*\\)\177" nil t) |
| 937 | (setq compl | 937 | (setq compl |
| 938 | (cons (list (match-string-no-properties 1)) | 938 | (cons (list (match-string-no-properties 2)) |
| 939 | compl)))) | 939 | compl)))) |
| 940 | (widen) | 940 | (widen) |
| 941 | (goto-char (point-min)) | 941 | (goto-char (point-min)) |
| @@ -1038,11 +1038,11 @@ If FORK is a string, it is the name to use for the new buffer." | |||
| 1038 | (setq Info-history (cons (list ofile onode opoint) | 1038 | (setq Info-history (cons (list ofile onode opoint) |
| 1039 | Info-history)))))) | 1039 | Info-history)))))) |
| 1040 | 1040 | ||
| 1041 | ;; Extract the value of the node-pointer named NAME. | ||
| 1042 | ;; If there is none, use ERRORNAME in the error message; | ||
| 1043 | ;; if ERRORNAME is nil, just return nil. | ||
| 1044 | (defun Info-extract-pointer (name &optional errorname) | 1041 | (defun Info-extract-pointer (name &optional errorname) |
| 1045 | ;; Bind this in case the user sets it to nil. | 1042 | "Extract the value of the node-pointer named NAME. |
| 1043 | If there is none, use ERRORNAME in the error message; | ||
| 1044 | if ERRORNAME is nil, just return nil. | ||
| 1045 | Bind this in case the user sets it to nil." | ||
| 1046 | (let ((case-fold-search t)) | 1046 | (let ((case-fold-search t)) |
| 1047 | (save-excursion | 1047 | (save-excursion |
| 1048 | (goto-char (point-min)) | 1048 | (goto-char (point-min)) |
| @@ -1055,10 +1055,10 @@ If FORK is a string, it is the name to use for the new buffer." | |||
| 1055 | nil | 1055 | nil |
| 1056 | (error "Node has no %s" (capitalize (or errorname name)))))))) | 1056 | (error "Node has no %s" (capitalize (or errorname name)))))))) |
| 1057 | 1057 | ||
| 1058 | ;; Return the node name in the buffer following point. | ||
| 1059 | ;; ALLOWEDCHARS, if non-nil, goes within [...] to make a regexp | ||
| 1060 | ;; saying which chars may appear in the node name. | ||
| 1061 | (defun Info-following-node-name (&optional allowedchars) | 1058 | (defun Info-following-node-name (&optional allowedchars) |
| 1059 | "Return the node name in the buffer following point. | ||
| 1060 | ALLOWEDCHARS, if non-nil, goes within [...] to make a regexp | ||
| 1061 | saying which chars may appear in the node name." | ||
| 1062 | (skip-chars-forward " \t") | 1062 | (skip-chars-forward " \t") |
| 1063 | (buffer-substring-no-properties | 1063 | (buffer-substring-no-properties |
| 1064 | (point) | 1064 | (point) |
| @@ -1112,8 +1112,8 @@ If SAME-FILE is non-nil, do not move to a different Info file." | |||
| 1112 | (Info-find-node "dir" "top")) | 1112 | (Info-find-node "dir" "top")) |
| 1113 | 1113 | ||
| 1114 | (defun Info-follow-reference (footnotename) | 1114 | (defun Info-follow-reference (footnotename) |
| 1115 | "Follow cross reference named NAME to the node it refers to. | 1115 | "Follow cross reference named FOOTNOTENAME to the node it refers to. |
| 1116 | NAME may be an abbreviation of the reference name." | 1116 | FOOTNOTENAME may be an abbreviation of the reference name." |
| 1117 | (interactive | 1117 | (interactive |
| 1118 | (let ((completion-ignore-case t) | 1118 | (let ((completion-ignore-case t) |
| 1119 | (case-fold-search t) | 1119 | (case-fold-search t) |
| @@ -1435,7 +1435,7 @@ N is the digit argument used to invoke this command." | |||
| 1435 | 1435 | ||
| 1436 | (defun Info-next-menu-item () | 1436 | (defun Info-next-menu-item () |
| 1437 | (interactive) | 1437 | (interactive) |
| 1438 | ;; Bind this in case the user sets it to nil. | 1438 | ;; Bind this in case the user sets it to nil. |
| 1439 | (let* ((case-fold-search t) | 1439 | (let* ((case-fold-search t) |
| 1440 | (node | 1440 | (node |
| 1441 | (save-excursion | 1441 | (save-excursion |
| @@ -1450,7 +1450,7 @@ N is the digit argument used to invoke this command." | |||
| 1450 | (interactive) | 1450 | (interactive) |
| 1451 | (save-excursion | 1451 | (save-excursion |
| 1452 | (forward-line 1) | 1452 | (forward-line 1) |
| 1453 | ;; Bind this in case the user sets it to nil. | 1453 | ;; Bind this in case the user sets it to nil. |
| 1454 | (let* ((case-fold-search t) | 1454 | (let* ((case-fold-search t) |
| 1455 | (beg (save-excursion | 1455 | (beg (save-excursion |
| 1456 | (and (search-backward "\n* menu:" nil t) | 1456 | (and (search-backward "\n* menu:" nil t) |
| @@ -1599,7 +1599,7 @@ previous node or back up to the parent node." | |||
| 1599 | (Info-prev-reference t))))) | 1599 | (Info-prev-reference t))))) |
| 1600 | 1600 | ||
| 1601 | (defun Info-index (topic) | 1601 | (defun Info-index (topic) |
| 1602 | "Look up a string in the index for this file. | 1602 | "Look up a string TOPIC in the index for this file. |
| 1603 | The index is defined as the first node in the top-level menu whose | 1603 | The index is defined as the first node in the top-level menu whose |
| 1604 | name contains the word \"Index\", plus any immediately following | 1604 | name contains the word \"Index\", plus any immediately following |
| 1605 | nodes whose names also contain the word \"Index\". | 1605 | nodes whose names also contain the word \"Index\". |
| @@ -1732,15 +1732,15 @@ Give a blank topic name to go to the Index node itself." | |||
| 1732 | (bury-buffer "*Help*"))) | 1732 | (bury-buffer "*Help*"))) |
| 1733 | 1733 | ||
| 1734 | (defun Info-get-token (pos start all &optional errorstring) | 1734 | (defun Info-get-token (pos start all &optional errorstring) |
| 1735 | "Return the token around POS, | 1735 | "Return the token around POS. |
| 1736 | POS must be somewhere inside the token | 1736 | POS must be somewhere inside the token |
| 1737 | START is a regular expression which will match the | 1737 | START is a regular expression which will match the |
| 1738 | beginning of the tokens delimited string | 1738 | beginning of the tokens delimited string |
| 1739 | ALL is a regular expression with a single | 1739 | ALL is a regular expression with a single |
| 1740 | parenthesized subpattern which is the token to be | 1740 | parenthesized subpattern which is the token to be |
| 1741 | returned. E.g. '{\(.*\)}' would return any string | 1741 | returned. E.g. '{\(.*\)}' would return any string |
| 1742 | enclosed in braces around POS. | 1742 | enclosed in braces around POS. |
| 1743 | SIG optional fourth argument, controls action on no match | 1743 | ERRORSTRING optional fourth argument, controls action on no match |
| 1744 | nil: return nil | 1744 | nil: return nil |
| 1745 | t: beep | 1745 | t: beep |
| 1746 | a string: signal an error, using that string." | 1746 | a string: signal an error, using that string." |
| @@ -1869,7 +1869,7 @@ If no reference to follow, moves to the next node, or up if none." | |||
| 1869 | ) | 1869 | ) |
| 1870 | 1870 | ||
| 1871 | (defun Info-check-pointer (item) | 1871 | (defun Info-check-pointer (item) |
| 1872 | ;; Non-nil if ITEM is present in this node. | 1872 | "Non-nil if ITEM is present in this node." |
| 1873 | (condition-case nil | 1873 | (condition-case nil |
| 1874 | (Info-extract-pointer item) | 1874 | (Info-extract-pointer item) |
| 1875 | (error nil))) | 1875 | (error nil))) |
| @@ -1911,7 +1911,7 @@ If no reference to follow, moves to the next node, or up if none." | |||
| 1911 | ;; Value is a list, (FILE-NAME NODE-NAME). | 1911 | ;; Value is a list, (FILE-NAME NODE-NAME). |
| 1912 | 1912 | ||
| 1913 | (defun Info-menu-update () | 1913 | (defun Info-menu-update () |
| 1914 | ;; Update the Info menu for the current node. | 1914 | "Update the Info menu for the current node." |
| 1915 | (condition-case nil | 1915 | (condition-case nil |
| 1916 | (if (or (not (eq major-mode 'Info-mode)) | 1916 | (if (or (not (eq major-mode 'Info-mode)) |
| 1917 | (equal (list Info-current-file Info-current-node) | 1917 | (equal (list Info-current-file Info-current-node) |
| @@ -1980,12 +1980,12 @@ If no reference to follow, moves to the next node, or up if none." | |||
| 1980 | (put 'info-mode 'mode-class 'special) | 1980 | (put 'info-mode 'mode-class 'special) |
| 1981 | 1981 | ||
| 1982 | (defun Info-mode () | 1982 | (defun Info-mode () |
| 1983 | "\\<Info-mode-map> | 1983 | "Info mode provides commands for browsing through the Info documentation tree. |
| 1984 | Info mode provides commands for browsing through the Info documentation tree. | ||
| 1985 | Documentation in Info is divided into \"nodes\", each of which discusses | 1984 | Documentation in Info is divided into \"nodes\", each of which discusses |
| 1986 | one topic and contains references to other nodes which discuss related | 1985 | one topic and contains references to other nodes which discuss related |
| 1987 | topics. Info has commands to follow the references and show you other nodes. | 1986 | topics. Info has commands to follow the references and show you other nodes. |
| 1988 | 1987 | ||
| 1988 | \\<Info-mode-map>\ | ||
| 1989 | \\[Info-help] Invoke the Info tutorial. | 1989 | \\[Info-help] Invoke the Info tutorial. |
| 1990 | \\[Info-exit] Quit Info: reselect previously selected buffer. | 1990 | \\[Info-exit] Quit Info: reselect previously selected buffer. |
| 1991 | 1991 | ||
| @@ -2133,7 +2133,7 @@ If the element is just a file name, the file name also serves as the prefix.") | |||
| 2133 | The `info-file' property of COMMAND says which Info manual to search. | 2133 | The `info-file' property of COMMAND says which Info manual to search. |
| 2134 | If COMMAND has no property, the variable `Info-file-list-for-emacs' | 2134 | If COMMAND has no property, the variable `Info-file-list-for-emacs' |
| 2135 | defines heuristics for which Info manual to try. | 2135 | defines heuristics for which Info manual to try. |
| 2136 | The locations are of the format used in Info-history, i.e. | 2136 | The locations are of the format used in `Info-history', i.e. |
| 2137 | \(FILENAME NODENAME BUFFERPOS\)." | 2137 | \(FILENAME NODENAME BUFFERPOS\)." |
| 2138 | (let ((where '()) | 2138 | (let ((where '()) |
| 2139 | (cmd-desc (concat "^\\* +" (regexp-quote (symbol-name command)) | 2139 | (cmd-desc (concat "^\\* +" (regexp-quote (symbol-name command)) |
| @@ -2209,7 +2209,7 @@ the variable `Info-file-list-for-emacs'." | |||
| 2209 | ;;;###autoload | 2209 | ;;;###autoload |
| 2210 | (defun Info-goto-emacs-key-command-node (key) | 2210 | (defun Info-goto-emacs-key-command-node (key) |
| 2211 | "Go to the Info node in the Emacs manual the command bound to KEY, a string. | 2211 | "Go to the Info node in the Emacs manual the command bound to KEY, a string. |
| 2212 | Interactively, if the binding is execute-extended-command, a command is read. | 2212 | Interactively, if the binding is `execute-extended-command', a command is read. |
| 2213 | The command is found by looking up in Emacs manual's Command Index | 2213 | The command is found by looking up in Emacs manual's Command Index |
| 2214 | or in another manual found via COMMAND's `info-file' property or | 2214 | or in another manual found via COMMAND's `info-file' property or |
| 2215 | the variable `Info-file-list-for-emacs'." | 2215 | the variable `Info-file-list-for-emacs'." |