-
Notifications
You must be signed in to change notification settings - Fork 161
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
Conversation
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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
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) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
No description provided.