From: Theodor Thornhill <theo@thornhill.no>
To: "Basil L. Contovounesios" <contovob@tcd.ie>
Cc: 41977@debbugs.gnu.org
Subject: bug#41977: 28.0.50; [PATCH]: eval-when-compile eshell in project.el
Date: Sun, 21 Jun 2020 17:44:24 +0000 [thread overview]
Message-ID: <87lfkg48lr.fsf@thornhill.no> (raw)
In-Reply-To: <87h7v4ip1g.fsf@tcd.ie>
[-- Attachment #1: Type: text/plain, Size: 403 bytes --]
"Basil L. Contovounesios" <contovob@tcd.ie> writes:
> Since eshell-buffer-name is a variable, eval-when-compile is not the
> right thing to do here. Instead, there should be a
> (defvar eshell-buffer-name) inside project-eshell declaring the symbol
> as special. Right?
You are absolutely correct, and TIL - thanks :)
Below is another patch doing this. Works fine in emacs -Q
Theo
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Forward-declare-eshell-buffer-name-in-project-eshell.patch --]
[-- Type: text/x-patch; name=0001-Forward-declare-eshell-buffer-name-in-project-eshell.patch, Size: 919 bytes --]
From 2c16ab87e369ab315d43d5e1d6965f1278c2c240 Mon Sep 17 00:00:00 2001
From: Theodor Thornhill <theo@thornhill.no>
Date: Sun, 21 Jun 2020 19:15:37 +0200
Subject: [PATCH] Forward declare eshell-buffer-name in project-eshell
* lisp/progmodes/project.el: Forward declares 'eshell-buffer-name' so
that 'project-eshell' can use the special variable in eshell.
---
lisp/progmodes/project.el | 1 +
1 file changed, 1 insertion(+)
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 74495cf07a..715f0480bb 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -740,6 +740,7 @@ project-eshell
With \\[universal-argument] prefix, create a new Eshell buffer
with uniquified name."
(interactive)
+ (defvar eshell-buffer-name)
(let* ((default-directory (project-root (project-current t)))
(eshell-buffer-name
(concat "*" (file-name-nondirectory
--
2.27.0
next prev parent reply other threads:[~2020-06-21 17:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-21 11:33 bug#41977: 28.0.50; [PATCH]: eval-when-compile eshell in project.el Theodor Thornhill
2020-06-21 12:25 ` Basil L. Contovounesios
2020-06-21 17:44 ` Theodor Thornhill [this message]
2020-06-21 17:55 ` Basil L. Contovounesios
2020-06-21 22:52 ` Dmitry Gutov
2020-06-21 23:02 ` Basil L. Contovounesios
2020-06-21 23:07 ` Dmitry Gutov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lfkg48lr.fsf@thornhill.no \
--to=theo@thornhill.no \
--cc=41977@debbugs.gnu.org \
--cc=contovob@tcd.ie \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).