emacs-devel
[Top][All Lists]
Advanced

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

annotations problem?


From: Pavel Janík
Subject: annotations problem?
Date: Fri, 04 Jan 2002 22:57:38 +0100
User-agent: Gnus/5.090005 (Oort Gnus v0.05) Emacs/21.1.50 (i386-suse-linux-gnu)

Hi,

someone reported a problem with enriched-mode and display property. I'm
trying to debug it and found the following, try it with emacs -q -l test.el:

(autoload 'enriched-make-annotation "enriched.el")

(defun handle-face-property (old new)
  (let ((param (prin1-to-string (or old new))))
    (if (null old)
        (list nil (list "x-face" param))
      (list (list "x-face" param)))))

(insert (concat (propertize "a" 'face 'highlight) "b"))
(format-insert-annotations
 (format-annotate-region (point-min)
                         (point-max)
                         '((face           (nil         handle-face-property)))
                         'enriched-make-annotation '(rear-nonsticky 
intangible)))


The result of this will be 

   <x-face><param>highlight</param>ab</x-face>

but correct is:

   <x-face><param>highlight</param>a</x-face>b

The same applies when you use display property. Do you see bug somewhere?
-- 
Pavel Janík

I'll have to convert to a program whose config files I can understand anyway
some day.
                  -- Kurt Garloff about migrating from Sendmail to Postfix



reply via email to

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