emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: Org-mode <emacs-orgmode@gnu.org>
Subject: [PATCH] Remove Emacs 21 compat code for bookmark-after-jump-hook
Date: Tue, 2 Feb 2021 09:44:04 -0600	[thread overview]
Message-ID: <CADwFkmksubSXuVxO+9oF1bVsgXkXay=9-cYj7YpA9-sJodcETg@mail.gmail.com> (raw)

[-- 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


             reply	other threads:[~2021-02-02 16:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-02 15:44 Stefan Kangas [this message]
2021-02-03  6:29 ` Kyle Meyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADwFkmksubSXuVxO+9oF1bVsgXkXay=9-cYj7YpA9-sJodcETg@mail.gmail.com' \
    --to=stefan@marxist.se \
    --cc=emacs-orgmode@gnu.org \
    --subject='Re: [PATCH] Remove Emacs 21 compat code for bookmark-after-jump-hook' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this 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).