使用M-/时,当前缓冲区中的文本将自动补全为所有活动缓冲区中的建议。
有没有办法将建议限制在仅一个特定的缓冲区中?
使用M-/时,当前缓冲区中的文本将自动补全为所有活动缓冲区中的建议。
有没有办法将建议限制在仅一个特定的缓冲区中?
"If non-nil, a list of buffers which dabbrev should search.
If this variable is non-nil, dabbrev will only look in these buffers.
It will not even look in the current buffer if it is not a member of
this list."
M-/
重新绑定到此函数以供该模式使用)。(defun tks-dabbrev-expand (arg)
"Expand either aliases or descriptions, depending on context."
(interactive "*P")
(let* ((candidates
(if (looking-back "^\\S-+")
" *tks-aliases*"
" *tks-descriptions*"))
(dabbrev-search-these-buffers-only (list (get-buffer candidates))))
(dabbrev-expand arg)))
customize-group
RET dabbrev
RET