summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/misc/rcirc.texi3
-rw-r--r--etc/NEWS6
-rw-r--r--lisp/net/rcirc.el17
3 files changed, 25 insertions, 1 deletions
diff --git a/doc/misc/rcirc.texi b/doc/misc/rcirc.texi
index b18ab2a6b29..8253e404084 100644
--- a/doc/misc/rcirc.texi
+++ b/doc/misc/rcirc.texi
@@ -154,8 +154,11 @@ deego: fsbot rules!
@cindex nick completion
@cindex completion of nicks
+@vindex rcirc-cycle-completion-flag
@kindex TAB
Since this is so common, you can use @key{TAB} to do nick completion.
+By default rcirc will use the default completion system, but you can
+enable @code{rcirc-cycle-completion-flag} to cycle nicks in place.
@node Getting started with rcirc
@section Getting started with rcirc
diff --git a/etc/NEWS b/etc/NEWS
index 350a4f6da14..7d474ac107f 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -506,6 +506,12 @@ are met. The conditions are given by the argument, which can be
+++
*** New command 'rcirc-when'.
++++
+*** New user option 'rcirc-cycle-completion-flag'.
+Rcirc will use the default 'completion-at-point' mechanism. The
+conventional IRC behaviour of completing by cycling through the
+available options can be restored by enabling this option.
+
* Editing Changes in Emacs 29.1
---
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index 9d1600ed72f..5fe65cc7b3e 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -433,6 +433,20 @@ will be killed."
:version "28.1"
:type 'boolean)
+(defcustom rcirc-cycle-completion-flag nil
+ "Non-nil means to use cycling for completion in rcirc buffers.
+See the Info node `(emacs) Completion Options' for background on
+what cycling completion means."
+ :version "29.1"
+ :set (lambda (sym val)
+ (dolist (buf (match-buffers '(major-mode . rcirc-mode)))
+ (with-current-buffer buf
+ (if val
+ (setq-local completion-cycle-threshold t)
+ (kill-local-variable 'completion-cycle-threshold))))
+ (set-default sym val))
+ :type 'boolean)
+
(defvar-local rcirc-nick nil
"The nickname used for the current connection.")
@@ -1434,7 +1448,8 @@ PROCESS is the process object used for communication.
(add-hook 'completion-at-point-functions
'rcirc-completion-at-point nil 'local)
- (setq-local completion-cycle-threshold t)
+ (when rcirc-cycle-completion-flag
+ (setq-local completion-cycle-threshold t))
(run-mode-hooks 'rcirc-mode-hook))