emacs-31 7be92efa5e1 2/2: Rename variable to macroexp-enable-preserve-posification
Sean Whitton <[email protected]>
| Newsgroups | gmane.emacs.diffs |
|---|---|
| Message-ID | <[email protected]> |
branch: emacs-31 commit 7be92efa5e1ab3e6662f5fbbbb100e245c7c8b00 Author: Sean Whitton <[email protected]> Commit: Sean Whitton <[email protected]> Rename variable to macroexp-enable-preserve-posification * lisp/emacs-lisp/macroexp.el (macroexp-enable-pos-preservation): Rename ... (macroexp-enable-preserve-posification): ... to this. All uses changes. --- lisp/emacs-lisp/elisp-scope.el | 2 +- lisp/emacs-lisp/macroexp.el | 4 ++-- test/lisp/emacs-lisp/macroexp-tests.el | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lisp/emacs-lisp/elisp-scope.el b/lisp/emacs-lisp/elisp-scope.el index 4d1b7c69f15..55e82001df9 100644 --- a/lisp/emacs-lisp/elisp-scope.el +++ b/lisp/emacs-lisp/elisp-scope.el @@ -2794,7 +2794,7 @@ are analyzed." (symbols-with-pos-enabled t) (message-log-max nil) (inhibit-message t) - (macroexp-enable-pos-preservation nil) + (macroexp-enable-preserve-posification nil) (macroexpand-all-environment (append (mapcar #'list elisp-scope-unsafe-macros) macroexpand-all-environment))) (ignore-errors (macroexpand-1 form macroexpand-all-environment))) diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el index 49b8b022780..1d40e30bb08 100644 --- a/lisp/emacs-lisp/macroexp.el +++ b/lisp/emacs-lisp/macroexp.el @@ -304,7 +304,7 @@ modified FORM." (let ((new-form (macroexp--posify-form-1 form call-pos 10))) (or new-form form))) -(defvar macroexp-enable-pos-preservation t +(defvar macroexp-enable-preserve-posification t "Whether to attach position of a macro call to the expanded form.") (defmacro macroexp-preserve-posification (pos-form &rest body) @@ -319,7 +319,7 @@ change this." ((symbol-with-pos-p ,pos-form) (symbol-with-pos-pos ,pos-form)))) (new-value (progn ,@body))) - (if (and macroexp-enable-pos-preservation call-pos + (if (and macroexp-enable-preserve-posification call-pos (not (or (and (consp new-value) (symbol-with-pos-p (car new-value))) (and (symbol-with-pos-p new-value))))) diff --git a/test/lisp/emacs-lisp/macroexp-tests.el b/test/lisp/emacs-lisp/macroexp-tests.el index a8deb79dfb6..cad3ed84a07 100644 --- a/test/lisp/emacs-lisp/macroexp-tests.el +++ b/test/lisp/emacs-lisp/macroexp-tests.el @@ -186,13 +186,13 @@ "Eagerly macro-expand BODY." (macroexpand-all `(progn . ,body) macroexpand-all-environment)) -(ert-deftest macroexp--test-macroexp-enable-pos-preservation () +(ert-deftest macroexp--test-macroexp-enable-preserve-posification () (let* ((symbols-with-pos-enabled t) (form (read-positioning-symbols "(macroexp--test-with-foo (pop command-history))")) (pop-pos (symbol-with-pos-pos (caadr form))) (exp1 (macroexpand-1 form)) - (macroexp-enable-pos-preservation nil) + (macroexp-enable-preserve-posification nil) (exp2 (macroexpand-1 form))) ;; Position of `pop' preserved in EXP1. There's no way to tell that ;; the position information in EXP1 is synthetic, which may confuse