1. 03 Aug, 2013 1 commit
    • Dmitry Antipov's avatar
      Drop FRAME_PTR typedef. · a10c8269
      Dmitry Antipov authored
      * composite.c, font.c, font.h, fontset.c, fontset.h, frame.c, frame.h:
      * ftfont.c, ftxfont.c, gtkutil.c, gtkutil.h, image.c, keyboard.c:
      * menu.c, menu.h, msdos.c, nsfns.m, nsfont.m, nsmenu.m, nsterm.h:
      * nsterm.m, scroll.c, term.c, w32fns.c, w32font.c, w32font.h:
      * w32inevt.c, w32inevt.h, w32menu.c, w32notify.c, w32term.c, w32term.h:
      * w32uniscribe.c, w32xfns.c, widget.c, window.c, xdisp.c, xfaces.c:
      * xfns.c, xfont.c, xftfont.c, xmenu.c, xselect.c, xterm.c:
      All related users changed.
      a10c8269
  2. 31 Jul, 2013 1 commit
    • Dmitry Antipov's avatar
      Drop unnecessary functions that deals with frame pixel size. · f435830e
      Dmitry Antipov authored
      * frame.h, msdos.h, w32term.h, xterm.h (x_pixel_width)
      (x_pixel_height): Drop prototypes.
      * msdos.c, nsfns.m, w32fns.c, xfns.c (x_pixel_width)
      (x_pixel_height): Drop implementations.
      * frame.c (Fframe_pixel_height): Use FRAME_PIXEL_HEIGHT
      which should be always valid for window frame.
      (Frame_pixel_width): Likewise with FRAME_PIXEL_WIDTH.
      * w32menu.c (Fx_popup_dialog):
      * xmenu.c (Fx_popup_dialog): Likewise for both.
      f435830e
  3. 07 Apr, 2013 1 commit
    • Dmitry Antipov's avatar
      Get rid of some platform-specific functions examining window · 7452b7bd
      Dmitry Antipov authored
      system and its capabilities.  This is a partial rework of the
      2013-04-05 change.
      * lisp.h (have_menus_p): Remove prototype.  This function is
      replaced with platform-independent window_system_available.
      (check_window_system): Move to...
      * frame.h (decode_window_system_frame, window_system_available):
      ...here, add new prototypes.
      * frame.c (window_system_available, decode_window_system_frame):
      New functions.
      (check_window_system): Platform-independent now.
      * xterm.h (x_in_use): Remove declaration.
      (check_x_frame):
      * w32term.h (check_x_frame):
      * nsterm.h (check_x_frame): Remove prototypes.  This function
      is replaced with platform-independent decode_window_system_frame.
      * msdos.c (have_menus_p): Remove.
      * nsfns.m (check_window_system, have_menus_p, check_ns_frame):
      Remove platform-specific functions.  Use check_window_system,
      decode_window_system_frame and check_ns_display_info where
      appropriate.  Minor style and comment tweaks.
      * w32fns.c (w32_in_use, check_window_system, have_menus_p)
      (check_x_frame): Likewise.
      * xfns.c (x_in_use, check_window_system, have_menus_p, check_x_frame):
      Likewise.
      * fileio.c, fns.c, font.c, fontset.c, image.c, menu.c, nsmenu.m:
      * nsselect.m, nsterm.m, w32font.c, w32menu.c, xfaces.c, xgselect.c:
      * xmenu.c, xselect.c: All related users changed.
      7452b7bd
  4. 05 Apr, 2013 1 commit
    • Dmitry Antipov's avatar
      Consistently use platform-specific function to detect window system. · 73931ad1
      Dmitry Antipov authored
      * lisp.h (check_window_system): New prototype.  This function is
      going to replace check_x, check_w32 and check_ns.
      (have_menus_p): Mention msdos.c in comment.
      * fontset.c (check_window_system_func): Remove.  Adjust all users.
      * fontset.h (check_window_system_func): Remove prototype.
      * nsterm.h (check_ns):
      * xterm.h (check_x):
      * w32term.h (check_w32): Likewise.
      * menu.c (Fx_popup_menu): Use check_window_system.
      * msdos.c (check_window_system): Define for MS-DOS.
      * nsfns.m (check_window_system): Define for NS.  Adjust all users.
      * w32fns.c (check_window_system): Likewise for MS-Windows.
      * xfns.c (check_window_system): Likewise for X.
      * font.c, frame.c, nsmenu.m, nsselect.m, nsterm.m, w32menu.c:
      * xfaces.c, xmenu.c: Use check_window_system where appropriate.
      73931ad1
  5. 28 Mar, 2013 1 commit
    • Dmitry Antipov's avatar
      * window.h (struct window): Replace hchild, vchild and buffer slots · e74aeda8
      Dmitry Antipov authored
      with the only contents slot.  This is possible because each valid
      window may have either the child window (in vertical or horizontal
      combination) or buffer to display (for the leaf window).  Using that,
      a lof of operations to traverse and/or change window hierarchies may
      be simplified.  New member horizontal is used to distinguish between
      horizontal and vertical combinations of internal windows.
      (WINDOW_LEAF_P, WINDOW_HORIZONTAL_COMBINATION_P)
      (WINDOW_VERTICAL_COMBINATION_P): New macros.
      (WINDOW_VALID_P, WINDOW_LIVE_P): Adjust to match struct window changes.
      * window.c (wset_hchild, wset_vchild): Remove.  Adjust all users.
      Use contents slot, not buffer, where appropriate.
      (wset_combination): New function.
      (wset_buffer): Add eassert.
      (Fframe_first_window): Simplify the loop reaching first window.
      (Fwindow_buffer): Use WINDOW_LEAF_P.
      (Fwindow_top_child): Use WINDOW_VERTICAL_COMBINATION_P.
      (Fwindow_left_child): Use WINDOW_HORIZONTAL_COMBINATION_P.
      (unshow_buffer): Convert initial debugging check to eassert.
      (replace_window, recombine_windows, Fdelete_other_windows_internal)
      (make_parent_window, window_resize_check, window_resize_apply)
      (resize_frame_windows, Fsplit_window_internal, Fdelete_window_internal)
      (Fset_window_configuration, delete_all_child_windows, save_window_save):
      Adjust to match struct window changes.
      (window_loop): Check for broken markers in CHECK_ALL_WINDOWS.
      (mark_window_cursors_off, count_windows, get_leaf_windows)
      (foreach_window_1): Simplify the loop.
      * alloc.c (mark_object): Do not check for the leaf window because
      internal windows has no glyph matrices anyway.
      * dispnew.c (clear_window_matrices, showing_window_margins_p)
      (allocate_matrices_for_window_redisplay, fake_current_matrices)
      (allocate_matrices_for_frame_redisplay, free_window_matrices)
      (build_frame_matrix_from_window_tree, mirror_make_current)
      (frame_row_to_window, mirror_line_dance, check_window_matrix_pointers)
      (update_window_tree, set_window_update_flags): Simplify the loop.
      (sync_window_with_frame_matrix_rows): Enforce live window.
      Use contents slot, not buffer, where appropriate.
      * frame.c (set_menu_bar_lines_1): Use WINDOW_VERTICAL_COMBINATION_P
      and WINDOW_HORIZONTAL_COMBINATION_P.
      (make_frame_visible_1): Simplify the loop.
      Use contents slot, not buffer, where appropriate.
      * xdisp.c (hscroll_window_tree, mark_window_display_accurate)
      (redisplay_windows, redisplay_mode_lines, update_cursor_in_window_tree)
      (expose_window_tree): Likewise.
      Use contents slot, not buffer, where appropriate.
      * textprop.c (get_char_property_and_overlay): Add CHECK_LIVE_WINDOW
      to avoid deleted windows.  Use contents slot instead of buffer.
      * buffer.c, dispextern.h, editfns.c, fileio.c, font.c, fringe.c:
      * indent.c, insdel.c, keyboard.c, keymap.c, minibuf.c, msdos.c:
      * nsfns.m, nsmenu.m, nsterm.m, print.c, w32fns.c, w32menu.c, xfaces.c:
      * xfns.c, xmenu.c: Use contents slot, not buffer, where appropriate.
      e74aeda8
  6. 06 Mar, 2013 1 commit
  7. 17 Feb, 2013 1 commit
    • Stefan Monnier's avatar
      Prefer `message1' over `message'. · 2f73da9c
      Stefan Monnier authored
      * src/xml.c (init_libxml2_functions):
      * src/sound.c (sound_warning):
      * src/sheap.c (report_sheap_usage):
      * src/process.c (wait_reading_process_output):
      * src/msdos.c (XMenuActivate):
      * src/macros.c (Fstart_kbd_macro, Fend_kbd_macro):
      * src/keyboard.c (top_level_1):
      * src/editfns.c (Fmessage, Fmessage_box):
      * src/callint.c (Fcall_interactively):
      * src/fns.c (Fyes_or_no_p): Prefer `message1' over `message'.
      2f73da9c
  8. 09 Feb, 2013 1 commit
  9. 02 Feb, 2013 1 commit
    • Eli Zaretskii's avatar
      Avoid encoding file names run through dostounix_filename on MS-Windows. · e7ac588e
      Eli Zaretskii authored
       src/w32.c (normalize_filename): Accept an additional argument
       MULTIBYTE; if non-zero, traverse the file name by bytes and don't
       downcase it even if w32-downcase-file-names is non-nil.
       (dostounix_filename): Accept an additional argument MULTIBYTE and
       pass it to normalize_filename.
       (emacs_root_dir): Adjust.
       src/msdos.h (dostounix_filename): Adjust prototype.
       src/w32.h (dostounix_filename): Adjust prototype.
       src/msdos.c (dostounix_filename): Accept an additional argument and
       ignore it.
       (init_environment): Adjust callers of dostounix_filename.
       src/fileio.c (Ffile_name_directory, file_name_as_directory)
       (directory_file_name, Fexpand_file_name)
       (Fsubstitute_in_file_name): [DOS_NT] Adjust call to
       dostounix_filename.
       [WINDOWSNT]: Downcase file names if w32-downcase-file-names is
       non-nil.
       (Fsubstitute_in_file_name): [DOS_NT] Don't downcase environment
       variables, as egetenv is case-insensitive for DOS_NT.
       src/dired.c (file_name_completion): Don't call Fdirectory_file_name
       with an encoded file name.
       src/w32proc.c (Fw32_short_file_name, Fw32_long_file_name): Adjust
       calls to dostounix_filename.
       src/w32fns.c (Fx_file_dialog): Adjust call to dostounix_filename.
       src/unexw32.c (unexec): Adjust call to dostounix_filename.
       src/termcap.c (tgetent) [MSDOS]: Adjust call to dostounix_filename.
       src/emacs.c (decode_env_path) [DOS_NT]: Adjust call to
       dostounix_filename.
       src/callproc.c (Fcall_process) [MSDOS]: Adjust call to
       dostounix_filename.
      e7ac588e
  10. 01 Jan, 2013 1 commit
  11. 22 Nov, 2012 1 commit
    • Dmitry Antipov's avatar
      * alloc.c (Fgarbage_collect): Unblock input after clearing · 5c747675
      Dmitry Antipov authored
      gc_in_progress to avoid note_mouse_highlight glitch with GC.
      * frame.h (FRAME_MOUSE_UPDATE): New macro.
      * msdos.c (IT_frame_up_to_date): Use it here...
      * w32term.c (w32_frame_up_to_date): ...here...
      * xterm.c (XTframe_up_to_date): ...and here...
      * nsterm.m (ns_frame_up_to_date): ...but not here.
      * lisp.h (Mouse_HLInfo): Remove mouse_face_deferred_gc member.
      Adjust users.
      * xdisp.c (message2_nolog, message3_nolog, note_mouse_highlight):
      Do not check whether GC is in progress.
      5c747675
  12. 05 Nov, 2012 1 commit
    • Paul Eggert's avatar
      Assume at least POSIX.1-1988 for getpgrp, setpgid, setsid. · dd0333b6
      Paul Eggert authored
      This removes code that has been obsolete since around 1990.
      * admin/CPP-DEFINES (HAVE_SETPGID, HAVE_SETSID, SETPGRP_RELEASES_CTTY):
      Remove; obsolete.
      * configure.ac (setpgid, setsid): Assume their existence.
      (AC_FUNC_GETPGRP, SETPGRP_RELEASES_CTTY): Remove; obsolete.
      * src/callproc.c (Fcall_process):
      * src/emacs.c (main):
      * src/process.c (create_process):
      * src/term.c (dissociate_if_controlling_tty):
      Assume setsid exists.
      * src/callproc.c (child_setup): Assume setpgid exists and behaves as
      per POSIX.1-1988 or later.
      * src/conf_post.h (setpgid) [!HAVE_SETPGID]: Remove.
      * src/emacs.c (shut_down_emacs):
      * src/sysdep.c (sys_suspend, init_foreground_group):
      Assume getpgrp behaves as per POSIX.1-1998 or later.
      * src/msdos.c (setpgrp): Remove.
      (tcgetpgrp, setpgid, setsid): New functions.
      * src/systty.h (EMACS_GETPGRP): Remove.  All callers now use getpgrp.
      * src/term.c (no_controlling_tty): Remove; unused.
      * src/w32proc.c (setpgrp): Remove.
      (setsid, tcgetpgrp): New functions.
      
      Fixes: debbugs:12800
      dd0333b6
  13. 03 Nov, 2012 1 commit
  14. 23 Sep, 2012 1 commit
    • Paul Eggert's avatar
      Simplify and avoid signal-handling races. · 4d7e6e51
      Paul Eggert authored
      * nt/inc/ms-w32.h (emacs_raise): New macro.
      * src/alloc.c (die):
      * src/sysdep.c (emacs_abort) [HAVE_NTGUI]:
      Avoid recursive loop if there's a fatal error in the function itself.
      * src/atimer.c (pending_atimers):
      * src/blockinput.h: Don't include "atimer.h"; no longer needed.
      (interrupt_input_pending): Remove.  All uses removed.
      pending_signals now counts both atimers and ordinary interrupts.
      This is less racy than having three separate pending-signal flags.
      (block_input, unblock_input, totally_unblock_input, unblock_input_to)
      (input_blocked_p):
      Rename from their upper-case counterparts BLOCK_INPUT,
      UNBLOCK_INPUT, TOTALLY_UNBLOCK_INPUT, UNBLOCK_INPUT_TO,
      INPUT_BLOCKED_P, and turn into functions.  All uses changed.
      This makes it easier to access volatile variables more accurately.
      (BLOCK_INPUT_RESIGNAL): Remove.  All uses replaced by unblock_input ().
      (input_blocked_p): Prefer this to 'interrupt_input_blocked', as
      that's more reliable if the code is buggy and sets
      interrupt_input_blocked to a negative value.  All uses changed.
      * src/atimer.c (deliver_alarm_signal):
      Remove.  No need to deliver this to the parent; any thread can
      handle this signal now.  All uses replaced by underlying handler.
      * src/atimer.c (turn_on_atimers):
      * src/dispnew.c (handle_window_change_signal):
      * src/emacs.c (handle_danger_signal):
      * src/keyboard.c (kbd_buffer_get_event):
      Don't reestablish signal handler; not needed with sigaction.
      * src/blockinput.h (UNBLOCK_INPUT_TO, TOTALLY_UNBLOCK_INPUT)
      (UNBLOCK_INPUT_TO):
      Rework to avoid unnecessary accesses to volatile variables.
      (UNBLOCK_INPUT_TO): Now a function.
      (totally_unblock_input, unblock_input): New decls.
      * src/data.c (handle_arith_signal, deliver_arith_signal): Move to sysdep.c
      (init_data): Remove.  Necessary stuff now done in init_signal.
      * src/emacs.c, src/xdisp.c: Include "atimer.h", since we invoke atimer functions.
      * src/emacs.c (handle_fatal_signal, deliver_fatal_signal): Move to sysdep.c.
      (fatal_error_code): Remove; no longer needed.
      (terminate_due_to_signal): Rename from fatal_error_backtrace, since
      it doesn't always backtrace.  All uses changed.  No need to reset
      signal to default, since sigaction and/or die does that for us now.
      Use emacs_raise (FOO), not kill (getpid (), FOO).
      (main): Check more-accurately whether we're dumping.
      Move fatal-error setup to sysdep.c
      * src/floatfns.c: Do not include "syssignal.h"; no longer needed.
      * src/gtkutil.c (xg_get_file_name, xg_get_font):
      Remove no-longer-needed signal-mask manipulation.
      * src/keyboard.c, src/process.c (POLL_FOR_INPUT):
      Don't depend on USE_ASYNC_EVENTS, a symbol that is never defined.
      * src/keyboard.c (read_avail_input): Remove.
      All uses replaced by gobble_input.
      (Ftop_level): Use TOTALLY_UNBLOCK_INPUT rather than open code.
      (kbd_buffer_store_event_hold, gobble_input):
      (record_asynch_buffer_change) [USABLE_SIGIO]:
      (store_user_signal_events):
      No need to mess with signal mask.
      (gobble_input): If blocking input and there are terminals, simply
      set pending_signals to 1 and return.  All hooks changed to not
      worry about whether input is blocked.
      (process_pending_signals): Clear pending_signals before processing
      them, in case a signal comes in while we're processing.
      By convention callers now test pending_signals before calling us.
      (UNBLOCK_INPUT_TO, unblock_input, totally_unblock_input):
      New functions, to support changes to blockinput.h.
      (handle_input_available_signal): Now extern.
      (reinvoke_input_signal): Remove.  All uses replaced by
      handle_async_input.
      (quit_count): Now volatile, since a signal handler uses it.
      (handle_interrupt): Now takes bool IN_SIGNAL_HANDLER as arg.  All
      callers changed.  Block SIGINT only if not already blocked.
      Clear sigmask reliably, even if Fsignal returns, which it can.
      Omit unnecessary accesses to volatile var.
      (quit_throw_to_read_char): No need to restore sigmask.
      * src/keyboard.c (gobble_input, handle_user_signal):
      * src/process.c (wait_reading_process_output):
      Call signal-handling code rather than killing ourselves.
      * src/lisp.h: Include <float.h>, for...
      (IEEE_FLOATING_POINT): New macro, moved here to avoid duplication.
      (pending_signals): Now volatile.
      (syms_of_data): Now const if IEEE floating point.
      (handle_input_available_signal) [USABLE_SIGIO]:
      (terminate_due_to_signal, record_child_status_change): New decls.
      * src/process.c (create_process): Avoid disaster if memory is exhausted
      while we're processing a vfork, by tightening the critical section
      around the vfork.
      (send_process_frame, process_sent_to, handle_pipe_signal)
      (deliver_pipe_signal): Remove.  No longer needed, as Emacs now
      ignores SIGPIPE.
      (send_process): No need for setjmp/longjmp any more, since the
      SIGPIPE stuff is now gone.  Instead, report an error if errno
      is EPIPE.
      (record_child_status_change): Now extern.  PID and W are now args.
      Return void, not bool.  All callers changed.
      * src/sysdep.c (wait_debugging) [(BSD_SYSTEM || HPUX) && !defined (__GNU__)]:
      Remove.  All uses removed.  This bug should be fixed now in a
      different way.
      (wait_for_termination_1): Use waitpid rather than sigsuspend,
      and record the child status change directly.  This avoids the
      need to futz with the signal mask.
      (process_fatal_action): Move here from emacs.c.
      (emacs_sigaction_flags): New function, containing
      much of what used to be in emacs_sigaction_init.
      (emacs_sigaction_init): Use it.  Block nonfatal system signals that are
      caught by emacs, to make races less likely.
      (deliver_process_signal): Rename from handle_on_main_thread.
      All uses changed.
      (BACKTRACE_LIMIT_MAX): Now at top level.
      (thread_backtrace_buffer, threadback_backtrace_pointers):
      New static vars.
      (deliver_thread_signal, deliver_fatal_thread_signal):
      New functions, for more-accurate delivery of thread-specific signals.
      (handle_fatal_signal, deliver_fatal_signal): Move here from emacs.c.
      (deliver_arith_signal): Handle in this thread, not
      in the main thread, since it's triggered by this thread.
      (maybe_fatal_sig): New function.
      (init_signals): New arg DUMPING so that we can be more accurate
      about whether we're dumping.  Caller changed.
      Treat thread-specific signals differently from process-general signals.
      Block all signals while handling fatal error; that's safer.
      xsignal from SIGFPE only on non-IEEE hosts, treating it as fatal
      on IEEE hosts.
      When batch, ignore SIGHUP, SIGINT, SIGTERM if they were already ignored.
      Ignore SIGPIPE unless batch.
      (emacs_backtrace): Output backtrace for the appropriate thread,
      which is not necessarily the main thread.
      * src/syssignal.h: Include <stdbool.h>.
      (emacs_raise): New macro.
      * src/xterm.c (x_connection_signal): Remove; no longer needed
      now that we use sigaction.
      (x_connection_closed): No need to mess with sigmask now.
      (x_initialize): No need to reset SIGPIPE handler here, since
      init_signals does this for us now.
      
      Fixes: debbugs:12471
      4d7e6e51
  15. 04 Sep, 2012 1 commit
    • Paul Eggert's avatar
      Simplify redefinition of 'abort' (Bug#12316). · 1088b922
      Paul Eggert authored
      Do not try to redefine the 'abort' function.  Instead, redo
      the code so that it calls 'emacs_abort' rather than 'abort'.
      This removes the need for the NO_ABORT configure-time macro
      and makes it easier to change the abort code to do a backtrace.
      * configure.ac (NO_ABRT): Remove.
      * admin/CPP-DEFINES (NO_ABORT): Remove.
      * nt/inc/ms-w32.h (w32_abort) [HAVE_NTGUI]: Remove.
      * src/.gdbinit: Just stop at emacs_abort, not at w32_abort or abort.
      * src/emacs.c (abort) [!DOS_NT && !NO_ABORT]:
      Remove; sysdep.c's emacs_abort now takes its place.
      * src/lisp.h (emacs_abort): New decl.  All calls from Emacs code to
      'abort' changed to use 'emacs_abort'.
      * src/msdos.c (dos_abort) [defined abort]: Remove; not used.
      (abort) [!defined abort]: Rename to ...
      (emacs_abort): ... new name.
      * src/sysdep.c (emacs_abort) [!HAVE_NTGUI]: New function, taking
      the place of the old 'abort' in emacs.c.
      * src/w32.c, src/w32fns.c (abort): Do not #undef.
      * src/w32.c (emacs_abort): Rename from w32_abort.
      1088b922
  16. 02 Sep, 2012 1 commit
    • Paul Eggert's avatar
      * emacs.c, eval.c: Use bool for boolean. · 1882aa38
      Paul Eggert authored
      * emacs.c (initialized, inhibit_window_system, running_asynch_code):
      (malloc_using_checking) [DOUG_LEA_MALLOC]:
      (display_arg) [HAVE_X_WINDOWS || HAVE_NS]:
      (noninteractive, no_site_lisp, fatal_error_in_progress, argmatch)
      (main, decode_env_path, Fdaemon_initialized):
      * eval.c (call_debugger, Finteractive_p, interactive_p):
      (unwind_to_catch, Fsignal, wants_debugger, skip_debugger)
      (maybe_call_debugger, Fbacktrace):
      * process.c (read_process_output, exec_sentinel):
      Use bool for booleans.
      * emacs.c (shut_down_emacs): Omit unused boolean argument NO_X.
      All callers changed.
      * eval.c (interactive_p): Omit always-true boolean argument
      EXCLUDE_SUBRS_P.  All callers changed.
      * dispextern.h, lisp.h: Reflect above API changes.
      * firstfile.c (dummy): Use the address of 'main', whose signature
      won't change, instead of the address of 'initialize', whose
      signature just changed from int to bool.
      * lisp.h (fatal_error_in_progress): New decl of boolean, moved here ...
      * msdos.c (fatal_error_in_progress): ... from here.
      * xdisp.c (redisplaying_p): Now a boolean.  Set it to 1 instead
      of incrementing it.
      (redisplay_internal, unwind_redisplay): Simply clear
      REDISPLAYING_P when unwinding, instead of saving its previous,
      always-false value and then restoring it.
      1882aa38
  17. 21 Aug, 2012 1 commit
    • Dmitry Antipov's avatar
      Avoid direct writes to contents member of struct Lisp_Vector. · 086ca913
      Dmitry Antipov authored
      * lisp.h (vcopy): New function to copy data into vector.
      * dispnew.c (Fframe_or_buffer_changed_p): Use AREF and ASET.
      * fns.c (Ffillarray): Use ASET.
      * keyboard.c (timer_check_2): Use AREF and ASET.
      (append_tool_bar_item, Frecent_keys): Use vcopy.
      * lread.c (read_vector): Use ASET.
      * msdos.c (Frecent_doskeys): Use vcopy.
      * xface.c (Finternal_copy_lisp_face): Use vcopy.
      (Finternal_merge_in_global_face): Use ASET and vcopy.
      * xfont.c (xfont_list_pattern): Likewise.
      086ca913
  18. 17 Aug, 2012 1 commit
    • Paul Eggert's avatar
      * keyboard.h (KSET): Remove. · 15dbb4d6
      Paul Eggert authored
      Replace all uses with calls to new setter functions.
      Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
      (KEYBOARD_INLINE): New macro.
      (kset_default_minibuffer_frame, kset_defining_kbd_macro)
      (kset_input_decode_map, kset_last_command, kset_last_kbd_macro)
      (kset_prefix_arg, kset_system_key_alist, kset_window_system):
      New setter functions.
      * keyboard.c (KEYBOARD_INLINE):
      Define to EXTERN_INLINE, so that the corresponding functions
      are compiled into code.
      (kset_echo_string, kset_kbd_queue)
      (kset_keyboard_translate_table, kset_last_prefix_arg)
      (kset_last_repeatable_command, kset_local_function_key_map)
      (kset_overriding_terminal_local_map, kset_real_last_command)
      (kset_system_key_syms): New setter functions.
      
      Fixes: debbugs:12215
      15dbb4d6
  19. 13 Aug, 2012 1 commit
  20. 07 Aug, 2012 2 commits
    • Dmitry Antipov's avatar
      Drop WGET and revert read access to Lisp_Objects slots of struct window. · d3d50620
      Dmitry Antipov authored
      * window.h (WGET): Remove.
      (struct window): Do not use INTERNAL_FIELD.
      * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
      * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
      * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
      * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
      * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
      Adjust users.
      d3d50620
    • Dmitry Antipov's avatar
      Drop FGET and revert read access to Lisp_Objects slots of struct frame. · e69b0960
      Dmitry Antipov authored
      * frame.h (FGET): Remove.
      (struct frame): Do not use INTERNAL_FIELD.
      * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
      * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
      * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
      * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
      e69b0960
  21. 06 Aug, 2012 2 commits
    • Dmitry Antipov's avatar
      Separate read and write access to Lisp_Object slots of struct window. · 077288cf
      Dmitry Antipov authored
      * window.h (WGET, WSET): New macros similar to AREF and ASET.
      * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
      * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
      * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
      * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
      * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
      Adjust users.
      077288cf
    • Dmitry Antipov's avatar
      Separate read and write access to Lisp_Object slots of struct frame. · edd74c35
      Dmitry Antipov authored
      * frame.h (FGET, FSET): New macros similar to AREF and ASET.
      * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
      * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
      * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
      * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
      edd74c35
  22. 05 Aug, 2012 1 commit
    • Dmitry Antipov's avatar
      Generalize common compile-time constants. · 663e2b3f
      Dmitry Antipov authored
      * lisp.h (header_size, bool_header_size, word_size): Now here.
      (struct Lisp_Vector): Add comment.
      (struct Lisp_Bool_Vector): Move up to define handy constants.
      (VECSIZE, PSEUDOVECSIZE): Simplify.
      (SAFE_ALLOCA_LISP): Use new constant.  Adjust indentation.
      * buffer.c, buffer.h, bytecode.c, callint.c, eval.c, fns.c:
      * font.c, fontset.c, keyboard.c, keymap.c, macros.c, menu.c:
      * msdos.c, w32menu.c, w32term.h, window.c, xdisp.c, xfaces.c:
      * xfont.c, xmenu.c: Use word_size where appropriate.
      663e2b3f
  23. 04 Aug, 2012 1 commit
  24. 11 Jul, 2012 1 commit
    • Andreas Schwab's avatar
      * coding.c (Fdefine_coding_system_internal): Use XCAR/XCDR instead · 34348bd4
      Andreas Schwab authored
      of Fcar/Fcdr if possible.
      * font.c (check_otf_features): Likewise.
      * fontset.c (Fnew_fontset): Likewise.
      * gnutls.c (Fgnutls_boot): Likewise.
      * minibuf.c (read_minibuf): Likewise.
      * msdos.c (IT_set_frame_parameters): Likewise.
      * xmenu.c (Fx_popup_dialog): Likewise.
      * w32menu.c (Fx_popup_dialog): Likewise.
      34348bd4
  25. 10 Jul, 2012 2 commits
    • Paul Eggert's avatar
      EMACS_TIME simplification (Bug#11875). · e9a9ae03
      Paul Eggert authored
      This replaces macros (which typically do not work in GDB)
      with functions, typedefs and enums, making the code easier to debug.
      The functional style also makes code easier to read and maintain.
      * lib-src/profile.c (TV2): Remove no-longer-needed static var.
      * src/systime.h: Include <sys/time.h> on all hosts, not just if
      WINDOWSNT, since 'struct timeval' is needed in general.
      (EMACS_TIME): Now a typedef, not a macro.
      (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): Now constants,
      not macros.
      (EMACS_SECS, EMACS_NSECS, EMACS_TIME_SIGN, EMACS_TIME_VALID_P)
      (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE, EMACS_TIME_EQ)
      (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE, EMACS_TIME_LT)
      (EMACS_TIME_LE): Now functions, not macros.
      (EMACS_SET_SECS, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS)
      (EMACS_SET_USECS, EMACS_SET_SECS_USECS): Remove these macros,
      which are not functions.  All uses rewritten to use:
      (make_emacs_time): New function.
      (EMACS_SECS_ADDR, EMACS_SET_INVALID_TIME, EMACS_...
      e9a9ae03
    • Dmitry Antipov's avatar
      Use XCAR and XCDR instead of Fcar and Fcdr where possible. · 7d7bbefd
      Dmitry Antipov authored
      * admin/coccinelle/list_loop.cocci: Semantic patch to convert from Fcdr
      to XCDR and consistently use CONSP in the list iteration loops.
      * admin/coccinelle/vector_contents.cocci: Fix indentation.
      * src/callint.c, src/coding.c, src/doc.c, src/editfns.c, src/eval.c,
      * src/font.c, src/fontset.c, src/frame.c, src/gnutls.c, src/minibuf.c,
      * src/msdos.c, src/textprop.c, src/w32fns.c, src/w32menu.c, src/window.c,
      * src/xmenu.c: Changed to use XCAR and XCDR where argument type is known
      to be a Lisp_Cons.
      7d7bbefd
  26. 09 Jul, 2012 1 commit
    • Dmitry Antipov's avatar
      Use make_formatted_string to avoid double length calculation. · a8290ec3
      Dmitry Antipov authored
      * lisp.h (make_formatted_string): New prototype.
      * alloc.c (make_formatted_string): New function.
      * buffer.c (Fgenerate_new_buffer_name): Use it.
      * dbus.c (syms_of_dbusbind): Likewise.
      * editfns.c (Fcurrent_time_zone): Likewise.
      * filelock.c (get_boot_time): Likewise.
      * frame.c (make_terminal_frame, set_term_frame_name)
      (x_report_frame_params): Likewise.
      * image.c (gs_load): Likewise.
      * minibuf.c (get_minibuffer): Likewise.
      * msdos.c (dos_set_window_size): Likewise.
      * process.c (make_process): Likewise.
      * xdisp.c (ensure_echo_area_buffers): Likewise.
      * xsettings.c (apply_xft_settings): Likewise.
      a8290ec3
  27. 05 Jul, 2012 1 commit
    • Dmitry Antipov's avatar
      Cleanup xmalloc. · 23f86fce
      Dmitry Antipov authored
      * admin/coccinelle/xzalloc.cocci: Semantic patch to convert
      calls to xmalloc with following memset to xzalloc.
      * src/lisp.h (xzalloc): New prototype.  Omit needless casts.
      * src/alloc.c (xzalloc): New function.  Omit needless casts.
      * src/charset.c: Omit needless casts.  Convert all calls to
      malloc with following memset to xzalloc.
      * src/dispnew.c: Likewise.
      * src/fringe.c: Likewise.
      * src/image.c: Likewise.
      * src/sound.c: Likewise.
      * src/term.c: Likewise.
      * src/w32fns.c: Likewise.
      * src/w32font.c: Likewise.
      * src/w32term.c: Likewise.
      * src/xfaces.c: Likewise.
      * src/xfns.c: Likewise.
      * src/xterm.c: Likewise.
      * src/atimer.c: Omit needless casts.
      * src/buffer.c: Likewise.
      * src/callproc.c: Likewise.
      * src/ccl.c: Likewise.
      * src/coding.c: Likewise.
      * src/composite.c: Likewise.
      * src/doc.c: Likewise.
      * src/doprnt.c: Likewise.
      * src/editfns.c: Likewise.
      * src/emacs.c: Likewise.
      * src/eval.c: Likewise.
      * src/filelock.c: Likewise.
      * src/fns.c: Likewise.
      * src/gtkutil.c: Likewise.
      * src/keyboard.c: Likewise.
      * src/lisp.h: Likewise.
      * src/lread.c: Likewise.
      * src/minibuf.c: Likewise.
      * src/msdos.c: Likewise.
      * src/print.c: Likewise.
      * src/process.c: Likewise.
      * src/region-cache.c: Likewise.
      * src/search.c: Likewise.
      * src/sysdep.c: Likewise.
      * src/termcap.c: Likewise.
      * src/terminal.c: Likewise.
      * src/tparam.c: Likewise.
      * src/w16select.c: Likewise.
      * src/w32.c: Likewise.
      * src/w32reg.c: Likewise.
      * src/w32select.c: Likewise.
      * src/w32uniscribe.c: Likewise.
      * src/widget.c: Likewise.
      * src/xdisp.c: Likewise.
      * src/xmenu.c: Likewise.
      * src/xrdb.c: Likewise.
      * src/xselect.c: Likewise.
      23f86fce
  28. 02 Jul, 2012 1 commit
  29. 30 Jun, 2012 1 commit
    • Eli Zaretskii's avatar
      Adapt the MS-DOS build to the latest changes. · 0d23c240
      Eli Zaretskii authored
       msdos/mainmake.v2 (bootstrap-clean): Do a maintainer-clean in lib, not
       bootstrap-clean (which doesn't exist).
       msdos/inttypes.h (PRIuMAX) [__DJGPP__ < 2.04]: Define to "llu".
       msdos/sedleim.inp (MKDIR_P): Edit to DOS "md" command.
       msdos/sed1v2.inp: (LIB_CLOCK_GETTIME): Edit to empty.
       Remove lines that invoke PAXCTL.
       (clean): Fix recipe not to run Unixy shell commands.
       msdos/sed2v2.inp (GETTIMEOFDAY_TIMEZONE): Edit to 'struct timezone'.
       (HAVE_STRNCASECMP): Edit to 1.
       msdos/sed3v2.inp (LIB_CLOCK_GETTIME): Edit to empty.
       (C_SWITCH_SYSTEM): Add "-I../msdos".
       msdos/sedlibmk.inp (GNULIB_GETTIMEOFDAY, GNULIB_PSELECT)
       (GNULIB_SELECT, HAVE_STRUCT_TIMEVAL, HAVE_SYS_SELECT_H)
       (HAVE_SYS_TIME_H, NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H)
       (NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H, NEXT_SYS_SELECT_H)
       (NEXT_SYS_TIME_H, REPLACE_GETTIMEOFDAY, REPLACE_PSELECT)
       (REPLACE_STRUCT_TIMEVAL): Edit to appropriate values.
       (BUILT_SOURCES): Edit out sys/select.h and sys/time.h.
       (mostlyclean-local, distclean-generic): Fix recipe not to run
       Unixy shell commands.
      
       src/sysselect.h [DOS_NT]: Don't include sys/select.h.
       src/s/ms-w32.h (select, pselect): Don't define here, they are
       defined in sysselect.h
       src/sysselect.h (pselect) [!HAVE_PSELECT]: Redirect to sys_select.
       src/sysdep.c: Don't include dos.h and dosfns.h.
       src/process.c (sys_select):
       src/msdos.c (sys_select): Accept one more argument and ignore it.
       src/msdos.c (event_timestamp, sys_select): Use gnulib's gettime;
       adapt data types and code to that.
       src/dosfns.c:
       src/msdos.c (gettime, settime): Define away the prototypes in dos.h,
       which clashes with the gnulib function of the same name.
      
       lisp/emacs-lisp/timer.el (timer-until): Subtract results of
       float-time, instead of taking float-time of the result of
       time-subtract, since float-time signals an error for negative time
       arguments.
      0d23c240
  30. 25 Jun, 2012 1 commit
  31. 22 Jun, 2012 1 commit
  32. 19 Jun, 2012 1 commit
  33. 21 May, 2012 1 commit
  34. 09 Apr, 2012 1 commit
  35. 11 Jan, 2012 1 commit
  36. 05 Jan, 2012 1 commit
  37. 24 Nov, 2011 1 commit