From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.bugs Subject: bug#47992: 27; 28; Phase out use of `equal` in `add-hook`, `remove-hook` Date: Mon, 05 Jul 2021 21:48:11 -0400 Message-ID: References: <87mttdh57n.fsf@gnus.org> <877di6udfy.fsf@web.de> <87wnq6opfo.fsf@gnus.org> <875yxqrekx.fsf@web.de> <87sg0uokh8.fsf@gnus.org> <87eece66tc.fsf@web.de> Reply-To: rms@gnu.org Content-Type: text/plain; charset=Utf-8 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37462"; mail-complaints-to="usenet@ciao.gmane.io" Cc: mail@daniel-mendler.de, larsi@gnus.org, 47992@debbugs.gnu.org, monnier@iro.umontreal.ca, jakanakaevangeli@chiru.no To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 06 03:49:12 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 1m0aD2-0009Xv-FN for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 06 Jul 2021 03:49:12 +0200 Original-Received: from localhost ([::1]:38188 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0aD1-0006yq-Ht for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 05 Jul 2021 21:49:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51452) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0aCs-0006yf-DR for bug-gnu-emacs@gnu.org; Mon, 05 Jul 2021 21:49:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35382) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0aCs-0004lb-5c for bug-gnu-emacs@gnu.org; Mon, 05 Jul 2021 21:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m0aCr-0007K6-LB for bug-gnu-emacs@gnu.org; Mon, 05 Jul 2021 21:49:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Richard Stallman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 06 Jul 2021 01:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47992 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed Original-Received: via spool by 47992-submit@debbugs.gnu.org id=B47992.162553610228103 (code B ref 47992); Tue, 06 Jul 2021 01:49:01 +0000 Original-Received: (at 47992) by debbugs.gnu.org; 6 Jul 2021 01:48:22 +0000 Original-Received: from localhost ([127.0.0.1]:46928 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0aCE-0007JD-01 for submit@debbugs.gnu.org; Mon, 05 Jul 2021 21:48:22 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:53470) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0aCB-0007J0-G7 for 47992@debbugs.gnu.org; Mon, 05 Jul 2021 21:48:20 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:55628) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0aC3-0004Js-Ve; Mon, 05 Jul 2021 21:48:11 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1m0aC3-0004uL-Gh; Mon, 05 Jul 2021 21:48:11 -0400 In-Reply-To: <87eece66tc.fsf@web.de> (message from Michael Heerdegen on Sun, 04 Jul 2021 06:28:47 +0200) 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:209497 Archived-At: [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] People are proposing a lot of work on a little wrinkle that isn't worth much effort. There are other changes we could make that would really help users do editing. Here's an easy way to help users avoid such collisions: to say they should include a name in each anonymous lambda that they put on a hook in their init files -- a name based on the user's name. Adding a name to a lambda is easy. Just write the symbol after the argument list (and doc string and interactive spec, if any), like this: (lambda () rms-init-3 (glum-mode 1)) The mame will distinguish it from any otherwise-identical function such as (lambda () j-r-gensym (glum-mode 1)) because they will not be equal. Thus, the only change needed is in documentation. -- Dr Richard Stallman (https://stallman.org) Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org)