emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Case of Info navigation keywords


From: Juri Linkov
Subject: Case of Info navigation keywords
Date: Sat, 29 Oct 2005 01:04:47 +0300
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

The only place in info.el which is case-sensitive to the keywords
"Node", "Next", "Previous", and "Up" is `Info-fontify-node'.
This causes incorrect processing of the header line with lower-case
keywords.

Other places in info.el are all case-insensitive for these keywords,
so e.g. n/p keys properly respond to "next/previous" just as well as to
"Next/Previous".

I propose to fix `Info-fontify-node' to depend on the value of
`case-fold-search' by using `string-match' instead of `string-equal':

Index: lisp/info.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/info.el,v
retrieving revision 1.454
diff -c -w -b -r1.454 info.el
*** lisp/info.el        26 Oct 2005 16:38:36 -0000      1.454
--- lisp/info.el        28 Oct 2005 22:02:45 -0000
***************
*** 3649,3655 ****
                   (nend (match-end 2))
                   (tbeg (match-beginning 1))
                   (tag (match-string 1)))
!             (if (string-equal tag "Node")
                  (put-text-property nbeg nend 'font-lock-face 
'info-header-node)
                (put-text-property nbeg nend 'font-lock-face 'info-header-xref)
                (put-text-property tbeg nend 'mouse-face 'highlight)
--- 3667,3673 ----
                   (nend (match-end 2))
                   (tbeg (match-beginning 1))
                   (tag (match-string 1)))
!             (if (string-match "^Node$" tag)
                  (put-text-property nbeg nend 'font-lock-face 
'info-header-node)
                (put-text-property nbeg nend 'font-lock-face 'info-header-xref)
                (put-text-property tbeg nend 'mouse-face 'highlight)
***************
*** 3660,3670 ****
                ;; Always set up the text property keymap.
                ;; It will either be used in the buffer
                ;; or copied in the header line.
!               (put-text-property tbeg nend 'keymap
                                   (cond
!                                   ((equal tag "Prev") Info-prev-link-keymap)
!                                   ((equal tag "Next") Info-next-link-keymap)
!                                   ((equal tag "Up") Info-up-link-keymap))))))
          (when Info-use-header-line
            (goto-char (point-min))
            (let* ((header-end (line-end-position))
--- 3678,3689 ----
                ;; Always set up the text property keymap.
                ;; It will either be used in the buffer
                ;; or copied in the header line.
!               (put-text-property
!              tbeg nend 'keymap
               (cond
!               ((string-match "^Prev$" tag) Info-prev-link-keymap)
!               ((string-match "^Next$" tag) Info-next-link-keymap)
!               ((string-match "^Up$"   tag) Info-up-link-keymap))))))
          (when Info-use-header-line
            (goto-char (point-min))
            (let* ((header-end (line-end-position))

-- 
Juri Linkov
http://www.jurta.org/emacs/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]