1. 09 Nov, 2019 1 commit
    • Alan Mackenzie's avatar
      CC Mode. Allow fontification of "wrong" style comments with warning face. · b293aa91
      Alan Mackenzie authored
      This fixes bug #4192.
      
      * etc/NEWS: Add a new entry.
      
      * lisp/progmodes/cc-defs.el (c-font-lock-flush): New macro.
      
      * lisp/progmodes/cc-cmds.el (c-toggle-comment-style): On toggling the comment
      style, invoke c-font-lock-flush when c-mark-wrong-style-of-comment is non-nil,
      to cause that marking to be done instead on the other style of comment.
      
      * lisp/progmodes/cc-fonts.el (c-maybe-font-lock-wrong-style-comments): New
      function.
      (c-cpp-matchers): Call c-maybe-font-lock-wrong-style-comments when
      appropriate.
      
      * lisp/progmodes/cc-vars.el (c-mark-wrong-style-of-comment): New customizable
      option.
      
      * doc/misc/cc-mode.texi (top level, Indentation Commands, Guessing the Style,
      Custom Macros): For some opening quote marks, correct '' to ``.
      (Minor Modes): Add an xref to the new page "Wrong Comment Style" in a
      footnote.
      (Wrong Comment Style): New page.
      b293aa91
  2. 02 Nov, 2019 1 commit
  3. 27 Jul, 2019 1 commit
    • Alan Mackenzie's avatar
      CC Mode: Stop /**/ spuriously fontifying as a doc comment under gtkdoc · 2f646633
      Alan Mackenzie authored
      Also fix infinite loops by correcting two regexps.
      
      * lisp/progmodes/cc-langs.el (c-last-c-comment-end-on-line-re)
      (c-last-open-c-comment-start-on-line-re): Correct the regexp fragments
      "\\*+[^/]" to "\\*+\\([^*/]\\|$\\)".
      
      * lisp/progmodes/cc-fonts.el (gtkdoc-font-lock-keywords): Disallow /**/ for
      doc comment fontification.
      2f646633
  4. 17 Jul, 2019 1 commit
  5. 30 Jun, 2019 1 commit
    • Alan Mackenzie's avatar
      C++ Mode: change the default doc comment style from nothing to gtkdoc · 6d529b65
      Alan Mackenzie authored
      Also amend a pertinent regular expression.  This fixes bug #11865.
      
      * lisp/progmodes/cc-vars.el (c-doc-comment-style): Insert an entry for
      c++-mode, namely gtkdoc.
      
      * lisp/progmodes/cc-fonts.el (gtkdoc-font-lock-keywords): Amend the regexp
      recognizing the introductory "/**" to allow subsequent characters on that
      line.
      6d529b65
  6. 17 Jun, 2019 1 commit
  7. 16 Jun, 2019 1 commit
    • Alan Mackenzie's avatar
      CC Mode: Remedy recent loss in performance · e6fb9a44
      Alan Mackenzie authored
      * lisp/progmodes/cc-engine.el (c-back-over-member-initializers): call
      c-parse-state outside of the narrowing operation.
      
      * lisp/progmodes/cc-fonts.el (c-get-fontification-context)
      (c-font-lock-cut-off-declarators): Replace calls to c-determine-limit with
      crude position calculations for speed.
      e6fb9a44
  8. 13 Jun, 2019 1 commit
    • Alan Mackenzie's avatar
      Depessimize bits of CC Mode for long C macros. · 6b538879
      Alan Mackenzie authored
      * lisp/progmodes/cc-engine.el (c-end-of-macro): Check for being in a
      degenerate zero length "macro", when setting the macro cache.
      (c-determine-+ve-limit): Add in a missing goto-char form for when start-pos is
      non-nil.
      (c-back-over-member-initializers): Add a search limit parameter.
      
      * lisp/progmodes/cc-fonts.el (c-get-fontification-context): Add a search limit
      to c-go-up-list-backward.
      (c-font-lock-cut-off-declarators): Add a search limit to
      c-back-over-member-initializers.
      
      * lisp/progmodes/cc-mode.el (c-before-change-check-unbalanced-strings): Don't
      set c-new-END to the end of logical line (which might be a long macro).
      (c-after-change-mark-abnormal-strings): Calculate end-hwm in place of the
      setting of c-new-END (above).  Use this as a search limit rather than
      c-new-END.
      6b538879
  9. 01 Jun, 2019 1 commit
    • Alan Mackenzie's avatar
      Tidy up the literal cacheing in CC Mode, optimizing c-full-pp-to-literal · 9dee49ed
      Alan Mackenzie authored
      (Intermediate commit)
      
      * lisp/progmodes/cc-engine.el, lisp/progmodes/cc-fonts.el
      * lisp/progmodes/cc-mode.el : Rename:
      c-state-semi-nonlit-pos-cache -> c-lit-pos-cache,
      c-state-semi-nonlit-pos-cache-limit -> c-lit-pos-cache-limit,
      c-state-semi-nonlit-near-cache -> c-semi-lit-near-cache,
      c-truncate-semi-nonlit-pos-cache -> c-truncate-lit-pos-cache,
      c-state-semi-trim-near-cache -> c-semi-trim-near-cache,
      c-state-semi-get-near-cache-entry -> c-semi-get-near-cache-entry,
      c-state-semi-put-near-cache-entry -> c-semi-put-near-cache-entry,
      c-state-semi-pp-to-literal -> c-semi-pp-to-literal,
      c-state-full-pp-to-literal -> c-full-pp-to-literal,
      c-state-semi-trim-cache -> c-trim-lit-pos-cache.
      
      * lisp/progmodes/cc-engine.el (c-semi-near-cache-limit): New variable.
      (c-truncate-lit-pos-cache): This now truncates the cache variables for all
      three lit- sub-caches.
      (c-semi-put-near-cache-entry): Increase c-semi-near-cache-limit to the
      position of the new entry.
      (c-full-near-cache-limit, c-full-lit-near-cache): New variables.
      (c-full-trim-near-cache, c-full-get-near-cache-entry)
      (c-full-put-near-cache-entry): New functions.
      (c-full-pp-to-literal): Amend to use the new functions, and to optimize the
      use of the available caches, similarly to c-semi-pp-to-literal.
      9dee49ed
  10. 26 May, 2019 1 commit
  11. 15 May, 2019 1 commit
    • Mattias Engdegård's avatar
      Add standard unmatchable regexp · 26f735ff
      Mattias Engdegård authored
      Add `regexp-unmatchable' as a standard unmatchable regexp, defined as
      "\\`a\\`".  Use it where such a regexp is needed, replacing slower
      expressions in several places.
      From a suggestion by Philippe Schnoebelen.
      
      * lisp/subr.el (regexp-unmatchable): New defconst.
      * etc/NEWS (Lisp Changes): Mention `regexp-unmatchable'.
      * doc/lispref/searching.texi (Regexp Functions): Document it.
      * lisp/emacs-lisp/regexp-opt.el (regexp-opt)
      * lisp/progmodes/cc-defs.el (cc-conditional-require-after-load)
      (c-make-keywords-re)
      * lisp/progmodes/cc-engine.el (c-beginning-of-statement-1)
      (c-forward-<>-arglist-recur, c-forward-decl-or-cast-1)
      (c-looking-at-decl-block)
      * lisp/progmodes/cc-fonts.el (c-doc-line-join-re)
      (c-doc-bright-comment-start-re)
      * lisp/progmodes/cc-langs.el (c-populate-syntax-table)
      (c-assignment-op-regexp)
      (c-block-comment-ender-regexp, c-font-lock-comment-end-skip)
      (c-block-comment-start-regexp, c-line-comment-start-regexp)
      (c-doc-comment-start-regexp, c-decl-start-colon-kwd-re)
      (c-type-decl-prefix-key, c-type-decl-operator-prefix-key)
      (c-pre-id-bracelist-key, c-enum-clause-introduction-re)
      (c-nonlabel-token-2-key)
      * lisp/progmodes/cc-mode.el (c-doc-fl-decl-start, c-doc-fl-decl-end)
      * lisp/progmodes/cc-vars.el (c-noise-macro-with-parens-name-re)
      (c-noise-macro-name-re, c-make-noise-macro-regexps)
      * lisp/progmodes/octave.el (octave-help-mode)
      * lisp/vc/vc-bzr.el (vc-bzr-log-view-mode, vc-bzr-revision-completion-table)
      * lisp/vc/vc-git.el (vc-git-log-view-mode)
      * lisp/vc/vc-hg.el (vc-hg-log-view-mode)
      * lisp/vc/vc-mtn.el (vc-mtn-log-view-mode):
      Use `regexp-unmatchable'.
      * lisp/textmodes/ispell.el (ispell-non-empty-string):
      Use `regexp-unmatchable', fixing a broken never-match regexp.
      26f735ff
  12. 30 Apr, 2019 2 commits
  13. 25 Apr, 2019 1 commit
    • Alan Mackenzie's avatar
      Restore fontification of delimiters of multiline CC Mode strings. · 0c2d921a
      Alan Mackenzie authored
      E.g., on typing the closing delimiter of a string continued onto a second
      line, the opening delimiter retained its font-lock-warning-face.
      
      * lisp/progmodes/cc-defs.el (c-c++-raw-string-opener-re)
      (c-c++-raw-string-opener-1-re): New constants.
      (c-sub-at-c++-raw-string-opener, c-at-c++-raw-string-opener): New macros.
      
      * lisp/progmodes/cc-engine.el (c-raw-string-pos)
      (c-depropertize-raw-strings-in-region, c-after-change-unmark-raw-strings):
      Replace uses of open-coded raw string regexps by the new constants and macros
      in cc-defs.el.
      
      * lisp/progmodes/cc-fonts.el (c-font-lock-raw-strings): Ditto
      
      * lisp/progmodes/cc-mode.el (c-before-change-check-unbalanced-strings): Set
      c-new-BEG to the beginning of the string when we encounter its closing ".
      When not in a raw string, but in a string, clear syntax-table properties from
      its delimiters and set c-new-BEG/END to its limits.
      (c-after-change-mark-abnormal-strings): When applying syntax-table properties
      to string delimiters, also set c-new-BEG/END to ensure subsequent
      fontification.
      0c2d921a
  14. 23 Apr, 2019 1 commit
    • Alan Mackenzie's avatar
      Optimize for typing characters into long C++ raw strings. · 0d5caa9a
      Alan Mackenzie authored
      * lisp/progmodes/cc-fonts.el (c-font-lock-complex-decl-prepare)
      (c-font-lock-objc-methods) (c-font-lock-declarations, c-font-lock-enum-tail)
      (c-font-lock-cut-off-declarators, c-font-lock-enclosing-decls): If the chunk
      been fontified consists entirely of comments and strings, don't attempt to
      perform the function's action.
      
      * lisp/progmodes/cc-mode.el (c-before-change-check-unbalanced-strings): Don't
      expand (c-new-BEG c-new-END) unnecessarily to the entire raw string being
      fontified.
      (c-fl-decl-start, c-fl-decl-end): When in a (raw or otherwise) string, don't
      return a position outside of the string (which used to cause unneeded
      fontification).
      0d5caa9a
  15. 20 Apr, 2019 1 commit
    • Alan Mackenzie's avatar
      Fix Pike Mode's autodoc doc comments style's continued lines. · a85befa4
      Alan Mackenzie authored
      * lisp/progmodes/cc-engine.el (c-forward-sws, c-backward-sws): Recognize
      matches of c-doc-line-join-re as syntactic whitespace.
      (c-find-decl-prefix-search): Recognize and move over matches of
      c-doc-line-join-re as whitespace.
      (c-find-decl-spots): Before moving backward a char, check (bobp).  Before
      moving forward over a comment, check it isn't possibly a "bright" comment.
      
      * lisp/progmodes/cc-fonts.el (c-get-doc-comment-style): New function,
      extracted from c-compose-keywords-list.
      (c-compose-keywords-list): Call the above new function.
      (pike-font-lock-keywords, pike-font-lock-keywords-2)
      (pike-font-lock-keywords-3): Call c-set-doc-comment-res.
      (c-doc-line-join-re, c-doc-bright-comment-start-re, c-doc-line-join-end-ch):
      New variables.
      (c-set-doc-comment-re-element, c-set-doc-comment-char-list): New macros.
      (c-set-doc-comment-res): New function.
      (c-font-lock-doc-comments): For consistency and repeatability, in a sequence
      of C++ style doc comments, don't fontify the region between BOL and the
      comment marker.
      (autodoc-line-join-re, autodoc-bright-comment-start-re)
      (autodoc-line-join-end-ch): New variables.
      
      * lisp/progmodes/cc-mode.el (c-doc-fl-decl-start, c-doc-fl-decl-end): New
      functions.
      (c-change-expand-fl-region, c-context-expand-fl-region): Call the above two
      new functions for extra possibilities for the start and end of a construct.
      
      * doc/misc/cc-mode.texi (Doc Comments): Add a sentence drawing attention to
      the possibility of fontifying constructs within a doc comment.
      a85befa4
  16. 27 Mar, 2019 1 commit
    • Alan Mackenzie's avatar
      Improve C++ raw string fontification. · 29ec1e48
      Alan Mackenzie authored
      Integrate the handling of raw string and ordinary string fontification.
      
      * lisp/progmodes/cc-defs.el (c-font-lock-flush)
      (c-search-forward-char-property-without-value-on-char): new macros.
      (c-point): In the 'eoll arm, check for eobp.
      (c-search-forward-char-property-with-value-on-char): Handle the &optional
      limit argument being nil.
      (c-clear-char-property-with-value-on-char-function)
      (c-clear-char-property-with-value-on-char): Return the position of the first
      cleared property.
      
      * lisp/progmodes/cc-engine.el (c-find-decl-prefix-search): Don't spuriously
      recognize the change of face at a ) as the start of a string (a
      "pseudo match").
      (c-old-beg-rs c-old-end-rs): New variables.
      (c-raw-string-pos): Analyze raw string delimiters more carefully.
      (c-raw-string-in-end-delim): New function.
      (c-depropertize-raw-string): Largely rewritten.
      (c-before-change-check-raw-strings): New functionality: only remove the
      syntax-table text properties from raw strings whose delimiters are about to
      change.
      (c-propertize-raw-string-id): New function.
      (c-after-change-re-mark-raw-strings): Remove, incorporating functionality into
      other functions.
      (c-propertize-raw-string-opener): Largely rewritten.
      (c-after-change-re-mark-raw-strings): Removed.
      (c-after-change-unmark-raw-strings, c-after-change-unmark-raw-strings): New
      functions.
      
      * lisp/progmodes/cc-fonts.el (c-font-lock-raw-strings): Largely rewritten.
      
      * lisp/progmodes/cc-langs.el (c-before-font-lock-functions): Replace
      c-after-change-re-mark-unbalanced-strings by
      c-after-change-mark-abnormal-strings in the t, c+objc, c++ and java sections.
      Add c-after-change-unmark-raw-strings and remove
      c-after-change-re-mark-raw-strings from the c++ section.
      
      * lisp/progmodes/cc-mode.el (c-old-BEG c-old-END): Remove.
      (c-old-END-literality): New variable.
      (c-depropertize-CPP): Remove syntax-table properties from raw strings within
      macros.
      (c-before-change-check-unbalanced-strings): Call
      c-truncate-semi-nonlit-pos-cache to preserve the integrity of the cache.
      (c-before-change-check-unbalanced-strings): Call
      c-truncate-semi-nonlit-pos-cache, largely rewritten.
      (c-after-change-re-mark-unbalanced-strings): Renamed to
      c-after-change-mark-abnormal-strings.  Call c-maybe-re-mark-raw-string.
      29ec1e48
  17. 12 Mar, 2019 1 commit
    • Alan Mackenzie's avatar
      Correct the indentation of CC Mode brace lists · aa1a4cce
      Alan Mackenzie authored
      while preserving the indentation of nested C++ uniform initialization.
      
      * lisp/progmodes/cc-align.el (c-lineup-2nd-brace-entry-in-arglist)
      (c-lineup-class-decl-init-+, c-lineup-class-decl-init-after-brace): New
      indentation functions.
      
      * lisp/progmodes/cc-engine.el (c-forward-class-decl): New function.
      (c-do-declarators): New function, partially extracted from
      c-font-lock-declarators, which now calls the new function.
      (c-inside-bracelist-p): Amend the introductory comment.
      (c-add-stmt-syntax): Add code to prevent the spurious recognition of a
      'defun-block-intro when a brace pair is used as an initializer.
      (c-evaluate-offset): No longer ignore vectors of length >= 2.
      (c-calc-offset): Refactor clumsily nested `if'/`or' into a cond form.
      
      * lisp/progmodes/cc-fonts.el (c-font-lock-declarators): Replace the bulk of
      this function by a call to the new c-forward-class-decl.
      
      * lisp/progmodes/cc-langs.el (c-type-decl-prefix-key): Recognize "~" as a
      type decl operator.
      
      * lisp/progmodes/cc-mode.el (c-fl-decl-start): While searching backward for a
      "}" at an EOD, deal with actually finding the end of a brace list.
      
      * doc/misc/cc-mode.texi (List Line-Up): document
      c-lineup-2nd-brace-entry-in-arglist, c-lineup-class-decl-init-+, and
      c-lineup-class-decl-init-after-brace.
      
      * lisp/progmodes/cc-styles.el (c-style-alist): In styles "gnu", "bsd",
      "stroustrup", "python", and "java", change the offset for brace-list-intro
      from the default value or c-lineup-arglist-intro-after-paren to a list
      beginning with the symbol first, followed by two of the new alignment
      functions, followed by +.
      
      * lisp/progmodes/cc-vars.el (c-offset-alist): Change the default value of
      brace-list-entry from c-lineup-under-anchor back to 0.
      aa1a4cce
  18. 01 Jan, 2019 1 commit
  19. 20 Dec, 2018 1 commit
  20. 10 Dec, 2018 1 commit
  21. 25 Nov, 2018 1 commit
    • Michael Heerdegen's avatar
      Replace insignificant backquotes · 1808d254
      Michael Heerdegen authored
      Replace most insignificant occurrences of '`' with a straight quote,
      sharp quote or nothing.  This includes backquotes in 'pcase' patterns.
      
      * admin/admin.el:
      * lisp/apropos.el:
      * lisp/arc-mode.el:
      * lisp/auth-source.el:
      * lisp/avoid.el:
      * lisp/bindings.el:
      * lisp/bs.el:
      * lisp/calculator.el:
      * lisp/calendar/todo-mode.el:
      * lisp/cedet/semantic.el:
      * lisp/cedet/semantic/analyze/debug.el:
      * lisp/cedet/semantic/bovine.el:
      * lisp/cedet/semantic/dep.el:
      * lisp/cedet/semantic/grammar.el:
      * lisp/cedet/semantic/wisent/comp.el:
      * lisp/cedet/semantic/wisent/grammar.el:
      * lisp/cedet/srecode/mode.el:
      * lisp/cus-edit.el:
      * lisp/doc-view.el:
      * lisp/elec-pair.el:
      * lisp/electric.el:
      * lisp/emacs-lisp/autoload.el:
      * lisp/emacs-lisp/benchmark.el:
      * lisp/emacs-lisp/byte-opt.el:
      * lisp/emacs-lisp/bytecomp.el:
      * lisp/emacs-lisp/cconv.el:
      * lisp/emacs-lisp/cl-extra.el:
      * lisp/emacs-lisp/cl-generic.el:
      * lisp/emacs-lisp/cl-macs.el:
      * lisp/emacs-lisp/copyright.el:
      * lisp/emacs-lisp/debug.el:
      * lisp/emacs-lisp/eieio-compat.el:
      * lisp/emacs-lisp/ert.el:
      * lisp/emacs-lisp/generator.el:
      * lisp/emacs-lisp/inline.el:
      * lisp/emacs-lisp/macroexp.el:
      * lisp/emacs-lisp/map.el:
      * lisp/emacs-lisp/package-x.el:
      * lisp/emacs-lisp/package.el:
      * lisp/emacs-lisp/radix-tree.el:
      * lisp/emacs-lisp/smie.el:
      * lisp/epa.el:
      * lisp/erc/erc-dcc.el:
      * lisp/erc/erc-track.el:
      * lisp/erc/erc.el:
      * lisp/eshell/em-ls.el:
      * lisp/eshell/esh-cmd.el:
      * lisp/files.el:
      * lisp/filesets.el:
      * lisp/font-lock.el:
      * lisp/frameset.el:
      * lisp/gnus/gnus-agent.el:
      * lisp/gnus/gnus-art.el:
      * lisp/gnus/gnus-cite.el:
      * lisp/gnus/gnus-group.el:
      * lisp/gnus/gnus-msg.el:
      * lisp/gnus/gnus-salt.el:
      * lisp/gnus/gnus-srvr.el:
      * lisp/gnus/gnus-sum.el:
      * lisp/gnus/gnus-topic.el:
      * lisp/gnus/gnus-util.el:
      * lisp/gnus/gnus.el:
      * lisp/gnus/message.el:
      * lisp/gnus/mm-util.el:
      * lisp/gnus/mml.el:
      * lisp/gnus/nnheader.el:
      * lisp/gnus/nnimap.el:
      * lisp/gnus/nnmairix.el:
      * lisp/gnus/spam.el:
      * lisp/hexl.el:
      * lisp/hi-lock.el:
      * lisp/ibuf-ext.el:
      * lisp/ibuffer.el:
      * lisp/ido.el:
      * lisp/info.el:
      * lisp/international/mule-cmds.el:
      * lisp/international/mule-util.el:
      * lisp/json.el:
      * lisp/jsonrpc.el:
      * lisp/language/cyrillic.el:
      * lisp/language/european.el:
      * lisp/language/georgian.el:
      * lisp/language/tibetan.el:
      * lisp/language/utf-8-lang.el:
      * lisp/language/vietnamese.el:
      * lisp/ldefs-boot.el:
      * lisp/mail/mail-extr.el:
      * lisp/man.el:
      * lisp/menu-bar.el:
      * lisp/mh-e/mh-acros.el:
      * lisp/mh-e/mh-folder.el:
      * lisp/mh-e/mh-mime.el:
      * lisp/mh-e/mh-show.el:
      * lisp/mh-e/mh-speed.el:
      * lisp/minibuffer.el:
      * lisp/mpc.el:
      * lisp/net/ange-ftp.el:
      * lisp/net/hmac-def.el:
      * lisp/net/newst-backend.el:
      * lisp/net/quickurl.el:
      * lisp/net/tramp-archive.el:
      * lisp/net/tramp-compat.el:
      * lisp/notifications.el:
      * lisp/obsolete/pgg-parse.el:
      * lisp/obsolete/vc-arch.el:
      * lisp/obsolete/xesam.el:
      * lisp/org/ob-C.el:
      * lisp/org/ob-core.el:
      * lisp/org/ob-exp.el:
      * lisp/org/ob-groovy.el:
      * lisp/org/ob-haskell.el:
      * lisp/org/ob-io.el:
      * lisp/org/ob-lisp.el:
      * lisp/org/ob-lob.el:
      * lisp/org/ob-lua.el:
      * lisp/org/ob-octave.el:
      * lisp/org/ob-perl.el:
      * lisp/org/ob-python.el:
      * lisp/org/ob-ref.el:
      * lisp/org/ob-ruby.el:
      * lisp/org/ob-sql.el:
      * lisp/org/org-agenda.el:
      * lisp/org/org-capture.el:
      * lisp/org/org-clock.el:
      * lisp/org/org-colview.el:
      * lisp/org/org-duration.el:
      * lisp/org/org-element.el:
      * lisp/org/org-entities.el:
      * lisp/org/org-gnus.el:
      * lisp/org/org-indent.el:
      * lisp/org/org-info.el:
      * lisp/org/org-inlinetask.el:
      * lisp/org/org-lint.el:
      * lisp/org/org-list.el:
      * lisp/org/org-mouse.el:
      * lisp/org/org-plot.el:
      * lisp/org/org-src.el:
      * lisp/org/org-table.el:
      * lisp/org/org.el:
      * lisp/org/ox-ascii.el:
      * lisp/org/ox-html.el:
      * lisp/org/ox-latex.el:
      * lisp/org/ox-man.el:
      * lisp/org/ox-md.el:
      * lisp/org/ox-org.el:
      * lisp/org/ox-publish.el:
      * lisp/org/ox-texinfo.el:
      * lisp/org/ox.el:
      * lisp/play/bubbles.el:
      * lisp/play/gamegrid.el:
      * lisp/progmodes/autoconf.el:
      * lisp/progmodes/cc-defs.el:
      * lisp/progmodes/cc-engine.el:
      * lisp/progmodes/cc-fonts.el:
      * lisp/progmodes/cc-langs.el:
      * lisp/progmodes/cperl-mode.el:
      * lisp/progmodes/ebrowse.el:
      * lisp/progmodes/elisp-mode.el:
      * lisp/progmodes/flymake-cc.el:
      * lisp/progmodes/flymake.el:
      * lisp/progmodes/fortran.el:
      * lisp/progmodes/grep.el:
      * lisp/progmodes/gud.el:
      * lisp/progmodes/idlwave.el:
      * lisp/progmodes/js.el:
      * lisp/progmodes/m4-mode.el:
      * lisp/progmodes/make-mode.el:
      * lisp/progmodes/mixal-mode.el:
      * lisp/progmodes/modula2.el:
      * lisp/progmodes/octave.el:
      * lisp/progmodes/opascal.el:
      * lisp/progmodes/prolog.el:
      * lisp/progmodes/ps-mode.el:
      * lisp/progmodes/python.el:
      * lisp/progmodes/ruby-mode.el:
      * lisp/progmodes/sh-script.el:
      * lisp/progmodes/sql.el:
      * lisp/progmodes/verilog-mode.el:
      * lisp/ps-mule.el:
      * lisp/rtree.el:
      * lisp/ruler-mode.el:
      * lisp/ses.el:
      * lisp/simple.el:
      * lisp/startup.el:
      * lisp/subr.el:
      * lisp/term/ns-win.el:
      * lisp/textmodes/bibtex.el:
      * lisp/textmodes/conf-mode.el:
      * lisp/textmodes/css-mode.el:
      * lisp/textmodes/refill.el:
      * lisp/textmodes/sgml-mode.el:
      * lisp/textmodes/tex-mode.el:
      * lisp/tutorial.el:
      * lisp/url/url-dav.el:
      * lisp/url/url-gw.el:
      * lisp/url/url-http.el:
      * lisp/url/url-methods.el:
      * lisp/url/url-privacy.el:
      * lisp/vc/cvs-status.el:
      * lisp/vc/diff-mode.el:
      * lisp/vc/ediff-init.el:
      * lisp/vc/ediff-ptch.el:
      * lisp/vc/log-edit.el:
      * lisp/vc/log-view.el:
      * lisp/vc/pcvs-info.el:
      * lisp/vc/pcvs.el:
      * lisp/vc/smerge-mode.el:
      * lisp/vc/vc-git.el:
      * lisp/vc/vc-hg.el:
      * lisp/vc/vc-mtn.el:
      * lisp/vc/vc-rcs.el:
      * lisp/whitespace.el:
      * lisp/window.el:
      * test/lisp/electric-tests.el:
      * test/lisp/emacs-lisp/cl-lib-tests.el:
      * test/lisp/emacs-lisp/ert-tests.el:
      * test/lisp/epg-tests.el:
      * test/lisp/jsonrpc-tests.el:
      * test/src/data-tests.el:
      * test/src/json-tests.el: Replace most insignificant backquotes.
      1808d254
  22. 15 Oct, 2018 1 commit
    • Alan Mackenzie's avatar
      Add ~44 edebug specs to CC Mode. · aba7910e
      Alan Mackenzie authored
      * lisp/progmodes/cc-cmds.el, lisp/progmodes/cc-defs.el
      lisp/progmodes/cc-engine.el, lisp/progmodes/cc-fonts.el
      lisp/progmodes/cc-langs.el: Add lots of edebug specs.
      
      * lisp/progmodes/cc-engine.el (c-state-maybe-marker): Tidy up so as to
      evaluate an argument only once at runtime.
      aba7910e
  23. 20 May, 2018 1 commit
    • Alan Mackenzie's avatar
      Enhance CC Mode's fontification, etc., of unterminated strings. · bb591f13
      Alan Mackenzie authored
      String delimiters, including escaped new lines, of correctly terminated
      strings are left in font-lock-string-face.  All others get
      font-lock-warning-face.  The latter get syntax-table text properties on the
      opening string delim and the "terminating EOL".
      
      Correct two miscellaneous bugs: the handling of text properties on Java Mode's
      generic delimiters; the handling of c-just-done-before-change.
      
      * lisp/progmodes/cc-defs.el (c-point): New position 'eoll "end of logical line".
      (c-characterp): New macro.
      
      * lisp/progmodes/cc-fonts.el (c-font-lock-invalid-string): Removed.
      (c-basic-matchers-before): Use a simple matcher in place of the form around
      c-font-lock-invalid-string.
      
      * lisp/progmodes/cc-langs.el (c-get-state-before-change-functions): Add
      c-before-change-check-unbalanced-strings to the value for all modes except AWK
      Mode.  Also add c-before-change-check-<>-operators to Java Mode, correcting an
      error in that mode's handling of generic delimiters.
      (c-before-font-lock-functions): Add c-after-change-re-mark-unbalanced-strings
      to the value for all modes except AWK Mode.
      (c-single-quotes-quote-strings, c-string-delims): New lang variables for
      future enhancements.
      (c-string-innards-re-alist): New lang variable.
      
      * lisp/progmodes/cc-mode.el (c-just-done-before-change): Do not set this
      variable when a change is the alteration of text properties.
      (c-basic-common-init): Set parse-sexp-lookup-properties (and the XEmacs
      equivalent) also for Pike Mode.
      (c-neutralize-CPP-line): No longer neutralize unbalanced quotes here.
      (c-unescaped-nls-in-string-p, c-multiline-string-start-is-being-detached)
      (c-pps-to-string-delim, c-before-change-check-unbalanced-strings)
      (c-after-change-re-mark-unbalanced-strings): New functions.
      (c-after-change): Fix a bug with the handling of c-just-done-before-change.
      bb591f13
  24. 02 Feb, 2018 1 commit
    • Alan Mackenzie's avatar
      CC Mode: Fix an enum intro being parsed as defun-block-intro · d3090a3a
      Alan Mackenzie authored
      * lisp/progmodes/cc-engine.el (c-inside-bracelist-p): Return a bufpos rather
      than t for the enum case.
      (c-add-stmt-syntax, c-guess-continued-construct): Replace
      c-looking-at-or-maybe-in-bracelist by c-inside-bracelist-p, since the former
      does not recognize enum brace lists, but the latter does.
      
      * lisp/progmodes/cc-fonts.el (c-get-fontification-context): Replace
      c-looking-at-or-maybe-in-bracelist by c-inside-bracelist-p.
      d3090a3a
  25. 01 Jan, 2018 1 commit
  26. 21 Dec, 2017 1 commit
  27. 13 Dec, 2017 1 commit
    • Alan Mackenzie's avatar
      Don't misfontify "foo ()" inside C++ initialization parentheses as a type · 4cb8696e
      Alan Mackenzie authored
      Also recognize and handle function names introduced by "extern" inside a
      function.
      
      * lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): Add a new element to
      the result list which is t when our declaration is, or is to be treated as,
      being at top level.
      
      * lisp/progmodes/cc-fonts.el (c-get-fontification-context): Detect being
      inside a C++ uniform initialization and return (not-decl nil) for this case.
      (c-font-lock-declarations): Use the new element 4 of the result of
      c-forward-decl-or-cast-1.
      
      * lisp/progmodes/cc-langs.el (c-make-top-level-kwds, c-make-top-level-key):
      New lang consts/vars.
      4cb8696e
  28. 26 Oct, 2017 1 commit
    • Alan Mackenzie's avatar
      Fix another "wrong side of point" error in CC Mode. · ad68bbd0
      Alan Mackenzie authored
      This fixes (a follow-up to) bug #28850.
      A internal generated form for scanning text to fontify had a LIMIT parameter.
      It also locally bound LIMIT to a value possibly beyond the original LIMIT,
      allowing point to move beyond the original LIMIT, and to create the wrong side
      error.  Fix it by checking point is not beyond LIMIT in the outer context
      before using it.
      
      * lisp/progmodes/cc-fonts.el (c-make-font-lock-search-form): Add a new
      parameter CHECK-POINT which, when non-nil, directs the function to generate a
      check on point.
      (c-make-font-lock-context-search-function): Invoke the above function with new
      argument value t.
      ad68bbd0
  29. 25 Oct, 2017 1 commit
    • Alan Mackenzie's avatar
      Fix a "wrong side of point" error in CC Mode. Fixes bug #28850. · 46540a1c
      Alan Mackenzie authored
      The cause was a scanning over a bracket pair taking us beyond the supplied
      LIMIT parameter in c-forward-declarator.
      
      * lisp/progmodes/cc-engine.el (c-forward-declarator): Add three checks (<
      (point) limit) whilst dealing with tokens after the declared identifier.
      
      * lisp/progmodes/cc-fonts.el (c-font-lock-declarators): Don't supply a LIMIT
      argument to `c-forward-declarator' (twice), since we want to fontify up till
      the end of a declarator, not an arbitrary jit-lock chunk end.
      46540a1c
  30. 22 Oct, 2017 1 commit
    • Alan Mackenzie's avatar
      Refactor c-forward-token-2 with new function c-forward-over-token-and-ws. · b7c4aa95
      Alan Mackenzie authored
      Use the new function directly in several places where c-forward-token-2
      wouldn't move over the last token in the buffer.  This caused an infinite loop
      in c-restore-<>-properties.
      
      * lisp/progmodes/cc-engine.el (c-forward-over-token-and-ws): New function,
      extracted from c-forward-token-2.
      (c-forward-token-2): Refactor, calling the new function.
      (c-restore-<>-properties): Fix infinite loop.
      (c-forward-<>-arglist-recur, c-in-knr-argdecl)
      (c-looking-at-or-maybe-in-bracelist): Call the new function directly in place
      of c-forward-token-2.
      
      * lisp/progmodes/cc-cmds.el (c-defun-name) Call the new function directly in
      place of c-forward-token-2.
      
      * lisp/progmodes/cc-fonts.el (c-font-lock-enclosing-decls): Call the new
      function directly in place of c-forward-token-2.
      b7c4aa95
  31. 05 Oct, 2017 1 commit
    • Alan Mackenzie's avatar
      Fix irregularities with CC Mode fontification, particularly with "known types" · 57ab49f7
      Alan Mackenzie authored
      * lisp/progmodes/cc-fonts.el (c-font-lock-declarators): Introduce a new
      optional parameter, template-class.  In "class <X = Y>", fontify "Y" as a
      type.
      (c-font-lock-single-decl): New variable template-class, set to non-nil when we
      have a construct like the above.  Pass this as argument to
      c-font-lock-declarators.
      (c-font-lock-cut-off-declarators): Check more rigorously that a declaration
      being processed starts before the function's starting position.
      (c-complex-decl-matchers): Remove the redundant clause which fontified "types
      preceded by, e.g., "struct"".
      
      * lisp/progmodes/cc-langs.el (c-template-typename-kwds)
      (c-template-typename-key): New lang defconsts and defvar.
      57ab49f7
  32. 18 Sep, 2017 1 commit
    • Alan Mackenzie's avatar
      Fix irregularities with CC Mode fontification, particularly with "known types" · 61a5c30e
      Alan Mackenzie authored
      * lisp/progmodes/cc-fonts.el (c-font-lock-declarators): Introduce a new
      optional parameter, template-class.  In "class <X = Y>", fontify "Y" as a
      type.
      (c-font-lock-single-decl): New variable template-class, set to non-nil when we
      have a construct like the above.  Pass this as argument to
      c-font-lock-declarators.
      (c-font-lock-cut-off-declarators): Check more rigorously that a declaration
      being processed starts before the function's starting position.
      (c-complex-decl-matchers): Remove the redundant clause which fontified "types
      preceded by, e.g., "struct"".
      
      * lisp/progmodes/cc-langs.el (c-template-typename-kwds)
      (c-template-typename-key): New lang defconsts and defvar.
      61a5c30e
  33. 13 Sep, 2017 1 commit
    • Paul Eggert's avatar
      Prefer HTTPS to FTP and HTTP in documentation · bc511a64
      Paul Eggert authored
      Most of this change is to boilerplate commentary such as license URLs.
      This change was prompted by ftp://ftp.gnu.org's going-away party,
      planned for November.  Change these FTP URLs to https://ftp.gnu.org
      instead.  Make similar changes for URLs to other organizations moving
      away from FTP.  Also, change HTTP to HTTPS for URLs to gnu.org and
      fsf.org when this works, as this will further help defend against
      man-in-the-middle attacks (for this part I omitted the MS-DOS and
      MS-Windows sources and the test tarballs to keep the workload down).
      HTTPS is not fully working to lists.gnu.org so I left those URLs alone
      for now.
      bc511a64
  34. 31 Aug, 2017 1 commit
  35. 27 Jul, 2017 2 commits
    • Alan Mackenzie's avatar
      Fix C++ class initializers not always being fontified at mode start. · eaa5dc9d
      Alan Mackenzie authored
      The problem here happened when an "outer list" of declarations moved beyond an
      "inner list" containing class initializers.  These weren't being checked for
      by the code.
      
      Also, fix places in c-get-fontification-context where point is undefined.
      
      * lisp/progmodes/cc-fonts.el (c-get-fontification-context): when argument
      not-front-decl is set, test for class initializers.  Also, anchor point in
      places where it is moved and is otherwise undefined.
      eaa5dc9d
    • Alan Mackenzie's avatar
      Fix variables in C++ "for" statement not always being fontified. · 30e6e558
      Alan Mackenzie authored
      The error happened when there was a comma inside template delimiters.
      
      * lisp/progmodes/cc-fonts.el (c-get-fontification-context): In "for"
      statements, recognise template delimiters containing "," and "&".
      30e6e558
  36. 01 Jul, 2017 1 commit
    • Alan Mackenzie's avatar
      Make C++ digit separators work. Amend the handling of single quotes generally · 59d07875
      Alan Mackenzie authored
      Single quotes, even in strings and comments, are now marked with the
      "punctuation" syntax-table property, except where they are validly bounding a
      character literal.  They are font locked with font-lock-warning-face except
      where they are valid.  This is done in C, C++, ObjC, and Java Modes.
      
      * lisp/progmodes/cc-defs.el (c-clear-char-property-with-value-on-char-function)
      (c-clear-char-property-with-value-on-char, c-put-char-properties-on-char): New
      functions/macros.
      
      * lisp/progmodes/cc-fonts.el (c-font-lock-invalid-single-quotes): New function.
      (c-basic-matchers-before): invoke c-font-lock-invalid-single-quotes.
      
      * lisp/progmodes/cc-langs.el (c-get-state-before-change-functions): Remove
      c-before-after-change-digit-quote from wherever it occurs.  Insert
      c-parse-quotes-before-change into the entries for the languages where it is
      needed.
      (c-before-font-lock-functions): Remove c-before-after-change-digit-quote from
      wherever it occurs.  Insert c-parse-quotes-after-change into the entries for
      the languages which need it.
      (c-has-quoted-numbers): New lang-defconst/-defvar.
      
      * lisp/progmodes/cc-mode.el (c-before-after-change-digit-quote): Remove.
      (c-maybe-quoted-number-head, c-maybe-quoted-number-tail)
      (c-maybe-quoted-number): New defconsts.
      (c-quoted-number-head-before-point, c-quoted-number-tail-after-point)
      (c-quoted-number-straddling-point, c-parse-quotes-before-change)
      (c-parse-quotes-after-change): New functions.
      59d07875
  37. 25 Jun, 2017 2 commits
    • Stefan Monnier's avatar
      * lisp/progmodes/cc-fonts.el: Remove/mark unused vars · ebb4e61c
      Stefan Monnier authored
      (c-font-lock-declarators): Remove unused vars `id-end', `paren-depth',
      and `brackets-after-id'.
      (c-font-lock-objc-methods): Mark unused args.
      ebb4e61c
    • Alan Mackenzie's avatar
      Make CC Mode load cl-lib rather than cl in Emacs 26. · b0042b76
      Alan Mackenzie authored
      * lisp/progmodes/cc-cmds.el (c-declaration-limits): Remove unused local
      variable.
      
      * lisp/progmodes/cc-defs.el (c--mapcan-status): Remove.
      (c--cl-library): New variable.
      (Top level): Amend the form which requires library cl or cl-lib.
      (c--mapcan, c--set-difference, c--intersection, c--macroexpand-all)
      (c--delete-duplicate): Amend to use c--cl-library instead of
      c--mapcan-status.
      
      * lisp/progmodes/cc-engine.el (c-syntactic-skip-backward)
      (c-back-over-compound-identifier): Remove unused local variables.
      
      * lisp/progmodes/cc-fonts.el (c-font-lock-declarations): Remove an unused
      local variable.
      
      * lisp/progmodes/cc-langs.el (Top level): Amend to use c--cl-library instead
      of c--mapcan-status.
      
      * lisp/progmodes/cc-styles.el (Top level): Add a cc-bytecomp-defun to try to
      silence a compiler warning.
      b0042b76