1. 12 Dec, 2012 1 commit
  2. 11 Dec, 2012 2 commits
    • Dmitry Antipov's avatar
      * buffer.c (Fset_buffer_multibyte): Do not force redisplay · c6afe371
      Dmitry Antipov authored
      if changed buffer is not shown in a window.
      * insdel.c (prepare_to_modify_buffer): Likewise.
      * window.c (replace_buffer_in_windows_safely): Do nothing
      if buffer is not shown in a window.
      (Fforce_window_update): Likewise if string or buffer argument
      is passed.
      c6afe371
    • Dmitry Antipov's avatar
      Consistently use marker_position and marker_byte_position. · 4c1acb95
      Dmitry Antipov authored
      * fringe.c (Ffringe_bitmaps_at_pos):
      * indent.c (Fvertical_motion):
      * insdel.c (prepare_to_modify_buffer):
      * keyboard.c (make_lispy_position):
      * window.c (Fwindow_end, Fpos_visible_in_window_p, unshow_buffer)
      (window_scroll_pixel_based, displayed_window_lines)
      (Fset_window_configuration):
      * xdisp.c (message_dolog, with_echo_area_buffer_unwind_data)
      (mark_window_display_accurate_1, redisplay_window, decode_mode_spec):
      Replace direct access to marker fields with calls
      to marker_position and/or marker_byte_position.
      4c1acb95
  3. 10 Dec, 2012 1 commit
    • Dmitry Antipov's avatar
      Per-buffer window counters. · 98a07056
      Dmitry Antipov authored
      * buffer.h (struct buffer): New member window_count.
      (buffer_window_count): New function.
      * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
      Initialize window_count.
      (Fkill_buffer): Verify window_count for the buffer being killed.
      (modify_overlay): Do not force redisplay if buffer is not shown
      in any window.
      (init_buffer_once): Initialize window_count for buffer_defaults
      and buffer_local_symbols.
      * window.h (buffer_shared): Remove declaration.
      (wset_buffer): Convert from inline ...
      * window.c (wset_buffer): ... to an ordinary function.
      (adjust_window_count): New function.
      (make_parent_window): Use it.
      * xdisp.c (buffer_shared): Remove.
      (redisplay_internal, redisplay_window): Adjust users.
      (buffer_shared_and_changed): Use per-buffer window counter.
      98a07056
  4. 07 Dec, 2012 1 commit
    • Dmitry Antipov's avatar
      * frame.c (make_frame): Do not set window's buffer to t. · 822995f8
      Dmitry Antipov authored
      * window.c (Fsplit_window_internal): Likewise.  Previously it was
      used to indicate that the window is being set up.  Now we use
      set_window_buffer for all new windows, so the condition in ...
      (Fset_window_buffer): ... is always true and can be removed.
      822995f8
  5. 12 Nov, 2012 1 commit
    • Dmitry Antipov's avatar
      Simplify by using FOR_EACH_FRAME here and there. · 5b04e9f9
      Dmitry Antipov authored
      * frame.c (next_frame, prev_frame, other_visible_frames)
      (delete_frame, visible-frame-list): Use FOR_EACH_FRAME.
      * w32term.c (x_window_to_scroll_bar): Likewise.
      * window.c (window_list): Likewise.
      * xdisp.c (x_consider_frame_title): Likewise.
      * xfaces.c ( Fdisplay_supports_face_attributes_p): Likewise.
      * xfns.c (x_window_to_frame, x_any_window_to_frame)
      (x_menubar_window_to_frame, x_top_window_to_frame): Likewise.
      * xmenu.c (menubar_id_to_frame): Likewise.
      * xselect.c (frame_for_x_selection): Likewise.
      * xterm.c (x_frame_of_widget, x_window_to_scroll_bar)
      (x_window_to_menu_bar): Likewise.
      * w32fns.c (x_window_to_frame): Likewise.  Adjust comment.
      5b04e9f9
  6. 11 Nov, 2012 1 commit
  7. 07 Nov, 2012 1 commit
    • Martin Rudalics's avatar
      Fix and rewrite doc on window recombining facilities. · fdaf534a
      Martin Rudalics authored
      * window.c (Fsplit_window_internal): Set combination limit of
      new parent window to t iff Vwindow_combination_limit is t;
      fixing a regression introduced with the change from 2012-09-22.
      (Fwindow_combination_limit, Fset_window_combination_limit): Fix
      doc-strings.
      
      * elisp.texi (Top): Add Recombining Windows to menu.
      * windows.texi (Recombining Windows): New subsection.
      (Splitting Windows): Rewrite text on handling of window
      combinations and move it to new subsection.
      fdaf534a
  8. 06 Nov, 2012 4 commits
    • Paul Eggert's avatar
      Minor adjustments of recently-changed frame functions. · 68f8f1c0
      Paul Eggert authored
      * buffer.c (Fbuffer_list): Omit CHECK_FRAME, since arg is already
      known to be a frame (we're in the FRAMEP branch).
      * lisp.h (Qframep): Remove decl.  frame.h declares this.
      * window.c (quad): Args are of type EMACS_INT, not ptrdiff_t,
      since they're meant for Lisp fixnum values.
      68f8f1c0
    • Dmitry Antipov's avatar
      * window.c (Fwindow_combination_limit): Revert to the only · 72f94d4b
      Dmitry Antipov authored
      required argument and adjust docstring as suggested in
      http://lists.gnu.org/archive/html/emacs-diffs/2012-11/msg01082.html
      by Martin Rudalics <rudalics@gmx.at>.
      72f94d4b
    • Dmitry Antipov's avatar
      Widely used frame validity and checking functions. · d9f07150
      Dmitry Antipov authored
      * frame.h (decode_live_frame, decode_any_frame): Add prototypes.
      * frame.c (decode_live_frame, decode_any_frame): New functions.
      (delete_frame, Fredirect_frame_focus, Fframe_parameters)
      (Fframe_parameter, Fframe_char_height, Fframe_char_width)
      (Fframe_pixel_height, Fframe_pixel_width, Ftool_bar_pixel_width)
      (Fframe_pointer_visible_p): Use decode_any_frame.
      (Fmake_frame_visible, Fmake_frame_invisible, Ficonify_frame)
      (Fraise_frame, Flower_frame, Fmodify_frame_parameters)
      (Fset_frame_height, Fset_frame_width): Use decode_live_frame.
      (Fframe_focus): Likewise.  Allow zero number of arguments.
      Adjust docstring.
      (frame_buffer_list, frame_buffer_predicate): Remove.
      * lisp.h (frame_buffer_predicate): Remove prototype.
      * buffer.c (Fother_buffer): Use decode_any_frame.
      * xdisp.c (Ftool_bar_lines_needed): Likewise.
      * xfaces.c (Fcolor_gray_p, Fcolor_supported_p): Likewise.
      * font.c (Ffont_face_attributes, Ffont_family_list, Fopen_font)
      (Fclose_font, Ffont_info): Use decode_live_frame.
      * fontset.c (check_fontset_name): Likewise.
      * terminal.c (Fframe_terminal): Likewise.
      * w32fns.c (check_x_frame): Likewise.
      * window.c (Fminibuffer_window, Fwindow_at)
      (Fcurrent_window_configuration): Likewise.
      (Frun_window_configuration_change_hook, Fwindow_resize_apply):
      Likewise.  Allow zero number of arguments.  Adjust docstring.
      * dispnew.c (Fredraw_frame): Likewise.
      * xfaces.c (frame_or_selected_frame): Remove.
      (Fx_list_fonts, Finternal_get_lisp_face_attribute, Fface_font)
      (Finternal_lisp_face_equal_p, Finternal_lisp_face_empty_p)
      (Fframe_face_alist): Use decode_live_frame.
      * xfns.c (check_x_frame): Likewise.
      d9f07150
    • Dmitry Antipov's avatar
      * window.c (quad): New function. · 89bc0592
      Dmitry Antipov authored
      (Fwindow_edges, Fwindow_pixel_edges, Fwindow_inside_edges)
      (Fwindow_absolute_pixel_edges, Fwindow_inside_absolute_pixel_edges)
      (Fwindow_inside_pixel_edges, Fpos_visible_in_window_p)
      (Fwindow_line_height): Use it.
      (Fwindow_fringes): Use list3.
      (Fwindow_scroll_bars): Use list4.
      (Fwindow_frame, Fwindow_top_child, Fwindow_left_child)
      (Fwindow_combination_limit): Allow zero number of arguments.
      89bc0592
  9. 03 Nov, 2012 1 commit
  10. 02 Nov, 2012 1 commit
    • Dmitry Antipov's avatar
      Window-related stuff cleanup here and there. · b9e9df47
      Dmitry Antipov authored
      * dispnew.c (Finternal_show_cursor, Finternal_show_cursor_p):
      Use decode_any_window.
      * fringe.c (Ffringe_bitmaps_at_pos): Likewise.
      * xdisp.c (Fformat_mode_line): Likewise.
      * font.c (Ffont_at): Use decode_live_window.
      * indent.c (Fcompute_motion, Fvertical_motion): Likewise.
      * window.c (decode_next_window_args): Likewise.
      (decode_any_window): Remove static.
      * window.h (decode_any_window): Add prototype.
      * lisp.h (CHECK_VALID_WINDOW, CHECK_LIVE_WINDOW): Move from here...
      * window.h: ...to here, redefine via WINDOW_VALID_P and WINDOW_LIVE_P,
      respectively.
      b9e9df47
  11. 18 Oct, 2012 1 commit
  12. 15 Oct, 2012 1 commit
  13. 01 Oct, 2012 1 commit
    • Paul Eggert's avatar
      Prefer plain 'static' to 'static inline'. · b0ab8123
      Paul Eggert authored
      With static functions, modern compilers inline pretty well by
      themselves; advice from programmers often hurts as much as it helps.
      On my host (x86-64, Fedora 17, GCC 4.7.2, default 'configure'),
      this change shrinks the text size of the Emacs executable by 1.1%
      without affecting CPU significantly in my benchmark.
      * alloc.c (mem_find, live_string_p, live_cons_p, live_symbol_p)
      (live_float_p, live_misc_p, live_vector_p, live_buffer_p)
      (mark_maybe_object, mark_maybe_pointer, bounded_number):
      * buffer.c (bset_abbrev_mode, bset_abbrev_table)
      (bset_auto_fill_function, bset_auto_save_file_format)
      (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
      (bset_bidi_display_reordering, bset_buffer_file_coding_system)
      (bset_cache_long_line_scans, bset_case_fold_search)
      (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
      (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
      (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
      (bset_fringe_indicator_alist, bset_fringes_outside_margins)
      (bset_header_line_format, bset_indicate_buffer_boundaries)
      (bset_indicate_empty_lines, bset_invisibility_spec)
      (bset_left_fringe_width, bset_major_mode, bset_mark)
      (bset_minor_modes, bset_mode_line_format, bset_mode_name)
      (bset_name, bset_overwrite_mode, bset_pt_marker)
      (bset_right_fringe_width, bset_save_length)
      (bset_scroll_bar_width, bset_scroll_down_aggressively)
      (bset_scroll_up_aggressively, bset_selective_display)
      (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
      (bset_word_wrap, bset_zv_marker, set_buffer_overlays_before)
      (set_buffer_overlays_after):
      * category.c (bset_category_table):
      * charset.c (read_hex):
      * coding.c (produce_composition, produce_charset)
      (handle_composition_annotation, handle_charset_annotation)
      (char_encodable_p):
      * dispnew.c (swap_glyph_pointers, copy_row_except_pointers)
      (assign_row, set_frame_matrix_frame, make_current)
      (add_row_entry):
      * eval.c (set_specpdl_symbol, set_specpdl_old_value):
      * fns.c (maybe_resize_hash_table):
      * frame.c (fset_buffer_predicate, fset_minibuffer_window):
      * gmalloc.c (register_heapinfo):
      * image.c (lookup_image_type):
      * intervals.c (set_interval_object, set_interval_left)
      (set_interval_right, copy_interval_parent, rotate_right)
      (rotate_left, balance_possible_root_interval):
      * keyboard.c (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, clear_event, set_prop):
      * lread.c (digit_to_number):
      * marker.c (attach_marker, live_buffer, set_marker_internal):
      * nsterm.m (ns_compute_glyph_string_overhangs):
      * process.c (pset_buffer, pset_command)
      (pset_decode_coding_system, pset_decoding_buf)
      (pset_encode_coding_system, pset_encoding_buf, pset_filter)
      (pset_log, pset_mark, pset_name, pset_plist, pset_sentinel)
      (pset_status, pset_tty_name, pset_type, pset_write_queue):
      * syntax.c (bset_syntax_table, dec_bytepos):
      * terminal.c (tset_param_alist):
      * textprop.c (interval_has_some_properties)
      (interval_has_some_properties_list):
      * window.c (wset_combination_limit, wset_dedicated)
      (wset_display_table, wset_hchild, wset_left_fringe_width)
      (wset_left_margin_cols, wset_new_normal, wset_new_total)
      (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
      (wset_right_fringe_width, wset_right_margin_cols)
      (wset_scroll_bar_width, wset_start, wset_temslot, wset_vchild)
      (wset_vertical_scroll_bar_type, wset_window_parameters):
      * xdisp.c (wset_base_line_number, wset_base_line_pos)
      (wset_column_number_displayed, wset_region_showing)
      (window_box_edges, run_window_scroll_functions)
      (append_glyph_string_lists, prepend_glyph_string_lists)
      (append_glyph_string, set_glyph_string_background_width)
      (append_glyph, append_composite_glyph)
      (take_vertical_position_into_account):
      * xfaces.c (x_create_gc, x_free_gc, merge_face_vectors)
      (face_attr_equal_p, lface_equal_p, hash_string_case_insensitive)
      (lface_hash, lface_same_font_attributes_p, lookup_face):
      * xml.c (libxml2_loaded_p):
      * xterm.c (x_set_mode_line_face_gc, x_set_glyph_string_gc)
      (x_set_glyph_string_clipping, x_clear_glyph_string_rect):
      Now 'static', not 'static inline'.
      
      Fixes: debbugs:12541
      b0ab8123
  14. 30 Sep, 2012 1 commit
    • Martin Rudalics's avatar
      Handle window-height and window-width alist entries in `display-buffer'. · 5938d519
      Martin Rudalics authored
      In buffer display functions handle window-height/window-width
      alist entries.  Suggested by Juri Linkov as fix for Bug#1806.
      * window.el (window--display-buffer): New argument ALIST.  Obey
      window-height and window-width alist entries.
      (window--try-to-split-window): New argument ALIST.  Bind
      window-combination-limit to t when the window's size shall be
      changed and window-combination-limit equals `window-size'.
      (display-buffer-in-atom-window)
      (display-buffer-in-major-side-window)
      (display-buffer-in-side-window, display-buffer-same-window)
      (display-buffer-reuse-window, display-buffer-pop-up-frame)
      (display-buffer-pop-up-window, display-buffer-below-selected)
      (display-buffer-at-bottom, display-buffer-in-previous-window)
      (display-buffer-use-some-window): Adjust all callers of
      window--display-buffer and window--try-to-split-window.
      (fit-frame-to-buffer): New option.
      (fit-window-to-buffer): Can resize frames if fit-frame-to-buffer
      is non-nil.
      (display-buffer-in-major-side-window): Evaluate window-height /
      window-width alist entries.
      
      * help.el (temp-buffer-resize-frames)
      (temp-buffer-resize-regexps): Remove options.
      (temp-buffer-resize-mode): Adjust doc-string.
      (resize-temp-buffer-window): Don't consult
      temp-buffer-resize-regexps.  Use fit-frame-to-buffer instead of
      temp-buffer-resize-frames.
      
      * dired.el (dired-mark-pop-up): Call
      display-buffer-below-selected with a fit-window-to-buffer alist
      entry.
      
      * window.c (Vwindow_combination_limit): New default value.
      (Qwindow_size): New symbol replacing Qtemp_buffer_resize.
      5938d519
  15. 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
  16. 22 Sep, 2012 1 commit
    • Martin Rudalics's avatar
      Make Temp Buffer Resize Mode less intrusive (Bug#1806). · 8e17c9ba
      Martin Rudalics authored
      * window.c (Fsplit_window_internal): Handle only Qt value of
      Vwindow_combination_limit separately.
      (Qtemp_buffer_resize): New symbol.
      (Vwindow_combination_limit): New default value.  Rewrite
      doc-string.
      * cus-start.el (window-combination-limit): Add new optional
      values.
      * window.el (temp-buffer-window-show)
      (window--try-to-split-window): Obey new values of
      window-combination-limit.
      (split-window): Test window-combination-limit for t instead of
      non-nil.
      (display-buffer-at-bottom): New buffer display action function.
      * help.el (temp-buffer-resize-regexps): New option.
      (temp-buffer-resize-mode): Rewrite doc-string.
      (resize-temp-buffer-window): Obey temp-buffer-resize-regexps.
      Don't resize reused window.  Suggested by Glen Morris.
      8e17c9ba
  17. 20 Sep, 2012 1 commit
  18. 17 Sep, 2012 1 commit
    • Daniel Colascione's avatar
      Implement cygw32 · 0fda9b75
      Daniel Colascione authored
      Here, we use the generic window-system configuration system we just
      implemented to support the w32 window-system in the mainline build
      under Cygwin.  (Previously, the w32 window system could only be
      compiled as part of the NT-native Emacs build process.)
      
      The changes in this patch need to be applied atomically in order to
      avoid breaking Emacs.  The changes include:
      
        - Changes throughout the Lisp and C code to not assume that
            NT Emacs and the w32 window system are synonymous.
      
        - Wiring up the regular select(2) event loop to Windows messages
      
        - Cleaning up the w32 drag-and-drop receiving code.
      
        - Exposing Cygwin path conversion functions to elisp.
      
        - Unicode file dialog support when compiling for Cygwin.
      
        - Splitting the w32 term lisp initialization code into code
          applicable to any w32 window-system and code specific to
          system-type windows-nt.
      
        - Integrating the old and new w32 code into the build system.
      0fda9b75
  19. 16 Sep, 2012 1 commit
  20. 15 Sep, 2012 1 commit
    • Paul Eggert's avatar
      Port better to POSIX hosts lacking _setjmp. · 0328b6de
      Paul Eggert authored
      * configure.ac (HAVE__SETJMP, HAVE_SIGSETJMP): New symbols.
      (_setjmp, _longjmp): Remove.
      * src/lisp.h: Include <setjmp.h> here, since we use its symbols here.
      All instances of '#include <setjmp.h>' removed, if the
      only reason for the instance was because "lisp.h" was included.
      (sys_jmp_buf, sys_setjmp, sys_longjmp): New symbols.
      Unless otherwise specified, replace all uses of jmp_buf, _setjmp,
      and _longjmp with the new symbols.  Emacs already uses _setjmp if
      available, so this change affects only POSIXish hosts that have
      sigsetjmp but not _setjmp, such as some versions of Solaris and
      Unixware.  (Also, POSIX-2008 marks _setjmp as obsolescent.)
      * src/image.c (_setjmp, _longjmp) [HAVE_PNG && !HAVE__SETJMP]: New macros.
      (png_load_body) [HAVE_PNG]:
      (PNG_LONGJMP) [HAVE_PNG && PNG_LIBPNG_VER < 10500]:
      (PNG_JMPBUF) [HAVE_PNG && PNG_LIBPNG_VER >= 10500]:
      Use _setjmp and _longjmp rather than sys_setjmp and sys_longjmp,
      since PNG requires jmp_buf.  This is the only exception to the
      general rule that we now use sys_setjmp and sys_longjmp.
      This exception is OK since this code does not change the signal
      mask or longjmp out of a signal handler.
      
      Fixes: debbugs:12446
      0328b6de
  21. 11 Sep, 2012 2 commits
    • Dmitry Antipov's avatar
      Discard killed buffers from deleted window and frame objects. · d73e321c
      Dmitry Antipov authored
      This reduces an amount of references to killed buffers and
      helps GC to reclaim them faster.
      * alloc.c (discard_killed_buffers): New function.
      (mark_object): Use it for deleted windows and frames.
      (mark_object): If symbol's value is set up for a killed buffer
      or deleted frame, restore it's global binding.
      * data.c (swap_in_global_binding): Add GC notice.
      (swap_in_symval_forwarding): Use convenient set_blv_where.
      * window.c (wset_next_buffers, wset_prev_buffers): Move ...
      * window.h: ... to here.
      d73e321c
    • Dmitry Antipov's avatar
      Convenient macro to check whether the buffer is live. · e578f381
      Dmitry Antipov authored
      * buffer.h (BUFFER_LIVE_P): New macro.
      * alloc.c, buffer.c, editfns.c, insdel.c, lread.c, marker.c:
      * minibuf.c, print.c, process.c, window.c, xdisp.c: Use it.
      e578f381
  22. 05 Sep, 2012 1 commit
    • Paul Eggert's avatar
      * fileio.c, filelock.c, floatfns.c, fns.c: Use bool for boolean. · f75d7a91
      Paul Eggert authored
      * fileio.c (auto_saving, auto_save_error_occurred, make_temp_name)
      (Fexpand_file_name, barf_or_query_if_file_exists, Fcopy_file)
      (file_name_absolute_p, Fsubstitute_in_file_name):
      (check_executable, check_writable, Ffile_accessible_directory_p)
      (Fset_file_selinux_context, Fdefault_file_modes)
      (Finsert_file_contents, choose_write_coding_system)
      (Fwrite_region, build_annotations, a_write, e_write)
      (Fdo_auto_save):
      * filelock.c (boot_time_initialized, get_boot_time)
      (get_boot_time_1, lock_file_1, within_one_second):
      * floatfns.c (in_float):
      * fns.c (concat, internal_equal, Frequire, base64_encode_1)
      (base64_decode_1, cmpfn_eql, cmpfn_user_defined)
      (sweep_weak_table, sweep_weak_hash_tables, secure_hash):
      * lisp.h (struct Lisp_Hash_Table.cmpfn):
      * window.c (compare_window_configurations):
      Use bool for booleans.
      * fileio.c (auto_saving_dir_umask, auto_saving_mode_bits)
      (Fdefault_file_modes): Now mode_t, not int, for modes.
      (Fdo_auto_save): Set a boolean to 1 rather than using ++.
      (internal_delete_file): Now returns void, not a (boolean) int,
      since nobody was looking at the return value.
      * lisp.h, window.h: Adjust to above API changes.
      f75d7a91
  23. 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
  24. 28 Aug, 2012 3 commits
  25. 27 Aug, 2012 2 commits
  26. 26 Aug, 2012 1 commit
    • Paul Eggert's avatar
      Remove unused external symbols. · b52d6985
      Paul Eggert authored
      * data.c (Qcons, Qfloat, Qmisc, Qstring, Qvector):
      * window.c (Qwindow_valid_p, decode_valid_window):
      Now static, not extern.
      * data.c (Qinterval): Remove; unused.
      (syms_of_data): Do not define 'interval'.
      * lisp.h (Qinteger, Qstring, Qmisc, Qvector, Qfloat, Qcons):
      * window.h (decode_valid_window):
      Remove decls.
      b52d6985
  27. 21 Aug, 2012 1 commit
    • Martin Rudalics's avatar
      For selected window have (set-)window-point always operate on buffer's point. · 5481664a
      Martin Rudalics authored
      * window.c (Fwindow_point): For the selected window always return
      the position of its buffer's point.
      (Fset_window_point): For the selected window always go in its
      buffer to the specified position.
      * window.el (window-point-1, set-window-point-1): Remove.
      (window-in-direction, record-window-buffer)
      (set-window-buffer-start-and-point, split-window-below)
      (window--state-get-1, display-buffer-record-window): Replace
      calls to window-point-1 and set-window-point-1 by calls to
      window-point and set-window-point respectively.
      5481664a
  28. 20 Aug, 2012 1 commit
  29. 18 Aug, 2012 2 commits
    • Paul Eggert's avatar
      * buffer.h (BSET): Remove. · 39eb03f1
      Paul Eggert authored
      Replace all uses with calls to new setter functions.
      (bset_bidi_paragraph_direction, bset_case_canon_table)
      (bset_case_eqv_table, bset_directory, bset_display_count)
      (bset_display_time, bset_downcase_table)
      (bset_enable_multibyte_characters, bset_filename, bset_keymap)
      (bset_last_selected_window, bset_local_var_alist)
      (bset_mark_active, bset_point_before_scroll, bset_read_only)
      (bset_truncate_lines, bset_undo_list, bset_upcase_table)
      (bset_width_table):
      * buffer.c (bset_abbrev_mode, bset_abbrev_table)
      (bset_auto_fill_function, bset_auto_save_file_format)
      (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
      (bset_bidi_display_reordering, bset_buffer_file_coding_system)
      (bset_cache_long_line_scans, bset_case_fold_search)
      (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
      (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
      (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
      (bset_fringe_indicator_alist, bset_fringes_outside_margins)
      (bset_header_line_format, bset_indicate_buffer_boundaries)
      (bset_indicate_empty_lines, bset_invisibility_spec)
      (bset_left_fringe_width, bset_major_mode, bset_mark)
      (bset_minor_modes, bset_mode_line_format, bset_mode_name)
      (bset_name, bset_overwrite_mode, bset_pt_marker)
      (bset_right_fringe_width, bset_save_length)
      (bset_scroll_bar_width, bset_scroll_down_aggressively)
      (bset_scroll_up_aggressively, bset_selective_display)
      (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
      (bset_word_wrap, bset_zv_marker):
      * category.c (bset_category_table):
      * syntax.c (bset_syntax_table):
      New setter functions.
      
      Fixes: debbugs:12215
      39eb03f1
    • Paul Eggert's avatar
      * window.h (WSET): Remove. · e8c17b81
      Paul Eggert authored
      Replace all uses with calls to new setter functions.
      Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
      (WINDOW_INLINE): New macro.
      (wset_buffer, wset_frame, wset_left_col, wset_next, wset_prev)
      (wset_redisplay_end_trigger, wset_top_line, wset_total_cols)
      (wset_total_lines, wset_vertical_scroll_bar)
      (wset_window_end_pos, wset_window_end_valid)
      (wset_window_end_vpos): New setter functions.
      * window.c (WINDOW_INLINE):
      Define to EXTERN_INLINE, so that the corresponding functions
      are compiled into code.
      (wset_combination_limit, wset_dedicated, wset_display_table)
      (wset_hchild, wset_left_fringe_width, wset_left_margin_cols)
      (wset_new_normal, wset_new_total, wset_next_buffers)
      (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
      (wset_prev_buffers, wset_right_fringe_width)
      (wset_right_margin_cols, wset_scroll_bar_width, wset_start)
      (wset_temslot, wset_vchild, wset_vertical_scroll_bar_type)
      (wset_window_parameters):
      * xdisp.c (wset_base_line_number, wset_base_line_pos)
      (wset_column_number_displayed, wset_region_showing):
      New setter functions.
      
      Fixes: debbugs:12215
      e8c17b81
  30. 17 Aug, 2012 1 commit
    • Paul Eggert's avatar
      * frame.h (FSET): Remove (Bug#12215). · f00af5b1
      Paul Eggert authored
      Replace all uses with calls to new setter functions.
      Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
      (FRAME_INLINE): New macro.
      (fset_buffer_list, fset_buried_buffer_list, fset_condemned_scroll_bars)
      (fset_current_tool_bar_string, fset_desired_tool_bar_string)
      (fset_face_alist, fset_focus_frame, fset_icon_name, fset_menu_bar_items)
      (fset_menu_bar_vector, fset_menu_bar_window, fset_name)
      (fset_param_alist, fset_root_window, fset_scroll_bars)
      (fset_selected_window, fset_title, fset_tool_bar_items)
      (fset_tool_bar_position, fset_tool_bar_window): New functions.
      * frame.c (FRAME_INLINE):
      Define to EXTERN_INLINE, so that the corresponding functions
      are compiled into code.
      (fset_buffer_predicate, fset_minibuffer_window): New setter functions.
      f00af5b1
  31. 16 Aug, 2012 1 commit
    • Martin Rudalics's avatar
      Consistently check windows for validity/liveness (Bug#11984, Bug#12025, Bug#12026). · 52162052
      Martin Rudalics authored
      * lisp.h (CHECK_VALID_WINDOW): New macro.
      * window.c (decode_window): Rename to decode_live_window.
      (decode_valid_window, Fwindow_valid_p): New functions.
      (Fwindow_frame, Fframe_root_window, Fwindow_minibuffer_p)
      (Fframe_first_window, Fframe_selected_window, Fwindow_parent)
      (Fwindow_top_child, Fwindow_left_child, Fwindow_next_sibling)
      (Fwindow_prev_sibling, Fwindow_combination_limit)
      (Fset_window_combination_limit, Fwindow_use_time)
      (Fwindow_total_height, Fwindow_total_width, Fwindow_new_total)
      (Fwindow_normal_size, Fwindow_new_normal, Fwindow_left_column)
      (Fwindow_top_line, Fwindow_body_height, Fwindow_body_width)
      (Fwindow_hscroll, Fset_window_hscroll)
      (Fwindow_redisplay_end_trigger)
      (Fset_window_redisplay_end_trigger, Fwindow_edges)
      (Fwindow_pixel_edges, Fwindow_absolute_pixel_edges)
      (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
      (Fcoordinates_in_window_p, Fwindow_point, Fwindow_start)
      (Fwindow_end, Fset_window_point, Fset_window_start)
      (Fpos_visible_in_window_p, Fwindow_line_height)
      (Fwindow_dedicated_p, Fset_window_dedicated_p)
      (Fwindow_prev_buffers, Fset_window_prev_buffers)
      (Fwindow_next_buffers, Fwindow_parameters, Fwindow_parameter)
      (Fset_window_parameter, Fwindow_display_table)
      (Fset_window_display_table, Fdelete_other_windows_internal)
      (Fset_window_buffer, Fset_window_new_total)
      (Fset_window_new_normal, Fdelete_window_internal)
      (Fwindow_text_height, Fset_window_margins, Fwindow_margins)
      (Fset_window_fringes, Fwindow_fringes, Fset_window_scroll_bars)
      (Fwindow_scroll_bars): Check whether argument window is a valid or
      live window.  Update doc-strings.
      (syms_of_window): New symbol Qwindow_valid_p.
      * keyboard.c (Fposn_at_x_y): Check whether argument
      frame_or_window denotes a valid window.
      * window.el (window-valid-p): Move to window.c.
      52162052