Nsis-mode 有人用吗?

想学习一下这个代码,但是不明白里面nsis-font-lock-syntax-variable函数的limit参数是怎么传递进去的。 源码位置

    (nsis-font-lock-syntax-variable
     (1 font-lock-constant-face t))

(defun nsis-font-lock-syntax-variable (limit)

里面的limit是如何从你写的那个调用的地方传进去的??

建议认真读一下 这个网页

以下引用上面的网页中关于 font-lock-keywords 为 function 的说明:

When function is called, it receives one argument, the limit of the search; it should begin searching at point, and not search beyond the limit. It should return non-nil if it succeeds, and set the match data to describe the match that was found. Returning nil indicates failure of the search.

关于 font-lock 的大部分问题,manual 里面都有详细的说明。

@mayingjun 链接最后多了句号,已修复。

1 个赞

你给我的是一个临时的网页,打不开。

好的,找到了,正在学习。 方便用QQ联系你吗?我的QQ:911158240

我不用 QQ。。。多看看 manual 就好了,毕竟 Emacs 是 self-documenting 的。