aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorGeoff Voelker1997-07-20 01:32:15 +0000
committerGeoff Voelker1997-07-20 01:32:15 +0000
commitcc2837184401cfcd8323eff8317827ee01ef8168 (patch)
treec86df9abb5ac128fb7b9e78f045b6e7e769315ed /lisp
parentfe831d33c5f276636f6ea8ba8e1b72bae5eafa51 (diff)
downloademacs-cc2837184401cfcd8323eff8317827ee01ef8168.tar.gz
emacs-cc2837184401cfcd8323eff8317827ee01ef8168.zip
(modify-coding-system-alist): Move to mule.el
Diffstat (limited to 'lisp')
-rw-r--r--lisp/international/mule-util.el53
1 files changed, 0 insertions, 53 deletions
diff --git a/lisp/international/mule-util.el b/lisp/international/mule-util.el
index b855a0b0e36..28a9c916e4b 100644
--- a/lisp/international/mule-util.el
+++ b/lisp/international/mule-util.el
@@ -279,59 +279,6 @@ If optional arg BASE-ONLY is non-nil, only base coding systems are listed."
279 codings))) 279 codings)))
280 280
281;;;###autoload 281;;;###autoload
282(defun modify-coding-system-alist (target-type regexp coding-system)
283 "Modify one of look up tables for finding a coding system on I/O operation.
284There are three of such tables, file-coding-system-alist,
285process-coding-system-alist, and network-coding-system-alist.
286
287TARGET-TYPE specifies which of them to modify.
288If it is `file', it affects file-coding-system-alist (which see).
289If it is `process', it affects process-coding-system-alist (which see).
290If it is `network', it affects network-codign-system-alist (which see).
291
292REGEXP is a regular expression matching a target of I/O operation.
293The target is a file name if TARGET-TYPE is `file', a program name if
294TARGET-TYPE is `process', or a network service name or a port number
295to connect to if TARGET-TYPE is `network'.
296
297CODING-SYSTEM is a coding system to perform code conversion on the I/O
298operation, or a cons of coding systems for decoding and encoding
299respectively, or a function symbol which returns the cons."
300 (or (memq target-type '(file process network))
301 (error "Invalid target type: %s" target-type))
302 (or (stringp regexp)
303 (and (eq target-type 'network) (integerp regexp))
304 (error "Invalid regular expression: %s" regexp))
305 (if (symbolp coding-system)
306 (if (not (fboundp coding-system))
307 (progn
308 (check-coding-system coding-system)
309 (setq coding-system (cons coding-system coding-system))))
310 (check-coding-system (car coding-system))
311 (check-coding-system (cdr coding-system)))
312 (cond ((eq target-type 'file)
313 (let ((slot (assoc regexp file-coding-system-alist)))
314 (if slot
315 (setcdr slot coding-system)
316 (setq file-coding-system-alist
317 (cons (cons regexp coding-system)
318 file-coding-system-alist)))))
319 ((eq target-type 'process)
320 (let ((slot (assoc regexp process-coding-system-alist)))
321 (if slot
322 (setcdr slot coding-system)
323 (setq process-coding-system-alist
324 (cons (cons regexp coding-system)
325 process-coding-system-alist)))))
326 (t
327 (let ((slot (assoc regexp network-coding-system-alist)))
328 (if slot
329 (setcdr slot coding-system)
330 (setq network-coding-system-alist
331 (cons (cons regexp coding-system)
332 network-coding-system-alist)))))))
333
334;;;###autoload
335(defun coding-system-plist (coding-system) 282(defun coding-system-plist (coding-system)
336 "Return property list of CODING-SYSTEM." 283 "Return property list of CODING-SYSTEM."
337 (let ((found nil) 284 (let ((found nil)