测试点是否在匹配的引号之间(emacs lisp) [英] Test whether the point is between matching quotes (emacs lisp)

查看:80
本文介绍了测试点是否在匹配的引号之间(emacs lisp)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们如何检查(point)是否在匹配的引号"内

How do we check whether (point) is within matching "quotes"

示例1:"(point)",

但不在

示例2:在这里引用" (point)在这里引用",

Example 2: "quote here" (point) "quote there",

在Emacs Lisp中?

in Emacs Lisp?

推荐答案

您正在寻找的是syntax-ppss(在syntax.el中定义). 它返回10个值,第4个告诉您该点是否在字符串内.

What you are looking for is syntax-ppss (defined in syntax.el). It returns 10 values, and the 4th tells you whether the point is inside a string.

这篇关于测试点是否在匹配的引号之间(emacs lisp)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆