From dac6e05b87b5ab19a8660faafbd2718d99276b2e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 25 Mar 2025 00:31:41 -0400 Subject: [PATCH] refactor: deprecate appendq!, prependq!, & delq! macros In the interest of slimming down Doom's core (as we near v3), I've deprecated these macros. They doesn't really need to exist. Sure, the alternatives aren't as ergonomic or elegant, but they're good enough that we don't need these trivial wrappers. Their local uses have been refactored out as well. --- lisp/cli/doctor.el | 4 +- lisp/demos.org | 48 ---------------------- lisp/doom-editor.el | 34 +++++++-------- lisp/doom-keybinds.el | 15 +++---- lisp/doom-lib.el | 8 +++- lisp/doom-straight.el | 2 +- lisp/doom-ui.el | 8 ++-- lisp/doom.el | 11 ++--- lisp/lib/files.el | 35 ++++++++-------- lisp/lib/modules.el | 6 +-- lisp/lib/packages.el | 2 +- lisp/lib/store.el | 11 ++--- modules/checkers/spell/config.el | 2 +- modules/completion/company/config.el | 2 +- modules/completion/ivy/autoload/ivy.el | 2 +- modules/config/use-package/init.el | 2 +- modules/editor/evil/config.el | 2 +- modules/editor/snippets/config.el | 2 +- modules/emacs/dired/config.el | 2 +- modules/email/mu4e/config.el | 1 - modules/lang/latex/config.el | 5 +-- modules/lang/org/config.el | 2 +- modules/lang/solidity/config.el | 2 +- modules/lang/web/+html.el | 2 +- modules/tools/lookup/autoload/online.el | 2 +- modules/ui/ligatures/autoload/ligatures.el | 2 +- modules/ui/modeline/+light.el | 2 +- 27 files changed, 85 insertions(+), 131 deletions(-) diff --git a/lisp/cli/doctor.el b/lisp/cli/doctor.el index e802aeae8..c1ba10ecb 100644 --- a/lisp/cli/doctor.el +++ b/lisp/cli/doctor.el @@ -351,8 +351,8 @@ in." (print! "%s" (string-join (append doom-doctor--errors doom-doctor--warnings) "\n"))) (setq doom-local-errors doom-doctor--errors doom-local-warnings doom-doctor--warnings))) - (appendq! doom-doctor--errors doom-local-errors) - (appendq! doom-doctor--warnings doom-local-warnings)))))) + (cl-callf append doom-doctor--errors doom-local-errors) + (cl-callf append doom-doctor--warnings doom-local-warnings)))))) (error (warn! "Attempt to load DOOM failed\n %s\n" (or (cdr-safe ex) (car ex))) diff --git a/lisp/demos.org b/lisp/demos.org index dd10ae570..227540122 100644 --- a/lisp/demos.org +++ b/lisp/demos.org @@ -82,30 +82,6 @@ are great, but this file exists to add demos for Doom's API and beyond. (after! rustic ...) (after! python ...) #+end_src -* appendq! -:PROPERTIES: -:added: 3.0.0-pre -:END: -#+begin_src emacs-lisp -(let ((x '(a b c))) - (appendq! x '(c d e)) - x) -#+end_src - -#+RESULTS: -: (a b c c d e) - -#+begin_src emacs-lisp -(let ((x '(a b c)) - (y '(c d e)) - (z '(f g))) - (appendq! x y z '(h)) - x) -#+end_src - -#+RESULTS: -: (a b c c d e f g h) - * cmd! :PROPERTIES: :added: 3.0.0-pre @@ -573,30 +549,6 @@ These are side-by-side comparisons, showing how to bind keys with and without ;; refresh to delete packages used only on one system, use :ignore (package! evil :ignore (not (equal system-name "my-desktop"))) #+end_src -* prependq! -:PROPERTIES: -:added: 3.0.0-pre -:END: -#+begin_src emacs-lisp -(let ((x '(a b c))) - (prependq! x '(c d e)) - x) -#+end_src - -#+RESULTS: -: (c d e a b c) - -#+begin_src emacs-lisp -(let ((x '(a b c)) - (y '(c d e)) - (z '(f g))) - (prependq! x y z '(h)) - x) -#+end_src - -#+RESULTS: -: (c d e f g h a b c) - * pushnew! :PROPERTIES: :added: 3.0.0-pre diff --git a/lisp/doom-editor.el b/lisp/doom-editor.el index a57389964..f3ec6efe8 100644 --- a/lisp/doom-editor.el +++ b/lisp/doom-editor.el @@ -644,29 +644,29 @@ on." ;; read-only, in `so-long-minor-mode', so we can have a basic editing ;; experience in them, at least. It will remain off in `so-long-mode', ;; however, because long files have a far bigger impact on Emacs performance. - (delq! 'font-lock-mode so-long-minor-modes) - (delq! 'display-line-numbers-mode so-long-minor-modes) - (delq! 'buffer-read-only so-long-variable-overrides 'assq) + (cl-callf2 delq 'font-lock-mode so-long-minor-modes) + (cl-callf2 delq 'display-line-numbers-mode so-long-minor-modes) + (setf (alist-get 'buffer-read-only so-long-variable-overrides nil t) nil) ;; ...but at least reduce the level of syntax highlighting (add-to-list 'so-long-variable-overrides '(font-lock-maximum-decoration . 1)) ;; ...and insist that save-place not operate in large/long files (add-to-list 'so-long-variable-overrides '(save-place-alist . nil)) ;; But disable everything else that may be unnecessary/expensive for large or ;; wide buffers. - (appendq! so-long-minor-modes - '(spell-fu-mode - eldoc-mode - highlight-numbers-mode - better-jumper-local-mode - ws-butler-mode - auto-composition-mode - undo-tree-mode - highlight-indent-guides-mode - hl-fill-column-mode - ;; These are redundant on Emacs 29+ - flycheck-mode - smartparens-mode - smartparens-strict-mode))) + (cl-callf append so-long-minor-modes + '(spell-fu-mode + eldoc-mode + highlight-numbers-mode + better-jumper-local-mode + ws-butler-mode + auto-composition-mode + undo-tree-mode + highlight-indent-guides-mode + hl-fill-column-mode + ;; These are redundant on Emacs 29+ + flycheck-mode + smartparens-mode + smartparens-strict-mode))) (use-package! ws-butler diff --git a/lisp/doom-keybinds.el b/lisp/doom-keybinds.el index 9f2993958..1269bd54c 100644 --- a/lisp/doom-keybinds.el +++ b/lisp/doom-keybinds.el @@ -160,13 +160,14 @@ all hooks after it are ignored.") ,bdef) forms)) (when-let (desc (cadr (memq :which-key udef))) - (prependq! - wkforms `((which-key-add-key-based-replacements - (general--concat t doom-leader-alt-key ,key) - ,desc) - (which-key-add-key-based-replacements - (general--concat t doom-leader-key ,key) - ,desc)))))))) + (cl-callf2 append + `((which-key-add-key-based-replacements + (general--concat t doom-leader-alt-key ,key) + ,desc) + (which-key-add-key-based-replacements + (general--concat t doom-leader-key ,key) + ,desc)) + wkforms)))))) (macroexp-progn (append (and wkforms `((after! which-key ,@(nreverse wkforms)))) (nreverse forms))))) diff --git a/lisp/doom-lib.el b/lisp/doom-lib.el index a4f32e334..e41df6f5e 100644 --- a/lisp/doom-lib.el +++ b/lisp/doom-lib.el @@ -708,8 +708,10 @@ See `general-key-dispatch' for what other arguments it accepts in BRANCHES." ;;; Mutation +;; DEPRECATED: Remove in v3.0 (defmacro appendq! (sym &rest lists) "Append LISTS to SYM in place." + (declare (obsolete "Use `cl-callf2' instead" "3.0.0")) `(setq ,sym (append ,sym ,@lists))) (defmacro setq! (&rest settings) @@ -723,10 +725,12 @@ Unlike `setopt', this won't needlessly pull in dependencies." collect `(funcall (or (get ',var 'custom-set) #'set-default-toplevel-value) ',var ,val)))) +;; DEPRECATED: Remove in v3.0 (defmacro delq! (elt list &optional fetcher) "`delq' ELT from LIST in-place. If FETCHER is a function, ELT is used as the key in LIST (an alist)." + (declare (obsolete "Use `cl-callf2' or `alist-get' instead" "3.0.0")) `(setq ,list (delq ,(if fetcher `(funcall ,fetcher ,elt ,list) elt) @@ -739,8 +743,10 @@ This is a variadic `cl-pushnew'." `(dolist (,var (list ,@values) (with-no-warnings ,place)) (cl-pushnew ,var ,place :test #'equal)))) +;; DEPRECATED: Remove in v3.0 (defmacro prependq! (sym &rest lists) "Prepend LISTS to SYM in place." + (declare (obsolete "Use `cl-callf2' instead" "3.0.0")) `(setq ,sym (append ,@lists ,sym))) @@ -839,7 +845,7 @@ to reverse this and trigger `after!' blocks at a more reasonable time." (let ((advice-fn (intern (format "doom--defer-feature-%s-a" feature))) (fns (or fns (list feature)))) `(progn - (delq! ',feature features) + (cl-callf2 delq ',feature features) (defadvice! ,advice-fn (&rest _) :before ',fns ;; Some plugins (like yasnippet) will invoke a fn early to parse diff --git a/lisp/doom-straight.el b/lisp/doom-straight.el index 488b3004c..390c99175 100644 --- a/lisp/doom-straight.el +++ b/lisp/doom-straight.el @@ -184,7 +184,7 @@ original state.") (let ((doom-straight--auto-options doom-straight--auto-options)) ;; We can't intercept C-g, so no point displaying any options for this key ;; when C-c is the proper way to abort batch Emacs. - (delq! "C-g" actions 'assoc) + (cl-callf2 delq 'assoc actions) ;; HACK: Remove actions that don't work in noninteractive Emacs (like ;; opening dired or magit). (setq actions diff --git a/lisp/doom-ui.el b/lisp/doom-ui.el index 01585efef..7f8424347 100644 --- a/lisp/doom-ui.el +++ b/lisp/doom-ui.el @@ -410,10 +410,10 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original :preface (defvar winner-dont-bind-my-keys t) ; I'll bind keys myself :hook (doom-first-buffer . winner-mode) :config - (appendq! winner-boring-buffers - '("*Compile-Log*" "*inferior-lisp*" "*Fuzzy Completions*" - "*Apropos*" "*Help*" "*cvs*" "*Buffer List*" "*Ibuffer*" - "*esh command on file*"))) + (cl-callf append winner-boring-buffers + '("*Compile-Log*" "*inferior-lisp*" "*Fuzzy Completions*" + "*Apropos*" "*Help*" "*cvs*" "*Buffer List*" "*Ibuffer*" + "*esh command on file*"))) (use-package! paren diff --git a/lisp/doom.el b/lisp/doom.el index 39f0bb555..fdf9f6834 100644 --- a/lisp/doom.el +++ b/lisp/doom.el @@ -701,11 +701,12 @@ to `doom-profile-cache-dir' instead, so it can be safely cleaned up as part of (setq package-user-dir (file-name-concat doom-local-dir "elpa/") package-gnupghome-dir (expand-file-name "gpg" package-user-dir)) (let ((s (if gnutls-verify-error "s" ""))) - (prependq! package-archives - ;; I omit Marmalade because its packages are manually submitted - ;; rather than pulled, and so often out of date. - `(("melpa" . ,(format "http%s://melpa.org/packages/" s)) - ("org" . ,(format "http%s://orgmode.org/elpa/" s))))) + (cl-callf2 append + ;; I omit Marmalade because its packages are manually submitted rather + ;; than pulled, and so often out of date. + `(("melpa" . ,(format "http%s://melpa.org/packages/" s)) + ("org" . ,(format "http%s://orgmode.org/elpa/" s))) + package-archives)) ;; Refresh package.el the first time you call `package-install', so it's still ;; trivially usable. Remember to run 'doom sync' to purge them; they can diff --git a/lisp/lib/files.el b/lisp/lib/files.el index e544af836..82c864a00 100644 --- a/lisp/lib/files.el +++ b/lisp/lib/files.el @@ -113,24 +113,23 @@ MATCH is a string regexp. Only entries that match it will be included." (let (result) (dolist (file (mapcan (doom-rpartial #'doom-glob "*") (ensure-list paths))) (cond ((file-directory-p file) - (appendq! - result - (and (memq type '(t dirs)) - (string-match-p match file) - (not (and filter (funcall filter file))) - (not (and (file-symlink-p file) - (not follow-symlinks))) - (<= mindepth 0) - (list (if relative-to - (file-relative-name file relative-to) - file))) - (and (>= depth 1) - (apply #'doom-files-in file - (append (list :mindepth (1- mindepth) - :depth (1- depth) - :relative-to relative-to - :map nil) - rest))))) + (cl-callf append result + (and (memq type '(t dirs)) + (string-match-p match file) + (not (and filter (funcall filter file))) + (not (and (file-symlink-p file) + (not follow-symlinks))) + (<= mindepth 0) + (list (if relative-to + (file-relative-name file relative-to) + file))) + (and (>= depth 1) + (apply #'doom-files-in file + (append (list :mindepth (1- mindepth) + :depth (1- depth) + :relative-to relative-to + :map nil) + rest))))) ((and (memq type '(t files)) (string-match-p match file) (not (and filter (funcall filter file))) diff --git a/lisp/lib/modules.el b/lisp/lib/modules.el index c8f954b88..4e6885e0c 100644 --- a/lisp/lib/modules.el +++ b/lisp/lib/modules.el @@ -151,13 +151,13 @@ properties: (:cond (cl-loop for (cond . mods) in (cdr m) if (eval cond t) - return (prependq! mplist mods))) + return (cl-callf2 append mods mplist))) (:if (if (eval (cadr m) t) (push (caddr m) mplist) - (prependq! mplist (cdddr m)))) + (cl-callf2 append (cdddr m) mplist))) (test (if (xor (eval (cadr m) t) (eq test :unless)) - (prependq! mplist (cddr m)))))) + (cl-callf2 append (cddr m) mplist))))) ((catch 'doom-modules (let* ((module (if (listp m) (car m) m)) (flags (if (listp m) (cdr m)))) diff --git a/lisp/lib/packages.el b/lisp/lib/packages.el index 5009cf99e..22f9e7e22 100644 --- a/lisp/lib/packages.el +++ b/lisp/lib/packages.el @@ -199,7 +199,7 @@ processed." (cl-pushnew name doom-disabled-packages) (when recipe (straight-override-recipe (cons name recipe))) - (appendq! packages (cons name (straight--get-dependencies name))))))) + (cl-callf append packages (cons name (straight--get-dependencies name))))))) (dolist (package (cl-delete-duplicates packages :test #'equal)) (straight-register-package package) (let ((name (symbol-name package))) diff --git a/lisp/lib/store.el b/lisp/lib/store.el index b0a198914..d0833286c 100644 --- a/lisp/lib/store.el +++ b/lisp/lib/store.el @@ -45,8 +45,7 @@ name under `pcache-directory' (by default a subdirectory under "Persist VARIABLES (list of symbols) in LOCATION (symbol). This populates these variables with cached values, if one exists, and saves them to file when Emacs quits. This cannot persist buffer-local variables." - (cl-check-type location string) - (dolist (var variables) + (dolist (var (ensure-list variables)) (when (doom-store-member-p var location) (set var (doom-store-get var location)))) (setf (alist-get location doom-store-persist-alist) @@ -57,12 +56,10 @@ to file when Emacs quits. This cannot persist buffer-local variables." "Unregisters VARIABLES (list of symbols) in LOCATION (symbol). Variables to persist are recorded in `doom-store-persist-alist'. Does not affect the actual variables themselves or their values." - (cl-check-type location string) - (if variables - (setf (alist-get location doom-store-persist-alist) + (setf (alist-get location doom-store-persist-alist nil t) + (if variables (cl-set-difference (cdr (assq location doom-store-persist-alist)) - variables)) - (delq! location doom-store-persist-alist 'assoc))) + variables)))) (defun doom--store-init (&optional location) (cl-check-type location (or null string)) diff --git a/modules/checkers/spell/config.el b/modules/checkers/spell/config.el index 0516af538..9a168f371 100644 --- a/modules/checkers/spell/config.el +++ b/modules/checkers/spell/config.el @@ -5,7 +5,7 @@ ;; `elisp-mode' is loaded at startup. In order to lazy load its config we need ;; to pretend it isn't loaded -(delq! 'ispell features) +(cl-callf2 delq 'ispell features) (global-set-key [remap ispell-word] #'+spell/correct) diff --git a/modules/completion/company/config.el b/modules/completion/company/config.el index 3de13e69a..e116f4522 100644 --- a/modules/completion/company/config.el +++ b/modules/completion/company/config.el @@ -149,7 +149,7 @@ ;; Don't show documentation in echo area, because company-box displays its own ;; in a child frame. - (delq! 'company-echo-metadata-frontend company-frontends) + (cl-callf2 delq 'company-echo-metadata-frontend company-frontends) (defun +company-box-icons--elisp-fn (candidate) (when (derived-mode-p 'emacs-lisp-mode) diff --git a/modules/completion/ivy/autoload/ivy.el b/modules/completion/ivy/autoload/ivy.el index d7a873e44..a48fe9813 100644 --- a/modules/completion/ivy/autoload/ivy.el +++ b/modules/completion/ivy/autoload/ivy.el @@ -351,7 +351,7 @@ If ARG (universal argument), include all files, even hidden or compressed ones." :require-match t :action (lambda (cand) (let ((mark (cdr cand))) - (delq! (marker-buffer mark) buffers) + (cl-callf2 delq (marker-buffer mark) buffers) (mapc #'kill-buffer buffers) (setq buffers nil) (with-current-buffer (switch-to-buffer (marker-buffer mark)) diff --git a/modules/config/use-package/init.el b/modules/config/use-package/init.el index 61f1381a7..8bb0cd084 100644 --- a/modules/config/use-package/init.el +++ b/modules/config/use-package/init.el @@ -109,7 +109,7 @@ (dolist (hook (cdr deferral-list)) (advice-remove hook #',fn) (remove-hook hook #',fn)) - (delq! deferral-list doom--deferred-packages-alist) + (cl-callf2 delq deferral-list doom--deferred-packages-alist) (unintern ',fn nil))))) (let (forms) (dolist (hook hooks forms) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index 222aa19cf..638e3655c 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -182,7 +182,7 @@ directives. By default, this only recognizes C directives.") (advice-add #'evil-open-below :around #'+evil--insert-newline-below-and-respect-comments-a) ;; Lazy load evil ex commands - (delq! 'evil-ex features) + (cl-callf2 delq 'evil-ex features) (add-transient-hook! 'evil-ex (provide 'evil-ex)) (after! evil-ex (load! "+commands"))) diff --git a/modules/editor/snippets/config.el b/modules/editor/snippets/config.el index b2dd6df51..7690b8c02 100644 --- a/modules/editor/snippets/config.el +++ b/modules/editor/snippets/config.el @@ -45,7 +45,7 @@ (advice-add #'yas-snippet-dirs :filter-return #'delete-dups) ;; Remove GUI dropdown prompt (prefer ivy/helm) - (delq! 'yas-dropdown-prompt yas-prompt-functions) + (cl-callf2 delq 'yas-dropdown-prompt yas-prompt-functions) ;; Prioritize private snippets in `+snippets-dir' over built-in ones if there ;; are multiple choices. (add-to-list 'yas-prompt-functions #'+snippets-prompt-private) diff --git a/modules/emacs/dired/config.el b/modules/emacs/dired/config.el index 5b46ed15e..f11f40070 100644 --- a/modules/emacs/dired/config.el +++ b/modules/emacs/dired/config.el @@ -115,7 +115,7 @@ Fixes #3939: unsortable dired entries on Windows." (when (modulep! +icons) (setq dirvish-subtree-always-show-state t) - (appendq! dirvish-attributes '(nerd-icons subtree-state))) + (cl-callf append dirvish-attributes '(nerd-icons subtree-state))) (setq dirvish-hide-details '(dirvish dirvish-side) dirvish-hide-cursor '(dirvish dirvish-side)) diff --git a/modules/email/mu4e/config.el b/modules/email/mu4e/config.el index 767f7c575..2902f6ae5 100644 --- a/modules/email/mu4e/config.el +++ b/modules/email/mu4e/config.el @@ -630,7 +630,6 @@ See `+mu4e-msg-gmail-p' and `mu4e-sent-messages-behavior'.") (defvar +mu4e--last-invalid-gmail-action 0) - (delq! 'delete mu4e-marks #'assq) (setf (alist-get 'delete mu4e-marks) (list :char '("D" . "✘") diff --git a/modules/lang/latex/config.el b/modules/lang/latex/config.el index ec69af6e5..b507ea21c 100644 --- a/modules/lang/latex/config.el +++ b/modules/lang/latex/config.el @@ -217,9 +217,8 @@ Math faces should stay fixed by the mixed-pitch blacklist, this is mostly for (defadvice! +latex--dont-indent-itemize-and-enumerate-and-description-a (fn &rest args) :around #'LaTeX-fill-region-as-paragraph (let ((LaTeX-indent-environment-list LaTeX-indent-environment-list)) - (delq! "itemize" LaTeX-indent-environment-list 'assoc) - (delq! "enumerate" LaTeX-indent-environment-list 'assoc) - (delq! "description" LaTeX-indent-environment-list 'assoc) + (dolist (item '("itemize" "enumerate" "description")) + (setf (alist-get item LaTeX-indent-environment-list nil t #'equal) nil)) (apply fn args)))) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 90a99e682..ee91afcae 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -760,7 +760,7 @@ mutating hooks on exported output, like formatters." "Restart `org-mode', but only once." (remove-hook 'doom-switch-buffer-hook #'+org--restart-mode-h 'local) (quiet! (org-mode-restart)) - (delq! (current-buffer) org-agenda-new-buffers) + (cl-callf2 delq (current-buffer) org-agenda-new-buffers) (run-hooks 'find-file-hook)) (add-hook! 'org-agenda-finalize-hook diff --git a/modules/lang/solidity/config.el b/modules/lang/solidity/config.el index 60d9c5aca..34b1fd897 100644 --- a/modules/lang/solidity/config.el +++ b/modules/lang/solidity/config.el @@ -20,4 +20,4 @@ (use-package! company-solidity :when (modulep! :completion company) - :config (delq! 'company-solidity company-backends))) + :config (cl-callf2 delq 'company-solidity company-backends))) diff --git a/modules/lang/web/+html.el b/modules/lang/web/+html.el index bb0d9b23c..e9abf0227 100644 --- a/modules/lang/web/+html.el +++ b/modules/lang/web/+html.el @@ -62,7 +62,7 @@ collect (cons (car pair) (string-trim-right (cdr pair) "\\(?:>\\|]\\|}\\)+\\'"))))) - (delq! nil web-mode-engines-auto-pairs)) + (cl-callf2 delq nil web-mode-engines-auto-pairs)) (add-to-list 'web-mode-engines-alist '("elixir" . "\\.eex\\'")) (add-to-list 'web-mode-engines-alist '("phoenix" . "\\.[lh]eex\\'")) diff --git a/modules/tools/lookup/autoload/online.el b/modules/tools/lookup/autoload/online.el index 15a5f7483..a25eeaf53 100644 --- a/modules/tools/lookup/autoload/online.el +++ b/modules/tools/lookup/autoload/online.el @@ -54,7 +54,7 @@ QUERY must be a string, and PROVIDER must be a key of (and (fboundp backend) (funcall backend query)) (error - (delq! major-mode +lookup--last-provider 'assq) + (setf (alist-get major-mode +lookup--last-provider nil t) nil) (signal (car e) (cdr e)))) (throw 'done t))))))) diff --git a/modules/ui/ligatures/autoload/ligatures.el b/modules/ui/ligatures/autoload/ligatures.el index cee9be08d..d8b74c8fd 100644 --- a/modules/ui/ligatures/autoload/ligatures.el +++ b/modules/ui/ligatures/autoload/ligatures.el @@ -35,7 +35,7 @@ Note that this will keep all ligatures in `+ligatures-prog-mode-list' active, as (declare (indent defun)) (if (null (car-safe plist)) (dolist (mode (ensure-list modes)) - (delq! mode +ligatures-extra-alist 'assq)) + (setf (alist-get mode +ligatures-extra-alist nil t) nil)) (let ((results)) (while plist (let ((key (pop plist))) diff --git a/modules/ui/modeline/+light.el b/modules/ui/modeline/+light.el index 64a40a818..dacff3b7f 100644 --- a/modules/ui/modeline/+light.el +++ b/modules/ui/modeline/+light.el @@ -474,7 +474,7 @@ lines are selected, or the NxM dimensions of a block selection.") (defun +modeline-add-selection-segment-h () (add-to-list '+modeline-format-left '+modeline-selection-info 'append)) (defun +modeline-remove-selection-segment-h () - (delq! '+modeline-selection-info +modeline-format-left)) + (cl-callf2 delq '+modeline-selection-info +modeline-format-left)) (if (featurep 'evil) (progn