From: "Drew Adams" <drew.adams@oracle.com>
To: "'Lars Ingebrigtsen'" <larsi@gnus.org>
Cc: 5105@debbugs.gnu.org
Subject: bug#5105: 23.1; doc string of facemenu-set-face
Date: Mon, 1 Aug 2011 15:48:00 -0700 [thread overview]
Message-ID: <2F904FFA2E054F80832B75EBABFEE8D3@us.oracle.com> (raw)
In-Reply-To: <87wrewixi2.fsf@gnus.org>
> Using the name of something isn't as good as using the thing
> itself, in general.
Depends what you cover by "in general". In general, it's a _good thing_ when
functions let you use a buffer name in place of a buffer object.
An object is not its name, and no one is arguing the contrary, but referring to
an argument unambiguously by its name is no no-no.
> For buffers it's usually handy to use the name and the buffer
> object itself interchangeably,
Oh really? Why is that, do you suppose?
> but I don't see any reason to do the same with faces.
Same reason, _exactly_. Convenience.
There is nothing special about buffers in this regard.
Yes, you can always do `(get-buffer bname)' to get the buffer object from its
name, just as you can do `(face-name fname)' to get the face object from its
name.
But, as you say, it can be a lot handier not to have to do that each time. Code
is littered enough with calls to `get-buffer' where the arg might be a string.
Thank goodness (not badness) many functions are reasonable in this regard.
Same exact reasoning holds for faces and their names. Convenience.
FYI, below is a list of just those vanilla functions that actually declare in
their doc strings that the arg can be a buffer or its name by naming it
explicitly `BUFFER-OR-NAME'. As you can see, there are quite a few..., and many
of them are very recent additions. There are no doubt other functions and
macros that accept a buffer name but whose doc strings don't name the parameter
`BUFFER-OR-NAME'.
Why do you suppose so many functions do this? "Bad programmers" designed them?
A little less hubris, please.
bury-buffer
delete-windows-on
display-buffer
display-buffer-normalize-options
display-buffer-other-frame
display-buffer-other-window
display-buffer-same-frame
display-buffer-same-frame-other-window
display-buffer-same-window
get-buffer
get-buffer-create
get-buffer-window
get-buffer-window-list
kill-buffer
normalize-buffer-to-display
normalize-buffer-to-switch-to
normalize-live-buffer
pop-to-buffer
pop-to-buffer-other-frame
pop-to-buffer-other-window
pop-to-buffer-same-frame
pop-to-buffer-same-frame-other-window
pop-to-buffer-same-window
replace-buffer-in-windows
set-buffer
set-window-buffer
show-buffer
switch-to-buffer
switch-to-buffer-other-frame
switch-to-buffer-other-window
switch-to-buffer-same-frame
with-current-buffer
next prev parent reply other threads:[~2011-08-01 22:48 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
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 [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2F904FFA2E054F80832B75EBABFEE8D3@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 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.