1. 08 Jun, 2016 1 commit
  2. 30 May, 2016 1 commit
    • Paul Eggert's avatar
      Omit IF_LINT code that no longer seems needed · 237244bb
      Paul Eggert authored
      Nowadays GCC is smarter, or the Emacs code has mutated, or both,
      and now is as good a time as any to remove uses of IF_LINT that
      now seem to be unnecessary.
      * lib-src/emacsclient.c (set_local_socket):
      * lib-src/movemail.c (main) [MAIL_USE_MAILLOCK && HAVE_TOUCHLOCK]:
      * src/buffer.c (fix_start_end_in_overlays, fix_overlays_before):
      * src/casefiddle.c (casify_region):
      * src/charset.c (load_charset_map):
      * src/coding.c (decode_coding_object, encode_coding_object):
      * src/data.c (Fmake_variable_buffer_local, Fmake_local_variable)
      (cons_to_unsigned, cons_to_signed):
      * src/frame.c (make_frame, x_set_frame_parameters):
      * src/keyboard.c (read_event_from_main_queue):
      * src/regex.c (regex_compile):
      * src/syntax.c (back_comment):
      * src/window.c (Frecenter):
      * src/xfaces.c (Fx_list_fonts):
      Remove IF_LINT that no longer seems necessary.
      * src/image.c (png_load_body, jpeg_load_body): Simplify use of IF_LINT.
      * src/keyboard.c (read_char): Use IF_LINT (volatile) rather than
      a pragma dance to pacify GCC -Wclobbered.
      * src/xdisp.c (x_produce_glyphs): Rewrite to avoid need for IF_LINT.
      
      * src/xterm.c (x_connection_closed): Now _Noreturn, which should
      mean we do not need IF_LINT any more.
      (x_io_error_quitter): Now _Noreturn.  Put an 'assume (false)’
      at the end, to forestall warnings from older compilers.
      237244bb
  3. 01 May, 2016 2 commits
  4. 30 Apr, 2016 2 commits
    • Paul Eggert's avatar
      Fix generate-new-buffer-name increment typo · 4b488a29
      Paul Eggert authored
      Problem reported by Chaitanya Koparkar (Bug#23394).
      * src/buffer.c (Fgenerate_new_buffer_name): Increment count when
      generating a new buffer.  This fixes a typo I introduced in
      2014-04-05T00:04:58Z!eggert@cs.ucla.edu.
      4b488a29
    • Lars Ingebrigtsen's avatar
      cursor-type doc fix · 77c5f455
      Lars Ingebrigtsen authored
      * src/buffer.c (syms_of_buffer): Mention that cursor-type's
      WIDHT/HEIGHT can't exceed the frame char size (bug#19215).
      77c5f455
  5. 05 Apr, 2016 1 commit
    • Paul Eggert's avatar
      Prefer AUTO_STRING_WITH_LEN to make_formatted_string · b4c7869e
      Paul Eggert authored
      * src/buffer.c (Fgenerate_new_buffer_name):
      * src/filelock.c (get_boot_time):
      * src/minibuf.c (get_minibuffer):
      * src/process.c (make_process):
      * src/xdisp.c (ensure_echo_area_buffers):
      Prefer AUTO_STRING_WITH_LEN + sprintf to make_formatted_string
      when either will do.
      b4c7869e
  6. 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
  7. 01 Feb, 2016 1 commit
    • Martin Rudalics's avatar
      Some corrections in Elisp manual · e639e10a
      Martin Rudalics authored
      * doc/lispref/buffers.texi (Read Only Buffers): Describe optional
      argument POSITION.
      * doc/lispref/debugging.texi (Error Debugging): `debug-on-signal'
      is an option.
      * doc/lispref/display.texi (Refresh Screen): Describe optional
      argument FRAME of `redraw-frame'.
      (Attribute Functions): Describe optional argument CHARACTER of
      `face-font'.
      (Defining Images): `image-load-path' is an option.
      (Beeping): `ring-bell-function' is an option.
      * doc/lispref/frames.texi (Size and Position): The PIXELWISE
      argument of `set-frame-size' is optional.
      (Raising and Lowering): The TERMINAL argument of `tty-top-frame'
      is optional.
      * doc/lispref/keymaps.texi (Controlling Active Maps): Fix doc of
      `set-transient-map'.
      * doc/lispref/minibuf.texi (Text from Minibuffer):
      `read-regexp-defaults-function' is an option.
      (Minibuffer Contents): `delete-minibuffer-contents' is a command.
      * doc/lispref/modes.texi (Mode Line Variables):
      `mode-line-position' and `mode-line-modes' are variables, not
      options.
      * doc/lispref/strings.texi (Creating Strings): The START argument
      of `substring' is optional.
      * doc/lispref/text.texi (Buffer Contents): Describe optional
      argument NO-PROPERTIES of `thing-at-point'.
      (User-Level Deletion): Both arguments of
      `delete-trailing-whitespace' are optional.
      (Margins): Use @key{RET} instead of @kbd{RET}.
      * doc/lispref/windows.texi (Display Action Functions): Write
      non-@code{nil} instead of non-nil.
      (Choosing Window Options): The WINDOW arg of
      `split-window-sensibly' is optional.
      (Choosing Window Options): Write non-@code{nil} instead of
      non-nil.
      (Window Start and End): Both args of `window-group-end' are
      optional.
      
      * src/buffer.c (Fbarf_if_buffer_read_only): Rename argument POS
      to POSITION to keep consisteny with doc-string.
      e639e10a
  8. 30 Jan, 2016 1 commit
    • Paul Eggert's avatar
      Pacify --enable-gcc-warnings when HYBRID_MALLOC · e1a9f209
      Paul Eggert authored
      * src/buffer.c (init_buffer):
      * src/emacs.c (main):
      * src/xsmfns.c (smc_save_yourself_CB, x_session_initialize):
      Use emacs_get_current_dir_name, not get_current_dir_name.
      * src/conf_post.h (aligned_alloc) [HYBRID_MALLOC && emacs]: New macro.
      (HYBRID_GET_CURRENT_DIR_NAME, get_current_dir_name): Remove.
      * src/emacs.c: Include "sheap.h".
      (report_sheap_usage): Remove decl.
      (Fdump_emacs) [HYBRID_MALLOC]: Report usage directly.
      Don't assume ptrdiff_t can be printed as int.
      * src/gmalloc.c [HYBRID_MALLOC]:
      Include "sheap.h" rather than declaring its contents by hand.
      (get_current_dir_name, gget_current_dir_name)
      (hybrid_get_current_dir_name): Remove.
      (emacs_abort): Remove duplicate decl.
      (aligned_alloc): Undef, like malloc etc.
      (ALLOCATED_BEFORE_DUMPING): Now a static function, not a macro.
      Make it a bit more efficient.
      (malloc_find_object_address): Remove unused decl.
      (enum mcheck_status, mcheck, mprobe, mtrace, muntrace, struct mstats)
      (mstats, memory_warnings): Declare only if GC_MCHECK.
      * src/lisp.h (emacs_get_current_dir_name):
      New decl, replacing get_current_dir_name.
      * src/sheap.c: Include sheap.h first.
      (STATIC_HEAP_SIZE): Remove; now in sheap.h.
      (debug_sheap): Now static.
      (bss_sbrk_buffer_end): Remove; no longer used.
      (bss_sbrk_ptr): Now static and private.
      (bss_sbrk_did_unexec): Now bool.
      (BLOCKSIZE): Remove, to avoid GCC warning about its not being used.
      (bss_sbrk): Don't treat request_size 0 as special, since the code
      works without this being a special case.
      Avoid overflow if request size exceeds INT_MAX.
      (report_sheap_usage): Remove; now done in emacs.c.
      * src/sheap.h: New file.
      * src/sysdep.c (get_current_dir_name): Remove macro.
      Include "sheap.h".
      (emacs_get_current_dir_name): Rename function from
      get_current_dir_name.  Handle HYBRID_MALLOC here;
      this is simpler.
      (Bug#22086)
      e1a9f209
  9. 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
  10. 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
  11. 13 Jan, 2016 2 commits
  12. 05 Jan, 2016 3 commits
  13. 04 Jan, 2016 1 commit
  14. 01 Jan, 2016 1 commit
  15. 09 Nov, 2015 1 commit
    • Paul Eggert's avatar
      Use INT_ADD_WRAPV etc. to check integer overflow · 10873055
      Paul Eggert authored
      * src/alloc.c (xnmalloc, xnrealloc, xpalloc, Fmake_string):
      * src/buffer.c (record_overlay_string, overlay_strings):
      * src/casefiddle.c (casify_object):
      * src/ccl.c (Fccl_execute_on_string):
      * src/character.c (char_width, c_string_width, lisp_string_width)
      (count_size_as_multibyte, string_escape_byte8):
      * src/coding.c (coding_alloc_by_realloc, produce_chars):
      * src/data.c (arith_driver):
      * src/dispnew.c (realloc_glyph_pool, init_display):
      * src/editfns.c (styled_format):
      * src/fns.c (Ffillarray):
      * src/ftfont.c (ftfont_shape_by_flt):
      * src/gnutls.c (gnutls_hex_string):
      * src/gtkutil.c (get_utf8_string):
      * src/image.c (x_to_xcolors, x_detect_edges, png_load_body):
      * src/keymap.c (Fkey_description):
      * src/lisp.h (SAFE_ALLOCA_LISP):
      * src/term.c (encode_terminal_code):
      * src/tparam.c (tparam1):
      * src/xselect.c (x_property_data_to_lisp):
      * src/xsmfns.c (smc_save_yourself_CB):
      * src/xterm.c (x_term_init):
      When checking for integer overflow, prefer INT_MULTIPLY_WRAPV to
      more-complicated code involving division and/or
      INT_MULTIPLY_OVERFLOW, and similarly for INT_ADD_WRAPV and
      subtraction and/or INT_ADD_OVERFLOW.
      * src/casefiddle.c (casify_object): Simplify multibyte size check.
      * src/character.c: Remove some obsolete ‘#ifdef emacs’s.
      * src/data.c (arith_driver): Also check for division overflow,
      as that’s now possible given that the accumulator can now contain
      any Emacs integer.
      * src/lisp.h (lisp_word_count): Remove; no longer used.
      10873055
  16. 06 Nov, 2015 1 commit
    • Eli Zaretskii's avatar
      Don't invoke overlay modification hooks in wrong buffer · 564d8117
      Eli Zaretskii authored
      * src/buffer.c (report_overlay_modification): When called with
      AFTER non-zero, don't invoke overlay modification hooks if the
      buffer recorded in last_overlay_modification_hooks is different
      from the current buffer.  (Bug#21824)
      564d8117
  17. 29 Oct, 2015 1 commit
  18. 24 Oct, 2015 2 commits
    • 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
    • Eli Zaretskii's avatar
      A better fix for bug#21739 · bc0b340d
      Eli Zaretskii authored
      * src/buffer.c (set_update_modelines_for_buf): New function.
      (Fkill_buffer): Use it to set the global variable
      update_mode_lines if the killed buffer was displayed in some
      window.  Don't set windows_or_buffers_changed.  This is a better
      fix for bug#21739 than the previous fix, since it will cause only
      redisplay of mode lines, not of entire windows, but will still
      catch attention of x_consider_frame_title in xdisp.c, which
      redraws the frame title.
      bc0b340d
  19. 23 Oct, 2015 1 commit
  20. 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
  21. 05 Oct, 2015 1 commit
  22. 16 Sep, 2015 1 commit
    • 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
  23. 01 Sep, 2015 1 commit
  24. 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
  25. 21 Aug, 2015 1 commit
    • Paul Eggert's avatar
      Don't quote symbols 'like-this' in docstrings etc. · 760701eb
      Paul Eggert authored
      * admin/unidata/uvs.el (uvs-insert-fields-as-bytes):
      * lisp/allout-widgets.el (allout-widgets-count-buttons-in-region):
      * lisp/allout.el (allout-add-resumptions, allout-mode):
      * lisp/calculator.el (calculator-operators):
      * lisp/cedet/data-debug.el (dd-propertize):
      * lisp/cedet/ede/proj-prog.el (ede-proj-target-makefile-program):
      * lisp/cedet/semantic/analyze/debug.el:
      (semantic-analyzer-debug-global-miss-text):
      * lisp/cedet/semantic/lex-spp.el:
      (semantic-lex-spp-replace-or-symbol-or-keyword):
      * lisp/cedet/semantic/symref.el:
      (semantic-symref-cleanup-recent-buffers-fcn):
      * lisp/cedet/semantic/tag.el (semantic-tag-class):
      * lisp/cedet/srecode/el.el (srecode-semantic-handle-:el-custom):
      * lisp/gnus/nnmairix.el (nnmairix-propagate-marks-upon-close):
      * lisp/gnus/pop3.el (pop3-authentication-scheme):
      * lisp/help-fns.el (describe-function-orig-buffer):
      * lisp/imenu.el (imenu--history-list):
      * lisp/mail/feedmail.el (feedmail-confirm-outgoing)
      (feedmail-display-full-frame, feedmail-deduce-bcc-where)
      (feedmail-queue-default-file-slug)
      (feedmail-queue-buffer-file-name):
      * lisp/net/mairix.el (mairix-searches-mode-map):
      * lisp/net/newst-backend.el (newsticker-retrieval-method)
      (newsticker-auto-mark-filter-list):
      * lisp/obsolete/vi.el (vi-mode):
      * lisp/progmodes/cc-engine.el (c-literal-type):
      * lisp/progmodes/cpp.el (cpp-face):
      * lisp/progmodes/ebrowse.el (ebrowse-electric-list-looper):
      * lisp/progmodes/elisp-mode.el (elisp--xref-make-xref):
      * lisp/progmodes/pascal.el (pascal-auto-lineup):
      * lisp/progmodes/prog-mode.el (prog-widen):
      * lisp/progmodes/verilog-mode.el (verilog-regexp-words)
      (verilog-auto-lineup, verilog-auto-reset-widths)
      (verilog-auto-arg-format, verilog-auto-inst-template-numbers):
      * lisp/textmodes/flyspell.el (flyspell-maybe-correct-transposition)
      (flyspell-maybe-correct-doubling):
      * lisp/textmodes/table.el (table-justify, table-justify-cell)
      (table-justify-row, table-justify-column, table-insert-sequence)
      (table--justify-cell-contents):
      * lisp/url/url-auth.el (url-get-authentication):
      * lisp/window.el (display-buffer-record-window):
      * lisp/xml.el (xml-parse-file, xml-parse-region):
      * src/gfilenotify.c (Fgfile_add_watch):
      Don't quote symbols with apostrophes in doc strings.
      Use asymmetric quotes instead.
      * lisp/cedet/semantic/complete.el (semantic-displayor-show-request):
      Likewise for symbol in diagnostic.
      * lisp/image.el (image-extension-data):
      * lisp/register.el (frame-configuration-to-register):
      * src/buffer.c (syms_of_buffer):
      Remove bogus apostrophes after symbols.
      * lisp/thumbs.el (thumbs-conversion-program):
      Quote Lisp string values using double-quotes, not apostrophes.
      760701eb
  26. 30 Jun, 2015 1 commit
    • Paul Eggert's avatar
      In strings, prefer plain ` and ' to \` and \' · 3213d770
      Paul Eggert authored
      * lisp/allout.el (allout-insert-listified):
      * lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
      * lisp/ls-lisp.el (ls-lisp-UCA-like-collation)
      (ls-lisp-string-lessp):
      * lisp/menu-bar.el (menu-bar-open):
      * lisp/obsolete/otodo-mode.el (todo-top-priorities):
      * lisp/progmodes/compile.el (compile):
      * lisp/progmodes/etags.el (tags-loop-scan):
      * lisp/progmodes/make-mode.el (makefile-browser-insert-continuation):
      * lisp/subr.el (posn-actual-col-row):
      * lisp/term/pc-win.el (x-list-fonts):
      * lisp/textmodes/texinfmt.el (texinfmt-version):
      * lisp/textmodes/texnfo-upd.el (texinfo-master-menu):
      * lisp/time.el (display-time-world-list):
      * lisp/tmm.el (tmm-menubar):
      * src/buffer.c (syms_of_buffer):
      * src/fileio.c (syms_of_fileio):
      Omit unnecessary and confusing backslash before quote.
      * lisp/erc/erc.el (erc-cmd-LASTLOG):
      * lisp/progmodes/flymake.el (flymake-fix-file-name):
      * lisp/progmodes/vhdl-mode.el (vhdl-in-extended-identifier-p):
      Fix string that was intended to escape a backslash and not a quote.
      3213d770
  27. 12 Jun, 2015 2 commits
  28. 01 Jun, 2015 1 commit
    • Paul Eggert's avatar
      Avoid grave accent quoting in stderr diagnostics · 2c656f7d
      Paul Eggert authored
      A few Emacs diagnostics go directly to stderr, and so can't easily
      contain curved quotes (as non-UTF-8 locales might mishandle them).
      Instead of bothering to add support for this rarity, reword the
      diagnostics so that they don't use grave accent to quote.
      * src/alloc.c (mark_memory): Fix comment.
      * src/buffer.c (init_buffer):
      * src/dispnew.c (init_display):
      * src/emacs.c (main, sort_args):
      * src/lread.c (dir_warning):
      * src/term.c (init_tty):
      * src/unexmacosx.c (unexec):
      * src/xfns.c (select_visual):
      * src/xterm.c (cvt_string_to_pixel, x_io_error_quitter):
      Reword stderr diagnostics to avoid quoting `like this'.
      * src/unexmacosx.c: Include errno.h.
      * src/xfns.c (select_visual): Encode value for locale.
      2c656f7d
  29. 30 May, 2015 1 commit
    • Paul Eggert's avatar
      Remove format2 · d90a3b18
      Paul Eggert authored
      * src/editfns.c, src/lisp.h (format2): Remove.
      It is more trouble than it's worth, now that we have CALLN.
      This is just a minor refactoring.
      * src/buffer.c (Fkill_buffer):
      * src/dbusbind.c (XD_OBJECT_TO_STRING):
      * src/fileio.c (barf_or_query_if_file_exists):
      Adjust to format2 going away.
      d90a3b18
  30. 21 May, 2015 1 commit
  31. 20 May, 2015 1 commit
  32. 29 Apr, 2015 1 commit
  33. 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