emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/htmlize 75c21c7 116/134: Use `font-lock-ensure' where avai


From: ELPA Syncer
Subject: [nongnu] elpa/htmlize 75c21c7 116/134: Use `font-lock-ensure' where available. (#14)
Date: Sat, 7 Aug 2021 09:17:18 -0400 (EDT)

branch: elpa/htmlize
commit 75c21c7f4ddff0d1bbdf1b4f66a947368a6f3188
Author: Hrvoje Niksic <hniksic@gmail.com>
Commit: Hrvoje Niksic <hniksic@gmail.com>

    Use `font-lock-ensure' where available. (#14)
---
 README.md  | 7 +++----
 htmlize.el | 8 ++++----
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/README.md b/README.md
index 64e5443..12d060f 100644
--- a/README.md
+++ b/README.md
@@ -28,10 +28,9 @@ buffer or move the point.  htmlize will do its best to work 
on
 non-windowing Emacs sessions but the result will be limited to
 colors supported by the terminal.
 
-htmlize aims for compatibility with Emacsen version 22 and later.
-Please let me know if it doesn't work on the version of XEmacs or
-GNU Emacs that you are using.  The package relies on the presence
-of CL extensions, especially for cross-emacs compatibility.
+htmlize aims for compatibility with older Emacs versions.  Please
+let me know if it doesn't work on the version of GNU Emacs that you
+are using.
 
 
 [1]: 
http://htmlpreview.github.io/?https://github.com/hniksic/emacs-htmlize/blob/master/htmlize.el.html
diff --git a/htmlize.el b/htmlize.el
index d4d65d9..388492e 100644
--- a/htmlize.el
+++ b/htmlize.el
@@ -1822,10 +1822,10 @@ does not name a directory, it will be used as output 
file name."
       (let ((buffer-file-name file))
        ;; Set the major mode for the sake of font-lock.
        (normal-mode)
-       (font-lock-mode 1)
-       (unless font-lock-mode
-         ;; In GNU Emacs (font-lock-mode 1) doesn't force font-lock,
-         ;; contrary to the documentation.  This seems to work.
+        (if (fboundp 'font-lock-ensure)
+            (font-lock-ensure)
+          ;; Emacs prior to 25.1
+          (font-lock-mode 1)
          (font-lock-fontify-buffer))
        ;; htmlize the buffer and save the HTML.
        (with-current-buffer (htmlize-buffer-1)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]