From 9ab70cf9ad2055a3b3ca369ac997cf002eadb337 Mon Sep 17 00:00:00 2001 From: kaoru Date: Wed, 11 Oct 2000 01:27:04 +0000 Subject: [PATCH] * wl-version.el (toplevel): Use product-version-as-string for set verstion-string, if defined. * wl-version.el (wl-version-show): Insert string, when call with argument. And add docstring. --- wl/ChangeLog | 8 ++++++++ wl/wl-version.el | 21 ++++++++++++++------- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/wl/ChangeLog b/wl/ChangeLog index d9ede62..36b2add 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,11 @@ +2000-10-11 TAKAHASHI Kaoru + + * wl-version.el (toplevel): Use product-version-as-string for set + verstion-string, if defined. + + * wl-version.el (wl-version-show): Insert string, when call with + argument. And add docstring. + 2000-10-10 TAKAHASHI Kaoru * wl-address.el (toplevel): Use product-provide. diff --git a/wl/wl-version.el b/wl/wl-version.el index be995eb..d580374 100644 --- a/wl/wl-version.el +++ b/wl/wl-version.el @@ -39,6 +39,11 @@ (product-version (product-find 'elmo-version))) ; equals to ELMO version. "Roam")) +;; set version-string +(if (fboundp 'product-version-as-string) + (product-version-as-string 'wl-version) + (product-string-1 'wl-version)) + ;; require wl-util after product-provide. (eval-when-compile (require 'wl-util)) ; wl-match-string @@ -53,13 +58,17 @@ (defvar mime-editor/codename) (defun wl-version (&optional with-codename) - "Print Wanderlust version." + "Return Wanderlust version. If WITH-CODENAME is non-nil, add codename." (interactive) (product-string-1 'wl-version with-codename)) -(defun wl-version-show () - (interactive) - (message "%s" (wl-version t))) +(defun wl-version-show (&optional arg) + "Print Wanderlust version. +If ARG insert string at point." + (interactive "P") + (if arg + (insert (message "%s" (wl-version t))) + (message "%s" (wl-version t)))) (defun wl-generate-user-agent-string () "A candidate of wl-generate-mailer-string-func. @@ -210,9 +219,7 @@ Insert User-Agent field instead of X-Mailer field." 'wl-appname "use (product-name (product-find 'wl-version)) insteaed.") -(defconst wl-version - (progn (product-string-1 'wl-version) ; for product-set-version-string - (product-version-string (product-find 'wl-version)))) +(defconst wl-version (product-version-string (product-find 'wl-version))) (make-obsolete-variable 'wl-version "use (product-version-string (product-find 'wl-version)) instead.") -- 1.7.10.4