mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
22 lines
645 B
EmacsLisp
22 lines
645 B
EmacsLisp
;;; siren-scroll-half-screen.el --- jimeh's Emacs Siren: scroll-half-screen.
|
|
|
|
;;; Commentary:
|
|
|
|
;; Scroll up/down M-v/C-v half a screen instead of a full screen.
|
|
|
|
;;; Code:
|
|
|
|
;; Scroll half a screen when using scroll-up and scroll-down functions.
|
|
(defadvice scroll-up (around half-window activate)
|
|
(setq next-screen-context-lines
|
|
(max 1 (/ (1- (window-height (selected-window))) 2)))
|
|
ad-do-it)
|
|
|
|
(defadvice scroll-down (around half-window activate)
|
|
(setq next-screen-context-lines
|
|
(max 1 (/ (1- (window-height (selected-window))) 2)))
|
|
ad-do-it)
|
|
|
|
(provide 'siren-scroll-half-screen)
|
|
;;; siren-scroll-half-screen.el ends here
|