Mercurial > hg > xemacs-beta
comparison lisp/version.el @ 398:74fd4e045ea6 r21-2-29
Import from CVS: tag r21-2-29
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:13:30 +0200 |
parents | 8626e4521993 |
children | 697ef44129c6 |
comparison
equal
deleted
inserted
replaced
397:f4aeb21a5bad | 398:74fd4e045ea6 |
---|---|
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" | 40 (format "%d.%d %s%s%s%s" |
41 emacs-major-version | 41 emacs-major-version |
42 emacs-minor-version | 42 emacs-minor-version |
43 (if xemacs-codename | 43 (if emacs-patch-level |
44 (concat "\"" xemacs-codename "\"") | 44 (format "(patch %d)" emacs-patch-level) |
45 "") | 45 "") |
46 " XEmacs Lucid" | |
47 (if xemacs-betaname | 46 (if xemacs-betaname |
48 (concat " " xemacs-betaname) | 47 (concat " " xemacs-betaname) |
49 ""))) | 48 "") |
49 (if xemacs-codename | |
50 (concat " \"" xemacs-codename "\"") | |
51 "") | |
52 " XEmacs Lucid")) | |
50 "Version numbers of this version of XEmacs.") | 53 "Version numbers of this version of XEmacs.") |
51 | 54 |
52 (if (featurep 'infodock) | 55 (if (featurep 'infodock) |
53 (require 'id-vers)) | 56 (require 'id-vers)) |
54 | 57 |
105 ((null arg) version-string) | 108 ((null arg) version-string) |
106 ((eq arg 1) (message "%s" version-string)) | 109 ((eq arg 1) (message "%s" version-string)) |
107 (t (insert version-string)))))) | 110 (t (insert version-string)))))) |
108 | 111 |
109 ;; from emacs-vers.el | 112 ;; from emacs-vers.el |
110 (defun emacs-version>= (major &optional minor) | 113 (defun emacs-version>= (major &optional minor patch) |
111 "Return true if the Emacs version is >= to the given MAJOR and MINOR numbers. | 114 "Return true if the Emacs version is >= to the given MAJOR, MINOR, |
112 The MAJOR version number argument is required, but the MINOR version number | 115 and PATCH numbers. |
113 argument is optional. If the minor version number is not specified (or is the | 116 The MAJOR version number argument is required, but the other arguments |
114 symbol `nil') then only the major version numbers are considered in the test." | 117 argument are optional. Only the Non-nil arguments are used in the test." |
115 (if (null minor) | 118 (let ((emacs-patch (or emacs-patch-level emacs-beta-version -1))) |
116 (>= emacs-major-version major) | 119 (cond ((> emacs-major-version major)) |
117 (or (> emacs-major-version major) | 120 ((< emacs-major-version major) nil) |
118 (and (= emacs-major-version major) | 121 ((null minor)) |
119 (>= emacs-minor-version minor))))) | 122 ((> emacs-minor-version minor)) |
123 ((< emacs-minor-version minor) nil) | |
124 ((null patch)) | |
125 ((>= emacs-patch patch))))) | |
120 | 126 |
121 ;;; We hope that this alias is easier for people to find. | 127 ;;; We hope that this alias is easier for people to find. |
122 (define-function 'version 'emacs-version) | 128 (define-function 'version 'emacs-version) |
123 | 129 |
124 ;; Put the emacs version number into the `pure[]' array in a form that | 130 ;; Put the emacs version number into the `pure[]' array in a form that |
125 ;; `what(1)' can extract from the executable or a core file. We don't | 131 ;; `what(1)' can extract from the executable or a core file. We don't |
126 ;; actually need this to be pointed to from lisp; pure objects can't | 132 ;; actually need this to be pointed to from lisp; pure objects can't |
127 ;; be GCed. | 133 ;; be GCed. |
128 (or (memq system-type '(windows-nt ms-dos)) | 134 (purecopy (concat "\n@" "(#)" (emacs-version) |
129 (purecopy (concat "\n@" "(#)" (emacs-version) | 135 "\n@" "(#)" "Configuration: " |
130 "\n@" "(#)" "Configuration: " | 136 system-configuration "\n")) |
131 system-configuration "\n"))) | |
132 | 137 |
133 ;;Local variables: | 138 ;;Local variables: |
134 ;;version-control: never | 139 ;;version-control: never |
135 ;;End: | 140 ;;End: |
136 | 141 |