From 984e0e56598c0a33890190ba5f2a75838292f222 Mon Sep 17 00:00:00 2001 From: Michael Olson Date: Sun, 29 Oct 2006 03:08:15 +0000 Subject: [PATCH] Fix issue with link suffix in links to other files 2006-10-28 Michael Olson * lisp/muse-project.el (muse-project-choose-style-by-link-suffix) (muse-project-resolve-link): If the given style does not have a link-suffix, default to suffix. This fixes a bug I was noticing when linking to a file that was published in both PDF and HTML form. git-archimport-id: mwolson@gnu.org--2006/muse--main--1.0--patch-228 --- ChangeLog | 6 ++++++ lisp/muse-project.el | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 986cccd..46ae768 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2006-10-28 Michael Olson + * lisp/muse-project.el (muse-project-choose-style-by-link-suffix) + (muse-project-resolve-link): If the given style does not have a + link-suffix, default to suffix. This fixes a bug I was noticing + when linking to a file that was published in both PDF and HTML + form. + * lisp/muse-publish.el (muse-publish-determine-dl-indent): New function that is used as a callback to determine the initial amount of indentation that the current dl item has. diff --git a/lisp/muse-project.el b/lisp/muse-project.el index dbf9304..70a2c5d 100644 --- a/lisp/muse-project.el +++ b/lisp/muse-project.el @@ -579,7 +579,8 @@ If no style passes TEST, return the first style." (defun muse-project-choose-style-by-link-suffix (given-suffix style) "If the given STYLE has a link-suffix that equals GIVEN-SUFFIX, return non-nil." - (let ((link-suffix (muse-style-element :link-suffix style))) + (let ((link-suffix (or (muse-style-element :link-suffix style) + (muse-style-element :suffix style)))) (and (stringp link-suffix) (string= given-suffix link-suffix)))) @@ -622,7 +623,8 @@ suffix of the given local style and that of the remote styles. The remote styles are usually populated by `muse-project-applicable-styles'." - (let ((link-suffix (muse-style-element :link-suffix local-style)) + (let ((link-suffix (or (muse-style-element :link-suffix local-style) + (muse-style-element :suffix local-style))) remote-style) (if (not (stringp link-suffix)) (setq remote-style (car remote-styles)) -- 2.11.4.GIT