From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: owner@emacsbugs.donarmstrong.com (Emacs bug Tracking System) Newsgroups: gmane.emacs.bugs Subject: bug#4455: marked as done (23.1.50; Can't turn off auto-fill-mode via mouse-minor-mode-menu) Date: Thu, 17 Sep 2009 01:40:05 +0000 Message-ID: References: <87bpla5th3.fsf@escher.local.home> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----------=_1253151605-628-0" X-Trace: ger.gmane.org 1253152043 6403 80.91.229.12 (17 Sep 2009 01:47:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 17 Sep 2009 01:47:23 +0000 (UTC) To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 17 03:47:16 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Mo65a-0007kS-P1 for geb-bug-gnu-emacs@m.gmane.org; Thu, 17 Sep 2009 03:47:15 +0200 Original-Received: from localhost ([127.0.0.1]:51047 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mo65Z-00089e-VU for geb-bug-gnu-emacs@m.gmane.org; Wed, 16 Sep 2009 21:47:13 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mo65U-00089H-Iy for bug-gnu-emacs@gnu.org; Wed, 16 Sep 2009 21:47:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mo65Q-000882-Ts for bug-gnu-emacs@gnu.org; Wed, 16 Sep 2009 21:47:08 -0400 Original-Received: from [199.232.76.173] (port=48268 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mo65Q-00087s-KM for bug-gnu-emacs@gnu.org; Wed, 16 Sep 2009 21:47:04 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:50112) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mo65P-0006rg-RC for bug-gnu-emacs@gnu.org; Wed, 16 Sep 2009 21:47:04 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8H1l1C1001765; Wed, 16 Sep 2009 18:47:01 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n8H1e559000656; Wed, 16 Sep 2009 18:40:05 -0700 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: closed 4455 X-Emacs-PR-Package: emacs X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:31155 Archived-At: This is a multi-part message in MIME format... ------------=_1253151605-628-0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Your message dated Wed, 16 Sep 2009 21:33:15 -0400 with message-id and subject line Re: bug#4455: 23.1.50; Can't turn off auto-fill-mode via m= ouse-minor-mode-menu has caused the Emacs bug report #4455, regarding 23.1.50; Can't turn off auto-fill-mode via mouse-minor-mode-menu to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com immediately.) --=20 4455: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3D4455 Emacs Bug Tracking System Contact owner@emacsbugs.donarmstrong.com with problems ------------=_1253151605-628-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by emacsbugs.donarmstrong.com; 17 Sep 2009 00:02:24 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.0 required=4.0 tests=AWL,FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8H02Mub017275 for ; Wed, 16 Sep 2009 17:02:23 -0700 Received: from mail.gnu.org ([199.232.76.166]:39958 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1Mo4S6-0004Lz-36 for emacs-pretest-bug@gnu.org; Wed, 16 Sep 2009 20:02:22 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Mo4S3-0006qx-P5 for emacs-pretest-bug@gnu.org; Wed, 16 Sep 2009 20:02:21 -0400 Received: from mail.gmx.net ([213.165.64.20]:54306) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1Mo4S3-0006qd-7K for emacs-pretest-bug@gnu.org; Wed, 16 Sep 2009 20:02:19 -0400 Received: (qmail invoked by alias); 17 Sep 2009 00:02:17 -0000 Received: from i59F55FAA.versanet.de (EHLO escher.local.home) [89.245.95.170] by mail.gmx.net (mp005) with SMTP; 17 Sep 2009 02:02:17 +0200 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX1/aEJFHvNDaHL1//Vz0+cELLa7Kby64za3AoNDChI jyw1+jZRNC1avf Received: by escher.local.home (Postfix, from userid 1000) id 1487A1D1938; Thu, 17 Sep 2009 02:02:16 +0200 (CEST) From: Stephen Berman To: emacs-pretest-bug@gnu.org Subject: 23.1.50; Can't turn off auto-fill-mode via mouse-minor-mode-menu Sender: steve@escher.local.home Date: Thu, 17 Sep 2009 02:02:16 +0200 Message-ID: <87bpla5th3.fsf@escher.local.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Y-GMX-Trusted: 0 X-FuHaFi: 0.5 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 1. emacs -Q 2. Click mouse-3 over the major mode indicator in the mode line and select Auto fill from the pop-up menu. 3. Click mouse-1 over "Fill" in the mode line and select "Turn Off[sic] minor mode" from the pop-up menu. => Auto Fill mode remains enabled. I traced this problem to auto-fill-function from simple.el, which is the value of cmd in the last when-sexp of popup-menu from mouse.el: since auto-fill-function is not interactive, (commandp cmd) is nil and the body of the when-clause, containing a call to cmd, is not evaluated. But simply making auto-fill-function interactive is not enough, since auto-fill-function is a no-op. The following redefinition of auto-fill-function makes step 3 above DTRT, but I suspect it is not the right fix, since I assume auto-fill-function was meant to be a no-op: (defun auto-fill-function () "Automatically break line at a previous space, in insertion of text." (interactive) (auto-fill-mode)) In GNU Emacs 23.1.50.1 (i686-pc-linux-gnu, GTK+ Version 2.14.4) of 2009-09-17 on escher Windowing system distributor `The X.Org Foundation', version 11.0.10502000 Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=local locale-coding-system: utf-8-unix default enable-multibyte-characters: t ------------=_1253151605-628-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 4455-done) by emacsbugs.donarmstrong.com; 17 Sep 2009 01:33:22 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.8 required=4.0 tests=AWL,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.pppoe.ca (ironport2-out.teksavvy.com [206.248.154.181]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8H1XLA0032212 for <4455-done@emacsbugs.donarmstrong.com>; Wed, 16 Sep 2009 18:33:22 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqQEAOcusUpFpZBe/2dsb2JhbACBU91GhBgFh30 X-IronPort-AV: E=Sophos;i="4.44,401,1249272000"; d="scan'208";a="45807122" Received: from 69-165-144-94.dsl.teksavvy.com (HELO ceviche.home) ([69.165.144.94]) by ironport2-out.pppoe.ca with ESMTP; 16 Sep 2009 21:33:15 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 74E13B449F; Wed, 16 Sep 2009 21:33:15 -0400 (EDT) From: Stefan Monnier To: Stephen Berman Subject: Re: bug#4455: 23.1.50; Can't turn off auto-fill-mode via mouse-minor-mode-menu Message-ID: References: <87bpla5th3.fsf@escher.local.home> Date: Wed, 16 Sep 2009 21:33:15 -0400 In-Reply-To: <87bpla5th3.fsf@escher.local.home> (Stephen Berman's message of "Thu, 17 Sep 2009 02:02:16 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > 2. Click mouse-3 over the major mode indicator in the mode line and > select Auto fill from the pop-up menu. > 3. Click mouse-1 over "Fill" in the mode line and select "Turn Off[sic] > minor mode" from the pop-up menu. > => Auto Fill mode remains enabled. > I traced this problem to auto-fill-function from simple.el, which is the > value of cmd in the last when-sexp of popup-menu from mouse.el: since > auto-fill-function is not interactive, (commandp cmd) is nil and the > body of the when-clause, containing a call to cmd, is not evaluated. Thank you for tracking it down. I've installed the patch below which should fix it. Stefan --- mouse.el.~1.357.~ 2009-07-21 17:38:12.000000000 -0400 +++ mouse.el 2009-09-16 21:30:41.000000000 -0400 @@ -158,7 +158,8 @@ (list (completing-read "Minor mode indicator: " (describe-minor-mode-completion-table-for-indicator)))) - (let ((minor-mode (lookup-minor-mode-from-indicator indicator))) + (let* ((minor-mode (lookup-minor-mode-from-indicator indicator)) + (mm-fun (or (get minor-mode :minor-mode-function) minor-mode))) (unless minor-mode (error "Cannot find minor mode for `%s'" indicator)) (let* ((map (cdr-safe (assq minor-mode minor-mode-map-alist))) (menu (and (keymapp map) (lookup-key map [menu-bar])))) @@ -167,10 +168,10 @@ (mouse-menu-non-singleton menu) `(keymap ,indicator - (turn-off menu-item "Turn Off minor mode" ,minor-mode) + (turn-off menu-item "Turn Off minor mode" ,mm-fun) (help menu-item "Help for minor mode" (lambda () (interactive) - (describe-function ',minor-mode)))))) + (describe-function ',mm-fun)))))) (popup-menu menu)))) (defun mouse-minor-mode-menu (event) ------------=_1253151605-628-0--