我试图将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
需要布尔