From fa1f4d61609e7980466b723652cab284cbc5d242 Mon Sep 17 00:00:00 2001 From: David Aspinall Date: Mon, 4 Feb 2008 23:33:31 +0000 Subject: Make display properties rear sticky. This is good for begin..end but not for singleton controls (which are a nuisance enough already). --- lib/unicode-tokens.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/unicode-tokens.el b/lib/unicode-tokens.el index d072e0f5..1074ac23 100644 --- a/lib/unicode-tokens.el +++ b/lib/unicode-tokens.el @@ -516,11 +516,13 @@ after next character (single character control sequence)." "Key map used for Unicode Tokens mode.") (define-minor-mode unicode-tokens-mode - "Minor mode for unicode token input." - nil - " Utoks" ; input method indication already + "Minor mode for unicode token input." nil " Utoks" unicode-tokens-mode-map + (make-variable-buffer-local 'text-property-default-nonsticky) (when unicode-tokens-mode + (setq text-property-default-nonsticky + ;; We want to use display property with stickyness + (delete '(display . t) text-property-default-nonsticky)) (if (fboundp 'set-buffer-multibyte) (set-buffer-multibyte t)) (let ((inhibit-read-only t)) @@ -529,6 +531,7 @@ after next character (single character control sequence)." (format-decode-buffer 'unicode-tokens)) (set-input-method "Unicode tokens")) (unless unicode-tokens-mode + (add-to-list 'text-property-default-nonsticky '(display . t)) ;; leave buffer encoding as is (let ((inhibit-read-only t) (modified (buffer-modified-p))) -- cgit v1.2.3