chiark / gitweb /
el/dot-emacs.in (mdw-c-comment-fill-prefix): Fix it properly.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 27 May 2018 10:54:38 +0000 (11:54 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Wed, 30 May 2018 18:41:49 +0000 (19:41 +0100)
Apparently this has had two bugs since my last attempt to fix it (commit
0e7d960b998e7c6dc781dc37cb703cdb32232a5f).

  * It had only one backslash before the `*', which does nothing; this
    only worked because -- luckily -- Emacs treats a `*' not in
    postfix-operator position literally.

  * There was a stray `]' at the end of the `//' pattern, which caused
    most attempts to match single-line comments to fail.

Oh, dear.

el/dot-emacs.el

index 001fa2947f96129ee1ec14f238fa220b015ae338..05e589881329e9378379fdd317b2b79fdbda7581 100644 (file)
@@ -1927,7 +1927,7 @@ (mdw-set-default-c-style '(c-mode c++-mode) 'mdw-c)
 
 (defvar mdw-c-comment-fill-prefix
   `((,(concat "\\([ \t]*/?\\)"
-             "\\(\*\\|//]\\)"
+             "\\(\\*\\|//\\)"
              "\\([ \t]*\\)"
              "\\([A-Za-z]+:[ \t]*\\)?"
              mdw-hanging-indents)