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
      (c-cpp-matchers): Call c-maybe-font-lock-wrong-style-comments when
      * lisp/progmodes/cc-vars.el (c-mark-wrong-style-of-comment): New customizable
      * 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
      (Wrong Comment Style): New page.
  2. 12 Oct, 2019 1 commit
    • Alan Mackenzie's avatar
      CC-Mode: Remove unneeded backslashes from doc strings and regular expressions · 55fdbec4
      Alan Mackenzie authored
      Also make miscellaneous amendments.
      * lisp/progmodes/cc-align.el, lisp/progmodes/cc-cmds.el
      * lisp/progmodes/cc-defs.el, lisp/progmodes/cc-engine.el
      * lisp/progmodes/cc-langs.el, lisp/progmodes/cc-vars.el: Remove lots of
      unneeded backslashes.
      * lisp/progmodes/cc-langs.el (c-string-innards-re-alist): Remove redundant
      "\\|\r" from regular expression.
      * lisp/progmodes/cc-mode.el (c-make-mode-syntax-table): Correct the name of
      the hook normal-erase-is-backspace-MODE-hook from a non-existant hook name.
  3. 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
  4. 02 Jun, 2019 1 commit
    • Alan Mackenzie's avatar
      Change default offset of CC Mode syntactic symbol inlambda to 0 · 30b0c5bf
      Alan Mackenzie authored
      It's previous default was c-lineup-inexpr-block.  This change is mainly to
      prevent excessive indentation of the innards of C++ lambda functions.
      * lisp/progmodes/cc-vars.el (c-offsets-alist): Amend the offset for inlambda
      to 0.
      * doc/misc/cc-mode.texi (FAQ): Amend the answer to the question about this
  5. 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)
      * lisp/progmodes/cc-engine.el (c-beginning-of-statement-1)
      (c-forward-<>-arglist-recur, c-forward-decl-or-cast-1)
      * lisp/progmodes/cc-fonts.el (c-doc-line-join-re)
      * lisp/progmodes/cc-langs.el (c-populate-syntax-table)
      (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)
      * 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.
  6. 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
      * 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.
  7. 17 Feb, 2019 1 commit
    • Alan Mackenzie's avatar
      Fontify C function identifiers in parentheses correctly (e.g. in lisp.h) · adeea448
      Alan Mackenzie authored
      Fix handling of CC Mode's syntactic WS cache.  Make noise-macro option
      variables buffer local.
      * lisp/progmodes/cc-engine.el (c-put-is-sws, c-put-in-sws, c-remove-is-sws)
      (c-remove-in-sws c-remove-is-and-in-sws): Add edebug specs.
      (c-invalidate-sws-region-before): Add a `beg' parameter.  Handle noise
      macros like other literals.
      (c-invalidate-sws-region-after-del): Move the adjustment of (cdr
      c-sws-lit-limits) due to buffer change to c-invalidate-sws-region-after.
      (c-invalidate-sws-region-after-ins): Move (goto-char end) to the correct
      (c-invalidate-sws-region-after): Adjust (cdr c-sws-lit-limits) due to buffer
      change.  Handle noise macros.
      (c-backward-sws): Set simple-ws-beg appropriately when the start point is in
      the middle of a noise macro.
      (c-forward-decl-or-cast-1): Recognize a function identifier being declared in
      * lisp/promodes/cc-mode.el (c-before-change): Supply a `beg' argument to
      * lisp/progmodes/cc-vars.el (c-noise-macro-with-parens-name-re)
      (c-noise-macro-name-re, c-noise-macro-names, c-noise-macro-with-parens-names):
      Make these buffer local variables.
  8. 01 Jan, 2019 1 commit
  9. 02 Apr, 2018 1 commit
  10. 28 Mar, 2018 1 commit
    • Alan Mackenzie's avatar
      Replace faulty non-matching regexp "\\<\\>" with "a\\`" · 3ccbe1f4
      Alan Mackenzie authored
      The regexp "\\<\\>", which is supposed never to match, actually matches, for
      instance, where a Chinese character is directly followed by an ASCII letter.
      So, replace it with "a\\`".
      * lisp/progmodes/cc-defs.el (cc-fix, c-make-keywords-re)
      * lisp/progmodes/cc-engine.el (c-beginning-of-statement-1)
      (c-forward-<>-arglist-recur, c-forward-decl-or-cast-1)
      * lisp/progmodes/cc-langs.el (c-assignment-op-regexp)
      (c-block-comment-ender-regexp, 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-vars.el (c-noise-macro-with-parens-name-re)
      Replace "\\<\\>" by "a\\`".
  11. 01 Jan, 2018 1 commit
  12. 13 Dec, 2017 3 commits
    • Glenn Morris's avatar
      Fixes for defcustoms, prompted by cus-test-opts · ce31e726
      Glenn Morris authored
      * lisp/files.el (save-some-buffers-default-predicate):
      * lisp/time.el (display-time-world-list):
      * lisp/gnus/gnus-art.el (gnus-article-show-cursor):
      * lisp/progmodes/cc-vars.el (c-noise-macro-with-parens-names):
      * lisp/progmodes/verilog-mode.el (verilog-auto-wire-type):
      * lisp/textmodes/less-css-mode.el (less-css-output-directory)
      (less-css-output-file-name, less-css-input-file-name):
      * lisp/vc/emerge.el (emerge-metachars):
      * lisp/vc/vc-hg.el (vc-hg-symbolic-revision-styles):
      Fix :types.
      * lisp/net/newst-backend.el (newsticker-url-list-defaults): Fix url.
    • Glenn Morris's avatar
      Add missing :version tags revealed by cusver-check · 52d2a690
      Glenn Morris authored
      * lisp/comint.el (comint-move-point-for-matching-input):
      * lisp/epa.el (epa-replace-original-text):
      * lisp/image-dired.el (image-dired-cmd-optipng-program)
      * lisp/emacs-lisp/bytecomp.el (byte-compile-cond-use-jump-table):
      * lisp/gnus/gnus-cloud.el (gnus-cloud-storage-method)
      * lisp/net/mailcap.el (mailcap-user-mime-data):
      * lisp/progmodes/cc-vars.el (c-asymmetry-fontification-flag)
      (c-noise-macro-names, c-noise-macro-with-parens-names):
      * lisp/progmodes/flymake.el (flymake-start-on-flymake-mode)
      * lisp/progmodes/grep.el (grep-use-null-filename-separator):
      * lisp/progmodes/js.el (js-indent-align-list-continuation):
      * lisp/progmodes/perl-mode.el (perl-flymake-command):
      * lisp/progmodes/python.el (python-flymake-command)
      (python-flymake-command-output-pattern, python-flymake-msg-alist):
      * lisp/progmodes/ruby-mode.el (ruby-flymake-use-rubocop-if-available)
      * lisp/textmodes/less-css-mode.el (less-css):
      * lisp/textmodes/tex-mode.el (tex-chktex-program)
      (tex-chktex-extra-flags): Add missing :version tags.
    • Glenn Morris's avatar
      Escape column-zero doc parens · f5d03602
      Glenn Morris authored
      * lisp/htmlfontify.el (hfy-display-class):
      * lisp/calendar/icalendar.el (icalendar--do-create-ical-alarm):
      * lisp/net/shr.el (shr-external-rendering-functions):
      * lisp/progmodes/cc-vars.el (c-asymmetry-fontification-flag):
      * lisp/textmodes/tildify.el (tildify-tildify):
      Escape column-zero doc parens.  A shame bug#21871 remains unfixed.
  13. 24 Nov, 2017 1 commit
  14. 10 Oct, 2017 1 commit
  15. 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.
  16. 05 Jul, 2017 1 commit
  17. 30 Mar, 2017 1 commit
    • Alan Mackenzie's avatar
      Fix C++ fontification problems 500 bytes after typing a space, and other bugs · ef7df187
      Alan Mackenzie authored
      Also implement the "asymmetric space" rule for fontifying otherwise
      * lisp/progmodes/cc-engine.el (c-before-change-check-<>-operators): Don't set
      c-new-BEG or c-new-END when there is no need.
      (c-forward-decl-or-cast-1): Add "CASE 17.5" to implement the "asymmetric
      space" rule.
      * lisp/progmodes/cc-fonts.el (c-get-fontification-context): New function,
      extracted from c-font-lock-declarations.  Add to this function processing to
      make `context' 'decl for lines contained within parens when these are also
      (c-font-lock-declarations): Call the newly extracted function above in place
      of inline code.
      * lisp/progmodes/cc-mode.el (c-fl-decl-start): Set point before calling
      * lisp/progmodes/cc-vars.el (c-asymmetry-fontification-flag): New user option.
      * doc/misc/cc-mode.texi (Misc Font Locking): New node documenting the new
      "asymmetric fontification" rule, including the variable
  18. 01 Feb, 2017 1 commit
    • Alan Mackenzie's avatar
      Allow C++ nested brace-list-entries to be better indented. · 94ad13b9
      Alan Mackenzie authored
      This fixes bug #24431.  The key change of this bug fix is correctly analyzing
      nested brace lists when the opening element stands on the same line as both
      its introductory brace and an enclosing parameter list parenthesis.
      * list/progmodes/cc-align.el (c-lineup-under-anchor): New line-up function.
      * list/progmodes/cc-engine.el (c-looking-at-or-maybe-in-bracelist): Accept the
      presence of exactly an identifier between an open parenthesis and an open
      brace as evidence of the brace starting a brace list.
      (c-looking-at-statement-block): New function, extracted from
      c-looking-at-inexpr-block.  Enhance it to analyze inner blocks recursively
      when needed.
      (c-looking-at-inexpr-block): Extract new function (see above) and call it.
      (c-add-stmt-syntax): Enhance, with new &optional parameter, to supply the
      prime syntactic symbol with a fixed anchor point.  When this is used, restrict
      all added syntactic symbols to those having an anchor point on the same line.
      Add, in addition to the current additional symbols, c-brace-list-entry when
      needed; use c-looking-at-statement-block to determine the latter.
      (c-guess-basic-syntax, CASE 9D): Use c-add-stmt-syntax rather than just
      c-add-syntax, to assemble the syntactic context of a 'brace-list-entry, thus
      getting, possibly, several accompanying syntactic entries.
      * lisp/progmodes/cc-styles.el (c-style-alist, "gnu" style): New entry for
      'brace-list-intro, namely c-lineup-arglist-intro-after-paren.
      * lisp/progmodes/cc-vars.el (c-offsets-alist): Change the factory default
      offset for 'brace-list-entry from 0 to c-lineup-under-anchor.
      * doc/misc/cc-mode.texi (Syntactic Symbols): Amend the definition of
      (Brace List Symbols): Amend the example to show the new analysis of brace
      lists when the first element comes on the same line as the opening brace.
      (Misc Line-Up): Document the new line-up function c-lineup-under-anchor.
  19. 01 Jan, 2017 1 commit
  20. 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
      * doc/misc/cc-mode.texi (Macros with ;): Enhance, stating that configuring
      macros with semicolon can prevent C-M-a missing the beginning of defun.
  21. 10 Jun, 2016 2 commits
    • Glenn Morris's avatar
      Leading "*" in the doc of defvars is long obsolete. · b27c670b
      Glenn Morris authored
      * lisp/plstore.el (plstore-encrypt-to):
      * lisp/cedet/semantic/lex-spp.el
      * lisp/cedet/semantic/symref.el (semantic-symref-tool):
      * lisp/cedet/semantic/bovine/el.el
      * lisp/cedet/semantic/wisent/comp.el (wisent-verbose-flag)
      * lisp/cedet/semantic/wisent/wisent.el (wisent-parse-verbose-flag):
      * lisp/gnus/gnus-agent.el (gnus-category-menu-hook):
      * lisp/gnus/gnus-group.el (gnus-group-listing-limit):
      * lisp/gnus/gnus-srvr.el (gnus-server-menu-hook)
      * lisp/gnus/message.el (message-shoot-gnksa-feet):
      * lisp/gnus/mm-decode.el (mm-path-name-rewrite-functions):
      * lisp/gnus/mm-util.el (mm-extra-numeric-entities):
      * lisp/gnus/mm-view.el (mm-w3m-standalone-supports-m17n-p):
      * lisp/gnus/mml.el (mml-generate-multipart-alist):
      * lisp/gnus/nndraft.el (nndraft-required-headers):
      * lisp/gnus/nnheader.el (nnheader-max-head-length)
      (nnheader-head-chop-length, nnheader-file-name-translation-alist)
      * lisp/gnus/nnmail.el (nnmail-pathname-coding-system)
      * lisp/gnus/nnrss.el (nnrss-file-coding-system):
      * lisp/gnus/nntp.el (nntp-record-commands):
      * lisp/gnus/score-mode.el (gnus-score-edit-done-hook)
      (gnus-score-mode-hook, gnus-score-menu-hook):
      * lisp/mail/rfc2047.el (rfc2047-header-encoding-alist)
      * lisp/mh-e/mh-alias.el (mh-alias-system-aliases):
      * lisp/mh-e/mh-e.el (mh-mail-header-separator, mh-x-mailer-string):
      * lisp/mh-e/mh-scan.el (mh-scan-format-mh, mh-scan-format-nmh):
      * lisp/net/pop3.el (pop3-password):
      * lisp/play/animate.el (animate-n-steps):
      * lisp/progmodes/cc-vars.el (c-old-style-variable-behavior):
      Convert from defvar with leading * to defcustom.
      ; * lisp/cedet/semantic/lex.el: Comments.
      * lisp/emulation/viper-init.el (viper-heading-end):
      * lisp/gnus/mm-url.el (mm-url-html-entities):
      * lisp/gnus/nnmaildir.el (nnmaildir-article-file-name):
      * lisp/mh-e/mh-e.el (mh-invisible-header-fields-compiled):
      * lisp/net/tramp-adb.el (tramp-adb-method): Remove leading * from doc.
      * lisp/gnus/messcompat.el: Mark (pointless) file not for compilation.
      (message-from-style, message-interactive, message-indentation-spaces)
      (message-signature, message-signature-file):
      Remove settings that match the defaults.
      (message-setup-hook, message-mode-hook, message-default-headers)
      (message-send-hook, message-send-mail-function):
      Just use setq rather than redefining.
      * lisp/gnus/nnrss.el (nnrss):
      * lisp/mail/rfc2047.el (rfc2047):
      * lisp/play/animate.el (animate): New custom groups.
    • Glenn Morris's avatar
      Remove obsolete leading * from defcustom, defface doc strings. · f9af5edd
      Glenn Morris authored
      * lisp/cedet/ede/linux.el, lisp/cedet/ede/project-am.el:
      * lisp/cedet/ede/simple.el, lisp/cedet/semantic/bovine/c.el:
      * lisp/cedet/semantic/complete.el, lisp/cedet/semantic/db.el:
      * lisp/cedet/semantic/decorate/include.el:
      * lisp/cedet/semantic/decorate/mode.el, lisp/cedet/semantic/format.el:
      * lisp/cedet/semantic/ia.el, lisp/cedet/semantic/idle.el:
      * lisp/cedet/semantic/imenu.el, lisp/cedet/semantic/lex-spp.el:
      * lisp/cedet/semantic/mru-bookmark.el, lisp/cedet/semantic/sb.el:
      * lisp/cedet/srecode/fields.el, lisp/ecomplete.el:
      * lisp/gnus/gnus-agent.el, lisp/gnus/gnus-art.el:
      * lisp/gnus/gnus-async.el, lisp/gnus/gnus-cache.el:
      * lisp/gnus/gnus-cite.el, lisp/gnus/gnus-delay.el:
      * lisp/gnus/gnus-diary.el, lisp/gnus/gnus-dup.el:
      * lisp/gnus/gnus-fun.el, lisp/gnus/gnus-group.el:
      * lisp/gnus/gnus-kill.el, lisp/gnus/gnus-msg.el:
      * lisp/gnus/gnus-picon.el, lisp/gnus/gnus-salt.el:
      * lisp/gnus/gnus-score.el, lisp/gnus/gnus-start.el:
      * lisp/gnus/gnus-sum.el, lisp/gnus/gnus-topic.el:
      * lisp/gnus/gnus-util.el, lisp/gnus/gnus-uu.el, lisp/gnus/gnus-win.el:
      * lisp/gnus/gnus.el, lisp/gnus/mail-source.el, lisp/gnus/message.el:
      * lisp/gnus/mm-url.el, lisp/gnus/mm-uu.el, lisp/gnus/mml.el:
      * lisp/gnus/nndiary.el, lisp/gnus/nnir.el, lisp/gnus/nnmail.el:
      * lisp/gnus/smiley.el, lisp/gnus/smime.el, lisp/mail/mail-extr.el:
      * lisp/mh-e/mh-e.el, lisp/net/mailcap.el, lisp/net/pop3.el:
      * lisp/net/starttls.el, lisp/progmodes/cc-vars.el:
      * lisp/progmodes/cperl-mode.el, test/manual/cedet/tests/test.el:
      Remove obsolete leading * from defcustom, defface doc strings.
  22. 16 May, 2016 1 commit
  23. 09 May, 2016 2 commits
    • Alan Mackenzie's avatar
      Add some "safe-local-variable" declarations for compatibility with master. · e58f900e
      Alan Mackenzie authored
      These enable C files from the master repository to be visited in Emacs 25
      without generating irritating questions about configuration variable safety.
      * lisp/progmodes/cc-vars.el: (c-string-list-p, c-string-or-string-list-p): New
      (c-noise-macro-names, c-noise-macro-with-parens-names): give the
      safe-local-variable property c-string-list-p.
      (c-macro-names-with-semicolon): give the safe-local-variable property
    • Alan Mackenzie's avatar
      CC Mode now uses the new :after-hook feature of define-derived-mode · a8231e00
      Alan Mackenzie authored
      It now runs internal variable setting functions after the mode hooks, no
      longer runs the mode hooks twice, and declares the configuration variables for
      noise macros and macros with semicolons as safe variables (when given suitable
      Fixes bug #16759 and bug #23476.
      * .dir-locals: Put the c-noise-macros-with-paren-names setting back into the C
      Mode value.
      * lisp/progmodes/cc-mode.el: (c-basic-common-init): Remove the call to
      (c-mode, c++-mode, objc-mode, java-mode, idl-mode, pike-mode, awk-mode): Move
      c-make-noise-macro-regexps and c-make-macro-with-semi-re (where appropriate)
      and c-update-modeline into the :after-hook form.  Remove the explicit settings
      of the syntax table, the abbreviation table and the local key map, since they
      duplicate forms generated by define-derived-mode.  Remove the explicit
      invocation of each mode's mode hook, since they duplicate ones generated by
      * lisp/progmodes/cc-vars.el: (c-string-list-p, c-string-or-string-list-p): New
      (c-noise-macro-names, c-noise-macro-with-parens-names): give the
      save-local-variable property c-string-list-p.
      (c-macro-names-with-semicolon): give the save-local-variable property
      * doc/misc/cc-mode.texi: (Macros with ;, Noise Macros): Note that it's not
      necessary to call the regexp generating functions after setting the pertinent
      configuration values in a mode hook.
  24. 04 Apr, 2016 1 commit
  25. 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'
      * lisp/progmodes/cc-fonts.el (c-complex-decl-matchers): The same as for
      * lisp/progmodes/cc-mode.el (c-basic-common-init): Add call to
      (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.
  26. 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
  27. 01 Jan, 2016 1 commit
  28. 17 Sep, 2015 1 commit
    • Paul Eggert's avatar
      Backslash cleanup in Elisp source files · 284c470e
      Paul Eggert authored
      This patch should not change behavior.  It typically omits backslashes
      where they are redundant (e.g., in the string literal "^\$").
      In a few places, insert backslashes where they make regular
      expressions clearer: e.g., replace "^\*" (equivalent to "^*") with
      "^\\*", which has the same effect as a regular expression.
      Also, use ‘\ %’ instead of ‘\%’ when avoiding confusion with SCCS IDs,
      and similarly use ‘\ $’ instead of ‘\$’ when avoiding confusion with
      RCS IDs, as that makes it clearer that the backslash is intended.
  29. 03 Sep, 2015 1 commit
    • Paul Eggert's avatar
      Fix some more docstring etc. quoting problems · 26bd978d
      Paul Eggert authored
      Mostly these fixes prevent the transliteration of apostrophes
      that should stay apostrophes.  Also, prefer curved quotes in
      Bahá’í proper names, as that’s the preferred Bahá’í style and
      these names are chock-full of non-ASCII characters anyway.
      * lisp/emacs-lisp/eieio-core.el (eieio-defclass-autoload)
      * lisp/emacs-lisp/eieio.el (defclass):
      * lisp/hi-lock.el (hi-lock-mode):
      Don’t transliterate Lisp apostrophes when generating a
      doc string or diagnostic.
      * lisp/international/mule-diag.el (list-coding-systems-1):
      * lisp/international/ogonek.el (ogonek-jak, ogonek-how):
      * lisp/mail/sendmail.el (sendmail-query-user-about-smtp):
      * lisp/vc/ediff-mult.el (ediff-redraw-registry-buffer):
      * lisp/vc/ediff-ptch.el (ediff-fixup-patch-map):
      Substitute quotes before putting them in the help buffer.
  30. 22 Aug, 2015 1 commit
    • Stefan Monnier's avatar
      * lisp/progmodes/cc-*.el: Fix up commenting style · 18371ed2
      Stefan Monnier authored
      * lisp/progmodes/cc-vars.el, lisp/progmodes/cc-styles.el:
      * lisp/progmodes/cc-mode.el, lisp/progmodes/cc-menus.el:
      * lisp/progmodes/cc-langs.el, lisp/progmodes/cc-guess.el:
      * lisp/progmodes/cc-fonts.el, lisp/progmodes/cc-engine.el:
      * lisp/progmodes/cc-defs.el, lisp/progmodes/cc-cmds.el:
      * lisp/progmodes/cc-bytecomp.el, lisp/progmodes/cc-awk.el:
      * lisp/progmodes/cc-align.el, lisp/net/soap-client.el:
      Fix up commenting style.
  31. 01 Jan, 2015 2 commits
  32. 01 Dec, 2014 1 commit
    • Stefan Monnier's avatar
      Merge some of the differences from the standalone CC-mode. · 51750532
      Stefan Monnier authored
      The main change is to only use the `category' text-property only when
      available.  For that many calls are changed to use c-get-char-property,
      c-next-single-property-change, c-sc-scan-lists,
      c-sc-parse-partial-sexp, c-unmark-<->-as-paren.
      * lisp/progmodes/cc-align.el (c-lineup-respect-col-0): New function.
      * lisp/progmodes/cc-cmds.el (c-forward-into-nomenclature)
      (c-backward-into-nomenclature): Use cc-subword if subword-mode is
      not available.
      (c-beginning-of-defun, c-end-of-defun, c-mark-function)
      (c-indent-line-or-region): Use c-region-is-active-p.
      * lisp/progmodes/cc-defs.el (c-version): Bump up to 5.33.
      (c-use-category): New const.
      (c-next-single-property-change): New macro.
      (c-region-is-active-p): Prefer region-active-p when available.
      (c-search-backward-char-property): Fix old min/max typo; probably
      a copy/paste error.
      (c-mark-<-as-paren, c-mark->-as-paren, c-unmark-<->-as-paren):
      Turn them into macros that obey c-use-category.
      (c-sc-scan-lists-no-category+1+1, c-sc-scan-lists-no-category+1-1)
      (c-sc-scan-lists-no-category-1+1, c-sc-scan-lists-no-category-1-1)
      (c-sc-scan-lists, c-sc-parse-partial-sexp)
      (c-looking-at-non-alphnumspace): New macros.
      (c-sc-parse-partial-sexp-no-category): New function.
      (c-emacs-features): Add `category-properties' element.
      * lisp/progmodes/cc-engine.el (c-invalidate-state-cache, c-parse-state):
      Handle the case where categories are not available.
      (c-record-parse-state-state, c-replay-parse-state-state):
      Handle marker values.
      (c-before-change-check-<>-operators): Look for the `syntax-table'
      property rather than for the corresponding `category'.
      (c-looking-at-decl-block): Remove unused var
      (c-forward-<>-arglist-recur): Remove unused var
      * lisp/progmodes/cc-langs.el (c-modified-constant): New lang var.
      (c-known-type-key): Don't make a list just to throw it away.
      * lisp/progmodes/cc-bytecomp.el (cc-bytecomp-unbound-variables)
      (cc-bytecomp-original-functions, cc-bytecomp-original-properties)
      (cc-bytecomp-loaded-files): Re-set each time the file is loaded.
      (cc-bytecomp-obsolete-var, cc-bytecomp-ignore-obsolete)
      (cc-bytecomp-obsolete-fun): Delete unused functions.
      * lisp/progmodes/cc-mode.el (c-just-done-before-change): New var.
      (c-basic-common-init): Initialize it.
      (c-common-init): Only use mode-require-final-newline when available.
      (c-before-change): Check and set c-just-done-before-change.
      (c-after-change): Re-set c-just-done-before-change.
      (c-advise-fl-for-region): New macro.
      (lazy-lock-defer-rest-after-change, lazy-lock-defer-line-after-change)
      (font-lock-after-change-function, jit-lock-after-change):
      Advise if needed.
  33. 04 Oct, 2014 1 commit
    • Stefan Monnier's avatar
      Merge trivially safe differences from standalone CC-mode. · 03c45536
      Stefan Monnier authored
      * lisp/progmodes/cc-mode.el (c-initialize-cc-mode): Don't quote a symbol
      just to then pass it to `symbol-value'.
      (prog-mode): Provide fallback definition, if needed.
      * lisp/progmodes/cc-langs.el: Always load `cl'.  Don't load `cl-lib'.
      Remove "cl-" prefix accordingly.
      * lisp/progmodes/cc-fonts.el (c-font-lock-invalid-string): Use integerp or
      characterp depending on the type of characters.
      (c-font-lock-enum-tail): Remove unused var `start'.
      * lisp/progmodes/cc-engine.el: Load CL at compile-time.
      (c-declare-lang-variables): Use mapcan.
      (c-append-to-state-cache): Remove unused var `ce+1'.
      (c-parse-state-state): Make buffer-local.
      (c-ssb-lit-begin): Remove unused var `pps-end-pos'.
      (c-just-after-func-arglist-p): Remove unused var `end'.
      * lisp/progmodes/cc-defs.el: Load cc-fix if delete-dups is undefined.
      (c-<-as-paren-syntax, c->-as-paren-syntax): Move definition earlier.
      (c-make-keywords-re): Use delete-dups.
      (c-get-current-file): Avoid file-name-base.
      * lisp/progmodes/cc-cmds.el (c-electric-lt-gt): Remove unused var
      * lisp/progmodes/cc-awk.el (c-forward-sws): Remove unused declaration.
  34. 01 Jan, 2014 1 commit
  35. 01 Jun, 2013 1 commit
    • Glenn Morris's avatar
      Plain fboundp silences compilation warnings since Emacs 22.1 · 683853b9
      Glenn Morris authored
      * progmodes/cc-cmds.el (delete-forward-p):
      * progmodes/cc-defs.el (buffer-syntactic-context-depth):
      * progmodes/cc-engine.el (buffer-syntactic-context):
      * progmodes/cc-fonts.el (face-property-instance):
      * progmodes/cc-mode.el (set-keymap-parents):
      * progmodes/cc-vars.el (get-char-table): No need for cc-bytecomp-defun.
      * progmodes/cc-defs.el (c-set-region-active, c-beginning-of-defun-1)
      * progmodes/cc-mode.el (c-make-inherited-keymap): Use plain fboundp.