diff options
Diffstat (limited to 'lisp/erc')
-rw-r--r-- | lisp/erc/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/erc/erc.el | 33 |
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. |