Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
195ce311
Commit
195ce311
authored
Feb 01, 2002
by
Richard M. Stallman
Browse files
(shell-command-on-region): Err if no mark before reading the command string.
parent
57e46f94
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
lisp/simple.el
lisp/simple.el
+9
-7
No files found.
lisp/simple.el
View file @
195ce311
...
...
@@ -1421,13 +1421,15 @@ or buffer name to which to direct the command's standard error output.
If
it
is
nil
,
error
output
is
mingled
with
regular
output.
In
an
interactive
call,
the
variable
`
shell-command-default-error-buffer
'
specifies
the
value
of
ERROR-BUFFER.
"
(interactive (let ((string
;; Do this before calling region-beginning
;; and region-end, in case subprocess output
;; relocates them while we are in the minibuffer.
(read-from-minibuffer "
Shell
command
on
region:
"
nil nil nil
'shell-command-history)))
(interactive (let (string)
(unless (mark)
(error "
The
mark
is
not
set
now,
so
there
is
no
region
"))
;; Do this before calling region-beginning
;; and region-end, in case subprocess output
;; relocates them while we are in the minibuffer.
(setq string (read-from-minibuffer "
Shell
command
on
region:
"
nil nil nil
'shell-command-history))
;; call-interactively recognizes region-beginning and
;; region-end specially, leaving them in the history.
(list (region-beginning) (region-end)
...
...
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