diff options
| author | Miles Bader | 2006-12-13 02:36:31 +0000 |
|---|---|---|
| committer | Miles Bader | 2006-12-13 02:36:31 +0000 |
| commit | 16e62ecc3db9ed1f69f95e65e8d99754531bf28f (patch) | |
| tree | 973a8ea88e88aa867539502b68c7d6fb1a655958 | |
| parent | 7976eda061f35aadc586601e8f0040eac26dc1e0 (diff) | |
| download | emacs-16e62ecc3db9ed1f69f95e65e8d99754531bf28f.tar.gz emacs-16e62ecc3db9ed1f69f95e65e8d99754531bf28f.zip | |
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>
| -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 @@ | |||
| 1 | 2006-12-13 Leo <sdl.web@gmail.com> | ||
| 2 | |||
| 3 | * erc.el (erc-iswitchb): Temporarily enable iswitchb mode if it | ||
| 4 | isn't active already, instead of leaving it on. | ||
| 5 | |||
| 1 | 2006-12-10 Juanma Barranquero <lekktu@gmail.com> | 6 | 2006-12-10 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 7 | ||
| 3 | * erc-ezbounce.el (erc-ezb-init-session-list): Doc fix. | 8 | * 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 | |||
| 1668 | Due to some yet unresolved reason, global function `iswitchb-mode' | 1668 | Due to some yet unresolved reason, global function `iswitchb-mode' |
| 1669 | needs to be active for this function to work." | 1669 | needs to be active for this function to work." |
| 1670 | (interactive "P") | 1670 | (interactive "P") |
| 1671 | (eval-and-compile | 1671 | (eval-when-compile |
| 1672 | (require 'iswitchb)) | 1672 | (require 'iswitchb)) |
| 1673 | (let ((iswitchb-make-buflist-hook | 1673 | (let ((enabled iswitchb-mode)) |
| 1674 | (lambda () | 1674 | (or enabled (iswitchb-mode 1)) |
| 1675 | (setq iswitchb-temp-buflist | 1675 | (let ((iswitchb-make-buflist-hook |
| 1676 | (mapcar 'buffer-name | 1676 | (lambda () |
| 1677 | (erc-buffer-list | 1677 | (setq iswitchb-temp-buflist |
| 1678 | nil | 1678 | (mapcar 'buffer-name |
| 1679 | (when arg erc-server-process))))))) | 1679 | (erc-buffer-list |
| 1680 | (switch-to-buffer | 1680 | nil |
| 1681 | (iswitchb-read-buffer | 1681 | (when arg erc-server-process))))))) |
| 1682 | "Switch-to: " | 1682 | (switch-to-buffer |
| 1683 | (if (boundp 'erc-modified-channels-alist) | 1683 | (iswitchb-read-buffer |
| 1684 | (buffer-name (caar (last erc-modified-channels-alist))) | 1684 | "Switch-to: " |
| 1685 | nil) | 1685 | (if (boundp 'erc-modified-channels-alist) |
| 1686 | t)))) | 1686 | (buffer-name (caar (last erc-modified-channels-alist))) |
| 1687 | nil) | ||
| 1688 | t))) | ||
| 1689 | (or enabled (iswitchb-mode -1)))) | ||
| 1687 | 1690 | ||
| 1688 | (defun erc-channel-list (proc) | 1691 | (defun erc-channel-list (proc) |
| 1689 | "Return a list of channel buffers. | 1692 | "Return a list of channel buffers. |