Mercurial > hg > xemacs-beta
diff lisp/code-process.el @ 771:943eaba38521
[xemacs-hg @ 2002-03-13 08:51:24 by ben]
The big ben-mule-21-5 check-in!
Various files were added and deleted. See CHANGES-ben-mule.
There are still some test suite failures. No crashes, though.
Many of the failures have to do with problems in the test suite itself
rather than in the actual code. I'll be addressing these in the next
day or so -- none of the test suite failures are at all critical.
Meanwhile I'll be trying to address the biggest issues -- i.e. build
or run failures, which will almost certainly happen on various platforms.
All comments should be sent to ben@xemacs.org -- use a Cc: if necessary
when sending to mailing lists. There will be pre- and post- tags,
something like
pre-ben-mule-21-5-merge-in, and
post-ben-mule-21-5-merge-in.
author | ben |
---|---|
date | Wed, 13 Mar 2002 08:54:06 +0000 |
parents | 576fb035e263 |
children | 0490271de7d8 |
line wrap: on
line diff
--- a/lisp/code-process.el Fri Mar 08 13:33:14 2002 +0000 +++ b/lisp/code-process.el Wed Mar 13 08:54:06 2002 +0000 @@ -1,7 +1,7 @@ ;;; code-process.el --- Process coding functions for XEmacs. ;; Copyright (C) 1985-1987, 1993, 1994, 1997 Free Software Foundation, Inc. -;; Copyright (C) 1995 Ben Wing +;; Copyright (C) 1995, 2000 Ben Wing ;; Copyright (C) 1997 MORIOKA Tomohiko ;; Author: Ben Wing @@ -172,9 +172,11 @@ (setq cs-r ret cs-w ret)))) (let ((coding-system-for-read - (or coding-system-for-read cs-r 'undecided)) + (or coding-system-for-read cs-r + (car default-process-coding-system))) (coding-system-for-write - (or coding-system-for-write cs-w))) + (or coding-system-for-write cs-w + (cdr default-process-coding-system)))) (apply 'start-process-internal name buffer program program-args) ))) @@ -252,4 +254,20 @@ (or coding-system-for-write cs-w))) (open-network-stream-internal name buffer host service protocol)))) +(defun set-buffer-process-coding-system (decoding encoding) + "Set coding systems for the process associated with the current buffer. +DECODING is the coding system to be used to decode input from the process, +ENCODING is the coding system to be used to encode output to the process. + +For a list of possible values of CODING-SYSTEM, use \\[list-coding-systems]." + (interactive + "zCoding-system for process input: \nzCoding-system for process output: ") + (let ((proc (get-buffer-process (current-buffer)))) + (if (null proc) + (error "no process") + (get-coding-system decoding) + (get-coding-system encoding) + (set-process-coding-system proc decoding encoding))) + (force-mode-line-update)) + ;;; code-process.el ends here