diff options
Diffstat (limited to 'lisp/whitespace.el')
| -rw-r--r-- | lisp/whitespace.el | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/lisp/whitespace.el b/lisp/whitespace.el index c0d9280a441..a119793c3a9 100644 --- a/lisp/whitespace.el +++ b/lisp/whitespace.el | |||
| @@ -307,8 +307,8 @@ To disable timer scans, set this to zero." | |||
| 307 | :group 'whitespace) | 307 | :group 'whitespace) |
| 308 | 308 | ||
| 309 | (defcustom whitespace-display-spaces-in-color t | 309 | (defcustom whitespace-display-spaces-in-color t |
| 310 | "Display the bogus whitespaces by coloring them with | 310 | "Display the bogus whitespaces by coloring them with the face |
| 311 | `whitespace-highlight-face'." | 311 | `whitespace-highlight'." |
| 312 | :type 'boolean | 312 | :type 'boolean |
| 313 | :group 'whitespace) | 313 | :group 'whitespace) |
| 314 | 314 | ||
| @@ -318,18 +318,20 @@ To disable timer scans, set this to zero." | |||
| 318 | :group 'whitespace | 318 | :group 'whitespace |
| 319 | :group 'faces) | 319 | :group 'faces) |
| 320 | 320 | ||
| 321 | (defface whitespace-highlight-face '((((class color) (background light)) | 321 | (defface whitespace-highlight '((((class color) (background light)) |
| 322 | (:background "green1")) | 322 | (:background "green1")) |
| 323 | (((class color) (background dark)) | 323 | (((class color) (background dark)) |
| 324 | (:background "sea green")) | 324 | (:background "sea green")) |
| 325 | (((class grayscale mono) | 325 | (((class grayscale mono) |
| 326 | (background light)) | 326 | (background light)) |
| 327 | (:background "black")) | 327 | (:background "black")) |
| 328 | (((class grayscale mono) | 328 | (((class grayscale mono) |
| 329 | (background dark)) | 329 | (background dark)) |
| 330 | (:background "white"))) | 330 | (:background "white"))) |
| 331 | "Face used for highlighting the bogus whitespaces that exist in the buffer." | 331 | "Face used for highlighting the bogus whitespaces that exist in the buffer." |
| 332 | :group 'whitespace-faces) | 332 | :group 'whitespace-faces) |
| 333 | ;; backward-compatibility alias | ||
| 334 | (put 'whitespace-highlight-face 'face-alias 'whitespace-highlight) | ||
| 333 | 335 | ||
| 334 | (if (not (assoc 'whitespace-mode minor-mode-alist)) | 336 | (if (not (assoc 'whitespace-mode minor-mode-alist)) |
| 335 | (setq minor-mode-alist (cons '(whitespace-mode whitespace-mode-line) | 337 | (setq minor-mode-alist (cons '(whitespace-mode whitespace-mode-line) |
| @@ -734,7 +736,7 @@ Also with whitespaces whose testing has been turned off." | |||
| 734 | (if whitespace-display-spaces-in-color | 736 | (if whitespace-display-spaces-in-color |
| 735 | (let ((ol (whitespace-make-overlay b e))) | 737 | (let ((ol (whitespace-make-overlay b e))) |
| 736 | (push ol whitespace-highlighted-space) | 738 | (push ol whitespace-highlighted-space) |
| 737 | (whitespace-overlay-put ol 'face 'whitespace-highlight-face)))) | 739 | (whitespace-overlay-put ol 'face 'whitespace-highlight)))) |
| 738 | ;; (add-hook 'pre-command-hook 'whitespace-unhighlight-the-space)) | 740 | ;; (add-hook 'pre-command-hook 'whitespace-unhighlight-the-space)) |
| 739 | 741 | ||
| 740 | (defun whitespace-unhighlight-the-space() | 742 | (defun whitespace-unhighlight-the-space() |