aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/emacs-lisp/copyright.el
diff options
context:
space:
mode:
authorReiner Steib <[email protected]>2008-04-12 10:06:28 +0000
committerReiner Steib <[email protected]>2008-04-12 10:06:28 +0000
commit470fc3548e6d31ee172802c7ff3b1c97988c9ff5 (patch)
tree348a35061dc858c1becdab51b401dab70079805c /lisp/emacs-lisp/copyright.el
parentc12b5b0035577589609f902d8069b3ba9839acb2 (diff)
(copyright-update-directory): New command.
Diffstat (limited to 'lisp/emacs-lisp/copyright.el')
-rw-r--r--lisp/emacs-lisp/copyright.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/copyright.el b/lisp/emacs-lisp/copyright.el
index d745a245e8..910ac9eaa2 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: