[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/emulation/tpu-mapper.el,v
From: |
Dan Nicolaescu |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/emulation/tpu-mapper.el,v |
Date: |
Mon, 29 Oct 2007 15:33:07 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Dan Nicolaescu <dann> 07/10/29 15:33:06
Index: emulation/tpu-mapper.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/emulation/tpu-mapper.el,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- emulation/tpu-mapper.el 26 Jul 2007 05:26:49 -0000 1.22
+++ emulation/tpu-mapper.el 29 Oct 2007 15:32:33 -0000 1.23
@@ -78,13 +78,6 @@
;;;
-;;; Decide whether we're running Lucid Emacs or Emacs itself.
-;;;
-(defconst tpu-lucid-emacs19-p (string-match "Lucid" emacs-version)
- "Non-nil if we are running Lucid Emacs version 19.")
-
-
-;;;
;;; Key variables
;;;
(defvar tpu-kp4 nil)
@@ -100,7 +93,7 @@
;;;
;;; Make sure the window is big enough to display the instructions
;;;
-(if tpu-lucid-emacs19-p (set-screen-size (selected-screen) 80 36)
+(if (featurep 'xemacs) (set-screen-size (selected-screen) 80 36)
(set-frame-size (selected-frame) 80 36))
@@ -167,7 +160,7 @@
;;; Save <CR> for future reference
;;;
(cond
- (tpu-lucid-emacs19-p
+ ((featurep 'xemacs)
(setq tpu-return-seq (read-key-sequence "Hit carriage-return <CR> to
continue "))
(setq tpu-return (concat "[" (format "%s" (event-key (aref tpu-return-seq
0))) "]")))
(t
@@ -179,8 +172,10 @@
;;;
;;; Key mapping functions
;;;
-(defun tpu-lucid-map-key (ident descrip func gold-func)
+(defun tpu-map-key (ident descrip func gold-func)
(interactive)
+ (if (featurep 'xemacs)
+ (progn
(setq tpu-key-seq (read-key-sequence (format "Press %s%s: " ident descrip)))
(setq tpu-key (concat "[" (format "%s" (event-key (aref tpu-key-seq 0)))
"]"))
(cond ((not (equal tpu-key tpu-return))
@@ -192,11 +187,7 @@
;; bogosity to get next prompt to come up, if the user hits <CR>!
;; check periodically to see if this is still needed...
(t
- (format "%s" tpu-key)))
- tpu-key)
-
-(defun tpu-emacs-map-key (ident descrip func gold-func)
- (interactive)
+ (format "%s" tpu-key))))
(message "Press %s%s: " ident descrip)
(setq tpu-key-seq (read-event))
(setq tpu-key (concat "[" (format "%s" tpu-key-seq) "]"))
@@ -209,12 +200,9 @@
;; bogosity to get next prompt to come up, if the user hits <CR>!
;; check periodically to see if this is still needed...
(t
- (format "%s" tpu-key)))
+ (format "%s" tpu-key))))
tpu-key)
-(fset 'tpu-map-key (if tpu-lucid-emacs19-p 'tpu-lucid-map-key
'tpu-emacs-map-key))
-
-
(set-buffer "Keys")
(insert "
;; Arrows
@@ -350,7 +338,7 @@
;;
")
-(cond (tpu-lucid-emacs19-p
+(cond ((featurep 'xemacs)
(insert (format "(setq tpu-help-enter \"%s\")\n" tpu-enter-seq))
(insert (format "(setq tpu-help-return \"%s\")\n" tpu-return-seq))
(insert "(setq tpu-help-N \"[#<keypress-event N>]\")\n")
@@ -368,7 +356,7 @@
;;;
(let ((file
(convert-standard-filename
- (if tpu-lucid-emacs19-p "~/.tpu-lucid-keys" "~/.tpu-keys"))))
+ (if (featurep 'xemacs) "~/.tpu-lucid-keys" "~/.tpu-keys"))))
(set-visited-file-name
(read-file-name (format "Save key mapping to file (default %s): " file) ""
file)))
(save-buffer)
- [Emacs-diffs] Changes to emacs/lisp/emulation/tpu-mapper.el,v,
Dan Nicolaescu <=