[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 9e9669a271: Merge branch 'bugfix'
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org 9e9669a271: Merge branch 'bugfix' |
Date: |
Fri, 10 Feb 2023 06:58:01 -0500 (EST) |
branch: externals/org
commit 9e9669a271a6eb6b9d12213bf881fbe275e6a342
Merge: 666a61bcc8 af1bb1b06a
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>
Merge branch 'bugfix'
---
lisp/org-compat.el | 12 +++++++-----
lisp/org-footnote.el | 2 +-
lisp/org.el | 8 ++++----
3 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/lisp/org-compat.el b/lisp/org-compat.el
index d88367fe81..fadb51df62 100644
--- a/lisp/org-compat.el
+++ b/lisp/org-compat.el
@@ -196,11 +196,13 @@ removed."
;;; Emacs < 27.1 compatibility
-(unless (fboundp 'combine-change-calls)
- ;; A stub when `combine-change-calls' was not yet there.
- (defmacro combine-change-calls (_beg _end &rest body)
- (declare (debug (form form def-body)) (indent 2))
- `(progn ,@body)))
+(if (version< emacs-version "29")
+ ;; A stub when `combine-change-calls' was not yet there or had
+ ;; critical bugs (see Emacs bug#60467).
+ (defmacro org-combine-change-calls (_beg _end &rest body)
+ (declare (debug (form form def-body)) (indent 2))
+ `(progn ,@body))
+ (defalias 'org-combine-change-calls 'combine-change-calls))
(if (version< emacs-version "27.1")
(defsubst org-replace-buffer-contents (source &optional _max-secs
_max-costs)
diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el
index c83026d1d8..6bdd0b32fe 100644
--- a/lisp/org-footnote.el
+++ b/lisp/org-footnote.el
@@ -853,7 +853,7 @@ to `org-footnote-section'. Inline definitions are ignored."
;; Insert un-referenced footnote definitions at the end.
;; Combine all insertions into one to create a single cache
;; update call.
- (combine-change-calls (point) (point)
+ (org-combine-change-calls (point) (point)
(pcase-dolist (`(,label . ,definition) definitions)
(unless (member label inserted)
(insert "\n" definition "\n"))))))))))
diff --git a/lisp/org.el b/lisp/org.el
index 407af72519..4d12084d94 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -6562,7 +6562,7 @@ See also `org-promote'."
(interactive)
(save-excursion
(org-back-to-heading t)
- (combine-change-calls (point) (save-excursion (org-end-of-subtree t))
+ (org-combine-change-calls (point) (save-excursion (org-end-of-subtree t))
(org-with-limited-levels (org-map-tree 'org-promote))))
(org-fix-position-after-promote))
@@ -6572,7 +6572,7 @@ See `org-demote' and `org-promote'."
(interactive)
(save-excursion
(org-back-to-heading t)
- (combine-change-calls (point) (save-excursion (org-end-of-subtree t))
+ (org-combine-change-calls (point) (save-excursion (org-end-of-subtree t))
(org-with-limited-levels (org-map-tree 'org-demote))))
(org-fix-position-after-promote))
@@ -7146,7 +7146,7 @@ When REMOVE is non-nil, remove the subtree from the
clipboard."
(setq beg (point))
;; Avoid re-parsing cache elements when i.e. level 1 heading
;; is inserted and then promoted.
- (combine-change-calls beg beg
+ (org-combine-change-calls beg beg
(when (fboundp 'org-id-paste-tracker) (org-id-paste-tracker txt))
(insert txt)
(unless (string-suffix-p "\n" txt) (insert "\n"))
@@ -18911,7 +18911,7 @@ Alignment is done according to `org-property-format',
which see."
(when (save-excursion
(beginning-of-line)
(looking-at org-property-re))
- (combine-change-calls (match-beginning 0) (match-end 0)
+ (org-combine-change-calls (match-beginning 0) (match-end 0)
(let ((newtext (concat (match-string 4)
(org-trim
(format org-property-format (match-string 1)
(match-string 3))))))