yatex

changeset 147:f9d3c2451d19 dev

get-builtin for yahtml
author yuuji@gentei.org
date Mon, 27 Sep 2010 17:07:16 +0900
parents efc3819f749b
children 20a8da73ceb3 70b8cd70950a
files yahtml.el yatex.new yatexprc.el
diffstat 3 files changed, 12 insertions(+), 25 deletions(-) [+]
line diff
     1.1 --- a/yahtml.el	Sun Sep 12 10:59:55 2010 +0900
     1.2 +++ b/yahtml.el	Mon Sep 27 17:07:16 2010 +0900
     1.3 @@ -1,6 +1,6 @@
     1.4  ;;; -*- Emacs-Lisp -*-
     1.5  ;;; (c) 1994-2010 by HIROSE Yuuji [yuuji(@)yatex.org]
     1.6 -;;; Last modified Sun Sep 12 10:58:31 2010 on firestorm
     1.7 +;;; Last modified Mon Sep 13 08:09:46 2010 on firestorm
     1.8  ;;; $Id$
     1.9  
    1.10  (defconst yahtml-revision-number "1.74.2"
    1.11 @@ -907,6 +907,7 @@
    1.12        (and (setq a (yahtml-css-get-element-completion-alist form))
    1.13  	   (not (equal last-command-char ?\C-j))
    1.14  	   (memq yahtml-current-completion-type '(multiline inline))
    1.15 +	   (not (string-match "#" form))
    1.16  	   (yahtml-make-optional-argument ;should be made generic?
    1.17  	    "class" (yahtml-read-css a)))
    1.18        (if (and (intern-soft addin) (fboundp (intern-soft addin))
    1.19 @@ -1135,6 +1136,10 @@
    1.20       ((eq alist 'file)
    1.21        (let ((insert-default-directory))
    1.22  	(read-file-name prompt "" default nil "")))
    1.23 +     ((eq alist 'command)
    1.24 +      (if (fboundp 'read-shell-command)
    1.25 +	  (read-shell-command prompt)
    1.26 +	(read-string prompt)))
    1.27       ((and alist (symbolp alist))
    1.28        (completing-read prompt (symbol-value alist) nil nil default))
    1.29       (alist
    1.30 @@ -1685,7 +1690,8 @@
    1.31      (format "%s=\"%s\"--" (if (string-match "/" file) "virtual" "file") file)))
    1.32  
    1.33  (defun yahtml:!--\#exec ()
    1.34 -  (format "cmd=\"%s\"--" (yahtml-read-parameter "cmd" "" '(("cmd" . file)))))
    1.35 +  (format "cmd=\"%s\"--"
    1.36 +	  (yahtml-read-parameter "cmd" "" '(("cmd" . command)))))
    1.37  
    1.38  ;;; ---------- Jump ----------
    1.39  (defun yahtml-on-href-p ()
     2.1 --- a/yatex.new	Sun Sep 12 10:59:55 2010 +0900
     2.2 +++ b/yatex.new	Mon Sep 27 17:07:16 2010 +0900
     2.3 @@ -5,6 +5,9 @@
     2.4  	[prefix] t e でポイント位置を含む環境か数式環境をタイプセット。
     2.5  	M-C-SPC で環境だけでなく数式環境もマークする。
     2.6  	[prefix] t d でタイプセッタ起動成功のあと dvipdfmx を起動。
     2.7 +	=== yahtml ===
     2.8 +	[prefix] t ブラウザメニューに「n:新規ページ作成」を追加(実験)。
     2.9 +	[prefix] t j のlintコマンドを <!-- #lint CmdLine --> で指定可。
    2.10  
    2.11  1.74	=== yatex ===
    2.12  	YaTeX-kanji-code が 4 のときは UTF-8 とした。
     3.1 --- a/yatexprc.el	Sun Sep 12 10:59:55 2010 +0900
     3.2 +++ b/yatexprc.el	Mon Sep 27 17:07:16 2010 +0900
     3.3 @@ -2,7 +2,7 @@
     3.4  ;;; YaTeX process handler.
     3.5  ;;; yatexprc.el
     3.6  ;;; (c)1993-2010 by HIROSE Yuuji.[yuuji@yatex.org]
     3.7 -;;; Last modified Fri May 28 13:05:14 2010 on firestorm
     3.8 +;;; Last modified Fri Sep 10 17:47:38 2010 on firestorm
     3.9  ;;; $Id$
    3.10  
    3.11  ;(require 'yatex)
    3.12 @@ -918,28 +918,6 @@
    3.13        (YaTeX-switch-to-buffer-other-window
    3.14         (concat (YaTeX-get-preview-file-name) ".tex"))))
    3.15  
    3.16 -(defun YaTeX-get-builtin (key)
    3.17 -  "Read source built-in command of %# usage."
    3.18 -  (catch 'builtin
    3.19 -    (let ((bl (delq nil (list (current-buffer)
    3.20 -			      (and YaTeX-parent-file
    3.21 -				   (get-file-buffer YaTeX-parent-file))))))
    3.22 -      (save-excursion
    3.23 -	(while bl
    3.24 -	  (set-buffer (car bl))
    3.25 -	  (save-excursion
    3.26 -	    (goto-char (point-min))
    3.27 -	    (if (and (re-search-forward
    3.28 -		      (concat "^" (regexp-quote (concat "%#" key))) nil t)
    3.29 -		     (not (eolp)))
    3.30 -		(throw 'builtin
    3.31 -		       (YaTeX-buffer-substring
    3.32 -			(progn
    3.33 -			  (skip-chars-forward " \t" (point-end-of-line))
    3.34 -			  (point))
    3.35 -			(point-end-of-line)))))
    3.36 -	  (setq bl (cdr bl)))))))
    3.37 -
    3.38  (defun YaTeX-save-buffers ()
    3.39    "Save buffers whose major-mode is equal to current major-mode."
    3.40    (basic-save-buffer)