Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
5119b7a7
Commit
5119b7a7
authored
Dec 30, 1998
by
Richard M. Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(m4-m4-region, m4-m4-buffer): Use shell-command-on-region.
(m4-start-m4, m4-end-m4): Functions deleted.
parent
bd3ac67e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
20 deletions
+5
-20
lisp/progmodes/m4-mode.el
lisp/progmodes/m4-mode.el
+5
-20
No files found.
lisp/progmodes/m4-mode.el
View file @
5119b7a7
...
...
@@ -108,33 +108,18 @@
(
define-key
map
"\C-c\C-c"
'comment-region
)
map
))
(
defun
m4-end-m4
(
process
event
)
(
cond
((
equal
event
"kill\n"
)
(
princ
"m4 process done"
))
(
t
(
princ
(
format
"Process: %s had the event `%s'"
process
event
)))))
(
defun
m4-start-m4
()
(
eval
(
append
(
append
'
(
start-process
"m4process"
"*m4 output*"
m4-program
)
m4-program-options
)
'
(
"-e"
)))
(
set-process-sentinel
(
get-process
"m4process"
)
'm4-end-m4
))
(
defun
m4-m4-buffer
()
"send contents of the current buffer to m4"
(
interactive
)
(
m4-start-m4
)
(
process-send-region
"m4process"
(
point-min
)
(
point-max
))
(
process-send-eof
"m4process"
)
(
switch-to-buffer-other-window
"*m4 output*"
)
(
delete-process
"m4process"
))
(
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
)
(
m4-start-m4
)
(
process-send-region
"m4process"
(
point
)
(
mark
))
(
process-send-eof
"m4process"
)
(
switch-to-buffer-other-window
"*m4 output*"
))
(
shell-command-on-region
(
point
)
(
mark
)
m4-program
"*m4-output*"
nil
)
(
switch-to-buffer-other-window
"*m4-output*"
))
;;;###autoload
(
defun
m4-mode
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment