# HG changeset patch # User yuuji@gentei.org # Date 1285574836 -32400 # Node ID f9d3c2451d19bc689566de05adc1d6d059fa5ad3 # Parent efc3819f749b77189377929662f911296aeed42c get-builtin for yahtml diff -r efc3819f749b -r f9d3c2451d19 yahtml.el --- a/yahtml.el Sun Sep 12 10:59:55 2010 +0900 +++ b/yahtml.el Mon Sep 27 17:07:16 2010 +0900 @@ -1,6 +1,6 @@ ;;; -*- Emacs-Lisp -*- ;;; (c) 1994-2010 by HIROSE Yuuji [yuuji(@)yatex.org] -;;; Last modified Sun Sep 12 10:58:31 2010 on firestorm +;;; Last modified Mon Sep 13 08:09:46 2010 on firestorm ;;; $Id$ (defconst yahtml-revision-number "1.74.2" @@ -907,6 +907,7 @@ (and (setq a (yahtml-css-get-element-completion-alist form)) (not (equal last-command-char ?\C-j)) (memq yahtml-current-completion-type '(multiline inline)) + (not (string-match "#" form)) (yahtml-make-optional-argument ;should be made generic? "class" (yahtml-read-css a))) (if (and (intern-soft addin) (fboundp (intern-soft addin)) @@ -1135,6 +1136,10 @@ ((eq alist 'file) (let ((insert-default-directory)) (read-file-name prompt "" default nil ""))) + ((eq alist 'command) + (if (fboundp 'read-shell-command) + (read-shell-command prompt) + (read-string prompt))) ((and alist (symbolp alist)) (completing-read prompt (symbol-value alist) nil nil default)) (alist @@ -1685,7 +1690,8 @@ (format "%s=\"%s\"--" (if (string-match "/" file) "virtual" "file") file))) (defun yahtml:!--\#exec () - (format "cmd=\"%s\"--" (yahtml-read-parameter "cmd" "" '(("cmd" . file))))) + (format "cmd=\"%s\"--" + (yahtml-read-parameter "cmd" "" '(("cmd" . command))))) ;;; ---------- Jump ---------- (defun yahtml-on-href-p () diff -r efc3819f749b -r f9d3c2451d19 yatex.new --- a/yatex.new Sun Sep 12 10:59:55 2010 +0900 +++ b/yatex.new Mon Sep 27 17:07:16 2010 +0900 @@ -5,6 +5,9 @@ [prefix] t e でポイント位置を含む環境か数式環境をタイプセット。 M-C-SPC で環境だけでなく数式環境もマークする。 [prefix] t d でタイプセッタ起動成功のあと dvipdfmx を起動。 + === yahtml === + [prefix] t ブラウザメニューに「n:新規ページ作成」を追加(実験)。 + [prefix] t j のlintコマンドを で指定可。 1.74 === yatex === YaTeX-kanji-code が 4 のときは UTF-8 とした。 diff -r efc3819f749b -r f9d3c2451d19 yatexprc.el --- a/yatexprc.el Sun Sep 12 10:59:55 2010 +0900 +++ b/yatexprc.el Mon Sep 27 17:07:16 2010 +0900 @@ -2,7 +2,7 @@ ;;; YaTeX process handler. ;;; yatexprc.el ;;; (c)1993-2010 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Fri May 28 13:05:14 2010 on firestorm +;;; Last modified Fri Sep 10 17:47:38 2010 on firestorm ;;; $Id$ ;(require 'yatex) @@ -918,28 +918,6 @@ (YaTeX-switch-to-buffer-other-window (concat (YaTeX-get-preview-file-name) ".tex")))) -(defun YaTeX-get-builtin (key) - "Read source built-in command of %# usage." - (catch 'builtin - (let ((bl (delq nil (list (current-buffer) - (and YaTeX-parent-file - (get-file-buffer YaTeX-parent-file)))))) - (save-excursion - (while bl - (set-buffer (car bl)) - (save-excursion - (goto-char (point-min)) - (if (and (re-search-forward - (concat "^" (regexp-quote (concat "%#" key))) nil t) - (not (eolp))) - (throw 'builtin - (YaTeX-buffer-substring - (progn - (skip-chars-forward " \t" (point-end-of-line)) - (point)) - (point-end-of-line))))) - (setq bl (cdr bl))))))) - (defun YaTeX-save-buffers () "Save buffers whose major-mode is equal to current major-mode." (basic-save-buffer)