Skip to content

Commit a45d265

Browse files
committed
Fix Emacs < 28 compat
1 parent 6a9eca2 commit a45d265

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

diff-hl.el

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,10 @@ It can be a relative expression as well, such as \"HEAD^\" with Git, or
421421
default-directory)))
422422
;; TODO: debounce if a thread is already running.
423423
(let ((buf (current-buffer))
424-
(temp-buffer (generate-new-buffer " *temp*" t)))
424+
(temp-buffer
425+
(if (< emacs-major-version 28)
426+
(generate-new-buffer " *temp*")
427+
(generate-new-buffer " *temp*" t))))
425428
;; Switch buffer temporarily, to "unlock" it for other threads.
426429
(with-current-buffer temp-buffer
427430
(make-thread

0 commit comments

Comments
 (0)