yatex
changeset 327:2bc5b59840d5 dev
Change default previewer after [prefix]td
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Thu, 13 Nov 2014 08:59:40 +0900 |
parents | d989511a492a |
children | d972598d233b |
files | yatex.el |
diffstat | 1 files changed, 16 insertions(+), 6 deletions(-) [+] |
line diff
1.1 --- a/yatex.el Wed Nov 05 09:09:22 2014 +0900 1.2 +++ b/yatex.el Thu Nov 13 08:59:40 2014 +0900 1.3 @@ -1,6 +1,6 @@ 1.4 ;;; yatex.el --- Yet Another tex-mode for emacs //–ì’¹// -*- coding: sjis -*- 1.5 ;;; (c)1991-2014 by HIROSE Yuuji.[yuuji@yatex.org] 1.6 -;;; Last modified Sun Jul 6 13:25:42 2014 on firestorm 1.7 +;;; Last modified Sun Sep 21 21:57:39 2014 on firestorm 1.8 ;;; $Id$ 1.9 ;;; The latest version of this software is always available at; 1.10 ;;; http://www.yatex.org/ 1.11 @@ -61,6 +61,13 @@ 1.12 "*Default previewer command including its option. 1.13 This default value is for X window system.") 1.14 1.15 +(defvar tex-pdfview-command ;previewer command for your site 1.16 + (cond 1.17 + (YaTeX-dos "acroread") 1.18 + (YaTeX-macos "open") 1.19 + (t "evince")) 1.20 + "*Default PDF viewer command including its option.") 1.21 + 1.22 (defvar makeindex-command (if YaTeX-dos "makeind" "makeindex") 1.23 "*Default makeindex command.") 1.24 1.25 @@ -1619,7 +1626,8 @@ 1.26 (require 'yatexprc) ;for Nemacs's bug 1.27 (select-window sw) 1.28 (cond 1.29 - ((memq c '(?j ?\C-j)) (YaTeX-typeset-buffer)) ; memq for usability test 1.30 + ((memq c '(?j ?\C-j)) (YaTeX-typeset-buffer) ; memq for usability test 1.31 + (put 'dvi2-command 'format 'dvi)) 1.32 ((= c ?r) (YaTeX-typeset-region)) 1.33 ((= c ?e) (YaTeX-typeset-environment)) 1.34 ((= c ?b) (YaTeX-call-builtin-on-file 1.35 @@ -1630,7 +1638,8 @@ 1.36 ((= c ?p) (call-interactively 'YaTeX-preview)) 1.37 ((= c ?q) (YaTeX-system "lpq" "*Printer queue*")) 1.38 ((= c ?d) (YaTeX-typeset-buffer 1.39 - (or (YaTeX-get-builtin "DVIPDF") YaTeX-dvipdf-command))) 1.40 + (or (YaTeX-get-builtin "DVIPDF") YaTeX-dvipdf-command)) 1.41 + (put 'dvi2-command 'format 'pdf)) 1.42 ((= c ?v) (YaTeX-view-error)) 1.43 ((= c ?l) (YaTeX-lpr arg)) 1.44 ((= c ?m) (YaTeX-switch-mode-menu arg)) 1.45 @@ -2019,9 +2028,10 @@ 1.46 (goto-char (match-beginning 0)) 1.47 (throw 'found t)) 1.48 ;;If inside of parentheses, try to escape. 1.49 - (while (condition-case err 1.50 - (progn (up-list -1) t) 1.51 - (error nil))) 1.52 + (while (and (not (= (preceding-char) ?\])) ;skip optional arg 1.53 + (condition-case err 1.54 + (progn (up-list -1) t) 1.55 + (error nil)))) 1.56 (while (equal (preceding-char) ?\]) (backward-list)) 1.57 ;;(2) search command directly 1.58 (skip-chars-forward "^{}[]")