From 41d12e5f3cd7420b8abea6c4a8ee29465f181c10 Mon Sep 17 00:00:00 2001 From: Kiana Sheibani Date: Wed, 4 Feb 2026 16:37:30 -0500 Subject: [PATCH] fix(el-patch): properly load patched functions --- config.org | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config.org b/config.org index 8d77993..45cddce 100644 --- a/config.org +++ b/config.org @@ -2195,8 +2195,8 @@ When editing a snippet, the binding =C-c C-t= can be used to test it in a fresh Doom's command to create a new snippet, ~+snippets/new~, defines a template inside of itself purely for when creating a snippet through this command. This doesn't make much sense to me when file templates already exist as a standard system in Doom, and snippets are stored inside files! #+begin_src emacs-lisp -;; HACK: Force snippet function to load -(autoload-do-load #'+snippets/new) +;; Ensure function is loaded +(autoload-do-load (symbol-function #'+snippets/new)) (defpatch! nil (defun +snippets/new) (&optional all-modes) @@ -2238,8 +2238,8 @@ Doom's =file-templates= module extends =yasnippet= to provide a nice file templa This system works well for the most part, but there's a serious issue with its UI: the function that registers file templates, ~set-file-templates!~, takes a plist to configure the template. If this list is empty, an existing template is removed instead. This is not only unintuitive, but it prevents you from having an empty property list, which is often necessary! We'll patch the function to resolve this issue with a =:remove= key, as well as to have templates appended to the alist instead of prepended to make the order of templates more clear. #+begin_src emacs-lisp -;; HACK: Force templates function to load -(autoload-do-load #'set-file-template!) +;; Ensure function loads during validation +(autoload-do-load (symbol-function #'set-file-template!)) (defpatch! nil (defun +file-templates--set) (pred plist)