X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fversion.el;h=d79e0b486b3cc34e8ea34595b83d39ecc65661f0;hb=aa0c085620b488d3bf92e4c5cc150fdeb9f10610;hp=d0ba84c84c61154ed238b7dd3b8f6a61b4f1f26f;hpb=77dcef404dc78635f6ffa8f71a803d2bc7cc8921;p=chise%2Fxemacs-chise.git diff --git a/lisp/version.el b/lisp/version.el index d0ba84c..d79e0b4 100644 --- a/lisp/version.el +++ b/lisp/version.el @@ -37,16 +37,17 @@ Warning, this variable did not exist in XEmacs versions prior to 20.3") (defconst emacs-version (purecopy - (format "%d.%d %s%s%s" + (format "%d.%d %s%s%s%s" emacs-major-version emacs-minor-version + (if emacs-patch-level + (format "(patch %d)" emacs-patch-level) + "") + (or xemacs-betaname "") (if xemacs-codename - (concat "\"" xemacs-codename "\"") + (concat " \"" xemacs-codename "\"") "") - " XEmacs Lucid" - (if xemacs-betaname - (concat " " xemacs-betaname) - ""))) + " XEmacs Lucid")) "Version numbers of this version of XEmacs.") (if (featurep 'infodock) @@ -77,7 +78,7 @@ Warning, this variable did not exist in XEmacs versions prior to 20.3") (defconst emacs-build-system (system-name)) -(defun emacs-version (&optional arg) +(defun emacs-version (&optional arg) "Return string describing the version of Emacs that is running. When called interactively with a prefix argument, insert string at point. Don't use this function in programs to choose actions according @@ -86,7 +87,7 @@ to the system configuration; look at `system-configuration' instead." (save-match-data (let ((version-string (format - "XEmacs %s %s(%s%s) of %s %s on %s" + "XEmacs %s %s(%s%s)%s of %s %s on %s" (substring emacs-version 0 (string-match " XEmacs" emacs-version)) (if (not (featurep 'infodock)) "[Lucid] " @@ -96,6 +97,11 @@ to the system configuration; look at `system-configuration' instead." (featurep 'mule)) (memq 'mule features)) ", Mule") (t "")) + (cond ((or (and (fboundp 'featurep) + (featurep 'utf-2000)) + (memq 'utf-2000 features)) + (concat " UTF-2000 v" utf-2000-version)) + (t "")) (substring emacs-build-time 0 (string-match " *[0-9]*:" emacs-build-time)) (substring emacs-build-time @@ -107,16 +113,19 @@ to the system configuration; look at `system-configuration' instead." (t (insert version-string)))))) ;; from emacs-vers.el -(defun emacs-version>= (major &optional minor) - "Return true if the Emacs version is >= to the given MAJOR and MINOR numbers. -The MAJOR version number argument is required, but the MINOR version number -argument is optional. If the minor version number is not specified (or is the -symbol `nil') then only the major version numbers are considered in the test." - (if (null minor) - (>= emacs-major-version major) - (or (> emacs-major-version major) - (and (= emacs-major-version major) - (>= emacs-minor-version minor))))) +(defun emacs-version>= (major &optional minor patch) + "Return true if the Emacs version is >= to the given MAJOR, MINOR, + and PATCH numbers. +The MAJOR version number argument is required, but the other arguments +argument are optional. Only the Non-nil arguments are used in the test." + (let ((emacs-patch (or emacs-patch-level emacs-beta-version -1))) + (cond ((> emacs-major-version major)) + ((< emacs-major-version major) nil) + ((null minor)) + ((> emacs-minor-version minor)) + ((< emacs-minor-version minor) nil) + ((null patch)) + ((>= emacs-patch patch))))) ;;; We hope that this alias is easier for people to find. (define-function 'version 'emacs-version)