From a7474429d09af284bbceaa980f47bb400fe8275a Mon Sep 17 00:00:00 2001 Message-Id: From: Mark Wooding Date: Sun, 27 May 2018 11:54:38 +0100 Subject: [PATCH] el/dot-emacs.in (mdw-c-comment-fill-prefix): Fix it properly. Organization: Straylight/Edgeware From: Mark Wooding 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/el/dot-emacs.el b/el/dot-emacs.el index 001fa29..05e5898 100644 --- a/el/dot-emacs.el +++ b/el/dot-emacs.el @@ -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) -- [mdw]