0

If I describe-face over a strong color in Emacs, it tells me that its foreground is #ffd700, but when I eval this:

(set-face-attribute 'font-lock-comment-face nil :foreground "#ffd700") 

..it has a grayed out yellow color;)

See screenshot here:

https://i.stack.imgur.com/3oXav.jpg

  1. The color I want
  2. The color I get

Is there some secondary color here or something?;)

C-u C-x = gives me:

             position: 211 of 289 (73%), column: 10                                                                                                                                                                                           
            character: e (displayed as e) (codepoint 101, #o145, #x65)                                                                                                                                                                        
              charset: ascii (ASCII (ISO646 IRV))                                                                                                                                                                                             
code point in charset: 0x65                                                                                                                                                                                                                   
               script: latin                                                                                                                                                                                                                  
               syntax: w        which means: word                                                                                                                                                                                             
             category: .:Base, L:Left-to-right (strong), a:ASCII, l:Latin, r:Roman                                                                                                                                                            
             to input: type "C-x 8 RET 65" or "C-x 8 RET LATIN SMALL LETTER E"                                                                                                                                                                
          buffer code: #x65                                                                                                                                                                                                                   
            file code: #x65 (encoded by coding system undecided-unix)                                                                                                                                                                         
              display: terminal code #x65                                                                                                                                                                                                     
                                                                                                                                                                                                                                              
Character code properties: customize what to show                                                                                                                                                                                             
  name: LATIN SMALL LETTER E                                                                                                                                                                                                                  
  general-category: Ll (Letter, Lowercase)                                                                                                                                                                                                    
  decomposition: (101) ('e')                                                                                                                                                                                                                  
                                                                                                                                                                                                                                              
There is an overlay here:                                                                                                                                                                                                                     
 From 210 to 213                                                                                                                                                                                                                              
  face                 tide-hl-identifier-face                                                                                                                                                                                                
  tide-overlay         sameid                                                                                                                                                                                                                 
                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                              
There are text properties here:                                                                                                                                                                                                               
  face                 font-lock-function-name-face                                                                                                                                                                                           
  fontified            t        

Jason Hunter
  • 495
  • 1
  • 4
  • 11
  • (1) What does `C-u C-x =` tell you about the face in that comment when you put the cursor there? (2) Consider customizing `font-lock-comment-face` instead of using `set-face-attribute`, whose doc string tells us `It is mostly intended for internal use only.` – Drew Aug 16 '20 at 15:14
  • I added output of C-u C-x = – Jason Hunter Aug 16 '20 at 20:48
  • Show the text where you have the face in question. Is it actually within a comment? Do you see the same problem if you start Emacs with `emacs -Q` (no init file)? If not, bisect your init file to find out what might be causing the interference. You can also check the value of `font-lock-keywords` - it seems that font-lock thinks that the text in question should be highlighted (only) as a function name, and not as part of a comment. – Drew Aug 16 '20 at 22:54
  • I did not exactly eval over the text I had in the screenshot, but I eval over text which has the same strong yellow color. I will eval the correct text and show that – Jason Hunter Aug 18 '20 at 20:09

0 Answers0