tools/vterm: minor refactor
Don't end warnings in punctuation, and throw error if modules support is missing.
This commit is contained in:
parent
bd6233518b
commit
fa98551d19
3 changed files with 8 additions and 4 deletions
|
@ -5,6 +5,8 @@
|
||||||
"Open a terminal buffer in the current window. If ARG (universal argument) is
|
"Open a terminal buffer in the current window. If ARG (universal argument) is
|
||||||
non-nil, cd into the current project's root."
|
non-nil, cd into the current project's root."
|
||||||
(interactive "P")
|
(interactive "P")
|
||||||
|
(unless (fboundp 'module-load)
|
||||||
|
(user-error "Your build of Emacs lacks dynamic modules support and cannot load vterm"))
|
||||||
(let ((default-directory
|
(let ((default-directory
|
||||||
(if arg
|
(if arg
|
||||||
(or (doom-project-root) default-directory)
|
(or (doom-project-root) default-directory)
|
||||||
|
@ -16,6 +18,8 @@ non-nil, cd into the current project's root."
|
||||||
"Open a terminal popup window. If ARG (universal argument) is
|
"Open a terminal popup window. If ARG (universal argument) is
|
||||||
non-nil, cd into the current project's root."
|
non-nil, cd into the current project's root."
|
||||||
(interactive "P")
|
(interactive "P")
|
||||||
|
(unless (fboundp 'module-load)
|
||||||
|
(user-error "Your build of Emacs lacks dynamic modules support and cannot load vterm"))
|
||||||
(let ((default-directory
|
(let ((default-directory
|
||||||
(if arg
|
(if arg
|
||||||
(or (doom-project-root) default-directory)
|
(or (doom-project-root) default-directory)
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
(def-package! vterm
|
(def-package! vterm
|
||||||
:when (fboundp 'module-load)
|
:when (fboundp 'module-load)
|
||||||
:defer t
|
:defer t
|
||||||
:init (setq vterm-install t)
|
:preface (setq vterm-install t)
|
||||||
:config
|
:config
|
||||||
(set-env! "SHELL")
|
(set-env! "SHELL")
|
||||||
(set-popup-rule! "^vterm" :size 0.25 :vslot -4 :select t :quit nil :ttl 0)
|
(set-popup-rule! "^vterm" :size 0.25 :vslot -4 :select t :quit nil :ttl 0)
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
;;; tools/vterm/doctor.el -*- lexical-binding: t; -*-
|
;;; tools/vterm/doctor.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
(unless (executable-find "vterm-ctrl")
|
(unless (executable-find "vterm-ctrl")
|
||||||
(warn! "Couldn't find libvterm. Vterm module won't compile."))
|
(warn! "Couldn't find libvterm. Vterm module won't compile"))
|
||||||
|
|
||||||
(unless (executable-find "make")
|
(unless (executable-find "make")
|
||||||
(warn! "Couldn't find make command. Vterm module won't compile."))
|
(warn! "Couldn't find make command. Vterm module won't compile"))
|
||||||
|
|
||||||
(unless (executable-find "cmake")
|
(unless (executable-find "cmake")
|
||||||
(warn! "Couldn't find cmake command. Vterm module won't compile"))
|
(warn! "Couldn't find cmake command. Vterm module won't compile"))
|
||||||
|
|
||||||
(unless (fboundp 'module-load)
|
(unless (fboundp 'module-load)
|
||||||
(warn! "Your emacs don't have MODULES support. Vterm module won't work."))
|
(warn! "Your emacs doesn't have MODULES support. Vterm module won't work"))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue