diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | ebuild-mode.el | 5 |
2 files changed, 6 insertions, 2 deletions
@@ -1,5 +1,8 @@ 2023-10-15 Ulrich Müller <ulm@gentoo.org> + * ebuild-mode.el (ebuild-mode-time-string): Move setting of TZ + into the unwind-protect form. + * ebuild-mode.el (static-if): New macro, taken from APEL. (sh-must-be-shell-mode): Use it. This should finally fix the byte-compile warning for defadvice in Emacs 30. diff --git a/ebuild-mode.el b/ebuild-mode.el index 05fb011..5908b7f 100644 --- a/ebuild-mode.el +++ b/ebuild-mode.el @@ -316,9 +316,10 @@ Compatibility function for XEmacs." ;; as third argument, but accepts non-nil to mean Universal Time. (let ((process-environment (copy-sequence process-environment)) (tz (getenv "TZ"))) - (setenv "TZ" "UTC") (unwind-protect - (format-time-string format-string time) + (progn + (setenv "TZ" "UTC") + (format-time-string format-string time)) ;; This is needed because setenv handles TZ specially. ;; So, restoring the environment is not enough. (setenv "TZ" tz))) |