summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorPhilip Kaludercic <philipk@posteo.net>2022-03-12 22:18:49 +0100
committerPhilip Kaludercic <philipk@posteo.net>2022-04-15 17:10:45 +0200
commitfdd8b5913baa3a8f7cbb8b51ad6d092a41c04a90 (patch)
treecaf4e41e547dfec16ed8209774e67a0eff482575 /lisp
parentdfee2790549df4be0fa841a00faafb50c9347f30 (diff)
downloademacs-fdd8b5913baa3a8f7cbb8b51ad6d092a41c04a90.tar.gz
emacs-fdd8b5913baa3a8f7cbb8b51ad6d092a41c04a90.tar.bz2
emacs-fdd8b5913baa3a8f7cbb8b51ad6d092a41c04a90.zip
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.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/net/rcirc.el17
1 files changed, 16 insertions, 1 deletions
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))