diff lisp/calc/calc.el @ 85762:29e75576e47f

* calc/calc.el (calc-emacs-type-lucid): Remove. (calc-digit-map, calcDigit-start, calc-read-key) (calc-clear-unread-commands): * calc/calc-ext.el (calc-user-key-map): Replace uses of calc-emacs-type-lucid with (featurep 'xemacs) * emulation/tpu-mapper.el: Replace tpu-lucid-emacs19-p with (featurep 'xemacs). (tpu-lucid-emacs19-p): Remove. (tpu-map-key): Make it a function instead of using fset. Inline tpu-emacs-map-key and tpu-lucid-map-key. Use featurep 'xemacs. (tpu-emacs-map-key, tpu-lucid-map-key): Remove. * ielm.el: Use featurep 'xemacs. * progmodes/cperl-mode.el (cperl-xemacs-p): Remove. (condition-case, cperl-can-font-lock, cperl-singly-quote-face) (cperl-define-key, cperl-mode-map, cperl-mode, cperl-init-faces) (cperl-write-tags, cperl-tags-hier-init, cperl-perldoc): Replace cperl-xemacs-p with (featurep 'xemacs). (font-lock-cache-position): Pacify byte compiler.
author Dan Nicolaescu <dann@ics.uci.edu>
date Mon, 29 Oct 2007 15:33:04 +0000
parents a716b9a57af8
children 78d8c12b061b 880960b70474
line wrap: on
line diff
--- a/lisp/calc/calc.el	Mon Oct 29 13:56:39 2007 +0000
+++ b/lisp/calc/calc.el	Mon Oct 29 15:33:04 2007 +0000
@@ -821,9 +821,6 @@
 (defvar calc-embedded-mode-hook nil
   "Hook run when starting embedded mode.")
 
-;; Verify that Calc is running on the right kind of system.
-(defvar calc-emacs-type-lucid (not (not (string-match "Lucid" emacs-version))))
-
 ;; Set up the autoloading linkage.
 (let ((name (and (fboundp 'calc-dispatch)
 		   (eq (car-safe (symbol-function 'calc-dispatch)) 'autoload)
@@ -968,7 +965,7 @@
 
 (defvar calc-digit-map
   (let ((map (make-keymap)))
-    (if calc-emacs-type-lucid
+    (if (featurep 'xemacs)
 	(map-keymap (function
 		     (lambda (keys bind)
 		       (define-key map keys
@@ -999,7 +996,7 @@
 	      (define-key calc-mode-map x 'calc-pop)
 	      (define-key calc-mode-map
 		  (if (vectorp x)
-		      (if calc-emacs-type-lucid
+		      (if (featurep 'xemacs)
 			  (if (= (length x) 1)
 			      (vector (if (consp (aref x 0))
 					  (cons 'meta (aref x 0))
@@ -2109,13 +2106,13 @@
 	    (calc-prev-char nil)
 	    (calc-prev-prev-char nil)
 	    (calc-buffer (current-buffer))
-	    (buf (if calc-emacs-type-lucid
+	    (buf (if (featurep 'xemacs)
 		     (catch 'calc-foo
 		       (catch 'execute-kbd-macro
 			 (throw 'calc-foo
 				(read-from-minibuffer
 				 "Calc: " "" calc-digit-map)))
-		       (error "Lucid Emacs requires RET after %s"
+		       (error "XEmacs requires RET after %s"
 			      "digit entry in kbd macro"))
 		   (let ((old-esc (lookup-key global-map "\e")))
 		     (unwind-protect
@@ -3646,7 +3643,7 @@
 ;;; Functions needed for Lucid Emacs support.
 
 (defun calc-read-key (&optional optkey)
-  (cond (calc-emacs-type-lucid
+  (cond ((featurep 'xemacs)
 	 (let ((event (next-command-event)))
 	   (let ((key (event-to-character event t t)))
 	     (or key optkey (error "Expected a plain keystroke"))
@@ -3664,7 +3661,7 @@
 
 (defun calc-clear-unread-commands ()
   (if (featurep 'xemacs)
-	(calc-emacs-type-lucid (setq unread-command-event nil))
+      (setq unread-command-event nil)
     (setq unread-command-events nil)))
 
 (when calc-always-load-extensions