Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!samsung!rex!ames!sun-barr!newstop!sun!amdahl!JUTS!kpc00 From: kpc00@JUTS.ccc.amdahl.com (Kimball P Collins) Newsgroups: comp.emacs Subject: Re: %% vs. @@ Message-ID: Date: 6 Jul 90 22:23:14 GMT References: <87.P022y01JM01@JUTS.ccc.amdahl.com> <1990Jun27.145013.29422@talos.pm.com> <8fbY022v01fw01@JUTS.ccc.amdahl.com> <793@sono.UUCP> Sender: kpc00@ccc.amdahl.com Organization: my-organization Lines: 18 In-reply-to: holley@sono.UUCP's message of 5 Jul 90 23:09:29 GMT In article <793@sono.UUCP> holley@sono.UUCP (Greg Holley) writes: It seems to me that the best way to implement this would be via write-file-hooks. Simply write a routine that checks a boolean variable to see if the buffer in question is non-writeable, and return t if non-writeable. Then call that routine via write-file-hooks. This is a good idea, since it avoids having to lose or store the associated file name for a buffer. But it would require more hacking to have it work automatically for help buffers, mail buffers (for which I use "++", by the way, since they are writable but have no associated file name to begin with), and the like. The previous solution, which uses the associated file name, works automatically. The hacking required there is some means of storing the file name for when "@@" mode is toggled back off. -- Neither representing any company nor, necessarily, myself.