Subject: Re: bug#79168: [PATCH 03/11] Reorder code to put defcustom/defvar at the beginning part

From: Robert Pluim <[email-masked]>
Date: Sat, 09 Aug 2025 16:16:47 +0200

>>>>> On Fri,  8 Aug 2025 23:45:42 -0700, Xiyue Deng <[email-masked]> said:

    Xiyue> (Adapted from bug#52476 by Aleksandr Vityazev.)
    Xiyue> * packages/oauth2/oauth2.el: Put oauth2-token-file,
    Xiyue> oauth2--url-advice, and oauth--token-data to the beginning part of the
    Xiyue> source code.
    Xiyue> ---
    Xiyue>  oauth2.el | 16 ++++++++--------
    Xiyue>  1 file changed, 8 insertions(+), 8 deletions(-)

    Xiyue> diff --git a/oauth2.el b/oauth2.el
    Xiyue> index c3aa45ed69..eccf439130 100644
    Xiyue> --- a/oauth2.el
    Xiyue> +++ b/oauth2.el
    Xiyue> @@ -53,9 +53,17 @@
    Xiyue>    :link '(url-link :tag "Savannah" "https://git.savannah.gnu.org/cgit/emacs/elpa.git/tree/?h=externals/oauth2")
    Xiyue>    :link '(url-link :tag "ELPA" "https://elpa.gnu.org/packages/oauth2.html"))
 
    Xiyue> +(defcustom oauth2-token-file (concat user-emacs-directory "oauth2.plstore")
    Xiyue> +  "File path where store OAuth tokens."
    Xiyue> +  :group 'oauth2
    Xiyue> +  :type 'file)
    Xiyue> +

This should use `locate-user-emacs-file'.

Robert
--