* riece-xemacs.el (riece-put-text-property-nonsticky): New function.
authorueno <ueno>
Sat, 28 Aug 2004 00:57:14 +0000 (00:57 +0000)
committerueno <ueno>
Sat, 28 Aug 2004 00:57:14 +0000 (00:57 +0000)
* riece-emacs.el (riece-put-text-property-nonsticky): New function.
* riece-identity.el (riece-format-identity): Use it instead of
put-text-property.

lisp/ChangeLog
lisp/riece-emacs.el
lisp/riece-identity.el
lisp/riece-xemacs.el

index 661e828..80f6911 100644 (file)
@@ -1,3 +1,10 @@
+2004-08-28  Daiki Ueno  <ueno@unixuser.org>
+
+       * riece-xemacs.el (riece-put-text-property-nonsticky): New function.
+       * riece-emacs.el (riece-put-text-property-nonsticky): New function.
+       * riece-identity.el (riece-format-identity): Use it instead of
+       put-text-property.
+
 2004-08-27  Daiki Ueno  <ueno@unixuser.org>
 
        * riece-commands.el (riece-command-complete-user): Move point to
index 5a47337..c4e21d2 100644 (file)
   (add-text-properties 0 (length string) properties string)
   string)
 
+(defun riece-put-text-property-nonsticky (start end prop value
+                                                    &optional object)
+  (add-text-property start end
+                    (list prop value 'front-sticky nil 'rear-nonsticky t)
+                    object))
+
 (defalias 'riece-facep 'facep)
 
 (provide 'riece-emacs)
index e025c60..d86c09c 100644 (file)
@@ -138,11 +138,13 @@ will be added."
                   (riece-identity-server identity)))))
     (if riece-abbrev-identity-string-function
        (setq string (funcall riece-abbrev-identity-string-function string)))
-    (put-text-property 0 (length string) 'riece-identity identity string)
+    (riece-put-text-property-nonsticky 0 (length string)
+                                      'riece-identity identity
+                                      string)
     (if prefix-only
-       (put-text-property 0 (length string)
-                          'riece-format-identity-prefix-only t
-                          string))
+       (riece-put-text-property-nonsticky 0 (length string)
+                                          'riece-format-identity-prefix-only t
+                                          string))
     string))
 
 (defun riece-parse-identity (string)
index 72ce435..aa75f04 100644 (file)
 
 (defalias 'riece-facep 'find-face)
 
+(defun riece-put-text-property-nonsticky (start end prop value
+                                                    &optional object)
+  (add-text-property start end (list prop value 'start-open t 'end-open t)
+                    object))
+
 (provide 'riece-xemacs)
 
 ;;; riece-xemacs.el ends here