1. 14 Apr, 2011 4 commits
    • Paul Eggert's avatar
      * lread.c: Make symbols static if they're not exported. · 1e3890d1
      Paul Eggert authored
      (read_objects, initial_obarray, oblookup_last_bucket_number):
      Now static.
      (make_symbol): Remove; unused.
      * lisp.h (initial_obarray, make_symbol): Remove decls.
    • Paul Eggert's avatar
      * keyboard.c: Make symbols static if they're not exported. · 8a1414fa
      Paul Eggert authored
      (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.
    • Paul Eggert's avatar
    • Paul Eggert's avatar
      * insdel.c: Make symbols static if they're not exported. · 77382fcc
      Paul Eggert authored
      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.
  2. 13 Apr, 2011 4 commits
    • Paul Eggert's avatar
      * frame.c: Make symbols static if they're not exported. · 81626931
      Paul Eggert authored
      (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.
    • Paul Eggert's avatar
      * eval.c: Make symbols static if they're not exported. · 57a96f5c
      Paul Eggert authored
      (backtrace_list, lisp_eval_depth, when_entered_debugger): Now static.
      * lisp.h (backtrace_list): Remove decl.
    • Paul Eggert's avatar
      * emacs.c: Make symbols static if they're not exported. · 35f08c38
      Paul Eggert authored
      (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.
    • Paul Eggert's avatar
      * editfns.c: Move a (normally-unused) function to its only use. · f44bd759
      Paul Eggert authored
      * 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.
  3. 12 Apr, 2011 2 commits
    • Paul Eggert's avatar
      * xdisp.c: Make symbols static if they're not exported. · 8524aef3
      Paul Eggert authored
      * 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):
      * 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.
    • Paul Eggert's avatar
      * lisp.h (circular_list_error, FOREACH): Remove; unused. · a25f4dfa
      Paul Eggert authored
      * data.c (circular_list_error): Remove.
  4. 11 Apr, 2011 5 commits
    • Paul Eggert's avatar
      * casetab.c (Vascii_upcase_table, Vascii_eqv_table): Now static. · 31cd66f3
      Paul Eggert authored
      * lisp.h: Remove these decls.
    • Paul Eggert's avatar
      alloc.c: Import and export fewer symbols, and remove unused items. · 244ed907
      Paul Eggert authored
      * 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.
    • Paul Eggert's avatar
      Declare Lisp_Object Q* variables to be 'static' if not exproted. · 955cbe7b
      Paul Eggert authored
      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.
    • Paul Eggert's avatar
      * lisp.h (DEFINE_FUNC): Make sname 'static'. · 95c82688
      Paul Eggert authored
    • Paul Eggert's avatar
      Make Emacs functions such as Fatom 'static' by default. · 16a97296
      Paul Eggert authored
      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.
  5. 09 Apr, 2011 1 commit
    • Eli Zaretskii's avatar
      Replace some uses of `int' with EMACS_INT. · a53e2e89
      Eli Zaretskii authored
       src/search.c (string_match_1, fast_string_match)
       (fast_c_string_match_ignore_case, fast_string_match_ignore_case)
       (scan_buffer, find_next_newline_no_quit)
       (find_before_next_newline, search_command, Freplace_match)
       (Fmatch_data): Make some `int' variables be EMACS_INT.
       src/xdisp.c (display_count_lines): 3rd argument and return value now
       EMACS_INT.  All callers changed.
       (pint2hrstr): Last argument is now EMACS_INT.
       src/coding.c (detect_coding_utf_8, detect_coding_emacs_mule)
       (detect_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
       (detect_coding_ccl, detect_coding_charset, decode_coding_utf_8)
       (decode_coding_utf_16, decode_coding_emacs_mule)
       (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5)
       (decode_coding_ccl, decode_coding_charset)
       <consumed_chars, consumed_chars_base>: Declare EMACS_INT.
       (decode_coding_iso_2022, decode_coding_emacs_mule)
       (decode_coding_sjis, decode_coding_big5, decode_coding_charset)
       <char_offset, last_offset>: Declare EMACS_INT.
       (encode_coding_utf_8, encode_coding_utf_16)
       (encode_coding_emacs_mule, encode_invocation_designation)
       (encode_designation_at_bol, encode_coding_iso_2022)
       (encode_coding_sjis, encode_coding_big5, encode_coding_ccl)
       (encode_coding_raw_text, encode_coding_charset) <produced_chars>:
       Declare EMACS_INT.
       (ASSURE_DESTINATION): Declare more_bytes EMACS_INT.
       (encode_invocation_designation): Last argument P_NCHARS is now
       (decode_eol): Declare pos_byte, pos, and pos_end EMACS_INT.
       (produce_chars): from_nchars and to_nchars are now EMACS_INT.
       src/coding.h (struct coding_system) <head_ascii>: Declare EMACS_INT.
       All users changed.
       src/ccl.c (Fccl_execute_on_string): Declare some variables
  6. 08 Apr, 2011 1 commit
    • Chong Yidong's avatar
      Remove internal_with_output_to_temp_buffer, replacing sole user with Lisp. · cbb59342
      Chong Yidong authored
      * lisp/help.el (help-form-show): New function, to be called from C.
      Put help-form output in a buffer named differently than *Help*.
      * src/keyboard.c (read_char): Call Lisp function help-form-show,
      instead of using internal_with_output_to_temp_buffer.
      (Qhelp_form_show): New var.
      * src/lisp.h (internal_with_output_to_temp_buffer): Remove prototype.
      * src/print.c (internal_with_output_to_temp_buffer): Function deleted.
  7. 07 Apr, 2011 2 commits
    • Paul Eggert's avatar
    • Paul Eggert's avatar
      error: Print 32- and 64-bit integers portably (Bug#8435). · 5fdb398c
      Paul Eggert authored
      Without this change, on typical 64-bit hosts error ("...%d...", N)
      was used to print both 32- and 64-bit integers N, which relied on
      undefined behavior.
      * lisp.h, src/m/amdx86-64.h, src/m/ia64.h, src/m/ibms390x.h (pEd):
      New macro.
      * lisp.h (error, verror): Mark as printf-like functions.
      * eval.c (verror): Use vsnprintf, not doprnt, to do the real work.
      Report overflow in size calculations when allocating printf buffer.
      Do not truncate output string at its first null byte.
      * xdisp.c (vmessage): Use vsnprintf, not doprnt, to do the real work.
      Truncate the output at a character boundary, since vsnprintf does not
      do that.
      * charset.c (check_iso_charset_parameter): Convert internal
      character to string before calling 'error', since %c now has the
      printf meaning.
      * coding.c (Fdecode_sjis_char, Fdecode_big5_char): Avoid int
      overflow when computing char to be passed to 'error'.  Do not
      pass Lisp_Object to 'error'; pass the integer instead.
      * nsfns.m (Fns_do_applescript): Use int, not long, since it's
      formatted with plain %d.
  8. 06 Apr, 2011 2 commits
  9. 05 Apr, 2011 1 commit
  10. 01 Apr, 2011 2 commits
  11. 28 Mar, 2011 2 commits
    • Juanma Barranquero's avatar
      src/*.c: Remove some additional unused parameters. · 461c2ab9
      Juanma Barranquero authored
      * lisp.h (multibyte_char_to_unibyte):
      * character.c (multibyte_char_to_unibyte): Remove parameter `rev_tbl',
        unused since 2002-03-01T01:16:34Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
      * character.h (CHAR_TO_BYTE8):
      * cmds.c (internal_self_insert):
      * editfns.c (general_insert_function):
      * keymap.c (push_key_description):
      * search.c (Freplace_match):
      * xdisp.c (message_dolog, set_message_1): All callers changed.
      * coding.c (encode_designation_at_bol): Remove parameter `charbuf_end',
        unused since 2002-03-01T01:17:24Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
        All callers changed.
    • Stefan Monnier's avatar
      Don't reset post-command-hook to nil upon error. · f6d62986
      Stefan Monnier authored
      * src/eval.c (enum run_hooks_condition): Remove.
      (funcall_nil, funcall_not): New functions.
      (run_hook_with_args): Call each function through a `funcall' argument.
      Remove `cond' argument, now redundant.
      (Frun_hooks, Frun_hook_with_args, Frun_hook_with_args_until_success)
      (Frun_hook_with_args_until_failure): Adjust accordingly.
      (run_hook_wrapped_funcall, Frun_hook_wrapped): New functions.
      * src/keyboard.c (safe_run_hook_funcall): New function.
      (safe_run_hooks_1, safe_run_hooks_error, safe_run_hooks): On error,
      don't set the hook to nil, but remove the offending function instead.
      (Qcommand_hook_internal): Remove, unused.
      (syms_of_keyboard): Don't initialize Qcommand_hook_internal nor define
      * doc/lispref/commands.texi (Command Overview): post-command-hook is not reset
      to nil any more.
  12. 27 Mar, 2011 2 commits
  13. 22 Mar, 2011 1 commit
  14. 18 Mar, 2011 1 commit
  15. 16 Mar, 2011 4 commits
    • Paul Eggert's avatar
      * lisp.h (debug_output_compilation_hack): Add decl here, to avoid · f08b802a
      Paul Eggert authored
      warning when compiling print.c.
    • Stefan Monnier's avatar
      Remove bytecomp- prefix, plus misc changes. · ca105506
      Stefan Monnier authored
      * lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand): Make it work to
      inline lexbind interpreted functions into lexbind code.
      (bytedecomp-bytes): Not a dynamic var any more.
      (disassemble-offset): Get the bytes via an argument instead.
      (byte-decompile-bytecode-1): Use push.
      * lisp/emacs-lisp/bytecomp.el: Remove the bytecomp- prefix now that we use
      (byte-compile-outbuffer): Rename from bytecomp-outbuffer.
      * lisp/emacs-lisp/cl-macs.el (load-time-value):
      * lisp/emacs-lisp/cl.el (cl-compiling-file): Adjust to new name.
      * lisp/emacs-lisp/pcase.el (pcase-mutually-exclusive-predicates):
      Add byte-code-function-p.
      (pcase--u1): Remove left-over code from early development.
      Fix case of variable shadowing in guards and predicates.
      (pcase--u1): Add a new `let' pattern.
      * src/image.c (parse_image_spec): Use Ffunctionp.
      * src/lisp.h: Declare Ffunctionp.
    • Paul Eggert's avatar
      * alloc.c (mark_backtrace): Move decl from here ... · 8b2c52e9
      Paul Eggert authored
      * lisp.h: ... to here, so that it can be checked.
    • Paul Eggert's avatar
  16. 15 Mar, 2011 6 commits