emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/doc-view.el,v


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/doc-view.el,v
Date: Wed, 25 Jun 2008 16:51:35 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        08/06/25 16:51:33

Index: lisp/doc-view.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/doc-view.el,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -b -r1.71 -r1.72
--- lisp/doc-view.el    12 Jun 2008 03:56:15 -0000      1.71
+++ lisp/doc-view.el    25 Jun 2008 16:51:32 -0000      1.72
@@ -1187,29 +1187,28 @@
 
 ;;;; Bookmark integration
 
-(declare-function bookmark-buffer-file-name "bookmark" ())
+(declare-function bookmark-make-record-default "bookmark" ())
 (declare-function bookmark-prop-get "bookmark" (bookmark prop))
+(declare-function bookmark-default-handler "bookmark" (bmk))
 
 (defun doc-view-bookmark-make-record ()
-  `((filename . ,(bookmark-buffer-file-name))
-    (page     . ,(doc-view-current-page))
-    (handler  . doc-view-bookmark-jump)))
+  (nconc (bookmark-make-record-default)
+         `((page     . ,(doc-view-current-page))
+           (handler  . doc-view-bookmark-jump))))
 
 
 ;;;###autoload
 (defun doc-view-bookmark-jump (bmk)
   ;; This implements the `handler' function interface for record type
   ;; returned by `doc-view-bookmark-make-record', which see.
-  (let ((filename (bookmark-prop-get bmk 'filename))
-        (page (bookmark-prop-get bmk 'page)))
-    (with-current-buffer (find-file-noselect filename)
+  (prog1 (bookmark-default-handler bmk)
+    (let ((page (bookmark-prop-get bmk 'page)))
       (when (not (eq major-mode 'doc-view-mode))
        (doc-view-toggle-display))
       (with-selected-window
           (or (get-buffer-window (current-buffer) 0)
               (selected-window))
-        (doc-view-goto-page page))
-      `((buffer ,(current-buffer)) (position ,1)))))
+        (doc-view-goto-page page)))))
 
 
 (provide 'doc-view)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]