]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Don't call po-replace-revision-date so often, but still often enough.
authorBruno Haible <bruno@clisp.org>
Mon, 2 Jul 2001 19:54:16 +0000 (19:54 +0000)
committerBruno Haible <bruno@clisp.org>
Mon, 2 Jul 2001 19:54:16 +0000 (19:54 +0000)
misc/ChangeLog
misc/po-mode.el

index 9486588c0a8a275becb938f094b06182736fe6cd..3c0573447fa9fd6c7d74ca2342bf16d27f69ee6b 100644 (file)
@@ -1,3 +1,14 @@
+2001-07-01  Karl Eichwalder  <ke@suse.de>
+
+       * po-mode.el (po-mode): Use add-hook to call po-replace-revision-date
+       saving the buffer.
+       (po-quit): Don't call po-replace-revision-date.
+       (po-validate): Likewise.
+       Proposed by Bernd Schandl.
+
+       (po-auto-replace-revision-date): Change default to 't'; otherwise the
+       user will be asked too often.
+
 2001-06-25  Bruno Haible  <haible@clisp.cons.org>
 
        * po-mode.el (po-find-file-coding-system): Make it work in XEmacs 20
index dec24aeb2766dccc9b785a39219dfb40c90f1ea6..70e1e12be0828c4cdf0eacc32b6da9a597dde978 100644 (file)
@@ -288,7 +288,7 @@ No doubt that highlighting, when Emacs does not allow it, is a kludge."
   :type 'boolean
   :group 'po)
 
-(defcustom po-auto-replace-revision-date 'ask
+(defcustom po-auto-replace-revision-date t
   "*Automatically revise date in headers.  Value is nil, t, or ask."
   :type '(choice (const nil)
                 (const t)
@@ -860,6 +860,7 @@ all reachable through `M-x customize', in group `Emacs.Editing.I18n.Po'."
   (make-local-variable 'po-string-start)
   (make-local-variable 'po-string-end)
   (make-local-variable 'po-marking-overlay)
+  (add-hook 'write-contents-hooks 'po-replace-revision-date)
   (setq po-keywords '(("gettext") ("gettext_noop") ("_") ("N_"))
        po-next-file-list nil
        po-string-start nil
@@ -2541,10 +2542,6 @@ keyword for subsequent commands, also added to possible completions."
 
     (po-msgfmt-version-check)
 
-    ;; If modifications were done already, change the last revision date.
-    (if (buffer-modified-p)
-        (po-replace-revision-date))
-
     (compile command)))
 
 (defvar po-msgfmt-version-checked nil)
@@ -2720,7 +2717,6 @@ appropriate and ask confirmation if untranslated strings remain."
        ;; Or else, kill buffers and quit for true.
        (if quit
            (progn
-             (and (buffer-modified-p) (po-replace-revision-date))
              (save-buffer)
              (kill-buffer (current-buffer)))))))