Subject: 29.0.60; Cursor color not being inverted in emacs-29

From: Al Haji-Ali <[email-masked]>
Date: Fri, 31 Mar 2023 19:34:05 +0100

I noticed a change in the default cursor colour of emacs 29. It seems that in emacs 28.2 (at least) the cursor colour is inverted when it is on a background of the same colour but in emacs 29 the cursor colour is not changed making it impossible to see.

For example, the following code inserts text with a black background (same as the cursor colour). When the cursor is on top of this text in emacs 28.2 it becomes yellow'ish but it is invisible in emacs 29.

;; Start with emacs -Q

(fundamental-mode)

(defface my-back-face
  '((t :foreground "yellow"
       :background "black"))
  "Testing.")

(let ((current-string "\ntext to insert"))
  (put-text-property 0 (length current-string)
		     'face 'my-back-face
                     current-string)
  (insert current-string))

How can I get the emacs 28.2 behaviour? Maybe this should be the default behaviour in emacs 29?

-- Al