bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Stefan Monnier
Subject: bug#20256: 25.0.50; css-mode: filling multi-line comments
Date: Thu, 09 Apr 2015 21:25:51 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> +                  (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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]