【发布时间】:2019-01-18 12:25:56
【问题描述】:
我正在编写一个 elisp 函数来为符号提供简短的帮助描述:
(defun set-up-tooltip()
;; search for the text to be highlighted
...
(add-text-properties (match-beginning 0)
(match-end 0)
'(mouse-face highlight
help-echo (get-help-text (match-beginning 0)))
(get-help-text ) 函数需要打开另一个文件来搜索文本。问题是:如何在后台打开这个文件,让用户不会注意到?我试过了:
(defun get-help-text(
(save-excursion
(with-temp-buffer
(find-file "lookup-file")
;;search for the text
...
)))))
在这里,在临时缓冲区中打开的文件在我调用函数的窗口中打开,而不是在后台打开。此类任务有惯用的方法吗?
【问题讨论】: