all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#22915: foreground-color-at-point doesn't return the foreground color at point (when overlays are present)
@ 2016-03-05  6:10 Clément Pit--Claudel
  2016-03-05  8:15 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Clément Pit--Claudel @ 2016-03-05  6:10 UTC (permalink / raw)
  To: 22915


[-- Attachment #1.1: Type: text/plain, Size: 1010 bytes --]

Reproduction with emacs -Q:

(with-current-buffer (get-buffer-create "*broken*")
  (require 'cl-lib)
  (erase-buffer)
  (delete-all-overlays)
  (fundamental-mode)
  (insert "AAAAA")
  (goto-char (point-min))

  ;; Add two faces
  (set-text-properties (point-min) (point-max) '(face font-lock-type-face))
  (let ((ov (make-overlay (point-min) (point-max))))
    (overlay-put ov 'face 'font-lock-negation-char-face))

  ;; This passes, proving that font-lock-negation-char-face is not contributing to the
  ;; foreground color
  (cl-assert (eq (face-attribute 'font-lock-negation-char-face :foreground)
                 'unspecified))

  ;; This fails: foreground-color-at-point reads the face of the overlay, sees that it's undefined, 
  ;; and ignores the 'face text property 
  (cl-assert (eq (foreground-color-at-point)
                 (face-attribute 'font-lock-type-face :foreground)))

  (pop-to-buffer (current-buffer)))

Let me know if I can provide more info.
Clément.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-03-05  8:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-05  6:10 bug#22915: foreground-color-at-point doesn't return the foreground color at point (when overlays are present) Clément Pit--Claudel
2016-03-05  8:15 ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.