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-capab.el

    r4190 r4200  
    5757 
    5858;; `erc-capab-identify-prefix' will now be added to the beginning of 
    59 ;; unidentified users' nicknames.  The default is an asterisk, "*".  If 
    60 ;; the value of this variable is nil or you disable this module (see 
     59;; unidentified users' nicknames.  The default is an asterisk, "*". 
     60;; You can customize the prefix and the face used to display it, 
     61;; `erc-capab-identify-unidentified'.  If the value of 
     62;; `erc-capab-identify-prefix' is nil or you disable this module (see 
    6163;; `erc-capab-identify-disable'), no prefix will be inserted, but the 
    6264;; flag sent by the server will still be stripped. 
     
    7476 
    7577(defcustom erc-capab-identify-prefix "*" 
    76   "The prefix used for unidentified users." 
     78  "The prefix used for unidentified users. 
     79 
     80If you change this from the default \"*\", be sure to use a 
     81character not found in IRC nicknames to avoid confusion." 
    7782  :group 'erc-capab 
    7883  :type '(choice string (const nil))) 
    7984 
     85(defface erc-capab-identify-unidentified '((t)) ; same as `erc-default-face' 
     86  "Face to use for `erc-capab-identify-prefix'." 
     87  :group 'erc-capab 
     88  :group 'erc-faces) 
     89 
    8090;;; Define module: 
    81  
    82 (define-erc-response-handler (290) 
    83   "Handle dancer-ircd CAPAB messages." nil nil) 
    8491 
    8592;;;###autoload (autoload 'erc-capab-identify-mode "erc-capab" nil t) 
     
    125132`erc-server-005-functions'." 
    126133  (unless erc-capab-identify-sent 
    127     (erc-capab-send-identify-messages))) 
    128  
    129 (defun erc-capab-send-identify-messages () 
     134    (erc-capab-identify-send-messages))) 
     135 
     136(defun erc-capab-identify-send-messages () 
    130137  "Send CAPAB IDENTIFY messages if the server supports it." 
    131138  (when (and (stringp erc-server-version) 
     
    176183             (erc-with-server-buffer erc-capab-identify-activated)) 
    177184    (goto-char (or (erc-find-parsed-property) (point-min))) 
    178     (let ((nickname (erc-capab-get-unidentified-nickname 
     185    (let ((nickname (erc-capab-identify-get-unidentified-nickname 
    179186                     (erc-get-parsed-vector (point))))) 
    180187      (when (and nickname 
     
    184191        (goto-char (match-beginning 0)) 
    185192        (insert (erc-propertize erc-capab-identify-prefix 
    186                                 'face (get-char-property (- (point) 1) 
    187                                                          'face))))))) 
    188  
    189 (defun erc-capab-get-unidentified-nickname (parsed) 
     193                                'face 'erc-capab-identify-unidentified)))))) 
     194 
     195(defun erc-capab-identify-get-unidentified-nickname (parsed) 
    190196  "Return the nickname of the user if unidentified. 
    191197PARSED is an `erc-parsed' response struct."