Similar functionality is now part of emacs since version 22.1.
+++ /dev/null
-;; buffer-cycle.el
-(defun filter (pred lst)
- (delq nil
- (mapcar (lambda (x)
- (and (funcall pred x) x)) lst)))
-
-(defun filter-regexp (pattern lst)
- (filter (lambda (str)
- (string-match pattern str)) lst))
-
-(defun cycle-buffer (&optional n)
- (let ((buffers (filter (lambda (buffer)
- (not (string-match "\*" (buffer-name buffer))))
- (buffer-list (selected-frame)))))
- (switch-to-buffer
- (if (< n 0)
- (nth (+ (length buffers) n)
- buffers)
- (bury-buffer)
- (nth n buffers)))))
-
-(defun cycle-buffer-next ()
- (interactive)
- (cycle-buffer -1))
-
-(defun cycle-buffer-prev ()
- (interactive)
- (cycle-buffer 1))
(interactive)
(compile (concat "checkpatch.pl --no-tree --emacs --strict --file " (buffer-file-name))))
-;; buffer-cycle.el
;; F1: Switch to previous buffers
-(autoload 'cycle-buffer-prev "buffer-cycle" t)
-(global-set-key [f1] 'cycle-buffer-prev)
+(global-set-key [f1] 'previous-buffer)
;; F2: Switch to next buffers
-(autoload 'cycle-buffer-next "buffer-cycle" t)
-(global-set-key [f2] 'cycle-buffer-next)
+(global-set-key [f2] 'next-buffer)
;; F4: make clean
(global-set-key [f4] 'compile-make-clean)
install -v -m644 ${SCRDIR}/misc/emacs/emacsrc /root/.emacs
install -v -m755 -d ${EMACS_LOCAL_SITE_LISP}
- install -v -m644 ${SCRDIR}/misc/emacs/buffer-cycle.el \
- ${EMACS_LOCAL_SITE_LISP}
install -v -m644 ${SCRDIR}/misc/emacs/php-mode.el \
${EMACS_LOCAL_SITE_LISP}