comparison lisp/mule/mule-misc.el @ 444:576fb035e263 r21-2-37

Import from CVS: tag r21-2-37
author cvs
date Mon, 13 Aug 2007 11:36:19 +0200
parents 84b14dcb0985
children 7039e6323819
comparison
equal deleted inserted replaced
443:a8296e22da4e 444:576fb035e263
17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of 17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 ;; General Public License for more details. 19 ;; General Public License for more details.
20 20
21 ;; You should have received a copy of the GNU General Public License 21 ;; You should have received a copy of the GNU General Public License
22 ;; along with XEmacs; see the file COPYING. If not, write to the 22 ;; along with XEmacs; see the file COPYING. If not, write to the
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, 23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24 ;; Boston, MA 02111-1307, USA. 24 ;; Boston, MA 02111-1307, USA.
25 25
26 ;;; 26 ;;;
27 ;;; protect specified local variables from kill-all-local-variables 27 ;;; protect specified local variables from kill-all-local-variables
218 ; (split-char c) 218 ; (split-char c)
219 ; (list 'ascii c) 219 ; (list 'ascii c)
220 ; )))) 220 ; ))))
221 221
222 222
223 ;;; Commands
224
225 (defun set-buffer-process-coding-system (decoding encoding)
226 "Set coding systems for the process associated with the current buffer.
227 DECODING is the coding system to be used to decode input from the process,
228 ENCODING is the coding system to be used to encode output to the process.
229
230 For a list of possible values of CODING-SYSTEM, use \\[list-coding-systems]."
231 (interactive
232 "zCoding-system for process input: \nzCoding-system for process output: ")
233 (let ((proc (get-buffer-process (current-buffer))))
234 (if (null proc)
235 (error "no process")
236 (check-coding-system decoding)
237 (check-coding-system encoding)
238 (set-process-coding-system proc decoding encoding)))
239 (force-mode-line-update))
240
241
242 ;;; Language environments 223 ;;; Language environments
243 224
244 ;; (defvar current-language-environment nil) 225 ;; (defvar current-language-environment nil)
245 226
246 ;; (defvar language-environment-list nil) 227 ;; (defvar language-environment-list nil)
312 prop) 293 prop)
313 (condition-case nil 294 (condition-case nil
314 (coding-system-property coding-system prop) 295 (coding-system-property coding-system prop)
315 (error nil)))) 296 (error nil))))
316 297
317 (defun coding-system-put (coding-system prop val) 298 (defun coding-system-put (coding-system prop value)
318 "Change value in CODING-SYSTEM's property list PROP to VAL." 299 "Change value in CODING-SYSTEM's property list PROP to VALUE."
319 (put (coding-system-name coding-system) 300 (put (coding-system-name coding-system)
320 'coding-system-property 301 'coding-system-property
321 (plist-put (get (coding-system-name coding-system) 302 (plist-put (get (coding-system-name coding-system)
322 'coding-system-property) 303 'coding-system-property)
323 prop val))) 304 prop value)))
324 305
325 (defun coding-system-category (coding-system) 306 (defun coding-system-category (coding-system)
326 "Return the coding category of CODING-SYSTEM." 307 "Return the coding category of CODING-SYSTEM."
327 (or (coding-system-get coding-system 'category) 308 (or (coding-system-get coding-system 'category)
328 (let ((type (coding-system-type coding-system))) 309 (let ((type (coding-system-type coding-system)))
354 (setq i (1+ i))) 335 (setq i (1+ i)))
355 (cond ((= dim 1) 'iso-8-1) 336 (cond ((= dim 1) 'iso-8-1)
356 ((= dim 2) 'iso-8-2) 337 ((= dim 2) 'iso-8-2)
357 (t 'iso-8-designate)) 338 (t 'iso-8-designate))
358 )))))))) 339 ))))))))
359 340
360 ;;; mule-misc.el ends here 341 ;;; mule-misc.el ends here