summaryrefslogtreecommitdiff
path: root/lisp/erc
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2006-12-13 02:36:31 +0000
committerMiles Bader <miles@gnu.org>2006-12-13 02:36:31 +0000
commit16e62ecc3db9ed1f69f95e65e8d99754531bf28f (patch)
tree973a8ea88e88aa867539502b68c7d6fb1a655958 /lisp/erc
parent7976eda061f35aadc586601e8f0040eac26dc1e0 (diff)
downloademacs-16e62ecc3db9ed1f69f95e65e8d99754531bf28f.tar.gz
erc-iswitchb: Temporarily enable iswitchb mode
* erc.el: (erc-iswitchb): Temporarily enable iswitchb mode if it isn't active already, instead of leaving it on. Revision: emacs@sv.gnu.org/emacs--devo--0--patch-555 Creator: Michael Olson <mwolson@gnu.org>
Diffstat (limited to 'lisp/erc')
-rw-r--r--lisp/erc/ChangeLog5
-rw-r--r--lisp/erc/erc.el33
2 files changed, 23 insertions, 15 deletions
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog
index c9e3f5bb398..c8c1cb56b54 100644
--- a/lisp/erc/ChangeLog
+++ b/lisp/erc/ChangeLog
@@ -1,3 +1,8 @@
+2006-12-13 Leo <sdl.web@gmail.com>
+
+ * erc.el (erc-iswitchb): Temporarily enable iswitchb mode if it
+ isn't active already, instead of leaving it on.
+
2006-12-10 Juanma Barranquero <lekktu@gmail.com>
* erc-ezbounce.el (erc-ezb-init-session-list): Doc fix.
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index 9426a7ce00c..7de2828b86d 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -1668,22 +1668,25 @@ If `erc-track-mode' is in enabled, put the last element of
Due to some yet unresolved reason, global function `iswitchb-mode'
needs to be active for this function to work."
(interactive "P")
- (eval-and-compile
+ (eval-when-compile
(require 'iswitchb))
- (let ((iswitchb-make-buflist-hook
- (lambda ()
- (setq iswitchb-temp-buflist
- (mapcar 'buffer-name
- (erc-buffer-list
- nil
- (when arg erc-server-process)))))))
- (switch-to-buffer
- (iswitchb-read-buffer
- "Switch-to: "
- (if (boundp 'erc-modified-channels-alist)
- (buffer-name (caar (last erc-modified-channels-alist)))
- nil)
- t))))
+ (let ((enabled iswitchb-mode))
+ (or enabled (iswitchb-mode 1))
+ (let ((iswitchb-make-buflist-hook
+ (lambda ()
+ (setq iswitchb-temp-buflist
+ (mapcar 'buffer-name
+ (erc-buffer-list
+ nil
+ (when arg erc-server-process)))))))
+ (switch-to-buffer
+ (iswitchb-read-buffer
+ "Switch-to: "
+ (if (boundp 'erc-modified-channels-alist)
+ (buffer-name (caar (last erc-modified-channels-alist)))
+ nil)
+ t)))
+ (or enabled (iswitchb-mode -1))))
(defun erc-channel-list (proc)
"Return a list of channel buffers.