* lisp/eshell/em-dirs.el (eshell-write-last-dir-ring):
* lisp/eshell/em-hist.el (eshell-write-history): Don't call
file-truename with argument of nil. (Bug#33477)
* test/lisp/eshell/eshell-tests.el (with-temp-eshell): Remove
HISTFILE from the environment, to make sure the Eshell history
file is nil.
(defun eshell-write-last-dir-ring ()
"Write the buffer's `eshell-last-dir-ring' to a history file."
(let* ((file eshell-last-dir-ring-file-name)
- (resolved-file (file-truename file)))
+ (resolved-file (if (stringp file) (file-truename file))))
(cond
((or (null file)
(equal file "")
See also `eshell-read-history'."
(let* ((file (or filename eshell-history-file-name))
- (resolved-file (file-truename file)))
+ (resolved-file (if (stringp file) (file-truename file))))
(cond
((or (null file)
(equal file "")
(defmacro with-temp-eshell (&rest body)
"Evaluate BODY in a temporary Eshell buffer."
`(let* ((eshell-directory-name (make-temp-file "eshell" t))
+ ;; We want no history file, so prevent Eshell from falling
+ ;; back on $HISTFILE.
+ (_ (setenv "HISTFILE"))
(eshell-history-file-name nil)
(eshell-buffer (eshell t)))
(unwind-protect