Pages

Thursday, December 2, 2021

Emacs

 I used to know enough MLisp to make emacs do what I wanted (on good days).  I am trying to bind undo to ideally F9 or Ctrl-Z.  I added this to my .emacs file:

(global-unset-key "\C-z")

(global-set-key "\C-z" 'advertised-undo)

Any idea what I am doing wrong? 

2 comments:

  1. I'm no LISP expert but here are examples from my .emacs file for key binding:
    (global-set-key (kbd "") 'goto-line)
    (global-set-key (kbd "C-x C-r") 'ido-recentf-open)

    ReplyDelete
  2. This worked for me (should replace "advertised-undo" with "undo" in Emacs 23.2 or higher):

    (global-set-key (kbd "\C-z") 'advertised-undo)

    -j

    ReplyDelete