emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/transient 01a166fcb8 097/366: Declare variable alias be


From: Jonas Bernoulli
Subject: [elpa] externals/transient 01a166fcb8 097/366: Declare variable alias before its referent
Date: Tue, 25 Jan 2022 18:54:30 -0500 (EST)

branch: externals/transient
commit 01a166fcb8bbd9918ba741e9b5428a4b524eab33
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    Declare variable alias before its referent
    
    Since Emacs 27 the byte-compiler tells us to do it in that order.
    The warning is shown by `byte-compile-file-form-defvar-function',
    which contains a comment providing this justification:
    
    Variable aliases are better declared before the corresponding variable,
    since it makes it more likely that only one of the two vars has a value
    before the `defvaralias' gets executed, which avoids the need to
    merge values.
---
 lisp/transient.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index 5e22516c8a..ca60c31440 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -1081,13 +1081,13 @@ variable instead.")
   "The window that was selected before the transient was invoked.
 Usually it remains selected while the transient is active.")
 
+(define-obsolete-variable-alias 'transient--source-buffer
+  'transient--original-buffer "Transient 0.2.0")
+
 (defvar transient--original-buffer nil
   "The buffer that was current before the transient was invoked.
 Usually it remains current while the transient is active.")
 
-(define-obsolete-variable-alias 'transient--source-buffer
-  'transient--original-buffer "Transient 0.2.0")
-
 (defvar transient--debug nil "Whether put debug information into *Messages*.")
 
 (defvar transient--history nil)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]