From 908c4cc591e9bdfd2536b9c86603ade269452287 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Sat, 4 Jan 2025 18:05:38 +0100 Subject: [PATCH] Use 'alist-set' in a few more places --- lisp/calc/calc-yank.el | 2 +- lisp/completion-preview.el | 6 +++--- lisp/help.el | 2 +- lisp/international/mule-cmds.el | 2 +- lisp/progmodes/elisp-mode.el | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lisp/calc/calc-yank.el b/lisp/calc/calc-yank.el index 780e5327fb5..f8993354a66 100644 --- a/lisp/calc/calc-yank.el +++ b/lisp/calc/calc-yank.el @@ -259,7 +259,7 @@ TEXT and CALCVAL are the TEXT and internal structure of stack entries.") "Set the contents of the Calc register REGISTER to (TEXT . CALCVAL), as well as set the contents of the Emacs register REGISTER to TEXT." (set-register register text) - (setf (alist-get register calc-register-alist) (cons text calcval))) + (alist-set register calc-register-alist (cons text calcval))) (defun calc-get-register (reg) "Return the CALCVAL portion of the contents of the Calc register REG, diff --git a/lisp/completion-preview.el b/lisp/completion-preview.el index 744ca004e76..085cf43c145 100644 --- a/lisp/completion-preview.el +++ b/lisp/completion-preview.el @@ -368,9 +368,9 @@ set to the value of this option while the completion preview is visible." (completion-preview--modify-cursor)) (setq completion-preview--window (selected-window) completion-preview--buffer (current-buffer)) - (setf (alist-get 'completion-preview-active-mode - minor-mode-overriding-map-alist) - completion-preview-active-mode-map)) + (alist-set 'completion-preview-active-mode + minor-mode-overriding-map-alist + completion-preview-active-mode-map)) (remove-hook 'post-command-hook #'completion-preview--cleanup) (completion-preview--restore-cursor) (setq completion-preview--window nil diff --git a/lisp/help.el b/lisp/help.el index 0b6fd3c2290..5d1dcd46858 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -472,7 +472,7 @@ immediate bindings." :group 'help) (defun help--complete-keys-add (key val) - (setf (alist-get key help--complete-keys-alist nil nil #'equal) val)) + (alist-set key help--complete-keys-alist val #'equal)) (defcustom help-complete-keys-max-depth 3 "Maximum length of prefix key sequence to flatten in `help-complete-keys'." diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index b3d0f4d551f..b1556689f53 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -2973,7 +2973,7 @@ See also the documentation of `get-char-code-property' and ;; undo that, probably because `charprop.el' is being re-loaded. ;; Just skip it, in order to work around a recursive load (bug#52945). nil - (setf (alist-get name char-code-property-alist) table) + (alist-set name char-code-property-alist table) (put name 'char-code-property-documentation (purecopy docstring)))) (defvar char-code-property-table diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index d5a28f0041e..606cedc691c 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -457,9 +457,9 @@ be used instead. (cl-pushnew 'cursor-sensor-functions (alist-get 'font-lock-extra-managed-props (nthcdr 5 font-lock-defaults))) - (setf (alist-get 'font-lock-fontify-region-function - (nthcdr 5 font-lock-defaults)) - #'elisp-fontify-region) + (alist-set 'font-lock-fontify-region-function + (nthcdr 5 font-lock-defaults) + #'elisp-fontify-region) (setf (nth 2 font-lock-defaults) nil) (add-hook 'after-load-functions #'elisp--font-lock-flush-elisp-buffers) (if (boundp 'electric-pair-text-pairs) -- 2.39.5