diff options
| author | Kenichi Handa | 2004-10-25 00:22:02 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2004-10-25 00:22:02 +0000 |
| commit | c0f7266a85de8df528e0f5ceba0702b8f979c176 (patch) | |
| tree | 5af3315dc4a603bbde94b2232e13ca6ce3dbad24 | |
| parent | 29dc7809d5c02249669417a982a3d1d14eb15f73 (diff) | |
| download | emacs-c0f7266a85de8df528e0f5ceba0702b8f979c176.tar.gz emacs-c0f7266a85de8df528e0f5ceba0702b8f979c176.zip | |
(x-set-cut-buffer): Encode STRING if necessary.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/select.el | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e99856fe5f3..25e0f80134e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2004-10-25 Kenichi Handa <handa@m17n.org> | ||
| 2 | |||
| 3 | * select.el (x-set-cut-buffer): Encode STRING if necessary. | ||
| 4 | |||
| 1 | 2004-10-24 Luc Teirlinck <teirllm@auburn.edu> | 5 | 2004-10-24 Luc Teirlinck <teirllm@auburn.edu> |
| 2 | 6 | ||
| 3 | * indent.el (set-left-margin, set-right-margin): Delete redundant | 7 | * indent.el (set-left-margin, set-right-margin): Delete redundant |
diff --git a/lisp/select.el b/lisp/select.el index 565ddd7d22e..bca19a5cd6e 100644 --- a/lisp/select.el +++ b/lisp/select.el | |||
| @@ -144,6 +144,11 @@ Cut buffers are considered obsolete; you should use selections instead." | |||
| 144 | (or (stringp string) (signal 'wrong-type-argument (list 'string string))) | 144 | (or (stringp string) (signal 'wrong-type-argument (list 'string string))) |
| 145 | (if push | 145 | (if push |
| 146 | (x-rotate-cut-buffers-internal 1)) | 146 | (x-rotate-cut-buffers-internal 1)) |
| 147 | (if (> (string-bytes string) (length string)) | ||
| 148 | ;; STRING is a multibyte string contains non-ASCII characters. | ||
| 149 | (if locale-coding-system | ||
| 150 | (setq string (encode-coding-string string locale-coding-system)) | ||
| 151 | (setq string (string-make-unibyte string)))) | ||
| 147 | (x-store-cut-buffer-internal 'CUT_BUFFER0 string)) | 152 | (x-store-cut-buffer-internal 'CUT_BUFFER0 string)) |
| 148 | 153 | ||
| 149 | 154 | ||