emacs-wiki-discuss
[Top][All Lists]
Advanced

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

[emacs-wiki-discuss] Re: <lisp> ... </lisp> in muse


From: Stefan Reichör
Subject: [emacs-wiki-discuss] Re: <lisp> ... </lisp> in muse
Date: Mon, 02 Jan 2006 11:10:29 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Jim Ottaway <address@hidden> writes:

>>>>>> Stefan Reichör <address@hidden> writes:
>
>>>>>>> Jim Ottaway <address@hidden> writes:
>>> Don't you just have to do 
>>> 
>>> (defun muse-colors-lisp-tag (beg end)
>>> (muse-unhighlight-region beg end)
>>> (add-text-properties
>>> beg end
>>> (list 'font-lock-multiline t
>>> 'display (muse-eval-lisp
>>> (buffer-substring-no-properties (+ beg 6)
>>> (- end 7)))
>>> 'intangible t)))
>>> 
>>> 
>>> And then modify muse-colors-tags
>>> 
>>> (setq muse-colors-tags (delete (assoc "lisp" muse-colors-tags) 
>>> muse-colors-tags))
>>> (push '("lisp" t nil muse-colors-lisp-tag) muse-colors-tags)
>>> 
>>> 
>>> Or are there some niceties that I have missed?
>
>> Thanks for your idea. But it does not work for me.
>
>> I tried it with the following buffer content:
>
>> <lisp>(+ 3 4)</lisp>
>
>> * When I use emacs-wiki-mode: 7 is displayed
>> * With emacs-muse the whole line is shown
>
>> Does it work for you with the function you have proposed?
>
> Yes it does; I just tried it again using your example above.
>
> Hmm.  I wonder why it doesn't work for you.  Did you evaluate the two
> lines that fiddle with muse-colors-tags?

I used the expressions you gave. I looked at it again. When I reevaluate
the definition of muse-colors-markup in muse-colors.el, everything
works as expected!

I have put your solution in my .emacs file and it works fine!


Michael, could you please add the muse-colors-lisp-tag to muse-colors-tags?


Stefan.





reply via email to

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