[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#34765: 26.1; with-temp-buffer should not run buffer-list-update-hook
From: |
Stefan Monnier |
Subject: |
bug#34765: 26.1; with-temp-buffer should not run buffer-list-update-hook |
Date: |
Thu, 25 Apr 2019 09:01:01 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> - `(let ((,temp-buffer (generate-new-buffer " *temp*")))
> + `(let ((,temp-buffer
> + (let ((inhibit-buffer-list-update-hook t))
> + (generate-new-buffer " *temp*"))))
> ;; FIXME: kill-buffer can change current-buffer in some odd cases.
> (with-current-buffer ,temp-buffer
> (unwind-protect
> (progn ,@body)
> (and (buffer-name ,temp-buffer)
> - (kill-buffer ,temp-buffer)))))))
> + (let ((inhibit-buffer-list-update-hook t))
> + (kill-buffer ,temp-buffer))))))))
Hmm... I was thinking we could expose `inhibit_buffer_hooks` as a Lisp
variable (so we can set it without having to match names, which I find
ugly and brittle), but we'd want to `setq` it rather than let-bind it.
But while it's easy to set it before running kill-buffer, we can't set
it before calling generate-new-buffer :-(
How 'bout adding an optional argument to `generate-new-buffer` to set
`inhibit_buffer_hooks`?
Stefan
- bug#34765: 26.1; with-temp-buffer should not run buffer-list-update-hook, (continued)
- bug#34765: 26.1; with-temp-buffer should not run buffer-list-update-hook, Eli Zaretskii, 2019/04/23
- bug#34765: 26.1; with-temp-buffer should not run buffer-list-update-hook, martin rudalics, 2019/04/24
- bug#34765: 26.1; with-temp-buffer should not run buffer-list-update-hook, Eli Zaretskii, 2019/04/24
- bug#34765: 26.1; with-temp-buffer should not run buffer-list-update-hook, Stefan Monnier, 2019/04/24
- bug#34765: 26.1; with-temp-buffer should not run buffer-list-update-hook, martin rudalics, 2019/04/25
- bug#34765: 26.1; with-temp-buffer should not run buffer-list-update-hook, Eli Zaretskii, 2019/04/25
- bug#34765: 26.1; with-temp-buffer should not run buffer-list-update-hook, martin rudalics, 2019/04/25
- bug#34765: 26.1; with-temp-buffer should not run buffer-list-update-hook, Eli Zaretskii, 2019/04/25
- bug#34765: 26.1; with-temp-buffer should not run buffer-list-update-hook, martin rudalics, 2019/04/26
- bug#34765: 26.1; with-temp-buffer should not run buffer-list-update-hook, Eli Zaretskii, 2019/04/26
bug#34765: 26.1; with-temp-buffer should not run buffer-list-update-hook,
Stefan Monnier <=
bug#34765: 26.1; with-temp-buffer should not run buffer-list-update-hook, martin rudalics, 2019/04/26
bug#34765: 26.1; with-temp-buffer should not run buffer-list-update-hook, Basil L. Contovounesios, 2019/04/26
bug#34765: 26.1; with-temp-buffer should not run buffer-list-update-hook, martin rudalics, 2019/04/27