From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#20256: 25.0.50; css-mode: filling multi-line comments Date: Thu, 09 Apr 2015 21:25:51 -0400 Message-ID: References: <1428605466.1765.0@smtp.gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1428629181 4061 80.91.229.3 (10 Apr 2015 01:26:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 10 Apr 2015 01:26:21 +0000 (UTC) Cc: 20256@debbugs.gnu.org To: Simen =?UTF-8?Q?Heggest=C3=B8yl?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Apr 10 03:26:12 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YgNhz-0007hz-Jn for geb-bug-gnu-emacs@m.gmane.org; Fri, 10 Apr 2015 03:26:11 +0200 Original-Received: from localhost ([::1]:37147 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YgNhy-0003QW-Nh for geb-bug-gnu-emacs@m.gmane.org; Thu, 09 Apr 2015 21:26:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53480) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YgNhv-0003QF-TD for bug-gnu-emacs@gnu.org; Thu, 09 Apr 2015 21:26:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YgNhq-00079n-Sd for bug-gnu-emacs@gnu.org; Thu, 09 Apr 2015 21:26:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33625) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YgNhq-00079g-PE for bug-gnu-emacs@gnu.org; Thu, 09 Apr 2015 21:26:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YgNhq-0003i8-F4 for bug-gnu-emacs@gnu.org; Thu, 09 Apr 2015 21:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 10 Apr 2015 01:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20256 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20256-submit@debbugs.gnu.org id=B20256.142862915814255 (code B ref 20256); Fri, 10 Apr 2015 01:26:02 +0000 Original-Received: (at 20256) by debbugs.gnu.org; 10 Apr 2015 01:25:58 +0000 Original-Received: from localhost ([127.0.0.1]:51634 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YgNhl-0003hq-OP for submit@debbugs.gnu.org; Thu, 09 Apr 2015 21:25:58 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:49909) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YgNhj-0003he-2U for 20256@debbugs.gnu.org; Thu, 09 Apr 2015 21:25:56 -0400 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id t3A1Pq7D001313; Thu, 9 Apr 2015 21:25:53 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id C103A2D4A; Thu, 9 Apr 2015 21:25:51 -0400 (EDT) In-Reply-To: <1428605466.1765.0@smtp.gmail.com> ("Simen =?UTF-8?Q?Heggest=C3=B8yl?="'s message of "Thu, 09 Apr 2015 20:51:06 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5271=0 X-NAI-Spam-Version: 2.3.0.9393 : core <5271> : inlines <2674> : streams <1419868> : uri <1902938> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:101357 Archived-At: > + (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