Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defadvice narrow-to-region (around clone-when-narrowing-already-visible-buffer activate)
- "Clone an indirect buffer when attempting to narrow the
- contents of buffer visible in more than one window."
- (save-excursion
- (when (> (length (get-buffer-window-list (current-buffer) nil nil)) 1)
- (let ((cloned-buffer (clone-indirect-buffer nil t) ))
- (switch-to-buffer cloned-buffer t)))
- ad-do-it))
Add Comment
Please, Sign In to add comment