chiark / gitweb /
el/dot-emacs.el: Fix fontification in printouts.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 20 May 2021 17:40:59 +0000 (18:40 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 20 May 2021 17:40:59 +0000 (18:40 +0100)
el/dot-emacs.el

index 5a4923b71e9d83e61f7f8ab67b2286d1ee08c28e..1782095422ac5e2d3191e96126b321f5ff192d30 100644 (file)
@@ -1377,6 +1377,18 @@ (setq ps-user-defined-prologue "
 (eval-after-load 'ps-print
   '(progn
 
+     ;; Notice that the comment-delimiters should be in italics too.
+     (pushnew 'font-lock-comment-delimiter-face ps-italic-faces)
+
+     ;; Select more suitable colours for the main kinds of tokens.  The
+     ;; colours set on the Emacs faces are chosen for use against a dark
+     ;; background, and work very badly on white paper.
+     (ps-extend-face '(font-lock-comment-face "darkgreen" nil italic))
+     (ps-extend-face '(font-lock-comment-delimiter-face "darkgreen" nil italic))
+     (ps-extend-face '(font-lock-string-face "RoyalBlue4" nil))
+     (ps-extend-face '(mdw-punct-face "sienna" nil))
+     (ps-extend-face '(mdw-number-face "OrangeRed3" nil))
+
      ;; Teach `ps-print' about my condensed varsions of Courier.
      (setq ps-font-info-database
             (append '((CourierCondensed