Browse Source

Merge topic 'pr/fix-cmake-mode-el'

915ef090c9 cmake-mode.el: escape shell arguments

Acked-by: Kitware Robot <[email protected]>
Merge-request: !8386
Brad King 2 years ago
parent
commit
9831bb160a
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Auxiliary/cmake-mode.el

+ 2 - 2
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 " " topic))
+         (command (concat cmake-mode-cmake-executable " " type " " (shell-quote-argument 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 " " topic))
+         (command (concat cmake-mode-cmake-executable " " type " " (shell-quote-argument topic)))
          ;; Turn of resizing of mini-windows for shell-command.
          (resize-mini-windows nil)
          )