Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
cb79b8c0
Commit
cb79b8c0
authored
Apr 30, 2011
by
Vinicius Jose Latorre
Browse files
keep highlight when switching between major modes on a file.
parent
8db90b73
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
lisp/ChangeLog
lisp/ChangeLog
+9
-0
lisp/whitespace.el
lisp/whitespace.el
+6
-1
No files found.
lisp/ChangeLog
View file @
cb79b8c0
...
...
@@ -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)
...
...
lisp/whitespace.el
View file @
cb79b8c0
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment