From 9beb8baa1f1b59f8e76df62e95647c39acbac5e7 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 16 Oct 2007 16:28:39 +0000 Subject: * xfns.c (Fx_create_frame, Fx_display_list): * window.c (window_fixed_size_p, enlarge_window, shrink_window_lowest_first): * macterm.c (init_font_name_table): * macfns.c (Fx_create_frame, Fx_display_list): * lread.c (close_load_descs): * keyboard.c (read_char_x_menu_prompt): * fns.c (Fmember, Fmemql, Fdelete, Fset_char_table_parent): * coding.c (code_convert_region_unwind): Test the type of an object rather than just !NILP before extracting data from it. --- src/coding.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/coding.c') diff --git a/src/coding.c b/src/coding.c index b6299097d55..b0721cc22be 100644 --- a/src/coding.c +++ b/src/coding.c @@ -5371,7 +5371,7 @@ code_convert_region_unwind (arg) inhibit_pre_post_conversion = 0; Vlast_coding_system_used = XCAR (arg); - for (arg = XCDR (arg); ! NILP (arg); arg = XCDR (arg)) + for (arg = XCDR (arg); CONSP (arg); arg = XCDR (arg)) Fkill_buffer (XCAR (arg)); UNGCPRO; -- cgit v1.2.1 From c7183fb83f1841cc3ddf4877dd1f027755153479 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 17 Oct 2007 01:29:58 +0000 Subject: (Qcompletion_ignore_case): New external Lisp_Object. (Fread_coding_system): Ignore case of user input. --- src/coding.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/coding.c') 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; 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-non-nil-coding-system", Fread_non_nil_coding_system, 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)); } -- cgit v1.2.1