Get font face under cursor in Emacs

后端 未结 5 648
Happy的楠姐
Happy的楠姐 2020-12-12 12:48

I\'ve been developing my own custom color theme, and it\'d be really useful if I could get a list of font-faces affecting the text under the cursor.

Something like T

5条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-12 13:07

    what-cursor-position with a prefix argument shows the face under point, among other information.

    Keyboard shortcut is C-u C-x =

    Example output (the face property is shown in the last paragraph):

                 position: 5356 of 25376 (21%), column: 4
                character: r (displayed as r) (codepoint 114, #o162, #x72)
        preferred charset: ascii (ASCII (ISO646 IRV))
    code point in charset: 0x72
                   syntax: w    which means: word
                 category: .:Base, L:Left-to-right (strong), a:ASCII, l:Latin, r:Roman
              buffer code: #x72
                file code: #x72 (encoded by coding system undecided-unix)
                  display: by this font (glyph code)
        nil:-apple-Monaco-medium-normal-normal-*-12-*-*-*-m-0-iso10646-1 (#x55)
    
    Character code properties: customize what to show
      name: LATIN SMALL LETTER R
      general-category: Ll (Letter, Lowercase)
      decomposition: (114) ('r')
    
    There are text properties here:
      face                 org-level-2
      fontified            t
    
    [back]
    

提交回复
热议问题