diff --git a/emacs.spec b/emacs.spec index f533c08..47e0f27 100644 --- a/emacs.spec +++ b/emacs.spec @@ -4,7 +4,7 @@ Summary: GNU Emacs text editor Name: emacs Epoch: 1 Version: 22.3 -Release: 8%{?dist} +Release: 9%{?dist} License: GPLv3+ URL: http://www.gnu.org/software/emacs/ Group: Applications/Editors @@ -27,6 +27,7 @@ Source21: igrep-init.el Patch0: glibc-open-macro.patch Patch1: rpm-spec-mode.patch Patch2: po-mode-auto-replace-date-71264.patch +Patch3: rpm-spec-mode-utc.patch Buildroot: %{_tmppath}/%{name}-%{version}-root BuildRequires: atk-devel, cairo-devel, freetype-devel, fontconfig-devel, giflib-devel, glibc-devel, gtk2-devel, libpng-devel BuildRequires: libjpeg-devel, libtiff-devel, libX11-devel, libXau-devel, libXdmcp-devel, libXrender-devel, libXt-devel @@ -116,7 +117,10 @@ Emacs packages or see some elisp examples. # rpm-spec-mode can use compilation-mode patch < %PATCH1 # fix po-auto-replace-revision-date nil - patch < %PATCH2 ) + patch < %PATCH2 + # rpm-spec-mode: added rpm-change-log-uses-utc variable + patch < %PATCH3 + ) # we prefer our emacs.desktop file cp %SOURCE1 etc/emacs.desktop @@ -357,6 +361,9 @@ alternatives --install %{_bindir}/etags emacs.etags %{_bindir}/etags.emacs 80 \ %dir %{_datadir}/emacs/%{version} %changelog +* Thu Mar 12 2009 Daniel Novotny 1:22.3-9 +- implement UTC change log option in rpm-spec-mode.el (#489829) + * Wed Mar 4 2009 Michel Salim - 1:22.3-8 - Use desktop-file-utils to handle desktop file - Update icon cache if GTK2 is installed diff --git a/rpm-spec-mode-utc.patch b/rpm-spec-mode-utc.patch new file mode 100644 index 0000000..aad8329 --- /dev/null +++ b/rpm-spec-mode-utc.patch @@ -0,0 +1,30 @@ +--- rpm-spec-mode.el.~1~ ++++ rpm-spec-mode.el +@@ -708,6 +708,17 @@ with no args, if that value is non-nil." + + ;;------------------------------------------------------------ + ++(defvar rpm-change-log-uses-utc nil ++ "*If non-nil, \\[rpm-add-change-log-entry] will use Universal time (UTC). ++If this is nil, it uses local time as returned by `current-time'. ++ ++This variable is global by default, but you can make it buffer-local.") ++ ++(defsubst rpm-change-log-date-string () ++ "Return the date string for today, inserted by \\[rpm-add-change-log-entry]. ++If `rpm-change-log-uses-utc' is nil, \"today\" means the local time zone." ++ (format-time-string "%a %b %e %Y" nil rpm-change-log-uses-utc)) ++ + (defun rpm-add-change-log-entry (&optional change-log-entry) + "Find change log and add an entry for today." + (interactive "sChange log entry: ") +@@ -715,8 +726,7 @@ with no args, if that value is non-nil." + (rpm-goto-section "changelog") + (let* ((address (rpm-spec-user-mail-address)) + (fullname (or rpm-spec-user-full-name (user-full-name))) +- (string (concat "* " (substring (current-time-string) 0 11) +- (substring (current-time-string) -4) " " ++ (string (concat "* " (rpm-change-log-date-string) " " + fullname " <" address ">" + (and rpm-spec-insert-changelog-version + (concat " - " (rpm-find-spec-version t))))))