emacs-devel
[Top][All Lists]
Advanced

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

Re: Proposal: move write-contents-functions higher up in basic-save-buff


From: Stefan Monnier
Subject: Re: Proposal: move write-contents-functions higher up in basic-save-buffer
Date: Wed, 24 May 2017 08:29:31 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

> I probably just did a poor job writing the initial message. That's what
> I was proposing to begin with: to jiggle `basic-save-buffer' (and I
> think also `save-some-buffers') so that the running of
> `write-contents-functions' comes earlier in the function, or is
> otherwise in its own branch that doesn't require a `buffer-file-name'. I
> think it would be a fairly unintrusive change, it would just require a
> bit of thought. I can try to produce a patch, if this is acceptable in
> principle.

I haven't looked at basic-save-buffer recently, but in the worst case we
could keep the current code and add a

    (if (null buffer-file-name)
        (run-hook-... 'write-contents-functions)
      ...)

but admittedly, it's better if we can move the single call to
write-contents-functions so it's shared by the file and the
non-file cases.


        Stefan




reply via email to

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