all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#4455: 23.1.50; Can't turn off auto-fill-mode via mouse-minor-mode-menu
@ 2009-09-17  0:02 ` Stephen Berman
  2009-09-17  1:40   ` bug#4455: marked as done (23.1.50; Can't turn off auto-fill-mode via mouse-minor-mode-menu) Emacs bug Tracking System
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Berman @ 2009-09-17  0:02 UTC (permalink / raw)
  To: emacs-pretest-bug

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





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#4455: marked as done (23.1.50; Can't turn off auto-fill-mode via mouse-minor-mode-menu)
  2009-09-17  0:02 ` bug#4455: 23.1.50; Can't turn off auto-fill-mode via mouse-minor-mode-menu Stephen Berman
@ 2009-09-17  1:40   ` Emacs bug Tracking System
  0 siblings, 0 replies; 2+ messages in thread
From: Emacs bug Tracking System @ 2009-09-17  1:40 UTC (permalink / raw)
  To: Stefan Monnier

[-- Attachment #1: Type: text/plain, Size: 943 bytes --]

Your message dated Wed, 16 Sep 2009 21:33:15 -0400
with message-id <jwvr5u6fjbe.fsf-monnier+emacsbugreports@gnu.org>
and subject line Re: bug#4455: 23.1.50; Can't turn off auto-fill-mode via mouse-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.)


-- 
4455: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=4455
Emacs Bug Tracking System
Contact owner@emacsbugs.donarmstrong.com with problems

[-- Attachment #2: Type: message/rfc822, Size: 3721 bytes --]

From: Stephen Berman <stephen.berman@gmx.net>
To: emacs-pretest-bug@gnu.org
Subject: 23.1.50; Can't turn off auto-fill-mode via mouse-minor-mode-menu
Date: Thu, 17 Sep 2009 02:02:16 +0200
Message-ID: <87bpla5th3.fsf@escher.local.home>

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


[-- Attachment #3: Type: message/rfc822, Size: 3566 bytes --]

From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Stephen Berman <stephen.berman@gmx.net>
Subject: Re: bug#4455: 23.1.50; Can't turn off auto-fill-mode via mouse-minor-mode-menu
Date: Wed, 16 Sep 2009 21:33:15 -0400
Message-ID: <jwvr5u6fjbe.fsf-monnier+emacsbugreports@gnu.org>

> 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)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-09-17  1:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <jwvr5u6fjbe.fsf-monnier+emacsbugreports@gnu.org>
2009-09-17  0:02 ` bug#4455: 23.1.50; Can't turn off auto-fill-mode via mouse-minor-mode-menu Stephen Berman
2009-09-17  1:40   ` bug#4455: marked as done (23.1.50; Can't turn off auto-fill-mode via mouse-minor-mode-menu) Emacs bug Tracking System

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.