yatex
changeset 396:2fc714f03ddf dev
Clarify which element the current class name completions for
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Fri, 16 Jan 2015 10:47:48 +0900 |
parents | 5aa8208fbef0 |
children | d9c23841313b |
files | yahtml.el |
diffstat | 1 files changed, 13 insertions(+), 11 deletions(-) [+] |
line diff
1.1 --- a/yahtml.el Fri Jan 16 10:39:19 2015 +0900 1.2 +++ b/yahtml.el Fri Jan 16 10:47:48 2015 +0900 1.3 @@ -1,9 +1,9 @@ 1.4 ;;; yahtml.el --- Yet Another HTML mode -*- coding: sjis -*- 1.5 -;;; (c) 1994-2013 by HIROSE Yuuji [yuuji(@)yatex.org] 1.6 -;;; Last modified Fri Jan 16 10:00:10 2015 on firestorm 1.7 +;;; (c) 1994-2015 by HIROSE Yuuji [yuuji(@)yatex.org] 1.8 +;;; Last modified Fri Jan 16 10:44:54 2015 on firestorm 1.9 ;;; $Id$ 1.10 1.11 -(defconst yahtml-revision-number "1.77" 1.12 +(defconst yahtml-revision-number "1.78.1" 1.13 "Revision number of running yahtml.el") 1.14 1.15 ;;; Commentary: 1.16 @@ -895,14 +895,16 @@ 1.17 (save-excursion (insert (format "</%s>" form)))) 1.18 (if (search-backward "\"\"" p t) (forward-char 1)))) 1.19 1.20 -(defun yahtml-read-css (alist) 1.21 +(defun yahtml-read-css (alist &optional element) 1.22 (let ((completion-ignore-case t) (delim " ") 1.23 - (minibuffer-completion-table alist)) 1.24 + (minibuffer-completion-table alist) 1.25 + (quotekey (substitute-command-keys "\\[quoted-insert]"))) 1.26 (read-from-minibuffer-with-history 1.27 - (substitute-command-keys 1.28 - (if YaTeX-japan 1.29 - "クラス(複数指定は\\[quoted-insert] SPCで区切る): " 1.30 - "class(or class list delimited by \\[quoted-insert] SPC): ")) 1.31 + (if YaTeX-japan 1.32 + (format "%sクラス(複数指定は%s SPCで区切る): " 1.33 + (if element (concat element "の") "") quotekey) 1.34 + (format "class%s(multiple class can be delimited by %s SPC): " 1.35 + (if element (concat " for " element) "") quotekey)) 1.36 nil YaTeX-minibuffer-completion-map nil))) 1.37 1.38 (defvar yahtml-newpage-command "newpage.rb" 1.39 @@ -934,7 +936,7 @@ 1.40 (memq yahtml-current-completion-type '(multiline inline)) 1.41 (not (string-match "#" form)) 1.42 (yahtml-make-optional-argument ;should be made generic? 1.43 - "class" (yahtml-read-css a))) 1.44 + "class" (yahtml-read-css a form))) 1.45 (if (and (intern-soft addin) (fboundp (intern-soft addin)) 1.46 (stringp (setq s (funcall (intern addin)))) 1.47 (string< "" s)) 1.48 @@ -2144,7 +2146,7 @@ 1.49 (if (and (equal attr "class") ;treat "class" attribute specially 1.50 (setq css (yahtml-css-get-element-completion-alist tag))) 1.51 1.52 - (setq new (yahtml-read-css css)) 1.53 + (setq new (yahtml-read-css css tag)) 1.54 ;;other than "class", read parameter normally 1.55 (setq new (yahtml-read-parameter attr))) 1.56 (goto-char (car (get 'yahtml-on-assignment-p 'region)))