diff options
| author | Karoly Lorentey | 2004-04-03 20:24:17 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-04-03 20:24:17 +0000 |
| commit | 1ba538094c4cd3da172d91878fa76d96c6b1cbd2 (patch) | |
| tree | d9379406f3598de5db893fd0f01d6ae214a711d1 /src/data.c | |
| parent | b04f5ad2cc0f71e567ec9ee49351f45f0a5faa3a (diff) | |
| parent | 9f691b0dd903205d12e447c753bcd92741c68707 (diff) | |
| download | emacs-1ba538094c4cd3da172d91878fa76d96c6b1cbd2.tar.gz emacs-1ba538094c4cd3da172d91878fa76d96c6b1cbd2.zip | |
Merged in changes from CVS HEAD
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-177
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-178
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-179
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-180
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-131
Diffstat (limited to 'src/data.c')
| -rw-r--r-- | src/data.c | 46 |
1 files changed, 34 insertions, 12 deletions
diff --git a/src/data.c b/src/data.c index bff2baaed27..c3cf05e0f10 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Primitive operations on Lisp data types for GNU Emacs Lisp interpreter. | 1 | /* Primitive operations on Lisp data types for GNU Emacs Lisp interpreter. |
| 2 | Copyright (C) 1985,86,88,93,94,95,97,98,99, 2000, 2001, 2003 | 2 | Copyright (C) 1985,86,88,93,94,95,97,98,99, 2000, 2001, 03, 2004 |
| 3 | Free Software Foundation, Inc. | 3 | Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| @@ -761,17 +761,39 @@ 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-interactive-form", Fsubr_interactive_form, Ssubr_interactive_form, 1, 1, 0, | 764 | DEFUN ("interactive-form", Finteractive_form, Sinteractive_form, 1, 1, 0, |
| 765 | doc: /* Return the interactive form of SUBR or nil if none. | 765 | doc: /* Return the interactive form of CMD or nil if none. |
| 766 | SUBR must be a built-in function. Value, if non-nil, is a list | 766 | CMD must be a command. Value, if non-nil, is a list |
| 767 | \(interactive SPEC). */) | 767 | \(interactive SPEC). */) |
| 768 | (subr) | 768 | (cmd) |
| 769 | Lisp_Object subr; | 769 | Lisp_Object cmd; |
| 770 | { | 770 | { |
| 771 | if (!SUBRP (subr)) | 771 | Lisp_Object fun = indirect_function (cmd); |
| 772 | wrong_type_argument (Qsubrp, subr); | 772 | |
| 773 | if (XSUBR (subr)->prompt) | 773 | if (SUBRP (fun)) |
| 774 | return list2 (Qinteractive, build_string (XSUBR (subr)->prompt)); | 774 | { |
| 775 | if (XSUBR (fun)->prompt) | ||
| 776 | return list2 (Qinteractive, build_string (XSUBR (fun)->prompt)); | ||
| 777 | } | ||
| 778 | else if (COMPILEDP (fun)) | ||
| 779 | { | ||
| 780 | if ((ASIZE (fun) & PSEUDOVECTOR_SIZE_MASK) > COMPILED_INTERACTIVE) | ||
| 781 | return list2 (Qinteractive, AREF (fun, COMPILED_INTERACTIVE)); | ||
| 782 | } | ||
| 783 | else if (CONSP (fun)) | ||
| 784 | { | ||
| 785 | Lisp_Object funcar = XCAR (fun); | ||
| 786 | if (EQ (funcar, Qlambda)) | ||
| 787 | return Fassq (Qinteractive, Fcdr (XCDR (fun))); | ||
| 788 | else if (EQ (funcar, Qautoload)) | ||
| 789 | { | ||
| 790 | struct gcpro gcpro1; | ||
| 791 | GCPRO1 (cmd); | ||
| 792 | do_autoload (fun, cmd); | ||
| 793 | UNGCPRO; | ||
| 794 | return Finteractive_form (cmd); | ||
| 795 | } | ||
| 796 | } | ||
| 775 | return Qnil; | 797 | return Qnil; |
| 776 | } | 798 | } |
| 777 | 799 | ||
| @@ -2887,7 +2909,7 @@ lowercase l) for small endian machines. */) | |||
| 2887 | () | 2909 | () |
| 2888 | { | 2910 | { |
| 2889 | unsigned i = 0x04030201; | 2911 | unsigned i = 0x04030201; |
| 2890 | int order = *(char *)&i == 4 ? 66 : 108; | 2912 | int order = *(char *)&i == 1 ? 108 : 66; |
| 2891 | 2913 | ||
| 2892 | return make_number (order); | 2914 | return make_number (order); |
| 2893 | } | 2915 | } |
| @@ -3209,7 +3231,7 @@ syms_of_data () | |||
| 3209 | staticpro (&Qhash_table); | 3231 | staticpro (&Qhash_table); |
| 3210 | 3232 | ||
| 3211 | defsubr (&Sindirect_variable); | 3233 | defsubr (&Sindirect_variable); |
| 3212 | defsubr (&Ssubr_interactive_form); | 3234 | defsubr (&Sinteractive_form); |
| 3213 | defsubr (&Seq); | 3235 | defsubr (&Seq); |
| 3214 | defsubr (&Snull); | 3236 | defsubr (&Snull); |
| 3215 | defsubr (&Stype_of); | 3237 | defsubr (&Stype_of); |