GNU bug report logs - #38818
Dired: mention deleting buffers, not just windows

Previous Next

Package: emacs;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Mon, 30 Dec 2019 16:45:02 UTC

Severity: wishlist

Tags: notabug

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: Pieter van Oostrum <pieter-l <at> vanoostrum.org>, 38818 <at> debbugs.gnu.org
Subject: bug#38818: Dired: mention deleting buffers, not just windows
Date: Sat, 04 Jan 2020 07:16:53 +0100
積丹尼 Dan Jacobson <jidanni <at> jidanni.org> writes:

> >>>>> "PvO" == Pieter van Oostrum <pieter-l <at> vanoostrum.org> 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.

Your lambda will also keep lying around.  The name "dired-load-hook"
will keep lying around.

And: for most of the hooks you want to add stuff to you probably can't
be sure that it won't be run more than once.  Undefining cries for
errors.  It's also not necessary, those few additional names hardly make
a difference.


Michael.




This bug report was last modified 5 years and 122 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.