emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: night-mode?


From: Juri Linkov
Subject: Re: night-mode?
Date: Sun, 22 Nov 2020 10:40:19 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

>> I've tested it with `emacs -rv`, and the effect of `night-mode`
>> is the same as `--reverse-video'.  But a minor problem is that
>> after starting Emacs with `-rv`, the first invocation of `night-mode`
>> has no effect.
>
> The initial-value of `night-mode` is arbitrarily set to nil, which is
> bound to be wrong half the times, yes.
>
> That's one of the problems in the current code.
> Patches welcome,

Maybe something like this:

diff --git a/lisp/startup.el b/lisp/startup.el
index 9f67dfde12..71d640701b 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -834,6 +834,7 @@ tty-handle-args
                                argval)))
                      default-frame-alist))
              ((member argi '("-r" "-rv" "-reverse"))
+              (setq night-mode t)
               (push '(reverse . t)
                      default-frame-alist))
              ((equal argi "-color")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]