--- Begin Message ---
Subject: |
30.0.50; [PATCH] * lisp/eshell/esh-mode.el (eshell-first-time-mode-hook): Run the hook for once |
Date: |
Sat, 27 Apr 2024 16:32:24 +0000 |
Hi,
The document of `eshell-first-time-mode-hook' says it would be run the
first time eshell started.
> A hook that gets run the first time ‘eshell-mode’ is entered.
> That is to say, the first time during an Emacs session.
But it actually runs every time for an eshell buffer(start an eshell,
exit it, start an eshell again).
Here is the one line code to show that:
(add-hook 'eshell-first-time-mode-hook '(lambda () (message "test")))
The patch will make the `eshell-first-time-mode-hook' only run once as
its document described.
Please help review the patch. Thanks
Best Regards
Lin
0001-lisp-eshell-esh-mode.el-eshell-first-time-mode-hook-.patch
Description: Text Data
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#70610: 30.0.50; [PATCH] * lisp/eshell/esh-mode.el (eshell-first-time-mode-hook): Run the hook for once |
Date: |
Thu, 2 May 2024 20:15:42 -0700 |
On 5/2/2024 2:09 AM, Eli Zaretskii wrote:
From: Lin Sun <sunlin7.mail@gmail.com>
Date: Sat, 27 Apr 2024 16:32:24 +0000
The document of `eshell-first-time-mode-hook' says it would be run the
first time eshell started.
A hook that gets run the first time ‘eshell-mode’ is entered.
That is to say, the first time during an Emacs session.
But it actually runs every time for an eshell buffer(start an eshell,
exit it, start an eshell again).
[snip]
Jim, any comments on this change proposal?
Thanks for the patch, Lin Sun. This looks good, so I've merged it to the
master branch as a2ccda71c15. Closing this bug now.
--- End Message ---