Mercurial > emacs
comparison lisp/erc/erc-track.el @ 92128:84357f6e06d1
ERC: Sync from upstream.
author | Michael Olson <mwolson@gnu.org> |
---|---|
date | Sat, 23 Feb 2008 18:58:56 +0000 |
parents | b8f89dd3680d |
children | 2a734255bcc7 |
comparison
equal
deleted
inserted
replaced
92127:e26b036a79a1 | 92128:84357f6e06d1 |
---|---|
852 counts (cdr counts) | 852 counts (cdr counts) |
853 faces (cdr faces))) | 853 faces (cdr faces))) |
854 (when (featurep 'xemacs) | 854 (when (featurep 'xemacs) |
855 (erc-modified-channels-object nil)) | 855 (erc-modified-channels-object nil)) |
856 (setq erc-modified-channels-object | 856 (setq erc-modified-channels-object |
857 (erc-modified-channels-object strings)))))) | 857 (erc-modified-channels-object strings)))))) |
858 | 858 |
859 (defun erc-modified-channels-remove-buffer (buffer) | 859 (defun erc-modified-channels-remove-buffer (buffer) |
860 "Remove BUFFER from `erc-modified-channels-alist'." | 860 "Remove BUFFER from `erc-modified-channels-alist'." |
861 (interactive "bBuffer: ") | 861 (interactive "bBuffer: ") |
862 (setq erc-modified-channels-alist | 862 (setq erc-modified-channels-alist |
865 (when (interactive-p) | 865 (when (interactive-p) |
866 (erc-modified-channels-display))) | 866 (erc-modified-channels-display))) |
867 | 867 |
868 (defun erc-track-find-face (faces) | 868 (defun erc-track-find-face (faces) |
869 "Return the face to use in the modeline from the faces in FACES. | 869 "Return the face to use in the modeline from the faces in FACES. |
870 If `erc-track-faces-priority-list' is set, the one from FACES who is | 870 If `erc-track-faces-priority-list' is set, the one from FACES who |
871 first in that list will be used. | 871 is first in that list will be used. If nothing matches or if |
872 `erc-track-faces-priority-list' is not set, the default mode-line | |
873 faces will be used. | |
872 | 874 |
873 If `erc-track-faces-normal-list' is non-nil, use it to produce a | 875 If `erc-track-faces-normal-list' is non-nil, use it to produce a |
874 blinking effect that indicates channel activity when the first | 876 blinking effect that indicates channel activity when the first |
875 element in FACES and the highest-ranking face among the rest of | 877 element in FACES and the highest-ranking face among the rest of |
876 FACES are both members of `erc-track-faces-normal-list'. | 878 FACES are both members of `erc-track-faces-normal-list'. |
877 | |
878 If `erc-track-faces-priority-list' is not set, the first element | |
879 in FACES will be used. | |
880 | 879 |
881 If one of the faces is a list, then it will be ranked according | 880 If one of the faces is a list, then it will be ranked according |
882 to its highest-tanking face member. A list of faces including | 881 to its highest-tanking face member. A list of faces including |
883 that member will take priority over just the single member | 882 that member will take priority over just the single member |
884 element." | 883 element." |
890 (catch 'face | 889 (catch 'face |
891 (dolist (candidate erc-track-faces-priority-list) | 890 (dolist (candidate erc-track-faces-priority-list) |
892 (when (member candidate (cdr faces)) | 891 (when (member candidate (cdr faces)) |
893 (throw 'face candidate))))))) | 892 (throw 'face candidate))))))) |
894 (cond ((null choice) | 893 (cond ((null choice) |
895 (car faces)) | 894 nil) |
896 ((and (member choice erc-track-faces-normal-list) | 895 ((and (member choice erc-track-faces-normal-list) |
897 (member no-first erc-track-faces-normal-list)) | 896 (member no-first erc-track-faces-normal-list)) |
898 no-first) | 897 no-first) |
899 (t | 898 (t |
900 choice)))) | 899 choice)))) |