Mercurial > hg > xemacs-beta
comparison lisp/version.el @ 347:7c94d56991e1 r21-1-3
Import from CVS: tag r21-1-3
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:53:48 +0200 |
parents | 8bec6624d99b |
children | cc15677e0335 |
comparison
equal
deleted
inserted
replaced
346:dd0986ffd2cf | 347:7c94d56991e1 |
---|---|
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%s" |
41 emacs-major-version | 41 emacs-major-version |
42 emacs-minor-version | 42 emacs-minor-version |
43 (if xemacs-codename | |
44 (concat "\"" xemacs-codename "\"") | |
45 "") | |
46 " XEmacs Lucid" | |
47 (if emacs-patch-level | 43 (if emacs-patch-level |
48 (format " (patch %d)" emacs-patch-level) | 44 (format "(patch %d)" emacs-patch-level) |
49 "") | 45 "") |
50 (if xemacs-betaname | 46 (if xemacs-betaname |
51 (concat " " xemacs-betaname) | 47 (concat " " xemacs-betaname) |
52 ""))) | 48 "") |
49 (if xemacs-codename | |
50 (concat " \"" xemacs-codename "\"") | |
51 "") | |
52 " XEmacs Lucid")) | |
53 "Version numbers of this version of XEmacs.") | 53 "Version numbers of this version of XEmacs.") |
54 | 54 |
55 (if (featurep 'infodock) | 55 (if (featurep 'infodock) |
56 (require 'id-vers)) | 56 (require 'id-vers)) |
57 | 57 |
108 ((null arg) version-string) | 108 ((null arg) version-string) |
109 ((eq arg 1) (message "%s" version-string)) | 109 ((eq arg 1) (message "%s" version-string)) |
110 (t (insert version-string)))))) | 110 (t (insert version-string)))))) |
111 | 111 |
112 ;; from emacs-vers.el | 112 ;; from emacs-vers.el |
113 (defun emacs-version>= (major &optional minor) | 113 (defun emacs-version>= (major &optional minor patch) |
114 "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, |
115 The MAJOR version number argument is required, but the MINOR version number | 115 and PATCH numbers. |
116 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 |
117 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." |
118 (if (null minor) | 118 (let ((emacs-patch (or emacs-patch-level emacs-beta-version -1))) |
119 (>= emacs-major-version major) | 119 (cond ((> emacs-major-version major)) |
120 (or (> emacs-major-version major) | 120 ((< emacs-major-version major) nil) |
121 (and (= emacs-major-version major) | 121 ((null minor)) |
122 (>= emacs-minor-version minor))))) | 122 ((> emacs-minor-version minor)) |
123 ((< emacs-minor-version minor) nil) | |
124 ((null patch)) | |
125 ((>= emacs-patch patch))))) | |
123 | 126 |
124 ;;; We hope that this alias is easier for people to find. | 127 ;;; We hope that this alias is easier for people to find. |
125 (define-function 'version 'emacs-version) | 128 (define-function 'version 'emacs-version) |
126 | 129 |
127 ;; 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 |