Eshell: Patch INSIDE_EMACS.

master
Pierre Neidhardt 2020-02-17 17:05:40 +01:00
parent 587be524e2
commit 15c7f5de50
2 changed files with 11 additions and 0 deletions

View File

@ -303,4 +303,6 @@ This should be faster then `seq-uniq'."
(when (fboundp 'helm-fish-completion-make-eshell-source)
(setq helm-esh-pcomplete-build-source-fn #'helm-fish-completion-make-eshell-source)))
(require 'patch-eshell-inside-emacs)
(provide 'init-eshell)

View File

@ -0,0 +1,9 @@
;;; Reported upstream, see #39596.
(defun ambrevar/set-inside-emacs ()
"Export INSIDE_EMACS just like M-x shell does.
This is useful for programs like Guix that take provisions for Emacs."
(setenv "INSIDE_EMACS" (format "%s;%s" emacs-version "eshell")))
(add-hook 'eshell-mode-hook 'ambrevar/set-inside-emacs)
(provide 'patch-eshell-inside-emacs)