Skip to content

Commit

Permalink
xemacs -> emacs; настройки емакса
Browse files Browse the repository at this point in the history
  • Loading branch information
shvorin committed Feb 13, 2012
1 parent bc9fc23 commit 67db951
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .emacs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -23,3 +24,4 @@
)

(load-file "~/.emacs.d/init.el")
(put 'upcase-region 'disabled nil)
44 changes: 44 additions & 0 deletions .emacs.d/prev-next-buffer.el
Original file line number Diff line number Diff line change
@@ -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 [email protected] 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

0 comments on commit 67db951

Please sign in to comment.