diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-11-07 22:00:04 +0100 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-11-07 22:00:04 +0100 |
commit | e0e2c309ab663c40fad4ce4ef7a695530ba86fdd (patch) | |
tree | 0cdb876319ac37e3febf286d96ba811aabd54f45 /.config/emacs/templates | |
parent | 726d8d330337dc2d6412a5e0a5093438706b4fb7 (diff) |
emacs: Prefer when-let to if-let
Diffstat (limited to '.config/emacs/templates')
-rw-r--r-- | .config/emacs/templates | 8 |
1 files changed, 4 insertions, 4 deletions
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 |