Files
.emacs.d/modules/navigation/siren-scroll-half-screen.el
Jim Myhrberg 87a86191db Majorly re-organize modules
- Split large modules into smaller parts (e.g. siren-text-manipulation)
- Organize modules into high level groups:
  - completion
  - core
  - editor
  - languages
  - linting
  - misc
  - navigation
  - projects
  - spelling
  - text-editing
  - version-control
  - windows
  - workspaces
2018-05-20 17:31:11 +01:00

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