[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to get around deprecated function
From: |
Rusi |
Subject: |
Re: how to get around deprecated function |
Date: |
Tue, 28 Apr 2015 19:55:54 -0700 (PDT) |
User-agent: |
G2/1.0 |
On Wednesday, April 29, 2015 at 4:29:14 AM UTC+5:30, B. T. Raven wrote:
> This was posted by mistake to the gnus group:
>
> >
> >Hello:
> >
> >I am constantly losing short pieces of text left in *scratch* and I wrote
> >this
> >interactive function:
> >
> >(defun save-scratchtemp ();; M-x scr
> > (interactive)
> > (switch-to-buffer "*scratch*")
> > (mark-whole-buffer)
> > (setq start (point) end (mark))
> > (append-to-file start end "c:/mydocu~1/scratchtemp.txt")
> >)
> >
> >It "works" but according to the docs mark-whole-buffer shouldn't be used this
> >way.Is there an understandable (to me) right way of doing this or doing
> >something else that can be invoked as easily?
> >
> >Thanks,
> >
> >Ed
> >
Not exactly what you do but for the same reason I have:
(add-hook 'lisp-interaction-mode-hook
(function (lambda () (setq buffer-offer-save t))))