;ELC ;;; compiled by jwz@thalidomide on Sun Jan 2 02:59:48 1994 ;;; from file /th/jwz/emacs19/lisp/packages/upd-copyr.el ;;; emacs version 19.9 Lucid (beta10). ;;; bytecomp version 2.22; 22-dec-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.")) (defconst current-year (byte-code " O" [current-time-string -4 nil] 3) "\ String representing the current year.") (defvar current-gpl-version "2" "\ String representing the current version of the GPL.") (defvar replace-copying-with nil "\ *If non-nil, replace copying notices with this file.") (defvar inhibit-update-copyright nil "\ If nil, ask the user whether or not to update the copyright notice. If the user has said no, we set this to t locally.") (fset 'update-copyright #[(&optional replace ask-upd ask-year) "~eb\nO\nO# \n\"eb ? #eb# ЋӋԔԕ|cԔb!u!c)\nciY)zUccઁ\n#\"#$eb##y!! `##!! #`|\"!*#Ԕb`ԕ|0c !!*" [re-search-forward "\\(" current-year 0 2 "\\)?" "\\([0-9][0-9]\\(,\\s \\)+\\)*'?" nil t ask-upd message "Copyright notice already includes %s." inhibit-update-copyright search-forward "is free software" "[Cc]opyright[^0-9]*\\(\\([-, ]*\\([0-9]+\\)\\)\\)+" ((byte-code "p!eb!!!L)" [pop-to-buffer sit-for 0 y-or-n-p "Update copyright? " make-local-variable inhibit-update-copyright t nil] 2)) replace ask-year ((byte-code "p!eb)" [pop-to-buffer nil] 2)) 1 ", " looking-at "[0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]" 4 delete-char fill-column 59 60 "\n;;;" "\n " "Copyright updated to %s%s." "" "include " replace-copying-with beg case-fold-search "copyright" "^\\(\\s \\s<\\|\\s>\\)*$" "*Help*" princ substitute-command-keys "I don't know where the copying notice begins.\nPut point there and hit \\[exit-recursive-edit]." recursive-edit "02139, USA." "I don't know where the copying notice ends.\nPut point there and hit \\[exit-recursive-edit]." insert-file "; either version \\(.+\\), or (at your option)" current-gpl-version error "This buffer contains no copyright notice!" sit-for] 9 "\ Update the copyright notice at the beginning of the buffer to indicate the current year. If optional arg REPLACE is given (interactively, with prefix arg) replace the years in the notice rather than adding the current year after them. If `replace-copying-with' is set, the copying permissions following the copyright are replaced as well. If optional third argument ASK is non-nil, the user is prompted for whether or not to update the copyright. If optional fourth argument ASK-YEAR is non-nil, the user is prompted for whether or not to replace the year rather than adding to it." "*P"]) (fset 'ask-to-update-copyright #[nil "‰#" [update-copyright nil t] 4 "\ If the current buffer contains a copyright notice that is out of date, ask the user if it should be updated with `update-copyright' (which see). Put this on write-file-hooks."]) (provide 'upd-copyr)