如何在Emacs Lisp中访问当前区域的内容? [英] How do I access the contents of the current region in Emacs Lisp?
本文介绍了如何在Emacs Lisp中访问当前区域的内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想以一个函数内的字符串来访问当前区域的内容。例如:
I want to access the contents of the current region as a string within a function. For example:
(concat "stringa" (get-region-as-string) "stringb")
谢谢
Ed
推荐答案
buffer-substring
连同 region-beginning
和 region-结束
可以这样做。
这篇关于如何在Emacs Lisp中访问当前区域的内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文