emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/org-journal 4bbe643452 4/6: Add comment describing the use


From: ELPA Syncer
Subject: [nongnu] elpa/org-journal 4bbe643452 4/6: Add comment describing the use of let to override major-mode value
Date: Fri, 13 Oct 2023 10:01:45 -0400 (EDT)

branch: elpa/org-journal
commit 4bbe643452a7de2aa3770411c3ad7d1907c4fec3
Author: Dylan Cascio <code@drfiresign.com>
Commit: Dylan Cascio <code@drfiresign.com>

    Add comment describing the use of let to override major-mode value
---
 org-journal.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/org-journal.el b/org-journal.el
index 207b420990..47383cac1c 100644
--- a/org-journal.el
+++ b/org-journal.el
@@ -467,6 +467,8 @@ before it will be deposed."
      (with-current-buffer buf
        (unless buffer-exists
          (insert-file-contents ,file))
+       ;; Use `let' to change the local value of `major-mode' and
+       ;; avoid `org-mode' directly and incurring a performance penalty.
        (setq result (let ((major-mode 'org-mode))
                       (progn ,@body))))
      (unless buffer-exists



reply via email to

[Prev in Thread] Current Thread [Next in Thread]