From bbd93876455bfea94d456bff88da8b4ad6bf0ae1 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Wed, 3 Aug 2022 21:50:40 -0700 Subject: fixed pitch for Howm goto and come-from links --- .emacs.d/init.el | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index b6456b21..94f74e41 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -3785,17 +3785,25 @@ before uploading to NEW again." \n \n ;; C-M-e, so for consistency, put `org-mark-element' on C-M-h (define-key org-mode-map (kbd "C-M-h") #'org-mark-element) - ;; Variable pitch default font without causing misalignment. Regexp to - ;; achieve this derived from Göktuğ Kayaalp's org-variable-pitch.el. (font-lock-add-keywords - 'org-mode `((,(rx bol (or (: (0+ blank) + 'org-mode `(;; Variable pitch default font without causing misalignment. + ;; Regexp derived from Göktuğ Kayaalp's org-variable-pitch.el. + (,(rx bol (or (: (0+ blank) (or (: (or (+ digit) letter) (in ".)")) (: (or (in "-+") (1+ blank "*")) (opt blank "[" (in "-X ") "]"))) blank) (1+ blank) (: (1+ "*") blank))) - 0 '(face (:inherit fixed-pitch)) prepend)) + 0 '(face (:inherit fixed-pitch)) prepend) + + ;; Howm goto and come-from links. + ;; There is `howm-mode-keyword-face' to customise but it + ;; doesn't extend to the text of the link. + (,(rx (: (or ">>>" "<<<") blank (0+ not-newline))) + 0 `(face (:inherit fixed-pitch + :height ,(face-attribute 'default :height))) + prepend)) t) (add-hook 'org-mode-hook (lambda () (face-remap-add-relative 'default 'variable-pitch))) -- cgit v1.2.3