[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Erc-commit] [commit][emacs22] Make erc-active-buffer command a bit safe
From: |
mwolson |
Subject: |
[Erc-commit] [commit][emacs22] Make erc-active-buffer command a bit safer. |
Date: |
Sun, 14 Oct 2007 00:48:16 -0400 |
commit ed6786aa78b18f5e3a92d15b2cb8229d766fde85
Author: Michael Olson <address@hidden>
Date: Wed Jun 14 21:29:42 2006 +0000
Make erc-active-buffer command a bit safer.
* erc.el (erc-active-buffer): If the active buffer has been deleted,
default to the server buffer.
git-archimport-id: address@hidden/erc--main--0--patch-8
diff --git a/ChangeLog b/ChangeLog
index 167a705..16ae791 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-06-14 Michael Olson <address@hidden>
+
+ * erc.el (erc-active-buffer): If the active buffer has been
+ deleted, default to the server buffer.
+
2006-06-12 Michael Olson <address@hidden>
* NEWS: Add items since the 5.1.2 release.
diff --git a/erc.el b/erc.el
index c3c2a54..76ef789 100644
--- a/erc.el
+++ b/erc.el
@@ -1373,7 +1373,10 @@ server buffer")
(defun erc-active-buffer ()
"Return the value of `erc-active-buffer' for the current server.
Defaults to the server buffer."
- (with-current-buffer (erc-server-buffer) erc-active-buffer))
+ (with-current-buffer (erc-server-buffer)
+ (if (buffer-live-p erc-active-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."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Erc-commit] [commit][emacs22] Make erc-active-buffer command a bit safer.,
mwolson <=