summaryrefslogtreecommitdiff
path: root/lisp/info.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2005-11-23 17:57:46 +0000
committerChong Yidong <cyd@stupidchicken.com>2005-11-23 17:57:46 +0000
commit98b37eab5d4dc8efb5be6d8ccce43785059ed82b (patch)
tree149772e8b5fb595756e0f9df54eaf6dcff644442 /lisp/info.el
parent9c03d4785841ccfddedbf59bd56c790f8c6c1e5a (diff)
downloademacs-98b37eab5d4dc8efb5be6d8ccce43785059ed82b.tar.gz
* info.el (Info-fontify-node): Handle the case where
Info-current-file is t.
Diffstat (limited to 'lisp/info.el')
-rw-r--r--lisp/info.el27
1 files changed, 19 insertions, 8 deletions
diff --git a/lisp/info.el b/lisp/info.el
index 84c83bd419b..48e933711cf 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -3805,7 +3805,10 @@ the variable `Info-file-list-for-emacs'."
(match-string 4))
(match-string 2)))))
(file (file-name-nondirectory
- Info-current-file))
+ (if Info-current-file
+ (if (stringp Info-current-file)
+ Info-current-file
+ (buffer-file-name)))))
(hl Info-history-list)
res)
(if (string-match "(\\([^)]+\\))\\([^)]*\\)" node)
@@ -3816,9 +3819,11 @@ the variable `Info-file-list-for-emacs'."
(match-string 2 node))))
(while hl
(if (and (string-equal node (nth 1 (car hl)))
- (string-equal file
- (file-name-nondirectory
- (nth 0 (car hl)))))
+ (or (and (eq t Info-current-file)
+ (eq t (nth 0 (car hl))))
+ (string-equal file
+ (file-name-nondirectory
+ (nth 0 (car hl))))))
(setq res (car hl) hl nil)
(setq hl (cdr hl))))
res))) 'info-xref-visited 'info-xref))
@@ -3913,7 +3918,11 @@ the variable `Info-file-list-for-emacs'."
(let ((node (if (equal (match-string 3) "")
(match-string 1)
(match-string 3)))
- (file (file-name-nondirectory Info-current-file))
+ (file (file-name-nondirectory
+ (if Info-current-file
+ (if (stringp Info-current-file)
+ Info-current-file
+ (buffer-file-name)))))
(hl Info-history-list)
res)
(if (string-match "(\\([^)]+\\))\\([^)]*\\)" node)
@@ -3924,9 +3933,11 @@ the variable `Info-file-list-for-emacs'."
(match-string 2 node))))
(while hl
(if (and (string-equal node (nth 1 (car hl)))
- (string-equal file
- (file-name-nondirectory
- (nth 0 (car hl)))))
+ (or (and (eq t Info-current-file)
+ (eq t (nth 0 (car hl))))
+ (string-equal file
+ (file-name-nondirectory
+ (nth 0 (car hl))))))
(setq res (car hl) hl nil)
(setq hl (cdr hl))))
res))) 'info-xref-visited 'info-xref)))