home *** CD-ROM | disk | FTP | other *** search
/ ftp.madoka.org / 2014.12.ftp.madoka.org.tar / ftp.madoka.org / pub / irchat-pj / irchat-pj-2.4.24.22.tar.gz / irchat-pj-2.4.24.22.tar / irchat-pj-2.4.24.22 / irchat-pj-specific-mule2.el < prev    next >
Lisp/Scheme  |  1999-12-30  |  2KB  |  76 lines

  1. ;;;
  2. ;;; irchat-pj-specific-mule2.el
  3. ;;; last modify : Thu, 28 Oct 1999 00:04:46 +0900
  4. ;;;               by simm@irc.fan.gr.jp / irchat-PJ Project
  5. ;;; (date format modification by simm@irc.fan.gr.jp, Sun, 27 Jun 1999)
  6. ;;; see file irchat-copyright.el for change log and copyright info
  7. ;;;
  8.  
  9. ;;; for irchat-pj-coding-system.el
  10.  
  11. ;; define service / set process
  12.  
  13. (defsubst irchat-pj-define-service-coding-system (service)
  14.   (define-service-coding-system service nil (cons *noconv* *noconv*)))
  15.  
  16. (defsubst irchat-pj-set-process-coding-system (proc)
  17.   (set-process-coding-system proc *noconv* *noconv*))
  18.  
  19. ;; output functions
  20.  
  21. (defsubst irchat-pj-string-out-iso-2022-7bit-ss2 (str)
  22.   (code-convert-string str *internal* *iso-2022-ss2-7*))
  23.  
  24. (defsubst irchat-pj-string-out-iso-2022-jp (str)
  25.   (code-convert-string str *internal* *iso-2022-jp*))
  26.  
  27. (defsubst irchat-pj-string-out-euc-jp (str)
  28.   (code-convert-string str *internal* *euc-japan*))
  29.  
  30. (defsubst irchat-pj-string-out-sjis (str)
  31.   (code-convert-string str *internal* *sjis*))
  32.  
  33. ;; input functions
  34.  
  35. (defun irchat-pj-decode-coding-string (string coding-system)
  36.   (let (ret (len (length string)))
  37.     (catch 'ok
  38.       (while (< 0 len)
  39.     (and (setq ret (code-convert-string (substring string 0 len) coding-system *internal*))
  40.          (throw 'ok t))
  41.     (setq len (1- len))))
  42.     (or ret string)))
  43.  
  44. (defsubst irchat-pj-string-in-iso-2022-7bit-ss2 (str)
  45.   (irchat-pj-decode-coding-string str *iso-2022-ss2-7*))
  46.  
  47. (defsubst irchat-pj-string-in-iso-2022-jp (str)
  48.   (irchat-pj-decode-coding-string str *iso-2022-jp*))
  49.  
  50. (defsubst irchat-pj-string-in-euc-jp-internal (str)
  51.   (irchat-pj-decode-coding-string str *euc-japan*))
  52.  
  53. (defsubst irchat-pj-string-in-sjis-internal (str)
  54.   (irchat-pj-decode-coding-string str *sjis*))
  55.  
  56. ;;; for irchat-pj-version-string.el
  57.  
  58. (defun irchat-pj-set-emacs-version-string ()
  59.   "Set Emacs version string for CTCP VERSION"
  60.   (cond ((and (boundp 'mc-flag) mc-flag)
  61.      (concat "MULE "
  62.          (if (boundp 'rail-ja-mule-version)
  63.              rail-ja-mule-version
  64.            mule-version)
  65.          " GNU Emacs " emacs-version
  66.          " (" system-configuration ")"))
  67.     (t
  68.      (concat "MULE " mule-version " based on Emacs " emacs-version
  69.          " (" system-configuration ")"))))
  70.  
  71. (provide 'irchat-pj-specific-mule2)
  72.  
  73. ;;;
  74. ;;; end
  75. ;;;
  76.