From fe0806483ae86d5e53e31d0c3a294a367d6e371e Mon Sep 17 00:00:00 2001 From: ueno Date: Sat, 28 Aug 2004 00:57:14 +0000 Subject: [PATCH] * 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. --- lisp/ChangeLog | 7 +++++++ lisp/riece-emacs.el | 6 ++++++ lisp/riece-identity.el | 10 ++++++---- lisp/riece-xemacs.el | 5 +++++ 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 661e828..80f6911 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2004-08-28 Daiki Ueno + + * 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 * riece-commands.el (riece-command-complete-user): Move point to diff --git a/lisp/riece-emacs.el b/lisp/riece-emacs.el index 5a47337..c4e21d2 100644 --- a/lisp/riece-emacs.el +++ b/lisp/riece-emacs.el @@ -95,6 +95,12 @@ (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) diff --git a/lisp/riece-identity.el b/lisp/riece-identity.el index e025c60..d86c09c 100644 --- a/lisp/riece-identity.el +++ b/lisp/riece-identity.el @@ -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) diff --git a/lisp/riece-xemacs.el b/lisp/riece-xemacs.el index 72ce435..aa75f04 100644 --- a/lisp/riece-xemacs.el +++ b/lisp/riece-xemacs.el @@ -124,6 +124,11 @@ (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 -- 1.7.10.4