branch: elpa/beancount
commit 519bfd868f206ed2fc538a57cdb631c4fec3c93e
Merge: e32e44e8d2 94bae42833
Author: blais <[email protected]>
Commit: blais <[email protected]>
(Merge remote-tracking branch 'github/main')
---
.github/workflows/tests.yaml | 2 +-
beancount.el | 16 +++++++++++++++-
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml
index 0d6eb8dc9c..4a16c8781e 100644
--- a/.github/workflows/tests.yaml
+++ b/.github/workflows/tests.yaml
@@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- emacs: ['26.1', '26.2', '26.3', '27.1', '27.2']
+ emacs: ['26.1', '26.2', '26.3', '27.1', '27.2', '28.1', '28.2']
steps:
- uses: purcell/setup-emacs@master
with:
diff --git a/beancount.el b/beancount.el
index c3f5614ec4..b9e5f952df 100644
--- a/beancount.el
+++ b/beancount.el
@@ -344,7 +344,7 @@ from the open directive for the relevant account."
st))
;;;###autoload
-(define-derived-mode beancount-mode fundamental-mode "Beancount"
+(define-derived-mode beancount-mode prog-mode "Beancount"
"A mode for Beancount files.
\\{beancount-mode-map}"
@@ -425,6 +425,20 @@ With an argument move to the next non cleared transaction."
(setq done t)))
(if (not done) (goto-char (point-max)))))
+(defun beancount-goto-previous-transaction (&optional arg)
+ "Move to the previous transaction.
+With an argument move to the previous non cleared transaction."
+ (interactive "P")
+ (beancount-goto-transaction-begin)
+ (let ((done nil))
+ (while (and (not done)
+ (re-search-backward beancount-transaction-regexp nil t))
+ (if (and arg (string-equal (match-string 2) "*"))
+ (goto-char (match-beginning 0))
+ (goto-char (match-beginning 0))
+ (setq done t)))
+ (if (not done) (goto-char (point-min)))))
+
(defun beancount-find-transaction-extents (p)
(save-excursion
(goto-char p)