[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/racket-mode a4035b5065: racket-repl-delete-output: Treat e
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/racket-mode a4035b5065: racket-repl-delete-output: Treat error fields as output |
Date: |
Sat, 23 Dec 2023 10:00:21 -0500 (EST) |
branch: elpa/racket-mode
commit a4035b5065765c6730b25a0c065c706891ed5e9a
Author: Greg Hendershott <git@greghendershott.com>
Commit: Greg Hendershott <git@greghendershott.com>
racket-repl-delete-output: Treat error fields as output
While exploring #691 I noticed that C-c C-o was misbehaving with error
fields because they were not treated as output.
---
racket-repl.el | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/racket-repl.el b/racket-repl.el
index fb019a0217..9b03946af6 100644
--- a/racket-repl.el
+++ b/racket-repl.el
@@ -1707,7 +1707,7 @@ When point is within output, delete all of that
congtiguous
output."
(interactive)
(let* ((pt (point))
- (output-fields '(value stdout stderr))
+ (output-fields '(value stdout stderr error deleted))
(beg-of-output (progn
;; Skip backward over non-output fields
(unless (memq (get-text-property (point) 'field)
output-fields)
@@ -1729,16 +1729,18 @@ output."
(eq ?\n (char-after)))))
(goto-char (field-end (point) t)))
(point))))
- (if (< beg-of-output end-of-output)
+ (if (and (< beg-of-output end-of-output)
+ (not (eq (field-at-pos (1+ beg-of-output)) 'deleted)))
(let ((inhibit-read-only t))
(delete-region beg-of-output end-of-output)
(save-excursion
(goto-char beg-of-output)
(insert (propertize "(output deleted)\n"
+ 'field 'deleted
'read-only t
'font-lock-face racket-repl-message))))
- (user-error "Can't find output to delete")
- (goto-char pt))))
+ (goto-char pt)
+ (user-error "Can't find output to delete"))))
;;; Input history
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/racket-mode a4035b5065: racket-repl-delete-output: Treat error fields as output,
ELPA Syncer <=