fixed warnings

This commit is contained in:
Peter Tillemans 2024-08-04 01:37:17 +02:00
parent 48625aaa32
commit 734fb54387

View file

@ -44,7 +44,9 @@ importantly make the file read-only to avoid editing the tangled file by
accident instead of the source in the org-mode file. accident instead of the source in the org-mode file.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
;;; -*- lexical-binding: t; read-only-mode: t; -*- ;; init.el --- Literate configuration for Emacs -*- lexical-binding: t; read-only-mode: t; -*-
;;
;;; Commentary:
;; ;;
;; DO NOT EDIT!!! ;; DO NOT EDIT!!!
;; ;;
@ -63,16 +65,19 @@ Also immediately set lexical binding mode.
** Report time spent loading the configuration ** Report time spent loading the configuration
#+begin_src emacs-lisp #+begin_src emacs-lisp
(defconst emacs-start-time (current-time)) (defconst emacs-start-time (current-time))
(defun report-time-since-load (&optional suffix) (defun report-time-since-load (&optional suffix)
(message "Loading init... (%.3fs) %s" "Report the time since the file was init script was started.
(float-time (time-subtract (current-time) emacs-start-time))
suffix))
(add-hook 'after-init-hook If SUFFIX is provided, it is appended to the message."
#'(lambda () (report-time-since-load " [after-init]")) (message "Loading init... (%.3fs) %s"
t) (float-time (time-subtract (current-time) emacs-start-time))
suffix))
(add-hook 'after-init-hook
#'(lambda () (report-time-since-load " [after-init]"))
t)
#+end_src #+end_src
When looking for where the time goes, the `report-time-since-load` When looking for where the time goes, the `report-time-since-load`
@ -266,6 +271,18 @@ I find it a bit a confusing module.
It provides a minor-mode It provides a minor-mode
** Add a fully featured terminal emulator
#+BEGIN_SRC emacs-lisp
(use-package eat
:ensure t
:defer 5)
#+END_SRC
#+RESULTS:
: [nil 26285 20099 685413 nil elpaca-process-queues nil nil 626000 nil]
* Editor Features * Editor Features
** Evil Vim Keybindings ** Evil Vim Keybindings
@ -367,7 +384,11 @@ muscle memory.
fonts)) fonts))
(defun pti-configure-fonts (&optional frame) (defun pti-configure-fonts (&optional frame)
"Set configuration of fonts based on display size." "Set configuration of fonts based on display size.
The FRAME argument makes it possible to set the fonts for new frames by
adding this function to `after-make-frame-functions' which must have
this argument."
(defvar pti-font-size (defvar pti-font-size
(if (> (display-pixel-height) 1600) 22 14)) (if (> (display-pixel-height) 1600) 22 14))
@ -422,8 +443,8 @@ screen.
;; also support client frames ;; also support client frames
;; ;;
(defun pti-display-tweaks (&optional frame) (defun pti-display-tweaks (&optional frame)
"Configure a newly created frame." "Configure a newly created FRAME."
(interactive)
(unless frame (unless frame
(setq frame (selected-frame))) (setq frame (selected-frame)))
(when (display-graphic-p) (when (display-graphic-p)
@ -439,6 +460,9 @@ screen.
(pti-display-tweaks) (pti-display-tweaks)
#+END_SRC #+END_SRC
#+RESULTS:
*** Set Theme *** Set Theme
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
;; Set theme ;; Set theme
@ -1764,5 +1788,12 @@ enough value but I just removed it, so it'll have to wait a bit.
** TODO Add support for zola blogposts writing in org-mode ** TODO Add support for zola blogposts writing in org-mode
see [[https://github.com/gicrisf/ox-zola][ox-zola]] for exporting org-mode to zola markdown. see [[https://github.com/gicrisf/ox-zola][ox-zola]] for exporting org-mode to zola markdown.
* Final Words
This is the end of the configuration file.
Add a variable so the file is tangling itself each time it is saved.
# Local Variables:
# eval: (add-hook 'after-save-hook #'org-babel-tangle t t)
# End: