1. 24 Jan, 2016 1 commit
    • Alan Mackenzie's avatar
      Expunge "allow" + infinitive without direct object from source and doc. · fbce4757
      Alan Mackenzie authored
      Do the same for "permit", "enable", and "prevent".
      
      * doc/emacs/mule.texi:
      * doc/lispref/control.texi:
      * doc/lispref/display.texi:
      * doc/lispref/frames.texi:
      * doc/lispref/functions.texi:
      * doc/lispref/nonascii.texi:
      * doc/lispref/streams.texi:
      * doc/lispref/windows.texi:
      * doc/misc/dbus.texi:
      * doc/misc/eww.texi:
      * doc/misc/flymake.texi:
      * doc/misc/octave-mode.texi:
      * doc/misc/org.texi:
      * doc/misc/reftex.texi:
      * doc/misc/tramp.texi:
      * doc/misc/wisent.texi:
      * etc/NEWS:
      * lisp/autorevert.el:
      * lisp/cedet/mode-local.el:
      * lisp/cedet/semantic/senator.el:
      * lisp/cedet/semantic/wisent.el:
      * lisp/dos-fns.el:
      * lisp/frameset.el:
      * lisp/gnus/gnus-agent.el:
      * lisp/gnus/mm-util.el:
      * lisp/international/characters.el:
      * lisp/ldefs-boot.el:
      * lisp/mail/mailclient.el:
      * lisp/man.el:
      * lisp/mh-e/mh-search.el:
      * lisp/net/tramp-cmds.el:
      * lisp/net/tramp-gvfs.el:
      * lisp/org/org-crypt.el:
      * lisp/org/org-element.el:
      * lisp/org/org-feed.el:
      * lisp/org/org.el:
      * lisp/org/ox-ascii.el:
      * lisp/org/ox-icalendar.el:
      * lisp/org/ox-publish.el:
      * lisp/org/ox.el:
      * lisp/play/gamegrid.el:
      * lisp/play/gomoku.el:
      * lisp/progmodes/antlr-mode.el:
      * lisp/progmodes/python.el:
      * lisp/progmodes/vhdl-mode.el:
      * lisp/strokes.el:
      * lisp/textmodes/ispell.el:
      * lisp/tree-widget.el:
      * lisp/vc/pcvs.el:
      * lisp/window.el:
      * src/lisp.h:
      * src/w32.c:
      * src/w32heap.c:
      * src/w32term.c:
      * src/window.c:
      * src/xfaces.c:
      
      Replace solecisms like "This allow to do something" with a correct
      alternative, such as "This allow you to do something", "This allows
      something to be done" or "This allows the doing of something".
      fbce4757
  2. 22 Jan, 2016 1 commit
    • Paul Eggert's avatar
      xwidgets style cleanup · 7c3d742c
      Paul Eggert authored
      Adjust the newly-added Xwidgets code so that it uses a more-typical
      Emacs style.  This should not affect behavior, except that in
      a few places it adds runtime checks that Lisp arguments are of
      the proper type, and in one place it uses more-precise arithmetic.
      * src/buffer.c, src/dispnew.c, src/emacs.c, src/emacsgtkfixed.c:
      * src/emacs.c, src/print.c, src/window.c, src/xdisp.c, src/xterm.c:
      Include xwidget.h unconditionally.
      * src/buffer.c (Fkill_buffer):
      * src/dispnew.c (update_window):
      * src/emacs.c (main):
      * src/print.c (print_object):
      * src/window.c (Fdelete_window_internal):
      * src/xdisp.c (handle_single_display_spec, push_it, pop_it)
      (get_next_element, set_iterator_to_next, next_element_from_xwidget)
      (dump_glyph, calc_pixel_width_or_height, BUILD_GLYPH_STRINGS_XW)
      (BUILD_GLYPH_STRINGS, x_produce_glyphs, get_window_cursor_type):
      * src/xterm.c (x_draw_glyph_string, x_draw_bar_cursor):
      Call xwidget functions and macros without worrying about
      HAVE_XWIDGETS when the code is a no-op on non-xwidget
      platforms.
      * src/dispextern.h (XWIDGET_GLYPH, struct glyph_string.xwidget)
      (IT_XWIDGET, GET_FROM_XWIDGET, struct it.u.xwidget)
      (struct it.xwidget):
      * src/lisp.h (PVEC_XWIDGET, PVEC_XWIDGET_VIEW):
      Always define.
      * src/emacsgtkfixed.h: Omit unnecessary comment.
      * src/keyboard.c: Fix spacing.
      * src/xdisp.c (BUILD_XWIDGET_GLYPH_STRING, produce_xwidget_glyph):
      Define to be a no-op if not HAVE_XWIDGETS.
      * src/xwidget.c: Include xwidget.h first (after config.h)
      to make sure that it can stand by itself.
      (Fmake_xwidget, Fxwidget_webkit_execute_script):
      Fix typo in doc string.
      (Fmake_xwidget): Check type of args.
      (Fmake_xwidget, offscreen_damage_event)
      (webkit_document_load_finished_cb, webkit_download_cb)
      (webkit_new_window_policy_decision_requested_cb)
      (webkit_navigation_policy_decision_requested_cb)
      (xwidget_osr_draw_cb, xwidget_osr_event_forward)
      (xwidget_osr_event_set_embedder, xwidget_init_view):
      Omit unnecessary casts.
      * src/xwidget.c (Fmake_xwidget, xwidget_hidden)
      (xwidget_show_view, xwidget_hide_view)
      (x_draw_xwidget_glyph_string, xwidget_start_redisplay, xwidget_touch)
      (xwidget_touched):
      * src/xwidget.h (struct xwidget.kill_without_query)
      (struct xwidget_view.redisplayed, struct xwidget_view.hidden):
      Use bool for boolean.
      * src/xwidget.c (store_xwidget_event_string, Fxwidget_size_request):
      Simplify by using list functions.
      (WEBKIT_FN_INIT): Omit unnecessary test for nil.
      (Fxwidget_resize): Check type of integer args
      before doing any work.  Check that they are nonnegative.
      (Fxwidget_set_adjustment): Check type of integer arg.
      Avoid redundant call to gtk_scrolled_window_get_vadjustment.
      Simplify.  Use double, not float.
      (Fxwidget_info, Fxwidget_view_info): Simplify by using CALLN.
      (valid_xwidget_spec_p): Simplify.
      (xwidget_spec_value): Omit unused arg FOUND.  All callers changed.
      * src/xwidget.h: Include lisp.h first, so that includers do
      not need to worry about doing that before including this file.
      Make this .h file safe to include even on non-HAVE_XWIDGETS
      configurations, to simplify the includers.
      (x_draw_xwidget_glyph_string, syms_of_xwidget, valid_xwidget_spec_p)
      (xwidget_end_redisplay, lookup_xwidget)
      (xwidget_view_delete_all_in_window, kill_buffer_xwidgets):
      Now a no-op if !HAVE_XWIDGETS, to simplify callers.
      (struct glyph_matrix, struct glyph_string, struct xwidget)
      (struct xwidget_view, struct window):
      New forward or incomplete decls, so that includers need not
      assume the corresponding .h files are already included, or that
      HAVE_XWIDGETS is defined.
      (struct xwidget_type, xwidget_from_id): Remove; unused.
      7c3d742c
  3. 19 Jan, 2016 1 commit
    • Joakim Verona's avatar
      Support for the new Xwidget feature. · 7c1f66a9
      Joakim Verona authored
      * configure.ac:
      (HAVE_XWIDGETS, WIDGET_OBJ, EMACS_CONFIG_FEATURES):
      * xterm.c (x_draw_glyph_string, x_draw_bar_cursor):
      * xdisp.c:
      (handle_display_spec, handle_single_display_spec, push_it)
      (pop_it, set_iterator_to_next, dump_glyph)
      (calc_pixel_width_or_height, fill_xwidget_glyph_string)
      (BUILD_XWIDGET_GLYPH_STRING, BUILD_GLYPH_STRINGS)
      (produce_xwidget_glyph, x_produce_glyphs)
      (get_window_cursor_type):
      * window.c (Fdelete_window_internal):
      * termhooks.h (e):
      * print.c (print_object):
      * lisp.h (ptrdiff_t):
      * keyboard.c (kbd_buffer_get_event, make_lispy_event)
      (syms_of_keyboard):
      * emacs.c (main):
      * dispnew.c (update_window, scrolling_window):
      * dispextern.h (g, i):
      * Makefile.in (XWIDGETS_OBJ, WEBKIT_CFLAGS, WEBKIT_LIBS)
      (GIR_LIBS, ALL_CFLAGS, base_obj, LIBES):
      * keyboard.c (kbd_buffer_get_event):
      * emacsgtkfixed.c (emacs_fixed_gtk_widget_size_allocate)
      (emacs_fixed_class_init): Add case for an xwidget view.
      
      * xwidget.c, xwidget.h, xwidget.el: New files for xwidgets
      Co-authored-by: default avatarGrégoire Jadi  <daimrod@gmail.com>
      
      Various improvements to the Xwidget feature.
      * xwidgets.c:
      * emacsgtkfixed.c:
      * xwidget.el:
      7c1f66a9
  4. 18 Jan, 2016 2 commits
  5. 15 Jan, 2016 1 commit
  6. 01 Jan, 2016 1 commit
  7. 14 Dec, 2015 1 commit
    • Alan Mackenzie's avatar
      Replace GROUP argument in six window primitives by new functions. · e8937de5
      Alan Mackenzie authored
      * doc/lispref/windows.texi (Window Start and End, Textual Scrolling)
      * doc/lispref/positions.texi (Screen Lines): Remove optional GROUP argument
      from description of six window functions.  Add in description of new functions
      window-group-start, window-group-end, set-window-group-start,
      pos-visible-in-window-group-p, recenter-group and move-to-window-group-line,
      together with the six variables indirecting to the pertinent group
      functions.
      
      * src/window.c
      * src/keyboard.c: Revert the commit from 2015-11-11 12:02:48, in so far as it
      applies to these two files, which added the GROUP argument to six window
      primitives.
      
      * lisp/follow.el (follow-mode): Use updated variable names for the indirected
      functions.
      
      * lisp/isearch.el (isearch-update, isearch-done, isearch-string-out-of-window)
      (isearch-back-into-window, isearch-lazy-highlight-new-loop)
      (isearch-lazy-highlight-search, isearch-lazy-highlight-update): Replace calls
      to window primitives (e.g. window-start) with a GROUP argument by calls to
      new functions (e.g. window-group-start).
      
      * lisp/ispell.el (ispell-command-loop): Replace call to
      pos-visible-in-window-p with pos-visible-in-window-group-p.
      
      * lisp/window.el (window-group-start, window-group-end)
      (set-window-group-start, recenter-group, pos-visible-in-window-group-p)
      (selected-window-group, move-to-window-group-line): New functions.
      (window-group-start-function, window-group-end-function)
      (set-window-group-start-function, recenter-group-function)
      (pos-visible-in-window-group-p-function, selected-window-group-function)
      (move-to-window-group-line-function): New variables.
      e8937de5
  8. 04 Dec, 2015 1 commit
    • Alan Mackenzie's avatar
      First commit to scratch/follow. Make Isearch work with Follow Mode, etc. · 64c57303
      Alan Mackenzie authored
      doc/lispref/window.texi (Basic Windows): Add paragraph defining "Group of
      Windows" and new @defun selected-window-group.
      (Window Start and End): Describe new &optional parameter GROUP and
      ...-group-function for window-start, window-end, set-window-start, and
      pos-visible-in-window-p.
      (Textual Scrolling) Describe the same for recenter.
      doc/lispref/positions.texi (Screen Lines): Describe the same for
      move-to-window-line.
      
      src/window.c (Fwindow_start, Fwindow_end, Fset_window_start)
      (Fpos_visible_in_window_p, Frecenter, Fmove_to_window_line): To each, add ar
      new optional parameter "group".  At the beginning of each, check whether the
      corresponding ...-group-function is set to a function, and if so execute this
      function in place of the normal processing.
      (syms_of_window): Define symbols for the six new variables below.
      (window-start-group-function, window-end-group-function)
      (set-window-start-group-function, recenter-group-function)
      (pos-visible-in-window-p-group-function, move-to-window-line-group-function):
      New permanent local buffer local variables.
      src/keyboard.c (Fposn_at_point): Add extra parameter in call to
      Fpos_visible_in_window_p.
      
      lisp/window.el (selected-window-group-function): New permanent local buffer
      local variable.
      (selected-window-group): New function.
      
      lisp/follow.el (follow-mode): Set the ...-group-function variables at mode
      enable, kill them at mode disable.  Add/remove follow-after-change to/from
      after-change-functions.
      (follow-start-end-invalid): New variable.
      (follow-redisplay): Manipulate follow-start-end-invalid.
      (follow-after-change, follow-window-start, follow-window-end)
      (follow-set-window-start, follow-pos-visible-in-window-p)
      (follow-move-to-window-line, follow-sit-for): New functions.
      
      lisp/isearch.el (isearch-call-message): New macro.
      (isearch-update, with-isearch-suspended, isearch-del-char)
      (isearch-search-and-update, isearch-ring-adjust): Invoke above new macro.
      (with-isearch-suspended): Rearrange code such that isearch-call-message is
      invoked before point is moved.
      (isearch-message): Add comment about where point must be at function call.
      (isearch-search): Remove call to isearch-message.
      (isearch-lazy-highlight-window-group): New variable.
      (isearch-lazy-highlight-new-loop): Unconditionally start idle timer.  Move
      the battery of tests to ...
      (isearch-lazy-highlight-maybe-new-loop): New function, started by idle timer.
      Note: (sit-for 0) is still called.
      (isearch-lazy-highlight-update): Check membership of
      isearch-lazy-highlight-window-group.  Don't set the `window' overlay
      property.
      (isearch-update, isearch-done, isearch-string-out-of-window)
      (isearch-back-into-window, isearch-lazy-highlight-maybe-new-loop)
      (isearch-lazy-highlight-search, isearch-lazy-highlight-update)
      (isearch-lazy-highlight-update): Call the six amended primitives (see
      src/window.c above) with the new `group' argument set to t, to cooperate
      with Follow Mode.
      64c57303
  9. 23 Nov, 2015 1 commit
  10. 21 Nov, 2015 1 commit
    • Eli Zaretskii's avatar
      Call 'window-size-change-functions' for mini-windows · 3ca44a1a
      Eli Zaretskii authored
      * src/window.c (grow_mini_window, shrink_mini_window): Set the
      frame's 'window_sizes_changed' flag.
      * src/xdisp.c (redisplay_internal): Call the hooks on
      'window-size-change-functions' if the call to 'echo_area_display'
      sets the frame's 'window_sizes_changed' flag.
      (syms_of_xdisp) <window-size-change-functions>:
      Update doc string to indicate the mini-window resizes trigger a
      call to the hooks, and don't promise that will happen "before
      redisplay".  (Bug#19576, Bug#21333)
      
      * doc/lispref/windows.texi (Window Hooks): Update the description
      of 'window-size-change-functions'.
      3ca44a1a
  11. 11 Nov, 2015 1 commit
    • Alan Mackenzie's avatar
      First commit to scratch/follow. Make Isearch work with Follow Mode, etc. · 2c56fc2a
      Alan Mackenzie authored
      doc/lispref/window.texi (Basic Windows): Add paragraph defining "Group of
      Windows" and new @defun selected-window-group.
      (Window Start and End): Describe new &optional parameter GROUP and
      ...-group-function for window-start, window-end, set-window-start, and
      pos-visible-in-window-p.
      (Textual Scrolling) Describe the same for recenter.
      doc/lispref/positions.texi (Screen Lines): Describe the same for
      move-to-window-line.
      
      src/window.c (Fwindow_start, Fwindow_end, Fset_window_start)
      (Fpos_visible_in_window_p, Frecenter, Fmove_to_window_line): To each, add ar
      new optional parameter "group".  At the beginning of each, check whether the
      corresponding ...-group-function is set to a function, and if so execute this
      function in place of the normal processing.
      (syms_of_window): Define symbols for the six new variables below.
      (window-start-group-function, window-end-group-function)
      (set-window-start-group-function, recenter-group-function)
      (pos-visible-in-window-p-group-function, move-to-window-line-group-function):
      New permanent local buffer local variables.
      src/keyboard.c (Fposn_at_point): Add extra parameter in call to
      Fpos_visible_in_window_p.
      
      lisp/window.el (selected-window-group-function): New permanent local buffer
      local variable.
      (selected-window-group): New function.
      
      lisp/follow.el (follow-mode): Set the ...-group-function variables at mode
      enable, kill them at mode disable.  Add/remove follow-after-change to/from
      after-change-functions.
      (follow-start-end-invalid): New variable.
      (follow-redisplay): Manipulate follow-start-end-invalid.
      (follow-after-change, follow-window-start, follow-window-end)
      (follow-set-window-start, follow-pos-visible-in-window-p)
      (follow-move-to-window-line, follow-sit-for): New functions.
      
      lisp/isearch.el (isearch-call-message): New macro.
      (isearch-update, with-isearch-suspended, isearch-del-char)
      (isearch-search-and-update, isearch-ring-adjust): Invoke above new macro.
      (with-isearch-suspended): Rearrange code such that isearch-call-message is
      invoked before point is moved.
      (isearch-message): Add comment about where point must be at function call.
      (isearch-search): Remove call to isearch-message.
      (isearch-lazy-highlight-window-group): New variable.
      (isearch-lazy-highlight-new-loop): Unconditionally start idle timer.  Move
      the battery of tests to ...
      (isearch-lazy-highlight-maybe-new-loop): New function, started by idle timer.
      Note: (sit-for 0) is still called.
      (isearch-lazy-highlight-update): Check membership of
      isearch-lazy-highlight-window-group.  Don't set the `window' overlay
      property.
      (isearch-update, isearch-done, isearch-string-out-of-window)
      (isearch-back-into-window, isearch-lazy-highlight-maybe-new-loop)
      (isearch-lazy-highlight-search, isearch-lazy-highlight-update)
      (isearch-lazy-highlight-update): Call the six amended primitives (see
      src/window.c above) with the new `group' argument set to t, to cooperate
      with Follow Mode.
      2c56fc2a
  12. 10 Nov, 2015 1 commit
    • Paul Eggert's avatar
      Spelling fixes · c92dbd6d
      Paul Eggert authored
      * lisp/net/soap-inspect.el (soap-inspect-xs-simple-type):
      Fix misspelling in output.
      c92dbd6d
  13. 24 Oct, 2015 2 commits
    • Eli Zaretskii's avatar
      Update frame title when scrolling the selected window · 41518e5b
      Eli Zaretskii authored
      * src/window.c (wset_update_mode_line): New function, sets either the
      window's update_mode_line flag or the global update_mode_lines
      variable.
      (Fset_window_start, set_window_buffer, window_scroll_pixel_based)
      (window_scroll_line_based): Call it instead of only setting the
      window's update_mode_line flag.
      41518e5b
    • Eli Zaretskii's avatar
      An even better fix for bug#21739 · 7a6968b4
      Eli Zaretskii authored
      * src/window.c (set_window_buffer): If the window is the frame's
      selected window, set update_mode_lines, not the window's
      update_mode_line flag.  (Bug#21739)
      * src/buffer.c (Fkill_buffer): Undo last change.
      (set_update_modelines_for_buf): Function deleted.
      7a6968b4
  14. 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
  15. 07 Oct, 2015 1 commit
  16. 30 Sep, 2015 4 commits
  17. 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
    • Paul Eggert's avatar
      Add -Wswitch to --enable-gcc-warnings · 8865587c
      Paul Eggert authored
      Make --enable-gcc-warnings a bit pickier, by also using -Wswitch.
      * configure.ac (WERROR_CFLAGS): Don’t add -Wno-switch.
      * lib-src/etags.c (main, consider_token, C_entries):
      * src/coding.c (encode_invocation_designation):
      * src/data.c (Ftype_of):
      * src/eval.c (Fdefvaralias, default_toplevel_binding)
      (Fbacktrace__locals, mark_specpdl):
      * src/lisp.h (record_xmalloc):
      * src/syntax.c (scan_lists, scan_sexps_forward):
      * src/window.c (window_relative_x_coord):
      * src/xdisp.c (push_it, pop_it):
      * src/xterm.c (xg_scroll_callback, x_check_fullscreen):
      Error out or do nothing (as appropriate) if a switch statement
      with an enum value does not cover all of the enum.
      * src/dispextern.h (struct iterator_stack_entry.u.comp):
      Remove unused member discovered by using -Wswitch.
      * src/lisp.h (record_xmalloc): Add a ‘+ 0’ to pacify -Wswitch.
      * src/vm-limit.c (check_memory_limits):
      Simplify warning-diagnostic computation by using a table.
      8865587c
  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. 19 Aug, 2015 1 commit
    • Martin Rudalics's avatar
      Move window edge functions to Elisp. · f5a14da1
      Martin Rudalics authored
      * src/window.c (Fwindow_edges, Fwindow_pixel_edges)
      (Fwindow_absolute_pixel_edges, Fwindow_inside_edges)
      (Fwindow_inside_pixel_edges, Fwindow_inside_absolute_pixel_edges):
      Move to window.el.
      (calc_absolute_offset): Remove.
      * lisp/frame.el (frame-edges): New function.
      * lisp/window.el (window-edges, window-pixel-edges)
      (window-absolute-pixel-edges): Move here from window.c.
      (window-body-edges, window-body-pixel-edges)
      (window-absolute-body-pixel-edges): Move here from window.c and
      rename "inside" to "body".  Keep old names as aliases.
      (window-absolute-pixel-position): New function.
      f5a14da1
  20. 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
  21. 14 May, 2015 1 commit
  22. 14 Apr, 2015 2 commits
    • Paul Eggert's avatar
      Fix think-o in previous patch · 7744cc7e
      Paul Eggert authored
      * src/window.c (count_windows, get_leaf_windows):
      Don't optimize count_windows incorrectly.
      7744cc7e
    • Paul Eggert's avatar
      Avoid some int overflows in window.c · b80c5ebc
      Paul Eggert authored
      * src/print.c (print_object):
      * src/window.c (sequence_number):
      * src/window.h (struct window.sequence_number):
      Don't assume window sequence number fits in int.
      * src/window.c (window_select_count):
      * src/window.h (struct window.use_time, window_select_count):
      Don't assume window use time fits in int.
      * src/window.c (Fsplit_window_internal):
      Don't assume user-supplied integer, or sum, fits in int.
      (Fset_window_configuration, count_windows, get_leaf_windows)
      (save_window_save, Fcurrent_window_configuration):
      Use ptrdiff_t for object counts.
      (Fset_window_configuration): Omit unused local 'n'.
      (count_windows): Simplify by writing in terms of get_leaf_windows.
      (get_leaf_windows): Don't store through FLAT if it's null.
      (extract_dimension): New static function.
      (set_window_margins, set_window_fringes, set_window_scroll_bars):
      Use it to avoid undefined behavior when converting user-supplied
      integer to 'int'.
      b80c5ebc
  23. 12 Apr, 2015 1 commit
    • Paul Eggert's avatar
      Use bool for boolean in window.c · 30379713
      Paul Eggert authored
      * src/window.c:	Omit unnecessary static function decls.
      (adjust_window_count, select_window, Fselect_window)
      (window_body_width, Fwindow_body_height, Fwindow_body_width)
      (set_window_hscroll, check_window_containing, Fwindow_at)
      (Fwindow_end, Fset_window_start, Fpos_visible_in_window_p)
      (unshow_buffer, replace_window, recombine_windows)
      (add_window_to_list, candidate_window_p, next_window)
      (Fnext_window, Fprevious_window, window_loop, check_all_windows)
      (Fget_buffer_window, Fdelete_other_windows_internal)
      (replace_buffer_in_windows_safely, set_window_buffer)
      (Fset_window_buffer, Fforce_window_update)
      (temp_output_buffer_show, make_parent_window)
      (window_resize_check, window_resize_apply, Fwindow_resize_apply)
      (resize_frame_windows, Fsplit_window_internal)
      (Fdelete_window_internal, grow_mini_window, shrink_mini_window)
      (Fresize_mini_window_internal, mark_window_cursors_off)
      (window_scroll, window_scroll_pixel_based)
      (window_scroll_line_based, scroll_command, Fscroll_other_window)
      (Fscroll_left, Fscroll_right, displayed_window_lines, Frecenter)
      (Fmove_to_window_line, Fset_window_configuration)
      (delete_all_child_windows, apply_window_adjustment)
      (set_window_fringes, set_window_scroll_bars)
      (Fset_window_vscroll, foreach_window, foreach_window_1)
      (compare_window_configurations, Fcompare_window_configurations):
      Prefer 'bool', 'true', and 'false' for booleans.
      * src/window.h (WINDOW_MODE_LINE_LINES)
      (WINDOW_HEADER_LINE_LINES): Omit unnecessary "!!" on bool value.
      30379713
  24. 10 Apr, 2015 1 commit
  25. 09 Feb, 2015 1 commit
    • Eli Zaretskii's avatar
      Speed up vertical-motion when screen coordinates are known · 403cb178
      Eli Zaretskii authored
       src/indent.c (Fvertical_motion): Accept an additional argument
       CUR-COL and use it as the starting screen coordinate.
       src/window.c (window_scroll_line_based, Fmove_to_window_line): All
       callers of vertical-motion changed.
      
       doc/lispref/positions.texi (Screen Lines): Update the documentation of
       vertical-motion to document the new additional argument.
      403cb178
  26. 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
  27. 01 Feb, 2015 1 commit
  28. 25 Jan, 2015 1 commit
    • Paul Eggert's avatar
      Count MANY function args more reliably · a3689d3c
      Paul Eggert authored
      * alloc.c (Fgc_status, purecopy, unbind_to, garbage_collect_1):
      * buffer.c (Fbuffer_list, Fkill_buffer):
      * callint.c (read_file_name, Fcall_interactively):
      * charset.c (Fset_charset_priority, syms_of_charset):
      * chartab.c (uniprop_encode_value_numeric):
      * coding.c (syms_of_coding):
      * composite.c (syms_of_composite):
      * data.c (wrong_range):
      * dbusbind.c (syms_of_dbusbind):
      * dired.c (file_attributes):
      * editfns.c (Fdecode_time, update_buffer_properties, format2):
      * eval.c (run_hook_with_args_2, apply1, call1, call2, call3)
      (call4, call5, call6, call7):
      * fileio.c (Finsert_file_contents, choose_write_coding_system)
      (Fcar_less_than_car, build_annotations, auto_save_error):
      * filelock.c (get_boot_time):
      * fns.c (internal_equal, nconc2, Fyes_or_no_p, Fwidget_apply):
      (maybe_resize_hash_table, secure_hash):
      * font.c (font_style_to_value, font_open_by_name, Flist_fonts):
      * fontset.c (fontset_add, Fset_fontset_font):
      * ftfont.c (ftfont_lookup_cache):
      * gtkutil.c (xg_get_font):
      * insdel.c (signal_before_change, signal_after_change):
      * keymap.c (append_key):
      * lread.c (load_warn_old_style_backquotes, Fload, init_lread):
      * minibuf.c (Fread_buffer):
      * print.c (print_preprocess):
      * process.c (Fformat_network_address, Fmake_network_process)
      (server_accept_connection):
      * sound.c (Fplay_sound_internal):
      * term.c (Fsuspend_tty, Fresume_tty):
      * window.c (window_list):
      * xdisp.c (run_redisplay_end_trigger_hook, add_to_log)
      (message_with_string):
      * xfaces.c (Fx_list_fonts):
      * xfont.c (syms_of_xfont):
      * xselect.c (x_handle_selection_request)
      (x_handle_selection_clear, x_clear_frame_selections)
      (x_clipboard_manager_error_1):
      Prefer CALLMANY and CALLN to counting args by hand.
      * doc.c (reread_doc_file): Remove unused code.
      * fns.c (concat2, concat3): Redo to avoid need for local-var vector.
      (cmpfn_user_defined, hashfn_user_defined, Fmaphash):
      Prefer call1 and call2 to Ffuncall.
      * keyboard.c (safe_run_hook_funcall, safe_run_hooks):
      Use struct literal rather than a local var, for simplicity.
      * keymap.c (where_is_internal): Use NULL rather than a pointer
      to unused args.
      * lisp.h (CALLMANY, CALLN): New macros.
      * sound.c (Fplay_sound_internal): Coalesce duplicate code.
      Fixes: bug#19634
      a3689d3c
  29. 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
  30. 13 Jan, 2015 1 commit
    • 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
  31. 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
  32. 07 Jan, 2015 1 commit
  33. 05 Jan, 2015 1 commit
    • Paul Eggert's avatar
      Compute C decls for DEFSYMs automatically · 58f2d6ef
      Paul Eggert authored
      Fixes Bug#15880.
      This patch also makes Q constants (e.g., Qnil) constant addresses
      from the C point of view.
      * make-docfile.c: Revamp to generate table of symbols, too.
      Include <stdbool.h>.
      (xstrdup): New function.
      (main): Don't process the same file twice.
      (SYMBOL): New constant in enum global_type.
      (struct symbol): Turn 'value' member into a union, either v.value
      for int or v.svalue for string.  All uses changed.
      (add_global): New arg svalue, which overrides value, so that globals
      can have a string value.
      (close_emacs_global): New arg num_symbols; all uses changed.
      Output lispsym decl.
      (write_globals): Output symbol globals too.  Output more
      ATTRIBUTE_CONST, now that Qnil etc. are C constants.
      Output defsym_name table.
      (scan_c_file): Move most of guts into ...
      (scan_c_stream): ... new function.  Scan for DEFSYMs and
      record symbols found.  Don't read past EOF if file doesn't
      end in newline.
      * alloc.c, bidi.c, buffer.c, bytecode.c, callint.c, casefiddle:
      * casetab.c, category.c, ccl.c, charset.c, chartab.c, cmds.c, coding.c:
      * composite.c, data.c, dbusbind.c, decompress.c, dired.c, dispnew.c:
      * doc.c, editfns.c, emacs.c, eval.c, fileio.c, fns.c, font.c, fontset.c:
      * frame.c, fringe.c, ftfont.c, ftxfont.c, gfilenotify.c, gnutls.c:
      * image.c, inotify.c, insdel.c, keyboard.c, keymap.c, lread.c:
      * macfont.m, macros.c, minibuf.c, nsfns.m, nsfont.m, nsimage.m:
      * nsmenu.m, nsselect.m, nsterm.m, print.c, process.c, profiler.c:
      * search.c, sound.c, syntax.c, term.c, terminal.c, textprop.c, undo.c:
      * window.c, xdisp.c, xfaces.c, xfns.c, xftfont.c, xmenu.c, xml.c:
      * xselect.c, xsettings.c, xterm.c:
      Remove Q vars that represent symbols (e.g., Qnil, Qt, Qemacs).
      These names are now defined automatically by make-docfile.
      * alloc.c (init_symbol): New function.
      (Fmake_symbol): Use it.
      (c_symbol_p): New function.
      (valid_lisp_object_p, purecopy): Use it.
      * alloc.c (marked_pinned_symbols):
      Use make_lisp_symbol instead of make_lisp_ptr.
      (garbage_collect_1): Mark lispsym symbols.
      (CHECK_ALLOCATED_AND_LIVE_SYMBOL): New macro.
      (mark_object): Use it.
      (sweep_symbols): Sweep lispsym symbols.
      (symbol_uses_obj): New function.
      (which_symbols): Use it.  Work for lispsym symbols, too.
      (init_alloc_once): Initialize Vpurify_flag here; no need to wait,
      since Qt's address is already known now.
      (syms_of_alloc): Add lispsym count to symbols_consed.
      * buffer.c (init_buffer_once): Compare to Qnil, not to make_number (0),
      when testing whether storage is all bits zero.
      * dispextern (struct image_type):
      * font.c (font_property_table):
      * frame.c (struct frame_parm_table, frame_parms):
      * keyboard.c (scroll_bar_parts, struct event_head):
      * xdisp.c (struct props):
      Use XSYMBOL_INIT (Qfoo) and struct Lisp_Symbol * rather than &Qfoo and
      Lisp_Object *, since Qfoo is no longer an object whose address can be
      taken.  All uses changed.
      * eval.c (run_hook): New function.  Most uses of Frun_hooks changed to
      use it, so that they no longer need to take the address of a Lisp sym.
      (syms_of_eval): Don't use DEFSYM on Vrun_hooks, as it's a variable.
      * frame.c (syms_of_frame): Add defsyms for the frame_parms table.
      * keyboard.c (syms_of_keyboard): Don't DEFSYM Qmenu_bar here.
      DEFSYM Qdeactivate_mark before the corresponding var.
      * keymap.c (syms_of_keymap): Use DEFSYM for Qmenu_bar and Qmode_line
      instead of interning their symbols; this avoids duplicates.
      (LISP_INITIALLY, TAG_PTR)
      (DEFINE_LISP_SYMBOL_BEGIN, DEFINE_LISP_SYMBOL_END, XSYMBOL_INIT):
      New macros.
      (LISP_INITIALLY_ZERO): Use it.
      (enum symbol_interned, enum symbol_redirect, struct Lisp_Symbol)
      (EXFUN, DEFUN_ARGS_MANY, DEFUN_ARGS_UNEVALLED, DEFUN_ARGS_*):
      Move decls up, to avoid forward uses.  Include globals.h earlier, too.
      (make_lisp_symbol): New function.
      (XSETSYMBOL): Use it.
      (DEFSYM): Now just a placeholder for make-docfile.
      * lread.c (DEFINE_SYMBOLS): Define, for globals.h.
      (intern_sym): New function, with body taken from old intern_driver.
      (intern_driver): Use it.  Last arg is now Lisp integer, not ptrdiff_t.
      All uses changed.
      (define_symbol): New function.
      (init_obarray): Define the C symbols taken from lispsym.
      Use plain DEFSYM for Qt and Qnil.
      * syntax.c (init_syntax_once): No need to worry about
      Qchar_table_extra_slots.
      58f2d6ef