* Info-find-index-name vs makeinfo <1>
@ 2003-09-21 1:12 Kevin Ryde
0 siblings, 0 replies; only message in thread
From: Kevin Ryde @ 2003-09-21 1:12 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 983 bytes --]
[This is a repost, didn't seem to make it through the mailing list the
first time last week. Apologies for any duplication.]
* info.el (Info-find-index-name): Search also without the " <1>" etc
which makeinfo appends to duplicate index entries.
In the elisp manual "i newline" brings up the "Character Type" with
point correctly positioned on the mention of newline, but using ","
for the next match brings up "Commands for Insertion" with point
positioned at the top of the node, not on the "newline" function.
The reason for the latter is I think that Info-find-index-name
attempts to find "newline <1>", which fails, not surprisingly.
The same sort of thing arises in the Guile manual, where "map" and a
few other functions appear twice (the srfi-1 module extends some r5rs
or guile core functions).
It'd be nice if the " <1>" bit could be ignored when searching. The
change below repeats the search without <n> if it couldn't be found
first time through.
[-- Attachment #2: info.el.makeinfo-index.diff --]
[-- Type: text/plain, Size: 849 bytes --]
*** info.el.~1.370.~ Thu Jan 1 10:00:01 1970
--- info.el Sat Sep 6 08:27:56 2003
*************** (defun Info-find-index-name (name)
*** 2112,2119 ****
(search-forward
(format "`%s'" (substring name 0 (match-beginning 1)))
nil t))
! (search-forward name nil t))
! (beginning-of-line)
(goto-char (point-min)))))
(defun Info-undefined ()
--- 2112,2122 ----
(search-forward
(format "`%s'" (substring name 0 (match-beginning 1)))
nil t))
! (search-forward name nil t)
! ;; Try again without the " <1>" makeinfo can append
! (and (string-match "\\`\\(.*\\) <[0-9]+>\\'" name)
! (Info-find-index-name (match-string 1 name))))
! (progn (beginning-of-line) t) ;; non-nil for recursive call
(goto-char (point-min)))))
(defun Info-undefined ()
[-- Attachment #3: Type: text/plain, Size: 141 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-09-21 1:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-21 1:12 Info-find-index-name vs makeinfo <1> Kevin Ryde
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.