1. 01 Feb, 2017 3 commits
    • Paul Eggert's avatar
      Fix quitting bug when buffers are frozen · b4c9f912
      Paul Eggert authored
      Problem noted by Eli Zaretskii in:
      http://lists.gnu.org/archive/html/emacs-devel/2017-01/msg00721.html
      This patch also fixes some other issues in that report.
      * src/lisp.h (incr_rarely_quit): Remove.
      All callers changed to use rarely_quit directly.
      * src/search.c (freeze_buffer_relocation)
      (thaw_buffer_relocation): New functions.
      (looking_at_1, fast_looking_at, search_buffer):
      Use them to fix bug when quitting when buffers are frozen.
      * src/sysdep.c (emacs_intr_read): Rename from emacs_nointr_read.
      All uses changed.
      b4c9f912
    • Paul Eggert's avatar
      Revamp quitting and fix infloops · b01ac672
      Paul Eggert authored
      This fixes some infinite loops that cannot be quitted out of,
      e.g., (defun foo () (nth most-positive-fixnum '#1=(1 . #1#)))
      when byte-compiled and when run under X.  See:
      http://lists.gnu.org/archive/html/emacs-devel/2017-01/msg00577.html
      This also attempts to keep the performance improvements I recently
      added, as much as possible under the constraint that the infloops
      must be caught.  In some cases this fixes infloop bugs recently
      introduced when I removed immediate_quit.
      * src/alloc.c (Fmake_list):
      Use rarely_quit, not maybe_quit, for speed in the usual case.
      * src/bytecode.c (exec_byte_code):
      * src/editfns.c (Fcompare_buffer_substrings):
      * src/fns.c (Fnthcdr):
      * src/syntax.c (scan_words, skip_chars, skip_syntaxes)
      (Fbackward_prefix_chars):
      Use rarely_quit so that users can C-g out of long loops.
      * src/callproc.c (call_process_cleanup, call_process):
      * src/fileio.c (read_non_regular, Finsert_file_contents):
      * src/indent.c (compute_motion):
      * src/syntax.c (scan_words, Fforward_comment):
      Remove now-unnecessary maybe_quit calls.
      * src/callproc.c (call_process):
      * src/doc.c (get_doc_string, Fsnarf_documentation):
      * src/fileio.c (Fcopy_file, read_non_regular, Finsert_file_contents):
      * src/lread.c (safe_to_load_version):
      * src/sysdep.c (system_process_attributes) [GNU_LINUX]:
      Use emacs_read_quit instead of emacs_read in places where
      C-g handling is safe.
      * src/eval.c (maybe_quit): Move comment here from lisp.h.
      * src/fileio.c (Fcopy_file, e_write):
      Use emacs_write_quit instead of emacs_write_sig in places where
      C-g handling is safe.
      * src/filelock.c (create_lock_file): Use emacs_write, not
      plain write, as emacs_write no longer has a problem.
      (read_lock_data): Use emacs_read, not read, as emacs_read
      no longer has a problem.
      * src/fns.c (rarely_quit): Move to lisp.h and rename to
      incr_rarely_quit.  All uses changed..
      * src/fns.c (Fmemq, Fmemql, Fassq, Frassq, Fplist_put, Fplist_member):
      * src/indent.c (compute_motion):
      * src/syntax.c (find_defun_start, back_comment, forw_comment)
      (Fforward_comment, scan_lists, scan_sexps_forward):
      Use incr_rarely_quit so that users can C-g out of long loops.
      * src/fns.c (Fnconc): Move incr_rarely_quit call to within
      inner loop, so that it catches C-g there too.
      * src/keyboard.c (tty_read_avail_input): Remove commented-out
      and now-obsolete code dealing with interrupts.
      * src/lisp.h (rarely_quit, incr_rarely_quit): New functions,
      the latter moved here from fns.c and renamed from rarely_quit.
      (emacs_read_quit, emacs_write_quit): New decls.
      * src/search.c (find_newline, search_buffer, find_newline1):
      Add maybe_quit to catch C-g.
      * src/sysdep.c (get_child_status): Always invoke maybe_quit
      if interruptible, so that the caller need not bother.
      (emacs_nointr_read, emacs_read_quit, emacs_write_quit):
      New functions.
      (emacs_read): Rewrite in terms of emacs_nointr_read.
      Do not handle C-g or signals; that is now for emacs_read_quit.
      (emacs_full_write): Replace PROCESS_SIGNALS two-way arg
      with INTERRUPTIBLE three-way arg.  All uses changed.
      b01ac672
    • Paul Eggert's avatar
      Remove immediate_quit. · 33be5003
      Paul Eggert authored
      The old code that sets and clears immediate_quit was
      ineffective except when Emacs is running in terminal mode, and
      has problematic race conditions anyway, so remove it.  This
      will introduce some hangs when Emacs runs in terminal mode,
      and these hangs should be fixed in followup patches.
      * src/keyboard.c (immediate_quit): Remove.  All uses removed.
      33be5003
  2. 26 Jan, 2017 1 commit
    • Paul Eggert's avatar
      Replace QUIT with maybe_quit · b3a3ed52
      Paul Eggert authored
      There’s no longer need to have QUIT stand for a slug of C statements.
      Use the more-obvious function-call syntax instead.
      Also, use true and false when setting immediate_quit.
      These changes should not affect the generated machine code.
      * src/lisp.h (QUIT): Remove.  All uses replaced by maybe_quit.
      b3a3ed52
  3. 24 Jan, 2017 1 commit
    • Noam Postavsky's avatar
      Fix comment detection on open parens · 201dfe31
      Noam Postavsky authored
      Characters having both open paren syntax and comment start syntax were
      being detected as open parens even when they should have been part a
      comment starter (Bug#24870).
      
      * src/syntax.c (in_2char_comment_start): New function, extracted from
      `scan_sexps_forward'.
      (scan_sexps_forward): Add check for a 2-char comment starter before the
      loop.  Inside the loop, do that check after incrementing the 'from'
      character index.  Move the single char comment syntax cases into the
      switch instead of special casing them before.
      * test/src/syntax-tests.el (parse-partial-sexp-paren-comments):
      (parse-partial-sexp-continue-over-comment-marker): New tests.
      201dfe31
  4. 01 Jan, 2017 1 commit
  5. 25 Dec, 2016 1 commit
    • Paul Eggert's avatar
      regex.h now includes sys/types.h · 615cec1d
      Paul Eggert authored
      * src/dired.c, src/emacs.c, src/search.c, src/syntax.c, src/thread.h:
      Do not include sys/types.h; no longer needed.
      * src/regex.h: Include <sys/types.h>, as that's what Gnulib and
      glibc regex.h does, and POSIX has blessed this since 2008.
      615cec1d
  6. 07 Dec, 2016 1 commit
    • Paul Eggert's avatar
      Clean out some IRIX cruft · 8e5a7699
      Paul Eggert authored
      * etc/MACHINES: Remove obsolete discussion of IRIX.
      * src/process.c (allocate_pty) [__sgi]: Remove SGI-specific code.
      (create_process) [HAVE_PTYS]: Don't worry about IRIX.
      * src/syntax.c (scan_sexps_forward): Remove obsolete comment.
      * src/unexelf.c [__sgi]: Don't include <syms.h>.
      (unexec) [__sgi]: Remove SGI-specific code.
      8e5a7699
  7. 30 Oct, 2016 1 commit
  8. 02 Aug, 2016 1 commit
    • Michal Nazarewicz's avatar
      Refactor regex character class parsing in [:name:] · 4538a5e3
      Michal Nazarewicz authored
      re_wctype function is used in three separate places and in all of
      those places almost exact code extracting the name from [:name:]
      surrounds it.  Furthermore, re_wctype requires a NUL-terminated
      string, so the name of the character class is copied to a temporary
      buffer.
      
      The code duplication and unnecessary memory copying can be avoided by
      pushing the responsibility of parsing the whole [:name:] sequence to
      the function.
      
      Furthermore, since now the function has access to the length of the
      character class name (since it’s doing the parsing), it can take
      advantage of that information in skipping some string comparisons and
      using a constant-length memcmp instead of strcmp which needs to take
      care of NUL bytes.
      
      * src/regex.c (re_wctype): Delete function.  Replace it with:
      (re_wctype_parse): New function which parses a whole [:name:] string
      and returns a RECC_* constant or -1 if the string is not of [:name:]
      format.
      (regex_compile): Use re_wctype_parse.
      * src/syntax.c (skip_chars): Use re_wctype_parse.
      4538a5e3
  9. 17 Jun, 2016 1 commit
    • Noam Postavsky's avatar
      Fbackward_prefix_chars: stay within buffer bounds · b49cb0ab
      Noam Postavsky authored
      The commit 1fd3172d "(Fbackward_prefix_chars): Set point properly while
      scanning" (1998-03-18), moved the check against of the position against the
      buffer beginning out the loop condition so that we might end up checking
      the syntax of characters before the beginning of the buffer.  This can
      cause segfaults or trigger a "Point before start of properties" error in
      `update_interval' (called indirectly from `char_quoted').
      
      * src/syntax.c (Fbackward_prefix_chars): Stop the loop when beginning of
      buffer is reached (Bug #3552, Bug #17132, Bug #19379).
      b49cb0ab
  10. 08 Jun, 2016 1 commit
  11. 07 Jun, 2016 2 commits
  12. 06 Jun, 2016 1 commit
    • Stephen Berman's avatar
      Fix doc string quoting · 9d5ccebe
      Stephen Berman authored
      * lisp/files.el (shell-quote-wildcard-pattern):
      * lisp/progmodes/vhdl-mode.el (vhdl-mode):
      * lisp/subr.el (replace-regexp-in-string):
      * lisp/view.el (view-mode):
      * src/nsfns.m (syms_of_nsfns):
      * src/syntax.c (Fbackward_prefix_chars):
      Fix quoting problems in doc strings (Bug#23696).
      9d5ccebe
  13. 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
  14. 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
  15. 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
  16. 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
  17. 01 Mar, 2016 1 commit
  18. 26 Feb, 2016 1 commit
  19. 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
  20. 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
  21. 01 Jan, 2016 1 commit
  22. 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
  23. 21 Nov, 2015 1 commit
  24. 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
  25. 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
  26. 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
  27. 08 Oct, 2015 1 commit
  28. 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
  29. 23 Sep, 2015 1 commit
  30. 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
  31. 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
  32. 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
  33. 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
  34. 23 Aug, 2015 2 commits