aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinicius Jose Latorre2008-07-24 04:12:27 +0000
committerVinicius Jose Latorre2008-07-24 04:12:27 +0000
commit8b40bb55873806a68ea74c774c7e067114355341 (patch)
treec450c03956ea5f53087cc5c4fb2db2108db61e8a
parent2f56f788e1e3a6328aa2d1ae09c7a1a59d9329c8 (diff)
downloademacs-8b40bb55873806a68ea74c774c7e067114355341.tar.gz
emacs-8b40bb55873806a68ea74c774c7e067114355341.zip
New newline minor mode visualization.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/whitespace.el48
2 files changed, 53 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 034cbb8e33e..4739b539479 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12008-07-24 Vinicius Jose Latorre <viniciusjl@ig.com.br>
2
3 * whitespace.el: New version 11.2.
4 (whitespace-newline-mode, global-whitespace-newline-mode): New newline
5 minor mode visualization.
6
12008-07-24 Dan Nicolaescu <dann@ics.uci.edu> 72008-07-24 Dan Nicolaescu <dann@ics.uci.edu>
2 8
3 * progmodes/cc-mode.el (auto-mode-alist): Add .i and .ii files. 9 * progmodes/cc-mode.el (auto-mode-alist): Add .i and .ii files.
diff --git a/lisp/whitespace.el b/lisp/whitespace.el
index 8053483b70d..d30933fdca3 100644
--- a/lisp/whitespace.el
+++ b/lisp/whitespace.el
@@ -6,7 +6,7 @@
6;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> 6;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br>
7;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> 7;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br>
8;; Keywords: data, wp 8;; Keywords: data, wp
9;; Version: 11.1 9;; Version: 11.2
10;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre 10;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre
11 11
12;; This file is part of GNU Emacs. 12;; This file is part of GNU Emacs.
@@ -160,6 +160,12 @@
160;; 160;;
161;; There are also the following useful commands: 161;; There are also the following useful commands:
162;; 162;;
163;; `whitespace-newline-mode'
164;; Toggle newline minor mode visualization ("nl" on modeline).
165;;
166;; `global-whitespace-newline-mode'
167;; Toggle newline global minor mode visualization ("NL" on modeline).
168;;
163;; `whitespace-report' 169;; `whitespace-report'
164;; Report some blank problems in buffer. 170;; Report some blank problems in buffer.
165;; 171;;
@@ -1016,6 +1022,26 @@ Only useful with a windowing system."
1016 (t ; whitespace-mode off 1022 (t ; whitespace-mode off
1017 (whitespace-turn-off)))) 1023 (whitespace-turn-off))))
1018 1024
1025
1026;;;###autoload
1027(define-minor-mode whitespace-newline-mode
1028 "Toggle newline minor mode visualization (\"nl\" on modeline).
1029
1030If ARG is null, toggle newline visualization.
1031If ARG is a number greater than zero, turn on visualization;
1032otherwise, turn off visualization.
1033Only useful with a windowing system.
1034
1035See also `whitespace-newline'."
1036 :lighter " nl"
1037 :init-value nil
1038 :global nil
1039 :group 'whitespace
1040 (let ((whitespace-style '(newline-mark newline)))
1041 (whitespace-mode whitespace-newline-mode)
1042 ;; sync states (running a batch job)
1043 (setq whitespace-newline-mode whitespace-mode)))
1044
1019 1045
1020;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1046;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1021;;;; User commands - Global mode 1047;;;; User commands - Global mode
@@ -1074,6 +1100,26 @@ Only useful with a windowing system."
1074 ;; Otherwise, turn on whitespace mode. 1100 ;; Otherwise, turn on whitespace mode.
1075 (whitespace-turn-on))))) 1101 (whitespace-turn-on)))))
1076 1102
1103
1104;;;###autoload
1105(define-minor-mode global-whitespace-newline-mode
1106 "Toggle newline global minor mode visualization (\"NL\" on modeline).
1107
1108If ARG is null, toggle newline visualization.
1109If ARG is a number greater than zero, turn on visualization;
1110otherwise, turn off visualization.
1111Only useful with a windowing system.
1112
1113See also `whitespace-newline'."
1114 :lighter " NL"
1115 :init-value nil
1116 :global t
1117 :group 'whitespace
1118 (let ((whitespace-style '(newline-mark newline)))
1119 (global-whitespace-mode global-whitespace-newline-mode)
1120 ;; sync states (running a batch job)
1121 (setq global-whitespace-newline-mode global-whitespace-mode)))
1122
1077 1123
1078;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1124;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1079;;;; User commands - Toggle 1125;;;; User commands - Toggle