Guest User

Untitled

a guest
Nov 24th, 2021
27
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (defun my-switch-to-buffer ()
  2.   "If there is only one window displayed, swap it with previous buffer.
  3. If there are two windows displayed, act like \"C-x o\"."
  4.   (interactive)
  5.   (if (one-window-p t)
  6.       (switch-to-buffer (other-buffer (current-buffer) 1))
  7.     (other-window -1)))
  8.  
RAW Paste Data