From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stefan Monnier" Newsgroups: gmane.emacs.devel Subject: customize-mark-as-set for M-x foo-mode Date: Mon, 19 Aug 2002 16:55:55 -0400 Sender: emacs-devel-admin@gnu.org Message-ID: <200208192055.g7JKttB15245@rum.cs.yale.edu> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1029790650 13383 127.0.0.1 (19 Aug 2002 20:57:30 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 19 Aug 2002 20:57:30 +0000 (UTC) Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17gtaa-0003Tf-00 for ; Mon, 19 Aug 2002 22:57:28 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17gu2B-0006E3-00 for ; Mon, 19 Aug 2002 23:25:59 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17gtbg-0007iX-00; Mon, 19 Aug 2002 16:58:36 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17gtZ8-0007Fr-00 for emacs-devel@gnu.org; Mon, 19 Aug 2002 16:55:58 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17gtZ6-0007F3-00 for emacs-devel@gnu.org; Mon, 19 Aug 2002 16:55:57 -0400 Original-Received: from rum.cs.yale.edu ([128.36.229.169]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17gtZ6-0007EP-00 for emacs-devel@gnu.org; Mon, 19 Aug 2002 16:55:56 -0400 Original-Received: (from monnier@localhost) by rum.cs.yale.edu (8.11.6/8.11.6) id g7JKttB15245; Mon, 19 Aug 2002 16:55:55 -0400 X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 Original-To: emacs-devel@gnu.org Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:6659 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:6659 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