aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.c
diff options
context:
space:
mode:
authorGlenn Morris2007-10-17 01:29:58 +0000
committerGlenn Morris2007-10-17 01:29:58 +0000
commitc7183fb83f1841cc3ddf4877dd1f027755153479 (patch)
tree56cb8f4386336ad11e00b9837415190b8f11d756 /src/coding.c
parent81d3d428c6b88e6c99f3fad6b7cc52c12236ff56 (diff)
downloademacs-c7183fb83f1841cc3ddf4877dd1f027755153479.tar.gz
emacs-c7183fb83f1841cc3ddf4877dd1f027755153479.zip
(Qcompletion_ignore_case): New external Lisp_Object.
(Fread_coding_system): Ignore case of user input.
Diffstat (limited to 'src/coding.c')
-rw-r--r--src/coding.c10
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;
374Lisp_Object Qstart_process, Qopen_network_stream; 374Lisp_Object Qstart_process, Qopen_network_stream;
375Lisp_Object Qtarget_idx; 375Lisp_Object Qtarget_idx;
376 376
377extern 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. */
379Lisp_Object Qcoding_system_define_form; 381Lisp_Object Qcoding_system_define_form;
@@ -6554,16 +6556,22 @@ DEFUN ("read-non-nil-coding-system", Fread_non_nil_coding_system,
6554 6556
6555DEFUN ("read-coding-system", Fread_coding_system, Sread_coding_system, 1, 2, 0, 6557DEFUN ("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.
6557If the user enters null input, return second argument DEFAULT-CODING-SYSTEM. */) 6559If the user enters null input, return second argument DEFAULT-CODING-SYSTEM.
6560Ignores case when completing coding systems (all Emacs coding systems
6561are 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