Gnus development mailing list
 help / color / mirror / Atom feed
* Fix to the copyright.el regexp to catch multi-line copyrights.
@ 2002-01-01  2:19 Lars Magne Ingebrigtsen
  2002-01-01  2:23 ` Lars Magne Ingebrigtsen
  2002-01-03 21:21 ` Daniel Pfeiffer
  0 siblings, 2 replies; 4+ messages in thread
From: Lars Magne Ingebrigtsen @ 2002-01-01  2:19 UTC (permalink / raw)
  Cc: ding

MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

The following patch allows things like the following to be
recognized:

;; Copyright (C) 1987, 1988, 1989, 1990, 1993, 1994, 1995, 1996,=20
;;        1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.



--- copyright.el.~1~	Mon Jul 16 14:22:59 2001
+++ copyright.el	Tue Jan  1 03:16:41 2002
@@ -45,7 +45,7 @@
 (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]+\\)"
   "*What your copyright notice looks like.
 The second \\( \\) construct must match the years."
   :group 'copyright

=20=20=20
--=20
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Fix to the copyright.el regexp to catch multi-line copyrights.
  2002-01-01  2:19 Fix to the copyright.el regexp to catch multi-line copyrights Lars Magne Ingebrigtsen
@ 2002-01-01  2:23 ` Lars Magne Ingebrigtsen
  2002-01-03 21:21 ` Daniel Pfeiffer
  1 sibling, 0 replies; 4+ messages in thread
From: Lars Magne Ingebrigtsen @ 2002-01-01  2:23 UTC (permalink / raw)


Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> MIME-Version: 1.0
> Content-Type: text/plain; charset=utf-8
> Content-Transfer-Encoding: quoted-printable

[...]

>  \\|[Cc]opyright\\s *:?\\s *[\251=C2=81=C2=A9]\\)\

Uhm -- what happened here?  The MIME headers ended up in the body of
the message.  Weird.

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Fix to the copyright.el regexp to catch multi-line copyrights.
  2002-01-01  2:19 Fix to the copyright.el regexp to catch multi-line copyrights Lars Magne Ingebrigtsen
  2002-01-01  2:23 ` Lars Magne Ingebrigtsen
@ 2002-01-03 21:21 ` Daniel Pfeiffer
  2002-01-04  4:45   ` Lars Magne Ingebrigtsen
  1 sibling, 1 reply; 4+ messages in thread
From: Daniel Pfeiffer @ 2002-01-03 21:21 UTC (permalink / raw)
  Cc: ding

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



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Fix to the copyright.el regexp to catch multi-line copyrights.
  2002-01-03 21:21 ` Daniel Pfeiffer
@ 2002-01-04  4:45   ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 4+ messages in thread
From: Lars Magne Ingebrigtsen @ 2002-01-04  4:45 UTC (permalink / raw)


Daniel Pfeiffer <occitan@esperanto.org> writes:

> Anyways, when you get this sorted out check who the maintainer for this is
> -- I haven't touched it in years.

Ok; I've sent it to emacs-devel instead.

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-01-04  4:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-01  2:19 Fix to the copyright.el regexp to catch multi-line copyrights Lars Magne Ingebrigtsen
2002-01-01  2:23 ` Lars Magne Ingebrigtsen
2002-01-03 21:21 ` Daniel Pfeiffer
2002-01-04  4:45   ` Lars Magne Ingebrigtsen

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).