(copyright-update-directory): New command.
authorReiner Steib <Reiner.Steib@gmx.de>
Sat, 12 Apr 2008 10:06:28 +0000 (10:06 +0000)
committerReiner Steib <Reiner.Steib@gmx.de>
Sat, 12 Apr 2008 10:06:28 +0000 (10:06 +0000)
lisp/ChangeLog
lisp/emacs-lisp/copyright.el

index 253c2db..763c1f3 100644 (file)
@@ -1,5 +1,8 @@
 2008-04-12  Reiner Steib  <Reiner.Steib@gmx.de>
 
+       * emacs-lisp/copyright.el (copyright-update-directory): New
+       command.
+
        * ediff-wind.el (ediff-split-window-function)
        (ediff-merge-split-window-function): Improve custom type.
 
index d745a24..910ac9e 100644 (file)
@@ -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: