;ELC ;;; Compiled ;;; in Emacs version 27.1 ;;; with all optimizations. ;;; This file contains utf-8 non-ASCII characters, ;;; and so cannot be loaded into Emacs 22 or earlier. (and (boundp 'emacs-version) (< (aref emacs-version (1- (length emacs-version))) ?A) (string-lessp emacs-version "23") (error "`%s' was compiled for Emacs 23 or later" #$)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\207" [require faces custom font-lock 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 "" emacs-version htmlfontify-version) (#$ . 589)) #@1774 Copy and convert buffers and files to HTML, adding 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 \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" (#$ . 802)) (byte-code "\300\301\302\303\304\305\306\307\306\310\306\311\312\313& \210\314\315\316\317\320DD\321\304\301\322\323\324\325& \210\314\326\316\317\327DD\330\304\301\322\331\324\332& \210\314\333\316\317\334DD\335\304\301\322\336\324\337& \210\314\340\316\317\341DD\342\304\301\322\343\324\344& \210\314\345\316\317\346DD\347\304\301\322\350\324\351& \210\314\352\316\317\353DD\354\304\301\322\355\324\356& \210\314\357\316\317\360DD\361\304\301\322\362\324\363& \210\314\364\316\317\365DD\366\304\301\322\367\324\370& \210\314\371\316\317\372DD\373\304\301\322\374\324\375& \210\314\376\316\317\377DD\201@\304\301\322\201A\324\201B& \210\314\201C\316\317\201DDD\201E\304\301\322\201F\324\201G& \210\201H\201I\201J\302#\210\201K\211\203\211@\201IN\203\201JN\204\201L\201J\201IN#\210A\266\202\202\353\210\201M\201I\201J\201N#\210\314\201J\316\317\201ODD\201P\304\301\322\201Q\324\201R& \210\201H\201S\201T\302#\210\201K\211\203z\211@\201SN\203s\201TN\204s\201L\201T\201SN#\210A\266\202\202O\210\201M\201S\201T\201U#\210\314\201T\316\317\201VDD\201W\304\301\322\201X\201Y\201Z\324\201[& \210\314\201\\\316\317\201]DD\201^\304\301\322\201_\324\201`& \210\314\201a\316\317\201bDD\201c\304\301\322\201d\324\201e& \210\314\201f\316\317\201gDD\201h\304\301\322\201i\324\201j& \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] "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 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] "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] "As `hfy-page-header', but generates the output footer.\nIt takes only one argument, the filename." "page-footer" (function) hfy-extn #[0 "\300\207" [#1=".html"] 1 #1#] "File extension used for output files." "extension" (string) hfy-src-doc-link-style #[0 "\300\207" [#2="text-decoration: underline;"] 1 #2#] "String to add to the `\n"] 10 (#$ . 44387)]) #@104 Mark dangerous ["<>] characters with the `hfy-quoteme' property. See also `hfy-html-dekludge-buffer'. (defalias 'hfy-html-enkludge-buffer #[0 "\212eb\210\301\302\303#\205\304\305\224`\306\303$\210\202)\207" [hfy-html-quote-regex re-search-forward nil t put-text-property 0 hfy-quoteme] 5 (#$ . 44846)]) #@79 Map CHAR-STRING to an HTML safe string (entity) if need be. (fn CHAR-STRING) (defalias 'hfy-html-quote #[257 "\301\"A@\206\n\211\207" [hfy-html-quote-map assoc] 4 (#$ . 45161)]) #@137 Transform all dangerous characters marked with the `hfy-quoteme' property using `hfy-html-quote'. See also `hfy-html-enkludge-buffer'. (defalias 'hfy-html-dekludge-buffer #[0 "\212eb\210\301\302\303#\205\304\305\224\306\"\203\307\310\311\312!!!\210\202)\207" [hfy-html-quote-regex re-search-forward nil t get-text-property 0 hfy-quoteme replace-match hfy-html-quote match-string 1] 4 (#$ . 45350)]) #@158 Bind variables according to VARLIST and eval BODY restoring buffer state. Do not record undo information during evaluation of BODY. (fn VARLIST &rest BODY) (defalias 'hfy-save-buffer-state '(macro . #[385 "\300\301!\302\303\304B\305B\"\306B\307\310BBF\207" [make-symbol "modified" let* append ((buffer-modified-p)) ((buffer-undo-list t) (inhibit-read-only t) (inhibit-point-motion-hooks t) (inhibit-modification-hooks t) deactivate-mark buffer-file-name buffer-file-truename) progn unless ((restore-buffer-modified-p nil))] 9 (#$ . 45764)])) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put hfy-save-buffer-state lisp-indent-function 1 put edebug-form-spec let] 5) #@77 Tag trailing whitespace with a hfy property if it is currently highlighted. (defalias 'hfy-mark-trailing-whitespace #[0 "\205=\306\212eb\210\307 \306\211\306\211\310\211\310\311\312\310\306#\2030\313\314\224\314\225\315\306$\210\202\211?\2058\316\310!.\262*\207" [show-trailing-whitespace inhibit-read-only buffer-undo-list inhibit-point-motion-hooks inhibit-modification-hooks deactivate-mark t buffer-modified-p nil re-search-forward "[ ]+$" put-text-property 0 hfy-show-trailing-whitespace restore-buffer-modified-p buffer-file-name buffer-file-truename] 7 (#$ . 46457)]) #@52 Undo the effect of `hfy-mark-trailing-whitespace'. (defalias 'hfy-unmark-trailing-whitespace #[0 "\205(\306 \307\211\307\211\310\211\f\310 \311ed\312#\210\211?\205$\313\310!.\262\207" [show-trailing-whitespace buffer-undo-list inhibit-read-only inhibit-point-motion-hooks inhibit-modification-hooks deactivate-mark buffer-modified-p t nil remove-text-properties (hfy-show-trailing-whitespace nil) restore-buffer-modified-p buffer-file-name buffer-file-truename] 6 (#$ . 47057)]) #@179 Default handler to begin a span of text. Insert "". See `hfy-begin-span-handler' for more information. (fn STYLE TEXT-BLOCK TEXT-ID TEXT-BEGINS-BLOCK-P) (defalias 'hfy-begin-span #[1028 "\211\203\n\300\301\"c\210\203\300\302$\202\300\303\"c\207" [format "" "" ""] 9 (#$ . 47555)]) #@108 Default handler to end a span of text. Insert "". See `hfy-end-span-handler' for more information. (defalias 'hfy-end-span #[0 "\300c\207" [""] 1 (#$ . 47978)]) #@1081 Handler to begin a span of text. The signature of the handler is (lambda (STYLE TEXT-BLOCK TEXT-ID TEXT-BEGINS-BLOCK-P) ...). The handler must insert appropriate tags to begin a span of text. STYLE is the name of the style that begins at point. It is derived from the face attributes as part of `hfy-face-to-css' callback. The other arguments TEXT-BLOCK, TEXT-ID, TEXT-BEGINS-BLOCK-P are non-nil only if the buffer contains invisible text. TEXT-BLOCK is a string that identifies a single chunk of visible or invisible text of which the current position is a part. For visible portions, its value is "nil". For invisible portions, its value is computed as part of `hfy-invisible-name'. TEXT-ID marks a unique position within a block. It is set to value of `point' at the current buffer position. TEXT-BEGINS-BLOCK-P is a boolean and is non-nil if the current span also begins an invisible portion of text. An implementation can use TEXT-BLOCK, TEXT-ID, TEXT-BEGINS-BLOCK-P to implement fold/unfold-on-mouse-click like behavior. The default handler is `hfy-begin-span'. (defvar hfy-begin-span-handler 'hfy-begin-span (#$ . 48162)) #@186 Handler to end a span of text. The signature of the handler is (lambda () ...). The handler must insert appropriate tags to end a span of text. The default handler is `hfy-end-span'. (defvar hfy-end-span-handler 'hfy-end-span (#$ . 49310)) #@159 Implement the guts of `htmlfontify-buffer'. SRCDIR, if set, is the directory being htmlfontified. FILE, if set, is the file name. (fn &optional SRCDIR FILE) (defalias 'hfy-fontify-buffer #[512 "\203 \306!\262\307\310 \311\211\211\211 \205\312 \205\313 \203C\n\203CeU\2031\211dU\204C\314\"\262\315\316\317#\210\315\320\321#\210\322 \210\323 \262\324 \262\325 \262\326 \210\203]\327!\210\330ed#\210q\210\331ed #\210\311\203\210\203\210\332  \"\210\333  \"\210\334 \210\211\203\211@\211@A\311b\210\335\336\"\206\245\335\337\"\262\340=\203\263 \210\202\f \203\320\f\203\320\211\203\320\341``T\342#\210\343\211T\337\307$\210@\344 \"\n\205\345\345\346\347\"\" \205\353\f\205\365 \236$\210\211\203\f\341``T\350#\203\f\343\211T\337\307$\210\266A\266\202\202\214\210\203\234\203\234\351e\311\211\352\353\"\211\262\203K\335\353\"\211\262\203$b\210\341\211T\354#\210\355\356Qc\210\202$e\262\352\"\211\262\203\232\335\"\211\262\203Nb\210\341\211T\311D#\210\357\267\202N\335\360\"\211\262\203\205\345\361\"c\210\345\362\"c\210\337\262\202N\363c\210\351\262\202N\266\364 \210\365\366!\204\322eb\210\367 \"c\210\365\370!\203\271\371c\210\372c\210db\210\373c\210\365\370!\203\313\374c\210A!c\210\375\376!\210\377\311!\210)\207" [inhibit-read-only mark-active transient-mark-mode hfy-ignored-properties buffer-invisibility-spec hfy-end-span-handler directory-file-name t hfy-buffer nil region-beginning region-end make-overlay overlay-put priority 1000 face region hfy-mark-trailing-whitespace hfy-compile-stylesheet hfy-compile-face-map hfy-find-invisible-ranges hfy-unmark-trailing-whitespace delete-overlay copy-to-buffer remove-list-of-text-properties hfy-mark-tag-names hfy-mark-tag-hrefs hfy-html-enkludge-buffer get-text-property hfy-linkp hfy-endl end remove-text-properties (hfy-endl nil) put-text-property hfy-lookup format "%s" hfy-invisible-name (hfy-endl nil) hfy-link next-single-property-change hfy-anchor (hfy-anchor nil) "" #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (hfy-link 373 hfy-endl 401)) hfy-inst "" "" "" hfy-html-dekludge-buffer hfy-opt body-text-only hfy-sprintf-stylesheet div-wrapper "
" "\n
" "
\n" "
" run-hooks hfy-post-html-hook set-buffer-modified-p hfy-begin-span-handler hfy-page-footer] 21 (#$ . 49559)]) #@210 Take a STRING and return a fontified version of it. It is assumed that STRING has text properties that allow it to be fontified. This is a simple convenience wrapper around `htmlfontify-buffer'. (fn STRING) (defalias 'htmlfontify-string #[257 "\301!\302>\203 \211\202\302B\211\262\303\304!r\211q\210\305\306\307\310\311!\312\"\313$\216c\210\314 \210\315 *\262)\207" [hfy-optimizations copy-sequence skip-refontification generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205 \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 htmlfontify-buffer buffer-string] 9 (#$ . 52065)]) #@59 Try to force font-locking even when it is optimized away. (defalias 'hfy-force-fontification #[0 "\306\307!\210\310\311!\210\312\300!\203\204\313  \2035\314\315\316 \206\"\317 \n#\210\320\321!\203.\321 \207 \2054\322 \207\320\323!\203N\312\304!\203N\f\203N\314\324 \n#\210\323 \207\314\325 \n#\207" [font-lock-cache-position noninteractive major-mode font-lock-defaults jit-lock-mode window-system run-hooks hfy-init-kludge-hook require font-lock boundp make-marker message "hfy batch mode (%s:%S)" buffer-file-name buffer-name fboundp font-lock-ensure font-lock-fontify-buffer jit-lock-fontify-now "hfy jit-lock mode (%S %S)" "hfy interactive mode (%S %S)"] 4 (#$ . 52676)]) #@693 Create a new buffer, named for the current buffer + a .html extension, containing an inline CSS-stylesheet and formatted CSS-markup HTML that reproduces the look of the current Emacs buffer as closely as possible. Dangerous characters in the existing buffer are turned into HTML entities, so you should even be able to do HTML-within-HTML fontified display. You should, however, note that random control or non-ASCII characters such as ^L (U+000C FORM FEED (FF)) or ¤ (U+00A4 CURRENCY SIGN) won't get mapped yet. If the SRCDIR and FILE arguments are set, lookup etags derived entries in the `hfy-tags-cache' and add HTML anchors and hyperlinks as appropriate. (fn &optional SRCDIR FILE) (defalias 'htmlfontify-buffer #[512 "\211\204\300 \206 \301 \262\302\303\"\203\304\305\"\262\306\307!\204%\212\310 \210)\311\312!\2032\313\314\"!\207\314\"\207" [buffer-file-name buffer-name string-match "/\\([^/]*\\)\\'" match-string 1 hfy-opt skip-refontification hfy-force-fontification called-interactively-p any switch-to-buffer hfy-fontify-buffer] 6 (#$ . 53372) nil]) #@101 Return a list of files under DIRECTORY. Strips any leading "./" from each filename. (fn DIRECTORY) (defalias 'hfy-list-files #[257 "\301!\210\302\303\304\305!!\"\207" [hfy-find-cmd cd mapcar #[257 "\300\301\"\203\f\302\303\"\207\207" [string-match "^./\\(.*\\)" match-string 1] 4 "\n\n(fn F)"] split-string shell-command-to-string] 6 (#$ . 54461)]) #@228 Return everything preceding the last "/" from a relative filename FILE, on the assumption that this will produce a relative directory name. Hardly bombproof, but good enough in the context in which it is being used. (fn FILE) (defalias 'hfy-dirname #[257 "\300!\301\302\"\205\303\304\"\207" [directory-file-name string-match "^\\(.*\\)/" match-string 1] 5 (#$ . 54823)]) #@47 Approx. equivalent of mkdir -p DIR. (fn DIR) (defalias 'hfy-make-directory #[257 "\300!\203\301!\205\302\207\303\302\"\207" [file-exists-p file-directory-p t make-directory] 4 (#$ . 55206)]) #@86 Is SRCDIR/FILE text? Uses `hfy-istext-command' to determine this. (fn SRCDIR FILE) (defalias 'hfy-text-p #[514 "\301\302\303\"!\"\304!\305\306\"\207" [hfy-istext-command format shell-quote-argument expand-file-name shell-command-to-string string-match "text"] 8 (#$ . 55411)]) #@234 Open FILE in SRCDIR - if fontified, write a fontified copy to DSTDIR adding an extension of `hfy-extn'. Fontification is actually done by `htmlfontify-buffer'. If the buffer is not fontified, just copy it. (fn SRCDIR DSTDIR FILE) (defalias 'hfy-copy-and-fontify-file #[771 "\301\211\211\302!\210r\303!\211\262q\210\304Q\262\305\306!!\210\307\310!\204&\311 \210\312 \2043\313\"\203J\314\"\262\211q\210\315P!\210\316!\210\202h\317!\211\203_\320!\204_\321\322\323\"\"\210\210\324\325!\326#\210\316!)\207" [hfy-extn nil cd find-file-noselect "/" hfy-make-directory hfy-dirname hfy-opt skip-refontification hfy-force-fontification hfy-fontified-p hfy-text-p hfy-fontify-buffer write-file kill-buffer file-modes file-writable-p set-file-modes logior 128 copy-file buffer-file-name overwrite] 12 (#$ . 55703)]) #@108 List of etags tags that have definitions in this FILE. CACHE-HASH is the tags cache. (fn CACHE-HASH FILE) (defalias 'hfy-tags-for-file #[514 "\300C\203\301\302\303\304\305\306\"\307\"\310\311%\"\210\211\242\207" [nil maphash make-byte-code 514 "\302\300\"\205 \301\301\242B\240\207" vconcat vector [assoc] 5 "\n\n(fn K V)"] 11 (#$ . 56548)]) #@140 Mark tags in FILE (lookup SRCDIR in `hfy-tags-cache') with the `hfy-anchor' property, with a value of "tag.line-number". (fn SRCDIR FILE) (defalias 'hfy-mark-tag-names #[514 "\301\"\211A@\211\205!\302\303\304\305\306\307\"\310\"\311\312%\313\"\"\207" [hfy-tags-cache assoc mapcar make-byte-code 257 "\302\303\304\305\306\307\300\"\310\"\311\312%\313\301\"\"\207" vconcat vector [mapcar make-byte-code 257 "\300@\230\205\211A@AA@\302\303\301#\304T\305\\\306$\266\203\207" vconcat vector [format "%s.%d" put-text-property 2 hfy-anchor] 9 "\n\n(fn TLIST)" gethash] 9 "\n\n(fn TAG)" hfy-tags-for-file] 12 (#$ . 56909)]) #@222 Return a "../" stub of the appropriate length for the current source tree depth, as determined from FILE (a filename). START is the offset at which to start looking for the / character in FILE. (fn FILE &optional START) (defalias 'hfy-relstub #[513 "\300\301\302#\211\262\203T\262\211\303P\262\202\211\207" ["" string-match "/" "../"] 7 (#$ . 57554)]) #@586 Return an href stub for a tag href in THIS-FILE. If DEF-FILES (list of files containing definitions for the tag in question) contains only one entry, the href should link straight to that file. Otherwise, the link should be to the index file. We are not yet concerned with the file extensions/tag line number and so on at this point. If `hfy-split-index' is set, and the href wil be to an index file rather than a source file, append a .X to `hfy-index-file', where X is the uppercased first character of TAG. See also `hfy-relstub', `hfy-index-file'. (fn THIS-FILE DEF-FILES TAG) (defalias 'hfy-href-stub #[771 "\302!G\303U\203@\202 \204 \202 \304\305\306\303#\226QP\207" [hfy-split-index hfy-index-file hfy-relstub 1 "." substring 0] 10 (#$ . 57924)]) #@337 Return a relative href to the tag in question, based on THIS-FILE `hfy-link-extn' `hfy-extn' DEF-FILES TAG and TAG-MAP THIS-FILE is the current source file DEF-FILES is a list of file containing possible link endpoints for TAG TAG is the tag in question TAG-MAP is the entry in `hfy-tags-cache'. (fn THIS-FILE DEF-FILES TAG TAG-MAP) (defalias 'hfy-href #[1028 "\302#\206\n \303G\304U\205\"\305\306\307\310\n@ \"A@\"P\260\207" [hfy-link-extn hfy-extn hfy-href-stub "#" 1 "." format "%d" assoc] 14 (#$ . 58701)]) #@119 Return a regex that matches STRING as the first `match-string', with non word characters on either side. (fn STRING) (defalias 'hfy-word-regex #[257 "\300\301!\302Q\207" ["[^$A-Za-z_0-9]\\(" regexp-quote "\\)[^A-Za-z_0-9]"] 4 (#$ . 59234)]) #@389 Mark href start points with the `hfy-link' prop (value: href string). Mark href end points with the `hfy-endl' prop (value t). Avoid overlapping links, and mark links in descending length of tag name in order to prevent subtags from usurping supertags, (eg "term" for "terminal"). SRCDIR is the directory being "published". FILE is the specific file we are rendering. (fn SRCDIR FILE) (defalias 'hfy-mark-tag-hrefs #[514 "\304\"\304 \"\304\n\"\305\306!\305\307!\310C\310\211C\310A@\240\205M\211A@\240\205MA@\211\262\205M\311\312\313\314\315\316   \n%\317\"\320\321%\")\207" [hfy-tags-cache hfy-tags-sortl hfy-tags-rmap case-fold-search assoc hfy-opt zap-comment-links zap-string-links nil mapcar make-byte-code 257 "\306\211\211\211\211\306\211\211\211\211\211\307 !\310\f\303\242\"\311\312\"eb\210\313\306\314#\205\340`\262 \315\224S\262b\210\316!\203\331\317\224\262 \317\225\262\f\301\204H\302\205L\320 !\262<\203\\\321>A@\262\322  T\323\324$\204\331\301\203s\325=\204\331\302\203~\326=\204\331\327 \262\310\304\242\"\262\300E\262B\262\330\331#\262\n\332 \211T\333 $\210\334\304\242#\210\335\300$\262 \332 \211T\336$\210\332\f\211T\337\324$\210\332  T\323\324$\210b\210\202)\207" vconcat vector [case-fold-search nil hfy-word-regex gethash mapcar car search-forward NOERROR 0 looking-at 1 hfy-face-at :inherit text-property-any hfy-linkp t font-lock-comment-face font-lock-string-face line-number-at-pos format "%s.%d" put-text-property hfy-inst puthash hfy-href hfy-link hfy-endl] 19 "\n\n(fn TAG)"] 21 (#$ . 59484)]) #@69 Return `shell-file-name', or "/bin/sh" if it is a non-Bourne shell. (defalias 'hfy-shell #[0 "\302\303\"\203 \207 \206\304\207" [shell-file-name hfy-shell-file-name string-match "\\\\|\\\\|\\" "/bin/sh"] 3 (#$ . 61107)]) #@80 Run `hfy-etags-cmd' on SRCDIR, then call `hfy-parse-tags-buffer'. (fn SRCDIR) (defalias 'hfy-load-tags-cache #[257 "\303\304!\305 \"\306 \307!\210\310\"\210\311\")\207" [hfy-etags-cmd hfy-etags-bin shell-file-name get-buffer-create "*hfy-tags*" format hfy-shell cd shell-command hfy-parse-tags-buffer] 6 (#$ . 61361)]) #@141 Parse a BUFFER containing etags formatted output, loading the `hfy-tags-cache' and `hfy-tags-sortl' entries for SRCDIR. (fn SRCDIR BUFFER) (defalias 'hfy-parse-tags-buffer #[514 "\304\"\304 \"\304\n\"\305\211\211C\305\211\211\211\211\211 \203$ A@\262\2022\306\307\310\"\262 D\nD\311!\210 \203E A@\262 \202S\306\307\310\"\262   DD\311 !\210r\fq\210eb\210\312\313!\203\310\314y\315U\203\310\312\316!\203`\314y\315U\203`\317\314!\262\312 !\203`\314y\315U\203`\317\314!\262G\315U\204\320\321\317\322!!!\262\320\321\317\323!!!\262\324\n\"\262\211E\262B\262\325 #\210\202)\326\327\330\331\332\333\f!\334\"\335\336%\n\"\210\337\242\340\"\240\210\n\203\365\nA\242\240\210\202\376 \242D B\242G\207" [hfy-tags-cache hfy-tags-sortl hfy-tags-rmap hfy-etag-regex assoc nil make-hash-table :test equal clrhash looking-at "^\f" 1 0 "^\\(.+\\),\\([0-9]+\\)$" match-string round string-to-number 2 3 gethash puthash maphash make-byte-code 514 "\300\300\242B\240\207" vconcat vector #1=[] 5 "\n\n(fn K V)" sort #[514 "\211GGW\207" #1# 4 "\n\n(fn A B)"]] 21 (#$ . 61695)]) #@525 Prepare a tags index buffer for SRCDIR. `hfy-tags-cache' must already have an entry for SRCDIR for this to work. `hfy-page-header', `hfy-page-footer', `hfy-link-extn' and `hfy-extn' all play a part here. If STUB is set, prepare an (appropriately named) index buffer specifically for entries beginning with STUB. If MAP is set, use that instead of `hfy-tags-cache'. FILENAME is the name of the file being indexed. DSTDIR is the output directory, where files will be written. (fn SRCDIR DSTDIR FILENAME &optional STUB MAP) (defalias 'hfy-prepare-index-i #[1283 "\305\206\"\306\211C\203\307P\202\310 Q\306\205\333A@\211\262\205\333\311!\211\262\205\333\312\313\314\315\316\317!\320\"\321\322%\"\210\323\242\324\"\240\210\211q\210\325 \210\n\326\"c\210\327c\210\242\211\203\302\211@\306\330\"\211\203\271\211@ \203}\331\332 P\"\203\262\211@A@\333\334\230\203\220\335\202\226\333\336 \211# \206\234 \211 \206\244   \211&\nc\210\262\266A\266\202\202h\266A\266\202\202\\\210\337c\210\f!c\210\203\326\340 !\210\341!\210\211\207" [hfy-tags-cache hfy-extn hfy-page-header hfy-link-extn hfy-page-footer assoc nil "." "" get-buffer-create maphash make-byte-code 514 "\300\300\242B\240\207" vconcat vector [] 5 "\n\n(fn K V)" sort string< erase-buffer "" "\n" gethash string-match "^" format " \n \n \n \n \n" " " "%s" "
%s%s%d
\n" cd set-visited-file-name] 28 (#$ . 62832)]) #@161 Return a list of index buffer(s), as determined by `hfy-split-index'. SRCDIR and DSTDIR are the source and output directories respectively. (fn SRCDIR DSTDIR) (defalias 'hfy-prepare-index #[514 "\204\f\303 \304$C\207\304C\304\211C\305\n\"\211\2039\211A@\211\262\2039\306\307\310\311\312\313   \n$\314\"\315\316%\"\210\242\207" [hfy-split-index hfy-index-file hfy-tags-cache hfy-prepare-index-i nil assoc maphash make-byte-code 514 "\305\306\307#\226\211\302\242\235?\205 \302\302\242B\240\210\303\310\300\301\f$\303\242B\240\207" vconcat vector [hfy-index-file substring 0 1 hfy-prepare-index-i] 9 "\n\n(fn K V)"] 16 (#$ . 64534)]) #@318 Prepare the counterpart(s) to the index buffer(s) - a list of buffers with the same structure, but listing (and linking to) instances of tags (as opposed to their definitions). SRCDIR and DSTDIR are the source and output directories respectively. See also `hfy-prepare-index', `hfy-split-index'. (fn SRCDIR DSTDIR) (defalias 'hfy-prepare-tag-map #[514 "\204 \303 \304\n%C\207\304C\304\211C\305\n\"\211\203:\211A@\211\262\203:\306\307\310\311\312\313   \n$\314\"\315\316%\"\210\242\207" [hfy-split-index hfy-instance-file hfy-tags-rmap hfy-prepare-index-i nil assoc maphash make-byte-code 514 "\306\307\310#\226\211\302\242\235?\205!\302\302\242B\240\210\303\311\300\301\f %\303\242B\240\207" vconcat vector [hfy-instance-file hfy-tags-rmap substring 0 1 hfy-prepare-index-i] 10 "\n\n(fn K V)"] 16 (#$ . 65192)]) #@171 Internal function - strips definitions of tags from the instance map. SRCDIR is the directory being "published". See also `hfy-tags-cache', `hfy-tags-rmap'. (fn SRCDIR) (defalias 'hfy-subtract-maps #[257 "\303\211\211\211\304\"A@\304 \"A@\304\n\"A@\211\211\205g\211@\305\"\262\305\"\262\306\307\"\262\303\262 \211\203W\211@\211@A@D\235\204P\211 B\262 A\266\202\2028\210\310\n#\210A\266\202\202\262\207" [hfy-tags-cache hfy-tags-rmap hfy-tags-sortl nil assoc gethash mapcar #[257 "\211@A@D\207" [] 3 "\n\n(fn P)"] puthash] 14 (#$ . 66031)]) #@79 Load the etags cache for SRCDIR. See also `hfy-load-tags-cache'. (fn SRCDIR) (defalias 'htmlfontify-run-etags #[257 "\300\301!!\207" [hfy-load-tags-cache directory-file-name] 4 (#$ . 66614) "D source directory: "]) #@37 (fn BUFFER-LIST &optional DSTDIR) (defalias 'hfy-save-kill-buffers #[513 "\211\205&\211@\211q\210\203\300!\203\301!\210\302 \210\303!\210A\266\202\202\207" [file-directory-p cd save-buffer kill-buffer] 6 (#$ . 66837)]) #@244 Trawl SRCDIR and write fontified-and-hyperlinked output in DSTDIR. F-EXT and L-EXT specify values for `hfy-extn' and `hfy-link-extn'. You may also want to set `hfy-page-header' and `hfy-page-footer'. (fn SRCDIR DSTDIR &optional F-EXT L-EXT) (defalias 'htmlfontify-copy-and-link-dir #[1026 "\303!\262\303!\262\304\305\"\206\306\206\306\211\204/\307\310!\210\311!\210\305\"\262\312A@!\210\313!\210\314!\262\211\203U\211@\315#\210A\266\202\202@\210\316!\210\317\320\"\"\210\317\321\"\"*\207" [hfy-tags-rmap hfy-link-extn hfy-extn directory-file-name "SETME: list of source files, relative to srcdir" assoc ".html" message "autoload of tags cache" hfy-load-tags-cache clrhash hfy-make-directory hfy-list-files hfy-copy-and-fontify-file hfy-subtract-maps hfy-save-kill-buffers hfy-prepare-index hfy-prepare-tag-map] 12 (#$ . 67078) "D source directory: \nD output directory: "]) #@76 Return the expected location of the htmlfontify specific init/custom file. (defalias 'hfy-initfile #[0 "\300\301!\206\302\303\304\"\207" [getenv "HFY_INITFILE" ".hfy.el" expand-file-name "~"] 4 (#$ . 68009)]) (defalias 'hfy-init-progn 'progn) #@12 (fn SYM) (defalias 'hfy-save-initvar #[257 "\300\301\302\"!\210\303J!\210\300\304!\207" [princ format "(setq %s\n '" pp ")\n"] 5 (#$ . 68261)]) #@61 Save the htmlfontify settings to the htmlfontify init file. (defalias 'htmlfontify-save-initfile #[0 "\302\303 \304\305\"\212\306\307!\210`\262\310\311!\210\312\313\314\"\210\310\315!\210\316`\302#\210)\317 *\207" [custom-file standard-output nil hfy-initfile find-file-noselect nowarn custom-save-delete hfy-init-progn princ "(hfy-init-progn\n;;auto-generated, only one copy allowed\n" mapc hfy-save-initvar (auto-mode-alist interpreter-mode-alist) ")\n" indent-region custom-save-all] 5 (#$ . 68415) nil]) #@49 Load the htmlfontify specific init/custom file. (defalias 'htmlfontify-load-initfile #[0 "\300 \301\302\303\211$\207" [hfy-initfile load NOERROR nil] 6 (#$ . 68934) nil]) (provide 'htmlfontify)