2013-04-09 92 views
0

當我從菜單中選擇動作時,有沒有辦法看到emacs正在做什麼?
比如我想看到什麼,當我在如何跟蹤emacs菜單?

Tools --> Spell Checking --> Automatic spell checking 

點擊這可能是學習什麼,包括對init文件默認啓用自動拼寫檢查時很有用口齒不清的命令被執行。謝謝。

回答

1

菜單被實現爲鍵盤佈局,以及describe-key處理鼠標事件一般,所以你可以簡單地使用:

ķ(選擇菜單)

在這種情況下,我們看到:

<menu-bar> <tools> <spell> <flyspell-mode> runs the command 
flyspell-mode, which is an interactive autoloaded Lisp function in 
`flyspell.el'. 

It is bound to <menu-bar> <tools> <spell> <flyspell-mode>. 

(flyspell-mode &optional ARG) 

Toggle on-the-fly spell checking (Flyspell mode). 
[...] 

其實跟蹤lisp調用實際上是一個不同的問題(trace-function,內置elp分析庫,debug-on-entry和兩個調試器一般都是非常有用的工具),但在這種情況下,單擊一個菜單項只需交互式地調用它的功能,所以沒有什麼可以追蹤:)

+0

真棒,謝謝。 – Onlyjob 2013-04-09 01:43:05