[Top][All Lists]

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

Re: No query on C-c C-k (message-kill-buffe)

From: Joe Casadonte
Subject: Re: No query on C-c C-k (message-kill-buffe)
Date: 14 Sep 2002 10:19:56 -0400
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.1

On Fri, 13 Sep 2002, Harry Putnam wrote:

> How can I arrange things so that if I hit C-c C-k to kill a mesage
> buffer, it is just done with no double query?

(defun my-message-kill-buffer ()
  "Kill the current buffer."
    (let ((actions message-kill-actions))
      (setq buffer-file-name nil)
      (kill-buffer (current-buffer))
      (message-do-actions actions)))

Then bind it to C-c C-k.

Alternately, point yes-or-no-p to something that no-ops, maybe as
around advice (so you can set it back afterwords).

(defadvice message-kill-buffer (around my-message-kill-buffer act)
  "Disable annoying confirmation message."
  (let (current)
        (fset 'current (symbol-function 'yes-or-no-p))
        (fset 'yes-or-no-p 'ignore)


        (fset 'yes-or-no-p (symbol-function 'current))))

The former solution is simpler, but should be revisited every time
'message' is updated; the latter will grow/change with 'message', but
you may be masking something other than just the question to kill the
current message buffer.


Joe Casadonte

         Llama Fresh Farms =>
   Gay Media Resource List =>
            Perl for Win32 =>
               Emacs Stuff =>
          Music CD Trading =>
                       Live Free, that's the message!

reply via email to

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