Commit cb79b8c0 authored by Vinicius Jose Latorre's avatar Vinicius Jose Latorre
Browse files

keep highlight when switching between major modes on a file.

parent 8db90b73
......@@ -485,6 +485,15 @@
Use the longitude argument rather than `calendar-longitude'.
(solar-date-next-longitude): Remove unused locals.
2011-04-20 Vinicius Jose Latorre <viniciusjl@ig.com.br>
* whitespace.el: New version 13.2.1.
2011-04-20 felix <EmacsWiki> (tiny change)
* whitespace.el (global-whitespace-mode): keep highlight when
switching between major modes on a file.
2011-04-19 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/octave-mod.el (octave-in-comment-p, octave-in-string-p)
......
......@@ -5,7 +5,7 @@
;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br>
;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br>
;; Keywords: data, wp
;; Version: 13.2
;; Version: 13.2.1
;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre
;; This file is part of GNU Emacs.
......@@ -312,6 +312,9 @@
;; Acknowledgements
;; ----------------
;;
;; Thanks to felix (EmacsWiki) for keeping highlight when switching between
;; major modes on a file.
;;
;; Thanks to David Reitter <david.reitter@gmail.com> for suggesting a
;; `whitespace-newline' initialization with low contrast relative to
;; the background color.
......@@ -1132,6 +1135,7 @@ See also `whitespace-style', `whitespace-newline' and
(global-whitespace-mode ; global-whitespace-mode on
(save-excursion
(add-hook 'find-file-hook 'whitespace-turn-on-if-enabled)
(add-hook 'after-change-major-mode-hook 'whitespace-turn-on-if-enabled)
(dolist (buffer (buffer-list)) ; adjust all local mode
(set-buffer buffer)
(unless whitespace-mode
......@@ -1139,6 +1143,7 @@ See also `whitespace-style', `whitespace-newline' and
(t ; global-whitespace-mode off
(save-excursion
(remove-hook 'find-file-hook 'whitespace-turn-on-if-enabled)
(remove-hook 'after-change-major-mode-hook 'whitespace-turn-on-if-enabled)
(dolist (buffer (buffer-list)) ; adjust all local mode
(set-buffer buffer)
(unless whitespace-mode
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment