aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/emacs-lisp/copyright.el59
1 files changed, 29 insertions, 30 deletions
diff --git a/lisp/emacs-lisp/copyright.el b/lisp/emacs-lisp/copyright.el
index 3d4d74cf6de..d7d20af1d7a 100644
--- a/lisp/emacs-lisp/copyright.el
+++ b/lisp/emacs-lisp/copyright.el
@@ -82,41 +82,40 @@ than adding to it."
82 (insert current-year) 82 (insert current-year)
83 (message "Copyright updated to %s%s." 83 (message "Copyright updated to %s%s."
84 (if replace "" "include ") current-year) 84 (if replace "" "include ") current-year)
85 (if replace-copying-with 85 (if replace-copying-with
86 (let ((case-fold-search t) 86 (let ((case-fold-search t)
87 beg) 87 beg)
88 (goto-char (point-min)) 88 (goto-char (point-min))
89 ;; Find the beginning of the copyright. 89 ;; Find the beginning of the copyright.
90 (if (search-forward "copyright" nil t) 90 (if (search-forward "copyright" nil t)
91 (progn 91 (progn
92 ;; Look for a blank line or a line 92 ;; Look for a blank line or a line
93 ;; containing only comment chars. 93 ;; containing only comment chars.
94 (if (re-search-forward "^\\(\\s \\s<\\|\\s>\\)*$" 94 (if (re-search-forward "^\\(\\s \\s<\\|\\s>\\)*$" nil t)
95 nil t) 95 (forward-line 1)
96 (forward-line 1) 96 (with-output-to-temp-buffer "*Help*"
97 (with-output-to-temp-buffer "*Help*" 97 (princ (substitute-command-keys "\
98 (princ (substitute-command-keys "\
99I don't know where the copying notice begins. 98I don't know where the copying notice begins.
100Put point there and hit \\[exit-recursive-edit].")) 99Put point there and hit \\[exit-recursive-edit]."))
101 (recursive-edit))) 100 (recursive-edit)))
102 (setq beg (point)) 101 (setq beg (point))
103 (or (search-forward "02139, USA." nil t) 102 (or (search-forward "02139, USA." nil t)
104 (with-output-to-temp-buffer "*Help*" 103 (with-output-to-temp-buffer "*Help*"
105 (princ (substitute-command-keys "\ 104 (princ (substitute-command-keys "\
106I don't know where the copying notice ends. 105I don't know where the copying notice ends.
107Put point there and hit \\[exit-recursive-edit].")) 106Put point there and hit \\[exit-recursive-edit]."))
108 (recursive-edit))) 107 (recursive-edit)))
109 (delete-region beg (point)))) 108 (delete-region beg (point))))
110 (insert-file replace-copying-with)) 109 (insert-file replace-copying-with))
111 (if (re-search-forward 110 (if (re-search-forward
112 "; either version \\(.+\\), or (at your option)" 111 "; either version \\(.+\\), or (at your option)"
113 nil t) 112 nil t)
114 (progn 113 (progn
115 (goto-char (match-beginning 1)) 114 (goto-char (match-beginning 1))
116 (delete-region (point) (match-end 1)) 115 (delete-region (point) (match-end 1))
117 (insert current-gpl-version))))) 116 (insert current-gpl-version))))
118 (or ask-upd 117 (or ask-upd
119 (error "This buffer contains no copyright notice!"))))))) 118 (error "This buffer contains no copyright notice!"))))))))
120 119
121;;;###autoload 120;;;###autoload
122(defun ask-to-update-copyright () 121(defun ask-to-update-copyright ()