From e0e2c309ab663c40fad4ce4ef7a695530ba86fdd Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Thu, 7 Nov 2024 22:00:04 +0100 Subject: emacs: Prefer when-let to if-let --- .config/emacs/templates | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to '.config') diff --git a/.config/emacs/templates b/.config/emacs/templates index 5d14264..6749183 100644 --- a/.config/emacs/templates +++ b/.config/emacs/templates @@ -4,12 +4,12 @@ c-mode c-ts-mode c++-mode c++-ts-mode (guard "#ifndef " - (p + (p (thread-last (file-name-base (or (buffer-file-name) (buffer-name))) - (concat (if-let ((project (project-current))) - (concat (project-name project) "_"))) + (concat (when-let ((project (project-current))) + (concat (project-name project) "_"))) (upcase) (string-replace "-" "_") (replace-regexp-in-string "^[0-9]+" "_\\&") @@ -27,4 +27,4 @@ emacs-lisp-mode (buffer-name))) " --- " p " -*- lexical-binding: t; -*-" n n q) -(section "\f" n ";;; " p n n q) +(section "\f" n ";;; " p n n q) \ No newline at end of file -- cgit v1.2.3