bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#32921: emacsclient obeys Xresources even when launched with -nw


From: Po Lu
Subject: bug#32921: emacsclient obeys Xresources even when launched with -nw
Date: Fri, 20 May 2022 09:04:00 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

> No, there is a difference: when we change default-frame-alist at
> startup time, that change is thereafter propagated to all future
> frames, independently of what frame-creation-function will do when
> each new frame is created.

But it seems that the `reverse' frame parameter is also only handled
inside `x-handle-reverse-video', so it only takes effect if the
frame-creation-function is eventually called:

    (defun x-handle-reverse-video (frame parameters)
      "Handle the reverse-video frame parameter and X resource.
    `x-create-frame' does not handle this one."
      (when (cdr (or (assq 'reverse parameters)
                     (let ((resource (x-get-resource "reverseVideo"
                                                     "ReverseVideo")))
                       (if resource
                           (cons nil (member (downcase resource)
                                             '("on" "true")))))))
          (let* ((params (frame-parameters frame))
                 (bg (cdr (assq 'foreground-color params)))
                 (fg (cdr (assq 'background-color params))))
            (modify-frame-parameters frame
                                     (list (cons 'foreground-color fg)
                                           (cons 'background-color bg)))
            (if (equal bg (cdr (assq 'border-color params)))
                (modify-frame-parameters frame
                                         (list (cons 'border-color fg))))
            (if (equal bg (cdr (assq 'mouse-color params)))
                (modify-frame-parameters frame
                                         (list (cons 'mouse-color fg))))
            (if (equal bg (cdr (assq 'cursor-color params)))
                (modify-frame-parameters frame
                                         (list (cons 'cursor-color fg)))))))

> The reverseVideo resource, like the -rv command-line argument, is
> supposed to invert the colors that the user's customizations set.
> Maybe this is why it is handled specially.

Hmm...




reply via email to

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