Ar an naoú lá déag de mí Eanair, scríobh Steve Carney:
I installed XEmacs 21.4 (patch 22) on Windows XP and ran into a
regexp-opt problem when loading jde-imenu. jde-imenu has:
(defconst jde-imenu-valid-modifiers-regexp
(concat "\\b"
(regexp-opt
(mapcar #'car jde-imenu-default-modifier-abbrev-alist) t)
"\\b")
"Regexp of valid Java modifiers used by
`jde-imenu-modifier-field-validate'.")
jde-imenu fails to load due to a bug in regexp-opt.
In the above defconst, the mapcar form evaluates to:
("public" "protected" "private" "static"
"transient" "volatile"
"abstract" "final" "native" "synchronized"
"strictfp")
and the above regexp-opt form produces error (with backtrace):
What version of the xemacs-base package are you using? I can’t reproduce the
error, and the code relevant to your backtrace below looks like the
following in the current regexp-opt.el, which won’t ever result in concat
being called with a list comprising a string as its argument:
(let* ((sgnirts (mapcar (lambda (s)
;; XEmacs; our #'try-completion requires
;; an alist.
(list
(concat (nreverse (string-to-list s)))))
strings))
(xiffus (try-completion "" sgnirts)))
Debugger entered--Lisp error: (wrong-type-argument characterp
"abstract")
concat(("abstract"))
(list (concat (nreverse ...)))
(lambda (s) (list (concat ...)))("abstract")
mapcar((lambda (s) (list (concat ...))) ("abstract" "final"
"native" "private" "protected" "public"
"static" "strictfp" "synchronized" "transient"
"volatile"))
(let* ((sgnirts ...) (xiffus ...)) (if (> ... 0) (let* ... ...) (let* ... ...)))
(if (> (length prefix) 0) (let* (... ...) (concat open-group ... ... close-group))
(let* (... ...) (if ... ... ...)))
(let ((prefix ...)) (if (> ... 0) (let* ... ...) (let* ... ...)))
(cond ((= ... 0) "") ((= ... 1) (if ... ... ...)) ((= ... 0) (concat
open-charset ... "?" close-charset)) ((and ... ...) (let ... ... ...)) (t (let
... ...)))
(let* ((open-group ...) (close-group ...) (open-charset ...) (close-charset ...)) (cond
(... "") (... ...) (... ...) (... ...) (t ...)))
regexp-opt-group(("abstract" "final" "native"
"private" "protected" "public" "static"
"strictfp" "synchronized" "transient" "volatile")
"\\(")
(let* ((max-lisp-eval-depth ...) (max-specpdl-size ...) (completion-ignore-case nil)
(completion-regexp-list nil) (words ...) (open ...) (sorted-strings ...) (re ...)) (if
words (concat "\\<" re "\\>") re))
(progn (let* (... ... ... ... ... ... ... ...) (if words ... re)))
(unwind-protect (progn (let* ... ...)) (store-match-data match-data))
(let ((match-data ...)) (unwind-protect (progn ...) (store-match-data match-data)))
(save-match-data (let* (... ... ... ... ... ... ... ...) (if words ... re)))
regexp-opt(("public" "protected" "private"
"static" "transient" "volatile" "abstract"
"final" "native" "synchronized" "strictfp") t)
eval((regexp-opt (mapcar (function car) jde-imenu-default-modifier-abbrev-alist) t))
eval-interactive((regexp-opt (mapcar (function car)
jde-imenu-default-modifier-abbrev-alist) t))
eval-last-sexp((4))
call-interactively(eval-last-sexp)
Replacing regexp-opt.el with the file from XEmacs 21.4.21 fixes the problem.
--
“Apart from the nine-banded armadillo, man is the only natural host of
Mycobacterium leprae, although it can be grown in the footpads of mice.”
-- Kumar & Clark, Clinical Medicine, summarising improbable leprosy research
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta