1 |
commit: b5e22480d8b5a147889aeab84873f7808c2b8463 |
2 |
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Mar 31 05:26:16 2017 +0000 |
4 |
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Mar 31 05:26:16 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/emacs-tools.git/commit/?id=b5e22480 |
7 |
|
8 |
Update the copyright line only once. |
9 |
|
10 |
* ebuild-mode.el (ebuild-mode-before-save): |
11 |
Call ebuild-mode-update-copyright only once per buffer. |
12 |
|
13 |
ChangeLog | 5 +++++ |
14 |
ebuild-mode.el | 4 +++- |
15 |
2 files changed, 8 insertions(+), 1 deletion(-) |
16 |
|
17 |
diff --git a/ChangeLog b/ChangeLog |
18 |
index ecfdf93..5dc7fe2 100644 |
19 |
--- a/ChangeLog |
20 |
+++ b/ChangeLog |
21 |
@@ -1,3 +1,8 @@ |
22 |
+2017-03-31 Ulrich Müller <ulm@g.o> |
23 |
+ |
24 |
+ * ebuild-mode.el (ebuild-mode-before-save): |
25 |
+ Call ebuild-mode-update-copyright only once per buffer. |
26 |
+ |
27 |
2017-03-17 Ulrich Müller <ulm@g.o> |
28 |
|
29 |
* Version 1.35 released. |
30 |
|
31 |
diff --git a/ebuild-mode.el b/ebuild-mode.el |
32 |
index 956b32c..d24355b 100644 |
33 |
--- a/ebuild-mode.el |
34 |
+++ b/ebuild-mode.el |
35 |
@@ -289,7 +289,9 @@ Optional argument LIMIT restarts collection after that number of elements." |
36 |
(delete-trailing-whitespace) |
37 |
(ebuild-mode-tabify)) |
38 |
(when ebuild-mode-update-copyright |
39 |
- (ebuild-mode-update-copyright)) |
40 |
+ (ebuild-mode-update-copyright) |
41 |
+ ;; call it only once per buffer |
42 |
+ (set (make-local-variable 'ebuild-mode-update-copyright) nil)) |
43 |
(when ebuild-mode-delete-cvs-line |
44 |
(ebuild-mode-delete-cvs-line)) |
45 |
;; return nil, otherwise the file is presumed to be written |