-
Notifications
You must be signed in to change notification settings - Fork 0
/
yatexm-o.el
42 lines (39 loc) · 1.5 KB
/
yatexm-o.el
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
;;; yatexm-o.el --- Sample to invoke yatex-mode with outline-minor mode
;;; (c)1993 by HIROSE Yuuji [[email protected]]
;;; Last modified Sat Sep 1 08:12:40 2012 on firestorm
;;; Code:
;;;
;; outline-minor-mode(使用しない場合は不要です)
;;;
(autoload 'outline-minor-mode "min-out" t)
(make-variable-buffer-local 'outline-prefix-char)
(make-variable-buffer-local 'outline-regexp)
(setq default-outline-regexp "[*\^l]+")
(make-variable-buffer-local 'outline-level-function)
(setq-default outline-level-function 'outline-level-default)
(setq LaTeX-outline-regexp
(concat "[ \t]*" (regexp-quote "\\")
"\\(appendix\\|documentstyle\\|part\\|chapter\\|section\\|"
"subsection\\|subsubsection\\|paragraph\\|subparagraph\\)"
"\\*?[ \t]*[[{]"))
;;;
;; yatex-mode
;;;
(setq auto-mode-alist (cons '("\\.tex$" . yatex-mode) auto-mode-alist))
(autoload 'yatex-mode "yatex" "Yet Another LaTeX mode" t)
;;↓min-outを使用しない場合、;;@ の行は不要です。
(defvar yatex-mode-hook
'(lambda ()
(setq outline-regexp LaTeX-outline-regexp) ;;@
(outline-minor-mode 1) ;;@
))
(defvar yatex-mode-load-hook
'(lambda ()
(setq-default outline-prefix-char (concat YaTeX-prefix "\C-o"));;@
(require 'min-out) ;;@
;;auctex 付属の min-out.el の場合これ↓
;(define-key outline-minor-keymap "\C-?" 'hide-subtree) ;;@
;;Emacs 付属の outline.el の場合これ↓
(define-key outline-mode-prefix-map "\C-?" 'hide-subtree)
(YaTeX-define-begend-key "ba" "abstract")
))