aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorThien-Thi Nguyen2007-03-23 14:12:02 +0000
committerThien-Thi Nguyen2007-03-23 14:12:02 +0000
commit39db15c9989e0a2d2888f9d2003404f36a881e63 (patch)
treead7d1da9e9b379033e725d9362871f1707749532 /lisp/progmodes
parent7a147065e48f0cd1b29e7d1fe7e6f0bb8944eea0 (diff)
downloademacs-39db15c9989e0a2d2888f9d2003404f36a881e63.tar.gz
emacs-39db15c9989e0a2d2888f9d2003404f36a881e63.zip
(m4-m4-buffer, m4-m4-region): Fix omission bug:
Use m4-program-options to construct shell command.
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/m4-mode.el11
1 files changed, 8 insertions, 3 deletions
diff --git a/lisp/progmodes/m4-mode.el b/lisp/progmodes/m4-mode.el
index 734a86b0b99..bd31f731693 100644
--- a/lisp/progmodes/m4-mode.el
+++ b/lisp/progmodes/m4-mode.el
@@ -118,14 +118,19 @@
118(defun m4-m4-buffer () 118(defun m4-m4-buffer ()
119 "Send contents of the current buffer to m4." 119 "Send contents of the current buffer to m4."
120 (interactive) 120 (interactive)
121 (shell-command-on-region (point-min) (point-max) m4-program "*m4-output*" 121 (shell-command-on-region
122 nil) 122 (point-min) (point-max)
123 (mapconcat 'identity (cons m4-program m4-program-options) "\s")
124 "*m4-output*" nil)
123 (switch-to-buffer-other-window "*m4-output*")) 125 (switch-to-buffer-other-window "*m4-output*"))
124 126
125(defun m4-m4-region () 127(defun m4-m4-region ()
126 "Send contents of the current region to m4." 128 "Send contents of the current region to m4."
127 (interactive) 129 (interactive)
128 (shell-command-on-region (point) (mark) m4-program "*m4-output*" nil) 130 (shell-command-on-region
131 (point) (mark)
132 (mapconcat 'identity (cons m4-program m4-program-options) "\s")
133 "*m4-output*" nil)
129 (switch-to-buffer-other-window "*m4-output*")) 134 (switch-to-buffer-other-window "*m4-output*"))
130 135
131;;;###autoload 136;;;###autoload