bell does not work (#526719), style_changed_cb (#922519)

This commit is contained in:
Petr Hracek 2013-03-29 15:21:23 +01:00
commit cc8064d65c
8 changed files with 121 additions and 1631 deletions

View File

@ -0,0 +1,39 @@
diff --git a/configure.in b/configure.in
index 2b0b2f7..68459bc 100644
--- a/configure.in
+++ b/configure.in
@@ -1843,6 +1843,7 @@ if test "${HAVE_X11}" = "yes"; then
AC_MSG_RESULT($emacs_xkb)
if test $emacs_xkb = yes; then
AC_DEFINE(HAVE_XKBGETKEYBOARD, 1, [Define to 1 if you have the XkbGetKeyboard function.])
+ AC_DEFINE(HAVE_XKB, 1, [Define to 1 if you have the Xkb extension.])
fi
AC_CHECK_FUNCS(XrmSetDatabase XScreenResourceString \
diff --git a/src/xterm.c b/src/xterm.c
index 9ce1668..67ad919 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -139,6 +139,10 @@ extern void _XEditResCheckMessages (Widget, XtPointer, XEvent *, Boolean *);
#endif
#endif
+#ifdef HAVE_XKB
+#include <X11/XKBlib.h>
+#endif
+
/* Default to using XIM if available. */
#ifdef USE_XIM
int use_xim = 1;
@@ -3238,7 +3242,11 @@ XTring_bell (struct frame *f)
#endif
{
BLOCK_INPUT;
+#ifdef HAVE_XKB
+ XkbBell (FRAME_X_DISPLAY (f), None, 0, None);
+#else
XBell (FRAME_X_DISPLAY (f), 0);
+#endif
XFlush (FRAME_X_DISPLAY (f));
UNBLOCK_INPUT;
}

View File

@ -0,0 +1,15 @@
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 4dbef65..44f828c 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -1050,7 +1050,9 @@ style_changed_cb (GObject *go,
FOR_EACH_FRAME (rest, frame)
{
FRAME_PTR f = XFRAME (frame);
- if (FRAME_X_DISPLAY (f) == dpy)
+ if (FRAME_LIVE_P (f)
+ && FRAME_X_P (f)
+ && FRAME_X_DISPLAY (f) == dpy)
{
x_set_scroll_bar_default_width (f);
xg_frame_set_char_size (f, FRAME_COLS (f), FRAME_LINES (f));

View File

@ -3,7 +3,7 @@ Summary: GNU Emacs text editor
Name: emacs Name: emacs
Epoch: 1 Epoch: 1
Version: 24.2 Version: 24.2
Release: 6%{?dist} Release: 15%{?dist}
License: GPLv3+ License: GPLv3+
URL: http://www.gnu.org/software/emacs/ URL: http://www.gnu.org/software/emacs/
Group: Applications/Editors Group: Applications/Editors
@ -12,22 +12,20 @@ Source1: emacs.desktop
Source2: emacsclient.desktop Source2: emacsclient.desktop
Source3: dotemacs.el Source3: dotemacs.el
Source4: site-start.el Source4: site-start.el
# rpm-spec-mode from XEmacs Source5: default.el
Source10: https://bitbucket.org/xemacs/prog-modes/raw/eacc4cb30d0c/rpm-spec-mode.el
Source11: rpm-spec-mode-init.el
Source18: default.el
# Emacs Terminal Mode, #551949, #617355 # Emacs Terminal Mode, #551949, #617355
Source19: emacs-terminal.desktop Source6: emacs-terminal.desktop
Source20: emacs-terminal.sh Source7: emacs-terminal.sh
Patch1: rpm-spec-mode.patch
Patch2: rpm-spec-mode-utc.patch
Patch3: rpm-spec-mode-changelog.patch
# rhbz#713600 # rhbz#713600
Patch7: emacs-spellchecker.patch Patch7: emacs-spellchecker.patch
# rhbz#830162, fixed in org-mode upstream # rhbz#830162, fixed in org-mode upstream
Patch8: emacs-locate-library.patch Patch8: emacs-locate-library.patch
# Fix for Emacs bug #111500. # Fix for Emacs bug #111500.
Patch9: emacs-bz11580-eudc-bbdb.patch Patch9: emacs-bz11580-eudc-bbdb.patch
# Fix for emacs bug #922519
Patch10: emacs-style-change-cb.patch
# Fix for emacs bug #922519
Patch11: emacs-bell-dont-work.patch
# Fix for emacs bug #13460. # Fix for emacs bug #13460.
Patch100: emacs-24.2-hunspell.patch Patch100: emacs-24.2-hunspell.patch
@ -37,13 +35,17 @@ BuildRequires: libXpm-devel ncurses-devel xorg-x11-proto-devel zlib-devel gnutls
BuildRequires: librsvg2-devel m17n-lib-devel libotf-devel ImageMagick-devel libselinux-devel BuildRequires: librsvg2-devel m17n-lib-devel libotf-devel ImageMagick-devel libselinux-devel
BuildRequires: GConf2-devel alsa-lib-devel gpm-devel liblockfile-devel libxml2-devel BuildRequires: GConf2-devel alsa-lib-devel gpm-devel liblockfile-devel libxml2-devel
BuildRequires: bzip2 cairo texinfo gzip desktop-file-utils BuildRequires: bzip2 cairo texinfo gzip desktop-file-utils
%if 0%{?el6} %if 0%{?rhel} == 6
BuildRequires: gtk2-devel BuildRequires: gtk2-devel
%else %else
%if 0%{?rhel} == 7
BuildRequires: gtk3-devel python2-devel
# Buildrequire both python2 and python3 on systems containing both, # Buildrequire both python2 and python3 on systems containing both,
# since below we turn off the brp-python-bytecompile script # since below we turn off the brp-python-bytecompile script
%else
BuildRequires: gtk3-devel python2-devel python3-devel BuildRequires: gtk3-devel python2-devel python3-devel
%endif %endif
%endif
%ifarch %{ix86} %ifarch %{ix86}
BuildRequires: util-linux BuildRequires: util-linux
%endif %endif
@ -55,7 +57,7 @@ Requires(posttrans): %{_sbindir}/alternatives
Requires: emacs-common = %{epoch}:%{version}-%{release} Requires: emacs-common = %{epoch}:%{version}-%{release}
Provides: emacs(bin) = %{epoch}:%{version}-%{release} Provides: emacs(bin) = %{epoch}:%{version}-%{release}
%if 0%{!?el6:1} %if 0%{!?rhel:1}
# Turn off the brp-python-bytecompile script since this script doesn't # Turn off the brp-python-bytecompile script since this script doesn't
# properly dtect the correct python runtime for the files emacs2.py and # properly dtect the correct python runtime for the files emacs2.py and
# emacs3.py # emacs3.py
@ -102,7 +104,9 @@ on a terminal.
%package common %package common
Summary: Emacs common files Summary: Emacs common files
License: GPLv3+ and GFDL # The entire source code is GPLv3+ except lib-src/etags.c which is
# also BSD. Manual (info) is GFDL.
License: GPLv3+ and GFDL and BSD
Group: Applications/Editors Group: Applications/Editors
Requires(preun): /sbin/install-info Requires(preun): /sbin/install-info
Requires(preun): %{_sbindir}/alternatives Requires(preun): %{_sbindir}/alternatives
@ -160,13 +164,8 @@ packages that add functionality to Emacs.
%patch8 -p1 -b .locate-library %patch8 -p1 -b .locate-library
%patch9 -p1 -b .emacs-bz11580-eudc-bbdb %patch9 -p1 -b .emacs-bz11580-eudc-bbdb
# Install site-lisp files %patch10 -p1 -b .style-change-cb.patch
cp %SOURCE10 site-lisp %patch11 -p1 -b .bell-dont-work.patch
pushd site-lisp
%patch1 -p0
%patch2 -p0
%patch3 -p0
popd
%patch100 -p1 -b .hunspell %patch100 -p1 -b .hunspell
@ -214,7 +213,7 @@ export CFLAGS="-DMAIL_USE_LOCKF $RPM_OPT_FLAGS"
mkdir build-gtk && cd build-gtk mkdir build-gtk && cd build-gtk
ln -s ../configure . ln -s ../configure .
%if 0%{?el6} %if 0%{?rhel} == 6
%define toolkit gtk %define toolkit gtk
%else %else
%define toolkit gtk3 %define toolkit gtk3
@ -234,9 +233,6 @@ ln -s ../configure .
%{setarch} make %{?_smp_mflags} %{setarch} make %{?_smp_mflags}
cd .. cd ..
# Make sure patched lisp files get byte-compiled
build-gtk/src/emacs %{bytecompargs} site-lisp/*.el
# Remove versioned file so that we end up with .1 suffix and only one DOC file # Remove versioned file so that we end up with .1 suffix and only one DOC file
rm build-{gtk,nox}/src/emacs-%{version}.* rm build-{gtk,nox}/src/emacs-%{version}.*
@ -281,7 +277,7 @@ chmod 755 %{buildroot}%{emacs_libexecdir}/movemail
mkdir -p %{buildroot}%{site_lisp} mkdir -p %{buildroot}%{site_lisp}
install -p -m 0644 %SOURCE4 %{buildroot}%{site_lisp}/site-start.el install -p -m 0644 %SOURCE4 %{buildroot}%{site_lisp}/site-start.el
install -p -m 0644 %SOURCE18 %{buildroot}%{site_lisp} install -p -m 0644 %SOURCE5 %{buildroot}%{site_lisp}
# This solves bz#474958, "update-directory-autoloads" now finally # This solves bz#474958, "update-directory-autoloads" now finally
# works the path is different each version, so we'll generate it here # works the path is different each version, so we'll generate it here
@ -293,11 +289,7 @@ mv %{buildroot}%{_mandir}/man1/{ctags.1.gz,gctags.1.gz}
mv %{buildroot}%{_mandir}/man1/{etags.1.gz,etags.emacs.1.gz} mv %{buildroot}%{_mandir}/man1/{etags.1.gz,etags.emacs.1.gz}
mv %{buildroot}%{_bindir}/{ctags,gctags} mv %{buildroot}%{_bindir}/{ctags,gctags}
# Install site-lisp files
install -p -m 0644 site-lisp/*.el{,c} %{buildroot}%{site_lisp}
mkdir -p %{buildroot}%{site_lisp}/site-start.d mkdir -p %{buildroot}%{site_lisp}/site-start.d
install -p -m 0644 %SOURCE11 %{buildroot}%{site_lisp}/site-start.d
# Default initialization file # Default initialization file
mkdir -p %{buildroot}%{_sysconfdir}/skel mkdir -p %{buildroot}%{_sysconfdir}/skel
@ -315,7 +307,7 @@ mkdir -p %{buildroot}%{_sysconfdir}/rpm
install -p -m 0644 macros.emacs %{buildroot}%{_sysconfdir}/rpm/ install -p -m 0644 macros.emacs %{buildroot}%{_sysconfdir}/rpm/
# Installing emacs-terminal binary # Installing emacs-terminal binary
install -p -m 755 %SOURCE20 %{buildroot}%{_bindir}/emacs-terminal install -p -m 755 %SOURCE7 %{buildroot}%{_bindir}/emacs-terminal
# After everything is installed, remove info dir # After everything is installed, remove info dir
rm -f %{buildroot}%{_infodir}/dir rm -f %{buildroot}%{_infodir}/dir
@ -326,10 +318,12 @@ mkdir -p %{buildroot}%{_datadir}/applications
desktop-file-install --dir=%{buildroot}%{_datadir}/applications \ desktop-file-install --dir=%{buildroot}%{_datadir}/applications \
%SOURCE1 %SOURCE1
desktop-file-install --dir=%{buildroot}%{_datadir}/applications \ desktop-file-install --dir=%{buildroot}%{_datadir}/applications \
%SOURCE19 %SOURCE6
# Byte compile emacs*.py with correct python interpreters # Byte compile emacs*.py with correct python interpreters
%if 0%{!?el6:1} %if 0%{?rhel:1}
rm -f %{buildroot}%{_datadir}/%{name}/%{version}/etc/emacs3.py
%else
%py_byte_compile %{__python} %{buildroot}%{_datadir}/%{name}/%{version}/etc/emacs.py %py_byte_compile %{__python} %{buildroot}%{_datadir}/%{name}/%{version}/etc/emacs.py
%py_byte_compile %{__python} %{buildroot}%{_datadir}/%{name}/%{version}/etc/emacs2.py %py_byte_compile %{__python} %{buildroot}%{_datadir}/%{name}/%{version}/etc/emacs2.py
%py_byte_compile %{__python3} %{buildroot}%{_datadir}/%{name}/%{version}/etc/emacs3.py %py_byte_compile %{__python3} %{buildroot}%{_datadir}/%{name}/%{version}/etc/emacs3.py
@ -419,7 +413,7 @@ update-desktop-database &> /dev/null || :
%files -f common-filelist common %files -f common-filelist common
%config(noreplace) %{_sysconfdir}/skel/.emacs %config(noreplace) %{_sysconfdir}/skel/.emacs
%config(noreplace) %{_sysconfdir}/rpm/macros.emacs %{_sysconfdir}/rpm/macros.emacs
%doc doc/NEWS BUGS README doc/COPYING %doc doc/NEWS BUGS README doc/COPYING
%{_bindir}/ebrowse %{_bindir}/ebrowse
%{_bindir}/emacsclient %{_bindir}/emacsclient
@ -451,16 +445,46 @@ update-desktop-database &> /dev/null || :
%dir %{_datadir}/emacs/site-lisp/site-start.d %dir %{_datadir}/emacs/site-lisp/site-start.d
%changelog %changelog
* Mon Jan 21 2013 Jochen Schmitt <Jochen herr-schmitt de> - 1:24.2-6 * Thu Mar 28 2013 Petr Hracek <phracek@redhat.com> - 1:24.2-15
- Fix for emacs bug 112144, style_changed_cb (#922519)
- Fix for emacs bug 112131, bell does not work (#526719)
* Tue Mar 26 2013 Petr Hracek <phracek@redhat.com> - 1:24.2-14
- fixing distribution flags to rhel instead of el6:1
* Mon Mar 18 2013 Petr Hracek <phracek@redhat.com> - 1:24.2-13
- solved problem with distribution flag in case of rhel
* Mon Mar 18 2013 Petr Hracek <phracek@redhat.com> - 1:24.2-12
- solved problem with distribution flag in case of rhel
* Fri Mar 08 2013 Ralf Corsépius <corsepiu@fedoraproject.org> - 1:24.2-11
- Remove %%config from %%{_sysconfdir}/rpm/macros.*
(https://fedorahosted.org/fpc/ticket/259).
- Fix broken spec-file changelog entry.
* Wed Mar 6 2013 Tomáš Mráz <tmraz@redhat.com> - 1:24.2-10
- Rebuild with new gnutls
* Mon Jan 21 2013 Jochen Schmitt <Jochen herr-schmitt de> - 1:24.2-9
- Fix for emacs bug #13460, ispell-change dictionary hunspell issue (#903151) - Fix for emacs bug #13460, ispell-change dictionary hunspell issue (#903151)
* Tue Nov 06 2012 Sergio Durigan Junior <sergiodj@riseup.net> - 1:24.2-5 * Fri Jan 18 2013 Adam Tkac <atkac redhat com> - 1:24.2-8
- rebuild due to "jpeg8-ABI" feature drop
* Tue Nov 06 2012 Sergio Durigan Junior <sergiodj@riseup.net> - 1:24.2-7
- Fix for Emacs bug #11580, 'Fix querying BBDB for entries without a last - Fix for Emacs bug #11580, 'Fix querying BBDB for entries without a last
name'. name'.
* Mon Oct 22 2012 Karel Klíč <kklic@redhat.com> - 1:24.2-4 * Mon Oct 22 2012 Karel Klíč <kklic@redhat.com> - 1:24.2-6
- Change xorg-x11-fonts-misc dependency to dejavu-sans-mono-fonts, rhbz#732422 - Change xorg-x11-fonts-misc dependency to dejavu-sans-mono-fonts, rhbz#732422
* Thu Sep 20 2012 Karel Klíč <kklic@redhat.com> - 1:24.2-5
- Add BSD to emacs-common licenses because of etags.
* Fri Sep 14 2012 Karel Klíč <kklic@redhat.com> - 1:24.2-4
- Moved RPM spec mode to a separate package (rhbz#857865)
* Fri Sep 14 2012 Karel Klíč <kklic@redhat.com> - 1:24.2-3 * Fri Sep 14 2012 Karel Klíč <kklic@redhat.com> - 1:24.2-3
- Removed patch glibc-open-macro, which seems to be no longer necessary - Removed patch glibc-open-macro, which seems to be no longer necessary
@ -615,7 +639,7 @@ update-desktop-database &> /dev/null || :
- Added filesystem subpackage (rhbz#661866) - Added filesystem subpackage (rhbz#661866)
- Added emacsclient desktop file (rhbz#665362) - Added emacsclient desktop file (rhbz#665362)
* Thu Jan 7 2011 Karel Klic <kklic@redhat.com> - 1:23.2-16 * Fri Jan 7 2011 Karel Klic <kklic@redhat.com> - 1:23.2-16
- Removed dependency on both hunspell and aspell. Emacs does not - Removed dependency on both hunspell and aspell. Emacs does not
_require_ spell checker, e.g. if user wants to uninstall one, there _require_ spell checker, e.g. if user wants to uninstall one, there
is no reason why Emacs should also be uninstalled. Emacs can run one is no reason why Emacs should also be uninstalled. Emacs can run one
@ -625,7 +649,7 @@ update-desktop-database &> /dev/null || :
- Cleaned spec file header - Cleaned spec file header
- Removed gcc-4.5.0 specific CFLAGS - Removed gcc-4.5.0 specific CFLAGS
* Thu Jan 7 2011 Karel Klic <kklic@redhat.com> - 1:23.2-15 * Fri Jan 7 2011 Karel Klic <kklic@redhat.com> - 1:23.2-15
- The emacs-terminal package now requires emacs package - The emacs-terminal package now requires emacs package
* Thu Jan 6 2011 Karel Klic <kklic@redhat.com> - 1:23.2-14 * Thu Jan 6 2011 Karel Klic <kklic@redhat.com> - 1:23.2-14
@ -658,7 +682,7 @@ update-desktop-database &> /dev/null || :
* Thu Jul 8 2010 Karel Klic <kklic@redhat.com> - 1:23.2-6 * Thu Jul 8 2010 Karel Klic <kklic@redhat.com> - 1:23.2-6
- Removed Obsoletes: emacs-nxml-mode, it was obsoleted in F-11 - Removed Obsoletes: emacs-nxml-mode, it was obsoleted in F-11
- Added COPYING to emacs-el, moved COPYING in emacs-common to %doc - Added COPYING to emacs-el, moved COPYING in emacs-common to %%doc
* Thu Jun 3 2010 Karel Klic <kklic@redhat.com> - 1:23.2-5 * Thu Jun 3 2010 Karel Klic <kklic@redhat.com> - 1:23.2-5
- Fixed handling of dual spacing fonts rhbz#599437 - Fixed handling of dual spacing fonts rhbz#599437
@ -925,7 +949,7 @@ update-desktop-database &> /dev/null || :
- fix pkgconfig path (from pkg-config to pkgconfig (Jonathan Underwood) - fix pkgconfig path (from pkg-config to pkgconfig (Jonathan Underwood)
- use macro instead of variable style for buildroot. - use macro instead of variable style for buildroot.
* Mon Aug 28 2007 Chip Coldwell <coldwell@redhat.com> - 22.1-3 * Tue Aug 28 2007 Chip Coldwell <coldwell@redhat.com> - 22.1-3
- change group from Development to Utility - change group from Development to Utility
* Mon Aug 13 2007 Chip Coldwell <coldwell@redhat.com> - 22.1-2 * Mon Aug 13 2007 Chip Coldwell <coldwell@redhat.com> - 22.1-2
@ -933,7 +957,7 @@ update-desktop-database &> /dev/null || :
- glibc-open-macro.patch to deal with glibc turning "open" into a macro. - glibc-open-macro.patch to deal with glibc turning "open" into a macro.
- leave emacs info pages in default section (Resolves: bz199008) - leave emacs info pages in default section (Resolves: bz199008)
* Fri Jun 6 2007 Chip Coldwell <coldwell@redhat.com> - 22.1-1 * Wed Jun 6 2007 Chip Coldwell <coldwell@redhat.com> - 22.1-1
- move alternatives install to posttrans scriptlet (Resolves: bz239745) - move alternatives install to posttrans scriptlet (Resolves: bz239745)
- new release tarball from FSF (Resolves: bz245303) - new release tarball from FSF (Resolves: bz245303)
- new php-mode 1.2.0 - new php-mode 1.2.0
@ -1265,7 +1289,7 @@ update-desktop-database &> /dev/null || :
and remove redundant next-line-add-newlines setting and remove redundant next-line-add-newlines setting
- update info_file list (Reuben Thomas,114729) - update info_file list (Reuben Thomas,114729)
* Wed Mar 16 2004 Mike A. Harris <mharris@redhat.com> 21.3-11 * Tue Mar 16 2004 Mike A. Harris <mharris@redhat.com> 21.3-11
- Removed bogus Requires: XFree86-libs that was added in 21.3-8, as rpm - Removed bogus Requires: XFree86-libs that was added in 21.3-8, as rpm
find-requires will automatically pick up the dependancies on any runtime find-requires will automatically pick up the dependancies on any runtime
libraries, and such hard coded requires is not X11 implementation libraries, and such hard coded requires is not X11 implementation
@ -1586,7 +1610,7 @@ update-desktop-database &> /dev/null || :
* Sat Jan 27 2001 Jakub Jelinek <jakub@redhat.com> * Sat Jan 27 2001 Jakub Jelinek <jakub@redhat.com>
- Preprocess Makefiles as if they were assembly, not C source. - Preprocess Makefiles as if they were assembly, not C source.
* Thu Jan 24 2001 Yukihiro Nakai <ynakai@redhat.com> * Wed Jan 24 2001 Yukihiro Nakai <ynakai@redhat.com>
- Fix the fontset problem when creating a new frame. - Fix the fontset problem when creating a new frame.
* Thu Jan 18 2001 Trond Eivind Glomsrød <teg@redhat.com> * Thu Jan 18 2001 Trond Eivind Glomsrød <teg@redhat.com>

View File

@ -1,48 +0,0 @@
diff -up rpm-spec-mode.el.orig site-lisp/rpm-spec-mode.el
--- rpm-spec-mode.el.orig 2011-11-10 17:22:20.000000000 +0100
+++ rpm-spec-mode.el 2011-11-23 15:59:13.959987280 +0100
@@ -491,6 +491,7 @@ value returned by function `user-mail-ad
(set-keymap-name rpm-spec-mode-map 'rpm-spec-mode-map))
(define-key rpm-spec-mode-map "\C-c\C-c" 'rpm-change-tag)
(define-key rpm-spec-mode-map "\C-c\C-e" 'rpm-add-change-log-entry)
+ (define-key rpm-spec-mode-map "\C-c\C-w" 'rpm-goto-add-change-log-entry)
(define-key rpm-spec-mode-map "\C-c\C-i" 'rpm-insert-tag)
(define-key rpm-spec-mode-map "\C-c\C-n" 'rpm-forward-section)
(define-key rpm-spec-mode-map "\C-c\C-o" 'rpm-goto-section)
@@ -719,10 +720,8 @@ This variable is global by default, but
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: ")
- (save-excursion
+(defun rpm-goto-add-change-log-header ()
+ "Find change log and add header (if needed) for today"
(rpm-goto-section "changelog")
(let* ((address (rpm-spec-user-mail-address))
(fullname (or rpm-spec-user-full-name (user-full-name)))
@@ -733,8 +732,21 @@ If `rpm-change-log-uses-utc' is nil, \"t
(concat " - " (rpm-find-spec-version t))))))
(if (not (search-forward string nil t))
(insert "\n" string "\n")
- (forward-line 2))
- (insert "- " change-log-entry "\n"))))
+ (forward-line 2))))
+
+(defun rpm-add-change-log-entry (&optional change-log-entry)
+ "Find change log and add an entry for today."
+ (interactive "sChange log entry: ")
+ (save-excursion
+ (rpm-goto-add-change-log-header)
+ (insert "- " change-log-entry "\n")))
+
+(defun rpm-goto-add-change-log-entry ()
+ "Goto change log and add an header for today (if needed)."
+ (interactive)
+ (rpm-goto-add-change-log-header)
+ (insert "- \n")
+ (end-of-line '0))
;;------------------------------------------------------------

View File

@ -1,5 +0,0 @@
;; rpm-spec-mode for spec files
(autoload 'rpm-spec-mode "rpm-spec-mode" "RPM spec mode." t)
(add-to-list 'auto-mode-alist '("\\.spec\\(\\.in\\)?$" . rpm-spec-mode))
(setq-default rpm-change-log-uses-utc t)

View File

@ -1,31 +0,0 @@
--- rpm-spec-mode.el~ 2009-06-11 11:01:53.000000000 +0200
+++ rpm-spec-mode.el 2009-06-11 11:05:24.000000000 +0200
@@ -708,6 +708,17 @@
;;------------------------------------------------------------
+(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,8 @@
(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) " "
+ (system-time-locale "C")
+ (string (concat "* " (rpm-change-log-date-string) " "
fullname " <" address ">"
(and rpm-spec-insert-changelog-version
(concat " - " (rpm-find-spec-version t))))))

File diff suppressed because it is too large Load Diff

View File

@ -1,91 +0,0 @@
--- rpm-spec-mode.el~ 2008-04-22 15:14:40.000000000 -0400
+++ rpm-spec-mode.el 2008-04-22 16:19:09.000000000 -0400
@@ -63,7 +63,9 @@
;;; Code:
-(defconst rpm-spec-mode-version "0.12.3x" "Version of `rpm-spec-mode'.")
+(require 'compile)
+
+(defconst rpm-spec-mode-version "0.12.3x.rh1" "Version of `rpm-spec-mode'.")
(defgroup rpm-spec nil
"RPM spec mode with Emacs/XEmacs enhancements."
@@ -189,11 +191,6 @@
:type 'boolean
:group 'rpm-spec)
-(defcustom rpm-spec-use-compilation-mode t
- "*If non-nil, build in `compilation-mode' if it's available."
- :type 'boolean
- :group 'rpm-spec)
-
(defcustom rpm-spec-default-release "1"
"*Default value for the Release tag in new spec files."
:type 'string
@@ -225,6 +222,11 @@
:type 'string
:group 'rpm-spec)
+(defcustom rpm-spec-auto-topdir nil
+ "*Automatically detect an rpm build directory tree and define _topdir."
+ :type 'boolean
+ :group 'rpm-spec)
+
(defgroup rpm-spec-faces nil
"Font lock faces for `rpm-spec-mode'."
:prefix "rpm-spec-"
@@ -1025,20 +1027,30 @@
(setq buildoptions (cons "--nodeps" buildoptions)))
(if (and rpm-spec-sign-gpg (not rpm-no-gpg))
(setq buildoptions (cons "--sign" buildoptions)))
- (save-excursion
- (set-buffer (get-buffer rpm-buffer-name))
- (and rpm-spec-use-compilation-mode
- (fboundp 'compilation-mode)
- (compilation-mode))
- (goto-char (point-max)))
- (let* ((process-environment (cons "EMACS=t" process-environment))
- (process
- (apply 'start-process rpm-spec-build-command rpm-buffer-name
- rpm-spec-build-command buildoptions)))
- (if (and rpm-spec-sign-gpg (not rpm-no-gpg))
- (let ((rpm-passwd-cache (read-passwd "GPG passphrase: ")))
- (process-send-string process (concat rpm-passwd-cache "\n"))))
- (set-process-filter process 'rpm-command-filter)))
+
+ (if rpm-spec-auto-topdir
+ (if (string-match ".*/SPECS/$" default-directory)
+ (let ((topdir (expand-file-name default-directory)))
+ (setq buildoptions
+ (cons
+ (concat "--define \"_topdir "
+ (replace-regexp-in-string "/SPECS/$" "" topdir)
+ "\"")
+ buildoptions)))))
+
+ (progn
+ (defun list->string (lst)
+ (if (cdr lst)
+ (concat (car lst) " " (list->string (cdr lst)))
+ (car lst)))
+ (compilation-start (list->string (cons rpm-spec-build-command buildoptions)) 'rpmbuild-mode))
+
+ (if (and rpm-spec-sign-gpg (not rpm-no-gpg))
+ (let ((build-proc (get-buffer-process
+ (get-buffer
+ (compilation-buffer-name "rpmbuild" nil nil))))
+ (rpm-passwd-cache (read-passwd "GPG passphrase: ")))
+ (process-send-string build-proc (concat rpm-passwd-cache "\n")))))
(defun rpm-build-prepare (&optional arg)
"Run a `rpmbuild -bp'."
@@ -1409,5 +1421,8 @@
;;;###autoload(add-to-list 'auto-mode-alist '("\\.spec\\(\\.in\\)?$" . rpm-spec-mode))
(provide 'rpm-spec-mode)
+;;;###autoload
+(define-compilation-mode rpmbuild-mode "RPM build" ""
+ (set (make-local-variable 'compilation-disable-input) t))
;;; rpm-spec-mode.el ends here