summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2016-07-09 22:54:01 +0200
committerAlan Pearce2016-07-09 22:54:01 +0200
commitba995d986b533881c949ba4035e35fe36fe4eeb8 (patch)
tree878e3d6320f15eaed818182a8992bf8bccce765b
parent21aabc84a4e10509cf1a5ce94142684ab991c47a (diff)
downloaddotfiles-ba995d986b533881c949ba4035e35fe36fe4eeb8.tar.lz
dotfiles-ba995d986b533881c949ba4035e35fe36fe4eeb8.tar.zst
dotfiles-ba995d986b533881c949ba4035e35fe36fe4eeb8.zip
Emacs: Fix display of page break lines adaptively
-rw-r--r--tag-emacs/emacs.d/init.org10
1 files changed, 9 insertions, 1 deletions
diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org
index 8427a77..13f42bf 100644
--- a/tag-emacs/emacs.d/init.org
+++ b/tag-emacs/emacs.d/init.org
@@ -242,12 +242,20 @@ on the right things.
 ** Page Breaks
 
 By default, Emacs displays page breaks as ^L.  Lines look much nicer.
+On Windows, Emacs incorrectly detects that U+2500 (Box Drawings Light
+Horizontal) can only be displayed with a different font, which is not
+correct, at least for Liberation Mono.
 
 #+BEGIN_SRC emacs-lisp
   (use-package page-break-lines
     :defer 5
     :diminish page-break-lines-mode
-    :config (global-page-break-lines-mode))
+    :config (progn
+              (global-page-break-lines-mode)
+              (unless (eq (char-displayable-p ?─) (char-displayable-p ?a))
+                (set-fontset-font "fontset-default"
+                                  (cons page-break-lines-char page-break-lines-char)
+                                  (face-attribute 'default :family)))))
 #+END_SRC
 ** Modeline