yatex
changeset 290:1a4332ecc58b dev
For emacs-24.3+ and NEmacs(last-command-{char,event} handling)
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Sun, 27 Jan 2013 23:34:29 +0900 |
parents | 9f3a86e5d216 |
children | 027c4e8d98ce |
files | yahtml.el yatex.el yatexadd.el yatexlib.el yatexmth.el yatexsec.el |
diffstat | 6 files changed, 20 insertions(+), 13 deletions(-) [+] |
line diff
1.1 --- a/yahtml.el Sun Jan 27 18:50:23 2013 +0900 1.2 +++ b/yahtml.el Sun Jan 27 23:34:29 2013 +0900 1.3 @@ -1,6 +1,6 @@ 1.4 ;;; yahtml.el --- Yet Another HTML mode -*- coding: sjis -*- 1.5 ;;; (c) 1994-2012 by HIROSE Yuuji [yuuji(@)yatex.org] 1.6 -;;; Last modified Sat Sep 1 07:28:17 2012 on firestorm 1.7 +;;; Last modified Sun Jan 27 20:11:00 2013 on firestorm 1.8 ;;; $Id$ 1.9 1.10 (defconst yahtml-revision-number "1.76" 1.11 @@ -921,7 +921,7 @@ 1.12 (let ((addin (concat "yahtml:" (downcase form))) s a) 1.13 (concat 1.14 (and (setq a (yahtml-css-get-element-completion-alist form)) 1.15 - (not (equal last-command-char ?\C-j)) 1.16 + (not (equal (YaTeX-last-key) ?\C-j)) 1.17 (memq yahtml-current-completion-type '(multiline inline)) 1.18 (not (string-match "#" form)) 1.19 (yahtml-make-optional-argument ;should be made generic?
2.1 --- a/yatex.el Sun Jan 27 18:50:23 2013 +0900 2.2 +++ b/yatex.el Sun Jan 27 23:34:29 2013 +0900 2.3 @@ -1,6 +1,6 @@ 2.4 ;;; yatex.el --- Yet Another tex-mode for emacs //–ì’¹// -*- coding: sjis -*- 2.5 ;;; (c)1991-2012 by HIROSE Yuuji.[yuuji@yatex.org] 2.6 -;;; Last modified Thu Oct 25 16:24:50 2012 on firestorm 2.7 +;;; Last modified Sun Jan 27 20:10:46 2013 on firestorm 2.8 ;;; $Id$ 2.9 ;;; The latest version of this software is always available at; 2.10 ;;; http://www.yatex.org/ 2.11 @@ -1363,7 +1363,7 @@ 2.12 (setplist 'YaTeX-jmode nil)) 2.13 2.14 (defun YaTeX-self-insert (arg) 2.15 - (call-interactively (global-key-binding (char-to-string last-command-char)))) 2.16 + (call-interactively (global-key-binding (char-to-string (YaTeX-last-key))))) 2.17 (defun YaTeX-insert-inherit (&rest args) 2.18 (apply (if (fboundp 'insert-and-inherit) 'insert-and-inherit 'insert) 2.19 args)) 2.20 @@ -1398,7 +1398,7 @@ 2.21 ((and (= (preceding-char) ?\\ ) 2.22 (/= (char-after (- (point) 2)) ?\\ ) 2.23 (not (YaTeX-in-math-mode-p))) 2.24 - (YaTeX-insert-inherit last-command-char "\n") 2.25 + (YaTeX-insert-inherit (YaTeX-last-key) "\n") 2.26 (indent-to (max 0 col)) 2.27 (YaTeX-insert-inherit "\\]") 2.28 (beginning-of-line)
3.1 --- a/yatexadd.el Sun Jan 27 18:50:23 2013 +0900 3.2 +++ b/yatexadd.el Sun Jan 27 23:34:29 2013 +0900 3.3 @@ -1,7 +1,7 @@ 3.4 ;;; yatexadd.el --- YaTeX add-in functions 3.5 ;;; yatexadd.el rev.20 3.6 ;;; (c)1991-2012 by HIROSE Yuuji.[yuuji@yatex.org] 3.7 -;;; Last modified Sat Sep 1 08:08:21 2012 on firestorm 3.8 +;;; Last modified Sun Jan 27 20:11:23 2013 on firestorm 3.9 ;;; $Id$ 3.10 3.11 ;;; Code: 3.12 @@ -432,7 +432,7 @@ 3.13 (defun YaTeX::label-search-tag () 3.14 (interactive) 3.15 (let ((case-fold-search t) 3.16 - (tag (regexp-quote (char-to-string last-command-char)))) 3.17 + (tag (regexp-quote (char-to-string (YaTeX-last-key))))) 3.18 (cond 3.19 ((save-excursion 3.20 (forward-char 1)
4.1 --- a/yatexlib.el Sun Jan 27 18:50:23 2013 +0900 4.2 +++ b/yatexlib.el Sun Jan 27 23:34:29 2013 +0900 4.3 @@ -1,7 +1,7 @@ 4.4 ;;; yatexlib.el --- YaTeX and yahtml common libraries 4.5 ;;; 4.6 ;;; (c)1994-2012 by HIROSE Yuuji.[yuuji@yatex.org] 4.7 -;;; Last modified Sat Sep 1 08:12:09 2012 on firestorm 4.8 +;;; Last modified Sun Jan 27 20:09:01 2013 on firestorm 4.9 ;;; $Id$ 4.10 4.11 ;;; Code: 4.12 @@ -839,11 +839,18 @@ 4.13 ;; Interface function for windows.el 4.14 ;;; 4.15 ;;;###autoload 4.16 +(fset 'YaTeX-last-key 4.17 + (if (fboundp 'win:last-key) 4.18 + 'win:last-key 4.19 + '(lambda () (if (boundp 'last-command-char) 4.20 + last-command-char 4.21 + last-command-event)))) 4.22 (defun YaTeX-switch-to-window () 4.23 "Switch to windows.el's window decided by last pressed key." 4.24 (interactive) 4.25 (or (featurep 'windows) (error "Why don't you use `windows.el'?")) 4.26 - (win-switch-to-window 1 (- last-command-char win:base-key))) 4.27 + (win-switch-to-window 1 (- (YaTeX-last-key) win:base-key))) 4.28 + 4.29 4.30 ;;;###autoload 4.31 (defun YaTeX-command-to-string (cmd)
5.1 --- a/yatexmth.el Sun Jan 27 18:50:23 2013 +0900 5.2 +++ b/yatexmth.el Sun Jan 27 23:34:29 2013 +0900 5.3 @@ -1,7 +1,7 @@ 5.4 ;;; yatexmth.el --- YaTeX math-mode-specific functions 5.5 ;;; 5.6 ;;; (c)1993-2012 by HIROSE Yuuji [yuuji@yatex.org] 5.7 -;;; Last modified Sat Sep 1 08:13:08 2012 on firestorm 5.8 +;;; Last modified Sun Jan 27 20:10:03 2013 on firestorm 5.9 ;;; $Id$ 5.10 5.11 ;;; Commentary: 5.12 @@ -700,7 +700,7 @@ 5.13 (interactive "P") 5.14 (let*((key (or initial "")) regkey str last-char list i 5.15 (case-fold-search nil) match sign 5.16 - (this-key (char-to-string last-command-char)) 5.17 + (this-key (char-to-string (YaTeX-last-key))) 5.18 (alistsym (cdr (assoc this-key YaTeX-math-key-list))) 5.19 (alistname (symbol-name alistsym)) 5.20 (alist (symbol-value alistsym))
6.1 --- a/yatexsec.el Sun Jan 27 18:50:23 2013 +0900 6.2 +++ b/yatexsec.el Sun Jan 27 23:34:29 2013 +0900 6.3 @@ -1,7 +1,7 @@ 6.4 ;;; yatexsec.el --- YaTeX sectioning browser 6.5 ;;; 6.6 ;;; (c) 1994-2012 by HIROSE Yuuji [yuuji@yatex.org] 6.7 -;;; Last modified Sat Sep 1 08:13:52 2012 on firestorm 6.8 +;;; Last modified Sun Jan 27 20:11:45 2013 on firestorm 6.9 ;;; $Id$ 6.10 6.11 ;;; Code: 6.12 @@ -181,7 +181,7 @@ 6.13 (defun YaTeX-sectioning-hide () 6.14 "Call YaTeX-sectioning-hide-under with argument according to pressed key." 6.15 (interactive) 6.16 - (YaTeX-sectioning-hide-under (- last-command-char ?0))) 6.17 + (YaTeX-sectioning-hide-under (- (YaTeX-last-key) ?0))) 6.18 6.19 (defun YaTeX-sectioning-help () 6.20 "Show help of sectioning."