/usr/share/t-code/init.el is in t-code-common 2:2.3.1-3.5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 | ;;; init.el --- init routine of skkinput3 for tc2
;;; $Id: init.el,v 1.3 2003/02/01 11:06:17 kitajima Exp $
;;; skkinput3.0.6¤Îskk10/init.el¤òÊѹ¹¡£
;; ¤³¤Î init.el ¤Ï emacs-20.7 ¤Ë´Þ¤Þ¤ì¤ë emacs-lisp ·²µÚ¤Ó skk10.62a
;; ¤«¤éÈ´¿è¡¢ÍøÍѤ·¤Æ¤¤¤ëÉôʬ¤¬¤¢¤ê¤Þ¤¹¡£
;; ¤³¤ì¤é¤Î copyright ¤Ï emacs, emacs-lisp ºî¼ÔµÚ¤Ó skk ºî¼Ô¤Ë¤¢¤ê¤Þ¤¹¡£
(setq global-map '(keymap
[set-mark-command beginning-of-line backward-char
mode-specific-command-prefix delete-char end-of-line
forward-char keyboard-quit delete-backward-char
indent-for-tab-command newline-and-indent kill-line
recenter newline-and-indent next-line
open-line previous-line quoted-insert
isearch-backward isearch-forward transpose-chars
universal-argument scroll-up kill-region
Control-X-prefix yank scroll-down
ESC-prefix toggle-input-method abort-recursive-edit
nil undo self-insert-command
self-insert-command self-insert-command self-insert-command
self-insert-command self-insert-command self-insert-command
self-insert-command self-insert-command self-insert-command
self-insert-command self-insert-command self-insert-command
self-insert-command self-insert-command self-insert-command
self-insert-command self-insert-command self-insert-command
self-insert-command self-insert-command self-insert-command
self-insert-command self-insert-command self-insert-command
self-insert-command self-insert-command self-insert-command
self-insert-command self-insert-command self-insert-command
self-insert-command self-insert-command self-insert-command
self-insert-command self-insert-command self-insert-command
self-insert-command self-insert-command self-insert-command
self-insert-command self-insert-command self-insert-command
self-insert-command self-insert-command self-insert-command
self-insert-command self-insert-command self-insert-command
self-insert-command self-insert-command self-insert-command
self-insert-command self-insert-command self-insert-command
self-insert-command self-insert-command self-insert-command
self-insert-command self-insert-command self-insert-command
self-insert-command self-insert-command self-insert-command
self-insert-command self-insert-command self-insert-command
self-insert-command self-insert-command self-insert-command
self-insert-command self-insert-command self-insert-command
self-insert-command self-insert-command self-insert-command
self-insert-command self-insert-command self-insert-command
self-insert-command self-insert-command self-insert-command
self-insert-command self-insert-command self-insert-command
self-insert-command self-insert-command self-insert-command
self-insert-command self-insert-command self-insert-command
self-insert-command self-insert-command self-insert-command
self-insert-command delete-backward-char]))
(setq im-local-map
'(keymap (0 . im-key-filter) (1 . im-key-filter) (2 . im-key-filter)
(3 . im-key-filter) (4 . im-key-filter) (5 . im-key-filter)
(6 . im-key-filter) (7 . im-key-filter) (8 . im-key-filter)
(9 . im-key-filter) (10 . im-key-filter) (11 . im-key-filter)
(12 . im-key-filter) (13 . im-newline) (14 . im-key-filter)
(15 . im-key-filter) (16 . im-key-filter) (17 . im-key-filter)
(18 . im-key-filter) (19 . im-key-filter) (20 . im-key-filter)
(21 . im-key-filter) (22 . im-key-filter) (23 . im-key-filter)
(24 . im-key-filter) (25 . im-key-filter) (26 . im-key-filter)
(27 . im-key-filter) (28 . im-end-conversion) (29 . im-key-filter)
(30 . im-key-filter) (31 . im-key-filter) (127 . im-key-filter)
(453050400 . im-end-conversion) (453509216 . im-end-conversion)
(t . im-key-notify)))
;(setq im-local-map nil)
(setq minibuffer-local-map
'(keymap (13 . exit-minibuffer) (7 . abort-recursive-edit)))
(setq minibuffer-local-completion-map
'(keymap (13 . exit-minibuffer) (7 . abort-recursive-edit)))
(setq minibuffer-local-ns-map
'(keymap (63 . self-insert-and-exit) (9 . exit-minibuffer) (32 . exit-minibuffer) (10 . skk-kakutei) (13 . exit-minibuffer) (7 . abort-recursive-edit)))
(setq mode-line-format '("" "%-"))
;(setq mode-line-format nil)
(setq overwrite-mode nil)
(setq auto-fill-function nil)
(setq unread-command-char -1)
(setq system-type 'unix)
(setq kill-ring nil)
(setq kill-ring-yank-pointer nil)
(setq minor-mode-alist nil)
(setq overriding-local-map nil)
(setq temporary-file-directory "/tmp/")
(setq skk-emacs-type 'mule4)
(defmacro when (cond &rest body)
(list 'if cond (cons 'progn body)))
(defmacro unless (cond &rest body)
(cons 'if (cons cond (cons nil body))))
(defvar save-match-data-internal)
(defmacro save-match-data (&rest body)
(` (let ((save-match-data-internal (match-data)))
(unwind-protect
(progn (,@ body))
(set-match-data save-match-data-internal)))))
(defun require (FEATURE &optional FILENAME NOERR)
(if (not (featurep FEATURE))
(progn
(if FILENAME
(load FILENAME)
(load (symbol-name FEATURE))))
t))
(defun keyboard-quit ()
(interactive)
(signal 'quit nil))
(defvar key-substitution-in-progress nil
"Used internally by substitute-key-definition.")
(defun substitute-key-definition (olddef newdef keymap &optional oldmap prefix)
(or prefix (setq prefix ""))
(let* ((scan (or oldmap keymap))
(vec1 (vector nil))
(prefix1 (vconcat prefix vec1))
(key-substitution-in-progress
(cons scan key-substitution-in-progress)))
;; Scan OLDMAP, finding each char or event-symbol that
;; has any definition, and act on it with hack-key.
(while (consp scan)
(if (consp (car scan))
(let ((char (car (car scan)))
(defn (cdr (car scan))))
;; The inside of this let duplicates exactly
;; the inside of the following let that handles array elements.
(aset vec1 0 char)
(aset prefix1 (length prefix) char)
(let (inner-def skipped)
;; Skip past menu-prompt.
(while (stringp (car-safe defn))
(setq skipped (cons (car defn) skipped))
(setq defn (cdr defn)))
;; Skip past cached key-equivalence data for menu items.
(and (consp defn) (consp (car defn))
(setq defn (cdr defn)))
(setq inner-def defn)
;; Look past a symbol that names a keymap.
(while (and (symbolp inner-def)
(fboundp inner-def))
(setq inner-def (symbol-function inner-def)))
(if (or (eq defn olddef)
;; Compare with equal if definition is a key sequence.
;; That is useful for operating on function-key-map.
(and (or (stringp defn) (vectorp defn))
(equal defn olddef)))
(define-key keymap prefix1 (nconc (nreverse skipped) newdef))
(if (and (keymapp defn)
;; Avoid recursively scanning
;; where KEYMAP does not have a submap.
(let ((elt (lookup-key keymap prefix1)))
(or (null elt)
(keymapp elt)))
;; Avoid recursively rescanning keymap being scanned.
(not (memq inner-def
key-substitution-in-progress)))
;; If this one isn't being scanned already,
;; scan it now.
(substitute-key-definition olddef newdef keymap
inner-def
prefix1)))))
(if (vectorp (car scan))
(let* ((array (car scan))
(len (length array))
(i 0))
(while (< i len)
(let ((char i) (defn (aref array i)))
;; The inside of this let duplicates exactly
;; the inside of the previous let.
(aset vec1 0 char)
(aset prefix1 (length prefix) char)
(let (inner-def skipped)
;; Skip past menu-prompt.
(while (stringp (car-safe defn))
(setq skipped (cons (car defn) skipped))
(setq defn (cdr defn)))
(and (consp defn) (consp (car defn))
(setq defn (cdr defn)))
(setq inner-def defn)
(while (and (symbolp inner-def)
(fboundp inner-def))
(setq inner-def (symbol-function inner-def)))
(if (or (eq defn olddef)
(and (or (stringp defn) (vectorp defn))
(equal defn olddef)))
(define-key keymap prefix1
(nconc (nreverse skipped) newdef))
(if (and (keymapp defn)
(let ((elt (lookup-key keymap prefix1)))
(or (null elt)
(keymapp elt)))
(not (memq inner-def
key-substitution-in-progress)))
(substitute-key-definition olddef newdef keymap
inner-def
prefix1)))))
(setq i (1+ i))))))
(setq scan (cdr scan)))))
(defmacro insert-and-inherit(str)
(list 'insert str))
(defmacro buffer-substring-no-properties(START END)
(list 'buffer-substring START END))
(defmacro with-current-buffer (buffer &rest body)
(` (save-current-buffer
(set-buffer (, buffer))
(,@ body))))
(defmacro ad-real-fset(SYMBOL DEFINITION)
(list 'fset SYMBOL DEFINITION))
(defmacro ad-real-documentation(FUNCTION &optional RAW)
(list 'documentation FUNCTION RAW))
(defun split-string (string &optional separators)
(let ((rexp (or separators "[ \f\t\n\r\v]+"))
(start 0)
notfirst
(list nil))
(while (and (string-match rexp string
(if (and notfirst
(= start (match-beginning 0))
(< start (length string)))
(1+ start) start))
(< (match-beginning 0) (length string)))
(setq notfirst t)
(or (eq (match-beginning 0) 0)
(and (eq (match-beginning 0) (match-end 0))
(eq (match-beginning 0) start))
(setq list
(cons (substring string start (match-beginning 0))
list)))
(setq start (match-end 0)))
(or (eq start (length string))
(setq list
(cons (substring string start)
list)))
(nreverse list)))
(defun cancel-undo-boundary()
nil)
(defun remove-hook (hook function &optional local)
(if (or (not (boundp hook)) ;unbound symbol, or
(not (default-boundp hook))
(null (symbol-value hook)) ;value is nil, or
(null function)) ;function is nil, then
nil ;Do nothing.
(if (or local
;; Detect the case where make-local-variable was used on a hook
;; and do what we used to do.
(and (local-variable-p hook)
(consp (symbol-value hook))
(not (memq t (symbol-value hook)))))
(let ((hook-value (symbol-value hook)))
(if (consp hook-value)
(if (member function hook-value)
(setq hook-value (delete function (copy-sequence hook-value))))
(if (equal hook-value function)
(setq hook-value nil)))
(set hook hook-value))
(let ((hook-value (default-value hook)))
(if (and (consp hook-value) (not (functionp hook-value)))
(if (member function hook-value)
(setq hook-value (delete function (copy-sequence hook-value))))
(if (equal hook-value function)
(setq hook-value nil)))
(set-default hook hook-value)))))
(setq custom-declare-variable-list nil)
(setq current-load-list nil)
(defun charset-list ()
'(ascii latin-iso8859-1 latin-iso8859-2 latin-iso8859-3
iso8859-4 iso8859-5 iso8859-6 iso8859-7
iso8859-14 iso8859-15 katakana-jisx0201 japanese-jisx0208-1978
japanese-jisx0208 japanese-jisx0212 chinese-gb2312
korean-ksc5601 chinese-cns11643-1))
(defun write-region-as-coding-system
(coding-system start end filename &optional append visit lockname)
(let ((coding-system-for-write coding-system))
(write-region start end filename append visit lockname)))
(defun match-string (num &optional string)
(if (match-beginning num)
(if string
(substring string (match-beginning num) (match-end num))
(buffer-substring (match-beginning num) (match-end num)))))
(defmacro with-temp-buffer (&rest body)
(let ((temp-buffer (make-symbol "temp-buffer")))
(` (let (((, temp-buffer)
(get-buffer-create (generate-new-buffer-name " *temp*"))))
(unwind-protect
(with-current-buffer ,temp-buffer
(,@ body))
(and (buffer-name (, temp-buffer))
(kill-buffer (, temp-buffer))))))))
(defun caar(X) (car (car X)))
(defun cdar(X) (cdr (car X)))
(defun cadr(X) (car (cdr X)))
(defun cddr(X) (cdr (cdr X)))
;;; loading t-code modules.
(load "load-path.el")
(load "tc-skki.el")
(load "tc.el")
;;; defined in skk.el
(defun skk-command-key-sequence (key command)
;; KEY ¤«¤é universal arguments ¤ò¼è¤ê½ü¤¡¢COMMAND ¤ò¼Â¹Ô¤¹¤ë¥¡¼¤òÊÖ¤¹¡£
;; `execute-extended-command' ¤Ë¤è¤Ã¤Æ¥³¥Þ¥ó¥É¤¬¼Â¹Ô¤µ¤ì¤¿¾ì¹ç¤Ï¡¢nil ¤òÊÖ¤¹¡£
(while (not (or (zerop (length key))
(eq command (key-binding key))))
(setq key (vconcat (cdr (append key nil)))))
(and (not (zerop (length key))) key))
(defun im-auto-send-text ()
(im-send-text im-client (buffer-substring (point-min) (point-max)))
(delete-region (point-min) (point-max)))
(defun im-newline (arg)
(interactive "p")
(let ((str (buffer-string)))
(if (> (length str) 0)
(im-send-text im-client str))
(im-send-text im-client "\n")
(erase-buffer)))
(defun im-end-conversion (arg)
(interactive "p")
(im-auto-send-text)
(run-hooks 'tcode-im-end-conversion-hook)
(im-send-end-conversion im-client))
(defun im-key-notify (arg)
(interactive "p")
; ʸ»ú¤¬Æþ¤Ã¤Æ¤¤¤ë»þ¤Ë¸ú²Ì¤¬¤¢¤ë¤è¤¦¤Ë¤¹¤ë¤Ù¤¤«Èݤ«¡£
; (if (= (point-min) (point-max)) ¤òÄɲ乤뤫¤É¤¦¤«¡¢¤Ç¤¹¤¬¡£
(im-send-key im-client last-command-event))
(defun im-key-filter (arg)
(interactive "p")
(let ((prefix-arg arg)
(local-map (current-local-map))
(keys (skk-command-key-sequence (this-command-keys) this-command))
(buf (current-buffer)))
(if (= (point-min) (point-max))
(im-send-key im-client last-command-event)
(if (null keys)
;; no alternative commands. may be invoked by M-x.
nil
(unwind-protect
(progn
(use-local-map nil)
(let ((command (j-key-binding keys)))
(if (eq command this-command)
;; avoid recursive calling of j-emulate-original-map.
nil
;; if no bindings are found, call `undefined'. it's
;; original behaviour.
;; ¤Ç¤â¡¢condition-case ¤Ç½¦¤ï¤Ê¤«¤Ã¤¿¤é¡¢local-map
;; ¤¬Éü¸µ¤Ç¤¤Ê¤¯¤Æº¤¤Ã¤Æ¤·¤Þ¤¦¡£
(setq this-command (or command (function undefined)))
(condition-case nil
(command-execute this-command)
(error nil)))))
;; restore skk keymap.
(save-excursion
(set-buffer buf)
(use-local-map local-map)))))))
|