From: Eli Zaretskii Date: Sat, 26 Apr 2025 15:01:42 +0000 (+0300) Subject: ; Fix compilation warning in string-edit.el X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8bf80a8130d05c880036d28398b158f88d13c937;p=emacs.git ; 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) --- 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)