From: Richard Stallman <rms@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: color-theme.el
Date: Sat, 31 Aug 2002 12:58:11 -0400 [thread overview]
Message-ID: <E17lBZb-0007Mw-00@fencepost.gnu.org> (raw)
In-Reply-To: <87ofbmomnm.fsf@emacswiki.org> (message from Alex Schroeder on Wed, 28 Aug 2002 20:37:01 +0200)
I think we could write something like that without the need for
cus-theme.el. A wizard using widget.el that lets you specify the
variables that are part of the theme, the name of theme, and a file
name. It would then save the appropriate lisp code -- a bunch of setq
statements (in a defun, with appropriate call to `provide').
We would then modify the `startup-functions' idea I presented in an
earlier mail: Let it be called `startup-requires'. Users could then
save the file with the generated setq statements in their load-path,
and customize `startup-requires' such that the appropriate theme is
loaded, and the variables are set, at startup time.
This would provide the user experience you describe, with very little
work required.
This may not be a very large job, but the first part is not
trivial--do you want to do it?
As for the feature of using multiple themes, of being able to add and
remove themes from the list and have the right thing happen, I think I
see an easy way to add that. We just have to make sure that each
theme function saves the old values of the variables that it sets, so
that it can "turn itself off" later on.
Then, when the user edits the list of currently enabled themes, here's
what you do. You turn off all the themes in the list, in reverse
order. You change the list. Then you turn on the themes that are now
in the list.
> The problem is that any individual option set by "setq" from a funtion
> in such a list will overwrite the users individual customization of
> that item. With Jans themes it is the other way around, the explicit
> individual settings will overwrite the the settings.
If we want that, let the customization of `startup-requires' be the
first thing acted upon when doing customization.
That would work at startup. To make it work right for editing the
list later would take a little more. These theme functions could
carefully avoid setting variables that are marked as customized.
This probably means that instead of using setq directly, they should
use a macro `theme-setq' to set each variable. The macro would take care of
recording the old value, not setting variables that are customized,
etc.
Would this give equivalent benefits to cus-theme.el?
Your scheme won't integrate cleanly with customize (the option will be
marked "rogue", i.e. "option is changed outside customize"), which is
my major emotional problem with it.
Would it be difficult to create a new status value, "set by a theme"?
theme-setq could mark the variable with this status.
Meanwhile, would anyone be willing to step forward to integrate
cus-theme.el into Emacs?
next prev parent reply other threads:[~2002-08-31 16:58 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-24 4:32 IRC Client for Emacs Jonathan Walther
2002-08-24 5:11 ` Damien Elmes
2002-08-24 16:50 ` color-theme.el Alex Schroeder
2002-08-26 12:45 ` color-theme.el Per Abrahamsen
2002-08-27 19:05 ` color-theme.el Richard Stallman
2002-08-28 14:19 ` color-theme.el Per Abrahamsen
2002-08-28 23:33 ` color-theme.el Richard Stallman
2002-08-29 11:55 ` color-theme.el Per Abrahamsen
2002-08-29 17:14 ` color-theme.el Alex Schroeder
2002-08-30 19:17 ` color-theme.el Richard Stallman
2002-08-31 11:38 ` color-theme.el Alex Schroeder
2002-09-01 13:14 ` color-theme.el Richard Stallman
2002-09-01 16:07 ` color-theme.el Alex Schroeder
2002-09-07 14:15 ` color-theme.el Alex Schroeder
2002-09-09 0:21 ` color-theme.el Richard Stallman
2002-08-27 23:18 ` color-theme.el Alex Schroeder
2002-08-28 14:37 ` color-theme.el Per Abrahamsen
2002-08-28 18:37 ` color-theme.el Alex Schroeder
2002-08-29 12:12 ` color-theme.el Per Abrahamsen
2002-08-31 16:58 ` Richard Stallman [this message]
2002-09-01 0:05 ` color-theme.el Alex Schroeder
2002-09-02 0:01 ` color-theme.el Richard Stallman
2002-09-02 20:37 ` color-theme.el Alex Schroeder
2002-09-07 14:17 ` color-theme.el Alex Schroeder
2002-08-25 5:27 ` IRC Client for Emacs Richard Stallman
2002-08-25 13:38 ` color-theme.el Alex Schroeder
2002-08-25 15:56 ` color-theme.el Eli Zaretskii
2002-09-02 0:02 ` color-theme.el Richard Stallman
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=E17lBZb-0007Mw-00@fencepost.gnu.org \
--to=rms@gnu.org \
--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 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.