all repos — archive/dotfiles @ ba995d986b533881c949ba4035e35fe36fe4eeb8

Superseded by nixfiles

Emacs: Fix display of page break lines adaptively
Alan Pearce alan@alanpearce.co.uk
Sat, 09 Jul 2016 22:54:01 +0200
commit

ba995d986b533881c949ba4035e35fe36fe4eeb8

parent

21aabc84a4e10509cf1a5ce94142684ab991c47a

1 files changed, 9 insertions(+), 1 deletions(-)

jump to
M tag-emacs/emacs.d/init.orgtag-emacs/emacs.d/init.org
@@ -242,12 +242,20 @@ ** 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