Skip to content

Instantly share code, notes, and snippets.

@offby1
Last active August 29, 2015 14:22
Show Gist options
  • Select an option

  • Save offby1/77b1ba7b6ed30497501d to your computer and use it in GitHub Desktop.

Select an option

Save offby1/77b1ba7b6ed30497501d to your computer and use it in GitHub Desktop.
(progn
(local-unset-key (kbd "M-/"))
(global-set-key (kbd "M-/") 'dabbrev-expand)
(describe-key-briefly (kbd "M-/")))
M-/ runs the command hippie-expand"M-/ runs the command hippie-expand"
(pp-to-string
(let (wot)
(map-keymap (lambda (a b) (add-to-list 'wot (cons a b))) global-map)
wot))
"(
(switch-frame . handle-switch-frame)
(select-window . handle-select-window)
(delete-frame . handle-delete-frame)
...
(remap keymap
(find-file-other-window)
(find-file)
(dabbrev-expand . hippie-expand))
)
"
(setf (cdr (assoc 'remap global-map)) '(keymap (find-file-other-window) (find-file)))
(keymap (find-file-other-window) (find-file))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment