HOME


sh-3ll 1.0
DIR:/proc/self/root/proc/thread-self/root/usr/share/emacs/26.1/lisp/
Upload File :
Current File : //proc/self/root/proc/thread-self/root/usr/share/emacs/26.1/lisp/time-stamp.elc
;ELC
;;; Compiled
;;; in Emacs version 26.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.

;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\300\301\302\303\304\305\304\306&\210\307\310\311\312\313\314\304\301\315\316&	\210\307\317\320\321\313\322\304\301&\210\307\323\320\324\313\322\304\301\315\325&	\210\307\326\302\327\313\330\304\301\315\316&	\207" [custom-declare-group time-stamp nil "Maintain last change time stamps in files edited by Emacs." :group data extensions custom-declare-variable time-stamp-format "%:y-%02m-%02d %02H:%02M:%02S %u" "Format of the string inserted by \\[time-stamp].\nThis is a string, used verbatim except for character sequences beginning\nwith %, as follows.  The values of non-numeric formatted items depend\non the locale setting recorded in `system-time-locale' and\n`locale-coding-system'.  The examples here are for the default\n(`C') locale.\n\n%:a  weekday name: `Monday'.		%#A gives uppercase: `MONDAY'\n%3a  abbreviated weekday: `Mon'.	%3A gives uppercase: `MON'\n%:b  month name: `January'.		%#B gives uppercase: `JANUARY'\n%3b  abbreviated month: `Jan'.		%3B gives uppercase: `JAN'\n%02d day of month\n%02H 24-hour clock hour\n%02I 12-hour clock hour\n%02m month number\n%02M minute\n%#p  `am' or `pm'.			%P  gives uppercase: `AM' or `PM'\n%02S seconds\n%w   day number of week, Sunday is 0\n%02y 2-digit year: `03'			%:y 4-digit year: `2003'\n%z   time zone name: `est'.		%Z  gives uppercase: `EST'\n\nNon-date items:\n%%   a literal percent character: `%'\n%f   file name without directory	%F  gives absolute pathname\n%s   system name\n%u   user's login name			%U  user's full name\n%h   mail host name\n\nDecimal digits between the % and the type character specify the\nfield width.  Strings are truncated on the right; years on the left.\nA leading zero in the field width zero-fills a number.\n\nFor example, to get the format used by the `date' command,\nuse \"%3a %3b %2d %02H:%02M:%02S %Z %:y\".\n\nIn the future these formats will be aligned more with `format-time-string'.\nBecause of this transition, the default padding for numeric formats will\nchange in a future version.  Therefore either a padding width should be\nspecified, or the : modifier should be used to explicitly request the\nhistorical default." :type string :version "20.1" time-stamp-active t "Non-nil to enable time-stamping of buffers by \\[time-stamp].\nCan be toggled by \\[time-stamp-toggle-active].\nSee also the variable `time-stamp-warn-inactive'." boolean time-stamp-warn-inactive "Have \\[time-stamp] warn if a buffer did not get time-stamped.\nIf non-nil, a warning is displayed if `time-stamp-active' has\ndeactivated time stamping and the buffer contains a template that\notherwise would have been updated." "19.29" time-stamp-time-zone "The time zone to be used by \\[time-stamp].\nIts format is that of the ZONE argument of the `format-time-string' function." (choice (const :tag "Emacs local time" nil) (const :tag "Universal Time" t) (const :tag "system wall clock time" wall) (string :tag "TZ environment variable value"))] 10)
#@666 Lines of a file searched; positive counts from start, negative from end.
The patterns `time-stamp-start' and `time-stamp-end' must be found in
the first (last) `time-stamp-line-limit' lines of the file for the
file to be time-stamped by \[time-stamp].  A value of 0 searches the
entire buffer (use with care).

This value can also be set with the variable `time-stamp-pattern'.

Do not change `time-stamp-line-limit', `time-stamp-start',
`time-stamp-end', or `time-stamp-pattern' for yourself or you will be
incompatible with other people's files!  If you must change them for some
application, do so in the local variables section of the time-stamped file
itself.
(defvar time-stamp-line-limit 8 (#$ . 3357))
#@488 Regexp after which the time stamp is written by \[time-stamp].
See also the variables `time-stamp-end' and `time-stamp-line-limit'.

This value can also be set with the variable `time-stamp-pattern'.

Do not change `time-stamp-line-limit', `time-stamp-start',
`time-stamp-end', or `time-stamp-pattern' for yourself or you will be
incompatible with other people's files!  If you must change them for some
application, do so in the local variables section of the time-stamped file
itself.
(defvar time-stamp-start "Time-stamp:[ 	]+\\\\?[\"<]+" (#$ . 4074))
#@909 Regexp marking the text after the time stamp.
\[time-stamp] deletes the text between the first match of `time-stamp-start'
and the following match of `time-stamp-end', then writes the
time stamp specified by `time-stamp-format' between them.

This value can also be set with the variable `time-stamp-pattern'.

The end text normally starts on the same line as the start text ends,
but if there are any newlines in `time-stamp-format', the same number
of newlines must separate the start and end.  \[time-stamp] tries
to not change the number of lines in the buffer.  `time-stamp-inserts-lines'
controls this behavior.

Do not change `time-stamp-start', `time-stamp-end', `time-stamp-pattern',
or `time-stamp-inserts-lines' for yourself or you will be incompatible
with other people's files!  If you must change them for some application,
do so in the local variables section of the time-stamped file itself.
(defvar time-stamp-end "\\\\?[\">]" (#$ . 4636))
#@740 Whether \[time-stamp] can change the number of lines in a file.
If nil, \[time-stamp] skips as many lines as there are newlines in
`time-stamp-format' before looking for the `time-stamp-end' pattern,
thus it tries not to change the number of lines in the buffer.
If non-nil, \[time-stamp] starts looking for the end pattern
immediately after the start pattern.  This behavior can cause
unexpected changes in the buffer if used carelessly, but it is useful
for generating repeated time stamps.

Do not change `time-stamp-end' or `time-stamp-inserts-lines' for
yourself or you will be incompatible with other people's files!
If you must change them for some application, do so in the local
variables section of the time-stamped file itself.
(defvar time-stamp-inserts-lines nil (#$ . 5600))
#@328 How many templates \[time-stamp] will look for in a buffer.
The same time stamp will be written in each case.

Do not change `time-stamp-count' for yourself or you will be
incompatible with other people's files!  If you must change it for
some application, do so in the local variables section of the
time-stamped file itself.
(defvar time-stamp-count 1 (#$ . 6396))
#@1378 Convenience variable setting all `time-stamp' location and format values.
This string has four parts, each of which is optional.
These four parts set `time-stamp-line-limit', `time-stamp-start',
`time-stamp-format', and `time-stamp-end'.  See the documentation
for each of these variables for details.

The first part is a number followed by a slash; the number sets the number
of lines at the beginning (negative counts from end) of the file searched
for the time stamp.  The number and the slash may be omitted to use the
normal value.

The second part is a regexp identifying the pattern preceding the time stamp.
This part may be omitted to use the normal pattern.

The third part specifies the format of the time stamp inserted.  See
the documentation for `time-stamp-format' for details.  Specify this
part as "%%" to use the normal format.

The fourth part is a regexp identifying the pattern following the time stamp.
This part may be omitted to use the normal pattern.

Examples:
"-10/"
"-9/^Last modified: %%$"
"@set Time-stamp: %:b %:d, %:y$"
"newcommand{\\\\timestamp}{%%}"

Do not change `time-stamp-pattern' `time-stamp-line-limit',
`time-stamp-start', or `time-stamp-end' for yourself or you will be
incompatible with other people's files!  If you must change them for
some application, do so only in the local variables section of the
time-stamped file itself.
(defvar time-stamp-pattern nil (#$ . 6771))
#@887 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 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:
      Time-stamp: <>
      Time-stamp: " "
The time stamp is written between the brackets or quotes:
      Time-stamp: <2001-02-18 10:20:51 gildea>
The time stamp is updated only if the variable `time-stamp-active' is non-nil.
The format of the time stamp is set by the variable `time-stamp-pattern' or
`time-stamp-format'.  The variables `time-stamp-pattern',
`time-stamp-line-limit', `time-stamp-start', `time-stamp-end',
`time-stamp-count', and `time-stamp-inserts-lines' control finding
the template.
(defalias 'time-stamp #[nil "	\n\f\306\307\310\211 !;\203b\311\312!\"\210\313\224\2034\314\315\313!\"! \316\224\203@\315\316!\"\317\224\203V\315\317!\"\320\230\204V\315\317!\"\321\224\203b\315\321!\" \250\204s\322 \323\324!\210\325\307!\210\250\204\207\307\323\326!\210\325\307!\210\202\221\307W\203\221\307;\203\261\306\"\311\327\"#\203\260T\306\225\"\202\232)\306\"\311\327\"#\203\312T\306\225\"\202\264)\212\214~\210 \306V\203\345e\211b\210 y\210`\202 \306W\203\373d\211b\210 y\210`\202ed*\203.
W\203.\306V\203.\330
&S\202.	\310\207" [time-stamp-line-limit time-stamp-start time-stamp-format time-stamp-end time-stamp-count search-limit 0 1 nil string-match "\\`\\(\\(-?[0-9]+\\)/\\)?\\([^%]+\\)?\\(\\(%[-.,:@+_ #^()0-9]*[A-Za-z%][^%]*\\)*%[-.,:@+_ #^()0-9]*[A-Za-z%]\\)?\\([^%]+\\)?\\'" 2 string-to-number match-string 3 4 "%%" 6 8 message "time-stamp-line-limit is not an integer" sit-for "time-stamp-count is not an integer" "\n" time-stamp-once start end-lines format-lines ts-count ts-end ts-format ts-start line-limit time-stamp-pattern nl-start] 9 (#$ . 8199) nil])
#@142 Update one time stamp.  Internal routine called by \[time-stamp].
Returns the end point, which is where `time-stamp' begins the next search.
(defalias 'time-stamp-once #[(start search-limit ts-start ts-end ts-format format-lines end-lines) "\306\211\211\211\212\214~\210\fb
W\203b\n\204b\307
\310#\203b`\204+y\210\f`]y\311U\203\fn\203>\312u\210`
^\211	Y\203^	b\210\307\313#\203^\311\224\311\225\nZ)\202\f*\n\203\312\204|\203\312\314\315!\210\316\317!\210\202\312;\203\210;\204\223\314\320!\210\316\317!\210\202\312\321!\211;\203\311\f\n{\230\204\311\212\214~\210\f\n|\210\fb\210\322!\210`\323\324\f\313#\203\310\325\f\n\"\210`*)\n\205\325\205\325\n\\,\207" [end-length end-search-start end case-fold-search start search-limit nil re-search-forward move 0 -1 t message "Warning: time-stamp-active is off; did not time-stamp buffer." sit-for 1 "time-stamp-start or time-stamp-end is not a string" time-stamp-string insert-and-inherit search-backward "	" untabify ts-start time-stamp-inserts-lines format-lines end-lines line-end ts-end time-stamp-active time-stamp-warn-inactive ts-format new-time-stamp] 5 (#$ . 10294)])
#@141 Toggle `time-stamp-active', setting whether \[time-stamp] updates a buffer.
With ARG, turn time stamping on if and only if arg is positive.
(defalias 'time-stamp-toggle-active #[(&optional arg) "\204		?\202\302!\303V\304\305	\203\306\202\307\"\207" [arg time-stamp-active prefix-numeric-value 0 message "time-stamp is now %s." "active" "off"] 3 (#$ . 11484) "P"])
(defalias 'time-stamp--format #[(format time) "\303	\n#\207" [format time time-stamp-time-zone format-time-string] 4])
#@143 Generate the new string to be inserted by \[time-stamp].
Optionally use format TS-FORMAT instead of `time-stamp-format' to
format the string.
(defalias 'time-stamp-string #[(&optional ts-format) "\206	\211;\205\302\303!\304\"\207" [ts-format time-stamp-format time-stamp--format time-stamp-string-preprocess nil] 3 (#$ . 11985)])
#@62 String to use when the buffer is not associated with a file.
(defconst time-stamp-no-file "(no file)" (#$ . 12328))
#@213 Use a FORMAT to format date, time, file, and user information.
Optional second argument TIME is only for testing.
Implements non-time extensions to `format-time-string'
and all `time-stamp-format' compatibility.
(defalias 'time-stamp-string-preprocess #[(format &optional time) "G\306\307\211\310\307\211\211\211\306>?@ABABW\203UAH@>@\311\267\202E\307\211\310AT\211ABW\203JAH\202K\306\211@\312=\204@\313=\204@\314=\204@\315=\204@\316=\204@\317=\204@\320=\204@\321=\204@\322=\204@\323=\204@\324=\203\247?\325=\204\247	T\211\204@\326=\203\302?\325=\204\302	\306V\203\302	S\211\202\315	\306V\203\320ABW\204\327@X\203+\330@Y\203+ACAT\211ABW\203\365AH\202\366\306@\327@X\203\330@Y\204\342CAOASA)@?@\331\267\2027\332\2027\332\2027\2027@\333\267\202\346\334\202\347\n\203B\335\336D\"\202\347\204Q
\310\230\203Q\337\340\341\"\210\203_
\310\230\204_\310\202\347\335\342D\"\202\347\203s\335\342D\"\202\347\n\204\202
\310\230\203\202\337\342\343\"\210\335\343D\"\202\347\n\203\226\335\344D\"\202\347\204\245
\310\230\203\245\337\345\346\"\210\203\263
\310\230\204\263\310\202\347\335\347D\"\202\347\203\307\335\347D\"\202\347\n\204\326
\310\230\203\326\337\347\350\"\210\335\350D\"\202\347\351@
D$\202\347\351@
D$\202\347\351@
D$\202\347\351@
D$\202\347\351@
D$\202\347\n\204\337\352\353\"\210\335\353D\"\202\347\335\352D\"\202\347\351@
D$\202\347\335\354D\"\202\347\204P
\310\230\203P\337\355\356\"\210\357\335\360D\"!\202\347\357\335\360D\"!\202\347\n\203l\310\202\347\335\361D\"\202\347\n\203\200\335\361D\"\202\347\335\362D\"\202\347E\203\224\363E!\202\347F\202\347E\206\347F\202\347\364 \202\347\365 \202\347\366 \202\347\365 \202\347\366 \202\347G\206\347\364 \202\347\364 H\367\370H\"\203\333H\306\211\224O\202\335H)\202\347\364 \202\347\307\300\211\371
\f\247\203\365\372\202\366\373#\f\206\374\310\"\211IGJ
\310\230\203J\202\357
!KJKV\203?\f;\203)I\306KO\202A@\374=\203:IK[\307O\202AI\202AI+\202I\375@!P>AT\211A\202>.\n\207" [format paren-level change-case alt-form field-result field-width 0 nil "" #s(hash-table size 1 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (37 49)) 46 44 58 64 45 43 95 32 35 94 40 92 41 48 57 #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (58 286 35 291)) t #s(hash-table size 28 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (37 306 97 310 65 359 98 394 66 443 100 478 72 489 73 500 109 511 77 522 112 533 80 550 83 558 119 569 121 577 89 602 122 612 90 628 102 648 70 665 115 675 117 680 85 685 108 690 76 695 104 700 113 710 81 737)) "%%" time-stamp--format "%#a" time-stamp-conv-warn "%a" "%:a" "%A" "%#A" "%#b" "%b" "%:b" "%B" "%#B" time-stamp-do-number "%p" "%#p" "%w" "%y" "%:y" string-to-number "%Y" "%#Z" "%Z" file-name-nondirectory system-name user-login-name user-full-name string-match "\\." "%%%s%c" 100 115 121 char-to-string result prev-char cur-char ind fmt-len field-index time buffer-file-name time-stamp-no-file mail-host-address qualname padded-result initial-length desired-length] 11 (#$ . 12451)])
#@196 Handle compatible FORMAT-CHAR where only default width/padding will change.
ALT-FORM is whether `#' specified.  FIELD-WIDTH is the string
width specification or "".  TIME is the time to convert.
(defalias 'time-stamp-do-number #[(format-char alt-form field-width time) "\305\306!P\n\204\307\230\203\310	\311\312\"\"\210\n\203&\307\230\204&\307\202,\313\314	\f\"!)\207" [format-char format-string alt-form field-width time "%" char-to-string "" time-stamp-conv-warn format "%%:%c" string-to-number time-stamp--format] 5 (#$ . 15745)])
#@429 Warn about soon-to-be-unsupported forms in `time-stamp-format'.
If nil, these warnings are disabled, which would be a bad idea!
You really need to update your files instead.

The new formats will work with old versions of Emacs.
New formats are being recommended now to allow `time-stamp-format'
to change in the future to be compatible with `format-time-string'.
The new forms being recommended now will continue to work then.
(defvar time-stamp-conversion-warn t (#$ . 16298))
#@98 Display a warning about a soon-to-be-obsolete format.
Suggests replacing OLD-FORM with NEW-FORM.
(defalias 'time-stamp-conv-warn #[(old-form new-form) "\205#r\303\304!q\210db\210o\203\305\306\307\261\210\310	\311\n\312\261\210)\313\304!\207" [time-stamp-conversion-warn old-form new-form get-buffer-create "*Time-stamp-compatibility*" "The formats recognized in time-stamp-format will change in a future release\n" "to be compatible with the new, expanded format-time-string function.\n\n" "The following obsolescent time-stamp-format construct(s) were found:\n\n" "\"" "\" -- use " "\n" display-buffer] 5 (#$ . 16783)])
(provide 'time-stamp)