Files
.emacs.d/modules/navigation/siren-scroll-half-screen.el
Jim Myhrberg fe6a4e7ce5 fix(elisp): add lexical-binding comment to all files to suppress new Emacs 31 warnings
I've set `lexical-binding` to `nil` in all Emacs Lisp files to suppress
the warnings introduced in Emacs 31 requiring all elisp files to have a
`lexical-binding` comment.

This retains the default behavior of dynamic binding when no
`lexical-binding` comment is present. With it set to `t` across the
board, various things break, and fixing those is a task for another day.
2025-06-29 12:23:03 +01:00

22 lines
676 B
EmacsLisp

;;; siren-scroll-half-screen.el --- jimeh's Emacs Siren: scroll-half-screen. -*- lexical-binding: nil; -*-
;;; 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