[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/popon 22e76f812c 14/15: Fix Eshell popon error
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/popon 22e76f812c 14/15: Fix Eshell popon error |
Date: |
Sun, 22 May 2022 12:59:19 -0400 (EDT) |
branch: elpa/popon
commit 22e76f812c9baa919ceaaeb618b918967f7117d7
Author: Akib Azmain Turja <akib@disroot.org>
Commit: Akib Azmain Turja <akib@disroot.org>
Fix Eshell popon error
---
popon.el | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/popon.el b/popon.el
index c203fb2a4e..7348a09b41 100644
--- a/popon.el
+++ b/popon.el
@@ -88,7 +88,8 @@ shouldn't contain newlines. Example:
(\"found in the GNU General Public License\" nil nil)
(\"that comes with Emacs and also appears\" nil nil)
(\"in this manual(1). See Copying.\" t nil))"
- (let ((tab-size tab-width))
+ (let ((tab-size tab-width)
+ (inhibit-read-only t)) ; The text might have `read-only' property.
(with-temp-buffer
(setq-local tab-width tab-size) ; Preseve tab width.
(dotimes (i (length lines))
@@ -331,6 +332,18 @@ when LINE-BEGINNINGS was calculated.")
(cdr line)))
(setq current-offset (car line)))
(add-face-text-property 0 (length text) 'default 'append text)
+
+ ;; Pay attention to the `font-lock-face' property.
+ (when font-lock-mode
+ (let ((pos 0))
+ (while (< pos (length text))
+ (let ((next-pos (or (next-single-property-change
+ pos 'font-lock-face text)
+ (length text))))
+ (when-let ((face (get-pos-property pos 'font-lock-face
+ text)))
+ (add-face-text-property pos next-pos face nil text))
+ (setq pos next-pos)))))
text)))
(when (and (cadr block)
(< (cdar block) (point-max))
- [nongnu] elpa/popon 95c1a57d08 08/15: Fix #1 newline background at end of line, (continued)
- [nongnu] elpa/popon 95c1a57d08 08/15: Fix #1 newline background at end of line, ELPA Syncer, 2022/05/22
- [nongnu] elpa/popon 88d2d3ca2a 09/15: Revert "Fix #1 newline background at end of line", ELPA Syncer, 2022/05/22
- [nongnu] elpa/popon e4d9123e0b 13/15: Fix popon beyond EOB appearing at wrong position, ELPA Syncer, 2022/05/22
- [nongnu] elpa/popon 7e6a5d6ec6 02/15: Add COPYING, ELPA Syncer, 2022/05/22
- [nongnu] elpa/popon 7a359994ff 05/15: Add autoload cookies, ELPA Syncer, 2022/05/22
- [nongnu] elpa/popon 240fb286d8 01/15: Working implementation, ELPA Syncer, 2022/05/22
- [nongnu] elpa/popon e6e2e8dff0 10/15: Revert "Revert "Fix #1 newline background at end of line"", ELPA Syncer, 2022/05/22
- [nongnu] elpa/popon aed8ff598d 15/15: Take the fringe width into account, ELPA Syncer, 2022/05/22
- [nongnu] elpa/popon c34dd56fbd 04/15: Add installation instruction, ELPA Syncer, 2022/05/22
- [nongnu] elpa/popon 6c1311600a 11/15: Lower required Emacs version, ELPA Syncer, 2022/05/22
- [nongnu] elpa/popon 22e76f812c 14/15: Fix Eshell popon error,
ELPA Syncer <=
- [nongnu] elpa/popon 61b54bea8c 12/15: Fix popon breaking when long lines aren't truncated, ELPA Syncer, 2022/05/22