changeset 81073:12cb550b10e4

(compose-region, decompose-region): Use inhibit-read-only and restore-buffer-modified-p.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 25 May 2007 16:14:21 +0000
parents ecb305fe2f17
children c25ffc6180f9
files lisp/ChangeLog lisp/composite.el
diffstat 2 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Fri May 25 14:34:35 2007 +0000
+++ b/lisp/ChangeLog	Fri May 25 16:14:21 2007 +0000
@@ -1,5 +1,8 @@
 2007-05-25  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+	* composite.el (compose-region, decompose-region):
+	Use inhibit-read-only and restore-buffer-modified-p.
+
 	* xt-mouse.el (xterm-mouse-truncate-wrap): New function.
 	(xterm-mouse-event): Use it.
 
--- a/lisp/composite.el	Fri May 25 14:34:35 2007 +0000
+++ b/lisp/composite.el	Fri May 25 16:14:21 2007 +0000
@@ -194,7 +194,7 @@
 text in the composition."
   (interactive "r")
   (let ((modified-p (buffer-modified-p))
-	(buffer-read-only nil))
+	(inhibit-read-only t))
     (if (or (vectorp components) (listp components))
 	(setq components (encode-composition-components components)))
     (compose-region-internal start end components modification-func)
@@ -208,9 +208,9 @@
 positions (integers or markers) specifying the region."
   (interactive "r")
   (let ((modified-p (buffer-modified-p))
-	(buffer-read-only nil))
+	(inhibit-read-only t))
     (remove-text-properties start end '(composition nil))
-    (set-buffer-modified-p modified-p)))
+    (restore-buffer-modified-p modified-p)))
 
 ;;;###autoload
 (defun compose-string (string &optional start end components modification-func)
@@ -372,8 +372,8 @@
 ;;;###autoload(global-set-key [compose-last-chars] 'compose-last-chars)
 
 
-;;; The following codes are only for backward compatibility with Emacs
-;;; 20.4 and earlier.
+;; The following codes are only for backward compatibility with Emacs
+;; 20.4 and earlier.
 
 ;;;###autoload
 (defun decompose-composite-char (char &optional type with-composition-rule)
@@ -392,5 +392,5 @@
 
 
 
-;;; arch-tag: ee703d77-1723-45d4-a31f-e9f0f867aa33
+;; arch-tag: ee703d77-1723-45d4-a31f-e9f0f867aa33
 ;;; composite.el ends here