| Server IP : 217.160.0.212 / Your IP : 216.73.216.141 Web Server : Apache System : Linux www 6.18.51-i1-ampere #1196 SMP Fri Sep 11 20:43:55 CEST 2026 aarch64 User : sws1073854427 ( 1073854427) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/share/emacs/28.2/lisp/ |
Upload File : |
;ELC
;;; Compiled
;;; in Emacs version 28.2
;;; with all optimizations.
(byte-code "\300\301!\210\300\302!\207" [require cus-edit htmlfontify-loaddefs] 2)
(defconst htmlfontify-version 0.21)
#@57 The generator meta tag for this version of htmlfontify.
(defconst hfy-meta-tags (format "<meta name=\"generator\" content=\"emacs %s; htmlfontify %0.2f\" />" emacs-version htmlfontify-version) (#$ . 203))
#@1772 Copy and convert buffers and files to HTML.
Add hyperlinks between files driven by etags) if requested.
Interactive functions:
`htmlfontify-buffer'
`htmlfontify-run-etags'
`htmlfontify-copy-and-link-dir'
`htmlfontify-load-rgb-file'
`htmlfontify-unload-rgb-file'
In order to:
fontify a file you have open: \[htmlfontify-buffer]
prepare the etags map for a directory: \[htmlfontify-run-etags]
copy a directory, fontifying as you go: \[htmlfontify-copy-and-link-dir]
The following might be useful when running non-windowed or in batch mode:
(note that they shouldn't be necessary - we have a built in map)
load an X11 style rgb.txt file: \[htmlfontify-load-rgb-file]
unload the current rgb.txt file: \[htmlfontify-unload-rgb-file]
And here's a programmatic example:
(defun rtfm-build-page-header (file style)
(format "#define TEMPLATE red+black.html
#define DEBUG 1
#include <build/menu-dirlist|>\n
html-css-url := /css/red+black.css
title := rtfm.etla.org ( %s / src/%s )
bodytag :=
head <=STYLESHEET;\n
%s
STYLESHEET
main-title := rtfm / %s / src/%s\n
main-content <=MAIN_CONTENT;\n" rtfm-section file style rtfm-section file))
(defun rtfm-build-page-footer (file) "\nMAIN_CONTENT\n")
(defun rtfm-build-source-docs (section srcdir destdir)
(interactive
"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)
(rtfm-section section)
(hfy-index-file "index"))
(htmlfontify-run-etags srcdir)
(htmlfontify-copy-and-link-dir srcdir destdir ".src" ".html")))
(defconst htmlfontify-manual "Htmlfontify Manual" (#$ . 416))
(byte-code "\300\301\302\303\304\305\306\307\306\310\306\311\312\313&
\210\314\315\316\317\320DD\321\322\323\324\325&\210\314\326\316\317\327DD\330\322\331\324\332&\210\314\333\316\317\334DD\335\322\336\324\337&\210\314\340\316\317\341DD\342\322\343\324\344&\210\314\345\316\317\346DD\347\322\350\324\351&\210\314\352\316\317\353DD\354\322\355\324\356&\210\314\357\316\317\360DD\361\322\362\324\363&\210\314\364\316\317\365DD\366\322\367\324\370&\210\314\371\316\317\372DD\373\322\374\324\375&\210\314\376\316\317\377DD\201@ \322\201A \324\201B &\210\314\201C \316\317\201D DD\201E \322\201F \324\201G &\210\201H \201I \201J \302#\210\201K \211\203 \211@\201I N\203\371 \201J N\204\371 \201L \201J \201I N#\210A\266\202\202\325 \210\201M \201I \201J \201N #\210\314\201J \316\317\201O DD\201P \322\201Q \201R \201S \324\201T & \210\314\201U \316\317\201V DD\201W \322\201X \324\201Y &\210\314\201Z \316\317\201[ DD\201\\ \322\201] \324\201^ &\210\314\201_ \316\317\201` DD\201a \322\201b \324\201c &\207" [custom-declare-group htmlfontify nil "Convert buffers and files to HTML." :group applications :link (variable-link htmlfontify-manual) (custom-manual "(htmlfontify) Top") (info-link "(htmlfontify) Customization") :prefix "hfy-" custom-declare-variable hfy-page-header funcall function #[0 "\300\207" [hfy-default-header] 1 #1=""] "Function called to build the header of the HTML source.\nThis is called with two arguments (the filename relative to the top\nlevel source directory being etag'd and fontified), and a string containing\nthe <style>...</style> text to embed in the document.\nIt should return a string that will be used as the header for the\nhtmlfontified version of the source file.\n\nSee also `hfy-page-footer'." :tag "page-header" :type (function) hfy-split-index #[0 "\300\207" [nil] 1 #1#] "Whether or not to split the index `hfy-index-file' alphabetically.\nIf non-nil, the index is split on the first letter of each tag.\nUseful when the index would otherwise be large and take\na long time to render or be difficult to navigate." "split-index" (boolean) hfy-page-footer #[0 "\300\207" [hfy-default-footer] 1 #1#] "As `hfy-page-header', but generates the output footer.\nIt takes only one argument, the filename." "page-footer" (function) hfy-extn #[0 "\300\207" [".html"] 1 #1#] "File extension used for output files." "extension" (string) hfy-src-doc-link-style #[0 "\300\207" ["text-decoration: underline;"] 1 #1#] "String to add to the `<style> a' variant of an htmlfontify CSS class." "src-doc-link-style" (string) hfy-src-doc-link-unstyle #[0 "\300\207" [" text-decoration: none;"] 1 #1#] "Regex to remove from the `<style> a' variant of an htmlfontify CSS class." "src-doc-link-unstyle" (regexp) hfy-link-extn #[0 "\300\207" [nil] 1 #1#] "File extension used for href links.\nUseful where the htmlfontify output files are going to be processed\nagain, with a resulting change in file extension. If nil, then any\ncode using this should fall back to `hfy-extn'." "link-extension" (choice string (const nil)) hfy-link-style-fun #[0 "\300\207" [hfy-link-style-string] 1 #1#] "Function to customize the appearance of hyperlinks.\nSet this to a function, which will be called with one argument\n(a \"{ foo: bar; ...}\" CSS style-string) - it should return a copy of\nits argument, altered so as to make any changes you want made for text which\nis a hyperlink, in addition to being in the class to which that style would\nnormally be applied." "link-style-function" (function) hfy-index-file #[0 "\300\207" ["hfy-index"] 1 #1#] "Name (sans extension) of the tag definition index file produced during\nfontification-and-hyperlinking." "index-file" (string) hfy-instance-file #[0 "\300\207" ["hfy-instance"] 1 #1#] "Name (sans extension) of the tag usage index file produced during\nfontification-and-hyperlinking." "instance-file" (string) hfy-html-quote-regex #[0 "\300\207" ["\\([<\"&>]\\)"] 1 #1#] "Regex to match (with a single back-reference per match) strings in HTML\nwhich should be quoted with `hfy-html-quote' (and `hfy-html-quote-map')\nto make them safe." "html-quote-regex" (regexp) defvaralias hfy-post-html-hooks hfy-post-html-hook (saved-value saved-variable-comment) put make-obsolete-variable "24.3" #[0 "\300\207" [nil] 1 #1#] "List of functions to call after creating and filling the HTML buffer.\nThese functions will be called with the HTML buffer as the current buffer." "post-html-hooks" :options (set-auto-mode) (hook) hfy-default-face-def #[0 "\300\207" [nil] 1 #1#] "Fallback `defface' specification for the face `default', used when\n`hfy-display-class' has been set (the normal htmlfontify way of extracting\npotentially non-current face information doesn't necessarily work for\n`default').\n\nExample: I customize this to:\n\n((t :background \"black\" :foreground \"white\" :family \"misc-fixed\"))" "default-face-definition" (alist) hfy-etag-regex #[0 "\300\207" [".*\\([^\n]+\\)\\([0-9]+\\),\\([0-9]+\\)$\\|.*[0-9]+,[0-9]+$"] 1 #1#] "Regex used to parse an etags entry.\nThis must have 3 subexps, corresponding, in order, to:\n\n 1 - The tag\n 2 - The line\n 3 - The char (point) at which the tag occurs." "etag-regex" (regexp) hfy-html-quote-map #[0 "\300\207" [(("\"" """) ("<" "<") ("&" "&") (">" ">"))] 1 #1#] "Alist of char -> entity mappings used to make the text HTML-safe." "html-quote-map" (alist :key-type (string))] 14)
(defconst hfy-e2x-etags-cmd "for src in `find . -type f`;\ndo\n ETAGS=%s;\n case ${src} in\n *.ad[absm]|*.[CFHMSacfhlmpsty]|*.def|*.in[cs]|*.s[as]|*.src|*.cc|\\\n *.hh|*.[chy]++|*.[ch]pp|*.[chy]xx|*.pdb|*.[ch]s|*.[Cc][Oo][Bb]|\\\n *.[eh]rl|*.f90|*.for|*.java|*.[cem]l|*.clisp|*.lisp|*.[Ll][Ss][Pp]|\\\n [Mm]akefile*|*.pas|*.[Pp][LlMm]|*.psw|*.lm|*.pc|*.prolog|*.oak|\\\n *.p[sy]|*.sch|*.scheme|*.[Ss][Cc][Mm]|*.[Ss][Mm]|*.bib|*.cl[os]|\\\n *.ltx|*.sty|*.TeX|*.tex|*.texi|*.texinfo|*.txi|*.x[bp]m|*.yy|\\\n *.[Ss][Qq][Ll])\n ${ETAGS} -o- ${src};\n ;;\n *)\n FTYPE=`file ${src}`;\n case ${FTYPE} in\n *script*text*)\n ${ETAGS} -o- ${src};\n ;;\n *text*)\n SHEBANG=`head -n1 ${src} | grep '#!' -c`;\n if [ ${SHEBANG} -eq 1 ];\n then\n ${ETAGS} -o- ${src};\n fi;\n ;;\n esac;\n ;;\n esac;\ndone;")
(defconst hfy-etags-cmd-alist-default (byte-code "\301B\302B\207" [hfy-e2x-etags-cmd "emacs etags" (("exuberant ctags" . "%s -R -f -"))] 2))
(byte-code "\300\301\302\303\304DD\305\306\307\310\311&\210\300\312\302\303\313DD\314\306\315\310\316&\210\300\317\302\303\320DD\321\306\322\310\323&\210\300\324\302\303\325DD\326\306\327\310\330&\207" [custom-declare-variable hfy-etags-cmd-alist funcall function #[0 "\207" [hfy-etags-cmd-alist-default] 1 #1=""] "Alist of possible shell commands that will generate etags output that\n`htmlfontify' can use. `%s' will be replaced by `hfy-etags-bin'." :tag "etags-cmd-alist" :type (alist :key-type (string) :value-type (string)) hfy-etags-bin #[0 "\300\207" ["etags"] 1 #1#] "Location of etags binary (we begin by assuming it's in your path).\n\nNote that if etags is not in your path, you will need to alter the shell\ncommands in `hfy-etags-cmd-alist'." "etags-bin" (file) hfy-shell-file-name #[0 "\300\207" ["/bin/sh"] 1 #1#] "Shell (Bourne or compatible) to invoke for complex shell operations." "shell-file-name" (file) hfy-ignored-properties #[0 "\300\207" [(read-only intangible modification-hooks insert-in-front-hooks insert-behind-hooks point-entered point-left)] 1 #1#] "Properties to omit when copying a fontified buffer for HTML transformation." "ignored-properties" (repeat symbol)] 8)
#@64 Return a string indicating which flavor of etags we are using.
(defalias 'hfy-which-etags #[0 "\301\302\303\"r\211q\210\304\305\"\216\30619 \307\310\303\310\311%\312=\2055 eb\210\313\314\310\303#\203, \315\2025 \313\316\310\303#\2055 \3170\202; \210\310*\207" [hfy-etags-bin generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] (file-error) call-process nil "--version" 0 search-forward "exube" "exuberant ctags" "GNU E" "emacs etags"] 7 (#$ . 10085)])
(byte-code "\301\302\303\304\305DD\306\307\310\311\312C\211\203&