From 0722569cf3af3584e16b2e79bf4ca3b7c90251dd Mon Sep 17 00:00:00 2001 From: Damien Nguyen Date: Fri, 21 Apr 2023 14:34:51 +0200 Subject: Properly handle cases where `topic` argument is defaulted --- Auxiliary/cmake-mode.el | 4 ++-- 1 file 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) ) -- cgit v0.12