From 395a807aae955c47fe00fab79120ec3f20da1e4e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 16 Sep 2025 19:44:39 -0400 Subject: [PATCH] refactor(lib): move fringe/fontset autodefs to doom-compat --- lisp/doom-compat.el | 9 +++++++++ lisp/doom-ui.el | 8 -------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/lisp/doom-compat.el b/lisp/doom-compat.el index 45279a035..1e8f847c0 100644 --- a/lisp/doom-compat.el +++ b/lisp/doom-compat.el @@ -7,6 +7,15 @@ ;; ;;; Code: +;; These two functions don't exist in terminal Emacs, but some Emacs packages +;; (internal and external) use it anyway, leading to void-function errors. I +;; define a no-op substitute to suppress them. +(unless (fboundp 'define-fringe-bitmap) + (fset 'define-fringe-bitmap #'ignore)) +(unless (fboundp 'set-fontset-font) + (fset 'set-fontset-font #'ignore)) + + ;;; From Emacs >= 28 ;; `format-spec' wasn't autoloaded until 28.1 (unless (fboundp 'format-spec) diff --git a/lisp/doom-ui.el b/lisp/doom-ui.el index d2138bbbd..a0d437342 100644 --- a/lisp/doom-ui.el +++ b/lisp/doom-ui.el @@ -768,14 +768,6 @@ triggering hooks during startup." (put sym 'disabled "Doom doesn't support `customize', configure Emacs from $DOOMDIR/config.el instead")) (put 'customize-themes 'disabled "Set `doom-theme' or use `load-theme' in $DOOMDIR/config.el instead") -;; These two functions don't exist in terminal Emacs, but some Emacs packages -;; (internal and external) use it anyway, leading to void-function errors. I -;; define a no-op substitute to suppress them. -(unless (fboundp 'define-fringe-bitmap) - (fset 'define-fringe-bitmap #'ignore)) -(unless (fboundp 'set-fontset-font) - (fset 'set-fontset-font #'ignore)) - (after! whitespace (defun doom--in-parent-frame-p () "`whitespace-mode' inundates child frames with whitespace markers, so