[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/htmlize 5ea2cc3 113/134: Let `overlays-at' sort the overla
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/htmlize 5ea2cc3 113/134: Let `overlays-at' sort the overlays. (#9) |
Date: |
Sat, 7 Aug 2021 09:17:18 -0400 (EDT) |
branch: elpa/htmlize
commit 5ea2cc33c32d08088f4aee607a425114bca3accc
Author: Hrvoje Niksic <hniksic@gmail.com>
Commit: Hrvoje Niksic <hniksic@gmail.com>
Let `overlays-at' sort the overlays. (#9)
---
htmlize.el | 26 ++++----------------------
1 file changed, 4 insertions(+), 22 deletions(-)
diff --git a/htmlize.el b/htmlize.el
index 71bf0fb..683c06a 100644
--- a/htmlize.el
+++ b/htmlize.el
@@ -1381,29 +1381,11 @@ property and by buffer overlays that specify `face'."
;; Collect overlays at point that specify `face'.
(delete-if-not (lambda (o)
(overlay-get o 'face))
- (overlays-at (point))))
+ (nreverse
+ (if (>= emacs-major-version 25)
+ (overlays-at (point) t)
+ (overlays-at (point))))))
list face-prop)
- ;; Sort the overlays so the smaller (more specific) ones
- ;; come later. The number of overlays at each one
- ;; position should be very small, so the sort shouldn't
- ;; slow things down.
- (setq overlays (sort* overlays
- ;; Sort by ascending...
- #'<
- ;; ...overlay size.
- :key (lambda (o)
- (- (overlay-end o)
- (overlay-start o)))))
- ;; Overlay priorities, if present, override the above
- ;; established order. Larger overlay priority takes
- ;; precedence and therefore comes later in the list.
- (setq overlays (stable-sort
- overlays
- ;; Reorder (stably) by acending...
- #'<
- ;; ...overlay priority.
- :key (lambda (o)
- (or (overlay-get o 'priority) 0))))
(dolist (overlay overlays)
(setq face-prop (overlay-get overlay 'face)
list (nconc (htmlize-decode-face-prop face-prop) list)))
- [nongnu] elpa/htmlize 6b3b3b6 077/134: Purge asterisks from variable docstrings., (continued)
- [nongnu] elpa/htmlize 6b3b3b6 077/134: Purge asterisks from variable docstrings., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 7947b8b 074/134: Don't generate ALT text larger than 100 chars or containing control chars., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 93294ff 091/134: Bumped version., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize a4569e3 092/134: Correctly handle :inherit specifying a list of faces., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 31bc1a8 094/134: Remove stray debugging print., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 8c09264 097/134: Bump version and copyright., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize a95e591 107/134: Bump version., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 2c41d79 101/134: Update mail address., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 9d4ad62 102/134: Set type and group attribute for custom variable, ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 88e2cb6 109/134: Update copyright info., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 5ea2cc3 113/134: Let `overlays-at' sort the overlays. (#9),
ELPA Syncer <=
- [nongnu] elpa/htmlize 1bc2f1b 118/134: Bump version., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 726c77b 120/134: Correctly sort overlays in Emacs 24., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize a8b73f1 122/134: New option htmlize-untabify. (#21), ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 9145b68 128/134: Simplify ensuring of font-lock., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 86f22f2 132/134: Add Homepage to the package header, ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 999eef2 032/134: Support searching for any property change., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 7f94aa2 039/134: Conditionalize on color-instance-rgb-components., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 34845c5 042/134: Update comment., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize c847998 057/134: The future has come: switch to lexical scope., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 845329e 060/134: Don't attempt to use lexical binding in emacsen that don't support it., ELPA Syncer, 2021/08/07