[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Erc-commit] [commit][emacs22] Add ability to customize face used for he
From: |
mwolson |
Subject: |
[Erc-commit] [commit][emacs22] Add ability to customize face used for header-line text. |
Date: |
Sun, 14 Oct 2007 00:48:10 -0400 |
commit 0598241feeba5d1c8a55597ac1ce7715dce41a6a
Author: Michael Olson <address@hidden>
Date: Sun Mar 26 18:17:50 2006 +0000
Add ability to customize face used for header-line text.
* erc.el (erc-header-line): New face that will be used to colorize the
text of the header-line, provided that `erc-header-line-face-method' is
non-nil.
(erc-prompt-face): Fix formatting.
(erc-header-line-face-method): New option that determines the method
used for colorizing header-line text. This may be a function, nil, or
non-nil.
(erc-update-mode-line-buffer): Use the aforementioned option and face
to colorize the header-line text, if that is what the user wants.
git-archimport-id: address@hidden/erc--cvs--0--patch-146
diff --git a/ChangeLog b/ChangeLog
index 6b176e6..ae4a3ee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2006-03-26 Michael Olson <address@hidden>
+
+ * erc.el (erc-header-line): New face that will be used to colorize
+ the text of the header-line, provided that
+ `erc-header-line-face-method' is non-nil.
+ (erc-prompt-face): Fix formatting.
+ (erc-header-line-face-method): New option that determines the
+ method used for colorizing header-line text. This may be a
+ function, nil, or non-nil.
+ (erc-update-mode-line-buffer): Use the aforementioned option and
+ face to colorize the header-line text, if that is what the user
+ wants.
+
2006-03-25 Michael Olson <address@hidden>
* erc.el (erc-cmd-QUOTE): Install patch from Aravind Gottipati
diff --git a/erc.el b/erc.el
index c67e8d8..a400287 100644
--- a/erc.el
+++ b/erc.el
@@ -1116,12 +1116,19 @@ which the local user typed."
"ERC face used for messages you receive in the main erc buffer."
:group 'erc-faces)
+(defface erc-header-line
+ '((t (:foreground "grey20" :background "grey90")))
+ "ERC face used for the header line.
+
+This will only be used if `erc-header-line-face-method' is non-nil."
+ :group 'erc-faces)
+
(defface erc-input-face '((t (:foreground "brown")))
"ERC face used for your input."
:group 'erc-faces)
(defface erc-prompt-face
- '((t (:bold t :foreground "Black" :background"lightBlue2")))
+ '((t (:bold t :foreground "Black" :background "lightBlue2")))
"ERC face for the prompt."
:group 'erc-faces)
@@ -5629,6 +5636,17 @@ when you move point into the header line."
:group 'erc-mode-line-and-header
:type 'boolean)
+(defcustom erc-header-line-face-method nil
+ "Determine what method to use when colorizing the header line text.
+
+If nil, don't colorize the header text.
+If given a function, call it and use the resulting face name.
+Otherwise, use the `erc-header-line' face."
+ :group 'erc-mode-line-and-header
+ :type '(choice (const :tag "Don't colorize" nil)
+ (const :tag "Use the erc-header-line face" t)
+ (function :tag "Call a function")))
+
(defcustom erc-show-channel-key-p t
"Show the the channel key in the header line."
:group 'erc-paranoia
@@ -5735,7 +5753,13 @@ if `erc-away' is non-nil."
((erc-server-process-alive)
"")
(t
- ": CLOSED"))))
+ ": CLOSED")))
+ (face (cond ((eq erc-header-line-face-method nil)
+ nil)
+ ((functionp erc-header-line-face-method)
+ (funcall erc-header-line-face-method))
+ (t
+ erc-header-line))))
(cond ((featurep 'xemacs)
(setq modeline-buffer-identification
(list (format-spec erc-mode-line-format spec)))
@@ -5759,7 +5783,10 @@ if `erc-away' is non-nil."
(erc-replace-regexp-in-string
"%"
"%%"
- (erc-propertize header 'help-echo help-echo)))))
+ (if face
+ (erc-propertize header 'help-echo help-echo
+ 'face face)
+ (erc-propertize header 'help-echo help-echo))))))
(t (setq header-line-format header))))))
(if (featurep 'xemacs)
(redraw-modeline)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Erc-commit] [commit][emacs22] Add ability to customize face used for header-line text.,
mwolson <=