Mercurial > emacs
comparison src/coding.c @ 90428:a8190f7e546e
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 285-296)
- Update from CVS
- Merge from gnus--rel--5.10
- Update from CVS: admin/FOR-RELEASE: Update refcard section.
* gnus--rel--5.10 (patch 102-104)
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-64
author | Miles Bader <miles@gnu.org> |
---|---|
date | Wed, 07 Jun 2006 18:05:10 +0000 |
parents | 263867fe7b55 ccef92f2f7f8 |
children | 0608690171d1 |
comparison
equal
deleted
inserted
replaced
90427:ddb25860d044 | 90428:a8190f7e546e |
---|---|
8313 to the primitive. Depending on which primitive, one of those arguments | 8313 to the primitive. Depending on which primitive, one of those arguments |
8314 is selected as the TARGET. For example, if OPERATION does file I/O, | 8314 is selected as the TARGET. For example, if OPERATION does file I/O, |
8315 whichever argument specifies the file name is TARGET. | 8315 whichever argument specifies the file name is TARGET. |
8316 | 8316 |
8317 TARGET has a meaning which depends on OPERATION: | 8317 TARGET has a meaning which depends on OPERATION: |
8318 For file I/O, TARGET is a file name. | 8318 For file I/O, TARGET is a file name (except for the special case below). |
8319 For process I/O, TARGET is a process name. | 8319 For process I/O, TARGET is a process name. |
8320 For network I/O, TARGET is a service name or a port number | 8320 For network I/O, TARGET is a service name or a port number |
8321 | 8321 |
8322 This function looks up what specified for TARGET in, | 8322 This function looks up what specified for TARGET in, |
8323 `file-coding-system-alist', `process-coding-system-alist', | 8323 `file-coding-system-alist', `process-coding-system-alist', |
8324 or `network-coding-system-alist' depending on OPERATION. | 8324 or `network-coding-system-alist' depending on OPERATION. |
8325 They may specify a coding system, a cons of coding systems, | 8325 They may specify a coding system, a cons of coding systems, |
8326 or a function symbol to call. | 8326 or a function symbol to call. |
8327 In the last case, we call the function with one argument, | 8327 In the last case, we call the function with one argument, |
8328 which is a list of all the arguments given to this function. | 8328 which is a list of all the arguments given to this function. |
8329 | |
8330 If OPERATION is `insert-file-contents', the argument corresponding to | |
8331 TARGET may be a cons (FILENAME . BUFFER). In that case, FILENAME is a | |
8332 file name to look up, and BUFFER is a buffer that contains the file's | |
8333 contents (not yet decoded). If `file-coding-system-alist' specifies a | |
8334 function to call for FILENAME, that function should examine the | |
8335 contents of BUFFER instead of reading the file. | |
8329 | 8336 |
8330 usage: (find-operation-coding-system OPERATION ARGUMENTS ...) */) | 8337 usage: (find-operation-coding-system OPERATION ARGUMENTS ...) */) |
8331 (nargs, args) | 8338 (nargs, args) |
8332 int nargs; | 8339 int nargs; |
8333 Lisp_Object *args; | 8340 Lisp_Object *args; |
8378 return Qnil; | 8385 return Qnil; |
8379 if (! NILP (Fcoding_system_p (val))) | 8386 if (! NILP (Fcoding_system_p (val))) |
8380 return Fcons (val, val); | 8387 return Fcons (val, val); |
8381 if (! NILP (Ffboundp (val))) | 8388 if (! NILP (Ffboundp (val))) |
8382 { | 8389 { |
8383 val = call1 (val, Flist (nargs, args)); | 8390 val = safe_call1 (val, Flist (nargs, args)); |
8384 if (CONSP (val)) | 8391 if (CONSP (val)) |
8385 return val; | 8392 return val; |
8386 if (SYMBOLP (val) && ! NILP (Fcoding_system_p (val))) | 8393 if (SYMBOLP (val) && ! NILP (Fcoding_system_p (val))) |
8387 return Fcons (val, val); | 8394 return Fcons (val, val); |
8388 } | 8395 } |