branch: elpa/beancount
commit aec114642d750cbae89dfd736a9aeb355e597108
Merge: 4cae6eebb8 f27ea3084d
Author: Martin Blais <[email protected]>
Commit: Martin Blais <[email protected]>
Automated merge with ssh://bitbucket.org/blais/beancount
---
etc/emacsrc | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/etc/emacsrc b/etc/emacsrc
index 4773a13d4c..c8076fea44 100644
--- a/etc/emacsrc
+++ b/etc/emacsrc
@@ -33,4 +33,24 @@
(recenter)
))
-(define-key* beancount-mode-map [(control c)(F)] 'beancount-format-file)
+;(define-key* beancount-mode-map [(control c)(F)] 'beancount-format-file)
+
+;; Make sure we don't accidentally pick up ;;; as headers. Use org section
headers only.
+(setq beancount-outline-regexp "\\(\\*+\\)")
+
+;; Automatically enable outline-mode.
+(add-hook 'beancount-mode-hook #'outline-minor-mode)
+
+;; Add movement between sections.
+(define-key* beancount-mode-map [(control c)(control n)]
#'outline-next-visible-heading)
+(define-key* beancount-mode-map [(control c)(control p)]
#'outline-previous-visible-heading)
+
+;; Disable auto-indent.
+
+(defun disable-electric-indent ()
+ (setq-local electric-indent-chars nil))
+(add-hook 'beancount-mode-hook #'disable-electric-indent)
+
+;; `beancount-number-alignment-column`. Setting it to 0 will cause the
+;; alignment column to be determined from file content. Postings in
+;; transactions are indented with `beancount-transaction-indent` spaces.