From 470fc3548e6d31ee172802c7ff3b1c97988c9ff5 Mon Sep 17 00:00:00 2001 From: Reiner Steib Date: Sat, 12 Apr 2008 10:06:28 +0000 Subject: (copyright-update-directory): New command. --- lisp/emacs-lisp/copyright.el | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lisp/emacs-lisp') diff --git a/lisp/emacs-lisp/copyright.el b/lisp/emacs-lisp/copyright.el index d745a245e8e..910ac9eaa23 100644 --- a/lisp/emacs-lisp/copyright.el +++ b/lisp/emacs-lisp/copyright.el @@ -255,6 +255,16 @@ Uses heuristic: year >= 50 means 19xx, < 50 means 20xx." (message "Copyright extends beyond `copyright-limit' and won't be updated automatically.")) comment-end \n) +(defun copyright-update-directory (directory match) + "Update copyright notice for all files in DIRECTORY matching MATCH." + (interactive "DDirectory: \nMFilenames matching: ") + (dolist (file (directory-files directory t match nil)) + (find-file file) + (let ((copyright-query nil)) + (copyright-update)) + (save-buffer) + (kill-buffer (current-buffer)))) + (provide 'copyright) ;; For the copyright sign: -- cgit v1.2.1