Emacs: how to get the default theme?

后端 未结 5 1987
悲&欢浪女
悲&欢浪女 2021-02-13 03:18

I\'ve been using the default theme with about 10 faces changed via custom-set-faces for a while now. But from time to time I want to try out a couple of the custom

5条回答
  •  灰色年华
    2021-02-13 03:27

    Others have mentioned ways to try to work around the problem. I'll just point out that there is, so far, an inherent problem with Emacs custom themes, in terms of trying to "undo" them and get back to a previous, possibly customized but not custom-themed state.

    Particularly if you want to do this non-interactively, e.g., in the code for a command that lets users try themes out but also lets them cancel (e.g. C-g) and return to the previous state, before theming.

    You can disable all themes that were ever enabled in the session, but that will not return your session to its state before the themes were enabled. Disabling a theme is, in effect, only relative to other themes, not to an uncustomized state or (especially) to other, non-theme customizations.

    See also:

    • http://lists.gnu.org/archive/html/help-gnu-emacs/2014-02/msg00334.html
    • http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15687

    (Oh, and FWIW, color themes, which were presumably the inspiration for Emacs custom themes, do not have this problem. And they work fine with all Emacs versions, including the latest. They have different limitations from custom themes, however. It would be good for the custom theme implementation to be fixed/completed, so custom themes can completely replace color themes.)

提交回复
热议问题