unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Emanuel Berg <embe8573@student.uu.se>
To: help-gnu-emacs@gnu.org
Subject: Re: Possible to alter the "M-x" string that is displayed when M-x is pressed to enter a command?
Date: Sat, 06 Jul 2013 01:59:45 +0200	[thread overview]
Message-ID: <87a9m0h826.fsf@VLAN-3434.student.uu.se> (raw)
In-Reply-To: mailman.377.1373067609.12400.help-gnu-emacs@gnu.org

Bob Proulx <bob@proulx.com> writes:

>> Chris Seberino writes:
>> >> (set-face-foreground 'minibuffer-prompt nil)
>> >
>> > nil gave an error for me
>> 
>> For me, it works - I get the default face (cyan - `M-x
>> describe-face default') - but - why set it to nil, instead of
>> the color of your choice?
>
> Because then it uses the default face which I have already set
> elsewhere.  Keeping it DRY - Don't Repeat Yourself.  I already
> set the color I wanted in one location.  I don't want to set
> that color again in an additional location.  :-)

Haha, crazy stuff.

But seriously, that principle you mention is a very healthy one
and since I started to stick to it pedantically the amount of
debugging has dropped sharp. It may look silly with

const int days_in_a_week = 7;

but as soon as I have two 7's appearing in computation (meaning
that) I set it up. It is not only a protection against typos, but
also against sloppy search-and-replaces.

-- 
Emanuel Berg - programmer (hire me! CV below)
computer projects: http://user.it.uu.se/~embe8573
internet activity: http://home.student.uu.se/embe8573


  parent reply	other threads:[~2013-07-05 23:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-05 16:47 Possible to alter the "M-x" string that is displayed when M-x is pressed to enter a command? Chris Seberino
2013-07-05 16:57 ` Emanuel Berg
2013-07-05 17:29   ` Bob Proulx
     [not found]   ` <mailman.358.1373045351.12400.help-gnu-emacs@gnu.org>
2013-07-05 20:23     ` Chris Seberino
2013-07-05 21:07       ` Emanuel Berg
2013-07-05 23:40         ` Bob Proulx
     [not found]         ` <mailman.377.1373067609.12400.help-gnu-emacs@gnu.org>
2013-07-05 23:59           ` Emanuel Berg [this message]
2013-07-05 17:04 ` Teemu Likonen

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=87a9m0h826.fsf@VLAN-3434.student.uu.se \
    --to=embe8573@student.uu.se \
    --cc=help-gnu-emacs@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.
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).