Mercurial > emacs
comparison lisp/emacs-lisp/copyright.el @ 103919:ab3de87ae5a3
(copyright-update): Save match-data across y-or-n-p, for safety.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Thu, 16 Jul 2009 02:01:31 +0000 |
parents | e22cfe7e0065 |
children | 1d1d5d9bd884 |
comparison
equal
deleted
inserted
replaced
103918:74a905fff633 | 103919:ab3de87ae5a3 |
---|---|
221 ;; Don't update if the file is already using a more recent | 221 ;; Don't update if the file is already using a more recent |
222 ;; version than the "current" one. | 222 ;; version than the "current" one. |
223 (< (string-to-number (match-string 3)) | 223 (< (string-to-number (match-string 3)) |
224 (string-to-number copyright-current-gpl-version)) | 224 (string-to-number copyright-current-gpl-version)) |
225 (or noquery | 225 (or noquery |
226 (y-or-n-p (format "Replace GPL version by %s? " | 226 (save-match-data |
227 copyright-current-gpl-version))) | 227 (y-or-n-p (format "Replace GPL version by %s? " |
228 copyright-current-gpl-version)))) | |
228 (progn | 229 (progn |
229 (if (match-end 2) | 230 (if (match-end 2) |
230 ;; Esperanto bilingual comment in two-column.el | 231 ;; Esperanto bilingual comment in two-column.el |
231 (replace-match copyright-current-gpl-version t t nil 2)) | 232 (replace-match copyright-current-gpl-version t t nil 2)) |
232 (replace-match copyright-current-gpl-version t t nil 3)))) | 233 (replace-match copyright-current-gpl-version t t nil 3)))) |