diff --git a/.emacs b/.emacs index fc09b31..c61325a 100644 --- a/.emacs +++ b/.emacs @@ -10,6 +10,7 @@ '(display-time-mode t) '(european-calendar-style t) '(fill-column 80) + '(indent-tabs-mode nil) '(mouse-yank-at-point t) '(split-width-threshold nil) '(tab-width 4) @@ -23,3 +24,4 @@ ) (load-file "~/.emacs.d/init.el") +(put 'upcase-region 'disabled nil) diff --git a/.emacs.d/prev-next-buffer.el b/.emacs.d/prev-next-buffer.el new file mode 100644 index 0000000..8d4acd1 --- /dev/null +++ b/.emacs.d/prev-next-buffer.el @@ -0,0 +1,44 @@ +;;; prev-next-buffer.el - Surrogates of `next-buffer' and `previous-buffer' + +;; prev-next-buffer.el - Provides lightweight surrogates of Emacs 22's +;; functions `next-buffer' and `previous-buffer' to other Emacsen +;; Harmless if said functions are already defined, so inserting +;; +; (require 'prev-next-buffer) +;; +;; in your .emacs shouldn't cause any incompatibility. +;; +;; Stewarded by dominique@quatravaux.org for Emacs Wiki; copyright might be traceable +;; to some guy in Ecole Normale Superieure (http://www.eleves.ens.fr/) circa 1990 (!). + +(if (not (fboundp 'switch-to-other-buffer)) +;; Code stolen Xemacs' files.el +(defun switch-to-other-buffer (arg) + "Switch to the previous buffer. With a numeric arg, n, switch to the nth +most recent buffer. With an arg of 0, buries the current buffer at the +bottom of the buffer stack." + (interactive "p") + (if (eq arg 0) + (bury-buffer (current-buffer))) + (switch-to-buffer + (if (<= arg 1) (other-buffer (current-buffer)) + (nth (1+ arg) (buffer-list))))) +) + +(if (not (fboundp 'next-buffer)) + (defun next-buffer () + "Switch to the next buffer in cyclic order." + (interactive) + (switch-to-other-buffer 0))) + +(if (not (fboundp 'previous-buffer)) + (defun previous-buffer () + "Switch to the previous buffer in cyclic order." + (interactive) + (while (string-match "\\` " + (buffer-name (switch-to-other-buffer + (- (length (buffer-list)) 2))))))) + +(provide 'prev-next-buffer) + +;;; prev-next-buffer.el ends here