From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Pieter van Oostrum Newsgroups: gmane.emacs.bugs Subject: bug#38818: Dired: mention deleting buffers, not just windows Date: Sat, 04 Jan 2020 00:51:03 +0100 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> <87sgkw60fi.5.fsf@jidanni.org> <8736cwrub9.5.fsf@jidanni.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="213361"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin) Cc: Michael Heerdegen , 38818@debbugs.gnu.org To: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 04 00:52:15 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 1inWjn-000tMj-7V for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Jan 2020 00:52:15 +0100 Original-Received: from localhost ([::1]:58016 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1inWjm-0004I4-3N for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 Jan 2020 18:52:14 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42658) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1inWjb-0004Hy-42 for bug-gnu-emacs@gnu.org; Fri, 03 Jan 2020 18:52:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1inWjZ-00048C-P8 for bug-gnu-emacs@gnu.org; Fri, 03 Jan 2020 18:52:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36290) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1inWjZ-00047Y-Lf for bug-gnu-emacs@gnu.org; Fri, 03 Jan 2020 18:52:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1inWjZ-0002b4-K9 for bug-gnu-emacs@gnu.org; Fri, 03 Jan 2020 18:52:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Pieter van Oostrum Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Jan 2020 23:52: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.15780954769927 (code B ref 38818); Fri, 03 Jan 2020 23:52:01 +0000 Original-Received: (at 38818) by debbugs.gnu.org; 3 Jan 2020 23:51:16 +0000 Original-Received: from localhost ([127.0.0.1]:42263 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1inWip-0002a3-Mp for submit@debbugs.gnu.org; Fri, 03 Jan 2020 18:51:15 -0500 Original-Received: from [145.132.212.31] (port=52937 helo=cochabamba.vanoostrum.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1inWim-0002Zm-2T for 38818@debbugs.gnu.org; Fri, 03 Jan 2020 18:51:13 -0500 Original-Received: from cochabamba.vanoostrum.org (localhost [IPv6:::1]) by cochabamba.vanoostrum.org (Postfix) with ESMTP id AD675A4D7343; Sat, 4 Jan 2020 00:51:03 +0100 (CET) In-Reply-To: <8736cwrub9.5.fsf@jidanni.org> ("=?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson"'s message of "Sat, 04 Jan 2020 07:31:22 +0800") 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:174139 Archived-At: =E7=A9=8D=E4=B8=B9=E5=B0=BC Dan Jacobson writes: >>>>>> "PvO" =3D=3D Pieter van Oostrum writes: > PvO> Well, this is how I do it. > > PvO> (defun my-dired-load-hook-fun () > PvO> (require 'dired-x) > PvO> (define-key dired-mode-map "q" #'kill-current-buffer)) > > PvO> (add-hook 'dired-load-hook 'my-dired-load-hook-fun) > > OK, but this does not seem environmentally friendly, leaving a function > (that I hereby promise not to use a second time,) lying around. > > Well I guess I could undefun it... But one never can find out how (Bug!: > (info "(eintr) Change a defun") etc. Info pages never say how!) > Plus seems a little bulky to do a defun ... undefun each time in a > .emacs file. Your version does that too, if the defun semantics would be what you expect= ed. It leaves exactly the same function in the name space. If you don't wan= t that then use the lambda form. But you said your version was better. Why = then if you want the function to be anonymous? --=20 Pieter van Oostrum www: http://pieter.vanoostrum.org/ PGP key: [8DAE142BE17999C4]