[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cleaning up rcirc

From: Philip Kaludercic
Subject: Cleaning up rcirc
Date: Fri, 04 Jun 2021 15:16:09 +0000


I attach a series of patches suggesting a few improvements and things
that can be cleaned up. The background is that I am planning to
implement support for IRCv3, and these are issues I noticed while
reading through the code.

I'll summarize the changes here:

- 0001: Use libera.chat instead of freenode.net. This might be
  controversial, but besides that it also checks if gnutls is
- 0002: Use auth-source to check if the user has a password for the
  current server. I suggest this because my personal bouncer has a
  server, and I am currently querying .authinfo.gpg every time during
  startup. This needlessly slows down my startup time.
- 0003: Instead of duplicating a regular expression for URLs, use the
  one defined in browse-url.
- 0004: This is big changeset attempting to document every variable and
  function. There was a lot of missing documentation, from what I see
  since the first time rcirc was imported ~16 years ago, that I guess
  nobody ever bothered to document.
- 0005: I merged the command formatting functionality into
  rcirc-send-string itself, while preserving backwards
  compatibility. This removes a lot of duplicate and hack'y code around
  formatting IRC commands
- 0006: Instead of having rcirc-process-input-line call
  rcirc-process-command that in turn calls rcirc-process-message if
  the command is escaped, check if a command was escaped in 
- 0007: rcirc-mode was a function, and not a "derived mode". This patch
  tries to convert rcirc-mode into a proper major mode, but has to deal
  with the fact that rcirc-mode requires two arguments that have to
  fall away. Instead, rcirc-initialize is used for creating a new buffer
  and setting the major mode. This might require some more hacking to
  fix issues if some external code calls rcirc-mode directly.
- 0008: The function rcirc-delete-process just calls delete-process, and
  has no additional functionality.  From what I see, it used to do more,
  but that was removed a while back, so there should be no need for this
  function any more.
- 0009: The variable rcirc-last-sender appears to have never been used
  or defined, so I dared to remove it.
- 0010: Update the activity string directly after moving to the next
  active buffer. This avoids an annoyance where the mode line is not
  updated, even though you have read new messages.

There is more that can be done (particularly with using when, unless,
subr-x macros, ...), but this is what I managed to root out until now.

        Philip K.

Attachment: 0001-Default-to-libera.chat-instead-of-freenode.net.patch
Description: Text Data

Attachment: 0002-Check-auth-source-for-server-password.patch
Description: Text Data

Attachment: 0003-Define-rcirc-url-regexp-using-browse-url-button-rege.patch
Description: Text Data

Attachment: 0004-Fix-checkdoc-complaints-and-related-issues.patch
Description: Text Data

Attachment: 0005-Improve-formatting-of-rcirc-send-string.patch
Description: Text Data

Attachment: 0006-Recognize-quoted-commands-in-rcirc-process-input-lin.patch
Description: Text Data

Attachment: 0007-Define-rcirc-mode-using-rcirc-initialize.patch
Description: Text Data

Attachment: 0008-Replace-rcirc-delete-process-with-delete-process.patch
Description: Text Data

Attachment: 0009-Remove-unused-variable-rcirc-last-sender.patch
Description: Text Data

Attachment: 0010-Call-rcirc-update-activity-string-after-rcirc-next-a.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]