From: Tom Yu Date: Mon, 2 Nov 2009 19:19:02 +0000 (+0000) Subject: Emacs 21 doesn't have custom-variable-p. Also, adjust to use the X-Git-Tag: krb5-1.8-alpha1~219 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3f9a584e767baf09ac0bc91359235bea6f9520fe;p=krb5.git Emacs 21 doesn't have custom-variable-p. Also, adjust to use the correct controlling variables for older incarnations of whitespace-mode. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23121 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/util/krb5-batch-reindent.el b/src/util/krb5-batch-reindent.el index a22ef7b2c..668c64c85 100644 --- a/src/util/krb5-batch-reindent.el +++ b/src/util/krb5-batch-reindent.el @@ -30,13 +30,13 @@ ;; 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))