[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: More visible mini-buffer prompt face
From: |
Lennart Borgman (gmail) |
Subject: |
Re: More visible mini-buffer prompt face |
Date: |
Sun, 25 Feb 2007 21:44:04 +0100 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.9) Gecko/20061207 Thunderbird/1.5.0.9 Mnenhy/0.7.4.666 |
Lennart Borgman (gmail) wrote:
Mathias Dahl wrote:
I wonder if it would not be better to have a more visible face for
the minibuffer prompt by default. My suggestion would be using a
visible background color (some not too sharp yellow perhaps).
I think that I understand the reason for you wanting this; I
sometimes miss the prompt at first, for example the prompt that is
displayed when trying to update a buffer who's file has been updated
on disk. I think that there are a couple of other situations as well,
but I don't remember any right now.
...
But! This differs from person to person!
Another approach to this would be to give a more visible prompt as a
standard option. It is quite easy to add an alternative in the options
menu for this. I think it would fit very well below or above "Blinking
Cursor" since it has kind of the same spirit.
So I would suggest something in the menubar like "Options - More
Noticeable Prompt" below "Blinking Cursor".
Or, maybe just "Customize Prompt Face".
Here is a patch for that suggestion (it also includes a bug fix):
Index: menu-bar.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/menu-bar.el,v
retrieving revision 1.301
diff -u -r1.301 menu-bar.el
--- menu-bar.el 21 Jan 2007 03:53:11 -0000 1.301
+++ menu-bar.el 25 Feb 2007 18:48:15 -0000
@@ -973,6 +973,10 @@
(define-key menu-bar-options-menu [debugger-separator]
'("--"))
+(define-key menu-bar-options-menu [toggle-noticeable-minibuffer-prompt]
+ (menu-bar-make-mm-toggle noticeable-minibuffer-prompts-mode
+ "More Noticeable Prompt"
+ "Whether minibuffer prompts gets a more
noticeable face"))
(define-key menu-bar-options-menu [blink-cursor-mode]
(menu-bar-make-mm-toggle blink-cursor-mode
"Blinking Cursor"
@@ -1769,6 +1773,19 @@
"Menu-bar mode disabled. Use M-x menu-bar-mode to make the menu
bar appear."))
menu-bar-mode)
+(define-minor-mode noticeable-minibuffer-prompts-mode
+ "Use a more noticeable minibuffer prompt face when this mode is on.
+Turning this mode on changes the face used for minibuffer prompts to
+`minibuffer-noticeable-prompt'. Turning it off changes it to
+`minibuffer-prompt'."
+ :init-value t
+ :global t
+ :group 'basic-faces
+ (let ((face (member 'face minibuffer-prompt-properties)))
+ (if noticeable-minibuffer-prompts-mode
+ (setcar (cdr face) 'minibuffer-noticeable-prompt)
+ (setcar (cdr face) 'minibuffer-prompt))))
+
(provide 'menu-bar)
;;; arch-tag: 6e6a3c22-4ec4-4d3d-8190-583f8ef94ced
Index: faces.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/faces.el,v
retrieving revision 1.366
diff -u -r1.366 faces.el
--- faces.el 14 Feb 2007 15:31:09 -0000 1.366
+++ faces.el 25 Feb 2007 19:54:19 -0000
@@ -2143,12 +2143,36 @@
"Face for minibuffer prompts.
By default, Emacs automatically adds this face to the value of
`minibuffer-prompt-properties', which is a list of text properties
-used to display the prompt text."
+used to display the prompt text.
+
+See also `minibuffer-noticeable-prompt'."
+ :version "22.1"
+ :group 'basic-faces)
+
+;; Modelled after secondary-selection face.
+;; Suggested on Emacs Devel as usual.
+(defface minibuffer-noticeable-prompt
+ '((((class color) (min-colors 88) (background light))
+ :background "gold")
+ (((class color) (min-colors 88) (background dark))
+ :background "SkyBlue4")
+ (((class color) (min-colors 16) (background light))
+ :background "yellow")
+ (((class color) (min-colors 16) (background dark))
+ :background "SkyBlue4")
+ (((class color) (min-colors 8))
+ :background "cyan" :foreground "black")
+ (t :inverse-video t))
+ "More noticeable face for minibuffer prompts.
+You can switch between using this face and the face
+`minibuffer-prompt' for the minibuffer prompt with the function
+`toggle-noticeable-minibuffer-prompts'."
:version "22.1"
:group 'basic-faces)
(setq minibuffer-prompt-properties
- (append minibuffer-prompt-properties (list 'face
'minibuffer-prompt)))
+ (append minibuffer-prompt-properties (list 'face
'minibuffer-noticeable-prompt)))
+(put 'minibuffer-prompt-properties 'standard-value (list (list 'quote
minibuffer-prompt-properties)))
(defface fringe
'((((class color) (background light))
- Re: More visible mini-buffer prompt face, (continued)
- Re: More visible mini-buffer prompt face, Richard Stallman, 2007/02/24
- Re: More visible mini-buffer prompt face, Richard Stallman, 2007/02/25
- Re: More visible mini-buffer prompt face, Mathias Dahl, 2007/02/26
- Re: More visible mini-buffer prompt face, Lennart Borgman (gmail), 2007/02/26
- Re: More visible mini-buffer prompt face, Richard Stallman, 2007/02/27
Re: More visible mini-buffer prompt face, Mathias Dahl, 2007/02/24
- Re: More visible mini-buffer prompt face, Lennart Borgman (gmail), 2007/02/24
- Re: More visible mini-buffer prompt face,
Lennart Borgman (gmail) <=
- Re: More visible mini-buffer prompt face, Richard Stallman, 2007/02/24
- Re: More visible mini-buffer prompt face, Mathias Dahl, 2007/02/25
- Re: More visible mini-buffer prompt face, Richard Stallman, 2007/02/25
- Re: More visible mini-buffer prompt face, Mathias Dahl, 2007/02/26
- Re: More visible mini-buffer prompt face, Juanma Barranquero, 2007/02/26
- Re: More visible mini-buffer prompt face, Mathias Dahl, 2007/02/26
Re: More visible mini-buffer prompt face, Stuart D. Herring, 2007/02/27