;ELC ;;; compiled by cthomp@willow on Thu Aug 12 00:43:55 1993 ;;; from file /era/era-0.80/editor/lisp/packages/time-stamp.el ;;; emacs version 19.8 (beta8) Lucid. ;;; bytecomp version 2.15; 14-jul-93. ;;; 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 "This file 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 '(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.") (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 (which see) and the following match of time-stamp-end on the same line, then writes the time stamp specified by time-stamp-format between them.") (fset 'time-stamp #[nil "«ÜÁ ;«Ñ ;«ÍŠebˆÅ Šyˆ`)Ç#«¹`Å ŠÁˆ`)Ç#«©É”\n\n|ˆbˆË cˆ`\nbˆÌÍ\nÇ#«‡Î\n\"ˆ)))ª„ÏÐ!ˆ)Á‡" [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. 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 first time-stamp-line-limit lines of the buffer (normally 8) are searched for the time stamp template, and if it is found, a new time stamp is written into it." nil]) (fset 'time-stamp-string #[nil "À Â\"‡" [time-stamp-fconcat time-stamp-format " "] 3 "\ Generate the new string to be inserted by \\[time-stamp]."]) (fset 'time-stamp-fconcat #[(list sep) "ÀÁ «£ @9«‘\n«„ P @ Pƪ‡ @PÁ A‰¬] *‡" ["" nil insert-sep-p return-string list sep t] 3 "\ Similar to (mapconcat 'funcall LIST SEP) but LIST can have 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 '(("Jan" . 1) ("Feb" . 2) ("Mar" . 3) ("Apr" . 4) ("May" . 5) ("Jun" . 6) ("Jul" . 7) ("Aug" . 8) ("Sep" . 9) ("Oct" . 10) ("Nov" . 11) ("Dec" . 12)) "\ Assoc list 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.") (fset '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."]) (fset 'time-stamp-current-year #[nil "À ÁÂO‡" [current-time-string -4 nil] 3 "\ Return the current year as a four-character string."]) (fset 'time-stamp-month-dd-yyyy #[nil "À Âà ŠÆÇO\"AHÉ ÊËO! ÌÍO$)‡" [current-time-string date format "%s %02d, %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."]) (fset '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."]) (fset '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."]) (fset '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."]) (fset '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."]) (fset '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."]) (fset 'time-stamp-dd/mm/yy #[nil "À ÂÃÄ ÅÆO!Ç ÈÉO\n\"A ËÌO$)‡" [current-time-string date format "%02d/%02d/%s" string-to-int 8 10 assoc 4 7 time-stamp-month-numbers -2 nil] 7 "\ Return the current date as a string in \"dd/mm/yy\" form."]) (fset 'time-stamp-mm/dd/yy #[nil "À ÂÃÄ ÅÆO\"AÈ ÉÊO! ËÌO$)‡" [current-time-string date format "%02d/%02d/%s" assoc 4 7 time-stamp-month-numbers string-to-int 8 10 -2 nil] 7 "\ Return the current date as a string in \"mm/dd/yy\" form."]) (fset '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."]) (fset 'time-stamp-hh:mm #[nil "À ÁÂO‡" [current-time-string 11 16] 3 "\ Return the current time as a string in \"hh:mm\" form."]) (fset '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 'time-stamp)