From 89dea803ea4293eb8d14b87067d1e3eebdcbd180 Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Fri, 20 Jul 2012 08:13:04 +0400 Subject: [PATCH] Drop idle buffer compaction due to an absence of the proved efficiency. * lisp/compact.el: Remove. --- lisp/ChangeLog | 6 ++++++ lisp/compact.el | 60 --------------------------------------------------------- 2 files changed, 6 insertions(+), 60 deletions(-) delete mode 100644 lisp/compact.el diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3216afa3e4c..f2b89c086dd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2012-07-20 Dmitry Antipov + + Drop idle buffer compaction due to an absence of the + proved efficiency. + * compact.el: Remove. + 2012-07-19 Sam Steingold * vc/vc-dispatcher.el (vc-compilation-mode): Add, based on diff --git a/lisp/compact.el b/lisp/compact.el deleted file mode 100644 index 0d9523147bc..00000000000 --- a/lisp/compact.el +++ /dev/null @@ -1,60 +0,0 @@ -;;; compact.el --- compact buffers when idle - -;; Copyright (C) 2012 Free Software Foundation, Inc. - -;; Maintainer: FSF -;; Package: emacs - -;; This file is part of GNU Emacs. - -;; GNU Emacs is free software: you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; GNU Emacs is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . - -;;; Commentary: - -;; This package provides the ability to compact buffers when Emacs is idle. -;; Initially written by Dmitry Antipov . - -;;; Code: - -(require 'timer) - -(defun compact-buffers () - "Run `compact-buffer' for each buffer except current buffer. -Schedule next compaction if `compact-buffers-when-idle' is greater than zero." - (mapc (lambda (buffer) - (and (not (eq buffer (current-buffer))) - (compact-buffer buffer))) - (buffer-list)) - (compact-buffers-idle)) - -(defun compact-buffers-idle () - "Compact buffers if `compact-buffers-when-idle' is greater than zero." - (and (floatp compact-buffers-when-idle) - (> compact-buffers-when-idle 0.0) - (run-with-idle-timer compact-buffers-when-idle nil 'compact-buffers))) - -(defcustom compact-buffers-when-idle 1.0 - "Compact all buffers when Emacs is idle more than this period of time. -Compaction is done by truncating `buffer-undo-list' and shrinking the gap. -Value less than or equal to zero disables idle compaction." - :type 'float - :group 'alloc - :set (lambda (symbol value) - (progn (set-default symbol value) - (compact-buffers-idle))) - :version "24.2") - -(provide 'compact) - -;;; compact.el ends here -- 2.11.4.GIT