Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support building with Emacs 30 #484

Merged
merged 1 commit into from
Mar 4, 2025
Merged

Support building with Emacs 30 #484

merged 1 commit into from
Mar 4, 2025

Conversation

K900
Copy link
Contributor

@K900 K900 commented Mar 3, 2025

No description provided.

configure Outdated
@@ -97,7 +97,7 @@ check_toolchain()
EMACS=""
else
emacs_version=$($EMACS --version 2>/dev/null | head -n 1)
if echo $emacs_version | grep -Eq 'GNU Emacs 2[6789]'; then
if echo $emacs_version | grep -Eq 'GNU Emacs (2[6789]|30)'; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make this future-proof - something like 3[0-9] instead of 30

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the intent to just support any version newer than 26? Maybe in that case we should just parse the version properly?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, basically. Parsing it properly is fine as well :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried my take at doing a proper(ish) version check.

configure Outdated
Comment on lines 99 to 101
emacs_version=$($EMACS --version 2>/dev/null | head -n 1)
if echo $emacs_version | grep -Eq 'GNU Emacs 2[6789]'; then
# extract major version from "GNU Emacs [major].[minor]"
emacs_version=$($EMACS --version 2>/dev/null | head -n 1 | cut -d " " -f 3)
emacs_major=$(echo "$emacs_version" | cut -d "." -f 1)
Copy link

@jian-lin jian-lin Mar 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can get Emacs major version by printing emacs-major-version.

> emacs -Q --batch --eval='(message "%d" emacs-major-version)'
30

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied that, and also cleaned up the errors a bit.

Extract the major version and compare it as a number to avoid
the messy regexes.

Signed-off-by: K900 <[email protected]>
@K900 K900 requested a review from tohojo March 4, 2025 05:48
Copy link
Member

@tohojo tohojo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@tohojo tohojo merged commit 9cd2ed6 into xdp-project:main Mar 4, 2025
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants