Mercurial > emacs
comparison src/coding.c @ 79107:cce707ee192e
(Qcompletion_ignore_case): New external Lisp_Object.
(Fread_coding_system): Ignore case of user input.
| author | Glenn Morris <rgm@gnu.org> |
|---|---|
| date | Wed, 17 Oct 2007 01:29:32 +0000 |
| parents | 2b9404c2f01f |
| children | fc2bcd2a8aad |
comparison
equal
deleted
inserted
replaced
| 79106:10e976a84160 | 79107:cce707ee192e |
|---|---|
| 369 | 369 |
| 370 extern Lisp_Object Qinsert_file_contents, Qwrite_region; | 370 extern Lisp_Object Qinsert_file_contents, Qwrite_region; |
| 371 Lisp_Object Qcall_process, Qcall_process_region; | 371 Lisp_Object Qcall_process, Qcall_process_region; |
| 372 Lisp_Object Qstart_process, Qopen_network_stream; | 372 Lisp_Object Qstart_process, Qopen_network_stream; |
| 373 Lisp_Object Qtarget_idx; | 373 Lisp_Object Qtarget_idx; |
| 374 | |
| 375 extern Lisp_Object Qcompletion_ignore_case; | |
| 374 | 376 |
| 375 /* If a symbol has this property, evaluate the value to define the | 377 /* If a symbol has this property, evaluate the value to define the |
| 376 symbol as a coding system. */ | 378 symbol as a coding system. */ |
| 377 Lisp_Object Qcoding_system_define_form; | 379 Lisp_Object Qcoding_system_define_form; |
| 378 | 380 |
| 6556 return (Fintern (val, Qnil)); | 6558 return (Fintern (val, Qnil)); |
| 6557 } | 6559 } |
| 6558 | 6560 |
| 6559 DEFUN ("read-coding-system", Fread_coding_system, Sread_coding_system, 1, 2, 0, | 6561 DEFUN ("read-coding-system", Fread_coding_system, Sread_coding_system, 1, 2, 0, |
| 6560 doc: /* Read a coding system from the minibuffer, prompting with string PROMPT. | 6562 doc: /* Read a coding system from the minibuffer, prompting with string PROMPT. |
| 6561 If the user enters null input, return second argument DEFAULT-CODING-SYSTEM. */) | 6563 If the user enters null input, return second argument DEFAULT-CODING-SYSTEM. |
| 6564 Ignores case when completing coding systems (all Emacs coding systems | |
| 6565 are lower-case). */) | |
| 6562 (prompt, default_coding_system) | 6566 (prompt, default_coding_system) |
| 6563 Lisp_Object prompt, default_coding_system; | 6567 Lisp_Object prompt, default_coding_system; |
| 6564 { | 6568 { |
| 6565 Lisp_Object val; | 6569 Lisp_Object val; |
| 6570 int count = SPECPDL_INDEX (); | |
| 6571 | |
| 6566 if (SYMBOLP (default_coding_system)) | 6572 if (SYMBOLP (default_coding_system)) |
| 6567 default_coding_system = SYMBOL_NAME (default_coding_system); | 6573 default_coding_system = SYMBOL_NAME (default_coding_system); |
| 6574 specbind (Qcompletion_ignore_case, Qt); | |
| 6568 val = Fcompleting_read (prompt, Vcoding_system_alist, Qnil, | 6575 val = Fcompleting_read (prompt, Vcoding_system_alist, Qnil, |
| 6569 Qt, Qnil, Qcoding_system_history, | 6576 Qt, Qnil, Qcoding_system_history, |
| 6570 default_coding_system, Qnil); | 6577 default_coding_system, Qnil); |
| 6578 unbind_to (count, Qnil); | |
| 6571 return (SCHARS (val) == 0 ? Qnil : Fintern (val, Qnil)); | 6579 return (SCHARS (val) == 0 ? Qnil : Fintern (val, Qnil)); |
| 6572 } | 6580 } |
| 6573 | 6581 |
| 6574 DEFUN ("check-coding-system", Fcheck_coding_system, Scheck_coding_system, | 6582 DEFUN ("check-coding-system", Fcheck_coding_system, Scheck_coding_system, |
| 6575 1, 1, 0, | 6583 1, 1, 0, |
