;ELC ;;; compiled by kwzh@hal.gnu.ai.mit.edu on Mon Apr 17 19:54:25 1995 ;;; from file /gd/gnu/emacs/19.0/lisp/upd-copyr.el ;;; emacs version 19.28.90.26. ;;; 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/upd-copyr.el' was compiled for Emacs 19")) #@39 String representing the current year. (defconst current-year (byte-code " O" [current-time-string -4 nil] 3) (#$ . 487)) #@53 String representing the current version of the GPL. (defvar current-gpl-version "2" (#$ . 618)) #@54 *If non-nil, replace copying notices with this file. (defvar replace-copying-with nil (#$ . -720)) #@120 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. (defvar inhibit-update-copyright nil (#$ . 826)) #@586 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. (defalias 'update-copyright #[(&optional replace ask-upd ask-year) "~eb\nO\nO#' \n\"eb\f? @#eb# RЋ^^ӋmԔԕ|pc\nc~ׂ\n#eb##yސ!!\"q ) `#ސ!!\"q ) `|!*#Ԕb`ԕ|)c*" [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 sit-for 0 y-or-n-p "Replace copyright year? "] 2)) 1 ", " "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]." standard-output help-mode 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] 9 (#$ . 1001) "*P"]) #@176 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. (defalias 'ask-to-update-copyright #[nil "‰#" [update-copyright nil t] 4 (#$ . 2980)]) (provide (quote upd-copyr))