From 785bbd422461295890087ced24bfd87504032d0c Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 10 Apr 2011 11:02:59 -0700 Subject: * editfns.c (Fformat): Remove unreachable code. 2011-04-10 Paul Eggert --- src/ChangeLog | 4 ++++ src/editfns.c | 8 +------- 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 6d300875518..58df7e08955 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2011-04-10 Paul Eggert + + * editfns.c (Fformat): Remove unreachable code. + 2011-04-10 Paul Eggert Fix more problems found by GCC 4.6.0's static checks. diff --git a/src/editfns.c b/src/editfns.c index e754a074ba8..85b30de6975 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -3802,7 +3802,7 @@ usage: (format STRING &rest OBJECTS) */) if (*format == 'c') { if (! ASCII_CHAR_P (XINT (args[n])) - /* Note: No one can remeber why we have to treat + /* Note: No one can remember why we have to treat the character 0 as a multibyte character here. But, until it causes a real problem, let's don't change it. */ @@ -3816,12 +3816,6 @@ usage: (format STRING &rest OBJECTS) */) args[n] = Fchar_to_string (args[n]); thissize = SBYTES (args[n]); } - else if (! ASCII_BYTE_P (XINT (args[n])) && multibyte) - { - args[n] - = Fchar_to_string (Funibyte_char_to_multibyte (args[n])); - thissize = SBYTES (args[n]); - } } } else if (FLOATP (args[n]) && *format != 's') -- cgit v1.2.1 From 16a97296c05ec9d5bb4ffeae9dce90fc63f578ed Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 10 Apr 2011 18:41:15 -0700 Subject: 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. --- src/ChangeLog | 59 +++++++++++++++++++++++++++++++++++++ src/alloc.c | 26 ++++++++--------- src/buffer.c | 53 +++++++++++++++++----------------- src/buffer.h | 1 - src/callint.c | 2 +- src/callproc.c | 4 +-- src/casefiddle.c | 10 +++---- src/casetab.c | 5 ++-- src/ccl.c | 2 +- src/character.c | 4 +-- src/chartab.c | 12 ++++---- src/cmds.c | 6 ++-- src/coding.c | 16 +++++------ src/composite.c | 2 +- src/composite.h | 2 -- src/data.c | 88 +++++++++++++++++++++++++++++--------------------------- src/dired.c | 1 + src/dispnew.c | 10 +++---- src/doc.c | 5 ++-- src/editfns.c | 62 +++++++++++++++++++-------------------- src/emacs.c | 2 +- src/eval.c | 27 +++++++++-------- src/fileio.c | 37 +++++++++++++----------- src/filelock.c | 2 +- src/floatfns.c | 4 +-- src/fns.c | 88 ++++++++++++++++++++++++++++---------------------------- src/font.c | 18 ++++++------ src/fontset.c | 4 +-- src/frame.c | 26 ++++++++--------- src/image.c | 7 +++-- src/indent.c | 6 ++-- src/insdel.c | 2 +- src/intervals.h | 2 +- src/keyboard.c | 21 +++++++------- src/keymap.c | 23 ++++++++------- src/keymap.h | 2 -- src/lisp.h | 26 +++++++---------- src/lread.c | 18 ++++++------ src/macros.c | 5 ++-- src/marker.c | 8 +++--- src/menu.c | 2 +- src/minibuf.c | 17 +++++------ src/print.c | 12 ++++---- src/process.c | 13 +++++---- src/search.c | 10 +++---- src/syntax.c | 9 +++--- src/term.c | 2 +- src/terminal.c | 4 +-- src/textprop.c | 35 +++++++++++----------- src/undo.c | 3 +- src/window.c | 41 ++++++++++++++------------ src/window.h | 2 -- src/xdisp.c | 12 ++++---- src/xfaces.c | 8 +++--- src/xfns.c | 8 +++--- src/xmenu.c | 2 +- src/xsettings.c | 4 +-- 57 files changed, 471 insertions(+), 411 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 58df7e08955..56bb83e0314 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,62 @@ +2011-04-11 Paul Eggert + + 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. + 2011-04-10 Paul Eggert * editfns.c (Fformat): Remove unreachable code. diff --git a/src/alloc.c b/src/alloc.c index 54c4760abab..1396586ba3e 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -2174,7 +2174,7 @@ compact_small_strings (void) } -DEFUN ("make-string", Fmake_string, Smake_string, 2, 2, 0, +DEFUE ("make-string", Fmake_string, Smake_string, 2, 2, 0, doc: /* Return a newly created string of length LENGTH, with INIT in each element. LENGTH must be an integer. INIT must be an integer that represents a character. */) @@ -2222,7 +2222,7 @@ INIT must be an integer that represents a character. */) } -DEFUN ("make-bool-vector", Fmake_bool_vector, Smake_bool_vector, 2, 2, 0, +DEFUE ("make-bool-vector", Fmake_bool_vector, Smake_bool_vector, 2, 2, 0, doc: /* Return a new bool-vector of length LENGTH, using INIT for each element. LENGTH must be a number. INIT matters only in whether it is t or nil. */) (Lisp_Object length, Lisp_Object init) @@ -2610,7 +2610,7 @@ free_cons (struct Lisp_Cons *ptr) cons_free_list = ptr; } -DEFUN ("cons", Fcons, Scons, 2, 2, 0, +DEFUE ("cons", Fcons, Scons, 2, 2, 0, doc: /* Create a new cons, give it CAR and CDR as components, and return it. */) (Lisp_Object car, Lisp_Object cdr) { @@ -2703,7 +2703,7 @@ list5 (Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3, Lisp_Object arg4, L } -DEFUN ("list", Flist, Slist, 0, MANY, 0, +DEFUE ("list", Flist, Slist, 0, MANY, 0, doc: /* Return a newly created list with specified arguments as elements. Any number of arguments, even zero arguments, are allowed. usage: (list &rest OBJECTS) */) @@ -2721,7 +2721,7 @@ usage: (list &rest OBJECTS) */) } -DEFUN ("make-list", Fmake_list, Smake_list, 2, 2, 0, +DEFUE ("make-list", Fmake_list, Smake_list, 2, 2, 0, doc: /* Return a newly created list of length LENGTH, with each element being INIT. */) (register Lisp_Object length, Lisp_Object init) { @@ -2897,7 +2897,7 @@ allocate_process (void) } -DEFUN ("make-vector", Fmake_vector, Smake_vector, 2, 2, 0, +DEFUE ("make-vector", Fmake_vector, Smake_vector, 2, 2, 0, doc: /* Return a newly created vector of length LENGTH, with each element being INIT. See also the function `vector'. */) (register Lisp_Object length, Lisp_Object init) @@ -2919,7 +2919,7 @@ See also the function `vector'. */) } -DEFUN ("vector", Fvector, Svector, 0, MANY, 0, +DEFUE ("vector", Fvector, Svector, 0, MANY, 0, doc: /* Return a newly created vector with specified arguments as elements. Any number of arguments, even zero arguments, are allowed. usage: (vector &rest OBJECTS) */) @@ -2938,7 +2938,7 @@ usage: (vector &rest OBJECTS) */) } -DEFUN ("make-byte-code", Fmake_byte_code, Smake_byte_code, 4, MANY, 0, +DEFUE ("make-byte-code", Fmake_byte_code, Smake_byte_code, 4, MANY, 0, doc: /* Create a byte-code object with specified arguments as elements. The arguments should be the ARGLIST, bytecode-string BYTE-CODE, constant vector CONSTANTS, maximum stack size DEPTH, (optional) DOCSTRING, @@ -3033,7 +3033,7 @@ init_symbol (void) } -DEFUN ("make-symbol", Fmake_symbol, Smake_symbol, 1, 1, 0, +DEFUE ("make-symbol", Fmake_symbol, Smake_symbol, 1, 1, 0, doc: /* Return a newly allocated uninterned symbol whose name is NAME. Its value and function definition are void, and its property list is nil. */) (Lisp_Object name) @@ -3196,7 +3196,7 @@ make_save_value (void *pointer, int integer) return val; } -DEFUN ("make-marker", Fmake_marker, Smake_marker, 0, 0, 0, +DEFUE ("make-marker", Fmake_marker, Smake_marker, 0, 0, 0, doc: /* Return a newly allocated marker which does not point at any place. */) (void) { @@ -3925,7 +3925,7 @@ static int max_live, max_zombies; static double avg_live; -DEFUN ("gc-status", Fgc_status, Sgc_status, 0, 0, "", +DEFUE ("gc-status", Fgc_status, Sgc_status, 0, 0, "", doc: /* Show information about live and zombie objects. */) (void) { @@ -4740,7 +4740,7 @@ make_pure_vector (EMACS_INT len) } -DEFUN ("purecopy", Fpurecopy, Spurecopy, 1, 1, 0, +DEFUE ("purecopy", Fpurecopy, Spurecopy, 1, 1, 0, doc: /* Make a copy of object OBJ in pure storage. Recursively copies contents of vectors and cons cells. Does not copy symbols. Copies strings without text properties. */) @@ -4834,7 +4834,7 @@ inhibit_garbage_collection (void) } -DEFUN ("garbage-collect", Fgarbage_collect, Sgarbage_collect, 0, 0, "", +DEFUE ("garbage-collect", Fgarbage_collect, Sgarbage_collect, 0, 0, "", doc: /* Reclaim storage for Lisp objects no longer needed. Garbage collection happens automatically if you cons more than `gc-cons-threshold' bytes of Lisp data since previous garbage collection. diff --git a/src/buffer.c b/src/buffer.c index a0054e32d0a..a88afbb36e6 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -100,6 +100,8 @@ static char buffer_permanent_local_flags[MAX_PER_BUFFER_VARS]; int last_per_buffer_idx; +INFUN (Fset_buffer_major_mode, 1); +INFUN (Fdelete_overlay, 1); static void call_overlay_mod_hooks (Lisp_Object list, Lisp_Object overlay, int after, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3); @@ -157,7 +159,7 @@ nsberror (Lisp_Object spec) error ("Invalid buffer argument"); } -DEFUN ("buffer-live-p", Fbuffer_live_p, Sbuffer_live_p, 1, 1, 0, +DEFUE ("buffer-live-p", Fbuffer_live_p, Sbuffer_live_p, 1, 1, 0, doc: /* Return non-nil if OBJECT is a buffer which has not been killed. Value is nil if OBJECT is not a buffer or if it has been killed. */) (Lisp_Object object) @@ -229,7 +231,7 @@ assoc_ignore_text_properties (register Lisp_Object key, Lisp_Object list) return Qnil; } -DEFUN ("get-buffer", Fget_buffer, Sget_buffer, 1, 1, 0, +DEFUE ("get-buffer", Fget_buffer, Sget_buffer, 1, 1, 0, doc: /* Return the buffer named BUFFER-OR-NAME. BUFFER-OR-NAME must be either a string or a buffer. If BUFFER-OR-NAME is a string and there is no buffer with that name, return nil. If @@ -294,7 +296,7 @@ get_truename_buffer (register Lisp_Object filename) /* Incremented for each buffer created, to assign the buffer number. */ int buffer_count; -DEFUN ("get-buffer-create", Fget_buffer_create, Sget_buffer_create, 1, 1, 0, +DEFUE ("get-buffer-create", Fget_buffer_create, Sget_buffer_create, 1, 1, 0, doc: /* Return the buffer specified by BUFFER-OR-NAME, creating a new one if needed. If BUFFER-OR-NAME is a string and a live buffer with that name exists, return that buffer. If no such buffer exists, create a new buffer with @@ -830,8 +832,8 @@ reset_buffer_local_variables (register struct buffer *b, int permanent_too) and set-visited-file-name ought to be able to use this to really rename the buffer properly. */ -DEFUN ("generate-new-buffer-name", Fgenerate_new_buffer_name, Sgenerate_new_buffer_name, - 1, 2, 0, +DEFUE ("generate-new-buffer-name", Fgenerate_new_buffer_name, + Sgenerate_new_buffer_name, 1, 2, 0, doc: /* Return a string that is the name of no existing buffer based on NAME. If there is no live buffer named NAME, then return NAME. Otherwise modify name by appending `', incrementing NUMBER @@ -868,7 +870,7 @@ it is in the sequence to be tried) even if a buffer with that name exists. */) } -DEFUN ("buffer-name", Fbuffer_name, Sbuffer_name, 0, 1, 0, +DEFUE ("buffer-name", Fbuffer_name, Sbuffer_name, 0, 1, 0, doc: /* Return the name of BUFFER, as a string. BUFFER defaults to the current buffer. Return nil if BUFFER has been killed. */) @@ -880,7 +882,7 @@ Return nil if BUFFER has been killed. */) return BVAR (XBUFFER (buffer), name); } -DEFUN ("buffer-file-name", Fbuffer_file_name, Sbuffer_file_name, 0, 1, 0, +DEFUE ("buffer-file-name", Fbuffer_file_name, Sbuffer_file_name, 0, 1, 0, doc: /* Return name of file BUFFER is visiting, or nil if none. No argument or nil as argument means use the current buffer. */) (register Lisp_Object buffer) @@ -915,7 +917,7 @@ BUFFER defaults to the current buffer. */) return base_buffer; } -DEFUN ("buffer-local-value", Fbuffer_local_value, +DEFUE ("buffer-local-value", Fbuffer_local_value, Sbuffer_local_value, 2, 2, 0, doc: /* Return the value of VARIABLE in BUFFER. If VARIABLE does not have a buffer-local binding in BUFFER, the value @@ -1056,7 +1058,7 @@ No argument or nil as argument means use current buffer as BUFFER. */) return result; } -DEFUN ("buffer-modified-p", Fbuffer_modified_p, Sbuffer_modified_p, +DEFUE ("buffer-modified-p", Fbuffer_modified_p, Sbuffer_modified_p, 0, 1, 0, doc: /* Return t if BUFFER was modified since its file was last read or saved. No argument or nil as argument means use current buffer as BUFFER. */) @@ -1074,7 +1076,7 @@ No argument or nil as argument means use current buffer as BUFFER. */) return BUF_SAVE_MODIFF (buf) < BUF_MODIFF (buf) ? Qt : Qnil; } -DEFUN ("set-buffer-modified-p", Fset_buffer_modified_p, Sset_buffer_modified_p, +DEFUE ("set-buffer-modified-p", Fset_buffer_modified_p, Sset_buffer_modified_p, 1, 1, 0, doc: /* Mark current buffer as modified or unmodified according to FLAG. A non-nil FLAG means mark the buffer modified. */) @@ -1266,7 +1268,7 @@ This does not change the name of the visited file (if any). */) return BVAR (current_buffer, name); } -DEFUN ("other-buffer", Fother_buffer, Sother_buffer, 0, 3, 0, +DEFUE ("other-buffer", Fother_buffer, Sother_buffer, 0, 3, 0, doc: /* Return most recently selected buffer other than BUFFER. Buffers not visible in windows are preferred to visible buffers, unless optional second argument VISIBLE-OK is non-nil. @@ -1276,7 +1278,6 @@ If no other buffer exists, the buffer `*scratch*' is returned. If BUFFER is omitted or nil, some interesting buffer is returned. */) (register Lisp_Object buffer, Lisp_Object visible_ok, Lisp_Object frame) { - Lisp_Object Fset_buffer_major_mode (Lisp_Object buffer); register Lisp_Object tail, buf, notsogood, tem, pred, add_ons; notsogood = Qnil; @@ -1341,7 +1342,7 @@ If BUFFER is omitted or nil, some interesting buffer is returned. */) return buf; } -DEFUN ("buffer-enable-undo", Fbuffer_enable_undo, Sbuffer_enable_undo, +DEFUE ("buffer-enable-undo", Fbuffer_enable_undo, Sbuffer_enable_undo, 0, 1, "", doc: /* Start keeping undo information for buffer BUFFER. No argument or nil as argument means do this for the current buffer. */) @@ -1370,7 +1371,7 @@ Hook to be run (by `run-hooks', which see) when a buffer is killed.\n\ The buffer being killed will be current while the hook is running.\n\ See `kill-buffer'." */ -DEFUN ("kill-buffer", Fkill_buffer, Skill_buffer, 0, 1, "bKill buffer: ", +DEFUE ("kill-buffer", Fkill_buffer, Skill_buffer, 0, 1, "bKill buffer: ", doc: /* Kill buffer BUFFER-OR-NAME. The argument may be a buffer or the name of an existing buffer. Argument nil or omitted means kill the current buffer. Return t if the @@ -1789,7 +1790,7 @@ messing with the window-buffer correspondences. */) return switch_to_buffer_1 (buffer_or_name, norecord); } -DEFUN ("current-buffer", Fcurrent_buffer, Scurrent_buffer, 0, 0, 0, +DEFUE ("current-buffer", Fcurrent_buffer, Scurrent_buffer, 0, 0, 0, doc: /* Return the current buffer as a Lisp object. */) (void) { @@ -1899,7 +1900,7 @@ set_buffer_temp (struct buffer *b) fetch_buffer_markers (b); } -DEFUN ("set-buffer", Fset_buffer, Sset_buffer, 1, 1, 0, +DEFUE ("set-buffer", Fset_buffer, Sset_buffer, 1, 1, 0, doc: /* Make buffer BUFFER-OR-NAME current for editing operations. BUFFER-OR-NAME may be a buffer or the name of an existing buffer. See also `save-excursion' when you want to make a buffer current @@ -1928,7 +1929,7 @@ set_buffer_if_live (Lisp_Object buffer) return Qnil; } -DEFUN ("barf-if-buffer-read-only", Fbarf_if_buffer_read_only, +DEFUE ("barf-if-buffer-read-only", Fbarf_if_buffer_read_only, Sbarf_if_buffer_read_only, 0, 0, 0, doc: /* Signal a `buffer-read-only' error if the current buffer is read-only. */) (void) @@ -2001,7 +2002,7 @@ its frame, iconify that frame. */) return Qnil; } -DEFUN ("erase-buffer", Ferase_buffer, Serase_buffer, 0, 0, "*", +DEFUE ("erase-buffer", Ferase_buffer, Serase_buffer, 0, 0, "*", doc: /* Delete the entire contents of the current buffer. Any narrowing restriction in effect (see `narrow-to-region') is removed, so the buffer is truly empty after this. */) @@ -2212,7 +2213,7 @@ DEFUN ("buffer-swap-text", Fbuffer_swap_text, Sbuffer_swap_text, return Qnil; } -DEFUN ("set-buffer-multibyte", Fset_buffer_multibyte, Sset_buffer_multibyte, +DEFUE ("set-buffer-multibyte", Fset_buffer_multibyte, Sset_buffer_multibyte, 1, 1, 0, doc: /* Set the multibyte flag of the current buffer to FLAG. If FLAG is t, this makes the buffer a multibyte buffer. @@ -2501,8 +2502,8 @@ current buffer is cleared. */) return flag; } -DEFUN ("kill-all-local-variables", Fkill_all_local_variables, Skill_all_local_variables, - 0, 0, 0, +DEFUE ("kill-all-local-variables", Fkill_all_local_variables, + Skill_all_local_variables, 0, 0, 0, doc: /* Switch to Fundamental mode by killing current buffer's local variables. Most local variable bindings are eliminated so that the default values become effective once more. Also, the syntax table is set from @@ -3900,7 +3901,7 @@ DEFUN ("delete-overlay", Fdelete_overlay, Sdelete_overlay, 1, 1, 0, /* Overlay dissection functions. */ -DEFUN ("overlay-start", Foverlay_start, Soverlay_start, 1, 1, 0, +DEFUE ("overlay-start", Foverlay_start, Soverlay_start, 1, 1, 0, doc: /* Return the position at which OVERLAY starts. */) (Lisp_Object overlay) { @@ -3909,7 +3910,7 @@ DEFUN ("overlay-start", Foverlay_start, Soverlay_start, 1, 1, 0, return (Fmarker_position (OVERLAY_START (overlay))); } -DEFUN ("overlay-end", Foverlay_end, Soverlay_end, 1, 1, 0, +DEFUE ("overlay-end", Foverlay_end, Soverlay_end, 1, 1, 0, doc: /* Return the position at which OVERLAY ends. */) (Lisp_Object overlay) { @@ -3999,7 +4000,7 @@ end of the buffer. */) return result; } -DEFUN ("next-overlay-change", Fnext_overlay_change, Snext_overlay_change, +DEFUE ("next-overlay-change", Fnext_overlay_change, Snext_overlay_change, 1, 1, 0, doc: /* Return the next position after POS where an overlay starts or ends. If there are no overlay boundaries from POS to (point-max), @@ -4040,7 +4041,7 @@ the value is (point-max). */) return make_number (endpos); } -DEFUN ("previous-overlay-change", Fprevious_overlay_change, +DEFUE ("previous-overlay-change", Fprevious_overlay_change, Sprevious_overlay_change, 1, 1, 0, doc: /* Return the previous position before POS where an overlay starts or ends. If there are no overlay boundaries from (point-min) to POS, @@ -4109,7 +4110,7 @@ for positions far away from POS). */) return Qnil; } -DEFUN ("overlay-get", Foverlay_get, Soverlay_get, 2, 2, 0, +DEFUE ("overlay-get", Foverlay_get, Soverlay_get, 2, 2, 0, doc: /* Get the property of overlay OVERLAY with property name PROP. */) (Lisp_Object overlay, Lisp_Object prop) { diff --git a/src/buffer.h b/src/buffer.h index d80875a0811..2963aa382ca 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -917,7 +917,6 @@ extern void mmap_set_vars (int); EXFUN (Fbuffer_live_p, 1); EXFUN (Fbuffer_name, 1); EXFUN (Fnext_overlay_change, 1); -EXFUN (Fdelete_overlay, 1); EXFUN (Fbuffer_local_value, 2); extern Lisp_Object Qbefore_change_functions; diff --git a/src/callint.c b/src/callint.c index 047fbcdb467..1de1f607878 100644 --- a/src/callint.c +++ b/src/callint.c @@ -851,7 +851,7 @@ invoke it. If KEYS is omitted or nil, the return value of } } -DEFUN ("prefix-numeric-value", Fprefix_numeric_value, Sprefix_numeric_value, +DEFUE ("prefix-numeric-value", Fprefix_numeric_value, Sprefix_numeric_value, 1, 1, 0, doc: /* Return numeric meaning of raw prefix argument RAW. A raw prefix argument is what you get from `(interactive "P")'. diff --git a/src/callproc.c b/src/callproc.c index eb2a2268fe1..ec6afcde3a3 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -96,7 +96,7 @@ int synch_process_retcode; /* Nonzero if this is termination due to exit. */ static int call_process_exited; -EXFUN (Fgetenv_internal, 2); +INFUN (Fgetenv_internal, 2); static Lisp_Object call_process_kill (Lisp_Object fdpid) @@ -152,7 +152,7 @@ call_process_cleanup (Lisp_Object arg) return Qnil; } -DEFUN ("call-process", Fcall_process, Scall_process, 1, MANY, 0, +DEFUE ("call-process", Fcall_process, Scall_process, 1, MANY, 0, doc: /* Call PROGRAM synchronously in separate process. The remaining arguments are optional. The program's input comes from file INFILE (nil means `/dev/null'). diff --git a/src/casefiddle.c b/src/casefiddle.c index 9f286d73a5e..7a220c81865 100644 --- a/src/casefiddle.c +++ b/src/casefiddle.c @@ -148,7 +148,7 @@ casify_object (enum case_action flag, Lisp_Object obj) } } -DEFUN ("upcase", Fupcase, Supcase, 1, 1, 0, +DEFUE ("upcase", Fupcase, Supcase, 1, 1, 0, doc: /* Convert argument to upper case and return that. The argument may be a character or string. The result has the same type. The argument object is not altered--the value is a copy. @@ -158,7 +158,7 @@ See also `capitalize', `downcase' and `upcase-initials'. */) return casify_object (CASE_UP, obj); } -DEFUN ("downcase", Fdowncase, Sdowncase, 1, 1, 0, +DEFUE ("downcase", Fdowncase, Sdowncase, 1, 1, 0, doc: /* Convert argument to lower case and return that. The argument may be a character or string. The result has the same type. The argument object is not altered--the value is a copy. */) @@ -180,7 +180,7 @@ The argument object is not altered--the value is a copy. */) /* Like Fcapitalize but change only the initials. */ -DEFUN ("upcase-initials", Fupcase_initials, Supcase_initials, 1, 1, 0, +DEFUE ("upcase-initials", Fupcase_initials, Supcase_initials, 1, 1, 0, doc: /* Convert the initial of each word in the argument to upper case. Do not change the other letters of each word. The argument may be a character or string. The result has the same type. @@ -301,7 +301,7 @@ casify_region (enum case_action flag, Lisp_Object b, Lisp_Object e) } } -DEFUN ("upcase-region", Fupcase_region, Supcase_region, 2, 2, "r", +DEFUE ("upcase-region", Fupcase_region, Supcase_region, 2, 2, "r", doc: /* Convert the region to upper case. In programs, wants two arguments. These arguments specify the starting and ending character numbers of the region to operate on. When used as a command, the text between @@ -338,7 +338,7 @@ character positions to operate on. */) /* Like Fcapitalize_region but change only the initials. */ -DEFUN ("upcase-initials-region", Fupcase_initials_region, +DEFUE ("upcase-initials-region", Fupcase_initials_region, Supcase_initials_region, 2, 2, "r", doc: /* Upcase the initial of each word in the region. Subsequent letters of each word are not changed. diff --git a/src/casetab.c b/src/casetab.c index 9a1accf6940..7acefbceba9 100644 --- a/src/casetab.c +++ b/src/casetab.c @@ -79,7 +79,7 @@ This is the one used for new buffers. */) static Lisp_Object set_case_table (Lisp_Object table, int standard); -DEFUN ("set-case-table", Fset_case_table, Sset_case_table, 1, 1, 0, +DEFUE ("set-case-table", Fset_case_table, Sset_case_table, 1, 1, 0, doc: /* Select a new case table for the current buffer. A case table is a char-table which maps characters to their lower-case equivalents. It also has three \"extra\" slots @@ -101,7 +101,8 @@ EQUIVALENCES is a map that cyclicly permutes each equivalence class return set_case_table (table, 0); } -DEFUN ("set-standard-case-table", Fset_standard_case_table, Sset_standard_case_table, 1, 1, 0, +DEFUE ("set-standard-case-table", Fset_standard_case_table, + Sset_standard_case_table, 1, 1, 0, doc: /* Select a new standard case table for new buffers. See `set-case-table' for more info on case tables. */) (Lisp_Object table) diff --git a/src/ccl.c b/src/ccl.c index 39b9bc32f09..2f7c4b07319 100644 --- a/src/ccl.c +++ b/src/ccl.c @@ -1953,7 +1953,7 @@ check_ccl_update (struct ccl_program *ccl) } -DEFUN ("ccl-program-p", Fccl_program_p, Sccl_program_p, 1, 1, 0, +DEFUE ("ccl-program-p", Fccl_program_p, Sccl_program_p, 1, 1, 0, doc: /* Return t if OBJECT is a CCL program name or a compiled CCL program code. See the documentation of `define-ccl-program' for the detail of CCL program. */) (Lisp_Object object) diff --git a/src/character.c b/src/character.c index bac9f6af81e..636601c7452 100644 --- a/src/character.c +++ b/src/character.c @@ -307,7 +307,7 @@ If the multibyte character does not represent a byte, return -1. */) } } -DEFUN ("char-width", Fchar_width, Schar_width, 1, 1, 0, +DEFUE ("char-width", Fchar_width, Schar_width, 1, 1, 0, doc: /* Return width of CHAR when displayed in the current buffer. The width is measured by how many columns it occupies on the screen. Tab is taken to occupy `tab-width' columns. @@ -886,7 +886,7 @@ string_escape_byte8 (Lisp_Object string) } -DEFUN ("string", Fstring, Sstring, 0, MANY, 0, +DEFUE ("string", Fstring, Sstring, 0, MANY, 0, doc: /* Concatenate all the argument characters and make the result a string. usage: (string &rest CHARACTERS) */) diff --git a/src/chartab.c b/src/chartab.c index 7a0a3aabbb6..50c3fd7cb73 100644 --- a/src/chartab.c +++ b/src/chartab.c @@ -54,7 +54,7 @@ const int chartab_bits[4] = (((c) - (min_char)) >> chartab_bits[(depth)]) -DEFUN ("make-char-table", Fmake_char_table, Smake_char_table, 1, 2, 0, +DEFUE ("make-char-table", Fmake_char_table, Smake_char_table, 1, 2, 0, doc: /* Return a newly created char-table, with purpose PURPOSE. Each element is initialized to INIT, which defaults to nil. @@ -459,7 +459,7 @@ then the actual applicable value is inherited from the parent char-table return XCHAR_TABLE (char_table)->parent; } -DEFUN ("set-char-table-parent", Fset_char_table_parent, Sset_char_table_parent, +DEFUE ("set-char-table-parent", Fset_char_table_parent, Sset_char_table_parent, 2, 2, 0, doc: /* Set the parent char-table of CHAR-TABLE to PARENT. Return PARENT. PARENT must be either nil or another char-table. */) @@ -483,7 +483,7 @@ Return PARENT. PARENT must be either nil or another char-table. */) return parent; } -DEFUN ("char-table-extra-slot", Fchar_table_extra_slot, Schar_table_extra_slot, +DEFUE ("char-table-extra-slot", Fchar_table_extra_slot, Schar_table_extra_slot, 2, 2, 0, doc: /* Return the value of CHAR-TABLE's extra-slot number N. */) (Lisp_Object char_table, Lisp_Object n) @@ -497,7 +497,7 @@ DEFUN ("char-table-extra-slot", Fchar_table_extra_slot, Schar_table_extra_slot, return XCHAR_TABLE (char_table)->extras[XINT (n)]; } -DEFUN ("set-char-table-extra-slot", Fset_char_table_extra_slot, +DEFUE ("set-char-table-extra-slot", Fset_char_table_extra_slot, Sset_char_table_extra_slot, 3, 3, 0, doc: /* Set CHAR-TABLE's extra-slot number N to VALUE. */) @@ -541,7 +541,7 @@ a cons of character codes (for characters in the range), or a character code. * return val; } -DEFUN ("set-char-table-range", Fset_char_table_range, Sset_char_table_range, +DEFUE ("set-char-table-range", Fset_char_table_range, Sset_char_table_range, 3, 3, 0, doc: /* Set the value in CHAR-TABLE for a range of characters RANGE to VALUE. RANGE should be t (for all characters), nil (for the default value), @@ -626,7 +626,7 @@ optimize_sub_char_table (Lisp_Object table, Lisp_Object test) return (optimizable ? elt : table); } -DEFUN ("optimize-char-table", Foptimize_char_table, Soptimize_char_table, +DEFUE ("optimize-char-table", Foptimize_char_table, Soptimize_char_table, 1, 2, 0, doc: /* Optimize CHAR-TABLE. TEST is the comparison function used to decide whether two entries are diff --git a/src/cmds.c b/src/cmds.c index 1cf7ff24fec..60318225831 100644 --- a/src/cmds.c +++ b/src/cmds.c @@ -47,7 +47,7 @@ DEFUN ("forward-point", Fforward_point, Sforward_point, 1, 1, 0, return make_number (PT + XINT (n)); } -DEFUN ("forward-char", Fforward_char, Sforward_char, 0, 1, "^p", +DEFUE ("forward-char", Fforward_char, Sforward_char, 0, 1, "^p", doc: /* Move point N characters forward (backward if N is negative). On reaching end or beginning of buffer, stop and signal error. @@ -104,7 +104,7 @@ right or to the left on the screen. This is in contrast with return Fforward_char (n); } -DEFUN ("forward-line", Fforward_line, Sforward_line, 0, 1, "^p", +DEFUE ("forward-line", Fforward_line, Sforward_line, 0, 1, "^p", doc: /* Move N lines forward (backward if N is negative). Precisely, if point is on line I, move to the start of line I + N \("start of line" in the logical order). @@ -174,7 +174,7 @@ instead. For instance, `(forward-line 0)' does the same thing as return Qnil; } -DEFUN ("end-of-line", Fend_of_line, Send_of_line, 0, 1, "^p", +DEFUE ("end-of-line", Fend_of_line, Send_of_line, 0, 1, "^p", doc: /* Move point to end of current line (in the logical order). With argument N not nil or 1, move forward N - 1 lines first. If point reaches the beginning or end of buffer, it stops there. diff --git a/src/coding.c b/src/coding.c index 711ada59c85..13fcb7fb8a5 100644 --- a/src/coding.c +++ b/src/coding.c @@ -7991,7 +7991,7 @@ preferred_coding_system (void) #ifdef emacs /*** 8. Emacs Lisp library functions ***/ -DEFUN ("coding-system-p", Fcoding_system_p, Scoding_system_p, 1, 1, 0, +DEFUE ("coding-system-p", Fcoding_system_p, Scoding_system_p, 1, 1, 0, doc: /* Return t if OBJECT is nil or a coding-system. See the documentation of `define-coding-system' for information about coding-system objects. */) @@ -8006,7 +8006,7 @@ about coding-system objects. */) return Qt; } -DEFUN ("read-non-nil-coding-system", Fread_non_nil_coding_system, +DEFUE ("read-non-nil-coding-system", Fread_non_nil_coding_system, Sread_non_nil_coding_system, 1, 1, 0, doc: /* Read a coding system from the minibuffer, prompting with string PROMPT. */) (Lisp_Object prompt) @@ -8021,7 +8021,7 @@ DEFUN ("read-non-nil-coding-system", Fread_non_nil_coding_system, return (Fintern (val, Qnil)); } -DEFUN ("read-coding-system", Fread_coding_system, Sread_coding_system, 1, 2, 0, +DEFUE ("read-coding-system", Fread_coding_system, Sread_coding_system, 1, 2, 0, doc: /* Read a coding system from the minibuffer, prompting with string PROMPT. If the user enters null input, return second argument DEFAULT-CODING-SYSTEM. Ignores case when completing coding systems (all Emacs coding systems @@ -8041,7 +8041,7 @@ are lower-case). */) return (SCHARS (val) == 0 ? Qnil : Fintern (val, Qnil)); } -DEFUN ("check-coding-system", Fcheck_coding_system, Scheck_coding_system, +DEFUE ("check-coding-system", Fcheck_coding_system, Scheck_coding_system, 1, 1, 0, doc: /* Check validity of CODING-SYSTEM. If valid, return CODING-SYSTEM, else signal a `coding-system-error' error. @@ -8976,7 +8976,7 @@ code_convert_string_norecord (Lisp_Object string, Lisp_Object coding_system, } -DEFUN ("decode-coding-string", Fdecode_coding_string, Sdecode_coding_string, +DEFUE ("decode-coding-string", Fdecode_coding_string, Sdecode_coding_string, 2, 4, 0, doc: /* Decode STRING which is encoded in CODING-SYSTEM, and return the result. @@ -9250,7 +9250,7 @@ DEFUN ("keyboard-coding-system", } -DEFUN ("find-operation-coding-system", Ffind_operation_coding_system, +DEFUE ("find-operation-coding-system", Ffind_operation_coding_system, Sfind_operation_coding_system, 1, MANY, 0, doc: /* Choose a coding system for an operation based on the target name. The value names a pair of coding systems: (DECODING-SYSTEM . ENCODING-SYSTEM). @@ -10093,7 +10093,7 @@ DEFUN ("define-coding-system-alias", Fdefine_coding_system_alias, return Qnil; } -DEFUN ("coding-system-base", Fcoding_system_base, Scoding_system_base, +DEFUE ("coding-system-base", Fcoding_system_base, Scoding_system_base, 1, 1, 0, doc: /* Return the base of CODING-SYSTEM. Any alias or subsidiary coding system is not a base coding system. */) @@ -10136,7 +10136,7 @@ DEFUN ("coding-system-aliases", Fcoding_system_aliases, Scoding_system_aliases, return AREF (spec, 1); } -DEFUN ("coding-system-eol-type", Fcoding_system_eol_type, +DEFUE ("coding-system-eol-type", Fcoding_system_eol_type, Scoding_system_eol_type, 1, 1, 0, doc: /* Return eol-type of CODING-SYSTEM. An eol-type is an integer 0, 1, 2, or a vector of coding systems. diff --git a/src/composite.c b/src/composite.c index c18f9e8b56e..367606f5142 100644 --- a/src/composite.c +++ b/src/composite.c @@ -158,7 +158,7 @@ Lisp_Object Qauto_composition_function; auto-compositions. */ #define MAX_AUTO_COMPOSITION_LOOKBACK 3 -EXFUN (Fremove_list_of_text_properties, 4); +INFUN (Fcomposition_get_gstring, 4); /* Temporary variable used in macros COMPOSITION_XXX. */ Lisp_Object composition_temp; diff --git a/src/composite.h b/src/composite.h index cfb5db0dc6a..1f708e93b8e 100644 --- a/src/composite.h +++ b/src/composite.h @@ -328,6 +328,4 @@ extern int composition_update_it (struct composition_it *, extern EMACS_INT composition_adjust_point (EMACS_INT, EMACS_INT); -EXFUN (Fcomposition_get_gstring, 4); - #endif /* not EMACS_COMPOSITE_H */ 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, /* Extract and set components of lists */ -DEFUN ("car", Fcar, Scar, 1, 1, 0, +DEFUE ("car", Fcar, Scar, 1, 1, 0, doc: /* Return the car of LIST. If arg is nil, return nil. Error if arg is not nil and not a cons cell. See also `car-safe'. @@ -473,14 +473,14 @@ Lisp concepts such as car, cdr, cons cell and list. */) return CAR (list); } -DEFUN ("car-safe", Fcar_safe, Scar_safe, 1, 1, 0, +DEFUE ("car-safe", Fcar_safe, Scar_safe, 1, 1, 0, doc: /* Return the car of OBJECT if it is a cons cell, or else nil. */) (Lisp_Object object) { return CAR_SAFE (object); } -DEFUN ("cdr", Fcdr, Scdr, 1, 1, 0, +DEFUE ("cdr", Fcdr, Scdr, 1, 1, 0, doc: /* Return the cdr of LIST. If arg is nil, return nil. Error if arg is not nil and not a cons cell. See also `cdr-safe'. @@ -491,14 +491,14 @@ Lisp concepts such as cdr, car, cons cell and list. */) return CDR (list); } -DEFUN ("cdr-safe", Fcdr_safe, Scdr_safe, 1, 1, 0, +DEFUE ("cdr-safe", Fcdr_safe, Scdr_safe, 1, 1, 0, doc: /* Return the cdr of OBJECT if it is a cons cell, or else nil. */) (Lisp_Object object) { return CDR_SAFE (object); } -DEFUN ("setcar", Fsetcar, Ssetcar, 2, 2, 0, +DEFUE ("setcar", Fsetcar, Ssetcar, 2, 2, 0, doc: /* Set the car of CELL to be NEWCAR. Returns NEWCAR. */) (register Lisp_Object cell, Lisp_Object newcar) { @@ -508,7 +508,7 @@ DEFUN ("setcar", Fsetcar, Ssetcar, 2, 2, 0, return newcar; } -DEFUN ("setcdr", Fsetcdr, Ssetcdr, 2, 2, 0, +DEFUE ("setcdr", Fsetcdr, Ssetcdr, 2, 2, 0, doc: /* Set the cdr of CELL to be NEWCDR. Returns NEWCDR. */) (register Lisp_Object cell, Lisp_Object newcdr) { @@ -520,7 +520,7 @@ DEFUN ("setcdr", Fsetcdr, Ssetcdr, 2, 2, 0, /* Extract and set components of symbols */ -DEFUN ("boundp", Fboundp, Sboundp, 1, 1, 0, +DEFUE ("boundp", Fboundp, Sboundp, 1, 1, 0, doc: /* Return t if SYMBOL's value is not void. */) (register Lisp_Object symbol) { @@ -558,7 +558,7 @@ DEFUN ("boundp", Fboundp, Sboundp, 1, 1, 0, return (EQ (valcontents, Qunbound) ? Qnil : Qt); } -DEFUN ("fboundp", Ffboundp, Sfboundp, 1, 1, 0, +DEFUE ("fboundp", Ffboundp, Sfboundp, 1, 1, 0, doc: /* Return t if SYMBOL's function definition is not void. */) (register Lisp_Object symbol) { @@ -590,7 +590,7 @@ Return SYMBOL. */) return symbol; } -DEFUN ("symbol-function", Fsymbol_function, Ssymbol_function, 1, 1, 0, +DEFUE ("symbol-function", Fsymbol_function, Ssymbol_function, 1, 1, 0, doc: /* Return SYMBOL's function definition. Error if that is void. */) (register Lisp_Object symbol) { @@ -608,7 +608,7 @@ DEFUN ("symbol-plist", Fsymbol_plist, Ssymbol_plist, 1, 1, 0, return XSYMBOL (symbol)->plist; } -DEFUN ("symbol-name", Fsymbol_name, Ssymbol_name, 1, 1, 0, +DEFUE ("symbol-name", Fsymbol_name, Ssymbol_name, 1, 1, 0, doc: /* Return SYMBOL's name, a string. */) (register Lisp_Object symbol) { @@ -619,7 +619,7 @@ DEFUN ("symbol-name", Fsymbol_name, Ssymbol_name, 1, 1, 0, return name; } -DEFUN ("fset", Ffset, Sfset, 2, 2, 0, +DEFUE ("fset", Ffset, Sfset, 2, 2, 0, doc: /* Set SYMBOL's function definition to DEFINITION, and return DEFINITION. */) (register Lisp_Object symbol, Lisp_Object definition) { @@ -706,7 +706,7 @@ SUBR must be a built-in function. */) return make_string (name, strlen (name)); } -DEFUN ("interactive-form", Finteractive_form, Sinteractive_form, 1, 1, 0, +DEFUE ("interactive-form", Finteractive_form, Sinteractive_form, 1, 1, 0, doc: /* Return the interactive form of CMD or nil if none. If CMD is not a command, the return value is nil. Value, if non-nil, is a list \(interactive SPEC). */) @@ -1049,7 +1049,7 @@ find_symbol_value (Lisp_Object symbol) } } -DEFUN ("symbol-value", Fsymbol_value, Ssymbol_value, 1, 1, 0, +DEFUE ("symbol-value", Fsymbol_value, Ssymbol_value, 1, 1, 0, doc: /* Return SYMBOL's value. Error if that is void. */) (Lisp_Object symbol) { @@ -1062,7 +1062,7 @@ DEFUN ("symbol-value", Fsymbol_value, Ssymbol_value, 1, 1, 0, xsignal1 (Qvoid_variable, symbol); } -DEFUN ("set", Fset, Sset, 2, 2, 0, +DEFUE ("set", Fset, Sset, 2, 2, 0, doc: /* Set SYMBOL's value to NEWVAL, and return NEWVAL. */) (register Lisp_Object symbol, Lisp_Object newval) { @@ -1308,7 +1308,7 @@ default_value (Lisp_Object symbol) } } -DEFUN ("default-boundp", Fdefault_boundp, Sdefault_boundp, 1, 1, 0, +DEFUE ("default-boundp", Fdefault_boundp, Sdefault_boundp, 1, 1, 0, doc: /* Return t if SYMBOL has a non-void default value. This is the value that is seen in buffers that do not have their own values for this variable. */) @@ -1320,7 +1320,7 @@ for this variable. */) return (EQ (value, Qunbound) ? Qnil : Qt); } -DEFUN ("default-value", Fdefault_value, Sdefault_value, 1, 1, 0, +DEFUE ("default-value", Fdefault_value, Sdefault_value, 1, 1, 0, doc: /* Return SYMBOL's default value. This is the value that is seen in buffers that do not have their own values for this variable. The default value is meaningful for variables with @@ -1336,7 +1336,7 @@ local bindings in certain buffers. */) xsignal1 (Qvoid_variable, symbol); } -DEFUN ("set-default", Fset_default, Sset_default, 2, 2, 0, +DEFUE ("set-default", Fset_default, Sset_default, 2, 2, 0, doc: /* Set SYMBOL's default value to VALUE. SYMBOL and VALUE are evaluated. The default value is seen in buffers that do not have their own values for this variable. */) @@ -1479,8 +1479,8 @@ make_blv (struct Lisp_Symbol *sym, int forwarded, union Lisp_Val_Fwd valcontents return blv; } -DEFUN ("make-variable-buffer-local", Fmake_variable_buffer_local, Smake_variable_buffer_local, - 1, 1, "vMake Variable Buffer Local: ", +DEFUE ("make-variable-buffer-local", Fmake_variable_buffer_local, + Smake_variable_buffer_local, 1, 1, "vMake Variable Buffer Local: ", doc: /* Make VARIABLE become buffer-local whenever it is set. At any time, the value for the current buffer is in effect, 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. return variable; } -DEFUN ("make-local-variable", Fmake_local_variable, Smake_local_variable, +DEFUE ("make-local-variable", Fmake_local_variable, Smake_local_variable, 1, 1, "vMake Local Variable: ", doc: /* Make VARIABLE have a separate value in the current buffer. Other buffers will continue to share a common default value. @@ -1810,7 +1810,7 @@ frame-local bindings). */) return variable; } -DEFUN ("local-variable-p", Flocal_variable_p, Slocal_variable_p, +DEFUE ("local-variable-p", Flocal_variable_p, Slocal_variable_p, 1, 2, 0, doc: /* Non-nil if VARIABLE has a local binding in buffer BUFFER. BUFFER defaults to the current buffer. */) @@ -1955,7 +1955,8 @@ If the current binding is global (the default), the value is nil. */) #if 0 extern struct terminal *get_terminal (Lisp_Object display, int); -DEFUN ("terminal-local-value", Fterminal_local_value, Sterminal_local_value, 2, 2, 0, +DEFUE ("terminal-local-value", Fterminal_local_value, + Sterminal_local_value, 2, 2, 0, doc: /* Return the terminal-local value of SYMBOL on TERMINAL. If SYMBOL is not a terminal-local variable, then return its normal value, like `symbol-value'. @@ -1972,7 +1973,8 @@ selected frame's terminal device). */) return result; } -DEFUN ("set-terminal-local-value", Fset_terminal_local_value, Sset_terminal_local_value, 3, 3, 0, +DEFUE ("set-terminal-local-value", Fset_terminal_local_value, + Sset_terminal_local_value, 3, 3, 0, doc: /* Set the terminal-local binding of SYMBOL on TERMINAL to VALUE. If VARIABLE is not a terminal-local variable, then set its normal binding, like `set'. @@ -2024,7 +2026,7 @@ indirect_function (register Lisp_Object object) return hare; } -DEFUN ("indirect-function", Findirect_function, Sindirect_function, 1, 2, 0, +DEFUE ("indirect-function", Findirect_function, Sindirect_function, 1, 2, 0, doc: /* Return the function at the end of OBJECT's function chain. If OBJECT is not a symbol, just return it. Otherwise, follow all function indirections to find the final function binding and return it. @@ -2052,7 +2054,7 @@ function chain of symbols. */) /* Extract and set vector and string elements */ -DEFUN ("aref", Faref, Saref, 2, 2, 0, +DEFUE ("aref", Faref, Saref, 2, 2, 0, doc: /* Return the element of ARRAY at index IDX. ARRAY may be a vector, a string, a char-table, a bool-vector, or a byte-code object. IDX starts at 0. */) @@ -2107,7 +2109,7 @@ or a byte-code object. IDX starts at 0. */) } } -DEFUN ("aset", Faset, Saset, 3, 3, 0, +DEFUE ("aset", Faset, Saset, 3, 3, 0, doc: /* Store into the element of ARRAY at index IDX the value NEWELT. Return NEWELT. ARRAY may be a vector, a string, a char-table or a bool-vector. IDX starts at 0. */) @@ -2270,21 +2272,21 @@ DEFUN ("=", Feqlsign, Seqlsign, 2, 2, 0, return arithcompare (num1, num2, equal); } -DEFUN ("<", Flss, Slss, 2, 2, 0, +DEFUE ("<", Flss, Slss, 2, 2, 0, doc: /* Return t if first arg is less than second arg. Both must be numbers or markers. */) (register Lisp_Object num1, Lisp_Object num2) { return arithcompare (num1, num2, less); } -DEFUN (">", Fgtr, Sgtr, 2, 2, 0, +DEFUE (">", Fgtr, Sgtr, 2, 2, 0, doc: /* Return t if first arg is greater than second arg. Both must be numbers or markers. */) (register Lisp_Object num1, Lisp_Object num2) { return arithcompare (num1, num2, grtr); } -DEFUN ("<=", Fleq, Sleq, 2, 2, 0, +DEFUE ("<=", Fleq, Sleq, 2, 2, 0, doc: /* Return t if first arg is less than or equal to second arg. Both must be numbers or markers. */) (register Lisp_Object num1, Lisp_Object num2) @@ -2292,7 +2294,7 @@ Both must be numbers or markers. */) return arithcompare (num1, num2, less_or_equal); } -DEFUN (">=", Fgeq, Sgeq, 2, 2, 0, +DEFUE (">=", Fgeq, Sgeq, 2, 2, 0, doc: /* Return t if first arg is greater than or equal to second arg. Both must be numbers or markers. */) (register Lisp_Object num1, Lisp_Object num2) @@ -2307,7 +2309,7 @@ DEFUN ("/=", Fneq, Sneq, 2, 2, 0, return arithcompare (num1, num2, notequal); } -DEFUN ("zerop", Fzerop, Szerop, 1, 1, 0, +DEFUE ("zerop", Fzerop, Szerop, 1, 1, 0, doc: /* Return t if NUMBER is zero. */) (register Lisp_Object number) { @@ -2354,7 +2356,7 @@ cons_to_long (Lisp_Object c) return ((XINT (top) << 16) | XINT (bot)); } -DEFUN ("number-to-string", Fnumber_to_string, Snumber_to_string, 1, 1, 0, +DEFUE ("number-to-string", Fnumber_to_string, Snumber_to_string, 1, 1, 0, doc: /* Return the decimal representation of NUMBER as a string. Uses a minus sign if negative. NUMBER may be an integer or a floating point number. */) @@ -2401,7 +2403,7 @@ digit_to_number (int character, int base) return digit; } -DEFUN ("string-to-number", Fstring_to_number, Sstring_to_number, 1, 2, 0, +DEFUE ("string-to-number", Fstring_to_number, Sstring_to_number, 1, 2, 0, doc: /* Parse STRING as a decimal number and return the number. This parses both integers and floating point numbers. 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, } -DEFUN ("+", Fplus, Splus, 0, MANY, 0, +DEFUE ("+", Fplus, Splus, 0, MANY, 0, doc: /* Return sum of any number of arguments, which are numbers or markers. usage: (+ &rest NUMBERS-OR-MARKERS) */) (size_t nargs, Lisp_Object *args) @@ -2632,7 +2634,7 @@ usage: (+ &rest NUMBERS-OR-MARKERS) */) return arith_driver (Aadd, nargs, args); } -DEFUN ("-", Fminus, Sminus, 0, MANY, 0, +DEFUE ("-", Fminus, Sminus, 0, MANY, 0, doc: /* Negate number or subtract numbers or markers and return the result. With one arg, negates it. With more than one arg, subtracts all but the first from the first. @@ -2642,7 +2644,7 @@ usage: (- &optional NUMBER-OR-MARKER &rest MORE-NUMBERS-OR-MARKERS) */) return arith_driver (Asub, nargs, args); } -DEFUN ("*", Ftimes, Stimes, 0, MANY, 0, +DEFUE ("*", Ftimes, Stimes, 0, MANY, 0, doc: /* Return product of any number of arguments, which are numbers or markers. usage: (* &rest NUMBERS-OR-MARKERS) */) (size_t nargs, Lisp_Object *args) @@ -2650,7 +2652,7 @@ usage: (* &rest NUMBERS-OR-MARKERS) */) return arith_driver (Amult, nargs, args); } -DEFUN ("/", Fquo, Squo, 2, MANY, 0, +DEFUE ("/", Fquo, Squo, 2, MANY, 0, doc: /* Return first argument divided by all the remaining arguments. The arguments must be numbers or markers. usage: (/ DIVIDEND DIVISOR &rest DIVISORS) */) @@ -2663,7 +2665,7 @@ usage: (/ DIVIDEND DIVISOR &rest DIVISORS) */) return arith_driver (Adiv, nargs, args); } -DEFUN ("%", Frem, Srem, 2, 2, 0, +DEFUE ("%", Frem, Srem, 2, 2, 0, doc: /* Return remainder of X divided by Y. Both must be integers or markers. */) (register Lisp_Object x, Lisp_Object y) @@ -2734,7 +2736,7 @@ Both X and Y must be numbers or markers. */) return val; } -DEFUN ("max", Fmax, Smax, 1, MANY, 0, +DEFUE ("max", Fmax, Smax, 1, MANY, 0, doc: /* Return largest of all the arguments (which must be numbers or markers). The value is always a number; markers are converted to numbers. usage: (max NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS) */) @@ -2743,7 +2745,7 @@ usage: (max NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS) */) return arith_driver (Amax, nargs, args); } -DEFUN ("min", Fmin, Smin, 1, MANY, 0, +DEFUE ("min", Fmin, Smin, 1, MANY, 0, doc: /* Return smallest of all the arguments (which must be numbers or markers). The value is always a number; markers are converted to numbers. usage: (min NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS) */) @@ -2823,7 +2825,7 @@ In this case, zeros are shifted in on the left. */) return val; } -DEFUN ("1+", Fadd1, Sadd1, 1, 1, 0, +DEFUE ("1+", Fadd1, Sadd1, 1, 1, 0, doc: /* Return NUMBER plus one. NUMBER may be a number or a marker. Markers are converted to integers. */) (register Lisp_Object number) @@ -2837,7 +2839,7 @@ Markers are converted to integers. */) return number; } -DEFUN ("1-", Fsub1, Ssub1, 1, 1, 0, +DEFUE ("1-", Fsub1, Ssub1, 1, 1, 0, doc: /* Return NUMBER minus one. NUMBER may be a number or a marker. Markers are converted to integers. */) (register Lisp_Object number) @@ -2860,7 +2862,7 @@ DEFUN ("lognot", Flognot, Slognot, 1, 1, 0, return number; } -DEFUN ("byteorder", Fbyteorder, Sbyteorder, 0, 0, 0, +DEFUE ("byteorder", Fbyteorder, Sbyteorder, 0, 0, 0, doc: /* Return the byteorder for the machine. Returns 66 (ASCII uppercase B) for big endian machines or 108 (ASCII lowercase l) for small endian machines. */) diff --git a/src/dired.c b/src/dired.c index 186cfd1420b..f5fc1e3a62d 100644 --- a/src/dired.c +++ b/src/dired.c @@ -87,6 +87,7 @@ Lisp_Object Qfile_attributes; Lisp_Object Qfile_attributes_lessp; static int scmp (const char *, const char *, int); +INFUN (Ffile_attributes, 2); #ifdef WINDOWSNT Lisp_Object diff --git a/src/dispnew.c b/src/dispnew.c index 3a78845fa56..6e4c93d1676 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -337,7 +337,7 @@ add_frame_display_history (struct frame *f, int paused_p) } -DEFUN ("dump-redisplay-history", Fdump_redisplay_history, +DEFUE ("dump-redisplay-history", Fdump_redisplay_history, Sdump_redisplay_history, 0, 0, "", doc: /* Dump redisplay history to stderr. */) (void) @@ -3139,7 +3139,7 @@ window_to_frame_hpos (struct window *w, int hpos) Redrawing Frames **********************************************************************/ -DEFUN ("redraw-frame", Fredraw_frame, Sredraw_frame, 1, 1, 0, +DEFUE ("redraw-frame", Fredraw_frame, Sredraw_frame, 1, 1, 0, doc: /* Clear frame FRAME and output again what is supposed to appear on it. */) (Lisp_Object frame) { @@ -5878,7 +5878,7 @@ when TERMINAL is nil. */) } -DEFUN ("ding", Fding, Sding, 0, 1, 0, +DEFUE ("ding", Fding, Sding, 0, 1, 0, doc: /* Beep, or flash the screen. Also, unless an argument is given, terminate any keyboard macro currently executing. */) @@ -5914,7 +5914,7 @@ bitch_at_user (void) Sleeping, Waiting ***********************************************************************/ -DEFUN ("sleep-for", Fsleep_for, Ssleep_for, 1, 2, 0, +DEFUE ("sleep-for", Fsleep_for, Ssleep_for, 1, 2, 0, doc: /* Pause, without updating display, for SECONDS seconds. SECONDS may be a floating-point value, meaning that you can wait for a fraction of a second. Optional second arg MILLISECONDS specifies an @@ -6020,7 +6020,7 @@ sit_for (Lisp_Object timeout, int reading, int do_display) } -DEFUN ("redisplay", Fredisplay, Sredisplay, 0, 1, 0, +DEFUE ("redisplay", Fredisplay, Sredisplay, 0, 1, 0, doc: /* Perform redisplay if no input is available. If optional arg FORCE is non-nil or `redisplay-dont-pause' is non-nil, perform a full redisplay even if input is available. diff --git a/src/doc.c b/src/doc.c index ed0d2323ed5..b6939ad78f6 100644 --- a/src/doc.c +++ b/src/doc.c @@ -42,7 +42,8 @@ static char *get_doc_string_buffer; static int get_doc_string_buffer_size; static unsigned char *read_bytecode_pointer; -Lisp_Object Fsnarf_documentation (Lisp_Object); +INFUN (Fdocumentation_property, 3); +INFUN (Fsnarf_documentation, 1); /* readchar in lread.c calls back here to fetch the next byte. If UNREADFLAG is 1, we unread a byte. */ @@ -680,7 +681,7 @@ the same file name is found in the `doc-directory'. */) return Qnil; } -DEFUN ("substitute-command-keys", Fsubstitute_command_keys, +DEFUE ("substitute-command-keys", Fsubstitute_command_keys, Ssubstitute_command_keys, 1, 1, 0, doc: /* Substitute key descriptions for command names in STRING. Substrings of the form \\=\\[COMMAND] replaced by either: a keystroke diff --git a/src/editfns.c b/src/editfns.c index 85b30de6975..0c34a95b949 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -108,7 +108,7 @@ static void transpose_markers (EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT); Lisp_Object Qbuffer_access_fontify_functions; -Lisp_Object Fuser_full_name (Lisp_Object); +INFUN (Fuser_full_name, 1); /* Symbol for the text property used to mark fields. */ @@ -185,7 +185,7 @@ init_editfns (void) #endif } -DEFUN ("char-to-string", Fchar_to_string, Schar_to_string, 1, 1, 0, +DEFUE ("char-to-string", Fchar_to_string, Schar_to_string, 1, 1, 0, doc: /* Convert arg CHAR to a string containing that character. usage: (char-to-string CHAR) */) (Lisp_Object character) @@ -239,7 +239,7 @@ buildmark (EMACS_INT charpos, EMACS_INT bytepos) return mark; } -DEFUN ("point", Fpoint, Spoint, 0, 0, 0, +DEFUE ("point", Fpoint, Spoint, 0, 0, 0, doc: /* Return value of point, as an integer. Beginning of buffer is position (point-min). */) (void) @@ -249,7 +249,7 @@ Beginning of buffer is position (point-min). */) return temp; } -DEFUN ("point-marker", Fpoint_marker, Spoint_marker, 0, 0, 0, +DEFUE ("point-marker", Fpoint_marker, Spoint_marker, 0, 0, 0, doc: /* Return value of point, as a marker object. */) (void) { @@ -267,7 +267,7 @@ clip_to_bounds (EMACS_INT lower, EMACS_INT num, EMACS_INT upper) return num; } -DEFUN ("goto-char", Fgoto_char, Sgoto_char, 1, 1, "NGoto char: ", +DEFUE ("goto-char", Fgoto_char, Sgoto_char, 1, 1, "NGoto char: ", doc: /* Set point to POSITION, a number or marker. Beginning of buffer is position (point-min), end is (point-max). @@ -663,7 +663,7 @@ is before LIMIT, then LIMIT will be returned instead. */) return make_number (beg); } -DEFUN ("field-end", Ffield_end, Sfield_end, 0, 3, 0, +DEFUE ("field-end", Ffield_end, Sfield_end, 0, 3, 0, doc: /* Return the end of the field surrounding POS. A field is a region of text with the same `field' property. If POS is nil, the value of point is used for POS. @@ -678,7 +678,7 @@ is after LIMIT, then LIMIT will be returned instead. */) return make_number (end); } -DEFUN ("constrain-to-field", Fconstrain_to_field, Sconstrain_to_field, 2, 5, 0, +DEFUE ("constrain-to-field", Fconstrain_to_field, Sconstrain_to_field, 2, 5, 0, doc: /* Return the position closest to NEW-POS that is in the same field as OLD-POS. A field is a region of text with the same `field' property. @@ -787,7 +787,7 @@ Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil. */) } -DEFUN ("line-beginning-position", +DEFUE ("line-beginning-position", Fline_beginning_position, Sline_beginning_position, 0, 1, 0, doc: /* Return the character position of the first character on the current line. With argument N not nil or 1, move forward N - 1 lines first. @@ -829,7 +829,7 @@ This function does not move point. */) Qt, Qnil); } -DEFUN ("line-end-position", Fline_end_position, Sline_end_position, 0, 1, 0, +DEFUE ("line-end-position", Fline_end_position, Sline_end_position, 0, 1, 0, doc: /* Return the character position of the last character on the current line. With argument N not nil or 1, move forward N - 1 lines first. If scan reaches end of buffer, return that position. @@ -1048,7 +1048,7 @@ is in effect, in which case it is less. */) return temp; } -DEFUN ("point-max-marker", Fpoint_max_marker, Spoint_max_marker, 0, 0, 0, +DEFUE ("point-max-marker", Fpoint_max_marker, Spoint_max_marker, 0, 0, 0, doc: /* Return a marker to the maximum permissible value of point in this buffer. This is (1+ (buffer-size)), unless narrowing (a buffer restriction) is in effect, in which case it is less. */) @@ -1099,7 +1099,7 @@ If BYTEPOS is out of range, the value is nil. */) return make_number (BYTE_TO_CHAR (XINT (bytepos))); } -DEFUN ("following-char", Ffollowing_char, Sfollowing_char, 0, 0, 0, +DEFUE ("following-char", Ffollowing_char, Sfollowing_char, 0, 0, 0, doc: /* Return the character following point, as a number. At the end of the buffer or accessible region, return 0. */) (void) @@ -1112,7 +1112,7 @@ At the end of the buffer or accessible region, return 0. */) return temp; } -DEFUN ("preceding-char", Fprevious_char, Sprevious_char, 0, 0, 0, +DEFUE ("preceding-char", Fprevious_char, Sprevious_char, 0, 0, 0, doc: /* Return the character preceding point, as a number. At the beginning of the buffer or accessible region, return 0. */) (void) @@ -1131,7 +1131,7 @@ At the beginning of the buffer or accessible region, return 0. */) return temp; } -DEFUN ("bobp", Fbobp, Sbobp, 0, 0, 0, +DEFUE ("bobp", Fbobp, Sbobp, 0, 0, 0, doc: /* Return t if point is at the beginning of the buffer. If the buffer is narrowed, this means the beginning of the narrowed part. */) (void) @@ -1141,7 +1141,7 @@ If the buffer is narrowed, this means the beginning of the narrowed part. */) return Qnil; } -DEFUN ("eobp", Feobp, Seobp, 0, 0, 0, +DEFUE ("eobp", Feobp, Seobp, 0, 0, 0, doc: /* Return t if point is at the end of the buffer. If the buffer is narrowed, this means the end of the narrowed part. */) (void) @@ -1151,7 +1151,7 @@ If the buffer is narrowed, this means the end of the narrowed part. */) return Qnil; } -DEFUN ("bolp", Fbolp, Sbolp, 0, 0, 0, +DEFUE ("bolp", Fbolp, Sbolp, 0, 0, 0, doc: /* Return t if point is at the beginning of a line. */) (void) { @@ -1160,7 +1160,7 @@ DEFUN ("bolp", Fbolp, Sbolp, 0, 0, 0, return Qnil; } -DEFUN ("eolp", Feolp, Seolp, 0, 0, 0, +DEFUE ("eolp", Feolp, Seolp, 0, 0, 0, doc: /* Return t if point is at the end of a line. `End of a line' includes point being at the end of the buffer. */) (void) @@ -1170,7 +1170,7 @@ DEFUN ("eolp", Feolp, Seolp, 0, 0, 0, return Qnil; } -DEFUN ("char-after", Fchar_after, Schar_after, 0, 1, 0, +DEFUE ("char-after", Fchar_after, Schar_after, 0, 1, 0, doc: /* Return character in current buffer at position POS. POS is an integer or a marker and defaults to point. If POS is out of range, the value is nil. */) @@ -1247,7 +1247,7 @@ If POS is out of range, the value is nil. */) return val; } -DEFUN ("user-login-name", Fuser_login_name, Suser_login_name, 0, 1, 0, +DEFUE ("user-login-name", Fuser_login_name, Suser_login_name, 0, 1, 0, doc: /* Return the name under which the user logged in, as a string. This is based on the effective uid, not the real uid. Also, if the environment variables LOGNAME or USER are set, @@ -1387,7 +1387,7 @@ name, or nil if there is no such user. */) return full; } -DEFUN ("system-name", Fsystem_name, Ssystem_name, 0, 0, 0, +DEFUE ("system-name", Fsystem_name, Ssystem_name, 0, 0, 0, doc: /* Return the host name of the machine you are running on, as a string. */) (void) { @@ -1462,7 +1462,7 @@ lo_time (time_t t) return t & ((1 << 16) - 1); } -DEFUN ("current-time", Fcurrent_time, Scurrent_time, 0, 0, 0, +DEFUE ("current-time", Fcurrent_time, Scurrent_time, 0, 0, 0, doc: /* Return the current time, as the number of seconds since 1970-01-01 00:00:00. The time is returned as a list of three integers. The first has the most significant 16 bits of the seconds, while the second has the @@ -1481,7 +1481,7 @@ resolution finer than a second. */) make_number (EMACS_USECS (t))); } -DEFUN ("get-internal-run-time", Fget_internal_run_time, Sget_internal_run_time, +DEFUE ("get-internal-run-time", Fget_internal_run_time, Sget_internal_run_time, 0, 0, 0, doc: /* Return the current run time used by Emacs. The time is returned as a list of three integers. The first has the @@ -2255,7 +2255,7 @@ insert1 (Lisp_Object arg) not be used after calling insert or insert_from_string, so we don't care if it gets trashed. */ -DEFUN ("insert", Finsert, Sinsert, 0, MANY, 0, +DEFUE ("insert", Finsert, Sinsert, 0, MANY, 0, doc: /* Insert the arguments, either strings or characters, at point. Point and before-insertion markers move forward to end up after the inserted text. @@ -2335,7 +2335,7 @@ usage: (insert-before-markers-and-inherit &rest ARGS) */) return Qnil; } -DEFUN ("insert-char", Finsert_char, Sinsert_char, 2, 3, 0, +DEFUE ("insert-char", Finsert_char, Sinsert_char, 2, 3, 0, doc: /* Insert COUNT copies of CHARACTER. Point, and before-insertion markers, are relocated as in the function `insert'. The optional third arg INHERIT, if non-nil, says to inherit text properties @@ -2509,7 +2509,7 @@ update_buffer_properties (EMACS_INT start, EMACS_INT end) } } -DEFUN ("buffer-substring", Fbuffer_substring, Sbuffer_substring, 2, 2, 0, +DEFUE ("buffer-substring", Fbuffer_substring, Sbuffer_substring, 2, 2, 0, doc: /* Return the contents of part of the current buffer as a string. The two arguments START and END are character positions; they can be in either order. @@ -2545,7 +2545,7 @@ they can be in either order. */) return make_buffer_string (b, e, 0); } -DEFUN ("buffer-string", Fbuffer_string, Sbuffer_string, 0, 0, 0, +DEFUE ("buffer-string", Fbuffer_string, Sbuffer_string, 0, 0, 0, doc: /* Return the contents of the current buffer as a string. If narrowing is in effect, this function returns only the visible part of the buffer. */) @@ -3183,7 +3183,7 @@ It returns the number of characters changed. */) return make_number (cnt); } -DEFUN ("delete-region", Fdelete_region, Sdelete_region, 2, 2, "r", +DEFUE ("delete-region", Fdelete_region, Sdelete_region, 2, 2, "r", doc: /* Delete the text between point and mark. When called from a program, expects two arguments, @@ -3206,7 +3206,7 @@ DEFUN ("delete-and-extract-region", Fdelete_and_extract_region, return del_range_1 (XINT (start), XINT (end), 1, 1); } -DEFUN ("widen", Fwiden, Swiden, 0, 0, "", +DEFUE ("widen", Fwiden, Swiden, 0, 0, "", doc: /* Remove restrictions (narrowing) from current buffer. This allows the buffer's full text to be seen and edited. */) (void) @@ -3221,7 +3221,7 @@ This allows the buffer's full text to be seen and edited. */) return Qnil; } -DEFUN ("narrow-to-region", Fnarrow_to_region, Snarrow_to_region, 2, 2, "r", +DEFUE ("narrow-to-region", Fnarrow_to_region, Snarrow_to_region, 2, 2, "r", doc: /* Restrict editing in this buffer to the current region. The rest of the text becomes temporarily invisible and untouchable but is not deleted; if you save the buffer in a file, the invisible @@ -3382,7 +3382,7 @@ static char *message_text; /* Allocated length of that buffer. */ static int message_length; -DEFUN ("message", Fmessage, Smessage, 1, MANY, 0, +DEFUE ("message", Fmessage, Smessage, 1, MANY, 0, doc: /* Display a message at the bottom of the screen. The message also goes into the `*Messages*' buffer. \(In keyboard macros, that's all it does.) @@ -3494,7 +3494,7 @@ usage: (message-or-box FORMAT-STRING &rest ARGS) */) return Fmessage (nargs, args); } -DEFUN ("current-message", Fcurrent_message, Scurrent_message, 0, 0, 0, +DEFUE ("current-message", Fcurrent_message, Scurrent_message, 0, 0, 0, doc: /* Return the string currently displayed in the echo area, or nil if none. */) (void) { @@ -3543,7 +3543,7 @@ usage: (propertize STRING &rest PROPERTIES) */) ? count_size_as_multibyte (SDATA (STRING), SBYTES (STRING)) \ : SBYTES (STRING)) -DEFUN ("format", Fformat, Sformat, 1, MANY, 0, +DEFUE ("format", Fformat, Sformat, 1, MANY, 0, doc: /* Format a string out of a format-string and arguments. The first argument is a format control string. The other arguments are substituted into it to make the result, a string. diff --git a/src/emacs.c b/src/emacs.c index 6bdd2550ed1..74379f4c62e 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -1958,7 +1958,7 @@ sort_args (int argc, char **argv) xfree (priority); } -DEFUN ("kill-emacs", Fkill_emacs, Skill_emacs, 0, 1, "P", +DEFUE ("kill-emacs", Fkill_emacs, Skill_emacs, 0, 1, "P", doc: /* Exit the Emacs job and kill it. If ARG is an integer, return ARG as the exit program code. If ARG is a string, stuff it as keyboard input. diff --git a/src/eval.c b/src/eval.c index 0f9e012b823..d6d62aa4afb 100644 --- a/src/eval.c +++ b/src/eval.c @@ -126,6 +126,7 @@ static Lisp_Object funcall_lambda (Lisp_Object, size_t, Lisp_Object *); static void unwind_to_catch (struct catchtag *, Lisp_Object) NO_RETURN; static int interactive_p (int); static Lisp_Object apply_lambda (Lisp_Object fun, Lisp_Object args); +INFUN (Ffetch_bytecode, 1); void init_eval_once (void) @@ -339,7 +340,7 @@ usage: (cond CLAUSES...) */) return val; } -DEFUN ("progn", Fprogn, Sprogn, 0, UNEVALLED, 0, +DEFUE ("progn", Fprogn, Sprogn, 0, UNEVALLED, 0, doc: /* Eval BODY forms sequentially and return value of last one. usage: (progn BODY...) */) (Lisp_Object args) @@ -504,7 +505,7 @@ usage: (function ARG) */) } -DEFUN ("interactive-p", Finteractive_p, Sinteractive_p, 0, 0, 0, +DEFUE ("interactive-p", Finteractive_p, Sinteractive_p, 0, 0, 0, doc: /* Return t if the containing function was run directly by user input. This means that the function was called with `call-interactively' \(which includes being called as the binding of a key) @@ -1310,7 +1311,7 @@ unwind_to_catch (struct catchtag *catch, Lisp_Object value) _longjmp (catch->jmp, 1); } -DEFUN ("throw", Fthrow, Sthrow, 2, 2, 0, +DEFUE ("throw", Fthrow, Sthrow, 2, 2, 0, doc: /* Throw to the catch for TAG and return VALUE from it. Both TAG and VALUE are evalled. */) (register Lisp_Object tag, Lisp_Object value) @@ -1648,7 +1649,7 @@ static Lisp_Object find_handler_clause (Lisp_Object, Lisp_Object, static int maybe_call_debugger (Lisp_Object conditions, Lisp_Object sig, Lisp_Object data); -DEFUN ("signal", Fsignal, Ssignal, 2, 2, 0, +DEFUE ("signal", Fsignal, Ssignal, 2, 2, 0, doc: /* Signal an error. Args are ERROR-SYMBOL and associated DATA. This function does not return. @@ -2032,7 +2033,7 @@ error (const char *m, ...) va_end (ap); } -DEFUN ("commandp", Fcommandp, Scommandp, 1, 2, 0, +DEFUE ("commandp", Fcommandp, Scommandp, 1, 2, 0, doc: /* Non-nil if FUNCTION makes provisions for interactive calling. This means it contains a description for how to read arguments to give it. The value is nil for an invalid function or a symbol with no function @@ -2213,7 +2214,7 @@ do_autoload (Lisp_Object fundef, Lisp_Object funname) } -DEFUN ("eval", Feval, Seval, 1, 2, 0, +DEFUE ("eval", Feval, Seval, 1, 2, 0, doc: /* Evaluate FORM and return its value. If LEXICAL is t, evaluate using lexical scoping. */) (Lisp_Object form, Lisp_Object lexical) @@ -2449,7 +2450,7 @@ eval_sub (Lisp_Object form) return val; } -DEFUN ("apply", Fapply, Sapply, 2, MANY, 0, +DEFUE ("apply", Fapply, Sapply, 2, MANY, 0, doc: /* Call FUNCTION with our remaining args, using our last arg as list of args. Then return the value FUNCTION returns. Thus, (apply '+ 1 2 '(3 4)) returns 10. @@ -2544,7 +2545,7 @@ funcall_nil (size_t nargs, Lisp_Object *args) return Qnil; } -DEFUN ("run-hooks", Frun_hooks, Srun_hooks, 0, MANY, 0, +DEFUE ("run-hooks", Frun_hooks, Srun_hooks, 0, MANY, 0, doc: /* Run each hook in HOOKS. Each argument should be a symbol, a hook variable. These symbols are processed in the order specified. @@ -2573,7 +2574,7 @@ usage: (run-hooks &rest HOOKS) */) return Qnil; } -DEFUN ("run-hook-with-args", Frun_hook_with_args, +DEFUE ("run-hook-with-args", Frun_hook_with_args, Srun_hook_with_args, 1, MANY, 0, doc: /* Run HOOK with the specified arguments ARGS. HOOK should be a symbol, a hook variable. If HOOK has a non-nil @@ -2619,7 +2620,7 @@ funcall_not (size_t nargs, Lisp_Object *args) return NILP (Ffuncall (nargs, args)) ? Qt : Qnil; } -DEFUN ("run-hook-with-args-until-failure", Frun_hook_with_args_until_failure, +DEFUE ("run-hook-with-args-until-failure", Frun_hook_with_args_until_failure, Srun_hook_with_args_until_failure, 1, MANY, 0, doc: /* Run HOOK with the specified arguments ARGS. HOOK should be a symbol, a hook variable. If HOOK has a non-nil @@ -2906,7 +2907,7 @@ call7 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3, /* The caller should GCPRO all the elements of ARGS. */ -DEFUN ("functionp", Ffunctionp, Sfunctionp, 1, 1, 0, +DEFUE ("functionp", Ffunctionp, Sfunctionp, 1, 1, 0, doc: /* Non-nil if OBJECT is a function. */) (Lisp_Object object) { @@ -2939,7 +2940,7 @@ DEFUN ("functionp", Ffunctionp, Sfunctionp, 1, 1, 0, return Qnil; } -DEFUN ("funcall", Ffuncall, Sfuncall, 1, MANY, 0, +DEFUE ("funcall", Ffuncall, Sfuncall, 1, MANY, 0, doc: /* Call first argument as a function, passing remaining arguments to it. Return the value that function returns. Thus, (funcall 'cons 'x 'y) returns (x . y). @@ -3647,8 +3648,6 @@ mark_backtrace (void) } } -EXFUN (Funintern, 2); - void syms_of_eval (void) { diff --git a/src/fileio.c b/src/fileio.c index f9923c420a3..5ad8b0a33a1 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -143,6 +143,7 @@ Lisp_Object Qfile_name_history; Lisp_Object Qcar_less_than_car; +INFUN (Fmake_symbolic_link, 3); static int a_write (int, Lisp_Object, int, int, Lisp_Object *, struct coding_system *); static int e_write (int, Lisp_Object, int, int, struct coding_system *); @@ -239,7 +240,8 @@ Lisp_Object Qwrite_region; Lisp_Object Qverify_visited_file_modtime; Lisp_Object Qset_visited_file_modtime; -DEFUN ("find-file-name-handler", Ffind_file_name_handler, Sfind_file_name_handler, 2, 2, 0, +DEFUE ("find-file-name-handler", Ffind_file_name_handler, + Sfind_file_name_handler, 2, 2, 0, doc: /* Return FILENAME's handler function for OPERATION, if it has one. Otherwise, return nil. A file name is handled if one of the regular expressions in @@ -299,7 +301,7 @@ use the standard functions without calling themselves recursively. */) return result; } -DEFUN ("file-name-directory", Ffile_name_directory, Sfile_name_directory, +DEFUE ("file-name-directory", Ffile_name_directory, Sfile_name_directory, 1, 1, 0, doc: /* Return the directory component in file name FILENAME. Return nil if FILENAME does not include a directory. @@ -373,7 +375,7 @@ Given a Unix syntax file name, returns a string ending in slash. */) return make_specified_string (beg, -1, p - beg, STRING_MULTIBYTE (filename)); } -DEFUN ("file-name-nondirectory", Ffile_name_nondirectory, +DEFUE ("file-name-nondirectory", Ffile_name_nondirectory, Sfile_name_nondirectory, 1, 1, 0, doc: /* Return file name FILENAME sans its directory. For example, in a Unix-syntax file name, @@ -408,7 +410,7 @@ or the entire name if it contains no slash. */) return make_specified_string (p, -1, end - p, STRING_MULTIBYTE (filename)); } -DEFUN ("unhandled-file-name-directory", Funhandled_file_name_directory, +DEFUE ("unhandled-file-name-directory", Funhandled_file_name_directory, Sunhandled_file_name_directory, 1, 1, 0, doc: /* Return a directly usable directory name somehow associated with FILENAME. A `directly usable' directory name is one that may be used without the @@ -460,7 +462,7 @@ file_name_as_directory (char *out, const char *in) return out; } -DEFUN ("file-name-as-directory", Ffile_name_as_directory, +DEFUE ("file-name-as-directory", Ffile_name_as_directory, Sfile_name_as_directory, 1, 1, 0, doc: /* Return a string representing the file name FILE interpreted as a directory. This operation exists because a directory is also a file, but its name as @@ -519,7 +521,7 @@ directory_file_name (char *src, char *dst) return 1; } -DEFUN ("directory-file-name", Fdirectory_file_name, Sdirectory_file_name, +DEFUE ("directory-file-name", Fdirectory_file_name, Sdirectory_file_name, 1, 1, 0, doc: /* Returns the file name of the directory named DIRECTORY. This is the name of the file that holds the data for the directory DIRECTORY. @@ -701,7 +703,7 @@ probably use `make-temp-file' instead, except in three circumstances: -DEFUN ("expand-file-name", Fexpand_file_name, Sexpand_file_name, 1, 2, 0, +DEFUE ("expand-file-name", Fexpand_file_name, Sexpand_file_name, 1, 2, 0, doc: /* Convert filename NAME to absolute, and canonicalize it. Second arg DEFAULT-DIRECTORY is directory to start with if NAME is relative \(does not start with slash or tilde); if DEFAULT-DIRECTORY is nil or missing, @@ -1500,7 +1502,7 @@ search_embedded_absfilename (char *nm, char *endp) return NULL; } -DEFUN ("substitute-in-file-name", Fsubstitute_in_file_name, +DEFUE ("substitute-in-file-name", Fsubstitute_in_file_name, Ssubstitute_in_file_name, 1, 1, 0, doc: /* Substitute environment variables referred to in FILENAME. `$FOO' where FOO is an environment variable name means to substitute @@ -2343,7 +2345,7 @@ This happens for interactive use with M-x. */) } -DEFUN ("file-name-absolute-p", Ffile_name_absolute_p, Sfile_name_absolute_p, +DEFUE ("file-name-absolute-p", Ffile_name_absolute_p, Sfile_name_absolute_p, 1, 1, 0, doc: /* Return t if file FILENAME specifies an absolute file name. On Unix, this is a name starting with a `/' or a `~'. */) @@ -2399,7 +2401,7 @@ check_writable (const char *filename) #endif /* not MSDOS */ } -DEFUN ("file-exists-p", Ffile_exists_p, Sfile_exists_p, 1, 1, 0, +DEFUE ("file-exists-p", Ffile_exists_p, Sfile_exists_p, 1, 1, 0, doc: /* Return t if file FILENAME exists (whether or not you can read it.) See also `file-readable-p' and `file-attributes'. This returns nil for a symlink to a nonexistent file. @@ -2446,7 +2448,7 @@ For a directory, this means you can access files in that directory. */) return (check_executable (SSDATA (absname)) ? Qt : Qnil); } -DEFUN ("file-readable-p", Ffile_readable_p, Sfile_readable_p, 1, 1, 0, +DEFUE ("file-readable-p", Ffile_readable_p, Sfile_readable_p, 1, 1, 0, doc: /* Return t if file FILENAME exists and you can read it. See also `file-exists-p' and `file-attributes'. */) (Lisp_Object filename) @@ -2568,7 +2570,7 @@ If there is no error, returns nil. */) return Qnil; } -DEFUN ("file-symlink-p", Ffile_symlink_p, Sfile_symlink_p, 1, 1, 0, +DEFUE ("file-symlink-p", Ffile_symlink_p, Sfile_symlink_p, 1, 1, 0, doc: /* Return non-nil if file FILENAME is the name of a symbolic link. The value is the link target, as a string. Otherwise it returns nil. @@ -2606,7 +2608,7 @@ points to a nonexistent file. */) return val; } -DEFUN ("file-directory-p", Ffile_directory_p, Sfile_directory_p, 1, 1, 0, +DEFUE ("file-directory-p", Ffile_directory_p, Sfile_directory_p, 1, 1, 0, doc: /* Return t if FILENAME names an existing directory. Symbolic links to directories count as directories. See `file-symlink-p' to distinguish symlinks. */) @@ -2631,7 +2633,8 @@ See `file-symlink-p' to distinguish symlinks. */) return S_ISDIR (st.st_mode) ? Qt : Qnil; } -DEFUN ("file-accessible-directory-p", Ffile_accessible_directory_p, Sfile_accessible_directory_p, 1, 1, 0, +DEFUE ("file-accessible-directory-p", Ffile_accessible_directory_p, + Sfile_accessible_directory_p, 1, 1, 0, doc: /* Return t if file FILENAME names a directory you can open. For the value to be t, FILENAME must specify the name of a directory as a file, and the directory must allow you to open files in it. In order to use a @@ -4350,7 +4353,7 @@ choose_write_coding_system (Lisp_Object start, Lisp_Object end, Lisp_Object file return val; } -DEFUN ("write-region", Fwrite_region, Swrite_region, 3, 7, +DEFUE ("write-region", Fwrite_region, Swrite_region, 3, 7, "r\nFWrite region to file: \ni\ni\ni\np", doc: /* Write current region into specified file. When called from a program, requires three arguments: @@ -4911,7 +4914,7 @@ e_write (int desc, Lisp_Object string, int start, int end, struct coding_system return 0; } -DEFUN ("verify-visited-file-modtime", Fverify_visited_file_modtime, +DEFUE ("verify-visited-file-modtime", Fverify_visited_file_modtime, Sverify_visited_file_modtime, 0, 1, 0, doc: /* Return t if last mod time of BUF's visited file matches what BUF records. This means that the file has not been changed since it was visited or saved. @@ -5132,7 +5135,7 @@ do_auto_save_eh (Lisp_Object ignore) return Qnil; } -DEFUN ("do-auto-save", Fdo_auto_save, Sdo_auto_save, 0, 2, "", +DEFUE ("do-auto-save", Fdo_auto_save, Sdo_auto_save, 0, 2, "", doc: /* Auto-save all buffers that need it. This is all buffers that have auto-saving enabled and are changed since last auto-saved. diff --git a/src/filelock.c b/src/filelock.c index 13b27c72f19..c6b1617770c 100644 --- a/src/filelock.c +++ b/src/filelock.c @@ -639,7 +639,7 @@ or else nothing is done if current buffer isn't visiting a file. */) return Qnil; } -DEFUN ("unlock-buffer", Funlock_buffer, Sunlock_buffer, +DEFUE ("unlock-buffer", Funlock_buffer, Sunlock_buffer, 0, 0, 0, doc: /* Unlock the file visited in the current buffer. If the buffer is not modified, this does nothing because the file diff --git a/src/floatfns.c b/src/floatfns.c index 1232fc0afa1..345b3b94947 100644 --- a/src/floatfns.c +++ b/src/floatfns.c @@ -683,7 +683,7 @@ DEFUN ("abs", Fabs, Sabs, 1, 1, 0, return arg; } -DEFUN ("float", Ffloat, Sfloat, 1, 1, 0, +DEFUE ("float", Ffloat, Sfloat, 1, 1, 0, doc: /* Return the floating point number equal to ARG. */) (register Lisp_Object arg) { @@ -886,7 +886,7 @@ systems, but 2 on others. */) return rounding_driver (arg, divisor, emacs_rint, round2, "round"); } -DEFUN ("truncate", Ftruncate, Struncate, 1, 2, 0, +DEFUE ("truncate", Ftruncate, Struncate, 1, 2, 0, doc: /* Truncate a floating point number to an int. Rounds ARG toward zero. With optional DIVISOR, truncate ARG/DIVISOR. */) diff --git a/src/fns.c b/src/fns.c index 09ce8c1b597..f4eaaccda33 100644 --- a/src/fns.c +++ b/src/fns.c @@ -61,7 +61,7 @@ static int internal_equal (Lisp_Object , Lisp_Object, int, int); extern long time (); #endif -DEFUN ("identity", Fidentity, Sidentity, 1, 1, 0, +DEFUE ("identity", Fidentity, Sidentity, 1, 1, 0, doc: /* Return the argument unchanged. */) (Lisp_Object arg) { @@ -105,7 +105,7 @@ Other values of LIMIT are ignored. */) /* Random data-structure functions */ -DEFUN ("length", Flength, Slength, 1, 1, 0, +DEFUE ("length", Flength, Slength, 1, 1, 0, doc: /* Return the length of vector, list or string SEQUENCE. A byte-code function object is also allowed. If the string contains multibyte characters, this is not necessarily @@ -190,7 +190,7 @@ If STRING is multibyte, this may be greater than the length of STRING. */) return make_number (SBYTES (string)); } -DEFUN ("string-equal", Fstring_equal, Sstring_equal, 2, 2, 0, +DEFUE ("string-equal", Fstring_equal, Sstring_equal, 2, 2, 0, doc: /* Return t if two strings have identical contents. Case is significant, but text properties are ignored. Symbols are also allowed; their print names are used instead. */) @@ -210,7 +210,7 @@ Symbols are also allowed; their print names are used instead. */) return Qt; } -DEFUN ("compare-strings", Fcompare_strings, Scompare_strings, 6, 7, 0, +DEFUE ("compare-strings", Fcompare_strings, Scompare_strings, 6, 7, 0, doc: /* Compare the contents of two strings, converting to multibyte if needed. In string STR1, skip the first START1 characters and stop at END1. In string STR2, skip the first START2 characters and stop at END2. @@ -311,7 +311,7 @@ If string STR1 is greater, the value is a positive number N; return Qt; } -DEFUN ("string-lessp", Fstring_lessp, Sstring_lessp, 2, 2, 0, +DEFUE ("string-lessp", Fstring_lessp, Sstring_lessp, 2, 2, 0, doc: /* Return t if first arg string is less than second in lexicographic order. Case is significant. Symbols are also allowed; their print names are used instead. */) @@ -372,7 +372,7 @@ concat3 (Lisp_Object s1, Lisp_Object s2, Lisp_Object s3) return concat (3, args, Lisp_String, 0); } -DEFUN ("append", Fappend, Sappend, 0, MANY, 0, +DEFUE ("append", Fappend, Sappend, 0, MANY, 0, doc: /* Concatenate all the arguments and make the result a list. The result is a list whose elements are the elements of all the arguments. Each argument may be a list, vector or string. @@ -383,7 +383,7 @@ usage: (append &rest SEQUENCES) */) return concat (nargs, args, Lisp_Cons, 1); } -DEFUN ("concat", Fconcat, Sconcat, 0, MANY, 0, +DEFUE ("concat", Fconcat, Sconcat, 0, MANY, 0, doc: /* Concatenate all the arguments and make the result a string. The result is a string whose elements are the elements of all the arguments. Each argument may be a string or a list or vector of characters (integers). @@ -393,7 +393,7 @@ usage: (concat &rest SEQUENCES) */) return concat (nargs, args, Lisp_String, 0); } -DEFUN ("vconcat", Fvconcat, Svconcat, 0, MANY, 0, +DEFUE ("vconcat", Fvconcat, Svconcat, 0, MANY, 0, doc: /* Concatenate all the arguments and make the result a vector. The result is a vector whose elements are the elements of all the arguments. Each argument may be a list, vector or string. @@ -404,7 +404,7 @@ usage: (vconcat &rest SEQUENCES) */) } -DEFUN ("copy-sequence", Fcopy_sequence, Scopy_sequence, 1, 1, 0, +DEFUE ("copy-sequence", Fcopy_sequence, Scopy_sequence, 1, 1, 0, doc: /* Return a copy of a list, vector, string or char-table. The elements of a list or vector are not copied; they are shared with the original. */) @@ -944,7 +944,7 @@ string_make_unibyte (Lisp_Object string) return ret; } -DEFUN ("string-make-multibyte", Fstring_make_multibyte, Sstring_make_multibyte, +DEFUE ("string-make-multibyte", Fstring_make_multibyte, Sstring_make_multibyte, 1, 1, 0, doc: /* Return the multibyte equivalent of STRING. If STRING is unibyte and contains non-ASCII characters, the function @@ -962,7 +962,7 @@ string the same way whether it is unibyte or multibyte.) */) return string_make_multibyte (string); } -DEFUN ("string-make-unibyte", Fstring_make_unibyte, Sstring_make_unibyte, +DEFUE ("string-make-unibyte", Fstring_make_unibyte, Sstring_make_unibyte, 1, 1, 0, doc: /* Return the unibyte equivalent of STRING. Multibyte character codes are converted to unibyte according to @@ -976,7 +976,7 @@ the low 8 bits of each character. */) return string_make_unibyte (string); } -DEFUN ("string-as-unibyte", Fstring_as_unibyte, Sstring_as_unibyte, +DEFUE ("string-as-unibyte", Fstring_as_unibyte, Sstring_as_unibyte, 1, 1, 0, doc: /* Return a unibyte string with the same individual bytes as STRING. If STRING is unibyte, the result is STRING itself. @@ -1000,7 +1000,7 @@ If STRING is multibyte and contains a character of charset return string; } -DEFUN ("string-as-multibyte", Fstring_as_multibyte, Sstring_as_multibyte, +DEFUE ("string-as-multibyte", Fstring_as_multibyte, Sstring_as_multibyte, 1, 1, 0, doc: /* Return a multibyte string with the same individual bytes as STRING. If STRING is multibyte, the result is STRING itself. @@ -1038,7 +1038,7 @@ If you're not sure, whether to use `string-as-multibyte' or return string; } -DEFUN ("string-to-multibyte", Fstring_to_multibyte, Sstring_to_multibyte, +DEFUE ("string-to-multibyte", Fstring_to_multibyte, Sstring_to_multibyte, 1, 1, 0, doc: /* Return a multibyte string with the same individual chars as STRING. If STRING is multibyte, the result is STRING itself. @@ -1084,7 +1084,7 @@ an error is signaled. */) } -DEFUN ("copy-alist", Fcopy_alist, Scopy_alist, 1, 1, 0, +DEFUE ("copy-alist", Fcopy_alist, Scopy_alist, 1, 1, 0, doc: /* Return a copy of ALIST. This is an alist which represents the same mapping from objects to objects, but does not share the alist structure with ALIST. @@ -1110,7 +1110,7 @@ Elements of ALIST that are not conses are also shared. */) return alist; } -DEFUN ("substring", Fsubstring, Ssubstring, 2, 3, 0, +DEFUE ("substring", Fsubstring, Ssubstring, 2, 3, 0, doc: /* Return a new string whose contents are a substring of STRING. The returned string consists of the characters between index FROM \(inclusive) and index TO (exclusive) of STRING. FROM and TO are @@ -1269,7 +1269,7 @@ substring_both (Lisp_Object string, EMACS_INT from, EMACS_INT from_byte, return res; } -DEFUN ("nthcdr", Fnthcdr, Snthcdr, 2, 2, 0, +DEFUE ("nthcdr", Fnthcdr, Snthcdr, 2, 2, 0, doc: /* Take cdr N times on LIST, return the result. */) (Lisp_Object n, Lisp_Object list) { @@ -1285,7 +1285,7 @@ DEFUN ("nthcdr", Fnthcdr, Snthcdr, 2, 2, 0, return list; } -DEFUN ("nth", Fnth, Snth, 2, 2, 0, +DEFUE ("nth", Fnth, Snth, 2, 2, 0, doc: /* Return the Nth element of LIST. N counts from zero. If LIST is not that long, nil is returned. */) (Lisp_Object n, Lisp_Object list) @@ -1293,7 +1293,7 @@ N counts from zero. If LIST is not that long, nil is returned. */) return Fcar (Fnthcdr (n, list)); } -DEFUN ("elt", Felt, Selt, 2, 2, 0, +DEFUE ("elt", Felt, Selt, 2, 2, 0, doc: /* Return element of SEQUENCE at index N. */) (register Lisp_Object sequence, Lisp_Object n) { @@ -1306,7 +1306,7 @@ DEFUN ("elt", Felt, Selt, 2, 2, 0, return Faref (sequence, n); } -DEFUN ("member", Fmember, Smember, 2, 2, 0, +DEFUE ("member", Fmember, Smember, 2, 2, 0, doc: /* Return non-nil if ELT is an element of LIST. Comparison done with `equal'. The value is actually the tail of LIST whose car is ELT. */) (register Lisp_Object elt, Lisp_Object list) @@ -1324,7 +1324,7 @@ The value is actually the tail of LIST whose car is ELT. */) return Qnil; } -DEFUN ("memq", Fmemq, Smemq, 2, 2, 0, +DEFUE ("memq", Fmemq, Smemq, 2, 2, 0, doc: /* Return non-nil if ELT is an element of LIST. Comparison done with `eq'. The value is actually the tail of LIST whose car is ELT. */) (register Lisp_Object elt, Lisp_Object list) @@ -1372,7 +1372,7 @@ The value is actually the tail of LIST whose car is ELT. */) return Qnil; } -DEFUN ("assq", Fassq, Sassq, 2, 2, 0, +DEFUE ("assq", Fassq, Sassq, 2, 2, 0, doc: /* Return non-nil if KEY is `eq' to the car of an element of LIST. The value is actually the first element of LIST whose car is KEY. Elements of LIST that are not conses are ignored. */) @@ -1418,7 +1418,7 @@ assq_no_quit (Lisp_Object key, Lisp_Object list) return CAR_SAFE (list); } -DEFUN ("assoc", Fassoc, Sassoc, 2, 2, 0, +DEFUE ("assoc", Fassoc, Sassoc, 2, 2, 0, doc: /* Return non-nil if KEY is `equal' to the car of an element of LIST. The value is actually the first element of LIST whose car equals KEY. */) (Lisp_Object key, Lisp_Object list) @@ -1469,7 +1469,7 @@ assoc_no_quit (Lisp_Object key, Lisp_Object list) return CONSP (list) ? XCAR (list) : Qnil; } -DEFUN ("rassq", Frassq, Srassq, 2, 2, 0, +DEFUE ("rassq", Frassq, Srassq, 2, 2, 0, doc: /* Return non-nil if KEY is `eq' to the cdr of an element of LIST. The value is actually the first element of LIST whose cdr is KEY. */) (register Lisp_Object key, Lisp_Object list) @@ -1500,7 +1500,7 @@ The value is actually the first element of LIST whose cdr is KEY. */) return CAR (list); } -DEFUN ("rassoc", Frassoc, Srassoc, 2, 2, 0, +DEFUE ("rassoc", Frassoc, Srassoc, 2, 2, 0, doc: /* Return non-nil if KEY is `equal' to the cdr of an element of LIST. The value is actually the first element of LIST whose cdr equals KEY. */) (Lisp_Object key, Lisp_Object list) @@ -1536,7 +1536,7 @@ The value is actually the first element of LIST whose cdr equals KEY. */) return CAR (list); } -DEFUN ("delq", Fdelq, Sdelq, 2, 2, 0, +DEFUE ("delq", Fdelq, Sdelq, 2, 2, 0, doc: /* Delete by side effect any occurrences of ELT as a member of LIST. The modified LIST is returned. Comparison is done with `eq'. If the first member of LIST is ELT, there is no way to remove it by side effect; @@ -1568,7 +1568,7 @@ to be sure of changing the value of `foo'. */) return list; } -DEFUN ("delete", Fdelete, Sdelete, 2, 2, 0, +DEFUE ("delete", Fdelete, Sdelete, 2, 2, 0, doc: /* Delete by side effect any occurrences of ELT as a member of SEQ. SEQ must be a list, a vector, or a string. The modified SEQ is returned. Comparison is done with `equal'. @@ -1688,7 +1688,7 @@ to be sure of changing the value of `foo'. */) return seq; } -DEFUN ("nreverse", Fnreverse, Snreverse, 1, 1, 0, +DEFUE ("nreverse", Fnreverse, Snreverse, 1, 1, 0, doc: /* Reverse LIST by modifying cdr pointers. Return the reversed list. */) (Lisp_Object list) @@ -1710,7 +1710,7 @@ Return the reversed list. */) return prev; } -DEFUN ("reverse", Freverse, Sreverse, 1, 1, 0, +DEFUE ("reverse", Freverse, Sreverse, 1, 1, 0, doc: /* Reverse LIST, copying. Return the reversed list. See also the function `nreverse', which is used more often. */) (Lisp_Object list) @@ -1728,7 +1728,7 @@ See also the function `nreverse', which is used more often. */) Lisp_Object merge (Lisp_Object org_l1, Lisp_Object org_l2, Lisp_Object pred); -DEFUN ("sort", Fsort, Ssort, 2, 2, 0, +DEFUE ("sort", Fsort, Ssort, 2, 2, 0, doc: /* Sort LIST, stably, comparing elements using PREDICATE. Returns the sorted list. LIST is modified by side effects. PREDICATE is called with two elements of LIST, and should return non-nil @@ -1819,7 +1819,7 @@ merge (Lisp_Object org_l1, Lisp_Object org_l2, Lisp_Object pred) /* This does not check for quits. That is safe since it must terminate. */ -DEFUN ("plist-get", Fplist_get, Splist_get, 2, 2, 0, +DEFUE ("plist-get", Fplist_get, Splist_get, 2, 2, 0, doc: /* Extract a value from a property list. PLIST is a property list, which is a list of the form \(PROP1 VALUE1 PROP2 VALUE2...). This function returns the value @@ -1852,7 +1852,7 @@ properties on the list. This function never signals an error. */) return Qnil; } -DEFUN ("get", Fget, Sget, 2, 2, 0, +DEFUE ("get", Fget, Sget, 2, 2, 0, doc: /* Return the value of SYMBOL's PROPNAME property. This is the last value stored with `(put SYMBOL PROPNAME VALUE)'. */) (Lisp_Object symbol, Lisp_Object propname) @@ -1861,7 +1861,7 @@ This is the last value stored with `(put SYMBOL PROPNAME VALUE)'. */) return Fplist_get (XSYMBOL (symbol)->plist, propname); } -DEFUN ("plist-put", Fplist_put, Splist_put, 3, 3, 0, +DEFUE ("plist-put", Fplist_put, Splist_put, 3, 3, 0, doc: /* Change value in PLIST of PROP to VAL. PLIST is a property list, which is a list of the form \(PROP1 VALUE1 PROP2 VALUE2 ...). PROP is a symbol and VAL is any object. @@ -1894,7 +1894,7 @@ The PLIST is modified by side effects. */) return plist; } -DEFUN ("put", Fput, Sput, 3, 3, 0, +DEFUE ("put", Fput, Sput, 3, 3, 0, doc: /* Store SYMBOL's PROPNAME property with value VALUE. It can be retrieved with `(get SYMBOL PROPNAME)'. */) (Lisp_Object symbol, Lisp_Object propname, Lisp_Object value) @@ -1974,7 +1974,7 @@ Floating-point numbers of equal value are `eql', but they may not be `eq'. */) return EQ (obj1, obj2) ? Qt : Qnil; } -DEFUN ("equal", Fequal, Sequal, 2, 2, 0, +DEFUE ("equal", Fequal, Sequal, 2, 2, 0, doc: /* Return t if two Lisp objects have similar structure and contents. They must have the same data type. Conses are compared by comparing the cars and the cdrs. @@ -2222,7 +2222,7 @@ nconc2 (Lisp_Object s1, Lisp_Object s2) return Fnconc (2, args); } -DEFUN ("nconc", Fnconc, Snconc, 0, MANY, 0, +DEFUE ("nconc", Fnconc, Snconc, 0, MANY, 0, doc: /* Concatenate any number of lists by altering them. Only the last argument is not altered, and need not be a list. usage: (nconc &rest LISTS) */) @@ -2342,7 +2342,7 @@ mapcar1 (EMACS_INT leni, Lisp_Object *vals, Lisp_Object fn, Lisp_Object seq) UNGCPRO; } -DEFUN ("mapconcat", Fmapconcat, Smapconcat, 3, 3, 0, +DEFUE ("mapconcat", Fmapconcat, Smapconcat, 3, 3, 0, doc: /* Apply FUNCTION to each element of SEQUENCE, and concat the results as strings. In between each pair of results, stick in SEPARATOR. Thus, " " as SEPARATOR results in spaces between the values returned by FUNCTION. @@ -2383,7 +2383,7 @@ SEQUENCE may be a list, a vector, a bool-vector, or a string. */) return ret; } -DEFUN ("mapcar", Fmapcar, Smapcar, 2, 2, 0, +DEFUE ("mapcar", Fmapcar, Smapcar, 2, 2, 0, doc: /* Apply FUNCTION to each element of SEQUENCE, and make a list of the results. The result is a list just as long as SEQUENCE. SEQUENCE may be a list, a vector, a bool-vector, or a string. */) @@ -2561,7 +2561,7 @@ SUBFEATURE can be used to check a specific subfeature of FEATURE. */) return (NILP (tem)) ? Qnil : Qt; } -DEFUN ("provide", Fprovide, Sprovide, 1, 2, 0, +DEFUE ("provide", Fprovide, Sprovide, 1, 2, 0, doc: /* Announce that FEATURE is a feature of the current Emacs. The optional argument SUBFEATURES should be a list of symbols listing particular subfeatures supported in this version of FEATURE. */) @@ -2699,7 +2699,7 @@ The normal messages at start and end of loading FILENAME are suppressed. */) bottleneck of Widget operation. Here is their translation to C, for the sole reason of efficiency. */ -DEFUN ("plist-member", Fplist_member, Splist_member, 2, 2, 0, +DEFUE ("plist-member", Fplist_member, Splist_member, 2, 2, 0, doc: /* Return non-nil if PLIST has the property PROP. PLIST is a property list, which is a list of the form \(PROP1 VALUE1 PROP2 VALUE2 ...\). PROP is a symbol. @@ -4248,7 +4248,7 @@ DEFUN ("sxhash", Fsxhash, Ssxhash, 1, 1, 0, } -DEFUN ("make-hash-table", Fmake_hash_table, Smake_hash_table, 0, MANY, 0, +DEFUE ("make-hash-table", Fmake_hash_table, Smake_hash_table, 0, MANY, 0, doc: /* Create and return a new hash table. Arguments are specified as keyword/argument pairs. The following @@ -4436,7 +4436,7 @@ DEFUN ("clrhash", Fclrhash, Sclrhash, 1, 1, 0, } -DEFUN ("gethash", Fgethash, Sgethash, 2, 3, 0, +DEFUE ("gethash", Fgethash, Sgethash, 2, 3, 0, doc: /* Look up KEY in TABLE and return its associated value. If KEY is not found, return DFLT which defaults to nil. */) (Lisp_Object key, Lisp_Object table, Lisp_Object dflt) @@ -4447,7 +4447,7 @@ If KEY is not found, return DFLT which defaults to nil. */) } -DEFUN ("puthash", Fputhash, Sputhash, 3, 3, 0, +DEFUE ("puthash", Fputhash, Sputhash, 3, 3, 0, doc: /* Associate KEY with VALUE in hash table TABLE. If KEY is already present in table, replace its current value with VALUE. */) @@ -4467,7 +4467,7 @@ VALUE. */) } -DEFUN ("remhash", Fremhash, Sremhash, 2, 2, 0, +DEFUE ("remhash", Fremhash, Sremhash, 2, 2, 0, doc: /* Remove KEY from TABLE. */) (Lisp_Object key, Lisp_Object table) { diff --git a/src/font.c b/src/font.c index e01f67a95f6..a31a418e641 100644 --- a/src/font.c +++ b/src/font.c @@ -3762,7 +3762,7 @@ which kind of font it is. It must be one of `font-spec', `font-entity', wrong_type_argument (intern ("font-extra-type"), extra_type); } -DEFUN ("font-spec", Ffont_spec, Sfont_spec, 0, MANY, 0, +DEFUE ("font-spec", Ffont_spec, Sfont_spec, 0, MANY, 0, doc: /* Return a newly created font-spec with arguments as properties. ARGS must come in pairs KEY VALUE of font properties. KEY must be a @@ -3866,7 +3866,7 @@ usage: (font-spec ARGS...) */) return spec; } -DEFUN ("copy-font-spec", Fcopy_font_spec, Scopy_font_spec, 1, 1, 0, +DEFUE ("copy-font-spec", Fcopy_font_spec, Scopy_font_spec, 1, 1, 0, doc: /* Return a copy of FONT as a font-spec. */) (Lisp_Object font) { @@ -3892,7 +3892,7 @@ DEFUN ("copy-font-spec", Fcopy_font_spec, Scopy_font_spec, 1, 1, 0, return new_spec; } -DEFUN ("merge-font-spec", Fmerge_font_spec, Smerge_font_spec, 2, 2, 0, +DEFUE ("merge-font-spec", Fmerge_font_spec, Smerge_font_spec, 2, 2, 0, doc: /* Merge font-specs FROM and TO, and return a new font-spec. Every specified properties in FROM override the corresponding properties in TO. */) @@ -3921,7 +3921,7 @@ properties in TO. */) return to; } -DEFUN ("font-get", Ffont_get, Sfont_get, 2, 2, 0, +DEFUE ("font-get", Ffont_get, Sfont_get, 2, 2, 0, doc: /* Return the value of FONT's property KEY. FONT is a font-spec, a font-entity, or a font-object. KEY is any symbol, but these are reserved for specific meanings: @@ -4053,7 +4053,7 @@ are to be displayed on. If omitted, the selected frame is used. */) #endif -DEFUN ("font-put", Ffont_put, Sfont_put, 3, 3, 0, +DEFUE ("font-put", Ffont_put, Sfont_put, 3, 3, 0, doc: /* Set one property of FONT: give property KEY value VAL. FONT is a font-spec, a font-entity, or a font-object. @@ -4087,7 +4087,7 @@ accepted by `font-spec'. */) return val; } -DEFUN ("list-fonts", Flist_fonts, Slist_fonts, 1, 4, 0, +DEFUE ("list-fonts", Flist_fonts, Slist_fonts, 1, 4, 0, doc: /* List available fonts matching FONT-SPEC on the current frame. Optional 2nd argument FRAME specifies the target frame. Optional 3rd argument NUM, if non-nil, limits the number of returned fonts. @@ -4181,7 +4181,7 @@ Optional 2nd argument FRAME, if non-nil, specifies the target frame. */) return val; } -DEFUN ("font-xlfd-name", Ffont_xlfd_name, Sfont_xlfd_name, 1, 2, 0, +DEFUE ("font-xlfd-name", Ffont_xlfd_name, Sfont_xlfd_name, 1, 2, 0, doc: /* Return XLFD name of FONT. FONT is a font-spec, font-entity, or font-object. If the name is too long for XLFD (maximum 255 chars), return nil. @@ -4403,7 +4403,7 @@ where #if 0 -DEFUN ("font-drive-otf", Ffont_drive_otf, Sfont_drive_otf, 6, 6, 0, +DEFUE ("font-drive-otf", Ffont_drive_otf, Sfont_drive_otf, 6, 6, 0, doc: /* Apply OpenType features on glyph-string GSTRING-IN. OTF-FEATURES specifies which features to apply in this format: (SCRIPT LANGSYS GSUB GPOS) @@ -4473,7 +4473,7 @@ glyph-string. */) return make_number (num); } -DEFUN ("font-otf-alternates", Ffont_otf_alternates, Sfont_otf_alternates, +DEFUE ("font-otf-alternates", Ffont_otf_alternates, Sfont_otf_alternates, 3, 3, 0, doc: /* Return a list of alternate glyphs of CHARACTER in FONT-OBJECT. OTF-FEATURES specifies which features of the font FONT-OBJECT to apply diff --git a/src/fontset.c b/src/fontset.c index eea65535c78..4a9cc9393bf 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -1172,7 +1172,7 @@ fs_query_fontset (Lisp_Object name, int name_pattern) } -DEFUN ("query-fontset", Fquery_fontset, Squery_fontset, 1, 2, 0, +DEFUE ("query-fontset", Fquery_fontset, Squery_fontset, 1, 2, 0, doc: /* Return the name of a fontset that matches PATTERN. The value is nil if there is no matching fontset. PATTERN can contain `*' or `?' as a wildcard @@ -2138,7 +2138,7 @@ dump_fontset (Lisp_Object fontset) return vec; } -DEFUN ("fontset-list-all", Ffontset_list_all, Sfontset_list_all, 0, 0, 0, +DEFUE ("fontset-list-all", Ffontset_list_all, Sfontset_list_all, 0, 0, 0, doc: /* Return a brief summary of all fontsets for debug use. */) (void) { diff --git a/src/frame.c b/src/frame.c index 1b6d36092ae..6e0e9c4ffc0 100644 --- a/src/frame.c +++ b/src/frame.c @@ -225,7 +225,7 @@ return values. */) : Qnil); } -DEFUN ("window-system", Fwindow_system, Swindow_system, 0, 1, 0, +DEFUE ("window-system", Fwindow_system, Swindow_system, 0, 1, 0, doc: /* The name of the window system that FRAME is displaying through. The value is a symbol: nil for a termcap frame (a character-only terminal), @@ -856,7 +856,7 @@ do_switch_frame (Lisp_Object frame, int track, int for_deletion, Lisp_Object nor return frame; } -DEFUN ("select-frame", Fselect_frame, Sselect_frame, 1, 2, "e", +DEFUE ("select-frame", Fselect_frame, Sselect_frame, 1, 2, "e", doc: /* Select FRAME. Subsequent editing commands apply to its selected window. Optional argument NORECORD means to neither change the order of @@ -894,14 +894,14 @@ to that frame. */) return do_switch_frame (event, 0, 0, Qnil); } -DEFUN ("selected-frame", Fselected_frame, Sselected_frame, 0, 0, 0, +DEFUE ("selected-frame", Fselected_frame, Sselected_frame, 0, 0, 0, doc: /* Return the frame that is now selected. */) (void) { return selected_frame; } -DEFUN ("window-frame", Fwindow_frame, Swindow_frame, 1, 1, 0, +DEFUE ("window-frame", Fwindow_frame, Swindow_frame, 1, 1, 0, doc: /* Return the frame object that window WINDOW is on. */) (Lisp_Object window) { @@ -909,7 +909,7 @@ DEFUN ("window-frame", Fwindow_frame, Swindow_frame, 1, 1, 0, return XWINDOW (window)->frame; } -DEFUN ("frame-first-window", Fframe_first_window, Sframe_first_window, 0, 1, 0, +DEFUE ("frame-first-window", Fframe_first_window, Sframe_first_window, 0, 1, 0, doc: /* Returns the topmost, leftmost window of FRAME. If omitted, FRAME defaults to the currently selected frame. */) (Lisp_Object frame) @@ -943,7 +943,7 @@ DEFUN ("active-minibuffer-window", Factive_minibuffer_window, return minibuf_level ? minibuf_window : Qnil; } -DEFUN ("frame-root-window", Fframe_root_window, Sframe_root_window, 0, 1, 0, +DEFUE ("frame-root-window", Fframe_root_window, Sframe_root_window, 0, 1, 0, doc: /* Returns the root-window of FRAME. If omitted, FRAME defaults to the currently selected frame. */) (Lisp_Object frame) @@ -980,7 +980,7 @@ FRAME defaults to the currently selected frame. */) return window; } -DEFUN ("set-frame-selected-window", Fset_frame_selected_window, +DEFUE ("set-frame-selected-window", Fset_frame_selected_window, Sset_frame_selected_window, 2, 3, 0, doc: /* Set selected window of FRAME to WINDOW. If FRAME is nil, use the selected frame. If FRAME is the @@ -1776,7 +1776,7 @@ before calling this function on it, like this. static void make_frame_visible_1 (Lisp_Object); -DEFUN ("make-frame-visible", Fmake_frame_visible, Smake_frame_visible, +DEFUE ("make-frame-visible", Fmake_frame_visible, Smake_frame_visible, 0, 1, "", doc: /* Make the frame FRAME visible (assuming it is an X window). If omitted, FRAME defaults to the currently selected frame. */) @@ -1876,7 +1876,7 @@ displayed in the terminal. */) return Qnil; } -DEFUN ("iconify-frame", Ficonify_frame, Siconify_frame, +DEFUE ("iconify-frame", Ficonify_frame, Siconify_frame, 0, 1, "", doc: /* Make the frame FRAME into an icon. If omitted, FRAME defaults to the currently selected frame. */) @@ -1961,7 +1961,7 @@ DEFUN ("visible-frame-list", Fvisible_frame_list, Svisible_frame_list, } -DEFUN ("raise-frame", Fraise_frame, Sraise_frame, 0, 1, "", +DEFUE ("raise-frame", Fraise_frame, Sraise_frame, 0, 1, "", doc: /* Bring FRAME to the front, so it occludes any frames it overlaps. If FRAME is invisible or iconified, make it visible. If you don't specify a frame, the selected frame is used. @@ -2014,7 +2014,7 @@ doesn't support multiple overlapping frames, this function does nothing. */) } -DEFUN ("redirect-frame-focus", Fredirect_frame_focus, Sredirect_frame_focus, +DEFUE ("redirect-frame-focus", Fredirect_frame_focus, Sredirect_frame_focus, 1, 2, 0, doc: /* Arrange for keystrokes typed at FRAME to be sent to FOCUS-FRAME. In other words, switch-frame events caused by events in FRAME will @@ -2392,7 +2392,7 @@ If FRAME is omitted, return information on the currently selected frame. */) } -DEFUN ("frame-parameter", Fframe_parameter, Sframe_parameter, 2, 2, 0, +DEFUE ("frame-parameter", Fframe_parameter, Sframe_parameter, 2, 2, 0, doc: /* Return FRAME's value for parameter PARAMETER. If FRAME is nil, describe the currently selected frame. */) (Lisp_Object frame, Lisp_Object parameter) @@ -2470,7 +2470,7 @@ If FRAME is nil, describe the currently selected frame. */) } -DEFUN ("modify-frame-parameters", Fmodify_frame_parameters, +DEFUE ("modify-frame-parameters", Fmodify_frame_parameters, Smodify_frame_parameters, 2, 2, 0, doc: /* Modify the parameters of frame FRAME according to ALIST. If FRAME is nil, it defaults to the selected frame. diff --git a/src/image.c b/src/image.c index b3d2be88b96..20ca3cf1d6b 100644 --- a/src/image.c +++ b/src/image.c @@ -137,6 +137,7 @@ static void free_color_table (void); static unsigned long *colors_in_color_table (int *n); static unsigned long lookup_pixel_color (struct frame *f, unsigned long p); #endif +INFUN (Finit_image_library, 2); /* Code to deal with bitmaps. Bitmaps are referenced by their bitmap id, which is just an int that this section returns. Bitmaps are @@ -7869,7 +7870,7 @@ static struct image_type imagemagick_type = }; -DEFUN ("imagemagick-types", Fimagemagick_types, Simagemagick_types, 0, 0, 0, +DEFUE ("imagemagick-types", Fimagemagick_types, Simagemagick_types, 0, 0, 0, doc: /* Return the image types supported by ImageMagick. Note that ImageMagick recognizes many file-types that Emacs does not recognize as images, such as .c. */) @@ -8580,7 +8581,7 @@ x_kill_gs_process (Pixmap pixmap, struct frame *f) #if GLYPH_DEBUG -DEFUN ("imagep", Fimagep, Simagep, 1, 1, 0, +DEFUE ("imagep", Fimagep, Simagep, 1, 1, 0, doc: /* Value is non-nil if SPEC is a valid image specification. */) (Lisp_Object spec) { @@ -8588,7 +8589,7 @@ DEFUN ("imagep", Fimagep, Simagep, 1, 1, 0, } -DEFUN ("lookup-image", Flookup_image, Slookup_image, 1, 1, 0, "") +DEFUE ("lookup-image", Flookup_image, Slookup_image, 1, 1, 0, "") (Lisp_Object spec) { int id = -1; diff --git a/src/indent.c b/src/indent.c index 8732b2ca5cc..84476e7bbdb 100644 --- a/src/indent.c +++ b/src/indent.c @@ -796,7 +796,7 @@ string_display_width (string, beg, end) #endif /* 0 */ -DEFUN ("indent-to", Findent_to, Sindent_to, 1, 2, "NIndent to column: ", +DEFUE ("indent-to", Findent_to, Sindent_to, 1, 2, "NIndent to column: ", doc: /* Indent from point with tabs and spaces until COLUMN is reached. Optional second argument MINIMUM says always do at least MINIMUM spaces even if that goes past COLUMN; by default, MINIMUM is zero. @@ -967,7 +967,7 @@ indented_beyond_p (EMACS_INT pos, EMACS_INT pos_byte, EMACS_INT column) return val >= column; } -DEFUN ("move-to-column", Fmove_to_column, Smove_to_column, 1, 2, "p", +DEFUE ("move-to-column", Fmove_to_column, Smove_to_column, 1, 2, "p", doc: /* Move point to column COLUMN in the current line. Interactively, COLUMN is the value of prefix numeric argument. The column of a character is calculated by adding together the widths @@ -1959,7 +1959,7 @@ vmotion (register EMACS_INT from, register EMACS_INT vtarget, struct window *w) w); } -DEFUN ("vertical-motion", Fvertical_motion, Svertical_motion, 1, 2, 0, +DEFUE ("vertical-motion", Fvertical_motion, Svertical_motion, 1, 2, 0, doc: /* Move point to start of the screen line LINES lines down. If LINES is negative, this means moving up. diff --git a/src/insdel.c b/src/insdel.c index 4bdcb4bc0b7..dd7e3c14335 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -48,7 +48,7 @@ static void adjust_markers_for_replace (EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT); static void adjust_point (EMACS_INT nchars, EMACS_INT nbytes); -Lisp_Object Fcombine_after_change_execute (void); +INFUN (Fcombine_after_change_execute, 0); /* List of elements of the form (BEG-UNCHANGED END-UNCHANGED CHANGE-AMOUNT) describing changes which happened while combine_after_change_calls diff --git a/src/intervals.h b/src/intervals.h index d7c34012e1f..b2d755036ba 100644 --- a/src/intervals.h +++ b/src/intervals.h @@ -315,10 +315,10 @@ EXFUN (Fget_char_property, 3); EXFUN (Fget_text_property, 3); EXFUN (Ftext_properties_at, 2); EXFUN (Fnext_property_change, 3); -EXFUN (Fprevious_property_change, 3); EXFUN (Fadd_text_properties, 4); EXFUN (Fset_text_properties, 4); EXFUN (Fremove_text_properties, 4); +EXFUN (Fremove_list_of_text_properties, 4); EXFUN (Ftext_property_any, 5); EXFUN (Fprevious_single_char_property_change, 4); extern Lisp_Object copy_text_properties (Lisp_Object, Lisp_Object, diff --git a/src/keyboard.c b/src/keyboard.c index 5df4f1b1ff4..97989fc1c15 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -350,7 +350,6 @@ Lisp_Object Qvertical_scroll_bar; Lisp_Object Qmenu_bar; Lisp_Object recursive_edit_unwind (Lisp_Object buffer), command_loop (void); -Lisp_Object Fthis_command_keys (void); Lisp_Object Qextended_command_history; EMACS_TIME timer_check (void); @@ -439,6 +438,7 @@ static void interrupt_signal (int signalnum); #ifdef SIGIO static void input_available_signal (int signo); #endif +INFUN (Fcommand_execute, 4); static void handle_interrupt (void); static void timer_start_idle (void); static void timer_stop_idle (void); @@ -758,7 +758,7 @@ force_auto_save_soon (void) record_asynch_buffer_change (); } -DEFUN ("recursive-edit", Frecursive_edit, Srecursive_edit, 0, 0, "", +DEFUE ("recursive-edit", Frecursive_edit, Srecursive_edit, 0, 0, "", doc: /* Invoke the editor command loop recursively. To get out of the recursive edit, a command can do `(throw 'exit nil)'; that tells this function to return. @@ -1152,7 +1152,7 @@ top_level_1 (Lisp_Object ignore) return Qnil; } -DEFUN ("top-level", Ftop_level, Stop_level, 0, 0, "", +DEFUE ("top-level", Ftop_level, Stop_level, 0, 0, "", doc: /* Exit all recursive editing levels. This also exits all active minibuffers. */) (void) @@ -1170,7 +1170,7 @@ This also exits all active minibuffers. */) Fthrow (Qtop_level, Qnil); } -Lisp_Object Fexit_recursive_edit (void) NO_RETURN; +INFUN (Fexit_recursive_edit, 0) NO_RETURN; DEFUN ("exit-recursive-edit", Fexit_recursive_edit, Sexit_recursive_edit, 0, 0, "", doc: /* Exit from the innermost recursive edit or minibuffer. */) (void) @@ -1181,7 +1181,7 @@ DEFUN ("exit-recursive-edit", Fexit_recursive_edit, Sexit_recursive_edit, 0, 0, error ("No recursive edit is in progress"); } -Lisp_Object Fabort_recursive_edit (void) NO_RETURN; +INFUN (Fabort_recursive_edit, 0) NO_RETURN; DEFUN ("abort-recursive-edit", Fabort_recursive_edit, Sabort_recursive_edit, 0, 0, "", doc: /* Abort the command that requested this recursive edit or minibuffer input. */) (void) @@ -6470,7 +6470,7 @@ modify_event_symbol (EMACS_INT symbol_num, unsigned int modifiers, Lisp_Object s such as (ctrl meta backspace), into the usual representation of that event type as a number or a symbol. */ -DEFUN ("event-convert-list", Fevent_convert_list, Sevent_convert_list, 1, 1, 0, +DEFUE ("event-convert-list", Fevent_convert_list, Sevent_convert_list, 1, 1, 0, doc: /* Convert the event description list EVENT-DESC to an event type. EVENT-DESC should contain one base event type (a character or symbol) and zero or more modifier names (control, meta, hyper, super, shift, alt, @@ -9981,7 +9981,7 @@ read_key_sequence (Lisp_Object *keybuf, size_t bufsize, Lisp_Object prompt, return t; } -DEFUN ("read-key-sequence", Fread_key_sequence, Sread_key_sequence, 1, 5, 0, +DEFUE ("read-key-sequence", Fread_key_sequence, Sread_key_sequence, 1, 5, 0, doc: /* Read a sequence of keystrokes and return as a string or vector. The sequence is sufficient to specify a non-prefix command in the current local and global maps. @@ -10609,7 +10609,7 @@ If FILE is nil, close any open dribble file. */) return Qnil; } -DEFUN ("discard-input", Fdiscard_input, Sdiscard_input, 0, 0, 0, +DEFUE ("discard-input", Fdiscard_input, Sdiscard_input, 0, 0, 0, doc: /* Discard the contents of the terminal input buffer. Also end any kbd macro being defined. */) (void) @@ -10962,7 +10962,8 @@ quit_throw_to_read_char (void) _longjmp (getcjmp, 1); } -DEFUN ("set-input-interrupt-mode", Fset_input_interrupt_mode, Sset_input_interrupt_mode, 1, 1, 0, +DEFUE ("set-input-interrupt-mode", Fset_input_interrupt_mode, + Sset_input_interrupt_mode, 1, 1, 0, doc: /* Set interrupt mode of reading keyboard input. If INTERRUPT is non-nil, Emacs will use input interrupts; otherwise Emacs uses CBREAK mode. @@ -11127,7 +11128,7 @@ See also `current-input-mode'. */) return Qnil; } -DEFUN ("set-input-mode", Fset_input_mode, Sset_input_mode, 3, 4, 0, +DEFUE ("set-input-mode", Fset_input_mode, Sset_input_mode, 3, 4, 0, doc: /* Set mode of reading keyboard input. First arg INTERRUPT non-nil means use input interrupts; nil means use CBREAK mode. diff --git a/src/keymap.c b/src/keymap.c index 10000b935aa..9adf2898736 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -70,6 +70,7 @@ static Lisp_Object where_is_cache; /* Which keymaps are reverse-stored in the cache. */ static Lisp_Object where_is_cache_keymaps; +INFUN (Flookup_key, 3); static Lisp_Object store_in_keymap (Lisp_Object, Lisp_Object, Lisp_Object); static void fix_submap_inheritance (Lisp_Object, Lisp_Object, Lisp_Object); @@ -108,7 +109,7 @@ in case you use it as a menu with `x-popup-menu'. */) Fcons (Fmake_char_table (Qkeymap, Qnil), tail)); } -DEFUN ("make-sparse-keymap", Fmake_sparse_keymap, Smake_sparse_keymap, 0, 1, 0, +DEFUE ("make-sparse-keymap", Fmake_sparse_keymap, Smake_sparse_keymap, 0, 1, 0, doc: /* Construct and return a new sparse keymap. Its car is `keymap' and its cdr is an alist of (CHAR . DEFINITION), which binds the character CHAR to DEFINITION, or (SYMBOL . DEFINITION), @@ -160,7 +161,7 @@ is also allowed as an element. */) return (KEYMAPP (object) ? Qt : Qnil); } -DEFUN ("keymap-prompt", Fkeymap_prompt, Skeymap_prompt, 1, 1, 0, +DEFUE ("keymap-prompt", Fkeymap_prompt, Skeymap_prompt, 1, 1, 0, doc: /* Return the prompt-string of a keymap MAP. If non-nil, the prompt is shown in the echo-area when reading a key-sequence to be looked-up in this keymap. */) @@ -291,7 +292,7 @@ keymap_memberp (Lisp_Object map, Lisp_Object maps) /* Set the parent keymap of MAP to PARENT. */ -DEFUN ("set-keymap-parent", Fset_keymap_parent, Sset_keymap_parent, 2, 2, 0, +DEFUE ("set-keymap-parent", Fset_keymap_parent, Sset_keymap_parent, 2, 2, 0, doc: /* Modify KEYMAP to set its parent map to PARENT. Return PARENT. PARENT should be nil or another keymap. */) (Lisp_Object keymap, Lisp_Object parent) @@ -955,7 +956,7 @@ store_in_keymap (Lisp_Object keymap, register Lisp_Object idx, Lisp_Object def) return def; } -EXFUN (Fcopy_keymap, 1); +INFUN (Fcopy_keymap, 1); static Lisp_Object copy_keymap_item (Lisp_Object elt) @@ -1079,7 +1080,7 @@ is not copied. */) /* GC is possible in this function if it autoloads a keymap. */ -DEFUN ("define-key", Fdefine_key, Sdefine_key, 3, 3, 0, +DEFUE ("define-key", Fdefine_key, Sdefine_key, 3, 3, 0, doc: /* In KEYMAP, define key sequence KEY as DEF. KEYMAP is a keymap. @@ -1210,7 +1211,7 @@ binding KEY to DEF is added at the front of KEYMAP. */) /* This function may GC (it calls Fkey_binding). */ -DEFUN ("command-remapping", Fcommand_remapping, Scommand_remapping, 1, 3, 0, +DEFUE ("command-remapping", Fcommand_remapping, Scommand_remapping, 1, 3, 0, doc: /* Return the remapping for command COMMAND. Returns nil if COMMAND is not remapped (or not a symbol). @@ -1518,7 +1519,7 @@ current_minor_maps (Lisp_Object **modeptr, Lisp_Object **mapptr) return i; } -DEFUN ("current-active-maps", Fcurrent_active_maps, Scurrent_active_maps, +DEFUE ("current-active-maps", Fcurrent_active_maps, Scurrent_active_maps, 0, 2, 0, doc: /* Return a list of the currently active keymaps. OLP if non-nil indicates that we should obey `overriding-local-map' and @@ -1661,7 +1662,7 @@ like in the respective argument of `key-binding'. */) /* GC is possible in this function if it autoloads a keymap. */ -DEFUN ("key-binding", Fkey_binding, Skey_binding, 1, 4, 0, +DEFUE ("key-binding", Fkey_binding, Skey_binding, 1, 4, 0, doc: /* Return the binding for command KEY in current keymaps. KEY is a string or vector, a sequence of keystrokes. The binding is probably a symbol with a function definition. @@ -2178,7 +2179,7 @@ Lisp_Object Qsingle_key_description, Qkey_description; /* This function cannot GC. */ -DEFUN ("key-description", Fkey_description, Skey_description, 1, 2, 0, +DEFUE ("key-description", Fkey_description, Skey_description, 1, 2, 0, doc: /* Return a pretty description of key-sequence KEYS. Optional arg PREFIX is the sequence of keys leading up to KEYS. Control characters turn into "C-foo" sequences, meta into "M-foo", @@ -2397,7 +2398,7 @@ push_key_description (register unsigned int c, register char *p, int force_multi /* This function cannot GC. */ -DEFUN ("single-key-description", Fsingle_key_description, +DEFUE ("single-key-description", Fsingle_key_description, Ssingle_key_description, 1, 2, 0, doc: /* Return a pretty description of command character KEY. Control characters turn into C-whatever, etc. @@ -2675,7 +2676,7 @@ where_is_internal (Lisp_Object definition, Lisp_Object keymaps, /* This function can GC if Flookup_key autoloads any keymaps. */ -DEFUN ("where-is-internal", Fwhere_is_internal, Swhere_is_internal, 1, 5, 0, +DEFUE ("where-is-internal", Fwhere_is_internal, Swhere_is_internal, 1, 5, 0, doc: /* Return list of keys that invoke DEFINITION. If KEYMAP is a keymap, search only KEYMAP and the global keymap. If KEYMAP is nil, search all the currently active keymaps. diff --git a/src/keymap.h b/src/keymap.h index 38c6e986784..2b9d58b39dc 100644 --- a/src/keymap.h +++ b/src/keymap.h @@ -27,7 +27,6 @@ extern Lisp_Object current_global_map; EXFUN (Fmake_sparse_keymap, 1); EXFUN (Fkeymap_prompt, 1); EXFUN (Fdefine_key, 3); -EXFUN (Flookup_key, 3); EXFUN (Fcommand_remapping, 3); EXFUN (Fkey_binding, 4); EXFUN (Fkey_description, 2); @@ -53,4 +52,3 @@ extern void map_keymap_canonical (Lisp_Object map, Lisp_Object args, void *data); #endif - diff --git a/src/lisp.h b/src/lisp.h index 4859862c88f..6a28a0f81b3 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -1804,8 +1804,12 @@ typedef struct { `doc' is documentation for the user. */ /* This version of DEFUN declares a function prototype with the right - arguments, so we can catch errors with maxargs at compile-time. */ -#define DEFUN(lname, fnname, sname, minargs, maxargs, intspec, doc) \ + arguments, so we can catch errors with maxargs at compile-time. + DEFUN defines an internal function, and DEFUE is similar but defines a + external function, which can be used in other C-language modules. */ +#define DEFUN static DEFINE_FUNC +#define DEFUE extern DEFINE_FUNC +#define DEFINE_FUNC(lname, fnname, sname, minargs, maxargs, intspec, doc) \ Lisp_Object fnname DEFUN_ARGS_ ## maxargs ; \ DECL_ALIGN (struct Lisp_Subr, sname) = \ { PVEC_SUBR | (sizeof (struct Lisp_Subr) / sizeof (EMACS_INT)), \ @@ -2279,6 +2283,8 @@ void staticpro (Lisp_Object *); appropriate prototype. */ #define EXFUN(fnname, maxargs) \ extern Lisp_Object fnname DEFUN_ARGS_ ## maxargs +#define INFUN(fnname, maxargs) \ + static Lisp_Object fnname DEFUN_ARGS_ ## maxargs /* Forward declarations for prototypes. */ struct window; @@ -2404,7 +2410,6 @@ extern void init_coding_once (void); extern void syms_of_coding (void); /* Defined in character.c */ -EXFUN (Funibyte_char_to_multibyte, 1); EXFUN (Fchar_width, 1); EXFUN (Fstring, MANY); extern EMACS_INT chars_in_text (const unsigned char *, EMACS_INT); @@ -2428,7 +2433,6 @@ extern void syms_of_composite (void); EXFUN (Fforward_word, 1); EXFUN (Fskip_chars_forward, 2); EXFUN (Fskip_chars_backward, 2); -EXFUN (Fsyntax_table_p, 1); extern void init_syntax_once (void); extern void syms_of_syntax (void); @@ -2529,7 +2533,6 @@ extern void init_fringe_once (void); extern Lisp_Object QCascent, QCmargin, QCrelief, Qcount, Qextension_data; extern Lisp_Object QCconversion, QCcolor_symbols, QCheuristic_mask; extern Lisp_Object QCindex, QCmatrix, QCcolor_adjustment, QCmask; -EXFUN (Finit_image_library, 2); extern int x_bitmap_mask (struct frame *, int); extern void syms_of_image (void); extern void init_image (void); @@ -2790,11 +2793,11 @@ EXFUN (Fread, 1); EXFUN (Fread_from_string, 3); EXFUN (Fintern, 2); EXFUN (Fintern_soft, 2); +EXFUN (Funintern, 2); EXFUN (Fload, 5); EXFUN (Fget_load_suffixes, 0); EXFUN (Fread_char, 3); EXFUN (Fread_event, 3); -EXFUN (Feval_region, 4); extern Lisp_Object check_obarray (Lisp_Object); extern Lisp_Object intern (const char *); extern Lisp_Object intern_c_string (const char *); @@ -2852,7 +2855,6 @@ EXFUN (Feval, 2); extern Lisp_Object eval_sub (Lisp_Object form); EXFUN (Fapply, MANY); EXFUN (Ffuncall, MANY); -EXFUN (Fbacktrace, 0); extern Lisp_Object apply1 (Lisp_Object, Lisp_Object); extern Lisp_Object call0 (Lisp_Object); extern Lisp_Object call1 (Lisp_Object, Lisp_Object); @@ -2877,7 +2879,6 @@ extern void verror (const char *, va_list) NO_RETURN ATTRIBUTE_FORMAT_PRINTF (1, 0); extern void do_autoload (Lisp_Object, Lisp_Object); extern Lisp_Object un_autoload (Lisp_Object); -EXFUN (Ffetch_bytecode, 1); extern void init_eval_once (void); extern Lisp_Object safe_call (size_t, Lisp_Object *); extern Lisp_Object safe_call1 (Lisp_Object, Lisp_Object); @@ -2921,6 +2922,7 @@ EXFUN (Fwiden, 0); EXFUN (Fuser_login_name, 1); EXFUN (Fsystem_name, 0); EXFUN (Fcurrent_time, 0); +EXFUN (Fget_internal_run_time, 0); extern EMACS_INT clip_to_bounds (EMACS_INT, EMACS_INT, EMACS_INT); extern Lisp_Object make_buffer_string (EMACS_INT, EMACS_INT, int); extern Lisp_Object make_buffer_string_both (EMACS_INT, EMACS_INT, EMACS_INT, @@ -2953,7 +2955,6 @@ EXFUN (Fset_buffer, 1); extern Lisp_Object set_buffer_if_live (Lisp_Object); EXFUN (Fbarf_if_buffer_read_only, 0); EXFUN (Fcurrent_buffer, 0); -EXFUN (Fswitch_to_buffer, 2); EXFUN (Fother_buffer, 3); EXFUN (Foverlay_get, 2); EXFUN (Fbuffer_modified_p, 1); @@ -3018,7 +3019,6 @@ EXFUN (Funhandled_file_name_directory, 1); EXFUN (Ffile_directory_p, 1); EXFUN (Fwrite_region, 7); EXFUN (Ffile_readable_p, 1); -EXFUN (Ffile_executable_p, 1); EXFUN (Fread_file_name, 6); extern Lisp_Object close_file_unwind (Lisp_Object); extern Lisp_Object restore_point_unwind (Lisp_Object); @@ -3026,7 +3026,6 @@ extern void report_file_error (const char *, Lisp_Object) NO_RETURN; extern int internal_delete_file (Lisp_Object); extern void syms_of_fileio (void); extern Lisp_Object make_temp_name (Lisp_Object, int); -EXFUN (Fmake_symbolic_link, 3); extern Lisp_Object Qdelete_file; /* Defined in abbrev.c */ @@ -3119,7 +3118,6 @@ extern int input_pending; EXFUN (Fdiscard_input, 0); EXFUN (Frecursive_edit, 0); EXFUN (Ftop_level, 0) NO_RETURN; -EXFUN (Fcommand_execute, 4); extern Lisp_Object menu_bar_items (Lisp_Object); extern Lisp_Object tool_bar_items (Lisp_Object, int *); extern Lisp_Object Qvertical_scroll_bar; @@ -3221,7 +3219,6 @@ extern int running_asynch_code; /* Defined in process.c */ extern Lisp_Object QCtype, Qlocal; -EXFUN (Fget_process, 1); EXFUN (Fget_buffer_process, 1); EXFUN (Fprocess_status, 1); EXFUN (Fkill_process, 2); @@ -3255,7 +3252,6 @@ extern void syms_of_callproc (void); /* Defined in doc.c */ extern Lisp_Object Qfunction_documentation; EXFUN (Fsubstitute_command_keys, 1); -EXFUN (Fdocumentation_property, 3); extern Lisp_Object read_doc_string (Lisp_Object); extern Lisp_Object get_doc_string (Lisp_Object, int, int); extern void syms_of_doc (void); @@ -3263,7 +3259,6 @@ extern int read_bytecode_char (int); /* Defined in bytecode.c */ extern Lisp_Object Qbytecode; -EXFUN (Fbyte_code, 3); extern void syms_of_bytecode (void); extern struct byte_stack *byte_stack_list; #ifdef BYTE_MARK_STACK @@ -3384,7 +3379,6 @@ extern void syms_of_category (void); extern void syms_of_ccl (void); /* Defined in dired.c */ -EXFUN (Ffile_attributes, 2); extern void syms_of_dired (void); extern Lisp_Object directory_files_internal (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, diff --git a/src/lread.c b/src/lread.c index 8777bc34545..7d12f5a85d3 100644 --- a/src/lread.c +++ b/src/lread.c @@ -681,7 +681,7 @@ read_filtered_event (int no_switch_frame, int ascii_required, return val; } -DEFUN ("read-char", Fread_char, Sread_char, 0, 3, 0, +DEFUE ("read-char", Fread_char, Sread_char, 0, 3, 0, doc: /* Read a character from the command input (keyboard or macro). It is returned as a number. If the character has modifiers, they are resolved and reflected to the @@ -714,7 +714,7 @@ floating-point value. */) : make_number (char_resolve_modifier_mask (XINT (val)))); } -DEFUN ("read-event", Fread_event, Sread_event, 0, 3, 0, +DEFUE ("read-event", Fread_event, Sread_event, 0, 3, 0, doc: /* Read an event object from the input stream. If the optional argument PROMPT is non-nil, display that as a prompt. If the optional argument INHERIT-INPUT-METHOD is non-nil and some @@ -950,7 +950,7 @@ load_warn_old_style_backquotes (Lisp_Object file) return Qnil; } -DEFUN ("get-load-suffixes", Fget_load_suffixes, Sget_load_suffixes, 0, 0, 0, +DEFUE ("get-load-suffixes", Fget_load_suffixes, Sget_load_suffixes, 0, 0, 0, doc: /* Return the suffixes that `load' should try if a suffix is \ required. This uses the variables `load-suffixes' and `load-file-rep-suffixes'. */) @@ -972,7 +972,7 @@ This uses the variables `load-suffixes' and `load-file-rep-suffixes'. */) return Fnreverse (lst); } -DEFUN ("load", Fload, Sload, 1, 5, 0, +DEFUE ("load", Fload, Sload, 1, 5, 0, doc: /* Execute a file of Lisp code named FILE. First try FILE with `.elc' appended, then try with `.el', then try FILE unmodified (the exact suffixes in the exact order are @@ -1906,7 +1906,7 @@ This function does not move point. */) } -DEFUN ("read", Fread, Sread, 0, 1, 0, +DEFUE ("read", Fread, Sread, 0, 1, 0, doc: /* Read one Lisp expression as text from STREAM, return as Lisp object. If STREAM is nil, use the value of `standard-input' (which see). STREAM or the value of `standard-input' may be: @@ -1929,7 +1929,7 @@ STREAM or the value of `standard-input' may be: return read_internal_start (stream, Qnil, Qnil); } -DEFUN ("read-from-string", Fread_from_string, Sread_from_string, 1, 3, 0, +DEFUE ("read-from-string", Fread_from_string, Sread_from_string, 1, 3, 0, doc: /* Read one Lisp expression which is represented as text by STRING. Returns a cons: (OBJECT-READ . FINAL-STRING-INDEX). START and END optionally delimit a substring of STRING from which to read; @@ -3654,7 +3654,7 @@ make_symbol (const char *str) : make_string (str, len)); } -DEFUN ("intern", Fintern, Sintern, 1, 2, 0, +DEFUE ("intern", Fintern, Sintern, 1, 2, 0, doc: /* Return the canonical symbol whose name is STRING. If there is none, one is created by this function and returned. A second optional argument specifies the obarray to use; @@ -3700,7 +3700,7 @@ it defaults to the value of `obarray'. */) return sym; } -DEFUN ("intern-soft", Fintern_soft, Sintern_soft, 1, 2, 0, +DEFUE ("intern-soft", Fintern_soft, Sintern_soft, 1, 2, 0, doc: /* Return the canonical symbol named NAME, or nil if none exists. NAME may be a string or a symbol. If it is a symbol, that exact symbol is searched for. @@ -3728,7 +3728,7 @@ it defaults to the value of `obarray'. */) return tem; } -DEFUN ("unintern", Funintern, Sunintern, 1, 2, 0, +DEFUE ("unintern", Funintern, Sunintern, 1, 2, 0, doc: /* Delete the symbol named NAME, if any, from OBARRAY. The value is t if a symbol was found and deleted, nil otherwise. NAME may be a string or a symbol. If it is a symbol, that symbol diff --git a/src/macros.c b/src/macros.c index d90b31b503f..fd771b52dee 100644 --- a/src/macros.c +++ b/src/macros.c @@ -215,7 +215,7 @@ finalize_kbd_macro_chars (void) current_kboard->kbd_macro_end = current_kboard->kbd_macro_ptr; } -DEFUN ("cancel-kbd-macro-events", Fcancel_kbd_macro_events, +DEFUE ("cancel-kbd-macro-events", Fcancel_kbd_macro_events, Scancel_kbd_macro_events, 0, 0, 0, doc: /* Cancel the events added to a keyboard macro for this command. */) (void) @@ -282,7 +282,7 @@ pop_kbd_macro (Lisp_Object info) return Qnil; } -DEFUN ("execute-kbd-macro", Fexecute_kbd_macro, Sexecute_kbd_macro, 1, 3, 0, +DEFUE ("execute-kbd-macro", Fexecute_kbd_macro, Sexecute_kbd_macro, 1, 3, 0, doc: /* Execute MACRO as string of editor command characters. If MACRO is a symbol, its function definition is used. COUNT is a repeat count, or nil for once, or 0 for infinite loop. @@ -391,4 +391,3 @@ This is nil when not executing a keyboard macro. */); DEFVAR_KBOARD ("last-kbd-macro", Vlast_kbd_macro, doc: /* Last kbd macro defined, as a string or vector; nil if none defined. */); } - diff --git a/src/marker.c b/src/marker.c index 7d461099140..b8567c2810f 100644 --- a/src/marker.c +++ b/src/marker.c @@ -420,7 +420,7 @@ buf_bytepos_to_charpos (struct buffer *b, EMACS_INT bytepos) /* Operations on markers. */ -DEFUN ("marker-buffer", Fmarker_buffer, Smarker_buffer, 1, 1, 0, +DEFUE ("marker-buffer", Fmarker_buffer, Smarker_buffer, 1, 1, 0, doc: /* Return the buffer that MARKER points into, or nil if none. Returns nil if MARKER points into a dead buffer. */) (register Lisp_Object marker) @@ -440,7 +440,7 @@ Returns nil if MARKER points into a dead buffer. */) return Qnil; } -DEFUN ("marker-position", Fmarker_position, Smarker_position, 1, 1, 0, +DEFUE ("marker-position", Fmarker_position, Smarker_position, 1, 1, 0, doc: /* Return the position MARKER points at, as a character number. Returns nil if MARKER points nowhere. */) (Lisp_Object marker) @@ -452,7 +452,7 @@ Returns nil if MARKER points nowhere. */) return Qnil; } -DEFUN ("set-marker", Fset_marker, Sset_marker, 2, 3, 0, +DEFUE ("set-marker", Fset_marker, Sset_marker, 2, 3, 0, doc: /* Position MARKER before character number POSITION in BUFFER. BUFFER defaults to the current buffer. If POSITION is nil, makes marker point nowhere. @@ -796,7 +796,7 @@ marker_byte_position (Lisp_Object marker) return i; } -DEFUN ("copy-marker", Fcopy_marker, Scopy_marker, 0, 2, 0, +DEFUE ("copy-marker", Fcopy_marker, Scopy_marker, 0, 2, 0, doc: /* Return a new marker pointing at the same place as MARKER. If argument is a number, makes a new marker pointing at that position in the current buffer. diff --git a/src/menu.c b/src/menu.c index 3bfb74863ae..bf6bb6486bd 100644 --- a/src/menu.c +++ b/src/menu.c @@ -1017,7 +1017,7 @@ find_and_return_menu_selection (FRAME_PTR f, int keymaps, void *client_data) } #endif /* HAVE_NS */ -DEFUN ("x-popup-menu", Fx_popup_menu, Sx_popup_menu, 2, 2, 0, +DEFUE ("x-popup-menu", Fx_popup_menu, Sx_popup_menu, 2, 2, 0, doc: /* Pop up a deck-of-cards menu and return user's selection. POSITION is a position specification. This is either a mouse button event or a list ((XOFFSET YOFFSET) WINDOW) diff --git a/src/minibuf.c b/src/minibuf.c index 54cb9c1acd7..3e8fc0c2424 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -872,7 +872,8 @@ read_minibuf_unwind (Lisp_Object data) } -DEFUN ("read-from-minibuffer", Fread_from_minibuffer, Sread_from_minibuffer, 1, 7, 0, +DEFUE ("read-from-minibuffer", Fread_from_minibuffer, + Sread_from_minibuffer, 1, 7, 0, doc: /* Read a string from the minibuffer, prompting with string PROMPT. The optional second arg INITIAL-CONTENTS is an obsolete alternative to DEFAULT-VALUE. It normally should be nil in new code, except when @@ -949,7 +950,7 @@ and some related functions, which use zero-indexing for POSITION. */) return val; } -DEFUN ("read-minibuffer", Fread_minibuffer, Sread_minibuffer, 1, 2, 0, +DEFUE ("read-minibuffer", Fread_minibuffer, Sread_minibuffer, 1, 2, 0, doc: /* Return a Lisp object read using the minibuffer, unevaluated. Prompt with PROMPT. If non-nil, optional second arg INITIAL-CONTENTS is a string to insert in the minibuffer before reading. @@ -963,7 +964,7 @@ Such arguments are used as in `read-from-minibuffer'.) */) make_number (0), Qnil, 0, 0); } -DEFUN ("eval-minibuffer", Feval_minibuffer, Seval_minibuffer, 1, 2, 0, +DEFUE ("eval-minibuffer", Feval_minibuffer, Seval_minibuffer, 1, 2, 0, doc: /* Return value of Lisp expression read using the minibuffer. Prompt with PROMPT. If non-nil, optional second arg INITIAL-CONTENTS is a string to insert in the minibuffer before reading. @@ -979,7 +980,7 @@ Such arguments are used as in `read-from-minibuffer'.) */) /* Functions that use the minibuffer to read various things. */ -DEFUN ("read-string", Fread_string, Sread_string, 1, 5, 0, +DEFUE ("read-string", Fread_string, Sread_string, 1, 5, 0, doc: /* Read a string from the minibuffer, prompting with string PROMPT. If non-nil, second arg INITIAL-INPUT is a string to insert before reading. This argument has been superseded by DEFAULT-VALUE and should normally @@ -1056,7 +1057,7 @@ Prompt with PROMPT. */) } #endif /* NOTDEF */ -DEFUN ("read-variable", Fread_variable, Sread_variable, 1, 2, 0, +DEFUE ("read-variable", Fread_variable, Sread_variable, 1, 2, 0, doc: /* Read the name of a user variable and return it as a symbol. Prompt with PROMPT. By default, return DEFAULT-VALUE or its first element if it is a list. @@ -1080,7 +1081,7 @@ A user variable is one for which `user-variable-p' returns non-nil. */) return Fintern (name, Qnil); } -DEFUN ("read-buffer", Fread_buffer, Sread_buffer, 1, 3, 0, +DEFUE ("read-buffer", Fread_buffer, Sread_buffer, 1, 3, 0, doc: /* Read the name of a buffer and return as a string. Prompt with PROMPT. Optional second arg DEF is value to return if user enters an empty line. @@ -1616,7 +1617,7 @@ with a space are ignored unless STRING itself starts with a space. */) return Fnreverse (allmatches); } -DEFUN ("completing-read", Fcompleting_read, Scompleting_read, 2, 8, 0, +DEFUE ("completing-read", Fcompleting_read, Scompleting_read, 2, 8, 0, doc: /* Read a string in the minibuffer, with completion. PROMPT is a string to prompt with; normally it ends in a colon and a space. COLLECTION can be a list of strings, an alist, an obarray or a hash table. @@ -1917,7 +1918,7 @@ The arguments STRING and PREDICATE are as in `try-completion', /* Like assoc but assumes KEY is a string, and ignores case if appropriate. */ -DEFUN ("assoc-string", Fassoc_string, Sassoc_string, 2, 3, 0, +DEFUE ("assoc-string", Fassoc_string, Sassoc_string, 2, 3, 0, doc: /* Like `assoc' but specifically for strings (and symbols). This returns the first element of LIST whose car matches the string or diff --git a/src/print.c b/src/print.c index f68f04ac5fa..f039b40aa60 100644 --- a/src/print.c +++ b/src/print.c @@ -526,7 +526,7 @@ static void print_preprocess (Lisp_Object obj); static void print_preprocess_string (INTERVAL interval, Lisp_Object arg); static void print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag); -DEFUN ("terpri", Fterpri, Sterpri, 0, 1, 0, +DEFUE ("terpri", Fterpri, Sterpri, 0, 1, 0, doc: /* Output a newline to stream PRINTCHARFUN. If PRINTCHARFUN is omitted or nil, the value of `standard-output' is used. */) (Lisp_Object printcharfun) @@ -541,7 +541,7 @@ If PRINTCHARFUN is omitted or nil, the value of `standard-output' is used. */) return Qt; } -DEFUN ("prin1", Fprin1, Sprin1, 1, 2, 0, +DEFUE ("prin1", Fprin1, Sprin1, 1, 2, 0, doc: /* Output the printed representation of OBJECT, any Lisp object. Quoting characters are printed when needed to make output that `read' can handle, whenever this is possible. For complex objects, the behavior @@ -579,7 +579,7 @@ is used instead. */) /* a buffer which is used to hold output being built by prin1-to-string */ Lisp_Object Vprin1_to_string_buffer; -DEFUN ("prin1-to-string", Fprin1_to_string, Sprin1_to_string, 1, 2, 0, +DEFUE ("prin1-to-string", Fprin1_to_string, Sprin1_to_string, 1, 2, 0, doc: /* Return a string containing the printed representation of OBJECT. OBJECT can be any Lisp object. This function outputs quoting characters when necessary to make output that `read' can handle, whenever possible, @@ -636,7 +636,7 @@ A printed representation of an object is text which describes that object. */) return unbind_to (count, object); } -DEFUN ("princ", Fprinc, Sprinc, 1, 2, 0, +DEFUE ("princ", Fprinc, Sprinc, 1, 2, 0, doc: /* Output the printed representation of OBJECT, any Lisp object. No quoting characters are used; no delimiters are printed around the contents of strings. @@ -670,7 +670,7 @@ is used instead. */) return object; } -DEFUN ("print", Fprint, Sprint, 1, 2, 0, +DEFUE ("print", Fprint, Sprint, 1, 2, 0, doc: /* Output the printed representation of OBJECT, with newlines around it. Quoting characters are printed when needed to make output that `read' can handle, whenever this is possible. For complex objects, the behavior @@ -813,7 +813,7 @@ safe_debug_print (Lisp_Object arg) } -DEFUN ("error-message-string", Ferror_message_string, Serror_message_string, +DEFUE ("error-message-string", Ferror_message_string, Serror_message_string, 1, 1, 0, doc: /* Convert an error value (ERROR-SYMBOL . DATA) to an error message. See Info anchor `(elisp)Definition of signal' for some details on how this diff --git a/src/process.c b/src/process.c index 624610069d8..ec96c1aa67e 100644 --- a/src/process.c +++ b/src/process.c @@ -235,6 +235,7 @@ static int process_output_skip; #define process_output_delay_count 0 #endif +INFUN (Fget_process, 1); static int keyboard_bit_set (SELECT_TYPE *); static void deactivate_process (Lisp_Object); static void status_notify (struct Lisp_Process *); @@ -782,7 +783,7 @@ nil, indicating the current buffer's process. */) return Qnil; } -DEFUN ("process-status", Fprocess_status, Sprocess_status, 1, 1, 0, +DEFUE ("process-status", Fprocess_status, Sprocess_status, 1, 1, 0, doc: /* Return the status of PROCESS. The returned value is one of the following symbols: run -- for a process that is running. @@ -1083,7 +1084,7 @@ DEFUN ("process-query-on-exit-flag", } #ifdef DATAGRAM_SOCKETS -Lisp_Object Fprocess_datagram_address (Lisp_Object process); +INFUN (Fprocess_datagram_address, 1); #endif DEFUN ("process-contact", Fprocess_contact, Sprocess_contact, @@ -5775,7 +5776,7 @@ don't send the signal. */) return process; } -DEFUN ("kill-process", Fkill_process, Skill_process, 0, 2, 0, +DEFUE ("kill-process", Fkill_process, Skill_process, 0, 2, 0, doc: /* Kill process PROCESS. May be process or name of one. See function `interrupt-process' for more details on usage. */) (Lisp_Object process, Lisp_Object current_group) @@ -6915,7 +6916,7 @@ close_process_descs (void) #endif } -DEFUN ("get-buffer-process", Fget_buffer_process, Sget_buffer_process, 1, 1, 0, +DEFUE ("get-buffer-process", Fget_buffer_process, Sget_buffer_process, 1, 1, 0, doc: /* Return the (or a) process associated with BUFFER. BUFFER may be a buffer or the name of one. */) (register Lisp_Object buffer) @@ -6982,8 +6983,8 @@ kill_buffer_processes (Lisp_Object buffer) #endif /* subprocesses */ } -DEFUN ("waiting-for-user-input-p", Fwaiting_for_user_input_p, Swaiting_for_user_input_p, - 0, 0, 0, +DEFUE ("waiting-for-user-input-p", Fwaiting_for_user_input_p, + Swaiting_for_user_input_p, 0, 0, 0, doc: /* Returns non-nil if Emacs is waiting for input from the user. This is intended for use by asynchronous process output filters and sentinels. */) (void) diff --git a/src/search.c b/src/search.c index d9be8ca0105..34f02e6cd65 100644 --- a/src/search.c +++ b/src/search.c @@ -436,7 +436,7 @@ string_match_1 (Lisp_Object regexp, Lisp_Object string, Lisp_Object start, int p return make_number (string_byte_to_char (string, val)); } -DEFUN ("string-match", Fstring_match, Sstring_match, 2, 3, 0, +DEFUE ("string-match", Fstring_match, Sstring_match, 2, 3, 0, doc: /* Return index of start of first match for REGEXP in STRING, or nil. Matching ignores case if `case-fold-search' is non-nil. If third arg START is non-nil, start search at that index in STRING. @@ -2811,7 +2811,7 @@ match_limit (Lisp_Object num, int beginningp) : search_regs.end[n])); } -DEFUN ("match-beginning", Fmatch_beginning, Smatch_beginning, 1, 1, 0, +DEFUE ("match-beginning", Fmatch_beginning, Smatch_beginning, 1, 1, 0, doc: /* Return position of start of text matched by last search. SUBEXP, a number, specifies which parenthesized expression in the last regexp. @@ -2823,7 +2823,7 @@ Zero means the entire text matched by the whole regexp or whole string. */) return match_limit (subexp, 1); } -DEFUN ("match-end", Fmatch_end, Smatch_end, 1, 1, 0, +DEFUE ("match-end", Fmatch_end, Smatch_end, 1, 1, 0, doc: /* Return position of end of text matched by last search. SUBEXP, a number, specifies which parenthesized expression in the last regexp. @@ -2835,7 +2835,7 @@ Zero means the entire text matched by the whole regexp or whole string. */) return match_limit (subexp, 0); } -DEFUN ("match-data", Fmatch_data, Smatch_data, 0, 3, 0, +DEFUE ("match-data", Fmatch_data, Smatch_data, 0, 3, 0, doc: /* Return a list containing all info on what the last search matched. Element 2N is `(match-beginning N)'; element 2N + 1 is `(match-end N)'. All the elements are markers or nil (nil if the Nth pair didn't match) @@ -2950,7 +2950,7 @@ Return value is undefined if the last search failed. */) But it was ill-conceived: those supposedly-internal markers get exposed via the undo-list, so freeing them here is unsafe. */ -DEFUN ("set-match-data", Fset_match_data, Sset_match_data, 1, 2, 0, +DEFUE ("set-match-data", Fset_match_data, Sset_match_data, 1, 2, 0, doc: /* Set internal data on last search match from elements of LIST. LIST should have been created by calling `match-data' previously. diff --git a/src/syntax.c b/src/syntax.c index 1301c0689ad..819a7542a7b 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -138,6 +138,7 @@ static EMACS_INT find_start_begv; static int find_start_modiff; +INFUN (Fsyntax_table_p, 1); static Lisp_Object skip_chars (int, Lisp_Object, Lisp_Object, int); static Lisp_Object skip_syntaxes (int, Lisp_Object, Lisp_Object); static Lisp_Object scan_lists (EMACS_INT, EMACS_INT, EMACS_INT, int); @@ -1337,7 +1338,7 @@ scan_words (register EMACS_INT from, register EMACS_INT count) return from; } -DEFUN ("forward-word", Fforward_word, Sforward_word, 0, 1, "^p", +DEFUE ("forward-word", Fforward_word, Sforward_word, 0, 1, "^p", doc: /* Move point forward ARG words (backward if ARG is negative). Normally returns t. If an edge of the buffer or a field boundary is reached, point is left there @@ -1366,9 +1367,7 @@ and the function returns nil. Field boundaries are not noticed if return val == orig_val ? Qt : Qnil; } -Lisp_Object skip_chars (int, Lisp_Object, Lisp_Object, int); - -DEFUN ("skip-chars-forward", Fskip_chars_forward, Sskip_chars_forward, 1, 2, 0, +DEFUE ("skip-chars-forward", Fskip_chars_forward, Sskip_chars_forward, 1, 2, 0, doc: /* Move point forward, stopping before a char not in STRING, or at pos LIM. STRING is like the inside of a `[...]' in a regular expression except that `]' is never special and `\\' quotes `^', `-' or `\\' @@ -1383,7 +1382,7 @@ Returns the distance traveled, either zero or positive. */) return skip_chars (1, string, lim, 1); } -DEFUN ("skip-chars-backward", Fskip_chars_backward, Sskip_chars_backward, 1, 2, 0, +DEFUE ("skip-chars-backward", Fskip_chars_backward, Sskip_chars_backward, 1, 2, 0, doc: /* Move point backward, stopping after a char not in STRING, or at pos LIM. See `skip-chars-forward' for details. Returns the distance traveled, either zero or negative. */) diff --git a/src/term.c b/src/term.c index ea856543a7d..3547b9a2ddd 100644 --- a/src/term.c +++ b/src/term.c @@ -2411,7 +2411,7 @@ get_named_tty (const char *name) } -DEFUN ("tty-type", Ftty_type, Stty_type, 0, 1, 0, +DEFUE ("tty-type", Ftty_type, Stty_type, 0, 1, 0, doc: /* Return the type of the tty device that TERMINAL uses. Returns nil if TERMINAL is not on a tty device. diff --git a/src/terminal.c b/src/terminal.c index c5185601fb6..7382622182f 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -305,7 +305,7 @@ delete_terminal (struct terminal *terminal) Lisp_Object Qrun_hook_with_args; static Lisp_Object Qdelete_terminal_functions; -DEFUN ("delete-terminal", Fdelete_terminal, Sdelete_terminal, 0, 2, 0, +DEFUE ("delete-terminal", Fdelete_terminal, Sdelete_terminal, 0, 2, 0, doc: /* Delete TERMINAL by deleting all frames on it and closing the terminal. TERMINAL may be a terminal object, a frame, or nil (meaning the selected frame's terminal). @@ -348,7 +348,7 @@ but if the second argument FORCE is non-nil, you may do so. */) } -DEFUN ("frame-terminal", Fframe_terminal, Sframe_terminal, 0, 1, 0, +DEFUE ("frame-terminal", Fframe_terminal, Sframe_terminal, 0, 1, 0, doc: /* Return the terminal that FRAME is displayed on. If FRAME is nil, the selected frame is used. diff --git a/src/textprop.c b/src/textprop.c index 53f92ec936b..8cd9d580c4c 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -73,6 +73,7 @@ Lisp_Object interval_insert_behind_hooks; Lisp_Object interval_insert_in_front_hooks; static void text_read_only (Lisp_Object) NO_RETURN; +INFUN (Fprevious_property_change, 3); /* Signal a `text-read-only' error. This function makes it easier @@ -544,7 +545,7 @@ interval_of (int position, Lisp_Object object) return find_interval (i, position); } -DEFUN ("text-properties-at", Ftext_properties_at, +DEFUE ("text-properties-at", Ftext_properties_at, Stext_properties_at, 1, 2, 0, doc: /* Return the list of properties of the character at POSITION in OBJECT. If the optional second argument OBJECT is a buffer (or nil, which means @@ -571,7 +572,7 @@ If POSITION is at the end of OBJECT, the value is nil. */) return i->plist; } -DEFUN ("get-text-property", Fget_text_property, Sget_text_property, 2, 3, 0, +DEFUE ("get-text-property", Fget_text_property, Sget_text_property, 2, 3, 0, doc: /* Return the value of POSITION's property PROP, in OBJECT. OBJECT is optional and defaults to the current buffer. If POSITION is at the end of OBJECT, the value is nil. */) @@ -646,7 +647,7 @@ get_char_property_and_overlay (Lisp_Object position, register Lisp_Object prop, return Fget_text_property (position, prop, object); } -DEFUN ("get-char-property", Fget_char_property, Sget_char_property, 2, 3, 0, +DEFUE ("get-char-property", Fget_char_property, Sget_char_property, 2, 3, 0, doc: /* Return the value of POSITION's property PROP, in OBJECT. Both overlay properties and text properties are checked. OBJECT is optional and defaults to the current buffer. @@ -683,7 +684,7 @@ POSITION is at the end of OBJECT, both car and cdr are nil. */) } -DEFUN ("next-char-property-change", Fnext_char_property_change, +DEFUE ("next-char-property-change", Fnext_char_property_change, Snext_char_property_change, 1, 2, 0, doc: /* Return the position of next text property or overlay change. This scans characters forward in the current buffer from POSITION till @@ -708,7 +709,7 @@ LIMIT is a no-op if it is greater than (point-max). */) return Fnext_property_change (position, Qnil, temp); } -DEFUN ("previous-char-property-change", Fprevious_char_property_change, +DEFUE ("previous-char-property-change", Fprevious_char_property_change, Sprevious_char_property_change, 1, 2, 0, doc: /* Return the position of previous text property or overlay change. Scans characters backward in the current buffer from POSITION till it @@ -734,7 +735,7 @@ LIMIT is a no-op if it is less than (point-min). */) } -DEFUN ("next-single-char-property-change", Fnext_single_char_property_change, +DEFUE ("next-single-char-property-change", Fnext_single_char_property_change, Snext_single_char_property_change, 2, 4, 0, doc: /* Return the position of next text property or overlay change for a specific property. Scans characters forward from POSITION till it finds @@ -817,7 +818,7 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT. */) return position; } -DEFUN ("previous-single-char-property-change", +DEFUE ("previous-single-char-property-change", Fprevious_single_char_property_change, Sprevious_single_char_property_change, 2, 4, 0, doc: /* Return the position of previous text property or overlay change for a specific property. @@ -910,7 +911,7 @@ back past position LIMIT; return LIMIT if nothing is found before LIMIT. */) return position; } -DEFUN ("next-property-change", Fnext_property_change, +DEFUE ("next-property-change", Fnext_property_change, Snext_property_change, 1, 3, 0, doc: /* Return the position of next property change. Scans characters forward from POSITION in OBJECT till it finds @@ -974,7 +975,7 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT. */) return make_number (next->position); } -DEFUN ("next-single-property-change", Fnext_single_property_change, +DEFUE ("next-single-property-change", Fnext_single_property_change, Snext_single_property_change, 2, 4, 0, doc: /* Return the position of next property change for a specific property. Scans characters forward from POSITION till it finds @@ -1022,7 +1023,7 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT. */) return make_number (next->position); } -DEFUN ("previous-property-change", Fprevious_property_change, +DEFUE ("previous-property-change", Fprevious_property_change, Sprevious_property_change, 1, 3, 0, doc: /* Return the position of previous property change. Scans characters backwards from POSITION in OBJECT till it finds @@ -1069,7 +1070,7 @@ back past position LIMIT; return LIMIT if nothing is found until LIMIT. */) return make_number (previous->position + LENGTH (previous)); } -DEFUN ("previous-single-property-change", Fprevious_single_property_change, +DEFUE ("previous-single-property-change", Fprevious_single_property_change, Sprevious_single_property_change, 2, 4, 0, doc: /* Return the position of previous property change for a specific property. Scans characters backward from POSITION till it finds @@ -1123,7 +1124,7 @@ back past position LIMIT; return LIMIT if nothing is found until LIMIT. */) /* Callers note, this can GC when OBJECT is a buffer (or nil). */ -DEFUN ("add-text-properties", Fadd_text_properties, +DEFUE ("add-text-properties", Fadd_text_properties, Sadd_text_properties, 3, 4, 0, doc: /* Add properties to the text from START to END. The third argument PROPERTIES is a property list @@ -1232,7 +1233,7 @@ Return t if any property value actually changed, nil otherwise. */) /* Callers note, this can GC when OBJECT is a buffer (or nil). */ -DEFUN ("put-text-property", Fput_text_property, +DEFUE ("put-text-property", Fput_text_property, Sput_text_property, 4, 5, 0, doc: /* Set one property of the text from START to END. The third and fourth arguments PROPERTY and VALUE @@ -1248,7 +1249,7 @@ markers). If OBJECT is a string, START and END are 0-based indices into it. */ return Qnil; } -DEFUN ("set-text-properties", Fset_text_properties, +DEFUE ("set-text-properties", Fset_text_properties, Sset_text_properties, 3, 4, 0, doc: /* Completely replace properties of text from START to END. The third argument PROPERTIES is the new property list. @@ -1415,7 +1416,7 @@ set_text_properties_1 (Lisp_Object start, Lisp_Object end, Lisp_Object propertie while (len > 0); } -DEFUN ("remove-text-properties", Fremove_text_properties, +DEFUE ("remove-text-properties", Fremove_text_properties, Sremove_text_properties, 3, 4, 0, doc: /* Remove some properties from text from START to END. The third argument PROPERTIES is a property list @@ -1505,7 +1506,7 @@ Use `set-text-properties' if you want to remove all text properties. */) } } -DEFUN ("remove-list-of-text-properties", Fremove_list_of_text_properties, +DEFUE ("remove-list-of-text-properties", Fremove_list_of_text_properties, Sremove_list_of_text_properties, 3, 4, 0, doc: /* Remove some properties from text from START to END. The third argument LIST-OF-PROPERTIES is a list of property names to remove. @@ -1615,7 +1616,7 @@ Return t if any property was actually removed, nil otherwise. */) } } -DEFUN ("text-property-any", Ftext_property_any, +DEFUE ("text-property-any", Ftext_property_any, Stext_property_any, 4, 5, 0, doc: /* Check text from START to END for property PROPERTY equalling VALUE. If so, return the position of the first character whose property PROPERTY diff --git a/src/undo.c b/src/undo.c index d11cd6f5570..b310133900c 100644 --- a/src/undo.c +++ b/src/undo.c @@ -270,7 +270,7 @@ record_property_change (EMACS_INT beg, EMACS_INT length, current_buffer = obuf; } -DEFUN ("undo-boundary", Fundo_boundary, Sundo_boundary, 0, 0, 0, +DEFUE ("undo-boundary", Fundo_boundary, Sundo_boundary, 0, 0, 0, doc: /* Mark a boundary between units of undo. An undo command will stop at this point, but another undo command will undo to the previous boundary. */) @@ -711,4 +711,3 @@ so it must make sure not to do a lot of consing. */); doc: /* Non-nil means do not record `point' in `buffer-undo-list'. */); undo_inhibit_record_point = 0; } - diff --git a/src/window.c b/src/window.c index a8a6fceaaee..72ab2a3ea10 100644 --- a/src/window.c +++ b/src/window.c @@ -216,7 +216,7 @@ make_window (void) return val; } -DEFUN ("selected-window", Fselected_window, Sselected_window, 0, 0, 0, +DEFUE ("selected-window", Fselected_window, Sselected_window, 0, 0, 0, doc: /* Return the window that the cursor now appears in and commands apply to. */) (void) { @@ -235,7 +235,8 @@ used by that frame. */) return FRAME_MINIBUF_WINDOW (XFRAME (frame)); } -DEFUN ("window-minibuffer-p", Fwindow_minibuffer_p, Swindow_minibuffer_p, 0, 1, 0, +DEFUE ("window-minibuffer-p", Fwindow_minibuffer_p, + Swindow_minibuffer_p, 0, 1, 0, doc: /* Return non-nil if WINDOW is a minibuffer window. WINDOW defaults to the selected window. */) (Lisp_Object window) @@ -245,7 +246,7 @@ WINDOW defaults to the selected window. */) } -DEFUN ("pos-visible-in-window-p", Fpos_visible_in_window_p, +DEFUE ("pos-visible-in-window-p", Fpos_visible_in_window_p, Spos_visible_in_window_p, 0, 3, 0, doc: /* Return non-nil if position POS is currently on the frame in WINDOW. Return nil if that position is scrolled vertically out of view. @@ -442,7 +443,7 @@ decode_any_window (register Lisp_Object window) return XWINDOW (window); } -DEFUN ("window-buffer", Fwindow_buffer, Swindow_buffer, 0, 1, 0, +DEFUE ("window-buffer", Fwindow_buffer, Swindow_buffer, 0, 1, 0, doc: /* Return the buffer that WINDOW is displaying. WINDOW defaults to the selected window. */) (Lisp_Object window) @@ -1196,7 +1197,7 @@ if it isn't already recorded. */) return value; } -DEFUN ("set-window-point", Fset_window_point, Sset_window_point, 2, 2, 0, +DEFUE ("set-window-point", Fset_window_point, Sset_window_point, 2, 2, 0, doc: /* Make point value in WINDOW be at position POS in WINDOW's buffer. Return POS. */) (Lisp_Object window, Lisp_Object pos) @@ -1243,7 +1244,7 @@ overriding motion of point in order to display at this exact start. */) } -DEFUN ("window-dedicated-p", Fwindow_dedicated_p, Swindow_dedicated_p, +DEFUE ("window-dedicated-p", Fwindow_dedicated_p, Swindow_dedicated_p, 0, 1, 0, doc: /* Return non-nil when WINDOW is dedicated to its buffer. More precisely, return the value assigned by the last call of @@ -1484,7 +1485,7 @@ and so is its new parent, we should make replacement's children be children of that parent instead. ***/ } -DEFUN ("delete-window", Fdelete_window, Sdelete_window, 0, 1, "", +DEFUE ("delete-window", Fdelete_window, Sdelete_window, 0, 1, "", doc: /* Remove WINDOW from its frame. WINDOW defaults to the selected window. Return nil. Signal an error when WINDOW is the only window on its frame. */) @@ -1945,7 +1946,7 @@ next_window (Lisp_Object window, Lisp_Object minibuf, Lisp_Object all_frames, in } -DEFUN ("next-window", Fnext_window, Snext_window, 0, 3, 0, +DEFUE ("next-window", Fnext_window, Snext_window, 0, 3, 0, doc: /* Return window following WINDOW in cyclic ordering of windows. WINDOW defaults to the selected window. The optional arguments MINIBUF and ALL-FRAMES specify the set of windows to consider. @@ -2396,7 +2397,7 @@ If FRAME is a frame, search only that frame. */) frame); } -DEFUN ("get-buffer-window", Fget_buffer_window, Sget_buffer_window, 0, 2, 0, +DEFUE ("get-buffer-window", Fget_buffer_window, Sget_buffer_window, 0, 2, 0, doc: /* Return a window currently displaying BUFFER-OR-NAME, or nil if none. BUFFER-OR-NAME may be a buffer or a buffer name and defaults to the current buffer. @@ -3275,8 +3276,10 @@ change_window_heights (Lisp_Object window, int n) int window_select_count; -EXFUN (Fset_window_fringes, 4); -EXFUN (Fset_window_scroll_bars, 4); +INFUN (Fset_window_margins, 3); +INFUN (Fset_window_fringes, 4); +INFUN (Fset_window_scroll_bars, 4); +INFUN (Fset_window_vscroll, 3); static void run_funs (Lisp_Object funs) @@ -3441,7 +3444,7 @@ set_window_buffer (Lisp_Object window, Lisp_Object buffer, int run_hooks_p, int } -DEFUN ("set-window-buffer", Fset_window_buffer, Sset_window_buffer, 2, 3, 0, +DEFUE ("set-window-buffer", Fset_window_buffer, Sset_window_buffer, 2, 3, 0, doc: /* Make WINDOW display BUFFER-OR-NAME as its contents. WINDOW defaults to the selected window. BUFFER-OR-NAME must be a buffer or the name of an existing buffer. Optional third argument KEEP-MARGINS @@ -3571,7 +3574,7 @@ select_window (Lisp_Object window, Lisp_Object norecord, int inhibit_point_swap) /* Note that selected_window can be nil when this is called from Fset_window_configuration. */ -DEFUN ("select-window", Fselect_window, Sselect_window, 1, 2, 0, +DEFUE ("select-window", Fselect_window, Sselect_window, 1, 2, 0, doc: /* Select WINDOW. Most editing will apply to WINDOW's buffer. If WINDOW is not already selected, make WINDOW's buffer current and make WINDOW the frame's selected window. Return WINDOW. @@ -5499,7 +5502,7 @@ displayed_window_lines (struct window *w) } -DEFUN ("recenter", Frecenter, Srecenter, 0, 1, "P", +DEFUE ("recenter", Frecenter, Srecenter, 0, 1, "P", doc: /* Center point in selected window and maybe redisplay frame. With prefix argument ARG, recenter putting point on screen line ARG relative to the selected window. If ARG is negative, it counts up from the @@ -5852,7 +5855,7 @@ DEFUN ("window-configuration-frame", Fwindow_configuration_frame, Swindow_config return XWINDOW (SAVED_WINDOW_N (saved_windows, 0)->window)->frame; } -DEFUN ("set-window-configuration", Fset_window_configuration, +DEFUE ("set-window-configuration", Fset_window_configuration, Sset_window_configuration, 1, 1, 0, doc: /* Set the configuration of windows and buffers as specified by CONFIGURATION. CONFIGURATION must be a value previously returned @@ -6349,7 +6352,7 @@ save_window_save (Lisp_Object window, struct Lisp_Vector *vector, int i) return i; } -DEFUN ("current-window-configuration", Fcurrent_window_configuration, +DEFUE ("current-window-configuration", Fcurrent_window_configuration, Scurrent_window_configuration, 0, 1, 0, doc: /* Return an object representing the current window configuration of FRAME. If FRAME is nil or omitted, use the selected frame. @@ -6541,7 +6544,7 @@ as nil. */) Fringes ***********************************************************************/ -DEFUN ("set-window-fringes", Fset_window_fringes, Sset_window_fringes, +DEFUE ("set-window-fringes", Fset_window_fringes, Sset_window_fringes, 2, 4, 0, doc: /* Set the fringe widths of window WINDOW. If WINDOW is nil, set the fringe widths of the currently selected @@ -6607,8 +6610,8 @@ Value is a list of the form (LEFT-WIDTH RIGHT-WIDTH OUTSIDE-MARGINS). */) Scroll bars ***********************************************************************/ -DEFUN ("set-window-scroll-bars", Fset_window_scroll_bars, Sset_window_scroll_bars, - 2, 4, 0, +DEFUE ("set-window-scroll-bars", Fset_window_scroll_bars, + Sset_window_scroll_bars, 2, 4, 0, doc: /* Set width and type of scroll bars of window WINDOW. If window is nil, set scroll bars of the currently selected window. Second parameter WIDTH specifies the pixel width for the scroll bar; diff --git a/src/window.h b/src/window.h index ad627aca340..e2e7a7f691f 100644 --- a/src/window.h +++ b/src/window.h @@ -763,8 +763,6 @@ extern Lisp_Object Vmouse_event; EXFUN (Fnext_window, 3); EXFUN (Fselect_window, 2); EXFUN (Fset_window_buffer, 3); -EXFUN (Fset_window_vscroll, 3); -EXFUN (Fset_window_margins, 3); EXFUN (Fset_window_point, 2); extern Lisp_Object make_window (void); extern Lisp_Object window_from_coordinates (struct frame *, int, int, diff --git a/src/xdisp.c b/src/xdisp.c index 6fd3945511b..7553841f51b 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -16377,7 +16377,7 @@ dump_glyph_row (row, vpos, glyphs) } -DEFUN ("dump-glyph-matrix", Fdump_glyph_matrix, +DEFUE ("dump-glyph-matrix", Fdump_glyph_matrix, Sdump_glyph_matrix, 0, 1, "p", doc: /* Dump the current matrix of the selected window to stderr. Shows contents of glyph row structures. With non-nil @@ -16399,7 +16399,7 @@ glyphs in short form, otherwise show glyphs in long form. */) } -DEFUN ("dump-frame-glyph-matrix", Fdump_frame_glyph_matrix, +DEFUE ("dump-frame-glyph-matrix", Fdump_frame_glyph_matrix, Sdump_frame_glyph_matrix, 0, 0, "", doc: /* */) (void) { @@ -16409,7 +16409,7 @@ DEFUN ("dump-frame-glyph-matrix", Fdump_frame_glyph_matrix, } -DEFUN ("dump-glyph-row", Fdump_glyph_row, Sdump_glyph_row, 1, 2, "", +DEFUE ("dump-glyph-row", Fdump_glyph_row, Sdump_glyph_row, 1, 2, "", doc: /* Dump glyph row ROW to stderr. GLYPH 0 means don't dump glyphs. GLYPH 1 means dump glyphs in short form. @@ -16430,7 +16430,7 @@ GLYPH > 1 or omitted means dump glyphs in long form. */) } -DEFUN ("dump-tool-bar-row", Fdump_tool_bar_row, Sdump_tool_bar_row, 1, 2, "", +DEFUE ("dump-tool-bar-row", Fdump_tool_bar_row, Sdump_tool_bar_row, 1, 2, "", doc: /* Dump glyph row ROW of the tool-bar of the current frame to stderr. GLYPH 0 means don't dump glyphs. GLYPH 1 means dump glyphs in short form. @@ -16450,7 +16450,7 @@ GLYPH > 1 or omitted means dump glyphs in long form. */) } -DEFUN ("trace-redisplay", Ftrace_redisplay, Strace_redisplay, 0, 1, "P", +DEFUE ("trace-redisplay", Ftrace_redisplay, Strace_redisplay, 0, 1, "P", doc: /* Toggle tracing of redisplay. With ARG, turn tracing on if and only if ARG is positive. */) (Lisp_Object arg) @@ -16467,7 +16467,7 @@ With ARG, turn tracing on if and only if ARG is positive. */) } -DEFUN ("trace-to-stderr", Ftrace_to_stderr, Strace_to_stderr, 1, MANY, "", +DEFUE ("trace-to-stderr", Ftrace_to_stderr, Strace_to_stderr, 1, MANY, "", doc: /* Like `format', but print result to stderr. usage: (trace-to-stderr STRING &rest OBJECTS) */) (size_t nargs, Lisp_Object *args) diff --git a/src/xfaces.c b/src/xfaces.c index 8a64855bd8f..eb2065d4637 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -557,7 +557,7 @@ unregister_colors (pixels, n) } -DEFUN ("dump-colors", Fdump_colors, Sdump_colors, 0, 0, 0, +DEFUE ("dump-colors", Fdump_colors, Sdump_colors, 0, 0, 0, doc: /* Dump currently allocated colors to stderr. */) (void) { @@ -874,7 +874,7 @@ clear_face_cache (int clear_fonts_p) } -DEFUN ("clear-face-cache", Fclear_face_cache, Sclear_face_cache, 0, 1, 0, +DEFUE ("clear-face-cache", Fclear_face_cache, Sclear_face_cache, 0, 1, 0, doc: /* Clear face caches on all frames. Optional THOROUGHLY non-nil means try to free unused fonts, too. */) (Lisp_Object thoroughly) @@ -6363,7 +6363,7 @@ dump_realized_face (face) } -DEFUN ("dump-face", Fdump_face, Sdump_face, 0, 1, 0, doc: /* */) +DEFUE ("dump-face", Fdump_face, Sdump_face, 0, 1, 0, doc: /* */) (Lisp_Object n) { if (NILP (n)) @@ -6396,7 +6396,7 @@ DEFUN ("dump-face", Fdump_face, Sdump_face, 0, 1, 0, doc: /* */) } -DEFUN ("show-face-resources", Fshow_face_resources, Sshow_face_resources, +DEFUE ("show-face-resources", Fshow_face_resources, Sshow_face_resources, 0, 0, 0, doc: /* */) (void) { diff --git a/src/xfns.c b/src/xfns.c index 04b8e44b561..8d8a908222f 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -3520,7 +3520,7 @@ x_get_focus_frame (struct frame *frame) policy. But I think it's okay to use when it's clearly done following a user-command. */ -DEFUN ("x-focus-frame", Fx_focus_frame, Sx_focus_frame, 1, 1, 0, +DEFUE ("x-focus-frame", Fx_focus_frame, Sx_focus_frame, 1, 1, 0, doc: /* Set the input focus to FRAME. FRAME nil means use the selected frame. */) (Lisp_Object frame) @@ -3573,7 +3573,7 @@ DEFUN ("xw-color-values", Fxw_color_values, Sxw_color_values, 1, 2, 0, return Qnil; } -DEFUN ("xw-display-color-p", Fxw_display_color_p, Sxw_display_color_p, 0, 1, 0, +DEFUE ("xw-display-color-p", Fxw_display_color_p, Sxw_display_color_p, 0, 1, 0, doc: /* Internal function called by `display-color-p', which see. */) (Lisp_Object terminal) { @@ -3595,7 +3595,7 @@ DEFUN ("xw-display-color-p", Fxw_display_color_p, Sxw_display_color_p, 0, 1, 0, } } -DEFUN ("x-display-grayscale-p", Fx_display_grayscale_p, Sx_display_grayscale_p, +DEFUE ("x-display-grayscale-p", Fx_display_grayscale_p, Sx_display_grayscale_p, 0, 1, 0, doc: /* Return t if the X display supports shades of gray. Note that color displays do support shades of gray. @@ -5229,7 +5229,7 @@ Text larger than the specified size is clipped. */) } -DEFUN ("x-hide-tip", Fx_hide_tip, Sx_hide_tip, 0, 0, 0, +DEFUE ("x-hide-tip", Fx_hide_tip, Sx_hide_tip, 0, 0, 0, doc: /* Hide the current tooltip window, if there is any. Value is t if tooltip was open, nil otherwise. */) (void) diff --git a/src/xmenu.c b/src/xmenu.c index b1f7dfb26bc..595ae795282 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -203,7 +203,7 @@ mouse_position_for_popup (FRAME_PTR f, int *x, int *y) #ifdef HAVE_MENUS -DEFUN ("x-popup-dialog", Fx_popup_dialog, Sx_popup_dialog, 2, 3, 0, +DEFUE ("x-popup-dialog", Fx_popup_dialog, Sx_popup_dialog, 2, 3, 0, doc: /* Pop up a dialog box and return user's selection. POSITION specifies which frame to use. This is normally a mouse button event or a window or frame. diff --git a/src/xsettings.c b/src/xsettings.c index 097b2477e03..da6d088db15 100644 --- a/src/xsettings.c +++ b/src/xsettings.c @@ -718,8 +718,8 @@ DEFUN ("font-get-system-font", Ffont_get_system_font, Sfont_get_system_font, : Qnil; } -DEFUN ("tool-bar-get-system-style", Ftool_bar_get_system_style, Stool_bar_get_system_style, - 0, 0, 0, +DEFUE ("tool-bar-get-system-style", Ftool_bar_get_system_style, + Stool_bar_get_system_style, 0, 0, 0, doc: /* Get the system tool bar style. If no system tool bar style is known, return `tool-bar-style' if set to a known style. Otherwise return image. */) -- cgit v1.2.1 From 95c82688bc8063f0be5a04baee5ea2a18f9ddf6b Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 10 Apr 2011 18:47:57 -0700 Subject: * lisp.h (DEFINE_FUNC): Make sname 'static'. --- src/ChangeLog | 3 +++ src/lisp.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 56bb83e0314..8d492d1cdf5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-04-11 Paul Eggert + * lisp.h (DEFINE_FUNC): Make sname 'static'. + 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. @@ -16,6 +18,7 @@ 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: diff --git a/src/lisp.h b/src/lisp.h index 6a28a0f81b3..10fc66f4406 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -1811,7 +1811,7 @@ typedef struct { #define DEFUE extern DEFINE_FUNC #define DEFINE_FUNC(lname, fnname, sname, minargs, maxargs, intspec, doc) \ Lisp_Object fnname DEFUN_ARGS_ ## maxargs ; \ - DECL_ALIGN (struct Lisp_Subr, sname) = \ + static DECL_ALIGN (struct Lisp_Subr, sname) = \ { PVEC_SUBR | (sizeof (struct Lisp_Subr) / sizeof (EMACS_INT)), \ { .a ## maxargs = fnname }, \ minargs, maxargs, lname, intspec, 0}; \ -- cgit v1.2.1 From 955cbe7b1720f09b2991b7d981147d9cc79d52e3 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 10 Apr 2011 20:39:45 -0700 Subject: Declare Lisp_Object Q* variables to be 'static' if not exproted. This makes it easier for human readers (and static analyzers) to see whether these variables are used from other modules. * alloc.c, buffer.c, bytecode.c, callint.c, casetab.c, category.c: * ccl.c, character.c, charset.c, cmds.c, coding.c, composite.c: * data.c, dbusbind.c, dired.c, editfns.c, eval.c, fileio.c, fns.c: * font.c, frame.c, fringe.c, ftfont.c, image.c, keyboard.c, keymap.c: * lread.c, macros.c, minibuf.c, print.c, process.c, search.c: * sound.c, syntax.c, textprop.c, window.c, xdisp.c, xfaces.c, xfns.c: * xmenu.c, xselect.c: Declare Q* vars static if they are not used in other modules. * ccl.h, character.h, charset.h, coding.h, composite.h, font.h: * frame.h, intervals.h, keyboard.h, lisp.h, process.h, syntax.h: Remove decls of unexported vars. * keyboard.h (EVENT_HEAD_UNMODIFIED): Remove now-unused macro. --- src/ChangeLog | 16 ++++++++++ src/alloc.c | 5 ++-- src/buffer.c | 23 +++++++------- src/bytecode.c | 1 - src/callint.c | 9 +++--- src/casetab.c | 2 +- src/category.c | 2 +- src/ccl.c | 8 ++--- src/ccl.h | 5 ---- src/character.c | 2 +- src/character.h | 2 +- src/charset.c | 10 +++---- src/charset.h | 2 +- src/cmds.c | 4 +-- src/coding.c | 35 ++++++++++++---------- src/coding.h | 4 +-- src/composite.c | 4 +-- src/composite.h | 2 -- src/data.c | 27 ++++++++++------- src/dbusbind.c | 58 +++++++++++++++++------------------ src/dired.c | 14 ++++----- src/editfns.c | 4 +-- src/eval.c | 9 +++--- src/fileio.c | 83 +++++++++++++++++++++++++------------------------- src/fns.c | 16 +++++----- src/font.c | 10 ++++--- src/font.h | 3 +- src/frame.c | 17 ++++++----- src/frame.h | 3 +- src/fringe.c | 6 ++-- src/ftfont.c | 2 +- src/image.c | 30 +++++++++++-------- src/intervals.h | 6 ++-- src/keyboard.c | 93 ++++++++++++++++++++++++++++++++------------------------- src/keyboard.h | 13 ++------ src/keymap.c | 9 +++--- src/lisp.h | 34 +++++++++------------ src/lread.c | 25 ++++++++-------- src/macros.c | 3 +- src/minibuf.c | 28 ++++++++--------- src/print.c | 6 ++-- src/process.c | 26 ++++++++-------- src/process.h | 3 +- src/search.c | 4 +-- src/sound.c | 6 ++-- src/syntax.c | 3 +- src/syntax.h | 2 -- src/textprop.c | 11 ++++--- src/window.c | 11 +++---- src/xdisp.c | 63 ++++++++++++++++++++------------------ src/xfaces.c | 57 +++++++++++++++++++---------------- src/xfns.c | 8 ++--- src/xmenu.c | 2 +- src/xselect.c | 8 ++--- 54 files changed, 441 insertions(+), 398 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 8d492d1cdf5..0be406a6e7b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,21 @@ 2011-04-11 Paul Eggert + Declare Lisp_Object Q* variables to be 'static' if not exproted. + This makes it easier for human readers (and static analyzers) + to see whether these variables are used from other modules. + * alloc.c, buffer.c, bytecode.c, callint.c, casetab.c, category.c: + * ccl.c, character.c, charset.c, cmds.c, coding.c, composite.c: + * data.c, dbusbind.c, dired.c, editfns.c, eval.c, fileio.c, fns.c: + * font.c, frame.c, fringe.c, ftfont.c, image.c, keyboard.c, keymap.c: + * lread.c, macros.c, minibuf.c, print.c, process.c, search.c: + * sound.c, syntax.c, textprop.c, window.c, xdisp.c, xfaces.c, xfns.c: + * xmenu.c, xselect.c: + Declare Q* vars static if they are not used in other modules. + * ccl.h, character.h, charset.h, coding.h, composite.h, font.h: + * frame.h, intervals.h, keyboard.h, lisp.h, process.h, syntax.h: + Remove decls of unexported vars. + * keyboard.h (EVENT_HEAD_UNMODIFIED): Remove now-unused macro. + * lisp.h (DEFINE_FUNC): Make sname 'static'. Make Emacs functions such as Fatom 'static' by default. diff --git a/src/alloc.c b/src/alloc.c index 1396586ba3e..ad3dfa96cd2 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -264,11 +264,12 @@ static size_t stack_copy_size; static int ignore_warnings; -Lisp_Object Qgc_cons_threshold, Qchar_table_extra_slots; +static Lisp_Object Qgc_cons_threshold; +Lisp_Object Qchar_table_extra_slots; /* Hook run after GC has finished. */ -Lisp_Object Qpost_gc_hook; +static Lisp_Object Qpost_gc_hook; static void mark_buffer (Lisp_Object); static void mark_terminals (void); diff --git a/src/buffer.c b/src/buffer.c index a88afbb36e6..82913ac20e7 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -113,30 +113,31 @@ static void reset_buffer_local_variables (struct buffer *b, int permanent_too); to prevent lossage due to user rplac'ing this alist or its elements. */ Lisp_Object Vbuffer_alist; -Lisp_Object Qkill_buffer_query_functions; +static Lisp_Object Qkill_buffer_query_functions; /* Hook run before changing a major mode. */ -Lisp_Object Qchange_major_mode_hook; +static Lisp_Object Qchange_major_mode_hook; Lisp_Object Qfirst_change_hook; Lisp_Object Qbefore_change_functions; Lisp_Object Qafter_change_functions; -Lisp_Object Qucs_set_table_for_input; +static Lisp_Object Qucs_set_table_for_input; -Lisp_Object Qfundamental_mode, Qmode_class, Qpermanent_local; -Lisp_Object Qpermanent_local_hook; +static Lisp_Object Qfundamental_mode, Qmode_class, Qpermanent_local; +static Lisp_Object Qpermanent_local_hook; -Lisp_Object Qprotected_field; +static Lisp_Object Qprotected_field; -Lisp_Object QSFundamental; /* A string "Fundamental" */ +static Lisp_Object QSFundamental; /* A string "Fundamental" */ -Lisp_Object Qkill_buffer_hook; +static Lisp_Object Qkill_buffer_hook; -Lisp_Object Qget_file_buffer; +static Lisp_Object Qget_file_buffer; -Lisp_Object Qoverlayp; +static Lisp_Object Qoverlayp; -Lisp_Object Qpriority, Qevaporate, Qbefore_string, Qafter_string; +Lisp_Object Qpriority, Qbefore_string, Qafter_string; +static Lisp_Object Qevaporate; Lisp_Object Qmodification_hooks; Lisp_Object Qinsert_in_front_hooks; diff --git a/src/bytecode.c b/src/bytecode.c index b4a5354a0a4..581e16678a6 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -80,7 +80,6 @@ Lisp_Object Qbyte_code_meter; Lisp_Object Qbytecode; -extern Lisp_Object Qand_optional, Qand_rest; /* Byte codes: */ diff --git a/src/callint.c b/src/callint.c index 1de1f607878..e491e4e5952 100644 --- a/src/callint.c +++ b/src/callint.c @@ -30,14 +30,15 @@ along with GNU Emacs. If not, see . */ Lisp_Object Qminus, Qplus; Lisp_Object Qcall_interactively; -Lisp_Object Qcommand_debug_status; -Lisp_Object Qenable_recursive_minibuffers; +static Lisp_Object Qcommand_debug_status; +static Lisp_Object Qenable_recursive_minibuffers; -Lisp_Object Qhandle_shift_selection; +static Lisp_Object Qhandle_shift_selection; Lisp_Object Qmouse_leave_buffer_hook; -Lisp_Object Qlist, Qlet, Qletx, Qsave_excursion, Qprogn, Qif, Qwhen; +static Lisp_Object Qlist, Qlet, Qletx, Qsave_excursion, Qprogn, Qif; +Lisp_Object Qwhen; static Lisp_Object preserved_fns; /* Marker used within call-interactively to refer to point. */ diff --git a/src/casetab.c b/src/casetab.c index 7acefbceba9..691dbc8c08b 100644 --- a/src/casetab.c +++ b/src/casetab.c @@ -24,7 +24,7 @@ along with GNU Emacs. If not, see . */ #include "buffer.h" #include "character.h" -Lisp_Object Qcase_table_p, Qcase_table; +static Lisp_Object Qcase_table_p, Qcase_table; Lisp_Object Vascii_downcase_table, Vascii_upcase_table; Lisp_Object Vascii_canon_table, Vascii_eqv_table; diff --git a/src/category.c b/src/category.c index bba030360c4..5dcc4894f0e 100644 --- a/src/category.c +++ b/src/category.c @@ -48,7 +48,7 @@ along with GNU Emacs. If not, see . */ For the moment, we are not using this feature. */ static int category_table_version; -Lisp_Object Qcategory_table, Qcategoryp, Qcategorysetp, Qcategory_table_p; +static Lisp_Object Qcategory_table, Qcategoryp, Qcategorysetp, Qcategory_table_p; /* Temporary internal variable used in macro CHAR_HAS_CATEGORY. */ Lisp_Object _temp_category_set; diff --git a/src/ccl.c b/src/ccl.c index 2f7c4b07319..e09cf4f86d9 100644 --- a/src/ccl.c +++ b/src/ccl.c @@ -38,16 +38,16 @@ Lisp_Object Qccl, Qcclp; /* This symbol is a property which associates with ccl program vector. Ex: (get 'ccl-big5-encoder 'ccl-program) returns ccl program vector. */ -Lisp_Object Qccl_program; +static Lisp_Object Qccl_program; /* These symbols are properties which associate with code conversion map and their ID respectively. */ -Lisp_Object Qcode_conversion_map; -Lisp_Object Qcode_conversion_map_id; +static Lisp_Object Qcode_conversion_map; +static Lisp_Object Qcode_conversion_map_id; /* Symbols of ccl program have this property, a value of the property is an index for Vccl_protram_table. */ -Lisp_Object Qccl_program_idx; +static Lisp_Object Qccl_program_idx; /* Table of registered CCL programs. Each element is a vector of NAME, CCL_PROG, RESOLVEDP, and UPDATEDP, where NAME (symbol) is the diff --git a/src/ccl.h b/src/ccl.h index 8c1f5e5cbd7..98a4008e59f 100644 --- a/src/ccl.h +++ b/src/ccl.h @@ -105,10 +105,6 @@ extern void ccl_driver (struct ccl_program *, int *, int *, int, int, /* Vector of CCL program names vs corresponding program data. */ extern Lisp_Object Vccl_program_table; -/* Symbols of ccl program have this property, a value of the property - is an index for Vccl_protram_table. */ -extern Lisp_Object Qccl_program_idx; - extern Lisp_Object Qccl, Qcclp; EXFUN (Fccl_program_p, 1); @@ -120,4 +116,3 @@ EXFUN (Fccl_program_p, 1); } while (0); #endif /* EMACS_CCL_H */ - diff --git a/src/character.c b/src/character.c index 636601c7452..e00168c6abc 100644 --- a/src/character.c +++ b/src/character.c @@ -50,7 +50,7 @@ along with GNU Emacs. If not, see . */ Lisp_Object Qcharacterp; -Lisp_Object Qauto_fill_chars; +static Lisp_Object Qauto_fill_chars; /* Char-table of information about which character to unify to which Unicode character. Mainly used by the macro MAYBE_UNIFY_CHAR. */ diff --git a/src/character.h b/src/character.h index 7a75ac186fa..864882db7f6 100644 --- a/src/character.h +++ b/src/character.h @@ -615,7 +615,7 @@ extern EMACS_INT c_string_width (const unsigned char *, EMACS_INT, int, extern EMACS_INT lisp_string_width (Lisp_Object, int, EMACS_INT *, EMACS_INT *); -extern Lisp_Object Qcharacterp, Qauto_fill_chars; +extern Lisp_Object Qcharacterp; extern Lisp_Object Vchar_unify_table; extern Lisp_Object string_escape_byte8 (Lisp_Object); diff --git a/src/charset.c b/src/charset.c index 00206cccf0b..dc91cea2e12 100644 --- a/src/charset.c +++ b/src/charset.c @@ -68,10 +68,10 @@ Lisp_Object Qcharsetp; /* Special charset symbols. */ Lisp_Object Qascii; -Lisp_Object Qeight_bit; -Lisp_Object Qiso_8859_1; -Lisp_Object Qunicode; -Lisp_Object Qemacs; +static Lisp_Object Qeight_bit; +static Lisp_Object Qiso_8859_1; +static Lisp_Object Qunicode; +static Lisp_Object Qemacs; /* The corresponding charsets. */ int charset_ascii; @@ -87,7 +87,7 @@ int charset_jisx0208; int charset_ksc5601; /* Value of charset attribute `charset-iso-plane'. */ -Lisp_Object Qgl, Qgr; +static Lisp_Object Qgl, Qgr; /* Charset of unibyte characters. */ int charset_unibyte; diff --git a/src/charset.h b/src/charset.h index 8c87ffe6c3d..fef50394e6e 100644 --- a/src/charset.h +++ b/src/charset.h @@ -517,7 +517,7 @@ extern int iso_charset_table[ISO_MAX_DIMENSION][ISO_MAX_CHARS][ISO_MAX_FINAL]; extern Lisp_Object Qcharsetp; -extern Lisp_Object Qascii, Qunicode; +extern Lisp_Object Qascii; extern int charset_ascii, charset_eight_bit; extern int charset_iso_8859_1; extern int charset_unicode; diff --git a/src/cmds.c b/src/cmds.c index 60318225831..baf14778141 100644 --- a/src/cmds.c +++ b/src/cmds.c @@ -31,10 +31,10 @@ along with GNU Emacs. If not, see . */ #include "dispextern.h" #include "frame.h" -Lisp_Object Qkill_forward_chars, Qkill_backward_chars; +static Lisp_Object Qkill_forward_chars, Qkill_backward_chars; /* A possible value for a buffer's overwrite-mode variable. */ -Lisp_Object Qoverwrite_mode_binary; +static Lisp_Object Qoverwrite_mode_binary; static int internal_self_insert (int, EMACS_INT); diff --git a/src/coding.c b/src/coding.c index 13fcb7fb8a5..d2124db73f2 100644 --- a/src/coding.c +++ b/src/coding.c @@ -300,27 +300,30 @@ encode_coding_XXX (struct coding_system *coding) Lisp_Object Vcoding_system_hash_table; -Lisp_Object Qcoding_system, Qcoding_aliases, Qeol_type; +static Lisp_Object Qcoding_system, Qeol_type; +static Lisp_Object Qcoding_aliases; Lisp_Object Qunix, Qdos; Lisp_Object Qbuffer_file_coding_system; -Lisp_Object Qpost_read_conversion, Qpre_write_conversion; -Lisp_Object Qdefault_char; +static Lisp_Object Qpost_read_conversion, Qpre_write_conversion; +static Lisp_Object Qdefault_char; Lisp_Object Qno_conversion, Qundecided; -Lisp_Object Qcharset, Qiso_2022, Qutf_8, Qutf_16, Qshift_jis, Qbig5; -Lisp_Object Qbig, Qlittle; -Lisp_Object Qcoding_system_history; -Lisp_Object Qvalid_codes; -Lisp_Object QCcategory, QCmnemonic, QCdefault_char; -Lisp_Object QCdecode_translation_table, QCencode_translation_table; -Lisp_Object QCpost_read_conversion, QCpre_write_conversion; -Lisp_Object QCascii_compatible_p; +Lisp_Object Qcharset, Qutf_8; +static Lisp_Object Qiso_2022; +static Lisp_Object Qutf_16, Qshift_jis, Qbig5; +static Lisp_Object Qbig, Qlittle; +static Lisp_Object Qcoding_system_history; +static Lisp_Object Qvalid_codes; +static Lisp_Object QCcategory, QCmnemonic, QCdefault_char; +static Lisp_Object QCdecode_translation_table, QCencode_translation_table; +static Lisp_Object QCpost_read_conversion, QCpre_write_conversion; +static Lisp_Object QCascii_compatible_p; Lisp_Object Qcall_process, Qcall_process_region; Lisp_Object Qstart_process, Qopen_network_stream; -Lisp_Object Qtarget_idx; +static Lisp_Object Qtarget_idx; -Lisp_Object Qinsufficient_source, Qinconsistent_eol, Qinvalid_source; -Lisp_Object Qinterrupted, Qinsufficient_memory; +static Lisp_Object Qinsufficient_source, Qinconsistent_eol, Qinvalid_source; +static Lisp_Object Qinterrupted, Qinsufficient_memory; /* If a symbol has this property, evaluate the value to define the symbol as a coding system. */ @@ -351,8 +354,8 @@ struct coding_system safe_terminal_coding; Lisp_Object Qtranslation_table; Lisp_Object Qtranslation_table_id; -Lisp_Object Qtranslation_table_for_decode; -Lisp_Object Qtranslation_table_for_encode; +static Lisp_Object Qtranslation_table_for_decode; +static Lisp_Object Qtranslation_table_for_encode; /* Two special coding systems. */ Lisp_Object Vsjis_coding_system; diff --git a/src/coding.h b/src/coding.h index 8414a2fe133..ff7fcc7c3ac 100644 --- a/src/coding.h +++ b/src/coding.h @@ -757,10 +757,9 @@ extern Lisp_Object preferred_coding_system (void); extern Lisp_Object Qutf_8, Qutf_8_emacs; -extern Lisp_Object Qcoding_system, Qeol_type, Qcoding_category_index; +extern Lisp_Object Qcoding_category_index; extern Lisp_Object Qcoding_system_p; extern Lisp_Object Qraw_text, Qemacs_mule, Qno_conversion, Qundecided; -extern Lisp_Object Qiso_2022; extern Lisp_Object Qbuffer_file_coding_system; extern Lisp_Object Qunix, Qdos, Qmac; @@ -789,4 +788,3 @@ extern char emacs_mule_bytes[256]; extern int emacs_mule_string_char (unsigned char *); #endif /* EMACS_CODING_H */ - diff --git a/src/composite.c b/src/composite.c index 367606f5142..cccc75cc1b9 100644 --- a/src/composite.c +++ b/src/composite.c @@ -152,8 +152,8 @@ int n_compositions; COMPOSITION-ID. */ Lisp_Object composition_hash_table; -Lisp_Object Qauto_composed; -Lisp_Object Qauto_composition_function; +static Lisp_Object Qauto_composed; +static Lisp_Object Qauto_composition_function; /* Maximum number of characters to look back for auto-compositions. */ #define MAX_AUTO_COMPOSITION_LOOKBACK 3 diff --git a/src/composite.h b/src/composite.h index 1f708e93b8e..5188f981d9c 100644 --- a/src/composite.h +++ b/src/composite.h @@ -216,8 +216,6 @@ extern int n_compositions; extern Lisp_Object Qcomposition; extern Lisp_Object composition_hash_table; -extern Lisp_Object Qauto_composed; -extern Lisp_Object Qauto_composition_function; extern int get_composition_id (EMACS_INT, EMACS_INT, EMACS_INT, Lisp_Object, Lisp_Object); extern int find_composition (EMACS_INT, EMACS_INT, EMACS_INT *, EMACS_INT *, diff --git a/src/data.c b/src/data.c index 25e260c8686..68ceff4d23e 100644 --- a/src/data.c +++ b/src/data.c @@ -52,26 +52,33 @@ along with GNU Emacs. If not, see . */ extern double atof (const char *); #endif /* !atof */ -Lisp_Object Qnil, Qt, Qquote, Qlambda, Qsubr, Qunbound; +Lisp_Object Qnil, Qt, Qquote, Qlambda, Qunbound; +static Lisp_Object Qsubr; Lisp_Object Qerror_conditions, Qerror_message, Qtop_level; -Lisp_Object Qerror, Qquit, Qwrong_type_argument, Qargs_out_of_range; -Lisp_Object Qvoid_variable, Qvoid_function, Qcyclic_function_indirection; -Lisp_Object Qcyclic_variable_indirection, Qcircular_list; -Lisp_Object Qsetting_constant, Qinvalid_read_syntax; +Lisp_Object Qerror, Qquit, Qargs_out_of_range; +static Lisp_Object Qwrong_type_argument; +Lisp_Object Qvoid_variable, Qvoid_function; +static Lisp_Object Qcyclic_function_indirection; +static Lisp_Object Qcyclic_variable_indirection; +Lisp_Object Qcircular_list; +static Lisp_Object Qsetting_constant; +Lisp_Object Qinvalid_read_syntax; Lisp_Object Qinvalid_function, Qwrong_number_of_arguments, Qno_catch; Lisp_Object Qend_of_file, Qarith_error, Qmark_inactive; Lisp_Object Qbeginning_of_buffer, Qend_of_buffer, Qbuffer_read_only; Lisp_Object Qtext_read_only; -Lisp_Object Qintegerp, Qnatnump, Qwholenump, Qsymbolp, Qlistp, Qconsp; +Lisp_Object Qintegerp, Qwholenump, Qsymbolp, Qlistp, Qconsp; +static Lisp_Object Qnatnump; Lisp_Object Qstringp, Qarrayp, Qsequencep, Qbufferp; Lisp_Object Qchar_or_string_p, Qmarkerp, Qinteger_or_marker_p, Qvectorp; -Lisp_Object Qbuffer_or_string_p, Qkeywordp; -Lisp_Object Qboundp, Qfboundp; +Lisp_Object Qbuffer_or_string_p; +static Lisp_Object Qkeywordp, Qboundp; +Lisp_Object Qfboundp; Lisp_Object Qchar_table_p, Qvector_or_char_table_p; Lisp_Object Qcdr; -Lisp_Object Qad_advice_info, Qad_activate_internal; +static Lisp_Object Qad_advice_info, Qad_activate_internal; Lisp_Object Qrange_error, Qdomain_error, Qsingularity_error; Lisp_Object Qoverflow_error, Qunderflow_error; @@ -83,7 +90,7 @@ Lisp_Object Qinteger; static Lisp_Object Qsymbol, Qstring, Qcons, Qmarker, Qoverlay; Lisp_Object Qwindow; static Lisp_Object Qfloat, Qwindow_configuration; -Lisp_Object Qprocess; +static Lisp_Object Qprocess; static Lisp_Object Qcompiled_function, Qbuffer, Qframe, Qvector; static Lisp_Object Qchar_table, Qbool_vector, Qhash_table; static Lisp_Object Qsubrp, Qmany, Qunevalled; diff --git a/src/dbusbind.c b/src/dbusbind.c index 8a6870555d0..b986724d792 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c @@ -30,50 +30,50 @@ along with GNU Emacs. If not, see . */ /* Subroutines. */ -Lisp_Object Qdbus_init_bus; -Lisp_Object Qdbus_close_bus; -Lisp_Object Qdbus_get_unique_name; -Lisp_Object Qdbus_call_method; -Lisp_Object Qdbus_call_method_asynchronously; -Lisp_Object Qdbus_method_return_internal; -Lisp_Object Qdbus_method_error_internal; -Lisp_Object Qdbus_send_signal; -Lisp_Object Qdbus_register_service; -Lisp_Object Qdbus_register_signal; -Lisp_Object Qdbus_register_method; +static Lisp_Object Qdbus_init_bus; +static Lisp_Object Qdbus_close_bus; +static Lisp_Object Qdbus_get_unique_name; +static Lisp_Object Qdbus_call_method; +static Lisp_Object Qdbus_call_method_asynchronously; +static Lisp_Object Qdbus_method_return_internal; +static Lisp_Object Qdbus_method_error_internal; +static Lisp_Object Qdbus_send_signal; +static Lisp_Object Qdbus_register_service; +static Lisp_Object Qdbus_register_signal; +static Lisp_Object Qdbus_register_method; /* D-Bus error symbol. */ -Lisp_Object Qdbus_error; +static Lisp_Object Qdbus_error; /* Lisp symbols of the system and session buses. */ -Lisp_Object QCdbus_system_bus, QCdbus_session_bus; +static Lisp_Object QCdbus_system_bus, QCdbus_session_bus; /* Lisp symbol for method call timeout. */ -Lisp_Object QCdbus_timeout; +static Lisp_Object QCdbus_timeout; /* Lisp symbols for name request flags. */ -Lisp_Object QCdbus_request_name_allow_replacement; -Lisp_Object QCdbus_request_name_replace_existing; -Lisp_Object QCdbus_request_name_do_not_queue; +static Lisp_Object QCdbus_request_name_allow_replacement; +static Lisp_Object QCdbus_request_name_replace_existing; +static Lisp_Object QCdbus_request_name_do_not_queue; /* Lisp symbols for name request replies. */ -Lisp_Object QCdbus_request_name_reply_primary_owner; -Lisp_Object QCdbus_request_name_reply_in_queue; -Lisp_Object QCdbus_request_name_reply_exists; -Lisp_Object QCdbus_request_name_reply_already_owner; +static Lisp_Object QCdbus_request_name_reply_primary_owner; +static Lisp_Object QCdbus_request_name_reply_in_queue; +static Lisp_Object QCdbus_request_name_reply_exists; +static Lisp_Object QCdbus_request_name_reply_already_owner; /* Lisp symbols of D-Bus types. */ -Lisp_Object QCdbus_type_byte, QCdbus_type_boolean; -Lisp_Object QCdbus_type_int16, QCdbus_type_uint16; -Lisp_Object QCdbus_type_int32, QCdbus_type_uint32; -Lisp_Object QCdbus_type_int64, QCdbus_type_uint64; -Lisp_Object QCdbus_type_double, QCdbus_type_string; -Lisp_Object QCdbus_type_object_path, QCdbus_type_signature; +static Lisp_Object QCdbus_type_byte, QCdbus_type_boolean; +static Lisp_Object QCdbus_type_int16, QCdbus_type_uint16; +static Lisp_Object QCdbus_type_int32, QCdbus_type_uint32; +static Lisp_Object QCdbus_type_int64, QCdbus_type_uint64; +static Lisp_Object QCdbus_type_double, QCdbus_type_string; +static Lisp_Object QCdbus_type_object_path, QCdbus_type_signature; #ifdef DBUS_TYPE_UNIX_FD Lisp_Object QCdbus_type_unix_fd; #endif -Lisp_Object QCdbus_type_array, QCdbus_type_variant; -Lisp_Object QCdbus_type_struct, QCdbus_type_dict_entry; +static Lisp_Object QCdbus_type_array, QCdbus_type_variant; +static Lisp_Object QCdbus_type_struct, QCdbus_type_dict_entry; /* Whether we are reading a D-Bus event. */ int xd_in_read_queued_messages = 0; diff --git a/src/dired.c b/src/dired.c index f5fc1e3a62d..2b0ef275cde 100644 --- a/src/dired.c +++ b/src/dired.c @@ -79,12 +79,12 @@ extern struct direct *readdir (DIR *); #include "regex.h" #include "blockinput.h" -Lisp_Object Qdirectory_files; -Lisp_Object Qdirectory_files_and_attributes; -Lisp_Object Qfile_name_completion; -Lisp_Object Qfile_name_all_completions; -Lisp_Object Qfile_attributes; -Lisp_Object Qfile_attributes_lessp; +static Lisp_Object Qdirectory_files; +static Lisp_Object Qdirectory_files_and_attributes; +static Lisp_Object Qfile_name_completion; +static Lisp_Object Qfile_name_all_completions; +static Lisp_Object Qfile_attributes; +static Lisp_Object Qfile_attributes_lessp; static int scmp (const char *, const char *, int); INFUN (Ffile_attributes, 2); @@ -439,7 +439,7 @@ These are all file names in directory DIRECTORY which begin with FILE. */) } static int file_name_completion_stat (Lisp_Object dirname, DIRENTRY *dp, struct stat *st_addr); -Lisp_Object Qdefault_directory; +static Lisp_Object Qdefault_directory; Lisp_Object file_name_completion (Lisp_Object file, Lisp_Object dirname, int all_flag, int ver_flag, Lisp_Object predicate) diff --git a/src/editfns.c b/src/editfns.c index 0c34a95b949..afb1e8ebc18 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -107,7 +107,7 @@ static Lisp_Object subst_char_in_region_unwind_1 (Lisp_Object); static void transpose_markers (EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT); -Lisp_Object Qbuffer_access_fontify_functions; +static Lisp_Object Qbuffer_access_fontify_functions; INFUN (Fuser_full_name, 1); /* Symbol for the text property used to mark fields. */ @@ -116,7 +116,7 @@ Lisp_Object Qfield; /* A special value for Qfield properties. */ -Lisp_Object Qboundary; +static Lisp_Object Qboundary; void diff --git a/src/eval.c b/src/eval.c index d6d62aa4afb..cefdf784faf 100644 --- a/src/eval.c +++ b/src/eval.c @@ -66,12 +66,13 @@ int gcpro_level; Lisp_Object Qautoload, Qmacro, Qexit, Qinteractive, Qcommandp, Qdefun; Lisp_Object Qinhibit_quit; -Lisp_Object Qand_rest, Qand_optional; -Lisp_Object Qdebug_on_error; -Lisp_Object Qdeclare; +Lisp_Object Qand_rest; +static Lisp_Object Qand_optional; +static Lisp_Object Qdebug_on_error; +static Lisp_Object Qdeclare; Lisp_Object Qinternal_interpreter_environment, Qclosure; -Lisp_Object Qdebug; +static Lisp_Object Qdebug; /* This holds either the symbol `run-hooks' or nil. It is nil at an early stage of startup, and when Emacs diff --git a/src/fileio.c b/src/fileio.c index 5ad8b0a33a1..fb16decaaa3 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -102,20 +102,20 @@ int auto_save_error_occurred; an actual coding system name, but just an indicator to tell insert-file-contents to use `emacs-mule' with a special flag for auto saving and recovering a file. */ -Lisp_Object Qauto_save_coding; +static Lisp_Object Qauto_save_coding; /* Property name of a file name handler, which gives a list of operations it handles.. */ -Lisp_Object Qoperations; +static Lisp_Object Qoperations; /* Lisp functions for translating file formats */ -Lisp_Object Qformat_decode, Qformat_annotate_function; +static Lisp_Object Qformat_decode, Qformat_annotate_function; /* Lisp function for setting buffer-file-coding-system and the multibyteness of the current buffer after inserting a file. */ -Lisp_Object Qafter_insert_file_set_coding; +static Lisp_Object Qafter_insert_file_set_coding; -Lisp_Object Qwrite_region_annotate_functions; +static Lisp_Object Qwrite_region_annotate_functions; /* Each time an annotation function changes the buffer, the new buffer is added here. */ Lisp_Object Vwrite_region_annotation_buffers; @@ -123,25 +123,26 @@ Lisp_Object Vwrite_region_annotation_buffers; #ifdef HAVE_FSYNC #endif -Lisp_Object Qdelete_by_moving_to_trash; +static Lisp_Object Qdelete_by_moving_to_trash; /* Lisp function for moving files to trash. */ -Lisp_Object Qmove_file_to_trash; +static Lisp_Object Qmove_file_to_trash; /* Lisp function for recursively copying directories. */ -Lisp_Object Qcopy_directory; +static Lisp_Object Qcopy_directory; /* Lisp function for recursively deleting directories. */ -Lisp_Object Qdelete_directory; +static Lisp_Object Qdelete_directory; #ifdef WINDOWSNT #endif -Lisp_Object Qfile_error, Qfile_already_exists, Qfile_date_error; -Lisp_Object Qexcl; +Lisp_Object Qfile_error; +static Lisp_Object Qfile_already_exists, Qfile_date_error; +static Lisp_Object Qexcl; Lisp_Object Qfile_name_history; -Lisp_Object Qcar_less_than_car; +static Lisp_Object Qcar_less_than_car; INFUN (Fmake_symbolic_link, 3); static int a_write (int, Lisp_Object, int, int, @@ -205,40 +206,40 @@ restore_point_unwind (Lisp_Object location) } -Lisp_Object Qexpand_file_name; -Lisp_Object Qsubstitute_in_file_name; -Lisp_Object Qdirectory_file_name; -Lisp_Object Qfile_name_directory; -Lisp_Object Qfile_name_nondirectory; -Lisp_Object Qunhandled_file_name_directory; -Lisp_Object Qfile_name_as_directory; -Lisp_Object Qcopy_file; -Lisp_Object Qmake_directory_internal; -Lisp_Object Qmake_directory; -Lisp_Object Qdelete_directory_internal; +static Lisp_Object Qexpand_file_name; +static Lisp_Object Qsubstitute_in_file_name; +static Lisp_Object Qdirectory_file_name; +static Lisp_Object Qfile_name_directory; +static Lisp_Object Qfile_name_nondirectory; +static Lisp_Object Qunhandled_file_name_directory; +static Lisp_Object Qfile_name_as_directory; +static Lisp_Object Qcopy_file; +static Lisp_Object Qmake_directory_internal; +static Lisp_Object Qmake_directory; +static Lisp_Object Qdelete_directory_internal; Lisp_Object Qdelete_file; -Lisp_Object Qrename_file; -Lisp_Object Qadd_name_to_file; -Lisp_Object Qmake_symbolic_link; +static Lisp_Object Qrename_file; +static Lisp_Object Qadd_name_to_file; +static Lisp_Object Qmake_symbolic_link; Lisp_Object Qfile_exists_p; -Lisp_Object Qfile_executable_p; -Lisp_Object Qfile_readable_p; -Lisp_Object Qfile_writable_p; -Lisp_Object Qfile_symlink_p; -Lisp_Object Qaccess_file; +static Lisp_Object Qfile_executable_p; +static Lisp_Object Qfile_readable_p; +static Lisp_Object Qfile_writable_p; +static Lisp_Object Qfile_symlink_p; +static Lisp_Object Qaccess_file; Lisp_Object Qfile_directory_p; -Lisp_Object Qfile_regular_p; -Lisp_Object Qfile_accessible_directory_p; -Lisp_Object Qfile_modes; -Lisp_Object Qset_file_modes; -Lisp_Object Qset_file_times; -Lisp_Object Qfile_selinux_context; -Lisp_Object Qset_file_selinux_context; -Lisp_Object Qfile_newer_than_file_p; +static Lisp_Object Qfile_regular_p; +static Lisp_Object Qfile_accessible_directory_p; +static Lisp_Object Qfile_modes; +static Lisp_Object Qset_file_modes; +static Lisp_Object Qset_file_times; +static Lisp_Object Qfile_selinux_context; +static Lisp_Object Qset_file_selinux_context; +static Lisp_Object Qfile_newer_than_file_p; Lisp_Object Qinsert_file_contents; Lisp_Object Qwrite_region; -Lisp_Object Qverify_visited_file_modtime; -Lisp_Object Qset_visited_file_modtime; +static Lisp_Object Qverify_visited_file_modtime; +static Lisp_Object Qset_visited_file_modtime; DEFUE ("find-file-name-handler", Ffind_file_name_handler, Sfind_file_name_handler, 2, 2, 0, diff --git a/src/fns.c b/src/fns.c index f4eaaccda33..9ced09c38f6 100644 --- a/src/fns.c +++ b/src/fns.c @@ -49,11 +49,12 @@ along with GNU Emacs. If not, see . */ #define NULL ((POINTER_TYPE *)0) #endif -Lisp_Object Qstring_lessp, Qprovide, Qrequire; -Lisp_Object Qyes_or_no_p_history; +Lisp_Object Qstring_lessp; +static Lisp_Object Qprovide, Qrequire; +static Lisp_Object Qyes_or_no_p_history; Lisp_Object Qcursor_in_echo_area; -Lisp_Object Qwidget_type; -Lisp_Object Qcodeset, Qdays, Qmonths, Qpaper; +static Lisp_Object Qwidget_type; +static Lisp_Object Qcodeset, Qdays, Qmonths, Qpaper; static int internal_equal (Lisp_Object , Lisp_Object, int, int); @@ -2541,7 +2542,7 @@ advisable. */) return ret; } -Lisp_Object Qsubfeatures; +static Lisp_Object Qsubfeatures; DEFUN ("featurep", Ffeaturep, Sfeaturep, 1, 2, 0, doc: /* Return t if FEATURE is present in this Emacs. @@ -3354,9 +3355,10 @@ struct Lisp_Hash_Table *weak_hash_tables; /* Various symbols. */ -Lisp_Object Qhash_table_p, Qeq, Qeql, Qequal, Qkey, Qvalue; +static Lisp_Object Qhash_table_p, Qkey, Qvalue; +Lisp_Object Qeq, Qeql, Qequal; Lisp_Object QCtest, QCsize, QCrehash_size, QCrehash_threshold, QCweakness; -Lisp_Object Qhash_table_test, Qkey_or_value, Qkey_and_value; +static Lisp_Object Qhash_table_test, Qkey_or_value, Qkey_and_value; /* Function prototypes. */ diff --git a/src/font.c b/src/font.c index a31a418e641..91cb0a2d52b 100644 --- a/src/font.c +++ b/src/font.c @@ -48,7 +48,7 @@ along with GNU Emacs. If not, see . */ #include "nsterm.h" #endif /* HAVE_NS */ -Lisp_Object Qopentype; +static Lisp_Object Qopentype; /* Important character set strings. */ Lisp_Object Qascii_0, Qiso8859_1, Qiso10646_1, Qunicode_bmp, Qunicode_sip; @@ -125,14 +125,16 @@ Lisp_Object QCfoundry; static Lisp_Object QCadstyle, QCregistry; /* Symbols representing keys of font extra info. */ Lisp_Object QCspacing, QCdpi, QCscalable, QCotf, QClang, QCscript, QCavgwidth; -Lisp_Object QCantialias, QCfont_entity, QCfc_unknown_spec; +Lisp_Object QCantialias, QCfont_entity; +static Lisp_Object QCfc_unknown_spec; /* Symbols representing values of font spacing property. */ -Lisp_Object Qc, Qm, Qp, Qd; +static Lisp_Object Qc, Qm, Qd; +Lisp_Object Qp; /* Special ADSTYLE properties to avoid fonts used for Latin characters; used in xfont.c and ftfont.c. */ Lisp_Object Qja, Qko; -Lisp_Object QCuser_spec; +static Lisp_Object QCuser_spec; /* Alist of font registry symbol and the corresponding charsets information. The information is retrieved from diff --git a/src/font.h b/src/font.h index 511a7de3a16..a9b58eb7c76 100644 --- a/src/font.h +++ b/src/font.h @@ -239,7 +239,7 @@ enum font_property_index ASET ((font), prop, make_number (font_style_to_value (prop, val, 1))) extern Lisp_Object QCspacing, QCdpi, QCscalable, QCotf, QClang, QCscript; -extern Lisp_Object QCavgwidth, QCantialias, QCfont_entity, QCfc_unknown_spec; +extern Lisp_Object QCavgwidth, QCantialias, QCfont_entity; extern Lisp_Object Qp; @@ -871,4 +871,3 @@ extern void font_deferred_log (const char *, Lisp_Object, Lisp_Object); #endif /* not FONT_DEBUG */ #endif /* not EMACS_FONT_H */ - diff --git a/src/frame.c b/src/frame.c index 6e0e9c4ffc0..5493600ce5b 100644 --- a/src/frame.c +++ b/src/frame.c @@ -69,10 +69,10 @@ Lisp_Object Qonly; Lisp_Object Qx, Qw32, Qmac, Qpc, Qns; Lisp_Object Qvisible; Lisp_Object Qdisplay_type; -Lisp_Object Qbackground_mode; +static Lisp_Object Qbackground_mode; Lisp_Object Qnoelisp; -Lisp_Object Qx_frame_parameter; +static Lisp_Object Qx_frame_parameter; Lisp_Object Qx_resource_name; Lisp_Object Qterminal; Lisp_Object Qterminal_live_p; @@ -82,7 +82,7 @@ Lisp_Object Qterminal_live_p; Lisp_Object Qauto_raise, Qauto_lower; Lisp_Object Qborder_color, Qborder_width; Lisp_Object Qcursor_color, Qcursor_type; -Lisp_Object Qgeometry; /* Not used */ +static Lisp_Object Qgeometry; /* Not used */ Lisp_Object Qheight, Qwidth; Lisp_Object Qleft, Qright; Lisp_Object Qicon_left, Qicon_top, Qicon_type, Qicon_name; @@ -95,19 +95,20 @@ Lisp_Object Qvisibility; Lisp_Object Qscroll_bar_foreground, Qscroll_bar_background; Lisp_Object Qscreen_gamma; Lisp_Object Qline_spacing; -Lisp_Object Quser_position, Quser_size; +static Lisp_Object Quser_position, Quser_size; Lisp_Object Qwait_for_wm; -Lisp_Object Qwindow_id; +static Lisp_Object Qwindow_id; #ifdef HAVE_X_WINDOWS -Lisp_Object Qouter_window_id; +static Lisp_Object Qouter_window_id; #endif Lisp_Object Qparent_id; Lisp_Object Qtitle, Qname; -Lisp_Object Qexplicit_name; +static Lisp_Object Qexplicit_name; Lisp_Object Qunsplittable; Lisp_Object Qmenu_bar_lines, Qtool_bar_lines, Qtool_bar_position; Lisp_Object Qleft_fringe, Qright_fringe; -Lisp_Object Qbuffer_predicate, Qbuffer_list, Qburied_buffer_list; +Lisp_Object Qbuffer_predicate; +static Lisp_Object Qbuffer_list, Qburied_buffer_list; Lisp_Object Qtty_color_mode; Lisp_Object Qtty, Qtty_type; diff --git a/src/frame.h b/src/frame.h index 756e121f678..a82de35efb1 100644 --- a/src/frame.h +++ b/src/frame.h @@ -1047,7 +1047,7 @@ extern Lisp_Object selected_frame; extern Lisp_Object Qauto_raise, Qauto_lower; extern Lisp_Object Qborder_color, Qborder_width; -extern Lisp_Object Qbuffer_predicate, Qbuffer_list, Qburied_buffer_list; +extern Lisp_Object Qbuffer_predicate; extern Lisp_Object Qcursor_color, Qcursor_type; extern Lisp_Object Qfont; extern Lisp_Object Qbackground_color, Qforeground_color; @@ -1076,7 +1076,6 @@ extern Lisp_Object Qminibuffer, Qmodeline; extern Lisp_Object Qx, Qw32, Qmac, Qpc, Qns; extern Lisp_Object Qvisible; extern Lisp_Object Qdisplay_type; -extern Lisp_Object Qbackground_mode; extern Lisp_Object Qx_resource_name; diff --git a/src/fringe.c b/src/fringe.c index ce75df766ee..281b563c9b7 100644 --- a/src/fringe.c +++ b/src/fringe.c @@ -64,9 +64,9 @@ along with GNU Emacs. If not, see . */ must specify physical bitmap symbols. */ -Lisp_Object Qtruncation, Qcontinuation, Qoverlay_arrow; -Lisp_Object Qempty_line, Qtop_bottom; -Lisp_Object Qhollow_small; +static Lisp_Object Qtruncation, Qcontinuation, Qoverlay_arrow; +static Lisp_Object Qempty_line, Qtop_bottom; +static Lisp_Object Qhollow_small; enum fringe_bitmap_align { diff --git a/src/ftfont.c b/src/ftfont.c index 2e66222d268..47425e853da 100644 --- a/src/ftfont.c +++ b/src/ftfont.c @@ -39,7 +39,7 @@ along with GNU Emacs. If not, see . */ #include "ftfont.h" /* Symbolic type of this font-driver. */ -Lisp_Object Qfreetype; +static Lisp_Object Qfreetype; /* Fontconfig's generic families and their aliases. */ static Lisp_Object Qmonospace, Qsans_serif, Qserif, Qmono, Qsans, Qsans__serif; diff --git a/src/image.c b/src/image.c index 20ca3cf1d6b..f1c3d5d84f0 100644 --- a/src/image.c +++ b/src/image.c @@ -124,7 +124,7 @@ typedef struct ns_bitmap_record Bitmap_Record; /* The symbol `postscript' identifying images of this type. */ -Lisp_Object Qpostscript; +static Lisp_Object Qpostscript; static void x_disable_image (struct frame *, struct image *); static void x_edge_detection (struct frame *, struct image *, Lisp_Object, @@ -562,17 +562,21 @@ static Lisp_Object Vimage_type_cache; /* The symbol `xbm' which is used as the type symbol for XBM images. */ -Lisp_Object Qxbm; +static Lisp_Object Qxbm; /* Keywords. */ -Lisp_Object QCascent, QCmargin, QCrelief, Qcount, Qextension_data; -Lisp_Object QCconversion, QCcolor_symbols, QCheuristic_mask; -Lisp_Object QCindex, QCmatrix, QCcolor_adjustment, QCmask, QCgeometry, QCcrop, QCrotation; +Lisp_Object QCascent, QCmargin, QCrelief; +static Lisp_Object Qcount, Qextension_data; +Lisp_Object QCconversion; +static Lisp_Object QCheuristic_mask; +static Lisp_Object QCcolor_symbols; +static Lisp_Object QCindex, QCmatrix, QCcolor_adjustment, QCmask, QCgeometry; +static Lisp_Object QCcrop, QCrotation; /* Other symbols. */ -Lisp_Object Qlaplace, Qemboss, Qedge_detection, Qheuristic; +static Lisp_Object Qlaplace, Qemboss, Qedge_detection, Qheuristic; /* Function prototypes. */ @@ -3001,7 +3005,7 @@ static int xpm_valid_color_symbols_p (Lisp_Object); #if defined (HAVE_XPM) || defined (HAVE_NS) /* The symbol `xpm' identifying XPM-format images. */ -Lisp_Object Qxpm; +static Lisp_Object Qxpm; /* Indices of image specification fields in xpm_format, below. */ @@ -4925,7 +4929,7 @@ static int pbm_scan_number (unsigned char **, unsigned char *); /* The symbol `pbm' identifying images of this type. */ -Lisp_Object Qpbm; +static Lisp_Object Qpbm; /* Indices of image specification fields in gs_format, below. */ @@ -5342,7 +5346,7 @@ static int png_load (struct frame *f, struct image *img); /* The symbol `png' identifying images of this type. */ -Lisp_Object Qpng; +static Lisp_Object Qpng; /* Indices of image specification fields in png_format, below. */ @@ -5956,7 +5960,7 @@ static int jpeg_load (struct frame *f, struct image *img); /* The symbol `jpeg' identifying images of this type. */ -Lisp_Object Qjpeg; +static Lisp_Object Qjpeg; /* Indices of image specification fields in gs_format, below. */ @@ -6505,7 +6509,7 @@ static int tiff_load (struct frame *f, struct image *img); /* The symbol `tiff' identifying images of this type. */ -Lisp_Object Qtiff; +static Lisp_Object Qtiff; /* Indices of image specification fields in tiff_format, below. */ @@ -6933,7 +6937,7 @@ static void gif_clear_image (struct frame *f, struct image *img); /* The symbol `gif' identifying images of this type. */ -Lisp_Object Qgif; +static Lisp_Object Qgif; /* Indices of image specification fields in gif_format, below. */ @@ -8302,7 +8306,7 @@ static void gs_clear_image (struct frame *f, struct image *img); /* Keyword symbols. */ -Lisp_Object QCloader, QCbounding_box, QCpt_width, QCpt_height; +static Lisp_Object QCloader, QCbounding_box, QCpt_width, QCpt_height; /* Indices of image specification fields in gs_format, below. */ diff --git a/src/intervals.h b/src/intervals.h index b2d755036ba..3a9ee87b921 100644 --- a/src/intervals.h +++ b/src/intervals.h @@ -295,8 +295,6 @@ extern int invisible_p (Lisp_Object, Lisp_Object); /* Declared in textprop.c */ /* Types of hooks. */ -extern Lisp_Object Qmouse_left; -extern Lisp_Object Qmouse_entered; extern Lisp_Object Qpoint_left; extern Lisp_Object Qpoint_entered; extern Lisp_Object Qmodification_hooks; @@ -305,8 +303,8 @@ extern Lisp_Object Qlocal_map; extern Lisp_Object Qkeymap; /* Visual properties text (including strings) may have. */ -extern Lisp_Object Qforeground, Qbackground, Qfont, Qunderline, Qstipple; -extern Lisp_Object Qinvisible, Qintangible, Qread_only; +extern Lisp_Object Qfont; +extern Lisp_Object Qinvisible, Qintangible; /* Sticky properties */ extern Lisp_Object Qfront_sticky, Qrear_nonsticky; diff --git a/src/keyboard.c b/src/keyboard.c index 97989fc1c15..f4afe000685 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -100,7 +100,8 @@ int single_kboard; /* Non-nil disable property on a command means do not execute it; call disabled-command-function's value instead. */ -Lisp_Object Qdisabled, Qdisabled_command_function; +Lisp_Object Qdisabled; +static Lisp_Object Qdisabled_command_function; #define NUM_RECENT_KEYS (300) int recent_keys_index; /* Index for storing next element into recent_keys */ @@ -231,36 +232,37 @@ Lisp_Object internal_last_event_frame; X Windows wants this for selection ownership. */ unsigned long last_event_timestamp; -Lisp_Object Qx_set_selection, QPRIMARY, Qhandle_switch_frame; +static Lisp_Object Qx_set_selection, Qhandle_switch_frame; +Lisp_Object QPRIMARY; -Lisp_Object Qself_insert_command; -Lisp_Object Qforward_char; -Lisp_Object Qbackward_char; -Lisp_Object Qundefined; -Lisp_Object Qtimer_event_handler; +static Lisp_Object Qself_insert_command; +static Lisp_Object Qforward_char; +static Lisp_Object Qbackward_char; +static Lisp_Object Qundefined; +static Lisp_Object Qtimer_event_handler; /* read_key_sequence stores here the command definition of the key sequence that it reads. */ Lisp_Object read_key_sequence_cmd; -Lisp_Object Qinput_method_function; +static Lisp_Object Qinput_method_function; -Lisp_Object Qdeactivate_mark; +static Lisp_Object Qdeactivate_mark; Lisp_Object Qrecompute_lucid_menubar, Qactivate_menubar_hook; -Lisp_Object Qecho_area_clear_hook; +static Lisp_Object Qecho_area_clear_hook; /* Hooks to run before and after each command. */ -Lisp_Object Qpre_command_hook; -Lisp_Object Qpost_command_hook; +static Lisp_Object Qpre_command_hook; +static Lisp_Object Qpost_command_hook; -Lisp_Object Qdeferred_action_function; +static Lisp_Object Qdeferred_action_function; -Lisp_Object Qinput_method_exit_on_first_char; -Lisp_Object Qinput_method_use_echo_area; +static Lisp_Object Qinput_method_exit_on_first_char; +static Lisp_Object Qinput_method_use_echo_area; -Lisp_Object Qhelp_form_show; +static Lisp_Object Qhelp_form_show; /* File in which we write all commands we read. */ FILE *dribble; @@ -293,42 +295,49 @@ static struct input_event * volatile kbd_store_ptr; at inopportune times. */ /* Symbols to head events. */ -Lisp_Object Qmouse_movement; -Lisp_Object Qscroll_bar_movement; +static Lisp_Object Qmouse_movement; +static Lisp_Object Qscroll_bar_movement; Lisp_Object Qswitch_frame; -Lisp_Object Qdelete_frame; -Lisp_Object Qiconify_frame; -Lisp_Object Qmake_frame_visible; -Lisp_Object Qselect_window; +static Lisp_Object Qdelete_frame; +static Lisp_Object Qiconify_frame; +static Lisp_Object Qmake_frame_visible; +static Lisp_Object Qselect_window; Lisp_Object Qhelp_echo; #if defined (HAVE_MOUSE) || defined (HAVE_GPM) -Lisp_Object Qmouse_fixup_help_message; +static Lisp_Object Qmouse_fixup_help_message; #endif /* Symbols to denote kinds of events. */ -Lisp_Object Qfunction_key; +static Lisp_Object Qfunction_key; Lisp_Object Qmouse_click; #if defined (WINDOWSNT) Lisp_Object Qlanguage_change; #endif -Lisp_Object Qdrag_n_drop; -Lisp_Object Qsave_session; +static Lisp_Object Qdrag_n_drop; +static Lisp_Object Qsave_session; #ifdef HAVE_DBUS -Lisp_Object Qdbus_event; +static Lisp_Object Qdbus_event; #endif -Lisp_Object Qconfig_changed_event; +static Lisp_Object Qconfig_changed_event; /* Lisp_Object Qmouse_movement; - also an event header */ /* Properties of event headers. */ Lisp_Object Qevent_kind; -Lisp_Object Qevent_symbol_elements; +static Lisp_Object Qevent_symbol_elements; /* menu and tool bar item parts */ -Lisp_Object Qmenu_enable; -Lisp_Object QCenable, QCvisible, QChelp, QCfilter, QCkeys, QCkey_sequence; -Lisp_Object QCbutton, QCtoggle, QCradio, QClabel, QCvert_only; +static Lisp_Object Qmenu_enable; +static Lisp_Object QCenable, QCvisible, QChelp, QCkeys, QCkey_sequence; +Lisp_Object QCfilter; + +/* Non-nil disable property on a command means + do not execute it; call disabled-command-function's value instead. */ +Lisp_Object QCtoggle, QCradio; +static Lisp_Object QCbutton, QClabel; + +static Lisp_Object QCvert_only; /* An event header symbol HEAD may have a property named Qevent_symbol_element_mask, which is of the form (BASE MODIFIERS); @@ -341,22 +350,22 @@ Lisp_Object Qevent_symbol_element_mask; Qmodifier_cache, which is an alist mapping modifier masks onto modified versions of BASE. If present, this helps speed up apply_modifiers. */ -Lisp_Object Qmodifier_cache; +static Lisp_Object Qmodifier_cache; /* Symbols to use for parts of windows. */ Lisp_Object Qmode_line; Lisp_Object Qvertical_line; -Lisp_Object Qvertical_scroll_bar; +static Lisp_Object Qvertical_scroll_bar; Lisp_Object Qmenu_bar; Lisp_Object recursive_edit_unwind (Lisp_Object buffer), command_loop (void); -Lisp_Object Qextended_command_history; +static Lisp_Object Qextended_command_history; EMACS_TIME timer_check (void); static void record_menu_key (Lisp_Object c); static int echo_length (void); -Lisp_Object Qpolling_period; +static Lisp_Object Qpolling_period; /* Incremented whenever a timer is run. */ int timers_run; @@ -5032,9 +5041,11 @@ static const char *const lispy_drag_n_drop_names[] = }; /* Scroll bar parts. */ -Lisp_Object Qabove_handle, Qhandle, Qbelow_handle; -Lisp_Object Qup, Qdown, Qbottom, Qend_scroll; -Lisp_Object Qtop, Qratio; +static Lisp_Object Qabove_handle, Qhandle, Qbelow_handle; +Lisp_Object Qup, Qdown, Qbottom; +static Lisp_Object Qend_scroll; +Lisp_Object Qtop; +static Lisp_Object Qratio; /* An array of scroll bar parts, indexed by an enum scroll_bar_part value. */ static Lisp_Object *const scroll_bar_parts[] = { @@ -7889,8 +7900,8 @@ static int ntool_bar_items; /* The symbols `:image' and `:rtl'. */ -Lisp_Object QCimage; -Lisp_Object Qrtl; +static Lisp_Object QCimage; +static Lisp_Object Qrtl; /* Function prototypes. */ diff --git a/src/keyboard.h b/src/keyboard.h index 72bb821b2eb..d945de5de20 100644 --- a/src/keyboard.h +++ b/src/keyboard.h @@ -408,15 +408,10 @@ typedef struct _widget_value extern Lisp_Object Qswitch_frame; /* Properties on event heads. */ -extern Lisp_Object Qevent_kind, Qevent_symbol_elements; - -/* Getting an unmodified version of an event head. */ -#define EVENT_HEAD_UNMODIFIED(event_head) \ - (Fcar (Fget ((event_head), Qevent_symbol_elements))) +extern Lisp_Object Qevent_kind; /* The values of Qevent_kind properties. */ -extern Lisp_Object Qfunction_key, Qmouse_click, Qmouse_movement; -extern Lisp_Object Qscroll_bar_movement; +extern Lisp_Object Qmouse_click; extern Lisp_Object Qhelp_echo; @@ -454,9 +449,7 @@ extern Lisp_Object real_this_command; /* Non-nil disable property on a command means do not execute it; call disabled-command-function's value instead. */ -extern Lisp_Object QCbutton, QCtoggle, QCradio, QClabel; - -extern Lisp_Object Qinput_method_function; +extern Lisp_Object QCtoggle, QCradio; /* An event header symbol HEAD may have a property named Qevent_symbol_element_mask, which is of the form (BASE MODIFIERS); diff --git a/src/keymap.c b/src/keymap.c index 9adf2898736..741fa4f6dfc 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -56,8 +56,9 @@ Lisp_Object control_x_map; /* The keymap used for globally bound /* keymap used for minibuffers when doing completion */ /* keymap used for minibuffers when doing completion and require a match */ -Lisp_Object Qkeymapp, Qkeymap, Qnon_ascii, Qmenu_item, Qremap; -Lisp_Object QCadvertised_binding; +static Lisp_Object Qkeymapp, Qnon_ascii; +Lisp_Object Qkeymap, Qmenu_item, Qremap; +static Lisp_Object QCadvertised_binding; /* Alist of elements like (DEL . "\d"). */ static Lisp_Object exclude_keys; @@ -659,7 +660,7 @@ map_keymap (Lisp_Object map, map_keymap_function_t fun, Lisp_Object args, void * UNGCPRO; } -Lisp_Object Qkeymap_canonicalize; +static Lisp_Object Qkeymap_canonicalize; /* Same as map_keymap, but does it right, properly eliminating duplicate bindings due to inheritance. */ @@ -2175,7 +2176,7 @@ then the value includes only maps for prefixes that start with PREFIX. */) } return maps; } -Lisp_Object Qsingle_key_description, Qkey_description; +static Lisp_Object Qsingle_key_description, Qkey_description; /* This function cannot GC. */ diff --git a/src/lisp.h b/src/lisp.h index 10fc66f4406..fb44002b6a6 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2291,22 +2291,22 @@ struct window; struct frame; /* Defined in data.c. */ -extern Lisp_Object Qnil, Qt, Qquote, Qlambda, Qsubr, Qunbound; +extern Lisp_Object Qnil, Qt, Qquote, Qlambda, Qunbound; extern Lisp_Object Qerror_conditions, Qerror_message, Qtop_level; -extern Lisp_Object Qerror, Qquit, Qwrong_type_argument, Qargs_out_of_range; +extern Lisp_Object Qerror, Qquit, Qargs_out_of_range; extern Lisp_Object Qvoid_variable, Qvoid_function; -extern Lisp_Object Qsetting_constant, Qinvalid_read_syntax; +extern Lisp_Object Qinvalid_read_syntax; extern Lisp_Object Qinvalid_function, Qwrong_number_of_arguments, Qno_catch; extern Lisp_Object Qend_of_file, Qarith_error, Qmark_inactive; extern Lisp_Object Qbeginning_of_buffer, Qend_of_buffer, Qbuffer_read_only; extern Lisp_Object Qtext_read_only; extern Lisp_Object Qinteractive_form; extern Lisp_Object Qcircular_list; -extern Lisp_Object Qintegerp, Qnatnump, Qwholenump, Qsymbolp, Qlistp, Qconsp; +extern Lisp_Object Qintegerp, Qwholenump, Qsymbolp, Qlistp, Qconsp; extern Lisp_Object Qstringp, Qarrayp, Qsequencep, Qbufferp; extern Lisp_Object Qchar_or_string_p, Qmarkerp, Qinteger_or_marker_p, Qvectorp; extern Lisp_Object Qbuffer_or_string_p; -extern Lisp_Object Qboundp, Qfboundp; +extern Lisp_Object Qfboundp; extern Lisp_Object Qchar_table_p, Qvector_or_char_table_p; extern Lisp_Object Qcdr; @@ -2530,9 +2530,8 @@ extern void init_fringe_once (void); #endif /* HAVE_WINDOW_SYSTEM */ /* Defined in image.c */ -extern Lisp_Object QCascent, QCmargin, QCrelief, Qcount, Qextension_data; -extern Lisp_Object QCconversion, QCcolor_symbols, QCheuristic_mask; -extern Lisp_Object QCindex, QCmatrix, QCcolor_adjustment, QCmask; +extern Lisp_Object QCascent, QCmargin, QCrelief; +extern Lisp_Object QCconversion; extern int x_bitmap_mask (struct frame *, int); extern void syms_of_image (void); extern void init_image (void); @@ -2602,8 +2601,6 @@ extern void syms_of_display (void); /* Defined in xdisp.c */ extern Lisp_Object Qinhibit_point_motion_hooks; extern Lisp_Object Qinhibit_redisplay, Qdisplay; -extern Lisp_Object Qinhibit_eval_during_redisplay; -extern Lisp_Object Qmessage_truncate_lines; extern Lisp_Object Qmenu_bar_update_hook; extern Lisp_Object Qwindow_scroll_functions; extern Lisp_Object Qoverriding_local_map, Qoverriding_terminal_local_map; @@ -2821,6 +2818,7 @@ extern void syms_of_lread (void); /* Defined in eval.c. */ extern Lisp_Object Qautoload, Qexit, Qinteractive, Qcommandp, Qdefun, Qmacro; extern Lisp_Object Qinhibit_quit, Qclosure; +extern Lisp_Object Qand_rest; extern Lisp_Object Vautoload_queue; extern Lisp_Object Vsignaling_function; extern int handling_signal; @@ -2963,8 +2961,7 @@ EXFUN (Fkill_buffer, 1); EXFUN (Fkill_all_local_variables, 0); EXFUN (Fbuffer_enable_undo, 1); EXFUN (Ferase_buffer, 0); -extern Lisp_Object Qoverlayp; -extern Lisp_Object Qpriority, Qwindow, Qevaporate, Qbefore_string, Qafter_string; +extern Lisp_Object Qpriority, Qwindow, Qbefore_string, Qafter_string; extern Lisp_Object get_truename_buffer (Lisp_Object); extern struct buffer *all_buffers; EXFUN (Fprevious_overlay_change, 1); @@ -3111,16 +3108,14 @@ extern Lisp_Object echo_message_buffer; extern struct kboard *echo_kboard; extern void cancel_echoing (void); extern Lisp_Object Qdisabled, QCfilter; -extern Lisp_Object Qabove_handle, Qhandle, Qbelow_handle; -extern Lisp_Object Qup, Qdown, Qbottom, Qend_scroll; -extern Lisp_Object Qtop, Qratio; +extern Lisp_Object Qup, Qdown, Qbottom; +extern Lisp_Object Qtop; extern int input_pending; EXFUN (Fdiscard_input, 0); EXFUN (Frecursive_edit, 0); EXFUN (Ftop_level, 0) NO_RETURN; extern Lisp_Object menu_bar_items (Lisp_Object); extern Lisp_Object tool_bar_items (Lisp_Object, int *); -extern Lisp_Object Qvertical_scroll_bar; extern void discard_mouse_events (void); EXFUN (Fevent_convert_list, 1); EXFUN (Fread_key_sequence, 5); @@ -3223,7 +3218,6 @@ EXFUN (Fget_buffer_process, 1); EXFUN (Fprocess_status, 1); EXFUN (Fkill_process, 2); EXFUN (Fwaiting_for_user_input_p, 0); -extern Lisp_Object Qprocessp; extern void kill_buffer_processes (Lisp_Object); extern int wait_reading_process_output (int, int, int, int, Lisp_Object, @@ -3411,9 +3405,9 @@ EXFUN (Fx_focus_frame, 1); #endif /* Defined in xfaces.c */ -extern Lisp_Object Qdefault, Qtool_bar, Qregion, Qfringe; -extern Lisp_Object Qheader_line, Qscroll_bar, Qcursor, Qborder, Qmouse, Qmenu; -extern Lisp_Object Qmode_line_inactive, Qvertical_border; +extern Lisp_Object Qdefault, Qtool_bar, Qfringe; +extern Lisp_Object Qheader_line, Qscroll_bar, Qcursor; +extern Lisp_Object Qmode_line_inactive; extern Lisp_Object Qface; extern Lisp_Object Qnormal; extern Lisp_Object QCfamily, QCweight, QCslant; diff --git a/src/lread.c b/src/lread.c index 7d12f5a85d3..2d383350ec1 100644 --- a/src/lread.c +++ b/src/lread.c @@ -61,20 +61,21 @@ along with GNU Emacs. If not, see . */ #endif /* hash table read constants */ -Lisp_Object Qhash_table, Qdata; -Lisp_Object Qtest, Qsize; -Lisp_Object Qweakness; -Lisp_Object Qrehash_size; -Lisp_Object Qrehash_threshold; - -Lisp_Object Qread_char, Qget_file_char, Qstandard_input, Qcurrent_load_list; +static Lisp_Object Qhash_table, Qdata; +static Lisp_Object Qtest, Qsize; +static Lisp_Object Qweakness; +static Lisp_Object Qrehash_size; +static Lisp_Object Qrehash_threshold; + +static Lisp_Object Qread_char, Qget_file_char, Qcurrent_load_list; +Lisp_Object Qstandard_input; Lisp_Object Qvariable_documentation; -Lisp_Object Qascii_character, Qload, Qload_file_name; +static Lisp_Object Qascii_character, Qload, Qload_file_name; Lisp_Object Qbackquote, Qcomma, Qcomma_at, Qcomma_dot, Qfunction; -Lisp_Object Qinhibit_file_name_operation; -Lisp_Object Qeval_buffer_list; -Lisp_Object Qlexical_binding; -Lisp_Object Qfile_truename, Qdo_after_load_evaluation; /* ACM 2006/5/16 */ +static Lisp_Object Qinhibit_file_name_operation; +static Lisp_Object Qeval_buffer_list; +static Lisp_Object Qlexical_binding; +static Lisp_Object Qfile_truename, Qdo_after_load_evaluation; /* ACM 2006/5/16 */ /* Used instead of Qget_file_char while loading *.elc files compiled by Emacs 21 or older. */ diff --git a/src/macros.c b/src/macros.c index fd771b52dee..e5de4a14136 100644 --- a/src/macros.c +++ b/src/macros.c @@ -27,7 +27,8 @@ along with GNU Emacs. If not, see . */ #include "window.h" #include "keyboard.h" -Lisp_Object Qexecute_kbd_macro, Qkbd_macro_termination_hook; +Lisp_Object Qexecute_kbd_macro; +static Lisp_Object Qkbd_macro_termination_hook; /* Number of successful iterations so far for innermost keyboard macro. diff --git a/src/minibuf.c b/src/minibuf.c index 3e8fc0c2424..ae4372746bc 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -53,35 +53,35 @@ int minibuf_level; /* The maximum length of a minibuffer history. */ -Lisp_Object Qhistory_length; +static Lisp_Object Qhistory_length; /* Fread_minibuffer leaves the input here as a string. */ Lisp_Object last_minibuf_string; -Lisp_Object Qminibuffer_history, Qbuffer_name_history; +static Lisp_Object Qminibuffer_history, Qbuffer_name_history; -Lisp_Object Qread_file_name_internal; +static Lisp_Object Qread_file_name_internal; /* Normal hooks for entry to and exit from minibuffer. */ -Lisp_Object Qminibuffer_setup_hook; -Lisp_Object Qminibuffer_exit_hook; +static Lisp_Object Qminibuffer_setup_hook; +static Lisp_Object Qminibuffer_exit_hook; Lisp_Object Qcompletion_ignore_case; -Lisp_Object Qminibuffer_completion_table; -Lisp_Object Qminibuffer_completion_predicate; -Lisp_Object Qminibuffer_completion_confirm; -Lisp_Object Qcompleting_read_default; -Lisp_Object Quser_variable_p; +static Lisp_Object Qminibuffer_completion_table; +static Lisp_Object Qminibuffer_completion_predicate; +static Lisp_Object Qminibuffer_completion_confirm; +static Lisp_Object Qcompleting_read_default; +static Lisp_Object Quser_variable_p; -Lisp_Object Qminibuffer_default; +static Lisp_Object Qminibuffer_default; -Lisp_Object Qcurrent_input_method, Qactivate_input_method; +static Lisp_Object Qcurrent_input_method, Qactivate_input_method; -Lisp_Object Qcase_fold_search; +static Lisp_Object Qcase_fold_search; -Lisp_Object Qread_expression_history; +static Lisp_Object Qread_expression_history; /* Prompt to display in front of the mini-buffer contents. */ diff --git a/src/print.c b/src/print.c index f039b40aa60..82040555921 100644 --- a/src/print.c +++ b/src/print.c @@ -39,11 +39,11 @@ along with GNU Emacs. If not, see . */ Lisp_Object Qstandard_output; -Lisp_Object Qtemp_buffer_setup_hook; +static Lisp_Object Qtemp_buffer_setup_hook; /* These are used to print like we read. */ -Lisp_Object Qfloat_output_format; +static Lisp_Object Qfloat_output_format; #include @@ -79,7 +79,7 @@ EMACS_INT print_buffer_pos; EMACS_INT print_buffer_pos_byte; Lisp_Object Qprint_escape_newlines; -Lisp_Object Qprint_escape_multibyte, Qprint_escape_nonascii; +static Lisp_Object Qprint_escape_multibyte, Qprint_escape_nonascii; /* Vprint_number_table is a table, that keeps objects that are going to be printed, to allow use of #n= and #n# to express sharing. diff --git a/src/process.c b/src/process.c index ec96c1aa67e..89d04081eb7 100644 --- a/src/process.c +++ b/src/process.c @@ -127,22 +127,24 @@ int inhibit_sentinels; #ifdef subprocesses -Lisp_Object Qprocessp; -Lisp_Object Qrun, Qstop, Qsignal; -Lisp_Object Qopen, Qclosed, Qconnect, Qfailed, Qlisten; -Lisp_Object Qlocal, Qipv4, Qdatagram, Qseqpacket; -Lisp_Object Qreal, Qnetwork, Qserial; +static Lisp_Object Qprocessp; +static Lisp_Object Qrun, Qstop, Qsignal; +static Lisp_Object Qopen, Qclosed, Qconnect, Qfailed, Qlisten; +Lisp_Object Qlocal; +static Lisp_Object Qipv4, Qdatagram, Qseqpacket; +static Lisp_Object Qreal, Qnetwork, Qserial; #ifdef AF_INET6 -Lisp_Object Qipv6; +static Lisp_Object Qipv6; #endif -Lisp_Object QCport, QCspeed, QCprocess; +static Lisp_Object QCport, QCprocess; +Lisp_Object QCspeed; Lisp_Object QCbytesize, QCstopbits, QCparity, Qodd, Qeven; Lisp_Object QCflowcontrol, Qhw, Qsw, QCsummary; -Lisp_Object QCbuffer, QChost, QCservice; -Lisp_Object QClocal, QCremote, QCcoding; -Lisp_Object QCserver, QCnowait, QCnoquery, QCstop; -Lisp_Object QCsentinel, QClog, QCoptions, QCplist; -Lisp_Object Qlast_nonmenu_event; +static Lisp_Object QCbuffer, QChost, QCservice; +static Lisp_Object QClocal, QCremote, QCcoding; +static Lisp_Object QCserver, QCnowait, QCnoquery, QCstop; +static Lisp_Object QCsentinel, QClog, QCoptions, QCplist; +static Lisp_Object Qlast_nonmenu_event; /* QCfamily is declared and initialized in xfaces.c, QCfilter in keyboard.c. */ extern Lisp_Object QCfamily, QCfilter; diff --git a/src/process.h b/src/process.h index 6bf1084afcd..1e90f553b38 100644 --- a/src/process.h +++ b/src/process.h @@ -181,7 +181,7 @@ extern Lisp_Object Qminflt, Qmajflt, Qcminflt, Qcmajflt, Qutime, Qstime; extern Lisp_Object Qcutime, Qpri, Qnice, Qthcount, Qstart, Qvsize, Qrss, Qargs; extern Lisp_Object Quser, Qgroup, Qetime, Qpcpu, Qpmem, Qtpgid, Qcstime; extern Lisp_Object Qtime, Qctime; -extern Lisp_Object QCport, QCspeed, QCprocess; +extern Lisp_Object QCspeed; extern Lisp_Object QCbytesize, QCstopbits, QCparity, Qodd, Qeven; extern Lisp_Object QCflowcontrol, Qhw, Qsw, QCsummary; @@ -198,4 +198,3 @@ extern void add_read_fd (int fd, fd_callback func, void *data); extern void delete_read_fd (int fd); extern void add_write_fd (int fd, fd_callback func, void *data); extern void delete_write_fd (int fd); - diff --git a/src/search.c b/src/search.c index 34f02e6cd65..ea10e47f556 100644 --- a/src/search.c +++ b/src/search.c @@ -85,10 +85,10 @@ static Lisp_Object last_thing_searched; /* error condition signaled when regexp compile_pattern fails */ -Lisp_Object Qinvalid_regexp; +static Lisp_Object Qinvalid_regexp; /* Error condition used for failing searches */ -Lisp_Object Qsearch_failed; +static Lisp_Object Qsearch_failed; static void set_search_regs (EMACS_INT, EMACS_INT); static void save_search_regs (void); diff --git a/src/sound.c b/src/sound.c index a972809e2c7..4478a067c09 100644 --- a/src/sound.c +++ b/src/sound.c @@ -94,9 +94,9 @@ along with GNU Emacs. If not, see . */ /* Symbols. */ -Lisp_Object QCvolume, QCdevice; -Lisp_Object Qsound; -Lisp_Object Qplay_sound_functions; +static Lisp_Object QCvolume, QCdevice; +static Lisp_Object Qsound; +static Lisp_Object Qplay_sound_functions; /* Indices of attributes in a sound attributes vector. */ diff --git a/src/syntax.c b/src/syntax.c index 819a7542a7b..96d50f9a4e3 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -95,7 +95,8 @@ along with GNU Emacs. If not, see . */ #define ST_COMMENT_STYLE (256 + 1) #define ST_STRING_STYLE (256 + 2) -Lisp_Object Qsyntax_table_p, Qsyntax_table, Qscan_error; +static Lisp_Object Qsyntax_table_p; +static Lisp_Object Qsyntax_table, Qscan_error; /* Used as a temporary in SYNTAX_ENTRY and other macros in syntax.h, if not compiled with GCC. No need to mark it, since it is used diff --git a/src/syntax.h b/src/syntax.h index e8726bb28a4..2b052715dac 100644 --- a/src/syntax.h +++ b/src/syntax.h @@ -19,7 +19,6 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ -extern Lisp_Object Qsyntax_table_p; extern void update_syntax_table (EMACS_INT, int, int, Lisp_Object); /* The standard syntax table is stored where it will automatically @@ -300,4 +299,3 @@ struct gl_state_s extern struct gl_state_s gl_state; extern EMACS_INT scan_words (EMACS_INT, EMACS_INT); - diff --git a/src/textprop.c b/src/textprop.c index 8cd9d580c4c..b3bb064e8b8 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -47,16 +47,19 @@ along with GNU Emacs. If not, see . */ /* Types of hooks. */ -Lisp_Object Qmouse_left; -Lisp_Object Qmouse_entered; +static Lisp_Object Qmouse_left; +static Lisp_Object Qmouse_entered; Lisp_Object Qpoint_left; Lisp_Object Qpoint_entered; Lisp_Object Qcategory; Lisp_Object Qlocal_map; /* Visual properties text (including strings) may have. */ -Lisp_Object Qforeground, Qbackground, Qfont, Qunderline, Qstipple; -Lisp_Object Qinvisible, Qread_only, Qintangible, Qmouse_face; +static Lisp_Object Qforeground, Qbackground, Qunderline; +Lisp_Object Qfont; +static Lisp_Object Qstipple; +Lisp_Object Qinvisible, Qintangible, Qmouse_face; +static Lisp_Object Qread_only; Lisp_Object Qminibuffer_prompt; /* Sticky properties */ diff --git a/src/window.c b/src/window.c index 72ab2a3ea10..ee1b1bc04f7 100644 --- a/src/window.c +++ b/src/window.c @@ -50,10 +50,11 @@ along with GNU Emacs. If not, see . */ #include "nsterm.h" #endif -Lisp_Object Qwindowp, Qwindow_live_p, Qwindow_configuration_p; -Lisp_Object Qdisplay_buffer; -Lisp_Object Qscroll_up, Qscroll_down, Qscroll_command; -Lisp_Object Qwindow_size_fixed; +Lisp_Object Qwindowp, Qwindow_live_p; +static Lisp_Object Qwindow_configuration_p; +static Lisp_Object Qdisplay_buffer; +static Lisp_Object Qscroll_up, Qscroll_down, Qscroll_command; +static Lisp_Object Qwindow_size_fixed; static int displayed_window_lines (struct window *); static struct window *decode_window (Lisp_Object); @@ -116,7 +117,7 @@ Lisp_Object minibuf_selected_window; /* Hook run at end of temp_output_buffer_show. */ -Lisp_Object Qtemp_buffer_show_hook; +static Lisp_Object Qtemp_buffer_show_hook; /* Incremented for each window created. */ diff --git a/src/xdisp.c b/src/xdisp.c index 7553841f51b..b5ba2090c70 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -318,29 +318,31 @@ along with GNU Emacs. If not, see . */ Lisp_Object Qoverriding_local_map, Qoverriding_terminal_local_map; Lisp_Object Qwindow_scroll_functions; -Lisp_Object Qwindow_text_change_functions; -Lisp_Object Qredisplay_end_trigger_functions; +static Lisp_Object Qwindow_text_change_functions; +static Lisp_Object Qredisplay_end_trigger_functions; Lisp_Object Qinhibit_point_motion_hooks; -Lisp_Object QCeval, QCfile, QCdata, QCpropertize; -Lisp_Object Qfontified; -Lisp_Object Qgrow_only; -Lisp_Object Qinhibit_eval_during_redisplay; -Lisp_Object Qbuffer_position, Qposition, Qobject; -Lisp_Object Qright_to_left, Qleft_to_right; +static Lisp_Object QCeval, QCpropertize; +Lisp_Object QCfile, QCdata; +static Lisp_Object Qfontified; +static Lisp_Object Qgrow_only; +static Lisp_Object Qinhibit_eval_during_redisplay; +static Lisp_Object Qbuffer_position, Qposition, Qobject; +static Lisp_Object Qright_to_left, Qleft_to_right; /* Cursor shapes */ Lisp_Object Qbar, Qhbar, Qbox, Qhollow; /* Pointer shapes */ -Lisp_Object Qarrow, Qhand, Qtext; +static Lisp_Object Qarrow, Qhand; +Lisp_Object Qtext; /* Holds the list (error). */ Lisp_Object list_of_error; -Lisp_Object Qfontification_functions; +static Lisp_Object Qfontification_functions; -Lisp_Object Qwrap_prefix; -Lisp_Object Qline_prefix; +static Lisp_Object Qwrap_prefix; +static Lisp_Object Qline_prefix; /* Non-nil means don't actually do any redisplay. */ @@ -350,12 +352,14 @@ Lisp_Object Qinhibit_redisplay; Lisp_Object Qdisplay; -Lisp_Object Qspace, QCalign_to, QCrelative_width, QCrelative_height; -Lisp_Object Qleft_margin, Qright_margin, Qspace_width, Qraise; -Lisp_Object Qslice; +Lisp_Object Qspace, QCalign_to; +static Lisp_Object QCrelative_width, QCrelative_height; +Lisp_Object Qleft_margin, Qright_margin; +static Lisp_Object Qspace_width, Qraise; +static Lisp_Object Qslice; Lisp_Object Qcenter; -Lisp_Object Qmargin, Qpointer; -Lisp_Object Qline_height; +static Lisp_Object Qmargin, Qpointer; +static Lisp_Object Qline_height; #ifdef HAVE_WINDOW_SYSTEM @@ -383,15 +387,15 @@ Lisp_Object Qline_height; /* Name of the face used to highlight trailing whitespace. */ -Lisp_Object Qtrailing_whitespace; +static Lisp_Object Qtrailing_whitespace; /* Name and number of the face used to highlight escape glyphs. */ -Lisp_Object Qescape_glyph; +static Lisp_Object Qescape_glyph; /* Name and number of the face used to highlight non-breaking spaces. */ -Lisp_Object Qnobreak_space; +static Lisp_Object Qnobreak_space; /* The symbol `image' which is the car of the lists used to represent images in Lisp. Also a tool bar style. */ @@ -399,8 +403,9 @@ Lisp_Object Qnobreak_space; Lisp_Object Qimage; /* The image map types. */ -Lisp_Object QCmap, QCpointer; -Lisp_Object Qrect, Qcircle, Qpoly; +Lisp_Object QCmap; +static Lisp_Object QCpointer; +static Lisp_Object Qrect, Qcircle, Qpoly; /* Tool bar styles */ Lisp_Object Qboth, Qboth_horiz, Qtext_image_horiz; @@ -460,12 +465,12 @@ static struct buffer *this_line_buffer; Voverlay_arrow_position is a marker, last-arrow-position is its numerical position. */ -Lisp_Object Qlast_arrow_position, Qlast_arrow_string; +static Lisp_Object Qlast_arrow_position, Qlast_arrow_string; /* Alternative overlay-arrow-string and overlay-arrow-bitmap properties on a symbol in overlay-arrow-variable-list. */ -Lisp_Object Qoverlay_arrow_string, Qoverlay_arrow_bitmap; +static Lisp_Object Qoverlay_arrow_string, Qoverlay_arrow_bitmap; Lisp_Object Qmenu_bar_update_hook; @@ -548,8 +553,8 @@ int message_buf_print; /* The symbol `inhibit-menubar-update' and its DEFVAR_BOOL variable. */ -Lisp_Object Qinhibit_menubar_update; -Lisp_Object Qmessage_truncate_lines; +static Lisp_Object Qinhibit_menubar_update; +static Lisp_Object Qmessage_truncate_lines; /* Set to 1 in clear_message to make redisplay_internal aware of an emptied echo area. */ @@ -603,7 +608,7 @@ int trace_move; #define TRACE_MOVE(x) (void) 0 #endif -Lisp_Object Qauto_hscroll_mode; +static Lisp_Object Qauto_hscroll_mode; /* Buffer being redisplayed -- for redisplay_window_error. */ @@ -708,7 +713,7 @@ static struct glyph_slice null_glyph_slice = { 0, 0, 0, 0 }; int redisplaying_p; -Lisp_Object Qinhibit_free_realized_faces; +static Lisp_Object Qinhibit_free_realized_faces; /* If a string, XTread_socket generates an event to display that string. (The display is done in read_char.) */ @@ -735,7 +740,7 @@ struct atimer *hourglass_atimer; Lisp_Object Qglyphless_char; /* Symbol for the purpose of Vglyphless_char_display. */ -Lisp_Object Qglyphless_char_display; +static Lisp_Object Qglyphless_char_display; /* Method symbols for Vglyphless_char_display. */ static Lisp_Object Qhex_code, Qempty_box, Qthin_space, Qzero_width; diff --git a/src/xfaces.c b/src/xfaces.c index eb2065d4637..920debf4dba 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -304,25 +304,29 @@ along with GNU Emacs. If not, see . */ /* Keyword symbols used for face attribute names. */ -Lisp_Object QCfamily, QCheight, QCweight, QCslant, QCunderline; -Lisp_Object QCinverse_video, QCforeground, QCbackground, QCstipple; -Lisp_Object QCwidth, QCfont, QCbold, QCitalic; -Lisp_Object QCreverse_video; -Lisp_Object QCoverline, QCstrike_through, QCbox, QCinherit; -Lisp_Object QCfontset; +Lisp_Object QCfamily, QCheight, QCweight, QCslant; +static Lisp_Object QCunderline; +static Lisp_Object QCinverse_video, QCstipple; +Lisp_Object QCforeground, QCbackground; +Lisp_Object QCwidth; +static Lisp_Object QCfont, QCbold, QCitalic; +static Lisp_Object QCreverse_video; +static Lisp_Object QCoverline, QCstrike_through, QCbox, QCinherit; +static Lisp_Object QCfontset; /* Symbols used for attribute values. */ -Lisp_Object Qnormal, Qbold, Qultra_light, Qextra_light, Qlight; -Lisp_Object Qsemi_light, Qsemi_bold, Qextra_bold, Qultra_bold; -Lisp_Object Qoblique, Qitalic, Qreverse_oblique, Qreverse_italic; -Lisp_Object Qultra_condensed, Qextra_condensed, Qcondensed; -Lisp_Object Qsemi_condensed, Qsemi_expanded, Qexpanded, Qextra_expanded; -Lisp_Object Qultra_expanded; -Lisp_Object Qreleased_button, Qpressed_button; -Lisp_Object QCstyle, QCcolor, QCline_width; -Lisp_Object Qunspecified; -Lisp_Object Qignore_defface; +Lisp_Object Qnormal; +static Lisp_Object Qbold, Qultra_light, Qextra_light, Qlight; +static Lisp_Object Qsemi_light, Qsemi_bold, Qextra_bold, Qultra_bold; +static Lisp_Object Qoblique, Qitalic, Qreverse_oblique, Qreverse_italic; +static Lisp_Object Qultra_condensed, Qextra_condensed, Qcondensed; +static Lisp_Object Qsemi_condensed, Qsemi_expanded, Qexpanded, Qextra_expanded; +static Lisp_Object Qultra_expanded; +static Lisp_Object Qreleased_button, Qpressed_button; +static Lisp_Object QCstyle, QCcolor, QCline_width; +static Lisp_Object Qunspecified; +static Lisp_Object Qignore_defface; char unspecified_fg[] = "unspecified-fg", unspecified_bg[] = "unspecified-bg"; @@ -333,15 +337,18 @@ Lisp_Object Qframe_set_background_mode; /* Names of basic faces. */ -Lisp_Object Qdefault, Qtool_bar, Qregion, Qfringe; -Lisp_Object Qheader_line, Qscroll_bar, Qcursor, Qborder, Qmouse, Qmenu; -Lisp_Object Qmode_line_inactive, Qvertical_border; +Lisp_Object Qdefault, Qtool_bar, Qfringe; +static Lisp_Object Qregion; +Lisp_Object Qheader_line, Qscroll_bar, Qcursor; +static Lisp_Object Qborder, Qmouse, Qmenu; +Lisp_Object Qmode_line_inactive; +static Lisp_Object Qvertical_border; /* The symbol `face-alias'. A symbols having that property is an alias for another face. Value of the property is the name of the aliased face. */ -Lisp_Object Qface_alias; +static Lisp_Object Qface_alias; /* Alist of alternative font families. Each element is of the form (FAMILY FAMILY1 FAMILY2 ...). If fonts of FAMILY can't be loaded, @@ -361,7 +368,7 @@ Lisp_Object Vface_alternative_font_registry_alist; font may be scaled if its name matches a regular expression in the list. */ -Lisp_Object Qscalable_fonts_allowed; +static Lisp_Object Qscalable_fonts_allowed; #define DEFAULT_FONT_LIST_LIMIT 100 @@ -377,11 +384,11 @@ Lisp_Object Qface; /* Property for basic faces which other faces cannot inherit. */ -Lisp_Object Qface_no_inherit; +static Lisp_Object Qface_no_inherit; /* Error symbol for wrong_type_argument in load_pixmap. */ -Lisp_Object Qbitmap_spec_p; +static Lisp_Object Qbitmap_spec_p; /* The next ID to assign to Lisp faces. */ @@ -394,11 +401,11 @@ static int lface_id_to_name_size; /* TTY color-related functions (defined in tty-colors.el). */ -Lisp_Object Qtty_color_desc, Qtty_color_by_index, Qtty_color_standard_values; +static Lisp_Object Qtty_color_desc, Qtty_color_by_index, Qtty_color_standard_values; /* The name of the function used to compute colors on TTYs. */ -Lisp_Object Qtty_color_alist; +static Lisp_Object Qtty_color_alist; /* Counter for calls to clear_face_cache. If this counter reaches CLEAR_FONT_TABLE_COUNT, and a frame has more than diff --git a/src/xfns.c b/src/xfns.c index 8d8a908222f..6fd332016ce 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -139,10 +139,10 @@ char *gray_bitmap_bits = gray_bits; static int x_in_use; -Lisp_Object Qnone; -Lisp_Object Qsuppress_icon; -Lisp_Object Qundefined_color; -Lisp_Object Qcompound_text, Qcancel_timer; +static Lisp_Object Qnone; +static Lisp_Object Qsuppress_icon; +static Lisp_Object Qundefined_color; +static Lisp_Object Qcompound_text, Qcancel_timer; Lisp_Object Qfont_param; #if GLYPH_DEBUG diff --git a/src/xmenu.c b/src/xmenu.c index 595ae795282..721019ffc56 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -111,7 +111,7 @@ along with GNU Emacs. If not, see . */ #define FALSE 0 #endif /* no TRUE */ -Lisp_Object Qdebug_on_next_call; +static Lisp_Object Qdebug_on_next_call; #if defined (USE_X_TOOLKIT) || defined (USE_GTK) static Lisp_Object xdialog_show (FRAME_PTR, int, Lisp_Object, Lisp_Object, diff --git a/src/xselect.c b/src/xselect.c index 4f1a452023a..2d656cfec9a 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -100,14 +100,14 @@ static Lisp_Object clean_local_selection_data (Lisp_Object); #endif -Lisp_Object QSECONDARY, QSTRING, QINTEGER, QCLIPBOARD, QTIMESTAMP, +static Lisp_Object QSECONDARY, QSTRING, QINTEGER, QCLIPBOARD, QTIMESTAMP, QTEXT, QDELETE, QMULTIPLE, QINCR, QEMACS_TMP, QTARGETS, QATOM, QNULL, QATOM_PAIR; -Lisp_Object QCOMPOUND_TEXT; /* This is a type of selection. */ -Lisp_Object QUTF8_STRING; /* This is a type of selection. */ +static Lisp_Object QCOMPOUND_TEXT; /* This is a type of selection. */ +static Lisp_Object QUTF8_STRING; /* This is a type of selection. */ -Lisp_Object Qcompound_text_with_extensions; +static Lisp_Object Qcompound_text_with_extensions; static Lisp_Object Qforeign_selection; -- cgit v1.2.1 From 244ed9077fe7ccebbc15c7157cb45832f46a46d3 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 10 Apr 2011 21:39:49 -0700 Subject: alloc.c: Import and export fewer symbols, and remove unused items. * lisp.h (suppress_checking, die): Declare only if ENABLE_CHECKING is defined. (suppress_checking): Add EXTERNALLY_VISIBLE attribute, so that it's not optimized away by whole-program optimization. (message_enable_multibyte, free_misc): Remove. (catchlist, handlerlist, mark_backtrace): Declare only if BYTE_MARK_STACK. (mark_byte_stack): Likewise, fixing a ifdef-vs-if typo. * alloc.c (pure): Export only if VIRT_ADDR_VARIES is defined. (message_enable_multibyte): Remove decl. (free_misc, interval_free_list, float_block, float_block_index): (n_float_blocks, float_free_list, cons_block, cons_block_index): (cons_free_list, last_marked_index): Now static. (suppress_checking, die): Define only if ENABLE_CHECKING is defined. * eval.c (catchlist, handlerlist): Export only if BYTE_MARK_STACK. (mark_backtrace): Define only if BYTE_MARK_STACK. * xdisp.c (message_enable_multibyte): Now static. --- src/ChangeLog | 20 ++++++++++++++++++++ src/alloc.c | 28 ++++++++++++++++------------ src/eval.c | 25 +++++++++++++++++-------- src/lisp.h | 19 +++++++++++-------- src/xdisp.c | 2 +- 5 files changed, 65 insertions(+), 29 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 0be406a6e7b..43358338c4d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,25 @@ 2011-04-11 Paul Eggert + alloc.c: Import and export fewer symbols, and remove unused items. + * lisp.h (suppress_checking, die): Declare only if ENABLE_CHECKING + is defined. + (suppress_checking): Add EXTERNALLY_VISIBLE attribute, so that + it's not optimized away by whole-program optimization. + (message_enable_multibyte, free_misc): Remove. + (catchlist, handlerlist, mark_backtrace): + Declare only if BYTE_MARK_STACK. + (mark_byte_stack): Likewise, fixing a ifdef-vs-if typo. + * alloc.c (pure): Export only if VIRT_ADDR_VARIES is defined. + (message_enable_multibyte): Remove decl. + (free_misc, interval_free_list, float_block, float_block_index): + (n_float_blocks, float_free_list, cons_block, cons_block_index): + (cons_free_list, last_marked_index): + Now static. + (suppress_checking, die): Define only if ENABLE_CHECKING is defined. + * eval.c (catchlist, handlerlist): Export only if BYTE_MARK_STACK. + (mark_backtrace): Define only if BYTE_MARK_STACK. + * xdisp.c (message_enable_multibyte): Now static. + Declare Lisp_Object Q* variables to be 'static' if not exproted. This makes it easier for human readers (and static analyzers) to see whether these variables are used from other modules. diff --git a/src/alloc.c b/src/alloc.c index ad3dfa96cd2..7803ccdc976 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -212,6 +212,9 @@ static int malloc_hysteresis; remapping on more recent systems because this is less important nowadays than in the days of small memories and timesharing. */ +#ifndef VIRT_ADDR_VARIES +static +#endif EMACS_INT pure[(PURESIZE + sizeof (EMACS_INT) - 1) / sizeof (EMACS_INT)] = {1,}; #define PUREBEG (char *) pure @@ -281,8 +284,7 @@ static struct Lisp_String *allocate_string (void); static void compact_small_strings (void); static void free_large_strings (void); static void sweep_strings (void); - -extern int message_enable_multibyte; +static void free_misc (Lisp_Object); /* When scanning the C stack for live Lisp objects, Emacs keeps track of what memory allocated via lisp_malloc is intended for what @@ -1341,7 +1343,7 @@ static int total_free_intervals, total_intervals; /* List of free intervals. */ -INTERVAL interval_free_list; +static INTERVAL interval_free_list; /* Total number of interval blocks now in use. */ @@ -2460,19 +2462,19 @@ struct float_block /* Current float_block. */ -struct float_block *float_block; +static struct float_block *float_block; /* Index of first unused Lisp_Float in the current float_block. */ -int float_block_index; +static int float_block_index; /* Total number of float blocks now in use. */ -int n_float_blocks; +static int n_float_blocks; /* Free-list of Lisp_Floats. */ -struct Lisp_Float *float_free_list; +static struct Lisp_Float *float_free_list; /* Initialize float allocation. */ @@ -2572,15 +2574,15 @@ struct cons_block /* Current cons_block. */ -struct cons_block *cons_block; +static struct cons_block *cons_block; /* Index of first unused Lisp_Cons in the current block. */ -int cons_block_index; +static int cons_block_index; /* Free-list of Lisp_Cons structures. */ -struct Lisp_Cons *cons_free_list; +static struct Lisp_Cons *cons_free_list; /* Total number of cons blocks now in use. */ @@ -3168,7 +3170,7 @@ allocate_misc (void) /* Free a Lisp_Misc object */ -void +static void free_misc (Lisp_Object misc) { XMISCTYPE (misc) = Lisp_Misc_Free; @@ -5216,7 +5218,7 @@ mark_face_cache (struct face_cache *c) #define LAST_MARKED_SIZE 500 static Lisp_Object last_marked[LAST_MARKED_SIZE]; -int last_marked_index; +static int last_marked_index; /* For debugging--call abort when we cdr down this many links of a list, in mark_object. In debugging, @@ -6108,6 +6110,7 @@ Frames, windows, buffers, and subprocesses count as vectors return Flist (8, consed); } +#ifdef ENABLE_CHECKING int suppress_checking; void @@ -6117,6 +6120,7 @@ die (const char *msg, const char *file, int line) file, line, msg); abort (); } +#endif /* Initialization */ diff --git a/src/eval.c b/src/eval.c index cefdf784faf..dddedc77286 100644 --- a/src/eval.c +++ b/src/eval.c @@ -57,8 +57,23 @@ struct backtrace }; struct backtrace *backtrace_list; + +#if !BYTE_MARK_STACK +static +#endif struct catchtag *catchlist; +/* Chain of condition handlers currently in effect. + The elements of this chain are contained in the stack frames + of Fcondition_case and internal_condition_case. + When an error is signaled (by calling Fsignal, below), + this chain is searched for an element that applies. */ + +#if !BYTE_MARK_STACK +static +#endif +struct handler *handlerlist; + #ifdef DEBUG_GCPRO /* Count levels of GCPRO to detect failure to UNGCPRO. */ int gcpro_level; @@ -1345,14 +1360,6 @@ usage: (unwind-protect BODYFORM UNWINDFORMS...) */) return unbind_to (count, val); } -/* Chain of condition handlers currently in effect. - The elements of this chain are contained in the stack frames - of Fcondition_case and internal_condition_case. - When an error is signaled (by calling Fsignal, below), - this chain is searched for an element that applies. */ - -struct handler *handlerlist; - DEFUN ("condition-case", Fcondition_case, Scondition_case, 2, UNEVALLED, 0, doc: /* Regain control when an error is signaled. Executes BODYFORM and returns its value if no error happens. @@ -3629,6 +3636,7 @@ If NFRAMES is more than the number of frames, the value is nil. */) } +#if BYTE_MARK_STACK void mark_backtrace (void) { @@ -3648,6 +3656,7 @@ mark_backtrace (void) mark_object (backlist->args[i]); } } +#endif void syms_of_eval (void) diff --git a/src/lisp.h b/src/lisp.h index fb44002b6a6..b06626ad379 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -55,11 +55,11 @@ extern void check_cons_list (void); #endif /* Extra internal type checking? */ -extern int suppress_checking; -extern void die (const char *, const char *, int) NO_RETURN; #ifdef ENABLE_CHECKING +extern void die (const char *, const char *, int) NO_RETURN; + /* The suppress_checking variable is initialized to 0 in alloc.c. Set it to 1 using a debugger to temporarily disable aborting on detected internal inconsistencies or error conditions. @@ -74,6 +74,8 @@ extern void die (const char *, const char *, int) NO_RETURN; STRINGP (x), but a particular use of XSTRING is invoked only after testing that STRINGP (x) is true, making the test redundant. */ +extern int suppress_checking EXTERNALLY_VISIBLE; + #define CHECK(check,msg) (((check) || suppress_checking \ ? (void) 0 \ : die ((msg), __FILE__, __LINE__)), \ @@ -1968,8 +1970,6 @@ struct handler struct handler *next; }; -extern struct handler *handlerlist; - /* This structure helps implement the `catch' and `throw' control structure. A struct catchtag contains all the information needed to restore the state of the interpreter after a non-local jump. @@ -2005,7 +2005,6 @@ struct catchtag struct byte_stack *byte_stack; }; -extern struct catchtag *catchlist; extern struct backtrace *backtrace_list; extern Lisp_Object memory_signal_data; @@ -2615,7 +2614,6 @@ extern Lisp_Object Qrisky_local_variable; extern struct frame *last_glyphless_glyph_frame; extern unsigned last_glyphless_glyph_face_id; extern int last_glyphless_glyph_merged_face_id; -extern int message_enable_multibyte; extern int noninteractive_need_newline; extern Lisp_Object echo_area_buffer[2]; extern void add_to_log (const char *, Lisp_Object, Lisp_Object); @@ -2724,7 +2722,6 @@ extern Lisp_Object make_float (double); extern void display_malloc_warning (void); extern int inhibit_garbage_collection (void); extern Lisp_Object make_save_value (void *, int); -extern void free_misc (Lisp_Object); extern void free_marker (Lisp_Object); extern void free_cons (struct Lisp_Cons *); extern void init_alloc_once (void); @@ -2822,6 +2819,10 @@ extern Lisp_Object Qand_rest; extern Lisp_Object Vautoload_queue; extern Lisp_Object Vsignaling_function; extern int handling_signal; +#if BYTE_MARK_STACK +extern struct catchtag *catchlist; +extern struct handler *handlerlist; +#endif /* To run a normal hook, use the appropriate function from the list below. The calling convention: @@ -2882,7 +2883,9 @@ extern Lisp_Object safe_call (size_t, Lisp_Object *); extern Lisp_Object safe_call1 (Lisp_Object, Lisp_Object); extern Lisp_Object safe_call2 (Lisp_Object, Lisp_Object, Lisp_Object); extern void init_eval (void); +#if BYTE_MARK_STACK extern void mark_backtrace (void); +#endif extern void syms_of_eval (void); /* Defined in editfns.c */ @@ -3255,7 +3258,7 @@ extern int read_bytecode_char (int); extern Lisp_Object Qbytecode; extern void syms_of_bytecode (void); extern struct byte_stack *byte_stack_list; -#ifdef BYTE_MARK_STACK +#if BYTE_MARK_STACK extern void mark_byte_stack (void); #endif extern void unmark_byte_stack (void); diff --git a/src/xdisp.c b/src/xdisp.c index b5ba2090c70..ec9a112996f 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -504,7 +504,7 @@ Lisp_Object Vmessage_stack; /* Nonzero means multibyte characters were enabled when the echo area message was specified. */ -int message_enable_multibyte; +static int message_enable_multibyte; /* Nonzero if we should redraw the mode lines on the next redisplay. */ -- cgit v1.2.1 From 9247002884de0c64febb0807db428088800c39ff Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 10 Apr 2011 22:58:27 -0700 Subject: font.c: Make copy_font_spec and merge_font_spec ordinary C functions. * font.c (copy_font_spec): Rename from Fcopy_font_spec, since it was inaccessible from Lisp. (merge_font_spec): Likewise, renaming from Fmerge_font_spec. * font.c, font.h, fontset.c, xfaces.c, xfont.c: Change all uses. --- src/ChangeLog | 6 ++++++ src/font.c | 30 +++++++++++++++--------------- src/font.h | 4 ++-- src/fontset.c | 4 ++-- src/xfaces.c | 6 +++--- src/xfont.c | 2 +- 6 files changed, 29 insertions(+), 23 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 43358338c4d..a794eb9eb90 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,11 @@ 2011-04-11 Paul Eggert + font.c: Make copy_font_spec and merge_font_spec ordinary C functions. + * font.c (copy_font_spec): Rename from Fcopy_font_spec, since it + was inaccessible from Lisp. + (merge_font_spec): Likewise, renaming from Fmerge_font_spec. + * font.c, font.h, fontset.c, xfaces.c, xfont.c: Change all uses. + alloc.c: Import and export fewer symbols, and remove unused items. * lisp.h (suppress_checking, die): Declare only if ENABLE_CHECKING is defined. diff --git a/src/font.c b/src/font.c index 91cb0a2d52b..ace1b8442d4 100644 --- a/src/font.c +++ b/src/font.c @@ -2727,7 +2727,7 @@ font_list_entities (Lisp_Object frame, Lisp_Object spec) val = null_vector; else val = Fvconcat (1, &val); - copy = Fcopy_font_spec (scratch_font_spec); + copy = copy_font_spec (scratch_font_spec); ASET (copy, FONT_TYPE_INDEX, driver_list->driver->type); XSETCDR (cache, Fcons (Fcons (copy, val), XCDR (cache))); } @@ -2755,7 +2755,7 @@ font_matching_entity (FRAME_PTR f, Lisp_Object *attrs, Lisp_Object spec) struct font_driver_list *driver_list = f->font_driver_list; Lisp_Object ftype, size, entity; Lisp_Object frame; - Lisp_Object work = Fcopy_font_spec (spec); + Lisp_Object work = copy_font_spec (spec); XSETFRAME (frame, f); ftype = AREF (spec, FONT_TYPE_INDEX); @@ -2782,7 +2782,7 @@ font_matching_entity (FRAME_PTR f, Lisp_Object *attrs, Lisp_Object spec) else { entity = driver_list->driver->match (frame, work); - copy = Fcopy_font_spec (work); + copy = copy_font_spec (work); ASET (copy, FONT_TYPE_INDEX, driver_list->driver->type); XSETCDR (cache, Fcons (Fcons (copy, entity), XCDR (cache))); } @@ -2976,7 +2976,7 @@ font_clear_prop (Lisp_Object *attrs, enum font_property_index prop) if (! NILP (Ffont_get (font, QCname))) { - font = Fcopy_font_spec (font); + font = copy_font_spec (font); font_put_extra (font, QCname, Qnil); } @@ -2987,7 +2987,7 @@ font_clear_prop (Lisp_Object *attrs, enum font_property_index prop) && prop != FONT_SIZE_INDEX) return; if (EQ (font, attrs[LFACE_FONT_INDEX])) - font = Fcopy_font_spec (font); + font = copy_font_spec (font); ASET (font, prop, Qnil); if (prop == FONT_FAMILY_INDEX || prop == FONT_FOUNDRY_INDEX) { @@ -3098,7 +3098,7 @@ font_find_for_lface (FRAME_PTR f, Lisp_Object *attrs, Lisp_Object spec, int c) return Qnil; } - work = Fcopy_font_spec (spec); + work = copy_font_spec (spec); ASET (work, FONT_TYPE_INDEX, AREF (spec, FONT_TYPE_INDEX)); XSETFRAME (frame, f); pixel_size = font_pixel_size (f, spec); @@ -3868,9 +3868,9 @@ usage: (font-spec ARGS...) */) return spec; } -DEFUE ("copy-font-spec", Fcopy_font_spec, Scopy_font_spec, 1, 1, 0, - doc: /* Return a copy of FONT as a font-spec. */) - (Lisp_Object font) +/* Return a copy of FONT as a font-spec. */ +Lisp_Object +copy_font_spec (Lisp_Object font) { Lisp_Object new_spec, tail, prev, extra; int i; @@ -3894,18 +3894,18 @@ DEFUE ("copy-font-spec", Fcopy_font_spec, Scopy_font_spec, 1, 1, 0, return new_spec; } -DEFUE ("merge-font-spec", Fmerge_font_spec, Smerge_font_spec, 2, 2, 0, - doc: /* Merge font-specs FROM and TO, and return a new font-spec. -Every specified properties in FROM override the corresponding -properties in TO. */) - (Lisp_Object from, Lisp_Object to) +/* Merge font-specs FROM and TO, and return a new font-spec. + Every specified property in FROM overrides the corresponding + property in TO. */ +Lisp_Object +merge_font_spec (Lisp_Object from, Lisp_Object to) { Lisp_Object extra, tail; int i; CHECK_FONT (from); CHECK_FONT (to); - to = Fcopy_font_spec (to); + to = copy_font_spec (to); for (i = 0; i < FONT_EXTRA_INDEX; i++) ASET (to, i, AREF (from, i)); extra = AREF (to, FONT_EXTRA_INDEX); diff --git a/src/font.h b/src/font.h index a9b58eb7c76..ead5223a6cb 100644 --- a/src/font.h +++ b/src/font.h @@ -737,8 +737,8 @@ struct font_data_list }; EXFUN (Ffont_spec, MANY); -EXFUN (Fcopy_font_spec, 1); -EXFUN (Fmerge_font_spec, 2); +extern Lisp_Object copy_font_spec (Lisp_Object); +extern Lisp_Object merge_font_spec (Lisp_Object, Lisp_Object); EXFUN (Ffont_get, 2); EXFUN (Ffont_put, 3); EXFUN (Flist_fonts, 4); diff --git a/src/fontset.c b/src/fontset.c index 4a9cc9393bf..c8452979eee 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -1709,7 +1709,7 @@ int fontset_from_font (Lisp_Object font_object) { Lisp_Object font_name = font_get_name (font_object); - Lisp_Object font_spec = Fcopy_font_spec (font_object); + Lisp_Object font_spec = copy_font_spec (font_object); Lisp_Object registry = AREF (font_spec, FONT_REGISTRY_INDEX); Lisp_Object fontset_spec, alias, name, fontset; Lisp_Object val; @@ -1726,7 +1726,7 @@ fontset_from_font (Lisp_Object font_object) sprintf (temp, "fontset-auto%d", num_auto_fontsets - 1); alias = intern (temp); } - fontset_spec = Fcopy_font_spec (font_spec); + fontset_spec = copy_font_spec (font_spec); ASET (fontset_spec, FONT_REGISTRY_INDEX, alias); name = Ffont_xlfd_name (fontset_spec, Qnil); if (NILP (name)) diff --git a/src/xfaces.c b/src/xfaces.c index 920debf4dba..83f4268ad1e 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -1793,7 +1793,7 @@ the WIDTH times as wide as FACE on FRAME. */) { /* This is a scalable font. For backward compatibility, we set the specified size. */ - font_entity = Fcopy_font_spec (font_entity); + font_entity = copy_font_spec (font_entity); ASET (font_entity, FONT_SIZE_INDEX, AREF (font_spec, FONT_SIZE_INDEX)); } @@ -2317,9 +2317,9 @@ merge_face_vectors (struct frame *f, Lisp_Object *from, Lisp_Object *to, struct if (!UNSPECIFIEDP (from[i])) { if (!UNSPECIFIEDP (to[i])) - to[i] = Fmerge_font_spec (from[i], to[i]); + to[i] = merge_font_spec (from[i], to[i]); else - to[i] = Fcopy_font_spec (from[i]); + to[i] = copy_font_spec (from[i]); if (! NILP (AREF (to[i], FONT_FOUNDRY_INDEX))) to[LFACE_FOUNDRY_INDEX] = SYMBOL_NAME (AREF (to[i], FONT_FOUNDRY_INDEX)); if (! NILP (AREF (to[i], FONT_FAMILY_INDEX))) diff --git a/src/xfont.c b/src/xfont.c index eaa1a3ea59b..5dd6aae3846 100644 --- a/src/xfont.c +++ b/src/xfont.c @@ -739,7 +739,7 @@ xfont_open (FRAME_PTR f, Lisp_Object entity, int pixel_size) So, we try again with wildcards in RESX and RESY. */ Lisp_Object temp; - temp = Fcopy_font_spec (entity); + temp = copy_font_spec (entity); ASET (temp, FONT_DPI_INDEX, Qnil); len = font_unparse_xlfd (temp, pixel_size, name, 512); if (len <= 0 || (len = xfont_encode_coding_xlfd (name)) < 0) -- cgit v1.2.1 From e192d7d3242cf00b598116b3277bd514af69fb74 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 10 Apr 2011 23:04:34 -0700 Subject: * atimer.c (alarm_signal_handler, run_all_atimers): Now static. * atimer.h (run_all_atimers): Removed; not exported. --- src/ChangeLog | 3 +++ src/atimer.c | 6 +++--- src/atimer.h | 2 -- 3 files changed, 6 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index a794eb9eb90..35712e47520 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-04-11 Paul Eggert + * atimer.c (alarm_signal_handler, run_all_atimers): Now static. + * atimer.h (run_all_atimers): Removed; not exported. + font.c: Make copy_font_spec and merge_font_spec ordinary C functions. * font.c (copy_font_spec): Rename from Fcopy_font_spec, since it was inaccessible from Lisp. diff --git a/src/atimer.c b/src/atimer.c index b947ea59ccd..a54b397f52e 100644 --- a/src/atimer.c +++ b/src/atimer.c @@ -64,7 +64,7 @@ static void set_alarm (void); static void schedule_atimer (struct atimer *); static struct atimer *append_atimer_lists (struct atimer *, struct atimer *); -void alarm_signal_handler (int signo); +static void alarm_signal_handler (int signo); /* Start a new atimer of type TYPE. TIME specifies when the timer is @@ -246,7 +246,7 @@ stop_other_atimers (struct atimer *t) /* Run all timers again, if some have been stopped with a call to stop_other_atimers. */ -void +static void run_all_atimers (void) { if (stopped_atimers) @@ -270,7 +270,7 @@ run_all_atimers (void) } -/* A version of run_all_timers suitable for a record_unwind_protect. */ +/* A version of run_all_atimers suitable for a record_unwind_protect. */ Lisp_Object unwind_stop_other_atimers (Lisp_Object dummy) diff --git a/src/atimer.h b/src/atimer.h index 798181fcd7f..8035681b225 100644 --- a/src/atimer.h +++ b/src/atimer.h @@ -76,8 +76,6 @@ void do_pending_atimers (void); void init_atimer (void); void turn_on_atimers (int); void stop_other_atimers (struct atimer *); -void run_all_atimers (void); Lisp_Object unwind_stop_other_atimers (Lisp_Object); #endif /* EMACS_ATIMER_H */ - -- cgit v1.2.1 From e78aecca6069e0ab7e08f359b185339c7130ccbf Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 10 Apr 2011 23:13:04 -0700 Subject: * bidi.c (bidi_dump_cached_states): Mark as externally visible, so that it's not optimized away. (bidi_ignore_explicit_marks_for_paragraph_level): Likewise. * dispextern.h (bidi_dump_cached_states): Remove, since it's exported only to the debugger. --- src/ChangeLog | 6 ++++++ src/bidi.c | 2 ++ src/dispextern.h | 1 - 3 files changed, 8 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 35712e47520..f2abbc8ed5c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,11 @@ 2011-04-11 Paul Eggert + * bidi.c (bidi_dump_cached_states): Mark as externally visible, + so that it's not optimized away. + (bidi_ignore_explicit_marks_for_paragraph_level): Likewise. + * dispextern.h (bidi_dump_cached_states): Remove, since it's + exported only to the debugger. + * atimer.c (alarm_signal_handler, run_all_atimers): Now static. * atimer.h (run_all_atimers): Removed; not exported. diff --git a/src/bidi.c b/src/bidi.c index 3457e177436..447abb48469 100644 --- a/src/bidi.c +++ b/src/bidi.c @@ -91,6 +91,7 @@ typedef enum { STRONG } bidi_category_t; +extern int bidi_ignore_explicit_marks_for_paragraph_level EXTERNALLY_VISIBLE; int bidi_ignore_explicit_marks_for_paragraph_level = 1; static Lisp_Object paragraph_start_re, paragraph_separate_re; @@ -1779,6 +1780,7 @@ bidi_move_to_visually_next (struct bidi_it *bidi_it) /* This is meant to be called from within the debugger, whenever you wish to examine the cache contents. */ +void bidi_dump_cached_states (void) EXTERNALLY_VISIBLE; void bidi_dump_cached_states (void) { diff --git a/src/dispextern.h b/src/dispextern.h index fd474dc6ae5..d957955ee33 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -2944,7 +2944,6 @@ enum tool_bar_item_image extern void bidi_init_it (EMACS_INT, EMACS_INT, struct bidi_it *); extern void bidi_move_to_visually_next (struct bidi_it *); -extern void bidi_dump_cached_states (void); extern void bidi_paragraph_init (bidi_dir_t, struct bidi_it *, int); extern int bidi_mirror_char (int); -- cgit v1.2.1 From c358e587580fbd9deb39b3ddde9383611529c2a6 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 10 Apr 2011 23:15:21 -0700 Subject: * buffer.c (buffer_count): Remove unused var. --- src/ChangeLog | 2 ++ src/buffer.c | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index f2abbc8ed5c..01602b1516b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-04-11 Paul Eggert + * buffer.c (buffer_count): Remove unused var. + * bidi.c (bidi_dump_cached_states): Mark as externally visible, so that it's not optimized away. (bidi_ignore_explicit_marks_for_paragraph_level): Likewise. diff --git a/src/buffer.c b/src/buffer.c index 82913ac20e7..4e690f42934 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -294,9 +294,6 @@ get_truename_buffer (register Lisp_Object filename) return Qnil; } -/* Incremented for each buffer created, to assign the buffer number. */ -int buffer_count; - DEFUE ("get-buffer-create", Fget_buffer_create, Sget_buffer_create, 1, 1, 0, doc: /* Return the buffer specified by BUFFER-OR-NAME, creating a new one if needed. If BUFFER-OR-NAME is a string and a live buffer with that name exists, -- cgit v1.2.1 From 31cd66f38b534c4ca882a1eb8ec51012c431687d Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 10 Apr 2011 23:21:47 -0700 Subject: * casetab.c (Vascii_upcase_table, Vascii_eqv_table): Now static. * lisp.h: Remove these decls. --- src/ChangeLog | 3 +++ src/casetab.c | 6 ++++-- src/lisp.h | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 01602b1516b..45a6e1011ff 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-04-11 Paul Eggert + * casetab.c (Vascii_upcase_table, Vascii_eqv_table): Now static. + * lisp.h: Remove these decls. + * buffer.c (buffer_count): Remove unused var. * bidi.c (bidi_dump_cached_states): Mark as externally visible, diff --git a/src/casetab.c b/src/casetab.c index 691dbc8c08b..4bea6ee7e71 100644 --- a/src/casetab.c +++ b/src/casetab.c @@ -25,8 +25,10 @@ along with GNU Emacs. If not, see . */ #include "character.h" static Lisp_Object Qcase_table_p, Qcase_table; -Lisp_Object Vascii_downcase_table, Vascii_upcase_table; -Lisp_Object Vascii_canon_table, Vascii_eqv_table; +Lisp_Object Vascii_downcase_table; +static Lisp_Object Vascii_upcase_table; +Lisp_Object Vascii_canon_table; +static Lisp_Object Vascii_eqv_table; static void set_canon (Lisp_Object case_table, Lisp_Object range, Lisp_Object elt); static void set_identity (Lisp_Object table, Lisp_Object c, Lisp_Object elt); diff --git a/src/lisp.h b/src/lisp.h index b06626ad379..fc924b7b1dc 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2054,8 +2054,8 @@ extern int pending_signals; #define QUITP (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) -extern Lisp_Object Vascii_downcase_table, Vascii_upcase_table; -extern Lisp_Object Vascii_canon_table, Vascii_eqv_table; +extern Lisp_Object Vascii_downcase_table; +extern Lisp_Object Vascii_canon_table; /* Number of bytes of structure consed since last GC. */ -- cgit v1.2.1 From d85b608f9c151c6f6d07e12392962e02c6ce528b Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 10 Apr 2011 23:28:35 -0700 Subject: * category.c (SET_CATEGORY_SET, set_category_set): Move here. * category.h: ... from here. * category.c (check_category_table, set_category_set): Now static. --- src/ChangeLog | 4 ++++ src/category.c | 11 ++++++++--- src/category.h | 7 ------- 3 files changed, 12 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 45a6e1011ff..dd0166bd0f3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2011-04-11 Paul Eggert + * category.c (SET_CATEGORY_SET, set_category_set): Move here. + * category.h: ... from here. + * category.c (check_category_table, set_category_set): Now static. + * casetab.c (Vascii_upcase_table, Vascii_eqv_table): Now static. * lisp.h: Remove these decls. diff --git a/src/category.c b/src/category.c index 5dcc4894f0e..356801a179c 100644 --- a/src/category.c +++ b/src/category.c @@ -53,6 +53,11 @@ static Lisp_Object Qcategory_table, Qcategoryp, Qcategorysetp, Qcategory_table_p /* Temporary internal variable used in macro CHAR_HAS_CATEGORY. */ Lisp_Object _temp_category_set; +/* Make CATEGORY_SET includes (if VAL is t) or excludes (if VAL is + nil) CATEGORY. */ +#define SET_CATEGORY_SET(category_set, category, val) \ + set_category_set (category_set, category, val) +static void set_category_set (Lisp_Object, Lisp_Object, Lisp_Object); /* Category set staff. */ @@ -111,7 +116,7 @@ those categories. */) /* Category staff. */ -Lisp_Object check_category_table (Lisp_Object table); +static Lisp_Object check_category_table (Lisp_Object table); DEFUN ("define-category", Fdefine_category, Sdefine_category, 2, 3, 0, doc: /* Define CATEGORY as a category which is described by DOCSTRING. @@ -185,7 +190,7 @@ DEFUN ("category-table-p", Fcategory_table_p, Scategory_table_p, 1, 1, 0, valid, return TABLE itself, but if not valid, signal an error of wrong-type-argument. */ -Lisp_Object +static Lisp_Object check_category_table (Lisp_Object table) { if (NILP (table)) @@ -325,7 +330,7 @@ The return value is a string containing those same categories. */) return build_string (str); } -void +static void set_category_set (Lisp_Object category_set, Lisp_Object category, Lisp_Object val) { do { diff --git a/src/category.h b/src/category.h index b279f3d9c59..eacd89ce2cb 100644 --- a/src/category.h +++ b/src/category.h @@ -67,11 +67,6 @@ along with GNU Emacs. If not, see . */ /* Return a new empty category set. */ #define MAKE_CATEGORY_SET (Fmake_bool_vector (make_number (128), Qnil)) -/* Make CATEGORY_SET includes (if VAL is t) or excludes (if VAL is - nil) CATEGORY. */ -#define SET_CATEGORY_SET(category_set, category, val) \ - (set_category_set (category_set, category, val)) - #define CHECK_CATEGORY_SET(x) \ CHECK_TYPE (CATEGORY_SET_P (x), Qcategorysetp, x) @@ -114,5 +109,3 @@ extern Lisp_Object _temp_category_set; && word_boundary_p (c1, c2)) extern int word_boundary_p (int, int); -extern void set_category_set (Lisp_Object, Lisp_Object, Lisp_Object); - -- cgit v1.2.1 From 127198fdc718d38078cf6abeb6f3a0862f3ac1d2 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 10 Apr 2011 23:43:21 -0700 Subject: * ccl.h (check_ccl_update, Vccl_program_table): Remove decls. * ccl.c (Vccl_program_table): Now static. (check_ccl_update): Remove; unused. --- src/ChangeLog | 4 ++++ src/ccl.c | 26 +------------------------- src/ccl.h | 6 ------ 3 files changed, 5 insertions(+), 31 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index dd0166bd0f3..dcbab4b96b7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2011-04-11 Paul Eggert + * ccl.h (check_ccl_update, Vccl_program_table): Remove decls. + * ccl.c (Vccl_program_table): Now static. + (check_ccl_update): Remove; unused. + * category.c (SET_CATEGORY_SET, set_category_set): Move here. * category.h: ... from here. * category.c (check_category_table, set_category_set): Now static. diff --git a/src/ccl.c b/src/ccl.c index e09cf4f86d9..14194a70c26 100644 --- a/src/ccl.c +++ b/src/ccl.c @@ -56,7 +56,7 @@ static Lisp_Object Qccl_program_idx; CCL_PROG is already resolved to index numbers or not, UPDATEDP (t or nil) is the flat to tell if the CCL program is updated after it was once used. */ -Lisp_Object Vccl_program_table; +static Lisp_Object Vccl_program_table; /* Return a hash table of id number ID. */ #define GET_HASH_TABLE(id) \ @@ -1929,30 +1929,6 @@ setup_ccl_program (struct ccl_program *ccl, Lisp_Object ccl_prog) } -/* Check if CCL is updated or not. If not, re-setup members of CCL. */ - -int -check_ccl_update (struct ccl_program *ccl) -{ - Lisp_Object slot, ccl_prog; - - if (ccl->idx < 0) - return 0; - slot = AREF (Vccl_program_table, ccl->idx); - if (NILP (AREF (slot, 3))) - return 0; - ccl_prog = ccl_get_compiled_code (AREF (slot, 0), &ccl->idx); - if (! VECTORP (ccl_prog)) - return -1; - ccl->size = ASIZE (ccl_prog); - ccl->prog = XVECTOR (ccl_prog)->contents; - ccl->eof_ic = XINT (AREF (ccl_prog, CCL_HEADER_EOF)); - ccl->buf_magnification = XINT (AREF (ccl_prog, CCL_HEADER_BUF_MAG)); - ASET (slot, 3, Qnil); - return 0; -} - - DEFUE ("ccl-program-p", Fccl_program_p, Sccl_program_p, 1, 1, 0, doc: /* Return t if OBJECT is a CCL program name or a compiled CCL program code. See the documentation of `define-ccl-program' for the detail of CCL program. */) diff --git a/src/ccl.h b/src/ccl.h index 98a4008e59f..e86154352a3 100644 --- a/src/ccl.h +++ b/src/ccl.h @@ -96,15 +96,9 @@ struct ccl_spec { execution of ccl program CCL_PROG (symbol or vector). */ extern int setup_ccl_program (struct ccl_program *, Lisp_Object); -/* Check if CCL is updated or not. If not, re-setup members of CCL. */ -extern int check_ccl_update (struct ccl_program *); - extern void ccl_driver (struct ccl_program *, int *, int *, int, int, Lisp_Object); -/* Vector of CCL program names vs corresponding program data. */ -extern Lisp_Object Vccl_program_table; - extern Lisp_Object Qccl, Qcclp; EXFUN (Fccl_program_p, 1); -- cgit v1.2.1 From a2cb4e6346247e98aac57d83afabfdee334e5559 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 10 Apr 2011 23:48:18 -0700 Subject: * charset.h (charset_iso_8859_1): Remove decl. * charset.c (charset_iso_8859_1, charset_emacs, map_charset_for_dump): Now static. --- src/ChangeLog | 4 ++++ src/charset.c | 14 ++++++-------- src/charset.h | 1 - 3 files changed, 10 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index dcbab4b96b7..baf0c1f10a1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2011-04-11 Paul Eggert + * charset.h (charset_iso_8859_1): Remove decl. + * charset.c (charset_iso_8859_1, charset_emacs, map_charset_for_dump): + Now static. + * ccl.h (check_ccl_update, Vccl_program_table): Remove decls. * ccl.c (Vccl_program_table): Now static. (check_ccl_update): Remove; unused. diff --git a/src/charset.c b/src/charset.c index dc91cea2e12..cc7c53ae61c 100644 --- a/src/charset.c +++ b/src/charset.c @@ -76,9 +76,9 @@ static Lisp_Object Qemacs; /* The corresponding charsets. */ int charset_ascii; int charset_eight_bit; -int charset_iso_8859_1; +static int charset_iso_8859_1; int charset_unicode; -int charset_emacs; +static int charset_emacs; /* The other special charsets. */ int charset_jisx0201_roman; @@ -652,12 +652,10 @@ DEFUN ("charsetp", Fcharsetp, Scharsetp, 1, 1, 0, } -void map_charset_for_dump (void (*c_function) (Lisp_Object, Lisp_Object), - Lisp_Object function, Lisp_Object arg, - unsigned from, unsigned to); - -void -map_charset_for_dump (void (*c_function) (Lisp_Object, Lisp_Object), Lisp_Object function, Lisp_Object arg, unsigned int from, unsigned int to) +static void +map_charset_for_dump (void (*c_function) (Lisp_Object, Lisp_Object), + Lisp_Object function, Lisp_Object arg, + unsigned int from, unsigned int to) { int from_idx = CODE_POINT_TO_INDEX (temp_charset_work->current, from); int to_idx = CODE_POINT_TO_INDEX (temp_charset_work->current, to); diff --git a/src/charset.h b/src/charset.h index fef50394e6e..74d55a31b43 100644 --- a/src/charset.h +++ b/src/charset.h @@ -519,7 +519,6 @@ extern Lisp_Object Qcharsetp; extern Lisp_Object Qascii; extern int charset_ascii, charset_eight_bit; -extern int charset_iso_8859_1; extern int charset_unicode; extern int charset_jisx0201_roman; extern int charset_jisx0208_1978; -- cgit v1.2.1 From 38dfbee187191f15de9e6a171eee8be5072db296 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 10 Apr 2011 23:50:34 -0700 Subject: * chartab.c (chartab_chars, chartab_bits): Now static. --- src/ChangeLog | 2 ++ src/chartab.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index baf0c1f10a1..03f4fcee063 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-04-11 Paul Eggert + * chartab.c (chartab_chars, chartab_bits): Now static. + * charset.h (charset_iso_8859_1): Remove decl. * charset.c (charset_iso_8859_1, charset_emacs, map_charset_for_dump): Now static. diff --git a/src/chartab.c b/src/chartab.c index 50c3fd7cb73..2f0e88bd404 100644 --- a/src/chartab.c +++ b/src/chartab.c @@ -36,7 +36,7 @@ const int chartab_size[4] = /* Number of characters each element of Nth level char-table covers. */ -const int chartab_chars[4] = +static const int chartab_chars[4] = { (1 << (CHARTAB_SIZE_BITS_1 + CHARTAB_SIZE_BITS_2 + CHARTAB_SIZE_BITS_3)), (1 << (CHARTAB_SIZE_BITS_2 + CHARTAB_SIZE_BITS_3)), (1 << CHARTAB_SIZE_BITS_3), @@ -44,7 +44,7 @@ const int chartab_chars[4] = /* Number of characters (in bits) each element of Nth level char-table covers. */ -const int chartab_bits[4] = +static const int chartab_bits[4] = { (CHARTAB_SIZE_BITS_1 + CHARTAB_SIZE_BITS_2 + CHARTAB_SIZE_BITS_3), (CHARTAB_SIZE_BITS_2 + CHARTAB_SIZE_BITS_3), CHARTAB_SIZE_BITS_3, -- cgit v1.2.1 From 74ab6df507f0f4707a8bd25924fbdba9d1610f4f Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 10 Apr 2011 23:58:57 -0700 Subject: * coding.h (coding, code_convert_region, encode_coding_gap): Remove decls. * coding.c (Vsjis_coding_system, Vbig5_coding_system): (iso_code_class, detect_coding, code_convert_region): Now static. (encode_coding_gap): Remove; unused. --- src/ChangeLog | 6 ++++++ src/coding.c | 34 +++++----------------------------- src/coding.h | 6 ------ 3 files changed, 11 insertions(+), 35 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 03f4fcee063..35acd030955 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,11 @@ 2011-04-11 Paul Eggert + * coding.h (coding, code_convert_region, encode_coding_gap): Remove + decls. + * coding.c (Vsjis_coding_system, Vbig5_coding_system): + (iso_code_class, detect_coding, code_convert_region): Now static. + (encode_coding_gap): Remove; unused. + * chartab.c (chartab_chars, chartab_bits): Now static. * charset.h (charset_iso_8859_1): Remove decl. diff --git a/src/coding.c b/src/coding.c index d2124db73f2..c29713a5c0c 100644 --- a/src/coding.c +++ b/src/coding.c @@ -358,8 +358,8 @@ static Lisp_Object Qtranslation_table_for_decode; static Lisp_Object Qtranslation_table_for_encode; /* Two special coding systems. */ -Lisp_Object Vsjis_coding_system; -Lisp_Object Vbig5_coding_system; +static Lisp_Object Vsjis_coding_system; +static Lisp_Object Vbig5_coding_system; /* ISO2022 section */ @@ -2862,7 +2862,7 @@ encode_coding_emacs_mule (struct coding_system *coding) COMPOSITION_WITH_RULE_ALTCHARS: ESC 4 ALTCHAR [ RULE ALTCHAR ] ESC 0 CHAR [ CHAR ] ESC 1 */ -enum iso_code_class_type iso_code_class[256]; +static enum iso_code_class_type iso_code_class[256]; #define SAFE_CHARSET_P(coding, id) \ ((id) <= (coding)->max_charset_id \ @@ -6212,7 +6212,7 @@ adjust_coding_eol_type (struct coding_system *coding, int eol_seen) system is detected, update fields of CODING by the detected coding system. */ -void +static void detect_coding (struct coding_system *coding) { const unsigned char *src, *src_end; @@ -7530,30 +7530,6 @@ decode_coding_gap (struct coding_system *coding, return coding->result; } -int -encode_coding_gap (struct coding_system *coding, - EMACS_INT chars, EMACS_INT bytes) -{ - int count = SPECPDL_INDEX (); - - code_conversion_save (0, 0); - - coding->src_object = Fcurrent_buffer (); - coding->src_chars = chars; - coding->src_bytes = bytes; - coding->src_pos = -chars; - coding->src_pos_byte = -bytes; - coding->src_multibyte = chars < bytes; - coding->dst_object = coding->src_object; - coding->dst_pos = PT; - coding->dst_pos_byte = PT_BYTE; - - encode_coding (coding); - - unbind_to (count, Qnil); - return coding->result; -} - /* Decode the text in the range FROM/FROM_BYTE and TO/TO_BYTE in SRC_OBJECT into DST_OBJECT by coding context CODING. @@ -8834,7 +8810,7 @@ is nil. */) } -Lisp_Object +static Lisp_Object code_convert_region (Lisp_Object start, Lisp_Object end, Lisp_Object coding_system, Lisp_Object dst_object, int encodep, int norecord) diff --git a/src/coding.h b/src/coding.h index ff7fcc7c3ac..85e153dcc3a 100644 --- a/src/coding.h +++ b/src/coding.h @@ -695,10 +695,6 @@ extern int encoding_buffer_size (struct coding_system *, int); extern void setup_coding_system (Lisp_Object, struct coding_system *); extern Lisp_Object coding_charset_list (struct coding_system *); extern Lisp_Object coding_system_charset_list (Lisp_Object); -extern void detect_coding (struct coding_system *); -extern Lisp_Object code_convert_region (Lisp_Object, Lisp_Object, - Lisp_Object, Lisp_Object, - int, int); extern Lisp_Object code_convert_string (Lisp_Object, Lisp_Object, Lisp_Object, int, int, int); extern Lisp_Object code_convert_string_norecord (Lisp_Object, Lisp_Object, @@ -709,8 +705,6 @@ extern Lisp_Object complement_process_encoding_system (Lisp_Object); extern int decode_coding_gap (struct coding_system *, EMACS_INT, EMACS_INT); -extern int encode_coding_gap (struct coding_system *, - EMACS_INT, EMACS_INT); extern void decode_coding_object (struct coding_system *, Lisp_Object, EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, Lisp_Object); -- cgit v1.2.1 From 14a9c8df7aea649633c74000600965913c6b0b2a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 11 Apr 2011 00:02:21 -0700 Subject: * commands.h (last_point_position, last_point_position_buffer): (last_point_position_window): Remove decls. * keyboard.c: Make these variables static. --- src/ChangeLog | 4 ++++ src/commands.h | 10 ---------- src/keyboard.c | 6 +++--- 3 files changed, 7 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 35acd030955..57c5be9a7e2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2011-04-11 Paul Eggert + * commands.h (last_point_position, last_point_position_buffer): + (last_point_position_window): Remove decls. + * keyboard.c: Make these variables static. + * coding.h (coding, code_convert_region, encode_coding_gap): Remove decls. * coding.c (Vsjis_coding_system, Vbig5_coding_system): diff --git a/src/commands.h b/src/commands.h index 925e0ba1b80..bcd5de44180 100644 --- a/src/commands.h +++ b/src/commands.h @@ -36,15 +36,6 @@ extern Lisp_Object control_x_map; events until a non-ASCII event is acceptable as input. */ extern Lisp_Object unread_switch_frame; -/* The value of point when the last command was started. */ -extern EMACS_INT last_point_position; - -/* The buffer that was current when the last command was started. */ -extern Lisp_Object last_point_position_buffer; - -/* The window that was selected when the last command was started. */ -extern Lisp_Object last_point_position_window; - /* Nonzero means ^G can quit instantly */ extern int immediate_quit; @@ -55,4 +46,3 @@ extern int immediate_quit; /* Set this nonzero to force reconsideration of mode line. */ extern int update_mode_lines; - diff --git a/src/keyboard.c b/src/keyboard.c index f4afe000685..92a44de6dae 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -213,13 +213,13 @@ int last_auto_save; Lisp_Object real_this_command; /* The value of point when the last command was started. */ -EMACS_INT last_point_position; +static EMACS_INT last_point_position; /* The buffer that was current when the last command was started. */ -Lisp_Object last_point_position_buffer; +static Lisp_Object last_point_position_buffer; /* The window that was selected when the last command was started. */ -Lisp_Object last_point_position_window; +static Lisp_Object last_point_position_window; /* The frame in which the last input event occurred, or Qmacro if the last event came from a macro. We use this to determine when to -- cgit v1.2.1 From a25f4dfafb02f162dcfca3729b37ed2bbcfe44e0 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 11 Apr 2011 22:17:33 -0700 Subject: * lisp.h (circular_list_error, FOREACH): Remove; unused. * data.c (circular_list_error): Remove. --- src/ChangeLog | 5 +++++ src/data.c | 7 ------- src/lisp.h | 11 ----------- 3 files changed, 5 insertions(+), 18 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 57c5be9a7e2..1fbc25e07c8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-04-12 Paul Eggert + + * lisp.h (circular_list_error, FOREACH): Remove; unused. + * data.c (circular_list_error): Remove. + 2011-04-11 Paul Eggert * commands.h (last_point_position, last_point_position_buffer): diff --git a/src/data.c b/src/data.c index 68ceff4d23e..ca246b60dd4 100644 --- a/src/data.c +++ b/src/data.c @@ -101,13 +101,6 @@ Lisp_Object Qinteractive_form; static void swap_in_symval_forwarding (struct Lisp_Symbol *, struct Lisp_Buffer_Local_Value *); -void -circular_list_error (Lisp_Object list) -{ - xsignal (Qcircular_list, list); -} - - Lisp_Object wrong_type_argument (register Lisp_Object predicate, register Lisp_Object value) { diff --git a/src/lisp.h b/src/lisp.h index fc924b7b1dc..ce6a3c58858 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2320,7 +2320,6 @@ extern Lisp_Object Qinteger; extern Lisp_Object Qfont_spec, Qfont_entity, Qfont_object; -extern void circular_list_error (Lisp_Object) NO_RETURN; EXFUN (Finteractive_form, 1); EXFUN (Fbyteorder, 0); @@ -3521,16 +3520,6 @@ extern void init_system_name (void); ? 0 \ : (wrong_type_argument (Qlistp, (list))), 1)) -#define FOREACH(hare, list, tortoise, n) \ - for (tortoise = hare = (list), n = 0; \ - !LIST_END_P (list, hare); \ - (hare = XCDR (hare), ++n, \ - ((n & 1) != 0 \ - ? (tortoise = XCDR (tortoise), \ - (EQ (hare, tortoise) \ - && (circular_list_error ((list)), 1))) \ - : 0))) - /* Use this to suppress gcc's `...may be used before initialized' warnings. */ #ifdef lint # define IF_LINT(Code) Code -- cgit v1.2.1 From 16390cd253ff51ab31e3f5c607827486959e1c64 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 11 Apr 2011 22:20:44 -0700 Subject: * dired.c (file_name_completion): Now static. * dbusbind.c (xd_in_read_queued_messages): Now static. --- src/ChangeLog | 4 ++++ src/dbusbind.c | 2 +- src/dired.c | 6 ++++-- 3 files changed, 9 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 1fbc25e07c8..22938117ff1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2011-04-12 Paul Eggert + * dired.c (file_name_completion): Now static. + + * dbusbind.c (xd_in_read_queued_messages): Now static. + * lisp.h (circular_list_error, FOREACH): Remove; unused. * data.c (circular_list_error): Remove. diff --git a/src/dbusbind.c b/src/dbusbind.c index b986724d792..792414b23d8 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c @@ -76,7 +76,7 @@ static Lisp_Object QCdbus_type_array, QCdbus_type_variant; static Lisp_Object QCdbus_type_struct, QCdbus_type_dict_entry; /* Whether we are reading a D-Bus event. */ -int xd_in_read_queued_messages = 0; +static int xd_in_read_queued_messages = 0; /* We use "xd_" and "XD_" as prefix for all internal symbols, because diff --git a/src/dired.c b/src/dired.c index 2b0ef275cde..20d5b586670 100644 --- a/src/dired.c +++ b/src/dired.c @@ -381,7 +381,9 @@ which see. */) } -Lisp_Object file_name_completion (Lisp_Object file, Lisp_Object dirname, int all_flag, int ver_flag, Lisp_Object predicate); +static Lisp_Object file_name_completion + (Lisp_Object file, Lisp_Object dirname, int all_flag, int ver_flag, + Lisp_Object predicate); DEFUN ("file-name-completion", Ffile_name_completion, Sfile_name_completion, 2, 3, 0, @@ -441,7 +443,7 @@ These are all file names in directory DIRECTORY which begin with FILE. */) static int file_name_completion_stat (Lisp_Object dirname, DIRENTRY *dp, struct stat *st_addr); static Lisp_Object Qdefault_directory; -Lisp_Object +static Lisp_Object file_name_completion (Lisp_Object file, Lisp_Object dirname, int all_flag, int ver_flag, Lisp_Object predicate) { DIR *d; -- cgit v1.2.1 From 8524aef308e0fe9955cfab9dc5c41ca62f7865cd Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 11 Apr 2011 23:01:37 -0700 Subject: * xdisp.c: Make symbols static if they're not exported. * dispextern.h (scratch_glyph_row, window_box_edges): (glyph_to_pixel_coords, set_cursor_from_row): (get_next_display_element, set_iterator_to_next): (highlight_trailing_whitespace, frame_to_window_pixel_xy): (show_mouse_face): Remove decls * frame.h (message_buf_print): Likewise. * lisp.h (pop_message, set_message, check_point_in_composition): Likewise. * xterm.h (set_vertical_scroll_bar): Likewise. * xdisp.c (list_of_error, Vmessage_stack, line_number_displayed): (message_buf_print, scratch_glyph_row, displayed_buffer): (set_iterator_to_next, pop_message, set_message, set_cursor_from_row): (get_next_display_element, show_mouse_face, window_box_edges): (frame_to_window_pixel_xy, check_point_in_composition): (set_vertical_scroll_bar, highlight_trailing_whitespace): Now static. (glyph_to_pixel_coords): Remove; unused. --- src/ChangeLog | 18 ++++++++++ src/dispextern.h | 16 --------- src/frame.h | 5 --- src/lisp.h | 4 --- src/xdisp.c | 101 ++++++++++++++----------------------------------------- src/xterm.h | 1 - 6 files changed, 44 insertions(+), 101 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 22938117ff1..dad33d964d7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,23 @@ 2011-04-12 Paul Eggert + * xdisp.c: Make symbols static if they're not exported. + * dispextern.h (scratch_glyph_row, window_box_edges): + (glyph_to_pixel_coords, set_cursor_from_row): + (get_next_display_element, set_iterator_to_next): + (highlight_trailing_whitespace, frame_to_window_pixel_xy): + (show_mouse_face): Remove decls + * frame.h (message_buf_print): Likewise. + * lisp.h (pop_message, set_message, check_point_in_composition): + Likewise. + * xterm.h (set_vertical_scroll_bar): Likewise. + * xdisp.c (list_of_error, Vmessage_stack, line_number_displayed): + (message_buf_print, scratch_glyph_row, displayed_buffer): + (set_iterator_to_next, pop_message, set_message, set_cursor_from_row): + (get_next_display_element, show_mouse_face, window_box_edges): + (frame_to_window_pixel_xy, check_point_in_composition): + (set_vertical_scroll_bar, highlight_trailing_whitespace): Now static. + (glyph_to_pixel_coords): Remove; unused. + * dired.c (file_name_completion): Now static. * dbusbind.c (xd_in_read_queued_messages): Now static. diff --git a/src/dispextern.h b/src/dispextern.h index d957955ee33..a7ed24dd320 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -1149,12 +1149,6 @@ extern int updated_area; extern int display_completed; -/* A temporary storage area, including a row of glyphs. Initialized - in xdisp.c. Used for various purposes, as an example see - get_overlay_arrow_glyph_row. */ - -extern struct glyph_row scratch_glyph_row; - /************************************************************************ @@ -2965,24 +2959,17 @@ int window_box_left (struct window *, int); int window_box_left_offset (struct window *, int); int window_box_right (struct window *, int); int window_box_right_offset (struct window *, int); -void window_box_edges (struct window *, int, int *, int *, int *, int *); int estimate_mode_line_height (struct frame *, enum face_id); void pixel_to_glyph_coords (struct frame *, int, int, int *, int *, NativeRectangle *, int); -int glyph_to_pixel_coords (struct window *, int, int, int *, int *); void remember_mouse_glyph (struct frame *, int, int, NativeRectangle *); void mark_window_display_accurate (Lisp_Object, int); void redisplay_preserve_echo_area (int); -int set_cursor_from_row (struct window *, struct glyph_row *, - struct glyph_matrix *, EMACS_INT, EMACS_INT, - int, int); void init_iterator (struct it *, struct window *, EMACS_INT, EMACS_INT, struct glyph_row *, enum face_id); void init_iterator_to_row_start (struct it *, struct window *, struct glyph_row *); -int get_next_display_element (struct it *); -void set_iterator_to_next (struct it *, int); void start_display (struct it *, struct window *, struct text_pos); void move_it_to (struct it *, EMACS_INT, int, int, int, int); void move_it_vertically (struct it *, int); @@ -2994,7 +2981,6 @@ void move_it_in_display_line (struct it *it, enum move_operation_enum op); int in_display_vector_p (struct it *); int frame_mode_line_height (struct frame *); -void highlight_trailing_whitespace (struct frame *, struct glyph_row *); extern Lisp_Object Qtool_bar; extern int redisplaying_p; extern int help_echo_showing_p; @@ -3057,12 +3043,10 @@ extern int x_intersect_rectangles (XRectangle *, XRectangle *, XRectangle *); #endif /* HAVE_WINDOW_SYSTEM */ -extern void frame_to_window_pixel_xy (struct window *, int *, int *); extern void note_mouse_highlight (struct frame *, int, int); extern void x_clear_window_mouse_face (struct window *); extern void cancel_mouse_face (struct frame *); extern int clear_mouse_face (Mouse_HLInfo *); -extern void show_mouse_face (Mouse_HLInfo *, enum draw_glyphs_face); extern int cursor_in_mouse_face_p (struct window *w); extern void draw_row_with_mouse_face (struct window *, int, struct glyph_row *, int, int, enum draw_glyphs_face); diff --git a/src/frame.h b/src/frame.h index a82de35efb1..0f189414e08 100644 --- a/src/frame.h +++ b/src/frame.h @@ -31,11 +31,6 @@ along with GNU Emacs. If not, see . */ /* Nonzero means there is at least one garbaged frame. */ extern int frame_garbaged; -/* Nonzero means FRAME_MESSAGE_BUF (selected_frame) is being used by - print. */ - -extern int message_buf_print; - /* The structure representing a frame. */ diff --git a/src/lisp.h b/src/lisp.h index ce6a3c58858..7f4f06c5c5d 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2621,10 +2621,8 @@ extern void setup_echo_area_for_printing (int); extern int push_message (void); extern Lisp_Object pop_message_unwind (Lisp_Object); extern Lisp_Object restore_message_unwind (Lisp_Object); -extern void pop_message (void); extern void restore_message (void); extern Lisp_Object current_message (void); -extern void set_message (const char *s, Lisp_Object, EMACS_INT, int); extern void clear_message (int, int); extern void message (const char *, ...) ATTRIBUTE_FORMAT_PRINTF (1, 2); extern void message1 (const char *); @@ -2639,8 +2637,6 @@ extern void message_log_maybe_newline (void); extern void update_echo_area (void); extern void truncate_echo_area (EMACS_INT); extern void redisplay (void); -extern int check_point_in_composition - (struct buffer *, EMACS_INT, struct buffer *, EMACS_INT); extern void redisplay_preserve_echo_area (int); extern void prepare_menu_bars (void); diff --git a/src/xdisp.c b/src/xdisp.c index ec9a112996f..14a38d82873 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -337,7 +337,7 @@ static Lisp_Object Qarrow, Qhand; Lisp_Object Qtext; /* Holds the list (error). */ -Lisp_Object list_of_error; +static Lisp_Object list_of_error; static Lisp_Object Qfontification_functions; @@ -499,7 +499,7 @@ Lisp_Object echo_area_window; message_enable_multibyte on the stack, the function restore_message pops the stack and displays MESSAGE again. */ -Lisp_Object Vmessage_stack; +static Lisp_Object Vmessage_stack; /* Nonzero means multibyte characters were enabled when the echo area message was specified. */ @@ -522,7 +522,7 @@ int cursor_type_changed; /* Nonzero after display_mode_line if %l was used and it displayed a line number. */ -int line_number_displayed; +static int line_number_displayed; /* The name of the *Messages* buffer, a string. */ @@ -549,7 +549,7 @@ static int display_last_displayed_message_p; /* Nonzero if echo area is being used by print; zero if being used by message. */ -int message_buf_print; +static int message_buf_print; /* The symbol `inhibit-menubar-update' and its DEFVAR_BOOL variable. */ @@ -565,7 +565,7 @@ static int message_cleared_p; glyphs. Also used in direct_output_for_insert. */ #define MAX_SCRATCH_GLYPHS 100 -struct glyph_row scratch_glyph_row; +static struct glyph_row scratch_glyph_row; static struct glyph scratch_glyphs[MAX_SCRATCH_GLYPHS]; /* Ascent and height of the last line processed by move_it_to. */ @@ -612,7 +612,7 @@ static Lisp_Object Qauto_hscroll_mode; /* Buffer being redisplayed -- for redisplay_window_error. */ -struct buffer *displayed_buffer; +static struct buffer *displayed_buffer; /* Value returned from text property handlers (see below). */ @@ -756,6 +756,7 @@ static Lisp_Object Qhex_code, Qempty_box, Qthin_space, Qzero_width; /* Function prototypes. */ static void setup_for_ellipsis (struct it *, int); +static void set_iterator_to_next (struct it *, int); static void mark_window_display_accurate_1 (struct window *, int); static int single_display_spec_string_p (Lisp_Object, Lisp_Object); static int display_prop_string_p (Lisp_Object, Lisp_Object); @@ -788,7 +789,9 @@ static int with_echo_area_buffer (struct window *, int, EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT); static void clear_garbaged_frames (void); static int current_message_1 (EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT); +static void pop_message (void); static int truncate_message_1 (EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT); +static void set_message (const char *, Lisp_Object, EMACS_INT, int); static int set_message_1 (EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT); static int display_echo_area (struct window *); static int display_echo_area_1 (EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT); @@ -820,6 +823,9 @@ static void redisplay_window (Lisp_Object, int); static Lisp_Object redisplay_window_error (Lisp_Object); static Lisp_Object redisplay_window_0 (Lisp_Object); static Lisp_Object redisplay_window_1 (Lisp_Object); +static int set_cursor_from_row (struct window *, struct glyph_row *, + struct glyph_matrix *, EMACS_INT, EMACS_INT, + int, int); static int update_menu_bar (struct frame *, int, int); static int try_window_reusing_current_matrix (struct window *); static int try_window_id (struct window *); @@ -857,6 +863,7 @@ static int init_from_display_pos (struct it *, struct window *, struct display_pos *); static void reseat_to_string (struct it *, const char *, Lisp_Object, EMACS_INT, EMACS_INT, int, int); +static int get_next_display_element (struct it *); static enum move_it_result move_it_in_display_line_to (struct it *, EMACS_INT, int, enum move_operation_enum); @@ -904,6 +911,7 @@ static void append_stretch_glyph (struct it *, Lisp_Object, #endif /* HAVE_WINDOW_SYSTEM */ +static void show_mouse_face (Mouse_HLInfo *, enum draw_glyphs_face); static int coords_in_mouse_face_p (struct window *, int, int); @@ -1120,7 +1128,7 @@ window_box (struct window *w, int area, int *box_x, int *box_y, *BOTTOM_RIGHT_Y the coordinates of the bottom-right corner of the box. */ -INLINE void +static INLINE void window_box_edges (struct window *w, int area, int *top_left_x, int *top_left_y, int *bottom_right_x, int *bottom_right_y) { @@ -1538,61 +1546,6 @@ pixel_to_glyph_coords (FRAME_PTR f, register int pix_x, register int pix_y, } -/* Given HPOS/VPOS in the current matrix of W, return corresponding - frame-relative pixel positions in *FRAME_X and *FRAME_Y. If we - can't tell the positions because W's display is not up to date, - return 0. */ - -int -glyph_to_pixel_coords (struct window *w, int hpos, int vpos, - int *frame_x, int *frame_y) -{ -#ifdef HAVE_WINDOW_SYSTEM - if (FRAME_WINDOW_P (XFRAME (WINDOW_FRAME (w)))) - { - int success_p; - - xassert (hpos >= 0 && hpos < w->current_matrix->matrix_w); - xassert (vpos >= 0 && vpos < w->current_matrix->matrix_h); - - if (display_completed) - { - struct glyph_row *row = MATRIX_ROW (w->current_matrix, vpos); - struct glyph *glyph = row->glyphs[TEXT_AREA]; - struct glyph *end = glyph + min (hpos, row->used[TEXT_AREA]); - - hpos = row->x; - vpos = row->y; - while (glyph < end) - { - hpos += glyph->pixel_width; - ++glyph; - } - - /* If first glyph is partially visible, its first visible position is still 0. */ - if (hpos < 0) - hpos = 0; - - success_p = 1; - } - else - { - hpos = vpos = 0; - success_p = 0; - } - - *frame_x = WINDOW_TO_FRAME_PIXEL_X (w, hpos); - *frame_y = WINDOW_TO_FRAME_PIXEL_Y (w, vpos); - return success_p; - } -#endif - - *frame_x = hpos; - *frame_y = vpos; - return 1; -} - - /* Find the glyph under window-relative coordinates X/Y in window W. Consider only glyphs from buffer text, i.e. no glyphs from overlay strings. Return in *HPOS and *VPOS the row and column number of @@ -1675,11 +1628,10 @@ x_y_to_hpos_vpos (struct window *w, int x, int y, int *hpos, int *vpos, return glyph; } -/* EXPORT: - Convert frame-relative x/y to coordinates relative to window W. +/* Convert frame-relative x/y to coordinates relative to window W. Takes pseudo-windows into account. */ -void +static void frame_to_window_pixel_xy (struct window *w, int *x, int *y) { if (w->pseudo_window_p) @@ -5637,7 +5589,7 @@ struct frame *last_glyphless_glyph_frame = NULL; unsigned last_glyphless_glyph_face_id = (1 << FACE_ID_BITS); int last_glyphless_glyph_merged_face_id = 0; -int +static int get_next_display_element (struct it *it) { /* Non-zero means that we found a display element. Zero means that @@ -9097,7 +9049,7 @@ pop_message_unwind (Lisp_Object dummy) /* Pop the top-most entry off Vmessage_stack. */ -void +static void pop_message (void) { xassert (CONSP (Vmessage_stack)); @@ -9167,7 +9119,7 @@ truncate_message_1 (EMACS_INT nchars, Lisp_Object a2, EMACS_INT a3, EMACS_INT a4 to t before calling set_message_1 (which calls insert). */ -void +static void set_message (const char *s, Lisp_Object string, EMACS_INT nbytes, int multibyte_p) { @@ -11317,7 +11269,7 @@ overlay_arrow_at_row (struct it *it, struct glyph_row *row) return 0. PREV_BUF and PREV_PT are the last point buffer and position. BUF and PT are the current point buffer and position. */ -int +static int check_point_in_composition (struct buffer *prev_buf, EMACS_INT prev_pt, struct buffer *buf, EMACS_INT pt) { @@ -12404,7 +12356,7 @@ redisplay_window_1 (Lisp_Object window) Return 0 if cursor is not on this row, 1 otherwise. */ -int +static int set_cursor_from_row (struct window *w, struct glyph_row *row, struct glyph_matrix *matrix, EMACS_INT delta, EMACS_INT delta_bytes, @@ -13675,7 +13627,7 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste return rc; } -void +static void set_vertical_scroll_bar (struct window *w) { EMACS_INT start, end, whole; @@ -16984,7 +16936,7 @@ trailing_whitespace_p (EMACS_INT charpos) /* Highlight trailing whitespace, if any, in ROW. */ -void +static void highlight_trailing_whitespace (struct frame *f, struct glyph_row *row) { int used = row->used[TEXT_AREA]; @@ -23943,10 +23895,9 @@ draw_row_with_mouse_face (struct window *w, int start_x, struct glyph_row *row, #endif } -/* EXPORT: - Display the active region described by mouse_face_* according to DRAW. */ +/* Display the active region described by mouse_face_* according to DRAW. */ -void +static void show_mouse_face (Mouse_HLInfo *hlinfo, enum draw_glyphs_face draw) { struct window *w = XWINDOW (hlinfo->mouse_face_window); diff --git a/src/xterm.h b/src/xterm.h index 15630e902e5..e0e8240e9e8 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -991,7 +991,6 @@ extern void x_query_colors (struct frame *f, XColor *, int); extern void x_query_color (struct frame *f, XColor *); extern void x_clear_area (Display *, Window, int, int, int, int, int); extern void x_mouse_leave (struct x_display_info *); -extern void set_vertical_scroll_bar (struct window *); extern int x_dispatch_event (XEvent *, Display *); extern unsigned int x_x_to_emacs_modifiers (struct x_display_info *, -- cgit v1.2.1 From 435f4c28d3921770b107973ecb45e36b719eb4c3 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 11 Apr 2011 23:27:22 -0700 Subject: * xfaces.c: Make symbols static if they're not exported. * dispextern.h (ascii_face_of_lisp_face, free_realized_face): Remove decls. * xterm.h (defined_color): Remove decls. (x_free_dpy_colors): Declare only if USE_X_TOOLKIT. * xfaces.c (tty_suppress_bold_inverse_default_colors_p): (menu_face_changed_default, defined_color, free_realized_face): (x_free_dpy_colors): Define only if USE_X_TOOLKIT. (ascii_face_of_lisp_face): Remove; unused. --- src/ChangeLog | 10 ++++++++++ src/dispextern.h | 2 -- src/xfaces.c | 32 +++++++------------------------- src/xterm.h | 3 ++- 4 files changed, 19 insertions(+), 28 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index dad33d964d7..0e2bcacf3c5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,15 @@ 2011-04-12 Paul Eggert + * xfaces.c: Make symbols static if they're not exported. + * dispextern.h (ascii_face_of_lisp_face, free_realized_face): + Remove decls. + * xterm.h (defined_color): Remove decls. + (x_free_dpy_colors): Declare only if USE_X_TOOLKIT. + * xfaces.c (tty_suppress_bold_inverse_default_colors_p): + (menu_face_changed_default, defined_color, free_realized_face): + (x_free_dpy_colors): Define only if USE_X_TOOLKIT. + (ascii_face_of_lisp_face): Remove; unused. + * xdisp.c: Make symbols static if they're not exported. * dispextern.h (scratch_glyph_row, window_box_edges): (glyph_to_pixel_coords, set_cursor_from_row): diff --git a/src/dispextern.h b/src/dispextern.h index a7ed24dd320..6d89fe69334 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -3131,7 +3131,6 @@ unsigned long load_color (struct frame *, struct face *, Lisp_Object, void unload_color (struct frame *, unsigned long); char *choose_face_font (struct frame *, Lisp_Object *, Lisp_Object, int *); -int ascii_face_of_lisp_face (struct frame *, int); void prepare_face_for_display (struct frame *, struct face *); int xstrcasecmp (const char *, const char *); int lookup_named_face (struct frame *, Lisp_Object, int); @@ -3157,7 +3156,6 @@ int face_at_string_position (struct window *w, Lisp_Object string, int merge_faces (struct frame *, Lisp_Object, int, int); int compute_char_face (struct frame *, int, Lisp_Object); void free_all_realized_faces (Lisp_Object); -void free_realized_face (struct frame *, struct face *); extern Lisp_Object Qforeground_color, Qbackground_color; extern Lisp_Object Qframe_set_background_mode; extern char unspecified_fg[], unspecified_bg[]; diff --git a/src/xfaces.c b/src/xfaces.c index 83f4268ad1e..b09d20c107e 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -425,7 +425,7 @@ int face_change_count; display. This is a kluge to suppress `bold black' foreground text which is hard to read on an LCD monitor. */ -int tty_suppress_bold_inverse_default_colors_p; +static int tty_suppress_bold_inverse_default_colors_p; /* A list of the form `((x . y))' used to avoid consing in Finternal_set_lisp_face_attribute. */ @@ -443,7 +443,7 @@ static int ngcs; /* Non-zero means the definition of the `menu' face for new frames has been changed. */ -int menu_face_changed_default; +static int menu_face_changed_default; /* Function prototypes. */ @@ -613,6 +613,8 @@ x_free_colors (struct frame *f, long unsigned int *pixels, int npixels) } +#ifdef USE_X_TOOLKIT + /* Free colors used on frame F. PIXELS is an array of NPIXELS pixel color values. Interrupt input must be blocked when this function is called. */ @@ -633,7 +635,7 @@ x_free_dpy_colors (Display *dpy, Screen *screen, Colormap cmap, long unsigned in XFreeColors (dpy, cmap, pixels, npixels, 0); } } - +#endif /* USE_X_TOOLKIT */ /* Create and return a GC for use on frame F. GC values and mask are given by XGCV and MASK. */ @@ -1145,7 +1147,7 @@ tty_defined_color (struct frame *f, const char *color_name, This does the right thing for any type of frame. */ -int +static int defined_color (struct frame *f, const char *color_name, XColor *color_def, int alloc) { if (!FRAME_WINDOW_P (f)) @@ -4091,7 +4093,7 @@ make_realized_face (Lisp_Object *attr) /* Free realized face FACE, including its X resources. FACE may be null. */ -void +static void free_realized_face (struct frame *f, struct face *face) { if (face) @@ -4609,26 +4611,6 @@ lookup_basic_face (struct frame *f, int face_id) } -/* Return the ID of the realized ASCII face of Lisp face with ID - LFACE_ID on frame F. Value is -1 if LFACE_ID isn't valid. */ - -int -ascii_face_of_lisp_face (struct frame *f, int lface_id) -{ - int face_id; - - if (lface_id >= 0 && lface_id < lface_id_to_name_size) - { - Lisp_Object face_name = lface_id_to_name[lface_id]; - face_id = lookup_named_face (f, face_name, 1); - } - else - face_id = -1; - - return face_id; -} - - /* Return a face for charset ASCII that is like the face with id FACE_ID on frame F, but has a font that is STEPS steps smaller. STEPS < 0 means larger. Value is the id of the face. */ diff --git a/src/xterm.h b/src/xterm.h index e0e8240e9e8..f44c71fab59 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -1041,7 +1041,6 @@ extern int xg_set_icon_from_xpm_data (struct frame *, const char**); #endif /* USE_GTK */ extern void x_real_positions (struct frame *, int *, int *); -extern int defined_color (struct frame *, const char *, XColor *, int); extern void x_set_border_pixel (struct frame *, int); extern void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object); extern void x_implicitly_set_name (struct frame *, Lisp_Object, Lisp_Object); @@ -1066,8 +1065,10 @@ extern void x_set_tool_bar_lines (struct frame *, Lisp_Object, Lisp_Object); /* Defined in xfaces.c */ +#ifdef USE_X_TOOLKIT extern void x_free_dpy_colors (Display *, Screen *, Colormap, unsigned long *, int); +#endif /* USE_X_TOOLKIT */ /* Defined in xmenu.c */ -- cgit v1.2.1 From 5bf46f05111229b5b9e7b6435151bd0f84586eb4 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 11 Apr 2011 23:36:55 -0700 Subject: * dispnew.c: Make symbols static if they're not exported. * dispextern.h (redraw_garbaged_frames, scrolling): (increment_row_positions): Remove. * dispnew.c (new_glyph_matrix, increment_row_positions, scrolling): (delayed_size_change, glyph_matrix_count, glyph_pool_count): Now static. (redraw_garbaged_frames): Remove; unused. --- src/ChangeLog | 8 ++++++++ src/dispextern.h | 3 --- src/dispnew.c | 31 +++++++++---------------------- 3 files changed, 17 insertions(+), 25 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 0e2bcacf3c5..572644bf1c7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,13 @@ 2011-04-12 Paul Eggert + * dispnew.c: Make symbols static if they're not exported. + * dispextern.h (redraw_garbaged_frames, scrolling): + (increment_row_positions): Remove. + * dispnew.c (new_glyph_matrix, increment_row_positions, scrolling): + (delayed_size_change, glyph_matrix_count, glyph_pool_count): + Now static. + (redraw_garbaged_frames): Remove; unused. + * xfaces.c: Make symbols static if they're not exported. * dispextern.h (ascii_face_of_lisp_face, free_realized_face): Remove decls. diff --git a/src/dispextern.h b/src/dispextern.h index 6d89fe69334..eb5090343e6 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -3229,11 +3229,9 @@ extern Lisp_Object marginal_area_string (struct window *, enum window_part, Lisp_Object *, int *, int *, int *, int *); extern void redraw_frame (struct frame *); -extern void redraw_garbaged_frames (void); extern void cancel_line (int, struct frame *); extern void init_desired_glyphs (struct frame *); extern int update_frame (struct frame *, int, int); -extern int scrolling (struct frame *); extern void bitch_at_user (void); void adjust_glyphs (struct frame *); void free_glyphs (struct frame *); @@ -3249,7 +3247,6 @@ void rotate_matrix (struct glyph_matrix *, int, int, int); void increment_matrix_positions (struct glyph_matrix *, int, int, EMACS_INT, EMACS_INT); void blank_row (struct window *, struct glyph_row *, int); -void increment_row_positions (struct glyph_row *, EMACS_INT, EMACS_INT); void enable_glyph_matrix_rows (struct glyph_matrix *, int, int, int); void clear_glyph_row (struct glyph_row *); void prepare_desired_row (struct glyph_row *); diff --git a/src/dispnew.c b/src/dispnew.c index 6e4c93d1676..78bd4bf6590 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -121,11 +121,12 @@ static int required_matrix_width (struct window *); static void allocate_matrices_for_window_redisplay (struct window *); static int realloc_glyph_pool (struct glyph_pool *, struct dim); static void adjust_frame_glyphs (struct frame *); -struct glyph_matrix *new_glyph_matrix (struct glyph_pool *); +static struct glyph_matrix *new_glyph_matrix (struct glyph_pool *); static void free_glyph_matrix (struct glyph_matrix *); static void adjust_glyph_matrix (struct window *, struct glyph_matrix *, int, int, struct dim); static void change_frame_size_1 (struct frame *, int, int, int, int, int); +static void increment_row_positions (struct glyph_row *, EMACS_INT, EMACS_INT); static void swap_glyph_pointers (struct glyph_row *, struct glyph_row *); #if GLYPH_DEBUG static int glyph_row_slice_p (struct glyph_row *, struct glyph_row *); @@ -163,6 +164,7 @@ static void mirror_line_dance (struct window *, int, int, int *, char *); static int update_window_tree (struct window *, int); static int update_window (struct window *, int); static int update_frame_1 (struct frame *, int, int); +static int scrolling (struct frame *); static void set_window_cursor_after_update (struct window *); static void adjust_frame_glyphs_for_window_redisplay (struct frame *); static void adjust_frame_glyphs_for_frame_redisplay (struct frame *); @@ -212,7 +214,7 @@ struct frame *last_nonminibuf_frame; /* 1 means SIGWINCH happened when not safe. */ -int delayed_size_change; +static int delayed_size_change; /* 1 means glyph initialization has been completed at startup. */ @@ -234,8 +236,8 @@ struct glyph space_glyph; /* Counts of allocated structures. These counts serve to diagnose memory leaks and double frees. */ -int glyph_matrix_count; -int glyph_pool_count; +static int glyph_matrix_count; +static int glyph_pool_count; /* If non-null, the frame whose frame matrices are manipulated. If null, window matrices are worked on. */ @@ -383,7 +385,7 @@ safe_bcopy (const char *from, char *to, int size) member `pool' of the glyph matrix structure returned is set to POOL, the structure is otherwise zeroed. */ -struct glyph_matrix * +static struct glyph_matrix * new_glyph_matrix (struct glyph_pool *pool) { struct glyph_matrix *result; @@ -1021,7 +1023,7 @@ blank_row (struct window *w, struct glyph_row *row, int y) the used count of the text area is zero. Such rows display line ends. */ -void +static void increment_row_positions (struct glyph_row *row, EMACS_INT delta, EMACS_INT delta_bytes) { @@ -3200,21 +3202,6 @@ DEFUN ("redraw-display", Fredraw_display, Sredraw_display, 0, 0, "", } -/* This is used when frame_garbaged is set. Call Fredraw_frame on all - visible frames marked as garbaged. */ - -void -redraw_garbaged_frames (void) -{ - Lisp_Object tail, frame; - - FOR_EACH_FRAME (tail, frame) - if (FRAME_VISIBLE_P (XFRAME (frame)) - && FRAME_GARBAGED_P (XFRAME (frame))) - Fredraw_frame (frame); -} - - /*********************************************************************** Frame Update @@ -4818,7 +4805,7 @@ update_frame_1 (struct frame *f, int force_p, int inhibit_id_p) /* Do line insertions/deletions on frame F for frame-based redisplay. */ -int +static int scrolling (struct frame *frame) { int unchanged_at_top, unchanged_at_bottom; -- cgit v1.2.1 From e4cebfca13580f80fb0ecee27afb81b55c031535 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 12 Apr 2011 01:39:43 -0700 Subject: * xfns.c: Make symbols static if they're not exported. (x_last_font_name, x_display_info_for_name): (x_set_foreground_color, x_set_background_color, x_set_mouse_color): (x_set_cursor_color, x_set_border_pixel, x_set_border_color): (x_set_cursor_type, x_set_icon_type, x_set_icon_name): (x_set_scroll_bar_foreground, x_set_scroll_bar_background): (x_explicitly_set_name, x_set_title, xic_defaut_fontset, tip_timer): (last_show_tip_args): Now static. (xic_defaut_fontset, xic_create_fontsetname): Define only if defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT (x_screen_planes): Remove; unused. * dispextern.h (x_screen_planes): Remove decl. --- src/ChangeLog | 13 ++++++++++ src/dispextern.h | 1 - src/xfns.c | 75 +++++++++++++++++--------------------------------------- 3 files changed, 35 insertions(+), 54 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 572644bf1c7..9b145d865db 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,18 @@ 2011-04-12 Paul Eggert + * xfns.c: Make symbols static if they're not exported. + (x_last_font_name, x_display_info_for_name): + (x_set_foreground_color, x_set_background_color, x_set_mouse_color): + (x_set_cursor_color, x_set_border_pixel, x_set_border_color): + (x_set_cursor_type, x_set_icon_type, x_set_icon_name): + (x_set_scroll_bar_foreground, x_set_scroll_bar_background): + (x_explicitly_set_name, x_set_title, xic_defaut_fontset, tip_timer): + (last_show_tip_args): Now static. + (xic_defaut_fontset, xic_create_fontsetname): Define only if + defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT + (x_screen_planes): Remove; unused. + * dispextern.h (x_screen_planes): Remove decl. + * dispnew.c: Make symbols static if they're not exported. * dispextern.h (redraw_garbaged_frames, scrolling): (increment_row_positions): Remove. diff --git a/src/dispextern.h b/src/dispextern.h index eb5090343e6..4ad107a7266 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -3171,7 +3171,6 @@ void gamma_correct (struct frame *, COLORREF *); #ifdef HAVE_WINDOW_SYSTEM -int x_screen_planes (struct frame *); void x_implicitly_set_name (struct frame *, Lisp_Object, Lisp_Object); extern Lisp_Object tip_frame; diff --git a/src/xfns.c b/src/xfns.c index 6fd332016ce..50a56b55614 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -150,9 +150,11 @@ int image_cache_refcount, dpyinfo_refcount; #endif #if defined (USE_GTK) && defined (HAVE_FREETYPE) -char *x_last_font_name; +static char *x_last_font_name; #endif +static struct x_display_info *x_display_info_for_name (Lisp_Object); + /* Error if we are not connected to X. */ @@ -419,35 +421,6 @@ x_top_window_to_frame (struct x_display_info *dpyinfo, int wdesc) -static void x_default_font_parameter (struct frame *, Lisp_Object); - -static Lisp_Object unwind_create_frame (Lisp_Object); -static Lisp_Object unwind_create_tip_frame (Lisp_Object); - -void x_set_foreground_color (struct frame *, Lisp_Object, Lisp_Object); -static void x_set_wait_for_wm (struct frame *, Lisp_Object, Lisp_Object); -void x_set_background_color (struct frame *, Lisp_Object, Lisp_Object); -void x_set_mouse_color (struct frame *, Lisp_Object, Lisp_Object); -void x_set_cursor_color (struct frame *, Lisp_Object, Lisp_Object); -void x_set_border_color (struct frame *, Lisp_Object, Lisp_Object); -void x_set_cursor_type (struct frame *, Lisp_Object, Lisp_Object); -void x_set_icon_type (struct frame *, Lisp_Object, Lisp_Object); -void x_set_icon_name (struct frame *, Lisp_Object, Lisp_Object); -void x_explicitly_set_name (struct frame *, Lisp_Object, Lisp_Object); -void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object); -void x_set_title (struct frame *, Lisp_Object, Lisp_Object); -void x_set_tool_bar_lines (struct frame *, Lisp_Object, Lisp_Object); -void x_set_scroll_bar_foreground (struct frame *, Lisp_Object, - Lisp_Object); -void x_set_scroll_bar_background (struct frame *, Lisp_Object, - Lisp_Object); -static Lisp_Object x_default_scroll_bar_color_parameter (struct frame *, - Lisp_Object, - Lisp_Object, - const char *, const char *, - int); - - /* Store the screen positions of frame F into XPTR and YPTR. These are the positions of the containing window manager window, not Emacs's own window. */ @@ -766,7 +739,7 @@ xg_set_icon_from_xpm_data (FRAME_PTR f, const char **data) In that case, just record the parameter's new value in the standard place; do not attempt to change the window. */ -void +static void x_set_foreground_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) { struct x_output *x = f->output_data.x; @@ -802,7 +775,7 @@ x_set_foreground_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) unload_color (f, old_fg); } -void +static void x_set_background_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) { struct x_output *x = f->output_data.x; @@ -877,7 +850,7 @@ make_invisible_cursor (struct frame *f) return c; } -void +static void x_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) { struct x_output *x = f->output_data.x; @@ -1022,7 +995,7 @@ x_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) update_face_from_frame_parameter (f, Qmouse_color, arg); } -void +static void x_set_cursor_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) { unsigned long fore_pixel, pixel; @@ -1093,7 +1066,7 @@ x_set_cursor_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) Note that this does not fully take effect if done before F has an x-window. */ -void +static void x_set_border_pixel (struct frame *f, int pix) { unload_color (f, f->output_data.x->border_pixel); @@ -1122,7 +1095,7 @@ x_set_border_pixel (struct frame *f, int pix) Note: under X11, this is normally the province of the window manager, and so emacs' border colors may be overridden. */ -void +static void x_set_border_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) { int pix; @@ -1134,7 +1107,7 @@ x_set_border_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) } -void +static void x_set_cursor_type (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval) { set_frame_cursor_types (f, arg); @@ -1143,7 +1116,7 @@ x_set_cursor_type (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval) cursor_type_changed = 1; } -void +static void x_set_icon_type (struct frame *f, Lisp_Object arg, Lisp_Object oldval) { int result; @@ -1175,7 +1148,7 @@ x_set_icon_type (struct frame *f, Lisp_Object arg, Lisp_Object oldval) UNBLOCK_INPUT; } -void +static void x_set_icon_name (struct frame *f, Lisp_Object arg, Lisp_Object oldval) { int result; @@ -1398,7 +1371,7 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) isn't a valid color name, do nothing. OLDVAL is the old value of the frame parameter. */ -void +static void x_set_scroll_bar_foreground (struct frame *f, Lisp_Object value, Lisp_Object oldval) { unsigned long pixel; @@ -1431,7 +1404,7 @@ x_set_scroll_bar_foreground (struct frame *f, Lisp_Object value, Lisp_Object old valid color name, do nothing. OLDVAL is the old value of the frame parameter. */ -void +static void x_set_scroll_bar_background (struct frame *f, Lisp_Object value, Lisp_Object oldval) { unsigned long pixel; @@ -1682,7 +1655,7 @@ x_set_name (struct frame *f, Lisp_Object name, int explicit) /* This function should be called when the user's lisp code has specified a name for the frame; the name will override any set by the redisplay code. */ -void +static void x_explicitly_set_name (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval) { x_set_name (f, arg, 1); @@ -1700,7 +1673,7 @@ x_implicitly_set_name (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval) /* Change the title of frame F to NAME. If NAME is nil, use the frame name as the title. */ -void +static void x_set_title (struct frame *f, Lisp_Object name, Lisp_Object old_name) { /* Don't change the title if it's already NAME. */ @@ -1888,9 +1861,10 @@ static XIMStyle supported_xim_styles[] = }; +#if defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT /* Create an X fontset on frame F with base font name BASE_FONTNAME. */ -const char xic_defaut_fontset[] = "-*-*-*-r-normal--14-*-*-*-*-*-*-*"; +static const char xic_defaut_fontset[] = "-*-*-*-r-normal--14-*-*-*-*-*-*-*"; /* Create an Xt fontset spec from the name of a base font. If `motif' is True use the Motif syntax. */ @@ -2016,6 +1990,7 @@ xic_create_fontsetname (const char *base_fontname, int motif) strcat (fontsetname, ":"); return fontsetname; } +#endif /* HAVE_X_WINDOWS && USE_X_TOOLKIT */ #ifdef DEBUG_XIC_FONTSET static void @@ -3887,12 +3862,6 @@ x_char_height (register struct frame *f) return FRAME_LINE_HEIGHT (f); } -int -x_screen_planes (register struct frame *f) -{ - return FRAME_X_DISPLAY_INFO (f)->n_planes; -} - /************************************************************************ @@ -4017,7 +3986,7 @@ select_visual (struct x_display_info *dpyinfo) /* Return the X display structure for the display named NAME. Open a new connection if necessary. */ -struct x_display_info * +static struct x_display_info * x_display_info_for_name (Lisp_Object name) { Lisp_Object names; @@ -4538,13 +4507,13 @@ Lisp_Object tip_frame; /* If non-nil, a timer started that hides the last tooltip when it fires. */ -Lisp_Object tip_timer; +static Lisp_Object tip_timer; Window tip_window; /* If non-nil, a vector of 3 elements containing the last args with which x-show-tip was called. See there. */ -Lisp_Object last_show_tip_args; +static Lisp_Object last_show_tip_args; static Lisp_Object -- cgit v1.2.1 From 1675728f009404df6bc79b7e0933bc675afa1be1 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 12 Apr 2011 01:42:29 -0700 Subject: * ftxfont.c: Make symbols static if they're not exported. (ftxfont_driver): Export only if !defined HAVE_XFT && def8ined HAVE_FREETYPE. * font.h (ftxfont_driver): Likewise. --- src/ChangeLog | 5 +++++ src/font.h | 5 +++-- src/ftxfont.c | 14 ++++++++------ 3 files changed, 16 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 9b145d865db..1498d267775 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2011-04-12 Paul Eggert + * ftxfont.c: Make symbols static if they're not exported. + (ftxfont_driver): Export only if !defined HAVE_XFT && def8ined + HAVE_FREETYPE. + * font.h (ftxfont_driver): Likewise. + * xfns.c: Make symbols static if they're not exported. (x_last_font_name, x_display_info_for_name): (x_set_foreground_color, x_set_background_color, x_set_mouse_color): diff --git a/src/font.h b/src/font.h index ead5223a6cb..efcd56b0365 100644 --- a/src/font.h +++ b/src/font.h @@ -821,13 +821,14 @@ extern void syms_of_ftfont (void); #endif /* HAVE_FREETYPE */ #ifdef HAVE_X_WINDOWS extern struct font_driver xfont_driver; -extern struct font_driver ftxfont_driver; extern void syms_of_xfont (void); extern void syms_of_ftxfont (void); #ifdef HAVE_XFT extern struct font_driver xftfont_driver; extern void syms_of_xftfont (void); -#endif /* HAVE_XFT */ +#elif defined HAVE_FREETYPE +extern struct font_driver ftxfont_driver; +#endif #ifdef HAVE_BDFFONT extern void syms_of_bdffont (void); #endif /* HAVE_BDFFONT */ diff --git a/src/ftxfont.c b/src/ftxfont.c index c6fa858af74..bbba3ca8163 100644 --- a/src/ftxfont.c +++ b/src/ftxfont.c @@ -38,6 +38,11 @@ along with GNU Emacs. If not, see . */ static Lisp_Object Qftx; +#if defined HAVE_XFT || !defined HAVE_FREETYPE +static +#endif +struct font_driver ftxfont_driver; + /* Prototypes for helper function. */ static GC *ftxfont_get_gcs (FRAME_PTR, unsigned long, unsigned long); static int ftxfont_draw_bitmap (FRAME_PTR, GC, GC *, struct font *, @@ -233,13 +238,11 @@ static Lisp_Object ftxfont_open (FRAME_PTR, Lisp_Object, int); static void ftxfont_close (FRAME_PTR, struct font *); static int ftxfont_draw (struct glyph_string *, int, int, int, int, int); -struct font_driver ftxfont_driver; - static Lisp_Object ftxfont_list (Lisp_Object frame, Lisp_Object spec) { Lisp_Object list = ftfont_driver.list (frame, spec), tail; - + for (tail = list; CONSP (tail); tail = XCDR (tail)) ASET (XCAR (tail), FONT_TYPE_INDEX, Qftx); return list; @@ -350,13 +353,13 @@ static int ftxfont_end_for_frame (FRAME_PTR f) { struct ftxfont_frame_data *data = font_get_frame_data (f, &ftxfont_driver); - + BLOCK_INPUT; while (data) { struct ftxfont_frame_data *next = data->next; int i; - + for (i = 0; i < 6; i++) XFreeGC (FRAME_X_DISPLAY (f), data->gcs[i]); free (data); @@ -384,4 +387,3 @@ syms_of_ftxfont (void) ftxfont_driver.end_for_frame = ftxfont_end_for_frame; register_font_driver (&ftxfont_driver, NULL); } - -- cgit v1.2.1 From 9ec6a31795c97fa05c268d297ff39fbb278ead96 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Wed, 13 Apr 2011 13:58:47 +0200 Subject: Fix typos. --- src/ChangeLog.11 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/ChangeLog.11 b/src/ChangeLog.11 index 703b084743c..6f462e32534 100644 --- a/src/ChangeLog.11 +++ b/src/ChangeLog.11 @@ -4906,7 +4906,7 @@ (Finternal_describe_syntax_value): Recognize new flag; use the SYNTAX_FLAGS_* macros. (scan_sexps_forward, Fparse_partial_sexp): Change representation of - comment style to accomodate the new styles. + comment style to accommodate the new styles. (back_comment, forw_comment, Fforward_comment, scan_lists) (scan_sexps_forward): Update code to obey the new comment style flag. -- cgit v1.2.1 From a6744a352fc06e9a303264d64a904596475fe2d1 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 13 Apr 2011 20:41:04 +0300 Subject: Fix bug #8487 with invisible property near EOB under bidi. src/xdisp.c (handle_invisible_prop): Don't call bidi_paragraph_init when at ZV. --- src/ChangeLog | 5 +++++ src/xdisp.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index c164c6b5f58..4c564d214de 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-04-13 Eli Zaretskii + + * xdisp.c (handle_invisible_prop): Don't call bidi_paragraph_init + when at ZV. (Bug#8487) + 2011-04-11 Eli Zaretskii * xdisp.c (redisplay_window): Don't try to determine the character diff --git a/src/xdisp.c b/src/xdisp.c index 2b032bd6597..1cf58edc4c6 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -3661,7 +3661,7 @@ handle_invisible_prop (struct it *it) _after_ bidi iteration avoids affecting the visual order of the displayed text when invisible properties are added or removed. */ - if (it->bidi_it.first_elt) + if (it->bidi_it.first_elt && it->bidi_it.charpos < ZV) { /* If we were `reseat'ed to a new paragraph, determine the paragraph base direction. We need -- cgit v1.2.1 From b532497da492ad9fef912bdf41d7f57c6f5bd833 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Apr 2011 15:19:27 -0700 Subject: * xterm.c: Make symbols static if they're not exported. (x_raise_frame, x_lower_frame, x_wm_set_window_state): (x_wm_set_icon_pixmap, x_initialize, XTread_socket_fake_io_error): (x_destroy_window, x_delete_display): Now static. (x_dispatch_event): Now static if ! (USE_MOTIF || USE_X_TOOLKIT). (x_mouse_leave): Remove; unused. * xterm.h (x_display_info_for_name, x_raise_frame, x_lower_frame): (x_destroy_window, x_wm_set_window_state, x_wm_set_icon_pixmap): (x_delete_display, x_initialize, x_set_border_pixel, x_screen_planes): Remove decls. (x_mouse_leave): Declare only if WINDOWSNT. (x_dispatch_event): Declare only if USE_MOTIF or USE_X_TOOLKIT. (xic_create_fontsetname): Declare only if HAVE_X_WINDOWS && USE_X_TOOLKIT. --- src/ChangeLog | 18 ++++++++++++++++++ src/xterm.c | 31 +++++++++++++++++-------------- src/xterm.h | 16 ++++++---------- 3 files changed, 41 insertions(+), 24 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 1498d267775..94712577e87 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,21 @@ +2011-04-13 Paul Eggert + + * xterm.c: Make symbols static if they're not exported. + (x_raise_frame, x_lower_frame, x_wm_set_window_state): + (x_wm_set_icon_pixmap, x_initialize, XTread_socket_fake_io_error): + (x_destroy_window, x_delete_display): + Now static. + (x_dispatch_event): Now static if ! (USE_MOTIF || USE_X_TOOLKIT). + (x_mouse_leave): Remove; unused. + * xterm.h (x_display_info_for_name, x_raise_frame, x_lower_frame): + (x_destroy_window, x_wm_set_window_state, x_wm_set_icon_pixmap): + (x_delete_display, x_initialize, x_set_border_pixel, x_screen_planes): + Remove decls. + (x_mouse_leave): Declare only if WINDOWSNT. + (x_dispatch_event): Declare only if USE_MOTIF or USE_X_TOOLKIT. + (xic_create_fontsetname): Declare only if HAVE_X_WINDOWS && + USE_X_TOOLKIT. + 2011-04-12 Paul Eggert * ftxfont.c: Make symbols static if they're not exported. diff --git a/src/xterm.c b/src/xterm.c index b3e33b7c0bb..bc847388756 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -306,6 +306,8 @@ enum xembed_message static int x_alloc_nearest_color_1 (Display *, Colormap, XColor *); static void x_set_window_size_1 (struct frame *, int, int, int); +static void x_raise_frame (struct frame *); +static void x_lower_frame (struct frame *); static const XColor *x_color_cells (Display *, int *); static void x_update_window_end (struct window *, int, int); @@ -347,9 +349,15 @@ static void x_check_expected_move (struct frame *, int, int); static void x_sync_with_move (struct frame *, int, int, int); static int handle_one_xevent (struct x_display_info *, XEvent *, int *, struct input_event *); +#if ! (defined USE_MOTIF || defined USE_X_TOOLKIT) +static int x_dispatch_event (XEvent *, Display *); +#endif /* Don't declare this NO_RETURN because we want no interference with debugging failing X calls. */ static void x_connection_closed (Display *, const char *); +static void x_wm_set_window_state (struct frame *, int); +static void x_wm_set_icon_pixmap (struct frame *, int); +static void x_initialize (void); /* Flush display of frame F, or of all frames if F is null. */ @@ -3451,14 +3459,6 @@ x_detect_focus_change (struct x_display_info *dpyinfo, XEvent *event, struct inp } -/* Handle an event saying the mouse has moved out of an Emacs frame. */ - -void -x_mouse_leave (struct x_display_info *dpyinfo) -{ - x_new_focus_frame (dpyinfo, dpyinfo->x_focus_event_frame); -} - /* The focus has changed, or we have redirected a frame's focus to another frame (this happens when a frame uses a surrogate mini-buffer frame). Shift the highlight as appropriate. @@ -5659,7 +5659,7 @@ static short temp_buffer[100]; /* Set this to nonzero to fake an "X I/O error" on a particular display. */ -struct x_display_info *XTread_socket_fake_io_error; +static struct x_display_info *XTread_socket_fake_io_error; /* When we find no input here, we occasionally do a no-op command to verify that the X server is still running and we can still talk with it. @@ -6984,6 +6984,9 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr, i.e. looping while a popup menu or a dialog is posted. Returns the value handle_one_xevent sets in the finish argument. */ +#if ! (defined USE_MOTIF || defined USE_X_TOOLKIT) +static +#endif int x_dispatch_event (XEvent *event, Display *display) { @@ -8870,7 +8873,7 @@ x_raise_frame (struct frame *f) /* Lower frame F. */ -void +static void x_lower_frame (struct frame *f) { if (f->async_visible) @@ -9432,7 +9435,7 @@ x_free_frame_resources (struct frame *f) /* Destroy the X window of frame F. */ -void +static void x_destroy_window (struct frame *f) { struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); @@ -9556,7 +9559,7 @@ x_wm_set_size_hint (struct frame *f, long flags, int user_position) /* Used for IconicState or NormalState */ -void +static void x_wm_set_window_state (struct frame *f, int state) { #ifdef USE_X_TOOLKIT @@ -9574,7 +9577,7 @@ x_wm_set_window_state (struct frame *f, int state) #endif /* not USE_X_TOOLKIT */ } -void +static void x_wm_set_icon_pixmap (struct frame *f, int pixmap_id) { Pixmap icon_pixmap, icon_mask; @@ -10338,7 +10341,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) /* Get rid of display DPYINFO, deleting all frames on it, and without sending any more commands to the X server. */ -void +static void x_delete_display (struct x_display_info *dpyinfo) { struct terminal *t; diff --git a/src/xterm.h b/src/xterm.h index f44c71fab59..5c17e24bf23 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -388,7 +388,6 @@ extern struct x_display_info *x_display_list; extern Lisp_Object x_display_name_list; extern struct x_display_info *x_display_info_for_display (Display *); -extern struct x_display_info *x_display_info_for_name (Lisp_Object); extern void x_set_frame_alpha (struct frame *); extern struct x_display_info *x_term_init (Lisp_Object, char *, char *); @@ -965,19 +964,12 @@ extern void x_set_window_size (struct frame *, int, int, int); extern void x_set_mouse_position (struct frame *, int, int); extern void x_set_mouse_pixel_position (struct frame *, int, int); extern void x_ewmh_activate_frame (struct frame *); -extern void x_raise_frame (struct frame *); -extern void x_lower_frame (struct frame *); extern void x_make_frame_visible (struct frame *); extern void x_make_frame_invisible (struct frame *); extern void x_iconify_frame (struct frame *); extern void x_free_frame_resources (struct frame *); -extern void x_destroy_window (struct frame *); extern void x_wm_set_size_hint (struct frame *, long, int); -extern void x_wm_set_window_state (struct frame *, int); -extern void x_wm_set_icon_pixmap (struct frame *, int); -extern void x_delete_display (struct x_display_info *); extern void x_delete_terminal (struct terminal *terminal); -extern void x_initialize (void); extern unsigned long x_copy_color (struct frame *, unsigned long); #ifdef USE_X_TOOLKIT extern XtAppContext Xt_app_con; @@ -990,9 +982,13 @@ extern int x_alloc_nearest_color (struct frame *, Colormap, XColor *); extern void x_query_colors (struct frame *f, XColor *, int); extern void x_query_color (struct frame *f, XColor *); extern void x_clear_area (Display *, Window, int, int, int, int, int); +#ifdef WINDOWSNT extern void x_mouse_leave (struct x_display_info *); +#endif +#if defined USE_MOTIF || defined USE_X_TOOLKIT extern int x_dispatch_event (XEvent *, Display *); +#endif extern unsigned int x_x_to_emacs_modifiers (struct x_display_info *, unsigned); extern int x_display_pixel_height (struct x_display_info *); @@ -1041,7 +1037,6 @@ extern int xg_set_icon_from_xpm_data (struct frame *, const char**); #endif /* USE_GTK */ extern void x_real_positions (struct frame *, int *, int *); -extern void x_set_border_pixel (struct frame *, int); extern void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object); extern void x_implicitly_set_name (struct frame *, Lisp_Object, Lisp_Object); extern void xic_free_xfontset (struct frame *); @@ -1054,12 +1049,13 @@ extern int x_pixel_width (struct frame *); extern int x_pixel_height (struct frame *); extern int x_char_width (struct frame *); extern int x_char_height (struct frame *); -extern int x_screen_planes (struct frame *); extern void x_sync (struct frame *); extern int x_defined_color (struct frame *, const char *, XColor *, int); #ifdef HAVE_X_I18N extern void free_frame_xic (struct frame *); +# if defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT extern char * xic_create_fontsetname (const char *base_fontname, int motif); +# endif #endif extern void x_set_tool_bar_lines (struct frame *, Lisp_Object, Lisp_Object); -- cgit v1.2.1 From f44bd759cb8b78ee8759f4681643807fe6c572ff Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Apr 2011 15:28:14 -0700 Subject: * editfns.c: Move a (normally-unused) function to its only use. * editfns.c, lisp.h (get_operating_system_release): Remove. * process.c (init_process) [DARWIN_OS]: Do it inline, as it is not worth the hassle of breaking this out. --- src/ChangeLog | 5 +++++ src/editfns.c | 9 --------- src/lisp.h | 1 - src/process.c | 4 +++- 4 files changed, 8 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 94712577e87..7b0a1de11da 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2011-04-13 Paul Eggert + * editfns.c: Move a (normally-unused) function to its only use. + * editfns.c, lisp.h (get_operating_system_release): Remove. + * process.c (init_process) [DARWIN_OS]: Do it inline, as it is not + worth the hassle of breaking this out. + * xterm.c: Make symbols static if they're not exported. (x_raise_frame, x_lower_frame, x_wm_set_window_state): (x_wm_set_icon_pixmap, x_initialize, XTread_socket_fake_io_error): diff --git a/src/editfns.c b/src/editfns.c index afb1e8ebc18..ce77d10cb2f 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -1403,15 +1403,6 @@ get_system_name (void) return ""; } -const char * -get_operating_system_release (void) -{ - if (STRINGP (Voperating_system_release)) - return SSDATA (Voperating_system_release); - else - return ""; -} - DEFUN ("emacs-pid", Femacs_pid, Semacs_pid, 0, 0, 0, doc: /* Return the process ID of Emacs, as an integer. */) (void) diff --git a/src/lisp.h b/src/lisp.h index 7f4f06c5c5d..06075332b2d 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2925,7 +2925,6 @@ extern Lisp_Object make_buffer_string_both (EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, int); extern void init_editfns (void); const char *get_system_name (void); -const char *get_operating_system_release (void); extern void syms_of_editfns (void); EXFUN (Fconstrain_to_field, 5); EXFUN (Ffield_end, 3); diff --git a/src/process.c b/src/process.c index 89d04081eb7..51546e7c78a 100644 --- a/src/process.c +++ b/src/process.c @@ -7188,7 +7188,9 @@ init_process (void) processes. As such, we only change the default value. */ if (initialized) { - const char *release = get_operating_system_release (); + char const *release = (STRINGP (Voperating_system_release) + ? SSDATA (Voperating_system_release) + : 0); if (!release || !release[0] || (release[0] < MIN_PTY_KERNEL_VERSION && release[1] == '.')) { Vprocess_connection_type = Qnil; -- cgit v1.2.1 From 35f08c383e85c6de5a87fc3e16993354b9987ae9 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Apr 2011 15:50:03 -0700 Subject: * emacs.c: Make symbols static if they're not exported. (malloc_state_ptr, malloc_using_checking, syms_of_emacs): (fatal_error_code, fatal_error_signal_hook, standard_args): Now static. (fatal_error_signal): Now static, unless FLOAT_CATCH_SIGKILL. (DEFINE_DUMMY_FUNCTION): Mark function as externally visible. (__CTOR_LIST__, __DTOR_LIST__): Now externally visible. * lisp.h (fatal_error_signal_hook): Remove decl. (fatal_error_signal): Declare only if FLOAT_CATCH_SIGKILL. --- src/ChangeLog | 10 ++++++++++ src/emacs.c | 22 +++++++++++++--------- src/lisp.h | 3 ++- 3 files changed, 25 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 7b0a1de11da..fe3fd550544 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,15 @@ 2011-04-13 Paul Eggert + * emacs.c: Make symbols static if they're not exported. + (malloc_state_ptr, malloc_using_checking, syms_of_emacs): + (fatal_error_code, fatal_error_signal_hook, standard_args): + Now static. + (fatal_error_signal): Now static, unless FLOAT_CATCH_SIGKILL. + (DEFINE_DUMMY_FUNCTION): Mark function as externally visible. + (__CTOR_LIST__, __DTOR_LIST__): Now externally visible. + * lisp.h (fatal_error_signal_hook): Remove decl. + (fatal_error_signal): Declare only if FLOAT_CATCH_SIGKILL. + * editfns.c: Move a (normally-unused) function to its only use. * editfns.c, lisp.h (get_operating_system_release): Remove. * process.c (init_process) [DARWIN_OS]: Do it inline, as it is not diff --git a/src/emacs.c b/src/emacs.c index 74379f4c62e..a3277109f01 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -127,14 +127,14 @@ int initialized; #ifdef DOUG_LEA_MALLOC /* Preserves a pointer to the memory allocated that copies that static data inside glibc's malloc. */ -void *malloc_state_ptr; +static void *malloc_state_ptr; /* From glibc, a routine that returns a copy of the malloc internal state. */ extern void *malloc_get_state (void); /* From glibc, a routine that overwrites the malloc internal state. */ extern int malloc_set_state (void*); /* Non-zero if the MALLOC_CHECK_ environment variable was set while dumping. Used to work around a bug in glibc's malloc. */ -int malloc_using_checking; +static int malloc_using_checking; #endif Lisp_Object Qfile_name_handler_alist; @@ -186,7 +186,7 @@ char **initial_argv; int initial_argc; static void sort_args (int argc, char **argv); -void syms_of_emacs (void); +static void syms_of_emacs (void); /* MSVC needs each string be shorter than 2048 bytes, so the usage strings below are split to not overflow this limit. */ @@ -288,7 +288,7 @@ section of the Emacs manual or the file BUGS.\n" /* Signal code for the fatal signal that was received. */ -int fatal_error_code; +static int fatal_error_code; /* Nonzero if handling a fatal error already. */ int fatal_error_in_progress; @@ -296,7 +296,7 @@ int fatal_error_in_progress; /* If non-null, call this function from fatal_error_signal before committing suicide. */ -void (*fatal_error_signal_hook) (void); +static void (*fatal_error_signal_hook) (void); #ifdef FORWARD_SIGNAL_TO_MAIN_THREAD /* When compiled with GTK and running under Gnome, @@ -308,6 +308,9 @@ pthread_t main_thread; /* Handle bus errors, invalid instruction, etc. */ +#ifndef FLOAT_CATCH_SIGILL +static +#endif void fatal_error_signal (int sig) { @@ -549,7 +552,8 @@ static char dump_tz[] = "UtC0"; /* Define a dummy function F. Declare F too, to pacify gcc -Wmissing-prototypes. */ -#define DEFINE_DUMMY_FUNCTION(f) void f (void); void f (void) {} +#define DEFINE_DUMMY_FUNCTION(f) \ + void f (void) EXTERNALLY_VISIBLE; void f (void) {} #ifndef GCC_CTORS_IN_LIBC DEFINE_DUMMY_FUNCTION (__do_global_ctors) @@ -557,9 +561,9 @@ DEFINE_DUMMY_FUNCTION (__do_global_ctors_aux) DEFINE_DUMMY_FUNCTION (__do_global_dtors) /* GNU/Linux has a bug in its library; avoid an error. */ #ifndef GNU_LINUX -char * __CTOR_LIST__[2] = { (char *) (-1), 0 }; +char * __CTOR_LIST__[2] EXTERNALLY_VISIBLE = { (char *) (-1), 0 }; #endif -char * __DTOR_LIST__[2] = { (char *) (-1), 0 }; +char * __DTOR_LIST__[2] EXTERNALLY_VISIBLE = { (char *) (-1), 0 }; #endif /* GCC_CTORS_IN_LIBC */ DEFINE_DUMMY_FUNCTION (__main) #endif /* __GNUC__ */ @@ -1700,7 +1704,7 @@ struct standard_args int nargs; }; -const struct standard_args standard_args[] = +static const struct standard_args standard_args[] = { { "-version", "--version", 150, 0 }, { "-chdir", "--chdir", 130, 1 }, diff --git a/src/lisp.h b/src/lisp.h index 06075332b2d..f678630a76f 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -3179,8 +3179,9 @@ extern int display_arg; extern Lisp_Object decode_env_path (const char *, const char *); extern Lisp_Object empty_unibyte_string, empty_multibyte_string; extern Lisp_Object Qfile_name_handler_alist; -extern void (*fatal_error_signal_hook) (void); +#ifdef FLOAT_CATCH_SIGILL extern void fatal_error_signal (int); +#endif EXFUN (Fkill_emacs, 1) NO_RETURN; #if HAVE_SETLOCALE void fixup_locale (void); -- cgit v1.2.1 From 57a96f5c91758efc0acf2c343dc876d0e0926018 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Apr 2011 15:53:58 -0700 Subject: * eval.c: Make symbols static if they're not exported. (backtrace_list, lisp_eval_depth, when_entered_debugger): Now static. * lisp.h (backtrace_list): Remove decl. --- src/ChangeLog | 4 ++++ src/eval.c | 6 +++--- src/lisp.h | 2 -- 3 files changed, 7 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index fe3fd550544..5a6da2ab788 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2011-04-13 Paul Eggert + * eval.c: Make symbols static if they're not exported. + (backtrace_list, lisp_eval_depth, when_entered_debugger): Now static. + * lisp.h (backtrace_list): Remove decl. + * emacs.c: Make symbols static if they're not exported. (malloc_state_ptr, malloc_using_checking, syms_of_emacs): (fatal_error_code, fatal_error_signal_hook, standard_args): diff --git a/src/eval.c b/src/eval.c index dddedc77286..ef5eb6bdaaf 100644 --- a/src/eval.c +++ b/src/eval.c @@ -56,7 +56,7 @@ struct backtrace char debug_on_exit : 1; }; -struct backtrace *backtrace_list; +static struct backtrace *backtrace_list; #if !BYTE_MARK_STACK static @@ -116,7 +116,7 @@ struct specbinding *specpdl_ptr; /* Depth in Lisp evaluations and function calls. */ -EMACS_INT lisp_eval_depth; +static EMACS_INT lisp_eval_depth; /* The value of num_nonmacro_input_events as of the last time we started to enter the debugger. If we decide to enter the debugger @@ -125,7 +125,7 @@ EMACS_INT lisp_eval_depth; signal the error instead of entering an infinite loop of debugger invocations. */ -int when_entered_debugger; +static int when_entered_debugger; /* The function from which the last `signal' was called. Set in Fsignal. */ diff --git a/src/lisp.h b/src/lisp.h index f678630a76f..420d6024b7f 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2005,8 +2005,6 @@ struct catchtag struct byte_stack *byte_stack; }; -extern struct backtrace *backtrace_list; - extern Lisp_Object memory_signal_data; /* An address near the bottom of the stack. -- cgit v1.2.1 From 5045092bb41620c978e01afe3efef18477ba2760 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Apr 2011 15:57:17 -0700 Subject: * fileio.c: Make symbols static if they're not exported. (auto_saving, auto_save_mode_bits, auto_save_error_occurred): (Vwrite_region_annotation_buffers): Now static. --- src/ChangeLog | 4 ++++ src/fileio.c | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 5a6da2ab788..e2efafb2adc 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2011-04-13 Paul Eggert + * fileio.c: Make symbols static if they're not exported. + (auto_saving, auto_save_mode_bits, auto_save_error_occurred): + (Vwrite_region_annotation_buffers): Now static. + * eval.c: Make symbols static if they're not exported. (backtrace_list, lisp_eval_depth, when_entered_debugger): Now static. * lisp.h (backtrace_list): Remove decl. diff --git a/src/fileio.c b/src/fileio.c index fb16decaaa3..4c92510178a 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -88,14 +88,14 @@ along with GNU Emacs. If not, see . */ #endif /* Nonzero during writing of auto-save files */ -int auto_saving; +static int auto_saving; /* Set by auto_save_1 to mode of original file so Fwrite_region will create a new file with the same mode as the original */ -int auto_save_mode_bits; +static int auto_save_mode_bits; /* Set by auto_save_1 if an error occurred during the last auto-save. */ -int auto_save_error_occurred; +static int auto_save_error_occurred; /* The symbol bound to coding-system-for-read when insert-file-contents is called for recovering a file. This is not @@ -118,7 +118,7 @@ static Lisp_Object Qafter_insert_file_set_coding; static Lisp_Object Qwrite_region_annotate_functions; /* Each time an annotation function changes the buffer, the new buffer is added here. */ -Lisp_Object Vwrite_region_annotation_buffers; +static Lisp_Object Vwrite_region_annotation_buffers; #ifdef HAVE_FSYNC #endif -- cgit v1.2.1 From dfcf35798287d2483c1136d156e0f692ccea3b18 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Apr 2011 16:02:03 -0700 Subject: * fns.c (weak_hash_tables): Now static. --- src/ChangeLog | 2 ++ src/fns.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index e2efafb2adc..8d3318449e7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-04-13 Paul Eggert + * fns.c (weak_hash_tables): Now static. + * fileio.c: Make symbols static if they're not exported. (auto_saving, auto_save_mode_bits, auto_save_error_occurred): (Vwrite_region_annotation_buffers): Now static. diff --git a/src/fns.c b/src/fns.c index 9ced09c38f6..2fee34eaf22 100644 --- a/src/fns.c +++ b/src/fns.c @@ -3351,7 +3351,7 @@ base64_decode_1 (const char *from, char *to, EMACS_INT length, /* The list of all weak hash tables. Don't staticpro this one. */ -struct Lisp_Hash_Table *weak_hash_tables; +static struct Lisp_Hash_Table *weak_hash_tables; /* Various symbols. */ -- cgit v1.2.1 From 239f9db96059f3f76e4b4a6f31f6eb56f642ea84 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Apr 2011 16:22:35 -0700 Subject: * font.c, fontset.c: Make symbols static if they're not exported. * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): New macro. (FACE_SUITABLE_FOR_CHAR_P): Use it. * font.c (font_close_object): Now static. * font.h (font_close_object): Remove. * fontset.c (FONTSET_OBJLIST): Remove. (free_realized_fontset) #if-0 the body, which does nothing. (face_suitable_for_char_p): #if-0, as it's never called. * fontset.h (face_suitable_for_char_p): Remove decl. * xfaces.c (face_at_string_position): Use FACE_SUITABLE_FOR_ASCII_CHAR_P, not FACE_SUITABLE_FOR_CHAR_P, since 0 is always ASCII. --- src/ChangeLog | 13 +++++++++++++ src/dispextern.h | 5 ++++- src/font.c | 2 +- src/font.h | 1 - src/fontset.c | 6 +++++- src/fontset.h | 2 -- src/xfaces.c | 2 +- 7 files changed, 24 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 8d3318449e7..4c3796dbbf5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,18 @@ 2011-04-13 Paul Eggert + * font.c, fontset.c: Make symbols static if they're not exported. + * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): New macro. + (FACE_SUITABLE_FOR_CHAR_P): Use it. + * font.c (font_close_object): Now static. + * font.h (font_close_object): Remove. + * fontset.c (FONTSET_OBJLIST): Remove. + (free_realized_fontset) #if-0 the body, which does nothing. + (face_suitable_for_char_p): #if-0, as it's never called. + * fontset.h (face_suitable_for_char_p): Remove decl. + * xfaces.c (face_at_string_position): Use + FACE_SUITABLE_FOR_ASCII_CHAR_P, not FACE_SUITABLE_FOR_CHAR_P, + since 0 is always ASCII. + * fns.c (weak_hash_tables): Now static. * fileio.c: Make symbols static if they're not exported. diff --git a/src/dispextern.h b/src/dispextern.h index 4ad107a7266..d57aaee3e7d 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -1733,9 +1733,12 @@ struct face_cache /* Non-zero if FACE is suitable for displaying character CHAR. */ +#define FACE_SUITABLE_FOR_ASCII_CHAR_P(FACE, CHAR) \ + ((FACE) == (FACE)->ascii_face) + #define FACE_SUITABLE_FOR_CHAR_P(FACE, CHAR) \ (ASCII_CHAR_P (CHAR) \ - ? (FACE) == (FACE)->ascii_face \ + ? FACE_SUITABLE_FOR_ASCII_CHAR_P(FACE) \ : face_suitable_for_char_p ((FACE), (CHAR))) /* Return the id of the realized face on frame F that is like the face diff --git a/src/font.c b/src/font.c index ace1b8442d4..6f27e3b9c67 100644 --- a/src/font.c +++ b/src/font.c @@ -2872,7 +2872,7 @@ font_open_entity (FRAME_PTR f, Lisp_Object entity, int pixel_size) /* Close FONT_OBJECT that is opened on frame F. */ -void +static void font_close_object (FRAME_PTR f, Lisp_Object font_object) { struct font *font = XFONT_OBJECT (font_object); diff --git a/src/font.h b/src/font.h index efcd56b0365..7b43c2f99e7 100644 --- a/src/font.h +++ b/src/font.h @@ -779,7 +779,6 @@ extern void font_done_for_face (FRAME_PTR f, struct face *face); extern Lisp_Object font_open_by_spec (FRAME_PTR f, Lisp_Object spec); extern Lisp_Object font_open_by_name (FRAME_PTR f, const char *name); -extern void font_close_object (FRAME_PTR f, Lisp_Object font_object); extern Lisp_Object font_intern_prop (const char *str, int len, int force_symbol); extern void font_update_sort_order (int *order); diff --git a/src/fontset.c b/src/fontset.c index c8452979eee..5aa65c85110 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -238,7 +238,7 @@ fontset_id_valid_p (int id) /* Macros to access special values of (realized) FONTSET. */ #define FONTSET_BASE(fontset) XCHAR_TABLE (fontset)->extras[2] #define FONTSET_FRAME(fontset) XCHAR_TABLE (fontset)->extras[3] -#define FONTSET_OBJLIST(fontset) XCHAR_TABLE (fontset)->extras[4] +/* #define FONTSET_OBJLIST(fontset) XCHAR_TABLE (fontset)->extras[4] */ #define FONTSET_NOFONT_FACE(fontset) XCHAR_TABLE (fontset)->extras[5] /* #define FONTSET_REPERTORY(fontset) XCHAR_TABLE (fontset)->extras[6] */ #define FONTSET_DEFAULT(fontset) XCHAR_TABLE (fontset)->extras[7] @@ -838,6 +838,7 @@ fontset_ascii (int id) static void free_realized_fontset (FRAME_PTR f, Lisp_Object fontset) { +#if 0 Lisp_Object tail; if (0) @@ -846,6 +847,7 @@ free_realized_fontset (FRAME_PTR f, Lisp_Object fontset) xassert (FONT_OBJECT_P (XCAR (tail))); font_close_object (f, XCAR (tail)); } +#endif } /* Free fontset of FACE defined on frame F. Called from @@ -881,6 +883,7 @@ free_face_fontset (FRAME_PTR f, struct face *face) } +#if 0 /* Return 1 if FACE is suitable for displaying character C. Otherwise return 0. Called from the macro FACE_SUITABLE_FOR_CHAR_P when C is not an ASCII character. */ @@ -896,6 +899,7 @@ face_suitable_for_char_p (struct face *face, int c) && INTEGERP (RFONT_DEF_FACE (rfont_def)) && face->id == XINT (RFONT_DEF_FACE (rfont_def))); } +#endif /* Return ID of face suitable for displaying character C on frame F. diff --git a/src/fontset.h b/src/fontset.h index fe2e4fe0ca4..8831f4ce0b7 100644 --- a/src/fontset.h +++ b/src/fontset.h @@ -32,7 +32,6 @@ extern void (*check_window_system_func) (void); struct face; extern void free_face_fontset (FRAME_PTR, struct face *); -extern int face_suitable_for_char_p (struct face *, int); extern int face_for_char (FRAME_PTR, struct face *, int, int, Lisp_Object); extern Lisp_Object font_for_char (struct face *, int, int, Lisp_Object); @@ -51,4 +50,3 @@ struct font; extern int face_for_font (struct frame *, Lisp_Object, struct face *); #endif /* EMACS_FONTSET_H */ - diff --git a/src/xfaces.c b/src/xfaces.c index b09d20c107e..6330827b5cc 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -6179,7 +6179,7 @@ face_at_string_position (struct window *w, Lisp_Object string, if we don't have fonts, so we can stop here if not working on a window-system frame. */ || !FRAME_WINDOW_P (f) - || FACE_SUITABLE_FOR_CHAR_P (base_face, 0))) + || FACE_SUITABLE_FOR_ASCII_CHAR_P (base_face, 0))) return base_face->id; /* Begin with attributes from the base face. */ -- cgit v1.2.1 From 816269316fbb2c248873b4387db5624ff57f6303 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Apr 2011 16:35:33 -0700 Subject: * frame.c: Make symbols static if they're not exported. (x_report_frame_params, make_terminal_frame): Now static. (get_frame_param): Now static, unless HAVE_NS. (x_fullscreen_adjust): Define if WINDOWSNT, not if HAVE_WINDOW_SYSTEM. (x_get_resource_string): Remove; not used. * frame.h (make_terminal_frame, x_report_frame_params): (x_get_resource_string); Remove decls. (x_fullscreen_adjust): Declare only if WINDOWSNT. * lisp.h (get_frame_param): Declare only if HAVE_NS. --- src/ChangeLog | 10 ++++++++++ src/frame.c | 39 ++++++++++++--------------------------- src/frame.h | 8 ++------ src/lisp.h | 2 ++ 4 files changed, 26 insertions(+), 33 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 4c3796dbbf5..ea90a2f8057 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,15 @@ 2011-04-13 Paul Eggert + * frame.c: Make symbols static if they're not exported. + (x_report_frame_params, make_terminal_frame): Now static. + (get_frame_param): Now static, unless HAVE_NS. + (x_fullscreen_adjust): Define if WINDOWSNT, not if HAVE_WINDOW_SYSTEM. + (x_get_resource_string): Remove; not used. + * frame.h (make_terminal_frame, x_report_frame_params): + (x_get_resource_string); Remove decls. + (x_fullscreen_adjust): Declare only if WINDOWSNT. + * lisp.h (get_frame_param): Declare only if HAVE_NS. + * font.c, fontset.c: Make symbols static if they're not exported. * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): New macro. (FACE_SUITABLE_FOR_CHAR_P): Use it. diff --git a/src/frame.c b/src/frame.c index 5493600ce5b..79e0b40a319 100644 --- a/src/frame.c +++ b/src/frame.c @@ -121,6 +121,10 @@ Lisp_Object Qface_set_after_frame_default; static Lisp_Object Qdelete_frame_functions; +#ifdef HAVE_WINDOW_SYSTEM +static void x_report_frame_params (struct frame *, Lisp_Object *); +#endif + static void set_menu_bar_lines_1 (Lisp_Object window, int n) @@ -549,7 +553,7 @@ make_initial_frame (void) } -struct frame * +static struct frame * make_terminal_frame (struct terminal *terminal) { register struct frame *f; @@ -2078,6 +2082,9 @@ See `redirect-frame-focus'. */) /* Return the value of frame parameter PROP in frame FRAME. */ +#if !HAVE_NS +static +#endif Lisp_Object get_frame_param (register struct frame *frame, Lisp_Object prop) { @@ -2833,7 +2840,7 @@ static const struct frame_parm_table frame_parms[] = {"tool-bar-position", &Qtool_bar_position}, }; -#ifdef HAVE_WINDOW_SYSTEM +#ifdef WINDOWSNT /* Calculate fullscreen size. Return in *TOP_POS and *LEFT_POS the wanted positions of the WM window (not Emacs window). @@ -2877,6 +2884,9 @@ x_fullscreen_adjust (struct frame *f, int *width, int *height, int *top_pos, int *height = newheight; } +#endif /* WINDOWSNT */ + +#ifdef HAVE_WINDOW_SYSTEM /* Change the parameters of frame F as specified by ALIST. If a parameter is not specially recognized, do nothing special; @@ -3835,31 +3845,6 @@ display_x_get_resource (Display_Info *dpyinfo, Lisp_Object attribute, Lisp_Objec attribute, class, component, subclass); } -#if defined HAVE_X_WINDOWS && !defined USE_X_TOOLKIT -/* Used when C code wants a resource value. */ -/* Called from oldXMenu/Create.c. */ -char * -x_get_resource_string (const char *attribute, const char *class) -{ - char *name_key; - char *class_key; - struct frame *sf = SELECTED_FRAME (); - - /* Allocate space for the components, the dots which separate them, - and the final '\0'. */ - name_key = (char *) alloca (SBYTES (Vinvocation_name) - + strlen (attribute) + 2); - class_key = (char *) alloca ((sizeof (EMACS_CLASS) - 1) - + strlen (class) + 2); - - sprintf (name_key, "%s.%s", SDATA (Vinvocation_name), attribute); - sprintf (class_key, "%s.%s", EMACS_CLASS, class); - - return x_get_string_resource (FRAME_X_DISPLAY_INFO (sf)->xrdb, - name_key, class_key); -} -#endif - /* Return the value of parameter PARAM. First search ALIST, then Vdefault_frame_alist, then the X defaults diff --git a/src/frame.h b/src/frame.h index 0f189414e08..1f176f6f900 100644 --- a/src/frame.h +++ b/src/frame.h @@ -838,7 +838,6 @@ extern struct frame *last_nonminibuf_frame; extern void set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object); extern struct frame *make_initial_frame (void); -extern struct frame *make_terminal_frame (struct terminal *); extern struct frame *make_frame (int); #ifdef HAVE_WINDOW_SYSTEM extern struct frame *make_minibuffer_frame (void); @@ -1095,11 +1094,12 @@ extern Lisp_Object x_new_font (struct frame *, Lisp_Object, int); extern Lisp_Object Qface_set_after_frame_default; +#ifdef WINDOWSNT extern void x_fullscreen_adjust (struct frame *f, int *, int *, int *, int *); +#endif extern void x_set_frame_parameters (struct frame *, Lisp_Object); -extern void x_report_frame_params (struct frame *, Lisp_Object *); extern void x_set_fullscreen (struct frame *, Lisp_Object, Lisp_Object); extern void x_set_line_spacing (struct frame *, Lisp_Object, Lisp_Object); @@ -1133,10 +1133,6 @@ extern Lisp_Object display_x_get_resource (Display_Info *, Lisp_Object component, Lisp_Object subclass); -#if defined HAVE_X_WINDOWS && !defined USE_X_TOOLKIT -extern char *x_get_resource_string (const char *, const char *); -#endif - /* In xmenu.c */ extern void set_frame_menubar (FRAME_PTR, int, int); diff --git a/src/lisp.h b/src/lisp.h index 420d6024b7f..4f254002296 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -3149,7 +3149,9 @@ extern Lisp_Object Qvisible; extern void store_frame_param (struct frame *, Lisp_Object, Lisp_Object); extern void store_in_alist (Lisp_Object *, Lisp_Object, Lisp_Object); extern Lisp_Object do_switch_frame (Lisp_Object, int, int, Lisp_Object); +#if HAVE_NS extern Lisp_Object get_frame_param (struct frame *, Lisp_Object); +#endif extern Lisp_Object frame_buffer_predicate (Lisp_Object); EXFUN (Fselect_frame, 2); EXFUN (Fselected_frame, 0); -- cgit v1.2.1 From ad9a7a06d48b0be0b1159db566c2760d951d62c1 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Apr 2011 16:38:13 -0700 Subject: * fringe.c (standard_bitmaps): Now static. (max_used_fringe_bitmap): Now static, unless HAVE_NS. --- src/ChangeLog | 3 +++ src/fringe.c | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index ea90a2f8057..a83bfbb2f46 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-04-13 Paul Eggert + * fringe.c (standard_bitmaps): Now static. + (max_used_fringe_bitmap): Now static, unless HAVE_NS. + * frame.c: Make symbols static if they're not exported. (x_report_frame_params, make_terminal_frame): Now static. (get_frame_param): Now static, unless HAVE_NS. diff --git a/src/fringe.c b/src/fringe.c index 281b563c9b7..bc6b493584c 100644 --- a/src/fringe.c +++ b/src/fringe.c @@ -427,7 +427,7 @@ static unsigned short empty_line_bits[] = { /* NOTE: The order of these bitmaps must match the sequence used in fringe.el to define the corresponding symbols. */ -struct fringe_bitmap standard_bitmaps[] = +static struct fringe_bitmap standard_bitmaps[] = { { NULL, 0, 0, 0, 0, 0 }, /* NO_FRINGE_BITMAP */ { FRBITS (question_mark_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 }, @@ -462,6 +462,9 @@ static struct fringe_bitmap **fringe_bitmaps; static Lisp_Object *fringe_faces; static int max_fringe_bitmaps; +#ifndef HAVE_NS +static +#endif int max_used_fringe_bitmap = MAX_STANDARD_FRINGE_BITMAPS; -- cgit v1.2.1 From cd44d2ebb43eb738eca182841c903f8419cd6b5b Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Apr 2011 16:44:57 -0700 Subject: * image.c: Make symbols static if they're not exported. * dispextern.h (x_create_bitmap_from_xpm_data): Do not declare if USE_GTK. * image.c (x_create_bitmap_from_xpm_data): Do not define if USE_GTK. (xpm_color_cache, ct_table, ct_colors_allocated): Now static. --- src/ChangeLog | 6 ++++++ src/dispextern.h | 2 +- src/image.c | 8 ++++---- 3 files changed, 11 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index a83bfbb2f46..1ede517243f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,11 @@ 2011-04-13 Paul Eggert + * image.c: Make symbols static if they're not exported. + * dispextern.h (x_create_bitmap_from_xpm_data): Do not declare + if USE_GTK. + * image.c (x_create_bitmap_from_xpm_data): Do not define if USE_GTK. + (xpm_color_cache, ct_table, ct_colors_allocated): Now static. + * fringe.c (standard_bitmaps): Now static. (max_used_fringe_bitmap): Now static, unless HAVE_NS. diff --git a/src/dispextern.h b/src/dispextern.h index d57aaee3e7d..438db97c6a5 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -3082,7 +3082,7 @@ extern void x_reference_bitmap (struct frame *, int); extern int x_create_bitmap_from_data (struct frame *, char *, unsigned int, unsigned int); extern int x_create_bitmap_from_file (struct frame *, Lisp_Object); -#if defined (HAVE_XPM) && defined (HAVE_X_WINDOWS) +#if defined HAVE_XPM && defined HAVE_X_WINDOWS && !defined USE_GTK extern int x_create_bitmap_from_xpm_data (struct frame *f, const char **bits); #endif #ifndef x_destroy_bitmap diff --git a/src/image.c b/src/image.c index f1c3d5d84f0..11c6aa8a17d 100644 --- a/src/image.c +++ b/src/image.c @@ -3096,7 +3096,7 @@ struct xpm_cached_color size. */ #define XPM_COLOR_CACHE_BUCKETS 1001 -struct xpm_cached_color **xpm_color_cache; +static struct xpm_cached_color **xpm_color_cache; /* Initialize the color cache. */ @@ -3312,7 +3312,7 @@ xpm_image_p (Lisp_Object object) #endif /* HAVE_XPM || HAVE_NS */ -#if defined (HAVE_XPM) && defined (HAVE_X_WINDOWS) +#if defined HAVE_XPM && defined HAVE_X_WINDOWS && !defined USE_GTK int x_create_bitmap_from_xpm_data (struct frame *f, const char **bits) { @@ -4136,11 +4136,11 @@ struct ct_color /* The color hash table. */ -struct ct_color **ct_table; +static struct ct_color **ct_table; /* Number of entries in the color table. */ -int ct_colors_allocated; +static int ct_colors_allocated; /* Initialize the color table. */ -- cgit v1.2.1 From 9306c32edb973b6c85ab32437332c18288528830 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Apr 2011 17:42:10 -0700 Subject: * indent.c (val_compute_motion, val_vmotion): Now static. --- src/ChangeLog | 2 ++ src/indent.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 1ede517243f..c11fd18714e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-04-13 Paul Eggert + * indent.c (val_compute_motion, val_vmotion): Now static. + * image.c: Make symbols static if they're not exported. * dispextern.h (x_create_bitmap_from_xpm_data): Do not declare if USE_GTK. diff --git a/src/indent.c b/src/indent.c index 84476e7bbdb..5eab4f48f69 100644 --- a/src/indent.c +++ b/src/indent.c @@ -1044,7 +1044,7 @@ The return value is the current column. */) /* compute_motion: compute buffer posn given screen posn and vice versa */ -struct position val_compute_motion; +static struct position val_compute_motion; /* Scan the current buffer forward from offset FROM, pretending that this is at line FROMVPOS, column FROMHPOS, until reaching buffer @@ -1818,7 +1818,7 @@ visible section of the buffer, and pass LINE and COL as TOPOS. */) /* Fvertical_motion and vmotion */ -struct position val_vmotion; +static struct position val_vmotion; struct position * vmotion (register EMACS_INT from, register EMACS_INT vtarget, struct window *w) -- cgit v1.2.1 From 77382fcc33809a84866968ed3f969ea65ea4f1f7 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Apr 2011 17:44:47 -0700 Subject: * insdel.c: Make symbols static if they're not exported. However, leave prepare_to_modify_buffer alone. It's never called from outside this function, but that appears to be a bug. (combine_after_change_list, combine_after_change_buffer): (adjust_after_replace): Now static. (adjust_after_replace_noundo): Remove; unused. * lisp.h (adjust_after_replace, adjust_after_replace_noundo): Remove decls. --- src/ChangeLog | 9 +++++++++ src/insdel.c | 58 +++------------------------------------------------------- src/lisp.h | 4 ---- 3 files changed, 12 insertions(+), 59 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index c11fd18714e..c87dfb5056e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,14 @@ 2011-04-13 Paul Eggert + * insdel.c: Make symbols static if they're not exported. + However, leave prepare_to_modify_buffer alone. It's never + called from outside this function, but that appears to be a bug. + (combine_after_change_list, combine_after_change_buffer): + (adjust_after_replace): Now static. + (adjust_after_replace_noundo): Remove; unused. + * lisp.h (adjust_after_replace, adjust_after_replace_noundo): + Remove decls. + * indent.c (val_compute_motion, val_vmotion): Now static. * image.c: Make symbols static if they're not exported. diff --git a/src/insdel.c b/src/insdel.c index dd7e3c14335..4bc25025a2f 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -60,10 +60,10 @@ INFUN (Fcombine_after_change_execute, 0); END-UNCHANGED is the number of chars after the changed range, and CHANGE-AMOUNT is the number of characters inserted by the change (negative for a deletion). */ -Lisp_Object combine_after_change_list; +static Lisp_Object combine_after_change_list; /* Buffer which combine_after_change_list is about. */ -Lisp_Object combine_after_change_buffer; +static Lisp_Object combine_after_change_buffer; Lisp_Object Qinhibit_modification_hooks; @@ -1222,7 +1222,7 @@ insert_from_buffer_1 (struct buffer *buf, PREV_TEXT nil means the new text was just inserted. */ -void +static void adjust_after_replace (EMACS_INT from, EMACS_INT from_byte, Lisp_Object prev_text, EMACS_INT len, EMACS_INT len_byte) { @@ -1285,58 +1285,6 @@ adjust_after_replace (EMACS_INT from, EMACS_INT from_byte, CHARS_MODIFF = MODIFF; } -/* Like adjust_after_replace, but doesn't require PREV_TEXT. - This is for use when undo is not enabled in the current buffer. */ - -void -adjust_after_replace_noundo (EMACS_INT from, EMACS_INT from_byte, - EMACS_INT nchars_del, EMACS_INT nbytes_del, - EMACS_INT len, EMACS_INT len_byte) -{ -#ifdef BYTE_COMBINING_DEBUG - if (count_combining_before (GPT_ADDR, len_byte, from, from_byte) - || count_combining_after (GPT_ADDR, len_byte, from, from_byte)) - abort (); -#endif - - /* Update various buffer positions for the new text. */ - GAP_SIZE -= len_byte; - ZV += len; Z+= len; - ZV_BYTE += len_byte; Z_BYTE += len_byte; - GPT += len; GPT_BYTE += len_byte; - if (GAP_SIZE > 0) *(GPT_ADDR) = 0; /* Put an anchor. */ - - if (nchars_del > 0) - adjust_markers_for_replace (from, from_byte, nchars_del, nbytes_del, - len, len_byte); - else - adjust_markers_for_insert (from, from_byte, - from + len, from_byte + len_byte, 0); - - if (len > nchars_del) - adjust_overlays_for_insert (from, len - nchars_del); - else if (len < nchars_del) - adjust_overlays_for_delete (from, nchars_del - len); - if (BUF_INTERVALS (current_buffer) != 0) - { - offset_intervals (current_buffer, from, len - nchars_del); - } - - if (from < PT) - adjust_point (len - nchars_del, len_byte - nbytes_del); - - /* As byte combining will decrease Z, we must check this again. */ - if (Z - GPT < END_UNCHANGED) - END_UNCHANGED = Z - GPT; - - CHECK_MARKERS (); - - if (len == 0) - evaporate_overlays (from); - MODIFF++; - CHARS_MODIFF = MODIFF; -} - /* Record undo information, adjust markers and position keepers for an insertion of a text from FROM (FROM_BYTE) to TO (TO_BYTE). The text already exists in the current buffer but character length (TO diff --git a/src/lisp.h b/src/lisp.h index 4f254002296..e25ae89dfaa 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2570,10 +2570,6 @@ extern void modify_region (struct buffer *, EMACS_INT, EMACS_INT, int); extern void prepare_to_modify_buffer (EMACS_INT, EMACS_INT, EMACS_INT *); extern void signal_before_change (EMACS_INT, EMACS_INT, EMACS_INT *); extern void signal_after_change (EMACS_INT, EMACS_INT, EMACS_INT); -extern void adjust_after_replace (EMACS_INT, EMACS_INT, Lisp_Object, - EMACS_INT, EMACS_INT); -extern void adjust_after_replace_noundo (EMACS_INT, EMACS_INT, EMACS_INT, - EMACS_INT, EMACS_INT, EMACS_INT); extern void adjust_after_insert (EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT); extern void adjust_markers_for_delete (EMACS_INT, EMACS_INT, -- cgit v1.2.1 From 4889fc82cf51dacb7435e33c5230f53c1251b0d4 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Apr 2011 17:49:57 -0700 Subject: * insdel.c (signal_before_change): Now static. --- src/ChangeLog | 4 ++-- src/insdel.c | 4 +++- src/lisp.h | 1 - 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index c87dfb5056e..9791e2b4d35 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -4,10 +4,10 @@ However, leave prepare_to_modify_buffer alone. It's never called from outside this function, but that appears to be a bug. (combine_after_change_list, combine_after_change_buffer): - (adjust_after_replace): Now static. + (adjust_after_replace, signal_before_change): Now static. (adjust_after_replace_noundo): Remove; unused. * lisp.h (adjust_after_replace, adjust_after_replace_noundo): - Remove decls. + (signal_before_change): Remove decls. * indent.c (val_compute_motion, val_vmotion): Now static. diff --git a/src/insdel.c b/src/insdel.c index 4bc25025a2f..8733054e9cd 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -66,6 +66,8 @@ static Lisp_Object combine_after_change_list; static Lisp_Object combine_after_change_buffer; Lisp_Object Qinhibit_modification_hooks; + +static void signal_before_change (EMACS_INT, EMACS_INT, EMACS_INT *); #define CHECK_MARKERS() \ do \ @@ -1997,7 +1999,7 @@ reset_var_on_error (Lisp_Object val) If PRESERVE_PTR is nonzero, we relocate *PRESERVE_PTR by holding its value temporarily in a marker. */ -void +static void signal_before_change (EMACS_INT start_int, EMACS_INT end_int, EMACS_INT *preserve_ptr) { diff --git a/src/lisp.h b/src/lisp.h index e25ae89dfaa..447fea7e8a7 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2568,7 +2568,6 @@ extern Lisp_Object del_range_2 (EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, int); extern void modify_region (struct buffer *, EMACS_INT, EMACS_INT, int); extern void prepare_to_modify_buffer (EMACS_INT, EMACS_INT, EMACS_INT *); -extern void signal_before_change (EMACS_INT, EMACS_INT, EMACS_INT *); extern void signal_after_change (EMACS_INT, EMACS_INT, EMACS_INT); extern void adjust_after_insert (EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT); -- cgit v1.2.1 From 93ea6e8fa937675ade7e03c5aa35886a15185541 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Apr 2011 17:55:09 -0700 Subject: * intervals.c: Make symbols static if they're not exported. (merge_properties_sticky, merge_interval_right, delete_interval): Now static. * intervals.h (merge_interval_right, delete_interval): Remove decls. --- src/ChangeLog | 7 +++++++ src/intervals.c | 9 +++++---- src/intervals.h | 2 -- 3 files changed, 12 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 9791e2b4d35..2187a6b5620 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2011-04-14 Paul Eggert + + * intervals.c: Make symbols static if they're not exported. + (merge_properties_sticky, merge_interval_right, delete_interval): + Now static. + * intervals.h (merge_interval_right, delete_interval): Remove decls. + 2011-04-13 Paul Eggert * insdel.c: Make symbols static if they're not exported. diff --git a/src/intervals.c b/src/intervals.c index 952f826778c..3be6e2d1ffa 100644 --- a/src/intervals.c +++ b/src/intervals.c @@ -51,7 +51,8 @@ along with GNU Emacs. If not, see . */ #define TMEM(sym, set) (CONSP (set) ? ! NILP (Fmemq (sym, set)) : ! NILP (set)) -Lisp_Object merge_properties_sticky (Lisp_Object pleft, Lisp_Object pright); +static Lisp_Object merge_properties_sticky (Lisp_Object, Lisp_Object); +static INTERVAL merge_interval_right (INTERVAL); static INTERVAL reproduce_tree (INTERVAL, INTERVAL); static INTERVAL reproduce_tree_obj (INTERVAL, Lisp_Object); @@ -1089,7 +1090,7 @@ FR 8 9 A B left rear-nonsticky = t, right front-sticky = nil (inherit none) */ -Lisp_Object +static Lisp_Object merge_properties_sticky (Lisp_Object pleft, Lisp_Object pright) { register Lisp_Object props, front, rear; @@ -1258,7 +1259,7 @@ delete_node (register INTERVAL i) I is presumed to be empty; that is, no adjustments are made for the length of I. */ -void +static void delete_interval (register INTERVAL i) { register INTERVAL parent; @@ -1446,7 +1447,7 @@ offset_intervals (struct buffer *buffer, EMACS_INT start, EMACS_INT length) The caller must verify that this is not the last (rightmost) interval. */ -INTERVAL +static INTERVAL merge_interval_right (register INTERVAL i) { register EMACS_INT absorb = LENGTH (i); diff --git a/src/intervals.h b/src/intervals.h index 3a9ee87b921..f1679eb8b40 100644 --- a/src/intervals.h +++ b/src/intervals.h @@ -266,8 +266,6 @@ extern INTERVAL find_interval (INTERVAL, EMACS_INT); extern INTERVAL next_interval (INTERVAL); extern INTERVAL previous_interval (INTERVAL); extern INTERVAL merge_interval_left (INTERVAL); -extern INTERVAL merge_interval_right (INTERVAL); -extern void delete_interval (INTERVAL); extern void offset_intervals (struct buffer *, EMACS_INT, EMACS_INT); extern void graft_intervals_into_buffer (INTERVAL, EMACS_INT, EMACS_INT, struct buffer *, int); -- cgit v1.2.1 From 8a1414fa0fa4706b59589d11f3deaf6199e9a305 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Apr 2011 18:36:53 -0700 Subject: * keyboard.c: Make symbols static if they're not exported. (single_kboard, recent_keys_index, total_keys, recent_keys): (this_command_key_count_reset, raw_keybuf, raw_keybuf_count): (this_single_command_key_start, echoing, last_auto_save): (read_key_sequence_cmd, dribble, recursive_edit_unwind): (command_loop, echo_now, keyboard_init_hook, help_char_p): (quit_throw_to_read_char, command_loop_2, top_level_1, poll_timer): (Vlispy_mouse_stem, double_click_count): Now static. (force_auto_save_soon): Define only if SIGDANGER. (ignore_mouse_drag_p): Now static if !defined HAVE_WINDOW_SYSTEM || defined USE_GTK || defined HAVE_NS. (print_help): Remove; unused. (stop_character, last_timer_event): Mark as externally visible. * keyboard.h (ignore_mouse_drag_p): Declare only if defined HAVE_WINDOW_SYSTEM && !defined USE_GTK && !defined HAVE_NS. (echo_now, help_char_p, quit_throw_to_read_char): Remove decls. * lisp.h (echoing): Remove decl. (force_auto_save_soon): Declare only if SIGDANGER. * xdisp.c (redisplay_window): Simplify code, to make it more obvious that ignore_mouse_drag_p is not accessed if !defined USE_GTK && !defined HAVE_NS. --- src/ChangeLog | 23 ++++++++++++++++++ src/keyboard.c | 77 +++++++++++++++++++++++++++++++--------------------------- src/keyboard.h | 8 ++---- src/lisp.h | 3 ++- src/xdisp.c | 17 ++++++------- 5 files changed, 75 insertions(+), 53 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 2187a6b5620..322e3665e86 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,28 @@ 2011-04-14 Paul Eggert + * keyboard.c: Make symbols static if they're not exported. + (single_kboard, recent_keys_index, total_keys, recent_keys): + (this_command_key_count_reset, raw_keybuf, raw_keybuf_count): + (this_single_command_key_start, echoing, last_auto_save): + (read_key_sequence_cmd, dribble, recursive_edit_unwind): + (command_loop, echo_now, keyboard_init_hook, help_char_p): + (quit_throw_to_read_char, command_loop_2, top_level_1, poll_timer): + (Vlispy_mouse_stem, double_click_count): + Now static. + (force_auto_save_soon): Define only if SIGDANGER. + (ignore_mouse_drag_p): Now static if + !defined HAVE_WINDOW_SYSTEM || defined USE_GTK || defined HAVE_NS. + (print_help): Remove; unused. + (stop_character, last_timer_event): Mark as externally visible. + * keyboard.h (ignore_mouse_drag_p): Declare only if + defined HAVE_WINDOW_SYSTEM && !defined USE_GTK && !defined HAVE_NS. + (echo_now, help_char_p, quit_throw_to_read_char): Remove decls. + * lisp.h (echoing): Remove decl. + (force_auto_save_soon): Declare only if SIGDANGER. + * xdisp.c (redisplay_window): Simplify code, to make it more + obvious that ignore_mouse_drag_p is not accessed if !defined + USE_GTK && !defined HAVE_NS. + * intervals.c: Make symbols static if they're not exported. (merge_properties_sticky, merge_interval_right, delete_interval): Now static. diff --git a/src/keyboard.c b/src/keyboard.c index 92a44de6dae..1e673c493b6 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -96,7 +96,9 @@ int pending_signals; KBOARD *initial_kboard; KBOARD *current_kboard; KBOARD *all_kboards; -int single_kboard; + +/* Nonzero in the single-kboard state, 0 in the any-kboard state. */ +static int single_kboard; /* Non-nil disable property on a command means do not execute it; call disabled-command-function's value instead. */ @@ -104,9 +106,15 @@ Lisp_Object Qdisabled; static Lisp_Object Qdisabled_command_function; #define NUM_RECENT_KEYS (300) -int recent_keys_index; /* Index for storing next element into recent_keys */ -int total_keys; /* Total number of elements stored into recent_keys */ -Lisp_Object recent_keys; /* Vector holds the last NUM_RECENT_KEYS keystrokes */ + +/* Index for storing next element into recent_keys. */ +static int recent_keys_index; + +/* Total number of elements stored into recent_keys. */ +static int total_keys; + +/* This vector holds the last NUM_RECENT_KEYS keystrokes. */ +static Lisp_Object recent_keys; /* Vector holding the key sequence that invoked the current command. It is reused for each command, and it may be longer than the current @@ -118,12 +126,12 @@ int this_command_key_count; /* 1 after calling Freset_this_command_lengths. Usually it is 0. */ -int this_command_key_count_reset; +static int this_command_key_count_reset; /* This vector is used as a buffer to record the events that were actually read by read_key_sequence. */ -Lisp_Object raw_keybuf; -int raw_keybuf_count; +static Lisp_Object raw_keybuf; +static int raw_keybuf_count; #define GROW_RAW_KEYBUF \ if (raw_keybuf_count == XVECTOR (raw_keybuf)->size) \ @@ -131,7 +139,7 @@ int raw_keybuf_count; /* Number of elements of this_command_keys that precede this key sequence. */ -int this_single_command_key_start; +static int this_single_command_key_start; /* Record values of this_command_key_count and echo_length () before this command was read. */ @@ -147,7 +155,7 @@ int waiting_for_input; /* True while displaying for echoing. Delays C-g throwing. */ -int echoing; +static int echoing; /* Non-null means we can start echoing at the next input pause even though there is something in the echo area. */ @@ -207,7 +215,7 @@ size_t num_input_events; /* Value of num_nonmacro_input_events as of last auto save. */ -int last_auto_save; +static int last_auto_save; /* This is like Vthis_command, except that commands never set it. */ Lisp_Object real_this_command; @@ -243,7 +251,7 @@ static Lisp_Object Qtimer_event_handler; /* read_key_sequence stores here the command definition of the key sequence that it reads. */ -Lisp_Object read_key_sequence_cmd; +static Lisp_Object read_key_sequence_cmd; static Lisp_Object Qinput_method_function; @@ -265,7 +273,7 @@ static Lisp_Object Qinput_method_use_echo_area; static Lisp_Object Qhelp_form_show; /* File in which we write all commands we read. */ -FILE *dribble; +static FILE *dribble; /* Nonzero if input is available. */ int input_pending; @@ -358,11 +366,13 @@ Lisp_Object Qvertical_line; static Lisp_Object Qvertical_scroll_bar; Lisp_Object Qmenu_bar; -Lisp_Object recursive_edit_unwind (Lisp_Object buffer), command_loop (void); +static Lisp_Object recursive_edit_unwind (Lisp_Object buffer); +static Lisp_Object command_loop (void); static Lisp_Object Qextended_command_history; EMACS_TIME timer_check (void); static void record_menu_key (Lisp_Object c); +static void echo_now (void); static int echo_length (void); static Lisp_Object Qpolling_period; @@ -418,7 +428,7 @@ static EMACS_TIME timer_last_idleness_start_time; #define READABLE_EVENTS_IGNORE_SQUEEZABLES (1 << 2) /* Function for init_keyboard to call with no args (if nonzero). */ -void (*keyboard_init_hook) (void); +static void (*keyboard_init_hook) (void); static int read_avail_input (int); static void get_input_pending (int *, int); @@ -438,6 +448,7 @@ static Lisp_Object modify_event_symbol (EMACS_INT, unsigned, Lisp_Object, Lisp_Object, const char *const *, Lisp_Object *, unsigned); static Lisp_Object make_lispy_switch_frame (Lisp_Object); +static int help_char_p (Lisp_Object); static void save_getcjmp (jmp_buf); static void restore_getcjmp (jmp_buf); static Lisp_Object apply_modifiers (int, Lisp_Object); @@ -449,6 +460,7 @@ static void input_available_signal (int signo); #endif INFUN (Fcommand_execute, 4); static void handle_interrupt (void); +static void quit_throw_to_read_char (void) NO_RETURN; static void timer_start_idle (void); static void timer_stop_idle (void); static void timer_resume_idle (void); @@ -592,7 +604,7 @@ echo_dash (void) /* Display the current echo string, and begin echoing if not already doing so. */ -void +static void echo_now (void) { if (!current_kboard->immediate_echo) @@ -759,6 +771,7 @@ record_auto_save (void) /* Make an auto save happen as soon as possible at command level. */ +#ifdef SIGDANGER void force_auto_save_soon (void) { @@ -766,6 +779,7 @@ force_auto_save_soon (void) record_asynch_buffer_change (); } +#endif DEFUE ("recursive-edit", Frecursive_edit, Srecursive_edit, 0, 0, "", doc: /* Invoke the editor command loop recursively. @@ -1088,8 +1102,8 @@ cmd_error_internal (Lisp_Object data, const char *context) } Lisp_Object command_loop_1 (void); -Lisp_Object command_loop_2 (Lisp_Object); -Lisp_Object top_level_1 (Lisp_Object); +static Lisp_Object command_loop_2 (Lisp_Object); +static Lisp_Object top_level_1 (Lisp_Object); /* Entry to editor-command-loop. This level has the catches for exiting/returning to editor command loop. @@ -1253,6 +1267,9 @@ usage: (track-mouse BODY...) */) If ignore_mouse_drag_p is non-zero, ignore (implicit) mouse movement after resizing the tool-bar window. */ +#if !defined HAVE_WINDOW_SYSTEM || defined USE_GTK || defined HAVE_NS +static +#endif int ignore_mouse_drag_p; static FRAME_PTR @@ -1910,7 +1927,7 @@ int poll_suppress_count; /* Asynchronous timer for polling. */ -struct atimer *poll_timer; +static struct atimer *poll_timer; #ifdef POLL_FOR_INPUT @@ -2177,7 +2194,6 @@ show_help_echo (Lisp_Object help, Lisp_Object window, Lisp_Object object, /* Input of single characters from keyboard */ -Lisp_Object print_help (Lisp_Object object); static Lisp_Object kbd_buffer_get_event (KBOARD **kbp, int *used_mouse_menu, struct timeval *end_time); static void record_char (Lisp_Object c); @@ -3171,7 +3187,7 @@ record_menu_key (Lisp_Object c) /* Return 1 if should recognize C as "the help character". */ -int +static int help_char_p (Lisp_Object c) { Lisp_Object tail; @@ -3320,17 +3336,6 @@ record_char (Lisp_Object c) } } -Lisp_Object -print_help (Lisp_Object object) -{ - struct buffer *old = current_buffer; - Fprinc (object, Qnil); - set_buffer_internal (XBUFFER (Vstandard_output)); - call0 (intern ("help-mode")); - set_buffer_internal (old); - return Qnil; -} - /* Copy out or in the info on where C-g should throw to. This is used when running Lisp code from within get_char, in case get_char is called recursively. @@ -3422,7 +3427,7 @@ readable_events (int flags) } /* Set this for debugging, to have a way to get out */ -int stop_character; +int stop_character EXTERNALLY_VISIBLE; static KBOARD * event_to_kboard (struct input_event *event) @@ -4218,7 +4223,7 @@ timer_resume_idle (void) } /* This is only for debugging. */ -struct input_event last_timer_event; +struct input_event last_timer_event EXTERNALLY_VISIBLE; /* List of elisp functions to call, delayed because they were generated in a context where Elisp could not be safely run (e.g. redisplay, signal, @@ -5026,7 +5031,7 @@ static const char *const iso_lispy_function_keys[] = #endif /* not HAVE_NTGUI */ -Lisp_Object Vlispy_mouse_stem; +static Lisp_Object Vlispy_mouse_stem; static const char *const lispy_wheel_names[] = { @@ -5076,7 +5081,7 @@ static unsigned long button_down_time; /* The number of clicks in this multiple-click. */ -int double_click_count; +static int double_click_count; /* X and Y are frame-relative coordinates for a click or wheel event. Return a Lisp-style event list. */ @@ -10945,7 +10950,7 @@ handle_interrupt (void) /* Handle a C-g by making read_char return C-g. */ -void +static void quit_throw_to_read_char (void) { sigfree (); diff --git a/src/keyboard.h b/src/keyboard.h index d945de5de20..1f5cbd23639 100644 --- a/src/keyboard.h +++ b/src/keyboard.h @@ -190,9 +190,6 @@ extern KBOARD *current_kboard; /* A list of all kboard objects, linked through next_kboard. */ extern KBOARD *all_kboards; - -/* Nonzero in the single-kboard state, 0 in the any-kboard state. */ -extern int single_kboard; /* Total number of times read_char has returned, modulo SIZE_MAX + 1. */ extern size_t num_input_events; @@ -429,7 +426,9 @@ extern int waiting_for_input; happens. */ extern EMACS_TIME *input_available_clear_time; +#if defined HAVE_WINDOW_SYSTEM && !defined USE_GTK && !defined HAVE_NS extern int ignore_mouse_drag_p; +#endif /* The primary selection. */ extern Lisp_Object QPRIMARY; @@ -469,7 +468,6 @@ extern int timers_run; extern int menu_separator_name_p (const char *); extern int parse_menu_item (Lisp_Object, int); -extern void echo_now (void); extern void init_kboard (KBOARD *); extern void delete_kboard (KBOARD *); extern void not_single_kboard_state (KBOARD *); @@ -491,8 +489,6 @@ extern int make_ctrl_char (int); extern void stuff_buffered_input (Lisp_Object); extern void clear_waiting_for_input (void); extern void swallow_events (int); -extern int help_char_p (Lisp_Object); -extern void quit_throw_to_read_char (void) NO_RETURN; extern int lucid_event_type_list_p (Lisp_Object); extern void kbd_buffer_store_event (struct input_event *); extern void kbd_buffer_store_event_hold (struct input_event *, diff --git a/src/lisp.h b/src/lisp.h index 447fea7e8a7..460563fe4c1 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -3093,7 +3093,6 @@ extern void syms_of_casetab (void); /* Defined in keyboard.c */ -extern int echoing; extern Lisp_Object echo_message_buffer; extern struct kboard *echo_kboard; extern void cancel_echoing (void); @@ -3120,7 +3119,9 @@ extern void cmd_error_internal (Lisp_Object, const char *); extern Lisp_Object command_loop_1 (void); extern Lisp_Object recursive_edit_1 (void); extern void record_auto_save (void); +#ifdef SIGDANGER extern void force_auto_save_soon (void); +#endif extern void init_keyboard (void); extern void syms_of_keyboard (void); extern void keys_of_keyboard (void); diff --git a/src/xdisp.c b/src/xdisp.c index 14a38d82873..17a7a34b8be 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -14429,7 +14429,6 @@ redisplay_window (Lisp_Object window, int just_this_one_p) && EQ (FRAME_SELECTED_WINDOW (f), window)) { int redisplay_menu_p = 0; - int redisplay_tool_bar_p = 0; if (FRAME_WINDOW_P (f)) { @@ -14450,17 +14449,15 @@ redisplay_window (Lisp_Object window, int just_this_one_p) if (FRAME_WINDOW_P (f)) { #if defined (USE_GTK) || defined (HAVE_NS) - redisplay_tool_bar_p = FRAME_EXTERNAL_TOOL_BAR (f); + if (FRAME_EXTERNAL_TOOL_BAR (f)) + redisplay_tool_bar (f); #else - redisplay_tool_bar_p = WINDOWP (f->tool_bar_window) - && (FRAME_TOOL_BAR_LINES (f) > 0 - || !NILP (Vauto_resize_tool_bars)); + if (WINDOWP (f->tool_bar_window) + && (FRAME_TOOL_BAR_LINES (f) > 0 + || !NILP (Vauto_resize_tool_bars)) + && redisplay_tool_bar (f)) + ignore_mouse_drag_p = 1; #endif - - if (redisplay_tool_bar_p && redisplay_tool_bar (f)) - { - ignore_mouse_drag_p = 1; - } } #endif } -- cgit v1.2.1 From 1e3890d19599e8c4736e74a11f95b70b6f11f72b Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Apr 2011 18:41:38 -0700 Subject: * lread.c: Make symbols static if they're not exported. (read_objects, initial_obarray, oblookup_last_bucket_number): Now static. (make_symbol): Remove; unused. * lisp.h (initial_obarray, make_symbol): Remove decls. --- src/ChangeLog | 6 ++++++ src/lisp.h | 2 -- src/lread.c | 18 +++--------------- 3 files changed, 9 insertions(+), 17 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 322e3665e86..77c32b6a206 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,11 @@ 2011-04-14 Paul Eggert + * lread.c: Make symbols static if they're not exported. + (read_objects, initial_obarray, oblookup_last_bucket_number): + Now static. + (make_symbol): Remove; unused. + * lisp.h (initial_obarray, make_symbol): Remove decls. + * keyboard.c: Make symbols static if they're not exported. (single_kboard, recent_keys_index, total_keys, recent_keys): (this_command_key_count_reset, raw_keybuf, raw_keybuf_count): diff --git a/src/lisp.h b/src/lisp.h index 460563fe4c1..0a787c54eb1 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2770,7 +2770,6 @@ extern void syms_of_print (void); /* Defined in lread.c. */ extern Lisp_Object Qvariable_documentation, Qstandard_input; extern Lisp_Object Qbackquote, Qcomma, Qcomma_at, Qcomma_dot, Qfunction; -extern Lisp_Object initial_obarray; EXFUN (Fread, 1); EXFUN (Fread_from_string, 3); EXFUN (Fintern, 2); @@ -2783,7 +2782,6 @@ EXFUN (Fread_event, 3); extern Lisp_Object check_obarray (Lisp_Object); extern Lisp_Object intern (const char *); extern Lisp_Object intern_c_string (const char *); -extern Lisp_Object make_symbol (const char *); extern Lisp_Object oblookup (Lisp_Object, const char *, EMACS_INT, EMACS_INT); #define LOADHIST_ATTACH(x) \ do { \ diff --git a/src/lread.c b/src/lread.c index 2d383350ec1..fdb477c0218 100644 --- a/src/lread.c +++ b/src/lread.c @@ -91,7 +91,7 @@ static Lisp_Object Qload_in_progress; Each member of the list has the form (n . object), and is used to look up the object for the corresponding #n# construct. It must be set to nil before all top-level calls to read0. */ -Lisp_Object read_objects; +static Lisp_Object read_objects; /* Nonzero means READCHAR should read bytes one by one (not character) when READCHARFUN is Qget_file_char or Qget_emacs_mule_file_char. @@ -3578,11 +3578,11 @@ read_list (int flag, register Lisp_Object readcharfun) } } -Lisp_Object initial_obarray; +static Lisp_Object initial_obarray; /* oblookup stores the bucket number here, for the sake of Funintern. */ -int oblookup_last_bucket_number; +static int oblookup_last_bucket_number; static int hash_string (const char *ptr, int len); @@ -3642,18 +3642,6 @@ intern_c_string (const char *str) return Fintern (make_pure_c_string (str), obarray); } - -/* Create an uninterned symbol with name STR. */ - -Lisp_Object -make_symbol (const char *str) -{ - int len = strlen (str); - - return Fmake_symbol (!NILP (Vpurify_flag) - ? make_pure_string (str, len, len, 0) - : make_string (str, len)); -} DEFUE ("intern", Fintern, Sintern, 1, 2, 0, doc: /* Return the canonical symbol whose name is STRING. -- cgit v1.2.1 From fa5fb2bc3565eee70d989b24537080fbb1929006 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Apr 2011 18:45:28 -0700 Subject: * lisp.h (verify_bytepos, count_markers): Mark as externally visible. --- src/ChangeLog | 2 ++ src/lisp.h | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 77c32b6a206..cc73d0b4a49 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-04-14 Paul Eggert + * lisp.h (verify_bytepos, count_markers): Mark as externally visible. + * lread.c: Make symbols static if they're not exported. (read_objects, initial_obarray, oblookup_last_bucket_number): Now static. diff --git a/src/lisp.h b/src/lisp.h index 0a787c54eb1..e9987efefe2 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2970,14 +2970,14 @@ extern EMACS_INT marker_byte_position (Lisp_Object); extern void clear_charpos_cache (struct buffer *); extern EMACS_INT charpos_to_bytepos (EMACS_INT); extern EMACS_INT buf_charpos_to_bytepos (struct buffer *, EMACS_INT); -extern EMACS_INT verify_bytepos (EMACS_INT charpos); +extern EMACS_INT verify_bytepos (EMACS_INT charpos) EXTERNALLY_VISIBLE; extern EMACS_INT buf_bytepos_to_charpos (struct buffer *, EMACS_INT); extern void unchain_marker (struct Lisp_Marker *marker); extern Lisp_Object set_marker_restricted (Lisp_Object, Lisp_Object, Lisp_Object); extern Lisp_Object set_marker_both (Lisp_Object, Lisp_Object, EMACS_INT, EMACS_INT); extern Lisp_Object set_marker_restricted_both (Lisp_Object, Lisp_Object, EMACS_INT, EMACS_INT); -extern int count_markers (struct buffer *); +extern int count_markers (struct buffer *) EXTERNALLY_VISIBLE; extern void syms_of_marker (void); /* Defined in fileio.c */ -- cgit v1.2.1 From 1717ede2bb852dc687a07a27d3362619ba5085e9 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Apr 2011 18:51:24 -0700 Subject: * minibuf.c: Make symbols static if they're not exported. (minibuf_save_list, choose_minibuf_frame): Now static. * lisp.h (choose_minibuf_frame): Remove decl. --- src/ChangeLog | 4 ++++ src/lisp.h | 1 - src/minibuf.c | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index cc73d0b4a49..685a30d21d7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2011-04-14 Paul Eggert + * minibuf.c: Make symbols static if they're not exported. + (minibuf_save_list, choose_minibuf_frame): Now static. + * lisp.h (choose_minibuf_frame): Remove decl. + * lisp.h (verify_bytepos, count_markers): Mark as externally visible. * lread.c: Make symbols static if they're not exported. diff --git a/src/lisp.h b/src/lisp.h index e9987efefe2..288f08e37ce 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -3050,7 +3050,6 @@ extern void clear_regexp_cache (void); extern Lisp_Object Qcompletion_ignore_case; extern Lisp_Object Vminibuffer_list; extern Lisp_Object last_minibuf_string; -extern void choose_minibuf_frame (void); EXFUN (Fcompleting_read, 8); EXFUN (Fread_from_minibuffer, 7); EXFUN (Fread_variable, 2); diff --git a/src/minibuf.c b/src/minibuf.c index ae4372746bc..3bcb0fca61c 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -45,7 +45,7 @@ Lisp_Object Vminibuffer_list; /* Data to remember during recursive minibuffer invocations */ -Lisp_Object minibuf_save_list; +static Lisp_Object minibuf_save_list; /* Depth in minibuffer invocations. */ @@ -97,7 +97,7 @@ static EMACS_INT minibuf_prompt_width; We do this whenever the user starts a new minibuffer or when a minibuffer exits. */ -void +static void choose_minibuf_frame (void) { if (FRAMEP (selected_frame) -- cgit v1.2.1 From adddb2655cb09a2fb2ef54942692376ff85e969d Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Apr 2011 18:57:17 -0700 Subject: * sysdep.c (croak): Move decl from here to syssignal.h. * syssignal.h (croak): Put it here, so the API can be checked when 'croak' is called from dissociate_if_controlling_tty. --- src/ChangeLog | 4 ++++ src/sysdep.c | 2 -- src/syssignal.h | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 685a30d21d7..37225e11f76 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2011-04-14 Paul Eggert + * sysdep.c (croak): Move decl from here to syssignal.h. + * syssignal.h (croak): Put it here, so the API can be checked when + 'croak' is called from dissociate_if_controlling_tty. + * minibuf.c: Make symbols static if they're not exported. (minibuf_save_list, choose_minibuf_frame): Now static. * lisp.h (choose_minibuf_frame): Remove decl. diff --git a/src/sysdep.c b/src/sysdep.c index f4f767dac3f..f9e8ee746c9 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -127,8 +127,6 @@ static const int baud_convert[] = 1800, 2400, 4800, 9600, 19200, 38400 }; -void croak (char *) NO_RETURN; - /* Temporary used by `sigblock' when defined in terms of signprocmask. */ SIGMASKTYPE sigprocmask_set; diff --git a/src/syssignal.h b/src/syssignal.h index 03768168e20..083d70d6c13 100644 --- a/src/syssignal.h +++ b/src/syssignal.h @@ -75,6 +75,7 @@ signal_handler_t sys_signal (int signal_number, signal_handler_t action); sigset_t sys_sigblock (sigset_t new_mask); sigset_t sys_sigunblock (sigset_t new_mask); sigset_t sys_sigsetmask (sigset_t new_mask); +void croak (char *) NO_RETURN; #define sys_sigdel(MASK,SIG) sigdelset (&MASK,SIG) -- cgit v1.2.1 From ad64fc978bc5a83e25827ab4f55d4cbc8d0dd25a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Apr 2011 19:04:54 -0700 Subject: * print.c: Make symbols static if they're not exported. (print_depth, new_backquote_output, being_printed, print_buffer): (print_buffer_size, print_buffer_pos, print_buffer_pos_byte): (print_interval, print_number_index, initial_stderr_stream): Now static. * lisp.h (Fprinc): Remove decl. (debug_output_compilation_hack): Mark as externally visible. --- src/ChangeLog | 8 ++++++++ src/lisp.h | 3 +-- src/print.c | 22 +++++++++++----------- 3 files changed, 20 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 37225e11f76..78d3f0dacd2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,13 @@ 2011-04-14 Paul Eggert + * print.c: Make symbols static if they're not exported. + (print_depth, new_backquote_output, being_printed, print_buffer): + (print_buffer_size, print_buffer_pos, print_buffer_pos_byte): + (print_interval, print_number_index, initial_stderr_stream): + Now static. + * lisp.h (Fprinc): Remove decl. + (debug_output_compilation_hack): Mark as externally visible. + * sysdep.c (croak): Move decl from here to syssignal.h. * syssignal.h (croak): Put it here, so the API can be checked when 'croak' is called from dissociate_if_controlling_tty. diff --git a/src/lisp.h b/src/lisp.h index 288f08e37ce..718f590b55a 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2748,13 +2748,12 @@ extern void debug_print (Lisp_Object) EXTERNALLY_VISIBLE; extern void safe_debug_print (Lisp_Object) EXTERNALLY_VISIBLE; EXFUN (Fprin1, 2); EXFUN (Fprin1_to_string, 2); -EXFUN (Fprinc, 2); EXFUN (Fterpri, 1); EXFUN (Fprint, 2); EXFUN (Ferror_message_string, 1); extern Lisp_Object Qstandard_output; extern Lisp_Object Qexternal_debugging_output; -extern void debug_output_compilation_hack (int); +extern void debug_output_compilation_hack (int) EXTERNALLY_VISIBLE; extern void temp_output_buffer_setup (const char *); extern int print_level; extern Lisp_Object Qprint_escape_newlines; diff --git a/src/print.c b/src/print.c index 82040555921..8bc8f98ccee 100644 --- a/src/print.c +++ b/src/print.c @@ -58,25 +58,25 @@ static Lisp_Object Qfloat_output_format; #endif /* Avoid actual stack overflow in print. */ -int print_depth; +static int print_depth; /* Level of nesting inside outputting backquote in new style. */ -int new_backquote_output; +static int new_backquote_output; /* Detect most circularities to print finite output. */ #define PRINT_CIRCLE 200 -Lisp_Object being_printed[PRINT_CIRCLE]; +static Lisp_Object being_printed[PRINT_CIRCLE]; /* When printing into a buffer, first we put the text in this block, then insert it all at once. */ -char *print_buffer; +static char *print_buffer; /* Size allocated in print_buffer. */ -EMACS_INT print_buffer_size; +static EMACS_INT print_buffer_size; /* Chars stored in print_buffer. */ -EMACS_INT print_buffer_pos; +static EMACS_INT print_buffer_pos; /* Bytes stored in print_buffer. */ -EMACS_INT print_buffer_pos_byte; +static EMACS_INT print_buffer_pos_byte; Lisp_Object Qprint_escape_newlines; static Lisp_Object Qprint_escape_multibyte, Qprint_escape_nonascii; @@ -89,8 +89,8 @@ static Lisp_Object Qprint_escape_multibyte, Qprint_escape_nonascii; N the object has been printed so we can refer to it as #N#. print_number_index holds the largest N already used. N has to be striclty larger than 0 since we need to distinguish -N. */ -int print_number_index; -void print_interval (INTERVAL interval, Lisp_Object printcharfun); +static int print_number_index; +static void print_interval (INTERVAL interval, Lisp_Object printcharfun); /* GDB resets this to zero on W32 to disable OutputDebugString calls. */ int print_output_debug_flag EXTERNALLY_VISIBLE = 1; @@ -636,7 +636,7 @@ A printed representation of an object is text which describes that object. */) return unbind_to (count, object); } -DEFUE ("princ", Fprinc, Sprinc, 1, 2, 0, +DEFUN ("princ", Fprinc, Sprinc, 1, 2, 0, doc: /* Output the printed representation of OBJECT, any Lisp object. No quoting characters are used; no delimiters are printed around the contents of strings. @@ -751,7 +751,7 @@ debug_output_compilation_hack (int x) #define WITH_REDIRECT_DEBUGGING_OUTPUT 1 -FILE *initial_stderr_stream = NULL; +static FILE *initial_stderr_stream = NULL; DEFUN ("redirect-debugging-output", Fredirect_debugging_output, Sredirect_debugging_output, 1, 2, -- cgit v1.2.1 From 40ccffa6ff0f62689cac373e3d21d25084c1b7b3 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Apr 2011 19:16:00 -0700 Subject: * process.c: Make symbols static if they're not exported. (process_tick, update_tick, create_process, chan_process): (Vprocess_alist, proc_buffered_char, datagram_access): (fd_callback_data, send_process_frame, process_sent_to): Now static. (deactivate_process): Mark defn as static, as well as decl. * lisp.h (create_process): Remove decl. * process.h (chan_process, Vprocess_alist): Remove decls. --- src/ChangeLog | 8 ++++++++ src/lisp.h | 1 - src/process.c | 26 ++++++++++++-------------- src/process.h | 6 ------ 4 files changed, 20 insertions(+), 21 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 78d3f0dacd2..aee24f4a2ed 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,13 @@ 2011-04-14 Paul Eggert + * process.c: Make symbols static if they're not exported. + (process_tick, update_tick, create_process, chan_process): + (Vprocess_alist, proc_buffered_char, datagram_access): + (fd_callback_data, send_process_frame, process_sent_to): Now static. + (deactivate_process): Mark defn as static, as well as decl. + * lisp.h (create_process): Remove decl. + * process.h (chan_process, Vprocess_alist): Remove decls. + * print.c: Make symbols static if they're not exported. (print_depth, new_backquote_output, being_printed, print_buffer): (print_buffer_size, print_buffer_pos, print_buffer_pos_byte): diff --git a/src/lisp.h b/src/lisp.h index 718f590b55a..508f0b3a40b 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -3320,7 +3320,6 @@ extern void flush_pending_output (int); extern void child_setup_tty (int); extern void setup_pty (int); extern int set_window_size (int, int, int); -extern void create_process (Lisp_Object, char **, Lisp_Object); extern long get_random (void); extern void seed_random (long); extern int emacs_open (const char *, int, int); diff --git a/src/process.c b/src/process.c index 51546e7c78a..7efbab11190 100644 --- a/src/process.c +++ b/src/process.c @@ -165,12 +165,10 @@ extern Lisp_Object QCfilter; extern int h_errno; #endif -/* These next two vars are non-static since sysdep.c uses them in the - emulation of `select'. */ /* Number of events of change of status of a process. */ -int process_tick; +static int process_tick; /* Number of events for which the user or sentinel has been notified. */ -int update_tick; +static int update_tick; /* Define NON_BLOCKING_CONNECT if we can support non-blocking connects. */ @@ -238,6 +236,7 @@ static int process_output_skip; #endif INFUN (Fget_process, 1); +static void create_process (Lisp_Object, char **, Lisp_Object); static int keyboard_bit_set (SELECT_TYPE *); static void deactivate_process (Lisp_Object); static void status_notify (struct Lisp_Process *); @@ -287,10 +286,10 @@ static int max_process_desc; static int max_input_desc; /* Indexed by descriptor, gives the process (if any) for that descriptor */ -Lisp_Object chan_process[MAXDESC]; +static Lisp_Object chan_process[MAXDESC]; /* Alist of elements (NAME . PROCESS) */ -Lisp_Object Vprocess_alist; +static Lisp_Object Vprocess_alist; /* Buffered-ahead input char from process, indexed by channel. -1 means empty (no char is buffered). @@ -298,8 +297,7 @@ Lisp_Object Vprocess_alist; output from the process is to read at least one char. Always -1 on systems that support FIONREAD. */ -/* Don't make static; need to access externally. */ -int proc_buffered_char[MAXDESC]; +static int proc_buffered_char[MAXDESC]; /* Table of `struct coding-system' for each process. */ static struct coding_system *proc_decode_coding_system[MAXDESC]; @@ -307,7 +305,7 @@ static struct coding_system *proc_encode_coding_system[MAXDESC]; #ifdef DATAGRAM_SOCKETS /* Table of `partner address' for datagram sockets. */ -struct sockaddr_and_len { +static struct sockaddr_and_len { struct sockaddr *sa; int len; } datagram_address[MAXDESC]; @@ -323,7 +321,7 @@ static int pty_max_bytes; -struct fd_callback_data +static struct fd_callback_data { fd_callback func; void *data; @@ -1521,7 +1519,7 @@ create_process_1 (struct atimer *timer) } -void +static void create_process (Lisp_Object process, char **new_argv, Lisp_Object current_dir) { int inchannel, outchannel; @@ -3793,7 +3791,7 @@ FLAGS is the current flags of the interface. */) /* Turn off input and output for process PROC. */ -void +static void deactivate_process (Lisp_Object proc) { register int inchannel, outchannel; @@ -5219,8 +5217,8 @@ read_process_output (Lisp_Object proc, register int channel) /* Sending data to subprocess */ -jmp_buf send_process_frame; -Lisp_Object process_sent_to; +static jmp_buf send_process_frame; +static Lisp_Object process_sent_to; static void send_process_trap (int ignore) diff --git a/src/process.h b/src/process.h index 1e90f553b38..0348f211bb9 100644 --- a/src/process.h +++ b/src/process.h @@ -143,12 +143,6 @@ struct Lisp_Process #define ChannelMask(n) (1<<(n)) -/* Indexed by descriptor, gives the process (if any) for that descriptor. */ -extern Lisp_Object chan_process[]; - -/* Alist of elements (NAME . PROCESS). */ -extern Lisp_Object Vprocess_alist; - /* True if we are about to fork off a synchronous process or if we are waiting for it. */ extern int synch_process_alive; -- cgit v1.2.1 From de68a1fc344a72af93c8fca8592e9cefa0de59c7 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Apr 2011 19:17:19 -0700 Subject: * region-cache.h (pp_cache): Mark as externally visible. --- src/ChangeLog | 2 ++ src/region-cache.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index aee24f4a2ed..404b00afc23 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-04-14 Paul Eggert + * region-cache.h (pp_cache): Mark as externally visible. + * process.c: Make symbols static if they're not exported. (process_tick, update_tick, create_process, chan_process): (Vprocess_alist, proc_buffered_char, datagram_access): diff --git a/src/region-cache.h b/src/region-cache.h index 8e4336c2885..255b517f17a 100644 --- a/src/region-cache.h +++ b/src/region-cache.h @@ -112,4 +112,4 @@ extern int region_cache_backward (struct buffer *BUF, EMACS_INT *NEXT); /* For debugging. */ -void pp_cache (struct region_cache *); +void pp_cache (struct region_cache *) EXTERNALLY_VISIBLE; -- cgit v1.2.1 From 13a55a78d4564f84510ae160f9d19efb40236220 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Apr 2011 19:20:00 -0700 Subject: * scroll.c (scroll_cost): Remove; unused. * dispextern.h (scroll_cost): Remove decl. --- src/ChangeLog | 3 +++ src/dispextern.h | 1 - src/scroll.c | 38 -------------------------------------- 3 files changed, 3 insertions(+), 39 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 404b00afc23..0c811188e07 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-04-14 Paul Eggert + * scroll.c (scroll_cost): Remove; unused. + * dispextern.h (scroll_cost): Remove decl. + * region-cache.h (pp_cache): Mark as externally visible. * process.c: Make symbols static if they're not exported. diff --git a/src/dispextern.h b/src/dispextern.h index 438db97c6a5..a94e0620eae 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -3303,7 +3303,6 @@ extern struct terminal *init_tty (const char *, const char *, int); /* Defined in scroll.c */ extern int scrolling_max_lines_saved (int, int, int *, int *, int *); -extern int scroll_cost (struct frame *, int, int, int); extern void do_line_insertion_deletion_costs (struct frame *, const char *, const char *, const char *, const char *, const char *, diff --git a/src/scroll.c b/src/scroll.c index fcec596daa3..ba012874460 100644 --- a/src/scroll.c +++ b/src/scroll.c @@ -882,44 +882,6 @@ scrolling_max_lines_saved (int start, int end, return matchcount; } -/* Return a measure of the cost of moving the lines starting with vpos - FROM, up to but not including vpos TO, down by AMOUNT lines (AMOUNT - may be negative). */ - -int -scroll_cost (FRAME_PTR frame, int from, int to, int amount) -{ - /* Compute how many lines, at bottom of frame, - will not be involved in actual motion. */ - EMACS_INT limit = to; - EMACS_INT offset; - EMACS_INT height = FRAME_LINES (frame); - - if (amount == 0) - return 0; - - if (! FRAME_SCROLL_REGION_OK (frame)) - limit = height; - else if (amount > 0) - limit += amount; - - if (amount < 0) - { - int temp = to; - to = from + amount; - from = temp + amount; - amount = - amount; - } - - offset = height - limit; - - return - (FRAME_INSERT_COST (frame)[offset + from] - + (amount - 1) * FRAME_INSERTN_COST (frame)[offset + from] - + FRAME_DELETE_COST (frame)[offset + to] - + (amount - 1) * FRAME_DELETEN_COST (frame)[offset + to]); -} - /* Calculate the line insertion/deletion overhead and multiply factor values */ -- cgit v1.2.1 From 989b29ad2242850e8256c7509c9551742ddeab45 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Apr 2011 19:21:33 -0700 Subject: * search.c (searchbufs, searchbuf_head): Now static. --- src/ChangeLog | 2 ++ src/search.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 0c811188e07..9e37c661c46 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-04-14 Paul Eggert + * search.c (searchbufs, searchbuf_head): Now static. + * scroll.c (scroll_cost): Remove; unused. * dispextern.h (scroll_cost): Remove decl. diff --git a/src/search.c b/src/search.c index ea10e47f556..c522de90e05 100644 --- a/src/search.c +++ b/src/search.c @@ -53,10 +53,10 @@ struct regexp_cache }; /* The instances of that struct. */ -struct regexp_cache searchbufs[REGEXP_CACHE_SIZE]; +static struct regexp_cache searchbufs[REGEXP_CACHE_SIZE]; /* The head of the linked list; points to the most recently used buffer. */ -struct regexp_cache *searchbuf_head; +static struct regexp_cache *searchbuf_head; /* Every call to re_match, etc., must pass &search_regs as the regs -- cgit v1.2.1 From b7c513d0049fc726e8c2bdba84f601eac0801512 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Apr 2011 19:23:09 -0700 Subject: * sound.c (current_sound_device, current_sound): Now static. --- src/ChangeLog | 2 ++ src/sound.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 9e37c661c46..3762f04b4a4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-04-14 Paul Eggert + * sound.c (current_sound_device, current_sound): Now static. + * search.c (searchbufs, searchbuf_head): Now static. * scroll.c (scroll_cost): Remove; unused. diff --git a/src/sound.c b/src/sound.c index 4478a067c09..e121b5e37f3 100644 --- a/src/sound.c +++ b/src/sound.c @@ -281,8 +281,8 @@ struct sound /* These are set during `play-sound-internal' so that sound_cleanup has access to them. */ -struct sound_device *current_sound_device; -struct sound *current_sound; +static struct sound_device *current_sound_device; +static struct sound *current_sound; /* Function prototypes. */ -- cgit v1.2.1 From d4b43b229a8b7c104c928521001dd48bd339953c Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Apr 2011 19:27:17 -0700 Subject: * syntax.c (syntax_temp): Define only if !__GNUC__. --- src/ChangeLog | 2 ++ src/syntax.c | 2 ++ 2 files changed, 4 insertions(+) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 3762f04b4a4..b54fdf8053a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-04-14 Paul Eggert + * syntax.c (syntax_temp): Define only if !__GNUC__. + * sound.c (current_sound_device, current_sound): Now static. * search.c (searchbufs, searchbuf_head): Now static. diff --git a/src/syntax.c b/src/syntax.c index 96d50f9a4e3..518ba3bba15 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -98,10 +98,12 @@ along with GNU Emacs. If not, see . */ static Lisp_Object Qsyntax_table_p; static Lisp_Object Qsyntax_table, Qscan_error; +#ifndef __GNUC__ /* Used as a temporary in SYNTAX_ENTRY and other macros in syntax.h, if not compiled with GCC. No need to mark it, since it is used only very temporarily. */ Lisp_Object syntax_temp; +#endif /* This is the internal form of the parse state used in parse-partial-sexp. */ -- cgit v1.2.1 From 1fa530214b68560d962c10c786a562f11a479444 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Apr 2011 19:38:06 -0700 Subject: * sysdep.c: Make symbols static if they're not exported. (emacs_get_tty, emacs_set_tty, old_fcntl_flags, old_fcntl_owner): Now static. (sigprocmask_set, full_mask): Remove; unused. (wait_debugging): Mark as visible. * syssignal.h (SIGFULLMASK, full_mask): Remove decls. * systty.h (emacs_get_tty, emacs_set_tty): Remove decls. --- src/ChangeLog | 8 ++++++++ src/sysdep.c | 19 +++++++++---------- src/syssignal.h | 3 +-- src/systty.h | 3 --- 4 files changed, 18 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index b54fdf8053a..1f8bae9cceb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,13 @@ 2011-04-14 Paul Eggert + * sysdep.c: Make symbols static if they're not exported. + (emacs_get_tty, emacs_set_tty, old_fcntl_flags, old_fcntl_owner): + Now static. + (sigprocmask_set, full_mask): Remove; unused. + (wait_debugging): Mark as visible. + * syssignal.h (SIGFULLMASK, full_mask): Remove decls. + * systty.h (emacs_get_tty, emacs_set_tty): Remove decls. + * syntax.c (syntax_temp): Define only if !__GNUC__. * sound.c (current_sound_device, current_sound): Now static. diff --git a/src/sysdep.c b/src/sysdep.c index f9e8ee746c9..a9ad4b4dea3 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -118,6 +118,9 @@ struct utimbuf { #endif #endif +static int emacs_get_tty (int, struct emacs_tty *); +static int emacs_set_tty (int, struct emacs_tty *, int); + /* Declare here, including term.h is problematic on some systems. */ extern void tputs (const char *, int, int (*)(int)); @@ -127,10 +130,6 @@ static const int baud_convert[] = 1800, 2400, 4800, 9600, 19200, 38400 }; -/* Temporary used by `sigblock' when defined in terms of signprocmask. */ - -SIGMASKTYPE sigprocmask_set; - #if !defined (HAVE_GET_CURRENT_DIR_NAME) || defined (BROKEN_GET_CURRENT_DIR_NAME) @@ -289,8 +288,9 @@ init_baud_rate (int fd) -int wait_debugging; /* Set nonzero to make following function work under dbx - (at least for bsd). */ +/* Set nonzero to make following function work under dbx + (at least for bsd). */ +int wait_debugging EXTERNALLY_VISIBLE; #ifndef MSDOS /* Wait for subprocess with process id `pid' to terminate and @@ -648,7 +648,7 @@ unrequest_sigio (void) #else #ifdef F_SETFL -int old_fcntl_flags[MAXDESC]; +static int old_fcntl_flags[MAXDESC]; void init_sigio (int fd) @@ -807,7 +807,7 @@ emacs_set_tty (int fd, struct emacs_tty *settings, int flushp) #ifdef F_SETOWN -int old_fcntl_owner[MAXDESC]; +static int old_fcntl_owner[MAXDESC]; #endif /* F_SETOWN */ /* This may also be defined in stdio, @@ -1449,7 +1449,7 @@ init_system_name (void) /* POSIX signals support - DJB */ /* Anyone with POSIX signals should have ANSI C declarations */ -sigset_t empty_mask, full_mask; +sigset_t empty_mask; #ifndef WINDOWSNT @@ -1538,7 +1538,6 @@ void init_signals (void) { sigemptyset (&empty_mask); - sigfillset (&full_mask); #if !defined HAVE_STRSIGNAL && !HAVE_DECL_SYS_SIGLIST if (! initialized) diff --git a/src/syssignal.h b/src/syssignal.h index 083d70d6c13..a2329fd0fdb 100644 --- a/src/syssignal.h +++ b/src/syssignal.h @@ -35,8 +35,7 @@ extern void init_signals (void); #define SIGMASKTYPE sigset_t #define SIGEMPTYMASK (empty_mask) -#define SIGFULLMASK (full_mask) -extern sigset_t empty_mask, full_mask; +extern sigset_t empty_mask; /* POSIX pretty much destroys any possibility of writing sigmask as a macro in standard C. We always define our own version because the diff --git a/src/systty.h b/src/systty.h index 1548952e7a8..647cfa23cee 100644 --- a/src/systty.h +++ b/src/systty.h @@ -115,9 +115,6 @@ struct emacs_tty { #endif /* DOS_NT */ }; -extern int emacs_get_tty (int, struct emacs_tty *); -extern int emacs_set_tty (int, struct emacs_tty *, int); - /* From sysdep.c or w32.c */ extern int serial_open (char *); extern void serial_configure (struct Lisp_Process *, Lisp_Object); -- cgit v1.2.1 From 64520e5cf9ad7cba4f23288bffeec1aa2fff6c49 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Apr 2011 19:52:33 -0700 Subject: * term.c: Make symbols static if they're not exported. (tty_turn_off_highlight, get_tty_terminal, max_frame_cols): (max_frame_lines, tty_set_terminal_modes): (tty_reset_terminal_modes, tty_turn_off_highlight): (get_tty_terminal): Now static. (term_mouse_moveto): Do not define if HAVE_WINDOW_SYSTEM. * termhooks.h (term_mouse_moveto): Do not declare if HAVE_WINDOW_SYSTEMM. * dispextern.h (tty_set_terminal_modes, tty_reset_terminal_modes): (tty_turn_off_highlight, get_tty_terminal): Remove decls. --- src/ChangeLog | 11 +++++++++++ src/dispextern.h | 4 ---- src/term.c | 17 +++++++++++------ src/termhooks.h | 3 ++- 4 files changed, 24 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 1f8bae9cceb..3a649e0410b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,16 @@ 2011-04-14 Paul Eggert + * term.c: Make symbols static if they're not exported. + (tty_turn_off_highlight, get_tty_terminal, max_frame_cols): + (max_frame_lines, tty_set_terminal_modes): + (tty_reset_terminal_modes, tty_turn_off_highlight): + (get_tty_terminal): Now static. + (term_mouse_moveto): Do not define if HAVE_WINDOW_SYSTEM. + * termhooks.h (term_mouse_moveto): Do not declare if + HAVE_WINDOW_SYSTEMM. + * dispextern.h (tty_set_terminal_modes, tty_reset_terminal_modes): + (tty_turn_off_highlight, get_tty_terminal): Remove decls. + * sysdep.c: Make symbols static if they're not exported. (emacs_get_tty, emacs_set_tty, old_fcntl_flags, old_fcntl_owner): Now static. diff --git a/src/dispextern.h b/src/dispextern.h index a94e0620eae..267f2d22335 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -3282,10 +3282,7 @@ extern struct terminal *init_initial_terminal (void); /* Defined in term.c */ -extern void tty_set_terminal_modes (struct terminal *); -extern void tty_reset_terminal_modes (struct terminal *); extern void tty_turn_off_insert (struct tty_display_info *); -extern void tty_turn_off_highlight (struct tty_display_info *); extern int string_cost (const char *); extern int per_line_cost (const char *); extern void calculate_costs (struct frame *); @@ -3293,7 +3290,6 @@ extern void produce_glyphs (struct it *); extern void produce_special_glyphs (struct it *, enum display_element_type); extern int tty_capable_p (struct tty_display_info *, unsigned, unsigned long, unsigned long); extern void set_tty_color_mode (struct tty_display_info *, struct frame *); -extern struct terminal *get_tty_terminal (Lisp_Object, int); extern struct terminal *get_named_tty (const char *); EXFUN (Ftty_type, 1); extern void create_tty_output (struct frame *); diff --git a/src/term.c b/src/term.c index 3547b9a2ddd..f70dd227878 100644 --- a/src/term.c +++ b/src/term.c @@ -77,9 +77,11 @@ static int been_here = -1; static void tty_set_scroll_region (struct frame *f, int start, int stop); static void turn_on_face (struct frame *, int face_id); static void turn_off_face (struct frame *, int face_id); +static void tty_turn_off_highlight (struct tty_display_info *); static void tty_show_cursor (struct tty_display_info *); static void tty_hide_cursor (struct tty_display_info *); static void tty_background_highlight (struct tty_display_info *tty); +static struct terminal *get_tty_terminal (Lisp_Object, int); static void clear_tty_hooks (struct terminal *terminal); static void set_tty_hooks (struct terminal *terminal); static void dissociate_if_controlling_tty (int fd); @@ -133,11 +135,11 @@ enum no_color_bit /* The largest frame width in any call to calculate_costs. */ -int max_frame_cols; +static int max_frame_cols; /* The largest frame height in any call to calculate_costs. */ -int max_frame_lines; +static int max_frame_lines; /* Non-zero if we have dropped our controlling tty and therefore should not open a frame on stdout. */ @@ -173,7 +175,7 @@ tty_ring_bell (struct frame *f) /* Set up termcap modes for Emacs. */ -void +static void tty_set_terminal_modes (struct terminal *terminal) { struct tty_display_info *tty = terminal->display_info.tty; @@ -201,7 +203,7 @@ tty_set_terminal_modes (struct terminal *terminal) /* Reset termcap modes before exiting Emacs. */ -void +static void tty_reset_terminal_modes (struct terminal *terminal) { struct tty_display_info *tty = terminal->display_info.tty; @@ -286,7 +288,7 @@ tty_turn_off_insert (struct tty_display_info *tty) /* Handle highlighting. */ -void +static void tty_turn_off_highlight (struct tty_display_info *tty) { if (tty->standout_mode) @@ -2368,7 +2370,7 @@ set_tty_color_mode (struct tty_display_info *tty, struct frame *f) /* Return the tty display object specified by TERMINAL. */ -struct terminal * +static struct terminal * get_tty_terminal (Lisp_Object terminal, int throw) { struct terminal *t = get_terminal (terminal, throw); @@ -2614,6 +2616,8 @@ frame's terminal). */) ***********************************************************************/ #ifdef HAVE_GPM + +#ifndef HAVE_WINDOW_SYSTEM void term_mouse_moveto (int x, int y) { @@ -2627,6 +2631,7 @@ term_mouse_moveto (int x, int y) last_mouse_x = x; last_mouse_y = y; */ } +#endif /* HAVE_WINDOW_SYSTEM */ /* Implementation of draw_row_with_mouse_face for TTY/GPM. */ void diff --git a/src/termhooks.h b/src/termhooks.h index 0ccd2dac9e1..2f509009bd9 100644 --- a/src/termhooks.h +++ b/src/termhooks.h @@ -306,7 +306,9 @@ enum { #ifdef HAVE_GPM #include extern int handle_one_term_event (struct tty_display_info *, Gpm_Event *, struct input_event *); +#ifndef HAVE_WINDOW_SYSTEM extern void term_mouse_moveto (int, int); +#endif /* The device for which we have enabled gpm support. */ extern struct tty_display_info *gpm_tty; @@ -660,4 +662,3 @@ extern unsigned char *encode_terminal_code (struct glyph *, int, #ifdef HAVE_GPM extern void close_gpm (int gpm_fd); #endif - -- cgit v1.2.1 From 50436f3383af8a123437e9bece3a584597a227f2 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Apr 2011 19:53:50 -0700 Subject: * textprop.c (interval_insert_behind_hooks): Now static. (interval_insert_in_front_hooks): Likewise. --- src/ChangeLog | 3 +++ src/textprop.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 3a649e0410b..7d5ae728f79 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-04-14 Paul Eggert + * textprop.c (interval_insert_behind_hooks): Now static. + (interval_insert_in_front_hooks): Likewise. + * term.c: Make symbols static if they're not exported. (tty_turn_off_highlight, get_tty_terminal, max_frame_cols): (max_frame_lines, tty_set_terminal_modes): diff --git a/src/textprop.c b/src/textprop.c index b3bb064e8b8..e85b041891c 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -72,8 +72,8 @@ Lisp_Object Qfront_sticky, Qrear_nonsticky; /* verify_interval_modification saves insertion hooks here to be run later by report_interval_modification. */ -Lisp_Object interval_insert_behind_hooks; -Lisp_Object interval_insert_in_front_hooks; +static Lisp_Object interval_insert_behind_hooks; +static Lisp_Object interval_insert_in_front_hooks; static void text_read_only (Lisp_Object) NO_RETURN; INFUN (Fprevious_property_change, 3); -- cgit v1.2.1 From 2b96acb7c0c23467a24d922b91f76780855c01f4 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Apr 2011 19:57:04 -0700 Subject: * window.c (window_deletion_count): Now static. * undo.c: Make symbols static if they're not exported. (last_undo_buffer, last_boundary_position, pending_boundary): Now static. --- src/ChangeLog | 6 ++++++ src/undo.c | 8 ++++---- src/window.c | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 7d5ae728f79..c586e869e9b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,11 @@ 2011-04-14 Paul Eggert + * window.c (window_deletion_count): Now static. + + * undo.c: Make symbols static if they're not exported. + (last_undo_buffer, last_boundary_position, pending_boundary): + Now static. + * textprop.c (interval_insert_behind_hooks): Now static. (interval_insert_in_front_hooks): Likewise. diff --git a/src/undo.c b/src/undo.c index b310133900c..ba420fde817 100644 --- a/src/undo.c +++ b/src/undo.c @@ -26,11 +26,11 @@ along with GNU Emacs. If not, see . */ /* Last buffer for which undo information was recorded. */ /* BEWARE: This is not traced by the GC, so never dereference it! */ -struct buffer *last_undo_buffer; +static struct buffer *last_undo_buffer; /* Position of point last time we inserted a boundary. */ -struct buffer *last_boundary_buffer; -EMACS_INT last_boundary_position; +static struct buffer *last_boundary_buffer; +static EMACS_INT last_boundary_position; Lisp_Object Qinhibit_read_only; @@ -43,7 +43,7 @@ Lisp_Object Qapply; which will be added to the list at the end of the command. This ensures we can't run out of space while trying to make an undo-boundary. */ -Lisp_Object pending_boundary; +static Lisp_Object pending_boundary; /* Record point as it was at beginning of this command (if necessary) and prepare the undo info for recording a change. diff --git a/src/window.c b/src/window.c index ee1b1bc04f7..5b758ac698f 100644 --- a/src/window.c +++ b/src/window.c @@ -132,7 +132,7 @@ static int window_initialized; static Lisp_Object Qwindow_configuration_change_hook; /* Incremented by 1 whenever a window is deleted. */ -int window_deletion_count; +static int window_deletion_count; /* Used by the function window_scroll_pixel_based */ -- cgit v1.2.1 From de9c2632aca0fbd4f2fd29de92f5de510ed7174b Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Apr 2011 19:58:21 -0700 Subject: * window.h (check_all_windows): Mark externally visible. --- src/ChangeLog | 2 ++ src/window.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index c586e869e9b..5ab825bdb8d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-04-14 Paul Eggert + * window.h (check_all_windows): Mark externally visible. + * window.c (window_deletion_count): Now static. * undo.c: Make symbols static if they're not exported. diff --git a/src/window.h b/src/window.h index e2e7a7f691f..4b32edd2149 100644 --- a/src/window.h +++ b/src/window.h @@ -776,7 +776,7 @@ extern void freeze_window_starts (struct frame *, int); extern void grow_mini_window (struct window *, int); extern void shrink_mini_window (struct window *); extern int window_relative_x_coord (struct window *, enum window_part, int); -extern void check_all_windows (void); +extern void check_all_windows (void) EXTERNALLY_VISIBLE; void run_window_configuration_change_hook (struct frame *f); -- cgit v1.2.1 From 1683e3ab56a340c9349c57a9a6185ed7a66f1c54 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Apr 2011 20:01:10 -0700 Subject: * xdisp.c (draw_row_with_mouse_face): Now static. * dispextern.h (draw_row_with_mouse_fave): Remove decl. --- src/ChangeLog | 3 +++ src/dispextern.h | 2 -- src/xdisp.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 5ab825bdb8d..5c1db97c9cc 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-04-14 Paul Eggert + * xdisp.c (draw_row_with_mouse_face): Now static. + * dispextern.h (draw_row_with_mouse_fave): Remove decl. + * window.h (check_all_windows): Mark externally visible. * window.c (window_deletion_count): Now static. diff --git a/src/dispextern.h b/src/dispextern.h index 267f2d22335..840a27ebc62 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -3051,8 +3051,6 @@ extern void x_clear_window_mouse_face (struct window *); extern void cancel_mouse_face (struct frame *); extern int clear_mouse_face (Mouse_HLInfo *); extern int cursor_in_mouse_face_p (struct window *w); -extern void draw_row_with_mouse_face (struct window *, int, struct glyph_row *, - int, int, enum draw_glyphs_face); extern void tty_draw_row_with_mouse_face (struct window *, struct glyph_row *, int, int, enum draw_glyphs_face); diff --git a/src/xdisp.c b/src/xdisp.c index 17a7a34b8be..ecb0e34ed84 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -23875,7 +23875,7 @@ x_clear_cursor (struct window *w) /* Implementation of draw_row_with_mouse_face for GUI sessions, GPM, and MSDOS. */ -void +static void draw_row_with_mouse_face (struct window *w, int start_x, struct glyph_row *row, int start_hpos, int end_hpos, enum draw_glyphs_face draw) -- cgit v1.2.1 From 6f37259d326459347925b92219d1c573c6ab6dd0 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Apr 2011 20:04:14 -0700 Subject: * xmenu.c (x_menu_wait_for_event): Export only if USE_MOTIF. * xterm.h (x_menu_wait_for_event): Declare only if USE_MOTIF. --- src/ChangeLog | 3 +++ src/xmenu.c | 3 +++ src/xterm.h | 2 ++ 3 files changed, 8 insertions(+) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 5c1db97c9cc..269dcf02eb0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-04-14 Paul Eggert + * xmenu.c (x_menu_wait_for_event): Export only if USE_MOTIF. + * xterm.h (x_menu_wait_for_event): Declare only if USE_MOTIF. + * xdisp.c (draw_row_with_mouse_face): Now static. * dispextern.h (draw_row_with_mouse_fave): Remove decl. diff --git a/src/xmenu.c b/src/xmenu.c index 721019ffc56..43badb94e54 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -365,6 +365,9 @@ x_menu_set_in_use (int in_use) /* Wait for an X event to arrive or for a timer to expire. */ +#ifndef USE_MOTIF +static +#endif void x_menu_wait_for_event (void *data) { diff --git a/src/xterm.h b/src/xterm.h index 5c17e24bf23..bd5cf2dbd31 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -1069,7 +1069,9 @@ extern void x_free_dpy_colors (Display *, Screen *, Colormap, /* Defined in xmenu.c */ extern void x_menu_set_in_use (int); +#ifdef USE_MOTIF extern void x_menu_wait_for_event (void *data); +#endif extern void x_activate_menubar (struct frame *); extern int popup_activated (void); extern void initialize_frame_menubar (struct frame *); -- cgit v1.2.1 From ac64929e093edfc052160cdcbbf1a06596e26899 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Apr 2011 20:05:57 -0700 Subject: * xrdb.c (x_customization_string, x_rm_string): Now static. --- src/ChangeLog | 2 ++ src/xrdb.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 269dcf02eb0..0d478b4cd07 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-04-14 Paul Eggert + * xrdb.c (x_customization_string, x_rm_string): Now static. + * xmenu.c (x_menu_wait_for_event): Export only if USE_MOTIF. * xterm.h (x_menu_wait_for_event): Declare only if USE_MOTIF. diff --git a/src/xrdb.c b/src/xrdb.c index a79f453e5e1..d350f38a8c4 100644 --- a/src/xrdb.c +++ b/src/xrdb.c @@ -64,7 +64,7 @@ static int file_p (const char *filename); /* The string which gets substituted for the %C escape in XFILESEARCHPATH and friends, or zero if none was specified. */ -char *x_customization_string; +static char *x_customization_string; /* Return the value of the emacs.customization (Emacs.Customization) @@ -466,7 +466,7 @@ get_environ_db (void) /* Types of values that we can find in a database */ #define XrmStringType "String" /* String representation */ -XrmRepresentation x_rm_string; /* Quark representation */ +static XrmRepresentation x_rm_string; /* Quark representation */ /* Load X resources based on the display and a possible -xrm option. */ -- cgit v1.2.1 From e87b6180b08c60a256dd8557945321ce2354a3a9 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Apr 2011 20:08:55 -0700 Subject: * xsettings.c, xsettings.h (xsettings_get_system_normal_font): Define only if USE_LUCID. --- src/ChangeLog | 3 +++ src/xsettings.c | 2 ++ src/xsettings.h | 3 ++- 3 files changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 0d478b4cd07..15e2aaf9714 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-04-14 Paul Eggert + * xsettings.c, xsettings.h (xsettings_get_system_normal_font): + Define only if USE_LUCID. + * xrdb.c (x_customization_string, x_rm_string): Now static. * xmenu.c (x_menu_wait_for_event): Export only if USE_MOTIF. diff --git a/src/xsettings.c b/src/xsettings.c index da6d088db15..0d312f31bb9 100644 --- a/src/xsettings.c +++ b/src/xsettings.c @@ -691,11 +691,13 @@ xsettings_get_system_font (void) return current_mono_font; } +#ifdef USE_LUCID const char * xsettings_get_system_normal_font (void) { return current_font; } +#endif DEFUN ("font-get-system-normal-font", Ffont_get_system_normal_font, Sfont_get_system_normal_font, diff --git a/src/xsettings.h b/src/xsettings.h index 5b2fdbf43c5..38448eb88f5 100644 --- a/src/xsettings.h +++ b/src/xsettings.h @@ -26,8 +26,9 @@ extern void xsettings_initialize (struct x_display_info *dpyinfo); extern void xft_settings_event (struct x_display_info *dpyinfo, XEvent *); extern const char *xsettings_get_system_font (void); +#ifdef USE_LUCID extern const char *xsettings_get_system_normal_font (void); +#endif #endif /* XSETTINGS_H */ - -- cgit v1.2.1 From a7ca3326c4740ed3ed118b794d35d235de49f346 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Apr 2011 22:04:02 -0700 Subject: Undo the DEFUN->DEFUE change. --- src/alloc.c | 26 ++++++++--------- src/buffer.c | 46 ++++++++++++++--------------- src/callint.c | 2 +- src/callproc.c | 2 +- src/casefiddle.c | 10 +++---- src/casetab.c | 4 +-- src/ccl.c | 2 +- src/character.c | 4 +-- src/chartab.c | 12 ++++---- src/cmds.c | 6 ++-- src/coding.c | 16 +++++------ src/data.c | 84 ++++++++++++++++++++++++++--------------------------- src/dispnew.c | 10 +++---- src/doc.c | 2 +- src/editfns.c | 60 +++++++++++++++++++------------------- src/emacs.c | 2 +- src/eval.c | 24 ++++++++-------- src/fileio.c | 34 +++++++++++----------- src/filelock.c | 2 +- src/floatfns.c | 4 +-- src/fns.c | 88 ++++++++++++++++++++++++++++---------------------------- src/font.c | 14 ++++----- src/fontset.c | 4 +-- src/frame.c | 26 ++++++++--------- src/image.c | 6 ++-- src/indent.c | 6 ++-- src/keyboard.c | 14 ++++----- src/keymap.c | 20 ++++++------- src/lisp.h | 8 ++---- src/lread.c | 18 ++++++------ src/macros.c | 4 +-- src/marker.c | 8 +++--- src/menu.c | 2 +- src/minibuf.c | 16 +++++------ src/print.c | 10 +++---- src/process.c | 8 +++--- src/search.c | 10 +++---- src/syntax.c | 6 ++-- src/term.c | 2 +- src/terminal.c | 4 +-- src/textprop.c | 34 +++++++++++----------- src/undo.c | 2 +- src/window.c | 32 ++++++++++----------- src/xdisp.c | 12 ++++---- src/xfaces.c | 8 +++--- src/xfns.c | 8 +++--- src/xmenu.c | 2 +- src/xsettings.c | 2 +- 48 files changed, 361 insertions(+), 365 deletions(-) (limited to 'src') diff --git a/src/alloc.c b/src/alloc.c index 7803ccdc976..d1d6323f905 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -2177,7 +2177,7 @@ compact_small_strings (void) } -DEFUE ("make-string", Fmake_string, Smake_string, 2, 2, 0, +DEFUN ("make-string", Fmake_string, Smake_string, 2, 2, 0, doc: /* Return a newly created string of length LENGTH, with INIT in each element. LENGTH must be an integer. INIT must be an integer that represents a character. */) @@ -2225,7 +2225,7 @@ INIT must be an integer that represents a character. */) } -DEFUE ("make-bool-vector", Fmake_bool_vector, Smake_bool_vector, 2, 2, 0, +DEFUN ("make-bool-vector", Fmake_bool_vector, Smake_bool_vector, 2, 2, 0, doc: /* Return a new bool-vector of length LENGTH, using INIT for each element. LENGTH must be a number. INIT matters only in whether it is t or nil. */) (Lisp_Object length, Lisp_Object init) @@ -2613,7 +2613,7 @@ free_cons (struct Lisp_Cons *ptr) cons_free_list = ptr; } -DEFUE ("cons", Fcons, Scons, 2, 2, 0, +DEFUN ("cons", Fcons, Scons, 2, 2, 0, doc: /* Create a new cons, give it CAR and CDR as components, and return it. */) (Lisp_Object car, Lisp_Object cdr) { @@ -2706,7 +2706,7 @@ list5 (Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3, Lisp_Object arg4, L } -DEFUE ("list", Flist, Slist, 0, MANY, 0, +DEFUN ("list", Flist, Slist, 0, MANY, 0, doc: /* Return a newly created list with specified arguments as elements. Any number of arguments, even zero arguments, are allowed. usage: (list &rest OBJECTS) */) @@ -2724,7 +2724,7 @@ usage: (list &rest OBJECTS) */) } -DEFUE ("make-list", Fmake_list, Smake_list, 2, 2, 0, +DEFUN ("make-list", Fmake_list, Smake_list, 2, 2, 0, doc: /* Return a newly created list of length LENGTH, with each element being INIT. */) (register Lisp_Object length, Lisp_Object init) { @@ -2900,7 +2900,7 @@ allocate_process (void) } -DEFUE ("make-vector", Fmake_vector, Smake_vector, 2, 2, 0, +DEFUN ("make-vector", Fmake_vector, Smake_vector, 2, 2, 0, doc: /* Return a newly created vector of length LENGTH, with each element being INIT. See also the function `vector'. */) (register Lisp_Object length, Lisp_Object init) @@ -2922,7 +2922,7 @@ See also the function `vector'. */) } -DEFUE ("vector", Fvector, Svector, 0, MANY, 0, +DEFUN ("vector", Fvector, Svector, 0, MANY, 0, doc: /* Return a newly created vector with specified arguments as elements. Any number of arguments, even zero arguments, are allowed. usage: (vector &rest OBJECTS) */) @@ -2941,7 +2941,7 @@ usage: (vector &rest OBJECTS) */) } -DEFUE ("make-byte-code", Fmake_byte_code, Smake_byte_code, 4, MANY, 0, +DEFUN ("make-byte-code", Fmake_byte_code, Smake_byte_code, 4, MANY, 0, doc: /* Create a byte-code object with specified arguments as elements. The arguments should be the ARGLIST, bytecode-string BYTE-CODE, constant vector CONSTANTS, maximum stack size DEPTH, (optional) DOCSTRING, @@ -3036,7 +3036,7 @@ init_symbol (void) } -DEFUE ("make-symbol", Fmake_symbol, Smake_symbol, 1, 1, 0, +DEFUN ("make-symbol", Fmake_symbol, Smake_symbol, 1, 1, 0, doc: /* Return a newly allocated uninterned symbol whose name is NAME. Its value and function definition are void, and its property list is nil. */) (Lisp_Object name) @@ -3199,7 +3199,7 @@ make_save_value (void *pointer, int integer) return val; } -DEFUE ("make-marker", Fmake_marker, Smake_marker, 0, 0, 0, +DEFUN ("make-marker", Fmake_marker, Smake_marker, 0, 0, 0, doc: /* Return a newly allocated marker which does not point at any place. */) (void) { @@ -3928,7 +3928,7 @@ static int max_live, max_zombies; static double avg_live; -DEFUE ("gc-status", Fgc_status, Sgc_status, 0, 0, "", +DEFUN ("gc-status", Fgc_status, Sgc_status, 0, 0, "", doc: /* Show information about live and zombie objects. */) (void) { @@ -4743,7 +4743,7 @@ make_pure_vector (EMACS_INT len) } -DEFUE ("purecopy", Fpurecopy, Spurecopy, 1, 1, 0, +DEFUN ("purecopy", Fpurecopy, Spurecopy, 1, 1, 0, doc: /* Make a copy of object OBJ in pure storage. Recursively copies contents of vectors and cons cells. Does not copy symbols. Copies strings without text properties. */) @@ -4837,7 +4837,7 @@ inhibit_garbage_collection (void) } -DEFUE ("garbage-collect", Fgarbage_collect, Sgarbage_collect, 0, 0, "", +DEFUN ("garbage-collect", Fgarbage_collect, Sgarbage_collect, 0, 0, "", doc: /* Reclaim storage for Lisp objects no longer needed. Garbage collection happens automatically if you cons more than `gc-cons-threshold' bytes of Lisp data since previous garbage collection. diff --git a/src/buffer.c b/src/buffer.c index 4e690f42934..7b543b80a25 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -160,7 +160,7 @@ nsberror (Lisp_Object spec) error ("Invalid buffer argument"); } -DEFUE ("buffer-live-p", Fbuffer_live_p, Sbuffer_live_p, 1, 1, 0, +DEFUN ("buffer-live-p", Fbuffer_live_p, Sbuffer_live_p, 1, 1, 0, doc: /* Return non-nil if OBJECT is a buffer which has not been killed. Value is nil if OBJECT is not a buffer or if it has been killed. */) (Lisp_Object object) @@ -232,7 +232,7 @@ assoc_ignore_text_properties (register Lisp_Object key, Lisp_Object list) return Qnil; } -DEFUE ("get-buffer", Fget_buffer, Sget_buffer, 1, 1, 0, +DEFUN ("get-buffer", Fget_buffer, Sget_buffer, 1, 1, 0, doc: /* Return the buffer named BUFFER-OR-NAME. BUFFER-OR-NAME must be either a string or a buffer. If BUFFER-OR-NAME is a string and there is no buffer with that name, return nil. If @@ -294,7 +294,7 @@ get_truename_buffer (register Lisp_Object filename) return Qnil; } -DEFUE ("get-buffer-create", Fget_buffer_create, Sget_buffer_create, 1, 1, 0, +DEFUN ("get-buffer-create", Fget_buffer_create, Sget_buffer_create, 1, 1, 0, doc: /* Return the buffer specified by BUFFER-OR-NAME, creating a new one if needed. If BUFFER-OR-NAME is a string and a live buffer with that name exists, return that buffer. If no such buffer exists, create a new buffer with @@ -830,7 +830,7 @@ reset_buffer_local_variables (register struct buffer *b, int permanent_too) and set-visited-file-name ought to be able to use this to really rename the buffer properly. */ -DEFUE ("generate-new-buffer-name", Fgenerate_new_buffer_name, +DEFUN ("generate-new-buffer-name", Fgenerate_new_buffer_name, Sgenerate_new_buffer_name, 1, 2, 0, doc: /* Return a string that is the name of no existing buffer based on NAME. If there is no live buffer named NAME, then return NAME. @@ -868,7 +868,7 @@ it is in the sequence to be tried) even if a buffer with that name exists. */) } -DEFUE ("buffer-name", Fbuffer_name, Sbuffer_name, 0, 1, 0, +DEFUN ("buffer-name", Fbuffer_name, Sbuffer_name, 0, 1, 0, doc: /* Return the name of BUFFER, as a string. BUFFER defaults to the current buffer. Return nil if BUFFER has been killed. */) @@ -880,7 +880,7 @@ Return nil if BUFFER has been killed. */) return BVAR (XBUFFER (buffer), name); } -DEFUE ("buffer-file-name", Fbuffer_file_name, Sbuffer_file_name, 0, 1, 0, +DEFUN ("buffer-file-name", Fbuffer_file_name, Sbuffer_file_name, 0, 1, 0, doc: /* Return name of file BUFFER is visiting, or nil if none. No argument or nil as argument means use the current buffer. */) (register Lisp_Object buffer) @@ -915,7 +915,7 @@ BUFFER defaults to the current buffer. */) return base_buffer; } -DEFUE ("buffer-local-value", Fbuffer_local_value, +DEFUN ("buffer-local-value", Fbuffer_local_value, Sbuffer_local_value, 2, 2, 0, doc: /* Return the value of VARIABLE in BUFFER. If VARIABLE does not have a buffer-local binding in BUFFER, the value @@ -1056,7 +1056,7 @@ No argument or nil as argument means use current buffer as BUFFER. */) return result; } -DEFUE ("buffer-modified-p", Fbuffer_modified_p, Sbuffer_modified_p, +DEFUN ("buffer-modified-p", Fbuffer_modified_p, Sbuffer_modified_p, 0, 1, 0, doc: /* Return t if BUFFER was modified since its file was last read or saved. No argument or nil as argument means use current buffer as BUFFER. */) @@ -1074,7 +1074,7 @@ No argument or nil as argument means use current buffer as BUFFER. */) return BUF_SAVE_MODIFF (buf) < BUF_MODIFF (buf) ? Qt : Qnil; } -DEFUE ("set-buffer-modified-p", Fset_buffer_modified_p, Sset_buffer_modified_p, +DEFUN ("set-buffer-modified-p", Fset_buffer_modified_p, Sset_buffer_modified_p, 1, 1, 0, doc: /* Mark current buffer as modified or unmodified according to FLAG. A non-nil FLAG means mark the buffer modified. */) @@ -1266,7 +1266,7 @@ This does not change the name of the visited file (if any). */) return BVAR (current_buffer, name); } -DEFUE ("other-buffer", Fother_buffer, Sother_buffer, 0, 3, 0, +DEFUN ("other-buffer", Fother_buffer, Sother_buffer, 0, 3, 0, doc: /* Return most recently selected buffer other than BUFFER. Buffers not visible in windows are preferred to visible buffers, unless optional second argument VISIBLE-OK is non-nil. @@ -1340,7 +1340,7 @@ If BUFFER is omitted or nil, some interesting buffer is returned. */) return buf; } -DEFUE ("buffer-enable-undo", Fbuffer_enable_undo, Sbuffer_enable_undo, +DEFUN ("buffer-enable-undo", Fbuffer_enable_undo, Sbuffer_enable_undo, 0, 1, "", doc: /* Start keeping undo information for buffer BUFFER. No argument or nil as argument means do this for the current buffer. */) @@ -1369,7 +1369,7 @@ Hook to be run (by `run-hooks', which see) when a buffer is killed.\n\ The buffer being killed will be current while the hook is running.\n\ See `kill-buffer'." */ -DEFUE ("kill-buffer", Fkill_buffer, Skill_buffer, 0, 1, "bKill buffer: ", +DEFUN ("kill-buffer", Fkill_buffer, Skill_buffer, 0, 1, "bKill buffer: ", doc: /* Kill buffer BUFFER-OR-NAME. The argument may be a buffer or the name of an existing buffer. Argument nil or omitted means kill the current buffer. Return t if the @@ -1788,7 +1788,7 @@ messing with the window-buffer correspondences. */) return switch_to_buffer_1 (buffer_or_name, norecord); } -DEFUE ("current-buffer", Fcurrent_buffer, Scurrent_buffer, 0, 0, 0, +DEFUN ("current-buffer", Fcurrent_buffer, Scurrent_buffer, 0, 0, 0, doc: /* Return the current buffer as a Lisp object. */) (void) { @@ -1898,7 +1898,7 @@ set_buffer_temp (struct buffer *b) fetch_buffer_markers (b); } -DEFUE ("set-buffer", Fset_buffer, Sset_buffer, 1, 1, 0, +DEFUN ("set-buffer", Fset_buffer, Sset_buffer, 1, 1, 0, doc: /* Make buffer BUFFER-OR-NAME current for editing operations. BUFFER-OR-NAME may be a buffer or the name of an existing buffer. See also `save-excursion' when you want to make a buffer current @@ -1927,7 +1927,7 @@ set_buffer_if_live (Lisp_Object buffer) return Qnil; } -DEFUE ("barf-if-buffer-read-only", Fbarf_if_buffer_read_only, +DEFUN ("barf-if-buffer-read-only", Fbarf_if_buffer_read_only, Sbarf_if_buffer_read_only, 0, 0, 0, doc: /* Signal a `buffer-read-only' error if the current buffer is read-only. */) (void) @@ -2000,7 +2000,7 @@ its frame, iconify that frame. */) return Qnil; } -DEFUE ("erase-buffer", Ferase_buffer, Serase_buffer, 0, 0, "*", +DEFUN ("erase-buffer", Ferase_buffer, Serase_buffer, 0, 0, "*", doc: /* Delete the entire contents of the current buffer. Any narrowing restriction in effect (see `narrow-to-region') is removed, so the buffer is truly empty after this. */) @@ -2211,7 +2211,7 @@ DEFUN ("buffer-swap-text", Fbuffer_swap_text, Sbuffer_swap_text, return Qnil; } -DEFUE ("set-buffer-multibyte", Fset_buffer_multibyte, Sset_buffer_multibyte, +DEFUN ("set-buffer-multibyte", Fset_buffer_multibyte, Sset_buffer_multibyte, 1, 1, 0, doc: /* Set the multibyte flag of the current buffer to FLAG. If FLAG is t, this makes the buffer a multibyte buffer. @@ -2500,7 +2500,7 @@ current buffer is cleared. */) return flag; } -DEFUE ("kill-all-local-variables", Fkill_all_local_variables, +DEFUN ("kill-all-local-variables", Fkill_all_local_variables, Skill_all_local_variables, 0, 0, 0, doc: /* Switch to Fundamental mode by killing current buffer's local variables. Most local variable bindings are eliminated so that the default values @@ -3899,7 +3899,7 @@ DEFUN ("delete-overlay", Fdelete_overlay, Sdelete_overlay, 1, 1, 0, /* Overlay dissection functions. */ -DEFUE ("overlay-start", Foverlay_start, Soverlay_start, 1, 1, 0, +DEFUN ("overlay-start", Foverlay_start, Soverlay_start, 1, 1, 0, doc: /* Return the position at which OVERLAY starts. */) (Lisp_Object overlay) { @@ -3908,7 +3908,7 @@ DEFUE ("overlay-start", Foverlay_start, Soverlay_start, 1, 1, 0, return (Fmarker_position (OVERLAY_START (overlay))); } -DEFUE ("overlay-end", Foverlay_end, Soverlay_end, 1, 1, 0, +DEFUN ("overlay-end", Foverlay_end, Soverlay_end, 1, 1, 0, doc: /* Return the position at which OVERLAY ends. */) (Lisp_Object overlay) { @@ -3998,7 +3998,7 @@ end of the buffer. */) return result; } -DEFUE ("next-overlay-change", Fnext_overlay_change, Snext_overlay_change, +DEFUN ("next-overlay-change", Fnext_overlay_change, Snext_overlay_change, 1, 1, 0, doc: /* Return the next position after POS where an overlay starts or ends. If there are no overlay boundaries from POS to (point-max), @@ -4039,7 +4039,7 @@ the value is (point-max). */) return make_number (endpos); } -DEFUE ("previous-overlay-change", Fprevious_overlay_change, +DEFUN ("previous-overlay-change", Fprevious_overlay_change, Sprevious_overlay_change, 1, 1, 0, doc: /* Return the previous position before POS where an overlay starts or ends. If there are no overlay boundaries from (point-min) to POS, @@ -4108,7 +4108,7 @@ for positions far away from POS). */) return Qnil; } -DEFUE ("overlay-get", Foverlay_get, Soverlay_get, 2, 2, 0, +DEFUN ("overlay-get", Foverlay_get, Soverlay_get, 2, 2, 0, doc: /* Get the property of overlay OVERLAY with property name PROP. */) (Lisp_Object overlay, Lisp_Object prop) { diff --git a/src/callint.c b/src/callint.c index e491e4e5952..e5ec3d7d931 100644 --- a/src/callint.c +++ b/src/callint.c @@ -852,7 +852,7 @@ invoke it. If KEYS is omitted or nil, the return value of } } -DEFUE ("prefix-numeric-value", Fprefix_numeric_value, Sprefix_numeric_value, +DEFUN ("prefix-numeric-value", Fprefix_numeric_value, Sprefix_numeric_value, 1, 1, 0, doc: /* Return numeric meaning of raw prefix argument RAW. A raw prefix argument is what you get from `(interactive "P")'. diff --git a/src/callproc.c b/src/callproc.c index ec6afcde3a3..57f058aa165 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -152,7 +152,7 @@ call_process_cleanup (Lisp_Object arg) return Qnil; } -DEFUE ("call-process", Fcall_process, Scall_process, 1, MANY, 0, +DEFUN ("call-process", Fcall_process, Scall_process, 1, MANY, 0, doc: /* Call PROGRAM synchronously in separate process. The remaining arguments are optional. The program's input comes from file INFILE (nil means `/dev/null'). diff --git a/src/casefiddle.c b/src/casefiddle.c index 7a220c81865..9f286d73a5e 100644 --- a/src/casefiddle.c +++ b/src/casefiddle.c @@ -148,7 +148,7 @@ casify_object (enum case_action flag, Lisp_Object obj) } } -DEFUE ("upcase", Fupcase, Supcase, 1, 1, 0, +DEFUN ("upcase", Fupcase, Supcase, 1, 1, 0, doc: /* Convert argument to upper case and return that. The argument may be a character or string. The result has the same type. The argument object is not altered--the value is a copy. @@ -158,7 +158,7 @@ See also `capitalize', `downcase' and `upcase-initials'. */) return casify_object (CASE_UP, obj); } -DEFUE ("downcase", Fdowncase, Sdowncase, 1, 1, 0, +DEFUN ("downcase", Fdowncase, Sdowncase, 1, 1, 0, doc: /* Convert argument to lower case and return that. The argument may be a character or string. The result has the same type. The argument object is not altered--the value is a copy. */) @@ -180,7 +180,7 @@ The argument object is not altered--the value is a copy. */) /* Like Fcapitalize but change only the initials. */ -DEFUE ("upcase-initials", Fupcase_initials, Supcase_initials, 1, 1, 0, +DEFUN ("upcase-initials", Fupcase_initials, Supcase_initials, 1, 1, 0, doc: /* Convert the initial of each word in the argument to upper case. Do not change the other letters of each word. The argument may be a character or string. The result has the same type. @@ -301,7 +301,7 @@ casify_region (enum case_action flag, Lisp_Object b, Lisp_Object e) } } -DEFUE ("upcase-region", Fupcase_region, Supcase_region, 2, 2, "r", +DEFUN ("upcase-region", Fupcase_region, Supcase_region, 2, 2, "r", doc: /* Convert the region to upper case. In programs, wants two arguments. These arguments specify the starting and ending character numbers of the region to operate on. When used as a command, the text between @@ -338,7 +338,7 @@ character positions to operate on. */) /* Like Fcapitalize_region but change only the initials. */ -DEFUE ("upcase-initials-region", Fupcase_initials_region, +DEFUN ("upcase-initials-region", Fupcase_initials_region, Supcase_initials_region, 2, 2, "r", doc: /* Upcase the initial of each word in the region. Subsequent letters of each word are not changed. diff --git a/src/casetab.c b/src/casetab.c index 4bea6ee7e71..29120dd08ce 100644 --- a/src/casetab.c +++ b/src/casetab.c @@ -81,7 +81,7 @@ This is the one used for new buffers. */) static Lisp_Object set_case_table (Lisp_Object table, int standard); -DEFUE ("set-case-table", Fset_case_table, Sset_case_table, 1, 1, 0, +DEFUN ("set-case-table", Fset_case_table, Sset_case_table, 1, 1, 0, doc: /* Select a new case table for the current buffer. A case table is a char-table which maps characters to their lower-case equivalents. It also has three \"extra\" slots @@ -103,7 +103,7 @@ EQUIVALENCES is a map that cyclicly permutes each equivalence class return set_case_table (table, 0); } -DEFUE ("set-standard-case-table", Fset_standard_case_table, +DEFUN ("set-standard-case-table", Fset_standard_case_table, Sset_standard_case_table, 1, 1, 0, doc: /* Select a new standard case table for new buffers. See `set-case-table' for more info on case tables. */) diff --git a/src/ccl.c b/src/ccl.c index 14194a70c26..66e0f2c6169 100644 --- a/src/ccl.c +++ b/src/ccl.c @@ -1929,7 +1929,7 @@ setup_ccl_program (struct ccl_program *ccl, Lisp_Object ccl_prog) } -DEFUE ("ccl-program-p", Fccl_program_p, Sccl_program_p, 1, 1, 0, +DEFUN ("ccl-program-p", Fccl_program_p, Sccl_program_p, 1, 1, 0, doc: /* Return t if OBJECT is a CCL program name or a compiled CCL program code. See the documentation of `define-ccl-program' for the detail of CCL program. */) (Lisp_Object object) diff --git a/src/character.c b/src/character.c index e00168c6abc..84eddeb2fc2 100644 --- a/src/character.c +++ b/src/character.c @@ -307,7 +307,7 @@ If the multibyte character does not represent a byte, return -1. */) } } -DEFUE ("char-width", Fchar_width, Schar_width, 1, 1, 0, +DEFUN ("char-width", Fchar_width, Schar_width, 1, 1, 0, doc: /* Return width of CHAR when displayed in the current buffer. The width is measured by how many columns it occupies on the screen. Tab is taken to occupy `tab-width' columns. @@ -886,7 +886,7 @@ string_escape_byte8 (Lisp_Object string) } -DEFUE ("string", Fstring, Sstring, 0, MANY, 0, +DEFUN ("string", Fstring, Sstring, 0, MANY, 0, doc: /* Concatenate all the argument characters and make the result a string. usage: (string &rest CHARACTERS) */) diff --git a/src/chartab.c b/src/chartab.c index 2f0e88bd404..eb72d973c87 100644 --- a/src/chartab.c +++ b/src/chartab.c @@ -54,7 +54,7 @@ static const int chartab_bits[4] = (((c) - (min_char)) >> chartab_bits[(depth)]) -DEFUE ("make-char-table", Fmake_char_table, Smake_char_table, 1, 2, 0, +DEFUN ("make-char-table", Fmake_char_table, Smake_char_table, 1, 2, 0, doc: /* Return a newly created char-table, with purpose PURPOSE. Each element is initialized to INIT, which defaults to nil. @@ -459,7 +459,7 @@ then the actual applicable value is inherited from the parent char-table return XCHAR_TABLE (char_table)->parent; } -DEFUE ("set-char-table-parent", Fset_char_table_parent, Sset_char_table_parent, +DEFUN ("set-char-table-parent", Fset_char_table_parent, Sset_char_table_parent, 2, 2, 0, doc: /* Set the parent char-table of CHAR-TABLE to PARENT. Return PARENT. PARENT must be either nil or another char-table. */) @@ -483,7 +483,7 @@ Return PARENT. PARENT must be either nil or another char-table. */) return parent; } -DEFUE ("char-table-extra-slot", Fchar_table_extra_slot, Schar_table_extra_slot, +DEFUN ("char-table-extra-slot", Fchar_table_extra_slot, Schar_table_extra_slot, 2, 2, 0, doc: /* Return the value of CHAR-TABLE's extra-slot number N. */) (Lisp_Object char_table, Lisp_Object n) @@ -497,7 +497,7 @@ DEFUE ("char-table-extra-slot", Fchar_table_extra_slot, Schar_table_extra_slot, return XCHAR_TABLE (char_table)->extras[XINT (n)]; } -DEFUE ("set-char-table-extra-slot", Fset_char_table_extra_slot, +DEFUN ("set-char-table-extra-slot", Fset_char_table_extra_slot, Sset_char_table_extra_slot, 3, 3, 0, doc: /* Set CHAR-TABLE's extra-slot number N to VALUE. */) @@ -541,7 +541,7 @@ a cons of character codes (for characters in the range), or a character code. * return val; } -DEFUE ("set-char-table-range", Fset_char_table_range, Sset_char_table_range, +DEFUN ("set-char-table-range", Fset_char_table_range, Sset_char_table_range, 3, 3, 0, doc: /* Set the value in CHAR-TABLE for a range of characters RANGE to VALUE. RANGE should be t (for all characters), nil (for the default value), @@ -626,7 +626,7 @@ optimize_sub_char_table (Lisp_Object table, Lisp_Object test) return (optimizable ? elt : table); } -DEFUE ("optimize-char-table", Foptimize_char_table, Soptimize_char_table, +DEFUN ("optimize-char-table", Foptimize_char_table, Soptimize_char_table, 1, 2, 0, doc: /* Optimize CHAR-TABLE. TEST is the comparison function used to decide whether two entries are diff --git a/src/cmds.c b/src/cmds.c index baf14778141..5dc4d2bfe30 100644 --- a/src/cmds.c +++ b/src/cmds.c @@ -47,7 +47,7 @@ DEFUN ("forward-point", Fforward_point, Sforward_point, 1, 1, 0, return make_number (PT + XINT (n)); } -DEFUE ("forward-char", Fforward_char, Sforward_char, 0, 1, "^p", +DEFUN ("forward-char", Fforward_char, Sforward_char, 0, 1, "^p", doc: /* Move point N characters forward (backward if N is negative). On reaching end or beginning of buffer, stop and signal error. @@ -104,7 +104,7 @@ right or to the left on the screen. This is in contrast with return Fforward_char (n); } -DEFUE ("forward-line", Fforward_line, Sforward_line, 0, 1, "^p", +DEFUN ("forward-line", Fforward_line, Sforward_line, 0, 1, "^p", doc: /* Move N lines forward (backward if N is negative). Precisely, if point is on line I, move to the start of line I + N \("start of line" in the logical order). @@ -174,7 +174,7 @@ instead. For instance, `(forward-line 0)' does the same thing as return Qnil; } -DEFUE ("end-of-line", Fend_of_line, Send_of_line, 0, 1, "^p", +DEFUN ("end-of-line", Fend_of_line, Send_of_line, 0, 1, "^p", doc: /* Move point to end of current line (in the logical order). With argument N not nil or 1, move forward N - 1 lines first. If point reaches the beginning or end of buffer, it stops there. diff --git a/src/coding.c b/src/coding.c index c29713a5c0c..b49070e5e16 100644 --- a/src/coding.c +++ b/src/coding.c @@ -7970,7 +7970,7 @@ preferred_coding_system (void) #ifdef emacs /*** 8. Emacs Lisp library functions ***/ -DEFUE ("coding-system-p", Fcoding_system_p, Scoding_system_p, 1, 1, 0, +DEFUN ("coding-system-p", Fcoding_system_p, Scoding_system_p, 1, 1, 0, doc: /* Return t if OBJECT is nil or a coding-system. See the documentation of `define-coding-system' for information about coding-system objects. */) @@ -7985,7 +7985,7 @@ about coding-system objects. */) return Qt; } -DEFUE ("read-non-nil-coding-system", Fread_non_nil_coding_system, +DEFUN ("read-non-nil-coding-system", Fread_non_nil_coding_system, Sread_non_nil_coding_system, 1, 1, 0, doc: /* Read a coding system from the minibuffer, prompting with string PROMPT. */) (Lisp_Object prompt) @@ -8000,7 +8000,7 @@ DEFUE ("read-non-nil-coding-system", Fread_non_nil_coding_system, return (Fintern (val, Qnil)); } -DEFUE ("read-coding-system", Fread_coding_system, Sread_coding_system, 1, 2, 0, +DEFUN ("read-coding-system", Fread_coding_system, Sread_coding_system, 1, 2, 0, doc: /* Read a coding system from the minibuffer, prompting with string PROMPT. If the user enters null input, return second argument DEFAULT-CODING-SYSTEM. Ignores case when completing coding systems (all Emacs coding systems @@ -8020,7 +8020,7 @@ are lower-case). */) return (SCHARS (val) == 0 ? Qnil : Fintern (val, Qnil)); } -DEFUE ("check-coding-system", Fcheck_coding_system, Scheck_coding_system, +DEFUN ("check-coding-system", Fcheck_coding_system, Scheck_coding_system, 1, 1, 0, doc: /* Check validity of CODING-SYSTEM. If valid, return CODING-SYSTEM, else signal a `coding-system-error' error. @@ -8955,7 +8955,7 @@ code_convert_string_norecord (Lisp_Object string, Lisp_Object coding_system, } -DEFUE ("decode-coding-string", Fdecode_coding_string, Sdecode_coding_string, +DEFUN ("decode-coding-string", Fdecode_coding_string, Sdecode_coding_string, 2, 4, 0, doc: /* Decode STRING which is encoded in CODING-SYSTEM, and return the result. @@ -9229,7 +9229,7 @@ DEFUN ("keyboard-coding-system", } -DEFUE ("find-operation-coding-system", Ffind_operation_coding_system, +DEFUN ("find-operation-coding-system", Ffind_operation_coding_system, Sfind_operation_coding_system, 1, MANY, 0, doc: /* Choose a coding system for an operation based on the target name. The value names a pair of coding systems: (DECODING-SYSTEM . ENCODING-SYSTEM). @@ -10072,7 +10072,7 @@ DEFUN ("define-coding-system-alias", Fdefine_coding_system_alias, return Qnil; } -DEFUE ("coding-system-base", Fcoding_system_base, Scoding_system_base, +DEFUN ("coding-system-base", Fcoding_system_base, Scoding_system_base, 1, 1, 0, doc: /* Return the base of CODING-SYSTEM. Any alias or subsidiary coding system is not a base coding system. */) @@ -10115,7 +10115,7 @@ DEFUN ("coding-system-aliases", Fcoding_system_aliases, Scoding_system_aliases, return AREF (spec, 1); } -DEFUE ("coding-system-eol-type", Fcoding_system_eol_type, +DEFUN ("coding-system-eol-type", Fcoding_system_eol_type, Scoding_system_eol_type, 1, 1, 0, doc: /* Return eol-type of CODING-SYSTEM. An eol-type is an integer 0, 1, 2, or a vector of coding systems. diff --git a/src/data.c b/src/data.c index ca246b60dd4..956ff3700f2 100644 --- a/src/data.c +++ b/src/data.c @@ -462,7 +462,7 @@ DEFUN ("floatp", Ffloatp, Sfloatp, 1, 1, 0, /* Extract and set components of lists */ -DEFUE ("car", Fcar, Scar, 1, 1, 0, +DEFUN ("car", Fcar, Scar, 1, 1, 0, doc: /* Return the car of LIST. If arg is nil, return nil. Error if arg is not nil and not a cons cell. See also `car-safe'. @@ -473,14 +473,14 @@ Lisp concepts such as car, cdr, cons cell and list. */) return CAR (list); } -DEFUE ("car-safe", Fcar_safe, Scar_safe, 1, 1, 0, +DEFUN ("car-safe", Fcar_safe, Scar_safe, 1, 1, 0, doc: /* Return the car of OBJECT if it is a cons cell, or else nil. */) (Lisp_Object object) { return CAR_SAFE (object); } -DEFUE ("cdr", Fcdr, Scdr, 1, 1, 0, +DEFUN ("cdr", Fcdr, Scdr, 1, 1, 0, doc: /* Return the cdr of LIST. If arg is nil, return nil. Error if arg is not nil and not a cons cell. See also `cdr-safe'. @@ -491,14 +491,14 @@ Lisp concepts such as cdr, car, cons cell and list. */) return CDR (list); } -DEFUE ("cdr-safe", Fcdr_safe, Scdr_safe, 1, 1, 0, +DEFUN ("cdr-safe", Fcdr_safe, Scdr_safe, 1, 1, 0, doc: /* Return the cdr of OBJECT if it is a cons cell, or else nil. */) (Lisp_Object object) { return CDR_SAFE (object); } -DEFUE ("setcar", Fsetcar, Ssetcar, 2, 2, 0, +DEFUN ("setcar", Fsetcar, Ssetcar, 2, 2, 0, doc: /* Set the car of CELL to be NEWCAR. Returns NEWCAR. */) (register Lisp_Object cell, Lisp_Object newcar) { @@ -508,7 +508,7 @@ DEFUE ("setcar", Fsetcar, Ssetcar, 2, 2, 0, return newcar; } -DEFUE ("setcdr", Fsetcdr, Ssetcdr, 2, 2, 0, +DEFUN ("setcdr", Fsetcdr, Ssetcdr, 2, 2, 0, doc: /* Set the cdr of CELL to be NEWCDR. Returns NEWCDR. */) (register Lisp_Object cell, Lisp_Object newcdr) { @@ -520,7 +520,7 @@ DEFUE ("setcdr", Fsetcdr, Ssetcdr, 2, 2, 0, /* Extract and set components of symbols */ -DEFUE ("boundp", Fboundp, Sboundp, 1, 1, 0, +DEFUN ("boundp", Fboundp, Sboundp, 1, 1, 0, doc: /* Return t if SYMBOL's value is not void. */) (register Lisp_Object symbol) { @@ -558,7 +558,7 @@ DEFUE ("boundp", Fboundp, Sboundp, 1, 1, 0, return (EQ (valcontents, Qunbound) ? Qnil : Qt); } -DEFUE ("fboundp", Ffboundp, Sfboundp, 1, 1, 0, +DEFUN ("fboundp", Ffboundp, Sfboundp, 1, 1, 0, doc: /* Return t if SYMBOL's function definition is not void. */) (register Lisp_Object symbol) { @@ -590,7 +590,7 @@ Return SYMBOL. */) return symbol; } -DEFUE ("symbol-function", Fsymbol_function, Ssymbol_function, 1, 1, 0, +DEFUN ("symbol-function", Fsymbol_function, Ssymbol_function, 1, 1, 0, doc: /* Return SYMBOL's function definition. Error if that is void. */) (register Lisp_Object symbol) { @@ -608,7 +608,7 @@ DEFUN ("symbol-plist", Fsymbol_plist, Ssymbol_plist, 1, 1, 0, return XSYMBOL (symbol)->plist; } -DEFUE ("symbol-name", Fsymbol_name, Ssymbol_name, 1, 1, 0, +DEFUN ("symbol-name", Fsymbol_name, Ssymbol_name, 1, 1, 0, doc: /* Return SYMBOL's name, a string. */) (register Lisp_Object symbol) { @@ -619,7 +619,7 @@ DEFUE ("symbol-name", Fsymbol_name, Ssymbol_name, 1, 1, 0, return name; } -DEFUE ("fset", Ffset, Sfset, 2, 2, 0, +DEFUN ("fset", Ffset, Sfset, 2, 2, 0, doc: /* Set SYMBOL's function definition to DEFINITION, and return DEFINITION. */) (register Lisp_Object symbol, Lisp_Object definition) { @@ -706,7 +706,7 @@ SUBR must be a built-in function. */) return make_string (name, strlen (name)); } -DEFUE ("interactive-form", Finteractive_form, Sinteractive_form, 1, 1, 0, +DEFUN ("interactive-form", Finteractive_form, Sinteractive_form, 1, 1, 0, doc: /* Return the interactive form of CMD or nil if none. If CMD is not a command, the return value is nil. Value, if non-nil, is a list \(interactive SPEC). */) @@ -1049,7 +1049,7 @@ find_symbol_value (Lisp_Object symbol) } } -DEFUE ("symbol-value", Fsymbol_value, Ssymbol_value, 1, 1, 0, +DEFUN ("symbol-value", Fsymbol_value, Ssymbol_value, 1, 1, 0, doc: /* Return SYMBOL's value. Error if that is void. */) (Lisp_Object symbol) { @@ -1062,7 +1062,7 @@ DEFUE ("symbol-value", Fsymbol_value, Ssymbol_value, 1, 1, 0, xsignal1 (Qvoid_variable, symbol); } -DEFUE ("set", Fset, Sset, 2, 2, 0, +DEFUN ("set", Fset, Sset, 2, 2, 0, doc: /* Set SYMBOL's value to NEWVAL, and return NEWVAL. */) (register Lisp_Object symbol, Lisp_Object newval) { @@ -1308,7 +1308,7 @@ default_value (Lisp_Object symbol) } } -DEFUE ("default-boundp", Fdefault_boundp, Sdefault_boundp, 1, 1, 0, +DEFUN ("default-boundp", Fdefault_boundp, Sdefault_boundp, 1, 1, 0, doc: /* Return t if SYMBOL has a non-void default value. This is the value that is seen in buffers that do not have their own values for this variable. */) @@ -1320,7 +1320,7 @@ for this variable. */) return (EQ (value, Qunbound) ? Qnil : Qt); } -DEFUE ("default-value", Fdefault_value, Sdefault_value, 1, 1, 0, +DEFUN ("default-value", Fdefault_value, Sdefault_value, 1, 1, 0, doc: /* Return SYMBOL's default value. This is the value that is seen in buffers that do not have their own values for this variable. The default value is meaningful for variables with @@ -1336,7 +1336,7 @@ local bindings in certain buffers. */) xsignal1 (Qvoid_variable, symbol); } -DEFUE ("set-default", Fset_default, Sset_default, 2, 2, 0, +DEFUN ("set-default", Fset_default, Sset_default, 2, 2, 0, doc: /* Set SYMBOL's default value to VALUE. SYMBOL and VALUE are evaluated. The default value is seen in buffers that do not have their own values for this variable. */) @@ -1479,7 +1479,7 @@ make_blv (struct Lisp_Symbol *sym, int forwarded, union Lisp_Val_Fwd valcontents return blv; } -DEFUE ("make-variable-buffer-local", Fmake_variable_buffer_local, +DEFUN ("make-variable-buffer-local", Fmake_variable_buffer_local, Smake_variable_buffer_local, 1, 1, "vMake Variable Buffer Local: ", doc: /* Make VARIABLE become buffer-local whenever it is set. At any time, the value for the current buffer is in effect, @@ -1550,7 +1550,7 @@ The function `default-value' gets the default value and `set-default' sets it. return variable; } -DEFUE ("make-local-variable", Fmake_local_variable, Smake_local_variable, +DEFUN ("make-local-variable", Fmake_local_variable, Smake_local_variable, 1, 1, "vMake Local Variable: ", doc: /* Make VARIABLE have a separate value in the current buffer. Other buffers will continue to share a common default value. @@ -1810,7 +1810,7 @@ frame-local bindings). */) return variable; } -DEFUE ("local-variable-p", Flocal_variable_p, Slocal_variable_p, +DEFUN ("local-variable-p", Flocal_variable_p, Slocal_variable_p, 1, 2, 0, doc: /* Non-nil if VARIABLE has a local binding in buffer BUFFER. BUFFER defaults to the current buffer. */) @@ -1955,7 +1955,7 @@ If the current binding is global (the default), the value is nil. */) #if 0 extern struct terminal *get_terminal (Lisp_Object display, int); -DEFUE ("terminal-local-value", Fterminal_local_value, +DEFUN ("terminal-local-value", Fterminal_local_value, Sterminal_local_value, 2, 2, 0, doc: /* Return the terminal-local value of SYMBOL on TERMINAL. If SYMBOL is not a terminal-local variable, then return its normal @@ -1973,7 +1973,7 @@ selected frame's terminal device). */) return result; } -DEFUE ("set-terminal-local-value", Fset_terminal_local_value, +DEFUN ("set-terminal-local-value", Fset_terminal_local_value, Sset_terminal_local_value, 3, 3, 0, doc: /* Set the terminal-local binding of SYMBOL on TERMINAL to VALUE. If VARIABLE is not a terminal-local variable, then set its normal @@ -2026,7 +2026,7 @@ indirect_function (register Lisp_Object object) return hare; } -DEFUE ("indirect-function", Findirect_function, Sindirect_function, 1, 2, 0, +DEFUN ("indirect-function", Findirect_function, Sindirect_function, 1, 2, 0, doc: /* Return the function at the end of OBJECT's function chain. If OBJECT is not a symbol, just return it. Otherwise, follow all function indirections to find the final function binding and return it. @@ -2054,7 +2054,7 @@ function chain of symbols. */) /* Extract and set vector and string elements */ -DEFUE ("aref", Faref, Saref, 2, 2, 0, +DEFUN ("aref", Faref, Saref, 2, 2, 0, doc: /* Return the element of ARRAY at index IDX. ARRAY may be a vector, a string, a char-table, a bool-vector, or a byte-code object. IDX starts at 0. */) @@ -2109,7 +2109,7 @@ or a byte-code object. IDX starts at 0. */) } } -DEFUE ("aset", Faset, Saset, 3, 3, 0, +DEFUN ("aset", Faset, Saset, 3, 3, 0, doc: /* Store into the element of ARRAY at index IDX the value NEWELT. Return NEWELT. ARRAY may be a vector, a string, a char-table or a bool-vector. IDX starts at 0. */) @@ -2272,21 +2272,21 @@ DEFUN ("=", Feqlsign, Seqlsign, 2, 2, 0, return arithcompare (num1, num2, equal); } -DEFUE ("<", Flss, Slss, 2, 2, 0, +DEFUN ("<", Flss, Slss, 2, 2, 0, doc: /* Return t if first arg is less than second arg. Both must be numbers or markers. */) (register Lisp_Object num1, Lisp_Object num2) { return arithcompare (num1, num2, less); } -DEFUE (">", Fgtr, Sgtr, 2, 2, 0, +DEFUN (">", Fgtr, Sgtr, 2, 2, 0, doc: /* Return t if first arg is greater than second arg. Both must be numbers or markers. */) (register Lisp_Object num1, Lisp_Object num2) { return arithcompare (num1, num2, grtr); } -DEFUE ("<=", Fleq, Sleq, 2, 2, 0, +DEFUN ("<=", Fleq, Sleq, 2, 2, 0, doc: /* Return t if first arg is less than or equal to second arg. Both must be numbers or markers. */) (register Lisp_Object num1, Lisp_Object num2) @@ -2294,7 +2294,7 @@ Both must be numbers or markers. */) return arithcompare (num1, num2, less_or_equal); } -DEFUE (">=", Fgeq, Sgeq, 2, 2, 0, +DEFUN (">=", Fgeq, Sgeq, 2, 2, 0, doc: /* Return t if first arg is greater than or equal to second arg. Both must be numbers or markers. */) (register Lisp_Object num1, Lisp_Object num2) @@ -2309,7 +2309,7 @@ DEFUN ("/=", Fneq, Sneq, 2, 2, 0, return arithcompare (num1, num2, notequal); } -DEFUE ("zerop", Fzerop, Szerop, 1, 1, 0, +DEFUN ("zerop", Fzerop, Szerop, 1, 1, 0, doc: /* Return t if NUMBER is zero. */) (register Lisp_Object number) { @@ -2356,7 +2356,7 @@ cons_to_long (Lisp_Object c) return ((XINT (top) << 16) | XINT (bot)); } -DEFUE ("number-to-string", Fnumber_to_string, Snumber_to_string, 1, 1, 0, +DEFUN ("number-to-string", Fnumber_to_string, Snumber_to_string, 1, 1, 0, doc: /* Return the decimal representation of NUMBER as a string. Uses a minus sign if negative. NUMBER may be an integer or a floating point number. */) @@ -2403,7 +2403,7 @@ digit_to_number (int character, int base) return digit; } -DEFUE ("string-to-number", Fstring_to_number, Sstring_to_number, 1, 2, 0, +DEFUN ("string-to-number", Fstring_to_number, Sstring_to_number, 1, 2, 0, doc: /* Parse STRING as a decimal number and return the number. This parses both integers and floating point numbers. It ignores leading spaces and tabs, and all trailing chars. @@ -2626,7 +2626,7 @@ float_arith_driver (double accum, register size_t argnum, enum arithop code, } -DEFUE ("+", Fplus, Splus, 0, MANY, 0, +DEFUN ("+", Fplus, Splus, 0, MANY, 0, doc: /* Return sum of any number of arguments, which are numbers or markers. usage: (+ &rest NUMBERS-OR-MARKERS) */) (size_t nargs, Lisp_Object *args) @@ -2634,7 +2634,7 @@ usage: (+ &rest NUMBERS-OR-MARKERS) */) return arith_driver (Aadd, nargs, args); } -DEFUE ("-", Fminus, Sminus, 0, MANY, 0, +DEFUN ("-", Fminus, Sminus, 0, MANY, 0, doc: /* Negate number or subtract numbers or markers and return the result. With one arg, negates it. With more than one arg, subtracts all but the first from the first. @@ -2644,7 +2644,7 @@ usage: (- &optional NUMBER-OR-MARKER &rest MORE-NUMBERS-OR-MARKERS) */) return arith_driver (Asub, nargs, args); } -DEFUE ("*", Ftimes, Stimes, 0, MANY, 0, +DEFUN ("*", Ftimes, Stimes, 0, MANY, 0, doc: /* Return product of any number of arguments, which are numbers or markers. usage: (* &rest NUMBERS-OR-MARKERS) */) (size_t nargs, Lisp_Object *args) @@ -2652,7 +2652,7 @@ usage: (* &rest NUMBERS-OR-MARKERS) */) return arith_driver (Amult, nargs, args); } -DEFUE ("/", Fquo, Squo, 2, MANY, 0, +DEFUN ("/", Fquo, Squo, 2, MANY, 0, doc: /* Return first argument divided by all the remaining arguments. The arguments must be numbers or markers. usage: (/ DIVIDEND DIVISOR &rest DIVISORS) */) @@ -2665,7 +2665,7 @@ usage: (/ DIVIDEND DIVISOR &rest DIVISORS) */) return arith_driver (Adiv, nargs, args); } -DEFUE ("%", Frem, Srem, 2, 2, 0, +DEFUN ("%", Frem, Srem, 2, 2, 0, doc: /* Return remainder of X divided by Y. Both must be integers or markers. */) (register Lisp_Object x, Lisp_Object y) @@ -2736,7 +2736,7 @@ Both X and Y must be numbers or markers. */) return val; } -DEFUE ("max", Fmax, Smax, 1, MANY, 0, +DEFUN ("max", Fmax, Smax, 1, MANY, 0, doc: /* Return largest of all the arguments (which must be numbers or markers). The value is always a number; markers are converted to numbers. usage: (max NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS) */) @@ -2745,7 +2745,7 @@ usage: (max NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS) */) return arith_driver (Amax, nargs, args); } -DEFUE ("min", Fmin, Smin, 1, MANY, 0, +DEFUN ("min", Fmin, Smin, 1, MANY, 0, doc: /* Return smallest of all the arguments (which must be numbers or markers). The value is always a number; markers are converted to numbers. usage: (min NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS) */) @@ -2825,7 +2825,7 @@ In this case, zeros are shifted in on the left. */) return val; } -DEFUE ("1+", Fadd1, Sadd1, 1, 1, 0, +DEFUN ("1+", Fadd1, Sadd1, 1, 1, 0, doc: /* Return NUMBER plus one. NUMBER may be a number or a marker. Markers are converted to integers. */) (register Lisp_Object number) @@ -2839,7 +2839,7 @@ Markers are converted to integers. */) return number; } -DEFUE ("1-", Fsub1, Ssub1, 1, 1, 0, +DEFUN ("1-", Fsub1, Ssub1, 1, 1, 0, doc: /* Return NUMBER minus one. NUMBER may be a number or a marker. Markers are converted to integers. */) (register Lisp_Object number) @@ -2862,7 +2862,7 @@ DEFUN ("lognot", Flognot, Slognot, 1, 1, 0, return number; } -DEFUE ("byteorder", Fbyteorder, Sbyteorder, 0, 0, 0, +DEFUN ("byteorder", Fbyteorder, Sbyteorder, 0, 0, 0, doc: /* Return the byteorder for the machine. Returns 66 (ASCII uppercase B) for big endian machines or 108 (ASCII lowercase l) for small endian machines. */) diff --git a/src/dispnew.c b/src/dispnew.c index 78bd4bf6590..5b8eaf4fa34 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -339,7 +339,7 @@ add_frame_display_history (struct frame *f, int paused_p) } -DEFUE ("dump-redisplay-history", Fdump_redisplay_history, +DEFUN ("dump-redisplay-history", Fdump_redisplay_history, Sdump_redisplay_history, 0, 0, "", doc: /* Dump redisplay history to stderr. */) (void) @@ -3141,7 +3141,7 @@ window_to_frame_hpos (struct window *w, int hpos) Redrawing Frames **********************************************************************/ -DEFUE ("redraw-frame", Fredraw_frame, Sredraw_frame, 1, 1, 0, +DEFUN ("redraw-frame", Fredraw_frame, Sredraw_frame, 1, 1, 0, doc: /* Clear frame FRAME and output again what is supposed to appear on it. */) (Lisp_Object frame) { @@ -5865,7 +5865,7 @@ when TERMINAL is nil. */) } -DEFUE ("ding", Fding, Sding, 0, 1, 0, +DEFUN ("ding", Fding, Sding, 0, 1, 0, doc: /* Beep, or flash the screen. Also, unless an argument is given, terminate any keyboard macro currently executing. */) @@ -5901,7 +5901,7 @@ bitch_at_user (void) Sleeping, Waiting ***********************************************************************/ -DEFUE ("sleep-for", Fsleep_for, Ssleep_for, 1, 2, 0, +DEFUN ("sleep-for", Fsleep_for, Ssleep_for, 1, 2, 0, doc: /* Pause, without updating display, for SECONDS seconds. SECONDS may be a floating-point value, meaning that you can wait for a fraction of a second. Optional second arg MILLISECONDS specifies an @@ -6007,7 +6007,7 @@ sit_for (Lisp_Object timeout, int reading, int do_display) } -DEFUE ("redisplay", Fredisplay, Sredisplay, 0, 1, 0, +DEFUN ("redisplay", Fredisplay, Sredisplay, 0, 1, 0, doc: /* Perform redisplay if no input is available. If optional arg FORCE is non-nil or `redisplay-dont-pause' is non-nil, perform a full redisplay even if input is available. diff --git a/src/doc.c b/src/doc.c index b6939ad78f6..a793011990f 100644 --- a/src/doc.c +++ b/src/doc.c @@ -681,7 +681,7 @@ the same file name is found in the `doc-directory'. */) return Qnil; } -DEFUE ("substitute-command-keys", Fsubstitute_command_keys, +DEFUN ("substitute-command-keys", Fsubstitute_command_keys, Ssubstitute_command_keys, 1, 1, 0, doc: /* Substitute key descriptions for command names in STRING. Substrings of the form \\=\\[COMMAND] replaced by either: a keystroke diff --git a/src/editfns.c b/src/editfns.c index ce77d10cb2f..30974e0b50e 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -185,7 +185,7 @@ init_editfns (void) #endif } -DEFUE ("char-to-string", Fchar_to_string, Schar_to_string, 1, 1, 0, +DEFUN ("char-to-string", Fchar_to_string, Schar_to_string, 1, 1, 0, doc: /* Convert arg CHAR to a string containing that character. usage: (char-to-string CHAR) */) (Lisp_Object character) @@ -239,7 +239,7 @@ buildmark (EMACS_INT charpos, EMACS_INT bytepos) return mark; } -DEFUE ("point", Fpoint, Spoint, 0, 0, 0, +DEFUN ("point", Fpoint, Spoint, 0, 0, 0, doc: /* Return value of point, as an integer. Beginning of buffer is position (point-min). */) (void) @@ -249,7 +249,7 @@ Beginning of buffer is position (point-min). */) return temp; } -DEFUE ("point-marker", Fpoint_marker, Spoint_marker, 0, 0, 0, +DEFUN ("point-marker", Fpoint_marker, Spoint_marker, 0, 0, 0, doc: /* Return value of point, as a marker object. */) (void) { @@ -267,7 +267,7 @@ clip_to_bounds (EMACS_INT lower, EMACS_INT num, EMACS_INT upper) return num; } -DEFUE ("goto-char", Fgoto_char, Sgoto_char, 1, 1, "NGoto char: ", +DEFUN ("goto-char", Fgoto_char, Sgoto_char, 1, 1, "NGoto char: ", doc: /* Set point to POSITION, a number or marker. Beginning of buffer is position (point-min), end is (point-max). @@ -663,7 +663,7 @@ is before LIMIT, then LIMIT will be returned instead. */) return make_number (beg); } -DEFUE ("field-end", Ffield_end, Sfield_end, 0, 3, 0, +DEFUN ("field-end", Ffield_end, Sfield_end, 0, 3, 0, doc: /* Return the end of the field surrounding POS. A field is a region of text with the same `field' property. If POS is nil, the value of point is used for POS. @@ -678,7 +678,7 @@ is after LIMIT, then LIMIT will be returned instead. */) return make_number (end); } -DEFUE ("constrain-to-field", Fconstrain_to_field, Sconstrain_to_field, 2, 5, 0, +DEFUN ("constrain-to-field", Fconstrain_to_field, Sconstrain_to_field, 2, 5, 0, doc: /* Return the position closest to NEW-POS that is in the same field as OLD-POS. A field is a region of text with the same `field' property. @@ -787,7 +787,7 @@ Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil. */) } -DEFUE ("line-beginning-position", +DEFUN ("line-beginning-position", Fline_beginning_position, Sline_beginning_position, 0, 1, 0, doc: /* Return the character position of the first character on the current line. With argument N not nil or 1, move forward N - 1 lines first. @@ -829,7 +829,7 @@ This function does not move point. */) Qt, Qnil); } -DEFUE ("line-end-position", Fline_end_position, Sline_end_position, 0, 1, 0, +DEFUN ("line-end-position", Fline_end_position, Sline_end_position, 0, 1, 0, doc: /* Return the character position of the last character on the current line. With argument N not nil or 1, move forward N - 1 lines first. If scan reaches end of buffer, return that position. @@ -1048,7 +1048,7 @@ is in effect, in which case it is less. */) return temp; } -DEFUE ("point-max-marker", Fpoint_max_marker, Spoint_max_marker, 0, 0, 0, +DEFUN ("point-max-marker", Fpoint_max_marker, Spoint_max_marker, 0, 0, 0, doc: /* Return a marker to the maximum permissible value of point in this buffer. This is (1+ (buffer-size)), unless narrowing (a buffer restriction) is in effect, in which case it is less. */) @@ -1099,7 +1099,7 @@ If BYTEPOS is out of range, the value is nil. */) return make_number (BYTE_TO_CHAR (XINT (bytepos))); } -DEFUE ("following-char", Ffollowing_char, Sfollowing_char, 0, 0, 0, +DEFUN ("following-char", Ffollowing_char, Sfollowing_char, 0, 0, 0, doc: /* Return the character following point, as a number. At the end of the buffer or accessible region, return 0. */) (void) @@ -1112,7 +1112,7 @@ At the end of the buffer or accessible region, return 0. */) return temp; } -DEFUE ("preceding-char", Fprevious_char, Sprevious_char, 0, 0, 0, +DEFUN ("preceding-char", Fprevious_char, Sprevious_char, 0, 0, 0, doc: /* Return the character preceding point, as a number. At the beginning of the buffer or accessible region, return 0. */) (void) @@ -1131,7 +1131,7 @@ At the beginning of the buffer or accessible region, return 0. */) return temp; } -DEFUE ("bobp", Fbobp, Sbobp, 0, 0, 0, +DEFUN ("bobp", Fbobp, Sbobp, 0, 0, 0, doc: /* Return t if point is at the beginning of the buffer. If the buffer is narrowed, this means the beginning of the narrowed part. */) (void) @@ -1141,7 +1141,7 @@ If the buffer is narrowed, this means the beginning of the narrowed part. */) return Qnil; } -DEFUE ("eobp", Feobp, Seobp, 0, 0, 0, +DEFUN ("eobp", Feobp, Seobp, 0, 0, 0, doc: /* Return t if point is at the end of the buffer. If the buffer is narrowed, this means the end of the narrowed part. */) (void) @@ -1151,7 +1151,7 @@ If the buffer is narrowed, this means the end of the narrowed part. */) return Qnil; } -DEFUE ("bolp", Fbolp, Sbolp, 0, 0, 0, +DEFUN ("bolp", Fbolp, Sbolp, 0, 0, 0, doc: /* Return t if point is at the beginning of a line. */) (void) { @@ -1160,7 +1160,7 @@ DEFUE ("bolp", Fbolp, Sbolp, 0, 0, 0, return Qnil; } -DEFUE ("eolp", Feolp, Seolp, 0, 0, 0, +DEFUN ("eolp", Feolp, Seolp, 0, 0, 0, doc: /* Return t if point is at the end of a line. `End of a line' includes point being at the end of the buffer. */) (void) @@ -1170,7 +1170,7 @@ DEFUE ("eolp", Feolp, Seolp, 0, 0, 0, return Qnil; } -DEFUE ("char-after", Fchar_after, Schar_after, 0, 1, 0, +DEFUN ("char-after", Fchar_after, Schar_after, 0, 1, 0, doc: /* Return character in current buffer at position POS. POS is an integer or a marker and defaults to point. If POS is out of range, the value is nil. */) @@ -1247,7 +1247,7 @@ If POS is out of range, the value is nil. */) return val; } -DEFUE ("user-login-name", Fuser_login_name, Suser_login_name, 0, 1, 0, +DEFUN ("user-login-name", Fuser_login_name, Suser_login_name, 0, 1, 0, doc: /* Return the name under which the user logged in, as a string. This is based on the effective uid, not the real uid. Also, if the environment variables LOGNAME or USER are set, @@ -1387,7 +1387,7 @@ name, or nil if there is no such user. */) return full; } -DEFUE ("system-name", Fsystem_name, Ssystem_name, 0, 0, 0, +DEFUN ("system-name", Fsystem_name, Ssystem_name, 0, 0, 0, doc: /* Return the host name of the machine you are running on, as a string. */) (void) { @@ -1453,7 +1453,7 @@ lo_time (time_t t) return t & ((1 << 16) - 1); } -DEFUE ("current-time", Fcurrent_time, Scurrent_time, 0, 0, 0, +DEFUN ("current-time", Fcurrent_time, Scurrent_time, 0, 0, 0, doc: /* Return the current time, as the number of seconds since 1970-01-01 00:00:00. The time is returned as a list of three integers. The first has the most significant 16 bits of the seconds, while the second has the @@ -1472,7 +1472,7 @@ resolution finer than a second. */) make_number (EMACS_USECS (t))); } -DEFUE ("get-internal-run-time", Fget_internal_run_time, Sget_internal_run_time, +DEFUN ("get-internal-run-time", Fget_internal_run_time, Sget_internal_run_time, 0, 0, 0, doc: /* Return the current run time used by Emacs. The time is returned as a list of three integers. The first has the @@ -2246,7 +2246,7 @@ insert1 (Lisp_Object arg) not be used after calling insert or insert_from_string, so we don't care if it gets trashed. */ -DEFUE ("insert", Finsert, Sinsert, 0, MANY, 0, +DEFUN ("insert", Finsert, Sinsert, 0, MANY, 0, doc: /* Insert the arguments, either strings or characters, at point. Point and before-insertion markers move forward to end up after the inserted text. @@ -2326,7 +2326,7 @@ usage: (insert-before-markers-and-inherit &rest ARGS) */) return Qnil; } -DEFUE ("insert-char", Finsert_char, Sinsert_char, 2, 3, 0, +DEFUN ("insert-char", Finsert_char, Sinsert_char, 2, 3, 0, doc: /* Insert COUNT copies of CHARACTER. Point, and before-insertion markers, are relocated as in the function `insert'. The optional third arg INHERIT, if non-nil, says to inherit text properties @@ -2500,7 +2500,7 @@ update_buffer_properties (EMACS_INT start, EMACS_INT end) } } -DEFUE ("buffer-substring", Fbuffer_substring, Sbuffer_substring, 2, 2, 0, +DEFUN ("buffer-substring", Fbuffer_substring, Sbuffer_substring, 2, 2, 0, doc: /* Return the contents of part of the current buffer as a string. The two arguments START and END are character positions; they can be in either order. @@ -2536,7 +2536,7 @@ they can be in either order. */) return make_buffer_string (b, e, 0); } -DEFUE ("buffer-string", Fbuffer_string, Sbuffer_string, 0, 0, 0, +DEFUN ("buffer-string", Fbuffer_string, Sbuffer_string, 0, 0, 0, doc: /* Return the contents of the current buffer as a string. If narrowing is in effect, this function returns only the visible part of the buffer. */) @@ -3174,7 +3174,7 @@ It returns the number of characters changed. */) return make_number (cnt); } -DEFUE ("delete-region", Fdelete_region, Sdelete_region, 2, 2, "r", +DEFUN ("delete-region", Fdelete_region, Sdelete_region, 2, 2, "r", doc: /* Delete the text between point and mark. When called from a program, expects two arguments, @@ -3197,7 +3197,7 @@ DEFUN ("delete-and-extract-region", Fdelete_and_extract_region, return del_range_1 (XINT (start), XINT (end), 1, 1); } -DEFUE ("widen", Fwiden, Swiden, 0, 0, "", +DEFUN ("widen", Fwiden, Swiden, 0, 0, "", doc: /* Remove restrictions (narrowing) from current buffer. This allows the buffer's full text to be seen and edited. */) (void) @@ -3212,7 +3212,7 @@ This allows the buffer's full text to be seen and edited. */) return Qnil; } -DEFUE ("narrow-to-region", Fnarrow_to_region, Snarrow_to_region, 2, 2, "r", +DEFUN ("narrow-to-region", Fnarrow_to_region, Snarrow_to_region, 2, 2, "r", doc: /* Restrict editing in this buffer to the current region. The rest of the text becomes temporarily invisible and untouchable but is not deleted; if you save the buffer in a file, the invisible @@ -3373,7 +3373,7 @@ static char *message_text; /* Allocated length of that buffer. */ static int message_length; -DEFUE ("message", Fmessage, Smessage, 1, MANY, 0, +DEFUN ("message", Fmessage, Smessage, 1, MANY, 0, doc: /* Display a message at the bottom of the screen. The message also goes into the `*Messages*' buffer. \(In keyboard macros, that's all it does.) @@ -3485,7 +3485,7 @@ usage: (message-or-box FORMAT-STRING &rest ARGS) */) return Fmessage (nargs, args); } -DEFUE ("current-message", Fcurrent_message, Scurrent_message, 0, 0, 0, +DEFUN ("current-message", Fcurrent_message, Scurrent_message, 0, 0, 0, doc: /* Return the string currently displayed in the echo area, or nil if none. */) (void) { @@ -3534,7 +3534,7 @@ usage: (propertize STRING &rest PROPERTIES) */) ? count_size_as_multibyte (SDATA (STRING), SBYTES (STRING)) \ : SBYTES (STRING)) -DEFUE ("format", Fformat, Sformat, 1, MANY, 0, +DEFUN ("format", Fformat, Sformat, 1, MANY, 0, doc: /* Format a string out of a format-string and arguments. The first argument is a format control string. The other arguments are substituted into it to make the result, a string. diff --git a/src/emacs.c b/src/emacs.c index a3277109f01..cccd07417e1 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -1962,7 +1962,7 @@ sort_args (int argc, char **argv) xfree (priority); } -DEFUE ("kill-emacs", Fkill_emacs, Skill_emacs, 0, 1, "P", +DEFUN ("kill-emacs", Fkill_emacs, Skill_emacs, 0, 1, "P", doc: /* Exit the Emacs job and kill it. If ARG is an integer, return ARG as the exit program code. If ARG is a string, stuff it as keyboard input. diff --git a/src/eval.c b/src/eval.c index ef5eb6bdaaf..4d0786fc0d4 100644 --- a/src/eval.c +++ b/src/eval.c @@ -356,7 +356,7 @@ usage: (cond CLAUSES...) */) return val; } -DEFUE ("progn", Fprogn, Sprogn, 0, UNEVALLED, 0, +DEFUN ("progn", Fprogn, Sprogn, 0, UNEVALLED, 0, doc: /* Eval BODY forms sequentially and return value of last one. usage: (progn BODY...) */) (Lisp_Object args) @@ -521,7 +521,7 @@ usage: (function ARG) */) } -DEFUE ("interactive-p", Finteractive_p, Sinteractive_p, 0, 0, 0, +DEFUN ("interactive-p", Finteractive_p, Sinteractive_p, 0, 0, 0, doc: /* Return t if the containing function was run directly by user input. This means that the function was called with `call-interactively' \(which includes being called as the binding of a key) @@ -1327,7 +1327,7 @@ unwind_to_catch (struct catchtag *catch, Lisp_Object value) _longjmp (catch->jmp, 1); } -DEFUE ("throw", Fthrow, Sthrow, 2, 2, 0, +DEFUN ("throw", Fthrow, Sthrow, 2, 2, 0, doc: /* Throw to the catch for TAG and return VALUE from it. Both TAG and VALUE are evalled. */) (register Lisp_Object tag, Lisp_Object value) @@ -1657,7 +1657,7 @@ static Lisp_Object find_handler_clause (Lisp_Object, Lisp_Object, static int maybe_call_debugger (Lisp_Object conditions, Lisp_Object sig, Lisp_Object data); -DEFUE ("signal", Fsignal, Ssignal, 2, 2, 0, +DEFUN ("signal", Fsignal, Ssignal, 2, 2, 0, doc: /* Signal an error. Args are ERROR-SYMBOL and associated DATA. This function does not return. @@ -2041,7 +2041,7 @@ error (const char *m, ...) va_end (ap); } -DEFUE ("commandp", Fcommandp, Scommandp, 1, 2, 0, +DEFUN ("commandp", Fcommandp, Scommandp, 1, 2, 0, doc: /* Non-nil if FUNCTION makes provisions for interactive calling. This means it contains a description for how to read arguments to give it. The value is nil for an invalid function or a symbol with no function @@ -2222,7 +2222,7 @@ do_autoload (Lisp_Object fundef, Lisp_Object funname) } -DEFUE ("eval", Feval, Seval, 1, 2, 0, +DEFUN ("eval", Feval, Seval, 1, 2, 0, doc: /* Evaluate FORM and return its value. If LEXICAL is t, evaluate using lexical scoping. */) (Lisp_Object form, Lisp_Object lexical) @@ -2458,7 +2458,7 @@ eval_sub (Lisp_Object form) return val; } -DEFUE ("apply", Fapply, Sapply, 2, MANY, 0, +DEFUN ("apply", Fapply, Sapply, 2, MANY, 0, doc: /* Call FUNCTION with our remaining args, using our last arg as list of args. Then return the value FUNCTION returns. Thus, (apply '+ 1 2 '(3 4)) returns 10. @@ -2553,7 +2553,7 @@ funcall_nil (size_t nargs, Lisp_Object *args) return Qnil; } -DEFUE ("run-hooks", Frun_hooks, Srun_hooks, 0, MANY, 0, +DEFUN ("run-hooks", Frun_hooks, Srun_hooks, 0, MANY, 0, doc: /* Run each hook in HOOKS. Each argument should be a symbol, a hook variable. These symbols are processed in the order specified. @@ -2582,7 +2582,7 @@ usage: (run-hooks &rest HOOKS) */) return Qnil; } -DEFUE ("run-hook-with-args", Frun_hook_with_args, +DEFUN ("run-hook-with-args", Frun_hook_with_args, Srun_hook_with_args, 1, MANY, 0, doc: /* Run HOOK with the specified arguments ARGS. HOOK should be a symbol, a hook variable. If HOOK has a non-nil @@ -2628,7 +2628,7 @@ funcall_not (size_t nargs, Lisp_Object *args) return NILP (Ffuncall (nargs, args)) ? Qt : Qnil; } -DEFUE ("run-hook-with-args-until-failure", Frun_hook_with_args_until_failure, +DEFUN ("run-hook-with-args-until-failure", Frun_hook_with_args_until_failure, Srun_hook_with_args_until_failure, 1, MANY, 0, doc: /* Run HOOK with the specified arguments ARGS. HOOK should be a symbol, a hook variable. If HOOK has a non-nil @@ -2915,7 +2915,7 @@ call7 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3, /* The caller should GCPRO all the elements of ARGS. */ -DEFUE ("functionp", Ffunctionp, Sfunctionp, 1, 1, 0, +DEFUN ("functionp", Ffunctionp, Sfunctionp, 1, 1, 0, doc: /* Non-nil if OBJECT is a function. */) (Lisp_Object object) { @@ -2948,7 +2948,7 @@ DEFUE ("functionp", Ffunctionp, Sfunctionp, 1, 1, 0, return Qnil; } -DEFUE ("funcall", Ffuncall, Sfuncall, 1, MANY, 0, +DEFUN ("funcall", Ffuncall, Sfuncall, 1, MANY, 0, doc: /* Call first argument as a function, passing remaining arguments to it. Return the value that function returns. Thus, (funcall 'cons 'x 'y) returns (x . y). diff --git a/src/fileio.c b/src/fileio.c index 4c92510178a..d1e285959e2 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -241,7 +241,7 @@ Lisp_Object Qwrite_region; static Lisp_Object Qverify_visited_file_modtime; static Lisp_Object Qset_visited_file_modtime; -DEFUE ("find-file-name-handler", Ffind_file_name_handler, +DEFUN ("find-file-name-handler", Ffind_file_name_handler, Sfind_file_name_handler, 2, 2, 0, doc: /* Return FILENAME's handler function for OPERATION, if it has one. Otherwise, return nil. @@ -302,7 +302,7 @@ use the standard functions without calling themselves recursively. */) return result; } -DEFUE ("file-name-directory", Ffile_name_directory, Sfile_name_directory, +DEFUN ("file-name-directory", Ffile_name_directory, Sfile_name_directory, 1, 1, 0, doc: /* Return the directory component in file name FILENAME. Return nil if FILENAME does not include a directory. @@ -376,7 +376,7 @@ Given a Unix syntax file name, returns a string ending in slash. */) return make_specified_string (beg, -1, p - beg, STRING_MULTIBYTE (filename)); } -DEFUE ("file-name-nondirectory", Ffile_name_nondirectory, +DEFUN ("file-name-nondirectory", Ffile_name_nondirectory, Sfile_name_nondirectory, 1, 1, 0, doc: /* Return file name FILENAME sans its directory. For example, in a Unix-syntax file name, @@ -411,7 +411,7 @@ or the entire name if it contains no slash. */) return make_specified_string (p, -1, end - p, STRING_MULTIBYTE (filename)); } -DEFUE ("unhandled-file-name-directory", Funhandled_file_name_directory, +DEFUN ("unhandled-file-name-directory", Funhandled_file_name_directory, Sunhandled_file_name_directory, 1, 1, 0, doc: /* Return a directly usable directory name somehow associated with FILENAME. A `directly usable' directory name is one that may be used without the @@ -463,7 +463,7 @@ file_name_as_directory (char *out, const char *in) return out; } -DEFUE ("file-name-as-directory", Ffile_name_as_directory, +DEFUN ("file-name-as-directory", Ffile_name_as_directory, Sfile_name_as_directory, 1, 1, 0, doc: /* Return a string representing the file name FILE interpreted as a directory. This operation exists because a directory is also a file, but its name as @@ -522,7 +522,7 @@ directory_file_name (char *src, char *dst) return 1; } -DEFUE ("directory-file-name", Fdirectory_file_name, Sdirectory_file_name, +DEFUN ("directory-file-name", Fdirectory_file_name, Sdirectory_file_name, 1, 1, 0, doc: /* Returns the file name of the directory named DIRECTORY. This is the name of the file that holds the data for the directory DIRECTORY. @@ -704,7 +704,7 @@ probably use `make-temp-file' instead, except in three circumstances: -DEFUE ("expand-file-name", Fexpand_file_name, Sexpand_file_name, 1, 2, 0, +DEFUN ("expand-file-name", Fexpand_file_name, Sexpand_file_name, 1, 2, 0, doc: /* Convert filename NAME to absolute, and canonicalize it. Second arg DEFAULT-DIRECTORY is directory to start with if NAME is relative \(does not start with slash or tilde); if DEFAULT-DIRECTORY is nil or missing, @@ -1503,7 +1503,7 @@ search_embedded_absfilename (char *nm, char *endp) return NULL; } -DEFUE ("substitute-in-file-name", Fsubstitute_in_file_name, +DEFUN ("substitute-in-file-name", Fsubstitute_in_file_name, Ssubstitute_in_file_name, 1, 1, 0, doc: /* Substitute environment variables referred to in FILENAME. `$FOO' where FOO is an environment variable name means to substitute @@ -2346,7 +2346,7 @@ This happens for interactive use with M-x. */) } -DEFUE ("file-name-absolute-p", Ffile_name_absolute_p, Sfile_name_absolute_p, +DEFUN ("file-name-absolute-p", Ffile_name_absolute_p, Sfile_name_absolute_p, 1, 1, 0, doc: /* Return t if file FILENAME specifies an absolute file name. On Unix, this is a name starting with a `/' or a `~'. */) @@ -2402,7 +2402,7 @@ check_writable (const char *filename) #endif /* not MSDOS */ } -DEFUE ("file-exists-p", Ffile_exists_p, Sfile_exists_p, 1, 1, 0, +DEFUN ("file-exists-p", Ffile_exists_p, Sfile_exists_p, 1, 1, 0, doc: /* Return t if file FILENAME exists (whether or not you can read it.) See also `file-readable-p' and `file-attributes'. This returns nil for a symlink to a nonexistent file. @@ -2449,7 +2449,7 @@ For a directory, this means you can access files in that directory. */) return (check_executable (SSDATA (absname)) ? Qt : Qnil); } -DEFUE ("file-readable-p", Ffile_readable_p, Sfile_readable_p, 1, 1, 0, +DEFUN ("file-readable-p", Ffile_readable_p, Sfile_readable_p, 1, 1, 0, doc: /* Return t if file FILENAME exists and you can read it. See also `file-exists-p' and `file-attributes'. */) (Lisp_Object filename) @@ -2571,7 +2571,7 @@ If there is no error, returns nil. */) return Qnil; } -DEFUE ("file-symlink-p", Ffile_symlink_p, Sfile_symlink_p, 1, 1, 0, +DEFUN ("file-symlink-p", Ffile_symlink_p, Sfile_symlink_p, 1, 1, 0, doc: /* Return non-nil if file FILENAME is the name of a symbolic link. The value is the link target, as a string. Otherwise it returns nil. @@ -2609,7 +2609,7 @@ points to a nonexistent file. */) return val; } -DEFUE ("file-directory-p", Ffile_directory_p, Sfile_directory_p, 1, 1, 0, +DEFUN ("file-directory-p", Ffile_directory_p, Sfile_directory_p, 1, 1, 0, doc: /* Return t if FILENAME names an existing directory. Symbolic links to directories count as directories. See `file-symlink-p' to distinguish symlinks. */) @@ -2634,7 +2634,7 @@ See `file-symlink-p' to distinguish symlinks. */) return S_ISDIR (st.st_mode) ? Qt : Qnil; } -DEFUE ("file-accessible-directory-p", Ffile_accessible_directory_p, +DEFUN ("file-accessible-directory-p", Ffile_accessible_directory_p, Sfile_accessible_directory_p, 1, 1, 0, doc: /* Return t if file FILENAME names a directory you can open. For the value to be t, FILENAME must specify the name of a directory as a file, @@ -4354,7 +4354,7 @@ choose_write_coding_system (Lisp_Object start, Lisp_Object end, Lisp_Object file return val; } -DEFUE ("write-region", Fwrite_region, Swrite_region, 3, 7, +DEFUN ("write-region", Fwrite_region, Swrite_region, 3, 7, "r\nFWrite region to file: \ni\ni\ni\np", doc: /* Write current region into specified file. When called from a program, requires three arguments: @@ -4915,7 +4915,7 @@ e_write (int desc, Lisp_Object string, int start, int end, struct coding_system return 0; } -DEFUE ("verify-visited-file-modtime", Fverify_visited_file_modtime, +DEFUN ("verify-visited-file-modtime", Fverify_visited_file_modtime, Sverify_visited_file_modtime, 0, 1, 0, doc: /* Return t if last mod time of BUF's visited file matches what BUF records. This means that the file has not been changed since it was visited or saved. @@ -5136,7 +5136,7 @@ do_auto_save_eh (Lisp_Object ignore) return Qnil; } -DEFUE ("do-auto-save", Fdo_auto_save, Sdo_auto_save, 0, 2, "", +DEFUN ("do-auto-save", Fdo_auto_save, Sdo_auto_save, 0, 2, "", doc: /* Auto-save all buffers that need it. This is all buffers that have auto-saving enabled and are changed since last auto-saved. diff --git a/src/filelock.c b/src/filelock.c index c6b1617770c..13b27c72f19 100644 --- a/src/filelock.c +++ b/src/filelock.c @@ -639,7 +639,7 @@ or else nothing is done if current buffer isn't visiting a file. */) return Qnil; } -DEFUE ("unlock-buffer", Funlock_buffer, Sunlock_buffer, +DEFUN ("unlock-buffer", Funlock_buffer, Sunlock_buffer, 0, 0, 0, doc: /* Unlock the file visited in the current buffer. If the buffer is not modified, this does nothing because the file diff --git a/src/floatfns.c b/src/floatfns.c index 345b3b94947..1232fc0afa1 100644 --- a/src/floatfns.c +++ b/src/floatfns.c @@ -683,7 +683,7 @@ DEFUN ("abs", Fabs, Sabs, 1, 1, 0, return arg; } -DEFUE ("float", Ffloat, Sfloat, 1, 1, 0, +DEFUN ("float", Ffloat, Sfloat, 1, 1, 0, doc: /* Return the floating point number equal to ARG. */) (register Lisp_Object arg) { @@ -886,7 +886,7 @@ systems, but 2 on others. */) return rounding_driver (arg, divisor, emacs_rint, round2, "round"); } -DEFUE ("truncate", Ftruncate, Struncate, 1, 2, 0, +DEFUN ("truncate", Ftruncate, Struncate, 1, 2, 0, doc: /* Truncate a floating point number to an int. Rounds ARG toward zero. With optional DIVISOR, truncate ARG/DIVISOR. */) diff --git a/src/fns.c b/src/fns.c index 2fee34eaf22..d3009775b81 100644 --- a/src/fns.c +++ b/src/fns.c @@ -62,7 +62,7 @@ static int internal_equal (Lisp_Object , Lisp_Object, int, int); extern long time (); #endif -DEFUE ("identity", Fidentity, Sidentity, 1, 1, 0, +DEFUN ("identity", Fidentity, Sidentity, 1, 1, 0, doc: /* Return the argument unchanged. */) (Lisp_Object arg) { @@ -106,7 +106,7 @@ Other values of LIMIT are ignored. */) /* Random data-structure functions */ -DEFUE ("length", Flength, Slength, 1, 1, 0, +DEFUN ("length", Flength, Slength, 1, 1, 0, doc: /* Return the length of vector, list or string SEQUENCE. A byte-code function object is also allowed. If the string contains multibyte characters, this is not necessarily @@ -191,7 +191,7 @@ If STRING is multibyte, this may be greater than the length of STRING. */) return make_number (SBYTES (string)); } -DEFUE ("string-equal", Fstring_equal, Sstring_equal, 2, 2, 0, +DEFUN ("string-equal", Fstring_equal, Sstring_equal, 2, 2, 0, doc: /* Return t if two strings have identical contents. Case is significant, but text properties are ignored. Symbols are also allowed; their print names are used instead. */) @@ -211,7 +211,7 @@ Symbols are also allowed; their print names are used instead. */) return Qt; } -DEFUE ("compare-strings", Fcompare_strings, Scompare_strings, 6, 7, 0, +DEFUN ("compare-strings", Fcompare_strings, Scompare_strings, 6, 7, 0, doc: /* Compare the contents of two strings, converting to multibyte if needed. In string STR1, skip the first START1 characters and stop at END1. In string STR2, skip the first START2 characters and stop at END2. @@ -312,7 +312,7 @@ If string STR1 is greater, the value is a positive number N; return Qt; } -DEFUE ("string-lessp", Fstring_lessp, Sstring_lessp, 2, 2, 0, +DEFUN ("string-lessp", Fstring_lessp, Sstring_lessp, 2, 2, 0, doc: /* Return t if first arg string is less than second in lexicographic order. Case is significant. Symbols are also allowed; their print names are used instead. */) @@ -373,7 +373,7 @@ concat3 (Lisp_Object s1, Lisp_Object s2, Lisp_Object s3) return concat (3, args, Lisp_String, 0); } -DEFUE ("append", Fappend, Sappend, 0, MANY, 0, +DEFUN ("append", Fappend, Sappend, 0, MANY, 0, doc: /* Concatenate all the arguments and make the result a list. The result is a list whose elements are the elements of all the arguments. Each argument may be a list, vector or string. @@ -384,7 +384,7 @@ usage: (append &rest SEQUENCES) */) return concat (nargs, args, Lisp_Cons, 1); } -DEFUE ("concat", Fconcat, Sconcat, 0, MANY, 0, +DEFUN ("concat", Fconcat, Sconcat, 0, MANY, 0, doc: /* Concatenate all the arguments and make the result a string. The result is a string whose elements are the elements of all the arguments. Each argument may be a string or a list or vector of characters (integers). @@ -394,7 +394,7 @@ usage: (concat &rest SEQUENCES) */) return concat (nargs, args, Lisp_String, 0); } -DEFUE ("vconcat", Fvconcat, Svconcat, 0, MANY, 0, +DEFUN ("vconcat", Fvconcat, Svconcat, 0, MANY, 0, doc: /* Concatenate all the arguments and make the result a vector. The result is a vector whose elements are the elements of all the arguments. Each argument may be a list, vector or string. @@ -405,7 +405,7 @@ usage: (vconcat &rest SEQUENCES) */) } -DEFUE ("copy-sequence", Fcopy_sequence, Scopy_sequence, 1, 1, 0, +DEFUN ("copy-sequence", Fcopy_sequence, Scopy_sequence, 1, 1, 0, doc: /* Return a copy of a list, vector, string or char-table. The elements of a list or vector are not copied; they are shared with the original. */) @@ -945,7 +945,7 @@ string_make_unibyte (Lisp_Object string) return ret; } -DEFUE ("string-make-multibyte", Fstring_make_multibyte, Sstring_make_multibyte, +DEFUN ("string-make-multibyte", Fstring_make_multibyte, Sstring_make_multibyte, 1, 1, 0, doc: /* Return the multibyte equivalent of STRING. If STRING is unibyte and contains non-ASCII characters, the function @@ -963,7 +963,7 @@ string the same way whether it is unibyte or multibyte.) */) return string_make_multibyte (string); } -DEFUE ("string-make-unibyte", Fstring_make_unibyte, Sstring_make_unibyte, +DEFUN ("string-make-unibyte", Fstring_make_unibyte, Sstring_make_unibyte, 1, 1, 0, doc: /* Return the unibyte equivalent of STRING. Multibyte character codes are converted to unibyte according to @@ -977,7 +977,7 @@ the low 8 bits of each character. */) return string_make_unibyte (string); } -DEFUE ("string-as-unibyte", Fstring_as_unibyte, Sstring_as_unibyte, +DEFUN ("string-as-unibyte", Fstring_as_unibyte, Sstring_as_unibyte, 1, 1, 0, doc: /* Return a unibyte string with the same individual bytes as STRING. If STRING is unibyte, the result is STRING itself. @@ -1001,7 +1001,7 @@ If STRING is multibyte and contains a character of charset return string; } -DEFUE ("string-as-multibyte", Fstring_as_multibyte, Sstring_as_multibyte, +DEFUN ("string-as-multibyte", Fstring_as_multibyte, Sstring_as_multibyte, 1, 1, 0, doc: /* Return a multibyte string with the same individual bytes as STRING. If STRING is multibyte, the result is STRING itself. @@ -1039,7 +1039,7 @@ If you're not sure, whether to use `string-as-multibyte' or return string; } -DEFUE ("string-to-multibyte", Fstring_to_multibyte, Sstring_to_multibyte, +DEFUN ("string-to-multibyte", Fstring_to_multibyte, Sstring_to_multibyte, 1, 1, 0, doc: /* Return a multibyte string with the same individual chars as STRING. If STRING is multibyte, the result is STRING itself. @@ -1085,7 +1085,7 @@ an error is signaled. */) } -DEFUE ("copy-alist", Fcopy_alist, Scopy_alist, 1, 1, 0, +DEFUN ("copy-alist", Fcopy_alist, Scopy_alist, 1, 1, 0, doc: /* Return a copy of ALIST. This is an alist which represents the same mapping from objects to objects, but does not share the alist structure with ALIST. @@ -1111,7 +1111,7 @@ Elements of ALIST that are not conses are also shared. */) return alist; } -DEFUE ("substring", Fsubstring, Ssubstring, 2, 3, 0, +DEFUN ("substring", Fsubstring, Ssubstring, 2, 3, 0, doc: /* Return a new string whose contents are a substring of STRING. The returned string consists of the characters between index FROM \(inclusive) and index TO (exclusive) of STRING. FROM and TO are @@ -1270,7 +1270,7 @@ substring_both (Lisp_Object string, EMACS_INT from, EMACS_INT from_byte, return res; } -DEFUE ("nthcdr", Fnthcdr, Snthcdr, 2, 2, 0, +DEFUN ("nthcdr", Fnthcdr, Snthcdr, 2, 2, 0, doc: /* Take cdr N times on LIST, return the result. */) (Lisp_Object n, Lisp_Object list) { @@ -1286,7 +1286,7 @@ DEFUE ("nthcdr", Fnthcdr, Snthcdr, 2, 2, 0, return list; } -DEFUE ("nth", Fnth, Snth, 2, 2, 0, +DEFUN ("nth", Fnth, Snth, 2, 2, 0, doc: /* Return the Nth element of LIST. N counts from zero. If LIST is not that long, nil is returned. */) (Lisp_Object n, Lisp_Object list) @@ -1294,7 +1294,7 @@ N counts from zero. If LIST is not that long, nil is returned. */) return Fcar (Fnthcdr (n, list)); } -DEFUE ("elt", Felt, Selt, 2, 2, 0, +DEFUN ("elt", Felt, Selt, 2, 2, 0, doc: /* Return element of SEQUENCE at index N. */) (register Lisp_Object sequence, Lisp_Object n) { @@ -1307,7 +1307,7 @@ DEFUE ("elt", Felt, Selt, 2, 2, 0, return Faref (sequence, n); } -DEFUE ("member", Fmember, Smember, 2, 2, 0, +DEFUN ("member", Fmember, Smember, 2, 2, 0, doc: /* Return non-nil if ELT is an element of LIST. Comparison done with `equal'. The value is actually the tail of LIST whose car is ELT. */) (register Lisp_Object elt, Lisp_Object list) @@ -1325,7 +1325,7 @@ The value is actually the tail of LIST whose car is ELT. */) return Qnil; } -DEFUE ("memq", Fmemq, Smemq, 2, 2, 0, +DEFUN ("memq", Fmemq, Smemq, 2, 2, 0, doc: /* Return non-nil if ELT is an element of LIST. Comparison done with `eq'. The value is actually the tail of LIST whose car is ELT. */) (register Lisp_Object elt, Lisp_Object list) @@ -1373,7 +1373,7 @@ The value is actually the tail of LIST whose car is ELT. */) return Qnil; } -DEFUE ("assq", Fassq, Sassq, 2, 2, 0, +DEFUN ("assq", Fassq, Sassq, 2, 2, 0, doc: /* Return non-nil if KEY is `eq' to the car of an element of LIST. The value is actually the first element of LIST whose car is KEY. Elements of LIST that are not conses are ignored. */) @@ -1419,7 +1419,7 @@ assq_no_quit (Lisp_Object key, Lisp_Object list) return CAR_SAFE (list); } -DEFUE ("assoc", Fassoc, Sassoc, 2, 2, 0, +DEFUN ("assoc", Fassoc, Sassoc, 2, 2, 0, doc: /* Return non-nil if KEY is `equal' to the car of an element of LIST. The value is actually the first element of LIST whose car equals KEY. */) (Lisp_Object key, Lisp_Object list) @@ -1470,7 +1470,7 @@ assoc_no_quit (Lisp_Object key, Lisp_Object list) return CONSP (list) ? XCAR (list) : Qnil; } -DEFUE ("rassq", Frassq, Srassq, 2, 2, 0, +DEFUN ("rassq", Frassq, Srassq, 2, 2, 0, doc: /* Return non-nil if KEY is `eq' to the cdr of an element of LIST. The value is actually the first element of LIST whose cdr is KEY. */) (register Lisp_Object key, Lisp_Object list) @@ -1501,7 +1501,7 @@ The value is actually the first element of LIST whose cdr is KEY. */) return CAR (list); } -DEFUE ("rassoc", Frassoc, Srassoc, 2, 2, 0, +DEFUN ("rassoc", Frassoc, Srassoc, 2, 2, 0, doc: /* Return non-nil if KEY is `equal' to the cdr of an element of LIST. The value is actually the first element of LIST whose cdr equals KEY. */) (Lisp_Object key, Lisp_Object list) @@ -1537,7 +1537,7 @@ The value is actually the first element of LIST whose cdr equals KEY. */) return CAR (list); } -DEFUE ("delq", Fdelq, Sdelq, 2, 2, 0, +DEFUN ("delq", Fdelq, Sdelq, 2, 2, 0, doc: /* Delete by side effect any occurrences of ELT as a member of LIST. The modified LIST is returned. Comparison is done with `eq'. If the first member of LIST is ELT, there is no way to remove it by side effect; @@ -1569,7 +1569,7 @@ to be sure of changing the value of `foo'. */) return list; } -DEFUE ("delete", Fdelete, Sdelete, 2, 2, 0, +DEFUN ("delete", Fdelete, Sdelete, 2, 2, 0, doc: /* Delete by side effect any occurrences of ELT as a member of SEQ. SEQ must be a list, a vector, or a string. The modified SEQ is returned. Comparison is done with `equal'. @@ -1689,7 +1689,7 @@ to be sure of changing the value of `foo'. */) return seq; } -DEFUE ("nreverse", Fnreverse, Snreverse, 1, 1, 0, +DEFUN ("nreverse", Fnreverse, Snreverse, 1, 1, 0, doc: /* Reverse LIST by modifying cdr pointers. Return the reversed list. */) (Lisp_Object list) @@ -1711,7 +1711,7 @@ Return the reversed list. */) return prev; } -DEFUE ("reverse", Freverse, Sreverse, 1, 1, 0, +DEFUN ("reverse", Freverse, Sreverse, 1, 1, 0, doc: /* Reverse LIST, copying. Return the reversed list. See also the function `nreverse', which is used more often. */) (Lisp_Object list) @@ -1729,7 +1729,7 @@ See also the function `nreverse', which is used more often. */) Lisp_Object merge (Lisp_Object org_l1, Lisp_Object org_l2, Lisp_Object pred); -DEFUE ("sort", Fsort, Ssort, 2, 2, 0, +DEFUN ("sort", Fsort, Ssort, 2, 2, 0, doc: /* Sort LIST, stably, comparing elements using PREDICATE. Returns the sorted list. LIST is modified by side effects. PREDICATE is called with two elements of LIST, and should return non-nil @@ -1820,7 +1820,7 @@ merge (Lisp_Object org_l1, Lisp_Object org_l2, Lisp_Object pred) /* This does not check for quits. That is safe since it must terminate. */ -DEFUE ("plist-get", Fplist_get, Splist_get, 2, 2, 0, +DEFUN ("plist-get", Fplist_get, Splist_get, 2, 2, 0, doc: /* Extract a value from a property list. PLIST is a property list, which is a list of the form \(PROP1 VALUE1 PROP2 VALUE2...). This function returns the value @@ -1853,7 +1853,7 @@ properties on the list. This function never signals an error. */) return Qnil; } -DEFUE ("get", Fget, Sget, 2, 2, 0, +DEFUN ("get", Fget, Sget, 2, 2, 0, doc: /* Return the value of SYMBOL's PROPNAME property. This is the last value stored with `(put SYMBOL PROPNAME VALUE)'. */) (Lisp_Object symbol, Lisp_Object propname) @@ -1862,7 +1862,7 @@ This is the last value stored with `(put SYMBOL PROPNAME VALUE)'. */) return Fplist_get (XSYMBOL (symbol)->plist, propname); } -DEFUE ("plist-put", Fplist_put, Splist_put, 3, 3, 0, +DEFUN ("plist-put", Fplist_put, Splist_put, 3, 3, 0, doc: /* Change value in PLIST of PROP to VAL. PLIST is a property list, which is a list of the form \(PROP1 VALUE1 PROP2 VALUE2 ...). PROP is a symbol and VAL is any object. @@ -1895,7 +1895,7 @@ The PLIST is modified by side effects. */) return plist; } -DEFUE ("put", Fput, Sput, 3, 3, 0, +DEFUN ("put", Fput, Sput, 3, 3, 0, doc: /* Store SYMBOL's PROPNAME property with value VALUE. It can be retrieved with `(get SYMBOL PROPNAME)'. */) (Lisp_Object symbol, Lisp_Object propname, Lisp_Object value) @@ -1975,7 +1975,7 @@ Floating-point numbers of equal value are `eql', but they may not be `eq'. */) return EQ (obj1, obj2) ? Qt : Qnil; } -DEFUE ("equal", Fequal, Sequal, 2, 2, 0, +DEFUN ("equal", Fequal, Sequal, 2, 2, 0, doc: /* Return t if two Lisp objects have similar structure and contents. They must have the same data type. Conses are compared by comparing the cars and the cdrs. @@ -2223,7 +2223,7 @@ nconc2 (Lisp_Object s1, Lisp_Object s2) return Fnconc (2, args); } -DEFUE ("nconc", Fnconc, Snconc, 0, MANY, 0, +DEFUN ("nconc", Fnconc, Snconc, 0, MANY, 0, doc: /* Concatenate any number of lists by altering them. Only the last argument is not altered, and need not be a list. usage: (nconc &rest LISTS) */) @@ -2343,7 +2343,7 @@ mapcar1 (EMACS_INT leni, Lisp_Object *vals, Lisp_Object fn, Lisp_Object seq) UNGCPRO; } -DEFUE ("mapconcat", Fmapconcat, Smapconcat, 3, 3, 0, +DEFUN ("mapconcat", Fmapconcat, Smapconcat, 3, 3, 0, doc: /* Apply FUNCTION to each element of SEQUENCE, and concat the results as strings. In between each pair of results, stick in SEPARATOR. Thus, " " as SEPARATOR results in spaces between the values returned by FUNCTION. @@ -2384,7 +2384,7 @@ SEQUENCE may be a list, a vector, a bool-vector, or a string. */) return ret; } -DEFUE ("mapcar", Fmapcar, Smapcar, 2, 2, 0, +DEFUN ("mapcar", Fmapcar, Smapcar, 2, 2, 0, doc: /* Apply FUNCTION to each element of SEQUENCE, and make a list of the results. The result is a list just as long as SEQUENCE. SEQUENCE may be a list, a vector, a bool-vector, or a string. */) @@ -2562,7 +2562,7 @@ SUBFEATURE can be used to check a specific subfeature of FEATURE. */) return (NILP (tem)) ? Qnil : Qt; } -DEFUE ("provide", Fprovide, Sprovide, 1, 2, 0, +DEFUN ("provide", Fprovide, Sprovide, 1, 2, 0, doc: /* Announce that FEATURE is a feature of the current Emacs. The optional argument SUBFEATURES should be a list of symbols listing particular subfeatures supported in this version of FEATURE. */) @@ -2700,7 +2700,7 @@ The normal messages at start and end of loading FILENAME are suppressed. */) bottleneck of Widget operation. Here is their translation to C, for the sole reason of efficiency. */ -DEFUE ("plist-member", Fplist_member, Splist_member, 2, 2, 0, +DEFUN ("plist-member", Fplist_member, Splist_member, 2, 2, 0, doc: /* Return non-nil if PLIST has the property PROP. PLIST is a property list, which is a list of the form \(PROP1 VALUE1 PROP2 VALUE2 ...\). PROP is a symbol. @@ -4250,7 +4250,7 @@ DEFUN ("sxhash", Fsxhash, Ssxhash, 1, 1, 0, } -DEFUE ("make-hash-table", Fmake_hash_table, Smake_hash_table, 0, MANY, 0, +DEFUN ("make-hash-table", Fmake_hash_table, Smake_hash_table, 0, MANY, 0, doc: /* Create and return a new hash table. Arguments are specified as keyword/argument pairs. The following @@ -4438,7 +4438,7 @@ DEFUN ("clrhash", Fclrhash, Sclrhash, 1, 1, 0, } -DEFUE ("gethash", Fgethash, Sgethash, 2, 3, 0, +DEFUN ("gethash", Fgethash, Sgethash, 2, 3, 0, doc: /* Look up KEY in TABLE and return its associated value. If KEY is not found, return DFLT which defaults to nil. */) (Lisp_Object key, Lisp_Object table, Lisp_Object dflt) @@ -4449,7 +4449,7 @@ If KEY is not found, return DFLT which defaults to nil. */) } -DEFUE ("puthash", Fputhash, Sputhash, 3, 3, 0, +DEFUN ("puthash", Fputhash, Sputhash, 3, 3, 0, doc: /* Associate KEY with VALUE in hash table TABLE. If KEY is already present in table, replace its current value with VALUE. */) @@ -4469,7 +4469,7 @@ VALUE. */) } -DEFUE ("remhash", Fremhash, Sremhash, 2, 2, 0, +DEFUN ("remhash", Fremhash, Sremhash, 2, 2, 0, doc: /* Remove KEY from TABLE. */) (Lisp_Object key, Lisp_Object table) { diff --git a/src/font.c b/src/font.c index 6f27e3b9c67..7d8b94bddf2 100644 --- a/src/font.c +++ b/src/font.c @@ -3764,7 +3764,7 @@ which kind of font it is. It must be one of `font-spec', `font-entity', wrong_type_argument (intern ("font-extra-type"), extra_type); } -DEFUE ("font-spec", Ffont_spec, Sfont_spec, 0, MANY, 0, +DEFUN ("font-spec", Ffont_spec, Sfont_spec, 0, MANY, 0, doc: /* Return a newly created font-spec with arguments as properties. ARGS must come in pairs KEY VALUE of font properties. KEY must be a @@ -3923,7 +3923,7 @@ merge_font_spec (Lisp_Object from, Lisp_Object to) return to; } -DEFUE ("font-get", Ffont_get, Sfont_get, 2, 2, 0, +DEFUN ("font-get", Ffont_get, Sfont_get, 2, 2, 0, doc: /* Return the value of FONT's property KEY. FONT is a font-spec, a font-entity, or a font-object. KEY is any symbol, but these are reserved for specific meanings: @@ -4055,7 +4055,7 @@ are to be displayed on. If omitted, the selected frame is used. */) #endif -DEFUE ("font-put", Ffont_put, Sfont_put, 3, 3, 0, +DEFUN ("font-put", Ffont_put, Sfont_put, 3, 3, 0, doc: /* Set one property of FONT: give property KEY value VAL. FONT is a font-spec, a font-entity, or a font-object. @@ -4089,7 +4089,7 @@ accepted by `font-spec'. */) return val; } -DEFUE ("list-fonts", Flist_fonts, Slist_fonts, 1, 4, 0, +DEFUN ("list-fonts", Flist_fonts, Slist_fonts, 1, 4, 0, doc: /* List available fonts matching FONT-SPEC on the current frame. Optional 2nd argument FRAME specifies the target frame. Optional 3rd argument NUM, if non-nil, limits the number of returned fonts. @@ -4183,7 +4183,7 @@ Optional 2nd argument FRAME, if non-nil, specifies the target frame. */) return val; } -DEFUE ("font-xlfd-name", Ffont_xlfd_name, Sfont_xlfd_name, 1, 2, 0, +DEFUN ("font-xlfd-name", Ffont_xlfd_name, Sfont_xlfd_name, 1, 2, 0, doc: /* Return XLFD name of FONT. FONT is a font-spec, font-entity, or font-object. If the name is too long for XLFD (maximum 255 chars), return nil. @@ -4405,7 +4405,7 @@ where #if 0 -DEFUE ("font-drive-otf", Ffont_drive_otf, Sfont_drive_otf, 6, 6, 0, +DEFUN ("font-drive-otf", Ffont_drive_otf, Sfont_drive_otf, 6, 6, 0, doc: /* Apply OpenType features on glyph-string GSTRING-IN. OTF-FEATURES specifies which features to apply in this format: (SCRIPT LANGSYS GSUB GPOS) @@ -4475,7 +4475,7 @@ glyph-string. */) return make_number (num); } -DEFUE ("font-otf-alternates", Ffont_otf_alternates, Sfont_otf_alternates, +DEFUN ("font-otf-alternates", Ffont_otf_alternates, Sfont_otf_alternates, 3, 3, 0, doc: /* Return a list of alternate glyphs of CHARACTER in FONT-OBJECT. OTF-FEATURES specifies which features of the font FONT-OBJECT to apply diff --git a/src/fontset.c b/src/fontset.c index 5aa65c85110..a40a3dd5f9c 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -1176,7 +1176,7 @@ fs_query_fontset (Lisp_Object name, int name_pattern) } -DEFUE ("query-fontset", Fquery_fontset, Squery_fontset, 1, 2, 0, +DEFUN ("query-fontset", Fquery_fontset, Squery_fontset, 1, 2, 0, doc: /* Return the name of a fontset that matches PATTERN. The value is nil if there is no matching fontset. PATTERN can contain `*' or `?' as a wildcard @@ -2142,7 +2142,7 @@ dump_fontset (Lisp_Object fontset) return vec; } -DEFUE ("fontset-list-all", Ffontset_list_all, Sfontset_list_all, 0, 0, 0, +DEFUN ("fontset-list-all", Ffontset_list_all, Sfontset_list_all, 0, 0, 0, doc: /* Return a brief summary of all fontsets for debug use. */) (void) { diff --git a/src/frame.c b/src/frame.c index 79e0b40a319..cafcd149503 100644 --- a/src/frame.c +++ b/src/frame.c @@ -230,7 +230,7 @@ return values. */) : Qnil); } -DEFUE ("window-system", Fwindow_system, Swindow_system, 0, 1, 0, +DEFUN ("window-system", Fwindow_system, Swindow_system, 0, 1, 0, doc: /* The name of the window system that FRAME is displaying through. The value is a symbol: nil for a termcap frame (a character-only terminal), @@ -861,7 +861,7 @@ do_switch_frame (Lisp_Object frame, int track, int for_deletion, Lisp_Object nor return frame; } -DEFUE ("select-frame", Fselect_frame, Sselect_frame, 1, 2, "e", +DEFUN ("select-frame", Fselect_frame, Sselect_frame, 1, 2, "e", doc: /* Select FRAME. Subsequent editing commands apply to its selected window. Optional argument NORECORD means to neither change the order of @@ -899,14 +899,14 @@ to that frame. */) return do_switch_frame (event, 0, 0, Qnil); } -DEFUE ("selected-frame", Fselected_frame, Sselected_frame, 0, 0, 0, +DEFUN ("selected-frame", Fselected_frame, Sselected_frame, 0, 0, 0, doc: /* Return the frame that is now selected. */) (void) { return selected_frame; } -DEFUE ("window-frame", Fwindow_frame, Swindow_frame, 1, 1, 0, +DEFUN ("window-frame", Fwindow_frame, Swindow_frame, 1, 1, 0, doc: /* Return the frame object that window WINDOW is on. */) (Lisp_Object window) { @@ -914,7 +914,7 @@ DEFUE ("window-frame", Fwindow_frame, Swindow_frame, 1, 1, 0, return XWINDOW (window)->frame; } -DEFUE ("frame-first-window", Fframe_first_window, Sframe_first_window, 0, 1, 0, +DEFUN ("frame-first-window", Fframe_first_window, Sframe_first_window, 0, 1, 0, doc: /* Returns the topmost, leftmost window of FRAME. If omitted, FRAME defaults to the currently selected frame. */) (Lisp_Object frame) @@ -948,7 +948,7 @@ DEFUN ("active-minibuffer-window", Factive_minibuffer_window, return minibuf_level ? minibuf_window : Qnil; } -DEFUE ("frame-root-window", Fframe_root_window, Sframe_root_window, 0, 1, 0, +DEFUN ("frame-root-window", Fframe_root_window, Sframe_root_window, 0, 1, 0, doc: /* Returns the root-window of FRAME. If omitted, FRAME defaults to the currently selected frame. */) (Lisp_Object frame) @@ -985,7 +985,7 @@ FRAME defaults to the currently selected frame. */) return window; } -DEFUE ("set-frame-selected-window", Fset_frame_selected_window, +DEFUN ("set-frame-selected-window", Fset_frame_selected_window, Sset_frame_selected_window, 2, 3, 0, doc: /* Set selected window of FRAME to WINDOW. If FRAME is nil, use the selected frame. If FRAME is the @@ -1781,7 +1781,7 @@ before calling this function on it, like this. static void make_frame_visible_1 (Lisp_Object); -DEFUE ("make-frame-visible", Fmake_frame_visible, Smake_frame_visible, +DEFUN ("make-frame-visible", Fmake_frame_visible, Smake_frame_visible, 0, 1, "", doc: /* Make the frame FRAME visible (assuming it is an X window). If omitted, FRAME defaults to the currently selected frame. */) @@ -1881,7 +1881,7 @@ displayed in the terminal. */) return Qnil; } -DEFUE ("iconify-frame", Ficonify_frame, Siconify_frame, +DEFUN ("iconify-frame", Ficonify_frame, Siconify_frame, 0, 1, "", doc: /* Make the frame FRAME into an icon. If omitted, FRAME defaults to the currently selected frame. */) @@ -1966,7 +1966,7 @@ DEFUN ("visible-frame-list", Fvisible_frame_list, Svisible_frame_list, } -DEFUE ("raise-frame", Fraise_frame, Sraise_frame, 0, 1, "", +DEFUN ("raise-frame", Fraise_frame, Sraise_frame, 0, 1, "", doc: /* Bring FRAME to the front, so it occludes any frames it overlaps. If FRAME is invisible or iconified, make it visible. If you don't specify a frame, the selected frame is used. @@ -2019,7 +2019,7 @@ doesn't support multiple overlapping frames, this function does nothing. */) } -DEFUE ("redirect-frame-focus", Fredirect_frame_focus, Sredirect_frame_focus, +DEFUN ("redirect-frame-focus", Fredirect_frame_focus, Sredirect_frame_focus, 1, 2, 0, doc: /* Arrange for keystrokes typed at FRAME to be sent to FOCUS-FRAME. In other words, switch-frame events caused by events in FRAME will @@ -2400,7 +2400,7 @@ If FRAME is omitted, return information on the currently selected frame. */) } -DEFUE ("frame-parameter", Fframe_parameter, Sframe_parameter, 2, 2, 0, +DEFUN ("frame-parameter", Fframe_parameter, Sframe_parameter, 2, 2, 0, doc: /* Return FRAME's value for parameter PARAMETER. If FRAME is nil, describe the currently selected frame. */) (Lisp_Object frame, Lisp_Object parameter) @@ -2478,7 +2478,7 @@ If FRAME is nil, describe the currently selected frame. */) } -DEFUE ("modify-frame-parameters", Fmodify_frame_parameters, +DEFUN ("modify-frame-parameters", Fmodify_frame_parameters, Smodify_frame_parameters, 2, 2, 0, doc: /* Modify the parameters of frame FRAME according to ALIST. If FRAME is nil, it defaults to the selected frame. diff --git a/src/image.c b/src/image.c index 11c6aa8a17d..5e5d3509eaa 100644 --- a/src/image.c +++ b/src/image.c @@ -7874,7 +7874,7 @@ static struct image_type imagemagick_type = }; -DEFUE ("imagemagick-types", Fimagemagick_types, Simagemagick_types, 0, 0, 0, +DEFUN ("imagemagick-types", Fimagemagick_types, Simagemagick_types, 0, 0, 0, doc: /* Return the image types supported by ImageMagick. Note that ImageMagick recognizes many file-types that Emacs does not recognize as images, such as .c. */) @@ -8585,7 +8585,7 @@ x_kill_gs_process (Pixmap pixmap, struct frame *f) #if GLYPH_DEBUG -DEFUE ("imagep", Fimagep, Simagep, 1, 1, 0, +DEFUN ("imagep", Fimagep, Simagep, 1, 1, 0, doc: /* Value is non-nil if SPEC is a valid image specification. */) (Lisp_Object spec) { @@ -8593,7 +8593,7 @@ DEFUE ("imagep", Fimagep, Simagep, 1, 1, 0, } -DEFUE ("lookup-image", Flookup_image, Slookup_image, 1, 1, 0, "") +DEFUN ("lookup-image", Flookup_image, Slookup_image, 1, 1, 0, "") (Lisp_Object spec) { int id = -1; diff --git a/src/indent.c b/src/indent.c index 5eab4f48f69..0bfe2e61ca6 100644 --- a/src/indent.c +++ b/src/indent.c @@ -796,7 +796,7 @@ string_display_width (string, beg, end) #endif /* 0 */ -DEFUE ("indent-to", Findent_to, Sindent_to, 1, 2, "NIndent to column: ", +DEFUN ("indent-to", Findent_to, Sindent_to, 1, 2, "NIndent to column: ", doc: /* Indent from point with tabs and spaces until COLUMN is reached. Optional second argument MINIMUM says always do at least MINIMUM spaces even if that goes past COLUMN; by default, MINIMUM is zero. @@ -967,7 +967,7 @@ indented_beyond_p (EMACS_INT pos, EMACS_INT pos_byte, EMACS_INT column) return val >= column; } -DEFUE ("move-to-column", Fmove_to_column, Smove_to_column, 1, 2, "p", +DEFUN ("move-to-column", Fmove_to_column, Smove_to_column, 1, 2, "p", doc: /* Move point to column COLUMN in the current line. Interactively, COLUMN is the value of prefix numeric argument. The column of a character is calculated by adding together the widths @@ -1959,7 +1959,7 @@ vmotion (register EMACS_INT from, register EMACS_INT vtarget, struct window *w) w); } -DEFUE ("vertical-motion", Fvertical_motion, Svertical_motion, 1, 2, 0, +DEFUN ("vertical-motion", Fvertical_motion, Svertical_motion, 1, 2, 0, doc: /* Move point to start of the screen line LINES lines down. If LINES is negative, this means moving up. diff --git a/src/keyboard.c b/src/keyboard.c index 1e673c493b6..29062a77e32 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -781,7 +781,7 @@ force_auto_save_soon (void) } #endif -DEFUE ("recursive-edit", Frecursive_edit, Srecursive_edit, 0, 0, "", +DEFUN ("recursive-edit", Frecursive_edit, Srecursive_edit, 0, 0, "", doc: /* Invoke the editor command loop recursively. To get out of the recursive edit, a command can do `(throw 'exit nil)'; that tells this function to return. @@ -1175,7 +1175,7 @@ top_level_1 (Lisp_Object ignore) return Qnil; } -DEFUE ("top-level", Ftop_level, Stop_level, 0, 0, "", +DEFUN ("top-level", Ftop_level, Stop_level, 0, 0, "", doc: /* Exit all recursive editing levels. This also exits all active minibuffers. */) (void) @@ -6486,7 +6486,7 @@ modify_event_symbol (EMACS_INT symbol_num, unsigned int modifiers, Lisp_Object s such as (ctrl meta backspace), into the usual representation of that event type as a number or a symbol. */ -DEFUE ("event-convert-list", Fevent_convert_list, Sevent_convert_list, 1, 1, 0, +DEFUN ("event-convert-list", Fevent_convert_list, Sevent_convert_list, 1, 1, 0, doc: /* Convert the event description list EVENT-DESC to an event type. EVENT-DESC should contain one base event type (a character or symbol) and zero or more modifier names (control, meta, hyper, super, shift, alt, @@ -9997,7 +9997,7 @@ read_key_sequence (Lisp_Object *keybuf, size_t bufsize, Lisp_Object prompt, return t; } -DEFUE ("read-key-sequence", Fread_key_sequence, Sread_key_sequence, 1, 5, 0, +DEFUN ("read-key-sequence", Fread_key_sequence, Sread_key_sequence, 1, 5, 0, doc: /* Read a sequence of keystrokes and return as a string or vector. The sequence is sufficient to specify a non-prefix command in the current local and global maps. @@ -10625,7 +10625,7 @@ If FILE is nil, close any open dribble file. */) return Qnil; } -DEFUE ("discard-input", Fdiscard_input, Sdiscard_input, 0, 0, 0, +DEFUN ("discard-input", Fdiscard_input, Sdiscard_input, 0, 0, 0, doc: /* Discard the contents of the terminal input buffer. Also end any kbd macro being defined. */) (void) @@ -10978,7 +10978,7 @@ quit_throw_to_read_char (void) _longjmp (getcjmp, 1); } -DEFUE ("set-input-interrupt-mode", Fset_input_interrupt_mode, +DEFUN ("set-input-interrupt-mode", Fset_input_interrupt_mode, Sset_input_interrupt_mode, 1, 1, 0, doc: /* Set interrupt mode of reading keyboard input. If INTERRUPT is non-nil, Emacs will use input interrupts; @@ -11144,7 +11144,7 @@ See also `current-input-mode'. */) return Qnil; } -DEFUE ("set-input-mode", Fset_input_mode, Sset_input_mode, 3, 4, 0, +DEFUN ("set-input-mode", Fset_input_mode, Sset_input_mode, 3, 4, 0, doc: /* Set mode of reading keyboard input. First arg INTERRUPT non-nil means use input interrupts; nil means use CBREAK mode. diff --git a/src/keymap.c b/src/keymap.c index 741fa4f6dfc..ba958077f0d 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -110,7 +110,7 @@ in case you use it as a menu with `x-popup-menu'. */) Fcons (Fmake_char_table (Qkeymap, Qnil), tail)); } -DEFUE ("make-sparse-keymap", Fmake_sparse_keymap, Smake_sparse_keymap, 0, 1, 0, +DEFUN ("make-sparse-keymap", Fmake_sparse_keymap, Smake_sparse_keymap, 0, 1, 0, doc: /* Construct and return a new sparse keymap. Its car is `keymap' and its cdr is an alist of (CHAR . DEFINITION), which binds the character CHAR to DEFINITION, or (SYMBOL . DEFINITION), @@ -162,7 +162,7 @@ is also allowed as an element. */) return (KEYMAPP (object) ? Qt : Qnil); } -DEFUE ("keymap-prompt", Fkeymap_prompt, Skeymap_prompt, 1, 1, 0, +DEFUN ("keymap-prompt", Fkeymap_prompt, Skeymap_prompt, 1, 1, 0, doc: /* Return the prompt-string of a keymap MAP. If non-nil, the prompt is shown in the echo-area when reading a key-sequence to be looked-up in this keymap. */) @@ -293,7 +293,7 @@ keymap_memberp (Lisp_Object map, Lisp_Object maps) /* Set the parent keymap of MAP to PARENT. */ -DEFUE ("set-keymap-parent", Fset_keymap_parent, Sset_keymap_parent, 2, 2, 0, +DEFUN ("set-keymap-parent", Fset_keymap_parent, Sset_keymap_parent, 2, 2, 0, doc: /* Modify KEYMAP to set its parent map to PARENT. Return PARENT. PARENT should be nil or another keymap. */) (Lisp_Object keymap, Lisp_Object parent) @@ -1081,7 +1081,7 @@ is not copied. */) /* GC is possible in this function if it autoloads a keymap. */ -DEFUE ("define-key", Fdefine_key, Sdefine_key, 3, 3, 0, +DEFUN ("define-key", Fdefine_key, Sdefine_key, 3, 3, 0, doc: /* In KEYMAP, define key sequence KEY as DEF. KEYMAP is a keymap. @@ -1212,7 +1212,7 @@ binding KEY to DEF is added at the front of KEYMAP. */) /* This function may GC (it calls Fkey_binding). */ -DEFUE ("command-remapping", Fcommand_remapping, Scommand_remapping, 1, 3, 0, +DEFUN ("command-remapping", Fcommand_remapping, Scommand_remapping, 1, 3, 0, doc: /* Return the remapping for command COMMAND. Returns nil if COMMAND is not remapped (or not a symbol). @@ -1520,7 +1520,7 @@ current_minor_maps (Lisp_Object **modeptr, Lisp_Object **mapptr) return i; } -DEFUE ("current-active-maps", Fcurrent_active_maps, Scurrent_active_maps, +DEFUN ("current-active-maps", Fcurrent_active_maps, Scurrent_active_maps, 0, 2, 0, doc: /* Return a list of the currently active keymaps. OLP if non-nil indicates that we should obey `overriding-local-map' and @@ -1663,7 +1663,7 @@ like in the respective argument of `key-binding'. */) /* GC is possible in this function if it autoloads a keymap. */ -DEFUE ("key-binding", Fkey_binding, Skey_binding, 1, 4, 0, +DEFUN ("key-binding", Fkey_binding, Skey_binding, 1, 4, 0, doc: /* Return the binding for command KEY in current keymaps. KEY is a string or vector, a sequence of keystrokes. The binding is probably a symbol with a function definition. @@ -2180,7 +2180,7 @@ static Lisp_Object Qsingle_key_description, Qkey_description; /* This function cannot GC. */ -DEFUE ("key-description", Fkey_description, Skey_description, 1, 2, 0, +DEFUN ("key-description", Fkey_description, Skey_description, 1, 2, 0, doc: /* Return a pretty description of key-sequence KEYS. Optional arg PREFIX is the sequence of keys leading up to KEYS. Control characters turn into "C-foo" sequences, meta into "M-foo", @@ -2399,7 +2399,7 @@ push_key_description (register unsigned int c, register char *p, int force_multi /* This function cannot GC. */ -DEFUE ("single-key-description", Fsingle_key_description, +DEFUN ("single-key-description", Fsingle_key_description, Ssingle_key_description, 1, 2, 0, doc: /* Return a pretty description of command character KEY. Control characters turn into C-whatever, etc. @@ -2677,7 +2677,7 @@ where_is_internal (Lisp_Object definition, Lisp_Object keymaps, /* This function can GC if Flookup_key autoloads any keymaps. */ -DEFUE ("where-is-internal", Fwhere_is_internal, Swhere_is_internal, 1, 5, 0, +DEFUN ("where-is-internal", Fwhere_is_internal, Swhere_is_internal, 1, 5, 0, doc: /* Return list of keys that invoke DEFINITION. If KEYMAP is a keymap, search only KEYMAP and the global keymap. If KEYMAP is nil, search all the currently active keymaps. diff --git a/src/lisp.h b/src/lisp.h index 508f0b3a40b..4696a1c3432 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -1806,12 +1806,8 @@ typedef struct { `doc' is documentation for the user. */ /* This version of DEFUN declares a function prototype with the right - arguments, so we can catch errors with maxargs at compile-time. - DEFUN defines an internal function, and DEFUE is similar but defines a - external function, which can be used in other C-language modules. */ -#define DEFUN static DEFINE_FUNC -#define DEFUE extern DEFINE_FUNC -#define DEFINE_FUNC(lname, fnname, sname, minargs, maxargs, intspec, doc) \ + arguments, so we can catch errors with maxargs at compile-time. */ +#define DEFUN(lname, fnname, sname, minargs, maxargs, intspec, doc) \ Lisp_Object fnname DEFUN_ARGS_ ## maxargs ; \ static DECL_ALIGN (struct Lisp_Subr, sname) = \ { PVEC_SUBR | (sizeof (struct Lisp_Subr) / sizeof (EMACS_INT)), \ diff --git a/src/lread.c b/src/lread.c index fdb477c0218..d32f0b6a7e2 100644 --- a/src/lread.c +++ b/src/lread.c @@ -682,7 +682,7 @@ read_filtered_event (int no_switch_frame, int ascii_required, return val; } -DEFUE ("read-char", Fread_char, Sread_char, 0, 3, 0, +DEFUN ("read-char", Fread_char, Sread_char, 0, 3, 0, doc: /* Read a character from the command input (keyboard or macro). It is returned as a number. If the character has modifiers, they are resolved and reflected to the @@ -715,7 +715,7 @@ floating-point value. */) : make_number (char_resolve_modifier_mask (XINT (val)))); } -DEFUE ("read-event", Fread_event, Sread_event, 0, 3, 0, +DEFUN ("read-event", Fread_event, Sread_event, 0, 3, 0, doc: /* Read an event object from the input stream. If the optional argument PROMPT is non-nil, display that as a prompt. If the optional argument INHERIT-INPUT-METHOD is non-nil and some @@ -951,7 +951,7 @@ load_warn_old_style_backquotes (Lisp_Object file) return Qnil; } -DEFUE ("get-load-suffixes", Fget_load_suffixes, Sget_load_suffixes, 0, 0, 0, +DEFUN ("get-load-suffixes", Fget_load_suffixes, Sget_load_suffixes, 0, 0, 0, doc: /* Return the suffixes that `load' should try if a suffix is \ required. This uses the variables `load-suffixes' and `load-file-rep-suffixes'. */) @@ -973,7 +973,7 @@ This uses the variables `load-suffixes' and `load-file-rep-suffixes'. */) return Fnreverse (lst); } -DEFUE ("load", Fload, Sload, 1, 5, 0, +DEFUN ("load", Fload, Sload, 1, 5, 0, doc: /* Execute a file of Lisp code named FILE. First try FILE with `.elc' appended, then try with `.el', then try FILE unmodified (the exact suffixes in the exact order are @@ -1907,7 +1907,7 @@ This function does not move point. */) } -DEFUE ("read", Fread, Sread, 0, 1, 0, +DEFUN ("read", Fread, Sread, 0, 1, 0, doc: /* Read one Lisp expression as text from STREAM, return as Lisp object. If STREAM is nil, use the value of `standard-input' (which see). STREAM or the value of `standard-input' may be: @@ -1930,7 +1930,7 @@ STREAM or the value of `standard-input' may be: return read_internal_start (stream, Qnil, Qnil); } -DEFUE ("read-from-string", Fread_from_string, Sread_from_string, 1, 3, 0, +DEFUN ("read-from-string", Fread_from_string, Sread_from_string, 1, 3, 0, doc: /* Read one Lisp expression which is represented as text by STRING. Returns a cons: (OBJECT-READ . FINAL-STRING-INDEX). START and END optionally delimit a substring of STRING from which to read; @@ -3643,7 +3643,7 @@ intern_c_string (const char *str) return Fintern (make_pure_c_string (str), obarray); } -DEFUE ("intern", Fintern, Sintern, 1, 2, 0, +DEFUN ("intern", Fintern, Sintern, 1, 2, 0, doc: /* Return the canonical symbol whose name is STRING. If there is none, one is created by this function and returned. A second optional argument specifies the obarray to use; @@ -3689,7 +3689,7 @@ it defaults to the value of `obarray'. */) return sym; } -DEFUE ("intern-soft", Fintern_soft, Sintern_soft, 1, 2, 0, +DEFUN ("intern-soft", Fintern_soft, Sintern_soft, 1, 2, 0, doc: /* Return the canonical symbol named NAME, or nil if none exists. NAME may be a string or a symbol. If it is a symbol, that exact symbol is searched for. @@ -3717,7 +3717,7 @@ it defaults to the value of `obarray'. */) return tem; } -DEFUE ("unintern", Funintern, Sunintern, 1, 2, 0, +DEFUN ("unintern", Funintern, Sunintern, 1, 2, 0, doc: /* Delete the symbol named NAME, if any, from OBARRAY. The value is t if a symbol was found and deleted, nil otherwise. NAME may be a string or a symbol. If it is a symbol, that symbol diff --git a/src/macros.c b/src/macros.c index e5de4a14136..3523e513d6a 100644 --- a/src/macros.c +++ b/src/macros.c @@ -216,7 +216,7 @@ finalize_kbd_macro_chars (void) current_kboard->kbd_macro_end = current_kboard->kbd_macro_ptr; } -DEFUE ("cancel-kbd-macro-events", Fcancel_kbd_macro_events, +DEFUN ("cancel-kbd-macro-events", Fcancel_kbd_macro_events, Scancel_kbd_macro_events, 0, 0, 0, doc: /* Cancel the events added to a keyboard macro for this command. */) (void) @@ -283,7 +283,7 @@ pop_kbd_macro (Lisp_Object info) return Qnil; } -DEFUE ("execute-kbd-macro", Fexecute_kbd_macro, Sexecute_kbd_macro, 1, 3, 0, +DEFUN ("execute-kbd-macro", Fexecute_kbd_macro, Sexecute_kbd_macro, 1, 3, 0, doc: /* Execute MACRO as string of editor command characters. If MACRO is a symbol, its function definition is used. COUNT is a repeat count, or nil for once, or 0 for infinite loop. diff --git a/src/marker.c b/src/marker.c index b8567c2810f..7d461099140 100644 --- a/src/marker.c +++ b/src/marker.c @@ -420,7 +420,7 @@ buf_bytepos_to_charpos (struct buffer *b, EMACS_INT bytepos) /* Operations on markers. */ -DEFUE ("marker-buffer", Fmarker_buffer, Smarker_buffer, 1, 1, 0, +DEFUN ("marker-buffer", Fmarker_buffer, Smarker_buffer, 1, 1, 0, doc: /* Return the buffer that MARKER points into, or nil if none. Returns nil if MARKER points into a dead buffer. */) (register Lisp_Object marker) @@ -440,7 +440,7 @@ Returns nil if MARKER points into a dead buffer. */) return Qnil; } -DEFUE ("marker-position", Fmarker_position, Smarker_position, 1, 1, 0, +DEFUN ("marker-position", Fmarker_position, Smarker_position, 1, 1, 0, doc: /* Return the position MARKER points at, as a character number. Returns nil if MARKER points nowhere. */) (Lisp_Object marker) @@ -452,7 +452,7 @@ Returns nil if MARKER points nowhere. */) return Qnil; } -DEFUE ("set-marker", Fset_marker, Sset_marker, 2, 3, 0, +DEFUN ("set-marker", Fset_marker, Sset_marker, 2, 3, 0, doc: /* Position MARKER before character number POSITION in BUFFER. BUFFER defaults to the current buffer. If POSITION is nil, makes marker point nowhere. @@ -796,7 +796,7 @@ marker_byte_position (Lisp_Object marker) return i; } -DEFUE ("copy-marker", Fcopy_marker, Scopy_marker, 0, 2, 0, +DEFUN ("copy-marker", Fcopy_marker, Scopy_marker, 0, 2, 0, doc: /* Return a new marker pointing at the same place as MARKER. If argument is a number, makes a new marker pointing at that position in the current buffer. diff --git a/src/menu.c b/src/menu.c index bf6bb6486bd..3bfb74863ae 100644 --- a/src/menu.c +++ b/src/menu.c @@ -1017,7 +1017,7 @@ find_and_return_menu_selection (FRAME_PTR f, int keymaps, void *client_data) } #endif /* HAVE_NS */ -DEFUE ("x-popup-menu", Fx_popup_menu, Sx_popup_menu, 2, 2, 0, +DEFUN ("x-popup-menu", Fx_popup_menu, Sx_popup_menu, 2, 2, 0, doc: /* Pop up a deck-of-cards menu and return user's selection. POSITION is a position specification. This is either a mouse button event or a list ((XOFFSET YOFFSET) WINDOW) diff --git a/src/minibuf.c b/src/minibuf.c index 3bcb0fca61c..6316ba514b9 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -872,7 +872,7 @@ read_minibuf_unwind (Lisp_Object data) } -DEFUE ("read-from-minibuffer", Fread_from_minibuffer, +DEFUN ("read-from-minibuffer", Fread_from_minibuffer, Sread_from_minibuffer, 1, 7, 0, doc: /* Read a string from the minibuffer, prompting with string PROMPT. The optional second arg INITIAL-CONTENTS is an obsolete alternative to @@ -950,7 +950,7 @@ and some related functions, which use zero-indexing for POSITION. */) return val; } -DEFUE ("read-minibuffer", Fread_minibuffer, Sread_minibuffer, 1, 2, 0, +DEFUN ("read-minibuffer", Fread_minibuffer, Sread_minibuffer, 1, 2, 0, doc: /* Return a Lisp object read using the minibuffer, unevaluated. Prompt with PROMPT. If non-nil, optional second arg INITIAL-CONTENTS is a string to insert in the minibuffer before reading. @@ -964,7 +964,7 @@ Such arguments are used as in `read-from-minibuffer'.) */) make_number (0), Qnil, 0, 0); } -DEFUE ("eval-minibuffer", Feval_minibuffer, Seval_minibuffer, 1, 2, 0, +DEFUN ("eval-minibuffer", Feval_minibuffer, Seval_minibuffer, 1, 2, 0, doc: /* Return value of Lisp expression read using the minibuffer. Prompt with PROMPT. If non-nil, optional second arg INITIAL-CONTENTS is a string to insert in the minibuffer before reading. @@ -980,7 +980,7 @@ Such arguments are used as in `read-from-minibuffer'.) */) /* Functions that use the minibuffer to read various things. */ -DEFUE ("read-string", Fread_string, Sread_string, 1, 5, 0, +DEFUN ("read-string", Fread_string, Sread_string, 1, 5, 0, doc: /* Read a string from the minibuffer, prompting with string PROMPT. If non-nil, second arg INITIAL-INPUT is a string to insert before reading. This argument has been superseded by DEFAULT-VALUE and should normally @@ -1057,7 +1057,7 @@ Prompt with PROMPT. */) } #endif /* NOTDEF */ -DEFUE ("read-variable", Fread_variable, Sread_variable, 1, 2, 0, +DEFUN ("read-variable", Fread_variable, Sread_variable, 1, 2, 0, doc: /* Read the name of a user variable and return it as a symbol. Prompt with PROMPT. By default, return DEFAULT-VALUE or its first element if it is a list. @@ -1081,7 +1081,7 @@ A user variable is one for which `user-variable-p' returns non-nil. */) return Fintern (name, Qnil); } -DEFUE ("read-buffer", Fread_buffer, Sread_buffer, 1, 3, 0, +DEFUN ("read-buffer", Fread_buffer, Sread_buffer, 1, 3, 0, doc: /* Read the name of a buffer and return as a string. Prompt with PROMPT. Optional second arg DEF is value to return if user enters an empty line. @@ -1617,7 +1617,7 @@ with a space are ignored unless STRING itself starts with a space. */) return Fnreverse (allmatches); } -DEFUE ("completing-read", Fcompleting_read, Scompleting_read, 2, 8, 0, +DEFUN ("completing-read", Fcompleting_read, Scompleting_read, 2, 8, 0, doc: /* Read a string in the minibuffer, with completion. PROMPT is a string to prompt with; normally it ends in a colon and a space. COLLECTION can be a list of strings, an alist, an obarray or a hash table. @@ -1918,7 +1918,7 @@ The arguments STRING and PREDICATE are as in `try-completion', /* Like assoc but assumes KEY is a string, and ignores case if appropriate. */ -DEFUE ("assoc-string", Fassoc_string, Sassoc_string, 2, 3, 0, +DEFUN ("assoc-string", Fassoc_string, Sassoc_string, 2, 3, 0, doc: /* Like `assoc' but specifically for strings (and symbols). This returns the first element of LIST whose car matches the string or diff --git a/src/print.c b/src/print.c index 8bc8f98ccee..42c5df86783 100644 --- a/src/print.c +++ b/src/print.c @@ -526,7 +526,7 @@ static void print_preprocess (Lisp_Object obj); static void print_preprocess_string (INTERVAL interval, Lisp_Object arg); static void print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag); -DEFUE ("terpri", Fterpri, Sterpri, 0, 1, 0, +DEFUN ("terpri", Fterpri, Sterpri, 0, 1, 0, doc: /* Output a newline to stream PRINTCHARFUN. If PRINTCHARFUN is omitted or nil, the value of `standard-output' is used. */) (Lisp_Object printcharfun) @@ -541,7 +541,7 @@ If PRINTCHARFUN is omitted or nil, the value of `standard-output' is used. */) return Qt; } -DEFUE ("prin1", Fprin1, Sprin1, 1, 2, 0, +DEFUN ("prin1", Fprin1, Sprin1, 1, 2, 0, doc: /* Output the printed representation of OBJECT, any Lisp object. Quoting characters are printed when needed to make output that `read' can handle, whenever this is possible. For complex objects, the behavior @@ -579,7 +579,7 @@ is used instead. */) /* a buffer which is used to hold output being built by prin1-to-string */ Lisp_Object Vprin1_to_string_buffer; -DEFUE ("prin1-to-string", Fprin1_to_string, Sprin1_to_string, 1, 2, 0, +DEFUN ("prin1-to-string", Fprin1_to_string, Sprin1_to_string, 1, 2, 0, doc: /* Return a string containing the printed representation of OBJECT. OBJECT can be any Lisp object. This function outputs quoting characters when necessary to make output that `read' can handle, whenever possible, @@ -670,7 +670,7 @@ is used instead. */) return object; } -DEFUE ("print", Fprint, Sprint, 1, 2, 0, +DEFUN ("print", Fprint, Sprint, 1, 2, 0, doc: /* Output the printed representation of OBJECT, with newlines around it. Quoting characters are printed when needed to make output that `read' can handle, whenever this is possible. For complex objects, the behavior @@ -813,7 +813,7 @@ safe_debug_print (Lisp_Object arg) } -DEFUE ("error-message-string", Ferror_message_string, Serror_message_string, +DEFUN ("error-message-string", Ferror_message_string, Serror_message_string, 1, 1, 0, doc: /* Convert an error value (ERROR-SYMBOL . DATA) to an error message. See Info anchor `(elisp)Definition of signal' for some details on how this diff --git a/src/process.c b/src/process.c index 7efbab11190..0cec8977ad0 100644 --- a/src/process.c +++ b/src/process.c @@ -783,7 +783,7 @@ nil, indicating the current buffer's process. */) return Qnil; } -DEFUE ("process-status", Fprocess_status, Sprocess_status, 1, 1, 0, +DEFUN ("process-status", Fprocess_status, Sprocess_status, 1, 1, 0, doc: /* Return the status of PROCESS. The returned value is one of the following symbols: run -- for a process that is running. @@ -5776,7 +5776,7 @@ don't send the signal. */) return process; } -DEFUE ("kill-process", Fkill_process, Skill_process, 0, 2, 0, +DEFUN ("kill-process", Fkill_process, Skill_process, 0, 2, 0, doc: /* Kill process PROCESS. May be process or name of one. See function `interrupt-process' for more details on usage. */) (Lisp_Object process, Lisp_Object current_group) @@ -6916,7 +6916,7 @@ close_process_descs (void) #endif } -DEFUE ("get-buffer-process", Fget_buffer_process, Sget_buffer_process, 1, 1, 0, +DEFUN ("get-buffer-process", Fget_buffer_process, Sget_buffer_process, 1, 1, 0, doc: /* Return the (or a) process associated with BUFFER. BUFFER may be a buffer or the name of one. */) (register Lisp_Object buffer) @@ -6983,7 +6983,7 @@ kill_buffer_processes (Lisp_Object buffer) #endif /* subprocesses */ } -DEFUE ("waiting-for-user-input-p", Fwaiting_for_user_input_p, +DEFUN ("waiting-for-user-input-p", Fwaiting_for_user_input_p, Swaiting_for_user_input_p, 0, 0, 0, doc: /* Returns non-nil if Emacs is waiting for input from the user. This is intended for use by asynchronous process output filters and sentinels. */) diff --git a/src/search.c b/src/search.c index c522de90e05..6c835f2cc64 100644 --- a/src/search.c +++ b/src/search.c @@ -436,7 +436,7 @@ string_match_1 (Lisp_Object regexp, Lisp_Object string, Lisp_Object start, int p return make_number (string_byte_to_char (string, val)); } -DEFUE ("string-match", Fstring_match, Sstring_match, 2, 3, 0, +DEFUN ("string-match", Fstring_match, Sstring_match, 2, 3, 0, doc: /* Return index of start of first match for REGEXP in STRING, or nil. Matching ignores case if `case-fold-search' is non-nil. If third arg START is non-nil, start search at that index in STRING. @@ -2811,7 +2811,7 @@ match_limit (Lisp_Object num, int beginningp) : search_regs.end[n])); } -DEFUE ("match-beginning", Fmatch_beginning, Smatch_beginning, 1, 1, 0, +DEFUN ("match-beginning", Fmatch_beginning, Smatch_beginning, 1, 1, 0, doc: /* Return position of start of text matched by last search. SUBEXP, a number, specifies which parenthesized expression in the last regexp. @@ -2823,7 +2823,7 @@ Zero means the entire text matched by the whole regexp or whole string. */) return match_limit (subexp, 1); } -DEFUE ("match-end", Fmatch_end, Smatch_end, 1, 1, 0, +DEFUN ("match-end", Fmatch_end, Smatch_end, 1, 1, 0, doc: /* Return position of end of text matched by last search. SUBEXP, a number, specifies which parenthesized expression in the last regexp. @@ -2835,7 +2835,7 @@ Zero means the entire text matched by the whole regexp or whole string. */) return match_limit (subexp, 0); } -DEFUE ("match-data", Fmatch_data, Smatch_data, 0, 3, 0, +DEFUN ("match-data", Fmatch_data, Smatch_data, 0, 3, 0, doc: /* Return a list containing all info on what the last search matched. Element 2N is `(match-beginning N)'; element 2N + 1 is `(match-end N)'. All the elements are markers or nil (nil if the Nth pair didn't match) @@ -2950,7 +2950,7 @@ Return value is undefined if the last search failed. */) But it was ill-conceived: those supposedly-internal markers get exposed via the undo-list, so freeing them here is unsafe. */ -DEFUE ("set-match-data", Fset_match_data, Sset_match_data, 1, 2, 0, +DEFUN ("set-match-data", Fset_match_data, Sset_match_data, 1, 2, 0, doc: /* Set internal data on last search match from elements of LIST. LIST should have been created by calling `match-data' previously. diff --git a/src/syntax.c b/src/syntax.c index 518ba3bba15..ce203948b04 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -1341,7 +1341,7 @@ scan_words (register EMACS_INT from, register EMACS_INT count) return from; } -DEFUE ("forward-word", Fforward_word, Sforward_word, 0, 1, "^p", +DEFUN ("forward-word", Fforward_word, Sforward_word, 0, 1, "^p", doc: /* Move point forward ARG words (backward if ARG is negative). Normally returns t. If an edge of the buffer or a field boundary is reached, point is left there @@ -1370,7 +1370,7 @@ and the function returns nil. Field boundaries are not noticed if return val == orig_val ? Qt : Qnil; } -DEFUE ("skip-chars-forward", Fskip_chars_forward, Sskip_chars_forward, 1, 2, 0, +DEFUN ("skip-chars-forward", Fskip_chars_forward, Sskip_chars_forward, 1, 2, 0, doc: /* Move point forward, stopping before a char not in STRING, or at pos LIM. STRING is like the inside of a `[...]' in a regular expression except that `]' is never special and `\\' quotes `^', `-' or `\\' @@ -1385,7 +1385,7 @@ Returns the distance traveled, either zero or positive. */) return skip_chars (1, string, lim, 1); } -DEFUE ("skip-chars-backward", Fskip_chars_backward, Sskip_chars_backward, 1, 2, 0, +DEFUN ("skip-chars-backward", Fskip_chars_backward, Sskip_chars_backward, 1, 2, 0, doc: /* Move point backward, stopping after a char not in STRING, or at pos LIM. See `skip-chars-forward' for details. Returns the distance traveled, either zero or negative. */) diff --git a/src/term.c b/src/term.c index f70dd227878..df13d7c0db2 100644 --- a/src/term.c +++ b/src/term.c @@ -2413,7 +2413,7 @@ get_named_tty (const char *name) } -DEFUE ("tty-type", Ftty_type, Stty_type, 0, 1, 0, +DEFUN ("tty-type", Ftty_type, Stty_type, 0, 1, 0, doc: /* Return the type of the tty device that TERMINAL uses. Returns nil if TERMINAL is not on a tty device. diff --git a/src/terminal.c b/src/terminal.c index 7382622182f..c5185601fb6 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -305,7 +305,7 @@ delete_terminal (struct terminal *terminal) Lisp_Object Qrun_hook_with_args; static Lisp_Object Qdelete_terminal_functions; -DEFUE ("delete-terminal", Fdelete_terminal, Sdelete_terminal, 0, 2, 0, +DEFUN ("delete-terminal", Fdelete_terminal, Sdelete_terminal, 0, 2, 0, doc: /* Delete TERMINAL by deleting all frames on it and closing the terminal. TERMINAL may be a terminal object, a frame, or nil (meaning the selected frame's terminal). @@ -348,7 +348,7 @@ but if the second argument FORCE is non-nil, you may do so. */) } -DEFUE ("frame-terminal", Fframe_terminal, Sframe_terminal, 0, 1, 0, +DEFUN ("frame-terminal", Fframe_terminal, Sframe_terminal, 0, 1, 0, doc: /* Return the terminal that FRAME is displayed on. If FRAME is nil, the selected frame is used. diff --git a/src/textprop.c b/src/textprop.c index e85b041891c..7ce488334e8 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -548,7 +548,7 @@ interval_of (int position, Lisp_Object object) return find_interval (i, position); } -DEFUE ("text-properties-at", Ftext_properties_at, +DEFUN ("text-properties-at", Ftext_properties_at, Stext_properties_at, 1, 2, 0, doc: /* Return the list of properties of the character at POSITION in OBJECT. If the optional second argument OBJECT is a buffer (or nil, which means @@ -575,7 +575,7 @@ If POSITION is at the end of OBJECT, the value is nil. */) return i->plist; } -DEFUE ("get-text-property", Fget_text_property, Sget_text_property, 2, 3, 0, +DEFUN ("get-text-property", Fget_text_property, Sget_text_property, 2, 3, 0, doc: /* Return the value of POSITION's property PROP, in OBJECT. OBJECT is optional and defaults to the current buffer. If POSITION is at the end of OBJECT, the value is nil. */) @@ -650,7 +650,7 @@ get_char_property_and_overlay (Lisp_Object position, register Lisp_Object prop, return Fget_text_property (position, prop, object); } -DEFUE ("get-char-property", Fget_char_property, Sget_char_property, 2, 3, 0, +DEFUN ("get-char-property", Fget_char_property, Sget_char_property, 2, 3, 0, doc: /* Return the value of POSITION's property PROP, in OBJECT. Both overlay properties and text properties are checked. OBJECT is optional and defaults to the current buffer. @@ -687,7 +687,7 @@ POSITION is at the end of OBJECT, both car and cdr are nil. */) } -DEFUE ("next-char-property-change", Fnext_char_property_change, +DEFUN ("next-char-property-change", Fnext_char_property_change, Snext_char_property_change, 1, 2, 0, doc: /* Return the position of next text property or overlay change. This scans characters forward in the current buffer from POSITION till @@ -712,7 +712,7 @@ LIMIT is a no-op if it is greater than (point-max). */) return Fnext_property_change (position, Qnil, temp); } -DEFUE ("previous-char-property-change", Fprevious_char_property_change, +DEFUN ("previous-char-property-change", Fprevious_char_property_change, Sprevious_char_property_change, 1, 2, 0, doc: /* Return the position of previous text property or overlay change. Scans characters backward in the current buffer from POSITION till it @@ -738,7 +738,7 @@ LIMIT is a no-op if it is less than (point-min). */) } -DEFUE ("next-single-char-property-change", Fnext_single_char_property_change, +DEFUN ("next-single-char-property-change", Fnext_single_char_property_change, Snext_single_char_property_change, 2, 4, 0, doc: /* Return the position of next text property or overlay change for a specific property. Scans characters forward from POSITION till it finds @@ -821,7 +821,7 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT. */) return position; } -DEFUE ("previous-single-char-property-change", +DEFUN ("previous-single-char-property-change", Fprevious_single_char_property_change, Sprevious_single_char_property_change, 2, 4, 0, doc: /* Return the position of previous text property or overlay change for a specific property. @@ -914,7 +914,7 @@ back past position LIMIT; return LIMIT if nothing is found before LIMIT. */) return position; } -DEFUE ("next-property-change", Fnext_property_change, +DEFUN ("next-property-change", Fnext_property_change, Snext_property_change, 1, 3, 0, doc: /* Return the position of next property change. Scans characters forward from POSITION in OBJECT till it finds @@ -978,7 +978,7 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT. */) return make_number (next->position); } -DEFUE ("next-single-property-change", Fnext_single_property_change, +DEFUN ("next-single-property-change", Fnext_single_property_change, Snext_single_property_change, 2, 4, 0, doc: /* Return the position of next property change for a specific property. Scans characters forward from POSITION till it finds @@ -1026,7 +1026,7 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT. */) return make_number (next->position); } -DEFUE ("previous-property-change", Fprevious_property_change, +DEFUN ("previous-property-change", Fprevious_property_change, Sprevious_property_change, 1, 3, 0, doc: /* Return the position of previous property change. Scans characters backwards from POSITION in OBJECT till it finds @@ -1073,7 +1073,7 @@ back past position LIMIT; return LIMIT if nothing is found until LIMIT. */) return make_number (previous->position + LENGTH (previous)); } -DEFUE ("previous-single-property-change", Fprevious_single_property_change, +DEFUN ("previous-single-property-change", Fprevious_single_property_change, Sprevious_single_property_change, 2, 4, 0, doc: /* Return the position of previous property change for a specific property. Scans characters backward from POSITION till it finds @@ -1127,7 +1127,7 @@ back past position LIMIT; return LIMIT if nothing is found until LIMIT. */) /* Callers note, this can GC when OBJECT is a buffer (or nil). */ -DEFUE ("add-text-properties", Fadd_text_properties, +DEFUN ("add-text-properties", Fadd_text_properties, Sadd_text_properties, 3, 4, 0, doc: /* Add properties to the text from START to END. The third argument PROPERTIES is a property list @@ -1236,7 +1236,7 @@ Return t if any property value actually changed, nil otherwise. */) /* Callers note, this can GC when OBJECT is a buffer (or nil). */ -DEFUE ("put-text-property", Fput_text_property, +DEFUN ("put-text-property", Fput_text_property, Sput_text_property, 4, 5, 0, doc: /* Set one property of the text from START to END. The third and fourth arguments PROPERTY and VALUE @@ -1252,7 +1252,7 @@ markers). If OBJECT is a string, START and END are 0-based indices into it. */ return Qnil; } -DEFUE ("set-text-properties", Fset_text_properties, +DEFUN ("set-text-properties", Fset_text_properties, Sset_text_properties, 3, 4, 0, doc: /* Completely replace properties of text from START to END. The third argument PROPERTIES is the new property list. @@ -1419,7 +1419,7 @@ set_text_properties_1 (Lisp_Object start, Lisp_Object end, Lisp_Object propertie while (len > 0); } -DEFUE ("remove-text-properties", Fremove_text_properties, +DEFUN ("remove-text-properties", Fremove_text_properties, Sremove_text_properties, 3, 4, 0, doc: /* Remove some properties from text from START to END. The third argument PROPERTIES is a property list @@ -1509,7 +1509,7 @@ Use `set-text-properties' if you want to remove all text properties. */) } } -DEFUE ("remove-list-of-text-properties", Fremove_list_of_text_properties, +DEFUN ("remove-list-of-text-properties", Fremove_list_of_text_properties, Sremove_list_of_text_properties, 3, 4, 0, doc: /* Remove some properties from text from START to END. The third argument LIST-OF-PROPERTIES is a list of property names to remove. @@ -1619,7 +1619,7 @@ Return t if any property was actually removed, nil otherwise. */) } } -DEFUE ("text-property-any", Ftext_property_any, +DEFUN ("text-property-any", Ftext_property_any, Stext_property_any, 4, 5, 0, doc: /* Check text from START to END for property PROPERTY equalling VALUE. If so, return the position of the first character whose property PROPERTY diff --git a/src/undo.c b/src/undo.c index ba420fde817..80aff50d18a 100644 --- a/src/undo.c +++ b/src/undo.c @@ -270,7 +270,7 @@ record_property_change (EMACS_INT beg, EMACS_INT length, current_buffer = obuf; } -DEFUE ("undo-boundary", Fundo_boundary, Sundo_boundary, 0, 0, 0, +DEFUN ("undo-boundary", Fundo_boundary, Sundo_boundary, 0, 0, 0, doc: /* Mark a boundary between units of undo. An undo command will stop at this point, but another undo command will undo to the previous boundary. */) diff --git a/src/window.c b/src/window.c index 5b758ac698f..eef783268ee 100644 --- a/src/window.c +++ b/src/window.c @@ -217,7 +217,7 @@ make_window (void) return val; } -DEFUE ("selected-window", Fselected_window, Sselected_window, 0, 0, 0, +DEFUN ("selected-window", Fselected_window, Sselected_window, 0, 0, 0, doc: /* Return the window that the cursor now appears in and commands apply to. */) (void) { @@ -236,7 +236,7 @@ used by that frame. */) return FRAME_MINIBUF_WINDOW (XFRAME (frame)); } -DEFUE ("window-minibuffer-p", Fwindow_minibuffer_p, +DEFUN ("window-minibuffer-p", Fwindow_minibuffer_p, Swindow_minibuffer_p, 0, 1, 0, doc: /* Return non-nil if WINDOW is a minibuffer window. WINDOW defaults to the selected window. */) @@ -247,7 +247,7 @@ WINDOW defaults to the selected window. */) } -DEFUE ("pos-visible-in-window-p", Fpos_visible_in_window_p, +DEFUN ("pos-visible-in-window-p", Fpos_visible_in_window_p, Spos_visible_in_window_p, 0, 3, 0, doc: /* Return non-nil if position POS is currently on the frame in WINDOW. Return nil if that position is scrolled vertically out of view. @@ -444,7 +444,7 @@ decode_any_window (register Lisp_Object window) return XWINDOW (window); } -DEFUE ("window-buffer", Fwindow_buffer, Swindow_buffer, 0, 1, 0, +DEFUN ("window-buffer", Fwindow_buffer, Swindow_buffer, 0, 1, 0, doc: /* Return the buffer that WINDOW is displaying. WINDOW defaults to the selected window. */) (Lisp_Object window) @@ -1198,7 +1198,7 @@ if it isn't already recorded. */) return value; } -DEFUE ("set-window-point", Fset_window_point, Sset_window_point, 2, 2, 0, +DEFUN ("set-window-point", Fset_window_point, Sset_window_point, 2, 2, 0, doc: /* Make point value in WINDOW be at position POS in WINDOW's buffer. Return POS. */) (Lisp_Object window, Lisp_Object pos) @@ -1245,7 +1245,7 @@ overriding motion of point in order to display at this exact start. */) } -DEFUE ("window-dedicated-p", Fwindow_dedicated_p, Swindow_dedicated_p, +DEFUN ("window-dedicated-p", Fwindow_dedicated_p, Swindow_dedicated_p, 0, 1, 0, doc: /* Return non-nil when WINDOW is dedicated to its buffer. More precisely, return the value assigned by the last call of @@ -1486,7 +1486,7 @@ and so is its new parent, we should make replacement's children be children of that parent instead. ***/ } -DEFUE ("delete-window", Fdelete_window, Sdelete_window, 0, 1, "", +DEFUN ("delete-window", Fdelete_window, Sdelete_window, 0, 1, "", doc: /* Remove WINDOW from its frame. WINDOW defaults to the selected window. Return nil. Signal an error when WINDOW is the only window on its frame. */) @@ -1947,7 +1947,7 @@ next_window (Lisp_Object window, Lisp_Object minibuf, Lisp_Object all_frames, in } -DEFUE ("next-window", Fnext_window, Snext_window, 0, 3, 0, +DEFUN ("next-window", Fnext_window, Snext_window, 0, 3, 0, doc: /* Return window following WINDOW in cyclic ordering of windows. WINDOW defaults to the selected window. The optional arguments MINIBUF and ALL-FRAMES specify the set of windows to consider. @@ -2398,7 +2398,7 @@ If FRAME is a frame, search only that frame. */) frame); } -DEFUE ("get-buffer-window", Fget_buffer_window, Sget_buffer_window, 0, 2, 0, +DEFUN ("get-buffer-window", Fget_buffer_window, Sget_buffer_window, 0, 2, 0, doc: /* Return a window currently displaying BUFFER-OR-NAME, or nil if none. BUFFER-OR-NAME may be a buffer or a buffer name and defaults to the current buffer. @@ -3445,7 +3445,7 @@ set_window_buffer (Lisp_Object window, Lisp_Object buffer, int run_hooks_p, int } -DEFUE ("set-window-buffer", Fset_window_buffer, Sset_window_buffer, 2, 3, 0, +DEFUN ("set-window-buffer", Fset_window_buffer, Sset_window_buffer, 2, 3, 0, doc: /* Make WINDOW display BUFFER-OR-NAME as its contents. WINDOW defaults to the selected window. BUFFER-OR-NAME must be a buffer or the name of an existing buffer. Optional third argument KEEP-MARGINS @@ -3575,7 +3575,7 @@ select_window (Lisp_Object window, Lisp_Object norecord, int inhibit_point_swap) /* Note that selected_window can be nil when this is called from Fset_window_configuration. */ -DEFUE ("select-window", Fselect_window, Sselect_window, 1, 2, 0, +DEFUN ("select-window", Fselect_window, Sselect_window, 1, 2, 0, doc: /* Select WINDOW. Most editing will apply to WINDOW's buffer. If WINDOW is not already selected, make WINDOW's buffer current and make WINDOW the frame's selected window. Return WINDOW. @@ -5503,7 +5503,7 @@ displayed_window_lines (struct window *w) } -DEFUE ("recenter", Frecenter, Srecenter, 0, 1, "P", +DEFUN ("recenter", Frecenter, Srecenter, 0, 1, "P", doc: /* Center point in selected window and maybe redisplay frame. With prefix argument ARG, recenter putting point on screen line ARG relative to the selected window. If ARG is negative, it counts up from the @@ -5856,7 +5856,7 @@ DEFUN ("window-configuration-frame", Fwindow_configuration_frame, Swindow_config return XWINDOW (SAVED_WINDOW_N (saved_windows, 0)->window)->frame; } -DEFUE ("set-window-configuration", Fset_window_configuration, +DEFUN ("set-window-configuration", Fset_window_configuration, Sset_window_configuration, 1, 1, 0, doc: /* Set the configuration of windows and buffers as specified by CONFIGURATION. CONFIGURATION must be a value previously returned @@ -6353,7 +6353,7 @@ save_window_save (Lisp_Object window, struct Lisp_Vector *vector, int i) return i; } -DEFUE ("current-window-configuration", Fcurrent_window_configuration, +DEFUN ("current-window-configuration", Fcurrent_window_configuration, Scurrent_window_configuration, 0, 1, 0, doc: /* Return an object representing the current window configuration of FRAME. If FRAME is nil or omitted, use the selected frame. @@ -6545,7 +6545,7 @@ as nil. */) Fringes ***********************************************************************/ -DEFUE ("set-window-fringes", Fset_window_fringes, Sset_window_fringes, +DEFUN ("set-window-fringes", Fset_window_fringes, Sset_window_fringes, 2, 4, 0, doc: /* Set the fringe widths of window WINDOW. If WINDOW is nil, set the fringe widths of the currently selected @@ -6611,7 +6611,7 @@ Value is a list of the form (LEFT-WIDTH RIGHT-WIDTH OUTSIDE-MARGINS). */) Scroll bars ***********************************************************************/ -DEFUE ("set-window-scroll-bars", Fset_window_scroll_bars, +DEFUN ("set-window-scroll-bars", Fset_window_scroll_bars, Sset_window_scroll_bars, 2, 4, 0, doc: /* Set width and type of scroll bars of window WINDOW. If window is nil, set scroll bars of the currently selected window. diff --git a/src/xdisp.c b/src/xdisp.c index ecb0e34ed84..3370d84d67f 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -16331,7 +16331,7 @@ dump_glyph_row (row, vpos, glyphs) } -DEFUE ("dump-glyph-matrix", Fdump_glyph_matrix, +DEFUN ("dump-glyph-matrix", Fdump_glyph_matrix, Sdump_glyph_matrix, 0, 1, "p", doc: /* Dump the current matrix of the selected window to stderr. Shows contents of glyph row structures. With non-nil @@ -16353,7 +16353,7 @@ glyphs in short form, otherwise show glyphs in long form. */) } -DEFUE ("dump-frame-glyph-matrix", Fdump_frame_glyph_matrix, +DEFUN ("dump-frame-glyph-matrix", Fdump_frame_glyph_matrix, Sdump_frame_glyph_matrix, 0, 0, "", doc: /* */) (void) { @@ -16363,7 +16363,7 @@ DEFUE ("dump-frame-glyph-matrix", Fdump_frame_glyph_matrix, } -DEFUE ("dump-glyph-row", Fdump_glyph_row, Sdump_glyph_row, 1, 2, "", +DEFUN ("dump-glyph-row", Fdump_glyph_row, Sdump_glyph_row, 1, 2, "", doc: /* Dump glyph row ROW to stderr. GLYPH 0 means don't dump glyphs. GLYPH 1 means dump glyphs in short form. @@ -16384,7 +16384,7 @@ GLYPH > 1 or omitted means dump glyphs in long form. */) } -DEFUE ("dump-tool-bar-row", Fdump_tool_bar_row, Sdump_tool_bar_row, 1, 2, "", +DEFUN ("dump-tool-bar-row", Fdump_tool_bar_row, Sdump_tool_bar_row, 1, 2, "", doc: /* Dump glyph row ROW of the tool-bar of the current frame to stderr. GLYPH 0 means don't dump glyphs. GLYPH 1 means dump glyphs in short form. @@ -16404,7 +16404,7 @@ GLYPH > 1 or omitted means dump glyphs in long form. */) } -DEFUE ("trace-redisplay", Ftrace_redisplay, Strace_redisplay, 0, 1, "P", +DEFUN ("trace-redisplay", Ftrace_redisplay, Strace_redisplay, 0, 1, "P", doc: /* Toggle tracing of redisplay. With ARG, turn tracing on if and only if ARG is positive. */) (Lisp_Object arg) @@ -16421,7 +16421,7 @@ With ARG, turn tracing on if and only if ARG is positive. */) } -DEFUE ("trace-to-stderr", Ftrace_to_stderr, Strace_to_stderr, 1, MANY, "", +DEFUN ("trace-to-stderr", Ftrace_to_stderr, Strace_to_stderr, 1, MANY, "", doc: /* Like `format', but print result to stderr. usage: (trace-to-stderr STRING &rest OBJECTS) */) (size_t nargs, Lisp_Object *args) diff --git a/src/xfaces.c b/src/xfaces.c index 6330827b5cc..6d8acd77d87 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -564,7 +564,7 @@ unregister_colors (pixels, n) } -DEFUE ("dump-colors", Fdump_colors, Sdump_colors, 0, 0, 0, +DEFUN ("dump-colors", Fdump_colors, Sdump_colors, 0, 0, 0, doc: /* Dump currently allocated colors to stderr. */) (void) { @@ -883,7 +883,7 @@ clear_face_cache (int clear_fonts_p) } -DEFUE ("clear-face-cache", Fclear_face_cache, Sclear_face_cache, 0, 1, 0, +DEFUN ("clear-face-cache", Fclear_face_cache, Sclear_face_cache, 0, 1, 0, doc: /* Clear face caches on all frames. Optional THOROUGHLY non-nil means try to free unused fonts, too. */) (Lisp_Object thoroughly) @@ -6352,7 +6352,7 @@ dump_realized_face (face) } -DEFUE ("dump-face", Fdump_face, Sdump_face, 0, 1, 0, doc: /* */) +DEFUN ("dump-face", Fdump_face, Sdump_face, 0, 1, 0, doc: /* */) (Lisp_Object n) { if (NILP (n)) @@ -6385,7 +6385,7 @@ DEFUE ("dump-face", Fdump_face, Sdump_face, 0, 1, 0, doc: /* */) } -DEFUE ("show-face-resources", Fshow_face_resources, Sshow_face_resources, +DEFUN ("show-face-resources", Fshow_face_resources, Sshow_face_resources, 0, 0, 0, doc: /* */) (void) { diff --git a/src/xfns.c b/src/xfns.c index 50a56b55614..1182ef8e770 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -3495,7 +3495,7 @@ x_get_focus_frame (struct frame *frame) policy. But I think it's okay to use when it's clearly done following a user-command. */ -DEFUE ("x-focus-frame", Fx_focus_frame, Sx_focus_frame, 1, 1, 0, +DEFUN ("x-focus-frame", Fx_focus_frame, Sx_focus_frame, 1, 1, 0, doc: /* Set the input focus to FRAME. FRAME nil means use the selected frame. */) (Lisp_Object frame) @@ -3548,7 +3548,7 @@ DEFUN ("xw-color-values", Fxw_color_values, Sxw_color_values, 1, 2, 0, return Qnil; } -DEFUE ("xw-display-color-p", Fxw_display_color_p, Sxw_display_color_p, 0, 1, 0, +DEFUN ("xw-display-color-p", Fxw_display_color_p, Sxw_display_color_p, 0, 1, 0, doc: /* Internal function called by `display-color-p', which see. */) (Lisp_Object terminal) { @@ -3570,7 +3570,7 @@ DEFUE ("xw-display-color-p", Fxw_display_color_p, Sxw_display_color_p, 0, 1, 0, } } -DEFUE ("x-display-grayscale-p", Fx_display_grayscale_p, Sx_display_grayscale_p, +DEFUN ("x-display-grayscale-p", Fx_display_grayscale_p, Sx_display_grayscale_p, 0, 1, 0, doc: /* Return t if the X display supports shades of gray. Note that color displays do support shades of gray. @@ -5198,7 +5198,7 @@ Text larger than the specified size is clipped. */) } -DEFUE ("x-hide-tip", Fx_hide_tip, Sx_hide_tip, 0, 0, 0, +DEFUN ("x-hide-tip", Fx_hide_tip, Sx_hide_tip, 0, 0, 0, doc: /* Hide the current tooltip window, if there is any. Value is t if tooltip was open, nil otherwise. */) (void) diff --git a/src/xmenu.c b/src/xmenu.c index 43badb94e54..6e84b845a46 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -203,7 +203,7 @@ mouse_position_for_popup (FRAME_PTR f, int *x, int *y) #ifdef HAVE_MENUS -DEFUE ("x-popup-dialog", Fx_popup_dialog, Sx_popup_dialog, 2, 3, 0, +DEFUN ("x-popup-dialog", Fx_popup_dialog, Sx_popup_dialog, 2, 3, 0, doc: /* Pop up a dialog box and return user's selection. POSITION specifies which frame to use. This is normally a mouse button event or a window or frame. diff --git a/src/xsettings.c b/src/xsettings.c index 0d312f31bb9..d09b702a428 100644 --- a/src/xsettings.c +++ b/src/xsettings.c @@ -720,7 +720,7 @@ DEFUN ("font-get-system-font", Ffont_get_system_font, Sfont_get_system_font, : Qnil; } -DEFUE ("tool-bar-get-system-style", Ftool_bar_get_system_style, +DEFUN ("tool-bar-get-system-style", Ftool_bar_get_system_style, Stool_bar_get_system_style, 0, 0, 0, doc: /* Get the system tool bar style. If no system tool bar style is known, return `tool-bar-style' if set to a -- cgit v1.2.1 From 69003fd8410b1d08ad4364af1eb29a4b795f59bb Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Apr 2011 23:15:53 -0700 Subject: 2011-04-14 Paul Eggert * alloc.c (refill_memory_reserve): Now static if !defined REL_ALLOC || defined SYSTEM_MALLOC. * lisp.h (refill_memory_reserve): Declare only if not static. --- src/ChangeLog | 6 +++++- src/alloc.c | 3 +++ src/lisp.h | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 15e2aaf9714..fb97a49e5b5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,4 +1,8 @@ -2011-04-14 Paul Eggert + 2011-04-14 Paul Eggert + + * alloc.c (refill_memory_reserve): Now static if + !defined REL_ALLOC || defined SYSTEM_MALLOC. + * lisp.h (refill_memory_reserve): Declare only if not static. * xsettings.c, xsettings.h (xsettings_get_system_normal_font): Define only if USE_LUCID. diff --git a/src/alloc.c b/src/alloc.c index d1d6323f905..1c793c985eb 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -280,6 +280,9 @@ static void gc_sweep (void); static void mark_glyph_matrix (struct glyph_matrix *); static void mark_face_cache (struct face_cache *); +#if !defined REL_ALLOC || defined SYSTEM_MALLOC +static void refill_memory_reserve (void); +#endif static struct Lisp_String *allocate_string (void); static void compact_small_strings (void); static void free_large_strings (void); diff --git a/src/lisp.h b/src/lisp.h index 4696a1c3432..4c7c5b50c89 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2652,7 +2652,9 @@ extern void memory_full (void) NO_RETURN; extern void buffer_memory_full (void) NO_RETURN; extern int survives_gc_p (Lisp_Object); extern void mark_object (Lisp_Object); +#if defined REL_ALLOC && !defined SYSTEM_MALLOC extern void refill_memory_reserve (void); +#endif extern const char *pending_malloc_warning; extern Lisp_Object *stack_base; EXFUN (Fcons, 2); -- cgit v1.2.1 From 5d4cb038a45cc94f9a132cf44a787b73e1e3055c Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Apr 2011 23:26:22 -0700 Subject: * sysdep.c (croak): Now static, if defined TIOCNOTTY || defined USG5 || defined CYGWIN. * syssignal.h (croak): Declare only if not static. --- src/ChangeLog | 6 +++++- src/sysdep.c | 3 +++ src/syssignal.h | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index fb97a49e5b5..70b976e2558 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,4 +1,8 @@ - 2011-04-14 Paul Eggert +2011-04-14 Paul Eggert + + * sysdep.c (croak): Now static, if + defined TIOCNOTTY || defined USG5 || defined CYGWIN. + * syssignal.h (croak): Declare only if not static. * alloc.c (refill_memory_reserve): Now static if !defined REL_ALLOC || defined SYSTEM_MALLOC. diff --git a/src/sysdep.c b/src/sysdep.c index a9ad4b4dea3..3dc255933ee 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -120,6 +120,9 @@ struct utimbuf { static int emacs_get_tty (int, struct emacs_tty *); static int emacs_set_tty (int, struct emacs_tty *, int); +#if defined TIOCNOTTY || defined USG5 || defined CYGWIN +static void croak (char *) NO_RETURN; +#endif /* Declare here, including term.h is problematic on some systems. */ extern void tputs (const char *, int, int (*)(int)); diff --git a/src/syssignal.h b/src/syssignal.h index a2329fd0fdb..c5c749407cc 100644 --- a/src/syssignal.h +++ b/src/syssignal.h @@ -74,7 +74,9 @@ signal_handler_t sys_signal (int signal_number, signal_handler_t action); sigset_t sys_sigblock (sigset_t new_mask); sigset_t sys_sigunblock (sigset_t new_mask); sigset_t sys_sigsetmask (sigset_t new_mask); +#if ! (defined TIOCNOTTY || defined USG5 || defined CYGWIN) void croak (char *) NO_RETURN; +#endif #define sys_sigdel(MASK,SIG) sigdelset (&MASK,SIG) -- cgit v1.2.1 From 9996870822d6e2a0ebd2990aec8e707f09f7b264 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Apr 2011 23:33:48 -0700 Subject: * fileio.c: Add FIXMES mentioning Bug#8496. --- src/fileio.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/fileio.c b/src/fileio.c index d1e285959e2..b4a464940c5 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -3802,6 +3802,8 @@ variable `last-coding-system-used' to the coding system actually used. */) /* For a special file, all we can do is guess. */ total = READ_BUF_SIZE; + /* FIXME: This if-statement is a no-op, because 'inserted' must be zero here + (Bug#8496). */ if (NILP (visit) && inserted > 0) { #ifdef CLASH_DETECTION @@ -3912,6 +3914,7 @@ variable `last-coding-system-used' to the coding system actually used. */) if (inserted == 0) { #ifdef CLASH_DETECTION + /* FIXME: This code is a no-op, too (Bug#8496). */ if (we_locked_file) unlock_file (BVAR (current_buffer, file_truename)); #endif -- cgit v1.2.1 From e3b27b31a8379663f047e53c29e938018d7dd6b7 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Apr 2011 23:48:41 -0700 Subject: Don't publish debugger-only interfaces to other modules. * lisp.h (safe_debug_print, debug_output_compilation_hack): (verify_bytepos, count_markers): Move decls to the only modules that need them. * region-cache.h (pp_cache): Likewise. * window.h (check_all_windows): Likewise. * marker.c, print.c, region-cache.c, window.c: Decls moved here. --- src/ChangeLog | 8 ++++++++ src/lisp.h | 4 ---- src/marker.c | 2 ++ src/print.c | 2 ++ src/region-cache.c | 1 + src/region-cache.h | 3 --- src/window.c | 1 + src/window.h | 1 - 8 files changed, 14 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 70b976e2558..8b566b0d95e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,13 @@ 2011-04-14 Paul Eggert + Don't publish debugger-only interfaces to other modules. + * lisp.h (safe_debug_print, debug_output_compilation_hack): + (verify_bytepos, count_markers): Move decls to the only modules + that need them. + * region-cache.h (pp_cache): Likewise. + * window.h (check_all_windows): Likewise. + * marker.c, print.c, region-cache.c, window.c: Decls moved here. + * sysdep.c (croak): Now static, if defined TIOCNOTTY || defined USG5 || defined CYGWIN. * syssignal.h (croak): Declare only if not static. diff --git a/src/lisp.h b/src/lisp.h index 4c7c5b50c89..d629c40198a 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2743,7 +2743,6 @@ extern void syms_of_chartab (void); /* Defined in print.c */ extern Lisp_Object Vprin1_to_string_buffer; extern void debug_print (Lisp_Object) EXTERNALLY_VISIBLE; -extern void safe_debug_print (Lisp_Object) EXTERNALLY_VISIBLE; EXFUN (Fprin1, 2); EXFUN (Fprin1_to_string, 2); EXFUN (Fterpri, 1); @@ -2751,7 +2750,6 @@ EXFUN (Fprint, 2); EXFUN (Ferror_message_string, 1); extern Lisp_Object Qstandard_output; extern Lisp_Object Qexternal_debugging_output; -extern void debug_output_compilation_hack (int) EXTERNALLY_VISIBLE; extern void temp_output_buffer_setup (const char *); extern int print_level; extern Lisp_Object Qprint_escape_newlines; @@ -2967,14 +2965,12 @@ extern EMACS_INT marker_byte_position (Lisp_Object); extern void clear_charpos_cache (struct buffer *); extern EMACS_INT charpos_to_bytepos (EMACS_INT); extern EMACS_INT buf_charpos_to_bytepos (struct buffer *, EMACS_INT); -extern EMACS_INT verify_bytepos (EMACS_INT charpos) EXTERNALLY_VISIBLE; extern EMACS_INT buf_bytepos_to_charpos (struct buffer *, EMACS_INT); extern void unchain_marker (struct Lisp_Marker *marker); extern Lisp_Object set_marker_restricted (Lisp_Object, Lisp_Object, Lisp_Object); extern Lisp_Object set_marker_both (Lisp_Object, Lisp_Object, EMACS_INT, EMACS_INT); extern Lisp_Object set_marker_restricted_both (Lisp_Object, Lisp_Object, EMACS_INT, EMACS_INT); -extern int count_markers (struct buffer *) EXTERNALLY_VISIBLE; extern void syms_of_marker (void); /* Defined in fileio.c */ diff --git a/src/marker.c b/src/marker.c index 7d461099140..675bbc5ad73 100644 --- a/src/marker.c +++ b/src/marker.c @@ -242,6 +242,7 @@ buf_charpos_to_bytepos (struct buffer *b, EMACS_INT charpos) /* Used for debugging: recompute the bytepos corresponding to CHARPOS in the simplest, most reliable way. */ +extern EMACS_INT verify_bytepos (EMACS_INT charpos) EXTERNALLY_VISIBLE; EMACS_INT verify_bytepos (EMACS_INT charpos) { @@ -864,6 +865,7 @@ DEFUN ("buffer-has-markers-at", Fbuffer_has_markers_at, Sbuffer_has_markers_at, /* For debugging -- count the markers in buffer BUF. */ +extern int count_markers (struct buffer *) EXTERNALLY_VISIBLE; int count_markers (struct buffer *buf) { diff --git a/src/print.c b/src/print.c index 42c5df86783..617ee662e79 100644 --- a/src/print.c +++ b/src/print.c @@ -738,6 +738,7 @@ to make it write to the debugging output. */) /* This function is never called. Its purpose is to prevent print_output_debug_flag from being optimized away. */ +exterr void debug_output_compilation_hack (int) EXTERNALLY_VISIBLE; void debug_output_compilation_hack (int x) { @@ -798,6 +799,7 @@ debug_print (Lisp_Object arg) fprintf (stderr, "\r\n"); } +void safe_debug_print (Lisp_Object) EXTERNALLY_VISIBLE; void safe_debug_print (Lisp_Object arg) { diff --git a/src/region-cache.c b/src/region-cache.c index 53ce0e9d802..a0b85039e74 100644 --- a/src/region-cache.c +++ b/src/region-cache.c @@ -781,6 +781,7 @@ int region_cache_backward (struct buffer *buf, struct region_cache *c, /* Debugging: pretty-print a cache to the standard error output. */ +void pp_cache (struct region_cache *) EXTERNALLY_VISIBLE; void pp_cache (struct region_cache *c) { diff --git a/src/region-cache.h b/src/region-cache.h index 255b517f17a..ea767ed0dc3 100644 --- a/src/region-cache.h +++ b/src/region-cache.h @@ -110,6 +110,3 @@ extern int region_cache_backward (struct buffer *BUF, struct region_cache *CACHE, EMACS_INT POS, EMACS_INT *NEXT); - -/* For debugging. */ -void pp_cache (struct region_cache *) EXTERNALLY_VISIBLE; diff --git a/src/window.c b/src/window.c index eef783268ee..9ee35025d32 100644 --- a/src/window.c +++ b/src/window.c @@ -2338,6 +2338,7 @@ window_loop (enum window_loop type, Lisp_Object obj, int mini, Lisp_Object frame /* Used for debugging. Abort if any window has a dead buffer. */ +extern void check_all_windows (void) EXTERNALLY_VISIBLE; void check_all_windows (void) { diff --git a/src/window.h b/src/window.h index 4b32edd2149..65d554a5501 100644 --- a/src/window.h +++ b/src/window.h @@ -776,7 +776,6 @@ extern void freeze_window_starts (struct frame *, int); extern void grow_mini_window (struct window *, int); extern void shrink_mini_window (struct window *); extern int window_relative_x_coord (struct window *, enum window_part, int); -extern void check_all_windows (void) EXTERNALLY_VISIBLE; void run_window_configuration_change_hook (struct frame *f); -- cgit v1.2.1 From c38bf546b2bb50932ac15cf3283c74a4bddc99c0 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 14 Apr 2011 00:09:45 -0700 Subject: Fix typo in previous comment. --- src/print.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/print.c b/src/print.c index 617ee662e79..6a331cb11f2 100644 --- a/src/print.c +++ b/src/print.c @@ -738,7 +738,7 @@ to make it write to the debugging output. */) /* This function is never called. Its purpose is to prevent print_output_debug_flag from being optimized away. */ -exterr void debug_output_compilation_hack (int) EXTERNALLY_VISIBLE; +extern void debug_output_compilation_hack (int) EXTERNALLY_VISIBLE; void debug_output_compilation_hack (int x) { -- cgit v1.2.1 From 8b913b570b95f17c9380a9b1f3a487e7c098ecaa Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Thu, 14 Apr 2011 09:56:52 +0200 Subject: * fileio.c (Finsert_file_contents): Fix typo in 2005-05-13 change. (Bug#8496) --- src/ChangeLog | 5 +++++ src/fileio.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index d2c95aee4c4..11ae63fe4d7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-04-14 Andreas Schwab + + * fileio.c (Finsert_file_contents): Fix typo in 2005-05-13 + change. (Bug#8496) + 2011-04-13 Eli Zaretskii * xdisp.c (handle_invisible_prop): Don't call bidi_paragraph_init diff --git a/src/fileio.c b/src/fileio.c index 7e2d888b227..8fd89957adb 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -3800,7 +3800,7 @@ variable `last-coding-system-used' to the coding system actually used. */) /* For a special file, all we can do is guess. */ total = READ_BUF_SIZE; - if (NILP (visit) && inserted > 0) + if (NILP (visit) && total > 0) { #ifdef CLASH_DETECTION if (!NILP (BVAR (current_buffer, file_truename)) -- cgit v1.2.1 From cd64ea1d0df393beb93d1bdf19bd3990e3378f85 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 14 Apr 2011 12:34:42 -0700 Subject: * lisp.h (INFUN): Remove. Suggested by Dan Nicolaescu in . All uses spelled out. --- src/ChangeLog | 4 ++++ src/buffer.c | 4 ++-- src/callproc.c | 2 +- src/composite.c | 3 ++- src/dired.c | 2 +- src/doc.c | 5 +++-- src/editfns.c | 2 +- src/eval.c | 2 +- src/fileio.c | 2 +- src/image.c | 2 +- src/insdel.c | 2 +- src/keyboard.c | 7 ++++--- src/keymap.c | 4 ++-- src/lisp.h | 2 -- src/process.c | 4 ++-- src/syntax.c | 2 +- src/textprop.c | 3 ++- src/window.c | 10 ++++++---- 18 files changed, 35 insertions(+), 27 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 8b566b0d95e..29b2457e08a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2011-04-14 Paul Eggert + * lisp.h (INFUN): Remove. Suggested by Dan Nicolaescu in + . + All uses spelled out. + Don't publish debugger-only interfaces to other modules. * lisp.h (safe_debug_print, debug_output_compilation_hack): (verify_bytepos, count_markers): Move decls to the only modules diff --git a/src/buffer.c b/src/buffer.c index 7b543b80a25..c649836adb8 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -100,8 +100,8 @@ static char buffer_permanent_local_flags[MAX_PER_BUFFER_VARS]; int last_per_buffer_idx; -INFUN (Fset_buffer_major_mode, 1); -INFUN (Fdelete_overlay, 1); +static Lisp_Object Fset_buffer_major_mode (Lisp_Object); +static Lisp_Object Fdelete_overlay (Lisp_Object); static void call_overlay_mod_hooks (Lisp_Object list, Lisp_Object overlay, int after, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3); diff --git a/src/callproc.c b/src/callproc.c index 57f058aa165..3726eb3cc7f 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -96,7 +96,7 @@ int synch_process_retcode; /* Nonzero if this is termination due to exit. */ static int call_process_exited; -INFUN (Fgetenv_internal, 2); +static Lisp_Object Fgetenv_internal (Lisp_Object, Lisp_Object); static Lisp_Object call_process_kill (Lisp_Object fdpid) diff --git a/src/composite.c b/src/composite.c index cccc75cc1b9..fab7cb86ba8 100644 --- a/src/composite.c +++ b/src/composite.c @@ -158,7 +158,8 @@ static Lisp_Object Qauto_composition_function; auto-compositions. */ #define MAX_AUTO_COMPOSITION_LOOKBACK 3 -INFUN (Fcomposition_get_gstring, 4); +static Lisp_Object Fcomposition_get_gstring (Lisp_Object, Lisp_Object, + Lisp_Object, Lisp_Object); /* Temporary variable used in macros COMPOSITION_XXX. */ Lisp_Object composition_temp; diff --git a/src/dired.c b/src/dired.c index 20d5b586670..60d7bc64974 100644 --- a/src/dired.c +++ b/src/dired.c @@ -87,7 +87,7 @@ static Lisp_Object Qfile_attributes; static Lisp_Object Qfile_attributes_lessp; static int scmp (const char *, const char *, int); -INFUN (Ffile_attributes, 2); +static Lisp_Object Ffile_attributes (Lisp_Object, Lisp_Object); #ifdef WINDOWSNT Lisp_Object diff --git a/src/doc.c b/src/doc.c index a793011990f..354aff84979 100644 --- a/src/doc.c +++ b/src/doc.c @@ -42,8 +42,9 @@ static char *get_doc_string_buffer; static int get_doc_string_buffer_size; static unsigned char *read_bytecode_pointer; -INFUN (Fdocumentation_property, 3); -INFUN (Fsnarf_documentation, 1); +static Lisp_Object Fdocumentation_property (Lisp_Object, Lisp_Object, + Lisp_Object); +static Lisp_Object Fsnarf_documentation (Lisp_Object); /* readchar in lread.c calls back here to fetch the next byte. If UNREADFLAG is 1, we unread a byte. */ diff --git a/src/editfns.c b/src/editfns.c index 30974e0b50e..5e1dcce0275 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -108,7 +108,7 @@ static void transpose_markers (EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT); static Lisp_Object Qbuffer_access_fontify_functions; -INFUN (Fuser_full_name, 1); +static Lisp_Object Fuser_full_name (Lisp_Object); /* Symbol for the text property used to mark fields. */ diff --git a/src/eval.c b/src/eval.c index 4d0786fc0d4..c068f5f3fbf 100644 --- a/src/eval.c +++ b/src/eval.c @@ -142,7 +142,7 @@ static Lisp_Object funcall_lambda (Lisp_Object, size_t, Lisp_Object *); static void unwind_to_catch (struct catchtag *, Lisp_Object) NO_RETURN; static int interactive_p (int); static Lisp_Object apply_lambda (Lisp_Object fun, Lisp_Object args); -INFUN (Ffetch_bytecode, 1); +static Lisp_Object Ffetch_bytecode (Lisp_Object); void init_eval_once (void) diff --git a/src/fileio.c b/src/fileio.c index b4a464940c5..7f749536d56 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -144,7 +144,7 @@ Lisp_Object Qfile_name_history; static Lisp_Object Qcar_less_than_car; -INFUN (Fmake_symbolic_link, 3); +static Lisp_Object Fmake_symbolic_link (Lisp_Object, Lisp_Object, Lisp_Object); static int a_write (int, Lisp_Object, int, int, Lisp_Object *, struct coding_system *); static int e_write (int, Lisp_Object, int, int, struct coding_system *); diff --git a/src/image.c b/src/image.c index 5e5d3509eaa..fb555725b82 100644 --- a/src/image.c +++ b/src/image.c @@ -137,7 +137,7 @@ static void free_color_table (void); static unsigned long *colors_in_color_table (int *n); static unsigned long lookup_pixel_color (struct frame *f, unsigned long p); #endif -INFUN (Finit_image_library, 2); +static Lisp_Object Finit_image_library (Lisp_Object, Lisp_Object); /* Code to deal with bitmaps. Bitmaps are referenced by their bitmap id, which is just an int that this section returns. Bitmaps are diff --git a/src/insdel.c b/src/insdel.c index 8733054e9cd..82dce13af98 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -48,7 +48,7 @@ static void adjust_markers_for_replace (EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT); static void adjust_point (EMACS_INT nchars, EMACS_INT nbytes); -INFUN (Fcombine_after_change_execute, 0); +static Lisp_Object Fcombine_after_change_execute (void); /* List of elements of the form (BEG-UNCHANGED END-UNCHANGED CHANGE-AMOUNT) describing changes which happened while combine_after_change_calls diff --git a/src/keyboard.c b/src/keyboard.c index 29062a77e32..28e7e5bd463 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -458,7 +458,8 @@ static void interrupt_signal (int signalnum); #ifdef SIGIO static void input_available_signal (int signo); #endif -INFUN (Fcommand_execute, 4); +static Lisp_Object (Fcommand_execute) (Lisp_Object, Lisp_Object, Lisp_Object, + Lisp_Object); static void handle_interrupt (void); static void quit_throw_to_read_char (void) NO_RETURN; static void timer_start_idle (void); @@ -1193,7 +1194,7 @@ This also exits all active minibuffers. */) Fthrow (Qtop_level, Qnil); } -INFUN (Fexit_recursive_edit, 0) NO_RETURN; +static Lisp_Object Fexit_recursive_edit (void) NO_RETURN; DEFUN ("exit-recursive-edit", Fexit_recursive_edit, Sexit_recursive_edit, 0, 0, "", doc: /* Exit from the innermost recursive edit or minibuffer. */) (void) @@ -1204,7 +1205,7 @@ DEFUN ("exit-recursive-edit", Fexit_recursive_edit, Sexit_recursive_edit, 0, 0, error ("No recursive edit is in progress"); } -INFUN (Fabort_recursive_edit, 0) NO_RETURN; +static Lisp_Object Fabort_recursive_edit (void) NO_RETURN; DEFUN ("abort-recursive-edit", Fabort_recursive_edit, Sabort_recursive_edit, 0, 0, "", doc: /* Abort the command that requested this recursive edit or minibuffer input. */) (void) diff --git a/src/keymap.c b/src/keymap.c index ba958077f0d..8713bcf1279 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -71,7 +71,7 @@ static Lisp_Object where_is_cache; /* Which keymaps are reverse-stored in the cache. */ static Lisp_Object where_is_cache_keymaps; -INFUN (Flookup_key, 3); +static Lisp_Object Flookup_key (Lisp_Object, Lisp_Object, Lisp_Object); static Lisp_Object store_in_keymap (Lisp_Object, Lisp_Object, Lisp_Object); static void fix_submap_inheritance (Lisp_Object, Lisp_Object, Lisp_Object); @@ -957,7 +957,7 @@ store_in_keymap (Lisp_Object keymap, register Lisp_Object idx, Lisp_Object def) return def; } -INFUN (Fcopy_keymap, 1); +static Lisp_Object Fcopy_keymap (Lisp_Object); static Lisp_Object copy_keymap_item (Lisp_Object elt) diff --git a/src/lisp.h b/src/lisp.h index d629c40198a..09830a980f2 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2276,8 +2276,6 @@ void staticpro (Lisp_Object *); appropriate prototype. */ #define EXFUN(fnname, maxargs) \ extern Lisp_Object fnname DEFUN_ARGS_ ## maxargs -#define INFUN(fnname, maxargs) \ - static Lisp_Object fnname DEFUN_ARGS_ ## maxargs /* Forward declarations for prototypes. */ struct window; diff --git a/src/process.c b/src/process.c index 0cec8977ad0..741f2e363f3 100644 --- a/src/process.c +++ b/src/process.c @@ -235,7 +235,7 @@ static int process_output_skip; #define process_output_delay_count 0 #endif -INFUN (Fget_process, 1); +static Lisp_Object Fget_process (Lisp_Object); static void create_process (Lisp_Object, char **, Lisp_Object); static int keyboard_bit_set (SELECT_TYPE *); static void deactivate_process (Lisp_Object); @@ -1084,7 +1084,7 @@ DEFUN ("process-query-on-exit-flag", } #ifdef DATAGRAM_SOCKETS -INFUN (Fprocess_datagram_address, 1); +static Lisp_Object Fprocess_datagram_address (Lisp_Object); #endif DEFUN ("process-contact", Fprocess_contact, Sprocess_contact, diff --git a/src/syntax.c b/src/syntax.c index ce203948b04..031409144b1 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -141,7 +141,7 @@ static EMACS_INT find_start_begv; static int find_start_modiff; -INFUN (Fsyntax_table_p, 1); +static Lisp_Object Fsyntax_table_p (Lisp_Object); static Lisp_Object skip_chars (int, Lisp_Object, Lisp_Object, int); static Lisp_Object skip_syntaxes (int, Lisp_Object, Lisp_Object); static Lisp_Object scan_lists (EMACS_INT, EMACS_INT, EMACS_INT, int); diff --git a/src/textprop.c b/src/textprop.c index 7ce488334e8..a0d7d2689c4 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -76,7 +76,8 @@ static Lisp_Object interval_insert_behind_hooks; static Lisp_Object interval_insert_in_front_hooks; static void text_read_only (Lisp_Object) NO_RETURN; -INFUN (Fprevious_property_change, 3); +static Lisp_Object Fprevious_property_change (Lisp_Object, Lisp_Object, + Lisp_Object); /* Signal a `text-read-only' error. This function makes it easier diff --git a/src/window.c b/src/window.c index 9ee35025d32..5d059535614 100644 --- a/src/window.c +++ b/src/window.c @@ -3278,10 +3278,12 @@ change_window_heights (Lisp_Object window, int n) int window_select_count; -INFUN (Fset_window_margins, 3); -INFUN (Fset_window_fringes, 4); -INFUN (Fset_window_scroll_bars, 4); -INFUN (Fset_window_vscroll, 3); +static Lisp_Object Fset_window_margins (Lisp_Object, Lisp_Object, Lisp_Object); +static Lisp_Object Fset_window_fringes (Lisp_Object, Lisp_Object, Lisp_Object, + Lisp_Object); +static Lisp_Object Fset_window_scroll_bars (Lisp_Object, Lisp_Object, + Lisp_Object, Lisp_Object); +static Lisp_Object Fset_window_vscroll (Lisp_Object, Lisp_Object, Lisp_Object); static void run_funs (Lisp_Object funs) -- cgit v1.2.1 From dd19b04f04532ef0a38a40e37123d03998f18c4a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 14 Apr 2011 13:20:17 -0700 Subject: Fix merge typo. --- src/fileio.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/fileio.c b/src/fileio.c index b8c5e796db4..dcba6b6c0ae 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -145,7 +145,6 @@ Lisp_Object Qfile_name_history; static Lisp_Object Qcar_less_than_car; static Lisp_Object Fmake_symbolic_link (Lisp_Object, Lisp_Object, Lisp_Object); -static int a_write (int, Lisp_Object, int, int, static int a_write (int, Lisp_Object, EMACS_INT, EMACS_INT, Lisp_Object *, struct coding_system *); static int e_write (int, Lisp_Object, EMACS_INT, EMACS_INT, -- cgit v1.2.1 From 6c60eb9f2c4778c5fc07dd44b283edeb8583a3a0 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 14 Apr 2011 21:58:49 -0300 Subject: * src/process.c (Qprocessp): Don't declare static. * src/lisp.h (Qprocessp): Declare again. --- src/ChangeLog | 5 +++++ src/lisp.h | 3 ++- src/process.c | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 2b0df1f7a30..e3e6862f7e8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-04-15 Stefan Monnier + + * process.c (Qprocessp): Don't declare static. + * lisp.h (Qprocessp): Declare again. + 2011-04-14 Paul Eggert Improve C-level modularity by making more things 'static'. diff --git a/src/lisp.h b/src/lisp.h index 8b8e25eb689..96c8e42995b 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -3194,12 +3194,13 @@ extern int inhibit_window_system; /* Nonzero means that a filter or a sentinel is running. */ extern int running_asynch_code; -/* Defined in process.c */ +/* Defined in process.c. */ extern Lisp_Object QCtype, Qlocal; EXFUN (Fget_buffer_process, 1); EXFUN (Fprocess_status, 1); EXFUN (Fkill_process, 2); EXFUN (Fwaiting_for_user_input_p, 0); +extern Lisp_Object Qprocessp; extern void kill_buffer_processes (Lisp_Object); extern int wait_reading_process_output (int, int, int, int, Lisp_Object, diff --git a/src/process.c b/src/process.c index 741f2e363f3..e9ac324845b 100644 --- a/src/process.c +++ b/src/process.c @@ -24,7 +24,7 @@ along with GNU Emacs. If not, see . */ #include #include #include -#include /* some typedefs are used in sys/file.h */ +#include /* Some typedefs are used in sys/file.h. */ #include #include #include @@ -127,7 +127,7 @@ int inhibit_sentinels; #ifdef subprocesses -static Lisp_Object Qprocessp; +Lisp_Object Qprocessp; static Lisp_Object Qrun, Qstop, Qsignal; static Lisp_Object Qopen, Qclosed, Qconnect, Qfailed, Qlisten; Lisp_Object Qlocal; -- cgit v1.2.1 From 7990b61a915a095639cc4986e8bce99c4d08326a Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 15 Apr 2011 03:26:32 +0200 Subject: src/font.c (Qopentype): Don't make static (used from w32uniscribe.c). --- src/ChangeLog | 4 ++++ src/font.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index e3e6862f7e8..8ab1974ed58 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -3,6 +3,10 @@ * process.c (Qprocessp): Don't declare static. * lisp.h (Qprocessp): Declare again. +2011-04-15 Juanma Barranquero + + * font.c (Qopentype): Don't make static (used from w32uniscribe.c). + 2011-04-14 Paul Eggert Improve C-level modularity by making more things 'static'. diff --git a/src/font.c b/src/font.c index 7d8b94bddf2..7fe0815d80e 100644 --- a/src/font.c +++ b/src/font.c @@ -48,7 +48,7 @@ along with GNU Emacs. If not, see . */ #include "nsterm.h" #endif /* HAVE_NS */ -static Lisp_Object Qopentype; +Lisp_Object Qopentype; /* Important character set strings. */ Lisp_Object Qascii_0, Qiso8859_1, Qiso10646_1, Qunicode_bmp, Qunicode_sip; -- cgit v1.2.1 From cc39a9dba6e3633e67501eaf0361fb2f040cb064 Mon Sep 17 00:00:00 2001 From: Ben Key Date: Thu, 14 Apr 2011 21:03:43 -0500 Subject: Fix link errors in the Mac OS build that were caused by variables being marked as static that should not have been. --- src/ChangeLog | 7 +++++++ src/keyboard.c | 2 +- src/xfaces.c | 12 ++++++++---- 3 files changed, 16 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 8ab1974ed58..706751bbdfa 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2011-04-15 Ben Key + + * keyboard.c (Qundefined): Don't declare static since it is + used in nsfns.m. + * xfaces.c (Qbold, Qexpanded, Qitalic, Qcondensed): Don't + declare static since they are used in nsfont.m. + 2011-04-15 Stefan Monnier * process.c (Qprocessp): Don't declare static. diff --git a/src/keyboard.c b/src/keyboard.c index 7895d05b34f..c0c53c82714 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -246,7 +246,7 @@ Lisp_Object QPRIMARY; static Lisp_Object Qself_insert_command; static Lisp_Object Qforward_char; static Lisp_Object Qbackward_char; -static Lisp_Object Qundefined; +Lisp_Object Qundefined; static Lisp_Object Qtimer_event_handler; /* read_key_sequence stores here the command definition of the diff --git a/src/xfaces.c b/src/xfaces.c index 6d8acd77d87..5cfe99d1285 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -317,11 +317,15 @@ static Lisp_Object QCfontset; /* Symbols used for attribute values. */ Lisp_Object Qnormal; -static Lisp_Object Qbold, Qultra_light, Qextra_light, Qlight; +Lisp_Object Qbold; +static Lisp_Object Qultra_light, Qextra_light, Qlight; static Lisp_Object Qsemi_light, Qsemi_bold, Qextra_bold, Qultra_bold; -static Lisp_Object Qoblique, Qitalic, Qreverse_oblique, Qreverse_italic; -static Lisp_Object Qultra_condensed, Qextra_condensed, Qcondensed; -static Lisp_Object Qsemi_condensed, Qsemi_expanded, Qexpanded, Qextra_expanded; +static Lisp_Object Qoblique, Qreverse_oblique, Qreverse_italic; +Lisp_Object Qitalic; +static Lisp_Object Qultra_condensed, Qextra_condensed; +Lisp_Object Qcondensed; +static Lisp_Object Qsemi_condensed, Qsemi_expanded, Qextra_expanded; +Lisp_Object Qexpanded; static Lisp_Object Qultra_expanded; static Lisp_Object Qreleased_button, Qpressed_button; static Lisp_Object QCstyle, QCcolor, QCline_width; -- cgit v1.2.1