From 2fc2fb0902a3800569b54c401715284ca6557323 Mon Sep 17 00:00:00 2001 From: Michael Olson Date: Thu, 27 Apr 2006 00:31:01 +0000 Subject: [PATCH] Fix a few image bugs. * lisp/muse-colors.el (muse-colors-insert-image): Expand file name before passing it to `muse-colors-inline-image-method'. This makes images with the same current directory and publishing directory get resolved correctly. * lisp/muse-project.el (muse-project-find-file): Don't try to add a ".muse" extension to images. git-archimport-id: mwolson@gnu.org--2006/muse--main--1.0--patch-118 --- ChangeLog.2006 | 19 +++++++++++++++++++ lisp/muse-colors.el | 3 ++- lisp/muse-project.el | 4 +++- 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/ChangeLog.2006 b/ChangeLog.2006 index 44d71cb..c4a60ff 100644 --- a/ChangeLog.2006 +++ b/ChangeLog.2006 @@ -2,6 +2,25 @@ # arch-tag: automatic-ChangeLog--mwolson@gnu.org--2006/muse--main--1.0 # +2006-04-27 00:31:01 GMT Michael Olson patch-118 + + Summary: + Fix a few image bugs. + Revision: + muse--main--1.0--patch-118 + + * lisp/muse-colors.el (muse-colors-insert-image): Expand file name before + passing it to `muse-colors-inline-image-method'. This makes images + with the same current directory and publishing directory get resolved + correctly. + + * lisp/muse-project.el (muse-project-find-file): Don't try to add a + ".muse" extension to images. + + modified files: + ChangeLog.2006 lisp/muse-colors.el lisp/muse-project.el + + 2006-04-25 22:28:01 GMT Michael Olson patch-117 Summary: diff --git a/lisp/muse-colors.el b/lisp/muse-colors.el index d7d935f..8dbb45f 100644 --- a/lisp/muse-colors.el +++ b/lisp/muse-colors.el @@ -731,9 +731,10 @@ This is a hack for supporting inline images in XEmacs." (defun muse-colors-insert-image (link beg end invis-props) "Create an image using create-image or make-glyph and insert it in place of an image link defined by BEG and END." + (setq link (expand-file-name link)) (let ((image-file (cond ((eq muse-colors-inline-image-method 'default-directory) - (expand-file-name link)) + link) ((functionp muse-colors-inline-image-method) (funcall muse-colors-inline-image-method link)))) glyph) diff --git a/lisp/muse-project.el b/lisp/muse-project.el index d8ef150..61d638b 100644 --- a/lisp/muse-project.el +++ b/lisp/muse-project.el @@ -499,7 +499,9 @@ first directory within the project's fileset is used." name (cons name (muse-project-page-file name project)))) ;; If we're given a relative or absolute filename, open it as-is (if (and (car name) - (save-match-data (string-match muse-file-regexp (car name)))) + (save-match-data + (or (string-match muse-file-regexp (car name)) + (string-match muse-image-regexp (car name))))) (setcdr name (car name)) ;; At this point, name is (PAGE . FILE). (unless (cdr name) -- 2.11.4.GIT