summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog24
-rw-r--r--lisp/calc/calc-ext.el4
-rw-r--r--lisp/calc/calc.el15
-rw-r--r--lisp/emulation/tpu-mapper.el78
-rw-r--r--lisp/ielm.el2
-rw-r--r--lisp/progmodes/cperl-mode.el39
-rw-r--r--lisp/ps-print.el4
7 files changed, 85 insertions, 81 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 2ce58cd08dc..ea7356efedd 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,27 @@
+2007-10-29 Dan Nicolaescu <dann@ics.uci.edu>
+
+ * 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.
+
2007-10-29 Drew Adams <drew.adams@oracle.com>
* faces.el (read-color): New function.
diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el
index 0aa053702b8..bb054de4951 100644
--- a/lisp/calc/calc-ext.el
+++ b/lisp/calc/calc-ext.el
@@ -1782,8 +1782,8 @@ calc-kill calc-kill-region calc-yank))))
;;; User menu.
(defun calc-user-key-map ()
- (if calc-emacs-type-lucid
- (error "User-defined keys are not supported in Lucid Emacs"))
+ (if (featurep 'xemacs)
+ (error "User-defined keys are not supported in XEmacs"))
(let ((res (cdr (lookup-key calc-mode-map "z"))))
(if (eq (car (car res)) 27)
(cdr res)
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el
index 44e802d36b1..5cfccb4f8db 100644
--- a/lisp/calc/calc.el
+++ b/lisp/calc/calc.el
@@ -821,9 +821,6 @@ If nil, selections displayed but ignored.")
(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 @@ If nil, selections displayed but ignored.")
(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 @@ If nil, selections displayed but ignored.")
(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 @@ See calc-keypad for details."
(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 @@ Also looks for the equivalent TeX words, \\gets and \\evalto."
;;; 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 @@ Also looks for the equivalent TeX words, \\gets and \\evalto."
(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
diff --git a/lisp/emulation/tpu-mapper.el b/lisp/emulation/tpu-mapper.el
index 3e5af7a38bd..3f216ca8a2b 100644
--- a/lisp/emulation/tpu-mapper.el
+++ b/lisp/emulation/tpu-mapper.el
@@ -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,41 +172,36 @@
;;;
;;; Key mapping functions
;;;
-(defun tpu-lucid-map-key (ident descrip func gold-func)
- (interactive)
- (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))
- (set-buffer "Keys")
- (insert (format"(global-set-key %s %s)\n" tpu-key func))
- (set-buffer "Gold-Keys")
- (insert (format "(define-key GOLD-map %s %s)\n" tpu-key gold-func))
- (set-buffer "Directions"))
- ;; 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)
+(defun tpu-map-key (ident descrip func gold-func)
(interactive)
- (message "Press %s%s: " ident descrip)
- (setq tpu-key-seq (read-event))
- (setq tpu-key (concat "[" (format "%s" tpu-key-seq) "]"))
- (cond ((not (equal tpu-key tpu-return))
- (set-buffer "Keys")
- (insert (format"(define-key tpu-global-map %s %s)\n" tpu-key func))
- (set-buffer "Gold-Keys")
- (insert (format "(define-key tpu-gold-map %s %s)\n" tpu-key gold-func))
- (set-buffer "Directions"))
- ;; 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)
-
-(fset 'tpu-map-key (if tpu-lucid-emacs19-p 'tpu-lucid-map-key 'tpu-emacs-map-key))
-
+ (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))
+ (set-buffer "Keys")
+ (insert (format"(global-set-key %s %s)\n" tpu-key func))
+ (set-buffer "Gold-Keys")
+ (insert (format "(define-key GOLD-map %s %s)\n" tpu-key gold-func))
+ (set-buffer "Directions"))
+ ;; 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))))
+ (message "Press %s%s: " ident descrip)
+ (setq tpu-key-seq (read-event))
+ (setq tpu-key (concat "[" (format "%s" tpu-key-seq) "]"))
+ (cond ((not (equal tpu-key tpu-return))
+ (set-buffer "Keys")
+ (insert (format"(define-key tpu-global-map %s %s)\n" tpu-key func))
+ (set-buffer "Gold-Keys")
+ (insert (format "(define-key tpu-gold-map %s %s)\n" tpu-key gold-func))
+ (set-buffer "Directions"))
+ ;; 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)
(set-buffer "Keys")
(insert "
@@ -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)
diff --git a/lisp/ielm.el b/lisp/ielm.el
index 98df0d1e3d4..a734f87ad92 100644
--- a/lisp/ielm.el
+++ b/lisp/ielm.el
@@ -169,7 +169,7 @@ This variable is buffer-local.")
(defvar ielm-map nil)
(if ielm-map nil
- (if (string-match "Lucid" emacs-version)
+ (if (featurep 'xemacs)
;; Lemacs
(progn
(setq ielm-map (make-sparse-keymap))
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index d030110d85a..13f1e0c24b8 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -78,9 +78,8 @@
(condition-case nil
(require 'man)
(error nil))
- (defconst cperl-xemacs-p (string-match "XEmacs\\|Lucid" emacs-version))
(defvar cperl-can-font-lock
- (or cperl-xemacs-p
+ (or (featurep 'xemacs)
(and (boundp 'emacs-major-version)
(or window-system
(> emacs-major-version 20)))))
@@ -131,14 +130,14 @@
(cperl-make-face ,arg ,descr))
(or (boundp (quote ,arg)) ; We use unquoted variants too
(defvar ,arg (quote ,arg) ,descr))))
- (if cperl-xemacs-p
+ (if (featurep 'xemacs)
(defmacro cperl-etags-snarf-tag (file line)
`(progn
(beginning-of-line 2)
(list ,file ,line)))
(defmacro cperl-etags-snarf-tag (file line)
`(etags-snarf-tag)))
- (if cperl-xemacs-p
+ (if (featurep 'xemacs)
(defmacro cperl-etags-goto-tag-location (elt)
;;(progn
;; (switch-to-buffer (get-file-buffer (elt ,elt 0)))
@@ -151,10 +150,8 @@
(defmacro cperl-etags-goto-tag-location (elt)
`(etags-goto-tag-location ,elt))))
-(defconst cperl-xemacs-p (string-match "XEmacs\\|Lucid" emacs-version))
-
(defvar cperl-can-font-lock
- (or cperl-xemacs-p
+ (or (featurep 'xemacs)
(and (boundp 'emacs-major-version)
(or window-system
(> emacs-major-version 20)))))
@@ -458,7 +455,7 @@ Font for POD headers."
:group 'cperl-faces)
;;; Some double-evaluation happened with font-locks... Needed with 21.2...
-(defvar cperl-singly-quote-face cperl-xemacs-p)
+(defvar cperl-singly-quote-face (featurep 'xemacs))
(defcustom cperl-invalid-face 'underline
"*Face for highlighting trailing whitespace."
@@ -1011,7 +1008,7 @@ In regular expressions (except character classes):
(defmacro cperl-define-key (emacs-key definition &optional xemacs-key)
`(define-key cperl-mode-map
,(if xemacs-key
- `(if cperl-xemacs-p ,xemacs-key ,emacs-key)
+ `(if (featurep 'xemacs) ,xemacs-key ,emacs-key)
emacs-key)
,definition))
@@ -1024,7 +1021,7 @@ In regular expressions (except character classes):
(setq cperl-del-back-ch (aref cperl-del-back-ch 0)))
(defun cperl-mark-active () (mark)) ; Avoid undefined warning
-(if cperl-xemacs-p
+(if (featurep 'xemacs)
(progn
;; "Active regions" are on: use region only if active
;; "Active regions" are off: use region unconditionally
@@ -1040,7 +1037,7 @@ In regular expressions (except character classes):
(defun cperl-putback-char (c) ; Emacs 19
(set 'unread-command-events (list c))) ; Avoid undefined warning
-(if cperl-xemacs-p
+(if (featurep 'xemacs)
(defun cperl-putback-char (c) ; XEmacs >= 19.12
(setq unread-command-events (list (eval '(character-to-event c))))))
@@ -1192,7 +1189,7 @@ versions of Emacs."
;;(concat (char-to-string help-char) "v") ; does not work
'cperl-get-help
[(control c) (control h) v]))
- (if (and cperl-xemacs-p
+ (if (and (featurep 'xemacs)
(<= emacs-minor-version 11) (<= emacs-major-version 19))
(progn
;; substitute-key-definition is usefulness-deenhanced...
@@ -1744,7 +1741,7 @@ or as help on variables `cperl-tips', `cperl-problems',
(setq paragraph-separate paragraph-start)
(make-local-variable 'paragraph-ignore-fill-prefix)
(setq paragraph-ignore-fill-prefix t)
- (if cperl-xemacs-p
+ (if (featurep 'xemacs)
(progn
(make-local-variable 'paren-backwards-message)
(set 'paren-backwards-message t)))
@@ -1835,7 +1832,7 @@ or as help on variables `cperl-tips', `cperl-problems',
(or (boundp 'font-lock-unfontify-region-function)
(set 'font-lock-unfontify-region-function
'font-lock-default-unfontify-region))
- (unless cperl-xemacs-p ; Our: just a plug for wrong font-lock
+ (unless (featurep 'xemacs) ; Our: just a plug for wrong font-lock
(make-local-variable 'font-lock-unfontify-region-function)
(set 'font-lock-unfontify-region-function ; not present with old Emacs
'cperl-font-lock-unfontify-region-function))
@@ -5854,7 +5851,7 @@ indentation and initial hashes. Behaves usually outside of comment."
(and (fboundp 'turn-on-font-lock) ; Check for newer font-lock
;; not yet as of XEmacs 19.12, works with 21.1.11
(or
- (not cperl-xemacs-p)
+ (not (featurep 'xemacs))
(string< "21.1.9" emacs-version)
(and (string< "21.1.10" emacs-version)
(string< emacs-version "21.1.2")))
@@ -6015,7 +6012,7 @@ indentation and initial hashes. Behaves usually outside of comment."
;; (defconst cperl-nonoverridable-face
;; 'cperl-nonoverridable-face
;; "Face to use for data types from another group."))
- ;;(if (not cperl-xemacs-p) nil
+ ;;(if (not (featurep 'xemacs)) nil
;; (or (boundp 'font-lock-comment-face)
;; (defconst font-lock-comment-face
;; 'font-lock-comment-face
@@ -6964,7 +6961,7 @@ Use as
(save-excursion
(cond (inbuffer nil) ; Already there
((file-exists-p tags-file-name)
- (if cperl-xemacs-p
+ (if (featurep 'xemacs)
(visit-tags-table-buffer)
(visit-tags-table-buffer tags-file-name)))
(t (set-buffer (find-file-noselect tags-file-name))))
@@ -7100,7 +7097,7 @@ One may build such TAGS files from CPerl mode menu."
pack name cons1 to l1 l2 l3 l4 b)
;; (setq cperl-hierarchy '(() () ())) ; Would write into '() later!
(setq cperl-hierarchy (list l1 l2 l3))
- (if cperl-xemacs-p ; Not checked
+ (if (featurep 'xemacs) ; Not checked
(progn
(or tags-file-name
;; Does this work in XEmacs?
@@ -8451,7 +8448,7 @@ the appropriate statement modifier."
'variable-documentation))))
(manual-program (if is-func "perldoc -f" "perldoc")))
(cond
- (cperl-xemacs-p
+ ((featurep 'xemacs)
(let ((Manual-program "perldoc")
(Manual-switches (if is-func (list "-f"))))
(manual-entry word)))
@@ -8493,7 +8490,7 @@ the appropriate statement modifier."
(interactive)
(require 'man)
(cond
- (cperl-xemacs-p
+ ((featurep 'xemacs)
(let ((Manual-program "perldoc"))
(manual-entry buffer-file-name)))
(t
@@ -8689,6 +8686,8 @@ start with default arguments, then refine the slowdown regions."
(message "to %s:%6s,%7s" l delta tot))
tot))
+(defvar font-lock-cache-position)
+
(defun cperl-emulate-lazy-lock (&optional window-size)
"Emulate `lazy-lock' without `condition-case', so `debug-on-error' works.
Start fontifying the buffer from the start (or end) using the given
diff --git a/lisp/ps-print.el b/lisp/ps-print.el
index 1466c6dbb23..43df4eddad6 100644
--- a/lisp/ps-print.el
+++ b/lisp/ps-print.el
@@ -1464,10 +1464,6 @@ Please send all bug fixes and enhancements to
(let ((case-fold-search t))
(cond ((featurep 'xemacs))
- ((string-match "Lucid" emacs-version)
- (error "`ps-print' doesn't support Lucid"))
- ((string-match "Epoch" emacs-version)
- (error "`ps-print' doesn't support Epoch"))
(t
(unless (and (boundp 'emacs-major-version)
(>= emacs-major-version 22))