* imenu--generic-function broken for imenu-syntax-alist
@ 2002-08-20 20:06 Glenn Morris
2002-08-20 20:11 ` Stefan Monnier
0 siblings, 1 reply; 2+ messages in thread
From: Glenn Morris @ 2002-08-20 20:06 UTC (permalink / raw)
Cc: emacs-devel
imenu is currently (in the trunk) broken for modes that define a value of
imenu-syntax-alist. For example, Fortran mode, Scheme mode.
The problem seems to be caused by this change:
2001-11-19 Stefan Monnier <monnier@cs.yale.edu>
* imenu.el
[...]
(imenu--generic-function): Use dolist.
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/imenu.el,v
retrieving revision 1.86
retrieving revision 1.87
diff -c -r1.86 -r1.87
[...]
*** 797,810 ****
(table (copy-syntax-table (syntax-table)))
(slist imenu-syntax-alist))
;; Modify the syntax table used while matching regexps.
! (while slist
;; The character(s) to modify may be a single char or a string.
! (if (numberp (caar slist))
! (modify-syntax-entry (caar slist) (cdar slist) table)
! (mapc (lambda (c)
! (modify-syntax-entry c (cdar slist) table))
! (caar slist)))
! (setq slist (cdr slist)))
(goto-char (point-max))
(imenu-progress-message prev-pos 0 t)
(unwind-protect ; for syntax table
--- 775,786 ----
(table (copy-syntax-table (syntax-table)))
(slist imenu-syntax-alist))
;; Modify the syntax table used while matching regexps.
! (dolist (syn slist)
;; The character(s) to modify may be a single char or a string.
! (if (numberp (car syn))
! (modify-syntax-entry (car syn) (cdr syn) table)
! (dolist (c (car syn))
! (modify-syntax-entry c (cdr syn) table))))
(goto-char (point-max))
(imenu-progress-message prev-pos 0 t)
(unwind-protect ; for syntax table
(dolist (c (car syn)) breaks because (car syn) is a string, not a list.
Any objections to reverting to mapc for this bit?
2002-08-20 Glenn Morris <gmorris@ast.cam.ac.uk>
* imenu.el (imenu--generic-function): Use mapc.
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/imenu.el,v
retrieving revision 1.90
diff -c -r1.90 imenu.el
*** imenu.el 15 Aug 2002 00:11:15 -0000 1.90
--- imenu.el 20 Aug 2002 19:59:24 -0000
***************
*** 788,795 ****
;; The character(s) to modify may be a single char or a string.
(if (numberp (car syn))
(modify-syntax-entry (car syn) (cdr syn) table)
! (dolist (c (car syn))
! (modify-syntax-entry c (cdr syn) table))))
(goto-char (point-max))
(imenu-progress-message prev-pos 0 t)
(unwind-protect ; for syntax table
--- 788,796 ----
;; The character(s) to modify may be a single char or a string.
(if (numberp (car syn))
(modify-syntax-entry (car syn) (cdr syn) table)
! (mapc (lambda (c)
! (modify-syntax-entry c (cdr syn) table))
! (car syn))))
(goto-char (point-max))
(imenu-progress-message prev-pos 0 t)
(unwind-protect ; for syntax table
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: imenu--generic-function broken for imenu-syntax-alist
2002-08-20 20:06 imenu--generic-function broken for imenu-syntax-alist Glenn Morris
@ 2002-08-20 20:11 ` Stefan Monnier
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2002-08-20 20:11 UTC (permalink / raw)
Cc: monnier+gnu/emacs, emacs-devel
> (dolist (c (car syn)) breaks because (car syn) is a string, not a list.
>
> Any objections to reverting to mapc for this bit?
No objection and thanks for the heads up.
Sorry about my ignorance,
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-08-20 20:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-20 20:06 imenu--generic-function broken for imenu-syntax-alist Glenn Morris
2002-08-20 20:11 ` Stefan Monnier
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.