auto-import changelog data from emacs-21.1-2.7.src.rpm

Thu Dec 06 2001 Trond Eivind Glomsrd <teg@redhat.com> 21.1-2.7
- Increase recursive-load-depth-limit from 10 to 50
Wed Dec 05 2001 Trond Eivind Glomsrd <teg@redhat.com> 21.1-2
- Make it conflict with old versions of gettext
Thu Nov 29 2001 Trond Eivind Glomsrd <teg@redhat.com> 21.1-1
- rpm-spec-mode 0.11h, should fix #56748
Tue Nov 06 2001 Trond Eivind Glomsrd <teg@redhat.com> 21.1-0.4
- php mode 1.0.1. Should fix some speedbar problems.
Tue Oct 23 2001 Trond Eivind Glomsrd <teg@redhat.com> 21.1-0.3
- Minor cleanups
- add ssl.el
Mon Oct 22 2001 Trond Eivind Glomsrd <teg@redhat.com> 21.1-0.2
- Add more files from the libexec directory (#54874, #54875)
Sun Oct 21 2001 Trond Eivind Glomsrd <teg@redhat.com> 21.1-0.1
- 21.1
- Build on IA64 again - the default config now handles it
- Drop all old patches
- Misc cleanups
- Update the elisp manual to 21-2.7
- Deprecate the emacs-nox and emacs-X11 subpackages. Simplify build
    procedure to match.
- Update php-mode to 1.0.0
Mon Oct 15 2001 Trond Eivind Glomsrd <teg@redhat.com> 20.7-43
- Add php-mode 0.9.9
- Add URL (#54603)
- don't run autoconf/libtoolize during build - they're broken
- don't build on IA64 until they are fixed
Sun Sep 16 2001 Trond Eivind Glomsrd <teg@redhat.com> 20.7-42
- Update python-mode to the version in the python 2.2a3
- Include po-mode in emacs, instead of including in gettext
This commit is contained in:
cvsdist 2004-09-09 04:33:25 +00:00
parent 3b2e936b60
commit c0806599d0
9 changed files with 3239 additions and 283 deletions

View File

@ -1,5 +1,4 @@
elisp-manual-21-2.6.tar.bz2 elisp-manual-21-2.7.tar.bz2
emacs-20.7.tar.bz2 emacs-21.1.tar.bz2
emacs-asian.tar.bz2 emacs-asian.tar.bz2
gnus-5.8.8-compiled.tar.bz2 leim-21.1.tar.bz2
leim-20.7.tar.bz2

View File

@ -1,8 +1,9 @@
Summary: The libraries needed to run the GNU Emacs text editor. Summary: The libraries needed to run the GNU Emacs text editor.
Name: emacs Name: emacs
Version: 20.7 Version: 21.1
Release: 41 Release: 2.7
License: GPL License: GPL
URL: http://www.gnu.org/software/emacs/
Group: Applications/Editors Group: Applications/Editors
Source0: ftp://ftp.gnu.org/gnu/emacs/emacs-%{version}.tar.bz2 Source0: ftp://ftp.gnu.org/gnu/emacs/emacs-%{version}.tar.bz2
Source1: ftp://ftp.gnu.org/gnu/emacs/leim-%{version}.tar.bz2 Source1: ftp://ftp.gnu.org/gnu/emacs/leim-%{version}.tar.bz2
@ -10,37 +11,25 @@ Source3: emacs.desktop
Source4: emacs.png Source4: emacs.png
Source5: dotemacs Source5: dotemacs
Source6: site-start.el Source6: site-start.el
Source7: http://www.python.org/emacs/python-mode/python-mode.el # From Python-2.2a3
# From /usr/X11R6/lib/X11/locale/locale.alias Source7: python-mode.el
Source8: emacs.locale.alias Source8: http://www.tihlde.org/~stigb/rpm-spec-mode.el
Source11: http://www.tihlde.org/~stigb/rpm-spec-mode.el Source9: emacs-asian.tar.bz2
Source12: mwheel.el Source10: ftp://ftp.gnu.org/gnu/emacs/elisp-manual-21-2.7.tar.bz2
Source13: lisp-startup-localealias.patch # 1.0.0 - http://prdownloads.sourceforge.net/php-mode/php-mode-100.el
Source14: ftp://ftp.gnus.org/pub/gnus/gnus-5.8.8-compiled.tar.bz2 Source11: php-mode.el
Source15: emacs-asian.tar.bz2 Source12: php-mode-init.el
Source16: ftp://ftp.gnu.org/gnus/emacs/elisp-manual-21-2.6.tar.bz2 Source13: ssl.el
Patch0: emacs-20.7-xaw3d.patch Source14: po-mode.el
Patch2: emacs-20.3-tmprace.patch Source15: po-mode-init.el
Patch3: emacs-20.3-linkscr.patch Patch0: emacs-21.1-recloadlimit.patch
Patch4: emacs-20.4-nmhlocation.patch
Patch5: emacs-20.5-loadup.patch
Patch6: emacs-20.6-kbdbuffer.patch
Patch7: emacs-20.6-ia64.patch
Patch8: emacs-20.6-ia64-2.patch
Patch9: emacs-20.6-ia64-3.patch
Patch10: emacs-20.7-manboption.patch
Patch11: emacs-20.7-proto.patch
Patch12: emacs-cpp-Makefile.patch
Patch13: emacs-20.7-makeregexp.patch
Patch50: emacs-20.7-s390.patch Patch50: emacs-20.7-s390.patch
Buildroot: %{_tmppath}/%{name}-%{version}-root Buildroot: %{_tmppath}/%{name}-%{version}-root
Prereq: /sbin/install-info Prereq: /sbin/install-info
BuildRequires: Xaw3d-devel glibc-devel gcc XFree86-devel bzip2 ncurses-devel BuildRequires: Xaw3d-devel glibc-devel gcc XFree86-devel bzip2 ncurses-devel
BuildRequires: zlib-devel libpng-devel libjpeg-devel libungif-devel libtiff-devel BuildRequires: zlib-devel libpng-devel libjpeg-devel libungif-devel libtiff-devel
# temporary hack. roll tamago into base emacs package Obsoletes: emacs-nox emacs-X11
#Requires: tamago Conflicts: gettext < 0.10.40
%description %description
Emacs is a powerful, customizable, self-documenting, modeless text Emacs is a powerful, customizable, self-documenting, modeless text
@ -50,7 +39,7 @@ without leaving the editor.
This package includes the libraries you need to run the Emacs editor, This package includes the libraries you need to run the Emacs editor,
You also need to install the actual Emacs program package (emacs-nox or You also need to install the actual Emacs program package (emacs-nox or
emacs-X11). Install emacs-nox if you are not going to use the X emacs-X11). Install emacs-nox if you are not going to use the X
Window System; install emacs-X11 if you will be using X. Window System; install emacs-X11 if you will be using X.
%package el %package el
@ -78,54 +67,12 @@ user must press in order to input a particular character in a
non-English character set. Input methods for many different character non-English character set. Input methods for many different character
sets are included in this package. sets are included in this package.
%package nox
Summary: The Emacs text editor without support for the X Window System.
Group: Applications/Editors
Requires: emacs
Prereq: fileutils
%description nox
Emacs-nox is the Emacs text editor program without support for the X
Window System.
You need to install this package only if you plan on exclusively using
Emacs without the X Window System (emacs-X11 will work both in X and
out of X, but emacs-nox will only work outside of X). You'll also
need to install the emacs package in order to run Emacs.
%package X11
Summary: The Emacs text editor for the X Window System.
Group: Applications/Editors
Requires: emacs
%description X11
Emacs-X11 includes the Emacs text editor program for use with the X
Window System (it provides support for the mouse and other GUI
elements). Emacs-X11 will also run Emacs outside of X, but it has a
larger memory footprint than the 'non-X' Emacs package (emacs-nox).
Install emacs-X11 if you're going to use Emacs with the X Window
System. You should also install emacs-X11 if you're going to run
Emacs both with and without X (it will work fine both ways). You'll
also need to install the emacs package in order to run Emacs.
%prep %prep
%setup -q -b 1 %setup -q -b 1
%patch0 -p1 %patch0 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%ifarch s390 s390x %ifarch s390 s390x
%patch50 -p1 -b .s390 %patch50 -p1 -b .s390
@ -133,50 +80,22 @@ also need to install the emacs package in order to run Emacs.
%build %build
PUREDEF="-DNCURSES_OSPEED_T" export CFLAGS="-DMAIL_USE_LOCKF $RPM_OPT_FLAGS"
XPUREDEF="-DNCURSES_OSPEED_T" #to find installinfo
libtoolize --force --copy export PATH="$PATH:/sbin:/usr/sbin"
autoconf
CONFOPTS="--mandir=%{_mandir} --infodir=%{_infodir} --prefix=/usr --libexecdir=/usr/lib --sharedstatedir=/var --with-gcc --with-pop"
BuildEmacs() { %configure --with-gcc --with-pop --with-sound
dir=$1 make
configflags=$2
[ -d build-$1 ] && rm -rf build-$1
mkdir build-$1 && cd build-$1
CFLAGS="-DMAIL_USE_LOCKF $RPM_OPT_FLAGS $PUREDEF" LDFLAGS=-s \
../configure ${CONFOPTS} $2 ${RPM_ARCH}-redhat-linux-gnu
# blarg
echo "#include <string.h>" >> src/config.h
make
cd ..
}
#Build binary with X support %define recompile src/emacs -batch --no-init-file --no-site-file -f batch-byte-compile
BuildEmacs withx "--with-x-toolkit"
%define recompile build-withx/src/emacs -batch --no-init-file --no-site-file -f batch-byte-compile
#change the locale.alias for the nox builds
#patch lisp/startup.el %SOURCE10
#rm -fv lisp/startup.elc
#%{recompile} lisp/startup.el
#Build binary without X support
BuildEmacs nox "--with-x=no"
#change the locale.alias back for packaging
#patch -R lisp/startup.el %SOURCE10
#rm -fv lisp/startup.elc
#%{recompile} lisp/startup.el
# recompile patched .el files # recompile patched .el files
%{recompile} lisp/mail/mh-utils.el lisp/progmodes/make-mode.el %{recompile} lisp/mail/mh-utils.el lisp/progmodes/make-mode.el
# bytecompile python-mode, mwheel and rpm-spec-mode # bytecompile python-mode, ssl, php-mode and rpm-spec-mode
cp %SOURCE7 %SOURCE11 %SOURCE12 . cp %SOURCE7 %SOURCE8 %SOURCE11 %SOURCE13 %SOURCE14 .
%{recompile} python-mode.el mwheel.el rpm-spec-mode.el %{recompile} python-mode.el rpm-spec-mode.el php-mode.el ssl.el po-mode.el
@ -186,51 +105,20 @@ mkdir -p $RPM_BUILD_ROOT/usr
mkdir -p $RPM_BUILD_ROOT/usr/share/emacs/site-lisp/site-start.d mkdir -p $RPM_BUILD_ROOT/usr/share/emacs/site-lisp/site-start.d
mkdir -p $RPM_BUILD_ROOT/%{_infodir} mkdir -p $RPM_BUILD_ROOT/%{_infodir}
make install -C build-withx \
prefix=$RPM_BUILD_ROOT/usr \
libexecdir=$RPM_BUILD_ROOT/usr/lib \
sharedstatedir=$RPM_BUILD_ROOT/var \
mandir=$RPM_BUILD_ROOT/%{_mandir} \
infodir=$RPM_BUILD_ROOT/%{_infodir}
# install the locale file %makeinstall
install -m 644 %SOURCE8 $RPM_BUILD_ROOT/usr/share/emacs/locale.alias
#install lisp files for Japanese and other Asian languages #install lisp files for Japanese and other Asian languages
pushd $RPM_BUILD_ROOT pushd $RPM_BUILD_ROOT
tar --use-compress-program=bzip2 -xf %{SOURCE15} tar --use-compress-program=bzip2 -xf %{SOURCE9}
popd
# We want a newer gnus
tar --use-compress-program=bzip2 -xf %{SOURCE14}
pushd gnus-5.8.8
#PATH=$RPM_BUILD_ROOT/usr/bin:$PATH ./configure
#make
rm -f $RPM_BUILD_ROOT//usr/share/emacs/%{version}/lisp/gnus/*
install -m 644 lisp/* $RPM_BUILD_ROOT//usr/share/emacs/%{version}/lisp/gnus/
rm -f $RPM_BUILD_ROOT/%{_infodir}/gnus*
install -m 644 texi/{gnus,gnus-?,gnus-??} $RPM_BUILD_ROOT/%{_infodir}
popd popd
rm -f $RPM_BUILD_ROOT/%{_infodir}/dir rm -f $RPM_BUILD_ROOT/%{_infodir}/dir
gzip -9nf $RPM_BUILD_ROOT/%{_infodir}/* gzip -9nf $RPM_BUILD_ROOT/%{_infodir}/*
#change the locale.alias for this one and regenerate
# Do it this way, using the macro here seems to confuse RPM
patch lisp/startup.el %SOURCE13
rm -fv lisp/startup.elc
%{recompile} lisp/startup.el
rm -f build-nox/src/emacs-%{version}*
make -C build-nox
install -c -m755 build-nox/src/emacs $RPM_BUILD_ROOT/usr/bin/emacs-nox
install -c -m755 build-nox/src/emacs $RPM_BUILD_ROOT/usr/bin/emacs-nox
install -m 644 %SOURCE6 $RPM_BUILD_ROOT/usr/share/emacs/site-lisp/site-start.el install -m 644 %SOURCE6 $RPM_BUILD_ROOT/usr/share/emacs/site-lisp/site-start.el
mkdir -p $RPM_BUILD_ROOT/usr/lib/emacs/site-lisp mkdir -p $RPM_BUILD_ROOT/usr/share/emacs/site-lisp
mv $RPM_BUILD_ROOT%{_mandir}/man1/ctags.1 $RPM_BUILD_ROOT%{_mandir}/man1/gctags.1 mv $RPM_BUILD_ROOT%{_mandir}/man1/ctags.1 $RPM_BUILD_ROOT%{_mandir}/man1/gctags.1
mv $RPM_BUILD_ROOT/usr/bin/ctags $RPM_BUILD_ROOT/usr/bin/gctags mv $RPM_BUILD_ROOT/usr/bin/ctags $RPM_BUILD_ROOT/usr/bin/gctags
@ -242,11 +130,14 @@ install -c -m 0644 %SOURCE3 $RPM_BUILD_ROOT/etc/X11/applnk/Applications/
mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
install -c -m 0644 %SOURCE4 $RPM_BUILD_ROOT/usr/share/pixmaps/ install -c -m 0644 %SOURCE4 $RPM_BUILD_ROOT/usr/share/pixmaps/
install -c -m644 build-nox/etc/DOC-* $RPM_BUILD_ROOT/usr/share/emacs/%{version}/etc mkdir -p $RPM_BUILD_ROOT/usr/share/emacs/%{version}/etc
install -c -m644 etc/DOC-* $RPM_BUILD_ROOT/usr/share/emacs/%{version}/etc
# Python mode, mwheel and rpm-spec mode # Python mode, php mode and rpm-spec mode
install -c -m0644 python-mode.el python-mode.elc mwheel.el mwheel.elc rpm-spec-mode.el rpm-spec-mode.elc $RPM_BUILD_ROOT/usr/share/emacs/site-lisp/ install -c -m0644 po-mode.el po-mode.elc php-mode.el php-mode.elc python-mode.el python-mode.elc rpm-spec-mode.el rpm-spec-mode.elc ssl.el ssl.elc $RPM_BUILD_ROOT/usr/share/emacs/site-lisp/
install -m0644 %SOURCE12 $RPM_BUILD_ROOT/usr/share/emacs/site-lisp/site-start.d/php-mode-init.el
install -m0644 %SOURCE15 $RPM_BUILD_ROOT/usr/share/emacs/site-lisp/site-start.d/po-mode-init.el
# default initialization file # default initialization file
mkdir -p $RPM_BUILD_ROOT/etc/skel mkdir -p $RPM_BUILD_ROOT/etc/skel
@ -263,17 +154,15 @@ rm -f $RPM_BUILD_ROOT/%{_mandir}/man1/*ctags*
rm -f $RPM_BUILD_ROOT/usr/share/emacs/%{version}/etc/ctags* rm -f $RPM_BUILD_ROOT/usr/share/emacs/%{version}/etc/ctags*
# The elisp reference manual # The elisp reference manual
bzcat %{SOURCE16} | tar xf - bzcat %{SOURCE10} | tar xf -
pushd elisp-manual-21-2.6 pushd elisp-manual-21-2.7
install -m 644 elisp elisp-? elisp-?? $RPM_BUILD_ROOT/%{_infodir} install -m 644 elisp elisp-? elisp-?? $RPM_BUILD_ROOT/%{_infodir}
popd popd
find $RPM_BUILD_ROOT/usr/share/emacs/%{version}/lisp \ find $RPM_BUILD_ROOT/usr/share/emacs/%{version}/lisp -type f\
-name '*.elc' -print | sed "s^$RPM_BUILD_ROOT^^" > core-filelist -not -name '*.el' -print | sed "s^$RPM_BUILD_ROOT^^" > core-filelist
find $RPM_BUILD_ROOT/usr/share/emacs/%{version}/lisp \ find $RPM_BUILD_ROOT/usr/share/emacs/%{version}/lisp \
-type d -printf "%%%%dir %%p\n" | sed "s^$RPM_BUILD_ROOT^^" >> core-filelist -type d -printf "%%%%dir %%p\n" | sed "s^$RPM_BUILD_ROOT^^" >> core-filelist
find $RPM_BUILD_ROOT/usr/lib/emacs/%{version} -type f | \
sed "s^$RPM_BUILD_ROOT^^" | grep -v movemail >> core-filelist
# Include .el files which lack a corresponding byte compiled form # Include .el files which lack a corresponding byte compiled form
for I in `find $RPM_BUILD_ROOT/usr/share/emacs/%{version}/lisp \ for I in `find $RPM_BUILD_ROOT/usr/share/emacs/%{version}/lisp \
@ -284,8 +173,8 @@ for I in `find $RPM_BUILD_ROOT/usr/share/emacs/%{version}/lisp \
done >> core-filelist done >> core-filelist
# Include all non elisp files which emacs installs # Include all non elisp files which emacs installs
find $RPM_BUILD_ROOT/usr/share/emacs/%{version}/lisp -type f | \ #find $RPM_BUILD_ROOT/usr/share/emacs/%{version}/lisp -type f | \
sed "s^$RPM_BUILD_ROOT^^" | grep -v "\.el\(c\)\?$" >> core-filelist # sed "s^$RPM_BUILD_ROOT^^" | grep -v "\.el\(c\)\?$" >> core-filelist
find $RPM_BUILD_ROOT/usr/share/emacs/%{version}/leim \ find $RPM_BUILD_ROOT/usr/share/emacs/%{version}/leim \
@ -310,8 +199,6 @@ find $RPM_BUILD_ROOT/usr/share/emacs/%{version}/leim \
%clean %clean
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
rm -rf build-nox
rm -rf build-withx
%define info_files ccmode cl dired-x ediff emacs forms gnus info message mh-e reftex sc vip viper widget elisp %define info_files ccmode cl dired-x ediff emacs forms gnus info message mh-e reftex sc vip viper widget elisp
%post %post
@ -327,65 +214,47 @@ for f in %{info_files}; do
done done
fi fi
%triggerin nox -- emacs-X11
if [ -L /usr/bin/emacs ]; then
rm /usr/bin/emacs
fi
%triggerpostun nox -- emacs-X11
[ $2 = 0 ] || exit 0
if [ ! -L /usr/bin/emacs ]; then
ln -sf emacs-nox /usr/bin/emacs
fi
%post nox
if [ ! -x /usr/bin/emacs -a ! -L /usr/bin/emacs ]; then
ln -sf emacs-nox /usr/bin/emacs
fi
%postun nox
[ $1 = 0 ] || exit 0
if [ -L /usr/bin/emacs ]; then
rm /usr/bin/emacs
fi
%files -f core-filelist %files -f core-filelist
%defattr(-,root,root) %defattr(-,root,root)
%config(noreplace) /etc/skel/.emacs %config(noreplace) /etc/skel/.emacs
%doc etc/NEWS BUGS README etc/FAQ %doc etc/NEWS BUGS README
/usr/bin/b2m /usr/bin/b2m
/usr/bin/emacsclient /usr/bin/emacsclient
/usr/bin/etags /usr/bin/etags
/usr/bin/rcs-checkin /usr/bin/rcs-checkin
%{_mandir}/*/* %{_mandir}/*/*
%{_infodir}/* %{_infodir}/*
/usr/share/emacs/locale.alias
/usr/share/emacs/site-lisp/python-mode.elc /usr/share/emacs/site-lisp/python-mode.elc
/usr/share/emacs/site-lisp/mwheel.elc /usr/share/emacs/site-lisp/php-mode.elc
/usr/share/emacs/site-lisp/po-mode.elc
/usr/share/emacs/site-lisp/rpm-spec-mode.elc /usr/share/emacs/site-lisp/rpm-spec-mode.elc
/usr/share/emacs/site-lisp/ssl.elc
/usr/share/emacs/site-lisp/subdirs.el /usr/share/emacs/site-lisp/subdirs.el
/usr/share/emacs/site-lisp/site-start.d/lang.emacs.el /usr/share/emacs/site-lisp/site-start.d/lang.emacs.el
/usr/share/emacs/site-lisp/site-start.d/php-mode-init.el
/usr/share/emacs/site-lisp/site-start.d/po-mode-init.el
/usr/share/emacs/site-lisp/lang /usr/share/emacs/site-lisp/lang
%dir /usr/share/emacs
%dir /usr/lib/emacs
%dir /usr/lib/emacs/site-lisp
%dir /usr/lib/emacs/%{version}
%dir /usr/lib/emacs/%{version}/*
%attr(0755,root,root) /usr/lib/emacs/%{version}/*/movemail
%dir /usr/share/emacs/site-lisp %dir /usr/share/emacs/site-lisp
%dir /usr/share/emacs/%{version}
%dir /usr/share/emacs/%{version}/*
/usr/share/emacs/%{version}/etc/*
/usr/libexec/emacs/%{version}/*/*
%attr(0755,root,root) /usr/libexec/emacs/%{version}/*/movemail
%attr(0644,root,root) %config /usr/share/emacs/site-lisp/site-start.el %attr(0644,root,root) %config /usr/share/emacs/site-lisp/site-start.el
%dir /usr/share/emacs/site-lisp/site-start.d %dir /usr/share/emacs/site-lisp/site-start.d
%dir /usr/share/emacs/%{version} %attr(755,root,root) /usr/bin/emacs
%dir /usr/share/emacs/%{version}/site-lisp %attr(755,root,root) /usr/bin/emacs-%{version}
%dir /usr/share/emacs/%{version}/leim %config(noreplace) /etc/X11/applnk/Applications/emacs.desktop
/usr/share/emacs/%{version}/etc /usr/share/pixmaps/emacs.png
%files -f el-filelist el %files -f el-filelist el
%defattr(-,root,root) %defattr(-,root,root)
/usr/share/emacs/site-lisp/python-mode.el /usr/share/emacs/site-lisp/python-mode.el
/usr/share/emacs/site-lisp/mwheel.el /usr/share/emacs/site-lisp/php-mode.el
/usr/share/emacs/site-lisp/po-mode.el
/usr/share/emacs/site-lisp/ssl.el
/usr/share/emacs/site-lisp/rpm-spec-mode.el /usr/share/emacs/site-lisp/rpm-spec-mode.el
%files -f leim-filelist leim %files -f leim-filelist leim
@ -393,18 +262,46 @@ fi
/usr/share/emacs/%{version}/leim/leim-list.el /usr/share/emacs/%{version}/leim/leim-list.el
%dir /usr/share/emacs/%{version}/leim %dir /usr/share/emacs/%{version}/leim
%files nox
%defattr(-,root,root)
/usr/bin/emacs-nox
%files X11
%defattr(-,root,root)
%attr(755,root,root) /usr/bin/emacs
%attr(755,root,root) /usr/bin/emacs-%{version}
%config(noreplace) /etc/X11/applnk/Applications/emacs.desktop
/usr/share/pixmaps/emacs.png
%changelog %changelog
* Thu Dec 6 2001 Trond Eivind Glomsrød <teg@redhat.com> 21.1-2.7
- Increase recursive-load-depth-limit from 10 to 50
* Wed Dec 5 2001 Trond Eivind Glomsrød <teg@redhat.com> 21.1-2
- Make it conflict with old versions of gettext
* Thu Nov 29 2001 Trond Eivind Glomsrød <teg@redhat.com> 21.1-1
- rpm-spec-mode 0.11h, should fix #56748
* Tue Nov 6 2001 Trond Eivind Glomsrød <teg@redhat.com> 21.1-0.4
- php mode 1.0.1. Should fix some speedbar problems.
* Tue Oct 23 2001 Trond Eivind Glomsrød <teg@redhat.com> 21.1-0.3
- Minor cleanups
- add ssl.el
* Mon Oct 22 2001 Trond Eivind Glomsrød <teg@redhat.com> 21.1-0.2
- Add more files from the libexec directory (#54874, #54875)
* Sun Oct 21 2001 Trond Eivind Glomsrød <teg@redhat.com> 21.1-0.1
- 21.1
- Build on IA64 again - the default config now handles it
- Drop all old patches
- Misc cleanups
- Update the elisp manual to 21-2.7
- Deprecate the emacs-nox and emacs-X11 subpackages.
Simplify build procedure to match.
- Update php-mode to 1.0.0
* Mon Oct 15 2001 Trond Eivind Glomsrød <teg@redhat.com> 20.7-43
- Add php-mode 0.9.9
- Add URL (#54603)
- don't run autoconf/libtoolize during build - they're broken
- don't build on IA64 until they are fixed
* Sun Sep 16 2001 Trond Eivind Glomsrød <teg@redhat.com> 20.7-42
- Update python-mode to the version in the python 2.2a3
- Include po-mode in emacs, instead of including in gettext
* Mon Jul 30 2001 Trond Eivind Glomsrød <teg@redhat.com> * Mon Jul 30 2001 Trond Eivind Glomsrød <teg@redhat.com>
- Minor fix to make-mode fontify regexp (#50010) - Minor fix to make-mode fontify regexp (#50010)
- Build without emacs being installed (#49085) - Build without emacs being installed (#49085)

6
php-mode-init.el Normal file
View File

@ -0,0 +1,6 @@
;; Use php-mode for .php,.php3,.php4 and .phtml files
(autoload 'php-mode "php-mode")
(setq auto-mode-alist (cons '("\\.php[34]\\|.php\\|.phtml" . php-mode)
auto-mode-alist))

12
po-mode-init.el Normal file
View File

@ -0,0 +1,12 @@
;; Use po-mode for translation files
(autoload 'po-mode "po-mode")
(setq auto-mode-alist (cons '("\\.po[tx]?\\'\\|\\.po\\." . po-mode)
auto-mode-alist))
;;; To automatically use proper fonts under Emacs 20, also add:
(autoload 'po-find-file-coding-system "po-mode")
(modify-coding-system-alist 'file "\\.po[tx]?\\'\\|\\.po\\."
'po-find-file-coding-system)

2693
po-mode.el Normal file

File diff suppressed because it is too large Load Diff

View File

@ -2,13 +2,13 @@
;; Copyright (C) 1992,1993,1994 Tim Peters ;; Copyright (C) 1992,1993,1994 Tim Peters
;; Author: 1995-1998 Barry A. Warsaw ;; Author: 1995-2001 Barry A. Warsaw
;; 1992-1994 Tim Peters ;; 1992-1994 Tim Peters
;; Maintainer: python-mode@python.org ;; Maintainer: python-mode@python.org
;; Created: Feb 1992 ;; Created: Feb 1992
;; Keywords: python languages oop ;; Keywords: python languages oop
(defconst py-version "3.105" (defconst py-version "$Revision: 4.6 $"
"`python-mode' version number.") "`python-mode' version number.")
;; This software is provided as-is, without express or implied ;; This software is provided as-is, without express or implied
@ -25,30 +25,34 @@
;; and is the current maintainer. Tim's now back but disavows all ;; and is the current maintainer. Tim's now back but disavows all
;; responsibility for the mode. Smart Tim :-) ;; responsibility for the mode. Smart Tim :-)
;; This version of python-mode.el is no longer compatible with Emacs ;; pdbtrack support contributed by Ken Manheimer, April 2001.
;; 18. I am striving to maintain compatibility with the X/Emacs 19
;; lineage but as time goes on that becomes more and more difficult. ;; This version of python-mode.el has only been tested with XEmacs
;; I current recommend that you upgrade to the latest stable released ;; 21.1.14 and Emacs 20.7 as these are the latest versions of these
;; version of your favorite branch: Emacs 20.3 or better, or XEmacs ;; Emacsen as of this writing (11-Apr-2001). I have no intent to test
;; 20.4 or better (XEmacs 21.0 is in beta testing as of this writing ;; it with earlier Emacsen, but I will accept patches if they are
;; 27-Oct-1998 appears to work fine with this version of ;; small and reasonable. Please use the SourceForge Python project to
;; python-mode.el). Even Windows users should be using at least ;; submit bugs or patches:
;; NTEmacs 20.3, and XEmacs 21.0 will work very nicely on Windows when ;;
;; it is released. ;; http://sourceforge.net/projects/python
;; FOR MORE INFORMATION: ;; FOR MORE INFORMATION:
;; For more information on installing python-mode.el, especially with ;; There is some information on python-mode.el at
;; respect to compatibility information, please see
;;
;; http://www.python.org/emacs/python-mode/ ;; http://www.python.org/emacs/python-mode/
;; ;;
;; This site also contains links to other packages that you might find ;; but this link is fairly out of date, due to the current difficulty
;; useful, such as pdb interfaces, OO-Browser links, etc. ;; in updating that site. It does contain links to other packages that
;; you might find useful, such as pdb interfaces, OO-Browser links,
;; etc. Eventually, we'll be able to update it much more easily.
;; BUG REPORTING: ;; BUG REPORTING:
;; To submit bug reports, use C-c C-b. Please include a complete, but ;; As mentioned above, please use the SourceForge Python project for
;; submitting bug reports or patches. The old recommendation, to use
;; C-c C-b will still work, but those reports have a higher chance of
;; getting buried in my mailbox. Please include a complete, but
;; concise code sample and a recipe for reproducing the bug. Send ;; concise code sample and a recipe for reproducing the bug. Send
;; suggestions and other comments to python-mode@python.org. ;; suggestions and other comments to python-mode@python.org.
@ -56,40 +60,11 @@
;; doubtful that a texinfo manual would be very useful, but if you ;; doubtful that a texinfo manual would be very useful, but if you
;; want to contribute one, I'll certainly accept it! ;; want to contribute one, I'll certainly accept it!
;; TO DO LIST:
;; - Better integration with pdb.py and gud-mode for debugging.
;; - Rewrite according to GNU Emacs Lisp standards.
;; - have py-execute-region on indented code act as if the region is
;; left justified. Avoids syntax errors.
;; - add a py-goto-block-down, bound to C-c C-d
;;; Code: ;;; Code:
(require 'comint) (require 'comint)
(require 'custom) (require 'custom)
(eval-when-compile (require 'cl)
(require 'cl)
(if (not (and (condition-case nil
(require 'custom)
(error nil))
;; Stock Emacs 19.34 has a broken/old Custom library
;; that does more harm than good. Fortunately, it is
;; missing defcustom
(fboundp 'defcustom)))
(error "STOP! STOP! STOP! STOP!
The Custom library was not found or is out of date. A more current
version is required. Please download and install the latest version
of the Custom library from:
<http://www.dina.kvl.dk/~abraham/custom/>
See the Python Mode home page for details:
<http://www.python.org/emacs/python-mode>
")))
;; user definable variables ;; user definable variables
@ -148,6 +123,14 @@ you're editing someone else's Python code."
:type 'integer :type 'integer
:group 'python) :group 'python)
(defcustom py-continuation-offset 4
"*Additional amount of offset to give for some continuation lines.
Continuation lines are those that immediately follow a backslash
terminated line. Only those continuation lines for a block opening
statement are given this extra offset."
:type 'integer
:group 'python)
(defcustom py-smart-indentation t (defcustom py-smart-indentation t
"*Should `python-mode' try to automagically set some indentation variables? "*Should `python-mode' try to automagically set some indentation variables?
When this variable is non-nil, two things happen when a buffer is set When this variable is non-nil, two things happen when a buffer is set
@ -276,6 +259,22 @@ When non-nil, arguments are printed."
:group 'python) :group 'python)
(make-variable-buffer-local 'py-indent-offset) (make-variable-buffer-local 'py-indent-offset)
(defcustom py-pdbtrack-do-tracking-p t
"*Controls whether the pdbtrack feature is enabled or not.
When non-nil, pdbtrack is enabled in all comint-based buffers,
e.g. shell buffers and the *Python* buffer. When using pdb to debug a
Python program, pdbtrack notices the pdb prompt and displays the
source file and line that the program is stopped at, much the same way
as gud-mode does for debugging C programs with gdb."
:type 'boolean
:group 'python)
(make-variable-buffer-local 'py-pdbtrack-do-tracking-p)
(defcustom py-pdbtrack-minor-mode-string " PDB"
"*String to use in the minor mode list when pdbtrack is enabled."
:type 'string
:group 'python)
;; Not customizable ;; Not customizable
(defvar py-master-file nil (defvar py-master-file nil
"If non-nil, execute the named file instead of the buffer's file. "If non-nil, execute the named file instead of the buffer's file.
@ -299,13 +298,6 @@ buffer is prepended to come up with a file name.")
(defconst py-emacs-features (defconst py-emacs-features
(let (features) (let (features)
;; NTEmacs 19.34.6 has a broken make-temp-name; it always returns
;; the same string.
(let ((tmp1 (make-temp-name ""))
(tmp2 (make-temp-name "")))
(if (string-equal tmp1 tmp2)
(push 'broken-temp-names features)))
;; return the features
features) features)
"A list of features extant in the Emacs you are using. "A list of features extant in the Emacs you are using.
There are many flavors of Emacs out there, with different levels of There are many flavors of Emacs out there, with different levels of
@ -319,7 +311,7 @@ support for features needed by `python-mode'.")
"from" "global" "if" "import" "from" "global" "if" "import"
"in" "is" "lambda" "not" "in" "is" "lambda" "not"
"or" "pass" "print" "raise" "or" "pass" "print" "raise"
"return" "while" "return" "while" "yield"
) )
"\\|")) "\\|"))
(kw2 (mapconcat 'identity (kw2 (mapconcat 'identity
@ -332,6 +324,8 @@ support for features needed by `python-mode'.")
;; block introducing keywords with immediately following colons. ;; block introducing keywords with immediately following colons.
;; Yes "except" is in both lists. ;; Yes "except" is in both lists.
(cons (concat "\\b\\(" kw2 "\\)[ \n\t(]") 1) (cons (concat "\\b\\(" kw2 "\\)[ \n\t(]") 1)
;; `as' but only in "import foo as bar"
'("[ \t]*\\(\\bfrom\\b.*\\)?\\bimport\\b.*\\b\\(as\\)\\b" . 2)
;; classes ;; classes
'("\\bclass[ \t]+\\([a-zA-Z_]+[a-zA-Z0-9_]*\\)" '("\\bclass[ \t]+\\([a-zA-Z_]+[a-zA-Z0-9_]*\\)"
1 font-lock-type-face) 1 font-lock-type-face)
@ -347,6 +341,9 @@ support for features needed by `python-mode'.")
"Queue of Python temp files awaiting execution. "Queue of Python temp files awaiting execution.
Currently-active file is at the head of the list.") Currently-active file is at the head of the list.")
(defvar py-pdbtrack-is-tracking-p nil)
;; Constants ;; Constants
@ -428,6 +425,17 @@ Currently-active file is at the head of the list.")
"[ \t]+File \"\\([^\"]+\\)\", line \\([0-9]+\\)" "[ \t]+File \"\\([^\"]+\\)\", line \\([0-9]+\\)"
"Regular expression that describes tracebacks.") "Regular expression that describes tracebacks.")
;; pdbtrack contants
(defconst py-pdbtrack-stack-entry-regexp
"> \\([^(]+\\)(\\([0-9]+\\))[?a-zA-Z0-9_]+()"
"Regular expression pdbtrack uses to find a stack trace entry.")
(defconst py-pdbtrack-input-prompt "\n[(<]?pdb[>)]? "
"Regular expression pdbtrack uses to recognize a pdb prompt.")
(defconst py-pdbtrack-track-range 10000
"Max number of characters from end of buffer to search for stack entry.")
;; Major mode boilerplate ;; Major mode boilerplate
@ -489,6 +497,7 @@ Currently-active file is at the head of the list.")
;; Miscellaneous ;; Miscellaneous
(define-key py-mode-map "\C-c:" 'py-guess-indent-offset) (define-key py-mode-map "\C-c:" 'py-guess-indent-offset)
(define-key py-mode-map "\C-c\t" 'py-indent-region) (define-key py-mode-map "\C-c\t" 'py-indent-region)
(define-key py-mode-map "\C-c\C-d" 'py-pdbtrack-toggle-stack-tracking)
(define-key py-mode-map "\C-c\C-n" 'py-next-statement) (define-key py-mode-map "\C-c\C-n" 'py-next-statement)
(define-key py-mode-map "\C-c\C-p" 'py-previous-statement) (define-key py-mode-map "\C-c\C-p" 'py-previous-statement)
(define-key py-mode-map "\C-c\C-u" 'py-goto-block-up) (define-key py-mode-map "\C-c\C-u" 'py-goto-block-up)
@ -1091,6 +1100,70 @@ This function is appropriate for `comint-output-filter-functions'."
(py-execute-file pyproc (car py-file-queue)))) (py-execute-file pyproc (car py-file-queue))))
)) ))
(defun py-pdbtrack-overlay-arrow (activation)
"Activate or de arrow at beginning-of-line in current buffer."
;; This was derived/simplified from edebug-overlay-arrow
(cond (activation
(setq overlay-arrow-position (make-marker))
(setq overlay-arrow-string "=>")
(set-marker overlay-arrow-position (py-point 'bol) (current-buffer))
(setq py-pdbtrack-is-tracking-p t))
(overlay-arrow-position
(setq overlay-arrow-position nil)
(setq py-pdbtrack-is-tracking-p nil))
))
(defun py-pdbtrack-track-stack-file (text)
"Show the file indicated by the pdb stack entry line, in a separate window.
Activity is disabled if the buffer-local variable
`py-pdbtrack-do-tracking-p' is nil.
We depend on the pdb input prompt matching `py-pdbtrack-input-prompt'
at the beginning of the line."
;; Instead of trying to piece things together from partial text
;; (which can be almost useless depending on Emacs version), we
;; monitor to the point where we have the next pdb prompt, and then
;; check all text from comint-last-input-end to process-mark.
;;
;; KLM: It might be nice to provide an optional override, so this
;; routine could be fed debugger output strings as the text
;; argument, for deliberate application elsewhere.
;;
;; KLM: We're very conservative about clearing the overlay arrow, to
;; minimize residue. This means, for instance, that executing other
;; pdb commands wipes out the highlight.
(let* ((origbuf (current-buffer))
(currproc (get-buffer-process origbuf)))
(if (not (and currproc py-pdbtrack-do-tracking-p))
(py-pdbtrack-overlay-arrow nil)
(let* (;(origdir default-directory)
(procmark (process-mark currproc))
(block (buffer-substring (max comint-last-input-end
(- procmark
py-pdbtrack-track-range))
procmark))
fname lineno)
(if (not (string-match (concat py-pdbtrack-input-prompt "$") block))
(py-pdbtrack-overlay-arrow nil)
(if (not (string-match
(concat ".*" py-pdbtrack-stack-entry-regexp ".*")
block))
(py-pdbtrack-overlay-arrow nil)
(setq fname (match-string 1 block)
lineno (match-string 2 block))
(if (file-exists-p fname)
(progn
(find-file-other-window fname)
(goto-line (string-to-int lineno))
(message "pdbtrack: line %s, file %s" lineno fname)
(py-pdbtrack-overlay-arrow t)
(pop-to-buffer origbuf t) )
(if (= (elt fname 0) ?\<)
(message "pdbtrack: (Non-file source: '%s')" fname)
(message "pdbtrack: File not found: %s" fname))
)))))))
(defun py-postprocess-output-buffer (buf) (defun py-postprocess-output-buffer (buf)
"Highlight exceptions found in BUF. "Highlight exceptions found in BUF.
If an exception occurred return t, otherwise return nil. BUF must exist." If an exception occurred return t, otherwise return nil. BUF must exist."
@ -1227,6 +1300,9 @@ filter."
(setq comint-prompt-regexp "^>>> \\|^[.][.][.] \\|^(pdb) ") (setq comint-prompt-regexp "^>>> \\|^[.][.][.] \\|^(pdb) ")
(add-hook 'comint-output-filter-functions (add-hook 'comint-output-filter-functions
'py-comint-output-filter-function) 'py-comint-output-filter-function)
;; pdbtrack
(add-hook 'comint-output-filter-functions 'py-pdbtrack-track-stack-file)
(setq py-pdbtrack-do-tracking-p t)
(set-syntax-table py-mode-syntax-table) (set-syntax-table py-mode-syntax-table)
(use-local-map py-shell-map) (use-local-map py-shell-map)
)) ))
@ -1278,11 +1354,24 @@ is inserted at the end. See also the command `py-clear-queue'."
(format "python-%d-%d" sn pid) (format "python-%d-%d" sn pid)
(format "python-%d" sn))) (format "python-%d" sn)))
(make-temp-name "python-"))) (make-temp-name "python-")))
(file (expand-file-name temp py-temp-directory))) (file (expand-file-name temp py-temp-directory))
(write-region start end file nil 'nomsg) (cur (current-buffer))
(buf (get-buffer-create file)))
;; Write the contents of the buffer, watching out for indented regions.
(save-excursion
(goto-char start)
(let ((needs-if (/= (py-point 'bol) (py-point 'boi))))
(set-buffer buf)
(when needs-if
(insert "if 1:\n"))
(insert-buffer-substring cur start end)))
(cond (cond
;; always run the code in its own asynchronous subprocess ;; always run the code in its own asynchronous subprocess
(async (async
;; User explicitly wants this to run in its own async subprocess
(save-excursion
(set-buffer buf)
(write-region (point-min) (point-max) file nil 'nomsg))
(let* ((buf (generate-new-buffer-name py-output-buffer)) (let* ((buf (generate-new-buffer-name py-output-buffer))
;; TBD: a horrible hack, but why create new Custom variables? ;; TBD: a horrible hack, but why create new Custom variables?
(arg (if (string-equal py-which-bufname "Python") (arg (if (string-equal py-which-bufname "Python")
@ -1290,11 +1379,15 @@ is inserted at the end. See also the command `py-clear-queue'."
(start-process py-which-bufname buf py-which-shell arg file) (start-process py-which-bufname buf py-which-shell arg file)
(pop-to-buffer buf) (pop-to-buffer buf)
(py-postprocess-output-buffer buf) (py-postprocess-output-buffer buf)
;; TBD: clean up the temporary file!
)) ))
;; if the Python interpreter shell is running, queue it up for ;; if the Python interpreter shell is running, queue it up for
;; execution there. ;; execution there.
(proc (proc
;; use the existing python shell ;; use the existing python shell
(save-excursion
(set-buffer buf)
(write-region (point-min) (point-max) file nil 'nomsg))
(if (not py-file-queue) (if (not py-file-queue)
(py-execute-file proc file) (py-execute-file proc file)
(message "File %s queued for execution" file)) (message "File %s queued for execution" file))
@ -1306,7 +1399,10 @@ is inserted at the end. See also the command `py-clear-queue'."
(if (string-equal py-which-bufname "JPython") (if (string-equal py-which-bufname "JPython")
" -" "")))) " -" ""))))
;; otherwise either run it synchronously in a subprocess ;; otherwise either run it synchronously in a subprocess
(shell-command-on-region start end cmd py-output-buffer) (save-excursion
(set-buffer buf)
(shell-command-on-region (point-min) (point-max)
cmd py-output-buffer))
;; shell-command-on-region kills the output buffer if it never ;; shell-command-on-region kills the output buffer if it never
;; existed and there's no output from the command ;; existed and there's no output from the command
(if (not (get-buffer py-output-buffer)) (if (not (get-buffer py-output-buffer))
@ -1316,8 +1412,12 @@ is inserted at the end. See also the command `py-clear-queue'."
(pop-to-buffer py-output-buffer) (pop-to-buffer py-output-buffer)
(if err-p (if err-p
(pop-to-buffer py-exception-buffer))) (pop-to-buffer py-exception-buffer)))
))) ))
))) ;; TBD: delete the buffer
)
)
;; Clean up after ourselves.
(kill-buffer buf)))
;; Code execution commands ;; Code execution commands
@ -1708,7 +1808,8 @@ dedenting."
;; chunk of non-whitespace characters on base line, + 1 more ;; chunk of non-whitespace characters on base line, + 1 more
;; column ;; column
(end-of-line) (end-of-line)
(setq endpos (point) searching t) (setq endpos (point)
searching t)
(back-to-indentation) (back-to-indentation)
(setq startpos (point)) (setq startpos (point))
;; look at all "=" from left to right, stopping at first ;; look at all "=" from left to right, stopping at first
@ -1733,7 +1834,12 @@ dedenting."
(progn (progn
(goto-char startpos) (goto-char startpos)
(skip-chars-forward "^ \t\n"))) (skip-chars-forward "^ \t\n")))
(1+ (current-column)))))) ;; if this is a continuation for a block opening
;; statement, add some extra offset.
(+ (current-column) (if (py-statement-opens-block-p)
py-continuation-offset 0)
1)
))))
;; not on a continuation line ;; not on a continuation line
((bobp) (current-indentation)) ((bobp) (current-indentation))
@ -2464,6 +2570,29 @@ A `nomenclature' is a fancy way of saying AWordWithMixedCaseNotUnderscores."
(py-keep-region-active)) (py-keep-region-active))
;; pdbtrack functions
(defun py-pdbtrack-toggle-stack-tracking (arg)
(interactive "P")
(if (not (get-buffer-process (current-buffer)))
(error "No process associated with buffer '%s'" (current-buffer)))
;; missing or 0 is toggle, >0 turn on, <0 turn off
(if (or (not arg)
(zerop (setq arg (prefix-numeric-value arg))))
(setq py-pdbtrack-do-tracking-p (not py-pdbtrack-do-tracking-p))
(setq py-pdbtrack-do-tracking-p (> arg 0)))
(message "%sabled Python's pdbtrack"
(if py-pdbtrack-do-tracking-p "En" "Dis")))
(defun turn-on-pdbtrack ()
(interactive)
(py-pdbtrack-toggle-stack-tracking 1))
(defun turn-off-pdbtrack ()
(interactive)
(py-pdbtrack-toggle-stack-tracking 0))
;; Documentation functions ;; Documentation functions
@ -2775,7 +2904,7 @@ local bindings to py-newline-and-indent."))
"Return the parse state at point (see `parse-partial-sexp' docs)." "Return the parse state at point (see `parse-partial-sexp' docs)."
(save-excursion (save-excursion
(let ((here (point)) (let ((here (point))
pps done) in-listcomp pps done)
(while (not done) (while (not done)
;; back up to the first preceding line (if any; else start of ;; back up to the first preceding line (if any; else start of
;; buffer) that begins with a popular Python keyword, or a ;; buffer) that begins with a popular Python keyword, or a
@ -2784,6 +2913,13 @@ local bindings to py-newline-and-indent."))
;; at a non-zero nesting level. It may be slow for people who ;; at a non-zero nesting level. It may be slow for people who
;; write huge code blocks or huge lists ... tough beans. ;; write huge code blocks or huge lists ... tough beans.
(re-search-backward py-parse-state-re nil 'move) (re-search-backward py-parse-state-re nil 'move)
;; Watch out for landing inside a list comprehension
(save-excursion
(if (and (looking-at "[ \t]*\\<\\(if\\|for\\)\\>")
(py-safe (progn (up-list -1) t))
(eq (char-after) ?\[))
(setq in-listcomp (point))
(setq in-listcomp nil)))
(beginning-of-line) (beginning-of-line)
;; In XEmacs, we have a much better way to test for whether ;; In XEmacs, we have a much better way to test for whether
;; we're in a triple-quoted string or not. Emacs does not ;; we're in a triple-quoted string or not. Emacs does not
@ -2806,6 +2942,9 @@ local bindings to py-newline-and-indent."))
;; XEmacs ;; XEmacs
(setq done (or (not (buffer-syntactic-context)) (setq done (or (not (buffer-syntactic-context))
(bobp))) (bobp)))
(when in-listcomp
(goto-char in-listcomp)
(setq done nil))
(when done (when done
(setq pps (parse-partial-sexp (point) here))) (setq pps (parse-partial-sexp (point) here)))
)) ))
@ -2842,12 +2981,16 @@ If nesting level is zero, return nil."
"Go to the beginning of the triple quoted string we find ourselves in. "Go to the beginning of the triple quoted string we find ourselves in.
DELIM is the TQS string delimiter character we're searching backwards DELIM is the TQS string delimiter character we're searching backwards
for." for."
(let ((skip (and delim (make-string 1 delim)))) (let ((skip (and delim (make-string 1 delim)))
(continue t))
(when skip (when skip
(save-excursion (save-excursion
(py-safe (search-backward skip)) (while continue
(if (and (eq (char-before) delim) (py-safe (search-backward skip))
(eq (char-before (1- (point))) delim)) (setq continue (and (not (bobp))
(= (char-before) ?\\))))
(if (and (= (char-before) delim)
(= (char-before (1- (point))) delim))
(setq skip (make-string 3 delim)))) (setq skip (make-string 3 delim))))
;; we're looking at a triple-quoted string ;; we're looking at a triple-quoted string
(py-safe (search-backward skip))))) (py-safe (search-backward skip)))))
@ -3097,6 +3240,12 @@ These are Python temporary files awaiting execution."
;; arrange to kill temp files when Emacs exists ;; arrange to kill temp files when Emacs exists
(add-hook 'kill-emacs-hook 'py-kill-emacs-hook) (add-hook 'kill-emacs-hook 'py-kill-emacs-hook)
(add-hook 'comint-output-filter-functions 'py-pdbtrack-track-stack-file)
;; Add a designator to the minor mode strings
(or (assq 'py-pdbtrack-minor-mode-string minor-mode-alist)
(push '(py-pdbtrack-is-tracking-p py-pdbtrack-minor-mode-string)
minor-mode-alist))

View File

@ -4,7 +4,7 @@
;; Author: Stig Bjørlykke, <stigb@tihlde.org> ;; Author: Stig Bjørlykke, <stigb@tihlde.org>
;; Keywords: unix, languages ;; Keywords: unix, languages
;; Version: 0.11g ;; Version: 0.11h
;; This file is not yet part of FSF Emacs or XEmacs. ;; This file is not yet part of FSF Emacs or XEmacs.
@ -407,7 +407,7 @@ the package."
(defvar rpm-spec-font-lock-keywords (defvar rpm-spec-font-lock-keywords
'( '(
("%[a-zA-Z0-9_]+" 0 rpm-spec-macro-face) ("%[a-zA-Z0-9_]+" 0 rpm-spec-macro-face)
("^\\([a-zA-Z0-9]+\\)\\(\([a-zA-Z0-9]+\)\\):" ("^\\([a-zA-Z0-9]+\\)\\(\([a-zA-Z0-9,]+\)\\):"
(1 rpm-spec-tag-face) (1 rpm-spec-tag-face)
(2 rpm-spec-ghost-face)) (2 rpm-spec-ghost-face))
("^\\([a-zA-Z0-9]+\\):" 1 rpm-spec-tag-face) ("^\\([a-zA-Z0-9]+\\):" 1 rpm-spec-tag-face)

View File

@ -1,5 +1,4 @@
367bc83b70bd10b8908549087b73530d elisp-manual-21-2.6.tar.bz2 5fefba94ab9e079b0b0fd3db36a115c1 elisp-manual-21-2.7.tar.bz2
7c55c72e7cc8f1cb49b57b670b82dba2 emacs-20.7.tar.bz2 a5a99bb492ac59e7dc25670076a52757 emacs-21.1.tar.bz2
606b7415499a88b839a7cf414e3caaa8 emacs-asian.tar.bz2 606b7415499a88b839a7cf414e3caaa8 emacs-asian.tar.bz2
9395bc6d85f12471ee8f1f9bd6988d9e gnus-5.8.8-compiled.tar.bz2 81d338aaddaaa7c1a876f49042087ef4 leim-21.1.tar.bz2
112c8f7493ef295fc9022feb4653eab0 leim-20.7.tar.bz2

201
ssl.el Normal file
View File

@ -0,0 +1,201 @@
;;; ssl.el,v --- ssl functions for emacsen without them builtin
;; Author: wmperry
;; Created: 1999/10/14 12:44:18
;; Version: 1.2
;; Keywords: comm
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Copyright (c) 1995, 1996 by William M. Perry <wmperry@cs.indiana.edu>
;;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc.
;;;
;;; This file is part of GNU Emacs.
;;;
;;; GNU Emacs is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 2, or (at your option)
;;; any later version.
;;;
;;; GNU Emacs is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Emacs; see the file COPYING. If not, write to the
;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;;; Boston, MA 02111-1307, USA.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(require 'cl)
(require 'base64)
(eval-and-compile
(condition-case ()
(require 'custom)
(error nil))
(if (and (featurep 'custom) (fboundp 'custom-declare-variable))
nil ;; We've got what we needed
;; We have the old custom-library, hack around it!
(defmacro defgroup (&rest args)
nil)
(defmacro defcustom (var value doc &rest args)
(` (defvar (, var) (, value) (, doc))))))
(defgroup ssl nil
"Support for `Secure Sockets Layer' encryption."
:group 'comm)
(defcustom ssl-certificate-directory "~/.w3/certs/"
"*Directory to store CA certificates in"
:group 'ssl
:type 'directory)
(defcustom ssl-rehash-program-name "c_rehash"
"*Program to run after adding a cert to a directory .
Run with one argument, the directory name."
:group 'ssl
:type 'string)
(defcustom ssl-view-certificate-program-name "x509"
"*The program to run to provide a human-readable view of a certificate."
:group 'ssl
:type 'string)
(defcustom ssl-view-certificate-program-arguments '("-text" "-inform" "DER")
"*Arguments that should be passed to the certificate viewing program.
The certificate is piped to it.
Maybe a way of passing a file should be implemented"
:group 'ssl
:type 'list)
(defcustom ssl-certificate-directory-style 'ssleay
"*Style of cert database to use, the only valid value right now is `ssleay'.
This means a directory of pem encoded certificates with hash symlinks."
:group 'ssl
:type '(choice (const :tag "SSLeay" :value ssleay)
(const :tag "OpenSSL" :value openssl)))
(defcustom ssl-certificate-verification-policy 0
"*How far up the certificate chain we should verify."
:group 'ssl
:type '(choice (const :tag "No verification" :value 0)
(const :tag "Verification required" :value 1)
(const :tag "Reject connection if verification fails" :value 3)
(const :tag "SSL_VERIFY_CLIENT_ONCE" :value 5)))
(defcustom ssl-program-name "openssl"
"*The program to run in a subprocess to open an SSL connection."
:group 'ssl
:type 'string)
(defcustom ssl-program-arguments
'("s_client"
"-quiet"
"-host" host
"-port" service
"-verify" (int-to-string ssl-certificate-verification-policy)
"-CApath" ssl-certificate-directory
)
"*Arguments that should be passed to the program `ssl-program-name'.
This should be used if your SSL program needs command line switches to
specify any behaviour (certificate file locations, etc).
The special symbols 'host and 'port may be used in the list of arguments
and will be replaced with the hostname and service/port that will be connected
to."
:group 'ssl
:type 'list)
(defun ssl-certificate-information (der)
"Return an assoc list of information about a certificate in DER format."
(let ((certificate (concat "-----BEGIN CERTIFICATE-----\n"
(base64-encode-string der)
"\n-----END CERTIFICATE-----\n"))
(exit-code 0))
(save-excursion
(set-buffer (get-buffer-create " *openssl*"))
(erase-buffer)
(insert certificate)
(setq exit-code (condition-case ()
(call-process-region (point-min) (point-max)
ssl-program-name
t (list (current-buffer) nil) t
"x509"
"-subject" ; Print the subject DN
"-issuer" ; Print the issuer DN
"-dates" ; Both before and after dates
"-serial" ; print out serial number
"-noout" ; Don't spit out the certificate
)
(error -1)))
(if (/= exit-code 0)
nil
(let ((vals nil))
(goto-char (point-min))
(while (re-search-forward "^\\([^=\n\r]+\\)\\s *=\\s *\\(.*\\)" nil t)
(push (cons (match-string 1) (match-string 2)) vals))
vals)))))
(defun ssl-accept-ca-certificate ()
"Ask if the user is willing to accept a new CA certificate. The buffer-name
should be the intended name of the certificate, and the buffer should probably
be in DER encoding"
;; TODO, check if it is really new or if we already know it
(let* ((process-connection-type nil)
(tmpbuf (generate-new-buffer "X509 CA Certificate Information"))
(response (save-excursion
(and (eq 0
(apply 'call-process-region
(point-min) (point-max)
ssl-view-certificate-program-name
nil tmpbuf t
ssl-view-certificate-program-arguments))
(switch-to-buffer tmpbuf)
(goto-char (point-min))
(or (recenter) t)
(yes-or-no-p
"Accept this CA to vouch for secure server identities? ")
(kill-buffer tmpbuf)))))
(if (not response)
nil
(if (not (file-directory-p ssl-certificate-directory))
(make-directory ssl-certificate-directory))
(case ssl-certificate-directory-style
(ssleay
(base64-encode-region (point-min) (point-max))
(goto-char (point-min))
(insert "-----BEGIN CERTIFICATE-----\n")
(goto-char (point-max))
(insert "-----END CERTIFICATE-----\n")
(let ((f (expand-file-name
(concat (file-name-sans-extension (buffer-name)) ".pem")
ssl-certificate-directory)))
(write-file f)
(call-process ssl-rehash-program-name
nil nil nil
(expand-file-name ssl-certificate-directory))))))))
(defun open-ssl-stream (name buffer host service)
"Open a SSL connection for a service to a host.
Returns a subprocess-object to represent the connection.
Input and output work as for subprocesses; `delete-process' closes it.
Args are NAME BUFFER HOST SERVICE.
NAME is name for process. It is modified if necessary to make it unique.
BUFFER is the buffer (or buffer-name) to associate with the process.
Process output goes at end of that buffer, unless you specify
an output stream or filter function to handle the output.
BUFFER may be also nil, meaning that this process is not associated
with any buffer
Third arg is name of the host to connect to, or its IP address.
Fourth arg SERVICE is name of the service desired, or an integer
specifying a port number to connect to."
(if (integerp service) (setq service (int-to-string service)))
(let* ((process-connection-type nil)
(port service)
(proc (eval
(`
(start-process name buffer ssl-program-name
(,@ ssl-program-arguments))))))
(process-kill-without-query proc)
proc))
(provide 'ssl)