[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rcirc update
From: |
Ryan Yeske |
Subject: |
Re: rcirc update |
Date: |
Thu, 28 Jun 2007 02:51:55 -0700 |
I sent this last week, and it hasn't been installed.
> Resending last patch, with changes.
>
> I renamed rcirc-connections, use :symbols, and improved the
> documentation.
2007-06-20 Ryan Yeske <address@hidden>
* rcirc.el (rcirc-server-alist): Rename from rcirc-connections.
(rcirc-default-full-name): Rename from
rcirc-default-user-full-name.
(rcirc-clear-activity): Make sure RCIRC-ACTIVITY isn't modified.
(rcirc-print): Never ignore messages from ourself.
Index: rcirc.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/net/rcirc.el,v
retrieving revision 1.35
diff -c -r1.35 rcirc.el
*** rcirc.el 13 Jun 2007 21:17:16 -0000 1.35
--- rcirc.el 20 Jun 2007 19:05:30 -0000
***************
*** 55,61 ****
:link '(custom-manual "(rcirc)")
:group 'applications)
! (defcustom rcirc-connections
'(("irc.freenode.net" :channels ("#rcirc")))
"An alist of IRC connections to establish when running `rcirc'.
Each element looks like (SERVER-NAME PARAMETERS).
--- 55,61 ----
:link '(custom-manual "(rcirc)")
:group 'applications)
! (defcustom rcirc-server-alist
'(("irc.freenode.net" :channels ("#rcirc")))
"An alist of IRC connections to establish when running `rcirc'.
Each element looks like (SERVER-NAME PARAMETERS).
***************
*** 63,72 ****
SERVER-NAME is a string describing the server to connect
to.
! PARAMETERS is a plist of optional connection parameters. Valid
! properties are: nick (a string), port (number or string),
! user-name (string), full-name (string), and channels (list of
! strings)."
:type '(alist :key-type string
:value-type (plist :options ((nick string)
(port integer)
--- 63,97 ----
SERVER-NAME is a string describing the server to connect
to.
! The optional PARAMETERS come in pairs PARAMETER VALUE.
!
! The following parameters are recognized:
!
! `:nick'
!
! VALUE must be a string. If absent, `rcirc-default-nick' is used
! for this connection.
!
! `:port'
!
! VALUE must be a number or string. If absent,
! `rcirc-default-port' is used.
!
! `:user-name'
!
! VALUE must be a string. If absent, `rcirc-default-user-name' is
! used.
!
! `:full-name'
!
! VALUE must be a string. If absent, `rcirc-default-full-name' is
! used.
!
! `:channels'
!
! VALUE must be a list of strings describing which channels to join
! when connecting to this server. If absent, no channels will be
! connected to automatically."
:type '(alist :key-type string
:value-type (plist :options ((nick string)
(port integer)
***************
*** 90,98 ****
:type 'string
:group 'rcirc)
! (defcustom rcirc-default-user-full-name (if (string= (user-full-name) "")
! rcirc-default-user-name
! (user-full-name))
"The full name sent to the server when connecting."
:type 'string
:group 'rcirc)
--- 115,123 ----
:type 'string
:group 'rcirc)
! (defcustom rcirc-default-full-name (if (string= (user-full-name) "")
! rcirc-default-user-name
! (user-full-name))
"The full name sent to the server when connecting."
:type 'string
:group 'rcirc)
***************
*** 335,341 ****
;;;###autoload
(defun rcirc (arg)
! "Connect to all servers in `rcirc-connections'.
Do not connect to a server if it is already connected.
--- 360,366 ----
;;;###autoload
(defun rcirc (arg)
! "Connect to all servers in `rcirc-server-alist'.
Do not connect to a server if it is already connected.
***************
*** 343,352 ****
(interactive "P")
(if arg
(let* ((server (completing-read "IRC Server: "
! rcirc-connections
nil nil
! (caar rcirc-connections)))
! (server-plist (cdr (assoc-string server rcirc-connections)))
(port (read-string "IRC Port: "
(number-to-string
(or (plist-get server-plist 'port)
--- 368,377 ----
(interactive "P")
(if arg
(let* ((server (completing-read "IRC Server: "
! rcirc-server-alist
nil nil
! (caar rcirc-server-alist)))
! (server-plist (cdr (assoc-string server rcirc-server-alist)))
(port (read-string "IRC Port: "
(number-to-string
(or (plist-get server-plist 'port)
***************
*** 362,380 ****
" "))
"[, ]+" t)))
(rcirc-connect server port nick rcirc-default-user-name
! rcirc-default-user-full-name
channels))
! ;; connect to servers in `rcirc-connections'
(let (connected-servers)
! (dolist (c rcirc-connections)
(let ((server (car c))
! (port (or (plist-get (cdr c) 'port) rcirc-default-port))
! (nick (or (plist-get (cdr c) 'nick) rcirc-default-nick))
! (user-name (or (plist-get (cdr c) 'user-name)
rcirc-default-user-name))
! (full-name (or (plist-get (cdr c) 'full-name)
! rcirc-default-user-full-name))
! (channels (plist-get (cdr c) 'channels)))
(when server
(let (connected)
(dolist (p (rcirc-process-list))
--- 387,405 ----
" "))
"[, ]+" t)))
(rcirc-connect server port nick rcirc-default-user-name
! rcirc-default-full-name
channels))
! ;; connect to servers in `rcirc-server-alist'
(let (connected-servers)
! (dolist (c rcirc-server-alist)
(let ((server (car c))
! (nick (or (plist-get (cdr c) :nick) rcirc-default-nick))
! (port (or (plist-get (cdr c) :port) rcirc-default-port))
! (user-name (or (plist-get (cdr c) :user-name)
rcirc-default-user-name))
! (full-name (or (plist-get (cdr c) :full-name)
! rcirc-default-full-name))
! (channels (plist-get (cdr c) :channels)))
(when server
(let (connected)
(dolist (p (rcirc-process-list))
***************
*** 423,429 ****
rcirc-default-port))
(nick (or nick rcirc-default-nick))
(user-name (or user-name rcirc-default-user-name))
! (full-name (or full-name rcirc-default-user-full-name))
(startup-channels startup-channels)
(process (make-network-process :name server :host server :service
port-number)))
;; set up process
--- 448,454 ----
rcirc-default-port))
(nick (or nick rcirc-default-nick))
(user-name (or user-name rcirc-default-user-name))
! (full-name (or full-name rcirc-default-full-name))
(startup-channels startup-channels)
(process (make-network-process :name server :host server :service
port-number)))
;; set up process
***************
*** 590,596 ****
process))))))
(defun rcirc-delete-process (process)
- (message "delete process %S" process)
(delete-process process))
(defvar rcirc-trap-errors-flag t)
--- 615,620 ----
***************
*** 1262,1272 ****
Format based on SENDER and RESPONSE. If ACTIVITY is non-nil,
record activity."
(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
--- 1286,1297 ----
Format based on SENDER and RESPONSE. If ACTIVITY is non-nil,
record activity."
(or text (setq text ""))
! (unless (and (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))
! (not (string= sender (rcirc-nick process))))
(let* ((buffer (rcirc-target-buffer process sender response target text))
(inhibit-read-only t))
(with-current-buffer buffer
***************
*** 1635,1641 ****
(defun rcirc-clear-activity (buffer)
"Clear the BUFFER activity."
! (setq rcirc-activity (delete buffer rcirc-activity))
(with-current-buffer buffer
(setq rcirc-activity-types nil)))
--- 1660,1666 ----
(defun rcirc-clear-activity (buffer)
"Clear the BUFFER activity."
! (setq rcirc-activity (remove buffer rcirc-activity))
(with-current-buffer buffer
(setq rcirc-activity-types nil)))
- rcirc update, Ryan Yeske, 2007/06/09
- Re: rcirc update, Chong Yidong, 2007/06/13
- Re: rcirc update, Stefan Monnier, 2007/06/13
- Re: rcirc update, Ryan Yeske, 2007/06/15
- Re: rcirc update, Miles Bader, 2007/06/15
- Re: rcirc update, Ryan Yeske, 2007/06/16
- Re: rcirc update, Miles Bader, 2007/06/16
- Re: rcirc update, Ryan Yeske, 2007/06/17
- Re: rcirc update, Ryan Yeske, 2007/06/20
- Re: rcirc update,
Ryan Yeske <=
- Re: rcirc update, Miles Bader, 2007/06/28
- Re: rcirc update, Thien-Thi Nguyen, 2007/06/29