all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: "Simen Heggestøyl" <simenheg@gmail.com>
Cc: 20256@debbugs.gnu.org
Subject: bug#20256: 25.0.50; css-mode: filling multi-line comments
Date: Thu, 09 Apr 2015 21:25:51 -0400	[thread overview]
Message-ID: <jwviod4kcbf.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <1428605466.1765.0@smtp.gmail.com> ("Simen Heggestøyl"'s message of "Thu, 09 Apr 2015 20:51:06 +0200")

> +                  (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	other threads:[~2015-04-10  1:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-04 13:12 bug#20256: 25.0.50; css-mode: filling multi-line comments Simen Heggestøyl
2015-04-07 18:26 ` Stefan Monnier
2015-04-09 18:51   ` Simen Heggestøyl
2015-04-10  1:25     ` Stefan Monnier [this message]
2015-04-10 18:45       ` Simen Heggestøyl
2015-04-13 14:28         ` Stefan Monnier
2015-04-18 10:02           ` Simen Heggestøyl
2015-04-18 14:06             ` Stefan Monnier
2015-04-18 18:33               ` Simen Heggestøyl
2015-04-20 16:09                 ` Stefan Monnier
2015-04-21 19:08                   ` Simen Heggestøyl
2015-04-21 20:26                     ` Stefan Monnier
2015-04-26 20:56                   ` Simen Heggestøyl
2015-04-27  4:11                     ` Stefan Monnier
2015-04-27 20:32                       ` Simen Heggestøyl
2015-04-27 22:46                         ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwviod4kcbf.fsf-monnier+emacsbugs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=20256@debbugs.gnu.org \
    --cc=simenheg@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.