2
爲了某種愚蠢的原因,我想寫一個完整的讀取函數來讀取Emacs的縮寫。如何在elisp中找到所有可用的縮寫?
(defun ivy-abbrev (abbrev-name)
(interactive
(list
(ivy-completing-read "Insert abbrev: " (...get abbrev names here...))))
(progn
(abbrev-insert (abbrev-symbol abbrev-name ..appropriate abbrev-table...))))
遺憾的是沒有任何東西使文檔中......獲得縮寫名稱...看看這樣做,能夠:
https://www.gnu.org/software/emacs/manual/html_node/elisp/Abbrevs.html#Abbrevs
在abbrev--before-point
展望源,它看起來好像有一個在每次調用時通過abbrev--active-tables
進行遞歸搜索。
在這個縮寫API中是否有一個輔助方法可以使這更容易?
'M-x write-abbrev-file'將所有當前定義的縮寫寫入您指定的文件。使用'quietly-read-abbrev-file'或'read-abbrev-file'來讀取它。名稱爲變量'abbrev-file-name'的值的文件默認使用。 – Drew