Subject: Re: bug#26331: numerical timezones require hardwiring

From: John Mastro <[email-masked]>
Date: Sat, 1 Apr 2017 17:43:34 -0700

積丹尼 Dan Jacobson <[email-masked]> wrote:
> I mean how to make emacs only look for and change time stamps in HTML files.

Right. Here's what I mean:

    (eval-after-load 'sgml-mode
      '(add-hook
        'html-mode-hook
        (lambda ()
          (set (make-local-variable 'time-stamp-pattern)
               "-8/>Last modified: %Y-%02m-%02d %02H:%02M:%02S \\+0800")
          (set (make-local-variable 'time-stamp-time-zone) "Asia/Taipei")
          (add-hook 'before-save-hook 'time-stamp nil t) ;; <- Here
          )))

It will add `time-stamp' to `before-save-hook' buffer-locally in all
`html-mode' buffers.

        John