diff options
Diffstat (limited to 'src/coding.c')
| -rw-r--r-- | src/coding.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/coding.c b/src/coding.c index b0721cc22be..da6049cafbd 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -374,6 +374,8 @@ Lisp_Object Qcall_process, Qcall_process_region; | |||
| 374 | Lisp_Object Qstart_process, Qopen_network_stream; | 374 | Lisp_Object Qstart_process, Qopen_network_stream; |
| 375 | Lisp_Object Qtarget_idx; | 375 | Lisp_Object Qtarget_idx; |
| 376 | 376 | ||
| 377 | extern Lisp_Object Qcompletion_ignore_case; | ||
| 378 | |||
| 377 | /* If a symbol has this property, evaluate the value to define the | 379 | /* If a symbol has this property, evaluate the value to define the |
| 378 | symbol as a coding system. */ | 380 | symbol as a coding system. */ |
| 379 | Lisp_Object Qcoding_system_define_form; | 381 | Lisp_Object Qcoding_system_define_form; |
| @@ -6554,16 +6556,22 @@ DEFUN ("read-non-nil-coding-system", Fread_non_nil_coding_system, | |||
| 6554 | 6556 | ||
| 6555 | DEFUN ("read-coding-system", Fread_coding_system, Sread_coding_system, 1, 2, 0, | 6557 | DEFUN ("read-coding-system", Fread_coding_system, Sread_coding_system, 1, 2, 0, |
| 6556 | doc: /* Read a coding system from the minibuffer, prompting with string PROMPT. | 6558 | doc: /* Read a coding system from the minibuffer, prompting with string PROMPT. |
| 6557 | If the user enters null input, return second argument DEFAULT-CODING-SYSTEM. */) | 6559 | If the user enters null input, return second argument DEFAULT-CODING-SYSTEM. |
| 6560 | Ignores case when completing coding systems (all Emacs coding systems | ||
| 6561 | are lower-case). */) | ||
| 6558 | (prompt, default_coding_system) | 6562 | (prompt, default_coding_system) |
| 6559 | Lisp_Object prompt, default_coding_system; | 6563 | Lisp_Object prompt, default_coding_system; |
| 6560 | { | 6564 | { |
| 6561 | Lisp_Object val; | 6565 | Lisp_Object val; |
| 6566 | int count = SPECPDL_INDEX (); | ||
| 6567 | |||
| 6562 | if (SYMBOLP (default_coding_system)) | 6568 | if (SYMBOLP (default_coding_system)) |
| 6563 | default_coding_system = SYMBOL_NAME (default_coding_system); | 6569 | default_coding_system = SYMBOL_NAME (default_coding_system); |
| 6570 | specbind (Qcompletion_ignore_case, Qt); | ||
| 6564 | val = Fcompleting_read (prompt, Vcoding_system_alist, Qnil, | 6571 | val = Fcompleting_read (prompt, Vcoding_system_alist, Qnil, |
| 6565 | Qt, Qnil, Qcoding_system_history, | 6572 | Qt, Qnil, Qcoding_system_history, |
| 6566 | default_coding_system, Qnil); | 6573 | default_coding_system, Qnil); |
| 6574 | unbind_to (count, Qnil); | ||
| 6567 | return (SCHARS (val) == 0 ? Qnil : Fintern (val, Qnil)); | 6575 | return (SCHARS (val) == 0 ? Qnil : Fintern (val, Qnil)); |
| 6568 | } | 6576 | } |
| 6569 | 6577 | ||