From: khamidou Date: Thu, 9 Apr 2009 16:47:25 +0000 (+0200) Subject: added a function cycle-through-buffers X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=784f9233abe6b92119026adc1a6af4cd2d14dbd9;p=config-files.git added a function cycle-through-buffers --- diff --git a/.emacs b/.emacs index 2a2d2a5..628b677 100755 --- a/.emacs +++ b/.emacs @@ -85,6 +85,11 @@ vi style of % jumping to matching brace." (interactive) (switch-to-buffer (other-buffer))) +; Bury the previous buffer to go the antepenultian buffer. +(defun cycle-through-buffers () + (interactive) + (bury-buffer (other-buffer)) + (previous-buf)) ; Courtesy of pgas. @@ -232,7 +237,8 @@ indent according to mode." (global-set-key [(tab)] 'smart-tab) (setq c-hungry-delete-key 't) (global-set-key (kbd "") 'previous-buf) -(global-set-key (kbd "") 'anything) +(global-set-key (kbd "") 'previous-buf) +(global-set-key (kbd "") 'anything) (global-set-key (kbd "") 'run-scheme) (global-set-key (kbd "") 'ielm) (add-hook 'python-mode-hook (lambda () (local-set-key (kbd "TAB") 'smart-tab)))