unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu>
Subject: customize-mark-as-set for M-x foo-mode
Date: Mon, 19 Aug 2002 16:55:55 -0400	[thread overview]
Message-ID: <200208192055.g7JKttB15245@rum.cs.yale.edu> (raw)


I see that all the minor-mode-like things in the menu-bar
do (customize-mark-as-set 'foo).  I also saw Per's comment
that this should only be done when the command is executed
interactively.

Is there any reason why it's only executed when run from the
menu-bar rather than from M-x ?

I.e. any objection to doing it for all global minor-modes whenever they are
called interactively ?


	Stefan


--- easy-mmode.el.~1.40.~	Wed Aug 14 21:04:45 2002
+++ easy-mmode.el	Mon Aug 19 16:50:45 2002
@@ -190,11 +185,13 @@
 	 ,@body
 	 ;; The on/off hooks are here for backward compatibility only.
 	 (run-hooks ',hook (if ,mode ',hook-on ',hook-off))
-	 ;; Return the new setting.
 	 (if (interactive-p)
+	     (progn
+	       ,(if globalp `(customize-mark-as-set ',mode))
 	     (message ,(format "%s %%sabled" pretty-name)
-		      (if ,mode "en" "dis")))
+			(if ,mode "en" "dis"))))
 	 (force-mode-line-update)
+	 ;; Return the new setting.
 	 ,mode)
 
        ;; Autoloading an easy-mmode-define-minor-mode autoloads

             reply	other threads:[~2002-08-19 20:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-19 20:55 Stefan Monnier [this message]
2002-08-21  0:12 ` customize-mark-as-set for M-x foo-mode Richard Stallman
2002-08-21 15:29   ` Stefan Monnier
2002-08-22  1:57     ` Richard Stallman
2002-08-22 15:23       ` Stefan Monnier
2002-08-26 12:22     ` Per Abrahamsen
2002-08-27 19:05       ` Richard Stallman
2002-08-28  0:03         ` Stefan Monnier
2002-08-28 23:32           ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200208192055.g7JKttB15245@rum.cs.yale.edu \
    --to=monnier+gnu/emacs@rum.cs.yale.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).