From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.bugs Subject: bug#38818: Dired: mention deleting buffers, not just windows Date: Wed, 01 Jan 2020 18:18:44 -0500 Message-ID: References: <87imlxlrrv.5.fsf@jidanni.org> <87mub85ri0.fsf@web.de> <87h81f3our.5.fsf@jidanni.org> <87v9pv28qu.fsf@web.de> <87d0c33mdx.5.fsf@jidanni.org> <87o8vnq1ph.fsf@web.de> <875zhv3jyr.5.fsf@jidanni.org> <87eewjydyg.fsf@web.de> <87v9pv2230.5.fsf@jidanni.org> <87woabd9oc.fsf@web.de> Reply-To: rms@gnu.org Content-Type: text/plain; charset=Utf-8 Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="186424"; mail-complaints-to="usenet@blaine.gmane.org" Cc: michael_heerdegen@web.de, jidanni@jidanni.org, 38818@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jan 02 00:19:10 2020 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 1imnGf-000mLC-Io for geb-bug-gnu-emacs@m.gmane.org; Thu, 02 Jan 2020 00:19:09 +0100 Original-Received: from localhost ([::1]:34366 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1imnGe-0007W6-19 for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Jan 2020 18:19:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54715) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1imnGZ-0007W0-6U for bug-gnu-emacs@gnu.org; Wed, 01 Jan 2020 18:19:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1imnGX-0001D3-VH for bug-gnu-emacs@gnu.org; Wed, 01 Jan 2020 18:19:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59991) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1imnGX-0001Cz-SV for bug-gnu-emacs@gnu.org; Wed, 01 Jan 2020 18:19:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1imnGX-0004AL-NS for bug-gnu-emacs@gnu.org; Wed, 01 Jan 2020 18:19:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Richard Stallman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Jan 2020 23:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38818 X-GNU-PR-Package: emacs Original-Received: via spool by 38818-submit@debbugs.gnu.org id=B38818.157792073215992 (code B ref 38818); Wed, 01 Jan 2020 23:19:01 +0000 Original-Received: (at 38818) by debbugs.gnu.org; 1 Jan 2020 23:18:52 +0000 Original-Received: from localhost ([127.0.0.1]:37731 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1imnGO-00049r-0O for submit@debbugs.gnu.org; Wed, 01 Jan 2020 18:18:52 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:45604) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1imnGN-00049b-1e for 38818@debbugs.gnu.org; Wed, 01 Jan 2020 18:18:51 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:43428) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1imnGH-0000wy-2x; Wed, 01 Jan 2020 18:18:45 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1imnGG-0006KT-8K; Wed, 01 Jan 2020 18:18:44 -0500 In-Reply-To: (message from Drew Adams on Tue, 31 Dec 2019 22:53:22 -0800 (PST)) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:174053 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. ]]] How about this addition? diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index 7354eb1..b52871e 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -135,13 +135,26 @@ non-@code{nil} value, it returns that value; otherwise it returns @node Setting Hooks @subsection Setting Hooks - Here's an example that uses a mode hook to turn on Auto Fill mode when -in Lisp Interaction mode: + Here's an example that adds a funtion to a mode hook to turn +on Auto Fill mode when in Lisp Interaction mode: @example (add-hook 'lisp-interaction-mode-hook 'auto-fill-mode) @end example + The value of a hook variable should be a list of functions. You can +manipulate that list using the normal Lisp facilities, but the modular +way is to use the functions @code{add-hook} and @code{remove-hook}, +defined below. They take care to handle some unusual situations and +avoid problems. + + It works to put a @code{lambda}-expression function on a hook, but +we recommend avoiding this because it can lead to confusion. If you +add the same @code{lambda}-expression a second time but write it +slightly differently, you will get two equivalent but distinct +functions on the hook. If you then remove one of them, the other will +still be on it. + @defun add-hook hook function &optional depth local This function is the handy way to add function @var{function} to hook variable @var{hook}. You can use it for abnormal hooks as well as for -- Dr Richard Stallman Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org)