1. 27 Aug, 2016 1 commit
  2. 24 Aug, 2016 1 commit
  3. 21 Aug, 2016 1 commit
    • Alan Mackenzie's avatar
      Adapt CC Mode for C++11 uniform initialization. · 578d9aaf
      Alan Mackenzie authored
      For fontification, introduce a new "context", 'non-decl, to be used for
      brace
      lists; also a new value for the property 'c-type, called 'c-not-decl.
      
      * lisp/progmodes/cc-engine.el (c-back-over-compound-identifier): Check that
      an ostensible symbol we're going to move over isn't a keyword.
      (c-forward-decl-or-cast-1): CASE 1: Where we have two consecutive identifiers
      (hence a declaration), and an unmatched open paren, perform
      c-fdoc-shift-type-backwards to recognize the partial construct correctly.
      Whilst checking a type decl expression, check for and handle C++11's "copy
      initialization", where we have <type>(<constant>).  Recognize
      <id><id>(... (where the paren is unclosed) as a declaration.
      (c-looking-at-or-maybe-in-bracelist): New function, extracted from
      c-inside-bracelist-p.  Recognize as bracelists "{"s which are preceded by
      valid tokens other than "=".  Recognize a bracelist when preceded by a
      template declaration.
      (c-inside-bracelist-p): Call c-looking-at-or-maybe-in-bracelist in place of
      much inline code.
      (c-looking-at-inexpr-block): Amend so that it won't wrongly recognise an
      initialization starting "({" as an in-expression block, by checking for
      semicolons, as opposed to commas, separating elements inside it.
      (c-guess-continued-construct): (CASE B-2): Recognize a brace-list-open by
      calling c-looking-at-or-maybe-in-bracelist rather than checking for a
      preceding "=".  (CASE B-5): New code to recognize new construct "return {
      ...}".
      (c-guess-basic-syntax): (CASE 5A.3): Additionally recognize a "{" preceded by
      "return", or "{" preceded by <type><identifier> as a bracelist.
      
      * lisp/progmodes/cc-fonts.el (c-font-lock-declarations): Recognize brace
      lists, giving them `context' 'non-decl.  Pass over elements of one by regexp
      search for "," rather than calling c-forward-decl-or-cast-1.
      
      * lisp/progmodes/cc-langs.el (c-return-kwds, c-return-key): New lang
      constants/variables to recognize "return".
      (c-pre-id-bracelist-key): New lang constant/variable to recognize tokens
      which, when preceding an identifier followed by a brace, signify the brace as
      a bracelist.
      
      * lisp/progmodes/cc-mode.el (c-fl-decl-start): When searching outwards for
      the start of a "local" declaration, move out from an enclosing brace when
      that is the start of a brace list.
      578d9aaf
  4. 17 Aug, 2016 2 commits
  5. 15 Aug, 2016 2 commits
    • Alan Mackenzie's avatar
      Fix minor bug in c-syntactic-re-search-forward. · 15c16a5d
      Alan Mackenzie authored
      Bug was: when NOERROR is neither nil nor t, BOUND is non-nil, PAREN-LEVEL is
      non-nil, and the first internal search attempt fails, point wrongly ends up at
      BOUND, rather than just before the next closing paren.
      
      * lisp/progmodes/cc-engine.el (c-syntactic-re-search-forward): Guard against
      the above situation.
      15c16a5d
    • Alan Mackenzie's avatar
      Handle C++11 lambda functions. · ce1ed9c8
      Alan Mackenzie authored
      * lisp/progmodes/cc-engine.el (c-looking-at-inexpr-block): Enhance also to
      handle C++ lambda functions.
      (c-looking-at-c++-lambda-capture-list): New function.
      
      * lisp/progmodes/cc-fonts.el (c-font-lock-declarations): Recognize the
      parameter list of a lambda function and set `context' and
      `c-restricted-<>-arglists' suitably for it.
      (c-font-lock-c++-lambda-captures): New function.
      (c-complex-decl-matchers): Insert c-font-lock-c++-lambda-captures into it.
      
      * lisp/progmodes/cc-langs.el (c-pre-lambda-tokens, c-pre-lambda-tokens-re):
      New language constants/variables.
      (c-paren-nontype-kwds): Include "noexcept" in the C++ value.
      
      * lisp/progmodes/cc-mode.el (c-fl-decl-start): Handle being in a C++ lambda
      function capture list.
      ce1ed9c8
  6. 04 Aug, 2016 1 commit
  7. 23 Jul, 2016 1 commit
    • Alan Mackenzie's avatar
      Fontify C++ parameter packs. · 4d342102
      Alan Mackenzie authored
      This fixes debbugs #23610.
      
      * lisp/progmodes/cc-langs.el (c-pack-ops, c-pack-key): New
      c-lang-defconsts/defvars.
      (c-type-decl-prefix-key): Add "..." and "&&" into the C++ version.
      
      * lisp/progmodes/cc-engine.el (c-forward-type): Handle matches of c-pack-key.
      4d342102
  8. 14 Jul, 2016 1 commit
  9. 12 Jul, 2016 1 commit
    • Alan Mackenzie's avatar
      Amend CC Mode to handle big C++ raw strings correctly. · a1db933c
      Alan Mackenzie authored
      Problems were caused by such a string spanning jit-lock chunks, and by a flaw
      in the +-500 bytes boundaries imposed for macros.
      
      * lisp/progmodes/cc-mode.el (c-extend-region-for-CPP): Check the +-500 byte
      macro boundaries here.
      (c-extend-font-lock-region-for-macros): Remove the check on the +-500 byte
      lower boundary.  Fix the check on the upper boundary.
      
      * lisp/progmodes/cc-fonts.el (c-font-lock-raw-strings): Handle the starting
      point already being within a raw string.
      
      * lisp/progmodes/cc-engine.el (c-raw-string-pos)
      (c-depropertize-raw-strings-in-region, c-after-change-re-mark-raw-strings):
      Modify regexp element "\\{,16\\}" to "\\{0,16\\}" for greater compatibility
      with other Emacsen.
      a1db933c
  10. 30 Jun, 2016 1 commit
  11. 29 Jun, 2016 1 commit
    • Alan Mackenzie's avatar
      Fix C-M-a in a C function finding the start of a macro preceding it. · 681d3f1f
      Alan Mackenzie authored
      Also amend some pertinent documentation.  This fixes bug #23818.
      
      * lisp/progmodes/cc-engine.el (c-beginning-of-decl-1): Also check for a
      virtual semicolon at a place where we check for other types of statement ends.
      
      * lisp/progmodes/cc-vars.el (c-macro-nacmes-with-semicolon): Remove from the
      doc string the bit saying that the variable is a prototype and liable to
      change.
      
      * doc/misc/cc-mode.texi (Macros with ;): Enhance, stating that configuring
      macros with semicolon can prevent C-M-a missing the beginning of defun.
      681d3f1f
  12. 27 Jun, 2016 1 commit
    • Alan Mackenzie's avatar
      Amend a cache so that typing into C++ raw strings has no undue delay. · 8040d99b
      Alan Mackenzie authored
      Also amend the code so that low-level searches to the end of literals are done
      only when these positions get used.
      
      * lisp/progmodes/cc-engine.el (c-crosses-statement-barrier-p): Use the new
      c-literal-start instead of c-literal-limit.
      (c-state-semi-nonlit-pos-cache): Change the structure of this cache, such that
      it stores details of the literal at a point, rather than merely points outside
      of literals.
      (c-state-semi-pp-to-literal, c-state-full-pp-to-literal)
      (c-cache-to-parse-ps-state, c-parse-ps-state-to-cache, c-ps-state-cache-pos)
      (c-parse-ps-state-below, c-literal-start): New functions.
      (c-state-semi-safe-place): Removed.
      (c-in-literal): Use c-state-semi-pp-to-literal, so as not to scan to its end.
      (c-literal-limits, c-determine-limit-get-base): consequential amendments.
      (c-find-decl-spots, c-before-change-check-<>-operators, c-raw-string-pos)
      (c-guess-basic-syntax (CASE 2)): Avoid needless scans to end of literals.
      
      * lisp/progmodes/cc-fonts.el (c-font-lock-doc-comments): Avoid needless scans
      to end of literals.
      
      * lisp/progmodes/cc-mode.el (c-fl-decl-start): Avoid needless scans to end of
      literals.
      
      * lisp/progmodes/cc-cmds.el (c-beginning-of-defun, c-end-of-defun)
      (c-defun-name, c-declaration-limits): Avoid needless scans to end of literals.
      8040d99b
  13. 26 Jun, 2016 1 commit
  14. 23 Jun, 2016 1 commit
    • Alan Mackenzie's avatar
      Make typing into incomplete C++ raw strings work, and make it work fast enough · 7a20ebe5
      Alan Mackenzie authored
      * lisp/progmodes/cc-engine.el (c-beginning-of-macro, c-state-pp-to-literal):
      Put `save-match-data' around calls to `looking-at' to enable the use of the
      match data in higher level functions.
      
      * lisp/progmodes/cc-fonts.el (c-font-lock-declarations)
      (c-font-lock-cut-off-declarators): Use `limit' rather than `(point-max)' as a
      limit to speed up handling of C++ raw strings.
      7a20ebe5
  15. 19 Jun, 2016 2 commits
  16. 15 Jun, 2016 1 commit
    • Alan Mackenzie's avatar
      Parse compound identifiers in C++ member initialization lists. · 3be326e8
      Alan Mackenzie authored
      * lisp/progmodes/cc-engine.el (c-back-over-compound-identifier): New function.
      (c-back-over-member-initializer-braces, c-back-over-list-of-member-inits)
      (c-back-over-member-initializers): Call c-back-over-compound-identifier rather
      than c-simple-skip-symbol-backward.
      3be326e8
  17. 09 Jun, 2016 1 commit
    • Alan Mackenzie's avatar
      Handle C++ raw strings. · fabb5582
      Alan Mackenzie authored
      * lisp/progmodes/cc-engine.el (c-raw-string-pos, c-depropertize-raw-string)
      (c-depropertize-raw-strings-in-region,
      c-before-change-check-raw-strings)
      (c-propertize-raw-string-opener, c-after-change-re-mark-raw-strings): New
      functions.
      
      * lisp/progmodes/cc-fonts.el (c-basic-matchers-before): Insert a clause for
      c-font-lock-raw-strings.
      (c-font-lock-raw-strings): New function.
      
      * lisp/progmodes/cc-langs.el (c-get-state-before-change-functions): Insert
      c-before-change-check-raw-strings into the C++ value, and c-depropertize-CPP
      into the values for C, C++, and Objective C.
      (c-before-font-lock-functions): Insert c-after-change-re-mark-raw-strings into
      the C++ value.
      
      * lisp/progmodes/cc-mode.el (c-old-BEG, c-old-END): New variables.
      (c-depropertize-CPP): New function, extracted from
      c-neutralize-syntax-in-and-mark-CPP.
      (c-neutralize-syntax-in-and-mark-CPP): Remove the call to
      c-clear-char-property-with-value for 'syntax-table value '(1) at the beginning
      of the function.
      (c-after-change): Set c-old-BEG and c-old-END to the current values of
      c-new-BEG and c-new-END.
      fabb5582
  18. 29 May, 2016 1 commit
    • Alan Mackenzie's avatar
      Rationalize the use of c-new-BEG and c-new-END in CC Mode. · 80dcc237
      Alan Mackenzie authored
      Remove the now redundant c-old-BOM and c-old-EOM.
      
      * lisp/progmodes/cc-engine.el (c-macro-cache-syntactic): Change and simplify
      meaning.
      (c-macro-cache-no-comment): New variable.
      (c-invalidate-macro-cache, c-beginning-of-macro, c-end-of-macro): incorporate
      the new c-macro-cache-no-comment.
      (c-syntactic-end-of-macro): Make better use of c-macro-cache-syntactic.
      (c-no-comment-end-of-macro): New function.
      
      * lisp/progmodes/cc-langs.el (c-before-font-lock-functions): Add
      c-extend-font-lock-region-for-macros to C/C++/ObjC value.
      
      * lisp/progmodes/cc-mode.el (c-old-BOM, c-old-EOM): Remove.
      (c-extend-region-for-CPP): Put results in c-new-BEG/END rather than
      c-old-BOM/EOM.
      (c-extend-font-lock-region-for-macros): Simplify meaning, no longer returning
      a cons for the new region, since the function is now called as an after-change
      function.  No longer adjust c-new-END for the length of inserted/deleted
      text.  Move the size restrictions on macros to here from
      c-neutralize-syntax-in-and-mark-CPP.
      (c-neutralize-syntax-in-and-mark-CPP): No longer adjust c-new-BEG/END here.
      Use c-no-comment-end-of-macro rather than c-syntactic-end-of-macro to find the
      upper boundary to "neutralize" syntactically obtrusive characters.
      (c-change-expand-fl-region): Don't set c-new-END to next BOL when already at
      one.
      80dcc237
  19. 28 May, 2016 1 commit
  20. 16 May, 2016 1 commit
    • Alan Mackenzie's avatar
      Fix spurious fontification of "for (; a * b;)" in CC Mode. · 116acebf
      Alan Mackenzie authored
      This fixes bug #7918 (again).
      
      * lisp/progmodes/cc-engine.el (c-delq-from-dotted-list): New function.
      (c-forward-decl-or-cast-1): Return a 4 element list in place of the previous
      cons cell - additionally, return a flag indicating whether the declaration
      parsed might have been an expression, and the position of the type identifier
      in the said declaration.
      
      * lisp/progmodes/cc-fonts.el (c-font-lock-declarations): When
      c-forward-decl-or-cast-1 has indicated it might have parsed an expression,
      check for it being a spurious declaration in a "for" statement.
      116acebf
  21. 02 May, 2016 1 commit
  22. 30 Apr, 2016 1 commit
  23. 29 Apr, 2016 2 commits
    • Alan Mackenzie's avatar
      Revert unneeded change which harms syntactic parsing. This fixes bug #23308. · b671e218
      Alan Mackenzie authored
      * lisp/progmodes/cc-engine.el (c-invalidate-state-cache): User
      c-state-old-cpp-end as an argument to c-with-all-but-one-cpps-commented-out
      regardless of the value of `here'.
      b671e218
    • Alan Mackenzie's avatar
      Correct indentation of ids in a C++ enum after a protection keyword. · 48b24c9b
      Alan Mackenzie authored
      Also correct the misfontification of the last enum identifier.
      
      * lisp/progmodes/cc-engine.el (c-forward-keyword-prefixed-id): setq
      c-last-identifier-range to nil to ensure that only types recognized by this
      macro are set for fontification as types.
      (c-backward-typed-enum-colon): Function renamed from
      c-backward-colon-prefixed-type.  On finding a colon in the backward search,
      check it is preceded by an identifier rather than a keyword.
      48b24c9b
  24. 25 Apr, 2016 2 commits
    • Alan Mackenzie's avatar
      c-forward-<>-arglist no longer directly applies face properties in Java Mode. · db2ee1cd
      Alan Mackenzie authored
      This allows the calling of c-restore-<>-properties from c-common-init without
      the test suite giving spurious errors.
      
      * lisp/progmodes/cc-engine.el (c-forward-<>-arglist): Remove the form that
      sets face properties.
      (c-forward-<>-arglist-recur): Reformulate the bit that handles types inside
      template brackets using c-inside-<>-type-key.  Don't bind
      c-record-type-identifiers or c-record-found-types around the recursive call,
      allowing positions of found types to flow back to the caller.
      
      * lisp/progmodes/cc-langs.el (c-inside-<>-type-kwds, c-inside-<>-type-key):
      new lang consts/var.
      
      * lisp/progmodes/cc-mode.el (c-common-init): Don't remove
      c-restore-<>-properties from the list of functions called at mode
      initialization.
      db2ee1cd
    • Alan Mackenzie's avatar
      Add fontification for a C declaration which looks like a function call. · fda715c6
      Alan Mackenzie authored
      For example, "t1 *fn (t2 *b);".
      
      * lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): Add new variable
      at-decl-start, setting it to whether the putative decl starts immediately
      after ; or { or }.  Accept such a construct as a decl when at-decl-start is
      non-nil.
      
      * lisp/progmodes/cc-langs.el (c-pre-start-tokens): New language variable.
      fda715c6
  25. 01 Apr, 2016 1 commit
    • Alan Mackenzie's avatar
      Prevent C++ Mode wrongly fontifying some identifiers near templates as types · 9151f16e
      Alan Mackenzie authored
      This fixes debbugs #7917.
      
      * lisp/progmodes/cc-engine.el (c-forward-keyword-prefixed-id): Accept 'maybe
      (from c-forward-type) as sufficient to record an id.  Record type id as well
      as ref ids.
      (c-forward-name): Bind c-last-identifier-range around the call to
      c-forward-<>-arglist to prevent it getting corrupted.  Don't automatically
      assume an identifier is a type when a template ">" is followed by a "(".
      (c-forward-type): Don't automatically assume an identifier is a type when a
      template ">" is followed by a "(".
      
      * lisp/progmodes/cc-fonts.el (c-font-lock-<>-arglists): Don't fontify an
      identifier as a type when its associated ">" is followed by a "(".
      9151f16e
  26. 30 Mar, 2016 1 commit
    • Alan Mackenzie's avatar
      Finish fixing a cacheing bug in CC Mode (see 2016-03-09) · 22443312
      Alan Mackenzie authored
      * lisp/progmodes/cc-cmds.el: (c-beginning-of-defun, c-end-of-defun): Remove
      superfluous invocations of c-self-bind-state-cache.
      
      * lisp/progmodes/cc-defs.el: (c-self-bind-state-cache): Copy and terminate
      markers correctly.
      
      * lisp/progmodes/cc-engine.el (c-record-parse-state-state): Terminate stale
      markers.
      22443312
  27. 25 Mar, 2016 1 commit
    • Alan Mackenzie's avatar
      Fix absence of c-noise-macro-name-re, etc., in languages which don't use it · 368b9bb4
      Alan Mackenzie authored
      * lisp/progmodes/cc-engine.el (c-forward-keyword-prefixed-id, c-forward-type)
      (c-forward-declarator, c-forward-decl-or-cast-1, c-backward-over-enum-header)
      (c-guess-basic-syntax): Check c-opt-cpp-prefix before `looking-at'
      c-noise-macro-with-parens-name-re.
      
      * lisp/progmodes/cc-fonts.el (c-complex-decl-matchers): The same as for
      cc-engine.el.
      
      * lisp/progmodes/cc-mode.el (c-basic-common-init): Add call to
      `c-make-noise-macro-regexps'.
      (c-mode, c++-mode, objc-mode): Remove calls to `c-make-noise-macro-regexps'.
      
      * lisp/progmodes/cc-vars.el (c-noise-macro-with-parens-name-re)
      (c-noise-macro-with-re): Initialize to "\\<\\>" rather than nil.
      368b9bb4
  28. 22 Mar, 2016 2 commits
    • 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
    • Alan Mackenzie's avatar
      Don't confuse "::" with ":" when trying to parse member initializers. · 515ce25f
      Alan Mackenzie authored
      * lisp/progmodes/cc-engine.el (c-back-over-member-initializers): Check
      more robustly for ":" token when searching backwards for it.
      
      * lisp/progmodes/cc-langs (c-:$-multichar-token-regexp): New language
      variable.
      
      [This reapplies commit 9e5452f7,
      which was inadvertently lost by merge commit
      7823745a.]
      515ce25f
  29. 14 Mar, 2016 2 commits
    • Alan Mackenzie's avatar
      Fix a cacheing bug, which led to inordinately slow c-beginning-of-defun. · 5cc69193
      Alan Mackenzie authored
      * lisp/progmodes/cc-defs.el (c-self-bind-state-cache): New macro.
      
      * lisp/progmodes/cc-engine.el (c-ssb-lit-begin): Always call c-parse-state
      rather than just using the cache variable c-state-cache.
      (c-syntactic-skip-backward): Invoke c-self-bind-state-cache to isolate calls
      to c-parse-state from other uses of the parse state cache.
      
      * lisp/progmodes/cc-cmds.el (c-beginning-of-defun, c-end-of-defun): Invoke
      c-self-bind-state-cache around the processing, replacing flawed bindings of
      c-state-cache.
      5cc69193
    • Alan Mackenzie's avatar
      Fix a cacheing bug, which led to inordinately slow c-beginning-of-defun. · eabd667a
      Alan Mackenzie authored
      * lisp/progmodes/cc-defs.el (c-self-bind-state-cache): New macro.
      
      * lisp/progmodes/cc-engine.el (c-ssb-lit-begin): Always call c-parse-state
      rather than just using the cache variable c-state-cache.
      (c-syntactic-skip-backward): Invoke c-self-bind-state-cache to isolate calls
      to c-parse-state from other uses of the parse state cache.
      
      * lisp/progmodes/cc-cmds.el (c-beginning-of-defun, c-end-of-defun): Invoke
      c-self-bind-state-cache around the processing, replacing flawed bindings of
      c-state-cache.
      eabd667a
  30. 29 Feb, 2016 1 commit
    • Alan Mackenzie's avatar
      Handle "noise" macros and compiler directives. · 71dc8213
      Alan Mackenzie authored
      * lisp/progmodes/cc-langs.el (c-symbol-char-key): New language variable.
      
      * lisp/progmodes/cc-vars.el (c-noise-macro-names)
      (c-noise-macro-with-parens-names): New customizable variables.
      (c-noise-macro-name-re, c-noise-macro-with-parens-name-re): New variables.
      (c-make-noise-macro-regexps): New function.
      
      * lisp/progmodes/cc-engine.el (c-forward-sws, c-backward-sws): Adapt to treat
      members of c-noise-macro-names as whitespace.
      (c-forward-noise-clause): New function.
      (c-forward-keyword-prefixed-id, c-forward-type, c-forward-declarator)
      (c-forward-decl-or-cast-1, c-backward-over-enum-header)
      (c-guess-basic-syntax CASE 5A.3, CASE 5A.5, CASE 9A):
      Handle "noise clauses" in parallel with, e.g., "hangon key clauses".
      
      * lisp/progmodes/cc-fonts.el (c-complex-decl-matchers): Handle "noise clauses"
      in parallel with "prefix-spec keywords".
      
      * lisp/progmodes/cc-mode.el (c-mode, c++-mode, objc-mode): call
      c-make-noise-macro-regexps to initialize the internal variables.
      
      * doc/misc/cc-mode.texi ("Noise Macros"): New section documenting the new
      facilities.
      71dc8213
  31. 17 Feb, 2016 1 commit
  32. 15 Feb, 2016 1 commit
    • Alan Mackenzie's avatar
      Allow arithmetic operators inside C++ template constructs. · 02b037b8
      Alan Mackenzie authored
      Fixes debbugs #22486.  This corrects the previous patch with this message
      which was empty.
      
      * lisp/progmodes/cc-langs.el (c-multichar->-op-not->>-regexp): New language
      variable.
      (c-<>-notable-chars-re): New language variable.
      
      * lisp/progmodes/cc-engine.el (c-forward-<>-arglist-recur): User
      c-<>-notable-chars-re in place of the former fixed string in searching for
      places to stop and examine.
      Use c-multichar->-op-not->>-regexp to check that a found ">" is not part of a
      multichar operator in place of the former c->-op-without->-cont-regexp.
      Add code to skip forwards over a balanced parenthesized expression.
      02b037b8
  33. 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