GNU bug report logs -
#4455
23.1.50; Can't turn off auto-fill-mode via mouse-minor-mode-menu
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 4455 in the body.
You can then email your comments to 4455 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#4455
; Package
emacs
.
(Thu, 17 Sep 2009 00:10:05 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stephen Berman <stephen.berman <at> gmx.net>
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Thu, 17 Sep 2009 00:10:06 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
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
Reply sent
to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
You have taken responsibility.
(Thu, 17 Sep 2009 01:40:05 GMT)
Full text and
rfc822 format available.
Notification sent
to
Stephen Berman <stephen.berman <at> gmx.net>
:
bug acknowledged by developer.
(Thu, 17 Sep 2009 01:40:05 GMT)
Full text and
rfc822 format available.
Message #10 received at 4455-done <at> emacsbugs.donarmstrong.com (full text, mbox):
> 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)
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> emacsbugs.donarmstrong.com
.
(Thu, 15 Oct 2009 14:24:11 GMT)
Full text and
rfc822 format available.
This bug report was last modified 15 years and 330 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.