unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Lars Magne Ingebrigtsen'" <larsi@gnus.org>
Cc: 5105@debbugs.gnu.org
Subject: bug#5105: 23.1; doc string of facemenu-set-face
Date: Fri, 15 Jul 2011 09:13:10 -0700	[thread overview]
Message-ID: <46B162590B174FA18FC402384C600E59@us.oracle.com> (raw)
In-Reply-To: <m3y5zzjzpn.fsf@quimbies.gnus.org>

> >> > The doc string should say explicitly what the args are. In 
> >> > particular, it should say that FACE can be a string or a symbol.
> >> 
> >> What does FACE mean if FACE is a string?
> >
> > You tell me.  And other users.
> >
> > The answer is apparently...the face name.
> > E.g., you can use the symbol `bold' or the string "bold".
> 
> Then I think it should be left undocumented.  That the command takes a
> string sounds like an historical artifact and should not be 
> encouraged.
> 
> I'm closing this report.

What?  Why are you arbitrarily deciding that?  Why not assume that allowing a
string is a good thing, a purposeful design decision?  What makes you conclude
that this is not something to be encouraged?

We have many places in Emacs where we allow an arg to be either a thing or its
name.  Think of all of the BUFFER args that can be a buffer or a buffer name.

Recently some code has been changed to name such parameters BLAH-OR-NAME instead
of BLAH.  An example is the bookmark.el code.  (I personally think that's a
mistake - the doc string still needs to say that BLAH-OR-NAME can be a BLAH or
its name.)

But the point here is that allowing FACE to be a string is a *feature*, not a
"historical artifact".  There is no reason to lose this feature, and no reason
it should not be documented.

You should not be designing on the fly that way.  This is a doc bug.  The doc
should mention that FACE can be a face or its name.  Nothing new about this.






  reply	other threads:[~2011-07-15 16:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-02 16:49 bug#5105: 23.1; doc string of facemenu-set-face Drew Adams
2011-07-13 14:42 ` Lars Magne Ingebrigtsen
2011-07-13 15:39   ` Drew Adams
2011-07-15 16:06     ` Lars Magne Ingebrigtsen
2011-07-15 16:13       ` Drew Adams [this message]
2011-07-18 14:27         ` Stefan Monnier
2011-07-18 16:55           ` Drew Adams
2011-08-01 21:27             ` Stefan Monnier
2011-08-01 21:47               ` Drew Adams
2011-08-01 22:21                 ` Lars Ingebrigtsen
2011-08-01 22:48                   ` Drew Adams
2011-08-02  0:31                   ` Stefan Monnier
2011-08-02  0:29                 ` Stefan Monnier
2011-08-02  1:36                   ` Drew Adams
2011-08-02 15:42                     ` Lars Magne Ingebrigtsen

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=46B162590B174FA18FC402384C600E59@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=5105@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 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).