Skip to content

Instantly share code, notes, and snippets.

@cataska
Last active April 21, 2022 10:02
Show Gist options
  • Select an option

  • Save cataska/b1875754128853bfb139 to your computer and use it in GitHub Desktop.

Select an option

Save cataska/b1875754128853bfb139 to your computer and use it in GitHub Desktop.

Revisions

  1. cataska revised this gist Aug 31, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.el
    Original file line number Diff line number Diff line change
    @@ -2,5 +2,5 @@
    `(define-key (current-global-map) ,new
    (lookup-key (current-global-map) ,old)))

    ;; now "C-x -" is equals to "C-x 2"
    ;; now "C-x -" equals to "C-x 2"
    (defkbalias (kbd "C-x 2") (kbd "C-x -"))
  2. cataska created this gist Aug 29, 2014.
    6 changes: 6 additions & 0 deletions gistfile1.el
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    (defmacro defkbalias (old new)
    `(define-key (current-global-map) ,new
    (lookup-key (current-global-map) ,old)))

    ;; now "C-x -" is equals to "C-x 2"
    (defkbalias (kbd "C-x 2") (kbd "C-x -"))