Last active
June 28, 2019 05:35
-
-
Save lawlist/f470725099dc5f9c82cb0f3ad4b74d9e to your computer and use it in GitHub Desktop.
Take control of pop-to-buffer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'cl) | |
(defun my-pop-to-buffer (buffer &optional action norecord) | |
(message "buffer: %s | action: %s | norecord: %s" buffer action norecord)) | |
(defun test-fn () | |
"Doc-string." | |
(interactive) | |
(cl-letf (((symbol-function 'pop-to-buffer) #'my-pop-to-buffer)) | |
(pop-to-buffer (current-buffer)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment