From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.emacs.bugs,gmane.emacs.pretest.bugs Subject: bug#3863: 23.1.50; possible save-match-data in copyright.el Date: Thu, 16 Jul 2009 10:05:39 +1000 Message-ID: <87ocrla3vw.fsf@blah.blah> Reply-To: Kevin Ryde , 3863@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1247703484 9153 80.91.229.12 (16 Jul 2009 00:18:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 16 Jul 2009 00:18:04 +0000 (UTC) To: emacs-pretest-bug@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jul 16 02:17:57 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MREfa-00039N-OC for geb-bug-gnu-emacs@m.gmane.org; Thu, 16 Jul 2009 02:17:55 +0200 Original-Received: from localhost ([127.0.0.1]:36612 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MREfa-0005g9-2p for geb-bug-gnu-emacs@m.gmane.org; Wed, 15 Jul 2009 20:17:54 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MREfK-0005Zp-BN for bug-gnu-emacs@gnu.org; Wed, 15 Jul 2009 20:17:38 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MREfF-0005Xi-2y for bug-gnu-emacs@gnu.org; Wed, 15 Jul 2009 20:17:37 -0400 Original-Received: from [199.232.76.173] (port=46455 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MREfE-0005XV-OV for bug-gnu-emacs@gnu.org; Wed, 15 Jul 2009 20:17:32 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:38393) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MREfC-0007y8-Oy for bug-gnu-emacs@gnu.org; Wed, 15 Jul 2009 20:17:32 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6G0HSO9006002; Wed, 15 Jul 2009 17:17:28 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n6G0A5gl004623; Wed, 15 Jul 2009 17:10:05 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Kevin Ryde Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 16 Jul 2009 00:10:05 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: report 3863 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12477027564151 (code B ref -1); Thu, 16 Jul 2009 00:10:05 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 16 Jul 2009 00:05:56 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6G05pEL004146 for ; Wed, 15 Jul 2009 17:05:52 -0700 Original-Received: from mx10.gnu.org ([199.232.76.166]:38386) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1MRETv-0001lR-0j for emacs-pretest-bug@gnu.org; Wed, 15 Jul 2009 20:05:51 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1MRETt-0006GI-9T for emacs-pretest-bug@gnu.org; Wed, 15 Jul 2009 20:05:50 -0400 Original-Received: from mailout2-10.pacific.net.au ([125.255.80.137]:57426 helo=mailout2.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MRETs-0006G4-Hz for emacs-pretest-bug@gnu.org; Wed, 15 Jul 2009 20:05:49 -0400 Original-Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout2.pacific.net.au (Postfix) with ESMTP id 3BEEF18103A for ; Thu, 16 Jul 2009 10:05:46 +1000 (EST) Original-Received: from blah.blah (ppp29B9.dyn.pacific.net.au [61.8.41.185]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id 6F9638C1E for ; Thu, 16 Jul 2009 10:05:45 +1000 (EST) Original-Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1MRETj-0002Mu-Mf for emacs-pretest-bug@gnu.org; Thu, 16 Jul 2009 10:05:39 +1000 User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.3 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Wed, 15 Jul 2009 20:17:37 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:29457 gmane.emacs.pretest.bugs:24805 Archived-At: --=-=-= In recent copyright.el I noticed copyright-update using the match data after a y-or-n-p query. Is that a good idea? When running it in emacs 22 I seemed to sometimes get the match data clobbered by y-or-n-p. I never tracked down the circumstances, but wondered if copyright.el shouldn't rely on what an input func like y-or-n-p could do, per diff below. In GNU Emacs 23.1.50.1 (i586-pc-linux-gnu, GTK+ Version 2.16.4) of 2009-07-12 on blah.blah configured using `configure 'CFLAGS=-O -g' '--prefix=/down/emacs/b/inst' '--with-x-toolkit=gtk'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_AU value of $XMODIFIERS: nil locale-coding-system: iso-latin-1-unix default-enable-multibyte-characters: t 2009-07-16 Kevin Ryde * emacs-lisp/copyright.el (copyright-update): save-match-data across y-or-n-p, for safety. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=copyright.el.save-match-data.diff *** copyright.el 16 Jul 2009 09:44:20 +1000 1.81 --- copyright.el 16 Jul 2009 09:55:57 +1000 *************** *** 223,230 **** (< (string-to-number (match-string 3)) (string-to-number copyright-current-gpl-version)) (or noquery ! (y-or-n-p (format "Replace GPL version by %s? " ! copyright-current-gpl-version))) (progn (if (match-end 2) ;; Esperanto bilingual comment in two-column.el --- 223,231 ---- (< (string-to-number (match-string 3)) (string-to-number copyright-current-gpl-version)) (or noquery ! (save-match-data ! (y-or-n-p (format "Replace GPL version by %s? " ! copyright-current-gpl-version)))) (progn (if (match-end 2) ;; Esperanto bilingual comment in two-column.el --=-=-=--