# HG changeset patch # User Chong Yidong # Date 1132768666 0 # Node ID 881d360bc5d6ea812f9f8fb0f7b5e693c1383822 # Parent f6b9378607429f7cb175236811cdac7d8467282e * info.el (Info-fontify-node): Handle the case where Info-current-file is t. diff -r f6b937860742 -r 881d360bc5d6 lisp/ChangeLog --- a/lisp/ChangeLog Wed Nov 23 15:05:27 2005 +0000 +++ b/lisp/ChangeLog Wed Nov 23 17:57:46 2005 +0000 @@ -1,3 +1,8 @@ +2005-11-23 Chong Yidong + + * info.el (Info-fontify-node): Handle the case where + Info-current-file is t. + 2005-11-23 Stefan Monnier * simple.el (blink-matching-open): Fix off-by-one in last change. diff -r f6b937860742 -r 881d360bc5d6 lisp/info.el --- a/lisp/info.el Wed Nov 23 15:05:27 2005 +0000 +++ b/lisp/info.el Wed Nov 23 17:57:46 2005 +0000 @@ -3805,7 +3805,10 @@ (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 @@ (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 @@ (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 @@ (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)))