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

WPF: binding viewmodel property of type DateTime to Calendar inside ItemsControl -

java - Getting corefrences with Standard corenlp package -

jQuery clickable div with working mailto link inside -