GNU bug report logs - #26331
numerical timezones require hardwiring

Previous Next

Package: emacs;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Sat, 1 Apr 2017 12:28:01 UTC

Severity: wishlist

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 26331 <at> debbugs.gnu.org (full text, mbox):

From: John Mastro <john.b.mastro <at> gmail.com>
To: 26331 <at> debbugs.gnu.org
Cc: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Subject: Re: bug#26331: numerical timezones require hardwiring
Date: Sat, 1 Apr 2017 17:43:34 -0700
積丹尼 Dan Jacobson <jidanni <at> jidanni.org> 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




This bug report was last modified 7 years and 237 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.