Skip to content

Time stamp

Gonzalo Larumbe edited this page Jun 9, 2023 · 2 revisions

Emacs has a built-in package called time-stamp that automatically updates the modification date of a file upon save.

Setup of the comment headers is required so that they are recognized properly.

Check the values of the following customizable variables:

  • verilog-ext-time-stamp-enable
    • Defaults to t
  • verilog-ext-time-stamp-regex
    • Defaults to "^// Last modified : " as generated by verilog-ext-templ-header and verilog-header
  • verilog-ext-time-stamp-pattern
    • If using a value different than the default for verilog-ext-time-stamp-regex this one needs to be updated accordingly, e.g:
      (setq verilog-ext-time-stamp-pattern (concat verilog-ext-time-stamp-regex "%%$"))

By default time-stamp looks for the pattern in the first 8 lines. This can be changed by setting the local variables verilog-ext-time-stamp-start and verilog-ext-time-stamp-end for custom scenarios.

Clone this wiki locally