Browse files

Merge pull request #6 from dgutov/trailing-whitespace

Make trailing-whitespace an alias for ethan-wspace-face
  • Loading branch information...
Ethan Glasser-Camp
Ethan Glasser-Camp committed Apr 30, 2012
2 parents f62930e + 258c0b1 commit be6b06e446f1b05b00f0320d8451ee536b01255c
Showing with 2 additions and 9 deletions.
  1. +2 −9 lisp/ethan-wspace.el
@@ -630,7 +630,6 @@ Typically looks like: \"ew:tLNm\".")
(setq ethan-wspace-against-background bg)
(list :background hex)))
-;; FIXME: some way to keep trailing-whitespace in sync with this?
(defvar ethan-wspace-against-background nil
"The last background we used to compute ethan-wspace-face.")
@@ -656,12 +655,7 @@ user knows best."
;; show-trailing-whitespace uses the face `trailing-whitespace', so we
;; make this mirror `ethan-wspace-face'.
-;(copy-face 'ethan-wspace-face 'trailing-whitespace)
-(defun ethan-wspace-face-updated ()
- (let ((attribs (list (list t (face-attr-construct 'ethan-wspace-face)))))
- (face-spec-set 'trailing-whitespace attribs nil)))
+(put 'trailing-whitespace 'face-alias 'ethan-wspace-face)
(defun ethan-wspace-update-face (&optional frame)
;(message "Computing face %S %s %S" frame (frame-parameter frame 'name) (frame-parameters frame))
@@ -671,8 +665,7 @@ user knows best."
(eq ethan-wspace-against-background
(aget (frame-parameters frame) 'background-color)))
;(message "updating face for frame %s : was %S, now %S" frame ethan-wspace-against-background (aget (frame-parameters frame) 'background-color))
- (face-spec-set 'ethan-wspace-face (list (list t (ethan-wspace-appropriate-face frame))))
- (ethan-wspace-face-updated)))
+ (face-spec-set 'ethan-wspace-face (list (list t (ethan-wspace-appropriate-face frame))))))
(add-hook 'window-configuration-change-hook 'ethan-wspace-update-face)

0 comments on commit be6b06e

Please sign in to comment.