unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#15717: 24.3.50; document `custom-available-themes', `custom-known-themes' in Elisp manual
@ 2013-10-25 15:39 Drew Adams
  2013-12-18 14:52 ` Chong Yidong
  0 siblings, 1 reply; 2+ messages in thread
From: Drew Adams @ 2013-10-25 15:39 UTC (permalink / raw)
  To: 15717

These functions are as important for programmers as is `custom-theme-p'.
It is especially important to distinguish them, in particular wrt
`custom-theme-p', which uses only `custom-known-themes'.  An "available"
theme is not necessarily a "known" theme.  This can be confusing.

For example, I was doing this at first:

(defcustom doremi-custom-themes ()
  "*List of custom themes to cycle through using `doremi-custom-themes+'."
  :type '(repeat (restricted-sexp :match-alternatives (custom-theme-p)))
  :group 'doremi-misc-commands)

But what I really needed was the following, because the "available" themes
are not necessarily available from the outset - the set of "known" themes
is too limited for use here.

(defcustom doremi-custom-themes ()
  "*List of custom themes to cycle through using `doremi-custom-themes+'."
  :type '(repeat (restricted-sexp
                  :match-alternatives
                  ((lambda (s) (memq s (custom-available-themes))))))
  :group 'doremi-misc-commands)



In GNU Emacs 24.3.50.1 (i686-pc-mingw32)
 of 2013-10-19 on LEG570
Bzr revision: 114715 rgm@gnu.org-20131019023520-s8mwtib7xcx9e05w
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --enable-checking 'CFLAGS=-O0 -g3' CPPFLAGS=-DGLYPH_DEBUG=1'





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

* bug#15717: 24.3.50; document `custom-available-themes', `custom-known-themes' in Elisp manual
  2013-10-25 15:39 bug#15717: 24.3.50; document `custom-available-themes', `custom-known-themes' in Elisp manual Drew Adams
@ 2013-12-18 14:52 ` Chong Yidong
  0 siblings, 0 replies; 2+ messages in thread
From: Chong Yidong @ 2013-12-18 14:52 UTC (permalink / raw)
  To: Drew Adams; +Cc: 15717-done

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

> These functions are as important for programmers as is
> `custom-theme-p'.  It is especially important to distinguish them, in
> particular wrt `custom-theme-p', which uses only
> `custom-known-themes'.  An "available" theme is not necessarily a
> "known" theme.  This can be confusing.

I've added custom-known-themes to the manual, and updated the docstring
of custom-available-themes to emphasize that it's meant for things like
completion.  (I don't think custom-available-themes is suitable for the
Lisp manual, but custom-theme-load-path is already documented.)





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

end of thread, other threads:[~2013-12-18 14:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-25 15:39 bug#15717: 24.3.50; document `custom-available-themes', `custom-known-themes' in Elisp manual Drew Adams
2013-12-18 14:52 ` 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).