From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: Minor mode hook run when mode is deactivated? Date: Thu, 08 Oct 2020 09:53:40 -0400 Message-ID: References: <87d01tr5l1.fsf@fastmail.fm> <87h7r5b4j5.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21976"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: Joost Kremers Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 08 15:54:21 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kQWNA-0005dJ-VM for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 08 Oct 2020 15:54:20 +0200 Original-Received: from localhost ([::1]:46130 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kQWNA-0007n0-1P for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 08 Oct 2020 09:54:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58672) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kQWMc-0007mY-Lp for help-gnu-emacs@gnu.org; Thu, 08 Oct 2020 09:53:46 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:31278) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kQWMa-0001DW-RA for help-gnu-emacs@gnu.org; Thu, 08 Oct 2020 09:53:46 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 127D980AF9; Thu, 8 Oct 2020 09:53:43 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id BB91280608; Thu, 8 Oct 2020 09:53:41 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1602165221; bh=ZWnMn9NZ+z7mHSwBratfjKnXWdZgsPL8tgZb6IfkvVg=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=RjJBrmDstsNFtl/dXRLwpyNOSvomyjcOBGnXQsJjcEaDIfCOvZ7aaaGEU96MP0FZ9 uFW4EDDVWGyQO76YS48PjjmaYzVXNU9nRGOI7Vp2bmI5S8NQh+M7d3HdruN+Rugj4J 2BY0m+KGEVIsEYjNxfaTpvZci2UxMFm81b+R0vJjQ6tgVw/HiBnMVNdjEI4DsWnM7y vOJCPDeppA5qysAYWh1RhuPNKJtuUT8VgRHp0VOL7svd4JdZYotib5qiHSIT72P2TI Xoz3xuDZo30QwG1Qh0mqM8hxv4Pd22wdH1zdg//XFPrjQysPXZNzoG0vV+6fk795Q1 Peuwn8fNODp7A== Original-Received: from alfajor (unknown [157.52.9.240]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 94B921202BA; Thu, 8 Oct 2020 09:53:41 -0400 (EDT) In-Reply-To: <87h7r5b4j5.fsf@fastmail.fm> (Joost Kremers's message of "Thu, 08 Oct 2020 08:44:30 +0200") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/08 09:53:43 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:124375 Archived-At: > That makes sense, but it does mean that you cannot put a minor mode onto > another minor mode hook.[1] And expect this minor mode to be enabled/disabled along with the "parent" minor mode? no, indeed! > Which is OK, I was just surprised that I wasn't able to find anything about > this in the documentation. Is in there and I just didn't search well enough, > or should it perhaps be added? `C-h o -mode-hook RET` should say that it is run both when leaving and entering. So either your specific hook failed to mention it, or you looked in some other part of the doc. In either case it sounds like you found a documentation bug, so please report it (it's important then to say exactly where you looked for that info). Stefan