Source

erc / erc-truncate.el

Diff from to

erc-truncate.el

 ;;; erc-truncate.el --- Functions for truncating ERC buffers
 
-;; Copyright (C) 2003,2004 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2004 Free Software Foundation, Inc.
 
 ;; Author: Andreas Fuchs <asf@void.at>
 ;; Keywords: IRC, chat, client, Internet, logging
 
-;; This file is free software; you can redistribute it and/or modify
+;; This file is part of GNU Emacs.
+
+;; 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 2, or (at your option)
 ;; any later version.
 
-;; This file is distributed in the hope that it will be useful,
+;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; 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 St, Fifth Floor,
-;; Boston, MA 02110-1301 USA
+;; 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.
 
 ;;; Commentary:
 
   :group 'erc)
 
 (defcustom erc-max-buffer-size 30000
-  "*Maximum size in chars of each ERC buffer.  Used only when auto-truncation is enabled.
+  "*Maximum size in chars of each ERC buffer.
+Used only when auto-truncation is enabled.
 \(see `erc-truncate-buffer' and `erc-insert-post-hook')."
   :group 'erc-truncate
   :type 'integer)
 	  (goto-char end)
 	  (beginning-of-line)
 	  (setq end (point))
- 	  ;; try to save the current buffer using
- 	  ;; `erc-save-buffer-in-logs'.  We use this, in case the
- 	  ;; user has both `erc-save-buffer-in-logs' and
- 	  ;; `erc-truncate-buffer' in `erc-insert-post-hook'.  If
- 	  ;; this is the case, only the non-saved part of the current
- 	  ;; buffer should be saved.  Rather than appending the
- 	  ;; deleted part of the buffer to the log file.
- 	  ;;
- 	  ;; Alternatively this could be made conditional on:
- 	  ;; (not (memq 'erc-save-buffer-in-logs
- 	  ;;             erc-insert-post-hook))
- 	  ;; Comments?
-          (when (and (boundp 'erc-enable-logging)
-                     erc-enable-logging
-                     (erc-logging-enabled buffer))
-            (erc-save-buffer-in-logs))
+	  ;; try to save the current buffer using
+	  ;; `erc-save-buffer-in-logs'.  We use this, in case the
+	  ;; user has both `erc-save-buffer-in-logs' and
+	  ;; `erc-truncate-buffer' in `erc-insert-post-hook'.  If
+	  ;; this is the case, only the non-saved part of the current
+	  ;; buffer should be saved.  Rather than appending the
+	  ;; deleted part of the buffer to the log file.
+	  ;;
+	  ;; Alternatively this could be made conditional on:
+	  ;; (not (memq 'erc-save-buffer-in-logs
+	  ;;             erc-insert-post-hook))
+	  ;; Comments?
+	  (when (and (boundp 'erc-enable-logging)
+		     erc-enable-logging
+		     (erc-logging-enabled buffer))
+	    (erc-save-buffer-in-logs))
 	  ;; disable undoing for the truncating
 	  (buffer-disable-undo)
 	  (let ((inhibit-read-only t))
 
 (provide 'erc-truncate)
 ;;; erc-truncate.el ends here
+;;
+;; Local Variables:
+;; indent-tabs-mode: t
+;; tab-width: 8
+;; End:
+
+;; arch-tag: 22a2ea78-871f-4870-8f1e-efe534170311