unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* copyright.el
@ 2004-07-29 17:12 Luc Teirlinck
  2004-08-01  3:31 ` copyright.el Richard Stallman
  0 siblings, 1 reply; 3+ messages in thread
From: Luc Teirlinck @ 2004-07-29 17:12 UTC (permalink / raw)


There is an apparent bug in copyright.el.

variables.texi contains:

@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999,
@c 2000, 2003, 2004
@c   Free Software Foundation, Inc.

When trying to save, copyright.el will offer to update, because it
stops at the 1999 at the end of the line (even though the 1999 is
followed by a comma).

Sincerely,

Luc.

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

* Re: copyright.el
  2004-07-29 17:12 copyright.el Luc Teirlinck
@ 2004-08-01  3:31 ` Richard Stallman
  2004-08-01 17:35   ` copyright.el Luc Teirlinck
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Stallman @ 2004-08-01  3:31 UTC (permalink / raw)
  Cc: emacs-devel

    There is an apparent bug in copyright.el.

    variables.texi contains:

Does this give good results?

*** copyright.el	07 Jan 2004 08:15:08 -0500	1.46
--- copyright.el	31 Jul 2004 21:04:36 -0400	
***************
*** 54,59 ****
--- 54,66 ----
    :group 'copyright
    :type 'regexp)
  
+ (defcustom copyright-years-regexp
+  "\\(\\s *\\)\\([1-9]\\([-0-9, ';/*%#\n\t]\\|\\s<\\|\\s>\\)*[0-9]+\\)"
+   "*Match additional copyright notice years.
+ The second \\( \\) construct must match the years."
+   :group 'copyright
+   :type 'regexp)
+ 
  
  (defcustom copyright-query 'function
    "*If non-nil, ask user before changing copyright.
***************
*** 77,82 ****
--- 84,106 ----
  
  (defun copyright-update-year (replace noquery)
    (when (re-search-forward copyright-regexp (+ (point) copyright-limit) t)
+     ;; If the years are continued onto multiple lined
+     ;; that are marked as comments, skip to the end of the years anyway.
+     (while (save-excursion
+ 	     (and (eq (following-char) ?,)
+ 		  (progn (forward-char 1) t)
+ 		  (progn (skip-chars-forward " \t") (eolp))
+ 		  comment-start-skip
+ 		  (save-match-data
+ 		    (forward-line 1)
+ 		    (and (looking-at comment-start-skip)
+ 			 (goto-char (match-end 0))))
+ 		  (save-match-data
+ 		    (looking-at copyright-years-regexp))))
+       (forward-line 1)
+       (re-search-forward comment-start-skip)
+       (re-search-forward copyright-years-regexp))
+ 		  
      ;; Note that `current-time-string' isn't locale-sensitive.
      (setq copyright-current-year (substring (current-time-string) -4))
      (unless (string= (buffer-substring (- (match-end 2) 2) (match-end 2))

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

* Re: copyright.el
  2004-08-01  3:31 ` copyright.el Richard Stallman
@ 2004-08-01 17:35   ` Luc Teirlinck
  0 siblings, 0 replies; 3+ messages in thread
From: Luc Teirlinck @ 2004-08-01 17:35 UTC (permalink / raw)
  Cc: emacs-devel

Richard Stallman wrote:

       There is an apparent bug in copyright.el.

       variables.texi contains:

   Does this give good results?

Yes, it does.

Sincerely,

Luc.

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

end of thread, other threads:[~2004-08-01 17:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-29 17:12 copyright.el Luc Teirlinck
2004-08-01  3:31 ` copyright.el Richard Stallman
2004-08-01 17:35   ` copyright.el Luc Teirlinck

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).