From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xue Fuqiao Newsgroups: gmane.emacs.bugs Subject: bug#10772: 24.0.93; [patch] Convert tcl-auto-fill-mode to use define-minor-mode Date: Thu, 27 Feb 2014 06:40:37 +0800 Organization: The Church of Emacs Message-ID: <87ppm9qyze.fsf@gnu.org> References: <87fwektsb4.fsf@gmail.com> <87r4y1pezt.fsf@gmail.com> <87vbw35nhe.fsf@gnu.org> <87ob1u3k48.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1393454460 14676 80.91.229.3 (26 Feb 2014 22:41:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 26 Feb 2014 22:41:00 +0000 (UTC) Cc: Xue Fuqiao , William Stevenson , 10772@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Feb 26 23:41:08 2014 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 1WInA3-0007s2-A5 for geb-bug-gnu-emacs@m.gmane.org; Wed, 26 Feb 2014 23:41:07 +0100 Original-Received: from localhost ([::1]:43560 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WInA2-00064U-Ov for geb-bug-gnu-emacs@m.gmane.org; Wed, 26 Feb 2014 17:41:06 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42035) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIn9z-00064O-OA for bug-gnu-emacs@gnu.org; Wed, 26 Feb 2014 17:41:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WIn9y-0001Na-M3 for bug-gnu-emacs@gnu.org; Wed, 26 Feb 2014 17:41:03 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40767) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIn9y-0001NW-In for bug-gnu-emacs@gnu.org; Wed, 26 Feb 2014 17:41:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WIn9x-0000PO-QS for bug-gnu-emacs@gnu.org; Wed, 26 Feb 2014 17:41:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Xue Fuqiao Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Feb 2014 22:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10772 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 10772-submit@debbugs.gnu.org id=B10772.13934544471536 (code B ref 10772); Wed, 26 Feb 2014 22:41:01 +0000 Original-Received: (at 10772) by debbugs.gnu.org; 26 Feb 2014 22:40:47 +0000 Original-Received: from localhost ([127.0.0.1]:41949 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WIn9j-0000Og-86 for submit@debbugs.gnu.org; Wed, 26 Feb 2014 17:40:47 -0500 Original-Received: from fencepost.gnu.org ([208.118.235.10]:52644) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WIn9g-0000OV-8U for 10772@debbugs.gnu.org; Wed, 26 Feb 2014 17:40:44 -0500 Original-Received: from [61.149.228.197] (port=2578 helo=xfq-ThinkPad-X1-Carbon) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1WIn9e-0006No-L7; Wed, 26 Feb 2014 17:40:43 -0500 In-Reply-To: (Stefan Monnier's message of "Wed, 26 Feb 2014 10:40:58 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) 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:86299 Archived-At: Stefan Monnier writes: >>> Tcl is not special wrt to filling and comments, AFAIK, so tcl-mode >>> should simply use the default auto-fill functionality without any >>> local tweaks. >> Right, and that's exactly what my patch does. > > No, it preserves the "special behavior", just changing the > implementation to rely on the generic auto-fill code. My point is that > the special behavior is just a preference of the mode's author and hence > doesn't belong in the major mode's definition. Ah, I see. So here's the new patch (without ChangeLog/NEWS): === modified file 'lisp/progmodes/tcl.el' --- lisp/progmodes/tcl.el 2014-02-10 01:34:22 +0000 +++ lisp/progmodes/tcl.el 2014-02-26 22:39:06 +0000 @@ -1410,13 +1410,8 @@ tcl-application file tcl-command-switches) (if and-go (switch-to-tcl t))))))) -(defun tcl-auto-fill-mode (&optional arg) - "Like `auto-fill-mode', but sets `comment-auto-fill-only-comments'." - (interactive "P") - (auto-fill-mode arg) - (if auto-fill-function - (set (make-local-variable 'comment-auto-fill-only-comments) t) - (kill-local-variable 'comment-auto-fill-only-comments))) +(define-obsolete-function-alias tcl-auto-fill-mode + auto-fill-mode "24.4") (defun tcl-electric-hash (&optional count) "Insert a `#' and quote if it does not start a real comment. -- http://www.gnu.org/software/emacs/