Use make-indirect-buffer to inhibit buffer hooks

This commit is contained in:
TEC 2022-10-18 19:33:57 +08:00
parent 965375426e
commit 177dbd3996
Signed by: tec
SSH Key Fingerprint: SHA256:eobz41Mnm0/iYWBvWThftS0ElEs1ftBr6jamutnXc/A
1 changed files with 1 additions and 1 deletions

View File

@ -291,7 +291,7 @@ This buffer then then set up to be used for a screenshot."
(let ((hl (bound-and-true-p hl-line-mode)))
(when hl (hl-line-mode -1))
(prog1
(with-current-buffer (clone-indirect-buffer " *screenshot-clone" nil t)
(with-current-buffer (make-indirect-buffer (current-buffer) " *screenshot-clone" t t)
(narrow-to-region beg end)
(screenshot--setup-buffer)
(buffer-face-set :family screenshot-font-family