unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#7774: 24.0.50; `frame-background-mode'
@ 2011-01-03  7:25 Drew Adams
  2011-01-03  8:11 ` Drew Adams
  0 siblings, 1 reply; 3+ messages in thread
From: Drew Adams @ 2011-01-03  7:25 UTC (permalink / raw)
  To: 7774

emacs -Q
 
There needs to be some explanation of `frame-background-mode' for users
and for Emacs-Lisp programmers.
 
First, the option is described briefly in the Elisp manual, but not in
the Emacs manual.  It is a _user_ option, and should be in the latter.
 
Second, the (elisp) entry does not say what happens if the value is
nil.  The doc string does say that if it is nil then Emacs will "examine
the brightness for you".  That explanation of nil is incomprehensible
and pretty useless for users, but it is especially useless for
programmers. 
 
I had some code that tried to DTRT for a given color based on the
`frame-background-mode'.  I was incorrectly assuming that the value was
set to `light' or `dark' automatically by Emacs ("examine the brightness
for you") if it was not already set (customized) by the user.
 
Now I guess I will need to call `frame-set-background-mode' if the value
is nil, to determine the proper value.  The doc should have helped here.
 

In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2010-12-20 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4) --no-opt --cflags
-Ic:/imagesupport/include'
 






^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#7774: 24.0.50; `frame-background-mode'
  2011-01-03  7:25 bug#7774: 24.0.50; `frame-background-mode' Drew Adams
@ 2011-01-03  8:11 ` Drew Adams
  2012-08-05  9:25   ` Chong Yidong
  0 siblings, 1 reply; 3+ messages in thread
From: Drew Adams @ 2011-01-03  8:11 UTC (permalink / raw)
  To: 7774

> Now I guess I will need to call `frame-set-background-mode' 
> if the value is nil, to determine the proper value.

Forget that "solution".  I was confusing the option with the frame parameter.
What I needed to test was the parameter `background-mode', not the option.

That doesn't change the rest of the bug report.  The option should be mentioned
in the Emacs manual. (I'm not even sure it's needed also in the Elisp manual.)
And the manual, like the doc string, should mention the value nil.






^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#7774: 24.0.50; `frame-background-mode'
  2011-01-03  8:11 ` Drew Adams
@ 2012-08-05  9:25   ` Chong Yidong
  0 siblings, 0 replies; 3+ messages in thread
From: Chong Yidong @ 2012-08-05  9:25 UTC (permalink / raw)
  To: Drew Adams; +Cc: 7774

"Drew Adams" <drew.adams@oracle.com> writes:

> The option should be mentioned in the Emacs manual. (I'm not even sure
> it's needed also in the Elisp manual.)  And the manual, like the doc
> string, should mention the value nil.

Fixed in trunk.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-08-05  9:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-03  7:25 bug#7774: 24.0.50; `frame-background-mode' Drew Adams
2011-01-03  8:11 ` Drew Adams
2012-08-05  9:25   ` Chong Yidong

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).