[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Possible to alter the "M-x" string that is displayed when M-x is pre
From: |
Emanuel Berg |
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 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) |
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
Re: Possible to alter the "M-x" string that is displayed when M-x is pressed to enter a command?, Teemu Likonen, 2013/07/05