%PDF- %PDF-
Direktori : /usr/local/share/emacs/27.2/lisp/ |
Current File : //usr/local/share/emacs/27.2/lisp/time-stamp.elc |
;ELC ;;; Compiled ;;; in Emacs version 27.2 ;;; 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\331& \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 %l" "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' %#a gives uppercase: `MON'\n%:B month name: `January' %#B gives uppercase: `JANUARY'\n%3b abbreviated month: `Jan' %#b 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 lowercase: `est'\n%5z time zone offset: `-0500' (since Emacs 27; see note below)\n\nNon-date items:\n%% a literal percent character: `%'\n%f file name without directory %F gives absolute pathname\n%l login name %L full name of logged-in user\n%q unqualified host name %Q fully-qualified host 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.\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\nThe default padding of some formats has changed to be more compatible\nwith format-time-string. To be compatible with older versions of Emacs,\nspecify a padding width (as shown) or use the : modifier to request the\ntransitional behavior (again, as shown).\n\nThe behavior of `%5z' is new in Emacs 27. If your files might be\nedited by older versions of Emacs also, do not use this format yet." :type string :version "27.1" time-stamp-active t "Non-nil to enable time-stamping of buffers by \\[time-stamp].\nCan be toggled by \\[time-stamp-toggle-active].\n\nThis option does not affect when `time-stamp' is run, only what it\ndoes when it runs. To activate automatic time-stamping of buffers\nwhen they are saved, either add this line to your init file:\n (add-hook \\='before-save-hook \\='time-stamp)\nor customize option `before-save-hook'.\n\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") (list :tag "Offset and name" (integer :tag "Offset (seconds east of UTC)") (string :tag "Time zone abbreviation")) (integer :tag "Offset (seconds east of UTC)")) "20.1"] 10) #@150 Return whether or not ZONE is of the correct type for a timezone rule. Valid ZONE values are described in the documentation of `format-time-string'. (defalias 'time-stamp-zone-type-p #[(zone) "\301>\206% ;\206% :\203# @\250\203# A:\203# A@;\206% \250\207" [zone (nil t wall)] 2 (#$ . 4112)]) #@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 (#$ . 4418)) #@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:[ ]+\\\\?[\"<]+" (#$ . 5135)) #@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 "\\\\?[\">]" (#$ . 5697)) #@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 (#$ . 6661)) #@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 (#$ . 7457)) #@1604 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/" (sets only `time-stamp-line-limit') "-9/^Last modified: %%$" (sets `time-stamp-line-limit', `time-stamp-start' and `time-stamp-end') "@set Time-stamp: %:B %1d, %Y$" (sets `time-stamp-start', `time-stamp-format' and `time-stamp-end') "newcommand{\\\\timestamp}{%%}" (sets `time-stamp-start' and `time-stamp-end') 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 (#$ . 7832)) #@879 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 option `before-save-hook'. 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\260 T\306\225\"\202\232 )\306\"\311\327\"#\203\312 T\306\225\"\202\264 )\212\214~\210 \306V\203\345 e\211b\210 y\210`\202 \306W\203\373 d\211b\210 y\210`\202 ed*\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 (#$ . 9486) 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\f n\203>