diff options
| author | Glenn Morris | 2008-04-23 02:57:36 +0000 |
|---|---|---|
| committer | Glenn Morris | 2008-04-23 02:57:36 +0000 |
| commit | e28acf63e281575aa83f4fb290838342fa306ee6 (patch) | |
| tree | aa311be6106dbe21ec05c8fb1e8fafb94a0d69e9 | |
| parent | 5b86d3e4b1fe8709beac24c6ae10c2c612d95771 (diff) | |
| download | emacs-e28acf63e281575aa83f4fb290838342fa306ee6.tar.gz emacs-e28acf63e281575aa83f4fb290838342fa306ee6.zip | |
(ediff-check-version): Drop support for very old Emacs versions. Add
doc-string. Mark as obsolete.
| -rw-r--r-- | lisp/ediff-init.el | 46 |
1 files changed, 20 insertions, 26 deletions
diff --git a/lisp/ediff-init.el b/lisp/ediff-init.el index cd7532849fc..53660b90bf2 100644 --- a/lisp/ediff-init.el +++ b/lisp/ediff-init.el | |||
| @@ -749,33 +749,27 @@ to temp files when Ediff needs to find fine differences." | |||
| 749 | (defalias 'ediff-delete-overlay | 749 | (defalias 'ediff-delete-overlay |
| 750 | (if (featurep 'xemacs) 'delete-extent 'delete-overlay)) | 750 | (if (featurep 'xemacs) 'delete-extent 'delete-overlay)) |
| 751 | 751 | ||
| 752 | ;; Check the current version against the major and minor version numbers | 752 | ;; Assumes that emacs-major-version and emacs-minor-version are defined. |
| 753 | ;; using op: cur-vers op major.minor If emacs-major-version or | ||
| 754 | ;; emacs-minor-version are not defined, we assume that the current version | ||
| 755 | ;; is hopelessly outdated. We assume that emacs-major-version and | ||
| 756 | ;; emacs-minor-version are defined. Otherwise, for Emacs/XEmacs 19, if the | ||
| 757 | ;; current minor version is < 10 (xemacs) or < 23 (emacs) the return value | ||
| 758 | ;; will be nil (when op is =, >, or >=) and t (when op is <, <=), which may be | ||
| 759 | ;; incorrect. However, this gives correct result in our cases, since we are | ||
| 760 | ;; testing for sufficiently high Emacs versions. | ||
| 761 | (defun ediff-check-version (op major minor &optional type-of-emacs) | 753 | (defun ediff-check-version (op major minor &optional type-of-emacs) |
| 762 | (if (and (boundp 'emacs-major-version) (boundp 'emacs-minor-version)) | 754 | "Check the current version against MAJOR and MINOR version numbers. |
| 763 | (and (cond ((eq type-of-emacs 'xemacs) (featurep 'xemacs)) | 755 | The comparison uses operator OP, which may be any of: =, >, >=, <, <=. |
| 764 | ((eq type-of-emacs 'emacs) (featurep 'emacs)) | 756 | TYPE-OF-EMACS is either 'xemacs or 'emacs." |
| 765 | (t t)) | 757 | (and (cond ((eq type-of-emacs 'xemacs) (featurep 'xemacs)) |
| 766 | (cond ((eq op '=) (and (= emacs-minor-version minor) | 758 | ((eq type-of-emacs 'emacs) (featurep 'emacs)) |
| 767 | (= emacs-major-version major))) | 759 | (t)) |
| 768 | ((memq op '(> >= < <=)) | 760 | (cond ((eq op '=) (and (= emacs-minor-version minor) |
| 769 | (and (or (funcall op emacs-major-version major) | 761 | (= emacs-major-version major))) |
| 770 | (= emacs-major-version major)) | 762 | ((memq op '(> >= < <=)) |
| 771 | (if (= emacs-major-version major) | 763 | (and (or (funcall op emacs-major-version major) |
| 772 | (funcall op emacs-minor-version minor) | 764 | (= emacs-major-version major)) |
| 773 | t))) | 765 | (if (= emacs-major-version major) |
| 774 | (t | 766 | (funcall op emacs-minor-version minor) |
| 775 | (error "%S: Invalid op in ediff-check-version" op)))) | 767 | t))) |
| 776 | (cond ((memq op '(= > >=)) nil) | 768 | (t |
| 777 | ((memq op '(< <=)) t)))) | 769 | (error "%S: Invalid op in ediff-check-version" op))))) |
| 778 | 770 | ||
| 771 | ;; ediff-check-version seems to be totally unused anyway. | ||
| 772 | (make-obsolete 'ediff-check-version 'version< "23.1") | ||
| 779 | 773 | ||
| 780 | (defun ediff-color-display-p () | 774 | (defun ediff-color-display-p () |
| 781 | (condition-case nil | 775 | (condition-case nil |