X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/e94a977386fe58eda8f0561be3c27ae646e3f58d..0d4afaf7ffb6d1881c9acf9ef03f386cc87254e6:/lisp/obsolete/old-whitespace.el diff --git a/lisp/obsolete/old-whitespace.el b/lisp/obsolete/old-whitespace.el index d80f51e07e..71568f98d5 100644 --- a/lisp/obsolete/old-whitespace.el +++ b/lisp/obsolete/old-whitespace.el @@ -1,17 +1,17 @@ ;;; 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, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, +;; 2008, 2009, 2010 Free Software Foundation, Inc. ;; Author: Rajesh Vaidheeswarran ;; 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 +19,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 . ;;; Commentary: @@ -310,8 +308,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 +725,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 +787,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)