Created
April 23, 2013 18:06
-
-
Save ionrock/5445934 to your computer and use it in GitHub Desktop.
Select some code and open that code in another frame for reference.
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
(defun narrow-to-region-indirect (start end) | |
"Restrict editing in this buffer to the current region, indirectly." | |
(interactive "r") | |
(let ((buf (clone-indirect-buffer nil nil))) | |
(with-current-buffer buf | |
(narrow-to-region start end)) | |
(select-frame (make-frame)) | |
(switch-to-buffer buf))) | |
(global-set-key (kbd "C-c \"") 'narrow-to-region-indirect) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment