help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: How to protect a buffer from being deleted by accident?


From: Tom Capey
Subject: Re: How to protect a buffer from being deleted by accident?
Date: 05 Dec 2002 15:36:19 +0000
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

* Adalbert Perbandt <adalbert.perbandt@infineon.com> writes:

> Hi there,
> At my site we're using clearcase mode (clearcase.el) for a long time
> with very few problems. Some time ago one of our users deleted the
> buffer "*clearcase*" inadvertently.

> Now I'd like to provide a simple mechanism which disallows for
> deletion of this buffer. I think, it would not be too complex to
> implement this but I don't know any simple method to get it
> done. Maybe there is a posibility to mark a specific buffer as
> "undeletable" or so.


(require 'emacs-lock)

`toggle-emacs-lock'

  or within code somewhere

(let ((buffer (get-buffer "*clearcase*")))
  (when buffer
    (set-buffer buffer)
    (setq emacs-lock-from-exiting nil)))

    something along those lines.


/Tom
-- 
"...and so, as the plastic duck of destiny has been sunk by the loofah
of fate, and Old Father Time has gone wrinkly in the bath water of
eternity, it must be time to pick out the short hairs of hope from the
plug hole of infinity."                                       -- Humph


reply via email to

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