diff options
| author | Stefan Monnier | 2004-04-29 18:21:48 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2004-04-29 18:21:48 +0000 |
| commit | 0fddae66f4ac29a98fd7073ba4a1fdfc5139fa17 (patch) | |
| tree | b6216958322ff8b585917ba8a1dae71b10a102bf | |
| parent | e461972853fc02e88048b1f9049bc510671851ac (diff) | |
| download | emacs-0fddae66f4ac29a98fd7073ba4a1fdfc5139fa17.tar.gz emacs-0fddae66f4ac29a98fd7073ba4a1fdfc5139fa17.zip | |
(Fsubr_name): New fun.
(syms_of_data): Defsubr it.
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/data.c | 14 |
2 files changed, 19 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 386c3d99a47..9be37a38531 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2004-04-29 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * data.c (Fsubr_name): New fun. | ||
| 4 | (syms_of_data): Defsubr it. | ||
| 5 | |||
| 1 | 2004-04-29 Kim F. Storm <storm@cua.dk> | 6 | 2004-04-29 Kim F. Storm <storm@cua.dk> |
| 2 | 7 | ||
| 3 | * xdisp.c (null_glyph_slice): New var. | 8 | * xdisp.c (null_glyph_slice): New var. |
diff --git a/src/data.c b/src/data.c index a5f28375635..c94723d09d0 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -761,6 +761,19 @@ function with `&rest' args, or `unevalled' for a special form. */) | |||
| 761 | return Fcons (make_number (minargs), make_number (maxargs)); | 761 | return Fcons (make_number (minargs), make_number (maxargs)); |
| 762 | } | 762 | } |
| 763 | 763 | ||
| 764 | DEFUN ("subr-name", Fsubr_name, Ssubr_name, 1, 1, 0, | ||
| 765 | doc: /* Return name of subroutine SUBR. | ||
| 766 | SUBR must be a built-in function. */) | ||
| 767 | (subr) | ||
| 768 | Lisp_Object subr; | ||
| 769 | { | ||
| 770 | const char *name; | ||
| 771 | if (!SUBRP (subr)) | ||
| 772 | wrong_type_argument (Qsubrp, subr); | ||
| 773 | name = XSUBR (subr)->symbol_name; | ||
| 774 | return make_string (name, strlen (name)); | ||
| 775 | } | ||
| 776 | |||
| 764 | DEFUN ("interactive-form", Finteractive_form, Sinteractive_form, 1, 1, 0, | 777 | DEFUN ("interactive-form", Finteractive_form, Sinteractive_form, 1, 1, 0, |
| 765 | doc: /* Return the interactive form of CMD or nil if none. | 778 | doc: /* Return the interactive form of CMD or nil if none. |
| 766 | CMD must be a command. Value, if non-nil, is a list | 779 | CMD must be a command. Value, if non-nil, is a list |
| @@ -3319,6 +3332,7 @@ syms_of_data () | |||
| 3319 | defsubr (&Slognot); | 3332 | defsubr (&Slognot); |
| 3320 | defsubr (&Sbyteorder); | 3333 | defsubr (&Sbyteorder); |
| 3321 | defsubr (&Ssubr_arity); | 3334 | defsubr (&Ssubr_arity); |
| 3335 | defsubr (&Ssubr_name); | ||
| 3322 | 3336 | ||
| 3323 | XSYMBOL (Qwholenump)->function = XSYMBOL (Qnatnump)->function; | 3337 | XSYMBOL (Qwholenump)->function = XSYMBOL (Qnatnump)->function; |
| 3324 | 3338 | ||