From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 03 09:42:15 2011 Received: (at submit) by debbugs.gnu.org; 3 Apr 2011 13:42:15 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q6NZH-0001QJ-1Q for submit@debbugs.gnu.org; Sun, 03 Apr 2011 09:42:15 -0400 Received: from emh06.mail.saunalahti.fi ([62.142.5.116]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q6NZE-0001Q5-30 for submit@debbugs.gnu.org; Sun, 03 Apr 2011 09:42:13 -0400 Received: from saunalahti-vams (vs3-12.mail.saunalahti.fi [62.142.5.96]) by emh06-2.mail.saunalahti.fi (Postfix) with SMTP id 7E019C7C64 for ; Sun, 3 Apr 2011 16:42:05 +0300 (EEST) Received: from emh01.mail.saunalahti.fi ([62.142.5.107]) by vs3-12.mail.saunalahti.fi ([62.142.5.96]) with SMTP (gateway) id A05C2D6CD03; Sun, 03 Apr 2011 16:42:05 +0300 Received: from cante.net (a91-155-187-216.elisa-laajakaista.fi [91.155.187.216]) by emh01.mail.saunalahti.fi (Postfix) with ESMTP id 62D714033 for ; Sun, 3 Apr 2011 16:42:04 +0300 (EEST) From: Jari Aalto To: submit@debbugs.gnu.org Subject: easy-mmode.el -- enhance define-minor-mode to define turn-on-* and turn-off-* functions Mail-Copies-To: poster Date: Sun, 03 Apr 2011 16:42:03 +0300 Message-ID: <878vvrbges.fsf@picasso.cante.net> MIME-Version: 1.0 Content-Type: text/plain X-Antivirus: VAMS X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Package: emacs Version: 23.2+1-7 Severity: wishlist It would be nice if the define-minor-mode would also define functions: turn-on-* turn-off-* An example: ;; lisp/hl-line.el (define-minor-mode hl-line-mode ...) That would make it possible to add to ~/.emacs: (add-hook 'nroff-mode-hook 'turn-on-hl-line-mode) ;; Or later: (remove-hook 'nroff-mode-hook 'turn-on-hl-line-mode) This would be much more cleaner than what is needed now: (add-hook 'nroff-mode-hook '(lambda () (turn-on-hl-line-mode 1))) ... ;; the hook removal command is as messy -- System Information Debian Release: wheezy/sid APT Prefers testing APT policy: (990, testing) (500, unstable) (1, experimental) Architecture: amd64 Kernel: Linux picasso 2.6.32-5-amd64 #1 SMP Wed Jan 12 03:40:32 UTC 2011 x86_64 GNU/Linux Locale: LANG=en_DK.UTF-8 -- Versions of packages `emacs depends on'. Depends: emacs23 23.2+1-7 GNU Emacs is the extensible self-documenting emacs23-lucid 23.2+1-7 GNU Emacs is the extensible self-documenting emacs23-nox 23.2+1-7 GNU Emacs is the extensible self-documenting From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 03 13:46:12 2011 Received: (at 8416) by debbugs.gnu.org; 3 Apr 2011 17:46:12 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q6RNL-0006kT-Vy for submit@debbugs.gnu.org; Sun, 03 Apr 2011 13:46:12 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q6RNK-0006kH-Nz for 8416@debbugs.gnu.org; Sun, 03 Apr 2011 13:46:11 -0400 Received: from localhost ([127.0.0.1]:54410) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q6RNE-0001sC-46; Sun, 03 Apr 2011 13:46:04 -0400 From: Glenn Morris To: Jari Aalto Subject: Re: bug#8416: easy-mmode.el -- enhance define-minor-mode to define turn-on-* and turn-off-* functions References: <878vvrbges.fsf@picasso.cante.net> X-Spook: Cocaine FSF clones Project Monarch halcon NORAD class X-Ran: ,g (Jari Aalto's message of "Sun, 03 Apr 2011 16:42:03 +0300") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.3 (------) X-Debbugs-Envelope-To: 8416 Cc: 8416@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.3 (------) Jari Aalto wrote: > It would be nice if the define-minor-mode would also define functions: > > turn-on-* > turn-off-* You've proposed this kind of thing before, and it has been rejected. http://debbugs.gnu.org/cgi/bugreport.cgi?msg=9;bug=4288 "...I don't like the turn-on-* and turn-off-* functions: we have already the *-mode functions which should be plenty." http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7709#8 "There is no need for it (and neither is there a need for turn-on-eldoc-mode). There is M-x eldoc-mode." From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 04 02:44:24 2011 Received: (at control) by debbugs.gnu.org; 4 Apr 2011 06:44:24 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q6dWS-0008F1-8S for submit@debbugs.gnu.org; Mon, 04 Apr 2011 02:44:24 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q6dWQ-0008Ep-EY for control@debbugs.gnu.org; Mon, 04 Apr 2011 02:44:22 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Q6dWL-0002dh-2U for control@debbugs.gnu.org; Mon, 04 Apr 2011 02:44:17 -0400 Date: Mon, 04 Apr 2011 02:44:17 -0400 Message-Id: Subject: control message for bug 8416 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -6.3 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.3 (------) tag 8416 wontfix From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 04 10:32:11 2011 Received: (at 8416-done) by debbugs.gnu.org; 4 Apr 2011 14:32:11 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q6kp8-00031v-S5 for submit@debbugs.gnu.org; Mon, 04 Apr 2011 10:32:11 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q6kp6-00031j-UJ for 8416-done@debbugs.gnu.org; Mon, 04 Apr 2011 10:32:09 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAE/VmU1Ld/Y6/2dsb2JhbAClXniIebcEhWsElj8 X-IronPort-AV: E=Sophos;i="4.63,297,1299474000"; d="scan'208";a="103075605" Received: from 75-119-246-58.dsl.teksavvy.com (HELO pastel.home) ([75.119.246.58]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 04 Apr 2011 10:32:03 -0400 Received: by pastel.home (Postfix, from userid 20848) id 25D1658DF1; Mon, 4 Apr 2011 10:32:03 -0400 (EDT) From: Stefan Monnier To: Jari Aalto Subject: Re: bug#8416: easy-mmode.el -- enhance define-minor-mode to define turn-on-* and turn-off-* functions Message-ID: References: <878vvrbges.fsf@picasso.cante.net> Date: Mon, 04 Apr 2011 10:32:03 -0400 In-Reply-To: <878vvrbges.fsf@picasso.cante.net> (Jari Aalto's message of "Sun, 03 Apr 2011 16:42:03 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 8416-done Cc: 8416-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) > It would be nice if the define-minor-mode would also define functions: > turn-on-* > turn-off-* In Emacs-24, the `foo-mode' function of a minor mode *is* the turn-on-foo-mode function (at least when called non-interactively without an argument, e.g. on a normal hook). > This would be much more cleaner than what is needed now: > (add-hook 'nroff-mode-hook '(lambda () (turn-on-hl-line-mode 1))) As mentioned, the above is not needed any more: (add-hook 'nroff-mode-hook 'hl-line-mode) will work just fine. The turn-off-foo is rarely needed in my experience. Stefan From unknown Mon Jun 23 07:51:09 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 03 May 2011 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator