branch: elpa/htmlize
commit 315a8f23cfd3e87642ff9e30ae3300c7a84244d5
Author: Hrvoje Niksic <[email protected]>
Commit: Hrvoje Niksic <[email protected]>
htmlize-sorted-overlays-at: correctly initialize OVERLAYS. (#18)
---
htmlize.el | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/htmlize.el b/htmlize.el
index 6cbe110..3584b83 100644
--- a/htmlize.el
+++ b/htmlize.el
@@ -1281,9 +1281,10 @@ overlays that specify `face'."
(defun htmlize-sorted-overlays-at (pos)
;; Like OVERLAYS-AT with the SORTED argument, for older Emacsen.
- (let ((overlays (sort* overlays #'<
- :key (lambda (o)
- (- (overlay-end o) (overlay-start o))))))
+ (let ((overlays (overlays-at pos)))
+ (setq overlays (sort* overlays #'<
+ :key (lambda (o)
+ (- (overlay-end o) (overlay-start o)))))
(setq overlays
(stable-sort overlays #'<
:key (lambda (o)