diff options
| author | Miles Bader | 2006-04-26 03:09:31 +0000 |
|---|---|---|
| committer | Miles Bader | 2006-04-26 03:09:31 +0000 |
| commit | 02f47e8630d483a99fc20f1011c252004658e05c (patch) | |
| tree | 6d3f7f6c6bbf3a7a35ac87c13a3251c57223c2ff | |
| parent | 6a7250d806dadd555a9a22c42b0bb51c73327dba (diff) | |
| download | emacs-02f47e8630d483a99fc20f1011c252004658e05c.tar.gz emacs-02f47e8630d483a99fc20f1011c252004658e05c.zip | |
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-247
Rcirc patch from Ryan Yeske
2006-04-25 Ryan Yeske <rcyeske@gmail.com>
* lisp/net/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.
| -rw-r--r-- | lisp/ChangeLog | 16 | ||||
| -rw-r--r-- | lisp/net/rcirc.el | 79 |
2 files changed, 77 insertions, 18 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e0c6bad6cbb..487c79cfe0d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,19 @@ | |||
| 1 | 2006-04-25 Ryan Yeske <rcyeske@gmail.com> | ||
| 2 | |||
| 3 | * net/rcirc.el (rcirc-print): Revert last change with ignored nicks. | ||
| 4 | (rcirc-toggle-low-priority): Doc fix. | ||
| 5 | (rcirc-handler-NOTICE): Remove beginning of line anchor in | ||
| 6 | ChanServ regexp. | ||
| 7 | (rcirc-startup-channels-alist): Connect to #rcirc by default, not | ||
| 8 | #emacs. | ||
| 9 | (rcirc-bright-nick-regexp, rcirc-dim-nick-regexp): Add variables. | ||
| 10 | (rcirc-decode-coding-system): Use utf-8 as the default. | ||
| 11 | (rcirc-multiline-minor-mode): Set the fill-column. | ||
| 12 | (rcirc-format-response-string): Display bright and dim nicks. | ||
| 13 | (rcirc-browse-url): Update interactive spec to fill ARG. | ||
| 14 | (rcirc-bright-nick, rcirc-dim-nick): Add faces. | ||
| 15 | (rcirc-print): Ignore dim-nick messages wrt modeline-activity. | ||
| 16 | |||
| 1 | 2006-04-24 J.D. Smith <jdsmith@as.arizona.edu> | 17 | 2006-04-24 J.D. Smith <jdsmith@as.arizona.edu> |
| 2 | 18 | ||
| 3 | * textmodes/bibtex.el (bibtex-find-entry): Don't demand matching | 19 | * textmodes/bibtex.el (bibtex-find-entry): Don't demand matching |
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index 53703166e64..a0b328413b0 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el | |||
| @@ -74,13 +74,13 @@ | |||
| 74 | :group 'rcirc) | 74 | :group 'rcirc) |
| 75 | 75 | ||
| 76 | (defcustom rcirc-default-user-full-name (if (string= (user-full-name) "") | 76 | (defcustom rcirc-default-user-full-name (if (string= (user-full-name) "") |
| 77 | rcirc-user-name | 77 | rcirc-user-name |
| 78 | (user-full-name)) | 78 | (user-full-name)) |
| 79 | "The full name sent to the server when connecting." | 79 | "The full name sent to the server when connecting." |
| 80 | :type 'string | 80 | :type 'string |
| 81 | :group 'rcirc) | 81 | :group 'rcirc) |
| 82 | 82 | ||
| 83 | (defcustom rcirc-startup-channels-alist '(("^irc.freenode.net$" "#emacs")) | 83 | (defcustom rcirc-startup-channels-alist '(("^irc.freenode.net$" "#rcirc")) |
| 84 | "Alist of channels to join at startup. | 84 | "Alist of channels to join at startup. |
| 85 | Each element looks like (SERVER-REGEXP . CHANNEL-LIST)." | 85 | Each element looks like (SERVER-REGEXP . CHANNEL-LIST)." |
| 86 | :type '(alist :key-type string :value-type (repeat string)) | 86 | :type '(alist :key-type string :value-type (repeat string)) |
| @@ -206,6 +206,18 @@ When an ignored person renames, their nick is added to both lists. | |||
| 206 | Nicks will be removed from the automatic list on follow-up renamings or | 206 | Nicks will be removed from the automatic list on follow-up renamings or |
| 207 | parts.") | 207 | parts.") |
| 208 | 208 | ||
| 209 | (defcustom rcirc-bright-nick-regexp nil | ||
| 210 | "Regexp matching nicks to be emphasized. | ||
| 211 | See `rcirc-bright-nick' face." | ||
| 212 | :type 'regexp | ||
| 213 | :group 'rcirc) | ||
| 214 | |||
| 215 | (defcustom rcirc-dim-nick-regexp nil | ||
| 216 | "Regexp matching nicks to be deemphasized. | ||
| 217 | See `rcirc-dim-nick' face." | ||
| 218 | :type 'regexp | ||
| 219 | :group 'rcirc) | ||
| 220 | |||
| 209 | (defcustom rcirc-print-hooks nil | 221 | (defcustom rcirc-print-hooks nil |
| 210 | "Hook run after text is printed. | 222 | "Hook run after text is printed. |
| 211 | Called with 5 arguments, PROCESS, SENDER, RESPONSE, TARGET and TEXT." | 223 | Called with 5 arguments, PROCESS, SENDER, RESPONSE, TARGET and TEXT." |
| @@ -217,7 +229,7 @@ Called with 5 arguments, PROCESS, SENDER, RESPONSE, TARGET and TEXT." | |||
| 217 | :type 'boolean | 229 | :type 'boolean |
| 218 | :group 'rcirc) | 230 | :group 'rcirc) |
| 219 | 231 | ||
| 220 | (defcustom rcirc-decode-coding-system 'undecided | 232 | (defcustom rcirc-decode-coding-system 'utf-8 |
| 221 | "Coding system used to decode incoming irc messages." | 233 | "Coding system used to decode incoming irc messages." |
| 222 | :type 'coding-system | 234 | :type 'coding-system |
| 223 | :group 'rcirc) | 235 | :group 'rcirc) |
| @@ -546,7 +558,7 @@ With no argument or nil as argument, use the current buffer." | |||
| 546 | (with-current-buffer rcirc-server-buffer | 558 | (with-current-buffer rcirc-server-buffer |
| 547 | (or rcirc-nick rcirc-default-nick)))) | 559 | (or rcirc-nick rcirc-default-nick)))) |
| 548 | 560 | ||
| 549 | (defvar rcirc-max-message-length 450 | 561 | (defvar rcirc-max-message-length 420 |
| 550 | "Messages longer than this value will be split.") | 562 | "Messages longer than this value will be split.") |
| 551 | 563 | ||
| 552 | (defun rcirc-send-message (process target message &optional noticep) | 564 | (defun rcirc-send-message (process target message &optional noticep) |
| @@ -955,7 +967,8 @@ Create the buffer if it doesn't exist." | |||
| 955 | :global nil | 967 | :global nil |
| 956 | :group 'rcirc | 968 | :group 'rcirc |
| 957 | (make-local-variable 'rcirc-parent-buffer) | 969 | (make-local-variable 'rcirc-parent-buffer) |
| 958 | (put 'rcirc-parent-buffer 'permanent-local t)) | 970 | (put 'rcirc-parent-buffer 'permanent-local t) |
| 971 | (setq fill-column rcirc-max-message-length)) | ||
| 959 | 972 | ||
| 960 | (defun rcirc-multiline-minor-submit () | 973 | (defun rcirc-multiline-minor-submit () |
| 961 | "Send the text in buffer back to parent buffer." | 974 | "Send the text in buffer back to parent buffer." |
| @@ -1029,6 +1042,7 @@ is found by looking up RESPONSE in `rcirc-response-formats'." | |||
| 1029 | (split-string (or (cdr (assoc response rcirc-response-formats)) | 1042 | (split-string (or (cdr (assoc response rcirc-response-formats)) |
| 1030 | (cdr (assq t rcirc-response-formats))) | 1043 | (cdr (assq t rcirc-response-formats))) |
| 1031 | "%")) | 1044 | "%")) |
| 1045 | (sender (or sender "")) | ||
| 1032 | (result "") | 1046 | (result "") |
| 1033 | (face nil) | 1047 | (face nil) |
| 1034 | key face-key repl) | 1048 | key face-key repl) |
| @@ -1054,9 +1068,16 @@ is found by looking up RESPONSE in `rcirc-response-formats'." | |||
| 1054 | (rcirc-facify nick | 1068 | (rcirc-facify nick |
| 1055 | (if (eq key ?n) | 1069 | (if (eq key ?n) |
| 1056 | face | 1070 | face |
| 1057 | (if (string= sender (rcirc-nick process)) | 1071 | (cond ((string= sender (rcirc-nick process)) |
| 1058 | 'rcirc-my-nick | 1072 | 'rcirc-my-nick) |
| 1059 | 'rcirc-other-nick))))) | 1073 | ((and rcirc-bright-nick-regexp |
| 1074 | (string-match rcirc-bright-nick-regexp sender)) | ||
| 1075 | 'rcirc-bright-nick) | ||
| 1076 | ((and rcirc-dim-nick-regexp | ||
| 1077 | (string-match rcirc-dim-nick-regexp sender)) | ||
| 1078 | 'rcirc-dim-nick) | ||
| 1079 | (t | ||
| 1080 | 'rcirc-other-nick)))))) | ||
| 1060 | ((eq key ?T) | 1081 | ((eq key ?T) |
| 1061 | ;; %T -- timestamp | 1082 | ;; %T -- timestamp |
| 1062 | (rcirc-facify | 1083 | (rcirc-facify |
| @@ -1130,8 +1151,9 @@ record activity." | |||
| 1130 | (or text (setq text "")) | 1151 | (or text (setq text "")) |
| 1131 | (unless (or (member sender rcirc-ignore-list) | 1152 | (unless (or (member sender rcirc-ignore-list) |
| 1132 | (member (with-syntax-table rcirc-nick-syntax-table | 1153 | (member (with-syntax-table rcirc-nick-syntax-table |
| 1133 | (when (string-match "^\\([^/]\\w*\\)\\b" text) | 1154 | (when (string-match "^\\([^/]\\w*\\)[:,]" text) |
| 1134 | (match-string 1 text))) rcirc-ignore-list)) | 1155 | (match-string 1 text))) |
| 1156 | rcirc-ignore-list)) | ||
| 1135 | (let* ((buffer (rcirc-target-buffer process sender response target text)) | 1157 | (let* ((buffer (rcirc-target-buffer process sender response target text)) |
| 1136 | (inhibit-read-only t)) | 1158 | (inhibit-read-only t)) |
| 1137 | (with-current-buffer buffer | 1159 | (with-current-buffer buffer |
| @@ -1222,10 +1244,12 @@ record activity." | |||
| 1222 | (regexp-quote (rcirc-nick process)) | 1244 | (regexp-quote (rcirc-nick process)) |
| 1223 | "\\b") | 1245 | "\\b") |
| 1224 | text))) | 1246 | text))) |
| 1225 | (when (or (not rcirc-ignore-buffer-activity-flag) | 1247 | (when (if rcirc-ignore-buffer-activity-flag |
| 1226 | ;; always notice when our nick is mentioned, even | 1248 | ;; - Always notice when our nick is mentioned |
| 1227 | ;; if ignoring channel activity | 1249 | nick-match |
| 1228 | nick-match) | 1250 | ;; - Never bother us if a dim-nick spoke |
| 1251 | (not (and rcirc-dim-nick-regexp sender | ||
| 1252 | (string-match rcirc-dim-nick-regexp sender)))) | ||
| 1229 | (rcirc-record-activity | 1253 | (rcirc-record-activity |
| 1230 | (current-buffer) | 1254 | (current-buffer) |
| 1231 | (when (or nick-match (and (not (rcirc-channel-p rcirc-target)) | 1255 | (when (or nick-match (and (not (rcirc-channel-p rcirc-target)) |
| @@ -1375,7 +1399,7 @@ if NICK is also on `rcirc-ignore-list-automatic'." | |||
| 1375 | (force-mode-line-update)) | 1399 | (force-mode-line-update)) |
| 1376 | 1400 | ||
| 1377 | (defun rcirc-toggle-low-priority () | 1401 | (defun rcirc-toggle-low-priority () |
| 1378 | "Toggle the value of `rcirc-ignore-buffer-activity-flag'." | 1402 | "Toggle the value of `rcirc-low-priority-flag'." |
| 1379 | (interactive) | 1403 | (interactive) |
| 1380 | (setq rcirc-low-priority-flag | 1404 | (setq rcirc-low-priority-flag |
| 1381 | (not rcirc-low-priority-flag)) | 1405 | (not rcirc-low-priority-flag)) |
| @@ -1788,7 +1812,7 @@ ones added to the list automatically are marked with an asterisk." | |||
| 1788 | 1812 | ||
| 1789 | (defun rcirc-browse-url (&optional arg) | 1813 | (defun rcirc-browse-url (&optional arg) |
| 1790 | "Prompt for URL to browse based on URLs in buffer." | 1814 | "Prompt for URL to browse based on URLs in buffer." |
| 1791 | (interactive) | 1815 | (interactive "P") |
| 1792 | (let ((completions (mapcar (lambda (x) (cons x nil)) rcirc-urls)) | 1816 | (let ((completions (mapcar (lambda (x) (cons x nil)) rcirc-urls)) |
| 1793 | (initial-input (car rcirc-urls)) | 1817 | (initial-input (car rcirc-urls)) |
| 1794 | (history (cdr rcirc-urls))) | 1818 | (history (cdr rcirc-urls))) |
| @@ -1910,7 +1934,7 @@ FUNCTION takes 3 arguments, MATCH-START, MATCH-END, and STRING." | |||
| 1910 | (cond ((rcirc-channel-p target) | 1934 | (cond ((rcirc-channel-p target) |
| 1911 | target) | 1935 | target) |
| 1912 | ;;; -ChanServ- [#gnu] Welcome... | 1936 | ;;; -ChanServ- [#gnu] Welcome... |
| 1913 | ((string-match "^\\[\\(#[^ ]+\\)\\]" message) | 1937 | ((string-match "\\[\\(#[^\] ]+\\)\\]" message) |
| 1914 | (match-string 1 message)) | 1938 | (match-string 1 message)) |
| 1915 | (sender | 1939 | (sender |
| 1916 | (if (string= sender (rcirc-server-name process)) | 1940 | (if (string= sender (rcirc-server-name process)) |
| @@ -2211,6 +2235,25 @@ Passwords are stored in `rcirc-authinfo' (which see)." | |||
| 2211 | "The face used to highlight other messages." | 2235 | "The face used to highlight other messages." |
| 2212 | :group 'rcirc-faces) | 2236 | :group 'rcirc-faces) |
| 2213 | 2237 | ||
| 2238 | (defface rcirc-bright-nick | ||
| 2239 | '((((class grayscale) (background light)) | ||
| 2240 | (:foreground "LightGray" :weight bold :underline t)) | ||
| 2241 | (((class grayscale) (background dark)) | ||
| 2242 | (:foreground "Gray50" :weight bold :underline t)) | ||
| 2243 | (((class color) (min-colors 88) (background light)) (:foreground "CadetBlue")) | ||
| 2244 | (((class color) (min-colors 88) (background dark)) (:foreground "Aquamarine")) | ||
| 2245 | (((class color) (min-colors 16) (background light)) (:foreground "CadetBlue")) | ||
| 2246 | (((class color) (min-colors 16) (background dark)) (:foreground "Aquamarine")) | ||
| 2247 | (((class color) (min-colors 8)) (:foreground "magenta")) | ||
| 2248 | (t (:weight bold :underline t))) | ||
| 2249 | "Face used for nicks matched by `rcirc-bright-nick-regexp'." | ||
| 2250 | :group 'rcirc-faces) | ||
| 2251 | |||
| 2252 | (defface rcirc-dim-nick | ||
| 2253 | '((t :inherit default)) | ||
| 2254 | "Face used for nicks matched by `rcirc-dim-nick-regexp'." | ||
| 2255 | :group 'rcirc-faces) | ||
| 2256 | |||
| 2214 | (defface rcirc-server ; font-lock-comment-face | 2257 | (defface rcirc-server ; font-lock-comment-face |
| 2215 | '((((class grayscale) (background light)) | 2258 | '((((class grayscale) (background light)) |
| 2216 | (:foreground "DimGray" :weight bold :slant italic)) | 2259 | (:foreground "DimGray" :weight bold :slant italic)) |