[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/org-drill 4daff57b81 161/251: Replace dynamically scoped e
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/org-drill 4daff57b81 161/251: Replace dynamically scoped end-pos |
Date: |
Mon, 17 Jan 2022 18:59:12 -0500 (EST) |
branch: elpa/org-drill
commit 4daff57b8105fafd61fb3d84d40616db0fc6f73f
Author: Phillip Lord <phillip.lord@russet.org.uk>
Commit: Phillip Lord <phillip.lord@russet.org.uk>
Replace dynamically scoped end-pos
---
org-drill.el | 23 +++++++++++------------
1 file changed, 11 insertions(+), 12 deletions(-)
diff --git a/org-drill.el b/org-drill.el
index fdefe8f54a..0f815faa34 100644
--- a/org-drill.el
+++ b/org-drill.el
@@ -641,7 +641,8 @@ revealing the contents of the drilled item.
This variable is useful for card types that compute their answers
-- for example, a card type that asks the student to translate a
-random number to another language."))
+random number to another language.")
+ (end-pos :initform nil))
:documentation "An org-drill session object carries data about
the current state of a particular org-drill session." )
@@ -2662,10 +2663,10 @@ RESUMING-P is true if we are resuming a suspended drill
session."
(cond
((null result)
(message "Quit")
- (setq end-pos :quit)
+ (setf (oref session end-pos) :quit)
(cl-return-from org-drill-entries nil))
((eql result 'edit)
- (setq end-pos (point-marker))
+ (setf (oref session end-pos) (point-marker))
(cl-return-from org-drill-entries nil))
((eql result 'skip)
(setf (oref session current-item) nil)
@@ -3009,7 +3010,6 @@ work correctly with older versions of org mode. Your org
mode version (%s) appea
org-drill-last-session
(setq org-drill-last-session
(org-drill-session))))
- (end-pos nil)
(cnt 0))
(cl-block org-drill
(unless resume-p
@@ -3054,13 +3054,13 @@ work correctly with older versions of org mode. Your
org mode version (%s) appea
(message nil)
)))
(progn
- (unless end-pos
+ (unless (oref session end-pos)
(setf (oref session cram-mode) nil)
(org-drill-free-markers session (oref session done-entries))))))
(cond
- (end-pos
- (when (markerp end-pos)
- (org-drill-goto-entry end-pos)
+ ((oref session end-pos)
+ (when (markerp (oref session end-pos))
+ (org-drill-goto-entry (oref session end-pos))
(org-reveal)
(org-show-entry))
(let ((keystr (org-drill-command-keybinding-to-string
'org-drill-resume)))
@@ -3773,10 +3773,9 @@ Returns a list of strings."
(let* ((session org-drill-last-session)
(pending (org-drill-pending-entry-count session)))
(unless (cl-plusp pending)
- (let ((end-pos nil))
- (org-drill-map-entries
- (apply-partially 'org-drill-map-entry-function session)
- nil nil)))
+ (org-drill-map-entries
+ (apply-partially 'org-drill-map-entry-function session)
+ nil nil))
;; if the overdue entries are not ones we have just created
(if (> (org-drill-pending-entry-count session) org-drill-leitner-completed)
;; we should have scanned previously if we need to
- [nongnu] elpa/org-drill eb370c7405 077/251: - Moved a line with side effects to earlier in the file, possibly fixing an, (continued)
- [nongnu] elpa/org-drill eb370c7405 077/251: - Moved a line with side effects to earlier in the file, possibly fixing an, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 0184220926 150/251: Replace drill-typed-answer, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill b7b295c80b 122/251: Update gitignore, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 2832be1ad4 153/251: Replace more non-namespaced commands, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill b0ee414c16 177/251: Fix call to removed variable, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 90d777bd55 183/251: Fix more byte compile errors, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 3c356dfc5a 179/251: Fix robot testing and reference to drill-typed-answer, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 8c36f488e2 162/251: Spanish card fixes and full test set, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 29b4faa174 190/251: Fix compat call, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill fdbbccad8c 218/251: Merge branch 'patch-2' into 'master', ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 4daff57b81 161/251: Replace dynamically scoped end-pos,
ELPA Syncer <=
- [nongnu] elpa/org-drill 04283a8a6c 228/251: Remove obsolete org-drill-optimal-factor-matrix, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill b61865f701 219/251: Merge branch 'patch-3' into 'master', ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 44f66af8f7 230/251: fix argument passed to now obsoleted org-toggle-latex-fragment, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill a51c152bdb 227/251: Update documentation, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill bf8fe812d4 251/251: Update docker images, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 3f6435d39a 085/251: Added tag 2.4.7 for changeset 552ec7292154, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill f9da5ee130 232/251: Do not remove overlays after finishing card, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 4d5b9e60c8 239/251: Remove interactive from org-drill-entry-f, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill fecfc9c9a9 206/251: Add documentation, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill ff9bb0a435 138/251: Replace warned-about-id-creation, ELPA Syncer, 2022/01/17