Docstring highlighting signals an error when the argument names of a
function contain funny characters.
Example:
M-x load-library RET macroexp RET
C-h f macroexp-accumulate RET
=> Invalid regexp: "Unmatched ( or \\("
To to protect from such errors i think the following two changes would
be good. The former uses regexp-quote to protect against errors. The
latter makes the arguments of macroexp-accumulate display a little
prettier, "(macroexp-accumulate (VAR LIST) BODY...)" instead of
"(macroexp-accumulate \(VAR\ LIST\) &rest BODY)".
2005-06-30 Johan Bockgård <[EMAIL PROTECTED]>
* emacs-lisp/macroexp.el (macroexp-accumulate): Doc fix.
* help-fns.el (help-do-arg-highlight): Regexp-quote argument
names.
--- help-fns.el 01 Jun 2005 15:13:52 +0200 1.68
+++ help-fns.el 16 Jun 2005 18:17:58 +0200
@@ -277,7 +277,7 @@
(concat "\\<" ; beginning of word
"\\(?:[a-z-]+-\\)?" ; for xxx-ARG
"\\("
- arg
+ (regexp-quote arg)
"\\)"
"\\(?:es\\|s\\|th\\)?" ; for ARGth, ARGs
"\\(?:-[a-z-]+\\)?" ; for ARG-xxx
--- macroexp.el 25 May 2005 18:19:35 +0200 1.2
+++ macroexp.el 30 Jun 2005 19:36:27 +0200
@@ -51,7 +51,9 @@
Return a list of the values of the final form in BODY.
The list structure of the result will share as much with LIST as
possible (for instance, when BODY just returns VAR unchanged, the
-result will be eq to LIST)."
+result will be eq to LIST).
+
+\(fn (VAR LIST) BODY...)"
(let ((var (car #1#))
(list (cadr #1#))
(shared (make-symbol "shared"))
--
Johan Bockgård
_______________________________________________
Emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug