Mercurial > emacs
changeset 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 | a89507976418 |
children | 8a1394029f98 |
files | src/coding.c |
diffstat | 1 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/coding.c Tue Oct 16 22:39:24 2007 +0000 +++ b/src/coding.c Wed Oct 17 01:29:58 2007 +0000 @@ -374,6 +374,8 @@ Lisp_Object Qstart_process, Qopen_network_stream; Lisp_Object Qtarget_idx; +extern Lisp_Object Qcompletion_ignore_case; + /* If a symbol has this property, evaluate the value to define the symbol as a coding system. */ Lisp_Object Qcoding_system_define_form; @@ -6554,16 +6556,22 @@ DEFUN ("read-coding-system", Fread_coding_system, Sread_coding_system, 1, 2, 0, doc: /* Read a coding system from the minibuffer, prompting with string PROMPT. -If the user enters null input, return second argument DEFAULT-CODING-SYSTEM. */) +If the user enters null input, return second argument DEFAULT-CODING-SYSTEM. +Ignores case when completing coding systems (all Emacs coding systems +are lower-case). */) (prompt, default_coding_system) Lisp_Object prompt, default_coding_system; { Lisp_Object val; + int count = SPECPDL_INDEX (); + if (SYMBOLP (default_coding_system)) default_coding_system = SYMBOL_NAME (default_coding_system); + specbind (Qcompletion_ignore_case, Qt); val = Fcompleting_read (prompt, Vcoding_system_alist, Qnil, Qt, Qnil, Qcoding_system_history, default_coding_system, Qnil); + unbind_to (count, Qnil); return (SCHARS (val) == 0 ? Qnil : Fintern (val, Qnil)); }