diff --git a/yahtml.el b/yahtml.el
index ce82039..72e6111 100644
--- a/yahtml.el
+++ b/yahtml.el
@@ -1,6 +1,6 @@
;;; yahtml.el --- Yet Another HTML mode -*- coding: sjis -*-
;;; (c) 1994-2012 by HIROSE Yuuji [yuuji(@)yatex.org]
-;;; Last modified Sat Sep 1 07:28:17 2012 on firestorm
+;;; Last modified Sun Jan 27 20:11:00 2013 on firestorm
;;; $Id$
(defconst yahtml-revision-number "1.76"
@@ -921,7 +921,7 @@
(let ((addin (concat "yahtml:" (downcase form))) s a)
(concat
(and (setq a (yahtml-css-get-element-completion-alist form))
- (not (equal last-command-char ?\C-j))
+ (not (equal (YaTeX-last-key) ?\C-j))
(memq yahtml-current-completion-type '(multiline inline))
(not (string-match "#" form))
(yahtml-make-optional-argument ;should be made generic?
diff --git a/yatex.el b/yatex.el
index b990a4e..465ea88 100644
--- a/yatex.el
+++ b/yatex.el
@@ -1,6 +1,6 @@
;;; yatex.el --- Yet Another tex-mode for emacs //�쒹// -*- coding: sjis -*-
;;; (c)1991-2012 by HIROSE Yuuji.[yuuji@yatex.org]
-;;; Last modified Thu Oct 25 16:24:50 2012 on firestorm
+;;; Last modified Sun Jan 27 20:10:46 2013 on firestorm
;;; $Id$
;;; The latest version of this software is always available at;
;;; http://www.yatex.org/
@@ -1363,7 +1363,7 @@
(setplist 'YaTeX-jmode nil))
(defun YaTeX-self-insert (arg)
- (call-interactively (global-key-binding (char-to-string last-command-char))))
+ (call-interactively (global-key-binding (char-to-string (YaTeX-last-key)))))
(defun YaTeX-insert-inherit (&rest args)
(apply (if (fboundp 'insert-and-inherit) 'insert-and-inherit 'insert)
args))
@@ -1398,7 +1398,7 @@
((and (= (preceding-char) ?\\ )
(/= (char-after (- (point) 2)) ?\\ )
(not (YaTeX-in-math-mode-p)))
- (YaTeX-insert-inherit last-command-char "\n")
+ (YaTeX-insert-inherit (YaTeX-last-key) "\n")
(indent-to (max 0 col))
(YaTeX-insert-inherit "\\]")
(beginning-of-line)
diff --git a/yatexadd.el b/yatexadd.el
index c9c57df..894de79 100644
--- a/yatexadd.el
+++ b/yatexadd.el
@@ -1,7 +1,7 @@
;;; yatexadd.el --- YaTeX add-in functions
;;; yatexadd.el rev.20
;;; (c)1991-2012 by HIROSE Yuuji.[yuuji@yatex.org]
-;;; Last modified Sat Sep 1 08:08:21 2012 on firestorm
+;;; Last modified Sun Jan 27 20:11:23 2013 on firestorm
;;; $Id$
;;; Code:
@@ -432,7 +432,7 @@
(defun YaTeX::label-search-tag ()
(interactive)
(let ((case-fold-search t)
- (tag (regexp-quote (char-to-string last-command-char))))
+ (tag (regexp-quote (char-to-string (YaTeX-last-key)))))
(cond
((save-excursion
(forward-char 1)
diff --git a/yatexlib.el b/yatexlib.el
index b951c1c..d3c5786 100644
--- a/yatexlib.el
+++ b/yatexlib.el
@@ -1,7 +1,7 @@
;;; yatexlib.el --- YaTeX and yahtml common libraries
;;;
;;; (c)1994-2012 by HIROSE Yuuji.[yuuji@yatex.org]
-;;; Last modified Sat Sep 1 08:12:09 2012 on firestorm
+;;; Last modified Sun Jan 27 20:09:01 2013 on firestorm
;;; $Id$
;;; Code:
@@ -839,11 +839,18 @@
;; Interface function for windows.el
;;;
;;;###autoload
+(fset 'YaTeX-last-key
+ (if (fboundp 'win:last-key)
+ 'win:last-key
+ '(lambda () (if (boundp 'last-command-char)
+ last-command-char
+ last-command-event))))
(defun YaTeX-switch-to-window ()
"Switch to windows.el's window decided by last pressed key."
(interactive)
(or (featurep 'windows) (error "Why don't you use `windows.el'?"))
- (win-switch-to-window 1 (- last-command-char win:base-key)))
+ (win-switch-to-window 1 (- (YaTeX-last-key) win:base-key)))
+
;;;###autoload
(defun YaTeX-command-to-string (cmd)
diff --git a/yatexmth.el b/yatexmth.el
index c6b8643..72cc19e 100644
--- a/yatexmth.el
+++ b/yatexmth.el
@@ -1,7 +1,7 @@
;;; yatexmth.el --- YaTeX math-mode-specific functions
;;;
;;; (c)1993-2012 by HIROSE Yuuji [yuuji@yatex.org]
-;;; Last modified Sat Sep 1 08:13:08 2012 on firestorm
+;;; Last modified Sun Jan 27 20:10:03 2013 on firestorm
;;; $Id$
;;; Commentary:
@@ -700,7 +700,7 @@
(interactive "P")
(let*((key (or initial "")) regkey str last-char list i
(case-fold-search nil) match sign
- (this-key (char-to-string last-command-char))
+ (this-key (char-to-string (YaTeX-last-key)))
(alistsym (cdr (assoc this-key YaTeX-math-key-list)))
(alistname (symbol-name alistsym))
(alist (symbol-value alistsym))
diff --git a/yatexsec.el b/yatexsec.el
index 5e036b2..b832ccd 100644
--- a/yatexsec.el
+++ b/yatexsec.el
@@ -1,7 +1,7 @@
;;; yatexsec.el --- YaTeX sectioning browser
;;;
;;; (c) 1994-2012 by HIROSE Yuuji [yuuji@yatex.org]
-;;; Last modified Sat Sep 1 08:13:52 2012 on firestorm
+;;; Last modified Sun Jan 27 20:11:45 2013 on firestorm
;;; $Id$
;;; Code:
@@ -181,7 +181,7 @@
(defun YaTeX-sectioning-hide ()
"Call YaTeX-sectioning-hide-under with argument according to pressed key."
(interactive)
- (YaTeX-sectioning-hide-under (- last-command-char ?0)))
+ (YaTeX-sectioning-hide-under (- (YaTeX-last-key) ?0)))
(defun YaTeX-sectioning-help ()
"Show help of sectioning."