;ELC ;;; compiled by kwzh@hal.gnu.ai.mit.edu on Tue May 3 21:54:59 1994 ;;; from file /gd/gnu/emacs/19.0/lisp/time-stamp.el ;;; emacs version 19.22.92.2. ;;; bytecomp version FSF 2.10 ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19"))) (error "`/gd/gnu/emacs/19.0/lisp/time-stamp.el' was compiled for Emacs 19")) (defvar time-stamp-active t "\ *Non-nil to enable time-stamping of files. See the function time-stamp.") (defvar time-stamp-format (quote (time-stamp-yy/mm/dd time-stamp-hh:mm:ss user-login-name)) "\ *A list of functions to call to generate the time stamp string. Each element of the list is called as a function and the results are concatenated together separated by spaces. Elements may also be strings, which are included verbatim. Spaces are not inserted around literal strings.") (defvar time-stamp-line-limit 8 "\ Number of lines at the beginning of a file that are searched. The patterns `time-stamp-start' and `time-stamp-end' must be found on one of the first `time-stamp-line-limit' lines of the file for the file to be time-stamped by \\[time-stamp]. Do not change `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 in the local variables section of the time-stamped file itself.") (defvar time-stamp-start "Time-stamp:[ ]+\\\\?[\"<]+" "\ Regexp after which the time stamp is written by \\[time-stamp]. See also the variables `time-stamp-end' and `time-stamp-line-limit'. Do not change `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 in the local variables section of the time-stamped file itself.") (defvar time-stamp-end "\\\\?[\">]" "\ 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' on the same line, then writes the time stamp specified by `time-stamp-format' between them. Do not change `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 in the local variables section of the time-stamped file itself.") (defalias 'time-stamp #[nil "ƒfÁ ;ƒa\f;ƒaŠebˆÅ Šyˆ`)Ç#ƒ]`Å\fŠÁˆ`)Ç#ƒ\\É”\n\n|ˆbˆË cˆ`\nbˆÌÍ\nÇ#ƒ[Î\n\"ˆ)))‚eÏÐ!ˆ)Á‡" [time-stamp-active nil case-fold-search time-stamp-start time-stamp-end re-search-forward time-stamp-line-limit t start 0 end time-stamp-string search-forward " " untabify message "time-stamp-start or time-stamp-end is not a string"] 4 "\ Update the time stamp string in the buffer. If you put a time stamp template anywhere in the first 8 lines of a file, it can be updated every time you save the file. See the top of `time-stamp.el' for a sample. The template looks like one of the following: Time-stamp: <> Time-stamp: \" \" The time stamp is written between the brackets or quotes, resulting in Time-stamp: <93/06/18 10:26:51 gildea> Only does its thing if the variable time-stamp-active is non-nil. Typically used on write-file-hooks for automatic time-stamping. The format of the time stamp is determined by the variable time-stamp-format. The variables time-stamp-line-limit, time-stamp-start, and time-stamp-end control finding the template." nil]) (defalias 'time-stamp-string #[nil "À Â\"‡" [time-stamp-fconcat time-stamp-format " "] 3 "\ Generate the new string to be inserted by \\[time-stamp]."]) (defalias 'time-stamp-fconcat #[(list sep) "ÀÁ\fƒ/\f@9ƒ!\nƒ P \f@ PÆ‚( \f@PÁ\fA‰„ *‡" ["" nil insert-sep-p return-string list sep t] 3 "\ Similar to (mapconcat 'funcall LIST SEP) but LIST allows literals. If an element of LIST is a symbol, it is funcalled to get the string to use; the separator SEP is used between two strings obtained by funcalling a symbol. Otherwise the element itself is inserted; no separator is used around literals."]) (defconst time-stamp-month-numbers (quote (("Jan" . 1) ("Feb" . 2) ("Mar" . 3) ("Apr" . 4) ("May" . 5) ("Jun" . 6) ("Jul" . 7) ("Aug" . 8) ("Sep" . 9) ("Oct" . 10) ("Nov" . 11) ("Dec" . 12))) "\ Alist of months and their number.") (byte-code "À‡" [["(zero)" "January" "February" "March" "April" "May" "June" "July" "August" "September" "October" "November" "December"] time-stamp-month-full-names nil] 1) (defvar time-stamp-mail-host nil "\ *Name of the host where the user receives mail. See the function `time-stamp-mail-host-name'.") (defalias 'time-stamp-mail-host-name #[nil "ÀÁ!ƒ ;ƒ † ‡" [boundp time-stamp-mail-host system-name] 2 "\ Return the name of the host where the user receives mail. This is the value of `time-stamp-mail-host' if bound and a string, otherwise the value of the function system-name. This function may be usefully referenced by `time-stamp-format'."]) (defalias 'time-stamp-month-dd-yyyy #[nil "À ÂÃ\fÅ ÆÇO\"AHÉ ÊËO! ÌÍO$)‡" [current-time-string date format "%s %d, %s" time-stamp-month-full-names assoc 4 7 time-stamp-month-numbers string-to-int 8 10 -4 nil] 7 "\ Return the current date as a string in \"Month DD, YYYY\" form."]) (defalias 'time-stamp-mon-dd-yyyy #[nil "À Âà ÄÅOÆ ÇÈO! ÉÊO$)‡" [current-time-string date format "%s %2d %s" 4 7 string-to-int 8 10 -4 nil] 7 "\ Return the current date as a string in \"Mon DD YYYY\" form. The first character of DD is space if the value is less than 10."]) (defalias 'time-stamp-dd-mon-yy #[nil "À ÂÃÄ ÅÆO! ÇÈO ÉÊO$)‡" [current-time-string date format "%02d %s %s" string-to-int 8 10 4 7 -2 nil] 7 "\ Return the current date as a string in \"DD Mon YY\" form."]) (defalias 'time-stamp-yy/mm/dd #[nil "À Âà ÄÅOÆ ÇÈO \"AÊ ËÌO!$)‡" [current-time-string date format "%s/%02d/%02d" -2 nil assoc 4 7 time-stamp-month-numbers string-to-int 8 10] 8 "\ Return the current date as a string in \"YY/MM/DD\" form."]) (defalias 'time-stamp-yyyy/mm/dd #[nil "À Âà ÄÅOÆ ÇÈO \"AÊ ËÌO!$)‡" [current-time-string date format "%s/%02d/%02d" -4 nil assoc 4 7 time-stamp-month-numbers string-to-int 8 10] 8 "\ Return the current date as a string in \"YYYY/MM/DD\" form."]) (defalias 'time-stamp-yyyy-mm-dd #[nil "À Âà ÄÅOÆ ÇÈO \"AÊ ËÌO!$)‡" [current-time-string date format "%s-%02d-%02d" -4 nil assoc 4 7 time-stamp-month-numbers string-to-int 8 10] 8 "\ Return the current date as a string in \"YYYY-MM-DD\" form."]) (defalias 'time-stamp-yymmdd #[nil "À Âà ÄÅOÆ ÇÈO \"AÊ ËÌO!$)‡" [current-time-string date format "%s%02d%02d" -2 nil assoc 4 7 time-stamp-month-numbers string-to-int 8 10] 8 "\ Return the current date as a string in \"YYMMDD\" form."]) (defalias 'time-stamp-hh:mm:ss #[nil "À ÁÂO‡" [current-time-string 11 19] 3 "\ Return the current time as a string in \"HH:MM:SS\" form."]) (defalias 'time-stamp-hhmm #[nil "À ‰ÂÃO ÄÅOP)‡" [current-time-string date 11 13 14 16] 5 "\ Return the current time as a string in \"HHMM\" form."]) (provide (quote time-stamp))