Mercurial > emacs
comparison src/coding.c @ 85332:bb808ca35bd9
(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:58 +0000 |
| parents | 0bc184c59770 |
| children | 8e5b337fea59 1251cabc40b7 |
comparison
equal
deleted
inserted
replaced
| 85331:a89507976418 | 85332:bb808ca35bd9 |
|---|---|
| 371 | 371 |
| 372 extern Lisp_Object Qinsert_file_contents, Qwrite_region; | 372 extern Lisp_Object Qinsert_file_contents, Qwrite_region; |
| 373 Lisp_Object Qcall_process, Qcall_process_region; | 373 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 | |
| 377 extern Lisp_Object Qcompletion_ignore_case; | |
| 376 | 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; |
| 380 | 382 |
| 6552 return (Fintern (val, Qnil)); | 6554 return (Fintern (val, Qnil)); |
| 6553 } | 6555 } |
| 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 |
| 6570 DEFUN ("check-coding-system", Fcheck_coding_system, Scheck_coding_system, | 6578 DEFUN ("check-coding-system", Fcheck_coding_system, Scheck_coding_system, |
| 6571 1, 1, 0, | 6579 1, 1, 0, |
