X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?p=elpher.git;a=blobdiff_plain;f=elpher.el;h=e3cf717371a73276a2cf6d425cd6e04c7cc7850a;hp=b7b64551fe7edfd66023d1fc074bf296d8aa5884;hb=af7102e6c6128a48eccf1bd1d6ba6a0aa8adedcf;hpb=0a8f12b108948d244e3247ab6119f027390c3869 diff --git a/elpher.el b/elpher.el index b7b6455..e3cf717 100644 --- a/elpher.el +++ b/elpher.el @@ -92,13 +92,13 @@ (lambda (s) (let ((_xterm-color-render nil)) (xterm-color-filter s))) - 'ansi-color-filter-apply) + #'ansi-color-filter-apply) "A function to filter out ANSI escape sequences.") (defalias 'elpher-color-apply (if (fboundp 'xterm-color-filter) - 'xterm-color-filter - 'ansi-color-apply) + #'xterm-color-filter + #'ansi-color-apply) "A function to apply ANSI escape sequences.") ;;; Global constants @@ -134,14 +134,6 @@ "Association list from types to getters, renderers, margin codes and index faces.") -;;; Internal variables -;; - -;; buffer-local -(defvar elpher--gemini-page-headings nil - "List of headings on the page.") - - ;;; Declarations to avoid compiler warnings. ;; @@ -608,7 +600,8 @@ previously-visited pages,unless NO-HISTORY is non-nil." (unless (eq major-mode 'elpher-mode) ;; avoid resetting buffer-local variables (elpher-mode)) - (let ((inhibit-read-only t)) + (let ((inhibit-read-only t) + (ansi-color-context nil)) ;; clean ansi interpreter state (setq-local network-security-level (default-value 'network-security-level)) (erase-buffer) @@ -1465,6 +1458,10 @@ treatment that a separate function is warranted." (insert (propertize display-string 'face 'elpher-unknown))) (insert "\n")))) +;; buffer-local +(defvar elpher--gemini-page-headings nil + "List of headings on the page.") + (defun elpher-gemini-insert-header (header-line) "Insert header described by HEADER-LINE into a text/gemini document. The gemini map file line describing the header is given