Question "kill-buffer"

A.J. Rossini rossini at blindglobe.net
Thu Feb 15 15:42:46 CET 2001


>>>>> "RED" == R E Darnell <r.e.darnell at ncl.ac.uk> writes:

    RED> Would introducing a "Are you sure?" question after kill the
    RED> *R* ( or whatever) buffer with a hasty C-x k be a popular
    RED> default "feature". How can I include this for my own use?

Can I suggest that you generally DON'T kill the buffer?  (I'm not sure
what the rationale for killing it is?)

(if we can't work around a usage issue, I'll look at how you might
change it -- probably re-defining a system function to query, or maybe
even something like:

(defun ajr:kill-buffer ()
  "AJR: Prevent self-stupidity."
  (interactive)
  (if (yes-or-no-p "Do you really but really want to kill a buffer ")
      (kill-buffer)))
(global-set-key "\C-x k" 'ajr:kill-buffer)

This doesn't do the right thing, but it's close.  Probably, you want a
(second? only?) question asking which buffer to kill, and pass that to
kill-buffer. 

At least with XEmacs, 'kill-buffer' is a primitive (C implemented)
function, and not readily available.

best,
-tony

-- 
A.J. Rossini				Rsrch. Asst. Prof. of Biostatistics
UW Biostat/Center for AIDS Research	rossini at u.washington.edu	
FHCRC/SCHARP/HIV Vaccine Trials Net	rossini at scharp.org
-------- (friday is unknown) --------
FHCRC: M--W : 206-667-7025 (fax=4812)|Voicemail is pretty sketchy
CFAR:  ??   : 206-731-3647 (fax=3694)|Email is far better than phone
UW:    Th   : 206-543-1044 (fax=3286)|Change last 4 digits of phone to FAX
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
ess-help mailing list -- To (un)subscribe, send
subscribe	or	unsubscribe
(in the "body", not the subject !)  To: ess-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the ESS-help mailing list