changeset 521:cef987df070f dev

Move main stuffs of SpecialFilter to yatexflt.el
author HIROSE Yuuji <yuuji@gentei.org>
date Tue, 09 Jan 2018 13:35:08 +0900
parents 52175326855d
children ce46889a743d
files yatex.el yatexflt.el
diffstat 2 files changed, 58 insertions(+), 58 deletions(-) [+]
line wrap: on
line diff
--- a/yatex.el	Tue Jan 09 13:33:50 2018 +0900
+++ b/yatex.el	Tue Jan 09 13:35:08 2018 +0900
@@ -1,6 +1,6 @@
 ;;; yatex.el --- Yet Another tex-mode for emacs //쒹// -*- coding: sjis -*-
 ;;; (c)1991-2018 by HIROSE Yuuji.[yuuji@yatex.org]
-;;; Last modified Sat Jan  6 22:52:02 2018 on firestorm
+;;; Last modified Tue Jan  9 13:30:45 2018 on firestorm
 ;;; $Id$
 ;;; The latest version of this software is always available at;
 ;;; https://www.yatex.org/
@@ -378,58 +378,6 @@
 
 (defvar YaTeX-use-dot-env-extension t
   "*Use YaTeX's dot-env filter special environment.")
-(defvar YaTeX-filter-special-env-alist-default
-  '((".blockdiag"
-     "blockdiag -T %t -o %o -"
-     "blockdiag {
-  default_fontsize = 32;
-  A -> B;
-}")
-    (".seqdiag" "seqdiag -T %t -o %o -"
-     "seqdiag {
-  client -> server [label = \"SYN\"];
-  client <- server [label = \"SYN/ACK\"];
-  client -> server [label = \"ACK\"];}")
-    (".actdiag" "actdiag -T %t -o %o -"
-     "actdiag {
-  sayHo -> ho -> hohoho
-  lane dj {
-    label = \"DJ\"
-    sayHo [label = \"Say Ho\"]; hohoho [label = \"Ho Ho Ho!\"]; }
-  lane mc { label = \"MC\"; ho [label = \"Hooooh!\"]}}")
-    (".nwdiag" "nwdiag -T %t -o %o -"
-     "nwdiag {
-  network ext {
-    address = \"10.1.2.0/24\"
-    router [address = \"10.1.2.1\"]
-  }
-  network int {
-    address = \"192.168.22.0/24\"
-    router [address = \"192.168.22.1\"]
-    websrv [address = \"192.168.22.80\"]
-    cli-1; cli-2
-  }
-}")
-    (".rackdiag" "rackdiag -T %t -o %o -"
-     "rackdiag {
-  16U;
-  1: UPS [4U]; 5: Storage [3U]; 8: PC [2U]; 8: PC [2U];
-}")
-    (".dot"
-     "dot -T %t -o %o"
-     "digraph {
-  graph [charset=\"utf-8\"]
-}
-bigraph {
-  graph [charset=\"utf-8\"]}"
-     )))
-
-(defvar YaTeX-filter-special-env-alist-private nil)
-(defvar YaTeX-filter-special-env-alist
-  (append YaTeX-filter-special-env-alist-private
-	  YaTeX-filter-special-env-alist-default))
-
-
 
 ; Set tex-environment possible completion
 (defvar env-table
@@ -455,10 +403,9 @@
 	 ("breakbox")))			;defined in eclbkbox
    (if YaTeX-use-AMS-LaTeX YaTeX-ams-env-table)
    YaTeX-math-other-env-alist
-   (if YaTeX-use-dot-env-extension
-       '((".blockdiag") (".nwdiag") (".seqdiag") (".rackdiag") (".packetdiag")
-	 (".dot"))
-     ))
+   (and YaTeX-use-dot-env-extension
+	(require 'yatexflt)
+	YaTeX-filter-special-env-alist))
   "Default completion table for begin-type completion.")
 
 (defvar user-env-table nil)
--- a/yatexflt.el	Tue Jan 09 13:33:50 2018 +0900
+++ b/yatexflt.el	Tue Jan 09 13:35:08 2018 +0900
@@ -1,7 +1,7 @@
 ;;; yatexflt.el --- YaTeX filter command utilizer -*- coding: sjis -*-
 ;;; 
 ;;; (c)1993-2018 by HIROSE Yuuji.[yuuji@yatex.org]
-;;; Last modified Sun Jan  7 11:38:12 2018 on firestorm
+;;; Last modified Tue Jan  9 13:28:56 2018 on firestorm
 ;;; $Id$
 
 ;;; Commentary:
@@ -36,7 +36,60 @@
 ;;;	Then foo.pdf file will be generated and the image (as PNG) will
 ;;;	be displayed in the next window.
 
+
 ;;; Code:
+(require 'yatexlib)
+(defvar YaTeX-filter-special-env-alist-default
+  '((".blockdiag"
+     "blockdiag -T %t -o %o -"
+     "blockdiag {
+  default_fontsize = 32;
+  A -> B;
+}")
+    (".seqdiag" "seqdiag -T %t -o %o -"
+     "seqdiag {
+  client -> server [label = \"SYN\"];
+  client <- server [label = \"SYN/ACK\"];
+  client -> server [label = \"ACK\"];}")
+    (".actdiag" "actdiag -T %t -o %o -"
+     "actdiag {
+  sayHo -> ho -> hohoho
+  lane dj {
+    label = \"DJ\"
+    sayHo [label = \"Say Ho\"]; hohoho [label = \"Ho Ho Ho!\"]; }
+  lane mc { label = \"MC\"; ho [label = \"Hooooh!\"]}}")
+    (".nwdiag" "nwdiag -T %t -o %o -"
+     "nwdiag {
+  network ext {
+    address = \"10.1.2.0/24\"
+    router [address = \"10.1.2.1\"]
+  }
+  network int {
+    address = \"192.168.22.0/24\"
+    router [address = \"192.168.22.1\"]
+    websrv [address = \"192.168.22.80\"]
+    cli-1; cli-2
+  }
+}")
+    (".rackdiag" "rackdiag -T %t -o %o -"
+     "rackdiag {
+  16U;
+  1: UPS [4U]; 5: Storage [3U]; 8: PC [2U]; 8: PC [2U];
+}")
+    (".dot"
+     "dot -T %t -o %o"
+     "digraph {
+  graph [charset=\"utf-8\"]
+}
+bigraph {
+  graph [charset=\"utf-8\"]}"
+     )))
+
+(defvar YaTeX-filter-special-env-alist-private nil)
+(defvar YaTeX-filter-special-env-alist
+  (append YaTeX-filter-special-env-alist-private
+	  YaTeX-filter-special-env-alist-default))
+
 (defun YaTeX-filter-filter-set-conversion-flag ()
   (let ((ovl (get 'YaTeX-filter-filter-sentinel 'overlay)))
     (if ovl				;; When successful conversion met,