Bug 2545926

Summary: /usr/share/emacs/site-lisp/site-start.d/mercurial-site-start.el needs a lexical binding tag.
Product: [Fedora] Fedora Reporter: Stephen Degler <stephen>
Component: mercurialAssignee: Mads Kiilerich <mads>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 45CC: eggert, fedoraproject.org, mads, ndbecker2, opohorel, redhat-bz
Target Milestone: ---Keywords: Bugfix
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: mercurial-7.2.4-2.fc46 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2026-11-26 23:02:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2545603    

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.