unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Foo Mode enabled
@ 2005-05-06 11:42 Eli Zaretskii
  2005-05-07  9:26 ` Richard Stallman
  0 siblings, 1 reply; 2+ messages in thread
From: Eli Zaretskii @ 2005-05-06 11:42 UTC (permalink / raw)


If a minor mode is defined via define-minor-mode, then the status
message "FOO Mode enabled" is not displayed if toggling the mode
autoloads some package.

This happens because define-minor-mode has this fragment:

	 (if (called-interactively-p)
	     (progn
	       ,(if globalp `(customize-mark-as-set ',mode))
	       (unless (current-message)
		 (message ,(format "%s %%sabled" pretty-name)
			  (if ,mode "en" "dis")))))

I understand why this is done, but the latest changes that introduced
jka-cmpr-hook.el and rearranged the way auto-compression-mode is
loaded cause a minor misfeature due to this: if you start Emacs and
type "M-x auto-compression-mode RET", you will not see the message
telling you that Auto-Compression mode disabled".

I'm not sure what would be the best way to fix it.  It is easy to fix
this for jka-compr alone, but the questions is, should easy-mmode.el
do something differently in the above fragment (like perhaps not do
this for messages which announce loading of packages).

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

* Re: Foo Mode enabled
  2005-05-06 11:42 Foo Mode enabled Eli Zaretskii
@ 2005-05-07  9:26 ` Richard Stallman
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Stallman @ 2005-05-07  9:26 UTC (permalink / raw)
  Cc: emacs-devel

    I'm not sure what would be the best way to fix it.  It is easy to fix
    this for jka-compr alone, but the questions is, should easy-mmode.el
    do something differently in the above fragment (like perhaps not do
    this for messages which announce loading of packages).

Here's an idea: don't suppress the mode state change message for
messages that were displayed by the execution of the minor mode
command itself.

This seems correct in general, and it could be done by calling
current-message atthe start of the function and comparing.

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

end of thread, other threads:[~2005-05-07  9:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-06 11:42 Foo Mode enabled Eli Zaretskii
2005-05-07  9:26 ` Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).