telephone-line icon indicating copy to clipboard operation
telephone-line copied to clipboard

Issue with face for telephone-line-major-mode-segment in elisp major mode

Open benmunkres opened this issue 10 months ago • 2 comments

Hello, When using the telephone-line-major-mode-segment in Elisp major mode, with the accent face selected for the segment, the /t and /l portion of the text appears that it does not have the face correctly applied: image I suspect this is an issue with the propertizing of the face, as the mode-name variable already has a face applied it it:

("ELisp"
 (lexical-binding
  (:propertize "/l" help-echo "Using lexical-binding mode")
  (:propertize "/d" help-echo "Using old dynamic scoping mode
mouse-1: Enable lexical-binding mode" face warning mouse-face mode-line-highlight local-map
(keymap
 (mode-line keymap
            (mouse-1 . elisp-enable-lexical-binding))))))

I personally don't know enough about elisp to have any idea how to override the face for this part of the text, so any help would be appreciated!

benmunkres avatar Mar 30 '24 00:03 benmunkres

IIRC, not wiping existing properties is intentional, since otherwise it'd wipe other non-visual properties as well, but OTOH I think if you put this segment inside of a non-nil supersegment, it should override it with the appropriate face?

dbordak avatar Apr 03 '24 02:04 dbordak

I tried putting it inside an accent supersegment (with a custom colored face, but the same still happens with the normal accent supersegment):

(setq telephone-line-rhs 
	`(...
	  (accent . (telephone-line-major-mode-segment))
	  ...)

Which results in the same issue: image My only guess as to what's happening is that given in the variable, "Elisp" has no face applied afaik, but the "/l" or "/d" does so it might not be correctly overriding that part of the variable? It looks like it might be replacing the warning face with the nil supersegment face instead of the accent face. Thank you!

benmunkres avatar Apr 20 '24 22:04 benmunkres