From 55e47f950d4fcc5fd0b02a02aa8c7d622ffaa0d4 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 13 Aug 2013 00:56:43 -0700 Subject: [PATCH] Tweak some settings of compile-command * progmodes/compile.el (compile-command): Tweak example in doc. * obsolete/scribe.el (scribe-mode): * progmodes/mixal-mode.el (mixal-mode): Quote buffer name. Fixes: debbugs:15053 --- lisp/ChangeLog | 4 ++++ lisp/obsolete/scribe.el | 4 +++- lisp/progmodes/compile.el | 4 +++- lisp/progmodes/mixal-mode.el | 6 ++++-- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a3b657b23ca..274ca3a3730 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2013-08-13 Glenn Morris + * progmodes/compile.el (compile-command): Tweak example in doc. + * obsolete/scribe.el (scribe-mode): + * progmodes/mixal-mode.el (mixal-mode): Quote buffer name. (Bug#15053) + * mail/feedmail.el (feedmail-confirm-outgoing) (feedmail-display-full-frame, feedmail-deduce-bcc-where): Fix types. diff --git a/lisp/obsolete/scribe.el b/lisp/obsolete/scribe.el index 8396cce3e27..2ba1bb4aa76 100644 --- a/lisp/obsolete/scribe.el +++ b/lisp/obsolete/scribe.el @@ -144,7 +144,9 @@ Interesting variables: (set (make-local-variable 'sentence-end) "\\([.?!]\\|@:\\)[]\"')}]*\\($\\| $\\|\t\\| \\)[ \t\n]*") (set (make-local-variable 'compile-command) - (concat "scribe " (buffer-file-name)))) + (concat "scribe " + (if buffer-file-name + (shell-quote-argument (buffer-file-name)))))) (defun scribe-tab () (interactive) diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index e909f1a5e5b..8c981b36e56 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -624,7 +624,9 @@ You might also use mode hooks to specify it in certain modes, like this: (file-exists-p \"Makefile\")) (set (make-local-variable 'compile-command) (concat \"make -k \" - (file-name-sans-extension buffer-file-name))))))" + (if buffer-file-name + (shell-quote-argument + (file-name-sans-extension buffer-file-name))))))))" :type 'string :group 'compilation) ;;;###autoload(put 'compile-command 'safe-local-variable (lambda (a) (and (stringp a) (or (not (boundp 'compilation-read-command)) compilation-read-command)))) diff --git a/lisp/progmodes/mixal-mode.el b/lisp/progmodes/mixal-mode.el index 8814cdbba35..a14654cdd7c 100644 --- a/lisp/progmodes/mixal-mode.el +++ b/lisp/progmodes/mixal-mode.el @@ -1113,8 +1113,10 @@ Assumes that file has been compiled with debugging support." mixal-syntax-propertize-function) ;; might add an indent function in the future ;; (set (make-local-variable 'indent-line-function) 'mixal-indent-line) - (set (make-local-variable 'compile-command) (concat "mixasm " - buffer-file-name))) + (set (make-local-variable 'compile-command) + (concat "mixasm " + (if buffer-file-name + (shell-quote-argument buffer-file-name))))) (provide 'mixal-mode) -- 2.39.2