Merge from emacs--rel--22
[bpt/emacs.git] / lisp / composite.el
index a1c84e7..a2457ab 100644 (file)
@@ -1,6 +1,6 @@
 ;;; composite.el --- support character composition
 
-;; Copyright (C) 1999, 2000
+;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
 ;;   National Institute of Advanced Industrial Science and Technology (AIST)
 ;;   Registration Number H14PRO021
 
@@ -10,7 +10,7 @@
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
 ;; any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
@@ -194,7 +194,7 @@ adjust the composition when it gets invalid because of a change of
 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 @@ When called from a program, expects two arguments,
 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 @@ after a sequence of character events."
 ;;;###autoload(global-set-key [compose-last-chars] 'compose-last-chars)
 
 \f
-;;; 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 @@ Optional 3rd arg WITH-COMPOSITION-RULE is ignored."
 
 \f
 
-;;; arch-tag: ee703d77-1723-45d4-a31f-e9f0f867aa33
+;; arch-tag: ee703d77-1723-45d4-a31f-e9f0f867aa33
 ;;; composite.el ends here