diff options
Diffstat (limited to 'lisp/org/ol-eww.el')
-rw-r--r-- | lisp/org/ol-eww.el | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/lisp/org/ol-eww.el b/lisp/org/ol-eww.el index d1bb5195107..c3992fa0767 100644 --- a/lisp/org/ol-eww.el +++ b/lisp/org/ol-eww.el @@ -4,7 +4,7 @@ ;; Author: Marco Wahl <marcowahlsoft>a<gmailcom> ;; Keywords: link, eww -;; Homepage: https://orgmode.org +;; URL: https://orgmode.org ;; This file is part of GNU Emacs. @@ -44,14 +44,14 @@ ;;; Code: + +(require 'org-macs) +(org-assert-version) + (require 'ol) (require 'cl-lib) (require 'eww) -;; For Emacsen < 25. -(defvar eww-current-title) -(defvar eww-current-url) - ;; Store Org link in Eww mode buffer (org-link-set-parameters "eww" @@ -67,14 +67,10 @@ (when (eq major-mode 'eww-mode) (org-link-store-props :type "eww" - :link (if (< emacs-major-version 25) - eww-current-url - (eww-current-url)) + :link (eww-current-url) :url (url-view-url t) - :description (if (< emacs-major-version 25) - (or eww-current-title eww-current-url) - (or (plist-get eww-data :title) - (eww-current-url)))))) + :description (or (plist-get eww-data :title) + (eww-current-url))))) ;; Some auxiliary functions concerning links in Eww buffers |