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

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

Re: [emacs-wiki-discuss] Re: modify emacs-wiki.el to handle more tags/fa


From: Joe Corneli
Subject: Re: [emacs-wiki-discuss] Re: modify emacs-wiki.el to handle more tags/faces ?
Date: Sat, 01 May 2004 02:36:42 -0500

Anyway, this works[1].

(defun emacs-wiki-foo-tag (beg end highlight-p)
;  (if highlight-p
;      (progn
;        (emacs-wiki-multiline-maybe beg end)
;        (goto-char end))
    (add-text-properties beg end '(face font-lock-comment-face
                                   rear-nonsticky (read-only))))
;)

(The commented-out stuff causes the function not to work as I would
have liked... perhaps it is being called with highlight-p set to
nil, but I'm not sure how to test this.)

By the way, what I would like even better would be if the tags
themselves disappeared.  I.e.

<foo>hello</foo> [[Emacs]]

should display only a red `hello' followed by a cyan `Emacs'.

Advice on how to make this happen?


[1] In combination, of course, with the following .emacs snippet.

(setq emacs-wiki-markup-tags
 (quote (("example" t nil t emacs-wiki-example-tag)
         ("verbatim" t nil t emacs-wiki-verbatim-tag)
         ("nowiki" t nil t emacs-wiki-nowiki-tag)
         ("verse" t nil nil emacs-wiki-verse-tag)
         ("numbered" t nil nil emacs-wiki-numbered-tag)
         ("nop" nil nil t emacs-wiki-nop-tag)
         ("contents" nil t nil emacs-wiki-contents-tag)
         ("include" nil t nil emacs-wiki-include-tag)
         ("c-source" t t t emacs-wiki-c-source-tag)
         ("comment" t nil nil emacs-wiki-comment-tag)
         ("foo" t nil t emacs-wiki-foo-tag))))




reply via email to

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