summaryrefslogtreecommitdiffstats
path: root/Auxiliary/cmake-mode.el
diff options
context:
space:
mode:
authorDamien Nguyen <ngn.damien@gmail.com>2023-04-21 12:34:51 (GMT)
committerDamien Nguyen <ngn.damien@gmail.com>2023-04-21 12:34:51 (GMT)
commit0722569cf3af3584e16b2e79bf4ca3b7c90251dd (patch)
treec001f2c5ca253bb0b6f509fe571c39ae89b6a0cc /Auxiliary/cmake-mode.el
parent3cf8206412377e954ce8300cae2b76c678e0cb2f (diff)
downloadCMake-0722569cf3af3584e16b2e79bf4ca3b7c90251dd.zip
CMake-0722569cf3af3584e16b2e79bf4ca3b7c90251dd.tar.gz
CMake-0722569cf3af3584e16b2e79bf4ca3b7c90251dd.tar.bz2
Properly handle cases where `topic` argument is defaulted
Diffstat (limited to 'Auxiliary/cmake-mode.el')
-rw-r--r--Auxiliary/cmake-mode.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/Auxiliary/cmake-mode.el b/Auxiliary/cmake-mode.el
index 7590ee3..6bd23bf 100644
--- a/Auxiliary/cmake-mode.el
+++ b/Auxiliary/cmake-mode.el
@@ -372,7 +372,7 @@ optional argument topic will be appended to the argument list."
(interactive "s")
(let* ((bufname (if buffer buffer (concat "*CMake" type (if topic "-") topic "*")))
(buffer (if (get-buffer bufname) (get-buffer bufname) (generate-new-buffer bufname)))
- (command (concat cmake-mode-cmake-executable " " type " " (shell-quote-argument topic)))
+ (command (concat cmake-mode-cmake-executable " " type " " (if topic (shell-quote-argument topic) topic)))
;; Turn of resizing of mini-windows for shell-command.
(resize-mini-windows nil)
)
@@ -391,7 +391,7 @@ optional argument topic will be appended to the argument list."
(interactive "s")
(let* ((bufname (if buffer buffer (concat "*CMake" type (if topic "-") topic "*")))
(buffer (if (get-buffer bufname) (get-buffer bufname) (generate-new-buffer bufname)))
- (command (concat cmake-mode-cmake-executable " " type " " (shell-quote-argument topic)))
+ (command (concat cmake-mode-cmake-executable " " type " " (if topic (shell-quote-argument topic) topic)))
;; Turn of resizing of mini-windows for shell-command.
(resize-mini-windows nil)
)