aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Bader2006-08-03 05:10:38 +0000
committerMiles Bader2006-08-03 05:10:38 +0000
commit2e3ef421a9e7888ed48241bbeecedaeefb58ab54 (patch)
treed7a59eb24269a42164aff762ed8b4c952293cdac
parent6b2fcbb546b8b69b2eef40c5042439d3f822bec7 (diff)
downloademacs-2e3ef421a9e7888ed48241bbeecedaeefb58ab54.tar.gz
emacs-2e3ef421a9e7888ed48241bbeecedaeefb58ab54.zip
Merge from erc--emacs--21
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-379 Creator: Michael Olson <mwolson@gnu.org>
-rw-r--r--etc/ChangeLog4
-rw-r--r--etc/ERC-NEWS23
-rw-r--r--lisp/erc/ChangeLog37
-rw-r--r--lisp/erc/erc-backend.el11
-rw-r--r--lisp/erc/erc-log.el19
-rw-r--r--lisp/erc/erc-spelling.el14
-rw-r--r--lisp/erc/erc.el12
-rw-r--r--man/ChangeLog4
-rw-r--r--man/erc.texi2
9 files changed, 103 insertions, 23 deletions
diff --git a/etc/ChangeLog b/etc/ChangeLog
index 4937aef2bca..ae887b33da9 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,3 +1,7 @@
12006-08-03 Michael Olson <mwolson@gnu.org>
2
3 * ERC-NEWS: Update for ERC 5.1.4.
4
12006-08-01 Kenichi Handa <handa@m17n.org> 52006-08-01 Kenichi Handa <handa@m17n.org>
2 6
3 * NEWS (find-operation-coding-system): Describe the more detail of 7 * NEWS (find-operation-coding-system): Describe the more detail of
diff --git a/etc/ERC-NEWS b/etc/ERC-NEWS
index 778344c68c7..3a026ee1162 100644
--- a/etc/ERC-NEWS
+++ b/etc/ERC-NEWS
@@ -1,6 +1,27 @@
1ERC NEWS -*- outline -*- 1ERC NEWS -*- outline -*-
2 2
3* Changes in ERC 5.2 (unreleased) 3* Changes in ERC 5.1.4
4
5** Make find-function and find-variable work in Emacs 22 for
6names that are constructed by `define-erc-module'.
7
8** Fix bug introduced in ERC 5.1.3 that caused messages to go the
9wrong buffer.
10
11** Changes and additions to modules
12
13*** Highlighting (erc-match.el)
14
15**** Don't activate view-mode.
16
17*** Logging (erc-log.el)
18
19**** When this module is activated, make sure logging is enabled on
20already-opened buffers. Ditto for disabling logging when the module
21is deactivated.
22
23**** Fix some errors that occur when exiting Emacs without first
24quitting open IRC servers.
4 25
5* Changes in ERC 5.1.3 26* Changes in ERC 5.1.3
6 27
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog
index 216d14d0aa6..0129bd43976 100644
--- a/lisp/erc/ChangeLog
+++ b/lisp/erc/ChangeLog
@@ -1,3 +1,40 @@
12006-08-02 Michael Olson <mwolson@gnu.org>
2
3 * erc.el (erc-version-string): Release ERC 5.1.4.
4
5 * Makefile, NEWS, erc.texi: Update for the 5.1.4 release.
6
7 * erc.el (erc-active-buffer): Fix bug that caused messages to go
8 to the wrong buffer. Thanks to offby1 for the report.
9
10 * erc-backend.el (erc-coding-system-for-target): Handle case where
11 target is nil. Thanks to Kai Fan for the patch.
12
132006-07-29 Michael Olson <mwolson@gnu.org>
14
15 * erc-log.el (erc-log-setup-logging): Don't offer to save the
16 buffer. It will be saved automatically killed. Thanks to Johan
17 Bockgård and Tassilo Horn for pointing this out.
18
192006-07-27 Johan Bockgård <bojohan@users.sourceforge.net>
20
21 * erc.el (define-erc-module): Make find-function and find-variable
22 find the names constructed by `define-erc-module' in Emacs 22.
23
242006-07-14 Michael Olson <mwolson@gnu.org>
25
26 * erc-log.el (log): Make sure that we enable logging on
27 already-opened buffers as well, in case the user toggles this
28 module after loading ERC. Also be sure to remove logging ability
29 from all ERC buffers when the module is disabled.
30 (erc-log-setup-logging): Set buffer-file-name to nil rather than
31 the empty string. This should fix some errors that occur when
32 quitting Emacs without first killing all ERC buffers.
33 (erc-log-disable-logging): New function that removes the logging
34 ability from the current buffer.
35
36 * erc-spelling.el (spelling): Use dolist and buffer-live-p.
37
12006-07-12 Michael Olson <mwolson@gnu.org> 382006-07-12 Michael Olson <mwolson@gnu.org>
2 39
3 * erc-match.el (erc-log-matches): Bind inhibit-read-only rather 40 * erc-match.el (erc-log-matches): Bind inhibit-read-only rather
diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el
index 7dce9e4bf01..705ca7a9e63 100644
--- a/lisp/erc/erc-backend.el
+++ b/lisp/erc/erc-backend.el
@@ -563,11 +563,12 @@ action."
563 "Return the coding system or cons cell appropriate for TARGET. 563 "Return the coding system or cons cell appropriate for TARGET.
564This is determined via `erc-encoding-coding-alist' or 564This is determined via `erc-encoding-coding-alist' or
565`erc-server-coding-system'." 565`erc-server-coding-system'."
566 (or (let ((case-fold-search t)) 566 (or (when target
567 (catch 'match 567 (let ((case-fold-search t))
568 (dolist (pat erc-encoding-coding-alist) 568 (catch 'match
569 (when (string-match (car pat) target) 569 (dolist (pat erc-encoding-coding-alist)
570 (throw 'match (cdr pat)))))) 570 (when (string-match (car pat) target)
571 (throw 'match (cdr pat)))))))
571 (and (functionp erc-server-coding-system) 572 (and (functionp erc-server-coding-system)
572 (funcall erc-server-coding-system)) 573 (funcall erc-server-coding-system))
573 erc-server-coding-system)) 574 erc-server-coding-system))
diff --git a/lisp/erc/erc-log.el b/lisp/erc/erc-log.el
index b316a8588bd..418e45060bd 100644
--- a/lisp/erc/erc-log.el
+++ b/lisp/erc/erc-log.el
@@ -218,7 +218,10 @@ also be a predicate function. To only log when you are not set away, use:
218 (add-hook 'erc-quit-hook 'erc-conditional-save-queries) 218 (add-hook 'erc-quit-hook 'erc-conditional-save-queries)
219 (add-hook 'erc-part-hook 'erc-conditional-save-buffer) 219 (add-hook 'erc-part-hook 'erc-conditional-save-buffer)
220 ;; append, so that 'erc-initialize-log-marker runs first 220 ;; append, so that 'erc-initialize-log-marker runs first
221 (add-hook 'erc-connect-pre-hook 'erc-log-setup-logging 'append)) 221 (add-hook 'erc-connect-pre-hook 'erc-log-setup-logging 'append)
222 (dolist (buffer (erc-buffer-list))
223 (when (buffer-live-p buffer)
224 (with-current-buffer buffer (erc-log-setup-logging)))))
222 ;; disable 225 ;; disable
223 ((remove-hook 'erc-insert-post-hook 'erc-save-buffer-in-logs) 226 ((remove-hook 'erc-insert-post-hook 'erc-save-buffer-in-logs)
224 (remove-hook 'erc-send-post-hook 'erc-save-buffer-in-logs) 227 (remove-hook 'erc-send-post-hook 'erc-save-buffer-in-logs)
@@ -226,7 +229,10 @@ also be a predicate function. To only log when you are not set away, use:
226 (remove-hook 'erc-kill-channel-hook 'erc-save-buffer-in-logs) 229 (remove-hook 'erc-kill-channel-hook 'erc-save-buffer-in-logs)
227 (remove-hook 'erc-quit-hook 'erc-conditional-save-queries) 230 (remove-hook 'erc-quit-hook 'erc-conditional-save-queries)
228 (remove-hook 'erc-part-hook 'erc-conditional-save-buffer) 231 (remove-hook 'erc-part-hook 'erc-conditional-save-buffer)
229 (remove-hook 'erc-connect-pre-hook 'erc-log-setup-logging))) 232 (remove-hook 'erc-connect-pre-hook 'erc-log-setup-logging)
233 (dolist (buffer (erc-buffer-list))
234 (when (buffer-live-p buffer)
235 (with-current-buffer buffer (erc-log-disable-logging))))))
230 236
231(define-key erc-mode-map "\C-c\C-l" 'erc-save-buffer-in-logs) 237(define-key erc-mode-map "\C-c\C-l" 'erc-save-buffer-in-logs)
232 238
@@ -236,8 +242,7 @@ also be a predicate function. To only log when you are not set away, use:
236This function is destined to be run from `erc-connect-pre-hook'." 242This function is destined to be run from `erc-connect-pre-hook'."
237 (when (erc-logging-enabled) 243 (when (erc-logging-enabled)
238 (auto-save-mode -1) 244 (auto-save-mode -1)
239 (setq buffer-offer-save t 245 (setq buffer-file-name nil)
240 buffer-file-name "")
241 (set (make-local-variable 'write-file-functions) 246 (set (make-local-variable 'write-file-functions)
242 '(erc-save-buffer-in-logs)) 247 '(erc-save-buffer-in-logs))
243 (when erc-log-insert-log-on-open 248 (when erc-log-insert-log-on-open
@@ -245,6 +250,12 @@ This function is destined to be run from `erc-connect-pre-hook'."
245 (move-marker erc-last-saved-position 250 (move-marker erc-last-saved-position
246 (1- (point-max))))))) 251 (1- (point-max)))))))
247 252
253(defun erc-log-disable-logging ()
254 "Disable logging in the current buffer."
255 (when (erc-logging-enabled)
256 (setq buffer-offer-save nil
257 erc-enable-logging nil)))
258
248(defun erc-log-all-but-server-buffers (buffer) 259(defun erc-log-all-but-server-buffers (buffer)
249 "Returns t if logging should be enabled in BUFFER. 260 "Returns t if logging should be enabled in BUFFER.
250Returns nil iff `erc-server-buffer-p' returns t." 261Returns nil iff `erc-server-buffer-p' returns t."
diff --git a/lisp/erc/erc-spelling.el b/lisp/erc/erc-spelling.el
index 3cbc786274d..7ed0f510539 100644
--- a/lisp/erc/erc-spelling.el
+++ b/lisp/erc/erc-spelling.el
@@ -40,15 +40,13 @@
40 ;; Use erc-connect-pre-hook instead of erc-mode-hook as pre-hook is 40 ;; Use erc-connect-pre-hook instead of erc-mode-hook as pre-hook is
41 ;; called AFTER the server buffer is initialized. 41 ;; called AFTER the server buffer is initialized.
42 ((add-hook 'erc-connect-pre-hook 'erc-spelling-init) 42 ((add-hook 'erc-connect-pre-hook 'erc-spelling-init)
43 (mapc (lambda (buffer) 43 (dolist (buffer (erc-buffer-list))
44 (when buffer 44 (when (buffer-live-p buffer)
45 (with-current-buffer buffer (erc-spelling-init)))) 45 (with-current-buffer buffer (erc-spelling-init)))))
46 (erc-buffer-list)))
47 ((remove-hook 'erc-connect-pre-hook 'erc-spelling-init) 46 ((remove-hook 'erc-connect-pre-hook 'erc-spelling-init)
48 (mapc (lambda (buffer) 47 (dolist (buffer (erc-buffer-list))
49 (when buffer 48 (when (buffer-live-p buffer)
50 (with-current-buffer buffer (flyspell-mode 0)))) 49 (with-current-buffer buffer (flyspell-mode 0))))))
51 (erc-buffer-list))))
52 50
53(defcustom erc-spelling-dictionaries nil 51(defcustom erc-spelling-dictionaries nil
54 "An alist mapping buffer names to dictionaries. 52 "An alist mapping buffer names to dictionaries.
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index fd5a49eae4b..4317b831d56 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -67,7 +67,7 @@
67 67
68;;; Code: 68;;; Code:
69 69
70(defconst erc-version-string "Version 5.1.3" 70(defconst erc-version-string "Version 5.1.4"
71 "ERC version. This is used by function `erc-version'.") 71 "ERC version. This is used by function `erc-version'.")
72 72
73(eval-when-compile (require 'cl)) 73(eval-when-compile (require 'cl))
@@ -1243,7 +1243,11 @@ With arg, turn ERC %S mode on if and only if arg is positive.
1243 (format "erc-%s-mode" 1243 (format "erc-%s-mode"
1244 (downcase (symbol-name alias))))) 1244 (downcase (symbol-name alias)))))
1245 (quote 1245 (quote
1246 ,mode)))))) 1246 ,mode)))
1247 ;; For find-function and find-variable.
1248 (put ',mode 'definition-name ',name)
1249 (put ',enable 'definition-name ',name)
1250 (put ',disable 'definition-name ',name))))
1247 1251
1248(put 'define-erc-module 'doc-string-elt 3) 1252(put 'define-erc-module 'doc-string-elt 3)
1249 1253
@@ -1388,8 +1392,8 @@ server buffer")
1388Defaults to the server buffer." 1392Defaults to the server buffer."
1389 (with-current-buffer (erc-server-buffer) 1393 (with-current-buffer (erc-server-buffer)
1390 (if (buffer-live-p erc-active-buffer) 1394 (if (buffer-live-p erc-active-buffer)
1391 erc-active-buffer) 1395 erc-active-buffer
1392 (setq erc-active-buffer (current-buffer)))) 1396 (setq erc-active-buffer (current-buffer)))))
1393 1397
1394(defun erc-set-active-buffer (buffer) 1398(defun erc-set-active-buffer (buffer)
1395 "Set the value of `erc-active-buffer' to BUFFER." 1399 "Set the value of `erc-active-buffer' to BUFFER."
diff --git a/man/ChangeLog b/man/ChangeLog
index 23788624bf9..4723b892276 100644
--- a/man/ChangeLog
+++ b/man/ChangeLog
@@ -1,3 +1,7 @@
12006-08-03 Michael Olson <mwolson@gnu.org>
2
3 * erc.texi: Update for ERC 5.1.4.
4
12006-08-01 Richard Stallman <rms@gnu.org> 52006-08-01 Richard Stallman <rms@gnu.org>
2 6
3 * help.texi (Name Help): Add index entries for describe-variable. 7 * help.texi (Name Help): Add index entries for describe-variable.
diff --git a/man/erc.texi b/man/erc.texi
index 29b0f059722..c4317f11511 100644
--- a/man/erc.texi
+++ b/man/erc.texi
@@ -12,7 +12,7 @@
12@syncodeindex fn cp 12@syncodeindex fn cp
13 13
14@copying 14@copying
15This manual is for ERC version 5.1.3. 15This manual is for ERC version 5.1.4.
16 16
17Copyright @copyright{} 2005, 2006 Free Software Foundation, Inc. 17Copyright @copyright{} 2005, 2006 Free Software Foundation, Inc.
18 18