Mercurial > hg > xemacs-beta
comparison lisp/help.el @ 4642:48b45a606961
Support #'function-arglist with built-in special forms.
Also fix a couple of bugs in lisp/help.el.
lisp/ChangeLog addition:
2009-06-14 Aidan Kehoe <kehoea@parhasard.net>
* help.el (describe-function-1):
Check macro-p, not macrop, when describing whether a symbol has an
associated macro or an associated function. Relevant with
autoloaded macros.
(function-arglist):
Accept multi-line arglists in built-in functions, as found in
#'write-region-internal. #'dontusethis-set-symbol-value-handler
is still broken for other reasons.
src/ChangeLog addition:
2009-06-14 Aidan Kehoe <kehoea@parhasard.net>
* eval.c (For):
* eval.c (Fand):
* eval.c (Fif):
* eval.c (Fwhen):
* eval.c (Fcond):
* eval.c (Fprogn):
* eval.c (Fprog1):
* eval.c (Fprog2):
* eval.c (FletX):
* eval.c (Flet):
* eval.c (Fwhile):
* eval.c (Fdefvar):
* eval.c (Fdefconst):
* eval.c (Frun_hooks):
* eval.c (Frun_hooks_with_args):
* eval.c (Frun_hooks_with_args_until_success):
* eval.c (Frun_hooks_with_args_until_failure):
Add arguments information, understood by #'function-arglist, to
all these special forms, functions and macros. Remove the
argument information that was already there that was not
understood by #'function-arglist.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 14 Jun 2009 15:07:13 +0100 |
parents | 7c7262c47538 |
children | e9b88e997479 |
comparison
equal
deleted
inserted
replaced
4641:a90b63846dc4 | 4642:48b45a606961 |
---|---|
1190 (nth 1 fndef)) | 1190 (nth 1 fndef)) |
1191 ((subrp fndef) | 1191 ((subrp fndef) |
1192 (let* ((doc (documentation function)) | 1192 (let* ((doc (documentation function)) |
1193 (args (and doc | 1193 (args (and doc |
1194 (string-match | 1194 (string-match |
1195 "[\n\t ]*\narguments: ?(\\(.*\\))\n?\\'" | 1195 "[\n\t ]*\narguments: ?(\\([^)]*\\))\n?\\'" |
1196 doc) | 1196 doc) |
1197 (match-string 1 doc)))) | 1197 (match-string 1 doc))) |
1198 (args (and args (replace-in-string args | |
1199 "[ ]*\\\\\n[ ]*" | |
1200 " " t)))) | |
1198 ;; If there are no arguments documented for the | 1201 ;; If there are no arguments documented for the |
1199 ;; subr, rather don't print anything. | 1202 ;; subr, rather don't print anything. |
1200 (cond ((null args) t) | 1203 (cond ((null args) t) |
1201 ((equal args "") nil) | 1204 ((equal args "") nil) |
1202 (args)))) | 1205 (args)))) |
1400 (t "a ")) | 1403 (t "a ")) |
1401 "%s" | 1404 "%s" |
1402 (cond | 1405 (cond |
1403 ((eq 'neither macro-p) | 1406 ((eq 'neither macro-p) |
1404 "") | 1407 "") |
1405 (macrop " macro") | 1408 (macro-p " macro") |
1406 (t " function")))) | 1409 (t " function")))) |
1407 string))))) | 1410 string))))) |
1408 (cond ((or (stringp def) (vectorp def)) | 1411 (cond ((or (stringp def) (vectorp def)) |
1409 (princ "a keyboard macro.") | 1412 (princ "a keyboard macro.") |
1410 (setq kbd-macro-p t)) | 1413 (setq kbd-macro-p t)) |