1 new commit in erc:
https://bitbucket.org/xemacs/erc/commits/d56da29e55b2/
Changeset:   d56da29e55b2
User:        kehoea
Date:        2013-08-03 16:46:58
Summary:     Fix a couple of ERC bugs, thank you Johann Myrkraverk Oskarsson.
ChangeLog addition:
2013-08-03  Aidan Kehoe  <kehoea(a)parhasard.net>
	* erc-log.el (erc-log-setup-logging):
	Avoid attempting to insert at a negative offset if the log file is
	smaller than erc-max-buffer-size; patch from Johann 'Myrkraverk'
	Oskarsson <myrkraverk(a)gmail.com>, thank you Johann.
	* erc-goodies.el (erc-make-read-only):
	Avoid making the input buffer, or its prefix, read-only on
	truncating. Also from Johann, thank you Johann.
Affected #:  3 files
diff -r 63205fffa0eca7e872cb62c176cda7d1e0d627f6 -r
d56da29e55b2ddc5d8e2bf23f4a53b184913bc4e ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2013-08-03  Aidan Kehoe  <kehoea(a)parhasard.net>
+
+	* erc-log.el (erc-log-setup-logging):
+	Avoid attempting to insert at a negative offset if the log file is
+	smaller than erc-max-buffer-size; patch from Johann 'Myrkraverk'
+	Oskarsson <myrkraverk(a)gmail.com>, thank you Johann.
+	* erc-goodies.el (erc-make-read-only):
+	Avoid making the input buffer, or its prefix, read-only on
+	truncating. Also from Johann, thank you Johann.
+
 2009-09-15  Norbert Koch  <viteno(a)xemacs.org>
 
 	* Makefile (VERSION): XEmacs package 0.23 released.
diff -r 63205fffa0eca7e872cb62c176cda7d1e0d627f6 -r
d56da29e55b2ddc5d8e2bf23f4a53b184913bc4e erc-goodies.el
--- a/erc-goodies.el
+++ b/erc-goodies.el
@@ -106,9 +106,20 @@
 (defun erc-make-read-only ()
   "Make all the text in the current buffer read-only.
 Put this function on `erc-insert-post-hook' and/or `erc-send-post-hook'."
-  (put-text-property (point-min) (point-max) 'read-only t)
-  (put-text-property (point-min) (point-max) 'front-sticky t)
-  (put-text-property (point-min) (point-max) 'rear-nonsticky t))
+  (if (featurep 'xemacs)
+      (let ((extent (car (extent-list nil nil nil nil 'name 'erc-read-only))))
+        (cond (extent
+               ;; The buffer may be (or definitely is) narrowed to the
+               ;; recently inserted text, hence explicitly using 1 and not
+               ;; (point-min).
+               (set-extent-endpoints extent 1 erc-insert-marker))
+              (t
+               (setq extent (make-extent 1 erc-insert-marker))
+               (set-extent-property extent 'name 'erc-read-only)
+               (set-extent-property extent 'read-only t))))
+      (put-text-property (point-min) (point-max) 'read-only t)
+      (put-text-property (point-min) (point-max) 'front-sticky t)
+      (put-text-property (point-min) (point-max) 'rear-nonsticky t)))
 
 ;; Distinguish non-commands
 (defvar erc-noncommands-list '(erc-cmd-ME
diff -r 63205fffa0eca7e872cb62c176cda7d1e0d627f6 -r
d56da29e55b2ddc5d8e2bf23f4a53b184913bc4e erc-log.el
--- a/erc-log.el
+++ b/erc-log.el
@@ -235,7 +235,7 @@
              (start (if (and log-file-size
                              (memq 'erc-truncate-buffer
 				   erc-insert-post-hook))
-                        (- log-file-size erc-max-buffer-size)
+                        (max (- log-file-size erc-max-buffer-size) 0)
                       0)))
         (ignore-errors (insert-file-contents log-file nil start
                                              log-file-size))
Repository URL: 
https://bitbucket.org/xemacs/erc/
--
This is a commit notification from 
bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches