comparison lisp/info.el @ 66604:8c3381fde2cc

(Info-fontify-node): Downcase node header keywords Node, Prev, Next, Up before comparison. (Info-history): Insert absolute directory name, and put invisible property on it.
author Juri Linkov <juri@jurta.org>
date Tue, 01 Nov 2005 09:55:09 +0000
parents f1d7e489a526
children a39846866a71
comparison
equal deleted inserted replaced
66603:d087393d31cc 66604:8c3381fde2cc
1959 (let ((file (nth 0 (car hl))) 1959 (let ((file (nth 0 (car hl)))
1960 (node (nth 1 (car hl)))) 1960 (node (nth 1 (car hl))))
1961 (if (and (string-equal file curr-file) 1961 (if (and (string-equal file curr-file)
1962 (string-equal node curr-node)) 1962 (string-equal node curr-node))
1963 (setq p (point))) 1963 (setq p (point)))
1964 (insert "* " node ": (" (file-name-nondirectory file) 1964 (insert "* " node ": ("
1965 (propertize (or (file-name-directory file) "") 'invisible t)
1966 (file-name-nondirectory file)
1965 ")" node ".\n")) 1967 ")" node ".\n"))
1966 (setq hl (cdr hl)))))) 1968 (setq hl (cdr hl))))))
1967 (Info-find-node "history" "Top") 1969 (Info-find-node "history" "Top")
1968 (goto-char (or p (point-min))))) 1970 (goto-char (or p (point-min)))))
1969 1971
3660 (goto-char (match-end 0)) 3662 (goto-char (match-end 0))
3661 (let* ((nbeg (match-beginning 2)) 3663 (let* ((nbeg (match-beginning 2))
3662 (nend (match-end 2)) 3664 (nend (match-end 2))
3663 (tbeg (match-beginning 1)) 3665 (tbeg (match-beginning 1))
3664 (tag (match-string 1))) 3666 (tag (match-string 1)))
3665 (if (string-equal tag "Node") 3667 (if (string-equal (downcase tag) "node")
3666 (put-text-property nbeg nend 'font-lock-face 'info-header-node) 3668 (put-text-property nbeg nend 'font-lock-face 'info-header-node)
3667 (put-text-property nbeg nend 'font-lock-face 'info-header-xref) 3669 (put-text-property nbeg nend 'font-lock-face 'info-header-xref)
3668 (put-text-property tbeg nend 'mouse-face 'highlight) 3670 (put-text-property tbeg nend 'mouse-face 'highlight)
3669 (put-text-property tbeg nend 3671 (put-text-property tbeg nend
3670 'help-echo 3672 'help-echo
3671 (concat "mouse-2: Go to node " 3673 (concat "mouse-2: Go to node "
3672 (buffer-substring nbeg nend))) 3674 (buffer-substring nbeg nend)))
3673 ;; Always set up the text property keymap. 3675 ;; Always set up the text property keymap.
3674 ;; It will either be used in the buffer 3676 ;; It will either be used in the buffer
3675 ;; or copied in the header line. 3677 ;; or copied in the header line.
3676 (put-text-property tbeg nend 'keymap 3678 (put-text-property
3677 (cond 3679 tbeg nend 'keymap
3678 ((equal tag "Prev") Info-prev-link-keymap) 3680 (cond
3679 ((equal tag "Next") Info-next-link-keymap) 3681 ((string-equal (downcase tag) "prev") Info-prev-link-keymap)
3680 ((equal tag "Up") Info-up-link-keymap)))))) 3682 ((string-equal (downcase tag) "next") Info-next-link-keymap)
3683 ((string-equal (downcase tag) "up" ) Info-up-link-keymap))))))
3681 (when Info-use-header-line 3684 (when Info-use-header-line
3682 (goto-char (point-min)) 3685 (goto-char (point-min))
3683 (let* ((header-end (line-end-position)) 3686 (let* ((header-end (line-end-position))
3684 (header 3687 (header
3685 ;; If we find neither Next: nor Prev: link, show the entire 3688 ;; If we find neither Next: nor Prev: link, show the entire