[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/htmlize d103bb5 1/3: Drop support for pre-25 Emacs.
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/htmlize d103bb5 1/3: Drop support for pre-25 Emacs. |
Date: |
Wed, 25 Aug 2021 17:57:30 -0400 (EDT) |
branch: elpa/htmlize
commit d103bb52a7461c46d211d131543a4e467b600d79
Author: Hrvoje Niksic <hniksic@gmail.com>
Commit: Hrvoje Niksic <hniksic@gmail.com>
Drop support for pre-25 Emacs.
---
htmlize.el | 22 ++--------------------
1 file changed, 2 insertions(+), 20 deletions(-)
diff --git a/htmlize.el b/htmlize.el
index f5c6d8a..72aee47 100644
--- a/htmlize.el
+++ b/htmlize.el
@@ -1,6 +1,6 @@
;;; htmlize.el --- Convert buffer text and decorations to HTML. -*-
lexical-binding: t -*-
-;; Copyright (C) 1997-2003,2005,2006,2009,2011,2012,2014,2017,2018 Hrvoje
Niksic
+;; Copyright (C) 1997-2003,2005,2006,2009,2011,2012,2014,2017,2018,2020 Hrvoje
Niksic
;; Author: Hrvoje Niksic <hniksic@gmail.com>
;; Homepage: https://github.com/hniksic/emacs-htmlize
@@ -1273,24 +1273,6 @@ overlays that specify `face'."
faces :test 'equal))))
faces))
-(if (>= emacs-major-version 25)
- (defun htmlize-sorted-overlays-at (pos)
- (overlays-at pos t))
-
- (defun htmlize-sorted-overlays-at (pos)
- ;; Like OVERLAYS-AT with the SORTED argument, for older Emacsen.
- (let ((overlays (overlays-at pos)))
- (setq overlays (cl-sort overlays #'<
- :key (lambda (o)
- (- (overlay-end o) (overlay-start o)))))
- (setq overlays
- (cl-stable-sort overlays #'<
- :key (lambda (o)
- (let ((prio (overlay-get o 'priority)))
- (if (numberp prio) prio 0)))))
- (nreverse overlays))))
-
-
;; htmlize-faces-at-point returns the faces in use at point. The
;; faces are sorted by increasing priority, i.e. the last face takes
;; precedence.
@@ -1310,7 +1292,7 @@ overlays that specify `face'."
;; Collect overlays at point that specify `face'.
(cl-delete-if-not (lambda (o)
(overlay-get o 'face))
- (nreverse (htmlize-sorted-overlays-at (point)))))
+ (nreverse (overlays-at (point) t))))
list face-prop)
(dolist (overlay overlays)
(setq face-prop (overlay-get overlay 'face)