diff options
| author | Paul Eggert | 2011-04-10 18:41:15 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-04-10 18:41:15 -0700 |
| commit | 16a97296c05ec9d5bb4ffeae9dce90fc63f578ed (patch) | |
| tree | 0801b434f760fd8dded7204501ffcdb82460720c /src/data.c | |
| parent | 785bbd422461295890087ced24bfd87504032d0c (diff) | |
| download | emacs-16a97296c05ec9d5bb4ffeae9dce90fc63f578ed.tar.gz emacs-16a97296c05ec9d5bb4ffeae9dce90fc63f578ed.zip | |
Make Emacs functions such as Fatom 'static' by default.
This makes it easier for human readers (and static analyzers)
to see whether these functions can be called from other modules.
DEFUN now defines a static function. To make the function external
so that it can be used in other C modules, use the new macro DEFUE.
* lisp.h (DEFINE_FUNC): New macro, with the old contents of DEFUN.
(DEFUN): Rewrite in terms of DEFINE_FUNC. It now generates a
static function definition. Use DEFUE if you want an extern one.
(DEFUE, INFUN): New macros.
(Funibyte_char_to_multibyte, Fsyntax_table_p, Finit_image_library):
(Feval_region, Fbacktrace, Ffetch_bytecode, Fswitch_to_buffer):
(Ffile_executable_p, Fmake_symbolic_link, Fcommand_execute):
(Fget_process, Fdocumentation_property, Fbyte_code, Ffile_attributes):
Remove decls, since these functions are now static.
(Funintern, Fget_internal_run_time): New decls, since these functions
were already external.
* alloc.c, buffer.c, callint.c, callproc.c, casefiddle.c, casetab.c:
* ccl.c, character.c, chartab.c, cmds.c, coding.c, data.c, dispnew.c:
* doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, floatfns.c:
* fns.c, font.c, fontset.c, frame.c, image.c, indent.c:
* keyboard.c, keymap.c, lread.c:
* macros.c, marker.c, menu.c, minibuf.c, print.c, process.c, search.c:
* syntax.c, term.c, terminal.c, textprop.c, undo.c:
* window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xsettings.c:
Mark functions with DEFUE instead of DEFUN,
if they are used in other modules.
* buffer.c (Fset_buffer_major_mode, Fdelete_overlay): New forward
decls for now-static functions.
* buffer.h (Fdelete_overlay): Remove decl.
* callproc.c (Fgetenv_internal): Mark as internal.
* composite.c (Fremove_list_of_text_properties): Remove decl.
(Fcomposition_get_gstring): New forward static decl.
* composite.h (Fcomposite_get_gstring): Remove decl.
* dired.c (Ffile_attributes): New forward static decl.
* doc.c (Fdocumntation_property): New forward static decl.
* eval.c (Ffetch_bytecode): New forward static decl.
(Funintern): Remove extern decl; now in .h file where it belongs.
* fileio.c (Fmake_symbolic_link): New forward static decl.
* image.c (Finit_image_library): New forward static decl.
* insdel.c (Fcombine_after_change_execute): Make forward decl static.
* intervals.h (Fprevious_property_change):
(Fremove_list_of_text_properties): Remove decls.
* keyboard.c (Fthis_command_keys): Remove decl.
(Fcommand_execute): New forward static decl.
* keymap.c (Flookup_key): New forward static decl.
(Fcopy_keymap): Now static.
* keymap.h (Flookup_key): Remove decl.
* process.c (Fget_process): New forward static decl.
(Fprocess_datagram_address): Mark as internal.
* syntax.c (Fsyntax_table_p): New forward static decl.
(skip_chars): Remove duplicate decl.
* textprop.c (Fprevious_property_change): New forward static decl.
* window.c (Fset_window_fringes, Fset_window_scroll_bars):
Now internal.
(Fset_window_margins, Fset_window_vscroll): New forward static decls.
* window.h (Fset_window_vscroll, Fset_window_margins): Remove decls.
Diffstat (limited to 'src/data.c')
| -rw-r--r-- | src/data.c | 88 |
1 files changed, 45 insertions, 43 deletions
diff --git a/src/data.c b/src/data.c index 4b9d2ec0387..25e260c8686 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -462,7 +462,7 @@ DEFUN ("floatp", Ffloatp, Sfloatp, 1, 1, 0, | |||
| 462 | 462 | ||
| 463 | /* Extract and set components of lists */ | 463 | /* Extract and set components of lists */ |
| 464 | 464 | ||
| 465 | DEFUN ("car", Fcar, Scar, 1, 1, 0, | 465 | DEFUE ("car", Fcar, Scar, 1, 1, 0, |
| 466 | doc: /* Return the car of LIST. If arg is nil, return nil. | 466 | doc: /* Return the car of LIST. If arg is nil, return nil. |
| 467 | Error if arg is not nil and not a cons cell. See also `car-safe'. | 467 | Error if arg is not nil and not a cons cell. See also `car-safe'. |
| 468 | 468 | ||
| @@ -473,14 +473,14 @@ Lisp concepts such as car, cdr, cons cell and list. */) | |||
| 473 | return CAR (list); | 473 | return CAR (list); |
| 474 | } | 474 | } |
| 475 | 475 | ||
| 476 | DEFUN ("car-safe", Fcar_safe, Scar_safe, 1, 1, 0, | 476 | DEFUE ("car-safe", Fcar_safe, Scar_safe, 1, 1, 0, |
| 477 | doc: /* Return the car of OBJECT if it is a cons cell, or else nil. */) | 477 | doc: /* Return the car of OBJECT if it is a cons cell, or else nil. */) |
| 478 | (Lisp_Object object) | 478 | (Lisp_Object object) |
| 479 | { | 479 | { |
| 480 | return CAR_SAFE (object); | 480 | return CAR_SAFE (object); |
| 481 | } | 481 | } |
| 482 | 482 | ||
| 483 | DEFUN ("cdr", Fcdr, Scdr, 1, 1, 0, | 483 | DEFUE ("cdr", Fcdr, Scdr, 1, 1, 0, |
| 484 | doc: /* Return the cdr of LIST. If arg is nil, return nil. | 484 | doc: /* Return the cdr of LIST. If arg is nil, return nil. |
| 485 | Error if arg is not nil and not a cons cell. See also `cdr-safe'. | 485 | Error if arg is not nil and not a cons cell. See also `cdr-safe'. |
| 486 | 486 | ||
| @@ -491,14 +491,14 @@ Lisp concepts such as cdr, car, cons cell and list. */) | |||
| 491 | return CDR (list); | 491 | return CDR (list); |
| 492 | } | 492 | } |
| 493 | 493 | ||
| 494 | DEFUN ("cdr-safe", Fcdr_safe, Scdr_safe, 1, 1, 0, | 494 | DEFUE ("cdr-safe", Fcdr_safe, Scdr_safe, 1, 1, 0, |
| 495 | doc: /* Return the cdr of OBJECT if it is a cons cell, or else nil. */) | 495 | doc: /* Return the cdr of OBJECT if it is a cons cell, or else nil. */) |
| 496 | (Lisp_Object object) | 496 | (Lisp_Object object) |
| 497 | { | 497 | { |
| 498 | return CDR_SAFE (object); | 498 | return CDR_SAFE (object); |
| 499 | } | 499 | } |
| 500 | 500 | ||
| 501 | DEFUN ("setcar", Fsetcar, Ssetcar, 2, 2, 0, | 501 | DEFUE ("setcar", Fsetcar, Ssetcar, 2, 2, 0, |
| 502 | doc: /* Set the car of CELL to be NEWCAR. Returns NEWCAR. */) | 502 | doc: /* Set the car of CELL to be NEWCAR. Returns NEWCAR. */) |
| 503 | (register Lisp_Object cell, Lisp_Object newcar) | 503 | (register Lisp_Object cell, Lisp_Object newcar) |
| 504 | { | 504 | { |
| @@ -508,7 +508,7 @@ DEFUN ("setcar", Fsetcar, Ssetcar, 2, 2, 0, | |||
| 508 | return newcar; | 508 | return newcar; |
| 509 | } | 509 | } |
| 510 | 510 | ||
| 511 | DEFUN ("setcdr", Fsetcdr, Ssetcdr, 2, 2, 0, | 511 | DEFUE ("setcdr", Fsetcdr, Ssetcdr, 2, 2, 0, |
| 512 | doc: /* Set the cdr of CELL to be NEWCDR. Returns NEWCDR. */) | 512 | doc: /* Set the cdr of CELL to be NEWCDR. Returns NEWCDR. */) |
| 513 | (register Lisp_Object cell, Lisp_Object newcdr) | 513 | (register Lisp_Object cell, Lisp_Object newcdr) |
| 514 | { | 514 | { |
| @@ -520,7 +520,7 @@ DEFUN ("setcdr", Fsetcdr, Ssetcdr, 2, 2, 0, | |||
| 520 | 520 | ||
| 521 | /* Extract and set components of symbols */ | 521 | /* Extract and set components of symbols */ |
| 522 | 522 | ||
| 523 | DEFUN ("boundp", Fboundp, Sboundp, 1, 1, 0, | 523 | DEFUE ("boundp", Fboundp, Sboundp, 1, 1, 0, |
| 524 | doc: /* Return t if SYMBOL's value is not void. */) | 524 | doc: /* Return t if SYMBOL's value is not void. */) |
| 525 | (register Lisp_Object symbol) | 525 | (register Lisp_Object symbol) |
| 526 | { | 526 | { |
| @@ -558,7 +558,7 @@ DEFUN ("boundp", Fboundp, Sboundp, 1, 1, 0, | |||
| 558 | return (EQ (valcontents, Qunbound) ? Qnil : Qt); | 558 | return (EQ (valcontents, Qunbound) ? Qnil : Qt); |
| 559 | } | 559 | } |
| 560 | 560 | ||
| 561 | DEFUN ("fboundp", Ffboundp, Sfboundp, 1, 1, 0, | 561 | DEFUE ("fboundp", Ffboundp, Sfboundp, 1, 1, 0, |
| 562 | doc: /* Return t if SYMBOL's function definition is not void. */) | 562 | doc: /* Return t if SYMBOL's function definition is not void. */) |
| 563 | (register Lisp_Object symbol) | 563 | (register Lisp_Object symbol) |
| 564 | { | 564 | { |
| @@ -590,7 +590,7 @@ Return SYMBOL. */) | |||
| 590 | return symbol; | 590 | return symbol; |
| 591 | } | 591 | } |
| 592 | 592 | ||
| 593 | DEFUN ("symbol-function", Fsymbol_function, Ssymbol_function, 1, 1, 0, | 593 | DEFUE ("symbol-function", Fsymbol_function, Ssymbol_function, 1, 1, 0, |
| 594 | doc: /* Return SYMBOL's function definition. Error if that is void. */) | 594 | doc: /* Return SYMBOL's function definition. Error if that is void. */) |
| 595 | (register Lisp_Object symbol) | 595 | (register Lisp_Object symbol) |
| 596 | { | 596 | { |
| @@ -608,7 +608,7 @@ DEFUN ("symbol-plist", Fsymbol_plist, Ssymbol_plist, 1, 1, 0, | |||
| 608 | return XSYMBOL (symbol)->plist; | 608 | return XSYMBOL (symbol)->plist; |
| 609 | } | 609 | } |
| 610 | 610 | ||
| 611 | DEFUN ("symbol-name", Fsymbol_name, Ssymbol_name, 1, 1, 0, | 611 | DEFUE ("symbol-name", Fsymbol_name, Ssymbol_name, 1, 1, 0, |
| 612 | doc: /* Return SYMBOL's name, a string. */) | 612 | doc: /* Return SYMBOL's name, a string. */) |
| 613 | (register Lisp_Object symbol) | 613 | (register Lisp_Object symbol) |
| 614 | { | 614 | { |
| @@ -619,7 +619,7 @@ DEFUN ("symbol-name", Fsymbol_name, Ssymbol_name, 1, 1, 0, | |||
| 619 | return name; | 619 | return name; |
| 620 | } | 620 | } |
| 621 | 621 | ||
| 622 | DEFUN ("fset", Ffset, Sfset, 2, 2, 0, | 622 | DEFUE ("fset", Ffset, Sfset, 2, 2, 0, |
| 623 | doc: /* Set SYMBOL's function definition to DEFINITION, and return DEFINITION. */) | 623 | doc: /* Set SYMBOL's function definition to DEFINITION, and return DEFINITION. */) |
| 624 | (register Lisp_Object symbol, Lisp_Object definition) | 624 | (register Lisp_Object symbol, Lisp_Object definition) |
| 625 | { | 625 | { |
| @@ -706,7 +706,7 @@ SUBR must be a built-in function. */) | |||
| 706 | return make_string (name, strlen (name)); | 706 | return make_string (name, strlen (name)); |
| 707 | } | 707 | } |
| 708 | 708 | ||
| 709 | DEFUN ("interactive-form", Finteractive_form, Sinteractive_form, 1, 1, 0, | 709 | DEFUE ("interactive-form", Finteractive_form, Sinteractive_form, 1, 1, 0, |
| 710 | doc: /* Return the interactive form of CMD or nil if none. | 710 | doc: /* Return the interactive form of CMD or nil if none. |
| 711 | If CMD is not a command, the return value is nil. | 711 | If CMD is not a command, the return value is nil. |
| 712 | Value, if non-nil, is a list \(interactive SPEC). */) | 712 | Value, if non-nil, is a list \(interactive SPEC). */) |
| @@ -1049,7 +1049,7 @@ find_symbol_value (Lisp_Object symbol) | |||
| 1049 | } | 1049 | } |
| 1050 | } | 1050 | } |
| 1051 | 1051 | ||
| 1052 | DEFUN ("symbol-value", Fsymbol_value, Ssymbol_value, 1, 1, 0, | 1052 | DEFUE ("symbol-value", Fsymbol_value, Ssymbol_value, 1, 1, 0, |
| 1053 | doc: /* Return SYMBOL's value. Error if that is void. */) | 1053 | doc: /* Return SYMBOL's value. Error if that is void. */) |
| 1054 | (Lisp_Object symbol) | 1054 | (Lisp_Object symbol) |
| 1055 | { | 1055 | { |
| @@ -1062,7 +1062,7 @@ DEFUN ("symbol-value", Fsymbol_value, Ssymbol_value, 1, 1, 0, | |||
| 1062 | xsignal1 (Qvoid_variable, symbol); | 1062 | xsignal1 (Qvoid_variable, symbol); |
| 1063 | } | 1063 | } |
| 1064 | 1064 | ||
| 1065 | DEFUN ("set", Fset, Sset, 2, 2, 0, | 1065 | DEFUE ("set", Fset, Sset, 2, 2, 0, |
| 1066 | doc: /* Set SYMBOL's value to NEWVAL, and return NEWVAL. */) | 1066 | doc: /* Set SYMBOL's value to NEWVAL, and return NEWVAL. */) |
| 1067 | (register Lisp_Object symbol, Lisp_Object newval) | 1067 | (register Lisp_Object symbol, Lisp_Object newval) |
| 1068 | { | 1068 | { |
| @@ -1308,7 +1308,7 @@ default_value (Lisp_Object symbol) | |||
| 1308 | } | 1308 | } |
| 1309 | } | 1309 | } |
| 1310 | 1310 | ||
| 1311 | DEFUN ("default-boundp", Fdefault_boundp, Sdefault_boundp, 1, 1, 0, | 1311 | DEFUE ("default-boundp", Fdefault_boundp, Sdefault_boundp, 1, 1, 0, |
| 1312 | doc: /* Return t if SYMBOL has a non-void default value. | 1312 | doc: /* Return t if SYMBOL has a non-void default value. |
| 1313 | This is the value that is seen in buffers that do not have their own values | 1313 | This is the value that is seen in buffers that do not have their own values |
| 1314 | for this variable. */) | 1314 | for this variable. */) |
| @@ -1320,7 +1320,7 @@ for this variable. */) | |||
| 1320 | return (EQ (value, Qunbound) ? Qnil : Qt); | 1320 | return (EQ (value, Qunbound) ? Qnil : Qt); |
| 1321 | } | 1321 | } |
| 1322 | 1322 | ||
| 1323 | DEFUN ("default-value", Fdefault_value, Sdefault_value, 1, 1, 0, | 1323 | DEFUE ("default-value", Fdefault_value, Sdefault_value, 1, 1, 0, |
| 1324 | doc: /* Return SYMBOL's default value. | 1324 | doc: /* Return SYMBOL's default value. |
| 1325 | This is the value that is seen in buffers that do not have their own values | 1325 | This is the value that is seen in buffers that do not have their own values |
| 1326 | for this variable. The default value is meaningful for variables with | 1326 | for this variable. The default value is meaningful for variables with |
| @@ -1336,7 +1336,7 @@ local bindings in certain buffers. */) | |||
| 1336 | xsignal1 (Qvoid_variable, symbol); | 1336 | xsignal1 (Qvoid_variable, symbol); |
| 1337 | } | 1337 | } |
| 1338 | 1338 | ||
| 1339 | DEFUN ("set-default", Fset_default, Sset_default, 2, 2, 0, | 1339 | DEFUE ("set-default", Fset_default, Sset_default, 2, 2, 0, |
| 1340 | doc: /* Set SYMBOL's default value to VALUE. SYMBOL and VALUE are evaluated. | 1340 | doc: /* Set SYMBOL's default value to VALUE. SYMBOL and VALUE are evaluated. |
| 1341 | The default value is seen in buffers that do not have their own values | 1341 | The default value is seen in buffers that do not have their own values |
| 1342 | for this variable. */) | 1342 | for this variable. */) |
| @@ -1479,8 +1479,8 @@ make_blv (struct Lisp_Symbol *sym, int forwarded, union Lisp_Val_Fwd valcontents | |||
| 1479 | return blv; | 1479 | return blv; |
| 1480 | } | 1480 | } |
| 1481 | 1481 | ||
| 1482 | DEFUN ("make-variable-buffer-local", Fmake_variable_buffer_local, Smake_variable_buffer_local, | 1482 | DEFUE ("make-variable-buffer-local", Fmake_variable_buffer_local, |
| 1483 | 1, 1, "vMake Variable Buffer Local: ", | 1483 | Smake_variable_buffer_local, 1, 1, "vMake Variable Buffer Local: ", |
| 1484 | doc: /* Make VARIABLE become buffer-local whenever it is set. | 1484 | doc: /* Make VARIABLE become buffer-local whenever it is set. |
| 1485 | At any time, the value for the current buffer is in effect, | 1485 | At any time, the value for the current buffer is in effect, |
| 1486 | unless the variable has never been set in this buffer, | 1486 | unless the variable has never been set in this buffer, |
| @@ -1550,7 +1550,7 @@ The function `default-value' gets the default value and `set-default' sets it. | |||
| 1550 | return variable; | 1550 | return variable; |
| 1551 | } | 1551 | } |
| 1552 | 1552 | ||
| 1553 | DEFUN ("make-local-variable", Fmake_local_variable, Smake_local_variable, | 1553 | DEFUE ("make-local-variable", Fmake_local_variable, Smake_local_variable, |
| 1554 | 1, 1, "vMake Local Variable: ", | 1554 | 1, 1, "vMake Local Variable: ", |
| 1555 | doc: /* Make VARIABLE have a separate value in the current buffer. | 1555 | doc: /* Make VARIABLE have a separate value in the current buffer. |
| 1556 | Other buffers will continue to share a common default value. | 1556 | Other buffers will continue to share a common default value. |
| @@ -1810,7 +1810,7 @@ frame-local bindings). */) | |||
| 1810 | return variable; | 1810 | return variable; |
| 1811 | } | 1811 | } |
| 1812 | 1812 | ||
| 1813 | DEFUN ("local-variable-p", Flocal_variable_p, Slocal_variable_p, | 1813 | DEFUE ("local-variable-p", Flocal_variable_p, Slocal_variable_p, |
| 1814 | 1, 2, 0, | 1814 | 1, 2, 0, |
| 1815 | doc: /* Non-nil if VARIABLE has a local binding in buffer BUFFER. | 1815 | doc: /* Non-nil if VARIABLE has a local binding in buffer BUFFER. |
| 1816 | BUFFER defaults to the current buffer. */) | 1816 | BUFFER defaults to the current buffer. */) |
| @@ -1955,7 +1955,8 @@ If the current binding is global (the default), the value is nil. */) | |||
| 1955 | #if 0 | 1955 | #if 0 |
| 1956 | extern struct terminal *get_terminal (Lisp_Object display, int); | 1956 | extern struct terminal *get_terminal (Lisp_Object display, int); |
| 1957 | 1957 | ||
| 1958 | DEFUN ("terminal-local-value", Fterminal_local_value, Sterminal_local_value, 2, 2, 0, | 1958 | DEFUE ("terminal-local-value", Fterminal_local_value, |
| 1959 | Sterminal_local_value, 2, 2, 0, | ||
| 1959 | doc: /* Return the terminal-local value of SYMBOL on TERMINAL. | 1960 | doc: /* Return the terminal-local value of SYMBOL on TERMINAL. |
| 1960 | If SYMBOL is not a terminal-local variable, then return its normal | 1961 | If SYMBOL is not a terminal-local variable, then return its normal |
| 1961 | value, like `symbol-value'. | 1962 | value, like `symbol-value'. |
| @@ -1972,7 +1973,8 @@ selected frame's terminal device). */) | |||
| 1972 | return result; | 1973 | return result; |
| 1973 | } | 1974 | } |
| 1974 | 1975 | ||
| 1975 | DEFUN ("set-terminal-local-value", Fset_terminal_local_value, Sset_terminal_local_value, 3, 3, 0, | 1976 | DEFUE ("set-terminal-local-value", Fset_terminal_local_value, |
| 1977 | Sset_terminal_local_value, 3, 3, 0, | ||
| 1976 | doc: /* Set the terminal-local binding of SYMBOL on TERMINAL to VALUE. | 1978 | doc: /* Set the terminal-local binding of SYMBOL on TERMINAL to VALUE. |
| 1977 | If VARIABLE is not a terminal-local variable, then set its normal | 1979 | If VARIABLE is not a terminal-local variable, then set its normal |
| 1978 | binding, like `set'. | 1980 | binding, like `set'. |
| @@ -2024,7 +2026,7 @@ indirect_function (register Lisp_Object object) | |||
| 2024 | return hare; | 2026 | return hare; |
| 2025 | } | 2027 | } |
| 2026 | 2028 | ||
| 2027 | DEFUN ("indirect-function", Findirect_function, Sindirect_function, 1, 2, 0, | 2029 | DEFUE ("indirect-function", Findirect_function, Sindirect_function, 1, 2, 0, |
| 2028 | doc: /* Return the function at the end of OBJECT's function chain. | 2030 | doc: /* Return the function at the end of OBJECT's function chain. |
| 2029 | If OBJECT is not a symbol, just return it. Otherwise, follow all | 2031 | If OBJECT is not a symbol, just return it. Otherwise, follow all |
| 2030 | function indirections to find the final function binding and return it. | 2032 | function indirections to find the final function binding and return it. |
| @@ -2052,7 +2054,7 @@ function chain of symbols. */) | |||
| 2052 | 2054 | ||
| 2053 | /* Extract and set vector and string elements */ | 2055 | /* Extract and set vector and string elements */ |
| 2054 | 2056 | ||
| 2055 | DEFUN ("aref", Faref, Saref, 2, 2, 0, | 2057 | DEFUE ("aref", Faref, Saref, 2, 2, 0, |
| 2056 | doc: /* Return the element of ARRAY at index IDX. | 2058 | doc: /* Return the element of ARRAY at index IDX. |
| 2057 | ARRAY may be a vector, a string, a char-table, a bool-vector, | 2059 | ARRAY may be a vector, a string, a char-table, a bool-vector, |
| 2058 | or a byte-code object. IDX starts at 0. */) | 2060 | or a byte-code object. IDX starts at 0. */) |
| @@ -2107,7 +2109,7 @@ or a byte-code object. IDX starts at 0. */) | |||
| 2107 | } | 2109 | } |
| 2108 | } | 2110 | } |
| 2109 | 2111 | ||
| 2110 | DEFUN ("aset", Faset, Saset, 3, 3, 0, | 2112 | DEFUE ("aset", Faset, Saset, 3, 3, 0, |
| 2111 | doc: /* Store into the element of ARRAY at index IDX the value NEWELT. | 2113 | doc: /* Store into the element of ARRAY at index IDX the value NEWELT. |
| 2112 | Return NEWELT. ARRAY may be a vector, a string, a char-table or a | 2114 | Return NEWELT. ARRAY may be a vector, a string, a char-table or a |
| 2113 | bool-vector. IDX starts at 0. */) | 2115 | bool-vector. IDX starts at 0. */) |
| @@ -2270,21 +2272,21 @@ DEFUN ("=", Feqlsign, Seqlsign, 2, 2, 0, | |||
| 2270 | return arithcompare (num1, num2, equal); | 2272 | return arithcompare (num1, num2, equal); |
| 2271 | } | 2273 | } |
| 2272 | 2274 | ||
| 2273 | DEFUN ("<", Flss, Slss, 2, 2, 0, | 2275 | DEFUE ("<", Flss, Slss, 2, 2, 0, |
| 2274 | doc: /* Return t if first arg is less than second arg. Both must be numbers or markers. */) | 2276 | doc: /* Return t if first arg is less than second arg. Both must be numbers or markers. */) |
| 2275 | (register Lisp_Object num1, Lisp_Object num2) | 2277 | (register Lisp_Object num1, Lisp_Object num2) |
| 2276 | { | 2278 | { |
| 2277 | return arithcompare (num1, num2, less); | 2279 | return arithcompare (num1, num2, less); |
| 2278 | } | 2280 | } |
| 2279 | 2281 | ||
| 2280 | DEFUN (">", Fgtr, Sgtr, 2, 2, 0, | 2282 | DEFUE (">", Fgtr, Sgtr, 2, 2, 0, |
| 2281 | doc: /* Return t if first arg is greater than second arg. Both must be numbers or markers. */) | 2283 | doc: /* Return t if first arg is greater than second arg. Both must be numbers or markers. */) |
| 2282 | (register Lisp_Object num1, Lisp_Object num2) | 2284 | (register Lisp_Object num1, Lisp_Object num2) |
| 2283 | { | 2285 | { |
| 2284 | return arithcompare (num1, num2, grtr); | 2286 | return arithcompare (num1, num2, grtr); |
| 2285 | } | 2287 | } |
| 2286 | 2288 | ||
| 2287 | DEFUN ("<=", Fleq, Sleq, 2, 2, 0, | 2289 | DEFUE ("<=", Fleq, Sleq, 2, 2, 0, |
| 2288 | doc: /* Return t if first arg is less than or equal to second arg. | 2290 | doc: /* Return t if first arg is less than or equal to second arg. |
| 2289 | Both must be numbers or markers. */) | 2291 | Both must be numbers or markers. */) |
| 2290 | (register Lisp_Object num1, Lisp_Object num2) | 2292 | (register Lisp_Object num1, Lisp_Object num2) |
| @@ -2292,7 +2294,7 @@ Both must be numbers or markers. */) | |||
| 2292 | return arithcompare (num1, num2, less_or_equal); | 2294 | return arithcompare (num1, num2, less_or_equal); |
| 2293 | } | 2295 | } |
| 2294 | 2296 | ||
| 2295 | DEFUN (">=", Fgeq, Sgeq, 2, 2, 0, | 2297 | DEFUE (">=", Fgeq, Sgeq, 2, 2, 0, |
| 2296 | doc: /* Return t if first arg is greater than or equal to second arg. | 2298 | doc: /* Return t if first arg is greater than or equal to second arg. |
| 2297 | Both must be numbers or markers. */) | 2299 | Both must be numbers or markers. */) |
| 2298 | (register Lisp_Object num1, Lisp_Object num2) | 2300 | (register Lisp_Object num1, Lisp_Object num2) |
| @@ -2307,7 +2309,7 @@ DEFUN ("/=", Fneq, Sneq, 2, 2, 0, | |||
| 2307 | return arithcompare (num1, num2, notequal); | 2309 | return arithcompare (num1, num2, notequal); |
| 2308 | } | 2310 | } |
| 2309 | 2311 | ||
| 2310 | DEFUN ("zerop", Fzerop, Szerop, 1, 1, 0, | 2312 | DEFUE ("zerop", Fzerop, Szerop, 1, 1, 0, |
| 2311 | doc: /* Return t if NUMBER is zero. */) | 2313 | doc: /* Return t if NUMBER is zero. */) |
| 2312 | (register Lisp_Object number) | 2314 | (register Lisp_Object number) |
| 2313 | { | 2315 | { |
| @@ -2354,7 +2356,7 @@ cons_to_long (Lisp_Object c) | |||
| 2354 | return ((XINT (top) << 16) | XINT (bot)); | 2356 | return ((XINT (top) << 16) | XINT (bot)); |
| 2355 | } | 2357 | } |
| 2356 | 2358 | ||
| 2357 | DEFUN ("number-to-string", Fnumber_to_string, Snumber_to_string, 1, 1, 0, | 2359 | DEFUE ("number-to-string", Fnumber_to_string, Snumber_to_string, 1, 1, 0, |
| 2358 | doc: /* Return the decimal representation of NUMBER as a string. | 2360 | doc: /* Return the decimal representation of NUMBER as a string. |
| 2359 | Uses a minus sign if negative. | 2361 | Uses a minus sign if negative. |
| 2360 | NUMBER may be an integer or a floating point number. */) | 2362 | NUMBER may be an integer or a floating point number. */) |
| @@ -2401,7 +2403,7 @@ digit_to_number (int character, int base) | |||
| 2401 | return digit; | 2403 | return digit; |
| 2402 | } | 2404 | } |
| 2403 | 2405 | ||
| 2404 | DEFUN ("string-to-number", Fstring_to_number, Sstring_to_number, 1, 2, 0, | 2406 | DEFUE ("string-to-number", Fstring_to_number, Sstring_to_number, 1, 2, 0, |
| 2405 | doc: /* Parse STRING as a decimal number and return the number. | 2407 | doc: /* Parse STRING as a decimal number and return the number. |
| 2406 | This parses both integers and floating point numbers. | 2408 | This parses both integers and floating point numbers. |
| 2407 | It ignores leading spaces and tabs, and all trailing chars. | 2409 | It ignores leading spaces and tabs, and all trailing chars. |
| @@ -2624,7 +2626,7 @@ float_arith_driver (double accum, register size_t argnum, enum arithop code, | |||
| 2624 | } | 2626 | } |
| 2625 | 2627 | ||
| 2626 | 2628 | ||
| 2627 | DEFUN ("+", Fplus, Splus, 0, MANY, 0, | 2629 | DEFUE ("+", Fplus, Splus, 0, MANY, 0, |
| 2628 | doc: /* Return sum of any number of arguments, which are numbers or markers. | 2630 | doc: /* Return sum of any number of arguments, which are numbers or markers. |
| 2629 | usage: (+ &rest NUMBERS-OR-MARKERS) */) | 2631 | usage: (+ &rest NUMBERS-OR-MARKERS) */) |
| 2630 | (size_t nargs, Lisp_Object *args) | 2632 | (size_t nargs, Lisp_Object *args) |
| @@ -2632,7 +2634,7 @@ usage: (+ &rest NUMBERS-OR-MARKERS) */) | |||
| 2632 | return arith_driver (Aadd, nargs, args); | 2634 | return arith_driver (Aadd, nargs, args); |
| 2633 | } | 2635 | } |
| 2634 | 2636 | ||
| 2635 | DEFUN ("-", Fminus, Sminus, 0, MANY, 0, | 2637 | DEFUE ("-", Fminus, Sminus, 0, MANY, 0, |
| 2636 | doc: /* Negate number or subtract numbers or markers and return the result. | 2638 | doc: /* Negate number or subtract numbers or markers and return the result. |
| 2637 | With one arg, negates it. With more than one arg, | 2639 | With one arg, negates it. With more than one arg, |
| 2638 | subtracts all but the first from the first. | 2640 | subtracts all but the first from the first. |
| @@ -2642,7 +2644,7 @@ usage: (- &optional NUMBER-OR-MARKER &rest MORE-NUMBERS-OR-MARKERS) */) | |||
| 2642 | return arith_driver (Asub, nargs, args); | 2644 | return arith_driver (Asub, nargs, args); |
| 2643 | } | 2645 | } |
| 2644 | 2646 | ||
| 2645 | DEFUN ("*", Ftimes, Stimes, 0, MANY, 0, | 2647 | DEFUE ("*", Ftimes, Stimes, 0, MANY, 0, |
| 2646 | doc: /* Return product of any number of arguments, which are numbers or markers. | 2648 | doc: /* Return product of any number of arguments, which are numbers or markers. |
| 2647 | usage: (* &rest NUMBERS-OR-MARKERS) */) | 2649 | usage: (* &rest NUMBERS-OR-MARKERS) */) |
| 2648 | (size_t nargs, Lisp_Object *args) | 2650 | (size_t nargs, Lisp_Object *args) |
| @@ -2650,7 +2652,7 @@ usage: (* &rest NUMBERS-OR-MARKERS) */) | |||
| 2650 | return arith_driver (Amult, nargs, args); | 2652 | return arith_driver (Amult, nargs, args); |
| 2651 | } | 2653 | } |
| 2652 | 2654 | ||
| 2653 | DEFUN ("/", Fquo, Squo, 2, MANY, 0, | 2655 | DEFUE ("/", Fquo, Squo, 2, MANY, 0, |
| 2654 | doc: /* Return first argument divided by all the remaining arguments. | 2656 | doc: /* Return first argument divided by all the remaining arguments. |
| 2655 | The arguments must be numbers or markers. | 2657 | The arguments must be numbers or markers. |
| 2656 | usage: (/ DIVIDEND DIVISOR &rest DIVISORS) */) | 2658 | usage: (/ DIVIDEND DIVISOR &rest DIVISORS) */) |
| @@ -2663,7 +2665,7 @@ usage: (/ DIVIDEND DIVISOR &rest DIVISORS) */) | |||
| 2663 | return arith_driver (Adiv, nargs, args); | 2665 | return arith_driver (Adiv, nargs, args); |
| 2664 | } | 2666 | } |
| 2665 | 2667 | ||
| 2666 | DEFUN ("%", Frem, Srem, 2, 2, 0, | 2668 | DEFUE ("%", Frem, Srem, 2, 2, 0, |
| 2667 | doc: /* Return remainder of X divided by Y. | 2669 | doc: /* Return remainder of X divided by Y. |
| 2668 | Both must be integers or markers. */) | 2670 | Both must be integers or markers. */) |
| 2669 | (register Lisp_Object x, Lisp_Object y) | 2671 | (register Lisp_Object x, Lisp_Object y) |
| @@ -2734,7 +2736,7 @@ Both X and Y must be numbers or markers. */) | |||
| 2734 | return val; | 2736 | return val; |
| 2735 | } | 2737 | } |
| 2736 | 2738 | ||
| 2737 | DEFUN ("max", Fmax, Smax, 1, MANY, 0, | 2739 | DEFUE ("max", Fmax, Smax, 1, MANY, 0, |
| 2738 | doc: /* Return largest of all the arguments (which must be numbers or markers). | 2740 | doc: /* Return largest of all the arguments (which must be numbers or markers). |
| 2739 | The value is always a number; markers are converted to numbers. | 2741 | The value is always a number; markers are converted to numbers. |
| 2740 | usage: (max NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS) */) | 2742 | usage: (max NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS) */) |
| @@ -2743,7 +2745,7 @@ usage: (max NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS) */) | |||
| 2743 | return arith_driver (Amax, nargs, args); | 2745 | return arith_driver (Amax, nargs, args); |
| 2744 | } | 2746 | } |
| 2745 | 2747 | ||
| 2746 | DEFUN ("min", Fmin, Smin, 1, MANY, 0, | 2748 | DEFUE ("min", Fmin, Smin, 1, MANY, 0, |
| 2747 | doc: /* Return smallest of all the arguments (which must be numbers or markers). | 2749 | doc: /* Return smallest of all the arguments (which must be numbers or markers). |
| 2748 | The value is always a number; markers are converted to numbers. | 2750 | The value is always a number; markers are converted to numbers. |
| 2749 | usage: (min NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS) */) | 2751 | usage: (min NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS) */) |
| @@ -2823,7 +2825,7 @@ In this case, zeros are shifted in on the left. */) | |||
| 2823 | return val; | 2825 | return val; |
| 2824 | } | 2826 | } |
| 2825 | 2827 | ||
| 2826 | DEFUN ("1+", Fadd1, Sadd1, 1, 1, 0, | 2828 | DEFUE ("1+", Fadd1, Sadd1, 1, 1, 0, |
| 2827 | doc: /* Return NUMBER plus one. NUMBER may be a number or a marker. | 2829 | doc: /* Return NUMBER plus one. NUMBER may be a number or a marker. |
| 2828 | Markers are converted to integers. */) | 2830 | Markers are converted to integers. */) |
| 2829 | (register Lisp_Object number) | 2831 | (register Lisp_Object number) |
| @@ -2837,7 +2839,7 @@ Markers are converted to integers. */) | |||
| 2837 | return number; | 2839 | return number; |
| 2838 | } | 2840 | } |
| 2839 | 2841 | ||
| 2840 | DEFUN ("1-", Fsub1, Ssub1, 1, 1, 0, | 2842 | DEFUE ("1-", Fsub1, Ssub1, 1, 1, 0, |
| 2841 | doc: /* Return NUMBER minus one. NUMBER may be a number or a marker. | 2843 | doc: /* Return NUMBER minus one. NUMBER may be a number or a marker. |
| 2842 | Markers are converted to integers. */) | 2844 | Markers are converted to integers. */) |
| 2843 | (register Lisp_Object number) | 2845 | (register Lisp_Object number) |
| @@ -2860,7 +2862,7 @@ DEFUN ("lognot", Flognot, Slognot, 1, 1, 0, | |||
| 2860 | return number; | 2862 | return number; |
| 2861 | } | 2863 | } |
| 2862 | 2864 | ||
| 2863 | DEFUN ("byteorder", Fbyteorder, Sbyteorder, 0, 0, 0, | 2865 | DEFUE ("byteorder", Fbyteorder, Sbyteorder, 0, 0, 0, |
| 2864 | doc: /* Return the byteorder for the machine. | 2866 | doc: /* Return the byteorder for the machine. |
| 2865 | Returns 66 (ASCII uppercase B) for big endian machines or 108 (ASCII | 2867 | Returns 66 (ASCII uppercase B) for big endian machines or 108 (ASCII |
| 2866 | lowercase l) for small endian machines. */) | 2868 | lowercase l) for small endian machines. */) |