In Emacs, can we make one keystroke to do different command? -


i want make 1 keystroke, c-f12, delete-other-windows or winner-undo. think it's easy if learning emacs lisp programming, , set boolean flag. is, if run delete-other-window, it'll run winner-undo.

how do in emacs lisp?

thanks

try

(setq c-f12-winner-undo t)  (define-key (current-global-map) [c-f12]   (lambda()      (interactive)      (if c-f12-winner-undo          (winner-undo)       (delete-other-windows))     (setq c-f12-winner-undo (not c-f12-winner-undo)))) 

Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -