emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] emacs-26 ee512e9: Ignore buffers whose name begins wit


From: Stefan Monnier
Subject: Re: [Emacs-diffs] emacs-26 ee512e9: Ignore buffers whose name begins with a space in save-some-buffers
Date: Tue, 19 Sep 2017 08:42:18 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

> This was fallout from 9b980e269, aka bug #28412, where now we prompt for
> buffers that have functions in the `write-contents-functions' hook.

Ah, I see I was looking at the wrong version of the code, sorry.
So the question becomes: why does " *Code-Fontify*" have a non-nil
write-contents-functions?

Looking at ggtags.el, I also wonder why the buffer survives the call to
ggtags-fontify-code.  I would have expected ggtags-fontify-code to look
more like:

(cl-defun ggtags-fontify-code (code &optional (mode major-mode))
  (cl-check-type mode function)
  (cl-typecase code        ;; FIXME: Using `stringp` is more efficient.
    ((not string) code)
    (string
     (with-temp-buffer
       (insert code)
       ;; FIXME: `delay-mode-hooks' needs a comment
       (delay-mode-hooks (funcall mode))
       (font-lock-ensure)
       (buffer-string)))))


-- Stefan




reply via email to

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