Jim Ottaway <[EMAIL PROTECTED]> writes: > On 31 Mar 2007, Michael Olson wrote: >> Nifty! Does the following also work? >> >> (defun muse-publish-mark-inline (beg end atts) >> (let ((style (cdr (assoc "style" atts)))) >> (if (and style >> (muse-style-derived-p >> style >> muse-publishing-current-style)) >> (muse-publish-mark-read-only beg end) >> (delete-region beg end)))) > > No, because > > (muse-style-derived-p "latex" (muse-style "latex")) > > returns nil, since latex isn't derived from itself.
Ah, sure enough. I've now committed a fix to make this work as expected -- namely, to make (muse-style-derived-p "latex" (muse-style "latex")) return t. We consider a style to be derived from itself. Also, omitting the second argument to muse-style-derived-p should work here. > I also thought that there should be an attribute to limit the check to > the style itself without looking to see if the style was derived, > something like > > <inline style="pdf" not-derived="true"> > > but I couldn't think of a good attribute name or determine an idiomatic > value [true, t, yes,...?]. One possibility might be <inline style="pdf" exact="t"> since I don't like including "not" in an option name. -- Michael Olson -- FSF Associate Member #652 -- http://www.mwolson.org/ Interests: Lisp, text markup, protocols -- Jabber: mwolson_at_hcoop.net /` |\ | | | Projects: Emacs, Muse, ERC, EMMS, Planner, ErBot, DVC |_] | \| |_| Reclaim your digital rights by eliminating DRM. See http://www.defectivebydesign.org/what_is_drm for details.
pgpqtuVVy8HQ7.pgp
Description: PGP signature
_______________________________________________ Muse-el-discuss mailing list [email protected] https://mail.gna.org/listinfo/muse-el-discuss
