[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/info.el
From: |
Thien-Thi Nguyen |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/info.el |
Date: |
Fri, 24 Jan 2003 21:44:07 -0500 |
Index: emacs/lisp/info.el
diff -c emacs/lisp/info.el:1.332 emacs/lisp/info.el:1.333
*** emacs/lisp/info.el:1.332 Fri Jan 24 19:52:19 2003
--- emacs/lisp/info.el Fri Jan 24 21:44:07 2003
***************
*** 31,36 ****
--- 31,38 ----
;; - a menu item MAY contain colons but not colon-space ": "
;; - a menu item ending with ": " (but not ":: ") is an index entry
;; - a node name MAY NOT contain a colon
+ ;; This distinction is to support indexing of computer programming
+ ;; language terms that may contain ":" but not ": ".
;;; Code:
***************
*** 1482,1489 ****
(skip-chars-forward " \t\n")
(let ((beg (point))
str i)
! (skip-chars-forward "^:")
! (forward-char 1)
(setq str
(if (looking-at ":")
(buffer-substring-no-properties beg (1- (point)))
--- 1484,1492 ----
(skip-chars-forward " \t\n")
(let ((beg (point))
str i)
! (while (not (looking-at ":*[ \n]"))
! (skip-chars-forward "^:")
! (forward-char 1))
(setq str
(if (looking-at ":")
(buffer-substring-no-properties beg (1- (point)))
***************
*** 1522,1528 ****
(concat "\n\\* +" (regexp-quote string) ":") nil t)
(let ((pattern (concat "\n\\* +\\("
(regexp-quote string)
! "[^:\t\n]*\\):"))
completions)
;; Check the cache.
(if (and (equal (nth 0 Info-complete-cache) Info-current-file)
--- 1525,1531 ----
(concat "\n\\* +" (regexp-quote string) ":") nil t)
(let ((pattern (concat "\n\\* +\\("
(regexp-quote string)
! "[^\t\n]*\\):"))
completions)
;; Check the cache.
(if (and (equal (nth 0 Info-complete-cache) Info-current-file)
***************
*** 1580,1586 ****
(save-excursion
(goto-char p)
(end-of-line)
! (if (re-search-backward "\n\\* +\\([^:\t\n]*\\):" beg t)
(setq default (match-string-no-properties 1))))))
(let ((item nil))
(while (null item)
--- 1583,1589 ----
(save-excursion
(goto-char p)
(end-of-line)
! (if (re-search-backward "\n\\* +\\([^\t\n]*\\):" beg t)
(setq default (match-string-no-properties 1))))))
(let ((item nil))
(while (null item)
***************
*** 2123,2141 ****
((setq node (Info-get-token (point) "\\*note[ \n]"
"\\*note[ \n]\\([^:]*\\):"))
(Info-follow-reference node))
! ;; explicit node name
((setq node (Info-get-token (point) "\\* +" "\\* +\\([^:]*\\)::"))
(Info-goto-node node))
! ;; index entry (Another approach is to combine this w/ the following cond
! ;; branch "other menu item", but that also requires fixing
! ;; Info-extract-menu-node-name -- stay tuned. --ttn)
! ((Info-get-token (point) "\\* +" "\\* +\\(.*\\):[ \t]")
! (save-excursion
! (re-search-forward ":[ \t]")
! (setq node (Info-following-node-name "^.")))
! (Info-goto-node node))
! ;; other menu item
! ((Info-get-token (point) "\\* +" "\\* +\\([^:]*\\):")
(beginning-of-line)
(forward-char 2)
(setq node (Info-extract-menu-node-name))
--- 2126,2136 ----
((setq node (Info-get-token (point) "\\*note[ \n]"
"\\*note[ \n]\\([^:]*\\):"))
(Info-follow-reference node))
! ;; menu item: node name
((setq node (Info-get-token (point) "\\* +" "\\* +\\([^:]*\\)::"))
(Info-goto-node node))
! ;; menu item: index entry
! ((Info-get-token (point) "\\* +" "\\* +\\(.*\\): ")
(beginning-of-line)
(forward-char 2)
(setq node (Info-extract-menu-node-name))
***************
*** 2705,2711 ****
(defun Info-fontify-node ()
;; Only fontify the node if it hasn't already been done.
! (unless (next-property-change (point-min))
(save-excursion
(let ((inhibit-read-only t)
(case-fold-search t)
--- 2700,2707 ----
(defun Info-fontify-node ()
;; Only fontify the node if it hasn't already been done.
! (unless (let ((where (next-property-change (point-min))))
! (and where (not (= where (point-max)))))
(save-excursion
(let ((inhibit-read-only t)
(case-fold-search t)