aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olson <[email protected]>2007-09-19 03:29:03 +0000
committerMichael Olson <[email protected]>2007-09-19 03:29:03 +0000
commitd20cf916c01d956cf65e280ecccf4ad10e8f566e (patch)
tree9c7756f724e91dd0361ea1490e59ceba0cd036ae
parent44954c2f94bf24ed1eaece22da665c088109efa3 (diff)
Sync changes from upstream ERC
-rw-r--r--doc/misc/ChangeLog4
-rw-r--r--doc/misc/erc.texi2
-rw-r--r--lisp/erc/ChangeLog28
-rw-r--r--lisp/erc/erc-log.el28
-rw-r--r--lisp/erc/erc-sound.el2
-rw-r--r--lisp/erc/erc-track.el6
6 files changed, 62 insertions, 8 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index ecc782fb89..bcb66cd1b6 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,3 +1,7 @@
+2007-09-18 Exal de Jesus Garcia Carrillo <[email protected]>
+
+ * erc.texi (Special-Features): Fix small typo.
+
2007-09-14 Michael Albinus <[email protected]>
* tramp.texi (Filename Syntax): Provide links to "Inline methods"
diff --git a/doc/misc/erc.texi b/doc/misc/erc.texi
index 3ff8fce947..fa5790f152 100644
--- a/doc/misc/erc.texi
+++ b/doc/misc/erc.texi
@@ -393,7 +393,7 @@ buffers in Emacs. We call these ``query buffers''.
@item highlighting
-Some occurences of words can be highlighted, which makes it easier to
+Some occurrences of words can be highlighted, which makes it easier to
track different kinds of conversations.
@item notification
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog
index 89bdee631a..2c6c3e969b 100644
--- a/lisp/erc/ChangeLog
+++ b/lisp/erc/ChangeLog
@@ -1,5 +1,33 @@
+2007-09-18 Exal de Jesus Garcia Carrillo <[email protected]>
+
+ * erc.texi (Special-Features): Fix small typo.
+
+2007-09-16 Michael Olson <[email protected]>
+
+ * erc-track.el (erc-track-switch-direction): Mention
+ erc-track-faces-priority-list. Thanks to Leo for the suggestion.
+
+2007-09-11 Exal de Jesus Garcia Carrillo <[email protected]>
+
+ * erc-sound.el: Fix typo in setting up instructions.
+
+2007-09-10 Michael Olson <[email protected]>
+
+ * Makefile (elpa): Copy dir template rather than echoing a few
+ lines. The reason for this is that the ELPA package for ERC was
+ getting a corrupt dir entry.
+
+ * dir-template: Template for the ELPA dir file.
+
2007-09-08 Michael Olson <[email protected]>
+ * erc-log.el (erc-log-filter-function): New option that specifies
+ the function to call for filtering text before writing it to a log
+ file. Thanks to David O'Toole for the suggestion.
+ (erc-save-buffer-in-logs): Use erc-log-filter-function. Make sure
+ we carry along the value of coding-system-for-write, because this
+ could potentially be shadowed by the temporary buffer.
+
* erc.el (erc-version-string): Update to 5.3, development version.
2007-09-07 Glenn Morris <[email protected]>
diff --git a/lisp/erc/erc-log.el b/lisp/erc/erc-log.el
index 856f1dca89..1733b3d1b0 100644
--- a/lisp/erc/erc-log.el
+++ b/lisp/erc/erc-log.el
@@ -205,6 +205,16 @@ This should ideally, be a \"catch-all\" coding system, like
`emacs-mule', or `iso-2022-7bit'."
:group 'erc-log)
+(defcustom erc-log-filter-function nil
+ "*If non-nil, pass text through the given function before writing it to
+a log file.
+
+The function should take one argument, which is the text to filter."
+ :group 'erc-log
+ :type '(choice (function "Function")
+ (const :tag "No filtering" nil)))
+
+
;;;###autoload (autoload 'erc-log-mode "erc-log" nil t)
(define-erc-module log nil
"Automatically logs things you receive on IRC into files.
@@ -405,17 +415,25 @@ You can save every individual message by putting this function on
(or buffer (setq buffer (current-buffer)))
(when (erc-logging-enabled buffer)
(let ((file (erc-current-logfile buffer))
- (coding-system-for-write erc-log-file-coding-system))
+ (coding-system erc-log-file-coding-system))
(save-excursion
(with-current-buffer buffer
(save-restriction
(widen)
- ;; early on in the initalisation, don't try and write the log out
+ ;; early on in the initialization, don't try and write the log out
(when (and (markerp erc-last-saved-position)
(> erc-insert-marker (1+ erc-last-saved-position)))
- (write-region (1+ (marker-position erc-last-saved-position))
- (marker-position erc-insert-marker)
- file t 'nomessage)
+ (let ((start (1+ (marker-position erc-last-saved-position)))
+ (end (marker-position erc-insert-marker)))
+ (if (functionp erc-log-filter-function)
+ (let ((text (buffer-substring start end)))
+ (with-temp-buffer
+ (insert (funcall erc-log-filter-function text))
+ (let ((coding-system-for-write coding-system))
+ (write-region (point-min) (point-max)
+ file t 'nomessage))))
+ (let ((coding-system-for-write coding-system))
+ (write-region start end file t 'nomessage))))
(if (and erc-truncate-buffer-on-save (interactive-p))
(progn
(let ((inhibit-read-only t)) (erase-buffer))
diff --git a/lisp/erc/erc-sound.el b/lisp/erc/erc-sound.el
index d02887a69d..7a1a28198b 100644
--- a/lisp/erc/erc-sound.el
+++ b/lisp/erc/erc-sound.el
@@ -30,7 +30,7 @@
;; Add the following to your .emacs if you want to play sounds.
;;
-;; (require 'erc-soud)
+;; (require 'erc-sound)
;; (erc-sound-enable)
;;
;; To send requests to other users from within query buffers, type the
diff --git a/lisp/erc/erc-track.el b/lisp/erc/erc-track.el
index 5865257434..1408adcd94 100644
--- a/lisp/erc/erc-track.el
+++ b/lisp/erc/erc-track.el
@@ -285,7 +285,11 @@ when there are no more active channels."
oldest - find oldest active buffer
newest - find newest active buffer
leastactive - find buffer with least unseen messages
- mostactive - find buffer with most unseen messages."
+ mostactive - find buffer with most unseen messages.
+
+If set to 'importance, the importance is determined by position
+in `erc-track-faces-priority-list', where first is most
+important."
:group 'erc-track
:type '(choice (const importance)
(const oldest)