GNU bug report logs - #10773
define-derived-mode/define-minor-mode to declare hook variables

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Juri Linkov <juri <at> jurta.org>; dated Thu, 9 Feb 2012 09:50:02 UTC; Maintainer for emacs is bug-gnu-emacs <at> gnu.org.
Changed bug title to 'define-derived-mode/define-minor-mode to declare hook variables' from 'set-variable can't change values of user options' Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. Full text available.

Message received at 10773 <at> debbugs.gnu.org:


Received: (at 10773) by debbugs.gnu.org; 13 Feb 2012 03:00:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 12 22:00:11 2012
Received: from localhost ([127.0.0.1]:38045 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Rwm9C-0005W4-QF
	for submit <at> debbugs.gnu.org; Sun, 12 Feb 2012 22:00:11 -0500
Received: from chene.dit.umontreal.ca ([132.204.246.20]:33555)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <monnier <at> iro.umontreal.ca>) id 1Rwm9A-0005Vt-CP
	for 10773 <at> debbugs.gnu.org; Sun, 12 Feb 2012 22:00:09 -0500
Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242])
	by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q1D2wd7p027746; 
	Sun, 12 Feb 2012 21:58:39 -0500
Received: by pastel.home (Postfix, from userid 20848)
	id CA0BA59537; Sun, 12 Feb 2012 21:58:38 -0500 (EST)
From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Glenn Morris <rgm <at> gnu.org>
Subject: Re: bug#10773: set-variable can't change values of user options
Message-ID: <jwv7gzr1ltk.fsf-monnier+emacs <at> gnu.org>
References: <87r4y4fik0.fsf <at> mail.jurta.org> <5w1uq3lv3z.fsf <at> fencepost.gnu.org>
	<87sjijt2jv.fsf <at> mail.jurta.org> <64pqdm4mtn.fsf <at> fencepost.gnu.org>
	<p2d39mmusx.fsf <at> fencepost.gnu.org>
	<jwvmx8ofz6m.fsf-monnier+emacs <at> gnu.org>
	<mety2viz94.fsf <at> fencepost.gnu.org>
Date: Sun, 12 Feb 2012 21:58:38 -0500
In-Reply-To: <mety2viz94.fsf <at> fencepost.gnu.org> (Glenn Morris's message of
	"Sun, 12 Feb 2012 15:16:07 -0500")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-NAI-Spam-Flag: NO
X-NAI-Spam-Threshold: 5
X-NAI-Spam-Score: 0
X-NAI-Spam-Rules: 1 Rules triggered
	RV4130=0
X-NAI-Spam-Version: 2.2.0.9309 : core <4130> : streams <728074> : uri <1064333>
X-Spam-Score: -3.5 (---)
X-Debbugs-Envelope-To: 10773
Cc: Juri Linkov <juri <at> jurta.org>, 10773 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.5 (---)

>>> But I think that has been previously rejected.
>> That was a long time ago.  We should do it for 24.2.
> That's a surprise.  What's changed?

Resources.

> This feature was taken out 2005-05-17.
> Why does define-derived-mode deliberately go out of its way to NOT do
> this?  Will that be changed too?

Yes,


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10773; Package emacs. Full text available.

Message received at 10773 <at> debbugs.gnu.org:


Received: (at 10773) by debbugs.gnu.org; 12 Feb 2012 20:17:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 12 15:17:41 2012
Received: from localhost ([127.0.0.1]:37800 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Rwfre-0008Ij-4P
	for submit <at> debbugs.gnu.org; Sun, 12 Feb 2012 15:17:39 -0500
Received: from fencepost.gnu.org ([140.186.70.10]:41861 ident=Debian-exim)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <rgm <at> gnu.org>) id 1Rwfra-0008IT-O0
	for 10773 <at> debbugs.gnu.org; Sun, 12 Feb 2012 15:17:35 -0500
Received: from rgm by fencepost.gnu.org with local (Exim 4.71)
	(envelope-from <rgm <at> gnu.org>)
	id 1RwfqB-0006Ky-I4; Sun, 12 Feb 2012 15:16:07 -0500
From: Glenn Morris <rgm <at> gnu.org>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Subject: Re: bug#10773: set-variable can't change values of user options
References: <87r4y4fik0.fsf <at> mail.jurta.org> <5w1uq3lv3z.fsf <at> fencepost.gnu.org>
	<87sjijt2jv.fsf <at> mail.jurta.org> <64pqdm4mtn.fsf <at> fencepost.gnu.org>
	<p2d39mmusx.fsf <at> fencepost.gnu.org>
	<jwvmx8ofz6m.fsf-monnier+emacs <at> gnu.org>
X-Spook: Ortega Taiwan Mossad RSA interception digicash benelux
X-Ran: ]-"G!hkyj-x[p3-CIN&wb=]oz;_$<q}3erWoKiERU6cfPGmu=?T0=*R%H?T,^T.!5 <at> OhIO
X-Hue: blue
X-Debbugs-No-Ack: yes
X-Attribution: GM
Date: Sun, 12 Feb 2012 15:16:07 -0500
Message-ID: <mety2viz94.fsf <at> fencepost.gnu.org>
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: -4.2 (----)
X-Debbugs-Envelope-To: 10773
Cc: Juri Linkov <juri <at> jurta.org>, 10773 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.2 (----)

Stefan Monnier wrote:

>> But I think that has been previously rejected.
>
> That was a long time ago.  We should do it for 24.2.

That's a surprise. What's changed?
This feature was taken out 2005-05-17.
Why does define-derived-mode deliberately go out of its way to NOT do
this? Will that be changed too?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10773; Package emacs. Full text available.

Message received at 10773 <at> debbugs.gnu.org:


Received: (at 10773) by debbugs.gnu.org; 12 Feb 2012 15:16:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 12 10:16:10 2012
Received: from localhost ([127.0.0.1]:37666 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Rwb9t-0006rP-Vw
	for submit <at> debbugs.gnu.org; Sun, 12 Feb 2012 10:16:10 -0500
Received: from pruche.dit.umontreal.ca ([132.204.246.22]:36030)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <monnier <at> iro.umontreal.ca>) id 1Rwb9r-0006rH-KG
	for 10773 <at> debbugs.gnu.org; Sun, 12 Feb 2012 10:16:08 -0500
Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242])
	by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q1CFEeW6011053;
	Sun, 12 Feb 2012 10:14:40 -0500
Received: by ceviche.home (Postfix, from userid 20848)
	id 5265B666B1; Sat, 11 Feb 2012 23:34:15 -0500 (EST)
From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Glenn Morris <rgm <at> gnu.org>
Subject: Re: bug#10773: set-variable can't change values of user options
Message-ID: <jwvmx8ofz6m.fsf-monnier+emacs <at> gnu.org>
References: <87r4y4fik0.fsf <at> mail.jurta.org> <5w1uq3lv3z.fsf <at> fencepost.gnu.org>
	<87sjijt2jv.fsf <at> mail.jurta.org> <64pqdm4mtn.fsf <at> fencepost.gnu.org>
	<p2d39mmusx.fsf <at> fencepost.gnu.org>
Date: Sat, 11 Feb 2012 23:34:15 -0500
In-Reply-To: <p2d39mmusx.fsf <at> fencepost.gnu.org> (Glenn Morris's message of
	"Fri, 10 Feb 2012 13:01:50 -0500")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.93 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-NAI-Spam-Flag: NO
X-NAI-Spam-Level: 
X-NAI-Spam-Threshold: 5
X-NAI-Spam-Score: 0.2
X-NAI-Spam-Rules: 2 Rules triggered
	GEN_SPAM_FEATRE=0.2, RV4129=0
X-NAI-Spam-Version: 2.2.0.9309 : core <4129> : streams <727922> : uri <1064033>
X-Spam-Score: -2.0 (--)
X-Debbugs-Envelope-To: 10773
Cc: Juri Linkov <juri <at> jurta.org>, 10773 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.0 (--)

> But I think that has been previously rejected.

That was a long time ago.  We should do it for 24.2.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10773; Package emacs. Full text available.

Message received at 10773 <at> debbugs.gnu.org:


Received: (at 10773) by debbugs.gnu.org; 10 Feb 2012 18:03:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 10 13:03:09 2012
Received: from localhost ([127.0.0.1]:35201 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RvuoO-0000dG-Kp
	for submit <at> debbugs.gnu.org; Fri, 10 Feb 2012 13:03:09 -0500
Received: from fencepost.gnu.org ([140.186.70.10]:54631 ident=Debian-exim)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <rgm <at> gnu.org>) id 1RvuoL-0000d7-FR
	for 10773 <at> debbugs.gnu.org; Fri, 10 Feb 2012 13:03:06 -0500
Received: from rgm by fencepost.gnu.org with local (Exim 4.71)
	(envelope-from <rgm <at> gnu.org>)
	id 1Rvun8-0005sU-QQ; Fri, 10 Feb 2012 13:01:50 -0500
From: Glenn Morris <rgm <at> gnu.org>
To: Juri Linkov <juri <at> jurta.org>
Subject: Re: bug#10773: set-variable can't change values of user options
References: <87r4y4fik0.fsf <at> mail.jurta.org> <5w1uq3lv3z.fsf <at> fencepost.gnu.org>
	<87sjijt2jv.fsf <at> mail.jurta.org> <64pqdm4mtn.fsf <at> fencepost.gnu.org>
X-Spook: BRLO airframe cybercash beanpole Clinton virus top secret
X-Ran: ](#gp_zkYw9KTLQ=M$]3>?]b];cx3pVsRRa]W9*MV]OR{GQU33mtm[+^qzs%pCgE"pI6s/
X-Hue: magenta
X-Debbugs-No-Ack: yes
X-Attribution: GM
Date: Fri, 10 Feb 2012 13:01:50 -0500
In-Reply-To: <64pqdm4mtn.fsf <at> fencepost.gnu.org> (Glenn Morris's message of
	"Fri, 10 Feb 2012 12:31:32 -0500")
Message-ID: <p2d39mmusx.fsf <at> fencepost.gnu.org>
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: -4.2 (----)
X-Debbugs-Envelope-To: 10773
Cc: 10773 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.2 (----)

Glenn Morris wrote:

>> Currently William Stevenson is working on converting minor modes to use
>> `define-minor-mode', so more minor mode hooks will lose an ability to be
>> changed using `set-variable'.  I don't have an opinion whether this is
>> good or bad. 
>
> I think it is irrelevant / good.

PS If it is thought to be bad, the right solution would seem to be to
make define-minor-mode declare the hook with an appropriate defvar,
which it easily could. But I think that has been previously rejected.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10773; Package emacs. Full text available.

Message received at 10773 <at> debbugs.gnu.org:


Received: (at 10773) by debbugs.gnu.org; 10 Feb 2012 17:32:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 10 12:32:51 2012
Received: from localhost ([127.0.0.1]:35167 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RvuL5-0008JU-M4
	for submit <at> debbugs.gnu.org; Fri, 10 Feb 2012 12:32:51 -0500
Received: from fencepost.gnu.org ([140.186.70.10]:54113 ident=Debian-exim)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <rgm <at> gnu.org>) id 1RvuL3-0008JM-GV
	for 10773 <at> debbugs.gnu.org; Fri, 10 Feb 2012 12:32:50 -0500
Received: from rgm by fencepost.gnu.org with local (Exim 4.71)
	(envelope-from <rgm <at> gnu.org>)
	id 1RvuJp-0006wQ-Hu; Fri, 10 Feb 2012 12:31:33 -0500
From: Glenn Morris <rgm <at> gnu.org>
To: Juri Linkov <juri <at> jurta.org>
Subject: Re: bug#10773: set-variable can't change values of user options
References: <87r4y4fik0.fsf <at> mail.jurta.org> <5w1uq3lv3z.fsf <at> fencepost.gnu.org>
	<87sjijt2jv.fsf <at> mail.jurta.org>
X-Spook: clandestine $400 million in gold bullion Soviet mania NSA
X-Ran: U[xfrPYS1Ac}>P|$E""Pozidg}~tNau}DZg;.#ernym+5hQHf</(m4q"wOj$G-SnWhb#y%
X-Hue: black
X-Debbugs-No-Ack: yes
X-Attribution: GM
Date: Fri, 10 Feb 2012 12:31:32 -0500
In-Reply-To: <87sjijt2jv.fsf <at> mail.jurta.org> (Juri Linkov's message of "Fri,
	10 Feb 2012 12:18:56 +0200")
Message-ID: <64pqdm4mtn.fsf <at> fencepost.gnu.org>
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: -4.2 (----)
X-Debbugs-Envelope-To: 10773
Cc: 10773 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.2 (----)

Juri Linkov wrote:

> Currently William Stevenson is working on converting minor modes to use
> `define-minor-mode', so more minor mode hooks will lose an ability to be
> changed using `set-variable'.  I don't have an opinion whether this is
> good or bad. 

I think it is irrelevant / good.

> What I still don't understand is why some hooks have "*" in the docstring.

Perhaps it depends whether one interprets "*" as meaning "something a
user might want to set in .emacs", or "something a user might want to
set interactively" (this is what "Tips and Conventions" says).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10773; Package emacs. Full text available.

Message received at 10773 <at> debbugs.gnu.org:


Received: (at 10773) by debbugs.gnu.org; 10 Feb 2012 10:24:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 10 05:24:21 2012
Received: from localhost ([127.0.0.1]:34561 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RvneJ-00055X-F5
	for submit <at> debbugs.gnu.org; Fri, 10 Feb 2012 05:24:19 -0500
Received: from ps18281.dreamhost.com ([69.163.218.105]:49396
	helo=ps18281.dreamhostps.com)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <juri <at> jurta.org>) id 1RvneC-000551-Kf
	for 10773 <at> debbugs.gnu.org; Fri, 10 Feb 2012 05:24:10 -0500
Received: from localhost (ps18281.dreamhostps.com [69.163.218.105])
	by ps18281.dreamhostps.com (Postfix) with ESMTP id C7316451C84F;
	Fri, 10 Feb 2012 02:21:34 -0800 (PST)
From: Juri Linkov <juri <at> jurta.org>
To: Glenn Morris <rgm <at> gnu.org>
Subject: Re: bug#10773: set-variable can't change values of user options
Organization: JURTA
References: <87r4y4fik0.fsf <at> mail.jurta.org> <5w1uq3lv3z.fsf <at> fencepost.gnu.org>
Date: Fri, 10 Feb 2012 12:18:56 +0200
In-Reply-To: <5w1uq3lv3z.fsf <at> fencepost.gnu.org> (Glenn Morris's message of
	"Thu, 09 Feb 2012 13:28:16 -0500")
Message-ID: <87sjijt2jv.fsf <at> mail.jurta.org>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.93 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 10773
Cc: 10773 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

>> Why users are allowed to change the value of `outline-mode-hook',
>> but not `outline-minor-mode-hook'?
>
> The former is defined with (defvar ... "*...").
> The latter is not defined anywhere, but as define-derived-mode says
> about hooks and has been covered several times:
>
>   No problems result if this variable is not bound.
>   `add-hook' automatically binds it.  (This is true for all hook variables.)
>
> I would says it's not very useful to pass a hook to set-variable anyway,
> since you need to type a lisp expression, and probably should use
> an explicit add-hook statement.

Currently William Stevenson is working on converting minor modes to use
`define-minor-mode', so more minor mode hooks will lose an ability to be
changed using `set-variable'.  I don't have an opinion whether this is
good or bad.  I just discovered the inconsistency between `outline-mode-hook'
and `outline-minor-mode-hook' when trying to set temporarily them
to the same value with `set-variable'.

What I still don't understand is why some hooks have "*" in the docstring.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10773; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 10 Feb 2012 08:18:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 10 03:18:53 2012
Received: from localhost ([127.0.0.1]:34493 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Rvlgz-0002EO-9P
	for submit <at> debbugs.gnu.org; Fri, 10 Feb 2012 03:18:53 -0500
Received: from eggs.gnu.org ([140.186.70.92]:38833)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <geb-bug-gnu-emacs <at> m.gmane.org>) id 1Rvlgr-0002E7-E3
	for submit <at> debbugs.gnu.org; Fri, 10 Feb 2012 03:18:51 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <geb-bug-gnu-emacs <at> m.gmane.org>) id 1RvlfY-0003Z2-6D
	for submit <at> debbugs.gnu.org; Fri, 10 Feb 2012 03:17:28 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
	T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2
Received: from lists.gnu.org ([140.186.70.17]:45720)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <geb-bug-gnu-emacs <at> m.gmane.org>) id 1RvlfY-0003Yy-4a
	for submit <at> debbugs.gnu.org; Fri, 10 Feb 2012 03:17:24 -0500
Received: from eggs.gnu.org ([140.186.70.92]:36573)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <geb-bug-gnu-emacs <at> m.gmane.org>) id 1RvlfT-0001ez-Rj
	for bug-gnu-emacs <at> gnu.org; Fri, 10 Feb 2012 03:17:23 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <geb-bug-gnu-emacs <at> m.gmane.org>) id 1RvlfM-0003Wc-1P
	for bug-gnu-emacs <at> gnu.org; Fri, 10 Feb 2012 03:17:19 -0500
Received: from plane.gmane.org ([80.91.229.3]:49750)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <geb-bug-gnu-emacs <at> m.gmane.org>) id 1RvlfL-0003WH-LI
	for bug-gnu-emacs <at> gnu.org; Fri, 10 Feb 2012 03:17:12 -0500
Received: from list by plane.gmane.org with local (Exim 4.69)
	(envelope-from <geb-bug-gnu-emacs <at> m.gmane.org>) id 1RvlfI-0003i9-42
	for bug-gnu-emacs <at> gnu.org; Fri, 10 Feb 2012 09:17:08 +0100
Received: from c-71-237-25-24.hsd1.co.comcast.net ([71.237.25.24])
	by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
	id 1AlnuQ-0007hv-00
	for <bug-gnu-emacs <at> gnu.org>; Fri, 10 Feb 2012 09:17:08 +0100
Received: from kevin.d.rodgers by c-71-237-25-24.hsd1.co.comcast.net with
	local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00
	for <bug-gnu-emacs <at> gnu.org>; Fri, 10 Feb 2012 09:17:08 +0100
X-Injected-Via-Gmane: http://gmane.org/
To: bug-gnu-emacs <at> gnu.org
From: Kevin Rodgers <kevin.d.rodgers <at> gmail.com>
Subject: Re: bug#10773: set-variable can't change values of user options
Date: Fri, 10 Feb 2012 01:18:06 -0700
Lines: 61
Message-ID: <jh2jpq$qur$1 <at> dough.gmane.org>
References: <87r4y4fik0.fsf <at> mail.jurta.org> <5w1uq3lv3z.fsf <at> fencepost.gnu.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: usenet <at> dough.gmane.org
X-Gmane-NNTP-Posting-Host: c-71-237-25-24.hsd1.co.comcast.net
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US;
	rv:1.9.2.26) Gecko/20120129 Thunderbird/3.1.18
In-Reply-To: <5w1uq3lv3z.fsf <at> fencepost.gnu.org>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 140.186.70.17
X-Spam-Score: -4.2 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.2 (----)

On 2/9/12 11:28 AM, Glenn Morris wrote:
> Juri Linkov wrote:
>
>> Why users are allowed to change the value of `outline-mode-hook',
>> but not `outline-minor-mode-hook'?
>
> The former is defined with (defvar ... "*...").
> The latter is not defined anywhere, but as define-derived-mode says
> about hooks and has been covered several times:
>
>    No problems result if this variable is not bound.
>    `add-hook' automatically binds it.  (This is true for all hook variables.)
>
> I would says it's not very useful to pass a hook to set-variable anyway,
> since you need to type a lisp expression, and probably should use
> an explicit add-hook statement.

Or allow add-hook (and remove-hook) to be called interactively, for convenience:

--- -	2012-02-10 01:14:16.000000000 -0700
+++ /tmp/subr.el	2012-02-10 01:13:17.000000000 -0700
@@ -1216,15 +1216,17 @@
  unless the optional argument APPEND is non-nil, in which case
  FUNCTION is added at the end.

-The optional fourth argument, LOCAL, if non-nil, says to modify
-the hook's buffer-local value rather than its default value.
-This makes the hook buffer-local if needed, and it makes t a member
-of the buffer-local value.  That acts as a flag to run the hook
-functions in the default value as well as in the local value.
+The optional fourth argument, LOCAL, if non-nil or an interactive
+prefix arg, says to modify the hook's buffer-local value rather
+than its default value.  This makes the hook buffer-local if
+needed, and it makes t a member of the buffer-local value.  That
+acts as a flag to run the hook functions in the default value as
+well as in the local value.

  HOOK should be a symbol, and FUNCTION may be any valid function.  If
  HOOK is void, it is first set to nil.  If HOOK's value is a single
  function, it is changed to a list of functions."
+  (interactive "SHook: \naFunction: \ni\nP")
    (or (boundp hook) (set hook nil))
    (or (default-boundp hook) (set-default hook nil))
    (if local (unless (local-variable-if-set-p hook)
@@ -1264,8 +1266,10 @@
  FUNCTION isn't the value of HOOK, or, if FUNCTION doesn't appear in the
  list of hooks to run in HOOK, then nothing is done.  See `add-hook'.

-The optional third argument, LOCAL, if non-nil, says to modify
-the hook's buffer-local value rather than its default value."
+The optional third argument, LOCAL, if non-nil (interactively,
+with prefix argument) says to modify the hook's buffer-local
+value rather than its default value."
+  (interactive "SHook: \naFunction: \nP")
    (or (boundp hook) (set hook nil))
    (or (default-boundp hook) (set-default hook nil))
    ;; Do nothing if LOCAL is t but this hook has no local binding.

-- 
Kevin Rodgers
Denver, Colorado, USA





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10773; Package emacs. Full text available.

Message received at 10773 <at> debbugs.gnu.org:


Received: (at 10773) by debbugs.gnu.org; 9 Feb 2012 18:29:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 09 13:29:28 2012
Received: from localhost ([127.0.0.1]:34002 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RvYkJ-0005pn-W8
	for submit <at> debbugs.gnu.org; Thu, 09 Feb 2012 13:29:28 -0500
Received: from fencepost.gnu.org ([140.186.70.10]:54056 ident=Debian-exim)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <rgm <at> gnu.org>) id 1RvYkH-0005pg-Q3
	for 10773 <at> debbugs.gnu.org; Thu, 09 Feb 2012 13:29:26 -0500
Received: from rgm by fencepost.gnu.org with local (Exim 4.71)
	(envelope-from <rgm <at> gnu.org>)
	id 1RvYjA-0006e6-Cc; Thu, 09 Feb 2012 13:28:16 -0500
From: Glenn Morris <rgm <at> gnu.org>
To: Juri Linkov <juri <at> jurta.org>
Subject: Re: bug#10773: set-variable can't change values of user options
References: <87r4y4fik0.fsf <at> mail.jurta.org>
X-Spook: David John Oates Ron Brown Kosovo terrorist InfoSec
X-Ran: ;gaM(F3^i:7h7F9w!we%6m+oIJxeVGID!,aTZBoX=y7Gm\.`>t{xk<Mvw!S{6X[R&xpY.;
X-Hue: white
X-Debbugs-No-Ack: yes
X-Attribution: GM
Date: Thu, 09 Feb 2012 13:28:16 -0500
In-Reply-To: <87r4y4fik0.fsf <at> mail.jurta.org> (Juri Linkov's message of "Thu,
	09 Feb 2012 11:43:43 +0200")
Message-ID: <5w1uq3lv3z.fsf <at> fencepost.gnu.org>
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: -4.2 (----)
X-Debbugs-Envelope-To: 10773
Cc: 10773 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.2 (----)

Juri Linkov wrote:

> Why users are allowed to change the value of `outline-mode-hook',
> but not `outline-minor-mode-hook'?

The former is defined with (defvar ... "*...").
The latter is not defined anywhere, but as define-derived-mode says
about hooks and has been covered several times:

  No problems result if this variable is not bound.
  `add-hook' automatically binds it.  (This is true for all hook variables.)

I would says it's not very useful to pass a hook to set-variable anyway,
since you need to type a lisp expression, and probably should use
an explicit add-hook statement.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10773; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 9 Feb 2012 09:49:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 09 04:49:30 2012
Received: from localhost ([127.0.0.1]:33260 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RvQd8-0001O4-6s
	for submit <at> debbugs.gnu.org; Thu, 09 Feb 2012 04:49:30 -0500
Received: from eggs.gnu.org ([140.186.70.92]:45112)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <juri <at> jurta.org>) id 1RvQd6-0001Ns-HM
	for submit <at> debbugs.gnu.org; Thu, 09 Feb 2012 04:49:28 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <juri <at> jurta.org>) id 1RvQbr-0004TB-9K
	for submit <at> debbugs.gnu.org; Thu, 09 Feb 2012 04:48:16 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00
	autolearn=unavailable version=3.3.2
Received: from lists.gnu.org ([140.186.70.17]:54655)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <juri <at> jurta.org>) id 1RvQbr-0004T5-7l
	for submit <at> debbugs.gnu.org; Thu, 09 Feb 2012 04:48:11 -0500
Received: from eggs.gnu.org ([140.186.70.92]:41020)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <juri <at> jurta.org>) id 1RvQbl-0007FE-RJ
	for bug-gnu-emacs <at> gnu.org; Thu, 09 Feb 2012 04:48:11 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <juri <at> jurta.org>) id 1RvQbf-0004QO-RG
	for bug-gnu-emacs <at> gnu.org; Thu, 09 Feb 2012 04:48:05 -0500
Received: from ps18281.dreamhost.com ([69.163.218.105]:45460
	helo=ps18281.dreamhostps.com) by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <juri <at> jurta.org>) id 1RvQbf-0004Q4-LX
	for bug-gnu-emacs <at> gnu.org; Thu, 09 Feb 2012 04:47:59 -0500
Received: from localhost (ps18281.dreamhostps.com [69.163.218.105])
	by ps18281.dreamhostps.com (Postfix) with ESMTP id 6EF48451C815
	for <bug-gnu-emacs <at> gnu.org>; Thu,  9 Feb 2012 01:46:37 -0800 (PST)
From: Juri Linkov <juri <at> jurta.org>
To: bug-gnu-emacs <at> gnu.org
Subject: set-variable can't change values of user options
Organization: JURTA
Date: Thu, 09 Feb 2012 11:43:43 +0200
Message-ID: <87r4y4fik0.fsf <at> mail.jurta.org>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.93 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 140.186.70.17
X-Spam-Score: -4.2 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.2 (----)

Package: emacs
Version: 24.0.93
Severity: wishlist

emacs -Q C-h C-t
M-x set-variable RET outline-mode-hook RET (hide-body) RET
M-x set-variable RET outline-minor-mode-hook RET [No match]

Why users are allowed to change the value of `outline-mode-hook',
but not `outline-minor-mode-hook'?




Acknowledgement sent to Juri Linkov <juri <at> jurta.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. Full text available.
Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#10773; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 13 Feb 2012 17:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.