GNU bug report logs - #20256
25.0.50; css-mode: filling multi-line comments

Previous Next

Package: emacs;

Reported by: Simen Heggestøyl <simenheg <at> gmail.com>

Date: Sat, 4 Apr 2015 13:51:02 UTC

Severity: minor

Found in version 25.0.50

Done: Simen Heggestøyl <simenheg <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 20256 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Simen Heggestøyl <simenheg <at> gmail.com>
Cc: 20256 <at> debbugs.gnu.org
Subject: Re: bug#20256: 25.0.50; css-mode: filling multi-line comments
Date: Thu, 09 Apr 2015 21:25:51 -0400
> +                  (adaptive-fill-function
> +                   (lambda ()
> +                     (when (looking-at "[ \t]*/\\*[ \t]*")
> +                       (let ((str (match-string 0)))
> +                         (and (string-match "/\\*" str)
> +                              (replace-match " *" t t str)))))))

As mentioned, I think this had better be a buffer-local setting, rather
than a let-binding.  After all, it would be good if it also works for
auto-fill-mode.

Also this patch makes css-fill-paragraph non-generic (IOW it now only
works when comment-start is "/*"), so the comment:

        ;; This code is meant to be generic, so that it works not only for
        ;; css-mode but for all modes.

needs to be updated.  Of course, even better would be to avoid
hardcoding /* and */ and use comment-start/end/continue instead.


        Stefan




This bug report was last modified 10 years and 21 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.