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
Message #77 received at 38818 <at> debbugs.gnu.org (full text, mbox):
積丹尼 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.
>
> 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 expected. It leaves exactly the same function in the name space. If you don't want that then use the lambda form. But you said your version was better. Why then if you want the function to be anonymous?
--
Pieter van Oostrum
www: http://pieter.vanoostrum.org/
PGP key: [8DAE142BE17999C4]
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.