emacs-devel
[Top][All Lists]
Advanced

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

Re: INSIDE_EMACS and Tramp


From: Stefan Monnier
Subject: Re: INSIDE_EMACS and Tramp
Date: Sat, 02 May 2020 13:20:02 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> +(defvar inside-emacs-functions nil
[...]
> +(defun inside-emacs (&optional context)
> +  "Return the string to be set in environment variable INSIDE_EMACS.
> +CONTEXT could be a string which is added."
> +  (mapconcat
> +   #'identity
> +   (delq nil (append `(,emacs-version
> +                    ,(and (stringp context) context))
> +                  (mapcar #'funcall inside-emacs-functions)))
> +   ","))

Any chance we could live without `inside-emacs-functions` and instead do:

    (defun inside-emacs (&optional context)
      "Return the string to be set in environment variable INSIDE_EMACS.
    CONTEXT could be a string which is added."
      (let ((base (or (getenv "INSIDE_EMACS") emacs-version)))
        (if context (concat case "," context) base)))


-- Stefan




reply via email to

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