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
Post a Comment