mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2026-09-10 07:46:51 -04:00
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.
This commit is contained in:
parent
2066a0c9e8
commit
7be92efa5e
|
|
@ -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)))
|
||||
|
|
|
|||
|
|
@ -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)))))
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue