comparison lisp/emacs-lisp/copyright.el @ 100869:3d95444199e1

(copyright-update-directory): Autoload. Clarify MATCH argument. Print filenames.
author Reiner Steib <Reiner.Steib@gmx.de>
date Sat, 03 Jan 2009 19:40:20 +0000
parents 90a2847062be
children cdcfed3dd3f9
comparison
equal deleted inserted replaced
100868:47afe3de3618 100869:3d95444199e1
1 ;;; copyright.el --- update the copyright notice in current buffer 1 ;;; copyright.el --- update the copyright notice in current buffer
2 2
3 ;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1998, 2001, 2002, 2003, 3 ;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1998, 2001, 2002, 2003,
4 ;; 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 4 ;; 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
5 5
6 ;; Author: Daniel Pfeiffer <occitan@esperanto.org> 6 ;; Author: Daniel Pfeiffer <occitan@esperanto.org>
7 ;; Keywords: maint, tools 7 ;; Keywords: maint, tools
8 8
9 ;; This file is part of GNU Emacs. 9 ;; This file is part of GNU Emacs.
280 str) 280 str)
281 '(if (copyright-offset-too-large-p) 281 '(if (copyright-offset-too-large-p)
282 (message "Copyright extends beyond `copyright-limit' and won't be updated automatically.")) 282 (message "Copyright extends beyond `copyright-limit' and won't be updated automatically."))
283 comment-end \n) 283 comment-end \n)
284 284
285 ;;;###autoload
285 (defun copyright-update-directory (directory match) 286 (defun copyright-update-directory (directory match)
286 "Update copyright notice for all files in DIRECTORY matching MATCH." 287 "Update copyright notice for all files in DIRECTORY matching MATCH."
287 (interactive "DDirectory: \nMFilenames matching: ") 288 (interactive "DDirectory: \nMFilenames matching (regexp): ")
288 (dolist (file (directory-files directory t match nil)) 289 (dolist (file (directory-files directory t match nil))
290 (message "Updating file `%s'" file)
289 (find-file file) 291 (find-file file)
290 (let ((copyright-query nil)) 292 (let ((copyright-query nil))
291 (copyright-update)) 293 (copyright-update))
292 (save-buffer) 294 (save-buffer)
293 (kill-buffer (current-buffer)))) 295 (kill-buffer (current-buffer))))