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.
This commit is contained in:
Henrik Lissner
2025-03-25 00:31:41 -04:00
parent 2f7f37d49b
commit dac6e05b87
27 changed files with 85 additions and 131 deletions

View File

@ -351,8 +351,8 @@ in."
(print! "%s" (string-join (append doom-doctor--errors doom-doctor--warnings) "\n"))) (print! "%s" (string-join (append doom-doctor--errors doom-doctor--warnings) "\n")))
(setq doom-local-errors doom-doctor--errors (setq doom-local-errors doom-doctor--errors
doom-local-warnings doom-doctor--warnings))) doom-local-warnings doom-doctor--warnings)))
(appendq! doom-doctor--errors doom-local-errors) (cl-callf append doom-doctor--errors doom-local-errors)
(appendq! doom-doctor--warnings doom-local-warnings)))))) (cl-callf append doom-doctor--warnings doom-local-warnings))))))
(error (error
(warn! "Attempt to load DOOM failed\n %s\n" (warn! "Attempt to load DOOM failed\n %s\n"
(or (cdr-safe ex) (car ex))) (or (cdr-safe ex) (car ex)))

View File

@ -82,30 +82,6 @@ are great, but this file exists to add demos for Doom's API and beyond.
(after! rustic ...) (after! rustic ...)
(after! python ...) (after! python ...)
#+end_src #+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! * cmd!
:PROPERTIES: :PROPERTIES:
:added: 3.0.0-pre :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 ;; refresh to delete packages used only on one system, use :ignore
(package! evil :ignore (not (equal system-name "my-desktop"))) (package! evil :ignore (not (equal system-name "my-desktop")))
#+end_src #+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! * pushnew!
:PROPERTIES: :PROPERTIES:
:added: 3.0.0-pre :added: 3.0.0-pre

View File

@ -644,29 +644,29 @@ on."
;; read-only, in `so-long-minor-mode', so we can have a basic editing ;; 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', ;; 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. ;; however, because long files have a far bigger impact on Emacs performance.
(delq! 'font-lock-mode so-long-minor-modes) (cl-callf2 delq 'font-lock-mode so-long-minor-modes)
(delq! 'display-line-numbers-mode so-long-minor-modes) (cl-callf2 delq 'display-line-numbers-mode so-long-minor-modes)
(delq! 'buffer-read-only so-long-variable-overrides 'assq) (setf (alist-get 'buffer-read-only so-long-variable-overrides nil t) nil)
;; ...but at least reduce the level of syntax highlighting ;; ...but at least reduce the level of syntax highlighting
(add-to-list 'so-long-variable-overrides '(font-lock-maximum-decoration . 1)) (add-to-list 'so-long-variable-overrides '(font-lock-maximum-decoration . 1))
;; ...and insist that save-place not operate in large/long files ;; ...and insist that save-place not operate in large/long files
(add-to-list 'so-long-variable-overrides '(save-place-alist . nil)) (add-to-list 'so-long-variable-overrides '(save-place-alist . nil))
;; But disable everything else that may be unnecessary/expensive for large or ;; But disable everything else that may be unnecessary/expensive for large or
;; wide buffers. ;; wide buffers.
(appendq! so-long-minor-modes (cl-callf append so-long-minor-modes
'(spell-fu-mode '(spell-fu-mode
eldoc-mode eldoc-mode
highlight-numbers-mode highlight-numbers-mode
better-jumper-local-mode better-jumper-local-mode
ws-butler-mode ws-butler-mode
auto-composition-mode auto-composition-mode
undo-tree-mode undo-tree-mode
highlight-indent-guides-mode highlight-indent-guides-mode
hl-fill-column-mode hl-fill-column-mode
;; These are redundant on Emacs 29+ ;; These are redundant on Emacs 29+
flycheck-mode flycheck-mode
smartparens-mode smartparens-mode
smartparens-strict-mode))) smartparens-strict-mode)))
(use-package! ws-butler (use-package! ws-butler

View File

@ -160,13 +160,14 @@ all hooks after it are ignored.")
,bdef) ,bdef)
forms)) forms))
(when-let (desc (cadr (memq :which-key udef))) (when-let (desc (cadr (memq :which-key udef)))
(prependq! (cl-callf2 append
wkforms `((which-key-add-key-based-replacements `((which-key-add-key-based-replacements
(general--concat t doom-leader-alt-key ,key) (general--concat t doom-leader-alt-key ,key)
,desc) ,desc)
(which-key-add-key-based-replacements (which-key-add-key-based-replacements
(general--concat t doom-leader-key ,key) (general--concat t doom-leader-key ,key)
,desc)))))))) ,desc))
wkforms))))))
(macroexp-progn (macroexp-progn
(append (and wkforms `((after! which-key ,@(nreverse wkforms)))) (append (and wkforms `((after! which-key ,@(nreverse wkforms))))
(nreverse forms))))) (nreverse forms)))))

View File

@ -708,8 +708,10 @@ See `general-key-dispatch' for what other arguments it accepts in BRANCHES."
;;; Mutation ;;; Mutation
;; DEPRECATED: Remove in v3.0
(defmacro appendq! (sym &rest lists) (defmacro appendq! (sym &rest lists)
"Append LISTS to SYM in place." "Append LISTS to SYM in place."
(declare (obsolete "Use `cl-callf2' instead" "3.0.0"))
`(setq ,sym (append ,sym ,@lists))) `(setq ,sym (append ,sym ,@lists)))
(defmacro setq! (&rest settings) (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) collect `(funcall (or (get ',var 'custom-set) #'set-default-toplevel-value)
',var ,val)))) ',var ,val))))
;; DEPRECATED: Remove in v3.0
(defmacro delq! (elt list &optional fetcher) (defmacro delq! (elt list &optional fetcher)
"`delq' ELT from LIST in-place. "`delq' ELT from LIST in-place.
If FETCHER is a function, ELT is used as the key in LIST (an alist)." 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 `(setq ,list (delq ,(if fetcher
`(funcall ,fetcher ,elt ,list) `(funcall ,fetcher ,elt ,list)
elt) elt)
@ -739,8 +743,10 @@ This is a variadic `cl-pushnew'."
`(dolist (,var (list ,@values) (with-no-warnings ,place)) `(dolist (,var (list ,@values) (with-no-warnings ,place))
(cl-pushnew ,var ,place :test #'equal)))) (cl-pushnew ,var ,place :test #'equal))))
;; DEPRECATED: Remove in v3.0
(defmacro prependq! (sym &rest lists) (defmacro prependq! (sym &rest lists)
"Prepend LISTS to SYM in place." "Prepend LISTS to SYM in place."
(declare (obsolete "Use `cl-callf2' instead" "3.0.0"))
`(setq ,sym (append ,@lists ,sym))) `(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))) (let ((advice-fn (intern (format "doom--defer-feature-%s-a" feature)))
(fns (or fns (list feature)))) (fns (or fns (list feature))))
`(progn `(progn
(delq! ',feature features) (cl-callf2 delq ',feature features)
(defadvice! ,advice-fn (&rest _) (defadvice! ,advice-fn (&rest _)
:before ',fns :before ',fns
;; Some plugins (like yasnippet) will invoke a fn early to parse ;; Some plugins (like yasnippet) will invoke a fn early to parse

View File

@ -184,7 +184,7 @@ original state.")
(let ((doom-straight--auto-options doom-straight--auto-options)) (let ((doom-straight--auto-options doom-straight--auto-options))
;; We can't intercept C-g, so no point displaying any options for this key ;; 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. ;; 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 ;; HACK: Remove actions that don't work in noninteractive Emacs (like
;; opening dired or magit). ;; opening dired or magit).
(setq actions (setq actions

View File

@ -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 :preface (defvar winner-dont-bind-my-keys t) ; I'll bind keys myself
:hook (doom-first-buffer . winner-mode) :hook (doom-first-buffer . winner-mode)
:config :config
(appendq! winner-boring-buffers (cl-callf append winner-boring-buffers
'("*Compile-Log*" "*inferior-lisp*" "*Fuzzy Completions*" '("*Compile-Log*" "*inferior-lisp*" "*Fuzzy Completions*"
"*Apropos*" "*Help*" "*cvs*" "*Buffer List*" "*Ibuffer*" "*Apropos*" "*Help*" "*cvs*" "*Buffer List*" "*Ibuffer*"
"*esh command on file*"))) "*esh command on file*")))
(use-package! paren (use-package! paren

View File

@ -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/") (setq package-user-dir (file-name-concat doom-local-dir "elpa/")
package-gnupghome-dir (expand-file-name "gpg" package-user-dir)) package-gnupghome-dir (expand-file-name "gpg" package-user-dir))
(let ((s (if gnutls-verify-error "s" ""))) (let ((s (if gnutls-verify-error "s" "")))
(prependq! package-archives (cl-callf2 append
;; I omit Marmalade because its packages are manually submitted ;; I omit Marmalade because its packages are manually submitted rather
;; rather than pulled, and so often out of date. ;; than pulled, and so often out of date.
`(("melpa" . ,(format "http%s://melpa.org/packages/" s)) `(("melpa" . ,(format "http%s://melpa.org/packages/" s))
("org" . ,(format "http%s://orgmode.org/elpa/" 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 ;; 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 ;; trivially usable. Remember to run 'doom sync' to purge them; they can

View File

@ -113,24 +113,23 @@ MATCH is a string regexp. Only entries that match it will be included."
(let (result) (let (result)
(dolist (file (mapcan (doom-rpartial #'doom-glob "*") (ensure-list paths))) (dolist (file (mapcan (doom-rpartial #'doom-glob "*") (ensure-list paths)))
(cond ((file-directory-p file) (cond ((file-directory-p file)
(appendq! (cl-callf append result
result (and (memq type '(t dirs))
(and (memq type '(t dirs)) (string-match-p match file)
(string-match-p match file) (not (and filter (funcall filter file)))
(not (and filter (funcall filter file))) (not (and (file-symlink-p file)
(not (and (file-symlink-p file) (not follow-symlinks)))
(not follow-symlinks))) (<= mindepth 0)
(<= mindepth 0) (list (if relative-to
(list (if relative-to (file-relative-name file relative-to)
(file-relative-name file relative-to) file)))
file))) (and (>= depth 1)
(and (>= depth 1) (apply #'doom-files-in file
(apply #'doom-files-in file (append (list :mindepth (1- mindepth)
(append (list :mindepth (1- mindepth) :depth (1- depth)
:depth (1- depth) :relative-to relative-to
:relative-to relative-to :map nil)
:map nil) rest)))))
rest)))))
((and (memq type '(t files)) ((and (memq type '(t files))
(string-match-p match file) (string-match-p match file)
(not (and filter (funcall filter file))) (not (and filter (funcall filter file)))

View File

@ -151,13 +151,13 @@ properties:
(:cond (:cond
(cl-loop for (cond . mods) in (cdr m) (cl-loop for (cond . mods) in (cdr m)
if (eval cond t) if (eval cond t)
return (prependq! mplist mods))) return (cl-callf2 append mods mplist)))
(:if (if (eval (cadr m) t) (:if (if (eval (cadr m) t)
(push (caddr m) mplist) (push (caddr m) mplist)
(prependq! mplist (cdddr m)))) (cl-callf2 append (cdddr m) mplist)))
(test (if (xor (eval (cadr m) t) (test (if (xor (eval (cadr m) t)
(eq test :unless)) (eq test :unless))
(prependq! mplist (cddr m)))))) (cl-callf2 append (cddr m) mplist)))))
((catch 'doom-modules ((catch 'doom-modules
(let* ((module (if (listp m) (car m) m)) (let* ((module (if (listp m) (car m) m))
(flags (if (listp m) (cdr m)))) (flags (if (listp m) (cdr m))))

View File

@ -199,7 +199,7 @@ processed."
(cl-pushnew name doom-disabled-packages) (cl-pushnew name doom-disabled-packages)
(when recipe (when recipe
(straight-override-recipe (cons name 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)) (dolist (package (cl-delete-duplicates packages :test #'equal))
(straight-register-package package) (straight-register-package package)
(let ((name (symbol-name package))) (let ((name (symbol-name package)))

View File

@ -45,8 +45,7 @@ name under `pcache-directory' (by default a subdirectory under
"Persist VARIABLES (list of symbols) in LOCATION (symbol). "Persist VARIABLES (list of symbols) in LOCATION (symbol).
This populates these variables with cached values, if one exists, and saves them This populates these variables with cached values, if one exists, and saves them
to file when Emacs quits. This cannot persist buffer-local variables." to file when Emacs quits. This cannot persist buffer-local variables."
(cl-check-type location string) (dolist (var (ensure-list variables))
(dolist (var variables)
(when (doom-store-member-p var location) (when (doom-store-member-p var location)
(set var (doom-store-get var location)))) (set var (doom-store-get var location))))
(setf (alist-get location doom-store-persist-alist) (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). "Unregisters VARIABLES (list of symbols) in LOCATION (symbol).
Variables to persist are recorded in `doom-store-persist-alist'. Does not affect Variables to persist are recorded in `doom-store-persist-alist'. Does not affect
the actual variables themselves or their values." the actual variables themselves or their values."
(cl-check-type location string) (setf (alist-get location doom-store-persist-alist nil t)
(if variables (if variables
(setf (alist-get location doom-store-persist-alist)
(cl-set-difference (cdr (assq location doom-store-persist-alist)) (cl-set-difference (cdr (assq location doom-store-persist-alist))
variables)) variables))))
(delq! location doom-store-persist-alist 'assoc)))
(defun doom--store-init (&optional location) (defun doom--store-init (&optional location)
(cl-check-type location (or null string)) (cl-check-type location (or null string))

View File

@ -5,7 +5,7 @@
;; `elisp-mode' is loaded at startup. In order to lazy load its config we need ;; `elisp-mode' is loaded at startup. In order to lazy load its config we need
;; to pretend it isn't loaded ;; to pretend it isn't loaded
(delq! 'ispell features) (cl-callf2 delq 'ispell features)
(global-set-key [remap ispell-word] #'+spell/correct) (global-set-key [remap ispell-word] #'+spell/correct)

View File

@ -149,7 +149,7 @@
;; Don't show documentation in echo area, because company-box displays its own ;; Don't show documentation in echo area, because company-box displays its own
;; in a child frame. ;; 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) (defun +company-box-icons--elisp-fn (candidate)
(when (derived-mode-p 'emacs-lisp-mode) (when (derived-mode-p 'emacs-lisp-mode)

View File

@ -351,7 +351,7 @@ If ARG (universal argument), include all files, even hidden or compressed ones."
:require-match t :require-match t
:action (lambda (cand) :action (lambda (cand)
(let ((mark (cdr cand))) (let ((mark (cdr cand)))
(delq! (marker-buffer mark) buffers) (cl-callf2 delq (marker-buffer mark) buffers)
(mapc #'kill-buffer buffers) (mapc #'kill-buffer buffers)
(setq buffers nil) (setq buffers nil)
(with-current-buffer (switch-to-buffer (marker-buffer mark)) (with-current-buffer (switch-to-buffer (marker-buffer mark))

View File

@ -109,7 +109,7 @@
(dolist (hook (cdr deferral-list)) (dolist (hook (cdr deferral-list))
(advice-remove hook #',fn) (advice-remove hook #',fn)
(remove-hook 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))))) (unintern ',fn nil)))))
(let (forms) (let (forms)
(dolist (hook hooks forms) (dolist (hook hooks forms)

View File

@ -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) (advice-add #'evil-open-below :around #'+evil--insert-newline-below-and-respect-comments-a)
;; Lazy load evil ex commands ;; Lazy load evil ex commands
(delq! 'evil-ex features) (cl-callf2 delq 'evil-ex features)
(add-transient-hook! 'evil-ex (provide 'evil-ex)) (add-transient-hook! 'evil-ex (provide 'evil-ex))
(after! evil-ex (load! "+commands"))) (after! evil-ex (load! "+commands")))

View File

@ -45,7 +45,7 @@
(advice-add #'yas-snippet-dirs :filter-return #'delete-dups) (advice-add #'yas-snippet-dirs :filter-return #'delete-dups)
;; Remove GUI dropdown prompt (prefer ivy/helm) ;; 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 ;; Prioritize private snippets in `+snippets-dir' over built-in ones if there
;; are multiple choices. ;; are multiple choices.
(add-to-list 'yas-prompt-functions #'+snippets-prompt-private) (add-to-list 'yas-prompt-functions #'+snippets-prompt-private)

View File

@ -115,7 +115,7 @@ Fixes #3939: unsortable dired entries on Windows."
(when (modulep! +icons) (when (modulep! +icons)
(setq dirvish-subtree-always-show-state t) (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) (setq dirvish-hide-details '(dirvish dirvish-side)
dirvish-hide-cursor '(dirvish dirvish-side)) dirvish-hide-cursor '(dirvish dirvish-side))

View File

@ -630,7 +630,6 @@ See `+mu4e-msg-gmail-p' and `mu4e-sent-messages-behavior'.")
(defvar +mu4e--last-invalid-gmail-action 0) (defvar +mu4e--last-invalid-gmail-action 0)
(delq! 'delete mu4e-marks #'assq)
(setf (alist-get 'delete mu4e-marks) (setf (alist-get 'delete mu4e-marks)
(list (list
:char '("D" . "") :char '("D" . "")

View File

@ -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) (defadvice! +latex--dont-indent-itemize-and-enumerate-and-description-a (fn &rest args)
:around #'LaTeX-fill-region-as-paragraph :around #'LaTeX-fill-region-as-paragraph
(let ((LaTeX-indent-environment-list LaTeX-indent-environment-list)) (let ((LaTeX-indent-environment-list LaTeX-indent-environment-list))
(delq! "itemize" LaTeX-indent-environment-list 'assoc) (dolist (item '("itemize" "enumerate" "description"))
(delq! "enumerate" LaTeX-indent-environment-list 'assoc) (setf (alist-get item LaTeX-indent-environment-list nil t #'equal) nil))
(delq! "description" LaTeX-indent-environment-list 'assoc)
(apply fn args)))) (apply fn args))))

View File

@ -760,7 +760,7 @@ mutating hooks on exported output, like formatters."
"Restart `org-mode', but only once." "Restart `org-mode', but only once."
(remove-hook 'doom-switch-buffer-hook #'+org--restart-mode-h 'local) (remove-hook 'doom-switch-buffer-hook #'+org--restart-mode-h 'local)
(quiet! (org-mode-restart)) (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)) (run-hooks 'find-file-hook))
(add-hook! 'org-agenda-finalize-hook (add-hook! 'org-agenda-finalize-hook

View File

@ -20,4 +20,4 @@
(use-package! company-solidity (use-package! company-solidity
:when (modulep! :completion company) :when (modulep! :completion company)
:config (delq! 'company-solidity company-backends))) :config (cl-callf2 delq 'company-solidity company-backends)))

View File

@ -62,7 +62,7 @@
collect (cons (car pair) collect (cons (car pair)
(string-trim-right (cdr 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 '("elixir" . "\\.eex\\'"))
(add-to-list 'web-mode-engines-alist '("phoenix" . "\\.[lh]eex\\'")) (add-to-list 'web-mode-engines-alist '("phoenix" . "\\.[lh]eex\\'"))

View File

@ -54,7 +54,7 @@ QUERY must be a string, and PROVIDER must be a key of
(and (fboundp backend) (and (fboundp backend)
(funcall backend query)) (funcall backend query))
(error (error
(delq! major-mode +lookup--last-provider 'assq) (setf (alist-get major-mode +lookup--last-provider nil t) nil)
(signal (car e) (cdr e)))) (signal (car e) (cdr e))))
(throw 'done t))))))) (throw 'done t)))))))

View File

@ -35,7 +35,7 @@ Note that this will keep all ligatures in `+ligatures-prog-mode-list' active, as
(declare (indent defun)) (declare (indent defun))
(if (null (car-safe plist)) (if (null (car-safe plist))
(dolist (mode (ensure-list modes)) (dolist (mode (ensure-list modes))
(delq! mode +ligatures-extra-alist 'assq)) (setf (alist-get mode +ligatures-extra-alist nil t) nil))
(let ((results)) (let ((results))
(while plist (while plist
(let ((key (pop plist))) (let ((key (pop plist)))

View File

@ -474,7 +474,7 @@ lines are selected, or the NxM dimensions of a block selection.")
(defun +modeline-add-selection-segment-h () (defun +modeline-add-selection-segment-h ()
(add-to-list '+modeline-format-left '+modeline-selection-info 'append)) (add-to-list '+modeline-format-left '+modeline-selection-info 'append))
(defun +modeline-remove-selection-segment-h () (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) (if (featurep 'evil)
(progn (progn