emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Remove Emacs 21 compat code for bookmark-after-jump-hook
@ 2021-02-02 15:44 Stefan Kangas
  2021-02-03  6:29 ` Kyle Meyer
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Kangas @ 2021-02-02 15:44 UTC (permalink / raw)
  To: Org-mode

[-- Attachment #1: Type: text/plain, Size: 235 bytes --]

The attached patch removes support for missing bookmark-after-jump-hook,
which was introduced in Emacs 22.  This can be dropped unless there is a
need for this feature to support versions earlier than Emacs 22
(released in June 2007).

[-- Attachment #2: 0001-Remove-Emacs-21-compat-code-for-bookmark-after-jump-.patch --]
[-- Type: text/x-diff, Size: 1143 bytes --]

From 89947f5152afecb276010fa52fa025a2bb63b66f Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefan@marxist.se>
Date: Tue, 2 Feb 2021 16:35:48 +0100
Subject: [PATCH] Remove Emacs 21 compat code for bookmark-after-jump-hook

* lisp/org-compat.el (bookmark-after-jump-hook): Remove Emacs 21
compat code.
---
 lisp/org-compat.el | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/lisp/org-compat.el b/lisp/org-compat.el
index 88bf21b6a..8cbf33137 100644
--- a/lisp/org-compat.el
+++ b/lisp/org-compat.el
@@ -1104,14 +1104,7 @@ ELEMENT is the element at point."
        (org-show-context 'bookmark-jump)))
 
 ;; Make `bookmark-jump' shows the jump location if it was hidden.
-(eval-after-load 'bookmark
-  '(if (boundp 'bookmark-after-jump-hook)
-       ;; We can use the hook
-       (add-hook 'bookmark-after-jump-hook 'org-bookmark-jump-unhide)
-     ;; Hook not available, use advice
-     (defadvice bookmark-jump (after org-make-visible activate)
-       "Make the position visible."
-       (org-bookmark-jump-unhide))))
+(add-hook 'bookmark-after-jump-hook 'org-bookmark-jump-unhide)
 
 ;;;; Calendar
 
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-02-03  6:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-02 15:44 [PATCH] Remove Emacs 21 compat code for bookmark-after-jump-hook Stefan Kangas
2021-02-03  6:29 ` Kyle Meyer

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).