--- /usr/share/emacs/21.2/lisp/type-break.el 2001-10-22 03:25:57.000000000 +0200 +++ type-break.el 2003-01-11 15:26:02.000000000 +0100 @@ -279,36 +279,22 @@ (defvar type-break-keystroke-warning-count 0) ;; Constant indicating emacs variant. -;; This can be one of `xemacs', `lucid', `epoch', `mule', etc. +;; This can be one of `xemacs', `lucid', `lucid-19-8' or `gnu'. (defconst type-break-emacs-variant - (let ((data (match-data)) - (version (cond - ((fboundp 'nemacs-version) - (nemacs-version)) - (t - (emacs-version)))) - (alist '(("\\bXEmacs\\b" . xemacs) - ("\\bLucid\\b" . lucid) - ("^Nemacs\\b" . nemacs) - ("^GNU Emacs 19" . standard19) - ("^GNU Emacs 20" . standard19) - ("^GNU Emacs 18" . emacs18))) - result) - (while alist - (cond - ((string-match (car (car alist)) version) - (setq result (cdr (car alist))) - (setq alist nil)) - (t - (setq alist (cdr alist))))) - (set-match-data data) - (cond ((eq result 'lucid) - (and (string= emacs-version "19.8 Lucid") - (setq result 'lucid-19-8))) - ((memq result '(nemacs emacs18)) - (signal 'error - "type-break not supported in this version of emacs."))) - result)) + (let ((version (emacs-version))) + (cond + ((featurep 'xemacs) + 'xemacs) + ((string-match "\\bLucid\\b" version) + (if (string= emacs-version "19.8 Lucid") + 'lucid-19-8 + 'lucid)) + ((and (string-match "^GNU" version) + (>= emacs-major-version 19)) + 'gnu) + (else + (signal 'error + "type-break not supported in this version of emacs."))))) ;;;###autoload @@ -954,7 +940,7 @@ ;;; for different versions of emacs. (defun type-break-run-at-time (time repeat function) - (cond ((eq type-break-emacs-variant 'standard19) + (cond ((eq type-break-emacs-variant 'gnu) (require 'timer) (funcall 'run-at-time time repeat function)) ((eq type-break-emacs-variant 'lucid-19-8) @@ -971,7 +957,7 @@ (funcall 'start-itimer name function time repeat))))) (defun type-break-cancel-function-timers (function) - (cond ((eq type-break-emacs-variant 'standard19) + (cond ((eq type-break-emacs-variant 'gnu) (let ((timer-dont-exit t)) (funcall 'cancel-function-timers function))) ((eq type-break-emacs-variant 'lucid-19-8)