[R] Re: Question "kill-buffer"

rijn@swi.psy.uva.nl rijn at swi.psy.uva.nl
Tue Feb 20 17:01:35 CET 2001


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

Include the following code in your ~/.emacs:

-o-o-o-o-o-

(defun kill-buffer-ask-process (buffer)
  "A modified kill buffer, requires confirmation before killing a process buffer

See \\[kill-buffer]."
  (interactive "bKill buffer ")
  (if (or (not (get-buffer-process (buffer-name)))
	  (yes-or-no-p (format "Kill process associated with %s? " (buffer-name))))
      (kill-buffer buffer)))

(global-set-key [(control x)(k)] 'kill-buffer-ask-process)

-o-o-o-o-o-

Groet,
  Hedderik.

-- 
http://swipc30.swi.psy.uva.nl/~rijn

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list