Created
April 3, 2013 06:36
-
-
Save munepi/5298924 to your computer and use it in GitHub Desktop.
an YaTeX http://www.yatex.org/ extension of Auto Complete Mode http://cx4a.org/software/auto-complete/ We remark that we recommend auto-complete-latex https://bitbucket.org/tequilasunset/auto-complete-latex :)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; auto-complete-yatex.el --- A YaTeX extention for Auto Complete Mode | |
;; Copyright (C) 2008-2011 Munehiro Yamamoto | |
;; Author: Munehiro Yamamoto <[email protected]> | |
;; Keywords: YaTeX LaTeX TeX | |
;; Version: 1.3.1.1 | |
;; This program is free software; you can redistribute it and/or modify | |
;; it under the terms of the GNU General Public License as published by | |
;; the Free Software Foundation, either version 3 of the License, or | |
;; (at your option) any later version. | |
;; This program is distributed in the hope that it will be useful, | |
;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
;; GNU General Public License for more details. | |
;; You should have received a copy of the GNU General Public License | |
;; along with this program. If not, see <http://www.gnu.org/licenses/>. | |
;;; History: | |
;; 2011-08-24 Munehiro Yamamoto <[email protected]> | |
;; | |
;; * supported auto-complete-mode v1.3.1 | |
;; | |
;; 2008-03-04 Munehiro Yamamoto <[email protected]> | |
;; | |
;; * added original YaTeX keywords to ac-yatex-keywords | |
;; * defvar ac-yatex-user-keywords | |
;; | |
;; 2008-03-01 Munehiro Yamamoto <[email protected]> | |
;; | |
;; * first release | |
;; | |
(require 'auto-complete) | |
(require 'yatex) | |
(require 'yatexadd) | |
;(require 'yatexmth) | |
;(require 'yatexpkg) | |
;(require 'yatexsec) | |
(defvar ac-source-yatex-user-candiates nil | |
"A list of your YaTeX keywords.") | |
(defvar ac-source-yatex-candiates | |
;; (sort | |
(append | |
ac-source-yatex-user-candiates | |
;; yatex.el | |
section-table user-section-table tmp-section-table | |
YaTeX-math-begin-list | |
YaTeX-math-gathering-list | |
env-table user-env-table tmp-env-table | |
fontsize-table user-fontsize-table tmp-fontsize-table | |
singlecmd-table user-singlecmd-table tmp-singlecmd-table | |
;; yatexadd.el | |
YaTeX:style-parameters-default | |
YaTeX:style-parameters-private | |
YaTeX:style-parameters-local | |
;; YaTeX:documentstyles-default | |
;; YaTeX:documentstyles-private | |
;; YaTeX:documentstyles-local | |
;; YaTeX:documentstyle-options-default | |
;; YaTeX:documentstyle-options-private | |
;; YaTeX:documentstyle-options-local | |
YaTeX:documentclass-options-default | |
YaTeX:documentclass-options-private | |
YaTeX:documentclass-options-local | |
YaTeX:documentclasses-default | |
YaTeX:documentclasses-private | |
YaTeX:documentclasses-local | |
YaTeX:latex2e-named-color-alist | |
YaTeX:latex2e-basic-color-alist | |
YaTeX::usepackage-alist-default | |
YaTeX::usepackage-alist-private | |
YaTeX::usepackage-alist-local | |
;; yatexmth.el | |
;YaTeX-math-sign-alist | |
;YaTeX-greek-key-alist | |
;; yatexpkg.el | |
;YaTeX-package-alist-default | |
;YaTeX-package-graphics-driver-alist | |
;YaTeX-package-alist-private | |
;; yatexsec.el | |
;YaTeX-sectioning-level | |
);; #'(lambda (a b) (> (length a) (length b))) | |
) | |
(defvar ac-source-yatex | |
'((candidates | |
. (lambda () | |
(all-completions ac-target ac-source-yatex-candiates)))) | |
"A Source of YaTeX keywords") | |
(defun ac-yatex-setup () | |
(add-to-list 'ac-modes 'yatex-mode) | |
(add-to-list 'ac-sources 'ac-source-yatex) | |
) | |
(add-hook 'yatex-mode-hook 'ac-yatex-setup) | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
(provide 'auto-complete-yatex) | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; Local Variables: | |
;; mode: emacs-lisp | |
;; End: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
wnn7egg による日本語入力モードのとき、auto-complete-mode を off にするには、以下のようにしていた。
同じようにして、一般には以下でいけるみたい。