From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ryan Yeske Newsgroups: gmane.emacs.devel Subject: rcirc.el update Date: Tue, 25 Apr 2006 11:00:26 -0700 Message-ID: <87zmi9tu11.fsf@cut.bc.hsia.telus.net> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1145988059 1505 80.91.229.2 (25 Apr 2006 18:00:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 25 Apr 2006 18:00:59 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 25 20:00:57 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FYRqD-0005wC-Kj for ged-emacs-devel@m.gmane.org; Tue, 25 Apr 2006 20:00:51 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FYRqD-0002ip-29 for ged-emacs-devel@m.gmane.org; Tue, 25 Apr 2006 14:00:49 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FYRpz-0002hX-R2 for emacs-devel@gnu.org; Tue, 25 Apr 2006 14:00:35 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FYRpz-0002hF-Cw for emacs-devel@gnu.org; Tue, 25 Apr 2006 14:00:35 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FYRpz-0002hC-2I for emacs-devel@gnu.org; Tue, 25 Apr 2006 14:00:35 -0400 Original-Received: from [204.209.205.55] (helo=priv-edmwes34.telusplanet.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FYRsU-0005a3-Ct for emacs-devel@gnu.org; Tue, 25 Apr 2006 14:03:10 -0400 Original-Received: from priv-edmwaa06.telusplanet.net ([207.6.239.189]) by priv-edmwes34.telusplanet.net (InterMail vM.6.01.05.04 201-2131-123-105-20051025) with ESMTP id <20060425180033.FKKR4470.priv-edmwes34.telusplanet.net@priv-edmwaa06.telusplanet.net> for ; Tue, 25 Apr 2006 12:00:33 -0600 Original-Received: from cut.bc.hsia.telus.net (d207-6-239-189.bchsia.telus.net [207.6.239.189]) by priv-edmwaa06.telusplanet.net (BorderWare MXtreme Infinity Mail Firewall) with ESMTP id A0D2CGMQ0B for ; Tue, 25 Apr 2006 12:00:32 -0600 (MDT) Original-To: emacs-devel@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:53399 Archived-At: 2006-04-25 Ryan Yeske * rcirc.el (rcirc-print): Revert last change with ignored nicks. (rcirc-toggle-low-priority): Doc fix. (rcirc-handler-NOTICE): Remove beginning of line anchor in ChanServ regexp. (rcirc-startup-channels-alist): Connect to #rcirc by default, not #emacs. (rcirc-bright-nick-regexp, rcirc-dim-nick-regexp): Add variables. (rcirc-decode-coding-system): Use utf-8 as the default. (rcirc-multiline-minor-mode): Set the fill-column. (rcirc-format-response-string): Display bright and dim nicks. (rcirc-browse-url): Update interactive spec to fill ARG. (rcirc-bright-nick, rcirc-dim-nick): Add faces. (rcirc-print): Ignore dim-nick messages wrt modeline-activity. Index: rcirc.el =================================================================== RCS file: /sources/emacs/emacs/lisp/net/rcirc.el,v retrieving revision 1.21 diff -c -r1.21 rcirc.el *** rcirc.el 8 Apr 2006 10:23:24 -0000 1.21 --- rcirc.el 25 Apr 2006 17:47:53 -0000 *************** *** 74,86 **** :group 'rcirc) (defcustom rcirc-default-user-full-name (if (string= (user-full-name) "") ! rcirc-user-name ! (user-full-name)) "The full name sent to the server when connecting." :type 'string :group 'rcirc) ! (defcustom rcirc-startup-channels-alist '(("^irc.freenode.net$" "#emacs")) "Alist of channels to join at startup. Each element looks like (SERVER-REGEXP . CHANNEL-LIST)." :type '(alist :key-type string :value-type (repeat string)) --- 74,86 ---- :group 'rcirc) (defcustom rcirc-default-user-full-name (if (string= (user-full-name) "") ! rcirc-user-name ! (user-full-name)) "The full name sent to the server when connecting." :type 'string :group 'rcirc) ! (defcustom rcirc-startup-channels-alist '(("^irc.freenode.net$" "#rcirc")) "Alist of channels to join at startup. Each element looks like (SERVER-REGEXP . CHANNEL-LIST)." :type '(alist :key-type string :value-type (repeat string)) *************** *** 206,211 **** --- 206,223 ---- Nicks will be removed from the automatic list on follow-up renamings or parts.") + (defcustom rcirc-bright-nick-regexp nil + "Regexp matching nicks to be emphasized. + See `rcirc-bright-nick' face." + :type 'regexp + :group 'rcirc) + + (defcustom rcirc-dim-nick-regexp nil + "Regexp matching nicks to be deemphasized. + See `rcirc-dim-nick' face." + :type 'regexp + :group 'rcirc) + (defcustom rcirc-print-hooks nil "Hook run after text is printed. Called with 5 arguments, PROCESS, SENDER, RESPONSE, TARGET and TEXT." *************** *** 217,223 **** :type 'boolean :group 'rcirc) ! (defcustom rcirc-decode-coding-system 'undecided "Coding system used to decode incoming irc messages." :type 'coding-system :group 'rcirc) --- 229,235 ---- :type 'boolean :group 'rcirc) ! (defcustom rcirc-decode-coding-system 'utf-8 "Coding system used to decode incoming irc messages." :type 'coding-system :group 'rcirc) *************** *** 546,552 **** (with-current-buffer rcirc-server-buffer (or rcirc-nick rcirc-default-nick)))) ! (defvar rcirc-max-message-length 450 "Messages longer than this value will be split.") (defun rcirc-send-message (process target message &optional noticep) --- 558,564 ---- (with-current-buffer rcirc-server-buffer (or rcirc-nick rcirc-default-nick)))) ! (defvar rcirc-max-message-length 420 "Messages longer than this value will be split.") (defun rcirc-send-message (process target message &optional noticep) *************** *** 955,961 **** :global nil :group 'rcirc (make-local-variable 'rcirc-parent-buffer) ! (put 'rcirc-parent-buffer 'permanent-local t)) (defun rcirc-multiline-minor-submit () "Send the text in buffer back to parent buffer." --- 967,974 ---- :global nil :group 'rcirc (make-local-variable 'rcirc-parent-buffer) ! (put 'rcirc-parent-buffer 'permanent-local t) ! (setq fill-column rcirc-max-message-length)) (defun rcirc-multiline-minor-submit () "Send the text in buffer back to parent buffer." *************** *** 1029,1034 **** --- 1042,1048 ---- (split-string (or (cdr (assoc response rcirc-response-formats)) (cdr (assq t rcirc-response-formats))) "%")) + (sender (or sender "")) (result "") (face nil) key face-key repl) *************** *** 1054,1062 **** (rcirc-facify nick (if (eq key ?n) face ! (if (string= sender (rcirc-nick process)) ! 'rcirc-my-nick ! 'rcirc-other-nick))))) ((eq key ?T) ;; %T -- timestamp (rcirc-facify --- 1068,1083 ---- (rcirc-facify nick (if (eq key ?n) face ! (cond ((string= sender (rcirc-nick process)) ! 'rcirc-my-nick) ! ((and rcirc-bright-nick-regexp ! (string-match rcirc-bright-nick-regexp sender)) ! 'rcirc-bright-nick) ! ((and rcirc-dim-nick-regexp ! (string-match rcirc-dim-nick-regexp sender)) ! 'rcirc-dim-nick) ! (t ! 'rcirc-other-nick)))))) ((eq key ?T) ;; %T -- timestamp (rcirc-facify *************** *** 1130,1137 **** (or text (setq text "")) (unless (or (member sender rcirc-ignore-list) (member (with-syntax-table rcirc-nick-syntax-table ! (when (string-match "^\\([^/]\\w*\\)\\b" text) ! (match-string 1 text))) rcirc-ignore-list)) (let* ((buffer (rcirc-target-buffer process sender response target text)) (inhibit-read-only t)) (with-current-buffer buffer --- 1151,1159 ---- (or text (setq text "")) (unless (or (member sender rcirc-ignore-list) (member (with-syntax-table rcirc-nick-syntax-table ! (when (string-match "^\\([^/]\\w*\\)[:,]" text) ! (match-string 1 text))) ! rcirc-ignore-list)) (let* ((buffer (rcirc-target-buffer process sender response target text)) (inhibit-read-only t)) (with-current-buffer buffer *************** *** 1222,1231 **** (regexp-quote (rcirc-nick process)) "\\b") text))) ! (when (or (not rcirc-ignore-buffer-activity-flag) ! ;; always notice when our nick is mentioned, even ! ;; if ignoring channel activity ! nick-match) (rcirc-record-activity (current-buffer) (when (or nick-match (and (not (rcirc-channel-p rcirc-target)) --- 1244,1255 ---- (regexp-quote (rcirc-nick process)) "\\b") text))) ! (when (if rcirc-ignore-buffer-activity-flag ! ;; - Always notice when our nick is mentioned ! nick-match ! ;; - Never bother us if a dim-nick spoke ! (not (and rcirc-dim-nick-regexp sender ! (string-match rcirc-dim-nick-regexp sender)))) (rcirc-record-activity (current-buffer) (when (or nick-match (and (not (rcirc-channel-p rcirc-target)) *************** *** 1375,1381 **** (force-mode-line-update)) (defun rcirc-toggle-low-priority () ! "Toggle the value of `rcirc-ignore-buffer-activity-flag'." (interactive) (setq rcirc-low-priority-flag (not rcirc-low-priority-flag)) --- 1399,1405 ---- (force-mode-line-update)) (defun rcirc-toggle-low-priority () ! "Toggle the value of `rcirc-low-priority-flag'." (interactive) (setq rcirc-low-priority-flag (not rcirc-low-priority-flag)) *************** *** 1788,1794 **** (defun rcirc-browse-url (&optional arg) "Prompt for URL to browse based on URLs in buffer." ! (interactive) (let ((completions (mapcar (lambda (x) (cons x nil)) rcirc-urls)) (initial-input (car rcirc-urls)) (history (cdr rcirc-urls))) --- 1812,1818 ---- (defun rcirc-browse-url (&optional arg) "Prompt for URL to browse based on URLs in buffer." ! (interactive "P") (let ((completions (mapcar (lambda (x) (cons x nil)) rcirc-urls)) (initial-input (car rcirc-urls)) (history (cdr rcirc-urls))) *************** *** 1910,1916 **** (cond ((rcirc-channel-p target) target) ;;; -ChanServ- [#gnu] Welcome... ! ((string-match "^\\[\\(#[^ ]+\\)\\]" message) (match-string 1 message)) (sender (if (string= sender (rcirc-server-name process)) --- 1934,1940 ---- (cond ((rcirc-channel-p target) target) ;;; -ChanServ- [#gnu] Welcome... ! ((string-match "\\[\\(#[^\] ]+\\)\\]" message) (match-string 1 message)) (sender (if (string= sender (rcirc-server-name process)) *************** *** 2211,2216 **** --- 2235,2259 ---- "The face used to highlight other messages." :group 'rcirc-faces) + (defface rcirc-bright-nick + '((((class grayscale) (background light)) + (:foreground "LightGray" :weight bold :underline t)) + (((class grayscale) (background dark)) + (:foreground "Gray50" :weight bold :underline t)) + (((class color) (min-colors 88) (background light)) (:foreground "CadetBlue")) + (((class color) (min-colors 88) (background dark)) (:foreground "Aquamarine")) + (((class color) (min-colors 16) (background light)) (:foreground "CadetBlue")) + (((class color) (min-colors 16) (background dark)) (:foreground "Aquamarine")) + (((class color) (min-colors 8)) (:foreground "magenta")) + (t (:weight bold :underline t))) + "Face used for nicks matched by `rcirc-bright-nick-regexp'." + :group 'rcirc-faces) + + (defface rcirc-dim-nick + '((t :inherit default)) + "Face used for nicks matched by `rcirc-dim-nick-regexp'." + :group 'rcirc-faces) + (defface rcirc-server ; font-lock-comment-face '((((class grayscale) (background light)) (:foreground "DimGray" :weight bold :slant italic))