overtone / emacs-live

M-x start-hacking
http://overtone.github.com/emacs-live/
Other
1.51k stars 241 forks source link

Correctly preserve original `basic-save-buffer`. #199

Closed rothmichaels closed 9 years ago

rothmichaels commented 9 years ago

monkey-patch.el was defining an alias live-mp-orig-basic-save-buffer which was bound to the symbol basic-save-buffer. After redefining basic-save-buffer with the call (defalias 'basic-save-buffer 'live-mp-new-basic-save-buffer), both basic-save-buffer and live-mp-orig-basic-save-buffer were both bound to the function live-mp-new-basic-save-buffer.

Instead, the backup alias should be bound to the function directly, not the symbol.

rothmichaels commented 9 years ago

Forgot to mention in my original pull request, but the reason this is needed is to be able to revert the functionality of basic-save-buffer.

samaaron commented 9 years ago

Good call, thanks :-)