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
emacs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
4
Issues
4
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
emacs
emacs
Commits
a9594ce3
Commit
a9594ce3
authored
Sep 24, 1994
by
Richard M. Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(shell-command, shell-command-on-region):
Make "*Shell Command Output*" non-read-only.
parent
11bcd7d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
lisp/simple.el
lisp/simple.el
+4
-1
No files found.
lisp/simple.el
View file @
a9594ce3
...
@@ -701,6 +701,7 @@ This cannot be done asynchronously."
...
@@ -701,6 +701,7 @@ This cannot be done asynchronously."
(error "
Shell
command
in
progress
")))
(error "
Shell
command
in
progress
")))
(save-excursion
(save-excursion
(set-buffer buffer)
(set-buffer buffer)
(setq buffer-read-only nil)
(erase-buffer)
(erase-buffer)
(display-buffer buffer)
(display-buffer buffer)
(setq default-directory directory)
(setq default-directory directory)
...
@@ -788,7 +789,8 @@ deleted."
...
@@ -788,7 +789,8 @@ deleted."
;; If the input is the same buffer as the output,
;; If the input is the same buffer as the output,
;; delete everything but the specified region,
;; delete everything but the specified region,
;; then replace that region with the output.
;; then replace that region with the output.
(progn (delete-region end (point-max))
(progn (setq buffer-read-only nil)
(delete-region end (point-max))
(delete-region (point-min) start)
(delete-region (point-min) start)
(call-process-region (point-min) (point-max)
(call-process-region (point-min) (point-max)
shell-file-name t t nil
shell-file-name t t nil
...
@@ -797,6 +799,7 @@ deleted."
...
@@ -797,6 +799,7 @@ deleted."
;; Clear the output buffer, then run the command with output there.
;; Clear the output buffer, then run the command with output there.
(save-excursion
(save-excursion
(set-buffer buffer)
(set-buffer buffer)
(setq buffer-read-only nil)
(erase-buffer))
(erase-buffer))
(call-process-region start end shell-file-name
(call-process-region start end shell-file-name
nil buffer nil
nil buffer nil
...
...
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