From unknown Mon Sep 08 18:04:33 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#10772 <10772@debbugs.gnu.org> To: bug#10772 <10772@debbugs.gnu.org> Subject: Status: 24.0.93; [patch] Convert tcl-auto-fill-mode to use define-minor-mode Reply-To: bug#10772 <10772@debbugs.gnu.org> Date: Tue, 09 Sep 2025 01:04:33 +0000 retitle 10772 24.0.93; [patch] Convert tcl-auto-fill-mode to use define-min= or-mode reassign 10772 emacs submitter 10772 William Stevenson severity 10772 minor tag 10772 patch fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 09 01:50:47 2012 Received: (at submit) by debbugs.gnu.org; 9 Feb 2012 06:50:47 +0000 Received: from localhost ([127.0.0.1]:33175 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RvNq8-0003vL-5n for submit@debbugs.gnu.org; Thu, 09 Feb 2012 01:50:46 -0500 Received: from eggs.gnu.org ([140.186.70.92]:52590) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RvNq3-0003v2-2s for submit@debbugs.gnu.org; Thu, 09 Feb 2012 01:50:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RvNot-00067s-3s for submit@debbugs.gnu.org; Thu, 09 Feb 2012 01:49:28 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([140.186.70.17]:51104) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvNot-00067n-2O for submit@debbugs.gnu.org; Thu, 09 Feb 2012 01:49:27 -0500 Received: from eggs.gnu.org ([140.186.70.92]:52629) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvNor-0001va-Pq for bug-gnu-emacs@gnu.org; Thu, 09 Feb 2012 01:49:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RvNoq-00067F-FI for bug-gnu-emacs@gnu.org; Thu, 09 Feb 2012 01:49:25 -0500 Received: from mail-ww0-f41.google.com ([74.125.82.41]:55144) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvNoq-000670-AS for bug-gnu-emacs@gnu.org; Thu, 09 Feb 2012 01:49:24 -0500 Received: by wgbdt11 with SMTP id dt11so7319495wgb.0 for ; Wed, 08 Feb 2012 22:49:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:date:message-id:mime-version:content-type; bh=03KfUzbtA45TlWBZFRScaKwnwE9IGLL9k+A95tLSq+8=; b=uzUVd+I01j0aYMS7LWTc7CjdO5PZwU2BV42q7gsUXfxd0x2q6ZLPRvq12dixm6XTlZ ZAA8JKRIqdiD1plHylw8Kg/oxXxme2xd58FeeXGhJ/67vumDRJPuQ6fAE8Uy2aW0g804 VPlLEBOy+VIi6F9PAjVPWbs4B1zj/Y7igNouI= Received: by 10.180.84.201 with SMTP id b9mr800715wiz.4.1328770162354; Wed, 08 Feb 2012 22:49:22 -0800 (PST) Received: from localhost.yhvh.mouseabuse.co.uk (cpc10-belf9-2-0-cust411.2-1.cable.virginmedia.com. [86.24.57.156]) by mx.google.com with ESMTPS id ft8sm4615216wib.11.2012.02.08.22.49.20 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 08 Feb 2012 22:49:21 -0800 (PST) From: William Stevenson To: bug-gnu-emacs@gnu.org Subject: 24.0.93; [patch] Convert tcl-auto-fill-mode to use define-minor-mode Date: Thu, 09 Feb 2012 06:49:19 +0000 Message-ID: <87fwektsb4.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -3.2 (---) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.2 (---) In the documentation of auto-fill-mode it says: "When `auto-fill-mode' is on, the `auto-fill-function' variable is non-`nil'." Which makes the `if' redundant in this case, the THEN & ELSE bodies can be placed below the call to turn auto-fill-mode on/off. Also updated the documentation to reflect the auto generated `tcl-auto-fill-mode-hook'. === modified file 'lisp/progmodes/tcl.el' --- lisp/progmodes/tcl.el 2012-01-19 07:21:25 +0000 +++ lisp/progmodes/tcl.el 2012-02-09 06:18:32 +0000 @@ -1408,13 +1408,18 @@ 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-minor-mode tcl-auto-fill-mode + "Like `auto-fill-mode', but sets `comment-auto-fill-only-comments'. +Turning the mode on or off runs `tcl-auto-fill-mode-hook'." + :init-value nil + (cond ((null tcl-auto-fill-mode) + ;; Turn mode off + (auto-fill-mode 0) + (kill-local-variable 'comment-auto-fill-only-comments)) + (t + ;; Turn mode on + (auto-fill-mode) + (set (make-local-variable 'comment-auto-fill-only-comments) t)))) (defun tcl-electric-hash (&optional count) "Insert a `#' and quote if it does not start a real comment. From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 09 10:20:14 2012 Received: (at 10772) by debbugs.gnu.org; 9 Feb 2012 15:20:14 +0000 Received: from localhost ([127.0.0.1]:33972 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RvVnB-0001UB-KQ for submit@debbugs.gnu.org; Thu, 09 Feb 2012 10:20:13 -0500 Received: from mail-pw0-f44.google.com ([209.85.160.44]:53690) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RvVn9-0001Tz-MV for 10772@debbugs.gnu.org; Thu, 09 Feb 2012 10:20:12 -0500 Received: by pbcwz7 with SMTP id wz7so1443736pbc.3 for <10772@debbugs.gnu.org>; Thu, 09 Feb 2012 07:18:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=hEjgNAbZ8V3dbQqhEL9sVt+QEVntS/IrojK/7UHRYKc=; b=dZhHmK1EAJZGpNNSNqf0fL7JewT+og7HKoJ2mIfJNdgKFLAzRmmuRKHSc9EHgIGX8F Rdwm9C7ziCU/pNxkeVOdNU45giLAYlCkz1kPy4fxeEPO+4ua6vQKjFD2DVQ2lZovTYuK /VSeeLZJLxYZGIEfX7q57VSfefQEK4zXBPnfk= Received: by 10.68.134.68 with SMTP id pi4mr6951583pbb.56.1328800738143; Thu, 09 Feb 2012 07:18:58 -0800 (PST) MIME-Version: 1.0 Received: by 10.143.37.9 with HTTP; Thu, 9 Feb 2012 07:18:18 -0800 (PST) In-Reply-To: <87fwektsb4.fsf@gmail.com> References: <87fwektsb4.fsf@gmail.com> From: Juanma Barranquero Date: Thu, 9 Feb 2012 16:18:18 +0100 Message-ID: Subject: Re: bug#10772: 24.0.93; [patch] Convert tcl-auto-fill-mode to use define-minor-mode To: William Stevenson Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 10772 Cc: 10772@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On Thu, Feb 9, 2012 at 07:49, William Stevenson wrote: > + =C2=A0 =C2=A0 =C2=A0 =C2=A0(auto-fill-mode) That is correct, but I think it is customary (and clearer IMHO) to pass an explicit argument, like (auto-fill-mode 1) =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 09 17:10:52 2012 Received: (at 10772) by debbugs.gnu.org; 9 Feb 2012 22:10:52 +0000 Received: from localhost ([127.0.0.1]:34138 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RvcCX-0003St-IO for submit@debbugs.gnu.org; Thu, 09 Feb 2012 17:10:51 -0500 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:40926) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RvcCV-0003Sm-Hm for 10772@debbugs.gnu.org; Thu, 09 Feb 2012 17:10:48 -0500 Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q19M9apt009902; Thu, 9 Feb 2012 17:09:37 -0500 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 8D6E2130009; Thu, 9 Feb 2012 17:09:36 -0500 (EST) From: Stefan Monnier To: William Stevenson Subject: Re: bug#10772: 24.0.93; [patch] Convert tcl-auto-fill-mode to use define-minor-mode Message-ID: References: <87fwektsb4.fsf@gmail.com> Date: Thu, 09 Feb 2012 17:09:36 -0500 In-Reply-To: <87fwektsb4.fsf@gmail.com> (William Stevenson's message of "Thu, 09 Feb 2012 06:49:19 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4127=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4127> : streams <727190> : uri <1062799> X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: 10772 Cc: 10772@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.5 (---) > -(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-minor-mode tcl-auto-fill-mode > + "Like `auto-fill-mode', but sets `comment-auto-fill-only-comments'. > +Turning the mode on or off runs `tcl-auto-fill-mode-hook'." > + :init-value nil > + (cond ((null tcl-auto-fill-mode) > + ;; Turn mode off > + (auto-fill-mode 0) > + (kill-local-variable 'comment-auto-fill-only-comments)) > + (t > + ;; Turn mode on > + (auto-fill-mode) > + (set (make-local-variable 'comment-auto-fill-only-comments) t)))) The problem with this approach is that it creates new possible states, e.g. if the user enables tcl-auto-fill-mode and then disables auto-fill-mode. Maybe we could use an approach like the one I used for (binary-)overwrite-mode. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 11 10:29:09 2012 Received: (at submit) by debbugs.gnu.org; 11 Feb 2012 15:29:09 +0000 Received: from localhost ([127.0.0.1]:36307 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RwEsu-0000vT-Oc for submit@debbugs.gnu.org; Sat, 11 Feb 2012 10:29:09 -0500 Received: from eggs.gnu.org ([140.186.70.92]:36486) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RwEsr-0000ux-Np for submit@debbugs.gnu.org; Sat, 11 Feb 2012 10:29:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RwErU-0008Lu-8N for submit@debbugs.gnu.org; Sat, 11 Feb 2012 10:27:41 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([140.186.70.17]:47267) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RwErU-0008Lq-3T for submit@debbugs.gnu.org; Sat, 11 Feb 2012 10:27:40 -0500 Received: from eggs.gnu.org ([140.186.70.92]:34850) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RwErT-0000J7-06 for bug-gnu-emacs@gnu.org; Sat, 11 Feb 2012 10:27:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RwErR-0008LP-LQ for bug-gnu-emacs@gnu.org; Sat, 11 Feb 2012 10:27:38 -0500 Received: from plane.gmane.org ([80.91.229.3]:33580) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RwErR-0008LE-GD for bug-gnu-emacs@gnu.org; Sat, 11 Feb 2012 10:27:37 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1RwErL-0007St-Fc for bug-gnu-emacs@gnu.org; Sat, 11 Feb 2012 16:27:31 +0100 Received: from cpc10-belf9-2-0-cust411.2-1.cable.virginmedia.com ([86.24.57.156]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 11 Feb 2012 16:27:31 +0100 Received: from yhvh2000 by cpc10-belf9-2-0-cust411.2-1.cable.virginmedia.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 11 Feb 2012 16:27:31 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: William Stevenson Subject: Re: bug#10772: 24.0.93; [patch] Convert tcl-auto-fill-mode to use define-minor-mode Date: Sat, 11 Feb 2012 15:27:18 +0000 Lines: 61 Message-ID: <87r4y1pezt.fsf@gmail.com> References: <87fwektsb4.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: cpc10-belf9-2-0-cust411.2-1.cable.virginmedia.com User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.93 (gnu/linux) Cancel-Lock: sha1:+4EqMkfuK4KWSJuN1Q8JsAxamEs= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) Stefan Monnier writes: > The problem with this approach is that it creates new possible states, > e.g. if the user enables tcl-auto-fill-mode and then disables > auto-fill-mode. The correct behavior seems to be if the tcl-auto-fill-mode is enabled then calling auto-fill-mode will turn *auto-fill-mode off. > Maybe we could use an approach like the one I used for > (binary-)overwrite-mode. I've been looking at this for the past day or so, and I'm still not sure I know exactly what to do, but I've come up with 2 options. This option works as I expect, ie when tcl-auto-fill-mode is enabled, calling auto-fill-mode disables tcl-auto-fill-mode and auto-fill-mode. --8<---------------cut here---------------start------------->8--- ;; Docstrings elided (define-minor-mode tcl-auto-fill-mode :variable (eq auto-fill-function normal-auto-fill-function) (if auto-fill-function (kill-local-variable 'comment-auto-fill-only-comments) (set (make-local-variable 'comment-auto-fill-only-comments) t))) --8<---------------cut here---------------end--------------->8--- Or something more like this, which seems more in the spirit of binary overwrite mode. --8<---------------cut here---------------start------------->8--- ;; Docstrings elided (defun tcl-do-auto-fill () (if auto-fill-function (kill-local-variable 'comment-auto-fill-only-comments) (set (make-local-variable 'comment-auto-fill-only-comments) t)) (do-auto-fill)) (defvar tcl-auto-fill-function 'tcl-do-auto-fill) (define-minor-mode tcl-auto-fill-mode :variable (eq auto-fill-function tcl-auto-fill-function)) --8<---------------cut here---------------end--------------->8--- However other progmodes define f90-do-auto-fill, c-do-auto-fill, cperl-do-auto-fill but tend to do the following. --8<---------------cut here---------------start------------->8--- (set (make-local-variable 'normal-auto-fill-function) 'foo-do-auto-fill) --8<---------------cut here---------------end--------------->8--- These 3 modes (and some others from cursory checking) don't define foo-auto-fill-mode and just let the user call auto-fill-mode - which makes me wonder if defining tcl-auto-fill-mode is the right thing to do anyway. William From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 12 10:16:06 2012 Received: (at 10772) by debbugs.gnu.org; 12 Feb 2012 15:16:07 +0000 Received: from localhost ([127.0.0.1]:37663 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rwb9p-0006rA-SN for submit@debbugs.gnu.org; Sun, 12 Feb 2012 10:16:06 -0500 Received: from chene.dit.umontreal.ca ([132.204.246.20]:34330) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rwb9m-0006r1-B3 for 10772@debbugs.gnu.org; Sun, 12 Feb 2012 10:16:03 -0500 Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q1CFEaLZ030705; Sun, 12 Feb 2012 10:14:36 -0500 Received: by ceviche.home (Postfix, from userid 20848) id 19B866659C; Sun, 12 Feb 2012 00:12:27 -0500 (EST) From: Stefan Monnier To: William Stevenson Subject: Re: bug#10772: 24.0.93; [patch] Convert tcl-auto-fill-mode to use define-minor-mode Message-ID: References: <87fwektsb4.fsf@gmail.com> <87r4y1pezt.fsf@gmail.com> Date: Sun, 12 Feb 2012 00:12:26 -0500 In-Reply-To: <87r4y1pezt.fsf@gmail.com> (William Stevenson's message of "Sat, 11 Feb 2012 15:27:18 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.93 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4129=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4129> : streams <727922> : uri <1064033> X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: 10772 Cc: 10772@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.5 (---) > --8<---------------cut here---------------start------------->8--- > (set (make-local-variable 'normal-auto-fill-function) 'foo-do-auto-fill) > --8<---------------cut here---------------end--------------->8--- > These 3 modes (and some others from cursory checking) don't define > foo-auto-fill-mode and just let the user call auto-fill-mode - which > makes me wonder if defining tcl-auto-fill-mode is the right thing to do > anyway. Actually, thinking about it some more, maybe tcl-auto-fill-mode should be renamed (it has nothing specific to Tcl) and I think it could be implemented along the lines of (100% untested): (define-minor-mode auto-fill-noncode-mode :variable ((and auto-fill-function comment-auto-fill-only-comments) . (lambda (x) (auto-fill-mode (if x 1 -1)) (if auto-fill-function (set (make-local-variable 'comment-auto-fill-only-comments) t) (kill-local-variable 'comment-auto-fill-only-comments))))) -- Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 25 08:30:18 2014 Received: (at 10772) by debbugs.gnu.org; 25 Feb 2014 13:30:18 +0000 Received: from localhost ([127.0.0.1]:38778 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WII5S-00049h-5f for submit@debbugs.gnu.org; Tue, 25 Feb 2014 08:30:18 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:46102 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WII5P-00049Y-CL for 10772@debbugs.gnu.org; Tue, 25 Feb 2014 08:30:16 -0500 Received: from [123.114.123.21] (port=41864 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 1WII5N-00089i-BX; Tue, 25 Feb 2014 08:30:14 -0500 From: Xue Fuqiao To: Stefan Monnier Subject: Re: bug#10772: 24.0.93; [patch] Convert tcl-auto-fill-mode to use define-minor-mode References: <87fwektsb4.fsf@gmail.com> <87r4y1pezt.fsf@gmail.com> Date: Tue, 25 Feb 2014 21:30:05 +0800 In-Reply-To: (Stefan Monnier's message of "Sun, 12 Feb 2012 00:12:26 -0500") Message-ID: <87vbw35nhe.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 10772 Cc: William Stevenson , 10772@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) What about the following patch: === modified file 'lisp/progmodes/tcl.el' --- lisp/progmodes/tcl.el 2014-02-10 01:34:22 +0000 +++ lisp/progmodes/tcl.el 2014-02-25 13:22:36 +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-noncode-mode "24.4") (defun tcl-electric-hash (&optional count) "Insert a `#' and quote if it does not start a real comment. === modified file 'lisp/simple.el' --- lisp/simple.el 2014-02-21 13:22:14 +0000 +++ lisp/simple.el 2014-02-25 13:26:54 +0000 @@ -6146,6 +6146,16 @@ . (lambda (v) (setq auto-fill-function (if v normal-auto-fill-function))))) +(define-minor-mode auto-fill-noncode-mode + "Like `auto-fill-mode', but sets `comment-auto-fill-only-comments'." + :variable + ((and auto-fill-function comment-auto-fill-only-comments) + . (lambda (x) + (auto-fill-mode (if x 1 -1)) + (if auto-fill-function + (setq-local comment-auto-fill-only-comments t) + (kill-local-variable 'comment-auto-fill-only-comments))))) + ;; This holds a document string used to document auto-fill-mode. (defun auto-fill-function () "Automatically break line at a previous space, in insertion of text." From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 25 09:30:56 2014 Received: (at 10772) by debbugs.gnu.org; 25 Feb 2014 14:30:56 +0000 Received: from localhost ([127.0.0.1]:38816 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WIJ25-00070D-Ge for submit@debbugs.gnu.org; Tue, 25 Feb 2014 09:30:54 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:17204) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WIJ1w-0006zl-GC for 10772@debbugs.gnu.org; Tue, 25 Feb 2014 09:30:45 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFsoXjX/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCwsOJhIUGA0kiB4GsR+QDpEKA4hhnBmBXoMV X-IPAS-Result: Av8EABK/CFFsoXjX/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCwsOJhIUGA0kiB4GsR+QDpEKA4hhnBmBXoMV X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="48700850" Received: from 108-161-120-215.dsl.teksavvy.com (HELO pastel.home) ([108.161.120.215]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 25 Feb 2014 09:30:38 -0500 Received: by pastel.home (Postfix, from userid 20848) id 6883560143; Tue, 25 Feb 2014 09:30:35 -0500 (EST) From: Stefan Monnier To: Xue Fuqiao Subject: Re: bug#10772: 24.0.93; [patch] Convert tcl-auto-fill-mode to use define-minor-mode Message-ID: References: <87fwektsb4.fsf@gmail.com> <87r4y1pezt.fsf@gmail.com> <87vbw35nhe.fsf@gnu.org> Date: Tue, 25 Feb 2014 09:30:35 -0500 In-Reply-To: <87vbw35nhe.fsf@gnu.org> (Xue Fuqiao's message of "Tue, 25 Feb 2014 21:30:05 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 10772 Cc: William Stevenson , 10772@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > What about the following patch: 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. Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 25 17:25:51 2014 Received: (at 10772) by debbugs.gnu.org; 25 Feb 2014 22:25:51 +0000 Received: from localhost ([127.0.0.1]:40031 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WIQRj-0003ti-4W for submit@debbugs.gnu.org; Tue, 25 Feb 2014 17:25:51 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:56303) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WIQRg-0003ta-Jn for 10772@debbugs.gnu.org; Tue, 25 Feb 2014 17:25:48 -0500 Received: from [61.149.227.12] (port=2538 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 1WIQRf-0002Y8-ED; Tue, 25 Feb 2014 17:25:48 -0500 From: Xue Fuqiao To: Stefan Monnier Subject: Re: bug#10772: 24.0.93; [patch] Convert tcl-auto-fill-mode to use define-minor-mode Organization: The Church of Emacs References: <87fwektsb4.fsf@gmail.com> <87r4y1pezt.fsf@gmail.com> <87vbw35nhe.fsf@gnu.org> Date: Wed, 26 Feb 2014 06:25:43 +0800 In-Reply-To: (Stefan Monnier's message of "Tue, 25 Feb 2014 09:30:35 -0500") Message-ID: <87ob1u3k48.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 10772 Cc: William Stevenson , 10772@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Stefan Monnier writes: >> What about the following patch: > > 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. -- http://www.gnu.org/software/emacs/ From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 26 10:41:16 2014 Received: (at 10772) by debbugs.gnu.org; 26 Feb 2014 15:41:16 +0000 Received: from localhost ([127.0.0.1]:41445 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WIgbi-0000eg-88 for submit@debbugs.gnu.org; Wed, 26 Feb 2014 10:41:15 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:61813) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WIgbT-0000e1-Va for 10772@debbugs.gnu.org; Wed, 26 Feb 2014 10:41:06 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFFpaMk/2dsb2JhbABEuzWDWRdzgh4BAQQBViMQCw4mEhQYDSSIHgbBLZEKA4hhnBmBXoMV X-IPAS-Result: Av8EABK/CFFFpaMk/2dsb2JhbABEuzWDWRdzgh4BAQQBViMQCw4mEhQYDSSIHgbBLZEKA4hhnBmBXoMV X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="48805257" Received: from 69-165-163-36.dsl.teksavvy.com (HELO pastel.home) ([69.165.163.36]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 26 Feb 2014 10:40:58 -0500 Received: by pastel.home (Postfix, from userid 20848) id 956E0601A0; Wed, 26 Feb 2014 10:40:58 -0500 (EST) From: Stefan Monnier To: Xue Fuqiao Subject: Re: bug#10772: 24.0.93; [patch] Convert tcl-auto-fill-mode to use define-minor-mode Message-ID: References: <87fwektsb4.fsf@gmail.com> <87r4y1pezt.fsf@gmail.com> <87vbw35nhe.fsf@gnu.org> <87ob1u3k48.fsf@gnu.org> Date: Wed, 26 Feb 2014 10:40:58 -0500 In-Reply-To: <87ob1u3k48.fsf@gnu.org> (Xue Fuqiao's message of "Wed, 26 Feb 2014 06:25:43 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 10772 Cc: William Stevenson , 10772@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) >>> What about the following patch: >> 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. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 26 17:40:47 2014 Received: (at 10772) by debbugs.gnu.org; 26 Feb 2014 22:40:47 +0000 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 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 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 From: Xue Fuqiao To: Stefan Monnier Subject: Re: bug#10772: 24.0.93; [patch] Convert tcl-auto-fill-mode to use define-minor-mode Organization: The Church of Emacs References: <87fwektsb4.fsf@gmail.com> <87r4y1pezt.fsf@gmail.com> <87vbw35nhe.fsf@gnu.org> <87ob1u3k48.fsf@gnu.org> Date: Thu, 27 Feb 2014 06:40:37 +0800 In-Reply-To: (Stefan Monnier's message of "Wed, 26 Feb 2014 10:40:58 -0500") Message-ID: <87ppm9qyze.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 10772 Cc: Xue Fuqiao , William Stevenson , 10772@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) 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/ From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 26 21:55:42 2014 Received: (at 10772) by debbugs.gnu.org; 27 Feb 2014 02:55:42 +0000 Received: from localhost ([127.0.0.1]:42020 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WIr8P-0000Oy-FZ for submit@debbugs.gnu.org; Wed, 26 Feb 2014 21:55:42 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:52396) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WIr8H-0000Og-Vi for 10772@debbugs.gnu.org; Wed, 26 Feb 2014 21:55:38 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFFpaMk/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCwsOJhIUGA0kLYdxBsEtkQoDiGGcGYFegxU X-IPAS-Result: Av8EABK/CFFFpaMk/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCwsOJhIUGA0kLYdxBsEtkQoDiGGcGYFegxU X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="48855062" Received: from 69-165-163-36.dsl.teksavvy.com (HELO pastel.home) ([69.165.163.36]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 26 Feb 2014 21:55:33 -0500 Received: by pastel.home (Postfix, from userid 20848) id BE8146011F; Wed, 26 Feb 2014 21:55:32 -0500 (EST) From: Stefan Monnier To: Xue Fuqiao Subject: Re: bug#10772: 24.0.93; [patch] Convert tcl-auto-fill-mode to use define-minor-mode Message-ID: References: <87fwektsb4.fsf@gmail.com> <87r4y1pezt.fsf@gmail.com> <87vbw35nhe.fsf@gnu.org> <87ob1u3k48.fsf@gnu.org> <87ppm9qyze.fsf@gnu.org> Date: Wed, 26 Feb 2014 21:55:32 -0500 In-Reply-To: <87ppm9qyze.fsf@gnu.org> (Xue Fuqiao's message of "Thu, 27 Feb 2014 06:40:37 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 10772 Cc: William Stevenson , 10772@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > Ah, I see. So here's the new patch (without ChangeLog/NEWS): Looks better. Please also get rid of existing uses of tcl-auto-fill-mode. And of course, wait for the trunk to re-open before installing it. Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 27 12:00:30 2014 Received: (at 10772) by debbugs.gnu.org; 27 Feb 2014 17:00:30 +0000 Received: from localhost ([127.0.0.1]:42888 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WJ4Jx-0002h0-LR for submit@debbugs.gnu.org; Thu, 27 Feb 2014 12:00:30 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:40194) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WJ4Ju-0002gp-Rg for 10772@debbugs.gnu.org; Thu, 27 Feb 2014 12:00:27 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1WJ4Jt-0002ql-Ed; Thu, 27 Feb 2014 12:00:25 -0500 From: Glenn Morris To: Xue Fuqiao Subject: Re: bug#10772: 24.0.93; [patch] Convert tcl-auto-fill-mode to use define-minor-mode References: <87fwektsb4.fsf@gmail.com> <87r4y1pezt.fsf@gmail.com> <87vbw35nhe.fsf@gnu.org> <87ob1u3k48.fsf@gnu.org> <87ppm9qyze.fsf@gnu.org> X-Spook: infowar spies JUWTF Belknap Audiotel assassinate X-Ran: B2-"u(GIo6Sa@v;#vp#aMk2~mrx#.G((^"jYL,Ya@h*Re`Dk`cPcb\ydrS:5!m]HFiJt=J X-Hue: red X-Debbugs-No-Ack: yes X-Attribution: GM Date: Thu, 27 Feb 2014 12:00:24 -0500 In-Reply-To: <87ppm9qyze.fsf@gnu.org> (Xue Fuqiao's message of "Thu, 27 Feb 2014 06:40:37 +0800") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 10772 Cc: 10772@debbugs.gnu.org, William Stevenson , Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Xue Fuqiao wrote: > +(define-obsolete-function-alias tcl-auto-fill-mode > + auto-fill-mode "24.4") Surely that is missing some quotes and can't work? From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 27 17:33:53 2014 Received: (at 10772) by debbugs.gnu.org; 27 Feb 2014 22:33:53 +0000 Received: from localhost ([127.0.0.1]:43207 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WJ9Wb-0000RG-H8 for submit@debbugs.gnu.org; Thu, 27 Feb 2014 17:33:53 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:46793) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WJ9WZ-0000R9-Rp for 10772@debbugs.gnu.org; Thu, 27 Feb 2014 17:33:52 -0500 Received: from [123.114.122.140] (port=2584 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 1WJ9WY-0003xl-Fl; Thu, 27 Feb 2014 17:33:51 -0500 From: Xue Fuqiao To: Glenn Morris Subject: Re: bug#10772: 24.0.93; [patch] Convert tcl-auto-fill-mode to use define-minor-mode Organization: The Church of Emacs References: <87fwektsb4.fsf@gmail.com> <87r4y1pezt.fsf@gmail.com> <87vbw35nhe.fsf@gnu.org> <87ob1u3k48.fsf@gnu.org> <87ppm9qyze.fsf@gnu.org> Date: Fri, 28 Feb 2014 06:33:46 +0800 In-Reply-To: (Glenn Morris's message of "Thu, 27 Feb 2014 12:00:24 -0500") Message-ID: <87r46o18z9.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 10772 Cc: Xue Fuqiao , 10772@debbugs.gnu.org, William Stevenson , Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Glenn Morris writes: > Xue Fuqiao wrote: > >> +(define-obsolete-function-alias tcl-auto-fill-mode >> + auto-fill-mode "24.4") > > Surely that is missing some quotes and can't work? Sorry for that. I'll add them when installing. -- http://www.gnu.org/software/emacs/ From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 24 01:42:35 2016 Received: (at 10772) by debbugs.gnu.org; 24 Feb 2016 06:42:35 +0000 Received: from localhost ([127.0.0.1]:42375 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aYT9f-0002TE-Hd for submit@debbugs.gnu.org; Wed, 24 Feb 2016 01:42:35 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:54866) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aYT9e-0002T7-6l for 10772@debbugs.gnu.org; Wed, 24 Feb 2016 01:42:34 -0500 Received: from cpe-60-225-211-161.nsw.bigpond.net.au ([60.225.211.161] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aYT9F-0003ai-7H; Wed, 24 Feb 2016 07:42:09 +0100 From: Lars Ingebrigtsen To: Xue Fuqiao Subject: Re: bug#10772: 24.0.93; [patch] Convert tcl-auto-fill-mode to use define-minor-mode References: <87fwektsb4.fsf@gmail.com> <87r4y1pezt.fsf@gmail.com> <87vbw35nhe.fsf@gnu.org> <87ob1u3k48.fsf@gnu.org> <87ppm9qyze.fsf@gnu.org> <87r46o18z9.fsf@gnu.org> Date: Wed, 24 Feb 2016 17:42:04 +1100 In-Reply-To: <87r46o18z9.fsf@gnu.org> (Xue Fuqiao's message of "Fri, 28 Feb 2014 06:33:46 +0800") Message-ID: <87io1eboeb.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1aYT9F-0003ai-7H X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1456900932.40002@iNzc6bnXCYGGL0VQvMU7/Q X-Spam-Status: No X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 10772 Cc: Glenn Morris , 10772@debbugs.gnu.org, William Stevenson , Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Xue Fuqiao writes: > Glenn Morris writes: > >> Xue Fuqiao wrote: >> >>> +(define-obsolete-function-alias tcl-auto-fill-mode >>> + auto-fill-mode "24.4") >> >> Surely that is missing some quotes and can't work? > > Sorry for that. I'll add them when installing. Stefan Monnier writes: >> Ah, I see. So here's the new patch (without ChangeLog/NEWS): > > Looks better. Please also get rid of existing uses of > tcl-auto-fill-mode. And of course, wait for the trunk to re-open before > installing it. The trunk has been open for a few years now, but this doesn't seem to have been applied. Xue? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 02 23:43:50 2017 Received: (at 10772) by debbugs.gnu.org; 3 Jun 2017 03:43:50 +0000 Received: from localhost ([127.0.0.1]:52265 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dGzye-0006Ve-HK for submit@debbugs.gnu.org; Fri, 02 Jun 2017 23:43:50 -0400 Received: from mail-it0-f54.google.com ([209.85.214.54]:33024) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dGzyc-0006VS-Af for 10772@debbugs.gnu.org; Fri, 02 Jun 2017 23:43:46 -0400 Received: by mail-it0-f54.google.com with SMTP id w68so11802157itc.0 for <10772@debbugs.gnu.org>; Fri, 02 Jun 2017 20:43:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=XLjemqlA/W3uU+JyQnwmcoY3fo9/ZIvLk/5zkYSWKAs=; b=W0z6JldcP17U94qMYHYVtlLcjVy7rcxDJmsfxAzeAMqVmiwmcdgHoMUaPcso4Jx5eb 1ujue1ae8/sBkg4+9o3qboFlPM8AiDY6F1GWHToB6ZHkEyloqWmiDFD6dF5hJ/duaaPK b8ZArrOMtvtTqBzkoUE37k2ZNY675hV1nyVgGpowJYS+Q++fyxa1myAkYS2Esel12VGs gBAE3FD0avaSwIuaoj1Ne+JArSWIJOq9AHvS3xXzeoHe2F7efWK2ifiFSfHJkwrVRQ/T 1st6H6i1EcoqPdiaKV+ZlHfZFHL19RSwsEcLi72KNmiLmazHdPCXpq4ydb4XlN5DhWPF 4J8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=XLjemqlA/W3uU+JyQnwmcoY3fo9/ZIvLk/5zkYSWKAs=; b=uHemiJIFbDhXLLj/BXq4X27LxvWV1SfH6SdmabmUvqNAELmL1T95OgYaNPsC/f1c+I i2leL3SAetlQI6NXzF9mjrHQO7M+861qghfdZj+EGDbRTIFO//2VGdltaUE/x4fqKhn7 wAzvEs8X0fnUQlh4M/1CjhpXULzigvb2jRS0SiBrvFkugGNaP45nrk1Zdp8IeoxvuRYs YiLZfYkT9Mq1YVdEp4DJJqF+24Gx1YYzI4zgcD4ongzxMdrMIjj33HlizjlkDha9lcyf 9pZWOL0FGM/UrJbBraT/Nq28S0OxLRLssOTWK3r3/Zn0Qt3z3Ku/rkcRJlO5gJmOYv91 O9aw== X-Gm-Message-State: AODbwcCtjVSe73PtmMiZW5NMHbHa1zqQjbPov+EHnEq4Gpz6ncmeGu4z Vv+EfgpqP/W86yZOgqY= X-Received: by 10.107.184.9 with SMTP id i9mr10641183iof.153.1496461420891; Fri, 02 Jun 2017 20:43:40 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id 200sm2007281itl.7.2017.06.02.20.43.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 Jun 2017 20:43:40 -0700 (PDT) From: npostavs@users.sourceforge.net To: Xue Fuqiao Subject: Re: bug#10772: 24.0.93; [patch] Convert tcl-auto-fill-mode to use define-minor-mode References: <87fwektsb4.fsf@gmail.com> <87r4y1pezt.fsf@gmail.com> <87vbw35nhe.fsf@gnu.org> <87ob1u3k48.fsf@gnu.org> <87ppm9qyze.fsf@gnu.org> Date: Fri, 02 Jun 2017 23:45:18 -0400 In-Reply-To: <87ppm9qyze.fsf@gnu.org> (Xue Fuqiao's message of "Thu, 27 Feb 2014 06:40:37 +0800") Message-ID: <87fufh20q9.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 10772 Cc: William Stevenson , 10772@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --=-=-= Content-Type: text/plain Xue Fuqiao writes: > +(define-obsolete-function-alias tcl-auto-fill-mode > + auto-fill-mode "24.4") I think making this an alias breaks backwards compatibility needlessly. I propose just marking it obsolete without changing it: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=v1-0001-Make-tcl-auto-fill-mode-obsolete-Bug-10772.patch Content-Description: patch >From dd1ba59961cc216422349716fcfc62e656076500 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sat, 1 Apr 2017 21:02:50 -0400 Subject: [PATCH v1] Make tcl-auto-fill-mode obsolete (Bug#10772) * lisp/progmodes/tcl.el (tcl-auto-fill-mode): Declare obsolete. * etc/NEWS: Announce it. --- etc/NEWS | 5 +++++ lisp/progmodes/tcl.el | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 7972511f7a..cbd388b216 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1306,6 +1306,11 @@ window changed size when 'window-size-change-functions' are run. *** The semantics of 'mouse-autoselect-window' has changed slightly. For details see the section "Mouse Window Auto-selection" in the Elisp manual. + +--- +** 'tcl-auto-fill-mode' is now declared obsolete. It's functionality +can be replicated simply by setting 'comment-auto-fill-only-comments'. + * Changes in Emacs 26.1 on Non-Free Operating Systems diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el index 902a5aace0..de0cd50911 100644 --- a/lisp/progmodes/tcl.el +++ b/lisp/progmodes/tcl.el @@ -353,8 +353,6 @@ (defvar tcl-mode-hook nil Quotes all \"#\" characters that don't correspond to actual Tcl comments. (Useful when editing code not originally created with this mode). - `tcl-auto-fill-mode' - Auto-filling of Tcl comments. Add functions to the hook with `add-hook': @@ -1413,6 +1411,9 @@ (defun tcl-restart-with-file (file &optional and-go) (defun tcl-auto-fill-mode (&optional arg) "Like `auto-fill-mode', but sets `comment-auto-fill-only-comments'." + (declare + (obsolete + "Use `auto-fill-mode' with `comment-auto-fill-only-comments'." "26.1")) (interactive "P") (auto-fill-mode arg) (if auto-fill-function -- 2.11.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 27 20:37:25 2017 Received: (at 10772) by debbugs.gnu.org; 28 Jun 2017 00:37:25 +0000 Received: from localhost ([127.0.0.1]:41324 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dQ0yz-0007q7-2S for submit@debbugs.gnu.org; Tue, 27 Jun 2017 20:37:25 -0400 Received: from mail-it0-f68.google.com ([209.85.214.68]:36769) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dQ0yw-0007pm-Op; Tue, 27 Jun 2017 20:37:22 -0400 Received: by mail-it0-f68.google.com with SMTP id 185so4117713itv.3; Tue, 27 Jun 2017 17:37:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=tX++od7INpUstMrfiSumQLzjV3YetwtUWa7/E6V+YkM=; b=KPTDZinkx3GPYBDmV458X/8/XHMeiB0LCT5ryUm27Uk2Wkc7tuVI4pkgBjv/4yN9IN 9TSlTh+9iq0Digr2zkKVW+F7bxy7zrRmO2EC/s/HSL8kwspUbRW7CETeEmVAZ01mcIp6 xiVyqe69TDUm24Ld/6VOwBVbk66Dv/pG0+joYbwF6I6HFKlHf670nyp8WiNz46JbXYtu u09DxnZADrV7cMJyTLgNNnpsOBfqXHYLUJKsjJyhbXXos2Akr1Yqc2Qy2yV7Q58Muwf6 yXc6awUcDUKy//spyvmaNqF3G+ryd6U4wHaFora65tMslM0TnQ65FD3HOlP0Y468A3FX +xSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=tX++od7INpUstMrfiSumQLzjV3YetwtUWa7/E6V+YkM=; b=WLowCxTmB7QztD30tbEXmdRHBnwwraogoJakjfrbeJ6VcJdvCXxql33B00AmFNWhdX RqfWE04euOIAAlaN81PHl5jmlHLD4fAoR7H3hhmBdx5JUCcwOZkQFLhPXue/qm2p4bas Jp7N+RXze7gAAQyQzAXn+fHVMl1S/+8uHE5PcyMbkhxFsyNYyQ/v9/MROxkNvqLKcnGk a3vHc4OcMA2+ZarmOrAEprGaoYoJplv/BZRQQizMucnsNdtj5lSbhGv4Z1pvE6rOYJMl oR0r0hk8g0sNmzW1+czc+pXiexnohyq9v8wxJ21BnjYkPe4b7t1lvc+eNZgSNjgCPdQd l6Tw== X-Gm-Message-State: AKS2vOz+D8Et9nvzSV3cciKhO8ZUvm/Y74nUWkdSM9f1k+jseYAKu0yb wA4A9hLslT3Q0ois X-Received: by 10.36.108.74 with SMTP id w71mr6083009itb.45.1498610237211; Tue, 27 Jun 2017 17:37:17 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id 65sm2175026itm.1.2017.06.27.17.37.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 27 Jun 2017 17:37:16 -0700 (PDT) From: npostavs@users.sourceforge.net To: Xue Fuqiao Subject: Re: bug#10772: 24.0.93; [patch] Convert tcl-auto-fill-mode to use define-minor-mode References: <87fwektsb4.fsf@gmail.com> <87r4y1pezt.fsf@gmail.com> <87vbw35nhe.fsf@gnu.org> <87ob1u3k48.fsf@gnu.org> <87ppm9qyze.fsf@gnu.org> <87fufh20q9.fsf@users.sourceforge.net> Date: Tue, 27 Jun 2017 20:38:52 -0400 In-Reply-To: <87fufh20q9.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net's message of "Fri, 02 Jun 2017 23:45:18 -0400") Message-ID: <87zictlzdv.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 10772 Cc: 10772@debbugs.gnu.org, William Stevenson , Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) tags 10772 fixed close 10772 26.1 quit npostavs@users.sourceforge.net writes: > I think making this an alias breaks backwards compatibility needlessly. > I propose just marking it obsolete without changing it: Pushed to master: [1: e06b547e93]. [1: e06b547e93]: 2017-06-27 20:34:14 -0400 Make tcl-auto-fill-mode obsolete (Bug#10772) http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=e06b547e9369cb7c9c77b81041003bb120170929 From unknown Mon Sep 08 18:04:33 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 26 Jul 2017 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator