[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master fdd8b5913b: Add rcirc-cycle-completion-flag
From: |
Philip Kaludercic |
Subject: |
master fdd8b5913b: Add rcirc-cycle-completion-flag |
Date: |
Fri, 15 Apr 2022 11:12:04 -0400 (EDT) |
branch: master
commit fdd8b5913baa3a8f7cbb8b51ad6d092a41c04a90
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>
Add rcirc-cycle-completion-flag
* doc/misc/rcirc.texi: Document new option.
* lisp/net/rcirc.el (rcirc-cycle-completion-flag): Add new option.
(rcirc-mode): Respect new option.
---
doc/misc/rcirc.texi | 3 +++
etc/NEWS | 6 ++++++
lisp/net/rcirc.el | 17 ++++++++++++++++-
3 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/doc/misc/rcirc.texi b/doc/misc/rcirc.texi
index b18ab2a6b2..8253e40408 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 350a4f6da1..7d474ac107 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 9d1600ed72..5fe65cc7b3 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))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master fdd8b5913b: Add rcirc-cycle-completion-flag,
Philip Kaludercic <=