yatex

diff yatexlib.el @ 290:1a4332ecc58b

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 5921f28ef77c
children f5151d4240a9
line diff
     1.1 --- a/yatexlib.el	Sat Sep 01 08:14:41 2012 +0900
     1.2 +++ b/yatexlib.el	Sun Jan 27 23:34:29 2013 +0900
     1.3 @@ -1,7 +1,7 @@
     1.4  ;;; yatexlib.el --- YaTeX and yahtml common libraries
     1.5  ;;; 
     1.6  ;;; (c)1994-2012 by HIROSE Yuuji.[yuuji@yatex.org]
     1.7 -;;; Last modified Sat Sep  1 08:12:09 2012 on firestorm
     1.8 +;;; Last modified Sun Jan 27 20:09:01 2013 on firestorm
     1.9  ;;; $Id$
    1.10  
    1.11  ;;; Code:
    1.12 @@ -839,11 +839,18 @@
    1.13  ;; Interface function for windows.el
    1.14  ;;;
    1.15  ;;;###autoload
    1.16 +(fset 'YaTeX-last-key
    1.17 +      (if (fboundp 'win:last-key)
    1.18 +	  'win:last-key
    1.19 +	'(lambda () (if (boundp 'last-command-char)
    1.20 +			last-command-char
    1.21 +		      last-command-event))))
    1.22  (defun YaTeX-switch-to-window ()
    1.23    "Switch to windows.el's window decided by last pressed key."
    1.24    (interactive)
    1.25    (or (featurep 'windows) (error "Why don't you use `windows.el'?"))
    1.26 -  (win-switch-to-window 1 (- last-command-char win:base-key)))
    1.27 +  (win-switch-to-window 1 (- (YaTeX-last-key) win:base-key)))
    1.28 +
    1.29  
    1.30  ;;;###autoload
    1.31  (defun YaTeX-command-to-string (cmd)