summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2022-08-03 21:50:40 -0700
committerSean Whitton <spwhitton@spwhitton.name>2022-08-05 11:38:04 -0700
commitbbd93876455bfea94d456bff88da8b4ad6bf0ae1 (patch)
treea72c2aeec883e8a4a7eae07b38a808b87ef48983
parent92f40ef00c636e3d34cc4eda0d247d8f4a657830 (diff)
downloaddotfiles-bbd93876455bfea94d456bff88da8b4ad6bf0ae1.tar.gz
fixed pitch for Howm goto and come-from links
-rw-r--r--.emacs.d/init.el16
1 files 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)))