summaryrefslogtreecommitdiff
path: root/Auxiliary
diff options
context:
space:
mode:
authorDamien Nguyen <ngn.damien@gmail.com>2023-04-21 14:34:51 +0200
committerDamien Nguyen <ngn.damien@gmail.com>2023-04-21 14:34:51 +0200
commit0722569cf3af3584e16b2e79bf4ca3b7c90251dd (patch)
treec001f2c5ca253bb0b6f509fe571c39ae89b6a0cc /Auxiliary
parent3cf8206412377e954ce8300cae2b76c678e0cb2f (diff)
downloadcmake-0722569cf3af3584e16b2e79bf4ca3b7c90251dd.tar.gz
Properly handle cases where `topic` argument is defaulted
Diffstat (limited to 'Auxiliary')
-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 7590ee3c1b..6bd23bf388 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)
)