From 8bf80a8130d05c880036d28398b158f88d13c937 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 26 Apr 2025 18:01:42 +0300 Subject: [PATCH] ; Fix compilation warning in string-edit.el * lisp/textmodes/string-edit.el (string-edit): Avoid shadowing the global 'major-mode'. (cherry picked from commit 191b4cd9a76aa31ff9711370842394f37955c06a) --- lisp/textmodes/string-edit.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/textmodes/string-edit.el b/lisp/textmodes/string-edit.el index c8fdffe5f4c..dda70437f78 100644 --- a/lisp/textmodes/string-edit.el +++ b/lisp/textmodes/string-edit.el @@ -37,10 +37,10 @@ ;;;###autoload (cl-defun string-edit (prompt string success-callback - &key abort-callback major-mode read) + &key abort-callback major-mode-sym read) "Switch to a new buffer to edit STRING. -Call MAJOR-MODE (defaulting to `string-edit-mode') to set up the new +Call MAJOR-MODE-SYM (defaulting to `string-edit-mode') to set up the new buffer, and insert PROMPT (defaulting to nothing) at the start of the buffer. @@ -79,7 +79,7 @@ Also see `read-string-from-buffer'." (set-buffer-modified-p nil) (setq buffer-undo-list nil) - (funcall (or major-mode #'string-edit-mode)) + (funcall (or major-mode-sym #'string-edit-mode)) (string-edit-minor-mode) (setq-local string-edit--success-callback success-callback) (setq-local string-edit--abort-callback abort-callback) -- 2.39.5