- fix insufficient safe-mode checks (Resolves: bz367601)

Thu Nov 1 2007 Chip Coldwell <coldwell@redhat.com> 22.1-7
- Update rpm-spec-mode to the current upstream, drop compat patch
    (bz306841)
This commit is contained in:
Charles Coldwell 2007-11-06 16:28:20 +00:00
parent 52b4d18561
commit 6568c06a5e
3 changed files with 23 additions and 49 deletions

View File

@ -3,7 +3,7 @@
Summary: GNU Emacs text editor
Name: emacs
Version: 22.1
Release: 6%{?dist}
Release: 7%{?dist}
License: GPL
URL: http://www.gnu.org/software/emacs/
Group: Applications/Editors
@ -17,7 +17,6 @@ Source7: http://download.sourceforge.net/php-mode/php-mode-1.2.0.tgz
Source8: php-mode-init.el
Source9: ssl.el
Source11: rpm-spec-mode-init.el
Source12: rpm-spec-mode.el-0.14-xemacs-compat.patch
Source13: focus-init.el
Source14: po-mode.el
Source15: po-mode-init.el
@ -27,6 +26,7 @@ Source19: wrapper
Source20: igrep.el
Source21: igrep-init.el
Patch0: glibc-open-macro.patch
Patch1: files-el.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
@ -100,13 +100,12 @@ Emacs packages or see some elisp examples.
%prep
%setup -q
%patch0 -p1 -b .glibc-open-macro
%patch1 -p0 -b .files-el
# install rest of site-lisp files
( cd site-lisp
cp %SOURCE6 %SOURCE9 %SOURCE14 %SOURCE20 .
tar xfz %SOURCE7 # php-mode
# xemacs compat patch for rpm-spec-mode
patch < %SOURCE12
# fix po-auto-replace-revision-date nil
patch < %SOURCE16 )
@ -299,6 +298,12 @@ fi
%dir %{_datadir}/emacs/%{version}
%changelog
* Tue Nov 6 2007 Chip Coldwell <coldwell@redhat.com> 22.1-8
- fix insufficient safe-mode checks (Resolves: bz367601)
* Thu Nov 1 2007 Chip Coldwell <coldwell@redhat.com> 22.1-7
- Update rpm-spec-mode to the current upstream, drop compat patch (bz306841)
* Wed Oct 24 2007 Jeremy Katz <katzj@redhat.com> - 22.1-6
- Update rpm-spec-mode to the current upstream (#306841)

View File

@ -711,7 +711,7 @@ with no args, if that value is non-nil."
(interactive "sChange log entry: ")
(save-excursion
(rpm-goto-section "changelog")
(let* ((address (or rpm-spec-user-mail-address (user-mail-address)))
(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) " "
@ -892,7 +892,7 @@ controls whether case is significant."
(interactive "p")
(beginning-of-line)
(insert "Packager: " (or rpm-spec-user-full-name (user-full-name))
" <" (or rpm-spec-user-mail-address (user-mail-address)) ">\n"))
" <" (rpm-spec-user-mail-address) ">\n"))
(defun rpm-change-packager (&optional arg)
"Update Packager tag."
@ -1383,6 +1383,18 @@ if one is present in the file."
;;------------------------------------------------------------
(defun rpm-spec-user-mail-address ()
"User mail address helper."
(cond
(rpm-spec-user-mail-address
rpm-spec-user-mail-address)
((fboundp 'user-mail-address)
(user-mail-address))
(t
user-mail-address)))
;;------------------------------------------------------------
(defun rpm-about-rpm-spec-mode (&optional arg)
"About `rpm-spec-mode'."
(interactive "p")

View File

@ -1,43 +0,0 @@
diff -u rpm-spec-mode.el~ rpm-spec-mode.el
--- rpm-spec-mode.el~ 2002-12-02 12:00:38.000000000 +0900
+++ rpm-spec-mode.el 2002-12-02 12:00:38.000000000 +0900
@@ -105,6 +105,10 @@
:type 'string
:group 'rpm-spec)
+;; XEmacs compatibility function
+(unless (fboundp 'define-obsolete-variable-alias)
+ (defalias 'define-obsolete-variable-alias 'make-obsolete-variable))
+
(define-obsolete-variable-alias
'rpm-completion-ignore-case 'rpm-spec-completion-ignore-case)
@@ -597,6 +601,14 @@
;;------------------------------------------------------------
+;; XEmacs compatibility function
+(unless (fboundp 'user-mail-address)
+ (defun user-mail-address ()
+ "Return value of `user-mail-address'.
+
+XEmacs sendmail compatibility function."
+ user-mail-address))
+
(defun rpm-add-change-log-entry (&optional change-log-entry)
"Find change log and add an entry for today."
(interactive "sChange log entry: ")
@@ -1117,6 +1129,13 @@
;;------------------------------------------------------------
+;; XEmacs compatibility function
+(unless (fboundp 'ignore-errors)
+ (defmacro ignore-errors (&rest body)
+ "Execute FORMS; if an error occurs, return nil.
+Otherwise, return result of last FORM."
+ `(condition-case nil (progn ,@body) (error nil))))
+
(defun rpm-spec-field-value (field max)
"Get the value of FIELD, searching up to buffer position MAX.
See `search-forward-regexp'."