emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/blank-mode.el,v


From: Vinicius Jose Latorre
Subject: [Emacs-diffs] Changes to emacs/lisp/blank-mode.el,v
Date: Mon, 28 Jan 2008 13:58:20 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Vinicius Jose Latorre <viniciusjl>      08/01/28 13:58:19

Index: blank-mode.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/blank-mode.el,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- blank-mode.el       26 Jan 2008 01:47:21 -0000      1.5
+++ blank-mode.el       28 Jan 2008 13:58:19 -0000      1.6
@@ -6,7 +6,7 @@
 ;; Author: Vinicius Jose Latorre <address@hidden>
 ;; Maintainer: Vinicius Jose Latorre <address@hidden>
 ;; Keywords: data, wp
-;; Version: 9.1
+;; Version: 9.2
 ;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre
 
 ;; This file is part of GNU Emacs.
@@ -1682,6 +1682,38 @@
 
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;; Aliases for whitespace compatibility
+
+
+;;;###autoload
+(defun whitespace-buffer ()
+  (interactive)
+  (blank-mode 0)                       ; assure is off
+  ;; keep original values
+  (let ((blank-style (copy-sequence blank-style))
+       (blank-chars (copy-sequence blank-chars)))
+    ;; adjust options for whitespace bogus blanks
+    (add-to-list 'blank-style 'color)
+    (mapc #'(lambda (option)
+             (add-to-list 'blank-chars option))
+         '(trailing
+           indentation
+           space-before-tab
+           empty
+           space-after-tab))
+    (blank-mode 1)))
+
+;;;###autoload
+(defalias 'whitespace-region 'whitespace-buffer) ; there is no `blank-region'
+
+;;;###autoload
+(defalias 'whitespace-cleanup 'blank-cleanup)
+
+;;;###autoload
+(defalias 'whitespace-cleanup-region 'blank-cleanup-region)
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 
 (provide 'blank-mode)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]