X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/a64bfdfa5a90731b804c057f2bcc74a8ba02937c..7126e9a40b7ffbf336dcb0209020db112696a871:/lisp/time-stamp.el diff --git a/lisp/time-stamp.el b/lisp/time-stamp.el index fda8cd1438..b6a73409f8 100644 --- a/lisp/time-stamp.el +++ b/lisp/time-stamp.el @@ -1,7 +1,7 @@ ;;; time-stamp.el --- Maintain last change time stamps in files edited by Emacs -;; Copyright (C) 1989, 1993-1995, 1997, 2000-2011 -;; Free Software Foundation, Inc. +;; Copyright (C) 1989, 1993-1995, 1997, 2000-2015 Free Software +;; Foundation, Inc. ;; This file is part of GNU Emacs. @@ -29,7 +29,7 @@ ;; static char *ts = "sdmain.c Time-stamp: <2001-08-13 10:20:51 gildea>"; ;; See the top of `time-stamp.el' for another example. -;; To use time-stamping, add this line to your .emacs file: +;; To use time-stamping, add this line to your init file: ;; (add-hook 'before-save-hook 'time-stamp) ;; Now any time-stamp templates in your files will be updated automatically. @@ -254,8 +254,8 @@ time-stamped file itself.") (defun time-stamp () "Update the time stamp string(s) in the buffer. A template in a file can be automatically updated with a new time stamp -every time you save the file. Add this line to your .emacs file: - (add-hook 'before-save-hook 'time-stamp) +every time you save the file. Add this line to your init file: + (add-hook \\='before-save-hook \\='time-stamp) or customize `before-save-hook' through Custom. Normally the template must appear in the first 8 lines of a file and look like one of the following: @@ -420,16 +420,8 @@ format the string." (or ts-format (setq ts-format time-stamp-format)) (if (stringp ts-format) - (if (stringp time-stamp-time-zone) - (let ((ts-real-time-zone (getenv "TZ"))) - (unwind-protect - (progn - (setenv "TZ" time-stamp-time-zone) - (format-time-string - (time-stamp-string-preprocess ts-format))) - (setenv "TZ" ts-real-time-zone))) - (format-time-string - (time-stamp-string-preprocess ts-format))) + (format-time-string (time-stamp-string-preprocess ts-format) + nil time-stamp-time-zone) ;; handle version 1 compatibility (cond ((or (eq time-stamp-old-format-warn 'error) (and (eq time-stamp-old-format-warn 'ask)