unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Roland Winkler" <winkler@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Giorgos Keramidas <gkeramidas@gmail.com>, emacs-devel@gnu.org
Subject: Re: Recent read-face patch breaks `M-x customize-face'
Date: Sun, 7 Apr 2013 16:15:17 -0500	[thread overview]
Message-ID: <20833.57829.250404.900356@gargle.gargle.HOWL> (raw)
In-Reply-To: <jwvppy72nh5.fsf-monnier+emacs@gnu.org>

On Sat Apr 6 2013 Stefan Monnier wrote:
> > Removing this magic from read-face-name would require in turn that
> > commands such as make-face-bold call face-at-point for a reasonable
> > value of DEFAULT. In my humble opinion, this appears to be the
> > cleanest solution.
> 
> I think the for sake of backward compatibility, it is best to just
> preserve the kludge.

The command customize-face is actually more subtle than I had
realized previously. It calls read-face-name with DEFAULT being
"all faces". But read-face-name used to ignore and override this
value when there was a "face at point". So the value of DEFAULT was
really   (or (face-at-point) "all faces").  From a user perspective,
this behavior is certainly quite reasonable. But for the old
implementation it was crucial that read-face-name would replace
"all faces" by (face-at-point).  This overriding of the value of
DEFAULT was rather weird behavior and I'd like to avoid this if
somehow possible.

Backward compatibilty should not break existing code. But under this
umbrella it must be possible to modify and improve the code.

So backward compatiblity requires that the arg DEFAULT of
read-face-name may be a list of faces (as the docstring says). But a
symbol (representing a single face) or a string (which may represent
a single face, a comma-separated list of faces, or some "bogus face"
such as "all faces") should be accepted, too. But as long as the prompt
of read-face-name tells the user the actual value of DEFAULT, this
will not break anybody's existing code. - Did I overlook something here?

Roland



  reply	other threads:[~2013-04-07 21:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-05 17:50 Recent read-face patch breaks `M-x customize-face' Giorgos Keramidas
2013-04-05 17:52 ` Giorgos Keramidas
2013-04-05 18:56 ` Roland Winkler
2013-04-05 19:00   ` Roland Winkler
2013-04-05 19:04     ` Giorgos Keramidas
2013-04-05 21:40   ` Stefan Monnier
2013-04-06 11:55     ` Roland Winkler
2013-04-06 14:02       ` Stefan Monnier
2013-04-06 15:50         ` Γιώργος Κεραμίδας
2013-04-06 21:22         ` Roland Winkler
2013-04-07  0:29           ` Stefan Monnier
2013-04-07 21:15             ` Roland Winkler [this message]
2013-04-13  1:15         ` Roland Winkler

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=20833.57829.250404.900356@gargle.gargle.HOWL \
    --to=winkler@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=gkeramidas@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    /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).