开发者

remap emacs key

I would like to remap a key in emacs, for example { and i would it to trigger usual event. Example, i remapped alt + ( to get { and i would like, when i use a plugin like autopair to give me the associated }. I tried this :

    (global-set-key [(alt \()] ( lambda () (interactive) (insert "{") ))

It inserts { correctly but does not trigger autopair hooks.

Is there a way开发者_开发技巧 to achieve it ?


Try (not tested):

(define-key key-translation-map (kbd "M-(") (kbd "{"))
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜