]> code.delx.au - gnu-emacs/commitdiff
Merge from erc--emacs--21
authorMiles Bader <miles@gnu.org>
Thu, 3 Aug 2006 05:10:38 +0000 (05:10 +0000)
committerMiles Bader <miles@gnu.org>
Thu, 3 Aug 2006 05:10:38 +0000 (05:10 +0000)
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-379
Creator:  Michael Olson <mwolson@gnu.org>

etc/ChangeLog
etc/ERC-NEWS
lisp/erc/ChangeLog
lisp/erc/erc-backend.el
lisp/erc/erc-log.el
lisp/erc/erc-spelling.el
lisp/erc/erc.el
man/ChangeLog
man/erc.texi

index 4937aef2bcaf4e43a81969a1f1c7ab4af770b3ba..ae887b33da96cce66817c9e06b102c0284ef76c3 100644 (file)
@@ -1,3 +1,7 @@
+2006-08-03  Michael Olson  <mwolson@gnu.org>
+
+       * ERC-NEWS: Update for ERC 5.1.4.
+
 2006-08-01  Kenichi Handa  <handa@m17n.org>
 
        * NEWS (find-operation-coding-system): Describe the more detail of
index 778344c68c7bbccd0122b74c8a9800dad09a47cf..3a026ee1162700c00e4f297bb0ec24a59f3f5618 100644 (file)
@@ -1,6 +1,27 @@
 ERC NEWS                                                       -*- outline -*-
 
-* Changes in ERC 5.2 (unreleased)
+* Changes in ERC 5.1.4
+
+** Make find-function and find-variable work in Emacs 22 for
+names that are constructed by `define-erc-module'.
+
+** Fix bug introduced in ERC 5.1.3 that caused messages to go the
+wrong buffer.
+
+** Changes and additions to modules
+
+*** Highlighting (erc-match.el)
+
+**** Don't activate view-mode.
+
+*** Logging (erc-log.el)
+
+**** When this module is activated, make sure logging is enabled on
+already-opened buffers.  Ditto for disabling logging when the module
+is deactivated.
+
+**** Fix some errors that occur when exiting Emacs without first
+quitting open IRC servers.
 
 * Changes in ERC 5.1.3
 
index 216d14d0aa69571516fe6d5e7c1fd5c6d924253f..0129bd439767660aace10b9e08ba0d1a7f7648a2 100644 (file)
@@ -1,3 +1,40 @@
+2006-08-02  Michael Olson  <mwolson@gnu.org>
+
+       * erc.el (erc-version-string): Release ERC 5.1.4.
+
+       * Makefile, NEWS, erc.texi: Update for the 5.1.4 release.
+
+       * erc.el (erc-active-buffer): Fix bug that caused messages to go
+       to the wrong buffer.  Thanks to offby1 for the report.
+
+       * erc-backend.el (erc-coding-system-for-target): Handle case where
+       target is nil.  Thanks to Kai Fan for the patch.
+
+2006-07-29  Michael Olson  <mwolson@gnu.org>
+
+       * erc-log.el (erc-log-setup-logging): Don't offer to save the
+       buffer.  It will be saved automatically killed.  Thanks to Johan
+       Bockgård and Tassilo Horn for pointing this out.
+
+2006-07-27  Johan Bockgård  <bojohan@users.sourceforge.net>
+
+       * erc.el (define-erc-module): Make find-function and find-variable
+       find the names constructed by `define-erc-module' in Emacs 22.
+
+2006-07-14  Michael Olson  <mwolson@gnu.org>
+
+       * erc-log.el (log): Make sure that we enable logging on
+       already-opened buffers as well, in case the user toggles this
+       module after loading ERC.  Also be sure to remove logging ability
+       from all ERC buffers when the module is disabled.
+       (erc-log-setup-logging): Set buffer-file-name to nil rather than
+       the empty string.  This should fix some errors that occur when
+       quitting Emacs without first killing all ERC buffers.
+       (erc-log-disable-logging): New function that removes the logging
+       ability from the current buffer.
+
+       * erc-spelling.el (spelling): Use dolist and buffer-live-p.
+
 2006-07-12  Michael Olson  <mwolson@gnu.org>
 
        * erc-match.el (erc-log-matches): Bind inhibit-read-only rather
index 7dce9e4bf01416e6da6e8de8b322de7382623859..705ca7a9e63f94e36393afbb9c4e521e1ee086f9 100644 (file)
@@ -563,11 +563,12 @@ action."
   "Return the coding system or cons cell appropriate for TARGET.
 This is determined via `erc-encoding-coding-alist' or
 `erc-server-coding-system'."
-  (or (let ((case-fold-search t))
-        (catch 'match
-          (dolist (pat erc-encoding-coding-alist)
-            (when (string-match (car pat) target)
-              (throw 'match (cdr pat))))))
+  (or (when target
+        (let ((case-fold-search t))
+          (catch 'match
+            (dolist (pat erc-encoding-coding-alist)
+              (when (string-match (car pat) target)
+                (throw 'match (cdr pat)))))))
       (and (functionp erc-server-coding-system)
            (funcall erc-server-coding-system))
       erc-server-coding-system))
index b316a8588bd71a1223fa96c8809dd9af38671f53..418e45060bdd219bcacd05a07606dc9531dbce57 100644 (file)
@@ -218,7 +218,10 @@ also be a predicate function. To only log when you are not set away, use:
    (add-hook 'erc-quit-hook 'erc-conditional-save-queries)
    (add-hook 'erc-part-hook 'erc-conditional-save-buffer)
    ;; append, so that 'erc-initialize-log-marker runs first
-   (add-hook 'erc-connect-pre-hook 'erc-log-setup-logging 'append))
+   (add-hook 'erc-connect-pre-hook 'erc-log-setup-logging 'append)
+   (dolist (buffer (erc-buffer-list))
+     (when (buffer-live-p buffer)
+       (with-current-buffer buffer (erc-log-setup-logging)))))
   ;; disable
   ((remove-hook 'erc-insert-post-hook 'erc-save-buffer-in-logs)
    (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:
    (remove-hook 'erc-kill-channel-hook 'erc-save-buffer-in-logs)
    (remove-hook 'erc-quit-hook 'erc-conditional-save-queries)
    (remove-hook 'erc-part-hook 'erc-conditional-save-buffer)
-   (remove-hook 'erc-connect-pre-hook 'erc-log-setup-logging)))
+   (remove-hook 'erc-connect-pre-hook 'erc-log-setup-logging)
+   (dolist (buffer (erc-buffer-list))
+     (when (buffer-live-p buffer)
+       (with-current-buffer buffer (erc-log-disable-logging))))))
 
 (define-key erc-mode-map "\C-c\C-l" 'erc-save-buffer-in-logs)
 
@@ -236,8 +242,7 @@ also be a predicate function. To only log when you are not set away, use:
 This function is destined to be run from `erc-connect-pre-hook'."
   (when (erc-logging-enabled)
     (auto-save-mode -1)
-    (setq buffer-offer-save t
-         buffer-file-name "")
+    (setq buffer-file-name nil)
     (set (make-local-variable 'write-file-functions)
         '(erc-save-buffer-in-logs))
     (when erc-log-insert-log-on-open
@@ -245,6 +250,12 @@ This function is destined to be run from `erc-connect-pre-hook'."
                     (move-marker erc-last-saved-position
                                  (1- (point-max)))))))
 
+(defun erc-log-disable-logging ()
+  "Disable logging in the current buffer."
+  (when (erc-logging-enabled)
+    (setq buffer-offer-save nil
+         erc-enable-logging nil)))
+
 (defun erc-log-all-but-server-buffers (buffer)
   "Returns t if logging should be enabled in BUFFER.
 Returns nil iff `erc-server-buffer-p' returns t."
index 3cbc786274d866e658ec2271bf939b7356a118e1..7ed0f5105395d73fe7fb2b2fb4cd49b737636aba 100644 (file)
   ;; Use erc-connect-pre-hook instead of erc-mode-hook as pre-hook is
   ;; called AFTER the server buffer is initialized.
   ((add-hook 'erc-connect-pre-hook 'erc-spelling-init)
-   (mapc (lambda (buffer)
-           (when buffer
-             (with-current-buffer buffer (erc-spelling-init))))
-         (erc-buffer-list)))
+   (dolist (buffer (erc-buffer-list))
+     (when (buffer-live-p buffer)
+       (with-current-buffer buffer (erc-spelling-init)))))
   ((remove-hook 'erc-connect-pre-hook 'erc-spelling-init)
-   (mapc (lambda (buffer)
-           (when buffer
-             (with-current-buffer buffer (flyspell-mode 0))))
-         (erc-buffer-list))))
+   (dolist (buffer (erc-buffer-list))
+     (when (buffer-live-p buffer)
+       (with-current-buffer buffer (flyspell-mode 0))))))
 
 (defcustom erc-spelling-dictionaries nil
   "An alist mapping buffer names to dictionaries.
index fd5a49eae4b6bd67cf764971d3bcbd4ee86a620e..4317b831d56c9c0f38e4c0050b1e44f5170bc6cb 100644 (file)
@@ -67,7 +67,7 @@
 
 ;;; Code:
 
-(defconst erc-version-string "Version 5.1.3"
+(defconst erc-version-string "Version 5.1.4"
   "ERC version.  This is used by function `erc-version'.")
 
 (eval-when-compile (require 'cl))
@@ -1243,7 +1243,11 @@ With arg, turn ERC %S mode on if and only if arg is positive.
                (format "erc-%s-mode"
                        (downcase (symbol-name alias)))))
             (quote
-             ,mode))))))
+             ,mode)))
+       ;; For find-function and find-variable.
+       (put ',mode    'definition-name ',name)
+       (put ',enable  'definition-name ',name)
+       (put ',disable 'definition-name ',name))))
 
 (put 'define-erc-module 'doc-string-elt 3)
 
@@ -1388,8 +1392,8 @@ server buffer")
 Defaults to the server buffer."
   (with-current-buffer (erc-server-buffer)
     (if (buffer-live-p erc-active-buffer)
-       erc-active-buffer)
-    (setq erc-active-buffer (current-buffer))))
+       erc-active-buffer
+      (setq erc-active-buffer (current-buffer)))))
 
 (defun erc-set-active-buffer (buffer)
   "Set the value of `erc-active-buffer' to BUFFER."
index 23788624bf9acc781aaf025452933472b81b1a7a..4723b8922762309c8b88acdd0b6a2099477d3f7d 100644 (file)
@@ -1,3 +1,7 @@
+2006-08-03  Michael Olson  <mwolson@gnu.org>
+
+       * erc.texi: Update for ERC 5.1.4.
+
 2006-08-01  Richard Stallman  <rms@gnu.org>
 
        * help.texi (Name Help): Add index entries for describe-variable.
index 29b0f0597222beab14d06d1c3bba1c38be3ea7d0..c4317f115117fa83bd4ed840bc8aa6ba40e371d5 100644 (file)
@@ -12,7 +12,7 @@
 @syncodeindex fn cp
 
 @copying
-This manual is for ERC version 5.1.3.
+This manual is for ERC version 5.1.4.
 
 Copyright @copyright{} 2005, 2006 Free Software Foundation, Inc.