diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | ebuild-mode.el | 8 |
2 files changed, 8 insertions, 3 deletions
@@ -1,5 +1,8 @@ 2023-09-16 Ulrich Müller <ulm@gentoo.org> + * ebuild-mode.el (ebuild-mode-time-string): Test if + format-time-string can accept three arguments. + * ebuild-mode.el (sh-must-be-shell-mode): Test if the function is defined at compile time. This should only be the case for Emacs versions where defadvice is unobsolete. diff --git a/ebuild-mode.el b/ebuild-mode.el index 416758d..816f181 100644 --- a/ebuild-mode.el +++ b/ebuild-mode.el @@ -309,9 +309,11 @@ of the elements." "Use FORMAT-STRING to format the time value TIME. Calls `format-time-string' (which see) for the UTC time zone. Compatibility function for XEmacs." - (if (featurep 'xemacs) - ;; format-time-string in XEmacs 21.5 can take only two arguments, - ;; i.e. it doesn't support ZONE + (if (and (featurep 'xemacs) + (not (function-allows-args 'format-time-string 3))) + ;; format-time-string in older XEmacs versions can take only two + ;; arguments. Version 21.5.35 still doesn't support a time zone + ;; as third argument, but accepts non-nil to mean Universal Time. (let ((process-environment (copy-sequence process-environment)) (tz (getenv "TZ"))) (setenv "TZ" "UTC") |