From: Hugo Villeneuve Date: Thu, 25 Sep 2014 15:59:41 +0000 (-0400) Subject: Remove obsolete emacs package buffer-cycle X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=516f122ab39b7d7a83b26d4c834012bc9d17a000;p=hvlinux.git Remove obsolete emacs package buffer-cycle Similar functionality is now part of emacs since version 22.1. --- 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}