bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#38818: Dired: mention deleting buffers, not just windows


From: Noam Postavsky
Subject: bug#38818: Dired: mention deleting buffers, not just windows
Date: Sat, 04 Jan 2020 08:26:10 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

積丹尼 Dan Jacobson <jidanni@jidanni.org> writes:

> OK, I'll use
> (add-hook
>  'dired-load-hook
>  (function
>   (lambda ()
>     (load "dired-x")
>     (define-key dired-mode-map "q" 'kill-current-buffer)
>     )))
> until something more fancy is invented.

With regards to all the subsequent lambda vs defun stuff, you could also
use with-eval-after-load instead of dired-load-hook:

(with-eval-after-load 'dired
  (require 'dired-x)
  (define-key dired-mode-map "q" 'kill-current-buffer))

Actually, this does also use a lambda behind the scenes and has similar
drawbacks, but for some reason it doesn't seem to bother people as much.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]