diff -r ebf88f988c37 -r 4e131c57a0ef .emacs-my --- a/.emacs-my Sun Mar 14 20:28:36 2010 +0200 +++ b/.emacs-my Sun Mar 14 20:47:14 2010 +0200 @@ -152,18 +152,17 @@ ;; ---------------------------------------------------------------------- ;; scrolling. +(defvar my-scroll-margin 4) + (setq-default - ;; When scroll-step is 1 and if first displayed line overlapped and you go up one line or fisrt - ;; non-displayed line at bottom overlapped and you go down one line moving cause displaing engine - ;; redisplay windows content and center point as done by 'C-l'. So take it greater. - scroll-step 3 - scroll-conservatively 100 + scroll-step 1 + scroll-conservatively my-scroll-margin scroll-preserve-screen-position t ) ;; Set margin only for desired modes! Do not frustrate calendar any more. (make-variable-buffer-local 'scroll-margin) -(mapc (lambda (hook) (add-hook hook (lambda nil (setq scroll-margin 4)))) +(mapc (lambda (hook) (add-hook hook (lambda nil (setq scroll-margin my-scroll-margin)))) (delete-dups (append my-text-mode-hook-list my-devel-mode-hook-list '(recentf-mode-hook))) )