From: Étienne Deparis Date: Mon, 7 Dec 2020 17:38:08 +0000 (+0100) Subject: Avoid a crash when displaying page in Emacs without X support X-Git-Tag: v3.0.0~22^2~44^2 X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=commitdiff_plain;h=0a8421b4f0a0b68d5eb1d91518bbef77ee71ab04;p=elpher.git Avoid a crash when displaying page in Emacs without X support --- diff --git a/elpher.el b/elpher.el index 4c34f52..d14c5de 100644 --- a/elpher.el +++ b/elpher.el @@ -1367,14 +1367,11 @@ by HEADER-LINE." (when (string-match "^\\(#+\\)[ \t]*" header-line) (let* ((level (length (match-string 1 header-line))) (header (substring header-line (match-end 0))) - (face (pcase level + (face (pcase level (1 'elpher-gemini-heading1) (2 'elpher-gemini-heading2) (3 'elpher-gemini-heading3) - (_ 'default))) - (fill-column (/ (* fill-column - (font-get (font-spec :name (face-font 'default)) :size)) - (font-get (font-spec :name (face-font face)) :size)))) + (_ 'default)))) (unless (display-graphic-p) (insert (make-string level ?#) " ")) (insert (propertize header 'face face))