From 7b681816c13c02689a96e6a892dfbf4bde51a2fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20A=2E=20Gomes?= Date: Fri, 8 Oct 2021 19:32:24 +0300 Subject: [PATCH 32/76] Deprecate org-find-top-headline. --- lisp/org-agenda.el | 6 +++--- lisp/org-compat.el | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index d26b254a0..f935dbc01 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -7686,7 +7686,7 @@ filter." 'category)) (t (error "No category at point")))))) -(defun org-find-top-headline (&optional pos) +(defun org-find-top-heading (&optional pos) "Find the topmost parent heading and return it. POS when non-nil is the marker or buffer position to start the search from." @@ -7711,7 +7711,7 @@ all lines of the category at point." (setq org-agenda-filtered-by-top-heading nil org-agenda-top-heading-filter nil) (org-agenda-filter-show-all-top-filter)) - (let ((toph (org-find-top-headline (org-get-at-bol 'org-hd-marker)))) + (let ((toph (org-find-top-heading (org-get-at-bol 'org-hd-marker)))) (if toph (org-agenda-filter-top-heading-apply toph strip) (error "No top-level heading at point"))))) @@ -8237,7 +8237,7 @@ grouptags." (goto-char (point-min)) (while (not (eobp)) (let* ((pos (org-get-at-bol 'org-hd-marker)) - (top-heading (and pos (org-find-top-headline pos)))) + (top-heading (and pos (org-find-top-heading pos)))) (when (and top-heading (funcall (if negative 'identity 'not) (string= heading top-heading))) (org-agenda-filter-hide-line 'top-headline))) diff --git a/lisp/org-compat.el b/lisp/org-compat.el index c9b4511f5..c5701d367 100644 --- a/lisp/org-compat.el +++ b/lisp/org-compat.el @@ -370,6 +370,8 @@ Counting starts at 1." 'org-export-numbered-heading-p "9.5") (define-obsolete-function-alias 'org-find-exact-headline-in-buffer 'org-find-exact-heading-in-buffer "9.5") +(define-obsolete-function-alias 'org-find-top-headline + 'org-find-top-heading "9.5") (defun org-in-fixed-width-region-p () "Non-nil if point in a fixed-width region." -- 2.33.0