Function: skkdic-get-kana-compact-codes

skkdic-get-kana-compact-codes is a byte-compiled function defined in ja-dic-cnv.el.gz.

Signature

(skkdic-get-kana-compact-codes KANA)

Source Code

;; Defined in /usr/src/emacs/lisp/international/ja-dic-cnv.el.gz
;; The following macros are expanded at byte-compiling time so that
;; compiled code can be loaded quickly.

(defun skkdic-get-kana-compact-codes (kana)
  (let* ((len (length kana))
	 (vec (make-vector len 0))
	 (i 0)
	 ch)
    (while (< i len)
      (setq ch (aref kana i))
      (aset vec i
	    (if (< ch 128)		; CH is an ASCII letter for OKURIGANA,
		(- ch)			;  represented by a negative code.
	      (if (= ch ?ー)		; `' is represented by 0.
		  0
		(- (logand (encode-char ch 'japanese-jisx0208) #xFF) 32))))
      (setq i (1+ i)))
    vec))