[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#38818: Dired: mention deleting buffers, not just windows
From: |
Michael Heerdegen |
Subject: |
bug#38818: Dired: mention deleting buffers, not just windows |
Date: |
Sat, 04 Jan 2020 07:16:53 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
積丹尼 Dan Jacobson <jidanni@jidanni.org> writes:
> >>>>> "PvO" == Pieter van Oostrum <pieter-l@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.
- bug#38818: jidanni's mail headers not perfect?!, (continued)
- bug#38818: Dired: mention deleting buffers, not just windows, Richard Stallman, 2020/01/05
- bug#38818: Dired: mention deleting buffers, not just windows, 積丹尼 Dan Jacobson, 2020/01/05
- bug#38818: Dired: mention deleting buffers, not just windows, Eli Zaretskii, 2020/01/05
- bug#38818: Dired: mention deleting buffers, not just windows, Richard Stallman, 2020/01/06
- bug#38818: Dired: mention deleting buffers, not just windows, Lars Ingebrigtsen, 2020/01/22
- bug#38818: Dired: mention deleting buffers, not just windows, 積丹尼 Dan Jacobson, 2020/01/22
- bug#38818: Dired: mention deleting buffers, not just windows, Lars Ingebrigtsen, 2020/01/22
- bug#38818: Dired: mention deleting buffers, not just windows,
Michael Heerdegen <=
- bug#38818: Dired: mention deleting buffers, not just windows, Pieter van Oostrum, 2020/01/04
- bug#38818: Dired: mention deleting buffers, not just windows, 積丹尼 Dan Jacobson, 2020/01/05
bug#38818: Dired: mention deleting buffers, not just windows, Noam Postavsky, 2020/01/04
bug#38818: Dired: mention deleting buffers, not just windows, Lars Ingebrigtsen, 2020/01/22