]> git.eshelyaron.com Git - emacs.git/commitdiff
(xselect-convert-to-string): Bind `inhibit-read-only' to t.
authorLuc Teirlinck <teirllm@auburn.edu>
Mon, 3 May 2004 01:24:47 +0000 (01:24 +0000)
committerLuc Teirlinck <teirllm@auburn.edu>
Mon, 3 May 2004 01:24:47 +0000 (01:24 +0000)
lisp/ChangeLog
lisp/select.el

index 015898b1d6dc1a64cf2341366c2c9af41448af43..4cb5ac6107036ae42b5cfd9d260b7434fd8ae972 100644 (file)
@@ -1,3 +1,8 @@
+2004-05-02  Luc Teirlinck  <teirllm@auburn.edu>
+
+       * select.el (xselect-convert-to-string): Bind `inhibit-read-only'
+       to t.
+
 2004-05-03  Nick Roberts  <nickrob@gnu.org>
 
        * progmodes/gdb-ui.el (gud-watch, gdb-display-buffer)
index 01b227d8712936d548e0230c1569d1c7ed415215..d6a18fee70614286bf3c6f0ef96499fae6ac6a6d 100644 (file)
@@ -177,46 +177,47 @@ Cut buffers are considered obsolete; you should use selections instead."
            (setq coding (coding-system-base coding))
          (setq coding 'raw-text))
        ;; Suppress producing escape sequences for compositions.
-       (remove-text-properties 0 (length str) '(composition nil) str)
-       (cond
-        ((eq type 'TEXT)
-         (if (not (multibyte-string-p str))
-             ;; Don't have to encode unibyte string.
-             (setq type 'STRING)
-           ;; If STR contains only ASCII, Latin-1, and raw bytes,
-           ;; encode STR by iso-latin-1, and return it as type
-           ;; `STRING'.  Otherwise, encode STR by CODING.  In that
-           ;; case, the returing type depends on CODING.
-           (let ((charsets (find-charset-string str)))
-             (setq charsets
-                   (delq 'ascii
-                         (delq 'latin-iso8859-1
-                               (delq 'eight-bit-control
-                                     (delq 'eight-bit-graphic charsets)))))
-             (if charsets
-                 (setq str (encode-coding-string str coding)
-                       type (if (memq coding '(compound-text
-                                               compound-text-with-extensions))
-                                'COMPOUND_TEXT
-                              'STRING))
-               (setq type 'STRING
-                     str (encode-coding-string str 'iso-latin-1))))))
-
-        ((eq type 'COMPOUND_TEXT)
-         (setq str (encode-coding-string str coding)))
-
-        ((eq type 'STRING)
-         (if (memq coding '(compound-text
-                            compound-text-with-extensions))
-             (setq str (string-make-unibyte str))
-           (setq str (encode-coding-string str coding))))
-
-        ((eq type 'UTF8_STRING)
-         (setq str (encode-coding-string str 'utf-8)))
-
-        (t
-         (error "Unknow selection type: %S" type))
-        ))
+       (let ((inhibit-read-only t))
+         (remove-text-properties 0 (length str) '(composition nil) str)
+         (cond
+          ((eq type 'TEXT)
+           (if (not (multibyte-string-p str))
+               ;; Don't have to encode unibyte string.
+               (setq type 'STRING)
+             ;; If STR contains only ASCII, Latin-1, and raw bytes,
+             ;; encode STR by iso-latin-1, and return it as type
+             ;; `STRING'.  Otherwise, encode STR by CODING.  In that
+             ;; case, the returing type depends on CODING.
+             (let ((charsets (find-charset-string str)))
+               (setq charsets
+                     (delq 'ascii
+                           (delq 'latin-iso8859-1
+                                 (delq 'eight-bit-control
+                                       (delq 'eight-bit-graphic charsets)))))
+               (if charsets
+                   (setq str (encode-coding-string str coding)
+                         type (if (memq coding '(compound-text
+                                                 compound-text-with-extensions))
+                                  'COMPOUND_TEXT
+                                'STRING))
+                 (setq type 'STRING
+                       str (encode-coding-string str 'iso-latin-1))))))
+
+          ((eq type 'COMPOUND_TEXT)
+           (setq str (encode-coding-string str coding)))
+
+          ((eq type 'STRING)
+           (if (memq coding '(compound-text
+                              compound-text-with-extensions))
+               (setq str (string-make-unibyte str))
+             (setq str (encode-coding-string str coding))))
+
+          ((eq type 'UTF8_STRING)
+           (setq str (encode-coding-string str 'utf-8)))
+
+          (t
+           (error "Unknow selection type: %S" type))
+          )))
 
       (setq next-selection-coding-system nil)
       (cons type str))))