Merge branch 'bugfix'

This commit is contained in:
Ihor Radchenko 2024-10-12 10:49:43 +02:00
commit 76cd7e995a
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 6 additions and 2 deletions

View File

@ -20653,11 +20653,15 @@ strictly within a source block, use appropriate comment syntax."
end)))
;; Translate region boundaries for the Org buffer to the source
;; buffer.
(let ((offset (- end beg)))
(let (src-end)
(save-excursion
(goto-char end)
(org-babel-do-in-edit-buffer
(setq src-end (point))))
(save-excursion
(goto-char beg)
(org-babel-do-in-edit-buffer
(comment-or-uncomment-region (point) (+ offset (point))))))
(comment-or-uncomment-region (point) src-end))))
(save-restriction
;; Restrict region
(narrow-to-region (save-excursion (goto-char beg)