From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#34073: 26.1; Missing documentation for minor mode hook behavior Date: Tue, 09 Jul 2019 18:35:57 -0400 Message-ID: <87bly23kfm.fsf@gmail.com> References: <20190114091307.f33jqe54syxtceeq@lenovo> <8736jergtr.fsf@mouse.gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="259807"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2.90 (gnu/linux) Cc: 34073@debbugs.gnu.org, Piotr Kaznowski To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 10 00:51:26 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hkyxI-0015Gn-Hf for geb-bug-gnu-emacs@m.gmane.org; Wed, 10 Jul 2019 00:51:24 +0200 Original-Received: from localhost ([::1]:56598 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkyjX-0005Mt-F1 for geb-bug-gnu-emacs@m.gmane.org; Tue, 09 Jul 2019 18:37:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35637) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkyjP-0005KK-V6 for bug-gnu-emacs@gnu.org; Tue, 09 Jul 2019 18:37:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hkyjO-0004f3-NJ for bug-gnu-emacs@gnu.org; Tue, 09 Jul 2019 18:37:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53883) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hkyjO-0004du-Dz for bug-gnu-emacs@gnu.org; Tue, 09 Jul 2019 18:37:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hkyjO-0007Il-6K for bug-gnu-emacs@gnu.org; Tue, 09 Jul 2019 18:37:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Jul 2019 22:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34073 X-GNU-PR-Package: emacs Original-Received: via spool by 34073-submit@debbugs.gnu.org id=B34073.156271176928011 (code B ref 34073); Tue, 09 Jul 2019 22:37:02 +0000 Original-Received: (at 34073) by debbugs.gnu.org; 9 Jul 2019 22:36:09 +0000 Original-Received: from localhost ([127.0.0.1]:34471 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkyiV-0007Hj-Q4 for submit@debbugs.gnu.org; Tue, 09 Jul 2019 18:36:08 -0400 Original-Received: from mail-io1-f41.google.com ([209.85.166.41]:47096) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkyiS-0007HC-TN for 34073@debbugs.gnu.org; Tue, 09 Jul 2019 18:36:05 -0400 Original-Received: by mail-io1-f41.google.com with SMTP id i10so389674iol.13 for <34073@debbugs.gnu.org>; Tue, 09 Jul 2019 15:36:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=K+buxY3xqmbIEV/XWO2BmXNzP38toDurwQQ8DrK81qU=; b=hCk6469qApS5OdgfZOdIpUIjCw08aEwP4tyDpeBwbxP6VUXgBHQMONdSFgmiXFeF+K OOz2X6b77K3olviTn04rfcPyBmA5OioVt+huj22uHRparxYZxVzNrnBJrWV1bASa65iN VkfV5ia+d+dWBxTZ3ATCGTbMSI4QD+JwVE7ZgtffPVIhk1rFK6juPTyGYOksP9GW+SlQ 9aVfkWOuX/YgFJLkb5gkYYDSlPxg5pyVzHc/D7Awrv/9SzT21OXUmeRTfc+aRRulEpUX yUDGiG/nkBwBuSSYwbE0GWgHYoMJqLcYwRXLknLpfv5uv/c1LVEgitNJ6s3xndWVy/y6 vT0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=K+buxY3xqmbIEV/XWO2BmXNzP38toDurwQQ8DrK81qU=; b=aPvYvMJkCWBv8FthFTXqWeLOZL4Ab/iJFK8SnZHAxK+v/5lSlGN21oquDFMo0+OxDr dTJR/RlmNw2uRnE3Wr/CTGkMZSKRK5wIzfdcVT08q+XLaFmTsPTk1+SPm7z2CuGH/Ymv 9/bZFDHy4MkyFTeDr0IfaQO96MLEnA0amG8siP3FNAwhlDiyMaFWhK9HmI2qS6EVK2+Y 7hsSUw1W8rX2m/MJVDgAd95ZPkvmcIjSBEywO+3XU1gggCJoHXeWZpo7XJBfGJMluYNB SH/lyJmGkZSx1by9g48VCv6s57WEWqAp40dSq1V2+fEHiuNp5PiHH5lAO/CoKHvWy5Ie E/rQ== X-Gm-Message-State: APjAAAUbdSQ0x8KHZKSJhvshvH6CXNBR7G35HFBnEd/XAwDA5eP2B0vg vwxAv6A8yqqWrpSagIAB1fr9abbu X-Google-Smtp-Source: APXvYqyoOjvQ3EC9JzUtUYT44BA64PjpyTH5JsUzMMuVH8LAyWef2AWtYea/e8eGklT4TVMiVIY+KQ== X-Received: by 2002:a6b:6b02:: with SMTP id g2mr8816322ioc.13.1562711759062; Tue, 09 Jul 2019 15:35:59 -0700 (PDT) Original-Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.gmail.com with ESMTPSA id f17sm246903ioc.2.2019.07.09.15.35.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 09 Jul 2019 15:35:58 -0700 (PDT) In-Reply-To: <8736jergtr.fsf@mouse.gnus.org> (Lars Ingebrigtsen's message of "Wed, 10 Jul 2019 00:20:00 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:162572 Archived-At: Lars Ingebrigtsen writes: > Piotr Kaznowski writes: > >> I couldn't find essential information about minor mode hooks behavior, >> namely that "The minor mode's hook is called both when activating and >> deactivating the minor mode" (as stated here: >> https://emacs.stackexchange.com/a/47092/17425). >> >> It isn't mentioned in the manual (sections "Minor Modes" and "Hooks"), >> nor in the docstring for `add-hook' function. > > Mentioning it `add-hook' is perhaps not natural, and I don't think it's > 100% adhered to, anyway? Only by minor modes that are defined by > define-minor-mode? Other minor modes may or may not call the hook. > > It is mentioned in the "Defining Minor Modes" node of the Lisp > manual... but is probably not where people would be looking for this > information. > > Hm. Perhaps `add-hook' is the right place to mention this anyway? But > with caveats about, well, everything? Maybe define-minor-mode could mention this in the mode's docstring, like it does for the ARG?