删除尾随突出显示[EMACS配置]

时间:2016-09-06 11:15:12

标签: emacs highlight

我一直在寻找在emacs配置文件中添加一些额外的功能。

我想要的是突出匹配的parens,
但是使用mic-paren默认行为仅在光标后选择关闭parens(这对于打开paren工作正常)。

this回答几乎可以实现所需的功能,但是余辉会分散注意力。

;;; Will highlight when cursor on closing parenthesis, however leaves afterglow...
(defadvice mic-paren-highlight (around cursorOnClosing activate)
  "Dirty hack to highlight sexps with closing delim below cursor"
  (if (eq (char-syntax (following-char)) ?\) )
      (let ((paren-priority 'close))
        (save-excursion
          (forward-char)
          ad-do-it))
    ad-do-it))

任何更好的选择,或者你可以给我一些纠正以获得理想的行为?提前谢谢

1 个答案:

答案 0 :(得分:0)

对于遇到此问题的任何人,emacs 25.1 Released September 17, 2016

的新版本

来自News文件:

In Show Paren Mode, a parenthesis can be highlighted when point
stands inside it, and certain parens can be highlighted when point is
at BOL or EOL, or in whitespace there.  To enable these, customize,
respectively, 'show-paren-when-point-inside-paren' or
'show-paren-when-point-in-periphery'.

所以为了解决这个问题:

'show-paren-when-point-inside-paren'
相关问题