GNU bug report logs -
#38818
Dired: mention deleting buffers, not just windows
Previous Next
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
>> (add-hook
>> 'dired-load-hook
>> (function
>> (lambda ()
>> (load "dired-x")
>> (define-key dired-mode-map "q" 'kill-current-buffer)
>> )))
>>>>> "MH" == Michael Heerdegen <michael_heerdegen <at> web.de> writes:
MH> Slightly better version:
MH> (add-hook
MH> 'dired-load-hook
MH> (defun my-dired-load-hook-fun ()
MH> (require 'dired-x)
MH> (define-key dired-mode-map "q" #'kill-current-buffer)))
MH> -- a named function can't accidentally be added multiple times to a
MH> hook, lambda already self-quotes, and `require' doesn't unnecessarily
MH> reload a file.
OK!
(info "(emacs) Hooks") just mentions the old fashioned way.
Maybe someone should update it.
OK maybe it is intentionally still full of those lambdas, for small jobs.
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.