aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.c
diff options
context:
space:
mode:
authorGlenn Morris2007-10-17 01:29:32 +0000
committerGlenn Morris2007-10-17 01:29:32 +0000
commit930f57b46e639926c205e0b807ccb5bf4619b0b7 (patch)
tree6206fc0f506f0b2cc3034ad4e6eecd78028f9ce2 /src/coding.c
parentc2c0d96fcaa3dc16a2ddc7b7f0b2e1fcdfffb285 (diff)
downloademacs-930f57b46e639926c205e0b807ccb5bf4619b0b7.tar.gz
emacs-930f57b46e639926c205e0b807ccb5bf4619b0b7.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 907521edd5c..1dc4cf8eeb9 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -372,6 +372,8 @@ Lisp_Object Qcall_process, Qcall_process_region;
372Lisp_Object Qstart_process, Qopen_network_stream; 372Lisp_Object Qstart_process, Qopen_network_stream;
373Lisp_Object Qtarget_idx; 373Lisp_Object Qtarget_idx;
374 374
375extern Lisp_Object Qcompletion_ignore_case;
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. */
377Lisp_Object Qcoding_system_define_form; 379Lisp_Object Qcoding_system_define_form;
@@ -6558,16 +6560,22 @@ DEFUN ("read-non-nil-coding-system", Fread_non_nil_coding_system,
6558 6560
6559DEFUN ("read-coding-system", Fread_coding_system, Sread_coding_system, 1, 2, 0, 6561DEFUN ("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.
6561If the user enters null input, return second argument DEFAULT-CODING-SYSTEM. */) 6563If the user enters null input, return second argument DEFAULT-CODING-SYSTEM.
6564Ignores case when completing coding systems (all Emacs coding systems
6565are 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