作者:zealyw | 来源:互联网 | 2023-05-26 13:18
如何在elisp中将缓冲区的当前行收集为字符串值?我可以做这个,
(let (p1 p2 myLine)
(setq p1 (line-beginning-position) )
(setq p2 (line-end-position) )
(setq myLine (buffer-substring-no-properties p1 p2))
)
但无论如何我可以在一行中做到,
(with-current-buffer get-current-line)
Steve Vinosk..
33
用途thing-at-point
:
(thing-at-point 'line t)
但请注意,这也会返回行尾的任何换行符.
1> Steve Vinosk..:
用途thing-at-point
:
(thing-at-point 'line t)
但请注意,这也会返回行尾的任何换行符.