emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] rcirc: support TLS/SSL and arbitrary connection method


From: Marco Pessotto
Subject: Re: [PATCH] rcirc: support TLS/SSL and arbitrary connection method
Date: Tue, 31 May 2011 17:35:21 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> I prefer to have the colors stripped out, because [IMHO] they are just
>> lame.
>
>>   "rcirc is a next generation IRC client. It blends seamlessly with the
>>   rest of emacs, it’s tight, fast, and doesn’t light up like a christmas
>>   tree." -- http://www.emacswiki.org/emacs/rcirc
>
>> I believe the colors are part of the christmas tree ;-)
>
> I can relate to that.  Could you send a new patch relative to Emacs
> trunk's version of rcirc.el?
>

It's kind of trivial, but that's it.

=== modified file 'lisp/net/rcirc.el'
--- lisp/net/rcirc.el   2011-05-30 12:23:56 +0000
+++ lisp/net/rcirc.el   2011-05-31 15:07:58 +0000
@@ -1451,7 +1451,8 @@
       (- rcirc-current-line last-activity-line))))
 
 (defvar rcirc-markup-text-functions
-  '(rcirc-markup-attributes
+  '(rcirc-markup-strip-irc-colors
+    rcirc-markup-attributes
     rcirc-markup-my-nick
     rcirc-markup-urls
     rcirc-markup-keywords
@@ -2370,6 +2371,10 @@
   (insert (rcirc-facify (format-time-string rcirc-time-format)
                        'rcirc-timestamp)))
 
+(defun rcirc-markup-strip-irc-colors (sender response)
+  (while (re-search-forward "\C-c\\([0-9][0-9]?\\(,[0-9][0-9]?\\)?\\)?" nil t)
+    (delete-region (match-beginning 0) (match-end 0))))
+
 (defun rcirc-markup-attributes (sender response)
   (while (re-search-forward "\\([\C-b\C-_\C-v]\\).*?\\(\\1\\|\C-o\\)" nil t)
     (rcirc-add-face (match-beginning 0) (match-end 0)

Best wishes

-- 
Marco

reply via email to

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