diff options
| author | Stefan Monnier | 2007-05-25 16:14:21 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2007-05-25 16:14:21 +0000 |
| commit | 09d524014399810482bcc6268af18aaeb4de0cb5 (patch) | |
| tree | a1adfaeffde6001135beedf6d900bb3a0d0a517a | |
| parent | 6ab93c85b827be908a86135d8f303cfea79d1e4b (diff) | |
| download | emacs-09d524014399810482bcc6268af18aaeb4de0cb5.tar.gz emacs-09d524014399810482bcc6268af18aaeb4de0cb5.zip | |
(compose-region, decompose-region):
Use inhibit-read-only and restore-buffer-modified-p.
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/composite.el | 12 |
2 files changed, 9 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a2976615ad1..8c38ef07b0a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2007-05-25 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2007-05-25 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * composite.el (compose-region, decompose-region): | ||
| 4 | Use inhibit-read-only and restore-buffer-modified-p. | ||
| 5 | |||
| 3 | * xt-mouse.el (xterm-mouse-truncate-wrap): New function. | 6 | * xt-mouse.el (xterm-mouse-truncate-wrap): New function. |
| 4 | (xterm-mouse-event): Use it. | 7 | (xterm-mouse-event): Use it. |
| 5 | 8 | ||
diff --git a/lisp/composite.el b/lisp/composite.el index ede7d023e87..f22c6b52da0 100644 --- a/lisp/composite.el +++ b/lisp/composite.el | |||
| @@ -194,7 +194,7 @@ adjust the composition when it gets invalid because of a change of | |||
| 194 | text in the composition." | 194 | text in the composition." |
| 195 | (interactive "r") | 195 | (interactive "r") |
| 196 | (let ((modified-p (buffer-modified-p)) | 196 | (let ((modified-p (buffer-modified-p)) |
| 197 | (buffer-read-only nil)) | 197 | (inhibit-read-only t)) |
| 198 | (if (or (vectorp components) (listp components)) | 198 | (if (or (vectorp components) (listp components)) |
| 199 | (setq components (encode-composition-components components))) | 199 | (setq components (encode-composition-components components))) |
| 200 | (compose-region-internal start end components modification-func) | 200 | (compose-region-internal start end components modification-func) |
| @@ -208,9 +208,9 @@ When called from a program, expects two arguments, | |||
| 208 | positions (integers or markers) specifying the region." | 208 | positions (integers or markers) specifying the region." |
| 209 | (interactive "r") | 209 | (interactive "r") |
| 210 | (let ((modified-p (buffer-modified-p)) | 210 | (let ((modified-p (buffer-modified-p)) |
| 211 | (buffer-read-only nil)) | 211 | (inhibit-read-only t)) |
| 212 | (remove-text-properties start end '(composition nil)) | 212 | (remove-text-properties start end '(composition nil)) |
| 213 | (set-buffer-modified-p modified-p))) | 213 | (restore-buffer-modified-p modified-p))) |
| 214 | 214 | ||
| 215 | ;;;###autoload | 215 | ;;;###autoload |
| 216 | (defun compose-string (string &optional start end components modification-func) | 216 | (defun compose-string (string &optional start end components modification-func) |
| @@ -372,8 +372,8 @@ after a sequence of character events." | |||
| 372 | ;;;###autoload(global-set-key [compose-last-chars] 'compose-last-chars) | 372 | ;;;###autoload(global-set-key [compose-last-chars] 'compose-last-chars) |
| 373 | 373 | ||
| 374 | 374 | ||
| 375 | ;;; The following codes are only for backward compatibility with Emacs | 375 | ;; The following codes are only for backward compatibility with Emacs |
| 376 | ;;; 20.4 and earlier. | 376 | ;; 20.4 and earlier. |
| 377 | 377 | ||
| 378 | ;;;###autoload | 378 | ;;;###autoload |
| 379 | (defun decompose-composite-char (char &optional type with-composition-rule) | 379 | (defun decompose-composite-char (char &optional type with-composition-rule) |
| @@ -392,5 +392,5 @@ Optional 3rd arg WITH-COMPOSITION-RULE is ignored." | |||
| 392 | 392 | ||
| 393 | 393 | ||
| 394 | 394 | ||
| 395 | ;;; arch-tag: ee703d77-1723-45d4-a31f-e9f0f867aa33 | 395 | ;; arch-tag: ee703d77-1723-45d4-a31f-e9f0f867aa33 |
| 396 | ;;; composite.el ends here | 396 | ;;; composite.el ends here |