Mercurial > hgrepos > hgweb.cgi > yatex
annotate yatexm-o.el @ 515:b6853d450b0a dev
Add a function to examine the point is in %#BEGIN/%#END or not.
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Thu, 04 Jan 2018 23:58:07 +0900 |
parents | 2a72779d9c50 |
children |
rev | line source |
---|---|
287 | 1 ;;; yatexm-o.el --- Sample to invoke yatex-mode with outline-minor mode |
2 | |
79
0734be649cb8
Do not care file-coding-system when YaTeX-kanji-code is nil.
yuuji
parents:
70
diff
changeset
|
3 ;;; (c)1993 by HIROSE Yuuji [yuuji@yatex.org] |
353
2a72779d9c50
Rewrite lambda notations to suppress annoying warnings from emacs24
HIROSE Yuuji <yuuji@gentei.org>
parents:
287
diff
changeset
|
4 ;;; Last modified Sun Dec 21 14:15:47 2014 on firestorm |
10 | 5 |
287 | 6 ;;; Code: |
10 | 7 ;;; |
8 ;; outline-minor-mode(使用しない場合は不要です) | |
9 ;;; | |
10 (autoload 'outline-minor-mode "min-out" t) | |
11 (make-variable-buffer-local 'outline-prefix-char) | |
12 (make-variable-buffer-local 'outline-regexp) | |
13 (setq default-outline-regexp "[*\^l]+") | |
14 (make-variable-buffer-local 'outline-level-function) | |
15 (setq-default outline-level-function 'outline-level-default) | |
58
3a7c0c2bf16d
Official support for AMS-LaTeX, HTML, xdvi -remote, Netscape
yuuji
parents:
16
diff
changeset
|
16 (setq LaTeX-outline-regexp |
10 | 17 (concat "[ \t]*" (regexp-quote "\\") |
18 "\\(appendix\\|documentstyle\\|part\\|chapter\\|section\\|" | |
58
3a7c0c2bf16d
Official support for AMS-LaTeX, HTML, xdvi -remote, Netscape
yuuji
parents:
16
diff
changeset
|
19 "subsection\\|subsubsection\\|paragraph\\|subparagraph\\)" |
3a7c0c2bf16d
Official support for AMS-LaTeX, HTML, xdvi -remote, Netscape
yuuji
parents:
16
diff
changeset
|
20 "\\*?[ \t]*[[{]")) |
10 | 21 |
22 ;;; | |
23 ;; yatex-mode | |
24 ;;; | |
25 (setq auto-mode-alist (cons '("\\.tex$" . yatex-mode) auto-mode-alist)) | |
26 (autoload 'yatex-mode "yatex" "Yet Another LaTeX mode" t) | |
27 ;;↓min-outを使用しない場合、;;@ の行は不要です。 | |
28 (defvar yatex-mode-hook | |
353
2a72779d9c50
Rewrite lambda notations to suppress annoying warnings from emacs24
HIROSE Yuuji <yuuji@gentei.org>
parents:
287
diff
changeset
|
29 (function |
2a72779d9c50
Rewrite lambda notations to suppress annoying warnings from emacs24
HIROSE Yuuji <yuuji@gentei.org>
parents:
287
diff
changeset
|
30 (lambda () |
10 | 31 (setq outline-regexp LaTeX-outline-regexp) ;;@ |
16
cb9afa9c1213
Auto-indentation at begin-type completion works correctly.
yuuji
parents:
13
diff
changeset
|
32 (outline-minor-mode 1) ;;@ |
353
2a72779d9c50
Rewrite lambda notations to suppress annoying warnings from emacs24
HIROSE Yuuji <yuuji@gentei.org>
parents:
287
diff
changeset
|
33 ))) |
10 | 34 (defvar yatex-mode-load-hook |
353
2a72779d9c50
Rewrite lambda notations to suppress annoying warnings from emacs24
HIROSE Yuuji <yuuji@gentei.org>
parents:
287
diff
changeset
|
35 (function |
2a72779d9c50
Rewrite lambda notations to suppress annoying warnings from emacs24
HIROSE Yuuji <yuuji@gentei.org>
parents:
287
diff
changeset
|
36 (lambda () |
10 | 37 (setq-default outline-prefix-char (concat YaTeX-prefix "\C-o"));;@ |
38 (require 'min-out) ;;@ | |
58
3a7c0c2bf16d
Official support for AMS-LaTeX, HTML, xdvi -remote, Netscape
yuuji
parents:
16
diff
changeset
|
39 ;;auctex 付属の min-out.el の場合これ↓ |
3a7c0c2bf16d
Official support for AMS-LaTeX, HTML, xdvi -remote, Netscape
yuuji
parents:
16
diff
changeset
|
40 ;(define-key outline-minor-keymap "\C-?" 'hide-subtree) ;;@ |
3a7c0c2bf16d
Official support for AMS-LaTeX, HTML, xdvi -remote, Netscape
yuuji
parents:
16
diff
changeset
|
41 ;;Emacs 付属の outline.el の場合これ↓ |
3a7c0c2bf16d
Official support for AMS-LaTeX, HTML, xdvi -remote, Netscape
yuuji
parents:
16
diff
changeset
|
42 (define-key outline-mode-prefix-map "\C-?" 'hide-subtree) |
16
cb9afa9c1213
Auto-indentation at begin-type completion works correctly.
yuuji
parents:
13
diff
changeset
|
43 (YaTeX-define-begend-key "ba" "abstract") |
353
2a72779d9c50
Rewrite lambda notations to suppress annoying warnings from emacs24
HIROSE Yuuji <yuuji@gentei.org>
parents:
287
diff
changeset
|
44 ))) |