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

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

Re: why read only buffer?


From: Barry Margolin
Subject: Re: why read only buffer?
Date: Fri, 06 Jul 2012 18:40:31 -0400
User-agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X)

In article <slrnjvenia.3be.notbob@nbleet.hcc.net>,
 notbob <notbob@nothome.com> wrote:

> On 2012-07-06, PJ Weisberg <pj@irregularexpressions.net> wrote:
> 
> > That's deliberately there to stop you from accidentally modifying a
> > backup file when you meant to be working with the regular file.  If
> > you searched through the source you'd find this in files.el:
> 
> Yeah, that's not gonna happen.  ;)
> 
> What I seem to recall is, backup files were progressively renamed for
> more than on "back-up", as in foo~1, foo~2, or something similar.
> Perhaps I'm thinking of jed.  I'm old.  I ferget.  ;)

foo.~1~, foo.~2~, etc.

> 
> >
> > -----
> >   ;; Make people do a little extra work (C-x C-q)
> >   ;; before altering a backup file.
> >   (when (backup-file-name-p buffer-file-name)
> >     (setq buffer-read-only t))
> > -----
> 
> So, how does none set it to make it overwriteable, by default.  Jes
> delete the above code?

A better way would be to add your own code to undo it to find-file-hook.  
The hooks are run at the end of this function.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


reply via email to

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