[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/image-mode.el,v
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/image-mode.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/image-mode.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/image-mode.el,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -b -r1.47 -r1.48
--- lisp/image-mode.el 12 Jun 2008 03:56:16 -0000 1.47
+++ lisp/image-mode.el 25 Jun 2008 16:51:33 -0000 1.48
@@ -467,41 +467,24 @@
(message "Repeat this command to go back to displaying the file as
text")))))
;;; Support for bookmark.el
-
-(defun image-bookmark-make-record (annotation)
- (let ((the-record
- `((filename . ,(buffer-file-name))
- (image-type . ,image-type)
- (position . ,(point))
+(declare-function bookmark-make-record-default "bookmark" ())
+(declare-function bookmark-prop-get "bookmark" (bookmark prop))
+(declare-function bookmark-default-handler "bookmark" (bmk))
+
+(defun image-bookmark-make-record ()
+ (nconc (bookmark-make-record-default)
+ `((image-type . ,image-type)
(handler . image-bookmark-jump))))
- ;; Take no chances with text properties
- (set-text-properties 0 (length annotation) nil annotation)
-
- (when annotation
- (nconc the-record (list (cons 'annotation annotation))))
-
- ;; Finally, return the completed record.
- the-record))
-(declare-function bookmark-get-filename "bookmark" (bookmark))
-(declare-function bookmark-get-bookmark-record "bookmark" (bookmark))
-(declare-function bookmark-get-position "bookmark" (bookmark))
;;;###autoload
(defun image-bookmark-jump (bmk)
;; This implements the `handler' function interface for record type
;; returned by `bookmark-make-record-function', which see.
- (save-window-excursion
- (let ((filename (bookmark-get-filename bmk))
- (type (cdr (assq 'image-type (bookmark-get-bookmark-record bmk))))
- (pos (bookmark-get-position bmk)))
- (find-file filename)
- (when (not (string= image-type type))
- (image-toggle-display))
- (when (string= image-type "text")
- (goto-char pos))
- `((buffer ,(current-buffer)) (position ,(point))))))
+ (prog1 (bookmark-default-handler bmk)
+ (when (not (string= image-type (bookmark-prop-get bmk 'image-type)))
+ (image-toggle-display))))
(provide 'image-mode)
- [Emacs-diffs] Changes to emacs/lisp/image-mode.el,v, Stefan Monnier, 2008/06/03
- [Emacs-diffs] Changes to emacs/lisp/image-mode.el,v, Stefan Monnier, 2008/06/04
- [Emacs-diffs] Changes to emacs/lisp/image-mode.el,v, Glenn Morris, 2008/06/11
- [Emacs-diffs] Changes to emacs/lisp/image-mode.el,v,
Stefan Monnier <=
- [Emacs-diffs] Changes to emacs/lisp/image-mode.el,v, Glenn Morris, 2008/06/26