changeset 509:3796f4f7c81d dev

Begin implementation of helper for markdown-style graph generators.
author HIROSE Yuuji <yuuji@gentei.org>
date Wed, 03 Jan 2018 23:56:27 +0900
parents f5cf5888847d
children 7a64b7761d6b
files yatex.el yatexprc.el
diffstat 2 files changed, 22 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/yatex.el	Wed Jan 03 23:53:56 2018 +0900
+++ b/yatex.el	Wed Jan 03 23:56:27 2018 +0900
@@ -1,6 +1,6 @@
 ;;; yatex.el --- Yet Another tex-mode for emacs //쒹// -*- coding: sjis -*-
-;;; (c)1991-2017 by HIROSE Yuuji.[yuuji@yatex.org]
-;;; Last modified Tue Jan  2 23:11:09 2018 on firestorm
+;;; (c)1991-2018 by HIROSE Yuuji.[yuuji@yatex.org]
+;;; Last modified Wed Jan  3 23:54:28 2018 on firestorm
 ;;; $Id$
 ;;; The latest version of this software is always available at;
 ;;; https://www.yatex.org/
@@ -16,7 +16,7 @@
 
 ;;; Code:
 (require 'yatexlib)
-(defconst YaTeX-revision-number "1.80.1"
+(defconst YaTeX-revision-number "1.80.2"
   "Revision number of running yatex.el")
 
 ;---------- Local variables ----------
@@ -1994,6 +1994,19 @@
   "*Alist of files' processor vs. its extension;
 See also the documentation of YaTeX-processed-file-regexp-alist.")
 
+;; Will go to yatexflt.el
+(defun YaTeX-filter-goto-source (file other-win)
+  "Go to corresponding text source of the graphic file"
+  (cond
+   ((file-exists-p file)
+    (let ((buf (find-file-noselect file)))
+      (funcall (cond (other-win 'YaTeX-switch-to-buffer-other-window)
+		     ((get-buffer-window buf) 'goto-buffer-window)
+		     (t 'YaTeX-switch-to-buffer))
+	       buf)
+      
+  ))))
+
 (defvar YaTeX-file-processor-alist-default
   (list (cons YaTeX-cmd-tgif ".obj")
 	(cons YaTeX-cmd-gimp ".xcf")
@@ -2004,6 +2017,9 @@
 	(cons YaTeX-cmd-edit-ai ".ai")
 	'("dia" . ".dia")
 	(cons YaTeX-cmd-ooo ".odg")
+	(cons 'YaTeX-filter-goto-source ".diag")
+	(cons 'YaTeX-filter-goto-source ".dot")
+	;; List of target file itself below...
 	(cons YaTeX-cmd-edit-images ".jpeg")
 	(cons YaTeX-cmd-edit-images ".jpg")
 	(cons YaTeX-cmd-edit-images ".png")
@@ -2258,12 +2274,7 @@
 (defun YaTeX-goto-corresponding-*-other-window (arg)
   "Parse current line and call suitable function."
   (interactive "P")
-  (cond
-   ((YaTeX-goto-corresponding-label arg t))
-   ;;((YaTeX-goto-corresponding-environment))
-   ((YaTeX-goto-corresponding-file t))
-   ;;((YaTeX-goto-corresponding-BEGIN-END))
-   (t (message "I don't know where to go."))))
+  (YaTeX-goto-corresponding-* t))
 
 (defun YaTeX-comment-region (alt-prefix)
   "Comment out region by '%'.
--- a/yatexprc.el	Wed Jan 03 23:53:56 2018 +0900
+++ b/yatexprc.el	Wed Jan 03 23:56:27 2018 +0900
@@ -1,7 +1,7 @@
 ;;; yatexprc.el --- YaTeX process handler -*- coding: sjis -*-
 ;;; 
-;;; (c)1993-2017 by HIROSE Yuuji.[yuuji@yatex.org]
-;;; Last modified Tue Jan  2 23:31:34 2018 on firestorm
+;;; (c)1993-2018 by HIROSE Yuuji.[yuuji@yatex.org]
+;;; Last modified Wed Jan  3 23:54:10 2018 on firestorm
 ;;; $Id$
 
 ;;; Code: