这是情况:我需要检索脸部下方的点边界,但如果我使用高亮当前行模式,该面会覆盖我感兴趣的那个面。
使用
编辑:
这更多或多少是我最终所做的:
我只需要找出列表中是否有一个。
使用
face-at-point
或(get-char-property (point) 'face)
只会给出列表中的第一个面,而且它将是来自当前行覆盖的面。如何获取底层的面?编辑:
这更多或多少是我最终所做的:
(defun haxe-face-at-point ()
"This is like `face-at-point' except we will only look for faces
which are relevant to haxe-mode. This will also look under overlays
created by minor modes like ispel or highlight current line."
(interactive)
(let ((props (text-properties-at (point))))
(catch 't
(while props
(when (eql (car props) 'face)
(throw 't
(when (member (cadr props)
'(font-lock-string-face
font-lock-keyword-face
font-lock-variable-name-face
font-lock-comment-face
font-lock-preprocessor-face
font-lock-type-face
default))
(cadr props))))
(setq props (cdr props))))))
我只需要找出列表中是否有一个。