From 9f69b1c0c269527f6bc08a729cdf4a8a261f0302 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sat, 15 Nov 2025 03:59:28 -0600 Subject: feat(scratch): Set scratch buffer font to 16pt and fix missing variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add missing scratch-greet variable definition - Set scratch buffer font height to 16pt for better readability - Fix buffer targeting using with-current-buffer for reliability - Simplify scratch greeting message 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- modules/system-utils.el | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'modules/system-utils.el') diff --git a/modules/system-utils.el b/modules/system-utils.el index e9686777..d20dd349 100644 --- a/modules/system-utils.el +++ b/modules/system-utils.el @@ -186,21 +186,21 @@ Logs output and exit code to buffer *external-open.log*." ;;; -------------------------- Scratch Buffer Happiness ------------------------- (defvar scratch-emacs-version-and-system - (concat "# Emacs " emacs-version - " on " system-configuration ".\n")) -(defvar scratch-greet - (concat "# Emacs ♥ you, " user-login-name ". Happy Hacking!\n\n")) + (concat "# Emacs " emacs-version " ♥ you, " user-login-name ". Happy Hacking!\n")) +(defvar scratch-greet "\n") (setopt initial-scratch-message (concat scratch-emacs-version-and-system scratch-greet)) ;; Set scratch buffer to org-mode (setopt initial-major-mode 'org-mode) -;; Move cursor to end of scratch buffer on startup +;; Move cursor to end of scratch buffer on startup and set font size to 16pt (add-hook 'emacs-startup-hook (lambda () - (when (string= (buffer-name) "*scratch*") - (goto-char (point-max))))) + (when (get-buffer "*scratch*") + (with-current-buffer "*scratch*" + (buffer-face-set :height 160) ; 160 = 16pt (height is in 1/10pt units) + (goto-char (point-max)))))) ;;; --------------------------------- Dictionary -------------------------------- -- cgit v1.2.3