Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
ebe5a3a5
Commit
ebe5a3a5
authored
Mar 25, 1998
by
Barry Warsaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(py-execute-region): Watch out for shell-command-on-region killing a
zero sized output buffer.
parent
25202bf2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
Misc/python-mode.el
Misc/python-mode.el
+10
-4
No files found.
Misc/python-mode.el
View file @
ebe5a3a5
...
...
@@ -1133,6 +1133,7 @@ Electric behavior is inhibited inside a string or comment."
(
set-buffer
curbuf
))))
(
defun
py-postprocess-output-buffer
(
buf
)
;; Highlight exceptions found in BUF
(
let
(
line
file
bol
)
(
save-excursion
(
set-buffer
buf
)
...
...
@@ -1257,10 +1258,15 @@ is inserted at the end. See also the command `py-clear-queue'."
(
t
;; otherwise either run it synchronously in a subprocess
(
shell-command-on-region
start
end
py-python-command
py-output-buffer
)
;; shell-command-on-region kills the output buffer if it never
;; existed and there's no output from the command
(
if
(
not
(
get-buffer
py-output-buffer
))
(
message
"No output."
)
(
setq
py-exception-buffer
(
current-buffer
))
(
py-postprocess-output-buffer
py-output-buffer
)
(
pop-to-buffer
py-output-buffer
)
))))
))
)))
;; Code execution command
(
defun
py-execute-buffer
(
&optional
async
)
...
...
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