aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog14
-rw-r--r--lisp/info.el28
2 files changed, 26 insertions, 16 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1ec44c7ccd6..aa36759dcb4 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,19 @@
12003-01-24 Thien-Thi Nguyen <ttn@gnu.org> 12003-01-24 Thien-Thi Nguyen <ttn@gnu.org>
2 2
3 * info.el (Info-extract-menu-node-name): When looking for end of menu
4 item, don't stop at first ":"; instead, continue until trailing
5 context is either a space or newline.
6 (Info-complete-menu-item): Change var `pattern' to allow ":" in menu
7 item.
8 (Info-menu): Likewise, for regexp used in backwards search.
9 (Info-try-follow-nearest-node): Remove case added in previous edit.
10 Instead, change the regexp in the following case to allow ":" in menu
11 item.
12 (Info-fontify-node): Fix bug: Handle `next-property-change' returning
13 point-max as "hasn't already been done".
14
152003-01-24 Thien-Thi Nguyen <ttn@gnu.org>
16
3 * info.el (Info-try-follow-nearest-node): Add case: Handle menu item 17 * info.el (Info-try-follow-nearest-node): Add case: Handle menu item
4 terminated by ": " as an index entry. 18 terminated by ": " as an index entry.
5 19
diff --git a/lisp/info.el b/lisp/info.el
index d62a3fbe8c4..f25c5b2d0b5 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -31,6 +31,8 @@
31;; - a menu item MAY contain colons but not colon-space ": " 31;; - a menu item MAY contain colons but not colon-space ": "
32;; - a menu item ending with ": " (but not ":: ") is an index entry 32;; - a menu item ending with ": " (but not ":: ") is an index entry
33;; - a node name MAY NOT contain a colon 33;; - a node name MAY NOT contain a colon
34;; This distinction is to support indexing of computer programming
35;; language terms that may contain ":" but not ": ".
34 36
35;;; Code: 37;;; Code:
36 38
@@ -1482,8 +1484,9 @@ FOOTNOTENAME may be an abbreviation of the reference name."
1482 (skip-chars-forward " \t\n") 1484 (skip-chars-forward " \t\n")
1483 (let ((beg (point)) 1485 (let ((beg (point))
1484 str i) 1486 str i)
1485 (skip-chars-forward "^:") 1487 (while (not (looking-at ":*[ \n]"))
1486 (forward-char 1) 1488 (skip-chars-forward "^:")
1489 (forward-char 1))
1487 (setq str 1490 (setq str
1488 (if (looking-at ":") 1491 (if (looking-at ":")
1489 (buffer-substring-no-properties beg (1- (point))) 1492 (buffer-substring-no-properties beg (1- (point)))
@@ -1522,7 +1525,7 @@ FOOTNOTENAME may be an abbreviation of the reference name."
1522 (concat "\n\\* +" (regexp-quote string) ":") nil t) 1525 (concat "\n\\* +" (regexp-quote string) ":") nil t)
1523 (let ((pattern (concat "\n\\* +\\(" 1526 (let ((pattern (concat "\n\\* +\\("
1524 (regexp-quote string) 1527 (regexp-quote string)
1525 "[^:\t\n]*\\):")) 1528 "[^\t\n]*\\):"))
1526 completions) 1529 completions)
1527 ;; Check the cache. 1530 ;; Check the cache.
1528 (if (and (equal (nth 0 Info-complete-cache) Info-current-file) 1531 (if (and (equal (nth 0 Info-complete-cache) Info-current-file)
@@ -1580,7 +1583,7 @@ new buffer."
1580 (save-excursion 1583 (save-excursion
1581 (goto-char p) 1584 (goto-char p)
1582 (end-of-line) 1585 (end-of-line)
1583 (if (re-search-backward "\n\\* +\\([^:\t\n]*\\):" beg t) 1586 (if (re-search-backward "\n\\* +\\([^\t\n]*\\):" beg t)
1584 (setq default (match-string-no-properties 1)))))) 1587 (setq default (match-string-no-properties 1))))))
1585 (let ((item nil)) 1588 (let ((item nil))
1586 (while (null item) 1589 (while (null item)
@@ -2123,19 +2126,11 @@ If no reference to follow, moves to the next node, or up if none."
2123 ((setq node (Info-get-token (point) "\\*note[ \n]" 2126 ((setq node (Info-get-token (point) "\\*note[ \n]"
2124 "\\*note[ \n]\\([^:]*\\):")) 2127 "\\*note[ \n]\\([^:]*\\):"))
2125 (Info-follow-reference node)) 2128 (Info-follow-reference node))
2126 ;; explicit node name 2129 ;; menu item: node name
2127 ((setq node (Info-get-token (point) "\\* +" "\\* +\\([^:]*\\)::")) 2130 ((setq node (Info-get-token (point) "\\* +" "\\* +\\([^:]*\\)::"))
2128 (Info-goto-node node)) 2131 (Info-goto-node node))
2129 ;; index entry (Another approach is to combine this w/ the following cond 2132 ;; menu item: index entry
2130 ;; branch "other menu item", but that also requires fixing 2133 ((Info-get-token (point) "\\* +" "\\* +\\(.*\\): ")
2131 ;; Info-extract-menu-node-name -- stay tuned. --ttn)
2132 ((Info-get-token (point) "\\* +" "\\* +\\(.*\\):[ \t]")
2133 (save-excursion
2134 (re-search-forward ":[ \t]")
2135 (setq node (Info-following-node-name "^.")))
2136 (Info-goto-node node))
2137 ;; other menu item
2138 ((Info-get-token (point) "\\* +" "\\* +\\([^:]*\\):")
2139 (beginning-of-line) 2134 (beginning-of-line)
2140 (forward-char 2) 2135 (forward-char 2)
2141 (setq node (Info-extract-menu-node-name)) 2136 (setq node (Info-extract-menu-node-name))
@@ -2705,7 +2700,8 @@ the variable `Info-file-list-for-emacs'."
2705 2700
2706(defun Info-fontify-node () 2701(defun Info-fontify-node ()
2707 ;; Only fontify the node if it hasn't already been done. 2702 ;; Only fontify the node if it hasn't already been done.
2708 (unless (next-property-change (point-min)) 2703 (unless (let ((where (next-property-change (point-min))))
2704 (and where (not (= where (point-max)))))
2709 (save-excursion 2705 (save-excursion
2710 (let ((inhibit-read-only t) 2706 (let ((inhibit-read-only t)
2711 (case-fold-search t) 2707 (case-fold-search t)