emacs-devel
[Top][All Lists]
Advanced

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

Re: Advising quit-window


From: Christoph Scholtes
Subject: Re: Advising quit-window
Date: Thu, 27 Oct 2011 06:06:36 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (windows-nt)

Juri Linkov <address@hidden> writes:

>> Thanks. I didn't know that you could remap command like that. However,
>> this fixes quit-window to always kill. I like to be able to bury it with
>> `C-u q'.
>
> Yes, `C-u q' is an important requirement.  And no advice, no remapping, no 
> hook
> can do that.  So we need a new customizable variable 
> `quit-window-kill-buffer'.

Doesn't Juanma's solution achieve this?

(defadvice quit-window (before advise-quit-window activate)
  (when (called-interactively-p 'any)
    (ad-set-arg 0 (not (ad-get-arg 0)))))

> Then users could either customize it globally to t, or bind it buffer-locally
> in mode hooks.  And `C-u q' will inverse its current behavior.

+1



reply via email to

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