branch: elpa/beancount
commit 3f5e4fcef55698413e98722e6647180b0f409d4b
Author: Jonathan Tomer <jkto...@google.com>
Commit: Jonathan Tomer <jkto...@google.com>

    beancount.el: kill more comment-related Org variables
    
    On at least my emacs (26.1), comment-insert-comment-function,
    comment-use-syntax, and comment-start-skip are all overridden by org-mode
    in a way that is not useful.
---
 beancount.el | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/beancount.el b/beancount.el
index 04abe799c3..f561655e79 100644
--- a/beancount.el
+++ b/beancount.el
@@ -181,10 +181,14 @@ is great for sectioning large files with many 
transactions.
   ;; Default to `;;' in comment-region.
   (set (make-local-variable 'comment-add) 1)
 
-  ;; Org-mode sets both of these to `org-comment-or-uncomment-region',
-  ;; which doesn't know about our ";" comments.
+  ;; Org-mode sets up its own comment handling because of its unusual comment
+  ;; syntax. Beancount doesn't use org's comments, though, so revert to the
+  ;; normal Emacs comment handlers.
   (kill-local-variable 'comment-region-function)
   (kill-local-variable 'uncomment-region-function)
+  (kill-local-variable 'comment-insert-comment-function)
+  (kill-local-variable 'comment-use-syntax)
+  (kill-local-variable 'comment-start-skip)
 
   ;; No tabs by default.
   (set (make-local-variable 'indent-tabs-mode) nil)

Reply via email to