diff options
| author | Lars Ingebrigtsen | 2016-02-16 13:01:05 +1100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2016-02-16 13:01:05 +1100 |
| commit | 7f3441cc3335b5faf7cb52458256dbbbaaaf9fa7 (patch) | |
| tree | 8a2accf5bdd6d2623c05d7098b442722f8361260 | |
| parent | 2d7af7e206c746bc774ae34de88dc2c20ea1b07d (diff) | |
| download | emacs-7f3441cc3335b5faf7cb52458256dbbbaaaf9fa7.tar.gz emacs-7f3441cc3335b5faf7cb52458256dbbbaaaf9fa7.zip | |
Do most of the coding system setup earlier
* src/process.c (Fmake_network_process): Set the read/write
coding systems here, so that special bindings work.
(Fmake_network_process): Complete the coding system setup here.
| -rw-r--r-- | lisp/url/url-gw.el | 3 | ||||
| -rw-r--r-- | src/process.c | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/lisp/url/url-gw.el b/lisp/url/url-gw.el index 8bd35a53778..2b552df69d9 100644 --- a/lisp/url/url-gw.el +++ b/lisp/url/url-gw.el | |||
| @@ -246,7 +246,7 @@ overriding the value of `url-gateway-method'." | |||
| 246 | :type gw-method | 246 | :type gw-method |
| 247 | ;; Use non-blocking socket if we can. | 247 | ;; Use non-blocking socket if we can. |
| 248 | :nowait (featurep 'make-network-process | 248 | :nowait (featurep 'make-network-process |
| 249 | '(:nowait t)))) | 249 | '(:nowait t)))) |
| 250 | (`socks | 250 | (`socks |
| 251 | (socks-open-network-stream name buffer host service)) | 251 | (socks-open-network-stream name buffer host service)) |
| 252 | (`telnet | 252 | (`telnet |
| @@ -256,6 +256,7 @@ overriding the value of `url-gateway-method'." | |||
| 256 | (_ | 256 | (_ |
| 257 | (error "Bad setting of url-gateway-method: %s" | 257 | (error "Bad setting of url-gateway-method: %s" |
| 258 | url-gateway-method)))))) | 258 | url-gateway-method)))))) |
| 259 | (message "Coding system: %s" (process-coding-system conn)) | ||
| 259 | conn))) | 260 | conn))) |
| 260 | 261 | ||
| 261 | (provide 'url-gw) | 262 | (provide 'url-gw) |
diff --git a/src/process.c b/src/process.c index f1c066f4671..77837834916 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -3004,8 +3004,6 @@ void set_network_socket_coding_system (Lisp_Object proc) | |||
| 3004 | } | 3004 | } |
| 3005 | pset_encode_coding_system (p, val); | 3005 | pset_encode_coding_system (p, val); |
| 3006 | 3006 | ||
| 3007 | setup_process_coding_systems (proc); | ||
| 3008 | |||
| 3009 | pset_decoding_buf (p, empty_unibyte_string); | 3007 | pset_decoding_buf (p, empty_unibyte_string); |
| 3010 | p->decoding_carryover = 0; | 3008 | p->decoding_carryover = 0; |
| 3011 | pset_encoding_buf (p, empty_unibyte_string); | 3009 | pset_encoding_buf (p, empty_unibyte_string); |
| @@ -3321,7 +3319,7 @@ void connect_network_socket (Lisp_Object proc, Lisp_Object ip_addresses) | |||
| 3321 | if (inch > max_process_desc) | 3319 | if (inch > max_process_desc) |
| 3322 | max_process_desc = inch; | 3320 | max_process_desc = inch; |
| 3323 | 3321 | ||
| 3324 | set_network_socket_coding_system (proc); | 3322 | setup_process_coding_systems (proc); |
| 3325 | 3323 | ||
| 3326 | #ifdef HAVE_GNUTLS | 3324 | #ifdef HAVE_GNUTLS |
| 3327 | /* Continue the asynchronous connection. */ | 3325 | /* Continue the asynchronous connection. */ |
| @@ -3897,6 +3895,8 @@ usage: (make-network-process &rest ARGS) */) | |||
| 3897 | p->gnutls_boot_parameters = tem; | 3895 | p->gnutls_boot_parameters = tem; |
| 3898 | #endif | 3896 | #endif |
| 3899 | 3897 | ||
| 3898 | set_network_socket_coding_system (proc); | ||
| 3899 | |||
| 3900 | unbind_to (count, Qnil); | 3900 | unbind_to (count, Qnil); |
| 3901 | 3901 | ||
| 3902 | /* :server BOOL */ | 3902 | /* :server BOOL */ |