Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; ----------------------------------------------------------------------
- ; reload-buffer
- ; Seriously, why doesn't this already exist? Reloads the current
- ; buffer. find-alternate-file will sort of already do this; if you do
- ; not supply an argument to it it will reload the current
- ; buffer... but it will switch you to another buffer when it does
- ; it. All this function does is find-alt and then switch you back.
- (defun reload-buffer()
- (interactive)
- (let ((buffername (buffer-name)))
- (find-alternate-file buffername)
- (switch-to-buffer buffername)))
- ; override the binding for find-alternate-file to be reload-buffer,
- ; since that's what I always use it for.
- (global-set-key (kbd "\C-x C-v") 'reload-buffer)
Add Comment
Please, Sign In to add comment