unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
Subject: RE: Why is custom--inhibit-theme-enable not t by default?
Date: Thu, 14 Jun 2018 07:21:21 -0700 (PDT)	[thread overview]
Message-ID: <a424c999-87bd-4f15-abe4-12e387fe8905@default> (raw)
In-Reply-To: <jwvvaamdplz.fsf-monnier+gmane.emacs.devel@gnu.org>

> >   > > Doesn't the command disable-theme undo the application of a
> >   > > custom theme?
> >
> >   > No.  Summary: There is no function that takes a snapshot
> >   > of the Emacs state (even, e.g., as a custom theme) before
> >   > applying any custom theme - which snapshot can then be used
> >   > to restore that pre-theme state.
> >
> > Perhaps we should redesign the way themes work
> > so that a theme is represented by data that says what it does,
> > and we could turn it on and off.
> 
> I don't think we need to redesign them, really: we simply need to say
> that loading the file won't enable the theme any more.  Also loading
> such a file should not have any "visible" side effect (same rule as for
> Elisp packages).
> 
> If a theme needs to run arbitrary code, it simply needs to define its
> own global minor mode `my-foo-mode` and then within its custom settings,
> it needs to set `my-foo-mode` to t.
> 
> Themes which follow these rules should work just fine in current
> Emacsen, so we can simply introduce this new rule, just like we did
> (a long time ago) when we decided that loading an Elisp file
> should be harmless.
> 
> AFAICT the themes bundled with Emacs already obey the rule.

AFAICS, you addressed the question of whether loading a theme
should activate it, but you did not address the point to which
you replied: disabling a custom theme does not undo it.

Maybe that point should be in a separate thread; dunno.  But
it is a separate point from the point that loading should not
enable/activate.



  reply	other threads:[~2018-06-14 14:21 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-12  4:14 Why is custom--inhibit-theme-enable not t by default? dancol
2018-06-12 15:23 ` Eli Zaretskii
2018-06-12 15:42   ` dancol
2018-06-12 16:37     ` Eli Zaretskii
     [not found]     ` <<83vaao3qrn.fsf@gnu.org>
2018-06-12 19:54       ` Drew Adams
2018-06-13 13:47         ` Basil L. Contovounesios
2018-06-13 14:22           ` Drew Adams
2018-06-13 16:55             ` Disabling custom themes (was: Why is custom--inhibit-theme-enable not t by default?) Basil L. Contovounesios
2018-06-13 17:16               ` Drew Adams
2018-06-13 17:21                 ` Disabling custom themes Eric Abrahamsen
2018-06-13 17:30                   ` Daniel Colascione
2018-06-14  2:34             ` Why is custom--inhibit-theme-enable not t by default? Richard Stallman
2018-06-14  3:26               ` Stefan Monnier
2018-06-14 14:21                 ` Drew Adams [this message]
2018-06-14 18:02                   ` Stefan Monnier
2018-06-14 18:16                     ` Drew Adams
2018-06-14 18:30                       ` Stefan Monnier
2018-06-14 18:41                         ` Basil L. Contovounesios
2018-06-14 20:09                           ` Stefan Monnier
2018-06-13 14:01     ` Basil L. Contovounesios
2018-06-17 21:31     ` Andy Moreton
2018-06-18 14:07       ` Andy Moreton
2018-06-19 14:49         ` Daniel Colascione
2018-06-12 18:24   ` Basil L. Contovounesios
2018-06-13  2:16   ` Richard Stallman
2018-06-13 13:56     ` Basil L. Contovounesios

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=a424c999-87bd-4f15-abe4-12e387fe8905@default \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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).