Skip to content

Commit

Permalink
Use POP-TO-BUFFER instead of SWITCH-TO-BUFFER.
Browse files Browse the repository at this point in the history
This allows customization through DISPLAY-BUFFER.
  • Loading branch information
michaelw committed Jan 12, 2013
1 parent 9578100 commit 3b39c82
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion buftoggle.el
Expand Up @@ -63,7 +63,8 @@ and `buftoggle-search-path-alist' for paths where related files are searched."
(or
(loop for ext in pair-exts
for match = (concat buffer-name "." ext)
when (bufferp (get-buffer match)) return (switch-to-buffer match))
when (bufferp (get-buffer match))
return (pop-to-buffer match))

(let ((match (buftoggle-find-pair basename pair-exts)))
(when match (find-file match)))
Expand Down

0 comments on commit 3b39c82

Please sign in to comment.