From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: jakanakaevangeli Newsgroups: gmane.emacs.bugs Subject: bug#46407: 27.1; Hooks with permanent-local-hook are not cleared of lambdas Date: Tue, 09 Feb 2021 22:38:49 +0100 Message-ID: <87ft249b12.fsf@miha-pc> References: <87im7182fn.fsf@miha-pc> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31010"; mail-complaints-to="usenet@ciao.gmane.io" To: 46407@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 09 22:36:41 2021 Return-path: Envelope-to: geb-bug-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 1l9agb-0007yr-8E for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 09 Feb 2021 22:36:41 +0100 Original-Received: from localhost ([::1]:56568 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9aga-0001fN-3J for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 09 Feb 2021 16:36:40 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37592) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9afz-0001dW-75 for bug-gnu-emacs@gnu.org; Tue, 09 Feb 2021 16:36:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43365) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l9afx-0004Vy-LM for bug-gnu-emacs@gnu.org; Tue, 09 Feb 2021 16:36:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l9afx-0001ud-JY for bug-gnu-emacs@gnu.org; Tue, 09 Feb 2021 16:36:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: jakanakaevangeli Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Feb 2021 21:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46407 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16129065047277 (code B ref -1); Tue, 09 Feb 2021 21:36:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 9 Feb 2021 21:35:04 +0000 Original-Received: from localhost ([127.0.0.1]:54911 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9af1-0001tJ-Su for submit@debbugs.gnu.org; Tue, 09 Feb 2021 16:35:04 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:57008) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9af0-0001sz-DA for submit@debbugs.gnu.org; Tue, 09 Feb 2021 16:35:02 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37204) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9af0-00015Y-5l for bug-gnu-emacs@gnu.org; Tue, 09 Feb 2021 16:35:02 -0500 Original-Received: from chiru.no ([142.4.209.132]:43090) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1l9aex-0004Bm-5v for bug-gnu-emacs@gnu.org; Tue, 09 Feb 2021 16:35:01 -0500 Original-Received: from localhost (BSN-77-156-43.static.siol.net [193.77.156.43]) by chiru.no (Postfix) with ESMTPSA id 6A715128001C for ; Tue, 9 Feb 2021 21:34:57 +0000 (UTC) In-Reply-To: <87im7182fn.fsf@miha-pc> Received-SPF: none client-ip=142.4.209.132; envelope-from=jakanakaevangeli@chiru.no; helo=chiru.no X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:199740 Archived-At: Also one more thing: (defvar some-hook nil) (add-hook 'some-hook #'some-fun nil t) (put 'some-fun 'permanent-local-hook t) If we mark a function as permanent-local-hook only after adding it to a hook, the hook symbol will not have its permanent-local property set to 'permanent-local-hook, so some-fun will not be kept on removal of local variables. This can be a real non-theoretical problem when adding an autoloaded function to a hook.