Skip to content

Instantly share code, notes, and snippets.

@hidsh
Created August 16, 2018 00:46
Show Gist options
  • Save hidsh/6887b5fbaf12b2e4c4b0f15980cff8d4 to your computer and use it in GitHub Desktop.
Save hidsh/6887b5fbaf12b2e4c4b0f15980cff8d4 to your computer and use it in GitHub Desktop.
elisp: test of monkey-patching using `setf'
(defun ori ()
"original")
(defun modi ()
"modi")
(ori) ; => "original"
(modi) ; => "modi"
(setf (symbol-function 'ori) (symbol-function 'modi))
(ori) ; => "modi"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment