From: Daniel Ralston <wubbulous@gmail.com>
To: 12857@debbugs.gnu.org
Subject: bug#12857: rcirc.el: make default PART and QUIT reasons customizable
Date: Sat, 10 Nov 2012 13:43:52 -0800 [thread overview]
Message-ID: <CADWcrk788nmJgdiGLAOXaPPMoS+6FuGGPMWxH3vw7ttcoYuntg@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 764 bytes --]
If no other reason is given for parting or quitting with
rcirc-cmd-part or rcirc-cmd-quit, rcirc will use the value of
rcirc-id-string: "rcirc on GNU Emacs <version>". Kinda stuffy.
This patch adds two customizable variables to rcirc:
rcirc-default-part-reason and rcirc-default-quit-reason. The above
commands will use these variables as the default part/quit reason if
they are set. If they are left nil, rcirc will fallback to its current
behaviour, and use the value of rcirc-id-string.
Changelog entry:
2012-11-10 Daniel Ralston <Wubbulous@gmail.com>
* rcirc.el: Make the default PART and QUIT reasons used by
rcirc-cmd-part and rcirc-cmd-quit customizable.
(rcirc-default-part-reason,rcirc-default-quit-reason): New
customizable vars.
[-- Attachment #2: rcirc-default-reasons.patch --]
[-- Type: application/octet-stream, Size: 2138 bytes --]
=== modified file 'lisp/net/rcirc.el'
*** lisp/net/rcirc.el 2012-10-23 15:06:07 +0000
--- lisp/net/rcirc.el 2012-11-10 20:47:21 +0000
*************** for connections using SSL/TLS."
*** 138,143 ****
--- 138,155 ----
:type 'string
:group 'rcirc)
+ (defcustom rcirc-default-part-reason nil
+ "The default reason to send when parting from a channel. If
+ nil, use the value of rcirc-id-string instead."
+ :type 'string
+ :group 'rcirc)
+
+ (defcustom rcirc-default-quit-reason nil
+ "The default reason to send when quitting a server. If nil, use
+ the value of rcirc-id-string instead."
+ :type 'string
+ :group 'rcirc)
+
(defcustom rcirc-fill-flag t
"Non-nil means line-wrap messages printed in channel buffers."
:type 'boolean
*************** CHANNELS is a comma- or space-separated
*** 2199,2205 ****
"Part CHANNEL."
(interactive "sPart channel: ")
(let ((channel (if (> (length channel) 0) channel target)))
! (rcirc-send-string process (concat "PART " channel " :" rcirc-id-string))))
(defun-rcirc-command quit (reason)
"Send a quit message to server with REASON."
--- 2211,2219 ----
"Part CHANNEL."
(interactive "sPart channel: ")
(let ((channel (if (> (length channel) 0) channel target)))
! (rcirc-send-string process (concat "PART " channel " :"
! (or rcirc-default-part-reason
! rcirc-id-string)))))
(defun-rcirc-command quit (reason)
"Send a quit message to server with REASON."
*************** CHANNELS is a comma- or space-separated
*** 2207,2213 ****
(rcirc-send-string process (concat "QUIT :"
(if (not (zerop (length reason)))
reason
! rcirc-id-string))))
(defun-rcirc-command nick (nick)
"Change nick to NICK."
--- 2221,2228 ----
(rcirc-send-string process (concat "QUIT :"
(if (not (zerop (length reason)))
reason
! (or rcirc-default-quit-reason
! rcirc-id-string)))))
(defun-rcirc-command nick (nick)
"Change nick to NICK."
next reply other threads:[~2012-11-10 21:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-10 21:43 Daniel Ralston [this message]
2012-11-23 17:25 ` bug#12857: rcirc.el: make default PART and QUIT reasons customizable Deniz Dogan
[not found] ` <50BE7E86.9020601@dogan.se>
2012-12-13 15:05 ` bug#12857: " Daniel Ralston
2016-02-24 6:02 ` Lars Ingebrigtsen
2019-06-02 0:11 ` Noam Postavsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CADWcrk788nmJgdiGLAOXaPPMoS+6FuGGPMWxH3vw7ttcoYuntg@mail.gmail.com \
--to=wubbulous@gmail.com \
--cc=12857@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).