From 6e60841b092c93dd0eeba95284240b2107dff031 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20A=2E=20Gomes?= Date: Fri, 8 Oct 2021 19:33:36 +0300 Subject: [PATCH 33/76] Deprecate org-first-headline-recenter. --- lisp/org-compat.el | 2 ++ lisp/org.el | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/org-compat.el b/lisp/org-compat.el index c5701d367..1e68d0ac1 100644 --- a/lisp/org-compat.el +++ b/lisp/org-compat.el @@ -372,6 +372,8 @@ Counting starts at 1." 'org-find-exact-heading-in-buffer "9.5") (define-obsolete-function-alias 'org-find-top-headline 'org-find-top-heading "9.5") +(define-obsolete-function-alias 'org-first-headline-recenter + 'org-first-heading-recenter "9.5") (defun org-in-fixed-width-region-p () "Non-nil if point in a fixed-width region." diff --git a/lisp/org.el b/lisp/org.el index 8a70013cb..6ff55c6fc 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -1830,7 +1830,7 @@ doesn't specify any upper case character." (const :tag "Case-insensitive" t) (const :tag "Case-insensitive for lower case searches only" smart))) -(defcustom org-occur-hook '(org-first-headline-recenter) +(defcustom org-occur-hook '(org-first-heading-recenter) "Hook that is run after `org-occur' has constructed a sparse tree. This can be used to recenter the window to show as much of the structure as possible." @@ -6041,7 +6041,7 @@ open and agenda-wise Org files." (pos-visible-in-window-p (save-excursion (org-end-of-subtree t) (point)))) -(defun org-first-headline-recenter () +(defun org-first-heading-recenter () "Move cursor to the first heading and recenter the heading." (let ((window (get-buffer-window))) (when window -- 2.33.0