]> code.delx.au - gnu-emacs/blobdiff - lisp/erc/erc-log.el
Fix typos.
[gnu-emacs] / lisp / erc / erc-log.el
index 7ea3c63b4b2c1f0c538669c41ec7b7b41f690537..7c9c8442e1d817fa17575a9170de523cae4a070b 100644 (file)
@@ -1,6 +1,6 @@
 ;;; erc-log.el --- Logging facilities for ERC.
 
-;; Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
 ;; Author: Lawrence Mitchell <wence@gmx.li>
 ;; Keywords: IRC, chat, client, Internet, logging
 
 ;; 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
@@ -21,9 +21,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:
 
@@ -224,8 +222,8 @@ format is defined through a formatting function on
 
 Since automatic logging is not always a Good Thing (especially if
 people say things in different coding systems), you can turn logging
-behaviour on and off with the variable `erc-enable-logging', which can
-also be a predicate function. To only log when you are not set away, use:
+behavior on and off with the variable `erc-enable-logging', which can
+also be a predicate function.  To only log when you are not set away, use:
 
 \(setq erc-enable-logging
       (lambda (buffer)
@@ -268,14 +266,7 @@ The current buffer is given by BUFFER."
     (with-current-buffer buffer
       (auto-save-mode -1)
       (setq buffer-file-name nil)
-      (cond ((boundp 'write-file-functions)
-            (set (make-local-variable 'write-file-functions)
-                 '(erc-save-buffer-in-logs)))
-           ((boundp 'local-write-file-hooks)
-            (setq local-write-file-hooks '(erc-save-buffer-in-logs)))
-           (t
-            (set (make-local-variable 'write-file-hooks)
-                 '(erc-save-buffer-in-logs))))
+      (erc-set-write-file-functions '(erc-save-buffer-in-logs))
       (when erc-log-insert-log-on-open
        (ignore-errors (insert-file-contents (erc-current-logfile))
                       (move-marker erc-last-saved-position