1. 22 Mar, 2016 1 commit
    • Eli Zaretskii's avatar
      Fix problems caused by new implementation of sub-word mode · 7dba1767
      Eli Zaretskii authored
      * lisp/subr.el (forward-word-strictly, backward-word-strictly):
      New functions.
      (word-move-empty-char-table): New variable.
      
      * etc/NEWS: Mention 'forward-word-strictly' and
      'backward-word-strictly'.
      
      * doc/lispref/positions.texi (Word Motion): Document
      'find-word-boundary-function-table', 'forward-word-strictly', and
      'backward-word-strictly'.  (Bug#22560)
      
      * src/syntax.c (syms_of_syntax)
      <find-word-boundary-function-table>: Doc fix.
      
      * lisp/wdired.el (wdired-xcase-word):
      * lisp/textmodes/texnfo-upd.el (texinfo-copy-node-name)
      (texinfo-copy-section-title, texinfo-start-menu-description)
      (texinfo-copy-menu-title, texinfo-specific-section-type)
      (texinfo-insert-node-lines, texinfo-copy-next-section-title):
      * lisp/textmodes/texinfo.el (texinfo-clone-environment)
      (texinfo-insert-@end):
      * lisp/textmodes/texinfmt.el (texinfo-format-scan)
      (texinfo-anchor, texinfo-multitable-widths)
      (texinfo-multitable-item):
      * lisp/textmodes/tex-mode.el (latex-env-before-change):
      * lisp/textmodes/flyspell.el (texinfo-mode-flyspell-verify):
      * lisp/skeleton.el (skeleton-insert):
      * lisp/simple.el (count-words):
      * lisp/progmodes/vhdl-mode.el (vhdl-beginning-of-libunit)
      (vhdl-beginning-of-defun, vhdl-beginning-of-statement-1)
      (vhdl-update-sensitivity-list, vhdl-template-block)
      (vhdl-template-break, vhdl-template-case, vhdl-template-default)
      (vhdl-template-default-indent, vhdl-template-for-loop)
      (vhdl-template-if-then-use, vhdl-template-bare-loop)
      (vhdl-template-nature, vhdl-template-procedural)
      (vhdl-template-process, vhdl-template-selected-signal-asst)
      (vhdl-template-type, vhdl-template-variable)
      (vhdl-template-while-loop, vhdl-beginning-of-block)
      (vhdl-hooked-abbrev, vhdl-port-copy, vhdl-hs-forward-sexp-func):
      * lisp/progmodes/verilog-mode.el (verilog-backward-sexp)
      (verilog-forward-sexp, verilog-beg-of-statement)
      (verilog-set-auto-endcomments, verilog-backward-token)
      (verilog-do-indent):
      * lisp/progmodes/vera-mode.el (vera-guess-basic-syntax)
      (vera-indent-block-closing):
      * lisp/progmodes/simula.el (simula-context)
      (simula-backward-up-level, simula-forward-down-level)
      (simula-previous-statement, simula-next-statement)
      (simula-skip-comment-backward, simula-calculate-indent)
      (simula-find-if, simula-electric-keyword):
      * lisp/progmodes/sh-script.el (sh-smie--rc-newline-semi-p):
      * lisp/progmodes/ruby-mode.el (ruby-smie--redundant-do-p)
      (ruby-smie--forward-token, ruby-smie--backward-token)
      (ruby-singleton-class-p, ruby-calculate-indent)
      (ruby-forward-sexp, ruby-backward-sexp):
      * lisp/progmodes/ps-mode.el (ps-run-goto-error):
      * lisp/progmodes/perl-mode.el (perl-syntax-propertize-function)
      (perl-syntax-propertize-special-constructs)
      (perl-backward-to-start-of-continued-exp):
      * lisp/progmodes/pascal.el (pascal-indent-declaration):
      * lisp/progmodes/octave.el (octave-function-file-p):
      * lisp/progmodes/mantemp.el (mantemp-insert-cxx-syntax):
      * lisp/progmodes/js.el (js--forward-function-decl):
      * lisp/progmodes/idlwave.el (idlwave-show-begin-check)
      (idlwave-beginning-of-block, idlwave-end-of-block)
      (idlwave-block-jump-out, idlwave-determine-class):
      * lisp/progmodes/icon.el (icon-is-continuation-line)
      (icon-backward-to-start-of-continued-exp, end-of-icon-defun):
      * lisp/progmodes/hideif.el (hide-ifdef-define):
      * lisp/progmodes/f90.el (f90-change-keywords):
      * lisp/progmodes/cperl-mode.el (cperl-electric-pod)
      (cperl-linefeed, cperl-electric-terminator)
      (cperl-find-pods-heres, cperl-fix-line-spacing)
      (cperl-invert-if-unless):
      * lisp/progmodes/cc-engine.el (c-forward-<>-arglist-recur):
      * lisp/progmodes/cc-align.el (c-lineup-java-inher):
      * lisp/progmodes/ada-mode.el (ada-compile-goto-error)
      (ada-adjust-case-skeleton, ada-create-case-exception)
      (ada-create-case-exception-substring)
      (ada-case-read-exceptions-from-file, ada-after-keyword-p)
      (ada-scan-paramlist, ada-get-current-indent, ada-get-indent-end)
      (ada-get-indent-if, ada-get-indent-block-start)
      (ada-get-indent-loop, ada-get-indent-type)
      (ada-search-prev-end-stmt, ada-check-defun-name)
      (ada-goto-decl-start, ada-goto-matching-start)
      (ada-goto-matching-end, ada-looking-at-semi-or)
      (ada-looking-at-semi-private, ada-in-paramlist-p)
      (ada-search-ignore-complex-boolean, ada-move-to-start)
      (ada-move-to-end, ada-which-function, ada-gen-treat-proc):
      * lisp/net/quickurl.el (quickurl-grab-url):
      * lisp/mail/sendmail.el (mail-do-fcc):
      * lisp/mail/rmail.el (rmail-resend):
      * lisp/mail/mailabbrev.el (mail-abbrev-complete-alias):
      * lisp/mail/mail-extr.el (mail-extract-address-components):
      * lisp/json.el (json-read-keyword):
      * lisp/files.el (insert-directory):
      * lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine):
      * lisp/completion.el (symbol-under-point, symbol-before-point)
      (symbol-before-point-for-complete, next-cdabbrev)
      (add-completions-from-c-buffer):
      * lisp/cedet/semantic/texi.el (semantic-up-context)
      (semantic-beginning-of-context):
      * lisp/cedet/semantic/bovine/el.el (semantic-get-local-variables):
      use 'forward-word-strictly' and 'backward-word-strictly' instead
      of 'forward-word' and 'backward-word'.
      
      [This reapplies commit c1d32a65,
      which was inadvertently lost by merge commit
      c71e7cc1.]
      7dba1767
  2. 20 Mar, 2016 1 commit
    • Alan Mackenzie's avatar
      Amend parse-partial-sexp correctly to handle two character comment delimiters · 9dcf5998
      Alan Mackenzie authored
      Do this by adding a new field to the parser state: the syntax of the last
      character scanned, should that be the first char of a (potential) two char
      construct, nil otherwise.
      This should make the parser state complete.
      Also document element 9 of the parser state.  Also refactor the code a bit.
      
      * src/syntax.c (struct lisp_parse_state): Add a new field.
      (SYNTAX_FLAGS_COMSTARTEND_FIRST): New function.
      (internalize_parse_state): New function, extracted from scan_sexps_forward.
      (back_comment): Call internalize_parse_state.
      (forw_comment): Return the syntax of the last character scanned to the caller
      when that character might be the first of a two character construct.
      (Fforward_comment, scan_lists): New dummy variables, passed to forw_comment.
      (scan_sexps_forward): Remove a redundant state parameter.  Access all `state'
      information via the address parameter `state'.  Remove the code which converts
      from external to internal form of `state'.  Access buffer contents only from
      `from' onwards.  Reformulate code at the top of the main loop correctly to
      recognize comment openers when starting in the middle of one.  Call
      forw_comment with extra argument (for return of syntax value of possible first
      char of a two char construct).
      (Fparse_partial_sexp): Document elements 9, 10 of the parser state in the
      doc string.  Clarify the doc string in general.  Call
      internalize_parse_state.  Take account of the new elements when consing up the
      output parser state.
      
      * doc/lispref/syntax.texi: (Parser State): Document element 9 and the new
      element 10.  Minor wording corrections (remove reference to "trivial
      cases").
      (Low Level Parsing): Minor corrections.
      
      * etc/NEWS: Note new element 10, and documentation of element 9 of parser
      state.
      9dcf5998
  3. 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
  4. 01 Mar, 2016 1 commit
  5. 26 Feb, 2016 1 commit
  6. 10 Feb, 2016 1 commit
    • Eli Zaretskii's avatar
      Improve doc strings of 'forward/backward-word-strictly' · 4ef153b5
      Eli Zaretskii authored
      * lisp/simple.el (backward-word): Refer to 'backward-word-strictly'
      in the doc string.  Suggested by Glenn Morris <rgm@gnu.org>.
      * lisp/subr.el (forward-word-strictly, backward-word-strictly):
      Mention 'subword-mode' in the doc strings.
      
      * src/syntax.c (Fforward_word): Refer to 'forward-word-strictly'
      in the doc string.  (Bug#22560)
      4ef153b5
  7. 05 Feb, 2016 1 commit
    • Eli Zaretskii's avatar
      Fix problems caused by new implementation of sub-word mode · c1d32a65
      Eli Zaretskii authored
      * lisp/subr.el (forward-word-strictly, backward-word-strictly):
      New functions.
      (word-move-empty-char-table): New variable.
      
      * etc/NEWS: Mention 'forward-word-strictly' and
      'backward-word-strictly'.
      
      * doc/lispref/positions.texi (Word Motion): Document
      'find-word-boundary-function-table', 'forward-word-strictly', and
      'backward-word-strictly'.  (Bug#22560)
      
      * src/syntax.c (syms_of_syntax)
      <find-word-boundary-function-table>: Doc fix.
      
      * lisp/wdired.el (wdired-xcase-word):
      * lisp/textmodes/texnfo-upd.el (texinfo-copy-node-name)
      (texinfo-copy-section-title, texinfo-start-menu-description)
      (texinfo-copy-menu-title, texinfo-specific-section-type)
      (texinfo-insert-node-lines, texinfo-copy-next-section-title):
      * lisp/textmodes/texinfo.el (texinfo-clone-environment)
      (texinfo-insert-@end):
      * lisp/textmodes/texinfmt.el (texinfo-format-scan)
      (texinfo-anchor, texinfo-multitable-widths)
      (texinfo-multitable-item):
      * lisp/textmodes/tex-mode.el (latex-env-before-change):
      * lisp/textmodes/flyspell.el (texinfo-mode-flyspell-verify):
      * lisp/skeleton.el (skeleton-insert):
      * lisp/simple.el (count-words):
      * lisp/progmodes/vhdl-mode.el (vhdl-beginning-of-libunit)
      (vhdl-beginning-of-defun, vhdl-beginning-of-statement-1)
      (vhdl-update-sensitivity-list, vhdl-template-block)
      (vhdl-template-break, vhdl-template-case, vhdl-template-default)
      (vhdl-template-default-indent, vhdl-template-for-loop)
      (vhdl-template-if-then-use, vhdl-template-bare-loop)
      (vhdl-template-nature, vhdl-template-procedural)
      (vhdl-template-process, vhdl-template-selected-signal-asst)
      (vhdl-template-type, vhdl-template-variable)
      (vhdl-template-while-loop, vhdl-beginning-of-block)
      (vhdl-hooked-abbrev, vhdl-port-copy, vhdl-hs-forward-sexp-func):
      * lisp/progmodes/verilog-mode.el (verilog-backward-sexp)
      (verilog-forward-sexp, verilog-beg-of-statement)
      (verilog-set-auto-endcomments, verilog-backward-token)
      (verilog-do-indent):
      * lisp/progmodes/vera-mode.el (vera-guess-basic-syntax)
      (vera-indent-block-closing):
      * lisp/progmodes/simula.el (simula-context)
      (simula-backward-up-level, simula-forward-down-level)
      (simula-previous-statement, simula-next-statement)
      (simula-skip-comment-backward, simula-calculate-indent)
      (simula-find-if, simula-electric-keyword):
      * lisp/progmodes/sh-script.el (sh-smie--rc-newline-semi-p):
      * lisp/progmodes/ruby-mode.el (ruby-smie--redundant-do-p)
      (ruby-smie--forward-token, ruby-smie--backward-token)
      (ruby-singleton-class-p, ruby-calculate-indent)
      (ruby-forward-sexp, ruby-backward-sexp):
      * lisp/progmodes/ps-mode.el (ps-run-goto-error):
      * lisp/progmodes/perl-mode.el (perl-syntax-propertize-function)
      (perl-syntax-propertize-special-constructs)
      (perl-backward-to-start-of-continued-exp):
      * lisp/progmodes/pascal.el (pascal-indent-declaration):
      * lisp/progmodes/octave.el (octave-function-file-p):
      * lisp/progmodes/mantemp.el (mantemp-insert-cxx-syntax):
      * lisp/progmodes/js.el (js--forward-function-decl):
      * lisp/progmodes/idlwave.el (idlwave-show-begin-check)
      (idlwave-beginning-of-block, idlwave-end-of-block)
      (idlwave-block-jump-out, idlwave-determine-class):
      * lisp/progmodes/icon.el (icon-is-continuation-line)
      (icon-backward-to-start-of-continued-exp, end-of-icon-defun):
      * lisp/progmodes/hideif.el (hide-ifdef-define):
      * lisp/progmodes/f90.el (f90-change-keywords):
      * lisp/progmodes/cperl-mode.el (cperl-electric-pod)
      (cperl-linefeed, cperl-electric-terminator)
      (cperl-find-pods-heres, cperl-fix-line-spacing)
      (cperl-invert-if-unless):
      * lisp/progmodes/cc-engine.el (c-forward-<>-arglist-recur):
      * lisp/progmodes/cc-align.el (c-lineup-java-inher):
      * lisp/progmodes/ada-mode.el (ada-compile-goto-error)
      (ada-adjust-case-skeleton, ada-create-case-exception)
      (ada-create-case-exception-substring)
      (ada-case-read-exceptions-from-file, ada-after-keyword-p)
      (ada-scan-paramlist, ada-get-current-indent, ada-get-indent-end)
      (ada-get-indent-if, ada-get-indent-block-start)
      (ada-get-indent-loop, ada-get-indent-type)
      (ada-search-prev-end-stmt, ada-check-defun-name)
      (ada-goto-decl-start, ada-goto-matching-start)
      (ada-goto-matching-end, ada-looking-at-semi-or)
      (ada-looking-at-semi-private, ada-in-paramlist-p)
      (ada-search-ignore-complex-boolean, ada-move-to-start)
      (ada-move-to-end, ada-which-function, ada-gen-treat-proc):
      * lisp/net/quickurl.el (quickurl-grab-url):
      * lisp/mail/sendmail.el (mail-do-fcc):
      * lisp/mail/rmail.el (rmail-resend):
      * lisp/mail/mailabbrev.el (mail-abbrev-complete-alias):
      * lisp/mail/mail-extr.el (mail-extract-address-components):
      * lisp/json.el (json-read-keyword):
      * lisp/files.el (insert-directory):
      * lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine):
      * lisp/completion.el (symbol-under-point, symbol-before-point)
      (symbol-before-point-for-complete, next-cdabbrev)
      (add-completions-from-c-buffer):
      * lisp/cedet/semantic/texi.el (semantic-up-context)
      (semantic-beginning-of-context):
      * lisp/cedet/semantic/bovine/el.el (semantic-get-local-variables):
      use 'forward-word-strictly' and 'backward-word-strictly' instead
      of 'forward-word' and 'backward-word'.
      c1d32a65
  8. 01 Jan, 2016 1 commit
  9. 28 Dec, 2015 1 commit
    • Alan Mackenzie's avatar
      Allow line comments ending with escaped NL to be continued to the next line. · 326ffcce
      Alan Mackenzie authored
      Use this in C, C++, and Objective C Modes.  Fixes bug#22246
      
      * src/syntax.c (comment-end-can-be-escaped): New buffer local variable.
      (forw-comment, back-comment): On encountering an end of comment character,
      test whether it is escaped when `comment-end-can-be-escaped' is non-nil.
      
      * doc/lispref/syntax.texi (Control Parsing): Describe
      `comment-end-can-be-escaped'.
      
      * etc/NEWS (Lisp Changes): Describe `comment-end-can-be-escaped'.
      
      * lisp/progmodes/cc-langs.el: New c-lang-setvar `comment-end-can-be-escaped'.
      326ffcce
  10. 21 Nov, 2015 1 commit
  11. 16 Nov, 2015 1 commit
    • Paul Eggert's avatar
      Improve fix for regex reentrancy abort · 8ff888a0
      Paul Eggert authored
      Suggested by Stefan Monnier (Bug#21688).
      * src/syntax.c (update_syntax_table_forward):
      Remove recently-added PROPERTIZE arg, and assume it is true.
      All callers changed.
      * src/syntax.h (UPDATE_SYNTAX_TABLE_FORWARD_FAST):
      Invoke update_syntax_table directly.
      8ff888a0
  12. 15 Nov, 2015 1 commit
    • Paul Eggert's avatar
      Fix regex abort when it tries to reenter itself · 8121757b
      Paul Eggert authored
      Problem reported by Ken Raeburn.
      Solution suggested by Stefan Monnier (Bug#21688).
      * src/regex.c (re_match_2_internal):
      Use new _FAST functions to avoid regex code reentering itself.
      * src/syntax.c (update_syntax_table_forward): New arg PROPERTIZE.
      All callers changed.
      * src/syntax.h (UPDATE_SYNTAX_TABLE_FORWARD_FAST)
      (UPDATE_SYNTAX_TABLE_FAST): New inline functions.
      8121757b
  13. 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
  14. 08 Oct, 2015 1 commit
  15. 24 Sep, 2015 1 commit
    • Stefan Monnier's avatar
      Fix recent bootstrap problems · 8f88db14
      Stefan Monnier authored
      * src/syntax.c (parse_sexp_propertize): Fix last fix.
      * lisp/nxml/nxml-mode.el (nxml-comment-quote-nested): Fix paren typo.
      * lisp/emacs-lisp/lisp-mode.el: Require cl-lib for cl-progv.
      8f88db14
  16. 23 Sep, 2015 1 commit
  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. 12 Sep, 2015 1 commit
    • Stefan Monnier's avatar
      Merge syntax-propertize--done and parse-sexp-propertize-done · 3928ef2d
      Stefan Monnier authored
      * lisp/emacs-lisp/syntax.el (syntax-propertize--done): Remove.
      (syntax-propertize): Set syntax-propertize--done even if
      syntax-propertize-function is nil.  Avoid recursive invocations.
      (syntax-propertize-chunks): New var.
      (internal--syntax-propertize): Use it.  Rename from syntax--jit-propertize.
      Simplify.
      (parse-sexp-propertize-function): Don't set any more.
      
      * src/syntax.c (SETUP_SYNTAX_TABLE): Call parse_sexp_propertize as needed.
      (parse_sexp_propertize): Don't assume charpos is not yet propertized.
      Call Qinternal__syntax_propertize instead of
      Vparse_sexp_propertize_function.  Truncate e_property if needed.
      (update_syntax_table_forward): Streamline.
      (syms_of_syntax): Define Qinternal__syntax_propertize.
      (syntax_propertize__done): Rename from parse_sexp_propertize_done.
      3928ef2d
  19. 09 Sep, 2015 2 commits
    • Stefan Monnier's avatar
      * src/syntax.c (SETUP_SYNTAX_TABLE): Move truncation... · 0b78dd60
      Stefan Monnier authored
      (parse_sexp_propertize): ...from here.
      0b78dd60
    • Stefan Monnier's avatar
      Make syntax.c call syntax-propertize on demand · ab21f61a
      Stefan Monnier authored
      * lisp/emacs-lisp/syntax.el (syntax--jit-propertize): New function.
      (parse-sexp-propertize-function): Use it.
      (syntax-propertize): Disable parse-sexp-propertize-function.
      
      * src/syntax.c (parse_sexp_propertize, update_syntax_table_forward):
      New functions.
      (syms_of_syntax): New vars `parse-sexp-propertize-done' and
      `parse-sexp-propertize-function'.
      
      * src/syntax.h (struct gl_state_s): Add `e_property_truncated' field.
      (UPDATE_SYNTAX_TABLE_FORWARD): Use update_syntax_table_forward.
      (SETUP_BUFFER_SYNTAX_TABLE): Set e_property_truncated.
      
      * lisp/progmodes/elisp-mode.el (elisp-byte-code-syntax-propertize):
      Don't assume `point' is set.
      ab21f61a
  20. 29 Aug, 2015 1 commit
    • Paul Eggert's avatar
      Fix minor text quoting problems in lisp top level · ff441d35
      Paul Eggert authored
      * lisp/apropos.el (apropos-describe-plist):
      * lisp/cus-theme.el (customize-themes):
      * lisp/dired.el (dired-log):
      * lisp/help-fns.el (describe-variable):
      * lisp/hexl.el (hexl-insert-multibyte-char):
      * lisp/info.el (Info-finder-find-node):
      * lisp/json.el (json-read-string):
      * lisp/novice.el (disabled-command-function)
      (disabled-command-function):
      * lisp/startup.el (normal-mouse-startup-screen):
      * lisp/woman.el (WoMan-log, WoMan-warn):
      Respect text quoting style in doc string or diagnostic.
      * lisp/replace.el (replace-character-fold):
      * src/syntax.c (Fmodify_syntax_entry):
      Escape an apostrophe in a docstring.
      * lisp/tempo.el (tempo-define-template):
      Remove confusing apostrophe from docstring.
      * lisp/whitespace.el (whitespace-mark-x):
      Use directed quotes in docstring.
      ff441d35
  21. 23 Aug, 2015 2 commits
  22. 19 Aug, 2015 1 commit
    • Paul Eggert's avatar
      Use new q ‘format’ flag when fixing quotes in C · 87fbe1a6
      Paul Eggert authored
      * src/image.c (image_size_error): New function.  All uses of
      image_error with "Invalid image size ..."  changed to use it.
      * src/image.c (image_size_error, xbm_load_image, xbm_load)
      (xpm_load, xpm_load_image, xpm_load, pbm_load, png_load_body)
      (jpeg_load_body, tiff_load, gif_load, imagemagick_load_image)
      (imagemagick_load, svg_load, svg_load_image, gs_load)
      (x_kill_gs_process):
      * src/lread.c (load_warn_old_style_backquotes):
      * src/xfaces.c (load_pixmap):
      * src/xselect.c (x_clipboard_manager_error_1):
      Use %qs, not uLSQM and uRSQM.
      * src/syntax.c (Finternal_describe_syntax_value):
      Prefer Fsubstitute_command_keys to Fformat, as this lets
      us use AUTO_STRING.
      * src/xdisp.c (vadd_to_log): Use AUTO_STRING on the format argument,
      as it's now guaranteed to be ASCII.
      * src/xselect.c (x_clipboard_manager_error_2):
      Avoid grave accent in low-level stderr diagnostic.
      87fbe1a6
  23. 14 Aug, 2015 1 commit
    • Paul Eggert's avatar
      Prefer ‘format’ to ‘substitute-command-keys’ · 6af5aad2
      Paul Eggert authored
      * src/character.h (uLSQM, uRSQM): Move here ...
      * src/doc.c (uLSQM, uRSQM): ... from here.
      * src/doc.c (Fsubstitute_command_keys):
      * src/syntax.c (Finternal_describe_syntax_value):
      * lisp/cedet/mode-local.el (mode-local-print-binding)
      (mode-local-describe-bindings-2):
      * lisp/cedet/srecode/srt-mode.el (srecode-macro-help):
      * lisp/cus-theme.el (describe-theme-1):
      * lisp/descr-text.el (describe-text-properties-1, describe-char):
      * lisp/emacs-lisp/cl-extra.el (cl--describe-class):
      * lisp/emacs-lisp/cl-generic.el (cl--generic-describe):
      * lisp/emacs-lisp/eieio-opt.el (eieio-help-constructor):
      * lisp/emacs-lisp/package.el (describe-package-1):
      * lisp/faces.el (describe-face):
      * lisp/help-fns.el (help-fns--key-bindings)
      (help-fns--compiler-macro, help-fns--parent-mode)
      (help-fns--obsolete, help-fns--interactive-only)
      (describe-function-1, describe-variable):
      * lisp/help.el (describe-mode):
      Prefer ‘format’ to ‘substitute-command-keys’ when either will do
      to implement quoting style.  This generally makes the code simpler.
      6af5aad2
  24. 09 Aug, 2015 1 commit
    • Paul Eggert's avatar
      Fix some minor quoting issues with grave accent · 6a45e720
      Paul Eggert authored
      * src/dispnew.c (add_window_display_history) [GLYPH_DEBUG]:
      Remove redundant quotes.
      * src/doc.c (uLSQM, uRSQM): New macros.
      * src/doc.c (Fsubstitute_command_keys):
      * src/syntax.c (Finternal_describe_syntax_value): Follow the user
      preference for quotes rather than hardcoding the ‘grave’ style.
      * src/regex.c (PUSH_FAILURE_POINT, POP_FAILURE_POINT)
      (re_match_2_internal) [DEBUG]: In debugging output, quote C
      strings with "...", not `...'.
      6a45e720
  25. 11 Jun, 2015 1 commit
  26. 29 Apr, 2015 1 commit
  27. 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
  28. 01 Jan, 2015 2 commits
  29. 06 Nov, 2014 1 commit
  30. 07 Sep, 2014 1 commit
    • Paul Eggert's avatar
      Use SAFE_ALLOCA etc. to avoid unbounded stack allocation. · b3bf18b3
      Paul Eggert authored
      This follows up on the recent thread in emacs-devel on alloca; see:
      http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00042.html
      This patch also cleans up alloca-related glitches noted while
      examining the code looking for unbounded alloca.
      * alloc.c (listn):
      * callproc.c (init_callproc):
      Rewrite to avoid need for alloca.
      * buffer.c (mouse_face_overlay_overlaps)
      (report_overlay_modification):
      * buffer.h (GET_OVERLAYS_AT):
      * coding.c (make_subsidiaries):
      * doc.c (Fsnarf_documentation):
      * editfns.c (Fuser_full_name):
      * fileio.c (Ffile_name_directory, Fexpand_file_name)
      (search_embedded_absfilename, Fsubstitute_in_file_name):
      * fns.c (Fmake_hash_table):
      * font.c (font_vconcat_entity_vectors, font_update_drivers):
      * fontset.c (fontset_pattern_regexp, Ffontset_info):
      * frame.c (Fmake_terminal_frame, x_set_frame_parameters)
      (xrdb_get_resource, x_get_resource_string):
      * ftfont.c (ftfont_get_charset, ftfont_check_otf, ftfont_drive_otf):
      * ftxfont.c (ftxfont_draw):
      * image.c (xbm_load, xpm_load, jpeg_load_body):
      * keyboard.c (echo_add_key, menu_bar_items, tool_bar_items):
      * keymap.c (Fdescribe_buffer_bindings, describe_map):
      * lread.c (openp):
      * menu.c (digest_single_submenu, find_and_call_menu_selection)
      (find_and_return_menu_selection):
      * print.c (PRINTFINISH):
      * process.c (Fformat_network_address):
      * scroll.c (do_scrolling, do_direct_scrolling, scrolling_1):
      * search.c (search_buffer, Fmatch_data, Fregexp_quote):
      * sound.c (wav_play, au_play):
      * syntax.c (skip_chars):
      * term.c (tty_menu_activate, tty_menu_show):
      * textprop.c (get_char_property_and_overlay):
      * window.c (Fset_window_configuration):
      * xdisp.c (safe__call, next_overlay_change, vmessage)
      (compute_overhangs_and_x, draw_glyphs, note_mouse_highlight):
      * xfaces.c (face_at_buffer_position):
      * xmenu.c (x_menu_show):
      Use SAFE_ALLOCA etc. instead of plain alloca, since the
      allocation size isn't bounded.
      * callint.c (Fcall_interactively): Redo memory_full check
      so that it can be done at compile-time on some platforms.
      * coding.c (MAX_LOOKUP_MAX): New constant.
      (get_translation_table): Use it.
      * callproc.c (call_process): Use SAFE_NALLOCA instead of
      SAFE_ALLOCA, to catch integer overflows on size calculation.
      (exec_failed) [!DOS_NT]: New function.
      (child_setup) [!DOS_NT]: Use it.
      * editfns.c (Ftranspose_regions):
      Hoist USE_SAFE_ALLOC + SAFE_FREE out of 'if'.
      * editfns.c (check_translation):
      Allocate larger buffers on the heap.
      * eval.c (internal_lisp_condition_case):
      Check for MAX_ALLOCA overflow.
      * fns.c (sort_vector): Use SAFE_ALLOCA_LISP rather than Fmake_vector.
      (Fbase64_encode_region, Fbase64_decode_region):
      Avoid unnecessary calls to SAFE_FREE before 'error'.
      * buffer.c (mouse_face_overlay_overlaps):
      * editfns.c (Fget_pos_property, check_translation):
      * eval.c (Ffuncall):
      * font.c (font_unparse_xlfd, font_find_for_lface):
      * ftfont.c (ftfont_drive_otf):
      * keyboard.c (echo_add_key, read_decoded_event_from_main_queue)
      (menu_bar_items, tool_bar_items):
      * sound.c (Fplay_sound_internal):
      * xdisp.c (load_overlay_strings, dump_glyph_row):
      Use an ordinary auto buffer rather than alloca, since the
      allocation size is fixed and small.
      * ftfont.c: Include <c-strcase.h>.
      (matching_prefix): New function.
      (get_adstyle_property): Use it, to avoid need for alloca.
      * keyboard.c (echo_add_key):
      * keymap.c (describe_map): Use ptrdiff_t, not int.
      * keyboard.c (echo_add_key): Prefer sizeof to strlen.
      * keymap.c (Fdescribe_buffer_bindings): Use SBYTES, not SCHARS,
      when counting bytes.
      * lisp.h (xlispstrdupa): Remove, replacing with ...
      (SAFE_ALLOCA_STRING): ... new macro with different API.
      This fixes a portability problem, namely, alloca result
      passed to another function.  All uses changed.
      (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Check for MAX_ALLOCA,
      not MAX_ALLOCA - 1.
      * regex.c (REGEX_USE_SAFE_ALLOCA, REGEX_SAFE_FREE)
      (REGEX_ALLOCATE): New macros.
      (REGEX_REALLOCATE, REGEX_ALLOCATE_STACK, REGEX_REALLOCATE_STACK)
      (REGEX_FREE_STACK, FREE_VARIABLES, re_match_2_internal):
      Use them.
      * xdisp.c (message3): Use SAFE_ALLOCA_STRING rather than doing it
      by hand.
      (decode_mode_spec_coding): Store directly into buf rather than
      into an alloca temporary and copying the temporary to the buf.
      
      Fixes: debbugs:18410
      b3bf18b3
  31. 04 Sep, 2014 1 commit
  32. 28 Aug, 2014 1 commit
  33. 27 Aug, 2014 1 commit
  34. 09 Jul, 2014 1 commit
  35. 05 Jul, 2014 1 commit
  36. 08 Feb, 2014 1 commit