From 516f122ab39b7d7a83b26d4c834012bc9d17a000 Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Thu, 25 Sep 2014 11:59:41 -0400 Subject: [PATCH] Remove obsolete emacs package buffer-cycle Similar functionality is now part of emacs since version 22.1. --- stage5/misc/emacs/buffer-cycle.el | 28 ---------------------------- stage5/misc/emacs/emacsrc | 7 ++----- stage5/pkg/emacs | 2 -- 3 files changed, 2 insertions(+), 35 deletions(-) delete mode 100644 stage5/misc/emacs/buffer-cycle.el diff --git a/stage5/misc/emacs/buffer-cycle.el b/stage5/misc/emacs/buffer-cycle.el deleted file mode 100644 index 4add15f..0000000 --- a/stage5/misc/emacs/buffer-cycle.el +++ /dev/null @@ -1,28 +0,0 @@ -;; 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)) diff --git a/stage5/misc/emacs/emacsrc b/stage5/misc/emacs/emacsrc index 9d336b2..d9259f5 100644 --- a/stage5/misc/emacs/emacsrc +++ b/stage5/misc/emacs/emacsrc @@ -73,13 +73,10 @@ (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) diff --git a/stage5/pkg/emacs b/stage5/pkg/emacs index 0bab658..fd4e956 100644 --- a/stage5/pkg/emacs +++ b/stage5/pkg/emacs @@ -20,8 +20,6 @@ hvbuild_post() 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} -- 2.20.1