From: Daniel Pfeiffer <occitan@esperanto.org>
Cc: ding@gnus.org
Subject: Re: Fix to the copyright.el regexp to catch multi-line copyrights.
Date: Thu, 3 Jan 2002 22:21:53 +0100 [thread overview]
Message-ID: <20020103222153.6f6bf559.occitan@esperanto.org> (raw)
In-Reply-To: <m3zo3y3j9m.fsf@quimbies.gnus.org>
Hello Lars,
Lars Magne Ingebrigtsen <larsi@gnus.org> skribis:
> MIME-Version: 1.0
> Content-Type: text/plain; charset=utf-8
> Content-Transfer-Encoding: quoted-printable
your mailer seems to be broken, this resulted in an illegible regexp:
> (defcustom copyright-regexp
> "\\([\251=C2=81=C2=A9]\\|@copyright{}\\|[Cc]opyright\\s *:?\\s *(C)\
> \\|[Cc]opyright\\s *:?\\s *[\251=C2=81=C2=A9]\\)\
> -\\s *\\([1-9][-0-9, ']*[0-9]+\\)"
> +\\s *\\([1-9][-0-9, ';\n\t]*[0-9]+\\)"
Anyways, when you get this sorted out check who the maintainer for this is
-- I haven't touched it in years.
> +(defun copyright-update-directory (directory)
> + "Update the copyright statements in DIRECTORY.
> +Only .el files will be updated."
> + (interactive "DUpdate copyrights in: ")
> + (let ((current-year (format-time-string "%Y")))
> + (dolist (file (directory-files directory t "\\.el$"))
> + (when (string= current-year
> + (format-time-string "%Y" (nth 5 (file-attributes file))))
> + (find-file file)
> + (copyright-update)))))
That's a very questionable approach! Why would I want to do it only for
.el files? And why precisely for a directory? Better find out how the
file-name shell pattern expansion works and use that.
And what's the use of opening a whole bunch of files? At the end there
should be some save-buffers-dialogue for only those files that were opened
and modified!
Daniel
next prev parent reply other threads:[~2002-01-03 21:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-01 2:19 Lars Magne Ingebrigtsen
2002-01-01 2:23 ` Lars Magne Ingebrigtsen
2002-01-03 21:21 ` Daniel Pfeiffer [this message]
2002-01-04 4:45 ` Lars Magne Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020103222153.6f6bf559.occitan@esperanto.org \
--to=occitan@esperanto.org \
--cc=ding@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).