From 004f3093993a9d5dca1ce8ced53b592dddec46ba Mon Sep 17 00:00:00 2001 From: Daniel Weschke Date: Fri, 27 Jun 2025 16:30:36 +0200 Subject: [PATCH] change scroll setting --- lisp/update-autoloads.el | 5 +++++ settings/general-settings.el | 9 +++++---- settings/pre-settings.el | 13 +++++++------ 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/lisp/update-autoloads.el b/lisp/update-autoloads.el index 592288f3..fbcab153 100644 --- a/lisp/update-autoloads.el +++ b/lisp/update-autoloads.el @@ -50,3 +50,8 @@ (package-generate-autoloads "org-contrib" (concat config-dir "lisp/org-contrib")) (package-generate-autoloads "swiper" (concat config-dir "lisp/swiper")) ) + +(defun my-byte-compile () + "recursive byte-compiling" + (interactive) + (byte-recompile-directory (concat user-emacs-directory "lisp") 0)) diff --git a/settings/general-settings.el b/settings/general-settings.el index e02fe865..fcf25911 100644 --- a/settings/general-settings.el +++ b/settings/general-settings.el @@ -571,10 +571,11 @@ Version 2016-07-13" (global-set-key (kbd "") (lambda () (interactive) (previous-buffer))) (global-set-key (kbd "") (lambda () (interactive) (next-buffer))) ;;; Scrolling -;;(setq mouse-wheel-scroll-amount '(1)) ; Distance in pixel-resolution to scroll each mouse wheel event. -(setq mouse-wheel-progressive-speed nil) ; Progressive speed is too fast for me. -(setq mouse-wheel-tilt-scroll t) ; Turn on horizontal scrolling with mouse wheel -(setq mouse-wheel-flip-direction t) ; Swap direction of `wheel-right' and `wheel-left' +;; (setq mouse-wheel-scroll-amount '(1)) ; Distance in pixel-resolution to scroll each mouse wheel event. +(setq mouse-wheel-progressive-speed nil) ; Progressive speed is too fast for me. +(setq mouse-wheel-tilt-scroll t) ; Turn on horizontal scrolling with mouse wheel +(setq mouse-wheel-flip-direction t) ; Swap direction of `wheel-right' and `wheel-left' +(setq scroll-conservatively 101) ; 101 minimizes screen movement and maintains point visibility with minimal adjustment ;; for scroll-all-mode add mouse wheel support ;; https://www.emacswiki.org/emacs/ScrollAllMode (defun my-mwheel-scroll-all-function (func &optional arg) diff --git a/settings/pre-settings.el b/settings/pre-settings.el index e21bd967..0ab5f377 100644 --- a/settings/pre-settings.el +++ b/settings/pre-settings.el @@ -2,12 +2,13 @@ ;;; Commentary: ;;; Code: ;; count startup time -(add-hook 'emacs-startup-hook ;; Use a hook so the message doesn't get clobbered by other messages. - (lambda () - (message - "Emacs ready in %s with %d garbage collections." - (format "%.2f seconds" (float-time (time-subtract after-init-time before-init-time))) - gcs-done))) +(defun display-startup-time () + "Display the startup time and number of garbage collections." + (message "Emacs init loaded in %.2f seconds (Full emacs-startup: %.2fs) with %d garbage collections." + (float-time (time-subtract after-init-time before-init-time)) + (time-to-seconds (time-since before-init-time)) + gcs-done)) +(add-hook 'emacs-startup-hook #'display-startup-time 100) ;; omit warnings like: /opt/emacs-conf/lisp/org/oc-basic.el: Warning: ‘buffer-substring’ is an obsolete generalized variable. (setq byte-compile-warnings nil)