[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#13875: 24.3.50; whitespace-mode should use 'prepend for whitespace-l

From: Dmitry Gutov
Subject: bug#13875: 24.3.50; whitespace-mode should use 'prepend for whitespace-line face
Date: Tue, 05 Mar 2013 20:36:21 +0400

Tags: patch

Right now, there's no way to tell whitespace-mode to keep the foreground
color of the underlying text when highlighting lines that are too long.

Related SO question:

With the patch at the bottom applied, the following code will make it
keep the text's foreground and just change background:

  (set-face-attribute 'whitespace-line nil :foreground nil
                                           :background "gainsboro")

(Changing :backround is not necessary, but gray20 looks bad with the
default foreground color.)

=== modified file 'lisp/whitespace.el'
--- lisp/whitespace.el  2013-01-11 23:08:55 +0000
+++ lisp/whitespace.el  2013-03-05 16:25:51 +0000
@@ -2291,7 +2291,7 @@
         (if (memq 'lines whitespace-active-style)
             0                          ; whole line
           2)                           ; line tail
-        whitespace-line t))
+        whitespace-line 'prepend))
      ((memq 'space-before-tab whitespace-active-style)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]