我試圖將c-u m-x indent-pp-sexp
映射到單個按鍵,如F5,,以便使用Emacs不會侵蝕我的指紋。emacs將幾個按鍵和命令映射到一個按鍵
我用(global-set-key (kbd "C-u M-x indent-pp-sexp") "<f5>")
但我發現了以下錯誤:
global-set-key: Key sequence C-u M-x i n d e n t - p p - s e x p starts with non-prefix key C-u
編輯
有了這個lambda函數(global-set-key (kbd "<f5>") (lambda (interactive) (universal-argument) (indent-pp-sexp t)))
四處錯誤:
recursive-edit: Wrong type argument: commandp, (lambda (interactive) (universal-argument) (indent-pp-sexp t))
奇怪,因爲univeral-argument
沒有參數,並indent-pp-sexp
需要布爾