the*_*edz 94 emacs fonts emacs-faces
我一直在开发自己的自定义颜色主题,如果我能得到一个影响光标下文本的字体列表,那将非常有用.
类似Textmate的显示当前范围命令.
这样可以省去Mx自定义面部和查看可用选项的麻烦,猜测哪一个会影响我当前的单词.
有任何想法吗?
jlf*_*jlf 169
what-cursor-position 带有前缀参数显示面下的点,以及其他信息.
键盘快捷键是Cu Cx =
示例输出(face属性显示在最后一段中):
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]
Run Code Online (Sandbox Code Playgroud)
Yoo*_*Yoo 63
Mx describe-face
Tre*_*son 41
您可以what-face使用以下代码进行定义:
(defun what-face (pos)
(interactive "d")
(let ((face (or (get-char-property (pos) 'read-face-name)
(get-char-property (pos) 'face))))
(if face (message "Face: %s" face) (message "No face at %d" pos))))
Run Code Online (Sandbox Code Playgroud)
之后,
M-x what-face
Run Code Online (Sandbox Code Playgroud)
将打印当前点找到的面部.
(感谢thedz指出它what-face没有内置.)
Trey的脸是在正确的轨道上.它让我收到邮件列表上的一封电子邮件:
(defun what-face (pos)
(interactive "d")
(let ((face (or (get-char-property (point) 'read-face-name)
(get-char-property (point) 'face))))
(if face (message "Face: %s" face) (message "No face at %d" pos))))
Run Code Online (Sandbox Code Playgroud)