Skip to content

Commit

Permalink
Better markdown-header-face fix
Browse files Browse the repository at this point in the history
Fixes a bug introduced in d587180.

Closes #193.
  • Loading branch information
jrblevin committed May 16, 2017
1 parent da6f82a commit d07621b
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions markdown-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -2183,12 +2183,13 @@ Used when `markdown-header-scaling' is non-nil."

(defun markdown-make-header-faces ()
"Build the faces used for Markdown headers."
(defface markdown-header-face
`((t (:inherit (,@(when markdown-header-scaling 'variable-pitch)
font-lock-function-name-face)
:weight bold)))
"Base face for headers."
:group 'markdown-faces)
(let ((inherit-faces '(font-lock-function-name-face)))
(when markdown-header-scaling
(setq inherit-faces (cons 'variable-pitch inherit-faces)))
(defface markdown-header-face
`((t (:inherit ,inherit-faces :weight bold)))
"Base face for headers."
:group 'markdown-faces))
(dotimes (num 6)
(let* ((num1 (1+ num))
(face-name (intern (format "markdown-header-face-%s" num1)))
Expand Down

0 comments on commit d07621b

Please sign in to comment.