changeset 76685:fe088e460c01

(m4-m4-buffer, m4-m4-region): Fix omission bug: Use m4-program-options to construct shell command.
author Thien-Thi Nguyen <ttn@gnuvola.org>
date Fri, 23 Mar 2007 14:11:38 +0000
parents 20327b8e8725
children 614f883d78b7
files lisp/progmodes/m4-mode.el
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/m4-mode.el	Fri Mar 23 09:52:42 2007 +0000
+++ b/lisp/progmodes/m4-mode.el	Fri Mar 23 14:11:38 2007 +0000
@@ -118,14 +118,19 @@
 (defun m4-m4-buffer ()
   "Send contents of the current buffer to m4."
   (interactive)
-  (shell-command-on-region (point-min) (point-max) m4-program "*m4-output*"
-			   nil)
+  (shell-command-on-region
+   (point-min) (point-max)
+   (mapconcat 'identity (cons m4-program m4-program-options) "\s")
+   "*m4-output*" nil)
   (switch-to-buffer-other-window "*m4-output*"))
 
 (defun m4-m4-region ()
   "Send contents of the current region to m4."
   (interactive)
-  (shell-command-on-region (point) (mark) m4-program "*m4-output*" nil)
+  (shell-command-on-region
+   (point) (mark)
+   (mapconcat 'identity (cons m4-program m4-program-options) "\s")
+   "*m4-output*" nil)
   (switch-to-buffer-other-window "*m4-output*"))
 
 ;;;###autoload