Show
Ignore:
Timestamp:
04/07/07 15:49:28 (2 years ago)
Author:
miyoshi
Message:

Sync up with Emacs CVS HEAD.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lisp/erc/erc-identd.el

    r4190 r4200  
    4343(defvar erc-identd-process nil) 
    4444 
     45(defgroup erc-identd nil 
     46  "Run a local identd server." 
     47  :group 'erc) 
     48 
     49(defcustom erc-identd-port 8113 
     50  "Port to run the identd server on if not specified in the argument for 
     51`erc-identd-start'. 
     52 
     53This can be either a string or a number." 
     54  :group 'erc-identd 
     55  :type '(choice (const :tag "None" nil) 
     56                 (integer :tag "Port number") 
     57                 (string :tag "Port string"))) 
     58 
    4559;;;###autoload (autoload 'erc-identd-mode "erc-identd") 
    4660(define-erc-module identd nil 
    4761  "This mode launches an identd server on port 8113." 
    48   ((add-hook 'erc-connect-pre-hook 'erc-identd-start) 
     62  ((add-hook 'erc-connect-pre-hook 'erc-identd-quickstart) 
    4963   (add-hook 'erc-disconnected-hook 'erc-identd-stop)) 
    50   ((remove-hook 'erc-connect-pre-hook 'erc-identd-start) 
     64  ((remove-hook 'erc-connect-pre-hook 'erc-identd-quickstart) 
    5165   (remove-hook 'erc-disconnected-hook 'erc-identd-stop))) 
    5266 
     
    7286system." 
    7387  (interactive (list (read-string "Serve identd requests on port: " "8113"))) 
    74   (if (null port) 
    75       (setq port 8113) 
    76     (if (stringp port) 
    77         (setq port (string-to-number port)))) 
    78   (if erc-identd-process 
    79       (delete-process erc-identd-process)) 
     88  (unless port (setq port erc-identd-port)) 
     89  (when (stringp port) 
     90    (setq port (string-to-number port))) 
     91  (when erc-identd-process 
     92    (delete-process erc-identd-process)) 
    8093  (setq erc-identd-process 
    8194        (make-network-process :name "identd" 
     
    8598                              :filter 'erc-identd-filter)) 
    8699  (set-process-query-on-exit-flag erc-identd-process nil)) 
     100 
     101(defun erc-identd-quickstart (&rest ignored) 
     102  "Start the identd server with the default port. 
     103The default port is specified by `erc-identd-port'." 
     104  (erc-identd-start)) 
    87105 
    88106;;;###autoload