customize welcome message

This commit is contained in:
zedhugh committed 2022-10-29 16:17:05 +08:00
1 parent 84f0f1b3ae
commit f2fe92d06f
2 files changed
+20 -3

No files matched your search

+20
View File
@@ -14,3 +14,23 @@
(when (fboundp 'scroll-bar-mode)
(scroll-bar-mode -1))
(defun creature/welcom-message ()
(let (init-time startup-time)
(setq init-time (time-since before-init-time))
(setq startup-time
(time-subtract after-init-time before-init-time))
(setq initial-scratch-message
(format ";; startup: %fs -- init: %fs\n\
;; Happy hacking %s - Emacs loves you.\n\n"
(float-time startup-time)
(float-time init-time)
(or (user-login-name) "user"))))
(with-current-buffer "*scratch*"
(erase-buffer)
(insert initial-scratch-message)
(set-buffer-modified-p nil)))
(add-hook 'emacs-startup-hook #'creature/welcom-message 1999)
-3
View File
@@ -128,9 +128,6 @@ If freezing sometimes, decrease it. If stuttering, increase it.")
(when (file-exists-p custom-file)
(load custom-file 'noerror))
(add-hook 'emacs-startup-hook
(lambda ()
(message (emacs-init-time))))
(with-eval-after-load 'package
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")))