aboutsummaryrefslogtreecommitdiff
path: root/modules/erc-config.el
diff options
context:
space:
mode:
Diffstat (limited to 'modules/erc-config.el')
-rw-r--r--modules/erc-config.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/erc-config.el b/modules/erc-config.el
index 3e98a66a3..57d4eb567 100644
--- a/modules/erc-config.el
+++ b/modules/erc-config.el
@@ -1,4 +1,4 @@
-;;; erc-config --- Preferences for Emacs Relay Chat (IRC Client) -*- lexical-binding: t; coding: utf-8; -*-
+;;; erc-config.el --- Preferences for Emacs Relay Chat (IRC Client) -*- lexical-binding: t; coding: utf-8; -*-
;; author Craig Jennings <c@cjennings.net>
;;
;;; Commentary:
@@ -140,6 +140,8 @@ Change this value to use a different nickname.")
server-buffers))
+(require 'system-lib)
+
(defun cj/erc-switch-to-buffer-with-completion ()
"Switch to an ERC buffer using completion.
If no ERC buffers exist, prompt to connect to a server.
@@ -148,7 +150,7 @@ Buffer names are shown with server context for clarity."
(let* ((erc-buffers (erc-buffer-list))
(buffer-names (mapcar #'buffer-name erc-buffers)))
(if buffer-names
- (let ((selected (completing-read "Switch to ERC buffer: " buffer-names nil t)))
+ (let ((selected (completing-read "Switch to ERC buffer: " (cj/completion-table 'buffer buffer-names) nil t)))
(switch-to-buffer selected))
(message "No ERC buffers found.")
(when (y-or-n-p "Connect to an IRC server? ")