emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Patch: `m4-mode' does not use m4-program-option variable


From: David Vazquez
Subject: Patch: `m4-mode' does not use m4-program-option variable
Date: Thu, 22 Mar 2007 01:00:52 +0100

This variable is defined at beginning, but this is not used.
It seems that the developer forgot it. ^^


(defcustom m4-program-options nil
  "Options to pass to `m4-program'."
  :type '(repeat string)
  :group 'm4)
...

(shell-command-on-region (point-min) (point-max) m4-program "*m4-output*" nil)


I put here a patch.


Index: lisp/progmodes/m4-mode.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/progmodes/m4-mode.el,v
retrieving revision 1.18
diff -c -p -r1.18 m4-mode.el
*** lisp/progmodes/m4-mode.el   21 Jan 2007 03:20:44 -0000      1.18
--- lisp/progmodes/m4-mode.el   21 Mar 2007 23:19:58 -0000
***************
*** 115,131 ****
  (unless m4-mode-abbrev-table
    (define-abbrev-table 'm4-mode-abbrev-table ()))
  
  (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)
    (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)
    (switch-to-buffer-other-window "*m4-output*"))
  
  ;;;###autoload
--- 115,145 ----
  (unless m4-mode-abbrev-table
    (define-abbrev-table 'm4-mode-abbrev-table ()))
  
+ 
  (defun m4-m4-buffer ()
    "Send contents of the current buffer to m4."
    (interactive)
! 
!   (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)
!    (mapconcat 'identity (cons m4-program m4-program-options) "\s")
!    "*m4-output*"
!    nil)
! 
    (switch-to-buffer-other-window "*m4-output*"))
  
  ;;;###autoload




reply via email to

[Prev in Thread] Current Thread [Next in Thread]