diff options
author | Reiner Steib <Reiner.Steib@gmx.de> | 2008-04-12 10:06:28 +0000 |
---|---|---|
committer | Reiner Steib <Reiner.Steib@gmx.de> | 2008-04-12 10:06:28 +0000 |
commit | 470fc3548e6d31ee172802c7ff3b1c97988c9ff5 (patch) | |
tree | 348a35061dc858c1becdab51b401dab70079805c /lisp/emacs-lisp/copyright.el | |
parent | c12b5b0035577589609f902d8069b3ba9839acb2 (diff) | |
download | emacs-470fc3548e6d31ee172802c7ff3b1c97988c9ff5.tar.gz |
(copyright-update-directory): New command.
Diffstat (limited to 'lisp/emacs-lisp/copyright.el')
-rw-r--r-- | lisp/emacs-lisp/copyright.el | 10 |
1 files changed, 10 insertions, 0 deletions
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: |