diff options
| author | Stefan Monnier | 2000-09-27 21:55:54 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2000-09-27 21:55:54 +0000 |
| commit | 983dfbf8ceb121b0c8303e12c61acda548c7a369 (patch) | |
| tree | c790c6fd64f51d94f0ef2bfa16d3dd27b64cc7fc | |
| parent | 6f22f1adf9d22c0abecbc7aebbb6b9adcfe3ef58 (diff) | |
| download | emacs-983dfbf8ceb121b0c8303e12c61acda548c7a369.tar.gz emacs-983dfbf8ceb121b0c8303e12c61acda548c7a369.zip | |
(Info-extract-pointer):
Widen more carefully, to avoid finding pointers in other nodes.
(Info-index): Use push.
| -rw-r--r-- | lisp/info.el | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/lisp/info.el b/lisp/info.el index 841e699cf34..661087236ab 100644 --- a/lisp/info.el +++ b/lisp/info.el | |||
| @@ -371,7 +371,7 @@ In standalone mode, \\<Info-mode-map>\\[Info-exit] exits Emacs itself." | |||
| 371 | (save-buffers-kill-emacs))) | 371 | (save-buffers-kill-emacs))) |
| 372 | (info))) | 372 | (info))) |
| 373 | 373 | ||
| 374 | ;; See if the the accessible portion of the buffer begins with a node | 374 | ;; See if the accessible portion of the buffer begins with a node |
| 375 | ;; delimiter, and the node header line which follows matches REGEXP. | 375 | ;; delimiter, and the node header line which follows matches REGEXP. |
| 376 | ;; Typically, this test will be followed by a loop that examines the | 376 | ;; Typically, this test will be followed by a loop that examines the |
| 377 | ;; rest of the buffer with (search-forward "\n\^_"), and it's a pity | 377 | ;; rest of the buffer with (search-forward "\n\^_"), and it's a pity |
| @@ -381,7 +381,7 @@ In standalone mode, \\<Info-mode-map>\\[Info-exit] exits Emacs itself." | |||
| 381 | ;; want to use the results of re-search-backward. | 381 | ;; want to use the results of re-search-backward. |
| 382 | 382 | ||
| 383 | ;; The return value is the value of point at the beginning of matching | 383 | ;; The return value is the value of point at the beginning of matching |
| 384 | ;; REGERXP, if the function succeeds, nil otherwise. | 384 | ;; REGEXP, if the function succeeds, nil otherwise. |
| 385 | (defun Info-node-at-bob-matching (regexp) | 385 | (defun Info-node-at-bob-matching (regexp) |
| 386 | (and (bobp) ; are we at beginning of buffer? | 386 | (and (bobp) ; are we at beginning of buffer? |
| 387 | (looking-at "\^_") ; does it begin with node delimiter? | 387 | (looking-at "\^_") ; does it begin with node delimiter? |
| @@ -1144,8 +1144,10 @@ Bind this in case the user sets it to nil." | |||
| 1144 | (goto-char (point-min)) | 1144 | (goto-char (point-min)) |
| 1145 | (when Info-header-line | 1145 | (when Info-header-line |
| 1146 | ;; expose the header line in the buffer | 1146 | ;; expose the header line in the buffer |
| 1147 | (widen) | 1147 | (let ((end (point-max))) |
| 1148 | (forward-line -1)) | 1148 | (widen) |
| 1149 | (forward-line -1) | ||
| 1150 | (narrow-to-region (point) end))) | ||
| 1149 | (let ((bound (point))) | 1151 | (let ((bound (point))) |
| 1150 | (forward-line 1) | 1152 | (forward-line 1) |
| 1151 | (cond ((re-search-backward (concat name ":") nil bound) | 1153 | (cond ((re-search-backward (concat name ":") nil bound) |
| @@ -1736,13 +1738,12 @@ Give a blank topic name to go to the Index node itself." | |||
| 1736 | (progn | 1738 | (progn |
| 1737 | (goto-char (point-min)) | 1739 | (goto-char (point-min)) |
| 1738 | (while (re-search-forward pattern nil t) | 1740 | (while (re-search-forward pattern nil t) |
| 1739 | (setq matches | 1741 | (push (list (match-string-no-properties 1) |
| 1740 | (cons (list (match-string-no-properties 1) | 1742 | (match-string-no-properties 2) |
| 1741 | (match-string-no-properties 2) | 1743 | Info-current-node |
| 1742 | Info-current-node | 1744 | (string-to-int (concat "0" |
| 1743 | (string-to-int (concat "0" | 1745 | (match-string 3)))) |
| 1744 | (match-string 3)))) | 1746 | matches)) |
| 1745 | matches))) | ||
| 1746 | (and (setq node (Info-extract-pointer "next" t)) | 1747 | (and (setq node (Info-extract-pointer "next" t)) |
| 1747 | (string-match "\\<Index\\>" node))) | 1748 | (string-match "\\<Index\\>" node))) |
| 1748 | (Info-goto-node node)) | 1749 | (Info-goto-node node)) |