From 72fc8ec6dd013e6964d58bf624e2b5ebf4177a64 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 15 Apr 2020 00:23:09 -0400 Subject: [PATCH] * lisp/htmlfontify.el: Use `font-lock-ensure` unconditionally Remove redundant `:group`s. (hfy-force-fontification): Make it an obsolete alias for `font-lock-ensure`. Update all callers. (hfy-init-kludge-hooks, hfy-init-kludge-hook): Remove vars, not used any more. (hfy-kludge-cperl-mode): Declare it obsolete. --- lisp/htmlfontify.el | 109 ++++++++++---------------------------------- 1 file changed, 25 insertions(+), 84 deletions(-) diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el index 1d98b633d78..7a5d88ce834 100644 --- a/lisp/htmlfontify.el +++ b/lisp/htmlfontify.el @@ -136,8 +136,8 @@ main-content <=MAIN_CONTENT;\\n\" rtfm-section file style rtfm-section file)) \"s section[eg- emacs / p4-blame]:\\nD source-dir: \\nD output-dir: \") (require \\='htmlfontify) (hfy-load-tags-cache srcdir) - (let ((hfy-page-header \\='rtfm-build-page-header) - (hfy-page-footer \\='rtfm-build-page-footer) + (let ((hfy-page-header #\\='rtfm-build-page-header) + (hfy-page-footer #\\='rtfm-build-page-footer) (rtfm-section section) (hfy-index-file \"index\")) (htmlfontify-run-etags srcdir) @@ -151,7 +151,7 @@ main-content <=MAIN_CONTENT;\\n\" rtfm-section file style rtfm-section file)) :link '(info-link "(htmlfontify) Customization") :prefix "hfy-") -(defcustom hfy-page-header 'hfy-default-header +(defcustom hfy-page-header #'hfy-default-header "Function called to build the header of the HTML source. This is called with two arguments (the filename relative to the top level source directory being etag'd and fontified), and a string containing @@ -159,7 +159,6 @@ the text to embed in the document. It should return a string that will be used as the header for the htmlfontified version of the source file.\n See also `hfy-page-footer'." - :group 'htmlfontify ;; FIXME: Why place such a :tag everywhere? Isn't it imposing your ;; own Custom preference on your users? --Stef :tag "page-header" @@ -170,32 +169,27 @@ See also `hfy-page-footer'." If non-nil, the index is split on the first letter of each tag. Useful when the index would otherwise be large and take a long time to render or be difficult to navigate." - :group 'htmlfontify :tag "split-index" :type '(boolean)) -(defcustom hfy-page-footer 'hfy-default-footer +(defcustom hfy-page-footer #'hfy-default-footer "As `hfy-page-header', but generates the output footer. It takes only one argument, the filename." - :group 'htmlfontify :tag "page-footer" :type '(function)) (defcustom hfy-extn ".html" "File extension used for output files." - :group 'htmlfontify :tag "extension" :type '(string)) (defcustom hfy-src-doc-link-style "text-decoration: underline;" "String to add to the `