From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
To: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
Cc: Emacs Devel <emacs-devel@gnu.org>,
"Richard M. Stallman" <rms@gnu.org>,
Mathias Dahl <mathias.dahl@gmail.com>
Subject: Re: More visible mini-buffer prompt face
Date: Sun, 25 Feb 2007 21:44:04 +0100 [thread overview]
Message-ID: <45E1F514.8060609@gmail.com> (raw)
In-Reply-To: <45E0E1CA.7060307@gmail.com>
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))
next prev parent reply other threads:[~2007-02-25 20:44 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-23 16:24 More visible mini-buffer prompt face Lennart Borgman (gmail)
2007-02-23 16:41 ` Juanma Barranquero
2007-02-23 17:46 ` Lennart Borgman (gmail)
2007-02-23 18:09 ` Stefan Monnier
2007-02-23 19:36 ` Richard Stallman
2007-02-23 19:58 ` Drew Adams
2007-02-23 21:47 ` Lennart Borgman (gmail)
2007-02-24 0:18 ` Drew Adams
2007-02-24 1:01 ` Lennart Borgman (gmail)
2007-02-24 1:08 ` Drew Adams
2007-02-24 1:27 ` Lennart Borgman (gmail)
2007-02-24 8:28 ` Richard Stallman
2007-02-24 22:16 ` Kim F. Storm
2007-02-24 1:35 ` Lennart Borgman (gmail)
2007-02-24 4:30 ` Daniel Brockman
2007-02-24 18:51 ` Lennart Borgman (gmail)
2007-02-24 14:20 ` Miles Bader
2007-02-24 14:36 ` Eli Zaretskii
2007-02-25 4:06 ` Richard Stallman
2007-02-26 3:27 ` Richard Stallman
2007-02-26 10:55 ` Mathias Dahl
2007-02-26 16:48 ` Lennart Borgman (gmail)
2007-02-27 7:38 ` Richard Stallman
2007-02-24 17:58 ` Mathias Dahl
2007-02-25 1:09 ` Lennart Borgman (gmail)
2007-02-25 20:44 ` Lennart Borgman (gmail) [this message]
2007-02-25 4:06 ` Richard Stallman
2007-02-25 11:01 ` Mathias Dahl
2007-02-26 3:27 ` Richard Stallman
2007-02-26 10:45 ` Mathias Dahl
2007-02-26 11:20 ` Juanma Barranquero
2007-02-26 23:53 ` Mathias Dahl
2007-02-27 19:07 ` Stuart D. Herring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45E1F514.8060609@gmail.com \
--to=lennart.borgman@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=mathias.dahl@gmail.com \
--cc=rms@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).