emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bzg@gnu.org>
To: emacs-orgmode@gnu.org
Subject: [PATCH] Remove warning about org-clock-save.el lacking lexical-binding directive
Date: Sun, 05 May 2024 18:19:46 +0200	[thread overview]
Message-ID: <87seywqli5.fsf@gnu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 296 bytes --]

Recent versions of Emacs complain about org-clock-save.el:

  ⛔ Warning (lexical-binding): File
  /home/bzg/.emacs.d/org-clock-save.el lacks `lexical-binding'
  directive on its first line

The attached patch should fix this.  Is it okay to add it to bugfix?

Thanks,

-- 
 Bastien

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: org-clock.el.patch --]
[-- Type: text/x-diff, Size: 596 bytes --]

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 67feb6b35..806bc02de 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -3233,7 +3233,7 @@ The details of what will be saved are regulated by the variable
 		 org-clock-has-been-used
 		 (not (file-exists-p org-clock-persist-file))))
     (with-temp-file org-clock-persist-file
-      (insert (format ";; %s - %s at %s\n"
+      (insert (format ";; %s - %s at %s -*- lexical-binding: t; -*-\n"
 		      (file-name-nondirectory org-clock-persist-file)
 		      (system-name)
 		      (format-time-string (org-time-stamp-format t))))

             reply	other threads:[~2024-05-05 16:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-05 16:19 Bastien [this message]
2024-05-05 17:32 ` [PATCH] Remove warning about org-clock-save.el lacking lexical-binding directive Ihor Radchenko
2024-05-06  8:10   ` Bastien Guerry
2024-05-07 11:00   ` Ihor Radchenko
2024-05-07 11:13     ` Bastien Guerry

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.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87seywqli5.fsf@gnu.org \
    --to=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    /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/org-mode.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).