diff options
author | Philip Kaludercic <philipk@posteo.net> | 2022-03-12 22:18:49 +0100 |
---|---|---|
committer | Philip Kaludercic <philipk@posteo.net> | 2022-04-15 17:10:45 +0200 |
commit | fdd8b5913baa3a8f7cbb8b51ad6d092a41c04a90 (patch) | |
tree | caf4e41e547dfec16ed8209774e67a0eff482575 | |
parent | dfee2790549df4be0fa841a00faafb50c9347f30 (diff) | |
download | emacs-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.
-rw-r--r-- | doc/misc/rcirc.texi | 3 | ||||
-rw-r--r-- | etc/NEWS | 6 | ||||
-rw-r--r-- | lisp/net/rcirc.el | 17 |
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 @@ -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)) |