From 59b3195cbb88d84b32e947034bc5454d0bbd09eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20A=2E=20Gomes?= Date: Fri, 8 Oct 2021 20:00:59 +0300 Subject: [PATCH 44/76] Deprecate org-indent-modified-headline-flag. --- lisp/org-compat.el | 2 ++ lisp/org-indent.el | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lisp/org-compat.el b/lisp/org-compat.el index cdf1050a5..6038930fa 100644 --- a/lisp/org-compat.el +++ b/lisp/org-compat.el @@ -388,6 +388,8 @@ Counting starts at 1." 'org-html-self-link-headings "9.5") (define-obsolete-function-alias 'org-icalendar-blocked-headline-p 'org-icalendar-blocked-heading-p "9.5") +(define-obsolete-variable-alias 'org-indent-modified-headline-flag + 'org-indent-modified-heading-flag "9.5") (define-obsolete-face-alias 'org-headline-done 'org-heading-done "9.5") (define-obsolete-face-alias 'org-headline-todo 'org-heading-todo "9.5") diff --git a/lisp/org-indent.el b/lisp/org-indent.el index 2768fffeb..561870717 100644 --- a/lisp/org-indent.el +++ b/lisp/org-indent.el @@ -71,7 +71,7 @@ Delay used when the buffer to initialize isn't current.") (defvar org-indent--initial-marker nil "Position of initialization before interrupt. This is used locally in each buffer being initialized.") -(defvar org-indent-modified-headline-flag nil +(defvar org-indent-modified-heading-flag nil "Non-nil means the last deletion operated on a heading. It is modified by `org-indent-notify-modified-headline'.") @@ -376,7 +376,7 @@ stopped." (looking-at-p org-property-re)))))))))))) (defun org-indent-notify-modified-headline (beg end) - "Set `org-indent-modified-headline-flag' depending on context. + "Set `org-indent-modified-heading-flag' depending on context. BEG and END are the positions of the beginning and end of the range of deleted text. @@ -385,7 +385,7 @@ This function is meant to be called by `before-change-functions'. Flag will be non-nil if command is going to modify or delete an headline." (when org-indent-mode - (setq org-indent-modified-headline-flag + (setq org-indent-modified-heading-flag (org-with-wide-buffer (goto-char beg) (save-match-data @@ -404,7 +404,7 @@ This function is meant to be called by `after-change-functions'." ;; If a heading was modified or inserted, set properties until ;; next heading. (org-with-wide-buffer - (if (or org-indent-modified-headline-flag + (if (or org-indent-modified-heading-flag (save-excursion (goto-char beg) (beginning-of-line) @@ -414,7 +414,7 @@ This function is meant to be called by `after-change-functions'." (goto-char end) (org-with-limited-levels (outline-next-heading)) (point)))) - (setq org-indent-modified-headline-flag nil) + (setq org-indent-modified-heading-flag nil) (org-indent-add-properties beg end)) ;; Otherwise, only set properties on modified area. (org-indent-add-properties beg end)))))) -- 2.33.0