1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-12-24 10:38:41 +00:00

Remove compile-time dependency on doc-view.el

* org-docview.el (org-docview-store-link): Use expanded macro to get
current page.
(doc-view-goto-page, image-mode-window-get): Declare functions for
byte compiler.

doc-view mode is not available in Emacs22.  We need to use the
expanded form of the macro `doc-view-current-page' at compile-time.
This commit is contained in:
David Maus 2010-08-29 21:29:16 +02:00
parent f6c09411a7
commit 4b7c9136a7

View File

@ -45,7 +45,10 @@
(require 'org)
(eval-when-compile (require 'doc-view)) ; doc-view-current-page macro
(declare-function doc-view-goto-page "ext:doc-view" (page))
(declare-function image-mode-window-get "ext:image-mode"
(prop &optional winprops))
(autoload 'doc-view-goto-page "doc-view")
@ -66,7 +69,7 @@
(when (eq major-mode 'doc-view-mode)
;; This buffer is in doc-view-mode
(let* ((path buffer-file-name)
(page (doc-view-current-page))
(page (image-mode-window-get 'page))
(link (concat "docview:" path "::" (number-to-string page)))
(description ""))
(org-store-link-props