Bug 2545926 - /usr/share/emacs/site-lisp/site-start.d/mercurial-site-start.el needs a lexical binding tag.
Summary: /usr/share/emacs/site-lisp/site-start.d/mercurial-site-start.el needs a lexic...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mercurial
Version: 45
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Mads Kiilerich
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 2545603
TreeView+ depends on / blocked
 
Reported: 2026-10-05 14:40 UTC by Stephen Degler
Modified: 2026-11-26 23:02 UTC (History)
6 users (show)

Fixed In Version: mercurial-7.2.4-2.fc46
Clone Of:
Environment:
Last Closed: 2026-11-26 23:02:52 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Stephen Degler 2026-10-05 14:40:51 UTC
Without the lexical tag, a warning gets generated.


Reproducible: Always

Steps to Reproduce:
1. Install emacs
2. Install mercurial
3. Start emacs
Actual Results:
Emacs *Warnings* buffer complains about the absence of the lexical binding tag on this file:
/usr/share/emacs/site-lisp/site-start.d/mercurial-site-start.el

Expected Results:
emacs start up normally.


Additional Information:
elisp-enable-lexical-binding will fix the file if emacs has permissions.

Comment 1 Mads Kiilerich 2026-10-05 18:21:56 UTC
Thanks.

Are you an Emacs lisp expert? The Mercurial emacs files seem to have other problems too ...

Comment 2 Stephen Degler 2026-10-05 19:32:24 UTC
I'm not an expert, I just wanted to suppress the Warning message.

What other problems are you aware of?
Is there a maintainer for mercurial.el?   I do see the author name in mecurial.el.
Maybe it would be better to switch to vc-hgcmd there's an official package in gnu and melpa archives.

Comment 3 Paul Eggert 2026-11-05 17:38:15 UTC
Because mercurial.el contains no bindings the patch is simple: insert the following line at the start of /usr/share/emacs/site-lisp/site-start.d/mercurial-site-start.el:

;; -*- lexical-binding: t; -*-

This fixes the reported bug. It may not fix other problems with the mercurial package, but one bugfix at a time.

Comment 4 Thomas Schneider 2026-11-26 16:52:19 UTC
It might be sensible to just drop installing it altogether.  Debian has done so in 2010: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=557211

In fact, this file has not been touched since 2012 and is basically guaranteed to be outdated: https://foss.heptapod.net/mercurial/mercurial-devel/-/commits/branch/default/contrib/mercurial.el?ref_type=heads

Comment 5 Fedora Update System 2026-11-26 22:59:11 UTC
FEDORA-2026-0d5f051419 (mercurial-7.2.4-2.fc46) has been submitted as an update to Fedora 46.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-0d5f051419

Comment 6 Fedora Update System 2026-11-26 23:02:52 UTC
FEDORA-2026-0d5f051419 (mercurial-7.2.4-2.fc46) has been pushed to the Fedora 46 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.