[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/coterm da8019b 80/80: Simplify narrowing to process out
From: |
ELPA Syncer |
Subject: |
[elpa] externals/coterm da8019b 80/80: Simplify narrowing to process output |
Date: |
Wed, 13 Oct 2021 18:57:41 -0400 (EDT) |
branch: externals/coterm
commit da8019bac0519bd249ef1e9186a743217a7e4bd0
Author: Miha Rihtaršič <miha@kamnitnik.top>
Commit: Miha Rihtaršič <miha@kamnitnik.top>
Simplify narrowing to process output
---
coterm.el | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/coterm.el b/coterm.el
index f570537..606eec2 100644
--- a/coterm.el
+++ b/coterm.el
@@ -308,12 +308,10 @@ If point is not on process mark, leave `coterm-char-mode'
and
`coterm-scroll-snap-mode'. Otherwise, call functions from
`coterm-auto-char-functions' until one returns non-nil."
(let* ((proc (get-buffer-process (current-buffer)))
- (pmark (and proc (process-mark proc)))
- (opoint))
- (if (and pmark (= (setq opoint (point)) pmark))
+ (pmark (and proc (process-mark proc))))
+ (if (and pmark (= (point) pmark))
(save-restriction
(coterm--narrow-to-process-output pmark)
- (goto-char opoint)
(run-hook-with-args-until-success 'coterm-auto-char-functions))
(when coterm-char-mode (coterm-char-mode -1))
(when coterm-scroll-snap-mode (coterm-scroll-snap-mode -1)))))
@@ -448,8 +446,8 @@ only leave these modes once cursor moves to the bottom
line."
t)
(defun coterm--narrow-to-process-output (pmark)
- "Narrow to process output and move point to the end of it.
-If there is no user input at end of buffer, simply widen. PMARK
+ "Widen and narrow to process output.
+If there is no user input at end of buffer, simply widen. PMARK
is the process mark."
(widen)
(unless comint-use-prompt-regexp
- [elpa] externals/coterm 139e8d0 79/80: Fix for Emacs 27, (continued)
- [elpa] externals/coterm 139e8d0 79/80: Fix for Emacs 27, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm 5aea1c8 25/80: Fixup some comments, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm f48ef18 26/80: Fix \e[M and \e[L outside scrolling region, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm 3599955 35/80: Fixes for documentation and compiler warnings, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm c535023 36/80: Safeguard against negative values in move-to-column, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm b35e077 40/80: Reorganize file, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm 2358124 48/80: Try to enter and leave char-mode automatically, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm 13dd76a 51/80: Adjust mpv prompt detecting regexp, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm 34d8808 54/80: Improve less prompt regexp, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm dd06737 55/80: Improve regexp matching mpv prompt, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm da8019b 80/80: Simplify narrowing to process output,
ELPA Syncer <=
- [elpa] externals/coterm ab99084 76/80: [auto-char] "less" prompt may be an empty line if it is slow, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm be23cf4 72/80: Prepare submission to ELPA, ELPA Syncer, 2021/10/13