[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 1014296344 1/2: * lisp/org.el (org-comment-dwim): R
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org 1014296344 1/2: * lisp/org.el (org-comment-dwim): Rely on `org-comment-or-uncomment-region' |
Date: |
Mon, 6 Nov 2023 06:58:33 -0500 (EST) |
branch: externals/org
commit 1014296344a75fa08e0a8814e4fbbd767e7eba4c
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>
* lisp/org.el (org-comment-dwim): Rely on `org-comment-or-uncomment-region'
Remove special case for src block and instead use the Org's
`org-comment-or-uncomment-region' used as `comment-region-function'.
`org-comment-or-uncomment-region' already supports commenting inside
src blocks.
Fixes
https://orgmode.org/list/d8dc0cca-00d9-4349-a123-6ea6776b00cc@vodafonemail.de
---
lisp/org.el | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/lisp/org.el b/lisp/org.el
index fbaf655d89..4eb6ad0ee6 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -20136,12 +20136,10 @@ strictly within a source block, use appropriate
comment syntax."
(defun org-comment-dwim (_arg)
"Call the comment command you mean.
Call `org-toggle-comment' if on a heading, otherwise call
-`comment-dwim', within a source edit buffer if needed."
+`comment-dwim'."
(interactive "*P")
(cond ((org-at-heading-p)
(call-interactively #'org-toggle-comment))
- ((org-in-src-block-p)
- (org-babel-do-in-edit-buffer (call-interactively #'comment-dwim)))
(t (call-interactively #'comment-dwim))))