(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
"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.
;;
(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)
(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