Show
Ignore:
Timestamp:
07/16/06 08:36:52 (2 years ago)
Author:
miyoshi
Message:

Sync up with Emacs CVS HEAD.

Files:

Legend:

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

    r4035 r4111  
    107107   (append 
    108108    (pcomplete-erc-commands) 
    109     (pcomplete-erc-nicks erc-pcomplete-nick-postfix)))) 
     109    (pcomplete-erc-nicks erc-pcomplete-nick-postfix t)))) 
    110110 
    111111(defvar erc-pcomplete-ctcp-commands 
     
    213213 
    214214 
    215 (defun pcomplete-erc-nicks (&optional postfix) 
    216   "Returns a list of nicks in the current channel." 
    217   (let ((users (erc-get-channel-user-list))) 
    218     (if erc-pcomplete-order-nickname-completions 
    219         (setq users (erc-sort-channel-users-by-activity users))) 
    220   (mapcar (lambda (x) 
    221               (concat (erc-server-user-nickname (car x)) postfix)) 
    222             users))) 
     215(defun pcomplete-erc-nicks (&optional postfix ignore-self) 
     216  "Returns a list of nicks in the current channel. 
     217Optional argument POSTFIX is something to append to the nickname. 
     218If optional argument IGNORE-SELF is non-nil, don't return the current nick." 
     219  (let ((users (if erc-pcomplete-order-nickname-completions 
     220                   (erc-sort-channel-users-by-activity 
     221                    (erc-get-channel-user-list)) 
     222                 (erc-get-channel-user-list))) 
     223        (nicks nil)) 
     224    (dolist (user users) 
     225      (unless (and ignore-self 
     226                   (string= (erc-server-user-nickname (car user)) 
     227                            (erc-current-nick))) 
     228        (setq nicks (cons (concat (erc-server-user-nickname (car user)) 
     229                                  postfix) 
     230                          nicks)))) 
     231    (nreverse nicks))) 
    223232 
    224233(defun pcomplete-erc-all-nicks (&optional postfix)