From: Bruno Haible Date: Mon, 2 Jul 2001 19:54:16 +0000 (+0000) Subject: Don't call po-replace-revision-date so often, but still often enough. X-Git-Tag: v0.11~633 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=677518995b3fec24744e59e3ba7f0fa654156f8e;p=thirdparty%2Fgettext.git Don't call po-replace-revision-date so often, but still often enough. --- diff --git a/misc/ChangeLog b/misc/ChangeLog index 9486588c0..3c0573447 100644 --- a/misc/ChangeLog +++ b/misc/ChangeLog @@ -1,3 +1,14 @@ +2001-07-01 Karl Eichwalder + + * 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 * po-mode.el (po-find-file-coding-system): Make it work in XEmacs 20 diff --git a/misc/po-mode.el b/misc/po-mode.el index dec24aeb2..70e1e12be 100644 --- a/misc/po-mode.el +++ b/misc/po-mode.el @@ -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)))))))