* Case of Info navigation keywords
@ 2005-10-28 22:04 Juri Linkov
2005-10-29 5:13 ` Richard M. Stallman
0 siblings, 1 reply; 2+ messages in thread
From: Juri Linkov @ 2005-10-28 22:04 UTC (permalink / raw)
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/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Case of Info navigation keywords
2005-10-28 22:04 Case of Info navigation keywords Juri Linkov
@ 2005-10-29 5:13 ` Richard M. Stallman
0 siblings, 0 replies; 2+ messages in thread
From: Richard M. Stallman @ 2005-10-29 5:13 UTC (permalink / raw)
Cc: emacs-devel
This bug should be fixed, but string-match could be many times slower
than string-equal. It might be much faster to call downcase and pass
the result to string-equal. Would you please try both and see?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-10-29 5:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-28 22:04 Case of Info navigation keywords Juri Linkov
2005-10-29 5:13 ` Richard M. Stallman
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.