diff options
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/select.el | 81 |
2 files changed, 46 insertions, 40 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 015898b1d6d..4cb5ac61070 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2004-05-02 Luc Teirlinck <teirllm@auburn.edu> | ||
| 2 | |||
| 3 | * select.el (xselect-convert-to-string): Bind `inhibit-read-only' | ||
| 4 | to t. | ||
| 5 | |||
| 1 | 2004-05-03 Nick Roberts <nickrob@gnu.org> | 6 | 2004-05-03 Nick Roberts <nickrob@gnu.org> |
| 2 | 7 | ||
| 3 | * progmodes/gdb-ui.el (gud-watch, gdb-display-buffer) | 8 | * progmodes/gdb-ui.el (gud-watch, gdb-display-buffer) |
diff --git a/lisp/select.el b/lisp/select.el index 01b227d8712..d6a18fee706 100644 --- a/lisp/select.el +++ b/lisp/select.el | |||
| @@ -177,46 +177,47 @@ Cut buffers are considered obsolete; you should use selections instead." | |||
| 177 | (setq coding (coding-system-base coding)) | 177 | (setq coding (coding-system-base coding)) |
| 178 | (setq coding 'raw-text)) | 178 | (setq coding 'raw-text)) |
| 179 | ;; Suppress producing escape sequences for compositions. | 179 | ;; Suppress producing escape sequences for compositions. |
| 180 | (remove-text-properties 0 (length str) '(composition nil) str) | 180 | (let ((inhibit-read-only t)) |
| 181 | (cond | 181 | (remove-text-properties 0 (length str) '(composition nil) str) |
| 182 | ((eq type 'TEXT) | 182 | (cond |
| 183 | (if (not (multibyte-string-p str)) | 183 | ((eq type 'TEXT) |
| 184 | ;; Don't have to encode unibyte string. | 184 | (if (not (multibyte-string-p str)) |
| 185 | (setq type 'STRING) | 185 | ;; Don't have to encode unibyte string. |
| 186 | ;; If STR contains only ASCII, Latin-1, and raw bytes, | 186 | (setq type 'STRING) |
| 187 | ;; encode STR by iso-latin-1, and return it as type | 187 | ;; If STR contains only ASCII, Latin-1, and raw bytes, |
| 188 | ;; `STRING'. Otherwise, encode STR by CODING. In that | 188 | ;; encode STR by iso-latin-1, and return it as type |
| 189 | ;; case, the returing type depends on CODING. | 189 | ;; `STRING'. Otherwise, encode STR by CODING. In that |
| 190 | (let ((charsets (find-charset-string str))) | 190 | ;; case, the returing type depends on CODING. |
| 191 | (setq charsets | 191 | (let ((charsets (find-charset-string str))) |
| 192 | (delq 'ascii | 192 | (setq charsets |
| 193 | (delq 'latin-iso8859-1 | 193 | (delq 'ascii |
| 194 | (delq 'eight-bit-control | 194 | (delq 'latin-iso8859-1 |
| 195 | (delq 'eight-bit-graphic charsets))))) | 195 | (delq 'eight-bit-control |
| 196 | (if charsets | 196 | (delq 'eight-bit-graphic charsets))))) |
| 197 | (setq str (encode-coding-string str coding) | 197 | (if charsets |
| 198 | type (if (memq coding '(compound-text | 198 | (setq str (encode-coding-string str coding) |
| 199 | compound-text-with-extensions)) | 199 | type (if (memq coding '(compound-text |
| 200 | 'COMPOUND_TEXT | 200 | compound-text-with-extensions)) |
| 201 | 'STRING)) | 201 | 'COMPOUND_TEXT |
| 202 | (setq type 'STRING | 202 | 'STRING)) |
| 203 | str (encode-coding-string str 'iso-latin-1)))))) | 203 | (setq type 'STRING |
| 204 | 204 | str (encode-coding-string str 'iso-latin-1)))))) | |
| 205 | ((eq type 'COMPOUND_TEXT) | 205 | |
| 206 | (setq str (encode-coding-string str coding))) | 206 | ((eq type 'COMPOUND_TEXT) |
| 207 | 207 | (setq str (encode-coding-string str coding))) | |
| 208 | ((eq type 'STRING) | 208 | |
| 209 | (if (memq coding '(compound-text | 209 | ((eq type 'STRING) |
| 210 | compound-text-with-extensions)) | 210 | (if (memq coding '(compound-text |
| 211 | (setq str (string-make-unibyte str)) | 211 | compound-text-with-extensions)) |
| 212 | (setq str (encode-coding-string str coding)))) | 212 | (setq str (string-make-unibyte str)) |
| 213 | 213 | (setq str (encode-coding-string str coding)))) | |
| 214 | ((eq type 'UTF8_STRING) | 214 | |
| 215 | (setq str (encode-coding-string str 'utf-8))) | 215 | ((eq type 'UTF8_STRING) |
| 216 | 216 | (setq str (encode-coding-string str 'utf-8))) | |
| 217 | (t | 217 | |
| 218 | (error "Unknow selection type: %S" type)) | 218 | (t |
| 219 | )) | 219 | (error "Unknow selection type: %S" type)) |
| 220 | ))) | ||
| 220 | 221 | ||
| 221 | (setq next-selection-coding-system nil) | 222 | (setq next-selection-coding-system nil) |
| 222 | (cons type str)))) | 223 | (cons type str)))) |