emacs-devel
[Top][All Lists]
Advanced

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

Re: [RFC] Added an option to store content of the *scratch* buffer in a


From: Glenn Morris
Subject: Re: [RFC] Added an option to store content of the *scratch* buffer in a file.
Date: Fri, 07 Jun 2013 14:06:14 -0400
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

Michal Nazarewicz wrote:

> +** `initial-scratch-message' can now be 'file which makes content of
> +the *scratch* buffer to be kept in a file.  This makes it possible to
> +keep notes which will persist even when Emacs restarts in that buffer.

Seems like a bad UI to (ab)use initial-scratch-message for this.
Also, it's not really a scratch buffer if it gets saved, is it?
Maybe extending `initial-buffer-choice' would be better?

> +(defun scratch--custom-set (symbol value)
> +  (set-default symbol value)
> +  ;; This function is called by defcustom so
> +  ;; set-scratch-buffer-variables may be unbound yet.
> +  (when (fboundp 'set-scratch-buffer-variables)
> +    (set-scratch-buffer-variables)))

Probably you don't need that dance if you use:

:set 'scratch--custom-set
:initialize: 'custom-initialize-default



reply via email to

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