aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinicius Jose Latorre2011-04-30 12:15:07 -0300
committerVinicius Jose Latorre2011-04-30 12:15:07 -0300
commitcb79b8c0517a92f93539db030db694b293fd8706 (patch)
treebcfa6f643cbb42b61c0a185595595c7d62eb028e
parent8db90b73941f09a17c41069828c64b91eca790d6 (diff)
downloademacs-cb79b8c0517a92f93539db030db694b293fd8706.tar.gz
emacs-cb79b8c0517a92f93539db030db694b293fd8706.zip
keep highlight when switching between major modes on a file.
-rw-r--r--lisp/ChangeLog9
-rw-r--r--lisp/whitespace.el7
2 files changed, 15 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 0817515d8cd..71c7eedb335 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -485,6 +485,15 @@
485 Use the longitude argument rather than `calendar-longitude'. 485 Use the longitude argument rather than `calendar-longitude'.
486 (solar-date-next-longitude): Remove unused locals. 486 (solar-date-next-longitude): Remove unused locals.
487 487
4882011-04-20 Vinicius Jose Latorre <viniciusjl@ig.com.br>
489
490 * whitespace.el: New version 13.2.1.
491
4922011-04-20 felix <EmacsWiki> (tiny change)
493
494 * whitespace.el (global-whitespace-mode): keep highlight when
495 switching between major modes on a file.
496
4882011-04-19 Stefan Monnier <monnier@iro.umontreal.ca> 4972011-04-19 Stefan Monnier <monnier@iro.umontreal.ca>
489 498
490 * progmodes/octave-mod.el (octave-in-comment-p, octave-in-string-p) 499 * progmodes/octave-mod.el (octave-in-comment-p, octave-in-string-p)
diff --git a/lisp/whitespace.el b/lisp/whitespace.el
index 955c417ee54..f5788eb1ee2 100644
--- a/lisp/whitespace.el
+++ b/lisp/whitespace.el
@@ -5,7 +5,7 @@
5;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> 5;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br>
6;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> 6;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br>
7;; Keywords: data, wp 7;; Keywords: data, wp
8;; Version: 13.2 8;; Version: 13.2.1
9;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre 9;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre
10 10
11;; This file is part of GNU Emacs. 11;; This file is part of GNU Emacs.
@@ -312,6 +312,9 @@
312;; Acknowledgements 312;; Acknowledgements
313;; ---------------- 313;; ----------------
314;; 314;;
315;; Thanks to felix (EmacsWiki) for keeping highlight when switching between
316;; major modes on a file.
317;;
315;; Thanks to David Reitter <david.reitter@gmail.com> for suggesting a 318;; Thanks to David Reitter <david.reitter@gmail.com> for suggesting a
316;; `whitespace-newline' initialization with low contrast relative to 319;; `whitespace-newline' initialization with low contrast relative to
317;; the background color. 320;; the background color.
@@ -1132,6 +1135,7 @@ See also `whitespace-style', `whitespace-newline' and
1132 (global-whitespace-mode ; global-whitespace-mode on 1135 (global-whitespace-mode ; global-whitespace-mode on
1133 (save-excursion 1136 (save-excursion
1134 (add-hook 'find-file-hook 'whitespace-turn-on-if-enabled) 1137 (add-hook 'find-file-hook 'whitespace-turn-on-if-enabled)
1138 (add-hook 'after-change-major-mode-hook 'whitespace-turn-on-if-enabled)
1135 (dolist (buffer (buffer-list)) ; adjust all local mode 1139 (dolist (buffer (buffer-list)) ; adjust all local mode
1136 (set-buffer buffer) 1140 (set-buffer buffer)
1137 (unless whitespace-mode 1141 (unless whitespace-mode
@@ -1139,6 +1143,7 @@ See also `whitespace-style', `whitespace-newline' and
1139 (t ; global-whitespace-mode off 1143 (t ; global-whitespace-mode off
1140 (save-excursion 1144 (save-excursion
1141 (remove-hook 'find-file-hook 'whitespace-turn-on-if-enabled) 1145 (remove-hook 'find-file-hook 'whitespace-turn-on-if-enabled)
1146 (remove-hook 'after-change-major-mode-hook 'whitespace-turn-on-if-enabled)
1142 (dolist (buffer (buffer-list)) ; adjust all local mode 1147 (dolist (buffer (buffer-list)) ; adjust all local mode
1143 (set-buffer buffer) 1148 (set-buffer buffer)
1144 (unless whitespace-mode 1149 (unless whitespace-mode