yatex
diff yatexlib.el @ 505:55a20e3120a0
Add some PDF reader to pattern
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Tue, 02 Jan 2018 23:28:35 +0900 |
parents | c0827f80b18e |
children | b6853d450b0a |
line diff
1.1 --- a/yatexlib.el Sun Sep 17 10:25:38 2017 +0859 1.2 +++ b/yatexlib.el Tue Jan 02 23:28:35 2018 +0900 1.3 @@ -1,7 +1,7 @@ 1.4 ;;; yatexlib.el --- YaTeX and yahtml common libraries -*- coding: sjis -*- 1.5 ;;; 1.6 ;;; (c)1994-2017 by HIROSE Yuuji.[yuuji@yatex.org] 1.7 -;;; Last modified Sun Sep 17 10:23:31 2017 on firestorm 1.8 +;;; Last modified Tue Jan 2 17:50:03 2018 on firestorm 1.9 ;;; $Id$ 1.10 1.11 ;;; Code: 1.12 @@ -121,6 +121,25 @@ 1.13 1.14 ;---------- Define default key bindings on YaTeX mode map ---------- 1.15 ;;;###autoload 1.16 +(defun YaTeX-kanji-ptex-mnemonic () 1.17 + "Return the kanji-mnemonic of pTeX from current buffer's coding-system." 1.18 + (if (boundp 'NEMACS) 1.19 + (or (cdr-safe (assq kanji-fileio-code 1.20 + '((1 . "sjis") (2 . "jis") (3 . "euc")))) 1.21 + "") 1.22 + (let ((coding 1.23 + (cond 1.24 + ((boundp 'buffer-file-coding-system) 1.25 + (symbol-name buffer-file-coding-system)) 1.26 + ((boundp 'file-coding-system) (symbol-name file-coding-system)))) 1.27 + (case-fold-search t)) 1.28 + (cond ((string-match "utf-8\\>" coding) "utf-8") 1.29 + ((string-match "shift.jis\\|cp932\\>" coding) "sjis") 1.30 + ((string-match "junet\\|iso.2022" coding) "jis") 1.31 + ((string-match "euc.jp\\|ja.*iso.8bit" coding) "euc") 1.32 + (t ""))))) 1.33 + 1.34 +;;;###autoload 1.35 (defun YaTeX-define-key (key binding &optional map) 1.36 "Define key on YaTeX-prefix-map." 1.37 (if YaTeX-inhibit-prefix-letter