all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 16483@debbugs.gnu.org
Subject: bug#16483: 24.3.50; `read-face-name' is a mess now (regression)
Date: Fri, 29 Apr 2016 11:09:35 -0700 (PDT)	[thread overview]
Message-ID: <8f8ef28b-84c6-4205-8720-2711b1a8368b@default> (raw)
In-Reply-To: <871t5o2zqb.fsf@gnus.org>

> > 1. The doc string no longer says what the behavior is if DEFAULT is nil.
> > In Emacs 24.3, it said this for that case:
> >
> >  If DEFAULT is nil, the list of default face names is taken from
> >  the `read-face-name' property of the text at point, or, if that
> >  is nil, from the `face' property of the text at point.
> >
> > What happens now?  No information about that.  See below for my guess.
> > Please tell users of the function what its behavior is.
> 
> As far as I can see, if DEFAULT is nil, there is no list of default face
> names?

Yes, and so no default value is put in the prompt.

Note: This handling of the prompt and the default value(s) for
this function have a long and torturous history.  This stuff
has been changed a zillion times, with each time being something
arcane and incomprehensible for users (IMHO).

It is simpler (better) now.  This item (#1) can be closed: if
DEFAULT is nil now, the only effect it has is on the return
value (`nil'). 

> > 2. The doc string says that DEFAULT is returned if the user enters the
> > empty string.  That is clearly wrong, at least when DEFAULT is a list of
> > faces or face names.  DEFAULT is not returned in such cases.  The most
> > that can be said in general is that DEFAULT _determines_ what is
> > returned for empty input - not that DEFAULT _is_ what is returned.
> 
> I've now made the doc string more correct, if more difficult to parse.

I trust it must be better.  It can always be improved more
in the future if not completely satisfactory.  Thx.

> > 8. What happened to the useful defaulting of previous Emacs versions?
> > Yes, I know why you made the change, but now any existing code that uses
> > `read-face-name' is broken if it depends on `r-f-n' to provide such
> > defaulting.  Too bad.
> >
> > Please consider: There is more Elisp code in the world than just what is
> > distributed by Emacs Dev.  `read-face-name' has been and continues to be
> > a poster child of how not to evolve code.  It has morphed in incompatible
> > ways from version to version.  The right way to do what you wanted to do
> > for Emacs 24.4 would have been to go ahead and define `face-at-point',
> > but to *use* it in `read-face-name', so that that function continues to
> > provide the expected defaulting when DEFAULT is nil:
> >
> >   (unless default (setq default  (face-at-point)))
> >
> > I somehow doubt that that part of the regression will be fixed, but
> > perhaps some of the other points above have a chance of being addressed.
> 
> Yes, that's outside the scope of read-face-name, I think.





      reply	other threads:[~2016-04-29 18:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-17 23:54 bug#16483: 24.3.50; `read-face-name' is a mess now (regression) Drew Adams
2016-04-29 15:37 ` Lars Ingebrigtsen
2016-04-29 18:09   ` Drew Adams [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8f8ef28b-84c6-4205-8720-2711b1a8368b@default \
    --to=drew.adams@oracle.com \
    --cc=16483@debbugs.gnu.org \
    --cc=larsi@gnus.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.