unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Emacs-Devel'" <emacs-devel@gnu.org>
Subject: :file keyword for Customize
Date: Thu, 8 May 2008 09:35:04 -0700	[thread overview]
Message-ID: <004101c8b129$788cd490$0ab32382@us.oracle.com> (raw)

How about adding a :file keyword for `defcustom' and `defface'?

(defcustom foo-bar-flag t
  "Non-nil means toto."
  :type 'boolean :group 'foo
  :file (if (eq system-type 'windows-nt)
            "C:\\foo-stuff\\foo-cus.el"
          "/toto/foo-stuff/foo-cus.el"))

Its argument would be evaluated to a file name. That particular `defcustom' or
`defface' setting would be saved in that file, instead of in `custom-file' or
`init-file'. A nil or "" value for :file would mean the same thing as the
absence of a :file keyword: as now, use `custom-file' or, if no `custom-file',
`init-file'.

This could provide a little more modularity for packages (and for any other
groupings of options & faces). It could help deal with things like platform
differences (for a package) and initialization order of settings. It could allow
users a little more flexibility in terms of when some groups of Customize
settings are loaded (currently, all Customize settings are loaded at once). It
could simplify communication with package authors about bugs (e.g. automatically
include the package's Customize settings in a bug report).

I don't have a particular use-case in mind; it's just something that occurred to
me. There is nothing special in this, but I think it might help organize things
a bit. A user's `custom-file' or `init-file' can become a monolithic blob, and
this could help cut down on that.





             reply	other threads:[~2008-05-08 16:35 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-08 16:35 Drew Adams [this message]
2008-05-08 16:43 ` :file keyword for Customize Jason Rumney
2008-05-08 16:59   ` Drew Adams
2008-05-08 17:08     ` Jason Rumney
2008-05-08 17:41       ` Ted Zlatanov
2008-05-08 18:00         ` Drew Adams
2008-05-08 19:12           ` Ted Zlatanov
2008-05-08 21:27             ` Drew Adams
2008-05-09 14:01               ` Ted Zlatanov
2008-05-08 20:00           ` Stephen J. Turnbull
2008-05-08 21:27             ` Drew Adams
2008-05-08 21:34               ` Jason Rumney
2008-05-09  6:43               ` Stephen J. Turnbull
2008-05-09  8:37             ` Bastien
2008-05-08 18:00       ` Drew Adams
2008-05-08 20:48 ` David Kastrup
2008-05-08 21:34   ` Drew Adams
2008-05-08 21:48     ` Jason Rumney
2008-05-08 22:10       ` Drew Adams
2008-05-08 22:31         ` David Kastrup
2008-05-08 21:51     ` David Kastrup
2008-05-09 14:11   ` Ted Zlatanov
2008-05-09 14:34     ` David Kastrup
2008-05-09 15:07       ` Ted Zlatanov
2008-05-09 21:17         ` Stephen J. Turnbull
2008-05-12 13:13           ` :password customize type (was: :file keyword for Customize) Ted Zlatanov
2008-05-09 11:12 ` :file keyword for Customize Richard M Stallman
2008-05-13 13:53 ` Paul R
2008-05-13 14:28   ` Stefan Monnier
2008-05-13 21:48   ` Miles Bader

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='004101c8b129$788cd490$0ab32382@us.oracle.com' \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.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).