Fix vterm module after upgrade to emacs 28
This commit is contained in:
parent
cdf40a6f9b
commit
742ace250d
@ -37,13 +37,15 @@ Returns the vterm buffer"
|
||||
(unless (fboundp 'module-load)
|
||||
(user-error
|
||||
"Your build of Emacs lacks dynamic modules support and cannot load vterm"))
|
||||
(require 'vterm)
|
||||
(let ((vterm-buffer-name (+vterm--buffer-name)))
|
||||
(if (string= major-mode "vterm-mode")
|
||||
(funcall spawn-fn vterm-buffer-name)
|
||||
(let ((existing-vterm (+vterm--get-existing-buffer)))
|
||||
(if existing-vterm
|
||||
(funcall switch-fn existing-vterm)
|
||||
(funcall spawn-fn vterm-buffer-name))))))
|
||||
(funcall spawn-fn vterm-buffer-name)))))
|
||||
)
|
||||
|
||||
(defun +vterm--spawn-or-switch-with-project (spawn-fn switch-fn)
|
||||
"Open with `spawn-fn' or switch to active vterm with `switch-fn' in a project.
|
||||
|
Loading…
Reference in New Issue
Block a user