yatex
diff yatexprc.el @ 58:3a7c0c2bf16d
Official support for AMS-LaTeX, HTML, xdvi -remote, Netscape
author | yuuji |
---|---|
date | Thu, 01 Feb 1996 18:55:47 +0000 |
parents | 18f4939986e6 |
children | 48ac97a6b6ce |
line diff
1.1 --- a/yatexprc.el Sat Dec 02 18:35:28 1995 +0000 1.2 +++ b/yatexprc.el Thu Feb 01 18:55:47 1996 +0000 1.3 @@ -2,7 +2,7 @@ 1.4 ;;; YaTeX process handler. 1.5 ;;; yatexprc.el 1.6 ;;; (c )1993-1995 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] 1.7 -;;; Last modified Thu Nov 2 19:35:16 1995 on inspire 1.8 +;;; Last modified Fri Feb 2 02:09:57 1996 on supra 1.9 ;;; $Id$ 1.10 1.11 (require 'yatex) 1.12 @@ -350,7 +350,9 @@ 1.13 (interactive 1.14 (list 1.15 (read-string-with-history 1.16 - "Preview command: " dvi2-command 'YaTeX-preview-command-history) 1.17 + "Preview command: " 1.18 + (or (YaTeX-get-builtin "PREVIEW") dvi2-command) 1.19 + 'YaTeX-preview-command-history) 1.20 (read-string-with-history 1.21 "Preview file[.dvi]: " 1.22 (if (get 'dvi2-command 'region) 1.23 @@ -386,6 +388,32 @@ 1.24 " to preview " preview-file)))))) 1.25 ) 1.26 1.27 +(defvar YaTeX-xdvi-remote-program "xdvi") 1.28 +(defun YaTeX-xdvi-remote-search (&optional region-mode) 1.29 + "Search string at the point on xdvi -remote window. 1.30 +Non-nil for optional argument REGION-MODE specifies the search string 1.31 +by region." 1.32 + (interactive "P") 1.33 + (let ((pb " *xdvi*") str proc) 1.34 + (save-excursion 1.35 + (if region-mode 1.36 + (setq str (buffer-substring (region-beginning) (region-end))) 1.37 + (setq str (buffer-substring 1.38 + (point) 1.39 + (progn (skip-chars-forward "^\n\\\\}") (point))))) 1.40 + (message "Searching `%s'..." str) 1.41 + (if (boundp 'MULE) 1.42 + (define-program-coding-system 1.43 + (regexp-quote pb) (regexp-quote YaTeX-xdvi-remote-program) 1.44 + *euc-japan*)) 1.45 + (setq proc 1.46 + (start-process 1.47 + "xdvi" pb YaTeX-xdvi-remote-program 1.48 + "-remote" (format "SloppySearch(%s) " str) 1.49 + (concat (YaTeX-get-preview-file-name) ".dvi"))) 1.50 + (message "Searching `%s'...Done" str))) 1.51 +) 1.52 + 1.53 (defun YaTeX-set-virtual-error-position (file-sym line-sym) 1.54 "Replace the value of FILE-SYM, LINE-SYM by virtual error position." 1.55 (cond