[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 1cafe3e8e4 3/3: org-indent-line: Do not err in src
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org 1cafe3e8e4 3/3: org-indent-line: Do not err in src blocks when there is no language mode |
Date: |
Thu, 2 May 2024 12:58:46 -0400 (EDT) |
branch: externals/org
commit 1cafe3e8e496637b7ae0f6ed0dee22891b39627f
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>
org-indent-line: Do not err in src blocks when there is no language mode
* lisp/org.el (org-indent-line): When attempting to indent as in major
mode, ignore any errors, like errors arising when the major mode is
not available.
---
lisp/org.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lisp/org.el b/lisp/org.el
index 2eb04d267e..20879685c2 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -19696,7 +19696,8 @@ Also align node properties according to
`org-property-format'."
(org-with-point-at (org-element-property :begin element)
(+ (org-current-text-indentation)
org-edit-src-content-indentation)))))
- (org-babel-do-in-edit-buffer (funcall indent-line-function))
+ (ignore-errors ; do not err when there is no proper major mode
+ (org-babel-do-in-edit-buffer (funcall indent-line-function)))
(when (and block-content-ind (looking-at-p "^$"))
(indent-line-to block-content-ind))))
(t