Emacs 21 doesn't have custom-variable-p. Also, adjust to use the
authorTom Yu <tlyu@mit.edu>
Mon, 2 Nov 2009 19:19:02 +0000 (19:19 +0000)
committerTom Yu <tlyu@mit.edu>
Mon, 2 Nov 2009 19:19:02 +0000 (19:19 +0000)
correct controlling variables for older incarnations of
whitespace-mode.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23121 dc483132-0cff-0310-8789-dd5450dbe970

src/util/krb5-batch-reindent.el

index a22ef7b2c655bcbe8e5b0504a2189615330532c7..668c64c850ddd318c68e62147349485583afa2f7 100644 (file)
 
 ;; Old style whitespace.el uses different variables.
 (defun whitespace-old ()
-  (let (whitespace-check-indent-whitespace
-        whitespace-check-spacetab-whitespace)
+  (let (whitespace-check-buffer-indent
+        whitespace-check-buffer-spacetab)
     (if (local-variable-p 'indent-tabs-mode)
         (progn
           (message "Enabling tab cleanups.")
-          (setq whitespace-check-indent-whitespace indent-tabs-mode)
-          (setq whitespace-check-spacetab-whitespace t)))
+          (setq whitespace-check-buffer-indent indent-tabs-mode)
+          (setq whitespace-check-buffer-spacetab t)))
     (message "Cleaning whitespace...")
     (whitespace-cleanup)))
 
@@ -59,7 +59,7 @@
     (if (equal c-indentation-style "krb5")
         (c-indent-region (point-min) (point-max)))
 
-    (if (custom-variable-p 'whitespace-style)
+    (if (fboundp 'whitespace-newline-mode)
         (whitespace-new)
       (whitespace-old))