|
From: lawrence m. <we...@gm...> - 2003-09-26 20:34:06
|
lawrence mitchell wrote:
> Mario Lang wrote:
>> lawrence mitchell <we...@gm...> writes:
> [...]
>>> If it's not really a prompt (it isn't), should it still be
>>> fontified using ERC-PROMPT-FACE?
>> That would at least be consistent with the case where
>> erc-show-my-nick is nil, wouldn't it?
> I'm not sure what you're getting at here. In any csae, I've
> committed the previous patch, modulo name changes.
How about this:
I'm not sure whether I should be (ab)using ERC-DISPLAY-PROMPT
quite as much as I am though.
--8<---------------cut here---------------start------------->8---
Index: erc.el
===================================================================
RCS file: /cvsroot/erc/erc/erc.el,v
retrieving revision 1.570
diff -u -r1.570 erc.el
--- erc.el 25 Sep 2003 18:13:46 -0000 1.570
+++ erc.el 26 Sep 2003 20:08:51 -0000
@@ -756,6 +756,11 @@
'((t (:bold t :foreground "Black" :background"lightBlue2")))
"ERC face for the prompt."
:group 'erc-faces)
+(defface erc-command-indicator-face
+ '((t (:bold t)))
+ "ERC face for the command indicator. See the variable
+`erc-command-indicator'."
+ :group 'erc-faces)
(defface erc-notice-face '((t (:bold t :foreground "SlateBlue")))
"ERC face for notices."
:group 'erc-faces)
@@ -3439,11 +3444,12 @@
(set-buffer cb)
(switch-to-buffer-other-window buf))))
-(defun erc-display-prompt (&optional buffer pos prompt)
+(defun erc-display-prompt (&optional buffer pos prompt face)
"Display PROMPT in BUFFER at position POS.
Display ERC prompt (defined by `erc-prompt' variable if PROMPT is
NIL) in BUFFER (if NIL or not provided - current buffer) using
-`erc-prompt-face' at the POS (if not NIL) or current position."
+`erc-prompt-face' (if FACE is nil) at the POS (if not NIL) or
+current position."
(let* ((prompt (or prompt (erc-prompt)))
(l (length prompt))
(ob (current-buffer)))
@@ -3468,7 +3474,7 @@
'front-sticky t
'read-only t))
(erc-put-text-property 0 (1- (length prompt))
- 'face 'erc-prompt-face
+ 'face (or face 'erc-prompt-face)
prompt)
(when erc-prompt-interactive-input
(setq prompt (erc-propertize prompt
@@ -5731,7 +5737,9 @@
(if (and (not multiline-p)
(char-equal (aref line 0) ?/)) ; is it a non-pasted command?
(if (not erc-hide-prompt)
- (erc-display-prompt nil nil (erc-command-indicator)))
+ (erc-display-prompt nil nil (erc-command-indicator)
+ (and (erc-command-indicator)
+ 'erc-command-indicator-face)))
(insert ; ok, it's a privmsg.
(if erc-show-my-nick
(concat "<" nickname "> ")
--8<---------------cut here---------------end--------------->8---
--
lawrence mitchell <we...@gm...>
|