Mercurial > emacs
comparison src/coding.c @ 91056:1251cabc40b7
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 890-898)
- Update from CVS
- Merge from emacs--rel--22
* emacs--rel--22 (patch 122-128)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 257-258)
- Merge from emacs--rel--22
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-270
author | Miles Bader <miles@gnu.org> |
---|---|
date | Fri, 19 Oct 2007 00:00:21 +0000 |
parents | 35069180a991 bb808ca35bd9 |
children | ff87badce376 |
comparison
equal
deleted
inserted
replaced
91055:46bc3a01b2fa | 91056:1251cabc40b7 |
---|---|
326 Lisp_Object Qstart_process, Qopen_network_stream; | 326 Lisp_Object Qstart_process, Qopen_network_stream; |
327 Lisp_Object Qtarget_idx; | 327 Lisp_Object Qtarget_idx; |
328 | 328 |
329 Lisp_Object Qinsufficient_source, Qinconsistent_eol, Qinvalid_source; | 329 Lisp_Object Qinsufficient_source, Qinconsistent_eol, Qinvalid_source; |
330 Lisp_Object Qinterrupted, Qinsufficient_memory; | 330 Lisp_Object Qinterrupted, Qinsufficient_memory; |
331 | |
332 extern Lisp_Object Qcompletion_ignore_case; | |
331 | 333 |
332 /* If a symbol has this property, evaluate the value to define the | 334 /* If a symbol has this property, evaluate the value to define the |
333 symbol as a coding system. */ | 335 symbol as a coding system. */ |
334 static Lisp_Object Qcoding_system_define_form; | 336 static Lisp_Object Qcoding_system_define_form; |
335 | 337 |
7192 return (Fintern (val, Qnil)); | 7194 return (Fintern (val, Qnil)); |
7193 } | 7195 } |
7194 | 7196 |
7195 DEFUN ("read-coding-system", Fread_coding_system, Sread_coding_system, 1, 2, 0, | 7197 DEFUN ("read-coding-system", Fread_coding_system, Sread_coding_system, 1, 2, 0, |
7196 doc: /* Read a coding system from the minibuffer, prompting with string PROMPT. | 7198 doc: /* Read a coding system from the minibuffer, prompting with string PROMPT. |
7197 If the user enters null input, return second argument DEFAULT-CODING-SYSTEM. */) | 7199 If the user enters null input, return second argument DEFAULT-CODING-SYSTEM. |
7200 Ignores case when completing coding systems (all Emacs coding systems | |
7201 are lower-case). */) | |
7198 (prompt, default_coding_system) | 7202 (prompt, default_coding_system) |
7199 Lisp_Object prompt, default_coding_system; | 7203 Lisp_Object prompt, default_coding_system; |
7200 { | 7204 { |
7201 Lisp_Object val; | 7205 Lisp_Object val; |
7206 int count = SPECPDL_INDEX (); | |
7207 | |
7202 if (SYMBOLP (default_coding_system)) | 7208 if (SYMBOLP (default_coding_system)) |
7203 XSETSTRING (default_coding_system, XPNTR (SYMBOL_NAME (default_coding_system))); | 7209 default_coding_system = SYMBOL_NAME (default_coding_system); |
7210 specbind (Qcompletion_ignore_case, Qt); | |
7204 val = Fcompleting_read (prompt, Vcoding_system_alist, Qnil, | 7211 val = Fcompleting_read (prompt, Vcoding_system_alist, Qnil, |
7205 Qt, Qnil, Qcoding_system_history, | 7212 Qt, Qnil, Qcoding_system_history, |
7206 default_coding_system, Qnil); | 7213 default_coding_system, Qnil); |
7214 unbind_to (count, Qnil); | |
7207 return (SCHARS (val) == 0 ? Qnil : Fintern (val, Qnil)); | 7215 return (SCHARS (val) == 0 ? Qnil : Fintern (val, Qnil)); |
7208 } | 7216 } |
7209 | 7217 |
7210 DEFUN ("check-coding-system", Fcheck_coding_system, Scheck_coding_system, | 7218 DEFUN ("check-coding-system", Fcheck_coding_system, Scheck_coding_system, |
7211 1, 1, 0, | 7219 1, 1, 0, |