comparison lisp/erc/erc-backend.el @ 69942:45937d0cd26d

Revision: emacs@sv.gnu.org/emacs--devo--0--patch-208 Creator: Michael Olson <mwolson@gnu.org> Sync from erc--emacs--0
author Miles Bader <miles@gnu.org>
date Tue, 11 Apr 2006 22:09:49 +0000
parents fc745b05e928
children 3d0d6e217db9
comparison
equal deleted inserted replaced
69941:b561f476cb6a 69942:45937d0cd26d
310 alist." 310 alist."
311 :group 'erc-server 311 :group 'erc-server
312 :type '(repeat (cons (string :tag "Target") 312 :type '(repeat (cons (string :tag "Target")
313 coding-system))) 313 coding-system)))
314 314
315 (defcustom erc-server-connect-function 315 (defcustom erc-server-connect-function 'open-network-stream
316 (if (and (fboundp 'open-network-stream-nowait)
317 ;; CVS Emacs claims to define open-network-stream-nowait on
318 ;; windows, however, it does, in fact, not work.
319 (not (memq system-type '(windows-nt cygwin ms-dos darwin))))
320 'open-network-stream-nowait
321 'open-network-stream)
322 "Function used to initiate a connection. 316 "Function used to initiate a connection.
323 It should take same arguments as `open-network-stream' does." 317 It should take same arguments as `open-network-stream' does."
324 :group 'erc-server 318 :group 'erc-server
325 :type 'function) 319 :type 'function)
326 320
760 (if (eq posn 0) 754 (if (eq posn 0)
761 erc-session-server 755 erc-session-server
762 (substring string 1 posn))) 756 (substring string 1 posn)))
763 757
764 (setf (erc-response.command msg) 758 (setf (erc-response.command msg)
765 (let* ((bposn (string-match "[^ ]" string posn)) 759 (let* ((bposn (string-match "[^ \n]" string posn))
766 (eposn (string-match " " string bposn))) 760 (eposn (string-match " " string bposn)))
767 (setq posn (and eposn 761 (setq posn (and eposn
768 (string-match "[^ ]" string eposn))) 762 (string-match "[^ \n]" string eposn)))
769 (substring string bposn eposn))) 763 (substring string bposn eposn)))
770 764
771 (while (and posn 765 (while (and posn
772 (not (eq (aref string posn) ?:))) 766 (not (eq (aref string posn) ?:)))
773 (push (let* ((bposn posn) 767 (push (let* ((bposn posn)
774 (eposn (string-match " " string bposn))) 768 (eposn (string-match " " string bposn)))
775 (setq posn (and eposn 769 (setq posn (and eposn
776 (string-match "[^ ]" string eposn))) 770 (string-match "[^ \n]" string eposn)))
777 (substring string bposn eposn)) 771 (substring string bposn eposn))
778 (erc-response.command-args msg))) 772 (erc-response.command-args msg)))
779 (when posn 773 (when posn
780 (let ((str (substring string (1+ posn)))) 774 (let ((str (substring string (1+ posn))))
781 (push str (erc-response.command-args msg)))) 775 (push str (erc-response.command-args msg))))