1. 27 Mar, 2016 1 commit
    • Paul Eggert's avatar
      Rename C names to match Lisp symbols better · f41f573e
      Paul Eggert authored
      This was inspired by commit e65c3079,
      which fixed a bug where the C name for a symbol disagreed with the
      symbol name itself.  Fix other instances of disagreements that I found.
      Although this doesn’t fix a bug, it should make code easier to follow.
      The remaining disagreements are idiosyncratic: Qminus, Qplus,
      Qsans__serif, Qbackquote, Qcomma, Qcomma_at, Qcomma_dot.
      All uses changed.
      * src/alloc.c (QAutomatic_GC): Rename from Qautomatic_gc.
      * src/dbusbind.c (QCsystem): Rename from QCdbus_system_bus.
      (QCsession): Rename from QCdbus_session_bus.
      (QCtimeout): Rename from QCdbus_timeout.
      (QCbyte): Rename from QCdbus_type_byte.
      (QCboolean): Rename from QCdbus_type_boolean.
      (QCint16): Rename from QCdbus_type_int16.
      (QCuint16): Rename from QCdbus_type_uint16.
      (QCint32): Rename from QCdbus_type_int32.
      (QCuint32): Rename from QCdbus_type_uint32.
      (QCint64): Rename from QCdbus_type_int64.
      (QCuint64): Rename from QCdbus_type_uint64.
      (QCdouble): Rename from QCdbus_type_double.
      (QCstring): Rename from QCdbus_type_string.
      (QCobject_path): Rename from QCdbus_type_object_path.
      (QCsignature): Rename from QCdbus_type_signature.
      (QCunix_fd): Rename from QCdbus_type_unix_fd.
      (QCarray): Rename from QCdbus_type_array.
      (QCvariant): Rename from QCdbus_type_variant.
      (QCstruct): Rename from QCdbus_type_struct.
      (QCdict_entry): Rename from QCdbus_type_dict_entry.
      (QCserial): Rename from QCdbus_registered_serial.
      (QCmethod): Rename from QCdbus_registered_method.
      (QCsignal): Rename from QCdbus_registered_signal.
      * src/emacs-module.c (Qinternal__module_call):
      Rename from Qinternal_module_call.
      * src/frame.c (Qwindow__pixel_to_total):
      Rename from Qwindow_pixel_to_total.
      * src/gnutls.c (QChostname): Rename from QCgnutls_bootprop_hostname.
      (QCpriority): Rename from QCgnutls_bootprop_priority.
      (QCtrustfiles): Rename from QCgnutls_bootprop_trustfiles.
      (QCkeylist): Rename from QCgnutls_bootprop_keylist.
      (QCcrlfiles): Rename from QCgnutls_bootprop_crlfiles.
      (QCmin_prime_bits): Rename from QCgnutls_bootprop_min_prime_bits.
      (QCloglevel): Rename from QCgnutls_bootprop_loglevel.
      (QCcomplete_negotiation): Rename from QCgnutls_complete_negotiation.
      (QCverify_flags): Rename from QCgnutls_bootprop_verify_flags.
      (QCverify_error): Rename from QCgnutls_bootprop_verify_error.
      * src/w32fns.c (Qfont_parameter): Rename from Qfont_param.
      (Qgnutls): Rename from Qgnutls_dll.
      (Qlibxml2): Rename from Qlibxml2_dll.
      (Qzlib): Rename from Qzlib_dll.
      * src/w32select.c (Qutf_16le_dos): Rename from QUNICODE.
      * src/window.c (Qwindow__resize_root_window):
      Rename from Qwindow_resize_root_window.
      (Qwindow__resize_root_window_vertically):
      Rename from Qwindow_resize_root_window_vertically.
      (Qwindow__sanitize_window_sizes):
      Rename from Qwindow_sanitize_window_sizes.
      (Qwindow__pixel_to_total): Rename from Qwindow_pixel_to_total.
      * src/xdisp.c (Qredisplay_internal_xC_functionx):
      Rename from Qredisplay_internal.
      * src/xfns.c (Qfont_parameter): Rename from Qfont_param.
      * src/xselect.c (Q_EMACS_TMP_): Rename from QEMACS_TMP.
      f41f573e
  2. 10 Mar, 2016 1 commit
    • Paul Eggert's avatar
      Rework C source files to avoid ^( · 7352c6c6
      Paul Eggert authored
      Work around Bug#22884 by rewording comments and strings to avoid ‘(’
      at the start of a line unless it starts a function.  This change
      is a short-term hack; in the longer run we plan to fix cc-mode’s
      performance for C files that have ‘(’ at the start of a line in a
      comment or string.
      7352c6c6
  3. 08 Mar, 2016 1 commit
    • Martin Rudalics's avatar
      Optionally reuse tooltip frames instead of deleting/recreating them. · 80864c2a
      Martin Rudalics authored
      * src/frame.c (tooltip_reuse_hidden_frame): New option.
      * src/w32fns.c (x_create_tip_frame): Remove argument TEXT.  Fix
      handling of dividers.
      (x_hide_tip): New function.
      (Fx_show_tip): Try to reuse old tooltip frame when
      `tooltip-reuse-hidden-frame' is non-nil and frame parameters
      have not changed.  Insert STRING here instead of passing it to
      x_create_tip_frame.  Compute size of tooltip window with
      Fwindow_text_pixel_size.  Obey Vw32_tooltip_extra_pixels when
      padding tooltip window.
      (Fx_hide_tip): Call x_hide_tip.
      (Vw32_tooltip_extra_pixels): New variable.
      * src/xdisp.c (Fwindow_text_pixel_size): Don't return negative y
      value.  Fix doc-string.
      * src/xfns.c (x_create_tip_frame): Remove argument TEXT.  Call
      make_frame with mini_p argument false.
      (x_hide_tip): New function.
      (Fx_show_tip): Try to reuse old tooltip frame when
      `tooltip-reuse-hidden-frame' is non-nil and frame parameters
      have not changed.  Insert STRING here instead of passing it to
      x_create_tip_frame.  Compute size of tooltip window with
      Fwindow_text_pixel_size.
      (Fx_hide_tip): Call x_hide_tip.
      * lisp/cus-start.el (tooltip-reuse-hidden-frame): Add
      customization entry.
      80864c2a
  4. 24 Feb, 2016 1 commit
  5. 23 Feb, 2016 1 commit
    • Martin Rudalics's avatar
      Fix `window-configuration-change-hook' and `window-size-change-functions' · 8e7712c7
      Martin Rudalics authored
      (1) Run `window-configuration-change-hook' if and only if at least
      one window was deleted or created or shows another buffer since
      last redisplay.
      
      (2) Run `window-size-change-functions' if and only if at least
      one window changed its size since last redisplay (in a few cases
      `window-size-change-functions' will also run when no window
      changed its size).
      
      (3) Provide two functions `window-pixel-height-before-size-change'
      and `window-pixel-width-before-size-change' that allow to easily
      detect which window changed size.
      
      * src/frame.h (struct frame): New boolean member
      window_configuration_changed.
      (FRAME_WINDOW_SIZES_CHANGED): Remove macro.
      (FRAME_WINDOW_CONFIGURATION_CHANGED): New macro.
      * src/frame.c (adjust_frame_size): Don't run
      `window-configuration-change-hook'.
      * src/window.h (struct window): New fields
      pixel_width_before_size_change and pixel_height_before_size_change.
      (WINDOW_INTERNAL_P): New macro.
      * src/window.c (Fwindow_pixel_width_before_size_change)
      (Fwindow_pixel_height_before_size_change): New functions.
      (Fdelete_other_windows_internal, Fwindow_resize_apply)
      (resize_frame_windows, Fsplit_window_internal)
      (Fdelete_window_internal, grow_mini_window)
      (shrink_mini_window, Fresize_mini_window_internal): Don't call
      FRAME_WINDOW_SIZES_CHANGED.
      (window_size_changed, window_set_before_size_change_sizes)
      (run_window_size_change_functions): New functions.
      (make_window): Initialize pixel_width_before_size_change and
      pixel_height_before_size_change.
      (Fdelete_window_internal): Don't call
      run_window_configuration_change_hook.
      (struct saved_window): Add pixel_height_before_size_change and
      pixel_width_before_size_change.
      (Fset_window_configuration): Try to identify window configuration
      changes correctly so run_window_configuration_change_hook and
      run_window_size_change_functions run only if configuration and size
      really changed.
      (save_window_save): Set the pixel_height_before_size_change and
      pixel_width_before_size_change fields.
      (Vwindow_size_change_functions): Move here definiton from xdisp.c.
      * src/xdisp.c (prepare_menu_bars, redisplay_internal): Call
      run_window_size_change_functions.
      (Vwindow_size_change_functions): Move definition to window.c.
      * src/xfns.c (x_set_menu_bar_lines): Don't call
      run_window_configuration_change_hook.
      * doc/lispref/windows.texi (Window Sizes): Document new
      functions `window-pixel-height-before-size-change' and
      `window-pixel-width-before-size-change'.
      (Window Configurations): Mention that this may trigger
      execution of `window-size-change-functions' although no window
      changed size.
      (Window Hooks): Update descriptions of `window-size-change-functions'
      and `window-configuration-change-hook'.
      8e7712c7
  6. 01 Jan, 2016 1 commit
  7. 11 Dec, 2015 1 commit
    • Eli Zaretskii's avatar
      Clarify documentation of 'modify-frame-parameters' · 1db9d8bd
      Eli Zaretskii authored
      * doc/lispref/frames.texi (Parameter Access): Clarify what "ignored
      PARMs" mean for 'modify-frame-parameters'.
      
      * src/frame.c (Fmodify_frame_parameters): Clarify what "ignored
      PARMs" mean for this function.  (Bug#22104)
      1db9d8bd
  8. 23 Nov, 2015 2 commits
  9. 17 Nov, 2015 1 commit
    • Paul Eggert's avatar
      Fix docstring quoting problems with ‘ '’ · ac16149b
      Paul Eggert authored
      Problem reported by Artur Malabarba in:
      http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg01513.html
      Most of these fixes are to documentation; many involve fixing
      longstanding quoting glitches that are independent of the
      recent substitute-command-keys changes.  The changes to code are:
      * lisp/cedet/mode-local.el (mode-local-augment-function-help)
      (describe-mode-local-overload):
      Substitute docstrings before displaying them.
      * lisp/emacs-lisp/cl-macs.el (cl--transform-lambda):
      Quote the generated docstring for later substitution.
      ac16149b
  10. 21 Oct, 2015 1 commit
    • Paul Eggert's avatar
      Include-file cleanup for src directory · 63cfb75f
      Paul Eggert authored
      Omit ‘#include "foo.h"’ unless the file needs foo.h (Bug#21707).
      In a few cases, add ‘#include "foo.h"’ if the file needs foo.h
      but does not include it directly.  As a general rule, a source
      file should include foo.h if it needs the interfaces that foo.h
      defines.
      * src/alloc.c: Don’t include process.h.  Include dispextern.h,
      systime.h.
      * src/atimer.c: Don’t include blockinput.h.
      * src/buffer.c: Include coding.h, systime.h.  Don’t include
      keyboard.h, coding.h.
      * src/callint.c: Don’t include commands.h, keymap.h.
      * src/callproc.c: Don’t include character.h, ccl.h, composite.h,
      systty.h, termhooks.h.
      * src/casetab.c: Don’t include character.h.
      * src/category.c: Don’t include charset.h, keymap.h.
      * src/ccl.h: Don’t include character.h.
      * src/character.c: Don’t include charset.h.
      * src/charset.c: Don’t include disptab.h.
      * src/chartab.c: Don’t include ccl.h.
      * src/cm.c: Don’t include frame.h, termhooks.h.
      * src/cmds.c: Don’t include window.h, dispextern.h.
      * src/coding.c: Don’t include window.h, frame.h.
      * src/composite.c: Include composite.h.  Don’t include window.h,
      font.h.
      * src/data.c: Don’t include syssignal.h, termhooks.h, font.h.
      * src/dbusbind.c: Don’t include frame.h.
      * src/decompress.c: Don’t include character.h.
      * src/dired.c: Don’t include character.h, commands.h, charset.h.
      * src/dispnew.c: Don’t include character.h, indent.h, intervals.h,
      process.h, timespec.h.  Include systime.h.
      * src/doc.c: Include coding.h.  Don’t include keyboard.h.
      * src/editfns.c: Include composite.h.  Don’t include frame.h.
      * src/emacs.c: Include fcntl.h, coding.h.  Don’t include
      commands.h, systty.h..
      * src/fileio.c: Don’t include intervals.h, dispextern.h.
      Include composite.h.
      * src/filelock.c: Don’t include character.h, systime.h.
      * src/fns.c: Don’t include time.h, commands.h, keyboard.h,
      keymap.h, frame.h, blockinput.h, xterm.h.  Include composite.h.
      * src/font.c: Include termhooks.h.
      * src/font.h: Don’t include ccl.h, frame.h.  Add forward decls of
      struct composition_it, struct face, struct glyph_string.
      * src/fontset.c: Don’t include buffer.h, ccl.h, keyboard.h,
      intervals.h, window.h, termhooks.h.
      * src/frame.c: Don’t include character.h, commands.h, font.h.
      * src/frame.h: Don’t include dispextern.h.
      * src/fringe.c: Don’t include character.h.
      * src/ftcrfont.c: Don’t include dispextern.h, frame.h,
      character.h, charset.h, fontset.h.
      * src/ftfont.c: Don’t include frame.h, blockinput.h, coding.h,
      fontset.h.
      * src/ftxfont.c: Don’t include dispextern.h, character.h,
      charset.h, fontset.h.
      * src/gfilenotify.c: Don’t include frame.h, process.h.
      * src/gtkutil.c: Include dispextern.h, frame.h, systime.h.
      Don’t include syssignal.h, buffer.h, charset.h, font.h.
      * src/gtkutil.h: Don’t include frame.h.
      * src/image.c: Include fcntl.h and stdio.h instead of sysstdio.h.
      Don’t include character.h.
      * src/indent.c: Don’t include keyboard.h, termchar.h.
      * src/inotify.c: Don’t include character.h, frame.h.
      * src/insdel.c: Include composite.h.  Don’t include blockinput.h.
      * src/intervals.c: Don’t include character.h, keyboard.h.
      * src/intervals.h: Don’t include dispextern.h, composite.h.
      * src/keyboard.c: Don’t include sysstdio.h, disptab.h, puresize.h.
      Include coding.h.
      * src/keyboard.h: Don’t incldue systime.h.
      * src/keymap.c: Don’t include charset.h, frame.h.
      * src/lread.c: Include dispextern.h and systime.h.
      Don’t include frame.h.  Include systime.h.
      * src/macros.c: Don’t include commands.h, character.h, buffer.h.
      * src/menu.c: Include character.h, coding.h.  Don’t include
      dispextern.h.
      * src/menu.h: Don’t include systime.h.
      * src/minibuf.c: Don’t include commands.h, dispextern.h, syntax.h,
      intervals.h, termhooks.h.
      * src/print.c: Include coding.h.  Don’t include keyboard.h,
      window.h, dispextern.h, termchar.h, termhooks.h, font.h.
      Add forward decl of struct terminal.
      * src/process.c: Don’t include termhooks.h, commands.h,
      dispextern.h, composite.h.
      * src/region-cache.c: Don’t include character.h.
      * src/scroll.c: Don’t include keyboard.h, window.h.
      * src/search.c: Don’t include category.h, commands.h.
      * src/sound.c: Don’t include dispextern.h.
      * src/syntax.c: Don’t include command.h, keymap.h.
      * src/sysdep.c: Don’t include window.h, dispextern.h.
      * src/systime.h: Use ‘#ifdef emacs’, not ‘#ifdef EMACS_LISP_H’,
      * src/term.c: Don’t include systty.h, intervals.h, xterm.h.
      * src/terminal.c: Include character.h.
      Don’t include charset.h, coding.h.
      * src/textprop.c: Don’t include character.h.
      * src/undo.c: Don’t include character.h, commands.h, window.h.
      * src/unexsol.c: Don’t include character.h, charset.h.
      * src/widget.c: Include widget.h.  Don’t include keyboard.h,
      window.h, dispextern.h, blockinput.h, character.h, font.h.
      * src/widgetprv.h: Don’t include widget.h.
      * src/window.c: Don’t include character.h, menu.h, intervals.h.
      * src/xdisp.c: Include composite.h, systime.h.  Don’t include
      macros.h, process.h.
      * src/xfaces.c: Don’t include charset.h, keyboard.h, termhooks.h,
      intervals.h.
      * src/xfns.c: Don’t include menu.h, character.h, intervals.h,
      epaths.h, fontset.h, systime.h, atimer.h, termchar.h.
      * src/xfont.c: Don’t include dispextern.h, fontset.h, ccl.h.
      * src/xftfont.c: Don’t include dispextern.h, character.h, fontset.h.
      * src/xgselect.c: Don’t include timespec.h, frame.h.
      Include systime.h.
      * src/xgselect.h: Don’t include time.h.
      Use a forward decl to struct timespec instead.
      * src/xmenu.c: Don’t include keymap.h, character.h, charset.h,
      dispextern.h.  Include systime.h.
      * src/xml.c: Don’t include character.h.
      * src/xrdb.c [USE_MOTIF]: Don’t include keyboard.h.
      * src/xselect.c: Don’t include dispextern.h, character.h,
      buffer.h, process.h.
      * src/xsmfns.c: Don’t include systime.h, sysselect.h.
      * src/xterm.c: Don’t include syssignal.h, charset.h, disptab.h,
      intervals.h process.h, keymap.h, xgselect.h.  Include composite.h.
      63cfb75f
  11. 17 Oct, 2015 1 commit
  12. 13 Oct, 2015 1 commit
    • Martin Rudalics's avatar
      Allow setting frame pixel sizes from frame parameters (Bug#21415) · d4fe840d
      Martin Rudalics authored
      Also fix some misfeatures in frame (re-)sizing code, add more
      debugging information and remove some dead code.
      
      * lisp/frame.el (frame-notice-user-settings, make-frame): Change
      parameter names when setting `frame-size-history'.
      (frame--size-history): New function.
      
      * src/frame.c (frame_inhibit_resize): If frame has not been made
      yet, return t if inhibit_horizontal_resize or
      inhibit_vertical_resize bit have been set.
      (adjust_frame_size): Simplify.
      (make_frame): Initialize inhibit_horizontal_resize,
      inhibit_vertical_resize, tool_bar_redisplayed, tool_bar_resized.
      (Fframe_after_make_frame): Reset inhibit_horizontal_resize and
      inhibit_vertical_resize slots.
      (x_set_frame_parameters): Handle `text-pixels' specification for
      width and height parameters.  Don't consider new_height or
      new_width changes.  Call adjust_frame_size instead of
      Fset_frame_size.
      (x_figure_window_size): Two new arguments x_width and y_width
      returning frame's figures width and height.  Calculate tool bar
      height before frame sizes so SET_FRAME_HEIGHT can pick it up.
      Handle `text-pixels' specification for width and height
      parameters.
      (Qtext_pixels, Qx_set_frame_parameters, Qset_frame_size)
      (Qx_set_window_size_1, Qx_set_window_size_2)
      (Qx_set_window_size_3, Qx_set_menu_bar_lines)
      (Qupdate_frame_menubar, Qfree_frame_menubar_1)
      (Qfree_frame_menubar_2): New symbols.
      * src/frame.h (structure frame): New booleans
      tool_bar_redisplayed, tool_bar_resized,
      inhibit_horizontal_resize, inhibit_vertical_resize.
      (x_figure_window_size): Update external declaration.
      * src/gtkutil.c (xg_frame_set_char_size): Set size hints before
      calling gtk_window_resize.
      (update_frame_tool_bar): Make inhibiting of frame resizing more
      discriminative.  Set tool_bar_resized bit.
      * src/nsfns.m (x_set_tool_bar_lines): Make inhibiting of frame
      resizing more discriminative.  Call adjust_frame_size instead of
      x_set_window_size.
      (Fx_create_frame): Handle x_width and x_height if
      set by x_figure_window_size.
      * src/nsterm.m (x_set_window_size): For GNUSTEP build don't
      subtract 3 from tool bar height.
      (x_set_window_size): Add frame_size_history_add call.
      (x_new_font): Call adjust_frame_size instead of
      x_set_window_size.
      * src/w32fns.c (x_change_tool_bar_height): Reset
      tool_bar_redisplayed and tool_bar_resized bits when adding tool
      bar.  Make inhibiting of frame resizing more discriminative.
      (w32_wnd_proc): Remove dead code in WM_WINDOWPOSCHANGING case.
      (Fx_create_frame): Handle x_width and x_height if set by
      x_figure_window_size.  Set size hints before adjusting frame size.
      (x_create_tip_frame): Adjust x_figure_window_size call.
      * src/w32term.c (x_set_window_size): Add frame_size_history_add
      call.
      * src/widget.c (set_frame_size): Remove dead code.  Add
      frame_size_history_add call.  When frame_resize_pixelwise is t
      use FRAME_PIXEL_WIDTH and FRAME_PIXEL_HEIGHT instead of
      pixel_width and pixel_height.
      (update_various_frame_slots): Remove dead code.
      (EmacsFrameResize): Add more information in
      frame_size_history_add call.
      (EmacsFrameQueryGeometry): Round only when frame_resize_pixelwise
      is not set.
      * src/xdisp.c (redisplay_tool_bar): Set tool_bar_redisplayed bits.
      * src/xfns.c (x_set_menu_bar_lines): Change argument name.
      (x_change_tool_bar_height): Reset tool_bar_redisplayed and
      tool_bar_resized bits when adding tool bar.  Make inhibiting of
      frame resizing more discriminative.
      (Fx_create_frame): Handle x_width and x_height if set by
      x_figure_window_size.  Set size hints before adjusting frame size.
      (x_create_tip_frame): Adjust x_figure_window_size call.
      * src/xmenu.c (update_frame_menubar): Don't handle Lucid specially.
      (set_frame_menubar): On Lucid never add core-border-width to
      avoid that adding XtNinternalBorderWidth adds it again.
      (free_frame_menubar): Handle frame_inhibit_resize true for Motif.
      * src/xterm.c (x_new_font): In non-toolkit case handle size
      change of menu bar.
      (x_set_window_size_1): Fix calls to frame_size_history_add.
      (x_wm_set_size_hint): Remove dead code.  Set
      size_hints.min_width and size_hints.min_height to base_width and
      base_height.
      d4fe840d
  13. 09 Oct, 2015 1 commit
  14. 30 Sep, 2015 1 commit
    • Stefan Monnier's avatar
      Try to avoid redisplaying all frames when creating a new one · 8b1df960
      Stefan Monnier authored
      * src/xfns.c (x_set_menu_bar_lines, x_change_tool_bar_height):
      * src/xfaces.c (Finternal_make_lisp_face, Finternal_copy_lisp_face)
      (Finternal_set_lisp_face_attribute, update_face_from_frame_parameter):
      * src/frame.c (x_set_screen_gamma): Set the specific frame's
      `redisplay' bit rather than windows_or_buffers_changed.
      
      * src/window.c (apply_window_adjustment): Remove redundant setting of
      windows_or_buffers_changed.
      
      * src/xdisp.c (redisplay_internal): Set the specific frame's
      `redisplay' bit rather than update_mode_lines in response to
      cursor_type_changed.
      (syms_of_xdisp): Use hash-tables for redisplay_*_cause tables.
      (AINC): Adjust accordingly.
      8b1df960
  15. 26 Sep, 2015 1 commit
    • Eli Zaretskii's avatar
      Make face realization be more frame-specific · e573d08e
      Eli Zaretskii authored
      * src/frame.h (struct f): New flag face_change.
      * src/xfaces.c (Finternal_make_lisp_face)
      (Finternal_copy_lisp_face, Finternal_set_lisp_face_attribute)
      (update_face_from_frame_parameter): Set the face_change flag only
      for the frame whose faces are affected.
      * src/xdisp.c (init_iterator): If a frame's face_change flag is
      set, free faces only on that frame.
      (redisplay_internal): Disable "display optimization 1" if the
      frame's face_change flag is set.
      (redisplay_window): Don't allow skipping a window's redisplay if
      its frame's face_change flag is set.
      * src/frame.c (x_set_screen_gamma): Instead of calling
      Fclear_face_cache, call clear_face_cache and set
      windows_or_buffers_changed to a non-zero value.  This avoids
      setting the global face_change flag that triggers face realization
      on all frames and thorough redisplay of all of them.
      
      * lisp/term/tty-colors.el (tty-register-default-colors): Don't
      clear face cache if the selected frame is a GUI frame.
      e573d08e
  16. 16 Sep, 2015 2 commits
    • Paul Eggert's avatar
      Omit unnecessary \ before paren in C docstrings · 032ce1c7
      Paul Eggert authored
      Although \( is needed in docstrings in Elisp code, it is not needed in
      docstrings in C code, since C function definitiions do not start with
      a parenthesis.  The backslashes made the docstrings a bit harder to
      read and to format in columns.  Also, some C docstrings had ( in
      column 1 and this did not appear to be causing any problems.  So,
      simplify C docstrings by replacing \( with ( and \) with ).
      032ce1c7
    • Martin Rudalics's avatar
      Remove tool_bar_redisplayed_once and associated code. · 1636e8c7
      Martin Rudalics authored
      * src/frame.h (tool_bar_redisplayed_once): Remove slot.
      * src/frame.c (make_frame, x_set_font): Remove initialization of
      f->tool_bar_redisplayed_once.
      * src/w32fns.c (x_change_tool_bar_height):
      * src/xfns.c (x_change_tool_bar_height): Don't check for
      f->tool_bar_redisplayed_once.
      * src/xdisp.c (redisplay_internal): Remove handling of
      f->tool_bar_redisplayed_once.
      1636e8c7
  17. 01 Sep, 2015 1 commit
  18. 27 Aug, 2015 1 commit
    • Paul Eggert's avatar
      Assume GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS · 60d1b187
      Paul Eggert authored
      This removes the need for GCPRO1 etc.  Suggested by Stefan Monnier in:
      http://lists.gnu.org/archive/html/emacs-devel/2015-08/msg00918.html
      * doc/lispref/internals.texi (Writing Emacs Primitives):
      * etc/NEWS:
      Document the change.
      * src/alloc.c (gcprolist, dump_zombies, MAX_ZOMBIES, zombies)
      (nzombies, ngcs, avg_zombies, max_live, max_zombies, avg_live)
      (Fgc_status, check_gcpros, relocatable_string_data_p, gc-precise):
      * src/bytecode.c (mark_byte_stack) [BYTE_MARK_STACK]:
      * src/eval.c (gcpro_level) [DEBUG_GCPRO]:
      * src/lisp.h (struct handler.gcpro, struct gcpro, GC_MARK_STACK)
      (GC_USE_GCPROS_AS_BEFORE, GC_MAKE_GCPROS_NOOPS)
      (GC_MARK_STACK_CHECK_GCPROS, GC_USE_GCPROS_CHECK_ZOMBIES)
      (BYTE_MARK_STACK, GCPRO1, GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6)
      (GCPRO7, UNGCPRO, RETURN_UNGCPRO):
      Remove.  All uses removed.  The code now assumes
      GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS.
      * src/bytecode.c (relocate_byte_stack):
      Rename from unmark_byte_stack, since it now only relocates.
      All callers changed.
      * src/frame.c (make_frame): Add an IF_LINT to pacify GCC 5.2
      with GCPROs removed.
      * src/systime.h: Use EMACS_LISP_H as the canary instead of GCPRO1.
      * test/automated/finalizer-tests.el (finalizer-basic)
      (finalizer-circular-reference, finalizer-cross-reference)
      (finalizer-error):
      * test/automated/generator-tests.el (cps-test-iter-close-finalizer):
      Remove tests, as they depend on gc-precise.
      60d1b187
  19. 18 Aug, 2015 1 commit
    • Martin Rudalics's avatar
      Rewrite and add frame geometry related functions. · c29a51df
      Martin Rudalics authored
      * src/frame.c (Fframe_position): New function.
      (Fset_frame_position): Rename parameters and rewrite doc-string.
      (syms_of_frame): Remove Qframe_position, Qframe_outer_size,
      Qtitle_height and Qframe_inner_size.  Add Qouter_edges,
      Qouter_position, Qouter_size, Qnative_edges, Qinner_edges,
      Qtitle_bar_size.
      * src/nsfns.m (frame_geometry): New function.
      (Fx_frame_geometry): Call frame_geometry.
      (Fx_frame_edges): New function.
      * src/w32fns.c (C_CHILDREN_TITLEBAR, TITLEBAR_INFO)
      (GetTitleBarInfo_Proc): Define these so we can use the
      GetTitleBarInfo API.
      (Fw32_frame_menu_bar_size, Fw32_frame_rect): Remove.
      (Fx_frame_geometry): Rewrite.
      (Fx_frame_edges, Fx_mouse_absolute_pixel_position)
      (Fx_set_mouse_absolute_pixel_position): New functions.
      * src/xfns.c (frame_geometry): New function.
      (Fx_frame_geometry): Call frame_geometry.
      (Fx_frame_edges, Fx_mouse_absolute_pixel_position)
      (Fx_set_mouse_absolute_pixel_position): New functions.
      c29a51df
  20. 01 Jul, 2015 1 commit
  21. 31 May, 2015 1 commit
    • Paul Eggert's avatar
      Remove unused DEFSYMs · 0c2a3cf6
      Paul Eggert authored
      Remove DEFSYMs that aren't used at the C level.  Also:
      * src/decompress.c (Qzlib_dll):
      * src/font.c (Qunicode_sip):
      * src/frame.c (Qtip_frame):
      * src/ftfont.c (Qserif):
      * src/gnutls.c (Qgnutls_dll):
      * src/xml.c (Qlibxml2_dll):
      Move from here ...
      * src/w32fns.c (syms_of_w32fns): ... to here,
      as these are used only on MS-Windows.
      0c2a3cf6
  22. 21 May, 2015 1 commit
  23. 19 May, 2015 1 commit
  24. 13 Mar, 2015 1 commit
  25. 04 Mar, 2015 1 commit
  26. 03 Mar, 2015 1 commit
  27. 28 Feb, 2015 1 commit
  28. 21 Feb, 2015 1 commit
    • Paul Eggert's avatar
      Prefer 'Qfoo' to 'intern ("foo")' · 3ebf0630
      Paul Eggert authored
      * buffer.c (syms_of_buffer):
      * bytecode.c (exec_byte_code):
      * callint.c (Fcall_interactively):
      * callproc.c (create_temp_file):
      * charset.c (define_charset_internal):
      * coding.c (syms_of_coding):
      * editfns.c (syms_of_editfns):
      * emacs.c (main):
      * fns.c (syms_of_fns):
      * frame.c (delete_frame, Fframe_parameters):
      * keyboard.c (syms_of_keyboard):
      * keymap.c (syms_of_keymap):
      * minibuf.c (read_minibuf, syms_of_minibuf):
      * nsfns.m (ns_cursor_type_to_lisp):
      * textprop.c (syms_of_textprop):
      * xdisp.c (Fformat_mode_line, syms_of_xdisp):
      * xfns.c (x_create_tip_frame, Fx_select_font):
      * xml.c (parse_region):
      Prefer constants like 'Qfoo' to calls like 'intern ("foo")'.
      * buffer.c (syms_of_buffer): OK to do (put 'erase-buffer 'disabled
      t) here now ...
      (keys_of_buffer): ... instead of here.
      * ftfont.c (syms_of_ftfont): Move DEFSYM of Qmono from here ...
      * xfns.c (syms_of_xfns): ... to here, since ftfont.c is more
      optional than xfns.c.
      3ebf0630
  29. 08 Feb, 2015 2 commits
    • Paul Eggert's avatar
      Minor tweaks to frame_size_history_add · 61320cc9
      Paul Eggert authored
      * frame.c (frame_size_history_add): Don't assume length fits in 'int'.
      Prefer XCAR and XCDR to Fcar and Fcdr when the arg is a cons.
      (Fframe_after_make_frame): Simplify.
      * gtkutil.c: Remove commented-out code.
      * xfns.c (Fx_create_frame): Fix indenting.
      61320cc9
    • Eli Zaretskii's avatar
      Fix a thinko in frame-parameter (Bug#19802) · dd2aa937
      Eli Zaretskii authored
       src/frame.c (Fframe_parameter): Don't replace a non-nil value of
       foreground-color or background-color parameters with a nil value.
      dd2aa937
  30. 07 Feb, 2015 1 commit
    • Martin Rudalics's avatar
      Try to improve handling of fullwidth/-height frames. · d1655783
      Martin Rudalics authored
      * frame.el (frame-notice-user-settings): Update
      `frame-size-history'.
      (make-frame): Update `frame-size-history'.  Call
      `frame-after-make-frame'.
      * faces.el (face-set-after-frame-default): Remove call to
      frame-can-run-window-configuration-change-hook.
      * frame.c (frame_size_history_add): New function.
      (frame_inhibit_resize): Consider frame_inhibit_implied_resize
      only after frame's after_make_frame slot is true.  Inhibit
      resizing fullwidth-/height frames in one direction only.  Update
      frame_size_history.
      (adjust_frame_size): Call frame_size_history_add.
      (make_frame): Initalize after_make_frame slot.
      (Fmake_terminal_frame): Adjust adjust_frame_size call.
      (Fcan_run_window_configuration_change_hook): Rename to
      Fframe_after_make_frame.  Set after_make_frame slot.  Return
      second argument.
      (x_set_frame_parameters): Postpone handling fullscreen parameter
      until after width and height parameters have been set.  Apply
      width and height changes only if can_x_set_window_size is true.
      Update frame_size_history.
      (Qadjust_frame_size_1, Qadjust_frame_size_2)
      (Qadjust_frame_size_3, QEmacsFrameResize, Qframe_inhibit_resize)
      (Qx_set_fullscreen, Qx_check_fullscreen, Qx_set_window_size_1)
      (Qxg_frame_resized, Qxg_frame_set_char_size_1)
      (Qxg_frame_set_char_size_2, Qxg_frame_set_char_size_3)
      (Qxg_change_toolbar_position, Qx_net_wm_state)
      (Qx_handle_net_wm_state, Qtb_size_cb, Qupdate_frame_tool_bar)
      (Qfree_frame_tool_bar): New symbol for updating
      frame_size_history.
      (Qtip_frame, Qterminal_frame): New symbols.
      (Vframe_adjust_size_history): Rename to frame_size_history.
      * frame.h (struct frame): Rename
      can_run_window_configuration_change_hook slot to
      after_make_frame.
      (frame_size_history_add): Extern.
      * gtkutil.c (xg_frame_resized): Call frame_size_history_add.
      Don't set FRAME_PIXEL_WIDTH and FRAME_PIXEL_HEIGHT here.
      (xg_frame_set_char_size): Try to preserve the status of
      fullwidth/-height frames.  Call frame_size_history_add.
      (tb_size_cb, update_frame_tool_bar, free_frame_tool_bar)
      (xg_change_toolbar_position): Call frame_size_history_add.
      * w32fns.c (x_change_tool_bar_height): Handle frame's fullscreen
      status.
      (Fx_create_frame): Process fullscreen parameter after frame has
      been resized.
      (x_create_tip_frame): Pass Qtip_frame to adjust_frame_size.
      (Fx_frame_geometry): Don't pollute pure storage.
      * w32term.c (w32_read_socket): For WM_WINDOWPOSCHANGED,
      WM_ACTIVATE and WM_ACTIVATEAPP set frame's visibility before
      calling w32fullscreen_hook.  For WM_DISPLAYCHANGE call
      w32fullscreen_hook immediately.
      (x_fullscreen_adjust, x_check_fullscreen): Remove.
      (w32fullscreen_hook): Call change_frame_size just as with a
      "normal" frame resize operation.  Call do_pending_window_change.
      (x_set_window_size): Try to handle fullwidth and fullheight more
      accurately.  Don't rely on w32_enable_frame_resize_hack.
      (w32_enable_frame_resize_hack): Remove variable.
      * widget.c (EmacsFrameResize): Remove dead code.  Call
      frame_size_history_add
      * window.c (run_window_configuration_change_hook): Check
      f->after_make_frame instead of
      f->can_run_window_configuration_change_hook.
      * xfns.c (x_change_tool_bar_height): Handle frame's fullscreen status.
      (Fx_create_frame): Process fullscreen parameter after frame has
      been resized.
      (Fx_frame_geometry): Don't pollute pure storage.
      * xterm.c (x_net_wm_state, x_handle_net_wm_state): Call
      frame_size_history_add.
      (do_ewmh_fullscreen): Handle x_frame_normalize_before_maximize.
      (x_check_fullscreen): Count in menubar when calling
      XResizeWindow.  Wait for ConfigureNotify event.  Call
      frame_size_history_add.
      (x_set_window_size_1): Remove PIXELWISE argument.  Try to handle
      changing a fullheight frame's width or a fullwidth frame's
      height.  Call frame_size_history_add.
      (x_set_window_size): Simplify xg_frame_set_char_size and
      x_set_window_size_1 calls.
      (x_frame_normalize_before_maximize): New variable.
      d1655783
  31. 03 Feb, 2015 1 commit
  32. 28 Jan, 2015 1 commit
    • Paul Eggert's avatar
      Use bool, not int, to track face changes · cdee38ab
      Paul Eggert authored
      * xfaces.c (face_change): Rename from face_change_count, and
      change from int to bool.  The var is now true (instead of nonzero)
      if attributes have changed; this is simpler.  All uses changed.
      Fixes: bug#19698
      cdee38ab
  33. 16 Jan, 2015 1 commit
    • Dmitry Antipov's avatar
      Tune pseudovector allocation assuming Qnil == 0 · 3b48f995
      Dmitry Antipov authored
      * alloc.c (allocate_pseudovector): Use memset for both
      Lisp_Objects and regular slots.  Add zerolen arg.
      * lisp.h (allocate_pseudovector): Adjust prototype.
      (ALLOCATE_PSEUDOVECTOR): Adjust user.
      (ALLOCATE_ZEROED_PSEUDOVECTOR): New macro.
      (allocate_hash_table, allocate_window, allocate_frame)
      (allocate_process, allocate_terminal): Remove prototypes.
      * fns.c (allocate_hash_table): Now static here.
      * frame.c (allocate_frame):
      * process.c (allocate_process):
      * terminal.c (allocate_terminal):
      * window.c (allocate_window): Now static here.
      Use ALLOCATE_ZEROED_PSEUDOVECTOR.  Add comment.
      3b48f995
  34. 13 Jan, 2015 2 commits
    • Martin Rudalics's avatar
      In adjust_frame_size don't return too early after font size change. · 233dcf12
      Martin Rudalics authored
      * frame.c (adjust_frame_size): Make sure new numbers of
      lines/columns get installed after font size change (Bug#19575).
      233dcf12
    • Dmitry Antipov's avatar
      Support const and noreturn DEFUN attributes. · ad9c4a40
      Dmitry Antipov authored
      * lib-src/make-docfile.c (struct global): New field 'flags'.
      (DEFUN_noreturn, DEFUN_const): New enum bitfields.
      (add_global): Now return pointer to global.
      (write_globals): Add _Noreturn and ATTRIBUTE_CONST attributes
      if requested by global's flags.
      (stream_match): New function.
      (scan_c_stream): Recognize 'attributes:' of DEFUN.
      
      * src/callint.c (Finteractive):
      * src/character.c (Fcharacterp, Fmax_char):
      * src.data.c (Feq, Fnull, Fconsp, Fatom, Flistp, Fnlistp, Fsymbolp)
      (Fstringp, Fchar_or_string_p, Fintegerp, Fnatnump, Fnumberp)
      (Ffloatp, Fbyteorder):
      * src/decompress.c (Fzlib_available_p):
      * src/fns.c (Fidentity):
      * src/frame.c (Fframe_windows_min_size):
      * src/gnutls.c (Fgnutls_error_p, Fgnutls_available_p):
      * src/window.c (Fwindow__sanitize_window_sizes):
      * src/xdisp.c (Ftool_bar_height):
      * src/xfaces.c (Fface_attribute_relative_p): Add const attribute.
      * src/emacs.c (Fkill_emacs):
      * src/eval.c (Fthrow):
      * src/keyboard.c (Ftop_level, Fexit_recursive_edit)
      (Fabor_recursive_edit): Add noreturn attribute.
      ad9c4a40
  35. 12 Jan, 2015 1 commit
    • Martin Rudalics's avatar
      Adjust frame heights to real height of tool bar. · fb35f1f7
      Martin Rudalics authored
      * frame.el (frame-notice-user-settings): Remove code dealing with
      frame-initial-frame-tool-bar-height.  Turn off `tool-bar-mode'
      only if `window-system-frame-alist' or `default-frame-alist' ask
      for it.
      (make-frame): Update frame-adjust-size-history if needed.
      * dispnew.c (change_frame_size_1): Pass Qchange_frame_size to
      adjust_frame_size.
      * frame.c (frame_default_tool_bar_height): New variable.
      (adjust_frame_size): Possibly add requested adjustment to
      Vframe_adjust_size_history.
      (make_frame): Initialize tool_bar_redisplayed_once slot.
      (Fset_frame_height, Fset_frame_width, Fset_frame_size): Clarify
      doc-string.  Call adjust_frame_size unconditionally (the frame's
      text size may remain unaltered but the pixel size may change).
      (x_figure_window_size): If frame_default_tool_bar_height was
      set, use it instead of calculating the tool bar height from
      DEFAULT_TOOL_BAR_IMAGE_HEIGHT.  Don't set
      Vframe_initial_frame_tool_bar_height.
      (Qchange_frame_size, Qxg_frame_set_char_size)
      (Qset_window_configuration, Qx_create_frame_1)
      (Qx_create_frame_2): New symbols.
      (Vframe_initial_frame_tool_bar_height): Remove.
      (Vframe_adjust_size_history): New history variable for debugging
      frame size adjustments.
      * frame.h (struct frame): New boolean slot
      tool_bar_redisplayed_once.
      (frame_default_tool_bar_height): Extern.
      * gtkutil.c (xg_frame_set_char_size): Pass Qxg_frame_set_char_size
      to adjust_frame_size.
      * nsfns.m (Fx_create_frame): Pass Pass Qx_create_frame_1 and
      Qx_create_frame_2 to adjust_frame_size.
      * w32fns.c (x_change_tool_bar_height): Call adjust_frame_size with
      inhibit 1 when we have not redisplayed the tool bar yet.
      (Fx_create_frame): Pass Pass Qx_create_frame_1 and
      Qx_create_frame_2 to adjust_frame_size.
      * w32menu.c (set_frame_menubar): Simplify adjust_frame_size
      call.
      * window.c (Fset_window_configuration): Pass
      Qset_window_configuration to adjust_frame_size.
      * xdisp.c (redisplay_tool_bar): Assign new height to
      frame_default_tool_bar_height.
      (redisplay_internal): If we haven't redisplayed this frame's
      tool bar, call redisplay_tool_bar early so we can adjust the
      frame size accordingly.
      * xfns.c (x_change_tool_bar_height): Call adjust_frame_size with
      inhibit 1 when we have not redisplayed the tool bar yet.
      (Fx_create_frame): Pass Pass Qx_create_frame_1 and
      Qx_create_frame_2 to adjust_frame_size.
      fb35f1f7
  36. 10 Jan, 2015 1 commit
    • Paul Eggert's avatar
      Port to 32-bit --with-wide-int · 6a37ecee
      Paul Eggert authored
      Prefer symbol indexes to struct Lisp_Symbol * casted and then
      widened, as the latter had trouble with GCC on Fedora 21 when
      configured --with-wide-int and when used in static initializers.
      * lib-src/make-docfile.c (write_globals): Define and use symbols like
      iQnil (a small integer, like 0) rather than aQnil (an address
      constant).
      * src/alloc.c (garbage_collect_1, which_symbols):
      * src/lread.c (init_obarray):
      Prefer builtin_lisp_symbol when it can be used.
      * src/dispextern.h (struct image_type.type):
      * src/font.c (font_property_table.key):
      * src/frame.c (struct frame_parm_table.sym):
      * src/keyboard.c (scroll_bar_parts, struct event_head):
      * src/xdisp.c (struct props.name):
      Use the index of a builtin symbol rather than its address.
      All uses changed.
      * src/lisp.h (TAG_SYMPTR, XSYMBOL_INIT): Remove, replacing with ...
      (TAG_SYMOFFSET, SYMBOL_INDEX): ... new macros that deal with
      symbol indexes rather than pointers, and which work better on MSB
      hosts because they shift right before tagging.  All uses changed.
      (DEFINE_LISP_SYMBOL_BEGIN, DEFINE_LISP_SYMBOL_END):
      No longer noops on wide-int hosts, since they work now.
      (builtin_lisp_symbol): New function.
      6a37ecee