[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/htmlize c13175c 058/134: Don't use CL's lexical-let if lex
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/htmlize c13175c 058/134: Don't use CL's lexical-let if lexical binding is in use. |
Date: |
Sat, 7 Aug 2021 09:17:06 -0400 (EDT) |
branch: elpa/htmlize
commit c13175c2b3d2b747196d35b6dab3f813dfa86249
Author: Hrvoje Niksic <hniksic@gmail.com>
Commit: Hrvoje Niksic <hniksic@gmail.com>
Don't use CL's lexical-let if lexical binding is in use.
---
htmlize.el | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/htmlize.el b/htmlize.el
index 0837290..d311344 100644
--- a/htmlize.el
+++ b/htmlize.el
@@ -336,6 +336,16 @@ output.")
(t
(error "htmlize requires next-single-property-change or \
next-single-char-property-change")))
+
+(eval-and-compile
+ (if lexical-binding
+ (defmacro htmlize-lexlet (&rest stuff)
+ `(let ,@stuff))
+ ;; cl extensions have a lexical-let macro
+ (defmacro htmlize-lexlet (&rest stuff)
+ `(lexical-let ,@stuff)))
+ (put 'htmlize-lexlet 'lisp-indent-function 1))
+
;;; Transformation of buffer text: HTML escapes, untabification, etc.
@@ -1249,6 +1259,7 @@ it's called with the same value of KEY. All other times,
the cached
(defun htmlize-default-body-tag (face-map)
nil ; no doc-string
+ face-map ; shut up the byte-compiler
"<body>")
;;; CSS based output support.
@@ -1324,7 +1335,7 @@ it's called with the same value of KEY. All other times,
the cached
(princ "<span class=\"" buffer)
(princ (htmlize-fstruct-css-name fstruct) buffer)
(princ "\">" buffer))
- (lexical-let ((fstruct-list fstruct-list) (buffer buffer))
+ (htmlize-lexlet ((fstruct-list fstruct-list) (buffer buffer))
(lambda ()
(dolist (fstruct fstruct-list)
(ignore fstruct) ; shut up the byte-compiler
@@ -1348,7 +1359,7 @@ it's called with the same value of KEY. All other times,
the cached
(princ "<span style=\"" buffer)
(princ style buffer)
(princ "\">" buffer))
- (lexical-let ((style style) (buffer buffer))
+ (htmlize-lexlet ((style style) (buffer buffer))
(lambda ()
(when style
(princ "</span>" buffer))))))
@@ -1382,7 +1393,7 @@ it's called with the same value of KEY. All other times,
the cached
(and (htmlize-fstruct-boldp merged) "</b>")
(and (htmlize-fstruct-foreground merged)
"</font>"))))))
(princ (car markup) buffer)
- (lexical-let ((markup markup) (buffer buffer))
+ (htmlize-lexlet ((markup markup) (buffer buffer))
(lambda ()
(princ (cdr markup) buffer)))))
- [nongnu] elpa/htmlize c0bea5b 040/134: Don't use the old name x-color-values., (continued)
- [nongnu] elpa/htmlize c0bea5b 040/134: Don't use the old name x-color-values., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 11e675b 041/134: Get rid of a silly warning., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 3dfd7c9 044/134: Insert multiple runs having the same fstruct-list with the same HTML markup., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize cbbbc47 045/134: Kill htmlbuf in case of error., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 98c2c97 046/134: Update the copyright year., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize b95dd46 047/134: Fix docstring and indent., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 143baca 048/134: Fix the `font' method., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 11fec7b 050/134: Recognize the `display' property and render it into the HTML, including images., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize f7cc2af 051/134: Display a buffer portion with a single `display' property as a single, ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize c34b364 053/134: Create an image with a data: URI for image data descriptors., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize c13175c 058/134: Don't use CL's lexical-let if lexical binding is in use.,
ELPA Syncer <=
- [nongnu] elpa/htmlize 97b6b8d 078/134: Escape link text., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 5ce4c6e 083/134: Support XEmacs again., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize aa6e2f6 096/134: Removed support for GNU Emacs 21., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 29f3960 104/134: Nicer readme., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize fb85e84 005/134: Version 0.45., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 94faffa 056/134: Just use `locate-file'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 3551c6b 063/134: Respect `before-string' and `after-string' overlay properties., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 3ed76d8 065/134: Use find-image to find the actual location of the image file in image-load-path., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 73333fc 068/134: Add an option `htmlize-use-images' to turn off image generation., ELPA Syncer, 2021/08/07
- [nongnu] elpa/htmlize 5e04b38 072/134: Improve docs., ELPA Syncer, 2021/08/07