From e1f897fcefe36779966a78a50d8b316d371e7b07 Mon Sep 17 00:00:00 2001 From: Andreas Gerler Date: Sat, 20 Feb 2016 12:59:58 +0100 Subject: [PATCH] update centered-cursor-mode. --- .../centered-cursor-mode-pkg.el | 1 - .../centered-cursor-mode-autoloads.el | 13 +++------- .../centered-cursor-mode-pkg.el | 1 + .../centered-cursor-mode.el | 24 ++++++++++++------- 4 files changed, 19 insertions(+), 20 deletions(-) delete mode 100644 elpa/centered-cursor-mode-20150420.1942/centered-cursor-mode-pkg.el rename elpa/{centered-cursor-mode-20150420.1942 => centered-cursor-mode-20151001.634}/centered-cursor-mode-autoloads.el (62%) create mode 100644 elpa/centered-cursor-mode-20151001.634/centered-cursor-mode-pkg.el rename elpa/{centered-cursor-mode-20150420.1942 => centered-cursor-mode-20151001.634}/centered-cursor-mode.el (95%) diff --git a/elpa/centered-cursor-mode-20150420.1942/centered-cursor-mode-pkg.el b/elpa/centered-cursor-mode-20150420.1942/centered-cursor-mode-pkg.el deleted file mode 100644 index 03599a58..00000000 --- a/elpa/centered-cursor-mode-20150420.1942/centered-cursor-mode-pkg.el +++ /dev/null @@ -1 +0,0 @@ -(define-package "centered-cursor-mode" "20150420.1942" "cursor stays vertically centered" (quote nil)) diff --git a/elpa/centered-cursor-mode-20150420.1942/centered-cursor-mode-autoloads.el b/elpa/centered-cursor-mode-20151001.634/centered-cursor-mode-autoloads.el similarity index 62% rename from elpa/centered-cursor-mode-20150420.1942/centered-cursor-mode-autoloads.el rename to elpa/centered-cursor-mode-20151001.634/centered-cursor-mode-autoloads.el index ddd13a6d..4d14f051 100644 --- a/elpa/centered-cursor-mode-20150420.1942/centered-cursor-mode-autoloads.el +++ b/elpa/centered-cursor-mode-20151001.634/centered-cursor-mode-autoloads.el @@ -1,10 +1,10 @@ ;;; centered-cursor-mode-autoloads.el --- automatically extracted autoloads ;; ;;; Code: - +(add-to-list 'load-path (or (file-name-directory #$) (car load-path))) -;;;### (autoloads (centered-cursor-mode) "centered-cursor-mode" "centered-cursor-mode.el" -;;;;;; (21823 20143 0 0)) +;;;### (autoloads nil "centered-cursor-mode" "centered-cursor-mode.el" +;;;;;; (22215 9186 0 0)) ;;; Generated autoloads from centered-cursor-mode.el (autoload 'centered-cursor-mode "centered-cursor-mode" "\ @@ -15,16 +15,9 @@ position (usually centered). ;;;*** -;;;### (autoloads nil nil ("centered-cursor-mode-pkg.el") (21823 -;;;;;; 20143 376262 0)) - -;;;*** - -(provide 'centered-cursor-mode-autoloads) ;; Local Variables: ;; version-control: never ;; no-byte-compile: t ;; no-update-autoloads: t -;; coding: utf-8 ;; End: ;;; centered-cursor-mode-autoloads.el ends here diff --git a/elpa/centered-cursor-mode-20151001.634/centered-cursor-mode-pkg.el b/elpa/centered-cursor-mode-20151001.634/centered-cursor-mode-pkg.el new file mode 100644 index 00000000..b899942b --- /dev/null +++ b/elpa/centered-cursor-mode-20151001.634/centered-cursor-mode-pkg.el @@ -0,0 +1 @@ +(define-package "centered-cursor-mode" "20151001.634" "cursor stays vertically centered" 'nil :url "http://www.emacswiki.org/cgi-bin/wiki/centered-cursor-mode.el" :keywords '("convenience")) diff --git a/elpa/centered-cursor-mode-20150420.1942/centered-cursor-mode.el b/elpa/centered-cursor-mode-20151001.634/centered-cursor-mode.el similarity index 95% rename from elpa/centered-cursor-mode-20150420.1942/centered-cursor-mode.el rename to elpa/centered-cursor-mode-20151001.634/centered-cursor-mode.el index 0174c029..1e2f6155 100644 --- a/elpa/centered-cursor-mode-20150420.1942/centered-cursor-mode.el +++ b/elpa/centered-cursor-mode-20151001.634/centered-cursor-mode.el @@ -6,12 +6,13 @@ ;; Maintainer: André Riemann ;; Created: 2007-09-14 ;; Keywords: convenience -;; Package-Version: 20150420.1942 +;; Package-Version: 20151001.634 +;; Package-X-Original-Version: 20150302.831 -;; URL: http://www.emacswiki.org/emacs/centered-cursor-mode.el +;; URL: http://www.emacswiki.org/cgi-bin/wiki/centered-cursor-mode.el ;; Compatibility: tested with GNU Emacs 23.0, 24 ;; Version: 0.5.4 -;; Last-Updated: 2015-04-20 +;; Last-Updated: 2015-10-01 ;; This file is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -57,8 +58,9 @@ ;; - more bugs? ;;; Change Log: -;; 2015-04-20 andre-r -;; * corrected URL in header +;; 2015-10-01 Hinrik Örn Sigurðsson +;; * Avoided calling count-lines when unnecessary, which +;; fixes slow scrolling in large files ;; 2015-03-01 andre-r ;; * fixed bug where Emacs without X support (emacs-nox) didn't find mouse-wheel-mode ;; 2009-08-31 andre-r @@ -336,9 +338,11 @@ the center. Just the variable ccm-vpos is set." (goto-char (point-max)) (zerop (current-column)))) 1 0))) + (window-is-at-bottom (= (window-end) (point-max))) ;; lines from point to end of buffer - (bottom-lines (+ (count-lines (point) (point-max)) - correction))) + (bottom-lines (if window-is-at-bottom + (+ (count-lines (point) (point-max)) + correction)))) ;; only animate if the point was moved rather far away ;; before by a mouseclick (see ccm-ignored-commands) @@ -347,7 +351,8 @@ the center. Just the variable ccm-vpos is set." (or (member last-command ccm-ignored-commands) animate-first-start-p))) - (recenter (if (and (< bottom-lines bottom-vpos) + (recenter (if (and window-is-at-bottom + (< bottom-lines bottom-vpos) (not recenter-at-end-of-file)) ;; if near the bottom, recenter in the ;; negative screen line that equals the @@ -366,7 +371,8 @@ the center. Just the variable ccm-vpos is set." ;; bigger than one, TO might not included, that means the ;; ccm-vpos would not be reached ;; cdr: don't recenter the current-line - (if (and (< bottom-lines bottom-vpos) + (if (and window-is-at-bottom + (< bottom-lines bottom-vpos) (not recenter-at-end-of-file)) ;; this one is for animation near the bottom (cdr (reverse (number-sequence -- 2.47.3