Mercurial > hg > xemacs-beta
comparison lisp/version.el @ 371:cc15677e0335 r21-2b1
Import from CVS: tag r21-2b1
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:03:08 +0200 |
parents | 7c94d56991e1 |
children | 8626e4521993 |
comparison
equal
deleted
inserted
replaced
370:bd866891f083 | 371:cc15677e0335 |
---|---|
35 "Non-nil when this is a test (beta) version of XEmacs. | 35 "Non-nil when this is a test (beta) version of XEmacs. |
36 Warning, this variable did not exist in XEmacs versions prior to 20.3") | 36 Warning, this variable did not exist in XEmacs versions prior to 20.3") |
37 | 37 |
38 (defconst emacs-version | 38 (defconst emacs-version |
39 (purecopy | 39 (purecopy |
40 (format "%d.%d %s%s%s%s" | 40 (format "%d.%d %s%s%s" |
41 emacs-major-version | 41 emacs-major-version |
42 emacs-minor-version | 42 emacs-minor-version |
43 (if emacs-patch-level | 43 (if xemacs-codename |
44 (format "(patch %d)" emacs-patch-level) | 44 (concat "\"" xemacs-codename "\"") |
45 "") | 45 "") |
46 " XEmacs Lucid" | |
46 (if xemacs-betaname | 47 (if xemacs-betaname |
47 (concat " " xemacs-betaname) | 48 (concat " " xemacs-betaname) |
48 "") | 49 ""))) |
49 (if xemacs-codename | |
50 (concat " \"" xemacs-codename "\"") | |
51 "") | |
52 " XEmacs Lucid")) | |
53 "Version numbers of this version of XEmacs.") | 50 "Version numbers of this version of XEmacs.") |
54 | 51 |
55 (if (featurep 'infodock) | 52 (if (featurep 'infodock) |
56 (require 'id-vers)) | 53 (require 'id-vers)) |
57 | 54 |
108 ((null arg) version-string) | 105 ((null arg) version-string) |
109 ((eq arg 1) (message "%s" version-string)) | 106 ((eq arg 1) (message "%s" version-string)) |
110 (t (insert version-string)))))) | 107 (t (insert version-string)))))) |
111 | 108 |
112 ;; from emacs-vers.el | 109 ;; from emacs-vers.el |
113 (defun emacs-version>= (major &optional minor patch) | 110 (defun emacs-version>= (major &optional minor) |
114 "Return true if the Emacs version is >= to the given MAJOR, MINOR, | 111 "Return true if the Emacs version is >= to the given MAJOR and MINOR numbers. |
115 and PATCH numbers. | 112 The MAJOR version number argument is required, but the MINOR version number |
116 The MAJOR version number argument is required, but the other arguments | 113 argument is optional. If the minor version number is not specified (or is the |
117 argument are optional. Only the Non-nil arguments are used in the test." | 114 symbol `nil') then only the major version numbers are considered in the test." |
118 (let ((emacs-patch (or emacs-patch-level emacs-beta-version -1))) | 115 (if (null minor) |
119 (cond ((> emacs-major-version major)) | 116 (>= emacs-major-version major) |
120 ((< emacs-major-version major) nil) | 117 (or (> emacs-major-version major) |
121 ((null minor)) | 118 (and (= emacs-major-version major) |
122 ((> emacs-minor-version minor)) | 119 (>= emacs-minor-version minor))))) |
123 ((< emacs-minor-version minor) nil) | |
124 ((null patch)) | |
125 ((>= emacs-patch patch))))) | |
126 | 120 |
127 ;;; We hope that this alias is easier for people to find. | 121 ;;; We hope that this alias is easier for people to find. |
128 (define-function 'version 'emacs-version) | 122 (define-function 'version 'emacs-version) |
129 | 123 |
130 ;; Put the emacs version number into the `pure[]' array in a form that | 124 ;; Put the emacs version number into the `pure[]' array in a form that |