Convert consecutive FSF copyright years to ranges.
[bpt/emacs.git] / lisp / obsolete / old-whitespace.el
index d80f51e..be96793 100644 (file)
@@ -1,17 +1,16 @@
 ;;; whitespace.el --- warn about and clean bogus whitespaces in the file
 
-;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2011  Free Software Foundation, Inc.
 
 ;; Author: Rajesh Vaidheeswarran <rv@gnu.org>
 ;; Keywords: convenience
 
 ;; This file is part of GNU Emacs.
 
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -19,9 +18,7 @@
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 
@@ -310,8 +307,8 @@ To disable timer scans, set this to zero."
                                 (:background "white")))
   "Face used for highlighting the bogus whitespaces that exist in the buffer."
   :group 'whitespace-faces)
-;; backward-compatibility alias
-(put 'whitespace-highlight-face 'face-alias 'whitespace-highlight)
+(define-obsolete-face-alias 'whitespace-highlight-face
+  'whitespace-highlight "22.1")
 
 (if (not (assoc 'whitespace-mode minor-mode-alist))
     (setq minor-mode-alist (cons '(whitespace-mode whitespace-mode-line)
@@ -727,9 +724,8 @@ If timer is not set, then set it to scan the files in
        (setq bufname (cadr thiselt))
        (setq buf (get-buffer bufname))
        (if (buffer-live-p buf)
-           (save-excursion
+           (with-current-buffer bufname
              ;;(message "buffer %s live" bufname)
-             (set-buffer bufname)
              (if whitespace-mode
                  (progn
                    ;;(message "checking for whitespace in %s" bufname)
@@ -790,7 +786,7 @@ This is meant to be added buffer-locally to `write-file-functions'."
 
 (defun whitespace-unload-function ()
   "Unload the whitespace library."
-  (if (unintern "whitespace-unload-hook")
+  (if (unintern "whitespace-unload-hook" obarray)
       ;; if whitespace-unload-hook is defined, let's get rid of it
       ;; and recursively call `unload-feature'
       (progn (unload-feature 'whitespace) t)
@@ -812,5 +808,4 @@ This is meant to be added buffer-locally to `write-file-functions'."
 
 (provide 'whitespace)
 
-;; arch-tag: 4ff44e87-b63c-402d-95a6-15e51e58bd0c
 ;;; whitespace.el ends here