erc-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Erc-commit] [commit][emacs22] Merged from erc--rel--5.1


From: mwolson
Subject: [Erc-commit] [commit][emacs22] Merged from erc--rel--5.1
Date: Sun, 14 Oct 2007 00:48:17 -0400

commit bb14c89d124124506ac1ab5b4587fd3664896648
Author: Michael Olson <address@hidden>
Date:   Sun Jul 2 05:28:03 2006 +0000

    Merged from erc--rel--5.1
    
    Patches applied:
    
     * address@hidden/erc--rel--5.1--patch-15
       Fix error in /PART, undesired behavior in part-reason-various.
    git-archimport-id: address@hidden/erc--main--0--patch-14

diff --git a/ChangeLog b/ChangeLog
index 920fb2b..9345e9a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2006-07-02  Michael Olson  <address@hidden>
+
+       * erc-backend.el (erc-call-hooks): Fix (stringp nil) error that
+       can happen when doing /PART.
+
+       * erc.el (erc-quit-reason-various-alist)
+       (erc-part-reason-various-alist): In the example, use "^$" as an
+       example, since "" matches anything.
+       (erc-quit-reason-various, erc-part-reason-various): If no argument
+       is given, and no matches are found, use our default reason instead
+       of "nil".
+
 2006-06-27  Michael Olson  <address@hidden>
 
        * erc.el: Update maintainer information and URLs.
diff --git a/erc-backend.el b/erc-backend.el
index 5f86ea5..817a67d 100644
--- a/erc-backend.el
+++ b/erc-backend.el
@@ -851,8 +851,10 @@ Finds hooks by looking in the `erc-server-responses' 
hashtable."
   (let ((hook (or (erc-get-hook (erc-response.command message))
                   'erc-default-server-functions)))
     (run-hook-with-args-until-success hook process message)
-    (with-current-buffer (erc-server-buffer)
-      (run-hook-with-args 'erc-timer-hook (erc-current-time)))))
+    (let ((server-buffer (erc-server-buffer)))
+      (when (buffer-live-p server-buffer)
+        (with-current-buffer server-buffer
+          (run-hook-with-args 'erc-timer-hook (erc-current-time)))))))
 
 (add-hook 'erc-default-server-functions 'erc-handle-unknown-server-response)
 
diff --git a/erc.el b/erc.el
index fdc524a..0dcdba0 100644
--- a/erc.el
+++ b/erc.el
@@ -872,7 +872,7 @@ As an example:
        (\"xmms\" dme:now-playing)
        (\"version\" erc-quit-reason-normal)
        (\"home\" \"Gone home !\")
-       (\"\" \"Default Reason\")))
+       (\"^$\" \"Default Reason\")))
 If the user types \"/quit zippy\", then a Zippy the Pinhead quotation
 will be used as the quit message."
   :group 'erc-quit-and-part
@@ -896,7 +896,7 @@ As an example:
        (\"xmms\" dme:now-playing)
        (\"version\" erc-part-reason-normal)
        (\"home\" \"Gone home !\")
-       (\"\" \"Default Reason\")))
+       (\"^$\" \"Default Reason\")))
 If the user types \"/part zippy\", then a Zippy the Pinhead quotation
 will be used as the part message."
   :group 'erc-quit-and-part
@@ -3058,8 +3058,8 @@ If S is non-nil, it will be used as the quit reason."
     (cond
      ((functionp res) (funcall res))
      ((stringp res) res)
-     ;; hopefully never reached
-     (s))))
+     (s s)
+     (t (erc-quit-reason-normal)))))
 
 (defun erc-part-reason-normal (&optional s)
   "Normal part message.
@@ -3085,7 +3085,8 @@ If S is non-nil, it will be used as the quit reason."
     (cond
      ((functionp res) (funcall res))
      ((stringp res) res)
-     (s))))
+     (s s)
+     (t (erc-part-reason-normal)))))
 
 (defun erc-cmd-QUIT (reason)
   "Disconnect from the current server.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]