yatex
changeset 216:c1edf0fbab32 dev
Leave `{}' after C-g at section-type completion.
author | yuuji@gentei.org |
---|---|
date | Fri, 13 Jan 2012 16:17:49 +0900 |
parents | a67236df3199 |
children | e59126447ee7 |
files | yatex.el |
diffstat | 1 files changed, 18 insertions(+), 16 deletions(-) [+] |
line diff
1.1 --- a/yatex.el Fri Jan 13 09:44:48 2012 +0900 1.2 +++ b/yatex.el Fri Jan 13 16:17:49 2012 +0900 1.3 @@ -2,7 +2,7 @@ 1.4 ;;; Yet Another tex-mode for emacs - //–ì’¹// 1.5 ;;; yatex.el rev. 1.75.1 1.6 ;;; (c)1991-2012 by HIROSE Yuuji.[yuuji@yatex.org] 1.7 -;;; Last modified Fri Jan 13 08:22:46 2012 on firestorm 1.8 +;;; Last modified Fri Jan 13 16:16:58 2012 on firestorm 1.9 ;;; $Id$ 1.10 ;;; The latest version of this software is always available at; 1.11 ;;; http://www.yatex.org/ 1.12 @@ -950,17 +950,17 @@ 1.13 (function 1.14 (lambda (n) 1.15 (while (<= j n) 1.16 - (insert 1.17 - (concat ;to allow nil return value 1.18 - "{" 1.19 - (setq title 1.20 - (cond 1.21 - (addin-args (funcall arg-reader j)) 1.22 - (YaTeX-skip-default-reader "") 1.23 - (t 1.24 - (read-string 1.25 - (format "Argument %d of %s: " j section))))) 1.26 - "}")) 1.27 + (unwind-protect 1.28 + (setq title 1.29 + (cond 1.30 + (addin-args (funcall arg-reader j)) 1.31 + (YaTeX-skip-default-reader "") 1.32 + (t 1.33 + (read-string 1.34 + (format "Argument %d of %s: " j section))))) 1.35 + (insert 1.36 + (concat ;to allow nil return value 1.37 + "{" title "}"))) 1.38 (setq j (1+ j)))))) 1.39 );;let 1.40 (setq YaTeX-section-name section) 1.41 @@ -972,10 +972,12 @@ 1.42 (insert "}") 1.43 (set-marker e (point)) 1.44 (goto-char beg) 1.45 - (insert YaTeX-ec YaTeX-section-name 1.46 - (YaTeX-addin YaTeX-section-name)) 1.47 - (if (> numarg 1) (funcall mkarg-func (1- numarg))) 1.48 - (insert "{") 1.49 + (unwind-protect 1.50 + (progn 1.51 + (insert YaTeX-ec YaTeX-section-name 1.52 + (YaTeX-addin YaTeX-section-name)) 1.53 + (if (> numarg 1) (funcall mkarg-func (1- numarg)))) 1.54 + (insert "{")) 1.55 (if arp (funcall ar2 (point) e)) 1.56 (goto-char e) 1.57 (set-marker e nil))