Mercurial > hg > xemacs-beta
changeset 2:ac2d302a0011 r19-15b2
Import from CVS: tag r19-15b2
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CHANGES-beta Mon Aug 13 08:46:35 2007 +0200 @@ -0,0 +1,40 @@ + -*- indented-text -*- + +to 19.15 beta2 + +-- fast-lock.el 3.10.01 +-- ksh-mode.el 2.9 +-- mode-motion+.el 3.16 +-- psgml-1a12 +-- executable.el, imenu.el, sh-script.el and uniquify.el now included +-- rfc1521 patches to VM from Jamie +-- OffiX support added +-- lots of 19.34 syncing, most by Steven Baur +-- NetBSD on sparc platform fixes +-- additional featurep checks on 'scrollbar and 'menubar +-- configure changes to allow sunos4shr args to be picked up correctly + +to 19.15 beta1 + +-- gnus 5.2.40 +-- etc 0.22 +-- w3 3.0.12 +-- url 1.0.41 +-- reporter 3.3 +-- psgml 1a11 +-- cc-mode 4.315 +-- hm--html-menus 5.0 +-- stringp nil error when starting sparcworks +-- call7 and call8 had incorrect array sizes +-- makefile mode Error in `pre-idle-hook' (setting hook to nil): + (void-function makefile-space-face) +-- Crashes when built on X11R5 and run on X11R6 fixed +-- Lisp backtrace is now printed on all crashes, not just debug build +-- LOTS of typos fixed. +-- sunpro-init no longer opens /net/bin with possible hang at startup. +-- switch-to-buffer-other-window reverted to old-style behaviour +-- python-mode 2.67 +-- auto-mode-alist regexps reorganized for efficiency +-- interpreter-mode-alist regexps now look at entire first line. +-- new (interactive) spec `i' can be used to skip arguments. +-- other assorted fixes and changes
--- a/INSTALL Mon Aug 13 08:45:53 2007 +0200 +++ b/INSTALL Mon Aug 13 08:46:35 2007 +0200 @@ -212,6 +212,10 @@ drop support. `configure' will attempt to detect this option and define `--with-cde' for you. +The `--with-offix option allows you to enable or disable OffiX drag and +drop support. `configure' will attempt to detect this option and +define `--with-offix' for you. + The `--with-energize' option specifies that XEmacs should be built with support for the Lucid Energize system. (If you have not purchased Energize, specifying this option won't gain you anything.)
--- a/Installation Mon Aug 13 08:45:53 2007 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -Configured for `i486-unknown-linux2.0.0'. - - Where should the build process find the source code? /m/xemacs-19.14 - What installation prefix should install use? /usr/local - What operating system and machine description files should XEmacs use? - `s/linux.h' and `m/intel386.h' - What compiler should XEmacs be built with? gcc -bi486-linuxaout -O4 -m486 -malign-functions=2 -malign-jumps=2 -malign-loops=2 - Should XEmacs use the GNU version of malloc? yes - Should XEmacs use the relocating allocator for buffers? yes - What window system should XEmacs use? x11 - Where do we find X Windows header files? /usr/X11R6/include - Where do we find X Windows libraries? /usr/X11R6/lib - Additional header files: /usr/i486-linuxaout/include /m/xpm-3.4h/lib - Additional libraries: /usr/i486-linuxaout /lib-aout /m/xpm-3.4h/lib - Compiling in support for XAUTH. - Compiling in support for XPM. - Compiling in support for X-Face headers. - Compiling in support for GIF image conversion. - Compiling in support for JPEG image conversion. - Compiling in support for PNG image conversion. - Compiling in native sound support. - Compiling in support for DBM. - Using the Lucid menubar. - Using the Lucid scrollbar. - Using the Athena dialog boxes. -
--- a/Makefile Mon Aug 13 08:45:53 2007 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,591 +0,0 @@ -# Generated automatically from Makefile.in by configure. -# DIST: This is the distribution Makefile for XEmacs. configure can -# DIST: make most of the changes to this file you might want, so try -# DIST: that first. - -# make all to compile and build XEmacs. -# make install to install it. -# make TAGS to update tags tables. -# -# make clean or make mostlyclean -# Delete all files from the current directory that are normally -# created by building the program. Don't delete the files that -# record the configuration. Also preserve files that could be made -# by building, but normally aren't because the distribution comes -# with them. -# -# Delete `.dvi' files here if they are not part of the distribution. -# -# make distclean -# Delete all files from the current directory that are created by -# configuring or building the program. If you have unpacked the -# source and built the program without creating any other files, -# `make distclean' should leave only the files that were in the -# distribution. -# -# make realclean -# Delete everything from the current directory that can be -# reconstructed with this Makefile. This typically includes -# everything deleted by distclean, plus more: C source files -# produced by Bison, tags tables, info files, and so on. -# -# make extraclean -# Still more severe - delete backup and autosave files, too. - -SHELL = /bin/sh - - -# ==================== Things `configure' Might Edit ==================== - -CC=gcc -CPP=gcc -E -I/usr/i486-linuxaout/include -I/m/xpm-3.4h/lib -I/usr/X11R6/include -C_SWITCH_SYSTEM= -DFUNCPROTO=11 -DNARROWPROTO -D_BSD_SOURCE -LN_S=ln -s -CFLAGS=-bi486-linuxaout -O4 -m486 -malign-functions=2 -malign-jumps=2 -malign-loops=2 -C_SWITCH_X_SITE=-I/usr/X11R6/include -LD_SWITCH_X_SITE=-L/usr/X11R6/lib -YACC=bison -y - -### These help us choose version- and architecture-specific directories -### to install files in. - -### This should be the number of the XEmacs version we're building, -### like `19.13' or `19.14'. -version=19.14 - -### This should be the name of the configuration we're building XEmacs -### for, like `mips-dec-ultrix' or `sparc-sun-sunos'. -configuration=i486-unknown-linux2.0.0 - -### Libraries which should be edited into lib-src/Makefile. -libsrc_libs= -lgcc -lc -lgcc /usr/lib/crtn.o - -# ==================== Where To Install Things ==================== - -# The default location for installation. Everything is placed in -# subdirectories of this directory. The default values for many of -# the variables below are expressed in terms of this one, so you may -# not need to change them. This defaults to /usr/local. -prefix=/usr/local - -# Like `prefix', but used for architecture-specific files. -exec_prefix=${prefix} - -# Where to install XEmacs and other binaries that people will want to -# run directly (like etags). -bindir=${exec_prefix}/bin - -# Where to install architecture-independent data files. ${lispdir} -# and ${etcdir} are subdirectories of this. -datadir=${prefix}/lib - -# Where to install and expect the files that XEmacs modifies as it -# runs. These files are all architecture-independent. Right now, the -# only such data is the locking directory; ${lockdir} is a -# subdirectory of this. -statedir=${prefix}/lib - -# Where to install and expect executable files to be run by XEmacs -# rather than directly by users, and other architecture-dependent -# data. ${archlibdir} is a subdirectory of this. -libdir=${exec_prefix}/lib - -# Where to install XEmacs's man pages, and what extension they should have. -mandir=${prefix}/man/man1 -manext=.1 - -# Where to install and expect the info files describing XEmacs. In the -# past, this defaulted to a subdirectory of ${prefix}/lib/xemacs, but -# since there are now many packages documented with the texinfo -# system, it is inappropriate to imply that it is part of XEmacs. -infodir=${prefix}/lib/xemacs-${version}/info - -# This is set to 'yes' if the user specified the --infodir flag at -# configuration time. -infodir_user_defined=no - -# Where to find the source code. The source code for XEmacs's C kernel is -# expected to be in ${srcdir}/src, and the source code for XEmacs's -# utility programs is expected to be in ${srcdir}/lib-src. This is -# set by the configure script's `--srcdir' option. -srcdir=/m/xemacs-19.14 - -# Tell make where to find source files; this is needed for the makefiles. -VPATH=/m/xemacs-19.14 - -# ==================== XEmacs-specific directories ==================== - -# These variables hold the values XEmacs will actually use. They are -# based on the values of the standard Make variables above. - -# Where to install the lisp files distributed with -# XEmacs. This includes the XEmacs version, so that the -# lisp files for different versions of XEmacs will install -# themselves in separate directories. -lispdir=${datadir}/xemacs-${version}/lisp - -# This is set to 'yes' if the user specified the --lispdir or -# --datadir flag at configuration time. -lispdir_user_defined=no - -# Directories XEmacs should search for lisp files specific -# to this site (i.e. customizations), before consulting -# ${lispdir}. This should be a colon-separated list of -# directories. -sitelispdir=${datadir}/xemacs/site-lisp - -# Where XEmacs will search for its lisp files while -# building. This is only used during the process of -# compiling XEmacs, to help XEmacs find its lisp files -# before they've been installed in their final location. -# It's usually identical to lispdir, except that the -# entry for the directory containing the installed lisp -# files has been replaced with ../lisp. This should be a -# colon-separated list of directories. -buildlispdir=${srcdir}/lisp - -# Where to install the other architecture-independent -# data files distributed with XEmacs (like the tutorial, -# the cookie recipes and the Zippy database). This path -# usually contains the XEmacs version number, so the data -# files for multiple versions of XEmacs may be installed -# at once. -etcdir=${datadir}/xemacs-${version}/etc - -# This is set to 'yes' if the user specified the --etcdir or -# --datadir flag at configuration time. -etcdir_user_defined=no - -# Where to create and expect the locking directory, where -# the XEmacs locking code keeps track of which files are -# currently being edited. -lockdir=${statedir}/xemacs/lock - -# This is set to 'yes' if the user specified the --lockdir or -# --statedir flag at configuration time. -lockdir_user_defined=no - -# Where to put executables to be run by XEmacs rather than -# the user. This path usually includes the XEmacs version -# and configuration name, so that multiple configurations -# for multiple versions of XEmacs may be installed at -# once. -archlibdir=${libdir}/xemacs-${version}/${configuration} - -# This is set to 'yes' if the user specified any of --exec-prefix, -# --libdir or --archlibdir at configuration time. -archlibdir_user_defined=no - -# ==================== Utility Programs for the Build ==================== - -# Allow the user to specify the install program. -INSTALL = /usr/bin/install -c -INSTALL_PROGRAM = ${INSTALL} -INSTALL_DATA = ${INSTALL} -m 644 - -# ============================= Targets ============================== - -# Subdirectories to make recursively. `lisp' is not included -# because the compiled lisp files are part of the distribution -# and you cannot remake them without installing XEmacs first. -MAKE_SUBDIR = lib-src lwlib dynodump src - -# Subdirectories that can be made recursively. -SUBDIR = ${MAKE_SUBDIR} man - -# The makefiles of the directories in $SUBDIR. -SUBDIR_MAKEFILES = lib-src/Makefile lwlib/Makefile dynodump/Makefile src/Makefile man/Makefile - -# Subdirectories to install, and where they'll go. -# lib-src's makefile knows how to install it, so we don't do that here. -# When installing the info files, we need to do special things to -# avoid nuking an existing dir file, so we don't do that here; -# instead, we have written out explicit code in the `install' targets. -COPYDIR = ${srcdir}/etc ${srcdir}/lisp -COPYDESTS = ${etcdir} ${lispdir} - -.NO_PARALLEL: src/paths.h src/Emacs.ad.h ${MAKE_SUBDIR} dump-elcs - -all: src/paths.h src/Emacs.ad.h ${MAKE_SUBDIR} - -# Convenience target for XEmacs beta testers -beta: clean all-elc - -# Build XEmacs and recompile out-of-date and missing .elc files along -# the way. -all-elc: src/paths.h src/Emacs.ad.h lib-src lwlib dump-elcs src - sh ${srcdir}/lib-src/update-elc.sh - -# Sub-target for all-elc. -dump-elcs: FRC.dump-elcs - cd src; $(MAKE) dump-elcs $(MFLAGS) \ - CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' - -autoloads: src - sh ${srcdir}/lib-src/update-autoloads.sh - -# We force the rebuilding of src/paths.h because the user might give -# different values for the various directories. Since we use -# move-if-change, src/paths.h only actually changes if the user did -# something notable, so the only unnecessary work we do is in building -# src/paths.h.tmp, which isn't much. Note that sed is not in /bin on -# 386bsd. -src/paths.h: Makefile ${srcdir}/src/paths.h.in FRC.src.paths.h - @echo "Producing \`src/paths.h' from \`src/paths.h.in'." - -rm -f src/paths.h.tmp - @cp ${srcdir}/src/paths.h.in src/paths.h.tmp - -chmod 0644 src/paths.h.tmp - @echo '#define PATH_PREFIX "${prefix}"' >> src/paths.h.tmp - @if [ x"${lispdir_user_defined}" = x"yes" ]; then \ - echo '#define PATH_LOADSEARCH "${lispdir}"' >> src/paths.h.tmp;\ - else \ - echo '/* #define PATH_LOADSEARCH "${lispdir}" */' >>src/paths.h.tmp;\ - fi - @if [ x"${archlibdir_user_defined}" = x"yes" ]; then \ - echo '#define PATH_EXEC "${archlibdir}"' >> src/paths.h.tmp ;\ - else \ - echo '/* #define PATH_EXEC "${archlibdir}" */' >> src/paths.h.tmp ;\ - fi - @if [ x"${etcdir_user_defined}" = x"yes" ]; then \ - echo '#define PATH_DATA "${etcdir}"' >> src/paths.h.tmp ;\ - else \ - echo '/* #define PATH_DATA "${etcdir}" */' >> src/paths.h.tmp ;\ - fi - @if [ x"${lockdir_user_defined}" = x"yes" ]; then \ - echo '#define PATH_LOCK "${lockdir}"' >> src/paths.h.tmp ;\ - else \ - echo '/* #define PATH_LOCK "${lockdir}" */' >> src/paths.h.tmp ;\ - fi - @if [ x"${infodir_user_defined}" = x"yes" ]; then \ - echo '#define PATH_INFO "${infodir}"' >> src/paths.h.tmp ;\ - else \ - echo '/* #define PATH_INFO "${infodir}" */' >> src/paths.h.tmp ;\ - fi - @sh ${srcdir}/move-if-change src/paths.h.tmp src/paths.h - -# We have to force the building of Emacs.ad.h as well in order to get it -# updated correctly when VPATH is being used. Since we use move-if-change, -# it will only actually change if the user modified ${etcdir}/Emacs.ad. -src/Emacs.ad.h: ${srcdir}/etc/Emacs.ad - @echo "Producing \`src/Emacs.ad.h' from \`etc/Emacs.ad'." - -rm -f src/Emacs.ad.h - @(echo "/* Do not edit this file!" ; \ - echo " Automatically generated from ${srcdir}/etc/Emacs.ad" ; \ - echo " */" ; \ - /bin/sh ${srcdir}/lib-src/ad2c ${srcdir}/etc/Emacs.ad ) > \ - src/Emacs.ad.h - -src: lib-src lwlib dynodump FRC.src -lib-src: FRC.lib-src -lwlib: FRC.lwlib -dynodump: FRC.dynodump - -.RECURSIVE: ${SUBDIR} - -${SUBDIR}: ${SUBDIR_MAKEFILES} src/config.h FRC - cd $@; $(MAKE) all $(MFLAGS) \ - CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' - -Makefile: ${srcdir}/Makefile.in config.status - ./config.status - -src/Makefile: ${srcdir}/src/Makefile.in.in config.status - ./config.status - -lib-src/Makefile: ${srcdir}/lib-src/Makefile.in.in config.status - ./config.status - -lwlib/Makefile: ${srcdir}/lwlib/Makefile.in.in config.status - ./config.status - -dynodump/Makefile: ${srcdir}/dynodump/Makefile.in.in config.status - ./config.status - -man/Makefile: ${srcdir}/man/Makefile.in.in config.status - ./config.status - -src/config.h: ${srcdir}/src/config.h.in - ./config.status - -# ==================== Installation ==================== - -## If we let lib-src do its own installation, that means we -## don't have to duplicate the list of utilities to install in -## this Makefile as well. - -## On AIX, use tar xBf. -## On Xenix, use tar xpf. - -.PHONY: install install-arch-dep install-arch-indep mkdir - -## We delete each directory in ${COPYDESTS} before we copy into it; -## that way, we can reinstall over directories that have been put in -## place with their files read-only (perhaps because they are checked -## into RCS). In order to make this safe, we make sure that the -## source exists and is distinct from the destination. - -## FSF doesn't depend on `all', but rather on ${MAKE_SUBDIR}, so that -## they "won't ever modify src/paths.h". But that means you can't do -## 'make install' right off the bat because src/paths.h won't exist. -## And, in XEmacs case, src/Emacs.ad.h won't exist either. I also -## don't see the point in avoiding modifying paths.h. It creates an -## inconsistency in the build process. So we go ahead and depend on -## all. --cet - -install: all install-arch-dep install-arch-indep; - -install-arch-dep: mkdir - (cd lib-src; \ - $(MAKE) install $(MFLAGS) prefix=${prefix} \ - exec_prefix=${exec_prefix} bindir=${bindir} libdir=${libdir} \ - archlibdir=${archlibdir}) - if [ `(cd ${archlibdir}; /bin/pwd)` != `(cd ./lib-src; /bin/pwd)` ]; \ - then \ - echo "Copying lib-src/DOC-* ..." ; \ - (cd ./lib-src; tar -cf - DOC-*)|(cd ${archlibdir}; umask 0; tar -xf - ); \ - for subdir in `find ${archlibdir} -type d ! -name RCS ! -name SCCS ! -name CVS -print` ; do \ - rm -rf $${subdir}/RCS ; \ - rm -rf $${subdir}/CVS ; \ - rm -rf $${subdir}/SCCS ; \ - rm -f $${subdir}/\#* ; \ - rm -f $${subdir}/*~ ; \ - done ; \ - else true; fi - ${INSTALL_PROGRAM} src/xemacs ${bindir}/xemacs-${version} - -chmod 0755 ${bindir}/xemacs-${version} - rm -f ${bindir}/xemacs - (cd ${bindir} ; ${LN_S} xemacs-${version} ./xemacs) - -install-arch-indep: mkdir - -set ${COPYDESTS} ; \ - for dir in ${COPYDIR} ; do \ - if [ `(cd $$1 && pwd)` != `(cd $${dir} && pwd)` ] ; then \ - echo "rm -rf $$1" ; \ - fi ; \ - shift ; \ - done - -set ${COPYDESTS} ; \ - mkdir ${COPYDESTS} ; \ - for dir in ${COPYDIR} ; do \ - dest=$$1 ; shift ; \ - [ -d $${dir} ] \ - && [ `(cd $${dir} && /bin/pwd)` != `(cd $${dest} && /bin/pwd)` ] \ - && (echo "Copying $${dir}..." ; \ - (cd $${dir}; tar -cf - . )|(cd $${dest};umask 022; tar -xf - );\ - chmod 0755 $${dest}; \ - for subdir in `find $${dest} -type d ! -name RCS ! -name SCCS ! -name CVS -print` ; do \ - rm -rf $${subdir}/RCS ; \ - rm -rf $${subdir}/CVS ; \ - rm -rf $${subdir}/SCCS ; \ - rm -f $${subdir}/\#* ; \ - rm -f $${subdir}/*~ ; \ - done) ; \ - done - if [ `(cd ${srcdir}/info && /bin/pwd)` != `(cd ${infodir} && /bin/pwd)` ]; \ - then \ - (cd ${srcdir}/info ; \ - if [ ! -f ${infodir}/dir ] && [ -f dir ]; then \ - ${INSTALL_DATA} ${srcdir}/info/dir ${infodir}/dir ; \ - fi ; \ - for f in ange-ftp* cc-mode* cl* dired* ediff* external-widget* \ - forms* gnus* hyperbole* ilisp* info* internals* \ - ispell* internals* lispref* mailcrypt* message* mh-e* \ - new-users-guide* oo-browser* pcl-cvs* psgml* rmail* \ - standards* supercite* term.* termcap* texinfo* viper* \ - vm* w3* xemacs* ; do \ - ${INSTALL_DATA} ${srcdir}/info/$$f ${infodir}/$$f ; \ - chmod 0644 ${infodir}/$$f; \ - done); \ - else true; fi - cd ${srcdir}/etc; for page in xemacs etags ctags gnuserv \ - gnuclient gnuattach gnudoit ; do \ - ${INSTALL_DATA} ${srcdir}/etc/$${page}.1 ${mandir}/$${page}${manext} ; \ - chmod 0644 ${mandir}/$${page}${manext} ; \ - done - -MAKEPATH=./lib-src/make-path -### Build all the directories we're going to install XEmacs in. Since -### we may be creating several layers of directories (for example, -### /usr/local/lib/xemacs-19.14/mips-dec-ultrix4.2), we use make-path -### instead of mkdir. Not all systems' mkdirs have the `-p' flag. -mkdir: FRC.mkdir - ${MAKEPATH} ${COPYDESTS} ${lockdir} ${infodir} ${mandir} \ - ${bindir} ${datadir} ${libdir} ${sitelispdir} - -chmod 0777 ${lockdir} - -### Delete all the installed files that the `install' target would -### create (but not the noninstalled files such as `make all' would -### create). -### -### Don't delete the lisp and etc directories if they're in the source tree. -#### This target has not been updated in sometime and until it is it -#### would be extremely dangerous for anyone to use it. -#uninstall: -# (cd lib-src; \ -# $(MAKE) $(MFLAGS) uninstall \ -# prefix=${prefix} exec_prefix=${exec_prefix} \ -# bindir=${bindir} libdir=${libdir} archlibdir=${archlibdir}) -# for dir in ${lispdir} ${etcdir} ; do \ -# case `(cd $${dir} ; pwd)` in \ -# `(cd ${srcdir} ; pwd)`* ) ;; \ -# * ) rm -rf $${dir} ;; \ -# esac ; \ -# case $${dir} in \ -# ${datadir}/xemacs/${version}/* ) \ -# rm -rf ${datadir}/xemacs/${version} \ -# ;; \ -# esac ; \ -# done -# (cd ${infodir} && rm -f cl* xemacs* forms* info* vip*) -# (cd ${mandir} && rm -f xemacs.1 etags.1 ctags.1 gnuserv.1) -# (cd ${bindir} && rm -f xemacs-${version} xemacs) - - -### Some makes seem to remember that they've built something called FRC, -### so you can only use a given FRC once per makefile. -FRC FRC.src.paths.h FRC.src FRC.lib-src FRC.lwlib FRC.mkdir FRC.dump-elcs: -FRC.dynodump: -FRC.mostlyclean FRC.clean FRC.distclean FRC.realclean: - -# ==================== Cleaning up and miscellanea ==================== - -.PHONY: mostlyclean clean distclean realclean extraclean - -### `mostlyclean' -### Like `clean', but may refrain from deleting a few files that people -### normally don't want to recompile. For example, the `mostlyclean' -### target for GCC does not delete `libgcc.a', because recompiling it -### is rarely necessary and takes a lot of time. -mostlyclean: FRC.mostlyclean - (cd src && $(MAKE) $(MFLAGS) mostlyclean) - (cd lib-src && $(MAKE) $(MFLAGS) mostlyclean) - (cd lwlib && $(MAKE) $(MFLAGS) mostlyclean) - (cd dynodump && $(MAKE) $(MFLAGS) mostlyclean) - -(cd man && $(MAKE) $(MFLAGS) mostlyclean) - -### `clean' -### Delete all files from the current directory that are normally -### created by building the program. Don't delete the files that -### record the configuration. Also preserve files that could be made -### by building, but normally aren't because the distribution comes -### with them. -### -### Delete `.dvi' files here if they are not part of the distribution. -clean: FRC.clean - (cd src && $(MAKE) $(MFLAGS) clean) - (cd lib-src && $(MAKE) $(MFLAGS) clean) - (cd lwlib && $(MAKE) $(MFLAGS) clean) - (cd dynodump && $(MAKE) $(MFLAGS) clean) - -(cd man && $(MAKE) $(MFLAGS) clean) - -### `distclean' -### Delete all files from the current directory that are created by -### configuring or building the program. If you have unpacked the -### source and built the program without creating any other files, -### `make distclean' should leave only the files that were in the -### distribution. -top_distclean=\ - rm -f config.status config-tmp-* build-install ; \ - rm -f Makefile ${SUBDIR_MAKEFILES}; \ - (cd lock && rm -f *) - -distclean: FRC.distclean - (cd src && $(MAKE) $(MFLAGS) distclean) - (cd lib-src && $(MAKE) $(MFLAGS) distclean) - (cd lwlib && $(MAKE) $(MFLAGS) distclean) - (cd dynodump && $(MAKE) $(MFLAGS) distclean) - -(cd man && $(MAKE) $(MFLAGS) distclean) - -${top_distclean} - -### `realclean' -### Delete everything from the current directory that can be -### reconstructed with this Makefile. This typically includes -### everything deleted by distclean, plus more: C source files -### produced by Bison, tags tables, info files, and so on. -### -### One exception, however: `make realclean' should not delete -### `configure' even if `configure' can be remade using a rule in the -### Makefile. More generally, `make realclean' should not delete -### anything that needs to exist in order to run `configure' and then -### begin to build the program. -realclean: FRC.realclean - (cd src && $(MAKE) $(MFLAGS) realclean) - (cd lib-src && $(MAKE) $(MFLAGS) realclean) - (cd lwlib && $(MAKE) $(MFLAGS) realclean) - (cd dynodump && $(MAKE) $(MFLAGS) realclean) - -(cd man && $(MAKE) $(MFLAGS) realclean) - -${top_distclean} - -### This doesn't actually appear in the coding standards, but Karl -### says GCC supports it, and that's where the configuration part of -### the coding standards seem to come from. It's like distclean, but -### it deletes backup and autosave files too. -extraclean: - (cd src && $(MAKE) $(MFLAGS) extraclean) - (cd lib-src && $(MAKE) $(MFLAGS) extraclean) - (cd lwlib && $(MAKE) $(MFLAGS) extraclean) - (cd dynodump && $(MAKE) $(MFLAGS) extraclean) - -(cd man && $(MAKE) $(MFLAGS) extraclean) - -rm -f *~ \#* - -${top_distclean} - -### Unlocking and relocking. The idea of these productions is to reduce -### hassles when installing an incremental tar of XEmacs. Do `make unlock' -### before unlocking the file to take the write locks off all sources so -### that tar xvof will overwrite them without fuss. Then do `make relock' -### afterward so that VC mode will know which files should be checked in -### if you want to mung them. -### -### Note: it's no disaster if these productions miss a file or two; tar -### and VC will swiftly let you know if this happens, and it is easily -### corrected. -SOURCES = ChangeLog GETTING.GNU.SOFTWARE INSTALL Makefile.in PROBLEMS \ - README build-install.in configure make-dist move-if-change - -.PHONY: unlock relock - -unlock: - chmod u+w $(SOURCES) cpp/* - -(cd elisp && chmod u+w Makefile README *.texi) - (cd etc && $(MAKE) $(MFLAGS) unlock) - (cd lib-src && $(MAKE) $(MFLAGS) unlock) - (cd lisp && $(MAKE) $(MFLAGS) unlock) - (cd lisp/term && chmod u+w README *.el) - (cd man && chmod u+w *texi* ChangeLog split-man) - (cd lwlib && chmod u+w *.[ch] Makefile.in.in) - (cd src && $(MAKE) $(MFLAGS) unlock) - -relock: - chmod u-w $(SOURCES) cpp/* - -(cd elisp && chmod u-w Makefile README *.texi) - (cd etc && $(MAKE) $(MFLAGS) relock) - (cd lib-src && $(MAKE) $(MFLAGS) relock) - (cd lisp && $(MAKE) $(MFLAGS) relock) - (cd lisp/term && chmod u+w README *.el) - (cd man && chmod u+w *texi* ChangeLog split-man) - (cd lwlib && chmod u+w *.[ch] Makefile.in.in) - (cd src && $(MAKE) $(MFLAGS) relock) - -.PHONY: TAGS tags check dist - -TAGS tags: - @echo "If you don't have a copy of etags around, then do 'make lib-src' first." - @PATH=`pwd`/lib-src:$$PATH ; echo "Using etags from `which etags`." - PATH=`pwd`/lib-src:$$PATH ; cd ${srcdir} ; \ - etags --regex='| /[ ]*DEFVAR_[A-Z_ (]+"\([^\"]+\)"/|' src/*.[ch] ; \ - for d in `find lisp -name SCCS -prune -o -name RCS -prune -o -type d -print` ; do (cd $$d ; if [ "`echo *.el`" != "*.el" ] ; then etags -a -o ${srcdir}/TAGS *.el ; fi ) ; done ; \ - etags -a lwlib/*.[ch] - -check: - @echo "We don't have any tests for XEmacs yet." - -dist: - cd ${srcdir} && make-dist - -.PHONY: info dvi -force-info: -info: force-info - (cd ${srcdir}/man && $(MAKE) $(MFLAGS) info) - -dvi: - (cd ${srcdir}/man && $(MAKE) $(MFLAGS) dvi)
--- a/config.status Mon Aug 13 08:45:53 2007 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,641 +0,0 @@ -#!/bin/sh -# Generated automatically by configure. -# Run this file to recreate the current configuration. -# This directory was configured as follows, -# on host deanna.miranova.com: -# -# ./configure --site-includes=/usr/i486-linuxaout/include /m/xpm-3.4h/lib --site-libraries=/usr/i486-linuxaout /lib-aout /m/xpm-3.4h/lib --with-sound=native --with-database=dbm --cflags=-bi486-linuxaout -O4 -m486 -malign-functions=2 -malign-jumps=2 -malign-loops=2 - -ac_cs_usage="Usage: config.status [--recheck] [--version] [--help]" -for ac_option -do - case "$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo running ${CONFIG_SHELL-/bin/sh} ./configure --site-includes=/usr/i486-linuxaout/include /m/xpm-3.4h/lib --site-libraries=/usr/i486-linuxaout /lib-aout /m/xpm-3.4h/lib --with-sound=native --with-database=dbm --cflags=-bi486-linuxaout -O4 -m486 -malign-functions=2 -malign-jumps=2 -malign-loops=2 --no-create - exec ${CONFIG_SHELL-/bin/sh} ./configure --site-includes=/usr/i486-linuxaout/include /m/xpm-3.4h/lib --site-libraries=/usr/i486-linuxaout /lib-aout /m/xpm-3.4h/lib --with-sound=native --with-database=dbm --cflags=-bi486-linuxaout -O4 -m486 -malign-functions=2 -malign-jumps=2 -malign-loops=2 --no-create ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "config.status generated by autoconf version 1.11" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "$ac_cs_usage"; exit 0 ;; - *) echo "$ac_cs_usage"; exit 1 ;; - esac -done - -trap 'rm -fr Makefile lib-src/Makefile.in man/Makefile.in src/Makefile.in lwlib/Makefile.in dynodump/Makefile.in src/config.h conftest*; exit 1' 1 2 15 -LN_S='ln -s' -CC='gcc' -CPP='gcc -E -I/usr/i486-linuxaout/include -I/m/xpm-3.4h/lib -I/usr/X11R6/include' -RANLIB='ranlib' -INSTALL='/usr/bin/install -c' -INSTALL_PROGRAM='${INSTALL}' -INSTALL_DATA='${INSTALL} -m 644' -YACC='bison -y' -SET_MAKE='' -ALLOCA='' -version='19.14' -configuration='i486-unknown-linux2.0.0' -canonical='i486-unknown-linux2.0.0' -srcdir='/m/xemacs-19.14' -prefix='/usr/local' -exec_prefix='${prefix}' -bindir='${exec_prefix}/bin' -datadir='${prefix}/lib' -statedir='${prefix}/lib' -libdir='${exec_prefix}/lib' -mandir='${prefix}/man/man1' -infodir='${prefix}/lib/xemacs-${version}/info' -infodir_user_defined='no' -lispdir='${datadir}/xemacs-${version}/lisp' -lispdir_user_defined='no' -sitelispdir='${datadir}/xemacs/site-lisp' -etcdir='${datadir}/xemacs-${version}/etc' -etcdir_user_defined='no' -lockdir='${statedir}/xemacs/lock' -lockdir_user_defined='no' -archlibdir='${libdir}/xemacs-${version}/${configuration}' -archlibdir_user_defined='no' -docdir='' -bitmapdir='' -c_switch_system=' -DFUNCPROTO=11 -DNARROWPROTO -D_BSD_SOURCE ' -c_switch_machine=' ' -libsrc_libs=' -lgcc -lc -lgcc /usr/lib/crtn.o ' -LD_SWITCH_X_SITE='-L/usr/X11R6/lib' -LD_SWITCH_X_SITE_AUX='' -C_SWITCH_X_SITE='-I/usr/X11R6/include' -LD_SWITCH_SITE=' -L/usr/i486-linuxaout -L/lib-aout -L/m/xpm-3.4h/lib' -C_SWITCH_SITE=' -I/usr/i486-linuxaout/include -I/m/xpm-3.4h/lib' -CFLAGS='-bi486-linuxaout -O4 -m486 -malign-functions=2 -malign-jumps=2 -malign-loops=2' -native_sound_lib='' -machfile='m/intel386.h' -opsysfile='s/linux.h' -dynodump_arch='' -internal_makefile_list='Makefile lib-src/Makefile.in man/Makefile.in src/Makefile.in lwlib/Makefile.in dynodump/Makefile.in' -LIBS=' -lX11 -L/usr/i486-linuxaout -L/lib-aout -L/m/xpm-3.4h/lib -lgcc -lc -lgcc /usr/lib/crtn.o -lm' -top_srcdir='' -ac_prsub='s%^prefix\([ ]*\)=\([ ]*\).*$%prefix\1=\2/usr/local% -s%^exec_prefix\([ ]*\)=\([ ]*\).*$%exec_prefix\1=\2${prefix}%' -ac_vpsub='' -extrasub='' - -ac_given_srcdir=$srcdir - -CONFIG_FILES=${CONFIG_FILES-"$internal_makefile_list"} -for ac_file in .. ${CONFIG_FILES}; do if test "x$ac_file" != x..; then - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/$ac_dir" - else - ac_dir_suffix= - fi - - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dir_suffix"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - - echo creating "$ac_file" - rm -f "$ac_file" - comment_str="Generated automatically from `echo $ac_file|sed 's|.*/||'`.in by configure." - case "$ac_file" in - *.c | *.h | *.C | *.cc | *.m ) echo "/* $comment_str */" > "$ac_file" ;; - * ) echo "# $comment_str" > "$ac_file" ;; - esac - sed -e " -$ac_prsub -$ac_vpsub -$extrasub -s%@LN_S@%$LN_S%g -s%@CC@%$CC%g -s%@CPP@%$CPP%g -s%@RANLIB@%$RANLIB%g -s%@INSTALL@%$INSTALL%g -s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g -s%@INSTALL_DATA@%$INSTALL_DATA%g -s%@YACC@%$YACC%g -s%@SET_MAKE@%$SET_MAKE%g -s%@ALLOCA@%$ALLOCA%g -s%@version@%$version%g -s%@configuration@%$configuration%g -s%@canonical@%$canonical%g -s%@srcdir@%$srcdir%g -s%@prefix@%$prefix%g -s%@exec_prefix@%$exec_prefix%g -s%@bindir@%$bindir%g -s%@datadir@%$datadir%g -s%@statedir@%$statedir%g -s%@libdir@%$libdir%g -s%@mandir@%$mandir%g -s%@infodir@%$infodir%g -s%@infodir_user_defined@%$infodir_user_defined%g -s%@lispdir@%$lispdir%g -s%@lispdir_user_defined@%$lispdir_user_defined%g -s%@sitelispdir@%$sitelispdir%g -s%@etcdir@%$etcdir%g -s%@etcdir_user_defined@%$etcdir_user_defined%g -s%@lockdir@%$lockdir%g -s%@lockdir_user_defined@%$lockdir_user_defined%g -s%@archlibdir@%$archlibdir%g -s%@archlibdir_user_defined@%$archlibdir_user_defined%g -s%@docdir@%$docdir%g -s%@bitmapdir@%$bitmapdir%g -s%@c_switch_system@%$c_switch_system%g -s%@c_switch_machine@%$c_switch_machine%g -s%@libsrc_libs@%$libsrc_libs%g -s%@LD_SWITCH_X_SITE@%$LD_SWITCH_X_SITE%g -s%@LD_SWITCH_X_SITE_AUX@%$LD_SWITCH_X_SITE_AUX%g -s%@C_SWITCH_X_SITE@%$C_SWITCH_X_SITE%g -s%@LD_SWITCH_SITE@%$LD_SWITCH_SITE%g -s%@C_SWITCH_SITE@%$C_SWITCH_SITE%g -s%@CFLAGS@%$CFLAGS%g -s%@native_sound_lib@%$native_sound_lib%g -s%@machfile@%$machfile%g -s%@opsysfile@%$opsysfile%g -s%@dynodump_arch@%$dynodump_arch%g -s%@internal_makefile_list@%$internal_makefile_list%g -s%@LIBS@%$LIBS%g -s%@top_srcdir@%$top_srcdir%g -s%@DEFS@%-DHAVE_CONFIG_H%" $ac_given_srcdir/${ac_file}.in >> $ac_file -fi; done - -# These sed commands are put into ac_sed_defs when defining a macro. -# They are broken into pieces to make the sed script easier to manage. -# They are passed to sed as "A NAME B NAME C VALUE D", where NAME -# is the cpp macro being defined and VALUE is the value it is being given. -# Each defining turns into a single global substitution command. -# Hopefully no one uses "!" as a variable value. -# Other candidates for the sed separators, like , and @, do get used. -# -# ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s!^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='\([ ][ ]*\)[^ ]*!\1#\2' -ac_dC='\3' -ac_dD='!g' -# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". -ac_uA='s!^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='\([ ]\)!\1#\2define\3' -ac_uC=' ' -ac_uD='\4!g' -# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_eA='s!^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_eB='$!\1#\2define\3' -ac_eC=' ' -ac_eD='!g' -rm -f conftest.sed -cat >> conftest.sed <<CONFEOF -${ac_dA}HAVE_SYS_TIMEB_H${ac_dB}HAVE_SYS_TIMEB_H${ac_dC}1${ac_dD} -${ac_uA}HAVE_SYS_TIMEB_H${ac_uB}HAVE_SYS_TIMEB_H${ac_uC}1${ac_uD} -${ac_eA}HAVE_SYS_TIMEB_H${ac_eB}HAVE_SYS_TIMEB_H${ac_eC}1${ac_eD} -${ac_dA}HAVE_SYS_TIME_H${ac_dB}HAVE_SYS_TIME_H${ac_dC}1${ac_dD} -${ac_uA}HAVE_SYS_TIME_H${ac_uB}HAVE_SYS_TIME_H${ac_uC}1${ac_uD} -${ac_eA}HAVE_SYS_TIME_H${ac_eB}HAVE_SYS_TIME_H${ac_eC}1${ac_eD} -${ac_dA}HAVE_UNISTD_H${ac_dB}HAVE_UNISTD_H${ac_dC}1${ac_dD} -${ac_uA}HAVE_UNISTD_H${ac_uB}HAVE_UNISTD_H${ac_uC}1${ac_uD} -${ac_eA}HAVE_UNISTD_H${ac_eB}HAVE_UNISTD_H${ac_eC}1${ac_eD} -CONFEOF -cat >> conftest.sed <<CONFEOF -${ac_dA}HAVE_UTIME_H${ac_dB}HAVE_UTIME_H${ac_dC}1${ac_dD} -${ac_uA}HAVE_UTIME_H${ac_uB}HAVE_UTIME_H${ac_uC}1${ac_uD} -${ac_eA}HAVE_UTIME_H${ac_eB}HAVE_UTIME_H${ac_eC}1${ac_eD} -${ac_dA}HAVE_SYS_WAIT_H${ac_dB}HAVE_SYS_WAIT_H${ac_dC}1${ac_dD} -${ac_uA}HAVE_SYS_WAIT_H${ac_uB}HAVE_SYS_WAIT_H${ac_uC}1${ac_uD} -${ac_eA}HAVE_SYS_WAIT_H${ac_eB}HAVE_SYS_WAIT_H${ac_eC}1${ac_eD} -${ac_dA}HAVE_LIBINTL_H${ac_dB}HAVE_LIBINTL_H${ac_dC}1${ac_dD} -${ac_uA}HAVE_LIBINTL_H${ac_uB}HAVE_LIBINTL_H${ac_uC}1${ac_uD} -${ac_eA}HAVE_LIBINTL_H${ac_eB}HAVE_LIBINTL_H${ac_eC}1${ac_eD} -CONFEOF -cat >> conftest.sed <<CONFEOF -${ac_dA}HAVE_LOCALE_H${ac_dB}HAVE_LOCALE_H${ac_dC}1${ac_dD} -${ac_uA}HAVE_LOCALE_H${ac_uB}HAVE_LOCALE_H${ac_uC}1${ac_uD} -${ac_eA}HAVE_LOCALE_H${ac_eB}HAVE_LOCALE_H${ac_eC}1${ac_eD} -${ac_dA}HAVE_LINUX_VERSION_H${ac_dB}HAVE_LINUX_VERSION_H${ac_dC}1${ac_dD} -${ac_uA}HAVE_LINUX_VERSION_H${ac_uB}HAVE_LINUX_VERSION_H${ac_uC}1${ac_uD} -${ac_eA}HAVE_LINUX_VERSION_H${ac_eB}HAVE_LINUX_VERSION_H${ac_eC}1${ac_eD} -${ac_dA}STDC_HEADERS${ac_dB}STDC_HEADERS${ac_dC}1${ac_dD} -${ac_uA}STDC_HEADERS${ac_uB}STDC_HEADERS${ac_uC}1${ac_uD} -${ac_eA}STDC_HEADERS${ac_eB}STDC_HEADERS${ac_eC}1${ac_eD} -CONFEOF -cat >> conftest.sed <<CONFEOF -${ac_dA}TIME_WITH_SYS_TIME${ac_dB}TIME_WITH_SYS_TIME${ac_dC}1${ac_dD} -${ac_uA}TIME_WITH_SYS_TIME${ac_uB}TIME_WITH_SYS_TIME${ac_uC}1${ac_uD} -${ac_eA}TIME_WITH_SYS_TIME${ac_eB}TIME_WITH_SYS_TIME${ac_eC}1${ac_eD} -${ac_dA}SYS_SIGLIST_DECLARED${ac_dB}SYS_SIGLIST_DECLARED${ac_dC}1${ac_dD} -${ac_uA}SYS_SIGLIST_DECLARED${ac_uB}SYS_SIGLIST_DECLARED${ac_uC}1${ac_uD} -${ac_eA}SYS_SIGLIST_DECLARED${ac_eB}SYS_SIGLIST_DECLARED${ac_eC}1${ac_eD} -${ac_dA}HAVE_STRUCT_UTIMBUF${ac_dB}HAVE_STRUCT_UTIMBUF${ac_dC}1${ac_dD} -${ac_uA}HAVE_STRUCT_UTIMBUF${ac_uB}HAVE_STRUCT_UTIMBUF${ac_uC}1${ac_uD} -${ac_eA}HAVE_STRUCT_UTIMBUF${ac_eB}HAVE_STRUCT_UTIMBUF${ac_eC}1${ac_eD} -CONFEOF -cat >> conftest.sed <<CONFEOF -${ac_dA}RETSIGTYPE${ac_dB}RETSIGTYPE${ac_dC}void${ac_dD} -${ac_uA}RETSIGTYPE${ac_uB}RETSIGTYPE${ac_uC}void${ac_uD} -${ac_eA}RETSIGTYPE${ac_eB}RETSIGTYPE${ac_eC}void${ac_eD} -${ac_dA}HAVE_TIMEVAL${ac_dB}HAVE_TIMEVAL${ac_dC}1${ac_dD} -${ac_uA}HAVE_TIMEVAL${ac_uB}HAVE_TIMEVAL${ac_uC}1${ac_uD} -${ac_eA}HAVE_TIMEVAL${ac_eB}HAVE_TIMEVAL${ac_eC}1${ac_eD} -${ac_dA}HAVE_TZNAME${ac_dB}HAVE_TZNAME${ac_dC}1${ac_dD} -${ac_uA}HAVE_TZNAME${ac_uB}HAVE_TZNAME${ac_uC}1${ac_uD} -${ac_eA}HAVE_TZNAME${ac_eB}HAVE_TZNAME${ac_eC}1${ac_eD} -CONFEOF -cat >> conftest.sed <<CONFEOF -${ac_dA}HAVE_LONG_FILE_NAMES${ac_dB}HAVE_LONG_FILE_NAMES${ac_dC}1${ac_dD} -${ac_uA}HAVE_LONG_FILE_NAMES${ac_uB}HAVE_LONG_FILE_NAMES${ac_uC}1${ac_uD} -${ac_eA}HAVE_LONG_FILE_NAMES${ac_eB}HAVE_LONG_FILE_NAMES${ac_eC}1${ac_eD} -${ac_dA}HAVE_PTHREADS${ac_dB}HAVE_PTHREADS${ac_dC}1${ac_dD} -${ac_uA}HAVE_PTHREADS${ac_uB}HAVE_PTHREADS${ac_uC}1${ac_uD} -${ac_eA}HAVE_PTHREADS${ac_eB}HAVE_PTHREADS${ac_eC}1${ac_eD} -${ac_dA}HAVE_XAUTH${ac_dB}HAVE_XAUTH${ac_dC}1${ac_dD} -${ac_uA}HAVE_XAUTH${ac_uB}HAVE_XAUTH${ac_uC}1${ac_uD} -${ac_eA}HAVE_XAUTH${ac_eB}HAVE_XAUTH${ac_eC}1${ac_eD} -CONFEOF -cat >> conftest.sed <<CONFEOF -${ac_dA}HAVE_XLOCALE_H${ac_dB}HAVE_XLOCALE_H${ac_dC}1${ac_dD} -${ac_uA}HAVE_XLOCALE_H${ac_uB}HAVE_XLOCALE_H${ac_uC}1${ac_uD} -${ac_eA}HAVE_XLOCALE_H${ac_eB}HAVE_XLOCALE_H${ac_eC}1${ac_eD} -${ac_dA}THIS_IS_X11R6${ac_dB}THIS_IS_X11R6${ac_dC}1${ac_dD} -${ac_uA}THIS_IS_X11R6${ac_uB}THIS_IS_X11R6${ac_uC}1${ac_uD} -${ac_eA}THIS_IS_X11R6${ac_eB}THIS_IS_X11R6${ac_eC}1${ac_eD} -${ac_dA}HAVE_X11_XLOCALE_H${ac_dB}HAVE_X11_XLOCALE_H${ac_dC}1${ac_dD} -${ac_uA}HAVE_X11_XLOCALE_H${ac_uB}HAVE_X11_XLOCALE_H${ac_uC}1${ac_uD} -${ac_eA}HAVE_X11_XLOCALE_H${ac_eB}HAVE_X11_XLOCALE_H${ac_eC}1${ac_eD} -CONFEOF -cat >> conftest.sed <<CONFEOF -${ac_dA}HAVE_LIBM${ac_dB}HAVE_LIBM${ac_dC}1${ac_dD} -${ac_uA}HAVE_LIBM${ac_uB}HAVE_LIBM${ac_uC}1${ac_uD} -${ac_eA}HAVE_LIBM${ac_eB}HAVE_LIBM${ac_eC}1${ac_eD} -${ac_dA}HAVE_XPM${ac_dB}HAVE_XPM${ac_dC}1${ac_dD} -${ac_uA}HAVE_XPM${ac_uB}HAVE_XPM${ac_uC}1${ac_uD} -${ac_eA}HAVE_XPM${ac_eB}HAVE_XPM${ac_eC}1${ac_eD} -${ac_dA}HAVE_XMU${ac_dB}HAVE_XMU${ac_dC}1${ac_dD} -${ac_uA}HAVE_XMU${ac_uB}HAVE_XMU${ac_uC}1${ac_uD} -${ac_eA}HAVE_XMU${ac_eB}HAVE_XMU${ac_eC}1${ac_eD} -CONFEOF -cat >> conftest.sed <<CONFEOF -${ac_dA}HAVE_XFACE${ac_dB}HAVE_XFACE${ac_dC}1${ac_dD} -${ac_uA}HAVE_XFACE${ac_uB}HAVE_XFACE${ac_uC}1${ac_uD} -${ac_eA}HAVE_XFACE${ac_eB}HAVE_XFACE${ac_eC}1${ac_eD} -${ac_dA}HAVE_GIF${ac_dB}HAVE_GIF${ac_dC}1${ac_dD} -${ac_uA}HAVE_GIF${ac_uB}HAVE_GIF${ac_uC}1${ac_uD} -${ac_eA}HAVE_GIF${ac_eB}HAVE_GIF${ac_eC}1${ac_eD} -${ac_dA}HAVE_JPEG${ac_dB}HAVE_JPEG${ac_dC}1${ac_dD} -${ac_uA}HAVE_JPEG${ac_uB}HAVE_JPEG${ac_uC}1${ac_uD} -${ac_eA}HAVE_JPEG${ac_eB}HAVE_JPEG${ac_eC}1${ac_eD} -CONFEOF -cat >> conftest.sed <<CONFEOF -${ac_dA}HAVE_PNG${ac_dB}HAVE_PNG${ac_dC}1${ac_dD} -${ac_uA}HAVE_PNG${ac_uB}HAVE_PNG${ac_uC}1${ac_uD} -${ac_eA}HAVE_PNG${ac_eB}HAVE_PNG${ac_eC}1${ac_eD} -${ac_dA}HAVE_H_ERRNO${ac_dB}HAVE_H_ERRNO${ac_dC}1${ac_dD} -${ac_uA}HAVE_H_ERRNO${ac_uB}HAVE_H_ERRNO${ac_uC}1${ac_uD} -${ac_eA}HAVE_H_ERRNO${ac_eB}HAVE_H_ERRNO${ac_eC}1${ac_eD} -${ac_dA}HAVE_SIGSETJMP${ac_dB}HAVE_SIGSETJMP${ac_dC}1${ac_dD} -${ac_uA}HAVE_SIGSETJMP${ac_uB}HAVE_SIGSETJMP${ac_uC}1${ac_uD} -${ac_eA}HAVE_SIGSETJMP${ac_eB}HAVE_SIGSETJMP${ac_eC}1${ac_eD} -CONFEOF -cat >> conftest.sed <<CONFEOF -${ac_dA}LOCALTIME_CACHE${ac_dB}LOCALTIME_CACHE${ac_dC}1${ac_dD} -${ac_uA}LOCALTIME_CACHE${ac_uB}LOCALTIME_CACHE${ac_uC}1${ac_uD} -${ac_eA}LOCALTIME_CACHE${ac_eB}LOCALTIME_CACHE${ac_eC}1${ac_eD} -${ac_dA}HAVE_INLINE${ac_dB}HAVE_INLINE${ac_dC}1${ac_dD} -${ac_uA}HAVE_INLINE${ac_uB}HAVE_INLINE${ac_uC}1${ac_uD} -${ac_eA}HAVE_INLINE${ac_eB}HAVE_INLINE${ac_eC}1${ac_eD} -${ac_dA}HAVE_ALLOCA_H${ac_dB}HAVE_ALLOCA_H${ac_dC}1${ac_dD} -${ac_uA}HAVE_ALLOCA_H${ac_uB}HAVE_ALLOCA_H${ac_uC}1${ac_uD} -${ac_eA}HAVE_ALLOCA_H${ac_eB}HAVE_ALLOCA_H${ac_eC}1${ac_eD} -CONFEOF -cat >> conftest.sed <<CONFEOF -${ac_dA}HAVE_ALLOCA${ac_dB}HAVE_ALLOCA${ac_dC}1${ac_dD} -${ac_uA}HAVE_ALLOCA${ac_uB}HAVE_ALLOCA${ac_uC}1${ac_uD} -${ac_eA}HAVE_ALLOCA${ac_eB}HAVE_ALLOCA${ac_eC}1${ac_eD} -${ac_dA}HAVE_STRCOLL${ac_dB}HAVE_STRCOLL${ac_dC}1${ac_dD} -${ac_uA}HAVE_STRCOLL${ac_uB}HAVE_STRCOLL${ac_uC}1${ac_uD} -${ac_eA}HAVE_STRCOLL${ac_eB}HAVE_STRCOLL${ac_eC}1${ac_eD} -${ac_dA}SIZEOF_SHORT${ac_dB}SIZEOF_SHORT${ac_dC}2${ac_dD} -${ac_uA}SIZEOF_SHORT${ac_uB}SIZEOF_SHORT${ac_uC}2${ac_uD} -${ac_eA}SIZEOF_SHORT${ac_eB}SIZEOF_SHORT${ac_eC}2${ac_eD} -CONFEOF -cat >> conftest.sed <<CONFEOF -${ac_dA}SIZEOF_INT${ac_dB}SIZEOF_INT${ac_dC}4${ac_dD} -${ac_uA}SIZEOF_INT${ac_uB}SIZEOF_INT${ac_uC}4${ac_uD} -${ac_eA}SIZEOF_INT${ac_eB}SIZEOF_INT${ac_eC}4${ac_eD} -${ac_dA}SIZEOF_LONG${ac_dB}SIZEOF_LONG${ac_dC}4${ac_dD} -${ac_uA}SIZEOF_LONG${ac_uB}SIZEOF_LONG${ac_uC}4${ac_uD} -${ac_eA}SIZEOF_LONG${ac_eB}SIZEOF_LONG${ac_eC}4${ac_eD} -${ac_dA}HAVE_ACOSH${ac_dB}HAVE_ACOSH${ac_dC}1${ac_dD} -${ac_uA}HAVE_ACOSH${ac_uB}HAVE_ACOSH${ac_uC}1${ac_uD} -${ac_eA}HAVE_ACOSH${ac_eB}HAVE_ACOSH${ac_eC}1${ac_eD} -CONFEOF -cat >> conftest.sed <<CONFEOF -${ac_dA}HAVE_ASINH${ac_dB}HAVE_ASINH${ac_dC}1${ac_dD} -${ac_uA}HAVE_ASINH${ac_uB}HAVE_ASINH${ac_uC}1${ac_uD} -${ac_eA}HAVE_ASINH${ac_eB}HAVE_ASINH${ac_eC}1${ac_eD} -${ac_dA}HAVE_ATANH${ac_dB}HAVE_ATANH${ac_dC}1${ac_dD} -${ac_uA}HAVE_ATANH${ac_uB}HAVE_ATANH${ac_uC}1${ac_uD} -${ac_eA}HAVE_ATANH${ac_eB}HAVE_ATANH${ac_eC}1${ac_eD} -${ac_dA}HAVE_CBRT${ac_dB}HAVE_CBRT${ac_dC}1${ac_dD} -${ac_uA}HAVE_CBRT${ac_uB}HAVE_CBRT${ac_uC}1${ac_uD} -${ac_eA}HAVE_CBRT${ac_eB}HAVE_CBRT${ac_eC}1${ac_eD} -CONFEOF -cat >> conftest.sed <<CONFEOF -${ac_dA}HAVE_CLOSEDIR${ac_dB}HAVE_CLOSEDIR${ac_dC}1${ac_dD} -${ac_uA}HAVE_CLOSEDIR${ac_uB}HAVE_CLOSEDIR${ac_uC}1${ac_uD} -${ac_eA}HAVE_CLOSEDIR${ac_eB}HAVE_CLOSEDIR${ac_eC}1${ac_eD} -${ac_dA}HAVE_DUP2${ac_dB}HAVE_DUP2${ac_dC}1${ac_dD} -${ac_uA}HAVE_DUP2${ac_uB}HAVE_DUP2${ac_uC}1${ac_uD} -${ac_eA}HAVE_DUP2${ac_eB}HAVE_DUP2${ac_eC}1${ac_eD} -${ac_dA}HAVE_FMOD${ac_dB}HAVE_FMOD${ac_dC}1${ac_dD} -${ac_uA}HAVE_FMOD${ac_uB}HAVE_FMOD${ac_uC}1${ac_uD} -${ac_eA}HAVE_FMOD${ac_eB}HAVE_FMOD${ac_eC}1${ac_eD} -CONFEOF -cat >> conftest.sed <<CONFEOF -${ac_dA}HAVE_FPATHCONF${ac_dB}HAVE_FPATHCONF${ac_dC}1${ac_dD} -${ac_uA}HAVE_FPATHCONF${ac_uB}HAVE_FPATHCONF${ac_uC}1${ac_uD} -${ac_eA}HAVE_FPATHCONF${ac_eB}HAVE_FPATHCONF${ac_eC}1${ac_eD} -${ac_dA}HAVE_FREXP${ac_dB}HAVE_FREXP${ac_dC}1${ac_dD} -${ac_uA}HAVE_FREXP${ac_uB}HAVE_FREXP${ac_uC}1${ac_uD} -${ac_eA}HAVE_FREXP${ac_eB}HAVE_FREXP${ac_eC}1${ac_eD} -${ac_dA}HAVE_FTIME${ac_dB}HAVE_FTIME${ac_dC}1${ac_dD} -${ac_uA}HAVE_FTIME${ac_uB}HAVE_FTIME${ac_uC}1${ac_uD} -${ac_eA}HAVE_FTIME${ac_eB}HAVE_FTIME${ac_eC}1${ac_eD} -CONFEOF -cat >> conftest.sed <<CONFEOF -${ac_dA}HAVE_GETHOSTNAME${ac_dB}HAVE_GETHOSTNAME${ac_dC}1${ac_dD} -${ac_uA}HAVE_GETHOSTNAME${ac_uB}HAVE_GETHOSTNAME${ac_uC}1${ac_uD} -${ac_eA}HAVE_GETHOSTNAME${ac_eB}HAVE_GETHOSTNAME${ac_eC}1${ac_eD} -${ac_dA}HAVE_GETPAGESIZE${ac_dB}HAVE_GETPAGESIZE${ac_dC}1${ac_dD} -${ac_uA}HAVE_GETPAGESIZE${ac_uB}HAVE_GETPAGESIZE${ac_uC}1${ac_uD} -${ac_eA}HAVE_GETPAGESIZE${ac_eB}HAVE_GETPAGESIZE${ac_eC}1${ac_eD} -${ac_dA}HAVE_GETTIMEOFDAY${ac_dB}HAVE_GETTIMEOFDAY${ac_dC}1${ac_dD} -${ac_uA}HAVE_GETTIMEOFDAY${ac_uB}HAVE_GETTIMEOFDAY${ac_uC}1${ac_uD} -${ac_eA}HAVE_GETTIMEOFDAY${ac_eB}HAVE_GETTIMEOFDAY${ac_eC}1${ac_eD} -CONFEOF -cat >> conftest.sed <<CONFEOF -${ac_dA}HAVE_GETWD${ac_dB}HAVE_GETWD${ac_dC}1${ac_dD} -${ac_uA}HAVE_GETWD${ac_uB}HAVE_GETWD${ac_uC}1${ac_uD} -${ac_eA}HAVE_GETWD${ac_eB}HAVE_GETWD${ac_eC}1${ac_eD} -${ac_dA}HAVE_LRAND48${ac_dB}HAVE_LRAND48${ac_dC}1${ac_dD} -${ac_uA}HAVE_LRAND48${ac_uB}HAVE_LRAND48${ac_uC}1${ac_uD} -${ac_eA}HAVE_LRAND48${ac_eB}HAVE_LRAND48${ac_eC}1${ac_eD} -${ac_dA}HAVE_MKDIR${ac_dB}HAVE_MKDIR${ac_dC}1${ac_dD} -${ac_uA}HAVE_MKDIR${ac_uB}HAVE_MKDIR${ac_uC}1${ac_uD} -${ac_eA}HAVE_MKDIR${ac_eB}HAVE_MKDIR${ac_eC}1${ac_eD} -CONFEOF -cat >> conftest.sed <<CONFEOF -${ac_dA}HAVE_MKTIME${ac_dB}HAVE_MKTIME${ac_dC}1${ac_dD} -${ac_uA}HAVE_MKTIME${ac_uB}HAVE_MKTIME${ac_uC}1${ac_uD} -${ac_eA}HAVE_MKTIME${ac_eB}HAVE_MKTIME${ac_eC}1${ac_eD} -${ac_dA}HAVE_PERROR${ac_dB}HAVE_PERROR${ac_dC}1${ac_dD} -${ac_uA}HAVE_PERROR${ac_uB}HAVE_PERROR${ac_uC}1${ac_uD} -${ac_eA}HAVE_PERROR${ac_eB}HAVE_PERROR${ac_eC}1${ac_eD} -${ac_dA}HAVE_RANDOM${ac_dB}HAVE_RANDOM${ac_dC}1${ac_dD} -${ac_uA}HAVE_RANDOM${ac_uB}HAVE_RANDOM${ac_uC}1${ac_uD} -${ac_eA}HAVE_RANDOM${ac_eB}HAVE_RANDOM${ac_eC}1${ac_eD} -CONFEOF -cat >> conftest.sed <<CONFEOF -${ac_dA}HAVE_REALPATH${ac_dB}HAVE_REALPATH${ac_dC}1${ac_dD} -${ac_uA}HAVE_REALPATH${ac_uB}HAVE_REALPATH${ac_uC}1${ac_uD} -${ac_eA}HAVE_REALPATH${ac_eB}HAVE_REALPATH${ac_eC}1${ac_eD} -${ac_dA}HAVE_RENAME${ac_dB}HAVE_RENAME${ac_dC}1${ac_dD} -${ac_uA}HAVE_RENAME${ac_uB}HAVE_RENAME${ac_uC}1${ac_uD} -${ac_eA}HAVE_RENAME${ac_eB}HAVE_RENAME${ac_eC}1${ac_eD} -${ac_dA}HAVE_RES_INIT${ac_dB}HAVE_RES_INIT${ac_dC}1${ac_dD} -${ac_uA}HAVE_RES_INIT${ac_uB}HAVE_RES_INIT${ac_uC}1${ac_uD} -${ac_eA}HAVE_RES_INIT${ac_eB}HAVE_RES_INIT${ac_eC}1${ac_eD} -CONFEOF -cat >> conftest.sed <<CONFEOF -${ac_dA}HAVE_RINT${ac_dB}HAVE_RINT${ac_dC}1${ac_dD} -${ac_uA}HAVE_RINT${ac_uB}HAVE_RINT${ac_uC}1${ac_uD} -${ac_eA}HAVE_RINT${ac_eB}HAVE_RINT${ac_eC}1${ac_eD} -${ac_dA}HAVE_RMDIR${ac_dB}HAVE_RMDIR${ac_dC}1${ac_dD} -${ac_uA}HAVE_RMDIR${ac_uB}HAVE_RMDIR${ac_uC}1${ac_uD} -${ac_eA}HAVE_RMDIR${ac_eB}HAVE_RMDIR${ac_eC}1${ac_eD} -${ac_dA}HAVE_SELECT${ac_dB}HAVE_SELECT${ac_dC}1${ac_dD} -${ac_uA}HAVE_SELECT${ac_uB}HAVE_SELECT${ac_uC}1${ac_uD} -${ac_eA}HAVE_SELECT${ac_eB}HAVE_SELECT${ac_eC}1${ac_eD} -CONFEOF -cat >> conftest.sed <<CONFEOF -${ac_dA}HAVE_SETITIMER${ac_dB}HAVE_SETITIMER${ac_dC}1${ac_dD} -${ac_uA}HAVE_SETITIMER${ac_uB}HAVE_SETITIMER${ac_uC}1${ac_uD} -${ac_eA}HAVE_SETITIMER${ac_eB}HAVE_SETITIMER${ac_eC}1${ac_eD} -${ac_dA}HAVE_SETPGID${ac_dB}HAVE_SETPGID${ac_dC}1${ac_dD} -${ac_uA}HAVE_SETPGID${ac_uB}HAVE_SETPGID${ac_uC}1${ac_uD} -${ac_eA}HAVE_SETPGID${ac_eB}HAVE_SETPGID${ac_eC}1${ac_eD} -${ac_dA}HAVE_SETLOCALE${ac_dB}HAVE_SETLOCALE${ac_dC}1${ac_dD} -${ac_uA}HAVE_SETLOCALE${ac_uB}HAVE_SETLOCALE${ac_uC}1${ac_uD} -${ac_eA}HAVE_SETLOCALE${ac_eB}HAVE_SETLOCALE${ac_eC}1${ac_eD} -CONFEOF -cat >> conftest.sed <<CONFEOF -${ac_dA}HAVE_SETSID${ac_dB}HAVE_SETSID${ac_dC}1${ac_dD} -${ac_uA}HAVE_SETSID${ac_uB}HAVE_SETSID${ac_uC}1${ac_uD} -${ac_eA}HAVE_SETSID${ac_eB}HAVE_SETSID${ac_eC}1${ac_eD} -${ac_dA}HAVE_SIGBLOCK${ac_dB}HAVE_SIGBLOCK${ac_dC}1${ac_dD} -${ac_uA}HAVE_SIGBLOCK${ac_uB}HAVE_SIGBLOCK${ac_uC}1${ac_uD} -${ac_eA}HAVE_SIGBLOCK${ac_eB}HAVE_SIGBLOCK${ac_eC}1${ac_eD} -${ac_dA}HAVE_SIGPROCMASK${ac_dB}HAVE_SIGPROCMASK${ac_dC}1${ac_dD} -${ac_uA}HAVE_SIGPROCMASK${ac_uB}HAVE_SIGPROCMASK${ac_uC}1${ac_uD} -${ac_eA}HAVE_SIGPROCMASK${ac_eB}HAVE_SIGPROCMASK${ac_eC}1${ac_eD} -CONFEOF -cat >> conftest.sed <<CONFEOF -${ac_dA}HAVE_STRCASECMP${ac_dB}HAVE_STRCASECMP${ac_dC}1${ac_dD} -${ac_uA}HAVE_STRCASECMP${ac_uB}HAVE_STRCASECMP${ac_uC}1${ac_uD} -${ac_eA}HAVE_STRCASECMP${ac_eB}HAVE_STRCASECMP${ac_eC}1${ac_eD} -${ac_dA}HAVE_STRERROR${ac_dB}HAVE_STRERROR${ac_dC}1${ac_dD} -${ac_uA}HAVE_STRERROR${ac_uB}HAVE_STRERROR${ac_uC}1${ac_uD} -${ac_eA}HAVE_STRERROR${ac_eB}HAVE_STRERROR${ac_eC}1${ac_eD} -${ac_dA}HAVE_TZSET${ac_dB}HAVE_TZSET${ac_dC}1${ac_dD} -${ac_uA}HAVE_TZSET${ac_uB}HAVE_TZSET${ac_uC}1${ac_uD} -${ac_eA}HAVE_TZSET${ac_eB}HAVE_TZSET${ac_eC}1${ac_eD} -CONFEOF -cat >> conftest.sed <<CONFEOF -${ac_dA}HAVE_UTIMES${ac_dB}HAVE_UTIMES${ac_dC}1${ac_dD} -${ac_uA}HAVE_UTIMES${ac_uB}HAVE_UTIMES${ac_uC}1${ac_uD} -${ac_eA}HAVE_UTIMES${ac_eB}HAVE_UTIMES${ac_eC}1${ac_eD} -${ac_dA}HAVE_WAITPID${ac_dB}HAVE_WAITPID${ac_dC}1${ac_dD} -${ac_uA}HAVE_WAITPID${ac_uB}HAVE_WAITPID${ac_uC}1${ac_uD} -${ac_eA}HAVE_WAITPID${ac_eB}HAVE_WAITPID${ac_eC}1${ac_eD} -${ac_dA}HAVE_MMAP${ac_dB}HAVE_MMAP${ac_dC}1${ac_dD} -${ac_uA}HAVE_MMAP${ac_uB}HAVE_MMAP${ac_uC}1${ac_uD} -${ac_eA}HAVE_MMAP${ac_eB}HAVE_MMAP${ac_eC}1${ac_eD} -CONFEOF -cat >> conftest.sed <<CONFEOF -${ac_dA}HAVE_SOCKETS${ac_dB}HAVE_SOCKETS${ac_dC}1${ac_dD} -${ac_uA}HAVE_SOCKETS${ac_uB}HAVE_SOCKETS${ac_uC}1${ac_uD} -${ac_eA}HAVE_SOCKETS${ac_eB}HAVE_SOCKETS${ac_eC}1${ac_eD} -${ac_dA}SYSV_SYSTEM_DIR${ac_dB}SYSV_SYSTEM_DIR${ac_dC}1${ac_dD} -${ac_uA}SYSV_SYSTEM_DIR${ac_uB}SYSV_SYSTEM_DIR${ac_uC}1${ac_uD} -${ac_eA}SYSV_SYSTEM_DIR${ac_eB}SYSV_SYSTEM_DIR${ac_eC}1${ac_eD} -${ac_dA}HAVE_TERMIOS${ac_dB}HAVE_TERMIOS${ac_dC}1${ac_dD} -${ac_uA}HAVE_TERMIOS${ac_uB}HAVE_TERMIOS${ac_uC}1${ac_uD} -${ac_eA}HAVE_TERMIOS${ac_eB}HAVE_TERMIOS${ac_eC}1${ac_eD} -CONFEOF -cat >> conftest.sed <<CONFEOF -${ac_dA}NLIST_STRUCT${ac_dB}NLIST_STRUCT${ac_dC}1${ac_dD} -${ac_uA}NLIST_STRUCT${ac_uB}NLIST_STRUCT${ac_uC}1${ac_uD} -${ac_eA}NLIST_STRUCT${ac_eB}NLIST_STRUCT${ac_eC}1${ac_eD} -${ac_dA}HAVE_DBM${ac_dB}HAVE_DBM${ac_dC}1${ac_dD} -${ac_uA}HAVE_DBM${ac_uB}HAVE_DBM${ac_uC}1${ac_uD} -${ac_eA}HAVE_DBM${ac_eB}HAVE_DBM${ac_eC}1${ac_eD} -${ac_dA}EMACS_CONFIGURATION${ac_dB}EMACS_CONFIGURATION${ac_dC}"i486-unknown-linux2.0.0"${ac_dD} -${ac_uA}EMACS_CONFIGURATION${ac_uB}EMACS_CONFIGURATION${ac_uC}"i486-unknown-linux2.0.0"${ac_uD} -${ac_eA}EMACS_CONFIGURATION${ac_eB}EMACS_CONFIGURATION${ac_eC}"i486-unknown-linux2.0.0"${ac_eD} -CONFEOF -cat >> conftest.sed <<CONFEOF -${ac_dA}config_machfile${ac_dB}config_machfile${ac_dC}"m/intel386.h"${ac_dD} -${ac_uA}config_machfile${ac_uB}config_machfile${ac_uC}"m/intel386.h"${ac_uD} -${ac_eA}config_machfile${ac_eB}config_machfile${ac_eC}"m/intel386.h"${ac_eD} -${ac_dA}config_opsysfile${ac_dB}config_opsysfile${ac_dC}"s/linux.h"${ac_dD} -${ac_uA}config_opsysfile${ac_uB}config_opsysfile${ac_uC}"s/linux.h"${ac_uD} -${ac_eA}config_opsysfile${ac_eB}config_opsysfile${ac_eC}"s/linux.h"${ac_eD} -${ac_dA}LD_SWITCH_X_SITE${ac_dB}LD_SWITCH_X_SITE${ac_dC}-L/usr/X11R6/lib${ac_dD} -${ac_uA}LD_SWITCH_X_SITE${ac_uB}LD_SWITCH_X_SITE${ac_uC}-L/usr/X11R6/lib${ac_uD} -${ac_eA}LD_SWITCH_X_SITE${ac_eB}LD_SWITCH_X_SITE${ac_eC}-L/usr/X11R6/lib${ac_eD} -CONFEOF -cat >> conftest.sed <<CONFEOF -${ac_dA}LD_SWITCH_X_SITE_AUX${ac_dB}LD_SWITCH_X_SITE_AUX${ac_dC}${ac_dD} -${ac_uA}LD_SWITCH_X_SITE_AUX${ac_uB}LD_SWITCH_X_SITE_AUX${ac_uC}${ac_uD} -${ac_eA}LD_SWITCH_X_SITE_AUX${ac_eB}LD_SWITCH_X_SITE_AUX${ac_eC}${ac_eD} -${ac_dA}C_SWITCH_X_SITE${ac_dB}C_SWITCH_X_SITE${ac_dC}-I/usr/X11R6/include${ac_dD} -${ac_uA}C_SWITCH_X_SITE${ac_uB}C_SWITCH_X_SITE${ac_uC}-I/usr/X11R6/include${ac_uD} -${ac_eA}C_SWITCH_X_SITE${ac_eB}C_SWITCH_X_SITE${ac_eC}-I/usr/X11R6/include${ac_eD} -${ac_dA}LD_SWITCH_SITE${ac_dB}LD_SWITCH_SITE${ac_dC} -L/usr/i486-linuxaout -L/lib-aout -L/m/xpm-3.4h/lib${ac_dD} -${ac_uA}LD_SWITCH_SITE${ac_uB}LD_SWITCH_SITE${ac_uC} -L/usr/i486-linuxaout -L/lib-aout -L/m/xpm-3.4h/lib${ac_uD} -${ac_eA}LD_SWITCH_SITE${ac_eB}LD_SWITCH_SITE${ac_eC} -L/usr/i486-linuxaout -L/lib-aout -L/m/xpm-3.4h/lib${ac_eD} -CONFEOF -cat >> conftest.sed <<CONFEOF -${ac_dA}C_SWITCH_SITE${ac_dB}C_SWITCH_SITE${ac_dC} -I/usr/i486-linuxaout/include -I/m/xpm-3.4h/lib${ac_dD} -${ac_uA}C_SWITCH_SITE${ac_uB}C_SWITCH_SITE${ac_uC} -I/usr/i486-linuxaout/include -I/m/xpm-3.4h/lib${ac_uD} -${ac_eA}C_SWITCH_SITE${ac_eB}C_SWITCH_SITE${ac_eC} -I/usr/i486-linuxaout/include -I/m/xpm-3.4h/lib${ac_eD} -${ac_dA}UNEXEC_SRC${ac_dB}UNEXEC_SRC${ac_dC}unexelf.c${ac_dD} -${ac_uA}UNEXEC_SRC${ac_uB}UNEXEC_SRC${ac_uC}unexelf.c${ac_uD} -${ac_eA}UNEXEC_SRC${ac_eB}UNEXEC_SRC${ac_eC}unexelf.c${ac_eD} -${ac_dA}HAVE_X_WINDOWS${ac_dB}HAVE_X_WINDOWS${ac_dC}1${ac_dD} -${ac_uA}HAVE_X_WINDOWS${ac_uB}HAVE_X_WINDOWS${ac_uC}1${ac_uD} -${ac_eA}HAVE_X_WINDOWS${ac_eB}HAVE_X_WINDOWS${ac_eC}1${ac_eD} -CONFEOF -cat >> conftest.sed <<CONFEOF -${ac_dA}HAVE_XFREE386${ac_dB}HAVE_XFREE386${ac_dC}1${ac_dD} -${ac_uA}HAVE_XFREE386${ac_uB}HAVE_XFREE386${ac_uC}1${ac_uD} -${ac_eA}HAVE_XFREE386${ac_eB}HAVE_XFREE386${ac_eC}1${ac_eD} -${ac_dA}GNU_MALLOC${ac_dB}GNU_MALLOC${ac_dC}1${ac_dD} -${ac_uA}GNU_MALLOC${ac_uB}GNU_MALLOC${ac_uC}1${ac_uD} -${ac_eA}GNU_MALLOC${ac_eB}GNU_MALLOC${ac_eC}1${ac_eD} -${ac_dA}REL_ALLOC${ac_dB}REL_ALLOC${ac_dC}1${ac_dD} -${ac_uA}REL_ALLOC${ac_uB}REL_ALLOC${ac_uC}1${ac_uD} -${ac_eA}REL_ALLOC${ac_eB}REL_ALLOC${ac_eC}1${ac_eD} -CONFEOF -cat >> conftest.sed <<CONFEOF -${ac_dA}LISP_FLOAT_TYPE${ac_dB}LISP_FLOAT_TYPE${ac_dC}1${ac_dD} -${ac_uA}LISP_FLOAT_TYPE${ac_uB}LISP_FLOAT_TYPE${ac_uC}1${ac_uD} -${ac_eA}LISP_FLOAT_TYPE${ac_eB}LISP_FLOAT_TYPE${ac_eC}1${ac_eD} -${ac_dA}LWLIB_MENUBARS_LUCID${ac_dB}LWLIB_MENUBARS_LUCID${ac_dC}1${ac_dD} -${ac_uA}LWLIB_MENUBARS_LUCID${ac_uB}LWLIB_MENUBARS_LUCID${ac_uC}1${ac_uD} -${ac_eA}LWLIB_MENUBARS_LUCID${ac_eB}LWLIB_MENUBARS_LUCID${ac_eC}1${ac_eD} -${ac_dA}HAVE_MENUBARS${ac_dB}HAVE_MENUBARS${ac_dC}1${ac_dD} -${ac_uA}HAVE_MENUBARS${ac_uB}HAVE_MENUBARS${ac_uC}1${ac_uD} -${ac_eA}HAVE_MENUBARS${ac_eB}HAVE_MENUBARS${ac_eC}1${ac_eD} -CONFEOF -cat >> conftest.sed <<CONFEOF -${ac_dA}LWLIB_SCROLLBARS_LUCID${ac_dB}LWLIB_SCROLLBARS_LUCID${ac_dC}1${ac_dD} -${ac_uA}LWLIB_SCROLLBARS_LUCID${ac_uB}LWLIB_SCROLLBARS_LUCID${ac_uC}1${ac_uD} -${ac_eA}LWLIB_SCROLLBARS_LUCID${ac_eB}LWLIB_SCROLLBARS_LUCID${ac_eC}1${ac_eD} -${ac_dA}HAVE_SCROLLBARS${ac_dB}HAVE_SCROLLBARS${ac_dC}1${ac_dD} -${ac_uA}HAVE_SCROLLBARS${ac_uB}HAVE_SCROLLBARS${ac_uC}1${ac_uD} -${ac_eA}HAVE_SCROLLBARS${ac_eB}HAVE_SCROLLBARS${ac_eC}1${ac_eD} -${ac_dA}LWLIB_DIALOGS_ATHENA${ac_dB}LWLIB_DIALOGS_ATHENA${ac_dC}1${ac_dD} -${ac_uA}LWLIB_DIALOGS_ATHENA${ac_uB}LWLIB_DIALOGS_ATHENA${ac_uC}1${ac_uD} -${ac_eA}LWLIB_DIALOGS_ATHENA${ac_eB}LWLIB_DIALOGS_ATHENA${ac_eC}1${ac_eD} -CONFEOF -cat >> conftest.sed <<CONFEOF -${ac_dA}HAVE_DIALOGS${ac_dB}HAVE_DIALOGS${ac_dC}1${ac_dD} -${ac_uA}HAVE_DIALOGS${ac_uB}HAVE_DIALOGS${ac_uC}1${ac_uD} -${ac_eA}HAVE_DIALOGS${ac_eB}HAVE_DIALOGS${ac_eC}1${ac_eD} -${ac_dA}HAVE_TOOLBARS${ac_dB}HAVE_TOOLBARS${ac_dC}1${ac_dD} -${ac_uA}HAVE_TOOLBARS${ac_uB}HAVE_TOOLBARS${ac_uC}1${ac_uD} -${ac_eA}HAVE_TOOLBARS${ac_eB}HAVE_TOOLBARS${ac_eC}1${ac_eD} -${ac_dA}HAVE_TTY${ac_dB}HAVE_TTY${ac_dC}1${ac_dD} -${ac_uA}HAVE_TTY${ac_uB}HAVE_TTY${ac_uC}1${ac_uD} -${ac_eA}HAVE_TTY${ac_eB}HAVE_TTY${ac_eC}1${ac_eD} -CONFEOF -cat >> conftest.sed <<CONFEOF -${ac_dA}USE_GCC${ac_dB}USE_GCC${ac_dC}1${ac_dD} -${ac_uA}USE_GCC${ac_uB}USE_GCC${ac_uC}1${ac_uD} -${ac_eA}USE_GCC${ac_eB}USE_GCC${ac_eC}1${ac_eD} -${ac_dA}HAVE_NATIVE_SOUND${ac_dB}HAVE_NATIVE_SOUND${ac_dC}1${ac_dD} -${ac_uA}HAVE_NATIVE_SOUND${ac_uB}HAVE_NATIVE_SOUND${ac_uC}1${ac_uD} -${ac_eA}HAVE_NATIVE_SOUND${ac_eB}HAVE_NATIVE_SOUND${ac_eC}1${ac_eD} -${ac_dA}CONST_IS_LOSING${ac_dB}CONST_IS_LOSING${ac_dC}1${ac_dD} -${ac_uA}CONST_IS_LOSING${ac_uB}CONST_IS_LOSING${ac_uC}1${ac_uD} -${ac_eA}CONST_IS_LOSING${ac_eB}CONST_IS_LOSING${ac_eC}1${ac_eD} -CONFEOF -cat >> conftest.sed <<CONFEOF -${ac_dA}USE_ASSERTIONS${ac_dB}USE_ASSERTIONS${ac_dC}1${ac_dD} -${ac_uA}USE_ASSERTIONS${ac_uB}USE_ASSERTIONS${ac_uC}1${ac_uD} -${ac_eA}USE_ASSERTIONS${ac_eB}USE_ASSERTIONS${ac_eC}1${ac_eD} -${ac_dA}NO_UNION_TYPE${ac_dB}NO_UNION_TYPE${ac_dC}1${ac_dD} -${ac_uA}NO_UNION_TYPE${ac_uB}NO_UNION_TYPE${ac_uC}1${ac_uD} -${ac_eA}NO_UNION_TYPE${ac_eB}NO_UNION_TYPE${ac_eC}1${ac_eD} - -CONFEOF -# This sed command replaces #undef's with comments. This is necessary, for -# example, in the case of _POSIX_SOURCE, which is predefined and required -# on some systems where configure will not decide to define it in -# src/config.h. -cat >> conftest.sed <<\CONFEOF -s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, -CONFEOF -rm -f conftest.h -# Break up the sed commands because old seds have small limits. -ac_max_sed_lines=20 - -CONFIG_HEADERS=${CONFIG_HEADERS-"src/config.h"} -for ac_file in .. ${CONFIG_HEADERS}; do if test "x$ac_file" != x..; then - echo creating $ac_file - - cp $ac_given_srcdir/$ac_file.in conftest.h1 - cp conftest.sed conftest.stm - while : - do - ac_lines=`grep -c . conftest.stm` - if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi - rm -f conftest.s1 conftest.s2 conftest.h2 - sed ${ac_max_sed_lines}q conftest.stm > conftest.s1 # Like head -20. - sed 1,${ac_max_sed_lines}d conftest.stm > conftest.s2 # Like tail +21. - sed -f conftest.s1 < conftest.h1 > conftest.h2 - rm -f conftest.s1 conftest.h1 conftest.stm - mv conftest.h2 conftest.h1 - mv conftest.s2 conftest.stm - done - rm -f conftest.stm conftest.h - echo "/* $ac_file. Generated automatically by configure. */" > conftest.h - cat conftest.h1 >> conftest.h - rm -f conftest.h1 - if cmp -s $ac_file conftest.h 2>/dev/null; then - # The file exists and we would not be changing it. - echo "$ac_file is unchanged" - rm -f conftest.h - else - rm -f $ac_file - mv conftest.h $ac_file - fi -fi; done -rm -f conftest.sed - - - - -echo "creating src/Makefile"; topsrcdir=/m/xemacs-19.14; ( cd ./src; rm -f junk.c; sed -e 's/^# Generated.*//' -e 's%/\*\*/#.*%%' < Makefile.in > junk.c; eval `echo ${CPP} -I. -I${topsrcdir}/src ${CPPFLAGS} junk.c \>junk.cpp`; < junk.cpp sed -e 's/^#.*//' -e 's/^[ \f\t][ \f\t]*$//' -e 's/^ / /' | sed -n -e '/^..*$/p' > Makefile.new; chmod 444 Makefile.new; mv -f Makefile.new Makefile; rm -f junk.c junk.cpp; ) -echo "creating lwlib/Makefile"; topsrcdir=/m/xemacs-19.14; ( cd ./lwlib; rm -f junk.c; sed -e 's/^# Generated.*//' -e 's%/\*\*/#.*%%' < Makefile.in > junk.c; eval `echo ${CPP} -I. -I${topsrcdir}/src ${CPPFLAGS} junk.c \>junk.cpp`; < junk.cpp sed -e 's/^#.*//' -e 's/^[ \f\t][ \f\t]*$//' -e 's/^ / /' | sed -n -e '/^..*$/p' > Makefile.new; chmod 444 Makefile.new; mv -f Makefile.new Makefile; rm -f junk.c junk.cpp; ) -echo "creating lib-src/Makefile"; topsrcdir=/m/xemacs-19.14; ( cd ./lib-src; rm -f junk.c; sed -e 's/^# Generated.*//' -e 's%/\*\*/#.*%%' < Makefile.in > junk.c; eval `echo ${CPP} -I. -I${topsrcdir}/src ${CPPFLAGS} junk.c \>junk.cpp`; < junk.cpp sed -e 's/^#.*//' -e 's/^[ \f\t][ \f\t]*$//' -e 's/^ / /' | sed -n -e '/^..*$/p' > Makefile.new; chmod 444 Makefile.new; mv -f Makefile.new Makefile; rm -f junk.c junk.cpp; ) -echo "creating dynodump/Makefile"; topsrcdir=/m/xemacs-19.14; ( cd ./dynodump; rm -f junk.c; sed -e 's/^# Generated.*//' -e 's%/\*\*/#.*%%' < Makefile.in > junk.c; eval `echo ${CPP} -I. -I${topsrcdir}/src ${CPPFLAGS} junk.c \>junk.cpp`; < junk.cpp sed -e 's/^#.*//' -e 's/^[ \f\t][ \f\t]*$//' -e 's/^ / /' | sed -n -e '/^..*$/p' > Makefile.new; chmod 444 Makefile.new; mv -f Makefile.new Makefile; rm -f junk.c junk.cpp; ) -echo "creating man/Makefile"; topsrcdir=/m/xemacs-19.14; ( cd ./man; rm -f junk.c; sed -e 's/^# Generated.*//' -e 's%/\*\*/#.*%%' < Makefile.in > junk.c; eval `echo ${CPP} -I. -I${topsrcdir}/src ${CPPFLAGS} junk.c \>junk.cpp`; < junk.cpp sed -e 's/^#.*//' -e 's/^[ \f\t][ \f\t]*$//' -e 's/^ / /' | sed -n -e '/^..*$/p' > Makefile.new; chmod 444 Makefile.new; mv -f Makefile.new Makefile; rm -f junk.c junk.cpp; ) -exit 0
--- a/configure Mon Aug 13 08:45:53 2007 +0200 +++ b/configure Mon Aug 13 08:46:35 2007 +0200 @@ -100,7 +100,7 @@ native_sound_lib='' # make normal error-checking be the default in alpha and beta versions, so # that bugs get noticed. Change this for released versions. -error_check_default='no' +error_check_default='yes' error_check_extents=$error_check_default error_check_typecheck=$error_check_default error_check_bufpos=$error_check_default @@ -211,6 +211,7 @@ Motif dialog boxes will be used if Motif can be found.) --with-cde (*) Compile in support for CDE drag and drop. +--with-offix (*) Compile in support for OffiX drag and drop. --with-xpm (*) Compile with support for XPM files. It is highly recommended that you obtain XPM (version 3.4g or better) if you don't already @@ -625,6 +626,22 @@ eval "${opt}=\"${val}\"" ;; + ## Has the user requested OffiX support? + "with_offix" ) + ## Make sure the value given was either "yes" or "no". + case "${val}" in + y | ye | yes ) val=yes ;; + n | no ) val=no ;; + * ) + (echo "${progname}: the \`--${optname}' option is supposed to have a boolean value. +Set it to either \`yes' or \`no'." + echo "${short_usage}") >&2 + exit 1 + ;; + esac + eval "${opt}=\"${val}\"" + ;; + ## Has the user requested XPM support? "with_xpm" ) ## Make sure the value given was either "yes" or "no". @@ -2135,14 +2152,14 @@ case "${canonical}" in ## The Sun386 didn't get past 4.0. i[3-9]86-*-sunos4 ) opsys=sunos4-0 ;; - *-sunos4.0* ) opsys=sunos4-0 ;; - *-sunos4.1.2* ) opsys=sunos4-1-2 ;; - *-sunos4.1.[3-9]* ) opsys=sunos4-1-3 ;; *-sunos4shr* ) opsys=sunos4-0shr ;; *-sunos4-0shr* ) opsys=sunos4-0shr ;; *-sunos4-1shr* ) opsys=sunos4-1shr ;; *-sunos4-1-2shr* ) opsys=sunos4-1-2shr ;; *-sunos4-1-[3-9]shr* ) opsys=sunos4-1-3shr ;; + *-sunos4.0* ) opsys=sunos4-0 ;; + *-sunos4.1.2* ) opsys=sunos4-1-2 ;; + *-sunos4.1.[3-9]* ) opsys=sunos4-1-3 ;; *-sunos4* | *-sunos ) opsys=sunos4-1 ;; *-solaris2.3* ) opsys=sol2-3 ;; @@ -3557,6 +3574,10 @@ echo "configure: warning: --with-cde ignored: Not valid without X support" >&2 with_menubars='no' fi + if [ "x${with_offix}" != x ]; then + echo "configure: warning: --with-offix ignored: Not valid without X support" >&2 + with_offix='no' + fi if [ "x${with_menubars}" != x ]; then echo "configure: warning: --with-menubars ignored: Not valid without X support" >&2 with_menubars='no' @@ -3574,6 +3595,7 @@ with_toolbars='no' fi with_cde='no' + with_offix='no' with_menubars='no' with_scrollbars='no' with_dialogs='no' @@ -4229,6 +4251,66 @@ fi # +# See if we can find OffiX. +# +if test "${window_system}" != "none" ; then + if test "${with_offix}" != "no" ; then + if test "${with_offix}" != "yes" ; then + internal_offix_lib_found='no' + ac_save_LIBS="${LIBS}" +LIBS="${LIBS} -lDnd" +ac_have_lib="" +test -n "$silent" || echo "checking for -lDnd" +cat > conftest.${ac_ext} <<EOF +#include "confdefs.h" + +int main() { return 0; } +int t() { main();; return 0; } +EOF +if eval $ac_compile; then + rm -rf conftest* + ac_have_lib="1" + +fi +rm -f conftest* +LIBS="${ac_save_LIBS}" +if test -n "${ac_have_lib}"; then + :; internal_offix_lib_found='yes' +else + :; +fi + + if test "${internal_offix_lib_found}" = "yes" ; then + internal_offix_includes_found='no' + for arg in ${DEFS} /usr/include + do + if test -f `echo "${arg}/OffiX/DragAndDrop.h" | sed 's/^\-I//'` ; then + internal_offix_includes_found='yes' + fi + done + if test "${internal_offix_includes_found}" = "yes" ; then + with_offix='yes' + fi + fi + fi + fi +fi +if test "${with_offix}" = "yes" ; then + +{ +test -n "$verbose" && \ +echo " defining HAVE_OFFIX_DND" +echo "#define" HAVE_OFFIX_DND "1" >> confdefs.h +DEFS="$DEFS -DHAVE_OFFIX_DND=1" +ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_OFFIX_DND\${ac_dB}HAVE_OFFIX_DND\${ac_dC}1\${ac_dD} +\${ac_uA}HAVE_OFFIX_DND\${ac_uB}HAVE_OFFIX_DND\${ac_uC}1\${ac_uD} +\${ac_eA}HAVE_OFFIX_DND\${ac_eB}HAVE_OFFIX_DND\${ac_eC}1\${ac_eD} +" +} + +fi + +# # See if we can find Xlocale.h. # with_xlocale_h='no' @@ -8011,6 +8093,9 @@ if [ "$with_cde" = "yes" ]; then echo " Compiling in support for CDE." fi +if [ "$with_offix" = "yes" ]; then + echo " Compiling in support for OffiX." +fi if [ "$with_mocklisp" = "yes" ]; then echo " Compiling in support for Mocklisp." fi
--- a/configure.in Mon Aug 13 08:45:53 2007 +0200 +++ b/configure.in Mon Aug 13 08:46:35 2007 +0200 @@ -115,7 +115,7 @@ native_sound_lib='' # make normal error-checking be the default in alpha and beta versions, so # that bugs get noticed. Change this for released versions. -error_check_default='no' +error_check_default='yes' error_check_extents=$error_check_default error_check_typecheck=$error_check_default error_check_bufpos=$error_check_default @@ -226,6 +226,7 @@ Motif dialog boxes will be used if Motif can be found.) --with-cde (*) Compile in support for CDE drag and drop. +--with-offix (*) Compile in support for OffiX drag and drop. --with-xpm (*) Compile with support for XPM files. It is highly recommended that you obtain XPM (version 3.4g or better) if you don't already @@ -640,6 +641,22 @@ eval "${opt}=\"${val}\"" ;; + ## Has the user requested OffiX support? + "with_offix" ) + ## Make sure the value given was either "yes" or "no". + case "${val}" in + y | ye | yes ) val=yes ;; + n | no ) val=no ;; + * ) + (echo "${progname}: the \`--${optname}' option is supposed to have a boolean value. +Set it to either \`yes' or \`no'." + echo "${short_usage}") >&2 + exit 1 + ;; + esac + eval "${opt}=\"${val}\"" + ;; + ## Has the user requested XPM support? "with_xpm" ) ## Make sure the value given was either "yes" or "no". @@ -2140,14 +2157,14 @@ case "${canonical}" in ## The Sun386 didn't get past 4.0. i[3-9]86-*-sunos4 ) opsys=sunos4-0 ;; - *-sunos4.0* ) opsys=sunos4-0 ;; - *-sunos4.1.2* ) opsys=sunos4-1-2 ;; - *-sunos4.1.[3-9]* ) opsys=sunos4-1-3 ;; *-sunos4shr* ) opsys=sunos4-0shr ;; *-sunos4-0shr* ) opsys=sunos4-0shr ;; *-sunos4-1shr* ) opsys=sunos4-1shr ;; *-sunos4-1-2shr* ) opsys=sunos4-1-2shr ;; *-sunos4-1-[3-9]shr* ) opsys=sunos4-1-3shr ;; + *-sunos4.0* ) opsys=sunos4-0 ;; + *-sunos4.1.2* ) opsys=sunos4-1-2 ;; + *-sunos4.1.[3-9]* ) opsys=sunos4-1-3 ;; *-sunos4* | *-sunos ) opsys=sunos4-1 ;; *-solaris2.3* ) opsys=sol2-3 ;; @@ -2730,6 +2747,10 @@ ] AC_WARN(--with-cde ignored: Not valid without X support) [ with_menubars='no' fi + if [ "x${with_offix}" != x ]; then + ] AC_WARN(--with-offix ignored: Not valid without X support) [ + with_offix='no' + fi if [ "x${with_menubars}" != x ]; then ] AC_WARN(--with-menubars ignored: Not valid without X support) [ with_menubars='no' @@ -2747,6 +2768,7 @@ with_toolbars='no' fi with_cde='no' + with_offix='no' with_menubars='no' with_scrollbars='no' with_dialogs='no' @@ -3197,6 +3219,33 @@ fi # +# See if we can find OffiX. +# +if test "${window_system}" != "none" ; then + if test "${with_offix}" != "no" ; then + if test "${with_offix}" != "yes" ; then + internal_offix_lib_found='no' + AC_HAVE_LIBRARY(-lDnd, internal_offix_lib_found='yes') + if test "${internal_offix_lib_found}" = "yes" ; then + internal_offix_includes_found='no' + for arg in ${DEFS} /usr/include + do + if test -f `echo "${arg}/OffiX/DragAndDrop.h" | sed 's/^\-I//'` ; then + internal_offix_includes_found='yes' + fi + done + if test "${internal_offix_includes_found}" = "yes" ; then + with_offix='yes' + fi + fi + fi + fi +fi +if test "${with_offix}" = "yes" ; then + AC_DEFINE(HAVE_OFFIX_DND) +fi + +# # See if we can find Xlocale.h. # with_xlocale_h='no' @@ -4315,6 +4364,9 @@ if [ "$with_cde" = "yes" ]; then echo " Compiling in support for CDE." fi +if [ "$with_offix" = "yes" ]; then + echo " Compiling in support for OffiX." +fi if [ "$with_mocklisp" = "yes" ]; then echo " Compiling in support for Mocklisp." fi
--- a/dynodump/Makefile Mon Aug 13 08:45:53 2007 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ -SHELL = /bin/sh -CC=gcc -CFLAGS=-bi486-linuxaout -O4 -m486 -malign-functions=2 -malign-jumps=2 -malign-loops=2 -ARCH= -srcdir=/m/xemacs-19.14/dynodump - -VPATH=/m/xemacs-19.14/dynodump -INCLUDES = -I${srcdir} -I${srcdir}/$(ARCH) -ALL_CFLAGS = ${CFLAGS} -fpic ${INCLUDES} -OBJS = _relocate.o dynodump.o syms.o uninit.o -.c.o: - $(CC) -c $(ALL_CFLAGS) $< -all:: -dynodump.so: ${srcdir}/_dynodump.h $(OBJS) - $(CC) -o dynodump.so -G $(OBJS) -lelf -lmapmalloc -_relocate.o: ${srcdir}/$(ARCH)/_relocate.c - $(CC) -c $(ALL_CFLAGS) ${srcdir}/$(ARCH)/_relocate.c -uninit.o: ${srcdir}/$(ARCH)/uninit.c - $(CC) -c $(ALL_CFLAGS) ${srcdir}/$(ARCH)/uninit.c -mostlyclean: - -rm -f *.o \#* -clean: mostlyclean - -rm -f *.so *.so.1 -distclean: clean - -rm -f Makefile Makefile.in -realclean: distclean - rm -f TAGS -versionclean: - true -extraclean: realclean - -rm -f *~ \#*
--- a/dynodump/Makefile.in Mon Aug 13 08:45:53 2007 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,122 +0,0 @@ -# Generated automatically from Makefile.in.in by configure. -/* Hey Emacs, this is a -*- Makefile -*- */ - -/* Makefile for dynodump subdirectory in XEmacs - Copyright (C) 1995 Board of Trustees, University of Illinois - -This file is part of XEmacs. - -XEmacs 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. - -XEmacs 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 XEmacs; see the file COPYING. If not, write to the Free -Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -/* Avoid trouble on systems where the "SHELL" variable might be - inherited from the environment. */ -SHELL = /bin/sh - -/* Some people use these in paths they define. We do not want their paths - getting changed on them. */ -#undef sparc -#undef sun -#undef unix -#undef i386 -#undef ppc -#undef sgi - -/* ==================== Things "configure" will edit ==================== */ - -CC=gcc -CFLAGS=-bi486-linuxaout -O4 -m486 -malign-functions=2 -malign-jumps=2 -malign-loops=2 -ARCH= - -/* Where to find the source code. This is set by the configure - "--srcdir" option. However, the value of ${srcdir} in - this makefile is not identical to what was specified with --srcdir, - since the variable here has "/dynodump" added at the end. */ -srcdir=/m/xemacs-19.14/dynodump - -/* ========================= start of cpp stuff ========================= */ - -#define NO_SHORTNAMES -#define THIS_IS_YMAKEFILE -#define NOT_C_CODE -#include "../src/config.h" - -/* With the traditional VPATH setting, it is not possible to - simultaneously compile in-place and in another directory. The - mistaken definition is that *all* dependencies are searched for in - the VPATH directory, rather than just the dependencies that are not - themselves targets. Thus, if there is an up-to-date .o file in the - in-place location, it will not get recompiled in the not-in-place - location. - - The GNU Make "vpath" directive continues this tradition, but at - least lets you to restrict the classes of files that it applies to. - This allows us to kludge around the problem. */ -#ifdef USE_GNU_MAKE -vpath %.c /m/xemacs-19.14/dynodump -vpath %.h /m/xemacs-19.14/dynodump -/* now list files that should NOT be searched in the srcdir. - This includes any .c or .h that is built from something else - (e.g. a .in file). */ -/* none here */ -#else -VPATH=/m/xemacs-19.14/dynodump -#endif - -#ifdef USE_GCC -# define PIC_ARG -fpic -#else -# define PIC_ARG -K pic -#endif - -INCLUDES = -I${srcdir} -I${srcdir}/$(ARCH) -ALL_CFLAGS = ${CFLAGS} PIC_ARG ${INCLUDES} -OBJS = _relocate.o dynodump.o syms.o uninit.o - -.c.o: - $(CC) -c $(ALL_CFLAGS) $< - -/* If we do not need dynodump, then do nothing. */ -#ifdef DYNODUMP -all:: dynodump.so -#else -all:: -#endif - -dynodump.so: ${srcdir}/_dynodump.h $(OBJS) - $(CC) -o dynodump.so -G $(OBJS) -lelf -lmapmalloc - -_relocate.o: ${srcdir}/$(ARCH)/_relocate.c - $(CC) -c $(ALL_CFLAGS) ${srcdir}/$(ARCH)/_relocate.c - -uninit.o: ${srcdir}/$(ARCH)/uninit.c - $(CC) -c $(ALL_CFLAGS) ${srcdir}/$(ARCH)/uninit.c - -mostlyclean: - -rm -f *.o \#* - -clean: mostlyclean - -rm -f *.so *.so.1 - -distclean: clean - -rm -f Makefile Makefile.in - -realclean: distclean - rm -f TAGS - -versionclean: - true - -extraclean: realclean - -rm -f *~ \#*
--- a/dynodump/_dynodump.h Mon Aug 13 08:45:53 2007 +0200 +++ b/dynodump/_dynodump.h Mon Aug 13 08:46:35 2007 +0200 @@ -32,7 +32,7 @@ * Mountain View, California 94043 */ -#pragma ident "@(#) $Id: _dynodump.h,v 1.1.1.1 1996/12/18 03:37:22 steve Exp $ - SMI" +#pragma ident "@(#) $Id: _dynodump.h,v 1.1.1.2 1996/12/18 03:48:00 steve Exp $ - SMI" #ifndef _DYNODUMP_DOT_H #define _DYNODUMP_DOT_H @@ -41,7 +41,7 @@ #include "machdep.h" /* General rounding macro */ -#define S_ROUND(x, a) ((int)(x) + (((int)(a) ? (int)(a) : 1) - 1) & \ +#define S_ROUND(x, a) (((int)(x) + (((int)(a) ? (int)(a) : 1) - 1)) & \ ~(((int)(a) ? (int)(a) : 1) - 1)) /*
--- a/dynodump/dynodump.c Mon Aug 13 08:45:53 2007 +0200 +++ b/dynodump/dynodump.c Mon Aug 13 08:46:35 2007 +0200 @@ -73,7 +73,7 @@ * N.B. The above commentary is not quite correct in the flags have been hardwired * to RTLD_SAVREL. */ -#pragma ident "@(#) $Id: dynodump.c,v 1.1.1.1 1996/12/18 03:37:22 steve Exp $ - SMI" +#pragma ident "@(#) $Id: dynodump.c,v 1.1.1.2 1996/12/18 03:48:00 steve Exp $ - SMI" #include <sys/param.h> #include <sys/procfs.h> @@ -99,6 +99,7 @@ return (1); } +int dynodump (const char * file); int dynodump(const char * file) { @@ -228,7 +229,7 @@ * Traverse each section from the input file. */ for (ndx = 1, scn = 0; - _icache->c_scn = elf_nextscn(ielf, scn); + (_icache->c_scn = elf_nextscn(ielf, scn)); ndx++, scn = _icache->c_scn, _icache++) { if ((_icache->c_shdr = shdr = elf_getshdr(_icache->c_scn)) == NULL) @@ -468,7 +469,7 @@ */ _ndx = _addr = 0; for (ndx = 1, scn = 0; - _ocache->c_scn = elf_nextscn(oelf, scn); + (_ocache->c_scn = elf_nextscn(oelf, scn)); ndx++, scn = _ocache->c_scn, _ocache++, _icache++) { const char *strs;
--- a/dynodump/ppc/uninit.c Mon Aug 13 08:45:53 2007 +0200 +++ b/dynodump/ppc/uninit.c Mon Aug 13 08:46:35 2007 +0200 @@ -38,11 +38,18 @@ */ extern void __delete_all_module_tags(void); +extern void __exithandle(void); void dynodump_uninit(void) { - __delete_all_module_tags(); + /* There are 2 possible ways to do this. It is not clear which way + will be blessed by the Sun Gods. Both appear to work. */ - return; + /* _exithandle has recently been blessed. */ + + /* __delete_all_module_tags(); */ + _exithandle(); + + return; }
--- a/dynodump/sparc/uninit.c Mon Aug 13 08:45:53 2007 +0200 +++ b/dynodump/sparc/uninit.c Mon Aug 13 08:46:35 2007 +0200 @@ -37,6 +37,7 @@ * to deal with "initialization idempotency issues". */ +void dynodump_uninit(void); void dynodump_uninit(void) {
--- a/etc/LNEWS Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/LNEWS Mon Aug 13 08:46:35 2007 +0200 @@ -2512,7 +2512,7 @@ The function `minor-mode-key-binding' returns a list of all the active minor mode bindings of KEY. More precisely, it returns an - alist of pairs `(MODENAME . BINDING)', where MODENAME is the the + alist of pairs `(MODENAME . BINDING)', where MODENAME is the variable which enables the minor mode, and BINDING is KEY's definition in that mode. If KEY has no minor-mode bindings, the value is `nil'.
--- a/etc/NEWS Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/NEWS Mon Aug 13 08:46:35 2007 +0200 @@ -347,7 +347,7 @@ In XEmacs, keymaps are first-class opaque objects. FSF 19 represents them as complicated combinations of association lists and vectors. If you use the advertised functional interface to manipulation of keymaps, the same code -will work in XEmacs, Emacs 18, and and FSF GNU Emacs 19; if your code depends +will work in XEmacs, Emacs 18, and FSF GNU Emacs 19; if your code depends on the underlying implementation of keymaps, it will not. XEmacs uses "extents" to represent all non-textual aspects of buffers; @@ -815,8 +815,8 @@ /usr/local/bin/xemacs -> ../xemacs/src/xemacs-19.14 ; A link... /usr/local/xemacs/src/xemacs-19.14* ; The executable, /usr/local/xemacs/lisp/ ; and the rest of - /usr/local/xemacs/etc/ ; the the source - /usr/local/xemacs/lock/ ; tree. + /usr/local/xemacs/etc/ ; the source tree + /usr/local/xemacs/lock/ /usr/local/xemacs/info/ This configuration might be used for a multi-architecture installation; assume @@ -1169,7 +1169,7 @@ These are the faces that the left and right annotation margins are displayed in. -`primary-selection' +`zmacs-region' This is the face that mouse selections are displayed in. `text-cursor' @@ -1285,8 +1285,8 @@ the variables `font-lock-keywords', `c-font-lock-keywords', etc. There exist several other source code highlighting packages, but font-lock -does does one thing that most others don't do: highlights as you type new -text; and one thing that no others do: bases part of its decoration on the +does one thing that most others don't do: highlights as you type new text; +and one thing that no others do: bases part of its decoration on the syntax table of the major mode. Font-lock has C-level support to do this efficiently, so it should also be significantly faster than the others. @@ -2776,7 +2776,7 @@ Athena scrollbars are used. They obey all the usual resources of their respective toolkits. -There is now an implementation of dialog boxes based based on the Athena +There is now an implementation of dialog boxes based on the Athena widgets, as well as the existing Motif implementation. This release works with Motif 1.2 as well as 1.1. If you link with Motif,
--- a/etc/enriched.doc Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/enriched.doc Mon Aug 13 08:46:35 2007 +0200 @@ -1,51 +1,61 @@ Content-Type: text/enriched -Text-Width: 80 +Text-Width: 70 -<x-bg-color><param>blue</param><x-color><param>white</param><bold><fixed><bigger><center>enriched.el:</center></bigger></fixed></bold></x-color></x-bg-color><center> -<x-bg-color><param>blue</param><bold>WYSIWYG rich text editing for GNU Emacs</bold></x-bg-color> +<center><x-bg-color><param>blue</param><x-color><param>white</param><bold><fixed>enriched.el:</fixed></bold></x-color></x-bg-color> + +<x-bg-color><param>blue</param><x-color><param>white</param><bold>WYSIWYG rich text editing for GNU Emacs</bold></x-color></x-bg-color> + + </center><bold><x-bg-color><param>blue</param><x-color><param>white</param>INTRODUCTION </x-color></x-bg-color> + </bold><indent>Emacs now has the ability to edit <italic>enriched text</italic>, which is text -containing faces, colors, indentation, and other properties. This -document is a quick introduction to some of the new features, and -is also an example file in the <italic>text/enriched </italic>format. +containing faces, colors, indentation, and other properties. +This document is a quick introduction to some of the new features, +and is also an example file in the <italic>text/enriched </italic>format. </indent><x-bg-color><param>blue</param><x-color><param>white</param><bold>INSTALLATION and STARTUP </bold></x-color></x-bg-color> + <indent>Most of the time, you need not do anything to get these features to work. If you visit a file that has been written out in <italic>text/enriched</italic> format, it will automatically be decoded, Emacs will enter `enriched-mode' while visiting it, and whenever you save it it will be saved in the same format it was read in. + If you wish to create a new file, however, you will need to turn on enriched-mode yourself: -<fixed><indent>M-x enriched-mode RET</indent></fixed> +<fixed><indent>M-x enriched-mode RET</indent></fixed> + + Or, if you get a <italic>text/enriched </italic>file that Emacs does not automatically recognize and decode, you can tell Emacs to decode it (which also turns on enriched-mode automatically): -<fixed>M-x format-decode-buffer RET text/enriched RET</fixed> + <fixed>M-x format-decode-buffer RET text/enriched RET</fixed> + + + </indent><x-bg-color><param>blue</param><x-color><param>white</param><bold><flushleft>WHAT IS ENCODED </flushleft></bold></x-color></x-bg-color><flushleft> + </flushleft><indent>Here is the current list of text-properties that are saved; they -are discussed in more detail below. Most of these can be added or -changed with the "Text Properties" menu, available under the -"Edit" item in the menu-bar, or on C-mouse-2 (Control + the middle -mouse button). +are discussed in more detail below. +Most of these can be added or changed with the "Text Properties" +menu, available under the "Edit" item in the menu-bar, or on +C-mouse-2 (Control + the middle mouse button). <bold>Faces:</bold> default, <bold>bold</bold>, <italic>italic</italic>, <underline>underline</underline>, <fixed>fixed</fixed>, etc. <bold>Colors:</bold> <x-color><param>red</param><x-bg-color><param>DarkSlateGray</param>any</x-bg-color></x-color><x-bg-color><param>DarkSlateGray</param><x-color><param>orange</param>thing</x-color> <x-color><param>yellow</param>your</x-color><x-color><param>green</param> screen</x-color><x-color><param>blue</param> </x-color><x-color><param>light blue</param>can</x-color><x-color><param>violet</param> display...</x-color></x-bg-color> -<bold>Sizes:</bold> things can get <bigger>larger</bigger>, <smaller>smaller</smaller>, <bigger><bigger><bigger><bigger><bigger>much larger</bigger></bigger></bigger></bigger></bigger>, and <smaller><smaller><smaller><smaller><smaller>much - smaller</smaller></smaller></smaller></smaller></smaller>. <bold>Newlines:</bold> <indent>Which ones are real ("hard") newlines, and which can be changed to fit lines into the ma</indent>rgins. @@ -56,12 +66,14 @@ the right margin, fully justified, centered, or left alo</indent>ne). <bold>Excerpts: "</bold><excerpt>For quoted material."</excerpt> + <bold>Read-only</bold> regions. </indent><x-bg-color><param>blue</param><x-color><param>white</param><bold>FACES and COLORS </bold></x-color></x-bg-color><bold> + </bold><indent>You can add faces either with the menu or with <fixed>M-g.</fixed> The face is applied to the current region. If you are using `transient-mark-mode' and the region is not active, then the face @@ -73,6 +85,7 @@ </indent><x-bg-color><param>blue</param><x-color><param>white</param><bold>NEWLINES and PARAGRAPHS </bold></x-color></x-bg-color><bold> + </bold><indent><italic>Text/enriched</italic> format distinguishes between <underline>hard</underline> and <underline>soft</underline> newlines. Hard newlines are used to separate paragraphs, or items in a list, or anywhere that must be a line break no matter what the margins @@ -86,19 +99,26 @@ </indent><x-bg-color><param>blue</param><x-color><param>white</param><bold>INDENTATION </bold></x-color></x-bg-color><bold> -</bold><indentright><indent>The fill functions also understand margins, which can be set + +</bold><indent><indentright>The fill functions also understand margins, which can be set for any region of a document. In addition to the menu items, which increase or decrease the margins, there are two commands for setting the margins absolutely: <fixed>C-c l (set-left-margin)</fixed> -and <fixed>C-c r (set-right-margin)</fixed>.<flushleft> -</flushleft></indent></indentright><indent><flushleft>You <indent>can change indentation at any point in a</indent></flushleft></indent> <flushleft><indent><indent>paragraph, which -makes it possible to do interesting things like</indent></indent></flushleft><indent><indent> +and <fixed>C-c r (set-right-margin)</fixed>. +<flushleft> + +</flushleft></indentright><flushleft>You <indent>can change indentation at any point in a</indent></flushleft></indent> <indent><indent><flushleft>paragraph, which +makes it possible to do interesting things like</flushleft> <flushleft>hanging-indents: this paragraph was indented by selecting the region from the second word to the end of the paragraph, and indenting only that part.<indent> + </indent></flushleft></indent></indent><flushleft> + <x-bg-color><param>blue</param><x-color><param>white</param><bold>JUSTIFICATION<indent> + </indent></bold></x-color></x-bg-color><bold><indent> + </indent></bold></flushleft><indent><nofill>Several styles of justification are possible, the simplest being <italic>unfilled. </italic>This means that your lines will be left as you write them. This paragraph is unfilled. @@ -108,39 +128,47 @@ right. -</nofill><italic><flushright> FlushRight</flushright></italic><flushright> makes each line flush with the right margin instead. + </nofill><italic><flushright>FlushRight</flushright></italic><flushright> makes each line flush with the right margin instead. + </flushright><italic><flushboth>FlushBoth </flushboth></italic><flushboth>regions, which are sometimes called "fully justified" are aligned evenly on both edges, so that the text on the page has a smooth appearance as in a book or newspaper article. Unfortunately this does not look as nice with a fixed-width font as it does in a proportionally-spaced printed document; the extra -spaces that are needed on the screen can make it hard to -read.<indentright><indentright><indentright><indentright> +spaces that are needed on the screen can make it hard to read. <indentright><indentright><indentright><indentright> -</indentright></indentright></indentright></indentright></flushboth><bold><center> Center + + </indentright></indentright></indentright></indentright></flushboth><bold><center>Center -</center></bold><center> Finally, there is <italic>center </italic>justification. The normal - center-paragraph key, M-S, can be used to turn on center - justification in enriched-mode. + </center></bold><center>Finally, there is <italic>center </italic>justification. + The normal center-paragraph key, M-S, can be used to turn on + center justification in enriched-mode. - M-j or the "Text Properties" menu also can be used to change + M-j or the "Text Properties" menu also can be used to change justification. + </center><flushboth>Note that justification can only change at hard newlines, because that is the unit over which filling gets done. + </flushboth></indent><x-bg-color><param>blue</param><x-color><param>white</param><bold>EXCERPTS </bold></x-color></x-bg-color> -<indent><excerpt>This is an example of an excerpt. You can use them for quoted + +<excerpt><indent>This is an example of an excerpt. You can use them for quoted parts of other people's email messages and the like. It is just a -face, which is the same as the `italic' face by default.</excerpt></indent> +face, which is the same as the `italic' face by default. + </indent></excerpt> + <x-bg-color><param>blue</param><x-color><param>white</param><bold>THE FILE FORMAT<indent> + </indent></bold></x-color></x-bg-color><indent> -Enriched-mode docuemnts are saved in an extended version of a + +Enriched-mode documents are saved in an extended version of a format called <italic>text/enriched</italic>, which is defined as part of the MIME standard. This means that your documents are transportable (even through email) to many</indent> <indent>other systems. In the future other file @@ -151,7 +179,7 @@ and read-only regions), not all systems will be able to recreate all of the features of your document, but they will get as close -as possible. +as possible. The MIME standard is defined in internet RFC 1521; text/enriched @@ -162,26 +190,30 @@ <fixed><indent>help: ways_to_get_rfcs -</indent></fixed>See also the newsgroup comp.mail.mime. +</indent></fixed>See also the newsgroup comp.mail.mime. </indent><x-bg-color><param>blue</param><x-color><param>white</param><bold>CUSTOMIZATION </bold></x-color></x-bg-color><bold> + </bold><indent>-<indent> The <fixed>fixed </fixed>and <excerpt>excerpt </excerpt>faces should be set to your liking.</indent> -- <indent>User-preference variables: <fixed>default-justification, -enriched-verbose. </fixed></indent>- <indent>You can add annotations for your own text -properties by making additions to <fixed>enriched-annotation-alist</fixed>. -Note that the standard requires you to name your annotation -starting<italic> "x-" </italic>(as in <italic>"x-read-only"</italic>). Please send me any such -additions that you think might be of general interest so that -I can include them in the distribution. + +- <indent>User-preference variables: <fixed>default-justification, enriched-verbose. +</fixed></indent>- <indent>You can add annotations for your own text properties by making +additions to <fixed>enriched-annotation-alist</fixed>. Note that the +standard requires you to name your annotation starting<italic> "x-" +</italic>(as in <italic>"x-read-only"</italic>). Please send me any such additions that +you think might be of general interest so that I can include +them in the distribution. </indent></indent><x-bg-color><param>blue</param><x-color><param>white</param><bold>TO-DO LIST </bold></x-color></x-bg-color><bold> + </bold><indent><italic>[Feel free to work on these and send me the results!]</italic> + - Be smarter about fixing malformed files. - Make the indentation work more seamlessly and robustly: @@ -189,10 +221,12 @@ <indent>+ Create<indent> an aggressive auto-fill function that will keep the paragraph properly filled all the time, without slowing down editing too much.</indent> + + Refill after yank. + <indent>Make deleting a newline also delete the indentation following it.</indent> + + Never let point enter indentation?? </indent>- Notice and re-fill when window changes widths (optionally). @@ -207,13 +241,23 @@ </indent></indent><x-bg-color><param>blue</param><x-color><param>white</param><bold>Final Notes: </bold></x-color></x-bg-color><bold> -</bold><indent>This code and documentation is under development. </indent>Comments and -bug reports are welcome. + +</bold><indent>This code and documentation is under development. + </indent>Comments and bug reports are welcome. <bold><x-color><param>white</param><x-bg-color><param>blue</param>Boris Goldowsky</x-bg-color></x-color><x-color><param>light blue</param> </x-color></bold><x-color><param>light blue</param><fixed><<boris@gnu.ai.mit.edu></fixed></x-color><x-color><param>blue</param> -</x-color><x-bg-color><param>blue</param><x-color><param>white</param> April 1995</x-color></x-bg-color><x-color><param>blue</param> -</x-color>slightly augmented to match XEmacs version by<x-color><param>blue</param> -</x-color><x-bg-color><param>blue</param><bold><x-color><param>white</param>Michael Sperber</x-color></bold></x-bg-color> <<sperber@informatik.uni-tuebingen.de> + +</x-color><x-bg-color><param>blue</param><x-color><param>white</param> April 1995 </x-color></x-bg-color><x-color><param>blue</param> + + + + -<x-bg-color><param>blue</param><x-color><param>white</param> April 1996</x-color></x-bg-color> + + + + + + +</x-color>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/gnus/bar.xbm Mon Aug 13 08:46:35 2007 +0200 @@ -0,0 +1,7 @@ +#define noname_width 6 +#define noname_height 48 +static char noname_bits[] = { + 0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c, + 0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c, + 0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c, + 0x0c,0x0c,0x0c};
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/gnus/bar.xpm Mon Aug 13 08:46:35 2007 +0200 @@ -0,0 +1,54 @@ +/* XPM */ +static char * picon-bar_xpm[] = { +"6 48 2 1", +" c white s background", +". c black", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. ", +" .. "};
--- a/etc/gnus/gnus-group-catchup-current-up.xbm Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/gnus/gnus-group-catchup-current-up.xbm Mon Aug 13 08:46:35 2007 +0200 @@ -1,12 +1,12 @@ #define noname_width 32 #define noname_height 32 static char noname_bits[] = { - 0x84,0x10,0x00,0x00,0x21,0x44,0x55,0x55,0x94,0x12,0x00,0x00,0x21,0x00,0x55, - 0x55,0x84,0xbe,0x00,0x80,0x21,0x37,0x54,0x7d,0x94,0xa9,0x00,0xac,0x02,0x32, - 0x55,0xd5,0xfe,0x57,0x00,0xaa,0x01,0x1c,0xfc,0x5f,0x3d,0xf8,0x07,0xb0,0x33, - 0x80,0xf6,0x20,0x2a,0xfc,0xab,0xa0,0x13,0x82,0x9e,0x20,0x18,0x16,0x46,0x68, - 0x0a,0xa1,0x62,0x28,0xf8,0x13,0x28,0xc8,0x05,0x05,0xe5,0xf7,0x04,0x51,0x10, - 0xc4,0x1b,0x09,0x3a,0x2c,0x31,0xd6,0x6c,0x54,0x68,0xea,0xc7,0x48,0x4c,0x72, - 0xa0,0x99,0x67,0x6a,0x50,0x59,0xa8,0xec,0x2f,0x49,0xd5,0xef,0x54,0x53,0x22, - 0x35,0x49,0xbe,0x99,0x4a,0x25,0x7f,0xa2,0xa8,0xaa,0x54,0x2d,0x95,0x48,0xa5, - 0x50,0x52,0x95,0x14,0x96,0x2a,0x4a,0xa5}; + 0x00,0x80,0x00,0x20,0xaa,0x2a,0xaa,0x0a,0x00,0x40,0x00,0x50,0x55,0x15,0x55, + 0x05,0x00,0x5e,0x00,0xa8,0xaa,0x35,0xaa,0x7a,0x00,0xb3,0x00,0xcc,0xaa,0x2a, + 0xa9,0xa6,0xfe,0x17,0x04,0x98,0x01,0x4c,0xf9,0x6f,0x3d,0xf8,0x05,0xb0,0x22, + 0x80,0xf7,0x20,0x2b,0xfc,0xaf,0x60,0x11,0x12,0x8a,0x20,0x1a,0x4a,0x6e,0xa8, + 0x08,0x83,0x42,0x28,0xfa,0x29,0x28,0xc8,0x04,0x03,0xe5,0xf7,0x06,0x29,0x10, + 0xcc,0x1a,0x81,0x3a,0x24,0x31,0x56,0x6a,0x4c,0x58,0xea,0xc7,0x58,0x64,0x76, + 0x60,0xa9,0x57,0x66,0x90,0x19,0xc8,0xf4,0x5f,0xa9,0xa6,0x6f,0xa5,0x52,0x4a, + 0x6a,0x4a,0xbe,0x29,0x29,0x29,0x7f,0x52,0xa5,0x52,0x55,0x49,0x52,0x29,0x49, + 0xaa,0x24,0x45,0x52,0x25,0x55,0xaa,0x4a};
--- a/etc/gnus/gnus-group-catchup-current.xbm Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/gnus/gnus-group-catchup-current.xbm Mon Aug 13 08:46:35 2007 +0200 @@ -1,12 +1,12 @@ #define noname_width 32 #define noname_height 32 static char noname_bits[] = { - 0x08,0x10,0x02,0x42,0x42,0x85,0xa8,0x10,0x14,0x28,0x02,0x45,0x81,0x82,0x50, - 0x10,0x54,0x3e,0x82,0x42,0x01,0x2b,0x29,0x7c,0x54,0xb5,0x40,0xd4,0x02,0x2a, - 0x14,0xad,0xfe,0x57,0x21,0xcc,0x01,0x1c,0xfc,0x5f,0x3d,0xf8,0x05,0x30,0x33, - 0x80,0xf7,0x60,0x2a,0xfc,0xab,0x20,0x13,0x02,0x8e,0x60,0x18,0x56,0x57,0x28, - 0x0a,0x01,0x40,0x28,0xf8,0xab,0x2a,0xc8,0x05,0x01,0xf0,0xf7,0x04,0x55,0x11, - 0xc4,0x1b,0x03,0x34,0x2c,0x31,0x5a,0x6d,0x54,0x58,0xe6,0xc7,0x48,0x64,0x6a, - 0xa0,0x99,0x57,0x76,0x50,0x49,0xa4,0xe4,0x1f,0x59,0xaa,0xff,0x52,0x53,0x49, - 0x29,0xa5,0xbe,0xa4,0xa4,0x94,0x7e,0x95,0xaa,0x52,0x55,0x52,0x12,0x29,0x49, - 0x4a,0x65,0x4a,0x52,0xa4,0x14,0xa5,0x4a}; + 0x00,0x21,0x42,0x00,0x55,0x88,0x10,0x55,0x80,0x22,0x4a,0x00,0x2a,0x10,0x01, + 0x54,0x40,0x5f,0x54,0x81,0x14,0x35,0x02,0x7c,0x42,0xb3,0xa8,0xd4,0x28,0x2a, + 0x04,0xad,0xfe,0x57,0x51,0xa8,0x01,0x1c,0xfa,0x5f,0x3d,0xf8,0x05,0xb0,0x23, + 0x80,0xf7,0x20,0x36,0xfc,0x8b,0xa0,0x11,0x02,0xde,0x20,0x12,0xaa,0x46,0x68, + 0x08,0x05,0x50,0x28,0xfa,0x51,0x25,0xc8,0x04,0x0b,0xe0,0xf7,0x06,0xa1,0x1a, + 0xd4,0x1a,0x15,0x30,0x04,0x31,0xd2,0x6a,0xac,0x58,0xea,0xc7,0x58,0x64,0x76, + 0x60,0x29,0x57,0x66,0x90,0x99,0xa8,0xf4,0x5f,0x29,0xa6,0x6f,0xa5,0xb2,0x4a, + 0xb5,0x14,0x3f,0xa2,0x48,0xaa,0xfe,0x2a,0x95,0x52,0x12,0x55,0xa5,0x24,0xa9, + 0x48,0x2a,0x55,0x25,0x26,0x49,0x89,0x94};
--- a/etc/gnus/gnus-group-describe-group-up.xbm Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/gnus/gnus-group-describe-group-up.xbm Mon Aug 13 08:46:35 2007 +0200 @@ -1,12 +1,12 @@ #define noname_width 32 #define noname_height 32 static char noname_bits[] = { - 0x5b,0x55,0x55,0xb5,0x91,0xaa,0xaa,0x2a,0x2a,0x49,0x94,0x44,0x92,0x24,0x23, - 0xa0,0xb5,0x5b,0x15,0x01,0x4a,0xa4,0x0a,0x80,0x92,0x4a,0x02,0x00,0x55,0x25, - 0x01,0x00,0x99,0x59,0x11,0x11,0x55,0xa4,0x00,0x00,0xa2,0x2a,0x00,0x00,0x29, - 0x95,0x00,0x00,0x55,0x59,0x11,0x11,0x55,0xa5,0x00,0x00,0x92,0x4a,0x00,0x00, - 0xa9,0x24,0x00,0x00,0x55,0x5b,0x11,0x11,0x2a,0x51,0x01,0x00,0x52,0x4a,0x00, - 0x00,0xa9,0xa7,0x02,0x00,0xd5,0x5c,0x15,0x11,0x35,0xb2,0x02,0x00,0x54,0x25, - 0x15,0x40,0xda,0x79,0x09,0x40,0xb1,0xb6,0x75,0xbb,0xde,0x75,0x12,0x11,0xec, - 0x9f,0xaa,0xaa,0xd7,0x5d,0x49,0x49,0xff,0x57,0x35,0xb3,0x7d,0x2a,0x95,0x2a, - 0x7e,0x49,0xa9,0xa4,0x9f,0xa4,0x44,0x52}; + 0x55,0xb3,0x59,0xb5,0x2a,0x29,0x95,0x4a,0x52,0xa5,0x24,0x29,0x95,0x54,0x52, + 0x90,0x59,0x93,0x15,0x41,0xa5,0x54,0x0a,0x00,0x4a,0x55,0x01,0x00,0x24,0x49, + 0x02,0x00,0x5b,0xb5,0x11,0x11,0xa2,0x12,0x00,0x00,0x94,0xaa,0x00,0x00,0x55, + 0x49,0x00,0x00,0x95,0x35,0x11,0x11,0x52,0x92,0x00,0x00,0xaa,0x54,0x00,0x00, + 0x49,0x4a,0x00,0x00,0xb5,0xb5,0x11,0x11,0x12,0x49,0x00,0x00,0xaa,0x92,0x00, + 0x00,0xa5,0xaf,0x02,0x00,0x59,0x58,0x11,0x11,0xb5,0x95,0x0a,0x00,0x12,0x72, + 0x12,0x40,0xf4,0xbb,0x0a,0x40,0xbb,0xb4,0xb5,0xb5,0xd9,0x7f,0x52,0x2a,0xae, + 0x9a,0x94,0xa4,0xf6,0x5d,0xa5,0x52,0xf7,0x57,0x55,0x95,0xfd,0xaa,0x2a,0x55, + 0x3e,0x25,0xa9,0x52,0xbf,0x92,0x24,0x29};
--- a/etc/gnus/gnus-group-exit-up.xbm Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/gnus/gnus-group-exit-up.xbm Mon Aug 13 08:46:35 2007 +0200 @@ -8,5 +8,5 @@ 0x80,0x62,0x0c,0x00,0xaa,0xab,0xba,0x4a,0x40,0x21,0x10,0x10,0xea,0x45,0x4a, 0x42,0x40,0x09,0x91,0x28,0xd2,0x51,0x04,0x82,0xa4,0x04,0x41,0x20,0xf0,0x12, 0x14,0x85,0xa4,0x40,0x40,0x20,0xe2,0x0a,0x85,0x80,0xbc,0x43,0x00,0x2a,0xee, - 0x9d,0x5b,0x80,0xed,0x76,0x04,0x28,0x5b,0xd5,0xb5,0x01,0xff,0xff,0x85,0x48, - 0x00,0x04,0x93,0x02,0x0a,0x22,0x20,0x50}; + 0x9d,0x5b,0x80,0xed,0x76,0x04,0x28,0x5b,0xa9,0xb3,0x01,0xff,0xff,0x85,0x48, + 0x00,0x86,0x91,0x02,0x4a,0x00,0x2a,0x50};
--- a/etc/gnus/gnus-group-get-new-news-this-group-up.xbm Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/gnus/gnus-group-get-new-news-this-group-up.xbm Mon Aug 13 08:46:35 2007 +0200 @@ -1,12 +1,12 @@ #define noname_width 32 #define noname_height 32 static char noname_bits[] = { - 0x80,0x10,0x08,0x01,0xfe,0x87,0x42,0x52,0x02,0x2c,0x14,0x08,0x03,0x04,0x81, - 0x42,0x02,0xac,0xf4,0x08,0x02,0x04,0x58,0x53,0x02,0xbe,0x56,0x83,0x03,0x2e, - 0x4c,0x2a,0x02,0x7c,0x95,0x82,0x02,0xcc,0x58,0x2b,0x02,0x34,0xd3,0x80,0x03, - 0xac,0xbe,0x2f,0x02,0xc4,0xaa,0x8a,0xfe,0x67,0x92,0x2c,0x12,0x89,0x55,0x99, - 0x44,0x42,0x49,0x36,0x10,0x28,0xab,0x92,0x45,0x05,0x26,0x3b,0x10,0x50,0x4a, - 0x17,0x8a,0x0a,0xab,0x52,0x20,0x20,0x26,0x17,0x8a,0x4a,0x93,0x5a,0x20,0x00, - 0xfe,0x1f,0x4a,0xaa,0xd5,0x48,0x00,0x01,0x4b,0x2f,0x54,0x54,0xa5,0x09,0x82, - 0x80,0xa9,0xaf,0x28,0x2a,0x75,0x06,0x82,0x40,0x53,0x55,0x50,0x14,0xdf,0x07, - 0x02,0xa1,0xae,0x56,0xa8,0x08,0x8a,0x03}; + 0x10,0x20,0x21,0x04,0xfe,0x0f,0x0a,0x51,0x02,0xa4,0x50,0x84,0x03,0x14,0x04, + 0x21,0x02,0x44,0xf1,0x84,0x02,0x2c,0xba,0x29,0x02,0x9e,0x4c,0x43,0x03,0x26, + 0x54,0x16,0x02,0x7c,0x25,0x43,0x02,0xdc,0x9a,0x11,0x02,0x94,0xb1,0xa2,0x03, + 0x64,0xfe,0x0f,0x02,0xcc,0x0a,0x29,0xfe,0x57,0x55,0x4d,0x22,0xc2,0xa4,0x14, + 0x88,0x10,0x2b,0x5b,0x22,0x42,0x52,0x16,0x88,0x94,0x2a,0x5b,0x22,0x00,0xa6, + 0x92,0x10,0x55,0x2b,0x3b,0x42,0x00,0xa6,0x96,0x28,0x55,0x53,0x36,0x82,0x00, + 0xfe,0x9f,0x28,0x54,0xab,0x08,0x82,0x80,0xa5,0x2f,0x50,0x2a,0x53,0x49,0x02, + 0x81,0xa5,0x17,0x54,0x28,0x73,0x46,0x80,0x02,0x55,0x0d,0x2a,0x50,0xdf,0x57, + 0x40,0x85,0xae,0x03,0x15,0x20,0x8a,0x52};
--- a/etc/gnus/gnus-group-get-new-news-up.xbm Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/gnus/gnus-group-get-new-news-up.xbm Mon Aug 13 08:46:35 2007 +0200 @@ -1,12 +1,12 @@ #define noname_width 32 #define noname_height 32 static char noname_bits[] = { - 0x10,0x20,0x22,0x00,0xff,0x8b,0x08,0x55,0x01,0x22,0x22,0x80,0x01,0x8a,0x88, - 0x2a,0x01,0x26,0x7a,0x80,0x01,0x82,0xd4,0x2a,0x01,0x1f,0xa6,0x41,0x01,0x57, - 0x2b,0x15,0x01,0x2e,0xa6,0x21,0x01,0xee,0xac,0x48,0x01,0xaa,0x68,0x05,0x01, - 0x92,0xdf,0x53,0x01,0xb6,0xaa,0x06,0xff,0xa3,0x94,0x54,0x10,0x49,0x29,0x0d, - 0x45,0xa2,0x95,0x4a,0x08,0x08,0xfd,0xfd,0x42,0x45,0x07,0x8b,0x28,0x10,0x85, - 0x8c,0x05,0x4a,0x87,0x85,0x50,0x21,0x45,0x85,0x0a,0x08,0xc7,0x82,0xa0,0xa2, - 0xe7,0x82,0x14,0x90,0x14,0x81,0x42,0xc5,0xe5,0x81,0x20,0x90,0x3e,0xff,0x8a, - 0xc2,0xf4,0x02,0x40,0x90,0x5a,0x57,0x2a,0xc5,0xaa,0x82,0x01,0x90,0xef,0x2b, - 0x54,0x45,0x55,0x41,0x01,0x10,0xc7,0x15}; + 0x10,0x20,0x02,0x22,0xff,0x8b,0xa0,0x08,0x01,0x26,0x0a,0x51,0x01,0x0a,0x51, + 0x04,0x01,0xa2,0x7c,0x51,0x01,0x12,0xc4,0x08,0x01,0x4f,0x9b,0xa5,0x01,0x1b, + 0x46,0x01,0x01,0x6e,0x5a,0x2b,0x01,0x6e,0xa5,0x40,0x01,0xaa,0x6c,0x05,0x01, + 0x96,0xdf,0x53,0x01,0x72,0xaa,0x06,0xff,0x27,0x25,0x55,0x08,0xd0,0x54,0x8a, + 0x42,0x85,0x25,0x2d,0x14,0x28,0xfd,0xfd,0x81,0x02,0x07,0x8b,0x54,0x54,0x85, + 0x8c,0x02,0x01,0x87,0x85,0x28,0x54,0x45,0x85,0x84,0x02,0xc7,0x82,0x12,0x28, + 0xe7,0x82,0x40,0x85,0x15,0x81,0x0a,0xd0,0xe6,0x81,0xa0,0x8a,0x3d,0xff,0x0a, + 0xa0,0xf4,0x02,0xa0,0x8a,0x5a,0x57,0x0a,0xd0,0xaa,0x82,0x40,0x85,0xef,0x2b, + 0x0a,0x28,0x55,0x81,0xa0,0x42,0xc7,0x2b};
--- a/etc/gnus/gnus-group-kill-group-up.xbm Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/gnus/gnus-group-kill-group-up.xbm Mon Aug 13 08:46:35 2007 +0200 @@ -1,12 +1,12 @@ #define noname_width 32 #define noname_height 32 static char noname_bits[] = { - 0x10,0x22,0x20,0x00,0x85,0x88,0x0a,0x55,0x50,0x22,0x50,0x00,0x0a,0x08,0x05, - 0x55,0xe0,0xff,0xbf,0x00,0x4a,0x00,0x60,0x54,0x50,0x00,0xa0,0x82,0x45,0xc0, - 0x21,0x21,0x50,0xe0,0xe3,0x17,0x4a,0xb0,0x06,0x42,0x60,0xf0,0x07,0x26,0x4a, - 0x70,0x07,0x0a,0x50,0xe0,0x03,0xa2,0x45,0x40,0x01,0x0a,0x68,0x40,0x01,0x52, - 0x42,0xc8,0x05,0x06,0x48,0x0c,0x0c,0x52,0x62,0x30,0x03,0x06,0x48,0xc0,0x00, - 0x52,0x45,0xc0,0x00,0x06,0x50,0x30,0x03,0x52,0x4a,0x0c,0x0c,0x06,0x60,0x08, - 0x04,0x52,0x4a,0x00,0x00,0x06,0x50,0x00,0x00,0x52,0x45,0x00,0x00,0x02,0x50, - 0x00,0x00,0x56,0x4a,0x00,0x00,0x02,0xe0,0xff,0xff,0x2b,0x0a,0x11,0x02,0x42, - 0x50,0x44,0xa8,0x08,0x05,0x11,0x05,0x44}; + 0x00,0x20,0x00,0x10,0xaa,0x0a,0x55,0x45,0x00,0x50,0x00,0x08,0x55,0x05,0xaa, + 0x42,0xc0,0xff,0x3f,0x14,0x54,0x00,0x60,0x41,0x42,0x00,0xa0,0x14,0x68,0xc0, + 0x21,0x43,0x42,0xe0,0xe3,0x0b,0x50,0xb0,0x06,0x42,0x42,0xf0,0x07,0x2a,0x68, + 0x70,0x07,0x06,0x42,0xe0,0x03,0x52,0x68,0x40,0x01,0x06,0x42,0x40,0x01,0x52, + 0x50,0xc8,0x05,0x06,0x62,0x0c,0x0c,0x52,0x48,0x30,0x03,0x06,0x62,0xc0,0x00, + 0x52,0x48,0xc0,0x00,0x06,0x62,0x30,0x03,0x52,0x48,0x0c,0x0c,0x02,0x42,0x08, + 0x04,0xaa,0x50,0x00,0x00,0x06,0x4a,0x00,0x00,0x52,0x50,0x00,0x00,0x06,0x42, + 0x00,0x00,0x52,0x68,0x00,0x00,0x06,0xc2,0xff,0xff,0x53,0x24,0x11,0x00,0x00, + 0x10,0x44,0x55,0x55,0x45,0x91,0x00,0x00};
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/gnus/gnus-pointer.xpm Mon Aug 13 08:46:35 2007 +0200 @@ -0,0 +1,22 @@ +/* XPM */ +static char *gnus-pointer[] = { +/* width height num_colors chars_per_pixel */ +" 18 13 2 1", +/* colors */ +". c #0000ff", +"# c #ebebeb s backgroundToolBarColor", +/* pixels */ +"##################", +"######..##..######", +"#####........#####", +"#.##.##..##...####", +"#...####.###...##.", +"#..###.######.....", +"#####.########...#", +"###########.######", +"####.###.#..######", +"######..###.######", +"###....####.######", +"###..######.######", +"###########.######" +}; \ No newline at end of file
--- a/etc/gnus/gnus-summary-caesar-message-up.xbm Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/gnus/gnus-summary-caesar-message-up.xbm Mon Aug 13 08:46:35 2007 +0200 @@ -1,12 +1,12 @@ #define noname_width 32 #define noname_height 32 static char noname_bits[] = { - 0x00,0x41,0x40,0x08,0x54,0x14,0x15,0x42,0x82,0x20,0xa0,0x28,0x20,0x8a,0x0a, - 0x04,0xca,0xff,0x7f,0x51,0x50,0x00,0x60,0x08,0x42,0xe6,0xb8,0xa1,0x68,0x29, - 0x25,0x15,0x42,0xa9,0xe4,0x43,0x50,0x2f,0x05,0x16,0x4a,0xe9,0x38,0xa2,0x60, - 0x00,0x00,0x0a,0x42,0x82,0x10,0x22,0x54,0x00,0x00,0x4a,0x60,0xcb,0x1c,0x02, - 0x4a,0x2b,0x25,0x56,0x60,0x2d,0x1d,0x02,0x4a,0x2d,0x05,0x52,0x60,0xc9,0x04, - 0x0a,0x4a,0x00,0x00,0x42,0x60,0x18,0x00,0x16,0x4a,0x3c,0x00,0x42,0x60,0xe6, - 0x3f,0x0a,0x4a,0xe6,0x3f,0x52,0x40,0x3c,0x2a,0x06,0x55,0x18,0x2a,0x42,0x60, - 0x00,0x08,0x2a,0x4a,0x00,0x00,0x06,0xe0,0xff,0xff,0x53,0x0a,0x00,0x00,0x04, - 0x50,0x55,0x55,0x51,0x05,0x00,0x00,0x08}; + 0x04,0x11,0x04,0x01,0x51,0x44,0x51,0x50,0x04,0x11,0x84,0x0a,0x41,0x84,0x22, + 0x40,0xd4,0xff,0xbf,0x0a,0x41,0x00,0x60,0x50,0x54,0xe6,0xb8,0x01,0x42,0x29, + 0x25,0x55,0x68,0xa9,0xe4,0x83,0x44,0x2f,0x05,0x2a,0x52,0xe9,0x38,0x82,0x40, + 0x00,0x00,0x2a,0x6a,0x82,0x10,0x42,0x40,0x00,0x00,0x16,0x4a,0xcb,0x1c,0x22, + 0x61,0x2b,0x25,0x4a,0x44,0x2d,0x1d,0x02,0x51,0x2d,0x05,0x56,0x44,0xc9,0x04, + 0x02,0x61,0x00,0x00,0x52,0x54,0x18,0x00,0x0a,0x41,0x3c,0x00,0x42,0x54,0xe6, + 0x3f,0x16,0x42,0xe6,0x3f,0x42,0x68,0x3c,0x2a,0x0a,0x42,0x18,0x2a,0x52,0x54, + 0x00,0x08,0x06,0x41,0x00,0x00,0x42,0xd4,0xff,0xff,0x2b,0x41,0x04,0x41,0x04, + 0x24,0x51,0x14,0x51,0x09,0x08,0x82,0x08};
--- a/etc/gnus/gnus-summary-cancel-article-up.xbm Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/gnus/gnus-summary-cancel-article-up.xbm Mon Aug 13 08:46:35 2007 +0200 @@ -1,12 +1,12 @@ #define noname_width 32 #define noname_height 32 static char noname_bits[] = { - 0x11,0x11,0x01,0x11,0x24,0x55,0x55,0x55,0x92,0x00,0x00,0x00,0x00,0x52,0x55, - 0x55,0x5b,0x19,0x0f,0x11,0x10,0xa2,0x59,0x4a,0x42,0x68,0x18,0x21,0x90,0x1a, - 0x56,0x10,0x1b,0x06,0x97,0x55,0x80,0x01,0x23,0x11,0x2a,0x81,0x20,0x44,0x80, - 0x02,0x42,0x11,0x1b,0x05,0xf8,0x55,0x40,0x0c,0x56,0x10,0x2a,0xf9,0x09,0x41, - 0x00,0x92,0x42,0x2a,0x5b,0x31,0x19,0x91,0x20,0x4a,0xa2,0x24,0x82,0x00,0x09, - 0x11,0x28,0xaa,0x40,0x44,0x95,0x11,0x1b,0x11,0x21,0x92,0x40,0x55,0x84,0x48, - 0x2a,0x80,0x29,0x02,0x80,0x2a,0x91,0xb9,0x1b,0x91,0x24,0x02,0x40,0x2a,0x12, - 0xa8,0x8a,0x80,0x40,0x05,0x20,0x29,0x1b,0xb1,0x15,0x95,0x40,0x0a,0x48,0x21, - 0x8a,0x50,0x21,0x84,0x20,0x04,0x08,0x21}; + 0x19,0x11,0x09,0x11,0xa2,0x54,0x45,0x4a,0x08,0x02,0x90,0x20,0x82,0x50,0x25, + 0x0a,0x39,0x13,0x8f,0xb1,0x82,0xc8,0x29,0x08,0x48,0x62,0x98,0x22,0x12,0x18, + 0x56,0x48,0x51,0x07,0x17,0x13,0x14,0x01,0xa3,0x50,0x42,0x81,0x60,0x02,0x10, + 0x03,0x42,0x54,0x53,0x06,0x78,0x11,0x90,0x08,0xae,0x4a,0x0a,0xfa,0x01,0x10, + 0xa0,0xa4,0x52,0x45,0x13,0x51,0x19,0x11,0x48,0x15,0x82,0x54,0x22,0x20,0x29, + 0x82,0x08,0x4a,0x80,0x28,0xb5,0x11,0x5b,0x91,0x01,0x54,0x01,0x2a,0x54,0x01, + 0x54,0x80,0x01,0xa4,0x02,0x2a,0xb5,0x11,0xb9,0x91,0x08,0x54,0x02,0x24,0xa2, + 0x80,0xa8,0x88,0x08,0x2a,0x04,0x22,0x35,0x91,0xb1,0x99,0x81,0x2a,0x0a,0x02, + 0x14,0x40,0x50,0x28,0x41,0x15,0x05,0x42};
--- a/etc/gnus/gnus-summary-catchup-and-exit-up.xbm Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/gnus/gnus-summary-catchup-and-exit-up.xbm Mon Aug 13 08:46:35 2007 +0200 @@ -1,12 +1,12 @@ #define noname_width 32 #define noname_height 32 static char noname_bits[] = { - 0x00,0x20,0x00,0x81,0xaa,0x0a,0x55,0x28,0x00,0x50,0x80,0x42,0x54,0x05,0x55, - 0x10,0x02,0x28,0x00,0x45,0xa0,0x82,0xaa,0x20,0x0a,0x14,0x00,0x8a,0x41,0xc1, - 0x5f,0x21,0x14,0x9a,0x30,0x84,0x82,0xd4,0x10,0x29,0x28,0x73,0xf0,0x40,0xc4, - 0x60,0x90,0x17,0xd2,0x60,0x08,0x23,0xc0,0xf0,0x0f,0x49,0x8a,0x11,0xfc,0x03, - 0xd0,0x11,0x8c,0x50,0x82,0x12,0x84,0x05,0xa8,0x13,0x84,0x50,0x82,0x17,0x74, - 0x05,0x28,0xfa,0xcf,0x50,0x42,0x93,0x24,0x02,0x55,0x9e,0xbc,0xaa,0xa4,0xf6, - 0x77,0x2a,0x2a,0x95,0x14,0xa5,0x52,0xd6,0x76,0x92,0x29,0xfd,0x1f,0x55,0x52, - 0xdd,0x7c,0x92,0x8a,0x9e,0x1d,0x49,0x2a,0xfd,0xdf,0xaa,0xa5,0xfa,0x27,0x24, - 0x48,0xa4,0xaa,0xa9,0xaa,0x92,0x54,0x4a}; + 0x04,0x41,0x04,0x01,0x51,0x14,0x41,0x54,0x84,0x20,0x2a,0x01,0x21,0x8a,0x00, + 0x54,0x84,0x10,0x55,0x80,0x51,0x44,0x80,0x2a,0x04,0x11,0x15,0x80,0x51,0xa4, + 0x9f,0x2a,0x84,0x98,0x50,0x40,0x21,0xd6,0x10,0x14,0x44,0x73,0xf0,0x21,0xd1, + 0x60,0x90,0x4b,0xc4,0x60,0x08,0x03,0xa1,0xf0,0x0f,0x55,0x94,0x11,0xfc,0x81, + 0x82,0x11,0x8c,0x2a,0xa8,0x12,0x84,0x80,0x84,0x13,0x84,0x2a,0x52,0x17,0x74, + 0x41,0x80,0xfa,0x4f,0x14,0x2a,0x92,0x64,0x20,0x49,0x9f,0xbc,0x96,0x92,0xf6, + 0x67,0xa9,0x55,0x95,0x34,0x4a,0x4a,0x96,0x56,0x29,0x24,0xfd,0x5f,0x95,0xa9, + 0xde,0x3c,0x29,0x2a,0x9d,0x9d,0x92,0x52,0xfe,0x5f,0xaa,0x25,0xf9,0x4f,0x49, + 0x54,0xa5,0x52,0x92,0x4a,0x52,0x29,0x55};
--- a/etc/gnus/gnus-summary-exit-up.xbm Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/gnus/gnus-summary-exit-up.xbm Mon Aug 13 08:46:35 2007 +0200 @@ -1,12 +1,12 @@ #define noname_width 32 #define noname_height 32 static char noname_bits[] = { - 0xee,0xee,0xee,0xee,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, - 0xff,0xee,0x27,0x22,0xef,0xff,0xfc,0x09,0xfe,0xff,0xff,0xaf,0xfe,0xff,0xfc, - 0x0f,0xfe,0xee,0xee,0x5f,0xef,0xff,0xff,0x0e,0xfe,0xff,0xff,0x5f,0xfe,0xff, - 0xfe,0x0f,0xff,0xee,0xee,0x2f,0xee,0xff,0xfd,0x8d,0xfe,0xff,0xfe,0x19,0xff, - 0xff,0xfd,0x49,0xfe,0xee,0xfe,0x2f,0xee,0xff,0xfc,0x0f,0xff,0xff,0xff,0x5f, - 0xfe,0xff,0xff,0x8e,0xfe,0xfe,0xef,0x1f,0xee,0xff,0xfc,0x4f,0xff,0xff,0xfe, - 0xab,0xfe,0xff,0x9e,0x55,0xff,0x6e,0x13,0xee,0xee,0xff,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xee,0xee,0xee,0xee,0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}; + 0x11,0x99,0x19,0x51,0xa4,0x22,0x82,0x14,0x02,0x88,0x28,0x42,0xa8,0x22,0x82, + 0x10,0x11,0xf8,0xff,0x53,0x95,0x17,0xfe,0x11,0x40,0x41,0xf9,0x45,0x14,0x2b, + 0xf0,0x23,0x51,0x95,0xf2,0x99,0x15,0x21,0xf9,0x23,0x40,0x84,0xf4,0x89,0x2a, + 0x23,0xf1,0x21,0x91,0x15,0xf4,0x95,0x24,0x53,0xf7,0x23,0x92,0x05,0xf7,0x89, + 0x00,0xa3,0xfe,0x23,0x5b,0x15,0xf0,0x19,0x10,0x4b,0xf5,0x41,0x42,0x21,0xf0, + 0x0b,0x28,0x0a,0xfb,0x41,0x91,0xb0,0xf0,0x35,0x4a,0x0b,0xf4,0x09,0x20,0xa7, + 0x5c,0xa3,0x8a,0xe1,0xeb,0x10,0xb1,0xfe,0x5d,0x53,0x0a,0x10,0x82,0x14,0xa0, + 0x42,0x28,0x40,0x14,0x14,0x85,0x2a,0x51,0x51,0x31,0x91,0x15,0x15,0x8a,0x24, + 0x40,0xa0,0x10,0x12,0x29,0x0a,0x84,0x40};
--- a/etc/gnus/gnus-summary-followup-up.xbm Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/gnus/gnus-summary-followup-up.xbm Mon Aug 13 08:46:35 2007 +0200 @@ -1,12 +1,12 @@ #define noname_width 32 #define noname_height 32 static char noname_bits[] = { - 0x04,0x24,0x48,0x00,0x63,0x23,0x23,0x76,0x14,0x94,0x54,0x01,0x01,0x21,0x00, - 0x50,0x54,0x84,0x5e,0x05,0x22,0xb3,0x29,0x6a,0x4a,0x64,0x58,0x20,0x10,0x19, - 0x96,0x0a,0x42,0x06,0x37,0x50,0xaa,0x01,0xa3,0x26,0x70,0x80,0x20,0x92,0x45, - 0x00,0xc0,0x20,0x48,0x00,0x40,0x8a,0xb3,0x00,0x80,0x22,0x44,0xe1,0x80,0x29, - 0x91,0x9a,0x00,0x43,0x04,0x86,0x01,0x09,0xd2,0x61,0x01,0x62,0x62,0x70,0x01, - 0x16,0x18,0x30,0x02,0x44,0x06,0x08,0x02,0x14,0x06,0x00,0x02,0x68,0x04,0x00, - 0x04,0x0c,0x0a,0x00,0x08,0x53,0x08,0x00,0xc8,0x04,0x1b,0x00,0x30,0x63,0x14, - 0x00,0x50,0x14,0x21,0x00,0x20,0x41,0x34,0x00,0xa0,0x14,0x42,0x00,0x40,0x62, - 0x4a,0x00,0x40,0x05,0xa0,0x00,0x80,0x50}; + 0x00,0x41,0x08,0x02,0x6a,0x2a,0xa3,0x6a,0x22,0x21,0x2a,0x00,0x08,0x88,0x00, + 0x55,0xa2,0x22,0x5e,0x80,0x2a,0xea,0xa9,0x36,0x50,0x62,0x18,0x42,0x85,0x18, + 0xb6,0x28,0x08,0x06,0x17,0x82,0xe3,0x01,0xa3,0x32,0x74,0x80,0x20,0x42,0x41, + 0x00,0xc0,0x14,0x54,0x00,0x40,0xa0,0xa2,0x00,0x80,0x2b,0x4a,0xe1,0x80,0x44, + 0x90,0x9a,0x00,0x11,0x02,0x86,0x01,0x43,0xd2,0x61,0x01,0x32,0x62,0x70,0x01, + 0x4a,0x1c,0x30,0x02,0x04,0x04,0x08,0x02,0xac,0x07,0x00,0x02,0x28,0x04,0x00, + 0x04,0x4c,0x0a,0x00,0x08,0x13,0x08,0x00,0xc8,0x22,0x1b,0x00,0x70,0x6a,0x10, + 0x00,0x10,0x01,0x2a,0x00,0x60,0x54,0x20,0x00,0x20,0x01,0x6b,0x00,0x40,0x6a, + 0x44,0x00,0xc0,0x04,0xa1,0x00,0x80,0x51};
--- a/etc/gnus/gnus-summary-followup-with-original-up.xbm Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/gnus/gnus-summary-followup-with-original-up.xbm Mon Aug 13 08:46:35 2007 +0200 @@ -1,12 +1,12 @@ #define noname_width 32 #define noname_height 32 static char noname_bits[] = { - 0x00,0x20,0x80,0x00,0x6b,0xab,0x36,0x6a,0x04,0x04,0xa0,0x22,0x51,0xa1,0x0a, - 0x08,0x04,0x0a,0x50,0x51,0xb2,0x62,0x27,0x26,0x42,0x14,0x90,0x90,0x10,0x02, - 0x47,0x24,0x4a,0xa8,0x0f,0x81,0xa2,0x26,0x63,0x36,0x0a,0x92,0x14,0x41,0xa0, - 0x80,0x42,0x28,0x12,0x15,0x88,0x82,0x66,0x62,0x33,0x32,0x00,0x69,0x44,0x49, - 0x54,0x9a,0x11,0x02,0x02,0x86,0x44,0xa8,0xd2,0x71,0xa9,0x26,0x64,0xcc,0x22, - 0x90,0x19,0xe3,0x0a,0x25,0xcc,0xe0,0x24,0x80,0x3a,0x90,0x6c,0x37,0x0a,0x00, - 0x09,0x20,0x04,0x00,0x49,0x4a,0x06,0x00,0x92,0x00,0x0a,0x00,0x32,0x76,0x08, - 0x00,0xa4,0x00,0x15,0x00,0x24,0x54,0x10,0x00,0xc8,0x02,0x2a,0x00,0x48,0x6a, - 0x22,0x00,0x90,0x00,0x54,0x00,0x90,0x55}; + 0x04,0x40,0x40,0x00,0x63,0x37,0x36,0x76,0x14,0x40,0x41,0x01,0x21,0x15,0x10, + 0x52,0x84,0xa0,0x4a,0x08,0x32,0x2a,0x22,0x63,0x42,0xa1,0x94,0x04,0x28,0x0a, + 0x26,0x50,0x82,0x50,0x87,0x82,0x32,0x26,0x6b,0x36,0x42,0xd1,0x22,0x20,0x28, + 0x84,0x88,0x4a,0x82,0x10,0x22,0x00,0x32,0xa6,0xaa,0x76,0xa2,0x68,0x00,0x00, + 0x08,0x9a,0x55,0x55,0xa2,0x86,0x00,0x00,0x92,0x71,0x75,0x6b,0x62,0xcc,0x02, + 0x04,0x1c,0xe3,0x52,0x51,0xc8,0xe0,0x0c,0x82,0x3b,0x90,0xa4,0x32,0x0c,0x00, + 0x19,0x4a,0x05,0x00,0x49,0x01,0x04,0x00,0x12,0x54,0x0a,0x00,0x52,0x23,0x0a, + 0x00,0x24,0x94,0x14,0x00,0x64,0x21,0x10,0x00,0x48,0x84,0x2b,0x00,0x48,0x33, + 0x24,0x00,0x90,0x44,0x51,0x00,0x90,0x11};
--- a/etc/gnus/gnus-summary-mail-copy-up.xbm Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/gnus/gnus-summary-mail-copy-up.xbm Mon Aug 13 08:46:35 2007 +0200 @@ -1,12 +1,12 @@ #define noname_width 32 #define noname_height 32 static char noname_bits[] = { - 0x00,0x08,0x01,0x08,0xaa,0x42,0xa8,0x42,0xfe,0xff,0xff,0x17,0x0e,0x00,0x80, - 0x45,0x32,0x00,0x60,0x0c,0xc2,0x00,0x18,0x54,0x02,0x03,0x06,0x04,0x03,0x8c, - 0x01,0x54,0x02,0x74,0x02,0x04,0x02,0x03,0x0c,0x54,0x82,0x00,0x10,0x84,0xf2, - 0xff,0xff,0x3f,0x52,0x00,0x00,0x6c,0x9b,0x01,0x00,0x23,0x16,0x06,0xc0,0x60, - 0x1e,0x18,0x30,0x20,0x14,0x60,0x0c,0xa0,0x11,0xa0,0x0b,0x20,0x14,0x10,0x30, - 0x60,0x11,0x0c,0x40,0x20,0x14,0x02,0x80,0xa0,0x12,0x01,0x00,0x23,0xd8,0x00, - 0x00,0x64,0x32,0x00,0x00,0x38,0xf8,0xff,0xff,0xbf,0x02,0x00,0x08,0x22,0x54, - 0x55,0xa1,0x88,0x01,0x08,0x14,0x22,0x54,0xa1,0x40,0x84,0x01,0x14,0x2a,0x29, - 0x54,0x41,0x81,0x80,0x02,0x28,0x28,0x2a}; + 0x80,0x20,0x11,0x00,0x2a,0x4a,0x44,0x55,0xfe,0xff,0xff,0x07,0x0e,0x00,0x80, + 0x55,0x32,0x00,0x60,0x84,0xc2,0x00,0x18,0x2c,0x02,0x03,0x06,0x84,0x03,0x8c, + 0x01,0x24,0x02,0x74,0x02,0x94,0x02,0x03,0x0c,0x04,0x82,0x00,0x10,0x2c,0xf2, + 0xff,0xff,0x7f,0x52,0x00,0x00,0x2c,0x9b,0x01,0x00,0x23,0x16,0x06,0xc0,0xa0, + 0x1e,0x18,0x30,0x20,0x12,0x60,0x0c,0x60,0x14,0xa0,0x0b,0x20,0x10,0x10,0x30, + 0xa0,0x1a,0x0c,0x40,0x20,0x10,0x02,0x80,0x60,0x15,0x01,0x00,0x23,0xd0,0x00, + 0x00,0xa4,0x3a,0x00,0x00,0x38,0xf0,0xff,0xff,0x7f,0x94,0x00,0x00,0x08,0x02, + 0x55,0x55,0x21,0x50,0x00,0x00,0x4a,0x82,0xaa,0xaa,0x20,0x28,0x00,0x00,0x08, + 0x42,0x55,0x55,0xa5,0x10,0x00,0x00,0x00};
--- a/etc/gnus/gnus-summary-mail-delete-up.xbm Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/gnus/gnus-summary-mail-delete-up.xbm Mon Aug 13 08:46:35 2007 +0200 @@ -1,12 +1,12 @@ #define noname_width 32 #define noname_height 32 static char noname_bits[] = { - 0x00,0x02,0x80,0x88,0xaa,0xa8,0x2a,0x22,0x00,0x01,0x40,0x88,0xfa,0x55,0x95, - 0x22,0x38,0x03,0x00,0x84,0x8e,0x56,0xf5,0x29,0x14,0x05,0x98,0x89,0x4d,0x5e, - 0x67,0x2e,0x9c,0x1f,0xbf,0xba,0xf1,0xf1,0x0b,0xc9,0x14,0xa5,0xa1,0x88,0xf1, - 0xf9,0x97,0x08,0x5c,0x5f,0xbf,0x09,0x1c,0x1e,0xfe,0x08,0x46,0x45,0x08,0x04, - 0x1c,0x96,0x06,0x04,0x58,0x03,0x02,0x06,0xf5,0xab,0xc1,0x01,0x00,0x80,0x38, - 0x00,0xaa,0x6a,0x07,0x80,0x00,0xe0,0x00,0x40,0x55,0xd5,0x00,0x20,0x00,0x40, - 0x03,0x60,0x54,0x15,0x04,0x10,0x02,0xa0,0x1a,0xa8,0x50,0x15,0x60,0x0c,0x02, - 0x40,0x95,0x25,0xa8,0x2a,0x40,0x42,0x02,0x40,0x15,0x15,0x51,0x15,0x80,0x40, - 0x04,0xa0,0x2a,0x0a,0x51,0x15,0x00,0x41}; + 0x04,0x10,0x82,0x40,0xa1,0x8a,0x28,0x14,0x14,0x20,0x42,0x42,0xf1,0x15,0x91, + 0x20,0x5c,0x43,0x04,0x95,0x8d,0x2e,0xf1,0x00,0x14,0x86,0x9c,0x5b,0x8e,0x2e, + 0xe6,0x0c,0x38,0x9f,0x1f,0x7a,0xf5,0xf1,0xa3,0xc9,0x48,0xb5,0x84,0x88,0xf2, + 0xf1,0xd3,0x08,0x18,0x9f,0x3f,0x09,0xae,0x2e,0xfe,0x08,0x14,0x95,0x0c,0x04, + 0x4e,0x06,0x04,0x04,0x18,0x57,0x03,0x06,0xfa,0x01,0xc1,0x01,0xa0,0xaa,0x38, + 0x00,0x14,0x40,0x07,0x80,0x42,0xf5,0x00,0x40,0x20,0xc0,0x00,0x20,0x8a,0x2a, + 0x03,0x60,0x41,0x00,0x05,0x10,0x14,0x55,0x1c,0xa8,0x82,0x00,0x61,0x0c,0x28, + 0x55,0xa4,0x25,0x45,0x00,0x09,0x4a,0x10,0x95,0xa0,0x00,0x8a,0x20,0x14,0x55, + 0x20,0x8a,0x40,0x80,0x14,0x21,0x2a,0x2a};
--- a/etc/gnus/gnus-summary-mail-forward-up.xbm Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/gnus/gnus-summary-mail-forward-up.xbm Mon Aug 13 08:46:35 2007 +0200 @@ -1,12 +1,12 @@ #define noname_width 32 #define noname_height 32 static char noname_bits[] = { - 0x08,0x02,0x08,0x02,0x82,0xa8,0xa2,0x50,0x78,0x02,0x08,0x09,0x56,0x50,0x45, - 0x42,0xcc,0x02,0x50,0x08,0xa2,0x50,0xe5,0x52,0xc8,0x0b,0x38,0x81,0xa2,0x82, - 0x26,0x2a,0xb4,0x2d,0x12,0x86,0x51,0x84,0x11,0x2c,0x74,0xad,0x08,0x98,0xb1, - 0x64,0x08,0x10,0x14,0x16,0x08,0x60,0xa2,0x0a,0x04,0x20,0x08,0x06,0xfc,0x7f, - 0xa2,0x02,0x02,0x60,0x08,0x01,0x03,0x18,0xd2,0xe0,0x01,0x4c,0x20,0x3e,0x00, - 0x22,0xf5,0x21,0x00,0x09,0x30,0x20,0x80,0xa2,0x14,0x10,0xc0,0x08,0x32,0x10, - 0x30,0x22,0x60,0x10,0x88,0x48,0xca,0x10,0x54,0x22,0xa0,0x10,0x0a,0x08,0x8a, - 0x11,0xa1,0xa2,0x20,0xca,0x14,0x08,0x92,0xac,0x42,0x51,0x04,0x3d,0x20,0x04, - 0x10,0x84,0x8a,0x28,0x4a,0x21,0x20,0x42}; + 0x10,0x01,0x01,0x02,0x45,0x54,0xa8,0x50,0x38,0x81,0x02,0x85,0x66,0x28,0x50, + 0x20,0xcc,0x42,0x45,0x85,0x92,0x10,0xf0,0x28,0xc0,0x4b,0x3d,0x83,0xea,0x02, + 0x24,0x22,0x90,0x56,0x13,0x8e,0xda,0x0c,0x11,0x2c,0x70,0xa4,0x08,0x88,0x35, + 0x6d,0x08,0x30,0x50,0x14,0x08,0xa0,0x14,0x0b,0x04,0x20,0x42,0x04,0xfc,0x7f, + 0x10,0x03,0x02,0x60,0x22,0x01,0x03,0x18,0xc8,0xe0,0x01,0x44,0x22,0x3e,0x00, + 0x0a,0xf0,0x21,0x00,0x51,0x3a,0x20,0x80,0x02,0x10,0x10,0x40,0x54,0x22,0x10, + 0xb0,0x80,0x74,0x10,0x28,0x2a,0xc0,0x10,0x84,0x80,0xaa,0x10,0x2a,0x2a,0x40, + 0x11,0x41,0x40,0x15,0xca,0x14,0x15,0xa0,0xac,0x20,0x20,0x0a,0x3e,0x8a,0x4a, + 0x50,0x80,0x10,0x00,0x04,0x55,0x44,0x55};
--- a/etc/gnus/gnus-summary-mail-get-up.xbm Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/gnus/gnus-summary-mail-get-up.xbm Mon Aug 13 08:46:35 2007 +0200 @@ -1,12 +1,12 @@ #define noname_width 32 #define noname_height 32 static char noname_bits[] = { - 0x00,0x00,0x41,0x00,0x55,0x55,0x14,0x55,0x00,0x80,0x40,0x00,0xaa,0x2a,0x2a, - 0x54,0x00,0x40,0x80,0x02,0xd4,0x17,0x7d,0x50,0x42,0x25,0x54,0x85,0x68,0x88, - 0x86,0x20,0x12,0x75,0x51,0x87,0xb0,0xb0,0x0b,0x2b,0x1a,0x90,0x01,0x41,0x20, - 0x28,0x82,0x15,0x62,0x8c,0xc6,0x20,0x94,0x2b,0x38,0x4a,0x20,0x42,0xa5,0x00, - 0xf5,0xff,0xff,0x7f,0x78,0x00,0x00,0x2c,0x92,0x01,0x00,0x63,0x18,0x06,0xc0, - 0x20,0x12,0x18,0x30,0x60,0x18,0x60,0x0c,0x20,0x12,0x90,0x0b,0x20,0x10,0x0c, - 0x30,0x60,0x1a,0x02,0x40,0x20,0x10,0x01,0x80,0xa0,0xd5,0x00,0x00,0x23,0x30, - 0x00,0x00,0x64,0x1a,0x00,0x00,0x38,0xf0,0xff,0xff,0xbf,0x8a,0x00,0x00,0x20, - 0x10,0xaa,0xaa,0x8a,0xa4,0x04,0x00,0x20}; + 0x00,0x04,0x10,0x22,0x55,0x41,0x85,0x08,0x00,0x2a,0x28,0xa2,0xa9,0x80,0x82, + 0x10,0x04,0x15,0x14,0x45,0xc1,0x43,0x79,0x10,0x54,0x0c,0x44,0x45,0xa1,0x4a, + 0xab,0x20,0x14,0x58,0x85,0x87,0xb2,0xb2,0x21,0x2b,0x18,0xb0,0x01,0x81,0x22, + 0x08,0x82,0x2a,0x68,0x5c,0xc6,0x40,0x85,0x83,0x3a,0x15,0x50,0x0a,0x24,0x20, + 0xf4,0xff,0xff,0x7f,0x72,0x00,0x00,0x2c,0x90,0x01,0x00,0x23,0x1a,0x06,0xc0, + 0x60,0x10,0x18,0x30,0x20,0x12,0x60,0x0c,0xa0,0x18,0x90,0x0b,0x20,0x12,0x0c, + 0x30,0x60,0x10,0x02,0x40,0x20,0x1a,0x01,0x80,0xa0,0xd0,0x00,0x00,0x23,0x32, + 0x00,0x00,0x64,0x18,0x00,0x00,0x38,0xf2,0xff,0xff,0xbf,0x20,0x10,0x91,0x24, + 0x8a,0x42,0x44,0x90,0x41,0x14,0x11,0x05};
--- a/etc/gnus/gnus-summary-mail-originate-up.xbm Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/gnus/gnus-summary-mail-originate-up.xbm Mon Aug 13 08:46:35 2007 +0200 @@ -1,12 +1,12 @@ #define noname_width 32 #define noname_height 32 static char noname_bits[] = { - 0x00,0x80,0x10,0x00,0xaa,0x2a,0x44,0x55,0x00,0xc0,0xff,0x8f,0x55,0x95,0x00, - 0x34,0x00,0xa0,0x00,0x24,0xaa,0x8a,0x00,0x7c,0xf8,0xff,0x1f,0x20,0x2a,0x40, - 0x68,0x20,0xf8,0xff,0x1f,0x60,0x4a,0x92,0x00,0x20,0x20,0xc8,0x00,0xa0,0x8a, - 0x82,0xfc,0x21,0xfc,0xff,0x00,0xa0,0x1d,0x80,0x6c,0x21,0x64,0x80,0x00,0x60, - 0x86,0x81,0x00,0x20,0x04,0x86,0x00,0xa0,0x05,0x98,0x00,0x20,0x04,0xe4,0x00, - 0x60,0x06,0x83,0x80,0x25,0x84,0x80,0x00,0xa0,0x45,0x80,0x00,0x20,0x34,0x80, - 0x00,0x60,0x0e,0x80,0xff,0x3f,0x04,0x00,0x00,0x4e,0xfd,0xff,0xff,0x1f,0x44, - 0x44,0x08,0xa0,0x11,0x11,0xa2,0x0a,0x44,0x44,0x09,0x90,0x11,0x21,0x40,0x25, - 0x44,0x94,0x0a,0x80,0x11,0x02,0xa0,0x2a}; + 0x80,0x00,0x20,0x00,0x2a,0xa8,0x0a,0x55,0x40,0x85,0xff,0x0f,0x2a,0xa0,0x00, + 0x54,0x80,0x8a,0x00,0x24,0x55,0xc0,0x00,0x7c,0xf8,0xff,0x1f,0x20,0x2a,0x11, + 0x68,0x60,0xf8,0xff,0x1f,0x20,0x25,0x88,0x00,0x20,0x90,0xa2,0x00,0x60,0x04, + 0xc8,0xfc,0x21,0xfe,0xff,0x00,0xa0,0x1c,0x80,0x6c,0x21,0x66,0x80,0x00,0xa0, + 0x84,0x81,0x00,0x20,0x04,0x86,0x00,0x60,0x06,0x98,0x00,0x20,0x04,0xe4,0x00, + 0xa0,0x05,0x83,0x80,0x25,0x84,0x80,0x00,0x60,0x46,0x80,0x00,0x20,0x34,0x80, + 0x00,0xa0,0x0d,0x80,0xff,0x3f,0x04,0x00,0x00,0x2e,0xfe,0xff,0xff,0x4f,0x48, + 0x04,0x21,0x12,0x12,0x51,0x88,0x44,0x40,0x84,0x22,0x10,0x15,0x21,0x10,0x45, + 0x20,0x4a,0x45,0x08,0x8a,0x10,0x20,0x42};
--- a/etc/gnus/gnus-summary-mail-reply-up.xbm Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/gnus/gnus-summary-mail-reply-up.xbm Mon Aug 13 08:46:35 2007 +0200 @@ -1,12 +1,12 @@ #define noname_width 32 #define noname_height 32 static char noname_bits[] = { - 0x80,0x00,0x20,0x84,0x2a,0xaa,0x7a,0x21,0x80,0x00,0x88,0x85,0x2a,0xa9,0x06, - 0x2e,0x00,0xc4,0x05,0x88,0x54,0x31,0x12,0x28,0x02,0x0e,0x11,0x84,0xa0,0x03, - 0x09,0x2a,0xca,0x80,0x04,0x82,0x21,0x40,0x04,0x2f,0x9c,0x49,0x80,0x98,0x39, - 0x20,0x41,0x36,0xcc,0x10,0xc1,0x11,0x09,0x93,0x60,0x50,0x08,0x1c,0x18,0x10, - 0x0c,0x30,0x06,0x50,0x0a,0xc8,0x05,0x10,0x08,0x06,0x18,0x50,0x0a,0x01,0x20, - 0x10,0x88,0x00,0x40,0x50,0x6a,0x00,0x80,0x91,0x18,0x00,0x00,0x32,0x0a,0x00, - 0x00,0x9c,0xf9,0xff,0xff,0x3f,0x44,0x00,0x00,0x80,0x11,0xaa,0xaa,0x2a,0xa4, - 0x00,0x00,0x80,0x09,0xaa,0xaa,0x2a,0xa0,0x00,0x00,0x80,0x0a,0xa9,0xaa,0x2a, - 0x10,0x04,0x00,0x40,0x45,0x51,0x55,0x15}; + 0x80,0x00,0x20,0x00,0x2a,0x54,0x75,0x55,0x40,0x01,0x88,0x81,0x15,0xa8,0x06, + 0x2e,0xa0,0xc2,0x05,0x88,0x14,0x38,0x12,0x28,0x42,0x0d,0x11,0x84,0x10,0x03, + 0x09,0x2a,0xe2,0x80,0x04,0x42,0x28,0x40,0x04,0x17,0x9a,0x49,0x80,0x58,0x38, + 0x20,0x41,0x16,0xca,0x10,0xc1,0xb1,0x08,0x93,0x60,0x10,0x0a,0x1c,0x18,0x50, + 0x09,0x30,0x06,0x10,0x0c,0xc8,0x05,0xb0,0x09,0x06,0x18,0x10,0x0c,0x01,0x20, + 0x50,0x88,0x00,0x40,0x10,0x6a,0x00,0x80,0xb1,0x18,0x00,0x00,0x12,0x0a,0x00, + 0x00,0x5c,0xf8,0xff,0xff,0x1f,0x02,0x00,0x44,0x52,0x54,0x55,0x11,0x08,0x00, + 0x80,0x44,0xa1,0xaa,0x2a,0x20,0x14,0x00,0x90,0x8a,0x40,0x55,0x25,0x20,0x15, + 0x00,0x80,0x0a,0xa0,0x54,0x55,0xa0,0x0a};
--- a/etc/gnus/gnus-summary-mail-save-up.xbm Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/gnus/gnus-summary-mail-save-up.xbm Mon Aug 13 08:46:35 2007 +0200 @@ -1,12 +1,12 @@ #define noname_width 32 #define noname_height 32 static char noname_bits[] = { - 0x40,0x08,0x20,0x80,0x15,0x82,0x0a,0x25,0xa0,0x54,0x50,0x10,0x8a,0xff,0xff, - 0x7f,0x90,0x03,0x00,0xf0,0xc4,0x0c,0x00,0x4c,0x92,0x30,0x00,0x43,0x80,0xc0, - 0xc0,0x40,0xaa,0x80,0x33,0x40,0x81,0x60,0xcc,0x40,0xd4,0x10,0x00,0xc1,0x82, - 0x08,0x00,0x46,0xa8,0x06,0x00,0x58,0xfd,0xff,0x0f,0x60,0x2c,0x00,0x0d,0xc0, - 0x35,0x00,0xfb,0x7f,0x2c,0x11,0x0d,0x11,0x35,0x00,0x5b,0x44,0x2c,0x00,0x89, - 0x08,0x26,0x49,0x2d,0x42,0x3c,0x00,0x8b,0x28,0x25,0x00,0x5b,0x04,0xec,0xff, - 0x0d,0x51,0x56,0x5b,0x99,0x08,0xac,0xa4,0x4a,0xa2,0xe5,0xff,0x1b,0x10,0x6c, - 0x3b,0x4d,0x45,0xed,0x2a,0x19,0x10,0xb4,0x2d,0x4b,0x45,0xaa,0x36,0x1b,0x10, - 0xf8,0xff,0x4f,0x45,0x42,0x80,0x20,0x20}; + 0x08,0x00,0x02,0x80,0xa2,0xaa,0xa0,0x2a,0x08,0x00,0x15,0x80,0xc2,0xff,0xff, + 0x7f,0x94,0x03,0x00,0x70,0xa1,0x0c,0x00,0x4c,0x84,0x30,0x00,0xc3,0xd1,0xc0, + 0xc0,0x40,0x84,0x80,0x33,0x40,0xc8,0x60,0xcc,0x40,0xa2,0x10,0x00,0xc1,0x88, + 0x08,0x00,0x46,0xa2,0x06,0x00,0x58,0xfc,0xff,0x0f,0x60,0x36,0x00,0x0b,0xc0, + 0x2c,0x10,0xfd,0x7f,0x34,0x01,0x4b,0x12,0x2d,0x40,0x19,0x44,0x34,0x04,0x4b, + 0x11,0xad,0x00,0x2d,0x44,0x34,0x10,0x8b,0x10,0x2d,0x00,0x2d,0x45,0xf4,0xff, + 0x0b,0x08,0x4d,0xad,0xac,0x42,0x94,0x52,0x09,0x14,0xed,0xff,0x5d,0x41,0x74, + 0x2d,0x0b,0x0a,0xed,0x36,0xab,0x50,0xb4,0x35,0x0d,0x81,0xaa,0x3a,0x59,0x2a, + 0xf8,0xff,0x0f,0x80,0x42,0x00,0xa5,0x2a};
--- a/etc/gnus/gnus-summary-next-unread-up.xbm Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/gnus/gnus-summary-next-unread-up.xbm Mon Aug 13 08:46:35 2007 +0200 @@ -1,12 +1,12 @@ #define noname_width 32 #define noname_height 32 static char noname_bits[] = { - 0x20,0x02,0x40,0x10,0xab,0x6a,0x37,0x26,0x04,0x10,0x40,0x51,0x51,0x05,0x15, - 0x04,0x04,0xa8,0x4e,0x51,0x62,0xa3,0x39,0x26,0x0a,0x6a,0x98,0x90,0xa0,0x18, - 0x56,0x24,0x0a,0x07,0x17,0x81,0xa2,0x01,0x63,0x36,0x6a,0x80,0x20,0x41,0x60, - 0x00,0x40,0x28,0x4a,0x00,0xc0,0x82,0xa2,0x00,0x80,0x32,0x2a,0xe1,0x80,0x44, - 0x80,0x9a,0x00,0x11,0x2a,0x86,0x01,0xa3,0x82,0x61,0x01,0x2a,0x6a,0x70,0x01, - 0x22,0x18,0x30,0x02,0x4c,0x06,0x08,0x02,0x04,0x06,0x00,0x02,0x68,0x04,0x00, - 0x04,0x1c,0xca,0x07,0x7c,0x43,0x68,0x0d,0xea,0x0a,0x9b,0x12,0x49,0x63,0x34, - 0x5a,0x93,0x15,0x51,0xb5,0x49,0x41,0xb4,0x18,0xab,0x25,0xe2,0x0a,0xd6,0x2a, - 0xca,0x07,0x7c,0x42,0xa0,0x00,0x80,0x20}; + 0x80,0x80,0x10,0x10,0x36,0x36,0xa6,0x66,0x40,0xa1,0x10,0x02,0x2a,0x08,0xa4, + 0x50,0x80,0xa2,0x0e,0x05,0x36,0xaa,0x69,0x6a,0xa0,0x60,0x18,0x01,0x0a,0x1d, + 0x56,0x50,0x10,0x06,0x97,0x0a,0xe6,0x01,0x23,0x62,0x70,0x80,0x60,0x09,0x45, + 0x00,0x40,0x44,0x50,0x00,0x40,0x11,0xa6,0x00,0x80,0x66,0x48,0xe1,0x80,0x10, + 0x22,0x9a,0x00,0x45,0x84,0x86,0x01,0x13,0xa3,0x61,0x01,0x62,0x74,0x70,0x01, + 0x0a,0x18,0x30,0x02,0x44,0x06,0x08,0x02,0x0c,0x06,0x00,0x02,0x68,0x04,0x00, + 0x04,0x2c,0xca,0x07,0x7c,0x0b,0xa8,0x0a,0xd6,0xa4,0x36,0x19,0xa1,0x23,0x50, + 0x5a,0xab,0x95,0x35,0xb5,0x2b,0x21,0x70,0x19,0x49,0x83,0x6a,0x0a,0xe6,0x36, + 0xe2,0x07,0x7c,0x40,0x88,0x00,0x80,0x2a};
--- a/etc/gnus/gnus-summary-post-news-up.xbm Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/gnus/gnus-summary-post-news-up.xbm Mon Aug 13 08:46:35 2007 +0200 @@ -1,12 +1,12 @@ #define noname_width 32 #define noname_height 32 static char noname_bits[] = { - 0x40,0x20,0x12,0x00,0x36,0xaa,0x22,0x6b,0x40,0x05,0x4a,0x24,0x2a,0xa0,0x10, - 0x01,0x80,0x0a,0x4f,0x54,0x6b,0xa2,0x29,0x23,0x04,0x69,0x38,0x94,0x51,0x1a, - 0x16,0x21,0x04,0x06,0xb7,0x84,0xe2,0x01,0x23,0x32,0x6a,0x80,0xa0,0x42,0x40, - 0x00,0x40,0x10,0x6a,0x00,0xc0,0x4a,0xa2,0x00,0x80,0x22,0x8a,0x00,0x80,0x2a, - 0x50,0x01,0x00,0x41,0x82,0x01,0x00,0x05,0x32,0x02,0x00,0x72,0x42,0x03,0x00, - 0x0a,0x28,0x04,0x00,0x44,0x82,0x04,0x00,0x14,0x32,0x0b,0x00,0x68,0x42,0x0c, - 0x00,0x0c,0x14,0x11,0x80,0x53,0x20,0x14,0x40,0x05,0x2b,0x2b,0x70,0x6a,0x24, - 0x20,0x0e,0x01,0x41,0xd5,0x53,0x50,0x14,0x20,0x09,0x85,0x22,0x6b,0x62,0x32, - 0x4a,0x04,0x85,0x44,0x10,0x41,0x28,0x11}; + 0x80,0x10,0x00,0x10,0x36,0x66,0x6b,0x67,0xa0,0x10,0x04,0x10,0x0a,0x05,0x51, + 0x45,0x10,0xa8,0x0e,0x10,0x66,0xa3,0xb9,0x66,0x12,0x6a,0x18,0x11,0x80,0x18, + 0x56,0x04,0x2a,0x06,0x17,0x51,0xa2,0x01,0x63,0x26,0x6a,0x80,0x20,0x51,0x60, + 0x00,0x40,0x04,0x52,0x00,0xc0,0x50,0xa6,0x00,0x80,0x26,0x90,0x00,0x80,0x48, + 0x85,0x01,0x00,0x13,0x50,0x01,0x00,0x41,0x2a,0x02,0x00,0x36,0xa2,0x02,0x00, + 0x42,0x08,0x04,0x00,0x14,0xa2,0x06,0x00,0xa4,0x2a,0x0a,0x00,0x28,0xa0,0x0c, + 0x00,0x9c,0x0a,0x11,0x80,0x23,0x10,0x14,0x40,0x8a,0x66,0x23,0xb0,0x22,0x12, + 0x34,0x4e,0x2a,0x00,0xc1,0x13,0x40,0xaa,0x14,0xa2,0x12,0x22,0xa2,0x2a,0x66, + 0x4a,0x25,0x22,0x01,0x10,0x88,0x48,0x50};
--- a/etc/gnus/gnus-summary-prev-unread-up.xbm Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/gnus/gnus-summary-prev-unread-up.xbm Mon Aug 13 08:46:35 2007 +0200 @@ -1,12 +1,12 @@ #define noname_width 32 #define noname_height 32 static char noname_bits[] = { - 0x44,0x20,0x24,0x00,0x32,0x2b,0x23,0x77,0x42,0x44,0x94,0x00,0x10,0x11,0x21, - 0x52,0x4a,0x44,0x8e,0x08,0x22,0xaa,0x39,0x62,0x4a,0x61,0x58,0x05,0x10,0x1c, - 0x16,0x50,0x42,0x07,0xb7,0x82,0xb2,0x01,0x23,0x36,0x62,0x80,0xa0,0x20,0x54, - 0x00,0x40,0x48,0x40,0x00,0xc0,0x02,0xb6,0x00,0x40,0x6a,0x20,0xe1,0xc0,0x27, - 0xca,0x9b,0xa0,0x0e,0x40,0x87,0x31,0xb9,0xeb,0x61,0x95,0x34,0x64,0x70,0xbb, - 0x9a,0x19,0x30,0x51,0x32,0x04,0x08,0xa2,0x8c,0x06,0x00,0xc2,0x37,0x06,0x00, - 0x84,0x42,0x08,0x00,0xe4,0x14,0x0a,0x00,0x18,0xa0,0x12,0x00,0x50,0x2b,0x1a, - 0x00,0x10,0x44,0x20,0x00,0x60,0x11,0x2a,0x00,0x20,0x44,0x22,0x00,0x40,0x33, - 0x4a,0x00,0x40,0x44,0xa0,0x00,0x80,0x11}; + 0x08,0x08,0x22,0x00,0x63,0xa3,0xaa,0x76,0x14,0x2a,0x00,0x02,0x81,0x80,0xaa, + 0x50,0x54,0x2a,0x0e,0x05,0x22,0xa2,0x69,0x62,0x4a,0x65,0x18,0x09,0x10,0x18, + 0x56,0x52,0x42,0x07,0x17,0x00,0xb2,0x01,0x63,0x77,0x62,0x80,0x20,0x00,0x54, + 0x00,0x40,0x55,0x40,0x00,0x40,0x00,0xb6,0x00,0x40,0x6b,0xa0,0xe1,0xc0,0x27, + 0x8a,0x9f,0xa0,0x0e,0x50,0x86,0x31,0xb9,0xe6,0x61,0x95,0x34,0x62,0x70,0xbb, + 0x9a,0x18,0x30,0x51,0x32,0x06,0x08,0xa2,0x8c,0x06,0x00,0xc2,0x37,0x04,0x00, + 0x84,0x42,0x0a,0x00,0xe4,0x14,0x08,0x00,0x18,0xa0,0x1b,0x00,0x50,0x2b,0x14, + 0x00,0x10,0x44,0x21,0x00,0x60,0x11,0x34,0x00,0x20,0x22,0x22,0x00,0xc0,0x6a, + 0x52,0x00,0x40,0x00,0x84,0x00,0x80,0x55};
--- a/etc/gnus/gnus-summary-reply-up.xbm Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/gnus/gnus-summary-reply-up.xbm Mon Aug 13 08:46:35 2007 +0200 @@ -1,12 +1,12 @@ #define noname_width 32 #define noname_height 32 static char noname_bits[] = { - 0x90,0x20,0x10,0x02,0x05,0x0a,0x85,0x50,0xa8,0x50,0x28,0x05,0x02,0x04,0x42, - 0x50,0xa8,0x52,0x09,0x09,0x05,0x00,0x48,0x42,0x50,0x55,0x35,0x08,0x0a,0xe0, - 0xc2,0x52,0xa0,0x1a,0x81,0x81,0x14,0x86,0x00,0x2a,0xc2,0x41,0x00,0x83,0x68, - 0x40,0x80,0x2f,0x1a,0x20,0x80,0x99,0xb4,0x1a,0xc0,0x3e,0x0e,0x08,0x60,0xb1, - 0x74,0x08,0x70,0x2e,0x84,0x04,0x98,0xa1,0x05,0x03,0x5c,0x20,0x04,0x0c,0x36, - 0xa0,0x06,0x10,0x0f,0x60,0x05,0x70,0x07,0xa0,0x04,0xc8,0x09,0x60,0x05,0x04, - 0x10,0x20,0x06,0x02,0x20,0xa0,0x86,0x01,0xc0,0x60,0x45,0x00,0x00,0x21,0x26, - 0x00,0x00,0x62,0x1c,0x00,0x00,0xbc,0x0d,0x00,0x00,0x30,0xfe,0xff,0xff,0xbf, - 0x54,0x55,0x29,0x55,0x25,0x22,0x4a,0x49}; + 0x40,0x08,0x88,0x20,0x14,0xa2,0x22,0x0a,0x42,0x09,0x88,0x50,0x28,0x90,0x22, + 0x04,0x82,0x42,0x88,0x28,0x50,0x10,0x2a,0x42,0x02,0x45,0xb5,0x08,0xa8,0xf0, + 0x42,0x44,0x02,0x1a,0x81,0x13,0xa8,0x86,0x00,0x42,0x82,0x41,0x00,0x0b,0x70, + 0x40,0x80,0x57,0x1a,0x20,0x80,0x19,0xb4,0x1a,0xc0,0x6e,0x0e,0x08,0x60,0x31, + 0x74,0x08,0x70,0x6e,0x86,0x04,0x98,0x21,0x04,0x03,0x5c,0x60,0x04,0x0c,0x36, + 0x20,0x06,0x10,0x0f,0x60,0x05,0x70,0x07,0xa0,0x04,0xc8,0x09,0x60,0x05,0x04, + 0x10,0x20,0x06,0x02,0x20,0xa0,0x86,0x01,0xc0,0x60,0x45,0x00,0x00,0x21,0x24, + 0x00,0x00,0x62,0x1e,0x00,0x00,0xbc,0x0d,0x00,0x00,0x30,0xfc,0xff,0xff,0xbf, + 0x55,0x4a,0x92,0xaa,0x92,0x52,0x55,0x49};
--- a/etc/gnus/gnus-summary-reply-with-original-up.xbm Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/gnus/gnus-summary-reply-with-original-up.xbm Mon Aug 13 08:46:35 2007 +0200 @@ -1,12 +1,12 @@ #define noname_width 32 #define noname_height 32 static char noname_bits[] = { - 0x20,0x20,0x00,0x41,0x8a,0x0a,0x55,0x14,0x20,0x50,0x80,0x40,0x0a,0x05,0x2a, - 0x2a,0x50,0xa8,0x47,0x80,0x05,0x82,0x1a,0x2a,0xa8,0x68,0x72,0x81,0x02,0x22, - 0x42,0x28,0xa8,0x18,0x81,0x85,0x05,0x16,0x01,0x23,0xd0,0x09,0xc1,0x8b,0x64, - 0x04,0x3d,0x27,0x1a,0xc3,0x83,0x99,0x84,0x40,0xc0,0x30,0x4e,0x7c,0x60,0xb1, - 0xf4,0x23,0x70,0x2e,0x84,0x20,0x98,0xa1,0x06,0x13,0x5c,0x20,0x04,0x1c,0x36, - 0x60,0x06,0x30,0x0f,0x20,0x06,0x70,0x07,0x60,0x05,0xc8,0x09,0xa0,0x04,0x04, - 0x10,0xa0,0x06,0x02,0x20,0x60,0x85,0x01,0xc0,0xa0,0x44,0x00,0x00,0x61,0x25, - 0x00,0x00,0x22,0x1e,0x00,0x00,0xbc,0x0e,0x00,0x00,0x70,0xfd,0xff,0xff,0x3f, - 0x54,0x95,0x24,0x55,0x25,0xa2,0xaa,0xa2}; + 0x00,0x22,0x04,0x10,0xaa,0x08,0x51,0x45,0x00,0x22,0x04,0x08,0xaa,0x88,0xa2, + 0x42,0x00,0x11,0x17,0x14,0x54,0xc4,0x4a,0x41,0x82,0x48,0x32,0x0a,0x28,0x22, + 0xc2,0x50,0x82,0x18,0x81,0x05,0x20,0x17,0x01,0x43,0x8a,0x09,0xc1,0x17,0x61, + 0x04,0x3d,0x47,0x1c,0xc3,0x83,0x18,0x85,0x40,0xc0,0x71,0x4c,0x7c,0x60,0x30, + 0xf5,0x23,0xb0,0x6e,0x84,0x20,0xb8,0x21,0x06,0x13,0x4c,0x20,0x04,0x1c,0x36, + 0xa0,0x06,0x30,0x0f,0x60,0x06,0x70,0x07,0xa0,0x05,0xc8,0x09,0x60,0x06,0x04, + 0x10,0x20,0x04,0x02,0x20,0xa0,0x85,0x01,0xc0,0x60,0x46,0x00,0x00,0x21,0x24, + 0x00,0x00,0x62,0x1e,0x00,0x00,0xbc,0x0d,0x00,0x00,0x30,0xfd,0xff,0xff,0xbf, + 0xaa,0xaa,0x2a,0x55,0x49,0x92,0x44,0x49};
--- a/etc/gnus/gnus-summary-save-article-file-up.xbm Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/gnus/gnus-summary-save-article-file-up.xbm Mon Aug 13 08:46:35 2007 +0200 @@ -1,12 +1,12 @@ #define noname_width 32 #define noname_height 32 static char noname_bits[] = { - 0x10,0x84,0x00,0x02,0x45,0x21,0xaa,0x50,0x10,0x8a,0x00,0x09,0x84,0xfc,0xff, - 0x43,0x12,0x06,0x00,0x0d,0xa0,0x04,0x00,0x59,0x0a,0x06,0x00,0x11,0x80,0x04, - 0x00,0x5f,0x2a,0x06,0x00,0x10,0x81,0x04,0x00,0x50,0x14,0x06,0x00,0x10,0xa1, - 0x04,0x00,0x50,0x04,0x06,0x00,0x90,0xfd,0xff,0x0f,0x30,0x2c,0x00,0x0b,0x90, - 0x75,0x00,0x0d,0x30,0x2c,0x40,0x0d,0x10,0x2d,0x08,0x0b,0x50,0x34,0x01,0x0d, - 0x10,0x2c,0x00,0x0b,0x50,0x36,0x08,0x09,0x10,0x24,0x41,0x0d,0x50,0xee,0xff, - 0x0b,0x90,0xac,0xaa,0x0c,0x30,0x54,0x92,0x0a,0x90,0xed,0xff,0xfb,0x3f,0xb4, - 0x2d,0x0d,0x81,0xe6,0x36,0x59,0x28,0xac,0x3a,0x8b,0x82,0xb9,0x35,0x2d,0x28, - 0xf4,0xff,0x8f,0x82,0x41,0x00,0x51,0x20}; + 0x10,0x20,0x00,0x20,0x85,0x8a,0xaa,0x0a,0x28,0x10,0x00,0x50,0x82,0xfe,0xff, + 0x0b,0x48,0x04,0x00,0xa5,0x12,0x05,0x00,0x09,0x40,0x04,0x00,0x31,0x15,0x06, + 0x00,0x5f,0xa0,0x04,0x00,0x10,0x0a,0x04,0x00,0x50,0x50,0x05,0x00,0x10,0x05, + 0x04,0x00,0x50,0xa8,0x06,0x00,0x30,0xfd,0xff,0x0f,0x10,0x34,0x00,0x0b,0xb0, + 0x2d,0x40,0x0d,0x10,0x34,0x04,0x0b,0x50,0x2d,0x00,0x0d,0x10,0x34,0x21,0x0b, + 0xb0,0x2d,0x00,0x0b,0x10,0x34,0x04,0x0d,0x30,0x2d,0x00,0x0b,0x50,0xf4,0xff, + 0x0d,0x10,0xad,0xb5,0x0a,0x50,0x24,0x4a,0x09,0x10,0xed,0xff,0xfd,0x5f,0xf4, + 0x36,0x4b,0x12,0x6d,0x35,0x2d,0x44,0xb4,0x2d,0x89,0x10,0xea,0x36,0x2f,0x45, + 0xf8,0xff,0x8f,0x10,0x02,0x80,0x20,0x44};
--- a/etc/gnus/gnus-summary-save-article-up.xbm Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/gnus/gnus-summary-save-article-up.xbm Mon Aug 13 08:46:35 2007 +0200 @@ -1,12 +1,12 @@ #define noname_width 32 #define noname_height 32 static char noname_bits[] = { - 0x84,0x00,0x20,0x10,0x21,0xa8,0x0a,0x45,0x94,0x02,0x50,0x08,0x81,0xff,0xff, - 0x7f,0xd4,0x03,0x00,0xf0,0x81,0x0c,0x00,0x4c,0x94,0x30,0x00,0x43,0xa1,0xc0, - 0xc0,0x40,0x84,0x80,0x33,0xc0,0xd1,0x60,0xcc,0x40,0x84,0x10,0x00,0x41,0xa1, - 0x08,0x00,0x46,0x94,0x06,0x00,0xd8,0xfd,0xff,0x0f,0x60,0x34,0x00,0x0b,0x40, - 0x2d,0x22,0xfd,0x7f,0x34,0x00,0x4b,0x24,0x2d,0x08,0x1b,0x41,0x34,0x01,0x4d, - 0x14,0x2d,0x40,0x19,0x42,0x34,0x00,0x4b,0x09,0x2d,0x11,0x1b,0x40,0xf4,0xff, - 0x4d,0x15,0xad,0xaa,0x1a,0x40,0x44,0x92,0x4c,0x15,0xf6,0xff,0x0b,0x40,0x6c, - 0x3b,0xad,0x0a,0xb5,0x2d,0x19,0x40,0x6c,0x35,0x4b,0x15,0xaa,0x36,0x2d,0x40, - 0xf8,0xff,0x8f,0x0a,0x82,0x00,0x51,0x50}; + 0x00,0x08,0x01,0x40,0xaa,0x42,0x54,0x15,0x00,0x14,0x01,0x20,0xd4,0xff,0xff, + 0x7f,0x82,0x03,0x00,0xf0,0xd0,0x0c,0x00,0x4c,0x82,0x30,0x00,0x43,0xa8,0xc0, + 0xc0,0x40,0xc2,0x80,0x33,0xc0,0x90,0x60,0xcc,0x40,0x8a,0x10,0x00,0x41,0xc1, + 0x08,0x00,0x46,0x94,0x06,0x00,0xd8,0xfc,0xff,0x0f,0x60,0x36,0x00,0x0b,0x40, + 0x2c,0x00,0xfd,0x7f,0x34,0x49,0x2b,0x49,0x2d,0x00,0x4d,0x12,0x34,0x00,0x09, + 0x40,0x2d,0x11,0xaf,0x2a,0x34,0x00,0x19,0x80,0x2d,0x40,0x8d,0x2a,0xf4,0xff, + 0x2b,0x40,0x4d,0xad,0x0c,0x15,0x54,0x91,0x5a,0x20,0xed,0xff,0x0d,0x4a,0x74, + 0x2f,0xa9,0x00,0x6d,0x35,0x1d,0x54,0xb4,0x3a,0x4b,0x01,0x6a,0x37,0x1b,0x54, + 0xf8,0xff,0x4f,0x81,0x02,0x80,0x10,0x28};
--- a/etc/gnus/gnus-uu-decode-uu-up.xbm Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/gnus/gnus-uu-decode-uu-up.xbm Mon Aug 13 08:46:35 2007 +0200 @@ -1,12 +1,12 @@ #define noname_width 32 #define noname_height 32 static char noname_bits[] = { - 0x40,0x20,0x10,0x88,0x14,0x0a,0x85,0x22,0xa2,0x20,0x48,0x88,0x08,0x8a,0x12, - 0x22,0x22,0x10,0x40,0x84,0x48,0xa5,0x2a,0x29,0x82,0xff,0xff,0x83,0xa8,0x49, - 0x92,0x2a,0x82,0xaa,0x54,0x83,0xa0,0xfd,0xff,0x2a,0x8a,0x06,0x40,0x42,0xa1, - 0x05,0x40,0x17,0xc4,0x04,0xc0,0x22,0x91,0x86,0x40,0x4a,0xc4,0x65,0xcb,0x02, - 0x91,0x94,0x44,0x57,0xc4,0x45,0x40,0x03,0x91,0x26,0xc1,0x52,0xc4,0xe4,0x41, - 0x0b,0x91,0x06,0xc2,0x42,0xc4,0x05,0x44,0x8b,0x91,0x04,0xc0,0x22,0xc4,0x05, - 0x40,0x86,0x91,0x06,0x40,0x2b,0x84,0x05,0xc0,0x42,0xc1,0xfc,0x7f,0x13,0x94, - 0xab,0xa4,0x46,0xa1,0x10,0x55,0x12,0x84,0xff,0xff,0x4b,0xa9,0x8a,0x00,0x02, - 0x00,0x10,0xaa,0xa8,0x54,0x45,0x01,0x04}; + 0x10,0x40,0x00,0x01,0x44,0x15,0x54,0x50,0x12,0xa0,0x82,0x82,0x00,0x15,0x20, + 0x28,0xaa,0x40,0x95,0x82,0x01,0x28,0x00,0x28,0xd4,0xff,0xff,0x43,0x82,0x4a, + 0x6d,0x17,0xa8,0x55,0x91,0x42,0x84,0xfd,0xff,0x2a,0x92,0x06,0x40,0x83,0xa0, + 0x05,0xc0,0x2a,0x8a,0x06,0x40,0x83,0xc0,0x84,0x40,0x2a,0x8a,0x65,0xcb,0x82, + 0xd0,0x96,0x44,0x2b,0x82,0x45,0xc0,0x42,0xa8,0x24,0x41,0x16,0x82,0xe5,0xc1, + 0x22,0xd0,0x06,0x42,0x4b,0x82,0x05,0xc4,0x02,0xa8,0x05,0x40,0x56,0x82,0x06, + 0xc0,0x02,0xa8,0x05,0x40,0x57,0x82,0x06,0x40,0x82,0xa8,0xfd,0x7f,0x2b,0x82, + 0x92,0xaa,0x82,0xa8,0x49,0x49,0x2b,0xc2,0xff,0xff,0x83,0x10,0x24,0x00,0x28, + 0x42,0x82,0xaa,0x42,0x94,0x50,0x00,0x10};
--- a/etc/gnus/gnus-uu-post-news-up.xbm Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/gnus/gnus-uu-post-news-up.xbm Mon Aug 13 08:46:35 2007 +0200 @@ -1,12 +1,12 @@ #define noname_width 32 #define noname_height 32 static char noname_bits[] = { - 0x15,0x11,0x19,0x11,0x40,0xa5,0xa2,0x4a,0x2a,0x08,0x09,0x10,0x80,0xe2,0x46, - 0x45,0x1b,0xb9,0x1d,0x11,0x40,0x0d,0xe1,0x54,0x0a,0x13,0x94,0x81,0xd0,0xff, - 0xff,0x2b,0x93,0x55,0x55,0x93,0xa4,0xa4,0x92,0x2a,0x90,0xfd,0x7f,0x83,0x85, - 0x06,0xc0,0x2a,0xb1,0x05,0x40,0x93,0x94,0x05,0xc0,0x26,0xc0,0x86,0x40,0x92, - 0x95,0x64,0x4b,0x07,0xd1,0x95,0xc4,0x32,0x94,0x46,0x40,0x4a,0xc0,0x24,0xc1, - 0x02,0x95,0xe6,0x41,0x57,0xd1,0x06,0x42,0x13,0x94,0x05,0xc4,0x4a,0x80,0x06, - 0x40,0x22,0xd5,0x04,0x40,0x17,0x91,0x05,0xc0,0x52,0xa4,0x06,0xc0,0x12,0x92, - 0xfd,0x7f,0x4b,0x80,0x94,0x92,0x02,0xbb,0x29,0x25,0xbb,0x80,0xff,0xff,0x03, - 0x2a,0x01,0x48,0x4a,0x40,0xa8,0x12,0x10}; + 0x91,0x91,0x11,0x15,0x28,0x2a,0x52,0x41,0x82,0x80,0x09,0x14,0x28,0xd4,0x86, + 0x42,0x95,0x31,0x3d,0x19,0x21,0x4e,0x61,0x42,0x84,0x0b,0xca,0x29,0xa1,0xff, + 0xff,0x07,0x95,0xaa,0x92,0xb2,0xa0,0xa5,0x54,0x0b,0x8a,0xfc,0x7f,0x52,0xc1, + 0x06,0x40,0x07,0xb5,0x05,0xc0,0x32,0x88,0x05,0xc0,0x4a,0xa2,0x86,0x40,0x03, + 0x88,0x64,0x4b,0x56,0xd5,0x95,0xc4,0x12,0x91,0x46,0x40,0x4b,0xc4,0x24,0x41, + 0x22,0x91,0xe6,0x41,0x17,0xd1,0x05,0xc2,0x52,0x94,0x04,0x44,0x13,0xc2,0x05, + 0x40,0x46,0x90,0x06,0x40,0x13,0x95,0x05,0xc0,0x52,0xc2,0x04,0xc0,0x16,0xa8, + 0xfd,0x7f,0x43,0x84,0xaa,0x54,0x2a,0xb1,0x25,0x49,0x93,0x8a,0xff,0xff,0x27, + 0x10,0x40,0x04,0x10,0x45,0x15,0x51,0x45};
--- a/etc/gnus/gnus.xbm Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/gnus/gnus.xbm Mon Aug 13 08:46:35 2007 +0200 @@ -1,622 +1,622 @@ #define noname_width 271 #define noname_height 273 static char noname_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x48,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x40,0x55,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x58,0x4a,0x52,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa4,0x52,0x05,0x01,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x55,0x29,0x49, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x8a,0xaa,0x2a,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x40,0x65,0x4a,0x92,0x04,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x94,0x52,0x25,0x10,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x52,0xa9, - 0x54,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x55,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x40,0x95,0x4a,0x95,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8, - 0x24,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0xa8,0x54,0x2a,0xa5,0x24,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x54,0xd5,0x0a,0x00,0x00,0xa8,0x0a,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x52,0xa9,0x54,0x81,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x24,0x29,0x05,0x00,0x00,0x95,0x24,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x54,0x2a, - 0x95,0x92,0x24,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4a,0xa5,0x14,0x00, - 0x00,0x52,0xa9,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0xa4,0x52,0xa9,0x2a,0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0xa9,0x54,0x2a,0x00,0xd0,0x2a,0x55,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x52,0x29,0x95,0x54,0x85,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x40,0x55,0xa5,0x12,0x00,0x20,0xa5,0x4a,0x16,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x94,0x4a,0xa9,0x52,0x12, - 0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x4a,0x2a,0xa9,0x00,0xac,0x52,0x52, - 0x51,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x55, - 0xaa,0x4a,0x2a,0x85,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x52,0x49,0xa5, - 0x00,0x49,0xaa,0x94,0x96,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0xa5,0x24,0x55,0xa5,0x24,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x48,0x95,0xaa,0x2a,0x81,0x54,0x25,0x55,0x49,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x14,0xa1,0x92,0x92,0x12,0x01,0x00,0x00, - 0x00,0x00,0x00,0x00,0x50,0x2a,0x95,0x54,0x05,0xa5,0x54,0x49,0xaa,0x02,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x14,0x55,0xaa, - 0x42,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0xa5,0xa2,0x92,0x42,0x55,0x4a, - 0x55,0x55,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80, - 0x42,0x01,0x48,0x55,0x15,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x54,0x2a,0x55, - 0x55,0x0a,0x49,0x95,0x92,0x24,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0xa0,0x04,0x00,0x50,0x92,0x44,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0xaa,0x52,0x29,0x49,0xa9,0xaa,0x52,0xa9,0x52,0x15,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xa2,0x02,0x20,0x55,0x12,0x01,0x00, - 0x00,0x00,0x00,0x00,0x00,0x49,0xa5,0x4a,0x55,0x55,0x92,0x94,0x2a,0x95,0x24, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x01,0x00,0x50, - 0xa9,0x42,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x29,0xa9,0x92,0x24,0x55, - 0x55,0x4a,0x55,0x15,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x50,0x92,0x00,0x40,0x25,0x15,0x02,0x00,0x04,0x00,0x00,0x00,0x80,0xaa,0x4a, - 0x95,0x54,0x55,0x29,0xa9,0x54,0x92,0xaa,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0xa0,0x40,0x00,0x40,0xaa,0x42,0x00,0x00,0x04,0x00,0x00, - 0x00,0x40,0x52,0xa9,0xa4,0xaa,0x92,0x4a,0x95,0x4a,0x55,0x49,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x12,0x00,0x00,0x95,0x14,0x01, - 0x00,0x59,0x00,0x00,0x00,0x50,0x95,0x42,0x55,0x12,0x55,0xaa,0xa4,0x52,0x92, - 0x52,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x40,0x01, - 0x40,0xa9,0x42,0x00,0x00,0x25,0x00,0x00,0x00,0x48,0x49,0x10,0x92,0xaa,0x4a, - 0x25,0x55,0xa9,0xaa,0x54,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0xa4,0x14,0x00,0x80,0x4a,0x11,0x02,0x00,0x55,0x01,0x00,0x00,0x50,0x2a, - 0x45,0x54,0xa9,0x54,0xaa,0x92,0x4a,0x49,0x25,0x09,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x48,0x41,0x00,0x00,0x92,0xa2,0x00,0x00,0x92,0x02, - 0x00,0x00,0xad,0x4a,0x10,0x49,0x4a,0x4a,0x49,0xa9,0x54,0xaa,0x54,0x05,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x54,0x10,0x00,0x00,0x55,0x09, - 0x00,0x00,0x55,0x02,0x00,0x00,0x92,0x04,0x41,0xa0,0x52,0xa9,0x0a,0x44,0xa9, - 0x52,0xa5,0x2a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x48, - 0x00,0x00,0x2a,0xa5,0x02,0x00,0x49,0x05,0x00,0x80,0xaa,0x52,0x14,0x4a,0x2a, - 0x55,0x42,0x11,0x14,0x95,0x54,0x12,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x50,0x00,0x00,0x00,0xa5,0x02,0x00,0x00,0x2a,0x09,0x00,0xa0,0x24, - 0x01,0x41,0xa0,0x54,0x49,0x08,0x44,0x61,0x2a,0xa5,0x54,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x28,0x00,0x00,0x4a,0x92,0x00,0x00,0xa4, - 0x0a,0x00,0xa8,0xaa,0x54,0x28,0x0a,0x25,0xa5,0x42,0x01,0x08,0x49,0x95,0x4a, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x00,0x00,0x00,0xa9, - 0x22,0x00,0x00,0x2a,0x15,0x00,0x24,0x55,0x02,0x81,0x20,0xaa,0x2a,0x14,0x54, - 0xa2,0xaa,0x54,0x55,0x01,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x20,0x00, - 0x00,0x00,0x00,0x52,0x82,0x00,0x00,0xa4,0x24,0x80,0x52,0x89,0x40,0x00,0x89, - 0x90,0x14,0x21,0x81,0x08,0x52,0xa5,0xa4,0x00,0x00,0x00,0x00,0x40,0x00,0x00, - 0x00,0x00,0x14,0x00,0x00,0x00,0x80,0x2a,0x29,0x00,0x00,0xaa,0x4a,0x01,0x95, - 0x2a,0x0a,0x00,0x04,0xaa,0x12,0x84,0x14,0xa2,0x24,0x49,0x49,0x05,0x00,0x00, - 0x00,0x28,0x00,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x00,0x4a,0x81,0x00,0x00, - 0x48,0x52,0xd2,0xaa,0xa4,0x00,0x00,0xa0,0x50,0x4a,0x21,0x80,0x08,0x99,0x2a, - 0x55,0x02,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0x00, - 0xa9,0x28,0x00,0x00,0xaa,0xaa,0x14,0x49,0x15,0x02,0x00,0x08,0xa2,0x0a,0x84, - 0x4a,0x20,0xa4,0xaa,0xaa,0x0a,0x00,0x00,0x00,0x2a,0x00,0x00,0x00,0x00,0x12, - 0x00,0x00,0x00,0x80,0x52,0x81,0x00,0x00,0x24,0x95,0xaa,0x2a,0x85,0x00,0x00, - 0x40,0x91,0x44,0x01,0x00,0x0a,0x51,0x49,0x92,0x14,0x00,0x00,0x00,0x0a,0x00, - 0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x00,0x2a,0x29,0x00,0x00,0xa8,0xa4,0x52, - 0x52,0x12,0x00,0x00,0x00,0xa4,0x12,0x00,0x00,0x20,0x44,0xaa,0xaa,0x52,0x00, - 0x00,0x00,0x14,0x00,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0x80,0x4a,0x81,0x00, - 0x00,0x94,0x52,0x4a,0x55,0x41,0x01,0x00,0x40,0x41,0x22,0x00,0x00,0x40,0x21, - 0x55,0x49,0x2a,0x00,0x00,0x80,0x0a,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00, - 0x80,0x52,0x29,0x00,0x00,0xa8,0xaa,0x54,0x4a,0x04,0x00,0x00,0x00,0x8a,0x08, - 0x00,0x00,0x00,0x84,0x22,0x55,0x49,0x01,0x00,0x00,0x09,0x00,0x00,0x00,0x80, - 0x04,0x00,0x00,0x00,0x00,0x2a,0x81,0x00,0x00,0x92,0x94,0x52,0x25,0x51,0x00, - 0x00,0x00,0xa2,0x02,0x00,0x00,0x40,0x21,0xa9,0xa4,0xaa,0x02,0x00,0x80,0x0a, - 0x00,0x00,0x00,0x80,0x42,0x00,0x00,0x00,0x00,0x95,0x28,0x00,0x00,0xa8,0x52, - 0x95,0x94,0x04,0x00,0x00,0x00,0x05,0x14,0x00,0x00,0x00,0x14,0x4a,0x95,0x94, - 0x0a,0x00,0xa0,0x24,0x00,0x00,0x00,0x20,0x01,0x00,0x00,0x00,0x80,0xa4,0x04, - 0x00,0x00,0x48,0x4a,0xaa,0x2a,0x10,0x00,0x00,0x80,0x52,0x01,0x00,0x00,0x00, - 0x81,0xa8,0x52,0x4a,0xa9,0x00,0xaa,0x0a,0x00,0x00,0x00,0x90,0x22,0x00,0x00, - 0x00,0x00,0x55,0x41,0x00,0x00,0x52,0x55,0x49,0x89,0x02,0x00,0x00,0x00,0x01, - 0x04,0x00,0x00,0x00,0x24,0x92,0x54,0x55,0x4a,0x95,0x94,0x04,0x10,0x00,0x00, - 0xa0,0x08,0x00,0x00,0x00,0x00,0x29,0x14,0x00,0x80,0x28,0x29,0xa5,0x24,0x08, - 0x00,0x00,0xc0,0x40,0x01,0x00,0x00,0x00,0x88,0xa4,0x2a,0x49,0x55,0x52,0x4a, - 0x05,0x28,0x00,0x00,0x54,0x41,0x00,0x00,0x00,0x80,0x4a,0x21,0x00,0x00,0x52, - 0xa5,0x2a,0x81,0x00,0x00,0x00,0x10,0x11,0x04,0x00,0x00,0x00,0x00,0x50,0xa5, - 0xaa,0xa4,0xaa,0x52,0x12,0x50,0x00,0x00,0x28,0x14,0x00,0x00,0x00,0x00,0x55, - 0x04,0x00,0x00,0xa0,0x94,0x94,0x2a,0x00,0x00,0x00,0xa0,0x00,0x01,0x00,0x00, - 0x00,0x40,0x45,0x52,0x25,0x55,0x49,0xa9,0x02,0x28,0x00,0x00,0x95,0x00,0x00, - 0x00,0x00,0x00,0x49,0x49,0x00,0x80,0x4a,0x55,0x29,0x80,0x00,0x00,0x00,0x54, - 0x20,0x00,0x00,0x00,0x00,0x00,0x90,0x94,0x54,0x49,0x2a,0x95,0x02,0xca,0x00, - 0x40,0x65,0x04,0x00,0x00,0x00,0x80,0x52,0x20,0x00,0x00,0xa0,0xa4,0x4a,0x29, - 0x00,0x00,0x00,0x28,0x82,0x00,0x00,0x00,0x00,0x00,0x05,0x55,0x2a,0x55,0x55, - 0xa5,0x04,0x28,0x01,0xaa,0x14,0x10,0x00,0x00,0x00,0x80,0x54,0x0a,0x00,0x80, - 0x92,0x4a,0x0a,0x04,0x00,0x00,0x00,0x2a,0x01,0x00,0x00,0x00,0x00,0x00,0x10, - 0x52,0x49,0x29,0x49,0x2a,0x01,0x55,0x2a,0x49,0x29,0x09,0x00,0x00,0x00,0x00, - 0x25,0x21,0x00,0x00,0x04,0x55,0x45,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00, - 0x00,0x00,0x00,0x84,0x94,0xaa,0x4a,0xa5,0x52,0x01,0x94,0x92,0x2a,0x55,0x00, - 0x00,0x00,0x00,0x40,0x55,0x08,0x00,0x00,0x50,0x28,0x11,0x04,0x00,0x00,0x80, - 0xaa,0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x28,0x25,0x55,0x2a,0xa5,0x04,0xa5, - 0xaa,0x54,0x25,0x05,0x00,0x00,0x00,0x80,0x14,0x01,0x00,0x00,0x04,0x42,0x20, - 0x01,0x00,0x00,0x80,0x0a,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xa2,0x52,0x49, - 0xa9,0x54,0x80,0xaa,0x54,0x4a,0x29,0x00,0x00,0x00,0x00,0x40,0x4a,0x14,0x00, - 0x00,0x90,0x08,0x85,0x00,0x00,0x00,0x00,0x21,0x00,0x00,0x00,0x00,0x00,0x00, - 0x90,0x48,0xaa,0x52,0xa5,0x4a,0x02,0x92,0xa2,0x92,0x8a,0x00,0x00,0x00,0x00, - 0x80,0x92,0x00,0x00,0x00,0x24,0x42,0x20,0x00,0x00,0x00,0xa0,0x0a,0x00,0x00, - 0x00,0x00,0x00,0x00,0x20,0x42,0x95,0x54,0x2a,0x15,0x40,0x55,0x55,0xa9,0x24, - 0x01,0x00,0x00,0x00,0x80,0x2a,0x0a,0x00,0x00,0x80,0x08,0x85,0x00,0x00,0x00, - 0x40,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x24,0xa5,0x52,0xa2,0x80, - 0x24,0x95,0x2a,0x05,0x00,0x00,0x00,0x00,0x40,0x2a,0x00,0x00,0x00,0x20,0x42, - 0x10,0x00,0x00,0x00,0xa0,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x22,0xaa, - 0x2a,0xa9,0x0a,0x20,0x55,0x49,0x4a,0x49,0x01,0x00,0x00,0x00,0x80,0x12,0x15, - 0x00,0x00,0x10,0x28,0x09,0x00,0x00,0x00,0x48,0x22,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x88,0x54,0xa9,0x4a,0x21,0x40,0xa9,0xaa,0x54,0x21,0x00,0x00,0x00, - 0x00,0x40,0x45,0x00,0x00,0x00,0x80,0x02,0x02,0x00,0x00,0x00,0x28,0x08,0x00, - 0x00,0x00,0x00,0x40,0x00,0x00,0x22,0x49,0x4a,0x2a,0x89,0x90,0x4a,0xa4,0x52, - 0x0a,0x00,0x00,0x00,0x00,0xa0,0x98,0x04,0x00,0x00,0x00,0x54,0x00,0x00,0x00, - 0x00,0x24,0x02,0x00,0x00,0x00,0x00,0x50,0x01,0x00,0x00,0x94,0xaa,0x54,0x24, - 0x20,0x95,0x95,0x4a,0xa0,0x00,0x00,0x00,0x00,0x80,0x02,0x02,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0x00,0x00,0x20,0x05,0x00,0x50, - 0xa1,0x92,0x12,0x01,0xa0,0x52,0x52,0xa9,0x0a,0x00,0x00,0x00,0x00,0xa0,0xaa, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x15,0x02,0x00,0x00,0x00,0x00, - 0x50,0x09,0x00,0x00,0x84,0x54,0x45,0x14,0x50,0xaa,0x2a,0x15,0x20,0x00,0x00, - 0x00,0x00,0x40,0x0a,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x85,0x00, - 0x00,0x00,0x00,0x00,0x94,0x2a,0x00,0x40,0x21,0x49,0x10,0x01,0x20,0x25,0x49, - 0x05,0x0a,0x00,0x00,0x00,0x00,0xa0,0x82,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x22,0x00,0x00,0x00,0x00,0x00,0x28,0x25,0x00,0x00,0x14,0x10,0x45, - 0x04,0x40,0xa9,0xaa,0x50,0x20,0x00,0x00,0x00,0x00,0x90,0x12,0x02,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x40,0x49,0x00,0x00,0x00,0x00,0x00,0xa4,0x92,0x00, - 0x00,0x01,0x45,0x10,0x01,0x00,0x95,0x54,0x0a,0x0a,0x00,0x00,0x00,0x00,0xa0, - 0x84,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x02,0x00,0x00,0x00,0x00, - 0x00,0x55,0xaa,0x00,0x00,0x54,0x10,0x01,0x00,0x80,0xaa,0x92,0xa0,0x00,0x00, - 0x00,0x00,0x00,0x20,0x25,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x48, - 0x00,0x00,0x00,0x80,0x02,0x29,0x55,0x00,0x00,0x00,0x44,0x54,0x01,0x00,0x49, - 0x2a,0x09,0x02,0x00,0x00,0x00,0x00,0x50,0x81,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x40,0x21,0x00,0x00,0x00,0xa0,0x00,0x52,0x49,0x01,0x00,0x54,0x11, - 0x01,0x00,0x40,0x54,0x05,0x24,0x00,0x00,0x00,0x00,0x00,0xa0,0x12,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x08,0x00,0x00,0x00,0x40,0x41,0x95,0xaa, - 0x02,0x00,0x00,0x04,0x24,0x00,0x00,0x41,0x40,0x01,0x01,0x00,0x00,0x00,0x00, - 0x28,0x41,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x02,0x00,0x00,0x00, - 0xa8,0x80,0x2a,0x49,0x02,0x00,0x40,0x50,0x10,0x00,0x40,0x24,0x09,0x54,0x00, - 0x00,0x00,0x00,0x00,0x50,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8, - 0x00,0x00,0x00,0x00,0x2a,0x40,0x49,0x55,0x01,0x00,0x00,0x85,0x02,0x00,0x00, - 0x08,0x44,0x01,0x00,0x00,0x00,0x00,0x00,0x90,0x40,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x24,0x02,0x00,0x00,0x00,0x24,0x20,0x55,0x92,0x02,0x00,0x00, - 0x00,0x00,0x00,0x40,0xa1,0x10,0x14,0x00,0x00,0x00,0x00,0x00,0x28,0x09,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x00,0x00,0x00,0x00,0x15,0xa0,0x4a, - 0x55,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x24,0x01,0x00,0x00,0x00,0x00, - 0x00,0xa4,0xa0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x15,0x02,0x00,0x00, - 0x40,0x29,0x28,0xa9,0x2a,0x09,0x00,0x00,0x00,0x00,0x00,0x80,0xa2,0x80,0x04, - 0x00,0x00,0x00,0x00,0x00,0xa8,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x85,0x00,0x00,0x00,0x80,0x0a,0xa9,0x54,0x92,0x04,0x00,0x00,0x00,0x00,0x00, - 0x00,0x08,0x2a,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x50,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x22,0x00,0x00,0x00,0x50,0x4a,0x40,0xa5,0x54,0x05,0x00, - 0x00,0x00,0x00,0x00,0x00,0x20,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x94,0x04, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x05,0x00,0x00,0x00,0x50,0x85,0x80, - 0x2a,0xa5,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x15,0x00,0x00,0x00,0x00, - 0x00,0x00,0x50,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x50,0x00,0x00, - 0x00,0x4a,0x12,0x00,0x52,0x95,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x12,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x40,0x05,0x00,0x00,0x00,0xa9,0x42,0x80,0x94,0x52,0x05,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x54,0x04,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x20,0x11,0x00,0x00,0x00,0x4a,0x09,0x20,0x28,0x95,0x0a, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x52, - 0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x04,0x00,0x00,0x40,0x55,0x22, - 0x00,0x49,0x49,0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x15,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x00,0x00, - 0x00,0x40,0xa9,0x08,0x90,0x50,0x55,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x24,0x11,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0xa8,0x08,0x00,0x00,0xa0,0x24,0x02,0x24,0x44,0x52,0x15,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x15,0x04,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x48,0x02,0x00,0x00,0x94,0x4a,0x08,0x80,0x48,0x25, - 0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x0a,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0x52,0x15, - 0x02,0x20,0x92,0xaa,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x80,0x12,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x12,0x01, - 0x00,0x00,0x94,0xa4,0x00,0x00,0x80,0x54,0x05,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x95,0x04,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x54,0x00,0x00,0x40,0x55,0x09,0x04,0x00,0xaa,0x92,0x12,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x01,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x01,0x00,0xa0,0x92,0x20,0x01,0x00,0x00, - 0x25,0x15,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x40,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x55,0x00,0x00,0x90,0x54, - 0x4a,0x00,0x00,0x24,0xaa,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x40,0x42,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x24, - 0x00,0x00,0x2a,0x25,0x01,0x00,0x00,0x80,0x54,0x12,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x02,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x55,0x00,0x80,0x54,0x55,0x50,0x00,0x00,0x50,0x4a,0x09,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x21,0x01, - 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x92,0x00,0x80,0x52,0x0a,0x05,0x00,0x00, - 0x00,0xa9,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0xa0,0x82,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x54,0x15,0x54,0x2a, - 0x45,0x00,0x00,0x00,0x40,0x94,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x90,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0, - 0xaa,0x4a,0xa9,0x52,0x09,0x05,0x00,0x00,0x00,0xa5,0x02,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x81,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x40,0x49,0x52,0x25,0x95,0x52,0x00,0x00,0x00,0x40,0x54,0x0a, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x20, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x95,0x2a,0x55,0x2a,0x00,0x01,0x00, - 0x00,0x00,0xa9,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x50,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x52,0x49,0x49, - 0xa5,0x4a,0x00,0x00,0x00,0x00,0x48,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x28,0xa5,0xaa,0xaa,0x14,0x20,0x00,0x00,0x00,0x80,0xaa,0x04,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x90,0x2a,0x49,0x52,0x8a,0x0a,0x00,0x00,0x00,0x00,0x94, - 0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48, - 0x48,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x50,0xaa,0xaa,0xa4,0x22,0x00,0x00, - 0x00,0x00,0x00,0xa8,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x50,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x92,0x94, - 0x2a,0x09,0x02,0x00,0x00,0x00,0x00,0x25,0x09,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x08,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0xa4,0x54,0xa9,0xaa,0xa0,0x00,0x00,0x00,0x00,0x00,0x54,0x05,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x24,0x20,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x54,0x2a,0x25,0x49,0x0a,0x00,0x00,0x00,0x00,0x00, - 0xa8,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00, - 0x50,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0xa5,0xaa,0x2a,0x50,0x00, - 0x00,0x00,0x00,0x00,0x24,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00, - 0x00,0x00,0x00,0x00,0x14,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa4,0x52, - 0x52,0x89,0x04,0x00,0x00,0x00,0x00,0x00,0x94,0x02,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x0a,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x28,0x95,0x4a,0x22,0x12,0x00,0x00,0x00,0x00,0x00,0xa8,0x02,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x00,0x00,0x00,0x00,0x12,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x52,0x29,0x89,0x00,0x00,0x00,0x00,0x00, - 0x00,0x54,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x02,0x00,0x00,0x00, - 0x00,0x29,0x12,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x50,0xaa,0xaa,0x20,0x02, - 0x00,0x00,0x00,0x00,0x00,0x24,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01, - 0x01,0x00,0x00,0x00,0x00,0x0a,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0, - 0x4a,0x12,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x02,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x88,0x04,0x00,0x00,0x00,0x00,0x14,0x02,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x40,0xa9,0x42,0xa0,0x00,0x00,0x00,0x00,0x00,0x00,0x56,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x05,0x00,0x00,0x00,0x80,0x12,0x11, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x94,0x10,0x0a,0x00,0x00,0x00,0x00, - 0x00,0x00,0xa8,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x88,0x02,0x00,0x00, - 0x00,0x80,0x0a,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x42,0x42,0x20, - 0x00,0x00,0x00,0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x45,0x01,0x00,0x00,0x00,0x00,0x8a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x50,0x11,0x10,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x01,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x20,0x01,0x00,0x00,0x00,0x40,0x05,0x04,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x44,0x45,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4a, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x41,0x02,0x00,0x00,0x00,0x80,0xa4, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x11,0x90,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x28,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x52,0x01,0x00, - 0x00,0x00,0x40,0x0a,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x44,0x01, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x94,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x40,0x48,0x01,0x00,0x00,0x00,0x80,0x42,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x10,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x24,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x80,0x50,0x02,0x00,0x00,0x00,0x40,0x15,0x02,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x80,0x42,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x88,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x94,0x00,0x00,0x00,0x00,0x20, - 0x41,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x22,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x50,0x01, - 0x00,0x00,0x00,0x40,0x85,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x04,0xaa,0x00,0x00,0x00,0x00,0xa0,0x24,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x42,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x20,0x14,0x00,0x00,0x00,0x00,0x50,0x02,0x01,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0a,0x29,0x00,0x00,0x00,0x00, - 0xa0,0x92,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x15, - 0x00,0x00,0x00,0x00,0x20,0x21,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x05,0x12,0x00,0x00,0x00,0x00,0x50,0x81,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x0a,0x00,0x00,0x00,0x00,0x90,0x20,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x4a,0x05,0x00,0x00,0x00, - 0x00,0x28,0x89,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80, - 0x04,0x00,0x00,0x00,0x00,0xa0,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x40,0x41,0x01,0x00,0x00,0x00,0x00,0x54,0x88,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x02,0x00,0x00,0x00,0x00,0xa8,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x52,0x01,0x00,0x00, - 0x00,0x00,0x48,0x54,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08, - 0xa0,0x00,0x00,0x00,0x00,0x00,0xa4,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x20,0x90,0x00,0x00,0x00,0x00,0x00,0x94,0x14,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x50,0x00,0x00,0x00,0x00,0x00,0x52, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x54,0x00,0x00, - 0x00,0x00,0x00,0x54,0x2a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x02,0x24,0x00,0x00,0x00,0x00,0x00,0x2a,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x08,0x2a,0x00,0x00,0x00,0x00,0x00,0x48,0x12,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x20,0x11,0x00,0x00,0x00,0x00,0x00, - 0x2a,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0a,0x16,0x00, - 0x00,0x00,0x00,0x00,0xa5,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00, - 0x80,0x00,0x09,0x00,0x00,0x00,0x00,0x00,0x12,0x04,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28, - 0x00,0x00,0x00,0x00,0x00,0x82,0x12,0x00,0x00,0x00,0x00,0x00,0x2a,0x11,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x40,0x44,0x0a,0x00,0x00,0x00,0x00, - 0x00,0x15,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x81,0x04, - 0x00,0x00,0x00,0x00,0x80,0xa4,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x00,0x00,0x00, - 0x00,0x40,0xa0,0x02,0x00,0x00,0x00,0x00,0x00,0x2a,0x04,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x0a,0x00,0x00,0x00,0x00,0x00,0x41,0x05,0x00,0x00,0x00,0x00,0x80,0x12,0x01, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0x00,0x50,0xa0,0x00,0x00,0x00,0x00, - 0x00,0x80,0x4a,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x14,0x00,0x00,0x50,0x00,0x80,0x4a, - 0x01,0x00,0x00,0x00,0x00,0x00,0x12,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x0a,0x00,0x00, - 0x00,0x00,0x28,0xa8,0x00,0x00,0x00,0x00,0x00,0x80,0x0a,0x04,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x15,0x00,0x00,0x28,0x00,0x82,0x48,0x01,0x00,0x00,0x00,0x00,0x40,0x95, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x40,0x09,0x00,0x00,0x82,0x04,0x24,0x2a,0x00,0x00,0x00, - 0x00,0x00,0x40,0x22,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x22,0x00,0x00,0x48,0xaa,0x10, - 0x52,0x00,0x00,0x00,0x00,0x00,0x80,0x84,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x0d,0x00, - 0x00,0x10,0x12,0x44,0x55,0x00,0x00,0x00,0x00,0x00,0x80,0x0a,0x02,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0xa8,0x02,0x00,0x00,0x45,0x55,0x01,0x49,0x00,0x00,0x00,0x00,0x00,0x80, - 0x4a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x28,0x09,0x00,0x80,0x00,0x29,0x50,0x15,0x00,0x00, - 0x00,0x00,0x00,0x80,0x84,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x05,0x00,0x00,0xaa,0x52, - 0x55,0x0a,0x00,0x00,0x00,0x00,0x00,0xa0,0x02,0x02,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x54,0x09, - 0x00,0x80,0x40,0x4a,0x92,0x12,0x00,0x00,0x00,0x00,0x00,0x80,0xa4,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x25,0x01,0x00,0x40,0xaa,0xaa,0xaa,0x04,0x00,0x00,0x00,0x00,0x00, - 0xa0,0x02,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0xaa,0x04,0x00,0x10,0x40,0x92,0x94,0x02,0x00, - 0x00,0x00,0x00,0x00,0x20,0xa5,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x54,0x00,0x00,0x40,0x55, - 0x55,0xa9,0x02,0x00,0x00,0x00,0x00,0x00,0x40,0x02,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x4a, - 0x0a,0x00,0x10,0xa8,0x92,0x4a,0x01,0x00,0x00,0x00,0x00,0x00,0xa0,0x92,0x02, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x20,0x29,0x01,0x00,0x40,0x22,0x55,0x92,0x00,0x00,0x00,0x00,0x00, - 0x00,0x90,0x44,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x4a,0x00,0x00,0x10,0x54,0x49,0x55,0x00, - 0x00,0x00,0x00,0x00,0x00,0xa0,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x15,0x01,0x00,0xa2, - 0x4a,0xaa,0xaa,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x51,0x01,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8, - 0x44,0x00,0x00,0x08,0x50,0x95,0x24,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x02, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x90,0x0a,0x01,0x00,0xa2,0x96,0x52,0x29,0x00,0x00,0x00,0x00, - 0x00,0x00,0x90,0xa8,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa4,0x44,0x00,0x80,0x88,0x52,0x29,0x15, - 0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x11,0x00,0x00, - 0x20,0x25,0x55,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x91,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x55,0x05,0x00,0x00,0x8a,0x54,0x25,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0xa8, - 0x22,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x4a,0x11,0x00,0x80,0xa0,0xaa,0x54,0x15,0x00,0x00,0x00, - 0x00,0x00,0x00,0xa0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x52,0x04,0x00,0x20,0x4a,0x49,0x92, - 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x28,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x95,0x00,0x00, - 0x80,0x50,0x8a,0xaa,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x80,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x80,0x52,0x0a,0x00,0x00,0x50,0x05,0x55,0x02,0x00,0x00,0x00,0x00,0x00,0x00, - 0x50,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0xa0,0x14,0x00,0x00,0xa0,0x4a,0x02,0x92,0x02,0x00,0x00, - 0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0xaa,0x02,0x00,0x08,0x50,0x01, - 0x54,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x50,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x09,0x00, - 0x00,0xa0,0xa4,0x02,0x2a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x28,0x95,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x28,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x50,0x41,0x00,0x00,0x28,0x4d,0x01,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2a,0x15,0x00,0x00,0x04,0x52, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa4,0x42, - 0x00,0x00,0x50,0x15,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x52,0x11,0x00,0x00,0x04,0x52,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x95,0x04,0x00,0x00,0x10,0x25,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xaa,0x00,0x00,0x00,0x8a, - 0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x49, - 0x0a,0x00,0x00,0x20,0x29,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0xc0,0x54,0x00,0x00,0x80,0x8a,0x0a,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x25,0x01,0x00,0x00,0x40,0x05,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x15,0x00,0x00,0x00, - 0x49,0x12,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0, - 0x94,0x00,0x00,0x80,0x40,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x28,0x45,0x00,0x00,0x20,0x44,0x0a,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x54,0x11,0x00,0x00,0x80,0x50,0x01,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x24,0x45,0x00,0x00, - 0x00,0x22,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0xa9,0x02,0x00,0x00,0x40,0xa8,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x95,0x28,0x00,0x00,0x90,0x90,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xaa,0x00,0x00,0x00,0x00,0x50,0x01, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x49,0x0a,0x00, - 0x00,0x40,0xa8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x80,0x2a,0x00,0x00,0x00,0x20,0x24,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x40,0x25,0x05,0x00,0x00,0x00,0x54,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x2a,0x00,0x00,0x00,0x48,0x08, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x12,0x01, - 0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x48,0x45,0x00,0x00,0x00,0x10,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0xa8,0x14,0x00,0x00,0x00,0x04,0x12,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x92,0x42,0x00,0x00,0x00,0x10, - 0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x54,0x12, - 0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x55,0x09,0x00,0x00,0x00,0x08,0x09,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x21,0x00,0x00,0x00,0x00,0x05,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0xaa,0x04,0x00,0x00,0x00, - 0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x49, - 0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x80,0x2a,0x05,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x52,0x00,0x00,0x00,0x00,0x00,0x02,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x0a,0x01,0x00,0x00, - 0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28, - 0x55,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x50,0x02,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4a,0x55,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x54,0x02,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x25,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0xaa,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x92,0x04,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x55,0x02,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x40,0xa9,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0xa0,0x12,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0xaa,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x04,0x02, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0xa4,0xaa,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x28,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x54,0x49,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x92,0x22, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x4a,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x80,0x2a,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xa4,0x10,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x55, - 0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x80,0x4a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x12,0x01,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xaa,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0, - 0x14,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x50,0x45,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x02,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x55,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0xa0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x50,0x2a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x01,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa8,0x08,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x14,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0xa2,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x05,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x54,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x02,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x55,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x52, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x04,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0xff,0xff,0x7f,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0x4a,0xe0,0xff, + 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x47,0x51,0x85,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xb7,0x2c,0x51,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x49,0x51,0x05,0xfe,0x7f,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x55,0x96,0x4a, + 0xf9,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x7f,0x4a,0x29,0x09,0xf4,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x7f,0xa5,0x54,0x55,0xe1,0x7f,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0x2a,0xa5,0x54,0xf4,0x7f,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0xa4,0x2a, + 0x25,0xc1,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x2f,0xd5,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x4f,0x29,0x49,0x55,0x84,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xab, + 0x24,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x57,0xaa,0xaa,0x92,0x51,0x7f,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x57,0xd5,0xfa,0xff,0xff,0xab,0xea,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xab,0x52,0x52,0x2a,0x09,0x7f, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x93,0x2a,0xe5,0xff,0xff,0x95,0xa4,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x2b,0x95, + 0x2a,0xa5,0x42,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x24,0x91,0xd4,0xff, + 0x3f,0x52,0xa9,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x4b,0xaa,0xa4,0x54,0x08,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xaa,0xaa,0xea,0xff,0xdf,0x2a,0x55,0xf1,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xa5,0x49,0x95,0x2a,0x43,0x7e,0xff,0xff,0xff, + 0xff,0xff,0xff,0x3f,0x55,0x4a,0xc9,0xff,0x23,0xa5,0x4a,0xd6,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x2a,0x2a,0x55,0x49,0x29, + 0x7c,0xff,0xff,0xff,0xff,0xff,0xff,0x5f,0x49,0xa9,0x24,0xff,0xad,0x52,0x52, + 0xd1,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x52, + 0xa5,0x52,0xaa,0x04,0x7d,0xff,0xff,0xff,0xff,0xff,0xff,0x5f,0x95,0x4a,0x55, + 0xff,0x49,0xaa,0x94,0x96,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x4a,0x29,0xa5,0x52,0x25,0x7c,0xff,0xff,0xff,0xff,0xff,0xff, + 0x4f,0x52,0x55,0xaa,0xfc,0x54,0x25,0x55,0x49,0xfe,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x29,0xa4,0x54,0x4a,0x8a,0x7e,0xff,0xff, + 0xff,0xff,0xff,0xff,0x57,0x55,0x92,0x92,0x7a,0xa5,0x54,0x49,0xaa,0xfe,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0xba,0x70,0xa5,0xaa, + 0x24,0x7c,0xff,0xff,0xff,0xff,0xff,0xff,0x2b,0x29,0x55,0x55,0x75,0x55,0x4a, + 0x55,0x55,0xf9,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f, + 0x1a,0xfa,0x57,0x92,0x02,0x7d,0xff,0xff,0xff,0xff,0xff,0xff,0xa5,0x52,0xa9, + 0xa4,0x2a,0x49,0x95,0x92,0x24,0xf5,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x5f,0x5d,0xfc,0x97,0xaa,0x4a,0x7c,0xff,0xff,0xff,0xff,0xff, + 0xff,0x55,0x95,0x4a,0x2a,0xa9,0xaa,0x52,0xa9,0x52,0xf5,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0x0a,0xfd,0x4f,0x55,0x12,0x7d,0xff, + 0xff,0xff,0xff,0xff,0xff,0x92,0xa4,0x94,0x52,0x2a,0x25,0x95,0x2a,0x95,0xe4, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x4f,0x2e,0xfc,0x5f, + 0x92,0x42,0x7c,0xff,0xff,0xff,0xff,0xff,0xff,0x54,0x55,0xaa,0xaa,0x4a,0xa9, + 0x52,0x4a,0x55,0x95,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x2f,0x0d,0xff,0x5f,0x49,0x15,0x7e,0xff,0xfd,0xff,0xff,0xff,0x3f,0x25,0xa9, + 0x52,0x92,0x54,0x4a,0xaa,0x54,0x92,0xaa,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xaf,0x56,0xfe,0xbf,0xaa,0x44,0x7c,0xff,0xe5,0xff,0xff, + 0xff,0xbf,0xaa,0x2a,0x95,0xaa,0x4a,0x55,0x95,0x4a,0x55,0x49,0xfe,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x57,0x05,0xfe,0xbf,0x54,0x12,0x7d, + 0xff,0xd9,0xff,0xff,0xff,0x4f,0x49,0x41,0xaa,0x24,0xa9,0xa4,0xa8,0x94,0x24, + 0x55,0xfd,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x97,0xaa,0xfe, + 0xbf,0x92,0x42,0x7c,0x7f,0x25,0xff,0xff,0xff,0xaf,0x54,0x12,0x49,0x55,0x25, + 0x55,0x4a,0xa5,0xaa,0x24,0xfd,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x4b,0x03,0xfe,0x7f,0xaa,0x12,0x7e,0x7f,0x55,0xfd,0xff,0xff,0x95,0x2a, + 0x48,0x94,0x4a,0x55,0x49,0x95,0x2a,0x55,0x55,0xf9,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x57,0x96,0xff,0xff,0x52,0x42,0x7c,0xff,0x92,0xfe, + 0xff,0xff,0x52,0x0a,0x02,0x51,0x52,0x92,0xaa,0x52,0x52,0x49,0x4a,0xe5,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xab,0x21,0xff,0x7f,0x95,0x12, + 0x7d,0xff,0x55,0xfa,0xff,0xff,0xaa,0xa2,0x28,0xa4,0x54,0x55,0x02,0x48,0x95, + 0x92,0x52,0xea,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x97,0x8b, + 0xff,0xff,0xaa,0x48,0x7c,0xff,0x49,0xf5,0xff,0x3f,0x49,0x09,0x02,0x81,0x4a, + 0x4a,0xa9,0x02,0x48,0x55,0x29,0x95,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xaf,0x83,0xff,0xff,0x92,0x02,0x7f,0xff,0x2a,0xf9,0xff,0xaf,0x92, + 0x22,0x28,0x4a,0x55,0xa9,0x04,0xa8,0xa2,0x54,0x55,0xa9,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xef,0xef,0xef,0xff,0xff,0x55,0x15,0x7e,0xff,0xa4, + 0xea,0xff,0xaf,0xaa,0x88,0x82,0x10,0x24,0x55,0x90,0x02,0x48,0x4a,0x4a,0xa5, + 0xff,0xff,0xff,0xff,0xbf,0xff,0xff,0xff,0xff,0xdf,0xdf,0xe7,0xff,0xff,0x49, + 0x82,0x7e,0xff,0x2b,0xd5,0xff,0x25,0x55,0x22,0x1c,0x42,0xa9,0x12,0x41,0x28, + 0x81,0x52,0x29,0x55,0xfe,0xff,0xff,0xff,0xbf,0xff,0xff,0xff,0xff,0xe7,0xff, + 0xe7,0xff,0xff,0xaa,0x28,0x7e,0xff,0xa5,0xe4,0xff,0xaa,0x92,0x80,0xff,0x10, + 0x54,0x49,0x14,0x42,0x28,0x2a,0xa5,0x92,0xfe,0xff,0xff,0xff,0xcf,0xff,0xff, + 0xff,0xff,0xd7,0xff,0xff,0xff,0xff,0x94,0x02,0x7f,0xff,0xab,0x4a,0x1f,0x49, + 0x2a,0xca,0xff,0x42,0x92,0x2a,0x41,0x08,0x41,0x4a,0x55,0xaa,0xfc,0xff,0xff, + 0xff,0xef,0xff,0xff,0xff,0xff,0xe9,0xff,0xff,0xff,0x7f,0xa9,0x54,0x7e,0xff, + 0x49,0x52,0xd2,0xaa,0x92,0xf0,0xff,0x91,0xa0,0x14,0x10,0x42,0x94,0x50,0x29, + 0x95,0xf2,0xff,0xff,0xff,0xd3,0xff,0xff,0xff,0xff,0xeb,0xff,0xff,0xff,0xff, + 0x4a,0x01,0x7e,0xff,0xab,0xaa,0x14,0x25,0x15,0xfa,0xff,0x0f,0x4a,0x49,0x45, + 0x09,0x01,0x2a,0xa5,0xa4,0xfa,0xff,0xff,0xff,0xeb,0xff,0xff,0xff,0xff,0xf2, + 0xff,0xff,0xff,0x7f,0x95,0x54,0x7f,0xff,0x27,0x25,0x55,0xa9,0x84,0xfc,0xff, + 0xaf,0x20,0x05,0xf8,0x7f,0xa4,0xa0,0x94,0xaa,0xd4,0xff,0xff,0xff,0xcb,0xff, + 0xff,0xff,0xff,0xf5,0xff,0xff,0xff,0x7f,0x52,0x01,0x7f,0xff,0xab,0x54,0xa9, + 0x4a,0x11,0xff,0xff,0x1f,0x4a,0x95,0xff,0xff,0x11,0x4a,0x55,0x49,0xa9,0xff, + 0xff,0xff,0xd4,0xff,0xff,0xff,0x7f,0xfa,0xff,0xff,0xff,0xff,0xaa,0x24,0x7f, + 0xff,0x97,0x2a,0x95,0x54,0x45,0xfe,0xff,0xbf,0x90,0x82,0xff,0xff,0x8f,0x80, + 0x4a,0x2a,0x95,0xff,0xff,0xff,0xea,0xff,0xff,0xff,0x7f,0xd5,0xff,0xff,0xff, + 0x7f,0x25,0x41,0x7f,0xff,0xa9,0xa4,0x52,0x29,0x10,0xff,0xff,0xff,0x42,0xe8, + 0xff,0xff,0x5f,0x2a,0xa9,0x52,0x29,0xfd,0xff,0x3f,0xe9,0xff,0xff,0xff,0xff, + 0x1c,0xff,0xff,0xff,0x7f,0xa9,0x14,0x7f,0xff,0x49,0x55,0x4a,0x4a,0xc5,0xff, + 0xff,0xff,0x95,0xc2,0xff,0xff,0x3f,0x40,0x54,0x55,0xa5,0xfa,0xff,0xbf,0xda, + 0xff,0xff,0xff,0xbf,0x4a,0xff,0xff,0xff,0xff,0x54,0x41,0x7f,0xff,0x92,0x92, + 0xaa,0x12,0x90,0xff,0xff,0x7f,0x42,0xe8,0xff,0xff,0xff,0x12,0x25,0x49,0xaa, + 0xf4,0xff,0xaf,0xe4,0xff,0xff,0xff,0x3f,0x8d,0xff,0xff,0xff,0x7f,0x25,0x0a, + 0x7f,0xff,0x50,0xa9,0x52,0x55,0xc5,0xff,0xff,0x7f,0x15,0xf2,0xff,0xff,0xff, + 0x40,0x90,0x2a,0x95,0x8a,0xfe,0xab,0xca,0xff,0xff,0xff,0x9f,0xa6,0xff,0xff, + 0xff,0xff,0xaa,0x80,0x7f,0xff,0x2a,0x55,0x4a,0x0a,0xf0,0xff,0xff,0x7f,0x45, + 0xf8,0xff,0xff,0xff,0x0b,0x55,0x52,0x29,0xb5,0x2a,0x49,0xe1,0xd7,0xff,0xff, + 0xa7,0x8a,0xff,0xff,0xff,0x7f,0x49,0xaa,0x7f,0xff,0xa8,0x24,0xa9,0x82,0xf4, + 0xff,0xff,0x9f,0x1e,0xfa,0xff,0xff,0xff,0x47,0xa0,0xaa,0x4a,0x49,0x92,0x2a, + 0xf5,0xaf,0xff,0xff,0x57,0xc3,0xff,0xff,0xff,0x7f,0xaa,0x80,0x7f,0x7f,0x52, + 0x55,0x95,0x14,0xfe,0xff,0xff,0x5f,0x4f,0xf8,0xff,0xff,0xff,0x2f,0xa5,0x24, + 0x55,0x95,0xaa,0x54,0xe2,0xd3,0xff,0xff,0x29,0xd5,0xff,0xff,0xff,0xff,0x52, + 0xca,0x7f,0x3f,0x80,0x92,0x4a,0x81,0xfe,0xff,0xff,0x57,0x9d,0xfe,0xff,0xff, + 0xff,0x1f,0x08,0x95,0xa2,0xa4,0x52,0x4a,0xf5,0x2b,0xff,0x7f,0x95,0xc1,0xff, + 0xff,0xff,0xff,0xaa,0x80,0x7f,0xbf,0x5a,0xaa,0x54,0x14,0xff,0xff,0xff,0xa7, + 0x1c,0xfe,0xff,0xff,0xff,0x7f,0xa1,0xaa,0x4c,0x55,0x4a,0xa9,0xf0,0xcb,0xff, + 0x5f,0xe5,0xe5,0xff,0xff,0xff,0x7f,0x92,0xaa,0x7f,0x3f,0x40,0x55,0x12,0xc1, + 0xff,0xff,0xff,0xab,0xba,0xfe,0xff,0xff,0xff,0x7f,0x08,0x52,0x2a,0x29,0x55, + 0x95,0xfa,0x29,0xfd,0xab,0x94,0xf0,0xff,0xff,0xff,0x7f,0x55,0x80,0x7f,0xff, + 0x92,0xa4,0x4a,0xc4,0xff,0xff,0xff,0x55,0x38,0xff,0xff,0xff,0xff,0xff,0xa2, + 0xa4,0x52,0xa5,0x24,0xa5,0xf8,0x55,0x2a,0x49,0xa9,0xf9,0xff,0xff,0xff,0x7f, + 0x29,0xc9,0x7f,0x7f,0x04,0x95,0x12,0xf0,0xff,0xff,0xff,0xaa,0xfe,0xff,0xff, + 0xff,0xff,0xff,0x09,0x54,0x49,0xaa,0xaa,0x52,0xfa,0x95,0x92,0x2a,0x55,0xf0, + 0xff,0xff,0xff,0x7f,0x4a,0xe2,0x7f,0xff,0x50,0x54,0x40,0xf9,0xff,0xff,0xff, + 0x12,0xfc,0xff,0xff,0xff,0xff,0xff,0xa3,0x48,0x56,0x49,0x49,0xaa,0xf8,0xa4, + 0xaa,0x54,0x25,0xfd,0xff,0xff,0xff,0xbf,0x52,0xc8,0x7f,0xff,0x05,0x01,0x15, + 0xf8,0xff,0xff,0x7f,0x8a,0xfe,0xff,0xff,0xff,0xff,0xff,0x0f,0x22,0x25,0x55, + 0xaa,0x4a,0xfe,0xaa,0x54,0x4a,0x29,0xf8,0xff,0xff,0xff,0x7f,0x2a,0xc2,0x7f, + 0xff,0x11,0x24,0xa0,0xfe,0xff,0xff,0x7f,0x25,0xff,0xff,0xff,0xff,0xff,0xff, + 0x2f,0xa8,0x54,0xa9,0x52,0x29,0x7c,0x49,0x49,0x29,0x95,0xfc,0xff,0xff,0xff, + 0xbf,0x92,0xe8,0x7f,0xff,0x47,0x89,0x0a,0xfe,0xff,0xff,0x3f,0x45,0xff,0xff, + 0xff,0xff,0xff,0xff,0x9f,0x82,0x4a,0x25,0x95,0x14,0xbf,0x2a,0x55,0xa5,0x04, + 0xfd,0xff,0xff,0xff,0x7f,0x2a,0xe2,0x7f,0xff,0x17,0x20,0x20,0xff,0xff,0xff, + 0x5f,0x93,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x94,0x94,0x4a,0x2a,0x45,0x7e, + 0x52,0x49,0xaa,0x12,0xfc,0xff,0xff,0xff,0xbf,0x92,0xe8,0x7f,0xff,0x87,0x0a, + 0xca,0xff,0xff,0xff,0x5f,0x85,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x21,0xaa, + 0x54,0xa5,0x92,0x9e,0xaa,0xaa,0x2a,0x45,0xff,0xff,0xff,0xff,0x7f,0x15,0xe2, + 0x7f,0xff,0x1f,0xa0,0xe0,0xff,0xff,0xff,0xa7,0xd0,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x84,0x24,0xa9,0x54,0x09,0xbf,0x24,0x25,0x49,0x11,0xfe,0xff,0xff, + 0xff,0x9f,0x94,0xf8,0x7f,0xff,0x9f,0x14,0xf8,0xff,0xff,0xff,0xab,0xe5,0xff, + 0xff,0xff,0xff,0xbf,0xff,0xff,0x21,0x54,0x95,0x4a,0x42,0x5f,0x55,0xa9,0xaa, + 0x44,0xff,0xff,0xff,0xff,0x5f,0x12,0xf2,0x7f,0xff,0x7f,0x42,0xfd,0xff,0xff, + 0xff,0x57,0xf0,0xff,0xff,0xff,0xff,0x4f,0xfe,0xff,0x87,0xa8,0x52,0x29,0x08, + 0x2f,0x49,0x4a,0x49,0x12,0xff,0xff,0xff,0xff,0xbf,0x5a,0xf8,0x7f,0xff,0xff, + 0x9f,0xff,0xff,0xff,0xff,0xa9,0xfc,0xff,0xff,0xff,0xff,0x5f,0xf9,0xff,0x27, + 0x42,0xaa,0x94,0xc2,0x5f,0x55,0x55,0xaa,0xc0,0xff,0xff,0xff,0xff,0x5f,0x05, + 0xf9,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x15,0xfa,0xff,0xff,0xff,0xff, + 0x97,0xea,0xff,0x9f,0x88,0x24,0x45,0x88,0x4f,0x2a,0xa9,0x12,0x92,0xff,0xff, + 0xff,0xff,0x5f,0x4a,0xfc,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x95,0xfc, + 0xff,0xff,0xff,0xff,0xab,0xea,0xff,0x1f,0x22,0x51,0x10,0xe2,0xbf,0x92,0x4a, + 0x0a,0xc4,0xff,0xff,0xff,0xff,0x5f,0x19,0xf9,0x7f,0xff,0xff,0xff,0xff,0xff, + 0xff,0x7f,0x2a,0xfe,0xff,0xff,0xff,0xff,0x27,0x95,0xff,0x7f,0x08,0x84,0x42, + 0xf8,0x5f,0xa5,0x94,0xa2,0xd0,0xff,0xff,0xff,0xff,0x2f,0x0d,0xfc,0x7f,0xff, + 0xff,0xff,0xff,0xff,0xff,0x7f,0x45,0xff,0xff,0xff,0xff,0xff,0xa9,0xa4,0xff, + 0x7f,0x82,0x22,0x10,0xfa,0x3f,0xa9,0x52,0x09,0xe4,0xff,0xff,0xff,0xff,0x9f, + 0x4a,0xfd,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0x14,0xff,0xff,0xff,0x7f, + 0xff,0x55,0xa9,0xff,0xff,0x28,0x88,0xa2,0xfc,0xbf,0x2a,0x55,0xa0,0xf0,0xff, + 0xff,0xff,0xff,0xaf,0x24,0xfc,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x87, + 0xff,0xff,0xff,0x7f,0xfd,0x25,0x55,0xfe,0xff,0x43,0x22,0x08,0xfe,0x3f,0x4a, + 0x15,0x09,0xfc,0xff,0xff,0xff,0xff,0x5f,0x0d,0xfe,0x7f,0xff,0xff,0xff,0xff, + 0xff,0xff,0x4f,0xd1,0xff,0xff,0xff,0x5f,0x7d,0x4a,0xa5,0xfe,0xff,0x0b,0x89, + 0x24,0xff,0x5f,0x54,0x42,0xa4,0xfe,0xff,0xff,0xff,0xff,0x27,0xa5,0xfe,0x7f, + 0xff,0xff,0xff,0xff,0xff,0xff,0x5f,0xe1,0xff,0xff,0xff,0xaf,0x7e,0x55,0x29, + 0xfd,0xff,0x47,0x00,0xc1,0xff,0x1f,0x81,0x10,0x01,0xfe,0xff,0xff,0xff,0xff, + 0x57,0x0d,0xfe,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xd7,0xea,0xff,0xff,0xff, + 0x97,0xbf,0x24,0x55,0xfd,0xff,0x1f,0x55,0xf4,0xff,0x3f,0x14,0x42,0x94,0xff, + 0xff,0xff,0xff,0xff,0x4f,0x23,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0x2b, + 0xf0,0xff,0xff,0xff,0x55,0x5f,0xaa,0x92,0xfc,0xff,0xff,0x00,0xf8,0xff,0x1f, + 0x41,0x11,0x81,0xff,0xff,0xff,0xff,0xff,0xa7,0x0a,0xff,0x7f,0xff,0xff,0xff, + 0xff,0xff,0xff,0x67,0xf9,0xff,0xff,0xff,0xa5,0x5f,0x49,0xa5,0xfa,0xff,0xff, + 0xff,0xff,0xff,0x7f,0x24,0x04,0xd4,0xff,0xff,0xff,0xff,0xff,0x2f,0xa3,0xff, + 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0x29,0xfa,0xff,0xff,0xff,0xd4,0x9f,0xaa, + 0x54,0xfd,0xff,0xff,0xff,0xff,0xff,0x3f,0x09,0x51,0xf1,0xff,0xff,0xff,0xff, + 0xff,0xab,0x0a,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0x95,0xfc,0xff,0xff, + 0x3f,0x55,0xa4,0x92,0x2a,0xf9,0xff,0xff,0xff,0xff,0xff,0x7f,0x20,0x04,0xfc, + 0xff,0xff,0xff,0xff,0xff,0x27,0x21,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff, + 0x34,0xfe,0xff,0xff,0x5f,0x69,0xad,0x54,0x92,0xf4,0xff,0xff,0xff,0xff,0xff, + 0xff,0x0a,0x41,0xfd,0xff,0xff,0xff,0xff,0xff,0xab,0x8b,0xff,0x7f,0xff,0xff, + 0xff,0xff,0xff,0xff,0x8a,0xfe,0xff,0xff,0x5f,0x15,0x5c,0x55,0x55,0xf5,0xff, + 0xff,0xff,0xff,0xff,0xff,0x21,0x14,0xff,0xff,0xff,0xff,0xff,0xff,0x4b,0xa1, + 0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0x3f,0x2d,0xff,0xff,0xff,0x4f,0x2a,0x3f, + 0x92,0xa4,0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0x8b,0xc2,0xff,0xff,0xff,0xff, + 0xff,0xff,0xab,0x93,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0x7f,0x85,0xff,0xff, + 0xff,0x55,0x81,0xbf,0xaa,0x4a,0xf2,0xff,0xff,0xff,0xff,0xff,0xff,0x2f,0xf8, + 0xff,0xff,0xff,0xff,0xff,0xff,0xab,0xc8,0xff,0x7f,0xff,0xff,0xff,0xff,0xff, + 0x9f,0xd2,0xff,0xff,0xff,0x92,0x2a,0x5f,0x48,0x55,0xf9,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc9,0xc2,0xff,0x7f,0xff, + 0xff,0xff,0xff,0xff,0xbf,0xc2,0xff,0xff,0xff,0x2a,0x81,0x0f,0x29,0xa9,0xea, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xab, + 0xe8,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0x5f,0xe9,0xff,0xff,0xbf,0xa4,0xe4, + 0x5f,0xa4,0x94,0xf4,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xd4,0xe2,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0x27,0xf4,0xff, + 0xff,0x3f,0x55,0xd0,0x07,0x51,0x25,0xe5,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x69,0xe8,0xff,0x7f,0xff,0xff,0xff,0xff, + 0xff,0x57,0xf1,0xff,0xff,0xaf,0x2a,0xe5,0x4b,0x44,0xaa,0xf2,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xca,0xe2,0xff,0x7f, + 0xff,0xff,0xff,0xff,0xff,0x97,0xfc,0xff,0xff,0x57,0x12,0xf0,0x0f,0x91,0x52, + 0xf5,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x72,0xe8,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0x53,0xf8,0xff,0xff,0x25,0x49, + 0xf5,0x5f,0x44,0x29,0xe9,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x7f,0x6a,0xf2,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0x15,0xfd, + 0xff,0xff,0xa9,0x0a,0xf8,0x7f,0x90,0x4a,0xe5,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xaa,0xf8,0xff,0x7f,0xff,0xff,0xff, + 0xff,0xff,0x4a,0xfe,0xff,0x7f,0x95,0x92,0xfa,0xff,0x05,0xa9,0xf4,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x35,0xf9,0xff, + 0x7f,0xff,0xff,0xff,0xff,0xff,0x12,0xff,0xff,0x2f,0xa5,0x40,0xfc,0xff,0x51, + 0x4a,0xf5,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x7f,0x3a,0xfc,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0x6a,0xff,0xff,0x57,0xa9, + 0x14,0xfe,0xff,0x07,0xaa,0xe4,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xbf,0x5a,0xf9,0xff,0x7f,0xff,0xff,0xff,0xff,0x7f,0x09, + 0xff,0xff,0x4b,0x4a,0x40,0xff,0xff,0x57,0x49,0xf5,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0x1c,0xfc,0xff,0x7f,0xff,0xff, + 0xff,0xff,0x7f,0xaa,0xff,0x7f,0xa9,0x2a,0x95,0xff,0xff,0x07,0x55,0xea,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x5f,0x3d,0xfd, + 0xff,0x7f,0xff,0xff,0xff,0xff,0x7f,0x55,0xfe,0x7f,0x95,0x14,0xc0,0xff,0xff, + 0x2f,0x52,0xe9,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x5f,0x8d,0xfc,0xff,0x7f,0xff,0xff,0xff,0xff,0x7f,0x49,0xeb,0x57,0x4a, + 0x05,0xf9,0xff,0xff,0x9f,0x28,0xf5,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x5f,0x2e,0xfe,0xff,0x7f,0xff,0xff,0xff,0xff,0x9f, + 0x2a,0xa9,0xa4,0x54,0x29,0xfc,0xff,0xff,0x1f,0xa6,0xf4,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xaf,0x8e,0xfe,0xff,0x7f,0xff, + 0xff,0xff,0xff,0xbf,0xa4,0x54,0x95,0x52,0x02,0xfd,0xff,0xff,0xbf,0x52,0xf5, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x2f,0x2f, + 0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0x4f,0x55,0x25,0xa9,0x4a,0x29,0xfe,0xff, + 0xff,0x3f,0x94,0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xaf,0x87,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0x5f,0x2a,0x55,0xa5, + 0x54,0x80,0xff,0xff,0xff,0xff,0x54,0xf2,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x57,0x27,0xff,0xff,0x7f,0xff,0xff,0xff,0xff, + 0x97,0xa4,0xa4,0x4a,0x29,0xa5,0xff,0xff,0xff,0x7f,0xa4,0xf4,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x4f,0x17,0xff,0xff,0x7f, + 0xff,0xff,0xff,0xff,0x57,0x95,0x2a,0x29,0x05,0xe0,0xff,0xff,0xff,0xff,0x94, + 0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xa7, + 0xc7,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xaf,0xaa,0x54,0xaa,0x52,0xf5,0xff, + 0xff,0xff,0xff,0x54,0xf5,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xaf,0x8b,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0x27,0x49,0x4a, + 0xa5,0x04,0xf8,0xff,0xff,0xff,0xff,0xa4,0xf4,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xdf,0xff,0xff,0xff,0xff,0xff,0xab,0xa3,0xff,0xff,0x7f,0xff,0xff,0xff, + 0xff,0x4b,0x55,0xa9,0x4a,0x92,0xfc,0xff,0xff,0xff,0xff,0x49,0xf9,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xd7,0xff,0xff,0xff,0xff,0xff,0xa7,0x8b,0xff,0xff, + 0x7f,0xff,0xff,0xff,0xff,0x57,0x49,0x25,0xa9,0x20,0xfe,0xff,0xff,0xff,0xff, + 0x2b,0xf5,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe7,0xff,0xff,0xff,0xff,0xff, + 0xd3,0xc3,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0x93,0x2a,0x55,0x0a,0x82,0xff, + 0xff,0xff,0xff,0xff,0x55,0xf1,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe3,0xff, + 0xff,0xff,0xff,0xff,0xd7,0xd5,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0x57,0x52, + 0xa9,0xaa,0xd4,0xff,0xff,0xff,0xff,0xff,0x49,0xf6,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xf1,0xff,0xff,0xff,0xff,0xff,0xd5,0xc3,0xff,0xff,0x7f,0xff,0xff, + 0xff,0xff,0xab,0x4a,0x25,0x01,0xe0,0xff,0xff,0xff,0xff,0xff,0x55,0xf1,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xe5,0xfd,0xff,0xff,0xff,0xff,0xd3,0xe8,0xff, + 0xff,0x7f,0xff,0xff,0xff,0xff,0x4f,0xa9,0x54,0xa9,0xfa,0xff,0xff,0xff,0xff, + 0xff,0xa5,0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe1,0xfa,0xff,0xff,0xff, + 0xff,0xe9,0xe2,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0x27,0x95,0x4a,0x04,0xf8, + 0xff,0xff,0xff,0xff,0xff,0x49,0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf4, + 0xfd,0xff,0xff,0xff,0xff,0xca,0xe8,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xa7, + 0x4a,0x12,0x21,0xfd,0xff,0xff,0xff,0xff,0xff,0x35,0xf9,0xff,0xff,0xff,0xff, + 0xff,0xff,0x7f,0x61,0xf9,0xff,0xff,0xff,0xff,0x74,0xe2,0xff,0xff,0x7f,0xff, + 0xff,0xff,0xff,0x47,0xb2,0x42,0x84,0xff,0xff,0xff,0xff,0xff,0xff,0x45,0xf8, + 0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xe4,0xfa,0xff,0xff,0xff,0xff,0x72,0xe9, + 0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0x97,0x8a,0x10,0xa1,0xff,0xff,0xff,0xff, + 0xff,0xff,0x55,0xfd,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0xb1,0xfc,0xff,0xff, + 0xff,0xff,0x6a,0xe0,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0x07,0x22,0x42,0xc4, + 0xff,0xff,0xff,0xff,0xff,0xff,0x29,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xbf, + 0x74,0xfd,0xff,0xff,0xff,0x7f,0xaa,0xfa,0xff,0xff,0x7f,0xff,0xff,0xff,0xff, + 0xaf,0x88,0x14,0xf1,0xff,0xff,0xff,0xff,0xff,0xff,0x55,0xfd,0xff,0xff,0xff, + 0xff,0xff,0xff,0x3f,0x50,0xfe,0xff,0xff,0xff,0x7f,0x35,0xf0,0xff,0xff,0x7f, + 0xff,0xff,0xff,0xff,0x07,0x22,0x40,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0x25, + 0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0x9f,0xba,0xfc,0xff,0xff,0xff,0xbf,0xb4, + 0xf4,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0x9f,0x88,0x14,0xfe,0xff,0xff,0xff, + 0xff,0xff,0xff,0x53,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x98,0xfe,0xff, + 0xff,0xff,0x7f,0x1a,0xf1,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0x1f,0x22,0xc2, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x15,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xaf,0x56,0xfd,0xff,0xff,0xff,0x9f,0x52,0xfc,0xff,0xff,0x7f,0xff,0xff,0xff, + 0xff,0xbf,0x80,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x25,0xfe,0xff,0xff, + 0xff,0xff,0xff,0xff,0x0f,0x56,0xfe,0xff,0xff,0xff,0x5f,0x1d,0xf8,0xff,0xff, + 0x7f,0xff,0xff,0xff,0xff,0x7f,0x0a,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x89,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0x23,0x4b,0xff,0xff,0xff,0xff,0x3f, + 0x49,0xf9,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xf1,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x21,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0b,0xab,0xfe, + 0xff,0xff,0xff,0xbf,0x1c,0xfc,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x93,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xa1,0x93,0xff,0xff,0xff,0xff,0x4f,0x4d,0xfd,0xff,0xff,0x7f,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x85,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x95,0xab,0xff,0xff,0xff,0xff,0x2f,0x05,0xfc,0xff, + 0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xd1,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc0,0xd4,0xff,0xff,0xff,0xff, + 0x5f,0x55,0xfd,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xc5,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf5,0xca, + 0xff,0xff,0xff,0xff,0xaf,0x06,0xfe,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xd1,0xff,0xff,0xff,0xff,0xff, + 0xff,0x7f,0xe0,0xe9,0xff,0xff,0xff,0xff,0x97,0x56,0xfe,0xff,0xff,0x7f,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc9,0xff, + 0xff,0xff,0xff,0xff,0xff,0x7f,0x74,0xf4,0xff,0xff,0xff,0xff,0x57,0x07,0xff, + 0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xe3,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0xf0,0xfa,0xff,0xff,0xff, + 0xff,0x2f,0x4b,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xfb,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0xbd, + 0xf2,0xff,0xff,0xff,0xff,0x97,0x12,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x5f,0x38,0xfd,0xff,0xff,0xff,0xff,0xab,0x43,0xff,0xff,0xff,0x7f, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x5d,0xfd,0xff,0xff,0xff,0xff,0x4b,0x93, + 0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x2f,0x5c,0xfe,0xff,0xff, + 0xff,0xff,0x57,0xc5,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f, + 0xaf,0xfe,0xff,0xff,0xff,0xff,0xa7,0x91,0xff,0xff,0xff,0x7f,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x27,0x4f,0xff,0xff,0xff,0xff,0xff,0x49,0x85,0xff,0xff,0xff, + 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x43,0x2f,0xff,0xff,0xff,0xff,0xff,0xab, + 0xa1,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x8b,0x53,0xff,0xff, + 0xff,0xff,0xff,0x95,0x8a,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xa3,0xcb,0xff,0xff,0xff,0xff,0xff,0xd3,0xe0,0xff,0xff,0xff,0x7f,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0xff, + 0xff,0xff,0xff,0xff,0xc9,0xd5,0xff,0xff,0xff,0xff,0xff,0xd5,0xc2,0xff,0xff, + 0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc0,0xd5,0xff,0xff,0xff,0xff,0xff, + 0xaa,0xd0,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xdf,0xff,0xff,0xff,0xff,0xff,0xea,0xd2,0xff, + 0xff,0xff,0xff,0xff,0x51,0xc5,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xef,0xff,0xff,0xff,0xff, + 0xff,0x60,0xe9,0xff,0xff,0xff,0xff,0xff,0x54,0xe0,0xff,0xff,0xff,0x7f,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xcf, + 0xff,0xff,0xff,0xff,0x3f,0xfa,0xea,0xff,0xff,0xff,0xff,0xff,0x65,0xe5,0xff, + 0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xef,0xff,0xff,0xff,0xff,0xbf,0x70,0xf5,0xff,0xff,0xff,0xff, + 0x7f,0x55,0xe8,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xd3,0xff,0xff,0xff,0xff,0x1f,0x3a,0xf9, + 0xff,0xff,0xff,0xff,0xff,0x54,0xe2,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xeb,0xff,0xff,0xff, + 0xff,0x8f,0xb8,0xfc,0xff,0xff,0xff,0xff,0x7f,0x92,0xf0,0xff,0xff,0xff,0x7f, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xb5,0xff,0xff,0xdf,0xff,0x57,0x5e,0xfd,0xff,0xff,0xff,0xff,0xff,0x2a,0xe2, + 0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xca,0xff,0xff,0x8f,0xff,0x07,0x2c,0xfd,0xff,0xff,0xff, + 0xff,0xff,0x6a,0xf4,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xe9,0xff,0xff,0x57,0xff,0x2b,0xad, + 0xfe,0xff,0xff,0xff,0xff,0x7f,0x29,0xf1,0xff,0xff,0xff,0x7f,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xca,0xff,0xff, + 0x07,0xff,0x43,0x92,0xfe,0xff,0xff,0xff,0xff,0x7f,0x6a,0xf8,0xff,0xff,0xff, + 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x3f,0xd5,0xff,0xff,0x2b,0xfe,0x08,0x57,0xfe,0xff,0xff,0xff,0xff,0xbf,0x0a, + 0xf1,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xdf,0xc4,0xff,0xff,0x83,0x36,0x42,0xa5,0xff,0xff,0xff, + 0xff,0xff,0x7f,0x55,0xf4,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x2f,0xd5,0xff,0xff,0x48,0x4a,0x88, + 0x49,0xff,0xff,0xff,0xff,0xff,0x3f,0x19,0xf9,0xff,0xff,0xff,0x7f,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x5f,0xe5,0xff, + 0x7f,0x10,0x29,0xa2,0xb4,0xff,0xff,0xff,0xff,0xff,0xbf,0x54,0xf8,0xff,0xff, + 0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xa7,0xf4,0xff,0x7f,0x05,0x95,0x48,0xc5,0xff,0xff,0xff,0xff,0xff,0x7f, + 0x15,0xfd,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x57,0xe2,0xff,0xbf,0xa0,0x24,0x42,0xd5,0xff,0xff, + 0xff,0xff,0xff,0xbf,0xba,0xf8,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x4b,0xe5,0xff,0x3f,0x92,0xaa, + 0xa8,0xf4,0xff,0xff,0xff,0xff,0xff,0x5f,0x0a,0xfa,0xff,0xff,0xff,0x7f,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x55,0xe9, + 0xff,0x9f,0xa0,0x2a,0x55,0xea,0xff,0xff,0xff,0xff,0xff,0x5f,0x8d,0xf8,0xff, + 0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x92,0xf0,0xff,0x5f,0x4a,0x52,0xa9,0xf2,0xff,0xff,0xff,0xff,0xff, + 0x3f,0x19,0xfe,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x7f,0x55,0xf5,0xff,0x1f,0x20,0x29,0x25,0xfd,0xff, + 0xff,0xff,0xff,0xff,0x5f,0x8d,0xfc,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x2a,0xf8,0xff,0x47,0xa9, + 0x4a,0x55,0xfa,0xff,0xff,0xff,0xff,0xff,0x5f,0x2a,0xfe,0xff,0xff,0xff,0x7f, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x92, + 0xf2,0xff,0x17,0x52,0x55,0x49,0xfd,0xff,0xff,0xff,0xff,0xff,0x5f,0x8d,0xfc, + 0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x9f,0x54,0xf8,0xff,0x43,0x48,0x92,0xaa,0xfe,0xff,0xff,0xff,0xff, + 0xff,0xaf,0x2c,0xfc,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0x2a,0xfa,0xff,0x11,0x2a,0x55,0x52,0xff, + 0xff,0xff,0xff,0xff,0xff,0x4f,0x06,0xfd,0xff,0xff,0xff,0x7f,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xaf,0x92,0xfc,0xff,0x43, + 0x52,0xa9,0x4a,0xff,0xff,0xff,0xff,0xff,0xff,0x5f,0x55,0xfc,0xff,0xff,0xff, + 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x2f, + 0x09,0xfe,0xff,0x14,0xa9,0x4a,0xa9,0xff,0xff,0xff,0xff,0xff,0xff,0xa7,0x06, + 0xfe,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x57,0xa5,0xfe,0xff,0x40,0x4a,0x92,0xaa,0xff,0xff,0xff,0xff, + 0xff,0xff,0x4f,0x56,0xfc,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x4b,0x0a,0xff,0x7f,0x92,0x2a,0x55,0xd2, + 0xff,0xff,0xff,0xff,0xff,0xff,0x57,0x05,0xfd,0xff,0xff,0xff,0x7f,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x95,0xa0,0xff,0x7f, + 0x89,0x54,0x55,0xd5,0xff,0xff,0xff,0xff,0xff,0xff,0x2f,0x4d,0xfc,0xff,0xff, + 0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x52,0x8b,0xff,0x7f,0x80,0x92,0x92,0xea,0xff,0xff,0xff,0xff,0xff,0xff,0x97, + 0x16,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x55,0xe0,0xff,0x3f,0x55,0x55,0x2a,0xe9,0xff,0xff,0xff, + 0xff,0xff,0xff,0x57,0x47,0xfe,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x94,0xea,0xff,0x1f,0xa0,0xa4,0x52, + 0xf5,0xff,0xff,0xff,0xff,0xff,0xff,0xaf,0x02,0xfe,0xff,0xff,0xff,0x7f,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0xa5,0xf0,0xff, + 0x5f,0x49,0xb5,0xa4,0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0x97,0xab,0xff,0xff, + 0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xbf,0x52,0xf4,0xff,0x1f,0xaa,0xf4,0x2a,0xf9,0xff,0xff,0xff,0xff,0xff,0xff, + 0x4f,0x03,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xbf,0x2a,0xf8,0xff,0x4f,0x28,0xfd,0xaa,0xfe,0xff,0xff, + 0xff,0xff,0xff,0xff,0xd7,0xab,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x9f,0x94,0xfe,0xff,0x07,0x55,0xfd, + 0x49,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xaf,0x83,0xff,0xff,0xff,0xff,0x7f, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xaf,0x12,0xfc, + 0xff,0x17,0xa6,0xfe,0xeb,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe7,0xcf,0xff, + 0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x57,0x8a,0xfe,0xff,0xa3,0x56,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xd7,0xe7,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x4b,0x25,0xff,0xff,0x07,0x4a,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xef,0xe7,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xab,0x02,0xff,0xff,0x51,0x53, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xef,0xff,0xff,0xff,0xff, + 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x95,0xd4, + 0xff,0xff,0x05,0x95,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf7, + 0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x49,0xc1,0xff,0xff,0xa1,0xc9,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xf7,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x7f,0x2a,0xc9,0xff,0xff,0x92,0xea,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xa5,0xe2,0xff,0xff,0x04, + 0xd5,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x55, + 0xf8,0xff,0x7f,0xd1,0xe4,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x3f,0x29,0xf8,0xff,0x7f,0x84,0xea,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x4f,0xa5,0xfa,0xff,0xbf,0x70,0xe9,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xaf,0x14,0xfc,0xff,0x3f, + 0xb4,0xf4,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xaf, + 0x4a,0xfe,0xff,0x7f,0x51,0xf5,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x27,0x09,0xff,0xff,0x1f,0x38,0xf5,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xab,0x22,0xff,0xff,0xbf,0x5a,0xfa,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x53,0x89,0xff,0xff, + 0x1f,0x4c,0xfd,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x24,0xa5,0xff,0xff,0x5f,0xae,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x55,0xc1,0xff,0xff,0x1f,0x57,0xfe,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x95,0xf4,0xff,0xff,0x4f,0x4f,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0x52,0xe0,0xff, + 0xff,0x0f,0xa7,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x5f,0x2a,0xf9,0xff,0xff,0xaf,0x2b,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xbf,0x92,0xf8,0xff,0xff,0x8f,0xd7,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x4f,0x25,0xfe,0xff,0xff,0xa7,0xd3, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xaf,0x94,0xfc, + 0xff,0xff,0xc7,0xd5,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x97,0x0a,0xfe,0xff,0xff,0xcf,0xeb,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x57,0x89,0xff,0xff,0xff,0xe3,0xf3,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x29,0x25,0xff,0xff,0xff,0xeb, + 0xe5,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x95,0x82, + 0xff,0xff,0xff,0xe3,0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x52,0xe8,0xff,0xff,0xff,0xf7,0xf9,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x4a,0xc3,0xff,0xff,0xff,0xfb,0xf4,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0xa9,0xe8,0xff,0xff,0xff, + 0xff,0xfd,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0x54, + 0xf0,0xff,0xff,0xff,0xff,0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xbf,0x4a,0xfa,0xff,0xff,0xff,0xff,0xf9,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x4f,0x25,0xf8,0xff,0xff,0xff,0xff,0xfe,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x9f,0x94,0xfe,0xff,0xff, + 0xff,0xff,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x57, + 0x15,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xa7,0x44,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x55,0x12,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xa5,0xc2,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x2a,0x95,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x52,0xc1,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x94,0xf0,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x55,0xe2,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x5f,0xa5,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xbf,0x14,0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x2f,0xa5,0xf8,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x57,0x09,0xfe, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x2b,0x95,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xa7,0x0a,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x55,0x42,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x4a,0x89, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xa5,0xe2,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x7f,0x2a,0xc9,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xa5,0xe0,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x29, + 0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xbf,0xaa,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0x24,0xfa,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x5f,0x95,0xfc,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f, + 0x09,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x4f,0x95,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x5f,0x42,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x5f,0x95,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x27,0x81,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xaf,0xe4,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x57,0xf1,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x4b,0xe4,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x97,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x25,0xfa,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x95,0xf8,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x2b,0xfe, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x84,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x2a,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x81,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xaa, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff, + 0xff,0xff,0x7f,0xc2,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f, + 0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xd1,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0xe1,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0x7f, + 0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff, + 0xff,0xff,0xff,0x9f,0xf5,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xf8,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xfd,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff, + 0x6f,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff, + 0xff,0xff,0xff,0xff,0xbf,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff, + 0xff,0x9f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff, + 0xff,0xff,0xff,0xff,0xff,0xdf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xef,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f};
--- a/etc/ledit.l Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/ledit.l Mon Aug 13 08:46:35 2007 +0200 @@ -98,7 +98,7 @@ ;;; Liszt returns 0 if all was well. ;;; Note that in ordinary use the user will have to get used to looking ;;; at "%Warning: ... Compiler declared *foo* special" messages, since -;;; you don't usually want to hunt around in your file, zap in the the +;;; you don't usually want to hunt around in your file, zap in the ;;; declarations, then go back to what you were doing. ;;; Fortunately this doesn't cause the compiler to bomb. ;;; Some sleepless night I will think of a way to get around this.
--- a/etc/message/message-help-up.xbm Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/message/message-help-up.xbm Mon Aug 13 08:46:35 2007 +0200 @@ -1,12 +1,12 @@ -#define message-help-up_width 32 -#define message-help-up_height 32 -static char message-help-up_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x24,0x49,0x92,0x24,0x00,0x00,0x00, - 0x00,0x11,0x11,0x11,0x11,0x00,0xc0,0x03,0x00,0x44,0x64,0x46,0x44,0x00,0x70, - 0x0e,0x00,0x22,0x81,0x23,0x11,0x08,0x80,0x01,0x00,0xf8,0xff,0xff,0x3f,0x38, - 0x00,0x00,0x16,0xc8,0x80,0x81,0x11,0x0a,0x83,0x61,0x30,0x08,0x0c,0x18,0x10, - 0x08,0x30,0x06,0x10,0x0a,0xc8,0x05,0x30,0x08,0x06,0x18,0x10,0x08,0x01,0x20, - 0x10,0x8a,0x00,0x40,0x30,0x68,0x00,0x80,0x11,0x18,0x00,0x00,0x12,0x0a,0x00, - 0x00,0x3c,0xf8,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x12,0x11,0x02,0x20,0x00, - 0x40,0x90,0x04,0x44,0x04,0x00,0x10,0x00,0x80,0x44,0x40,0x10,0x11,0x00,0x02, - 0x02,0x00,0x24,0x00,0x88,0x88,0x80,0x24}; +#define noname_width 32 +#define noname_height 32 +static char noname_bits[] = { + 0x80,0x40,0x08,0x00,0x2a,0x14,0x42,0x55,0x40,0xa1,0x14,0x00,0x15,0x08,0x21, + 0x55,0xa0,0x22,0x84,0x80,0x0a,0xd0,0x23,0x28,0x50,0xe5,0x8e,0x82,0x05,0x68, + 0x46,0x28,0xa8,0x22,0x17,0x41,0x02,0xc8,0x81,0x14,0xf8,0xff,0xff,0x5f,0x3d, + 0x00,0x00,0x16,0xc8,0x80,0x81,0xb1,0x0c,0x83,0x61,0x10,0x0a,0x0c,0x18,0x50, + 0x08,0x30,0x06,0x10,0x0a,0xc8,0x05,0x30,0x08,0x06,0x18,0x50,0x0a,0x01,0x20, + 0x10,0x89,0x00,0x40,0x50,0x6c,0x00,0x80,0x11,0x19,0x00,0x00,0x52,0x0c,0x00, + 0x00,0x1c,0xf9,0xff,0xff,0x5f,0x20,0x22,0x92,0x24,0x8a,0x08,0x21,0x10,0x10, + 0x51,0x84,0x42,0x45,0x04,0x51,0x28,0x88,0x28,0x02,0x81,0x22,0x82,0x54,0x2a, + 0x88,0x28,0x00,0x81,0x44,0x04,0x55,0x28};
--- a/etc/message/message-spell-up.xbm Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/message/message-spell-up.xbm Mon Aug 13 08:46:35 2007 +0200 @@ -1,12 +1,12 @@ -#define message-spell-up_width 32 -#define message-spell-up_height 32 -static char message-spell-up_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x1c,0x00,0x92,0x24,0xe3,0x24,0x00,0x00,0x81, - 0x01,0x44,0x74,0x01,0x12,0x00,0x8c,0x04,0x02,0x22,0x43,0x04,0x45,0xc8,0x40, - 0x82,0x00,0x30,0x20,0x81,0x10,0x08,0x10,0xc1,0x03,0x66,0x12,0x20,0x26,0x0e, - 0x48,0x90,0x05,0x32,0x44,0x70,0x0c,0xc2,0x24,0x18,0x44,0x02,0x07,0x06,0xc4, - 0x02,0x8c,0x01,0x3c,0x02,0x72,0x01,0x0e,0x82,0x01,0x86,0x07,0x42,0x20,0xc8, - 0x25,0x22,0x70,0xf0,0x04,0x1a,0xfc,0x78,0x14,0x06,0xf8,0xfd,0x44,0x02,0xf0, - 0x1f,0x07,0xfe,0xff,0xff,0x0f,0x00,0xc0,0x07,0x20,0x44,0x92,0x23,0x01,0x00, - 0x00,0x05,0x04,0x90,0x08,0x00,0x20,0x02,0x80,0x90,0x00,0x08,0x22,0x02,0x12, - 0x40,0x00,0x08,0x40,0x00,0x08,0x80,0x00}; +#define noname_width 32 +#define noname_height 32 +static char noname_bits[] = { + 0x10,0x40,0x00,0x01,0x44,0x15,0x5e,0x50,0x12,0xa0,0x62,0x05,0x80,0x0a,0x81, + 0x51,0x2a,0x70,0x01,0x0a,0x81,0x8e,0x04,0x42,0x14,0x43,0x04,0x0b,0xc1,0x40, + 0x82,0x50,0x34,0x20,0x81,0x81,0x09,0x10,0xc1,0x2b,0x66,0x12,0x20,0x86,0x0e, + 0x48,0x90,0x25,0x32,0x44,0x70,0x94,0xc3,0x24,0x18,0x04,0x02,0x07,0x06,0xec, + 0x02,0x8c,0x01,0x3c,0x02,0x72,0x01,0x8e,0x83,0x01,0x86,0x27,0x42,0x30,0xe8, + 0x87,0x22,0x70,0xf0,0x2c,0x1a,0xfe,0x79,0x84,0x07,0xf8,0xbd,0x24,0x02,0xf0, + 0x3f,0x97,0xfe,0xff,0xff,0x07,0x92,0xc4,0x07,0x29,0x04,0xa1,0x53,0x44,0x50, + 0x14,0x85,0x10,0x0a,0x01,0x21,0x44,0x20,0x2a,0x94,0x12,0x8a,0x80,0x22,0x40, + 0x10,0x15,0x88,0x0a,0x45,0xa0,0x42,0x40};
--- a/etc/news.texi Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/news.texi Mon Aug 13 08:46:35 2007 +0200 @@ -2773,7 +2773,7 @@ The function @code{minor-mode-key-binding} returns a list of all the active minor mode bindings of @var{key}. More precisely, it returns an alist of pairs @code{(@var{modename} . @var{binding})}, where -@var{modename} is the the variable which enables the minor mode, and +@var{modename} is the variable which enables the minor mode, and @var{binding} is @var{key}'s definition in that mode. If @var{key} has no minor-mode bindings, the value is @code{nil}.
--- a/etc/ns/XEmacs.info Mon Aug 13 08:45:53 2007 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ -Title XEmacs -Version 19.13 -Description XEmacs has native support for the NeXTstep window system. If you have installed the old XEmacs.app in /LocalApps, don't forget to delete it first. Installation will also create links to the /usr/local hierarchy which makes XEmacs accessible to shell users. -DefaultLocation /LocalApps -Relocatable NO -Application YES -DiskName XEmacs19.13 -DeleteWarning Removing this package will also delete the links to it in the /usr/local hierachy.
--- a/etc/sample.emacs Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/sample.emacs Mon Aug 13 08:46:35 2007 +0200 @@ -1,4 +1,4 @@ -;;; -*- Mode: Emacs-Lisp -*- +;; -*- Mode: Emacs-Lisp -*- ;;; This is a sample .emacs file. ;;; @@ -17,11 +17,11 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Enable the commands `narrow-to-region' ("C-x n n") and -;; `eval-expression' ("M-ESC", or "ESC ESC"). Both are useful +;; `eval-expression' ("M-:", or "ESC :"). Both are useful ;; commands, but they can be confusing for a new user, so they're ;; disabled by default. (put 'narrow-to-region 'disabled nil) -(put 'eval-expression 'disabled nil) +(put 'eval-expression 'disabled nil) ;;; Define a variable to indicate whether we're running XEmacs/Lucid Emacs. ;;; (You do not have to defvar a global variable before using it -- @@ -106,16 +106,15 @@ ;; Note that if you want to put more than one form in the ;; `THEN' clause of an IF-THEN-ELSE construct, you have to ;; surround the forms with `progn'. You don't have to - ;; do this for the `ELSE' clause. + ;; do this for the `ELSE' clauses. (progn (setq-default modeline-buffer-identification '("XEmacs: %17b")) - (setq modeline-buffer-identification '("XEmacs: %17b"))) + (setq modeline-buffer-identification '("XEmacs: %17b"))) (setq-default mode-line-buffer-identification '("XEmacs: %17b")) - (setq mode-line-buffer-identification '("XEmacs: %17b"))) + (setq mode-line-buffer-identification '("XEmacs: %17b"))) (cond ((or (not (fboundp 'device-type)) (equal (device-type) 'x)) - ;; ;; Code which applies only when running emacs under X goes here. ;; (We check whether the function `device-type' exists ;; before using it. In versions before 19.12, there @@ -212,14 +211,14 @@ (set-glyph-image gc-pointer-glyph file)))) ;; Add `dired' to the File menu - (add-menu-item '("File") "Edit Directory" 'dired t) + (add-menu-button '("File") ["Edit Directory" dired t]) ;; Here's a way to add scrollbar-like buttons to the menubar - (add-menu-item nil "Top" 'beginning-of-buffer t) - (add-menu-item nil "<<<" 'scroll-down t) - (add-menu-item nil " . " 'recenter t) - (add-menu-item nil ">>>" 'scroll-up t) - (add-menu-item nil "Bot" 'end-of-buffer t) + (add-menu-button nil ["Top" beginning-of-buffer t]) + (add-menu-button nil ["<<<" scroll-down t]) + (add-menu-button nil [" . " recenter t]) + (add-menu-button nil [">>>" scroll-up t]) + (add-menu-button nil ["Bot" end-of-buffer t]) ;; Change the behavior of mouse button 2 (which is normally ;; bound to `mouse-yank'), so that it inserts the selected text @@ -235,7 +234,7 @@ ;; like to insert tabs into comments and such. It gets to be ;; a pain to always have to use `C-q TAB', so I set up a more ;; convenient binding. Note that this does not work in - ;; TTY frames. + ;; TTY frames, where tab and shift-tab are indistinguishable. (define-key global-map '(shift tab) 'self-insert-command) ;; LISPM bindings of Control-Shift-C and Control-Shift-E. @@ -453,7 +452,7 @@ ;; from the default face. For example, if the default face ;; is bold, then the 'bold face will be unbold.) (copy-face 'italic 'font-lock-comment-face) - ;; Underling comments looks terrible on tty's + ;; Underlining comments looks terrible on tty's (set-face-underline-p 'font-lock-comment-face nil 'global 'tty) (set-face-highlight-p 'font-lock-comment-face t 'global 'tty) (copy-face 'font-lock-comment-face 'font-lock-doc-string-face) @@ -542,9 +541,9 @@ ;;; Emacs provides a nice front-end onto MH, called "mh-e". ;;; ;; Bindings that let you send or read mail using MH -;(global-set-key "\C-xm" 'mh-smail) +;(global-set-key "\C-xm" 'mh-smail) ;(global-set-key "\C-x4m" 'mh-smail-other-window) -;(global-set-key "\C-cr" 'mh-rmail) +;(global-set-key "\C-cr" 'mh-rmail) ;; Customization of MH behavior. (setq mh-delete-yanked-msg-window t)
--- a/etc/sgml/CATALOG Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/sgml/CATALOG Mon Aug 13 08:46:35 2007 +0200 @@ -1,28 +1,49 @@ -PUBLIC "-//IETF//DTD HTML//EN" html-netscape.dtd -PUBLIC "-//IETF//DTD HTML Netscape//EN" html-netscape.dtd -PUBLIC "-//IETF//ENTITIES Added Latin 1 for HTML//EN" ISOlat1.sgml -PUBLIC "ISO 8879-1986//ENTITIES Added Latin 1//EN//HTML" ISOlat1.sgml -PUBLIC "-//W3C//DTD HTML 3.2//EN" html-3.2.dtd -PUBLIC "-//IETF//DTD HTML//EN//3.0" html-3.dtd -PUBLIC "-//W3O//DTD W3 HTML 3.0//EN//" html-3.dtd -PUBLIC "-//W3O//DTD W3 HTML 3.0//EN" html-3.dtd -PUBLIC "-//IETF//DTD HTML 3.0//EN" html-3.dtd -PUBLIC "-//IETF//DTD HTML 3.0//EN//" html-3.dtd -PUBLIC "-//IETF//DTD HTML Level 3//EN" html-3.dtd -PUBLIC "-//IETF//DTD HTML Level 3//EN//3.0" html-3.dtd -PUBLIC "-//IETF//DTD HTML//EN//2.0" html-2.dtd -PUBLIC "-//IETF//DTD HTML 2.0//EN" html-2.dtd -PUBLIC "-//IETF//DTD HTML Level 2//EN" html-2.dtd -PUBLIC "-//IETF//DTD HTML Level 2//EN//2.0" html-2.dtd +PUBLIC "-//IETF//ENTITIES Added Latin 1 for HTML//EN" html-latin.sgml +PUBLIC "ISO 8879-1986//ENTITIES Added Latin 1//EN//HTML" html-latin.sgml +PUBLIC "-//IETF//ENTITIES icons for HTML//EN" html-icons.sgml +PUBLIC "-//IETF//ENTITIES Math and Greek for HTML//EN" html-math.sgml +PUBLIC "-//W3C//DTD HTML 3.2//EN" html-3.2.dtd +PUBLIC "-//IETF//DTD HTML//EN//3.0" html-3.dtd +PUBLIC "-//W3O//DTD W3 HTML 3.0//EN//" html-3.dtd +PUBLIC "-//W3O//DTD W3 HTML 3.0//EN" html-3.dtd +PUBLIC "-//IETF//DTD HTML 3.0//EN" html-3.dtd +PUBLIC "-//IETF//DTD HTML 3.0//EN//" html-3.dtd +PUBLIC "-//IETF//DTD HTML Level 3//EN" html-3.dtd +PUBLIC "-//IETF//DTD HTML Level 3//EN//3.0" html-3.dtd +PUBLIC "-//IETF//DTD HTML Strict//EN//3.0" html-3s.dtd +PUBLIC "-//W3O//DTD W3 HTML Strict 3.0//EN//" html-3s.dtd +PUBLIC "-//IETF//DTD HTML Strict Level 3//EN" html-3s.dtd +PUBLIC "-//IETF//DTD HTML Strict Level 3//EN//3.0" html-3s.dtd +PUBLIC "HTML" html.dtd +PUBLIC "-//IETF//DTD HTML//EN" html.dtd +PUBLIC "-//IETF//DTD HTML//EN//2.0" html.dtd +PUBLIC "-//IETF//DTD HTML 2.0//EN" html.dtd +PUBLIC "-//IETF//DTD HTML Level 2//EN" html.dtd +PUBLIC "-//IETF//DTD HTML Level 2//EN//2.0" html.dtd +PUBLIC "-//IETF//DTD HTML Level 1//EN" html-1.dtd +PUBLIC "-//IETF//DTD HTML Level 1//EN//2.0" html-1.dtd +PUBLIC "-//IETF//DTD HTML Level 0//EN" html-0.dtd +PUBLIC "-//IETF//DTD HTML Level 0//EN//2.0" html-0.dtd +PUBLIC "-//IETF//DTD HTML Strict//EN" html-s.dtd +PUBLIC "-//IETF//DTD HTML Strict//EN//2.0" html-s.dtd +PUBLIC "-//IETF//DTD HTML Strict Level 2//EN" html-s.dtd +PUBLIC "-//IETF//DTD HTML Strict Level 2//EN//2.0" html-s.dtd +PUBLIC "-//IETF//DTD HTML Strict Level 1//EN" html-1s.dtd +PUBLIC "-//IETF//DTD HTML Strict Level 1//EN//2.0" html-1s.dtd +PUBLIC "-//IETF//DTD HTML Strict Level 0//EN" html-0s.dtd +PUBLIC "-//IETF//DTD HTML Strict Level 0//EN//2.0" html-0s.dtd +PUBLIC "-//Netscape Comm. Corp.//DTD HTML//EN" html-mcom.dtd +PUBLIC "-//WebTechs//DTD Mozilla HTML//EN" html-mcom.dtd +PUBLIC "-//WebTechs//DTD Mozilla HTML 2.0//EN" html-mcom.dtd +PUBLIC "-//Netscape Comm. Corp.//DTD Strict HTML//EN" html-mcoms.dtd +PUBLIC "-//WebTechs//DTD Strict HTML//EN" html-mcoms.dtd +PUBLIC "-//WebTechs//DTD Strict HTML 2.0//EN" html-mcoms.dtd +PUBLIC "-//Sun Microsystems Corp.//DTD HotJava HTML//EN" html-hj.dtd +PUBLIC "-//Sun Microsystems Corp.//DTD HotJava Strict HTML//EN" html-hjs.dtd +PUBLIC "-//WebTechs//DTD PUML 1.0//EN" puml.dtd +PUBLIC "-//SQ//DTD HTML 2.0 HoTMetaL + extensions//EN" SQ.dtd PUBLIC "-//Microsoft//DTD Internet Explorer 2.0 HTML//EN" iehtml.dtd PUBLIC "-//Microsoft//DTD Internet Explorer 2.0 HTML Strict//EN" iehtml-s.dtd PUBLIC "-//Microsoft//DTD Internet Explorer 2.0 Tables//EN" ietables.dtd -PUBLIC "-//Netscape Comm. Corp.//DTD HTML//EN" html-netscape.dtd -PUBLIC "-//WebTechs//DTD Mozilla HTML//EN" html-netscape.dtd -PUBLIC "-//WebTechs//DTD Mozilla HTML 2.0//EN" html-netscape.dtd -PUBLIC "-//Netscape Comm. Corp.//DTD Strict HTML//EN" html-netscape.dtd -PUBLIC "-//WebTechs//DTD Strict HTML//EN" html-netscape.dtd -PUBLIC "-//WebTechs//DTD Strict HTML 2.0//EN" html-netscape.dtd -DOCTYPE HTML html-netscape.dtd -DOCTYPE HTML-3 html-3.dtd - +PUBLIC "-//W3C//DTD HTML 3.2//EN" html-3.2.dtd +PUBLIC "-//W3C//DTD HTML Experimental 19960712//EN" html-cougar.dtd
--- a/etc/sgml/ECAT Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/sgml/ECAT Mon Aug 13 08:46:35 2007 +0200 @@ -1,6 +1,8 @@ -FILE html.dtd [ HTML.Recommended "INCLUDE" ] cdtd/html-r -FILE html.dtd cdtd/html -FILE html-2.dtd cdtd/html-2 -FILE html-3.dtd cdtd/html-3 -FILE html-netscape.dtd cdtd/html-netscape -FILE html-3.2.dtd cdtd/html-3.2 +FILE html.dtd [ HTML.Recommended "INCLUDE" ] cdtd/html-r +FILE html.dtd [ ] cdtd/html +FILE html-2.dtd [ ] cdtd/html-2 +FILE html-3.dtd [ ] cdtd/html-3 +FILE html-mcom.dtd [ ] cdtd/html-mcom +FILE html-3.2.dtd [ ] cdtd/html-3.2 +FILE html-hj.dtd [ ] cdtd/html-hj +FILE iehtml.dtd [ ] cdtd/iehtml
--- a/etc/sgml/ISOlat1.sgml Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/sgml/ISOlat1.sgml Mon Aug 13 08:46:35 2007 +0200 @@ -5,74 +5,70 @@ --> <!-- Character entity set. Typical invocation: <!ENTITY % ISOlat1 PUBLIC - "ISO 8879:1986//ENTITIES Added Latin 1//EN"> + "-//IETF//ENTITIES Added Latin 1 for HTML//EN"> %ISOlat1; --> -<!-- Added (Ben Wing) 4-4-96: the most common entities were omitted ... --> -<!ENTITY quot SDATA "[quot ]" -- quotation mark --> -<!ENTITY amp SDATA "[amp ]" -- ampersand --> -<!ENTITY lt SDATA "[lt ]" -- less than --> -<!ENTITY gt SDATA "[gt ]" -- greater than --> -<!-- end added (Ben Wing) 4-4-96 --> -<!ENTITY aacute SDATA "[aacute]"--=small a, acute accent--> -<!ENTITY Aacute SDATA "[Aacute]"--=capital A, acute accent--> -<!ENTITY acirc SDATA "[acirc ]"--=small a, circumflex accent--> -<!ENTITY Acirc SDATA "[Acirc ]"--=capital A, circumflex accent--> -<!ENTITY agrave SDATA "[agrave]"--=small a, grave accent--> -<!ENTITY Agrave SDATA "[Agrave]"--=capital A, grave accent--> -<!ENTITY aring SDATA "[aring ]"--=small a, ring--> -<!ENTITY Aring SDATA "[Aring ]"--=capital A, ring--> -<!ENTITY atilde SDATA "[atilde]"--=small a, tilde--> -<!ENTITY Atilde SDATA "[Atilde]"--=capital A, tilde--> -<!ENTITY auml SDATA "[auml ]"--=small a, dieresis or umlaut mark--> -<!ENTITY Auml SDATA "[Auml ]"--=capital A, dieresis or umlaut mark--> -<!ENTITY aelig SDATA "[aelig ]"--=small ae diphthong (ligature)--> -<!ENTITY AElig SDATA "[AElig ]"--=capital AE diphthong (ligature)--> -<!ENTITY ccedil SDATA "[ccedil]"--=small c, cedilla--> -<!ENTITY Ccedil SDATA "[Ccedil]"--=capital C, cedilla--> -<!ENTITY eth SDATA "[eth ]"--=small eth, Icelandic--> -<!ENTITY ETH SDATA "[ETH ]"--=capital Eth, Icelandic--> -<!ENTITY eacute SDATA "[eacute]"--=small e, acute accent--> -<!ENTITY Eacute SDATA "[Eacute]"--=capital E, acute accent--> -<!ENTITY ecirc SDATA "[ecirc ]"--=small e, circumflex accent--> -<!ENTITY Ecirc SDATA "[Ecirc ]"--=capital E, circumflex accent--> -<!ENTITY egrave SDATA "[egrave]"--=small e, grave accent--> -<!ENTITY Egrave SDATA "[Egrave]"--=capital E, grave accent--> -<!ENTITY euml SDATA "[euml ]"--=small e, dieresis or umlaut mark--> -<!ENTITY Euml SDATA "[Euml ]"--=capital E, dieresis or umlaut mark--> -<!ENTITY iacute SDATA "[iacute]"--=small i, acute accent--> -<!ENTITY Iacute SDATA "[Iacute]"--=capital I, acute accent--> -<!ENTITY icirc SDATA "[icirc ]"--=small i, circumflex accent--> -<!ENTITY Icirc SDATA "[Icirc ]"--=capital I, circumflex accent--> -<!ENTITY igrave SDATA "[igrave]"--=small i, grave accent--> -<!ENTITY Igrave SDATA "[Igrave]"--=capital I, grave accent--> -<!ENTITY iuml SDATA "[iuml ]"--=small i, dieresis or umlaut mark--> -<!ENTITY Iuml SDATA "[Iuml ]"--=capital I, dieresis or umlaut mark--> -<!ENTITY ntilde SDATA "[ntilde]"--=small n, tilde--> -<!ENTITY Ntilde SDATA "[Ntilde]"--=capital N, tilde--> -<!ENTITY oacute SDATA "[oacute]"--=small o, acute accent--> -<!ENTITY Oacute SDATA "[Oacute]"--=capital O, acute accent--> -<!ENTITY ocirc SDATA "[ocirc ]"--=small o, circumflex accent--> -<!ENTITY Ocirc SDATA "[Ocirc ]"--=capital O, circumflex accent--> -<!ENTITY ograve SDATA "[ograve]"--=small o, grave accent--> -<!ENTITY Ograve SDATA "[Ograve]"--=capital O, grave accent--> -<!ENTITY oslash SDATA "[oslash]"--=small o, slash--> -<!ENTITY Oslash SDATA "[Oslash]"--=capital O, slash--> -<!ENTITY otilde SDATA "[otilde]"--=small o, tilde--> -<!ENTITY Otilde SDATA "[Otilde]"--=capital O, tilde--> -<!ENTITY ouml SDATA "[ouml ]"--=small o, dieresis or umlaut mark--> -<!ENTITY Ouml SDATA "[Ouml ]"--=capital O, dieresis or umlaut mark--> -<!ENTITY szlig SDATA "[szlig ]"--=small sharp s, German (sz ligature)--> -<!ENTITY thorn SDATA "[thorn ]"--=small thorn, Icelandic--> -<!ENTITY THORN SDATA "[THORN ]"--=capital THORN, Icelandic--> -<!ENTITY uacute SDATA "[uacute]"--=small u, acute accent--> -<!ENTITY Uacute SDATA "[Uacute]"--=capital U, acute accent--> -<!ENTITY ucirc SDATA "[ucirc ]"--=small u, circumflex accent--> -<!ENTITY Ucirc SDATA "[Ucirc ]"--=capital U, circumflex accent--> -<!ENTITY ugrave SDATA "[ugrave]"--=small u, grave accent--> -<!ENTITY Ugrave SDATA "[Ugrave]"--=capital U, grave accent--> -<!ENTITY uuml SDATA "[uuml ]"--=small u, dieresis or umlaut mark--> -<!ENTITY Uuml SDATA "[Uuml ]"--=capital U, dieresis or umlaut mark--> -<!ENTITY yacute SDATA "[yacute]"--=small y, acute accent--> -<!ENTITY Yacute SDATA "[Yacute]"--=capital Y, acute accent--> -<!ENTITY yuml SDATA "[yuml ]"--=small y, dieresis or umlaut mark--> +<!-- Modified for use in HTML + $Id: ISOlat1.sgml,v 1.1.1.2 1996/12/18 03:43:02 steve Exp $ --> +<!ENTITY AElig CDATA "Æ" -- capital AE diphthong (ligature) --> +<!ENTITY Aacute CDATA "Á" -- capital A, acute accent --> +<!ENTITY Acirc CDATA "Â" -- capital A, circumflex accent --> +<!ENTITY Agrave CDATA "À" -- capital A, grave accent --> +<!ENTITY Aring CDATA "Å" -- capital A, ring --> +<!ENTITY Atilde CDATA "Ã" -- capital A, tilde --> +<!ENTITY Auml CDATA "Ä" -- capital A, dieresis or umlaut mark --> +<!ENTITY Ccedil CDATA "Ç" -- capital C, cedilla --> +<!ENTITY ETH CDATA "Ð" -- capital Eth, Icelandic --> +<!ENTITY Eacute CDATA "É" -- capital E, acute accent --> +<!ENTITY Ecirc CDATA "Ê" -- capital E, circumflex accent --> +<!ENTITY Egrave CDATA "È" -- capital E, grave accent --> +<!ENTITY Euml CDATA "Ë" -- capital E, dieresis or umlaut mark --> +<!ENTITY Iacute CDATA "Í" -- capital I, acute accent --> +<!ENTITY Icirc CDATA "Î" -- capital I, circumflex accent --> +<!ENTITY Igrave CDATA "Ì" -- capital I, grave accent --> +<!ENTITY Iuml CDATA "Ï" -- capital I, dieresis or umlaut mark --> +<!ENTITY Ntilde CDATA "Ñ" -- capital N, tilde --> +<!ENTITY Oacute CDATA "Ó" -- capital O, acute accent --> +<!ENTITY Ocirc CDATA "Ô" -- capital O, circumflex accent --> +<!ENTITY Ograve CDATA "Ò" -- capital O, grave accent --> +<!ENTITY Oslash CDATA "Ø" -- capital O, slash --> +<!ENTITY Otilde CDATA "Õ" -- capital O, tilde --> +<!ENTITY Ouml CDATA "Ö" -- capital O, dieresis or umlaut mark --> +<!ENTITY THORN CDATA "Þ" -- capital THORN, Icelandic --> +<!ENTITY Uacute CDATA "Ú" -- capital U, acute accent --> +<!ENTITY Ucirc CDATA "Û" -- capital U, circumflex accent --> +<!ENTITY Ugrave CDATA "Ù" -- capital U, grave accent --> +<!ENTITY Uuml CDATA "Ü" -- capital U, dieresis or umlaut mark --> +<!ENTITY Yacute CDATA "Ý" -- capital Y, acute accent --> +<!ENTITY aacute CDATA "á" -- small a, acute accent --> +<!ENTITY acirc CDATA "â" -- small a, circumflex accent --> +<!ENTITY aelig CDATA "æ" -- small ae diphthong (ligature) --> +<!ENTITY agrave CDATA "à" -- small a, grave accent --> +<!ENTITY aring CDATA "å" -- small a, ring --> +<!ENTITY atilde CDATA "ã" -- small a, tilde --> +<!ENTITY auml CDATA "ä" -- small a, dieresis or umlaut mark --> +<!ENTITY ccedil CDATA "ç" -- small c, cedilla --> +<!ENTITY eacute CDATA "é" -- small e, acute accent --> +<!ENTITY ecirc CDATA "ê" -- small e, circumflex accent --> +<!ENTITY egrave CDATA "è" -- small e, grave accent --> +<!ENTITY eth CDATA "ð" -- small eth, Icelandic --> +<!ENTITY euml CDATA "ë" -- small e, dieresis or umlaut mark --> +<!ENTITY iacute CDATA "í" -- small i, acute accent --> +<!ENTITY icirc CDATA "î" -- small i, circumflex accent --> +<!ENTITY igrave CDATA "ì" -- small i, grave accent --> +<!ENTITY iuml CDATA "ï" -- small i, dieresis or umlaut mark --> +<!ENTITY ntilde CDATA "ñ" -- small n, tilde --> +<!ENTITY oacute CDATA "ó" -- small o, acute accent --> +<!ENTITY ocirc CDATA "ô" -- small o, circumflex accent --> +<!ENTITY ograve CDATA "ò" -- small o, grave accent --> +<!ENTITY oslash CDATA "ø" -- small o, slash --> +<!ENTITY otilde CDATA "õ" -- small o, tilde --> +<!ENTITY ouml CDATA "ö" -- small o, dieresis or umlaut mark --> +<!ENTITY szlig CDATA "ß" -- small sharp s, German (sz ligature) --> +<!ENTITY thorn CDATA "þ" -- small thorn, Icelandic --> +<!ENTITY uacute CDATA "ú" -- small u, acute accent --> +<!ENTITY ucirc CDATA "û" -- small u, circumflex accent --> +<!ENTITY ugrave CDATA "ù" -- small u, grave accent --> +<!ENTITY uuml CDATA "ü" -- small u, dieresis or umlaut mark --> +<!ENTITY yacute CDATA "ý" -- small y, acute accent --> +<!ENTITY yuml CDATA "ÿ" -- small y, dieresis or umlaut mark -->
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/sgml/Wing.ISOlat1.sgml Mon Aug 13 08:46:35 2007 +0200 @@ -0,0 +1,78 @@ +<!-- (C) International Organization for Standardization 1986 + Permission to copy in any form is granted for use with + conforming SGML systems and applications as defined in + ISO 8879, provided this notice is included in all copies. +--> +<!-- Character entity set. Typical invocation: + <!ENTITY % ISOlat1 PUBLIC + "ISO 8879:1986//ENTITIES Added Latin 1//EN"> + %ISOlat1; +--> +<!-- Added (Ben Wing) 4-4-96: the most common entities were omitted ... --> +<!ENTITY quot SDATA "[quot ]" -- quotation mark --> +<!ENTITY amp SDATA "[amp ]" -- ampersand --> +<!ENTITY lt SDATA "[lt ]" -- less than --> +<!ENTITY gt SDATA "[gt ]" -- greater than --> +<!-- end added (Ben Wing) 4-4-96 --> +<!ENTITY aacute SDATA "[aacute]"--=small a, acute accent--> +<!ENTITY Aacute SDATA "[Aacute]"--=capital A, acute accent--> +<!ENTITY acirc SDATA "[acirc ]"--=small a, circumflex accent--> +<!ENTITY Acirc SDATA "[Acirc ]"--=capital A, circumflex accent--> +<!ENTITY agrave SDATA "[agrave]"--=small a, grave accent--> +<!ENTITY Agrave SDATA "[Agrave]"--=capital A, grave accent--> +<!ENTITY aring SDATA "[aring ]"--=small a, ring--> +<!ENTITY Aring SDATA "[Aring ]"--=capital A, ring--> +<!ENTITY atilde SDATA "[atilde]"--=small a, tilde--> +<!ENTITY Atilde SDATA "[Atilde]"--=capital A, tilde--> +<!ENTITY auml SDATA "[auml ]"--=small a, dieresis or umlaut mark--> +<!ENTITY Auml SDATA "[Auml ]"--=capital A, dieresis or umlaut mark--> +<!ENTITY aelig SDATA "[aelig ]"--=small ae diphthong (ligature)--> +<!ENTITY AElig SDATA "[AElig ]"--=capital AE diphthong (ligature)--> +<!ENTITY ccedil SDATA "[ccedil]"--=small c, cedilla--> +<!ENTITY Ccedil SDATA "[Ccedil]"--=capital C, cedilla--> +<!ENTITY eth SDATA "[eth ]"--=small eth, Icelandic--> +<!ENTITY ETH SDATA "[ETH ]"--=capital Eth, Icelandic--> +<!ENTITY eacute SDATA "[eacute]"--=small e, acute accent--> +<!ENTITY Eacute SDATA "[Eacute]"--=capital E, acute accent--> +<!ENTITY ecirc SDATA "[ecirc ]"--=small e, circumflex accent--> +<!ENTITY Ecirc SDATA "[Ecirc ]"--=capital E, circumflex accent--> +<!ENTITY egrave SDATA "[egrave]"--=small e, grave accent--> +<!ENTITY Egrave SDATA "[Egrave]"--=capital E, grave accent--> +<!ENTITY euml SDATA "[euml ]"--=small e, dieresis or umlaut mark--> +<!ENTITY Euml SDATA "[Euml ]"--=capital E, dieresis or umlaut mark--> +<!ENTITY iacute SDATA "[iacute]"--=small i, acute accent--> +<!ENTITY Iacute SDATA "[Iacute]"--=capital I, acute accent--> +<!ENTITY icirc SDATA "[icirc ]"--=small i, circumflex accent--> +<!ENTITY Icirc SDATA "[Icirc ]"--=capital I, circumflex accent--> +<!ENTITY igrave SDATA "[igrave]"--=small i, grave accent--> +<!ENTITY Igrave SDATA "[Igrave]"--=capital I, grave accent--> +<!ENTITY iuml SDATA "[iuml ]"--=small i, dieresis or umlaut mark--> +<!ENTITY Iuml SDATA "[Iuml ]"--=capital I, dieresis or umlaut mark--> +<!ENTITY ntilde SDATA "[ntilde]"--=small n, tilde--> +<!ENTITY Ntilde SDATA "[Ntilde]"--=capital N, tilde--> +<!ENTITY oacute SDATA "[oacute]"--=small o, acute accent--> +<!ENTITY Oacute SDATA "[Oacute]"--=capital O, acute accent--> +<!ENTITY ocirc SDATA "[ocirc ]"--=small o, circumflex accent--> +<!ENTITY Ocirc SDATA "[Ocirc ]"--=capital O, circumflex accent--> +<!ENTITY ograve SDATA "[ograve]"--=small o, grave accent--> +<!ENTITY Ograve SDATA "[Ograve]"--=capital O, grave accent--> +<!ENTITY oslash SDATA "[oslash]"--=small o, slash--> +<!ENTITY Oslash SDATA "[Oslash]"--=capital O, slash--> +<!ENTITY otilde SDATA "[otilde]"--=small o, tilde--> +<!ENTITY Otilde SDATA "[Otilde]"--=capital O, tilde--> +<!ENTITY ouml SDATA "[ouml ]"--=small o, dieresis or umlaut mark--> +<!ENTITY Ouml SDATA "[Ouml ]"--=capital O, dieresis or umlaut mark--> +<!ENTITY szlig SDATA "[szlig ]"--=small sharp s, German (sz ligature)--> +<!ENTITY thorn SDATA "[thorn ]"--=small thorn, Icelandic--> +<!ENTITY THORN SDATA "[THORN ]"--=capital THORN, Icelandic--> +<!ENTITY uacute SDATA "[uacute]"--=small u, acute accent--> +<!ENTITY Uacute SDATA "[Uacute]"--=capital U, acute accent--> +<!ENTITY ucirc SDATA "[ucirc ]"--=small u, circumflex accent--> +<!ENTITY Ucirc SDATA "[Ucirc ]"--=capital U, circumflex accent--> +<!ENTITY ugrave SDATA "[ugrave]"--=small u, grave accent--> +<!ENTITY Ugrave SDATA "[Ugrave]"--=capital U, grave accent--> +<!ENTITY uuml SDATA "[uuml ]"--=small u, dieresis or umlaut mark--> +<!ENTITY Uuml SDATA "[Uuml ]"--=capital U, dieresis or umlaut mark--> +<!ENTITY yacute SDATA "[yacute]"--=small y, acute accent--> +<!ENTITY Yacute SDATA "[Yacute]"--=capital Y, acute accent--> +<!ENTITY yuml SDATA "[yuml ]"--=small y, dieresis or umlaut mark-->
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/sgml/html-0.dtd Mon Aug 13 08:46:35 2007 +0200 @@ -0,0 +1,39 @@ +<!-- html-0.dtd + + Document Type Definition for the HyperText Markup Language + as used by minimally conforming World Wide Web applications + (HTML Level 0 DTD). + + $Id: html-0.dtd,v 1.1.1.1 1996/12/18 03:43:02 steve Exp $ + + Author: Daniel W. Connolly <connolly@hal.com> + See Also: http://www.hal.com/%7Econnolly/html-spec/index.html + http://info.cern.ch/hypertext/WWW/MarkUp2/MarkUp.html +--> + +<!ENTITY % HTML.Version + "-//IETF//DTD HTML Level 0//EN//2.0" + -- public identifier for "minimal conformance" version -- + + -- Typical usage: + + <!DOCTYPE HTML PUBLIC + "-//IETF//DTD HTML Level 0//EN"> + <html> + ... + </html> + -- + > + +<!-- Feature Test Entities --> + +<!ENTITY % HTML.Highlighting "IGNORE"> +<!ENTITY % HTML.Forms "IGNORE"> + +<!ENTITY % head.link " " -- no link in head at level 0 --> +<!ENTITY % linkExtraAttributes " "> +<!ENTITY % img.alt.default "#REQUIRED"> +<!ENTITY % head.link " "> + +<!ENTITY % html PUBLIC "-//IETF//DTD HTML//EN//2.0"> +%html;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/sgml/html-0s.dtd Mon Aug 13 08:46:35 2007 +0200 @@ -0,0 +1,30 @@ +<!-- html-0P.dtd + + Document Type Definition for the HyperText Markup Language + Strict Level 0 + + $Id: html-0s.dtd,v 1.1.1.1 1996/12/18 03:43:02 steve Exp $ + + Author: Daniel W. Connolly <connolly@hal.com> + See Also: http://www.hal.com/%7Econnolly/html-spec/index.html + http://info.cern.ch/hypertext/WWW/MarkUp2/MarkUp.html +--> + +<!ENTITY % HTML.Version + "-//IETF//DTD HTML Strict Level 0//EN//2.0" + + -- Typical usage: + + <!DOCTYPE HTML PUBLIC + "-//IETF//DTD HTML Strict Level 0//EN"> + <html> + ... + </html> + -- + > + +<!-- Feature Test Entities --> +<!ENTITY % HTML.Recommended "INCLUDE"> + +<!ENTITY % html-0 PUBLIC "-//IETF//DTD HTML Level 0//EN//2.0"> +%html-0;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/sgml/html-1.dtd Mon Aug 13 08:46:35 2007 +0200 @@ -0,0 +1,30 @@ +<!-- html-1.dtd + + Document Type Definition for the HyperText Markup Language + with Level 1 Extensions (HTML Level 1 DTD). + + $Id: html-1.dtd,v 1.1.1.1 1996/12/18 03:43:02 steve Exp $ + + Author: Daniel W. Connolly <connolly@hal.com> + See Also: http://www.hal.com/%7Econnolly/html-spec/index.html + http://info.cern.ch/hypertext/WWW/MarkUp2/MarkUp.html +--> + +<!ENTITY % HTML.Version + "-//IETF//DTD HTML Level 1//EN//2.0" + + -- Typical usage: + + <!DOCTYPE HTML PUBLIC + "-//IETF//DTD HTML Level 1//EN"> + <html> + ... + </html> + -- + > + +<!-- Feature Test Entities --> +<!ENTITY % HTML.Forms "IGNORE"> + +<!ENTITY % html PUBLIC "-//IETF//DTD HTML//EN//2.0"> +%html;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/sgml/html-1s.dtd Mon Aug 13 08:46:35 2007 +0200 @@ -0,0 +1,30 @@ +<!-- html-1P.dtd + + Document Type Definition for the HyperText Markup Language + Struct Level 1 + + $Id: html-1s.dtd,v 1.1.1.1 1996/12/18 03:43:03 steve Exp $ + + Author: Daniel W. Connolly <connolly@hal.com> + See Also: http://www.hal.com/%7Econnolly/html-spec/index.html + http://info.cern.ch/hypertext/WWW/MarkUp2/MarkUp.html +--> + +<!ENTITY % HTML.Version + "-//IETF//DTD HTML Strict Level 1//EN//2.0" + + -- Typical usage: + + <!DOCTYPE HTML PUBLIC + "-//IETF//DTD HTML Level 1 Recommended//EN"> + <html> + ... + </html> + -- + > + +<!-- Feature Test Entities --> +<!ENTITY % HTML.Recommended "INCLUDE"> + +<!ENTITY % html-1 PUBLIC "-//IETF//DTD HTML Level 1//EN//2.0"> +%html-1;
--- a/etc/sgml/html-3.dtd Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/sgml/html-3.dtd Mon Aug 13 08:46:35 2007 +0200 @@ -360,17 +360,17 @@ <!-- a range of standard icons such as &folder; for use in speeding up display of directory listings etc. --> -<!-- <!ENTITY % HTMLicons PUBLIC --> -<!-- "-//IETF//ENTITIES icons for HTML//EN"> --> -<!-- %HTMLicons; --> +<!ENTITY % HTMLicons PUBLIC + "-//IETF//ENTITIES icons for HTML//EN"> +%HTMLicons; <!--================ Entities for math symbols ============================--> <!-- ISO subset chosen for use with the widely available Adobe math font --> -<!-- <!ENTITY % HTMLmath PUBLIC --> -<!-- "-//IETF//ENTITIES Math and Greek for HTML//EN"> --> -<!-- %HTMLmath; --> +<!ENTITY % HTMLmath PUBLIC + "-//IETF//ENTITIES Math and Greek for HTML//EN"> +%HTMLmath; <!--=================== Text Markup =======================================--> @@ -577,7 +577,7 @@ seqnum NUMBER #IMPLIED -- starting sequence number -- skip NUMBER 0 -- skip seq nums for missing items -- dingbat ENTITY #IMPLIED -- dingbat entity from HTMLicons -- - src (%URI;) #IMPLIED -- bullet defined by graphic -- + src %URI; #IMPLIED -- bullet defined by graphic -- %url.link; -- standard link attributes -- nowrap (nowrap) #IMPLIED -- disable wordwrap -- > @@ -684,7 +684,7 @@ wrap (vert|horiz|none) none -- multicolumn list style -- plain (plain) #IMPLIED -- suppress bullets -- dingbat ENTITY #IMPLIED -- dingbat entity from HTMLicons -- - src (%URI;) #IMPLIED -- bullet defined by graphic -- + src %URI; #IMPLIED -- bullet defined by graphic -- %url.link; -- standard link attributes -- compact (compact) #IMPLIED -- reduced interitem spacing -- > @@ -707,7 +707,7 @@ %attrs; %needs; -- for control of text flow -- dingbat ENTITY #IMPLIED -- dingbat entity from HTMLicons -- - src (%URI;) #IMPLIED -- custom bullet graphic -- + src %URI; #IMPLIED -- custom bullet graphic -- %url.link; -- standard link attributes -- skip NUMBER 0 -- skip seq nums for missing items -- > @@ -1062,7 +1062,7 @@ width NUMBER #IMPLIED -- desired width in units -- height NUMBER #IMPLIED -- desired height in units -- units (en|pixels) pixels -- specifies units as en's or pixels -- - imagemap (%URI) #IMPLIED -- pass background clicks to server -- + imagemap %URI; #IMPLIED -- pass background clicks to server -- > <!ELEMENT FIGTEXT O O %body.content -- dummy element --> @@ -1082,7 +1082,7 @@ y NUMBER 0 -- offset from top in units -- width NUMBER #IMPLIED -- desired width in units -- height NUMBER #IMPLIED -- desired height in units -- - imagemap (%URI) #IMPLIED -- pass background clicks to server -- + imagemap %URI; #IMPLIED -- pass background clicks to server -- > <!ELEMENT CREDIT - - (%text;)* -- source of image --> @@ -1416,10 +1416,13 @@ --> <!ENTITY % style-notations "dsssl-lite | w3c-style"> + +<!-- <!NOTATION dsssl-lite PUBLIC "ISO/IEC 10179:1995//NOTATION DSSSL Style Language//EN"> <!NOTATION w3c-style PUBLIC "IETF/RFC nnn/W3C Style Language//EN"> +--> <!ELEMENT STYLE - O (#PCDATA)> <!ATTLIST STYLE @@ -1431,7 +1434,7 @@ <!ENTITY % html.content "HEAD, BODY"> <!ELEMENT HTML O O (%html.content)> -<!ENTITY % version.attr 'VERSION CDATA #FIXED "&HTML.Version;"'> +<!ENTITY % version.attr 'VERSION CDATA #FIXED "%HTML.Version;"'> <!-- suggested roles are: TOC, DOC, DOCPART, HITLIST, DIALOG -->
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/sgml/html-3s.dtd Mon Aug 13 08:46:35 2007 +0200 @@ -0,0 +1,22 @@ +<!-- + html3s.dtd + + Document Type Definition for the HyperText Markup Language (HTML DTD) + with strict validation. + +<!ENTITY % HTML.Version + "-//W3O//DTD W3 HTML Strict 3.0//EN//" + + -- Typical usage: + + <!DOCTYPE HTML PUBLIC "-//W3O//DTD W3 HTML Strict 3.0//EN//"> + <html> + ... + </html> + -- + > + +<!ENTITY % HTML.Recommended "INCLUDE"> + +<!ENTITY % html PUBLIC "-//W3O//DTD W3 HTML 3.0//EN//"> +%html;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/sgml/html-cougar.dtd Mon Aug 13 08:46:35 2007 +0200 @@ -0,0 +1,873 @@ +<!-- + This is an EXPERIMENTAL version of HTML (code named Cougar) that + extends HTML 3.2 to add support for work by the HTML ERB, including + style sheets, scripting, the object tag, internationalization and + some extensions to forms. The frame tags will probably be added + once we have an agreed definition for them. + + Draft: Wednesday 12-July-96 + + Author: Dave Raggett <dsr@w3.org> + + This is SUBJECT TO CHANGE, pending final approval by member + organizations of the World Wide Web Consortium. +--> + +<!ENTITY % HTML.Version + "-//W3C//DTD HTML Experimental 19960712//EN" + + -- Typical usage: + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML Experimental 19960712//EN"> + <html> + ... + </html> + -- + > + +<!--================== Deprecated Features Switch =========================--> + +<!ENTITY % HTML.Deprecated "INCLUDE"> + +<!--================== Imported Names =====================================--> + +<!ENTITY % Content-Type "CDATA" + -- meaning a MIME content type, as per RFC1521 + --> + +<!ENTITY % HTTP-Method "GET | POST" + -- as per HTTP specification + --> + +<!ENTITY % URL "CDATA" + -- The term URL means a CDATA attribute + whose value is a Uniform Resource Locator, + See RFC1808 (June 95) and RFC1738 (Dec 94). + --> + +<!ENTITY % script "CDATA" -- scriptlet --> + +<!-- Parameter Entities --> + +<!ENTITY % head.misc "SCRIPT|STYLE|META|LINK" -- repeatable head elements --> + +<!ENTITY % heading "H1|H2|H3|H4|H5|H6"> + +<!ENTITY % list "UL | OL | DIR | MENU"> + +<![ %HTML.Deprecated [ + <!ENTITY % preformatted "PRE | XMP | LISTING"> +]]> + +<!ENTITY % preformatted "PRE"> + +<!--================ Character mnemonic entities ==========================--> + +<!ENTITY % ISOlat1 PUBLIC + "ISO 8879-1986//ENTITIES Added Latin 1//EN//HTML"> +%ISOlat1; + +<!--================ Entities for special symbols =========================--> + +<!ENTITY copy CDATA "©" -- copyright sign --> +<!ENTITY reg CDATA "®" -- registered sign --> +<!ENTITY amp CDATA "&" -- ampersand --> +<!ENTITY gt CDATA ">" -- greater than --> +<!ENTITY lt CDATA "<" -- less than --> +<!ENTITY quot CDATA """ -- double quote --> +<!ENTITY nbsp CDATA " " -- non breaking space --> +<!ENTITY trade CDATA "™" -- trade mark symbol --> +<!ENTITY shy CDATA "­" -- soft hyphen --> +<!ENTITY thinsp CDATA " " -- thin space (1/6 em) --> +<!ENTITY emsp CDATA " " -- em space --> +<!ENTITY ensp CDATA " " -- en space (1/2 em) --> +<!ENTITY mdash CDATA "—" -- em dash --> +<!ENTITY ndash CDATA "–" -- en dash --> + +<!-- Language-dependent BIDI and contextual analysis --> +<!ENTITY zwnj CDATA "‌" -- zero width non-joiner --> +<!ENTITY zwj CDATA "‍" -- zero width joiner --> +<!ENTITY lrm CDATA "‎" -- left-to-right mark --> +<!ENTITY rlm CDATA "‏" -- right-to-left mark --> + +<!--=================== Generic Attributes ================================--> + +<!ENTITY % style + "id ID #IMPLIED -- document wide unique id -- + class CDATA #IMPLIED -- comma list of class values -- + style CDATA #IMPLIED -- associated style info --" + > + +<!ENTITY % i18n + "lang NAME #IMPLIED -- RFC 1766 language value -- + dir (ltr|rtl) #IMPLIED -- default directionality --" + > + +<!ENTITY % attrs "%style %i18n"> + +<!ENTITY % just + "align (left|center|right|justify) #IMPLIED" + -- default is left for ltr paragraphs, right for rtl -- + > + +<!--=================== Text Markup =======================================--> + +<!ENTITY % font "TT | I | B | U | S | BIG | SMALL | SUB | SUP"> + +<!ENTITY % phrase "EM | STRONG | DFN | CODE | SAMP | KBD | VAR | CITE | Q"> + +<!ENTITY % special + "A|IMG|APPLET|OBJECT|FONT|BASEFONT|BR|SCRIPT|STYLE|MAP|SPAN|BDO"> + +<!ENTITY % form "INPUT | SELECT | TEXTAREA | LABEL"> + +<!ENTITY % text "#PCDATA | %font | %phrase | %special | %form"> + +<!ELEMENT (%font|%phrase) - - (%text)*> +<!ATTLIST (%font|%phrase) %attrs> + +<!-- There are also 16 widely known color names: + + Black = #000000 Green = #008000 + Silver = #C0C0C0 Lime = #00FF00 + Gray = #808080 Olive = #808000 + White = #FFFFFF Yellow = #FFFF00 + Maroon = #800000 Navy = #000080 + Red = #FF0000 Blue = #0000FF + Purple = #800080 Teal = #008080 + Fuchsia= #FF00FF Aqua = #00FFFF + + These colors were originally picked as being the standard + 16 colors supported with the Windows VGA palette. The above + gives the sRGB values in hex (#RRGGBB). + --> + +<!ELEMENT SPAN - - (%text)* -- generic language/style container --> +<!ATTLIST SPAN %attrs> + +<!ELEMENT BDO - - (%text)* -- I18N BiDi over-ride --> +<!ATTLIST BDO + lang NAME #IMPLIED -- RFC 1766 language value -- + dir (ltr|rtl) #REQUIRED -- directionality -- + > + +<!ELEMENT BASEFONT - O EMPTY> +<!ATTLIST BASEFONT + size CDATA #REQUIRED -- base font size for FONT elements -- + > + +<!ELEMENT FONT - - (%text)* -- local change to font --> +<!ATTLIST FONT + size CDATA #IMPLIED -- [+]nn e.g. size="+1", size=4 -- + color CDATA #IMPLIED -- #RRGGBB in hex, e.g. red: color="#FF0000" -- + face CDATA #IMPLIED -- comma separated list of font names -- + > + +<!ELEMENT BR - O EMPTY -- forced line break --> +<!ATTLIST BR + %attrs; -- id, class, style, lang, dir -- + clear (left|all|right|none) none -- control of text flow -- + > + +<!--================== HTML content models ================================--> +<!-- + HTML has three basic content models: + + %text character level elements and text strings + %flow block-like elements e.g. paragraphs and lists + %bodytext as (b) plus headers and ADDRESS +--> + +<!ENTITY % block + "P | %list | %preformatted | DL | DIV | CENTER | + BLOCKQUOTE | FORM | ISINDEX | HR | TABLE | FIELDSET"> + +<!-- %flow is used for DD and LI --> + +<!ENTITY % flow "(%text | %block)*"> + +<!--=================== Document Body =====================================--> + +<!ENTITY % body.content "(%heading | %text | %block | ADDRESS)*"> + +<!ENTITY % color "CDATA" -- a color specification: #HHHHHH @@ details? --> + +<!ENTITY % body-color-attrs " + bgcolor %color #IMPLIED + text %color #IMPLIED + link %color #IMPLIED + vlink %color #IMPLIED + alink %color #IMPLIED + "> + +<!ELEMENT BODY O O %body.content> +<!ATTLIST BODY + %attrs; -- id, class, style, lang, dir -- + background %URL #IMPLIED -- texture tile for document background -- + %body-color-attrs; -- bgcolor, text, link, vlink, alink -- + onLoad %script #IMPLIED -- intrinsic event -- + onUnload %script #IMPLIED -- intrinsic event -- + > + +<!ENTITY % address.content "((%text;) | P)*"> + +<!ELEMENT ADDRESS - - %address.content> + +<!ELEMENT DIV - - %body.content> +<!ATTLIST DIV + %attrs; -- id, class, style, lang, dir -- + %just; -- alignment of following text -- + > + +<!-- CENTER is a shorthand for DIV with ALIGN=CENTER --> +<!ELEMENT center - - %body.content> + +<!--================== The Anchor Element =================================--> +<!-- see WD-object draft for OBJECT client-side imagemap extensions --> + +<!ENTITY % SHAPE "(rect|circle|poly|default)"> +<!ENTITY % COORDS "CDATA" -- comma separated list of numbers --> + +<!ELEMENT A - - (%text)* -(A)> +<!ATTLIST A + %attrs; -- id, class, style, lang, dir -- + name CDATA #IMPLIED -- named link end -- + href %URL #IMPLIED -- URL for linked resource -- + rel CDATA #IMPLIED -- forward link types -- + rev CDATA #IMPLIED -- reverse link types -- + title CDATA #IMPLIED -- advisory title string -- + accesskey CDATA #IMPLIED -- accessibility key character -- + shape %SHAPE rect -- for use with OBJECT SHAPES -- + coords %COORDS #IMPLIED -- for use with OBJECT SHAPES -- + tabindex NUMBER #IMPLIED -- position in tabbing order -- + notab (notab) #IMPLIED -- exclude from tabbing order -- + onClick %script #IMPLIED -- intrinsic event -- + onMouseOver %script #IMPLIED -- intrinsic event -- + onMouseOut %script #IMPLIED -- intrinsic event -- + > + +<!--================== Client-side image maps ============================--> + +<!-- These can be placed in the same document or grouped in a + separate document although this isn't yet widely supported --> + +<!ELEMENT MAP - - (AREA)*> +<!ATTLIST MAP + name CDATA #IMPLIED + > + +<!ELEMENT AREA - O EMPTY> +<!ATTLIST AREA + shape %SHAPE rect + coords %COORDS #IMPLIED -- always needed except for shape=default -- + href %URL #IMPLIED -- this region acts as hypertext link -- + nohref (nohref) #IMPLIED -- this region has no action -- + title CDATA #IMPLIED -- advisory title string for balloon help -- + alt CDATA #REQUIRED -- description for text only browsers -- + tabindex NUMBER #IMPLIED -- position in tabbing order -- + notab (notab) #IMPLIED -- exclude from tabbing order -- + onClick %script #IMPLIED -- intrinsic event -- + onMouseOver %script #IMPLIED -- intrinsic event -- + onMouseOut %script #IMPLIED -- intrinsic event -- + > + +<!--================== The LINK Element ==================================--> + +<!ENTITY % Types "CDATA" + -- See Internet Draft: draft-ietf-html-relrev-00.txt + LINK has been part of HTML since the early days + although few browsers as yet take advantage of it. + + Relationship values can be used in principle: + + a) for document specific toolbars/menus when used + with the LINK element in document head: + b) to link to a separate style sheet (rel=stylesheet) + c) to make a link to a script (rel=script) + d) by stylesheets to control how collections of + html nodes are rendered into printed documents + e) to make a link to a printable version of this document + e.g. a postscript or pdf version (rel=print) +--> + +<!ELEMENT LINK - O EMPTY> +<!ATTLIST LINK + %style; -- id, class, style -- + href %URL #IMPLIED -- URL for linked resource -- + rel %Types #IMPLIED -- forward link types -- + rev %Types #IMPLIED -- reverse link types -- + title CDATA #IMPLIED -- advisory title string -- + type CDATA #IMPLIED -- advisory Internet media type -- + > + +<!--=================== Images ============================================--> + +<!ENTITY % Length "CDATA" -- nn for pixels or nn% for percentage length --> +<!ENTITY % Pixels "CDATA" -- integer representing length in pixels --> + +<!-- Suggested widths are used for negotiating image size + with the module responsible for painting the image. + align=left or right cause image to float to margin + and for subsequent text to wrap around image --> + +<!ENTITY % IAlign "(top|middle|bottom|left|right)" -- center? --> + +<!ELEMENT IMG - O EMPTY -- Embedded image --> +<!ATTLIST IMG + %style; -- id, class, style -- + src %URL #REQUIRED -- URL of image to embed -- + alt CDATA #IMPLIED -- for display in place of image -- + align %IAlign #IMPLIED -- vertical or horizontal alignment -- + height %Pixels #IMPLIED -- suggested height in pixels -- + width %Pixels #IMPLIED -- suggested width in pixels -- + border %Pixels #IMPLIED -- suggested link border width -- + hspace %Pixels #IMPLIED -- suggested horizontal gutter -- + vspace %Pixels #IMPLIED -- suggested vertical gutter -- + usemap %URL #IMPLIED -- use client-side image map -- + ismap (ismap) #IMPLIED -- use server image map -- + title CDATA #IMPLIED -- advisory title string -- + > + +<!-- USEMAP points to a MAP element which may be in this document + or an external document, although the latter is not widely supported --> + +<!--=================== OBJECT tag ===================================--> +<!-- OBJECT is a character-like element for inserting objects, see + W3C working draft: http://www.w3.org/pub/WWW/TR/WD-object.html --> + +<!ENTITY % OAlign "(texttop|middle|textmiddle|baseline| + textbottom|left|center|right)"> + +<!ELEMENT OBJECT - - (param | %body.content)*> +<!ATTLIST OBJECT + %attrs -- id, class, style, lang, dir -- + declare (declare) #IMPLIED -- declare but don't instantiate flag -- + classid %URL #IMPLIED -- identifies an implementation -- + codebase %URL #IMPLIED -- some systems need an additional URL -- + data %URL #IMPLIED -- reference to object's data -- + type CDATA #IMPLIED -- Internet media type for data -- + codetype CDATA #IMPLIED -- Internet media type for code -- + standby CDATA #IMPLIED -- message to show while loading -- + align %OAlign #IMPLIED -- positioning inside document -- + height %Length #IMPLIED -- suggested height -- + width %Length #IMPLIED -- suggested width -- + border %Length #IMPLIED -- suggested link border width -- + hspace %Length #IMPLIED -- suggested horizontal gutter -- + vspace %Length #IMPLIED -- suggested vertical gutter -- + usemap %URL #IMPLIED -- reference to image map -- + shapes (shapes) #IMPLIED -- object has shaped hypertext links -- + name %URL #IMPLIED -- submit as part of form -- + title CDATA #IMPLIED -- advisory title string -- + tabindex NUMBER #IMPLIED -- position in tabbing order -- + notab (notab) #IMPLIED -- exclude from tabbing order -- + > + +<!ELEMENT param - O EMPTY -- named property value --> +<!ATTLIST param + name CDATA #REQUIRED -- property name -- + value CDATA #IMPLIED -- property value -- + valuetype (DATA|REF|OBJECT) DATA -- How to interpret value -- + type CDATA #IMPLIED -- Internet media type -- + > + +<!--=================== Java APPLET tag ===================================--> +<!-- + This tag is supported by all java enabled browsers. Applet resources + (including their classes) are normally loaded relative to the document + URL (or <BASE> element if it is defined). The CODEBASE attribute is used + to change this default behavior. If the CODEBASE attribute is defined then + it specifies a different location to find applet resources. The value + can be an absolute URL or a relative URL. The absolute URL is used as is + without modification and is not effected by the documents <BASE> element. + When the codebase attribute is relative, then it is relative to the + document URL (or <BASE> tag if defined). <TEXTFLOW> avoids the problems + with SGML mixed content. It can always be omitted *except* when the APPLET + element hasn't any content. White space, comments and PARAM elements + don't count as content for this purpose. TEXTFLOW was introduced into + the DTD to satisfy SGML parsers, but is ignored by current Web browsers. +--> +<!ELEMENT APPLET - - (PARAM*, TEXTFLOW)> +<!ATTLIST APPLET + %style; -- id, class, style -- + codebase %URL #IMPLIED -- code base -- + code CDATA #REQUIRED -- class file -- + name CDATA #IMPLIED -- applet name -- + alt CDATA #IMPLIED -- for display in place of applet -- + align %IAlign #IMPLIED -- vertical or horizontal alignment -- + height %Pixels #REQUIRED -- suggested height in pixels -- + width %Pixels #REQUIRED -- suggested width in pixels -- + hspace %Pixels #IMPLIED -- suggested horizontal gutter -- + vspace %Pixels #IMPLIED -- suggested vertical gutter -- + title CDATA #IMPLIED -- advisory title string -- + download NUMBER #IMPLIED -- image download order -- + > + +<!ELEMENT TEXTFLOW O O (%text)* -- needed to bypass mixed content model --> + +<!-- +Here is an example: + + <applet codebase="applets/NervousText" + code=NervousText.class + width=300 + height=50> + <param name=text value="Java is Cool!"> + <img src=sorry.gif alt="This looks better with Java support"> + </applet> +--> + +<!--=================== Horizontal Rule ===================================--> + +<!ELEMENT HR - O EMPTY> +<!ATTLIST HR + %style; -- id, class, style -- + align (left|right|center) #IMPLIED + noshade (noshade) #IMPLIED + size %Pixels #IMPLIED + width %Length #IMPLIED + > +<!--=================== Paragraphs =========================================--> + +<!ELEMENT P - O (%text)*> +<!ATTLIST P + %attrs; -- id, class, style, lang, dir -- + %just; -- text alignment -- + > + +<!--=================== Headings ==========================================--> + +<!-- + There are six levels of headers from H1 (the most important) + to H6 (the least important). +--> + +<!ELEMENT ( %heading ) - - (%text;)*> +<!ATTLIST ( %heading ) + %attrs; -- id, class, style, lang, dir -- + %just; -- text alignment -- + > + +<!--=================== Preformatted Text =================================--> + +<!-- excludes images and changes in font size --> + +<!ENTITY % pre.exclusion "IMG|BIG|SMALL|SUB|SUP|FONT"> + +<!ELEMENT PRE - - (%text)* -(%pre.exclusion)> +<!ATTLIST PRE + %attrs; -- id, class, style, lang, dir -- + width NUMBER #implied -- is this widely supported? -- + > + +<![ %HTML.Deprecated [ + +<!ENTITY % literal "CDATA" + -- historical, non-conforming parsing mode where + the only markup signal is the end tag + in full + --> + +<!ELEMENT (XMP|LISTING) - - %literal> +<!ELEMENT PLAINTEXT - O %literal> + +]]> + +<!--=================== Block-like Quotes =================================--> + +<!ELEMENT BLOCKQUOTE - - %body.content> +<!ATTLIST BLOCKQUOTE %attrs> + +<!--=================== Lists =============================================--> + +<!-- + HTML 3.2 allows you to control the sequence number for ordered lists. + You can set the sequence number with the START and VALUE attributes. + The TYPE attribute may be used to specify the rendering of ordered + and unordered lists. +--> + +<!-- definition lists - DT for term, DD for its definition --> + +<!ELEMENT DL - - (DT|DD)*> +<!ATTLIST DL + %attrs; -- id, class, style, lang, dir -- + compact (compact) #IMPLIED -- more compact style -- + > + +<!ELEMENT DT - O (%text)*> +<!ELEMENT DD - O %flow;> +<!ATTLIST (DT|DD) %attrs> + +<!-- Ordered lists OL, and unordered lists UL --> +<!ELEMENT (OL|UL) - - (LI)*> + +<!-- + Numbering style + 1 arablic numbers 1, 2, 3, ... + a lower alpha a, b, c, ... + A upper alpha A, B, C, ... + i lower roman i, ii, iii, ... + I upper roman I, II, III, ... + + The style is applied to the sequence number which by default + is reset to 1 for the first list item in an ordered list. + + This can't be expressed directly in SGML due to case folding. +--> + +<!ENTITY % OLStyle "CDATA" -- constrained to: [1|a|A|i|I] --> + +<!ATTLIST OL -- ordered lists -- + %attrs; -- id, class, style, lang, dir -- + type %OLStyle #IMPLIED -- numbering style -- + start NUMBER #IMPLIED -- starting sequence number -- + compact (compact) #IMPLIED -- reduced interitem spacing -- + > + +<!-- bullet styles --> + +<!ENTITY % ULStyle "disc|square|circle"> + +<!ATTLIST UL -- unordered lists -- + %attrs; -- id, class, style, lang, dir -- + type (%ULStyle) #IMPLIED -- bullet style -- + compact (compact) #IMPLIED -- reduced interitem spacing -- + > + +<!ELEMENT (DIR|MENU) - - (LI)* -(%block)> +<!ATTLIST DIR + compact (compact) #IMPLIED + > +<!ATTLIST MENU + compact (compact) #IMPLIED + > + +<!-- <DIR> Directory list --> +<!-- <DIR COMPACT> Compact list style --> +<!-- <MENU> Menu list --> +<!-- <MENU COMPACT> Compact list style --> + +<!-- The type attribute can be used to change the bullet style + in unordered lists and the numbering style in ordered lists --> + +<!ENTITY % LIStyle "CDATA" -- constrained to: "(%ULStyle|%OLStyle)" --> + +<!ELEMENT LI - O %flow -- list item --> +<!ATTLIST LI + %attrs; -- id, class, style, lang, dir -- + type %LIStyle #IMPLIED -- list item style -- + value NUMBER #IMPLIED -- reset sequence number -- + > + +<!--================ Forms ===============================================--> + +<!ELEMENT FORM - - %body.content -(FORM)> +<!ATTLIST FORM + action %URL #REQUIRED -- server-side form handler -- + method (%HTTP-Method) GET -- see HTTP specification -- + enctype %Content-Type; "application/x-www-form-urlencoded" + onSubmit %script #IMPLIED -- intrinsic event -- + > + +<!ELEMENT LABEL - - (%text)* -(LABEL) -- field label text --> +<!ATTLIST LABEL + %attrs; -- id, class, style, lang, dir -- + for IDREF #IMPLIED -- matches field ID value -- + accesskey CDATA #IMPLIED -- accessibility key character -- + title CDATA #IMPLIED -- advisory title string -- + onClick %script #IMPLIED -- intrinsic event -- + > +<!ENTITY % InputType + "(TEXT | PASSWORD | CHECKBOX | + RADIO | SUBMIT | RESET | + FILE | HIDDEN | IMAGE | BUTTON)" + > + +<!ELEMENT INPUT - O EMPTY> +<!ATTLIST INPUT + %attrs; -- id, class, style, lang, dir -- + type %InputType TEXT -- what kind of widget is needed -- + name CDATA #IMPLIED -- required for all but submit and reset -- + value CDATA #IMPLIED -- required for radio and checkboxes -- + checked (checked) #IMPLIED -- for radio buttons and check boxes -- + title CDATA #IMPLIED -- advisory title string -- + size CDATA #IMPLIED -- specific to each type of field -- + maxlength NUMBER #IMPLIED + src %URL #IMPLIED -- for fields with background images -- + align (top|middle|bottom|left|right) top -- image alignment -- + tabindex NUMBER #IMPLIED -- position in tabbing order -- + notab (notab) #IMPLIED -- exclude from tabbing order -- + onClick %script #IMPLIED -- intrinsic event -- + onFocus %script #IMPLIED -- intrinsic event -- + onBlur %script #IMPLIED -- intrinsic event -- + onSelect %script #IMPLIED -- intrinsic event -- + onChange %script #IMPLIED -- intrinsic event -- + > + +<!ELEMENT SELECT - - (OPTION+)> +<!ATTLIST SELECT + %attrs; -- id, class, style, lang, dir -- + name CDATA #REQUIRED + size NUMBER #IMPLIED + multiple (multiple) #IMPLIED + title CDATA #IMPLIED -- advisory title string -- + tabindex NUMBER #IMPLIED -- position in tabbing order -- + notab (notab) #IMPLIED -- exclude from tabbing order -- + onFocus %script #IMPLIED -- intrinsic event -- + onBlur %script #IMPLIED -- intrinsic event -- + onChange %script #IMPLIED -- intrinsic event -- + > + +<!ELEMENT OPTION - O (#PCDATA)*> +<!ATTLIST OPTION + %attrs; -- id, class, style, lang, dir -- + selected (selected) #IMPLIED + value CDATA #IMPLIED -- defaults to element content -- + > + +<!-- Multi-line text input field. --> + +<!ELEMENT TEXTAREA - - (#PCDATA)*> +<!ATTLIST TEXTAREA + %attrs; -- id, class, style, lang, dir -- + name CDATA #REQUIRED + rows NUMBER #REQUIRED + cols NUMBER #REQUIRED + title CDATA #IMPLIED -- advisory title string -- + tabindex NUMBER #IMPLIED -- position in tabbing order -- + notab (notab) #IMPLIED -- exclude from tabbing order -- + onFocus %script #IMPLIED -- intrinsic event -- + onBlur %script #IMPLIED -- intrinsic event -- + onSelect %script #IMPLIED -- intrinsic event -- + onChange %script #IMPLIED -- intrinsic event -- + > + +<!-- captioned set of related form fields --> + +<!ELEMENT FIELDSET - - (CAPTION?, %body.content)> +<!ATTLIST FIELDSET + %attrs; -- id, class, style, lang, dir -- + title CDATA #IMPLIED -- advisory title string --> + +<!--======================= Tables ========================================--> + +<!-- IETF HTML table standard, see RFC 1942 e.g. at + http://www.ics.uci.edu/pub/ietf/html/rfc1942.txt --> + +<!-- + The BORDER attribute sets the thickness of the frame around the + table. The default units are screen pixels. + + The FRAME attribute specifies which parts of the frame around + the table should be rendered. The values are not the same as + CALS to avoid a name clash with the VALIGN attribute. + + The value "border" is included for backwards compatibility with + <TABLE BORDER> which yields frame=border and border=implied + For <TABLE BORDER=1> you get border=1 and frame=implied. In this + case, its appropriate to treat this as frame=border for backwards + compatibility with deployed browsers. +--> + +<!ENTITY % Frame "(void|above|below|hsides|lhs|rhs|vsides|box|border)"> + +<!-- + The RULES attribute defines which rules to draw between cells: + + If RULES is absent then assume: + "none" if BORDER is absent or BORDER=0 otherwise "all" +--> + +<!ENTITY % Rules "(none | groups | rows | cols | all)"> + +<!-- horizontal placement of table relative to window --> +<!ENTITY % Where "(left|center|right)"> + +<!-- horizontal alignment attributes for cell contents --> +<!ENTITY % cell.halign + "align (left|center|right|justify|char) #IMPLIED + char CDATA #IMPLIED -- alignment char, e.g. char=':' -- + charoff CDATA #IMPLIED -- offset for alignment char --" + > + +<!-- vertical alignment attributes for cell contents --> +<!ENTITY % cell.valign + "valign (top|middle|bottom|baseline) #IMPLIED" + > + +<!ELEMENT table - - (caption?, (col*|colgroup*), thead?, tfoot?, tbody+)> +<!ELEMENT caption - - (%text;)+> +<!ELEMENT thead - O (tr+)> +<!ELEMENT tfoot - O (tr+)> +<!ELEMENT tbody O O (tr+)> +<!ELEMENT colgroup - O (col*)> +<!ELEMENT col - O EMPTY> +<!ELEMENT tr - O (th|td)+> +<!ELEMENT (th|td) - O %body.content> + +<!ATTLIST table -- table element -- + %attrs; -- id, lang, style, dir and class -- + align %Where; #IMPLIED -- table position relative to window -- + width CDATA #IMPLIED -- table width relative to window -- + cols NUMBER #IMPLIED -- used for immediate display mode -- + border CDATA #IMPLIED -- controls frame width around table -- + frame %Frame; #IMPLIED -- which parts of table frame to include -- + rules %Rules; #IMPLIED -- rulings between rows and cols -- + cellspacing CDATA #IMPLIED -- spacing between cells -- + cellpadding CDATA #IMPLIED -- spacing within cells -- + > + +<!-- ALIGN is used here for compatibility with deployed browsers --> +<!ENTITY % Caption "(top|bottom|left|right)"> + +<!ATTLIST caption -- table caption -- + %attrs; -- id, lang, style, dir and class -- + align %Caption; #IMPLIED -- relative to table -- + accesskey CDATA #IMPLIED -- accessibility key character -- + > + +<!-- +COLGROUP groups a set of COL elements. It allows you to group +several columns together. +--> + +<!ATTLIST colgroup + %attrs; -- id, lang, style, dir and class -- + span NUMBER 1 -- default number of columns in group -- + width CDATA #IMPLIED -- default width for enclosed COLs -- + %cell.halign; -- horizontal alignment in cells -- + %cell.valign; -- vertical alignment in cells -- + > + +<!-- + COL elements define the alignment properties for cells in a given + column or spanned columns. The WIDTH attribute specifies the + width of the columns, e.g. + + width=64 width in screen pixels + width=0.5* relative width of 0.5 +--> + +<!ATTLIST col -- column groups and properties -- + %attrs; -- id, lang, style, dir and class -- + span NUMBER 1 -- number of columns spanned by group -- + width CDATA #IMPLIED -- column width specification -- + %cell.halign; -- horizontal alignment in cells -- + %cell.valign; -- vertical alignment in cells -- + > + +<!-- + Use THEAD to duplicate headers when breaking table + across page boundaries, or for static headers when + body sections are rendered in scrolling panel. + + Use TFOOT to duplicate footers when breaking table + across page boundaries, or for static footers when + body sections are rendered in scrolling panel. + + Use multiple TBODY sections when rules are needed + between groups of table rows. +--> +<!ATTLIST (thead|tbody|tfoot) -- table section -- + %attrs; -- id, lang, style, dir and class -- + %cell.halign; -- horizontal alignment in cells -- + %cell.valign; -- vertical alignment in cells -- + > + +<!ATTLIST tr -- table row -- + %attrs; -- id, lang, style, dir and class -- + %cell.halign; -- horizontal alignment in cells -- + %cell.valign; -- vertical alignment in cells -- + > + +<!ATTLIST (th|td) -- header or data cell -- + %attrs; -- id, lang, style, dir and class -- + axis CDATA #IMPLIED -- defaults to cell content -- + axes CDATA #IMPLIED -- list of axis names -- + nowrap (nowrap) #IMPLIED -- suppress word wrap -- + bgcolor %color #IMPLIED -- cell background color -- + rowspan NUMBER 1 -- number of rows spanned by cell -- + colspan NUMBER 1 -- number of cols spanned by cell -- + %cell.halign; -- horizontal alignment in cells -- + %cell.valign; -- vertical alignment in cells -- + > +<!--================ Document Head ========================================--> + +<!-- %head.misc defined earlier on as "SCRIPT|STYLE|META|LINK" --> + +<!ENTITY % head.content "TITLE & ISINDEX? & BASE?"> + +<!ELEMENT HEAD O O (%head.content) +(%head.misc)> + +<!ELEMENT TITLE - - (#PCDATA)* -(%head.misc) + -- The TITLE element is not considered part of the flow of text. + It should be displayed, for example as the page header or + window title. + --> +<!ATTLIST TITLE %i18n> + +<!ELEMENT ISINDEX - O EMPTY> +<!ATTLIST ISINDEX + %i18n; -- lang, dir -- + prompt CDATA #IMPLIED -- prompt message --> + +<!-- + The BASE element gives an absolute URL for dereferencing relative + URLs, e.g. + + <BASE href="http://foo.com/index.html"> + ... + <IMG SRC="images/bar.gif"> + + The image is deferenced to + + http://foo.com/images/bar.gif + + In the absence of a BASE element the document URL should be used. + Note that this is not necessarily the same as the URL used to + request the document, as the base URL may be overridden by an HTTP + header accompanying the document. +--> + +<!ELEMENT BASE - O EMPTY> +<!ATTLIST BASE + href %URL #REQUIRED + > + +<!ELEMENT META - O EMPTY -- Generic Metainformation --> +<!ATTLIST META + http-equiv NAME #IMPLIED -- HTTP response header name -- + name NAME #IMPLIED -- metainformation name -- + content CDATA #REQUIRED -- associated information -- + > + +<!-- SCRIPT/STYLE are place holders for transition to next version of HTML --> + +<!ELEMENT STYLE - - CDATA -- style info --> +<!ATTLIST STYLE + %i18n; -- lang, dir for use with title string -- + type CDATA #REQUIRED -- Internet media type for style notation -- + title CDATA #IMPLIED -- advisory title for this style -- + > + +<!ELEMENT SCRIPT - - CDATA -- script statements --> +<!ATTLIST SCRIPT + type CDATA #IMPLIED -- Internet media type for style notation -- + language CDATA #IMPLIED -- predefined script language name -- + src %URL #IMPLIED -- URL for an external script -- + > + +<!--================ Document Structure ===================================--> + +<!ENTITY % version.attr "VERSION CDATA #FIXED '%HTML.Version;'"> + +<![ %HTML.Deprecated [ + <!ENTITY % html.content "HEAD, BODY, PLAINTEXT?"> +]]> + +<!ENTITY % html.content "HEAD, BODY"> + +<!ELEMENT HTML O O (%html.content)> +<!ATTLIST HTML + %version.attr; + >
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/sgml/html-hj.dtd Mon Aug 13 08:46:35 2007 +0200 @@ -0,0 +1,1302 @@ +<!-- + html-hj.dtd + + Document Type Definition for the HyperText Markup Language (HTML + DTD) for Sun Microsystems Corp. HotJava environment + + + Date: 24 Jul 95 + + Revisions made by: Mark Gaither (markg@hal.com) + Original Author: Dave Raggett <dsr@hplb.hpl.hp.com> + + I have taken the HTML 3.0 DTD dated 16 Mar 95 and added the APP + element introduced by Sun Microsystems Corp. to accomodate their + Java/HotJava WWW application environment. +--> + +<!ENTITY % HTML.Version + "-//Sun Micorsystems Corp.//DTD HotJava HTML//EN" + + -- Typical usage: + + <!DOCTYPE HTML PUBLIC "-//Sun Micorsystems Corp.//DTD HotJava HTML//EN"> + <html> + ... + </html> + -- + > + +<!--================== Flags for Marked Sections ==========================--> + +<!ENTITY % HTML.Recommended "IGNORE" + -- Certain features of the language are necessary for compatibility + with widespread usage, but they may compromise the structural + integrity of a document. This feature test entity enables + a more prescriptive document type definition that eliminates + the above features. + --> + +<![ %HTML.Recommended [ + <!ENTITY % HTML.Deprecated "IGNORE"> +]]> + +<!ENTITY % HTML.Deprecated "INCLUDE" + -- Certain features of the language are necessary for compatibility + with earlier versions of the specification, but they tend + to be used an implemented inconsistently, and their use is + deprecated. This feature test entity enables a document type + definition that eliminates these features. + --> + +<!ENTITY % HTML.Obsoleted "IGNORE" + -- The XMP, LISTING and PLAINTEXT tags are incompatible with SGML + and derive from very early versions of HTML. They require non- + standard parsers and will cause problems for processing + documents with standard SGML tools. + --> + +<!--================== Imported Names =====================================--> + +<!ENTITY % Content-Type "CDATA" + -- meaning a MIME content type, as per RFC1521 + --> + +<!ENTITY % HTTP-Method "GET | POST" + -- as per HTTP specification + --> + +<!ENTITY % URI "CDATA" + -- The term URI means a CDATA attribute + whose value is a Uniform Resource Identifier, + as defined by + "Uniform Resource Identifiers" by Tim Berners-Lee + aka http://info.cern.ch/hypertext/WWW/Addressing/URL/URI_Overview.html + aka RFC 1630 + + Note that CDATA attributes are limited by the LITLEN + capacity (1024 in the current version of html.decl), + so that URIs in HTML have a bounded length. + + --> + +<!ENTITY % REAL "CDATA" -- real numbers (not in SGML) --> + +<!ENTITY % SHAPE "CDATA" + -- Shape of hotzone in image. + + All coordinates are assumed to be numbers in the range 0 to 1 + and interpreted as fractional width/height and measured from + the top left corner of the associated image. + + The attribute value is a string taking one of the following forms: + + "default" + + Used to define a default link for the figure background. + + "circle x, y, r" + + (x, y) define the center and r the radius. + + "rect x, y, w, h" + + (x, y) defines upper left, and w and h the width and height. + + "polygon x1, y1, x2, y2, ..." + + Given n pairs of x, y coordinates, the polygon is closed by a + line linking the n'th point to the first. Intersecting polygons + use the non-zero winding number rule to determine if a point lies + inside the polygon.I + -- +> + +<!-- 3.0 Parameter Entities --> + +<!ENTITY % heading "H1|H2|H3|H4|H5|H6"> + +<![ %HTML.Obsoleted [ + <!ENTITY % preformatted "PRE | XMP | LISTING"> +]]> + + +<![ %HTML.Deprecated [ + <!ENTITY % list "UL | OL | DIR | MENU"> + <!ENTITY % blockquote "BLOCKQUOTE | BQ"> +]]> + +<!ENTITY % list "UL | OL"> + +<!ENTITY % blockquote "BQ"> + +<!ENTITY % preformatted "PRE"> + + +<!-- The CLASS attribute is used to subclass HTML elements for + rendering purposes, when used with style sheets, e.g. DSSSL lite --> + +<!ENTITY % attrs -- common attributes for elements -- + 'id ID #IMPLIED -- as target for hrefs (link ends) -- + lang CDATA "en.us" -- ISO language, country code -- + class NAMES #IMPLIED -- for subclassing elements --'> + +<!-- SGML standard forces different NAMES for all attribute values + in the same element, regardless of the attribute name! As a result + CDATA is used for CLEAR attribute to avoid clash with ALIGN attribute.--> + +<!-- +When text flows around a figure or table in the margin, you sometimes want +to start an element like a header, paragraph or list below the figure rather +than alongside it. The CLEAR attribute allows you to move down unconditionally: + + clear=left move down until left margin is clear + clear=right move down until right margin is clear + clear=all move down until both margins are clear + +Alternatively, you can decide to place the element alongside the figure just +so long as there is enough room. The minimum width needed is specified as: + + clear="40 en" move down until there is at least 40 en units free + clear="100 pixels" move down until there is at least 100 pixels free + +The style sheet (or browser defaults) may provide default minimum widths for +each class of block-like elements. +--> + +<!ENTITY % needs -- Attributes for controlling text flow. Used in headers + and other elements to guarantee sufficient room -- + 'clear CDATA #IMPLIED'> + +<!-- + The following attribute may be included where ever a URL can be given: + + md message digest e.g. md="md5:jV2OfH+nnXHU8bnkPAad/mSQlTDZ" + where the digest is base64 encoded and preceded by a prefix + denoting the algorithm (in this case MD5). +--> + +<!ENTITY % url.link -- Attributes associated with URL based links -- + "md CDATA #IMPLIED -- message digest for linked object --"> + +<!--================ Character mnemonic entities ==========================--> + +<!-- The HTML list of Latin-1 entities includes the full range + of characters in widely available Latin-1 fonts, and as such + is a mixture of ISOlat1 and other ISO publishing symbols --> + +<!ENTITY % HTMLlat1 PUBLIC + "-//IETF//ENTITIES Added Latin 1 for HTML//EN"> +%HTMLlat1; + +<!--================ Entities for special symbols =========================--> + +<!ENTITY emsp SDATA "[emsp ]" -- em space --> +<!ENTITY ensp SDATA "[ensp ]" -- en space (1/2-em) --> +<!ENTITY mdash SDATA "[ndash ]" -- em dash --> +<!ENTITY ndash SDATA "[ndash ]" -- en dash (1/2-em) --> +<!ENTITY nbsp SDATA "[nbsp ]" -- non breaking space --> +<!ENTITY shy SDATA "[shy ]" -- soft hyphen --> +<!ENTITY copy SDATA "[copy ]" -- copyright sign --> +<!ENTITY trade SDATA "[trade ]" -- trade mark sign --> +<!ENTITY reg SDATA "[reg ]" -- registered sign --> + +<!--================ Entities for standard icons ==========================--> + +<!-- a range of standard icons such as &folder; for use + in speeding up display of directory listings etc. --> + +<!ENTITY % HTMLicons PUBLIC + "-//IETF//ENTITIES icons for HTML//EN"> +%HTMLicons; + +<!--================ Entities for math symbols ============================--> + +<!-- ISO subset chosen for use with the widely available Adobe math font --> + +<!ENTITY % HTMLmath PUBLIC + "-//IETF//ENTITIES Math and Greek for HTML//EN"> +%HTMLmath; + +<!--=================== Text Markup =======================================--> + +<!ENTITY % font " U | S | TT | I | BIG | SMALL"> + +<!ENTITY % phrase "EM | STRONG | CODE | SAMP | KBD | VAR | CITE"> + +<!ENTITY % misc "Q | LANG | AU | DFN | PERSON | ACRONYM | ABBREV | INS | DEL"> + +<!ENTITY % special "TAB | MATH | A | IMG | BR"> + +<!ENTITY % notmath "%font | %phrase | %special | %misc"> + +<!ENTITY % text "#PCDATA | SUB | SUP | B | %notmath"> + + +<!ENTITY % pre.exclusion "TAB|MATH|IMG|BIG|SMALL|SUB|SUP"> + +<!ELEMENT (%font|B|%phrase|%misc) - - (%text)+> +<!ATTLIST (%font|B|%phrase|%misc) %attrs;> + +<!-- Subscripts and superscripts. The ALIGN attribute is only used for math --> + +<!ELEMENT (SUB|SUP) - - (%text)+> +<!ATTLIST (SUB|SUP) + %attrs; + align (left|center|right) #IMPLIED + > + +<!-- Forced line break --> + +<!ELEMENT BR - O EMPTY> +<!ATTLIST BR + %attrs; + %needs; -- for control of text flow -- + > + +<!-- Named left, center and right tab stops (independent of '\t' char) --> + +<!ELEMENT TAB - O EMPTY> +<!ATTLIST TAB + id ID #IMPLIED -- defines named tab stop -- + indent NUMBER 0 -- en units before new tab stop -- + to IDREF #IMPLIED -- jump to named tab stop -- + align (left|center|right|decimal) left + dp CDATA #IMPLIED -- decimal point e.g. dp="," -- + > + +<!--================== Link Markup ========================================--> + +<!-- + With HTML 3.0 you can use ID attributes on most elements for named + link ends. The use of the NAME attribute on anchors is deprecated. + + Do we want to support arbitrary elements for link starts? This would + involve adding HREF and related attributes to most elements. +--> + +<![ %HTML.Deprecated [ + <!ENTITY % linkName "name CDATA #IMPLIED -- named link end --"> +]]> + +<!ENTITY % linkName ""> + + +<!ENTITY % ToolBar "home|toc|index|glossary|copyright| + up|previous|next|help|bookmark" + + -- LINK RELationship values which are used to create toolbar + buttons or menu items for navigation, where toc stands + for table of contents and bookmark provides for an open + ended set of links, i.e. you can use multiple bookmarks + for key entry points. Use the optional TITLE attribute + to override default names. + --> + +<!ENTITY % linkType "NAME" + -- A definitive list will be specified at a later date. + + They are used + + a) by stylesheets to control how collections of + html nodes are rendered into printed documents + + b) for document specific toolbars/menus when used + with the LINK element in document head: + + "home|toc|index|glossary|copyright| + up|previous|next|help|bookmark" + + where toc stands for table of contents and + bookmark provides for an open ended set of links, + i.e. you can use several bookmarks for key entry + points. Use the optional TITLE attribute to + override default names. + + c) for hypertext paths or guided tours, + with REL=NODE and REL=PATH. + + d) to make a link to a style sheet, e.g. rel=stylesheet + (used only with the LINK element). + + e) to make a link to a separate banner, e.g. rel=banner + (used only with the LINK element). + --> + + +<!ENTITY % linkExtraAttributes -- URN moved to %url.link -- + "rel %linkType #IMPLIED -- forward relationship type -- + rev %linkType #IMPLIED -- reversed relationship type + to referent data -- + title CDATA #IMPLIED -- advisory only -- + methods NAMES #IMPLIED -- supported public methods of the object: + TEXTSEARCH, GET, HEAD, ... -- + "> + +<![ %HTML.Deprecated [ + <!ENTITY % A.content "(%heading|%text)+"> +]]> + +<!ENTITY % A.content "(%text)+"> + +<!ELEMENT A - - %A.content -(A)> + +<!ATTLIST A + %attrs; + href %URI; #IMPLIED + %url.link; -- standard link attributes -- + %linkName; -- name attribute is deprecated; use ID instead -- + shape %SHAPE; #IMPLIED -- for shaped hotzones in FIGs -- + %linkExtraAttributes; + > + +<!--=================== Images ============================================--> + +<!-- Desired widths are used for negotiating image size + with the module responsible for painting the image. + align=left or right cause image to float to margin + and for subsequent text to wrap around image --> + +<!ELEMENT IMG - O EMPTY -- Embedded image --> +<!ATTLIST IMG + %attrs; + src %URI; #REQUIRED -- URI of image to embed -- + %url.link; -- standard link attributes -- + alt CDATA #IMPLIED -- for display in place of image -- + align (top|middle|bottom|left|right) top -- relative to baseline + -- width NUMBER #IMPLIED -- desired width in en's or pixels -- + height NUMBER #IMPLIED -- desired height in en's or pixels -- + units (en|pixels) pixels -- units for width and height -- + ismap (ismap) #IMPLIED -- pass clicks to server -- + > + +<!--=================== Paragraphs=========================================--> + +<!ELEMENT P - O (%text)+> +<!ATTLIST P + %attrs; + align (left|center|right|justify) #IMPLIED + %needs; -- for control of text flow -- + nowrap (nowrap) #IMPLIED -- disable wordwrap -- + > + +<!--=================== Headings, Titles, Sections ========================--> + +<!ELEMENT HR - O EMPTY -- customizable horizontal rule --> +<!ATTLIST HR + %attrs; + src %URI; #IMPLIED -- URI of custom rule graphic -- + %url.link; -- standard link attributes -- + %needs; -- for control of text flow -- + > + +<!-- + Headers can be numbered, although this is a matter for style sheets. + The style sheet controls the numbering style: + + a) whether the parent numbering is inherited, e.g. 5.i.c + where 5 is the current sequence number for H1 headers, and + 1 is the number for H2 headers and 3 for H3 headers. + + b) what style is used for current sequence number + e.g. arabic, upperalpha, loweralpha, upperroman, lowerroman + or a numbering scheme appropriate for the current language + + The skip attribute is used to skip over sequence numbers for items + which have been left out of the list, e.g. skip=3 advances the + sequence number past 3 omitted items. The seqnum sets the sequence + number to a specified value. Note that the style sheet may take + advantage of the sequence number for higher level headers. + + The dingbat or src attributes may be used to specify a bullet like + image to be placed adjacent to the header. Defining this in the + header element simplifies the document markup and avoids the need + to use the clear or needs attribute in the following element to + prevent it flowing around this image. +--> + +<!ELEMENT ( %heading ) - - (%text;)+> +<!ATTLIST ( %heading ) + %attrs; + align (left|center|right|justify) #IMPLIED + %needs; -- for control of text flow -- + seqnum NUMBER #IMPLIED -- starting sequence number -- + skip NUMBER 0 -- skip seq nums for missing items -- + dingbat ENTITY #IMPLIED -- dingbat entity from HTMLicons -- + src (%URI;) #IMPLIED -- bullet defined by graphic -- + %url.link; -- standard link attributes -- + nowrap (nowrap) #IMPLIED -- disable wordwrap -- + > + +<!ELEMENT TITLE - - (#PCDATA) + -- The TITLE element is not considered part of the flow of text. + It should be displayed, for example as the page header or + window title. + --> + +<!--=================== Text Flows ========================================--> + +<!ENTITY % block + "P | %list | DL + | %preformatted + | %blockquote + | FORM | ISINDEX | FN + | TABLE | FIG | NOTE"> + +<!-- + ((%block)* | (%text)*) would be much nicer as it would avoid the need + for a <P> tag when all you want is a few words of text. The problem + is that it also prevents: "<LI> <P>some text" since it forbids PCDATA + and hence the white space between the <LI> and the <P>. +--> + +<![ %HTML.Recommended [ + <!ENTITY % flow "(%block)*"> +]]> + +<!ENTITY % flow "(%text | %block)*"> + +<!ELEMENT PRE - - (%text)* -(%pre.exclusion)> + +<!ATTLIST PRE + %attrs; + width NUMBER #implied + %needs; -- for control of text flow -- + > + +<![ %HTML.Obsoleted [ + +<!ENTITY % literal "CDATA" + -- special non-conforming parsing mode where + the only markup signal is the end tag + in full. This will cause problems for + standard SGML tools! + --> + +<!ELEMENT XMP - - %literal> +<!ELEMENT LISTING - - %literal> +<!ELEMENT PLAINTEXT - O %literal> + +]]> + +<!--=================== Lists =============================================--> + +<!ELEMENT DL - - (LH?, (DT|DD)+) -- this is perhaps too lax? --> +<!ATTLIST DL + %attrs; + %needs; -- for control of text flow -- + compact (compact) #IMPLIED -- more compact style -- + > + +<!ELEMENT DT - O (%text)+> +<!ELEMENT DD - O %flow;> +<!ATTLIST (DT|DD) + %attrs; + %needs; -- for control of text flow -- + > + + +<!ELEMENT (OL|UL) - - (LH?, LI+) -- should we allow a list header ? --> + +<!-- style sheet controls numbering style + a) whether the parent numbering is inherited, e.g. 5.1.c + b) what style is used for current sequence number + e.g. arabic, upperalpha, loweralpha, upperroman, lowerroman + or a numbering scheme for the current language +--> +<!ATTLIST OL + %attrs; + %needs; -- for control of text flow -- + continue (continue) #IMPLIED -- don't restart sequence number -- + seqnum NUMBER #IMPLIED -- starting sequence number -- + compact (compact) #IMPLIED -- reduced interitem spacing -- + > + +<!-- Unordered lists: + + o single or multicolumn with + horizontal or vertical wrapping + + o plain or bulletted list items + + o bullets can be customised via: + - entities (dingbats in HTMLicons) + - external graphic via URL + - individual attributes on LI tags +--> +<!ATTLIST UL + %attrs; + %needs; -- for control of text flow -- + wrap (vert|horiz|none) none -- multicolumn list style -- + plain (plain) #IMPLIED -- suppress bullets -- + dingbat ENTITY #IMPLIED -- dingbat entity from HTMLicons -- + src (%URI;) #IMPLIED -- bullet defined by graphic -- + %url.link; -- standard link attributes -- + compact (compact) #IMPLIED -- reduced interitem spacing -- + > + +<!ELEMENT LH - O (%text;)+ -- list header --> +<!ATTLIST LH %attrs;> + +<!-- + For unordered lists, you can override the standard bullet with + a custom graphic specified via a URI e.g. src="splash.gif" or + a reference to one of the HTMLicons graphics e.g. dingbat=folder + + The skip attribute is used with ordered lists to skip over sequence + numbers for items which have been left out of the list, e.g. skip=3 + advances the sequence number past 3 omitted items. +--> + +<!ELEMENT LI - O %flow; -- list item --> +<!ATTLIST LI + %attrs; + %needs; -- for control of text flow -- + dingbat ENTITY #IMPLIED -- dingbat entity from HTMLicons -- + src (%URI;) #IMPLIED -- custom bullet graphic -- + %url.link; -- standard link attributes -- + skip NUMBER 0 -- skip seq nums for missing items -- + > + +<!-- DIR and MENU are now subsumed by UL with type=plain. Use the + wrap attribute to control wrapping style for multicolumn lists --> + +<![ %HTML.Deprecated [ + <!ELEMENT (DIR|MENU) - - (LI)+ -(%block)> + <!ATTLIST (DIR|MENU) + compact (compact) #IMPLIED> +]]> + +<!--=================== Document Body =====================================--> + +<![ %HTML.Recommended [ + <!ENTITY % body.content "(DIV|%heading|%block|HR|ADDRESS|APP)*" + -- <h1>Heading</h1> + <p>Text ... + is preferred to + <h1>Heading</h1> + Text ... + --> +]]> + +<!ENTITY % body.content "(DIV | %heading | %text | %block | HR | ADDRESS | APP)*"> + +<!ELEMENT BODY O O (BANNER?, BODYTEXT) +(SPOT)> +<!ATTLIST BODY + %attrs; + background %URI; #IMPLIED -- texture tile for document background -- + > + +<!ELEMENT BODYTEXT O O %body.content -- dummy element --> + +<!-- + The BANNER element is used for a banner section which appears at + the top of the window and doesn't scroll with window contents. + This can be used for corporate logos, copyright statements and + disclaimers, as well as customized navigation/search controls. +--> +<!ELEMENT BANNER - - %body.content> +<!ATTLIST BANNER %attrs; > + +<!-- SPOT is used to insert IDs at arbitrary places + e.g. for end points of a marked range (see RANGE) --> +<!ELEMENT SPOT - O EMPTY> +<!ATTLIST SPOT id ID #REQUIRED> + +<!ELEMENT (%blockquote) - - (BODYTEXT, CREDIT?)> +<!ATTLIST (%blockquote) + %attrs; + %needs; -- for control of text flow -- + nowrap (nowrap) #IMPLIED -- disable wordwrap -- + > + +<!ENTITY % address.content "((%text;)* | P*)"> + +<!ELEMENT ADDRESS - - %address.content> +<!ATTLIST ADDRESS + %attrs; + %needs; -- for control of text flow -- + > + +<!ELEMENT APP - O EMPTY> +<!ATTLIST APP + class CDATA #REQUIRED + src %URI; #IMPLIED + align (bottom|top|middle) #IMPLIED + width NUMBER #IMPLIED + height NUMBER #IMPLIED + > + +<!-- + DIV can be used with the CLASS attribute to represent different + kinds of container, e.g. chapter, section, abstract, appendix. +--> + +<!ELEMENT DIV - - %body.content> +<!ATTLIST DIV + %attrs; + %needs; -- for control of text flow -- + align (left|center|right) left -- alignment of following text -- + nowrap (nowrap) #IMPLIED -- disable wordwrap -- + > + +<!--================ Forms ===============================================--> + +<!-- + As HTML 2.0 plus a few extensions: + + a) A RANGE control which varies between pair of values + specified with the size attribute, e.g. SIZE="1, 10" + + b) FILE widget for uploading one or more files to a server + + c) SCRIBBLE on image widget that sends the "ink" to the server + + d) SUBMIT/RESET buttons can now be customised with an image. + This subsumes the IMAGE type which is now deprecated. + + e) Graphical SELECTion menus are now supported, using + the new SHAPE attribute on OPTION elements. + + Further extensions are in the pipeline (e.g. table entry, + multiple data formats for textarea fields and client-side + scripts with custom widgets) but will have to wait until + the backlog of implementation work diminishes. +--> + +<!ELEMENT FORM - - %body.content -(FORM) +(INPUT|SELECT|TEXTAREA)> +<!ATTLIST FORM + action %URI #REQUIRED -- server-side form handler -- + method (%HTTP-Method) GET -- see HTTP specification -- + enctype %Content-Type; "application/x-www-form-urlencoded" + script %URI #IMPLIED -- link to client-side script -- + > + +<![ %HTML.Deprecated [ + <!ENTITY % InputType "(TEXT | PASSWORD | CHECKBOX | RADIO | SUBMIT + | RESET | RANGE | FILE | SCRIBBLE | HIDDEN | IMAGE)"> +]]> + +<!ENTITY % InputType "(TEXT | PASSWORD | CHECKBOX | RADIO | SUBMIT + | RESET | RANGE | FILE | SCRIBBLE | HIDDEN)"> + +<!ELEMENT INPUT - O EMPTY> +<!ATTLIST INPUT + %attrs; + type %InputType TEXT + name NAME #IMPLIED -- required for all but submit and reset -- + value CDATA #IMPLIED -- required for radio buttons & checkboxes -- + disabled (disabled) #IMPLIED -- read-only fields -- + error CDATA #IMPLIED -- why field is in error -- + checked (checked) #IMPLIED -- for radio buttons and check boxes -- + size NUMBER #IMPLIED -- visible width of TEXT fields -- + maxlength NUMBER #IMPLIED -- max number of chars for TEXT fields -- + min %REAL #IMPLIED -- lower limit for RANGE fields -- + max %REAL #IMPLIED -- upper limit for RANGE fields -- + accept CDATA #IMPLIED -- list of MIME types for file fields -- + src %URI #IMPLIED -- for fields with background images -- + %url.link; -- standard link attributes -- + align (top|middle|bottom|left|right) top + > + +<!-- + SRC attribute added for graphical selection menus + The WIDTH, HEIGHT and UNITS attributes apply to the + image specified by the SRC attribute. + --> + +<!ELEMENT SELECT - - (OPTION+) -(INPUT|TEXTAREA|SELECT)> +<!ATTLIST SELECT + %attrs; + name CDATA #REQUIRED + multiple (multiple) #IMPLIED + disabled (disabled) #IMPLIED -- read-only menu -- + error CDATA #IMPLIED -- why selections are in error -- + src %URI #IMPLIED -- for graphical selection menus -- + %url.link; -- standard link attributes -- + width NUMBER #IMPLIED -- desired width of in en's or pixels -- + height NUMBER #IMPLIED -- desired height in en's or pixels -- + units (en|pixels) pixels -- units for width and height -- + align (top|middle|bottom|left|right) top + > + +<!ELEMENT OPTION - O (#PCDATA)> +<!ATTLIST OPTION + %attrs; + selected (selected) #IMPLIED + value CDATA #IMPLIED -- default to element content -- + shape %SHAPE; #IMPLIED -- for graphical selection menus -- + disabled (disabled) #IMPLIED -- unselectable option -- + error CDATA #IMPLIED -- why this choice is in error -- + > + +<!-- + Multi-line text input field. align=left or right + causes the field to float to margin and for + subsequent text to wrap around the field. +--> + +<!ELEMENT TEXTAREA - - (#PCDATA) -(INPUT|TEXTAREA|SELECT)> +<!ATTLIST TEXTAREA + %attrs; + name CDATA #REQUIRED + rows NUMBER #REQUIRED + cols NUMBER #REQUIRED + disabled (disabled) #IMPLIED -- read-only field -- + error CDATA #IMPLIED -- why field is in error -- + align (top|middle|bottom|left|right) top + > + +<!--======================= Captions ======================================--> + +<!ELEMENT CAPTION - - (%text;)+ -- table or figure caption --> +<!ATTLIST CAPTION + %attrs; + align (top|bottom|left|right) #IMPLIED + > +<!--======================= Tables ========================================--> + +<!-- + Tables and figures can be aligned in several ways: + + bleedleft flush left with the left (window) border + left flush left with the left text margin + center centered (text flow is disabled for this mode) + right flush right with the right text margin + bleedright flush right with the right (window) border + justify when applicable the table/figure should stretch + to fill space between the text margins + + Note: text will flow around the table or figure if the browser + judges there is enough room and the alignment is not centered + or justified. The table or figure may itself be part of the + text flow around some earlier figure. You can in this case use + the clear or needs attributes to move the new table or figure + down the page beyond the obstructing earlier figure. Similarly, + you can use the clear or needs attributes with other elements + such as headers and lists to move them further down the page. +--> + +<!ENTITY % block.align + "align (bleedleft|left|center|right|bleedright|justify) center"> + +<!-- + The HTML 3.0 table model has been chosen for its simplicity + and the ease in writing filters from common DTP packages. + + By default the table is automatically sized according to the + cell contents and the current window size. Specifying the columns + widths using the colspec attribute allows browsers to start + displaying the table without having to wait for last row. + + The colspec attribute is a list of column widths and alignment + specifications. The columns are listed from left to right with + a capital letter followed by a number, e.g. COLSPEC="L20 C8 L40". + The letter is L for left, C for center, R for right alignment of + cell contents. J is for justification, when feasible, otherwise + this is treated in the same way as L for left alignment. + Column entries are delimited by one or more space characters. + + The number specifies the width in en's, pixels or as a + fractional value of the table width, as according to the + associated units attribute. This approach is more compact + than used with most SGML table models and chosen to simplify + hand entry. The width attribute allows you to specify the + width of the table in pixels, en units or as a percentage + of the space between the current left and right margins. + + To assist with rendering to speech, row and column headers + can be given short names using the AXIS attribute. The AXES + attribute is used to explicitly specify the row and column + names for use with each cell. Otherwise browsers can follow + up columns and left along rows (right for some languages) + to find the corresponding header cells. + + Table content model: Braille limits the width of tables, + placing severe limits on column widths. User agents need + to render big cells by moving the content to a note placed + before the table. The cell is then rendered as a link to + the corresponding note. + + To assist with formatting tables to paged media, authors + can differentiate leading and trailing rows that are to + be duplicated when splitting tables across page boundaries. + The recommended way is to subclass rows with the CLASS attribute + For example: <TR CLASS=Header>, <TR CLASS=Footer> are used for + header and footer rows. Paged browsers insert footer rows at + the bottom of the current page and header rows at the top of + the new page, followed by the remaining body rows. +--> + +<!ELEMENT TABLE - - (CAPTION?, TR*) -- mixed headers and data --> +<!ATTLIST TABLE + %attrs; + %needs; -- for control of text flow -- + border (border) #IMPLIED -- draw borders -- + colspec CDATA #IMPLIED -- column widths and alignment -- + units (en|pixels|relative) en -- units for column widths -- + dp CDATA #IMPLIED -- decimal point e.g. dp="," -- + width NUMBER #IMPLIED -- absolute or percentage width -- + %block.align; -- horizontal alignment -- + noflow (noflow) #IMPLIED -- noflow around table -- + nowrap (nowrap) #IMPLIED -- don't wrap words -- + > + +<!ENTITY % cell "TH | TD"> +<!ENTITY % horiz.align "left|center|right|justify"> +<!ENTITY % vert.align "top|middle|bottom|baseline"> + +<!-- + Browsers should tolerate an omission of the first <TR> + tag as it is implied by the context. Missing trailing + <TR>s implied by rowspans should be ignored. + + The alignment attributes act as defaults for rows + overriding the colspec attribute and being in turn + overridden by alignment attributes on cell elements. + Use valign=baseline when you want to ensure that text + in different cells on the same row is aligned on the + same baseline regardless of fonts. It only applies + when the cells contain a single line of text. +--> + +<!ELEMENT TR - O (%cell)* -- row container --> +<!ATTLIST TR + %attrs; + align (%horiz.align) #IMPLIED -- horizontal alignment -- + valign (%vert.align) top -- vertical alignment -- + dp CDATA #IMPLIED -- decimal point e.g. dp="," -- + nowrap (nowrap) #IMPLIED -- don't wrap words -- + > + +<!-- + Note that table cells can include nested tables. + Missing cells are considered to be empty, while + missing rows should be ignored, i.e. if a cell + spans a row and there are no further TR elements + then the implied row should be ignored. +--> + +<!ELEMENT (%cell) - O %body.content> +<!ATTLIST (%cell) + %attrs; + colspan NUMBER 1 -- columns spanned -- + rowspan NUMBER 1 -- rows spanned -- + align (%horiz.align) #IMPLIED -- horizontal alignment -- + valign (%vert.align) top -- vertical alignment -- + dp CDATA #IMPLIED -- decimal point e.g. dp="," -- + nowrap (nowrap) #IMPLIED -- don't wrap words -- + axis CDATA #IMPLIED -- axis name, defaults to element content -- + axes CDATA #IMPLIED -- comma separated list of axis names -- + > + +<!--====================== Figures ========================================--> + +<!-- + The element contains text for use in non-graphical displays. Note that + you can use the shape attribute in anchors to specify hotzones on images. + This provides for local processing of pointer clicks and a unified method + for dealing with graphical and non-graphical displays. + + Text is flowed around figures when the figure is left or right aligned. + You can request the browser to move down until there is enough room for + the next element, see the CLEAR and NEED attributes (in %needs) + + Figures offer a path towards embedding arbitrary information formats + via some kind of OLE/OpenDoc mechanism. +--> + +<!ELEMENT FIG - - (OVERLAY*, CAPTION?, FIGTEXT, CREDIT?) -(FIG|IMG)> +<!ATTLIST FIG + %attrs; + %needs; -- for control of text flow -- + src %URI; #REQUIRED -- URI of document to embed -- + %url.link; -- standard link attributes -- + %block.align; -- horizontal alignment -- + noflow (noflow) #IMPLIED -- noflow around figure -- + width NUMBER #IMPLIED -- desired width in units -- + height NUMBER #IMPLIED -- desired height in units -- + units (en|pixels) pixels -- specifies units as en's or pixels -- + imagemap (%URI) #IMPLIED -- pass background clicks to server -- + > + +<!ELEMENT FIGTEXT O O %body.content -- dummy element --> + +<!-- + Figure overlays. When combined with local caching, overlays + provide a cheap way of modifying a larger base image sent as + part of a previous page. +--> + +<!ELEMENT OVERLAY - O EMPTY -- image overlay --> +<!ATTLIST OVERLAY + src %URI; #REQUIRED -- URI of image overlay -- + %url.link; -- standard link attributes -- + units (en|pixels) pixels -- specifies units as en's or pixels -- + x NUMBER 0 -- offset from left in units -- + y NUMBER 0 -- offset from top in units -- + width NUMBER #IMPLIED -- desired width in units -- + height NUMBER #IMPLIED -- desired height in units -- + imagemap (%URI) #IMPLIED -- pass background clicks to server -- + > + +<!ELEMENT CREDIT - - (%text;)* -- source of image --> +<!ATTLIST CREDIT + %attrs; + > + +<!--======================== Notes ========================================--> + +<!-- +The NOTE element is used for admonishments. The CLASS attribute +is used to differentiate NOTE's, e.g. Note, Caution or Warning. +--> + +<!ELEMENT NOTE - - %body.content; -- admonishment --> +<!ATTLIST NOTE + %attrs; + src %URI; #IMPLIED -- URI of custom graphic -- + %url.link; -- standard link attributes -- + %needs; -- for control of text flow -- + > + +<!--======================== Footnotes ====================================--> + +<!-- +Typically rendered as popup note. These elements are referenced +by hypertext links specified with the anchor element. +--> +<!ELEMENT FN - - %body.content;> +<!ATTLIST FN %attrs;> + +<!--======================== Math ========================================--> + +<!-- Use     etc for greater control of spacing. --> + +<!-- Subscripts and Superscripts + + <SUB> and <SUP> are used for subscripts and superscripts. + + i j + X <SUP>i</SUP>Y<SUP>j</SUP> is X Y + + i.e. the space following the X disambiguates the binding. + The align attribute can be used for horizontal alignment, + e.g. to explicitly place an index above an element: + i + X<sup align=center>i</sup> produces X + +Short references are defined for superscripts, subscripts and boxes +to save typing when manually editing HTML math, e.g. + + x^2^ is mapped to x<sup>2</sup> + y_z_ is mapped to y<sub>z</sub> + {a+b} is mapped to <box>a + b</box> + +Note that these only apply within the MATH element and can't be +used in normal text! +--> +<!ENTITY REF1 STARTTAG "SUP"> +<!ENTITY REF2 ENDTAG "SUP"> +<!ENTITY REF3 STARTTAG "SUB"> +<!ENTITY REF4 ENDTAG "SUB"> +<!ENTITY REF5 STARTTAG "BOX"> +<!ENTITY REF6 ENDTAG "BOX"> + +<!USEMAP MAP1 MATH> +<!USEMAP MAP2 SUP> +<!USEMAP MAP3 SUB> +<!USEMAP MAP4 BOX> + +<!SHORTREF MAP1 "^" REF1 + "_" REF3 + "{" REF5 > + +<!SHORTREF MAP2 "^" REF2 + "_" REF3 + "{" REF5 > + +<!SHORTREF MAP3 "_" REF4 + "^" REF1 + "{" REF5 > + +<!SHORTREF MAP4 "}" REF6 + "^" REF1 + "_" REF3 + "{" REF5 > + +<!-- + The inclusion of %math and exclusion of %notmath is used here + to alter the content model for the B, SUB and SUP elements, + to limit them to formulae rather than general text elements. +--> + +<!ENTITY % mathvec "VEC|BAR|DOT|DDOT|HAT|TILDE" -- common accents --> +<!ENTITY % mathface "B|T|BT" -- control of font face --> +<!ENTITY % math "BOX|ABOVE|BELOW|%mathvec|ROOT|SQRT|ARRAY|SUB|SUP|%mathface"> +<!ENTITY % formula "#PCDATA|%math"> + +<!ELEMENT MATH - - (#PCDATA)* -(%notmath) +(%math)> +<!ATTLIST MATH + id ID #IMPLIED + class NAMES #IMPLIED -- e.g. class=chem --> + +<!-- The BOX element acts as brackets. Delimiters are optional and + stretch to match the height of the box. The OVER element is used + when you want a line between numerator and denominator. This line + is suppressed with the alternative ATOP element. CHOOSE acts like + ATOP but adds enclosing round brackets as a convenience for binomial + coefficients. Note the use of { and } as shorthand for <BOX> and + </BOX> respectively: + + 1 + X + {1 + X<OVER>Y} is _______ + Y + + a + b + {a + b<ATOP>c - d} is + c - d + + The delimiters are represented using the LEFT and RIGHT + elements as in: + + {[<LEFT>x + y<RIGHT>]} is [ x + y ] + {(<LEFT>a<RIGHT>]} is (a] + {||<LEFT>a<RIGHT>||} is || a || + + Use { and } for "{" and "}" respectively as + these symbols are used as shorthand for BOX, e.g. + + {{<LEFT>a+b<RIGHT>}} is {a+b} + + You can stretch definite integrals to match the integrand, e.g. + + {∫<SUB>a</SUB><SUP>b</SUP><LEFT>{f(x)<over>1+x} dx} + + b + / f(x) + | ----- dx + / 1 + x + a + + Note the complex content model for BOX is a work around + for the absence of support for infix operators in SGML. + + You can get oversize delimiters with the SIZE attribute, + for example <BOX SIZE=large>(<LEFT>...<RIGHT>)</BOX> + + Note that the names of common functions are recognized + by the parser without the need to use "&" and ";" around + them, e.g. int, sum, sin, cos, tan, ... +--> + +<!ELEMENT BOX - - ((%formula)*, (LEFT, (%formula)*)?, + ((OVER|ATOP|CHOOSE), (%formula)*)?, + (RIGHT, (%formula)*)?)> +<!ATTLIST BOX + size (normal|medium|large|huge) normal -- oversize delims --> + +<!ELEMENT (OVER|ATOP|CHOOSE|LEFT|RIGHT) - O EMPTY> + +<!-- Horizontal line drawn ABOVE contents + The symbol attribute allows authors to supply + an entity name for an accent, arrow symbol etc. + Generalisation of LaTeX's overline command. + + e.g. <above sym=ssmile>x</above> + places an upwardly turning curve above the "x" + --> + +<!ELEMENT ABOVE - - (%formula)+> +<!ATTLIST ABOVE sym ENTITY #IMPLIED> + +<!-- Horizontal line drawn BELOW contents + The symbol attribute allows authors to + supply an entity name for an arrow symbol etc. + Generalisation of LaTeX's underline command. + --> + +<!ELEMENT BELOW - - (%formula)+> +<!ATTLIST BELOW sym ENTITY #IMPLIED> + +<!-- Convenience tags for common accents: + vec, bar, dot, ddot, hat and tilde +--> + +<!ELEMENT (%mathvec) - - (%formula)+> + +<!-- + T and BT are used to designate terms which should + be rendered in an upright font (& bold face for BT) +--> + +<!ELEMENT (T|BT) - - (%formula)+> +<!ATTLIST (T|BT) class NAMES #IMPLIED> + +<!-- Roots e.g. <ROOT>3<OF>1+x</ROOT> --> + +<!ELEMENT ROOT - - ((%formula)+, OF, (%formula)+)> +<!ELEMENT OF - O (%formula)* -- what the root applies to --> + +<!ELEMENT SQRT - - (%formula)* -- square root convenience tag --> + +<!-- LaTeX like arrays. The COLDEF attribute specifies + a single capital letter for each column determining + how the column should be aligned, e.g. coldef="CCC" + + "L" left + "C" center + "R" right + + An optional separator letter can occur between columns + and should be one of + - or =, e.g. "C+C+C+C=C". + Whitespace within coldef is ignored. By default, the + columns are all centered. + + The ALIGN attribute alters the vertical position of the + array as compared with preceding and following expressions. + + Use LDELIM and RDELIM attributes for delimiter entities. + When the LABELS attribute is present, the array is + displayed with the first row and the first column as + labels displaced from the other elements. In this case, + the first element of the first row should normally be + left blank. + + Use &vdots; &cdots; and &ddots; for vertical, horizontal + and diagonal ellipsis dots. Use &dotfill; to fill an array + cell with horizontal dots (e.g. for a full row). + Note &ldots; places the dots on the baseline, while &cdots; + places them higher up. +--> + +<!ELEMENT ARRAY - - (ROW)+> +<!ATTLIST ARRAY + align (top|middle|bottom) middle -- vertical alignment -- + coldef CDATA #IMPLIED -- column alignment and separator -- + ldelim CDATA #IMPLIED -- stretchy left delimiter -- + rdelim CDATA #IMPLIED -- stretchy right delimiter -- + labels (labels) #IMPLIED -- TeX's \bordermatrix style --> + +<!ELEMENT ROW - O (ITEM)*> +<!ELEMENT ITEM - O (%formula)*> +<!ATTLIST ITEM + align CDATA #IMPLIED -- override coldef alignment -- + colspan NUMBER 1 -- merge columns as per TABLE -- + rowspan NUMBER 1 -- merge rows as per TABLE --> + +<!--================ Document Head ========================================--> + +<![ %HTML.Deprecated [ + <!ENTITY % head.content "TITLE & ISINDEX? & BASE? & STYLE? + & META* & LINK* & RANGE* & NEXTID?"> +]]> + +<!ENTITY % head.nextid ""> + +<!ENTITY % head.content "TITLE & ISINDEX? & BASE? & STYLE? + & META* & LINK* & RANGE*"> + +<!ELEMENT HEAD O O (%head.content)> + +<!ELEMENT LINK - O EMPTY> +<!ATTLIST LINK + href %URI #REQUIRED + %linkExtraAttributes; > + +<!ELEMENT RANGE - O EMPTY> +<!ATTLIST RANGE + id ID #IMPLIED -- for naming marked range -- + class NAMES #IMPLIED -- for subclassing -- + from IDREF #REQUIRED -- start of marked range -- + until IDREF #REQUIRED -- end of marked range -- + > + +<!ELEMENT ISINDEX - O EMPTY> +<!ATTLIST ISINDEX + href %URI #IMPLIED -- server handling queries -- + prompt CDATA #IMPLIED -- prompt message --> + +<!-- + The BASE element gives the base URL for + dereferencing relative URLs, e.g. + + <BASE href="http://foo.com/images"> + ... + <IMG SRC="bar.gif"> + + The image is deferenced to + + http://foo.com/images/bar.gif +--> + +<!ELEMENT BASE - O EMPTY> +<!ATTLIST BASE + id ID #IMPLIED + href %URI; #REQUIRED + > + +<![ %HTML.Deprecated [ + <!ELEMENT NEXTID - O EMPTY> + <!ATTLIST NEXTID N CDATA #REQUIRED> +]]> + +<!ELEMENT META - O EMPTY -- Generic Metainformation --> +<!ATTLIST META + http-equiv NAME #IMPLIED -- HTTP response header name -- + name NAME #IMPLIED -- metainformation name -- + content CDATA #REQUIRED -- associated information -- + > + +<!-- + A style sheet can be associated with the document using the + LINK element, e.g. <LINK rel=style href="housestyle.dsssl">. + Style overrides can be placed in the document head using the + STYLE element, e.g. + + <style notation=dsssl-lite> + dsss-lite stuff + </style> + + Later on in the document you can use: + + <h2 class=bigcaps>Header with bigger than normal capitals</h2> + <p class=abstract>A paragraph with a unique style of its own + ... + + Statements in the given style notation + + The tag names, class and id attributes are used in the style sheet + notation to describe how to render matching elements. +--> + +<!ENTITY % style-notations "dsssl-lite | w3c-style"> + +<!-- +<!NOTATION dsssl-lite PUBLIC + "ISO/IEC 10179:1995//NOTATION DSSSL Style Language//EN"> + +<!NOTATION w3c-style PUBLIC "IETF/RFC nnn/W3C Style Language//EN"> +--> + +<!ELEMENT STYLE - O (#PCDATA)> +<!ATTLIST STYLE + notation NOTATION (%style-notations;) #REQUIRED +> + +<!--================ Document Structure ===================================--> + +<!ENTITY % html.content "HEAD, BODY"> + +<!ELEMENT HTML O O (%html.content)> +<!ENTITY % version.attr 'VERSION CDATA #FIXED "%HTML.Version;"'> + +<!-- suggested roles are: TOC, DOC, DOCPART, HITLIST, DIALOG --> + +<!ATTLIST HTML + %version.attr; -- report DTD version to application -- + urn CDATA #IMPLIED -- universal resource name for this document -- + class NAMES #IMPLIED -- role of this document, eg table of contents -- + > + +<!-- The END -->
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/sgml/html-hjs.dtd Mon Aug 13 08:46:35 2007 +0200 @@ -0,0 +1,27 @@ +<!-- html-hjs.dtd + + Document Type Definition for the HyperText Markup Language + with strict validation of the HotJava DTD. + + Author: Daniel W. Connolly <connolly@w3.org> + Applet additions by: Mark Gaither (markg@hal.com) 24 Jul 95 + +--> + +<!ENTITY % HTML.Version + "-//Sun Microsystems Corp.//DTD HotJava Strict HTML//EN" + + -- Typical usage: + + <!DOCTYPE HTML PUBLIC "-//Sun Microsystems Corp.//DTD HotJava HTML//EN"> + <html> + ... + </html> + -- + > + +<!-- Feature Test Entities --> +<!ENTITY % HTML.Recommended "INCLUDE"> + +<!ENTITY % html PUBLIC "-//Sun Microsystems Corp.//DTD HotJava HTML//EN"> +%html;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/sgml/html-icons.sgml Mon Aug 13 08:46:35 2007 +0200 @@ -0,0 +1,10 @@ + +<!-- + HTMLicons fake entity declarations to get the html-3.dtd to work +--> + +<!ENTITY folder SDATA "[folder ]" -- folder icon --> +<!-- should have a bunch more icons, like the internal icons = + + in Mosaic and Netscape --> +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/sgml/html-latin.sgml Mon Aug 13 08:46:35 2007 +0200 @@ -0,0 +1,161 @@ +<!-- Portions of this text are copyright ISO: + + (C) International Organization for Standardization 1986 + Permission to copy in any form is granted for use with + conforming SGML systems and applications as defined in + ISO 8879, provided this notice is included in all copies. +--> +<!-- Character entity set. Typical invocation: + <!ENTITY % HTMLlat1 PUBLIC + "-//W3O//ENTITIES W3 Latin 1 for HTML//EN"> + %HTMLlat1; +--> +<!-- Modified for use in HTML + $Id: html-latin.sgml,v 1.1.1.1 1996/12/18 03:43:04 steve Exp $ = + +--> +<!-- Modified to add characters in the range &161; to &191; in + the ISO Latin-1 character set, which could only be referred = + + to by numeric references. Entity names based on relevant entities in + ISO 8879-1986//ENTITIES Numeric and Special Graphic//EN" + Also added the standard lt gt amp entities from HTML 2.0 + Chris Lilley, 13 March 1995 + = + + This covers all of Latin 1, but we are still unable to display a = + + Trade Mark (TM) +--> + +<!ENTITY AElig CDATA "Æ" -- capital AE diphthong (ligature) --> +<!ENTITY Aacute CDATA "Á" -- capital A, acute accent --> +<!ENTITY Acirc CDATA "Â" -- capital A, circumflex accent --> +<!ENTITY Agrave CDATA "À" -- capital A, grave accent --> +<!ENTITY Aring CDATA "Å" -- capital A, ring --> +<!ENTITY Atilde CDATA "Ã" -- capital A, tilde --> +<!ENTITY Auml CDATA "Ä" -- capital A, dieresis or umlaut mark --> +<!ENTITY Ccedil CDATA "Ç" -- capital C, cedilla --> +<!ENTITY ETH CDATA "Ð" -- capital Eth, Icelandic --> +<!ENTITY Eacute CDATA "É" -- capital E, acute accent --> +<!ENTITY Ecirc CDATA "Ê" -- capital E, circumflex accent --> +<!ENTITY Egrave CDATA "È" -- capital E, grave accent --> +<!ENTITY Euml CDATA "Ë" -- capital E, dieresis or umlaut mark --> +<!ENTITY Iacute CDATA "Í" -- capital I, acute accent --> +<!ENTITY Icirc CDATA "Î" -- capital I, circumflex accent --> +<!ENTITY Igrave CDATA "Ì" -- capital I, grave accent --> +<!ENTITY Iuml CDATA "Ï" -- capital I, dieresis or umlaut mark --> +<!ENTITY Ntilde CDATA "Ñ" -- capital N, tilde --> +<!ENTITY Oacute CDATA "Ó" -- capital O, acute accent --> +<!ENTITY Ocirc CDATA "Ô" -- capital O, circumflex accent --> +<!ENTITY Ograve CDATA "Ò" -- capital O, grave accent --> +<!ENTITY Oslash CDATA "Ø" -- capital O, slash --> +<!ENTITY Otilde CDATA "Õ" -- capital O, tilde --> +<!ENTITY Ouml CDATA "Ö" -- capital O, dieresis or umlaut mark --> +<!ENTITY THORN CDATA "Þ" -- capital THORN, Icelandic --> +<!ENTITY Uacute CDATA "Ú" -- capital U, acute accent --> +<!ENTITY Ucirc CDATA "Û" -- capital U, circumflex accent --> +<!ENTITY Ugrave CDATA "Ù" -- capital U, grave accent --> +<!ENTITY Uuml CDATA "Ü" -- capital U, dieresis or umlaut mark --> +<!ENTITY Yacute CDATA "Ý" -- capital Y, acute accent --> +<!ENTITY aacute CDATA "á" -- small a, acute accent --> +<!ENTITY acirc CDATA "â" -- small a, circumflex accent --> +<!ENTITY aelig CDATA "æ" -- small ae diphthong (ligature) --> +<!ENTITY agrave CDATA "à" -- small a, grave accent --> +<!ENTITY aring CDATA "å" -- small a, ring --> +<!ENTITY atilde CDATA "ã" -- small a, tilde --> +<!ENTITY auml CDATA "ä" -- small a, dieresis or umlaut mark --> +<!ENTITY ccedil CDATA "ç" -- small c, cedilla --> +<!ENTITY eacute CDATA "é" -- small e, acute accent --> +<!ENTITY ecirc CDATA "ê" -- small e, circumflex accent --> +<!ENTITY egrave CDATA "è" -- small e, grave accent --> +<!ENTITY eth CDATA "ð" -- small eth, Icelandic --> +<!ENTITY euml CDATA "ë" -- small e, dieresis or umlaut mark --> +<!ENTITY iacute CDATA "í" -- small i, acute accent --> +<!ENTITY icirc CDATA "î" -- small i, circumflex accent --> +<!ENTITY igrave CDATA "ì" -- small i, grave accent --> +<!ENTITY iuml CDATA "ï" -- small i, dieresis or umlaut mark --> +<!ENTITY ntilde CDATA "ñ" -- small n, tilde --> +<!ENTITY oacute CDATA "ó" -- small o, acute accent --> +<!ENTITY ocirc CDATA "ô" -- small o, circumflex accent --> +<!ENTITY ograve CDATA "ò" -- small o, grave accent --> +<!ENTITY oslash CDATA "ø" -- small o, slash --> +<!ENTITY otilde CDATA "õ" -- small o, tilde --> +<!ENTITY ouml CDATA "ö" -- small o, dieresis or umlaut mark --> +<!ENTITY szlig CDATA "ß" -- small sharp s, German (sz ligature) --> +<!ENTITY thorn CDATA "þ" -- small thorn, Icelandic --> +<!ENTITY uacute CDATA "ú" -- small u, acute accent --> +<!ENTITY ucirc CDATA "û" -- small u, circumflex accent --> +<!ENTITY ugrave CDATA "ù" -- small u, grave accent --> +<!ENTITY uuml CDATA "ü" -- small u, dieresis or umlaut mark --> +<!ENTITY yacute CDATA "ý" -- small y, acute accent --> +<!ENTITY yuml CDATA "ÿ" -- small y, dieresis or umlaut mark --> +<!-- = + + Ones that aren't accented characters, and so not in ISO Added Latin = +1. + + umlaut. macron, acute, cedilla + were not in ISO Numeric and Special Graphic + either; I took their names from the numeric entity list in + http://www.hpl.hp.co.uk/people/dsr/html/latin1.html = + + Chris Lilley, 13 March 1995 = + +--> + +<!ENTITY iexcl SDATA "=A1" --=3D inverted exclamation mark &161; --> +<!ENTITY cent SDATA "=A2" --=3D cent sign &162; --> +<!ENTITY pound SDATA "=A3" --=3D pound sterling sign &163; --> +<!ENTITY curren SDATA "=A4" --=3D general currency sign &164; --> +<!ENTITY yen SDATA "=A5" --=3D yen sign &165; --> +<!ENTITY brvbar SDATA "=A6" --=3D broken (vertical) bar &166; --> +<!ENTITY sect SDATA "=A7" --=3D section sign &167; --> +<!ENTITY umlaut SDATA "=A8" --=3D umlaut (dieresis) &168; --> +<!ENTITY copy SDATA "=A9" --=3D copyright sign &169; --> +<!ENTITY ordf SDATA "=AA" --=3D ordinal indicator, feminine &170; --> +<!ENTITY laquo SDATA "=AB" --=3D angle quotation mark, left &171; --> +<!ENTITY not SDATA "=AC" --=3D not sign &172; --> +<!ENTITY shy SDATA "=AD" --=3D soft hyphen &173;--> +<!ENTITY reg SDATA "=AE" --=3D registered trademark &174; --> +<!ENTITY macron SDATA "=AF" --=3D macron &175; --> +<!ENTITY deg SDATA "=B0" --=3D degree sign &176; --> +<!ENTITY plusmn SDATA "=B1" --=3D plus-or-minus sign &177; --> +<!ENTITY sup2 SDATA "=B2" --=3D superscript two &178; --> +<!ENTITY sup3 SDATA "=B3" --=3D superscript three &179; --> +<!ENTITY acute SDATA "=B4" --=3D acute accent &180; --> +<!ENTITY micro SDATA "=B5" --=3D micro sign &181; --> +<!ENTITY para SDATA "=B6" --=3D pilcrow (paragraph sign) &182; --> +<!ENTITY middot SDATA "=B7" --=3D middle dot (centred decimal point) &183; --> +<!ENTITY cedilla SDATA "=B8" --=3D cedilla accent &184; --> +<!ENTITY sup1 SDATA "=B9" --=3D superscript one --> +<!ENTITY ordm SDATA "=BA" --=3D ordinal indicator, masculine --> +<!ENTITY raquo SDATA "=BB" --=3D angle quotation mark, right --> +<!ENTITY frac14 SDATA "=BC" --=3D fraction one-quarter --> +<!ENTITY frac12 SDATA "=BD" --=3D fraction one-half --> +<!ENTITY frac34 SDATA "=BE" --=3D fraction three-quarters --> +<!ENTITY iquest SDATA "=BF" --=3D inverted question mark --> +<!-- the odd ones tucked in amongs the accented letters --> +<!ENTITY times SDATA "=D7" --=3D multiply sign --> +<!ENTITY divide SDATA "=F7" --=3D divide sign --> + +<!ENTITY amp CDATA "&" -- ampersand --> +<!ENTITY gt CDATA ">" -- greater than --> +<!ENTITY lt CDATA "<" -- less than --> +<!ENTITY quot CDATA """ -- double quote --> + +<!-- + Should the dollar sign and such like also be given entity names? + There are suitable ones around. For example, people using = + + internationalised keyboards in various countries might not be = + + readily able to access some of these characters. + = + + On such grounds, I suggest entity names for these: + ! " # $ % ' ( ) * + , - . / : ; =3D ? [ \ ] ^ _ ` { | } ~ + Lastly, what about &tab; for those whose editors convert all + tabs to spaces? + +-->
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/sgml/html-math.sgml Mon Aug 13 08:46:35 2007 +0200 @@ -0,0 +1,55 @@ + +<!-- all these entities copied from = + + ftp://ifi.uio.no/pub/SGML/ENTITIES/ISOgrk1 --> + +<!ENTITY agr SDATA "[agr ]"--small alpha, Greek--> +<!ENTITY Agr SDATA "[Agr ]"--capital Alpha, Greek--> +<!ENTITY bgr SDATA "[bgr ]"--small beta, Greek--> +<!ENTITY Bgr SDATA "[Bgr ]"--capital Beta, Greek--> +<!ENTITY ggr SDATA "[ggr ]"--small gamma, Greek--> +<!ENTITY Ggr SDATA "[Ggr ]"--capital Gamma, Greek--> +<!ENTITY dgr SDATA "[dgr ]"--small delta, Greek--> +<!ENTITY Dgr SDATA "[Dgr ]"--capital Delta, Greek--> +<!ENTITY egr SDATA "[egr ]"--small epsilon, Greek--> +<!ENTITY Egr SDATA "[Egr ]"--capital Epsilon, Greek--> +<!ENTITY zgr SDATA "[zgr ]"--small zeta, Greek--> +<!ENTITY Zgr SDATA "[Zgr ]"--capital Zeta, Greek--> +<!ENTITY eegr SDATA "[eegr ]"--small eta, Greek--> +<!ENTITY EEgr SDATA "[EEgr ]"--capital Eta, Greek--> +<!ENTITY thgr SDATA "[thgr ]"--small theta, Greek--> +<!ENTITY THgr SDATA "[THgr ]"--capital Theta, Greek--> +<!ENTITY igr SDATA "[igr ]"--small iota, Greek--> +<!ENTITY Igr SDATA "[Igr ]"--capital Iota, Greek--> +<!ENTITY kgr SDATA "[kgr ]"--small kappa, Greek--> +<!ENTITY Kgr SDATA "[Kgr ]"--capital Kappa, Greek--> +<!ENTITY lgr SDATA "[lgr ]"--small lambda, Greek--> +<!ENTITY Lgr SDATA "[Lgr ]"--capital Lambda, Greek--> +<!ENTITY mgr SDATA "[mgr ]"--small mu, Greek--> +<!ENTITY Mgr SDATA "[Mgr ]"--capital Mu, Greek--> +<!ENTITY ngr SDATA "[ngr ]"--small nu, Greek--> +<!ENTITY Ngr SDATA "[Ngr ]"--capital Nu, Greek--> +<!ENTITY xgr SDATA "[xgr ]"--small xi, Greek--> +<!ENTITY Xgr SDATA "[Xgr ]"--capital Xi, Greek--> +<!ENTITY ogr SDATA "[ogr ]"--small omicron, Greek--> +<!ENTITY Ogr SDATA "[Ogr ]"--capital Omicron, Greek--> +<!ENTITY pgr SDATA "[pgr ]"--small pi, Greek--> +<!ENTITY Pgr SDATA "[Pgr ]"--capital Pi, Greek--> +<!ENTITY rgr SDATA "[rgr ]"--small rho, Greek--> +<!ENTITY Rgr SDATA "[Rgr ]"--capital Rho, Greek--> +<!ENTITY sgr SDATA "[sgr ]"--small sigma, Greek--> +<!ENTITY Sgr SDATA "[Sgr ]"--capital Sigma, Greek--> +<!ENTITY sfgr SDATA "[sfgr ]"--final small sigma, Greek--> +<!ENTITY tgr SDATA "[tgr ]"--small tau, Greek--> +<!ENTITY Tgr SDATA "[Tgr ]"--capital Tau, Greek--> +<!ENTITY ugr SDATA "[ugr ]"--small upsilon, Greek--> +<!ENTITY Ugr SDATA "[Ugr ]"--capital Upsilon, Greek--> +<!ENTITY phgr SDATA "[phgr ]"--small phi, Greek--> +<!ENTITY PHgr SDATA "[PHgr ]"--capital Phi, Greek--> +<!ENTITY khgr SDATA "[khgr ]"--small chi, Greek--> +<!ENTITY KHgr SDATA "[KHgr ]"--capital Chi, Greek--> +<!ENTITY psgr SDATA "[psgr ]"--small psi, Greek--> +<!ENTITY PSgr SDATA "[PSgr ]"--capital Psi, Greek--> +<!ENTITY ohgr SDATA "[ohgr ]"--small omega, Greek--> +<!ENTITY OHgr SDATA "[OHgr ]"--capital Omega, Greek--> +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/sgml/html-mcom.dtd Mon Aug 13 08:46:35 2007 +0200 @@ -0,0 +1,494 @@ +<!-- html-mcom.dtd + + Document Type Definition for the HyperText Markup Language (HTML DTD) + with Netscape Communications Corp Extensions + + $Id: html-mcom.dtd,v 1.1.1.1 1996/12/18 03:43:03 steve Exp $ + + Author: Daniel W. Connolly <connolly@w3.org> + See Also: html.decl, ISOlat1.sgml + http://home.netscape.com/assist/net_sites/html_extensions.html + http://www.halsoft.com/sgml/Mozilla/DTD-HOME.html + http://www.hpl.hp.co.uk/people/dsr/html3/Contents.html + + Table addtions by: Mark Gaither (markg@hal.com) 26 Jun 95 +--> + +<!ENTITY % HTML.Version + "-//Netscape Comm. Corp.//DTD HTML//EN" + + -- Typical usage: + + <!DOCTYPE HTML PUBLIC "-//Netscape Comm. Corp.//DTD HTML//EN"> + <html> + ... + </html> + -- + > + + +<!--================== Feature Test Entities ==============================--> + +<!ENTITY % HTML.Recommended "IGNORE" + -- Certain features of the language are necessary for compatibility + with widespread usage, but they may compromise the structural + integrity of a document. This feature test entity enables + a more prescriptive document type definition that eliminates + the above features. + --> + +<![ %HTML.Recommended [ + <!ENTITY % HTML.Deprecated "IGNORE"> +]]> + +<!ENTITY % HTML.Deprecated "INCLUDE" + -- Certain features of the language are necessary for compatibility + with earlier versions of the specification, but they tend + to be used an implemented inconsistently, and their use is + deprecated. This feature test entity enables a document type + definition that eliminates these features. + --> + +<!ENTITY % HTML.Highlighting "INCLUDE"> +<!ENTITY % HTML.Forms "INCLUDE"> + +<!--================== Imported Names =====================================--> + +<!ENTITY % Content-Type "CDATA" + -- meaning a MIME content type, as per RFC1521 + --> + +<!ENTITY % HTTP-Method "GET | POST" + -- as per HTTP specification + --> + +<!ENTITY % URI "CDATA" + -- The term URI means a CDATA attribute + whose value is a Uniform Resource Identifier, + as defined by + "Universal Resource Identifiers" by Tim Berners-Lee + aka http://info.cern.ch/hypertext/WWW/Addressing/URL/URI_Overview.html + aka RFC 1630 + + Note that CDATA attributes are limited by the LITLEN + capacity (1024 in the current version of html.decl), + so that URIs in HTML have a bounded length. + + --> + + +<!-- DTD "macros" --> + +<!ENTITY % heading "H1|H2|H3|H4|H5|H6"> + +<!ENTITY % list " UL | OL | DIR | MENU " > + + +<!--================ Character mnemonic entities ==========================--> + +<!ENTITY % ISOlat1 PUBLIC + "-//IETF//ENTITIES Added Latin 1 for HTML//EN"> +%ISOlat1; + +<!ENTITY amp CDATA "&" -- ampersand --> +<!ENTITY gt CDATA ">" -- greater than --> +<!ENTITY lt CDATA "<" -- less than --> +<!ENTITY quot CDATA """ -- double quote --> + +<!ENTITY reg CDATA "®" -- registered trademark --> +<!ENTITY copy CDATA "©" -- copyright --> + +<!--=================== Text Markup =======================================--> + +<![ %HTML.Highlighting [ + +<!ENTITY % font " TT | B | I | FONT"> + +<!ENTITY % phrase "EM | STRONG | CODE | SAMP | KBD | VAR | CITE | BLINK"> + +<!ENTITY % text "#PCDATA | A | IMG | BR | WBR | NOBR | BASEFONT + | %phrase | %font"> + +<!ENTITY % pre.content "#PCDATA | A | HR | BR | %font | %phrase"> + +<!ELEMENT (%font;|%phrase) - - (%text)+> + +<!ELEMENT basefont - - ANY> + +<!ATTLIST (font|basefont) + SIZE CDATA #REQUIRED -- should be NUTOKEN, using size=plus3, --> +]]> + +<!ENTITY % text "#PCDATA | A | IMG | BR | WBR | NOBR | CENTER"> + +<!ELEMENT BR - O EMPTY> +<!ATTLIST BR + CLEAR (left|right|all) #IMPLIED> + +<!ELEMENT NOBR - - (%text)+> +<!ELEMENT WBR - O EMPTY> + +<!--================== Link Markup ========================================--> + +<![ %HTML.Recommended [ + <!ENTITY % linkName "ID"> +]]> + +<!ENTITY % linkName "CDATA"> + +<!ENTITY % linkType "NAME" + -- a list of these will be specified at a later date --> + +<!ENTITY % linkExtraAttributes + "REL %linkType #IMPLIED -- forward relationship type -- + REV %linkType #IMPLIED -- reversed relationship type + to referent data -- + URN CDATA #IMPLIED -- universal resource number -- + + TITLE CDATA #IMPLIED -- advisory only -- + METHODS NAMES #IMPLIED -- supported public methods of the object: + TEXTSEARCH, GET, HEAD, ... -- + "> + +<![ %HTML.Recommended [ + <!ENTITY % A.content "(%text)+" + -- <H1><a name="xxx">Heading</a></H1> + is preferred to + <a name="xxx"><H1>Heading</H1></a> + --> +]]> + +<!ENTITY % A.content "(%heading|%text)+"> + +<!ELEMENT A - - %A.content -(A)> + +<!ATTLIST A + HREF %URI #IMPLIED + NAME %linkName #IMPLIED + %linkExtraAttributes; + > + +<!--=================== Images ============================================--> + +<!ENTITY % img.alt.default "#IMPLIED" + -- ALT attribute required in Level 0 docs --> + +<!ELEMENT IMG - O EMPTY -- Embedded image --> +<!ATTLIST IMG + SRC %URI; #REQUIRED -- URI of document to embed -- + LOWSRC %URI; #IMPLIED -- low resolution images spec -- + ALT CDATA %img.alt.default; + ALIGN (left|right|center|top|texttop|middle| + absmiddle|baseline|bottom|absbottom) baseline + WIDTH CDATA #IMPLIED + HEIGHT NUMBER #IMPLIED + BORDER NUMBER #IMPLIED + VSPACE NUMBER #IMPLIED + HSPACE NUMBER #IMPLIED + ISMAP (ISMAP) #IMPLIED + > + + +<!--=================== Paragraphs=========================================--> + +<!ENTITY % attrs -- common attributes for elements -- + 'id ID #IMPLIED -- as target for hrefs (link ends) -- + lang CDATA "en.us" -- ISO language, country code -- + class NAMES #IMPLIED -- for subclassing elements --'> + +<!ENTITY % needs -- Attributes for controlling text flow. Used in headers + and other elements to guarantee sufficient room -- + 'clear CDATA "no" -- (left|right|all|no) move down past figures -- + needs CDATA #IMPLIED -- minimum width needed in em"s or pixels -- + -- e.g. "40 em" or "100 pixels" --'> + +<!ELEMENT P - O (%text)+> +<!ATTLIST P + %attrs; + align (left|center|right|justify) #IMPLIED + %needs; -- for control of text flow -- + nowrap (nowrap) #IMPLIED -- disable wordwrap -- + > + +<!--=================== Headings, Titles, Sections ========================--> + +<!ELEMENT HR - O EMPTY -- horizontal rule --> +<!ATTLIST HR + SIZE NUMBER #IMPLIED + WIDTH CDATA #IMPLIED + ALIGN (left|right|center) #IMPLIED + NOSHADE (NOSHADE) #IMPLIED> + +<!ELEMENT ( %heading ) - - (%text;)+> +<!ATTLIST ( %heading ) + %attrs; + align (left|center|right|justify) #IMPLIED + %needs; -- for control of text flow -- + > + + +<!ELEMENT TITLE - - (#PCDATA) + -- The TITLE element is not considered part of the flow of text. + It should be displayed, for example as the page header or + window title. + --> + + +<!--=================== Text Flows ========================================--> + +<![ %HTML.Forms [ + <!ENTITY % block.forms "FORM | TABLE | ISINDEX"> +]]> + +<!ENTITY % block.forms ""> + +<![ %HTML.Deprecated [ + <!ENTITY % preformatted "PRE | XMP | LISTING"> +]]> + +<!ENTITY % preformatted "PRE"> + +<!ENTITY % block "P | %list | DL + | %preformatted + | BLOCKQUOTE | CENTER | %block.forms"> + +<!ENTITY % flow "(%text|%block)*"> + +<!ENTITY % pre.content "#PCDATA | A | HR | BR"> +<!ELEMENT PRE - - (%pre.content)+> + +<!ATTLIST PRE + WIDTH NUMBER #implied + > + +<![ %HTML.Deprecated [ + +<!ENTITY % literal "CDATA" + -- special non-conforming parsing mode where + the only markup signal is the end tag + in full + --> + +<!ELEMENT XMP - - %literal> +<!ELEMENT LISTING - - %literal> +<!ELEMENT PLAINTEXT - O %literal> + +]]> + + +<!--=================== Lists =============================================--> + +<!ELEMENT DL - - (DT*, DD?)+> +<!ATTLIST DL + COMPACT (COMPACT) #IMPLIED> + +<!ELEMENT DT - O (%text)+> +<!ELEMENT DD - O %flow> + +<!ELEMENT (OL|UL) - - (LI)+> +<!ELEMENT (DIR|MENU) - - (LI)+ -(%block)> +<!ATTLIST (UL) + COMPACT (COMPACT) #IMPLIED + TYPE CDATA #IMPLIED + > +<!ATTLIST (OL) + START NUMBER #IMPLIED + COMPACT (COMPACT) #IMPLIED + TYPE CDATA "1" + > + +<!ELEMENT LI - O %flow> +<!ATTLIST LI + TYPE CDATA #IMPLIED + VALUE CDATA #implied> + +<!--=================== Document Body =====================================--> + +<![ %HTML.Recommended [ + <!ENTITY % body.content "(%heading|%block|HR|ADDRESS)*" + -- <h1>Heading</h1> + <p>Text ... + is preferred to + <h1>Heading</h1> + Text ... + --> +]]> + +<!ENTITY % body.content "(%heading | %text | %block | HR | ADDRESS)*"> + +<!ELEMENT BODY O O %body.content> +<!ATTLIST BODY + BACKGROUND %URI; #IMPLIED + BGCOLOR CDATA #IMPLIED + TEXT CDATA #IMPLIED + LINK CDATA #IMPLIED + VLINK CDATA #IMPLIED + ALINK CDATA #IMPLIED + > + +<!ELEMENT BLOCKQUOTE - - %body.content> + +<!ELEMENT CENTER - - %body.content> + +<![ %HTML.Recommended [ + <!ENTITY % address.content "(%text)*"> +]]> +<!ENTITY % address.content "(%text|P)*"> +<!ELEMENT ADDRESS - - %address.content> + + +<!--================ Forms ===============================================--> + +<![ %HTML.Forms [ + +<!ELEMENT FORM - - %body.content -(FORM) +(INPUT|SELECT|TEXTAREA)> +<!ATTLIST FORM + ACTION %URI #REQUIRED + METHOD (%HTTP-Method) GET + ENCTYPE %Content-Type; "application/x-www-form-urlencoded" + > + +<!ENTITY % InputType "(TEXT | PASSWORD | CHECKBOX | + RADIO | SUBMIT | RESET | + IMAGE | HIDDEN )"> +<!ELEMENT INPUT - O EMPTY> +<!ATTLIST INPUT + TYPE %InputType TEXT + NAME CDATA #IMPLIED -- required for all but submit and reset -- + VALUE CDATA #IMPLIED + SRC %URI #IMPLIED -- for image inputs -- + CHECKED (CHECKED) #IMPLIED + SIZE CDATA #IMPLIED -- like NUMBERS, + but delimited with comma, not space -- + MAXLENGTH NUMBER #IMPLIED + ALIGN (top|middle|bottom) #IMPLIED + > + +<!ELEMENT SELECT - - (OPTION+)> +<!ATTLIST SELECT + NAME CDATA #REQUIRED + SIZE NUMBER #IMPLIED + MULTIPLE (MULTIPLE) #IMPLIED + > + +<!ELEMENT OPTION - O (#PCDATA)> +<!ATTLIST OPTION + SELECTED (SELECTED) #IMPLIED + VALUE CDATA #IMPLIED + > + +<!ELEMENT TEXTAREA - - (#PCDATA)> +<!ATTLIST TEXTAREA + NAME CDATA #REQUIRED + ROWS NUMBER #REQUIRED + COLS NUMBER #REQUIRED + > + +]]> + + +<!--================ Document Head ========================================--> + +<!ENTITY % head.link "& LINK*"> + +<![ %HTML.Recommended [ + <!ENTITY % head.nextid ""> +]]> +<!ENTITY % head.nextid "& NEXTID?"> + +<!ENTITY % head.content "TITLE & ISINDEX? & BASE? & META* + %head.nextid + %head.link"> + +<!ELEMENT HEAD O O (%head.content)> + +<!ELEMENT LINK - O EMPTY> +<!ATTLIST LINK + HREF %URI #REQUIRED + %linkExtraAttributes; > + +<!ELEMENT ISINDEX - O EMPTY> +<!ATTLIST ISINDEX + PROMPT CDATA "This is a searchable index. Enter search keywords:"> + +<!ELEMENT BASE - O EMPTY> +<!ATTLIST BASE + HREF %URI; #REQUIRED + > + +<!ELEMENT NEXTID - O EMPTY> +<!ATTLIST NEXTID N %linkName #REQUIRED> + +<!ELEMENT META - O EMPTY -- Generic Metainformation --> +<!ATTLIST META + HTTP-EQUIV NAME #IMPLIED -- HTTP response header name -- + NAME NAME #IMPLIED -- metainformation name -- + CONTENT CDATA #REQUIRED -- associated information -- + > + +<!--================ Tables ===================================--> + + +<!ENTITY % block.align + "align (bleedleft|left|center|right|bleedright|justify) center"> + +<!ELEMENT CAPTION - - (%text;)+ -- table or figure caption --> +<!ATTLIST CAPTION + %attrs; + align (top|bottom|left|right) #IMPLIED + > + +<!ELEMENT TABLE - - (CAPTION?, TR*) -- mixed headers and data --> +<!ATTLIST TABLE + %attrs; + %needs; -- for control of text flow -- + border NUMBER #IMPLIED -- draw borders -- + colspec CDATA #IMPLIED -- column widths and alignment -- + units (em|pixels|relative) em -- units for column widths -- + width CDATA #IMPLIED -- absolute or percentage width -- + %block.align; -- horizontal alignment -- + nowrap (nowrap) #IMPLIED -- don't wrap words -- + cellspacing NUMBER 2 -- insert space between cells -- + cellpadding NUMBER 1 -- pad between cell border and content -- + > + +<!ENTITY % cell "TH | TD"> +<!ENTITY % vertical.align "top|middle|bottom|baseline"> + +<!ELEMENT TR - O (%cell)* -- row container --> +<!ATTLIST TR + %attrs; + align (left|center|right|justify) #IMPLIED + valign (%vertical.align) top -- vertical alignment -- + nowrap (nowrap) #IMPLIED -- don't wrap words -- + > + +<!ELEMENT (%cell) - O %body.content> +<!ATTLIST (%cell) + %attrs; + colspan NUMBER 1 -- columns spanned -- + rowspan NUMBER 1 -- rows spanned -- + align (left|center|right|justify) #IMPLIED + valign (%vertical.align) top -- vertical alignment -- + nowrap (nowrap) #IMPLIED -- don't wrap words -- + width CDATA #IMPLIED -- allow width for cells -- + axis CDATA #IMPLIED -- axis name, defaults to element content -- + axes CDATA #IMPLIED -- comma separated list of axis names -- + > + + +<!--================ Document Structure ===================================--> + +<![ %HTML.Deprecated [ + <!ENTITY % html.content "HEAD, BODY, PLAINTEXT?"> +]]> +<!ENTITY % html.content "HEAD, BODY"> + +<!ELEMENT HTML O O (%html.content)> +<!ENTITY % version.attr "VERSION CDATA #FIXED "%HTML.Version;""> + +<!ATTLIST HTML + %version.attr;-- report DTD version to application -- + > + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/sgml/html-mcoms.dtd Mon Aug 13 08:46:35 2007 +0200 @@ -0,0 +1,36 @@ +<!-- html-mcom.dtd + + Document Type Definition for the HyperText Markup Language (HTML DTD) + with Mosaic Communications Copr Extensions and with strict + validation (HTML Strict DTD). + + $Id: html-mcoms.dtd,v 1.1.1.1 1996/12/18 03:43:04 steve Exp $ + + Author: Daniel W. Connolly <connolly@w3.org> + See Also: html.decl, ISOlat1.sgml + http://home.netscape.com/assist/net_sites/html_extensions.html + http://www.halsoft.com/sgml/Mozilla/DTD-HOME.html + http://www.hpl.hp.co.uk/people/dsr/html3/Contents.html + + Table addtions by: Mark Gaither (markg@hal.com) 26 Jun 95 +--> + +<!ENTITY % HTML.Version + "-//Netscape Comm. Corp. Strict//DTD HTML//EN" + + -- Typical usage: + + <!DOCTYPE HTML PUBLIC "-//Netscape Comm. Corp. Strict//DTD HTML//EN"> + <html> + ... + </html> + -- + > + + +<!--================== Feature Test Entities ==============================--> + +<!ENTITY % HTML.Recommended "INCLUDE"> + +<!ENTITY % html PUBLIC "-//Netscape Comm. Corp.//DTD HTML//EN"> +%html;
--- a/etc/sgml/html-netscape.dtd Mon Aug 13 08:45:53 2007 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1475 +0,0 @@ -<!-- - html3.dtd - - Document Type Definition for the HyperText Markup Language (HTML DTD) - - Draft: Fri 24-Mar-95 09:46:33 - - Author: Dave Raggett <dsr@hplb.hpl.hp.com> - - W3O is developing a testbed browser to provide practical - experience with HTML 3.0 before it becomes a standard. - See: http://www.w3.org/hypertext/WWW/Arena/ - - This is an open process and comments are welcomed on the - www-html mailing list. - - Please use the following MIME content type: - - Content-Type: text/html; version=3.0 - - This will allow clients to distinguish HTML 3.0 from current - HTML documents. This is most easily achieved by saving - files with the extension ".html3" or ".ht3" so that servers - can easily distinguish these files from HTML 2.0 files. - - The entity HTML.Recommended can be used to give a more rigorous - version of the DTD suitable for use with SGML authoring tools. - The default version of the DTD offers a laxer interpretation, - e.g. allowing authors to omit leading <P> elements. You can - switch on the more rigorous version of the DTD by including - the following at the start of your HTML document. - - <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN//" - [ <!ENTITY % HTML.Recommended "INCLUDE"> ] > - - - Design Objectives: - - o Backwards compatibility with 2.0 - - o Tightening up HTML.Recommended and - moving more things to HTML.Deprecated - - o Keep HTML - simple don't compete with CALS - - o Make it practical for people to edit HTML 3.0 - documents directly, i.e. avoid long names. - - o Tables, figures and math from HTML+ - with tweaks based on recent experience - - o Client-side event handling for figures - and graphical form selection menus - - o Add limited presentational controls with - a view to use of linked style sheets - (style overrides are supported) - - o Compatibility with ICADD as per Yuri's suggestions - - HTML 3.0 relies on linked style info to give authors - control over the appearence of documents. Such info is - placed in a linked style sheet, or as overrides in the - HTML document head, using the STYLE element. The generic - CLASS attribute can be used to subclass elements when - you want to use a different style from normal, e.g. you - might use <h2 class=bigcaps> for headers with enlarged - capital letters. Note that the class attribute has a - wider scope than just style changes, e.g. browsers could - provide the means for searching through documents, - restricting search according to element class values. - - The DTD contains a small number of attributes for direct - control of basic alignment parameters; column widths for - tables; support for custom bullets, sequence numbering for - lists and headers; and text flow. These attributes offer - control over appearence which would be inconvenient to - express exclusively via associated style sheets. - - The MD attribute for each hypertext or inline link specifies a - message digest such as MD5 for the linked object and is needed - to ensure someone hasn't tampered with a linked document. - - History: - - 24th March '95 - - Changed ROLE->CLASS for HTML element - Added dummy elements to fix problem with mixed - content models for BODY, BLOCKQUOTE/BQ and FIG - Dropped audio fields from FORMs - Reinstated MIN/MAX for range fields - Reinstated DISABLED and ERROR attributes for fields - - 22nd March '95 - - Changed from em to en units. The latter - is a typographical unit = half point size - Merged NEEDS into CLEAR for control of textflow - - 21st March '95 - - Added REL=Banner to LINK element - Added BANNER element in place of <DIV CLASS=BANNER> - Added RANGE and SPOT elements - Added FN in place of <NOTE ROLE=FOOTNOTE> - Changed ROLE->CLASS for NOTE element - - 17th March '95 - - Fixed bug in PRE content model - Changed external references to omit trailling // - Dropped <!DOCTYPE HTML [ ... ]> wrapper to avoid problems - with "real" sgml parsers - Added NOFLOW attribute to FIG and TABLE - Fixed typo in IMG ALIGN attribute - Made SELECT match IMG for graphic attributes - Added decimal alignment for tabs and table cells - Added ALIGN attribute to TEXTAREA for parity - with IMG and INPUT, including ALIGN=LEFT etc. - - 13th March '95 - - Dropped MARK tag on advice from SGML Open - Allowed spaces in table colspec attribute - Changed ARRAY element - Added CHOOSE tag to BOX element - Cleaned up PRE content model - Obsoleted tags incompatible with SGML - - 6th March '95 - - Added several tags to MATH: %mathface, %mathvec - and improved ROOT, with new SQRT convience tag - - 1st March '95 - - Dropped align attribute from BR element - Added indent attribute to TAB - Added optional CREDIT to end of BQ - Changed FIG to %body.content to allow headers - - 22nd February '95 - - Added align attribute, and dropped before, after, center and right - attributes to clean up TAB element - Added INS and DEL for legal documents - Added CREDIT to end of FIG element - Dropped FN in favor of <NOTE ROLE=FootNote> - - 9th Feburuary '95 - - Dropped base attribute mechanism for scoping relative URLs - Dropped nofold attribute for disabling whitespace folding - Dropped border width attributes for FIG (-> style sheet) - Dropped delims attribute from math BOX element - Dropped stylistic attributes from OL such as inherit (-> stylesheet) - Added baseline to list of valign attribute values for tables. - Added DIV element for generic container class and static banners - Added MARK element for marked range class - Added closed set of LINK REL values for toolbars - Added numbering attributes to headers - Added bullet attributes to headers - Added TERM element to math for style sheet control of term rendering - Changed to imagemap=URI for server-side event handling for FIG/OVERLAY - Changed delimiter attributes for math arrays - Changed ROOT element for maths to allow an arbitrary radix - Simplified numbering attributes for ordered lists - Simplified STYLE element to leave binding to style language ---> - -<!ENTITY % HTML.Version - "-//IETF//DTD HTML Netscape//EN" - - -- Typical usage: - - <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML Netscape//EN"> - <html> - ... - </html> - -- - > - -<!--================== Flags for Marked Sections ==========================--> - -<!ENTITY % HTML.Recommended "IGNORE" - -- Certain features of the language are necessary for compatibility - with widespread usage, but they may compromise the structural - integrity of a document. This feature test entity enables - a more prescriptive document type definition that eliminates - the above features. - --> - -<![ %HTML.Recommended [ - <!ENTITY % HTML.Deprecated "IGNORE"> -]]> - -<!ENTITY % HTML.Deprecated "INCLUDE" - -- Certain features of the language are necessary for compatibility - with earlier versions of the specification, but they tend - to be used an implemented inconsistently, and their use is - deprecated. This feature test entity enables a document type - definition that eliminates these features. - --> - -<!ENTITY % HTML.Obsoleted "IGNORE" - -- The XMP, LISTING and PLAINTEXT tags are incompatible with SGML - and derive from very early versions of HTML. They require non- - standard parsers and will cause problems for processing - documents with standard SGML tools. - --> - -<!--================== Imported Names =====================================--> - -<!ENTITY % Content-Type "CDATA" - -- meaning a MIME content type, as per RFC1521 - --> - -<!ENTITY % HTTP-Method "GET | POST" - -- as per HTTP specification - --> - -<!ENTITY % URI "CDATA" - -- The term URI means a CDATA attribute - whose value is a Uniform Resource Identifier, - as defined by - "Uniform Resource Identifiers" by Tim Berners-Lee - aka http://info.cern.ch/hypertext/WWW/Addressing/URL/URI_Overview.html - aka RFC 1630 - - Note that CDATA attributes are limited by the LITLEN - capacity (1024 in the current version of html.decl), - so that URIs in HTML have a bounded length. - - --> - -<!ENTITY % REAL "CDATA" -- real numbers (not in SGML) --> - -<!ENTITY % SHAPE "CDATA" - -- Shape of hotzone in image. - - All coordinates are assumed to be numbers in the range 0 to 1 - and interpreted as fractional width/height and measured from - the top left corner of the associated image. - - The attribute value is a string taking one of the following forms: - - "default" - - Used to define a default link for the figure background. - - "circle x, y, r" - - (x, y) define the center and r the radius. - - "rect x, y, w, h" - - (x, y) defines upper left, and w and h the width and height. - - "polygon x1, y1, x2, y2, ..." - - Given n pairs of x, y coordinates, the polygon is closed by a - line linking the n'th point to the first. Intersecting polygons - use the non-zero winding number rule to determine if a point lies - inside the polygon.I - -- -> - -<!ENTITY % COLOR "CDATA"> - -<!-- 3.0 Parameter Entities --> - -<!ENTITY % heading "H1|H2|H3|H4|H5|H6"> - -<![ %HTML.Obsoleted [ - <!ENTITY % preformatted "PRE | XMP | LISTING"> -]]> - - -<![ %HTML.Deprecated [ - <!ENTITY % list "UL | OL | DIR | MENU"> - <!ENTITY % blockquote "BLOCKQUOTE | BQ"> -]]> - -<!ENTITY % list "UL | OL"> - -<!ENTITY % blockquote "BQ"> - -<!ENTITY % preformatted "PRE"> - - -<!-- The CLASS attribute is used to subclass HTML elements for - rendering purposes, when used with style sheets, e.g. DSSSL lite --> - -<!ENTITY % attrs -- common attributes for elements -- - 'id ID #IMPLIED -- as target for hrefs (link ends) -- - lang CDATA "en.us" -- ISO language, country code -- - class NAMES #IMPLIED -- for subclassing elements --'> - -<!-- SGML standard forces different NAMES for all attribute values - in the same element, regardless of the attribute name! As a result - CDATA is used for CLEAR attribute to avoid clash with ALIGN attribute.--> - -<!-- -When text flows around a figure or table in the margin, you sometimes want -to start an element like a header, paragraph or list below the figure rather -than alongside it. The CLEAR attribute allows you to move down unconditionally: - - clear=left move down until left margin is clear - clear=right move down until right margin is clear - clear=all move down until both margins are clear - -Alternatively, you can decide to place the element alongside the figure just -so long as there is enough room. The minimum width needed is specified as: - - clear="40 en" move down until there is at least 40 en units free - clear="100 pixels" move down until there is at least 100 pixels free - -The style sheet (or browser defaults) may provide default minimum widths for -each class of block-like elements. ---> - -<!ENTITY % needs -- Attributes for controlling text flow. Used in headers - and other elements to guarantee sufficient room -- - 'clear CDATA #IMPLIED'> - -<!-- - The following attribute may be included where ever a URL can be given: - - md message digest e.g. md="md5:jV2OfH+nnXHU8bnkPAad/mSQlTDZ" - where the digest is base64 encoded and preceded by a prefix - denoting the algorithm (in this case MD5). ---> - -<!ENTITY % url.link -- Attributes associated with URL based links -- - "md CDATA #IMPLIED -- message digest for linked object --"> - -<!--================ Character mnemonic entities ==========================--> - -<!-- The HTML list of Latin-1 entities includes the full range - of characters in widely available Latin-1 fonts, and as such - is a mixture of ISOlat1 and other ISO publishing symbols --> - -<!ENTITY % HTMLlat1 PUBLIC - "-//IETF//ENTITIES Added Latin 1 for HTML//EN"> -%HTMLlat1; - -<!--================ Entities for special symbols =========================--> - -<!ENTITY emsp SDATA "[emsp ]" -- em space --> -<!ENTITY ensp SDATA "[ensp ]" -- en space (1/2-em) --> -<!ENTITY mdash SDATA "[ndash ]" -- em dash --> -<!ENTITY ndash SDATA "[ndash ]" -- en dash (1/2-em) --> -<!ENTITY nbsp SDATA "[nbsp ]" -- non breaking space --> -<!ENTITY shy SDATA "[shy ]" -- soft hyphen --> -<!ENTITY copy SDATA "[copy ]" -- copyright sign --> -<!ENTITY trade SDATA "[trade ]" -- trade mark sign --> -<!ENTITY reg SDATA "[reg ]" -- registered sign --> - -<!--================ Entities for standard icons ==========================--> - -<!-- a range of standard icons such as &folder; for use - in speeding up display of directory listings etc. --> - -<!-- <!ENTITY % HTMLicons PUBLIC --> -<!-- "-//IETF//ENTITIES icons for HTML//EN"> --> -<!-- %HTMLicons; --> - -<!--================ Entities for math symbols ============================--> - -<!-- ISO subset chosen for use with the widely available Adobe math font --> - -<!-- <!ENTITY % HTMLmath PUBLIC --> -<!-- "-//IETF//ENTITIES Math and Greek for HTML//EN"> --> -<!-- %HTMLmath; --> - -<!--=================== Text Markup =======================================--> - -<!ENTITY % font " U | S | TT | I | BIG | SMALL"> - -<!ENTITY % phrase "EM | STRONG | CODE | SAMP | KBD | VAR | CITE | NOBR | CENTER"> - -<!ENTITY % misc "Q | LANG | AU | DFN | PERSON | ACRONYM | ABBREV | INS | DEL"> - -<!ENTITY % special "TAB | MATH | A | IMG | BR | WBR"> - -<!ENTITY % notmath "%font | %phrase | %special | %misc"> - -<!ENTITY % text "#PCDATA | SUB | SUP | B | FONT | %notmath"> - - -<!ENTITY % pre.exclusion "TAB|MATH|IMG|BIG|SMALL|SUB|SUP"> - -<!ELEMENT (%font|B|%phrase|%misc) - - (%text)+> -<!ATTLIST (%font|B|%phrase|%misc) %attrs;> - -<!-- Subscripts and superscripts. The ALIGN attribute is only used for math --> - -<!ELEMENT (SUB|SUP) - - (%text)+> -<!ATTLIST (SUB|SUP) - %attrs; - align (left|center|right) #IMPLIED - > - -<!ELEMENT FONT - - (%text)+> -<!ATTLIST FONT - size NUMBER #IMPLIED - > - -<!ELEMENT BASEFONT - - (%text)+> -<!ATTLIST BASEFONT - size NUMBER #IMPLIED - > - -<!-- Forced line break --> - -<!ELEMENT BR - O EMPTY> -<!ATTLIST BR - %attrs; - %needs; -- for control of text flow -- - > - -<!-- Named left, center and right tab stops (independent of '\t' char) --> - -<!ELEMENT TAB - O EMPTY> -<!ATTLIST TAB - id ID #IMPLIED -- defines named tab stop -- - indent NUMBER 0 -- en units before new tab stop -- - to IDREF #IMPLIED -- jump to named tab stop -- - align (left|center|right|decimal) left - dp CDATA #IMPLIED -- decimal point e.g. dp="," -- - > - -<!ELEMENT NOBR - O (%text)+> - -<!ELEMENT WBR - O EMPTY> - -<!ELEMENT CENTER - O (%text)+> - -<!--================== Link Markup ========================================--> - -<!-- - With HTML 3.0 you can use ID attributes on most elements for named - link ends. The use of the NAME attribute on anchors is deprecated. - - Do we want to support arbitrary elements for link starts? This would - involve adding HREF and related attributes to most elements. ---> - -<![ %HTML.Deprecated [ - <!ENTITY % linkName "name CDATA #IMPLIED -- named link end --"> -]]> - -<!ENTITY % linkName ""> - - -<!ENTITY % ToolBar "home|toc|index|glossary|copyright| - up|previous|next|help|bookmark" - - -- LINK RELationship values which are used to create toolbar - buttons or menu items for navigation, where toc stands - for table of contents and bookmark provides for an open - ended set of links, i.e. you can use multiple bookmarks - for key entry points. Use the optional TITLE attribute - to override default names. - --> - -<!ENTITY % linkType "NAME" - -- A definitive list will be specified at a later date. - - They are used - - a) by stylesheets to control how collections of - html nodes are rendered into printed documents - - b) for document specific toolbars/menus when used - with the LINK element in document head: - - "home|toc|index|glossary|copyright| - up|previous|next|help|bookmark" - - where toc stands for table of contents and - bookmark provides for an open ended set of links, - i.e. you can use several bookmarks for key entry - points. Use the optional TITLE attribute to - override default names. - - c) for hypertext paths or guided tours, - with REL=NODE and REL=PATH. - - d) to make a link to a style sheet, e.g. rel=stylesheet - (used only with the LINK element). - - e) to make a link to a separate banner, e.g. rel=banner - (used only with the LINK element). - --> - - -<!ENTITY % linkExtraAttributes -- URN moved to %url.link -- - "rel %linkType #IMPLIED -- forward relationship type -- - rev %linkType #IMPLIED -- reversed relationship type - to referent data -- - title CDATA #IMPLIED -- advisory only -- - methods NAMES #IMPLIED -- supported public methods of the object: - TEXTSEARCH, GET, HEAD, ... -- - "> - -<![ %HTML.Deprecated [ - <!ENTITY % A.content "(%heading|%text)+"> -]]> - -<!ENTITY % A.content "(%text)+"> - -<!ELEMENT A - - %A.content -(A)> - -<!ATTLIST A - %attrs; - href %URI; #IMPLIED - %url.link; -- standard link attributes -- - %linkName; -- name attribute is deprecated; use ID instead -- - shape %SHAPE; #IMPLIED -- for shaped hotzones in FIGs -- - %linkExtraAttributes; - > - -<!--=================== Images ============================================--> - -<!-- Desired widths are used for negotiating image size - with the module responsible for painting the image. - align=left or right cause image to float to margin - and for subsequent text to wrap around image --> - -<!ELEMENT IMG - O EMPTY -- Embedded image --> -<!ATTLIST IMG - %attrs; - src %URI; #REQUIRED -- URI of image to embed -- - %url.link; -- standard link attributes -- - alt CDATA #IMPLIED -- for display in place of image -- - align - (left|right|top|texttop|middle|absmiddle|baseline|bottom|absbottom) top -- relative to baseline -- - width NUMBER #IMPLIED -- desired width in en's or pixels -- - height NUMBER #IMPLIED -- desired height in en's or pixels -- - border NUMBER #IMPLIED - vspace NUMBER #IMPLIED - hspace NUMBER #IMPLIED - units (en|pixels) pixels -- units for width and height -- - ismap (ismap) #IMPLIED -- pass clicks to server -- - > - -<!--=================== Paragraphs=========================================--> - -<!ELEMENT P - O (%text)+> -<!ATTLIST P - %attrs; - align (left|center|right|justify) #IMPLIED - %needs; -- for control of text flow -- - nowrap (nowrap) #IMPLIED -- disable wordwrap -- - > - -<!--=================== Headings, Titles, Sections ========================--> - -<!ELEMENT HR - O EMPTY -- customizable horizontal rule --> -<!ATTLIST HR - %attrs; - src %URI; #IMPLIED -- URI of custom rule graphic -- - %url.link; -- standard link attributes -- - %needs; -- for control of text flow -- - size NUMBER #IMPLIED -- thickness of rule -- - width NUMBER #IMPLIED -- width of rule -- - align (left|right|center) #IMPLIED -- relative to margin -- - noshade (noshade) #IMPLIED -- fancy shading -- - > - -<!-- - Headers can be numbered, although this is a matter for style sheets. - The style sheet controls the numbering style: - - a) whether the parent numbering is inherited, e.g. 5.i.c - where 5 is the current sequence number for H1 headers, and - 1 is the number for H2 headers and 3 for H3 headers. - - b) what style is used for current sequence number - e.g. arabic, upperalpha, loweralpha, upperroman, lowerroman - or a numbering scheme appropriate for the current language - - The skip attribute is used to skip over sequence numbers for items - which have been left out of the list, e.g. skip=3 advances the - sequence number past 3 omitted items. The seqnum sets the sequence - number to a specified value. Note that the style sheet may take - advantage of the sequence number for higher level headers. - - The dingbat or src attributes may be used to specify a bullet like - image to be placed adjacent to the header. Defining this in the - header element simplifies the document markup and avoids the need - to use the clear or needs attribute in the following element to - prevent it flowing around this image. ---> - -<!ELEMENT ( %heading ) - - (%text;)+> -<!ATTLIST ( %heading ) - %attrs; - align (left|center|right|justify) #IMPLIED - %needs; -- for control of text flow -- - seqnum NUMBER #IMPLIED -- starting sequence number -- - skip NUMBER 0 -- skip seq nums for missing items -- - dingbat ENTITY #IMPLIED -- dingbat entity from HTMLicons -- - src (%URI;) #IMPLIED -- bullet defined by graphic -- - %url.link; -- standard link attributes -- - nowrap (nowrap) #IMPLIED -- disable wordwrap -- - > - -<!ELEMENT TITLE - - (#PCDATA) - -- The TITLE element is not considered part of the flow of text. - It should be displayed, for example as the page header or - window title. - --> - -<!--=================== Text Flows ========================================--> - -<!ENTITY % block - "P | %list | DL - | %preformatted - | %blockquote - | FORM | ISINDEX | FN - | TABLE | FIG | NOTE"> - -<!-- - ((%block)* | (%text)*) would be much nicer as it would avoid the need - for a <P> tag when all you want is a few words of text. The problem - is that it also prevents: "<LI> <P>some text" since it forbids PCDATA - and hence the white space between the <LI> and the <P>. ---> - -<![ %HTML.Recommended [ - <!ENTITY % flow "(%block)*"> -]]> - -<!ENTITY % flow "(%text | %block)*"> - -<!ELEMENT PRE - - (%text)* -(%pre.exclusion)> - -<!ATTLIST PRE - %attrs; - width NUMBER #implied - %needs; -- for control of text flow -- - > - -<![ %HTML.Obsoleted [ - -<!ENTITY % literal "CDATA" - -- special non-conforming parsing mode where - the only markup signal is the end tag - in full. This will cause problems for - standard SGML tools! - --> - -<!ELEMENT XMP - - %literal> -<!ELEMENT LISTING - - %literal> -<!ELEMENT PLAINTEXT - O %literal> - -]]> - -<!--=================== Lists =============================================--> - -<!ELEMENT DL - - (LH?, (DT|DD)+) -- this is perhaps too lax? --> -<!ATTLIST DL - %attrs; - %needs; -- for control of text flow -- - compact (compact) #IMPLIED -- more compact style -- - > - -<!ELEMENT DT - O (%text)+> -<!ELEMENT DD - O %flow;> -<!ATTLIST (DT|DD) - %attrs; - %needs; -- for control of text flow -- - > - - -<!ELEMENT (OL|UL) - - (LH?, LI+) -- should we allow a list header ? --> - -<!-- style sheet controls numbering style - a) whether the parent numbering is inherited, e.g. 5.1.c - b) what style is used for current sequence number - e.g. arabic, upperalpha, loweralpha, upperroman, lowerroman - or a numbering scheme for the current language ---> -<!ATTLIST OL - %attrs; - %needs; -- for control of text flow -- - continue (continue) #IMPLIED -- don't restart sequence number -- - seqnum NUMBER #IMPLIED -- starting sequence number -- - compact (compact) #IMPLIED -- reduced interitem spacing -- - > - -<!-- Unordered lists: - - o single or multicolumn with - horizontal or vertical wrapping - - o plain or bulletted list items - - o bullets can be customised via: - - entities (dingbats in HTMLicons) - - external graphic via URL - - individual attributes on LI tags ---> -<!ATTLIST UL - %attrs; - %needs; -- for control of text flow -- - wrap (vert|horiz|none) none -- multicolumn list style -- - plain (plain) #IMPLIED -- suppress bullets -- - dingbat ENTITY #IMPLIED -- dingbat entity from HTMLicons -- - src (%URI;) #IMPLIED -- bullet defined by graphic -- - %url.link; -- standard link attributes -- - compact (compact) #IMPLIED -- reduced interitem spacing -- - > - -<!ELEMENT LH - O (%text;)+ -- list header --> -<!ATTLIST LH %attrs;> - -<!-- - For unordered lists, you can override the standard bullet with - a custom graphic specified via a URI e.g. src="splash.gif" or - a reference to one of the HTMLicons graphics e.g. dingbat=folder - - The skip attribute is used with ordered lists to skip over sequence - numbers for items which have been left out of the list, e.g. skip=3 - advances the sequence number past 3 omitted items. ---> - -<!ELEMENT LI - O %flow; -- list item --> -<!ATTLIST LI - %attrs; - %needs; -- for control of text flow -- - dingbat ENTITY #IMPLIED -- dingbat entity from HTMLicons -- - src (%URI;) #IMPLIED -- custom bullet graphic -- - %url.link; -- standard link attributes -- - skip NUMBER 0 -- skip seq nums for missing items -- - > - -<!-- DIR and MENU are now subsumed by UL with type=plain. Use the - wrap attribute to control wrapping style for multicolumn lists --> - -<![ %HTML.Deprecated [ - <!ELEMENT (DIR|MENU) - - (LI)+ -(%block)> - <!ATTLIST (DIR|MENU) - compact (compact) #IMPLIED> -]]> - -<!--=================== Document Body =====================================--> - -<![ %HTML.Recommended [ - <!ENTITY % body.content "(DIV|%heading|%block|HR|ADDRESS)*" - -- <h1>Heading</h1> - <p>Text ... - is preferred to - <h1>Heading</h1> - Text ... - --> -]]> - -<!ENTITY % body.content "(DIV | %heading | %text | %block | HR | ADDRESS)*"> - -<!ELEMENT BODY O O (BANNER?, BODYTEXT) +(SPOT)> -<!ATTLIST BODY - %attrs; - background %URI; #IMPLIED -- texture tile for document background -- - bgcolor %COLOR; #IMPLIED - text %COLOR; #IMPLIED - link %COLOR; #IMPLIED - vlink %COLOR; #IMPLIED - alink %COLOR; #IMPLIED - > - -<!ELEMENT BODYTEXT O O %body.content -- dummy element --> - -<!-- - The BANNER element is used for a banner section which appears at - the top of the window and doesn't scroll with window contents. - This can be used for corporate logos, copyright statements and - disclaimers, as well as customized navigation/search controls. ---> -<!ELEMENT BANNER - - %body.content> -<!ATTLIST BANNER %attrs; > - -<!-- SPOT is used to insert IDs at arbitrary places - e.g. for end points of a marked range (see RANGE) --> -<!ELEMENT SPOT - O EMPTY> -<!ATTLIST SPOT id ID #REQUIRED> - -<!ELEMENT (%blockquote) - - (BODYTEXT, CREDIT?)> -<!ATTLIST (%blockquote) - %attrs; - %needs; -- for control of text flow -- - nowrap (nowrap) #IMPLIED -- disable wordwrap -- - > - -<!ENTITY % address.content "((%text;)* | P*)"> - -<!ELEMENT ADDRESS - - %address.content> -<!ATTLIST ADDRESS - %attrs; - %needs; -- for control of text flow -- - > - -<!-- - DIV can be used with the CLASS attribute to represent different - kinds of container, e.g. chapter, section, abstract, appendix. ---> - -<!ELEMENT DIV - - %body.content> -<!ATTLIST DIV - %attrs; - %needs; -- for control of text flow -- - align (left|center|right) left -- alignment of following text -- - nowrap (nowrap) #IMPLIED -- disable wordwrap -- - > - -<!--================ Forms ===============================================--> - -<!-- - As HTML 2.0 plus a few extensions: - - a) A RANGE control which varies between pair of values - specified with the size attribute, e.g. SIZE="1, 10" - - b) FILE widget for uploading one or more files to a server - - c) SCRIBBLE on image widget that sends the "ink" to the server - - d) SUBMIT/RESET buttons can now be customised with an image. - This subsumes the IMAGE type which is now deprecated. - - e) Graphical SELECTion menus are now supported, using - the new SHAPE attribute on OPTION elements. - - Further extensions are in the pipeline (e.g. table entry, - multiple data formats for textarea fields and client-side - scripts with custom widgets) but will have to wait until - the backlog of implementation work diminishes. ---> - -<!ELEMENT FORM - - %body.content -(FORM) +(INPUT|SELECT|TEXTAREA)> -<!ATTLIST FORM - action %URI #REQUIRED -- server-side form handler -- - method (%HTTP-Method) GET -- see HTTP specification -- - enctype %Content-Type; "application/x-www-form-urlencoded" - script %URI #IMPLIED -- link to client-side script -- - > - -<![ %HTML.Deprecated [ - <!ENTITY % InputType "(TEXT | PASSWORD | CHECKBOX | RADIO | SUBMIT - | RESET | RANGE | FILE | SCRIBBLE | HIDDEN | IMAGE)"> -]]> - -<!ENTITY % InputType "(TEXT | PASSWORD | CHECKBOX | RADIO | SUBMIT - | RESET | RANGE | FILE | SCRIBBLE | HIDDEN)"> - -<!ELEMENT INPUT - O EMPTY> -<!ATTLIST INPUT - %attrs; - type %InputType TEXT - name NAME #IMPLIED -- required for all but submit and reset -- - value CDATA #IMPLIED -- required for radio buttons & checkboxes -- - disabled (disabled) #IMPLIED -- read-only fields -- - error CDATA #IMPLIED -- why field is in error -- - checked (checked) #IMPLIED -- for radio buttons and check boxes -- - size NUMBER #IMPLIED -- visible width of TEXT fields -- - maxlength NUMBER #IMPLIED -- max number of chars for TEXT fields -- - min %REAL #IMPLIED -- lower limit for RANGE fields -- - max %REAL #IMPLIED -- upper limit for RANGE fields -- - accept CDATA #IMPLIED -- list of MIME types for file fields -- - src %URI #IMPLIED -- for fields with background images -- - %url.link; -- standard link attributes -- - align (top|middle|bottom|left|right) top - > - -<!-- - SRC attribute added for graphical selection menus - The WIDTH, HEIGHT and UNITS attributes apply to the - image specified by the SRC attribute. - --> - -<!ELEMENT SELECT - - (OPTION+) -(INPUT|TEXTAREA|SELECT)> -<!ATTLIST SELECT - %attrs; - name CDATA #REQUIRED - multiple (multiple) #IMPLIED - disabled (disabled) #IMPLIED -- read-only menu -- - error CDATA #IMPLIED -- why selections are in error -- - src %URI #IMPLIED -- for graphical selection menus -- - %url.link; -- standard link attributes -- - width NUMBER #IMPLIED -- desired width of in en's or pixels -- - height NUMBER #IMPLIED -- desired height in en's or pixels -- - units (en|pixels) pixels -- units for width and height -- - align (top|middle|bottom|left|right) top - > - -<!ELEMENT OPTION - O (#PCDATA)> -<!ATTLIST OPTION - %attrs; - selected (selected) #IMPLIED - value CDATA #IMPLIED -- default to element content -- - shape %SHAPE; #IMPLIED -- for graphical selection menus -- - disabled (disabled) #IMPLIED -- unselectable option -- - error CDATA #IMPLIED -- why this choice is in error -- - > - -<!-- - Multi-line text input field. align=left or right - causes the field to float to margin and for - subsequent text to wrap around the field. ---> - -<!ELEMENT TEXTAREA - - (#PCDATA) -(INPUT|TEXTAREA|SELECT)> -<!ATTLIST TEXTAREA - %attrs; - name CDATA #REQUIRED - rows NUMBER #REQUIRED - cols NUMBER #REQUIRED - disabled (disabled) #IMPLIED -- read-only field -- - error CDATA #IMPLIED -- why field is in error -- - align (top|middle|bottom|left|right) top - > - -<!--======================= Captions ======================================--> - -<!ELEMENT CAPTION - - (%text;)+ -- table or figure caption --> -<!ATTLIST CAPTION - %attrs; - align (top|bottom|left|right) #IMPLIED - > -<!--======================= Tables ========================================--> - -<!-- - Tables and figures can be aligned in several ways: - - bleedleft flush left with the left (window) border - left flush left with the left text margin - center centered (text flow is disabled for this mode) - right flush right with the right text margin - bleedright flush right with the right (window) border - justify when applicable the table/figure should stretch - to fill space between the text margins - - Note: text will flow around the table or figure if the browser - judges there is enough room and the alignment is not centered - or justified. The table or figure may itself be part of the - text flow around some earlier figure. You can in this case use - the clear or needs attributes to move the new table or figure - down the page beyond the obstructing earlier figure. Similarly, - you can use the clear or needs attributes with other elements - such as headers and lists to move them further down the page. ---> - -<!ENTITY % block.align - "align (bleedleft|left|center|right|bleedright|justify) center"> - -<!-- - The HTML 3.0 table model has been chosen for its simplicity - and the ease in writing filters from common DTP packages. - - By default the table is automatically sized according to the - cell contents and the current window size. Specifying the columns - widths using the colspec attribute allows browsers to start - displaying the table without having to wait for last row. - - The colspec attribute is a list of column widths and alignment - specifications. The columns are listed from left to right with - a capital letter followed by a number, e.g. COLSPEC="L20 C8 L40". - The letter is L for left, C for center, R for right alignment of - cell contents. J is for justification, when feasible, otherwise - this is treated in the same way as L for left alignment. - Column entries are delimited by one or more space characters. - - The number specifies the width in en's, pixels or as a - fractional value of the table width, as according to the - associated units attribute. This approach is more compact - than used with most SGML table models and chosen to simplify - hand entry. The width attribute allows you to specify the - width of the table in pixels, en units or as a percentage - of the space between the current left and right margins. - - To assist with rendering to speech, row and column headers - can be given short names using the AXIS attribute. The AXES - attribute is used to explicitly specify the row and column - names for use with each cell. Otherwise browsers can follow - up columns and left along rows (right for some languages) - to find the corresponding header cells. - - Table content model: Braille limits the width of tables, - placing severe limits on column widths. User agents need - to render big cells by moving the content to a note placed - before the table. The cell is then rendered as a link to - the corresponding note. - - To assist with formatting tables to paged media, authors - can differentiate leading and trailing rows that are to - be duplicated when splitting tables across page boundaries. - The recommended way is to subclass rows with the CLASS attribute - For example: <TR CLASS=Header>, <TR CLASS=Footer> are used for - header and footer rows. Paged browsers insert footer rows at - the bottom of the current page and header rows at the top of - the new page, followed by the remaining body rows. ---> - -<!ELEMENT TABLE - - (CAPTION?, TR*) -- mixed headers and data --> -<!ATTLIST TABLE - %attrs; - %needs; -- for control of text flow -- - border (border) #IMPLIED -- draw borders -- - colspec CDATA #IMPLIED -- column widths and alignment -- - units (en|pixels|relative) en -- units for column widths -- - dp CDATA #IMPLIED -- decimal point e.g. dp="," -- - width NUMBER #IMPLIED -- absolute or percentage width -- - %block.align; -- horizontal alignment -- - noflow (noflow) #IMPLIED -- noflow around table -- - nowrap (nowrap) #IMPLIED -- don't wrap words -- - > - -<!ENTITY % cell "TH | TD"> -<!ENTITY % horiz.align "left|center|right|justify"> -<!ENTITY % vert.align "top|middle|bottom|baseline"> - -<!-- - Browsers should tolerate an omission of the first <TR> - tag as it is implied by the context. Missing trailing - <TR>s implied by rowspans should be ignored. - - The alignment attributes act as defaults for rows - overriding the colspec attribute and being in turn - overridden by alignment attributes on cell elements. - Use valign=baseline when you want to ensure that text - in different cells on the same row is aligned on the - same baseline regardless of fonts. It only applies - when the cells contain a single line of text. ---> - -<!ELEMENT TR - O (%cell)* -- row container --> -<!ATTLIST TR - %attrs; - align (%horiz.align) #IMPLIED -- horizontal alignment -- - valign (%vert.align) top -- vertical alignment -- - dp CDATA #IMPLIED -- decimal point e.g. dp="," -- - nowrap (nowrap) #IMPLIED -- don't wrap words -- - > - -<!-- - Note that table cells can include nested tables. - Missing cells are considered to be empty, while - missing rows should be ignored, i.e. if a cell - spans a row and there are no further TR elements - then the implied row should be ignored. ---> - -<!ELEMENT (%cell) - O %body.content> -<!ATTLIST (%cell) - %attrs; - colspan NUMBER 1 -- columns spanned -- - rowspan NUMBER 1 -- rows spanned -- - align (%horiz.align) #IMPLIED -- horizontal alignment -- - valign (%vert.align) top -- vertical alignment -- - dp CDATA #IMPLIED -- decimal point e.g. dp="," -- - nowrap (nowrap) #IMPLIED -- don't wrap words -- - axis CDATA #IMPLIED -- axis name, defaults to element content -- - axes CDATA #IMPLIED -- comma separated list of axis names -- - > - -<!--====================== Figures ========================================--> - -<!-- - The element contains text for use in non-graphical displays. Note that - you can use the shape attribute in anchors to specify hotzones on images. - This provides for local processing of pointer clicks and a unified method - for dealing with graphical and non-graphical displays. - - Text is flowed around figures when the figure is left or right aligned. - You can request the browser to move down until there is enough room for - the next element, see the CLEAR and NEED attributes (in %needs) - - Figures offer a path towards embedding arbitrary information formats - via some kind of OLE/OpenDoc mechanism. ---> - -<!ELEMENT FIG - - (OVERLAY*, CAPTION?, FIGTEXT, CREDIT?) -(FIG|IMG)> -<!ATTLIST FIG - %attrs; - %needs; -- for control of text flow -- - src %URI; #REQUIRED -- URI of document to embed -- - %url.link; -- standard link attributes -- - %block.align; -- horizontal alignment -- - noflow (noflow) #IMPLIED -- noflow around figure -- - width NUMBER #IMPLIED -- desired width in units -- - height NUMBER #IMPLIED -- desired height in units -- - units (en|pixels) pixels -- specifies units as en's or pixels -- - imagemap (%URI) #IMPLIED -- pass background clicks to server -- - > - -<!ELEMENT FIGTEXT O O %body.content -- dummy element --> - -<!-- - Figure overlays. When combined with local caching, overlays - provide a cheap way of modifying a larger base image sent as - part of a previous page. ---> - -<!ELEMENT OVERLAY - O EMPTY -- image overlay --> -<!ATTLIST OVERLAY - src %URI; #REQUIRED -- URI of image overlay -- - %url.link; -- standard link attributes -- - units (en|pixels) pixels -- specifies units as en's or pixels -- - x NUMBER 0 -- offset from left in units -- - y NUMBER 0 -- offset from top in units -- - width NUMBER #IMPLIED -- desired width in units -- - height NUMBER #IMPLIED -- desired height in units -- - imagemap (%URI) #IMPLIED -- pass background clicks to server -- - > - -<!ELEMENT CREDIT - - (%text;)* -- source of image --> -<!ATTLIST CREDIT - %attrs; - > - -<!--======================== Notes ========================================--> - -<!-- -The NOTE element is used for admonishments. The CLASS attribute -is used to differentiate NOTE's, e.g. Note, Caution or Warning. ---> - -<!ELEMENT NOTE - - %body.content; -- admonishment --> -<!ATTLIST NOTE - %attrs; - src %URI; #IMPLIED -- URI of custom graphic -- - %url.link; -- standard link attributes -- - %needs; -- for control of text flow -- - > - -<!--======================== Footnotes ====================================--> - -<!-- -Typically rendered as popup note. These elements are referenced -by hypertext links specified with the anchor element. ---> -<!ELEMENT FN - - %body.content;> -<!ATTLIST FN %attrs;> - -<!--======================== Math ========================================--> - -<!-- Use     etc for greater control of spacing. --> - -<!-- Subscripts and Superscripts - - <SUB> and <SUP> are used for subscripts and superscripts. - - i j - X <SUP>i</SUP>Y<SUP>j</SUP> is X Y - - i.e. the space following the X disambiguates the binding. - The align attribute can be used for horizontal alignment, - e.g. to explicitly place an index above an element: - i - X<sup align=center>i</sup> produces X - -Short references are defined for superscripts, subscripts and boxes -to save typing when manually editing HTML math, e.g. - - x^2^ is mapped to x<sup>2</sup> - y_z_ is mapped to y<sub>z</sub> - {a+b} is mapped to <box>a + b</box> - -Note that these only apply within the MATH element and can't be -used in normal text! ---> -<!ENTITY REF1 STARTTAG "SUP"> -<!ENTITY REF2 ENDTAG "SUP"> -<!ENTITY REF3 STARTTAG "SUB"> -<!ENTITY REF4 ENDTAG "SUB"> -<!ENTITY REF5 STARTTAG "BOX"> -<!ENTITY REF6 ENDTAG "BOX"> - -<!USEMAP MAP1 MATH> -<!USEMAP MAP2 SUP> -<!USEMAP MAP3 SUB> -<!USEMAP MAP4 BOX> - -<!SHORTREF MAP1 "^" REF1 - "_" REF3 - "{" REF5 > - -<!SHORTREF MAP2 "^" REF2 - "_" REF3 - "{" REF5 > - -<!SHORTREF MAP3 "_" REF4 - "^" REF1 - "{" REF5 > - -<!SHORTREF MAP4 "}" REF6 - "^" REF1 - "_" REF3 - "{" REF5 > - -<!-- - The inclusion of %math and exclusion of %notmath is used here - to alter the content model for the B, SUB and SUP elements, - to limit them to formulae rather than general text elements. ---> - -<!ENTITY % mathvec "VEC|BAR|DOT|DDOT|HAT|TILDE" -- common accents --> -<!ENTITY % mathface "B|T|BT" -- control of font face --> -<!ENTITY % math "BOX|ABOVE|BELOW|%mathvec|ROOT|SQRT|ARRAY|SUB|SUP|%mathface"> -<!ENTITY % formula "#PCDATA|%math"> - -<!ELEMENT MATH - - (#PCDATA)* -(%notmath) +(%math)> -<!ATTLIST MATH - id ID #IMPLIED - class NAMES #IMPLIED -- e.g. class=chem --> - -<!-- The BOX element acts as brackets. Delimiters are optional and - stretch to match the height of the box. The OVER element is used - when you want a line between numerator and denominator. This line - is suppressed with the alternative ATOP element. CHOOSE acts like - ATOP but adds enclosing round brackets as a convenience for binomial - coefficients. Note the use of { and } as shorthand for <BOX> and - </BOX> respectively: - - 1 + X - {1 + X<OVER>Y} is _______ - Y - - a + b - {a + b<ATOP>c - d} is - c - d - - The delimiters are represented using the LEFT and RIGHT - elements as in: - - {[<LEFT>x + y<RIGHT>]} is [ x + y ] - {(<LEFT>a<RIGHT>]} is (a] - {||<LEFT>a<RIGHT>||} is || a || - - Use { and } for "{" and "}" respectively as - these symbols are used as shorthand for BOX, e.g. - - {{<LEFT>a+b<RIGHT>}} is {a+b} - - You can stretch definite integrals to match the integrand, e.g. - - {∫<SUB>a</SUB><SUP>b</SUP><LEFT>{f(x)<over>1+x} dx} - - b - / f(x) - | ----- dx - / 1 + x - a - - Note the complex content model for BOX is a work around - for the absence of support for infix operators in SGML. - - You can get oversize delimiters with the SIZE attribute, - for example <BOX SIZE=large>(<LEFT>...<RIGHT>)</BOX> - - Note that the names of common functions are recognized - by the parser without the need to use "&" and ";" around - them, e.g. int, sum, sin, cos, tan, ... ---> - -<!ELEMENT BOX - - ((%formula)*, (LEFT, (%formula)*)?, - ((OVER|ATOP|CHOOSE), (%formula)*)?, - (RIGHT, (%formula)*)?)> -<!ATTLIST BOX - size (normal|medium|large|huge) normal -- oversize delims --> - -<!ELEMENT (OVER|ATOP|CHOOSE|LEFT|RIGHT) - O EMPTY> - -<!-- Horizontal line drawn ABOVE contents - The symbol attribute allows authors to supply - an entity name for an accent, arrow symbol etc. - Generalisation of LaTeX's overline command. - - e.g. <above sym=ssmile>x</above> - places an upwardly turning curve above the "x" - --> - -<!ELEMENT ABOVE - - (%formula)+> -<!ATTLIST ABOVE sym ENTITY #IMPLIED> - -<!-- Horizontal line drawn BELOW contents - The symbol attribute allows authors to - supply an entity name for an arrow symbol etc. - Generalisation of LaTeX's underline command. - --> - -<!ELEMENT BELOW - - (%formula)+> -<!ATTLIST BELOW sym ENTITY #IMPLIED> - -<!-- Convenience tags for common accents: - vec, bar, dot, ddot, hat and tilde ---> - -<!ELEMENT (%mathvec) - - (%formula)+> - -<!-- - T and BT are used to designate terms which should - be rendered in an upright font (& bold face for BT) ---> - -<!ELEMENT (T|BT) - - (%formula)+> -<!ATTLIST (T|BT) class NAMES #IMPLIED> - -<!-- Roots e.g. <ROOT>3<OF>1+x</ROOT> --> - -<!ELEMENT ROOT - - ((%formula)+, OF, (%formula)+)> -<!ELEMENT OF - O (%formula)* -- what the root applies to --> - -<!ELEMENT SQRT - - (%formula)* -- square root convenience tag --> - -<!-- LaTeX like arrays. The COLDEF attribute specifies - a single capital letter for each column determining - how the column should be aligned, e.g. coldef="CCC" - - "L" left - "C" center - "R" right - - An optional separator letter can occur between columns - and should be one of + - or =, e.g. "C+C+C+C=C". - Whitespace within coldef is ignored. By default, the - columns are all centered. - - The ALIGN attribute alters the vertical position of the - array as compared with preceding and following expressions. - - Use LDELIM and RDELIM attributes for delimiter entities. - When the LABELS attribute is present, the array is - displayed with the first row and the first column as - labels displaced from the other elements. In this case, - the first element of the first row should normally be - left blank. - - Use &vdots; &cdots; and &ddots; for vertical, horizontal - and diagonal ellipsis dots. Use &dotfill; to fill an array - cell with horizontal dots (e.g. for a full row). - Note &ldots; places the dots on the baseline, while &cdots; - places them higher up. ---> - -<!ELEMENT ARRAY - - (ROW)+> -<!ATTLIST ARRAY - align (top|middle|bottom) middle -- vertical alignment -- - coldef CDATA #IMPLIED -- column alignment and separator -- - ldelim CDATA #IMPLIED -- stretchy left delimiter -- - rdelim CDATA #IMPLIED -- stretchy right delimiter -- - labels (labels) #IMPLIED -- TeX's \bordermatrix style --> - -<!ELEMENT ROW - O (ITEM)*> -<!ELEMENT ITEM - O (%formula)*> -<!ATTLIST ITEM - align CDATA #IMPLIED -- override coldef alignment -- - colspan NUMBER 1 -- merge columns as per TABLE -- - rowspan NUMBER 1 -- merge rows as per TABLE --> - -<!--================ Document Head ========================================--> - -<![ %HTML.Deprecated [ - <!ENTITY % head.content "TITLE & ISINDEX? & BASE? & STYLE? - & META* & LINK* & RANGE* & NEXTID?"> -]]> - -<!ENTITY % head.nextid ""> - -<!ENTITY % head.content "TITLE & ISINDEX? & BASE? & STYLE? - & META* & LINK* & RANGE*"> - -<!ELEMENT HEAD O O (%head.content)> - -<!ELEMENT LINK - O EMPTY> -<!ATTLIST LINK - href %URI #REQUIRED - %linkExtraAttributes; > - -<!ELEMENT RANGE - O EMPTY> -<!ATTLIST RANGE - id ID #IMPLIED -- for naming marked range -- - class NAMES #IMPLIED -- for subclassing -- - from IDREF #REQUIRED -- start of marked range -- - until IDREF #REQUIRED -- end of marked range -- - > - -<!ELEMENT ISINDEX - O EMPTY> -<!ATTLIST ISINDEX - href %URI #IMPLIED -- server handling queries -- - prompt CDATA #IMPLIED -- prompt message --> - -<!-- - The BASE element gives the base URL for - dereferencing relative URLs, e.g. - - <BASE href="http://foo.com/images"> - ... - <IMG SRC="bar.gif"> - - The image is deferenced to - - http://foo.com/images/bar.gif ---> - -<!ELEMENT BASE - O EMPTY> -<!ATTLIST BASE - id ID #IMPLIED - href %URI; #REQUIRED - > - -<![ %HTML.Deprecated [ - <!ELEMENT NEXTID - O EMPTY> - <!ATTLIST NEXTID N CDATA #REQUIRED> -]]> - -<!ELEMENT META - O EMPTY -- Generic Metainformation --> -<!ATTLIST META - http-equiv NAME #IMPLIED -- HTTP response header name -- - name NAME #IMPLIED -- metainformation name -- - content CDATA #REQUIRED -- associated information -- - > - -<!-- - A style sheet can be associated with the document using the - LINK element, e.g. <LINK rel=style href="housestyle.dsssl">. - Style overrides can be placed in the document head using the - STYLE element, e.g. - - <style notation=dsssl-lite> - dsss-lite stuff - </style> - - Later on in the document you can use: - - <h2 class=bigcaps>Header with bigger than normal capitals</h2> - <p class=abstract>A paragraph with a unique style of its own - ... - - Statements in the given style notation - - The tag names, class and id attributes are used in the style sheet - notation to describe how to render matching elements. ---> - -<!ENTITY % style-notations "dsssl-lite | w3c-style"> -<!NOTATION dsssl-lite PUBLIC - "ISO/IEC 10179:1995//NOTATION DSSSL Style Language//EN"> - -<!NOTATION w3c-style PUBLIC "IETF/RFC nnn/W3C Style Language//EN"> - -<!ELEMENT STYLE - O (#PCDATA)> -<!ATTLIST STYLE - notation NOTATION (%style-notations;) #REQUIRED -> - -<!--================ Document Structure ===================================--> - -<!ENTITY % html.content "HEAD, BODY"> - -<!ELEMENT HTML O O (%html.content)> -<!ENTITY % version.attr 'VERSION CDATA #FIXED "&HTML.Version;"'> - -<!-- suggested roles are: TOC, DOC, DOCPART, HITLIST, DIALOG --> - -<!ATTLIST HTML - %version.attr; -- report DTD version to application -- - urn CDATA #IMPLIED -- universal resource name for this document -- - class NAMES #IMPLIED -- role of this document, eg table of contents -- - > - -<!-- The END -->
--- a/etc/sgml/html-plus+.dtd Mon Aug 13 08:45:53 2007 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,545 +0,0 @@ -<!DOCTYPE HTMLPLUS [ - -<!-- DTD for HTML+ It assumes the default <!SGML> declaration. - - Markup minimisation should be avoided with the exception of </> - for the endtag. Browsers should be forgiving of markup errors. - - Common Attributes: - - id The id attribute allows authors to name elements such as - headers and paragraphs as potential destinations for links. - Note links don't specify points, but rather extended objects. - - index Allows authors to specify how given headers etc should be - indexed as primary or secondary keys, where "/" separates - primary from secondary keys ";" separates multiple entries ---> - -<!-- ENTITY DECLARATIONS with <!ENTITY> - - <!ENTITY % foo "X | Y | Z"> is a macro definition for parameters and - in subsequent statements, the string "%foo;" is expanded to "X | Y | Z" - - Various classes of SGML text types: - - #CDATA text which doesn't include markup or entity references - - #RCDATA text with entity references but no markup - - #PCDATA text occurring in a context in which markup and entity - references may occur. ---> - -<!ENTITY % URL "CDATA" -- a URL or URN designating a hypertext node --> -<!ENTITY % text "#PCDATA|A|IMG|EM|EMBED|INPUT|SP|BR|ADDRESS|CHANGED"> -<!ENTITY % paras "P|PRE|FIG|HR"> -<!ENTITY % lists "UL|OL|DL"> -<!ENTITY % misc "TBL|FORM|PANEL|GROUP"> -<!ENTITY % heading "H1|H2|H3|H4|H5|H6"> -<!ENTITY % table "%text;|P|%heading;|%lists;"> -<!ENTITY % main "%heading;|%misc;|%lists;|%paras;|%text;"> -<!ENTITY % setup "(TITLE? & HTML? &ISINDEX? & NEXTID? & LINK* & BASE?)"> - -<!-- - <!ELEMENT tagname - - CONTENT> elements needing closing tags - <!ELEMENT tagname - O CONTENT> elements without closing tags - <!ELEMENT tagname - O EMPTY> elements without content or closing tags - - The content definition is: - a) an entity reference as defined above - b) a tagname - c) (brackets enclosing the above) - - These may be combined with the operators: - - A* A occurs zero or more times - A+ A occurs one or more times - AÝB implies either A or B - A? A may occur zero or one times - A,B implies first A then B ---> - -<!ELEMENT HTMLPLUS O O ((HEAD, BODY) | ((%setup;), (%main;)*))> - -<!ELEMENT HEAD - - (%setup;)> - -<!ELEMENT BODY - - (%main;)*> - -<!-- Document title --> - -<!ELEMENT TITLE - - (#PCDATA | EM)+> -<!ATTLIST TITLE - id ID #IMPLIED -- link destination -- - index CDATA #IMPLIED -- entries for index compilation --> - -<!-- Document/Node role for cataloging documents held by servers --> - -<!ELEMENT HTML - O (EMPTY)> - -<!ATTLIST HTML role CDATA #IMPLIED -- home page, index, ... --> - -<!-- Floating panel which can be moved around relative to the normal text - flow. Often rendered with a different background and possibly framed. The - panel can be anchored to a named point in the document as specified by the - AT attribute. The panel may be placed at that point or after, but not - before. ---> - -<!ELEMENT PANEL - - (TITLE?, (%main;)*)> - -<!ATTLIST PANEL - id ID #IMPLIED -- defines link destination -- - at IDREF #IMPLIED -- anchor point -- - index CDATA #IMPLIED -- entries for index compilation --> - -<!-- Document headers --> - -<!ELEMENT (%heading;) - - (#PCDATA | A | EM)+> - -<!ATTLIST (%heading;) - id ID #IMPLIED -- defines link destination -- - index CDATA #IMPLIED -- entries for index compilation --> - -<!-- logical emphasis with optional style hints --> - -<!ELEMENT EM - - (%text;)*> - -<!ATTLIST EM - role CDATA #IMPLIED -- semantic category e.g. CITE -- - b (b) #IMPLIED -- render in bold font -- - i (i) #IMPLIED -- render in italic font -- - u (u) #IMPLIED -- underline text -- - tt (tt) #IMPLIED -- render in typewriter font -- - tr (tr) #IMPLIED -- render in serif (Times Roman) font -- - hv (hv) #IMPLIED -- render in sans serif (Helvetica) font -- - sup (sup) #IMPLIED -- superscript -- - sub (sub) #IMPLIED -- subscript -- - index CDATA #IMPLIED -- entries for index compilation --> - -<!-- Paragraphs with different roles and optional style hints --> - -<!ELEMENT P - O (%text;)+> - -<!ATTLIST P - id ID #IMPLIED -- link destination -- - role CDATA #IMPLIED -- semantic role -- - align CDATA #IMPLIED -- left, center or right -- - indent (indent) #IMPLIED -- indented margins -- - index CDATA #IMPLIED -- entries for index compilation --> - -<!ELEMENT HR - O EMPTY -- horizontal rule --> - -<!ELEMENT BR - O EMPTY -- line break --> - -<!ELEMENT SP - O EMPTY -- unbreakable space --> - -<!-- Preformatted text with fixed pitch font, respecting original spacing - and newlines. Authors can also request proportional fonts. Further control - is possible with EM. ---> - -<!ELEMENT ADDRESS - - (%text;|P)+> - -<!ELEMENT PRE - - (%text;)+> - -<!ATTLIST PRE - id ID #IMPLIED -- link destination -- - style CDATA #IMPLIED -- various styles -- - tr (tr) #IMPLIED -- serif (Times Roman) font -- - hv (hv) #IMPLIED -- sans serif (Helvetica) font -- - width NUMBER #IMPLIED -- e.g. 40, 80, 132 -- - index CDATA #IMPLIED -- entries for index compilation --> - -<!-- Lists which can be nested --> - -<!ELEMENT OL - - (LI | UL | OL)+ -- ordered list --> - -<!ATTLIST OL - id ID #IMPLIED - compact (compact) #IMPLIED - index CDATA #IMPLIED -- entries for index compilation --> - -<!ELEMENT UL - - (LI | UL | OL)+ -- unordered list --> - -<!ATTLIST UL - id ID #IMPLIED -- link destination -- - compact (compact) #IMPLIED -- reduced interitem spacing -- - narrow (narrow) #IMPLIED -- narrow perhaps multi columns -- - index CDATA #IMPLIED -- entries for index compilation --> - -<!-- List items for UL and OL lists --> - -<!ELEMENT LI - O (P|%text;)+> - -<!ATTLIST LI - id ID #IMPLIED - src %URL; #IMPLIED -- icon for use in place of bullet -- - index CDATA #IMPLIED -- entries for index compilation --> - -<!-- Definition Lists (terms + definitions) --> - -<!ELEMENT DL - - (DT,DD)+ -- DT and DD *MUST* be paired -- > - -<!ATTLIST DL - id ID #IMPLIED - compact (compact) #IMPLIED - index CDATA #IMPLIED -- entries for index compilation --> - -<!ELEMENT DT - O (%text;)+ -- term text -- > - -<!ELEMENT DD - O (P|QUOTE|UL|OL|%text;)+ -- definition text -- > - -<!ATTLIST (DT|DD) - id ID #IMPLIED - index CDATA #IMPLIED -- entries for index compilation --> - -<!-- Tables with titles and column headers, e.g. - - <tbl border> - <tt> An Example of a Table - <th> <th s="2"> average <th> other <tr> - <th> <th> height <th> weight <th> category <tr> - <td> males <td> 1.9 <td> .003 <td> yyy <tr> - <td> females <td> 1.7 <td> .002 <td> xxx - </tbl> ---> - -<!ELEMENT TBL - - (TT?, (TH|TD|TR|TB)*) -- mixed headers and data --> - -<!ATTLIST TBL - id ID #IMPLIED - compact (compact) #IMPLIED -- if present use compact style -- - border (border) #IMPLIED -- if present draw borders -- - index CDATA #IMPLIED -- entries for index compilation --> - -<!ELEMENT TT - O (%text;)+ -- table title --> - -<!ATTLIST TT top (top) #IMPLIED -- place title above table --> - -<!ELEMENT TH - O (%table;)* -- a header cell --> - -<!ATTLIST TH - colspan NUMBER 1 -- columns spanned -- - rowspan NUMBER 1 -- rows spanned -- - align CDATA #IMPLIED -- left, center or right --> - -<!ELEMENT TD - O (%table;)* -- a data cell --> - -<!ATTLIST TD - colspan NUMBER 1 -- columns spanned -- - rowspan NUMBER 1 -- rows spanned -- - align CDATA #IMPLIED -- left, center or right --> - -<!ELEMENT TR - O EMPTY -- row *separator* not terminator --> - -<!ELEMENT TB - O EMPTY -- vertical break of 1/2 line spacing --> - -<!-- Forms composed from input fields and selection menus - - These elements define fields which users can type into or select with mouse - clicks. The browser should manage the input focus e.g. with the tab/shift - tab keys and mouse clicks. - - The enter/return key is then taken to mean the use has filled in the form - and wants the apppropriate action taken: - - - send as query/update to WWW server - - email/fax to designated person - - The action is specified as a URL, e.g. "mailto:dsr@hplb.hpl.hp.com You can - specify additional mail headers with the MH tag: - - <MH>Subject: Please add me to tennis tournament</MH> - - Each FORM should include one or more INPUT elements which can be layed out - with normal and preformatted text, lists and tables. ---> - -<!ELEMENT FORM - - (MH?,(%main;)*)> - -<!ATTLIST FORM - id ID #IMPLIED - action %URL; #IMPLIED - index CDATA #IMPLIED -- entries for index compilation --> - -<!ELEMENT MH - - CDATA -- one or more RFC 822 header fields --> - -<!ATTLIST MH hidden (hidden) #IMPLIED -- hide mail headers from view --> - -<!-- INPUT elements should be defined within a FORM element. - - Users can alter the value of the INPUT element by typing or clicking with - the mouse. Use radio buttons for selecting one attribute value from a set - of alternatives. In this case there will be several INPUT elements with the - same name. Attributes which can take multiple values at the same time - should be defined with checkboxes: define each allowed value in a separate - INPUT element but with the same attribute name. For checkboxes and radio - buttons, the value doesn't change, instead the state of the button shown by - the presence or absence of the checked attribute in each element. - The size attribute specifies the size of the input field as appropriate to - each type. For text this gives the width in characters and height in lines - (separated by an "x"). For numbers this gives the maximum precision. ---> - -<!ELEMENT INPUT - O EMPTY> - -<!ATTLIST INPUT - name CDATA #IMPLIED -- attribute name (may not be unique) -- - type CDATA #IMPLIED --TEXT,URL,INT,FLOAT,DATE,CHECKBOX,RADIO-- - size CDATA #IMPLIED -- e.g."32x4" for multiline text -- - value CDATA #IMPLIED -- attribute value (altered by user) -- - checked (checked) #IMPLIED -- for check boxes and radio buttons -- - disabled (disabled) #IMPLIED -- if grayed out -- - error (error) #IMPLIED -- if in error --> - -<!-- Embedded Data - - You can embed information in a foreign format into the HTML+ document. This - is very convenient for mathematical equations and simple drawings. Images - and complex drawings are better specified as linked documents using the FIG - or IMG elements. - - Arbitrary 8 bit data is allowed but any occurrences of the following chars - must be escaped as shown: - - "&" by "&" - "<" by "<" - ">" by ">" - - The browser can pipe such data thru filters to generate the corresponding - pixmap The data format is specified as a MIME content type, e.g. "text/eqn" ---> - -<!ELEMENT EMBED - - (RCDATA)> - -<!ATTLIST EMBED - id ID #IMPLIED - type CDATA #IMPLIED -- mime content type -- - index CDATA #IMPLIED -- entries for index compilation --> - -<!-- Figures - - The image/drawing is specified by a URL or as embedded data for simple - drawings. The element's text serves as the caption. Use the emphasis with - style = "credits" to record photo credits etc. - - FIGD allows dumb terminals etc to show a textual description in place - of the actual sound sequence, image, movie or graphic. ---> - -<!ELEMENT FIG - - (EMBED?, FIGD?, (FIGA|FIGT)*, (%text;)*)> -<!ATTLIST FIG - id ID #IMPLIED - align CDATA #IMPLIED -- position: left, right or center -- - cap CDATA #IMPLIED -- caption at left, right, top, bottom -- - noflow (noflow) #IMPLIED -- disables text flow -- - ismap (ismap) #IMPLIED -- server can handle mouse clicks/drags -- - src %URL; #IMPLIED -- link to image data -- - index CDATA #IMPLIED -- entries for index compilation --> - -<!ELEMENT FIGD - - (%table;) -- figure description --> - -<!-- Figure anchors designate polygonal areas on the figure which can be - clicked with the mouse. The default area is the whole of the figure. This - mechanism interprets mouse clicks locally, and browsers can choose to - highlight the designated area (or change the mouse sprite) when the mouse - is moved over the area. - - Note that polygons may be non-convex or even intersect themselves, thereby - complicating the definition of what is enclosed by the polygon. Holes are - excluded. ---> - -<!ELEMENT FIGA - O EMPTY> - -<!ATTLIST FIGA - href %URL; #REQUIRED -- link to traverse when clicked -- - area NUMBERS #IMPLIED -- x1,y1,x2,y2,x3,y3,... --> - -<!-- FIGT Text on top of an figure background, or in a colored background - box which sits arbitrarily on top of an figure background. The text can - include headers, lists and tables etc. The width attribute allows you to - limit the width of the text box. The height is then determined - automatically by the browser. - - FIGT can also be used to position a graphic on top of a picture using an - IMG element within FIGT. In this case the chromakey attribute may allow - parts of the underlying image to show through. - You can make the whole of the box into a hypertext link. This will act as - if it is underneath any hypertext links specified by the overlay markup - itself. ---> - -<!ELEMENT FIGT - - (%main;)> -<!ATTLIST FIGT - at NUMBERS #IMPLIED -- upper left origin for text -- - width NUMBER #IMPLIED -- given as fraction of picture -- - framed (framed) #IMPLIED -- framed with coloured background -- - href %URL; #IMPLIED -- link to traverse when clicked --> - -<!-- inline icons/small graphics - - The align attribute defines whether the top middle or bottom of the graphic - and current text line should be aligned vertically - - The SEETHRU attribute is intended as a chromakey to allow a given colour to - be designated as "transparent". Pixels with this value should not be - painted. The exact format of this attribute's value has yet to be defined. - - Use the FIG tag for captioned figures with active areas etc. ---> - -<!ELEMENT IMG - O EMPTY> - -<!ATTLIST IMG - src %URL; #REQUIRED -- where to get image data -- - align CDATA #IMPLIED -- top, middle or bottom -- - seethru CDATA #IMPLIED -- for transparency -- - ismap (ismap) #IMPLIED -- send mouse clicks/drags to server --> - -<!-- Hierarchical groups for books, chapters, sections etc. --> - -<!ELEMENT GROUP - - ((TITLE|LINK*), (%main;)*)> - -<!ATTLIST GROUP - id ID #IMPLIED - role CDATA #IMPLIED -- book, chapter, section etc. -- - inset (inset) #IMPLIED -- rendering hint: indent margins --> - -<!-- change bars defined by a matched pair of CHANGED elements: - - <changed id=z34> changed text <changed idref=z34> - - This tag can't act as a container, since changes don't respect - the nesting implied by paragraphs, headers, lists etc. ---> - -<!ELEMENT CHANGED - O EMPTY> - -<!ATTLIST CHANGED -- one of id and idref is always required -- - id ID #IMPLIED -- signals start of changes -- - idref IDREF #IMPLIED -- signals end of changes --> - -<!-- Hypertext Links from points within document nodes --> - -<!ELEMENT A - - (#PCDATA | IMG | EM | EMBED)*> - -<!ATTLIST A - id ID #IMPLIED -- as target of link -- - name CDATA #IMPLIED -- backwards compatibility -- - href %URL; #IMPLIED -- destination node -- - role CDATA #IMPLIED -- role of link, e.g. "partof" -- - effect CDATA #IMPLIED -- replace/new/overlay -- - print CDATA #IMPLIED -- reference/footnote/section -- - title CDATA #IMPLIED -- when otherwise unavailable -- - type CDATA #IMPLIED -- for presentation cues -- - size NAMES #IMPLIED -- for progress cues --> - -<!-- Other kinds of relationships between documents --> - -<!ELEMENT LINK - O EMPTY> - -<!ATTLIST LINK - href %URL; #IMPLIED -- destination node -- - role CDATA #IMPLIED -- role played, e.g. "toc" --> - -<!-- Original document URL for resolving relative URLs --> - -<!ELEMENT BASE - O EMPTY> - -<!ATTLIST BASE HREF %URL; #IMPLIED> - -<!-- Signifies the document's URL accepts queries --> - -<!ELEMENT ISINDEX - O (EMPTY)> - -<!ATTLIST ISINDEX href %URL; #IMPLIED -- defaults to document's URL --> - -<!-- For use with autonumbering editors - don't reuse ids, - instead, allocate next one starting from this one --> - -<!ELEMENT NEXTID - O (EMPTY)> - -<!ATTLIST NEXTID N NAME #REQUIRED> - -<!-- Mnemonic character entities. --> - -<!ENTITY AElig "Æ" -- capital AE diphthong (ligature) --> -<!ENTITY Aacute "Á" -- capital A, acute accent --> -<!ENTITY Acirc "Â" -- capital A, circumflex accent --> -<!ENTITY Agrave "À" -- capital A, grave accent --> -<!ENTITY Aring "Å" -- capital A, ring --> -<!ENTITY Atilde "Ã" -- capital A, tilde --> -<!ENTITY Auml "Ä" -- capital A, dieresis or umlaut mark --> -<!ENTITY Ccedil "Ç" -- capital C, cedilla --> -<!ENTITY ETH "Ð" -- capital Eth, Icelandic --> -<!ENTITY Eacute "É" -- capital E, acute accent --> -<!ENTITY Ecirc "Ê" -- capital E, circumflex accent --> -<!ENTITY Egrave "È" -- capital E, grave accent --> -<!ENTITY Euml "Ë" -- capital E, dieresis or umlaut mark --> -<!ENTITY Iacute "Í" -- capital I, acute accent --> -<!ENTITY Icirc "Î" -- capital I, circumflex accent --> -<!ENTITY Igrave "Ì" -- capital I, grave accent --> -<!ENTITY Iuml "Ï" -- capital I, dieresis or umlaut mark --> -<!ENTITY Ntilde "Ñ" -- capital N, tilde --> -<!ENTITY Oacute "Ó" -- capital O, acute accent --> -<!ENTITY Ocirc "Ô" -- capital O, circumflex accent --> -<!ENTITY Ograve "Ò" -- capital O, grave accent --> -<!ENTITY Oslash "Ø" -- capital O, slash --> -<!ENTITY Otilde "Õ" -- capital O, tilde --> -<!ENTITY Ouml "Ö" -- capital O, dieresis or umlaut mark --> -<!ENTITY THORN "Þ" -- capital THORN, Icelandic --> -<!ENTITY Uacute "Ú" -- capital U, acute accent --> -<!ENTITY Ucirc "Û" -- capital U, circumflex accent --> -<!ENTITY Ugrave "Ù" -- capital U, grave accent --> -<!ENTITY Uuml "Ü" -- capital U, dieresis or umlaut mark --> -<!ENTITY Yacute "Ý" -- capital Y, acute accent --> -<!ENTITY aacute "á" -- small a, acute accent --> -<!ENTITY acirc "â" -- small a, circumflex accent --> -<!ENTITY aelig "æ" -- small ae diphthong (ligature) --> -<!ENTITY agrave "à" -- small a, grave accent --> -<!ENTITY amp "&" -- ampersand --> -<!ENTITY aring "å" -- small a, ring --> -<!ENTITY atilde "ã" -- small a, tilde --> -<!ENTITY auml "ä" -- small a, dieresis or umlaut mark --> -<!ENTITY ccedil "ç" -- small c, cedilla --> -<!ENTITY eacute "é" -- small e, acute accent --> -<!ENTITY ecirc "ê" -- small e, circumflex accent --> -<!ENTITY egrave "è" -- small e, grave accent --> -<!ENTITY eth "ð" -- small eth, Icelandic --> -<!ENTITY euml "ë" -- small e, dieresis or umlaut mark --> -<!ENTITY gt ">" -- greater than --> -<!ENTITY iacute "í" -- small i, acute accent --> -<!ENTITY icirc "î" -- small i, circumflex accent --> -<!ENTITY igrave "ì" -- small i, grave accent --> -<!ENTITY iuml "ï" -- small i, dieresis or umlaut mark --> -<!ENTITY lt "<" -- less than --> -<!ENTITY ntilde "ñ" -- small n, tilde --> -<!ENTITY oacute "ó" -- small o, acute accent --> -<!ENTITY ocirc "ô" -- small o, circumflex accent --> -<!ENTITY ograve "ò" -- small o, grave accent --> -<!ENTITY oslash "ø" -- small o, slash --> -<!ENTITY otilde "õ" -- small o, tilde --> -<!ENTITY ouml "ö" -- small o, dieresis or umlaut mark --> -<!ENTITY szlig "ß" -- small sharp s, German (sz ligature) --> -<!ENTITY thorn "þ" -- small thorn, Icelandic --> -<!ENTITY uacute "ú" -- small u, acute accent --> -<!ENTITY ucirc "û" -- small u, circumflex accent --> -<!ENTITY ugrave "ù" -- small u, grave accent --> -<!ENTITY uuml "ü" -- small u, dieresis or umlaut mark --> -<!ENTITY yacute "ý" -- small y, acute accent --> -<!ENTITY yuml "ÿ" -- small y, dieresis or umlaut mark --> - -<!-- dash entities --> - -<!ENTITY endash "--" -- En dash --> -<!ENTITY emdash "---" -- Em dash --> - -<!-- The END --> - -]> - - - -
--- a/etc/sgml/html-plus.dtd Mon Aug 13 08:45:53 2007 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,925 +0,0 @@ -<!SGML "ISO 8879:1986" --- - Document Type Definition for the HyperText Markup Language Plus - for use with the World Wide Web application (HTML+ DTD). - This DTD is designed for use with SGML authoring tools and - it is expected that most browsers will tolerate omissions, - in particular, missing <DIVn> elements and <P> start tags - following headers, which can easily be inferred from the context. - - The HTML+ DTD which is structured as an HTML core plus a - number of additional modules which can be included by an - entity definition in a document's <!DOCTYPE> element. - You can include specific features in your document - using the DOCTYPE declaration at the start, e.g. - - <!DOCTYPE htmlplus [ - <!ENTITY % HTML.tables "INCLUDE"> - <!ENTITY % HTML.forms "INCLUDE"> - ]> - - This spec also allows for authors to extend the DTD and - to define how any new elements are rendered in terms of - existing ones. This should be used with caution. - - I would like to acknowledge the influence of the TEI DTDs - which proved very helpful in restructuring the DTD. - - Dave Raggett 21st March 1994 - - Changes: - - Added support for graphical menus to SELECT/OPTION. - - Liberalised content model for headers to %text; - Added SPACES attribute to P element to preserve spaces. - - Dropped the LIT element and changed the TAB element - over to the LaTeX model. Added NOWRAP to P element. - Replaced TH/TD's align=numeric with ALIGNON="." etc. - - Made anchor NAME attribute conditional on HTML.obsolete - Added HTML.obsolete for obsoleted HTML elements - - Added SIG attribute to A and LINK for specifying - a digital signature to attest that a linked document - is unchanged. - - SRC attribute added to NOTE to allow authors to override - the default icon chosen on the basis of the ROLE attribute. - - Switched REL/REV back to CDATA to avoid trouble with duplicate - name or name token error. Using an explicit list of relationship - types would force us to drop REV. - - Added top/bottom alignment attribute to CAPTION - - REL and REV domains now defined by parameter entities - - SRC attribute added to LINK to allow images to be used - in document specific toolbar - - Baseline attribute added to FIG and IMG to give precise - control of vertical position relative to baseline. - - Revised comments for <A> and <LINK> to remove references to - obsoleted timing attributes and to add a list of "standard" - relationship types. - - CHANGED element now uses more meaningful attribute names. - - STATE dropped in favor of INPUT with TYPE="hidden". Forms now - support a link to a script for client-side execution of constraints. - - The element definition for DIV1..DIV6 and P no longer permit the - start tag to be omitted. This was regrettably forced by a - restriction in the SGML standard. Browsers *must* be capable of - inferring them when missing,in order to cope with legacy documents. - - Fixed some errors in earlier version to do with start tags and - definitions of parameter entities. The content model for FIG has - been changed to use a P element for text to avoid an SGML parsing - problem with a line break before the caption. --- -CHARSET - BASESET "ISO 646:1983//CHARSET - International Reference Version (IRV)//ESC 2/5 4/0" - DESCSET 0 9 UNUSED - 9 2 9 - 11 2 UNUSED - 13 1 13 - 14 18 UNUSED - 32 95 32 - 127 1 UNUSED - BASESET "ISO Registration Number 100//CHARSET - ECMA-94 Right Part of Latin Alphabet Nr. 1//ESC 2/13 4/1" - DESCSET 128 32 UNUSED - 160 95 32 - 255 1 UNUSED - -CAPACITY SGMLREF - TOTALCAP 150000 - GRPCAP 150000 - -SCOPE DOCUMENT -SYNTAX - SHUNCHAR CONTROLS 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 - 19 20 21 22 23 24 25 26 27 28 29 30 31 127 255 - BASESET "ISO 646:1983//CHARSET - International Reference Version (IRV)//ESC 2/5 4/0" - DESCSET 0 128 0 - FUNCTION RE 13 - RS 10 - SPACE 32 - TAB SEPCHAR 9 - NAMING LCNMSTRT "" - UCNMSTRT "" - LCNMCHAR ".-" - UCNMCHAR ".-" - NAMECASE GENERAL YES - ENTITY NO - DELIM GENERAL SGMLREF - SHORTREF SGMLREF - NAMES SGMLREF - QUANTITY SGMLREF - NAMELEN 32 - TAGLVL 100 - LITLEN 1024 - GRPGTCNT 150 - GRPCNT 64 - -FEATURES - MINIMIZE - DATATAG NO - OMITTAG YES - RANK NO - SHORTTAG NO - LINK - SIMPLE NO - IMPLICIT NO - EXPLICIT NO - OTHER - CONCUR NO - SUBDOC NO - FORMAL YES - APPINFO NONE -> - -<!DOCTYPE HTMLPLUS [ - -<!-- DTD for HTML+ -Markup minimisation should be avoided, otherwise the default <!SGML> -declaration is fine. Browsers should be forgiving of markup errors, -while authoring tools *should* enforce compliance with the DTD. - -Common Attributes: - -id This attribute allows authors to name elements such as headers - and paragraphs as potential destinations for links. Note that - links don't specify points, but rather extended objects. - -charset This allows authors to switch to a different char set for - quotations or list etc. This is particularly useful for oriental - languages which need two byte character codes, e.g. see RFC 1468 - "Japanese Character Encoding for Internet Messages" - -ENTITY DECLARATIONS - - <!ENTITY % foo "X | Y | Z"> is a macro definition for parameters and in - subsequent statements, the string "%foo;" is expanded to "X | Y | Z" - - Various classes of SGML text types: - - CDATA text which doesn't include markup or entity references - RCDATA text with entity references but no markup - PCDATA text occurring in a context in which markup and entity references - may occur. ---> - -<!-- Core HTML+ DTD omits following features --> -<!ENTITY % HTML.math "IGNORE"> -<!ENTITY % HTML.tables "IGNORE"> -<!ENTITY % HTML.figures "IGNORE"> -<!ENTITY % HTML.emph "IGNORE"> -<!ENTITY % HTML.forms "IGNORE"> -<!ENTITY % HTML.obsolete "IGNORE"> - -<!ENTITY % cextra "" -- for character-like elements --> -<!ENTITY % pextra "" -- for paragraph-like elements --> - -<!-- %cextra; and %pextra are designed to allow document specific - extensions to the HTML+ DTD, e.g. - - <!DOCTYPE htmlplus [ - <!ENTITY % cextra "|PROPNAME"> - <!ELEMENT PROPNAME - - CDATA> - ]> - - Use the RENDER element to specify how the browser should - display new elements in terms of existing ones, e.g. - - <RENDER tag="PROPNAME" style="I"> ---> - -<!ENTITY % URL "CDATA" -- a URL or URN designating a hypertext node --> - -<!-- Browsers should render the following types of emphasis - distinctly when the obvious rendering is impractical - - I = italic, B = bold, U = underline, S = strikethru, - TT = teletype font, SUP = superscript, SUB = subscript - REV = reverse video for highlighting hit areas in the result of a query - Q = inline quote (render according to local conventions) ---> - -<!ENTITY % emph1 "I|B|U|TT|CITE|EM|STRONG|KBD|VAR|DFN|CODE|SAMP"> -<!ENTITY % emph2 "S|Q|PERSON|ACRONYM|ABBREV|CMD|ARG|REMOVED|ADDED|REV"> -<!ENTITY % emph3 "SUP|SUB|CHANGED|TAB|HIDE"> - -<![ %HTML.emph [ <!ENTITY % emph "%emph1;|%emph2;|%emph3;"> ]]> -<!ENTITY % emph "%emph1;"> - -<![ %HTML.emph [ <!ENTITY % misc1 "|RENDER|FOOTNOTE|MARGIN"> ]]> -<!ENTITY % misc1 ""> - -<![ %HTML.forms [ <!ENTITY % misc2 "|INPUT|TEXTAREA|SELECT"> ]]> -<!ENTITY % misc2 ""> - -<!ENTITY % misc "BR %misc1 %misc2; %cextra;"> - -<![ %HTML.figures [ <!ENTITY % text "#PCDATA|A|IMG|FIG|%emph;|%misc;"> ]]> -<!ENTITY % text "#PCDATA|A|IMG|%emph;|%misc;"> - -<![ %HTML.emph [ <!ENTITY % paras "P|PRE|%pextra;"> ]]> -<!ENTITY % paras "P|PRE %pextra;"> - -<!ENTITY % lists "UL|OL|DL"> - -<![ %HTML.emph [ <!ENTITY % block1 "NOTE|QUOTE|ABSTRACT|ADDRESS|HR"> ]]> -<!ENTITY % block1 "ADDRESS|HR"> - -<![ %HTML.tables [ <!ENTITY % block2 "|TABLE"> ]]> -<!ENTITY % block2 ""> - -<![ %HTML.forms [ <!ENTITY % block3 "|FORM"> ]]> -<!ENTITY % block3 ""> - -<![ %HTML.math [ <!ENTITY % block4 "|MATH"> ]]> -<!ENTITY % block4 ""> - -<![ %HTML.obsolete [ <!ENTITY % block5 "|MENU|DIR|BLOCKQUOTE"> ]]> -<!ENTITY % block5 ""> - -<!ENTITY % block "%block1; %block2; %block3; %block4; %block5;"> - -<![ %HTML.emph [<!ENTITY % setup1 "& RENDER*"> ]]> -<!ENTITY % setup1 ""> - -<!ENTITY % setup "(TITLE? & ISINDEX? & BASE? & META* & LINK* %setup1;)"> - -<!ENTITY % main "%block;|%lists;|%paras;"> - -<!-- these entities are used to simplify element definitions --> - -<!ENTITY % heading "H1|H2|H3|H4|H5|H6"> -<!ENTITY % table "P|%heading;|%lists;"> -<!ENTITY % math "BOX|ARRAY|ROOT|%text;"> - -<![ %HTML.obsolete [<!ENTITY % anchorname "name NMTOKEN #IMPLIED"> ]]> -<!ENTITY % anchorname ""> - -<!-- Browsers should as a minimum support the following types - of INPUT fields, in addition to TEXTAREA and SELECT: - - text, checkbox, radio, submit, and reset - - password, int, float, date, url can be mapped to text fields - while image, scribble and audio fields can be ignored ---> - -<![ %HTML.forms [ - <!ENTITY % fields "text|password|checkbox|radio|submit|reset|int| - float|date|url|hidden|range|scribble|audio"> -]]> - - -<!-- Core DTD includes basic Latin-1 entities --> -<!ENTITY % ISOlat1 PUBLIC "ISO 8879-1986//ENTITIES Added Latin 1//EN"> -%ISOlat1; - -<!-- additional entities normally found in Latin-1 char sets--> -<!ENTITY % ISOnum PUBLIC "ISO 8879-1986//ENTITIES Numeric and Special Graphic//EN"> -%ISOnum; - -<!-- diacritical marks normally found in Latin-1 char sets--> -<!ENTITY % ISOdia PUBLIC "ISO 8879-1986//ENTITIES Diacritical Marks//EN"> -%ISOdia; - -<!-- misc. from ISO Publishing entities --> -<!ENTITY ndash SDATA "[ndash ]"--=en dash--> -<!ENTITY mdash SDATA "[ndash ]"--=em dash--> -<!ENTITY ensp SDATA "[ensp ]"--=en space (1/2-em)--> -<!ENTITY emsp SDATA "[emsp ]"--=em space--> -<!ENTITY hellip SDATA "[hellip]"--=ellipsis (horizontal)--> -<!ENTITY vellip SDATA "[vellip]"--=ellipsis (vertical)--> - -<!-- maths symbols when needed --> -<![ %HTML.math [ - <!ENTITY % ISOtech PUBLIC "ISO 8879-1986//ENTITIES General Technical//EN"> - %ISOtech; - - <!ENTITY % ISOgrk3 PUBLIC "ISO 8879-1986//ENTITIES Greek Symbols//EN"> - %ISOgrk3; - - <!ENTITY % ISOamso PUBLIC "ISO 8879-1986//ENTITIES Added Math Symbols: Ordinary//EN"> - %ISOamso; - - <!ENTITY % ISOamsr PUBLIC "ISO 8879-1986//ENTITIES Added Math Symbols: Relations//EN"> - %ISOamsr; - - <!ENTITY % ISOamsc PUBLIC "ISO 8879-1986//ENTITIES Added Math Symbols: Delimiters//EN"> - %ISOamsc; - - <!-- misc. from ISO Binary and Large operators --> - - <!ENTITY thinsp SDATA "[thinsp]"--=thin space (1/6 em)--> - <!ENTITY coprod SDATA "[coprod]"--/coprod L: coproduct operator--> - <!ENTITY prod SDATA "[prod ]"--/prod L: product operator--> - <!ENTITY sum SDATA "[sum ]"--/sum L: summation operator--> -]]> - -<!-- Basic types of elements: - <!ELEMENT tagname - - CONTENT> elements needing end tags - <!ELEMENT tagname - O CONTENT> elements with optional end tags - <!ELEMENT tagname - O EMPTY> elements without content or end tags - -The content definition is: - - an entity definition as defined above - - a tagname - - (brackets enclosing the above) -These may be combined with the operators: - A* A occurs zero or more times - A+ A occurs one or more times - A|B implies either A or B - A? A occurs zero or one times - A,B implies first A then B - A&B either or both A and B (in either order A B or B A) ---> - -<!ELEMENT HTMLPLUS O O (HEAD, BODY)> -<!ATTLIST HTMLPLUS - version CDATA #IMPLIED -- the HTML+ version number -- - charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> - -<!ELEMENT HEAD - O (%setup;) -- delimits document wide properties --> -<!ELEMENT BODY - O ((%main;)*, DIV6*, DIV5*, DIV4*, DIV3*, DIV2*, DIV1*)> - -<!-- - Browsers *must* tolerate missing DIVn tags, e.g. the presence of an - <H1> tag implies a DIV1 element enclosing it and the following text. - The SGML standard unfortunately doesn't permit such inferences due - to a decision made to simplify writing general SGML parsers. ---> - -<!ELEMENT DIV1 - - (H1, (%main;)*, DIV6*, DIV5*, DIV4*, DIV3*, DIV2*)> -<!ELEMENT DIV2 - - (H2, (%main;)*, DIV6*, DIV5*, DIV4*, DIV3*)> -<!ELEMENT DIV3 - - (H3, (%main;)*, DIV6*, DIV5*, DIV4*)> -<!ELEMENT DIV4 - - (H4, (%main;)*, DIV6*, DIV5*)> -<!ELEMENT DIV5 - - (H5, (%main;)*, DIV6*)> -<!ELEMENT DIV6 - - (H6, (%main;)*)> - -<!ATTLIST (DIV6|DIV5|DIV4|DIV3|DIV2|DIV1) - id ID #IMPLIED -- link destination -- - charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> - -<!-- Document headers --> -<!ELEMENT (%heading;) - - (%text;)+> -<!ATTLIST (%heading;) - id ID #IMPLIED -- defines link destination -- - charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> - -<!-- character emphasis --> -<!ELEMENT (%emph1;) - - (%text;)+> -<!ATTLIST (%emph1;) - id ID #IMPLIED -- link destination -- - charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> - -<!-- - Paragraphs which act as containers for the following text - - Browsers *must* be capable of inferring missing <P> - start tags from the content model. Basically, if the parser - comes across unexpected %text; then there's a missing <P>. ---> -<!ELEMENT P - O (%text;)+> -<!ATTLIST P - id ID #IMPLIED -- link destination -- - charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese -- - nowrap (nowrap) #IMPLIED -- disable word wrap -- - spaces (spaces) #IMPLIED -- preserve spaces -- - align (left|indent|center|right|justify) left> - -<!ELEMENT HR - O EMPTY -- Horizontal Rule --> -<!ELEMENT BR - O EMPTY -- forced line break --> - -<!ELEMENT PRE - - (%text;)+ -- preformatted fixed pitch text --> -<!ATTLIST PRE - id ID #IMPLIED -- link destination -- - charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> - -<!ELEMENT ADDRESS - - (P)+ -- info on author --> -<!ATTLIST ADDRESS - id ID #IMPLIED -- link destination -- - charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> - -<!-- Lists which can be nested --> -<!ELEMENT OL - - (LI)+ -- ordered list --> -<!ATTLIST OL - id ID #IMPLIED - charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese -- - compact (compact) #IMPLIED -- reduced interitem spacing --> - -<!ELEMENT UL - - (LI)+ -- unordered list --> -<!ATTLIST UL - id ID #IMPLIED -- link destination -- - charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese -- - compact (compact) #IMPLIED -- reduced interitem spacing -- - plain (plain) #IMPLIED -- suppress bullets -- - wrap (vert|horiz|none) none -- multicolumn list wrap style --> - -<!-- List items for UL and OL lists - The icon or label overides the default rendering --> -<!ELEMENT LI - O (DL|UL|OL|P|HR)+ -- should we add PRE? --> -<!ATTLIST LI - id ID #IMPLIED - charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese -- - icon %URL; #IMPLIED -- icon for use in place of bullet -- - label CDATA #IMPLIED -- when you can't show the icon --> - -<!-- Definition Lists (terms + definitions) --> -<!ELEMENT DL - - (DT*,DD)+> -<!ATTLIST DL - id ID #IMPLIED - charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese -- - compact (compact) #IMPLIED -- reduced interitem spacing --> - -<!ELEMENT DT - O (%text;)+ -- term text -- > -<!ELEMENT DD - O (P|UL|OL|DL|HR)+ -- definition text (should we add PRE?)-- > -<!ATTLIST (DT|DD) - id ID #IMPLIED - charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> - -<!-- Hypertext Links from points within document nodes - - The HREF attribute specifies the link destination as a URL or URN. - In figures, the SHAPE attribute defines the extent of the link as - a polygonal region, and is used with the FIG element. - - The PRINT attribute determines how the browser should deal with - links when printing this document. This makes it possible for - users to print a document and related subdocuments with a single - menu action. If PRINT="Section", then the link is followed and - printed as a follow-on section after the current document. If - PRINT="Footnote" and the linked document is sufficiently small - then it is included as a footnote. If PRINT="Reference" then the - document's URL (and title) is included in a footnote or in a list - of references at the end of the document. - - The TITLE attribute may be used for links in which the destination - node doesn't define a title itself, e.g. non-html documents. - - The REL attribute is used to specify how the browser interprets - the link when this document is being used as a hypertext path - REL="Path" causes the linked document to be treated as a path - and inserted into the current path, while REL="Node" treats - the linked document as a node on the current path. REL="Embed" - is a hint to embed the referenced node into the current document. - - The SIG attribute allows authors to specify a digital signature - of linked documents to check that they haven't been changed. - It starts with a prefix denoting the algorithm used, in particular - SIG="md5:2l3k4j2lkj423l" denotes the MD5 signature: 2l3k4j2lkj423l - which is encoded using the standard MIME base64 representation ---> - -<!ELEMENT A - - (#PCDATA | IMG | %emph;)*> -<!ATTLIST A - id ID #IMPLIED -- as target of link -- - %anchorname; -- see HTML.obsolete -- - charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese -- - shape CDATA #IMPLIED -- list of points for shaped buttons -- - href %URL; #IMPLIED -- destination node -- - rel CDATA #IMPLIED -- forward relationship type -- - rev CDATA #IMPLIED -- reverse relationship type -- - print CDATA #IMPLIED -- reference/footnote/section -- - title CDATA #IMPLIED -- when otherwise unavailable -- - sig CDATA #IMPLIED -- MD5 digital signature --> - -<!-- Other kinds of relationships between documents - - There are a set of standard RELationship types which alter the - browser's navigation menu: - - UseIndex searchable index - UseGlossary shared glossary - Contents shared contents page - Previous previous document in a hypertext path - Next next document in a hypertext path - Bookmark named with the title attribute - Made Defines who is the "maker" of this document - Help provides help on this document - Annotation an additional note on current document - Reply a note with equal footing to current document - Subdocument defines parent->child relationship - Parent defines child->parent relationship - StyleSheet an associated style sheet - - Bookmarks allow authors to define a set of useful links - which are to be accessed via a menu, rather than as conventional - in-line hypertext links. Previous and Next links are inserted - by the browser when interpreting a separate document as a path. - See above description of REL="Node" and REL="Path" for <A>. - - The FROM attribute makes it possible to specify annotation - links separately from the document text flow. The FROM - attribute specifies an ID for the source of a link, while - the HREF attribute specifies its destination. HTTP servers - can use the WWW-Link: header to "insert" such annotations - into documents. ---> - -<!ELEMENT LINK - O EMPTY> -<!ATTLIST LINK - id ID #IMPLIED -- to allow meta info on links -- - charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese -- - from IDREF #IMPLIED -- starting point -- - href %URL; #REQUIRED -- destination node -- - rel CDATA #IMPLIED -- forward relationship type -- - rev CDATA #IMPLIED -- reverse relationship type -- - src %URL; #IMPLIED -- an image for displaying link -- - print CDATA #IMPLIED -- reference/footnote/section -- - title CDATA #IMPLIED -- when otherwise unavailable -- - seal CDATA #IMPLIED -- MD5 digital signature --> - -<!-- Document title --> -<!ELEMENT TITLE - - (#PCDATA | %emph;)+> -<!ATTLIST TITLE - id ID #IMPLIED -- link destination -- - charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> - -<!-- Original document URL for resolving relative URLs --> -<!ELEMENT BASE - O EMPTY> -<!ATTLIST BASE HREF %URL; #IMPLIED> - -<!-- Signifies the document's URL accepts queries, - and may be implied by HTTP header info --> -<!ELEMENT ISINDEX - O EMPTY> -<!ATTLIST ISINDEX href %URL; #IMPLIED -- defaults to document's URL --> - -<!-- - Servers should read the document head to generate HTTP headers - corresponding to META elements, e.g. if the document contains: - - <meta name="Expires" value="Tue, 04 Dec 1993 21:29:02 GMT"> - - The server should include the HTTP date format header field: - - Expires: Tue, 04 Dec 1993 21:29:02 GMT - - Other likely names are "Keywords", "Created", "Owner" (a name) - and "Reply-To" (an email address) ---> - -<!ELEMENT META - O EMPTY> -<!ATTLIST META - id ID #IMPLIED -- to allow meta info -- - name CDATA #IMPLIED -- HTTP header e.g. "Expires" -- - value CDATA #IMPLIED -- associated value --> - -<![ %HTML.obsolete [ - -<!ELEMENT (MENU|DIR) - - (LI)+ -- plain single/multicolumn lists--> -<!ATTLIST (MENU|DIR) - compact (compact) #IMPLIED -- reduced interitem spacing --> - -<!ELEMENT BLOCKQUOTE - - (P)+ -- extended quotes --> - -]]> - -<![ %HTML.emph [ - -<!-- additional character emphasis --> -<!ELEMENT (%emph2;) - - (%text;)*> -<!ATTLIST (%emph2;) - id ID #IMPLIED -- link destination -- - charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> - -<!ELEMENT (SUP|SUB) - - (%text;)* -- superscripts and subscripts --> -<!ATTLIST (SUP|SUB) - id ID #IMPLIED -- link destination -- - charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> - -<!ELEMENT (FOOTNOTE|MARGIN) - - (%text;)* -(FOOTNOTE|MARGIN)> -<!ATTLIST (FOOTNOTE|MARGIN) - id ID #IMPLIED -- link destination -- - charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> - -<!-- RENDER only appears in the document head --> -<!ELEMENT RENDER -O EMPTY -- how to render unknown elements --> -<!ATTLIST RENDER - id ID #IMPLIED -- to allow meta info -- - tag CDATA #IMPLIED -- tag name -- - equiv CDATA #IMPLIED -- HTML+ equivalent tag name -- - style NAMES #IMPLIED -- space separated list of styles --> - -<!-- Based on LaTeX's tabbing environment --> -<!ELEMENT TAB - O EMPTY> -<!ATTLIST TAB - id ID #IMPLIED -- used to set a tab stop -- - to IDREF #IMPLIED -- move to previously defined tab stop -- - before NUMBER 0 -- scaled em spaces before tab stop -- - after NUMBER 0 -- scaled em spaces after tab stop -- - reset (reset) #IMPLIED -- clear all previous tab stops --> - -<!-- content is hidden, equivalent of LaTeX's \kill --> -<!ELEMENT HIDE - - (%text;) (-HIDE)> - -<!ELEMENT QUOTE - - (P*) -- block quote --> -<!ATTLIST QUOTE - id ID #IMPLIED -- link destination -- - charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> - -<!ELEMENT ABSTRACT - - (P*) -- document summary --> -<!ATTLIST ABSTRACT - id ID #IMPLIED -- link destination -- - charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> - -<!-- often rendered with an icon in left margin, - the role is shown before the first paragraph --> -<!ELEMENT NOTE - - (P*) -- admonishment --> -<!ATTLIST NOTE - id ID #IMPLIED -- link destination -- - charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese -- - src %URL; #IMPLIED -- url for the icon -- - role (Simple|Tip|Note|Warning|Error) Simple > - -<!-- change bars can bridge markup boundaries --> -<!ELEMENT CHANGED - O EMPTY> -<!ATTLIST CHANGED -- one of id or idref is always required -- - begin ID #IMPLIED -- signals beginning of changes -- - end IDREF #IMPLIED -- signals end of changes --> -]]> - - -<![ %HTML.figures [ <!ENTITY % HTML.captions "INCLUDE"> ]]> -<![ %HTML.tables [ <!ENTITY % HTML.captions "INCLUDE"> ]]> -<!ENTITY % HTML.captions "IGNORE"> - -<![ %HTML.captions [ - -<!ELEMENT CAPTION - - (%text;)+ -- table or figure caption --> -<!ATTLIST CAPTION - id ID #IMPLIED - align (top|bottom) #IMPLIED - charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> -]]> - -<![ %HTML.tables [ - -<!-- a pre-pass is needed to count columns and determine - min/max widths before sizing to match window size --> - -<!ELEMENT TABLE - - (CAPTION?, TR*) -- mixed headers and data --> -<!ATTLIST TABLE - id ID #IMPLIED - border (border) #IMPLIED -- draw borders -- - charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> - -<!-- browsers should tolerate an omission of the first - <TR> tag as it is implied by the context --> -<!ELEMENT TR - O (TH|TD)* -- acts like row separator --> -<!ATTLIST TR id ID #IMPLIED> - -<!ELEMENT TH - O (%table;)* -- a header cell --> -<!ATTLIST TH - id ID #IMPLIED - colspan NUMBER 1 -- columns spanned -- - rowspan NUMBER 1 -- rows spanned -- - align (left|center|right) center - alignon CDATA #IMPLIED -- align on decimal point etc -- - charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> - -<!ELEMENT TD - O (%table;)* -- a data cell --> -<!ATTLIST TD - id ID #IMPLIED - colspan NUMBER 1 -- columns spanned -- - rowspan NUMBER 1 -- rows spanned -- - align (left|center|right) center - alignon CDATA #IMPLIED -- align on decimal point etc -- - charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> -]]> - -<![ %HTML.forms [ - -<!-- - The form contents are sent to the server upon pressing a submit - button. Forms can be associated with scripts, e.g. to make one - selection field effect which options are enabled for other fields. - - Clicking on a selection or typing into a text field result in events - which are processed by the script. Event handlers are associated - with each field or with the form itself. The script language is - deliberately restricted to avoid any security issues. - - Fields can be disabled (greyed out) or marked as being in error. - The MESSAGE element may be used by the server to set error messages. - Servers can store state information in forms with hidden input fields. - These are not displayed and can be used to hold transaction handles etc. ---> - -<!ELEMENT FORM - - ((%main;)*, MESSAGE?) -(FORM) -- forms can't be nested --> -<!ATTLIST FORM - id ID #IMPLIED - action %URL; #IMPLIED -- defaults for URL for current doc -- - method CDATA #IMPLIED -- GET, PUT, POST, DELETE etc. -- - enctype CDATA #IMPLIED -- encoding type for form transfers -- - script %URL; #IMPLIED -- locally executed event handlers -- - charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> - -<!-- Types of INPUT field: - text: one line text fields, size gives visible width of field in chars - where value may grow beyond this up to MAX (MAXLENGTH) chars. - password: like text fields but with no echo of typed characters - checkbox: for simple yes/no choices - radio: for one from many choices, each radio button in a group - has the same NAME but a different VALUE. - submit: Sends form to server. If the SRC attribute specifies an - icon the point clicked is sent to the server. The default - NAME for this field is "Submit". Use different names for - multiple submit buttons in a form. - reset: Resets fields to their initial values. - int: for input of integers, SIZE attribute gives width of field - float: for input of floating point numbers - date: for input of dates - url: for input of universal resource locators - hidden: used by server for state info, opaque to client - range: integer range from MIN to MAX, rendered as a slider etc. - scribble: pen input, which may include time and pressure info - audio: sound input with up to MAX seconds ---> -<!ELEMENT INPUT - O EMPTY> -<!ATTLIST INPUT - id ID #IMPLIED -- to allow meta info -- - name CDATA #IMPLIED -- attribute name (may not be unique) -- - type (%fields) text -- a wide variety of field types -- - charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese -- - size CDATA #IMPLIED -- visible size of text fields -- - min NUMBER #IMPLIED -- for range controls -- - max NUMBER #IMPLIED -- for range controls or text fields -- - maxlength NUMBER #IMPLIED -- max length of text fields (equiv to max)-- - value CDATA #IMPLIED -- attribute value (altered by user) -- - checked (checked) #IMPLIED -- for check boxes and radio buttons -- - disabled (disabled) #IMPLIED -- if grayed out -- - error (error) #IMPLIED -- if in error -- - src %URL; #IMPLIED -- for SUBMIT, SCRIBBLE & AUDIO fields -- - alt CDATA #IMPLIED -- alternative text for VT100's etc -- - align (top|middle|bottom) top -- for IMAGE fields only --> - -<!-- multiline text input fields, we probably will want - to generalise this to accept arbitrary clipboard data - e.g. hypertext and images, in addition to plain text --> -<!ELEMENT TEXTAREA - - RCDATA -- multi-line text fields --> -<!ATTLIST TEXTAREA - id ID #IMPLIED -- to allow meta info -- - name CDATA #IMPLIED -- attribute name (may not be unique) -- - cols NUMBER #IMPLIED -- visible width in characters -- - rows NUMBER #IMPLIED -- visible height in characters -- - wrap (wrap) #IMPLIED -- wrap input in text area -- - disabled (disabled) #IMPLIED -- if grayed out -- - error (error) #IMPLIED -- if in error -- - charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> - -<!-- - The EDIT attribute when present allows you to type and - edit the selected option. - - The SRC attribute allows for graphical menus, e.g. users - wanting to buy a house could click on each of the areas on - a map that they were interested in. - --> -<!ELEMENT SELECT - - (OPTION+) -- combo style selection lists --> -<!ATTLIST SELECT - id ID #IMPLIED -- to allow meta info -- - name CDATA #IMPLIED -- attribute name (may not be unique) -- - edit NUMBER #IMPLIED -- width of editable selection -- - multiple (multiple) #IMPLIED -- permits multiple selections -- - error (error) #IMPLIED -- if in error -- - src %URL; #IMPLIED -- for graphical menus -- - charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> - -<!-- The SHAPE attribute defines a region in the image that - is specified by the SRC attribute for the SELECT element --> -<!ELEMENT OPTION - O RCDATA> -<!ATTLIST OPTION - id ID #IMPLIED -- to allow meta info -- - value CDATA #IMPLIED -- attribute value -- - selected (selected) #IMPLIED -- if initially selected -- - disabled (disabled) #IMPLIED -- if grayed out -- - shape CDATA #IMPLIED -- list of points for shaped region -- - charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> - -<!-- - Scripts executed by the client need a way of displaying - warning/error messages. We define an element so that the - server too can initialise this one-per-form message area. - Clients should preferably avoid displaying the message - in-line, as the window size may prevent the user from - seeing the message. - --> -<!ELEMENT MESSAGE - O RCDATA -- place for error/warning/info --> -<!ATTLIST MESSAGE - id ID #IMPLIED -- to allow meta info -- - status (info|warning|error) info - charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> -]]> - -<![ %HTML.figures [ - -<!-- figures which subsume the role of the earlier IMG element. - - Behaves identically to IMG for align = top, middle or bottom. - Otherwise figure is inserted after next line break (soft or hard). - For align=left, the image is left aligned and text is flowed - on the right of the image, and similarly for align=right, with - no text flow for align=center (the default). The caption is - placed under the image. - - Finer control of the vertical positioning relative to the text - line is possible with the baseline attribute. When present, the - figure acts like the IMG element but is shifted so that the baseline - occurs at the specified number of pixels above the bottom of the image. - If this is given as a floating point number, it is interpreted as a - fraction of the image height and must lie in the range (0.0 to 1.0) - - The <A> element is used for shaped buttons handled by browser, - while the ISMAP mechanism sends pointer clicks/drags to server. - The text contained by this element is used for text-only displays - and authors should remember to provide effective descriptions, - including label text for shaped buttons. ---> -<!ELEMENT FIG - - (CAPTION?, P*)> -<!ATTLIST FIG - id ID #IMPLIED - align (top|middle|bottom|left|center|right) center -- position -- - baseline NUMBER #IMPLIED -- height of baseline above image bottom -- - ismap (ismap) #IMPLIED -- server can handle mouse clicks/drags -- - src %URL; #IMPLIED -- link to image data -- - charset CDATA #IMPLIED -- eg "ISO-2022-JP" for japanese --> -]]> - -<!-- img is left in for at least the short term --> -<!ELEMENT IMG - O EMPTY> -<!ATTLIST IMG - src %URL; #REQUIRED -- where to get image data -- - align (top|middle|bottom) top -- top, middle or bottom -- - baseline NUMBER #IMPLIED -- height of baseline above image bottom -- - alt CDATA #IMPLIED -- description for text-only displays -- - ismap (ismap) #IMPLIED -- send mouse clicks/drags to server --> - -<![ %HTML.math [ - -<!-- Proposal for representing formulae - - Delimiters should stretch to match the size of the delimited - object. <SUB> and <SUP> are used for subscripts and superscripts - - i j - X <SUP>i</SUP>Y<SUP>j</SUP> is X Y - - i.e. the space following the X disambiguates the binding. ---> - -<!ELEMENT MATH - - (%math;)*> -<!ATTLIST MATH id ID #IMPLIED> - -<!-- Invisible brackets which may also be - used for numerators and denominators: - - 1 + X - <BOX>1 + X<OVER>Y</BOX> is _______ - Y - - _____ - <BOX><OVER>X + Y</BOX> is X + Y ---> -<!ELEMENT BOX - - ((%math;)*, (OVER, (%math;)*)?)> - -<!-- Horizontal line between numerator and denominator - The symbol attribute allows authors to supply an - entity name for an arrow symbol etc. - --> -<!ELEMENT OVER - O EMPTY> -<!ATTLIST OVER symbol ENTITY #IMPLIED> - -<!-- Roots - default to square root --> -<!ELEMENT ROOT - - (%math;)*> -<!ATTLIST ROOT root CDATA #IMPLIED> - -<!-- LaTeX like arrays. The align attribute specifies - a single letter for each column, which also determines - how the column should be aligned, e.g. align=ccc" - - "l" left - "c" center - "r" right ---> -<!ELEMENT ARRAY - - (ITEM)+> -<!ATTLIST ARRAY align CDATA #REQUIRED> - -<!ELEMENT ITEM - O (%math;)*> - -]]> - -<!-- The END --> -]> -
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/sgml/html-s.dtd Mon Aug 13 08:46:35 2007 +0200 @@ -0,0 +1,30 @@ +<!-- html-P.dtd + + Document Type Definition for the HyperText Markup Language + with strict validation (HTML Strict DTD). + + $Id: html-s.dtd,v 1.1.1.1 1996/12/18 03:43:04 steve Exp $ + + Author: Daniel W. Connolly <connolly@hal.com> + See Also: http://www.hal.com/%7Econnolly/html-spec/index.html + http://info.cern.ch/hypertext/WWW/MarkUp2/MarkUp.html +--> + +<!ENTITY % HTML.Version + "-//IETF//DTD HTML Strict Level 2//EN//2.0" + + -- Typical usage: + + <!DOCTYPE HTML PUBLIC + "-//IETF//DTD HTML Strict//EN"> + <html> + ... + </html> + -- + > + +<!-- Feature Test Entities --> +<!ENTITY % HTML.Recommended "INCLUDE"> + +<!ENTITY % html PUBLIC "-//IETF//DTD HTML Level 2//EN//2.0"> +%html;
--- a/etc/sgml/html.decl Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/sgml/html.decl Mon Aug 13 08:46:35 2007 +0200 @@ -18,7 +18,7 @@ BASESET "ISO Registration Number 100//CHARSET ECMA-94 Right Part of Latin Alphabet Nr. 1//ESC 2/13 4/1" DESCSET 128 32 UNUSED - 160 96 32 + 160 96 UNUSED CAPACITY SGMLREF TOTALCAP 150000 @@ -90,7 +90,7 @@ APPINFO NONE > <!-- - $Id: html.decl,v 1.1.1.1 1996/12/18 03:28:57 steve Exp $ + $Id: html.decl,v 1.1.1.2 1996/12/18 03:43:03 steve Exp $ Author: Daniel W. Connolly <connolly@hal.com>
--- a/etc/sgml/html.dtd Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/sgml/html.dtd Mon Aug 13 08:46:35 2007 +0200 @@ -1,308 +1,616 @@ -<!SGML "ISO 8879:1986" --- - Document Type Definition for the HyperText Markup Language - as used by the World Wide Web application (HTML DTD). - - NOTE: This is a definition of HTML with respect to - SGML, and assumes an understanding of SGML terms. - - If you find bugs in this DTD or find it does not compile - under some circumstances please mail www-bug@info.cern.ch --- - -CHARSET - BASESET "ISO 646:1983//CHARSET - International Reference Version (IRV)//ESC 2/5 4/0" - DESCSET 0 9 UNUSED - 9 2 9 - 11 2 UNUSED - 13 1 13 - 14 18 UNUSED - 32 95 32 - 127 1 UNUSED - BASESET "ISO Registration Number 100//CHARSET - ECMA-94 Right Part of Latin Alphabet Nr. 1//ESC 2/13 4/1" - DESCSET 128 32 UNUSED - 160 95 32 - 255 1 UNUSED - +<!-- html.dtd -CAPACITY SGMLREF - TOTALCAP 150000 - GRPCAP 150000 - -SCOPE DOCUMENT -SYNTAX - SHUNCHAR CONTROLS 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 - 19 20 21 22 23 24 25 26 27 28 29 30 31 127 255 - BASESET "ISO 646:1983//CHARSET - International Reference Version (IRV)//ESC 2/5 4/0" - DESCSET 0 128 0 - FUNCTION RE 13 - RS 10 - SPACE 32 - TAB SEPCHAR 9 - NAMING LCNMSTRT "" - UCNMSTRT "" - LCNMCHAR ".-" - UCNMCHAR ".-" - NAMECASE GENERAL YES - ENTITY NO - DELIM GENERAL SGMLREF - SHORTREF SGMLREF - NAMES SGMLREF - QUANTITY SGMLREF - NAMELEN 34 - TAGLVL 100 - LITLEN 1024 - GRPGTCNT 150 - GRPCNT 64 + Document Type Definition for the HyperText Markup Language + (HTML DTD) -FEATURES - MINIMIZE - DATATAG NO - OMITTAG NO - RANK NO - SHORTTAG NO - LINK - SIMPLE NO - IMPLICIT NO - EXPLICIT NO - OTHER - CONCUR NO - SUBDOC NO - FORMAL YES - APPINFO NONE -> - -<!DOCTYPE HTML [ -<!-- Jul 1 93 --> -<!-- Regarding clause 6.1, SGML Document: - - [1] SGML document = SGML document entity, - (SGML subdocument entity | - SGML text entity | non-SGML data entity)* - - The role of SGML document entity is filled by this DTD, - followed by the conventional HTML data stream. ---> - -<!-- DTD definitions --> - -<!ENTITY % heading "H1|H2|H3|H4|H5|H6" > -<!ENTITY % list " UL | OL | DIR | MENU "> -<!ENTITY % literal " XMP | LISTING "> + $Id: html.dtd,v 1.1.1.2 1996/12/18 03:43:03 steve Exp $ -<!ENTITY % headelement - " TITLE | NEXTID |ISINDEX" > - -<!ENTITY % bodyelement - "P | HR | %heading | - %list | DL | ADDRESS | PRE | BLOCKQUOTE - | %literal"> - -<!ENTITY % oldstyle "%headelement | %bodyelement | #PCDATA"> - -<!ENTITY % URL "CDATA" - -- The term URL means a CDATA attribute - whose value is a Uniform Resource Locator, - as defined. (A URN may also be usable here when defined.) - --> - -<!ENTITY % linkattributes - "NAME NMTOKEN #IMPLIED - HREF %URL; #IMPLIED - REL CDATA #IMPLIED -- forward relationship type -- - REV CDATA #IMPLIED -- reversed relationship type - to referent data: + Author: Daniel W. Connolly <connolly@w3.org> + See Also: html.decl, html-1.dtd + http://www.w3.org/hypertext/WWW/MarkUp/MarkUp.html +- --> - PARENT CHILD, SIBLING, NEXT, TOP, - DEFINITION, UPDATE, ORIGINAL etc. -- - - URN CDATA #IMPLIED -- universal resource number -- - - TITLE CDATA #IMPLIED -- advisory only -- - - METHODS NAMES #IMPLIED -- supported public methods of the object: - TEXTSEARCH, GET, HEAD, ... -- - - "> - - -<!-- Document Element --> - -<!ELEMENT HTML O O (( HEAD | BODY | %oldstyle )*, PLAINTEXT?)> - -<!ELEMENT HEAD - - ( TITLE? & ISINDEX? & NEXTID? & LINK* - & BASE?)> - -<!ELEMENT TITLE - - RCDATA - -- The TITLE element is not considered part of the flow of text. - It should be displayed, for example as the page header or - window title. - --> +<!ENTITY % HTML.Version + "-//IETF//DTD HTML 2.0//EN" -<!ELEMENT ISINDEX - O EMPTY - -- WWW clients should offer the option to perform a search on - documents containing ISINDEX. - --> - -<!ELEMENT NEXTID - O EMPTY> -<!ATTLIST NEXTID N NAME #REQUIRED - -- The number should be a name suitable for use - for the ID of a new element. When used, the value - has its numeric part incremented. EG Z67 becomes Z68 - --> -<!ELEMENT LINK - O EMPTY> -<!ATTLIST LINK - %linkattributes> - -<!ELEMENT BASE - O EMPTY -- Reference context for URLS --> -<!ATTLIST BASE - - HREF %URL; #IMPLIED + -- Typical usage: - > -<!ENTITY % inline "EM | TT | STRONG | B | I | U | - CODE | SAMP | KBD | KEY | VAR | DFN | CITE " - > - -<!ELEMENT (%inline;) - - (#PCDATA)> - -<!ENTITY % text "#PCDATA | IMG | %inline;"> - -<!ENTITY % htext "A | %text" -- Plus links, no structure --> - -<!ENTITY % stext -- as htext but also nested structure -- - "P | HR | %list | DL | ADDRESS - | PRE | BLOCKQUOTE - | %literal | %htext"> - - -<!ELEMENT BODY - - (%bodyelement|%htext;)*> - - -<!ELEMENT A - - (%text)> -<!ATTLIST A - %linkattributes; - > - -<!ELEMENT IMG - O EMPTY -- Embedded image --> -<!ATTLIST IMG - SRC %URL; #IMPLIED -- URL of document to embed -- + <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> + <html> + ... + </html> + -- > -<!ELEMENT P - O EMPTY -- separates paragraphs --> -<!ELEMENT HR - O EMPTY -- horizontal rule --> +<!--============ Feature Test Entities ========================--> + +<!ENTITY % HTML.Recommended "IGNORE" + -- Certain features of the language are necessary for + compatibility with widespread usage, but they may + compromise the structural integrity of a document. + This feature test entity enables a more prescriptive + document type definition that eliminates + those features. + --> + +<![ %HTML.Recommended [ + <!ENTITY % HTML.Deprecated "IGNORE"> +]]> + +<!ENTITY % HTML.Deprecated "INCLUDE" + -- Certain features of the language are necessary for + compatibility with earlier versions of the specification, + but they tend to be used an implemented inconsistently, + and their use is deprecated. This feature test entity + enables a document type definition that eliminates + these features. + --> + +<!ENTITY % HTML.Highlighting "INCLUDE" + -- Use this feature test entity to validate that a + document uses no highlighting tags, which may be + ignored on minimal implementations. + --> -<!ELEMENT ( %heading ) - - (%htext;)+> +<!ENTITY % HTML.Forms "INCLUDE" + -- Use this feature test entity to validate that a document + contains no forms, which may not be supported in minimal + implementations + --> + +<!--============== Imported Names ==============================--> + +<!ENTITY % Content-Type "CDATA" + -- meaning an internet media type + (aka MIME content type, as per RFC1521) + --> + +<!ENTITY % HTTP-Method "GET | POST" + -- as per HTTP specification, in progress + --> + +<!ENTITY % URI "CDATA" + -- The term URI means a CDATA attribute + whose value is a Uniform Resource Identifier, + as defined by + "Universal Resource Identifiers" by Tim Berners-Lee + aka RFC 1630 + + Note that CDATA attributes are limited by the LITLEN + capacity (1024 in the current version of html.decl), + so that URIs in HTML have a bounded length. + + --> + + +<!--========= DTD "Macros" =====================--> + +<!ENTITY % heading "H1|H2|H3|H4|H5|H6"> -<!ELEMENT DL - - (DT | DD | %stext;)*> -<!-- Content should match ((DT,(%htext;)+)+,(DD,(%stext;)+)) - But mixed content is messy. -Dan Connolly - --> - -<!ELEMENT DT - O EMPTY> -<!ELEMENT DD - O EMPTY> +<!ENTITY % list "UL|OL|DIR|MENU" > + + +<!--======= Character mnemonic entities =================--> + +<!ENTITY % ISOlat1 PUBLIC + "ISO 8879-1986//ENTITIES Added Latin 1//EN//HTML"> +%ISOlat1; + +<!ENTITY amp CDATA "&" -- ampersand --> +<!ENTITY gt CDATA ">" -- greater than --> +<!ENTITY lt CDATA "<" -- less than --> +<!ENTITY quot CDATA """ -- double quote --> + + +<!--========= SGML Document Access (SDA) Parameter Entities =====--> -<!ELEMENT (UL|OL) - - (%htext;|LI|P)+> -<!ELEMENT (DIR|MENU) - - (%htext;|LI)+> -<!-- Content should match ((LI,(%htext;)+)+) - But mixed content is messy. - --> -<!ATTLIST (%list) - COMPACT NAME #IMPLIED -- COMPACT, etc.-- +<!-- HTML 2.0 contains SGML Document Access (SDA) fixed attributes +in support of easy transformation to the International Committee +for Accessible Document Design (ICADD) DTD + "-//EC-USA-CDA/ICADD//DTD ICADD22//EN". +ICADD applications are designed to support usable access to +structured information by print-impaired individuals through +Braille, large print and voice synthesis. For more information on +SDA & ICADD: + - ISO 12083:1993, Annex A.8, Facilities for Braille, + large print and computer voice + - ICADD ListServ + <ICADD%ASUACAD.BITNET@ARIZVM1.ccit.arizona.edu> + - Usenet news group bit.listserv.easi + - Recording for the Blind, +1 800 221 4792 +- --> + +<!ENTITY % SDAFORM "SDAFORM CDATA #FIXED" + -- one to one mapping --> +<!ENTITY % SDARULE "SDARULE CDATA #FIXED" + -- context-sensitive mapping --> +<!ENTITY % SDAPREF "SDAPREF CDATA #FIXED" + -- generated text prefix --> +<!ENTITY % SDASUFF "SDASUFF CDATA #FIXED" + -- generated text suffix --> +<!ENTITY % SDASUSP "SDASUSP NAME #FIXED" + -- suspend transform process --> + + +<!--========== Text Markup =====================--> + +<![ %HTML.Highlighting [ + +<!ENTITY % font " TT | B | I "> + +<!ENTITY % phrase "EM | STRONG | CODE | SAMP | KBD | VAR | CITE "> + +<!ENTITY % text "#PCDATA | A | IMG | BR | %phrase | %font"> + +<!ELEMENT (%font;|%phrase) - - (%text)*> +<!ATTLIST ( TT | CODE | SAMP | KBD | VAR ) + %SDAFORM; "Lit" + > +<!ATTLIST ( B | STRONG ) + %SDAFORM; "B" + > +<!ATTLIST ( I | EM | CITE ) + %SDAFORM; "It" > -<!ELEMENT LI - O EMPTY> +<!-- <TT> Typewriter text --> +<!-- <B> Bold text --> +<!-- <I> Italic text --> + +<!-- <EM> Emphasized phrase --> +<!-- <STRONG> Strong emphais --> +<!-- <CODE> Source code phrase --> +<!-- <SAMP> Sample text or characters --> +<!-- <KBD> Keyboard phrase, e.g. user input --> +<!-- <VAR> Variable phrase or substituable --> +<!-- <CITE> Name or title of cited work --> + +<!ENTITY % pre.content "#PCDATA | A | HR | BR | %font | %phrase"> + +]]> + +<!ENTITY % text "#PCDATA | A | IMG | BR"> + +<!ELEMENT BR - O EMPTY> +<!ATTLIST BR + %SDAPREF; "&#RE;" + > + +<!-- <BR> Line break --> + + +<!--========= Link Markup ======================--> + +<!ENTITY % linkType "NAME"> + +<!ENTITY % linkExtraAttributes + "REL %linkType #IMPLIED + REV %linkType #IMPLIED + URN CDATA #IMPLIED + TITLE CDATA #IMPLIED + METHODS NAMES #IMPLIED + "> + +<![ %HTML.Recommended [ + <!ENTITY % A.content "(%text)*" + + -- <H1><a name="xxx">Heading</a></H1> + is preferred to + <a name="xxx"><H1>Heading</H1></a> + --> +]]> + +<!ENTITY % A.content "(%heading|%text)*"> + +<!ELEMENT A - - %A.content -(A)> +<!ATTLIST A + HREF %URI #IMPLIED + NAME CDATA #IMPLIED + %linkExtraAttributes; + %SDAPREF; "<Anchor: #AttList>" + > +<!-- <A> Anchor; source/destination of link --> +<!-- <A NAME="..."> Name of this anchor --> +<!-- <A HREF="..."> Address of link destination --> +<!-- <A URN="..."> Permanent address of destination --> +<!-- <A REL=...> Relationship to destination --> +<!-- <A REV=...> Relationship of destination to this --> +<!-- <A TITLE="..."> Title of destination (advisory) --> +<!-- <A METHODS="..."> Operations on destination (advisory) --> + + +<!--========== Images ==========================--> + +<!ELEMENT IMG - O EMPTY> +<!ATTLIST IMG + SRC %URI; #REQUIRED + ALT CDATA #IMPLIED + ALIGN (top|middle|bottom) #IMPLIED + ISMAP (ISMAP) #IMPLIED + %SDAPREF; "<Fig><?SDATrans Img: #AttList>#AttVal(Alt)</Fig>" + > -<!ELEMENT BLOCKQUOTE - - (%htext;|P)+ - -- for quoting some other source --> +<!-- <IMG> Image; icon, glyph or illustration --> +<!-- <IMG SRC="..."> Address of image object --> +<!-- <IMG ALT="..."> Textual alternative --> +<!-- <IMG ALIGN=...> Position relative to text --> +<!-- <IMG ISMAP> Each pixel can be a link --> + +<!--========== Paragraphs=======================--> + +<!ELEMENT P - O (%text)*> +<!ATTLIST P + %SDAFORM; "Para" + > + +<!-- <P> Paragraph --> + + +<!--========== Headings, Titles, Sections ===============--> + +<!ELEMENT HR - O EMPTY> +<!ATTLIST HR + %SDAPREF; "&#RE;&#RE;" + > + +<!-- <HR> Horizontal rule --> -<!ELEMENT ADDRESS - - (%htext;|P)+> +<!ELEMENT ( %heading ) - - (%text;)*> +<!ATTLIST H1 + %SDAFORM; "H1" + > +<!ATTLIST H2 + %SDAFORM; "H2" + > +<!ATTLIST H3 + %SDAFORM; "H3" + > +<!ATTLIST H4 + %SDAFORM; "H4" + > +<!ATTLIST H5 + %SDAFORM; "H5" + > +<!ATTLIST H6 + %SDAFORM; "H6" + > -<!ELEMENT PRE - - (#PCDATA|%inline|A|P)+> +<!-- <H1> Heading, level 1 --> +<!-- <H2> Heading, level 2 --> +<!-- <H3> Heading, level 3 --> +<!-- <H4> Heading, level 4 --> +<!-- <H5> Heading, level 5 --> +<!-- <H6> Heading, level 6 --> + + +<!--========== Text Flows ======================--> + +<![ %HTML.Forms [ + <!ENTITY % block.forms "BLOCKQUOTE | FORM | ISINDEX"> +]]> + +<!ENTITY % block.forms "BLOCKQUOTE"> + +<![ %HTML.Deprecated [ + <!ENTITY % preformatted "PRE | XMP | LISTING"> +]]> + +<!ENTITY % preformatted "PRE"> + +<!ENTITY % block "P | %list | DL + | %preformatted + | %block.forms"> + +<!ENTITY % flow "(%text|%block)*"> + +<!ENTITY % pre.content "#PCDATA | A | HR | BR"> + +<!ELEMENT PRE - - (%pre.content)*> <!ATTLIST PRE WIDTH NUMBER #implied + %SDAFORM; "Lit" > -<!-- Mnemonic character entities. --> -<!ENTITY AElig "Æ" -- capital AE diphthong (ligature) --> -<!ENTITY Aacute "Á" -- capital A, acute accent --> -<!ENTITY Acirc "Â" -- capital A, circumflex accent --> -<!ENTITY Agrave "À" -- capital A, grave accent --> -<!ENTITY Aring "Å" -- capital A, ring --> -<!ENTITY Atilde "Ã" -- capital A, tilde --> -<!ENTITY Auml "Ä" -- capital A, dieresis or umlaut mark --> -<!ENTITY Ccedil "Ç" -- capital C, cedilla --> -<!ENTITY ETH "Ð" -- capital Eth, Icelandic --> -<!ENTITY Eacute "É" -- capital E, acute accent --> -<!ENTITY Ecirc "Ê" -- capital E, circumflex accent --> -<!ENTITY Egrave "È" -- capital E, grave accent --> -<!ENTITY Euml "Ë" -- capital E, dieresis or umlaut mark --> -<!ENTITY Iacute "Í" -- capital I, acute accent --> -<!ENTITY Icirc "Î" -- capital I, circumflex accent --> -<!ENTITY Igrave "Ì" -- capital I, grave accent --> -<!ENTITY Iuml "Ï" -- capital I, dieresis or umlaut mark --> -<!ENTITY Ntilde "Ñ" -- capital N, tilde --> -<!ENTITY Oacute "Ó" -- capital O, acute accent --> -<!ENTITY Ocirc "Ô" -- capital O, circumflex accent --> -<!ENTITY Ograve "Ò" -- capital O, grave accent --> -<!ENTITY Oslash "Ø" -- capital O, slash --> -<!ENTITY Otilde "Õ" -- capital O, tilde --> -<!ENTITY Ouml "Ö" -- capital O, dieresis or umlaut mark --> -<!ENTITY THORN "Þ" -- capital THORN, Icelandic --> -<!ENTITY Uacute "Ú" -- capital U, acute accent --> -<!ENTITY Ucirc "Û" -- capital U, circumflex accent --> -<!ENTITY Ugrave "Ù" -- capital U, grave accent --> -<!ENTITY Uuml "Ü" -- capital U, dieresis or umlaut mark --> -<!ENTITY Yacute "Ý" -- capital Y, acute accent --> -<!ENTITY aacute "á" -- small a, acute accent --> -<!ENTITY acirc "â" -- small a, circumflex accent --> -<!ENTITY aelig "æ" -- small ae diphthong (ligature) --> -<!ENTITY agrave "à" -- small a, grave accent --> -<!ENTITY amp "&" -- ampersand --> -<!ENTITY aring "å" -- small a, ring --> -<!ENTITY atilde "ã" -- small a, tilde --> -<!ENTITY auml "ä" -- small a, dieresis or umlaut mark --> -<!ENTITY ccedil "ç" -- small c, cedilla --> -<!ENTITY eacute "é" -- small e, acute accent --> -<!ENTITY ecirc "ê" -- small e, circumflex accent --> -<!ENTITY egrave "è" -- small e, grave accent --> -<!ENTITY eth "ð" -- small eth, Icelandic --> -<!ENTITY euml "ë" -- small e, dieresis or umlaut mark --> -<!ENTITY gt ">" -- greater than --> -<!ENTITY iacute "í" -- small i, acute accent --> -<!ENTITY icirc "î" -- small i, circumflex accent --> -<!ENTITY igrave "ì" -- small i, grave accent --> -<!ENTITY iuml "ï" -- small i, dieresis or umlaut mark --> -<!ENTITY lt "<" -- less than --> -<!ENTITY nbsp " " -- should be NON_BREAKING space --> -<!ENTITY ntilde "ñ" -- small n, tilde --> -<!ENTITY oacute "ó" -- small o, acute accent --> -<!ENTITY ocirc "ô" -- small o, circumflex accent --> -<!ENTITY ograve "ò" -- small o, grave accent --> -<!ENTITY oslash "ø" -- small o, slash --> -<!ENTITY otilde "õ" -- small o, tilde --> -<!ENTITY ouml "ö" -- small o, dieresis or umlaut mark --> -<!ENTITY szlig "ß" -- small sharp s, German (sz ligature) --> -<!ENTITY thorn "þ" -- small thorn, Icelandic --> -<!ENTITY uacute "ú" -- small u, acute accent --> -<!ENTITY ucirc "û" -- small u, circumflex accent --> -<!ENTITY ugrave "ù" -- small u, grave accent --> -<!ENTITY uuml "ü" -- small u, dieresis or umlaut mark --> -<!ENTITY yacute "ý" -- small y, acute accent --> -<!ENTITY yuml "ÿ" -- small y, dieresis or umlaut mark --> +<!-- <PRE> Preformatted text --> +<!-- <PRE WIDTH=...> Maximum characters per line --> + +<![ %HTML.Deprecated [ + +<!ENTITY % literal "CDATA" + -- historical, non-conforming parsing mode where + the only markup signal is the end tag + in full + --> + +<!ELEMENT (XMP|LISTING) - - %literal> +<!ATTLIST XMP + %SDAFORM; "Lit" + %SDAPREF; "Example:&#RE;" + > +<!ATTLIST LISTING + %SDAFORM; "Lit" + %SDAPREF; "Listing:&#RE;" + > + +<!-- <XMP> Example section --> +<!-- <LISTING> Computer listing --> + +<!ELEMENT PLAINTEXT - O %literal> +<!-- <PLAINTEXT> Plain text passage --> + +<!ATTLIST PLAINTEXT + %SDAFORM; "Lit" + > +]]> + + +<!--========== Lists ==================--> + +<!ELEMENT DL - - (DT | DD)+> +<!ATTLIST DL + COMPACT (COMPACT) #IMPLIED + %SDAFORM; "List" + %SDAPREF; "Definition List:" + > + +<!ELEMENT DT - O (%text)*> +<!ATTLIST DT + %SDAFORM; "Term" + > + +<!ELEMENT DD - O %flow> +<!ATTLIST DD + %SDAFORM; "LItem" + > + +<!-- <DL> Definition list, or glossary --> +<!-- <DL COMPACT> Compact style list --> +<!-- <DT> Term in definition list --> +<!-- <DD> Definition of term --> + +<!ELEMENT (OL|UL) - - (LI)+> +<!ATTLIST OL + COMPACT (COMPACT) #IMPLIED + %SDAFORM; "List" + > +<!ATTLIST UL + COMPACT (COMPACT) #IMPLIED + %SDAFORM; "List" + > +<!-- <UL> Unordered list --> +<!-- <UL COMPACT> Compact list style --> +<!-- <OL> Ordered, or numbered list --> +<!-- <OL COMPACT> Compact list style --> + + +<!ELEMENT (DIR|MENU) - - (LI)+ -(%block)> +<!ATTLIST DIR + COMPACT (COMPACT) #IMPLIED + %SDAFORM; "List" + %SDAPREF; "<LHead>Directory</LHead>" + > +<!ATTLIST MENU + COMPACT (COMPACT) #IMPLIED + %SDAFORM; "List" + %SDAPREF; "<LHead>Menu</LHead>" + > + +<!-- <DIR> Directory list --> +<!-- <DIR COMPACT> Compact list style --> +<!-- <MENU> Menu list --> +<!-- <MENU COMPACT> Compact list style --> + +<!ELEMENT LI - O %flow> +<!ATTLIST LI + %SDAFORM; "LItem" + > + +<!-- <LI> List item --> + +<!--========== Document Body ===================--> + +<![ %HTML.Recommended [ + <!ENTITY % body.content "(%heading|%block|HR|ADDRESS|IMG)*" + + -- <h1>Heading</h1> + <p>Text ... + is preferred to + <h1>Heading</h1> + Text ... + --> +]]> + +<!ENTITY % body.content "(%heading | %text | %block | + HR | ADDRESS)*"> + +<!ELEMENT BODY O O %body.content> + +<!-- <BODY> Document body --> + +<!ELEMENT BLOCKQUOTE - - %body.content> +<!ATTLIST BLOCKQUOTE + %SDAFORM; "BQ" + > + +<!-- <BLOCKQUOTE> Quoted passage --> + +<!ELEMENT ADDRESS - - (%text|P)*> +<!ATTLIST ADDRESS + %SDAFORM; "Lit" + %SDAPREF; "Address:&#RE;" + > + +<!-- <ADDRESS> Address, signature, or byline --> + + +<!--======= Forms ====================--> + +<![ %HTML.Forms [ + +<!ELEMENT FORM - - %body.content -(FORM) +(INPUT|SELECT|TEXTAREA)> +<!ATTLIST FORM + ACTION %URI #IMPLIED + METHOD (%HTTP-Method) GET + ENCTYPE %Content-Type; "application/x-www-form-urlencoded" + %SDAPREF; "<Para>Form:</Para>" + %SDASUFF; "<Para>Form End.</Para>" + > + +<!-- <FORM> Fill-out or data-entry form --> +<!-- <FORM ACTION="..."> Address for completed form --> +<!-- <FORM METHOD=...> Method of submitting form --> +<!-- <FORM ENCTYPE="..."> Representation of form data --> -<!-- deprecated elements --> +<!ENTITY % InputType "(TEXT | PASSWORD | CHECKBOX | + RADIO | SUBMIT | RESET | + IMAGE | HIDDEN )"> +<!ELEMENT INPUT - O EMPTY> +<!ATTLIST INPUT + TYPE %InputType TEXT + NAME CDATA #IMPLIED + VALUE CDATA #IMPLIED + SRC %URI #IMPLIED + CHECKED (CHECKED) #IMPLIED + SIZE CDATA #IMPLIED + MAXLENGTH NUMBER #IMPLIED + ALIGN (top|middle|bottom) #IMPLIED + %SDAPREF; "Input: " + > + +<!-- <INPUT> Form input datum --> +<!-- <INPUT TYPE=...> Type of input interaction --> +<!-- <INPUT NAME=...> Name of form datum --> +<!-- <INPUT VALUE="..."> Default/initial/selected value --> +<!-- <INPUT SRC="..."> Address of image --> +<!-- <INPUT CHECKED> Initial state is "on" --> +<!-- <INPUT SIZE=...> Field size hint --> +<!-- <INPUT MAXLENGTH=...> Data length maximum --> +<!-- <INPUT ALIGN=...> Image alignment --> + +<!ELEMENT SELECT - - (OPTION+) -(INPUT|SELECT|TEXTAREA)> +<!ATTLIST SELECT + NAME CDATA #REQUIRED + SIZE NUMBER #IMPLIED + MULTIPLE (MULTIPLE) #IMPLIED + %SDAFORM; "List" + %SDAPREF; + "<LHead>Select #AttVal(Multiple)</LHead>" + > -<!ELEMENT (%literal) - - CDATA> +<!-- <SELECT> Selection of option(s) --> +<!-- <SELECT NAME=...> Name of form datum --> +<!-- <SELECT SIZE=...> Options displayed at a time --> +<!-- <SELECT MULTIPLE> Multiple selections allowed --> + +<!ELEMENT OPTION - O (#PCDATA)*> +<!ATTLIST OPTION + SELECTED (SELECTED) #IMPLIED + VALUE CDATA #IMPLIED + %SDAFORM; "LItem" + %SDAPREF; + "Option: #AttVal(Value) #AttVal(Selected)" + > + +<!-- <OPTION> A selection option --> +<!-- <OPTION SELECTED> Initial state --> +<!-- <OPTION VALUE="..."> Form datum value for this option--> -<!ELEMENT PLAINTEXT - O EMPTY> +<!ELEMENT TEXTAREA - - (#PCDATA)* -(INPUT|SELECT|TEXTAREA)> +<!ATTLIST TEXTAREA + NAME CDATA #REQUIRED + ROWS NUMBER #REQUIRED + COLS NUMBER #REQUIRED + %SDAFORM; "Para" + %SDAPREF; "Input Text -- #AttVal(Name): " + > + +<!-- <TEXTAREA> An area for text input --> +<!-- <TEXTAREA NAME=...> Name of form datum --> +<!-- <TEXTAREA ROWS=...> Height of area --> +<!-- <TEXTAREA COLS=...> Width of area --> + +]]> + + +<!--======= Document Head ======================--> -<!-- Local Variables: --> -<!-- mode: sgml --> -<!-- compile-command: "sgmls -s -p " --> -<!-- end: --> -]> +<![ %HTML.Recommended [ + <!ENTITY % head.extra ""> +]]> +<!ENTITY % head.extra "& NEXTID?"> + +<!ENTITY % head.content "TITLE & ISINDEX? & BASE? %head.extra"> + +<!ELEMENT HEAD O O (%head.content) +(META|LINK)> + +<!-- <HEAD> Document head --> + +<!ELEMENT TITLE - - (#PCDATA)*> +<!ATTLIST TITLE + %SDAFORM; "Ti" > + +<!-- <TITLE> Title of document --> + +<!ELEMENT LINK - O EMPTY> +<!ATTLIST LINK + HREF %URI #REQUIRED + %linkExtraAttributes; + %SDAPREF; "Linked to : #AttVal (TITLE) (URN) (HREF)>" > + +<!-- <LINK> Link from this document --> +<!-- <LINK HREF="..."> Address of link destination --> +<!-- <LINK URN="..."> Lasting name of destination --> +<!-- <LINK REL=...> Relationship to destination --> +<!-- <LINK REV=...> Relationship of destination to this --> +<!-- <LINK TITLE="..."> Title of destination (advisory) --> +<!-- <LINK METHODS="..."> Operations allowed (advisory) --> + +<!ELEMENT ISINDEX - O EMPTY> +<!ATTLIST ISINDEX + %SDAPREF; + "<Para>[Document is indexed/searchable.]</Para>"> + +<!-- <ISINDEX> Document is a searchable index --> + +<!ELEMENT BASE - O EMPTY> +<!ATTLIST BASE + HREF %URI; #REQUIRED > + +<!-- <BASE> Base context document --> +<!-- <BASE HREF="..."> Address for this document --> + +<!ELEMENT NEXTID - O EMPTY> +<!ATTLIST NEXTID + N CDATA #REQUIRED > + +<!-- <NEXTID> Next ID to use for link name --> +<!-- <NEXTID N=...> Next ID to use for link name --> + +<!ELEMENT META - O EMPTY> +<!ATTLIST META + HTTP-EQUIV NAME #IMPLIED + NAME NAME #IMPLIED + CONTENT CDATA #REQUIRED > + +<!-- <META> Generic Metainformation --> +<!-- <META HTTP-EQUIV=...> HTTP response header name --> +<!-- <META NAME=...> Metainformation name --> +<!-- <META CONTENT="..."> Associated information --> + +<!--======= Document Structure =================--> + +<![ %HTML.Deprecated [ + <!ENTITY % html.content "HEAD, BODY, PLAINTEXT?"> +]]> +<!ENTITY % html.content "HEAD, BODY"> + +<!ELEMENT HTML O O (%html.content)> +<!ENTITY % version.attr "VERSION CDATA #FIXED '%HTML.Version;'"> + +<!ATTLIST HTML + %version.attr; + %SDAFORM; "Book" + > + +<!-- <HTML> HTML Document -->
--- a/etc/sgml/html2.decl Mon Aug 13 08:45:53 2007 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,78 +0,0 @@ -<!SGML "ISO 8879:1986" --- -SGML Declaration for HyperText Markup Language (HTML). --- -CHARSET - BASESET "ISO 646:1983//CHARSET - International Reference Version - (IRV)//ESC 2/5 4/0" - DESCSET 0 9 UNUSED - 9 2 9 - 11 2 UNUSED - 13 1 13 - 14 18 UNUSED - 32 95 32 - 127 1 UNUSED - BASESET "ISO Registration Number 100//CHARSET - ECMA-94 Right Part of - Latin Alphabet Nr. 1//ESC 2/13 4/1" - DESCSET 128 32 UNUSED - 160 96 32 -CAPACITY SGMLREF - TOTALCAP 150000 - GRPCAP 150000 -ENTCAP 150000 -SCOPE DOCUMENT -SYNTAX - SHUNCHAR CONTROLS 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 - 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 127 - BASESET "ISO 646:1983//CHARSET - International Reference Version - (IRV)//ESC 2/5 4/0" - DESCSET 0 128 0 - FUNCTION - RE 13 - RS 10 - SPACE 32 - TAB SEPCHAR 9 - NAMING LCNMSTRT "" - UCNMSTRT "" - LCNMCHAR ".-" - UCNMCHAR ".-" - NAMECASE GENERAL YES - ENTITY NO - DELIM GENERAL SGMLREF - SHORTREF SGMLREF - NAMES SGMLREF - QUANTITY SGMLREF - ATTSPLEN 2100 - LITLEN 1024 - NAMELEN 72 -- somewhat arbitrary; taken from - internet line length conventions -- - PILEN 1024 - TAGLVL 100 - TAGLEN 2100 - GRPGTCNT 150 - GRPCNT 64 -FEATURES - MINIMIZE - DATATAG NO - OMITTAG YES - RANK NO - SHORTTAG YES - LINK - SIMPLE NO - IMPLICIT NO - EXPLICIT NO - OTHER - CONCUR NO - SUBDOC NO - FORMAL YES - APPINFO "SDA" -- conforming SGML Document Access application - -- -> -<!-- -$Id: html2.decl,v 1.1.1.1 1996/12/18 03:28:57 steve Exp $ -Author: Daniel W. Connolly <connolly@w3.org> -See also: http://www.w3.org/hypertext/WWW/MarkUp/MarkUp.html - -->
--- a/etc/sgml/html3.decl Mon Aug 13 08:45:53 2007 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,163 +0,0 @@ -<!SGML "ISO 8879:1986" --- - Document Type Definition for the HyperText Markup Language Plus - for use with the World Wide Web application (HTML+ DTD). - This DTD is designed for use with SGML authoring tools and - it is expected that most browsers will tolerate omissions, - in particular, missing <DIVn> elements and <P> start tags - following headers, which can easily be inferred from the context. - - The HTML+ DTD which is structured as an HTML core plus a - number of additional modules which can be included by an - entity definition in a document's <!DOCTYPE> element. - You can include specific features in your document - using the DOCTYPE declaration at the start, e.g. - - <!DOCTYPE htmlplus [ - <!ENTITY % HTML.tables "INCLUDE"> - <!ENTITY % HTML.forms "INCLUDE"> - ]> - - This spec also allows for authors to extend the DTD and - to define how any new elements are rendered in terms of - existing ones. This should be used with caution. - - I would like to acknowledge the influence of the TEI DTDs - which proved very helpful in restructuring the DTD. - - Dave Raggett <dsr@hplb.hpl.hp.com> 5th April 1994 - - Changes: - - Added align attribute to headers with same values - and meaning as for paragraphs. - - Added prologue and epilogue elements and fixed bug - in definition of %paras with HTML.emph. - - Added entity names for standard icons c/o Bert Bos. - This are enabled with the HTML.icons switch. - - Added PRE to content model for LI and DD, and changed - DL to require at least one DT per DD. Math is now - part of %text; but can't be nested. - - Tried to permit an optional epilogue following last - division, but sgmls gave: Content model is ambiguous - - Added support for graphical menus to SELECT/OPTION. - - Liberalised content model for headers to %text; - Added optional NOFOLD attribute to P element to - inhibit SGML folding of whitespace. - - Dropped the LIT element and changed the TAB element - over to the LaTeX model. Added NOWRAP to P element. - Replaced TH/TD's align=numeric with ALIGNON="." etc. - - Made anchor NAME attribute conditional on HTML.obsolete - Added HTML.obsolete for obsoleted HTML elements - - Added SIG attribute to A and LINK for specifying - a digital signature to attest that a linked document - is unchanged. - - SRC attribute added to NOTE to allow authors to override - the default icon chosen on the basis of the ROLE attribute. - - Switched REL/REV back to CDATA to avoid trouble with duplicate - name or name token error. Using an explicit list of relationship - types would force us to drop REV. - - Added top/bottom alignment attribute to CAPTION - - REL and REV domains now defined by parameter entities - - SRC attribute added to LINK to allow images to be used - in document specific toolbar - - Baseline attribute added to FIG and IMG to give precise - control of vertical position relative to baseline. - - Revised comments for <A> and <LINK> to remove references to - obsoleted timing attributes and to add a list of "standard" - relationship types. - - CHANGED element now uses more meaningful attribute names. - - STATE dropped in favor of INPUT with TYPE="hidden". Forms now - support a link to a script for client-side execution of constraints. - - The element definition for DIV1..DIV6 and P no longer permit the - start tag to be omitted. This was regrettably forced by a - restriction in the SGML standard. Browsers *must* be capable of - inferring them when missing,in order to cope with legacy documents. - - Fixed some errors in earlier version to do with start tags and - definitions of parameter entities. The content model for FIG has - been changed to use a P element for text to avoid an SGML parsing - problem with a line break before the caption. --- -CHARSET - BASESET "ISO 646:1983//CHARSET - International Reference Version (IRV)//ESC 2/5 4/0" - DESCSET 0 9 UNUSED - 9 2 9 - 11 2 UNUSED - 13 1 13 - 14 18 UNUSED - 32 95 32 - 127 1 UNUSED - BASESET "ISO Registration Number 100//CHARSET - ECMA-94 Right Part of Latin Alphabet Nr. 1//ESC 2/13 4/1" - DESCSET 128 32 UNUSED - 160 95 32 - 255 1 UNUSED - -CAPACITY SGMLREF - TOTALCAP 150000 - GRPCAP 150000 - -SCOPE DOCUMENT -SYNTAX - SHUNCHAR CONTROLS 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 - 19 20 21 22 23 24 25 26 27 28 29 30 31 127 255 - BASESET "ISO 646:1983//CHARSET - International Reference Version (IRV)//ESC 2/5 4/0" - DESCSET 0 128 0 - FUNCTION RE 13 - RS 10 - SPACE 32 - TAB SEPCHAR 9 - NAMING LCNMSTRT "" - UCNMSTRT "" - LCNMCHAR ".-" - UCNMCHAR ".-" - NAMECASE GENERAL YES - ENTITY NO - DELIM GENERAL SGMLREF - SHORTREF SGMLREF - NAMES SGMLREF - QUANTITY SGMLREF - NAMELEN 32 - TAGLVL 100 - LITLEN 1024 - GRPGTCNT 150 - GRPCNT 64 - -FEATURES - MINIMIZE - DATATAG NO - OMITTAG YES - RANK NO - SHORTTAG NO - LINK - SIMPLE NO - IMPLICIT NO - EXPLICIT NO - OTHER - CONCUR NO - SUBDOC NO - FORMAL YES - APPINFO NONE ->
--- a/etc/sgml/htmlplus.decl Mon Aug 13 08:45:53 2007 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,163 +0,0 @@ -<!SGML "ISO 8879:1986" --- - Document Type Definition for the HyperText Markup Language Plus - for use with the World Wide Web application (HTML+ DTD). - This DTD is designed for use with SGML authoring tools and - it is expected that most browsers will tolerate omissions, - in particular, missing <DIVn> elements and <P> start tags - following headers, which can easily be inferred from the context. - - The HTML+ DTD which is structured as an HTML core plus a - number of additional modules which can be included by an - entity definition in a document's <!DOCTYPE> element. - You can include specific features in your document - using the DOCTYPE declaration at the start, e.g. - - <!DOCTYPE htmlplus [ - <!ENTITY % HTML.tables "INCLUDE"> - <!ENTITY % HTML.forms "INCLUDE"> - ]> - - This spec also allows for authors to extend the DTD and - to define how any new elements are rendered in terms of - existing ones. This should be used with caution. - - I would like to acknowledge the influence of the TEI DTDs - which proved very helpful in restructuring the DTD. - - Dave Raggett <dsr@hplb.hpl.hp.com> 5th April 1994 - - Changes: - - Added align attribute to headers with same values - and meaning as for paragraphs. - - Added prologue and epilogue elements and fixed bug - in definition of %paras with HTML.emph. - - Added entity names for standard icons c/o Bert Bos. - This are enabled with the HTML.icons switch. - - Added PRE to content model for LI and DD, and changed - DL to require at least one DT per DD. Math is now - part of %text; but can't be nested. - - Tried to permit an optional epilogue following last - division, but sgmls gave: Content model is ambiguous - - Added support for graphical menus to SELECT/OPTION. - - Liberalised content model for headers to %text; - Added optional NOFOLD attribute to P element to - inhibit SGML folding of whitespace. - - Dropped the LIT element and changed the TAB element - over to the LaTeX model. Added NOWRAP to P element. - Replaced TH/TD's align=numeric with ALIGNON="." etc. - - Made anchor NAME attribute conditional on HTML.obsolete - Added HTML.obsolete for obsoleted HTML elements - - Added SIG attribute to A and LINK for specifying - a digital signature to attest that a linked document - is unchanged. - - SRC attribute added to NOTE to allow authors to override - the default icon chosen on the basis of the ROLE attribute. - - Switched REL/REV back to CDATA to avoid trouble with duplicate - name or name token error. Using an explicit list of relationship - types would force us to drop REV. - - Added top/bottom alignment attribute to CAPTION - - REL and REV domains now defined by parameter entities - - SRC attribute added to LINK to allow images to be used - in document specific toolbar - - Baseline attribute added to FIG and IMG to give precise - control of vertical position relative to baseline. - - Revised comments for <A> and <LINK> to remove references to - obsoleted timing attributes and to add a list of "standard" - relationship types. - - CHANGED element now uses more meaningful attribute names. - - STATE dropped in favor of INPUT with TYPE="hidden". Forms now - support a link to a script for client-side execution of constraints. - - The element definition for DIV1..DIV6 and P no longer permit the - start tag to be omitted. This was regrettably forced by a - restriction in the SGML standard. Browsers *must* be capable of - inferring them when missing,in order to cope with legacy documents. - - Fixed some errors in earlier version to do with start tags and - definitions of parameter entities. The content model for FIG has - been changed to use a P element for text to avoid an SGML parsing - problem with a line break before the caption. --- -CHARSET - BASESET "ISO 646:1983//CHARSET - International Reference Version (IRV)//ESC 2/5 4/0" - DESCSET 0 9 UNUSED - 9 2 9 - 11 2 UNUSED - 13 1 13 - 14 18 UNUSED - 32 95 32 - 127 1 UNUSED - BASESET "ISO Registration Number 100//CHARSET - ECMA-94 Right Part of Latin Alphabet Nr. 1//ESC 2/13 4/1" - DESCSET 128 32 UNUSED - 160 95 32 - 255 1 UNUSED - -CAPACITY SGMLREF - TOTALCAP 150000 - GRPCAP 150000 - -SCOPE DOCUMENT -SYNTAX - SHUNCHAR CONTROLS 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 - 19 20 21 22 23 24 25 26 27 28 29 30 31 127 255 - BASESET "ISO 646:1983//CHARSET - International Reference Version (IRV)//ESC 2/5 4/0" - DESCSET 0 128 0 - FUNCTION RE 13 - RS 10 - SPACE 32 - TAB SEPCHAR 9 - NAMING LCNMSTRT "" - UCNMSTRT "" - LCNMCHAR ".-" - UCNMCHAR ".-" - NAMECASE GENERAL YES - ENTITY NO - DELIM GENERAL SGMLREF - SHORTREF SGMLREF - NAMES SGMLREF - QUANTITY SGMLREF - NAMELEN 32 - TAGLVL 100 - LITLEN 1024 - GRPGTCNT 150 - GRPCNT 64 - -FEATURES - MINIMIZE - DATATAG NO - OMITTAG YES - RANK NO - SHORTTAG NO - LINK - SIMPLE NO - IMPLICIT NO - EXPLICIT NO - OTHER - CONCUR NO - SUBDOC NO - FORMAL YES - APPINFO NONE ->
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/sgml/webtechs.catalog Mon Aug 13 08:46:35 2007 +0200 @@ -0,0 +1,87 @@ + -- catalog: SGML Open style entity catalog for HTML -- + -- $Id: webtechs.catalog,v 1.1.1.1 1996/12/18 03:43:03 steve Exp $ -- + -- well that $id is messed up now cos I edited the file! -- + + -- ISO latin 1 entity set for HTML -- = +PUBLIC "-//IETF//ENTITIES Added Latin 1 for HTML//EN" ISOlat1.sgml +PUBLIC "ISO 8879-1986//ENTITIES Added Latin 1//EN//HTML" ISOlat1.sgml + + -- fake HTMLicons reference -- +PUBLIC "-//IETF//ENTITIES icons for HTML//EN" html-icons.sgml + + -- fake HTMLmath reference -- +PUBLIC "-//IETF//ENTITIES Math and Greek for HTML//EN" html-math.sgml + + -- Ways to refer to Level 3.2: most general to most specific -- +PUBLIC "-//W3C//DTD HTML 3.2//EN" html-3.2.dtd + + -- Ways to refer to Level 3: most general to most specific -- +PUBLIC "-//IETF//DTD HTML//EN//3.0" html-3.dtd +PUBLIC "-//W3O//DTD W3 HTML 3.0//EN//" html-3.dtd +PUBLIC "-//W3O//DTD W3 HTML 3.0//EN" html-3.dtd +PUBLIC "-//IETF//DTD HTML 3.0//EN" html-3.dtd +PUBLIC "-//IETF//DTD HTML 3.0//EN//" html-3.dtd +PUBLIC "-//IETF//DTD HTML Level 3//EN" html-3.dtd +PUBLIC "-//IETF//DTD HTML Level 3//EN//3.0" html-3.dtd + + -- Ways to refer to strict Level 3: most general to most specific -- +PUBLIC "-//IETF//DTD HTML Strict//EN//3.0" html-3s.dtd +PUBLIC "-//W3O//DTD W3 HTML Strict 3.0//EN//" html-3s.dtd +PUBLIC "-//IETF//DTD HTML Strict Level 3//EN" html-3s.dtd +PUBLIC "-//IETF//DTD HTML Strict Level 3//EN//3.0" html-3s.dtd + + -- Ways to refer to Level 2: most general to most specific -- +PUBLIC "HTML" html.dtd +PUBLIC "-//IETF//DTD HTML//EN" html.dtd +PUBLIC "-//IETF//DTD HTML//EN//2.0" html.dtd +PUBLIC "-//IETF//DTD HTML 2.0//EN" html.dtd +PUBLIC "-//IETF//DTD HTML Level 2//EN" html.dtd +PUBLIC "-//IETF//DTD HTML Level 2//EN//2.0" html.dtd + + -- Ways to refer to Level 1: most general to most specific -- +PUBLIC "-//IETF//DTD HTML Level 1//EN" html-1.dtd +PUBLIC "-//IETF//DTD HTML Level 1//EN//2.0" html-1.dtd + + -- Ways to refer to Level 0: most general to most specific -- +PUBLIC "-//IETF//DTD HTML Level 0//EN" html-0.dtd +PUBLIC "-//IETF//DTD HTML Level 0//EN//2.0" html-0.dtd + + -- Ways to refer to Strict Level 2 -- +PUBLIC "-//IETF//DTD HTML Strict//EN" html-s.dtd +PUBLIC "-//IETF//DTD HTML Strict//EN//2.0" html-s.dtd +PUBLIC "-//IETF//DTD HTML Strict Level 2//EN" html-s.dtd +PUBLIC "-//IETF//DTD HTML Strict Level 2//EN//2.0" html-s.dtd + + -- Ways to refer to Strict Level 1 -- +PUBLIC "-//IETF//DTD HTML Strict Level 1//EN" html-1s.dtd +PUBLIC "-//IETF//DTD HTML Strict Level 1//EN//2.0" html-1s.dtd + + -- Ways to refer to Strict Level 0 -- +PUBLIC "-//IETF//DTD HTML Strict Level 0//EN" html-0s.dtd +PUBLIC "-//IETF//DTD HTML Strict Level 0//EN//2.0" html-0s.dtd + + -- Ways to refer to Netscape extensions HTML -- +PUBLIC "-//Netscape Comm. Corp.//DTD HTML//EN" html-mcom.dtd +PUBLIC "-//WebTechs//DTD Mozilla HTML//EN" html-mcom.dtd +PUBLIC "-//WebTechs//DTD Mozilla HTML 2.0//EN" html-mcom.dtd +PUBLIC "-//Netscape Comm. Corp.//DTD Strict HTML//EN" html-mcoms.dtd +PUBLIC "-//WebTechs//DTD Strict HTML//EN" html-mcoms.dtd +PUBLIC "-//WebTechs//DTD Strict HTML 2.0//EN" html-mcoms.dtd + + -- Ways to refer to Sun Microsystems HotJava extensions -- +PUBLIC "-//Sun Microsystems Corp.//DTD HotJava HTML//EN" html-hj.dtd +PUBLIC "-//Sun Microsystems Corp.//DTD HotJava Strict HTML//EN" html-hjs.dtd + + -- Ways to refer to PUML -- +PUBLIC "-//WebTechs//DTD PUML 1.0//EN" puml.dtd + + -- Ways to Refer to SoftQuad HTML 2.0 + extensions -- +PUBLIC "-//SQ//DTD HTML 2.0 HoTMetaL + extensions//EN" SQ.dtd + + -- Ways to refer to Microsoft extensions HTML -- +PUBLIC "-//Microsoft//DTD Internet Explorer 2.0 HTML//EN" iehtml.dtd +PUBLIC "-//Microsoft//DTD Internet Explorer 2.0 HTML Strict//EN" iehtml-s.dtd +PUBLIC "-//Microsoft//DTD Internet Explorer 2.0 Tables//EN" ietables.dtd + +PUBLIC "-//W3C//DTD HTML 3.2//EN" html-3.2.dtd +
--- a/etc/termcap.ucb Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/termcap.ucb Mon Aug 13 08:46:35 2007 +0200 @@ -2089,7 +2089,7 @@ # Due to severe 2621 braindamage, the only way to get the arrow keys to # transmit anything at all is to turn on the function key labels # (f1-f8) with ks, and even then the poor user has to hold down shift! -# The default 2621 turns off the labels except when it has to to enable +# The default 2621 turns off the labels except when it has to enable # the function keys. If your installation prefers labels on all the time, # or off all the time (at the "expense" of the function keys) move the # 2621-nl or 2621-wl labels to the front using reorder.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/tests/external-widget/Makefile Mon Aug 13 08:46:35 2007 +0200 @@ -0,0 +1,30 @@ +CFLAGS += -Xc -g -DTOOLTALK +EMACSHOME = ../../.. +EMACSLIBDIR = $(EMACSHOME)/editor/src +EMACSINCLUDEDIR = $(EMACSHOME)/editor/src +MOTIFHOME = /opt/SUNWmotif + +CPPFLAGS += -I$(OPENWINHOME)/include +LDFLAGS += -L$(OPENWINHOME)/lib -R$(OPENWINHOME)/lib + +CPPFLAGS += -I$(MOTIFHOME)/include +LDFLAGS += -L$(MOTIFHOME)/lib -R$(MOTIFHOME)/lib + +CPPFLAGS += -I$(EMACSINCLUDEDIR) +LDFLAGS += -L$(EMACSLIBDIR) + +LDFLAGS += -R$(OPENWINHOME)/lib:$(EMACSLIBDIR) -g + +TM_OBJS = test-ew-motif.o +TXL_OBJS = test-ew-xlib.o +MOTIF_LIBS = -Bstatic -lextcli_Xm -Bdynamic -lXm -lXt -ltt -lX11 -lgen -lm +XLIB_LIBS = -Bstatic -lextcli_Xlib -Bdynamic -ltt -lX11 -lgen -lm + +all: test-ew-motif + +test-ew-motif: $(TM_OBJS) + $(CC) -o $@ $(LDFLAGS) $(TM_OBJS) $(MOTIF_LIBS) + +test-ew-xlib: $(TXL_OBJS) + $(CC) -o $@ $(LDFLAGS) $(TXL_OBJS) $(XLIB_LIBS) +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/tests/external-widget/test-ew-motif.c Mon Aug 13 08:46:35 2007 +0200 @@ -0,0 +1,145 @@ +#include <Xm/Xm.h> +#include <Xm/RowColumn.h> +#include <Xm/Scale.h> +#include <Xm/PushB.h> +#include <Xm/Label.h> +#include <Xm/Text.h> +#include <Xm/PanedW.h> +#include "ExternalClient.h" + +#ifdef TOOLTALK +#include <desktop/tt_c.h> +char *HxProcID; +#endif + +XtAppContext xt_app_con; + +void ScaleValueChangedCB(Widget scale, XtPointer app_data, XtPointer widget_data) +{ + XmScaleCallbackStruct *xms = (XmScaleCallbackStruct *) widget_data; + Widget label = (Widget) app_data; + char labelarr[10]; + XmString labelstr; +#if 0 + sprintf(labelarr, "%d", xms->value); + labelstr = XmStringCreateLocalized(labelarr); + XtVaSetValues(label, XmNlabelString, labelstr, NULL); + XmStringFree(labelstr); +#endif +} + +#ifdef TOOLTALK +static void +handle_tt_input(XtPointer client_data, int *source, XtInputId *id) +{ + Tt_message m = tt_message_receive(); + + if (m && !(tt_ptr_error(m))) { + tt_message_destroy(m); + } +} + +Tt_status +HxInitializeToolTalk() +{ + static Boolean initialized = FALSE; + + if (!initialized) { + int fd; + Tt_status status; + + HxProcID = tt_open(); + fd = tt_fd(); + if (TT_OK != (status = tt_session_join( tt_default_session() ))) + return status; + (void)XtAppAddInput(xt_app_con, fd, (void *)XtInputReadMask, handle_tt_input, NULL); + initialized = TRUE; + } + + return TT_OK; +} +#endif + +main(int argc, char **argv) +{ + Widget shell, rowcolumn, scale, pushbutton, label1, label2, text; + Widget paned, text2; + int n, i; + Widget widlist[100]; + Widget emacscli[100]; + Arg args[100]; + int no_ews = 1; + char buf[100]; + + if (argc > 1) + no_ews = atoi (argv[1]); + + shell = XtAppInitialize(&xt_app_con, "Testmotif", NULL, 0, + &argc, argv, NULL, NULL, 0); + +#ifdef TOOLTALK + HxInitializeToolTalk(); +#endif + + rowcolumn = XmCreateRowColumn(shell, "rowcolumn", NULL, 0); + XtManageChild(rowcolumn); + + n = 0; + XtSetArg(args[n], XmNtraversalOn, TRUE); n++; +#if 0 + label1 = XmCreateLabel(rowcolumn, "label1", args, n); +#endif + label1 = XtVaCreateWidget("label1", xmLabelWidgetClass, rowcolumn, + XmNwidth, 50, XmNheight, 30, + XmNtraversalOn, TRUE, NULL); + label2 = XmCreateLabel(rowcolumn, "label2", NULL, 0); + scale = XmCreateScale(rowcolumn, "scale", NULL, 0); + XtAddCallback(scale, XmNvalueChangedCallback, ScaleValueChangedCB, label1); + paned = XmCreatePanedWindow(rowcolumn, "paned", NULL, 0); + n = 0; + widlist[n++] = label1; + widlist[n++] = label2; + widlist[n++] = scale; + widlist[n++] = paned; + XtManageChildren(widlist, n); + + pushbutton = XmCreatePushButton(paned, "pushbutton", NULL, 0); + text = XmCreateText(paned, "text", NULL, 0); + for (i=0; i<no_ews; i++) { + sprintf (buf, "extcli%d", i); + emacscli[i] = XtVaCreateWidget(buf, externalClientWidgetClass, paned, + XmNwidth, 500, XmNheight, 200, + XmNtraversalOn, TRUE, +#ifdef TOOLTALK + XtNuseToolTalk, TRUE, +#endif + NULL); + } + text2 = XmCreateText(paned, "text2", NULL, 0); + n = 0; + widlist[n++] = pushbutton; + widlist[n++] = text; + for (i=0; i<no_ews; i++) + widlist[n++] = emacscli[i]; + widlist[n++] = text2; + XtManageChildren(widlist, n); + + XtRealizeWidget(shell); + + { + XmString lab; + char labarr[1000]; + char tmpbuf[50]; + + strcpy (labarr, "window:"); + for (i=0; i<no_ews; i++) { + sprintf (tmpbuf, " %d", XtWindow(emacscli[i])); + strcat (labarr, tmpbuf); + } + lab = XmStringCreateLocalized(labarr); + XtVaSetValues(label2, XmNlabelString, lab, NULL); + XmStringFree(lab); + } + + XtAppMainLoop(xt_app_con); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/tests/external-widget/test-ew-xlib.c Mon Aug 13 08:46:35 2007 +0200 @@ -0,0 +1,361 @@ +/* + * Copyright 1989 O'Reilly and Associates, Inc. + * See ../Copyright for complete rights and liability information. + */ +#include <X11/Xlib.h> +#include <X11/Xutil.h> +#include <X11/Xos.h> +#include <X11/Xatom.h> + +#include <stdio.h> + +#define BITMAPDEPTH 1 +#define TOO_SMALL 0 +#define BIG_ENOUGH 1 + +/* These are used as arguments to nearly every Xlib routine, so it saves + * routine arguments to declare them global. If there were + * additional source files, they would be declared extern there. */ +Display *display; +int screen_num; + +static char *progname; /* name this program was invoked by */ + +void main(argc, argv) +int argc; +char **argv; +{ + Window topwin, win, win2; + unsigned int width, height; /* window size */ + int x, y; /* window position */ + unsigned int border_width = 4; /* four pixels */ + unsigned int display_width, display_height; + char *window_name = "Basic Window Program"; + char *icon_name = "basicwin"; + XSizeHints size_hints; + int count; + XEvent report; + GC gc; + XFontStruct *font_info; + char *display_name = NULL; + int window_size = BIG_ENOUGH; /* or TOO_SMALL to display contents */ + + progname = argv[0]; + + /* connect to X server */ + if ( (display=XOpenDisplay(display_name)) == NULL ) + { + (void) fprintf( stderr, "%s: cannot connect to X server %s\n", + progname, XDisplayName(display_name)); + exit( -1 ); + } + + /* get screen size from display structure macro */ + screen_num = DefaultScreen(display); + display_width = DisplayWidth(display, screen_num); + display_height = DisplayHeight(display, screen_num); + + /* Note that in a real application, x and y would default to 0 + * but would be settable from the command line or resource database. + */ + x = y = 0; + + /* size window with enough room for text */ + width = display_width/2, height = display_height/3; + + /* ------------------------------------------------------------ */ + + /* create top-level window */ + topwin = XCreateSimpleWindow(display, RootWindow(display,screen_num), + x, y, width, 2*height, border_width, + BlackPixel(display, screen_num), + WhitePixel(display,screen_num)); + + /* Set size hints for window manager. The window manager may + * override these settings. Note that in a real + * application if size or position were set by the user + * the flags would be UPosition and USize, and these would + * override the window manager's preferences for this window. */ + + /* x, y, width, and height hints are now taken from + * the actual settings of the window when mapped. Note + * that PPosition and PSize must be specified anyway. */ + + size_hints.flags = PPosition | PSize | PMinSize; + size_hints.min_width = 300; + size_hints.min_height = 200; + + { + XWMHints wm_hints; + XClassHint class_hints; + + /* format of the window name and icon name + * arguments has changed in R4 */ + XTextProperty windowName, iconName; + + /* These calls store window_name and icon_name into + * XTextProperty structures and set their other + * fields properly. */ + if (XStringListToTextProperty(&window_name, 1, &windowName) == 0) { + (void) fprintf( stderr, "%s: structure allocation for windowName failed.\n", + progname); + exit(-1); + } + + if (XStringListToTextProperty(&icon_name, 1, &iconName) == 0) { + (void) fprintf( stderr, "%s: structure allocation for iconName failed.\n", + progname); + exit(-1); + } + + wm_hints.initial_state = NormalState; + wm_hints.input = True; + wm_hints.flags = StateHint | InputHint; + + class_hints.res_name = progname; + class_hints.res_class = "Basicwin"; + + XSetWMProperties(display, topwin, &windowName, &iconName, + argv, argc, &size_hints, &wm_hints, + &class_hints); + } + + /* ------------------------------------------------------------ */ + + /* create the window we're in charge of */ + + win = XCreateSimpleWindow(display, topwin, + x, y, width, height, border_width, BlackPixel(display, + screen_num), WhitePixel(display,screen_num)); + + /* Select event types wanted */ + XSelectInput(display, win, ExposureMask | KeyPressMask | + ButtonPressMask | StructureNotifyMask); + + load_font(&font_info); + + /* create GC for text and drawing */ + getGC(win, &gc, font_info); + + /* ------------------------------------------------------------ */ + + /* create the external-client window */ + + win2 = XCreateSimpleWindow(display, topwin, + x, y+height, width, height, border_width, + BlackPixel(display, screen_num), + WhitePixel(display,screen_num)); + printf("external window: %d\n", win2); + ExternalClientInitialize(display, win2); + + /* ------------------------------------------------------------ */ + + /* Display windows */ + XMapWindow(display, topwin); + XMapWindow(display, win); + XMapWindow(display, win2); + + /* get events, use first to display text and graphics */ + while (1) { + XNextEvent(display, &report); + if (report.xany.window == win2) + ExternalClientEventHandler(display, win2, &report); + else + switch (report.type) { + case Expose: + /* unless this is the last contiguous expose, + * don't draw the window */ + if (report.xexpose.count != 0) + break; + + /* if window too small to use */ + if (window_size == TOO_SMALL) + TooSmall(win, gc, font_info); + else { + /* place text in window */ + draw_text(win, gc, font_info, width, height); + + /* place graphics in window, */ + draw_graphics(win, gc, width, height); + } + break; + case ConfigureNotify: + /* window has been resized, change width and + * height to send to draw_text and draw_graphics + * in next Expose */ + width = report.xconfigure.width; + height = report.xconfigure.height; + if ((width < size_hints.min_width) || + (height < size_hints.min_height)) + window_size = TOO_SMALL; + else + window_size = BIG_ENOUGH; + break; + case ButtonPress: + /* trickle down into KeyPress (no break) */ + case KeyPress: + XUnloadFont(display, font_info->fid); + XFreeGC(display, gc); + XCloseDisplay(display); + exit(1); + default: + /* all events selected by StructureNotifyMask + * except ConfigureNotify are thrown away here, + * since nothing is done with them */ + break; + } /* end switch */ + } /* end while */ +} + +getGC(win, gc, font_info) +Window win; +GC *gc; +XFontStruct *font_info; +{ + unsigned long valuemask = 0; /* ignore XGCvalues and use defaults */ + XGCValues values; + unsigned int line_width = 6; + int line_style = LineOnOffDash; + int cap_style = CapRound; + int join_style = JoinRound; + int dash_offset = 0; + static char dash_list[] = {12, 24}; + int list_length = 2; + + /* Create default Graphics Context */ + *gc = XCreateGC(display, win, valuemask, &values); + + /* specify font */ + XSetFont(display, *gc, font_info->fid); + + /* specify black foreground since default window background is + * white and default foreground is undefined. */ + XSetForeground(display, *gc, BlackPixel(display,screen_num)); + + /* set line attributes */ + XSetLineAttributes(display, *gc, line_width, line_style, + cap_style, join_style); + + /* set dashes */ + XSetDashes(display, *gc, dash_offset, dash_list, list_length); +} + +load_font(font_info) +XFontStruct **font_info; +{ + char *fontname = "9x15"; + + /* Load font and get font information structure. */ + if ((*font_info = XLoadQueryFont(display,fontname)) == NULL) + { + (void) fprintf( stderr, "%s: Cannot open 9x15 font\n", + progname); + exit( -1 ); + } +} + +draw_text(win, gc, font_info, win_width, win_height) +Window win; +GC gc; +XFontStruct *font_info; +unsigned int win_width, win_height; +{ + char *string1 = "Hi! I'm a window, who are you?"; + char *string2 = "To terminate program; Press any key"; + char *string3 = "or button while in this window."; + char *string4 = "Screen Dimensions:"; + int len1, len2, len3, len4; + int width1, width2, width3; + char cd_height[50], cd_width[50], cd_depth[50]; + int font_height; + int initial_y_offset, x_offset; + + + /* need length for both XTextWidth and XDrawString */ + len1 = strlen(string1); + len2 = strlen(string2); + len3 = strlen(string3); + + /* get string widths for centering */ + width1 = XTextWidth(font_info, string1, len1); + width2 = XTextWidth(font_info, string2, len2); + width3 = XTextWidth(font_info, string3, len3); + + font_height = font_info->ascent + font_info->descent; + + /* output text, centered on each line */ + XDrawString(display, win, gc, (win_width - width1)/2, + font_height, + string1, len1); + XDrawString(display, win, gc, (win_width - width2)/2, + (int)(win_height - (2 * font_height)), + string2, len2); + XDrawString(display, win, gc, (win_width - width3)/2, + (int)(win_height - font_height), + string3, len3); + + /* copy numbers into string variables */ + (void) sprintf(cd_height, " Height - %d pixels", + DisplayHeight(display,screen_num)); + (void) sprintf(cd_width, " Width - %d pixels", + DisplayWidth(display,screen_num)); + (void) sprintf(cd_depth, " Depth - %d plane(s)", + DefaultDepth(display, screen_num)); + + /* reuse these for same purpose */ + len4 = strlen(string4); + len1 = strlen(cd_height); + len2 = strlen(cd_width); + len3 = strlen(cd_depth); + + /* To center strings vertically, we place the first string + * so that the top of it is two font_heights above the center + * of the window. Since the baseline of the string is what we + * need to locate for XDrawString, and the baseline is one + * font_info->ascent below the top of the character, + * the final offset of the origin up from the center of the + * window is one font_height + one descent. */ + + initial_y_offset = win_height/2 - font_height - font_info->descent; + x_offset = (int) win_width/4; + XDrawString(display, win, gc, x_offset, (int) initial_y_offset, + string4,len4); + + XDrawString(display, win, gc, x_offset, (int) initial_y_offset + + font_height,cd_height,len1); + XDrawString(display, win, gc, x_offset, (int) initial_y_offset + + 2 * font_height,cd_width,len2); + XDrawString(display, win, gc, x_offset, (int) initial_y_offset + + 3 * font_height,cd_depth,len3); +} + +draw_graphics(win, gc, window_width, window_height) +Window win; +GC gc; +unsigned int window_width, window_height; +{ + int x, y; + int width, height; + + height = window_height/2; + width = 3 * window_width/4; + x = window_width/2 - width/2; /* center */ + y = window_height/2 - height/2; + XDrawRectangle(display, win, gc, x, y, width, height); +} + +TooSmall(win, gc, font_info) +Window win; +GC gc; +XFontStruct *font_info; +{ + char *string1 = "Too Small"; + int y_offset, x_offset; + + y_offset = font_info->ascent + 2; + x_offset = 2; + + /* output text, centered on each line */ + XDrawString(display, win, gc, x_offset, y_offset, string1, + strlen(string1)); +}
--- a/etc/xemacs-icon.xpm Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/xemacs-icon.xpm Mon Aug 13 08:46:35 2007 +0200 @@ -1,62 +1,67 @@ /* XPM */ -static char * Xemacs48_xpm[] = { -"48 48 11 1", -" c #FFFFFFFFFFFF s None", -". c #646464646464", -"X c #E1E1E1E1E1E1", -"o c #C8C8C8C8C8C8", -"O c #7D7D7D7D7D7D", -"+ c #969696969696", -"@ c #4B4B4B4B4B4B", -"# c #FFFF00000000", -"$ c #AFAFAFAFAFAF", -"% c #FFFFFFFF0000", -"^ c #FFFFFFFFFFFF", -" ", -" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^. ", -" ^XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo. ", -" ^XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo.O++", -" ^XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo.O++", -" ^XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo.O++", -" ^XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo.O++", -" ^XXXXXXooo..O..OooOOooXXXXXXXXXXXo.O++", -" ^XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo.O++", -" ^^^^^@ ^^^^^^@X^^^^^^^^^^^@XXXXXXXXXXXXXo.O++", -" #####@ ^#####@X^##########@..OooXXXXXXXXo.O++", -" ####@ ^####@XX^##########@XXXXXXXXXXXXXo.O++", -" #####@^#####@$$^##########@$$$XXXXXXXXXXo.O++", -" ####@^####@$$$^#####@@@@@@$$$OO.OOoXXXXo.O++", -" ##########@$$%^#####@%%%%$%%%%%%%%%%%XXo.O++", -" ########@$$$%^#####@^^^^^%%%%%%%%%%%XXo.O++", -" ########@$$$%^##########@$$$oo%%%%%%XXo.O++", -" ######@$$$$%^##########@%%%%%%%%%%%XXo.O++", -" ########@$$$%^##########@%%%%%%%%%%%XXo.O++", -" ########@$$XX^#####@@@@@@$$.OOOooXXXXXo.O++", -" ##########@$$X^#####@$$$$$$$$XXXXXXXXXXo.O++", -" ####@@####@$$X^#####@^^^^^$$$XXXXXXXXXXo.O++", -" #####@^#####@$$^##########@$$$oooXXXXXXXo.O++", -" ####@$$^####@$$^##########@XXXXXXXXXXXXXo.O++", -" #####@$$^#####@$^##########@...OOOOO.XXXXo.O++", -" @@@@@@@$$@@@@@@@$@@@@@@@@@@@@$$$XXXXXXXXXXo.O++", -" $$$$$$XXX$$$$$$XX$$....$$...OOOOO.XXXXo.O++", -" $$$$$$XXX$$$$$$XX$$$$$$$$$$$XXXXXXXXXXo.O++", -" ^XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo.O++", -" ^XXXXXXXXXXXX..oOOO.ooOooXXXXXXXXo.O++", -" ^XXXX+#+XXXXXXXXXXXXXXXXXXXXXXXXXo.O++", -" ^XXX+###+XXXXXXXXXXXXXXXXXXXXXXXXo.O++", -" ^XXX#####oOOOoo.OOOoXXXXXXXXXXXXXo.O++", -" ^XXX+###+XXXXXXXXXXXXXXXXXXXXXXXXo.O++", -" ^XXXX+#+XXXXXXXXXXXXXXXXXXXXXXXXXo.O++", -" ^XXXXXXXXXXXXXXoOO.o$$OOOoXXXXXXXo.O++", -" ^XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo.O++", -" ^XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo.O++", -" ^XXXXXXXXXXXXXXXXXXXXX.OOOoooXXXXo.O++", -" ^XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo.O++", -" ^XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo.O++", -" ^XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo.O++", -" ^XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo.O++", -" ^ooooooooooooooooooooooooooooooooo.O++", -" ...................................O++", -" OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO++", -" ++++++++++++++++++++++++++++++++++++", -" ++++++++++++++++++++++++++++++++++++"}; +static char *Xemacs48_xpm[] = { +/* width height ncolors chars_per_pixel */ +"48 48 12 1", +/* colors */ +"a c #ADADADADADAD m white", +"b c #737373737373 m black", +"c c #636363636363 m black", +"d c #424242424242 m black", +" c #DEDEDEDEDEDE m white s BgColor", +"g c #FFFF00000000 m black", +"h c #949494949494 m black", +"i c #636363636363 m black", +"j c #FFFFFFFFFFFF m white", +"k c #FFFFFFFF0000 m white", +"l c #DEDEDEDEDEDE m white", +"m c #BDBDBDBDBDBD m white", +/* pixels */ +"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjc", +"j mc", +"j mc", +"j mc", +"j cccccccccccccccccccccccccccccccci mc", +"j cjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjji mc", +"j cjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjia mc", +"j cjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjia mc", +"j cjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjia mc", +"j cjjjjjjjmmmiibiibmmbbmmjjjjjjjjjia mc", +"j cjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjia mc", +"j jjjjjjd cjjjjjjdjjjjjjjjjjjjdjjjjjjjjjjjia mc", +"j jgggggd cjgggggdjjggggggggggdiibmmjjjjjjia mc", +"j jggggd cjggggdjjjggggggggggdjjjjjjjjjjjia mc", +"j jgggggdjgggggdaajggggggggggdaaajjjjjjjjia mc", +"j jggggdjggggdaaajgggggddddddaaabbibbmjjia mc", +"j jggggggggggdaakjgggggdkkkkakkkkkkkkkjjia mc", +"j jggggggggdaaakjgggggdjjjjjkkkkkkkkkjjia mc", +"j jggggggggdaaakjggggggggggdaaammkkkkjjia mc", +"j jggggggdaaaakjggggggggggdkkkkkkkkkjjia mc", +"j jggggggggdaaakjggggggggggdkkkkkkkkkjjia mc", +"j jggggggggdaalljgggggddddddaaibbbmmjjjia mc", +"j jggggggggggdaaljgggggdaaaaaaaajjjjjjjjia mc", +"j jggggddggggdaaljgggggdjjjjjaaajjjjjjjjia mc", +"j jgggggdjgggggdaajggggggggggdaaammmjjjjjia mc", +"j jggggdaajggggdaajggggggggggdjjjjjjjjjjjia mc", +"j jgggggdaajgggggdajggggggggggdiiibbbbbijjia mc", +"j dddddddaadddddddaddddddddddddaaajjjjjjjjia mc", +"j aaaaacjjjaaaaaajjaaiiiiaaiiibbbbbijjia mc", +"j aaaaacjjjaaaaaajjaaaaaaaaaaajjjjjjjjia mc", +"j cjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjia mc", +"j cjjjjjjjjjjjjiimbbbimmbmmjjjjjjia mc", +"j cjjjjhghjjjjjjjjjjjjjjjjjjjjjjjia mc", +"j cjjjhggghjjjjjjjjjjjjjjjjjjjjjjia mc", +"j cjjjgggggmbbbmmibbbmjjjjjjjjjjjia mc", +"j cjjjhggghjjjjjjjjjjjjjjjjjjjjjjia mc", +"j cjjjjhghjjjjjjjjjjjjjjjjjjjjjjjia mc", +"j cjjjjjjjjjjjjjjmbbimaabbbmjjjjjia mc", +"j cjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjia mc", +"j cjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjia mc", +"j cjjjjjjjjjjjjjjjjjjjjjibbbmmmjjia mc", +"j cjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjia mc", +"j cjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjia mc", +"j iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiia mc", +"j aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa mc", +"j mc", +"jmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmc", +"cccccccccccccccccccccccccccccccccccccccccccccccc" +};
--- a/etc/xemacs.1 Mon Aug 13 08:45:53 2007 +0200 +++ b/etc/xemacs.1 Mon Aug 13 08:46:35 2007 +0200 @@ -173,7 +173,7 @@ command line. .TP .B \-debug\-init -Enter the debugger if an error in the init file occurs. +Enter the debugger if an error occurs in the init file. .TP .B \-unmapped Do not map the initial frame.
--- a/info/dir Mon Aug 13 08:45:53 2007 +0200 +++ b/info/dir Mon Aug 13 08:46:35 2007 +0200 @@ -36,12 +36,12 @@ * Info:: Documentation browsing system. * XEmacs:: The extensible user-friendly self-documenting text editor. - This manual is for XEmacs 19.14. + This manual is for XEmacs 19.15. * Lispref:: XEmacs Lisp technical reference. - This manual is for XEmacs 19.14. + This manual is for XEmacs 19.15. * New-Users-Guide:: - XEmacs User's Guide for XEmacs 19.14. -* XEmacs-FAQ:: XEmacs Frequently Asked Questions for 19.14. + XEmacs User's Guide for XEmacs 19.15. +* XEmacs-FAQ:: XEmacs Frequently Asked Questions for 19.15. * Internals:: Guide to the internals of XEmacs. Packages: @@ -64,6 +64,7 @@ * OO-Browser:: The Multi-Language Object-Oriented Browser. * PCL-CVS:: An XEmacs-based front end to CVS. * PSGML:: A powerful mode for HTML and other SGML documents. +* PSGML-API:: PSGML, the API documentation. * Rmail:: An older mail reader for Emacs. * Standards:: The GNU coding standards. * Supercite:: Lets you cite parts of messages you're replying to.
--- a/lib-src/Makefile Mon Aug 13 08:45:53 2007 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,142 +0,0 @@ -SHELL = /bin/sh -CC=gcc -CFLAGS=-bi486-linuxaout -O4 -m486 -malign-functions=2 -malign-jumps=2 -malign-loops=2 -ALLOCA= -YACC=bison -y -LN_S=ln -s -version=19.14 -configuration=i486-unknown-linux2.0.0 -prefix=/usr/local -exec_prefix=${prefix} -bindir=${exec_prefix}/bin -libdir=${exec_prefix}/lib -srcdir=/m/xemacs-19.14/lib-src -archlibdir=${libdir}/xemacs-${version}/${configuration} -INSTALL = /usr/bin/install -c -INSTALL_PROGRAM = ${INSTALL} -INSTALL_DATA = ${INSTALL} -m 644 -INSTALLABLES = etags ctags emacsclient b2m gnuclient gnuattach gnudoit -INSTALLABLE_SCRIPTS = rcs-checkin -UTILITIES= make-path wakeup profile make-docfile digest-doc sorted-doc movemail cvtmail fakemail yow emacsserver hexl gnuserv -SCRIPTS= rcs2log vcdiff -EXECUTABLES= ${UTILITIES} ${INSTALLABLES} ${SCRIPTS} ${INSTALLABLE_SCRIPTS} -SOURCES = COPYING ChangeLog Makefile.in.in README aixcc.lex emacs.csh makedoc.com *.[chy] rcs2log vcdiff - -VPATH=/m/xemacs-19.14/lib-src -LOADLIBES= -L/usr/i486-linuxaout -L/lib-aout -L/m/xpm-3.4h/lib -LOAD_X_LIBES= -L/usr/X11R6/lib -C_SWITCH_X= -I/usr/X11R6/include -I/usr/i486-linuxaout/include -I/m/xpm-3.4h/lib -ALL_CFLAGS = -DFUNCPROTO=11 -DNARROWPROTO -D_BSD_SOURCE -Demacs -DHAVE_CONFIG_H -DSTDC_HEADERS -I. -I../src -I${srcdir} -I${srcdir}/../src ${LDFLAGS} ${CPPFLAGS} ${CFLAGS} -BASE_CFLAGS = -DFUNCPROTO=11 -DNARROWPROTO -D_BSD_SOURCE -DHAVE_CONFIG_H -DSTDC_HEADERS -I. -I../src -I${srcdir} -I${srcdir}/../src ${CPPFLAGS} ${CFLAGS} -LINK_CFLAGS = -DFUNCPROTO=11 -DNARROWPROTO -D_BSD_SOURCE -Demacs -DHAVE_CONFIG_H -I. -I../src -I${srcdir} -I${srcdir}/../src ${LDFLAGS} ${CFLAGS} -CPP_CFLAGS = -DFUNCPROTO=11 -DNARROWPROTO -D_BSD_SOURCE -Demacs -DHAVE_CONFIG_H -I. -I../src -I${srcdir} -I${srcdir}/../src ${CPPFLAGS} ${CFLAGS} -ALLOCA_CFLAGS = -DFUNCPROTO=11 -DNARROWPROTO -D_BSD_SOURCE -Demacs -DHAVE_CONFIG_H -I. -I../src -I${srcdir} -I${srcdir}/../src ${CPPFLAGS} ${CFLAGS} -.c.o: - ${CC} -c ${CPP_CFLAGS} $< -all: ${UTILITIES} ${INSTALLABLES} ${SCRIPTS} -rcs2log: force - @if [ ! -r rcs2log ] ; then rm -f rcs2log ; ${LN_S} ${srcdir}/rcs2log . ; fi -vcdiff: force - @if [ ! -r vcdiff ] ; then rm -f vcdiff ; ${LN_S} ${srcdir}/vcdiff . ; fi -force: -maybe-blessmail: -${archlibdir}: all - @echo - @echo "Installing utilities run internally by XEmacs." - ./make-path ${archlibdir} - if [ `(cd ${archlibdir} && /bin/pwd)` != `/bin/pwd` ]; then for file in ${UTILITIES}; do (cd ..; $(INSTALL_PROGRAM) lib-src/$$file ${archlibdir}/$$file) ; done ; fi - if [ `(cd ${archlibdir} && /bin/pwd)` != `(cd ${srcdir} && /bin/pwd)` ]; then for file in ${SCRIPTS}; do (cd ..; $(INSTALL_PROGRAM) ${srcdir}/$$file ${archlibdir}/$$file); done ; fi -install: ${archlibdir} - @echo - @echo "Installing utilities for users to run." - for file in ${INSTALLABLES} ; do (cd ..; $(INSTALL_PROGRAM) lib-src/$${file} ${bindir}/$${file}) ; done - for file in ${INSTALLABLE_SCRIPTS} ; do (cd ..; $(INSTALL_PROGRAM) ${srcdir}/$${file} ${bindir}/$${file}) ; done -uninstall: - (cd ${bindir}; rm -f ${INSTALLABLES} ${INSTALLABLE_SCRIPTS}) - (cd ${archlibdir}; rm -f ${UTILITIES} ${INSTALLABLES} ${SCRIPTS} ${INSTALLABLE_SCRIPTS}) -mostlyclean: - -rm -f core *.o -clean: mostlyclean - -rm -f ${INSTALLABLES} ${UTILITIES} -distclean: clean - -rm -f ../etc/DOC* *.tab.c *.tab.h aixcc.c TAGS - -rm -f Makefile Makefile.in blessmail -realclean: distclean - true -extraclean: realclean - -rm -f *~ \#* -unlock: - chmod u+w $(SOURCES) -relock: - chmod u-w $(SOURCES) -check: - @echo "We don't have any tests for XEmacs yet." -TAGS: etags - etags *.[ch] -GETOPTOBJS = getopt.o getopt1.o $(ALLOCA) -GETOPTDEPS = $(GETOPTOBJS) ${srcdir}/getopt.h -getopt.o: ${srcdir}/getopt.c ${srcdir}/getopt.h - ${CC} -c ${CPP_CFLAGS} ${srcdir}/getopt.c -getopt1.o: ${srcdir}/getopt1.c ${srcdir}/getopt.h - ${CC} -c ${CPP_CFLAGS} ${srcdir}/getopt1.c -alloca.o: ${srcdir}/../src/alloca.c - ${CC} -c ${ALLOCA_CFLAGS} ${srcdir}/../src/alloca.c -REGEXOBJ = regex.o -REGEXDEPS = $(REGEXOBJ) ${srcdir}/../src/regex.h -regex.o: ${srcdir}/../src/regex.c ${srcdir}/../src/regex.h - $(CC) -c ${BASE_CFLAGS} -DCONFIG_BROKETS -DINHIBIT_STRING_HEADER ${srcdir}/../src/regex.c -etags: ${srcdir}/etags.c $(GETOPTDEPS) $(REGEXDEPS) ../src/config.h - $(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" -DETAGS_REGEXPS ${srcdir}/etags.c $(GETOPTOBJS) $(REGEXOBJ) $(LOADLIBES) -o etags -ctags: ${srcdir}/etags.c $(GETOPTDEPS) etags - $(CC) ${ALL_CFLAGS} -DCTAGS -DVERSION="\"${version}\"" ${srcdir}/etags.c $(GETOPTOBJS) $(LOADLIBES) -o ctags -wakeup: ${srcdir}/wakeup.c - $(CC) ${ALL_CFLAGS} ${srcdir}/wakeup.c $(LOADLIBES) -o wakeup -profile: ${srcdir}/profile.c - $(CC) ${ALL_CFLAGS} ${srcdir}/profile.c $(LOADLIBES) -o profile -make-docfile: ${srcdir}/make-docfile.c - $(CC) ${ALL_CFLAGS} ${srcdir}/make-docfile.c $(LOADLIBES) -o make-docfile -digest-doc: ${srcdir}/digest-doc.c - $(CC) ${ALL_CFLAGS} ${srcdir}/digest-doc.c $(LOADLIBES) -o digest-doc -sorted-doc: ${srcdir}/sorted-doc.c ${ALLOCA} - $(CC) ${ALL_CFLAGS} ${srcdir}/sorted-doc.c ${ALLOCA} $(LOADLIBES) -o sorted-doc -b2m: ${srcdir}/b2m.c ../src/config.h - $(CC) ${ALL_CFLAGS} ${srcdir}/b2m.c $(LOADLIBES) -o b2m -movemail: ${srcdir}/movemail.c ../src/config.h - $(CC) ${ALL_CFLAGS} ${srcdir}/movemail.c $(LOADLIBES) -o movemail -cvtmail: ${srcdir}/cvtmail.c - $(CC) ${ALL_CFLAGS} ${srcdir}/cvtmail.c $(LOADLIBES) -o cvtmail -fakemail: ${srcdir}/fakemail.c ../src/config.h - $(CC) ${ALL_CFLAGS} ${srcdir}/fakemail.c $(LOADLIBES) -o fakemail -yow: ${srcdir}/yow.c ../src/paths.h - $(CC) ${ALL_CFLAGS} ${srcdir}/yow.c $(LOADLIBES) -o yow -emacsserver: ${srcdir}/emacsserver.c ../src/config.h - $(CC) ${ALL_CFLAGS} ${srcdir}/emacsserver.c $(LOADLIBES) -o emacsserver -emacsclient: ${srcdir}/emacsclient.c ../src/config.h - $(CC) ${ALL_CFLAGS} ${srcdir}/emacsclient.c $(LOADLIBES) -o emacsclient -hexl: ${srcdir}/hexl.c - $(CC) ${ALL_CFLAGS} ${srcdir}/hexl.c $(LOADLIBES) -o hexl -gnuslib.o: ${srcdir}/gnuslib.c ${srcdir}/gnuserv.h ../src/config.h - $(CC) -c ${CPP_CFLAGS} ${C_SWITCH_X} ${srcdir}/gnuslib.c -gnuclient: ${srcdir}/gnuclient.c gnuslib.o ${srcdir}/gnuserv.h - $(CC) ${ALL_CFLAGS} -o gnuclient ${srcdir}/gnuclient.c gnuslib.o $(LOADLIBES) $(LOAD_X_LIBES) -lXau -gnuattach: ${srcdir}/gnuclient.c gnuslib.o ${srcdir}/gnuserv.h gnuclient - $(CC) ${ALL_CFLAGS} -o gnuattach -DGNUATTACH ${srcdir}/gnuclient.c gnuslib.o $(LOADLIBES) $(LOAD_X_LIBES) -lXau -gnudoit: ${srcdir}/gnudoit.c gnuslib.o ${srcdir}/gnuserv.h - $(CC) ${ALL_CFLAGS} -o gnudoit ${srcdir}/gnudoit.c gnuslib.o $(LOADLIBES) $(LOAD_X_LIBES) -lXau -gnuserv: ${srcdir}/gnuserv.c gnuslib.o ${srcdir}/gnuserv.h - $(CC) ${ALL_CFLAGS} ${C_SWITCH_X} -o gnuserv ${srcdir}/gnuserv.c gnuslib.o $(LOADLIBES) $(LOAD_X_LIBES) -lXau -make-path: ${srcdir}/make-path.c ../src/config.h - $(CC) $(ALL_CFLAGS) ${srcdir}/make-path.c -o make-path -emacstool: ${srcdir}/emacstool.c - $(CC) ${srcdir}/emacstool.c -o emacstool ${ALL_CFLAGS} -lsuntool -lsunwindow -lpixrect $(LOADLIBES) -nemacstool: ${srcdir}/emacstool.c - $(CC) -o nemacstool -DJLE ${ALL_CFLAGS} ${srcdir}/emacstool.c -lsuntool -lmle -lsunwindow -lpixrect $(LOADLIBES) -xvetool: ${srcdir}/emacstool.c - $(CC) -o xvetool -DXVIEW ${ALL_CFLAGS} ${srcdir}/emacstool.c -lxview -lX -I$(OPENWINHOME)/include -L$(OPENWINHOME)/lib $(LOADLIBES) -xveterm: ${srcdir}/emacstool.c - $(CC) -o xveterm -DXVIEW -DTTERM ${ALL_CFLAGS} ${srcdir}/emacstool.c -lxview -lolgx -lX -I$(OPENWINHOME)/include -L$(OPENWINHOME)/lib $(LOADLIBES) -aixcc: ${srcdir}/aixcc.c - $(CC) $(ALL_CFLAGS) -o aixcc ${srcdir}/aixcc.c -aixcc.c: ${srcdir}/aixcc.lex - lex ${srcdir}/aixcc.lex - mv lex.yy.c aixcc.c
--- a/lib-src/Makefile.in Mon Aug 13 08:45:53 2007 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,481 +0,0 @@ -# Generated automatically from Makefile.in.in by configure. -/* Makefile for lib-src subdirectory in XEmacs. - -Copyright (C) 1985, 1987, 1988, 1993, 1994 Free Software Foundation, Inc. - -This file is part of XEmacs. - -XEmacs 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. - -XEmacs 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 XEmacs; see the file COPYING. If not, write to the Free -the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -/* Note: FSF Makefile.in.in does something weird so that the comments - above a certain point in this file are in shell format instead of - in C format. I don't know how the hell this is supposed to work. */ - -/* Avoid trouble on systems where the `SHELL' variable might be - inherited from the environment. */ -SHELL = /bin/sh - -/* Some people use these in paths they define. We don't want their paths - getting changed on them. */ -#undef sparc -#undef sun -#undef unix -#undef sgi -#undef NeXT -#undef mips - -/* ==================== Things `configure' will edit ==================== */ - -CC=gcc -CFLAGS=-bi486-linuxaout -O4 -m486 -malign-functions=2 -malign-jumps=2 -malign-loops=2 -ALLOCA= -YACC=bison -y -LN_S=ln -s -version=19.14 -configuration=i486-unknown-linux2.0.0 - -/* ==================== Where To Install Things ==================== */ - -/* The default location for installation. Everything is placed in - subdirectories of this directory. The default values for many of - the variables below are expressed in terms of this one, so you may - not need to change them. This is set with the --prefix option to - `../configure'. */ -prefix=/usr/local - -/* Like `prefix', but used for architecture-specific files. This is - set with the --exec-prefix option to `../configure'. */ -exec_prefix=${prefix} - -/* Where to install Emacs and other binaries that people will want to - run directly (like etags). This is set with the --bindir option - to `../configure'. */ -bindir=${exec_prefix}/bin - -/* Where to install and expect executable files to be run by Emacs - rather than directly by users, and other architecture-dependent - data. ${archlibdir} is usually below this. This is set with the - --libdir option to `../configure'. */ -libdir=${exec_prefix}/lib - -/* Where to find the source code. This is set by the configure - script's `--srcdir' option. However, the value of ${srcdir} in - this makefile is not identical to what was specified with --srcdir, - since the variable here has `/lib-src' added at the end. */ -srcdir=/m/xemacs-19.14/lib-src - -/* ==================== Emacs-specific directories ==================== */ - -/* These variables hold the values Emacs will actually use. They are - based on the values of the standard Make variables above. - - Where to put executables to be run by Emacs rather than the user. - This path usually includes the Emacs version and configuration name, - so that multiple configurations for multiple versions of Emacs may - be installed at once. This can be set with the --archlibdir option - to `../configure'. */ -archlibdir=${libdir}/xemacs-${version}/${configuration} - -/* ==================== Utility Programs for the Build ================= */ - -/* ../configure figures out the correct values for these. */ -INSTALL = /usr/bin/install -c -INSTALL_PROGRAM = ${INSTALL} -INSTALL_DATA = ${INSTALL} -m 644 - -/* ========================== Lists of Files =========================== */ - -/* Things that a user might actually run, - which should be installed in bindir. */ -INSTALLABLES = etags ctags emacsclient b2m gnuclient gnuattach gnudoit -INSTALLABLE_SCRIPTS = rcs-checkin - -/* Things that Emacs runs internally, or during the build process, - which should not be installed in bindir. */ -UTILITIES= make-path wakeup profile make-docfile digest-doc \ - sorted-doc movemail cvtmail fakemail yow emacsserver hexl \ - gnuserv - -/* Like UTILITIES, but they're not system-dependent, and should not be - deleted by the distclean target. */ -SCRIPTS= rcs2log vcdiff - -EXECUTABLES= ${UTILITIES} ${INSTALLABLES} ${SCRIPTS} ${INSTALLABLE_SCRIPTS} - -SOURCES = COPYING ChangeLog Makefile.in.in README aixcc.lex emacs.csh \ - makedoc.com *.[chy] rcs2log vcdiff - -/* ========================== start of cpp stuff ======================= */ - -/* From here on, comments must be done in C syntax. (see comment above - about this.) */ - -#define NO_SHORTNAMES -#define THIS_IS_YMAKEFILE -#define NOT_C_CODE -#include "../src/config.h" - -/* With the traditional VPATH setting, it is not possible to - simultaneously compile in-place and in another directory. The - mistaken definition is that *all* dependencies are searched for in - the VPATH directory, rather than just the dependencies that are not - themselves targets. Thus, if there is an up-to-date .o file in the - in-place location, it will not get recompiled in the not-in-place - location. - - The GNU Make `vpath' directive continues this tradition, but at - least lets you restrict the classes of files that it applies to. - This allows us to kludge around the problem. */ -#ifdef USE_GNU_MAKE -vpath %.c /m/xemacs-19.14/lib-src -vpath %.h /m/xemacs-19.14/lib-src -/* now list files that should NOT be searched in the srcdir. - This includes any .c or .h that's built from something else - (e.g. a .in file). */ -/* none here */ -#else -VPATH=/m/xemacs-19.14/lib-src -#endif - -/* We won't really call alloca; - don't let the file name alloca.c get messed up. */ -#ifdef alloca -#undef alloca -#endif - -/* Some s/*.h files define this to request special libraries. */ -#ifndef LIBS_SYSTEM -#define LIBS_SYSTEM -#endif - -/* Some m/*.h files define this to request special libraries. */ -#ifndef LIBS_MACHINE -#define LIBS_MACHINE -#endif - -#ifndef LD_SWITCH_X_SYSTEM -#define LD_SWITCH_X_SYSTEM -#endif - -#ifndef LD_SWITCH_X_SITE -#define LD_SWITCH_X_SITE -#endif - -#ifndef C_SWITCH_SYSTEM -#define C_SWITCH_SYSTEM -#endif - -#ifndef C_SWITCH_MACHINE -#define C_SWITCH_MACHINE -#endif - -#ifndef C_SWITCH_X_SYSTEM -#define C_SWITCH_X_SYSTEM -#endif - -#ifndef C_SWITCH_X_SITE -#define C_SWITCH_X_SITE -#endif - -#ifndef C_SWITCH_SITE -#define C_SWITCH_SITE -#endif - -#ifndef LD_SWITCH_SITE -#define LD_SWITCH_SITE -#endif - -#undef MOVEMAIL_NEEDS_BLESSING -#ifndef MAIL_USE_FLOCK -#ifndef MAIL_USE_LOCKF -#define MOVEMAIL_NEEDS_BLESSING -#endif -#endif - -#ifdef MOVEMAIL_NEEDS_BLESSING -#define BLESSMAIL blessmail -#else -#define BLESSMAIL -#endif - -#if defined (HAVE_SOCKS) -#define LIB_SOCKS -lsocks -#else -#define LIB_SOCKS -#endif - -LOADLIBES=LIBS_SYSTEM LIBS_MACHINE LIB_SOCKS LD_SWITCH_SITE -LOAD_X_LIBES=LD_SWITCH_X_SITE LD_SWITCH_X_SYSTEM -C_SWITCH_X=C_SWITCH_X_SITE C_SWITCH_X_SYSTEM C_SWITCH_SITE - -/* We need to #define emacs to get the right versions of some files. - Some other files - those shared with other GNU utilities - need - HAVE_CONFIG_H #defined before they know they can take advantage of - the information in ../src/config.h. */ -ALL_CFLAGS = C_SWITCH_SYSTEM C_SWITCH_MACHINE -Demacs -DHAVE_CONFIG_H \ - -DSTDC_HEADERS -I. -I../src -I${srcdir} -I${srcdir}/../src \ - ${LDFLAGS} ${CPPFLAGS} ${CFLAGS} -BASE_CFLAGS = C_SWITCH_SYSTEM C_SWITCH_MACHINE -DHAVE_CONFIG_H -DSTDC_HEADERS \ - -I. -I../src -I${srcdir} -I${srcdir}/../src ${CPPFLAGS} ${CFLAGS} -LINK_CFLAGS = C_SWITCH_SYSTEM C_SWITCH_MACHINE -Demacs -DHAVE_CONFIG_H \ - -I. -I../src -I${srcdir} -I${srcdir}/../src ${LDFLAGS} ${CFLAGS} -CPP_CFLAGS = C_SWITCH_SYSTEM C_SWITCH_MACHINE -Demacs -DHAVE_CONFIG_H \ - -I. -I../src -I${srcdir} -I${srcdir}/../src ${CPPFLAGS} ${CFLAGS} -/* Formerly -Demacs was missing, but it's needed to suppress the - defining of malloc to xmalloc. [Yes it's fucked up. Blame FSF - for this.] */ -ALLOCA_CFLAGS = C_SWITCH_SYSTEM C_SWITCH_MACHINE -Demacs -DHAVE_CONFIG_H \ - -I. -I../src -I${srcdir} -I${srcdir}/../src ${CPPFLAGS} ${CFLAGS} - -/* This is the default compilation command. - But we should never rely on it, because some make version - failed to find it for getopt.o. - Using an explicit command made it work. */ -.c.o: - ${CC} -c ${CPP_CFLAGS} $< - -all: ${UTILITIES} ${INSTALLABLES} ${SCRIPTS} - -/* Ultrix sh blows chunks. It core dumps on these statements. */ - -#ifndef ultrix -rcs2log: force - @if [ ! -r rcs2log ] ; then \ - rm -f rcs2log ; ${LN_S} ${srcdir}/rcs2log . ; \ - fi - -vcdiff: force - @if [ ! -r vcdiff ] ; then \ - rm -f vcdiff ; ${LN_S} ${srcdir}/vcdiff . ; \ - fi - -force: -#else /* ultrix */ -rcs2log: -vcdiff: -#endif /* ultrix */ - -#ifdef MOVEMAIL_NEEDS_BLESSING -blessmail: - ../src/emacs -batch -l ../lisp/blessmail.el - chmod +x blessmail -#endif - -maybe-blessmail: BLESSMAIL -#ifdef MOVEMAIL_NEEDS_BLESSING -/* Don't charge ahead and do it! Let the installer decide. - ./blessmail ${archlibdir}/movemail */ - @if [ `wc -l <blessmail` != 2 ] ; then \ - dir=`sed -n -e 's/echo mail directory = \(.*\)/\1/p' blessmail`; \ - echo Assuming $$dir is really the mail spool directory, you should; \ - echo run lib-src/blessmail ${archlibdir}/movemail; \ - echo as root, to give movemail appropriate permissions.; \ - echo Do that after running make install.; \ - fi -#endif - -/* Install the internal utilities. Until they are installed, we can - just run them directly from lib-src. */ -${archlibdir}: all - @echo - @echo "Installing utilities run internally by XEmacs." - ./make-path ${archlibdir} - if [ `(cd ${archlibdir} && /bin/pwd)` != `/bin/pwd` ]; then \ - for file in ${UTILITIES}; do \ - (cd ..; $(INSTALL_PROGRAM) lib-src/$$file ${archlibdir}/$$file) ; \ - done ; \ - fi - if [ `(cd ${archlibdir} && /bin/pwd)` \ - != `(cd ${srcdir} && /bin/pwd)` ]; then \ - for file in ${SCRIPTS}; do \ - (cd ..; $(INSTALL_PROGRAM) ${srcdir}/$$file ${archlibdir}/$$file); \ - done ; \ - fi - -/* We don't need to install `wakeup' explicitly, because it will be - copied when this whole directory is copied. */ -install: ${archlibdir} - @echo - @echo "Installing utilities for users to run." - for file in ${INSTALLABLES} ; do \ - (cd ..; $(INSTALL_PROGRAM) lib-src/$${file} ${bindir}/$${file}) ; \ - done - for file in ${INSTALLABLE_SCRIPTS} ; do \ - (cd ..; $(INSTALL_PROGRAM) ${srcdir}/$${file} ${bindir}/$${file}) ; \ - done - -uninstall: - (cd ${bindir}; \ - rm -f ${INSTALLABLES} ${INSTALLABLE_SCRIPTS}) - (cd ${archlibdir}; \ - rm -f ${UTILITIES} ${INSTALLABLES} ${SCRIPTS} ${INSTALLABLE_SCRIPTS}) - -mostlyclean: - -rm -f core *.o - -clean: mostlyclean - -rm -f ${INSTALLABLES} ${UTILITIES} - -distclean: clean - -rm -f ../etc/DOC* *.tab.c *.tab.h aixcc.c TAGS - -rm -f Makefile Makefile.in blessmail - -realclean: distclean - true - -extraclean: realclean - -rm -f *~ \#* - -unlock: - chmod u+w $(SOURCES) - -relock: - chmod u-w $(SOURCES) - -/* Test the contents of the directory. */ -check: - @echo "We don't have any tests for XEmacs yet." - -TAGS: etags - etags *.[ch] - -GETOPTOBJS = getopt.o getopt1.o $(ALLOCA) -GETOPTDEPS = $(GETOPTOBJS) ${srcdir}/getopt.h -getopt.o: ${srcdir}/getopt.c ${srcdir}/getopt.h - ${CC} -c ${CPP_CFLAGS} ${srcdir}/getopt.c -getopt1.o: ${srcdir}/getopt1.c ${srcdir}/getopt.h - ${CC} -c ${CPP_CFLAGS} ${srcdir}/getopt1.c -alloca.o: ${srcdir}/../src/alloca.c - ${CC} -c ${ALLOCA_CFLAGS} ${srcdir}/../src/alloca.c - -#ifdef REGEXP_IN_LIBC -REGEXOBJ = -REGEXDEPS = -#else -REGEXOBJ = regex.o -REGEXDEPS = $(REGEXOBJ) ${srcdir}/../src/regex.h -#endif - -regex.o: ${srcdir}/../src/regex.c ${srcdir}/../src/regex.h - $(CC) -c ${BASE_CFLAGS} -DCONFIG_BROKETS -DINHIBIT_STRING_HEADER ${srcdir}/../src/regex.c - -etags: ${srcdir}/etags.c $(GETOPTDEPS) $(REGEXDEPS) ../src/config.h - $(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" -DETAGS_REGEXPS ${srcdir}/etags.c $(GETOPTOBJS) $(REGEXOBJ) $(LOADLIBES) -o etags - -/* We depend on etags to assure that parallel makes don't write two - etags.o files on top of each other. */ -ctags: ${srcdir}/etags.c $(GETOPTDEPS) etags - $(CC) ${ALL_CFLAGS} -DCTAGS -DVERSION="\"${version}\"" ${srcdir}/etags.c $(GETOPTOBJS) $(LOADLIBES) -o ctags - -wakeup: ${srcdir}/wakeup.c - $(CC) ${ALL_CFLAGS} ${srcdir}/wakeup.c $(LOADLIBES) -o wakeup - -profile: ${srcdir}/profile.c - $(CC) ${ALL_CFLAGS} ${srcdir}/profile.c $(LOADLIBES) -o profile - -make-docfile: ${srcdir}/make-docfile.c - $(CC) ${ALL_CFLAGS} ${srcdir}/make-docfile.c $(LOADLIBES) -o make-docfile - -digest-doc: ${srcdir}/digest-doc.c - $(CC) ${ALL_CFLAGS} ${srcdir}/digest-doc.c $(LOADLIBES) -o digest-doc - -sorted-doc: ${srcdir}/sorted-doc.c ${ALLOCA} - $(CC) ${ALL_CFLAGS} ${srcdir}/sorted-doc.c ${ALLOCA} $(LOADLIBES) -o sorted-doc - -b2m: ${srcdir}/b2m.c ../src/config.h - $(CC) ${ALL_CFLAGS} ${srcdir}/b2m.c $(LOADLIBES) -o b2m - -movemail: ${srcdir}/movemail.c ../src/config.h - $(CC) ${ALL_CFLAGS} ${srcdir}/movemail.c $(LOADLIBES) -o movemail - -cvtmail: ${srcdir}/cvtmail.c - $(CC) ${ALL_CFLAGS} ${srcdir}/cvtmail.c $(LOADLIBES) -o cvtmail - -fakemail: ${srcdir}/fakemail.c ../src/config.h - $(CC) ${ALL_CFLAGS} ${srcdir}/fakemail.c $(LOADLIBES) -o fakemail - -yow: ${srcdir}/yow.c ../src/paths.h - $(CC) ${ALL_CFLAGS} ${srcdir}/yow.c $(LOADLIBES) -o yow - -emacsserver: ${srcdir}/emacsserver.c ../src/config.h - $(CC) ${ALL_CFLAGS} ${srcdir}/emacsserver.c $(LOADLIBES) -o emacsserver - -emacsclient: ${srcdir}/emacsclient.c ../src/config.h - $(CC) ${ALL_CFLAGS} ${srcdir}/emacsclient.c $(LOADLIBES) -o emacsclient - -hexl: ${srcdir}/hexl.c - $(CC) ${ALL_CFLAGS} ${srcdir}/hexl.c $(LOADLIBES) -o hexl - -/* Why oh why doesn't HP include half of the standard X distribution? */ - -#if defined (HAVE_XAUTH) -gnuslib.o: ${srcdir}/gnuslib.c ${srcdir}/gnuserv.h ../src/config.h - $(CC) -c ${CPP_CFLAGS} ${C_SWITCH_X} ${srcdir}/gnuslib.c - -gnuclient: ${srcdir}/gnuclient.c gnuslib.o ${srcdir}/gnuserv.h - $(CC) ${ALL_CFLAGS} -o gnuclient ${srcdir}/gnuclient.c gnuslib.o $(LOADLIBES) $(LOAD_X_LIBES) -lXau -gnuattach: ${srcdir}/gnuclient.c gnuslib.o ${srcdir}/gnuserv.h gnuclient - $(CC) ${ALL_CFLAGS} -o gnuattach -DGNUATTACH ${srcdir}/gnuclient.c gnuslib.o $(LOADLIBES) $(LOAD_X_LIBES) -lXau -gnudoit: ${srcdir}/gnudoit.c gnuslib.o ${srcdir}/gnuserv.h - $(CC) ${ALL_CFLAGS} -o gnudoit ${srcdir}/gnudoit.c gnuslib.o $(LOADLIBES) $(LOAD_X_LIBES) -lXau -gnuserv: ${srcdir}/gnuserv.c gnuslib.o ${srcdir}/gnuserv.h - $(CC) ${ALL_CFLAGS} ${C_SWITCH_X} -o gnuserv ${srcdir}/gnuserv.c gnuslib.o $(LOADLIBES) $(LOAD_X_LIBES) -lXau - -#else /* !HAVE_XAUTH */ - -gnuclient: ${srcdir}/gnuclient.c gnuslib.o ${srcdir}/gnuserv.h - $(CC) ${ALL_CFLAGS} -o gnuclient ${srcdir}/gnuclient.c gnuslib.o $(LOADLIBES) -gnuattach: ${srcdir}/gnuclient.c gnuslib.o ${srcdir}/gnuserv.h gnuclient - $(CC) ${ALL_CFLAGS} -o gnuattach -DGNUATTACH ${srcdir}/gnuclient.c gnuslib.o $(LOADLIBES) -gnudoit: ${srcdir}/gnudoit.c gnuslib.o ${srcdir}/gnuserv.h - $(CC) ${ALL_CFLAGS} -o gnudoit ${srcdir}/gnudoit.c gnuslib.o $(LOADLIBES) -gnuserv: ${srcdir}/gnuserv.c gnuslib.o ${srcdir}/gnuserv.h - $(CC) ${ALL_CFLAGS} -o gnuserv ${srcdir}/gnuserv.c gnuslib.o $(LOADLIBES) -#endif /* !HAVE_XAUTH */ - -/* The timer utility (timer.c, getdate.y) is not used in XEmacs - because XEmacs provides built-in timer facilities. */ - -make-path: ${srcdir}/make-path.c ../src/config.h - $(CC) $(ALL_CFLAGS) ${srcdir}/make-path.c -o make-path - -/* These are NOT included in INSTALLABLES or UTILITIES. - See ../src/Makefile.in.in. */ -emacstool: ${srcdir}/emacstool.c - $(CC) ${srcdir}/emacstool.c -o emacstool ${ALL_CFLAGS} \ - -lsuntool -lsunwindow -lpixrect $(LOADLIBES) - -/* For SUN Japanese Language Environment. */ -nemacstool: ${srcdir}/emacstool.c - $(CC) -o nemacstool -DJLE ${ALL_CFLAGS} ${srcdir}/emacstool.c \ - -lsuntool -lmle -lsunwindow -lpixrect $(LOADLIBES) - -xvetool: ${srcdir}/emacstool.c - $(CC) -o xvetool -DXVIEW ${ALL_CFLAGS} ${srcdir}/emacstool.c \ - -lxview -lX -I$(OPENWINHOME)/include -L$(OPENWINHOME)/lib \ - $(LOADLIBES) - -xveterm: ${srcdir}/emacstool.c - $(CC) -o xveterm -DXVIEW -DTTERM ${ALL_CFLAGS} ${srcdir}/emacstool.c \ - -lxview -lolgx -lX -I$(OPENWINHOME)/include -L$(OPENWINHOME)/lib \ - $(LOADLIBES) - -aixcc: ${srcdir}/aixcc.c - $(CC) $(ALL_CFLAGS) -o aixcc ${srcdir}/aixcc.c - -aixcc.c: ${srcdir}/aixcc.lex - lex ${srcdir}/aixcc.lex - mv lex.yy.c aixcc.c
--- a/lib-src/ad2c Mon Aug 13 08:45:53 2007 +0200 +++ b/lib-src/ad2c Mon Aug 13 08:46:35 2007 +0200 @@ -20,7 +20,7 @@ s/\\/\\\\/g s/\\$//g s/"/\\"/g -s/^/"/ +s/^/(String) "/ : test /\\$/b slash s/$/",/
--- a/lib-src/etags.c Mon Aug 13 08:45:53 2007 +0200 +++ b/lib-src/etags.c Mon Aug 13 08:46:35 2007 +0200 @@ -1218,7 +1218,7 @@ continue; *cp = '\0'; - if (strlen (lp) > 0) + if (strlen (lp) > (size_t) 0) { function = get_language_from_interpreter (lp); if (function != NULL) @@ -3436,7 +3436,7 @@ #ifdef ETAGS_REGEXPS /* Take a string like "/blah/" and turn it into "blah", making sure that the first and last characters are the same, and handling - quoted separator characters. Actually, stops on the occurence of + quoted separator characters. Actually, stops on the occurrence of an unquoted separator. Also turns "\t" into a Tab character. Returns pointer to terminating separator. Works in place. Null terminates name string. */
--- a/lib-src/fakelisp.c Mon Aug 13 08:45:53 2007 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ -#include "fakelisp.h" - -void *Lisp_Object_Table[4096]; -int Lisp_Object_Index = 0; - -Lisp_Object -make_vector(len) - int len; -{ - Lisp_Object val = Lisp_Object_Index++; - - Lisp_Object_Table[val] = (char *) malloc (sizeof (struct Lisp_Vector)); - XVECTOR (val)->size = len; - XVECTOR (val)->contents = - (Lisp_Object *) malloc ((sizeof (Lisp_Object)) * len); - return (val | (Lisp_Vector << VALBITS)); -} - -Lisp_Object -make_string(str) - char *str; -{ - Lisp_Object val = Lisp_Object_Index++; - int len = strlen (str); - - Lisp_Object_Table[val] = (char *) malloc (sizeof (struct Lisp_String)); - XSTRING (val)->size = len; - XSTRING (val)->data = (unsigned char *) malloc (len + 1); - memcpy (XSTRING (val)->data, str, len + 1); - return (val | (Lisp_String << VALBITS)); -} - -Lisp_Object -make_symbol(name) - char *name; -{ - Lisp_Object val = Lisp_Object_Index++; - int len = strlen (name); - - Lisp_Object_Table[val] = (char *) malloc (sizeof (struct Lisp_Symbol)); - XSYMBOL (val)->name = (unsigned char *) malloc (len + 1); - memcpy (XSYMBOL (val)->name, name, len + 1); - XSYMBOL (val)->value = Qnil; - return (val | (Lisp_String << VALBITS)); -} - -Lisp_Object -Fsymbol_value(obj) - Lisp_Object obj; -{ - return XSYMBOL (obj)->value; -}
--- a/lib-src/fakelisp.h Mon Aug 13 08:45:53 2007 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,75 +0,0 @@ -#ifndef _FAKELISP_H -#define _FAKELISP_H - -#include <config.h> - -/* Cancel substitutions made by config.h for Emacs. */ -#undef open -#undef read -#undef write -#undef close - -/* We used to test for `BSTRING' here, but only GCC and Emacs define - `BSTRING', as far as I know, and neither of them use this code. */ -#if HAVE_STRING_H || STDC_HEADERS -#include <string.h> -#ifndef bcmp -#define bcmp(s1, s2, n) memcmp ((s1), (s2), (n)) -#endif -#ifndef bcopy -#define bcopy(s, d, n) memcpy ((d), (s), (n)) -#endif -#ifndef bzero -#define bzero(s, n) memset ((s), 0, (n)) -#endif -#else -#include <strings.h> -#endif - -typedef unsigned int Lisp_Object; - -enum Lisp_Type { - Lisp_Int, - Lisp_Symbol, - Lisp_String, - Lisp_Vector -}; - -#ifndef VALBITS /* hir, 1994.12.19 */ -#define VALBITS 24 -#endif -#define VALMASK ((1 << VALBITS) - 1) - -#define XTYPE(x) ((enum Lisp_Type)((x)>>VALBITS)) - -struct Lisp_Vector { - int size; - Lisp_Object *contents; -}; - -struct Lisp_String { - int size; - unsigned char *data; -}; - -struct Lisp_Symbol { - unsigned char *name; - Lisp_Object value; -}; - -#define Qnil (Lisp_Object)(Lisp_Symbol << VALBITS) -#define Qt (Lisp_Object)((Lisp_Symbol << VALBITS) | 1) - -#define XFASTINT(x) (x) -#define XVECTOR(x) ((struct Lisp_Vector *)Lisp_Object_Table[(x)&VALMASK]) -#define XSTRING(x) ((struct Lisp_String *)Lisp_Object_Table[(x)&VALMASK]) -#define XSYMBOL(x) ((struct Lisp_Symbol *)Lisp_Object_Table[(x)&VALMASK]) - -extern void *Lisp_Object_Table[4096]; - -extern Lisp_Object make_vector(), make_string(), make_symbol(); -extern Lisp_Object Fsymbol_value(); - -#define GLYPH unsigned int - -#endif /* _FAKELISP_H */
--- a/lib-src/gnuserv.h Mon Aug 13 08:45:53 2007 +0200 +++ b/lib-src/gnuserv.h Mon Aug 13 08:46:35 2007 +0200 @@ -186,15 +186,10 @@ #undef TRUE #define TRUE 1 -extern char *getenv(); extern char *optarg; extern int optind; extern char *progname; -#ifndef BSD -extern char *getcwd(); -#endif - /* The casts shut Sun's compiler up and are safe in the context these are actually used. */ #define max2(x,y) (((int) (x) > (int) (y)) ? (x) : (y))
--- a/lib-src/update-autoloads.sh Mon Aug 13 08:45:53 2007 +0200 +++ b/lib-src/update-autoloads.sh Mon Aug 13 08:46:35 2007 +0200 @@ -1,21 +1,6 @@ #!/bin/sh ### update-autoloads.sh --- update loaddefs.el as necessary -# Author: Jamie Zawinski <jwz@lucid.com> -# Maintainer: Ben Wing <ben.wing@Eng.Sun.COM> -# Created: ? -# Version: 1.0 -# Modified: 94/07/13 16:18:44 -# Keywords: recompile .el .elc - -### Commentary: -## Recompile all .elc files that need recompilation. Requires a working -## version of 'xemacs'. Correctly handles the case where the .elc files -## are missing; thus you can execute 'rm lisp/*/*.elc' before running -## this script. Run this from the parent directory of 'src', 'lisp', -## and 'etc'. (If this is a Sun workspace, you can run it from -## 'era-specific' instead.) - set -eu # This means we're running in a Sun workspace @@ -38,25 +23,12 @@ export EMACS -# fuckin' sysv, man... -if [ "`uname -r | sed 's/\(.\).*/\1/'`" -gt 4 ]; then - echon() - { - /bin/echo $* '\c' - } -else - echon() - { - echo -n $* - } -fi - REAL=`cd \`dirname $EMACS\` ; pwd | sed 's|^/tmp_mnt||'`/`basename $EMACS` echo "Recompiling in `pwd|sed 's|^/tmp_mnt||'`" echo " with $REAL..." -src/xemacs -batch -q -f batch-update-autoloads \ +$EMACS -batch -q -f batch-update-autoloads \ `ls lisp | egrep -v \ "COPYING|README|SCCS|egg|eterm|its|mule|paths.el|quail|version.el|vms" \ | xargs -i echo lisp/\{\}`
--- a/lib-src/update-elc.sh Mon Aug 13 08:45:53 2007 +0200 +++ b/lib-src/update-elc.sh Mon Aug 13 08:46:35 2007 +0200 @@ -17,6 +17,7 @@ ## 'era-specific' instead.) set -eu +unset MAKEFLAGS # GNU make sets MAKEFLAGS to -w; confuses non-GNU make # This means we're running in a Sun workspace if [ -d ../era-specific ]; then
--- a/lib-src/wakeup.c Mon Aug 13 08:45:53 2007 +0200 +++ b/lib-src/wakeup.c Mon Aug 13 08:46:35 2007 +0200 @@ -21,8 +21,6 @@ #endif #endif -struct tm *localtime (); - void main (argc, argv) int argc;
--- a/lisp/bytecomp/byte-optimize.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/bytecomp/byte-optimize.el Mon Aug 13 08:46:35 2007 +0200 @@ -1186,7 +1186,7 @@ (progn (setq ptr (1+ ptr)) (lsh (aref bytes ptr) 8)))) ;; XEmacs: this code was here before. FSF's first comparison - ;; is (>= op byte-listN). It appears the the rel-goto stuff + ;; is (>= op byte-listN). It appears that the rel-goto stuff ;; does not exist in FSF 19.30. It doesn't exist in 19.28 ;; either, so I'm going to assume that this is an improvement ;; on our part and leave it in. --ben
--- a/lisp/bytecomp/bytecomp-runtime.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/bytecomp/bytecomp-runtime.el Mon Aug 13 08:46:35 2007 +0200 @@ -144,12 +144,12 @@ ;;; The great RMS speaketh: ;;; -;;; I nuked this because it's not a good idea for users to think of using it. -;;; These options are a matter of installation preference, and have nothing to -;;; with particular source files; it's a mistake to suggest to users -;;; they should associate these with particular source files. -;;; There is hardly any reason to change these parameters, anyway. -;;; --rms. +;;; I nuked this because it's not a good idea for users to think of +;;; using it. These options are a matter of installation preference, +;;; and have nothing to do with particular source files; it's a +;;; mistake to suggest to users that they should associate these with +;;; particular source files. There is hardly any reason to change +;;; these parameters, anyway. --rms. ;;; ;;; But I'll leave this stuff alone. --ben @@ -157,7 +157,7 @@ (defmacro byte-compiler-options (&rest args) "Set some compilation-parameters for this file. This will affect only the file in which it appears; this does nothing when -evaluated, and when loaded from a .el file. +evaluated, or when loaded from a .el file. Each argument to this macro must be a list of a key and a value.
--- a/lisp/bytecomp/bytecomp.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/bytecomp/bytecomp.el Mon Aug 13 08:46:35 2007 +0200 @@ -291,6 +291,7 @@ "This is completely ignored. It is only around for backwards compatibility.") + ;; FSF enables byte-compile-dynamic-docstrings but not byte-compile-dynamic ;; by default. This would be a reasonable conservative approach except ;; for the fact that if you enable either of these, you get incompatible @@ -342,7 +343,7 @@ (defvar byte-compile-warnings t "*List of warnings that the compiler should issue (t for the default set). -Elements of the list may be be: +Elements of the list may be: free-vars references to variables not in the current lexical scope. unused-vars references to non-global variables bound but not referenced. @@ -1703,6 +1704,7 @@ ))) + (defun byte-compile-output-file-form (form) ;; writes the given form to the output buffer, being careful of docstrings ;; in defun, defmacro, defvar, defconst and autoload because make-docfile is
--- a/lisp/calendar/calendar.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/calendar/calendar.el Mon Aug 13 08:46:35 2007 +0200 @@ -613,7 +613,7 @@ ;;;###autoload (defvar diary-list-include-blanks nil "*If nil, do not include days with no diary entry in the list of diary entries. -Such days will then not be shown in the the fancy diary buffer, even if they +Such days will then not be shown in the fancy diary buffer, even if they are holidays.") ;;;###autoload
--- a/lisp/cl/cl-autoload.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/cl/cl-autoload.el Mon Aug 13 08:46:35 2007 +0200 @@ -20,9 +20,10 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30 (cl.el). +;;; Synched up with: FSF 19.34 (cl.el). ;;; Commentary:
--- a/lisp/cl/cl-compat.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/cl/cl-compat.el Mon Aug 13 08:46:35 2007 +0200 @@ -20,9 +20,10 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary:
--- a/lisp/cl/cl-extra.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/cl/cl-extra.el Mon Aug 13 08:46:35 2007 +0200 @@ -20,9 +20,10 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary: @@ -85,11 +86,12 @@ (cond ((eq x y) t) ((stringp x) (and (stringp y) (= (length x) (length y)) - (or (equal x y) - (equal (downcase x) (downcase y))))) ; lazy but simple! + (or (string-equal x y) + (string-equal (downcase x) (downcase y))))) ; lazy but simple! ((numberp x) (and (numberp y) (= x y))) ((consp x) + ;; XEmacs change (while (and (consp x) (consp y) (equalp (cl-pop x) (cl-pop y)))) (and (not (consp x)) (equalp x y))) ((vectorp x) @@ -373,6 +375,7 @@ (defun isqrt (a) "Return the integer square root of the argument." (if (and (integerp a) (> a 0)) + ;; XEmacs change (let ((g (cond ((>= a 1000000) 10000) ((>= a 10000) 1000) ((>= a 100) 100) (t 10))) g2) @@ -383,7 +386,7 @@ (defun cl-expt (x y) "Return X raised to the power of Y. Works only for integer arguments." - (if (<= y 0) (if (= y 0) 1 (if (memq x '(-1 1)) x 0)) + (if (<= y 0) (if (= y 0) 1 (if (memq x '(-1 1)) (cl-expt x (- y)) 0)) (* (if (= (% y 2) 0) 1 x) (cl-expt (* x x) (/ y 2))))) (or (and (fboundp 'expt) (subrp (symbol-function 'expt))) (defalias 'expt 'cl-expt)) @@ -593,7 +596,7 @@ (defun cl-copy-tree (tree &optional vecp) "Make a copy of TREE. If TREE is a cons cell, this recursively copies both its car and its cdr. -Constrast to copy-sequence, which copies only along the cdrs. With second +Contrast to copy-sequence, which copies only along the cdrs. With second argument VECP, this copies vectors as well as conses." (if (consp tree) (let ((p (setq tree (copy-list tree)))) @@ -655,11 +658,12 @@ (defun make-hash-table (&rest cl-keys) "Make an empty Common Lisp-style hash-table. If :test is `eq', `eql', or `equal', this can use XEmacs built-in hash-tables. -In XEmacs, or with a different test, this internally uses a-lists. +In Emacs 19, or with a different test, this internally uses a-lists. Keywords supported: :test :size The Common Lisp keywords :rehash-size and :rehash-threshold are ignored." (let ((cl-test (or (car (cdr (memq ':test cl-keys))) 'eql)) (cl-size (or (car (cdr (memq ':size cl-keys))) 20))) + ;; XEmacs change (if (and (memq cl-test '(eq eql equal)) (fboundp 'make-hashtable)) (funcall 'make-hashtable cl-size cl-test) (list 'cl-hash-table-tag cl-test @@ -893,7 +897,10 @@ cl-closure-vars) '((quote --cl-rest--))))))) (list (car form) (list* 'lambda (cadadr form) body)))) - form)) + (let ((found (assq (cadr form) env))) + (if (eq (cadr (caddr found)) 'cl-labels-args) + (cl-macroexpand-all (cadr (caddr (cadddr found))) env) + form)))) ((memq (car form) '(defun defmacro)) (list* (car form) (nth 1 form) (cl-macroexpand-body (cddr form) env))) ((and (eq (car form) 'progn) (not (cddr form)))
--- a/lisp/cl/cl-macs.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/cl/cl-macs.el Mon Aug 13 08:46:35 2007 +0200 @@ -20,9 +20,10 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary: @@ -418,6 +419,7 @@ (symbol-function 'byte-compile-file-form))) (list 'byte-compile-file-form (list 'quote set)) '(byte-compile-file-form form))) + ;; XEmacs change (print set (symbol-value ;;'outbuffer 'byte-compile-output-buffer ))) @@ -1225,6 +1227,10 @@ (mapcar (function (lambda (x) + (if (or (and (fboundp (car x)) + (eq (car-safe (symbol-function (car x))) 'macro)) + (cdr (assq (car x) cl-macro-environment))) + (error "Use `labels', not `flet', to rebind macro names")) (let ((func (list 'function* (list 'lambda (cadr x) (list* 'block (car x) (cddr x)))))) @@ -1236,7 +1242,22 @@ bindings) body)) -(defmacro labels (&rest args) (cons 'flet args)) +(defmacro labels (bindings &rest body) + "(labels ((FUNC ARGLIST BODY...) ...) FORM...): make temporary func bindings. +This is like `flet', except the bindings are lexical instead of dynamic. +Unlike `flet', this macro is fully complaint with the Common Lisp standard." + (let ((vars nil) (sets nil) (cl-macro-environment cl-macro-environment)) + (while bindings + (let ((var (gensym))) + (cl-push var vars) + (cl-push (list 'function* (cons 'lambda (cdar bindings))) sets) + (cl-push var sets) + (cl-push (list (car (cl-pop bindings)) 'lambda '(&rest cl-labels-args) + (list 'list* '(quote funcall) (list 'quote var) + 'cl-labels-args)) + cl-macro-environment))) + (cl-macroexpand-all (list* 'lexical-let vars (cons (cons 'setq sets) body)) + cl-macro-environment))) ;; The following ought to have a better definition for use with newer ;; byte compilers. @@ -1406,6 +1427,7 @@ ((and (eq (car-safe spec) 'warn) (boundp 'byte-compile-warnings)) (if (eq byte-compile-warnings t) + ;; XEmacs change (setq byte-compile-warnings byte-compile-default-warnings)) (while (setq spec (cdr spec)) (if (consp (car spec)) @@ -1578,6 +1600,7 @@ (defsetf extent-data set-extent-data) ; obsolete (defsetf extent-face set-extent-face) (defsetf extent-priority set-extent-priority) +;; XEmacs change (defsetf extent-property set-extent-property) (defsetf extent-end-position (ext) (store) (list 'progn (list 'set-extent-endpoints (list 'extent-start-position ext) @@ -2021,6 +2044,7 @@ (tag (intern (format "cl-struct-%s" name))) (tag-symbol (intern (format "cl-struct-%s-tags" name))) (include-descs nil) + ;; XEmacs change (include-tag-symbol nil) (side-eff nil) (type nil) @@ -2054,6 +2078,7 @@ (lambda (x) (if (consp x) x (list x)))) (cdr args)) + ;; XEmacs change include-tag-symbol (intern (format "cl-struct-%s-tags" include)))) ((eq opt ':print-function) @@ -2093,8 +2118,12 @@ type (car inc-type) named (assq 'cl-tag-slot descs)) (if (cadr inc-type) (setq tag name named t)) - (cl-push (list 'pushnew (list 'quote tag) include-tag-symbol) - forms)) + (let ((incl include)) + (while incl + (cl-push (list 'pushnew (list 'quote tag) + (intern (format "cl-struct-%s-tags" incl))) + forms) + (setq incl (get incl 'cl-struct-include))))) (if type (progn (or (memq type '(vector list)) @@ -2201,6 +2230,8 @@ (list 'quote descs)) (list 'put (list 'quote name) '(quote cl-struct-type) (list 'quote (list type (eq named t)))) + (list 'put (list 'quote name) '(quote cl-struct-include) + (list 'quote include)) (list 'put (list 'quote name) '(quote cl-struct-print) print-auto) (mapcar (function (lambda (x) @@ -2597,6 +2628,7 @@ ;;; Things that are inline. (proclaim '(inline floatp-safe acons map concatenate notany notevery +;; XEmacs change cl-set-elt revappend nreconc)) ;;; Things that are side-effect-free.
--- a/lisp/cl/cl-seq.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/cl/cl-seq.el Mon Aug 13 08:46:35 2007 +0200 @@ -20,9 +20,10 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary:
--- a/lisp/cl/cl.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/cl/cl.el Mon Aug 13 08:46:35 2007 +0200 @@ -20,9 +20,10 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary: @@ -281,6 +282,7 @@ (defvar cl-compiling-file nil) (defun cl-compiling-file () (or cl-compiling-file + ;; XEmacs change ; (and (boundp 'outbuffer) (bufferp (symbol-value 'outbuffer)) ; (equal (buffer-name (symbol-value 'outbuffer)) ; " *Compiler Output*"))
--- a/lisp/comint/comint.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/comint/comint.el Mon Aug 13 08:46:35 2007 +0200 @@ -581,7 +581,7 @@ (popup-menu (if history (append comint-popup-menu (list "---" (cons "Command History" history))) - comint-menu)))) + comint-popup-menu)))) (defvar comint-history-menu-max 40 "*Maximum number of entries to display on the Comint command-history menu.") @@ -635,7 +635,7 @@ If PROGRAM is a string, any more args are arguments to PROGRAM." (or (fboundp 'start-process) - (error "Multi-processing is not supported for this system")) + (error "Multiple processes are not supported for this system")) (let ((buffer (get-buffer-create (concat "*" name "*")))) ;; If no process, or nuked process, crank up a new one and put buffer in ;; comint mode. Otherwise, leave buffer and existing process alone. @@ -1828,7 +1828,7 @@ ;;; your cursor over a string that's a filename and have it taken as default. ;;; ;;; If the command is given in a file buffer whose major mode is in -;;; SOURCE-MODES, then the the filename is the default file, and the +;;; SOURCE-MODES, then the filename is the default file, and the ;;; file's directory is the default directory. ;;; ;;; If the buffer isn't a source file buffer (e.g., it's the process buffer),
--- a/lisp/comint/gud.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/comint/gud.el Mon Aug 13 08:46:35 2007 +0200 @@ -403,7 +403,7 @@ ;; instance. ;; The remaining function(s) are optional: ;; -;; MODE - called in new new buffer with no arguments, should establish +;; MODE - called in the new buffer with no arguments, should establish ;; the proper mode for the buffer. ;;
--- a/lisp/comint/kermit.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/comint/kermit.el Mon Aug 13 08:46:35 2007 +0200 @@ -65,7 +65,7 @@ ;; the -c (connect) command line option, which means you also have to specify a ;; line and baud on the command line, as in "kermit -l /dev/tty53 -b 9600 -c". ;; However, this will cause kermit to exit when the connection is closed. So -;; in order to do a file transfer, you have to think ahead and and add -r +;; in order to do a file transfer, you have to think ahead and add -r ;; (receive) to the command line. This means that you can't use the server ;; feature. The only fix I can see is to muck around with the source code for ;; kermit, although this probably wouldn't be too hard. What is needed is an
--- a/lisp/dired/ange-ftp.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/dired/ange-ftp.el Mon Aug 13 08:46:35 2007 +0200 @@ -872,7 +872,7 @@ (defvar ange-ftp-make-backup-files () "*A list of operating systems for which ange-ftp will make Emacs backup -files files on the remote host. For example, '\(unix\) makes sense, but +files on the remote host. For example, '\(unix\) makes sense, but '\(unix vms\) or '\(vms\) would be silly, since vms makes its own backups.") (defvar ange-ftp-retry-time 5 @@ -2145,7 +2145,7 @@ "^[A-Z0-9._][A-Z0-9._][A-Z0-9._][A-Z0-9._]:$") (defun ange-ftp-guess-host-type (host user) - "Guess at the the host type of HOST by doing a pwd, and examining + "Guess at the host type of HOST by doing a pwd, and examining the directory syntax." (let ((host-type (ange-ftp-host-type host)) (key (concat host "/" user "/~")))
--- a/lisp/dired/dired-chmod.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/dired/dired-chmod.el Mon Aug 13 08:46:35 2007 +0200 @@ -132,6 +132,7 @@ ((looking-at "x") "o-x") (t "o-x"))))))) +;;;###autoload (defun dired-make-permissions-interactive () (save-excursion (beginning-of-line 0)
--- a/lisp/dired/dired-x.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/dired/dired-x.el Mon Aug 13 08:46:35 2007 +0200 @@ -627,8 +627,8 @@ ;; \017=^O for Omit - other packages can chose other control characters. (defvar dired-omit-marker-char ?\017 - "Temporary marker used by by dired-omit. -Should never be used as marker by the user or other packages.") + "Temporary marker used by dired-omit. +Should never be used as a marker by the user or other packages.") (defun dired-omit-startup () (or (assq 'dired-omit-files-p minor-mode-alist) @@ -1400,7 +1400,7 @@ If Dired finds a file with that name in the current directory, it will temporarily insert it into the dired buffer and run `hack-local-variables'. -Type \\[info] and and `g' `(emacs)File Variables' `RET' for more info on +Type \\[info] and `g' `(emacs)File Variables' `RET' for more info on local variables.") (defun dired-hack-local-variables ()
--- a/lisp/dired/dired.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/dired/dired.el Mon Aug 13 08:46:35 2007 +0200 @@ -456,7 +456,8 @@ ;; dired-readin's output, nothing else. The hook can ;; successfully use dired functions (e.g. dired-get-filename) ;; as the subdir-alist has been built in dired-readin. - (run-hooks 'dired-after-readin-hook) + (let ((buffer-read-only nil)) + (run-hooks 'dired-after-readin-hook)) (goto-char (point-min)) (dired-initial-position dirname)) (set-buffer old-buf) @@ -3107,7 +3108,7 @@ ;; filenames are preceded by SPC, this makes ;; the search faster (e.g. for the filename "-"!). (search-forward (concat " " base) boundary 'move)) - ;; Match could have BASE just as initial substring or + ;; Match could have BASE just as initial substring ;; or in permission bits or date or ;; not be a proper filename at all: (if (equal base (dired-get-filename 'no-dir t))
--- a/lisp/edebug/cl-read.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/edebug/cl-read.el Mon Aug 13 08:46:35 2007 +0200 @@ -204,8 +204,8 @@ ; Change History ; ; $Log: cl-read.el,v $ -; Revision 1.1.1.1 1996/12/18 03:33:25 steve -; XEmacs 19.14 -- Release +; Revision 1.1.1.2 1996/12/18 03:46:06 steve +; XEmacs 19.15-b2 ; ; Revision 1.19 94/03/21 19:59:24 liberte ; Add invalid-cl-read-syntax error symbol. @@ -556,7 +556,7 @@ (return (prog1 (, reader-call) - ;; this occurence of the after hook fires if the + ;; this occurrence of the after hook fires if the ;; reader-call returns normally ... (run-hooks 'after-read-hook)))) ;; ... and that one if it was thrown to the tag 'reader-ignore
--- a/lisp/ediff/ediff-mult.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/ediff/ediff-mult.el Mon Aug 13 08:46:35 2007 +0200 @@ -26,7 +26,7 @@ ;; Users are encouraged to add functionality to this file. ;; The present file contains all the infrastructure needed for that. ;; -;; Generally, to to implement a new multisession capability within Ediff, +;; Generally, to implement a new multisession capability within Ediff, ;; you need to tell it ;; ;; 1. How to display the session group buffer.
--- a/lisp/ediff/ediff-util.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/ediff/ediff-util.el Mon Aug 13 08:46:35 2007 +0200 @@ -465,7 +465,7 @@ (ediff-refresh-mode-lines) (setq ediff-control-window (selected-window)) (setq ediff-window-config-saved - (format "%S%S%S%S%S%S%S" + (format "\%S\%S\%S\%S\%S\%S\%S" ediff-control-window ediff-window-A ediff-window-B
--- a/lisp/ediff/ediff-wind.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/ediff/ediff-wind.el Mon Aug 13 08:46:35 2007 +0200 @@ -1189,7 +1189,7 @@ (or (not ediff-3way-job) (eq (window-buffer C-wind) ediff-buffer-C)) (string= ediff-window-config-saved - (format "%S%S%S%S%S%S%S" + (format "\%S\%S\%S\%S\%S\%S\%S" ctl-wind A-wind B-wind C-wind ediff-split-window-function (ediff-multiframe-setup-p)
--- a/lisp/ediff/ediff.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/ediff/ediff.el Mon Aug 13 08:46:35 2007 +0200 @@ -1059,7 +1059,7 @@ ;;;###autoload (defun ediff-merge-revisions-with-ancestor (&optional file startup-hooks) "Run Ediff by merging two revisions of a file with a common ancestor. -The file is the the optional FILE argument or the file visited by the current +The file is the optional FILE argument or the file visited by the current buffer." (interactive) (if (stringp file) (find-file file))
--- a/lisp/emulators/tpu-doc.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/emulators/tpu-doc.el Mon Aug 13 08:46:35 2007 +0200 @@ -301,7 +301,7 @@ ;(and (fboundp 'tpu-set-scroll-margins) (tpu-set-scroll-margins "10%" "15%")) ;; Load the vtxxx terminal control functions, but don't complain if -;; if the file is not found. +;; the file is not found. (load "vt-control" t) ;; TPU-edt treats words like EDT; here's how to add word separators.
--- a/lisp/eos/sun-eos-toolbar.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/eos/sun-eos-toolbar.el Mon Aug 13 08:46:35 2007 +0200 @@ -272,6 +272,49 @@ (expand-file-name "eos-step-into.xbm" eos::toolbar-icon-directory))) "A Step Into icon pair.") +(defvar eos::toolbar-step-up-icon + (if (featurep 'xpm) + (toolbar-make-button-list + "/* XPM */ +static char * file[] = { +\"28 28 5 1\", +\" c #C8C8C8C8C8C8 s backgroundToolBarColor\", +\". c #000000000000\", +\"O c #0000FFFF0000\", +\"+ c #000077770000\", +\"@ c #000044440000\", +\" \", +\" \", +\" \", +\" \", +\" \", +\" \", +\" . \", +\" .. ....... \", +\" .O. \", +\" ....O@. \", +\" .++++++@. ....... \", +\" .O+++++++@. \", +\" .O++OOO+@. \", +\" .O+...O@. ....... \", +\" .O+. .O. \", +\" .O+. .. \", +\" .O+. . \", +\" .O+. \", +\" .O+.... ........ \", +\" .O++++. \", +\" .OOOO. \", +\" ..... ....... \", +\" \", +\" \", +\" \", +\" \", +\" \", +\" \"};") + (toolbar-make-button-list + (expand-file-name "eos-step-up.xbm" eos::toolbar-icon-directory))) + "A Step up icon pair.") + (defvar eos::toolbar-step-over-icon (if (featurep 'xpm) (toolbar-make-button-list @@ -921,6 +964,10 @@ eos::step eos::current-debugger-clique-id "step: Step into subprogram calls)"] + [eos::toolbar-step-up-icon + eos::step-up + eos::current-debugger-clique-id + "step up: Step up from subprogram calls)"] [eos::toolbar-build-icon eos::build eos::current-debugger-clique-id @@ -989,6 +1036,10 @@ eos::step eos::current-debugger-clique-id "step: Step into subprogram calls)"] + [eos::toolbar-step-up-icon + eos::step-up + eos::current-debugger-clique-id + "step up: Step up from subprogram calls)"] [eos::toolbar-build-icon eos::build eos::current-debugger-clique-id
--- a/lisp/eterm/term.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/eterm/term.el Mon Aug 13 08:46:35 2007 +0200 @@ -1848,7 +1848,7 @@ ;;; your cursor over a string that's a filename and have it taken as default. ;;; ;;; If the command is given in a file buffer whose major mode is in -;;; SOURCE-MODES, then the the filename is the default file, and the +;;; SOURCE-MODES, then the filename is the default file, and the ;;; file's directory is the default directory. ;;; ;;; If the buffer isn't a source file buffer (e.g., it's the process buffer),
--- a/lisp/gnus/ChangeLog Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/gnus/ChangeLog Mon Aug 13 08:46:35 2007 +0200 @@ -1,3 +1,497 @@ +Fri Aug 30 02:23:23 1996 Lars Magne Ingebrigtsen <larsi@hrym.ifi.uio.no> + + * message.el (message-do-fcc): Set the FROM-GNUS flag. + +Sat Aug 24 23:32:02 1996 Lars Magne Ingebrigtsen <larsi@ylfing.ifi.uio.no> + + * gnus.el (gnus-group-enter-directory): Would temporarily bind + `nneething-read-only', shadowing the proper `defvar'. + +Fri Aug 2 22:25:31 1996 Lars Magne Ingebrigtsen <larsi@hrym.ifi.uio.no> + + * gnus.el: Gnus v5.2.39 is released. + +Wed Jul 31 15:23:54 1996 Ken Olstad <ken@mn.cheyenne.com> + + * gnus-xmas.el (gnus-xmas-redefine): Disbale XFace when running + under tty. + +Wed Jul 31 14:21:38 1996 Lars Magne Ingebrigtsen <lars@eyesore.no> + + * gnus.el (gnus-group-read-group): Use `gnus-range-length' instead + of `length'. + +Tue Jul 30 21:42:59 1996 Lars Magne Ingebrigtsen <larsi@ifi.uio.no> + + * gnus.el: Gnus v5.2.38 is released. + +Tue Jul 30 00:00:28 1996 Lars Magne Ingebrigtsen <lars@eyesore.no> + + * nntp.el (nntp-open-server): Init server buffer. + + * gnus.el (gnus-group-prefixed-name): Do the right thing with nil + methods. + (gnus-group-rename-group): Would act oddly when renaming native + groups. + +Sat Jul 27 17:46:42 1996 Lars Magne Ingebrigtsen <lars@eyesore.no> + + * message.el (message-check-news-syntax): Use signature + separator. + + * gnus.el (gnus-group-make-group): Beep at "" methods. + (gnus-group-make-group): Don't prefix native groups. + + * nnmail.el (nnmail-move-inbox): Bug out on movemail errors. + + * gnus-cache.el (gnus-cache-file-name): Would bug out on group + names containing slashes. + + * gnus-topic.el (gnus-topic-check-topology): Make sure all groups + in topics are living. + + * nntp.el (nntp-send-strings-to-server): Give a better error + message. + +Sat Jul 27 17:33:22 1996 Teddy <teddy@fukt.hk-r.se> + + * nntp.el (nntp-open-rlogin): Change parameter order. + +Sat Jul 27 17:19:47 1996 Lars Magne Ingebrigtsen <lars@eyesore.no> + + * gnus-topic.el (gnus-topic-check-topology): Make sure all + topologies have alists. + +Wed Jul 24 08:23:26 1996 Lars Magne Ingebrigtsen <larsi@ifi.uio.no> + + * gnus.el (gnus-group-jump-to-group): Don't activate group. + +Wed Jul 24 07:47:47 1996 Katsumi Yamaoka <yamaoka@ga.sony.co.jp> + + * message.el (message-rename-buffer): Rename autosave name. + +Wed Jul 24 06:24:07 1996 Lars Magne Ingebrigtsen <larsi@ifi.uio.no> + + * gnus-vis.el (gnus-group-make-menu-bar): Moved Misc menu last. + (gnus-summary-make-menu-bar): Ditto. + +Sat Jul 20 00:59:22 1996 Lars Magne Ingebrigtsen <larsi@ifi.uio.no> + + * smiley.el (smiley-buffer): Only do smilies under X. + + * gnus.el (gnus-make-directory): Beep on nil dirs. + (gnus-article-archive-name): Prepend the save directory. + +Fri Jul 19 23:08:52 1996 Hallvard B. Furuseth <hallvard@menja.ifi.uio.no> + + * message.el (message-y-or-n-p): Doc fix. + +Fri Jul 19 02:12:58 1996 Lars Magne Ingebrigtsen <larsi@ifi.uio.no> + + * gnus.el: Gnus v5.2.37 is released. + +Fri Jul 19 00:31:22 1996 Lars Magne Ingebrigtsen <larsi@ifi.uio.no> + + * gnus.el (gnus-subscribe-newsgroup): Add new groups to top-level + topic. + (gnus-group-make-archive-group): Add a to-address group param. + + * gnus-topic.el (gnus-topic-hide-topic): Doc fix. + (gnus-topic-select-group): Doc fix. + (gnus-topic-rename): Keep point nearby. + + * gnus.el (gnus-group-goto-group): More efficient (and more + correct) implementation. + (gnus-group-sort-function): Doc fix. + (gnus-group-edit-buffer): Changed to defvar. + (gnus-group-edit-group-done): Use new name. + (gnus-group-edit-group): Include name of group in grup buffer + name. + + * nnfolder.el (nnfolder-save-mail): Handle babylish ">From" + lines. + * nnmbox.el (nnmbox-request-accept-article): Ditto. + +Thu Jul 18 23:50:31 1996 Lars Magne Ingebrigtsen <larsi@ifi.uio.no> + + * nnmail.el (nnmail-move-inbox): Don't substitute in command + name. + + * gnus-xmas.el (gnus-xmas-modeline-glyph): New variable. + +Thu Jul 18 16:35:22 1996 Lars Magne Ingebrigtsen <lars@eyesore.no> + + * custom.el (custom-facep): Didn't work under non-X Emacs. + +Thu Jul 18 00:02:32 1996 Lars Magne Ingebrigtsen <larsi@hler.ifi.uio.no> + + * nntp.el (nntp-open-telnet): Use more permissive regexps. + + * gnus-uu.el (gnus-uu-uustrip-article): `cd' to make gnus-uu work + under NT. + +Mon Jul 15 18:11:13 1996 Jan Vroonhof <vroonhof@math.ethz.ch (Jan Vroonhof)> + + * smiley.el (smiley-regexp-alist): Don't match important parts of URLs + (smiley-nosey-regexp-alist): New variable. + +Wed Jul 17 23:48:50 1996 Mark Borges <mdb@cdc.noaa.gov> + + * messagexmas.el (nnheader): Required. + +Wed Jul 17 02:02:25 1996 Michael Cook <mcook@cognex.com> + + * nnmail.el (nnmail-split-abbrev-alist): New default. + +Wed Jul 17 00:27:13 1996 Lars Magne Ingebrigtsen <larsi@hler.ifi.uio.no> + + * message.el (message-mode-abbrev-table): New variable. + (message-mode): New variable. + +Wed Jul 17 00:05:00 1996 Lars Magne Ingebrigtsen <larsi@hler.ifi.uio.no> + + * gnus.el: Gnus v5.2.36 is released. + +Tue Jul 16 20:05:49 1996 Lars Magne Ingebrigtsen <larsi@hler.ifi.uio.no> + + * message.el (message-send-mail): Bugged out under Emacs. + (message-send-news): Ditto. + + * nntp.el (nntp-retrieve-headers-with-xover): Would hang + sometimes. + +Sun Jul 14 20:01:26 1996 Lars Magne Ingebrigtsen <larsi@ifi.uio.no> + + * gnus.el: Gnus v5.2.35 is released. + +Sun Jul 14 18:21:14 1996 Lars Magne Ingebrigtsen <larsi@ifi.uio.no> + + * gnus-uu.el (gnus-uu-mark-over): Would bug out. + + * smiley.el (smiley-regexp-alist): New definition didn't work. + +Sun Jul 14 16:52:31 1996 Lars Magne Ingebrigtsen <larsi@hler.ifi.uio.no> + + * gnus.el ((provide 'gnus)): Make sure `gnus-directory' is set + when compiling. + +Sun Jul 14 15:38:21 1996 Lars Magne Ingebrigtsen <larsi@ifi.uio.no> + + * gnus.el: autoload `gnus-copy-article-buffer'. + + * message.el (message-do-send-housekeeping): Kill a superfluous + buffers. + + * gnus-picon.el (gnus-article-display-picons): Don't bug out on + nil addresses. + + * custom.el ((fboundp 'plist-get)): Removed. + ((fboundp 'add-to-list)): Removed. + +Sun Jul 14 15:30:27 1996 Martin Buchholz <mrb@eng.sun.com> + + * gnus.el: Many typo fixes. + +Thu Jul 11 18:06:24 1996 Lars Magne Ingebrigtsen <larsi@ifi.uio.no> + + * nntp.el (nntp-retrieve-headers-with-xover): + `accept-process-output' from `nntp-server-process'. + +Tue Jul 9 07:51:31 1996 Lars Magne Ingebrigtsen <larsi@ylfing.ifi.uio.no> + + * gnus-vis.el (gnus-group-make-menu-bar): Un-randomize. + +Mon Jul 8 09:53:39 1996 Lars Magne Ingebrigtsen <larsi@ylfing.ifi.uio.no> + + * gnus.el (gnus-decode-rfc1522): Goto point-min before decoding. + +Mon Jul 8 08:53:50 1996 Nat Makarevitch <nat@nataa.fr.eu.org> + + * smiley.el (smiley-regexp-alist): New definition. + +Sun Jul 7 13:33:44 1996 Sudish Joseph <sudish@mindspring.com> + + * nnmail.el (nnmail-split-fancy-syntax-table): `%' should have + punctuation syntax to support the %-hack in addresses. + +Sat Jul 6 08:11:41 1996 Lars Magne Ingebrigtsen <larsi@ylfing.ifi.uio.no> + + * gnus.el: Gnus v5.2.34 is released. + +Sat Jul 6 05:46:12 1996 Lars Magne Ingebrigtsen <larsi@ylfing.ifi.uio.no> + + * nnheader.el (nnheader-re-read-dir): Would sometimes bug out. + +Fri Jul 5 03:14:43 1996 Lars Magne Ingebrigtsen <larsi@ylfing.ifi.uio.no> + + * gnus.el (gnus-summary-toggle-threads): Message the state. + +Thu Jul 4 07:52:07 1996 Lars Magne Ingebrigtsen <larsi@ylfing.ifi.uio.no> + + * gnus.el: Gnus v5.2.33 is released. + +Thu Jul 4 06:08:11 1996 Lars Magne Ingebrigtsen <larsi@aegir.ifi.uio.no> + + * nntp.el (nntp-open-telnet): Working function. + (nntp-telnet-parameters, (nntp-telnet-user-name, + nntp-telnet-passwd): New variables. + + * gnus.el (gnus-summary-prepare-threads): Would infloop. + (gnus-summary-isearch-article): Don't go to the start of the + article. + +Thu Jul 4 05:44:22 1996 Steven L. Baur <steve@miranova.com> + + * gnus.el (gnus-article-hide-pem): New command and keystroke. + +Thu Jul 4 05:00:58 1996 Lars Magne Ingebrigtsen <larsi@aegir.ifi.uio.no> + + * gnus.el (gnus-summary-local-variables): Init reffed to 0. + (gnus-set-global-variables): Set reffed. + +Wed Jul 3 06:15:28 1996 Lars Magne Ingebrigtsen <larsi@menja.ifi.uio.no> + + * gnus.el (gnus-reffed-article-number): Make buffer-local. + +Wed Jul 3 03:17:42 1996 Lars Magne Ingebrigtsen <larsi@ylfing.ifi.uio.no> + + * gnus.el (gnus-article-setup-buffer): Make the original buffer go + away on exit. + + * message.el (message-reply): Insert proper number of commas. + (message-tokenize-header): Tokenize properly. + +Wed Jul 3 03:01:59 1996 Joe Wells <jbw@cs.bu.edu> + + * gnus.el (gnus-check-new-newsgroups): Doc fix. + +Wed Jul 3 02:58:09 1996 Lars Magne Ingebrigtsen <larsi@ylfing.ifi.uio.no> + + * gnus.el: Gnus v5.2.33 is released. + +Wed Jul 3 00:27:35 1996 Jan Vroonhof <vroonhof@math.ethz.ch> + + * nnheader.el (nnheader-re-read-dir): Prefer efs over ange-ftp. + +Sun Jun 30 23:19:38 1996 Lars Magne Ingebrigtsen <larsi@aegir.ifi.uio.no> + + * gnus.el: Gnus v5.2.32 is released. + +Sun Jun 30 21:57:31 1996 Lars Magne Ingebrigtsen <larsi@ylfing.ifi.uio.no> + + * gnus.el (gnus-check-bogus-groups-hook): New hook. + +Sun Jun 30 21:54:46 1996 Joe Wells <jbw@cs.bu.edu> + + * gnus-topic.el (gnus-topic-clean-alist): New function. + +Sun Jun 30 20:00:18 1996 Lars Magne Ingebrigtsen <larsi@ylfing.ifi.uio.no> + + * gnus.el (gnus-group-next-unread-group): Allow silence. + + * gnus-cache.el (gnus-cache-possibly-alter-active): Would check + the obarray. + + * gnus.el (gnus-summary-read-group): Don't signal an error when + including expunged articles. + + * gnus-vis.el (gnus-header-button-alist): Would include ":". + + * message.el (message-reply): Inhibit point-motion hooks. + + * gnus.el (gnus-compile): Mark the .newsrc.eld file as dirty. + + * gnus-scomo.el: Renamed to "score-mode". + +Sat Jun 29 01:03:19 1996 Lars Magne Ingebrigtsen <larsi@ylfing.ifi.uio.no> + + * gnus.el: Gnus v5.2.30 is released. + +Sat Jun 29 00:23:44 1996 Lars Magne Ingebrigtsen <larsi@ylfing.ifi.uio.no> + + * gnus.el (gnus-article-read-summary-keys): Deal with message + composition more gracefully. + +Fri Jun 28 23:58:37 1996 Lars Magne Ingebrigtsen <larsi@ylfing.ifi.uio.no> + + * gnus.el (gnus-group-describe-group): Re-read when given a + prefix. + +Fri Jun 28 23:34:17 1996 Lars Magne Ingebrigtsen <larsi@aegir.ifi.uio.no> + + * gnus.el (gnus-group-kill-level): Put groups on killed list. + + * nnfolder.el (nnfolder-read-folder): Would bug out when group not + in active file. + +Fri Jun 28 22:42:49 1996 Lars Magne Ingebrigtsen <larsi@ylfing.ifi.uio.no> + + * gnus-score.el (gnus-summary-score-entry): Get rid of text + props. + + * gnus.el (gnus-article-read-summary-keys): Allow `A RET' to work + properly. + (gnus-summary-limit): Inhibit marking low-scored articles as + read. + + * gnus-msg.el (gnus-article-mail): Reply from the right address. + (gnus-article-mail): Yank properly. + + * gnus.el (gnus-article-mode-map): Entry for info find node. + (gnus-summary-describe-briefly): Display proper message. + + * smiley.el (smiley-circle-color): Doc fix. + + * gnus.el (gnus-summary-prepare-threads): Would display expunged + articles after a dummy line. + (gnus-group-faq-directory): Doc fix. + (gnus-summary-mode): Clear moved inboxes. + +Fri Jun 28 21:48:27 1996 Steven L. Baur <steve@miranova.com> + + * earcon.el: New file. + + * gnus-sound.el: New file. + +Fri Jun 28 04:02:25 1996 Lars Magne Ingebrigtsen <larsi@aegir.ifi.uio.no> + + * gnus.el: Gnus v5.2.29 is released. + +Thu Jun 27 23:14:54 1996 Lars Magne Ingebrigtsen <larsi@aegir.ifi.uio.no> + + * browse-url.el: Removed from distribution. + + * nnmh.el (nnmh-request-group): Re-read dir. + +Thu Jun 27 23:13:17 1996 Andy Norman <ange@hplb.hpl.hp.com> + + * nnheader.el (nnheader-re-read-dir): New function. + +Thu Jun 27 21:50:16 1996 Lars Magne Ingebrigtsen <larsi@aegir.ifi.uio.no> + + * gnus.el (gnus-summary-next-article): Would stall on canceled + articles. + (gnus-dribble-enter): Would bury the wrong buffer. + + * gnus-score.el (gnus-score-followup-thread, + gnus-score-followup-article): Would switch to wrong buffer. + + * gnus.el (gnus-adjust-marked-articles): Possible fix for killed + articles. + (gnus-subscribe-hierarchically): Kill .newsrc buffer. + + * gnus-nocem.el (gnus-nocem-check-article): Would not search + properly. + +Thu Jun 27 21:50:16 1996 Lars Magne Ingebrigtsen <larsi@aegir.ifi.uio.no> + + * gnus.el: Gnus v5.2.28 is released. + +Thu Jun 27 23:33:18 1996 Lars Magne Ingebrigtsen <larsi@ylfing.ifi.uio.no> + + * nnmail.el (nnmail-get-spool-files): Wouldn't get much mail. + +Thu Jun 27 19:26:42 1996 Lars Magne Ingebrigtsen <larsi@aegir.ifi.uio.no> + + * nnheader.el (nnheader-find-etc-directory): New function. + + * gnus.el (gnus-dribble-enter): Bury the buffer. + (gnus-buffer-configuration): Redundant entry. + (message): Don't require. + (gnus-archive-server-wanted-p): Be even more strict in when touse + the archive server. + +Thu Jun 27 19:16:56 1996 Katsumi Yamaoka <yamaoka@ga.sony.co.jp> + + * nnheader.el (nnheader-file-size): New function. + +Wed Jun 26 22:14:45 1996 Alastair Burt <burt@dfki.uni-kl.de> + + * gnus.el (gnus-group-kill-level): Applied `car' to an integer. + +Wed Jun 26 21:53:34 1996 Lars Magne Ingebrigtsen <larsi@aegir.ifi.uio.no> + + * gnus.el: Gnus v5.2.27 is released. + +Wed Jun 26 20:40:39 1996 Lars Magne Ingebrigtsen <larsi@ylfing.ifi.uio.no> + + * gnus.el (gnus-summary-edit-article-done): Don't beep after a + `C-u e'. + + * message.el (message-autosave-directory): New default value. + + * gnus-cache.el (gnus-cache-open): Don't create cache things + unconditionally. + + * gnus.el (gnus-server-status): New function. + (gnus-group-get-new-news-this-group): Better error message. + (gnus-clear-system): Clear state alist. + (gnus-error): Doc fix. + + * nnmail.el (nnmail-get-spool-files): Use the spool file even when + using procmail. + +Wed Jun 26 20:36:40 1996 Philippe Troin <ptroin@compass-da.com> + + * gnus.el (gnus-thread-total-score-1): New version. + +Wed Jun 26 20:31:25 1996 Lars Magne Ingebrigtsen <larsi@ylfing.ifi.uio.no> + + * nnspool.el (nnspool-find-id): Quote the Message-ID. + + * message.el (message-check-news-syntax): Would respond to + i-have-a-mi-etc in References. + +Wed Jun 26 19:59:27 1996 Nat Makarevitch <nat@nataa.fr.eu.org> + + * smiley.el (smiley-regexp-alist): New definition. + +Wed Jun 26 17:45:00 1996 Lars Magne Ingebrigtsen <larsi@aegir.ifi.uio.no> + + * message.el (message-reply): Name the message buffer "wide + reply..." if following up on a mail group. + + * gnus.el (gnus-auto-subscribed-groups): Doc fix. + (gnus-options-subscribe): Doc fix. + + * smiley.el (smiley-buffer): Autoload. + (messagexmas): Required. + + * gnus.el (gnus-message-archive-group): Moved here. + (gnus-archive-server-wanted-p): New function used throughout. + (gnus-message-archive-group): Default to nil. + +Tue Jun 25 21:15:41 1996 Lars Magne Ingebrigtsen <larsi@aegir.ifi.uio.no> + + * gnus.el: Gnus v5.3 is released. + +Tue Jun 25 21:13:37 1996 Lars Magne Ingebrigtsen <larsi@aegir.ifi.uio.no> + + * gnus.el: Gnus v5.2.26 is released. + +Tue Jun 25 20:58:40 1996 Richard Stallman <rms@gnu.ai.mit.edu> + + * gnus-ems.el: Multiply color value by .6 instead of dividing by + 3. + +Tue Jun 25 12:34:24 1996 Lars Magne Ingebrigtsen <larsi@ylfing.ifi.uio.no> + + * message.el (message-send-news): Disable `existing-groups' check + when given a prefix. + +Mon Jun 24 16:54:26 1996 Alastair Burt <burt@dfki.uni-kl.de> + + * gnus-vis.el (gnus-summary-highlight-line): `default' mixed up + with fonts. + +Sat Jun 22 13:56:49 1996 Lars Magne Ingebrigtsen <larsi@ifi.uio.no> + + * gnus-cite.el (gnus-cache-close): New function. + +Sat Jun 22 11:33:42 1996 Lars Magne Ingebrigtsen <larsi@ifi.uiof.no> + + * gnus.el: Gnus v5.2.25 is released. + Sat Jun 22 11:16:57 1996 Lars Magne Ingebrigtsen <larsi@ifi.uio.no> * gnus.el (gnus-adjust-marked-articles): Would bug out on some
--- a/lisp/gnus/custom.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/gnus/custom.el Mon Aug 13 08:46:35 2007 +0200 @@ -113,85 +113,14 @@ (custom-set-text-properties 0 (length string) nil string) string)) -(or (fboundp 'add-to-list) - ;; Introduced in Emacs 19.29. - (defun add-to-list (list-var element) - "Add to the value of LIST-VAR the element ELEMENT if it isn't there yet. -If you want to use `add-to-list' on a variable that is not defined -until a certain package is loaded, you should put the call to `add-to-list' -into a hook function that will be run only after loading the package. -`eval-after-load' provides one way to do this. In some cases -other hooks, such as major mode hooks, can do the job." - (or (member element (symbol-value list-var)) - (set list-var (cons element (symbol-value list-var)))))) - -(or (fboundp 'plist-get) - ;; Introduced in Emacs 19.29. - (defun plist-get (plist prop) - "Extract a value from a property list. -PLIST is a property list, which is a list of the form -\(PROP1 VALUE1 PROP2 VALUE2...). This function returns the value -corresponding to the given PROP, or nil if PROP is not -one of the properties on the list." - (let (result) - (while plist - (if (eq (car plist) prop) - (setq result (car (cdr plist)) - plist nil) - (set plist (cdr (cdr plist))))) - result))) - -(or (fboundp 'plist-put) - ;; Introduced in Emacs 19.29. - (defun plist-put (plist prop val) - "Change value in PLIST of PROP to VAL. -PLIST is a property list, which is a list of the form -\(PROP1 VALUE1 PROP2 VALUE2 ...). PROP is a symbol and VAL is any object. -If PROP is already a property on the list, its value is set to VAL, -otherwise the new PROP VAL pair is added. The new plist is returned; -use `(setq x (plist-put x prop val))' to be sure to use the new value. -The PLIST is modified by side effects." - (if (null plist) - (list prop val) - (let ((current plist)) - (while current - (cond ((eq (car current) prop) - (setcar (cdr current) val) - (setq current nil)) - ((null (cdr (cdr current))) - (setcdr (cdr current) (list prop val)) - (setq current nil)) - (t - (setq current (cdr (cdr current))))))) - plist))) - -(or (fboundp 'match-string) - ;; Introduced in Emacs 19.29. - (defun match-string (num &optional string) - "Return string of text matched by last search. -NUM specifies which parenthesized expression in the last regexp. - Value is nil if NUMth pair didn't match, or there were less than NUM pairs. -Zero means the entire text matched by the whole regexp or whole string. -STRING should be given if the last search was by `string-match' on STRING." - (if (match-beginning num) - (if string - (substring string (match-beginning num) (match-end num)) - (buffer-substring (match-beginning num) (match-end num)))))) - -(or (fboundp 'facep) - ;; Introduced in Emacs 19.29. - (defun facep (x) - "Return t if X is a face name or an internal face vector." - (and (or (and (fboundp 'internal-facep) (internal-facep x)) - (and - (symbolp x) - (assq x (and (boundp 'global-face-data) global-face-data)))) - t))) - ;; XEmacs and Emacs 19.29 facep does different things. -(if (fboundp 'find-face) - (fset 'custom-facep 'find-face) - (fset 'custom-facep 'facep)) +(defalias 'custom-facep + (cond ((fboundp 'find-face) + 'find-face) + ((fboundp 'facep) + 'facep) + (t + 'ignore))) (if (custom-facep 'underline) ()
--- a/lisp/gnus/dgnushack.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/gnus/dgnushack.el Mon Aug 13 08:46:35 2007 +0200 @@ -31,6 +31,12 @@ (setq custom-file "/THIS FILE DOES NOT eXiST!") +(defalias 'device-sound-enabled-p 'ignore) +(defalias 'play-sound-file 'ignore) +(defalias 'nndb-request-article 'ignore) +(defalias 'efs-re-read-dir 'ignore) +(defalias 'ange-ftp-re-read-dir 'ignore) + (defun dgnushack-compile () ;(setq byte-compile-dynamic t) (let ((files (directory-files "." nil ".el$"))
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/gnus/earcon.el Mon Aug 13 08:46:35 2007 +0200 @@ -0,0 +1,230 @@ +;;; earcon.el --- Sound effects for messages +;; Copyright (C) 1996 Free Software Foundation + +;; Author: Steven L. Baur <steve@miranova.com> +;; Keywords: news fun sound + +;; 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. + +;;; Commentary: +;; This file provides access to sound effects in Gnus. + +;;; Code: + +(if (null (boundp 'running-xemacs)) + (defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version))) + +(require 'gnus) +(require 'gnus-sound) +(eval-when-compile (require 'cl)) + +(defvar earcon-auto-play nil + "When True, automatially play sounds as well as buttonize them.") + +(defvar earcon-prefix "**" + "The start of an earcon") + +(defvar earcon-suffix "**" + "The end of an earcon") + +(defvar earcon-regexp-alist + '(("boring" 1 "Boring.au") + ("evil[ \t]+laugh" 1 "Evil_Laugh.au") + ("gag\\|puke" 1 "Puke.au") + ("snicker" 1 "Snicker.au") + ("meow" 1 "catmeow.au") + ("sob\\|boohoo" 1 "cry.wav") + ("drum[ \t]*roll" 1 "drumroll.au") + ("blast" 1 "explosion.au") + ("flush" 1 "flush.au") + ("kiss" 1 "kiss.wav") + ("tee[ \t]*hee" 1 "laugh.au") + ("shoot" 1 "shotgun.wav") + ("yawn" 1 "snore.wav") + ("cackle" 1 "witch.au") + ("yell\\|roar" 1 "yell2.au") + ("whoop-de-doo" 1 "whistle.au")) + "A list of regexps to map earcons to real sounds.") + +(defvar earcon-button-marker-list nil) +(make-variable-buffer-local 'earcon-button-marker-list) + + + +;;; FIXME!! clone of code from gnus-vis.el FIXME!! +(defun earcon-article-push-button (event) + "Check text under the mouse pointer for a callback function. +If the text under the mouse pointer has a `earcon-callback' property, +call it with the value of the `earcon-data' text property." + (interactive "e") + (set-buffer (window-buffer (posn-window (event-start event)))) + (let* ((pos (posn-point (event-start event))) + (data (get-text-property pos 'earcon-data)) + (fun (get-text-property pos 'earcon-callback))) + (if fun (funcall fun data)))) + +(defun earcon-article-press-button () + "Check text at point for a callback function. +If the text at point has a `earcon-callback' property, +call it with the value of the `earcon-data' text property." + (interactive) + (let* ((data (get-text-property (point) 'earcon-data)) + (fun (get-text-property (point) 'earcon-callback))) + (if fun (funcall fun data)))) + +(defun earcon-article-prev-button (n) + "Move point to N buttons backward. +If N is negative, move forward instead." + (interactive "p") + (earcon-article-next-button (- n))) + +(defun earcon-article-next-button (n) + "Move point to N buttons forward. +If N is negative, move backward instead." + (interactive "p") + (let ((function (if (< n 0) 'previous-single-property-change + 'next-single-property-change)) + (inhibit-point-motion-hooks t) + (backward (< n 0)) + (limit (if (< n 0) (point-min) (point-max)))) + (setq n (abs n)) + (while (and (not (= limit (point))) + (> n 0)) + ;; Skip past the current button. + (when (get-text-property (point) 'earcon-callback) + (goto-char (funcall function (point) 'earcon-callback nil limit))) + ;; Go to the next (or previous) button. + (gnus-goto-char (funcall function (point) 'earcon-callback nil limit)) + ;; Put point at the start of the button. + (when (and backward (not (get-text-property (point) 'earcon-callback))) + (goto-char (funcall function (point) 'earcon-callback nil limit))) + ;; Skip past intangible buttons. + (when (get-text-property (point) 'intangible) + (incf n)) + (decf n)) + (unless (zerop n) + (gnus-message 5 "No more buttons")) + n)) + +(defun earcon-article-add-button (from to fun &optional data) + "Create a button between FROM and TO with callback FUN and data DATA." + (and (boundp gnus-article-button-face) + gnus-article-button-face + (gnus-overlay-put (gnus-make-overlay from to) + 'face gnus-article-button-face)) + (gnus-add-text-properties + from to + (nconc (and gnus-article-mouse-face + (list gnus-mouse-face-prop gnus-article-mouse-face)) + (list 'gnus-callback fun) + (and data (list 'gnus-data data))))) + +(defun earcon-button-entry () + ;; Return the first entry in `gnus-button-alist' matching this place. + (let ((alist earcon-regexp-alist) + (case-fold-search t) + (entry nil)) + (while alist + (setq entry (pop alist)) + (if (looking-at (car entry)) + (setq alist nil) + (setq entry nil))) + entry)) + + +(defun earcon-button-push (marker) + ;; Push button starting at MARKER. + (save-excursion + (set-buffer gnus-article-buffer) + (goto-char marker) + (let* ((entry (earcon-button-entry)) + (inhibit-point-motion-hooks t) + (fun 'gnus-sound-play) + (args (list (nth 2 entry)))) + (cond + ((fboundp fun) + (apply fun args)) + ((and (boundp fun) + (fboundp (symbol-value fun))) + (apply (symbol-value fun) args)) + (t + (gnus-message 1 "You must define `%S' to use this button" + (cons fun args))))))) + +;;; FIXME!! clone of code from gnus-vis.el FIXME!! + +;;;###interactive +(defun earcon-region (beg end) + "Play Sounds in the region between point and mark." + (interactive "r") + (earcon-buffer (current-buffer) beg end)) + +;;;###interactive +(defun earcon-buffer (&optional buffer st nd) + (interactive) + (save-excursion + ;; clear old markers. + (if (boundp 'earcon-button-marker-list) + (while earcon-button-marker-list + (set-marker (pop earcon-button-marker-list) nil)) + (setq earcon-button-marker-list nil)) + (and buffer (set-buffer buffer)) + (let ((buffer-read-only nil) + (inhibit-point-motion-hooks t) + (case-fold-search t) + (alist earcon-regexp-alist) + beg entry regexp) + (goto-char (point-min)) + (setq beg (point)) + (while (setq entry (pop alist)) + (setq regexp (concat (regexp-quote earcon-prefix) + ".*\\(" + (car entry) + "\\).*" + (regexp-quote earcon-suffix))) + (goto-char beg) + (while (re-search-forward regexp nil t) + (let* ((start (and entry (match-beginning 1))) + (end (and entry (match-end 1))) + (from (match-beginning 1))) + (earcon-article-add-button + start end 'earcon-button-push + (car (push (set-marker (make-marker) from) + earcon-button-marker-list))) + (gnus-sound-play (caddr entry)))))))) + +;;;###autoload +(defun gnus-earcon-display () + "Play sounds in message buffers." + (interactive) + (save-excursion + (set-buffer gnus-article-buffer) + (goto-char (point-min)) + ;; Skip headers + (unless (search-forward "\n\n" nil t) + (goto-char (point-max))) + (sit-for 0) + (earcon-buffer (current-buffer) (point)))) + +;;;*** + +(provide 'earcon) + +(run-hooks 'earcon-load-hook) + +;;; earcon.el ends here
--- a/lisp/gnus/gnus-cache.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/gnus/gnus-cache.el Mon Aug 13 08:46:35 2007 +0200 @@ -66,9 +66,15 @@ (defun gnus-cache-open () "Initialize the cache." - (gnus-cache-read-active)) + (when (or (file-exists-p gnus-cache-directory) + (and gnus-use-cache + (not (eq gnus-use-cache 'passive)))) + (gnus-cache-read-active))) -(gnus-add-shutdown 'gnus-cache-close 'gnus) +(condition-case () + (gnus-add-shutdown 'gnus-cache-close 'gnus) + ;; Complexities of byte-compiling makes this kludge necessary. Eeek. + (error nil)) (defun gnus-cache-close () "Shut down the cache." @@ -233,13 +239,14 @@ (defun gnus-cache-possibly-alter-active (group active) "Alter the ACTIVE info for GROUP to reflect the articles in the cache." - (let ((cache-active (gnus-gethash group gnus-cache-active-hashtb))) - (and cache-active - (< (car cache-active) (car active)) - (setcar active (car cache-active))) - (and cache-active - (> (cdr cache-active) (cdr active)) - (setcdr active (cdr cache-active))))) + (when gnus-cache-active-hashtb + (let ((cache-active (gnus-gethash group gnus-cache-active-hashtb))) + (and cache-active + (< (car cache-active) (car active)) + (setcar active (car cache-active))) + (and cache-active + (> (cdr cache-active) (cdr active)) + (setcdr active (cdr cache-active)))))) (defun gnus-cache-retrieve-headers (articles group &optional fetch-old) "Retrieve the headers for ARTICLES in GROUP." @@ -367,9 +374,10 @@ (file-name-as-directory (if (gnus-use-long-file-name 'not-cache) group - (let ((group (concat group ""))) - (if (string-match ":" group) - (aset group (match-beginning 0) ?/)) + (let ((group (nnheader-replace-chars-in-string group ?/ ?_))) + ;; Translate the first colon into a slash. + (when (string-match ":" group) + (aset group (match-beginning 0) ?/)) (nnheader-replace-chars-in-string group ?. ?/)))) (if (stringp article) article (int-to-string article))))
--- a/lisp/gnus/gnus-cite.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/gnus/gnus-cite.el Mon Aug 13 08:46:35 2007 +0200 @@ -720,6 +720,11 @@ (setq prefix (car entry)))) prefix)) +(gnus-add-shutdown 'gnus-cache-close 'gnus) + +(defun gnus-cache-close () + (setq gnus-cite-prefix-alist nil)) + (gnus-ems-redefine) (provide 'gnus-cite)
--- a/lisp/gnus/gnus-cus.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/gnus/gnus-cus.el Mon Aug 13 08:46:35 2007 +0200 @@ -108,11 +108,13 @@ The line beneath the mouse pointer will be highlighted with this face.") (name . gnus-mouse-face) - (calculate . (if (gnus-visual-p 'mouse-face 'highlight) - (if (boundp 'gnus-mouse-face) - gnus-mouse-face - 'highlight) - 'default)) + (calculate . (condition-case () + (if (gnus-visual-p 'mouse-face 'highlight) + (if (boundp 'gnus-mouse-face) + gnus-mouse-face + 'highlight) + 'default) + (error nil))) (type . face)) ((tag . "Article Display") (doc . "Controls how the article buffer will look. @@ -333,7 +335,7 @@ regular expression that should match the beginning of the header line, but if you don't know what a regular expression is, just write the name of the header. The second field is the `Name' field, which -determines how the the header name (i.e. the part of the header left +determines how the header name (i.e. the part of the header left of the `:') is displayed. The third field is the `Content' field, which determines how the content (i.e. the part of the header right of the `:') is displayed.
--- a/lisp/gnus/gnus-edit.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/gnus/gnus-edit.el Mon Aug 13 08:46:35 2007 +0200 @@ -35,7 +35,7 @@ Several score files may apply to each group, and several groups may use the same score file. This is controlled implicitly by the name of the score file and the value of the global variable -`gnus-score-find-score-files-function', and explicitly by the the +`gnus-score-find-score-files-function', and explicitly by the `Files' and `Exclude Files' entries.") (compact . t) (type . group) @@ -53,7 +53,7 @@ ((name . files) (tag . "Files") (doc . "\ -List of score files to load when the the current score file is loaded. +List of score files to load when the current score file is loaded. You can use this to share score entries between multiple score files. Push the `[INS]' button add a score file to the list, or `[DEL]' to @@ -66,7 +66,7 @@ ((name . exclude-files) (tag . "Exclude Files") (doc . "\ -List of score files to exclude when the the current score file is loaded. +List of score files to exclude when the current score file is loaded. You can use this if you have a score file you want to share between a number of newsgroups, except for the newsgroup this score file matches. [ Did anyone get that? ] @@ -138,7 +138,7 @@ entry. After choosing the you can enter the date the score entry was last matched in the `Date' field. The date will be automatically updated each time the score entry matches an article. When the date -become too old, the the score entry will be removed. +become too old, the score entry will be removed. For your convenience, the date is specified as the number of days elapsed since the (imaginary) Gregorian date Sunday, December 31, 1 @@ -292,7 +292,7 @@ (doc . "Customization of adaptive scoring. Each time you read an article it will be marked as read. Likewise, if -you delete it it will be marked as deleted, and if you tick it it will +you delete it, it will be marked as deleted, and if you tick it, it will be marked as ticked. When you leave a group, GNUS can automatically create score file entries based on these marks, so next time you enter the group articles with subjects that you read last time have higher
--- a/lisp/gnus/gnus-ems.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/gnus/gnus-ems.el Mon Aug 13 08:46:35 2007 +0200 @@ -124,7 +124,7 @@ ((and (cdr (assq 'background-color params)) (< (apply '+ (x-color-values (cdr (assq 'background-color params)))) - (/ (apply '+ (x-color-values "white")) 3))) + (* (apply '+ (x-color-values "white")) .6))) 'dark) (t 'light))) (error 'light))
--- a/lisp/gnus/gnus-gl.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/gnus/gnus-gl.el Mon Aug 13 08:46:35 2007 +0200 @@ -127,7 +127,7 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defvar gnus-summary-grouplens-line-format - "%U%R%z%l%I%(%[%4L: %-20,20n%]%) %s\n" + "%U\%R\%z%l%I\%(%[%4L: %-20,20n%]%) %s\n" "*The line format spec in summary GroupLens mode buffers.") (defvar grouplens-pseudonym ""
--- a/lisp/gnus/gnus-msg.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/gnus/gnus-msg.el Mon Aug 13 08:46:35 2007 +0200 @@ -55,20 +55,6 @@ current newsgroup name and then returns a suitable group name (or list of names).") -(defvar gnus-message-archive-group - '((if (message-news-p) "misc-news" "misc-mail")) - "*Name of the group in which to save the messages you've written. -This can either be a string, a list of strings; or an alist -of regexps/functions/forms to be evaluated to return a string (or a list -of strings). The functions are called with the name of the current -group (or nil) as a parameter. - -Normally the group names returned by this variable should be -unprefixed -- which implictly means \"store on the archive server\". -However, you may wish to store the message on some other server. In -that case, just return a fully prefixed name of the group -- -\"nnml+private:mail.misc\", for instance.") - (defvar gnus-mailing-list-groups nil "*Regexp matching groups that are really mailing lists. This is useful when you're reading a mailing list that has been @@ -668,10 +654,9 @@ (save-excursion (re-search-backward "[ \t\n]" nil t) (1+ (point))) (save-excursion (re-search-forward "[ \t\n]" nil t) (1- (point)))))) (when address - (switch-to-buffer gnus-summary-buffer) (message-reply address) (when yank - (gnus-inews-yank-articles yank))))) + (gnus-inews-yank-articles (list (cdr gnus-article-current))))))) (defun gnus-bug () "Send a bug report to the Gnus maintainers."
--- a/lisp/gnus/gnus-nocem.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/gnus/gnus-nocem.el Mon Aug 13 08:46:35 2007 +0200 @@ -139,6 +139,7 @@ (nnmail-time-since (nnmail-date-to-time date)) (nnmail-days-to-time gnus-nocem-expiry-wait))) (gnus-request-article-this-buffer (mail-header-number header) group) + (goto-char (point-min)) ;; The article has to have proper NoCeM headers. (when (and (setq b (search-forward "\n@@BEGIN NCM HEADERS\n" nil t)) (setq e (search-forward "\n@@BEGIN NCM BODY\n" nil t)))
--- a/lisp/gnus/gnus-picon.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/gnus/gnus-picon.el Mon Aug 13 08:46:35 2007 +0200 @@ -211,8 +211,9 @@ (when (and (featurep 'xpm) (or (not (fboundp 'device-type)) (equal (device-type) 'x)) (setq from (mail-fetch-field "from")) - (setq from (downcase (cadr (mail-extract-address-components - from))) + (setq from (downcase (or (cadr (mail-extract-address-components + from)) + "")) at-idx (string-match "@" from))) (save-excursion (let ((username (substring from 0 at-idx))
--- a/lisp/gnus/gnus-scomo.el Mon Aug 13 08:45:53 2007 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,110 +0,0 @@ -;;; gnus-scomo.el --- mode for editing Gnus score files -;; Copyright (C) 1996 Free Software Foundation, Inc. - -;; Author: Lars Magne Ingebrigtsen <larsi@ifi.uio.no> -;; Keywords: news, mail - -;; 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. - -;;; Commentary: - -;;; Code: - -(require 'easymenu) -(require 'timezone) -(eval-when-compile (require 'cl)) - -(defvar gnus-score-mode-hook nil - "*Hook run in score mode buffers.") - -(defvar gnus-score-menu-hook nil - "*Hook run after creating the score mode menu.") - -(defvar gnus-score-edit-exit-function nil - "Function run on exit from the score buffer.") - -(defvar gnus-score-mode-map nil) -(unless gnus-score-mode-map - (setq gnus-score-mode-map (copy-keymap emacs-lisp-mode-map)) - (define-key gnus-score-mode-map "\C-c\C-c" 'gnus-score-edit-exit) - (define-key gnus-score-mode-map "\C-c\C-d" 'gnus-score-edit-insert-date) - (define-key gnus-score-mode-map "\C-c\C-p" 'gnus-score-pretty-print)) - -;;;###autoload -(defun gnus-score-mode () - "Mode for editing Gnus score files. -This mode is an extended emacs-lisp mode. - -\\{gnus-score-mode-map}" - (interactive) - (kill-all-local-variables) - (use-local-map gnus-score-mode-map) - (when menu-bar-mode - (gnus-score-make-menu-bar)) - (set-syntax-table emacs-lisp-mode-syntax-table) - (setq major-mode 'gnus-score-mode) - (setq mode-name "Score") - (lisp-mode-variables nil) - (make-local-variable 'gnus-score-edit-exit-function) - (run-hooks 'emacs-lisp-mode-hook 'gnus-score-mode-hook)) - -(defun gnus-score-make-menu-bar () - (unless (boundp 'gnus-score-menu) - (easy-menu-define - gnus-score-menu gnus-score-mode-map "" - '("Score" - ["Exit" gnus-score-edit-exit t] - ["Insert date" gnus-score-edit-insert-date t] - ["Format" gnus-score-pretty-print t])) - (run-hooks 'gnus-score-menu-hook))) - -(defun gnus-score-edit-insert-date () - "Insert date in numerical format." - (interactive) - (princ (gnus-score-day-number (current-time)) (current-buffer))) - -(defun gnus-score-pretty-print () - "Format the current score file." - (interactive) - (goto-char (point-min)) - (let ((form (read (current-buffer)))) - (erase-buffer) - (pp form (current-buffer))) - (goto-char (point-min))) - -(defun gnus-score-edit-exit () - "Stop editing the score file." - (interactive) - (unless (file-exists-p (file-name-directory (buffer-file-name))) - (make-directory (file-name-directory (buffer-file-name)) t)) - (save-buffer) - (bury-buffer (current-buffer)) - (let ((buf (current-buffer))) - (when gnus-score-edit-exit-function - (funcall gnus-score-edit-exit-function)) - (when (eq buf (current-buffer)) - (switch-to-buffer (other-buffer (current-buffer)))))) - -(defun gnus-score-day-number (time) - (let ((dat (decode-time time))) - (timezone-absolute-from-gregorian - (nth 4 dat) (nth 3 dat) (nth 5 dat)))) - -(provide 'gnus-scomo) - -;;; gnus-scomo.el ends here
--- a/lisp/gnus/gnus-score.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/gnus/gnus-score.el Mon Aug 13 08:46:35 2007 +0200 @@ -392,7 +392,7 @@ (if mimic (error "%c %c" prefix hchar) (error ""))) (when (/= (downcase tchar) tchar) - ;; It was a majuscle, so we end reading and the the default. + ;; It was a majuscle, so we end reading and use the default. (if mimic (message "%c %c %c" prefix hchar tchar) (message "")) (setq pchar (or pchar ?p))) @@ -551,7 +551,7 @@ ((eq type 'f) (setq match (gnus-simplify-subject-fuzzy match)))) (let ((score (gnus-score-default score)) - (header (downcase header)) + (header (format "%s" (downcase header))) new) (and prompt (setq match (read-string (format "Match %s on %s, %s: " @@ -566,6 +566,9 @@ (int-to-string match) match)))) + ;; Get rid of string props. + (setq match (format "%s" match)) + ;; If this is an integer comparison, we transform from string to int. (and (eq (nth 2 (assoc header gnus-header-index)) 'gnus-score-integer) (setq match (string-to-int match))) @@ -709,7 +712,7 @@ "Automatically expunge articles with score below SCORE." (interactive (list (or (and current-prefix-arg (prefix-numeric-value current-prefix-arg)) - (string-to-int (read-string "Expunge below: "))))) + (string-to-int (read-string "Set expunge below: "))))) (setq score (or score gnus-summary-default-score 0)) (gnus-score-set 'expunge (list score)) (gnus-score-set 'touched '(t))) @@ -720,11 +723,11 @@ (setq score (gnus-score-default score)) (when (gnus-buffer-live-p gnus-summary-buffer) (save-excursion - (set-buffer gnus-summary-buffer) (save-restriction (goto-char (point-min)) (let ((id (mail-fetch-field "message-id"))) (when id + (set-buffer gnus-summary-buffer) (gnus-summary-score-entry "references" (concat id "[ \t]*$") 'r score (current-time-string) nil t))))))) @@ -735,11 +738,11 @@ (setq score (gnus-score-default score)) (when (gnus-buffer-live-p gnus-summary-buffer) (save-excursion - (set-buffer gnus-summary-buffer) (save-restriction (goto-char (point-min)) (let ((id (mail-fetch-field "message-id"))) (when id + (set-buffer gnus-summary-buffer) (gnus-summary-score-entry "references" id 's score (current-time-string))))))))
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/gnus/gnus-sound.el Mon Aug 13 08:46:35 2007 +0200 @@ -0,0 +1,122 @@ +;;; gnus-sound.el --- Sound effects for Gnus +;; Copyright (C) 1996 Free Software Foundation + +;; Author: Steven L. Baur <steve@miranova.com> +;; Keywords: news + +;; 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. + +;;; Commentary: +;; This file provides access to sound effects in Gnus. +;; Prerelease: This file is partially stripped to support earcons.el +;; You can safely ignore most of it until Red Gnus. **Evil Laugh** +;;; Code: + +(if (null (boundp 'running-xemacs)) + (defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version))) + +(require 'nnheader) +(eval-when-compile (require 'cl)) + +(defvar gnus-sound-inline-sound + (and (fboundp 'device-sound-enabled-p) + (device-sound-enabled-p)) + "When t, we will not spawn a subprocess to play sounds.") + +(defvar gnus-sound-directory (nnheader-find-etc-directory "sounds") + "The directory containing the Sound Files.") + +(defvar gnus-sound-au-player "/usr/bin/showaudio" + "Executable program for playing sun AU format sound files") +(defvar gnus-sound-wav-player "/usr/local/bin/play" + "Executable program for playing WAV files") + + +;;; The following isn't implemented yet. Wait for Red Gnus. +;(defvar gnus-sound-effects-enabled t +; "When t, Gnus will use sound effects.") +;(defvar gnus-sound-enable-hooks nil +; "Functions run when enabling sound effects.") +;(defvar gnus-sound-disable-hooks nil +; "Functions run when disabling sound effects.") +;(defvar gnus-sound-theme-song nil +; "Theme song for Gnus.") +;(defvar gnus-sound-enter-group nil +; "Sound effect played when selecting a group.") +;(defvar gnus-sound-exit-group nil +; "Sound effect played when exiting a group.") +;(defvar gnus-sound-score-group nil +; "Sound effect played when scoring a group.") +;(defvar gnus-sound-busy-sound nil +; "Sound effect played when going into a ... sequence.") + + +;;;###autoload +;(defun gnus-sound-enable-sound () +; "Enable Sound Effects for Gnus." +; (interactive) +; (setq gnus-sound-effects-enabled t) +; (run-hooks gnus-sound-enable-hooks)) + +;;;###autoload +;(defun gnus-sound-disable-sound () +; "Disable Sound Effects for Gnus." +; (interactive) +; (setq gnus-sound-effects-enabled nil) +; (run-hooks gnus-sound-disable-hooks)) + +;;;###autoload +(defun gnus-sound-play (file) + "Play a sound through the speaker." + (interactive) + (let ((sound-file (if (file-exists-p file) + file + (concat gnus-sound-directory file)))) + (when (file-exists-p sound-file) + (if gnus-sound-inline-sound + (play-sound-file (concat gnus-sound-directory sound-file)) + (cond ((string-match "\\.wav$" sound-file) + (call-process gnus-sound-wav-player + (concat gnus-sound-directory sound-file) + 0 + nil)) + ((string-match "\\.au$" sound-file) + (call-process gnus-sound-au-player + (concat gnus-sound-directory sound-file) + 0 + nil))))))) + + +;;; The following isn't implemented yet, wait for Red Gnus +;(defun gnus-sound-startrek-sounds () +; "Enable sounds from Star Trek the original series." +; (interactive) +; (setq gnus-sound-busy-sound "working.au") +; (setq gnus-sound-enter-group "bulkhead_door.au") +; (setq gnus-sound-exit-group "bulkhead_door.au") +; (setq gnus-sound-score-group "ST_laser.au") +; (setq gnus-sound-theme-song "startrek.au") +; (add-hook 'gnus-select-group-hook 'gnus-sound-startrek-select-group) +; (add-hook 'gnus-exit-group-hook 'gnus-sound-startrek-exit-group)) +;;;*** + +(provide 'gnus-sound) + +(run-hooks 'gnus-sound-load-hook) + +;;; gnus-sound.el ends here
--- a/lisp/gnus/gnus-topic.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/gnus/gnus-topic.el Mon Aug 13 08:46:35 2007 +0200 @@ -378,6 +378,7 @@ gnus-topic-tallied-groups nil gnus-topology-checked-p nil)) + (defun gnus-topic-check-topology () ;; The first time we set the topology to whatever we have ;; gotten here, which can be rather random. @@ -385,6 +386,8 @@ (gnus-topic-init-alist)) (setq gnus-topology-checked-p t) + ;; Go through the topic alist and make sure that all topics + ;; are in the topic topology. (let ((topics (gnus-topic-list)) (alist gnus-topic-alist) changed) @@ -395,7 +398,15 @@ (setq changed t)) (setq alist (cdr alist))) (when changed - (gnus-topic-enter-dribble))) + (gnus-topic-enter-dribble)) + ;; Conversely, go through the topology and make sure that all + ;; topologies have alists. + (while topics + (unless (assoc (car topics) gnus-topic-alist) + (push (list (car topics)) gnus-topic-alist)) + (pop topics))) + ;; Go through all living groups and make sure that + ;; they belong to some topic. (let* ((tgroups (apply 'append (mapcar (lambda (entry) (cdr entry)) gnus-topic-alist))) (entry (assoc (caar gnus-topic-topology) gnus-topic-alist)) @@ -403,7 +414,15 @@ group) (while newsrc (unless (member (setq group (gnus-info-group (pop newsrc))) tgroups) - (setcdr entry (cons group (cdr entry))))))) + (setcdr entry (cons group (cdr entry)))))) + ;; Go through all topics and make sure they contain only living groups. + (let ((alist gnus-topic-alist) + topic) + (while (setq topic (pop alist)) + (while (cdr topic) + (if (gnus-gethash (cadr topic) gnus-newsrc-hashtb) + (setq topic (cdr topic)) + (setcdr topic (cddr topic))))))) (defvar gnus-tmp-topics nil) (defun gnus-topic-list (&optional topology) @@ -670,6 +689,8 @@ (make-local-variable 'gnus-group-indentation-function) (setq gnus-group-indentation-function 'gnus-topic-group-indentation) + (gnus-make-local-hook 'gnus-check-bogus-groups-hook) + (add-hook 'gnus-check-bogus-groups-hook 'gnus-topic-clean-alist) (setq gnus-topology-checked-p nil) ;; We check the topology. (when gnus-newsrc-alist @@ -680,6 +701,7 @@ (remove-hook 'gnus-summary-exit-hook 'gnus-topic-update-topic) (remove-hook 'gnus-group-change-level-function 'gnus-topic-change-level) + (remove-hook 'gnus-check-bogus-groups-hook 'gnus-topic-clean-alist) (setq gnus-group-prepare-function 'gnus-group-prepare-flat)) (when redisplay (gnus-group-list-groups)))) @@ -688,7 +710,9 @@ "Select this newsgroup. No article is selected automatically. If ALL is non-nil, already read articles become readable. -If ALL is a number, fetch this number of articles." +If ALL is a number, fetch this number of articles. + +If performed over a topic line, toggle folding the topic." (interactive "P") (if (gnus-group-topic-p) (let ((gnus-group-list-mode @@ -708,7 +732,9 @@ readable. IF ALL is a number, fetch this number of articles. If the optional argument NO-ARTICLE is non-nil, no article will be auto-selected upon group entry. If GROUP is non-nil, fetch that -group." +group. + +If performed over a topic line, toggle folding the topic." (interactive "P") (if (gnus-group-topic-p) (let ((gnus-group-list-mode @@ -790,6 +816,22 @@ (gnus-topic-goto-topic (gnus-group-parent-topic)) (gnus-group-topic-level)) 0)) ? )) +(defun gnus-topic-clean-alist () + "Remove bogus groups from the topic alist." + (let ((topic-alist gnus-topic-alist) + result topic) + (unless gnus-killed-hashtb + (gnus-make-hashtable-from-killed)) + (while (setq topic (pop topic-alist)) + (let ((topic-name (pop topic)) + group filtered-topic) + (while (setq group (pop topic)) + (if (and (gnus-gethash group gnus-active-hashtb) + (not (gnus-gethash group gnus-killed-hashtb))) + (push group filtered-topic))) + (push (cons topic-name (nreverse filtered-topic)) result))) + (setq gnus-topic-alist (nreverse result)))) + (defun gnus-topic-change-level (group level oldlevel) "Run when changing levels to enter/remove groups from topics." (save-excursion @@ -920,7 +962,7 @@ (gnus-topic-update-topic))) (defun gnus-topic-hide-topic () - "Hide all subtopics under the current topic." + "Hide the current topic." (interactive) (when (gnus-group-parent-topic) (gnus-topic-goto-topic (gnus-group-parent-topic)) @@ -1004,6 +1046,7 @@ (setcar (cadr top) new-name)) (when entry (setcar entry new-name)) + (forward-line -1) (gnus-group-list-groups))) (defun gnus-topic-indent (&optional unindent)
--- a/lisp/gnus/gnus-uu.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/gnus/gnus-uu.el Mon Aug 13 08:46:35 2007 +0200 @@ -563,7 +563,7 @@ (data gnus-newsgroup-data)) (save-excursion (while data - (when (> (or (cdr (assq (gnus-data-number (caar data)) + (when (> (or (cdr (assq (gnus-data-number (car data)) gnus-newsgroup-scored)) gnus-summary-default-score 0) score) @@ -1092,7 +1092,7 @@ ;; If the list returned contains a `begin', the first element of ;; the list *must* be a string with the file name of the decoded ;; file. -;; `end' if the the end of an encoded file has been received +;; `end' if the end of an encoded file has been received ;; `middle' if the article was a body part of an encoded file ;; `wrong-type' if the article was not a part of an encoded file ;; `ok', which can be used everything is ok @@ -1314,12 +1314,18 @@ (gnus-uu-unmark-list-of-grabbed t)) ;; Start a new uudecoding process. - (setq gnus-uu-uudecode-process - (start-process - "*uudecode*" - (get-buffer-create gnus-uu-output-buffer-name) - shell-file-name shell-command-switch - (format "cd %s ; uudecode" gnus-uu-work-dir))) + (let ((cdir default-directory)) + (unwind-protect + (progn + (cd gnus-uu-work-dir) + (setq gnus-uu-uudecode-process + (start-process + "*uudecode*" + (get-buffer-create gnus-uu-output-buffer-name) + shell-file-name shell-command-switch + (format "cd %s %s uudecode" gnus-uu-work-dir + gnus-shell-command-separator)))) + (cd cdir))) (set-process-sentinel gnus-uu-uudecode-process 'gnus-uu-uudecode-sentinel) (setq state (list 'begin)) @@ -1584,7 +1590,7 @@ ;; Kills the temporary uu buffers, kills any processes, etc. (defun gnus-uu-clean-up () - (let (buf pst) + (let (buf) (and gnus-uu-uudecode-process (memq (process-status (or gnus-uu-uudecode-process "nevair")) '(stop run))
--- a/lisp/gnus/gnus-vis.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/gnus/gnus-vis.el Mon Aug 13 08:46:35 2007 +0200 @@ -238,7 +238,7 @@ (defvar gnus-header-button-alist `(("^\\(References\\|Message-I[Dd]\\):" "<[^>]+>" 0 t gnus-button-message-id 0) - ("^\\(From\\|Reply-To\\): " ": *\\(.+\\)$" 1 t gnus-button-reply 0) + ("^\\(From\\|Reply-To\\):" ": *\\(.+\\)$" 1 t gnus-button-reply 1) ("^\\(Cc\\|To\\):" "[^ \t\n<>,()\"]+@[^ \t\n<>,()\"]+" 0 t gnus-button-mailto 0) ("^X-[Uu][Rr][Ll]:" ,gnus-button-url-regexp 0 t gnus-button-url 0) @@ -301,166 +301,166 @@ (defun gnus-group-make-menu-bar () (gnus-visual-turn-off-edit-menu 'group) - (or - (boundp 'gnus-group-reading-menu) - (progn - (easy-menu-define - gnus-group-reading-menu gnus-group-mode-map "" - '("Group" - ["Read" gnus-group-read-group (gnus-group-group-name)] - ["Select" gnus-group-select-group (gnus-group-group-name)] - ["See old articles" (gnus-group-select-group 'all) - :keys "C-u SPC" :active (gnus-group-group-name)] - ["Catch up" gnus-group-catchup-current (gnus-group-group-name)] - ["Catch up all articles" gnus-group-catchup-current-all - (gnus-group-group-name)] - ["Check for new articles" gnus-group-get-new-news-this-group - (gnus-group-group-name)] - ["Toggle subscription" gnus-group-unsubscribe-current-group - (gnus-group-group-name)] - ["Kill" gnus-group-kill-group (gnus-group-group-name)] - ["Yank" gnus-group-yank-group gnus-list-of-killed-groups] - ["Describe" gnus-group-describe-group (gnus-group-group-name)] - ["Fetch FAQ" gnus-group-fetch-faq (gnus-group-group-name)] - ["Edit kill file" gnus-group-edit-local-kill - (gnus-group-group-name)] - ;; Actually one should check, if any of the marked groups gives t for - ;; (gnus-check-backend-function 'request-expire-articles ...) - ["Expire articles" gnus-group-expire-articles - (or (and (gnus-group-group-name) - (gnus-check-backend-function - 'request-expire-articles - (gnus-group-group-name))) gnus-group-marked)] - ["Set group level" gnus-group-set-current-level - (gnus-group-group-name)] - ["Select quick" gnus-group-quick-select-group (gnus-group-group-name)] - )) + (unless (boundp 'gnus-group-reading-menu) + + (easy-menu-define + gnus-group-reading-menu gnus-group-mode-map "" + '("Group" + ["Read" gnus-group-read-group (gnus-group-group-name)] + ["Select" gnus-group-select-group (gnus-group-group-name)] + ["See old articles" (gnus-group-select-group 'all) + :keys "C-u SPC" :active (gnus-group-group-name)] + ["Catch up" gnus-group-catchup-current (gnus-group-group-name)] + ["Catch up all articles" gnus-group-catchup-current-all + (gnus-group-group-name)] + ["Check for new articles" gnus-group-get-new-news-this-group + (gnus-group-group-name)] + ["Toggle subscription" gnus-group-unsubscribe-current-group + (gnus-group-group-name)] + ["Kill" gnus-group-kill-group (gnus-group-group-name)] + ["Yank" gnus-group-yank-group gnus-list-of-killed-groups] + ["Describe" gnus-group-describe-group (gnus-group-group-name)] + ["Fetch FAQ" gnus-group-fetch-faq (gnus-group-group-name)] + ["Edit kill file" gnus-group-edit-local-kill + (gnus-group-group-name)] + ;; Actually one should check, if any of the marked groups gives t for + ;; (gnus-check-backend-function 'request-expire-articles ...) + ["Expire articles" gnus-group-expire-articles + (or (and (gnus-group-group-name) + (gnus-check-backend-function + 'request-expire-articles + (gnus-group-group-name))) gnus-group-marked)] + ["Set group level" gnus-group-set-current-level + (gnus-group-group-name)] + ["Select quick" gnus-group-quick-select-group (gnus-group-group-name)] + )) - (easy-menu-define - gnus-group-group-menu gnus-group-mode-map "" - '("Groups" - ("Listing" - ["List unread subscribed groups" gnus-group-list-groups t] - ["List (un)subscribed groups" gnus-group-list-all-groups t] - ["List killed groups" gnus-group-list-killed gnus-killed-list] - ["List zombie groups" gnus-group-list-zombies gnus-zombie-list] - ["List level..." gnus-group-list-level t] - ["Describe all groups" gnus-group-describe-all-groups t] - ["Group apropos..." gnus-group-apropos t] - ["Group and description apropos..." gnus-group-description-apropos t] - ["List groups matching..." gnus-group-list-matching t] - ["List all groups matching..." gnus-group-list-all-matching t] - ["List active file" gnus-group-list-active t]) - ("Sort" - ["Default sort" gnus-group-sort-groups - (or (not (boundp 'gnus-topic-mode)) (not gnus-topic-mode))] - ["Sort by method" gnus-group-sort-groups-by-method - (or (not (boundp 'gnus-topic-mode)) (not gnus-topic-mode))] - ["Sort by rank" gnus-group-sort-groups-by-rank - (or (not (boundp 'gnus-topic-mode)) (not gnus-topic-mode))] - ["Sort by score" gnus-group-sort-groups-by-score - (or (not (boundp 'gnus-topic-mode)) (not gnus-topic-mode))] - ["Sort by level" gnus-group-sort-groups-by-level - (or (not (boundp 'gnus-topic-mode)) (not gnus-topic-mode))] - ["Sort by unread" gnus-group-sort-groups-by-unread - (or (not (boundp 'gnus-topic-mode)) (not gnus-topic-mode))] - ["Sort by name" gnus-group-sort-groups-by-alphabet - (or (not (boundp 'gnus-topic-mode)) (not gnus-topic-mode))]) - ("Mark" - ["Mark group" gnus-group-mark-group - (and (gnus-group-group-name) - (not (memq (gnus-group-group-name) gnus-group-marked)))] - ["Unmark group" gnus-group-unmark-group - (and (gnus-group-group-name) - (memq (gnus-group-group-name) gnus-group-marked))] - ["Unmark all" gnus-group-unmark-all-groups gnus-group-marked] - ["Mark regexp..." gnus-group-mark-regexp t] - ["Mark region" gnus-group-mark-region t] - ["Mark buffer" gnus-group-mark-buffer t] - ["Execute command" gnus-group-universal-argument - (or gnus-group-marked (gnus-group-group-name))]) - ("Subscribe" - ["Subscribe to random group" gnus-group-unsubscribe-group t] - ["Kill all newsgroups in region" gnus-group-kill-region t] - ["Kill all zombie groups" gnus-group-kill-all-zombies - gnus-zombie-list] - ["Kill all groups on level..." gnus-group-kill-level t]) - ("Foreign groups" - ["Make a foreign group" gnus-group-make-group t] - ["Add a directory group" gnus-group-make-directory-group t] - ["Add the help group" gnus-group-make-help-group t] - ["Add the archive group" gnus-group-make-archive-group t] - ["Make a doc group" gnus-group-make-doc-group t] - ["Make a kiboze group" gnus-group-make-kiboze-group t] - ["Make a virtual group" gnus-group-make-empty-virtual t] - ["Add a group to a virtual" gnus-group-add-to-virtual t] - ["Rename group" gnus-group-rename-group - (gnus-check-backend-function - 'request-rename-group (gnus-group-group-name))] - ["Delete group" gnus-group-delete-group - (gnus-check-backend-function - 'request-delete-group (gnus-group-group-name))]) - ("Editing groups" - ["Parameters" gnus-group-edit-group-parameters - (gnus-group-group-name)] - ["Select method" gnus-group-edit-group-method - (gnus-group-group-name)] - ["Info" gnus-group-edit-group (gnus-group-group-name)]) - ("Score file" - ["Flush cache" gnus-score-flush-cache - (or gnus-score-cache gnus-short-name-score-file-cache)]) - ("Move" - ["Next" gnus-group-next-group t] - ["Previous" gnus-group-prev-group t] - ["Next unread" gnus-group-next-unread-group t] - ["Previous unread" gnus-group-prev-unread-group t] - ["Next unread same level" gnus-group-next-unread-group-same-level t] - ["Previous unread same level" - gnus-group-previous-unread-group-same-level t] - ["Jump to group" gnus-group-jump-to-group t] - ["First unread group" gnus-group-first-unread-group t] - ["Best unread group" gnus-group-best-unread-group t]) - ["Transpose" gnus-group-transpose-groups + (easy-menu-define + gnus-group-group-menu gnus-group-mode-map "" + '("Groups" + ("Listing" + ["List unread subscribed groups" gnus-group-list-groups t] + ["List (un)subscribed groups" gnus-group-list-all-groups t] + ["List killed groups" gnus-group-list-killed gnus-killed-list] + ["List zombie groups" gnus-group-list-zombies gnus-zombie-list] + ["List level..." gnus-group-list-level t] + ["Describe all groups" gnus-group-describe-all-groups t] + ["Group apropos..." gnus-group-apropos t] + ["Group and description apropos..." gnus-group-description-apropos t] + ["List groups matching..." gnus-group-list-matching t] + ["List all groups matching..." gnus-group-list-all-matching t] + ["List active file" gnus-group-list-active t]) + ("Sort" + ["Default sort" gnus-group-sort-groups + (or (not (boundp 'gnus-topic-mode)) (not gnus-topic-mode))] + ["Sort by method" gnus-group-sort-groups-by-method + (or (not (boundp 'gnus-topic-mode)) (not gnus-topic-mode))] + ["Sort by rank" gnus-group-sort-groups-by-rank + (or (not (boundp 'gnus-topic-mode)) (not gnus-topic-mode))] + ["Sort by score" gnus-group-sort-groups-by-score + (or (not (boundp 'gnus-topic-mode)) (not gnus-topic-mode))] + ["Sort by level" gnus-group-sort-groups-by-level + (or (not (boundp 'gnus-topic-mode)) (not gnus-topic-mode))] + ["Sort by unread" gnus-group-sort-groups-by-unread + (or (not (boundp 'gnus-topic-mode)) (not gnus-topic-mode))] + ["Sort by name" gnus-group-sort-groups-by-alphabet + (or (not (boundp 'gnus-topic-mode)) (not gnus-topic-mode))]) + ("Mark" + ["Mark group" gnus-group-mark-group + (and (gnus-group-group-name) + (not (memq (gnus-group-group-name) gnus-group-marked)))] + ["Unmark group" gnus-group-unmark-group + (and (gnus-group-group-name) + (memq (gnus-group-group-name) gnus-group-marked))] + ["Unmark all" gnus-group-unmark-all-groups gnus-group-marked] + ["Mark regexp..." gnus-group-mark-regexp t] + ["Mark region" gnus-group-mark-region t] + ["Mark buffer" gnus-group-mark-buffer t] + ["Execute command" gnus-group-universal-argument + (or gnus-group-marked (gnus-group-group-name))]) + ("Subscribe" + ["Subscribe to a group" gnus-group-unsubscribe-group t] + ["Kill all newsgroups in region" gnus-group-kill-region t] + ["Kill all zombie groups" gnus-group-kill-all-zombies + gnus-zombie-list] + ["Kill all groups on level..." gnus-group-kill-level t]) + ("Foreign groups" + ["Make a foreign group" gnus-group-make-group t] + ["Add a directory group" gnus-group-make-directory-group t] + ["Add the help group" gnus-group-make-help-group t] + ["Add the archive group" gnus-group-make-archive-group t] + ["Make a doc group" gnus-group-make-doc-group t] + ["Make a kiboze group" gnus-group-make-kiboze-group t] + ["Make a virtual group" gnus-group-make-empty-virtual t] + ["Add a group to a virtual" gnus-group-add-to-virtual t] + ["Rename group" gnus-group-rename-group + (gnus-check-backend-function + 'request-rename-group (gnus-group-group-name))] + ["Delete group" gnus-group-delete-group + (gnus-check-backend-function + 'request-delete-group (gnus-group-group-name))]) + ("Editing groups" + ["Parameters" gnus-group-edit-group-parameters (gnus-group-group-name)] - ["Read a directory as a group..." gnus-group-enter-directory t] - )) + ["Select method" gnus-group-edit-group-method + (gnus-group-group-name)] + ["Info" gnus-group-edit-group (gnus-group-group-name)]) + ("Score file" + ["Flush cache" gnus-score-flush-cache + (or gnus-score-cache gnus-short-name-score-file-cache)]) + ("Move" + ["Next" gnus-group-next-group t] + ["Previous" gnus-group-prev-group t] + ["Next unread" gnus-group-next-unread-group t] + ["Previous unread" gnus-group-prev-unread-group t] + ["Next unread same level" gnus-group-next-unread-group-same-level t] + ["Previous unread same level" + gnus-group-previous-unread-group-same-level t] + ["Jump to group" gnus-group-jump-to-group t] + ["First unread group" gnus-group-first-unread-group t] + ["Best unread group" gnus-group-best-unread-group t]) + ["Transpose" gnus-group-transpose-groups + (gnus-group-group-name)] + ["Read a directory as a group..." gnus-group-enter-directory t] + )) - (easy-menu-define - gnus-group-misc-menu gnus-group-mode-map "" - '("Misc" - ["Send a bug report" gnus-bug t] - ["Send a mail" gnus-group-mail t] - ["Post an article..." gnus-group-post-news t] - ["Customize score file" gnus-score-customize t] - ["Check for new news" gnus-group-get-new-news t] - ["Activate all groups" gnus-activate-all-groups t] - ["Delete bogus groups" gnus-group-check-bogus-groups t] - ["Find new newsgroups" gnus-find-new-newsgroups t] - ["Restart Gnus" gnus-group-restart t] - ["Read init file" gnus-group-read-init-file t] - ["Browse foreign server" gnus-group-browse-foreign-server t] - ["Enter server buffer" gnus-group-enter-server-mode t] - ["Expire all expirable articles" gnus-group-expire-all-groups t] - ["Generate any kiboze groups" nnkiboze-generate-groups t] - ["Gnus version" gnus-version t] - ["Save .newsrc files" gnus-group-save-newsrc t] - ["Suspend Gnus" gnus-group-suspend t] - ["Clear dribble buffer" gnus-group-clear-dribble t] - ["Exit from Gnus" gnus-group-exit t] - ["Exit without saving" gnus-group-quit t] - ["Edit global kill file" gnus-group-edit-global-kill t] - ["Read manual" gnus-info-find-node t] - ["Toggle topics" gnus-topic-mode t] - ("SOUP" - ["Pack replies" nnsoup-pack-replies (fboundp 'nnsoup-request-group)] - ["Send replies" gnus-soup-send-replies - (fboundp 'gnus-soup-pack-packet)] - ["Pack packet" gnus-soup-pack-packet (fboundp 'gnus-soup-pack-packet)] - ["Save areas" gnus-soup-save-areas (fboundp 'gnus-soup-pack-packet)] - ["Brew SOUP" gnus-soup-brew-soup (fboundp 'gnus-soup-pack-packet)]) - )) - (run-hooks 'gnus-group-menu-hook) - ))) + (easy-menu-define + gnus-group-misc-menu gnus-group-mode-map "" + '("Misc" + ["Send a bug report" gnus-bug t] + ["Send a mail" gnus-group-mail t] + ["Post an article..." gnus-group-post-news t] + ["Customize score file" gnus-score-customize t] + ["Check for new news" gnus-group-get-new-news t] + ["Activate all groups" gnus-activate-all-groups t] + ["Delete bogus groups" gnus-group-check-bogus-groups t] + ["Find new newsgroups" gnus-find-new-newsgroups t] + ["Restart Gnus" gnus-group-restart t] + ["Read init file" gnus-group-read-init-file t] + ["Browse foreign server" gnus-group-browse-foreign-server t] + ["Enter server buffer" gnus-group-enter-server-mode t] + ["Expire all expirable articles" gnus-group-expire-all-groups t] + ["Generate any kiboze groups" nnkiboze-generate-groups t] + ["Gnus version" gnus-version t] + ["Save .newsrc files" gnus-group-save-newsrc t] + ["Suspend Gnus" gnus-group-suspend t] + ["Clear dribble buffer" gnus-group-clear-dribble t] + ["Edit global kill file" gnus-group-edit-global-kill t] + ["Read manual" gnus-info-find-node t] + ["Toggle topics" gnus-topic-mode t] + ("SOUP" + ["Pack replies" nnsoup-pack-replies (fboundp 'nnsoup-request-group)] + ["Send replies" gnus-soup-send-replies + (fboundp 'gnus-soup-pack-packet)] + ["Pack packet" gnus-soup-pack-packet (fboundp 'gnus-soup-pack-packet)] + ["Save areas" gnus-soup-save-areas (fboundp 'gnus-soup-pack-packet)] + ["Brew SOUP" gnus-soup-brew-soup (fboundp 'gnus-soup-pack-packet)]) + ["Exit from Gnus" gnus-group-exit t] + ["Exit without saving" gnus-group-quit t] + )) + + (run-hooks 'gnus-group-menu-hook) + )) ;; Summary buffer (defun gnus-summary-make-menu-bar () @@ -469,110 +469,6 @@ (unless (boundp 'gnus-summary-misc-menu) (easy-menu-define - gnus-summary-misc-menu gnus-summary-mode-map "" - '("Misc" - ("Mark" - ("Read" - ["Mark as read" gnus-summary-mark-as-read-forward t] - ["Mark same subject and select" - gnus-summary-kill-same-subject-and-select t] - ["Mark same subject" gnus-summary-kill-same-subject t] - ["Catchup" gnus-summary-catchup t] - ["Catchup all" gnus-summary-catchup-all t] - ["Catchup to here" gnus-summary-catchup-to-here t] - ["Catchup region" gnus-summary-mark-region-as-read t] - ["Mark excluded" gnus-summary-limit-mark-excluded-as-read t]) - ("Various" - ["Tick" gnus-summary-tick-article-forward t] - ["Mark as dormant" gnus-summary-mark-as-dormant t] - ["Remove marks" gnus-summary-clear-mark-forward t] - ["Set expirable mark" gnus-summary-mark-as-expirable t] - ["Set bookmark" gnus-summary-set-bookmark t] - ["Remove bookmark" gnus-summary-remove-bookmark t]) - ("Limit" - ["Marks..." gnus-summary-limit-to-marks t] - ["Subject..." gnus-summary-limit-to-subject t] - ["Author..." gnus-summary-limit-to-author t] - ["Score" gnus-summary-limit-to-score t] - ["Unread" gnus-summary-limit-to-unread t] - ["Non-dormant" gnus-summary-limit-exclude-dormant t] - ["Articles" gnus-summary-limit-to-articles t] - ["Pop limit" gnus-summary-pop-limit t] - ["Show dormant" gnus-summary-limit-include-dormant t] - ["Hide childless dormant" - gnus-summary-limit-exclude-childless-dormant t] - ;;["Hide thread" gnus-summary-limit-exclude-thread t] - ["Show expunged" gnus-summary-show-all-expunged t]) - ("Process mark" - ["Set mark" gnus-summary-mark-as-processable t] - ["Remove mark" gnus-summary-unmark-as-processable t] - ["Remove all marks" gnus-summary-unmark-all-processable t] - ["Mark above" gnus-uu-mark-over t] - ["Mark series" gnus-uu-mark-series t] - ["Mark region" gnus-uu-mark-region t] - ["Mark by regexp..." gnus-uu-mark-by-regexp t] - ["Mark all" gnus-uu-mark-all t] - ["Mark buffer" gnus-uu-mark-buffer t] - ["Mark sparse" gnus-uu-mark-sparse t] - ["Mark thread" gnus-uu-mark-thread t] - ["Unmark thread" gnus-uu-unmark-thread t])) - ("Scroll article" - ["Page forward" gnus-summary-next-page t] - ["Page backward" gnus-summary-prev-page t] - ["Line forward" gnus-summary-scroll-up t]) - ("Move" - ["Next unread article" gnus-summary-next-unread-article t] - ["Previous unread article" gnus-summary-prev-unread-article t] - ["Next article" gnus-summary-next-article t] - ["Previous article" gnus-summary-prev-article t] - ["Next unread subject" gnus-summary-next-unread-subject t] - ["Previous unread subject" gnus-summary-prev-unread-subject t] - ["Next article same subject" gnus-summary-next-same-subject t] - ["Previous article same subject" gnus-summary-prev-same-subject t] - ["First unread article" gnus-summary-first-unread-article t] - ["Best unread article" gnus-summary-best-unread-article t] - ["Go to subject number..." gnus-summary-goto-subject t] - ["Go to article number..." gnus-summary-goto-article t] - ["Go to the last article" gnus-summary-goto-last-article t] - ["Pop article off history" gnus-summary-pop-article t]) - ("Sort" - ["Sort by number" gnus-summary-sort-by-number t] - ["Sort by author" gnus-summary-sort-by-author t] - ["Sort by subject" gnus-summary-sort-by-subject t] - ["Sort by date" gnus-summary-sort-by-date t] - ["Sort by score" gnus-summary-sort-by-score t]) - ("Exit" - ["Catchup and exit" gnus-summary-catchup-and-exit t] - ["Catchup all and exit" gnus-summary-catchup-and-exit t] - ["Catchup and goto next" gnus-summary-catchup-and-goto-next-group t] - ["Exit group" gnus-summary-exit t] - ["Exit group without updating" gnus-summary-exit-no-update t] - ["Exit and goto next group" gnus-summary-next-group t] - ["Exit and goto prev group" gnus-summary-prev-group t] - ["Reselect group" gnus-summary-reselect-current-group t] - ["Rescan group" gnus-summary-rescan-group t]) - ("Help" - ["Fetch group FAQ" gnus-summary-fetch-faq t] - ["Describe group" gnus-summary-describe-group t] - ["Read manual" gnus-info-find-node t]) - ("Cache" - ["Enter article" gnus-cache-enter-article t] - ["Remove article" gnus-cache-remove-article t]) - ("Modes" - ["Pick and read" gnus-pick-mode t] - ["Binary" gnus-binary-mode t]) - ["Filter articles..." gnus-summary-execute-command t] - ["Run command on subjects..." gnus-summary-universal-argument t] - ["Toggle line truncation" gnus-summary-toggle-truncation t] - ["Expand window" gnus-summary-expand-window t] - ["Expire expirable articles" gnus-summary-expire-articles - (gnus-check-backend-function - 'request-expire-articles gnus-newsgroup-name)] - ["Edit local kill file" gnus-summary-edit-local-kill t] - ["Edit main kill file" gnus-summary-edit-global-kill t] - )) - - (easy-menu-define gnus-summary-kill-menu gnus-summary-mode-map "" (cons "Score" @@ -830,6 +726,110 @@ ;;["Send" gnus-summary-send-draft t] ;;["Send bounced" gnus-resend-bounced-mail t]) )) + + (easy-menu-define + gnus-summary-misc-menu gnus-summary-mode-map "" + '("Misc" + ("Mark" + ("Read" + ["Mark as read" gnus-summary-mark-as-read-forward t] + ["Mark same subject and select" + gnus-summary-kill-same-subject-and-select t] + ["Mark same subject" gnus-summary-kill-same-subject t] + ["Catchup" gnus-summary-catchup t] + ["Catchup all" gnus-summary-catchup-all t] + ["Catchup to here" gnus-summary-catchup-to-here t] + ["Catchup region" gnus-summary-mark-region-as-read t] + ["Mark excluded" gnus-summary-limit-mark-excluded-as-read t]) + ("Various" + ["Tick" gnus-summary-tick-article-forward t] + ["Mark as dormant" gnus-summary-mark-as-dormant t] + ["Remove marks" gnus-summary-clear-mark-forward t] + ["Set expirable mark" gnus-summary-mark-as-expirable t] + ["Set bookmark" gnus-summary-set-bookmark t] + ["Remove bookmark" gnus-summary-remove-bookmark t]) + ("Limit" + ["Marks..." gnus-summary-limit-to-marks t] + ["Subject..." gnus-summary-limit-to-subject t] + ["Author..." gnus-summary-limit-to-author t] + ["Score" gnus-summary-limit-to-score t] + ["Unread" gnus-summary-limit-to-unread t] + ["Non-dormant" gnus-summary-limit-exclude-dormant t] + ["Articles" gnus-summary-limit-to-articles t] + ["Pop limit" gnus-summary-pop-limit t] + ["Show dormant" gnus-summary-limit-include-dormant t] + ["Hide childless dormant" + gnus-summary-limit-exclude-childless-dormant t] + ;;["Hide thread" gnus-summary-limit-exclude-thread t] + ["Show expunged" gnus-summary-show-all-expunged t]) + ("Process mark" + ["Set mark" gnus-summary-mark-as-processable t] + ["Remove mark" gnus-summary-unmark-as-processable t] + ["Remove all marks" gnus-summary-unmark-all-processable t] + ["Mark above" gnus-uu-mark-over t] + ["Mark series" gnus-uu-mark-series t] + ["Mark region" gnus-uu-mark-region t] + ["Mark by regexp..." gnus-uu-mark-by-regexp t] + ["Mark all" gnus-uu-mark-all t] + ["Mark buffer" gnus-uu-mark-buffer t] + ["Mark sparse" gnus-uu-mark-sparse t] + ["Mark thread" gnus-uu-mark-thread t] + ["Unmark thread" gnus-uu-unmark-thread t])) + ("Scroll article" + ["Page forward" gnus-summary-next-page t] + ["Page backward" gnus-summary-prev-page t] + ["Line forward" gnus-summary-scroll-up t]) + ("Move" + ["Next unread article" gnus-summary-next-unread-article t] + ["Previous unread article" gnus-summary-prev-unread-article t] + ["Next article" gnus-summary-next-article t] + ["Previous article" gnus-summary-prev-article t] + ["Next unread subject" gnus-summary-next-unread-subject t] + ["Previous unread subject" gnus-summary-prev-unread-subject t] + ["Next article same subject" gnus-summary-next-same-subject t] + ["Previous article same subject" gnus-summary-prev-same-subject t] + ["First unread article" gnus-summary-first-unread-article t] + ["Best unread article" gnus-summary-best-unread-article t] + ["Go to subject number..." gnus-summary-goto-subject t] + ["Go to article number..." gnus-summary-goto-article t] + ["Go to the last article" gnus-summary-goto-last-article t] + ["Pop article off history" gnus-summary-pop-article t]) + ("Sort" + ["Sort by number" gnus-summary-sort-by-number t] + ["Sort by author" gnus-summary-sort-by-author t] + ["Sort by subject" gnus-summary-sort-by-subject t] + ["Sort by date" gnus-summary-sort-by-date t] + ["Sort by score" gnus-summary-sort-by-score t]) + ("Help" + ["Fetch group FAQ" gnus-summary-fetch-faq t] + ["Describe group" gnus-summary-describe-group t] + ["Read manual" gnus-info-find-node t]) + ("Cache" + ["Enter article" gnus-cache-enter-article t] + ["Remove article" gnus-cache-remove-article t]) + ("Modes" + ["Pick and read" gnus-pick-mode t] + ["Binary" gnus-binary-mode t]) + ["Filter articles..." gnus-summary-execute-command t] + ["Run command on subjects..." gnus-summary-universal-argument t] + ["Toggle line truncation" gnus-summary-toggle-truncation t] + ["Expand window" gnus-summary-expand-window t] + ["Expire expirable articles" gnus-summary-expire-articles + (gnus-check-backend-function + 'request-expire-articles gnus-newsgroup-name)] + ["Edit local kill file" gnus-summary-edit-local-kill t] + ["Edit main kill file" gnus-summary-edit-global-kill t] + ("Exit" + ["Catchup and exit" gnus-summary-catchup-and-exit t] + ["Catchup all and exit" gnus-summary-catchup-and-exit t] + ["Catchup and goto next" gnus-summary-catchup-and-goto-next-group t] + ["Exit group" gnus-summary-exit t] + ["Exit group without updating" gnus-summary-exit-no-update t] + ["Exit and goto next group" gnus-summary-next-group t] + ["Exit and goto prev group" gnus-summary-prev-group t] + ["Reselect group" gnus-summary-reselect-current-group t] + ["Rescan group" gnus-summary-rescan-group t]))) + (run-hooks 'gnus-summary-menu-hook) )) @@ -989,13 +989,13 @@ (score (or (cdr (assq (or article gnus-current-article) gnus-newsgroup-scored)) gnus-summary-default-score 0)) - (default gnus-summary-default-score) (mark (or (gnus-summary-article-mark) gnus-unread-mark)) (inhibit-read-only t)) ;; Eval the cars of the lists until we find a match. - (while (and list - (not (eval (caar list)))) - (setq list (cdr list))) + (let ((default gnus-summary-default-score)) + (while (and list + (not (eval (caar list)))) + (setq list (cdr list)))) (let ((face (cdar list))) (unless (eq face (get-text-property beg 'face)) (gnus-put-text-property
--- a/lisp/gnus/gnus-xmas.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/gnus/gnus-xmas.el Mon Aug 13 08:46:35 2007 +0200 @@ -498,6 +498,7 @@ (when (and (<= emacs-major-version 19) (<= emacs-minor-version 13)) + (setq gnus-article-x-face-too-ugly (if (eq (device-type) 'tty) ".")) (fset 'gnus-highlight-selected-summary 'gnus-xmas-highlight-selected-summary) (fset 'gnus-group-remove-excess-properties
--- a/lisp/gnus/gnus.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/gnus/gnus.el Mon Aug 13 08:46:35 2007 +0200 @@ -31,9 +31,8 @@ (require 'mail-utils) (require 'timezone) (require 'nnheader) -(require 'message) (require 'nnmail) -(require 'backquote) +(require 'nnoo) (eval-when-compile (require 'cl)) @@ -149,6 +148,27 @@ run Gnus once. After doing that, you must edit this server from the server buffer.") +(defvar gnus-message-archive-group nil + "*Name of the group in which to save the messages you've written. +This can either be a string, a list of strings; or an alist +of regexps/functions/forms to be evaluated to return a string (or a list +of strings). The functions are called with the name of the current +group (or nil) as a parameter. + +If you want to save your mail in one group and the news articles you +write in another group, you could say something like: + + \(setq gnus-message-archive-group + '((if (message-news-p) + \"misc-news\" + \"misc-mail\"))) + +Normally the group names returned by this variable should be +unprefixed -- which implictly means \"store on the archive server\". +However, you may wish to store the message on some other server. In +that case, just return a fully prefixed name of the group -- +\"nnml+private:mail.misc\", for instance.") + (defvar gnus-refer-article-method nil "*Preferred method for fetching an article by Message-ID. If you are reading news from the local spool (with nnspool), fetching @@ -204,8 +224,8 @@ fetched by ange-ftp. This variable can also be a list of directories. In that case, the -first element in the list will be used by default, and the others will -be used as backup sites. +first element in the list will be used by default. The others can +be used when being prompted for a site. Note that Gnus uses an aol machine as the default directory. If this feels fundamentally unclean, just think of it as a way to finally get @@ -486,7 +506,7 @@ comparing subjects.") (defvar gnus-simplify-ignored-prefixes nil - "*Regexp, matches for which are removed from subject lines when simplifying.") + "*Regexp, matches for which are removed from subject lines when simplifying fuzzily.") (defvar gnus-build-sparse-threads nil "*If non-nil, fill in the gaps in threads. @@ -519,15 +539,26 @@ "*If non-nil, the \\<gnus-group-mode-map>\\[gnus-group-get-new-news-this-group] command will advance point to the next group.") (defvar gnus-check-new-newsgroups t - "*Non-nil means that Gnus will add new newsgroups at startup. -If this variable is `ask-server', Gnus will ask the server for new -groups since the last time it checked. This means that the killed list -is no longer necessary, so you could set `gnus-save-killed-list' to -nil. - -A variant is to have this variable be a list of select methods. Gnus -will then use the `ask-server' method on all these select methods to -query for new groups from all those servers. + "*Non-nil means that Gnus will run gnus-find-new-newsgroups at startup. +This normally finds new newsgroups by comparing the active groups the +servers have already reported with those Gnus already knows, either alive +or killed. + +When any of the following are true, gnus-find-new-newsgroups will instead +ask the servers (primary, secondary, and archive servers) to list new +groups since the last time it checked: + 1. This variable is `ask-server'. + 2. This variable is a list of select methods (see below). + 3. `gnus-read-active-file' is nil or `some'. + 4. A prefix argument is given to gnus-find-new-newsgroups interactively. + +Thus, if this variable is `ask-server' or a list of select methods or +`gnus-read-active-file' is nil or `some', then the killed list is no +longer necessary, so you could safely set `gnus-save-killed-list' to nil. + +This variable can be a list of select methods which Gnus will query with +the `ask-server' method in addition to the primary, secondary, and archive +servers. Eg. (setq gnus-check-new-newsgroups @@ -864,7 +895,6 @@ '(vertical 1.0 (summary 0.25 point) (if gnus-carpal '(summary-carpal 4)) - (if gnus-use-trees '(tree 0.25)) (article 1.0))))) (server (vertical 1.0 @@ -1013,8 +1043,8 @@ This function will be called with group info entries as the arguments for the groups to be sorted. Pre-made functions include `gnus-group-sort-by-alphabet', `gnus-group-sort-by-unread', -`gnus-group-sort-by-level', `gnus-group-sort-by-score', and -`gnus-group-sort-by-rank'. +`gnus-group-sort-by-level', `gnus-group-sort-by-score', +`gnus-group-sort-by-method', and `gnus-group-sort-by-rank'. This variable can also be a list of sorting functions. In that case, the most significant sort function should be the last function in the @@ -1067,6 +1097,9 @@ (defvar gnus-not-empty-thread-mark ?= "*There is a thread under the article.") +(defvar gnus-shell-command-separator ";" + "String used to separate to shell commands.") + (defvar gnus-view-pseudo-asynchronously nil "*If non-nil, Gnus will view pseudo-articles asynchronously.") @@ -1083,7 +1116,7 @@ (defvar gnus-insert-pseudo-articles t "*If non-nil, insert pseudo-articles when decoding articles.") -(defvar gnus-group-line-format "%M%S%p%P%5y: %(%g%)%l\n" +(defvar gnus-group-line-format "%M\%S\%p\%P\%5y: %(%g%)%l\n" "*Format of group lines. It works along the same lines as a normal formatting string, with some simple extensions. @@ -1131,7 +1164,7 @@ of these specs, you must probably re-start Gnus to see them go into effect.") -(defvar gnus-summary-line-format "%U%R%z%I%(%[%4L: %-20,20n%]%) %s\n" +(defvar gnus-summary-line-format "%U\%R\%z\%I\%(%[%4L: %-20,20n%]%) %s\n" "*The format specification of the lines in the summary buffer. It works along the same lines as a normal formatting string, @@ -1220,7 +1253,7 @@ "*The format specification for the article mode line. See `gnus-summary-mode-line-format' for a closer description.") -(defvar gnus-group-mode-line-format "Gnus: %%b {%M%:%S}" +(defvar gnus-group-mode-line-format "Gnus: %%b {%M\%:%S}" "*The format specification for the group mode line. It works along the same lines as a normal formatting string, with some simple extensions: @@ -1246,7 +1279,7 @@ ("nnfolder" mail respool address)) "An alist of valid select methods. The first element of each list lists should be a string with the name -of the select method. The other elements may be be the category of +of the select method. The other elements may be the category of this method (ie. `post', `mail', `none' or whatever) or other properties that this method has (like being respoolable). If you implement a new select method, all you should have to change is @@ -1314,12 +1347,20 @@ "^nnml\\|^nnfolder\\|^nnmbox\\|^nnmh\\|^nnbabyl" "*All new groups that match this regexp will be subscribed automatically. Note that this variable only deals with new groups. It has no effect -whatsoever on old groups.") +whatsoever on old groups. + +New groups that match this regexp will not be handled by +`gnus-subscribe-newsgroup-method'. Instead, they will +be subscribed using `gnus-subscribe-options-newsgroup-method'.") (defvar gnus-options-subscribe nil "*All new groups matching this regexp will be subscribed unconditionally. Note that this variable deals only with new newsgroups. This variable -does not affect old newsgroups.") +does not affect old newsgroups. + +New groups that match this regexp will not be handled by +`gnus-subscribe-newsgroup-method'. Instead, they will +be subscribed using `gnus-subscribe-options-newsgroup-method'.") (defvar gnus-options-not-subscribe nil "*All new groups matching this regexp will be ignored. @@ -1369,6 +1410,9 @@ (defvar gnus-summary-exit-hook nil "*A hook called on exit from the summary buffer.") +(defvar gnus-check-bogus-groups-hook nil + "A hook run after removing bogus groups.") + (defvar gnus-group-catchup-group-hook nil "*A hook run when catching up a group from the group buffer.") @@ -1611,7 +1655,7 @@ (defvar gnus-newsgroup-dependencies nil) (defvar gnus-newsgroup-async nil) -(defconst gnus-group-edit-buffer "*Gnus edit newsgroup*") +(defvar gnus-group-edit-buffer nil) (defvar gnus-newsgroup-adaptive nil) @@ -1730,7 +1774,7 @@ "gnus-bug@ifi.uio.no (The Gnus Bugfixing Girls + Boys)" "The mail address of the Gnus maintainers.") -(defconst gnus-version-number "5.2.25" +(defconst gnus-version-number "5.2.40" "Version number for this version of Gnus.") (defconst gnus-version (format "Gnus v%s" gnus-version-number) @@ -1950,7 +1994,7 @@ gnus-newsgroup-history gnus-newsgroup-ancient gnus-newsgroup-sparse (gnus-newsgroup-adaptive . gnus-use-adaptive-scoring) - gnus-newsgroup-adaptive-score-file + gnus-newsgroup-adaptive-score-file (gnus-reffed-article-number . -1) (gnus-newsgroup-expunged-tally . 0) gnus-cache-removable-articles gnus-newsgroup-cached gnus-newsgroup-data gnus-newsgroup-data-reverse @@ -2013,7 +2057,7 @@ gnus-group-brew-soup gnus-brew-soup gnus-soup-add-article gnus-soup-send-replies gnus-soup-save-areas gnus-soup-pack-packet) ("nnsoup" nnsoup-pack-replies) - ("gnus-scomo" :interactive t gnus-score-mode) + ("score-mode" :interactive t gnus-score-mode) ("gnus-mh" gnus-mh-mail-setup gnus-summary-save-article-folder gnus-Folder-save-name gnus-folder-save-name) ("gnus-mh" :interactive t gnus-summary-save-in-folder) @@ -2086,7 +2130,8 @@ gnus-uu-decode-binhex-view) ("gnus-msg" (gnus-summary-send-map keymap) gnus-mail-yank-original gnus-mail-send-and-exit - gnus-article-mail gnus-new-mail gnus-mail-reply) + gnus-article-mail gnus-new-mail gnus-mail-reply + gnus-copy-article-buffer) ("gnus-msg" :interactive t gnus-group-post-news gnus-group-mail gnus-summary-post-news gnus-summary-followup gnus-summary-followup-with-original @@ -2096,7 +2141,8 @@ gnus-summary-mail-forward gnus-summary-mail-other-window gnus-bug) ("gnus-picon" :interactive t gnus-article-display-picons - gnus-group-display-picons gnus-picons-article-display-x-face) + gnus-group-display-picons gnus-picons-article-display-x-face + gnus-picons-display-x-face) ("gnus-gl" bbb-login bbb-logout bbb-grouplens-group-p gnus-grouplens-mode) ("smiley" :interactive t gnus-smiley-display) @@ -3013,7 +3059,8 @@ (setq groupkey (if (string-match "^\\(.*\\)\\.[^.]+$" groupkey) (substring groupkey (match-beginning 1) (match-end 1))))) - (gnus-subscribe-newsgroup newgroup before)))) + (gnus-subscribe-newsgroup newgroup before)) + (kill-buffer (current-buffer)))) (defun gnus-subscribe-interactively (group) "Subscribe the new GROUP interactively. @@ -3035,11 +3082,14 @@ "Subscribe new NEWSGROUP. If NEXT is non-nil, it is inserted before NEXT. Otherwise it is made the first newsgroup." - ;; We subscribe the group by changing its level to `subscribed'. - (gnus-group-change-level - newsgroup gnus-level-default-subscribed - gnus-level-killed (gnus-gethash (or next "dummy.group") gnus-newsrc-hashtb)) - (gnus-message 5 "Subscribe newsgroup: %s" newsgroup)) + (save-excursion + (goto-char (point-min)) + ;; We subscribe the group by changing its level to `subscribed'. + (gnus-group-change-level + newsgroup gnus-level-default-subscribed + gnus-level-killed (gnus-gethash (or next "dummy.group") + gnus-newsrc-hashtb)) + (gnus-message 5 "Subscribe newsgroup: %s" newsgroup))) ;; For directories @@ -3067,6 +3117,8 @@ (defun gnus-make-directory (dir) "Make DIRECTORY recursively." + (unless dir + (error "No directory to make")) ;; Why don't we use `(make-directory dir 'parents)'? That's just one ;; of the many mysteries of the universe. (let* ((dir (expand-file-name dir default-directory)) @@ -3212,6 +3264,10 @@ gnus-server-alist nil gnus-group-list-mode nil gnus-opened-servers nil + gnus-group-mark-positions nil + gnus-newsgroup-data nil + gnus-newsgroup-unreads nil + nnoo-state-alist nil gnus-current-select-method nil) (gnus-shutdown 'gnus) ;; Kill the startup file. @@ -3801,7 +3857,7 @@ (apply 'format args))) (defun gnus-error (level &rest args) - "Beep an error if `gnus-verbose' is on LEVEL or less." + "Beep an error if LEVEL is equal to or less than `gnus-verbose'." (when (<= (floor level) gnus-verbose) (apply 'message args) (ding) @@ -4187,7 +4243,7 @@ "V" gnus-version "s" gnus-group-save-newsrc "z" gnus-group-suspend - "Z" gnus-group-clear-dribble +; "Z" gnus-group-clear-dribble "q" gnus-group-exit "Q" gnus-group-quit "?" gnus-group-describe-briefly @@ -4465,7 +4521,8 @@ (setcar (cddr entry) (gnus-byte-code 'gnus-tmp-func))))) (push (cons 'version emacs-version) gnus-format-specs) - + ;; Mark the .newsrc.eld file as "dirty". + (gnus-dribble-enter " ") (gnus-message 7 "Compiling user specs...done")))) (defun gnus-indent-rigidly (start end arg) @@ -4751,18 +4808,34 @@ (pop opened)) out)) +(defun gnus-archive-server-wanted-p () + "Say whether the user wants to use the archive server." + (cond + ((or (not gnus-message-archive-method) + (not gnus-message-archive-group)) + nil) + ((and gnus-message-archive-method gnus-message-archive-group) + t) + (t + (let ((active (cadr (assq 'nnfolder-active-file + gnus-message-archive-method)))) + (and active + (file-exists-p active)))))) + (defun gnus-group-prefixed-name (group method) "Return the whole name from GROUP and METHOD." (and (stringp method) (setq method (gnus-server-to-method method))) - (concat (format "%s" (car method)) - (if (and - (or (assoc (format "%s" (car method)) - (gnus-methods-using 'address)) - (gnus-server-equal method gnus-message-archive-method)) - (nth 1 method) - (not (string= (nth 1 method) ""))) - (concat "+" (nth 1 method))) - ":" group)) + (if (not method) + group + (concat (format "%s" (car method)) + (if (and + (or (assoc (format "%s" (car method)) + (gnus-methods-using 'address)) + (gnus-server-equal method gnus-message-archive-method)) + (nth 1 method) + (not (string= (nth 1 method) ""))) + (concat "+" (nth 1 method))) + ":" group))) (defun gnus-group-real-prefix (group) "Return the prefix of the current group name." @@ -5360,8 +5433,10 @@ (- (1+ (cdr active)) (car active))))) (gnus-summary-read-group group (or all (and (numberp number) - (zerop (+ number (length (cdr (assq 'tick marked))) - (length (cdr (assq 'dormant marked))))))) + (zerop (+ number (gnus-range-length + (cdr (assq 'tick marked))) + (gnus-range-length + (cdr (assq 'dormant marked))))))) no-article))) (defun gnus-group-select-group (&optional all) @@ -5443,6 +5518,7 @@ (goto-char b) ;; ... or insert the line. (or + t ;; Don't activate group. (gnus-active group) (gnus-activate-group group) (error "%s error: %s" group (gnus-status-message group))) @@ -5457,20 +5533,28 @@ (defun gnus-group-goto-group (group) "Goto to newsgroup GROUP." (when group - (let ((b (text-property-any (point-min) (point-max) - 'gnus-group (gnus-intern-safe - group gnus-active-hashtb)))) - (and b (goto-char b))))) - -(defun gnus-group-next-group (n) + ;; It's quite likely that we are on the right line, so + ;; we check the current line first. + (beginning-of-line) + (if (eq (get-text-property (point) 'gnus-group) + (gnus-intern-safe group gnus-active-hashtb)) + (point) + ;; Search through the entire buffer. + (let ((b (text-property-any + (point-min) (point-max) + 'gnus-group (gnus-intern-safe group gnus-active-hashtb)))) + (when b + (goto-char b)))))) + +(defun gnus-group-next-group (n &optional silent) "Go to next N'th newsgroup. If N is negative, search backward instead. Returns the difference between N and the number of skips actually done." (interactive "p") - (gnus-group-next-unread-group n t)) - -(defun gnus-group-next-unread-group (n &optional all level) + (gnus-group-next-unread-group n t nil silent)) + +(defun gnus-group-next-unread-group (n &optional all level silent) "Go to next N'th unread newsgroup. If N is negative, search backward instead. If ALL is non-nil, choose any newsgroup, unread or not. @@ -5486,8 +5570,10 @@ (gnus-group-search-forward backward (or (not gnus-group-goto-unread) all) level)) (setq n (1- n))) - (if (/= 0 n) (gnus-message 7 "No more%s newsgroups%s" (if all "" " unread") - (if level " on this level or higher" ""))) + (when (and (/= 0 n) + (not silent)) + (gnus-message 7 "No more%s newsgroups%s" (if all "" " unread") + (if level " on this level or higher" ""))) n)) (defun gnus-group-prev-group (n) @@ -5576,19 +5662,24 @@ (completing-read "Method: " (append gnus-valid-select-methods gnus-server-alist) nil t nil 'gnus-method-history))) - (cond ((assoc method gnus-valid-select-methods) - (list method - (if (memq 'prompt-address - (assoc method gnus-valid-select-methods)) - (read-string "Address: ") - ""))) - ((assoc method gnus-server-alist) - (list method)) - (t - (list method "")))))) - - (let* ((meth (and method (if address (list (intern method) address) - method))) + (cond + ((equal method "") + (setq method gnus-select-method)) + ((assoc method gnus-valid-select-methods) + (list method + (if (memq 'prompt-address + (assoc method gnus-valid-select-methods)) + (read-string "Address: ") + ""))) + ((assoc method gnus-server-alist) + (list method)) + (t + (list method "")))))) + + (let* ((meth (when (and method + (not (gnus-server-equal method gnus-select-method))) + (if address (list (intern method) address) + method))) (nname (if method (gnus-group-prefixed-name name meth) name)) backend info) (when (gnus-gethash nname gnus-newsrc-hashtb) @@ -5669,9 +5760,13 @@ ;; We find the proper prefixed name. (setq new-name - (gnus-group-prefixed-name - (gnus-group-real-name new-name) - (gnus-info-method (gnus-get-info group)))) + (if (equal (gnus-group-real-name new-name) new-name) + ;; Native group. + new-name + ;; Foreign group. + (gnus-group-prefixed-name + (gnus-group-real-name new-name) + (gnus-info-method (gnus-get-info group))))) (gnus-message 6 "Renaming group %s to %s..." group new-name) (prog1 @@ -5702,7 +5797,9 @@ (or group (error "No group on current line")) (or (setq info (gnus-get-info group)) (error "Killed group; can't be edited")) - (set-buffer (get-buffer-create gnus-group-edit-buffer)) + (set-buffer (setq gnus-group-edit-buffer + (get-buffer-create + (format "*Gnus edit %s*" group)))) (gnus-configure-windows 'edit-group) (gnus-add-current-to-buffer-list) (emacs-lisp-mode) @@ -5741,47 +5838,49 @@ (defun gnus-group-edit-group-done (part group) "Get info from buffer, update variables and jump to the group buffer." - (set-buffer (get-buffer-create gnus-group-edit-buffer)) - (goto-char (point-min)) - (let* ((form (read (current-buffer))) - (winconf gnus-prev-winconf) - (method (cond ((eq part 'info) (nth 4 form)) - ((eq part 'method) form) + (when (and gnus-group-edit-buffer + (buffer-name gnus-group-edit-buffer)) + (set-buffer gnus-group-edit-buffer) + (goto-char (point-min)) + (let* ((form (read (current-buffer))) + (winconf gnus-prev-winconf) + (method (cond ((eq part 'info) (nth 4 form)) + ((eq part 'method) form) + (t nil))) + (info (cond ((eq part 'info) form) + ((eq part 'method) (gnus-get-info group)) (t nil))) - (info (cond ((eq part 'info) form) - ((eq part 'method) (gnus-get-info group)) - (t nil))) - (new-group (if info - (if (or (not method) - (gnus-server-equal - gnus-select-method method)) - (gnus-group-real-name (car info)) - (gnus-group-prefixed-name - (gnus-group-real-name (car info)) method)) - nil))) - (when (and new-group - (not (equal new-group group))) - (when (gnus-group-goto-group group) - (gnus-group-kill-group 1)) - (gnus-activate-group new-group)) - ;; Set the info. - (if (and info new-group) - (progn - (setq info (gnus-copy-sequence info)) - (setcar info new-group) - (unless (gnus-server-equal method "native") - (unless (nthcdr 3 info) - (nconc info (list nil nil))) - (unless (nthcdr 4 info) - (nconc info (list nil))) - (gnus-info-set-method info method)) - (gnus-group-set-info info)) - (gnus-group-set-info form (or new-group group) part)) - (kill-buffer (current-buffer)) - (and winconf (set-window-configuration winconf)) - (set-buffer gnus-group-buffer) - (gnus-group-update-group (or new-group group)) - (gnus-group-position-point))) + (new-group (if info + (if (or (not method) + (gnus-server-equal + gnus-select-method method)) + (gnus-group-real-name (car info)) + (gnus-group-prefixed-name + (gnus-group-real-name (car info)) method)) + nil))) + (when (and new-group + (not (equal new-group group))) + (when (gnus-group-goto-group group) + (gnus-group-kill-group 1)) + (gnus-activate-group new-group)) + ;; Set the info. + (if (and info new-group) + (progn + (setq info (gnus-copy-sequence info)) + (setcar info new-group) + (unless (gnus-server-equal method "native") + (unless (nthcdr 3 info) + (nconc info (list nil nil))) + (unless (nthcdr 4 info) + (nconc info (list nil))) + (gnus-info-set-method info method)) + (gnus-group-set-info info)) + (gnus-group-set-info form (or new-group group) part)) + (kill-buffer (current-buffer)) + (and winconf (set-window-configuration winconf)) + (set-buffer gnus-group-buffer) + (gnus-group-update-group (or new-group group)) + (gnus-group-position-point)))) (defun gnus-group-make-help-group () "Create the Gnus documentation group." @@ -5845,14 +5944,15 @@ (interactive "P") (let ((group (gnus-group-prefixed-name (if all "ding.archives" "ding.recent") '(nndir "")))) - (and (gnus-gethash group gnus-newsrc-hashtb) - (error "Archive group already exists")) + (when (gnus-gethash group gnus-newsrc-hashtb) + (error "Archive group already exists")) (gnus-group-make-group (gnus-group-real-name group) (list 'nndir (if all "hpc" "edu") (list 'nndir-directory (if all gnus-group-archive-directory - gnus-group-recent-archive-directory)))))) + gnus-group-recent-archive-directory)))) + (gnus-group-add-parameter group (cons 'to-address "ding@ifi.uio.no")))) (defun gnus-group-make-directory-group (dir) "Create an nndir group. @@ -5875,7 +5975,7 @@ (setq ext (format "<%d>" (setq i (1+ i))))) (gnus-group-make-group (gnus-group-real-name group) - (list 'nndir group (list 'nndir-directory dir))))) + (list 'nndir (gnus-group-real-name group) (list 'nndir-directory dir))))) (defun gnus-group-make-kiboze-group (group address scores) "Create an nnkiboze group. @@ -5941,17 +6041,17 @@ (defun gnus-group-enter-directory (dir) "Enter an ephemeral nneething group." (interactive "DDirectory to read: ") - (let* ((method (list 'nneething dir)) + (let* ((method (list 'nneething dir '(nneething-read-only t))) (leaf (gnus-group-prefixed-name (file-name-nondirectory (directory-file-name dir)) method)) (name (gnus-generate-new-group-name leaf))) - (let ((nneething-read-only t)) - (or (gnus-group-read-ephemeral-group - name method t - (cons (current-buffer) (if (eq major-mode 'gnus-summary-mode) - 'summary 'group))) - (error "Couldn't enter %s" dir))))) + (unless (gnus-group-read-ephemeral-group + name method t + (cons (current-buffer) + (if (eq major-mode 'gnus-summary-mode) + 'summary 'group))) + (error "Couldn't enter %s" dir)))) ;; Group sorting commands ;; Suggested by Joe Hildebrand <hildjj@idaho.fuentez.com>. @@ -6404,8 +6504,10 @@ (let* ((prev gnus-newsrc-alist) (alist (cdr prev))) (while alist - (if (= (gnus-info-level level) level) - (setcdr prev (cdr alist)) + (if (= (gnus-info-level (car alist)) level) + (progn + (push (gnus-info-group (car alist)) gnus-killed-list) + (setcdr prev (cdr alist))) (setq prev alist)) (setq alist (cdr alist))) (gnus-make-hashtable-from-newsrc-alist) @@ -6526,7 +6628,10 @@ (unless (gnus-virtual-group-p group) (gnus-close-group group)) (gnus-group-update-group group)) - (gnus-error 3 "%s error: %s" group (gnus-status-message group)))) + (if (eq (gnus-server-status (gnus-find-method-for-group group)) + 'denied) + (gnus-error 3 "Server denied access") + (gnus-error 3 "%s error: %s" group (gnus-status-message group))))) (when beg (goto-char beg)) (when gnus-goto-next-group-when-activating (gnus-group-next-unread-group 1 t)) @@ -6558,18 +6663,17 @@ (defun gnus-group-describe-group (force &optional group) "Display a description of the current newsgroup." (interactive (list current-prefix-arg (gnus-group-group-name))) - (when (and force - gnus-description-hashtb) - (gnus-sethash group nil gnus-description-hashtb)) - (let ((method (gnus-find-method-for-group group)) - desc) + (let* ((method (gnus-find-method-for-group group)) + (mname (gnus-group-prefixed-name "" method)) + desc) + (when (and force + gnus-description-hashtb) + (gnus-sethash mname nil gnus-description-hashtb)) (or group (error "No group name given")) (and (or (and gnus-description-hashtb ;; We check whether this group's method has been ;; queried for a description file. - (gnus-gethash - (gnus-group-prefixed-name "" method) - gnus-description-hashtb)) + (gnus-gethash mname gnus-description-hashtb)) (setq desc (gnus-group-get-description group)) (gnus-read-descriptions-file method)) (gnus-message 1 @@ -6600,7 +6704,7 @@ (goto-char (point-min)) (gnus-group-position-point))) -;; Suggested by by Daniel Quinlan <quinlan@best.com>. +;; Suggested by Daniel Quinlan <quinlan@best.com>. (defun gnus-group-apropos (regexp &optional search-description) "List all newsgroups that have names that match a regexp." (interactive "sGnus apropos (regexp): ") @@ -7108,6 +7212,7 @@ "s" gnus-article-hide-signature "c" gnus-article-hide-citation "p" gnus-article-hide-pgp + "P" gnus-article-hide-pem "\C-c" gnus-article-hide-citation-maybe) (gnus-define-keys (gnus-summary-wash-highlight-map "H" gnus-summary-wash-map) @@ -7199,6 +7304,8 @@ (make-local-variable 'gnus-summary-line-format) (make-local-variable 'gnus-summary-line-format-spec) (make-local-variable 'gnus-summary-mark-positions) + (gnus-make-local-hook 'post-command-hook) + (gnus-add-hook 'post-command-hook 'gnus-clear-inboxes-moved nil t) (run-hooks 'gnus-summary-mode-hook)) (defun gnus-summary-make-local-variables () @@ -7552,6 +7659,7 @@ (article-buffer gnus-article-buffer) (original gnus-original-article-buffer) (gac gnus-article-current) + (reffed gnus-reffed-article-number) (score-file gnus-current-score-file)) (save-excursion (set-buffer gnus-group-buffer) @@ -7564,6 +7672,7 @@ (setq gnus-summary-buffer summary) (setq gnus-article-buffer article-buffer) (setq gnus-original-article-buffer original) + (setq gnus-reffed-article-number reffed) (setq gnus-current-score-file score-file))))) (defun gnus-summary-last-article-p (&optional article) @@ -7815,7 +7924,7 @@ (cond (gnus-newsgroup-dormant (gnus-summary-limit-include-dormant)) ((and gnus-newsgroup-scored show-all) - (gnus-summary-limit-include-expunged)))) + (gnus-summary-limit-include-expunged t)))) ;; Function `gnus-apply-kill-file' must be called in this hook. (run-hooks 'gnus-apply-kill-hook) (if (and (zerop (buffer-size)) @@ -8245,8 +8354,8 @@ (while threads (setq sub (car threads)) (if (stringp (car sub)) - ;; This is a gathered threads, so we look at the roots - ;; below it to find whether this article in in this + ;; This is a gathered thread, so we look at the roots + ;; below it to find whether this article is in this ;; gathered root. (progn (setq sub (cdr sub)) @@ -8426,11 +8535,16 @@ ;; This function find the total score of the thread below ROOT. (setq root (car root)) (apply gnus-thread-score-function - (or (cdr (assq (mail-header-number root) gnus-newsgroup-scored)) - gnus-summary-default-score 0) - (mapcar 'gnus-thread-total-score - (cdr (gnus-gethash (mail-header-id root) - gnus-newsgroup-dependencies))))) + (or (append + (mapcar 'gnus-thread-total-score + (cdr (gnus-gethash (mail-header-id root) + gnus-newsgroup-dependencies))) + (if (> (mail-header-number root) 0) + (list (or (cdr (assq (mail-header-number root) + gnus-newsgroup-scored)) + gnus-summary-default-score 0)))) + (list gnus-summary-default-score) + '(0)))) ;; Added by Per Abrahamsen <amanda@iesd.auc.dk>. (defvar gnus-tmp-prev-subject nil) @@ -8841,7 +8955,6 @@ gnus-newsgroup-end (mail-header-number (gnus-last-element gnus-newsgroup-headers)))) - (setq gnus-reffed-article-number -1) ;; GROUP is successfully selected. (or gnus-newsgroup-headers t))))) @@ -8936,7 +9049,7 @@ (min (car active)) (max (cdr active)) (types gnus-article-mark-lists) - (uncompressed '(score bookmark)) + (uncompressed '(score bookmark killed)) marks var articles article mark) (while marked-lists @@ -8952,12 +9065,12 @@ ;; All articles have to be subsets of the active articles. (cond ;; Adjust "simple" lists. - ((memq mark '(tick dormant expirable reply killed save)) + ((memq mark '(tick dormant expirable reply save)) (while articles (when (or (< (setq article (pop articles)) min) (> article max)) (set var (delq article (symbol-value var)))))) ;; Adjust assocs. - ((memq mark '(score bookmark)) + ((memq mark uncompressed) (while articles (when (or (not (consp (setq article (pop articles)))) (< (car article) min) @@ -9163,27 +9276,24 @@ (active (gnus-active group)) range) ;; First peel off all illegal article numbers. - (if active - (let ((ids articles) - id first) - (while ids - (setq id (car ids)) - (if (and first (> id (cdr active))) - (progn - ;; We'll end up in this situation in one particular - ;; obscure situation. If you re-scan a group and get - ;; a new article that is cross-posted to a different - ;; group that has not been re-scanned, you might get - ;; crossposted article that has a higher number than - ;; Gnus believes possible. So we re-activate this - ;; group as well. This might mean doing the - ;; crossposting thingy will *increase* the number - ;; of articles in some groups. Tsk, tsk. - (setq active (or (gnus-activate-group group) active)))) - (if (or (> id (cdr active)) + (when active + (let ((ids articles) + id first) + (while (setq id (pop ids)) + (when (and first (> id (cdr active))) + ;; We'll end up in this situation in one particular + ;; obscure situation. If you re-scan a group and get + ;; a new article that is cross-posted to a different + ;; group that has not been re-scanned, you might get + ;; crossposted article that has a higher number than + ;; Gnus believes possible. So we re-activate this + ;; group as well. This might mean doing the + ;; crossposting thingy will *increase* the number + ;; of articles in some groups. Tsk, tsk. + (setq active (or (gnus-activate-group group) active))) + (when (or (> id (cdr active)) (< id (car active))) - (setq articles (delq id articles))) - (setq ids (cdr ids))))) + (setq articles (delq id articles)))))) ;; If the read list is nil, we init it. (and active (null (gnus-info-read info)) @@ -10400,8 +10510,7 @@ ;; If not, we try the first unread, if that is wanted. ((and subject gnus-auto-select-same - (or (gnus-summary-first-unread-article) - (eq (gnus-summary-article-mark) gnus-canceled-mark))) + (gnus-summary-first-unread-article)) (gnus-summary-position-point) (gnus-message 6 "Wrapped")) ;; Try to get next/previous article not displayed in this group. @@ -10872,6 +10981,7 @@ (setq gnus-newsgroup-limit articles) (let ((total (length gnus-newsgroup-data)) (data (gnus-data-find-list (gnus-summary-article-number))) + (gnus-summary-mark-below nil) ; Inhibit this. found) ;; This will do all the work of generating the new summary buffer ;; according to the new limit. @@ -11186,7 +11296,7 @@ (gnus-summary-select-article) (gnus-configure-windows 'article) (gnus-eval-in-buffer-window gnus-article-buffer - (goto-char (point-min)) + ;;(goto-char (point-min)) (isearch-forward regexp-p))) (defun gnus-summary-search-article-forward (regexp &optional backward) @@ -11840,9 +11950,11 @@ (interactive) (if (gnus-group-read-only-p) (progn - (gnus-summary-edit-article-postpone) - (gnus-error - 1 "The current newsgroup does not support article editing.")) + (let ((beep (not (eq major-mode 'text-mode)))) + (gnus-summary-edit-article-postpone) + (when beep + (gnus-error + 3 "The current newsgroup does not support article editing.")))) (let ((buf (format "%s" (buffer-string)))) (erase-buffer) (insert buf) @@ -12442,7 +12554,7 @@ ;; Suggested by Daniel Quinlan <quinlan@best.com>. (defalias 'gnus-summary-show-all-expunged 'gnus-summary-limit-include-expunged) -(defun gnus-summary-limit-include-expunged () +(defun gnus-summary-limit-include-expunged (&optional no-error) "Display all the hidden articles that were expunged for low scores." (interactive) (gnus-set-global-variables) @@ -12455,11 +12567,14 @@ (< (cdar scored) gnus-summary-expunge-below) (setq headers (cons h headers)))) (setq scored (cdr scored))) - (or headers (error "No expunged articles hidden.")) - (goto-char (point-min)) - (gnus-summary-prepare-unthreaded (nreverse headers))) - (goto-char (point-min)) - (gnus-summary-position-point))) + (if (not headers) + (when (not no-error) + (error "No expunged articles hidden.")) + (goto-char (point-min)) + (gnus-summary-prepare-unthreaded (nreverse headers)) + (goto-char (point-min)) + (gnus-summary-position-point) + t)))) (defun gnus-summary-catchup (&optional all quietly to-here not-mark) "Mark all articles not marked as unread in this newsgroup as read. @@ -12659,6 +12774,7 @@ (> (prefix-numeric-value arg) 0))) (gnus-summary-prepare) (gnus-summary-goto-subject current) + (gnus-message 6 "Threading is now %s" (if gnus-show-threads "on" "off")) (gnus-summary-position-point))) (defun gnus-summary-show-all-threads () @@ -13195,18 +13311,22 @@ gnus-article-save-directory (car split-name)))) (car (push result file-name-history))))))) + ;; Create the directory. + (unless (equal (directory-file-name file) file) + (make-directory (file-name-directory file) t)) ;; If we have read a directory, we append the default file name. (when (file-directory-p file) (setq file (concat (file-name-as-directory file) (file-name-nondirectory default-name)))) - ;; Possibly translate some charaters. + ;; Possibly translate some characters. (nnheader-translate-file-chars file))) (defun gnus-article-archive-name (group) "Return the first instance of an \"Archive-name\" in the current buffer." (let ((case-fold-search t)) (when (re-search-forward "archive-name: *\\([^ \n\t]+\\)[ \t]*$" nil t) - (match-string 1)))) + (nnheader-concat gnus-article-save-directory + (match-string 1))))) (defun gnus-summary-save-in-rmail (&optional filename) "Append this article to Rmail file. @@ -13481,6 +13601,7 @@ "\M-\t" gnus-article-prev-button "<" beginning-of-buffer ">" end-of-buffer + "\C-c\C-i" gnus-info-find-node "\C-c\C-b" gnus-bug) (substitute-key-definition @@ -13543,6 +13664,7 @@ (set-buffer (get-buffer-create gnus-original-article-buffer)) (buffer-disable-undo (current-buffer)) (setq major-mode 'gnus-original-article-mode) + (gnus-add-current-to-buffer-list) (make-local-variable 'gnus-original-article)) (if (get-buffer name) (save-excursion @@ -14194,6 +14316,7 @@ (goto-char (point-min)) (or (search-forward "\n\n" nil t) (point-max))) + (goto-char (point-min)) (while (re-search-forward "=\\?iso-8859-1\\?q\\?\\([^?\t\n]*\\)\\?=" nil t) (setq string (match-string 1)) @@ -14278,6 +14401,35 @@ (gnus-hide-text (match-beginning 0) (match-end 0) props)) (widen)))))) +(defun gnus-article-hide-pem (&optional arg) + "Toggle hiding of any PEM headers and signatures in the current article. +If given a negative prefix, always show; if given a positive prefix, +always hide." + (interactive (gnus-hidden-arg)) + (unless (gnus-article-check-hidden-text 'pem arg) + (save-excursion + (set-buffer gnus-article-buffer) + (let ((props (nconc (list 'gnus-type 'pem) gnus-hidden-properties)) + buffer-read-only end) + (widen) + (goto-char (point-min)) + ;; hide the horrendously ugly "header". + (and (search-forward "\n-----BEGIN PRIVACY-ENHANCED MESSAGE-----\n" + nil + t) + (setq end (1+ (match-beginning 0))) + (gnus-hide-text + end + (if (search-forward "\n\n" nil t) + (match-end 0) + (point-max)) + props)) + ;; hide the trailer as well + (and (search-forward "\n-----END PRIVACY-ENHANCED MESSAGE-----\n" + nil + t) + (gnus-hide-text (match-beginning 0) (match-end 0) props)))))) + (defun gnus-article-hide-signature (&optional arg) "Hide the signature in the current article. If given a negative prefix, always show; if given a positive prefix, @@ -14729,7 +14881,7 @@ "Describe article mode commands briefly." (interactive) (gnus-message 6 - (substitute-command-keys "\\<gnus-article-mode-map>\\[gnus-article-next-page]:Next page \\[gnus-article-prev-page]:Prev page \\[gnus-article-show-summary]:Show summary \\[gnus-info-find-node]:Run Info \\[gnus-article-describe-briefly]:This help"))) + (substitute-command-keys "\\<gnus-article-mode-map>\\[gnus-article-goto-next-page]:Next page \\[gnus-article-goto-prev-page]:Prev page \\[gnus-article-show-summary]:Show summary \\[gnus-info-find-node]:Run Info \\[gnus-article-describe-briefly]:This help"))) (defun gnus-article-summary-command () "Execute the last keystroke in the summary buffer." @@ -14759,6 +14911,8 @@ '("q" "Q" "c" "r" "R" "\C-c\C-f" "m" "a" "f" "F" "Zc" "ZC" "ZE" "ZQ" "ZZ" "Zn" "ZR" "ZG" "ZN" "ZP" "=" "^" "\M-^" "|")) + (nosave-but-article + '("A\r")) keys) (save-excursion (set-buffer gnus-summary-buffer) @@ -14766,12 +14920,18 @@ (setq keys (read-key-sequence nil))) (message "") - (if (member keys nosaves) + (if (or (member keys nosaves) + (member keys nosave-but-article)) (let (func) - (pop-to-buffer gnus-summary-buffer 'norecord) - (if (setq func (lookup-key (current-local-map) keys)) - (call-interactively func) - (ding))) + (save-window-excursion + (pop-to-buffer gnus-summary-buffer 'norecord) + (setq func (lookup-key (current-local-map) keys))) + (if (not func) + (ding) + (set-buffer gnus-summary-buffer) + (call-interactively func)) + (when (member keys nosave-but-article) + (pop-to-buffer gnus-article-buffer 'norecord))) (let ((obuf (current-buffer)) (owin (current-window-configuration)) (opoint (point)) @@ -14906,6 +15066,7 @@ (set-buffer gnus-dribble-buffer) (insert string "\n") (set-window-point (get-buffer-window (current-buffer)) (point-max)) + (bury-buffer gnus-dribble-buffer) (set-buffer obuf)))) (defun gnus-dribble-read-file () @@ -15365,6 +15526,10 @@ (setcar (cdr entry) (concat (nth 1 entry) "+" group)) (nconc entry (cdr method)))) +(defun gnus-server-status (method) + "Return the status of METHOD." + (nth 1 (assoc method gnus-opened-servers))) + (defun gnus-group-name-to-method (group) "Return a select method suitable for GROUP." (if (string-match ":" group) @@ -15435,7 +15600,7 @@ (gnus-read-newsrc-file rawfile)) (when (and (not (assoc "archive" gnus-server-alist)) - gnus-message-archive-method) + (gnus-archive-server-wanted-p)) (push (cons "archive" gnus-message-archive-method) gnus-server-alist)) @@ -15585,7 +15750,7 @@ (let* ((date (or gnus-newsrc-last-checked-date (current-time-string))) (methods (cons gnus-select-method (nconc - (when gnus-message-archive-method + (when (gnus-archive-server-wanted-p) (list "archive")) (append (and (consp gnus-check-new-newsgroups) @@ -15848,7 +16013,7 @@ (gnus-group-change-level entry gnus-level-killed) (setq gnus-killed-list (delete group gnus-killed-list)))) ;; Then we remove all bogus groups from the list of killed and - ;; zombie groups. They are are removed without confirmation. + ;; zombie groups. They are removed without confirmation. (let ((dead-lists '(gnus-killed-list gnus-zombie-list)) killed) (while dead-lists @@ -15860,6 +16025,7 @@ (set (car dead-lists) (delete group (symbol-value (car dead-lists)))))) (setq dead-lists (cdr dead-lists)))) + (run-hooks 'gnus-check-bogus-groups-hook) (gnus-message 5 "Checking bogus newsgroups...done")))) (defun gnus-check-duplicate-killed-groups () @@ -15874,6 +16040,7 @@ ;; We want to inline a function from gnus-cache, so we cheat here: (eval-when-compile (provide 'gnus) + (setq gnus-directory (or (getenv "SAVEDIR") "~/News/")) (require 'gnus-cache)) (defun gnus-get-unread-articles-in-group (info active &optional update) @@ -16148,7 +16315,7 @@ (setq lists (cdr lists))))) (defun gnus-get-killed-groups () - "Go through the active hashtb and all all unknown groups as killed." + "Go through the active hashtb and mark all unknown groups as killed." ;; First make sure active file has been read. (unless (gnus-read-active-file-p) (let ((gnus-read-active-file t)) @@ -16184,7 +16351,7 @@ ;; secondary ones. gnus-secondary-select-methods) ;; Also read from the archive server. - (when gnus-message-archive-method + (when (gnus-archive-server-wanted-p) (list "archive")))) list-type) (setq gnus-have-read-active-file nil) @@ -16996,7 +17163,7 @@ (defun gnus-read-all-descriptions-files () (let ((methods (cons gnus-select-method (nconc - (when gnus-message-archive-method + (when (gnus-archive-server-wanted-p) (list "archive")) gnus-secondary-select-methods)))) (while methods
--- a/lisp/gnus/message.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/gnus/message.el Mon Aug 13 08:46:35 2007 +0200 @@ -40,7 +40,6 @@ (require 'mail-abbrevs) (require 'mailabbrev)) -;;;###autoload (defvar message-directory "~/Mail/" "*Directory from which all other mail file variables are derived.") @@ -164,9 +163,8 @@ (defvar message-user-organization-file "/usr/lib/news/organization" "*Local news organization file.") -;;;###autoload -(defvar message-autosave-directory - (concat (file-name-as-directory message-directory) "drafts/") +(defvar message-autosave-directory "~/" + ; (concat (file-name-as-directory message-directory) "drafts/") "*Directory where message autosaves buffers. If nil, message won't autosave.") @@ -378,6 +376,10 @@ table) "Syntax table used while in Message mode.") +(defvar message-mode-abbrev-table text-mode-abbrev-table + "Abbrev table used in Message mode buffers. +Defaults to `text-mode-abbrev-table'.") + (defvar message-font-lock-keywords (let* ((cite-prefix "A-Za-z") (cite-suffix (concat cite-prefix "0-9_.@-"))) (list '("^To:" . font-lock-function-name-face) @@ -517,13 +519,16 @@ \",\" is used as the separator." (let ((regexp (format "[%s]+" (or separator ","))) (beg 1) + (first t) quoted elems) (save-excursion (message-set-work-buffer) (insert header) (goto-char (point-min)) (while (not (eobp)) - (forward-char 1) + (if first + (setq first nil) + (forward-char 1)) (cond ((and (> (point) beg) (or (eobp) (and (looking-at regexp) @@ -789,7 +794,7 @@ (make-local-variable 'message-postpone-actions) (set-syntax-table message-mode-syntax-table) (use-local-map message-mode-map) - (setq local-abbrev-table text-mode-abbrev-table) + (setq local-abbrev-table message-mode-abbrev-table) (setq major-mode 'message-mode) (setq mode-name "Message") (setq buffer-offer-save t) @@ -824,8 +829,8 @@ (setq message-sent-message-via nil) (make-local-variable 'message-checksum) (setq message-checksum nil) - (when (fboundp 'mail-hist-define-keys) - (mail-hist-define-keys)) + ;;(when (fboundp 'mail-hist-define-keys) + ;; (mail-hist-define-keys)) (when (string-match "XEmacs\\|Lucid" emacs-version) (message-setup-toolbar)) (easy-menu-add message-mode-menu message-mode-map) @@ -963,11 +968,8 @@ (file-exists-p message-signature-file)) signature)))) (when signature -; ;; Remove blank lines at the end of the message. + ;; Insert the signature. (goto-char (point-max)) -; (skip-chars-backward " \t\n") -; (delete-region (point) (point-max)) - ;; Insert the signature. (unless (bolp) (insert "\n")) (insert "\n-- \n") @@ -1050,7 +1052,11 @@ (name (if enter-string (read-string "New buffer name: " name-default) name-default))) - (rename-buffer name t))))) + (rename-buffer name t) + (setq buffer-auto-save-file-name + (format "%s%s" + (file-name-as-directory message-autosave-directory) + (file-name-nondirectory buffer-auto-save-file-name))))))) (defun message-fill-yanked-message (&optional justifyp) "Fill the paragraphs of a message yanked into this one. @@ -1095,6 +1101,8 @@ Normally indents each nonblank line ARG spaces (default 3). However, if `message-yank-prefix' is non-nil, insert that prefix on each line. +This function uses `message-cite-function' to do the actual citing. + Just \\[universal-argument] as argument means don't indent, insert no prefix, and don't delete any headers." (interactive "P") @@ -1255,8 +1263,8 @@ "Already sent message via mail; resend? ")) (message-send-mail arg)))) (message-do-fcc) - (when (fboundp 'mail-hist-put-headers-into-history) - (mail-hist-put-headers-into-history)) + ;;(when (fboundp 'mail-hist-put-headers-into-history) + ;; (mail-hist-put-headers-into-history)) (run-hooks 'message-sent-hook) (message "Sending...done") ;; If buffer has no file, mark it as unmodified and delete autosave. @@ -1316,7 +1324,11 @@ (save-excursion (set-buffer tembuf) (erase-buffer) - (insert-buffer-substring mailbuf) + ;; Avoid copying text props. + (insert (format + "%s" (save-excursion + (set-buffer mailbuf) + (buffer-string)))) ;; Remove some headers. (save-restriction (message-narrow-to-headers) @@ -1413,6 +1425,11 @@ (funcall message-post-method arg) message-post-method)) (messbuf (current-buffer)) + (message-syntax-checks + (if arg + (cons '(existing-newsgroups . disabled) + message-syntax-checks) + message-syntax-checks)) result) (save-restriction (message-narrow-to-headers) @@ -1427,7 +1444,11 @@ (set-buffer tembuf) (buffer-disable-undo (current-buffer)) (erase-buffer) - (insert-buffer-substring messbuf) + ;; Avoid copying text props. + (insert (format + "%s" (save-excursion + (set-buffer messbuf) + (buffer-string)))) ;; Remove some headers. (save-restriction (message-narrow-to-headers) @@ -1526,8 +1547,9 @@ ;; Check "Shoot me". (or (message-check-element 'shoot) (save-excursion - (if (search-forward - ".i-have-a-misconfigured-system-so-shoot-me" nil t) + (if (re-search-forward + "Message-ID.*.i-have-a-misconfigured-system-so-shoot-me" + nil t) (y-or-n-p "You appear to have a misconfigured system. Really post? ") t))) @@ -1663,8 +1685,8 @@ (concat "^" (regexp-quote mail-header-separator) "$")) (forward-line 1) (let ((b (point))) - (or (re-search-forward message-signature-separator nil t) - (goto-char (point-max))) + (goto-char (point-max)) + (re-search-backward message-signature-separator nil t) (beginning-of-line) (or (re-search-backward "[^ \n\t]" b t) (y-or-n-p "Empty article. Really post? "))))) @@ -1694,7 +1716,7 @@ (message-check-element 'signature) (progn (goto-char (point-max)) - (if (or (not (re-search-backward "^-- $" nil t)) + (if (or (not (re-search-backward message-signature-separator nil t)) (search-forward message-forward-end-separator nil t)) t (if (> (count-lines (point) (point-max)) 5) @@ -1759,7 +1781,7 @@ (not (eq message-fcc-handler-function 'rmail-output))) (funcall message-fcc-handler-function file) (if (and (file-readable-p file) (mail-file-babyl-p file)) - (rmail-output file 1) + (rmail-output file 1 nil t) (let ((mail-use-rfc822 t)) (rmail-output file 1 t t)))))) (kill-buffer (current-buffer))))) @@ -2285,8 +2307,8 @@ ;; We might have sent this buffer already. Delete it from the ;; list of buffers. (setq message-buffer-list (delq (current-buffer) message-buffer-list)) - (when (and message-max-buffers - (>= (length message-buffer-list) message-max-buffers)) + (while (and message-max-buffers + (>= (length message-buffer-list) message-max-buffers)) ;; Kill the oldest buffer -- unless it has been changed. (let ((buffer (pop message-buffer-list))) (when (and (buffer-name buffer) @@ -2407,6 +2429,7 @@ (let ((cur (current-buffer)) from subject date reply-to to cc references message-id follow-to + (inhibit-point-motion-hooks t) mct never-mct gnus-warning) (save-restriction (narrow-to-region @@ -2461,10 +2484,9 @@ (message-set-work-buffer) (unless never-mct (insert (or reply-to from ""))) - (insert - (if (bolp) "" ", ") (or to "") - (if mct (concat (if (bolp) "" ", ") mct) "") - (if cc (concat (if (bolp) "" ", ") cc) "")) + (insert (if (bolp) "" ", ") (or to "")) + (insert (if mct (concat (if (bolp) "" ", ") mct) "")) + (insert (if cc (concat (if (bolp) "" ", ") cc) "")) ;; Remove addresses that match `rmail-dont-reply-to-names'. (insert (prog1 (rmail-dont-reply-to (buffer-string)) (erase-buffer))) @@ -2473,7 +2495,7 @@ (mapcar (lambda (addr) (cons (mail-strip-quoted-names addr) addr)) - (nreverse (mail-parse-comma-list)))) + (message-tokenize-header (buffer-string)))) (let ((s ccalist)) (while s (setq ccalist (delq (assoc (car (pop s)) s) ccalist))))) @@ -2484,7 +2506,9 @@ follow-to))))) (widen)) - (message-pop-to-buffer (message-buffer-name "reply" from)) + (message-pop-to-buffer (message-buffer-name + (if wide "wide reply" "reply") from + (if wide to-address nil))) (setq message-reply-headers (vector 0 subject from date message-id references 0 0 "")) @@ -2509,6 +2533,7 @@ (let ((cur (current-buffer)) from subject date reply-to mct references message-id follow-to + (inhibit-point-motion-hooks t) followup-to distribution newsgroups gnus-warning) (save-restriction (narrow-to-region @@ -2902,7 +2927,7 @@ (if (eq (following-char) (char-after (- (point) 2))) (delete-char -2)))))) -(fset 'message-exchange-point-and-mark 'exchange-point-and-mark) +(defalias 'message-exchange-point-and-mark 'exchange-point-and-mark) ;; Support for toolbar (when (string-match "XEmacs\\|Lucid" emacs-version) @@ -2959,7 +2984,7 @@ ;;; Help stuff. (defmacro message-y-or-n-p (question show &rest text) - "Ask QUESTION, displaying the rest of the arguments in a temporary buffer." + "Ask QUESTION, displaying the rest of the arguments in a temp. buffer if SHOW" `(message-talkative-question 'y-or-n-p ,question ,show ,@text)) (defun message-talkative-question (ask question show &rest text)
--- a/lisp/gnus/messagexmas.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/gnus/messagexmas.el Mon Aug 13 08:46:35 2007 +0200 @@ -25,6 +25,8 @@ ;;; Code: +(require 'nnheader) + (defvar message-xmas-dont-activate-region nil "If t, don't activate region after yanking.") @@ -48,26 +50,11 @@ (defun message-xmas-find-glyph-directory (&optional package) (setq package (or package "message")) - (let ((path load-path) - (dir (symbol-value - (intern-soft (concat package "-xmas-glyph-directory")))) - result) + (let ((dir (symbol-value + (intern-soft (concat package "-xmas-glyph-directory"))))) (if (and (stringp dir) (file-directory-p dir)) dir - ;; We try to find the dir by looking at the load path, - ;; stripping away the last component and adding "etc/". - (while path - (if (and (car path) - (file-exists-p - (setq dir (concat - (file-name-directory - (directory-file-name (car path))) - "etc/" (or package "message") "/"))) - (file-directory-p dir)) - (setq result dir - path nil) - (setq path (cdr path)))) - result))) + (nnheader-find-etc-directory package)))) (defun message-xmas-setup-toolbar (bar &optional force package) (let ((dir (message-xmas-find-glyph-directory package))
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/gnus/messcompat.el Mon Aug 13 08:46:35 2007 +0200 @@ -0,0 +1,88 @@ +;;; messcompat.el --- making message mode compatible with mail mode +;; Copyright (C) 1996 Free Software Foundation, Inc. + +;; Author: Lars Magne Ingebrigtsen <larsi@ifi.uio.no> +;; Keywords: mail, news + +;; 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. + +;;; Commentary: + +;; This file tries to provide backward compatability with sendmail.el +;; for Message mode. It should be used by simply adding +;; +;; (require 'messcompat) +;; +;; to the .emacs file. Loading it after Message mode has been +;; loaded will have no effect. + +;;; Code: + +(require 'sendmail) + +(defvar message-from-style mail-from-style + "*Specifies how \"From\" headers look. + +If `nil', they contain just the return address like: + king@grassland.com +If `parens', they look like: + king@grassland.com (Elvis Parsley) +If `angles', they look like: + Elvis Parsley <king@grassland.com> + +Otherwise, most addresses look like `angles', but they look like +`parens' if `angles' would need quoting and `parens' would not.") + +(defvar message-interactive mail-interactive + "Non-nil means when sending a message wait for and display errors. +nil means let mailer mail back a message to report errors.") + +(defvar message-setup-hook mail-setup-hook + "Normal hook, run each time a new outgoing message is initialized. +The function `message-setup' runs this hook.") + +(defvar message-mode-hook mail-mode-hook + "Hook run in message mode buffers.") + +(defvar message-indentation-spaces mail-indentation-spaces + "*Number of spaces to insert at the beginning of each cited line. +Used by `message-yank-original' via `message-yank-cite'.") + +(defvar message-cite-function (car mail-citation-hook) + "*Function for citing an original message.") + +(defvar message-signature mail-signature + "*String to be inserted at the end of the message buffer. +If t, the `message-signature-file' file will be inserted instead. +If a function, the result from the function will be used instead. +If a form, the result from the form will be used instead.") + +(defvar message-signature-file mail-signature-file + "*File containing the text inserted at end of message. buffer.") + +(defvar message-default-headers mail-default-headers + "*A string containing header lines to be inserted in outgoing messages. +It is inserted before you edit the message, so you can edit or delete +these lines.") + +(defvar message-send-hook mail-send-hook + "Hook run before sending messages.") + +(provide 'messcompat) + +;;; messcompat.el ends here
--- a/lisp/gnus/nnbabyl.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/gnus/nnbabyl.el Mon Aug 13 08:46:35 2007 +0200 @@ -538,7 +538,7 @@ (buffer-name nnbabyl-mbox-buffer) (save-excursion (set-buffer nnbabyl-mbox-buffer) - (= (buffer-size) (nth 7 (file-attributes nnbabyl-mbox-file))))) + (= (buffer-size) (nnheader-file-size nnbabyl-mbox-file)))) () ; This buffer hasn't changed since we read it last. Possibly. (save-excursion (let ((delim (concat "^" nnbabyl-mail-delimiter))
--- a/lisp/gnus/nndir.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/gnus/nndir.el Mon Aug 13 08:46:35 2007 +0200 @@ -63,6 +63,8 @@ server)) (unless (assq 'nndir-directory defs) (push `(nndir-directory ,server) defs)) + ;(when (equal server "") + ; (setq server (cadr (assq 'nndir-directory defs)))) (push `(nndir-current-group ,(file-name-nondirectory (directory-file-name nndir-directory))) defs)
--- a/lisp/gnus/nndoc.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/gnus/nndoc.el Mon Aug 13 08:46:35 2007 +0200 @@ -53,11 +53,8 @@ (article-begin . "^#! *rnews +\\([0-9]+\\) *\n") (body-end-function . nndoc-rnews-body-end)) (mbox - (article-begin . - ,(let ((delim (concat "^" message-unix-mail-delimiter))) - (if (string-match "\n\\'" delim) - (substring delim 0 (match-beginning 0)) - delim))) + (article-begin . "^From \\([^ \n]*\\(\\|\".*\"[^ \n]*\\)\\) ?\\([^ \n]*\\) *\\([^ ]*\\) *\\([0-9]*\\) *\\([0-9:]*\\) *\\([A-Z]?[A-Z]?[A-Z][A-Z]\\( DST\\)?\\|[-+]?[0-9][0-9][0-9][0-9]\\|\\) * [0-9][0-9]\\([0-9]*\\) *\\([A-Z]?[A-Z]?[A-Z][A-Z]\\( DST\\)?\\|[-+]?[0-9][0-9][0-9][0-9]\\|\\) *\\(remote from .*\\)?\n") + (article-begin-function . nndoc-mbox-article-begin) (body-end-function . nndoc-mbox-body-end)) (babyl (article-begin . "\^_\^L *\n") @@ -107,6 +104,7 @@ (defvoo nndoc-first-article nil) (defvoo nndoc-article-end nil) (defvoo nndoc-article-begin nil) +(defvoo nndoc-article-begin-function nil) (defvoo nndoc-head-begin nil) (defvoo nndoc-head-end nil) (defvoo nndoc-file-end nil) @@ -338,7 +336,7 @@ nndoc-body-begin nndoc-body-end-function nndoc-body-end nndoc-prepare-body nndoc-article-transform nndoc-generate-head nndoc-body-begin-function - nndoc-head-begin-function))) + nndoc-head-begin-function nndoc-article-begin-function))) (while vars (set (pop vars) nil))) (let* (defs guess) @@ -371,7 +369,9 @@ ;; Go through the file. (while (if (and first nndoc-first-article) (nndoc-search nndoc-first-article) - (nndoc-search nndoc-article-begin)) + (if nndoc-article-begin-function + (funcall nndoc-article-begin-function) + (nndoc-search nndoc-article-begin))) (setq first nil) (cond (nndoc-head-begin-function (funcall nndoc-head-begin-function)) @@ -391,7 +391,9 @@ (funcall nndoc-body-end-function)) (and nndoc-body-end (nndoc-search nndoc-body-end)) - (nndoc-search nndoc-article-begin) + (if nndoc-article-begin-function + (funcall nndoc-article-begin-function) + (nndoc-search nndoc-article-begin)) (progn (goto-char (point-max)) (when nndoc-file-end @@ -411,6 +413,10 @@ (and (re-search-forward nndoc-article-begin nil t) (goto-char (match-beginning 0)))) +(defun nndoc-mbox-article-begin () + (when (re-search-forward nndoc-article-begin nil t) + (goto-char (match-beginning 0)))) + (defun nndoc-mbox-body-end () (let ((beg (point)) len end)
--- a/lisp/gnus/nneething.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/gnus/nneething.el Mon Aug 13 08:46:35 2007 +0200 @@ -95,7 +95,7 @@ (when (and (file-exists-p file) (or (file-directory-p file) - (not (zerop (nth 7 (file-attributes file)))))) + (not (zerop (nnheader-file-size file))))) (insert (format "221 %d Article retrieved.\n" article)) (nneething-insert-head file) (insert ".\n"))
--- a/lisp/gnus/nnfolder.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/gnus/nnfolder.el Mon Aug 13 08:46:35 2007 +0200 @@ -550,7 +550,10 @@ (delim (concat "^" message-unix-mail-delimiter)) save-list group-art) (goto-char (point-min)) - ;; This might come from somewhere else. + ;; The From line may have been quoted by movemail. + (when (looking-at (concat ">" message-unix-mail-delimiter)) + (delete-char 1)) + ;; This might come from somewhere else. (unless (looking-at delim) (insert "From nobody " (current-time-string) "\n") (goto-char (point-min))) @@ -670,8 +673,9 @@ (let ((delim (concat "^" message-unix-mail-delimiter)) (marker (concat "\n" nnfolder-article-marker)) (number "[0-9]+") - (active (cadr (assoc nnfolder-current-group - nnfolder-group-alist))) + (active (or (cadr (assoc nnfolder-current-group + nnfolder-group-alist)) + (cons 1 0))) (scantime (assoc nnfolder-current-group nnfolder-scantime-alist)) (minid (lsh -1 -1)) maxid start end newscantime)
--- a/lisp/gnus/nnheader.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/gnus/nnheader.el Mon Aug 13 08:46:35 2007 +0200 @@ -570,6 +570,40 @@ (while (re-search-forward "\r$" nil t) (delete-backward-char 1)))) +(defun nnheader-file-size (file) + "Return the file size of FILE or 0." + (or (nth 7 (file-attributes file)) 0)) + +(defun nnheader-find-etc-directory (package) + "Go through the path and find the \".../etc/PACKAGE\" directory." + (let ((path load-path) + dir result) + ;; We try to find the dir by looking at the load path, + ;; stripping away the last component and adding "etc/". + (while path + (if (and (car path) + (file-exists-p + (setq dir (concat + (file-name-directory + (directory-file-name (car path))) + "etc/" package "/"))) + (file-directory-p dir)) + (setq result dir + path nil) + (setq path (cdr path)))) + result)) + +(defvar ange-ftp-path-format) +(defvar efs-path-regexp) +(defun nnheader-re-read-dir (path) + "Re-read directory PATH if PATH is on a remote system." + (if (and (fboundp 'efs-re-read-dir) (boundp 'efs-path-regexp)) + (when (string-match efs-path-regexp path) + (efs-re-read-dir path)) + (if (and (fboundp 'ange-ftp-re-read-dir) (boundp 'ange-ftp-path-format)) + (when (string-match (car ange-ftp-path-format) path) + (ange-ftp-re-read-dir path))))) + (fset 'nnheader-run-at-time 'run-at-time) (fset 'nnheader-cancel-timer 'cancel-timer) (fset 'nnheader-find-file-noselect 'find-file-noselect)
--- a/lisp/gnus/nnheaderems.el Mon Aug 13 08:45:53 2007 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,201 +0,0 @@ -;;; nnheaderems.el --- making Gnus backends work under different Emacsen -;; Copyright (C) 1996 Free Software Foundation, Inc. - -;; Author: Lars Magne Ingebrigtsen <larsi@ifi.uio.no> -;; Keywords: news - -;; 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. - -;;; Commentary: - -;;; Code: - -(defun nnheader-xmas-run-at-time (time repeat function &rest args) - (start-itimer - "nnheader-run-at-time" - `(lambda () - (,function ,@args)) - time repeat)) - -(defun nnheader-xmas-cancel-timer (timer) - (delete-itimer timer)) - -;; Written by Erik Naggum <erik@naggum.no>. -;; Saved by Steve Baur <steve@miranova.com>. -(defun nnheader-xmas-insert-file-contents-literally (filename &optional visit beg end replace) - "Like `insert-file-contents', q.v., but only reads in the file. -A buffer may be modified in several ways after reading into the buffer due -to advanced Emacs features, such as file-name-handlers, format decoding, -find-file-hooks, etc. - This function ensures that none of these modifications will take place." - (let ( ; (file-name-handler-alist nil) - (format-alist nil) - (after-insert-file-functions nil) - (find-buffer-file-type-function - (if (fboundp 'find-buffer-file-type) - (symbol-function 'find-buffer-file-type) - nil))) - (unwind-protect - (progn - (fset 'find-buffer-file-type (lambda (filename) t)) - (insert-file-contents filename visit beg end replace)) - (if find-buffer-file-type-function - (fset 'find-buffer-file-type find-buffer-file-type-function) - (fmakunbound 'find-buffer-file-type))))) - -(defun nnheader-xmas-find-file-noselect (filename &optional nowarn rawfile) - "Read file FILENAME into a buffer and return the buffer. -If a buffer exists visiting FILENAME, return that one, but -verify that the file has not changed since visited or saved. -The buffer is not selected, just returned to the caller." - (setq filename - (abbreviate-file-name - (expand-file-name filename))) - (if (file-directory-p filename) - (if find-file-run-dired - (dired-noselect filename) - (error "%s is a directory." filename)) - (let* ((buf (get-file-buffer filename)) - (truename (abbreviate-file-name (file-truename filename))) - (number (nthcdr 10 (file-attributes truename))) - ;; Find any buffer for a file which has same truename. - (other (and (not buf) - (if (fboundp 'find-buffer-visiting) - (find-buffer-visiting filename) - (get-file-buffer filename)))) - error) - ;; Let user know if there is a buffer with the same truename. - (if other - (progn - (or nowarn - (string-equal filename (buffer-file-name other)) - (message "%s and %s are the same file" - filename (buffer-file-name other))) - ;; Optionally also find that buffer. - (if (or (and (boundp 'find-file-existing-other-name) - find-file-existing-other-name) - find-file-visit-truename) - (setq buf other)))) - (if buf - (or nowarn - (verify-visited-file-modtime buf) - (cond ((not (file-exists-p filename)) - (error "File %s no longer exists!" filename)) - ((yes-or-no-p - (if (string= (file-name-nondirectory filename) - (buffer-name buf)) - (format - (if (buffer-modified-p buf) - "File %s changed on disk. Discard your edits? " - "File %s changed on disk. Reread from disk? ") - (file-name-nondirectory filename)) - (format - (if (buffer-modified-p buf) - "File %s changed on disk. Discard your edits in %s? " - "File %s changed on disk. Reread from disk into %s? ") - (file-name-nondirectory filename) - (buffer-name buf)))) - (save-excursion - (set-buffer buf) - (revert-buffer t t))))) - (save-excursion -;;; The truename stuff makes this obsolete. -;;; (let* ((link-name (car (file-attributes filename))) -;;; (linked-buf (and (stringp link-name) -;;; (get-file-buffer link-name)))) -;;; (if (bufferp linked-buf) -;;; (message "Symbolic link to file in buffer %s" -;;; (buffer-name linked-buf)))) - (setq buf (create-file-buffer filename)) - ;; (set-buffer-major-mode buf) - (set-buffer buf) - (erase-buffer) - (if rawfile - (condition-case () - (nnheader-insert-file-contents-literally filename t) - (file-error - ;; Unconditionally set error - (setq error t))) - (condition-case () - (insert-file-contents filename t) - (file-error - ;; Run find-file-not-found-hooks until one returns non-nil. - (or t ; (run-hook-with-args-until-success 'find-file-not-found-hooks) - ;; If they fail too, set error. - (setq error t))))) - ;; Find the file's truename, and maybe use that as visited name. - (setq buffer-file-truename truename) - (setq buffer-file-number number) - ;; On VMS, we may want to remember which directory in a search list - ;; the file was found in. - (and (eq system-type 'vax-vms) - (let (logical) - (if (string-match ":" (file-name-directory filename)) - (setq logical (substring (file-name-directory filename) - 0 (match-beginning 0)))) - (not (member logical find-file-not-true-dirname-list))) - (setq buffer-file-name buffer-file-truename)) - (if find-file-visit-truename - (setq buffer-file-name - (setq filename - (expand-file-name buffer-file-truename)))) - ;; Set buffer's default directory to that of the file. - (setq default-directory (file-name-directory filename)) - ;; Turn off backup files for certain file names. Since - ;; this is a permanent local, the major mode won't eliminate it. - (and (not (funcall backup-enable-predicate buffer-file-name)) - (progn - (make-local-variable 'backup-inhibited) - (setq backup-inhibited t))) - (if rawfile - nil - (after-find-file error (not nowarn))))) - buf))) - -(defun nnheader-ms-strip-cr () - "Strip ^M from the end of all lines." - (save-excursion - (goto-char (point-min)) - (while (re-search-forward "\r$" nil t) - (delete-backward-char 1)))) - -(eval-and-compile - (cond - ;; Do XEmacs function bindings. - ((string-match "XEmacs\\|Lucid" emacs-version) - (fset 'nnheader-run-at-time 'nnheader-xmas-run-at-time) - (fset 'nnheader-cancel-timer 'nnheader-xmas-cancel-timer) - (fset 'nnheader-find-file-noselect 'nnheader-xmas-find-file-noselect) - (fset 'nnheader-insert-file-contents-literally - (if (fboundp 'insert-file-contents-literally) - 'insert-file-contents-literally - 'nnheader-xmas-insert-file-contents-literally))) - ;; Do Emacs function bindings. - (t - (fset 'nnheader-run-at-time 'run-at-time) - (fset 'nnheader-cancel-timer 'cancel-timer) - (fset 'nnheader-find-file-noselect 'find-file-noselect) - (fset 'nnheader-insert-file-contents-literally - 'insert-file-contents-literally) - )) - (when (memq system-type '(windows-nt)) - (add-hook 'nnmail-prepare-incoming-hook 'nnheader-ms-strip-cr))) - -(provide 'nnheaderems) - -;;; nnheaderems.el ends here.
--- a/lisp/gnus/nnmail.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/gnus/nnmail.el Mon Aug 13 08:46:35 2007 +0200 @@ -238,7 +238,7 @@ \"misc.misc\"))") (defvar nnmail-split-abbrev-alist - '((any . "from\\|to\\|cc\\|sender\\|apparently-to") + '((any . "from\\|to\\|cc\\|sender\\|apparently-to\\|resent-from\\|resent-to\\|resent-cc") (mail . "mailer-daemon\\|postmaster")) "*Alist of abbreviations allowed in `nnmail-split-fancy'.") @@ -269,9 +269,14 @@ (defvar nnmail-pop-password nil "*Password to use when reading mail from a POP server, if required.") -(defvar nnmail-split-fancy-syntax-table - (copy-syntax-table (standard-syntax-table)) +(defvar nnmail-split-fancy-syntax-table nil "Syntax table used by `nnmail-split-fancy'.") +(unless (syntax-table-p nnmail-split-fancy-syntax-table) + (setq nnmail-split-fancy-syntax-table + (copy-syntax-table (standard-syntax-table))) + ;; support the %-hack + (modify-syntax-entry ?\% "." nnmail-split-fancy-syntax-table)) + (defvar nnmail-prepare-save-mail-hook nil "Hook called before saving mail.") @@ -353,10 +358,8 @@ ;; Function rewritten from rmail.el. (defun nnmail-move-inbox (inbox) "Move INBOX to `nnmail-crash-box'." - (let ((inbox (file-truename - (expand-file-name (substitute-in-file-name inbox)))) - (tofile (file-truename (expand-file-name - (substitute-in-file-name nnmail-crash-box)))) + (let ((inbox (file-truename (expand-file-name inbox))) + (tofile (file-truename (expand-file-name nnmail-crash-box))) movemail popmail errors password) ;; If getting from mail spool directory, ;; use movemail to move rather than just renaming, @@ -382,9 +385,9 @@ (substring inbox (+ popmail 3)))))) (message "Getting mail from post office ...")) (when (or (and (file-exists-p tofile) - (/= 0 (nth 7 (file-attributes tofile)))) + (/= 0 (nnheader-file-size tofile))) (and (file-exists-p inbox) - (/= 0 (nth 7 (file-attributes inbox))))) + (/= 0 (nnheader-file-size inbox)))) (message "Getting mail from %s..." inbox))) ;; Set TOFILE if have not already done so, and ;; rename or copy the file INBOX to TOFILE if and as appropriate. @@ -437,11 +440,7 @@ (goto-char (point-min)) (if (looking-at "movemail: ") (delete-region (point-min) (match-end 0))) - (beep t) - (message (concat "movemail: " - (buffer-substring (point-min) - (point-max)))) - (sit-for 3) + (error (concat "movemail: " (buffer-string))) (setq tofile nil)))))) (and errors (buffer-name errors) @@ -923,8 +922,8 @@ nnmail-procmail-suffix "$") t))) (p procmails) (crash (when (and (file-exists-p nnmail-crash-box) - (> (nth 7 (file-attributes - (file-truename nnmail-crash-box))) 0)) + (> (nnheader-file-size + (file-truename nnmail-crash-box)) 0)) (list nnmail-crash-box)))) ;; Remove any directories that inadvertantly match the procmail ;; suffix, which might happen if the suffix is "". @@ -937,8 +936,12 @@ crash (cond ((and group (or (eq nnmail-spool-file 'procmail) - nnmail-use-procmail)) + nnmail-use-procmail) + procmails) procmails) + ((and group + (eq nnmail-spool-file 'procmail)) + nil) ((listp nnmail-spool-file) (append nnmail-spool-file procmails)) ((stringp nnmail-spool-file) @@ -1107,7 +1110,7 @@ ;; existance of POPped mail. (when (or (string-match "^po:" spool) (and (file-exists-p spool) - (> (nth 7 (file-attributes (file-truename spool))) 0))) + (> (nnheader-file-size (file-truename spool)) 0))) (nnheader-message 3 "%s: Reading incoming mail..." method) (when (and (nnmail-move-inbox spool) (file-exists-p nnmail-crash-box))
--- a/lisp/gnus/nnmbox.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/gnus/nnmbox.el Mon Aug 13 08:46:35 2007 +0200 @@ -286,6 +286,9 @@ (let ((buf (current-buffer)) result) (goto-char (point-min)) + ;; The From line may have been quoted by movemail. + (when (looking-at (concat ">" message-unix-mail-delimiter)) + (delete-char 1)) (if (looking-at "X-From-Line: ") (replace-match "From ") (insert "From nobody " (current-time-string) "\n")) @@ -484,7 +487,7 @@ (buffer-name nnmbox-mbox-buffer) (save-excursion (set-buffer nnmbox-mbox-buffer) - (= (buffer-size) (nth 7 (file-attributes nnmbox-mbox-file))))) + (= (buffer-size) (nnheader-file-size nnmbox-mbox-file)))) () (save-excursion (let ((delim (concat "^" message-unix-mail-delimiter))
--- a/lisp/gnus/nnmh.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/gnus/nnmh.el Mon Aug 13 08:46:35 2007 +0200 @@ -157,6 +157,8 @@ (nnheader-report 'nnmh "Selected group %s" group) t) (t + ;; Re-scan the directory if it's on a foreign system. + (nnheader-re-read-dir pathname) (setq dir (sort (mapcar (lambda (name) (string-to-int name))
--- a/lisp/gnus/nnspool.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/gnus/nnspool.el Mon Aug 13 08:46:35 2007 +0200 @@ -465,7 +465,7 @@ (buffer-disable-undo (current-buffer)) (erase-buffer) (condition-case () - (call-process "grep" nil t nil id nnspool-history-file) + (call-process "grep" nil t nil (regexp-quote id) nnspool-history-file) (error nil)) (goto-char (point-min)) (prog1
--- a/lisp/gnus/nntp.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/gnus/nntp.el Mon Aug 13 08:46:35 2007 +0200 @@ -92,13 +92,25 @@ NNTP server available there (see nntp-rlogin-parameters).") (defvoo nntp-rlogin-parameters '("telnet" "${NNTPSERVER:=localhost}" "nntp") - "*Parameters to `nntp-open-login'. + "*Parameters to `nntp-open-rlogin'. That function may be used as `nntp-open-server-function'. In that case, this list will be used as the parameter list given to rsh.") (defvoo nntp-rlogin-user-name nil "*User name on remote system when using the rlogin connect method.") +(defvoo nntp-telnet-parameters '("exec" "telnet" "-8" "${NNTPSERVER:=localhost}" "nntp") + "*Parameters to `nntp-open-telnet'. +That function may be used as `nntp-open-server-function'. In that +case, this list will be executed as a command after logging in +via telnet.") + +(defvoo nntp-telnet-user-name nil + "User name to log in via telnet with.") + +(defvoo nntp-telnet-passwd nil + "Password to use to log in via telnet with.") + (defvoo nntp-address nil "*The name of the NNTP server.") @@ -108,7 +120,7 @@ (defvoo nntp-end-of-line "\r\n" "String to use on the end of lines when talking to the NNTP server. This is \"\\r\\n\" by default, but should be \"\\n\" when -using rlogin to communicate with the server.") +using rlogin or telnet to communicate with the server.") (defvoo nntp-large-newsgroup 50 "*The number of the articles which indicates a large newsgroup. @@ -339,6 +351,7 @@ "Open the virtual server SERVER. If CONNECTIONLESS is non-nil, don't attempt to connect to any physical servers." + (nnheader-init-server-buffer) ;; Called with just a port number as the defs. (when (or (stringp (car defs)) (numberp (car defs))) @@ -397,7 +410,8 @@ (buffer-name proc) (kill-buffer proc)))) (nnoo-close-server 'nntp) - (setq nntp-async-group-alist nil))) + (setq nntp-async-group-alist nil + nntp-async-articles nil))) (deffoo nntp-server-opened (&optional server) "Say whether a connection to SERVER has been opened." @@ -720,14 +734,21 @@ (save-excursion ;; Replace `.' at beginning of line with `..'. (goto-char (point-min)) - (while (search-forward "\n." nil t) + (while (re-search-forward "^\\." nil t) (insert ".")) (goto-char (point-max)) ;; Insert newline at end of buffer. (or (bolp) (insert "\n")) + ;(goto-char (point-min)) + ;(while (not (eobp)) + ; (end-of-line) + ; (insert "\r") + ; (forward-line 1)) ;; Insert `.' at end of buffer (end of text mark). + (goto-char (point-max)) (insert "." nntp-end-of-line))) + ;;; ;;; Synchronous Communication with NNTP servers. @@ -961,7 +982,7 @@ ;; order to avoid deadlocks. (when (or (null articles) ;All requests have been sent. (zerop (% count nntp-maximum-request))) - (accept-process-output) + (accept-process-output nntp-server-process 1) ;; On some Emacs versions the preceding function has ;; a tendency to change the buffer. Perhaps. It's ;; quite difficult to reproduce, because it only @@ -974,7 +995,7 @@ (setq received (1+ received))) (setq last-point (point)) (< received count)) - (accept-process-output) + (accept-process-output nntp-server-process) (set-buffer buf))))) (when nntp-server-xover @@ -1038,7 +1059,7 @@ ;; We open the nntp server if it is down. (or (nntp-server-opened (nnoo-current-server 'nntp)) (nntp-open-server (nnoo-current-server 'nntp)) - (error (nntp-status-message))) + (error "Couldn't open server: " (nntp-status-message))) ;; Send the strings. (process-send-string nntp-server-process cmd) t)) @@ -1069,7 +1090,7 @@ (defun nntp-open-server-semi-internal (server &optional service) "Open SERVER. If SERVER is nil, use value of environment variable `NNTPSERVER'. -If SERVICE, this this as the port number." +If SERVICE, use this as the port number." (nnheader-insert "") (let ((server (or server (getenv "NNTPSERVER"))) (status nil) @@ -1087,7 +1108,8 @@ (condition-case nil (nntp-wait-for-response "^[23].*\r?\n" 'slow) (error nil) - (quit nil))) + ;(quit nil) + )) (unless status (nntp-close-server-internal server) (nnheader-report @@ -1104,8 +1126,7 @@ ((null server) (nnheader-report 'nntp "NNTP server is not specified.")) (t ; We couldn't open the server. - (nnheader-report - 'nntp (buffer-substring (point-min) (point-max))))) + (nnheader-report 'nntp (buffer-string)))) (when timer (nnheader-cancel-timer timer)) (message "") @@ -1173,10 +1194,11 @@ "nntpd" nntp-server-buffer server nntp-port-number)) (defun nntp-open-rlogin (server) + "Open a connection to SERVER using rsh." (let ((proc (if nntp-rlogin-user-name (start-process "nntpd" nntp-server-buffer "rsh" - "-l" nntp-rlogin-user-name server + server "-l" nntp-rlogin-user-name (mapconcat 'identity nntp-rlogin-parameters " ")) (start-process @@ -1185,23 +1207,54 @@ nntp-rlogin-parameters " "))))) proc)) -(defun nntp-telnet-to-machine () - (let (b) - (telnet "localhost") +(defun nntp-wait-for-string (regexp) + "Wait until string arrives in the buffer." + (let ((buf (current-buffer))) (goto-char (point-min)) - (while (not (re-search-forward "^login: *" nil t)) - (sit-for 1) - (goto-char (point-min))) - (goto-char (point-max)) - (insert "larsi") - (telnet-send-input) - (setq b (point)) - (while (not (re-search-forward ">" nil t)) - (sit-for 1) - (goto-char b)) - (goto-char (point-max)) - (insert "ls") - (telnet-send-input))) + (while (not (re-search-forward regexp nil t)) + (accept-process-output nntp-server-process) + (set-buffer buf) + (goto-char (point-min))))) + +(defun nntp-open-telnet (server) + (save-excursion + (set-buffer nntp-server-buffer) + (erase-buffer) + (let ((proc (start-process + "nntpd" nntp-server-buffer "telnet" "-8")) + (case-fold-search t)) + (when (memq (process-status proc) '(open run)) + (process-send-string proc "set escape \^X\n") + (process-send-string proc (concat "open " server "\n")) + (nntp-wait-for-string "^\r*.?login:") + (process-send-string + proc (concat + (or nntp-telnet-user-name + (setq nntp-telnet-user-name (read-string "login: "))) + "\n")) + (nntp-wait-for-string "^\r*.?password:") + (process-send-string + proc (concat + (or nntp-telnet-passwd + (setq nntp-telnet-passwd + (nnmail-read-passwd "Password: "))) + "\n")) + (erase-buffer) + (nntp-wait-for-string "bash\\|\$ *\r?$\\|> *\r?") + (process-send-string + proc (concat (mapconcat 'identity nntp-telnet-parameters " ") "\n")) + (nntp-wait-for-string "^\r*200") + (beginning-of-line) + (delete-region (point-min) (point)) + (process-send-string proc "\^]") + (nntp-wait-for-string "^telnet") + (process-send-string proc "mode character\n") + (accept-process-output proc 1) + (sit-for 1) + (goto-char (point-min)) + (forward-line 1) + (delete-region (point) (point-max))) + proc))) (defun nntp-close-server-internal (&optional server) "Close connection to news server." @@ -1209,7 +1262,8 @@ (if nntp-server-process (delete-process nntp-server-process)) (setq nntp-server-process nil) - (setq nntp-address "")) + ;(setq nntp-address "") + ) (defun nntp-accept-response () "Read response of server.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/gnus/score-mode.el Mon Aug 13 08:46:35 2007 +0200 @@ -0,0 +1,110 @@ +;;; score-mode.el --- mode for editing Gnus score files +;; Copyright (C) 1996 Free Software Foundation, Inc. + +;; Author: Lars Magne Ingebrigtsen <larsi@ifi.uio.no> +;; Keywords: news, mail + +;; 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. + +;;; Commentary: + +;;; Code: + +(require 'easymenu) +(require 'timezone) +(eval-when-compile (require 'cl)) + +(defvar gnus-score-mode-hook nil + "*Hook run in score mode buffers.") + +(defvar gnus-score-menu-hook nil + "*Hook run after creating the score mode menu.") + +(defvar gnus-score-edit-exit-function nil + "Function run on exit from the score buffer.") + +(defvar gnus-score-mode-map nil) +(unless gnus-score-mode-map + (setq gnus-score-mode-map (copy-keymap emacs-lisp-mode-map)) + (define-key gnus-score-mode-map "\C-c\C-c" 'gnus-score-edit-exit) + (define-key gnus-score-mode-map "\C-c\C-d" 'gnus-score-edit-insert-date) + (define-key gnus-score-mode-map "\C-c\C-p" 'gnus-score-pretty-print)) + +;;;###autoload +(defun gnus-score-mode () + "Mode for editing Gnus score files. +This mode is an extended emacs-lisp mode. + +\\{gnus-score-mode-map}" + (interactive) + (kill-all-local-variables) + (use-local-map gnus-score-mode-map) + (when menu-bar-mode + (gnus-score-make-menu-bar)) + (set-syntax-table emacs-lisp-mode-syntax-table) + (setq major-mode 'gnus-score-mode) + (setq mode-name "Score") + (lisp-mode-variables nil) + (make-local-variable 'gnus-score-edit-exit-function) + (run-hooks 'emacs-lisp-mode-hook 'gnus-score-mode-hook)) + +(defun gnus-score-make-menu-bar () + (unless (boundp 'gnus-score-menu) + (easy-menu-define + gnus-score-menu gnus-score-mode-map "" + '("Score" + ["Exit" gnus-score-edit-exit t] + ["Insert date" gnus-score-edit-insert-date t] + ["Format" gnus-score-pretty-print t])) + (run-hooks 'gnus-score-menu-hook))) + +(defun gnus-score-edit-insert-date () + "Insert date in numerical format." + (interactive) + (princ (gnus-score-day-number (current-time)) (current-buffer))) + +(defun gnus-score-pretty-print () + "Format the current score file." + (interactive) + (goto-char (point-min)) + (let ((form (read (current-buffer)))) + (erase-buffer) + (pp form (current-buffer))) + (goto-char (point-min))) + +(defun gnus-score-edit-exit () + "Stop editing the score file." + (interactive) + (unless (file-exists-p (file-name-directory (buffer-file-name))) + (make-directory (file-name-directory (buffer-file-name)) t)) + (save-buffer) + (bury-buffer (current-buffer)) + (let ((buf (current-buffer))) + (when gnus-score-edit-exit-function + (funcall gnus-score-edit-exit-function)) + (when (eq buf (current-buffer)) + (switch-to-buffer (other-buffer (current-buffer)))))) + +(defun gnus-score-day-number (time) + (let ((dat (decode-time time))) + (timezone-absolute-from-gregorian + (nth 4 dat) (nth 3 dat) (nth 5 dat)))) + +(provide 'score-mode) + +;;; score-mode.el ends here
--- a/lisp/gnus/smiley.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/gnus/smiley.el Mon Aug 13 08:46:35 2007 +0200 @@ -33,25 +33,59 @@ ;; (require 'smiley) ;; (add-hook 'gnus-article-display-hook 'gnus-smiley-display t) +;; The smilies were drawn by Joe Reiss <joe@jreiss.async.vt.edu>. + (require 'annotations) +(require 'messagexmas) (eval-when-compile (require 'cl)) (defvar smiley-data-directory (message-xmas-find-glyph-directory "smilies") "Location of the smiley faces files.") -(defvar smiley-regexp-alist - '(("\\s-\\(:-*\\]\\)" 1 "FaceGrinning.xpm") - ("\\s-\\(:-*[oO]\\)" 1 "FaceStartled.xpm") - ("\\s-\\(:-*[)>]\\)" 1 "FaceHappy.xpm") - ("\\s-\\(;-*[>)]\\)" 1 "FaceWinking.xpm") - ("\\s-\\(:-[/\\]\\)" 1 "FaceIronic.xpm") - ("\\s-\\(:-*|\\)" 1 "FaceStraight.xpm") - ("\\s-\\(:-*<\\)" 1 "FaceAngry.xpm") - ("\\s-\\(:-*d\\)" 1 "FaceTasty.xpm") - ("\\s-\\(:-*[pP]\\)" 1 "FaceYukky.xpm") - ("\\s-\\(8-*|\\)" 1 "FaceKOed.xpm") - ("\\s-\\(:-*(\\)" 1 "FaceAngry.xpm")) - "A list of regexps to map smilies to real images.") +;; Notice the subtle differences in the regular expessions in the two alists below + +(defvar smiley-deformed-regexp-alist + '(("\\(:-*[<«]+\\)\\W" 1 "FaceAngry.xpm") + ("\\(:-+\\]+\\)\\W" 1 "FaceGoofy.xpm") + ("\\(:-*D\\)\\W" 1 "FaceGrinning.xpm") + ("\\(:-*[)>}»]+\\)\\W" 1 "FaceHappy.xpm") + ("\\(:-*[/\\\"]\\)[^/]" 1 "FaceIronic.xpm") + ("\\([8|]-*[|Oo%]\\)\\W" 1 "FaceKOed.xpm") + ("\\([:|]-*#+\\)\\W" 1 "FaceNyah.xpm") + ("\\(:-*[({]+\\)\\W" 1 "FaceSad.xpm") + ("\\(:-*[Oo\*]\\)\\W" 1 "FaceStartled.xpm") + ("\\(:-*|\\)\\W" 1 "FaceStraight.xpm") + ("\\(:-*p\\)\\W" 1 "FaceTalking.xpm") + ("\\(:-*d\\)\\W" 1 "FaceTasty.xpm") + ("\\(;-*[>)}»]+\\)\\W" 1 "FaceWinking.xpm") + ("\\(:-*[Vvµ]\\)\\W" 1 "FaceWry.xpm") + ("\\([:|]-*P\\)\\W" 1 "FaceYukky.xpm")) + "Normal and deformed faces for smilies.") + +(defvar smiley-nosey-regexp-alist + '(("\\(:-+[<«]+\\)\\W" 1 "FaceAngry.xpm") + ("\\(:-+\\]+\\)\\W" 1 "FaceGoofy.xpm") + ("\\(:-+D\\)\\W" 1 "FaceGrinning.xpm") + ("\\(:-+[}»]+\\)\\W" 1 "FaceHappy.xpm") + ("\\(:-*)+\\)\\W" 1 "FaceHappy.xpm") ;; The exception that confirms the rule + ("\\(:-+[/\\\"]+\\)\\W" 1 "FaceIronic.xpm") + ("\\([8|]-+[|Oo%]\\)\\W" 1 "FaceKOed.xpm") + ("\\([:|]-+#+\\)\\W" 1 "FaceNyah.xpm") + ("\\(:-+[({]+\\)\\W" 1 "FaceSad.xpm") + ("\\(:-+[Oo\*]\\)\\W" 1 "FaceStartled.xpm") + ("\\(:-+|\\)\\W" 1 "FaceStraight.xpm") + ("\\(:-+p\\)\\W" 1 "FaceTalking.xpm") + ("\\(:-+d\\)\\W" 1 "FaceTasty.xpm") + ("\\(;-+[>)}»]+\\)\\W" 1 "FaceWinking.xpm") + ("\\(:-+[Vvµ]\\)\\W" 1 "FaceWry.xpm") + ("\\([:|]-+P\\)\\W" 1 "FaceYukky.xpm")) + "Smileys with noses. These get less false matches.") + +(defvar smiley-regexp-alist smiley-deformed-regexp-alist + "A list of regexps to map smilies to real images. +Defaults to the content of smiley-deformed-regexp-alist. +An alternative smiley-nose-regexp-alist that +matches less aggresively is available.") (defvar smiley-flesh-color "yellow" "Flesh color.") @@ -63,7 +97,7 @@ "Tongue color.") (defvar smiley-circle-color "black" - "Tongue color.") + "Circle color.") (defvar smiley-glyph-cache nil) (defvar smiley-running-xemacs (string-match "XEmacs" emacs-version)) @@ -87,43 +121,45 @@ (set-glyph-face glyph 'default) glyph)))) -;;;###interactive +;;;###autoload (defun smiley-region (beg end) "Smilify the region between point and mark." (interactive "r") (smiley-buffer (current-buffer) beg end)) -;;;###interactive +;;;###autoload (defun smiley-buffer (&optional buffer st nd) (interactive) - (save-excursion - (and buffer (set-buffer buffer)) - (let ((buffer-read-only nil) - (alist smiley-regexp-alist) - entry regexp beg group file) - (goto-char (or st (point-min))) - (setq beg (point)) - ;; loop through alist - (while (setq entry (pop alist)) - (setq regexp (car entry) - group (cadr entry) - file (caddr entry)) - (goto-char beg) - (while (re-search-forward regexp nd t) - (let* ((start (match-beginning group)) - (end (match-end group)) - (glyph (smiley-create-glyph (buffer-substring start end) - file))) - (when glyph - (mapcar 'delete-annotation (annotations-at end)) - (let ((ext (make-extent start end))) - (set-extent-property ext 'invisible t) - (set-extent-property ext 'end-open t) - (set-extent-property ext 'intangible t)) - (make-annotation glyph end 'text) - (when (smiley-end-paren-p start end) - (make-annotation ")" end 'text)) - (goto-char end)))))))) + (when (featurep 'x) + (save-excursion + (when buffer + (set-buffer buffer)) + (let ((buffer-read-only nil) + (alist smiley-regexp-alist) + entry regexp beg group file) + (goto-char (or st (point-min))) + (setq beg (point)) + ;; loop through alist + (while (setq entry (pop alist)) + (setq regexp (car entry) + group (cadr entry) + file (caddr entry)) + (goto-char beg) + (while (re-search-forward regexp nd t) + (let* ((start (match-beginning group)) + (end (match-end group)) + (glyph (smiley-create-glyph (buffer-substring start end) + file))) + (when glyph + (mapcar 'delete-annotation (annotations-at end)) + (let ((ext (make-extent start end))) + (set-extent-property ext 'invisible t) + (set-extent-property ext 'end-open t) + (set-extent-property ext 'intangible t)) + (make-annotation glyph end 'text) + (when (smiley-end-paren-p start end) + (make-annotation ")" end 'text)) + (goto-char end))))))))) (defun smiley-end-paren-p (start end) "Try to guess whether the current smiley is an end-paren smiley."
--- a/lisp/hm--html-menus/ANNOUNCEMENT Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/hm--html-menus/ANNOUNCEMENT Mon Aug 13 08:46:35 2007 +0200 @@ -1,34 +1,38 @@ Hello, -I've written a new version (4.16) of my html package for the XEmacs -(lemacs) and the GNU Emacs 19. It is based on the html-mode from Marc -Andreessen. +I've written a new version (5.0) of my html package for the XEmacs +and the GNU Emacs 19. The name of the package is: + + hm--html-menus-5.0.tar.gz With this package it is very easy to write html pages for the World Wide Web (WWW). Eg: In most cases the user gets help to construct a specific link by examples or by a completition list with possible input strings. - -Read the NEWS file to see what's new in this release.. +It is also possible to insert links and images by just clicking on its +source and destination (drag and drop feature). -The name of the package is - hm--html-menus-4.16.tar.gz +The biggest new features in this release are: +- drag and drop functions to insert links with the mouse +- a minor mode to extent other html modes like the psgml mode +- some new html tags, like the <applet> tags +- fixed some old html tags +- the pulldown menu in the Emacs 19 is no longer a global menu +- the popup menus in the Emacs 19 are now much fastere +- the name of the mode has changed from html-mode to hm--html-mode +- the package is longer based on the package of Marc Andreessen +Read the NEWS file to see news in detail... -You should find it on the following ftp server: - info.cern.ch in /pub/www/contrib +You should find hm--html-menus-5.0.tar.gz on the following ftp server: sunsite.unc.edu in /pub/Linux/apps/editors/emacs/ ftp.rrzn.uni-hannover.de in /pub/unix/editors/lemacs/contrib ftp.tnt.uni-hannover.de in /pub/editors/xemacs/contrib -It make take some time, before the package is copied by the ftp admins +It may take some time, before the package is copied by the ftp admins from the incoming directories to the above listed directories. There is also a html documentation about the package. You can find it on: http://www.tnt.uni-hannover.de:80/data/info/www/tnt/soft/info/www/html-editors/hm--html-menus/overview.html -At the moment it describes the version (4.15), but it will be updated in the -near future. - - The package provides functions to insert the following stuff in html-pages: 1. Anchors: html link, info link, gopher link, file link; @@ -51,15 +55,12 @@ without links, with links, blockquote, listing, abstract; 5. formatting: bold, italic, underline, typewriter, strikethru, super and subscript, - emphasized, strong, - definition, keyboard, command, argument, option, variable, instance, - code, sample, - quote, acronym, abbrevation, citation, literature, publication, isbn, - person, author, editor, credits, copyright, - footnote, margin, + emphasized, strong, big, + definition, keyboard, variable, code, sample, citation, html comment; 6. include: - top aligned image, middle aligned image, bottom aligned image; + top aligned image, middle aligned image, bottom aligned image, + applet, parameter 7. forms: form; text, password, isindex, integer, float, date, url, scribble fields; @@ -73,8 +74,8 @@ I've used the same menu items and the same keystrokes. Therefore, you don't need to learn different menus or keys for similar functions. -You can choose the popup menus between an expert menu, an novice menu and -the menu from Marc Andreessen interactively. +You can choose the popup menus between an expert menu and an novice +menu interactively. With the pulldown menu, you can do the following things: - select the pulldown menu @@ -88,6 +89,25 @@ - preview html documents with the xmosaic - preview html documents with the w3 package for the lemacs and emacs +You can insert links and images by clicking with Meta Button1 on its +source and then on its destination. For this drag and drop interface +the following destinations and links are supported: +- the inclusion of an GIF- or JPEG- image by clicking on its name + in a dired buffer +- a file or relative link to any other file by clicking on its name + in a dired buffer +- a file or relative link to a directory by clicking on a line without + a filename in the dired buffer +- a file or relative link to a file by clicking in a buffer with this + file +- a http or relative link to a html page by clicking in the w3 buffer, + which displays this page +- a http or relative link, which is in another html page by clicking + on the link in a w3 buffer +If there is an activated region in the source buffer, then the link +is inserted around it, so that the region is used as the name of the +link. + You can configure the html mode with a special configuration file for your site and with another file specific for a user.
--- a/lisp/hm--html-menus/NEWS Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/hm--html-menus/NEWS Mon Aug 13 08:46:35 2007 +0200 @@ -1,3 +1,102 @@ +15.08.96: + The items of the menu "Set popup menu" are now radio items. + -- BUILDED the version 5.0 of the package +03.08.96: + Applied a patch from Jerry G. DeLapp <jgd@lanl.gov> to + `html-font-lock-keywords'. + Added the param tag for the applet element. + Added the functions `hm--html-add-relative-link' and + `hm--html-add-relative-link-to-region', which have better + support for relative links than the functions for inserting + general links. + Added functions to insert the center element. + Added functions to insert the small and big elements. +31.07.96: + Added the applet element. + The tags for menu items and description entries and titles + are now inserted with a start and a end tag. + Fixed some keybinding bugs. + Added the function 'hm--html-indent-region'. At the moment + the indentation works only in the minor mode and if the major + mode provides an indentation function, like it is in the psgml + mode. +20.07.96: + Fixed bugs in the popup and pulldown menu handling in the Emacs 19. + Speeded up the first popup of some of the menus in the Emacs 19. + The keybinding for the popup menu in the Emacs 19 has changed to + C-down-mouse-3. The variables + `hm--html-emacs19-popup-noregion-menu-button' and + `hm--html-emacs19-popup-region-menu-button' should be used in the Emacs + 19 to change the keybindings. They are defined in hm--html-keys.el. + Fixed a bug in the font-lock stuff for the Emacs 19. + The popup menus of the minor mode worked now also in the Emacs 19. + The pulldown menu of the minor mode worked now also in the Emacs 19. + The name of the pulldown menu can now be changed with the variable + `hm--html-mode-pulldown-menu-name'. + All settings in hm--configuration.el are now made with `defvar'. + So it's easier now to overwrite this values in other files. + All old lisp stuff deleted. + Added Keybindings for the commands in the include and the forms + submenu. + Fixed a bug in the command `hm--html-smart-less-than'. +19.07.96: + Changed the functions hm--popup-html* to hm--html-popup*. + The Emacs 19 popup menus are now realized as direct bindings of + the menu maps to the mouse button. This fixed a bug. +18.07.96: + The popup menus in the Emacs 19 are now much faster, because + the keymaps are only computed once from the XEmacs menu + description instead of each time. + Fixed a bug in the keybinding stuff for the Emacs 19. +16.07.96: + Added the function `hm--html-smart-ampersand'. + Added the minor modes `hm--html-minor-mode' and + `hm--html-minor-region-mode'. They should provide + the menus and commands of this package for the + psgml-html-mode. + The prefix key of the minor and of the major modes + could now be changed with `hm--html-minor-mode-prefix-key' + and `hm--html-mode-prefix-key'. +14.07.96: + Ported the internal drag and drop interface for the Emacs 19. + Changed the Keybinding for the drag and drop function to + M-C-button1 (M-C-mouse-1). + Changed hm--install-html-menu for the Emacs 19. It uses now the + package easy-menu to install the pulldown menu. This fixes the + bug, that the HTML pulldown menu is a global menu. +13.07.96: + Updated the file header comments a little bit. +10.07.96: + Added the file hm--html-mode.el instead of html-mode.el. + Changed the mode name to hm--html-mode. + Fixed a bug in the function `hm--html-generate-help-buffer-faces', + which occurs, if a color is set to nil. + The font-lock mode is no longer called direct from the + hm--html-mode. + The file html-mode.el should no longer be needed for this mode. +09.07.96: + Added the functions `hm--html-add-normal-link', + `hm--html-add-address', `html-add-list-or-menu-item`, + `hm--html-add-list', `hm--html-add-menu', + `hm--html-add-description-list', `hm--html-add-description-entry', + `hm--html-add-plaintext', `hm--html-add-blockquote', + `hm--html-add-listing', `hm--html-add-fixed', + `hm--html-add-emphasized', `hm--html-add-strong', + `hm--html-add-keyboard', `hm--html-add-variable', + `hm--html-add-sample', `hm--html-add-citation', + `hm--html-quotify-hrefs' to the file hm--html.el. Similar + functions are defined in the past in the file html-mode without + the prefix hm--. + Removed Marc's menu. Maybe a simple flat menu will be added + in the future, similar to Marc's menu. + Removed the old keymaps from the configuration file. + Moved the provide forms to the end of the files. +07.07.96: + Added the drag and drop interface. With that it is possible + to insert links and images by just Meta Button 1 clicking + on its source and destination. +01.03.96: + Added the function `tmpl-insert-template-file'. 18.02.96: -- BUILDED the version 4.16 of the package 17.02.96:
--- a/lisp/hm--html-menus/README Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/hm--html-menus/README Mon Aug 13 08:46:35 2007 +0200 @@ -1,12 +1,21 @@ -This README file describes the emacs lisp package hm--html-menus-4.16. +This README file describes the emacs lisp package hm--html-menus-5.0. + +The package provides functions and various popup and pulldown menus +for a html mode called hm--html-mode, a mode for writing html pages. -The package provides various popup and pulldown menus and functions -for the html-mode from Marc Andreessen, and support for the w3-package -from William M. Perry and the file html-view.el from Ron Tapia. +It has an interface to view the html documents in a W3 browser with +Netscape, the w3-package from William M. Perry and Mosaic with the +file html-view.el from Ron Tapia. It provides also a drag and drop +interface, which makes it very easy to insert links or images, by just +clicking on them. -Look at the file NEWS, to see what is new in this release. +Look at the file NEWS, to see what is new in this release. One of the +main changes is, that it is no longer based on the html-mode.el +package from Marc Andreessen. Therefore the name of the mode has +changed to hm--html-mode and also the way to install the package is a +little bit different. So please read the installtion hints CAREFULLY! -You should (but need not) also get the w3 package from: +You should (but don't need) also get the w3 package from: cs.indiana.edu:/pub/elisp/w3/w3.tar.z @@ -14,9 +23,9 @@ and epoch. -This package is tested with the xemacs 19.13 on Suns with -SunOS 4.1.3 and on PC's with linux. But it should work also on other -(possibly only UNIX ?) platforms. +This package is tested with the xemacs 19.14 and the emacs 19.30 on +Suns with SunOS 4.1.3 and 5.5 and on PC's with linux. But it should +work also on other (possibly only UNIX ?) platforms. Read the file README-EMACS-19, if you want to use this package with GNU Emacs 19. @@ -40,19 +49,23 @@ some of these functions are similar to functions of the html-mode.el; hm--html-keys.el : provides the new keybindings; -hm--html-menu.el : provides the menus; this is the main file; +hm--html-menu.el : provides the menus; +hm--html-mode.el : provides the functions for the definition + of the hm--html-mode; this is now the + main file of the package; hm--html-configuration.el : configuration file for the html mode; - choose this as system configuration file -hm--date.el : Defines the function hm--date, which + choose this as system configuration file; +hm--html-drag-and-drop.el : defines the HTML- specific functions + for the drag and drop interface; +hm--date.el : defines the function hm--date, which returns the date in the format "day-month-year" like "30-Jun-1993". -html-mode.el : Marc Andreessen's html-mode file; use this - one if your html-mode.el is older or - doesn't work together with my files; - I've changed it, to fix a bug ! html-view.el : Ron Tapia's html-view.el to view html-pages in the Xmosaic; it is patched for use with the xemacs; +internal-drag-and-drop.el : provides the general (html-mode + independend functions) of the drag and + drop interface; templates.doc : describes the syntax of the templates provided in the file tmpl-minor-mode.el tmpl-minor-mode.el : provides functions for the tmpl-minor-mode; @@ -67,7 +80,6 @@ command-description.tmpl : Templatefile for the use with the tmpl-minor-mode; frame.tmpl : Templatefile, provides a simple frame; -emacs-19/* : only for the GNU emacs 19 user; @@ -82,16 +94,15 @@ the system (site) configuration file in one of the load path directories of your xemacs or GNU Emacs 19. -1. Put all the *.el files (except .hm--html-configuration.el and - the files in the subdirectory emacs-19) - in one of your xemacs (or emacs) lisp load directories - (i.e. lisp/packages). +1. Put all the *.el files in one of your xemacs (or emacs) lisp load + directories (i.e. lisp/packages). 2. Put the following in your .emacs (or default.el or site-init.el): - (autoload 'html-mode "hm--html-menu" "HTML major mode." t) - (or (assoc "\\.html$" auto-mode-alist) - (setq auto-mode-alist (cons '("\\.html$" . html-mode) + (autoload 'hm--html-mode "hm--html-mode" "HTML major mode." t) + (autoload 'hm--html-minor-mode "hm--html-mode" "HTML minor mode." t) + (or (assoc "\\.html$" auto-mode-alist) + (setq auto-mode-alist (cons '("\\.html$" . hm--html-mode) auto-mode-alist))) (autoload 'tmpl-expand-templates-in-buffer "tmpl-minor-mode" @@ -120,10 +131,20 @@ (autoload 'w3-fetch "w3" "Open remote file for WWW browsing" t) (autoload 'w3-use-hotlist "w3" "Use shortcuts to view WWW docs" t) - The above lines assume that you have not installed the older - html-mode.el. You should remove the appropriate (old) lines, - if that isn't true. It could also be, that you've already the - autoload lines for the w3 package in your emacs. + The above lines assume that you have not installed already another + html mode. If this isn't true, then you should use the following + + (setq auto-mode-alist (cons '("\\.html$" . hm--html-mode) + auto-mode-alist)) + + instead of + + (or (assoc "\\.html$" auto-mode-alist) + (setq auto-mode-alist (cons '("\\.html$" . hm--html-mode) + auto-mode-alist))) + + It could also be, that you've already the autoload lines for + the w3 package in your emacs. 3. Set the environment variable HTML_CONFIG_FILE to the html system configuration file i.e.: @@ -150,7 +171,7 @@ hm--html-template-dir hm--html-favorite-http-server-host-name html-document-previewer - html-view-html-document-previewermosaic-command + html-view-mosaic-command w3-default-homepage 6. If you want to use templatefiles, you should put these files
--- a/lisp/hm--html-menus/adapt.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/hm--html-menus/adapt.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,4 +1,4 @@ -;;; $Id: adapt.el,v 1.1.1.1 1996/12/18 03:34:31 steve Exp $ +;;; $Id: adapt.el,v 1.1.1.2 1996/12/18 03:46:45 steve Exp $ ;;; ;;; Copyright (C) 1993, 1994, 1995 Heiko Muenkel ;;; email: muenkel@tnt.uni-hannover.de @@ -182,7 +182,137 @@ ; "Change a property of an extent. ;Only a dummy version in Emacs 19.")) + (if (not (fboundp 'region-active-p)) + (defun region-active-p () + "Non-nil iff the region is active. +If `zmacs-regions' is true, this is equivalent to `region-exists-p'. +Otherwise, this function always returns false." + (adapt-region-active-p))) + + (if (not (fboundp 'next-command-event)) + (defun next-command-event (&optional event prompt) + "Unlike the XEmacs version it reads the next event, if +it is a command event or not. + +Return the next available \"user\" event. + Pass this object to `dispatch-event' to handle it. + + If EVENT is non-nil, it should be an event object and will be filled in + and returned; otherwise a new event object will be created and returned. + If PROMPT is non-nil, it should be a string and will be displayed in the + echo area while this function is waiting for an event. + + The event returned will be a keyboard, mouse press, or mouse release event. + If there are non-command events available (mouse motion, sub-process output, + etc) then these will be executed (with `dispatch-event') and discarded. This + function is provided as a convenience; it is equivalent to the lisp code + + (while (progn + (next-event event prompt) + (not (or (key-press-event-p event) + (button-press-event-p event) + (button-release-event-p event) + (misc-user-event-p event)))) + (dispatch-event event))" + (message prompt) + (or event + (read-event)))) + + (if (not (fboundp 'button-event-p)) + (defun button-event-p (obj) + "True if OBJ is a button-press or button-release event object." + (and (eventp obj) + (or (eq 'mouse-1 (event-basic-type obj)) + (eq 'mouse-2 (event-basic-type obj)) + (eq 'mouse-3 (event-basic-type obj)))))) + + (if (not (fboundp 'button-press-event-p)) + (defun button-press-event-p (obj) + "True if OBJ is a mouse-button-press event object." + (and (button-event-p obj) + (member 'down (event-modifiers obj))))) + + (if (not (fboundp 'button-release-event-p)) + (defun button-release-event-p (obj) + "True if OBJ is a mouse-button-release event object." + (and (button-event-p obj) + (not (button-press-event-p obj))))) + + (if (not (fboundp 'event-window)) + (defun event-window (event) + "Return the window of the given mouse event. + This may be nil if the event occurred in the border or over a toolbar. + The modeline is considered to be in the window it represents." + (and (eventp event) + (listp event) + (listp (cdr event)) + (listp (car (cdr event))) + (car (car (cdr event)))))) + + (if (not (fboundp 'event-buffer)) + (defun event-buffer (event) + "Given a mouse-motion, button-press, or button-release event, return + the buffer on which that event occurred. This will be nil for non-mouse + events. If event-over-text-area-p is nil, this will also be nil." + (if (button-event-p event) + (window-buffer (event-window event))))) + + + (if (not (fboundp 'event-closest-point)) + (defun event-closest-point (event) + "Return the character position of the given mouse event. +If the event did not occur over a window or over text, return the +closest point to the location of the event. If the Y pixel position +overlaps a window and the X pixel position is to the left of that +window, the closest point is the beginning of the line containing the +Y position. If the Y pixel position overlaps a window and the X pixel +position is to the right of that window, the closest point is the end +of the line containing the Y position. If the Y pixel position is +above a window, return 0. If it is below a window, return the value +of (window-end)." + (posn-point (event-start event)))) + + (if (not (fboundp 'add-minor-mode)) + (defun add-minor-mode (toggle + name + &optional + keymap + after + toggle-fun) + "Add a minor mode to `minor-mode-alist' and `minor-mode-map-alist'. +TOGGLE is a symbol whose value as a variable specifies whether the +minor mode is active. NAME is the name that should appear in the +modeline (it should be a string beginning with a space). KEYMAP is a +keymap to make active when the minor mode is active. AFTER is the +toggling symbol used for another minor mode. If AFTER is non-nil, +then it is used to position the new mode in the minor-mode alists. + +TOGGLE-FUN is only a dummy variable in the Emacs 19. In the XEmacs +it has the following description: +TOGGLE-FUN specifies an interactive function that is called to toggle +the mode on and off; this affects what happens when button2 is pressed +on the mode, and when button3 is pressed somewhere in the list of +modes. If TOGGLE-FUN is nil and TOGGLE names an interactive function, +TOGGLE is used as the toggle function. + +Example: (add-minor-mode 'view-minor-mode \" View\" view-mode-map) + +WARNING: THIS FUNCTION ISN'T READ YET." + (if after + (add-minor-mode-1 toggle name keymap after) + (if (not (assq toggle minor-mode-alist)) + (progn + (setq minor-mode-alist + (cons (list toggle name) + minor-mode-alist)))) + (if (not (assq toggle minor-mode-map-alist)) + (progn + (setq minor-mode-map-alist + (cons (cons toggle keymap) + minor-mode-map-alist)))) + )) + ) )) - + (provide 'adapt)
--- a/lisp/hm--html-menus/hm--date.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/hm--html-menus/hm--date.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,11 +1,11 @@ -;;; hm--date.el: -;;; v1.10; 30 Jun 1993 -;;; Copyright (C) 1993 Heiko Muenkel +;;; $Id: hm--date.el,v 1.1.1.2 1996/12/18 03:46:46 steve Exp $ +;;; +;;; Copyright (C) 1993, 1996 Heiko Muenkel ;;; email: muenkel@tnt.uni-hannover.de ;;; ;;; This program 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 1, or (at your option) +;;; the Free Software Foundation; either version 2, or (at your option) ;;; any later version. ;;; ;;; This program is distributed in the hope that it will be useful,
--- a/lisp/hm--html-menus/hm--html-configuration.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/hm--html-menus/hm--html-configuration.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,6 +1,8 @@ ;;; hm--html-configuration.el - Configurationfile for the html-mode -;;; v3.6; 17 Sep 1995 -;;; Copyright (C) 1993, 1994, 1995 Heiko Muenkel +;;; +;;; $Id: hm--html-configuration.el,v 1.1.1.2 1996/12/18 03:46:47 steve Exp $ +;;; +;;; Copyright (C) 1993, 1994, 1995, 1996 Heiko Muenkel ;;; email: muenkel@tnt.uni-hannover.de ;;; ;;; This program is free software; you can redistribute it and/or modify @@ -20,7 +22,13 @@ ;;; ;;; Description: ;;; -;;; This file is for the configuration of the html mode. +;;; This file is for the system wide configuration of the html mode. +;;; User specific configuration should be done in the file +;;; ~/.hm--html-configuration.el, which preceeds the settings in +;;; this file. +;;; All settings in this file are done with defvar's, therefore +;;; you could overwrite them also with the function setq in your +;;; .emacs or default.el and so on. ;;; ;;; Installation: ;;; @@ -31,12 +39,10 @@ ;;; if you have put this file in the directory "~/data/" ;;; - -(provide 'hm--html-configuration) -(require 'adapt) +;(require 'adapt) -;; The User config file (an proposal of Manoj Srivastava) +;;; The User config file (an proposal of Manoj Srivastava) (defvar hm--html-user-config-file nil "*The location of the users config file. This variable will only be used, if no environment variable @@ -44,19 +50,13 @@ Example value: \"~/.hm--html-configuration.el\".") -;; Chose the initial popup menu - - +;;; Chose the initial popup menu (defvar hm--html-expert nil "*t : Use the HTML expert popup menu, nil : Use the HTML novice (simple) menu. -The variable 'hm--html-marc must be nil. If 'hm--html-marc is -not nil, this variable has no effect.") - -(defvar hm--html-marc nil - "*t : Use the HTML popup menu from Marc Andreessen.") - +NOTE: In the Emacs 19 you should set this variable only before + loading the mode.") ;;; Your Signature @@ -78,285 +78,221 @@ ;;; For links to Info Gateways -(defvar hm--html-info-hostname:port-alist nil +(defvar hm--html-info-hostname:port-alist '(("www.tnt.uni-hannover.de:8005")) "*Alist with hostnames and ports for the Info gateway.") -(setq hm--html-info-hostname:port-alist '(("www.tnt.uni-hannover.de:8005"))) - -(defvar hm--html-info-hostname:port-default nil +(defvar hm--html-info-hostname:port-default "www.tnt.uni-hannover.de:8005" "*Default hostname with port for the Info gateway.") -(setq hm--html-info-hostname:port-default "www.tnt.uni-hannover.de:8005") - -(defvar hm--html-info-path-alist nil +(defvar hm--html-info-path-alist '((1 . "/appl/lemacs/Global/emacs/info") + (2 . "/appl/emacs/info") + (3 . "/appl/gnu/Global/info") + (4 . "/appl/emacs-19/Global/info") + (5 . "/")) "*Alist with directories for the Info gateway.") -(setq hm--html-info-path-alist '((1 . "/appl/lemacs/Global/emacs/info") - (2 . "/appl/emacs/info") - (3 . "/appl/gnu/Global/info") - (4 . "/appl/emacs-19/Global/info") - (5 . "/"))) - ;;; For links to WAIS Gateways -(defvar hm--html-wais-hostname:port-alist nil +(defvar hm--html-wais-hostname:port-alist '(("www.tnt.uni-hannover.de:8001") + ("info.cern.ch:8001")) "*Alist with hostnames and ports for the WAIS gateway.") -(setq hm--html-wais-hostname:port-alist '(("www.tnt.uni-hannover.de:8001") - ("info.cern.ch:8001"))) - -(defvar hm--html-wais-hostname:port-default nil +(defvar hm--html-wais-hostname:port-default "www.tnt.uni-hannover.de:8001" "*Default hostname with port for the WAIS gateway.") -(setq hm--html-wais-hostname:port-default "www.tnt.uni-hannover.de:8001") - -(defvar hm--html-wais-servername:port-alist nil +(defvar hm--html-wais-servername:port-alist + '(("wais.tnt.uni-hannover.de:210") + ("daedalus.tnt.uni-hannover.de:21408") + ("ikarus.tnt.uni-hannover.de:21401")) "*Alist with servernames and ports for the WAIS gateway.") -(setq hm--html-wais-servername:port-alist - '(("wais.tnt.uni-hannover.de:210") - ("daedalus.tnt.uni-hannover.de:21408") - ("ikarus.tnt.uni-hannover.de:21401"))) - -(defvar hm--html-wais-servername:port-default nil +(defvar hm--html-wais-servername:port-default "www.tnt.uni-hannover.de:210" "*Default servername with port for the WAIS gateway.") -(setq hm--html-wais-servername:port-default "www.tnt.uni-hannover.de:210") - (defvar hm--html-wais-path-alist nil "*Alist with directories for the wais gateway.") -(setq hm--html-wais-path-alist nil) - ;;; For links to HTML servers -(defvar hm--html-html-hostname:port-alist nil +(defvar hm--html-html-hostname:port-alist '(("www.tnt.uni-hannover.de:80") + ("vxcrna.cern.ch:80") + ("www.ncsa.uiuc.edu:80")) "*Alist with hostnames and ports for the HTML server.") -(setq hm--html-html-hostname:port-alist '(("www.tnt.uni-hannover.de:80") - ("vxcrna.cern.ch:80") - ("www.ncsa.uiuc.edu:80"))) - -(defvar hm--html-html-hostname:port-default nil +(defvar hm--html-html-hostname:port-default "www.tnt.uni-hannover.de:80" "*Default hostname with port for the HTML server.") -(setq hm--html-html-hostname:port-default "www.tnt.uni-hannover.de:80") - -(defvar hm--html-html-path-alist nil +(defvar hm--html-html-path-alist '((1 . "/data/info/www/tnt/") + (2 . "/data/info/www/") + (3 . "/data/info/") + (4 . "/data/") + (5 . "/appl/") + (6 . "/project/") + (7 . "~/") + (8 . "/")) "*Alist with directories for the HTML server.") -(setq hm--html-html-path-alist '((1 . "/data/info/www/tnt/") - (2 . "/data/info/www/") - (3 . "/data/info/") - (4 . "/data/") - (5 . "/appl/") - (6 . "/project/") - (7 . "~/") - (8 . "/"))) - - ;;; For links to file gateways -(defvar hm--html-file-path-alist nil +(defvar hm--html-file-path-alist '((1 . "/data/info/www/tnt/") + (2 . "/data/info/www/") + (3 . "/data/info/") + (4 . "/data/") + (5 . "/appl/") + (6 . "/project/") + (7 . "~/") + (8 . "/")) "*Alist with directories for the file gateway.") -(setq hm--html-file-path-alist '((1 . "/data/info/www/tnt/") - (2 . "/data/info/www/") - (3 . "/data/info/") - (4 . "/data/") - (5 . "/appl/") - (6 . "/project/") - (7 . "~/") - (8 . "/"))) - ;;; For links to ftp servers -(defvar hm--html-ftp-hostname:port-alist nil +(defvar hm--html-ftp-hostname:port-alist '(("ftp.tnt.uni-hannover.de") + ("ftp.rrzn.uni-hannover.de") + ("wega.informatik.uni-hannover.de") + ("rusmv1.rus.uni-stuttgart.de") + ("export.lcs.mit.edu") + ) "*Alist with hostnames and ports for the ftp server.") -(setq hm--html-ftp-hostname:port-alist '(("ftp.tnt.uni-hannover.de") - ("ftp.rrzn.uni-hannover.de") - ("wega.informatik.uni-hannover.de") - ("rusmv1.rus.uni-stuttgart.de") - ("export.lcs.mit.edu") - )) - -(defvar hm--html-ftp-hostname:port-default nil +(defvar hm--html-ftp-hostname:port-default "ftp.rrzn.uni-hannover.de" "*Default hostname with port for the ftp server.") -(setq hm--html-ftp-hostname:port-default "ftp.rrzn.uni-hannover.de") - -(defvar hm--html-ftp-path-alist nil +(defvar hm--html-ftp-path-alist '((1 . "/pub") + (2 . "/pub/gnu") + (3 . "/pub/linux") + (4 . "/pub/unix") + (5 . "/incoming") + (6 . "/")) "*Alist with directories for the ftp server.") -(setq hm--html-ftp-path-alist '((1 . "/pub") - (2 . "/pub/gnu") - (3 . "/pub/linux") - (4 . "/pub/unix") - (5 . "/incoming") - (6 . "/"))) - ;;; For links to gopher servers -(defvar hm--html-gopher-hostname:port-alist nil +(defvar hm--html-gopher-hostname:port-alist + '(("newsserver.rrzn.uni-hannover.de:70") + ("solaris.rz.tu-clausthal.de:70") + ("veronica.scs.unr.edu:70") + ("pinus.slu.se:70") + ("sunic.sunet.se:70") + ) "*Alist with hostnames and ports for the gopher server.") -(setq hm--html-gopher-hostname:port-alist - '(("newsserver.rrzn.uni-hannover.de:70") - ("solaris.rz.tu-clausthal.de:70") - ("veronica.scs.unr.edu:70") - ("pinus.slu.se:70") - ("sunic.sunet.se:70") - )) - -(defvar hm--html-gopher-doctype-alist nil +(defvar hm--html-gopher-doctype-alist '(("/1") + ("/11") + ("/00")) "*Alist with doctype strings for the gopher server.") -(setq hm--html-gopher-doctype-alist - '(("/1") - ("/11") - ("/00"))) - -(defvar hm--html-gopher-doctype-default nil +(defvar hm--html-gopher-doctype-default "/1" "*Default doctype string for the gopher server.") -(setq hm--html-gopher-doctype-default "/1") - -(defvar hm--html-gopher-hostname:port-default nil +(defvar hm--html-gopher-hostname:port-default + "newsserver.rrzn.uni-hannover.de:70" "*Default hostname with port for the gopher server.") -(setq hm--html-gopher-hostname:port-default - "newsserver.rrzn.uni-hannover.de:70") - -(defvar hm--html-gopher-anchor-alist nil +(defvar hm--html-gopher-anchor-alist + '(("veronica") + ("Wide%20Area%20Information%20Services%20databases") + ("Subject%20Tree")) "*Alist with directories for the gopher server.") -(setq hm--html-gopher-anchor-alist - '(("veronica") - ("Wide%20Area%20Information%20Services%20databases") - ("Subject%20Tree"))) - ;;; For the links to the Program Gateway -(defvar hm--html-proggate-hostname:port-alist nil +(defvar hm--html-proggate-hostname:port-alist + '(("www.tnt.uni-hannover.de:8007") + ) "*Alist with hostnames and ports for the proggate server.") -(setq hm--html-proggate-hostname:port-alist '(("www.tnt.uni-hannover.de:8007") - )) - -(defvar hm--html-proggate-hostname:port-default nil +(defvar hm--html-proggate-hostname:port-default "www.tnt.uni-hannover.de:8007" "*Default hostname with port for the proggate server.") -(setq hm--html-proggate-hostname:port-default "www.tnt.uni-hannover.de:8007") - - -(defvar hm--html-proggate-allowed-file nil +(defvar hm--html-proggate-allowed-file "/appl/www/bin/proggate.allowed" "*The filename (with path) of the proggate allowed file.") -(setq hm--html-proggate-allowed-file "/appl/www/bin/proggate.allowed") - - ;;; For links to the Local Program Gatewy -(defvar hm--html-local-proggate-path-alist nil +(defvar hm--html-local-proggate-path-alist '((1 . "/bin/") + (2 . "/usr/bin/") + (3 . "/usr/local/bin/") + (4 . "/appl/util/bin/") + (5 . "/appl/gnu/Global/bin/") + (6 . "/") + (7 . "/appl/") + (8 . "~/appl/Global/bin/") + (9 . "~/")) "*Alist with directories for the local program gateway.") -(setq hm--html-local-proggate-path-alist '((1 . "/bin/") - (2 . "/usr/bin/") - (3 . "/usr/local/bin/") - (4 . "/appl/util/bin/") - (5 . "/appl/gnu/Global/bin/") - (6 . "/") - (7 . "/appl/") - (8 . "~/appl/Global/bin/") - (9 . "~/"))) - - ;;; For links to the mail gateway -(defvar hm--html-mail-hostname:port-alist nil +(defvar hm--html-mail-hostname:port-alist '(("www.tnt.uni-hannover.de:8003") + ) "*Alist with hostnames and ports for the mail gateway.") -(setq hm--html-mail-hostname:port-alist '(("www.tnt.uni-hannover.de:8003") - )) - -(defvar hm--html-mail-hostname:port-default nil +(defvar hm--html-mail-hostname:port-default "www.tnt.uni-hannover.de:8003" "*Default hostname with port for the mail gateway.") -(setq hm--html-mail-hostname:port-default "www.tnt.uni-hannover.de:8003") - -(defvar hm--html-mail-path-alist nil +(defvar hm--html-mail-path-alist '((1 . "~/data/docs/mail") + (2 . "~/data/docs/news") + (3 . "~/docs/mail") + (4 . "~/docs/news") + (5 . "~/mail") + (6 . "~/news") + (7 . "~/") + (8 . "/data/info/mail") + (9 . "/data/info/news") + (10 . "/")) "*Alist with directories for the mail gateway.") -(setq hm--html-mail-path-alist '((1 . "~/data/docs/mail") - (2 . "~/data/docs/news") - (3 . "~/docs/mail") - (4 . "~/docs/news") - (5 . "~/mail") - (6 . "~/news") - (7 . "~/") - (8 . "/data/info/mail") - (9 . "/data/info/news") - (10 . "/"))) ;;; For mailto links -(defvar hm--html-mailto-alist nil +(defvar hm--html-mailto-alist '(("muenkel@tnt.uni-hannover.de")) "*Alist with mail adresses for the mailto alist. The value of `user-mail-address' will also be added by the package to this alist.") -(setq hm--html-mailto-alist '(("muenkel@tnt.uni-hannover.de"))) - ;;; For the server side include directive +;;; not sure, if these directives works on any server -(defvar hm--html-server-side-include-command-alist nil +(defvar hm--html-server-side-include-command-alist '(("/bin/date") + ("/usr/bin/finger") + ("/bin/df")) "*Alist with commands for the server side include directive. These commands needs no parameter.") - -(setq hm--html-server-side-include-command-alist - '(("/bin/date") - ("/usr/bin/finger") - ("/bin/df"))) -(defvar hm--html-server-side-include-command-with-parameter-alist nil +(defvar hm--html-server-side-include-command-with-parameter-alist + '(("/usr/bin/man") + ("/usr/bin/finger") + ("/usr/bin/ls") + ("/bin/cat")) "*Alist with commands for the server side include directive. These commands needs parameters.") - -(setq hm--html-server-side-include-command-with-parameter-alist - '(("/usr/bin/man") - ("/usr/bin/finger") - ("/usr/bin/ls") - ("/bin/cat"))) ;;; Alist with URL'S for FORMS and IMAGE tags -(defvar hm--html-url-alist nil +(defvar hm--html-url-alist + (list + '("http://hoohoo.ncsa.uiuc.edu/htbin-post/post-query" + POST) + '("http://hoohoo.ncsa.uiuc.edu/htbin/query" + GET) + (list + (concat "http://" + hm--html-favorite-http-server-host-name + "/") + 'IMAGE)) "*Alist with URL's for FORMS and IMAGE tags. The cdr of each list contains symbols, which specifys the use of the URL.") -(setq hm--html-url-alist (list - '("http://hoohoo.ncsa.uiuc.edu/htbin-post/post-query" - POST) - '("http://hoohoo.ncsa.uiuc.edu/htbin/query" - GET) - (list - (concat "http://" - hm--html-favorite-http-server-host-name - "/") - 'IMAGE))) - ;;; For the marking of examples in the help buffer @@ -370,54 +306,29 @@ "The font to highlight examples.") -;(if (not (face-foreground 'hm--html-help-face)) -; (set-face-foreground 'hm--html-help-face "red")) - - ;;; For the Templates - -(defvar hm--html-template-dir nil +(defvar hm--html-template-dir "/data/info/www/tnt/guide/templates" "*A directory with templatefiles") - -(setq hm--html-template-dir "/data/info/www/tnt/guide/templates/") - (if (not (file-exists-p hm--html-template-dir)) ;; Use a system directory, if the above one doesn't exist ;; This is only useful, in the XEmacs 19.12 (setq hm--html-template-dir (concat data-directory "../lisp/hm--html-menus/"))) - -(defvar hm--html-frame-template-file nil +(defvar hm--html-frame-template-file (concat hm--html-template-dir + "frame.tmpl") "File, which is used as template for a html frame.") -(setq hm--html-frame-template-file (concat hm--html-template-dir - "frame.tmpl")) - - -(defvar hm--html-automatic-expand-templates nil +(defvar hm--html-automatic-expand-templates t "*Automatic expansion of templates. This feature needs the file tmpl-minor-mode.el from Heiko Muenkel (muenkel@tnt.uni-hannover.de), which is distributed with the package hm--html-menus.") -(setq hm--html-automatic-expand-templates t) - - -;;; For font lock mode -;(defvar hm--html-font-lock-color -; (if (facep 'font-lock-comment-face) -; (face-foreground 'font-lock-comment-face)) -; "*The color for the html font lock.") - - -;(setq hm--html-font-lock-color "grey80") - - ;;; for deleting the automounter path-prefix -(defvar hm--html-delete-wrong-path-prefix nil +(defvar hm--html-delete-wrong-path-prefix '("/tmp_mnt" "/phys/[^/]+") "If non nil, it specifies path-prefixes, which should be deleted in pathes. The Sun automounter adds a temporary prefix to the automounted directories (At our site the prefix is /tmp_mnt). But you can't select such a path, if @@ -428,8 +339,6 @@ ATTENTION: This variable is used as regular expression ! It can be set to a string or to a list of strings.") -(setq hm--html-delete-wrong-path-prefix '("/tmp_mnt" "/phys/[^/]+")) - ;;; For insertation of created and changed comments and automatic ;;; date update in the title line @@ -447,26 +356,6 @@ nil => No automatic insertation of a \"created comment\" line.") - -;;; For the file html-mode.el - -(setq html-document-previewer "/appl/www/bin/mosaic") - - -;;; For the file html-view.el - -(setq html-view-mosaic-command "/appl/www/bin/mosaic") - - -;;; For the files html-mode.el and html-view.el - -;; Value for the SIGUSR1 signal on your system. See, usually, -;; /usr/include/sys/signal.h. -;; SunOS 4.1.x : (setq html-sigusr1-signal-value 30) -;; Linux : (setq html-sigusr1-signal-value 10) -(setq html-sigusr1-signal-value 30) - - ;;; Keybindings: (defvar hm--html-bind-latin-1-char-entities t @@ -474,102 +363,83 @@ This is only useful, if `hm--html-use-old-keymap' is set to nil. It is only used during loading the html package the first time.") -(defvar hm--html-use-old-keymap nil - "Set this to t, if you want to use the old keymap from Marc. -This variable and the choice to use the old map will be deleted -in the future.") -(if (not hm--html-use-old-keymap) - ;; The new map - (require 'hm--html-keys) - - ;; Additional bindings to the old map - -;;; Keytable html-mode-map (see also the file html-mode.el) +;;; The drag and drop interface +(defvar hm--html-idd-create-relative-links t + "If t, then the hm--html-idd-* functions are creating relative links. +Otherwise absolute links are used. The idd functions are used for +drag and drop.") -(define-key html-mode-map "\C-cr" 'hm--html-add-link-target) -(define-key html-mode-map "\C-ch" 'hm--html-add-header) -(define-key html-mode-map "\C-ct" 'hm--html-add-title) -(define-key html-mode-map "\C-cn" 'hm--html-add-numberlist) -(define-key html-mode-map "\C-c\C-p" 'hm--html-add-preformated) -(define-key html-mode-map "\C-c\C-b" 'hm--html-add-bold) -(define-key html-mode-map "\C-c\C-i" 'hm--html-add-italic) -(define-key html-mode-map "\C-c\M-h" 'hm--html-add-html-link) -(define-key html-mode-map "\C-c\M-i" 'hm--html-add-info-link) -(define-key html-mode-map "\C-c\M-g" 'hm--html-add-gopher-link) -(define-key html-mode-map "\C-c\M-f" 'hm--html-add-file-link) -(define-key html-mode-map "\C-c\M-n" 'hm--html-add-news-link) -(define-key html-mode-map "\C-c\M-m" 'hm--html-add-mail-link) -;(define-key html-mode-map "\C-c\M-w" 'hm--html-add-wais-link) -(define-key html-mode-map "\C-c\M-w" 'hm--html-add-direct-wais-link) -(define-key html-mode-map "\C-c\M-t" 'hm--html-add-ftp-link) -(if (adapt-xemacsp) - (define-key html-mode-map '(button3) 'hm--popup-html-menu) - (define-key html-mode-map [mouse-3] 'hm--popup-html-menu) - ;;(define-key html-mode-map [S-mouse-3] 'hm--popup-html-menu) - ;;(define-key html-mode-map [C-mouse-3] 'hm--popup-html-menu-region) - ) +(defvar hm--html-idd-actions + '((nil (((idd-major-mode-p . dired-mode) + (idd-dired-file-on-line-p . ".*\\.\\(gif\\)\\|\\(jpq\\)")) + hm--html-idd-add-include-image-from-dired-line) + (((idd-major-mode-p . dired-mode) + (idd-dired-no-file-on-line-p . nil)) + hm--html-idd-add-file-link-to-file-on-dired-line) + (((idd-major-mode-p . dired-mode) + (idd-dired-no-file-on-line-p . t)) + hm--html-idd-add-file-link-to-directory-of-buffer) + (((idd-major-mode-p . w3-mode) + (idd-url-at-point-p . t)) + hm--html-idd-add-html-link-from-w3-buffer-point) + (((idd-major-mode-p . w3-mode)) + hm--html-idd-add-html-link-to-w3-buffer) + (((idd-local-file-p . t)) + hm--html-idd-add-file-link-to-buffer))) + "The action list for the source mode `hm--html-mode'. +Look at the description of the variable idd-actions") -;;; Keytable html-region-mode-map (for the minor mode region-mode-map -;;; This minor mode is active, if a region is active + +;;; The font lock keywords + +(defvar hm--html-font-lock-keywords + (list + '("\\(<!--.*-->\\)\\|\\(<[^>]*>\\)+" . font-lock-comment-face) + '("[Hh][Rr][Ee][Ff]=\"\\([^\"]*\\)\"" 1 font-lock-string-face t) + '("[Ss][Rr][Cc]=\"\\([^\"]*\\)\"" 1 font-lock-string-face t)) + "Default expressions to highlight in the hm--html-mode.") + -(if html-region-mode-map - () - (setq html-region-mode-map (make-sparse-keymap)) - (define-key html-region-mode-map "\t" 'tab-to-tab-stop) - (define-key html-region-mode-map "\C-ca" 'hm--html-add-address-to-region) - (define-key html-region-mode-map "\C-cb" 'hm--html-add-blockquote-to-region) - (define-key html-region-mode-map "\C-cc" 'hm--html-add-code-to-region) - (define-key html-region-mode-map "\C-cd" - 'hm--html-add-description-list-to-region) - (define-key html-region-mode-map "\C-ch" 'hm--html-add-header-to-region) - (define-key html-region-mode-map "\C-cl" 'html-add-normal-link-to-region) - (define-key html-region-mode-map "\C-cm" 'hm--html-add-menu-to-region) - (define-key html-region-mode-map "\C-cn" 'hm--html-add-numberlist-to-region) - (define-key html-region-mode-map "\C-cr" 'html-add-reference-to-region) - (define-key html-region-mode-map "\C-cs" 'hm--html-add-list-to-region) - (define-key html-region-mode-map "\C-ct" 'hm--html-add-title-to-region) - (define-key html-region-mode-map "\C-cx" 'hm--html-add-plaintext-to-region) - (define-key html-region-mode-map "\C-c\C-b" 'hm--html-add-bold-to-region) - (define-key html-region-mode-map "\C-c\C-c" 'hm--html-add-citation-to-region) - (define-key html-region-mode-map "\C-c\C-e" - 'hm--html-add-emphasized-to-region) - (define-key html-region-mode-map "\C-c\C-f" 'hm--html-add-fixed-to-region) - (define-key html-region-mode-map "\C-c\C-i" 'hm--html-add-italic-to-region) - (define-key html-region-mode-map "\C-c\C-k" 'hm--html-add-keyboard-to-region) - (define-key html-region-mode-map "\C-c\C-l" 'hm--html-add-listing-to-region) - (define-key html-region-mode-map "\C-c\C-m" 'hm--html-add-sample-to-region) - (define-key html-region-mode-map "\C-c\C-p" - 'hm--html-add-preformated-to-region) - (define-key html-region-mode-map "\C-c\C-s" 'hm--html-add-strong-to-region) - (define-key html-region-mode-map "\C-c\C-v" 'hm--html-add-variable-to-region) - (define-key html-region-mode-map "<" 'html-less-than) - (define-key html-region-mode-map ">" 'html-greater-than) - (define-key html-region-mode-map "&" 'html-ampersand) - (define-key html-region-mode-map "\C-c\C-rl" 'html-add-normal-link-to-region) - (define-key html-region-mode-map "\C-c\C-rr" 'html-add-reference-to-region) - (define-key html-region-mode-map "\C-c\M-h" - 'hm--html-add-html-link-to-region) - (define-key html-region-mode-map "\C-c\M-i" - 'hm--html-add-info-link-to-region) - (define-key html-region-mode-map "\C-c\M-g" - 'hm--html-add-gopher-link-to-region) - (define-key html-region-mode-map "\C-c\M-f" - 'hm--html-add-file-link-to-region) - (define-key html-region-mode-map "\C-c\M-n" - 'hm--html-add-news-link-to-region) - (define-key html-region-mode-map "\C-c\M-m" - 'hm--html-add-mail-link-to-region) -; (define-key html-region-mode-map "\C-c\M-w" -; 'hm--html-add-wais-link-to-region) - (define-key html-region-mode-map "\C-c\M-w" - 'hm--html-add-direct-wais-link-to-region) - (define-key html-region-mode-map "\C-c\M-t" - 'hm--html-add-ftp-link-to-region) - (if (adapt-xemacsp) - (define-key html-region-mode-map '(button3) 'hm--popup-html-menu-region) - (define-key html-region-mode-map [mouse-3] 'hm--popup-html-menu-region)) -) +;;; The Prefix- Key for the keytables +(defvar hm--html-minor-mode-prefix-key "\C-z" + "The prefix key for the keytables in the `hm--html-minor-mode'.") + +(defvar hm--html-mode-prefix-key "\C-c" + "The prefix key for the hm--html keys in the `hm--html-mode'.") + + +;;; The pulldown menu names +(defvar hm--html-minor-mode-pulldown-menu-name "HM-HTML" + "The name of the pulldown menu in the minor html mode.") + +(defvar hm--html-mode-pulldown-menu-name "HTML" + "The name of the pulldown menu in the major html mode.") + + +;;; The hook variables +(defvar hm--html-load-hook nil + "*Hook variable to execute functions after loading the package.") -) +(defvar hm--html-mode-hook nil + "This hook will be called each time, when the hm--html-mode is invoked.") + + +;;; For the file html-view.el +;;; There are also some other variables in hmtl-view.el +;;; Look at that file, if you've trouble with the functions +;;; to preview the html document with the Mosaic +(defvar html-view-mosaic-command "/sol/www/bin/mosaic" + "The command that runs Mosaic on your system") +(defvar html-sigusr1-signal-value 16 + "Value for the SIGUSR1 signal on your system. +See, usually, /usr/include/sys/signal.h. + SunOS 4.1.x : (setq html-sigusr1-signal-value 30) + SunOS 5.x : (setq html-sigusr1-signal-value 16) + Linux : (setq html-sigusr1-signal-value 10))") + + +;;; Announce the feature hm--html-configuration +(provide 'hm--html-configuration) +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/hm--html-menus/hm--html-drag-and-drop.el Mon Aug 13 08:46:35 2007 +0200 @@ -0,0 +1,167 @@ +;;; $Id: hm--html-drag-and-drop.el,v 1.1.1.1 1996/12/18 03:46:48 steve Exp $ +;;; +;;; Copyright (C) 1996 Heiko Muenkel +;;; email: muenkel@tnt.uni-hannover.de +;;; +;;; This program 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 1, or (at your option) +;;; any later version. +;;; +;;; This program 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 this program; if not, write to the Free Software +;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +;;; +;;; +;;; Description: +;;; +;;; This package contains functions to insert links and other +;;; HTML stuff with the mouse with drag and drop. +;;; +;;; For further descriptions look at the file +;;; internal-drag-and-drop.el, which implements the basic (and +;;; more genreal functions) for the drag and drop interface. +;;; +;;; Installation: +;;; +;;; Put this file in your load path. +;;; + +(require 'internal-drag-and-drop) +(require 'cl) + +(defun hm--html-first-non-matching-position (string1 string2) + "Compares both strings and returns the first position, which is not equal." + (let ((n 0) + (max-n (min (length string1) (length string2))) + (continue t)) + (while (and continue (< n max-n)) + (when (setq continue (= (aref string1 n) (aref string2 n))) + (setq n (1+ n)))) + n)) + +(defun hm--html-count-subdirs (directory) + "Returns the number of subdirectories of DIRECTORY." + (let ((n 0) + (max-n (1- (length directory))) + (count 0)) + (while (< n max-n) + (when (= ?/ (aref directory n)) + (setq count (1+ count))) + (setq n (1+ n))) + (when (and (not (= 0 (length directory))) + (not (= ?/ (aref directory 0)))) + (setq count (1+ count))) + count)) + +(defun hm--html-return-n-backwards (n) + "Returns a string with N ../" + (cond ((= n 0) "") + (t (concat "../" (hm--html-return-n-backwards (1- n)))))) + +(defun* hm--html-file-relative-name (file-name + &optional (directory default-directory)) + "Convert FILENAME to be relative to DIRECTORY (default: default-directory)." + (let* ((pos (hm--html-first-non-matching-position file-name directory)) + (backwards (hm--html-count-subdirs (substring directory pos))) + (relative-name (concat (hm--html-return-n-backwards backwards) + (substring file-name pos)))) + (if (= 0 (length relative-name)) + "./" + (if (= ?/ (aref relative-name 0)) + (if (= 1 (length relative-name)) + "./" + (substring relative-name 1)) + relative-name)))) + +(defun hm--html-idd-add-include-image-from-dired-line (source destination) + "Inserts an include image tag at the SOURCE. +The name of the image is on a line in a dired buffer. It is specified by the +destination." + (idd-set-point source) + (if hm--html-idd-create-relative-links + (hm--html-add-image-top (hm--html-file-relative-name + (idd-get-dired-filename-from-line destination)) + (file-name-nondirectory + (idd-get-dired-filename-from-line destination))) + (hm--html-add-image-top (idd-get-dired-filename-from-line destination) + (file-name-nondirectory + (idd-get-dired-filename-from-line destination))))) + +(defun hm--html-idd-add-link-to-region (link-object source) + "Inserts a link with the LINK-OBJECT in the SOURCE. +It uses the region as the name of the link." + (idd-set-region source) + (hm--html-add-normal-link-to-region link-object) + ) + +(defun hm--html-idd-add-link (link-object source) + "Inserts a link with the LINK-OBJECT in the SOURCE." + (idd-set-point source) + (hm--html-add-normal-link link-object)) + +(defun hm--html-idd-add-link-to-point-or-region (link-object source) + "Inserts a link with the LINK-OBJECT in the SOURCE. +It uses the region as the name of the link, if the region was active +in the SOURCE." + (if (cdr (assoc ':region-active source)) + (hm--html-idd-add-link-to-region link-object source) + (hm--html-idd-add-link link-object source))) + +(defun hm--html-idd-add-file-link-to-file-on-dired-line (source destination) + "Inserts a file link in SOURCE to the file on the dired line of DESTINATION." + (idd-set-point source) + (if hm--html-idd-create-relative-links + (hm--html-idd-add-link-to-point-or-region + (hm--html-file-relative-name + (idd-get-dired-filename-from-line destination)) + source) + (hm--html-idd-add-link-to-point-or-region + (concat "file://" (idd-get-dired-filename-from-line destination)) + source))) + +(defun hm--html-idd-add-file-link-to-buffer (source destination) + "Inserts a file link at SOURCE to the file of DESTINATION." + (idd-set-point source) + (if hm--html-idd-create-relative-links + (hm--html-idd-add-link-to-point-or-region + (hm--html-file-relative-name (idd-get-local-filename destination)) + source) + (hm--html-idd-add-link-to-point-or-region + (concat "file://" (idd-get-local-filename destination)) + source))) + +(defun hm--html-idd-add-file-link-to-directory-of-buffer (source + destination) + "Inserts a file link at SOURCE to the directory of the DESTINATION buffer." + (idd-set-point source) + (if hm--html-idd-create-relative-links + (hm--html-idd-add-link-to-point-or-region + (hm--html-file-relative-name (idd-get-directory-of-buffer destination)) + source) + (hm--html-idd-add-link-to-point-or-region + (concat "file://" (idd-get-directory-of-buffer destination)) + source))) + +(defun hm--html-idd-add-html-link-to-w3-buffer (source destination) + "Inserts a link at SOURCE to the w3 buffer specified by the DESTINATION. +Note: Relative links are currently not supported for this function." + (idd-set-point source) + (hm--html-idd-add-link-to-point-or-region (idd-get-buffer-url destination) + source)) + +(defun hm--html-idd-add-html-link-from-w3-buffer-point (source destination) + "Inserts a link at SOURCE to a lin in the w3 buffer. +The link in the w3-buffer is specified by the DESTINATION. +Note: Relative links are currently not supported for this function." + (idd-set-point source) + (hm--html-idd-add-link-to-point-or-region (idd-get-url-at-point destination) + source)) + +;;; Announce the feature hm--html-drag-and-drop +(provide 'hm--html-drag-and-drop)
--- a/lisp/hm--html-menus/hm--html-keys.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/hm--html-menus/hm--html-keys.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,5 +1,5 @@ -;;; hm--html-keys.el -;;; v1.50; 17-Feb-1996 +;;; $Id: hm--html-keys.el,v 1.1.1.2 1996/12/18 03:46:48 steve Exp $ +;;; ;;; Copyright (C) 1995, 1996 Heiko Muenkel ;;; email: muenkel@tnt.uni-hannover.de ;;; @@ -21,16 +21,29 @@ ;;; Description: ;;; ;;; Defines the new keybindigs for the hm--html-menus package. -;;; At the moment it will only be used, if the variable -;;; 'hm--html-use-old-keymap' in hm--html-configuration.el -;;; is set to nil, which is the default. ;;; ;;; Installation: ;;; ;;; Put this file in one of your load path directories. ;;; -(provide 'hm--html-keys) +;; This is necessary to get the definition of hm--html-mode-prefix-key. +(require 'hm--html-configuration) + +(if (adapt-emacs19p) + (progn + + (defvar hm--html-emacs19-popup-noregion-menu-button [C-down-mouse-3] + "This is the mouse button , which pops up the noregion menus. +It could have the same value as +`hm--html-emacs19-popup-region-menu-button'.") + + (defvar hm--html-emacs19-popup-region-menu-button [C-down-mouse-3] + "This is the mouse button , which pops up the region menus. +It could have the same value as +`hm--html-emacs19-popup-noregion-menu-button'.") + + )) (defvar hm--html-noregion-anchor-map nil @@ -39,6 +52,7 @@ (if hm--html-noregion-anchor-map () (setq hm--html-noregion-anchor-map (make-sparse-keymap)) + (define-key hm--html-noregion-anchor-map "r" 'hm--html-add-relative-link) (define-key hm--html-noregion-anchor-map "h" 'hm--html-add-html-link) (define-key hm--html-noregion-anchor-map "i" 'hm--html-add-info-link) (define-key hm--html-noregion-anchor-map "g" 'hm--html-add-gopher-link) @@ -54,7 +68,7 @@ (define-key hm--html-noregion-anchor-map "p" 'hm--html-add-proggate-link) (define-key hm--html-noregion-anchor-map "\C-p" 'hm--html-add-local-proggate-link) - (define-key hm--html-noregion-anchor-map "l" 'html-add-normal-link) + (define-key hm--html-noregion-anchor-map "l" 'hm--html-add-normal-link) (define-key hm--html-noregion-anchor-map "t" 'hm--html-add-link-target) ) @@ -64,6 +78,8 @@ (if hm--html-region-anchor-map () (setq hm--html-region-anchor-map (make-sparse-keymap)) + (define-key hm--html-region-anchor-map + "r" 'hm--html-add-relative-link-to-region) (define-key hm--html-region-anchor-map "h" 'hm--html-add-html-link-to-region) (define-key hm--html-region-anchor-map "i" 'hm--html-add-info-link-to-region) (define-key hm--html-region-anchor-map @@ -88,7 +104,7 @@ (define-key hm--html-region-anchor-map "l" 'hm--html-add-normal-link-to-region) (define-key hm--html-region-anchor-map - "t" 'html-add-reference-to-region) + "t" 'hm--html-add-link-target-to-region) ) (defvar hm--html-noregion-frame-map nil @@ -106,7 +122,7 @@ (define-key hm--html-noregion-frame-map "t" 'hm--html-add-title) (define-key hm--html-noregion-frame-map "h" 'hm--html-add-header) (define-key hm--html-noregion-frame-map "n" 'hm--html-add-normal-node-link) - (define-key hm--html-noregion-frame-map "a" 'html-add-address) + (define-key hm--html-noregion-frame-map "a" 'hm--html-add-address) (define-key hm--html-noregion-frame-map "s" 'hm--html-add-signature) (define-key hm--html-noregion-frame-map [(control c)] 'hm--html-insert-created-comment) @@ -138,19 +154,20 @@ (if hm--html-noregion-structure-map () (setq hm--html-noregion-structure-map (make-sparse-keymap)) - (define-key hm--html-noregion-structure-map "i" 'html-add-list-or-menu-item) - (define-key hm--html-noregion-structure-map "m" 'html-add-menu) - (define-key hm--html-noregion-structure-map "u" 'html-add-list) + (define-key hm--html-noregion-structure-map + "i" 'hm--html-add-list-or-menu-item) + (define-key hm--html-noregion-structure-map "m" 'hm--html-add-menu) + (define-key hm--html-noregion-structure-map "u" 'hm--html-add-list) (define-key hm--html-noregion-structure-map "o" 'hm--html-add-numberlist) (define-key hm--html-noregion-structure-map "d" 'hm--html-add-directory-list) (define-key hm--html-noregion-structure-map - "\C-dl" 'html-add-description-list) + "\C-dl" 'hm--html-add-description-list) (define-key hm--html-noregion-structure-map "\C-dt" 'hm--html-add-description-title) (define-key hm--html-noregion-structure-map - "\C-de" 'hm--html-add-only-description-entry) + "\C-de" 'hm--html-add-description-entry) (define-key hm--html-noregion-structure-map - "\C-d\C-t" 'html-add-description-entry) + "\C-d\C-t" 'hm--html-add-description-title-and-entry) (define-key hm--html-noregion-structure-map "\C-tt" 'hm--html-add-table) (define-key hm--html-noregion-structure-map @@ -175,6 +192,8 @@ (if hm--html-region-structure-map () (setq hm--html-region-structure-map (make-sparse-keymap)) + (define-key hm--html-noregion-structure-map + "i" 'hm--html-add-list-or-menu-item-to-region) (define-key hm--html-region-structure-map "m" 'hm--html-add-menu-to-region) (define-key hm--html-region-structure-map "u" 'hm--html-add-list-to-region) (define-key hm--html-region-structure-map @@ -182,7 +201,13 @@ (define-key hm--html-region-structure-map "d" 'hm--html-add-directory-list-to-region) (define-key hm--html-region-structure-map - "\C-dl" 'html-add-description-list-to-region) + "\C-dl" 'hm--html-add-description-list-to-region) + (define-key hm--html-region-structure-map + "\C-dt" 'hm--html-add-description-title-to-region) + (define-key hm--html-region-structure-map + "\C-de" 'hm--html-add-description-entry-to-region) +; (define-key hm--html-region-structure-map +; "\C-d\C-t" 'html-add-description-title-and-entry-to-region)) (define-key hm--html-region-structure-map "\C-tt" 'hm--html-add-table-to-region) (define-key hm--html-region-structure-map @@ -198,13 +223,13 @@ () (setq hm--html-noregion-formating-paragraph-map (make-sparse-keymap)) (define-key hm--html-noregion-formating-paragraph-map - "o" 'html-add-plaintext) + "o" 'hm--html-add-plaintext) (define-key hm--html-noregion-formating-paragraph-map "w" 'hm--html-add-preformated) (define-key hm--html-noregion-formating-paragraph-map - "b" 'html-add-blockquote) + "b" 'hm--html-add-blockquote) (define-key hm--html-noregion-formating-paragraph-map - "l" 'html-add-listing) + "l" 'hm--html-add-listing) (define-key hm--html-noregion-formating-paragraph-map "a" 'hm--html-add-abstract) ) @@ -227,38 +252,6 @@ "a" 'hm--html-add-abstract-to-region) ) -;(defvar hm--html-noregion-entity-map nil -; "Noregion sub keymap for inserting entities.") - -;(if hm--html-noregion-entity-map -; () -; (setq hm--html-noregion-entity-map (make-sparse-keymap)) -; ) - -;(defvar hm--html-region-entity-map nil -; "Region sub keymap for inserting entities.") - -;(if hm--html-region-entity-map -; () -; (setq hm--html-region-entity-map (make-sparse-keymap)) -; ) - -;(defvar hm--html-noregion-logical-map nil -; "Noregion sub keymap for inserting logical text formating elements.") - -;(if hm--html-noregion-logical-map -; () -; (setq hm--html-noregion-logical-map (make-sparse-keymap)) -; ) - -;(defvar hm--html-region-logical-map nil -; "Region sub keymap for inserting logical text formating elements.") - -;(if hm--html-region-logical-map -; () -; (setq hm--html-region-logical-map (make-sparse-keymap)) -; ) - (defvar hm--html-noregion-formating-word-map nil "Norgion sub keymap for inserting physical text formating elements.") @@ -272,7 +265,7 @@ (define-key hm--html-noregion-formating-word-map "u" 'hm--html-add-underline) (define-key hm--html-noregion-formating-word-map - "t" 'html-add-fixed) + "t" 'hm--html-add-fixed) (define-key hm--html-noregion-formating-word-map "s" 'hm--html-add-strikethru) (define-key hm--html-noregion-formating-word-map @@ -280,9 +273,13 @@ (define-key hm--html-noregion-formating-word-map "\C-b" 'hm--html-add-subscript) (define-key hm--html-noregion-formating-word-map - "e" 'html-add-emphasized) + "e" 'hm--html-add-emphasized) + (define-key hm--html-noregion-formating-word-map + "\C-s" 'hm--html-add-strong) (define-key hm--html-noregion-formating-word-map - "\C-s" 'html-add-strong) + "\M-s" 'hm--html-add-small) + (define-key hm--html-noregion-formating-word-map + "\M-b" 'hm--html-add-big) ) (defvar hm--html-region-formating-word-map nil @@ -309,87 +306,48 @@ "e" 'hm--html-add-emphasized-to-region) (define-key hm--html-region-formating-word-map "\C-s" 'hm--html-add-strong-to-region) + (define-key hm--html-region-formating-word-map + "\M-s" 'hm--html-add-small-to-region) + (define-key hm--html-region-formating-word-map + "\M-b" 'hm--html-add-big-to-region) ) -;(defvar hm--html-noregion-header-map nil -; "Noregion sub keymap for inserting header elements.") +(defvar hm--html-noregion-include-map nil + "Noregion sub keymap for include images and other stuff.") + +(if hm--html-noregion-include-map + () + (setq hm--html-noregion-include-map (make-sparse-keymap)) + (define-key hm--html-noregion-include-map "t" 'hm--html-add-image-top) + (define-key hm--html-noregion-include-map "m" 'hm--html-add-image-middle) + (define-key hm--html-noregion-include-map "b" 'hm--html-add-image-bottom) + (define-key hm--html-noregion-include-map "a" 'hm--html-add-applet) + (define-key hm--html-noregion-include-map "p" 'hm--html-add-applet) + ) -;(if hm--html-noregion-header-map -; () -; (setq hm--html-noregion-header-map (make-sparse-keymap)) -; ) +(defvar hm--html-region-include-map nil + "Region sub keymap for include images and other stuff.") -;(defvar hm--html-region-header-map nil -; "Region sub keymap for inserting header elements.") +(if hm--html-region-include-map + () + (setq hm--html-region-include-map (make-sparse-keymap)) + ) -;(if hm--html-region-header-map +;(defvar hm--html-noregion-text-elements-map nil +; "Noregion sub keymap for inserting text elements.") + +;(if hm--html-noregion-text-elements-map ; () -; (setq hm--html-region-header-map (make-sparse-keymap)) -; ) - -;(defvar hm--html-noregion-head-map nil -; "Noregion sub keymap for inserting head elements.") - -;(if hm--html-noregion-head-map -; () -; (setq hm--html-noregion-head-map (make-sparse-keymap)) -; ) - -;(defvar hm--html-region-head-map nil -; "Region sub keymap for inserting head elements.") - -;(if hm--html-region-head-map -; () -; (setq hm--html-region-head-map (make-sparse-keymap)) +; (setq hm--html-noregion-text-elements-map (make-sparse-keymap)) ; ) -;(defvar hm--html-noregion-list-map nil -; "Noregion sub keymap for inserting lists.") - -;(if hm--html-noregion-list-map -; () -; (setq hm--html-noregion-list-map (make-sparse-keymap)) -; ) - -;(defvar hm--html-region-list-map nil -; "Region sub keymap for inserting lists.") - -;(if hm--html-region-list-map -; () -; (setq hm--html-region-list-map (make-sparse-keymap)) -; ) - -(defvar hm--html-noregion-graphics-map nil - "Noregion sub keymap for inserting graphics (images).") - -(if hm--html-noregion-graphics-map - () - (setq hm--html-noregion-graphics-map (make-sparse-keymap)) - ) +;(defvar hm--html-region-text-elements-map nil +; "Region sub keymap for inserting text elements.") -(defvar hm--html-region-graphics-map nil - "Region sub keymap for inserting graphics (images).") - -(if hm--html-region-graphics-map - () - (setq hm--html-region-graphics-map (make-sparse-keymap)) - ) - -(defvar hm--html-noregion-text-elements-map nil - "Noregion sub keymap for inserting text elements.") - -(if hm--html-noregion-text-elements-map - () - (setq hm--html-noregion-text-elements-map (make-sparse-keymap)) - ) - -(defvar hm--html-region-text-elements-map nil - "Region sub keymap for inserting text elements.") - -(if hm--html-region-text-elements-map - () - (setq hm--html-region-text-elements-map (make-sparse-keymap)) - ) +;(if hm--html-region-text-elements-map +; () +; (setq hm--html-region-text-elements-map (make-sparse-keymap)) +; ) (defvar hm--html-noregion-forms-map nil "Noregion sub keymap for inserting forms.") @@ -397,6 +355,36 @@ (if hm--html-noregion-forms-map () (setq hm--html-noregion-forms-map (make-sparse-keymap)) + + (define-key hm--html-noregion-forms-map "f" 'hm--html-add-form) + (define-key hm--html-noregion-forms-map "a" 'hm--html-form-add-input-audio) + (define-key hm--html-noregion-forms-map + "c" 'hm--html-form-add-input-checkbox) + (define-key hm--html-noregion-forms-map + "d" 'hm--html-form-add-input-date) + (define-key hm--html-noregion-forms-map + "\C-f" 'hm--html-form-add-input-float) + (define-key hm--html-noregion-forms-map "i" 'hm--html-form-add-input-image) + (define-key hm--html-noregion-forms-map + "\C-i" 'hm--html-form-add-input-integer) + (define-key hm--html-noregion-forms-map + "\M-i" 'hm--html-form-add-input-isindex) + (define-key hm--html-noregion-forms-map + "p" 'hm--html-form-add-input-password) + (define-key hm--html-noregion-forms-map "r" 'hm--html-form-add-input-radio) + (define-key hm--html-noregion-forms-map + "\C-r" 'hm--html-form-add-input-reset) + (define-key hm--html-noregion-forms-map + "\C-s" 'hm--html-form-add-input-scribble) + (define-key hm--html-noregion-forms-map "s" 'hm--html-form-add-input-submit) + (define-key hm--html-noregion-forms-map "t" 'hm--html-form-add-input-text) + (define-key hm--html-noregion-forms-map "u" 'hm--html-form-add-input-url) + (define-key hm--html-noregion-forms-map "o" 'hm--html-form-add-select-option) + (define-key hm--html-noregion-forms-map + "m" 'hm--html-form-add-select-option-menu) + (define-key hm--html-noregion-forms-map + "l" 'hm--html-form-add-select-scrolled-list) + (define-key hm--html-noregion-forms-map "\C-t" 'hm--html-form-add-textarea) ) (defvar hm--html-region-forms-map nil @@ -405,25 +393,21 @@ (if hm--html-region-forms-map () (setq hm--html-region-forms-map (make-sparse-keymap)) + + (define-key hm--html-region-forms-map "f" 'hm--html-add-form-to-region) ) (defvar hm--html-region-sub-map-1 nil - "Region sub keymap for the html-mode.") + "Region sub keymap for the `hm--html-mode'.") (if hm--html-region-sub-map-1 () (setq hm--html-region-sub-map-1 (make-sparse-keymap)) -; (define-key hm--html-region-sub-map-1 "\C-e" hm--html-region-entity-map) -; (define-key hm--html-region-sub-map-1 "\C-l" hm--html-region-logical-map) -; (define-key hm--html-region-sub-map-1 "\C-p" hm--html-region-physical-map) -; (define-key hm--html-region-sub-map-1 "\C-h" hm--html-region-header-map) (define-key hm--html-region-sub-map-1 "\C-o" hm--html-region-forms-map) -; (define-key hm--html-region-sub-map-1 "\C-l" hm--html-region-list-map) (define-key hm--html-region-sub-map-1 "\C-a" hm--html-region-anchor-map) - (define-key hm--html-region-sub-map-1 "\C-i" hm--html-region-graphics-map) - (define-key hm--html-region-sub-map-1 - "\C-t" hm--html-region-text-elements-map) -; (define-key hm--html-region-sub-map-1 "\C-b" hm--html-region-head-map) + (define-key hm--html-region-sub-map-1 "\C-i" hm--html-region-include-map) +; (define-key hm--html-region-sub-map-1 +; "\C-t" hm--html-region-text-elements-map) (define-key hm--html-region-sub-map-1 "\C-f" hm--html-region-frame-map) (define-key hm--html-region-sub-map-1 "\C-s" hm--html-region-structure-map) (define-key hm--html-region-sub-map-1 @@ -433,28 +417,18 @@ ) (defvar hm--html-noregion-sub-map-1 nil - "Noregion sub keymap for the html-mode.") + "Noregion sub keymap for the `hm--html-mode'.") (if hm--html-noregion-sub-map-1 () (setq hm--html-noregion-sub-map-1 (make-sparse-keymap)) - -; (define-key hm--html-noregion-sub-map-1 "\C-e" hm--html-noregion-entity-map) -; (define-key hm--html-noregion-sub-map-1 -; "\C-l" hm--html-noregion-logical-map) -; (define-key hm--html-noregion-sub-map-1 -; "\C-p" hm--html-noregion-physical-map) -; (define-key hm--html-noregion-sub-map-1 -; [(control h)] hm--html-noregion-header-map) (define-key hm--html-noregion-sub-map-1 "\C-o" hm--html-noregion-forms-map) -; (define-key hm--html-noregion-sub-map-1 "\C-l" hm--html-noregion-list-map) (define-key hm--html-noregion-sub-map-1 "\C-a" hm--html-noregion-anchor-map) (define-key hm--html-noregion-sub-map-1 - [(control i)] hm--html-noregion-graphics-map) - (define-key hm--html-noregion-sub-map-1 - "\C-t" hm--html-noregion-text-elements-map) -; (define-key hm--html-noregion-sub-map-1 "\C-b" hm--html-noregion-head-map) + [(control i)] hm--html-noregion-include-map) +; (define-key hm--html-noregion-sub-map-1 +; "\C-t" hm--html-noregion-text-elements-map) (define-key hm--html-noregion-sub-map-1 "\C-f" hm--html-noregion-frame-map) (define-key hm--html-noregion-sub-map-1 "\C-s" hm--html-noregion-structure-map) @@ -465,7 +439,7 @@ ) (defvar hm--html-region-sub-map nil - "Region sub keymap for the html-mode.") + "Region sub keymap for the `hm--html-mode'.") (if hm--html-region-sub-map () @@ -478,7 +452,8 @@ (if (adapt-emacs19p) (map-keymap '(lambda (key-description-list binding) (define-key hm--html-region-sub-map - (single-key-description key-description-list) binding)) + (vector key-description-list) binding)) +; (single-key-description key-description-list) binding)) hm--html-region-sub-map-1) (map-keymap '(lambda (key-description-list binding) (define-key hm--html-region-sub-map @@ -488,7 +463,7 @@ ) (defvar hm--html-noregion-sub-map nil - "Noregion keymap for the html-mode.") + "Noregion keymap for the `hm--html-mode'.") (if hm--html-noregion-sub-map () @@ -500,9 +475,10 @@ (if (adapt-emacs19p) (map-keymap '(lambda (key-description-list binding) - (define-key hm--html-region-sub-map - (single-key-description key-description-list) binding)) - hm--html-region-sub-map-1) + (define-key hm--html-noregion-sub-map + (vector key-description-list) binding)) +; (single-key-description key-description-list) binding)) + hm--html-noregion-sub-map-1) (map-keymap '(lambda (key-description-list binding) (define-key hm--html-noregion-sub-map key-description-list binding)) @@ -511,15 +487,28 @@ ) (defvar hm--html-mode-map nil - "Normal and noregion keymap for the html-mode.") + "Normal and noregion keymap for the `hm--html-mode'.") (if hm--html-mode-map () (setq hm--html-mode-map (make-sparse-keymap)) - (define-key hm--html-mode-map "\C-c" hm--html-noregion-sub-map) + (define-key hm--html-mode-map + hm--html-mode-prefix-key hm--html-noregion-sub-map) (if (adapt-xemacsp) - (define-key hm--html-mode-map '(button3) 'hm--popup-html-menu) - (define-key hm--html-mode-map [mouse-3] 'hm--popup-html-menu)) + (progn + (define-key hm--html-mode-map '(button3) 'hm--html-popup-menu) + (define-key hm--html-mode-map + [(meta control button1)] 'idd-mouse-drag-and-drop)) +; (define-key hm--html-mode-map [down-mouse-3] 'hm--html-popup-menu) + (if hm--html-expert + (define-key hm--html-mode-map + hm--html-emacs19-popup-noregion-menu-button + hm--html-menu-noregion-expert-map) + (define-key hm--html-mode-map + hm--html-emacs19-popup-noregion-menu-button + hm--html-menu-noregion-novice-map)) + (define-key hm--html-mode-map + [(meta control mouse-1)] 'idd-mouse-drag-and-drop)) (if hm--html-bind-latin-1-char-entities (progn (define-key hm--html-mode-map [adiaeresis] 'hm--html_ae) @@ -580,122 +569,171 @@ )) (define-key hm--html-mode-map "<" 'hm--html-smart-less-than) (define-key hm--html-mode-map ">" 'hm--html-smart-greater-than) - (define-key hm--html-mode-map "&" 'html-ampersand) + (define-key hm--html-mode-map "&" 'hm--html-smart-ampersand) ) (defvar hm--html-region-mode-map nil - "Region keymap for the html-mode.") + "Region keymap for the `hm--html-mode'.") (if hm--html-region-mode-map () (setq hm--html-region-mode-map (make-sparse-keymap)) - (define-key hm--html-region-mode-map "\C-c" hm--html-region-sub-map) + (define-key hm--html-region-mode-map + hm--html-mode-prefix-key hm--html-region-sub-map) (if (adapt-xemacsp) - (define-key hm--html-region-mode-map - '(button3) 'hm--popup-html-menu-region) - (define-key hm--html-region-mode-map - [mouse-3] 'hm--popup-html-menu-region)) - ;; It maybe a better idea to set the following to undefine in this list... - (if hm--html-bind-latin-1-char-entities (progn - (define-key hm--html-region-mode-map [adiaeresis] 'hm--html_ae) - (define-key hm--html-region-mode-map [odiaeresis] 'hm--html_oe) - (define-key hm--html-region-mode-map [udiaeresis] 'hm--html_ue) - (define-key hm--html-region-mode-map [aring] 'hm--html_aa) - (define-key hm--html-region-mode-map [Adiaeresis] 'hm--html_Ae) - (define-key hm--html-region-mode-map [Odiaeresis] 'hm--html_Oe) - (define-key hm--html-region-mode-map [Udiaeresis] 'hm--html_Ue) - (define-key hm--html-region-mode-map [Aring] 'hm--html_Aa) (define-key hm--html-region-mode-map - [ediaeresis] 'hm--html_ediaeresis) - (define-key hm--html-region-mode-map - [Ediaeresis] 'hm--html_Ediaeresis) - (define-key hm--html-region-mode-map - [idiaeresis] 'hm--html_idiaeresis) + '(button3) 'hm--html-popup-menu-region) (define-key hm--html-region-mode-map - [Idiaeresis] 'hm--html_Idiaeresis) - (define-key hm--html-region-mode-map [ssharp] 'hm--html_sz) - (define-key hm--html-region-mode-map [aacute] 'hm--html_aacute) - (define-key hm--html-region-mode-map [eacute] 'hm--html_eacute) - (define-key hm--html-region-mode-map [iacute] 'hm--html_iacute) - (define-key hm--html-region-mode-map [oacute] 'hm--html_oacute) - (define-key hm--html-region-mode-map [uacute] 'hm--html_uacute) - (define-key hm--html-region-mode-map [Aacute] 'hm--html_Aacute) - (define-key hm--html-region-mode-map [Eacute] 'hm--html_Eacute) - (define-key hm--html-region-mode-map [Iacute] 'hm--html_Iacute) - (define-key hm--html-region-mode-map [Oacute] 'hm--html_Oacute) - (define-key hm--html-region-mode-map [Uacute] 'hm--html_Uacute) - (define-key hm--html-region-mode-map [agrave] 'hm--html_agrave) - (define-key hm--html-region-mode-map [egrave] 'hm--html_egrave) - (define-key hm--html-region-mode-map [igrave] 'hm--html_igrave) - (define-key hm--html-region-mode-map [ograve] 'hm--html_ograve) - (define-key hm--html-region-mode-map [ugrave] 'hm--html_ugrave) - (define-key hm--html-region-mode-map [Agrave] 'hm--html_Agrave) - (define-key hm--html-region-mode-map [Egrave] 'hm--html_Egrave) - (define-key hm--html-region-mode-map [Igrave] 'hm--html_Igrave) - (define-key hm--html-region-mode-map [Ograve] 'hm--html_Ograve) - (define-key hm--html-region-mode-map [Ugrave] 'hm--html_Ugrave) - (define-key hm--html-region-mode-map [ccedilla] 'hm--html_ccedilla) - (define-key hm--html-region-mode-map [Ccedilla] 'hm--html_Ccedilla) - (define-key hm--html-region-mode-map - [acircumflex] 'hm--html_acircumflex) - (define-key hm--html-region-mode-map - [ecircumflex] 'hm--html_ecircumflex) - (define-key hm--html-region-mode-map - [icircumflex] 'hm--html_icircumflex) - (define-key hm--html-region-mode-map - [ocircumflex] 'hm--html_ocircumflex) - (define-key hm--html-region-mode-map - [ucircumflex] 'hm--html_ucircumflex) - (define-key hm--html-region-mode-map - [Acircumflex] 'hm--html_Acircumflex) - (define-key hm--html-region-mode-map - [Ecircumflex] 'hm--html_Ecircumflex) - (define-key hm--html-region-mode-map - [Icircumflex] 'hm--html_Icircumflex) - (define-key hm--html-region-mode-map - [Ocircumflex] 'hm--html_Ocircumflex) - (define-key hm--html-region-mode-map - [Ucircumflex] 'hm--html_Ucircumflex) - (define-key hm--html-region-mode-map [atilde] 'hm--html_atilde) - (define-key hm--html-region-mode-map [otilde] 'hm--html_otilde) - (define-key hm--html-region-mode-map [ntilde] 'hm--html_ntilde) - (define-key hm--html-region-mode-map [Atilde] 'hm--html_Atilde) - (define-key hm--html-region-mode-map [Otilde] 'hm--html_Otilde) - (define-key hm--html-region-mode-map [Ntilde] 'hm--html_Ntilde) - (define-key hm--html-region-mode-map [eth] 'hm--html_eth) - (define-key hm--html-region-mode-map [ETH] 'hm--html_Eth) - (define-key hm--html-region-mode-map [thorn] 'hm--html_thorn) - (define-key hm--html-region-mode-map [THORN] 'hm--html_Thorn) - )) - (define-key hm--html-region-mode-map "<" 'html-less-than) - (define-key hm--html-region-mode-map ">" 'html-greater-than) - (define-key hm--html-region-mode-map "&" 'html-ampersand) + [(meta control button1)] 'idd-mouse-drag-and-drop)) +; (define-key hm--html-region-mode-map +; [down-mouse-3] 'hm--html-popup-menu-region) + (if hm--html-expert + (define-key hm--html-region-mode-map + hm--html-emacs19-popup-region-menu-button + hm--html-menu-region-expert-map) + (define-key hm--html-region-mode-map + hm--html-emacs19-popup-region-menu-button + hm--html-menu-region-novice-map)) + (define-key hm--html-region-mode-map + [(meta control mouse-1)] 'idd-mouse-drag-and-drop)) + ;; It maybe a better idea to set the following to undefine in this list... +; (if hm--html-bind-latin-1-char-entities +; (progn +; (define-key hm--html-region-mode-map [adiaeresis] 'hm--html_ae) +; (define-key hm--html-region-mode-map [odiaeresis] 'hm--html_oe) +; (define-key hm--html-region-mode-map [udiaeresis] 'hm--html_ue) +; (define-key hm--html-region-mode-map [aring] 'hm--html_aa) +; (define-key hm--html-region-mode-map [Adiaeresis] 'hm--html_Ae) +; (define-key hm--html-region-mode-map [Odiaeresis] 'hm--html_Oe) +; (define-key hm--html-region-mode-map [Udiaeresis] 'hm--html_Ue) +; (define-key hm--html-region-mode-map [Aring] 'hm--html_Aa) +; (define-key hm--html-region-mode-map +; [ediaeresis] 'hm--html_ediaeresis) +; (define-key hm--html-region-mode-map +; [Ediaeresis] 'hm--html_Ediaeresis) +; (define-key hm--html-region-mode-map +; [idiaeresis] 'hm--html_idiaeresis) +; (define-key hm--html-region-mode-map +; [Idiaeresis] 'hm--html_Idiaeresis) +; (define-key hm--html-region-mode-map [ssharp] 'hm--html_sz) +; (define-key hm--html-region-mode-map [aacute] 'hm--html_aacute) +; (define-key hm--html-region-mode-map [eacute] 'hm--html_eacute) +; (define-key hm--html-region-mode-map [iacute] 'hm--html_iacute) +; (define-key hm--html-region-mode-map [oacute] 'hm--html_oacute) +; (define-key hm--html-region-mode-map [uacute] 'hm--html_uacute) +; (define-key hm--html-region-mode-map [Aacute] 'hm--html_Aacute) +; (define-key hm--html-region-mode-map [Eacute] 'hm--html_Eacute) +; (define-key hm--html-region-mode-map [Iacute] 'hm--html_Iacute) +; (define-key hm--html-region-mode-map [Oacute] 'hm--html_Oacute) +; (define-key hm--html-region-mode-map [Uacute] 'hm--html_Uacute) +; (define-key hm--html-region-mode-map [agrave] 'hm--html_agrave) +; (define-key hm--html-region-mode-map [egrave] 'hm--html_egrave) +; (define-key hm--html-region-mode-map [igrave] 'hm--html_igrave) +; (define-key hm--html-region-mode-map [ograve] 'hm--html_ograve) +; (define-key hm--html-region-mode-map [ugrave] 'hm--html_ugrave) +; (define-key hm--html-region-mode-map [Agrave] 'hm--html_Agrave) +; (define-key hm--html-region-mode-map [Egrave] 'hm--html_Egrave) +; (define-key hm--html-region-mode-map [Igrave] 'hm--html_Igrave) +; (define-key hm--html-region-mode-map [Ograve] 'hm--html_Ograve) +; (define-key hm--html-region-mode-map [Ugrave] 'hm--html_Ugrave) +; (define-key hm--html-region-mode-map [ccedilla] 'hm--html_ccedilla) +; (define-key hm--html-region-mode-map [Ccedilla] 'hm--html_Ccedilla) +; (define-key hm--html-region-mode-map +; [acircumflex] 'hm--html_acircumflex) +; (define-key hm--html-region-mode-map +; [ecircumflex] 'hm--html_ecircumflex) +; (define-key hm--html-region-mode-map +; [icircumflex] 'hm--html_icircumflex) +; (define-key hm--html-region-mode-map +; [ocircumflex] 'hm--html_ocircumflex) +; (define-key hm--html-region-mode-map +; [ucircumflex] 'hm--html_ucircumflex) +; (define-key hm--html-region-mode-map +; [Acircumflex] 'hm--html_Acircumflex) +; (define-key hm--html-region-mode-map +; [Ecircumflex] 'hm--html_Ecircumflex) +; (define-key hm--html-region-mode-map +; [Icircumflex] 'hm--html_Icircumflex) +; (define-key hm--html-region-mode-map +; [Ocircumflex] 'hm--html_Ocircumflex) +; (define-key hm--html-region-mode-map +; [Ucircumflex] 'hm--html_Ucircumflex) +; (define-key hm--html-region-mode-map [atilde] 'hm--html_atilde) +; (define-key hm--html-region-mode-map [otilde] 'hm--html_otilde) +; (define-key hm--html-region-mode-map [ntilde] 'hm--html_ntilde) +; (define-key hm--html-region-mode-map [Atilde] 'hm--html_Atilde) +; (define-key hm--html-region-mode-map [Otilde] 'hm--html_Otilde) +; (define-key hm--html-region-mode-map [Ntilde] 'hm--html_Ntilde) +; (define-key hm--html-region-mode-map [eth] 'hm--html_eth) +; (define-key hm--html-region-mode-map [ETH] 'hm--html_Eth) +; (define-key hm--html-region-mode-map [thorn] 'hm--html_thorn) +; (define-key hm--html-region-mode-map [THORN] 'hm--html_Thorn) +; )) + (define-key hm--html-region-mode-map "<" 'hm--html-smart-less-than) + (define-key hm--html-region-mode-map ">" 'hm--html-smart-greater-than) + (define-key hm--html-region-mode-map "&" 'hm--html-smart-ampersand) ) -;;; ----- - -;(use-local-map hm--html-mode-map) +;;; For the hm--html minor modes +(defvar hm--html-minor-mode-map nil + "Normal and noregion keymap for the `hm--html-minor-mode'.") -(or (assq 'hm--html-region-mode minor-mode-alist) - (setq minor-mode-alist - (purecopy - (append minor-mode-alist - '((hm--html-region-mode " Region")))))) - +(if hm--html-minor-mode-map + () + (setq hm--html-minor-mode-map (make-sparse-keymap)) + (define-key hm--html-minor-mode-map + hm--html-minor-mode-prefix-key hm--html-noregion-sub-map) + (if (adapt-xemacsp) + (progn + (define-key hm--html-minor-mode-map + '(button3) 'hm--html-popup-minor-html-menu) + (define-key hm--html-minor-mode-map + [(meta control button1)] 'idd-mouse-drag-and-drop)) + (if hm--html-expert + (define-key hm--html-minor-mode-map + hm--html-emacs19-popup-noregion-menu-button + hm--html-menu-noregion-expert-map) + (define-key hm--html-minor-mode-map + hm--html-emacs19-popup-noregion-menu-button + hm--html-menu-noregion-novice-map)) + (define-key hm--html-minor-mode-map + [(meta control mouse-1)] 'idd-mouse-drag-and-drop)) + (define-key hm--html-minor-mode-map "<" 'hm--html-smart-less-than) + (define-key hm--html-minor-mode-map ">" 'hm--html-smart-greater-than) + (define-key hm--html-minor-mode-map "&" 'hm--html-smart-ampersand) + ) -(defun html-region-mode (on) - "Turns the minor mode html-region-mode on or off. -The function turns the html-region-mode on, if ON is t and off otherwise." - (if (string= mode-name "HTML") - (if on - ;; html-region-mode on - (progn - (setq hm--html-region-mode t) - (use-local-map hm--html-region-mode-map)) - ;; html-region-mode off - (setq hm--html-region-mode nil) - (use-local-map hm--html-mode-map)))) +(defvar hm--html-minor-region-mode-map nil + "Region keymap for the `hm--html-minor-mode'.") +(if hm--html-minor-region-mode-map + () + (setq hm--html-minor-region-mode-map (make-sparse-keymap)) + (define-key hm--html-minor-region-mode-map + hm--html-minor-mode-prefix-key hm--html-region-sub-map) + (if (adapt-xemacsp) + (progn + (define-key hm--html-minor-region-mode-map + '(button3) 'hm--html-popup-menu-region) + (define-key hm--html-minor-region-mode-map + [(meta control button1)] 'idd-mouse-drag-and-drop)) + (if hm--html-expert + (define-key hm--html-minor-region-mode-map + hm--html-emacs19-popup-region-menu-button + hm--html-menu-region-expert-map) + (define-key hm--html-minor-region-mode-map + hm--html-emacs19-popup-region-menu-button + hm--html-menu-region-novice-map)) + (define-key hm--html-minor-region-mode-map + [(meta control mouse-1)] 'idd-mouse-drag-and-drop)) + (define-key hm--html-minor-region-mode-map "<" 'hm--html-smart-less-than) + (define-key hm--html-minor-region-mode-map ">" 'hm--html-smart-greater-than) + (define-key hm--html-minor-region-mode-map "&" 'hm--html-smart-ampersand) + ) + + +;;; Announce the feature hm--html-keys +(provide 'hm--html-keys)
--- a/lisp/hm--html-menus/hm--html-menu.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/hm--html-menus/hm--html-menu.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,5 +1,7 @@ -;;; hm--html-menu.el: A menu for the html-mode. -;;; v4.60; 17 Feb 1996 +;;; hm--html-menu --- A menu for the hm--html-mode. +;;; +;;; $Id: hm--html-menu.el,v 1.1.1.2 1996/12/18 03:46:46 steve Exp $ +;;; ;;; Copyright (C) 1993, 1994, 1995, 1996 Heiko Muenkel ;;; email: muenkel@tnt.uni-hannover.de ;;; @@ -20,14 +22,7 @@ ;;; ;;; Description: ;;; -;;; Defines pulldown and popup menus for the html mode. -;;; This file requires the following files: -;;; hm--html.el -;;; hm--date.el -;;; hm--html-configuration.el -;;; adapt.el -;;; html-mode.el -;;; The file html-mode.el is the html mode file from Marc Andreessen. +;;; Defines pulldown and popup menus for the html mode (hm--html-mode). ;;; ;;; You should also have the w3 package from William M. Perry, for ;;; browsing html- files in the xemacs and the program Xmosaic together @@ -36,23 +31,18 @@ ;;; ;;; Installation: ;;; -;;; Put this file in one of your load path directories and the -;;; following lines in your .emacs: -;;; -;;; (autoload 'html-mode "hm--html-menu" "HTML major mode." t) -;;; (or (assoc "\\.html$" auto-mode-alist) -;;; (setq auto-mode-alist (cons '("\\.html$" . html-mode) -;;; auto-mode-alist))) +;;; Put this file in one of your load path directories. ;;; -;;; Look at the file hm--html-configuration for further installation -;;; points. +;;; Look at the files hm--html-mode.el and hm--html-configuration +;;; for further installation points. ;;; - -(provide 'hm--html-menu) -(require 'html-mode) -(require 'hm--html) -(require 'adapt) +;(provide 'hm--html-menu) +;(require 'hm--html-drag-and-drop) +;(require 'html-mode) +;(require 'hm--html-mode) +;(require 'hm--html) +;(require 'adapt) ;; @@ -68,6 +58,9 @@ (setq hm--html-menu-noregion-expert '("HTML Noregion Expert Menu" ("Anchors" + ["Relative link..." hm--html-add-relative-link t] + ["General link..." hm--html-add-normal-link t] + "----" ["Html link..." hm--html-add-html-link t] ["Info link..." hm--html-add-info-link t] ["Gopher link..." hm--html-add-gopher-link t] @@ -82,7 +75,6 @@ "----" ["Proggate link..." hm--html-add-proggate-link t] ["Local Proggate link..." hm--html-add-local-proggate-link t] - ["General link..." html-add-normal-link t] "----" ["Link target..." hm--html-add-link-target t] ) @@ -100,7 +92,7 @@ ["Title..." hm--html-add-title t] ["Header..." hm--html-add-header t] ["Node Link..." hm--html-add-normal-node-link t] - ["Address" html-add-address t] + ["Address" hm--html-add-address t] ["Signature" hm--html-add-signature t] "----" ["Created comment" hm--html-insert-created-comment t] @@ -108,16 +100,17 @@ ["New date in title" hm--html-new-date t] ) ("Structure" - ["Menu or list item" html-add-list-or-menu-item t] - ["Menu" html-add-menu t] - ["Unordered list" html-add-list t] + ["Menu or list item" hm--html-add-list-or-menu-item t] + ["Menu" hm--html-add-menu t] + ["Unordered list" hm--html-add-list t] ["Ordered list" hm--html-add-numberlist t] ["Directory list" hm--html-add-directory-list t] "----" - ["Description list" html-add-description-list t] + ["Description list" hm--html-add-description-list t] ["Description title" hm--html-add-description-title t] - ["Description entry" hm--html-add-only-description-entry t] - ["Description title + entry" html-add-description-entry t] + ["Description entry" hm--html-add-description-entry t] + ["Description title + entry" + hm--html-add-description-title-and-entry t] "----" ["Table..." hm--html-add-table t] ["Table title..." hm--html-add-table-title t] @@ -138,56 +131,74 @@ ["Horizontal rule" hm--html-add-horizontal-rule t] ) ("Formating Paragraphs" - ["Without links" html-add-plaintext t] + ["Without links" hm--html-add-plaintext t] ["With links" hm--html-add-preformated t] "----" - ["Blockquote" html-add-blockquote t] - ["Listing" html-add-listing t] + ["Blockquote" hm--html-add-blockquote t] + ["Listing" hm--html-add-listing t] ["Abstract" hm--html-add-abstract t] + "----" + ["Center" hm--html-add-center t] ) ("Formatting Words" ["Bold" hm--html-add-bold t] ["Italic" hm--html-add-italic t] - ["Underline" hm--html-add-underline t] - ["Typewriter" html-add-fixed t] - ["Strikethru" hm--html-add-strikethru t] + ["Typewriter" hm--html-add-fixed t] + ["Small" hm--html-add-small t] + ["Big" hm--html-add-big t] ["Superscript" hm--html-add-superscript t] ["Subscript" hm--html-add-subscript t] + "----" + ["Underline" hm--html-add-underline t] + ["Strikethru" hm--html-add-strikethru t] ;; ["Render" hm--html-add-render t] "----" - ["Emphasized" html-add-emphasized t] - ["Strong" html-add-strong t] - "----" - ("Computing" +; ["Emphasized" hm--html-add-emphasized t] +; ["Strong" hm--html-add-strong t] +; "----" + ("Phrase" + ["Emphasized" hm--html-add-emphasized t] + ["Strong" hm--html-add-strong t] + "----" ["Definition" hm--html-add-definition t] - ["Keyboard" html-add-keyboard t] - ["Command" hm--html-add-command t] - ["Argument" hm--html-add-argument t] - ["Option" hm--html-add-option t] - ["Variable" html-add-variable t] - ["Instance" hm--html-add-instance t] + ["Keyboard" hm--html-add-keyboard t] + ["Variable" hm--html-add-variable t] ["Code" hm--html-add-code t] - ["Sample" html-add-sample t] + ["Sample" hm--html-add-sample t] + ["Citation" hm--html-add-citation t] ) - ("Literature" - ["Quote" hm--html-add-quote t] - ["Acronym" hm--html-add-acronym t] - ["Abbrevation" hm--html-add-abbrevation t] - ["Citation" html-add-citation t] - ["Literature" hm--html-add-literature t] - ["Publication" hm--html-add-publication t] - ["ISBN" hm--html-add-isbn t] - ) - ("Person" - ["Person" hm--html-add-person t] - ["Author" hm--html-add-author t] - ["Editor" hm--html-add-editor t] - ["Credits" hm--html-add-credits t] - ["Copyright" hm--html-add-copyright t] - ) - "----" - ["Footnote" hm--html-add-footnote t] - ["Margin" hm--html-add-margin t] +;; All the following commands are still implemented, but most +;; of them are not defined in HTM 3.2 +; ("Computing" +; ["Definition" hm--html-add-definition t] +; ["Keyboard" hm--html-add-keyboard t] +; ["Command" hm--html-add-command t] +; ["Argument" hm--html-add-argument t] +; ["Option" hm--html-add-option t] +; ["Variable" hm--html-add-variable t] +; ["Instance" hm--html-add-instance t] +; ["Code" hm--html-add-code t] +; ["Sample" hm--html-add-sample t] +; ) +; ("Literature" +; ["Quote" hm--html-add-quote t] +; ["Acronym" hm--html-add-acronym t] +; ["Abbrevation" hm--html-add-abbrevation t] +; ["Citation" hm--html-add-citation t] +; ["Literature" hm--html-add-literature t] +; ["Publication" hm--html-add-publication t] +; ["ISBN" hm--html-add-isbn t] +; ) +; ("Person" +; ["Person" hm--html-add-person t] +; ["Author" hm--html-add-author t] +; ["Editor" hm--html-add-editor t] +; ["Credits" hm--html-add-credits t] +; ["Copyright" hm--html-add-copyright t] +; ) +; "----" +; ["Footnote" hm--html-add-footnote t] +; ["Margin" hm--html-add-margin t] "----" ["HTML Comment" hm--html-add-comment t] ) @@ -195,6 +206,9 @@ ["Top aligned image..." hm--html-add-image-top t] ["Middle aligned image..." hm--html-add-image-middle t] ["Bottom aligned image..." hm--html-add-image-bottom t] + "----" + ["Applet..." hm--html-add-applet t] + ["Parameter..." hm--html-add-applet-parameter t] ; "----" ; ["File..." hm--html-add-server-side-include-file t] ; ["Command..." hm--html-add-server-side-include-command t] @@ -233,6 +247,8 @@ (setq hm--html-menu-noregion-novice '("HTML No-region Novice Menu" ("Anchors" + ["Relative link..." hm--html-add-relative-link t] + "----" ["Html link..." hm--html-add-html-link t] ["File link..." hm--html-add-file-link t] ) @@ -243,25 +259,28 @@ ["Signature" hm--html-add-signature t] ) ("Structure" - ["Menu item" html-add-list-or-menu-item t] - ["Menu" html-add-menu t] + ["Menu item" hm--html-add-list-or-menu-item t] + ["Menu" hm--html-add-menu t] "----" ["Paragraph Container" hm--html-add-paragraph t] ) ("Formating Paragraphs" - ["Without links" html-add-plaintext t] + ["Without links" hm--html-add-plaintext t] ["With links" hm--html-add-preformated t] ) ("Formatting Words" ["Bold" hm--html-add-bold t] ["Italic" hm--html-add-italic t] ["Underline" hm--html-add-underline t] - ["Typewriter" html-add-fixed t] + ["Typewriter" hm--html-add-fixed t] ))) (setq hm--html-menu-region-expert '("HTML Region Expert Menu" ("Anchors" + ["Relative link..." hm--html-add-relative-link-to-region t] + ["General link..." hm--html-add-normal-link-to-region t] + "----" ["Html link..." hm--html-add-html-link-to-region t] ["Info link..." hm--html-add-info-link-to-region t] ["Gopher link..." hm--html-add-gopher-link-to-region t] @@ -278,9 +297,8 @@ ["Local Proggate link..." hm--html-add-local-proggate-link-to-region t] - ["General link..." hm--html-add-normal-link-to-region t] "----" - ["Link target..." html-add-reference-to-region t] + ["Link target..." hm--html-add-link-target-to-region t] ) ("Frame" ["Full html frame..." hm--html-add-full-html-frame-with-region t] @@ -294,12 +312,15 @@ ["Address" hm--html-add-address-to-region t] ) ("Structure" + ["Menu item" hm--html-add-list-or-menu-item-to-region t] ["Menu" hm--html-add-menu-to-region t] ["Unordered list" hm--html-add-list-to-region t] ["Ordered list" hm--html-add-numberlist-to-region t] ["Directory list" hm--html-add-directorylist-to-region t] "----" ["Description list" hm--html-add-description-list-to-region t] + ["Description title" hm--html-add-description-title-to-region t] + ["Description entry" hm--html-add-description-entry-to-region t] "----" ["Table..." hm--html-add-table-to-region t] ["Table Title..." hm--html-add-table-title-to-region t] @@ -316,50 +337,68 @@ ["Blockquote" hm--html-add-blockquote-to-region t] ["Listing" hm--html-add-listing-to-region t] ["Abstract" hm--html-add-abstract-to-region t] + "----" + ["Center" hm--html-add-center-to-region t] ) ("Formatting Words" ["Bold" hm--html-add-bold-to-region t] ["Italic" hm--html-add-italic-to-region t] - ["Underline" hm--html-add-underline-to-region t] ["Typewriter" hm--html-add-fixed-to-region t] - ["Strikethru" hm--html-add-strikethru-to-region t] + ["Small" hm--html-add-small-to-region t] + ["Big" hm--html-add-big-to-region t] ["Superscript" hm--html-add-superscript-to-region t] ["Subscript" hm--html-add-subscript-to-region t] + "----" + ["Underline" hm--html-add-underline-to-region t] + ["Strikethru" hm--html-add-strikethru-to-region t] ;; ["Render" hm--html-add-render-to-region t] "----" - ["Emphasized" hm--html-add-emphasized-to-region t] - ["Strong" hm--html-add-strong-to-region t] - "----" - ("Computing" +; ["Emphasized" hm--html-add-emphasized-to-region t] +; ["Strong" hm--html-add-strong-to-region t] +; "----" + ("Phrase" + ["Emphasized" hm--html-add-emphasized-to-region t] + ["Strong" hm--html-add-strong-to-region t] + "----" ["Definition" hm--html-add-definition-to-region t] ["Keyboard" hm--html-add-keyboard-to-region t] - ["Command" hm--html-add-command-to-region t] - ["Argument" hm--html-add-argument-to-region t] - ["Option" hm--html-add-option-to-region t] ["Variable" hm--html-add-variable-to-region t] - ["Instance" hm--html-add-instance-to-region t] ["Code" hm--html-add-code-to-region t] ["Sample" hm--html-add-sample-to-region t] - ) - ("Literature" - ["Quote" hm--html-add-quote-to-region t] - ["Acronym" hm--html-add-acronym-to-region t] - ["Abbrevation" hm--html-add-abbrevation-to-region t] ["Citation" hm--html-add-citation-to-region t] - ["Literature" hm--html-add-literature-to-region t] - ["Publication" hm--html-add-publication-to-region t] - ["ISBN" hm--html-add-isbn-to-region t] ) - ("Person" - ["Person" hm--html-add-person-to-region t] - ["Author" hm--html-add-author-to-region t] - ["Editor" hm--html-add-editor-to-region t] - ["Credits" hm--html-add-credits-to-region t] - ["Copyright" hm--html-add-copyright-to-region t] - ) - "----" - ["Footnote" hm--html-add-footnote-to-region t] - ["Margin" hm--html-add-margin-to-region t] +;; All the following commands are still implemented, but most +;; of them are not defined in HTM 3.2 +; ("Computing" +; ["Definition" hm--html-add-definition-to-region t] +; ["Keyboard" hm--html-add-keyboard-to-region t] +; ["Command" hm--html-add-command-to-region t] +; ["Argument" hm--html-add-argument-to-region t] +; ["Option" hm--html-add-option-to-region t] +; ["Variable" hm--html-add-variable-to-region t] +; ["Instance" hm--html-add-instance-to-region t] +; ["Code" hm--html-add-code-to-region t] +; ["Sample" hm--html-add-sample-to-region t] +; ) +; ("Literature" +; ["Quote" hm--html-add-quote-to-region t] +; ["Acronym" hm--html-add-acronym-to-region t] +; ["Abbrevation" hm--html-add-abbrevation-to-region t] +; ["Citation" hm--html-add-citation-to-region t] +; ["Literature" hm--html-add-literature-to-region t] +; ["Publication" hm--html-add-publication-to-region t] +; ["ISBN" hm--html-add-isbn-to-region t] +; ) +; ("Person" +; ["Person" hm--html-add-person-to-region t] +; ["Author" hm--html-add-author-to-region t] +; ["Editor" hm--html-add-editor-to-region t] +; ["Credits" hm--html-add-credits-to-region t] +; ["Copyright" hm--html-add-copyright-to-region t] +; ) +; "----" +; ["Footnote" hm--html-add-footnote-to-region t] +; ["Margin" hm--html-add-margin-to-region t] "----" ["HTML Comment" hm--html-add-comment-to-region t] ) @@ -371,6 +410,8 @@ (setq hm--html-menu-region-novice '("HTML Region Novice Menu" ("Anchors" + ["Relative link..." hm--html-add-relative-link-to-region t] + "----" ["Html link..." hm--html-add-html-link-to-region t] ["File link..." hm--html-add-file-link-to-region t] ) @@ -380,6 +421,7 @@ ["Title and Header..." hm--html-add-title-and-header-to-region t] ) ("Structure" + ["Menu item" hm--html-add-list-or-menu-item-to-region t] ["Menu" hm--html-add-menu-to-region t] ) ("Formatting Paragraphs" @@ -399,27 +441,23 @@ (setq hm--html-pulldown-menu '("HTML Config Menu" ("Set popup menu" - ["Novice menu" hm--html-use-novice-menu t] - ["Expert menu" hm--html-use-expert-menu t] - ["Marcs menu" hm--html-use-marcs-menu t] + ["Novice menu" + hm--html-use-novice-menu + :active t + :style radio + :selected (not hm--html-expert)] + ["Expert menu" + hm--html-use-expert-menu + :active t + :style radio + :selected hm--html-expert] +; ["Marcs menu" hm--html-use-marcs-menu t] ) -; ("Highlighting" -; ["Toggle font lock mode" font-lock-mode (adapt-xemacsp)] -; ["Fontify buffer" font-lock-fontify-buffer (adapt-xemacsp)] -; ["Set font lock color..." -; hm--html-set-font-lock-color -; (or (adapt-xemacsp) (adapt-emacs19p))] -; "----" -; ["Toggle use highlighting" -; hm--html-toggle-use-highlighting -; html-use-highlighting] -; ) -; "----" ["Reload config files" hm--html-load-config-files t] ["Templates ..." hm--html-insert-template t] "----" ["Remove numeric names" hm--html-remove-numeric-names t] - ["Quotify hrefs" html-quotify-hrefs t] + ["Quotify hrefs" hm--html-quotify-hrefs t] "----" ["Submit bug report..." hm--html-submit-bug-report t] ["WWW Package Docs" hm--html-view-www-package-docu t] @@ -444,98 +482,322 @@ (if (adapt-xemacsp) - (defun hm--install-html-menu () - (if (and current-menubar (not (assoc "HTML" current-menubar))) + (defun hm--install-html-menu (menu-name) + (if (and current-menubar (not (assoc menu-name current-menubar))) (progn (set-buffer-menubar (copy-sequence current-menubar)) - (add-menu nil "HTML" (cdr hm--html-pulldown-menu))))) - (defun hm--install-html-menu () - (if (and current-menubar (not (assoc "HTML" current-menubar))) - (progn - (set-buffer-menubar current-menubar))) -; (setq lucid-menubar-map nil) -; (make-local-variable 'lucid-menubar-map) -; (set-buffer-menubar (copy-sequence current-menubar)) -; (make-local-variable 'lucid-menubar-map) -; (make-local-variable 'current-menubar))) - (add-menu nil "HTML" (cdr hm--html-pulldown-menu)) - )) + (add-menu nil menu-name (cdr hm--html-pulldown-menu))))) + + (defun hm--install-html-menu (menu-name) + (if (eq major-mode 'hm--html-mode) + (easy-menu-define hm--html-menu-map + hm--html-mode-map + "The hm--html-mode pulldown menu." + (cons menu-name + (cdr hm--html-pulldown-menu))) + (easy-menu-define hm--html-minor-menu-map + hm--html-minor-mode-map + "The hm--html-minor-mode pulldown menu." + (cons menu-name + (cdr hm--html-pulldown-menu)))) +; (easy-menu-define hm--html-region-menu-map +; hm--html-region-mode-map +; "The hm--html-mode pulldown menu, if a region is active." +; (cons menu-name +; (cdr hm--html-pulldown-menu))) +; (if (and current-menubar (not (assoc "HTML" current-menubar))) +; (progn +; (set-buffer-menubar current-menubar) +; )) +; (add-menu nil "HTML" (cdr hm--html-pulldown-menu)) + )) -; (add-menu nil "HTML" (cdr hm--html-pulldown-menu)))) +(if (adapt-emacs19p) + (progn + (setq hm--html-menu-noregion-expert-map + (make-lucid-menu-keymap (car hm--html-menu-noregion-expert) + (cdr hm--html-menu-noregion-expert))) + + (setq hm--html-menu-region-expert-map + (make-lucid-menu-keymap (car hm--html-menu-region-expert) + (cdr hm--html-menu-region-expert))) -;(defun hm--popup-html-menu (event) -; "Pops the HTML- menu up." -; (interactive "@e") -; (if hm--html-marc -; (popup-menu html-menu) -; (if hm--html-expert -; (if hm--region-active -; (popup-menu hm--html-menu-region-expert) -; (popup-menu hm--html-menu-noregion-expert)) -; (if hm--region-active -; (popup-menu hm--html-menu-region-novice) -; (popup-menu hm--html-menu-noregion-novice))))) + (setq hm--html-menu-noregion-novice-map + (make-lucid-menu-keymap (car hm--html-menu-noregion-novice) + (cdr hm--html-menu-noregion-novice))) + + (setq hm--html-menu-region-novice-map + (make-lucid-menu-keymap (car hm--html-menu-region-novice) + (cdr hm--html-menu-region-novice))) + + ;; Speeds up the first popup of a menu + (if hm--html-expert + (progn + (x-popup-menu nil hm--html-menu-noregion-expert-map) + (x-popup-menu nil hm--html-menu-region-expert-map) + ) + (x-popup-menu nil hm--html-menu-noregion-novice-map) + (x-popup-menu nil hm--html-menu-region-novice-map)) -(defun hm--popup-html-menu (event) - "Pops the HTML- menu up, if no region is active." - (interactive "@e") - (if hm--html-marc - (popup-menu html-menu) +; (defun hm--html-emacs19-popup-menu (menu event) +; (let ((pos (posn-x-y (event-end event))) +; (window (posn-window (event-start event))) +; (answer)) +; (while menu +; (setq answer (x-popup-menu (list (list (car pos) (cdr pos)) +; window) +; menu)) +; (setq cmd (lookup-key menu (apply 'vector answer))) +; (setq menu nil) +; (and cmd +; (if (keymapp cmd) +; (setq menu cmd) +; (call-interactively cmd)))))) + +; (defun hm--html-popup-menu (event) +; "Pops the HTML- menu up, if no region is active." +; (interactive "@e") +; (if hm--html-expert +; (hm--html-emacs19-popup-menu hm--html-menu-noregion-expert-map +; event) +; (hm--html-emacs19-popup-menu hm--html-menu-noregion-novice-map +; event))) + +; (defun hm--html-popup-menu-region (event) +; "Pops the HTML- menu up, if a region is active." +; (interactive "@e") +; (if hm--html-expert +; (hm--html-emacs19-popup-menu hm--html-menu-region-expert-map +; event) +; (hm--html-emacs19-popup-menu hm--html-menu-region-novice-map +; event))) + ) + + (defun hm--html-popup-menu (event) + "Pops the HTML- menu up, if no region is active." + (interactive "@e") +; (if hm--html-marc +; (popup-menu html-menu) (if hm--html-expert (popup-menu hm--html-menu-noregion-expert) - (popup-menu hm--html-menu-noregion-novice)))) + (popup-menu hm--html-menu-noregion-novice))) +;) -(defun hm--popup-html-menu-region (event) - "Pops the HTML- menu up, if a region is active." - (interactive "@e") - (if hm--html-marc - (popup-menu html-menu) + (defun hm--html-popup-menu-region (event) + "Pops the HTML- menu up, if a region is active." + (interactive "@e") +; (if hm--html-marc +; (popup-menu html-menu) (if hm--html-expert (popup-menu hm--html-menu-region-expert) - (popup-menu hm--html-menu-region-novice)))) - - -(defun hm--html-use-novice-menu () - "Changes the HTML popup menu to the novice menu." - (interactive) - (setq hm--html-expert nil) - (setq hm--html-marc nil) -; (define-key html-mode-map '(button3) 'hm--popup-html-menu) -; (define-key html-region-mode-map '(button3) 'hm--popup-html-menu) - ) - - -(defun hm--html-use-expert-menu () - "Changes the HTML popup menu to the expert menu." - (interactive) - (setq hm--html-expert t) - (setq hm--html-marc nil) -; (define-key html-mode-map '(button3) 'hm--popup-html-menu) -; (define-key html-region-mode-map '(button3) 'hm--popup-html-menu) + (popup-menu hm--html-menu-region-novice))) +;) ) -(defun hm--html-use-marcs-menu () - "Changes the HTML popup menu to Marc Andreessens menu." - (interactive) - (setq hm--html-marc t) +(if (adapt-xemacsp) + (progn + + (defun hm--html-use-novice-menu () + "Changes the HTML popup menu to the novice menu." + (interactive) + (setq hm--html-expert nil) +; (setq hm--html-marc nil) +; (define-key html-mode-map '(button3) 'hm--popup-html-menu) +; (define-key html-region-mode-map '(button3) 'hm--popup-html-menu) + ) + + + (defun hm--html-use-expert-menu () + "Changes the HTML popup menu to the expert menu." + (interactive) + (setq hm--html-expert t) +; (setq hm--html-marc nil) ; (define-key html-mode-map '(button3) 'hm--popup-html-menu) ; (define-key html-region-mode-map '(button3) 'hm--popup-html-menu) + ) + ) + + ;; For the Emacs 19 + (defun hm--html-use-novice-menu () + "Changes the HTML popup menu to the novice menu." + (interactive) + (setq hm--html-expert nil) + (define-key hm--html-region-mode-map + hm--html-emacs19-popup-region-menu-button + hm--html-menu-region-novice-map) + (define-key hm--html-minor-region-mode-map + hm--html-emacs19-popup-region-menu-button + hm--html-menu-region-novice-map) + (if (not hm--html-region-mode) + (define-key hm--html-mode-map + hm--html-emacs19-popup-noregion-menu-button + hm--html-menu-noregion-novice-map)) + (if (not hm--html-minor-region-mode) + (define-key hm--html-minor-mode-map + hm--html-emacs19-popup-noregion-menu-button + hm--html-menu-noregion-novice-map)) + ) + + (defun hm--html-use-expert-menu () + "Changes the HTML popup menu to the expert menu." + (interactive) + (setq hm--html-expert t) + (define-key hm--html-region-mode-map + hm--html-emacs19-popup-region-menu-button + hm--html-menu-region-expert-map) + (define-key hm--html-minor-region-mode-map + hm--html-emacs19-popup-region-menu-button + hm--html-menu-region-expert-map) + (if (not hm--html-region-mode) + (define-key hm--html-mode-map + hm--html-emacs19-popup-noregion-menu-button + hm--html-menu-noregion-expert-map)) + (if (not hm--html-minor-region-mode) + (define-key hm--html-minor-mode-map + hm--html-emacs19-popup-noregion-menu-button + hm--html-menu-noregion-expert-map)) + ) ) +;(defun hm--html-use-marcs-menu () +; "Changes the HTML popup menu to Marc Andreessens menu." +; (interactive) +; (setq hm--html-marc t) +; ) + ;(define-key html-mode-map '(button3) 'hm--popup-html-menu) ;(define-key html-region-mode-map '(button3) 'hm--popup-html-menu) -(add-hook 'html-mode-hook 'hm--install-html-menu) +;(add-hook 'html-mode-hook 'hm--install-html-menu) -(defvar hm--html-menu-load-hook nil - "*Hook variable to execute functions after loading the file hm--html-menu.") +;(defun sgml-popup-menu (event title entries) +; "Display a popup menu." +; (setq entries +; (loop for ent in entries collect +; (vector (car ent) +; (list 'setq 'value (list 'quote (cdr ent))) +; t))) +; (cond ((> (length entries) sgml-max-menu-size) +; (setq entries +; (loop for i from 1 while entries collect +; (let ((submenu +; (subseq entries 0 (min (length entries) +; sgml-max-menu-size)))) +; (setq entries (nthcdr sgml-max-menu-size +; entries)) +; (cons +; (format "%s '%s'-'%s'" +; title +; (sgml-range-indicator (aref (car submenu) 0)) +; (sgml-range-indicator +; (aref (car (last submenu)) 0))) +; submenu)))))) +;; (sgml-xemacs-get-popup-value (cons title entries))) +; (sgml-xemacs-get-popup-value (append hm--html-popup-menu +; (list "--" "--" title "==") +; entries))) + +(defvar hm--html-use-psgml t + "Set this to t, if functions from the psgml-mode should be used.") + +;;; Popup the menus in the minor mode + +(if (adapt-xemacsp) + (progn + + (defadvice sgml-xemacs-get-popup-value (around + hm--html-popup-menu-advice + activate) + "Calls `hm--html-sgml-xemacs-get-popup-value' instead of the original. +`hm--html-sgml-xemacs-get-popup-value' is only called, if the +`hm--html-minor-mode' is active. +`hm--html-sgml-xemacs-get-popup-value' adds the 'hm--html-mode' popup +menus to the psgml popup menu." + (if hm--html-minor-mode + (setq ad-return-value + (hm--html-sgml-xemacs-get-popup-value (ad-get-arg 0))) + ad-do-it)) + + (defun hm--html-sgml-xemacs-get-popup-value (menudesc) + (let ((value nil) + (event nil)) + ;; (popup-menu menudesc) + (popup-menu (append hm--html-popup-menu ; for the hm--html-menu + (list "==" ; + (car menudesc) ; + "==") ; + (cdr menudesc))) ; + (while (popup-menu-up-p) + (setq event (next-command-event event)) + (cond ((menu-event-p event) + (cond + ((eq (event-object event) 'abort) + (signal 'quit nil)) + ((eq (event-object event) 'menu-no-selection-hook) + nil) + ((commandp (event-object event)) ; for the + (call-interactively (event-object event)) ; hm--html-menu + (signal 'quit nil)) ; items + (t + (eval (event-object event))))) + ((button-release-event-p event) ; don't beep twice + nil) + ((and (fboundp 'event-matches-key-specifier-p) + (event-matches-key-specifier-p event (quit-char))) + (signal 'quit nil)) + (t + (beep) + (message "please make a choice from the menu.")))) + value)) + ) +; Fuer den Emacs 19 fehlt hier noch etwas !!! + ) + +(if (adapt-xemacsp) + (progn + + (defun hm--html-popup-minor-html-menu (event) + "Pops the HTML- menu up, if no region is active." + (interactive "@e") + (if hm--html-use-psgml + (let ((hm--html-popup-menu (if hm--html-expert + hm--html-menu-noregion-expert + hm--html-menu-noregion-novice))) + (sgml-tags-menu event)) + (if hm--html-expert + (popup-menu hm--html-menu-noregion-expert) + (popup-menu hm--html-menu-noregion-novice)) + )) + + + (defun hm--html-popup-minor-html-menu-region (event) + "Pops the HTML- menu up, if a region is active." + (interactive "@e") + (if hm--html-use-psgml + (let ((hm--html-popup-menu (if hm--html-expert + hm--html-menu-region-expert + hm--html-menu-region-novice))) + (sgml-tags-menu event)) + (if hm--html-expert + (popup-menu hm--html-menu-region-expert) + (popup-menu hm--html-menu-region-novice)) + )) + + )) + + +;(defvar hm--html-menu-load-hook nil +; "*Hook variable to execute functions after loading the file hm--html-menu.") (run-hooks 'hm--html-menu-load-hook) + +;;; Announce the feature hm--html-menu +(provide 'hm--html-menu)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/hm--html-menus/hm--html-mode.el Mon Aug 13 08:46:35 2007 +0200 @@ -0,0 +1,311 @@ +;;; hm--html-mode --- Major mode for editing HTML documents for the WWW +;;; +;;; Keywords: hypermedia languages help docs wp +;;; +;;; $Id: hm--html-mode.el,v 1.1.1.1 1996/12/18 03:46:48 steve Exp $ +;;; +;;; Copyright (C) 1996 Heiko Muenkel +;;; email: muenkel@tnt.uni-hannover.de +;;; +;;; This program 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 1, or (at your option) +;;; any later version. +;;; +;;; This program 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 this program; if not, write to the Free Software +;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +;;; +;;; Commentary: +;;; Description: +;;; +;;; This file defines the hm--html-mode, a mode for editing html +;;; files. It is the main file of the package hm--html-menus. +;;; Previous releases had used the file html-mode.el from Marc +;;; Andreessen. In that times the mode was called html-mode. I've +;;; changed the name of the mode to distinquish it from other +;;; html modes. But feel free to set a +;;; (defalias 'hm--html-mode 'html-mode) +;;; to get back the old name of the mode. +;;; +;;; In the earlier releases of the package the main file was +;;; hm--html-menu.el. This has been changed to hm--html-mode.el. +;;; +;;; Installation: +;;; +;;; Put this file and all the other files of the package +;;; in one of your load path directories and the +;;; following lines in your .emacs: +;;; +;;; (autoload 'hm--html-mode "hm--html-mode" "HTML major mode." t) +;;; +;;; (or (assoc "\\.html$" auto-mode-alist) +;;; (setq auto-mode-alist (cons '("\\.html$" . hm--html-mode) +;;; auto-mode-alist))) +;;; If there is already another html-mode (like psgml in the XEmacs +;;; 19.14, then you must put the following instead of the last form +;;; in your .emacs: +;;; (setq auto-mode-alist (cons '("\\.html$" . hm--html-mode) +;;; auto-mode-alist)) +;;; +;;; Look at the file hm--html-configuration for further installation +;;; points. +;;; +;;; + + +(require 'font-lock) +(require 'adapt) +(require 'hm--date) +(require 'hm--html) +(hm--html-load-config-files) +(require 'hm--html-menu) +(require 'hm--html-drag-and-drop) +;(hm--html-load-config-files) ; Load the system and user configuration files +(require 'hm--html-keys) + + +;;; The package version +(defconst hm--html-menus-package-maintainer "muenkel@tnt.uni-hannover.de") + +(defconst hm--html-menus-package-name "hm--html-menus") + +(defconst hm--html-menus-package-version "5.0") + + +;;; Generate the help buffer faces +(hm--html-generate-help-buffer-faces) + +;;; syntax table + +(defvar hm--html-mode-syntax-table nil + "Syntax table used while in html mode.") + +(if hm--html-mode-syntax-table + () + (setq hm--html-mode-syntax-table (make-syntax-table)) + (modify-syntax-entry ?\" ". " hm--html-mode-syntax-table) + (modify-syntax-entry ?\\ ". " hm--html-mode-syntax-table) + (modify-syntax-entry ?' "w " hm--html-mode-syntax-table)) + + +;;; abbreviation table + +(defvar hm--html-mode-abbrev-table nil + "Abbrev table used while in html mode.") + +(define-abbrev-table 'hm--html-mode-abbrev-table ()) + +;;; the hm--html-mode + +(defvar hm--html-mode-name-string "HTML" + "The hm--html-mode name string.") + +;;;###autoload +(defun hm--html-mode () + "Major mode for editing HTML hypertext documents. +Special commands:\\{hm--html-mode-map} +Turning on hm--html-mode calls the value of the variable hm--html-mode-hook, +if that value is non-nil." + (interactive) + (kill-all-local-variables) + (use-local-map hm--html-mode-map) + (setq mode-name hm--html-mode-name-string) + (setq major-mode 'hm--html-mode) + (setq local-abbrev-table hm--html-mode-abbrev-table) + (set-syntax-table hm--html-mode-syntax-table) + (setq idd-actions hm--html-idd-actions) + (hm--install-html-menu hm--html-mode-pulldown-menu-name) + (make-variable-buffer-local 'write-file-hooks) + (add-hook 'write-file-hooks 'hm--html-maybe-new-date-and-changed-comment) + (make-local-variable 'font-lock-keywords) + (setq font-lock-keywords hm--html-font-lock-keywords) + (run-hooks 'hm--html-mode-hook)) + +;;;; Minor Modes + +;;; hm--html-region-mode + +(defvar hm--html-region-mode nil + "T, if the region is active in the `hm--html-mode'.") + +(make-variable-buffer-local 'hm--html-region-mode) + +(add-minor-mode 'hm--html-region-mode " Region" hm--html-region-mode-map) + +(if (adapt-xemacsp) + + (defun hm--html-region-mode (&optional arg) + "Toggle 'hm--html-region-mode'. +With ARG, turn hm--html-region-mode on iff ARG is positive. + +If the `major-mode' isn't the `hm--html-mode' then the minor +mode is switched off, regardless of the ARG and the state +of `hm--html-region-mode'." + (interactive "P") + (setq zmacs-regions-stays t) + (setq hm--html-region-mode + (and (eq major-mode 'hm--html-mode) + (if (null arg) (not hm--html-region-mode) + (> (prefix-numeric-value arg) 0)))) + ) + + (defun hm--html-region-mode (&optional arg) + "Toggle 'hm--html-region-mode'. +With ARG, turn hm--html-region-mode on iff ARG is positive. + +If the `major-mode' isn't the `hm--html-mode' then the minor +mode is switched off, regardless of the ARG and the state +of `hm--html-region-mode'." + (interactive "P") + (setq hm--html-region-mode + (and (eq major-mode 'hm--html-mode) + (if (null arg) (not hm--html-region-mode) + (> (prefix-numeric-value arg) 0)))) + (if hm--html-region-mode + (define-key hm--html-mode-map + hm--html-emacs19-popup-noregion-menu-button + nil) + (if hm--html-expert + (define-key hm--html-mode-map + hm--html-emacs19-popup-noregion-menu-button + hm--html-menu-noregion-expert-map) + (define-key hm--html-mode-map + hm--html-emacs19-popup-noregion-menu-button + hm--html-menu-noregion-novice-map))) + ) + + ) + +;(or (assq 'hm--html-region-mode minor-mode-alist) +; (setq minor-mode-alist +; (purecopy +; (append minor-mode-alist +; '((hm--html-region-mode " Region")))))) + + + +;(defun hm--html-region-mode (on) +; "Turns the minor mode hm--html-region-mode on or off. +;The function turns the hm--html-region-mode on, if ON is t and off otherwise." +; (if (eq major-mode 'hm--html-mode) +; ;;(string= mode-name "HTML") +; (if on +; ;; html-region-mode on +; (progn +; (setq hm--html-region-mode t) +; (use-local-map hm--html-region-mode-map)) +; ;; html-region-mode off +; (setq hm--html-region-mode nil) +; (use-local-map hm--html-mode-map)))) + + + + +;;; hm--html-minor-mode + +(defvar hm--html-minor-mode nil + "Non-nil, if the `hm--html-minor-mode' is active.") + +(make-variable-buffer-local 'hm--html-minor-mode) + +(add-minor-mode 'hm--html-minor-mode " HM-HTML" hm--html-minor-mode-map) + +;;;###autoload +(defun hm--html-minor-mode (&optional arg) + "Toggle hm--html-minor-mode. +With arg, turn hm--html-minor-mode on iff arg is positive." + (interactive "P") + (setq hm--html-minor-mode + (if (null arg) (not hm--html-minor-mode) + (> (prefix-numeric-value arg) 0))) + (if hm--html-minor-mode + (hm--install-html-menu hm--html-minor-mode-pulldown-menu-name) + (if (and current-menubar (assoc hm--html-minor-mode-pulldown-menu-name + current-menubar)) + (delete-menu-item (list hm--html-minor-mode-pulldown-menu-name)))) + ) + + +;;; hm--html-minor-region-mode + +(defvar hm--html-minor-region-mode nil + "Non-nil, if the `hm--html-minor-region-mode' is active.") + +(make-variable-buffer-local 'hm--html-minor-region-mode) + +(add-minor-mode 'hm--html-minor-region-mode + " Region" + hm--html-minor-region-mode-map) + + +(if (adapt-xemacsp) + + (defun hm--html-minor-region-mode (&optional arg) + "Toggle `hm--html-minor-region-mode'. +With arg, turn `hm--html-minor-region-mode' on iff arg is positive. + +But however, if the `hm--html-minor-mode' isn't active, then it +turns `hm--html-minor-region-mode' off." + (interactive "P") + (setq zmacs-regions-stays t) + (setq hm--html-minor-region-mode + (and hm--html-minor-mode + (if (null arg) (not hm--html-minor-region-mode) + (> (prefix-numeric-value arg) 0)))) + ) + + (defun hm--html-minor-region-mode (&optional arg) + "Toggle `hm--html-minor-region-mode'. +With arg, turn `hm--html-minor-region-mode' on iff arg is positive. + +But however, if the `hm--html-minor-mode' isn't active, then it +turns `hm--html-minor-region-mode' off." + (interactive "P") + (setq hm--html-minor-region-mode + (and hm--html-minor-mode + (if (null arg) (not hm--html-minor-region-mode) + (> (prefix-numeric-value arg) 0)))) + (if hm--html-minor-region-mode + (define-key hm--html-minor-mode-map + hm--html-emacs19-popup-noregion-menu-button + nil) + (if hm--html-expert + (define-key hm--html-minor-mode-map + hm--html-emacs19-popup-noregion-menu-button + hm--html-menu-noregion-expert-map) + (define-key hm--html-minor-mode-map + hm--html-emacs19-popup-noregion-menu-button + hm--html-menu-noregion-novice-map))) + ) + ) + + + +;;; Hook function for toggling the region minor modes +(defun hm--html-switch-region-modes-on () + "Switches the region minor modes of the hm--html-menus package on. +This function should be only be used for the `zmacs-activate-region-hook' +or for the `activate-mark-hook'." + (hm--html-region-mode 1) + (hm--html-minor-region-mode 1)) + +(defun hm--html-switch-region-modes-off () + "Switches the region minor modes of the hm--html-menus package on. +This function should be only be used for the `zmacs-deactivate-region-hook' +or for the `deactivate-mark-hook'." + (hm--html-region-mode -1) + (hm--html-minor-region-mode -1)) + + +;;; Run the load hook +(run-hooks 'hm--html-load-hook) + + +;;; Announce the feature hm--html-configuration +(provide 'hm--html-mode)
--- a/lisp/hm--html-menus/hm--html.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/hm--html-menus/hm--html.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,5 +1,5 @@ -;;; hm--html.el: -;;; v6.00; 17 Feb 1996 +;;; $Id: hm--html.el,v 1.1.1.2 1996/12/18 03:46:47 steve Exp $ +;;; ;;; Copyright (C) 1993, 1994, 1995, 1996 Heiko Muenkel ;;; email: muenkel@tnt.uni-hannover.de ;;; @@ -27,48 +27,62 @@ ;;; Put this file in one of your load path directories. ;;; - - -(provide 'hm--html) -(require 'hm--date) -(require 'adapt) +;(require 'hm--date) +;(require 'adapt) -(defconst hm--html-menus-package-maintainer "muenkel@tnt.uni-hannover.de") - -(defconst hm--html-menus-package-name "hm--html-menus") - -(defconst hm--html-menus-package-version "4.16") - +;;; Indentation + +(defun hm--html-indent-region (begin end) + "Indents the region between BEGIN and END according to the major mode." + (when (< end begin) + (let ((a end)) + (setq end start) + (setq start a))) + (save-excursion + (goto-char begin) + (let ((old-point)) + (while (and (<= (point) end) + (not (eq (point) old-point))) + (setq old-point (point)) + (indent-according-to-mode) + (forward-line) + )))) + ;;; Functions for adding html commands which consists of a start and a ;;; end tag and some text between them. (Basicfunctions) (defun hm--html-add-tags (function-insert-start-tag start-tag - &optional function-insert-end-tag - &optional end-tag - &optional function-insert-middle-tag - &optional middle-tag) + &optional + function-insert-end-tag + end-tag + function-insert-middle-start-tag + middle-start-tag + function-insert-middle-end-tag + middle-end-tag) "Adds the start and the end html tag at point. The first parameter specifies the funtion which insert the start tag and the third parameter specifies the function which insert the end tag. The second parameter is the string for the start tag and the fourth parameter is the string for the end tag. The third and fourth parameters are optional. The fifth parameter is optional. If it exists, it specifies a function which -inserts the sixth parameter (the middle-tag) between the start and the end +inserts the sixth parameter (the middle-start-tag) between the start and the end tag." ; (interactive "aFunction, which adds the HTML start tag: \n\ ;aFunction, which adds the HTML end tag: \n\ ;sThe HTML start tag: \n\ ;sThe HTML end tag: ") (eval (list function-insert-start-tag start-tag)) - (if function-insert-middle-tag - (eval (list function-insert-middle-tag middle-tag))) - (if function-insert-end-tag - (let ((position (point))) - (eval (list function-insert-end-tag end-tag)) - (goto-char position)))) + (if function-insert-middle-start-tag + (eval (list function-insert-middle-start-tag middle-start-tag))) + (let ((position (point))) + (if function-insert-middle-end-tag + (eval (list function-insert-middle-end-tag middle-end-tag))) + (if function-insert-end-tag + (eval (list function-insert-end-tag end-tag))) + (goto-char position))) (defun hm--html-add-tags-to-region (function-insert-start-tag @@ -106,7 +120,8 @@ The parameter must be a string (i.e. \"<B>\")" (let ((start (point))) (insert tag) - (html-maybe-deemphasize-region start (- (point) 1)))) + (hm--html-indent-region start (point)))) +; (html-maybe-deemphasize-region start (- (point) 1)))) (defun hm--html-insert-end-tag (tag) @@ -114,7 +129,8 @@ The parameter must be a string (i.e. \"</B>\")" (let ((start (point))) (insert tag) - (html-maybe-deemphasize-region start (- (point) 1)))) + (hm--html-indent-region start (point)))) +; (html-maybe-deemphasize-region start (- (point) 1)))) (defun hm--html-insert-start-tag-with-newline (tag) @@ -122,7 +138,9 @@ The parameter must be a string (i.e. \"<PRE>\")" (let ((start (point))) (insert tag) - (html-maybe-deemphasize-region start (- (point) 1))) + (hm--html-indent-region start (point)) + ) +; (html-maybe-deemphasize-region start (- (point) 1))) (insert "\n")) @@ -132,12 +150,30 @@ (insert "\n") (let ((start (point))) (insert tag) - (html-maybe-deemphasize-region start (- (point) 1)))) + (hm--html-indent-region start (point)))) +; (html-maybe-deemphasize-region start (- (point) 1)))) ;;; Functions which add simple tags of the form <tag> +(defun hm--html-add-list-or-menu-item-separator () + "Adds a list or menu item. Assume we're at the end of the last item." + (interactive) + (hm--html-add-tags 'hm--html-insert-end-tag-with-newline "<LI> ")) + +(defun hm--html-add-list-or-menu-item () + "Adds the tags for a menu item at the point in the current buffer." + (interactive) + (hm--html-add-tags 'hm--html-insert-end-tag-with-newline "<LI> " + 'hm--html-insert-end-tag " </LI>")) + +(defun hm--html-add-list-or-menu-item-to-region () + "Adds the tags for a menu item to the region in the current buffer." + (interactive) + (hm--html-add-tags-to-region 'hm--html-insert-start-tag "<LI> " + 'hm--html-insert-end-tag " </LI>")) + (defun hm--html-add-line-break () "Adds the HTML tag for a line break." (interactive) @@ -255,34 +291,77 @@ "Add an image, bottom aligned." (interactive (let ((url (hm--html-read-url "Image URL: "))) (list url (hm--html-read-altenate url)))) - (let ((start (point))) - (if alt - (insert "<IMG ALIGN=BOTTOM SRC=\"" href "\" ALT=\"" alt "\">") - (insert "<IMG ALIGN=BOTTOM SRC=\"" href "\">")) - (html-maybe-deemphasize-region (1+ start) (1- (point))))) + (hm--html-add-tags + 'hm--html-insert-start-tag + (concat "<IMG ALIGN=BOTTOM SRC=\"" + href + (when alt + (concat "\" ALT=\"" alt)) + "\">"))) (defun hm--html-add-image-middle (href alt) "Add an image, middle aligned." (interactive (let ((url (hm--html-read-url "Image URL: "))) (list url (hm--html-read-altenate url)))) - (let ((start (point))) - (if alt - (insert "<IMG ALIGN=MIDDLE SRC=\"" href "\" ALT=\"" alt "\">") - (insert "<IMG ALIGN=MIDDLE SRC=\"" href "\">")) - (html-maybe-deemphasize-region (1+ start) (1- (point))))) + (hm--html-add-tags + 'hm--html-insert-start-tag + (concat "<IMG ALIGN=MIDDLE SRC=\"" + href + (when alt + (concat "\" ALT=\"" alt)) + "\">"))) (defun hm--html-add-image-top (href alt) "Add an image, top aligned." (interactive (let ((url (hm--html-read-url "Image URL: "))) (list url (hm--html-read-altenate url)))) - (let ((start (point))) - (if alt - (insert "<IMG ALIGN=TOP SRC=\"" href "\" ALT=\"" alt "\">") - (insert "<IMG ALIGN=TOP SRC=\"" href "\">")) - (html-maybe-deemphasize-region (1+ start) (1- (point))))) - + (hm--html-add-tags + 'hm--html-insert-start-tag + (concat "<IMG ALIGN=TOP SRC=\"" + href + (when alt + (concat "\" ALT=\"" alt)) + "\">"))) + + +(defun hm--html-add-applet (name code width height) + "Add an applet." + (interactive (let ((name (read-string "Applet Name: " "applet")) + (code (read-file-name "Applet Class File: ")) + (width (read-number "Width (i.e.: 100): " t)) + (height (read-number "Height (i.e.: 100): " t))) + (list name code width height))) + (hm--html-add-tags 'hm--html-insert-start-tag-with-newline + (concat "<APPLET " + (if (string= name "") + "" + (concat "NAME=\"" name "\"\n")) + "CODE=\"" + code + "\"\n" + "WIDTH=\"" + width + "\"\n" + "HEIGHT=\"" + height + "\">") + 'hm--html-insert-start-tag-with-newline + "</APPLET>")) + +(defun hm--html-add-applet-parameter (name value) + "Adds the tag for an applet parameter at the current point. +This tag must be added between <APPLET> and </APPLET>." + (interactive "sParameter Name: \nsParameter Value: ") + (hm--html-add-tags 'hm--html-insert-start-tag-with-newline + (concat "<PARAM " + "NAME=\"" + name + "\" VALUE=\"" + value + "\">"))) + (defun hm--html-add-server-side-include-file (file) "This function adds a server side include file directive in the buffer. @@ -291,8 +370,8 @@ (let ((start (point))) (if (string= file "") (error "ERROR: No filename specified !") - (insert "<INC SRV \"" file "\">") - (html-maybe-deemphasize-region (1+ start) (1- (point)))))) + (insert "<INC SRV \"" file "\">")))) +; (html-maybe-deemphasize-region (1+ start) (1- (point)))))) (defun hm--html-add-server-side-include-command-with-isindex-parameter @@ -320,8 +399,8 @@ (error "ERROR: No command specified !") (if (= ?| (string-to-char command)) (insert "<INC " attribute" \"" command "\">") - (insert "<INC " attribute " \"|" command "\">") - (html-maybe-deemphasize-region (1+ start) (1- (point))))))) + (insert "<INC " attribute " \"|" command "\">"))))) +; (html-maybe-deemphasize-region (1+ start) (1- (point))))))) ;(defun hm--html-add-server-side-include-command-with-parameter (command @@ -351,6 +430,42 @@ ;;; Functions, which adds tags of the form <starttag> ... </endtag> +(defun hm--html-add-big () + "Adds the HTML tags for Big at the point in the current buffer." + (interactive) + (hm--html-add-tags 'hm--html-insert-start-tag + "<BIG>" + 'hm--html-insert-end-tag + "</BIG>")) + + +(defun hm--html-add-big-to-region () + "Adds the HTML tags for Big to the region." + (interactive) + (hm--html-add-tags-to-region 'hm--html-insert-start-tag + "<BIG>" + 'hm--html-insert-end-tag + "</BIG>")) + + +(defun hm--html-add-small () + "Adds the HTML tags for Small at the point in the current buffer." + (interactive) + (hm--html-add-tags 'hm--html-insert-start-tag + "<SMALL>" + 'hm--html-insert-end-tag + "</SMALL>")) + + +(defun hm--html-add-small-to-region () + "Adds the HTML tags for Small to the region." + (interactive) + (hm--html-add-tags-to-region 'hm--html-insert-start-tag + "<SMALL>" + 'hm--html-insert-end-tag + "</SMALL>")) + + (defun hm--html-add-bold () "Adds the HTML tags for Bold at the point in the current buffer." (interactive) @@ -441,6 +556,14 @@ "</CODE>")) +(defun hm--html-add-citation () + "Adds the HTML tags for Citation." + (interactive) + (hm--html-add-tags 'hm--html-insert-start-tag + "<CITE>" + 'hm--html-insert-end-tag + "</CITE>")) + (defun hm--html-add-citation-to-region () "Adds the HTML tags for Citation to the region." (interactive) @@ -450,6 +573,15 @@ "</CITE>")) +(defun hm--html-add-emphasized () + "Adds the HTML tags for Emphasized." + (interactive) + (hm--html-add-tags 'hm--html-insert-start-tag + "<EM>" + 'hm--html-insert-end-tag + "</EM>")) + + (defun hm--html-add-emphasized-to-region () "Adds the HTML tags for Emphasized to the region." (interactive) @@ -459,6 +591,15 @@ "</EM>")) +(defun hm--html-add-fixed () + "Adds the HTML tags for Fixed." + (interactive) + (hm--html-add-tags 'hm--html-insert-start-tag + "<TT>" + 'hm--html-insert-end-tag + "</TT>")) + + (defun hm--html-add-fixed-to-region () "Adds the HTML tags for Fixed to the region." (interactive) @@ -468,6 +609,15 @@ "</TT>")) +(defun hm--html-add-keyboard () + "Adds the HTML tags for Keyboard." + (interactive) + (hm--html-add-tags 'hm--html-insert-start-tag + "<KBD>" + 'hm--html-insert-end-tag + "</KBD>")) + + (defun hm--html-add-keyboard-to-region () "Adds the HTML tags for Keyboard to the region." (interactive) @@ -477,6 +627,14 @@ "</KBD>")) +(defun hm--html-add-sample () + "Adds the HTML tags for Sample." + (interactive) + (hm--html-add-tags 'hm--html-insert-start-tag + "<SAMP>" + 'hm--html-insert-end-tag + "</SAMP>")) + (defun hm--html-add-sample-to-region () "Adds the HTML tags for Sample to the region." (interactive) @@ -486,6 +644,15 @@ "</SAMP>")) +(defun hm--html-add-strong () + "Adds the HTML tags for Strong." + (interactive) + (hm--html-add-tags 'hm--html-insert-start-tag + "<STRONG>" + 'hm--html-insert-end-tag + "</STRONG>")) + + (defun hm--html-add-strong-to-region () "Adds the HTML tags for Strong to the region." (interactive) @@ -495,6 +662,14 @@ "</STRONG>")) +(defun hm--html-add-variable () + "Adds the HTML tags for Variable." + (interactive) + (hm--html-add-tags 'hm--html-insert-start-tag + "<VAR>" + 'hm--html-insert-end-tag + "</VAR>")) + (defun hm--html-add-variable-to-region () "Adds the HTML tags for Variable to the region." (interactive) @@ -541,6 +716,15 @@ "</PRE>")) +(defun hm--html-add-plaintext () + "Adds the HTML tags for plaintext." + (interactive) + (hm--html-add-tags 'hm--html-insert-start-tag-with-newline + "<XMP>" + 'hm--html-insert-end-tag-with-newline + "</XMP>")) + + (defun hm--html-add-plaintext-to-region () "Adds the HTML tags for plaintext to the region." (interactive) @@ -550,6 +734,15 @@ "</XMP>")) +(defun hm--html-add-blockquote () + "Adds the HTML tags for blockquote." + (interactive) + (hm--html-add-tags 'hm--html-insert-start-tag-with-newline + "<BLOCKQUOTE>" + 'hm--html-insert-end-tag-with-newline + "</BLOCKQUOTE>")) + + (defun hm--html-add-blockquote-to-region () "Adds the HTML tags for blockquote to the region." (interactive) @@ -943,6 +1136,15 @@ ;;; Lists +(defun hm--html-add-listing () + "Adds the HTML tags for listing." + (interactive) + (hm--html-add-tags 'hm--html-insert-start-tag-with-newline + "<LISTING>" + 'hm--html-insert-end-tag-with-newline + "</LISTING>")) + + (defun hm--html-add-listing-to-region () "Adds the HTML tags for listing to the region." (interactive) @@ -951,6 +1153,21 @@ 'hm--html-insert-end-tag-with-newline "</LISTING>")) +(defun hm--html-add-center () + "Adds the HTML tags for center at the current point." + (interactive) + (hm--html-add-tags 'hm--html-insert-start-tag-with-newline + "<CENTER>" + 'hm--html-insert-end-tag-with-newline + "</CENTER>")) + +(defun hm--html-add-center-to-region () + "Adds the HTML tags for center to the region." + (interactive) + (hm--html-add-tags-to-region 'hm--html-insert-start-tag-with-newline + "<CENTER>" + 'hm--html-insert-end-tag-with-newline + "</CENTER>")) (defun hm--html-add-numberlist () "Adds the HTML tags for a numbered list at the point in the current buffer." @@ -994,6 +1211,17 @@ "<LI> ")) +(defun hm--html-add-list () + "Adds the HTML tags for a (unnumbered) list to the region." + (interactive) + (hm--html-add-tags 'hm--html-insert-start-tag-with-newline + "<UL>" + 'hm--html-insert-end-tag-with-newline + "</UL>" + 'hm--html-insert-start-tag + "<LI> ")) + + (defun hm--html-add-list-to-region () "Adds the HTML tags for a (unnumbered) list to the region." (interactive) @@ -1005,16 +1233,66 @@ "<LI> ")) +(defun hm--html-add-menu () + "Adds the HTML tags for a menu." + (interactive) + (hm--html-add-tags 'hm--html-insert-start-tag-with-newline + "<MENU>" + 'hm--html-insert-end-tag-with-newline + "</MENU>" + 'hm--html-insert-start-tag + "<LI> ")) + + +(defun hm--html-add-menu () + "Adds the HTML tags for a menu." + (interactive) + (hm--html-add-tags 'hm--html-insert-start-tag-with-newline + "<MENU>" + 'hm--html-insert-end-tag-with-newline + "</MENU>" + 'hm--html-insert-start-tag + "<LI> " + 'hm--html-insert-end-tag + " </LI>")) + + (defun hm--html-add-menu-to-region () "Adds the HTML tags for a menu to the region." (interactive) (hm--html-add-tags-to-region 'hm--html-insert-start-tag-with-newline "<MENU>" 'hm--html-insert-end-tag-with-newline - "</MENU>" - 'hm--html-insert-start-tag - "<LI> ")) - + "</MENU>")) + +; 'hm--html-insert-start-tag +; "<LI> ")) + + +(defun hm--html-add-description-title-and-entry () + "Adds a definition title and entry. +Assumes we're at the end of a previous entry." + (interactive) + (hm--html-add-description-title) + (let ((position (point))) + (search-forward "</DT>") + (hm--html-add-only-description-entry) + (goto-char position))) + + +(defun hm--html-add-description-list () + "Adds the HTML tags for a description list. +It also inserts a tag for the description title." + (interactive) + (hm--html-add-tags 'hm--html-insert-start-tag-with-newline + "<DL>" + 'hm--html-insert-end-tag-with-newline + "</DL>" + 'hm--html-insert-start-tag + "<DT> " + 'hm--html-insert-end-tag + " </DT>")) + (defun hm--html-add-description-list-to-region () "Adds the HTML tags for a description list to a region. @@ -1023,32 +1301,63 @@ (hm--html-add-tags-to-region 'hm--html-insert-start-tag-with-newline "<DL>" 'hm--html-insert-end-tag-with-newline - "</DL>" - 'hm--html-insert-start-tag - "<DT> ")) + "</DL>")) + +; 'hm--html-insert-start-tag +; "<DT> ")) (defun hm--html-add-description-title () - "Adds the HTML tag for a description title at current point in the buffer." + "Adds the HTML tags for a description title at current point in the buffer." + (interactive) + (hm--html-add-tags 'hm--html-insert-end-tag-with-newline + "<DT> " + 'hm--html-insert-end-tag + " </DT>")) + + +(defun hm--html-add-description-title-to-region () + "Adds the HTML tags for a description title to the region in the buffer." + (interactive) + (hm--html-add-tags-to-region 'hm--html-insert-start-tag + "<DT> " + 'hm--html-insert-end-tag + " </DT>")) + + +(defun hm--html-add-description-entry () + "Adds the HTML tags for a description entry at current point in the buffer." (interactive) (hm--html-add-tags 'hm--html-insert-end-tag-with-newline - "<DT> ")) - - -(defun hm--html-add-only-description-entry () - "Adds the HTML tag for a description entry at current point in the buffer." + "<DD> " + 'hm--html-insert-end-tag + " </DD>")) + + +(defun hm--html-add-description-entry-to-region () + "Adds the HTML tags for a description entry to the region in the buffer." (interactive) - (hm--html-add-tags 'hm--html-insert-end-tag-with-newline - "<DD> ")) - + (hm--html-add-tags-to-region 'hm--html-insert-start-tag + "<DD> " + 'hm--html-insert-end-tag + " </DD>")) + + +(defun hm--html-add-address () + "Adds the HTML tags for an address." + (interactive) + (hm--html-add-tags 'hm--html-insert-start-tag + "<ADDRESS>" + 'hm--html-insert-end-tag + "</ADDRESS>")) (defun hm--html-add-address-to-region () "Adds the HTML tags for an address to the region" (interactive) (hm--html-add-tags-to-region 'hm--html-insert-start-tag - "<ADDRESS> " + "<ADDRESS>" 'hm--html-insert-end-tag - " </ADDRESS>")) + "</ADDRESS>")) (defvar hm--html-signature-reference-name "Signature" @@ -1398,6 +1707,14 @@ (hm--html-insert-created-comment))) +(defun hm--html-add-link-target-to-region (name) + "Adds the HTML tags for a link target to the region." + (interactive "sName: ") + (hm--html-add-tags-to-region 'hm--html-insert-start-tag + (concat "<A NAME=\"" name "\">") + 'hm--html-insert-end-tag + "</A>")) + (defun hm--html-add-link-target (name) "Adds the HTML tags for a link target at point in the current buffer." ; (interactive "sName (or RET for numeric): ") @@ -1597,14 +1914,11 @@ (progn (setq hm--html-faces-exist t) (make-face 'hm--html-help-face) - (and hm--html-help-foreground - (set-face-foreground 'hm--html-help-face - hm--html-help-foreground)) - (and hm--html-help-background - (set-face-background 'hm--html-help-face - hm--html-help-background)) - (and hm--html-help-font - (set-face-font 'hm--html-help-face hm--html-help-font)) + (if hm--html-help-foreground + (set-face-foreground 'hm--html-help-face hm--html-help-foreground)) + (if hm--html-help-background + (set-face-background 'hm--html-help-face hm--html-help-background)) + (set-face-font 'hm--html-help-face hm--html-help-font) ))) @@ -2389,7 +2703,7 @@ t nil) (list ; servername:port - "Mailadresse: " + "Mailaddress: " mailto-alist nil nil @@ -2414,13 +2728,55 @@ (interactive) (hm--html-add-mailto-link-1 'hm--html-add-tags-to-region)) - -(defun hm--html-add-normal-link-to-region () - "Adds the HTML tags for a normal general link to region." - (interactive) +(defun hm--html-add-relative-link (relative-file-path) + "Adds the HTML tags for a relative link at the current point." + (interactive (list (read-file-name "Relative Filename: " + nil + nil + nil + ""))) + (hm--html-add-tags 'hm--html-insert-start-tag + (concat "<A HREF=\"" + relative-file-path + "\">") + 'hm--html-insert-end-tag + "</A>")) + +(defun hm--html-add-relative-link-to-region (relative-file-path) + "Adds the HTML tags for a relative link to the region." + (interactive (list (read-file-name "Relative Filename: " + nil + nil + nil + ""))) (hm--html-add-tags-to-region 'hm--html-insert-start-tag (concat "<A HREF=\"" - (read-string "Link to: ") + relative-file-path + "\">") + 'hm--html-insert-end-tag + "</A>")) + +(defun hm--html-add-normal-link (link-object) + "Adds the HTML tags for a normal general link. +Single argument LINK-OBJECT is value of HREF in the new anchor. +Mark is set after anchor." + (interactive "sNode Link to: ") + (hm--html-add-tags 'hm--html-insert-start-tag + (concat "<A HREF=\"" + link-object + "\">") + 'hm--html-insert-end-tag + "</A>")) + +(defun hm--html-add-normal-link-to-region (link-object) + "Adds the HTML tags for a normal general link to region. +Single argument LINK-OBJECT is value of HREF in the new anchor. +Mark is set after anchor." + (interactive "sNode Link to: ") + (hm--html-add-tags-to-region 'hm--html-insert-start-tag + (concat "<A HREF=\"" +; (read-string "Link to: ") + link-object "\">") 'hm--html-insert-end-tag "</A>")) @@ -2616,7 +2972,7 @@ ;;; Functions for font lock mode -(if html-running-emacs-19 +(if (adapt-emacs19p) (progn (make-face 'font-lock-comment-face) (make-face 'font-lock-doc-string-face) @@ -3307,6 +3663,77 @@ ;;; ISO-Characters for Emacs HTML-mode (Berthold Crysmann) +;(setq buffer-invisibility-spec '(hm--html-iso-entity-invisible-flag)) + +;(defvar hm--html-iso-entity-invisible-flag t +; "Controls the visibility of the iso entities.") + +;(defvar hm--html-iso-glyph-invisible-flag nil +; "Controls the visibility of the iso character glyphs.") + +;(defvar hm--html-glyph-cache nil +; "Internal variable. An assoc list with the already created glyphs.") + +;(defun hm--html-create-glyph (string) +; "Creates a glyph from the string or returns an existing one. +;The glyph is stored in `hm--html-glyph-cache'." +; (if nil ;(assoc string hm--html-glyph-cache) +; (cdr (assoc string hm--html-glyph-cache)) +; (let ((glyph (make-glyph string))) +; (setq hm--html-glyph-cache (cons (cons string glyph) +; hm--html-glyph-cache)) +; glyph))) + +;(defun hm--html-attach-glyph-to-region (start +; end +; string +; region-invisible-flag +; glyph-invisible-flag) +; "Make the region invisible and attach a glyph STRING. +;The invisible flags could be used, to toggle the visibility." +; (mapcar 'delete-annotation (annotations-at end)) ; delete old anotations +; ;; delete old extents +; (let ((extent (make-extent start end)) +; (annotation nil)) +; (set-extent-property extent 'invisible region-invisible-flag) +; (set-extent-property extent 'end-open t) +; (set-extent-property extent 'start-open t) +; (set-extent-property extent 'intangible t) +; (setq annotation (make-annotation "Hallo Du da" ;(hm--html-create-glyph string) +; end +; 'text)) +; (goto-char end))) + + +;(defun hm--html-insert-iso-char-as-entity-and-glyph (char entity) +; "Inserts an iso char as html ENTITY and displays a glyph. +;The glyph is created from the string CHAR." +; (let ((start (point))) +; (insert entity) +; (hm--html-attach-glyph-to-region start +; (point) +; char +; 'hm--html-iso-entity-invisible-flag +; 'hm--html-iso-glyph-invisible-flag))) + +;(defun hm--html_ue () +; (interactive) +; (hm--html-insert-iso-char-as-entity-and-glyph "ü" "ü")) + + +;(defun hm--html-insert-iso-char-as-entity-and-glyph (char entity) +; (let ((start (point)) +; (end nil) +; (extent nil)) +; (insert entity) +; (setq end (point)) +; (setq extent (make-extent start end)) +; (set-extent-begin-glyph extent char) +; (set-extent-property extent 'invisible t))) + +;(defun hm--html_ue () +; (interactive) +; (hm--html-insert-iso-char-as-entity-and-glyph ?ü "ü")) (defun hm--html_ue () "Insert the character 'ue'." @@ -3591,6 +4018,11 @@ (defvar hm--just-insert-less-than nil "Internal variable.") +(defun hm--html-less-than () + "Inserts the entity '>'." + (interactive) + (insert "<")) + (defun hm--html-smart-less-than () "Insert a '<' or the entity '<' if you execute this command twice." (interactive) @@ -3598,7 +4030,7 @@ hm--just-insert-less-than) (progn (delete-char -1) - (html-less-than) + (hm--html-less-than) (setq hm--just-insert-less-than nil)) (insert ?<) (setq hm--just-insert-less-than t))) @@ -3606,6 +4038,11 @@ (defvar hm--just-insert-greater-than nil "Internal variable.") +(defun hm--html-greater-than () + "Inserts the entity '>'." + (interactive) + (insert ">")) + (defun hm--html-smart-greater-than () "Insert a '>' or the entity '>' if you execute this command twice." (interactive) @@ -3613,12 +4050,33 @@ hm--just-insert-greater-than) (progn (delete-char -1) - (html-greater-than) + (hm--html-greater-than) (setq hm--just-insert-greater-than nil)) (insert ?>) (setq hm--just-insert-greater-than t))) +(defvar hm--just-insert-ampersand nil + "Internal variable.") + +(defun hm--html-ampersand () + "Inserts the entity '&'." + (interactive) + (insert "&")) + +(defun hm--html-smart-ampersand () + "Insert a '&' or the entity '&' if you execute this command twice." + (interactive) + (if (and (eq last-command 'hm--html-smart-ampersand) + hm--just-insert-ampersand) + (progn + (delete-char -1) + (hm--html-ampersand) + (setq hm--just-insert-ampersand nil)) + (insert ?&) + (setq hm--just-insert-ampersand t))) + + ;;; ; sending the contents of a html buffer to netscape ; (Thanks to Adrian Aichner for providing this function) @@ -3719,15 +4177,15 @@ 'hm--html-wais-path-alist 'hm--html-wais-servername:port-alist 'hm--html-wais-servername:port-default - 'html-deemphasize-color +; 'html-deemphasize-color 'html-document-previewer - 'html-document-previewer-args - 'html-emphasize-color - 'html-quotify-hrefs-on-find - 'html-region-mode +; 'html-document-previewer-args +; 'html-emphasize-color +; 'html-quotify-hrefs-on-find + 'hm--html-region-mode 'html-sigusr1-signal-value - 'html-use-font-lock - 'html-use-highlighting +; 'html-use-font-lock +; 'html-use-highlighting ) nil nil @@ -3742,31 +4200,35 @@ (if (adapt-xemacsp) (progn - (add-hook 'zmacs-activate-region-hook - (function (lambda () (html-region-mode t)))) + (add-hook 'zmacs-activate-region-hook + 'hm--html-switch-region-modes-on) +; (function (lambda () (hm--html-region-mode 1)))) (add-hook 'zmacs-deactivate-region-hook - (function (lambda () (html-region-mode nil)))) + 'hm--html-switch-region-modes-off) +; (function (lambda () (hm--html-region-mode -1)))) ) (transient-mark-mode t) (add-hook 'activate-mark-hook - (function (lambda () (html-region-mode t)))) + 'hm--html-switch-region-modes-on) +; (function (lambda () (hm--html-region-mode t)))) (add-hook 'deactivate-mark-hook - (function (lambda () (html-region-mode nil)))) + 'hm--html-switch-region-modes-off) +; (function (lambda () (hm--html-region-mode nil)))) ) -(add-hook 'html-mode-hook - (function - (lambda () - (make-variable-buffer-local 'write-file-hooks) - (add-hook 'write-file-hooks - 'hm--html-maybe-new-date-and-changed-comment)))) +;(add-hook 'hm--html-mode-hook +; (function +; (lambda () +; (make-variable-buffer-local 'write-file-hooks) +; (add-hook 'write-file-hooks +; 'hm--html-maybe-new-date-and-changed-comment)))) ;(add-hook 'zmacs-activate-region-hook 'hm--set-hm--region-active) ; @@ -3824,39 +4286,39 @@ ;;; Definition of the minor mode html-region-mode -(defvar html-region-mode nil - "*t, if the minor mode html-region-mode is on and nil otherwise.") - -(make-variable-buffer-local 'html-region-mode) - -(defvar html-region-mode-map nil "") - -(hm--html-load-config-files) - -(if hm--html-use-old-keymap - (progn - -;(setq minor-mode-alist (cons '(html-region-mode " Region") minor-mode-alist)) -(or (assq 'html-region-mode minor-mode-alist) - (setq minor-mode-alist - (purecopy - (append minor-mode-alist - '((html-region-mode " Region")))))) - -(defun html-region-mode (on) - "Turns the minor mode html-region-mode on or off. -The function turns the html-region-mode on, if ON is t and off otherwise." - (if (string= mode-name "HTML") - (if on - ;; html-region-mode on - (progn - (setq html-region-mode t) - (use-local-map html-region-mode-map)) - ;; html-region-mode off - (setq html-region-mode nil) - (use-local-map html-mode-map)))) - -)) +;(defvar html-region-mode nil +; "*t, if the minor mode html-region-mode is on and nil otherwise.") + +;(make-variable-buffer-local 'html-region-mode) + +;(defvar html-region-mode-map nil "") + +;(hm--html-load-config-files) + +;(if hm--html-use-old-keymap +; (progn + +;;(setq minor-mode-alist (cons '(html-region-mode " Region") minor-mode-alist)) +;(or (assq 'html-region-mode minor-mode-alist) +; (setq minor-mode-alist +; (purecopy +; (append minor-mode-alist +; '((html-region-mode " Region")))))) + +;(defun html-region-mode (on) +; "Turns the minor mode html-region-mode on or off. +;The function turns the html-region-mode on, if ON is t and off otherwise." +; (if (string= mode-name "HTML") +; (if on +; ;; html-region-mode on +; (progn +; (setq html-region-mode t) +; (use-local-map html-region-mode-map)) +; ;; html-region-mode off +; (setq html-region-mode nil) +; (use-local-map html-mode-map)))) + +;)) @@ -3867,12 +4329,12 @@ ; (hm--html-font-lock-color should be defined in hm--html-configuration.el ; oder .hm--html-configuration.el) ; -(require 'font-lock) +;(require 'font-lock) ;(load-library "font-lock") ;(set-face-foreground 'font-lock-comment-face hm--html-font-lock-color) -(hm--html-generate-help-buffer-faces) +;(hm--html-generate-help-buffer-faces) @@ -3886,3 +4348,36 @@ ; (search-forward-regexp hm--html-hostname-search-string) ; (buffer-substring (match-beginning 0) (match-end 0))) ; + +;;; Announce the feature hm--html-configuration + +;;; quotify href + +(defvar hm--html-quotify-href-regexp + "<[aA][ \t\n]+\\([nN][aA][mM][eE]=[a-zA-Z0-9]+[ \t\n]+\\)?[hH][rR][eE][fF]=" + "Regular expression used for searching hrefs.") + +(defun hm--html-quotify-hrefs () + "Insert quotes around all HREF and NAME attribute value literals. + +This remedies the problem with old HTML files that can't be processed +by SGML parsers. That is, changes <A HREF=foo> to <A HREF=\"foo\">. + +Look also at the variable `hm--html-quotify-href-regexp'." + (interactive) + (save-excursion + (goto-char (point-min)) + (while + (re-search-forward hm--html-quotify-href-regexp + (point-max) + t) + (cond + ((null (looking-at "\"")) + (insert "\"") + (re-search-forward "[ \t\n>]" (point-max) t) + (forward-char -1) + (insert "\"")))))) + + + +(provide 'hm--html)
--- a/lisp/hm--html-menus/html-mode.el Mon Aug 13 08:45:53 2007 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,957 +0,0 @@ -;;; html-mode --- Major mode for editing HTML hypertext documents for the WWW -;; Derived from Marc Andreesen's Revision 2.3. - -;; Keywords: hypermedia languages help docs wp - -;; HTML mode, based on text mode. -;; Copyright (C) 1985 Free Software Foundation, Inc. -;; Copyright (C) 1992, 1993 National Center for Supercomputing Applications. -;; NCSA modifications by Marc Andreessen (marca@ncsa.uiuc.edu). -;; -;; Changed by Heiko Münkel, 6 Jan 1994, 10 Jan 1994, 15 Mar 1994, 03 Jan 1995 -;; 12 May 1995, 25 May 1995, 29 Jul 1995, 3 Feb 1996 -;; -;; This program 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 1, or -;; (at your option) any later version. -;; -;; This program 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, 675 Mass Ave, Cambridge, MA 02139, USA. -;; -;;; Commentary: -;; -------------------------------- CONTENTS -------------------------------- -;; -;; html-mode: Major mode for editing HTML hypertext documents. -;; Revision: 2.2 -;; -;; Changes from 2.1 (beta) -;; - Changed previewer for the new Mosaic -;; - Changed lemacs to xemacs -;; -;; Changes from 2.0 (beta): -;; - Ripped out numeric anchor name stuff altogether (all names should be -;; meaningful, not just numbers). -;; - Fixed problem with unquoted names. -;; - Fixed font-lock support (yeah! thanks lamour@engin.umich.edu). -;; -;; ------------------------------ INSTRUCTIONS ------------------------------ -;; -;; Put the following code in your .emacs file: -;; -;; (autoload 'html-mode "html-mode" "HTML major mode." t) -;; (or (assoc "\\.html$" auto-mode-alist) -;; (setq auto-mode-alist (cons '("\\.html$" . html-mode) -;; auto-mode-alist))) -;; -;; Emacs will detect the ``.html'' suffix and activate html-mode -;; appropriately. -;; -;; You are assumed to be at least somewhat familiar with the HTML -;; format. If you aren't, read about it first (see below). -;; -;; Here are key sequences and corresponding commands: -;; -;; NORMAL COMMANDS: -;; -;; C-c a html-add-address -;; Open an address element. -;; -;; C-c b html-add-blockquote -;; -;; C-c C-b html-add-bold -;; Open a bold element. -;; -;; C-c c html-add-code -;; Open a 'code' (fixed-font) element. -;; -;; C-c C-c html-add-citation -;; -;; C-c d html-add-description-list -;; Open a definition list. The initial entry is created for you. -;; To create subsequent entries, use 'C-c e'. -;; -;; C-c e html-add-description-entry -;; Add a new definition entry in a definition list. You are -;; assumed to be inside a definition list (specifically, at the end -;; of another definition entry). -;; -;; C-c C-e html-add-emphasized -;; Open an emphasized element. -;; -;; C-c C-f html-add-fixed -;; -;; C-c g html-add-img -;; Add an IMG element (inlined image or graphic). Note that the -;; IMG tag is currently an extension to HTML supported only by the -;; NCSA Mosaic browser (to my knowledge). You will be prompted for -;; the URL of the image you wish to inline into the document. -;; -;; C-c h html-add-header -;; Add a header. You are prompted for size (1 is biggest, 2 is -;; next biggest; bottom limit is 6) and header contents. -;; -;; C-c i html-add-list-or-menu-item -;; Add a new list or menu item in a list or menu. You are assumed -;; to be inside a list or menu (specifically, at the end of another -;; item). -;; -;; C-c C-i html-add-italic -;; Open an italic element. -;; -;; C-c C-k html-add-keyboard -;; -;; C-c l html-add-normal-link -;; Add a link. You will be prompted for the link (any string; -;; e.g., http://foo.bar/argh/blagh). The cursor will be left where -;; you can type the text that will represent the link in the -;; document. -;; -;; C-c C-l html-add-listing -;; -;; C-c m html-add-menu -;; Open a menu. The initial item is created for you. To create -;; additional items, use 'C-c i'. -;; -;; C-c C-m html-add-sample -;; -;; C-c n html-add-numbered-list -;; -;; C-c p html-add-paragraph-separator -;; Use this command at the end of each paragraph. -;; -;; C-c C-p html-add-preformatted -;; -;; C-c r html-add-normal-reference -;; -;; C-c s html-add-list -;; Open a list. The initial item is created for you. To create -;; additional items, use 'C-c i'. -;; -;; C-c C-s html-add-strong -;; -;; C-c t html-add-title -;; Add a title to the document. You will be prompted for the -;; contents of the title. If a title already exists at the very -;; top of the document, the existing contents will be replaced. -;; -;; C-c C-v html-add-variable -;; -;; C-c x html-add-plaintext -;; Add plaintext. The cursor will be positioned where you can type -;; plaintext (or insert another file, or whatever). -;; -;; C-c z html-preview-document -;; Fork off a Mosaic process to preview the current document. -;; After you do this once, subsequent invocations of -;; html-preview-document will cause the same Mosaic process to be -;; used; this magic is accomplished through Mosaic's ability to be -;; remote-controlled via Unix signals. This feature is only -;; available when running XEmacs v19 (it will maybe work with -;; GNU Emacs v19; I'm not sure). -;; -;; COMMANDS THAT OPERATE ON THE CURRENT REGION: -;; -;; C-c C-r l html-add-normal-link-to-region -;; Add a link that will be represented by the current region. You -;; will be prompted for the link (any string, as with -;; html-add-normal-link). -;; -;; C-c C-r r html-add-reference-to-region -;; Add a reference (a link that does not reference anything) that -;; will be represented by the current region. You will be prompted -;; for the name of the link. -;; -;; SPECIAL COMMANDS: -;; -;; <, >, & -;; These are overridden to output <, >, and & -;; respectively. The real characters <, >, and & can be entered -;; into the text either by typing 'C-c' before typing the character -;; or by using the Emacs quoted-insert (C-q) command. -;; -;; C-c <, C-c >, C-c & -;; See '<, >, &' above. -;; -;; ---------------------------- ADDITIONAL NOTES ---------------------------- -;; -;; If you are running Epoch or XEmacs, highlighting will be used -;; to deemphasize HTML message elements as they are created. You can -;; turn this off; see the variables 'html-use-highlighting' and -;; 'html-use-font-lock'. -;; -;; HREF and NAME arguments in anchors should always be quoted. In -;; some existing HTML documents, they are not. html-mode will -;; automatically quotify all such unquoted arguments when it -;; encounters them. The following variables affect this behavior. -;; -;; html-quotify-hrefs-on-find (variable, default t) -;; If this is non-nil, all HREF arguments will be quotified -;; automatically when a HTML document is loaded into Emacs -;; (actually when html-mode is entered). -;; -;; -------------------------------- GOTCHAS --------------------------------- -;; -;; HTML documents can be tricky. html-mode is not smart enough to -;; enforce correctness or sanity, so you have to do that yourself. -;; -;; ------------------------- WHAT HTML-MODE IS NOT -------------------------- -;; -;; html-mode is not a mode for *browsing* HTML documents. In -;; particular, html-mode provides no hypertext or World Wide Web -;; capabilities. -;; -;; The World Wide Web browser we (naturally) recommend is NCSA -;; Mosaic, which can be found at ftp.ncsa.uiuc.edu in /Mosaic. -;; -;; See file://moose.cs.indiana.edu/pub/elisp/w3 for w3.el, which is -;; an Elisp World Wide Web browser written by William Perry. -;; -;; ------------------------------ WHAT HTML IS ------------------------------ -;; -;; HTML (HyperText Markup Language) is a format for hypertext -;; documents, particularly in the World Wide Web system. For more -;; information on HTML, telnet to info.cern.ch or pick up a copy of -;; NCSA Mosaic for the X Window System via ftp to ftp.ncsa.uiuc.edu -;; in /Mosaic; information is available online through the software -;; products distributed at those sites. -;; -;; ---------------------------- ACKNOWLEDGEMENTS ---------------------------- -;; -;; Some code herein provided by: -;; Dan Connolly <connolly@pixel.convex.com> -;; -;; -------------------------------------------------------------------------- -;; LCD Archive Entry: -;; html-mode|Marc Andreessen|marca@ncsa.uiuc.edu| -;; Major mode for editing HTML hypertext files.| -;; Date: sometime in 1993|Revision: 2.1 (beta)|~/modes/html-mode.el.Z| -;; -------------------------------------------------------------------------- -;;; Code: - -;; XEmacs change -- we require hm--html-menu here so that we do not -;; have to manually add an autoload for html-mode. If we didn't do -;; this the autoload for html-mode would have to be changed to load -;; hm--html-menu even though it is defined in this file. -(require 'hm--html-menu) - -;;; ---------------------------- emacs variations ---------------------------- - -(defvar html-running-xemacs (if (or (string-match "XEmacs" emacs-version) - (string-match "Lucid" emacs-version) ) - t nil) - "Non-nil if running XEmacs.") - -(defvar html-running-epoch (boundp 'epoch::version) - "Non-nil if running Epoch.") - -(defvar html-running-emacs-19 (and - (not html-running-xemacs) - (string= (substring emacs-version 0 2) "19")) - "Non-nil if running Emacs 19") - -;;; ------------------------------- variables -------------------------------- - -(defvar html-quotify-hrefs-on-find t - "*If non-nil, all HREF's (and NAME's) in a file will be automatically -quotified when the file is loaded. This is useful for converting ancient -HTML documents to SGML-compatible syntax, which mandates quoted HREF's. -This should always be T.") - -(defvar html-use-highlighting html-running-epoch - "*Flag to use highlighting for HTML directives in Epoch or XEmacs; -if non-NIL, highlighting will be used. Default is T if you are running -Epoch; nil otherwise (for XEmacs, font-lock is better; see -html-use-font-lock instead).") - -(defvar html-use-font-lock (or html-running-xemacs html-running-emacs-19) - "*Flag to use font-lock for HTML directives in XEmacs. If non-NIL, -font-lock will be used. Default is T if you are running with XEmacs; -NIL otherwise. This doesn't currently seem to work. Bummer. Ten points -to the first person who tells me why not.") - -(defvar html-deemphasize-color "grey80" - "*Color for de-highlighting HTML directives in Epoch or XEmacs.") - -(defvar html-emphasize-color "yellow" - "*Color for highlighting HTML something-or-others in Epoch or XEmacs.") - -(defvar html-document-previewer "xmosaic" - "*Program to be used to preview HTML documents. Program is assumed -to accept a single argument, a filename containing a file to view; program -is also assumed to follow the Mosaic convention of handling SIGUSR1 as -a remote-control mechanism.") - -(defvar html-document-previewer-args "-ngh" - "*Arguments to be given to the program named by html-document-previewer; -NIL if none should be given.") - -(defvar html-sigusr1-signal-value 16 - "*Value for the SIGUSR1 signal on your system. See, usually, -/usr/include/sys/signal.h.") - -;;; --------------------------------- setup ---------------------------------- - -(defvar html-mode-syntax-table nil - "Syntax table used while in html mode.") - -(defvar html-mode-abbrev-table nil - "Abbrev table used while in html mode.") -(define-abbrev-table 'html-mode-abbrev-table ()) - -(if html-mode-syntax-table - () - (setq html-mode-syntax-table (make-syntax-table)) - (modify-syntax-entry ?\" ". " html-mode-syntax-table) - (modify-syntax-entry ?\\ ". " html-mode-syntax-table) - (modify-syntax-entry ?' "w " html-mode-syntax-table)) - -(defvar html-mode-map nil "") -(if html-mode-map - () - (setq html-mode-map (make-sparse-keymap)) - (define-key html-mode-map "\t" 'tab-to-tab-stop) - (define-key html-mode-map "\C-ca" 'html-add-address) - (define-key html-mode-map "\C-cb" 'html-add-blockquote) - (define-key html-mode-map "\C-cc" 'html-add-code) - (define-key html-mode-map "\C-cd" 'html-add-description-list) - (define-key html-mode-map "\C-ce" 'html-add-description-entry) - (define-key html-mode-map "\C-cg" 'html-add-img) - (define-key html-mode-map "\C-ch" 'html-add-header) - (define-key html-mode-map "\C-ci" 'html-add-list-or-menu-item) - (define-key html-mode-map "\C-cl" 'html-add-normal-link) - (define-key html-mode-map "\C-cm" 'html-add-menu) - (define-key html-mode-map "\C-cn" 'html-add-numbered-list) - (define-key html-mode-map "\C-cp" 'html-add-paragraph-separator) - (define-key html-mode-map "\C-cr" 'html-add-normal-reference) - (define-key html-mode-map "\C-cs" 'html-add-list) - (define-key html-mode-map "\C-ct" 'html-add-title) - (define-key html-mode-map "\C-cx" 'html-add-plaintext) - ;; html-preview-document currently requires the primitive - ;; signal-process, which is only in v19 (is it in gnu 19? dunno). - (and html-running-xemacs - (define-key html-mode-map "\C-cz" 'html-preview-document)) - (define-key html-mode-map "\C-c\C-b" 'html-add-bold) - (define-key html-mode-map "\C-c\C-c" 'html-add-citation) - (define-key html-mode-map "\C-c\C-e" 'html-add-emphasized) - (define-key html-mode-map "\C-c\C-f" 'html-add-fixed) - (define-key html-mode-map "\C-c\C-i" 'html-add-italic) - (define-key html-mode-map "\C-c\C-k" 'html-add-keyboard) - (define-key html-mode-map "\C-c\C-l" 'html-add-listing) - (define-key html-mode-map "\C-c\C-m" 'html-add-sample) - (define-key html-mode-map "\C-c\C-p" 'html-add-preformatted) - (define-key html-mode-map "\C-c\C-s" 'html-add-strong) - (define-key html-mode-map "\C-c\C-v" 'html-add-variable) - (define-key html-mode-map "<" 'html-less-than) - (define-key html-mode-map ">" 'html-greater-than) - (define-key html-mode-map "&" 'html-ampersand) - (define-key html-mode-map "\C-c<" 'html-real-less-than) - (define-key html-mode-map "\C-c>" 'html-real-greater-than) - (define-key html-mode-map "\C-c&" 'html-real-ampersand) - (define-key html-mode-map "\C-c\C-rl" 'html-add-normal-link-to-region) - (define-key html-mode-map "\C-c\C-rr" 'html-add-reference-to-region) -) - -;;; ------------------------------ highlighting ------------------------------ - -(if (and html-running-epoch html-use-highlighting) - (progn - (defvar html-deemphasize-style (make-style)) - (set-style-foreground html-deemphasize-style html-deemphasize-color) - (defvar html-emphasize-style (make-style)) - (set-style-foreground html-emphasize-style html-emphasize-color))) - -(if (and html-running-xemacs html-use-highlighting) - (progn - (defvar html-deemphasize-style (make-face 'html-deemphasize-face)) - (set-face-foreground html-deemphasize-style html-deemphasize-color) - (defvar html-emphasize-style (make-face 'html-emphasize-face)) - (set-face-foreground html-emphasize-style html-emphasize-color))) - -(if html-use-highlighting - (progn - (if html-running-xemacs - (defun html-add-zone (start end style) - "Add a XEmacs extent from START to END with STYLE." - (let ((extent (make-extent start end))) - (set-extent-face extent style) - (set-extent-data extent 'html-mode)))) - (if html-running-epoch - (defun html-add-zone (start end style) - "Add an Epoch zone from START to END with STYLE." - (let ((zone (add-zone start end style))) - (epoch::set-zone-data zone 'html-mode)))))) - -(defun html-maybe-deemphasize-region (start end) - "Maybe deemphasize a region of text. Region is from START to END." - (and (or html-running-epoch html-running-xemacs) - html-use-highlighting - (html-add-zone start end html-deemphasize-style))) - -;;; -------------------------------------------------------------------------- -;;; ------------------------ command support routines ------------------------ -;;; -------------------------------------------------------------------------- - -(defun html-add-link (link-object) - "Add a link. Single argument LINK-OBJECT is value of HREF in the -new anchor. Mark is set after anchor." - (let ((start (point))) - (insert "<A") - (insert " HREF=\"" link-object "\">") - (html-maybe-deemphasize-region start (1- (point))) - (insert "</A>") - (push-mark) - (forward-char -4) - (html-maybe-deemphasize-region (1+ (point)) (+ (point) 4)))) - -(defun html-add-reference (ref-object) - "Add a reference. Single argument REF-OBJECT is value of NAME in the -new anchor. Mark is set after anchor." - (let ((start (point))) - (insert "<A") - (insert " NAME=\"" ref-object "\">") - (html-maybe-deemphasize-region start (1- (point))) - (insert "</A>") - (push-mark) - (forward-char -4) - (html-maybe-deemphasize-region (1+ (point)) (+ (point) 4)))) - -(defun html-add-list-internal (type) - "Set up a given type of list by opening the list start/end pair -and creating an initial element. Single argument TYPE is a string, -assumed to be a valid HTML list type (e.g. \"UL\" or \"OL\"). -Mark is set after list." - (let ((start (point))) - (insert "<" type ">\n") - (html-maybe-deemphasize-region start (1- (point))) - (insert "<LI> ") - ;; Point goes right there. - (save-excursion - (insert "\n") - (setq start (point)) - (insert "</" type ">\n") - (html-maybe-deemphasize-region start (1- (point))) - ;; Reuse start to set mark. - (setq start (point))) - (push-mark start t))) - -(defun html-open-area (tag) - "Open an area for entering text such as PRE, XMP, or LISTING." - (let ((start (point))) - (insert "<" tag ">\n") - (html-maybe-deemphasize-region start (1- (point))) - (save-excursion - (insert "\n") - (setq start (point)) - (insert "</" tag ">\n") - (html-maybe-deemphasize-region start (1- (point))) - ;; Reuse start to set mark. - (setq start (point))) - (push-mark start t))) - -(defun html-open-field (tag) - (let ((start (point))) - (insert "<" tag ">") - (html-maybe-deemphasize-region start (1- (point))) - (setq start (point)) - (insert "</" tag ">") - (html-maybe-deemphasize-region (1+ start) (point)) - (push-mark) - (goto-char start))) - -;;; -------------------------------------------------------------------------- -;;; -------------------------------- commands -------------------------------- -;;; -------------------------------------------------------------------------- - -;; C-c a -(defun html-add-address () - "Add an address." - (interactive) - (html-open-field "ADDRESS")) - -;; C-c b -(defun html-add-blockquote () - (interactive) - (html-open-area "BLOCKQUOTE")) - -;; C-c C-b -(defun html-add-bold () - (interactive) - (html-open-field "B")) - -;; C-c c -(defun html-add-code () - (interactive) - (html-open-field "CODE")) - -;; C-c C-c -(defun html-add-citation () - (interactive) - (html-open-field "CITE")) - -;; C-c d -(defun html-add-description-list () - "Add a definition list. Blah blah." - (interactive) - (let ((start (point))) - (insert "<DL>\n") - (html-maybe-deemphasize-region start (1- (point))) - (insert "<DT> ") - ;; Point goes right there. - (save-excursion - (insert "\n<DD> \n") - (setq start (point)) - (insert "</DL>\n") - (html-maybe-deemphasize-region start (1- (point))) - ;; Reuse start to set mark. - (setq start (point))) - (push-mark start t))) - -;; C-c e -(defun html-add-description-entry () - "Add a definition entry. Assume we're at the end of a previous -entry." - (interactive) - (let ((start (point))) - (insert "\n<DT> ") - (save-excursion - (insert "\n<DD> ")))) - -;; C-c C-e -(defun html-add-emphasized () - (interactive) - (html-open-field "EM")) - -;; C-c C-f -(defun html-add-fixed () - (interactive) - (html-open-field "TT")) - -;; C-c g -(defun html-add-img (href) - "Add an img." - (interactive "sImage URL: ") - (let ((start (point))) - (insert "<IMG SRC=\"" href "\">") - (html-maybe-deemphasize-region (1+ start) (1- (point))))) - -;; C-c h -(defun html-add-header (size header) - "Add a header." - (interactive "sSize (1-6; 1 biggest): \nsHeader: ") - (let ((start (point))) - (insert "<H" size ">") - (html-maybe-deemphasize-region start (1- (point))) - (insert header) - (setq start (point)) - (insert "</H" size ">\n") - (html-maybe-deemphasize-region (1+ start) (1- (point))))) - -;; C-c i -(defun html-add-list-or-menu-item () - "Add a list or menu item. Assume we're at the end of the -last item." - (interactive) - (let ((start (point))) - (insert "\n<LI> "))) - -;; C-c C-i -(defun html-add-italic () - (interactive) - (html-open-field "I")) - -;; C-c C-k -(defun html-add-keyboard () - (interactive) - (html-open-field "KBD")) - -;; C-c l -(defun html-add-normal-link (link) - "Make a link" - (interactive "sLink to: ") - (html-add-link link)) - -;; C-c C-l -(defun html-add-listing () - (interactive) - (html-open-area "LISTING")) - -;; C-c m -(defun html-add-menu () - "Add a menu." - (interactive) - (html-add-list-internal "MENU")) - -;; C-c C-m -(defun html-add-sample () - (interactive) - (html-open-field "SAMP")) - -;; C-c n -(defun html-add-numbered-list () - "Add a numbered list." - (interactive) - (html-add-list-internal "OL")) - -;; C-c p -(defun html-add-paragraph-separator () - "Add a paragraph separator." - (interactive) - (let ((start (point))) - (insert " <P>") - (html-maybe-deemphasize-region (+ start 1) (point)))) - -;; C-c C-p -(defun html-add-preformatted () - (interactive) - (html-open-area "PRE")) - -;; C-c r -(defun html-add-normal-reference (reference) - "Add a reference (named anchor)." - (interactive "sReference name: ") - (html-add-reference reference)) - -;; C-c s -(defun html-add-list () - "Add a list." - (interactive) - (html-add-list-internal "UL")) - -;; C-c C-s -(defun html-add-strong () - (interactive) - (html-open-field "STRONG")) - -;; C-c t -(defun html-add-title (title) - "Add or modify a title." - (interactive "sTitle: ") - (save-excursion - (goto-char (point-min)) - (if (and (looking-at "<TITLE>") - (save-excursion - (forward-char 7) - (re-search-forward "[^<]*" - (save-excursion (end-of-line) (point)) - t))) - ;; Plop the new title in its place. - (replace-match title t) - (insert "<TITLE>") - (html-maybe-deemphasize-region (point-min) (1- (point))) - (insert title) - (insert "</TITLE>") - (html-maybe-deemphasize-region (- (point) 7) (point)) - (insert "\n")))) - -;; C-c C-v -(defun html-add-variable () - (interactive) - (html-open-field "VAR")) - -;; C-c x -(defun html-add-plaintext () - "Add plaintext." - (interactive) - (html-open-area "XMP")) - -;;; -------------------------------------------------------------------------- -;;; ---------------------------- region commands ----------------------------- -;;; -------------------------------------------------------------------------- - -;; C-c C-r l -(defun html-add-normal-link-to-region (link start end) - "Make a link that applies to the current region. Again, -no completion." - (interactive "sLink to: \nr") - (save-excursion - (goto-char end) - (save-excursion - (goto-char start) - (insert "<A") - (insert " HREF=\"" link "\">") - (html-maybe-deemphasize-region start (1- (point)))) - (insert "</A>") - (html-maybe-deemphasize-region (- (point) 3) (point)))) - -;; C-c C-r r -(defun html-add-reference-to-region (name start end) - "Add a reference point (a link with no reference of its own) to -the current region." - (interactive "sName: \nr") - (or (string= name "") - (save-excursion - (goto-char end) - (save-excursion - (goto-char start) - (insert "<A NAME=\"" name "\">") - (html-maybe-deemphasize-region start (1- (point)))) - (insert "</A>") - (html-maybe-deemphasize-region (- (point) 3) (point))))) - -;;; -------------------------------------------------------------------------- -;;; ---------------------------- special commands ---------------------------- -;;; -------------------------------------------------------------------------- - -(defun html-less-than () - (interactive) - (insert "<")) - -(defun html-greater-than () - (interactive) - (insert ">")) - -(defun html-ampersand () - (interactive) - (insert "&")) - -(defun html-real-less-than () - (interactive) - (insert "<")) - -(defun html-real-greater-than () - (interactive) - (insert ">")) - -(defun html-real-ampersand () - (interactive) - (insert "&")) - -;;; -------------------------------------------------------------------------- -;;; --------------------------- Mosaic previewing ---------------------------- -;;; -------------------------------------------------------------------------- - -;; OK, we work like this: We have a variable html-previewer-process. -;; When we start, it's nil. First time html-preview-document is -;; called, we write the current document into a tmp file and call -;; Mosaic on it. Second time html-preview-document is called, we -;; write the current document into a tmp file, write out a tmp config -;; file, and send Mosaic SIGUSR1. - -;; This feature REQUIRES the Lisp command signal-process, which seems -;; to be a XEmacs v19 feature. It might be in GNU Emacs v19 too; -;; I dunno. - -(defvar html-previewer-process nil - "Variable used to track live viewer process.") - -(defun html-write-buffer-to-tmp-file () - "Write the current buffer to a temp file and return the name -of the tmp file." - (let ((filename (concat "/tmp/" (make-temp-name "html") ".html"))) - (write-region (point-min) (point-max) filename nil 'foo) - filename)) - -(defun html-preview-document () - "Preview the current buffer's HTML document by spawning off a -previewing process (assumed to be Mosaic, basically) and controlling -it with signals as long as it's alive." - (interactive) - (let ((tmp-file (html-write-buffer-to-tmp-file))) - ;; If html-previewer-process is nil, we start a process. - ;; OR if the process status is not equal to 'run. - (if (or (eq html-previewer-process nil) - (not (eq (process-status html-previewer-process) 'run))) - (progn - (message "Starting previewer...") - (setq html-previewer-process - (if html-document-previewer-args - (start-process "html-previewer" "html-previewer" - html-document-previewer - html-document-previewer-args - tmp-file) - (start-process "html-previewer" "html-previewer" - html-document-previewer - tmp-file)))) - ;; We've got a running previewer; use it via SIGUSR1. - (save-excursion - (let ((config-file (format "/tmp/Mosaic.%d" - (process-id html-previewer-process)))) - (set-buffer (generate-new-buffer "*html-preview-tmp*")) - (insert "goto\nfile:" tmp-file "\n") - (write-region (point-min) (point-max) - config-file nil 'foo) - ;; This is a v19 routine only. - (signal-process (process-id html-previewer-process) - html-sigusr1-signal-value) - (delete-file config-file) - (delete-file tmp-file) - (kill-buffer (current-buffer))))))) - -;;; -------------------------------------------------------------------------- -;;; -------------------------------------------------------------------------- -;;; -------------------------------------------------------------------------- - -(defun html-replace-string-in-buffer (start end newstring) - (save-excursion - (goto-char start) - (delete-char (1+ (- end start))) - (insert newstring))) - -;;; --------------------------- html-quotify-hrefs --------------------------- - -(defun html-quotify-hrefs () - "Insert quotes around all HREF and NAME attribute value literals. - -This remedies the problem with old HTML files that can't be processed -by SGML parsers. That is, changes <A HREF=foo> to <A HREF=\"foo\">." - (interactive) - (save-excursion - (goto-char (point-min)) - (while - (re-search-forward - "<[aA][ \t\n]+\\([nN][aA][mM][eE]=[a-zA-Z0-9]+[ \t\n]+\\)?[hH][rR][eE][fF]=" - (point-max) - t) - (cond - ((null (looking-at "\"")) - (insert "\"") - (re-search-forward "[ \t\n>]" (point-max) t) - (forward-char -1) - (insert "\"")))))) - -;;; ------------------------------- html-mode -------------------------------- - -(defun html-mode () - "Major mode for editing HTML hypertext documents. Special commands:\\{html-mode-map} -Turning on html-mode calls the value of the variable html-mode-hook, -if that value is non-nil. - -More extensive documentation is available in the file 'html-mode.el'. -The latest (possibly unstable) version of this file will always be available -on anonymous FTP server ftp.ncsa.uiuc.edu in /Mosaic/elisp." - (interactive) - (kill-all-local-variables) - (if hm--html-use-old-keymap - (use-local-map html-mode-map) - (use-local-map hm--html-mode-map)) - (setq mode-name "HTML") - (setq major-mode 'html-mode) - (setq local-abbrev-table html-mode-abbrev-table) - (set-syntax-table html-mode-syntax-table) - (run-hooks 'html-mode-hook) - (and html-use-font-lock - (html-fontify))) - -;;; ------------------------------- our hooks -------------------------------- - -(defun html-html-mode-hook () - "Hook called from html-mode-hook. -Run htlm-quotify-hrefs if html-quotify-hrefs-on-find is non-nil." - ;; Quotify existing HREF's if html-quotify-hrefs-on-find is non-nil. - (and html-quotify-hrefs-on-find (html-quotify-hrefs))) - -;;; ------------------------------- hook setup ------------------------------- - -;; Author: Daniel LaLiberte (liberte@cs.uiuc.edu). -(defun html-postpend-unique-hook (hook-var hook-function) - "Postpend HOOK-VAR with HOOK-FUNCTION, if it is not already an element. -hook-var's value may be a single function or a list of functions." - (if (boundp hook-var) - (let ((value (symbol-value hook-var))) - (if (and (listp value) (not (eq (car value) 'lambda))) - (and (not (memq hook-function value)) - (set hook-var (append value (list hook-function)))) - (and (not (eq hook-function value)) - (set hook-var (append value (list hook-function)))))) - (set hook-var (list hook-function)))) - -(html-postpend-unique-hook 'html-mode-hook 'html-html-mode-hook) - -;;; -------------------------- xemacs menubar setup --------------------------- - -(if (or html-running-xemacs html-running-emacs-19) - (progn - (defvar html-menu - '("HTML Mode" - ["Open Address" html-add-address t] - ["Open Blockquote" html-add-blockquote t] - ["Open Header" html-add-header t] - ["Open Hyperlink" html-add-normal-link t] - ["Open Listing" html-add-listing t] - ["Open Plaintext" html-add-plaintext t] - ["Open Preformatted" html-add-preformatted t] - ["Open Reference" html-add-normal-reference t] - ["Open Title" html-add-title t] - "----" - ["Open Bold" html-add-bold t] - ["Open Citation" html-add-citation t] - ["Open Code" html-add-code t] - ["Open Emphasized" html-add-emphasized t] - ["Open Fixed" html-add-fixed t] - ["Open Keyboard" html-add-keyboard t] - ["Open Sample" html-add-sample t] - ["Open Strong" html-add-strong t] - ["Open Variable" html-add-variable t] - "----" - ["Add Inlined Image" html-add-img t] - ["End Paragraph" html-add-paragraph-separator t] - ["Preview Document" html-preview-document t] - "----" - ("Definition List ..." - ["Open Definition List" html-add-description-list t] - ["Add Definition Entry" html-add-description-entry t] - ) - ("Other Lists ..." - ["Open Unnumbered List" html-add-list t] - ["Open Numbered List" html-add-numbered-list t] - ["Open Menu" html-add-menu t] - "----" - ["Add List Or Menu Item" html-add-list-or-menu-item t] - ) - ("Operations On Region ..." - ["Add Hyperlink To Region" html-add-normal-link-to-region t] - ["Add Reference To Region" html-add-reference-to-region t] - ) - ("Reserved Characters ..." - ["Less Than (<)" html-real-less-than t] - ["Greater Than (>)" html-real-greater-than t] - ["Ampersand (&)" html-real-ampersand t] - ) - ) - ) - -; (defun html-menu (e) -; (interactive "e") -; (mouse-set-point e) -; (beginning-of-line) -; (popup-menu html-menu)) - -; (define-key html-mode-map 'button3 'html-menu) - -; (defun html-install-menubar () -; (if (and current-menubar (not (assoc "HTML" current-menubar))) -; (progn -; (set-buffer-menubar (copy-sequence current-menubar)) -; (add-menu nil "HTML" (cdr html-menu))))) -; (html-postpend-unique-hook 'html-mode-hook 'html-install-menubar) - - (defvar html-font-lock-keywords - (list - '("\\(<[^>]*>\\)+" . font-lock-comment-face) - '("[Hh][Rr][Ee][Ff]=\"\\([^\"]*\\)\"" 1 font-lock-string-face t) - '("[Ss][Rr][Cc]=\"\\([^\"]*\\)\"" 1 font-lock-string-face t)) - "Patterns to highlight in HTML buffers.") - - (defun html-fontify () - (font-lock-mode 1) - (make-local-variable 'font-lock-keywords) - (setq font-lock-keywords html-font-lock-keywords) -; The following line was needed in older versions of font-lock.el -; (font-lock-hack-keywords (point-min) (point-max)) - (message "Hey boss, we been through html-fontify.")) - ) - ) - -;;; ------------------------------ final setup ------------------------------- - -(or (rassq 'html-mode auto-mode-alist) ;jwz - (setq auto-mode-alist (cons '("\\.html\\'" . html-mode) auto-mode-alist))) - -(provide 'html-mode)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/hm--html-menus/internal-drag-and-drop.el Mon Aug 13 08:46:35 2007 +0200 @@ -0,0 +1,329 @@ +;;; $Id: internal-drag-and-drop.el,v 1.1.1.1 1996/12/18 03:46:48 steve Exp $ +;;; +;;; Copyright (C) 1996 Heiko Muenkel +;;; email: muenkel@tnt.uni-hannover.de +;;; +;;; This program 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 1, or (at your option) +;;; any later version. +;;; +;;; This program 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 this program; if not, write to the Free Software +;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +;;; +;;; +;;; Description: +;;; +;;; This package provides functions to define and call internal +;;; drag and drop actions in the emacs. One could start such an +;;; action by clicking with the mouse in the source buffer and +;;; then in the destination buffer. The action could depend on +;;; the points where youve clicked with the mouse, on the state +;;; of the region, the point, the mark and any other properties +;;; of the source and the destination buffers. The actions are +;;; defined by the variable `idd-actions', which is a buffer local +;;; variable. The following is an example for the html-mode: +;;; (defvar html-idd-actions +;;; '((nil (((idd-major-mode-p . dired-mode) +;;; (idd-dired-file-on-line-p . ".*\\.\\(gif\\)\\|\\(jpq\\)")) +;;; hm--html-idd-add-include-image-from-dired-line) +;;; (((idd-major-mode-p . dired-mode) +;;; (idd-dired-no-file-on-line-p . nil)) +;;; hm--html-idd-add-file-link-to-file-on-dired-line) +;;; (((idd-major-mode-p . dired-mode) +;;; (idd-dired-no-file-on-line-p . t)) +;;; hm--html-idd-add-file-link-to-directory-of-buffer) +;;; (((idd-major-mode-p . w3-mode) +;;; (idd-url-at-point-p . t)) +;;; hm--html-idd-add-html-link-from-w3-buffer-point) +;;; (((idd-major-mode-p . w3-mode)) +;;; hm--html-idd-add-html-link-to-w3-buffer) +;;; (((idd-local-file-p . t)) +;;; hm--html-idd-add-file-link-to-buffer))) +;;; Look at the variable `idd-actions' for further descriptions. +;;; +;;; +;;; +;;; Installation: +;;; +;;; Put this file in one of your load path directories. +;;; +;;; Put the following in your .emacs: +;;; (autoload 'idd-mouse-drag-and-drop "internal-drag-and-drop" +;;; "Performs a drag and drop action. +;;; At first you must click on the source and +;;; after that on the destination." +;;; t) +;;; (define-key global-map [(meta button1)] 'idd-mouse-drag-and-drop) +;;; +;;; Define actions in the variable `idd-actions'. +;;; + +(defvar idd-actions nil + "The list with actions, depending on the source and the destination. +The list looks like: + '((<source-specification-1> (<destination-specification-1> <action-1-1>) + (<destination-specification-2> <action-1-2>) + : + ) + (<source-specification-2> (<destination-specification-1> <action-2-1>) + (<destination-specification-2> <action-2-2>) + : + ) + : + ) +The <source-specification> looks like the following: + '([(<specification-type> <value>)]) +with <specification-type> :== idd-minor-mode-p | idd-buffer-name-p + | idd-region-active-p ... + +The <destination-specification> looks like <source-specification>, except +that a valid <specification-type> is also idd-major-mode-p. + +If <source-specification-1> or <destination-specification-1> is set to +nil, then every source or destination matches. `idd-actions' is a +buffer local variable, which should be at least mode depended. So if +the <source-specification-1> is set to nil it says, that the source +buffer must only have a specific mode. But however, it's also possible +to define a general `idd-actions' list, where the source mode is +specified by idd-major-mode-p. + +<action> ist a function, which has two arguments, the specifies the +source and the second the destination.") + +(make-variable-buffer-local 'idd-actions) + +(defun idd-compare-a-specification (source-or-destination + specification) + "Tests if SOURCE-OR-DESTINATION matches the SPECIFICATION. +It returns a value (1 in general) if both are matching or nil." + (eval (list (car specification) + 'source-or-destination + '(cdr specification)))) + +(defun idd-compare-specifications-1 (source-or-destination + specifications + value) + "Internal function of `idd-compare-specifications'. +VALUE is the value of the last matches." + (cond ((not specifications) value) + (t (let ((match (idd-compare-a-specification source-or-destination + (car specifications)))) + (cond ((not match) 0) + (t (idd-compare-specifications-1 source-or-destination + (cdr specifications) + (+ value match)))))))) + +(defun idd-compare-specifications (source-or-destination + specifications) + "Determines how good SOURCE-OR-DESTINATION and SPECIFICATIONS are matching. +A return value of zero means, that they don't match. The higher the +return value the better is the matching." + (cond ((not specifications) 1) + (t (idd-compare-specifications-1 source-or-destination + specifications + 0)))) + +(defun idd-get-action-depending-on-destination (destination + actions-depending-on-dest + source-value + value-action-pair) + "Internal function of `idd-get-action-depending-on-source-and-destination'." + (let ((destination-value (idd-compare-specifications + destination + (car (car actions-depending-on-dest))))) + (cond ((not actions-depending-on-dest) value-action-pair) + ((or (= destination-value 0) + (<= (+ source-value destination-value) (car value-action-pair))) + (idd-get-action-depending-on-destination + destination + (cdr actions-depending-on-dest) + source-value + value-action-pair)) + (t (idd-get-action-depending-on-destination + destination + (cdr actions-depending-on-dest) + source-value + (cons (+ source-value destination-value) + (second (car actions-depending-on-dest)))))))) + +(defun idd-get-action-depending-on-source-and-destination (source + destination + actions + value-action-pair) + "Internal function of `idd-get-action'. +VALUE-ACTION-PAIR is a list like (<value> <action>). +It returns VALUE-ACTION-PAIR, if no other action is found, which has a +value higher than (car VALUE-ACTION-PAIR)." + (let ((source-value (idd-compare-specifications source (car (car actions))))) + (cond ((not actions) value-action-pair) + ((= source-value 0) + (idd-get-action-depending-on-source-and-destination + source + destination + (cdr actions) + value-action-pair)) + (t (idd-get-action-depending-on-source-and-destination + source + destination + (cdr actions) + (idd-get-action-depending-on-destination + destination + (cdr (car actions)) + source-value + value-action-pair)))))) + +(defun idd-get-action (source destination actions) + "Returns the action, which depends on the SOURCE and the DESTINATION. +The list ACTIONS contains all possible actions. Look at the variable +`idd-actions' for a description of the format of this list." + (idd-get-action-depending-on-source-and-destination source + destination + actions + '(0 . nil))) + +(defun idd-get-buffer-url (source-or-destination) + "Returns the URL of the buffer specified by SOURCE-OR-DESTINATION." + (save-excursion + (idd-set-point source-or-destination) + (url-view-url t))) + +(defun idd-get-url-at-point (source-or-destination) + "Returns the URL at the point specified by SOURCE-OR-DESTINATION. +It returns nil, if there is no URL." + (save-excursion + (idd-set-point source-or-destination) + (w3-view-this-url t))) + +(defun idd-url-at-point-p (source-or-destination value) + "Checks if there is an URL at the point of SOURCE-OR-DESTINATION. +If that is t and VALUE is t, or that is nil and VALUE is nil, then 1 +is returned. Otherwise nil is returned." + (if value + (if (idd-get-url-at-point source-or-destination) + 1 + nil) + (if (idd-get-url-at-point source-or-destination) + nil + 1))) + +(defun idd-major-mode-p (source-or-destination mode) + "Checks, if the major mode of SOURCE-OR-DESTINATION is MODE. +It returns 1, if that is t and nil otherwise." + (save-excursion + (set-buffer (cdr (assoc ':buffer source-or-destination))) + (if (eq major-mode mode) + 1 + nil))) + +(defun idd-set-point (source-or-destination) + "Sets the point and buffer to SOURCE-OR-DESTINATION." + (set-buffer (cdr (assoc ':buffer source-or-destination))) + (goto-char (cdr (assoc ':drag-or-drop-point source-or-destination)))) + +(defun idd-set-region (source-or-destination) + "Sets the point, mark and buffer to SOURCE-OR-DESTINATION. +The region is active after this function is called." + (set-buffer (cdr (assoc ':buffer source-or-destination))) + (goto-char (car (cdr (assoc ':region-active source-or-destination)))) + (set-mark (cdr (cdr (assoc ':region-active source-or-destination)))) + (activate-region)) + +(defun idd-get-dired-filename-from-line (source-or-destination) + "Returns the filename form the line in a dired buffer. +The position and the buffer is specified by SOURCE-OR-DESTINATION." + (save-excursion + (idd-set-point source-or-destination) + (dired-get-filename nil t))) + +(defun idd-dired-file-on-line-p (source-or-destination filename-regexp) + "Checks, if the filename on the line match FILENAME-REGEXP. +The function `dired-get-filename' is used, to get the filename from +the SOURCE-OR-DESTINATION. It returns 1, if it matchs or nil." + (let ((case-fold-search t)) + (if (and (idd-get-dired-filename-from-line source-or-destination) + (string-match filename-regexp + (idd-get-dired-filename-from-line + source-or-destination))) + 1 + nil))) + +(defun idd-dired-no-file-on-line-p (source-or-destination value) + "Checks, if a filename is in the dired buffer of SOURCE-OR-DESTINATION. +It returns 1, if a filename is on the line and if VALUE is t, or if +no filename is on the line and VALUE is nil, otherwise it returns +nil. For the test the function `dired-get-filename' is used." + (if (idd-get-dired-filename-from-line source-or-destination) + (if value nil 1) + (if value 1 nil))) + +(autoload 'ange-ftp-ftp-path "ange-ftp" + "Parse PATH according to ange-ftp-path-format (which see). +Returns a list (HOST USER PATH), or nil if PATH does not match the format.") + +(defun idd-get-local-filename (source-or-destination) + "Returns the filename of a local file specified by SOURCE-OR-DESTINATION." + (buffer-file-name (cdr (assoc ':buffer source-or-destination)))) + +(defun idd-get-directory-of-buffer (source-or-destination) + "Returns the directory name assigned to the SOURCE-OR-DESTINATION buffer." + (save-excursion + (idd-set-point source-or-destination) + default-directory)) + +(defun idd-local-file-p (source-or-destination value) + "Checks, if SOURCE-OR-DESTINATION has a file on the local filesystem. +If that is t and VALUE is t, or that is nil and VALUE is nil, then 1 +is returned. Otherwise nil is returned." + (let ((filename (idd-get-local-filename source-or-destination))) + (if (and filename + (not (ange-ftp-ftp-path filename))) + (if value 1 nil) + (if value nil 1)))) + +(defun idd-call-action (action source destination) + "Calls the drag and drop ACTION with its arguments SOURCE and DESTINATION." + (if (> (car action) 0) + (if (symbol-function (cdr action)) + (eval (list (cdr action) 'source 'destination)) + (error "Error: Action %s isn't a valid function!" (cdr action))) + (message "No valid action defined for this source and this destination!"))) + +(defun idd-mouse-drag-and-drop (source-event) + "Performs a drag and drop action. +At first you must click on the source and after that on the destination." + (interactive "@e") + (let ((source (list (cons ':buffer (current-buffer)) + (cons ':drag-or-drop-point + (event-closest-point source-event)) + (cons ':region-active (if (region-active-p) + (cons (point) + (mark)))))) + (destination nil) + (destination-event)) + (if (adapt-xemacsp) + (dispatch-event (next-command-event))) + (setq destination-event + (next-command-event nil "Drag&Drop: Click on the destination!")) + (cond ((button-press-event-p destination-event) + (setq destination (list (cons ':buffer + (event-buffer destination-event)) + (cons ':drag-or-drop-point + (event-closest-point + destination-event)) + (cons ':region-active nil))) + (if (adapt-emacs19p) + (while (not (button-release-event-p (next-command-event))))) + (idd-call-action (idd-get-action source destination idd-actions) + source + destination)) + (t (setq action "Wrong event") nil)))) + + +(provide 'internal-drag-and-drop)
--- a/lisp/hyperbole/README Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/hyperbole/README Mon Aug 13 08:46:35 2007 +0200 @@ -298,7 +298,7 @@ - {C-h h r e}, rolo-edit, just displays your personal rolodex file if you hit {RET} without specifying an entry name to edit. - - {m} within a rolodex match buffer composes mail to the the e-mail + - {m} within a rolodex match buffer composes mail to the e-mail address at point or the first address following point. Also added as Rolo/Mail minibuffer menu item and Rolodex/Mail-to-Address for window system menus.
--- a/lisp/ilisp/comint-v18.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/ilisp/comint-v18.el Mon Aug 13 08:46:35 2007 +0200 @@ -718,7 +718,7 @@ ;;; Typically, (lisp-mode) or (scheme-mode). ;;; ;;; If the command is given in a file buffer whose major modes is in -;;; SOURCE-MODES, then the the filename is the default file, and the +;;; SOURCE-MODES, then the filename is the default file, and the ;;; file's directory is the default directory. ;;; ;;; If the buffer isn't a source file buffer (e.g., it's the process buffer),
--- a/lisp/iso/iso-ascii.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/iso/iso-ascii.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,26 +1,29 @@ ;;; iso-ascii.el --- set up char tables for ISO 8859/1 on ASCII terminals. -;; Copyright (C) 1987 Free Software Foundation, Inc. +;; Copyright (C) 1987, 1995 Free Software Foundation, Inc. ;; Author: Howard Gayle ;; Maintainer: FSF ;; Keywords: i18n -;; This file is part of GNU Emacs. +;; This file is part of XEmacs. -;; GNU Emacs is free software; you can redistribute it and/or modify +;; XEmacs 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, +;; XEmacs 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, 675 Mass Ave, Cambridge, MA 02139, USA. +;; along with XEmacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Synched up with: FSF 19.34. ;;; Commentary: @@ -34,102 +37,111 @@ (require 'disp-table) -(standard-display-ascii 160 "{_}") ; NBSP (no-break space) -(standard-display-ascii 161 "{!}") ; inverted exclamation mark -(standard-display-ascii 162 "{c}") ; cent sign -(standard-display-ascii 163 "{GBP}") ; pound sign -(standard-display-ascii 164 "{$}") ; general currency sign -(standard-display-ascii 165 "{JPY}") ; yen sign -(standard-display-ascii 166 "{|}") ; broken vertical line -(standard-display-ascii 167 "{S}") ; section sign -(standard-display-ascii 168 "{\"}") ; diaeresis -(standard-display-ascii 169 "{C}") ; copyright sign -(standard-display-ascii 170 "{_a}") ; ordinal indicator, feminine -(standard-display-ascii 171 "{<<}") ; left angle quotation mark -(standard-display-ascii 172 "{~}") ; not sign -(standard-display-ascii 173 "{-}") ; soft hyphen -(standard-display-ascii 174 "{R}") ; registered sign -(standard-display-ascii 175 "{=}") ; macron -(standard-display-ascii 176 "{o}") ; degree sign -(standard-display-ascii 177 "{+-}") ; plus or minus sign -(standard-display-ascii 178 "{2}") ; superscript two -(standard-display-ascii 179 "{3}") ; superscript three -(standard-display-ascii 180 "{'}") ; acute accent -(standard-display-ascii 181 "{u}") ; micro sign -(standard-display-ascii 182 "{P}") ; pilcrow -(standard-display-ascii 183 "{.}") ; middle dot -(standard-display-ascii 184 "{,}") ; cedilla -(standard-display-ascii 185 "{1}") ; superscript one -(standard-display-ascii 186 "{_o}") ; ordinal indicator, masculine -(standard-display-ascii 187 "{>>}") ; right angle quotation mark -(standard-display-ascii 188 "{1/4}") ; fraction one-quarter -(standard-display-ascii 189 "{1/2}") ; fraction one-half -(standard-display-ascii 190 "{3/4}") ; fraction three-quarters -(standard-display-ascii 191 "{?}") ; inverted question mark -(standard-display-ascii 192 "{`A}") ; A with grave accent -(standard-display-ascii 193 "{'A}") ; A with acute accent -(standard-display-ascii 194 "{^A}") ; A with circumflex accent -(standard-display-ascii 195 "{~A}") ; A with tilde -(standard-display-ascii 196 "{\"A}") ; A with diaeresis or umlaut mark -(standard-display-ascii 197 "{AA}") ; A with ring -(standard-display-ascii 198 "{AE}") ; AE diphthong -(standard-display-ascii 199 "{,C}") ; C with cedilla -(standard-display-ascii 200 "{`E}") ; E with grave accent -(standard-display-ascii 201 "{'E}") ; E with acute accent -(standard-display-ascii 202 "{^E}") ; E with circumflex accent -(standard-display-ascii 203 "{\"E}") ; E with diaeresis or umlaut mark -(standard-display-ascii 204 "{`I}") ; I with grave accent -(standard-display-ascii 205 "{'I}") ; I with acute accent -(standard-display-ascii 206 "{^I}") ; I with circumflex accent -(standard-display-ascii 207 "{\"I}") ; I with diaeresis or umlaut mark -(standard-display-ascii 208 "{-D}") ; D with stroke, Icelandic eth -(standard-display-ascii 209 "{~N}") ; N with tilde -(standard-display-ascii 210 "{`O}") ; O with grave accent -(standard-display-ascii 211 "{'O}") ; O with acute accent -(standard-display-ascii 212 "{^O}") ; O with circumflex accent -(standard-display-ascii 213 "{~O}") ; O with tilde -(standard-display-ascii 214 "{\"O}") ; O with diaeresis or umlaut mark -(standard-display-ascii 215 "{x}") ; multiplication sign -(standard-display-ascii 216 "{/O}") ; O with slash -(standard-display-ascii 217 "{`U}") ; U with grave accent -(standard-display-ascii 218 "{'U}") ; U with acute accent -(standard-display-ascii 219 "{^U}") ; U with circumflex accent -(standard-display-ascii 220 "{\"U}") ; U with diaeresis or umlaut mark -(standard-display-ascii 221 "{'Y}") ; Y with acute accent -(standard-display-ascii 222 "{TH}") ; capital thorn, Icelandic -(standard-display-ascii 223 "{ss}") ; small sharp s, German -(standard-display-ascii 224 "{`a}") ; a with grave accent -(standard-display-ascii 225 "{'a}") ; a with acute accent -(standard-display-ascii 226 "{^a}") ; a with circumflex accent -(standard-display-ascii 227 "{~a}") ; a with tilde -(standard-display-ascii 228 "{\"a}") ; a with diaeresis or umlaut mark -(standard-display-ascii 229 "{aa}") ; a with ring -(standard-display-ascii 230 "{ae}") ; ae diphthong -(standard-display-ascii 231 "{,c}") ; c with cedilla -(standard-display-ascii 232 "{`e}") ; e with grave accent -(standard-display-ascii 233 "{'e}") ; e with acute accent -(standard-display-ascii 234 "{^e}") ; e with circumflex accent -(standard-display-ascii 235 "{\"e}") ; e with diaeresis or umlaut mark -(standard-display-ascii 236 "{`i}") ; i with grave accent -(standard-display-ascii 237 "{'i}") ; i with acute accent -(standard-display-ascii 238 "{^i}") ; i with circumflex accent -(standard-display-ascii 239 "{\"i}") ; i with diaeresis or umlaut mark -(standard-display-ascii 240 "{-d}") ; d with stroke, Icelandic eth -(standard-display-ascii 241 "{~n}") ; n with tilde -(standard-display-ascii 242 "{`o}") ; o with grave accent -(standard-display-ascii 243 "{'o}") ; o with acute accent -(standard-display-ascii 244 "{^o}") ; o with circumflex accent -(standard-display-ascii 245 "{~o}") ; o with tilde -(standard-display-ascii 246 "{\"o}") ; o with diaeresis or umlaut mark -(standard-display-ascii 247 "{/}") ; division sign -(standard-display-ascii 248 "{/o}") ; o with slash -(standard-display-ascii 249 "{`u}") ; u with grave accent -(standard-display-ascii 250 "{'u}") ; u with acute accent -(standard-display-ascii 251 "{^u}") ; u with circumflex accent -(standard-display-ascii 252 "{\"u}") ; u with diaeresis or umlaut mark -(standard-display-ascii 253 "{'y}") ; y with acute accent -(standard-display-ascii 254 "{th}") ; small thorn, Icelandic -(standard-display-ascii 255 "{\"y}") ; small y with diaeresis or umlaut mark +(defvar iso-ascii-convenient nil + "*Non-nil means `iso-ascii' should aim for convenience, not precision.") + +(defun iso-ascii-display (code string &optional convenient-string) + (if iso-ascii-convenient + (setq string (or convenient-string string)) + (setq string (concat "{" string "}"))) + (standard-display-ascii code string)) + +(iso-ascii-display 160 "_" " ") ; NBSP (no-break space) +(iso-ascii-display 161 "!") ; inverted exclamation mark +(iso-ascii-display 162 "c") ; cent sign +(iso-ascii-display 163 "GBP") ; pound sign +(iso-ascii-display 164 "$") ; general currency sign +(iso-ascii-display 165 "JPY") ; yen sign +(iso-ascii-display 166 "|") ; broken vertical line +(iso-ascii-display 167 "S" "(S)") ; section sign +(iso-ascii-display 168 "\"") ; diaeresis +(iso-ascii-display 169 "C" "(C)") ; copyright sign +(iso-ascii-display 170 "_a") ; ordinal indicator, feminine +(iso-ascii-display 171 "<<") ; left angle quotation mark +(iso-ascii-display 172 "~") ; not sign +(iso-ascii-display 173 "-") ; soft hyphen +(iso-ascii-display 174 "R" "(R)") ; registered sign +(iso-ascii-display 175 "=") ; macron +(iso-ascii-display 176 "o") ; degree sign +(iso-ascii-display 177 "+-") ; plus or minus sign +(iso-ascii-display 178 "2") ; superscript two +(iso-ascii-display 179 "3") ; superscript three +(iso-ascii-display 180 "'") ; acute accent +(iso-ascii-display 181 "u") ; micro sign +(iso-ascii-display 182 "P" "{P}") ; pilcrow +(iso-ascii-display 183 ".") ; middle dot +(iso-ascii-display 184 ",") ; cedilla +(iso-ascii-display 185 "1") ; superscript one +(iso-ascii-display 186 "_o") ; ordinal indicator, masculine +(iso-ascii-display 187 ">>") ; right angle quotation mark +(iso-ascii-display 188 "1/4") ; fraction one-quarter +(iso-ascii-display 189 "1/2") ; fraction one-half +(iso-ascii-display 190 "3/4") ; fraction three-quarters +(iso-ascii-display 191 "?") ; inverted question mark +(iso-ascii-display 192 "`A") ; A with grave accent +(iso-ascii-display 193 "'A") ; A with acute accent +(iso-ascii-display 194 "^A") ; A with circumflex accent +(iso-ascii-display 195 "~A") ; A with tilde +(iso-ascii-display 196 "\"A") ; A with diaeresis or umlaut mark +(iso-ascii-display 197 "AA") ; A with ring +(iso-ascii-display 198 "AE") ; AE diphthong +(iso-ascii-display 199 ",C") ; C with cedilla +(iso-ascii-display 200 "`E") ; E with grave accent +(iso-ascii-display 201 "'E") ; E with acute accent +(iso-ascii-display 202 "^E") ; E with circumflex accent +(iso-ascii-display 203 "\"E") ; E with diaeresis or umlaut mark +(iso-ascii-display 204 "`I") ; I with grave accent +(iso-ascii-display 205 "'I") ; I with acute accent +(iso-ascii-display 206 "^I") ; I with circumflex accent +(iso-ascii-display 207 "\"I") ; I with diaeresis or umlaut mark +(iso-ascii-display 208 "-D") ; D with stroke, Icelandic eth +(iso-ascii-display 209 "~N") ; N with tilde +(iso-ascii-display 210 "`O") ; O with grave accent +(iso-ascii-display 211 "'O") ; O with acute accent +(iso-ascii-display 212 "^O") ; O with circumflex accent +(iso-ascii-display 213 "~O") ; O with tilde +(iso-ascii-display 214 "\"O") ; O with diaeresis or umlaut mark +(iso-ascii-display 215 "x") ; multiplication sign +(iso-ascii-display 216 "/O") ; O with slash +(iso-ascii-display 217 "`U") ; U with grave accent +(iso-ascii-display 218 "'U") ; U with acute accent +(iso-ascii-display 219 "^U") ; U with circumflex accent +(iso-ascii-display 220 "\"U") ; U with diaeresis or umlaut mark +(iso-ascii-display 221 "'Y") ; Y with acute accent +(iso-ascii-display 222 "TH") ; capital thorn, Icelandic +(iso-ascii-display 223 "ss") ; small sharp s, German +(iso-ascii-display 224 "`a") ; a with grave accent +(iso-ascii-display 225 "'a") ; a with acute accent +(iso-ascii-display 226 "^a") ; a with circumflex accent +(iso-ascii-display 227 "~a") ; a with tilde +(iso-ascii-display 228 "\"a") ; a with diaeresis or umlaut mark +(iso-ascii-display 229 "aa") ; a with ring +(iso-ascii-display 230 "ae") ; ae diphthong +(iso-ascii-display 231 ",c") ; c with cedilla +(iso-ascii-display 232 "`e") ; e with grave accent +(iso-ascii-display 233 "'e") ; e with acute accent +(iso-ascii-display 234 "^e") ; e with circumflex accent +(iso-ascii-display 235 "\"e") ; e with diaeresis or umlaut mark +(iso-ascii-display 236 "`i") ; i with grave accent +(iso-ascii-display 237 "'i") ; i with acute accent +(iso-ascii-display 238 "^i") ; i with circumflex accent +(iso-ascii-display 239 "\"i") ; i with diaeresis or umlaut mark +(iso-ascii-display 240 "-d") ; d with stroke, Icelandic eth +(iso-ascii-display 241 "~n") ; n with tilde +(iso-ascii-display 242 "`o") ; o with grave accent +(iso-ascii-display 243 "'o") ; o with acute accent +(iso-ascii-display 244 "^o") ; o with circumflex accent +(iso-ascii-display 245 "~o") ; o with tilde +(iso-ascii-display 246 "\"o") ; o with diaeresis or umlaut mark +(iso-ascii-display 247 "/") ; division sign +(iso-ascii-display 248 "/o") ; o with slash +(iso-ascii-display 249 "`u") ; u with grave accent +(iso-ascii-display 250 "'u") ; u with acute accent +(iso-ascii-display 251 "^u") ; u with circumflex accent +(iso-ascii-display 252 "\"u") ; u with diaeresis or umlaut mark +(iso-ascii-display 253 "'y") ; y with acute accent +(iso-ascii-display 254 "th") ; small thorn, Icelandic +(iso-ascii-display 255 "\"y") ; small y with diaeresis or umlaut mark (provide 'iso-ascii)
--- a/lisp/iso/iso-cvt.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/iso/iso-cvt.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,65 +1,70 @@ -;; iso-cvt.el -- translate to ISO 8859-1 from/to net/TeX conventions -;; Copyright © 1993, 1994 Free Software Foundation, Inc. -;; Was formerly called gm-lingo.el. +;;; iso-cvt.el --- translate to ISO 8859-1 from/to net/TeX conventions +;; This file was formerly called gm-lingo.el. + +;; Copyright (C) 1993, 1994 Free Software Foundation, Inc. ;; Author: Michael Gschwind <mike@vlsivie.tuwien.ac.at> ;; Keywords: tex, iso, latin, i18n -;; This file is part of GNU Emacs. +;; This file is part of XEmacs. -;; GNU Emacs is free software; you can redistribute it and/or modify +;; XEmacs 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, +;; XEmacs 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, 675 Mass Ave, Cambridge, MA 02139, USA. +;; along with XEmacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Synched up with: FSF 19.34. ;;; Commentary: + ;; This lisp code serves two purposes, both of which involve ;; the translation of various conventions for representing European ;; character sets to ISO 8859-1. -; Net support: -; Various conventions exist in Newsgroups on how to represent national -; characters. The functions provided here translate these net conventions -; to ISO. -; -; Calling `iso-german' will turn the net convention for umlauts ("a etc.) -; into ISO latin1 umlaute for easy reading. -; 'iso-spanish' will turn net conventions for representing spanish -; to ISO latin1. (Note that accents are omitted in news posts most -; of the time, only enye is escaped.) +;; Net support: +;; Various conventions exist in Newsgroups on how to represent national +;; characters. The functions provided here translate these net conventions +;; to ISO. +;; +;; Calling `iso-german' will turn the net convention for umlauts ("a etc.) +;; into ISO latin1 umlauts for easy reading. +;; 'iso-spanish' will turn net conventions for representing spanish +;; to ISO latin1. (Note that accents are omitted in news posts most +;; of the time, only enye is escaped.) -; TeX support -; This mode installs hooks which change TeX files to ISO Latin-1 for -; simplified editing. When the TeX file is saved, ISO latin1 characters are -; translated back to escape sequences. -; -; An alternative is a TeX style that handles 8 bit ISO files -; (available on ftp.vlsivie.tuwien.ac.at in /pub/8bit) -; - but these files are difficult to transmit ... so while the net is -; still @ 7 bit this may be useful +;; TeX support +;; This mode installs hooks which change TeX files to ISO Latin-1 for +;; simplified editing. When the TeX file is saved, ISO latin1 characters are +;; translated back to escape sequences. +;; +;; An alternative is a TeX style that handles 8 bit ISO files +;; (available on ftp.vlsivie.tuwien.ac.at in /pub/8bit) +;; - but these files are difficult to transmit ... so while the net is +;; still @ 7 bit this may be useful -;; TO DO: -; The net support should install hooks (like TeX support does) -; which recognizes certains news groups and translates all articles from -; those groups. -; -; Cover more cases for translation (There is an infinite number of ways to -; represent accented characters in TeX) +;;; TO DO: +;; The net support should install hooks (like TeX support does) +;; which recognizes certain news groups and translates all articles from +;; those groups. +;; +;; Cover more cases for translation (There is an infinite number of ways to +;; represent accented characters in TeX) -;; SEE ALSO: -; If you are interested in questions related to using the ISO 8859-1 -; characters set (configuring emacs, Unix, etc. to use ISO), then you -; can get the ISO 8859-1 FAQ via anonymous ftp from -; ftp.vlsivie.tuwien.ac.at in /pub/bit/FAQ-ISO-8859-1 +;;; SEE ALSO: +;; If you are interested in questions related to using the ISO 8859-1 +;; characters set (configuring emacs, Unix, etc. to use ISO), then you +;; can get the ISO 8859-1 FAQ via anonymous ftp from +;; ftp.vlsivie.tuwien.ac.at in /pub/bit/FAQ-ISO-8859-1 ;;; Code: @@ -682,7 +687,7 @@ (defun iso-fix-tex2iso () "Turn TeX sequences into ISO 8859-1 (aka. ISO Latin-1) characters. -This function recognices German TeX buffers." +This function recognizes German TeX buffers." (if (or (equal major-mode 'latex-mode) (equal major-mode 'Latex-mode)) ; AucTeX wants this (if (iso-german-tex-p)
--- a/lisp/iso/iso-insert.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/iso/iso-insert.el Mon Aug 13 08:46:35 2007 +0200 @@ -6,21 +6,24 @@ ;; Maintainer: FSF ;; Keywords: i18n -;; This file is part of GNU Emacs. +;; This file is part of XEmacs. -;; GNU Emacs is free software; you can redistribute it and/or modify +;; XEmacs 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, +;; XEmacs 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, 675 Mass Ave, Cambridge, MA 02139, USA. +;; along with XEmacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Synched up with: FSF 19.34. ;;; Commentary:
--- a/lisp/iso/iso-swed.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/iso/iso-swed.el Mon Aug 13 08:46:35 2007 +0200 @@ -6,21 +6,24 @@ ;; Maintainer: FSF ;; Keywords: i18n -;; This file is part of GNU Emacs. +;; This file is part of XEmacs. -;; GNU Emacs is free software; you can redistribute it and/or modify +;; XEmacs 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, +;; XEmacs 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, 675 Mass Ave, Cambridge, MA 02139, USA. +;; along with XEmacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Synched up with: FSF 19.34. ;;; Commentary:
--- a/lisp/iso/iso-syntax.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/iso/iso-syntax.el Mon Aug 13 08:46:35 2007 +0200 @@ -6,21 +6,24 @@ ;; Maintainer: FSF ;; Keywords: i18n -;; This file is part of GNU Emacs. +;; This file is part of XEmacs. -;; GNU Emacs is free software; you can redistribute it and/or modify +;; XEmacs 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, +;; XEmacs 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, 675 Mass Ave, Cambridge, MA 02139, USA. +;; along with XEmacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Synched up with: FSF 19.34. ;;; Commentary: @@ -97,7 +100,8 @@ (set-case-syntax 223 "w" downcase) ; small sharp s, German (set-case-syntax 247 "_" downcase) ; division sign (set-case-syntax 255 "w" downcase) ; small y with diaeresis or umlaut mark - (set-standard-case-table downcase)) + (set-standard-case-table downcase) +) (provide 'iso-syntax)
--- a/lisp/iso/swedish.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/iso/swedish.el Mon Aug 13 08:46:35 2007 +0200 @@ -6,21 +6,24 @@ ;; Maintainer: FSF ;; Keywords: i18n -;; This file is part of GNU Emacs. +;; This file is part of XEmacs. -;; GNU Emacs is free software; you can redistribute it and/or modify +;; XEmacs 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, +;; XEmacs 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, 675 Mass Ave, Cambridge, MA 02139, USA. +;; along with XEmacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Synched up with: FSF 19.34. ;;; Code:
--- a/lisp/mailcrypt/mc-toplev.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/mailcrypt/mc-toplev.el Mon Aug 13 08:46:35 2007 +0200 @@ -550,7 +550,8 @@ (defun mc-gnus-verify-signature () (interactive) (gnus-summary-select-article) - (gnus-eval-in-buffer-window gnus-article-buffer + (save-excursion + (set-buffer gnus-original-article-buffer) (save-restriction (widen) (mc-verify-signature)))) ;;;###autoload
--- a/lisp/mh-e/mh-utils.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/mh-e/mh-utils.el Mon Aug 13 08:46:35 2007 +0200 @@ -16,8 +16,11 @@ ;; 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, 675 Mass Ave, Cambridge, MA 02139, USA. +;; along with XEmacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Synched up with: FSF 19.34. ;;; Commentary: @@ -25,7 +28,7 @@ ;;; Change Log: -;; $Id: mh-utils.el,v 1.1.1.1 1996/12/18 03:34:39 steve Exp $ +;; $Id: mh-utils.el,v 1.1.1.2 1996/12/18 03:46:49 steve Exp $ ;;; Code: @@ -300,7 +303,7 @@ ;; Changing contents, so this hook needs to be reinitialized. ;; pgp.el uses this. (if (boundp 'write-contents-hooks) ;Emacs 19 - (setq write-contents-hooks nil)) + (kill-local-variable 'write-contents-hooks)) (if formfile (mh-exec-lib-cmd-output "mhl" "-nobell" "-noclear" (if (stringp formfile) @@ -512,7 +515,7 @@ (end-of-line) (buffer-substring start (point))))))) -(defvar mua-paradigm "MH-E") ;from mua.el +(defvar mail-user-agent 'mh-e-user-agent) ;from reporter.el 3.2 (defun mh-find-path () ;; Set mh-progs and mh-lib. @@ -556,7 +559,7 @@ (setq mh-previous-seq (mh-get-profile-field "Previous-Sequence:")) (if mh-previous-seq (setq mh-previous-seq (intern mh-previous-seq))) - (setq mua-paradigm "MH-E") + (setq mail-user-agent 'mh-e-user-agent) (run-hooks 'mh-find-path-hook)))) (defun mh-find-progs () @@ -894,23 +897,23 @@ (cond ((eql status 0) ;success status) ((stringp status) ;kill string - (error (format "%s: %s" command status))) + (error "%s: %s" command status)) (t ;exit code (cond ((= (buffer-size) 0) ;program produced no error message - (error (format "%s: exit code %d" command status))) + (error "%s: exit code %d" command status)) (t ;; will error message fit on one line? (goto-line 2) (if (and (< (buffer-size) (screen-width)) (eobp)) - (error (buffer-substring 1 (progn (goto-char 1) + (error "%s" + (buffer-substring 1 (progn (goto-char 1) (end-of-line) (point)))) (display-buffer (current-buffer)) - (error (format - "%s failed with status %d. See error message in other window." - command status)))))))) + (error "%s failed with status %d. See error message in other window." + command status))))))) (defun mh-expand-file-name (filename &optional default)
--- a/lisp/modes/abbrev.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/modes/abbrev.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,7 +1,8 @@ -;;; abbrev.el --- abbrev mode commands for Emacs +;;; abbrev.el --- abbrev mode commands for Emacs -;; Copyright (C) 1985, 1986, 1992, 1993 Free Software Foundation, Inc. -;; Keywords: internal, abbrev +;; Copyright (C) 1985, 1986, 1987, 1992 Free Software Foundation, Inc. + +;; Keywords: abbrev ;; This file is part of XEmacs. @@ -17,14 +18,23 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. + +;;; Synched up with: FSF 19.34 (With some additions) + +;;; Commentary: + +;; This facility is documented in the Emacs Manual. + +;;; Code: ;jwz: this is preloaded so don't ;;;###autoload -(defconst only-global-abbrevs nil - "*t means user plans to use global abbrevs only. -Makes the commands to define mode-specific abbrevs define global ones instead." - ) +(defconst only-global-abbrevs nil "\ +*t means user plans to use global abbrevs only. +Makes the commands to define mode-specific abbrevs define global ones instead.") +;;; XEmacs: the following block of code is not in FSF (defvar abbrev-table-name-list '() "List of symbols whose values are abbrev tables.") @@ -234,17 +244,18 @@ (princ " \)\)\n" stream))) (terpri stream)) (message "")) - +;;; End code not in FSF (defun abbrev-mode (arg) "Toggle abbrev mode. -With arg, turn abbrev mode on iff arg is positive. +With argument ARG, turn abbrev mode on iff ARG is positive. In abbrev mode, inserting an abbreviation causes it to expand and be replaced by its expansion." (interactive "P") (setq abbrev-mode (if (null arg) (not abbrev-mode) (> (prefix-numeric-value arg) 0))) + ;; XEmacs change (redraw-modeline)) @@ -253,6 +264,7 @@ (if edit-abbrevs-map nil (setq edit-abbrevs-map (make-sparse-keymap)) + ;; XEmacs change (set-keymap-name edit-abbrevs-map 'edit-abbrevs-map) (define-key edit-abbrevs-map "\C-x\C-s" 'edit-abbrevs-redefine) (define-key edit-abbrevs-map "\C-c\C-c" 'edit-abbrevs-redefine)) @@ -306,7 +318,7 @@ (defun edit-abbrevs () "Alter abbrev definitions by editing a list of them. Selects a buffer containing a list of abbrev definitions. -You can edit them and type C-c C-c to redefine abbrevs +You can edit them and type \\<edit-abbrevs-map>\\[edit-abbrevs-redefine] to redefine abbrevs according to your editing. Buffer contains a header line for each abbrev table, which is the abbrev table name in parentheses. @@ -326,7 +338,7 @@ (defun define-abbrevs (&optional arg) "Define abbrevs according to current visible buffer contents. -See documentation of edit-abbrevs for info on the format of the +See documentation of `edit-abbrevs' for info on the format of the text you must have in the buffer. With argument, eliminate all abbrev definitions except the ones defined from the buffer now." @@ -337,24 +349,22 @@ (while (and (not (eobp)) (re-search-forward "^(" nil t)) (let* ((buf (current-buffer)) (table (read buf)) - (abbrevs '())) + abbrevs name hook exp count) (forward-line 1) (while (progn (forward-line 1) (not (eolp))) - (let* ((name (read buf)) - (count (read buf)) - (exp (read buf)) - hook) - (skip-chars-backward " \t\n\f") - (setq hook (if (not (eolp)) (read buf))) - (skip-chars-backward " \t\n\f") - (setq abbrevs (cons (list name exp hook count) abbrevs)))) + (setq name (read buf) count (read buf) exp (read buf)) + (skip-chars-backward " \t\n\f") + (setq hook (if (not (eolp)) (read buf))) + (skip-chars-backward " \t\n\f") + (setq abbrevs (cons (list name exp hook count) abbrevs))) (define-abbrev-table table abbrevs))))) (defun read-abbrev-file (&optional file quietly) - "Read abbrev definitions from file written with write-abbrev-file. -Takes file name as argument. -Optional second argument non-nil means don't print anything." + "Read abbrev definitions from file written with `write-abbrev-file'. +Optional argument FILE is the name of the file to read; +it defaults to the value of `abbrev-file-name'. +Optional second argument QUIETLY non-nil means don't print anything." (interactive "fRead abbrev file: ") (load (if (and file (> (length file) 0)) file abbrev-file-name) nil quietly) @@ -362,13 +372,16 @@ (defun quietly-read-abbrev-file (&optional file) "Read abbrev definitions from file written with write-abbrev-file. -Takes file name as argument. Does not print anything." +Optional argument FILE is the name of the file to read; +it defaults to the value of `abbrev-file-name'. +Does not print anything." ;(interactive "fRead abbrev file: ") (read-abbrev-file file t)) (defun write-abbrev-file (file) - "Write all abbrev definitions to file of Lisp code. -The file can be loaded to define the same abbrevs." + "Write all abbrev definitions to a file of Lisp code. +The file written can be loaded in another session to define the same abbrevs. +The argument FILE is the file name to write." (interactive (list (read-file-name "Write abbrev file: " @@ -387,30 +400,30 @@ (erase-buffer))) (defun add-mode-abbrev (arg) - "Define mode-specific abbrev for region or last word(s) before point. + "Define mode-specific abbrev for last word(s) before point. Argument is how many words before point form the expansion; or zero means the region is the expansion. A negative argument means to undefine the specified abbrev. Reads the abbreviation in the minibuffer. -Don't use this function in a Lisp program; use define-abbrev instead." +Don't use this function in a Lisp program; use `define-abbrev' instead." ;; XEmacs change: (interactive "P") - (add-abbrev (if only-global-abbrevs - global-abbrev-table - (or local-abbrev-table - (error "No per-mode abbrev table."))) - "Mode" - arg)) + (add-abbrev + (if only-global-abbrevs + global-abbrev-table + (or local-abbrev-table + (error "No per-mode abbrev table"))) + "Mode" arg)) (defun add-global-abbrev (arg) - "Define global (all modes) abbrev for region or last word(s) before point. -Argument is how many words before point form the expansion; -or zero means the region is the expansion. + "Define global (all modes) abbrev for last word(s) before point. +The prefix argument specifies the number of words before point that form the +expansion; or zero means the region is the expansion. A negative argument means to undefine the specified abbrev. -Reads the abbreviation in the minibuffer. +This command uses the minibuffer to read the abbreviation. -Don't use this function in a Lisp program; use define-abbrev instead." +Don't use this function in a Lisp program; use `define-abbrev' instead." ;; XEmacs change: (interactive "P") (add-abbrev global-abbrev-table "Global" arg)) @@ -429,6 +442,7 @@ (read-string (format (if exp "%s abbrev for \"%s\": " "Undefine %s abbrev: ") type exp))) + (set-text-properties 0 (length name) nil name) (if (or (null exp) (not (abbrev-expansion name table)) (y-or-n-p (format "%s expands to \"%s\"; redefine? " @@ -437,21 +451,21 @@ (defun inverse-add-mode-abbrev (arg) "Define last word before point as a mode-specific abbrev. -With argument N, defines the Nth word before point. -Reads the expansion in the minibuffer. +With prefix argument N, defines the Nth word before point. +This command uses the minibuffer to read the expansion. Expands the abbreviation after defining it." (interactive "p") - (inverse-add-abbrev (if only-global-abbrevs - global-abbrev-table - (or local-abbrev-table - (error "No per-mode abbrev table."))) - "Mode" - arg)) + (inverse-add-abbrev + (if only-global-abbrevs + global-abbrev-table + (or local-abbrev-table + (error "No per-mode abbrev table"))) + "Mode" arg)) (defun inverse-add-global-abbrev (arg) "Define last word before point as a global (mode-independent) abbrev. -With argument N, defines the Nth word before point. -Reads the expansion in the minibuffer. +With prefix argument N, defines the Nth word before point. +This command uses the minibuffer to read the expansion. Expands the abbreviation after defining it." (interactive "p") (inverse-add-abbrev global-abbrev-table "Global" arg)) @@ -462,6 +476,7 @@ (forward-word (- arg)) (setq name (buffer-substring (point) (progn (forward-word 1) (setq nameloc (point)))))) + (set-text-properties 0 (length name) nil name) (setq exp (read-string (format "%s expansion for \"%s\": " type name))) (if (or (not (abbrev-expansion name table)) @@ -475,10 +490,9 @@ (defun abbrev-prefix-mark (&optional arg) "Mark current point as the beginning of an abbrev. -Abbrev to be expanded starts here rather than at -beginning of word. This way, you can expand an abbrev -with a prefix: insert the prefix, use this command, -then insert the abbrev." +Abbrev to be expanded starts here rather than at beginning of word. +This way, you can expand an abbrev with a prefix: insert the prefix, +use this command, then insert the abbrev." (interactive "P") (or arg (expand-abbrev)) (setq abbrev-start-location (point-marker) @@ -488,8 +502,8 @@ (defun expand-region-abbrevs (start end &optional noquery) "For abbrev occurrence in the region, offer to expand it. The user is asked to type y or n for each occurrence. -A numeric argument means don't query; expand all abbrevs. -Calling from a program, arguments are START END &optional NOQUERY." +A prefix argument means don't query; expand all abbrevs. +If called from a Lisp program, arguments are START END &optional NOQUERY." (interactive "r\nP") (save-excursion (goto-char start) @@ -505,3 +519,5 @@ pnt))) (if (or noquery (y-or-n-p (format "Expand `%s'? " string))) (expand-abbrev))))))) + +;;; abbrev.el ends here
--- a/lisp/modes/ada-mode.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/modes/ada-mode.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,30 +1,31 @@ -;;; ada-mode.el - An Emacs major-mode for editing Ada source. +;;; ada-mode.el --- An Emacs major-mode for editing Ada source. ;;; Copyright (C) 1994, 1995 Free Software Foundation, Inc. ;;; Authors: Markus Heritsch <Markus.Heritsch@studbox.uni-stuttgart.de> ;;; Rolf Ebert <ebert@inf.enst.fr> -;;; 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 +;;; This file is part of XEmacs. + +;; XEmacs 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. +;; XEmacs 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, 675 Mass Ave, Cambridge, MA 02139, USA. +;; along with XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. ;;; This mode is a complete rewrite of a major mode for editing Ada 83 ;;; and Ada 95 source code under Emacs-19. It contains completely new ;;; indenting code and support for code browsing (see ada-xref). -;;; Synched up with: FSF 19.29. +;;; Synched up with: FSF 19.34. ;;; USAGE ;;; ===== @@ -63,51 +64,15 @@ ;;; ;;; In the presence of comments and/or incorrect syntax ;;; ada-format-paramlist produces weird results. -;;; +;;; ------------------- ;;; Indenting of some tasking constructs is still buggy. ;;; ------------------- -;;; For tagged types the problem comes from the keyword abstract: - -;;; type T2 is abstract tagged record -;;; X : Integer; -;;; Y : Float; -;;; end record; -;;; ------------------- -;;; In Emacs FSF 19.28, ada-mode will correctly indent comments at the -;;; very beginning of the buffer (_before_ any code) when I go M-; but -;;; when I press TAB I'd expect the comments to be placed at the beginning -;;; of the line, just as the first line of _code_ would be indented. - -;;; This does not happen but the comment stays put :-( I end up going -;;; M-; C-a M-\ -;;; ------------------- ;;; package Test is ;;; -- If I hit return on the "type" line it will indent the next line ;;; -- in another 3 space instead of heading out to the "(". If I hit ;;; -- tab or return it reindents the line correctly but does not initially. ;;; type Wait_Return is (Read_Success, Read_Timeout, Wait_Timeout, ;;; Nothing_To_Wait_For_In_Wait_List); -;;; -;;; -- The following line will be wrongly reindented after typing it in after -;;; -- the initial indent for the line was correct after type return after -;;; -- this line. Subsequent lines will show the same problem. -;;; Unused: constant Queue_ID := 0; -;;; ------------------- -;;; -- If I do the following I get -;;; -- "no matching procedure/function/task/declare/package" -;;; -- when I do return (I reverse the mappings of ^j and ^m) after "private". -;;; package Package1 is -;;; package Package1_1 is -;;; type The_Type is private; -;;; private -;;; ------------------- -;;; -- But what about this: -;;; package G is -;;; type T1 is new Integer; -;;; type T2 is new Integer; --< incorrect, correct if subtype -;;; package H is -;;; type T3 is new Integer; -;;; type --< Indentation is incorrect ;;; ------------------- @@ -116,7 +81,7 @@ ;;; ======= ;;; ;;; Many thanks to -;;; Philippe Warroquiers (PW) <philippe@cfmu.eurocontrol.be> in particular, +;;; Philippe Waroquiers (PW) <philippe@cfmu.eurocontrol.be> in particular, ;;; woodruff@stc.llnl.gov (John Woodruff) ;;; jj@ddci.dk (Jesper Joergensen) ;;; gse@ocsystems.com (Scott Evans) @@ -149,15 +114,13 @@ "*Defines the indentation for 'record' relative to 'type' or 'use'.") (defvar ada-indent-comment-as-code t - "*If non-nil, comment-lines get indented as ada-code.") + "*If non-nil, comment-lines get indented as Ada code.") (defvar ada-indent-is-separate t - "*If non-nil, 'is separate' or 'is abstract' on a separate line are -indented.") + "*If non-nil, 'is separate' or 'is abstract' on a single line are indented.") (defvar ada-indent-to-open-paren t - "*If non-nil, following lines get indented according to the innermost -open parenthesis.") + "*If non-nil, indent according to the innermost open parenthesis.") (defvar ada-search-paren-char-count-limit 3000 "*Search that many characters for an open parenthesis.") @@ -167,16 +130,17 @@ (defvar ada-tab-policy 'indent-auto "*Control behaviour of the TAB key. -Must be one of 'indent-rigidly, 'indent-auto, 'gei, 'indent-af or 'always-tab. - -'indent-rigidly : always adds ada-indent blanks at the beginning of the line. -'indent-auto : use indentation functions in this file. -'gei : use David Kågedal's Generic Indentation Engine. -'indent-af : use Gary E. Barnes' ada-format.el -'always-tab : do indent-relative.") +Must be one of `indent-rigidly', `indent-auto', `gei', `indent-af' +or `always-tab'. + +`indent-rigidly' : always adds ada-indent blanks at the beginning of the line. +`indent-auto' : use indentation functions in this file. +`gei' : use David Kågedal's Generic Indentation Engine. +`indent-af' : use Gary E. Barnes' ada-format.el +`always-tab' : do indent-relative.") (defvar ada-move-to-declaration nil - "*If non-nil, ada-move-to-start moves point to the subprog-declaration, + "*If non-nil, `ada-move-to-start' moves point to the subprog declaration, not to 'begin'.") (defvar ada-spec-suffix ".ads" @@ -186,26 +150,30 @@ "*Suffix of Ada body files.") (defvar ada-language-version 'ada95 - "*Do we program in 'ada83 or 'ada95?") + "*Do we program in `ada83' or `ada95'?") (defvar ada-case-keyword 'downcase-word - "*downcase-word, upcase-word, ada-loose-case-word or capitalize-word -to adjust ada keywords case.") + "*Function to call to adjust the case of Ada keywords. +It may be `downcase-word', `upcase-word', `ada-loose-case-word' or +`capitalize-word'.") (defvar ada-case-identifier 'ada-loose-case-word - "*downcase-word, upcase-word, ada-loose-case-word or capitalize-word -to adjust ada identifier case.") + "*Function to call to adjust the case of an Ada identifier. +It may be `downcase-word', `upcase-word', `ada-loose-case-word' or +`capitalize-word'.") (defvar ada-case-attribute 'capitalize-word - "*downcase-word, upcase-word, ada-loose-case-word or capitalize-word -to adjust ada identifier case.") + "*Function to call to adjust the case of Ada attributes. +It may be `downcase-word', `upcase-word', `ada-loose-case-word' or +`capitalize-word'.") (defvar ada-auto-case t - "*Non-nil automatically changes casing of preceeding word while typing. -Casing is done according to ada-case-keyword and ada-case-identifier.") + "*Non-nil automatically changes case of preceding word while typing. +Casing is done according to `ada-case-keyword', `ada-case-identifier' +and `ada-cacse-attribute'.") (defvar ada-clean-buffer-before-saving nil - "*If non-nil, remove-trailing-spaces and untabify buffer before saving.") + "*If non-nil, `remove-trailing-spaces' and `untabify' buffer before saving.") (defvar ada-mode-hook nil "*List of functions to call when Ada Mode is invoked. @@ -222,21 +190,21 @@ (defvar ada-fill-comment-postfix " --" "*This is inserted at the end of each line when filling a comment paragraph -with ada-fill-comment-paragraph postfix.") +with `ada-fill-comment-paragraph-postfix'.") (defvar ada-krunch-args "0" "*Argument of gnatk8, a string containing the max number of characters. -Set to 0, if you dont use crunched filenames.") +Set to 0, if you don't use crunched filenames.") ;;; ---- end of user configurable variables (defvar ada-mode-abbrev-table nil - "Abbrev table used in Ada mode.") + "Abbrev table used in Ada Mode.") (define-abbrev-table 'ada-mode-abbrev-table ()) (defvar ada-mode-map () - "Local keymap used for ada-mode.") + "Local keymap used for Ada Mode.") (defvar ada-mode-syntax-table nil "Syntax table to be used for editing Ada source code.") @@ -253,7 +221,17 @@ private\\|procedure\\|raise\\|range\\|record\\|rem\\|renames\\|\ return\\|reverse\\|select\\|separate\\|subtype\\|task\\|terminate\\|\ then\\|type\\|use\\|when\\|while\\|with\\|xor\\)\\>" - "regular expression for looking at Ada83 keywords.") +; "\\<\\(a\\(b\\(ort\\|s\\)\\|cce\\(pt\\|ss\\)\\|ll\\|nd\\|rray\\|t\\)\\|\ +;b\\(egin\\|ody\\)\\|c\\(ase\\|onstant\\)\\|\ +;d\\(e\\(clare\\|l\\(ay\\|ta\\)\\)\\|igits\\|o\\)\\|\ +;e\\(ls\\(e\\|if\\)\\|n\\(d\\|try\\)\\|x\\(ception\\|it\\)\\)\\|\ +;f\\(or\\|unction\\)\\|g\\(eneric\\|oto\\)\\|i[fns]\\|l\\(imited\\|oop\\)\\|\ +;mod\\|n\\(ew\\|ot\\|ull\\)\\|o\\([fr]\\|thers\\|ut\\)\\|\ +;p\\(ackage\\|r\\(agma\\|ivate\\|ocedure\\)\\)\\|\ +;r\\(a\\(ise\\|nge\\)\\|e\\(cord\\|m\\|names\\|turn\\|verse\\)\\)\\|\ +;s\\(e\\(lect\\|parate\\)\\|ubtype\\)\\|use\\| +;t\\(ask\\|erminate\\|hen\\|ype\\)\\|w\\(h\\(en\\|ile\\)\\|ith\\)\\|xor\\)\\>" + "Regular expression for looking at Ada83 keywords.") (defconst ada-95-keywords "\\<\\(abort\\|abs\\|abstract\\|accept\\|access\\|aliased\\|\ @@ -265,10 +243,10 @@ range\\|record\\|rem\\|renames\\|requeue\\|return\\|reverse\\|\ select\\|separate\\|subtype\\|tagged\\|task\\|terminate\\|then\\|\ type\\|until\\|use\\|when\\|while\\|with\\|xor\\)\\>" - "regular expression for looking at Ada95 keywords.") + "Regular expression for looking at Ada95 keywords.") (defvar ada-keywords ada-95-keywords - "regular expression for looking at Ada keywords.") + "Regular expression for looking at Ada keywords.") (defvar ada-ret-binding nil "Variable to save key binding of RET when casing is activated.") @@ -280,7 +258,7 @@ (defconst ada-ident-re "[a-zA-Z0-9_\\.]+" - "Regexp matching Ada identifiers.") + "Regexp matching Ada (qualified) identifiers.") (defvar ada-procedure-start-regexp "^[ \t]*\\(procedure\\|function\\|task\\)[ \t\n]+\\([a-zA-Z0-9_\\.]+\\)" @@ -297,26 +275,35 @@ "\\<\\(begin\\|select\\|declare\\|private\\|or\\|generic\\|\ exception\\|loop\\|else\\|\ \\(\\(limited\\|abstract\\|tagged\\)[ \t]+\\)*record\\)\\>" - "Regexp for keywords starting ada-blocks.") + "Regexp for keywords starting Ada blocks.") (defvar ada-end-stmt-re "\\(;\\|=>\\|^[ \t]*separate[ \t]+([a-zA-Z0-9_\\.]+)\\|\ \\<\\(begin\\|else\\|record\\|loop\\|select\\|do\\|\ -^[ \t]*package[ \ta-zA-Z0-9_\\.]+is\\|\ -^[ \t]*exception\\|declare\\|generic\\|private\\)\\>\\)" +declare\\|generic\\|private\\)\\>\\|\ +^[ \t]*\\(package\\|procedure\\|function\\)[ \ta-zA-Z0-9_\\.]+is\\|\ +^[ \t]*exception\\>\\)" "Regexp of possible ends for a non-broken statement. -'end' means that there has to start a new statement after these.") +A new statement starts after these.") (defvar ada-loop-start-re "\\<\\(for\\|while\\|loop\\)\\>" "Regexp for the start of a loop.") (defvar ada-subprog-start-re - "\\<\\(procedure\\|protected\\|package[ \t]+body\\|function\\|\ + "\\<\\(procedure\\|protected\\|package\\|function\\|\ task\\|accept\\|entry\\)\\>" "Regexp for the start of a subprogram.") +;; Written by Christian Egli <Christian.Egli@hcsd.hac.com> +;; +(defvar ada-imenu-generic-expression + '((nil "^\\s-*\\(procedure\\|function\\)\\s-+\\([A-Za-z0-9_]+\\)" 2) + ("Type Defs" "^\\s-*\\(sub\\)?type\\s-+\\([A-Za-z0-9_]+\\)" 2)) + + "Imenu generic expression for Ada mode. See `imenu-generic-expression'.") + ;;;------------- ;;; functions ;;;------------- @@ -326,9 +313,9 @@ (string-match "XEmacs" emacs-version))) (defun ada-create-syntax-table () - "Create the syntax table for ada-mode." + "Create the syntax table for Ada Mode." ;; There are two different syntax-tables. The standard one declares - ;; `_' a symbol constituent, in the second one, it is a word + ;; `_' as a symbol constituent, in the second one, it is a word ;; constituent. For some search and replacing routines we ;; temporarily switch between the two. (setq ada-mode-syntax-table (make-syntax-table)) @@ -464,6 +451,17 @@ (make-local-variable 'fill-paragraph-function) (setq fill-paragraph-function 'ada-fill-comment-paragraph) + (make-local-variable 'imenu-generic-expression) + (setq imenu-generic-expression ada-imenu-generic-expression) + + (make-local-variable 'font-lock-defaults) + (setq font-lock-defaults '((ada-font-lock-keywords + ada-font-lock-keywords-1 + ada-font-lock-keywords-2) + nil t + ((?\_ . "w")) + beginning-of-line)) + (setq major-mode 'ada-mode) (setq mode-name "Ada") @@ -521,9 +519,9 @@ (defun ada-fill-comment-paragraph (&optional justify postfix) "Fills the current comment paragraph. If JUSTIFY is non-nil, each line is justified as well. -If POSTFIX and JUSTIFY are non-nil, ada-fill-comment-postfix is appended +If POSTFIX and JUSTIFY are non-nil, `ada-fill-comment-postfix' is appended to each filled and justified line. -If ada-indent-comment-as code is non-nil, the paragraph is idented." +If `ada-indent-comment-as-code' is non-nil, the paragraph is idented." (interactive "P") (let ((opos (point-marker)) (begin nil) @@ -661,11 +659,11 @@ (defun ada-call-pretty-printer () "Calls the external Pretty Printer. -The name is specified in ada-external-pretty-print-program. Saves the -current buffer in a directory specified by ada-tmp-directory, -starts the Pretty Printer as external process on that file and then -reloads the beautyfied program in the buffer and cleans up -ada-tmp-directory." +The name is specified in `ada-external-pretty-print-program'. Saves the +current buffer in a directory specified by `ada-tmp-directory', +starts the pretty printer as an external process on that file and then +reloads the beautified program in the buffer and cleans up +`ada-tmp-directory'." (interactive) (let ((filename-with-path buffer-file-name) (curbuf (current-buffer)) @@ -751,10 +749,10 @@ (defun ada-adjust-case (&optional force-identifier) - "Adjust the case of the word before the just-typed character, -according to ada-case-keyword and ada-case-identifier -If FORCE-IDENTIFIER is non-nil then also adjust keyword as -identifier." ; (MH) + "Adjust the case of the word before the just typed character. +Respect options `ada-case-keyword', `ada-case-identifier', and +`ada-case-attribute'. +If FORCE-IDENTIFIER is non-nil then also adjust keyword as identifier." ; (MH) (forward-char -1) (if (and (> (point) 1) (not (or (ada-in-string-p) (ada-in-comment-p) @@ -803,7 +801,7 @@ ;; save original keybindings to allow swapping ret/lfd ;; when casing is activated ;; the 'or ...' is there to be sure that the value will not - ;; be changed again when ada-mode is called more than once (MH) + ;; be changed again when Ada Mode is called more than once (MH) (or ada-ret-binding (setq ada-ret-binding (key-binding "\C-M"))) (or ada-lfd-binding @@ -821,7 +819,7 @@ ;; added by MH ;; (defun ada-loose-case-word (&optional arg) - "Capitalizes the first and the letters following _ + "Capitalizes the first letter and the letters following `_'. ARG is ignored, it's there to fit the standard casing functions' style." (let ((pos (point)) (first t)) @@ -839,8 +837,8 @@ ;; added by MH ;; (defun ada-adjust-case-region (from to) - "Adjusts the case of all identifiers and keywords in the region. -ATTENTION: This function might take very long for big regions !" + "Adjusts the case of all words in the region. +Attention: This function might take very long for big regions !" (interactive "*r") (let ((begin nil) (end nil) @@ -861,8 +859,8 @@ ;; print status message ;; (setq reldiff (- (point) from)) - (message (format "adjusting case ... %5d characters left" - (- (point) from))) + (message "adjusting case ... %5d characters left" + (- (point) from)) (forward-char 1) (or ;; do nothing if it is a string or comment @@ -889,8 +887,8 @@ ;; added by MH ;; (defun ada-adjust-case-buffer () - "Adjusts the case of all identifiers and keywords in the whole buffer. -ATTENTION: This function might take very long for big buffers !" + "Adjusts the case of all words in the whole buffer. +Attention: This function might take very long for big buffers !" (interactive "*") (ada-adjust-case-region (point-min) (point-max))) @@ -900,11 +898,11 @@ ;;;------------------------;;; (defun ada-format-paramlist () - "Re-formats a parameter-list. -ATTENTION: 1) Comments inside the list are killed ! + "Reformats a parameter-list. +Attention: 1) Comments inside the list are killed ! 2) If the syntax is not correct (especially, if there are semicolons missing), it can get totally confused ! -In such a case, use 'undo', correct the syntax and try again." +In such a case, use `undo', correct the syntax and try again." (interactive) (let ((begin nil) @@ -922,9 +920,7 @@ ;; find start of current parameter-list ;; (ada-search-ignore-string-comment - (concat "\\<\\(" - "procedure\\|function\\|body\\|package\\|task\\|entry\\|accept" - "\\)\\>") t nil) + (concat ada-subprog-start-re "\\|\\<body\\>" ) t nil) (ada-search-ignore-string-comment "(" nil nil t) (backward-char 1) (setq begin (point)) @@ -971,7 +967,7 @@ ;; of its contents. ;; The list has the following format: ;; - ;; Name of Param in? out? accept? Name of Type Default-Exp or nil + ;; Name of Param in? out? access? Name of Type Default-Exp or nil ;; ;; ( ('Name_Param_1' t nil t Type_Param_1 ':= expression') ;; ('Name_Param_2' nil nil t Type_Param_2 nil) ) @@ -1043,24 +1039,24 @@ t))))) ;; - ;; look for 'accept' + ;; look for 'access' ;; (goto-char apos) (setq param (append param (list (consp - (ada-search-ignore-string-comment "\\<accept\\>" + (ada-search-ignore-string-comment "\\<access\\>" nil epos t))))) ;; - ;; skip 'in'/'out'/'accept' + ;; skip 'in'/'out'/'access' ;; (goto-char apos) (ada-goto-next-non-ws) - (while (looking-at "\\<\\(in\\|out\\|accept\\)\\>") + (while (looking-at "\\<\\(in\\|out\\|access\\)\\>") (forward-word 1) (ada-goto-next-non-ws)) @@ -1108,14 +1104,14 @@ (defun ada-insert-paramlist (paramlist) ;; Inserts a formatted PARAMLIST in the buffer. - ;; See doc of ada-scan-paramlist for the format. + ;; See doc of `ada-scan-paramlist' for the format. (let ((i (length paramlist)) (parlen 0) (typlen 0) (temp 0) (inp nil) (outp nil) - (acceptp nil) + (accessp nil) (column nil) (orgpoint 0) (firstcol nil)) @@ -1159,10 +1155,10 @@ (nth 2 (nth i paramlist)))) ;; - ;; is there any 'accept' ? + ;; is there any 'access' ? ;; - (setq acceptp - (or acceptp + (setq accessp + (or accessp (nth 3 (nth i paramlist))))) ; end of loop ;; @@ -1213,7 +1209,7 @@ (insert "in ") (if (and (or inp - acceptp) + accessp) (not (nth 3 (nth i paramlist)))) (insert " "))) @@ -1224,15 +1220,15 @@ (insert "out ") (if (and (or outp - acceptp) + accessp) (not (nth 3 (nth i paramlist)))) (insert " "))) ;; - ;; insert 'accept' + ;; insert 'access' ;; (if (nth 3 (nth i paramlist)) - (insert "accept ")) + (insert "access ")) (setq column (current-column)) @@ -1274,7 +1270,7 @@ ;;;----------------------------;;; (defun ada-move-to-start () - "Moves point to the matching start of the current end ... around point." + "Moves point to the matching start of the current Ada structure." (interactive) (let ((pos (point))) (unwind-protect @@ -1392,7 +1388,7 @@ ;; ---- main functions for indentation (defun ada-indent-region (beg end) - "Indents the region using ada-indent-current on each line." + "Indents the region using `ada-indent-current' on each line." (interactive "*r") (goto-char beg) (let ((block-done 0) @@ -1404,18 +1400,16 @@ (condition-case err (while (< (point) endmark) (if (> block-done 9) - (progn (message (format msg lines-remaining)) + (progn (message msg lines-remaining) (setq block-done 0))) (if (looking-at "^$") nil (ada-indent-current)) (forward-line 1) (setq block-done (1+ block-done)) (setq lines-remaining (1- lines-remaining))) - ;; show line number where the error occured + ;; show line number where the error occurred (error - (error (format "line %d: %s" - (1+ (count-lines (point-min) (point))) - err) nil))) + (error "line %d: %s" (1+ (count-lines (point-min) (point))) err))) (message "indenting ... done"))) @@ -1465,7 +1459,7 @@ (defun ada-indent-current () "Indents current line as Ada code. This works by two steps: - 1) It moves point to the end of the previous code-line. + 1) It moves point to the end of the previous code line. Then it calls the function to calculate the indentation for the following line as if a newline would be inserted there. The calculated column # is saved and the old position of point @@ -1502,7 +1496,10 @@ (setq prev-indent (save-excursion (funcall (ada-indent-function) line-end)))) - (setq prevline nil))) + (progn ; first line of buffer -> set indent + (beginning-of-line) ; to 0 + (delete-horizontal-space) + (setq prevline nil)))) (if prevline ;; @@ -1514,8 +1511,11 @@ ;; (back-to-indentation) (setq cur-indent (ada-get-current-indent prev-indent)) - (delete-horizontal-space) - (indent-to cur-indent) + ;; only reindent if indentation is different then the current + (if (= (current-column) cur-indent) + nil + (delete-horizontal-space) + (indent-to cur-indent)) ;; ;; restore position of point @@ -2128,8 +2128,7 @@ "\\<\\(separate\\|new\\|abstract\\)\\>" nil orgpoint)))) (goto-char (car match-cons)) - (ada-search-ignore-string-comment (concat ada-subprog-start-re - "\\|\\<package\\>") t) + (ada-search-ignore-string-comment ada-subprog-start-re t) (ada-get-indent-noindent orgpoint)) ;; ;; something follows 'is' @@ -2419,6 +2418,7 @@ ;; End-statements are defined by 'ada-end-stmt-re'. Checks for ;; certain keywords if they follow 'end', which means they are no ;; end-statement there. + (interactive) ;; DEBUG (let ((match-dat nil) (pos nil) (found nil)) @@ -2445,7 +2445,7 @@ (looking-at "\\<end\\>")))) (setq found t) - (backward-word 1)))) ; end of loop + (forward-word -1)))) ; end of loop (if found match-dat @@ -2475,7 +2475,7 @@ (defun ada-goto-previous-word () - ;; Moves point to the beginning of the previous word of ada-code. + ;; Moves point to the beginning of the previous word of Ada code. ;; Returns the new position of point or nil if not found. (let ((match-cons nil) (orgpoint (point))) @@ -2501,9 +2501,7 @@ ;; Moves point to the matching block start. (ada-goto-matching-start 0) (if (not (looking-at (concat "\\<" keyword "\\>"))) - (error (concat - "matching start is not '" - keyword "'")))) + (error "matching start is not '%s'" keyword))) (defun ada-check-defun-name (defun-name) @@ -2542,19 +2540,15 @@ ;; should be looking-at the correct name ;; (if (not (looking-at (concat "\\<" defun-name "\\>"))) - (error - (concat - "matching defun has different name: " - (buffer-substring - (point) - (progn - (forward-sexp 1) - (point)))))))) + (error "matching defun has different name: %s" + (buffer-substring (point) + (progn (forward-sexp 1) (point))))))) (defun ada-goto-matching-decl-start (&optional noerror nogeneric) ;; Moves point to the matching declaration start of the current 'begin'. ;; If NOERROR is non-nil, it only returns nil if no match was found. + (interactive) ;; DEBUG (let ((nest-count 1) (pos nil) (first t) @@ -2583,7 +2577,8 @@ (setq first nil)) ;; ((looking-at "is") - ;; check if it is only a type definition + ;; check if it is only a type definition, but not a protected + ;; type definition, which should be handled like a procedure. (if (save-excursion (ada-goto-previous-word) (skip-chars-backward "a-zA-Z0-9_.'") @@ -2596,7 +2591,12 @@ (skip-chars-backward "a-zA-Z0-9_.'") )) (ada-goto-previous-word) - (looking-at "\\<type\\>")) ; end of save-excursion + (and + (looking-at "\\<type\\>") + (save-match-data + (ada-goto-previous-word) + (not (looking-at "\\<protected\\>")))) + ); end of save-excursion (goto-char (match-beginning 0)) (progn (setq nest-count (1- nest-count)) @@ -2631,7 +2631,7 @@ ada-subprog-start-re t) (looking-at "declare\\|generic"))))) (if noerror nil - (error "no matching procedure/function/task/declare/package")) + (error "no matching proc/func/task/declare/package/protected")) t))) @@ -3064,8 +3064,12 @@ (defun ada-in-comment-p () ;; Returns t if inside a comment. - (save-excursion (and (re-search-backward "\\(--\\|\n\\)" nil 1) - (looking-at "-")))) + ;; (save-excursion (and (re-search-backward "\\(--\\|\n\\)" nil 1) + ;; (looking-at "-")))) + (nth 4 (parse-partial-sexp + (save-excursion (beginning-of-line) (point)) + (point)))) + (defun ada-in-string-p () @@ -3098,7 +3102,7 @@ ;; inside parentheses ? (looking-at "(") (backward-word 2) - ;; right keyword before paranthesis ? + ;; right keyword before parenthesis ? (looking-at (concat "\\<\\(" "procedure\\|function\\|body\\|package\\|" "task\\|entry\\|accept\\)\\>")) @@ -3200,13 +3204,15 @@ ;;;---------------;;; (defun ada-remove-trailing-spaces () -;; remove all trailing spaces at the end of lines. "remove trailing spaces in the whole buffer." (interactive) - (save-excursion - (goto-char (point-min)) - (while (re-search-forward "[ \t]+$" nil t) - (replace-match "" nil nil)))) + (save-match-data + (save-excursion + (save-restriction + (widen) + (goto-char (point-min)) + (while (re-search-forward "[ \t]+$" (point-max) t) + (replace-match "" nil nil)))))) (defun ada-untabify-buffer () @@ -3216,14 +3222,14 @@ (defun ada-uncomment-region (beg end) - "delete comment-start at the beginning of a line in the region." + "delete `comment-start' at the beginning of a line in the region." (interactive "r") (comment-region beg end -1)) ;; define a function to support find-file.el if loaded (defun ada-ff-other-window () - "Find other file in other window using ff-find-other-file." + "Find other file in other window using `ff-find-other-file'." (interactive) (and (fboundp 'ff-find-other-file) (ff-find-other-file t))) @@ -3311,7 +3317,7 @@ ;; Change basic functionality - ;; substitute-key-definition is not defined equally in GNU Emacs + ;; `substitute-key-definition' is not defined equally in GNU Emacs ;; and XEmacs, you cannot put in an optional 4th parameter in ;; XEmacs. I don't think it's necessary, so I leave it out for ;; GNU Emacs as well. If you encounter any problems with the @@ -3338,7 +3344,7 @@ (require 'easymenu) (defun ada-add-ada-menu () - "Adds the menu 'Ada' to the menu-bar in Ada Mode." + "Adds the menu 'Ada' to the menu bar in Ada Mode." (easy-menu-define ada-mode-menu ada-mode-map "Menu keymap for Ada mode." '("Ada" ["Next Package" ada-next-package t] @@ -3420,7 +3426,7 @@ ;;;###autoload (defun ada-make-filename-from-adaname (adaname) - "determine the filename of a package/procedure from its own Ada name." + "Determine the filename of a package/procedure from its own Ada name." ;; this is done simply by calling gkrunch, when we work with GNAT. It ;; must be a more complex function in other compiler environments. (interactive "s") @@ -3460,8 +3466,8 @@ ;;; functions for placing the cursor on the corresponding subprogram (defun ada-which-function-are-we-in () - "Determine whether we are on a function definition/declaration and remember -the name of that function." + "Determine whether we are on a function definition/declaration. +If that is the case remember the name of that function." (setq ff-function-name nil) @@ -3481,7 +3487,7 @@ ;;;--------------------------------------------------- (defun imenu-create-ada-index (&optional regexp) - "create index alist for Ada files." + "Create index alist for Ada files." (let ((index-alist '()) prev-pos char) (goto-char (point-min)) @@ -3533,12 +3539,13 @@ "accept\\|" "entry\\|" "function\\|" + "package[ \t]+body\\|" "package\\|" - "package[ \t]+body\\|" + "pragma\\|" "procedure\\|" - "protected\\|" "protected[ \t]+body\\|" "protected[ \t]+type\\|" + "protected\\|" ;; "p\\(\\(ackage\\|rotected\\)\\(\\|[ \t]+\\(body\\|type\\)\\)\ ;;\\|r\\(agma\\|ocedure\\)\\)\\|" "task\\|" @@ -3548,8 +3555,7 @@ "\\)\\>[ \t]*" "\\(\\sw+\\(\\.\\sw*\\)*\\)?") '(1 font-lock-keyword-face) '(2 font-lock-function-name-face nil t))) - "For consideration as a value of `ada-font-lock-keywords'. -This does fairly subdued highlighting.") + "Subdued level highlighting for Ada mode.") (defconst ada-font-lock-keywords-2 (append ada-font-lock-keywords-1 @@ -3578,7 +3584,7 @@ "\\)\\>") ;; ;; Anything following end and not already fontified is a body name. - '("\\<\\(end\\)\\>[ \t]+\\(\\sw+\\)?" + '("\\<\\(end\\)\\>[ \t]+\\([a-zA-Z0-9_\\.]+\\)?" (1 font-lock-keyword-face) (2 font-lock-function-name-face nil t)) ;; ;; Variable name plus optional keywords followed by a type name. Slow. @@ -3601,8 +3607,8 @@ "\\)\\>[ \t]*\\(\\sw+\\)?[ \t]*\\((\\)?") '(1 font-lock-keyword-face) '(2 (if (match-beginning 4) - 'font-lock-function-name-face - 'font-lock-type-face) nil t)) + font-lock-function-name-face + font-lock-type-face) nil t)) ;; ;; Keywords followed by a (comma separated list of) reference. (list (concat "\\<\\(goto\\|raise\\|use\\|with\\)\\>" ; "when" removed @@ -3613,44 +3619,16 @@ ;; Goto tags. '("<<\\(\\sw+\\)>>" 1 font-lock-reference-face) )) - "For consideration as a value of `ada-font-lock-keywords'. -This does a lot more highlighting.") - -;(defconst ada-font-lock-keywords (purecopy -; (let ((ident "\\(\\(\\sw\\|\\s_\\)+\\)") ; indent is 2nd capture -; (decl-1 "\\(procedure\\|function\\|package\\)[ \t]+") ; 1 () -; (decl-2 "\\(task\\|package\\)[ \t]+body[ \t]+") ; 1() -; (kwords-1 ; "normal" keywords -; '("abort" "abs" "accept" "access" "array" "begin" "body" "case" -; "constant" "declare" "delay" "delta" "digits" "else" "elsif" -; "entry" "exception" "exit" "function" "generic" "goto" "if" -; "others" "limited" "loop" "mod" "new" "null" "out" "subtype" -; "package" "pragma" "private" "procedure" "raise" "range" "record" -; "rem" "renames" "return" "reverse" "select" "separate" "task" -; "terminate" "then" "type" "when" "while" "with" "xor")) -; (kwords-2 ; keywords that may appear at the end of a word AND -; ; may also be preceeded by a non-space. -; '("and" "at" "do" "end" "for" "in" "is" "not" "of" "or" "use")) -; ) -; (list -; ;;'("\\(--.*\\)" 1 font-lock-comment-face t) ; syntax table should do this -; (list (concat "^[ \t]*" decl-2 ident) 3 'font-lock-function-name-face) -; (list (concat "^[ \t]*" decl-1 ident) 3 'font-lock-function-name-face) -; (cons (concat "\\(" (mapconcat 'identity kwords-1 "\\|") "\\)[ \n\t;(]") -; 1) -; (cons (concat "[ \t+=*/---]\\(" (mapconcat 'identity kwords-2 "\\|") -; "\\)[ \n\t;(]") -; 1) -; (cons "^\\(end\\)[ \n\t;(]" 1) -; (cons "\\.\\(all\\)" 1) -; ))) -; "Expressions to highlight in Ada buffers.") - + "Gaudy level highlighting for Ada mode.") + +;; XEmacs change (defvar ada-font-lock-keywords (if font-lock-maximum-decoration ada-font-lock-keywords-2 ada-font-lock-keywords-1) - "*Expressions to highlight in Ada mode.") - + "Default Expressions to highlight in Ada mode. +See the doc to `font-lock-maximum-decoration' for user configuration.") + +;; XEmacs change (put 'ada-mode 'font-lock-defaults '(ada-font-lock-keywords nil t ((?\_ . "w")))) @@ -3672,7 +3650,7 @@ ;; MATCH is a cons cell containing the start and end location of the ;; last search for ada-procedure-start-regexp. (goto-char (car match)) - (let (proc-found func-found) + (let (proc-found func-found procname functype) (cond ((or (setq proc-found (looking-at "^[ \t]*procedure")) (setq func-found (looking-at "^[ \t]*function")))
--- a/lisp/modes/arc-mode.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/modes/arc-mode.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,31 +1,32 @@ ;;; arc-mode.el --- simple editing of archives -;;; Copyright (C) 1995 Free Software Foundation, Inc. +;; Copyright (C) 1995 Free Software Foundation, Inc. ;; Author: Morten Welinder (terra@diku.dk) ;; Keywords: archives msdog editing major-mode ;; Favourite-brand-of-beer: None, I hate beer. -;;; 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, 675 Mass Ave, Cambridge, MA 02139, USA. +;; This file is part of XEmacs. + +;; XEmacs 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. -;;; Synched up with: FSF 19.30. +;; XEmacs 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 XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. + +;;; Synched up with: FSF 19.34. ;;; Commentary: -;; + ;; NAMING: "arc" is short for "archive" and does not refer specifically ;; to files whose name end in ".arc" ;; @@ -89,7 +90,7 @@ ;; Each member header points to the next. The archive is ;; terminated by a bogus header with a zero next link. ;; ------------------------------------- -;; HOOKS: `foo' means one the the supported archive types. +;; HOOKS: `foo' means one of the supported archive types. ;; ;; archive-mode-hook ;; archive-foo-mode-hook @@ -168,7 +169,7 @@ be added. If `archive-zip-use-pkzip' is non-nil then this program is expected to extract to a file junking the directory part of the name.") -;; For several reasons the latter behaviour is not desireable in general. +;; For several reasons the latter behaviour is not desirable in general. ;; (1) It uses more disk space. (2) Error checking is worse or non- ;; existent. (3) It tends to do funny things with other systems' file ;; names. @@ -254,9 +255,10 @@ a vector of [ext-file-name int-file-name case-fiddled mode ...]") (make-variable-buffer-local 'archive-files) -(defvar archive-lemacs +;; XEmacs change +(defvar archive-xemacs (string-match "\\(Lucid\\|XEmacs\\)" emacs-version) - "*Non-nil when running under under Lucid Emacs or Xemacs.") + "*Non-nil when running under Lucid Emacs or XEmacs.") ;; ------------------------------------------------------------------------- ;; Section: Support functions. @@ -498,7 +500,7 @@ (define-key archive-mode-map "G" 'archive-chgrp-entry) (define-key archive-mode-map "O" 'archive-chown-entry) - (if archive-lemacs + (if archive-xemacs (progn ;; Not a nice "solution" but it'll have to do (define-key archive-mode-map "\C-xu" 'archive-undo) @@ -507,9 +509,9 @@ archive-mode-map global-map)) (define-key archive-mode-map - (if archive-lemacs 'button2 [mouse-2]) 'archive-mouse-extract) + (if archive-xemacs 'button2 [mouse-2]) 'archive-mouse-extract) - (if archive-lemacs + (if archive-xemacs () ; out of luck ;; Get rid of the Edit menu bar item to save space. (define-key archive-mode-map [menu-bar edit] 'undefined) @@ -618,7 +620,7 @@ (archive-next-line no))) (defun archive-summarize-files (files) - "Insert a desciption of a list of files annotated with proper mouse face" + "Insert a description of a list of files annotated with proper mouse face" (setq archive-file-list-start (point-marker)) (setq archive-file-name-indent (if files (aref (car files) 1) 0)) ;; We don't want to do an insert for each element since that takes too @@ -632,7 +634,7 @@ ;; Using `concat' here copies the text also, so we can add ;; properties without problems. (let ((text (concat (aref fil 0) "\n"))) - (if archive-lemacs + (if archive-xemacs () ; out of luck (put-text-property (aref fil 1) (aref fil 2) 'mouse-face 'highlight
--- a/lisp/modes/asm-mode.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/modes/asm-mode.el Mon Aug 13 08:46:35 2007 +0200 @@ -20,9 +20,10 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary: @@ -53,6 +54,8 @@ (defvar asm-comment-char ?; "*The comment-start character assumed by Asm mode.") +;; XEmacs change (This is the primary difference, why was this +;; feature removed? -sb) (defvar asm-support-c-comments-p t "*Support C style comments. If t C style comments will be supported. This is mainly for the benefit of font-lock.") @@ -69,25 +72,27 @@ (if asm-mode-map nil + ;; XEmacs change (setq asm-mode-map (make-sparse-keymap 'asm-mode-map)) ;; Note that the comment character isn't set up until asm-mode is called. (define-key asm-mode-map ":" 'asm-colon) + (define-key asm-mode-map "\C-c;" 'comment-region) (define-key asm-mode-map "\C-i" 'tab-to-tab-stop) (define-key asm-mode-map "\C-j" 'asm-newline) (define-key asm-mode-map "\C-m" 'asm-newline) ) -(defvar asm-code-level-empty-comment-pattern nil) -(defvar asm-flush-left-empty-comment-pattern nil) -(defvar asm-inline-empty-comment-pattern nil) - (defconst asm-font-lock-keywords '(("^\\(\\(\\sw\\|\\s_\\)+\\)\\>:?[ \t]*\\(\\sw+\\)?" (1 font-lock-function-name-face) (3 font-lock-keyword-face nil t)) ("^\\s +\\(\\(\\sw\\|\\s_\\)+\\)" 1 font-lock-keyword-face)) "Additional expressions to highlight in Assembler mode.") +;; XEmacs change (put 'asm-mode 'font-lock-defaults '(asm-font-lock-keywords)) +(defvar asm-code-level-empty-comment-pattern nil) +(defvar asm-flush-left-empty-comment-pattern nil) +(defvar asm-inline-empty-comment-pattern nil) ;;;###autoload (defun asm-mode () @@ -107,13 +112,16 @@ Turning on Asm mode runs the hook `asm-mode-hook' at the end of initialization. -Special commands:\\{asm-mode-map} +Special commands: +\\{asm-mode-map} " (interactive) (kill-all-local-variables) (setq mode-name "Assembler") (setq major-mode 'asm-mode) (setq local-abbrev-table asm-mode-abbrev-table) + (make-local-variable 'font-lock-defaults) + (setq font-lock-defaults '(asm-font-lock-keywords)) (make-local-variable 'asm-mode-syntax-table) (setq asm-mode-syntax-table (make-syntax-table)) (set-syntax-table asm-mode-syntax-table) @@ -121,10 +129,12 @@ (run-hooks 'asm-mode-set-comment-hook) ;; Make our own local child of asm-mode-map ;; so we can define our own comment character. + ;; XEmacs change (let ((ourmap (make-sparse-keymap))) (set-keymap-parents ourmap (list asm-mode-map)) (use-local-map ourmap)) (local-set-key (vector asm-comment-char) 'asm-comment) + ;; XEmacs change (if asm-support-c-comments-p (progn (modify-syntax-entry ?/ ". 14" asm-mode-syntax-table)
--- a/lisp/modes/auto-show.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/modes/auto-show.el Mon Aug 13 08:46:35 2007 +0200 @@ -6,7 +6,24 @@ ;;; Modified by: Ben Wing <wing@666.com> ;;; Maintainer: FSF -;;; Synched up with: FSF 19.30. +;; This file is part of XEmacs. + +;; XEmacs 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. + +;; XEmacs 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 XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. + +;;; Synched up with: FSF 19.34 (But starting to deviate). ;;; Commentary: @@ -59,6 +76,7 @@ (defun auto-show-truncationp () "True if line truncation is enabled for the selected window." + ;; XEmacs change (use specifiers) ;; ### There should be a more straightforward way to do this from elisp. (or truncate-lines (and truncate-partial-width-windows @@ -76,6 +94,7 @@ (not auto-show-mode) (> (prefix-numeric-value arg) 0)))) +;; XEmacs addition: (defvar auto-show-inhibiting-commands '(scrollbar-char-left scrollbar-char-right @@ -87,6 +106,7 @@ "Commands that inhibit auto-show behavior. This normally includes the horizontal scrollbar commands.") +;; XEmacs addition: (defun auto-show-should-take-action-p () (and auto-show-mode (auto-show-truncationp) (equal (window-buffer) (current-buffer)) @@ -123,6 +143,7 @@ and longlines are being truncated in the selected window. See also the command `auto-show-toggle'." (interactive) + ;; XEmacs change (if (auto-show-should-take-action-p) (let* ((col (current-column)) ;column on line point is at (scroll (window-hscroll)) ;how far window is scrolled
--- a/lisp/modes/awk-mode.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/modes/awk-mode.el Mon Aug 13 08:46:35 2007 +0200 @@ -5,23 +5,24 @@ ;; Maintainer: FSF ;; Keywords: unix, languages -;; This file is part of GNU Emacs. +;; This file is part of XEmacs. -;; 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 +;; XEmacs 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. +;; XEmacs 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, 675 Mass Ave, Cambridge, MA 02139, USA. +;; along with XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary:
--- a/lisp/modes/bib-mode.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/modes/bib-mode.el Mon Aug 13 08:46:35 2007 +0200 @@ -5,23 +5,24 @@ ;; Maintainer: FSF ;; Keywords: bib -;; This file is part of GNU Emacs. +;; This file is part of XEmacs. -;; 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 +;; XEmacs 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. +;; XEmacs 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, 675 Mass Ave, Cambridge, MA 02139, USA. +;; along with XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary: @@ -200,7 +201,7 @@ (concat "the\\|and\\|of\\|is\\|a\\|an\\|of\\|for\\|in\\|to\\|in\\|on\\|at\\|" "by\\|with\\|that\\|its") - "Words not to be capitialized in a title (unless they're the first word + "Words not to be capitalized in a title (unless they're the first word in the title).") (defvar capitalize-title-stop-regexp
--- a/lisp/modes/bibtex.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/modes/bibtex.el Mon Aug 13 08:46:35 2007 +0200 @@ -668,7 +668,7 @@ School name (for theses) series The name of a series or set of books. - An individual book will will also have it's own title + An individual book will also have its own title title The title of the thing being referenced type
--- a/lisp/modes/cc-mode.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/modes/cc-mode.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,4 +1,4 @@ -;;; cc-mode.el --- major mode for editing C, C++, and Objective-C code +;;; cc-mode.el --- major mode for editing C, C++, Objective-C, and Java code ;; Copyright (C) 1985, 87, 92, 93, 94, 95, 96 Free Software Foundation, Inc. @@ -6,8 +6,8 @@ ;; 1987 Dave Detlefs and Stewart Clamen ;; 1985 Richard M. Stallman ;; Created: a long, long, time ago. adapted from the original c-mode.el -;; Version: 4.282 -;; Last Modified: 1996/02/09 23:15:14 +;; Version: 4.315 +;; Last Modified: 1996/08/20 21:08:13 ;; Keywords: c languages oop ;; NOTE: Read the commentary below for the right way to submit bug reports! @@ -45,12 +45,19 @@ ;; but there really is no top-level cc-mode. Usage and programming ;; details are contained in an accompanying texinfo manual. +;; NOTE: This mode does not perform font-locking (a.k.a syntactic +;; coloring, keyword highlighting, etc.). Typically this is done by a +;; package called font-lock.el which I do *not* maintain. You should +;; contact the Emacs maintainer for questions about coloring or +;; highlighting in any language mode. + ;; To submit bug reports, type "C-c C-b". These will be sent to -;; bug-gnu-emacs@prep.ai.mit.edu and I'll read about them there (this -;; is mirrored as the Usenet newsgroup gnu.emacs.bug). Questions can -;; sent to help-gnu-emacs@prep.ai.mit.edu (mirrored as -;; gnu.emacs.help). Please do not send bugs or questions to my -;; personal account. +;; bug-gnu-emacs@prep.ai.mit.edu as well as cc-mode-help@python.org, +;; and I'll read about them there (the former is mirrored as the +;; Usenet newsgroup gnu.emacs.bug). Questions can sent to +;; help-gnu-emacs@prep.ai.mit.edu (mirrored as gnu.emacs.help) or +;; cc-mode-help@python.org. Please do not send bugs or questions to +;; my personal account. ;; YOU CAN IGNORE ALL BYTE-COMPILER WARNINGS. They are the result of ;; the multi-Emacsen support. Emacs 19 (from the FSF), XEmacs 19 @@ -70,8 +77,8 @@ ;; (makunbound 'c++-mode-map) ;; (makunbound 'c-style-alist) -;; If your Emacs comes with cc-mode already (and as of 18-Jan-1996, -;; XEmacs 19.13 and Emacs 19.30 both do), you only need to add the +;; If your Emacs comes with cc-mode already (and as of 5-Jul-1996 +;; XEmacs 19.14 and Emacs 19.31 both do), you only need to add the ;; following to use the latest version of cc-mode: ;; ;; (load "cc-mode") @@ -107,9 +114,15 @@ ;; Without their patience, testing, insight, code contributions, and ;; encouragement cc-mode.el would be a far inferior package. -;; Anonymous ftp URL: +;; You can get the latest version of cc-mode, including PostScript +;; documentation and separate individual files from: ;; -;; ftp://ftp.python.org/pub/emacs/cc-mode.tar.gz +;; http://www.python.org/ftp/emacs/ + +;; Or if you don't have access to the World Wide Web, through +;; anonymous ftp from: +;; +;; ftp://ftp.python.org/pub/emacs ;;; Code: @@ -182,6 +195,9 @@ (objc-method-intro . -1000) (objc-method-args-cont . c-lineup-ObjC-method-args) (objc-method-call-cont . c-lineup-ObjC-method-call) + (extern-lang-open . 0) + (extern-lang-close . 0) + (inextern-lang . +) ) "*Association list of syntactic element symbols and indentation offsets. As described below, each cons cell in this list has the form: @@ -245,8 +261,8 @@ brace-list-close -- close brace of an enum or static array list brace-list-intro -- first line in an enum or static array list brace-list-entry -- subsequent lines in an enum or static array list - statement -- a C/C++/ObjC statement - statement-cont -- a continuation of a C/C++/ObjC statement + statement -- a C (or like) statement + statement-cont -- a continuation of a C (or like) statement statement-block-intro -- the first line in a new statement block statement-case-intro -- the first line in a case `block' statement-case-open -- the first line in a case block starting with brace @@ -254,14 +270,14 @@ substatement-open -- the brace that opens a substatement block case-label -- a case or default label access-label -- C++ private/protected/public access label - label -- any non-special C/C++/ObjC label + label -- any non-special C (or like) label do-while-closure -- the `while' that ends a do/while construct else-clause -- the `else' of an if/else construct comment-intro -- a line containing only a comment introduction arglist-intro -- the first line in an argument list arglist-cont -- subsequent argument list lines when no arguments follow on the same line as the - the arglist opening paren + arglist opening paren arglist-cont-nonempty -- subsequent argument list lines when at least one argument follows on the same line as the arglist opening paren @@ -273,19 +289,32 @@ objc-method-intro -- the first line of an Objective-C method definition objc-method-args-cont -- lines continuing an Objective-C method definition objc-method-call-cont -- lines continuing an Objective-C method call + extern-lang-open -- brace that opens an external language block + extern-lang-close -- brace that closes an external language block + inextern-lang -- analogous to `inclass' syntactic symbol ") (defvar c-tab-always-indent t "*Controls the operation of the TAB key. If t, hitting TAB always just indents the current line. If nil, hitting TAB indents the current line if point is at the left margin or -in the line's indentation, otherwise it insert a real tab character. -If other than nil or t, then tab is inserted only within literals --- defined as comments and strings -- and inside preprocessor +in the line's indentation, otherwise it insert a `real' tab character +\(see note\). If other than nil or t, then tab is inserted only within +literals -- defined as comments and strings -- and inside preprocessor directives, but line is always reindented. -Note that indentation of lines containing only comments is also -controlled by the `c-comment-only-line-offset' variable.") +Note: The value of `indent-tabs-mode' will determine whether a real +tab character will be inserted, or the equivalent number of space. +When inserting a tab, actually the function stored in the variable +`c-insert-tab-function' is called. + +Note: indentation of lines containing only comments is also controlled +by the `c-comment-only-line-offset' variable.") + +(defvar c-insert-tab-function 'insert-tab + "*Function used when inserting a tab for \\[TAB]. +Only used when `c-tab-always-indent' indicates a `real' tab character +should be inserted. Value must be a function taking no arguments.") (defvar c-comment-only-line-offset 0 "*Extra offset for line which contains only the start of a comment. @@ -355,7 +384,9 @@ (defvar c-hanging-braces-alist '((brace-list-open) (substatement-open after) - (block-close . c-snug-do-while)) + (block-close . c-snug-do-while) + (extern-lang-open after) + ) "*Controls the insertion of newlines before and after braces. This variable contains an association list with elements of the following form: (SYNTACTIC-SYMBOL . ACTION). @@ -368,9 +399,10 @@ SYNTACTIC-SYMBOL can be any of: defun-open, defun-close, class-open, class-close, inline-open, inline-close, block-open, block-close, -substatement-open, statement-case-open, brace-list-open, -brace-list-close, brace-list-intro, or brace-list-entry. See -`c-offsets-alist' for details. +substatement-open, statement-case-open, extern-lang-open, +extern-lang-close, brace-list-open, brace-list-close, +brace-list-intro, or brace-list-entry. See `c-offsets-alist' for +details. ACTION can be either a function symbol or a list containing any combination of the symbols `before' or `after'. If the list is empty, @@ -422,14 +454,8 @@ (defvar c-electric-pound-behavior nil "*List of behaviors for electric pound insertion. Only currently supported behavior is `alignleft'.") - -(defvar c-recognize-knr-p nil ; Emacs version uses t - "*If non-nil, `c-mode' and `objc-mode' will recognize K&R constructs. -This variable is needed because of ambiguities in C syntax that make -fast recognition of K&R constructs problematic, and slow. If you are -coding with ANSI prototypes, set this variable to nil to speed up -recognition of certain constructs. By setting this variable to nil, I -have seen an increase of 20 times under some circumstance.") +(defvar c-label-minimum-indentation 1 + "*Minimum indentation for labels and case tags in `gnu' style.") (defvar c-progress-interval 5 "*Interval used to update progress status during long re-indentation. @@ -437,7 +463,7 @@ that many seconds. Set to nil to inhibit updating. This is only useful for Emacs 19.") -(defvar c-style-alist +(defconst c-style-alist '(("gnu" (c-basic-offset . 2) (c-comment-only-line-offset . (0 . 0)) @@ -450,6 +476,7 @@ (arglist-intro . c-lineup-arglist-intro-after-paren) (arglist-close . c-lineup-arglist) )) + (c-special-indent-hook . c-gnu-impose-minimum) ) ("k&r" (c-basic-offset . 5) @@ -580,7 +607,7 @@ "*Hook called by `java-mode'.") (defvar c-mode-common-hook nil - "*Hook called by `c-mode', `c++-mode', and 'objc-mode' during common init.") + "*Hook called by all cc-mode modes for common initializations.") (defvar c-mode-menu '(["Comment Out Region" comment-region (mark)] @@ -684,18 +711,21 @@ flavor (if (or (string-match "Lucid" emacs-version) (string-match "XEmacs" emacs-version)) 'XEmacs 'FSF))) + ((= major 20) (setq major 'v20 ;XEmacs 20 + flavor 'XEmacs)) ;; I don't know (t (error "Cannot recognize major version number: %s" major))) ;; Regular expression suites... - (if (and (eq major 'v19) - (or (and (eq flavor 'XEmacs) (>= minor 14)) - (and (eq flavor 'FSF) (>= minor 30)))) + (if (or (eq major 'v20) + (and (eq major 'v19) + (or (and (eq flavor 'XEmacs) (>= minor 14)) + (and (eq flavor 'FSF) (>= minor 30))))) (setq re-suite 'new-re)) ;; XEmacs 19 uses 8-bit modify-syntax-entry flags, as do all ;; patched Emacs 19, Emacs 18, Epoch 4's. Only Emacs 19 uses a ;; 1-bit flag. Let's be as smart as we can about figuring this ;; out. - (if (eq major 'v19) + (if (or (eq major 'v20) (eq major 'v19)) (let ((table (copy-syntax-table))) (modify-syntax-entry ?a ". 12345678" table) (cond @@ -767,6 +797,7 @@ Emacs 18/Epoch 4: (v18 no-dual-comments RS) Emacs 18/Epoch 4 (patch2): (v18 8-bit RS) XEmacs 19: (v19 8-bit RS) + XEmacs 20: (v20 8-bit RS) Emacs 19: (v19 1-bit RS) RS is the regular expression suite to use. XEmacs versions after @@ -846,7 +877,7 @@ ;; (define-key c-mode-map "\e{" 'c-insert-braces) ;; Commented out electric square brackets because nobody likes them. ;; (define-key c-mode-map "[" 'c-insert-brackets) - (define-key c-mode-map "\e\C-h" 'c-mark-function) + (define-key c-mode-map "\C-c\C-m" 'c-mark-function) (define-key c-mode-map "\e\C-q" 'c-indent-exp) (define-key c-mode-map "\ea" 'c-beginning-of-statement) (define-key c-mode-map "\ee" 'c-end-of-statement) @@ -894,7 +925,9 @@ (if c++-mode-map () ;; In Emacs 19, it makes more sense to inherit c-mode-map - (if (memq 'v19 c-emacs-features) + (if (or + (memq 'v19 c-emacs-features) + (memq 'v20 c-emacs-features)) ;; XEmacs and Emacs 19 do this differently (cond ;; XEmacs 19.13 @@ -921,7 +954,7 @@ (if objc-mode-map () ;; In Emacs 19, it makes more sense to inherit c-mode-map - (if (memq 'v19 c-emacs-features) + (if (or (memq 'v19 c-emacs-features) (memq 'v20 c-emacs-features)) ;; XEmacs and Emacs 19 do this differently (cond ;; XEmacs 19.13 @@ -945,7 +978,7 @@ (if java-mode-map () ;; In Emacs 19, it makes more sense to inherit c-mode-map - (if (memq 'v19 c-emacs-features) + (if (or (memq 'v19 c-emacs-features) (memq 'v20 c-emacs-features)) ;; XEmacs and Emacs 19 do this differently (cond ;; XEmacs 19.13 @@ -1084,6 +1117,10 @@ c-protection-key "[ \t]+\\)" c-symbol-key) "Regexp describing C++ base classes in a derived class definition.") +;; defconst'd instead of defvar'd to override any old pre-loaded versions +(defconst c-recognize-knr-p t + "Non-nil means K&R style argument declarations are valid.") + ;; minor mode variables (make-variable-buffer-local 'c-auto-newline) (make-variable-buffer-local 'c-hungry-delete-key) @@ -1122,16 +1159,22 @@ "\\(\\(case[( \t]+\\S .*\\)\\|default[ \t]*\\):" "Regexp describing a switch's case or default label") (defconst c-C++-access-key - (concat c-protection-key ":") + (concat c-protection-key "[ \t]*:") "Regexp describing C++ access specification keywords.") (defconst c-label-key (concat c-symbol-key ":\\([^:]\\|$\\)") "Regexp describing any label.") +(defconst c-C-conditionals '("for" "if" "do" "else" "while" "switch") + "Shared conditional keywords for C-like languages.") (defconst c-C-conditional-key - "\\b\\(for\\|if\\|do\\|else\\|while\\|switch\\)\\b[^_]" - "Regexp describing a conditional control.") + (concat "\\b\\(" + (mapconcat 'identity c-C-conditionals "\\|") + "\\)\\b[^_]") + "Regexp describing a conditional control for C.") (defconst c-C++-conditional-key - "\\b\\(for\\|if\\|do\\|else\\|while\\|switch\\|try\\|catch\\)\\b[^_]" + (concat "\\b\\(" (mapconcat 'identity + (append '("try" "catch") c-C-conditionals) "\\|") + "\\)\\b[^_]") "Regexp describing a conditional control for C++.") (defconst c-C++-friend-key "friend[ \t]+\\|template[ \t]*<.+>[ \t]*friend[ \t]+" @@ -1161,10 +1204,6 @@ ) "Regexp describing a class or protocol declaration for Objective-C.") -(defconst c-Java-conditional-key - "\\b\\(for\\|if\\|do\\|else\\|while\\|switch\\|try\\|catch\\|finally\\|synchronized\\)\\b[^_]" - "Regexp describing a conditional control for Java.") - (defconst c-Java-method-key (concat "^\\s *[+-]\\s *" @@ -1184,6 +1223,13 @@ ;;"\\(\\s *implements *[^{]+{\\)?" ;and maybe the adopted protocols list ) "Regexp describing a class or protocol declaration for Java.") +(defconst c-Java-conditional-key + (concat "\\b\\(" + (mapconcat 'identity + (append '("try" "catch" "finally" "synchronized") + c-C-conditionals) "\\|") + "\\)\\b[^_]") + "Regexp describing a conditional control for Java.") ;; KLUDGE ALERT. We default these variables to their `C' values so ;; that non-cc-mode-ized modes that depend on c-mode will still work @@ -1264,6 +1310,7 @@ c-class-key c-C++-class-key c-access-key c-C++-access-key c-double-slash-is-comments-p t + c-recognize-knr-p nil imenu-generic-expression cc-imenu-c++-generic-expression) (run-hooks 'c-mode-common-hook) (run-hooks 'c++-mode-hook)) @@ -1319,7 +1366,9 @@ The hook variable `java-mode-hook' is run with no args, if that value is bound and has a non-nil value. Also the common hook -`c-mode-common-hook' is run first. +`c-mode-common-hook' is run first. Note that this mode automatically +sets the \"java\" style before calling any hooks so be careful if you +set styles in `c-mode-common-hook'. Key bindings: \\{java-mode-map}" @@ -1340,12 +1389,18 @@ c-method-key c-Java-method-key c-double-slash-is-comments-p t c-baseclass-key nil + c-recognize-knr-p nil c-access-key c-Java-access-key) - (c-set-style "Java") + (c-set-style "java") (run-hooks 'c-mode-common-hook) (run-hooks 'java-mode-hook)) (setq c-list-of-mode-names (cons "Java" c-list-of-mode-names)) +(defun c-use-java-style () + "Institutes `java' indentation style. +For use with the variable `java-mode-hook'." + (c-set-style "java")) + (defun c-common-init () ;; Common initializations for c++-mode and c-mode. ;; make local variables @@ -1638,7 +1693,7 @@ (if c-hungry-delete-key "/ah" "/a") (if c-hungry-delete-key "/h" nil))) ;; updates the modeline for all Emacsen - (if (memq 'v19 c-emacs-features) + (if (or (memq 'v19 c-emacs-features) (memq 'v20 c-emacs-features)) (force-mode-line-update) (set-buffer-modified-p (buffer-modified-p)))) @@ -1757,7 +1812,8 @@ (let* ((syms '(class-open class-close defun-open defun-close inline-open inline-close brace-list-open brace-list-close brace-list-intro brace-list-entry block-open block-close - substatement-open statement-case-open)) + substatement-open statement-case-open + extern-lang-open extern-lang-close)) ;; we want to inhibit blinking the paren since this will ;; be most disruptive. we'll blink it ourselves later on (old-blink-paren (if (boundp 'blink-paren-function) @@ -1788,7 +1844,7 @@ ;; If syntax is a function symbol, then call it using the ;; defined semantics. (if (and (not (consp (cdr newlines))) - (fboundp (cdr newlines))) + (c-functionp (cdr newlines))) (let ((c-syntactic-context syntax)) (setq newlines (funcall (cdr newlines) (car newlines) insertion-point)))) @@ -2152,7 +2208,7 @@ "or in [+,-,++,--,*,/] " defstr)) (prompt (concat "Offset " defstr)) - offset input interned) + offset input interned raw) (while (not offset) (setq input (read-string prompt) offset (cond ((string-equal "" input) oldoff) ; default @@ -2164,8 +2220,15 @@ ((string-equal "/" input) '/) ((string-match "^-?[0-9]+$" input) (string-to-int input)) + ;; a symbol with a function binding ((fboundp (setq interned (intern input))) interned) + ;; a lambda function + ((condition-case nil + (c-functionp (setq raw (read input))) + (error nil)) + raw) + ;; a symbol with variable binding ((boundp interned) interned) ;; error, but don't signal one, keep trying ;; to read an input value @@ -2197,7 +2260,8 @@ (let* ((syntax (c-guess-basic-syntax)) (len (length syntax)) (ic (format "%s" (car (nth (1- len) syntax))))) - (if (memq 'v19 c-emacs-features) + (if (or (memq 'v19 c-emacs-features) + (memq 'v20 c-emacs-features)) (cons ic 0) ic)) ))) @@ -2211,7 +2275,7 @@ (eq offset '*) (eq offset '/) (integerp offset) - (fboundp offset) + (c-functionp offset) (boundp offset) (error "Offset must be int, func, var, or in [+,-,++,--,*,/]: %s" offset)) @@ -2230,9 +2294,8 @@ (lambda (conscell) (let ((attr (car conscell)) (val (cdr conscell))) - ;; KLUDGE ALERT: special case for c-offsets-alist - (if (not (eq attr 'c-offsets-alist)) - (set attr val) + (cond + ((eq attr 'c-offsets-alist) (mapcar (function (lambda (langentry) @@ -2241,6 +2304,13 @@ (c-set-offset langelem offset) ))) val)) + ((eq attr 'c-special-indent-hook) + (if (listp val) + (while val + (add-hook 'c-special-indent-hook (car val)) + (setq val (cdr val))) + (add-hook 'c-special-indent-hook val))) + (t (set attr val))) ))) stylevars)) @@ -2254,8 +2324,8 @@ mode-name))) (completing-read prompt c-style-alist nil t)))) (let ((vars (cdr (or (assoc (downcase stylename) c-style-alist) - ;; backwards compatibility (assoc (upcase stylename) c-style-alist) + (assoc stylename c-style-alist) ))) (default (cdr (assoc "cc-mode" c-style-alist)))) (or vars (error "Invalid indentation style `%s'" stylename)) @@ -2323,9 +2393,9 @@ (beginning-of-line) ;; Move up to first line of this comment. (while (and (not (bobp)) - (looking-at "[ \t]*//")) + (looking-at "[ \t]*//[ \t]*[^ \t\n]")) (forward-line -1)) - (if (not (looking-at ".*//")) + (if (not (looking-at ".*//[ \t]*[^ \t\n]")) (forward-line 1)) ;; Find the comment start in this line. (re-search-forward "[ \t]*//[ \t]*") @@ -2457,6 +2527,7 @@ (fill-region-as-paragraph (point) (point-max)))))) t))))) + ;; better movement routines for ThisStyleOfVariablesCommonInCPlusPlus ;; originally contributed by Terry_Glanfield.Southern@rxuk.xerox.com (defun c-forward-into-nomenclature (&optional arg) @@ -2545,6 +2616,9 @@ (c-beginning-of-statement (- (or count 1)) lim sentence-flag) (c-keep-region-active)) +;; WARNING: Be *exceptionally* careful about modifications to this +;; function! Much of cc-mode depends on this Doing The Right Thing. +;; If you break it you will be sorry. (defun c-beginning-of-statement-1 (&optional lim) ;; move to the start of the current statement, or the previous ;; statement if already at the beginning of one. @@ -2830,7 +2904,7 @@ (if (save-excursion (skip-chars-backward " \t") (not (bolp))) - (insert-tab) + (funcall c-insert-tab-function) (c-indent-line))) ;; CASE 2: just indent the line ((eq c-tab-always-indent t) @@ -2839,7 +2913,7 @@ ;; line (t (if (c-in-literal bod) - (insert-tab)) + (funcall c-insert-tab-function)) (c-indent-line) ))))) @@ -3451,13 +3525,13 @@ (defun c-skip-conditional () ;; skip forward over conditional at point, including any predicate ;; statements in parentheses. No error checking is performed. - (forward-sexp - ;; else if() - (if (looking-at "\\<else\\>[ \t]+\\<if\\>") - 3 - ;; do and else aren't followed by parens - (if (looking-at "\\<\\(do\\|else\\)\\>") - 1 2)))) + (forward-sexp (cond + ;; else if() + ((looking-at "\\<else\\>[ \t]+\\<if\\>") 3) + ;; do, else, try, finally + ((looking-at "\\<\\(do\\|else\\|try\\|finally\\)\\>") 1) + ;; for, if, while, switch, catch, synchronized + (t 2)))) (defun c-skip-case-statement-forward (state &optional lim) ;; skip forward over case/default bodies, with optional maximal @@ -3536,12 +3610,13 @@ (save-excursion (save-restriction (goto-char search-start) - (let (foundp class match-end) + (let ((search-key (concat c-class-key "\\|extern[^_]")) + foundp class match-end) (while (and (not foundp) (progn (c-forward-syntactic-ws) (> search-end (point))) - (re-search-forward c-class-key search-end t)) + (re-search-forward search-key search-end t)) (setq class (match-beginning 0) match-end (match-end 0)) (if (c-in-literal search-start) @@ -3710,8 +3785,14 @@ (looking-at c-method-key))) literal containing-sexp char-before-ip char-after-ip lim syntax placeholder c-in-literal-cache inswitch-p - ;; narrow out any enclosing class + ;; narrow out any enclosing class or extern "C" block (inclass-p (c-narrow-out-enclosing-class state indent-point)) + (inextern-p (and inclass-p + (save-excursion + (save-restriction + (widen) + (goto-char (aref inclass-p 0)) + (looking-at "extern[^_]"))))) ) ;; get the buffer position of the most nested opening brace, @@ -3782,7 +3863,20 @@ ;; inline-inclass method opening brace ((= char-after-ip ?{) (cond - ;; CASE 5A.1: we are looking at a class opening brace + ;; CASE 5A.1: extern declaration + ((save-excursion + (goto-char indent-point) + (skip-chars-forward " \t") + (and (c-safe (progn (backward-sexp 2) t)) + (looking-at "extern[^_]") + (progn + (setq placeholder (point)) + (forward-sexp 1) + (c-forward-syntactic-ws) + (= (following-char) ?\")))) + (goto-char placeholder) + (c-add-syntax 'extern-lang-open (c-point 'boi))) + ;; CASE 5A.2: we are looking at a class opening brace ((save-excursion (goto-char indent-point) (skip-chars-forward " \t{") @@ -3803,7 +3897,7 @@ (setq placeholder (aref decl 0))) )) (c-add-syntax 'class-open placeholder)) - ;; CASE 5A.2: brace list open + ;; CASE 5A.3: brace list open ((save-excursion (c-beginning-of-statement-1 lim) ;; c-b-o-s could have left us at point-min @@ -3817,10 +3911,11 @@ (not (memq (following-char) '(?\; ?\())) ))) (c-add-syntax 'brace-list-open placeholder)) - ;; CASE 5A.3: inline defun open - (inclass-p - (c-add-syntax 'inline-open (aref inclass-p 0))) - ;; CASE 5A.4: ordinary defun open + ;; CASE 5A.4: inline defun open + ((and inclass-p (not inextern-p)) + (c-add-syntax 'inline-open) + (c-add-syntax 'inclass (aref inclass-p 0))) + ;; CASE 5A.5: ordinary defun open (t (goto-char placeholder) (c-add-syntax 'defun-open (c-point 'bol)) @@ -3955,7 +4050,11 @@ (looking-at c-access-key)) (c-add-syntax 'access-label (c-point 'bonl)) (c-add-syntax 'inclass (aref inclass-p 0))) - ;; CASE 5F: we are looking at the brace which closes the + ;; CASE 5F: extern-lang-close? + ((and inextern-p + (= char-after-ip ?})) + (c-add-syntax 'extern-lang-close (aref inclass-p 1))) + ;; CASE 5G: we are looking at the brace which closes the ;; enclosing nested class decl ((and inclass-p (= char-after-ip ?}) @@ -3973,34 +4072,43 @@ (widen) (goto-char (aref inclass-p 0)) (c-add-syntax 'class-close (c-point 'boi)))) - ;; CASE 5G: we could be looking at subsequent knr-argdecls + ;; CASE 5H: we could be looking at subsequent knr-argdecls ((and c-recognize-knr-p - (save-excursion - (c-backward-syntactic-ws lim) - (while (memq (preceding-char) '(?\; ?,)) - (beginning-of-line) - (setq placeholder (point)) - (c-backward-syntactic-ws lim)) - (and (= (preceding-char) ?\)) - (or (not c-method-key) - (progn - (forward-sexp -1) - (forward-char -1) - (c-backward-syntactic-ws) - (not (or (= (preceding-char) ?-) - (= (preceding-char) ?+) - ;; or a class category - (progn - (forward-sexp -2) - (looking-at c-class-key)) - ))))) - ) + ;; here we essentially use the hack that is used in + ;; Emacs' c-mode.el to limit how far back we should + ;; look. The assumption is made that argdecls are + ;; indented at least one space and that function + ;; headers are not indented. + (let ((limit (save-excursion + (re-search-backward "^[^ \^L\t\n#]" nil 'move) + (point)))) + (save-excursion + (c-backward-syntactic-ws limit) + (while (and (memq (preceding-char) '(?\; ?,)) + (> (point) limit)) + (beginning-of-line) + (setq placeholder (point)) + (c-backward-syntactic-ws limit)) + (and (= (preceding-char) ?\)) + (or (not c-method-key) + (progn + (forward-sexp -1) + (forward-char -1) + (c-backward-syntactic-ws) + (not (or (= (preceding-char) ?-) + (= (preceding-char) ?+) + ;; or a class category + (progn + (forward-sexp -2) + (looking-at c-class-key)) + ))))) + )) (save-excursion (c-beginning-of-statement-1) (not (looking-at "typedef[ \t\n]+")))) (goto-char placeholder) (c-add-syntax 'knr-argdecl (c-point 'boi))) - ;; CASE 5H: we are at the topmost level, make sure we skip + ;; CASE 5I: we are at the topmost level, make sure we skip ;; back past any access specifiers ((progn (c-backward-syntactic-ws lim) @@ -4022,8 +4130,11 @@ (if inclass-p (progn (goto-char (aref inclass-p 1)) - (c-add-syntax 'inclass (c-point 'boi)))))) - ;; CASE 5I: we are at an ObjC or Java method definition + (if inextern-p + (c-add-syntax 'inextern-lang) + (c-add-syntax 'inclass (c-point 'boi))))) + )) + ;; CASE 5J: we are at an ObjC or Java method definition ;; continuation line. ((and c-method-key (progn @@ -4031,7 +4142,7 @@ (beginning-of-line) (looking-at c-method-key))) (c-add-syntax 'objc-method-args-cont (point))) - ;; CASE 5J: we are at a topmost continuation line + ;; CASE 5K: we are at a topmost continuation line (t (c-beginning-of-statement-1 lim) (c-forward-syntactic-ws) @@ -4280,14 +4391,21 @@ (c-point 'boi)))) (cond ;; CASE 14A: does this close an inline? - ((progn - (goto-char containing-sexp) - (c-search-uplist-for-classkey state)) + ((let ((inclass-p (progn + (goto-char containing-sexp) + (c-search-uplist-for-classkey state)))) + ;; inextern-p in higher level let* + (setq inextern-p (and inclass-p + (progn + (goto-char (aref inclass-p 0)) + (looking-at "extern[^_]")))) + (and inclass-p (not inextern-p))) (c-add-syntax 'inline-close relpos)) ;; CASE 14B: if there an enclosing brace that hasn't ;; been narrowed out by a class, then this is a ;; block-close - ((c-most-enclosing-brace state) + ((and (not inextern-p) + (c-most-enclosing-brace state)) (c-add-syntax 'block-close relpos)) ;; CASE 14C: find out whether we're closing a top-level ;; class or a defun @@ -4430,17 +4548,14 @@ (error "don't know how to indent a %s" symbol) (setq offset 0 relpos 0))) - ((eq offset '+) (setq offset c-basic-offset)) - ((eq offset '-) (setq offset (- c-basic-offset))) - ((eq offset '++) (setq offset (* 2 c-basic-offset))) - ((eq offset '--) (setq offset (* 2 (- c-basic-offset)))) - ((eq offset '*) (setq offset (/ c-basic-offset 2))) - ((eq offset '/) (setq offset (/ (- c-basic-offset) 2))) - ((and (not (numberp offset)) - (fboundp offset)) - (setq offset (funcall offset langelem))) - ((not (numberp offset)) - (setq offset (eval offset))) + ((eq offset '+) (setq offset c-basic-offset)) + ((eq offset '-) (setq offset (- c-basic-offset))) + ((eq offset '++) (setq offset (* 2 c-basic-offset))) + ((eq offset '--) (setq offset (* 2 (- c-basic-offset)))) + ((eq offset '*) (setq offset (/ c-basic-offset 2))) + ((eq offset '/) (setq offset (/ (- c-basic-offset) 2))) + ((c-functionp offset) (setq offset (funcall offset langelem))) + ((not (numberp offset)) (setq offset (symbol-value offset))) ) (+ (if (and relpos (< relpos (c-point 'bol))) @@ -4475,10 +4590,16 @@ (run-hooks 'c-special-indent-hook) shift-amt)) -(defun c-show-syntactic-information () - "Show syntactic information for current line." - (interactive) - (message "syntactic analysis: %s" (c-guess-basic-syntax)) +(defun c-show-syntactic-information (arg) + "Show syntactic information for current line. +With universal argument, inserts the analysis as a comment on that line." + (interactive "P") + (let ((syntax (c-guess-basic-syntax))) + (if (not (consp arg)) + (message "syntactic analysis: %s" (c-guess-basic-syntax)) + (indent-for-comment) + (insert (format "%s" syntax)) + )) (c-keep-region-active)) @@ -4539,6 +4660,18 @@ (current-column)))) (- ce-curcol cs-curcol -1)))) +(defun c-lineup-arglist-close-under-paren (langelem) + ;; lineup an arglist-intro line to just after the open paren + (save-excursion + (let ((cs-curcol (save-excursion + (goto-char (cdr langelem)) + (current-column))) + (ce-curcol (save-excursion + (beginning-of-line) + (backward-up-list 1) + (current-column)))) + (- ce-curcol cs-curcol)))) + (defun c-lineup-streamop (langelem) ;; lineup stream operators (save-excursion @@ -4592,14 +4725,25 @@ ;; only-lines (save-excursion (back-to-indentation) - ;; indent as specified by c-comment-only-line-offset - (if (not (bolp)) + ;; this highly kludgiforous flag prevents the mapcar over + ;; c-syntactic-context from entering an infinite loop + (let ((recurse-prevention-flag (boundp 'recurse-prevention-flag))) + (cond + ;; CASE 1: preserve comment-column + (recurse-prevention-flag 0) + ((= (current-column) comment-column) + ;; we have to subtract out all other indentation + (- comment-column (apply '+ (mapcar 'c-get-offset + c-syntactic-context)))) + ;; indent as specified by c-comment-only-line-offset + ((not (bolp)) (or (car-safe c-comment-only-line-offset) - c-comment-only-line-offset) - (or (cdr-safe c-comment-only-line-offset) - (car-safe c-comment-only-line-offset) - -1000 ;jam it against the left side - )))) + c-comment-only-line-offset)) + (t + (or (cdr-safe c-comment-only-line-offset) + (car-safe c-comment-only-line-offset) + -1000)) ;jam it against the left side + )))) (defun c-lineup-runin-statements (langelem) ;; line up statements in coding standards which place the first @@ -4733,6 +4877,32 @@ '(before) '(before after))))) +(defun c-gnu-impose-minimum () + "Imposes a minimum indentation for labels and case tags. +The variable `c-label-minimum-indentation' specifies the minimum +indentation amount." + (let ((non-top-levels '(defun-block-intro statement statement-cont + statement-block-intro statement-case-intro + statement-case-open substatement substatement-open + case-label label do-while-closure else-clause + )) + (syntax c-syntactic-context) + langelem) + (while syntax + (setq langelem (car (car syntax)) + syntax (cdr syntax)) + ;; don't adjust comment-only lines + (cond ((eq langelem 'comment-intro) + (setq syntax nil)) + ((memq langelem non-top-levels) + (save-excursion + (setq syntax nil) + (back-to-indentation) + (if (zerop (current-column)) + (insert (make-string c-label-minimum-indentation 32))) + )) + )))) + ;;; This page handles insertion and removal of backslashes for C macros. @@ -4796,17 +4966,18 @@ (end-of-line) (or (bolp) (progn - (forward-char -1) - (if (looking-at "\\\\") - (delete-region (1+ (point)) - (progn (skip-chars-backward " \t") (point))))))) + (forward-char -1) + (if (looking-at "\\\\") + (delete-region (1+ (point)) + (progn (skip-chars-backward " \t") (point))))))) ;; defuns for submitting bug reports -(defconst c-version "4.282" +(defconst c-version "4.315" "cc-mode version number.") -(defconst c-mode-help-address "bug-gnu-emacs@prep.ai.mit.edu" +(defconst c-mode-help-address + "bug-gnu-emacs@prep.ai.mit.edu, cc-mode-help@python.org" "Address for cc-mode bug reports.") (defun c-version () @@ -4853,6 +5024,7 @@ 'c-hanging-comment-ender-p 'c-tab-always-indent 'c-recognize-knr-p + 'c-label-minimum-indentation 'defun-prompt-regexp 'tab-width ))) @@ -4884,6 +5056,20 @@ (c-keep-region-active)) +;; Emacs/XEmacs Compatibility +;; XEmacs has these, Emacs (even 19.31) does not + +;; Lift XEmacs 19.13's functionp from subr.el +(defun c-functionp (obj) + "Returns t if OBJ is a function, nil otherwise." + (cond + ((symbolp obj) (fboundp obj)) + ((subrp obj)) + ((compiled-function-p obj)) + ((consp obj) + (if (eq (car obj) 'lambda) (listp (car (cdr obj))))) + (t nil))) + (defun c-copy-tree (tree) ;; Lift XEmacs 19.12's copy-tree (if (consp tree) @@ -4909,6 +5095,8 @@ ))) )) + + ;; Dynamically append the default value of most variables. This is ;; crucial because future c-set-style calls will always reset the ;; variables first to the `cc-mode' style before instituting the new @@ -4928,13 +5116,12 @@ c-hanging-colons-alist c-hanging-comment-ender-p c-offsets-alist - c-recognize-knr-p c-strict-syntax-p c-tab-always-indent c-inhibit-startup-warnings-p ))) ;; the default style is now GNU. This can be overridden in - ;; c-mode-common-hook or {c,c++,objc}-mode-hook. + ;; c-mode-common-hook or {c,c++,objc,java}-mode-hook. (c-set-style c-site-default-style))) ;; style variables @@ -4949,7 +5136,8 @@ (make-variable-buffer-local 'c-hanging-colons-alist) (make-variable-buffer-local 'c-hanging-comment-ender-p) (make-variable-buffer-local 'c-backslash-column) - +(make-variable-buffer-local 'c-label-minimum-indentation) +(make-variable-buffer-local 'c-special-indent-hook) ;; fsets for compatibility with BOCM @@ -4967,7 +5155,7 @@ ;; set up bc warnings for obsolete variables, but for now lets not ;; worry about obsolete functions. maybe later some will be important ;; to flag -(and (memq 'v19 c-emacs-features) +(and (or (memq 'v19 c-emacs-features) (memq 'v20 c-emacs-features)) (let* ((na "Nothing appropriate.") (vars (list
--- a/lisp/modes/cl-indent.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/modes/cl-indent.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,6 +1,11 @@ -;; Lisp mode, and its idiosyncratic commands. -;; Copyright (C) 1987, 1993 Free Software Foundation, Inc. -;; Written by Richard Mlynarik July 1987 +;;; cl-indent.el --- enhanced lisp-indent mode + +;; Copyright (C) 1987 Free Software Foundation, Inc. + +;; Author: Richard Mlynarik <mly@eddie.mit.edu> +;; Created: July 1987 +;; Maintainer: FSF +;; Keywords: lisp, tools ;; This file is part of XEmacs. @@ -16,7 +21,18 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. + +;;; Synched up with: FSF 19.34 + +;;; Commentary: + +;; This package supplies a single entry point, common-lisp-indent-function, +;; which performs indentation in the preferred style for Common Lisp code. +;; To enable it: +;; +;; (setq lisp-indent-function 'common-lisp-indent-function) ;;>> TODO ;; :foo @@ -32,27 +48,26 @@ ;; baz) ;; Need something better than &rest for such cases - -;;; Hairy lisp indentation. +;;; Code: (defvar lisp-indent-maximum-backtracking 3 "*Maximum depth to backtrack out from a sublist for structured indentation. -If this variable is 0, no backtracking will occur and forms such as flet +If this variable is 0, no backtracking will occur and forms such as flet may not be correctly indented.") (defvar lisp-tag-indentation 1 "*Indentation of tags relative to containing list. -This variable is used by the function lisp-indent-tagbody.") +This variable is used by the function `lisp-indent-tagbody'.") (defvar lisp-tag-body-indentation 3 "*Indentation of non-tagged lines relative to containing list. -This variable is used by the function lisp-indent-tagbody to indent normal +This variable is used by the function `lisp-indent-tagbody' to indent normal lines (lines without tags). The indentation is relative to the indentation of the parenthesis enclosing -he special form. If the value is t, the body of tags will be indented +the special form. If the value is t, the body of tags will be indented as a block at the same indentation as the first s-expression following the tag. In this case, any forms before the first tag are indented -by lisp-body-indent.") +by `lisp-body-indent'.") ;;;###autoload @@ -62,7 +77,7 @@ ;; which does special things with subforms. (let ((depth 0) ;; Path describes the position of point in terms of - ;; list-structure with respect to contining lists. + ;; list-structure with respect to containing lists. ;; `foo' has a path of (0 4 1) in `((a b c (d foo) f) g)' (path ()) ;; set non-nil when somebody works out the indentation to use @@ -133,15 +148,15 @@ (setq method '(4 (&whole 4 &rest 1) &body)))) (cond ((and (memq (char-after (1- containing-sexp)) '(?\' ?\`)) - (not (eq (char-after (- containing-sexp 2)) ?\#))) + (not (eql (char-after (- containing-sexp 2)) ?\#))) ;; No indentation for "'(...)" elements (setq calculated (1+ sexp-column))) - ((or (eq (char-after (1- containing-sexp)) ?\,) - (and (eq (char-after (1- containing-sexp)) ?\@) - (eq (char-after (- containing-sexp 2)) ?\,))) + ((or (eql (char-after (1- containing-sexp)) ?\,) + (and (eql (char-after (1- containing-sexp)) ?\@) + (eql (char-after (- containing-sexp 2)) ?\,))) ;; ",(...)" or ",@(...)" (setq calculated normal-indent)) - ((eq (char-after (1- containing-sexp)) ?\#) + ((eql (char-after (1- containing-sexp)) ?\#) ;; "#(...)" (setq calculated (1+ sexp-column))) ((null method)) @@ -183,7 +198,7 @@ (defun lisp-indent-report-bad-format (m) (error "%s has a badly-formed %s property: %s" - ;; Love them free variable references!! + ;; Love those free variable references!! function 'common-lisp-indent-function m)) ;; Blame the crufty control structure on dynamic scoping @@ -208,7 +223,6 @@ ;; is reached. ;; n is set to (1- n) and method to (cdr method) ;; each iteration. -; (message "trying %s for %s %s" method p function) (sit-for 1) (setq tem (car method)) (or (eq tem 'nil) ;default indentation @@ -320,7 +334,7 @@ path state indent-point sexp-column normal-indent)) (funcall (function lisp-indent-259) '((&whole nil &rest - ;; the following causes wierd indentation + ;; the following causes weird indentation ;;(&whole 1 1 2 nil) ) (&whole nil &rest 1)) @@ -344,6 +358,7 @@ (+ sexp-column lisp-body-indent))) (error (+ sexp-column lisp-body-indent))))) +;; XEmacs change (defun lisp-indent-defmethod (path state indent-point sexp-column normal-indent) ;; Look for a method combination specifier... @@ -366,6 +381,7 @@ (funcall (function lisp-indent-259) method path state indent-point sexp-column normal-indent))) + (let ((l '((block 1) (catch 1) @@ -384,6 +400,7 @@ (defsetf (4 (&whole 4 &rest 1) 4 &body)) (defun (4 (&whole 4 &rest 1) &body)) (defmacro . defun) (deftype . defun) + ;; XEmacs change (defmethod lisp-indent-defmethod) (defstruct ((&whole 4 &rest (&whole 2 &rest 1)) &rest (&whole 2 &rest 1))) @@ -482,9 +499,4 @@ ;(put 'with-condition-handler 'common-lisp-indent-function '((1 4 ((* 1))) (2 &body))) ;(put 'condition-case 'common-lisp-indent-function '((1 4) (* 2 ((0 1) (1 3) (2 &body))))) - -;;;; Turn it on. -;(setq lisp-indent-function 'common-lisp-indent-function) - -;; To disable this stuff, (setq lisp-indent-function 'lisp-indent-function) - +;;; cl-indent.el ends here
--- a/lisp/modes/cmacexp.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/modes/cmacexp.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,9 +1,9 @@ ;;; cmacexp.el --- expand C macros in a region -;; Copyright (C) 1992, 1994 Free Software Foundation, Inc. +;; Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc. ;; Author: Francesco Potorti` <pot@cnuce.cnr.it> -;; Version: cmacexp.el,v 1.20 1995/10/26 03:14:40 rms Exp +;; Version: $Id: cmacexp.el,v 1.1.1.2 1996/12/18 03:44:32 steve Exp $ ;; Adapted-By: ESR ;; Keywords: c @@ -21,9 +21,10 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;; USAGE ============================================================= @@ -97,7 +98,15 @@ (defvar c-macro-prompt-flag nil "*Non-nil makes `c-macro-expand' prompt for preprocessor arguments.") -(defvar c-macro-preprocessor "/lib/cpp -C" +(defvar c-macro-preprocessor + ;; Cannot rely on standard directory on MS-DOS to find CPP. + (cond ((eq system-type 'ms-dos) "cpp -C") + ;; Solaris has it in an unusual place. + ((and (string-match "^[^-]*-[^-]*-\\(solaris\\|sunos5\\)" + system-configuration) + (file-exists-p "/opt/SUNWspro/SC3.0.1/bin/acomp")) + "/opt/SUNWspro/SC3.0.1/bin/acomp -C -E") + (t "/lib/cpp -C")) "The preprocessor used by the cmacexp package. If you change this, be sure to preserve the `-C' (don't strip comments) @@ -108,6 +117,7 @@ (defconst c-macro-buffer-name "*Macroexpansion*") +;; Autoload for XEmacs ;;;###autoload (defun c-macro-expand (start end subst) "Expand C macros in the region, using the C preprocessor. @@ -202,6 +212,7 @@ (setq minheight (if alreadythere (window-height) window-min-height)) + ;; XEmacs change (setq maxheight (/ (screen-height) 2)) (enlarge-window (- (min maxheight (max minheight @@ -240,27 +251,31 @@ c-macro-preprocessor (if (string= "" c-macro-cppflags) "" " ") c-macro-cppflags)) - (uniquestring "???!!!???!!! start of c-macro expansion ???!!!???!!!") + (uniquestring "??? !!! ??? start of c-macro expansion ??? !!! ???") (startlinenum 0) (linenum 0) (startstat ()) (startmarker "") (exit-status 0) - (tempname (make-temp-name "/tmp/"))) + (tempname (make-temp-name (concat + (or (getenv "TMPDIR") (getenv "TEMP") + (getenv "TMP") "/tmp") + "/")))) (unwind-protect (save-excursion (save-restriction (widen) - (set-buffer outbuf) - (setq buffer-read-only nil) - (erase-buffer) - (set-syntax-table c-mode-syntax-table) + (let ((in-syntax-table (syntax-table))) + (set-buffer outbuf) + (setq buffer-read-only nil) + (erase-buffer) + (set-syntax-table in-syntax-table)) (insert-buffer-substring inbuf 1 end)) ;; We have copied inbuf to outbuf. Point is at end of - ;; outbuf. Insert a space at the end, so cpp can correctly - ;; parse a token ending at END. - (insert " ") + ;; outbuf. Inset a newline at the end, so cpp can correctly + ;; parse a token ending at END. + (insert "\n") ;; Save sexp status and line number at START. (setq startstat (parse-partial-sexp 1 start)) @@ -308,8 +323,10 @@ ;; Call the preprocessor. (if display (message mymsg)) (setq exit-status - (call-process-region 1 (point-max) "sh" t t nil "-c" - (concat cppcommand " 2>" tempname))) + (call-process-region 1 (point-max) + shell-file-name + t (list t tempname) nil "-c" + cppcommand)) (if display (message (concat mymsg "done"))) (if (= (buffer-size) 0) ;; Empty output is normal after a fatal error. @@ -328,13 +345,25 @@ (delete-region beg (point)))) ;; If CPP got errors, show them at the beginning. - (or (eq exit-status 0) + ;; MS-DOS shells don't return the exit code of their children. + ;; Look at the size of the error message file instead, but + ;; don't punish those MS-DOS users who have a shell that does + ;; return an error code. + (or (and (or (not (boundp 'msdos-shells)) + (not (member (file-name-nondirectory shell-file-name) + msdos-shells))) + (eq exit-status 0)) + (zerop (nth 7 (file-attributes (expand-file-name tempname)))) (progn (goto-char (point-min)) - (insert (format "Preprocessor terminated with status %s\n" - exit-status)) - (insert-file-contents tempname) - (insert "\n"))) + ;; Put the messages inside a comment, so they won't get in + ;; the way of font-lock, highlighting etc. + (insert + (format "/* Preprocessor terminated with status %s\n\n Messages from `%s\':\n\n" + exit-status cppcommand)) + (goto-char (+ (point) + (nth 1 (insert-file-contents tempname)))) + (insert "\n\n*/\n"))) (delete-file tempname) ;; Compute the return value, keeping in account the space
--- a/lisp/modes/cperl-mode.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/modes/cperl-mode.el Mon Aug 13 08:46:35 2007 +0200 @@ -29,7 +29,7 @@ ;;; Corrections made by Ilya Zakharevich ilya@math.mps.ohio-state.edu ;;; XEmacs changes by Peter Arius arius@informatik.uni-erlangen.de -;; $Id: cperl-mode.el,v 1.1.1.1 1996/12/18 03:31:06 steve Exp $ +;; $Id: cperl-mode.el,v 1.1.1.2 1996/12/18 03:44:44 steve Exp $ ;;; To use this mode put the following into your .emacs file: @@ -1648,7 +1648,7 @@ (if (eq (preceding-char) ?\)) (forward-sexp -1)) ;; In the case it starts a subroutine, indent with - ;; respect to `sub', not with respect to the the + ;; respect to `sub', not with respect to the ;; first thing on the line, say in the case of ;; anonymous sub in a hash. ;;
--- a/lisp/modes/eiffel3.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/modes/eiffel3.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,6 +1,6 @@ -;;; $Id: eiffel3.el,v 1.1.1.1 1996/12/18 03:30:45 steve Exp $ +;;; $Id: eiffel3.el,v 1.1.1.2 1996/12/18 03:44:36 steve Exp $ ;;;-------------------------------------------------------------------------- -;;; TowerEiffel -- Copyright (c) 1993,1994 Tower Technology Corporation. +;;; TowerEiffel -- Copyright (c) 1993-1996 Tower Technology Corporation. ;;; All Rights Reserved. ;;; ;;; Use, duplication, or disclosure is subject to restrictions as set forth @@ -12,9 +12,11 @@ ;;; as granting such availability to the rest of TowerEiffel. ;;;-------------------------------------------------------------------------- ;;; Portions of the file, as indicated below, were derived from "eiffel.el" -;;; and "eif-mult-fmt.el -;;; Copyright (C) 1989, 1990 Free Software Foundation, Inc. and Bob Weiner -;;; Available for use and distribution under the same terms as GNU Emacs. +;;; (developed by Stephen Omohundro, ISE and Bob Weiner) and "eif-mult-fmt.el" +;;; (developed by Bob Weiner): +;;; eiffel.el and eif-mult-fmt.el are Copyright (C) 1989, 1990 +;;; Free Software Foundation, Inc. and Bob Weiner +;;; Available for use and distribution under the same terms as GNU Emacs. ;;; Synched up with: Not in FSF. @@ -458,7 +460,7 @@ (defconst eiffel-font-lock-keywords (purecopy '(;; major keywords - ("\\(^[ \t]*\\|[ \t]+\\)creation\\|^deferred[ \t]+class\\|^expanded[ \t]+class\\|^class\\|^feature\\|^indexing\\|\\(^[ \t]*\\|[ \t]+\\)inherit\\|^obsolete" 0 eif-major-keyword nil) + ("\\(\\(^[ \t]*\\|[ \t]+\\)creation\\|^deferred[ \t]+class\\|^expanded[ \t]+class\\|^class\\|^feature\\|^indexing\\|\\(^[ \t]*\\|[ \t]+\\)inherit\\|^obsolete\\)[ \t\n]" 0 eif-major-keyword nil) ;; assertions ("\\(^\\|[^_\n]\\<\\)\\(check\\|ensure then\\|ensure\\|invariant\\|require else\\|require\\|variant\\)\\($\\|\\>[^_\n]\\)" 2 eif-assertion nil) ;; minor keywords @@ -1345,21 +1347,6 @@ ) ) -(defun eif-current-line-indent () - "Return the indentation of the line containing the point." - (save-excursion - (let ((line-end 0) - (indent 0) - ) - (end-of-line) - (setq line-end (point)) - (beginning-of-line) - (re-search-forward eif-white-space-regexp line-end t) - (setq indent (current-column)) - ) - ) - ) - (defun eif-line-contains-close-paren () "This function returns t if the current line contains a close paren and nil otherwise. If a close paren is found, the point is placed immediately @@ -1395,41 +1382,6 @@ ;;; ) ;;;) -(defun eif-in-quoted-string-p (&optional non-strict-p) - "t if point is in a quoted string. Optional argument NON-STRICT-P if true -causes the function to return true even if the point is located in leading -white space on a continuation line. Normally leading white space is not -considered part of the string." - (let ((initial-regexp "^[ \t]*%\\|[^%]\"\\|%[ \t]*$") - (search-limit (point)) - (count 0) - ) - (save-excursion - ;; Line must either start with optional whitespace immediately followed - ;; by a '%' or include a '\"' before the search-limit. - (beginning-of-line) - (while (re-search-forward initial-regexp search-limit t) - (setq count (1+ count)) - (if (= count 1) (setq search-limit (1+ search-limit))) - ) - ;; If the number of quotes (including continuation line markers) is odd, - ;; then we are inside of a string. Also if non-strict-p and we are in - ;; the leading white space of a continuation line, then we are in a quote. - (if (= (% count 2) 1) - t - (beginning-of-line) - (if non-strict-p - (if (looking-at "^[ \t]*%") - t - nil - ) - nil - );; if - );; if - );; save-excursion - );; let - );; e-in-quoted-string - (defvar eif-opening-regexp "\\<\\(external\\|check\\|deferred\\|do\\|once\\|from\\|if\\|inspect\\)\\>" "Keywords that open eiffel nesting constructs." @@ -1484,7 +1436,7 @@ (beginning-of-line) ;; Set starting state: If direction was specified use it. ;; If direction is nil, search for a keyword on the current line - ;; If the keyword in in eif-opening-regexp, set the search + ;; If the keyword is in eif-opening-regexp, set the search ;; direction to 'forward, if the keyword on the current line is `end' ;; set the search direction to 'backward. (cond ((eq direction 'forward) @@ -1830,6 +1782,9 @@ (setq eiffel-mode-map (make-sparse-keymap)) (define-key eiffel-mode-map "\t" 'eif-indent-line) (define-key eiffel-mode-map "\C-j" 'eif-newline) + (if (and (boundp 'eif-cr-function) eif-cr-function) + (define-key eiffel-mode-map "\C-m" eif-cr-function) + ) (define-key eiffel-mode-map "\177" 'backward-delete-char-untabify) (define-key eiffel-mode-map "\M-\C-q" 'eif-indent-construct) (define-key eiffel-mode-map "\M-'" 'eif-feature-quote) @@ -1882,6 +1837,85 @@ (search-backward "--" (save-excursion (beginning-of-line) (point)) t))) +;; ENHANCEME: Currently eif-beginning-of-feature only works for routines. +;; It should be made more general. +;; + +(defun eif-beginning-of-feature (&optional arg) + "Move backward to next feature beginning. With argument, do this that many +times. Returns t unless search stops due to beginning of buffer." + (interactive "p") + (and arg (< arg 0) (forward-char 1)) + (if (or (re-search-backward eif-multiline-routine-is-keyword-regexp + nil t (or arg 1)) + (re-search-backward eif-is-keyword-regexp + nil 'move (or arg 1)) + ) + (progn + (backward-sexp 1) + (if (looking-at "(") + (backward-word 1) + ) + (beginning-of-line) + ) + nil + ) + ) + +(defun eif-current-line-indent () + "Return the indentation of the line containing the point." + (save-excursion + (let ((line-end 0) + (indent 0) + ) + (end-of-line) + (setq line-end (point)) + (beginning-of-line) + (re-search-forward eif-white-space-regexp line-end t) + (setq indent (current-column)) + ) + ) + ) + +(defun eif-in-quoted-string-p (&optional non-strict-p) + "t if point is in a quoted string. Optional argument NON-STRICT-P if true +causes the function to return true even if the point is located in leading +white space on a continuation line. Normally leading white space is not +considered part of the string." + (let ((initial-regexp "^[ \t]*%\\|[^%]\"\\|%[ \t]*$") + (search-limit (point)) + (count 0) + ) + (save-excursion + ;; Line must either start with optional whitespace immediately followed + ;; by a '%' or include a '\"' before the search-limit. + (beginning-of-line) + (while (re-search-forward initial-regexp search-limit t) + (setq count (1+ count)) + (if (= count 1) (setq search-limit (1+ search-limit))) + ) + ;; If the number of quotes (including continuation line markers) is odd, + ;; then we are inside of a string. Also if non-strict-p and we are in + ;; the leading white space of a continuation line, then we are in a quote. + (if (= (% count 2) 1) + t + (beginning-of-line) + (if non-strict-p + (if (looking-at "^[ \t]*%") + t + nil + ) + nil + );; if + );; if + );; save-excursion + );; let + );; e-in-quoted-string + +;;; ---------------------------------------------------------------------- +;;; End of portion derived from "eiffel.el" +;;; ---------------------------------------------------------------------- + (defun eif-comment-prefix () "Prefix that starts a comment that begins a line. Comments that are not the only thing on a line return nil as their prefix." @@ -1910,28 +1944,26 @@ (defun eif-auto-fill () - (if (> (current-column) fill-column) - (let ((fill-prefix (eif-comment-prefix)) (pm (point-marker))) - (if fill-prefix - (if (string-match "^[ \t]*%" fill-prefix) - (progn - (backward-char 1) - (re-search-backward "[^][a-zA-Z0-9]" nil t) - (forward-char 1) - (insert "%\n") - (insert fill-prefix) - (goto-char pm) - ) - ;; (do-auto-fill) + (let ((fill-prefix (eif-comment-prefix)) (pm (point-marker))) + (if (and (> (current-column) fill-column) fill-prefix) + (if (string-match "^[ \t]*%" fill-prefix) + (progn (backward-char 1) - (re-search-backward "\\s-" nil t) + (re-search-backward "[^][a-zA-Z0-9]" nil t) (forward-char 1) - (insert "\n") + (insert "%\n") (insert fill-prefix) (goto-char pm) ) + ;; (do-auto-fill) + (backward-char 1) + (re-search-backward "\\s-" nil t) + (forward-char 1) + (insert "\n") + (insert fill-prefix) + (goto-char pm) ) - ) + ) ) ) @@ -1991,6 +2023,14 @@ (eif-indent-line) ) +(defun eif-indent-and-newline () + "Indent the current line. Insert a newline and indent the new line." + (interactive) + (eif-indent-line) + (insert "\n") + (eif-indent-line) + ) + (defun eif-indent-line (&optional whole-exp) "Indent the current line as Eiffel code. With argument, indent any additional lines of the same clause @@ -2010,31 +2050,6 @@ ) (skip-chars-forward " \t")) -;; ENHANCEME: Currently eif-beginning-of-feature only works for routines. -;; It should be made more general. -;; - -(defun eif-beginning-of-feature (&optional arg) - "Move backward to next feature beginning. With argument, do this that many -times. Returns t unless search stops due to beginning of buffer." - (interactive "p") - (and arg (< arg 0) (forward-char 1)) - (if (or (re-search-backward eif-multiline-routine-is-keyword-regexp - nil t (or arg 1)) - (re-search-backward eif-is-keyword-regexp - nil 'move (or arg 1)) - ) - (progn - (backward-sexp 1) - (if (looking-at "(") - (backward-word 1) - ) - (beginning-of-line) - ) - nil - ) - ) - (defun eif-move-to-prev-non-blank () "Moves point to previous line excluding blank lines. Returns t if successful, nil if not." @@ -2159,7 +2174,7 @@ ) ;;; ---------------------------------------------------------------------- -;;; The portion of the file below this point is derived from "eif-mult-fmt.el" +;;; The function below is derived from "eif-mult-fmt.el" ;;; Copyright (C) 1985 Free Software Foundation, Inc. ;;; Copyright (C) 1990 Bob Weiner, Motorola Inc. ;;; Available for use and distribution under the same terms as GNU Emacs.
--- a/lisp/modes/enriched.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/modes/enriched.el Mon Aug 13 08:46:35 2007 +0200 @@ -5,38 +5,40 @@ ;; Original author: Boris Goldowsky <boris@gnu.ai.mit.edu> ;; Keywords: wp, faces -;; This file is part of GNU Emacs. +;; This file is part of XEmacs. -;; 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 +;; XEmacs 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. -;; + +;; XEmacs 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, 675 Mass Ave, Cambridge, MA 02139, USA. +;; along with XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary: ;; ;; This file implements reading, editing, and saving files with -;; text-properties such as faces, levels of indentation, and true line breaks -;; distinguished from newlines just used to fit text into the window. +;; text-properties such as faces, levels of indentation, and true line +;; breaks distinguished from newlines just used to fit text into the +;; window. ;; ;; The file format used is the MIME text/enriched format, which is a ;; standard format defined in internet RFC 1563. All standard ;; annotations are supported. ;; -;; A separate file, enriched.doc, contains further documentation and other -;; important information about this code. It also serves as an example file -;; in text/enriched format. It should be in the etc directory of your emacs -;; distribution. +;; A separate file, enriched.doc, contains further documentation and +;; other important information about this code. It also serves as an +;; example file in text/enriched format. It should be in the etc +;; directory of your emacs distribution. ;; ;;; TODO for the XEmacs port: ;; @@ -47,7 +49,7 @@ ;; Mike Sperber <sperber@informatik.uni-tuebingen.de>. (provide 'enriched) -(require 'facemenu) +(if window-system (require 'facemenu)) ;;; ;;; Variables controlling the display @@ -73,6 +75,7 @@ ;;; Set up faces & display table ;;; +;; XEmacs change (Can't cheat, we have variable width fonts) (if (not (find-face 'fixed)) (copy-face 'default 'fixed)) @@ -82,6 +85,10 @@ (defconst enriched-display-table (make-display-table)) (aset enriched-display-table ?\f (make-string (1- (frame-width)) ?-)) +(defconst enriched-par-props '(left-margin right-margin justification) + "Text-properties that usually apply to whole paragraphs. +These are set front-sticky everywhere except at hard newlines.") + ;;; ;;; Variables controlling the file format ;;; (bidirectional) @@ -109,26 +116,31 @@ (excerpt "excerpt") (default ) (nil enriched-encode-other-face)) - (size (nil enriched-encode-size)) + (left-margin (4 "indent")) + (right-margin (4 "indentright")) (justification (none "nofill") (right "flushright") (left "flushleft") (full "flushboth") (center "center")) - (left-margin (4 "indent")) - (right-margin (4 "indentright")) (PARAMETER (t "param")) ; Argument of preceding annotation + ;; The following are not part of the standard: (FUNCTION (enriched-decode-foreground "x-color") (enriched-decode-background "x-bg-color") + ;; XEmacs addition (facemenu-make-larger "bigger") (facemenu-make-smaller "smaller")) (read-only (t "x-read-only")) - (unknown (nil format-annotate-value))) + (unknown (nil format-annotate-value)) +; (font-size (2 "bigger") ; unimplemented +; (-2 "smaller")) +) "List of definitions of text/enriched annotations. See `format-annotate-region' and `format-deannotate-region' for the definition of this structure.") -(defconst enriched-ignore '(hard) +(defconst enriched-ignore + '(front-sticky rear-nonsticky hard) "Properties that are OK to ignore when saving text/enriched files. Any property that is neither on this list nor dealt with by `enriched-translations' will generate a warning.") @@ -136,7 +148,7 @@ ;;; Internal variables (defvar enriched-mode nil - "True if `enriched-mode' is in use.") + "True if Enriched mode is in use.") (make-variable-buffer-local 'enriched-mode) (if (not (assq 'enriched-mode minor-mode-alist)) @@ -144,10 +156,10 @@ (cons '(enriched-mode " Enriched") minor-mode-alist))) -(defvar enriched-mode-hooks nil - "Functions to run when entering `enriched-mode'. +(defvar enriched-mode-hook nil + "Functions to run when entering Enriched mode. If you set variables in this hook, you should arrange for them to be restored -to their old values if enriched-mode is left. One way to do this is to add +to their old values if you leave Enriched mode. One way to do this is to add them and their old values to `enriched-old-bindings'.") (defvar enriched-old-bindings nil @@ -167,9 +179,9 @@ "Minor mode for editing text/enriched files. These are files with embedded formatting information in the MIME standard text/enriched format. -Turning the mode on runs `enriched-mode-hooks'. +Turning the mode on runs `enriched-mode-hook'. -More information about enriched-mode is available in the file +More information about Enriched mode is available in the file etc/enriched.doc in the Emacs distribution directory. Commands: @@ -195,28 +207,33 @@ (setq buffer-file-format (cons 'text/enriched buffer-file-format))) ;; Save old variable values before we change them. - ;; These will be restored if we exit enriched-mode. + ;; These will be restored if we exit Enriched mode. (setq enriched-old-bindings - (list 'indent-line-function indent-line-function - 'use-hard-newlines use-hard-newlines)) + ;; XEmacs change + (list ; 'buffer-display-table buffer-display-table + 'indent-line-function indent-line-function + 'use-hard-newlines use-hard-newlines + 'default-text-properties default-text-properties)) (make-local-variable 'indent-line-function) (make-local-variable 'use-hard-newlines) + (make-local-variable 'default-text-properties) (setq indent-line-function 'indent-to-left-margin - use-hard-newlines t) - - ;; copy display table - (frob-display-table - #'(lambda (dt) - (let ((l (length enriched-display-table)) - (c 0)) - (while (< c l) - (let ((v (aref enriched-display-table c))) - (if v - (aset dt c v))) - (setq c (1+ c))))) - (current-buffer)) - (run-hooks 'enriched-mode-hooks))) + ;; XEmacs change + ;; buffer-display-table enriched-display-table + use-hard-newlines t) + (let ((sticky (plist-get default-text-properties 'front-sticky)) + (p enriched-par-props)) + (while p + (if (not (memq (car p) sticky)) + (setq sticky (cons (car p) sticky))) + (setq p (cdr p))) + (if sticky + (setq default-text-properties + (plist-put default-text-properties + 'front-sticky sticky)))) + (run-hooks 'enriched-mode-hook))) (set-buffer-modified-p mod) + ;; XEmacs change (redraw-modeline))) ;;; @@ -224,7 +241,7 @@ ;;; (defvar enriched-mode-map nil - "Keymap for `enriched-mode'.") + "Keymap for Enriched mode.") (if (null enriched-mode-map) (fset 'enriched-mode-map (setq enriched-mode-map (make-sparse-keymap)))) @@ -341,6 +358,7 @@ params "")))) (t (format enriched-annotation-format "/" (car name))))) +;; XEmacs addition (defun enriched-face-strip-size (face) "Create a symbol from the name of FACE devoid of size information, i.e. remove all larger- and smaller- prefixes." @@ -372,6 +390,7 @@ (defun enriched-face-ans (face) "Return annotations specifying FACE." + ;; XEmacs change (entire body of this function) (let ((face-name (symbol-name face))) (cond ((string-match "^fg:" face-name) (list (list "x-color" (substring face-name 3)))) @@ -394,7 +413,7 @@ (if bg (setq ans (cons (list "x-bg-color" bg) ans))) ans))))) - +;; XEmacs addition (defun enriched-size-annotation (n annotation) "Generate ANNOTATION N times." (let ((l '())) @@ -403,6 +422,7 @@ (setq n (1- n))) l)) +;; XEmacs addition (defun enriched-encode-size (old new) "Return annotations specifying SIZE." (let* ((old (or old 0)) @@ -468,8 +488,8 @@ (delete-char 1) ;; A single < that does not start an annotation is an error, ;; which we note and then ignore. - (message (format "Warning: malformed annotation in file at %s" - (1- (point)))))) + (message "Warning: malformed annotation in file at %s" + (1- (point))))) (if (not (eobp)) (let* ((beg (match-beginning 0)) (end (match-end 0)) @@ -492,6 +512,7 @@ (delete-char 1))) (defun enriched-decode-foreground (from to color) + ;; XEmacs change (let ((face (facemenu-get-face (intern (concat "fg:" color))))) (if (not face) (progn @@ -500,6 +521,7 @@ (list from to 'face face))) (defun enriched-decode-background (from to color) + ;; XEmacs change (let ((face (facemenu-get-face (intern (concat "bg:" color))))) (if (not face) (progn
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/modes/executable.el Mon Aug 13 08:46:35 2007 +0200 @@ -0,0 +1,243 @@ +;;; executable.el --- base functionality for executable interpreter scripts + +;; Copyright (C) 1994, 1995, 1996 by Free Software Foundation, Inc. + +;; Author: Daniel.Pfeiffer@Informatik.START.dbp.de, fax (+49 69) 7588-2389 +;; Keywords: languages, unix + +;; This file is part of XEmacs. + +;; XEmacs 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. + +;; XEmacs 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 XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. + +;;; Synched up with: FSF 19.34. + +;;; Commentary: + +;; executable.el is used by certain major modes to insert a suitable +;; #! line at the beginning of the file, if the file does not already +;; have one. + +;; Unless it has a magic number, a Unix file with executable mode is passed to +;; a new instance of the running shell (or to a Bourne shell if a csh is +;; running and the file starts with `:'). Only a shell can start such a file, +;; exec() cannot, which is why it is important to have a magic number in every +;; executable script. Such a magic number is made up by the characters `#!' +;; the filename of an interpreter (in COFF, ELF or somesuch format) and one +;; optional argument. + +;; This library is for certain major modes like sh-, awk-, perl-, tcl- or +;; makefile-mode to insert or update a suitable #! line at the beginning of +;; the file, if the file does not already have one and the file is not a +;; default file of that interpreter (like .profile or makefile). It also +;; makes the file executable if it wasn't, as soon as it's saved. + +;; It also allows debugging scripts, with an adaptation of compile, as far +;; as interpreters give out meaningful error messages. + +;; Modes that use this should nconc `executable-map' to the end of their own +;; keymap and `executable-font-lock-keywords' to the end of their own font +;; lock keywords. Their mode-setting commands should call +;; `executable-set-magic'. + +;;; Code: + +(defvar executable-insert 'not-modified + "*What to do when newly found file has no or wrong magic number: + nil do nothing + t insert or update magic number + other insert or update magic number, but mark as unmodified. +When the insertion is marked as unmodified, you can save it with \\[write-file] RET. +This variable is used when `executable-set-magic' is called as a function, +e.g. when Emacs sets some Un*x interpreter script mode. +With \\[executable-set-magic], this is always treated as if it were `t'.") + + +(defvar executable-query 'function + "*If non-`nil', ask user before inserting or changing magic number. +When this is `function', only ask when called non-interactively.") + + +(defvar executable-magicless-file-regexp "/[Mm]akefile$\\|/\\.\\(z?profile\\|bash_profile\\|z?login\\|bash_login\\|z?logout\\|bash_logout\\|.+shrc\\|esrc\\|rcrc\\|[kz]shenv\\)$" + "*On files with this kind of name no magic is inserted or changed.") + + +(defvar executable-prefix "#! " + "*Interpreter magic number prefix inserted when there was no magic number.") + + + +(defvar executable-chmod 73 + "*After saving, if the file is not executable, set this mode. +This mode passed to `set-file-modes' is taken absolutely when negative, or +relative to the files existing modes. Do nothing if this is nil. +Typical values are 73 (+x) or -493 (rwxr-xr-x).") + + +(defvar executable-command nil) + +(defvar executable-self-display "tail" + "*Command you use with argument `+2' to make text files self-display. +Note that the like of `more' doesn't work too well under Emacs \\[shell].") + + +(defvar executable-font-lock-keywords + '(("\\`#!.*/\\([^ \t\n]+\\)" 1 font-lock-keyword-face t)) + "*Rules for highlighting executable scripts' magic number. +This can be included in `font-lock-keywords' by modes that call `executable'.") + + +(defvar executable-error-regexp-alist + '(;; /bin/xyz: syntax error at line 14: `(' unexpected + ;; /bin/xyz[5]: syntax error at line 8 : ``' unmatched + ("^\\(.*[^[/]\\)\\(\\[[0-9]+\\]\\)?: .* error .* line \\([0-9]+\\)" 1 3) + ;; /bin/xyz[27]: ehco: not found + ("^\\(.*[^/]\\)\\[\\([0-9]+\\)\\]: .*: " 1 2) + ;; /bin/xyz: syntax error near unexpected token `)' + ;; /bin/xyz: /bin/xyz: line 2: `)' + ("^\\(.*[^/]\\): [^0-9\n]+\n\\1: \\1: line \\([0-9]+\\):" 1 2) + ;; /usr/bin/awk: syntax error at line 5 of file /bin/xyz + (" error .* line \\([0-9]+\\) of file \\(.+\\)$" 2 1) + ;; /usr/bin/awk: calling undefined function toto + ;; input record number 3, file awktestdata + ;; source line 4 of file /bin/xyz + ("^[^ ].+\n\\( .+\n\\)* line \\([0-9]+\\) of file \\(.+\\)$" 3 2) + ;; makefile:1: *** target pattern contains no `%'. Stop. + ("^\\(.+\\):\\([0-9]+\\): " 1 2)) + "Alist of regexps used to match script errors. +See `compilation-error-regexp-alist'.") + +;; The C function openp slightly modified would do the trick fine +(defun executable-find (command) + "Search for COMMAND in exec-path and return the absolute file name. +Return nil if COMMAND is not found anywhere in `exec-path'." + (let ((list exec-path) + file) + (while list + (setq list (if (and (setq file (expand-file-name command (car list))) + (file-executable-p file) + (not (file-directory-p file))) + nil + (setq file nil) + (cdr list)))) + file)) + + +(defun executable-chmod () + "This gets called after saving a file to assure that it be executable. +You can set the absolute or relative mode in variable `executable-chmod' for +non-executable files." + (and executable-chmod + buffer-file-name + (or (file-executable-p buffer-file-name) + (set-file-modes buffer-file-name + (if (< executable-chmod 0) + (- executable-chmod) + (logior executable-chmod + (file-modes buffer-file-name))))))) + + +(defun executable-interpret (command) + "Run script with user-specified args, and collect output in a buffer. +While script runs asynchronously, you can use the \\[next-error] command +to find the next error." + (interactive (list (read-string "Run script: " + (or executable-command + buffer-file-name)))) + (require 'compile) + (save-some-buffers (not compilation-ask-about-save)) + (make-local-variable 'executable-command) + (compile-internal (setq executable-command command) + "No more errors." "Interpretation" + ;; Give it a simpler regexp to match. + nil executable-error-regexp-alist)) + + + +;;;###autoload +(defun executable-set-magic (interpreter &optional argument + no-query-flag insert-flag) + "Set this buffer's interpreter to INTERPRETER with optional ARGUMENT. +The variables `executable-magicless-file-regexp', `executable-prefix', +`executable-insert', `executable-query' and `executable-chmod' control +when and how magic numbers are inserted or replaced and scripts made +executable." + (interactive + (let* ((name (read-string "Name or file name of interpreter: ")) + (arg (read-string (format "Argument for %s: " name)))) + (list name arg (eq executable-query 'function) t))) + (setq interpreter (if (file-name-absolute-p interpreter) + interpreter + (or (executable-find interpreter) + (error "Interpreter %s not recognized" interpreter))) + argument (concat interpreter + (and argument (string< "" argument) " ") + argument)) + (or buffer-read-only + (if buffer-file-name + (string-match executable-magicless-file-regexp + buffer-file-name)) + (not (or insert-flag executable-insert)) + (> (point-min) 1) + (save-excursion + (let ((point (point-marker)) + (buffer-modified-p (buffer-modified-p))) + (goto-char (point-min)) + (make-local-hook 'after-save-hook) + (add-hook 'after-save-hook 'executable-chmod nil t) + (if (looking-at "#![ \t]*\\(.*\\)$") + (and (goto-char (match-beginning 1)) + ;; If the line ends in a space, + ;; don't offer to change it. + (not (= (char-after (1- (match-end 1))) ?\ )) + (not (string= argument + (buffer-substring (point) (match-end 1)))) + (if (or (not executable-query) no-query-flag + (save-window-excursion + ;; Make buffer visible before question. + (switch-to-buffer (current-buffer)) + (y-or-n-p (concat "Replace magic number by `" + executable-prefix argument "'? ")))) + (progn + (replace-match argument t t nil 1) + (message "Magic number changed to `%s'" + (concat executable-prefix argument))))) + (insert executable-prefix argument ?\n) + (message "Magic number changed to `%s'" + (concat executable-prefix argument))) +;;; (or insert-flag +;;; (eq executable-insert t) +;;; (set-buffer-modified-p buffer-modified-p)) + ))) + interpreter) + + + +;;;###autoload +(defun executable-self-display () + "Turn a text file into a self-displaying Un*x command. +The magic number of such a command displays all lines but itself." + (interactive) + (if (eq this-command 'executable-self-display) + (setq this-command 'executable-set-magic)) + (executable-set-magic executable-self-display "+2")) + + + +(provide 'executable) + +;; executable.el ends here + +
--- a/lisp/modes/f90.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/modes/f90.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,27 +1,31 @@ ;;; f90.el --- Fortran-90 mode (free format) -;; Copyright (C) 1995 Free Software Foundation, Inc. + +;; Copyright (C) 1995, 1996 Free Software Foundation, Inc. ;; Author: Torbj\"orn Einarsson <T.Einarsson@clab.ericsson.se> ;; Created: Apr. 18, 1996 ;; Keywords: fortran, f90, languages -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by +;; This file is part of XEmacs. + +;; XEmacs 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 of the License, or ;; (at your option) any later version. -;; This program 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. +;; XEmacs 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 this program; if not, write to the Free Software -;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +;; along with XEmacs; if not, write to the Free Software Foundation, +;; Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary: + ;; Smart mode for editing F90 programs in FREE FORMAT. ;; Knows about continuation lines, named structured statements, and other ;; new features in F90 including HPF (High Performance Fortran) structures. @@ -114,6 +118,7 @@ ;; mechanism for treating multi-line directives (continued by \ ). ;; 7) f77 do-loops do 10 i=.. ; ; 10 continue are not correctly indented. ;; You are urged to use f90-do loops (with labels if you wish). +;; 8) The highlighting mode under XEmacs is not as complete as under Emacs. ;; List of user commands ;; f90-previous-statement f90-next-statement @@ -136,8 +141,8 @@ ;; Also thanks to the authors of the fortran and pascal modes, on which some ;; of this code is built. +;;; Code: -;;; Code: (defconst bug-f90-mode "T.Einarsson@clab.ericsson.se" "Address of mailing list for F90 mode bugs.") @@ -713,7 +718,7 @@ Do not left-justify line numbers. (default nil) f90-startup-message Set to nil to inhibit message first time F90 mode is used. (default t) - f90-keywords + f90-keywords-re List of keywords used for highlighting/upcase-keywords etc. Turning on F90 mode calls the value of the variable `f90-mode-hook' @@ -743,30 +748,23 @@ ;; Setting up things for font-lock (if (string-match "XEmacs" emacs-version) (progn + (put 'f90-mode 'font-lock-keywords-case-fold-search t) (if (and current-menubar (not (assoc "F90" current-menubar))) (progn (set-buffer-menubar (copy-sequence current-menubar)) - (add-submenu nil f90-xemacs-menu))) - ;; XEmacs now does things like FSF Emacs -- ben - (make-local-variable 'font-lock-defaults) - (setq font-lock-defaults - '((f90-font-lock-keywords f90-font-lock-keywords-1 - f90-font-lock-keywords-2 - f90-font-lock-keywords-3 - f90-font-lock-keywords-4) - nil t))) - ;; Emacs - (make-local-variable 'font-lock-defaults) - (setq font-lock-defaults - '((f90-font-lock-keywords f90-font-lock-keywords-1 - f90-font-lock-keywords-2 - f90-font-lock-keywords-3 - f90-font-lock-keywords-4) - nil t)) - ;; Tell imenu how to handle f90. - (make-local-variable 'imenu-generic-expression) - (setq imenu-generic-expression f90-imenu-generic-expression)) + (add-submenu nil f90-xemacs-menu))))) + ;; XEmacs: (Don't need a special case, since both emacsen work alike -sb) + (make-local-variable 'font-lock-defaults) + (setq font-lock-defaults + '((f90-font-lock-keywords f90-font-lock-keywords-1 + f90-font-lock-keywords-2 + f90-font-lock-keywords-3 + f90-font-lock-keywords-4) + nil t)) + ;; Tell imenu how to handle f90. + (make-local-variable 'imenu-generic-expression) + (setq imenu-generic-expression f90-imenu-generic-expression) (run-hooks 'f90-mode-hook) (if f90-startup-message (message "Emacs F90 mode; please report bugs to %s" bug-f90-mode)) @@ -1332,14 +1330,14 @@ (setq program (f90-mark-subprogram)) (if program (progn - (message (concat "Indenting " (car program) " " - (car (cdr program))".")) + (message "Indenting %s %s..." + (car program) (car (cdr program))) (f90-indent-region (point) (mark)) - (message (concat "Indenting " (car program) " " - (car (cdr program)) "...done."))) - (message "Indenting the whole file.") + (message "Indenting %s %s...done" + (car program) (car (cdr program)))) + (message "Indenting the whole file...") (f90-indent-region (point) (mark)) - (message (concat "Indenting the whole file...done.")))))) + (message "Indenting the whole file...done"))))) ;; autofill and break-line (defun f90-break-line (&optional no-update) @@ -1524,11 +1522,11 @@ (f90-update-line) (if (eq f90-smart-end 'blink) (if (< (point) top-of-window) - (message (concat - "Matches " (what-line) ": " - (buffer-substring - (progn (beginning-of-line) (point)) - (progn (end-of-line) (point))))) + (message "Matches %d: %s" + (what-line) + (buffer-substring + (progn (beginning-of-line) (point)) + (progn (end-of-line) (point)))) (sit-for 1))) (setq beg-block (car matching-beg)) (setq beg-name (car (cdr matching-beg)))
--- a/lisp/modes/follow.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/modes/follow.el Mon Aug 13 08:46:35 2007 +0200 @@ -9,19 +9,22 @@ ;; Keywords: display, window, minor-mode ;; Date: 20 Feb 1996 -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by +;; This file is part of XEmacs. + +;; XEmacs 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. -;; This program 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. +;; XEmacs 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 this program; see the file COPYING. If not, write to -;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; along with XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. ;;; Commentary: @@ -1217,7 +1220,7 @@ follow-windows-start-end-cache))) -(defun follow-pos-visible (pos win win-start-end) +(defsubst follow-pos-visible (pos win win-start-end) "Non-nil when POS is visible in WIN." (let ((wstart-wend-bend (cdr (assq win win-start-end)))) (and (>= pos (car wstart-wend-bend)) @@ -1229,7 +1232,7 @@ ;; first is equal with the start of the successor. The first window ;; should start at a full screen line. -(defun follow-windows-aligned-p (win-start-end) +(defsubst follow-windows-aligned-p (win-start-end) "Non-nil if the follower WINDOWS are alinged." (let ((res t)) (save-excursion @@ -1307,10 +1310,10 @@ ;; Lets select a window showing the end. Make sure we only select it if it -;; it wasn't just moved here. (i.e. M-> shall not unconditionally place +;; wasn't just moved here. (i.e. M-> shall not unconditionally place ;; the point in the selected window.) ;; -;; (Compability cludge: in Emacs 19 `window-end' is equal to `point-max'; +;; (Compatibility kludge: in Emacs 19 `window-end' is equal to `point-max'; ;; in XEmacs, it is equal to `point-max + 1'. Should I really bother ;; checking `window-end' now when I check `end-of-buffer' explicitylt?) @@ -1370,7 +1373,7 @@ ;;{{{ Redisplay ;; Redraw all the windows on the screen, starting with the top window. -;; The window used as as marker is WIN, or the selcted window if WIN +;; The window used as marker is WIN, or the selcted window if WIN ;; is nil. (defun follow-redisplay (&optional windows win) @@ -1641,7 +1644,7 @@ (or follow-internal-force-redisplay (progn (if (eq dest (point-max)) - ;; We're at the end, we have be be careful since + ;; We're at the end, we have to be careful since ;; the display can be aligned while `dest' can ;; be visible in several windows. (cond @@ -2158,7 +2161,7 @@ (cond ;; The window was moved. Move it back and ;; select a new. If no better could be found, - ;; we stick the the new start position. This + ;; we stick to the new start position. This ;; is used when the original process filter ;; tries to position the cursor at the bottom ;; of the window. Example: `lyskom'.
--- a/lisp/modes/fortran.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/modes/fortran.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,6 +1,6 @@ ;;; fortran.el --- Fortran mode for GNU Emacs -;;; Copyright (c) 1986, 1993, 1994, 1995 Free Software Foundation, Inc. +;; Copyright (c) 1986, 1993, 1994, 1995 Free Software Foundation, Inc. ;; Author: Michael D. Prange <prange@erl.mit.edu> ;; Maintainer: bug-fortran-mode@erl.mit.edu @@ -21,9 +21,10 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary: @@ -38,20 +39,20 @@ ;; Dr. Anil Gokhale, Ulrich Mueller, Mark Neale, Eric Prestemon, ;; Gary Sabot and Richard Stallman. -;;; This file may be used with GNU Emacs version 18.xx if the following -;;; variable and function substitutions are made. -;;; Replace: -;;; frame-width with screen-width -;;; auto-fill-function with auto-fill-hook -;;; comment-indent-function with comment-indent-hook -;;; (setq unread-command-events (list c)) with (setq unread-command-char c) +;; This file may be used with GNU Emacs version 18.xx if the following +;; variable and function substitutions are made. +;; Replace: +;; frame-width with screen-width +;; auto-fill-function with auto-fill-hook +;; comment-indent-function with comment-indent-hook +;; (setq unread-command-events (list c)) with (setq unread-command-char c) -;;; Bugs to bug-fortran-mode@erl.mit.edu +;; Bugs to bug-fortran-mode@erl.mit.edu + +;;; Code: (defconst fortran-mode-version "version 1.30.6") -;;; Code: - ;;;###autoload (defvar fortran-tab-mode-default nil "*Default tabbing/carriage control style for empty files in Fortran mode. @@ -172,6 +173,7 @@ (modify-syntax-entry ?+ "." fortran-mode-syntax-table) (modify-syntax-entry ?- "." fortran-mode-syntax-table) (modify-syntax-entry ?= "." fortran-mode-syntax-table) + ;; XEmacs change ;;(modify-syntax-entry ?* "." fortran-mode-syntax-table) (modify-syntax-entry ?/ "." fortran-mode-syntax-table) (modify-syntax-entry ?\' "\"" fortran-mode-syntax-table) @@ -180,6 +182,7 @@ (modify-syntax-entry ?. "w" fortran-mode-syntax-table) (modify-syntax-entry ?_ "w" fortran-mode-syntax-table) (modify-syntax-entry ?\! "<" fortran-mode-syntax-table) + ;; XEmacs change ;;(modify-syntax-entry ?\n ">" fortran-mode-syntax-table) ;; XEmacs: an attempt to make font-lock understand fortran comments. @@ -320,6 +323,7 @@ (defvar fortran-font-lock-keywords fortran-font-lock-keywords-1 "Default expressions to highlight in Fortran mode.") +;; XEmacs change (put 'fortran-mode 'font-lock-defaults '((fortran-font-lock-keywords fortran-font-lock-keywords-1 fortran-font-lock-keywords-2 @@ -580,6 +584,13 @@ (setq fortran-startup-message nil) (setq local-abbrev-table fortran-mode-abbrev-table) (set-syntax-table fortran-mode-syntax-table) + ;; Font Lock mode support. (Removed for XEmacs) + ;; (make-local-variable 'font-lock-defaults) + ;; (setq font-lock-defaults '((fortran-font-lock-keywords + ;; fortran-font-lock-keywords-1 + ;; fortran-font-lock-keywords-2 + ;; fortran-font-lock-keywords-3) + ;; t t ((?/ . "$/")))) (make-local-variable 'fortran-break-before-delimiters) (setq fortran-break-before-delimiters t) (make-local-variable 'indent-line-function) @@ -694,6 +705,7 @@ "Typing ;\\[help-command] or ;? lists all the Fortran abbrevs. Any other key combination is executed normally." (interactive) + ;; XEmacs change (let (e c) (insert last-command-char) (setq e (next-command-event) @@ -701,7 +713,7 @@ ;; insert char if not equal to `?' (if (or (= c ??) (eq c help-char)) (fortran-abbrev-help) - (setq unread-command-event e)))) + (setq unread-command-events e)))) (defun fortran-abbrev-help () "List the currently defined abbrevs in Fortran mode." @@ -765,9 +777,10 @@ (save-window-excursion (if (not (equal (fortran-window-create) 'error)) (progn (message "Type SPC to continue editing.") + ;; XEmacs change (let ((char (next-command-event))) (or (equal (event-to-character char) ? ) - (setq unread-command-event char)))))) + (setq unread-command-events char)))))) (fortran-window-create))) (defun fortran-split-line () @@ -1531,7 +1544,7 @@ (> (prefix-numeric-value arg) 0)) 'fortran-do-auto-fill nil)) - (force-mode-line-update))) + (redraw-modeline))) (defun fortran-do-auto-fill () (if (> (current-column) fill-column) @@ -1675,4 +1688,3 @@ (provide 'fortran) ;;; fortran.el ends here -
--- a/lisp/modes/hideif.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/modes/hideif.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,173 +1,162 @@ ;;; hide-ifdef-mode.el --- hides selected code within ifdef. -;; Keywords: c + +;; Copyright (C) 1988, 1994 Free Software Foundation, Inc. -;;; Copyright (C) 1988 Brian Marick and Daniel LaLiberte -;;; Written by Brian Marick, at Gould, Computer Systems Division, Urbana IL. -;;; Extensively modified by Daniel LaLiberte (while at Gould). -;;; -;;; You may freely modify and distribute this, but keep a record -;;; of modifications and send comments to: -;;; liberte@a.cs.uiuc.edu or ihnp4!uiucdcs!liberte -;;; I will continue to upgrade hide-ifdef-mode -;;; with your contributions and will eventually offer it to FSF. +;; Author: Dan LaLiberte <liberte@a.cs.uiuc.edu> +;; Maintainer: FSF +;; Keywords: c, outlines + +;; This file is part of XEmacs. -;;; Revision 1.7 88/02/16 03:12:58 liberte -;;; Fixed comments and doc strings. -;;; Added optional prefix arg for ifdef motion commands. -;;; -;;; Revision 1.6 88/02/05 00:36:18 liberte -;;; Bug fixes. -;;; 1. A multi-line comment that starts on an #ifdef line -;;; now ends on that line. -;;; 2. Fix bad function name: hide-hif-ifdef-toggle-read-only -;;; 3. Make ifdef-block hiding work outside of ifdefs. -;;; -;;; Revision 1.5 88/01/31 23:19:31 liberte -;;; Major clean up. -;;; Prefix internal names with "hif-". -;;; -;;; Revision 1.4 88/01/30 14:09:38 liberte -;;; Add hide-ifdef-hiding and hide-ifdef-mode to minor-mode-alist. -;;; -;;; Revision 1.3 88/01/29 00:38:19 liberte -;;; Fix three bugs. -;;; 1. Function "defined" is just like lookup. -;;; 2. Skip to newline or cr in case text is hidden. -;;; 3. Use car of token list if just one symbol. -;;; -;;; Revision 1.2 88/01/28 23:32:46 liberte -;;; Use hide-ifdef-mode-prefix-key. -;;; Copy current-local-map so other buffers do not get -;;; hide-ifdef-mode bindings. -;;; -;;;-------------------------------------------------------------- +;; XEmacs 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. + +;; XEmacs 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 XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. + +;;; Synched up with: FSF 19.34. ;;; Commentary: -;;; To initialize, toggle the hide-ifdef minor mode with -;;; -;;; M-x hide-ifdef-mode -;;; -;;; This will set up key bindings and call hide-ifdef-mode-hook if it -;;; has a value. To explicitly hide ifdefs using a buffer-local -;;; define list (default empty), type -;;; -;;; M-x hide-ifdefs or C-c h -;;; -;;; Hide-ifdef suppresses the display of code that the preprocessor wouldn't -;;; pass through. The support of constant expressions in #if lines is -;;; limited to identifiers, parens, and the operators: &&, ||, !, and -;;; "defined". Please extend this. -;;; -;;; The hidden code is marked by ellipses (...). Be -;;; cautious when editing near ellipses, since the hidden text is -;;; still in the buffer, and you can move the point into it and modify -;;; text unawares. If you don't want to see the ellipses, set -;;; selective-display-ellipses to nil. But this can be dangerous. -;;; You can make your buffer read-only while hide-ifdef-hiding by setting -;;; hide-ifdef-read-only to a non-nil value. You can toggle this -;;; variable with hide-ifdef-toggle-read-only (C-c C-q). -;;; -;;; You can undo the effect of hide-ifdefs by typing -;;; -;;; M-x show-ifdefs or C-c s -;;; -;;; Use M-x hide-ifdef-define (C-c d) to define a symbol. -;;; Use M-x hide-ifdef-undef (C-c u) to undefine a symbol. -;;; -;;; If you define or undefine a symbol while hide-ifdef-mode is in effect, -;;; the display will be updated. Only the define list for the current -;;; buffer will be affected. You can save changes to the local define -;;; list with hide-ifdef-set-define-alist. This adds entries -;;; to hide-ifdef-define-alist. -;;; -;;; If you have defined a hide-ifdef-mode-hook, you can set -;;; up a list of symbols that may be used by hide-ifdefs as in the -;;; following example: -;;; -;;; (setq hide-ifdef-mode-hook -;;; '(lambda () -;;; (if (not hide-ifdef-define-alist) -;;; (setq hide-ifdef-define-alist -;;; '((list1 ONE TWO) -;;; (list2 TWO THREE) -;;; ))) -;;; (hide-ifdef-use-define-alist 'list2) ; use list2 by default -;;; )) -;;; -;;; You can call hide-ifdef-use-define-alist (C-c u) at any time to specify -;;; another list to use. -;;; -;;; To cause ifdefs to be hidden as soon as hide-ifdef-mode is called, -;;; set hide-ifdef-initially to non-nil. -;;; -;;; If you set hide-ifdef-lines to t, hide-ifdefs hides all the #ifdef lines. -;;; In the absence of highlighting, that might be a bad idea. If you set -;;; hide-ifdef-lines to nil (the default), the surrounding preprocessor -;;; lines will be displayed. That can be confusing in its own -;;; right. Other variations on display are possible, but not much -;;; better. -;;; -;;; You can explicitly hide or show individual ifdef blocks irrespective -;;; of the define list by using hide-ifdef-block and show-ifdef-block. -;;; -;;; You can move the point between ifdefs with forward-ifdef, backward-ifdef, -;;; up-ifdef, down-ifdef, next-ifdef, and previous-ifdef. -;;; -;;; If you have minor-mode-alist in your modeline (the default) two labels -;;; may appear. "Ifdef" will appear when hide-ifdef-mode is active. "Hiding" -;;; will appear when text may be hidden ("hide-ifdef-hiding" is non-nil). +;; To initialize, toggle the hide-ifdef minor mode with +;; +;; M-x hide-ifdef-mode +;; +;; This will set up key bindings and call hide-ifdef-mode-hook if it +;; has a value. To explicitly hide ifdefs using a buffer-local +;; define list (default empty), type +;; +;; M-x hide-ifdefs or C-c @ h +;; +;; Hide-ifdef suppresses the display of code that the preprocessor wouldn't +;; pass through. The support of constant expressions in #if lines is +;; limited to identifiers, parens, and the operators: &&, ||, !, and +;; "defined". Please extend this. +;; +;; The hidden code is marked by ellipses (...). Be +;; cautious when editing near ellipses, since the hidden text is +;; still in the buffer, and you can move the point into it and modify +;; text unawares. If you don't want to see the ellipses, set +;; selective-display-ellipses to nil. But this can be dangerous. +;; You can make your buffer read-only while hide-ifdef-hiding by setting +;; hide-ifdef-read-only to a non-nil value. You can toggle this +;; variable with hide-ifdef-toggle-read-only (C-c @ C-q). +;; +;; You can undo the effect of hide-ifdefs by typing +;; +;; M-x show-ifdefs or C-c @ s +;; +;; Use M-x hide-ifdef-define (C-c @ d) to define a symbol. +;; Use M-x hide-ifdef-undef (C-c @ u) to undefine a symbol. +;; +;; If you define or undefine a symbol while hide-ifdef-mode is in effect, +;; the display will be updated. Only the define list for the current +;; buffer will be affected. You can save changes to the local define +;; list with hide-ifdef-set-define-alist. This adds entries +;; to hide-ifdef-define-alist. +;; +;; If you have defined a hide-ifdef-mode-hook, you can set +;; up a list of symbols that may be used by hide-ifdefs as in the +;; following example: +;; +;; (setq hide-ifdef-mode-hook +;; '(lambda () +;; (if (not hide-ifdef-define-alist) +;; (setq hide-ifdef-define-alist +;; '((list1 ONE TWO) +;; (list2 TWO THREE) +;; ))) +;; (hide-ifdef-use-define-alist 'list2) ; use list2 by default +;; )) +;; +;; You can call hide-ifdef-use-define-alist (C-c u) at any time to specify +;; another list to use. +;; +;; To cause ifdefs to be hidden as soon as hide-ifdef-mode is called, +;; set hide-ifdef-initially to non-nil. +;; +;; If you set hide-ifdef-lines to t, hide-ifdefs hides all the #ifdef lines. +;; In the absence of highlighting, that might be a bad idea. If you set +;; hide-ifdef-lines to nil (the default), the surrounding preprocessor +;; lines will be displayed. That can be confusing in its own +;; right. Other variations on display are possible, but not much +;; better. +;; +;; You can explicitly hide or show individual ifdef blocks irrespective +;; of the define list by using hide-ifdef-block and show-ifdef-block. +;; +;; You can move the point between ifdefs with forward-ifdef, backward-ifdef, +;; up-ifdef, down-ifdef, next-ifdef, and previous-ifdef. +;; +;; If you have minor-mode-alist in your mode line (the default) two labels +;; may appear. "Ifdef" will appear when hide-ifdef-mode is active. "Hiding" +;; will appear when text may be hidden ("hide-ifdef-hiding" is non-nil). +;; +;; Written by Brian Marick, at Gould, Computer Systems Division, Urbana IL. +;; Extensively modified by Daniel LaLiberte (while at Gould). +;; +;; You may freely modify and distribute this, but keep a record +;; of modifications and send comments to: +;; liberte@a.cs.uiuc.edu or ihnp4!uiucdcs!liberte +;; I will continue to upgrade hide-ifdef-mode +;; with your contributions. ;;; Code: -(defvar hide-ifdef-mode-map nil - "Keymap used with hide-ifdef mode") +(require 'cc-mode) + +(defvar hide-ifdef-mode-submap nil + "Keymap used with Hide-Ifdef mode.") -(defconst hide-ifdef-mode-prefix-key "\C-c" - "Prefix key for all hide-ifdef-mode commands.") +(defvar hide-ifdef-mode-map nil + "Keymap used with Hide-Ifdef mode.") -(defvar hide-ifdef-mode-map-before nil - "Buffer-local variable to store a copy of the local keymap - before hide-ifdef-mode modifies it.") +(defconst hide-ifdef-mode-prefix-key "\C-c@" + "Prefix key for all Hide-Ifdef mode commands.") -(defun define-hide-ifdef-mode-map () - (if hide-ifdef-mode-map - () ; dont redefine it. - (setq hide-ifdef-mode-map (make-sparse-keymap)) - (define-key hide-ifdef-mode-map "d" 'hide-ifdef-define) - (define-key hide-ifdef-mode-map "u" 'hide-ifdef-undef) - (define-key hide-ifdef-mode-map "D" 'hide-ifdef-set-define-alist) - (define-key hide-ifdef-mode-map "U" 'hide-ifdef-use-define-alist) - - (define-key hide-ifdef-mode-map "h" 'hide-ifdefs) - (define-key hide-ifdef-mode-map "s" 'show-ifdefs) - (define-key hide-ifdef-mode-map "\C-h" 'hide-ifdef-block) - (define-key hide-ifdef-mode-map "\C-s" 'show-ifdef-block) - - (define-key hide-ifdef-mode-map "\C-f" 'forward-ifdef) - (define-key hide-ifdef-mode-map "\C-b" 'backward-ifdef) - (define-key hide-ifdef-mode-map "\C-d" 'down-ifdef) - (define-key hide-ifdef-mode-map "\C-u" 'up-ifdef) - (define-key hide-ifdef-mode-map "\C-n" 'next-ifdef) - (define-key hide-ifdef-mode-map "\C-p" 'previous-ifdef) - (define-key hide-ifdef-mode-map "\C-q" 'hide-ifdef-toggle-read-only) - (define-key hide-ifdef-mode-map - (where-is-internal 'toggle-read-only nil t) - 'hide-ifdef-toggle-outside-read-only) - ) - (fset 'hide-ifdef-mode-map hide-ifdef-mode-map) ; the function is the map +;; Set up the submap that goes after the prefix key. +(if hide-ifdef-mode-submap + () ; Don't redefine it. + (setq hide-ifdef-mode-submap (make-sparse-keymap)) + (define-key hide-ifdef-mode-submap "d" 'hide-ifdef-define) + (define-key hide-ifdef-mode-submap "u" 'hide-ifdef-undef) + (define-key hide-ifdef-mode-submap "D" 'hide-ifdef-set-define-alist) + (define-key hide-ifdef-mode-submap "U" 'hide-ifdef-use-define-alist) + + (define-key hide-ifdef-mode-submap "h" 'hide-ifdefs) + (define-key hide-ifdef-mode-submap "s" 'show-ifdefs) + (define-key hide-ifdef-mode-submap "\C-d" 'hide-ifdef-block) + (define-key hide-ifdef-mode-submap "\C-s" 'show-ifdef-block) + + (define-key hide-ifdef-mode-submap "\C-q" 'hide-ifdef-toggle-read-only) + (let ((where (where-is-internal 'toggle-read-only '(keymap) t))) + (if where + (define-key hide-ifdef-mode-submap + where + 'hide-ifdef-toggle-outside-read-only))) ) -(defun hif-update-mode-line () - "Update mode-line by setting buffer-modified to itself." - (set-buffer-modified-p (buffer-modified-p))) - +;; Set up the mode's main map, which leads via the prefix key to the submap. +(if hide-ifdef-mode-map + () + (setq hide-ifdef-mode-map (make-sparse-keymap)) + (define-key hide-ifdef-mode-map hide-ifdef-mode-prefix-key + hide-ifdef-mode-submap)) (defvar hide-ifdef-mode nil - "non-nil when hide-ifdef-mode is activated.") + "Non-nil when hide-ifdef-mode is activated.") (defvar hide-ifdef-hiding nil - "non-nil when text may be hidden.") + "Non-nil when text may be hidden.") (or (assq 'hide-ifdef-hiding minor-mode-alist) (setq minor-mode-alist @@ -182,34 +171,45 @@ ;;;###autoload (add-minor-mode 'hide-ifdef-mode " Ifdef") +;; fix c-mode syntax table so we can recognize whole symbols. +(defvar hide-ifdef-syntax-table + (copy-syntax-table c-mode-syntax-table) + "Syntax table used for tokenizing #if expressions.") + +(modify-syntax-entry ?_ "w" hide-ifdef-syntax-table) +(modify-syntax-entry ?& "." hide-ifdef-syntax-table) +(modify-syntax-entry ?\| "." hide-ifdef-syntax-table) + +;;;###autoload (defun hide-ifdef-mode (arg) - "Toggle hide-ifdef-mode. Thus this is a minor mode, albeit a large one. -With arg, turn hide-ifdef-mode on iff arg is positive. -In hide-ifdef-mode, code within #ifdef constructs that the C preprocessor + "Toggle Hide-Ifdef mode. This is a minor mode, albeit a large one. +With ARG, turn Hide-Ifdef mode on if arg is positive, off otherwise. +In Hide-Ifdef mode, code within #ifdef constructs that the C preprocessor would eliminate may be hidden from view. Several variables affect how the hiding is done: hide-ifdef-env An association list of defined and undefined symbols for the - current buffer. Initially, the global value of hide-ifdef-env is used. + current buffer. Initially, the global value of `hide-ifdef-env' + is used. hide-ifdef-define-alist An association list of defined symbol lists. - Use hide-ifdef-set-define-alist to save the current hide-ifdef-env - and hide-ifdef-use-define-alist to set the current hide-ifdef-env - from one of the lists in hide-ifdef-define-alist. + Use `hide-ifdef-set-define-alist' to save the current `hide-ifdef-env' + and `hide-ifdef-use-define-alist' to set the current `hide-ifdef-env' + from one of the lists in `hide-ifdef-define-alist'. hide-ifdef-lines Set to non-nil to not show #if, #ifdef, #ifndef, #else, and #endif lines when hiding. hide-ifdef-initially - Indicates whether hide-ifdefs should be called when hide-ifdef-mode + Indicates whether `hide-ifdefs' should be called when Hide-Ifdef mode is activated. hide-ifdef-read-only Set to non-nil if you want to make buffers read only while hiding. - After show-ifdefs, read-only status is restored to previous value. + After `show-ifdefs', read-only status is restored to previous value. \\{hide-ifdef-mode-map}" @@ -220,14 +220,16 @@ (not hide-ifdef-mode) (> (prefix-numeric-value arg) 0))) - (hif-update-mode-line) + ;; XEmacs change + (redraw-modeline) (if hide-ifdef-mode (progn ; fix c-mode syntax table so we can recognize whole symbols. - (modify-syntax-entry ?_ "w") - (modify-syntax-entry ?& ".") - (modify-syntax-entry ?\| ".") + ;; XEmacs: Maybe we don't need this any more with cc-mode? -sb + ;; (modify-syntax-entry ?_ "w") + ;; (modify-syntax-entry ?& ".") + ;; (modify-syntax-entry ?\| ".") ; inherit global values (make-local-variable 'hide-ifdef-env) @@ -239,32 +241,24 @@ (make-local-variable 'hif-outside-read-only) (setq hif-outside-read-only buffer-read-only) - (make-local-variable 'hide-ifdef-mode-map-before) - (setq hide-ifdef-mode-map-before (current-local-map)) - (use-local-map (copy-keymap (current-local-map))) - (local-unset-key hide-ifdef-mode-prefix-key) - (local-set-key hide-ifdef-mode-prefix-key 'hide-ifdef-mode-map) - (define-hide-ifdef-mode-map) - (run-hooks 'hide-ifdef-mode-hook) (if hide-ifdef-initially (hide-ifdefs) (show-ifdefs)) - (message "Enter hide-ifdef-mode.") + (message "Enter Hide-Ifdef mode") ) ; else end hide-ifdef-mode (if hide-ifdef-hiding (show-ifdefs)) - (use-local-map hide-ifdef-mode-map-before) - (message "Exit hide-ifdef-mode.") + (message "Exit Hide-Ifdef mode") )) ;; from outline.el with docstring fixed. (defun hif-outline-flag-region (from to flag) - "Hides or shows lines from FROM to TO, according to FLAG. If FLAG -is \\n (newline character) then text is shown, while if FLAG is \\^M + "Hides or shows lines from FROM to TO, according to FLAG. +If FLAG is \\n (newline character) then text is shown, while if FLAG is \\^M \(control-M) the text is hidden." (let ((modp (buffer-modified-p))) (unwind-protect (progn @@ -279,6 +273,14 @@ (interactive) (hif-outline-flag-region (point-min) (point-max) ?\n)) +;; By putting this on after-revert-hook, we arrange that it only +;; does anything when revert-buffer avoids turning off the mode. +;; (That can happen in VC.) +(defun hif-before-revert-function () + (and hide-ifdef-mode hide-ifdef-hiding + (hide-ifdefs t))) +(add-hook 'after-revert-hook 'hif-before-revert-function) + (defun hide-ifdef-region (start end) "START is the start of a #if or #else form. END is the ending part. Everything including these lines is made invisible." @@ -294,8 +296,11 @@ ;===%%SF%% evaluation (Start) === +;; It is not useful to set this to anything but `eval'. +;; In fact, the variable might as well be eliminated. (defvar hide-ifdef-evaluator 'eval - "The evaluator is given a canonical form and returns T if text under + "The function to use to evaluate a form. +The evaluator is given a canonical form and returns t if text under that form should be displayed.") (defvar hif-undefined-symbol nil @@ -351,7 +356,8 @@ ) ; pattern to match initial identifier, !, &&, ||, (, or ). -(defconst hif-token-regexp "^\\(!\\|&&\\|||\\|[()]\\|\\w+\\)") +; Added ==, + and -: garyo@avs.com 8/9/94 +(defconst hif-token-regexp "^\\(!\\|&&\\|||\\|[!=]=\\|[()+-]\\|\\w+\\)") (defconst hif-end-of-comment "\\*/") @@ -359,54 +365,62 @@ "Separate string into a list of tokens" (let ((token-list nil) (expr-start 0) - (expr-length (length expr-string))) + (expr-length (length expr-string)) + (current-syntax-table (syntax-table))) + (unwind-protect + (progn + (set-syntax-table hide-ifdef-syntax-table) + (while (< expr-start expr-length) +; (message "expr-start = %d" expr-start) (sit-for 1) + (cond + ((string-match "^[ \t]+" expr-string expr-start) + ;; skip whitespace + (setq expr-start (match-end 0)) + ;; stick newline in string so ^ matches on the next string-match + (aset expr-string (1- expr-start) ?\n)) - (while (< expr-start expr-length) -; (message "expr-start = %d" expr-start) (sit-for 1) - (cond - ((string-match "^[ \t]+" expr-string expr-start) - ; skip whitespace - (setq expr-start (match-end 0)) - ; stick newline in string so ^ matches on the next string-match - (aset expr-string (1- expr-start) ?\n) - ) + ((string-match "^/\\*" expr-string expr-start) + (setq expr-start (match-end 0)) + (aset expr-string (1- expr-start) ?\n) + (or + (string-match hif-end-of-comment + expr-string expr-start) ; eat comment + (string-match "$" expr-string expr-start)) ; multi-line comment + (setq expr-start (match-end 0)) + (aset expr-string (1- expr-start) ?\n)) - ((string-match "^/\\*" expr-string expr-start) - (setq expr-start (match-end 0)) - (aset expr-string (1- expr-start) ?\n) - (or - (string-match hif-end-of-comment - expr-string expr-start) ; eat comment - (string-match "$" expr-string expr-start)) ; multi-line comment - (setq expr-start (match-end 0)) - (aset expr-string (1- expr-start) ?\n) - ) + ((string-match "^//" expr-string expr-start) + (string-match "$" expr-string expr-start) + (setq expr-start (match-end 0))) - ((string-match hif-token-regexp expr-string expr-start) - (let ((token (substring expr-string expr-start (match-end 0)))) - (setq expr-start (match-end 0)) - (aset expr-string (1- expr-start) ?\n) -; (message "token: %s" token) (sit-for 1) - (setq token-list - (cons - (cond - ((string-equal token "||") 'or) - ((string-equal token "&&") 'and) - ((string-equal token "!") 'not) - ((string-equal token "defined") 'hif-defined) - ((string-equal token "(") 'lparen) - ((string-equal token ")") 'rparen) - (t (intern token))) - token-list)) - )) - (t (error "Bad #if expression: %s" expr-string)) - )) - (nreverse token-list) - )) + ((string-match hif-token-regexp expr-string expr-start) + (let ((token (substring expr-string expr-start (match-end 0)))) + (setq expr-start (match-end 0)) + (aset expr-string (1- expr-start) ?\n) +; (message "token: %s" token) (sit-for 1) + (setq token-list + (cons + (cond + ((string-equal token "||") 'or) + ((string-equal token "&&") 'and) + ((string-equal token "==") 'equal) + ((string-equal token "!=") 'hif-notequal) + ((string-equal token "!") 'not) + ((string-equal token "defined") 'hif-defined) + ((string-equal token "(") 'lparen) + ((string-equal token ")") 'rparen) + ((string-equal token "+") 'hif-plus) + ((string-equal token "-") 'hif-minus) + (t (intern token))) + token-list)))) + (t (error "Bad #if expression: %s" expr-string))))) + (set-syntax-table current-syntax-table)) + (nreverse token-list))) ;;;----------------------------------------------------------------- ;;; Translate C preprocessor #if expressions using recursive descent. ;;; This parser is limited to the operators &&, ||, !, and "defined". +;;; Added ==, !=, +, and -. Gary Oberbrunner, garyo@avs.com, 8/9/94 (defun hif-parse-if-exp (token-list) "Parse the TOKEN-LIST. Return translated list in prefix form." @@ -414,39 +428,54 @@ (prog1 (hif-expr) (if token ; is there still a token? - (error "Error: unexpected token: %s" token))) - ) + (error "Error: unexpected token: %s" token)))) (defun hif-nexttoken () "Pop the next token from token-list into the let variable \"token\"." (setq token (car token-list)) (setq token-list (cdr token-list)) - token - ) + token) (defun hif-expr () - "Parse and expression of the form + "Parse an expression as found in #if. expr : term | expr '||' term." (let ((result (hif-term))) (while (eq token 'or) (hif-nexttoken) (setq result (list 'or result (hif-term)))) - result - )) + result)) (defun hif-term () - "Parse a term of the form - term : factor | term '&&' factor." - (let ((result (hif-factor))) + "Parse a term : eq-expr | term '&&' eq-expr." + (let ((result (hif-eq-expr))) (while (eq token 'and) (hif-nexttoken) - (setq result (list 'and result (hif-factor)))) - result - )) + (setq result (list 'and result (hif-eq-expr)))) + result)) + +(defun hif-eq-expr () + "Parse an eq-expr : math | eq-expr '=='|'!=' math." + (let ((result (hif-math)) + (eq-token nil)) + (while (or (eq token 'equal) (eq token 'hif-notequal)) + (setq eq-token token) + (hif-nexttoken) + (setq result (list eq-token result (hif-math)))) + result)) + +(defun hif-math () + "Parse an expression with + or - and simpler things. + math : factor | math '+|-' factor." + (let ((result (hif-factor)) + (math-op nil)) + (while (or (eq token 'hif-plus) (eq token 'hif-minus)) + (setq math-op token) + (hif-nexttoken) + (setq result (list math-op result (hif-factor)))) + result)) (defun hif-factor () - "Parse a factor of the form - factor : '!' factor | '(' expr ')' | 'defined(' id ')' | id." + "Parse a factor: '!' factor | '(' expr ')' | 'defined(' id ')' | id." (cond ((eq token 'not) (hif-nexttoken) @@ -482,15 +511,31 @@ (hif-nexttoken) (` (hif-lookup (quote (, ident)))) )) + )) - )) +(defun hif-mathify (val) + "Treat VAL as a number: if it's t or nil, use 1 or 0." + (cond ((eq val t) + 1) + ((null val) + 0) + (t val))) + +(defun hif-plus (a b) + "Like ordinary plus but treat t and nil as 1 and 0." + (+ (hif-mathify a) (hif-mathify b))) +(defun hif-minus (a b) + "Like ordinary minus but treat t and nil as 1 and 0." + (- (hif-mathify a) (hif-mathify b))) +(defun hif-notequal (a b) + "Like (not (equal A B)) but as one symbol." + (not (equal a b))) ;;;----------- end of parser ----------------------- (defun hif-canonicalize () - "When at beginning of #ifX, returns a canonical (evaluatable) - form for the expression." + "When at beginning of #ifX, returns a Lisp expression for its condition." (save-excursion (let ((negate (looking-at hif-ifndef-regexp))) (re-search-forward hif-ifx-regexp) @@ -505,8 +550,7 @@ (defun hif-find-any-ifX () - "Position at beginning of next #if, #ifdef, or #ifndef, including one on -this line." + "Move to next #if..., or #ifndef, at point or after." ; (message "find ifX at %d" (point)) (prog1 (re-search-forward hif-ifx-regexp (point-max) t) @@ -514,25 +558,20 @@ (defun hif-find-next-relevant () - "Position at beginning of next #ifdef, #ifndef, #else, #endif, -NOT including one on this line." + "Move to next #if..., #else, or #endif, after the current line." ; (message "hif-find-next-relevant at %d" (point)) (end-of-line) ; avoid infinite recursion by only going to beginning of line if match found (if (re-search-forward hif-ifx-else-endif-regexp (point-max) t) - (beginning-of-line)) - ) + (beginning-of-line))) (defun hif-find-previous-relevant () - "Position at beginning of previous #ifdef, #ifndef, #else, #endif, -NOT including one on this line." + "Move to previous #if..., #else, or #endif, before the current line." ; (message "hif-find-previous-relevant at %d" (point)) (beginning-of-line) ; avoid infinite recursion by only going to beginning of line if match found (if (re-search-backward hif-ifx-else-endif-regexp (point-min) t) - (beginning-of-line) - ) - ) + (beginning-of-line))) (defun hif-looking-at-ifX () ;; Should eventually see #if @@ -556,8 +595,7 @@ ((hif-looking-at-endif) 'done) (t - (error "Missmatched #ifdef #endif pair")) - )) + (error "Mismatched #ifdef #endif pair")))) (defun hif-endif-to-ifdef () @@ -566,7 +604,7 @@ (let ((start (point))) (hif-find-previous-relevant) (if (= start (point)) - (error "Missmatched #ifdef #endif pair"))) + (error "Mismatched #ifdef #endif pair"))) (cond ((hif-looking-at-endif) (hif-endif-to-ifdef) ; find beginning of nested if (hif-endif-to-ifdef)) ; find beginning of outer if or else @@ -574,13 +612,12 @@ (hif-endif-to-ifdef)) ((hif-looking-at-ifX) 'done) - (t ; never gets here - ))) + (t))) ; never gets here (defun forward-ifdef (&optional arg) "Move point to beginning of line of the next ifdef-endif. - With argument, do this that many times." +With argument, do this that many times." (interactive "p") (or arg (setq arg 1)) (if (< arg 0) @@ -599,7 +636,7 @@ (defun backward-ifdef (&optional arg) "Move point to beginning of the previous ifdef-endif. - With argument, do this that many times." +With argument, do this that many times." (interactive "p") (or arg (setq arg 1)) (if (< arg 0) @@ -613,9 +650,7 @@ (if (hif-looking-at-endif) (hif-endif-to-ifdef) (goto-char start) - (error "No previous #ifdef") - )))) - + (error "No previous #ifdef"))))) (defun down-ifdef () @@ -626,8 +661,7 @@ (if (or (hif-looking-at-ifX) (hif-looking-at-else)) () (goto-char start) - (error "No following #ifdef") - ))) + (error "No following #ifdef")))) (defun up-ifdef () @@ -640,12 +674,11 @@ (if (hif-looking-at-endif) (hif-endif-to-ifdef)) (if (= start (point)) - (error "No previous #ifdef") - ))) + (error "No previous #ifdef")))) (defun next-ifdef (&optional arg) "Move to the beginning of the next #ifX, #else, or #endif. - With argument, do this that many times." +With argument, do this that many times." (interactive "p") (or arg (setq arg 1)) (if (< arg 0) @@ -656,12 +689,11 @@ (if (eolp) (progn (beginning-of-line) - (error "No following #ifdefs, #elses, or #endifs") - )))) + (error "No following #ifdefs, #elses, or #endifs"))))) (defun previous-ifdef (&optional arg) "Move to the beginning of the previous #ifX, #else, or #endif. - With argument, do this that many times." +With argument, do this that many times." (interactive "p") (or arg (setq arg 1)) (if (< arg 0) @@ -671,8 +703,7 @@ (let ((start (point))) (hif-find-previous-relevant) (if (= start (point)) - (error "No previous #ifdefs, #elses, or #endifs") - )))) + (error "No previous #ifdefs, #elses, or #endifs"))))) ;===%%SF%% parsing (End) === @@ -746,8 +777,7 @@ ;;; one, we'd throw off all the counts. Feh. (defun hif-hide-line (point) - "Hide the line containing point. Does nothing if -hide-ifdef-lines is nil." + "Hide the line containing point. Does nothing if `hide-ifdef-lines' is nil." (if hide-ifdef-lines (save-excursion (goto-char point) @@ -786,8 +816,7 @@ ;;; possibly-hidden range. (defun hif-recurse-on (start end) - "Call hide-ifdef-guts after narrowing to end of START line and END -line." + "Call `hide-ifdef-guts' after narrowing to end of START line and END line." (save-excursion (save-restriction (goto-char start) @@ -796,8 +825,8 @@ (hide-ifdef-guts)))) (defun hif-possibly-hide () - "Called at #ifX expression, this hides those parts that should be -hidden, according to judgement of hide-ifdef-evaluator." + "Called at #ifX expression, this hides those parts that should be hidden. +It uses the judgement of `hide-ifdef-evaluator'." ; (message "hif-possibly-hide") (sit-for 1) (let ((test (hif-canonicalize)) (range (hif-find-range))) @@ -832,8 +861,8 @@ (defun hide-ifdef-guts () - "Does the work of hide-ifdefs, except for the work that's pointless -to redo on a recursive entry." + "Does most of the work of `hide-ifdefs'. +It does not do the work that's pointless to redo on a recursive entry." ; (message "hide-ifdef-guts") (save-excursion (goto-char (point-min)) @@ -845,21 +874,20 @@ ;===%%SF%% exports (Start) === +;;;###autoload (defvar hide-ifdef-initially nil - "*Non-nil if hide-ifdefs should be called when hide-ifdef-mode - is first activated.") + "*Non-nil means call `hide-ifdefs' when Hide-Ifdef mode is first activated.") -(defvar hide-ifdef-hiding nil - "Non-nil if text might be hidden.") - +;;;###autoload (defvar hide-ifdef-read-only nil "*Set to non-nil if you want buffer to be read-only while hiding text.") (defvar hif-outside-read-only nil - "Internal variable. Saves the value of buffer-read-only while hiding.") + "Internal variable. Saves the value of `buffer-read-only' while hiding.") +;;;###autoload (defvar hide-ifdef-lines nil - "*Set to t if you don't want to see the #ifX, #else, and #endif lines.") + "*Non-nil means hide the #ifX, #else, and #endif lines.") (defun hide-ifdef-toggle-read-only () "Toggle hide-ifdef-read-only." @@ -869,11 +897,11 @@ (if hide-ifdef-read-only "ON" "OFF")) (if hide-ifdef-hiding (setq buffer-read-only (or hide-ifdef-read-only hif-outside-read-only))) - (hif-update-mode-line) - ) + ;; XEmacs change + (redraw-modeline)) (defun hide-ifdef-toggle-outside-read-only () - "Replacement for toggle-read-only within hide-ifdef-mode." + "Replacement for `toggle-read-only' within Hide-Ifdef mode." (interactive) (setq hif-outside-read-only (not hif-outside-read-only)) (message "Read only %s" @@ -882,14 +910,14 @@ (or (and hide-ifdef-hiding hide-ifdef-read-only) hif-outside-read-only) ) - (hif-update-mode-line) - ) + ;; XEmacs change + (redraw-modeline)) (defun hide-ifdef-define (var) "Define a VAR so that #ifdef VAR would be included." (interactive "SDefine what? ") - (hif-set-var var t) + (hif-set-var var 1) (if hide-ifdef-hiding (hide-ifdefs))) (defun hide-ifdef-undef (var) @@ -899,45 +927,43 @@ (if hide-ifdef-hiding (hide-ifdefs))) -(defun hide-ifdefs () - "Hide the contents of some #ifdefs. Assume that defined symbols have -been added to hide-ifdef-env. The text hidden is the text that would not -be included by the C preprocessor if it were given the file with those -symbols defined. +(defun hide-ifdefs (&optional nomsg) + "Hide the contents of some #ifdefs. +Assume that defined symbols have been added to `hide-ifdef-env'. +The text hidden is the text that would not be included by the C +preprocessor if it were given the file with those symbols defined. -Turn off hiding by calling show-ifdef." +Turn off hiding by calling `show-ifdefs'." (interactive) (message "Hiding...") + (setq hif-outside-read-only buffer-read-only) (if (not hide-ifdef-mode) (hide-ifdef-mode 1)) ; turn on hide-ifdef-mode (if hide-ifdef-hiding (show-ifdefs)) ; Otherwise, deep confusion. - (if buffer-read-only (toggle-read-only)) ; make it writable temporarily - (setq selective-display t) - (setq hide-ifdef-hiding t) - (hide-ifdef-guts) - (if (or hide-ifdef-read-only hif-outside-read-only) - (toggle-read-only) ; make it read only - ) - (message "Hiding done") - ) + (let ((inhibit-read-only t)) + (setq selective-display t) + (setq hide-ifdef-hiding t) + (hide-ifdef-guts)) + (setq buffer-read-only (or hide-ifdef-read-only hif-outside-read-only)) + (or nomsg + (message "Hiding done"))) (defun show-ifdefs () - "Cancel the effects of hide-ifdef. The contents of all #ifdefs is shown." + "Cancel the effects of `hide-ifdef': show the contents of all #ifdefs." (interactive) - (if buffer-read-only (toggle-read-only)) ; make it writable temporarily + (setq buffer-read-only hif-outside-read-only) (setq selective-display nil) ; defaults - (hif-show-all) - (if hif-outside-read-only - (toggle-read-only)) ; make it read only - (setq hide-ifdef-hiding nil) - ) + (let ((inhibit-read-only t)) + (hif-show-all)) + (setq hide-ifdef-hiding nil)) (defun hif-find-ifdef-block () - "Utilitiy for hide and show ifdef-block. Set top and bottom of ifdef block." + "Utility for hide and show `ifdef-block'. +Set top and bottom of ifdef block." (let (max-bottom) (save-excursion (beginning-of-line) @@ -945,19 +971,15 @@ (up-ifdef)) (setq top (point)) (hif-ifdef-to-endif) - (setq max-bottom (1- (point))) - ) + (setq max-bottom (1- (point)))) (save-excursion (beginning-of-line) (if (not (hif-looking-at-endif)) (hif-find-next-relevant)) (while (hif-looking-at-ifX) (hif-ifdef-to-endif) - (hif-find-next-relevant) - ) - (setq bottom (min max-bottom (1- (point)))) - )) - ) + (hif-find-next-relevant)) + (setq bottom (min max-bottom (1- (point))))))) (defun hide-ifdef-block () @@ -965,27 +987,22 @@ (interactive) (if (not hide-ifdef-mode) (hide-ifdef-mode 1)) - (if buffer-read-only (toggle-read-only)) (setq selective-display t) - (let (top bottom) + (let (top bottom (inhibit-read-only t)) (hif-find-ifdef-block) ; set top and bottom - dynamic scoping (hide-ifdef-region top bottom) (if hide-ifdef-lines (progn (hif-hide-line top) (hif-hide-line (1+ bottom)))) - (setq hide-ifdef-hiding t) - ) - (if (or hide-ifdef-read-only hif-outside-read-only) - (toggle-read-only)) - ) + (setq hide-ifdef-hiding t)) + (setq buffer-read-only (or hide-ifdef-read-only hif-outside-read-only))) (defun show-ifdef-block () "Show the ifdef block (true or false part) enclosing or before the cursor." (interactive) - (let ((old-read-only buffer-read-only)) - (if old-read-only (toggle-read-only)) + (let ((inhibit-read-only t)) (if hide-ifdef-lines (save-excursion (beginning-of-line) @@ -993,16 +1010,10 @@ (let (top bottom) (hif-find-ifdef-block) - (hif-show-ifdef-region (1- top) bottom)) - ) - - ; restore read only status since we dont know if all is shown. - (if old-read-only (toggle-read-only)) - )) + (hif-show-ifdef-region (1- top) bottom))))) - -;;; defininition alist support +;;; definition alist support (defvar hide-ifdef-define-alist nil "A global assoc list of pre-defined symbol lists") @@ -1017,19 +1028,17 @@ (if (car defs) (setq new-defs (cons (car defs) new-defs))) (setq defs (cdr defs))) - new-defs - )) + new-defs)) (defun hide-ifdef-set-define-alist (name) - "Set the association for NAME to hide-ifdef-env." + "Set the association for NAME to `hide-ifdef-env'." (interactive "SSet define list: ") (setq hide-ifdef-define-alist (cons (cons name (hif-compress-define-list hide-ifdef-env)) - hide-ifdef-define-alist)) - ) + hide-ifdef-define-alist))) (defun hide-ifdef-use-define-alist (name) - "Set hide-ifdef-env to the define list specified by NAME." + "Set `hide-ifdef-env' to the define list specified by NAME." (interactive "SUse define list: ") (let ((define-list (assoc name hide-ifdef-define-alist))) (if define-list @@ -1037,8 +1046,8 @@ (mapcar '(lambda (arg) (cons arg t)) (cdr define-list))) (error "No define list for %s" name)) - (if hide-ifdef-hiding (hide-ifdefs)) - ) - ) + (if hide-ifdef-hiding (hide-ifdefs)))) -;===%%SF%% exports (End) === +(provide 'hideif) + +;;; hideif.el ends here
--- a/lisp/modes/hideshow.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/modes/hideshow.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,73 +1,76 @@ ;;; hideshow.el --- minor mode cmds to selectively display blocks of code -;;; Copyright (C) 1994,1995 Free Software Foundation +;; Copyright (C) 1994,1995,1996 Free Software Foundation + +;; Author: Thien-Thi Nguyen <ttn@netcom.com> +;; Version: 3.4 +;; Keywords: C C++ lisp tools editing +;; Time-of-Day-Author-Most-Likely-to-be-Recalcitrant: early morning -;;; Author: Thien-Thi Nguyen <ttn@netcom.com> -;;; Version: 3.4 -;;; Keywords: C C++ lisp tools editing -;;; Time-of-Day-Author-Most-Likely-to-be-Recalcitrant: early morning +;; This file is part of XEmacs. -;;; This file is part of GNU Emacs. +;; XEmacs 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 of the License, or +;; (at your option) any later version. -;;; 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 of the License, 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 this program; if not, write to the Free Software Foundation, Inc., -;;; 675 Mass Ave, Cambridge, MA 02139, USA. +;; XEmacs 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. -;;; LCD Archive Entry: -;;; hideshow|Thien-Thi Nguyen|ttn@netcom.com| -;;; minor mode commands to selectively display blocks of code| -;;; 18-Oct-1994|3.4|~/modes/hideshow.el.Z| +;; You should have received a copy of the GNU General Public License +;; along with XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. + +;;; Synched up with: FSF 19.34. + +;; LCD Archive Entry: +;; hideshow|Thien-Thi Nguyen|ttn@netcom.com| +;; minor mode commands to selectively display blocks of code| +;; 18-Oct-1994|3.4|~/modes/hideshow.el.Z| ;;; Commentary: -;;; This file provides `hs-minor-mode'. When active, six commands: -;;; hs-{hide,show}-{all,block}, hs-show-region and hs-minor-mode -;;; are available. They implement block hiding and showing. Blocks are -;;; defined in mode-specific way. In c-mode or c++-mode, they are simply -;;; curly braces, while in lisp-ish modes they are parens. Multi-line -;;; comments (c-mode) can also be hidden. The command M-x hs-minor-mode -;;; toggles the minor mode or sets it (similar to outline minor mode). -;;; See documentation for each command for more info. -;;; -;;; The variable `hs-unbalance-handler-method' controls hideshow's behavior -;;; in the case of "unbalanced parentheses". See doc for more info. +;; This file provides `hs-minor-mode'. When active, six commands: +;; hs-{hide,show}-{all,block}, hs-show-region and hs-minor-mode +;; are available. They implement block hiding and showing. Blocks are +;; defined in mode-specific way. In c-mode or c++-mode, they are simply +;; curly braces, while in lisp-ish modes they are parens. Multi-line +;; comments (c-mode) can also be hidden. The command M-x hs-minor-mode +;; toggles the minor mode or sets it (similar to outline minor mode). +;; See documentation for each command for more info. +;; +;; The variable `hs-unbalance-handler-method' controls hideshow's behavior +;; in the case of "unbalanced parentheses". See doc for more info. -;;; Suggested usage: +;; Suggested usage: -;;; (load-library "hideshow") -;;; (defun my-hs-setup () "enables hideshow and binds some commands" -;;; (hs-minor-mode 1) -;;; (define-key hs-minor-mode-map "\C-ch" 'hs-hide-block) -;;; (define-key hs-minor-mode-map "\C-cs" 'hs-show-block) -;;; (define-key hs-minro-mode-map "\C-cH" 'hs-hide-all) -;;; (define-key hs-minro-mode-map "\C-cS" 'hs-show-all) -;;; (define-key hs-minor-mode-map "\C-cR" 'hs-show-region)) -;;; (add-hook 'X-mode-hook 'my-hs-setup t) ; other modes similarly -;;; -;;; where X = {emacs-lisp,c,c++,perl,...}. See the doc for the variable -;;; `hs-special-modes-alist' if you'd like to use hideshow w/ other modes. +;; (load-library "hideshow") +;; (defun my-hs-setup () "enables hideshow and binds some commands" +;; (hs-minor-mode 1) +;; (define-key hs-minor-mode-map "\C-ch" 'hs-hide-block) +;; (define-key hs-minor-mode-map "\C-cs" 'hs-show-block) +;; (define-key hs-minro-mode-map "\C-cH" 'hs-hide-all) +;; (define-key hs-minro-mode-map "\C-cS" 'hs-show-all) +;; (define-key hs-minor-mode-map "\C-cR" 'hs-show-region)) +;; (add-hook 'X-mode-hook 'my-hs-setup t) ; other modes similarly +;; +;; where X = {emacs-lisp,c,c++,perl,...}. See the doc for the variable +;; `hs-special-modes-alist' if you'd like to use hideshow w/ other modes. -;;; Etc: +;; Etc: -;;; Bug reports and fixes welcome (comments, too). Thanks go to -;;; Dean Andrews <adahome@ix.netcom.com> -;;; Preston F. Crow <preston.f.crow@dartmouth.edu> -;;; Gael Marziou <gael@gnlab030.grenoble.hp.com> -;;; Keith Sheffield <sheff@edcsgw2.cr.usgs.gov> -;;; Jan Djarv <jan.djarv@sa.erisoft.se> -;;; Lars Lindberg <qhslali@aom.ericsson.se> -;;; Alf-Ivar Holm <alfh@ifi.uio.no> -;;; for valuable feedback, code and bug reports. +;; Bug reports and fixes welcome (comments, too). Thanks go to +;; Dean Andrews <adahome@ix.netcom.com> +;; Preston F. Crow <preston.f.crow@dartmouth.edu> +;; Gael Marziou <gael@gnlab030.grenoble.hp.com> +;; Keith Sheffield <sheff@edcsgw2.cr.usgs.gov> +;; Jan Djarv <jan.djarv@sa.erisoft.se> +;; Lars Lindberg <qhslali@aom.ericsson.se> +;; Alf-Ivar Holm <alfh@ifi.uio.no> +;; for valuable feedback, code and bug reports. ;;; Code: @@ -77,13 +80,13 @@ (defvar hs-unbalance-handler-method 'top-level "*Symbol representing how \"unbalanced parentheses\" should be handled. -This error is usually signalled by hs-show-block. One of four values: +This error is usually signaled by `hs-show-block'. One of four values: `top-level', `next-line', `signal' or `ignore'. Default is `top-level'. - `top-level' -- Show top-level block containing the currently troublesome -block. + block. - `next-line' -- Use the fact that, for an already hidden block, its end -will be on the next line. Attempt to show this block. + will be on the next line. Attempt to show this block. - `signal' -- Pass the error through, stopping execution. - `ignore' -- Ignore the error, continuing execution. @@ -109,11 +112,12 @@ Note that the regexps should not contain leading or trailing whitespace.") -(defvar hs-hide-hooks nil - "*Hooks called at the end of hs-hide-all and hs-hide-block.") +(defvar hs-hide-hook nil + "*Hooks called at the end of `hs-hide-all' and `hs-hide-block'.") -(defvar hs-show-hooks nil - "*Hooks called at the end of hs-show-all, hs-show-block and hs-show-region.") +(defvar hs-show-hook nil + "*Hooks called at the end of commands to show text. +These commands include `hs-show-all', `hs-show-block' and `hs-show-region'.") (defvar hs-minor-mode-prefix "\C-c" "*Prefix key to use for hideshow commands in hideshow minor mode.") @@ -172,8 +176,8 @@ ;; snarfed from outline.el, but added buffer-read-only (defun hs-flag-region (from to flag) "Hides or shows lines from FROM to TO, according to FLAG. -If FLAG is \\n (newline character) then text is shown, while if FLAG -is \\^M \(control-M) the text is hidden." +If FLAG is `?\\n' (the newline character) then show the text; +if FLAG is `?\\^M' \(control-M) then hide the text." (let ((modp (buffer-modified-p)) buffer-read-only) ; nothing is immune (unwind-protect (progn @@ -225,7 +229,7 @@ (goto-char (if end (1+ (point)) p))))) (defun hs-safety-is-job-n () - "Warns if selective-display or selective-display-ellipses is nil." + "Warn if `selective-display' or `selective-display-ellipses' is nil." (let ((str "")) (or selective-display (setq str "selective-display nil ")) @@ -301,8 +305,8 @@ ;;;###autoload (defun hs-hide-all () "Hides all top-level blocks, displaying only first and last lines. -When done, point is repositioned at the beginning of the line, and -hs-hide-hooks is called. See documentation for `run-hooks'." +It moves point to the beginning of the line, and it runs the normal hook +`hs-hide-hook'. See documentation for `run-hooks'." (interactive) (hs-life-goes-on (message "hiding all blocks ...") @@ -320,25 +324,25 @@ (hs-safety-is-job-n)) (beginning-of-line) (message "hiding all blocks ... done") - (run-hooks 'hs-hide-hooks))) + (run-hooks 'hs-hide-hook))) (defun hs-show-all () "Shows all top-level blocks. -When done, point is unchanged, and hs-show-hooks is called. See -documentation for `run-hooks'." +This does not change point; it runs the normal hook `hs-show-hook'. +See documentation for `run-hooks'." (interactive) (hs-life-goes-on (message "showing all blocks ...") (hs-flag-region (point-min) (point-max) ?\n) (message "showing all blocks ... done") - (run-hooks 'hs-show-hooks))) + (run-hooks 'hs-show-hook))) ;;;###autoload (defun hs-hide-block (&optional end) "Selects a block and hides it. With prefix arg, reposition at end. Block is defined as a sexp for lispish modes, mode-specific otherwise. Comments are blocks, too. Upon completion, point is at repositioned and -hs-hide-hooks is called. See documentation for `run-hooks'." +the normal hook `hs-hide-hook' is run. See documentation for `run-hooks'." (interactive "P") (hs-life-goes-on (let ((c-reg (hs-inside-comment-p))) @@ -346,25 +350,25 @@ (cond ((string= comment-end "") (message "can't hide a single-line comment")) ((< (count-lines (car c-reg) (nth 1 c-reg)) 2) - (message "not enougn comment lines to hide")) + (message "not enough comment lines to hide")) (t (goto-char (nth 1 c-reg)) (forward-line -1) (hs-flag-region (car c-reg) (point) ?\C-m) (goto-char (if end (nth 1 c-reg) (car c-reg))) (hs-safety-is-job-n) - (run-hooks 'hs-hide-hooks))) + (run-hooks 'hs-hide-hook))) (if (or (looking-at hs-block-start-regexp) (hs-find-block-beginning)) (progn (hs-hide-block-at-point end) (hs-safety-is-job-n) - (run-hooks 'hs-hide-hooks))))))) + (run-hooks 'hs-hide-hook))))))) (defun hs-show-block (&optional end) "Selects a block and shows it. With prefix arg, reposition at end. -Upon completion, point is repositioned hs-show-hooks are called. See -documetation for `hs-hide-block' and `run-hooks'." +Upon completion, point is repositioned and the normal hook +`hs-show-hook' is run. See documentation for `hs-hide-block' and `run-hooks'." (interactive "P") (hs-life-goes-on (let ((c-reg (hs-inside-comment-p))) @@ -379,28 +383,28 @@ (progn (hs-show-block-at-point end) (hs-safety-is-job-n) - (run-hooks 'hs-show-hooks))))))) + (run-hooks 'hs-show-hook))))))) (defun hs-show-region (beg end) "Shows all lines from BEG to END, without doing any block analysis. -Note: hs-show-region is intended for use when when hs-show-block signals +Note:` hs-show-region' is intended for use when when `hs-show-block' signals `unbalanced parentheses' and so is an emergency measure only. You may become very confused if you use this command indiscriminately." (interactive "r") (hs-life-goes-on (hs-flag-region beg end ?\n) (hs-safety-is-job-n) - (run-hooks 'hs-show-hooks))) + (run-hooks 'hs-show-hook))) ;;;###autoload (defun hs-minor-mode (&optional arg) "Toggle hideshow minor mode. With ARG, turn hideshow minor mode on if ARG is positive, off otherwise. When hideshow minor mode is on, the menu bar is augmented with hideshow -commands and the hideshow commands are enabled. The variables\n -\tselective-display\n\tselective-display-ellipses\n -are set to t. Lastly, the hooks set in hs-minor-mode-hook are called. -See documentation for `run-hooks'.\n +commands and the hideshow commands are enabled. The variables +`selective-display' and `selective-display-ellipses' are set to t. +Last, the normal hook `hs-minor-mode-hook' is run; see the doc for `run-hooks'. + Turning hideshow minor mode off reverts the menu bar and the variables to default values and disables the hideshow commands." (interactive "P")
--- a/lisp/modes/icon.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/modes/icon.el Mon Aug 13 08:46:35 2007 +0200 @@ -6,21 +6,24 @@ ;; Created: 15 Feb 89 ;; Keywords: languages -;; This file is part of GNU Emacs. +;; This file is part of XEmacs. -;; 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 +;; XEmacs 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. +;; XEmacs 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, 675 Mass Ave, Cambridge, MA 02139, USA. +;; along with XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. + +;;; Synched up with: FSF 19.34. ;;; Commentary:
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/modes/imenu.el Mon Aug 13 08:46:35 2007 +0200 @@ -0,0 +1,869 @@ +;;; imenu.el --- Framework for mode-specific buffer indexes. + +;; Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc. + +;; Author: Ake Stenhoff <etxaksf@aom.ericsson.se> +;; Lars Lindberg <lli@sypro.cap.se> +;; Created: 8 Feb 1994 +;; Keywords: tools + +;; This file is part of XEmacs. + +;; XEmacs 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. + +;; XEmacs 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 XEmacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Synched up with: FSF 19.34. + +;;; Commentary: + +;; Purpose of this package: +;; To present a framework for mode-specific buffer indexes. +;; A buffer index is an alist of names and buffer positions. +;; For instance all functions in a C-file and their positions. +;; +;; How it works: + +;; A mode-specific function is called to generate the index. It is +;; then presented to the user, who can choose from this index. +;; +;; The package comes with a set of example functions for how to +;; utilize this package. + +;; There are *examples* for index gathering functions/regular +;; expressions for C/C++ and Lisp/Emacs Lisp but it is easy to +;; customize for other modes. A function for jumping to the chosen +;; index position is also supplied. + +;;; Thanks goes to +;; [simon] - Simon Leinen simon@lia.di.epfl.ch +;; [dean] - Dean Andrews ada@unison.com +;; [alon] - Alon Albert al@mercury.co.il +;; [greg] - Greg Thompson gregt@porsche.visix.COM +;; [wolfgang] - Wolfgang Bangerth zcg51122@rpool1.rus.uni-stuttgart.de +;; [kai] - Kai Grossjohann grossjoh@linus.informatik.uni-dortmund.de +;; [david] - David M. Smith dsmith@stats.adelaide.edu.au +;; [christian] - Christian Egli Christian.Egli@hcsd.hac.com +;; [karl] - Karl Fogel kfogel@floss.life.uiuc.edu + +;;; Code + +(eval-when-compile (require 'cl)) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; +;;; Customizable variables +;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(defvar imenu-auto-rescan nil + "*Non-nil means Imenu should always rescan the buffers.") + +(defvar imenu-auto-rescan-maxout 60000 + "* auto-rescan is disabled in buffers larger than this. +This variable is buffer-local.") + +(defvar imenu-always-use-completion-buffer-p nil + "*Set this to non-nil for displaying the index in a completion buffer. + +Non-nil means always display the index in a completion buffer. +Nil means display the index as a mouse menu when the mouse was +used to invoke `imenu'. +`never' means never automatically display a listing of any kind.") + +(defvar imenu-sort-function nil + "*The function to use for sorting the index mouse-menu. + +Affects only the mouse index menu. + +Set this to nil if you don't want any sorting (faster). +The items in the menu are then presented in the order they were found +in the buffer. + +Set it to `imenu--sort-by-name' if you want alphabetic sorting. + +The function should take two arguments and return T if the first +element should come before the second. The arguments are cons cells; +\(NAME . POSITION). Look at `imenu--sort-by-name' for an example.") + +(defvar imenu-max-items 25 + "*Maximum number of elements in an mouse menu for Imenu.") + +(defvar imenu-scanning-message "Scanning buffer for index (%3d%%)" + "*Progress message during the index scanning of the buffer. +If non-nil, user gets a message during the scanning of the buffer + +Relevant only if the mode-specific function that creates the buffer +index use `imenu-progress-message'.") + +(defvar imenu-space-replacement "^" + "*The replacement string for spaces in index names. +Used when presenting the index in a completion-buffer to make the +names work as tokens.") + +(defvar imenu-level-separator ":" + "*The separator between index names of different levels. +Used for making mouse-menu titles and for flattening nested indexes +with name concatenation.") + +;;;###autoload +(defvar imenu-generic-expression nil + "The regex pattern to use for creating a buffer index. + +If non-nil this pattern is passed to `imenu-create-index-with-pattern' +to create a buffer index. + +It is an alist with elements that look like this: (MENU-TITLE +REGEXP INDEX). + +MENU-TITLE is a string used as the title for the submenu or nil if the +entries are not nested. + +REGEXP is a regexp that should match a construct in the buffer that is +to be displayed in the menu; i.e., function or variable definitions, +etc. It contains a substring which is the name to appear in the +menu. See the info section on Regexps for more information. + +INDEX points to the substring in REGEXP that contains the name (of the +function, variable or type) that is to appear in the menu. + +For emacs-lisp-mode for example PATTERN would look like: + +'((nil \"^\\\\s-*(def\\\\(un\\\\|subst\\\\|macro\\\\|advice\\\\)\\\\s-+\\\\([-A-Za-z0-9+]+\\\\)\" 2) + (\"*Vars*\" \"^\\\\s-*(def\\\\(var\\\\|const\\\\)\\\\s-+\\\\([-A-Za-z0-9+]+\\\\)\" 2) + (\"*Types*\" \"^\\\\s-*(def\\\\(type\\\\|struct\\\\|class\\\\|ine-condition\\\\)\\\\s-+\\\\([-A-Za-z0-9+]+\\\\)\" 2)) + +The variable is buffer-local.") + +;;;###autoload +(make-variable-buffer-local 'imenu-generic-expression) + +;;;; Hooks + +(defvar imenu-create-index-function 'imenu-default-create-index-function + "The function to use for creating a buffer index. + +It should be a function that takes no arguments and returns an index +of the current buffer as an alist. The elements in the alist look +like: (INDEX-NAME . INDEX-POSITION). You may also nest index list like +\(INDEX-NAME . INDEX-ALIST). + +This function is called within a `save-excursion'. + +The variable is buffer-local.") +(make-variable-buffer-local 'imenu-create-index-function) + +(defvar imenu-prev-index-position-function 'beginning-of-defun + "Function for finding the next index position. + +If `imenu-create-index-function' is set to +`imenu-default-create-index-function', then you must set this variable +to a function that will find the next index, looking backwards in the +file. + +The function should leave point at the place to be connected to the +index and it should return nil when it doesn't find another index.") +(make-variable-buffer-local 'imenu-prev-index-position-function) + +(defvar imenu-extract-index-name-function nil + "Function for extracting the index name. + +This function is called after the function pointed out by +`imenu-prev-index-position-function'.") +(make-variable-buffer-local 'imenu-extract-index-name-function) + +;;; +;;; Macro to display a progress message. +;;; RELPOS is the relative position to display. +;;; If RELPOS is nil, then the relative position in the buffer +;;; is calculated. +;;; PREVPOS is the variable in which we store the last position displayed. +(defmacro imenu-progress-message (prevpos &optional relpos reverse) + (` (and + imenu-scanning-message + (let ((pos (, (if relpos + relpos + (` (imenu--relative-position (, reverse))))))) + (if (, (if relpos t + (` (> pos (+ 5 (, prevpos)))))) + (progn + (message imenu-scanning-message pos) + (setq (, prevpos) pos))))))) + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;; +;;;; Some examples of functions utilizing the framework of this +;;;; package. +;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;; Return the current/previous sexp and the location of the sexp (its +;; beginning) without moving the point. +(defun imenu-example--name-and-position () + (save-excursion + (forward-sexp -1) + (let ((beg (point)) + (end (progn (forward-sexp) (point))) + (marker (make-marker))) + (set-marker marker beg) + (cons (buffer-substring beg end) + marker)))) + +;;; +;;; Lisp +;;; + +(defun imenu-example--lisp-extract-index-name () + ;; Example of a candidate for `imenu-extract-index-name-function'. + ;; This will generate a flat index of definitions in a lisp file. + (save-match-data + (and (looking-at "(def") + (condition-case nil + (progn + (down-list 1) + (forward-sexp 2) + (let ((beg (point)) + (end (progn (forward-sexp -1) (point)))) + (buffer-substring beg end))) + (error nil))))) + +(defun imenu-example--create-lisp-index () + ;; Example of a candidate for `imenu-create-index-function'. + ;; It will generate a nested index of definitions. + (let ((index-alist '()) + (index-var-alist '()) + (index-type-alist '()) + (index-unknown-alist '()) + prev-pos) + (goto-char (point-max)) + (imenu-progress-message prev-pos 0) + ;; Search for the function + (while (beginning-of-defun) + (imenu-progress-message prev-pos nil t) + (save-match-data + (and (looking-at "(def") + (save-excursion + (down-list 1) + (cond + ((looking-at "def\\(var\\|const\\)") + (forward-sexp 2) + (push (imenu-example--name-and-position) + index-var-alist)) + ((looking-at "def\\(un\\|subst\\|macro\\|advice\\)") + (forward-sexp 2) + (push (imenu-example--name-and-position) + index-alist)) + ((looking-at "def\\(type\\|struct\\|class\\|ine-condition\\)") + (forward-sexp 2) + (if (= (char-after (1- (point))) ?\)) + (progn + (forward-sexp -1) + (down-list 1) + (forward-sexp 1))) + (push (imenu-example--name-and-position) + index-type-alist)) + (t + (forward-sexp 2) + (push (imenu-example--name-and-position) + index-unknown-alist))))))) + (imenu-progress-message prev-pos 100) + (and index-var-alist + (push (cons "Variables" index-var-alist) + index-alist)) + (and index-type-alist + (push (cons "Types" index-type-alist) + index-alist)) + (and index-unknown-alist + (push (cons "Syntax-unknown" index-unknown-alist) + index-alist)) + index-alist)) + +;; Regular expression to find C functions +(defvar imenu-example--function-name-regexp-c + (concat + "^[a-zA-Z0-9]+[ \t]?" ; type specs; there can be no + "\\([a-zA-Z0-9_*]+[ \t]+\\)?" ; more than 3 tokens, right? + "\\([a-zA-Z0-9_*]+[ \t]+\\)?" + "\\([*&]+[ \t]*\\)?" ; pointer + "\\([a-zA-Z0-9_*]+\\)[ \t]*(" ; name + )) + +(defun imenu-example--create-c-index (&optional regexp) + (let ((index-alist '()) + prev-pos char) + (goto-char (point-min)) + (imenu-progress-message prev-pos 0) + ;; Search for the function + (save-match-data + (while (re-search-forward + (or regexp imenu-example--function-name-regexp-c) + nil t) + (imenu-progress-message prev-pos) + (backward-up-list 1) + (save-excursion + (goto-char (scan-sexps (point) 1)) + (setq char (following-char))) + ;; Skip this function name if it is a prototype declaration. + (if (not (eq char ?\;)) + (push (imenu-example--name-and-position) index-alist)))) + (imenu-progress-message prev-pos 100) + (nreverse index-alist))) + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; +;;; Internal variables +;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;; The item to use in the index for rescanning the buffer. +(defconst imenu--rescan-item '("*Rescan*" . -99)) + +;; The latest buffer index. +;; Buffer local. +(defvar imenu--index-alist nil) +(make-variable-buffer-local 'imenu--index-alist) + +;; The latest buffer index used to update the menu bar menu. +(defvar imenu--last-menubar-index-alist nil) +(make-variable-buffer-local 'imenu--last-menubar-index-alist) + +;; History list for 'jump-to-function-in-buffer'. +;; Making this buffer local caused it not to work! +(defvar imenu--history-list nil) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; +;;; Internal support functions +;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;;; +;;; Sort function +;;; Sorts the items depending on their index name. +;;; An item look like (NAME . POSITION). +;;; +(defun imenu--sort-by-name (item1 item2) + (string-lessp (car item1) (car item2))) + +(defun imenu--relative-position (&optional reverse) + ;; Support function to calculate relative position in buffer + ;; Beginning of buffer is 0 and end of buffer is 100 + ;; If REVERSE is non-nil then the beginning is 100 and the end is 0. + (let ((pos (point)) + (total (buffer-size))) + (and reverse (setq pos (- total pos))) + (if (> total 50000) + ;; Avoid overflow from multiplying by 100! + (/ (1- pos) (max (/ total 100) 1)) + (/ (* 100 (1- pos)) (max total 1))))) + +;; Split LIST into sublists of max length N. +;; Example (imenu--split '(1 2 3 4 5 6 7 8) 3)-> '((1 2 3) (4 5 6) (7 8)) +(defun imenu--split (list n) + (let ((remain list) + (result '()) + (sublist '()) + (i 0)) + (while remain + (push (pop remain) sublist) + (incf i) + (and (= i n) + ;; We have finished a sublist + (progn (push (nreverse sublist) result) + (setq i 0) + (setq sublist '())))) + ;; There might be a sublist (if the length of LIST mod n is != 0) + ;; that has to be added to the result list. + (and sublist + (push (nreverse sublist) result)) + (nreverse result))) + +;;; Split the alist MENULIST into a nested alist, if it is long enough. +;;; In any case, add TITLE to the front of the alist. +(defun imenu--split-menu (menulist title) + (if (> (length menulist) imenu-max-items) + (let ((count 0)) + (cons title + (mapcar + (function + (lambda (menu) + (cons (format "(%s-%d)" title (setq count (1+ count))) + menu))) + (imenu--split menulist imenu-max-items)))) + (cons title menulist))) + +;;; Split up each long alist that are nested within ALIST +;;; into nested alists. +(defun imenu--split-submenus (alist) + (mapcar (function (lambda (elt) + (if (and (consp elt) + (stringp (car elt)) + (listp (cdr elt))) + (imenu--split-menu (cdr elt) (car elt)) + elt))) + alist)) + +;;; +;;; Find all items in this buffer that should be in the index. +;;; Returns an alist on the form +;;; ((NAME . POSITION) (NAME . POSITION) ...) +;;; + +(defun imenu--make-index-alist (&optional noerror) + ;; Create a list for this buffer only when needed. + (or (and imenu--index-alist + (or (not imenu-auto-rescan) + (and imenu-auto-rescan + (> (buffer-size) imenu-auto-rescan-maxout)))) + ;; Get the index + (setq imenu--index-alist + (save-excursion + (funcall imenu-create-index-function)))) + (or imenu--index-alist noerror + (error "No items suitable for an index found in this buffer")) + (or imenu--index-alist + (setq imenu--index-alist (list nil))) + ;; Add a rescan option to the index. + (cons imenu--rescan-item imenu--index-alist)) +;;; +;;; Find all markers in alist and makes +;;; them point nowhere. +;;; +(defun imenu--cleanup (&optional alist) + ;; Sets the markers in imenu--index-alist + ;; point nowhere. + ;; if alist is provided use that list. + (or alist + (setq alist imenu--index-alist)) + (and alist + (mapcar + (function + (lambda (item) + (cond + ((markerp (cdr item)) + (set-marker (cdr item) nil)) + ((consp (cdr item)) + (imenu--cleanup (cdr item)))))) + alist) + t)) + +(defun imenu--create-keymap-2 (alist counter &optional commands) + (let ((map nil)) + (mapcar + (function + (lambda (item) + (cond + ((listp (cdr item)) + (append (list (setq counter (1+ counter)) + (car item) 'keymap (car item)) + (imenu--create-keymap-2 (cdr item) (+ counter 10) commands))) + (t + (let ((end (if commands `(lambda () (interactive) + (imenu--menubar-select ',item)) + (cons '(nil) t)))) + (cons (car item) + (cons (car item) end)))) + ))) + alist))) + +;; If COMMANDS is non-nil, make a real keymap +;; with a real command used as the definition. +;; If it is nil, make something suitable for x-popup-menu. +(defun imenu--create-keymap-1 (title alist &optional commands) + (append (list 'keymap title) (imenu--create-keymap-2 alist 0 commands))) + + +(defun imenu--in-alist (str alist) + "Check whether the string STR is contained in multi-level ALIST." + (let (elt head tail res) + (setq res nil) + (while alist + (setq elt (car alist) + tail (cdr elt) + alist (cdr alist) + head (car elt)) + (if (string= str head) + (setq alist nil res elt) + (if (and (listp tail) + (setq res (imenu--in-alist str tail))) + (setq alist nil)))) + res)) + +(defun imenu-default-create-index-function () + "*Wrapper for index searching functions. + +Moves point to end of buffer and then repeatedly calls +`imenu-prev-index-position-function' and `imenu-extract-index-name-function'. +Their results are gathered into an index alist." + ;; These should really be done by setting imenu-create-index-function + ;; in these major modes. But save that change for later. + (cond ((and (fboundp imenu-prev-index-position-function) + (fboundp imenu-extract-index-name-function)) + (let ((index-alist '()) + prev-pos name) + (goto-char (point-max)) + (imenu-progress-message prev-pos 0 t) + ;; Search for the function + (while (funcall imenu-prev-index-position-function) + (imenu-progress-message prev-pos nil t) + (save-excursion + (setq name (funcall imenu-extract-index-name-function))) + (and (stringp name) + (push (cons name (point)) index-alist))) + (imenu-progress-message prev-pos 100 t) + index-alist)) + ;; Use generic expression if possible. + ((and imenu-generic-expression) + (imenu--generic-function imenu-generic-expression)) + (t + (error "The mode \"%s\" does not take full advantage of imenu.el yet." + mode-name)))) + +(defun imenu--replace-spaces (name replacement) + ;; Replace all spaces in NAME with REPLACEMENT. + ;; That second argument should be a string. + (mapconcat + (function + (lambda (ch) + (if (char-equal ch ?\ ) + replacement + (char-to-string ch)))) + name + "")) + +(defun imenu--flatten-index-alist (index-alist &optional concat-names prefix) + ;; Takes a nested INDEX-ALIST and returns a flat index alist. + ;; If optional CONCAT-NAMES is non-nil, then a nested index has its + ;; name and a space concatenated to the names of the children. + ;; Third argument PREFIX is for internal use only. + (mapcan + (function + (lambda (item) + (let* ((name (car item)) + (pos (cdr item)) + (new-prefix (and concat-names + (if prefix + (concat prefix imenu-level-separator name) + name)))) + (cond + ((or (markerp pos) (numberp pos)) + (list (cons new-prefix pos))) + (t + (imenu--flatten-index-alist pos new-prefix)))))) + index-alist)) + +;;; +;;; Generic index gathering function. +;;; + +(defun imenu--generic-function (patterns) +;; Built on some ideas that Erik Naggum <erik@naggum.no> once posted +;; to comp.emacs + "Return an index of the current buffer as an alist. + +PATTERN is an alist with elements that look like this: (MENU-TITLE +REGEXP INDEX). + +MENU-TITLE is a string used as the title for the submenu or nil if the +entries are not nested. + +REGEXP is a regexp that should match a construct in the buffer that is +to be displayed in the menu; i.e., function or variable definitions, +etc. It contains a substring which is the name to appear in the +menu. See the info section on Regexps for more information. + +INDEX points to the substring in REGEXP that contains the name (of the +function, variable or type) that is to appear in the menu. + +For emacs-lisp-mode for example PATTERN would look like: + +'((nil \"^\\\\s-*(def\\\\(un\\\\|subst\\\\|macro\\\\|advice\\\\)\\\\s-+\\\\([-A-Za-z0-9]+\\\\)\" 2) + (\"*Vars*\" \"^\\\\s-*(def\\\\(var\\\\|const\\\\)\\\\s-+\\\\([-A-Za-z0-9]+\\\\)\" 2) + (\"*Types*\" \"^\\\\s-*(def\\\\(type\\\\|struct\\\\|class\\\\|ine-condition\\\\)\\\\s-+\\\\([-A-Za-z0-9]+\\\\)\" 2))' + +Returns an index of the current buffer as an alist. The elements in +the alist look like: (INDEX-NAME . INDEX-POSITION). They may also be +nested index lists like (INDEX-NAME . INDEX-ALIST) depending on +pattern. + +\(imenu--generic-function PATTERN\)." + + (let ((index-alist (list 'dummy)) + (found nil) + (global-regexp + (concat "\\(" + (mapconcat + (function (lambda (pattern) (identity (cadr pattern)))) + patterns "\\)\\|\\(") + "\\)")) + prev-pos) + + (goto-char (point-max)) + (imenu-progress-message prev-pos 0 t) + (save-match-data + (while (re-search-backward global-regexp nil t) + (imenu-progress-message prev-pos nil t) + (setq found nil) + (save-excursion + (goto-char (match-beginning 0)) + (mapcar + (function + (lambda (pat) + (let ((menu-title (car pat)) + (regexp (cadr pat)) + (index (caddr pat))) + (if (and (not found) ; Only allow one entry; + (looking-at regexp)) + (let ((beg (match-beginning index)) + (end (match-end index))) + (setq found t) + (push + (cons (buffer-substring-no-properties beg end) beg) + (cdr + (or (assoc menu-title index-alist) + (car (push + (cons menu-title '()) + index-alist)))))))))) + patterns)))) + (imenu-progress-message prev-pos 100 t) + (let ((main-element (assq nil index-alist))) + (nconc (delq main-element (delq 'dummy index-alist)) main-element)))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; +;;; The main functions for this package! +;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(defun imenu--completion-buffer (index-alist &optional prompt) + "Let the user select from INDEX-ALIST in a completion buffer with PROMPT. + +Returns t for rescan and otherwise a position number." + ;; Create a list for this buffer only when needed. + (let (name choice + (prepared-index-alist + (mapcar + (function + (lambda (item) + (cons (imenu--replace-spaces (car item) imenu-space-replacement) + (cdr item)))) + index-alist))) + (if (eq imenu-always-use-completion-buffer-p 'never) + (setq name (completing-read (or prompt "Index item: ") + prepared-index-alist + nil t nil 'imenu--history-list)) + (save-window-excursion + ;; Display the completion buffer + (with-output-to-temp-buffer "*Completions*" + (display-completion-list + (all-completions "" prepared-index-alist ))) + (let ((minibuffer-setup-hook + (function (lambda () + (let ((buffer (current-buffer))) + (save-excursion + (set-buffer "*Completions*") + (setq completion-reference-buffer buffer))))))) + ;; Make a completion question + (setq name (completing-read (or prompt "Index item: ") + prepared-index-alist + nil t nil 'imenu--history-list))))) + (cond ((not (stringp name)) + nil) + ((string= name (car imenu--rescan-item)) + t) + (t + (setq choice (assoc name prepared-index-alist)) + (if (listp (cdr choice)) + (imenu--completion-buffer (cdr choice) prompt) + choice))))) + +(defun imenu--mouse-menu (index-alist event &optional title) + "Let the user select from a buffer index from a mouse menu. + +INDEX-ALIST is the buffer index and EVENT is a mouse event. + +Returns t for rescan and otherwise a position number." + (setq index-alist (imenu--split-submenus index-alist)) + (let* ((menu (imenu--split-menu + (if imenu-sort-function + (sort + (let ((res nil) + (oldlist index-alist)) + ;; Copy list method from the cl package `copy-list' + (while (consp oldlist) (push (pop oldlist) res)) + (prog1 (nreverse res) (setcdr res oldlist))) + imenu-sort-function) + index-alist) + (or title (buffer-name)))) + position) + (setq menu (imenu--create-keymap-1 (car menu) + (if (< 1 (length (cdr menu))) + (cdr menu) + (cdr (cadr menu))))) + (setq position (x-popup-menu event menu)) + (cond ((and (listp position) + (numberp (car position)) + (stringp (nth (1- (length position)) position))) + (setq position (nth (1- (length position)) position))) + ((and (stringp (car position)) + (null (cdr position))) + (setq position (car position)))) + (cond ((eq position nil) + position) + ((listp position) + (imenu--mouse-menu position event + (if title + (concat title imenu-level-separator + (car (rassq position index-alist))) + (car (rassq position index-alist))))) + ((stringp position) + (or (string= position (car imenu--rescan-item)) + (imenu--in-alist position index-alist))) + ((or (= position (cdr imenu--rescan-item)) + (and (stringp position) + (string= position (car imenu--rescan-item)))) + t) + (t + (rassq position index-alist))))) + +(defun imenu-choose-buffer-index (&optional prompt alist) + "Let the user select from a buffer index and return the chosen index. + +If the user originally activated this function with the mouse, a mouse +menu is used. Otherwise a completion buffer is used and the user is +prompted with PROMPT. + +If you call this function with index alist ALIST, then it lets the user +select from ALIST. + +With no index alist ALIST, it calls `imenu--make-index-alist' to +create the index alist. + +If `imenu-always-use-completion-buffer-p' is non-nil, then the +completion buffer is always used, no matter if the mouse was used or +not. + +The returned value is on the form (INDEX-NAME . INDEX-POSITION)." + (let (index-alist + (mouse-triggered (listp last-nonmenu-event)) + (result t) ) + ;; If selected by mouse, see to that the window where the mouse is + ;; really is selected. + (and mouse-triggered + (not (equal last-nonmenu-event '(menu-bar))) + (let ((window (posn-window (event-start last-nonmenu-event)))) + (or (framep window) (null window) (select-window window)))) + ;; Create a list for this buffer only when needed. + (while (eq result t) + (setq index-alist (if alist alist (imenu--make-index-alist))) + (setq result + (if (and mouse-triggered + (not imenu-always-use-completion-buffer-p)) + (imenu--mouse-menu index-alist last-nonmenu-event) + (imenu--completion-buffer index-alist prompt))) + (and (eq result t) + (imenu--cleanup) + (setq imenu--index-alist nil))) + result)) + +;;;###autoload +(defun imenu-add-to-menubar (name) + "Adds an `imenu' entry to the menu bar for the current buffer. +NAME is a string used to name the menu bar item. +See the command `imenu' for more information." + (interactive "sImenu menu item name: ") + (let ((newmap (make-sparse-keymap)) + (menu-bar (lookup-key (current-local-map) [menu-bar]))) + (define-key newmap [menu-bar] + (append (make-sparse-keymap) menu-bar)) + (define-key newmap [menu-bar index] + (cons name (nconc (make-sparse-keymap "Imenu") + (make-sparse-keymap)))) + (use-local-map (append newmap (current-local-map)))) + (add-hook 'menu-bar-update-hook 'imenu-update-menubar)) + +(defvar imenu-buffer-menubar nil) + +(defun imenu-update-menubar () + (and (current-local-map) + (keymapp (lookup-key (current-local-map) [menu-bar index])) + (let ((index-alist (imenu--make-index-alist t))) + ;; Don't bother updating if the index-alist has not changed + ;; since the last time we did it. + (or (equal index-alist imenu--last-menubar-index-alist) + (let (menu menu1 old) + (setq imenu--last-menubar-index-alist index-alist) + (setq index-alist (imenu--split-submenus index-alist)) + (setq menu (imenu--split-menu + (if imenu-sort-function + (sort + (let ((res nil) + (oldlist index-alist)) + ;; Copy list method from the cl package `copy-list' + (while (consp oldlist) (push (pop oldlist) res)) + (prog1 (nreverse res) (setcdr res oldlist))) + imenu-sort-function) + index-alist) + (buffer-name))) + (setq menu1 (imenu--create-keymap-1 (car menu) + (if (< 1 (length (cdr menu))) + (cdr menu) + (cdr (car (cdr menu)))) + t)) + (setq old (lookup-key (current-local-map) [menu-bar index])) + (setcdr old (cdr menu1))))))) + +(defun imenu--menubar-select (item) + "Use Imenu to select the function or variable named in this menu item." + (if (equal item '("*Rescan*" . -99)) + (progn + (imenu--cleanup) + (setq imenu--index-alist nil) + (imenu-update-menubar)) + (imenu item))) + +;;;###autoload +(defun imenu (index-item) + "Jump to a place in the buffer chosen using a buffer menu or mouse menu. +See `imenu-choose-buffer-index' for more information." + (interactive + (list (save-restriction + (widen) + (imenu-choose-buffer-index)))) + ;; Convert a string to an alist element. + (if (stringp index-item) + (setq index-item (assoc index-item (imenu--make-index-alist)))) + (and index-item + (progn + (push-mark) + (cond + ((markerp (cdr index-item)) + (if (or ( > (marker-position (cdr index-item)) (point-min)) + ( < (marker-position (cdr index-item)) (point-max))) + ;; widen if outside narrowing + (widen)) + (goto-char (marker-position (cdr index-item)))) + (t + (if (or ( > (cdr index-item) (point-min)) + ( < (cdr index-item) (point-max))) + ;; widen if outside narrowing + (widen)) + (goto-char (cdr index-item))))))) + +(provide 'imenu) + +;;; imenu.el ends here +
--- a/lisp/modes/ksh-mode.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/modes/ksh-mode.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,6 +1,6 @@ ;; ksh-mode.el --- sh (ksh, bash) script editing mode for GNU Emacs. -;; Copyright (C) 1992-95 Gary Ellison. +;; Copyright (C) 1992-96 Gary Ellison. ;; This file is part of XEmacs. @@ -18,25 +18,27 @@ ;; along with XEmacs; see the file COPYING. If not, write to the Free ;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; $Source: /afs/informatik.uni-tuebingen.de/local/web/xemacs/xemacs-cvs/XEmacs/xemacs-19/lisp/modes/ksh-mode.el,v $ -- +;; ;; LCD Archive Entry: -;; ksh-mode|Gary F. Ellison|Gary_F_Ellison@ATT.COM -;; Mode for editing sh/ksh/bash scripts -;; 23-Feb-95|2.6|~/modes/ksh-mode.el.Z| +;; ksh-mode|Gary F. Ellison|Gary.F.Ellison@ATT.COM +;; |Mode for editing sh/ksh/bash scripts +;; |$Date: 1996/12/18 03:44:42 $|$Revision: 1.1.1.2 $|~/modes/ksh-mode.el.Z| ;; Author: Gary F. Ellison <Gary.F.Ellison@ATT.COM> -;; AT&T Bell Laboratories +;; AT&T Laboratories ;; 6200 East Broad Street ;; Columbus, Ohio 43213 USA ;; ;; Maintainer: Gary F. Ellison <Gary.F.Ellison@ATT.COM> ;; Created: Fri Jun 19 -;; Version: 2.6 -;; Keywords: languages, shell, korn, bourne, sh, ksh, bash, unix +;; $Revision: 1.1.1.2 $ +;; Keywords: shell, korn, bourne, sh, ksh, bash ;; -;; Delta On : 2/23/95 +;; Delta On $Date: 1996/12/18 03:44:42 $ ;; Last Modified By: Gary Ellison -;; Last Modified On: Thu Feb 23 11:32:03 1995 -;; Update Count : 33 +;; Last Modified On: Mon Sep 11 12:26:47 1995 +;; Update Count : 35 ;; Status : Highly Functional ;; @@ -78,6 +80,10 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; HISTORY +;; 6-Apr-96 Gary Ellison <gary.f.ellison@att.com> +;; Depreciated font-lock-doc-string-face. +;; Narly keywords inside strings bug fixed. +;; ;; 8-Aug-95 Jack Repenning <jackr@sgi.com> ;; Fix documentation of `ksh-align-to-keyword' to conform to the 23 ;; Feb default change. Search for keywords obeying case, since the @@ -224,7 +230,7 @@ ;; Conception of this mode. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(defconst ksh-mode-version "2.6" +(defconst ksh-mode-version "$Revision: 1.1.1.2 $" "*Version numbers of this version of ksh-mode") ;; @@ -262,8 +268,7 @@ the current indentation. If non-nil, indentation will be relative to the column the keyword starts. If nil, indentation will be relative to the current indentation of the line the keyword is on. -The default value is nil. -The non-nil case doesn't work very well.") +The default value is non-nil. The non-nil case doesn't work very well.") (defvar ksh-comment-regexp "^\\s *#" "*Regular expression used to recognize comments. Customize to support @@ -301,15 +306,15 @@ ;; (defvar ksh-keywords '("for" "in" "do" "done" "select" "case" "esac" "if" "then" "elif" "else" "fi" "while" "until" "function" "time" -"alias" "bg" "break" "continue" "cd" "echo" "fc" "fg" "getopts" "jobs" "kill" -"let" "newgrp" "print" "pwd" "read" "readonly" "return" "set" "shift" "test" -"times" "trap" "typeset" "ulimit" "umask" "unalias" "unset" "wait" "whence")) +"alias" "bg" "break" "continue" "cd" "exit" "echo" "fc" "fg" "getopts" "jobs" +"kill" "let" "newgrp" "print" "pwd" "read" "readonly" "return" "set" "shift" +"test" "times" "trap" "typeset" "ulimit" "umask" "unalias" "unset" "wait" "whence")) ;; '("\\<function[ \t]+\\([^(; \t]+\\)" 1 font-lock-function-name-face) (defconst ksh-font-lock-keywords (list ;; Fontify [[ ]] expressions - '("\\(\\[.*\\]\\)" 1 font-lock-doc-string-face t) + '("\\(\\[.*\\]\\)" 1 font-lock-string-face t) ;; Fontify keywords (cons (concat "\\(\\<" @@ -321,65 +326,53 @@ '("\\(^[ \t]*[A-Za-z_][A-Za-z_0-9]*[ \t]*()\\)" 1 font-lock-function-name-face) )) +;; XEmacs addition (put 'ksh-mode 'font-lock-keywords 'ksh-font-lock-keywords) -;; XEmacs change -- This can incorrectly set some Perl scripts to -;; ksh-mode. It also won't work for some other shells which ksh-mode -;; nominally works with. -;(defun ksh-check-hook () -; (save-excursion -; (save-restriction -; (widen) -; (goto-char (point-min)) -; (cond ((looking-at "#![ \t]*/.*/k?sh[ \t]*") -; (ksh-mode)))))) -; -;(add-hook 'find-file-hooks 'ksh-check-hook) - ;; ;; Context/indentation regular expressions ;; ;; indenting expressions ;; -(defconst ksh-then-do-re "^[^#\n]*\\s\"*\\b\\(then\\|do\\)\\b" +;(defconst ksh-then-do-re "^[^#\n]*\\s\"*\\b\\(then\\|do\\)\\b" +(defconst ksh-then-do-re "\\s *\\b\\(then\\|do\\)\\b" "*Regexp used to locate grouping keywords: \"then\" and \"do\"" ) -;;(defconst ksh-do-re "^[ \t]*\\bdo\\(\\b\\|$\\)" -(defconst ksh-do-re "^\\s *\\bdo\\(\\b\\|$\\)" +(defconst ksh-do-re "\\s *\\bdo\\(\\b\\|$\\)" "*Regexp used to match keyword: do") -(defconst ksh-then-re "^\\s *\\bthen\\(\\b\\|$\\)" +(defconst ksh-then-re "\\s *\\bthen\\(\\b\\|$\\)" "*Regexp used to match keyword: then") ;; ;; Structure starting/indenting keywords ;; -(defconst ksh-else-re "^\\s *\\belse\\(\\b\\|$\\)" +(defconst ksh-else-re "\\s *\\belse\\(\\b\\|$\\)" "*Regexp used to match keyword: else") -(defconst ksh-elif-re "^\\s *\\belif\\(\\b\\|$\\)" +(defconst ksh-elif-re "\\s *\\belif\\(\\b\\|$\\)" "*Regexp used to match keyword: elif") -(defconst ksh-brace-re "^\\S>*{[ \t\n]" +(defconst ksh-brace-re "\\S>*{[ \t\n]" "*Regexp used to match syntactic entity: { ") -(defconst ksh-case-item-end-re "^\\S>*;;[ \t\n]" +(defconst ksh-case-item-end-re "\\S>*;;[ \t\n]" "*Regexp used to match case item end syntactic entity: ;;") (defconst ksh-keywords-re - "^[^#\n]*\\s\"*\\b\\(else\\|if\\|elif\\|case\\|while\\|for\\|until\\|select\\)\\b" + "\\s *\\b\\(else\\|if\\|elif\\|case\\|while\\|for\\|until\\|select\\)\\b" "*Regexp used to detect compound command keywords: if, else, elif case, while, for, until, and select") -(defconst ksh-if-re "^[^#\n]*\\s\"*\\b\\(if\\)\\b" +(defconst ksh-if-re "\\s *\\b\\(if\\)\\b" "*Regexp used to match keyword: if") (defconst ksh-iteration-keywords-re - "^[^#\n]*\\s\"*\\b\\(while\\|for\\|until\\|select\\)\\b" + "\\s *\\b\\(while\\|for\\|until\\|select\\)\\b" "*Match one of the keywords: while, until, for, select") -(defconst ksh-case-re "^[^#\n]*\\s\"*\\b\\(case\\)\\b" +(defconst ksh-case-re "\\s *\\bcase\\b" "*Regexp used to match keyword: case") (defconst ksh-explicit-func-re @@ -403,16 +396,16 @@ ;; ;; structure ending keyword regular expressions -(defconst ksh-fi-re "^\\s *fi\\b" +(defconst ksh-fi-re "\\s *\\bfi\\b" "*Regexp used to match keyword: fi") -(defconst ksh-esac-re "^\\s *esac\\b" +(defconst ksh-esac-re "\\s *\\besac\\b" "*Regexp used to match keyword: esac") -(defconst ksh-done-re "^\\s *done\\b" +(defconst ksh-done-re "\\s *\\bdone\\b" "*Regexp used to match keyword: done") -(defconst ksh-brace-end-re "^\\s *}\\s *" +(defconst ksh-brace-end-re "\\s *}\\s *" "*Regexp used to match function brace-groups") (defconst ksh-multiline-re "^.*\\\\$" @@ -425,7 +418,13 @@ "Syntax table used while in ksh mode.") (if ksh-mode-syntax-table () - (setq ksh-mode-syntax-table (make-syntax-table)) + (setq ksh-mode-syntax-table (make-syntax-table (standard-syntax-table))) + (modify-syntax-entry ?\( "." ksh-mode-syntax-table) + (modify-syntax-entry ?\) "." ksh-mode-syntax-table) + (modify-syntax-entry ?{ "." ksh-mode-syntax-table) + (modify-syntax-entry ?} "." ksh-mode-syntax-table) + (modify-syntax-entry ?\[ "(]" ksh-mode-syntax-table) + (modify-syntax-entry ?\] ")[" ksh-mode-syntax-table) (modify-syntax-entry ?\' "\"" ksh-mode-syntax-table) (modify-syntax-entry ?` "\"" ksh-mode-syntax-table) (modify-syntax-entry ?\n ">" ksh-mode-syntax-table) @@ -436,7 +435,7 @@ (modify-syntax-entry ?> "." ksh-mode-syntax-table) (modify-syntax-entry ?& "." ksh-mode-syntax-table) (modify-syntax-entry ?| "." ksh-mode-syntax-table) - (modify-syntax-entry ?$ "." ksh-mode-syntax-table) + (modify-syntax-entry ?$ "\\" ksh-mode-syntax-table) (modify-syntax-entry ?% "." ksh-mode-syntax-table) (modify-syntax-entry ?= "." ksh-mode-syntax-table) (modify-syntax-entry ?/ "." ksh-mode-syntax-table) @@ -444,6 +443,7 @@ (modify-syntax-entry ?* "." ksh-mode-syntax-table) (modify-syntax-entry ?- "." ksh-mode-syntax-table) (modify-syntax-entry ?\; "." ksh-mode-syntax-table) + (modify-syntax-entry ?: "." ksh-mode-syntax-table) ) (defvar ksh-mode-abbrev-table nil @@ -457,8 +457,6 @@ () (setq ksh-mode-map (make-sparse-keymap)) (define-key ksh-mode-map "\t" 'ksh-indent-command) -;; (define-key ksh-mode-map "\n" 'reindent-then-newline-and-indent) -;; (define-key ksh-mode-map '[return] 'reindent-then-newline-and-indent) ;; (define-key ksh-mode-map "\t" 'ksh-indent-line) ;; (define-key ksh-mode-map "\177" 'backward-delete-char-untabify) (define-key ksh-mode-map "\C-j" 'reindent-then-newline-and-indent) @@ -469,7 +467,7 @@ ;;;###autoload (defun ksh-mode () - "ksh-mode 2.6 - Major mode for editing (Bourne, Korn or Bourne again) + "ksh-mode $Revision: 1.1.1.2 $ - Major mode for editing (Bourne, Korn or Bourne again) shell scripts. Special key bindings and commands: \\{ksh-mode-map} @@ -566,27 +564,19 @@ Installation: - Put ksh-mode.el in some directory in your load-path. - Put the following forms in your .emacs file. - - (setq auto-mode-alist - (append auto-mode-alist - (list - '(\"\\\\.sh$\" . ksh-mode) - '(\"\\\\.ksh$\" . ksh-mode) - '(\"\\\\.bashrc\" . ksh-mode) - '(\"\\\\..*profile\" . ksh-mode)))) (setq ksh-mode-hook (function (lambda () (font-lock-mode 1) ;; font-lock the buffer (setq ksh-indent 8) - (setq ksh-group-offset -8)) + (setq ksh-group-offset -8) (setq ksh-brace-offset -8) (setq ksh-tab-always-indent t) (setq ksh-match-and-tell t) (setq ksh-align-to-keyword t) ;; Turn on keyword alignment )))" + ;; + ;; and away we go (interactive) (kill-all-local-variables) (use-local-map ksh-mode-map) @@ -663,7 +653,7 @@ "Return a 2 element list (nest-level nest-line) describing where the current line should nest." (let ((case-fold-search) - (level)) + (level)) (save-excursion (forward-line -1) (while (and (not (bobp)) @@ -715,6 +705,7 @@ ) ) ;; defun + (defun ksh-get-case-indent () "Return the column of the closest open case statement" (save-excursion @@ -730,6 +721,7 @@ ) ) + ;; ;; Functions which make this mode what it is ;; @@ -739,118 +731,126 @@ into consideration keywords and other nesting constructs." (save-excursion (let ((fence-post) +; (start-post) (nester-column) - (case-fold-search) + (case-fold-search) (start-line (ksh-current-line))) - ;; - ;; Handle case item indentation constructs for this line - (cond ((ksh-looking-at-case-item) - (save-excursion - (goto-line nest-line) - (let ((fence-post (save-excursion (end-of-line) (point)))) - ;; - ;; Now know there is a case-item so detect whether - ;; it is first under case, just another case-item, or - ;; a case-item and case-item-end all rolled together. - ;; - (cond ((re-search-forward ksh-case-re fence-post t) - (goto-char (match-beginning 1)) - (+ (ksh-current-indentation) ksh-case-item-offset)) - - ((ksh-looking-at-case-item) - (current-indentation)) - - ((looking-at ksh-case-item-end-re) - (end-of-line) - (+ (ksh-get-case-indent) ksh-case-item-offset)) - ) - ))) - (t;; Not a case-item. What to do relative to the nest-line? - (save-excursion - (goto-line nest-line) - (setq fence-post (save-excursion (end-of-line) (point))) - (setq nester-column - (save-excursion - (cond - ;; - ;; Check if we are in a continued statement - ((and (looking-at ksh-multiline-re) - (save-excursion - (goto-line (1- start-line)) - (looking-at ksh-multiline-re))) - (+ (current-indentation) ksh-multiline-offset)) - - ;; In order to locate the column of the keyword, - ;; which might be embedded within a case-item, - ;; it is necessary to use re-search-forward. - ;; Search by literal case, since shell is - ;; case-sensitive. - ((re-search-forward ksh-keywords-re fence-post t) - (goto-char (match-beginning 1)) - (if (looking-at ksh-case-re) - (+ (ksh-current-indentation) ksh-case-item-offset) - (+ (ksh-current-indentation) + (cond + ;; + ;; Handle case item indentation constructs for this line + ((ksh-looking-at-case-item) + (save-excursion + (goto-line nest-line) + (back-to-indentation) + (let ((fence-post (ksh-eol-point))) + ;; + ;; Now know there is a case-item so detect whether + ;; it is first under case, just another case-item, or + ;; a case-item and case-item-end all rolled together. + ;; + (cond ((ksh-search-forward-sexp ksh-case-re fence-post) + (+ (ksh-current-indentation) ksh-case-item-offset)) + + ((ksh-looking-at-case-item) + (current-indentation)) + + ((looking-at ksh-case-item-end-re) + (end-of-line) + (+ (ksh-get-case-indent) ksh-case-item-offset)) + ) + ))) + (t;; Not a case-item. What to do relative to the nest-line? + (save-excursion + (goto-line nest-line) +; (setq start-post (point)) + (setq fence-post (ksh-eol-point)) + (setq nester-column + (save-excursion + (cond + ;; + ;; Check if we are in a continued statement + ((and (looking-at ksh-multiline-re) + (save-excursion + (goto-line (1- start-line)) + (looking-at ksh-multiline-re))) + (+ (current-indentation) ksh-multiline-offset)) + ;; In order to locate the column of the keyword, + ;; which might be embedded within a case-item, + ;; it is necessary to iterate over sexp. + ((progn + (save-excursion + (back-to-indentation) + (if (ksh-search-forward-sexp ksh-keywords-re fence-post) + (progn + ;; + ;; special pun intended 'case' + (if (looking-at ksh-case-re) + (+ (ksh-current-indentation) + ksh-case-item-offset) + (+ (ksh-current-indentation) + (if (null ksh-indent) + 2 ksh-indent)))) + nil)) + )) + ;; + ;; handle then or do + ((progn + (save-excursion + (back-to-indentation) + (if (ksh-search-forward-sexp ksh-then-do-re fence-post) + (progn (if (null ksh-indent) - 2 ksh-indent) - ))) + (+ (ksh-current-indentation) 1) + (+ (ksh-current-indentation) ksh-indent))) + nil)))) - ((re-search-forward ksh-then-do-re fence-post t) - (if (null ksh-indent) - (progn - (goto-char (match-end 1)) - (+ (ksh-current-indentation) 1)) - (progn - (goto-char (match-beginning 1)) - (+ (ksh-current-indentation) ksh-indent)) - )) - - ((looking-at ksh-brace-re) - (+ (current-indentation) - (if (null ksh-indent) - 2 ksh-indent) - )) - ;; - ;; Forces functions to first column - ((or (looking-at ksh-implicit-func-re) - (looking-at ksh-explicit-func-re)) - (if (looking-at ksh-func-brace-re) - (if (null ksh-indent) - 2 ksh-indent) - ksh-brace-offset)) + ((looking-at ksh-brace-re) + (+ (current-indentation) + (if (null ksh-indent) + 2 ksh-indent) + )) + ;; + ;; Forces functions to first column + ((or (looking-at ksh-implicit-func-re) + (looking-at ksh-explicit-func-re)) + (if (looking-at ksh-func-brace-re) + (if (null ksh-indent) + 2 ksh-indent) + ksh-brace-offset)) - ;; - ;; Need to first detect the end of a case-item - ((looking-at ksh-case-item-end-re) - (end-of-line) - (+ (ksh-get-case-indent) ksh-case-item-offset)) - ;; - ;; Now detect first statement under a case item - ((ksh-looking-at-case-item) - (if (null ksh-case-indent) - (progn - (re-search-forward ksh-case-item-re fence-post t) - (goto-char (match-end 1)) - (+ (current-column) 1)) - (+ (current-indentation) ksh-case-indent))) - - ;; This is hosed when using current-column - ;; and there is a multi-command expression as the - ;; nester. - (t (current-indentation))) - ) - ));; excursion over - ;; - ;; Handle additional indentation constructs for this line - (cond ((ksh-looking-at-compound-list) - (+ nester-column ksh-group-offset)) - ((looking-at ksh-brace-re) - (+ nester-column ksh-brace-offset)) - (t nester-column)) - );; Not a case-item - ) + ;; + ;; Need to first detect the end of a case-item + ((looking-at ksh-case-item-end-re) + (end-of-line) + (+ (ksh-get-case-indent) ksh-case-item-offset)) + ;; + ;; Now detect first statement under a case item + ((ksh-looking-at-case-item) + (if (null ksh-case-indent) + (progn + (re-search-forward ksh-case-item-re fence-post t) + (goto-char (match-end 1)) + (+ (current-column) 1)) + (+ (current-indentation) ksh-case-indent))) + + ;; This is hosed when using current-column + ;; and there is a multi-command expression as the + ;; nester. + (t (current-indentation))) + ) + ));; excursion over + ;; + ;; Handle additional indentation constructs for this line + (cond ((ksh-looking-at-compound-list) + (+ nester-column ksh-group-offset)) + ((looking-at ksh-brace-re) + (+ nester-column ksh-brace-offset)) + (t nester-column)) + );; Not a case-item + ) );;let );; excursion - );; defun + ) ;; defun (defun ksh-indent-command () "Indent current line relative to containing block and allow for @@ -905,9 +905,7 @@ (let* ( (this-line-level (current-indentation)) - (this-bol (save-excursion - (beginning-of-line) - (point))) + (this-bol (ksh-bol-point)) (this-point (- (point) this-bol)) ) (cond ((> this-line-level this-point);; point in initial white space @@ -959,6 +957,7 @@ (let (case-fold-search) (save-excursion (beginning-of-line) + (back-to-indentation) (cond ((looking-at ksh-else-re) (ksh-match-indent-level ksh-if-re ksh-fi-re)) ((looking-at ksh-elif-re) @@ -981,14 +980,83 @@ ) )) -(defun ksh-get-compound-level + +(defun ksh-search-backward-sexp (sexp-re fence-post) + (let + ((old-pnt (point)) + (sentinal nil) + ) + (while + (progn + (if (not sentinal) + (backward-sexp 1)) + (and (> (point) fence-post) + (not sentinal)) + ) + (if (looking-at sexp-re) + (save-excursion ;avoid comment foolage + (let ((key-fence (point))) + (beginning-of-line) + (back-to-indentation) + (while (and (ksh-search-forward-sexp sexp-re key-fence) + (< (point) key-fence))) + + (if (= key-fence (point)) + (setq sentinal t)) + )) + )) + + (if (< (point) fence-post) + (progn (goto-char old-pnt) + nil) + t) + )) + +(defun ksh-forward-sexp () + "Special incantation to march over syntax expressions and +avoid all sorts of nonsense" + (if (char-equal ?< (char-syntax (char-after (point)))) + (end-of-line) + (if (char-equal ?. (char-syntax (char-after (point)))) + (forward-char) + (forward-sexp 1)) + ) + (if (eolp) + (forward-line)) + (skip-chars-forward ") \t") ;damn case + ) + +(defun ksh-search-forward-sexp (sexp-re fence-post) + "Search for an sexp. Return t on success with point at the +beginning of the sexp. Return nil on failure and restoring point +to it's original position" + (let + ((old-pnt (point)) + ) + (while (and (< (point) fence-post) + (not (looking-at sexp-re))) + (ksh-forward-sexp)) + + (if (> (point) fence-post) + (progn (goto-char old-pnt) + nil) + t) + )) + + +(defun ksh-get-compound-level (begin-re end-re anchor-point &optional balance-list) "Determine how much to indent this structure. Return a list (level line) of the matching compound command or nil if no match found." (let* (;; Locate the next compound begin keyword bounded by point-min - (match-point (if (re-search-backward begin-re (point-min) t) - (match-beginning 1) 0)) + (match-point + (if (and (ksh-search-backward-sexp begin-re (point-min)) + (>= (point) (point-min)) + ) + (point) + 0)) + (nest-column (if (zerop match-point) 1 (progn @@ -1002,16 +1070,21 @@ (if (nlistp balance-list) (setq balance-list (list))) ;; Now search forward from matching start keyword for end keyword + ;; which will locate interceding compound commands (while (and (consp nest-list) (zerop (cdr nest-list)) - (re-search-forward end-re anchor-point t)) + (ksh-search-forward-sexp end-re anchor-point) + (> anchor-point (point)) + ) (if (not (memq (point) balance-list)) (progn (setq balance-list (cons (point) balance-list)) (goto-char match-point) ;; beginning of compound cmd (setq nest-list (ksh-get-compound-level begin-re end-re - anchor-point balance-list)) - ))) + anchor-point balance-list)) + ) + (ksh-forward-sexp) + )) (cond ((consp nest-list) (if (zerop (cdr nest-list))
--- a/lisp/modes/lisp-mnt.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/modes/lisp-mnt.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,11 +1,11 @@ ;;; lisp-mnt.el --- minor mode for Emacs Lisp maintainers -;; Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc. +;; Copyright (C) 1992, 1994 Free Software Foundation, Inc. ;; Author: Eric S. Raymond <esr@snark.thyrsus.com> ;; Maintainer: Eric S. Raymond <esr@snark.thyrsus.com> ;; Created: 14 Jul 1992 -;; Version: $Id: lisp-mnt.el,v 1.1.1.1 1996/12/18 03:31:04 steve Exp $ +;; Version: $Id: lisp-mnt.el,v 1.1.1.2 1996/12/18 03:44:42 steve Exp $ ;; Keywords: docs ;; X-Modified-by: Bob Weiner <weiner@mot.com>, 4/14/95, to support InfoDock ;; headers. @@ -25,9 +25,10 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary: @@ -73,7 +74,7 @@ ;; line, or an address only, or the string "FSF". If there is no maintainer ;; line, the person(s) in the Author field are presumed to be it. The example ;; in this file is mildly bogus because the maintainer line is redundant. -;; The idea behind these two fields is to be able to write a lisp function +;; The idea behind these two fields is to be able to write a Lisp function ;; that does "send mail to the author" without having to mine the name out by ;; hand. Please be careful about surrounding the network address with <> if ;; there's also a name in the field. @@ -98,7 +99,7 @@ ;; for any real purpose; this is the way to safely add random headers ;; without invoking the wrath of any program. ;; -;; * Commentary line --- enables lisp code to find the developer's and +;; * Commentary line --- enables Lisp code to find the developer's and ;; maintainers' explanations of the package internals. ;; ;; * Change log line --- optional, exists to terminate the commentary @@ -120,73 +121,136 @@ (require 'picture) ; provides move-to-column-force (require 'emacsbug) +;;; Variables: + +(defvar lm-header-prefix "^;;*[ \t]+\\(@\(#\)\\)?[ \t]*\\([\$]\\)?" + "Prefix that is ignored before the tag. +For example, you can write the 1st line synopsis string and headers like this +in your Lisp package: + + ;; @(#) package.el -- pacakge description + ;; + ;; @(#) $Maintainer: Person Foo Bar $ + +The @(#) construct is used by unix what(1) and +then $identifier: doc string $ is used by GNU ident(1)") + +(defvar lm-comment-column 16 + "Column used for placing formatted output.") + +(defvar lm-commentary-header "Commentary\\|Documentation" + "Regexp which matches start of documentation section.") + +(defvar lm-history-header "Change Log\\|History" + "Regexp which matches the start of code log section.") + +;;; Functions: + ;; These functions all parse the headers of the current buffer -(defun lm-section-mark (hd &optional after) - ;; Return the buffer location of a given section start marker +(defsubst lm-get-header-re (header &optional mode) + "Returns regexp for matching HEADER. +If called with optional MODE and with value `section', +return section regexp instead." + (cond ((eq mode 'section) + (concat "^;;;;* " header ":[ \t]*$")) + (t + (concat lm-header-prefix header ":[ \t]*")))) + +(defsubst lm-get-package-name () + "Returns package name by looking at the first line." + (save-excursion + (goto-char (point-min)) + (if (and (looking-at (concat lm-header-prefix)) + (progn (goto-char (match-end 0)) + (looking-at "\\([^\t ]+\\)") + (match-end 1))) + (buffer-substring (match-beginning 1) (match-end 1)) + ))) + +(defun lm-section-mark (header &optional after) + "Return the buffer location of a given section start marker. +The HEADER is the section mark string to search for. +If AFTER is non-nil, return the location of the next line." (save-excursion (let ((case-fold-search t)) (goto-char (point-min)) - (if (re-search-forward (concat "^;;;* " hd "[:.][ \t\n]*") nil t) - (if after - (point) - (match-beginning 0)))))) + (if (re-search-forward (lm-get-header-re header 'section) nil t) + (progn + (beginning-of-line) + (if after (forward-line 1)) + (point)) + nil)))) -(defun lm-code-mark () - ;; Return the buffer location of the code start marker - (or (lm-section-mark "Code") - (save-excursion - (goto-char (point-min)) - (if (re-search-forward "^\(" nil t) - (match-beginning 0))))) +(defsubst lm-code-mark () + "Return the buffer location of the `Code' start marker." + (lm-section-mark "Code")) + +(defsubst lm-commentary-mark () + "Return the buffer location of the `Commentary' start marker." + (lm-section-mark lm-commentary-header)) -(defun lm-header (hd) - ;; Return the contents of a named header - (goto-char (point-min)) - (let ((case-fold-search t)) - (if (re-search-forward - (concat "^;; " hd ":[ \t]+\\(.*\\)") (lm-code-mark) t) - (buffer-substring (match-beginning 1) (match-end 1)) - nil))) +(defsubst lm-history-mark () + "Return the buffer location of the `History' start marker." + (lm-section-mark lm-history-header)) -(defun lm-header-multiline (hd) - ;; Return the contents of a named header, with possible continuation lines. - ;; Note -- the returned value is a list of strings, one per line. +(defun lm-header (header) + "Return the contents of the header named HEADER." + (goto-char (point-min)) + (let ((case-fold-search t)) + (if (and (re-search-forward (lm-get-header-re header) (lm-code-mark) t) + ;; RCS ident likes format "$identifier: data$" + (looking-at "\\([^$\n]+\\)") + (match-end 1)) + (buffer-substring (match-beginning 1) (match-end 1)) + nil))) + +(defun lm-header-multiline (header) + "Return the contents of the header named HEADER, with continuation lines. +The returned value is a list of strings, one per line." (save-excursion (goto-char (point-min)) - (let ((res (save-excursion (lm-header hd)))) - (if res - (progn - (forward-line 1) - (setq res (list res)) - (while (looking-at "^;;\t\\(.*\\)") - (setq res (cons (buffer-substring - (match-beginning 1) - (match-end 1)) - res)) - (forward-line 1)))) - res))) + (let ((res (lm-header header))) + (cond + (res + (setq res (list res)) + (forward-line 1) + + (while (and (looking-at (concat lm-header-prefix "[\t ]+")) + (progn + (goto-char (match-end 0)) + (looking-at "\\(.*\\)")) + (match-end 1)) + (setq res (cons (buffer-substring + (match-beginning 1) + (match-end 1)) + res)) + (forward-line 1)) + )) + res + ))) ;; These give us smart access to the header fields and commentary (defun lm-summary (&optional file) - ;; Return the buffer's or FILE's one-line summary. + "Return the one-line summary of file FILE, or current buffer if FILE is nil." (save-excursion (if file (find-file file)) (goto-char (point-min)) (prog1 - (if (or (looking-at "^;;; [^ ]+ ---[ \t]+\\(.*\\)") - (re-search-forward "^;; SUMMARY:[ \t]+\\(.*\\)" nil t)) + (if (and + (looking-at lm-header-prefix) + (progn (goto-char (match-end 0)) + (looking-at "[^ ]+[ \t]+--+[ \t]+\\(.*\\)"))) (buffer-substring (match-beginning 1) (match-end 1))) (if file (kill-buffer (current-buffer))) ))) - (defun lm-crack-address (x) - ;; Given a string containing a human and email address, parse it - ;; into a cons pair (name . address). + "Split up an email address into full name and real email address. +The value is a cons of the form (FULLNAME . ADDRESS)." (cond ((string-match "\\(.+\\) [(<]\\(\\S-+@\\S-+\\)[>)]" x) (cons (substring x (match-beginning 1) (match-end 1)) (substring x (match-beginning 2) (match-end 2)))) @@ -199,12 +263,13 @@ (cons x nil)))) (defun lm-authors (&optional file) - ;; Return the buffer's or FILE's author list. Each element of the - ;; list is a cons; the car is a name-aming-humans, the cdr an email - ;; address. + "Return the author list of file FILE, or current buffer if FILE is nil. +Each element of the list is a cons; the car is the full name, +the cdr is an email address." (save-excursion (if file (find-file file)) + ;; XEmacs change (Is E-MAIL an infodock header? -sb) (let* ((authorlist (lm-header-multiline "author")) (email-list (lm-header-multiline "E-MAIL")) (authors authorlist)) @@ -217,12 +282,12 @@ authors (cdr authors))) authorlist) (if file - (kill-buffer (current-buffer))))))) + (kill-buffer (current-buffer)))) + ))) (defun lm-maintainer (&optional file) - ;; Get a package's bug-report & maintenance address. Parse it out of FILE, - ;; or the current buffer if FILE is nil. - ;; The return value is a (name . address) cons. + "Return the maintainer of file FILE, or current buffer if FILE is nil. +The return value has the form (NAME . ADDRESS)." (save-excursion (if file (find-file file)) @@ -235,22 +300,23 @@ (kill-buffer (current-buffer)))))) (defun lm-creation-date (&optional file) - ;; Return a package's creation date, if any. Parse it out of FILE, - ;; or the current buffer if FILE is nil. + "Return the created date given in file FILE, or current buffer if FILE is nil." (save-excursion (if file (find-file file)) (prog1 + ;; XEmacs change (Is ORIG-DATE an Infodock header? -sb) (or (lm-header "created") (let ((date-and-time (lm-header "ORIG-DATE"))) (if date-and-time (substring date-and-time 0 (string-match " " date-and-time))))) (if file - (kill-buffer (current-buffer)))))) + (kill-buffer (current-buffer))) + ))) (defun lm-last-modified-date (&optional file) - ;; Return a package's last-modified date, if you can find one. + "Return the modify-date given in file FILE, or current buffer if FILE is nil." (save-excursion (if file (find-file file)) @@ -267,16 +333,18 @@ '("" "Jan" "Feb" "Mar" "Apr" "May" "Jun" "Jul" "Aug" "Sep" "Oct" "Nov" "Dec")) (buffer-substring (match-beginning 1) (match-end 1))) + ;; XEmacs change (Infodock change? -sb) (let ((date-and-time (lm-header "LAST-MOD"))) (if date-and-time (substring date-and-time 0 (string-match " " date-and-time))))) (if file - (kill-buffer (current-buffer)))))) + (kill-buffer (current-buffer))) + ))) (defun lm-version (&optional file) - ;; Return the package's version field. - ;; If none, look for an RCS or SCCS header to crack it out of. + "Return the version listed in file FILE, or current buffer if FILE is nil. +This can befound in an RCS or SCCS header to crack it out of." (save-excursion (if file (find-file file)) @@ -301,11 +369,11 @@ (t nil)))) (if file - (kill-buffer (current-buffer)))))) + (kill-buffer (current-buffer))) + ))) (defun lm-keywords (&optional file) - ;; Return the header containing the package's topic keywords. - ;; Parse them out of FILE, or the current buffer if FILE is nil. + "Return the keywords given in file FILE, or current buffer if FILE is nil." (save-excursion (if file (find-file file)) @@ -313,126 +381,183 @@ (let ((keywords (lm-header "keywords"))) (and keywords (downcase keywords))) (if file - (kill-buffer (current-buffer)))))) + (kill-buffer (current-buffer))) + ))) (defun lm-adapted-by (&optional file) - ;; Return the name or code of the person who cleaned up this package - ;; for distribution. Parse it out of FILE, or the current buffer if - ;; FILE is nil. + "Return the adapted-by names in file FILE, or current buffer if FILE is nil. +This is the name of the person who cleaned up this package for +distribution." (save-excursion (if file (find-file file)) (prog1 (lm-header "adapted-by") (if file - (kill-buffer (current-buffer)))))) + (kill-buffer (current-buffer))) + ))) (defun lm-commentary (&optional file) - ;; Return the commentary region of a file, as a string. + "Return the commentary in file FILE, or current buffer if FILE is nil. +The value is returned as a string. In the text, the commentary starts +with tag `Commentary' and ends with tag `Change Log' or `History'." (save-excursion (if file (find-file file)) (prog1 - (let ((commentary (lm-section-mark "Commentary" t)) - (end (lm-section-mark "Change Log"))) - (if commentary - (if end - (buffer-substring commentary end) - (setq end (lm-section-mark "Code")) - (buffer-substring commentary end)) + (let ((commentary (lm-commentary-mark)) + (change-log (lm-history-mark)) + (code (lm-code-mark)) + ) + (cond + ((and commentary change-log) + (buffer-substring commentary change-log)) + ((and commentary code) + (buffer-substring commentary code)) + (t + ;; XEmacs change (Infodock headers? -sb) (setq commentary (lm-section-mark "DESCRIPTION" t) - end (lm-section-mark "DESCRIP-END")) - (and commentary end (buffer-substring commentary end)))) + code (lm-section-mark "DESCRIP-END")) + (and commentary end (buffer-substring commentary code))))) (if file - (kill-buffer (current-buffer)))))) + (kill-buffer (current-buffer))) + ))) ;;; Verification and synopses -(defun insert-at-column (col &rest pieces) +(defun lm-insert-at-column (col &rest strings) + "Insert list of STRINGS, at column COL." (if (> (current-column) col) (insert "\n")) (move-to-column-force col) - (apply 'insert pieces)) + (apply 'insert strings)) + +(defun lm-verify (&optional file showok &optional verb) + "Check that the current buffer (or FILE if given) is in proper format. +If FILE is a directory, recurse on its files and generate a report in +a temporary buffer." + (interactive) + (let* ((verb (or verb (interactive-p))) + ret + name + ) + (if verb + (setq ret "Ok.")) ;init value -(defconst lm-comment-column 16) + (if (and file (file-directory-p file)) + (setq + ret + (progn + (switch-to-buffer (get-buffer-create "*lm-verify*")) + (erase-buffer) + (mapcar + '(lambda (f) + (if (string-match ".*\\.el$" f) + (let ((status (lm-verify f))) + (if status + (progn + (insert f ":") + (lm-insert-at-column lm-comment-column status "\n")) + (and showok + (progn + (insert f ":") + (lm-insert-at-column lm-comment-column "OK\n"))))))) + (directory-files file)) + )) + (save-excursion + (if file + (find-file file)) + (setq name (lm-get-package-name)) + + (setq + ret + (prog1 + (cond + ((null name) + "Can't find a package NAME") -(defun lm-verify (&optional file showok) - "Check that the current buffer (or FILE if given) is in proper format. -If FILE is a directory, recurse on its files and generate a report into -a temporary buffer." + ((not (lm-authors)) + "Author: tag missing.") + + ((not (lm-maintainer)) + "Maintainer: tag missing.") + + ((not (lm-summary)) + "Can't find a one-line 'Summary' description") + + ((not (lm-keywords)) + "Keywords: tag missing.") + + ((not (lm-commentary-mark)) + "Can't find a 'Commentary' section marker.") + + ((not (lm-history-mark)) + "Can't find a 'History' section marker.") + + ((not (lm-code-mark)) + "Can't find a 'Code' section marker") + + ((progn + (goto-char (point-max)) + (not + (re-search-backward + (concat "^;;;[ \t]+" name "[ \t]+ends here[ \t]*$" + "\\|^;;;[ \t]+ End of file[ \t]+" name) + nil t + ))) + (format "Can't find a footer line for [%s]" name)) + (t + ret)) + (if file + (kill-buffer (current-buffer))) + )))) + (if verb + (message ret)) + ret + )) + +(defun lm-synopsis (&optional file showall) + "Generate a synopsis listing for the buffer or the given FILE if given. +If FILE is a directory, recurse on its files and generate a report in +a temporary buffer. If SHOWALL is non-nil, also generate a line for files +which do not include a recognizable synopsis." + (interactive + (list + (read-file-name "Synopsis for (file or dir): "))) + (if (and file (file-directory-p file)) (progn (switch-to-buffer (get-buffer-create "*lm-verify*")) (erase-buffer) (mapcar - (function - (lambda (f) - (if (string-match ".*\\.el$" f) - (let ((status (lm-verify f))) - (if status - (progn - (insert f ":") - (insert-at-column lm-comment-column status "\n")) - (and showok - (progn - (insert f ":") - (insert-at-column lm-comment-column "OK\n"))))))) - (directory-files file)))) - (save-excursion - (if file - (find-file file)) - (prog1 - (cond - ((not (lm-summary)) - "Can't find a package summary") - ((not (lm-code-mark)) - "Can't find a code section marker") - ((progn - (goto-char (point-max)) - (forward-line -1) - (looking-at (concat ";;; " file "ends here"))) - "Can't find a footer line") - ) - (if file - (kill-buffer (current-buffer))))))) - -(defun lm-synopsis (&optional file showall) - "Generate a synopsis listing for the buffer or the given FILE if given. -If FILE is a directory, recurse on its files and generate a report into -a temporary buffer. If SHOWALL is on, also generate a line for files -which do not include a recognizable synopsis." - (if (and file (file-directory-p file)) - (progn - (switch-to-buffer (get-buffer-create "*lm-verify*")) - (erase-buffer) - (mapcar - (function - (lambda (f) + '(lambda (f) (if (string-match ".*\\.el$" f) (let ((syn (lm-synopsis f))) (if syn (progn (insert f ":") - (insert-at-column lm-comment-column syn "\n")) + (lm-insert-at-column lm-comment-column syn "\n")) (and showall (progn (insert f ":") - (insert-at-column lm-comment-column "NA\n")))))))) - (directory-files file))) + (lm-insert-at-column lm-comment-column "NA\n"))))))) + (directory-files file)) + ) (save-excursion (if file (find-file file)) (prog1 (lm-summary) (if file - (kill-buffer (current-buffer))))))) + (kill-buffer (current-buffer))) + )))) (defun lm-report-bug (topic) "Report a bug in the package currently being visited to its maintainer. Prompts for bug subject. Leaves you in a mail buffer." (interactive "sBug Subject: ") - (let ((package (buffer-name)) - (addr (lm-maintainer)) - (version (lm-version))) + (let ((package (lm-get-package-name)) + (addr (lm-maintainer)) + (version (lm-version))) (mail nil (if addr (concat (car addr) " <" (cdr addr) ">")
--- a/lisp/modes/lisp-mode.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/modes/lisp-mode.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,6 +1,6 @@ ;;; lisp-mode.el --- Lisp mode, and its idiosyncratic commands. -;; Copyright (C) 1985, 1993, 1994 Free Software Foundation, Inc. +;; Copyright (C) 1985, 1996 Free Software Foundation, Inc. ;; Copyright (C) 1995 Tinker Systems ;; Maintainer: FSF @@ -20,9 +20,10 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34 (but starting to diverge). ;;; Commentary: @@ -35,6 +36,7 @@ (defvar emacs-lisp-mode-syntax-table nil "") (defvar lisp-mode-abbrev-table nil "") +;; XEmacs change (defvar lisp-interaction-mode-popup-menu (purecopy '("Lisp Interaction Menu" ["Evaluate Last S-expression" eval-last-sexp t] @@ -98,6 +100,7 @@ (modify-syntax-entry ?\n "> " emacs-lisp-mode-syntax-table) ;; Give CR the same syntax as newline, for selective-display. (modify-syntax-entry ?\^m "> " emacs-lisp-mode-syntax-table) + ;; XEmacs change ;; Treat ^L as whitespace. (modify-syntax-entry ?\f " " emacs-lisp-mode-syntax-table) (modify-syntax-entry ?\; "< " emacs-lisp-mode-syntax-table) @@ -117,7 +120,9 @@ (if (not lisp-mode-syntax-table) (progn (setq lisp-mode-syntax-table (copy-syntax-table emacs-lisp-mode-syntax-table)) + (modify-syntax-entry ?\| "\" " lisp-mode-syntax-table) (modify-syntax-entry ?\[ "_ " lisp-mode-syntax-table) + ;; XEmacs changes (modify-syntax-entry ?\] "_ " lisp-mode-syntax-table) ;; ;; If emacs was compiled with NEW_SYNTAX, then do @@ -126,8 +131,8 @@ (progn (modify-syntax-entry ?# "' 58" lisp-mode-syntax-table) (modify-syntax-entry ?| ". 67" lisp-mode-syntax-table)) - ;; else, old style - (modify-syntax-entry ?\| "\" " lisp-mode-syntax-table)))) + ;; else, old style + (modify-syntax-entry ?\| "\" " lisp-mode-syntax-table)))) (define-abbrev-table 'lisp-mode-abbrev-table ()) @@ -144,8 +149,8 @@ ; "Imenu generic expression for Lisp mode. See `imenu-generic-expression'.") (defun lisp-mode-variables (lisp-syntax) - (if lisp-syntax - (set-syntax-table lisp-mode-syntax-table)) + (cond (lisp-syntax + (set-syntax-table lisp-mode-syntax-table))) (setq local-abbrev-table lisp-mode-abbrev-table) (make-local-variable 'paragraph-start) (setq paragraph-start (concat page-delimiter "\\|$" )) @@ -155,6 +160,11 @@ (setq paragraph-ignore-fill-prefix t) (make-local-variable 'fill-paragraph-function) (setq fill-paragraph-function 'lisp-fill-paragraph) + ;; Adaptive fill mode gets in the way of auto-fill, + ;; and should make no difference for explicit fill + ;; because lisp-fill-paragraph should do the job. + (make-local-variable 'adaptive-fill-mode) + (setq adaptive-fill-mode nil) (make-local-variable 'indent-line-function) (setq indent-line-function 'lisp-indent-line) (make-local-variable 'indent-region-function) @@ -163,14 +173,19 @@ (setq parse-sexp-ignore-comments t) (make-local-variable 'outline-regexp) (setq outline-regexp ";;; \\|(....") - (set (make-local-variable 'comment-start) ";") + (make-local-variable 'comment-start) + (setq comment-start ";") + ;; XEmacs change (set (make-local-variable 'block-comment-start) ";;") (make-local-variable 'comment-start-skip) - (setq comment-start-skip ";+[ \t]*") + ;; Look within the line for a ; following an even number of backslashes + ;; after either a non-backslash or the line beginning. + (setq comment-start-skip "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+ *") (make-local-variable 'comment-column) (setq comment-column 40) (make-local-variable 'comment-indent-function) (setq comment-indent-function 'lisp-comment-indent) + ;; XEmacs changes ; (make-local-variable 'imenu-generic-expression) ; (setq imenu-generic-expression lisp-imenu-generic-expression) (set (make-local-variable 'dabbrev-case-fold-search) nil) @@ -184,10 +199,11 @@ (if shared-lisp-mode-map () (setq shared-lisp-mode-map (make-sparse-keymap)) + ;; XEmacs changes (set-keymap-name shared-lisp-mode-map 'shared-lisp-mode-map) + (define-key shared-lisp-mode-map "\M-;" 'lisp-indent-for-comment) (define-key shared-lisp-mode-map "\e\C-q" 'indent-sexp) - (define-key shared-lisp-mode-map "\177" 'backward-delete-char-untabify) - (define-key shared-lisp-mode-map "\M-;" 'lisp-indent-for-comment)) + (define-key shared-lisp-mode-map "\177" 'backward-delete-char-untabify)) (defvar emacs-lisp-mode-map () "Keymap for Emacs Lisp mode. @@ -195,21 +211,41 @@ (if emacs-lisp-mode-map () + ;; XEmacs: Ignore FSF nconc stuff (setq emacs-lisp-mode-map (make-sparse-keymap)) (set-keymap-name emacs-lisp-mode-map 'emacs-lisp-mode-map) (set-keymap-parents emacs-lisp-mode-map (list shared-lisp-mode-map)) (define-key emacs-lisp-mode-map "\e\t" 'lisp-complete-symbol) - (define-key emacs-lisp-mode-map "\e\C-x" 'eval-defun)) + (define-key emacs-lisp-mode-map "\e\C-x" 'eval-defun) + ;; XEmacs: Not sure what the FSF menu bindings are. I hope XEmacs + ;; doesn't need them. +) (defun emacs-lisp-byte-compile () "Byte compile the file containing the current buffer." (interactive) (if buffer-file-name + ;; XEmacs change. Force buffer save first (progn (save-buffer) (byte-compile-file buffer-file-name)) (error "The buffer must be saved in a file first."))) +(defun emacs-lisp-byte-compile-and-load () + "Byte-compile the current file (if it has changed), then load compiled code." + (interactive) + (or buffer-file-name + (error "The buffer must be saved in a file first")) + (require 'bytecomp) + ;; Recompile if file or buffer has changed since last compilation. + (if (and (buffer-modified-p) + (y-or-n-p (format "save buffer %s first? " (buffer-name)))) + (save-buffer)) + (let ((compiled-file-name (byte-compile-dest-file buffer-file-name))) + (if (file-newer-than-file-p compiled-file-name buffer-file-name) + (load-file compiled-file-name) + (byte-compile-file buffer-file-name t)))) + (defun emacs-lisp-mode () "Major mode for editing Lisp code to run in Emacs. Commands: @@ -222,6 +258,7 @@ (kill-all-local-variables) (use-local-map emacs-lisp-mode-map) (set-syntax-table emacs-lisp-mode-syntax-table) + ;; XEmacs changes (setq major-mode 'emacs-lisp-mode mode-popup-menu emacs-lisp-mode-popup-menu mode-name "Emacs-Lisp") @@ -241,6 +278,7 @@ (if lisp-mode-map () + ;; XEmacs changes (setq lisp-mode-map (make-sparse-keymap)) (set-keymap-name lisp-mode-map 'lisp-mode-map) (set-keymap-parents lisp-mode-map (list shared-lisp-mode-map)) @@ -270,18 +308,20 @@ (run-hooks 'lisp-mode-hook)) ;; This will do unless shell.el is loaded. +;; XEmacs change (defun lisp-send-defun () "Send the current defun to the Lisp process made by \\[run-lisp]." (interactive) (error "Process lisp does not exist")) ;; XEmacs change: emacs-lisp-mode-map is a more appropriate parent. -(defvar lisp-interaction-mode-map nil +(defvar lisp-interaction-mode-map () "Keymap for Lisp Interaction moe. -All commands in `emacs-lisp-mode-map' are inherited by this map.") +All commands in `shared-lisp-mode-map' are inherited by this map.") (if lisp-interaction-mode-map () + ;; XEmacs set keymap our way (setq lisp-interaction-mode-map (make-sparse-keymap)) (set-keymap-name lisp-interaction-mode-map 'lisp-interaction-mode-map) (set-keymap-parents lisp-interaction-mode-map (list emacs-lisp-mode-map)) @@ -296,16 +336,18 @@ Commands: Delete converts tabs to spaces as it moves back. -Paragraphs are separated only by blank lines. Semicolons start comments. +Paragraphs are separated only by blank lines. +Semicolons start comments. \\{lisp-interaction-mode-map} Entry to this mode calls the value of `lisp-interaction-mode-hook' if that value is non-nil." (interactive) (kill-all-local-variables) (use-local-map lisp-interaction-mode-map) - (setq major-mode 'lisp-interaction-mode - mode-popup-menu lisp-interaction-mode-popup-menu - mode-name "Lisp Interaction") + (setq major-mode 'lisp-interaction-mode) + (setq mode-name "Lisp Interaction") + ;; XEmacs change + (setq mode-popup-menu lisp-interaction-mode-popup-menu) (set-syntax-table emacs-lisp-mode-syntax-table) (lisp-mode-variables nil) (run-hooks 'lisp-interaction-mode-hook)) @@ -318,6 +360,7 @@ (eval-last-sexp t) (terpri))) +;; XEmacs change (defun eval-interactive (expr) "Like `eval' except that it transforms defvars to defconsts." ;; by Stig@hackvan.com @@ -330,13 +373,14 @@ (message "")) (eval expr))) -(defun eval-last-sexp (eval-last-sexp-arg-internal) ;dynamic scoping wonderment +(defun eval-last-sexp (eval-last-sexp-arg-internal) "Evaluate sexp before point; print value in minibuffer. With argument, print output into current buffer." (interactive "P") (let ((standard-output (if eval-last-sexp-arg-internal (current-buffer) t)) (opoint (point))) (prin1 (let ((stab (syntax-table))) + ;; XEmacs change use eval-interactive not eval (eval-interactive (unwind-protect (save-excursion (set-syntax-table emacs-lisp-mode-syntax-table) @@ -346,16 +390,21 @@ (read (current-buffer)))) (set-syntax-table stab))))))) -(defun eval-defun (eval-defun-arg-internal) ;dynamic scoping wonderment +(defun eval-defun (eval-defun-arg-internal) "Evaluate defun that point is in or before. Print value in minibuffer. With argument, insert value in current buffer after the defun." (interactive "P") - (let ((standard-output (if eval-defun-arg-internal (current-buffer) t))) - (prin1 (eval-interactive (save-excursion - (end-of-defun) - (beginning-of-defun) - (read (current-buffer))))))) + ;; XEmacs: FSF version works, so use it + (let ((standard-output (if eval-defun-arg-internal (current-buffer) t)) + (form (save-excursion + (end-of-defun) + (beginning-of-defun) + (read (current-buffer))))) + (if (and (eq (car form) 'defvar) + (cdr-safe (cdr-safe form))) + (setq form (cons 'defconst (cdr form)))) + (prin1 (eval form)))) (defun lisp-comment-indent () (if (looking-at "\\s<\\s<\\s<") @@ -367,6 +416,7 @@ (max (if (bolp) 0 (1+ (current-column))) comment-column)))) +;; XEmacs change (defun lisp-indent-for-comment () "Indent this line's comment appropriately, or insert an empty comment. If adding a new comment on a blank line, use `block-comment-start' instead @@ -435,6 +485,7 @@ (save-excursion (beginning-of-line) (let ((indent-point (point)) + ;; XEmacs change (remove paren-depth) state ;;paren-depth ;; setting this to a number inhibits calling hook (desired-indent nil) @@ -449,6 +500,7 @@ ;; Find innermost containing sexp (while (and retry state + ;; XEmacs change (remove paren-depth) (> ;;(setq paren-depth (elt state 0)) (elt state 0) 0)) @@ -517,6 +569,7 @@ (not retry)) (or (funcall lisp-indent-function indent-point state) normal-indent)) + ;; XEmacs change: ;; lisp-indent-offset shouldn't override lisp-indent-function ! ((and (integerp lisp-indent-offset) containing-sexp) ;; Indent by constant offset @@ -551,7 +604,7 @@ (progn (forward-sexp 1) (point)))) method) (setq method (or (get (intern-soft function) 'lisp-indent-function) - (get (intern-soft function) 'lisp-indent-hook))) + (get (intern-soft function) 'lisp-indent-hook))) (cond ((or (eq method 'defun) (and (null method) (> (length function) 3) @@ -649,21 +702,15 @@ ENDPOS is encountered." (interactive) (let ((indent-stack (list nil)) - (next-depth 0) + (next-depth 0) ;; If ENDPOS is non-nil, use nil as STARTING-POINT ;; so that calculate-lisp-indent will find the beginning of ;; the defun we are in. ;; If ENDPOS is nil, it is safe not to scan before point ;; since every line we indent is more deeply nested than point is. (starting-point (if endpos nil (point))) - (last-point (point)) - last-depth - bol - (outer-loop-done nil) - inner-loop-done - state - this-indent) - ;; Get error now if we don't have a complete sexp after point. + (last-point (point)) + last-depth bol outer-loop-done inner-loop-done state this-indent) (or endpos ;; Get error now if we don't have a complete sexp after point. (save-excursion (forward-sexp 1))) @@ -700,15 +747,6 @@ (forward-line 1) (setcar (nthcdr 5 state) nil)) (setq inner-loop-done t))) -; Chuck had a comment here saying that the alternate code -; (the next sexp after this one) led to an infine loop. -; Since merging some changes in from FSF 19.30, I'm going -; to try going the FSF way and see what happens. -; (and endpos -; (while (<= next-depth 0) ;XEmacs change -; (setq indent-stack (append indent-stack (list nil))) -; (setq next-depth (1+ next-depth)) -; (setq last-depth (1+ last-depth)))) (and endpos (<= next-depth 0) (progn @@ -717,7 +755,7 @@ last-depth (- last-depth next-depth) next-depth 0))) (or outer-loop-done endpos - (setq outer-loop-done (<= next-depth 0))) + (setq outer-loop-done (<= next-depth 0))) (if outer-loop-done (forward-line 1) (while (> last-depth next-depth) @@ -739,9 +777,8 @@ (>= (car indent-stack) 0)) (setq this-indent (car indent-stack)) (let ((val (calculate-lisp-indent - (if (car indent-stack) - (- (car indent-stack)) - starting-point)))) + (if (car indent-stack) (- (car indent-stack)) + starting-point)))) (if (integerp val) (setcar indent-stack (setq this-indent val)) @@ -763,7 +800,6 @@ (lisp-indent-line)) (indent-sexp endmark) (set-marker endmark nil)))) - ;;;; Lisp paragraph filling commands. @@ -777,6 +813,9 @@ ;; Non-nil if the current line contains a comment. has-comment + ;; Non-nil if the current line contains code and a comment. + has-code-and-comment + ;; If has-comment, the appropriate fill-prefix for the comment. comment-fill-prefix ) @@ -795,50 +834,87 @@ ;; A line with some code, followed by a comment? Remember that the ;; semi which starts the comment shouldn't be part of a string or ;; character. - ((progn - (while (not (looking-at ";\\|$")) - (skip-chars-forward "^;\n\"\\\\?") - (cond - ((eq (char-after (point)) ?\\) (forward-char 2)) - ((memq (char-after (point)) '(?\" ??)) (forward-sexp 1)))) - (looking-at ";+[\t ]*")) - (setq has-comment t) + ;; XEmacs Try this the FSF and see if it works. +; ((progn +; (while (not (looking-at ";\\|$")) +; (skip-chars-forward "^;\n\"\\\\?") +; (cond +; ((eq (char-after (point)) ?\\) (forward-char 2)) +; ((memq (char-after (point)) '(?\" ??)) (forward-sexp 1)))) +; (looking-at ";+[\t ]*")) +; (setq has-comment t) + ((condition-case nil + (save-restriction + (narrow-to-region (point-min) + (save-excursion (end-of-line) (point))) + (while (not (looking-at ";\\|$")) + (skip-chars-forward "^;\n\"\\\\?") + (cond + ((eq (char-after (point)) ?\\) (forward-char 2)) + ((memq (char-after (point)) '(?\" ??)) (forward-sexp 1)))) + (looking-at ";+[\t ]*")) + (error nil)) + (setq has-comment t has-code-and-comment t) (setq comment-fill-prefix - (concat (make-string (current-column) ? ) + (concat (make-string (/ (current-column) 8) ?\t) + (make-string (% (current-column) 8) ?\ ) (buffer-substring (match-beginning 0) (match-end 0))))))) (if (not has-comment) (fill-paragraph justify) ;; Narrow to include only the comment, and then fill the region. - (save-restriction - (narrow-to-region - ;; Find the first line we should include in the region to fill. - (save-excursion - (while (and (zerop (forward-line -1)) - (looking-at "^[ \t]*;"))) - ;; We may have gone to far. Go forward again. - (or (looking-at "^[ \t]*;") - (forward-line 1)) - (point)) - ;; Find the beginning of the first line past the region to fill. - (save-excursion - (while (progn (forward-line 1) + (save-excursion + (save-restriction + (beginning-of-line) + (narrow-to-region + ;; Find the first line we should include in the region to fill. + (save-excursion + (while (and (zerop (forward-line -1)) (looking-at "^[ \t]*;"))) - (point))) + ;; We may have gone too far. Go forward again. + (or (looking-at ".*;") + (forward-line 1)) + (point)) + ;; Find the beginning of the first line past the region to fill. + (save-excursion + (while (progn (forward-line 1) + (looking-at "^[ \t]*;"))) + (point))) - ;; Lines with only semicolons on them can be paragraph boundaries. - (let ((paragraph-start (concat paragraph-start "\\|[ \t;]*$")) - (paragraph-separate (concat paragraph-start "\\|[ \t;]*$")) - (fill-prefix comment-fill-prefix)) - (fill-paragraph justify)))) + ;; Lines with only semicolons on them can be paragraph boundaries. + (let* ((paragraph-start (concat paragraph-start "\\|[ \t;]*$")) + (paragraph-separate (concat paragraph-start "\\|[ \t;]*$")) + (paragraph-ignore-fill-prefix nil) + (fill-prefix comment-fill-prefix) + (after-line (if has-code-and-comment + (save-excursion + (forward-line 1) (point)))) + (end (progn + (forward-paragraph) + (or (bolp) (newline 1)) + (point))) + ;; If this comment starts on a line with code, + ;; include that like in the filling. + (beg (progn (backward-paragraph) + (if (eq (point) after-line) + (forward-line -1)) + (point)))) + (fill-region-as-paragraph beg end + justify nil + (save-excursion + (goto-char beg) + (if (looking-at fill-prefix) + nil + (re-search-forward comment-start-skip) + (point)))))))) t)) - (defun indent-code-rigidly (start end arg &optional nochange-regexp) "Indent all lines of code, starting in the region, sideways by ARG columns. -Does not affect lines starting inside comments or strings, -assuming that the start of the region is not inside them. +Does not affect lines starting inside comments or strings, assuming that +the start of the region is not inside them. + Called from a program, takes args START, END, COLUMNS and NOCHANGE-REGEXP. The last is a regexp which, if matched at the beginning of a line, means don't indent that line."
--- a/lisp/modes/list-mode.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/modes/list-mode.el Mon Aug 13 08:46:35 2007 +0200 @@ -157,10 +157,12 @@ (defun list-mode-item-mouse-selected (event) (interactive "e") - (list-mode-item-selected-1 (extent-at (event-closest-point event) - (event-buffer event) - 'list-mode-item nil 'at) - event)) + ;; #### sometimes event-closest-point returns nil. + (let ((point (event-closest-point event))) + (list-mode-item-selected-1 (extent-at point + (event-buffer event) + 'list-mode-item nil 'at) + event))) (defun add-list-mode-item (start end &optional buffer activate-callback user-data)
--- a/lisp/modes/make-mode.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/modes/make-mode.el Mon Aug 13 08:46:35 2007 +0200 @@ -26,9 +26,10 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary: @@ -93,8 +94,8 @@ (provide 'makefile) ;; Sadly we need this for a macro. -;(eval-when-compile -; (require 'imenu)) +(eval-when-compile + (require 'imenu)) ;;; ------------------------------------------------------------ ;;; Configurable stuff @@ -179,7 +180,7 @@ you enter a \".\" at the beginning of a line in makefile-mode.") (defvar makefile-runtime-macros-list - '(("@") ("&") (">") ("<") ("*") ("^") ("?") ("%") ("$")) + '(("@") ("&") (">") ("<") ("*") ("^") ("+") ("?") ("%") ("$")) "List of macros that are resolved by make at runtime. If you insert a macro reference using makefile-insert-macro-ref, the name of the macro is checked against this list. If it can be found its name will @@ -206,8 +207,8 @@ ;#### ;(add-to-list 'facemenu-unlisted-faces 'makefile-space-face) ; Bogus FSFmacs crap. -(defvar makefile-space-face 'makefile-space-face) -; "Face to use for highlighting leading spaces in Font-Lock mode.") +(defvar makefile-space-face 'makefile-space-face + "Face to use for highlighting leading spaces in Font-Lock mode.") ;Older version of same. ;(defconst makefile-font-lock-keywords (purecopy @@ -234,10 +235,10 @@ (list makefile-macroassign-regex 1 'font-lock-variable-name-face) ;; ;; Variable references even in targets/strings/comments: - '("\\$[({]\\([a-zA-Z0-9_]+\\)[})]" 1 font-lock-reference-face t) + '("\\$[({]\\([a-zA-Z0-9_]+\\)[})]" 1 font-lock-reference-face prepend) ;; ;; Do dependencies. These get the function name face. - (list makefile-dependency-regex 1 'font-lock-function-name-face) + (list makefile-dependency-regex 1 'font-lock-function-name-face 'prepend) ;; Highlight lines that contain just whitespace. ;; They can cause trouble, especially if they start with a tab. @@ -245,7 +246,7 @@ ;; Highlight shell comments that Make treats as commands, ;; since these can fool people. - '("^\t+#" makefile-space-face t) + '("^\t+#" 0 makefile-space-face t) ;; Highlight spaces that precede tabs. ;; They can make a tab fail to be effective. @@ -321,6 +322,7 @@ (define-key makefile-mode-map "\M-n" 'makefile-next-dependency) (define-key makefile-mode-map "\e\t" 'makefile-complete)) +;; XEmacs change (defconst makefile-menubar-menu (purecopy '("Makefile" @@ -331,6 +333,7 @@ ["Complete Target or Macro" makefile-complete t] ["Pop up Makefile Browser" makefile-switch-to-browser t]))) +;; XEmacs change (defconst makefile-popup-menu (purecopy (cons "Makefile Mode Commands" @@ -409,6 +412,7 @@ ("notdir" "Names") ("suffix" "Names") ("basename" "Names") + ("addprefix" "Prefix" "Names") ("addsuffix" "Suffix" "Names") ("join" "List 1" "List 2") ("word" "Index" "Text") @@ -512,16 +516,18 @@ (make-local-variable 'makefile-need-macro-pickup) ;; Font lock. - (if (fboundp 'makefile-define-space-face) + (if (fboundp 'make-face) (makefile-define-space-face)) + (make-local-variable 'font-lock-defaults) + (setq font-lock-defaults '(makefile-font-lock-keywords)) ;; Add-log. (make-local-variable 'add-log-current-defun-function) (setq add-log-current-defun-function 'makefile-add-log-defun) -; ;; Imenu. -; (make-local-variable 'imenu-create-index-function) -; (setq imenu-create-index-function 'makefile-menu-index-function) + ;; Imenu. + (make-local-variable 'imenu-create-index-function) + (setq imenu-create-index-function 'makefile-menu-index-function) ;; Dabbrev. (make-local-variable 'dabbrev-abbrev-skip-leading-regexp) @@ -544,6 +550,7 @@ (set-syntax-table makefile-mode-syntax-table) ;; Set menu + ;; XEmacs addition (setq mode-popup-menu makefile-popup-menu) (if (featurep 'menubar) (progn @@ -893,7 +900,7 @@ (defun makefile-backslash-region (beg end arg) "Insert backslashes at end of every line in region. Useful for defining multi-line rules. -If called with a prefix argument, trailing backslahes are removed." +If called with a prefix argument, trailing backslashes are removed." (interactive "r\nP") (save-excursion (let ((do-lastline-p (progn (goto-char end) (not (bolp))))) @@ -1000,13 +1007,13 @@ (beginning-of-line) (if (makefile-browser-on-macro-line-p) (let ((macro-name (makefile-browser-this-line-macro-name))) - (kill-line) + (delete-region (point) (progn (end-of-line) (point))) (insert (makefile-browser-format-macro-line macro-name (makefile-browser-get-state-for-line this-line)))) (let ((target-name (makefile-browser-this-line-target-name))) - (kill-line) + (delete-region (point) (progn (end-of-line) (point))) (insert (makefile-browser-format-target-line target-name @@ -1359,43 +1366,55 @@ ;;; Support for other packages, like add-log and imenu. (defun makefile-add-log-defun () - ;; "Return name of target or macro point is in, or nil." + "Return name of target or variable assignment that point is in. +If it isn't in one, return nil." (save-excursion - (beginning-of-line) - (cond - ((looking-at makefile-macroassign-regex) - (buffer-substring (match-beginning 1) - (match-end 1))) - ((progn - (or (eobp) (forward-char)) - (re-search-backward makefile-dependency-regex nil t)) - (buffer-substring (match-beginning 1) - (match-end 1))) - (t nil)))) + (let (found) + (beginning-of-line) + ;; Scan back line by line, noticing when we come to a + ;; variable or rule definition, and giving up when we see + ;; a line that is not part of either of those. + (while (not found) + (cond + ((looking-at makefile-macroassign-regex) + (setq found (buffer-substring-no-properties (match-beginning 1) + (match-end 1)))) + ((looking-at makefile-dependency-regex) + (setq found (buffer-substring-no-properties (match-beginning 1) + (match-end 1)))) + ;; Don't keep looking across a blank line or comment. Give up. + ((looking-at "$\\|#") + (setq found 'bobp)) + ((bobp) + (setq found 'bobp))) + (or found + (forward-line -1))) + (if (stringp found) found)))) -;;; FIXME it might be nice to have them separated by macro vs target. -;(defun makefile-menu-index-function () -; ;; "Generate alist of indices for imenu." -; (let (alist -; stupid -; (re (concat makefile-dependency-regex -; "\\|" -; makefile-macroassign-regex))) -; (imenu-progress-message stupid 0) -; (goto-char (point-min)) -; (while (re-search-forward re nil t) -; (imenu-progress-message stupid) -; (let ((n (if (match-beginning 1) 1 5))) -; (setq alist (cons -; (cons (buffer-substring (match-beginning n) -; (match-end n)) -; (match-beginning n)) -; alist)))) -; (imenu-progress-message stupid 100) -; (nreverse alist))) +;; FIXME it might be nice to have them separated by macro vs target. +(defun makefile-menu-index-function () + ;; "Generate alist of indices for imenu." + (let (alist + stupid + (re (concat makefile-dependency-regex + "\\|" + makefile-macroassign-regex))) + (imenu-progress-message stupid 0) + (goto-char (point-min)) + (while (re-search-forward re nil t) + (imenu-progress-message stupid) + (let ((n (if (match-beginning 1) 1 5))) + (setq alist (cons + (cons (buffer-substring (match-beginning n) + (match-end n)) + (match-beginning n)) + alist)))) + (imenu-progress-message stupid 100) + (nreverse alist))) (defun makefile-define-space-face () (make-face 'makefile-space-face) + ;; XEmacs change (let* ((light-bg t)) ; #### (set-face-background 'makefile-space-face (if light-bg "black" "white")
--- a/lisp/modes/modula2.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/modes/modula2.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,16 +1,46 @@ ;;; modula2.el --- Modula-2 editing support package + +;; Author: Michael Schmidt <michael@pbinfo.UUCP> +;; Tom Perrine <Perrin@LOGICON.ARPA> ;; Keywords: languages -; Author Mick Jordan -; amended Peter Robinson -; ported to GNU Michael Schmidt -;;;From: "Michael Schmidt" <michael@pbinfo.UUCP> -;;;Modified by Tom Perrine <Perrin@LOGICON.ARPA> (TEP) +;; This file is part of XEmacs. + +;; XEmacs 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. + +;; XEmacs 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 XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. + +;;; Synched up with: FSF 19.34. +;; The authors distributed this without a copyright notice +;; back in 1988, so it is in the public domain. The original included +;; the following credit: -;;; Added by TEP +;; Author Mick Jordan +;; amended Peter Robinson + +;;; Commentary: + +;; A major mode for editing Modula-2 code. It provides convenient abbrevs +;; for Modula-2 keywords, knows about the standard layout rules, and supports +;; a native compile command. + +;;; Code: + +;;; Added by Tom Perrine (TEP) (defvar m2-mode-syntax-table nil - "Syntax table in use in Modula-2-mode buffers.") + "Syntax table in use in Modula-2 buffers.") (defvar m2-compile-command "m2c" "Command to compile Modula-2 programs") @@ -79,28 +109,28 @@ ;;;###autoload (defun modula-2-mode () -"This is a mode intended to support program development in Modula-2. -All control constructs of Modula-2 can be reached by typing -Control-C followed by the first character of the construct. -\\{m2-mode-map} - Control-c b begin Control-c c case - Control-c d definition Control-c e else - Control-c f for Control-c h header - Control-c i if Control-c m module - Control-c l loop Control-c o or - Control-c p procedure Control-c Control-w with - Control-c r record Control-c s stdio - Control-c t type Control-c u until - Control-c v var Control-c w while - Control-c x export Control-c y import - Control-c { begin-comment Control-c } end-comment - Control-c Control-z suspend-emacs Control-c Control-t toggle - Control-c Control-c compile Control-x ` next-error - Control-c Control-l link + "This is a mode intended to support program development in Modula-2. +All control constructs of Modula-2 can be reached by typing C-c +followed by the first character of the construct. +\\<m2-mode-map> + \\[m2-begin] begin \\[m2-case] case + \\[m2-definition] definition \\[m2-else] else + \\[m2-for] for \\[m2-header] header + \\[m2-if] if \\[m2-module] module + \\[m2-loop] loop \\[m2-or] or + \\[m2-procedure] procedure Control-c Control-w with + \\[m2-record] record \\[m2-stdio] stdio + \\[m2-type] type \\[m2-until] until + \\[m2-var] var \\[m2-while] while + \\[m2-export] export \\[m2-import] import + \\[m2-begin-comment] begin-comment \\[m2-end-comment] end-comment + \\[suspend-emacs] suspend Emacs \\[m2-toggle] toggle + \\[m2-compile] compile \\[m2-next-error] next-error + \\[m2-link] link - m2-indent controls the number of spaces for each indentation. - m2-compile-command holds the command to compile a Modula-2 program. - m2-link-command holds the command to link a Modula-2 program." + `m2-indent' controls the number of spaces for each indentation. + `m2-compile-command' holds the command to compile a Modula-2 program. + `m2-link-command' holds the command to link a Modula-2 program." (interactive) (kill-all-local-variables) (use-local-map m2-mode-map) @@ -112,7 +142,7 @@ (setq end-comment-column 75) (set-syntax-table m2-mode-syntax-table) (make-local-variable 'paragraph-start) - (setq paragraph-start (concat "^$\\|" page-delimiter)) + (setq paragraph-start (concat "$\\|" page-delimiter)) (make-local-variable 'paragraph-separate) (setq paragraph-separate paragraph-start) (make-local-variable 'paragraph-ignore-fill-prefix) @@ -129,8 +159,8 @@ (setq comment-column 41) (make-local-variable 'comment-start-skip) (setq comment-start-skip "/\\*+ *") - (make-local-variable 'comment-indent-hook) - (setq comment-indent-hook 'c-comment-indent) + (make-local-variable 'comment-indent-function) + (setq comment-indent-function 'c-comment-indent) (make-local-variable 'parse-sexp-ignore-comments) (setq parse-sexp-ignore-comments t) (run-hooks 'm2-mode-hook)) @@ -155,7 +185,7 @@ (m2-tab)) (defun m2-case () - "Build skeleton CASE statment, prompting for the <expression>." + "Build skeleton CASE statement, prompting for the <expression>." (interactive) (let ((name (read-string "Case-Expression: "))) (insert "CASE " name " OF") @@ -183,7 +213,7 @@ (m2-tab)) (defun m2-for () - "Build skeleton FOR loop statment, prompting for the loop parameters." + "Build skeleton FOR loop statement, prompting for the loop parameters." (interactive) (insert "FOR ") (let ((name (read-string "Loop Initialiser: ")) limit by) @@ -213,7 +243,7 @@ (insert "*)\n\n")) (defun m2-if () - "Insert skeleton IF statment, prompting for <boolean-expression>." + "Insert skeleton IF statement, prompting for <boolean-expression>." (interactive) (insert "IF ") (let ((thecondition (read-string "<boolean-expression>: "))) @@ -306,14 +336,14 @@ (defun m2-stdio () (interactive) (insert " ->FROM TextIO IMPORT +FROM TextIO IMPORT WriteCHAR, ReadCHAR, WriteINTEGER, ReadINTEGER, WriteCARDINAL, ReadCARDINAL, WriteBOOLEAN, ReadBOOLEAN, WriteREAL, ReadREAL, WriteBITSET, ReadBITSET, WriteBasedCARDINAL, ReadBasedCARDINAL, WriteChars, ReadChars, WriteString, ReadString, WhiteSpace, EndOfLine; ->FROM SysStreams IMPORT sysIn, sysOut, sysErr; +FROM SysStreams IMPORT sysIn, sysOut, sysErr; ")) @@ -387,7 +417,7 @@ (setq m2-link-name (read-string "Name of executable: " modulename)))))) -(defun execute-monitor-command (command) +(defun m2-execute-monitor-command (command) (let* ((shell shell-file-name) (csh (equal (file-name-nondirectory shell) "csh"))) (call-process shell nil t t "-cf" (concat "exec " command)))) @@ -401,7 +431,7 @@ (setq modulename (read-string "Module name: ")) (switch-to-buffer "*Command Execution*") - (execute-monitor-command (concat "m2whereis " modulename)) + (m2-execute-monitor-command (concat "m2whereis " modulename)) (goto-char (point-min)) (condition-case () (progn (re-search-forward "\\(.*\\.def\\) *$") @@ -439,3 +469,5 @@ ((string-equal (substring (buffer-name) -3) ".md") (find-file-other-window (concat (substring (buffer-name) 0 -3) ".mi"))))) + +;;; modula2.el ends here
--- a/lisp/modes/nroff-mode.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/modes/nroff-mode.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,6 +1,6 @@ ;;; nroff-mode.el --- GNU Emacs major mode for editing nroff source -;; Copyright (C) 1985, 1986 Free Software Foundation, Inc. +;; Copyright (C) 1985, 1986, 1994, 1995 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: wp @@ -19,7 +19,10 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. + +;;; Synched up with: FSF 19.34. ;;; Commentary: @@ -29,10 +32,14 @@ ;; a command to count text lines (excluding nroff constructs), a command ;; to center a line, and movement commands that know how to skip macros. +;; Paragraph filling and line-counting currently don't respect comments, +;; as they should. + ;;; Code: (defvar nroff-mode-abbrev-table nil "Abbrev table used while in nroff mode.") +(define-abbrev-table 'nroff-mode-abbrev-table ()) (defvar nroff-mode-map nil "Major mode keymap for nroff mode.") @@ -46,6 +53,32 @@ (define-key nroff-mode-map "\en" 'forward-text-line) (define-key nroff-mode-map "\ep" 'backward-text-line))) +(defvar nroff-mode-syntax-table nil + "Syntax table used while in nroff mode.") + +(defvar nroff-font-lock-keywords + (list + ;; Directives are . or ' at start of line, followed by + ;; optional whitespace, then command (which my be longer than + ;; 2 characters in groff). Perhaps the arguments should be + ;; fontified as well. + "^[.']\\s-*\\sw+" + ;; There are numerous groff escapes; the following get things + ;; like \-, \(em (standard troff) and \f[bar] (groff + ;; variants). This won't currently do groff's \A'foo' and + ;; the like properly. One might expect it to highlight an escape's + ;; arguments in common cases, like \f. + (concat "\\\\" ; backslash + "\\(" ; followed by various possibilities + (mapconcat 'identity + '("[f*n]*\\[.+]" ; some groff extensions + "(.." ; two chars after ( + "[^(\"]" ; single char escape + ) "\\|") + "\\)") + ) + "Font-lock highlighting control in nroff-mode.") + ;;;###autoload (defun nroff-mode () "Major mode for editing text intended for nroff to format. @@ -58,17 +91,33 @@ (use-local-map nroff-mode-map) (setq mode-name "Nroff") (setq major-mode 'nroff-mode) - (set-syntax-table text-mode-syntax-table) + (if nroff-mode-syntax-table + () + (setq nroff-mode-syntax-table (copy-syntax-table text-mode-syntax-table)) + ;; " isn't given string quote syntax in text-mode but it + ;; (arguably) should be for use round nroff arguments (with ` and + ;; ' used otherwise). + (modify-syntax-entry ?\" "\" 2" nroff-mode-syntax-table) + ;; Comments are delimited by \" and newline. + (modify-syntax-entry ?\\ "\\ 1" nroff-mode-syntax-table) + (modify-syntax-entry ?\n "> 1" nroff-mode-syntax-table)) + (set-syntax-table nroff-mode-syntax-table) + (make-local-variable 'font-lock-defaults) + (setq font-lock-defaults '(nroff-font-lock-keywords nil t)) (setq local-abbrev-table nroff-mode-abbrev-table) (make-local-variable 'nroff-electric-mode) (setq nroff-electric-mode nil) + (make-local-variable 'outline-regexp) + (setq outline-regexp "\\.H[ ]+[1-7]+ ") + (make-local-variable 'outline-level) + (setq outline-level 'nroff-outline-level) ;; now define a bunch of variables for use by commands in this mode (make-local-variable 'page-delimiter) (setq page-delimiter "^\\.\\(bp\\|SK\\|OP\\)") (make-local-variable 'paragraph-start) - (setq paragraph-start (concat "^[.']\\|" paragraph-start)) + (setq paragraph-start (concat "[.']\\|" paragraph-start)) (make-local-variable 'paragraph-separate) - (setq paragraph-separate (concat "^[.']\\|" paragraph-separate)) + (setq paragraph-separate (concat "[.']\\|" paragraph-separate)) ;; comment syntax added by mit-erl!gildea 18 Apr 86 (make-local-variable 'comment-start) (setq comment-start "\\\" ") @@ -80,6 +129,12 @@ (setq comment-indent-function 'nroff-comment-indent) (run-hooks 'text-mode-hook 'nroff-mode-hook)) +(defun nroff-outline-level () + (save-excursion + (looking-at outline-regexp) + (skip-chars-forward ".H ") + (string-to-int (buffer-substring (point) (+ 1 (point)))))) + ;;; Compute how much to indent a comment in nroff/troff source. ;;; By mit-erl!gildea April 86 (defun nroff-comment-indent ()
--- a/lisp/modes/outline.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/modes/outline.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,10 +1,10 @@ ;;; outline.el --- outline mode commands for Emacs ;; Copyright (C) 1986, 1993, 1994 Free Software Foundation, Inc. + +;; Maintainer: FSF ;; Keywords: outlines -;; Maintainer: Tim Bradshaw <tfb@ed.ac.uk> - ;; This file is part of XEmacs. ;; XEmacs is free software; you can redistribute it and/or modify it @@ -19,7 +19,10 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. + +;;; Synched up with: FSF 19.34. ;;; Commentary: @@ -27,10 +30,6 @@ ;; An outline can be `abstracted' to show headers at any given level, ;; with all stuff below hidden. See the Emacs manual for details. -;; This is taken from the FSF 19.23 outline.el and modified to work -;; with XEmacs 19.10+. Changes are marked with a comment with -;; `#+XEmacs' in it. --tfb - ;;; Code: ;; Jan '86, Some new features added by Peter Desnoyers and rewritten by RMS. @@ -46,6 +45,7 @@ (or (default-value 'outline-regexp) (setq-default outline-regexp "[*\^L]+")) +;; XEmacs change (defvar outline-heading-end-regexp (purecopy "[\n\^M]") "*Regular expression to match the end of a heading line. You can assume that point is at the beginning of a heading when this @@ -53,30 +53,87 @@ The recommended way to set this is with a \"Local Variables:\" list in the file it applies to.") +;; XEmacs: There is no point in doing this differently now. -sb +(defvar outline-mode-prefix-map nil) + +(if outline-mode-prefix-map + nil + (setq outline-mode-prefix-map (make-sparse-keymap)) + (define-key outline-mode-prefix-map "\C-n" 'outline-next-visible-heading) + (define-key outline-mode-prefix-map "\C-p" 'outline-previous-visible-heading) + (define-key outline-mode-prefix-map "\C-i" 'show-children) + (define-key outline-mode-prefix-map "\C-s" 'show-subtree) + (define-key outline-mode-prefix-map "\C-d" 'hide-subtree) + (define-key outline-mode-prefix-map "\C-u" 'outline-up-heading) + (define-key outline-mode-prefix-map "\C-f" 'outline-forward-same-level) + (define-key outline-mode-prefix-map "\C-b" 'outline-backward-same-level) + (define-key outline-mode-prefix-map "\C-t" 'hide-body) + (define-key outline-mode-prefix-map "\C-a" 'show-all) + (define-key outline-mode-prefix-map "\C-c" 'hide-entry) + (define-key outline-mode-prefix-map "\C-e" 'show-entry) + (define-key outline-mode-prefix-map "\C-l" 'hide-leaves) + (define-key outline-mode-prefix-map "\C-k" 'show-branches) + (define-key outline-mode-prefix-map "\C-q" 'hide-sublevels) + (define-key outline-mode-prefix-map "\C-o" 'hide-other)) + +(defvar outline-mode-menu-bar-map nil) +(if outline-mode-menu-bar-map + nil + (setq outline-mode-menu-bar-map (make-sparse-keymap)) + + (define-key outline-mode-menu-bar-map [hide] + (cons "Hide" (make-sparse-keymap "Hide"))) + + (define-key outline-mode-menu-bar-map [hide hide-other] + '("Hide Other" . hide-other)) + (define-key outline-mode-menu-bar-map [hide hide-sublevels] + '("Hide Sublevels" . hide-sublevels)) + (define-key outline-mode-menu-bar-map [hide hide-subtree] + '("Hide Subtree" . hide-subtree)) + (define-key outline-mode-menu-bar-map [hide hide-entry] + '("Hide Entry" . hide-entry)) + (define-key outline-mode-menu-bar-map [hide hide-body] + '("Hide Body" . hide-body)) + (define-key outline-mode-menu-bar-map [hide hide-leaves] + '("Hide Leaves" . hide-leaves)) + + (define-key outline-mode-menu-bar-map [show] + (cons "Show" (make-sparse-keymap "Show"))) + + (define-key outline-mode-menu-bar-map [show show-subtree] + '("Show Subtree" . show-subtree)) + (define-key outline-mode-menu-bar-map [show show-children] + '("Show Children" . show-children)) + (define-key outline-mode-menu-bar-map [show show-branches] + '("Show Branches" . show-branches)) + (define-key outline-mode-menu-bar-map [show show-entry] + '("Show Entry" . show-entry)) + (define-key outline-mode-menu-bar-map [show show-all] + '("Show All" . show-all)) + + (define-key outline-mode-menu-bar-map [headings] + (cons "Headings" (make-sparse-keymap "Headings"))) + + (define-key outline-mode-menu-bar-map [headings outline-backward-same-level] + '("Previous Same Level" . outline-backward-same-level)) + (define-key outline-mode-menu-bar-map [headings outline-forward-same-level] + '("Next Same Level" . outline-forward-same-level)) + (define-key outline-mode-menu-bar-map [headings outline-previous-visible-heading] + '("Previous" . outline-previous-visible-heading)) + (define-key outline-mode-menu-bar-map [headings outline-next-visible-heading] + '("Next" . outline-next-visible-heading)) + (define-key outline-mode-menu-bar-map [headings outline-up-heading] + '("Up" . outline-up-heading))) + (defvar outline-mode-map nil "") (if outline-mode-map nil - ;; #+XEmacs: this replaces some horrid nconcing in FSF - (setq outline-mode-map (make-sparse-keymap)) - (set-keymap-name outline-mode-map 'outline-mode-map) - (set-keymap-parents outline-mode-map (list text-mode-map)) - (define-key outline-mode-map "\C-c\C-n" 'outline-next-visible-heading) - (define-key outline-mode-map "\C-c\C-p" 'outline-previous-visible-heading) - (define-key outline-mode-map "\C-c\C-i" 'show-children) - (define-key outline-mode-map "\C-c\C-s" 'show-subtree) - (define-key outline-mode-map "\C-c\C-d" 'hide-subtree) - (define-key outline-mode-map "\C-c\C-u" 'outline-up-heading) - (define-key outline-mode-map "\C-c\C-f" 'outline-forward-same-level) - (define-key outline-mode-map "\C-c\C-b" 'outline-backward-same-level) - (define-key outline-mode-map "\C-c\C-t" 'hide-body) - (define-key outline-mode-map "\C-c\C-a" 'show-all) - (define-key outline-mode-map "\C-c\C-c" 'hide-entry) - (define-key outline-mode-map "\C-c\C-e" 'show-entry) - (define-key outline-mode-map "\C-c\C-l" 'hide-leaves) - (define-key outline-mode-map "\C-c\C-k" 'show-branches) - (define-key outline-mode-map "\C-c\C-q" 'hide-sublevels) - (define-key outline-mode-map "\C-c\C-o" 'hide-other)) + ;; XEmacs change + ;(setq outline-mode-map (nconc (make-sparse-keymap) text-mode-map)) + (setq outline-mode-map (make-sparse-keymap 'text-mode-map)) + (define-key outline-mode-map "\C-c" outline-mode-prefix-map) + (define-key outline-mode-map [menu-bar] outline-mode-menu-bar-map)) ;;; #+XEmacs (defvar outline-mode-menu @@ -140,6 +197,20 @@ ;;;###autoload (add-minor-mode 'outline-minor-mode " Outl") +(defvar outline-font-lock-keywords + '(;; Highlight headings according to the level. + ("^\\(\\*+\\)[ \t]*\\(.+\\)?[ \t]*$" + (1 font-lock-string-face) + (2 (let ((len (- (match-end 1) (match-beginning 1)))) + (or (cdr (assq len '((1 . font-lock-function-name-face) + (2 . font-lock-keyword-face) + (3 . font-lock-comment-face)))) + font-lock-variable-name-face)) + nil t)) + ;; Highlight citations of the form [1] and [Mar94]. + ("\\[\\([A-Z][A-Za-z]+\\)*[0-9]+\\]" . font-lock-type-face)) + "Additional expressions to highlight in Outline mode.") + ;;;###autoload (defun outline-mode () "Set major mode for editing outlines with selective display. @@ -190,28 +261,35 @@ (setq local-abbrev-table text-mode-abbrev-table) (set-syntax-table text-mode-syntax-table) (make-local-variable 'paragraph-start) - (setq paragraph-start (concat paragraph-start "\\|^\\(" + (setq paragraph-start (concat paragraph-start "\\|\\(" outline-regexp "\\)")) ;; Inhibit auto-filling of header lines. (make-local-variable 'auto-fill-inhibit-regexp) (setq auto-fill-inhibit-regexp outline-regexp) (make-local-variable 'paragraph-separate) - (setq paragraph-separate (concat paragraph-separate "\\|^\\(" + (setq paragraph-separate (concat paragraph-separate "\\|\\(" outline-regexp "\\)")) ;; #+XEmacs (outline-install-menubar) + (make-local-variable 'font-lock-defaults) + (setq font-lock-defaults '(outline-font-lock-keywords t)) + (make-local-variable 'change-major-mode-hook) (add-hook 'change-major-mode-hook 'show-all) (run-hooks 'text-mode-hook 'outline-mode-hook)) -(defvar outline-minor-mode-prefix "\C-c\C-o" - "*Prefix key to use for Outline commands in Outline minor mode.") +(defvar outline-minor-mode-prefix "\C-c@" + "*Prefix key to use for Outline commands in Outline minor mode. +The value of this variable is checked as part of loading Outline mode. +After that, changing the prefix key requires manipulating keymaps.") (defvar outline-minor-mode-map nil) (if outline-minor-mode-map nil (setq outline-minor-mode-map (make-sparse-keymap)) + (define-key outline-minor-mode-map [menu-bar] + outline-mode-menu-bar-map) (define-key outline-minor-mode-map outline-minor-mode-prefix - (lookup-key outline-mode-map "\C-c"))) + outline-mode-prefix-map)) (or (assq 'outline-minor-mode minor-mode-map-alist) (setq minor-mode-map-alist @@ -233,13 +311,16 @@ ;; #+XEmacs (outline-install-menubar) (run-hooks 'outline-minor-mode-hook)) - (setq selective-display nil) - ;; When turning off outline mode, get rid of any ^M's. - (or outline-minor-mode - (outline-flag-region (point-min) (point-max) ?\n)) - (set-buffer-modified-p (buffer-modified-p)) - ;; #+XEmacs - (outline-install-menubar 'remove))) + (setq selective-display nil)) + ;; When turning off outline mode, get rid of any ^M's. + (or outline-minor-mode + (outline-flag-region (point-min) (point-max) ?\n)) + ;; XEmacs change + (set-buffer-modified-p (buffer-modified-p)) + ;; #+XEmacs + (outline-install-menubar 'remove) + ;; XEmacs change + (redraw-modeline)) (defvar outline-level 'outline-level "Function of no args to compute a header's nesting level in an outline. @@ -253,19 +334,20 @@ (defun outline-level () "Return the depth to which a statement is nested in the outline. Point must be at the beginning of a header line. This is actually -the column number of the end of what `outline-regexp' matches." +the number of characters that `outline-regexp' matches." (save-excursion (looking-at outline-regexp) (- (match-end 0) (match-beginning 0)))) (defun outline-next-preface () - "Skip forward to just before the next heading line." + "Skip forward to just before the next heading line. +If there's no following heading line, stop before the newline +at the end of the buffer." (if (re-search-forward (concat "[\n\^M]\\(" outline-regexp "\\)") nil 'move) - (progn - (goto-char (match-beginning 0)) - (if (memq (preceding-char) '(?\n ?\^M)) - (forward-char -1))))) + (goto-char (match-beginning 0))) + (if (memq (preceding-char) '(?\n ?\^M)) + (forward-char -1))) (defun outline-next-heading () "Move to the next (possibly invisible) heading line." @@ -406,7 +488,8 @@ "Hide everything except for the current body and the parent headings." (interactive) (hide-sublevels 1) - (let ((last (point))) + (let ((last (point)) + (pos (point))) (while (save-excursion (and (re-search-backward "[\n\r]" nil t) (eq (following-char) ?\r))) @@ -429,7 +512,8 @@ (defun outline-end-of-subtree () (outline-back-to-heading) - (let ((first t) + (let ((opoint (point)) + (first t) (level (funcall outline-level))) (while (and (not (eobp)) (or first (> (funcall outline-level) level)))
--- a/lisp/modes/prolog.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/modes/prolog.el Mon Aug 13 08:46:35 2007 +0200 @@ -21,7 +21,7 @@ ;; along with XEmacs; see the file COPYING. If not, write to the Free ;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: Not synched with FSF, we appear to have a newer version ;;; Commentary:
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/modes/python-mode.el Mon Aug 13 08:46:35 2007 +0200 @@ -0,0 +1,2379 @@ +;;; python-mode.el --- Major mode for editing Python programs + +;; Copyright (C) 1992,1993,1994 Tim Peters + +;; Author: 1995-1996 Barry A. Warsaw +;; 1992-1994 Tim Peters +;; Maintainer: python-mode@python.org +;; Created: Feb 1992 +;; Version: 2.67 +;; Last Modified: 1996/08/01 20:11:51 +;; Keywords: python languages oop + +;; This software is provided as-is, without express or implied +;; warranty. Permission to use, copy, modify, distribute or sell this +;; software, without fee, for any purpose and by any individual or +;; organization, is hereby granted, provided that the above copyright +;; notice and this paragraph appear in all copies. + +;;; Commentary: +;; + +;; This is a major mode for editing Python programs. It was developed +;; by Tim Peters after an original idea by Michael A. Guravage. Tim +;; left the net for a while and in the interim, Barry Warsaw has +;; undertaken maintenance of the mode. + +;; At some point this mode will undergo a rewrite to bring it more in +;; line with GNU Emacs Lisp coding standards, and to wax all the Emacs +;; 18 support. But all in all, the mode works exceedingly well, and +;; I've simply been tweaking it as I go along. Ain't it wonderful +;; that Python has a much more sane syntax than C? (or <shudder> C++?! +;; :-). I can say that; I maintain cc-mode! + +;; The following statements, placed in your .emacs file or +;; site-init.el, will cause this file to be autoloaded, and +;; python-mode invoked, when visiting .py files (assuming this file is +;; in your load-path): +;; +;; (autoload 'python-mode "python-mode" "Python editing mode." t) +;; (setq auto-mode-alist +;; (cons '("\\.py$" . python-mode) auto-mode-alist)) +;; +;; If you want font-lock support for Python source code (a.k.a. syntax +;; coloring, highlighting), add this to your .emacs file: +;; +;; (add-hook 'python-mode-hook 'turn-on-font-lock) +;; +;; But you better be sure you're version of Emacs supports +;; font-lock-mode! As of this writing, the latest Emacs and XEmacs +;; 19's do. + +;; Here's a brief list of recent additions/improvements/changes: +;; +;; - Wrapping and indentation within triple quote strings now works. +;; - `Standard' bug reporting mechanism (use C-c C-b) +;; - py-mark-block was moved to C-c C-m +;; - C-c C-v shows you the python-mode version +;; - a basic python-font-lock-keywords has been added for (X)Emacs 19 +;; - proper interaction with pending-del and del-sel modes. +;; - Better support for outdenting: py-electric-colon (:) and +;; py-indent-line (TAB) improvements; one level of outdentation +;; added after a return, raise, break, or continue statement +;; - New py-electric-colon (:) command for improved outdenting Also +;; py-indent-line (TAB) should handle outdented lines better +;; - improved (I think) C-c > and C-c < +;; - py-(forward|backward)-into-nomenclature, not bound, but useful on +;; M-f and M-b respectively. +;; - integration with imenu by Perry A. Stoll <stoll@atr-sw.atr.co.jp> +;; - py-indent-offset now defaults to 4 +;; - new variable py-honor-comment-indentation +;; - comment-region bound to C-c # +;; - py-delete-char obeys numeric arguments +;; - Small modification to rule for "indenting comment lines", such +;; lines must now also be indented less than or equal to the +;; indentation of the previous statement. + +;; Here's a brief to do list: +;; +;; - Better integration with gud-mode for debugging. +;; - Rewrite according to GNU Emacs Lisp standards. +;; - possibly force indent-tabs-mode == nil, and add a +;; write-file-hooks that runs untabify on the whole buffer (to work +;; around potential tab/space mismatch problems). In practice this +;; hasn't been a problem... yet. +;; - have py-execute-region on indented code act as if the region is +;; left justified. Avoids syntax errors. + +;; If you can think of more things you'd like to see, drop me a line. +;; If you want to report bugs, use py-submit-bug-report (C-c C-b). +;; +;; Note that I only test things on XEmacs 19 and to some degree on +;; Emacs 19. If you port stuff to FSF Emacs 19, or Emacs 18, please +;; send me your patches. Byte compiler complaints can probably be +;; safely ignored. + +;;; Code: + + +;; user definable variables +;; vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv + +(defvar py-python-command "python" + "*Shell command used to start Python interpreter.") + +(defvar py-indent-offset 4 + "*Indentation increment. +Note that `\\[py-guess-indent-offset]' can usually guess a good value +when you're editing someone else's Python code.") + +(defvar py-align-multiline-strings-p t + "*Flag describing how multiline triple quoted strings are aligned. +When this flag is non-nil, continuation lines are lined up under the +preceding line's indentation. When this flag is nil, continuation +lines are aligned to column zero.") + +(defvar py-block-comment-prefix "## " + "*String used by \\[comment-region] to comment out a block of code. +This should follow the convention for non-indenting comment lines so +that the indentation commands won't get confused (i.e., the string +should be of the form `#x...' where `x' is not a blank or a tab, and +`...' is arbitrary).") + +(defvar py-honor-comment-indentation t + "*Controls how comment lines influence subsequent indentation. + +When nil, all comment lines are skipped for indentation purposes, and +in Emacs 19, a faster algorithm is used. + +When t, lines that begin with a single `#' are a hint to subsequent +line indentation. If the previous line is such a comment line (as +opposed to one that starts with `py-block-comment-prefix'), then it's +indentation is used as a hint for this line's indentation. Lines that +begin with `py-block-comment-prefix' are ignored for indentation +purposes. + +When not nil or t, comment lines that begin with a `#' are used as +indentation hints, unless the comment character is in column zero.") + +(defvar py-scroll-process-buffer t + "*Scroll Python process buffer as output arrives. +If nil, the Python process buffer acts, with respect to scrolling, like +Shell-mode buffers normally act. This is surprisingly complicated and +so won't be explained here; in fact, you can't get the whole story +without studying the Emacs C code. + +If non-nil, the behavior is different in two respects (which are +slightly inaccurate in the interest of brevity): + + - If the buffer is in a window, and you left point at its end, the + window will scroll as new output arrives, and point will move to the + buffer's end, even if the window is not the selected window (that + being the one the cursor is in). The usual behavior for shell-mode + windows is not to scroll, and to leave point where it was, if the + buffer is in a window other than the selected window. + + - If the buffer is not visible in any window, and you left point at + its end, the buffer will be popped into a window as soon as more + output arrives. This is handy if you have a long-running + computation and don't want to tie up screen area waiting for the + output. The usual behavior for a shell-mode buffer is to stay + invisible until you explicitly visit it. + +Note the `and if you left point at its end' clauses in both of the +above: you can `turn off' the special behaviors while output is in +progress, by visiting the Python buffer and moving point to anywhere +besides the end. Then the buffer won't scroll, point will remain where +you leave it, and if you hide the buffer it will stay hidden until you +visit it again. You can enable and disable the special behaviors as +often as you like, while output is in progress, by (respectively) moving +point to, or away from, the end of the buffer. + +Warning: If you expect a large amount of output, you'll probably be +happier setting this option to nil. + +Obscure: `End of buffer' above should really say `at or beyond the +process mark', but if you know what that means you didn't need to be +told <grin>.") + +(defvar py-temp-directory + (let ((ok '(lambda (x) + (and x + (setq x (expand-file-name x)) ; always true + (file-directory-p x) + (file-writable-p x) + x)))) + (or (funcall ok (getenv "TMPDIR")) + (funcall ok "/usr/tmp") + (funcall ok "/tmp") + (funcall ok ".") + (error + "Couldn't find a usable temp directory -- set py-temp-directory"))) + "*Directory used for temp files created by a *Python* process. +By default, the first directory from this list that exists and that you +can write into: the value (if any) of the environment variable TMPDIR, +/usr/tmp, /tmp, or the current directory.") + +(defvar py-beep-if-tab-change t + "*Ring the bell if tab-width is changed. +If a comment of the form + + \t# vi:set tabsize=<number>: + +is found before the first code line when the file is entered, and the +current value of (the general Emacs variable) `tab-width' does not +equal <number>, `tab-width' is set to <number>, a message saying so is +displayed in the echo area, and if `py-beep-if-tab-change' is non-nil +the Emacs bell is also rung as a warning.") + +(defconst python-font-lock-keywords + (let* ((keywords '("access" "and" "break" "class" + "continue" "def" "del" "elif" + "else:" "except" "except:" "exec" + "finally:" "for" "from" "global" + "if" "import" "in" "is" + "lambda" "not" "or" "pass" + "print" "raise" "return" "try:" + "while" + )) + (kwregex (mapconcat 'identity keywords "\\|"))) + (list + ;; keywords not at beginning of line + (cons (concat "\\s-\\(" kwregex "\\)[ \n\t(]") 1) + ;; keywords at beginning of line. i don't think regexps are + ;; powerful enough to handle these two cases in one regexp. + ;; prove me wrong! + (cons (concat "^\\(" kwregex "\\)[ \n\t(]") 1) + ;; classes + '("\\bclass[ \t]+\\([a-zA-Z_]+[a-zA-Z0-9_]*\\)" + 1 font-lock-type-face) + ;; functions + '("\\bdef[ \t]+\\([a-zA-Z_]+[a-zA-Z0-9_]*\\)" + 1 font-lock-function-name-face) + )) + "Additional expressions to highlight in Python mode.") + +(defvar imenu-example--python-show-method-args-p nil + "*Controls echoing of arguments of functions & methods in the imenu buffer. +When non-nil, arguments are printed.") + + + +;; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +;; NO USER DEFINABLE VARIABLES BEYOND THIS POINT + +(make-variable-buffer-local 'py-indent-offset) + +;; Differentiate between Emacs 18, Lucid Emacs, and Emacs 19. This +;; seems to be the standard way of checking this. +;; BAW - This is *not* the right solution. When at all possible, +;; instead of testing for the version of Emacs, use feature tests. + +(setq py-this-is-lucid-emacs-p (string-match "Lucid\\|XEmacs" emacs-version)) +(setq py-this-is-emacs-19-p + (and + (not py-this-is-lucid-emacs-p) + (string-match "^19\\." emacs-version))) + +;; have to bind py-file-queue before installing the kill-emacs hook +(defvar py-file-queue nil + "Queue of Python temp files awaiting execution. +Currently-active file is at the head of the list.") + +;; define a mode-specific abbrev table for those who use such things +(defvar python-mode-abbrev-table nil + "Abbrev table in use in `python-mode' buffers.") +(define-abbrev-table 'python-mode-abbrev-table nil) + +(defvar python-mode-hook nil + "*Hook called by `python-mode'.") + +;; in previous version of python-mode.el, the hook was incorrectly +;; called py-mode-hook, and was not defvar'd. deprecate its use. +(and (fboundp 'make-obsolete-variable) + (make-obsolete-variable 'py-mode-hook 'python-mode-hook)) + +(defvar py-mode-map () + "Keymap used in `python-mode' buffers.") + +(if py-mode-map + () + (setq py-mode-map (make-sparse-keymap)) + + ;; shadow global bindings for newline-and-indent w/ the py- version. + ;; BAW - this is extremely bad form, but I'm not going to change it + ;; for now. + (mapcar (function (lambda (key) + (define-key + py-mode-map key 'py-newline-and-indent))) + (where-is-internal 'newline-and-indent)) + + ;; BAW - you could do it this way, but its not considered proper + ;; major-mode form. + (mapcar (function + (lambda (x) + (define-key py-mode-map (car x) (cdr x)))) + '((":" . py-electric-colon) + ("\C-c\C-c" . py-execute-buffer) + ("\C-c|" . py-execute-region) + ("\C-c!" . py-shell) + ("\177" . py-delete-char) + ("\n" . py-newline-and-indent) + ("\C-c:" . py-guess-indent-offset) + ("\C-c\t" . py-indent-region) + ("\C-c\C-l" . py-shift-region-left) + ("\C-c\C-r" . py-shift-region-right) + ("\C-c<" . py-shift-region-left) + ("\C-c>" . py-shift-region-right) + ("\C-c\C-n" . py-next-statement) + ("\C-c\C-p" . py-previous-statement) + ("\C-c\C-u" . py-goto-block-up) + ("\C-c\C-m" . py-mark-block) + ("\C-c#" . py-comment-region) + ("\C-c?" . py-describe-mode) + ("\C-c\C-hm" . py-describe-mode) + ("\e\C-a" . beginning-of-python-def-or-class) + ("\e\C-e" . end-of-python-def-or-class) + ( "\e\C-h" . mark-python-def-or-class))) + ;; should do all keybindings this way + (define-key py-mode-map "\C-c\C-b" 'py-submit-bug-report) + (define-key py-mode-map "\C-c\C-v" 'py-version) + ) + +(defvar py-mode-syntax-table nil + "Syntax table used in `python-mode' buffers.") + +(if py-mode-syntax-table + () + (setq py-mode-syntax-table (make-syntax-table)) + ;; BAW - again, blech. + (mapcar (function + (lambda (x) (modify-syntax-entry + (car x) (cdr x) py-mode-syntax-table))) + '(( ?\( . "()" ) ( ?\) . ")(" ) + ( ?\[ . "(]" ) ( ?\] . ")[" ) + ( ?\{ . "(}" ) ( ?\} . "){" ) + ;; fix operator symbols misassigned in the std table + ( ?\$ . "." ) ( ?\% . "." ) ( ?\& . "." ) + ( ?\* . "." ) ( ?\+ . "." ) ( ?\- . "." ) + ( ?\/ . "." ) ( ?\< . "." ) ( ?\= . "." ) + ( ?\> . "." ) ( ?\| . "." ) + ;; for historical reasons, underscore is word class + ;; instead of symbol class. it should be symbol class, + ;; but if you're tempted to change it, try binding M-f and + ;; M-b to py-forward-into-nomenclature and + ;; py-backward-into-nomenclature instead. -baw + ( ?\_ . "w" ) ; underscore is legit in words + ( ?\' . "\"") ; single quote is string quote + ( ?\" . "\"" ) ; double quote is string quote too + ( ?\` . "$") ; backquote is open and close paren + ( ?\# . "<") ; hash starts comment + ( ?\n . ">")))) ; newline ends comment + +(defconst py-stringlit-re + (concat + "'\\([^'\n\\]\\|\\\\.\\)*'" ; single-quoted + "\\|" ; or + "\"\\([^\"\n\\]\\|\\\\.\\)*\"") ; double-quoted + "Regexp matching a Python string literal.") + +;; this is tricky because a trailing backslash does not mean +;; continuation if it's in a comment +(defconst py-continued-re + (concat + "\\(" "[^#'\"\n\\]" "\\|" py-stringlit-re "\\)*" + "\\\\$") + "Regexp matching Python lines that are continued via backslash.") + +(defconst py-blank-or-comment-re "[ \t]*\\($\\|#\\)" + "Regexp matching blank or comment lines.") + +(defconst py-outdent-re + (concat "\\(" (mapconcat 'identity + '("else:" + "except\\(\\s +.*\\)?:" + "finally:" + "elif\\s +.*:") + "\\|") + "\\)") + "Regexp matching clauses to be outdented one level.") + +(defconst py-no-outdent-re + (concat "\\(" (mapconcat 'identity + '("try:" + "except\\(\\s +.*\\)?:" + "while\\s +.*:" + "for\\s +.*:" + "if\\s +.*:" + "elif\\s +.*:") + "\\|") + "\\)") + "Regexp matching lines to not outdent after.") + + +;; Menu definitions, only relevent if you have the easymenu.el package +;; (standard in the latest Emacs 19 and XEmacs 19 distributions). +(if (condition-case nil + (require 'easymenu) + (error nil)) + (easy-menu-define + py-menu py-mode-map "Python Mode menu" + '("Python" + ["Comment Out Region" comment-region (mark)] + ["Uncomment Region" (comment-region (point) (mark) '(4)) (mark)] + "-" + ["Mark current block" py-mark-block t] + ["Mark current def" mark-python-def-or-class t] + ["Mark current class" (mark-python-def-or-class t) t] + "-" + ["Shift region left" py-shift-region-left (mark)] + ["Shift region right" py-shift-region-right (mark)] + "-" + ["Execute buffer" py-execute-buffer t] + ["Execute region" py-execute-region (mark)] + ["Start interpreter..." py-shell t] + "-" + ["Go to start of block" py-goto-block-up t] + ["Go to start of class" (beginning-of-python-def-or-class t) t] + ["Move to end of class" (end-of-python-def-or-class t) t] + ["Move to start of def" beginning-of-python-def-or-class t] + ["Move to end of def" end-of-python-def-or-class t] + "-" + ["Describe mode" py-describe-mode t] + ))) + + + +;; imenu definitions, courtesy of Perry A. Stoll <stoll@atr-sw.atr.co.jp> +(defvar imenu-example--python-class-regexp + (concat ; <<classes>> + "\\(" ; + "^[ \t]*" ; newline and maybe whitespace + "\\(class[ \t]+[a-zA-Z0-9_]+\\)" ; class name + ; possibly multiple superclasses + "\\([ \t]*\\((\\([a-zA-Z0-9_, \t\n]\\)*)\\)?\\)" + "[ \t]*:" ; and the final : + "\\)" ; >>classes<< + ) + "Regexp for Python classes for use with the imenu package." + ) + +(defvar imenu-example--python-method-regexp + (concat ; <<methods and functions>> + "\\(" ; + "^[ \t]*" ; new line and maybe whitespace + "\\(def[ \t]+" ; function definitions start with def + "\\([a-zA-Z0-9_]+\\)" ; name is here + ; function arguments... + "[ \t]*(\\([a-zA-Z0-9_=,\* \t\n]*\\))" + "\\)" ; end of def + "[ \t]*:" ; and then the : + "\\)" ; >>methods and functions<< + ) + "Regexp for Python methods/functions for use with the imenu package." + ) + +(defvar imenu-example--python-method-no-arg-parens '(2 8) + "Indicies into groups of the Python regexp for use with imenu. + +Using these values will result in smaller imenu lists, as arguments to +functions are not listed. + +See the variable `imenu-example--python-show-method-args-p' for more +information.") + +(defvar imenu-example--python-method-arg-parens '(2 7) + "Indicies into groups of the Python regexp for use with imenu. +Using these values will result in large imenu lists, as arguments to +functions are listed. + +See the variable `imenu-example--python-show-method-args-p' for more +information.") + +;; Note that in this format, this variable can still be used with the +;; imenu--generic-function. Otherwise, there is no real reason to have +;; it. +(defvar imenu-example--generic-python-expression + (cons + (concat + imenu-example--python-class-regexp + "\\|" ; or... + imenu-example--python-method-regexp + ) + imenu-example--python-method-no-arg-parens) + "Generic Python expression which may be used directly with imenu. +Used by setting the variable `imenu-generic-expression' to this value. +Also, see the function \\[imenu-example--create-python-index] for a +better alternative for finding the index.") + +;; These next two variables are used when searching for the python +;; class/definitions. Just saving some time in accessing the +;; generic-python-expression, really. +(defvar imenu-example--python-generic-regexp) +(defvar imenu-example--python-generic-parens) + + +;;;###autoload +(eval-when-compile + ;; Imenu isn't used in XEmacs, so just ignore load errors + (condition-case () + (progn + (require 'cl) + (require 'imenu)) + (error nil))) + +(defun imenu-example--create-python-index () + "Python interface function for imenu package. +Finds all python classes and functions/methods. Calls function +\\[imenu-example--create-python-index-engine]. See that function for +the details of how this works." + (setq imenu-example--python-generic-regexp + (car imenu-example--generic-python-expression)) + (setq imenu-example--python-generic-parens + (if imenu-example--python-show-method-args-p + imenu-example--python-method-arg-parens + imenu-example--python-method-no-arg-parens)) + (goto-char (point-min)) + (imenu-example--create-python-index-engine nil)) + +(defun imenu-example--create-python-index-engine (&optional start-indent) + "Function for finding imenu definitions in Python. + +Finds all definitions (classes, methods, or functions) in a Python +file for the imenu package. + +Returns a possibly nested alist of the form + + (INDEX-NAME . INDEX-POSITION) + +The second element of the alist may be an alist, producing a nested +list as in + + (INDEX-NAME . INDEX-ALIST) + +This function should not be called directly, as it calls itself +recursively and requires some setup. Rather this is the engine for +the function \\[imenu-example--create-python-index]. + +It works recursively by looking for all definitions at the current +indention level. When it finds one, it adds it to the alist. If it +finds a definition at a greater indentation level, it removes the +previous definition from the alist. In it's place it adds all +definitions found at the next indentation level. When it finds a +definition that is less indented then the current level, it retuns the +alist it has created thus far. + +The optional argument START-INDENT indicates the starting indentation +at which to continue looking for Python classes, methods, or +functions. If this is not supplied, the function uses the indentation +of the first definition found." + (let ((index-alist '()) + (sub-method-alist '()) + looking-p + def-name prev-name + cur-indent def-pos + (class-paren (first imenu-example--python-generic-parens)) + (def-paren (second imenu-example--python-generic-parens))) + (setq looking-p + (re-search-forward imenu-example--python-generic-regexp + (point-max) t)) + (while looking-p + (save-excursion + ;; used to set def-name to this value but generic-extract-name is + ;; new to imenu-1.14. this way it still works with imenu-1.11 + ;;(imenu--generic-extract-name imenu-example--python-generic-parens)) + (let ((cur-paren (if (match-beginning class-paren) + class-paren def-paren))) + (setq def-name + (buffer-substring (match-beginning cur-paren) + (match-end cur-paren)))) + (beginning-of-line) + (setq cur-indent (current-indentation))) + + ;; HACK: want to go to the next correct definition location. we + ;; explicitly list them here. would be better to have them in a + ;; list. + (setq def-pos + (or (match-beginning class-paren) + (match-beginning def-paren))) + + ;; if we don't have a starting indent level, take this one + (or start-indent + (setq start-indent cur-indent)) + + ;; if we don't have class name yet, take this one + (or prev-name + (setq prev-name def-name)) + + ;; what level is the next definition on? must be same, deeper + ;; or shallower indentation + (cond + ;; at the same indent level, add it to the list... + ((= start-indent cur-indent) + + ;; if we don't have push, use the following... + ;;(setf index-alist (cons (cons def-name def-pos) index-alist)) + (push (cons def-name def-pos) index-alist)) + + ;; deeper indented expression, recur... + ((< start-indent cur-indent) + + ;; the point is currently on the expression we're supposed to + ;; start on, so go back to the last expression. The recursive + ;; call will find this place again and add it to the correct + ;; list + (re-search-backward imenu-example--python-generic-regexp + (point-min) 'move) + (setq sub-method-alist (imenu-example--create-python-index-engine + cur-indent)) + + (if sub-method-alist + ;; we put the last element on the index-alist on the start + ;; of the submethod alist so the user can still get to it. + (let ((save-elmt (pop index-alist))) + (push (cons (imenu-create-submenu-name prev-name) + (cons save-elmt sub-method-alist)) + index-alist)))) + + ;; found less indented expression, we're done. + (t + (setq looking-p nil) + (re-search-backward imenu-example--python-generic-regexp + (point-min) t))) + (setq prev-name def-name) + (and looking-p + (setq looking-p + (re-search-forward imenu-example--python-generic-regexp + (point-max) 'move)))) + (nreverse index-alist))) + + +;;;###autoload +(defun python-mode () + "Major mode for editing Python files. +To submit a problem report, enter `\\[py-submit-bug-report]' from a +`python-mode' buffer. Do `\\[py-describe-mode]' for detailed +documentation. To see what version of `python-mode' you are running, +enter `\\[py-version]'. + +This mode knows about Python indentation, tokens, comments and +continuation lines. Paragraphs are separated by blank lines only. + +COMMANDS +\\{py-mode-map} +VARIABLES + +py-indent-offset\t\tindentation increment +py-block-comment-prefix\t\tcomment string used by comment-region +py-python-command\t\tshell command to invoke Python interpreter +py-scroll-process-buffer\t\talways scroll Python process buffer +py-temp-directory\t\tdirectory used for temp files (if needed) +py-beep-if-tab-change\t\tring the bell if tab-width is changed" + (interactive) + (kill-all-local-variables) + (set-syntax-table py-mode-syntax-table) + (setq major-mode 'python-mode + mode-name "Python" + local-abbrev-table python-mode-abbrev-table) + (use-local-map py-mode-map) + ;; add the menu + (if py-menu + (easy-menu-add py-menu)) + ;; Emacs 19 requires this + (if (or py-this-is-lucid-emacs-p py-this-is-emacs-19-p) + (setq comment-multi-line nil)) + ;; BAW -- style... + (mapcar (function (lambda (x) + (make-local-variable (car x)) + (set (car x) (cdr x)))) + '((paragraph-separate . "^[ \t]*$") + (paragraph-start . "^[ \t]*$") + (require-final-newline . t) + (comment-start . "# ") + (comment-start-skip . "# *") + (comment-column . 40) + (indent-region-function . py-indent-region) + (indent-line-function . py-indent-line))) + ;; hack to allow overriding the tabsize in the file (see tokenizer.c) + ;; + ;; not sure where the magic comment has to be; to save time + ;; searching for a rarity, we give up if it's not found prior to the + ;; first executable statement. + ;; + ;; BAW - on first glance, this seems like complete hackery. Why was + ;; this necessary, and is it still necessary? + (let ((case-fold-search nil) + (start (point)) + new-tab-width) + (if (re-search-forward + "^[ \t]*#[ \t]*vi:set[ \t]+tabsize=\\([0-9]+\\):" + (prog2 (py-next-statement 1) (point) (goto-char 1)) + t) + (progn + (setq new-tab-width + (string-to-int + (buffer-substring (match-beginning 1) (match-end 1)))) + (if (= tab-width new-tab-width) + nil + (setq tab-width new-tab-width) + (message "Caution: tab-width changed to %d" new-tab-width) + (if py-beep-if-tab-change (beep))))) + (goto-char start)) + + ;; install imenu + (setq imenu-create-index-function + (function imenu-example--create-python-index)) + (if (fboundp 'imenu-add-to-menubar) + (imenu-add-to-menubar (format "%s-%s" "IM" mode-name))) + + ;; run the mode hook. py-mode-hook use is deprecated + (if python-mode-hook + (run-hooks 'python-mode-hook) + (run-hooks 'py-mode-hook))) + + +(defun py-keep-region-active () + ;; do whatever is necessary to keep the region active in XEmacs. + ;; Ignore byte-compiler warnings you might see. Also note that + ;; FSF's Emacs 19 does it differently and doesn't its policy doesn't + ;; require us to take explicit action. + (and (boundp 'zmacs-region-stays) + (setq zmacs-region-stays t))) + + +;; electric characters +(defun py-outdent-p () + ;; returns non-nil if the current line should outdent one level + (save-excursion + (and (progn (back-to-indentation) + (looking-at py-outdent-re)) + (progn (backward-to-indentation 1) + (while (or (looking-at py-blank-or-comment-re) + (bobp)) + (backward-to-indentation 1)) + (not (looking-at py-no-outdent-re))) + ))) + + +(defun py-electric-colon (arg) + "Insert a colon. +In certain cases the line is outdented appropriately. If a numeric +argument is provided, that many colons are inserted non-electrically. +Electric behavior is inhibited inside a string or comment." + (interactive "P") + (self-insert-command (prefix-numeric-value arg)) + ;; are we in a string or comment? + (if (save-excursion + (let ((pps (parse-partial-sexp (save-excursion + (beginning-of-python-def-or-class) + (point)) + (point)))) + (not (or (nth 3 pps) (nth 4 pps))))) + (save-excursion + (let ((here (point)) + (outdent 0) + (indent (py-compute-indentation))) + (if (and (not arg) + (py-outdent-p) + (= indent (save-excursion + (forward-line -1) + (py-compute-indentation))) + ) + (setq outdent py-indent-offset)) + ;; Don't indent, only outdent. This assumes that any lines that + ;; are already outdented relative to py-compute-indentation were + ;; put there on purpose. Its highly annoying to have `:' indent + ;; for you. Use TAB, C-c C-l or C-c C-r to adjust. TBD: Is + ;; there a better way to determine this??? + (if (< (current-indentation) indent) nil + (goto-char here) + (beginning-of-line) + (delete-horizontal-space) + (indent-to (- indent outdent)) + ))))) + + +;;; Functions that execute Python commands in a subprocess +(defun py-shell () + "Start an interactive Python interpreter in another window. +This is like Shell mode, except that Python is running in the window +instead of a shell. See the `Interactive Shell' and `Shell Mode' +sections of the Emacs manual for details, especially for the key +bindings active in the `*Python*' buffer. + +See the docs for variable `py-scroll-buffer' for info on scrolling +behavior in the process window. + +Warning: Don't use an interactive Python if you change sys.ps1 or +sys.ps2 from their default values, or if you're running code that +prints `>>> ' or `... ' at the start of a line. `python-mode' can't +distinguish your output from Python's output, and assumes that `>>> ' +at the start of a line is a prompt from Python. Similarly, the Emacs +Shell mode code assumes that both `>>> ' and `... ' at the start of a +line are Python prompts. Bad things can happen if you fool either +mode. + +Warning: If you do any editing *in* the process buffer *while* the +buffer is accepting output from Python, do NOT attempt to `undo' the +changes. Some of the output (nowhere near the parts you changed!) may +be lost if you do. This appears to be an Emacs bug, an unfortunate +interaction between undo and process filters; the same problem exists in +non-Python process buffers using the default (Emacs-supplied) process +filter." + ;; BAW - should undo be disabled in the python process buffer, if + ;; this bug still exists? + (interactive) + (if py-this-is-emacs-19-p + (progn + (require 'comint) + (switch-to-buffer-other-window + (make-comint "Python" py-python-command))) + (progn + (require 'shell) + (switch-to-buffer-other-window + (apply (if (fboundp 'make-shell) 'make-shell 'make-comint) + "Python" py-python-command nil)))) + (make-local-variable 'shell-prompt-pattern) + (setq shell-prompt-pattern "^>>> \\|^\\.\\.\\. ") + (set-process-filter (get-buffer-process (current-buffer)) + 'py-process-filter) + (set-syntax-table py-mode-syntax-table)) + +(defun py-execute-region (start end) + "Send the region between START and END to a Python interpreter. +If there is a *Python* process it is used. + +Hint: If you want to execute part of a Python file several times +\(e.g., perhaps you're developing a function and want to flesh it out +a bit at a time), use `\\[narrow-to-region]' to restrict the buffer to +the region of interest, and send the code to a *Python* process via +`\\[py-execute-buffer]' instead. + +Following are subtleties to note when using a *Python* process: + +If a *Python* process is used, the region is copied into a temporary +file (in directory `py-temp-directory'), and an `execfile' command is +sent to Python naming that file. If you send regions faster than +Python can execute them, `python-mode' will save them into distinct +temp files, and execute the next one in the queue the next time it +sees a `>>> ' prompt from Python. Each time this happens, the process +buffer is popped into a window (if it's not already in some window) so +you can see it, and a comment of the form + + \t## working on region in file <name> ... + +is inserted at the end. + +Caution: No more than 26 regions can be pending at any given time. +This limit is (indirectly) inherited from libc's mktemp(3). +`python-mode' does not try to protect you from exceeding the limit. +It's extremely unlikely that you'll get anywhere close to the limit in +practice, unless you're trying to be a jerk <grin>. + +See the `\\[py-shell]' docs for additional warnings." + (interactive "r") + (or (< start end) (error "Region is empty")) + (let ((pyproc (get-process "Python")) + fname) + (if (null pyproc) + (shell-command-on-region start end py-python-command) + ;; else feed it thru a temp file + (setq fname (py-make-temp-name)) + (write-region start end fname nil 'no-msg) + (setq py-file-queue (append py-file-queue (list fname))) + (if (cdr py-file-queue) + (message "File %s queued for execution" fname) + ;; else + (py-execute-file pyproc fname))))) + +(defun py-execute-file (pyproc fname) + (py-append-to-process-buffer + pyproc + (format "## working on region in file %s ...\n" fname)) + (process-send-string pyproc (format "execfile('%s')\n" fname))) + +(defun py-process-filter (pyproc string) + (let ((curbuf (current-buffer)) + (pbuf (process-buffer pyproc)) + (pmark (process-mark pyproc)) + file-finished) + + ;; make sure we switch to a different buffer at least once. if we + ;; *don't* do this, then if the process buffer is in the selected + ;; window, and point is before the end, and lots of output is + ;; coming at a fast pace, then (a) simple cursor-movement commands + ;; like C-p, C-n, C-f, C-b, C-a, C-e take an incredibly long time + ;; to have a visible effect (the window just doesn't get updated, + ;; sometimes for minutes(!)), and (b) it takes about 5x longer to + ;; get all the process output (until the next python prompt). + ;; + ;; #b makes no sense to me at all. #a almost makes sense: unless + ;; we actually change buffers, set_buffer_internal in buffer.c + ;; doesn't set windows_or_buffers_changed to 1, & that in turn + ;; seems to make the Emacs command loop reluctant to update the + ;; display. Perhaps the default process filter in process.c's + ;; read_process_output has update_mode_lines++ for a similar + ;; reason? beats me ... + + ;; BAW - we want to check to see if this still applies + (if (eq curbuf pbuf) ; mysterious ugly hack + (set-buffer (get-buffer-create "*scratch*"))) + + (set-buffer pbuf) + (let* ((start (point)) + (goback (< start pmark)) + (goend (and (not goback) (= start (point-max)))) + (buffer-read-only nil)) + (goto-char pmark) + (insert string) + (move-marker pmark (point)) + (setq file-finished + (and py-file-queue + (equal ">>> " + (buffer-substring + (prog2 (beginning-of-line) (point) + (goto-char pmark)) + (point))))) + (if goback (goto-char start) + ;; else + (if py-scroll-process-buffer + (let* ((pop-up-windows t) + (pwin (display-buffer pbuf))) + (set-window-point pwin (point))))) + (set-buffer curbuf) + (if file-finished + (progn + (py-delete-file-silently (car py-file-queue)) + (setq py-file-queue (cdr py-file-queue)) + (if py-file-queue + (py-execute-file pyproc (car py-file-queue))))) + (and goend + (progn (set-buffer pbuf) + (goto-char (point-max)))) + ))) + +(defun py-execute-buffer () + "Send the contents of the buffer to a Python interpreter. +If there is a *Python* process buffer it is used. If a clipping +restriction is in effect, only the accessible portion of the buffer is +sent. A trailing newline will be supplied if needed. + +See the `\\[py-execute-region]' docs for an account of some subtleties." + (interactive) + (py-execute-region (point-min) (point-max))) + + + +;; Functions for Python style indentation +(defun py-delete-char (count) + "Reduce indentation or delete character. +If point is at the leftmost column, deletes the preceding newline. + +Else if point is at the leftmost non-blank character of a line that is +neither a continuation line nor a non-indenting comment line, or if +point is at the end of a blank line, reduces the indentation to match +that of the line that opened the current block of code. The line that +opened the block is displayed in the echo area to help you keep track +of where you are. With numeric count, outdents that many blocks (but +not past column zero). + +Else the preceding character is deleted, converting a tab to spaces if +needed so that only a single column position is deleted. Numeric +argument delets that many characters." + (interactive "*p") + (if (or (/= (current-indentation) (current-column)) + (bolp) + (py-continuation-line-p) + (not py-honor-comment-indentation) + (looking-at "#[^ \t\n]")) ; non-indenting # + (backward-delete-char-untabify count) + ;; else indent the same as the colon line that opened the block + + ;; force non-blank so py-goto-block-up doesn't ignore it + (insert-char ?* 1) + (backward-char) + (let ((base-indent 0) ; indentation of base line + (base-text "") ; and text of base line + (base-found-p nil)) + (save-excursion + (while (< 0 count) + (condition-case nil ; in case no enclosing block + (progn + (py-goto-block-up 'no-mark) + (setq base-indent (current-indentation) + base-text (py-suck-up-leading-text) + base-found-p t)) + (error nil)) + (setq count (1- count)))) + (delete-char 1) ; toss the dummy character + (delete-horizontal-space) + (indent-to base-indent) + (if base-found-p + (message "Closes block: %s" base-text))))) + +;; required for pending-del and delsel modes +(put 'py-delete-char 'delete-selection 'supersede) +(put 'py-delete-char 'pending-delete 'supersede) + +(defun py-indent-line () + "Fix the indentation of the current line according to Python rules." + (interactive) + (let* ((ci (current-indentation)) + (move-to-indentation-p (<= (current-column) ci)) + (need (py-compute-indentation))) + ;; see if we need to outdent + (if (py-outdent-p) + (setq need (- need py-indent-offset))) + (if (/= ci need) + (save-excursion + (beginning-of-line) + (delete-horizontal-space) + (indent-to need))) + (if move-to-indentation-p (back-to-indentation)))) + +(defun py-newline-and-indent () + "Strives to act like the Emacs `newline-and-indent'. +This is just `strives to' because correct indentation can't be computed +from scratch for Python code. In general, deletes the whitespace before +point, inserts a newline, and takes an educated guess as to how you want +the new line indented." + (interactive) + (let ((ci (current-indentation))) + (if (< ci (current-column)) ; if point beyond indentation + (newline-and-indent) + ;; else try to act like newline-and-indent "normally" acts + (beginning-of-line) + (insert-char ?\n 1) + (move-to-column ci)))) + +(defun py-compute-indentation () + (save-excursion + (let ((pps (parse-partial-sexp (save-excursion + (beginning-of-python-def-or-class) + (point)) + (point)))) + (beginning-of-line) + (cond + ;; are we inside a string or comment? + ((or (nth 3 pps) (nth 4 pps)) + (save-excursion + (if (not py-align-multiline-strings-p) 0 + ;; skip back over blank & non-indenting comment lines + ;; note: will skip a blank or non-indenting comment line + ;; that happens to be a continuation line too + (re-search-backward "^[ \t]*\\([^ \t\n#]\\|#[ \t\n]\\)" nil 'move) + (back-to-indentation) + (current-column)))) + ;; are we on a continuation line? + ((py-continuation-line-p) + (let ((startpos (point)) + (open-bracket-pos (py-nesting-level)) + endpos searching found state) + (if open-bracket-pos + (progn + ;; align with first item in list; else a normal + ;; indent beyond the line with the open bracket + (goto-char (1+ open-bracket-pos)) ; just beyond bracket + ;; is the first list item on the same line? + (skip-chars-forward " \t") + (if (null (memq (following-char) '(?\n ?# ?\\))) + ; yes, so line up with it + (current-column) + ;; first list item on another line, or doesn't exist yet + (forward-line 1) + (while (and (< (point) startpos) + (looking-at "[ \t]*[#\n\\\\]")) ; skip noise + (forward-line 1)) + (if (< (point) startpos) + ;; again mimic the first list item + (current-indentation) + ;; else they're about to enter the first item + (goto-char open-bracket-pos) + (+ (current-indentation) py-indent-offset)))) + + ;; else on backslash continuation line + (forward-line -1) + (if (py-continuation-line-p) ; on at least 3rd line in block + (current-indentation) ; so just continue the pattern + ;; else started on 2nd line in block, so indent more. + ;; if base line is an assignment with a start on a RHS, + ;; indent to 2 beyond the leftmost "="; else skip first + ;; chunk of non-whitespace characters on base line, + 1 more + ;; column + (end-of-line) + (setq endpos (point) searching t) + (back-to-indentation) + (setq startpos (point)) + ;; look at all "=" from left to right, stopping at first + ;; one not nested in a list or string + (while searching + (skip-chars-forward "^=" endpos) + (if (= (point) endpos) + (setq searching nil) + (forward-char 1) + (setq state (parse-partial-sexp startpos (point))) + (if (and (zerop (car state)) ; not in a bracket + (null (nth 3 state))) ; & not in a string + (progn + (setq searching nil) ; done searching in any case + (setq found + (not (or + (eq (following-char) ?=) + (memq (char-after (- (point) 2)) + '(?< ?> ?!))))))))) + (if (or (not found) ; not an assignment + (looking-at "[ \t]*\\\\")) ; <=><spaces><backslash> + (progn + (goto-char startpos) + (skip-chars-forward "^ \t\n"))) + (1+ (current-column)))))) + + ;; not on a continuation line + ((bobp) (current-indentation)) + + ;; Dfn: "Indenting comment line". A line containing only a + ;; comment, but which is treated like a statement for + ;; indentation calculation purposes. Such lines are only + ;; treated specially by the mode; they are not treated + ;; specially by the Python interpreter. + + ;; The rules for indenting comment lines are a line where: + ;; - the first non-whitespace character is `#', and + ;; - the character following the `#' is whitespace, and + ;; - the line is outdented with respect to (i.e. to the left + ;; of) the indentation of the preceding non-blank line. + + ;; The first non-blank line following an indenting comment + ;; line is given the same amount of indentation as the + ;; indenting comment line. + + ;; All other comment-only lines are ignored for indentation + ;; purposes. + + ;; Are we looking at a comment-only line which is *not* an + ;; indenting comment line? If so, we assume that its been + ;; placed at the desired indentation, so leave it alone. + ;; Indenting comment lines are aligned as statements down + ;; below. + ((and (looking-at "[ \t]*#[^ \t\n]") + ;; NOTE: this test will not be performed in older Emacsen + (fboundp 'forward-comment) + (<= (current-indentation) + (save-excursion + (forward-comment (- (point-max))) + (current-indentation)))) + (current-indentation)) + + ;; else indentation based on that of the statement that + ;; precedes us; use the first line of that statement to + ;; establish the base, in case the user forced a non-std + ;; indentation for the continuation lines (if any) + (t + ;; skip back over blank & non-indenting comment lines note: + ;; will skip a blank or non-indenting comment line that + ;; happens to be a continuation line too. use fast Emacs 19 + ;; function if it's there. + (if (and (eq py-honor-comment-indentation nil) + (fboundp 'forward-comment)) + (forward-comment (- (point-max))) + (let (done) + (while (not done) + (re-search-backward "^[ \t]*\\([^ \t\n#]\\|#[ \t\n]\\)" + nil 'move) + (setq done (or (eq py-honor-comment-indentation t) + (bobp) + (/= (following-char) ?#) + (not (zerop (current-column))))) + ))) + ;; if we landed inside a string, go to the beginning of that + ;; string. this handles triple quoted, multi-line spanning + ;; strings. + (py-goto-initial-line) + (+ (current-indentation) + (if (py-statement-opens-block-p) + py-indent-offset + (if (py-statement-closes-block-p) + (- py-indent-offset) + 0))) + ))))) + +(defun py-guess-indent-offset (&optional global) + "Guess a good value for, and change, `py-indent-offset'. +By default (without a prefix arg), makes a buffer-local copy of +`py-indent-offset' with the new value. This will not affect any other +Python buffers. With a prefix arg, changes the global value of +`py-indent-offset'. This affects all Python buffers (that don't have +their own buffer-local copy), both those currently existing and those +created later in the Emacs session. + +Some people use a different value for `py-indent-offset' than you use. +There's no excuse for such foolishness, but sometimes you have to deal +with their ugly code anyway. This function examines the file and sets +`py-indent-offset' to what it thinks it was when they created the +mess. + +Specifically, it searches forward from the statement containing point, +looking for a line that opens a block of code. `py-indent-offset' is +set to the difference in indentation between that line and the Python +statement following it. If the search doesn't succeed going forward, +it's tried again going backward." + (interactive "P") ; raw prefix arg + (let (new-value + (start (point)) + restart + (found nil) + colon-indent) + (py-goto-initial-line) + (while (not (or found (eobp))) + (if (re-search-forward ":[ \t]*\\($\\|[#\\]\\)" nil 'move) + (progn + (setq restart (point)) + (py-goto-initial-line) + (if (py-statement-opens-block-p) + (setq found t) + (goto-char restart))))) + (if found + () + (goto-char start) + (py-goto-initial-line) + (while (not (or found (bobp))) + (setq found + (and + (re-search-backward ":[ \t]*\\($\\|[#\\]\\)" nil 'move) + (or (py-goto-initial-line) t) ; always true -- side effect + (py-statement-opens-block-p))))) + (setq colon-indent (current-indentation) + found (and found (zerop (py-next-statement 1))) + new-value (- (current-indentation) colon-indent)) + (goto-char start) + (if found + (progn + (funcall (if global 'kill-local-variable 'make-local-variable) + 'py-indent-offset) + (setq py-indent-offset new-value) + (message "%s value of py-indent-offset set to %d" + (if global "Global" "Local") + py-indent-offset)) + (error "Sorry, couldn't guess a value for py-indent-offset")))) + +(defun py-shift-region (start end count) + (save-excursion + (goto-char end) (beginning-of-line) (setq end (point)) + (goto-char start) (beginning-of-line) (setq start (point)) + (indent-rigidly start end count))) + +(defun py-shift-region-left (start end &optional count) + "Shift region of Python code to the left. +The lines from the line containing the start of the current region up +to (but not including) the line containing the end of the region are +shifted to the left, by `py-indent-offset' columns. + +If a prefix argument is given, the region is instead shifted by that +many columns. With no active region, outdent only the current line. +You cannot outdent the region if any line is already at column zero." + (interactive + (let ((p (point)) + (m (mark)) + (arg current-prefix-arg)) + (if m + (list (min p m) (max p m) arg) + (list p (save-excursion (forward-line 1) (point)) arg)))) + ;; if any line is at column zero, don't shift the region + (save-excursion + (goto-char start) + (while (< (point) end) + (back-to-indentation) + (if (and (zerop (current-column)) + (not (looking-at "\\s *$"))) + (error "Region is at left edge.")) + (forward-line 1))) + (py-shift-region start end (- (prefix-numeric-value + (or count py-indent-offset)))) + (py-keep-region-active)) + +(defun py-shift-region-right (start end &optional count) + "Shift region of Python code to the right. +The lines from the line containing the start of the current region up +to (but not including) the line containing the end of the region are +shifted to the right, by `py-indent-offset' columns. + +If a prefix argument is given, the region is instead shifted by that +many columns. With no active region, indent only the current line." + (interactive + (let ((p (point)) + (m (mark)) + (arg current-prefix-arg)) + (if m + (list (min p m) (max p m) arg) + (list p (save-excursion (forward-line 1) (point)) arg)))) + (py-shift-region start end (prefix-numeric-value + (or count py-indent-offset))) + (py-keep-region-active)) + +(defun py-indent-region (start end &optional indent-offset) + "Reindent a region of Python code. + +The lines from the line containing the start of the current region up +to (but not including) the line containing the end of the region are +reindented. If the first line of the region has a non-whitespace +character in the first column, the first line is left alone and the +rest of the region is reindented with respect to it. Else the entire +region is reindented with respect to the (closest code or indenting +comment) statement immediately preceding the region. + +This is useful when code blocks are moved or yanked, when enclosing +control structures are introduced or removed, or to reformat code +using a new value for the indentation offset. + +If a numeric prefix argument is given, it will be used as the value of +the indentation offset. Else the value of `py-indent-offset' will be +used. + +Warning: The region must be consistently indented before this function +is called! This function does not compute proper indentation from +scratch (that's impossible in Python), it merely adjusts the existing +indentation to be correct in context. + +Warning: This function really has no idea what to do with +non-indenting comment lines, and shifts them as if they were indenting +comment lines. Fixing this appears to require telepathy. + +Special cases: whitespace is deleted from blank lines; continuation +lines are shifted by the same amount their initial line was shifted, +in order to preserve their relative indentation with respect to their +initial line; and comment lines beginning in column 1 are ignored." + (interactive "*r\nP") ; region; raw prefix arg + (save-excursion + (goto-char end) (beginning-of-line) (setq end (point-marker)) + (goto-char start) (beginning-of-line) + (let ((py-indent-offset (prefix-numeric-value + (or indent-offset py-indent-offset))) + (indents '(-1)) ; stack of active indent levels + (target-column 0) ; column to which to indent + (base-shifted-by 0) ; amount last base line was shifted + (indent-base (if (looking-at "[ \t\n]") + (py-compute-indentation) + 0)) + ci) + (while (< (point) end) + (setq ci (current-indentation)) + ;; figure out appropriate target column + (cond + ((or (eq (following-char) ?#) ; comment in column 1 + (looking-at "[ \t]*$")) ; entirely blank + (setq target-column 0)) + ((py-continuation-line-p) ; shift relative to base line + (setq target-column (+ ci base-shifted-by))) + (t ; new base line + (if (> ci (car indents)) ; going deeper; push it + (setq indents (cons ci indents)) + ;; else we should have seen this indent before + (setq indents (memq ci indents)) ; pop deeper indents + (if (null indents) + (error "Bad indentation in region, at line %d" + (save-restriction + (widen) + (1+ (count-lines 1 (point))))))) + (setq target-column (+ indent-base + (* py-indent-offset + (- (length indents) 2)))) + (setq base-shifted-by (- target-column ci)))) + ;; shift as needed + (if (/= ci target-column) + (progn + (delete-horizontal-space) + (indent-to target-column))) + (forward-line 1)))) + (set-marker end nil)) + +(defun py-comment-region (beg end &optional arg) + "Like `comment-region' but uses double hash (`#') comment starter." + (interactive "r\nP") + (let ((comment-start py-block-comment-prefix)) + (comment-region beg end arg))) + + +;; Functions for moving point +(defun py-previous-statement (count) + "Go to the start of previous Python statement. +If the statement at point is the i'th Python statement, goes to the +start of statement i-COUNT. If there is no such statement, goes to the +first statement. Returns count of statements left to move. +`Statements' do not include blank, comment, or continuation lines." + (interactive "p") ; numeric prefix arg + (if (< count 0) (py-next-statement (- count)) + (py-goto-initial-line) + (let (start) + (while (and + (setq start (point)) ; always true -- side effect + (> count 0) + (zerop (forward-line -1)) + (py-goto-statement-at-or-above)) + (setq count (1- count))) + (if (> count 0) (goto-char start))) + count)) + +(defun py-next-statement (count) + "Go to the start of next Python statement. +If the statement at point is the i'th Python statement, goes to the +start of statement i+COUNT. If there is no such statement, goes to the +last statement. Returns count of statements left to move. `Statements' +do not include blank, comment, or continuation lines." + (interactive "p") ; numeric prefix arg + (if (< count 0) (py-previous-statement (- count)) + (beginning-of-line) + (let (start) + (while (and + (setq start (point)) ; always true -- side effect + (> count 0) + (py-goto-statement-below)) + (setq count (1- count))) + (if (> count 0) (goto-char start))) + count)) + +(defun py-goto-block-up (&optional nomark) + "Move up to start of current block. +Go to the statement that starts the smallest enclosing block; roughly +speaking, this will be the closest preceding statement that ends with a +colon and is indented less than the statement you started on. If +successful, also sets the mark to the starting point. + +`\\[py-mark-block]' can be used afterward to mark the whole code +block, if desired. + +If called from a program, the mark will not be set if optional argument +NOMARK is not nil." + (interactive) + (let ((start (point)) + (found nil) + initial-indent) + (py-goto-initial-line) + ;; if on blank or non-indenting comment line, use the preceding stmt + (if (looking-at "[ \t]*\\($\\|#[^ \t\n]\\)") + (progn + (py-goto-statement-at-or-above) + (setq found (py-statement-opens-block-p)))) + ;; search back for colon line indented less + (setq initial-indent (current-indentation)) + (if (zerop initial-indent) + ;; force fast exit + (goto-char (point-min))) + (while (not (or found (bobp))) + (setq found + (and + (re-search-backward ":[ \t]*\\($\\|[#\\]\\)" nil 'move) + (or (py-goto-initial-line) t) ; always true -- side effect + (< (current-indentation) initial-indent) + (py-statement-opens-block-p)))) + (if found + (progn + (or nomark (push-mark start)) + (back-to-indentation)) + (goto-char start) + (error "Enclosing block not found")))) + +(defun beginning-of-python-def-or-class (&optional class) + "Move point to start of def (or class, with prefix arg). + +Searches back for the closest preceding `def'. If you supply a prefix +arg, looks for a `class' instead. The docs assume the `def' case; +just substitute `class' for `def' for the other case. + +If point is in a def statement already, and after the `d', simply +moves point to the start of the statement. + +Else (point is not in a def statement, or at or before the `d' of a +def statement), searches for the closest preceding def statement, and +leaves point at its start. If no such statement can be found, leaves +point at the start of the buffer. + +Returns t iff a def statement is found by these rules. + +Note that doing this command repeatedly will take you closer to the +start of the buffer each time. + +If you want to mark the current def/class, see +`\\[mark-python-def-or-class]'." + (interactive "P") ; raw prefix arg + (let ((at-or-before-p (<= (current-column) (current-indentation))) + (start-of-line (progn (beginning-of-line) (point))) + (start-of-stmt (progn (py-goto-initial-line) (point)))) + (if (or (/= start-of-stmt start-of-line) + (not at-or-before-p)) + (end-of-line)) ; OK to match on this line + (re-search-backward (if class "^[ \t]*class\\>" "^[ \t]*def\\>") + nil 'move))) + +(defun end-of-python-def-or-class (&optional class) + "Move point beyond end of def (or class, with prefix arg) body. + +By default, looks for an appropriate `def'. If you supply a prefix arg, +looks for a `class' instead. The docs assume the `def' case; just +substitute `class' for `def' for the other case. + +If point is in a def statement already, this is the def we use. + +Else if the def found by `\\[beginning-of-python-def-or-class]' +contains the statement you started on, that's the def we use. + +Else we search forward for the closest following def, and use that. + +If a def can be found by these rules, point is moved to the start of +the line immediately following the def block, and the position of the +start of the def is returned. + +Else point is moved to the end of the buffer, and nil is returned. + +Note that doing this command repeatedly will take you closer to the +end of the buffer each time. + +If you want to mark the current def/class, see +`\\[mark-python-def-or-class]'." + (interactive "P") ; raw prefix arg + (let ((start (progn (py-goto-initial-line) (point))) + (which (if class "class" "def")) + (state 'not-found)) + ;; move point to start of appropriate def/class + (if (looking-at (concat "[ \t]*" which "\\>")) ; already on one + (setq state 'at-beginning) + ;; else see if beginning-of-python-def-or-class hits container + (if (and (beginning-of-python-def-or-class class) + (progn (py-goto-beyond-block) + (> (point) start))) + (setq state 'at-end) + ;; else search forward + (goto-char start) + (if (re-search-forward (concat "^[ \t]*" which "\\>") nil 'move) + (progn (setq state 'at-beginning) + (beginning-of-line))))) + (cond + ((eq state 'at-beginning) (py-goto-beyond-block) t) + ((eq state 'at-end) t) + ((eq state 'not-found) nil) + (t (error "internal error in end-of-python-def-or-class"))))) + + +;; Functions for marking regions +(defun py-mark-block (&optional extend just-move) + "Mark following block of lines. With prefix arg, mark structure. +Easier to use than explain. It sets the region to an `interesting' +block of succeeding lines. If point is on a blank line, it goes down to +the next non-blank line. That will be the start of the region. The end +of the region depends on the kind of line at the start: + + - If a comment, the region will include all succeeding comment lines up + to (but not including) the next non-comment line (if any). + + - Else if a prefix arg is given, and the line begins one of these + structures: + + if elif else try except finally for while def class + + the region will be set to the body of the structure, including + following blocks that `belong' to it, but excluding trailing blank + and comment lines. E.g., if on a `try' statement, the `try' block + and all (if any) of the following `except' and `finally' blocks + that belong to the `try' structure will be in the region. Ditto + for if/elif/else, for/else and while/else structures, and (a bit + degenerate, since they're always one-block structures) def and + class blocks. + + - Else if no prefix argument is given, and the line begins a Python + block (see list above), and the block is not a `one-liner' (i.e., + the statement ends with a colon, not with code), the region will + include all succeeding lines up to (but not including) the next + code statement (if any) that's indented no more than the starting + line, except that trailing blank and comment lines are excluded. + E.g., if the starting line begins a multi-statement `def' + structure, the region will be set to the full function definition, + but without any trailing `noise' lines. + + - Else the region will include all succeeding lines up to (but not + including) the next blank line, or code or indenting-comment line + indented strictly less than the starting line. Trailing indenting + comment lines are included in this case, but not trailing blank + lines. + +A msg identifying the location of the mark is displayed in the echo +area; or do `\\[exchange-point-and-mark]' to flip down to the end. + +If called from a program, optional argument EXTEND plays the role of +the prefix arg, and if optional argument JUST-MOVE is not nil, just +moves to the end of the block (& does not set mark or display a msg)." + (interactive "P") ; raw prefix arg + (py-goto-initial-line) + ;; skip over blank lines + (while (and + (looking-at "[ \t]*$") ; while blank line + (not (eobp))) ; & somewhere to go + (forward-line 1)) + (if (eobp) + (error "Hit end of buffer without finding a non-blank stmt")) + (let ((initial-pos (point)) + (initial-indent (current-indentation)) + last-pos ; position of last stmt in region + (followers + '((if elif else) (elif elif else) (else) + (try except finally) (except except) (finally) + (for else) (while else) + (def) (class) ) ) + first-symbol next-symbol) + + (cond + ;; if comment line, suck up the following comment lines + ((looking-at "[ \t]*#") + (re-search-forward "^[ \t]*[^ \t#]" nil 'move) ; look for non-comment + (re-search-backward "^[ \t]*#") ; and back to last comment in block + (setq last-pos (point))) + + ;; else if line is a block line and EXTEND given, suck up + ;; the whole structure + ((and extend + (setq first-symbol (py-suck-up-first-keyword) ) + (assq first-symbol followers)) + (while (and + (or (py-goto-beyond-block) t) ; side effect + (forward-line -1) ; side effect + (setq last-pos (point)) ; side effect + (py-goto-statement-below) + (= (current-indentation) initial-indent) + (setq next-symbol (py-suck-up-first-keyword)) + (memq next-symbol (cdr (assq first-symbol followers)))) + (setq first-symbol next-symbol))) + + ;; else if line *opens* a block, search for next stmt indented <= + ((py-statement-opens-block-p) + (while (and + (setq last-pos (point)) ; always true -- side effect + (py-goto-statement-below) + (> (current-indentation) initial-indent)) + nil)) + + ;; else plain code line; stop at next blank line, or stmt or + ;; indenting comment line indented < + (t + (while (and + (setq last-pos (point)) ; always true -- side effect + (or (py-goto-beyond-final-line) t) + (not (looking-at "[ \t]*$")) ; stop at blank line + (or + (>= (current-indentation) initial-indent) + (looking-at "[ \t]*#[^ \t\n]"))) ; ignore non-indenting # + nil))) + + ;; skip to end of last stmt + (goto-char last-pos) + (py-goto-beyond-final-line) + + ;; set mark & display + (if just-move + () ; just return + (push-mark (point) 'no-msg) + (forward-line -1) + (message "Mark set after: %s" (py-suck-up-leading-text)) + (goto-char initial-pos)))) + +(defun mark-python-def-or-class (&optional class) + "Set region to body of def (or class, with prefix arg) enclosing point. +Pushes the current mark, then point, on the mark ring (all language +modes do this, but although it's handy it's never documented ...). + +In most Emacs language modes, this function bears at least a +hallucinogenic resemblance to `\\[end-of-python-def-or-class]' and +`\\[beginning-of-python-def-or-class]'. + +And in earlier versions of Python mode, all 3 were tightly connected. +Turned out that was more confusing than useful: the `goto start' and +`goto end' commands are usually used to search through a file, and +people expect them to act a lot like `search backward' and `search +forward' string-search commands. But because Python `def' and `class' +can nest to arbitrary levels, finding the smallest def containing +point cannot be done via a simple backward search: the def containing +point may not be the closest preceding def, or even the closest +preceding def that's indented less. The fancy algorithm required is +appropriate for the usual uses of this `mark' command, but not for the +`goto' variations. + +So the def marked by this command may not be the one either of the +`goto' commands find: If point is on a blank or non-indenting comment +line, moves back to start of the closest preceding code statement or +indenting comment line. If this is a `def' statement, that's the def +we use. Else searches for the smallest enclosing `def' block and uses +that. Else signals an error. + +When an enclosing def is found: The mark is left immediately beyond +the last line of the def block. Point is left at the start of the +def, except that: if the def is preceded by a number of comment lines +followed by (at most) one optional blank line, point is left at the +start of the comments; else if the def is preceded by a blank line, +point is left at its start. + +The intent is to mark the containing def/class and its associated +documentation, to make moving and duplicating functions and classes +pleasant." + (interactive "P") ; raw prefix arg + (let ((start (point)) + (which (if class "class" "def"))) + (push-mark start) + (if (not (py-go-up-tree-to-keyword which)) + (progn (goto-char start) + (error "Enclosing %s not found" which)) + ;; else enclosing def/class found + (setq start (point)) + (py-goto-beyond-block) + (push-mark (point)) + (goto-char start) + (if (zerop (forward-line -1)) ; if there is a preceding line + (progn + (if (looking-at "[ \t]*$") ; it's blank + (setq start (point)) ; so reset start point + (goto-char start)) ; else try again + (if (zerop (forward-line -1)) + (if (looking-at "[ \t]*#") ; a comment + ;; look back for non-comment line + ;; tricky: note that the regexp matches a blank + ;; line, cuz \n is in the 2nd character class + (and + (re-search-backward "^[ \t]*[^ \t#]" nil 'move) + (forward-line 1)) + ;; no comment, so go back + (goto-char start)))))))) + +;; ripped from cc-mode +(defun py-forward-into-nomenclature (&optional arg) + "Move forward to end of a nomenclature section or word. +With arg, to it arg times. + +A `nomenclature' is a fancy way of saying AWordWithMixedCaseNotUnderscores." + (interactive "p") + (let ((case-fold-search nil)) + (if (> arg 0) + (re-search-forward "\\W*\\([A-Z_]*[a-z0-9]*\\)" (point-max) t arg) + (while (and (< arg 0) + (re-search-backward + "\\(\\(\\W\\|[a-z0-9]\\)[A-Z]+\\|\\W\\w+\\)" + (point-min) 0)) + (forward-char 1) + (setq arg (1+ arg))))) + (py-keep-region-active)) + +(defun py-backward-into-nomenclature (&optional arg) + "Move backward to beginning of a nomenclature section or word. +With optional ARG, move that many times. If ARG is negative, move +forward. + +A `nomenclature' is a fancy way of saying AWordWithMixedCaseNotUnderscores." + (interactive "p") + (py-forward-into-nomenclature (- arg)) + (py-keep-region-active)) + + + +;; Documentation functions + +;; dump the long form of the mode blurb; does the usual doc escapes, +;; plus lines of the form ^[vc]:name$ to suck variable & command docs +;; out of the right places, along with the keys they're on & current +;; values +(defun py-dump-help-string (str) + (with-output-to-temp-buffer "*Help*" + (let ((locals (buffer-local-variables)) + funckind funcname func funcdoc + (start 0) mstart end + keys ) + (while (string-match "^%\\([vc]\\):\\(.+\\)\n" str start) + (setq mstart (match-beginning 0) end (match-end 0) + funckind (substring str (match-beginning 1) (match-end 1)) + funcname (substring str (match-beginning 2) (match-end 2)) + func (intern funcname)) + (princ (substitute-command-keys (substring str start mstart))) + (cond + ((equal funckind "c") ; command + (setq funcdoc (documentation func) + keys (concat + "Key(s): " + (mapconcat 'key-description + (where-is-internal func py-mode-map) + ", ")))) + ((equal funckind "v") ; variable + (setq funcdoc (substitute-command-keys + (get func 'variable-documentation)) + keys (if (assq func locals) + (concat + "Local/Global values: " + (prin1-to-string (symbol-value func)) + " / " + (prin1-to-string (default-value func))) + (concat + "Value: " + (prin1-to-string (symbol-value func)))))) + (t ; unexpected + (error "Error in py-dump-help-string, tag `%s'" funckind))) + (princ (format "\n-> %s:\t%s\t%s\n\n" + (if (equal funckind "c") "Command" "Variable") + funcname keys)) + (princ funcdoc) + (terpri) + (setq start end)) + (princ (substitute-command-keys (substring str start)))) + (print-help-return-message))) + +(defun py-describe-mode () + "Dump long form of Python-mode docs." + (interactive) + (py-dump-help-string "Major mode for editing Python files. +Knows about Python indentation, tokens, comments and continuation lines. +Paragraphs are separated by blank lines only. + +Major sections below begin with the string `@'; specific function and +variable docs begin with `->'. + +@EXECUTING PYTHON CODE + +\\[py-execute-buffer]\tsends the entire buffer to the Python interpreter +\\[py-execute-region]\tsends the current region +\\[py-shell]\tstarts a Python interpreter window; this will be used by +\tsubsequent \\[py-execute-buffer] or \\[py-execute-region] commands +%c:py-execute-buffer +%c:py-execute-region +%c:py-shell + +@VARIABLES + +py-indent-offset\tindentation increment +py-block-comment-prefix\tcomment string used by comment-region + +py-python-command\tshell command to invoke Python interpreter +py-scroll-process-buffer\talways scroll Python process buffer +py-temp-directory\tdirectory used for temp files (if needed) + +py-beep-if-tab-change\tring the bell if tab-width is changed +%v:py-indent-offset +%v:py-block-comment-prefix +%v:py-python-command +%v:py-scroll-process-buffer +%v:py-temp-directory +%v:py-beep-if-tab-change + +@KINDS OF LINES + +Each physical line in the file is either a `continuation line' (the +preceding line ends with a backslash that's not part of a comment, or +the paren/bracket/brace nesting level at the start of the line is +non-zero, or both) or an `initial line' (everything else). + +An initial line is in turn a `blank line' (contains nothing except +possibly blanks or tabs), a `comment line' (leftmost non-blank +character is `#'), or a `code line' (everything else). + +Comment Lines + +Although all comment lines are treated alike by Python, Python mode +recognizes two kinds that act differently with respect to indentation. + +An `indenting comment line' is a comment line with a blank, tab or +nothing after the initial `#'. The indentation commands (see below) +treat these exactly as if they were code lines: a line following an +indenting comment line will be indented like the comment line. All +other comment lines (those with a non-whitespace character immediately +following the initial `#') are `non-indenting comment lines', and +their indentation is ignored by the indentation commands. + +Indenting comment lines are by far the usual case, and should be used +whenever possible. Non-indenting comment lines are useful in cases +like these: + +\ta = b # a very wordy single-line comment that ends up being +\t #... continued onto another line + +\tif a == b: +##\t\tprint 'panic!' # old code we've `commented out' +\t\treturn a + +Since the `#...' and `##' comment lines have a non-whitespace +character following the initial `#', Python mode ignores them when +computing the proper indentation for the next line. + +Continuation Lines and Statements + +The Python-mode commands generally work on statements instead of on +individual lines, where a `statement' is a comment or blank line, or a +code line and all of its following continuation lines (if any) +considered as a single logical unit. The commands in this mode +generally (when it makes sense) automatically move to the start of the +statement containing point, even if point happens to be in the middle +of some continuation line. + + +@INDENTATION + +Primarily for entering new code: +\t\\[indent-for-tab-command]\t indent line appropriately +\t\\[py-newline-and-indent]\t insert newline, then indent +\t\\[py-delete-char]\t reduce indentation, or delete single character + +Primarily for reindenting existing code: +\t\\[py-guess-indent-offset]\t guess py-indent-offset from file content; change locally +\t\\[universal-argument] \\[py-guess-indent-offset]\t ditto, but change globally + +\t\\[py-indent-region]\t reindent region to match its context +\t\\[py-shift-region-left]\t shift region left by py-indent-offset +\t\\[py-shift-region-right]\t shift region right by py-indent-offset + +Unlike most programming languages, Python uses indentation, and only +indentation, to specify block structure. Hence the indentation supplied +automatically by Python-mode is just an educated guess: only you know +the block structure you intend, so only you can supply correct +indentation. + +The \\[indent-for-tab-command] and \\[py-newline-and-indent] keys try to suggest plausible indentation, based on +the indentation of preceding statements. E.g., assuming +py-indent-offset is 4, after you enter +\tif a > 0: \\[py-newline-and-indent] +the cursor will be moved to the position of the `_' (_ is not a +character in the file, it's just used here to indicate the location of +the cursor): +\tif a > 0: +\t _ +If you then enter `c = d' \\[py-newline-and-indent], the cursor will move +to +\tif a > 0: +\t c = d +\t _ +Python-mode cannot know whether that's what you intended, or whether +\tif a > 0: +\t c = d +\t_ +was your intent. In general, Python-mode either reproduces the +indentation of the (closest code or indenting-comment) preceding +statement, or adds an extra py-indent-offset blanks if the preceding +statement has `:' as its last significant (non-whitespace and non- +comment) character. If the suggested indentation is too much, use +\\[py-delete-char] to reduce it. + +Continuation lines are given extra indentation. If you don't like the +suggested indentation, change it to something you do like, and Python- +mode will strive to indent later lines of the statement in the same way. + +If a line is a continuation line by virtue of being in an unclosed +paren/bracket/brace structure (`list', for short), the suggested +indentation depends on whether the current line contains the first item +in the list. If it does, it's indented py-indent-offset columns beyond +the indentation of the line containing the open bracket. If you don't +like that, change it by hand. The remaining items in the list will mimic +whatever indentation you give to the first item. + +If a line is a continuation line because the line preceding it ends with +a backslash, the third and following lines of the statement inherit their +indentation from the line preceding them. The indentation of the second +line in the statement depends on the form of the first (base) line: if +the base line is an assignment statement with anything more interesting +than the backslash following the leftmost assigning `=', the second line +is indented two columns beyond that `='. Else it's indented to two +columns beyond the leftmost solid chunk of non-whitespace characters on +the base line. + +Warning: indent-region should not normally be used! It calls \\[indent-for-tab-command] +repeatedly, and as explained above, \\[indent-for-tab-command] can't guess the block +structure you intend. +%c:indent-for-tab-command +%c:py-newline-and-indent +%c:py-delete-char + + +The next function may be handy when editing code you didn't write: +%c:py-guess-indent-offset + + +The remaining `indent' functions apply to a region of Python code. They +assume the block structure (equals indentation, in Python) of the region +is correct, and alter the indentation in various ways while preserving +the block structure: +%c:py-indent-region +%c:py-shift-region-left +%c:py-shift-region-right + +@MARKING & MANIPULATING REGIONS OF CODE + +\\[py-mark-block]\t mark block of lines +\\[mark-python-def-or-class]\t mark smallest enclosing def +\\[universal-argument] \\[mark-python-def-or-class]\t mark smallest enclosing class +\\[comment-region]\t comment out region of code +\\[universal-argument] \\[comment-region]\t uncomment region of code +%c:py-mark-block +%c:mark-python-def-or-class +%c:comment-region + +@MOVING POINT + +\\[py-previous-statement]\t move to statement preceding point +\\[py-next-statement]\t move to statement following point +\\[py-goto-block-up]\t move up to start of current block +\\[beginning-of-python-def-or-class]\t move to start of def +\\[universal-argument] \\[beginning-of-python-def-or-class]\t move to start of class +\\[end-of-python-def-or-class]\t move to end of def +\\[universal-argument] \\[end-of-python-def-or-class]\t move to end of class + +The first two move to one statement beyond the statement that contains +point. A numeric prefix argument tells them to move that many +statements instead. Blank lines, comment lines, and continuation lines +do not count as `statements' for these commands. So, e.g., you can go +to the first code statement in a file by entering +\t\\[beginning-of-buffer]\t to move to the top of the file +\t\\[py-next-statement]\t to skip over initial comments and blank lines +Or do `\\[py-previous-statement]' with a huge prefix argument. +%c:py-previous-statement +%c:py-next-statement +%c:py-goto-block-up +%c:beginning-of-python-def-or-class +%c:end-of-python-def-or-class + +@LITTLE-KNOWN EMACS COMMANDS PARTICULARLY USEFUL IN PYTHON MODE + +`\\[indent-new-comment-line]' is handy for entering a multi-line comment. + +`\\[set-selective-display]' with a `small' prefix arg is ideally suited for viewing the +overall class and def structure of a module. + +`\\[back-to-indentation]' moves point to a line's first non-blank character. + +`\\[indent-relative]' is handy for creating odd indentation. + +@OTHER EMACS HINTS + +If you don't like the default value of a variable, change its value to +whatever you do like by putting a `setq' line in your .emacs file. +E.g., to set the indentation increment to 4, put this line in your +.emacs: +\t(setq py-indent-offset 4) +To see the value of a variable, do `\\[describe-variable]' and enter the variable +name at the prompt. + +When entering a key sequence like `C-c C-n', it is not necessary to +release the CONTROL key after doing the `C-c' part -- it suffices to +press the CONTROL key, press and release `c' (while still holding down +CONTROL), press and release `n' (while still holding down CONTROL), & +then release CONTROL. + +Entering Python mode calls with no arguments the value of the variable +`python-mode-hook', if that value exists and is not nil; for backward +compatibility it also tries `py-mode-hook'; see the `Hooks' section of +the Elisp manual for details. + +Obscure: When python-mode is first loaded, it looks for all bindings +to newline-and-indent in the global keymap, and shadows them with +local bindings to py-newline-and-indent.")) + + +;; Helper functions +(defvar py-parse-state-re + (concat + "^[ \t]*\\(if\\|elif\\|else\\|while\\|def\\|class\\)\\>" + "\\|" + "^[^ #\t\n]")) + +;; returns the parse state at point (see parse-partial-sexp docs) +(defun py-parse-state () + (save-excursion + (let ((here (point)) + pps done ci) + (while (not done) + ;; back up to the first preceding line (if any; else start of + ;; buffer) that begins with a popular Python keyword, or a + ;; non- whitespace and non-comment character. These are good + ;; places to start parsing to see whether where we started is + ;; at a non-zero nesting level. It may be slow for people who + ;; write huge code blocks or huge lists ... tough beans. + (re-search-backward py-parse-state-re nil 'move) + (setq ci (current-indentation)) + (beginning-of-line) + (save-excursion + (setq pps (parse-partial-sexp (point) here))) + ;; make sure we don't land inside a triple-quoted string + (setq done (or (zerop ci) + (not (nth 3 pps)) + (bobp))) + ) + pps))) + +;; if point is at a non-zero nesting level, returns the number of the +;; character that opens the smallest enclosing unclosed list; else +;; returns nil. +(defun py-nesting-level () + (let ((status (py-parse-state)) ) + (if (zerop (car status)) + nil ; not in a nest + (car (cdr status))))) ; char# of open bracket + +;; t iff preceding line ends with backslash that's not in a comment +(defun py-backslash-continuation-line-p () + (save-excursion + (beginning-of-line) + (and + ;; use a cheap test first to avoid the regexp if possible + ;; use 'eq' because char-after may return nil + (eq (char-after (- (point) 2)) ?\\ ) + ;; make sure; since eq test passed, there is a preceding line + (forward-line -1) ; always true -- side effect + (looking-at py-continued-re)))) + +;; t iff current line is a continuation line +(defun py-continuation-line-p () + (save-excursion + (beginning-of-line) + (or (py-backslash-continuation-line-p) + (py-nesting-level)))) + +;; go to initial line of current statement; usually this is the line +;; we're on, but if we're on the 2nd or following lines of a +;; continuation block, we need to go up to the first line of the +;; block. +;; +;; Tricky: We want to avoid quadratic-time behavior for long continued +;; blocks, whether of the backslash or open-bracket varieties, or a +;; mix of the two. The following manages to do that in the usual +;; cases. +(defun py-goto-initial-line () + (let ( open-bracket-pos ) + (while (py-continuation-line-p) + (beginning-of-line) + (if (py-backslash-continuation-line-p) + (while (py-backslash-continuation-line-p) + (forward-line -1)) + ;; else zip out of nested brackets/braces/parens + (while (setq open-bracket-pos (py-nesting-level)) + (goto-char open-bracket-pos))))) + (beginning-of-line)) + +;; go to point right beyond final line of current statement; usually +;; this is the start of the next line, but if this is a multi-line +;; statement we need to skip over the continuation lines. Tricky: +;; Again we need to be clever to avoid quadratic time behavior. +(defun py-goto-beyond-final-line () + (forward-line 1) + (let (state) + (while (and (py-continuation-line-p) + (not (eobp))) + ;; skip over the backslash flavor + (while (and (py-backslash-continuation-line-p) + (not (eobp))) + (forward-line 1)) + ;; if in nest, zip to the end of the nest + (setq state (py-parse-state)) + (if (and (not (zerop (car state))) + (not (eobp))) + (progn + ;; BUG ALERT: I could swear, from reading the docs, that + ;; the 3rd argument should be plain 0 + (parse-partial-sexp (point) (point-max) (- 0 (car state)) + nil state) + (forward-line 1)))))) + +;; t iff statement opens a block == iff it ends with a colon that's +;; not in a comment. point should be at the start of a statement +(defun py-statement-opens-block-p () + (save-excursion + (let ((start (point)) + (finish (progn (py-goto-beyond-final-line) (1- (point)))) + (searching t) + (answer nil) + state) + (goto-char start) + (while searching + ;; look for a colon with nothing after it except whitespace, and + ;; maybe a comment + (if (re-search-forward ":\\([ \t]\\|\\\\\n\\)*\\(#.*\\)?$" + finish t) + (if (eq (point) finish) ; note: no `else' clause; just + ; keep searching if we're not at + ; the end yet + ;; sure looks like it opens a block -- but it might + ;; be in a comment + (progn + (setq searching nil) ; search is done either way + (setq state (parse-partial-sexp start + (match-beginning 0))) + (setq answer (not (nth 4 state))))) + ;; search failed: couldn't find another interesting colon + (setq searching nil))) + answer))) + +(defun py-statement-closes-block-p () + ;; true iff the current statement `closes' a block == the line + ;; starts with `return', `raise', `break' or `continue'. doesn't + ;; catch embedded statements + (let ((here (point))) + (back-to-indentation) + (prog1 + (looking-at "\\(return\\|raise\\|break\\|continue\\)\\>") + (goto-char here)))) + +;; go to point right beyond final line of block begun by the current +;; line. This is the same as where py-goto-beyond-final-line goes +;; unless we're on colon line, in which case we go to the end of the +;; block. assumes point is at bolp +(defun py-goto-beyond-block () + (if (py-statement-opens-block-p) + (py-mark-block nil 'just-move) + (py-goto-beyond-final-line))) + +;; go to start of first statement (not blank or comment or +;; continuation line) at or preceding point. returns t if there is +;; one, else nil +(defun py-goto-statement-at-or-above () + (py-goto-initial-line) + (if (looking-at py-blank-or-comment-re) + ;; skip back over blank & comment lines + ;; note: will skip a blank or comment line that happens to be + ;; a continuation line too + (if (re-search-backward "^[ \t]*[^ \t#\n]" nil t) + (progn (py-goto-initial-line) t) + nil) + t)) + +;; go to start of first statement (not blank or comment or +;; continuation line) following the statement containing point returns +;; t if there is one, else nil +(defun py-goto-statement-below () + (beginning-of-line) + (let ((start (point))) + (py-goto-beyond-final-line) + (while (and + (looking-at py-blank-or-comment-re) + (not (eobp))) + (forward-line 1)) + (if (eobp) + (progn (goto-char start) nil) + t))) + +;; go to start of statement, at or preceding point, starting with +;; keyword KEY. Skips blank lines and non-indenting comments upward +;; first. If that statement starts with KEY, done, else go back to +;; first enclosing block starting with KEY. If successful, leaves +;; point at the start of the KEY line & returns t. Else leaves point +;; at an undefined place & returns nil. +(defun py-go-up-tree-to-keyword (key) + ;; skip blanks and non-indenting # + (py-goto-initial-line) + (while (and + (looking-at "[ \t]*\\($\\|#[^ \t\n]\\)") + (zerop (forward-line -1))) ; go back + nil) + (py-goto-initial-line) + (let* ((re (concat "[ \t]*" key "\\b")) + (case-fold-search nil) ; let* so looking-at sees this + (found (looking-at re)) + (dead nil)) + (while (not (or found dead)) + (condition-case nil ; in case no enclosing block + (py-goto-block-up 'no-mark) + (error (setq dead t))) + (or dead (setq found (looking-at re)))) + (beginning-of-line) + found)) + +;; return string in buffer from start of indentation to end of line; +;; prefix "..." if leading whitespace was skipped +(defun py-suck-up-leading-text () + (save-excursion + (back-to-indentation) + (concat + (if (bolp) "" "...") + (buffer-substring (point) (progn (end-of-line) (point)))))) + +;; assuming point at bolp, return first keyword ([a-z]+) on the line, +;; as a Lisp symbol; return nil if none +(defun py-suck-up-first-keyword () + (let ((case-fold-search nil)) + (if (looking-at "[ \t]*\\([a-z]+\\)\\b") + (intern (buffer-substring (match-beginning 1) (match-end 1))) + nil))) + +(defun py-make-temp-name () + (make-temp-name + (concat (file-name-as-directory py-temp-directory) "python"))) + +(defun py-delete-file-silently (fname) + (condition-case nil + (delete-file fname) + (error nil))) + +(defun py-kill-emacs-hook () + ;; delete our temp files + (while py-file-queue + (py-delete-file-silently (car py-file-queue)) + (setq py-file-queue (cdr py-file-queue))) + (if (not (or py-this-is-lucid-emacs-p py-this-is-emacs-19-p)) + ;; run the hook we inherited, if any + (and py-inherited-kill-emacs-hook + (funcall py-inherited-kill-emacs-hook)))) + +;; make PROCESS's buffer visible, append STRING to it, and force +;; display; also make shell-mode believe the user typed this string, +;; so that kill-output-from-shell and show-output-from-shell work +;; "right" +(defun py-append-to-process-buffer (process string) + (let ((cbuf (current-buffer)) + (pbuf (process-buffer process)) + (py-scroll-process-buffer t)) + (set-buffer pbuf) + (goto-char (point-max)) + (move-marker (process-mark process) (point)) + (if (not (or py-this-is-emacs-19-p + py-this-is-lucid-emacs-p)) + (move-marker last-input-start (point))) ; muck w/ shell-mode + (funcall (process-filter process) process string) + (if (not (or py-this-is-emacs-19-p + py-this-is-lucid-emacs-p)) + (move-marker last-input-end (point))) ; muck w/ shell-mode + (set-buffer cbuf)) + (sit-for 0)) + + + +(defconst py-version "2.67" + "`python-mode' version number.") +(defconst py-help-address "python-mode@python.org" + "Address accepting submission of bug reports.") + +(defun py-version () + "Echo the current version of `python-mode' in the minibuffer." + (interactive) + (message "Using `python-mode' version %s" py-version) + (py-keep-region-active)) + +;; only works under Emacs 19 +;(eval-when-compile +; (require 'reporter)) + +(defun py-submit-bug-report (enhancement-p) + "Submit via mail a bug report on `python-mode'. +With \\[universal-argument] just submit an enhancement request." + (interactive + (list (not (y-or-n-p + "Is this a bug report? (hit `n' to send other comments) ")))) + (let ((reporter-prompt-for-summary-p (if enhancement-p + "(Very) brief summary: " + t))) + (require 'reporter) + (reporter-submit-bug-report + py-help-address ;address + (concat "python-mode " py-version) ;pkgname + ;; varlist + (if enhancement-p nil + '(py-python-command + py-indent-offset + py-block-comment-prefix + py-scroll-process-buffer + py-temp-directory + py-beep-if-tab-change)) + nil ;pre-hooks + nil ;post-hooks + "Dear Barry,") ;salutation + (if enhancement-p nil + (set-mark (point)) + (insert +"Please replace this text with a sufficiently large code sample\n\ +and an exact recipe so that I can reproduce your problem. Failure\n\ +to do so may mean a greater delay in fixing your bug.\n\n") + (exchange-point-and-mark) + (py-keep-region-active)))) + + +;; arrange to kill temp files when Emacs exists +(if (or py-this-is-emacs-19-p py-this-is-lucid-emacs-p) + (add-hook 'kill-emacs-hook 'py-kill-emacs-hook) + ;; have to trust that other people are as respectful of our hook + ;; fiddling as we are of theirs + (if (boundp 'py-inherited-kill-emacs-hook) + ;; we were loaded before -- trust others not to have screwed us + ;; in the meantime (no choice, really) + nil + ;; else arrange for our hook to run theirs + (setq py-inherited-kill-emacs-hook kill-emacs-hook) + (setq kill-emacs-hook 'py-kill-emacs-hook))) + + + +(provide 'python-mode) +;;; python-mode.el ends here
--- a/lisp/modes/scheme.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/modes/scheme.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,8 +1,9 @@ ;;; scheme.el --- Scheme mode, and its idiosyncratic commands. -;; Keywords: languages, lisp ;; Copyright (C) 1986, 1987, 1988 Free Software Foundation, Inc. -;; Adapted from Lisp mode by Bill Rozas, jinx@prep. + +;; Author: Bill Rozas <jinz@prep.ai.mit.edu> +;; Keywords: languages, lisp ;; This file is part of XEmacs. @@ -18,14 +19,19 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. +;;; Synched up with: FSF 19.34. +;;; Commentary: + +;; Adapted from Lisp mode by Bill Rozas, jinx@prep. ;; Initially a query replace of Lisp mode, except for the indentation ;; of special forms. Probably the code should be merged at some point ;; so that there is sharing between both libraries. -(provide 'scheme) +;;; Code: (defvar scheme-mode-syntax-table nil "") (if (not scheme-mode-syntax-table) @@ -88,21 +94,27 @@ (set-syntax-table scheme-mode-syntax-table) (setq local-abbrev-table scheme-mode-abbrev-table) (make-local-variable 'paragraph-start) - (setq paragraph-start (concat "^$\\|" page-delimiter)) + (setq paragraph-start (concat "$\\|" page-delimiter)) (make-local-variable 'paragraph-separate) (setq paragraph-separate paragraph-start) (make-local-variable 'paragraph-ignore-fill-prefix) (setq paragraph-ignore-fill-prefix t) (make-local-variable 'indent-line-function) (setq indent-line-function 'scheme-indent-line) + (make-local-variable 'parse-sexp-ignore-comments) + (setq parse-sexp-ignore-comments t) (make-local-variable 'comment-start) (setq comment-start ";") (make-local-variable 'comment-start-skip) - (setq comment-start-skip ";+[ \t]*") + ;; Look within the line for a ; following an even number of backslashes + ;; after either a non-backslash or the line beginning. + (setq comment-start-skip "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+[ \t]*") (make-local-variable 'comment-column) (setq comment-column 40) - (make-local-variable 'comment-indent-hook) - (setq comment-indent-hook 'scheme-comment-indent) + (make-local-variable 'comment-indent-function) + (setq comment-indent-function 'scheme-comment-indent) + (make-local-variable 'parse-sexp-ignore-comments) + (setq parse-sexp-ignore-comments t) (setq mode-line-process '("" scheme-mode-line-process))) (defvar scheme-mode-line-process "") @@ -265,7 +277,7 @@ (if first-sexp-list-p (setq desired-indent (current-column))) ;; Point is at the point to indent under unless we are inside a string. - ;; Call indentation hook except when overriden by scheme-indent-offset + ;; Call indentation hook except when overridden by scheme-indent-offset ;; or if the desired indentation has already been computed. (cond ((car (nthcdr 3 state)) ;; Inside a string, don't change indentation. @@ -378,7 +390,7 @@ (defun scheme-let-indent (state indent-point) (skip-chars-forward " \t") - (if (looking-at "[a-zA-Z0-9+-*/?!@$%^&_:~]") + (if (looking-at "[-a-zA-Z0-9+*/?!@$%^&_:~]") (scheme-indent-specform 2 state indent-point) (scheme-indent-specform 1 state indent-point))) @@ -493,8 +505,13 @@ (if (integerp val) (setcar indent-stack (setq this-indent val)) - (setcar indent-stack (- (car (cdr val)))) + (if (cdr val) + (setcar indent-stack (- (car (cdr val))))) (setq this-indent (car val))))) (if (/= (current-column) this-indent) (progn (delete-region bol (point)) (indent-to this-indent))))))))) + +(provide 'scheme) + +;;; scheme.el ends here
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/modes/sh-script.el Mon Aug 13 08:46:35 2007 +0200 @@ -0,0 +1,1397 @@ +;;; sh-script.el --- shell-script editing commands for Emacs + +;; Copyright (C) 1993, 1994, 1995, 1996 by Free Software Foundation, Inc. + +;; Author: Daniel.Pfeiffer@Informatik.START.dbp.de, fax (+49 69) 7588-2389 +;; Version: 2.0e +;; Maintainer: FSF +;; Keywords: languages, unix + +;; This file is part of XEmacs. + +;; XEmacs 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. + +;; XEmacs 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 XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. + +;;; Synched up with: FSF 19.34. + +;;; Commentary: + +;; Major mode for editing shell scripts. Bourne, C and rc shells as well +;; as various derivatives are supported and easily derived from. Structured +;; statements can be inserted with one command or abbrev. Completion is +;; available for filenames, variables known from the script, the shell and +;; the environment as well as commands. + +;;; Known Bugs: + +;; - In Bourne the keyword `in' is not anchored to case, for, select ... +;; - Variables in `"' strings aren't fontified because there's no way of +;; syntactically distinguishing those from `'' strings. + +;;; Code: + +;; page 1: variables and settings +;; page 2: mode-command and utility functions +;; page 3: statement syntax-commands for various shells +;; page 4: various other commands + +(require 'executable) + +(defvar sh-ancestor-alist + '((ash . sh) + (bash . jsh) + (dtksh . ksh) + (es . rc) + (itcsh . tcsh) + (jcsh . csh) + (jsh . sh) + (ksh . ksh88) + (ksh88 . jsh) + (oash . sh) + (pdksh . ksh88) + (posix . sh) + (tcsh . csh) + (wksh . ksh88) + (wsh . sh) + (zsh . ksh88)) + "*Alist showing the direct ancestor of various shells. +This is the basis for `sh-feature'. See also `sh-alias-alist'. +By default we have the following three hierarchies: + +csh C Shell + jcsh C Shell with Job Control + tcsh Toronto C Shell + itcsh ? Toronto C Shell +rc Plan 9 Shell + es Extensible Shell +sh Bourne Shell + ash ? Shell + jsh Bourne Shell with Job Control + bash GNU Bourne Again Shell + ksh88 Korn Shell '88 + ksh Korn Shell '93 + dtksh CDE Desktop Korn Shell + pdksh Public Domain Korn Shell + wksh Window Korn Shell + zsh Z Shell + oash SCO OA (curses) Shell + posix IEEE 1003.2 Shell Standard + wsh ? Shell") + + +(defvar sh-alias-alist + ;; XEmacs: Linux is spelled `linux' + (nconc (if (eq system-type 'linux) + '((csh . tcsh) + (ksh . pdksh))) + ;; for the time being + '((ksh . ksh88) + (sh5 . sh))) + "*Alist for transforming shell names to what they really are. +Use this where the name of the executable doesn't correspond to the type of +shell it really is.") + + +(defvar sh-shell-file (or (getenv "SHELL") "/bin/sh") + "*The executable file name for the shell being programmed.") + + +(defvar sh-shell-arg + ;; bash does not need any options when run in a shell script, + '((bash) + (csh . "-f") + (pdksh) + ;; Bill_Mann@praxisint.com says -p with ksh can do harm. + (ksh88) + ;; -p means don't initialize functions from the environment. + (rc . "-p") + ;; Someone proposed -motif, but we don't want to encourage + ;; use of a non-free widget set. + (wksh) + ;; -f means don't run .zshrc. + (zsh . "-f")) + "*Single argument string for the magic number. See `sh-feature'.") + +(defvar sh-shell-variables nil + "Alist of shell variable names that should be included in completion. +These are used for completion in addition to all the variables named +in `process-environment'. Each element looks like (VAR . VAR), where +the car and cdr are the same symbol.") + +(defvar sh-shell-variables-initialized nil + "Non-nil if `sh-shell-variables' is initialized.") + +(defun sh-canonicalize-shell (shell) + "Convert a shell name SHELL to the one we should handle it as." + (or (symbolp shell) + (setq shell (intern shell))) + (or (cdr (assq shell sh-alias-alist)) + shell)) + +(defvar sh-shell (sh-canonicalize-shell (file-name-nondirectory sh-shell-file)) + "The shell being programmed. This is set by \\[sh-set-shell].") + +;;; I turned off this feature because it doesn't permit typing commands +;;; in the usual way without help. +;;;(defvar sh-abbrevs +;;; '((csh eval sh-abbrevs shell +;;; "switch" 'sh-case +;;; "getopts" 'sh-while-getopts) + +;;; (es eval sh-abbrevs shell +;;; "function" 'sh-function) + +;;; (ksh88 eval sh-abbrevs sh +;;; "select" 'sh-select) + +;;; (rc eval sh-abbrevs shell +;;; "case" 'sh-case +;;; "function" 'sh-function) + +;;; (sh eval sh-abbrevs shell +;;; "case" 'sh-case +;;; "function" 'sh-function +;;; "until" 'sh-until +;;; "getopts" 'sh-while-getopts) + +;;; ;; The next entry is only used for defining the others +;;; (shell "for" sh-for +;;; "loop" sh-indexed-loop +;;; "if" sh-if +;;; "tmpfile" sh-tmp-file +;;; "while" sh-while) + +;;; (zsh eval sh-abbrevs ksh88 +;;; "repeat" 'sh-repeat)) +;;; "Abbrev-table used in Shell-Script mode. See `sh-feature'. +;;;Due to the internal workings of abbrev tables, the shell name symbol is +;;;actually defined as the table for the like of \\[edit-abbrevs].") + + + +(defvar sh-mode-syntax-table + '((csh eval identity sh) + (sh eval sh-mode-syntax-table () + ;; #'s meanings depend on context which can't be expressed here + ;; ?\# "<" + ;; ?\^l ">#" + ;; ?\n ">#" + ?\" "\"\"" + ?\' "\"'" + ?\` ".`" + ?$ "_" + ?! "_" + ?% "_" + ?: "_" + ?. "_" + ?^ "_" + ?~ "_") + (rc eval sh-mode-syntax-table sh + ?\" "_" + ?\` ".")) + "Syntax-table used in Shell-Script mode. See `sh-feature'.") + + + +(defvar sh-mode-map + (let ((map (make-sparse-keymap)) + (menu-map (make-sparse-keymap "Insert"))) + (define-key map "\C-c(" 'sh-function) + (define-key map "\C-c\C-w" 'sh-while) + (define-key map "\C-c\C-u" 'sh-until) + (define-key map "\C-c\C-t" 'sh-tmp-file) + (define-key map "\C-c\C-s" 'sh-select) + (define-key map "\C-c\C-r" 'sh-repeat) + (define-key map "\C-c\C-o" 'sh-while-getopts) + (define-key map "\C-c\C-l" 'sh-indexed-loop) + (define-key map "\C-c\C-i" 'sh-if) + (define-key map "\C-c\C-f" 'sh-for) + (define-key map "\C-c\C-c" 'sh-case) + + (define-key map "=" 'sh-assignment) + (define-key map "\C-c+" 'sh-add) + (define-key map "\C-\M-x" 'sh-execute-region) + (define-key map "\C-c\C-x" 'executable-interpret) + (define-key map "<" 'sh-maybe-here-document) + (define-key map "(" 'skeleton-pair-insert-maybe) + (define-key map "{" 'skeleton-pair-insert-maybe) + (define-key map "[" 'skeleton-pair-insert-maybe) + (define-key map "'" 'skeleton-pair-insert-maybe) + (define-key map "`" 'skeleton-pair-insert-maybe) + (define-key map "\"" 'skeleton-pair-insert-maybe) + + (define-key map "\t" 'sh-indent-line) + (substitute-key-definition 'complete-tag 'comint-dynamic-complete + map (current-global-map)) + (substitute-key-definition 'newline-and-indent 'sh-newline-and-indent + map (current-global-map)) + (substitute-key-definition 'delete-backward-char + 'backward-delete-char-untabify + map (current-global-map)) + (define-key map "\C-c:" 'sh-set-shell) + (substitute-key-definition 'beginning-of-defun + 'sh-beginning-of-compound-command + map (current-global-map)) + (substitute-key-definition 'backward-sentence 'sh-beginning-of-command + map (current-global-map)) + (substitute-key-definition 'forward-sentence 'sh-end-of-command + map (current-global-map)) + (define-key map [menu-bar insert] (cons "Insert" menu-map)) + (define-key menu-map [sh-while] '("While Loop" . sh-while)) + (define-key menu-map [sh-until] '("Until Loop" . sh-until)) + (define-key menu-map [sh-tmp-file] '("Temporary File" . sh-tmp-file)) + (define-key menu-map [sh-select] '("Select Statement" . sh-select)) + (define-key menu-map [sh-repeat] '("Repeat Loop" . sh-repeat)) + (define-key menu-map [sh-while-getopts] + '("Options Loop" . sh-while-getopts)) + (define-key menu-map [sh-indexed-loop] + '("Indexed Loop" . sh-indexed-loop)) + (define-key menu-map [sh-if] '("If Statement" . sh-if)) + (define-key menu-map [sh-for] '("For Loop" . sh-for)) + (define-key menu-map [sh-case] '("Case Statement" . sh-case)) + map) + "Keymap used in Shell-Script mode.") + + + +(defvar sh-dynamic-complete-functions + '(shell-dynamic-complete-environment-variable + shell-dynamic-complete-command + comint-dynamic-complete-filename) + "*Functions for doing TAB dynamic completion.") + + +(defvar sh-require-final-newline + '((csh . t) + (pdksh . t) + (rc eval . require-final-newline) + (sh eval . require-final-newline)) + "*Value of `require-final-newline' in Shell-Script mode buffers. +See `sh-feature'.") + + +(defvar sh-comment-prefix + '((csh . "\\(^\\|[^$]\\|\\$[^{]\\)") + (rc eval identity csh) + (sh . "\\(^\\|[ \t|&;()]\\)")) + "*Regexp matching what may come before a comment `#'. +This must contain one \\(grouping\\) since it is the basis for fontifying +comments as well as for `comment-start-skip'. +See `sh-feature'.") + + +(defvar sh-assignment-regexp + '((csh . "\\<\\([a-zA-Z0-9_]+\\)\\(\\[.+\\]\\)?[ \t]*[-+*/%^]?=") + ;; actually spaces are only supported in let/(( ... )) + (ksh88 . "\\<\\([a-zA-Z0-9_]+\\)\\(\\[.+\\]\\)?[ \t]*\\([-+*/%&|~^]\\|<<\\|>>\\)?=") + (rc . "\\<\\([a-zA-Z0-9_*]+\\)[ \t]*=") + (sh . "\\<\\([a-zA-Z0-9_]+\\)=")) + "*Regexp for the variable name and what may follow in an assignment. +First grouping matches the variable name. This is upto and including the `=' +sign. See `sh-feature'.") + + +(defvar sh-indentation 4 + "The width for further indentation in Shell-Script mode.") + + +(defvar sh-remember-variable-min 3 + "*Don't remember variables less than this length for completing reads.") + + +(defvar sh-header-marker nil + "When non-`nil' is the end of header for prepending by \\[sh-execute-region]. +That command is also used for setting this variable.") + + +(defvar sh-beginning-of-command + "\\([;({`|&]\\|\\`\\|[^\\]\n\\)[ \t]*\\([/~a-zA-Z0-9:]\\)" + "*Regexp to determine the beginning of a shell command. +The actual command starts at the beginning of the second \\(grouping\\).") + + +(defvar sh-end-of-command + "\\([/~a-zA-Z0-9:]\\)[ \t]*\\([;#)}`|&]\\|$\\)" + "*Regexp to determine the end of a shell command. +The actual command ends at the end of the first \\(grouping\\).") + + + +(defvar sh-here-document-word "EOF" + "Word to delimit here documents.") + +(defvar sh-test + '((sh "[ ]" . 3) + (ksh88 "[[ ]]" . 4)) + "Initial input in Bourne if, while and until skeletons. See `sh-feature'.") + + +(defvar sh-builtins + '((bash eval sh-append posix + "alias" "bg" "bind" "builtin" "declare" "dirs" "enable" "fc" "fg" + "help" "history" "jobs" "kill" "let" "local" "popd" "pushd" "source" + "suspend" "typeset" "unalias") + + ;; The next entry is only used for defining the others + (bourne eval sh-append shell + "eval" "export" "getopts" "newgrp" "pwd" "read" "readonly" + "times" "ulimit") + + (csh eval sh-append shell + "alias" "chdir" "glob" "history" "limit" "nice" "nohup" "rehash" + "setenv" "source" "time" "unalias" "unhash") + + (dtksh eval identity wksh) + + (es "access" "apids" "cd" "echo" "eval" "false" "let" "limit" "local" + "newpgrp" "result" "time" "umask" "var" "vars" "wait" "whatis") + + (jsh eval sh-append sh + "bg" "fg" "jobs" "kill" "stop" "suspend") + + (jcsh eval sh-append csh + "bg" "fg" "jobs" "kill" "notify" "stop" "suspend") + + (ksh88 eval sh-append bourne + "alias" "bg" "false" "fc" "fg" "jobs" "kill" "let" "print" "time" + "typeset" "unalias" "whence") + + (oash eval sh-append sh + "checkwin" "dateline" "error" "form" "menu" "newwin" "oadeinit" + "oaed" "oahelp" "oainit" "pp" "ppfile" "scan" "scrollok" "wattr" + "wclear" "werase" "win" "wmclose" "wmmessage" "wmopen" "wmove" + "wmtitle" "wrefresh") + + (pdksh eval sh-append ksh88 + "bind") + + (posix eval sh-append sh + "command") + + (rc "builtin" "cd" "echo" "eval" "limit" "newpgrp" "shift" "umask" "wait" + "whatis") + + (sh eval sh-append bourne + "hash" "test" "type") + + ;; The next entry is only used for defining the others + (shell "cd" "echo" "eval" "set" "shift" "umask" "unset" "wait") + + (wksh eval sh-append ksh88 + "Xt[A-Z][A-Za-z]*") + + (zsh eval sh-append ksh88 + "autoload" "bindkey" "builtin" "chdir" "compctl" "declare" "dirs" + "disable" "disown" "echotc" "enable" "functions" "getln" "hash" + "history" "integer" "limit" "local" "log" "popd" "pushd" "r" + "readonly" "rehash" "sched" "setopt" "source" "suspend" "true" + "ttyctl" "type" "unfunction" "unhash" "unlimit" "unsetopt" "vared" + "which")) + "*List of all shell builtins for completing read and fontification. +Note that on some systems not all builtins are available or some are +implemented as aliases. See `sh-feature'.") + + + +(defvar sh-leading-keywords + '((csh "else") + + (es "true" "unwind-protect" "whatis") + + (rc "else") + + (sh "do" "elif" "else" "if" "then" "trap" "type" "until" "while")) + "*List of keywords that may be immediately followed by a builtin or keyword. +Given some confusion between keywords and builtins depending on shell and +system, the distinction here has been based on whether they influence the +flow of control or syntax. See `sh-feature'.") + + +(defvar sh-other-keywords + '((bash eval sh-append bourne + "bye" "logout") + + ;; The next entry is only used for defining the others + (bourne eval sh-append shell + "done" "esac" "fi" "for" "function" "in" "return") + + (csh eval sh-append shell + "breaksw" "default" "end" "endif" "endsw" "foreach" "goto" + "if" "logout" "onintr" "repeat" "switch" "then" "while") + + (es "break" "catch" "exec" "exit" "fn" "for" "forever" "fork" "if" + "return" "throw" "while") + + (ksh88 eval sh-append bourne + "select") + + (rc "break" "case" "exec" "exit" "fn" "for" "if" "in" "return" "switch" + "while") + + ;; The next entry is only used for defining the others + (shell "break" "case" "continue" "exec" "exit") + + (zsh eval sh-append bash + "select")) + "*List of keywords not in `sh-leading-keywords'. +See `sh-feature'.") + + + +(defvar sh-variables + '((bash eval sh-append sh + "allow_null_glob_expansion" "auto_resume" "BASH" "BASH_VERSION" + "cdable_vars" "ENV" "EUID" "FCEDIT" "FIGNORE" "glob_dot_filenames" + "histchars" "HISTFILE" "HISTFILESIZE" "history_control" "HISTSIZE" + "hostname_completion_file" "HOSTTYPE" "IGNOREEOF" "ignoreeof" + "LINENO" "MAIL_WARNING" "noclobber" "nolinks" "notify" + "no_exit_on_failed_exec" "NO_PROMPT_VARS" "OLDPWD" "OPTERR" "PPID" + "PROMPT_COMMAND" "PS4" "pushd_silent" "PWD" "RANDOM" "REPLY" + "SECONDS" "SHLVL" "TMOUT" "UID") + + (csh eval sh-append shell + "argv" "cdpath" "child" "echo" "histchars" "history" "home" + "ignoreeof" "mail" "noclobber" "noglob" "nonomatch" "path" "prompt" + "shell" "status" "time" "verbose") + + (es eval sh-append shell + "apid" "cdpath" "CDPATH" "history" "home" "ifs" "noexport" "path" + "pid" "prompt" "signals") + + (jcsh eval sh-append csh + "notify") + + (ksh88 eval sh-append sh + "ENV" "ERRNO" "FCEDIT" "FPATH" "HISTFILE" "HISTSIZE" "LINENO" + "OLDPWD" "PPID" "PS3" "PS4" "PWD" "RANDOM" "REPLY" "SECONDS" + "TMOUT") + + (oash eval sh-append sh + "FIELD" "FIELD_MAX" "LAST_KEY" "OALIB" "PP_ITEM" "PP_NUM") + + (rc eval sh-append shell + "apid" "apids" "cdpath" "CDPATH" "history" "home" "ifs" "path" "pid" + "prompt" "status") + + (sh eval sh-append shell + "CDPATH" "IFS" "OPTARG" "OPTIND" "PS1" "PS2") + + ;; The next entry is only used for defining the others + (shell "COLUMNS" "EDITOR" "HOME" "HUSHLOGIN" "LANG" "LC_COLLATE" + "LC_CTYPE" "LC_MESSAGES" "LC_MONETARY" "LC_NUMERIC" "LC_TIME" + "LINES" "LOGNAME" "MAIL" "MAILCHECK" "MAILPATH" "PAGER" "PATH" + "SHELL" "TERM" "TERMCAP" "TERMINFO" "VISUAL") + + (tcsh eval sh-append csh + "addsuffix" "ampm" "autocorrect" "autoexpand" "autolist" + "autologout" "chase_symlinks" "correct" "dextract" "edit" "el" + "fignore" "gid" "histlit" "HOST" "HOSTTYPE" "HPATH" + "ignore_symlinks" "listjobs" "listlinks" "listmax" "matchbeep" + "nobeep" "NOREBIND" "oid" "printexitvalue" "prompt2" "prompt3" + "pushdsilent" "pushdtohome" "recexact" "recognize_only_executables" + "rmstar" "savehist" "SHLVL" "showdots" "sl" "SYSTYPE" "tcsh" "term" + "tperiod" "tty" "uid" "version" "visiblebell" "watch" "who" + "wordchars") + + (zsh eval sh-append ksh88 + "BAUD" "bindcmds" "cdpath" "DIRSTACKSIZE" "fignore" "FIGNORE" "fpath" + "HISTCHARS" "hostcmds" "hosts" "HOSTS" "LISTMAX" "LITHISTSIZE" + "LOGCHECK" "mailpath" "manpath" "NULLCMD" "optcmds" "path" "POSTEDIT" + "prompt" "PROMPT" "PROMPT2" "PROMPT3" "PROMPT4" "psvar" "PSVAR" + "READNULLCMD" "REPORTTIME" "RPROMPT" "RPS1" "SAVEHIST" "SPROMPT" + "STTY" "TIMEFMT" "TMOUT" "TMPPREFIX" "varcmds" "watch" "WATCH" + "WATCHFMT" "WORDCHARS" "ZDOTDIR")) + "List of all shell variables available for completing read. +See `sh-feature'.") + + + +(defvar sh-font-lock-keywords + '((csh eval sh-append shell + '("\\${?[#?]?\\([A-Za-z_][A-Za-z0-9_]*\\|0\\)" 1 + font-lock-variable-name-face)) + + (es eval sh-append executable-font-lock-keywords + '("\\$#?\\([A-Za-z_][A-Za-z0-9_]*\\|[0-9]+\\)" 1 + font-lock-variable-name-face)) + + (rc eval identity es) + + (sh eval sh-append shell + '("\\$\\({#?\\)?\\([A-Za-z_][A-Za-z0-9_]*\\|[-#?@!]\\)" 2 + font-lock-variable-name-face)) + + ;; The next entry is only used for defining the others + (shell eval sh-append executable-font-lock-keywords + '("\\\\[^A-Za-z0-9]" 0 font-lock-string-face) + '("\\${?\\([A-Za-z_][A-Za-z0-9_]*\\|[0-9]+\\|[$*_]\\)" 1 + font-lock-variable-name-face))) + "*Rules for highlighting shell scripts. See `sh-feature'.") + +(defvar sh-font-lock-keywords-1 + '((sh "[ \t]in\\>")) + "*Additional rules for highlighting shell scripts. See `sh-feature'.") + +(defvar sh-font-lock-keywords-2 () + "*Yet more rules for highlighting shell scripts. See `sh-feature'.") + +(defvar sh-font-lock-keywords-only t + "*Value of `font-lock-keywords-only' for highlighting shell scripts. +Default value is `t' because Emacs' syntax is not expressive enough to +detect that $# does not start a comment. Thus comments are fontified by +regexp which means that a single apostrophe in a comment turns everything +upto the next one or end of buffer into a string.") + +;; mode-command and utility functions + +;;;###autoload +(put 'sh-mode 'mode-class 'special) + +;;;###autoload +(defun sh-mode () + "Major mode for editing shell scripts. +This mode works for many shells, since they all have roughly the same syntax, +as far as commands, arguments, variables, pipes, comments etc. are concerned. +Unless the file's magic number indicates the shell, your usual shell is +assumed. Since filenames rarely give a clue, they are not further analyzed. + +This mode adapts to the variations between shells (see `sh-set-shell') by +means of an inheritance based feature lookup (see `sh-feature'). This +mechanism applies to all variables (including skeletons) that pertain to +shell-specific features. + +The default style of this mode is that of Rosenblatt's Korn shell book. +The syntax of the statements varies with the shell being used. The +following commands are available, based on the current shell's syntax: + +\\[sh-case] case statement +\\[sh-for] for loop +\\[sh-function] function definition +\\[sh-if] if statement +\\[sh-indexed-loop] indexed loop from 1 to n +\\[sh-while-getopts] while getopts loop +\\[sh-repeat] repeat loop +\\[sh-select] select loop +\\[sh-until] until loop +\\[sh-while] while loop + +\\[backward-delete-char-untabify] Delete backward one position, even if it was a tab. +\\[sh-newline-and-indent] Delete unquoted space and indent new line same as this one. +\\[sh-end-of-command] Go to end of successive commands. +\\[sh-beginning-of-command] Go to beginning of successive commands. +\\[sh-set-shell] Set this buffer's shell, and maybe its magic number. +\\[sh-execute-region] Have optional header and region be executed in a subshell. + +\\[sh-maybe-here-document] Without prefix, following an unquoted < inserts here document. +{, (, [, ', \", ` + Unless quoted with \\, insert the pairs {}, (), [], or '', \"\", ``. + +If you generally program a shell different from your login shell you can +set `sh-shell-file' accordingly. If your shell's file name doesn't correctly +indicate what shell it is use `sh-alias-alist' to translate. + +If your shell gives error messages with line numbers, you can use \\[executable-interpret] +with your script for an edit-interpret-debug cycle." + (interactive) + (kill-all-local-variables) + (use-local-map sh-mode-map) + (make-local-variable 'indent-line-function) + (make-local-variable 'indent-region-function) + (make-local-variable 'skeleton-end-hook) + (make-local-variable 'paragraph-start) + (make-local-variable 'paragraph-separate) + (make-local-variable 'comment-start) + (make-local-variable 'comment-start-skip) + (make-local-variable 'require-final-newline) + (make-local-variable 'sh-header-marker) + (make-local-variable 'sh-shell-file) + (make-local-variable 'sh-shell) + (make-local-variable 'skeleton-pair-alist) + (make-local-variable 'skeleton-pair-filter) + (make-local-variable 'comint-dynamic-complete-functions) + (make-local-variable 'comint-prompt-regexp) + (make-local-variable 'font-lock-keywords) + (make-local-variable 'font-lock-defaults) + (make-local-variable 'skeleton-filter) + (make-local-variable 'skeleton-newline-indent-rigidly) + (make-local-variable 'sh-shell-variables) + (make-local-variable 'sh-shell-variables-initialized) + (setq major-mode 'sh-mode + mode-name "Shell-script" + indent-line-function 'sh-indent-line + ;; not very clever, but enables wrapping skeletons around regions + indent-region-function (lambda (b e) + (save-excursion + (goto-char b) + (skip-syntax-backward "-") + (setq b (point)) + (goto-char e) + (skip-syntax-backward "-") + (indent-rigidly b (point) sh-indentation))) + skeleton-end-hook (lambda () + (or (eolp) (newline) (indent-relative))) + paragraph-start (concat page-delimiter "\\|$") + paragraph-separate paragraph-start + comment-start "# " + comint-dynamic-complete-functions sh-dynamic-complete-functions + ;; we can't look if previous line ended with `\' + comint-prompt-regexp "^[ \t]*" + font-lock-defaults + `((sh-font-lock-keywords + sh-font-lock-keywords-1 + sh-font-lock-keywords-2) + ,sh-font-lock-keywords-only + nil + ((?/ . "w") (?~ . "w") (?. . "w") (?- . "w") (?_ . "w"))) + skeleton-pair-alist '((?` _ ?`)) + skeleton-pair-filter 'sh-quoted-p + skeleton-further-elements '((< '(- (min sh-indentation + (current-column))))) + skeleton-filter 'sh-feature + skeleton-newline-indent-rigidly t) + (save-excursion + ;; parse or insert magic number for exec() and set all variables depending + ;; on the shell thus determined + (goto-char (point-min)) + (and (zerop (buffer-size)) + (not buffer-read-only) + (sh-set-shell sh-shell-file))) + (run-hooks 'sh-mode-hook)) +;;;###autoload +(defalias 'shell-script-mode 'sh-mode) + + +(defun sh-font-lock-keywords (&optional keywords) + "Function to get simple fontification based on `sh-font-lock-keywords'. +This adds rules for comments and assignments." + (sh-feature sh-font-lock-keywords + (lambda (list) + `((,(concat (sh-feature sh-comment-prefix) "\\(#.*\\)") + 2 font-lock-comment-face t) + (,(sh-feature sh-assignment-regexp) + 1 font-lock-variable-name-face) + ,@keywords + ,@list)))) + +(defun sh-font-lock-keywords-1 (&optional builtins) + "Function to get better fontification including keywords." + (let ((keywords (concat "\\([;(){}`|&]\\|^\\)[ \t]*\\(\\(\\(" + (mapconcat 'identity + (sh-feature sh-leading-keywords) + "\\|") + "\\)[ \t]+\\)?\\(" + (mapconcat 'identity + (append (sh-feature sh-leading-keywords) + (sh-feature sh-other-keywords)) + "\\|") + "\\)"))) + (sh-font-lock-keywords + `(,@(if builtins + `((,(concat keywords "[ \t]+\\)?\\(" + (mapconcat 'identity (sh-feature sh-builtins) "\\|") + "\\)\\>") + (2 font-lock-keyword-face nil t) + (6 font-lock-function-name-face)) + ,@(sh-feature sh-font-lock-keywords-2))) + (,(concat keywords "\\)\\>") + 2 font-lock-keyword-face) + ,@(sh-feature sh-font-lock-keywords-1))))) + +(defun sh-font-lock-keywords-2 () + "Function to get better fontification including keywords and builtins." + (sh-font-lock-keywords-1 t)) + + +(defun sh-set-shell (shell &optional no-query-flag insert-flag) + "Set this buffer's shell to SHELL (a string). +Makes this script executable via `executable-set-magic'. +Calls the value of `sh-set-shell-hook' if set." + (interactive (list (completing-read "Name or path of shell: " + interpreter-mode-alist + (lambda (x) (eq (cdr x) 'sh-mode))) + (eq executable-query 'function) + t)) + (setq sh-shell (intern (file-name-nondirectory shell)) + sh-shell (or (cdr (assq sh-shell sh-alias-alist)) + sh-shell)) + (setq sh-shell-file (executable-set-magic shell (sh-feature sh-shell-arg))) + (setq require-final-newline (sh-feature sh-require-final-newline) +;;; local-abbrev-table (sh-feature sh-abbrevs) + font-lock-keywords nil ; force resetting + font-lock-syntax-table nil + comment-start-skip (concat (sh-feature sh-comment-prefix) "#+[\t ]*") + mode-line-process (format "[%s]" sh-shell) + sh-shell-variables nil + sh-shell-variables-initialized nil + shell (sh-feature sh-variables)) + (set-syntax-table (sh-feature sh-mode-syntax-table)) + (while shell + (sh-remember-variable (car shell)) + (setq shell (cdr shell))) + (and (boundp 'font-lock-mode) + font-lock-mode + (font-lock-mode (font-lock-mode 0))) + (run-hooks 'sh-set-shell-hook)) + + + +(defun sh-feature (list &optional function) + "Index ALIST by the current shell. +If ALIST isn't a list where every element is a cons, it is returned as is. +Else indexing follows an inheritance logic which works in two ways: + + - Fall back on successive ancestors (see `sh-ancestor-alist') as long as + the alist contains no value for the current shell. + + - If the value thus looked up is a list starting with `eval' its `cdr' is + first evaluated. If that is also a list and the first argument is a + symbol in ALIST it is not evaluated, but rather recursively looked up in + ALIST to allow the function called to define the value for one shell to be + derived from another shell. While calling the function, is the car of the + alist element is the current shell. + The value thus determined is physically replaced into the alist. + +Optional FUNCTION is applied to the determined value and the result is cached +in ALIST." + (or (if (consp list) + (let ((l list)) + (while (and l (consp (car l))) + (setq l (cdr l))) + (if l list))) + (if function + (cdr (assoc (setq function (cons sh-shell function)) list))) + (let ((sh-shell sh-shell) + elt val) + (while (and sh-shell + (not (setq elt (assq sh-shell list)))) + (setq sh-shell (cdr (assq sh-shell sh-ancestor-alist)))) + (if (and (consp (setq val (cdr elt))) + (eq (car val) 'eval)) + (setcdr elt + (setq val + (eval (if (consp (setq val (cdr val))) + (let ((sh-shell (car (cdr val))) + function) + (if (assq sh-shell list) + (setcar (cdr val) + (list 'quote + (sh-feature list)))) + val) + val))))) + (if function + (nconc list + (list (cons function + (setq sh-shell (car function) + val (funcall (cdr function) val)))))) + val))) + + + +;;; I commented this out because nobody calls it -- rms. +;;;(defun sh-abbrevs (ancestor &rest list) +;;; "Iff it isn't, define the current shell as abbrev table and fill that. +;;;Abbrev table will inherit all abbrevs from ANCESTOR, which is either an abbrev +;;;table or a list of (NAME1 EXPANSION1 ...). In addition it will define abbrevs +;;;according to the remaining arguments NAMEi EXPANSIONi ... +;;;EXPANSION may be either a string or a skeleton command." +;;; (or (if (boundp sh-shell) +;;; (symbol-value sh-shell)) +;;; (progn +;;; (if (listp ancestor) +;;; (nconc list ancestor)) +;;; (define-abbrev-table sh-shell ()) +;;; (if (vectorp ancestor) +;;; (mapatoms (lambda (atom) +;;; (or (eq atom 0) +;;; (define-abbrev (symbol-value sh-shell) +;;; (symbol-name atom) +;;; (symbol-value atom) +;;; (symbol-function atom)))) +;;; ancestor)) +;;; (while list +;;; (define-abbrev (symbol-value sh-shell) +;;; (car list) +;;; (if (stringp (car (cdr list))) +;;; (car (cdr list)) +;;; "") +;;; (if (symbolp (car (cdr list))) +;;; (car (cdr list)))) +;;; (setq list (cdr (cdr list))))) +;;; (symbol-value sh-shell))) + + +(defun sh-mode-syntax-table (table &rest list) + "Copy TABLE and set syntax for successive CHARs according to strings S." + (setq table (copy-syntax-table table)) + (while list + (modify-syntax-entry (car list) (car (cdr list)) table) + (setq list (cdr (cdr list)))) + table) + + +(defun sh-append (ancestor &rest list) + "Return list composed of first argument (a list) physically appended to rest." + (nconc list ancestor)) + + +(defun sh-modify (skeleton &rest list) + "Modify a copy of SKELETON by replacing I1 with REPL1, I2 with REPL2 ..." + (setq skeleton (copy-sequence skeleton)) + (while list + (setcar (or (nthcdr (car list) skeleton) + (error "Index %d out of bounds" (car list))) + (car (cdr list))) + (setq list (nthcdr 2 list))) + skeleton) + + +(defun sh-indent-line () + "Indent as far as preceding non-empty line, then by steps of `sh-indentation'. +Lines containing only comments are considered empty." + (interactive) + (let ((previous (save-excursion + (while (and (not (bobp)) + (progn + (forward-line -1) + (back-to-indentation) + (or (eolp) + (eq (following-char) ?#))))) + (current-column))) + current) + (save-excursion + (indent-to (if (eq this-command 'newline-and-indent) + previous + (if (< (current-column) + (setq current (progn (back-to-indentation) + (current-column)))) + (if (eolp) previous 0) + (delete-region (point) + (progn (beginning-of-line) (point))) + (if (eolp) + (max previous (* (1+ (/ current sh-indentation)) + sh-indentation)) + (* (1+ (/ current sh-indentation)) sh-indentation)))))) + (if (< (current-column) (current-indentation)) + (skip-chars-forward " \t")))) + + +(defun sh-execute-region (start end &optional flag) + "Pass optional header and region to a subshell for noninteractive execution. +The working directory is that of the buffer, and only environment variables +are already set which is why you can mark a header within the script. + +With a positive prefix ARG, instead of sending region, define header from +beginning of buffer to point. With a negative prefix ARG, instead of sending +region, clear header." + (interactive "r\nP") + (if flag + (setq sh-header-marker (if (> (prefix-numeric-value flag) 0) + (point-marker))) + (if sh-header-marker + (save-excursion + (let (buffer-undo-list) + (goto-char sh-header-marker) + (append-to-buffer (current-buffer) start end) + (shell-command-on-region (point-min) + (setq end (+ sh-header-marker + (- end start))) + sh-shell-file) + (delete-region sh-header-marker end))) + (shell-command-on-region start end (concat sh-shell-file " -"))))) + + +(defun sh-remember-variable (var) + "Make VARIABLE available for future completing reads in this buffer." + (or (< (length var) sh-remember-variable-min) + (getenv var) + (assoc var sh-shell-variables) + (setq sh-shell-variables (cons (cons var var) sh-shell-variables))) + var) + + + +(defun sh-quoted-p () + "Is point preceded by an odd number of backslashes?" + (eq -1 (% (save-excursion (skip-chars-backward "\\\\")) 2))) + +;; statement syntax-commands for various shells + +;; You are welcome to add the syntax or even completely new statements as +;; appropriate for your favorite shell. + +(define-skeleton sh-case + "Insert a case/switch statement. See `sh-feature'." + (csh "expression: " + "switch( " str " )" \n + > "case " (read-string "pattern: ") ?: \n + > _ \n + "breaksw" \n + ( "other pattern, %s: " + < "case " str ?: \n + > _ \n + "breaksw" \n) + < "default:" \n + > _ \n + resume: + < < "endsw") + (es) + (rc "expression: " + "switch( " str " ) {" \n + > "case " (read-string "pattern: ") \n + > _ \n + ( "other pattern, %s: " + < "case " str \n + > _ \n) + < "case *" \n + > _ \n + resume: + < < ?}) + (sh "expression: " + "case " str " in" \n + > (read-string "pattern: ") ?\) \n + > _ \n + ";;" \n + ( "other pattern, %s: " + < str ?\) \n + > _ \n + ";;" \n) + < "*)" \n + > _ \n + resume: + < < "esac")) +(put 'sh-case 'menu-enable '(sh-feature sh-case)) + + + +(define-skeleton sh-for + "Insert a for loop. See `sh-feature'." + (csh eval sh-modify sh + 1 "foreach " + 3 " ( " + 5 " )" + 15 "end") + (es eval sh-modify rc + 3 " = ") + (rc eval sh-modify sh + 1 "for( " + 5 " ) {" + 15 ?}) + (sh "Index variable: " + "for " str " in " _ "; do" \n + > _ | ?$ & (sh-remember-variable str) \n + < "done")) + + + +(define-skeleton sh-indexed-loop + "Insert an indexed loop from 1 to n. See `sh-feature'." + (bash eval identity posix) + (csh "Index variable: " + "@ " str " = 1" \n + "while( $" str " <= " (read-string "upper limit: ") " )" \n + > _ ?$ str \n + "@ " str "++" \n + < "end") + (es eval sh-modify rc + 3 " =") + (ksh88 "Index variable: " + "integer " str "=0" \n + "while (( ( " str " += 1 ) <= " + (read-string "upper limit: ") + " )); do" \n + > _ ?$ (sh-remember-variable str) \n + < "done") + (posix "Index variable: " + str "=1" \n + "while [ $" str " -le " + (read-string "upper limit: ") + " ]; do" \n + > _ ?$ str \n + str ?= (sh-add (sh-remember-variable str) 1) \n + < "done") + (rc "Index variable: " + "for( " str " in" " `{awk 'BEGIN { for( i=1; i<=" + (read-string "upper limit: ") + "; i++ ) print i }'}) {" \n + > _ ?$ (sh-remember-variable str) \n + < ?}) + (sh "Index variable: " + "for " str " in `awk 'BEGIN { for( i=1; i<=" + (read-string "upper limit: ") + "; i++ ) print i }'`; do" \n + > _ ?$ (sh-remember-variable str) \n + < "done")) + + +(defun sh-shell-initialize-variables () + "Scan the buffer for variable assignments. +Add these variables to `sh-shell-variables'." + (message "Scanning buffer `%s' for variable assignments..." (buffer-name)) + (save-excursion + (goto-char (point-min)) + (setq sh-shell-variables-initialized t) + (while (search-forward "=" nil t) + (sh-assignment 0))) + (message "Scanning buffer `%s' for variable assignments...done" + (buffer-name))) + +(defvar sh-add-buffer) + +(defun sh-add-completer (string predicate code) + "Do completion using `sh-shell-variables', but initialize it first. +This function is designed for use as the \"completion table\", +so it takes three arguments: + STRING, the current buffer contents; + PREDICATE, the predicate for filtering possible matches; + CODE, which says what kind of things to do. +CODE can be nil, t or `lambda'. +nil means to return the best completion of STRING, or nil if there is none. +t means to return a list of all possible completions of STRING. +`lambda' means to return t if STRING is a valid completion as it stands." + (let ((sh-shell-variables + (save-excursion + (set-buffer sh-add-buffer) + (or sh-shell-variables-initialized + (sh-shell-initialize-variables)) + (nconc (mapcar (lambda (var) + (let ((name + (substring var 0 (string-match "=" var)))) + (cons name name))) + process-environment) + sh-shell-variables)))) + (cond ((null code) + (try-completion string sh-shell-variables predicate)) + ((eq code t) + (all-completions string sh-shell-variables predicate)) + ((eq code 'lambda) + (assoc string sh-shell-variables))))) + +(defun sh-add (var delta) + "Insert an addition of VAR and prefix DELTA for Bourne (type) shell." + (interactive + (let ((sh-add-buffer (current-buffer))) + (list (completing-read "Variable: " 'sh-add-completer) + (prefix-numeric-value current-prefix-arg)))) + (insert (sh-feature '((bash . "$[ ") + (ksh88 . "$(( ") + (posix . "$(( ") + (rc . "`{expr $") + (sh . "`expr $") + (zsh . "$[ "))) + (sh-remember-variable var) + (if (< delta 0) " - " " + ") + (number-to-string (abs delta)) + (sh-feature '((bash . " ]") + (ksh88 . " ))") + (posix . " ))") + (rc . "}") + (sh . "`") + (zsh . " ]"))))) + + + +(define-skeleton sh-function + "Insert a function definition. See `sh-feature'." + (bash eval sh-modify ksh88 + 3 "() {") + (ksh88 "name: " + "function " str " {" \n + > _ \n + < "}") + (rc eval sh-modify ksh88 + 1 "fn ") + (sh () + "() {" \n + > _ \n + < "}")) + + + +(define-skeleton sh-if + "Insert an if statement. See `sh-feature'." + (csh "condition: " + "if( " str " ) then" \n + > _ \n + ( "other condition, %s: " + < "else if( " str " ) then" \n + > _ \n) + < "else" \n + > _ \n + resume: + < "endif") + (es "condition: " + "if { " str " } {" \n + > _ \n + ( "other condition, %s: " + < "} { " str " } {" \n + > _ \n) + < "} {" \n + > _ \n + resume: + < ?}) + (rc eval sh-modify csh + 3 " ) {" + 8 '( "other condition, %s: " + < "} else if( " str " ) {" \n + > _ \n) + 10 "} else {" + 17 ?}) + (sh "condition: " + '(setq input (sh-feature sh-test)) + "if " str "; then" \n + > _ \n + ( "other condition, %s: " + < "elif " str "; then" \n + > _ \n) + < "else" \n + > _ \n + resume: + < "fi")) + + + +(define-skeleton sh-repeat + "Insert a repeat loop definition. See `sh-feature'." + (es nil + "forever {" \n + > _ \n + < ?}) + (zsh "factor: " + "repeat " str "; do"\n + > _ \n + < "done")) +(put 'sh-repeat 'menu-enable '(sh-feature sh-repeat)) + + + +(define-skeleton sh-select + "Insert a select statement. See `sh-feature'." + (ksh88 "Index variable: " + "select " str " in " _ "; do" \n + > ?$ str \n + < "done")) +(put 'sh-select 'menu-enable '(sh-feature sh-select)) + + + +(define-skeleton sh-tmp-file + "Insert code to setup temporary file handling. See `sh-feature'." + (bash eval identity ksh88) + (csh (file-name-nondirectory (buffer-file-name)) + "set tmp = /tmp/" str ".$$" \n + "onintr exit" \n _ + (and (goto-char (point-max)) + (not (bolp)) + ?\n) + "exit:\n" + "rm $tmp* >&/dev/null" >) + (es (file-name-nondirectory (buffer-file-name)) + "local( signals = $signals sighup sigint; tmp = /tmp/" str ".$pid ) {" \n + > "catch @ e {" \n + > "rm $tmp^* >[2]/dev/null" \n + "throw $e" \n + < "} {" \n + > _ \n + < ?} \n + < ?}) + (ksh88 eval sh-modify sh + 6 "EXIT") + (rc (file-name-nondirectory (buffer-file-name)) + "tmp = /tmp/" str ".$pid" \n + "fn sigexit { rm $tmp^* >[2]/dev/null }") + (sh (file-name-nondirectory (buffer-file-name)) + "TMP=/tmp/" str ".$$" \n + "trap \"rm $TMP* 2>/dev/null\" " ?0)) + + + +(define-skeleton sh-until + "Insert an until loop. See `sh-feature'." + (sh "condition: " + '(setq input (sh-feature sh-test)) + "until " str "; do" \n + > _ \n + < "done")) +(put 'sh-until 'menu-enable '(sh-feature sh-until)) + + + +(define-skeleton sh-while + "Insert a while loop. See `sh-feature'." + (csh eval sh-modify sh + 2 "while( " + 4 " )" + 10 "end") + (es eval sh-modify rc + 2 "while { " + 4 " } {") + (rc eval sh-modify csh + 4 " ) {" + 10 ?}) + (sh "condition: " + '(setq input (sh-feature sh-test)) + "while " str "; do" \n + > _ \n + < "done")) + + + +(define-skeleton sh-while-getopts + "Insert a while getopts loop. See `sh-feature'. +Prompts for an options string which consists of letters for each recognized +option followed by a colon `:' if the option accepts an argument." + (bash eval sh-modify sh + 18 "${0##*/}") + (csh nil + "while( 1 )" \n + > "switch( \"$1\" )" \n + '(setq input '("- x" . 2)) + > > + ( "option, %s: " + < "case " '(eval str) + '(if (string-match " +" str) + (setq v1 (substring str (match-end 0)) + str (substring str 0 (match-beginning 0))) + (setq v1 nil)) + str ?: \n + > "set " v1 & " = $2" | -4 & _ \n + (if v1 "shift") & \n + "breaksw" \n) + < "case --:" \n + > "shift" \n + < "default:" \n + > "break" \n + resume: + < < "endsw" \n + "shift" \n + < "end") + (ksh88 eval sh-modify sh + 16 "print" + 18 "${0##*/}" + 36 "OPTIND-1") + (posix eval sh-modify sh + 18 "$(basename $0)") + (sh "optstring: " + "while getopts :" str " OPT; do" \n + > "case $OPT in" \n + > > + '(setq v1 (append (vconcat str) nil)) + ( (prog1 (if v1 (char-to-string (car v1))) + (if (eq (nth 1 v1) ?:) + (setq v1 (nthcdr 2 v1) + v2 "\"$OPTARG\"") + (setq v1 (cdr v1) + v2 nil))) + < str "|+" str ?\) \n + > _ v2 \n + ";;" \n) + < "*)" \n + > "echo" " \"usage: " "`basename $0`" + " [+-" '(setq v1 (point)) str + '(save-excursion + (while (search-backward ":" v1 t) + (replace-match " ARG] [+-" t t))) + (if (eq (preceding-char) ?-) -5) + "] [--] ARGS...\"" \n + "exit 2" \n + < < "esac" \n + < "done" \n + "shift " (sh-add "OPTIND" -1))) +(put 'sh-while-getopts 'menu-enable '(sh-feature sh-while-getopts)) + + + +(defun sh-assignment (arg) + "Remember preceding identifier for future completion and do self-insert." + (interactive "p") + (self-insert-command arg) + (if (<= arg 1) + (sh-remember-variable + (save-excursion + (if (re-search-forward (sh-feature sh-assignment-regexp) + (prog1 (point) + (beginning-of-line 1)) + t) + (match-string 1)))))) + + + +(defun sh-maybe-here-document (arg) + "Inserts self. Without prefix, following unquoted `<' inserts here document. +The document is bounded by `sh-here-document-word'." + (interactive "*P") + (self-insert-command (prefix-numeric-value arg)) + (or arg + (not (eq (char-after (- (point) 2)) last-command-char)) + (save-excursion + (backward-char 2) + (sh-quoted-p)) + (progn + (insert sh-here-document-word) + (or (eolp) (looking-at "[ \t]") (insert ? )) + (end-of-line 1) + (while + (sh-quoted-p) + (end-of-line 2)) + (newline) + (save-excursion (insert ?\n sh-here-document-word))))) + + +;; various other commands + +(autoload 'comint-dynamic-complete "comint" + "Dynamically perform completion at point." t) + +(autoload 'shell-dynamic-complete-command "shell" + "Dynamically complete the command at point." t) + +(autoload 'comint-dynamic-complete-filename "comint" + "Dynamically complete the filename at point." t) + +(autoload 'shell-dynamic-complete-environment-variable "shell" + "Dynamically complete the environment variable at point." t) + + + +(defun sh-newline-and-indent () + "Strip unquoted whitespace, insert newline, and indent like current line." + (interactive "*") + (indent-to (prog1 (current-indentation) + (delete-region (point) + (progn + (or (zerop (skip-chars-backward " \t")) + (if (sh-quoted-p) + (forward-char))) + (point))) + (newline)))) + + + +(defun sh-beginning-of-command () + "Move point to successive beginnings of commands." + (interactive) + (if (re-search-backward sh-beginning-of-command nil t) + (goto-char (match-beginning 2)))) + + +(defun sh-end-of-command () + "Move point to successive ends of commands." + (interactive) + (if (re-search-forward sh-end-of-command nil t) + (goto-char (match-end 1)))) + +(provide 'sh-script) +;; sh-script.el ends here +
--- a/lisp/modes/tcl.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/modes/tcl.el Mon Aug 13 08:46:35 2007 +0200 @@ -8,21 +8,21 @@ ;; Keywords: languages tcl modes ;; Version: 1.50 -;; This file is part of XEmacs. +;; This file is part of GNU Emacs. -;; XEmacs 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) +;; 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 1, or (at your option) ;; any later version. -;; XEmacs 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. +;; 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 XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; along with GNU Emacs; see the file COPYING. If not, write to +;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. ;; HOW TO INSTALL: ;; Put the following forms in your .emacs to enable autoloading of Tcl @@ -403,7 +403,7 @@ 6. Move backward to start of comment, indenting if necessary.") (defvar tcl-use-hairy-comment-detector t - "*If not `nil', the the more complicated, but slower, comment + "*If not `nil', then the more complicated, but slower, comment detecting function is used. This variable is only used in GNU Emacs 19 (the fast function is always used elsewhere).")
--- a/lisp/modes/text-mode.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/modes/text-mode.el Mon Aug 13 08:46:35 2007 +0200 @@ -18,9 +18,10 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary: @@ -51,7 +52,9 @@ (if text-mode-map () (setq text-mode-map (make-sparse-keymap)) + ;; XEmacs change (set-keymap-name text-mode-map 'text-mode-map) + (define-key text-mode-map "\e\t" 'ispell-complete-word) (define-key text-mode-map "\t" 'tab-to-tab-stop) (define-key text-mode-map "\es" 'center-line) (define-key text-mode-map "\eS" 'center-paragraph)) @@ -65,7 +68,8 @@ (defun text-mode () "Major mode for editing text intended for humans to read. -Special commands:\\{text-mode-map} +Special commands: +\\{text-mode-map} Turning on Text mode calls the value of the variable `text-mode-hook', if that value is non-nil." (interactive) @@ -85,6 +89,7 @@ () ;; Make different definition for TAB before the one in text-mode-map, but ;; share the rest. + ;; XEmacs change (setq indented-text-mode-map (make-sparse-keymap)) (set-keymap-name indented-text-mode-map 'indented-text-mode-map) (set-keymap-parents indented-text-mode-map (list text-mode-map))
--- a/lisp/modes/view.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/modes/view.el Mon Aug 13 08:46:35 2007 +0200 @@ -6,23 +6,24 @@ ;; Keywords: wp unix ;; Maintainer: FSF -;; This file is part of GNU Emacs. +;; This file is part of XEmacs. -;; 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 +;; XEmacs 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. +;; XEmacs 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, 675 Mass Ave, Cambridge, MA 02139, USA. +;; along with XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary: @@ -36,13 +37,17 @@ ;;; Code: (defvar view-highlight-face 'highlight + ;; XEmacs change "*The extent face used for highlighting the match found by View mode search.") (defvar view-mode nil "Non-nil if View mode is enabled.") (make-variable-buffer-local 'view-mode) (defvar view-mode-auto-exit nil - "Non-nil means scrolling past the end of buffer exits View mode.") + "Non-nil means scrolling past the end of buffer exits View mode. +Some commands, such as \\[view-file], set this to t locally; ++the only way to override that is to set it to nil using `view-mode-hook'.") + (make-variable-buffer-local 'view-mode-auto-exit) (defvar view-old-buffer-read-only nil) @@ -63,6 +68,7 @@ (defvar view-exit-position nil) (make-variable-buffer-local 'view-exit-position) +;; XEmacs change (defvar view-extent nil "Extent used to display where a search operation found its match. This is local in each buffer, once it is used.") @@ -76,7 +82,9 @@ (if view-mode-map nil (setq view-mode-map (make-keymap 'view-mode-map)) - (suppress-keymap view-mode-map) + ;; We used to call suppress-keymap here, but that isn't good in a minor mode. + ;; Self-inserting characters will beep anyway, since the buffer is read-only, + ;; and we should not interfere with letters that serve as useful commands. (define-key view-mode-map "q" 'view-exit) (define-key view-mode-map "<" 'beginning-of-buffer) (define-key view-mode-map ">" 'end-of-buffer) @@ -182,10 +190,13 @@ (defun view-mode (&optional arg) "Toggle View mode. -If you use this function to turn on View mode, -\"exiting\" View mode does nothing except turn View mode off. -The other way to turn View mode on is by calling -`view-mode-enter'. +With a prefix argument, turn View mode on if the argument is >= zero +and off if it is not. + +If you use this function to turn on View mode, then subsequently +\"exiting\" View mode does nothing except turn View mode off. The +other way to turn View mode on is by calling `view-mode-enter'; +that is what Lisp programs usually use. Letters do not insert themselves. Instead these commands are provided. Most commands take prefix arguments. Commands dealing with lines @@ -272,6 +283,7 @@ If you viewed a file that was not present in Emacs, its buffer is killed." (interactive) (setq view-mode nil) + ;; XEmacs change (and view-extent (delete-extent view-extent)) (force-mode-line-update) (cond (view-mode-auto-exit @@ -343,7 +355,8 @@ (scroll-up lines))) (cond ((pos-visible-in-window-p (point-max)) (goto-char (point-max)) - (message (substitute-command-keys + (message "%" + (substitute-command-keys "End. Type \\[view-exit] to quit viewing.")))) (move-to-window-line -1) (beginning-of-line))) @@ -408,7 +421,9 @@ The variable `view-highlight-face' controls the face that is used for highlighting the match that is found." (interactive "p") - (View-search-regexp-forward n view-last-regexp)) + (if view-last-regexp + (View-search-regexp-forward n view-last-regexp) + (error "No previous View-mode search"))) (defun View-search-last-regexp-backward (n) "Search backward from window start for Nth instance of last regexp. @@ -418,7 +433,9 @@ The variable `view-highlight-face' controls the face that is used for highlighting the match that is found." (interactive "p") - (View-search-regexp-backward n view-last-regexp)) + (if view-last-regexp + (View-search-regexp-backward n view-last-regexp) + (error "No previous View-mode search"))) (defun View-back-to-mark (&optional ignore) "Return to last mark set in View mode, else beginning of file. @@ -440,6 +457,7 @@ (progn (push-mark) (goto-char where) + ;; XEmacs change. (if view-extent (set-extent-endpoints view-extent (match-beginning 0) (match-end 0))
--- a/lisp/modes/vrml-mode.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/modes/vrml-mode.el Mon Aug 13 08:46:35 2007 +0200 @@ -66,7 +66,7 @@ 6. Move backward to start of comment, indenting if necessary.") (defvar vrml-use-hairy-comment-detector t - "*If not `nil', the the more complicated, but slower, comment + "*If not `nil', then the more complicated, but slower, comment detecting function is used.") (defvar vrml-mode-abbrev-table nil @@ -443,7 +443,7 @@ (looking-at "children"))))) (progn ;; Line is continuation line, or the sexp opener - ;; is not a curly brace, or we are are looking at + ;; is not a curly brace, or we are looking at ;; an `expr' expression (which must be split ;; specially). So indentation is column of first ;; good spot after sexp opener. If there is no
--- a/lisp/modes/xpm-mode.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/modes/xpm-mode.el Mon Aug 13 08:46:35 2007 +0200 @@ -118,8 +118,10 @@ (beginning-of-line))))) (if (not (eq major-mode 'picture-mode)) (picture-mode)) - (set-specifier left-toolbar-width (cons (selected-frame) 16)) - (set-specifier left-toolbar (cons (current-buffer) xpm-palette)) + (if (featurep 'toolbar) + (progn + (set-specifier left-toolbar-width (cons (selected-frame) 16)) + (set-specifier left-toolbar (cons (current-buffer) xpm-palette)))) (message "Parsing body...") (xpm-color-data) (message "Parsing body...done") @@ -194,17 +196,18 @@ (> (elt ccc 2) 32767)) (set-face-foreground new-face "black") (set-face-foreground new-face "white")))) - (setq xpm-pixel-values (cons (cons str new-face) xpm-pixel-values) - xpm-palette - (cons (vector - (list (xpm-make-solid-pixmap color 12 12)) - ;; Major cool things with quotes..... - (` - (lambda (event) - (interactive "e") - (xpm-toolbar-select-colour event (, str)))) - t - color) xpm-palette)) + (setq xpm-pixel-values (cons (cons str new-face) xpm-pixel-values)) + (if (featurep 'toolbar) + (setq xpm-palette + (cons (vector + (list (xpm-make-solid-pixmap color 12 12)) + ;; Major cool things with quotes..... + (` + (lambda (event) + (interactive "e") + (xpm-toolbar-select-colour event (, str)))) + t + color) xpm-palette))) )) (defun xpm-parse-color ()
--- a/lisp/packages/add-log.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/add-log.el Mon Aug 13 08:46:35 2007 +0200 @@ -20,7 +20,7 @@ ;; along with XEmacs; see the file COPYING. If not, write to the Free ;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary: @@ -59,7 +59,7 @@ (defvar change-log-font-lock-keywords '(("^[SMTWF].+" . font-lock-function-name-face) ; Date line. ("^\t\\* \\([^ :\n]+\\)" 1 font-lock-comment-face) ; File name. - ("\(\\([^)\n]+\\)\)" 1 font-lock-keyword-face)) ; Function name. + ("(\\([^)\n]+\\)):" 1 font-lock-keyword-face)) ; Function name. "Additional expressions to highlight in Change Log mode.") (put 'change-log-mode 'font-lock-defaults '(change-log-font-lock-keywords t)) @@ -100,6 +100,7 @@ ;;;###autoload (defun find-change-log (&optional file-name) "Find a change log file for \\[add-change-log-entry] and return the name. + Optional arg FILE-NAME specifies the file to use. If FILE-NAME is nil, use the value of `change-log-default-name'. If 'change-log-default-name' is nil, behave as though it were 'ChangeLog' @@ -196,6 +197,8 @@ (if (and other-window (not (equal file-name buffer-file-name))) (find-file-other-window file-name) (find-file file-name)) + (or (eq major-mode 'change-log-mode) + (change-log-mode)) (undo-boundary) (goto-char (point-min)) (if (looking-at (concat (regexp-quote (substring (current-time-string) @@ -299,7 +302,9 @@ (setq major-mode 'change-log-mode mode-name "Change Log" left-margin 8 - fill-column 74) + fill-column 74 + indent-tabs-mode t + tab-width 8) (use-local-map change-log-mode-map) ;; Let each entry behave as one paragraph: ;; We really do want "^" in paragraph-start below: it is only the lines that @@ -355,7 +360,8 @@ (or (eobp) (forward-char 1)) (beginning-of-defun) ;; Make sure we are really inside the defun found, not after it. - (if (and (progn (end-of-defun) + (if (and (looking-at "\\s(") + (progn (end-of-defun) (< location (point))) (progn (forward-sexp -1) (>= location (point))))
--- a/lisp/packages/apropos.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/apropos.el Mon Aug 13 08:46:35 2007 +0200 @@ -23,7 +23,7 @@ ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. -;;; Synched up with: FSF 19.31. +;;; Synched up with: FSF 19.34. ;;; Commentary: @@ -60,6 +60,8 @@ ;;; Code: ;; I see a degradation of maybe 10-20% only. +;; [sb -- FSF protects the face declarations with `if window-system' +;; I see no reason why we should do so] (defvar apropos-do-all nil "*Whether the apropos commands should do more. Slows them down more or less. Set this non-nil if you have a fast machine.") @@ -90,9 +92,9 @@ (defvar apropos-mode-map (let ((map (make-sparse-keymap))) - (define-key map "\C-m" 'apropos-follow) - (define-key map 'button2up 'apropos-mouse-follow) - (define-key map 'button2 'undefined) + (define-key map [(control m)] 'apropos-follow) + (define-key map [(button2up)] 'apropos-mouse-follow) + (define-key map [(button2down)] 'undefined) map) "Keymap used in Apropos mode.") @@ -474,7 +476,7 @@ (substitute-command-keys "you can click \\[apropos-mouse-follow] to get more information.\n"))) (insert (substitute-command-keys - "In this buffer, type \\[apropos-follow] to get full documentation.\n\n")) + "Type \\[apropos-follow] in this buffer to get full documentation.\n\n")) (while (consp p) (or (not spacing) (bobp) (terpri)) (setq apropos-item (car p)
--- a/lisp/packages/array.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/array.el Mon Aug 13 08:46:35 2007 +0200 @@ -22,7 +22,7 @@ ;; along with XEmacs; see the file COPYING. If not, write to the Free ;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary: @@ -806,7 +806,7 @@ Upon entering array mode, you will be prompted for the values of several variables. Others will be calculated based on the values you -supply. These variables are all local the the buffer. Other buffer +supply. These variables are all local to the buffer. Other buffers in array mode may have different values assigned to the variables. The variables are:
--- a/lisp/packages/autoinsert.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/autoinsert.el Mon Aug 13 08:46:35 2007 +0200 @@ -20,7 +20,7 @@ ;; along with XEmacs; see the file COPYING. If not, write to the Free ;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary: @@ -88,16 +88,8 @@ ("[Mm]akefile\\'" . "makefile.inc") - ("\\.html\\'" - nil - "<html>\n" - "<head>\n" - "<title>" _ "</title>\n" - "</head>\n" - "<body>\n\n" - "</body>\n" - "</html>") - + (html-mode . (lambda () (sgml-tag "html"))) + (plain-tex-mode . "tex-insert.tex") (bibtex-mode . "tex-insert.tex") (latex-mode @@ -140,20 +132,20 @@ (completing-read "Keyword, C-h: " v1 nil t)) str ", ") & -2 " -;; This file is part of GNU Emacs. +;; This file is part of XEmacs. -;; GNU Emacs is free software; you can redistribute it and/or modify +;; XEmacs 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, +;; XEmacs 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 +;; along with XEmacs; see the file COPYING. If not, write to ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. ;;; Commentary:
--- a/lisp/packages/avoid.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/avoid.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,8 +1,8 @@ -;;; avoid.el --- make mouse pointer stay out of the way of editing. +;;; avoid.el --- make mouse pointer stay out of the way of editing ;;; Copyright (C) 1993, 1994 Free Software Foundation, Inc. -;; Author: Boris Goldowsky <boris@cs.rochester.edu> +;; Author: Boris Goldowsky <boris@gnu.ai.mit.edu> ;; Keywords: mouse ;; Version: 1.10 @@ -20,58 +20,54 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.28. +;;; Synched up with: FSF 19.34. ;;; Commentary: -;;; -;;; For those who are annoyed by the mouse pointer obscuring text, -;;; this mode moves the mouse pointer - either just a little out of -;;; the way, or all the way to the corner of the frame. -;;; To use, load or evaluate this file and type M-x mouse-avoidance-mode . -;;; To set up permanently, put this file on your load-path and put the -;;; following in your .emacs: -;;; -;;; (cond (window-system -;;; (require 'avoid) -;;; (mouse-avoidance-mode 'animate))) -;;; -;;; The 'animate can be 'jump or 'banish or 'exile or 'protean if you prefer. -;;; See the documentation for function `mouse-avoidance-mode' for -;;; details of the different modes. -;;; -;;; For added silliness, make the animatee animate... -;;; put something similar to the following into your .emacs: -;;; -;;; (cond (window-system -;;; (setq x-pointer-shape -;;; (eval (nth (random 4) -;;; '(x-pointer-man x-pointer-spider -;;; x-pointer-gobbler x-pointer-gumby)))) -;;; (set-mouse-color (cdr (assoc 'mouse-color (frame-parameters)))))) -;;; -;;; For completely random pointer shape, replace the setq above with: -;;; (setq x-pointer-shape (mouse-avoidance-random-shape)) -;;; -;;; Bugs / Warnings / To-Do: -;;; -;;; - Using this code does slow emacs down. "banish" mode shouldn't -;;; ever be too bad though, and on my workstation even "animate" doesn't -;;; seem to have a noticable effect during editing. -;;; -;;; - It should find out where any overlapping frames are and avoid them, -;;; rather than always raising the frame. -;;; Credits: -;;; This code was helped by all those who contributed suggestions, -;;; fixes, and additions -;;; Joe Harrington (and his advisor), for the original inspiration. -;;; Ken Manheimer, for dreaming up the Protean mode. -;;; Richard Stallman, for the awful cat-and-mouse pun, among other things. -;;; Mike Williams, Denis Howe, Bill Benedetto, Chris Moore, Don Morris, -;;; Simon Marshall, and M.S. Ashton, for their feedback. -;;; +;; For those who are annoyed by the mouse pointer obscuring text, +;; this mode moves the mouse pointer - either just a little out of +;; the way, or all the way to the corner of the frame. +;; To use, load or evaluate this file and type M-x mouse-avoidance-mode . +;; To set up permanently, put this file on your .emacs: +;; +;; (if window-system (mouse-avoidance-mode 'animate)) +;; +;; The 'animate can be 'jump or 'banish or 'exile or 'protean if you prefer. +;; See the documentation for function `mouse-avoidance-mode' for +;; details of the different modes. +;; +;; For added silliness, make the animatee animate... +;; put something similar to the following into your .emacs: +;; +;; (if window-system +;; (mouse-avoidance-set-pointer-shape +;; (eval (nth (random 4) +;; '(x-pointer-man x-pointer-spider +;; x-pointer-gobbler x-pointer-gumby))))) +;; +;; For completely random pointer shape, replace the setq above with: +;; (setq x-pointer-shape (mouse-avoidance-random-shape)) +;; +;; Bugs / Warnings / To-Do: +;; +;; - Using this code does slow emacs down. "banish" mode shouldn't +;; be too bad, and on my workstation even "animate" is reasonable. +;; +;; - It ought find out where any overlapping frames are and avoid them, +;; rather than always raising the frame. + +;; Credits: +;; This code was helped by all those who contributed suggestions, +;; fixes, and additions +;; Joe Harrington (and his advisor), for the original inspiration. +;; Ken Manheimer, for dreaming up the Protean mode. +;; Richard Stallman, for the awful cat-and-mouse pun, among other things. +;; Mike Williams, Denis Howe, Bill Benedetto, Chris Moore, Don Morris, +;; Simon Marshall, and M.S. Ashton, for their feedback. + ;;; Code: (provide 'avoid) @@ -102,10 +98,16 @@ (defvar mouse-avoidance-state nil) (defvar mouse-avoidance-pointer-shapes nil) (defvar mouse-avoidance-n-pointer-shapes 0) +(defvar mouse-avoidance-old-pointer-shape nil) ;;; Functions: -;; XEmacs change -- this is so ugly. +(defsubst mouse-avoidance-set-pointer-shape (shape) + "Set the shape of the mouse pointer to SHAPE." + (setq x-pointer-shape shape) + (set-mouse-color nil)) + +;; XEmacs change -- this is so ugly. [FSF version is totally different -sb] (defun mouse-avoidance-point-position () "Returns (WINDOW X . Y) of current point - analogous to mouse-position" (let* ((beg (window-start)) @@ -129,6 +131,7 @@ ;; Returns t if it moved the mouse. (let ((f (selected-frame))) (raise-frame f) + ;; XEmacs: FSF version of set-mouse-position requires FRAME parameter (set-mouse-position (frame-selected-window f) (car pos) (cdr pos)) t)) @@ -158,7 +161,7 @@ ;; Args are the CURRENT location, the desired DELTA for ;; warp-conservation, the DISTANCE we like to move, the VARIABILITY ;; in distance allowed, and the MIN and MAX possible window positions. - ;; Returns something as close to DELTA as possible withing the constraints. + ;; Returns something as close to DELTA as possible within the constraints. (let ((L1 (max (- min cur) (+ (- dist) (- var)))) (R1 (+ (- dist) var )) (L2 (+ dist (- var))) @@ -179,6 +182,7 @@ ;; For these modes, state keeps track of the total offset that we've ;; accumulated, and tries to keep it close to zero. (let* ((cur (mouse-position)) + (cur-frame (car cur)) (cur-pos (cdr cur)) (deltax (mouse-avoidance-delta (car cur-pos) (- (random mouse-avoidance-nudge-var) @@ -189,13 +193,14 @@ (cdr cur-pos) (- (random mouse-avoidance-nudge-var) (cdr mouse-avoidance-state)) mouse-avoidance-nudge-dist mouse-avoidance-nudge-var - 0 (window-height)))) + 0 (frame-height)))) (setq mouse-avoidance-state (cons (+ (car mouse-avoidance-state) deltax) (+ (cdr mouse-avoidance-state) deltay))) (if (or (eq mouse-avoidance-mode 'animate) (eq mouse-avoidance-mode 'proteus)) (let ((i 0.0) + ;; XEmacs change (color (cdr (assoc 'mouse-color (frame-parameters))))) (while (<= i 1) (mouse-avoidance-set-mouse-position @@ -203,6 +208,7 @@ (+ (cdr cur-pos) (round (* i deltay))))) (setq i (+ i (max .1 (/ 1.0 mouse-avoidance-nudge-dist)))) (if (eq mouse-avoidance-mode 'proteus) + ;; XEmacs change (progn (setq x-pointer-shape (mouse-avoidance-random-shape)) (set-mouse-color color))) @@ -245,6 +251,7 @@ (mouse-avoidance-banish-mouse)) ((and mouse-avoidance-state (not (mouse-avoidance-too-close-p mouse-avoidance-state))) + ;; XEmacs change (if (and (eq (car mp) (if (< emacs-minor-version 12) (selected-frame) (selected-window))) @@ -262,6 +269,7 @@ (mouse-avoidance-too-close-p (mouse-position))) (let ((old-pos (mouse-position))) (mouse-avoidance-nudge-mouse) + ;; XEmacs change (if (not (eq (if (< emacs-minor-version 12) (selected-frame) (selected-window)) (car old-pos))) ; move went awry @@ -284,6 +292,7 @@ (setq i (1+ i)))) t)))) +;;;###autoload (defun mouse-avoidance-mode (&optional mode) "Set cursor avoidance mode to MODE. MODE should be one of the symbols `banish', `exile', `jump', `animate', @@ -316,21 +325,27 @@ nil t)))) (if (eq mode 'cat-and-mouse) (setq mode 'animate)) - (setq post-command-hook - (delete 'mouse-avoidance-banish-hook (append post-command-hook nil))) - (setq post-command-hook - (delete 'mouse-avoidance-exile-hook (append post-command-hook nil))) - (setq post-command-hook - (delete 'mouse-avoidance-fancy-hook (append post-command-hook nil))) + ;; XEmacs change - We don't have post-command-idle-hook + (remove-hook 'post-command-hook 'mouse-avoidance-banish-hook) + (remove-hook 'post-command-hook 'mouse-avoidance-exile-hook) + (remove-hook 'post-command-hook 'mouse-avoidance-fancy-hook) + ;; Restore pointer shape if necessary + (if (eq mouse-avoidance-mode 'proteus) + (mouse-avoidance-set-pointer-shape mouse-avoidance-old-pointer-shape)) + + ;; Do additional setup depending on version of mode requested (cond ((eq mode 'none) (setq mouse-avoidance-mode nil)) ((or (eq mode 'jump) (eq mode 'animate) (eq mode 'proteus)) + ;; XEmacs: we don't have post-command-idle-hook (add-hook 'post-command-hook 'mouse-avoidance-fancy-hook) (setq mouse-avoidance-mode mode - mouse-avoidance-state (cons 0 0))) + mouse-avoidance-state (cons 0 0) + mouse-avoidance-old-pointer-shape x-pointer-shape)) ((eq mode 'exile) + ;; XEmacs: FSF uses post-command-idle-hook (add-hook 'post-command-hook 'mouse-avoidance-exile-hook) (setq mouse-avoidance-mode mode mouse-avoidance-state nil)) @@ -338,6 +353,7 @@ (eq mode t) (and (null mode) (null mouse-avoidance-mode)) (and mode (> (prefix-numeric-value mode) 0))) + ;; XEmacs: FSF uses post-command-idle-hook (add-hook 'post-command-hook 'mouse-avoidance-banish-hook) (setq mouse-avoidance-mode 'banish)) (t (setq mouse-avoidance-mode nil)))
--- a/lisp/packages/big-menubar.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/big-menubar.el Mon Aug 13 08:46:35 2007 +0200 @@ -122,6 +122,7 @@ (not (and (= (point-min) 1) (= (point-max) (1+ (buffer-size)))))] ) )) + (assoc "Apps" default-menubar) (assoc "Options" default-menubar) '("Motion" ["Goto Mark" exchange-point-and-mark (mark t)] @@ -220,6 +221,7 @@ :filter buffers-menu-filter ["List All Buffers" list-buffers t] "---") + (assoc "Tools" default-menubar) nil (assoc "Help" default-menubar) )))
--- a/lisp/packages/bookmark.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/bookmark.el Mon Aug 13 08:46:35 2007 +0200 @@ -1214,7 +1214,7 @@ (let ((will-go (bookmark-get-bookmark bookmark))) (setq bookmark-alist (delq will-go bookmark-alist)) ;; Added by db, nil bookmark-current-bookmark if the last - ;; occurence has been deleted + ;; occurrence has been deleted (or (bookmark-get-bookmark bookmark-current-bookmark) (setq bookmark-current-bookmark nil))) ;; Don't rebuild the list
--- a/lisp/packages/chistory.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/chistory.el Mon Aug 13 08:46:35 2007 +0200 @@ -21,7 +21,7 @@ ;; along with XEmacs; see the file COPYING. If not, write to the Free ;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary: @@ -40,10 +40,10 @@ ;;;###autoload (defun repeat-matching-complex-command (&optional pattern) "Edit and re-evaluate complex command with name matching PATTERN. -Matching occurrences are displayed, most recent first, until you -select a form for evaluation. If PATTERN is empty (or nil), every form -in the command history is offered. The form is placed in the minibuffer -for editing and the result is evaluated." +Matching occurrences are displayed, most recent first, until you select +a form for evaluation. If PATTERN is empty (or nil), every form in the +command history is offered. The form is placed in the minibuffer for +editing and the result is evaluated." (interactive "sRedo Command (regexp): ") (if pattern (if (string-match "[^ \t]" pattern)
--- a/lisp/packages/cmuscheme.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/cmuscheme.el Mon Aug 13 08:46:35 2007 +0200 @@ -22,49 +22,49 @@ ;; along with XEmacs; see the file COPYING. If not, write to the Free ;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary: -;;; This is a customisation of comint-mode (see comint.el) -;;; -;;; Written by Olin Shivers (olin.shivers@cs.cmu.edu). With bits and pieces -;;; lifted from scheme.el, shell.el, clisp.el, newclisp.el, cobol.el, et al.. -;;; 8/88 -;;; -;;; Please send me bug reports, bug fixes, and extensions, so that I can -;;; merge them into the master source. -;;; -;;; The changelog is at the end of this file. -;;; -;;; NOTE: MIT Cscheme, when invoked with the -emacs flag, has a special user -;;; interface that communicates process state back to the superior emacs by -;;; outputting special control sequences. The gnumacs package, xscheme.el, has -;;; lots and lots of special purpose code to read these control sequences, and -;;; so is very tightly integrated with the cscheme process. The cscheme -;;; interrupt handler and debugger read single character commands in cbreak -;;; mode; when this happens, xscheme.el switches to special keymaps that bind -;;; the single letter command keys to emacs functions that directly send the -;;; character to the scheme process. Cmuscheme mode does *not* provide this -;;; functionality. If you are a cscheme user, you may prefer to use the -;;; xscheme.el/cscheme -emacs interaction. -;;; -;;; Here's a summary of the pros and cons, as I see them. -;;; xscheme: Tightly integrated with inferior cscheme process! A few commands -;;; not in cmuscheme. But. Integration is a bit of a hack. Input -;;; history only keeps the immediately prior input. Bizarre -;;; keybindings. -;;; -;;; cmuscheme: Not tightly integrated with inferior cscheme process. But. -;;; Carefully integrated functionality with the entire suite of -;;; comint-derived CMU process modes. Keybindings reminiscent of -;;; Zwei and Hemlock. Good input history. A few commands not in -;;; xscheme. -;;; -;;; It's a tradeoff. Pay your money; take your choice. If you use a Scheme -;;; that isn't Cscheme, of course, there isn't a choice. Xscheme.el is *very* -;;; Cscheme-specific; you must use cmuscheme.el. Interested parties are -;;; invited to port xscheme functionality on top of comint mode... +;; This is a customisation of comint-mode (see comint.el) +;; +;; Written by Olin Shivers (olin.shivers@cs.cmu.edu). With bits and pieces +;; lifted from scheme.el, shell.el, clisp.el, newclisp.el, cobol.el, et al.. +;; 8/88 +;; +;; Please send me bug reports, bug fixes, and extensions, so that I can +;; merge them into the master source. +;; +;; The changelog is at the end of this file. +;; +;; NOTE: MIT Cscheme, when invoked with the -emacs flag, has a special user +;; interface that communicates process state back to the superior emacs by +;; outputting special control sequences. The gnumacs package, xscheme.el, has +;; lots and lots of special purpose code to read these control sequences, and +;; so is very tightly integrated with the cscheme process. The cscheme +;; interrupt handler and debugger read single character commands in cbreak +;; mode; when this happens, xscheme.el switches to special keymaps that bind +;; the single letter command keys to emacs functions that directly send the +;; character to the scheme process. Cmuscheme mode does *not* provide this +;; functionality. If you are a cscheme user, you may prefer to use the +;; xscheme.el/cscheme -emacs interaction. +;; +;; Here's a summary of the pros and cons, as I see them. +;; xscheme: Tightly integrated with inferior cscheme process! A few commands +;; not in cmuscheme. But. Integration is a bit of a hack. Input +;; history only keeps the immediately prior input. Bizarre +;; keybindings. +;; +;; cmuscheme: Not tightly integrated with inferior cscheme process. But. +;; Carefully integrated functionality with the entire suite of +;; comint-derived CMU process modes. Keybindings reminiscent of +;; Zwei and Hemlock. Good input history. A few commands not in +;; xscheme. +;; +;; It's a tradeoff. Pay your money; take your choice. If you use a Scheme +;; that isn't Cscheme, of course, there isn't a choice. Xscheme.el is *very* +;; Cscheme-specific; you must use cmuscheme.el. Interested parties are +;; invited to port xscheme functionality on top of comint mode... ;;; Code:
--- a/lisp/packages/compare-w.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/compare-w.el Mon Aug 13 08:46:35 2007 +0200 @@ -20,7 +20,7 @@ ;; along with XEmacs; see the file COPYING. If not, write to the Free ;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Whatever was here before didn't look any more correct than the ;;; FSF version, so I've junked it and replaced it with the FSF version.
--- a/lisp/packages/compile.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/compile.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,6 +1,6 @@ ;;; compile.el --- run compiler as inferior of Emacs, parse error messages. -;; Copyright (C) 1985, 86, 87, 93, 94, 1995 Free Software Foundation, Inc. +;; Copyright (C) 1985, 86, 87, 93, 94, 1995, 1996 Free Software Foundation, Inc. ;; Copyright (C) 1995 Tinker Systems and INS Engineering Corp. ;; Author: Roland McGrath <roland@prep.ai.mit.edu> @@ -21,9 +21,10 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34, with a lot of divergence. ;;; Commentary: @@ -40,6 +41,7 @@ (defvar compilation-window-height nil "*Number of lines in a compilation window. If nil, use Emacs default.") +;; XEmacs change (defvar compilation-error-list 'invalid ; only valid buffer-local "List of error message descriptors for visiting erring functions. Each error descriptor is a cons (or nil). Its car is a marker pointing to @@ -52,7 +54,7 @@ error messages should be reparsed the next time the list of errors is wanted. Some other commands (like `diff') use this list to control the error -message tracking facilites; if you change its structure, you should make +message tracking facilities; if you change its structure, you should make sure you also change those packages. Perhaps it is better not to change it at all.") @@ -93,6 +95,7 @@ (setq minor-mode-alist (cons '(compilation-in-progress " Compiling") minor-mode-alist))) +;; XEmacs change (defvar compilation-always-signal-completion nil "Always give an audible signal upon compilation completion. By default that signal is only given if the bottom of the compilation @@ -123,25 +126,37 @@ ;; paren, because otherwise this matches just about anything ;; containing a number with spaces around it. ("\n\ -\\([^:( \t\n]+\\)[:(][ \t]*\\([0-9]+\\)\\([) \t]\\|\ +\\([a-zA-Z]?:?[^:( \t\n]+\\)[:(][ \t]*\\([0-9]+\\)\\([) \t]\\|\ :\\([^0-9\n]\\|\\([0-9]+:\\)\\)\\)" 1 2 5) + ;; Microsoft C/C++: + ;; keyboard.c(537) : warning C4005: 'min' : macro redefinition + ;; d:\tmp\test.c(23) : error C2143: syntax error : missing ';' before 'if' + ("\n\\(\\([a-zA-Z]:\\)?[^:( \t\n-]+\\)[:(][ \t]*\\([0-9]+\\)[:) \t]" 1 3) + ;; Borland C++: ;; Error ping.c 15: Unable to open include file 'sys/types.h' ;; Warning ping.c 68: Call to function 'func' with no prototype - ("\n\\(Error\\|Warning\\) \\([^:( \t\n]+\\)\ + ("\n\\(Error\\|Warning\\) \\([a-zA-Z]?:?[^:( \t\n]+\\)\ \\([0-9]+\\)\\([) \t]\\|:[^0-9\n]\\)" 2 3) ;; 4.3BSD lint pass 2 ;; strcmp: variable # of args. llib-lc(359) :: /usr/src/foo/foo.c(8) - ("[ \t:]\\([^:( \t\n]+\\)[:(](+[ \t]*\\([0-9]+\\))[:) \t]*$" 1 2) + ("[ \t:]\\([a-zA-Z]?:?[^:( \t\n]+\\)[:(](+[ \t]*\\([0-9]+\\))[:) \t]*$" + 1 2) ;; 4.3BSD lint pass 3 ;; bloofle defined( /users/wolfgang/foo.c(4) ), but never used ;; This used to be - ;; ("[ \t(]+\\([^:( \t\n]+\\)[:( \t]+\\([0-9]+\\)[:) \t]+" 1 2) + ;; ("[ \t(]+\\([a-zA-Z]?:?[^:( \t\n]+\\)[:( \t]+\\([0-9]+\\)[:) \t]+" 1 2) ;; which is regexp Impressionism - it matches almost anything! - ("([ \t]*\\([^:( \t\n]+\\)[:(][ \t]*\\([0-9]+\\))" 1 2) + ("([ \t]*\\([a-zA-Z]?:?[^:( \t\n]+\\)[:(][ \t]*\\([0-9]+\\))" 1 2) + + ;; MIPS lint pass<n>; looks good for SunPro lint also + ;; TrimMask (255) in solomon.c may be indistinguishable from TrimMasks (93) in solomon.c due to truncation + ("[^ ]+ (\\([0-9]+\\)) in \\([^ ]+\\)" 2 1) + ;; name defined but never used: LinInt in cmap_calc.c(199) + ("in \\([^(]+\\)(\\([0-9]+\\))$" 1 2) ;; Ultrix 3.0 f77: ;; fort: Severe: addstf.f, line 82: Missing operator or delimiter symbol @@ -150,12 +165,12 @@ ("\n\\(cfe\\|fort\\): [^:\n]*: \\([^ \n]*\\), line \\([0-9]+\\):" 2 3) ;; Error on line 3 of t.f: Execution error unclassifiable statement ;; Unknown who does this: - ;; Line 45 of "foo.c": bloofel undefined + ;; Line 45 of "foo.c": bloofle undefined ;; Absoft FORTRAN 77 Compiler 3.1.3 ;; error on line 19 of fplot.f: spelling error? ;; warning on line 17 of fplot.f: data type is undefined for variable d ("\\(\n\\|on \\)[Ll]ine[ \t]+\\([0-9]+\\)[ \t]+\ -of[ \t]+\"?\\([^\":\n]+\\)\"?:" 3 2) +of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2) ;; Apollo cc, 4.3BSD fc: ;; "foo.f", line 3: Error: syntax error near end of statement @@ -167,7 +182,10 @@ ;; "foo.c", line 32 pos 1; (E) syntax error; unexpected symbol: "lossage" ;; GNAT (as of July 94): ;; "foo.adb", line 2(11): warning: file name does not match ... - ("\"\\([^,\" \n\t]+\\)\", lines? \\([0-9]+\\)[:., (-]" 1 2) + ;; IBM AIX xlc compiler: + ;; "src/swapping.c", line 30.34: 1506-342 (W) "/*" detected in comment. + ("\"\\([^,\" \n\t]+\\)\", lines? \ +\\([0-9]+\\)\\([\(.]\\([0-9]+\\)\)?\\)?[:., (-]" 1 2 4) ;; MIPS RISC CC - the one distributed with Ultrix: ;; ccom: Error: foo.c, line 2: syntax error @@ -186,7 +204,7 @@ ("\n[EW], \\([^(\n]*\\)(\\([0-9]+\\),[ \t]*\\([0-9]+\\)" 1 2 3) ;; GNU messages with program name and optional column number. - ("\n[^0-9 \n\t:]+:[ \t]*\\([^ \n\t:]+\\):\ + ("\n[a-zA-Z]?:?[^0-9 \n\t:]+:[ \t]*\\([^ \n\t:]+\\):\ \\([0-9]+\\):\\(\\([0-9]+\\)[: \t]\\)?" 1 2 4) ;; jwz: @@ -228,7 +246,7 @@ Otherwise, it saves all modified buffers without asking.") (defvar grep-regexp-alist - '(("^\\([^:( \t\n]+\\)[:( \t]+\\([0-9]+\\)[:) \t]" 1 2)) + '(("^\\([a-zA-Z]?:?[^:( \t\n]+\\)[:( \t]+\\([0-9]+\\)[:) \t]" 1 2)) "Regexp used to match grep hits. See `compilation-error-regexp-alist'.") (defvar grep-command "grep -n " @@ -275,15 +293,16 @@ (defvar compilation-exit-message-function nil "\ If non-nil, called when a compilation process dies to return a status message. -This should be a function a two arguments as passed to a process sentinel -\(see `set-process-sentinel\); it returns a cons (MESSAGE . MODELINE) of the -strings to write into the compilation buffer, and to put in its mode line.") +This should be a function of three arguments: process status, exit status, +and exit message; it returns a cons (MESSAGE . MODELINE) of the strings to +write into the compilation buffer, and to put in its mode line.") ;; History of compile commands. (defvar compile-history nil) ;; History of grep commands. (defvar grep-history nil) +;; XEmacs (defconst compilation-font-lock-keywords (purecopy (list '("^[-_.\"A-Za-z0-9/+]+\\(:\\|, line \\)[0-9]+: \\([wW]arning:\\).*$" . @@ -296,11 +315,13 @@ "Additional expressions to highlight in Compilation mode.") ;FSF's version. Ours looks better. -;(defvar compilation-font-lock-keywords +;(defvar compilation-mode-font-lock-keywords ; ;; This regexp needs a bit of rewriting. What is the third grouping for? -; '(("^\\([^ \n:]*:\\([0-9]+:\\)+\\)\\(.*\\)$" 1 font-lock-function-name-face)) -;;;; ("^\\([^\n:]*:\\([0-9]+:\\)+\\)\\(.*\\)$" 0 font-lock-keyword-face keep) -; "Additional expressions to highlight in Compilation mode.") +; '(("^\\([a-zA-Z]?:?[^ \n:]*:\\([0-9]+:\\)+\\)\\(.*\\)$" +; 1 font-lock-function-name-face)) +;;; ("^\\([^\n:]*:\\([0-9]+:\\)+\\)\\(.*\\)$" 0 font-lock-keyword-face keep) + +;; XEmacs change (put 'compilation-mode 'font-lock-defaults '(compilation-font-lock-keywords t)) @@ -326,6 +347,7 @@ to a function that generates a unique name." (interactive (if (or compilation-read-command current-prefix-arg) + ;; XEmacs change (list (read-shell-command "Compile command: " compile-command ;; #### minibuffer code should do this @@ -357,6 +379,7 @@ This command uses a special history list for its arguments, so you can easily repeat a grep command." (interactive + ;; XEmacs change (list (read-shell-command "Run grep (like this): " grep-command 'grep-history))) (let ((buf (compile-internal (concat command-args " " grep-null-device) @@ -366,6 +389,7 @@ (save-excursion (set-buffer buf) (set (make-local-variable 'compilation-exit-message-function) + ;; XEmacs change (lambda (proc msg) (let ((code (process-exit-status proc))) (if (eq (process-status proc) 'exit) @@ -425,9 +449,11 @@ (let ((regexp-alist (or regexp-alist compilation-error-regexp-alist)) (parser (or parser compilation-parse-errors-function)) (thisdir default-directory) + ;; XEmacs change (buffer-save (current-buffer)) outwin) - + + ;; XEmacs change ;; Pop up the compilation buffer. (setq outwin (display-buffer outbuf)) @@ -437,7 +463,7 @@ ;; Change its default-directory to the directory where the compilation ;; will happen, and insert a `cd' command to indicate this. (set-buffer outbuf) - + (setq buffer-read-only nil) (buffer-disable-undo (current-buffer)) (erase-buffer) @@ -446,13 +472,16 @@ (insert "cd " thisdir "\n" command "\n") (set-buffer-modified-p nil) + ;; XEmacs change ;; set it so the window will scroll to show compile output (save-window-excursion (select-window outwin) (goto-char (point-max))) + ;; XEmacs change (compilation-mode name-of-mode) ;; (setq buffer-read-only t) ;;; Non-ergonomic. + ;; XEmacs change (set (make-local-variable 'compile-command) command) (set (make-local-variable 'compilation-parse-errors-function) parser) (set (make-local-variable 'compilation-error-message) error-message) @@ -461,12 +490,10 @@ compilation-directory-stack (list default-directory)) (set-window-start outwin (point-min)) (setq mode-name name-of-mode) + ;; XEmacs change ; (or (eq outwin (selected-window)) ; (set-window-point outwin (point-min))) (compilation-set-window-height outwin) - - ;; Set up the menus - ;; Start the compilation. (if (fboundp 'start-process) (let* ((process-environment (cons "EMACS=t" process-environment)) @@ -478,12 +505,15 @@ (set-marker (process-mark proc) (point) outbuf) (setq compilation-in-progress (cons proc compilation-in-progress))) - ;; No asynchronous processes available - (message (format "Executing `%s'..." command)) - (sit-for 0) ;; Force redisplay + ;; No asynchronous processes available. + (message "Executing `%s'..." command) + ; FSF + ; (setq mode-line-process ":run") + ; (force-mode-line-update) + (sit-for 0) ;; Force redisplay (let ((status (call-process shell-file-name nil outbuf nil "-c" command)))) - (message (format "Executing `%s'...done" command)))) + (message "Executing `%s'...done" command))) (set-buffer buffer-save))) ;; Make it so the next C-x ` will use this buffer. @@ -704,11 +734,38 @@ (if (setq compilation-minor-mode (if (null arg) (null compilation-minor-mode) (> (prefix-numeric-value arg) 0))) - (compilation-setup))) + (progn + (compilation-setup) + (run-hooks 'compilation-minor-mode-hook)))) + +;; Write msg in the current buffer and hack its mode-line-process. +(defun compilation-handle-exit (process-status exit-status msg) + (let ((buffer-read-only nil) + (status (if compilation-exit-message-function + (funcall compilation-exit-message-function + process-status exit-status msg) + (cons msg exit-status))) + (omax (point-max)) + (opoint (point))) + ;; Record where we put the message, so we can ignore it + ;; later on. + (goto-char omax) + (insert ?\n mode-name " " (car status)) + (forward-char -1) + (insert " at " (substring (current-time-string) 0 19)) + (forward-char 1) + (setq mode-line-process (format ":%s [%s]" process-status (cdr status))) + ;; Force mode line redisplay soon. + (force-mode-line-update) + (if (and opoint (< opoint omax)) + (goto-char opoint)) + (if compilation-finish-function + (funcall compilation-finish-function (current-buffer) msg)))) ;; Called when compilation process changes state. (defun compilation-sentinel (proc msg) "Sentinel for compilation buffers." + ;; XEmacs change (let* ((buffer (process-buffer proc)) (window (get-buffer-window buffer))) (if (memq (process-status proc) '(signal exit)) @@ -781,6 +838,7 @@ (save-excursion (goto-char (process-mark proc)) (insert-before-markers string) + (run-hooks 'compilation-filter-hook) (set-marker (process-mark proc) (point))))))) ;; Return the cdr of compilation-old-error-list for the error containing point. @@ -792,7 +850,7 @@ (setq errors (cdr errors))) errors)) -(defun compilation-buffer-p (buffer) +(defsubst compilation-buffer-p (buffer) (save-excursion (set-buffer buffer) (or compilation-minor-mode (eq major-mode 'compilation-mode)))) @@ -951,6 +1009,8 @@ (select-window w) (switch-to-buffer compilation-last-buffer))) + ;; This was here for a long time (before my rewrite); why? --roland + ;;(switch-to-buffer compilation-last-buffer) (set-buffer-modified-p nil) (if (< compilation-parsing-end (point-max)) ;; compilation-error-list might be non-nil if we have a non-nil @@ -977,6 +1037,16 @@ (setq compilation-error-list error-list-pos)) )))))) +;; XEmacs addition +;; FSF has added this by 19.34, but it is highly complex, why? -sb +(defun compile-mouse-goto-error (event) + "Visit the source for the error under the mouse. +Use this command in a compilation log buffer." + (interactive "e") + (mouse-set-point event) + (beginning-of-line) + (compile-goto-error)) + (defun compile-goto-error (&optional argp) "Visit the source for the error message point is on. Use this command in a compilation log buffer. Sets the mark at point there. @@ -1011,15 +1081,6 @@ (next-error 1)) ;; XEmacs addition -(defun compile-mouse-goto-error (event) - "Visit the source for the error under the mouse. -Use this command in a compilation log buffer." - (interactive "e") - (mouse-set-point event) - (beginning-of-line) - (compile-goto-error)) - -;; XEmacs addition (defun compile-mouse-maybe-goto-error (event &optional click-count) (interactive "e") (if (equal (event-button event) 2) @@ -1047,6 +1108,7 @@ ;; The current buffer is a compilation buffer. (current-buffer) (if (and compilation-last-buffer (buffer-name compilation-last-buffer) + (compilation-buffer-p compilation-last-buffer) (or (not other-buffer) (not (eq compilation-last-buffer (current-buffer))))) compilation-last-buffer @@ -1095,6 +1157,7 @@ (and (not (consp argp)) (prefix-numeric-value argp)) (consp argp)))) +;;;###autoload (define-key ctl-x-map "`" 'next-error) ;; XEmacs change ;;;###autoload @@ -1176,7 +1239,8 @@ (throw 'no-next-error nil) (error (concat compilation-error-message (and (get-buffer-process (current-buffer)) - (eq (process-status (get-buffer-process + (eq (process-status + (get-buffer-process (current-buffer))) 'run) " yet"))))) @@ -1336,8 +1400,7 @@ (progn (widen) (goto-char (cdr next-error)))))) - -;;;###autoload (define-key ctl-x-map "`" 'next-error) + ;; Find a buffer for file FILENAME. ;; Search the directories in compilation-search-path. @@ -1481,14 +1544,15 @@ (error "compilation-error-regexp-alist is empty!")) subexpr (1+ error-group)) (while alist - (setq error-regexp-groups (cons (list subexpr - (+ subexpr (nth 1 (car alist))) - (+ subexpr (nth 2 (car alist))) - ;;#### This is buggy in FSFmacs - (let ((col (nth 3 (car alist)))) - (and col - (+ subexpr col)))) - error-regexp-groups)) + (setq error-regexp-groups + (cons (list subexpr + (+ subexpr (nth 1 (car alist))) + (+ subexpr (nth 2 (car alist))) + ;;#### This is buggy in FSFmacs + (let ((col (nth 3 (car alist)))) + (and col + (+ subexpr col)))) + error-regexp-groups)) (setq subexpr (+ subexpr 1 (count-regexp-groupings (car (car alist))))) (setq alist (cdr alist))) @@ -1605,6 +1669,15 @@ ;; compile-abbreviate-directory). (file-name-absolute-p filename) (setq filename (concat comint-file-name-prefix filename))) + + ;; Some compilers (e.g. Sun's java compiler, reportedly) + ;; produce bogus file names like "./bar//foo.c" for the file + ;; "bar/foo.c"; expand-file-name will collapse these into + ;; "/foo.c" and fail to find the appropriate file. So we look + ;; for doubled slashes in the file name and fix them up in the + ;; buffer. + (when (fboundp 'command-line-normalize-file-name) + (setq filename (command-line-normalize-file-name filename))) (setq filename (cons filename (cons default-directory (nthcdr 4 alist)))) @@ -1656,9 +1729,11 @@ (t (error "compilation-parse-errors: known groups didn't match!"))) - (message "Parsing error messages...%d (%d%% of buffer)" + (message "Parsing error messages...%d (%.0f%% of buffer)" compilation-num-errors-found - (/ (* 100 (point)) (point-max))) + ;; Use floating-point because (* 100 (point)) frequently + ;; exceeds the range of Emacs Lisp integers. + (/ (* 100.0 (point)) (point-max))) (and limit-search (>= (point) limit-search) ;; The user wanted a specific error, and we're past it. @@ -1702,7 +1777,6 @@ (substring dir (length parent-expanded))))) dir) - (provide 'compile) ;;; compile.el ends here
--- a/lisp/packages/completion.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/completion.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,283 +1,285 @@ ;;; completion.el --- dynamic word-completion code + ;; Copyright (C) 1990, 1993, 1995 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: abbrev -;; Author: Jim Salem <salem@think.com> of Thinking Machines Inc. +;; Author: Jim Salem <salem@bbnplanet.com> of Thinking Machines Inc. ;; (ideas suggested by Brewster Kahle) -;; This file is part of GNU Emacs. +;; This file is part of XEmacs. -;; 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 +;; XEmacs 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. +;; XEmacs 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, 675 Mass Ave, Cambridge, MA 02139, USA. +;; along with XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary: -;;; -;;; What to put in .emacs -;;;----------------------- -;;; (load "completion") -;;; (initialize-completions) + +;; What to put in .emacs +;;----------------------- +;; (load "completion") +;; (initialize-completions) -;;;--------------------------------------------------------------------------- -;;; Documentation [Slightly out of date] -;;;--------------------------------------------------------------------------- -;;; (also check the documentation string of the functions) -;;; -;;; Introduction -;;;--------------- -;;; -;;; After you type a few characters, pressing the "complete" key inserts -;;; the rest of the word you are likely to type. -;;; -;;; This watches all the words that you type and remembers them. When -;;; typing a new word, pressing "complete" (meta-return) "completes" the -;;; word by inserting the most recently used word that begins with the -;;; same characters. If you press meta-return repeatedly, it cycles -;;; through all the words it knows about. -;;; -;;; If you like the completion then just continue typing, it is as if you -;;; entered the text by hand. If you want the inserted extra characters -;;; to go away, type control-w or delete. More options are described below. -;;; -;;; The guesses are made in the order of the most recently "used". Typing -;;; in a word and then typing a separator character (such as a space) "uses" -;;; the word. So does moving a cursor over the word. If no words are found, -;;; it uses an extended version of the dabbrev style completion. -;;; -;;; You automatically save the completions you use to a file between -;;; sessions. -;;; -;;; Completion enables programmers to enter longer, more descriptive -;;; variable names while typing fewer keystrokes than they normally would. -;;; -;;; -;;; Full documentation -;;;--------------------- -;;; -;;; A "word" is any string containing characters with either word or symbol -;;; syntax. [E.G. Any alphanumeric string with hyphens, underscores, etc.] -;;; Unless you change the constants, you must type at least three characters -;;; for the word to be recognized. Only words longer than 6 characters are -;;; saved. -;;; -;;; When you load this file, completion will be on. I suggest you use the -;;; compiled version (because it is noticeably faster). -;;; -;;; M-X completion-mode toggles whether or not new words are added to the -;;; database by changing the value of enable-completion. -;;; -;;; SAVING/LOADING COMPLETIONS -;;; Completions are automatically saved from one session to another -;;; (unless save-completions-flag or enable-completion is nil). -;;; Loading this file (or calling initialize-completions) causes EMACS -;;; to load a completions database for a saved completions file -;;; (default: ~/.completions). When you exit, EMACS saves a copy of the -;;; completions that you -;;; often use. When you next start, EMACS loads in the saved completion file. -;;; -;;; The number of completions saved depends loosely on -;;; *saved-completions-decay-factor*. Completions that have never been -;;; inserted via "complete" are not saved. You are encouraged to experiment -;;; with different functions (see compute-completion-min-num-uses). -;;; -;;; Some completions are permanent and are always saved out. These -;;; completions have their num-uses slot set to T. Use -;;; add-permanent-completion to do this -;;; -;;; Completions are saved only if enable-completion is T. The number of old -;;; versions kept of the saved completions file is controlled by -;;; completions-file-versions-kept. -;;; -;;; COMPLETE KEY OPTIONS -;;; The complete function takes a numeric arguments. -;;; control-u :: leave the point at the beginning of the completion rather -;;; than the middle. -;;; a number :: rotate through the possible completions by that amount -;;; `-' :: same as -1 (insert previous completion) -;;; -;;; HOW THE DATABASE IS MAINTAINED -;;; <write> -;;; -;;; UPDATING THE DATABASE MANUALLY -;;; m-x kill-completion -;;; kills the completion at point. -;;; m-x add-completion -;;; m-x add-permanent-completion -;;; -;;; UPDATING THE DATABASE FROM A SOURCE CODE FILE -;;; m-x add-completions-from-buffer -;;; Parses all the definition names from a C or LISP mode buffer and -;;; adds them to the completion database. -;;; -;;; m-x add-completions-from-lisp-file -;;; Parses all the definition names from a C or Lisp mode file and -;;; adds them to the completion database. -;;; -;;; UPDATING THE DATABASE FROM A TAGS TABLE -;;; m-x add-completions-from-tags-table -;;; Adds completions from the current tags-table-buffer. -;;; -;;; HOW A COMPLETION IS FOUND -;;; <write> -;;; -;;; STRING CASING -;;; Completion is string case independent if case-fold-search has its -;;; normal default of T. Also when the completion is inserted the case of the -;;; entry is coerced appropriately. -;;; [E.G. APP --> APPROPRIATELY app --> appropriately -;;; App --> Appropriately] -;;; -;;; INITIALIZATION -;;; The form `(initialize-completions)' initializes the completion system by -;;; trying to load in the user's completions. After the first cal, further -;;; calls have no effect so one should be careful not to put the form in a -;;; site's standard site-init file. -;;; -;;;--------------------------------------------------------------------------- -;;; -;;; +;;--------------------------------------------------------------------------- +;; Documentation [Slightly out of date] +;;--------------------------------------------------------------------------- +;; (also check the documentation string of the functions) +;; +;; Introduction +;;--------------- +;; +;; After you type a few characters, pressing the "complete" key inserts +;; the rest of the word you are likely to type. +;; +;; This watches all the words that you type and remembers them. When +;; typing a new word, pressing "complete" (meta-return) "completes" the +;; word by inserting the most recently used word that begins with the +;; same characters. If you press meta-return repeatedly, it cycles +;; through all the words it knows about. +;; +;; If you like the completion then just continue typing, it is as if you +;; entered the text by hand. If you want the inserted extra characters +;; to go away, type control-w or delete. More options are described below. +;; +;; The guesses are made in the order of the most recently "used". Typing +;; in a word and then typing a separator character (such as a space) "uses" +;; the word. So does moving a cursor over the word. If no words are found, +;; it uses an extended version of the dabbrev style completion. +;; +;; You automatically save the completions you use to a file between +;; sessions. +;; +;; Completion enables programmers to enter longer, more descriptive +;; variable names while typing fewer keystrokes than they normally would. +;; +;; +;; Full documentation +;;--------------------- +;; +;; A "word" is any string containing characters with either word or symbol +;; syntax. [E.G. Any alphanumeric string with hyphens, underscores, etc.] +;; Unless you change the constants, you must type at least three characters +;; for the word to be recognized. Only words longer than 6 characters are +;; saved. +;; +;; When you load this file, completion will be on. I suggest you use the +;; compiled version (because it is noticeably faster). +;; +;; M-X completion-mode toggles whether or not new words are added to the +;; database by changing the value of enable-completion. +;; +;; SAVING/LOADING COMPLETIONS +;; Completions are automatically saved from one session to another +;; (unless save-completions-flag or enable-completion is nil). +;; Loading this file (or calling initialize-completions) causes EMACS +;; to load a completions database for a saved completions file +;; (default: ~/.completions). When you exit, EMACS saves a copy of the +;; completions that you +;; often use. When you next start, EMACS loads in the saved completion file. +;; +;; The number of completions saved depends loosely on +;; *saved-completions-decay-factor*. Completions that have never been +;; inserted via "complete" are not saved. You are encouraged to experiment +;; with different functions (see compute-completion-min-num-uses). +;; +;; Some completions are permanent and are always saved out. These +;; completions have their num-uses slot set to T. Use +;; add-permanent-completion to do this +;; +;; Completions are saved only if enable-completion is T. The number of old +;; versions kept of the saved completions file is controlled by +;; completions-file-versions-kept. +;; +;; COMPLETE KEY OPTIONS +;; The complete function takes a numeric arguments. +;; control-u :: leave the point at the beginning of the completion rather +;; than the middle. +;; a number :: rotate through the possible completions by that amount +;; `-' :: same as -1 (insert previous completion) +;; +;; HOW THE DATABASE IS MAINTAINED +;; <write> +;; +;; UPDATING THE DATABASE MANUALLY +;; m-x kill-completion +;; kills the completion at point. +;; m-x add-completion +;; m-x add-permanent-completion +;; +;; UPDATING THE DATABASE FROM A SOURCE CODE FILE +;; m-x add-completions-from-buffer +;; Parses all the definition names from a C or LISP mode buffer and +;; adds them to the completion database. +;; +;; m-x add-completions-from-lisp-file +;; Parses all the definition names from a C or Lisp mode file and +;; adds them to the completion database. +;; +;; UPDATING THE DATABASE FROM A TAGS TABLE +;; m-x add-completions-from-tags-table +;; Adds completions from the current tags-table-buffer. +;; +;; HOW A COMPLETION IS FOUND +;; <write> +;; +;; STRING CASING +;; Completion is string case independent if case-fold-search has its +;; normal default of T. Also when the completion is inserted the case of the +;; entry is coerced appropriately. +;; [E.G. APP --> APPROPRIATELY app --> appropriately +;; App --> Appropriately] +;; +;; INITIALIZATION +;; The form `(initialize-completions)' initializes the completion system by +;; trying to load in the user's completions. After the first cal, further +;; calls have no effect so one should be careful not to put the form in a +;; site's standard site-init file. +;; +;;--------------------------------------------------------------------------- +;; +;; -;;;--------------------------------------------------------------------------- -;;; Functions you might like to call -;;;--------------------------------------------------------------------------- -;;; -;;; add-completion string &optional num-uses -;;; Adds a new string to the database -;;; -;;; add-permanent-completion string -;;; Adds a new string to the database with num-uses = T -;;; +;;--------------------------------------------------------------------------- +;; Functions you might like to call +;;--------------------------------------------------------------------------- +;; +;; add-completion string &optional num-uses +;; Adds a new string to the database +;; +;; add-permanent-completion string +;; Adds a new string to the database with num-uses = T +;; -;;; kill-completion string -;;; Kills the completion from the database. -;;; -;;; clear-all-completions -;;; Clears the database -;;; -;;; list-all-completions -;;; Returns a list of all completions. -;;; -;;; -;;; next-completion string &optional index -;;; Returns a completion entry that starts with string. -;;; -;;; find-exact-completion string -;;; Returns a completion entry that exactly matches string. -;;; -;;; complete -;;; Inserts a completion at point -;;; -;;; initialize-completions -;;; Loads the completions file and sets up so that exiting emacs will -;;; save them. -;;; -;;; save-completions-to-file &optional filename -;;; load-completions-from-file &optional filename -;;; -;;;----------------------------------------------- -;;; Other functions -;;;----------------------------------------------- -;;; -;;; get-completion-list string -;;; -;;; These things are for manipulating the structure -;;; make-completion string num-uses -;;; completion-num-uses completion -;;; completion-string completion -;;; set-completion-num-uses completion num-uses -;;; set-completion-string completion string -;;; -;;; +;; kill-completion string +;; Kills the completion from the database. +;; +;; clear-all-completions +;; Clears the database +;; +;; list-all-completions +;; Returns a list of all completions. +;; +;; +;; next-completion string &optional index +;; Returns a completion entry that starts with string. +;; +;; find-exact-completion string +;; Returns a completion entry that exactly matches string. +;; +;; complete +;; Inserts a completion at point +;; +;; initialize-completions +;; Loads the completions file and sets up so that exiting emacs will +;; save them. +;; +;; save-completions-to-file &optional filename +;; load-completions-from-file &optional filename +;; +;;----------------------------------------------- +;; Other functions +;;----------------------------------------------- +;; +;; get-completion-list string +;; +;; These things are for manipulating the structure +;; make-completion string num-uses +;; completion-num-uses completion +;; completion-string completion +;; set-completion-num-uses completion num-uses +;; set-completion-string completion string +;; +;; -;;;----------------------------------------------- -;;; To Do :: (anybody ?) -;;;----------------------------------------------- -;;; -;;; Implement Lookup and keyboard interface in C -;;; Add package prefix smarts (for Common Lisp) -;;; Add autoprompting of possible completions after every keystroke (fast -;;; terminals only !) -;;; Add doc. to texinfo -;;; -;;; -;;;----------------------------------------------- +;;----------------------------------------------- +;; To Do :: (anybody ?) +;;----------------------------------------------- +;; +;; Implement Lookup and keyboard interface in C +;; Add package prefix smarts (for Common Lisp) +;; Add autoprompting of possible completions after every keystroke (fast +;; terminals only !) +;; Add doc. to texinfo +;; +;; +;;----------------------------------------------- ;;; Change Log: -;;;----------------------------------------------- -;;; Sometime in '84 Brewster implemented a somewhat buggy version for -;;; Symbolics LISPMs. -;;; Jan. '85 Jim became enamored of the idea and implemented a faster, -;;; more robust version. -;;; With input from many users at TMC, (rose, craig, and gls come to mind), -;;; the current style of interface was developed. -;;; 9/87, Jim and Brewster took terminals home. Yuck. After -;;; complaining for a while Brewester implemented a subset of the current -;;; LISPM version for GNU Emacs. -;;; 8/88 After complaining for a while (and with sufficient -;;; promised rewards), Jim reimplemented a version of GNU completion -;;; superior to that of the LISPM version. -;;; -;;;----------------------------------------------- -;;; Acknowledgements -;;;----------------------------------------------- -;;; Cliff Lasser (cal@think.com), Kevin Herbert (kph@cisco.com), -;;; eero@media-lab, kgk@cs.brown.edu, jla@ai.mit.edu, -;;; -;;;----------------------------------------------- -;;; Change Log -;;;----------------------------------------------- -;;; From version 9 to 10 -;;; - Allowance for non-integral *completion-version* nos. -;;; - Fix cmpl-apply-as-top-level for keyboard macros -;;; - Fix broken completion merging (in save-completions-to-file) -;;; - More misc. fixes for version 19.0 of emacs -;;; -;;; From Version 8 to 9 -;;; - Ported to version 19.0 of emacs (backcompatible with version 18) -;;; - Added add-completions-from-tags-table (with thanks to eero@media-lab) -;;; -;;; From Version 7 to 8 -;;; - Misc. changes to comments -;;; - new completion key bindings: c-x o, M->, M-<, c-a, c-e -;;; - cdabbrev now checks all the visible window buffers and the "other buffer" -;;; - `%' is now a symbol character rather than a separator (except in C mode) -;;; -;;; From Version 6 to 7 -;;; - Fixed bug with saving out .completion file the first time -;;; -;;; From Version 5 to 6 -;;; - removed statistics recording -;;; - reworked advise to handle autoloads -;;; - Fixed fortran mode support -;;; - Added new cursor motion triggers -;;; -;;; From Version 4 to 5 -;;; - doesn't bother saving if nothing has changed -;;; - auto-save if haven't used for a 1/2 hour -;;; - save period extended to two weeks -;;; - minor fix to capitalization code -;;; - added *completion-auto-save-period* to variables recorded. -;;; - added reenter protection to cmpl-record-statistics-filter -;;; - added backup protection to save-completions-to-file (prevents -;;; problems with disk full errors) +;;----------------------------------------------- +;; Sometime in '84 Brewster implemented a somewhat buggy version for +;; Symbolics LISPMs. +;; Jan. '85 Jim became enamored of the idea and implemented a faster, +;; more robust version. +;; With input from many users at TMC, (rose, craig, and gls come to mind), +;; the current style of interface was developed. +;; 9/87, Jim and Brewster took terminals home. Yuck. After +;; complaining for awhile Brewster implemented a subset of the current +;; LISPM version for GNU Emacs. +;; 8/88 After complaining for a while (and with sufficient +;; promised rewards), Jim reimplemented a version of GNU completion +;; superior to that of the LISPM version. +;; +;;----------------------------------------------- +;; Acknowledgements +;;----------------------------------------------- +;; Cliff Lasser (cal@think.com), Kevin Herbert (kph@cisco.com), +;; eero@media-lab, kgk@cs.brown.edu, jla@ai.mit.edu, +;; +;;----------------------------------------------- +;; Change Log +;;----------------------------------------------- +;; From version 9 to 10 +;; - Allowance for non-integral *completion-version* nos. +;; - Fix cmpl-apply-as-top-level for keyboard macros +;; - Fix broken completion merging (in save-completions-to-file) +;; - More misc. fixes for version 19.0 of emacs +;; +;; From Version 8 to 9 +;; - Ported to version 19.0 of emacs (backcompatible with version 18) +;; - Added add-completions-from-tags-table (with thanks to eero@media-lab) +;; +;; From Version 7 to 8 +;; - Misc. changes to comments +;; - new completion key bindings: c-x o, M->, M-<, c-a, c-e +;; - cdabbrev now checks all the visible window buffers and the "other buffer" +;; - `%' is now a symbol character rather than a separator (except in C mode) +;; +;; From Version 6 to 7 +;; - Fixed bug with saving out .completion file the first time +;; +;; From Version 5 to 6 +;; - removed statistics recording +;; - reworked advise to handle autoloads +;; - Fixed fortran mode support +;; - Added new cursor motion triggers +;; +;; From Version 4 to 5 +;; - doesn't bother saving if nothing has changed +;; - auto-save if haven't used for a 1/2 hour +;; - save period extended to two weeks +;; - minor fix to capitalization code +;; - added *completion-auto-save-period* to variables recorded. +;; - added reenter protection to cmpl-record-statistics-filter +;; - added backup protection to save-completions-to-file (prevents +;; problems with disk full errors) ;;; Code: -;;;--------------------------------------------------------------------------- -;;; User changeable parameters -;;;--------------------------------------------------------------------------- +;;--------------------------------------------------------------------------- +;; User changeable parameters +;;--------------------------------------------------------------------------- (defvar enable-completion t "*Non-nil means enable recording and saving of completions. @@ -287,7 +289,7 @@ "*Non-nil means save most-used completions when exiting Emacs. See also `saved-completions-retention-time'.") -(defvar save-completions-file-name "~/.completions" +(defvar save-completions-file-name (convert-standard-filename "~/.completions") "*The filename to save completions to.") (defvar save-completions-retention-time 336 @@ -318,12 +320,12 @@ Definitions from visited files which have these modes are automatically added to the completion database.") -;;;(defvar *record-cmpl-statistics-p* nil -;;; "*If non-nil, record completion statistics.") +;;(defvar *record-cmpl-statistics-p* nil +;; "*If non-nil, record completion statistics.") -;;;(defvar *completion-auto-save-period* 1800 -;;; "*The period in seconds to wait for emacs to be idle before autosaving -;;;the completions. Default is a 1/2 hour.") +;;(defvar *completion-auto-save-period* 1800 +;; "*The period in seconds to wait for emacs to be idle before autosaving +;;the completions. Default is a 1/2 hour.") (defconst completion-min-length nil ;; defined below in eval-when "*The minimum length of a stored completion. @@ -376,9 +378,9 @@ (completion-eval-when) -;;;--------------------------------------------------------------------------- -;;; Internal Variables -;;;--------------------------------------------------------------------------- +;;--------------------------------------------------------------------------- +;; Internal Variables +;;--------------------------------------------------------------------------- (defvar cmpl-initialized-p nil "Set to t when the completion system is initialized. @@ -392,13 +394,13 @@ (defvar completion-string) -;;;--------------------------------------------------------------------------- -;;; Low level tools -;;;--------------------------------------------------------------------------- +;;--------------------------------------------------------------------------- +;; Low level tools +;;--------------------------------------------------------------------------- -;;;----------------------------------------------- -;;; Misc. -;;;----------------------------------------------- +;;----------------------------------------------- +;; Misc. +;;----------------------------------------------- (defun minibuffer-window-selected-p () "True iff the current window is the minibuffer." @@ -408,9 +410,9 @@ (defmacro cmpl-read-time-eval (form) form) -;;;----------------------------------------------- -;;; String case coercion -;;;----------------------------------------------- +;;----------------------------------------------- +;; String case coercion +;;----------------------------------------------- (defun cmpl-string-case-type (string) "Returns :capitalized, :up, :down, :mixed, or :neither." @@ -429,12 +431,12 @@ (t ':neither)))) )) -;;; Tests - -;;; (cmpl-string-case-type "123ABCDEF456") --> :up -;;; (cmpl-string-case-type "123abcdef456") --> :down -;;; (cmpl-string-case-type "123aBcDeF456") --> :mixed -;;; (cmpl-string-case-type "123456") --> :neither -;;; (cmpl-string-case-type "Abcde123") --> :capitalized +;; Tests - +;; (cmpl-string-case-type "123ABCDEF456") --> :up +;; (cmpl-string-case-type "123abcdef456") --> :down +;; (cmpl-string-case-type "123aBcDeF456") --> :mixed +;; (cmpl-string-case-type "123456") --> :neither +;; (cmpl-string-case-type "Abcde123") --> :capitalized (defun cmpl-coerce-string-case (string case-type) (cond ((eq case-type ':down) (downcase string)) @@ -461,73 +463,72 @@ string-to-coerce) ))) -;;; Tests - -;;; (cmpl-merge-string-cases "AbCdEf456" "abc") --> AbCdEf456 -;;; (cmpl-merge-string-cases "abcdef456" "ABC") --> ABCDEF456 -;;; (cmpl-merge-string-cases "ABCDEF456" "Abc") --> Abcdef456 -;;; (cmpl-merge-string-cases "ABCDEF456" "abc") --> abcdef456 +;; Tests - +;; (cmpl-merge-string-cases "AbCdEf456" "abc") --> AbCdEf456 +;; (cmpl-merge-string-cases "abcdef456" "ABC") --> ABCDEF456 +;; (cmpl-merge-string-cases "ABCDEF456" "Abc") --> Abcdef456 +;; (cmpl-merge-string-cases "ABCDEF456" "abc") --> abcdef456 (defun cmpl-hours-since-origin () (let ((time (current-time))) - (truncate - (+ (* (/ (car time) 3600.0) (lsh 1 16)) - (/ (nth 2 time) 3600.0))))) + (floor (+ (* 65536.0 (nth 0 time)) (nth 1 time)) 3600))) -;;;--------------------------------------------------------------------------- -;;; "Symbol" parsing functions -;;;--------------------------------------------------------------------------- -;;; The functions symbol-before-point, symbol-under-point, etc. quickly return -;;; an appropriate symbol string. The strategy is to temporarily change -;;; the syntax table to enable fast symbol searching. There are three classes -;;; of syntax in these "symbol" syntax tables :: -;;; -;;; syntax (?_) - "symbol" chars (e.g. alphanumerics) -;;; syntax (?w) - symbol chars to ignore at end of words (e.g. period). -;;; syntax (? ) - everything else -;;; -;;; Thus by judicious use of scan-sexps and forward-word, we can get -;;; the word we want relatively fast and without consing. -;;; -;;; Why do we need a separate category for "symbol chars to ignore at ends" ? -;;; For example, in LISP we want starting :'s trimmed -;;; so keyword argument specifiers also define the keyword completion. And, -;;; for example, in C we want `.' appearing in a structure ref. to -;;; be kept intact in order to store the whole structure ref.; however, if -;;; it appears at the end of a symbol it should be discarded because it is -;;; probably used as a period. +;;--------------------------------------------------------------------------- +;; "Symbol" parsing functions +;;--------------------------------------------------------------------------- +;; The functions symbol-before-point, symbol-under-point, etc. quickly return +;; an appropriate symbol string. The strategy is to temporarily change +;; the syntax table to enable fast symbol searching. There are three classes +;; of syntax in these "symbol" syntax tables :: +;; +;; syntax (?_) - "symbol" chars (e.g. alphanumerics) +;; syntax (?w) - symbol chars to ignore at end of words (e.g. period). +;; syntax (? ) - everything else +;; +;; Thus by judicious use of scan-sexps and forward-word, we can get +;; the word we want relatively fast and without consing. +;; +;; Why do we need a separate category for "symbol chars to ignore at ends" ? +;; For example, in LISP we want starting :'s trimmed +;; so keyword argument specifiers also define the keyword completion. And, +;; for example, in C we want `.' appearing in a structure ref. to +;; be kept intact in order to store the whole structure ref.; however, if +;; it appears at the end of a symbol it should be discarded because it is +;; probably used as a period. -;;; Here is the default completion syntax :: -;;; Symbol chars :: A-Z a-z 0-9 @ / \ * + ~ $ < > % -;;; Symbol chars to ignore at ends :: _ : . - -;;; Separator chars. :: <tab> <space> ! ^ & ( ) = ` | { } [ ] ; " ' # -;;; , ? <Everything else> +;; Here is the default completion syntax :: +;; Symbol chars :: A-Z a-z 0-9 @ / \ * + ~ $ < > % +;; Symbol chars to ignore at ends :: _ : . - +;; Separator chars. :: <tab> <space> ! ^ & ( ) = ` | { } [ ] ; " ' # +;; , ? <Everything else> -;;; Mode specific differences and notes :: -;;; LISP diffs -> -;;; Symbol chars :: ! & ? = ^ -;;; -;;; C diffs -> -;;; Separator chars :: + * / : % -;;; A note on the hyphen (`-'). Perhaps the hyphen should also be a separator -;;; char., however, we wanted to have completion symbols include pointer -;;; references. For example, "foo->bar" is a symbol as far as completion is -;;; concerned. -;;; -;;; FORTRAN diffs -> -;;; Separator chars :: + - * / : -;;; -;;; Pathname diffs -> -;;; Symbol chars :: . -;;; Of course there is no pathname "mode" and in fact we have not implemented -;;; this table. However, if there was such a mode, this is what it would look -;;; like. +;; Mode specific differences and notes :: +;; LISP diffs -> +;; Symbol chars :: ! & ? = ^ +;; +;; C diffs -> +;; Separator chars :: + * / : % +;; A note on the hyphen (`-'). Perhaps the hyphen should also be a separator +;; char., however, we wanted to have completion symbols include pointer +;; references. For example, "foo->bar" is a symbol as far as completion is +;; concerned. +;; +;; FORTRAN diffs -> +;; Separator chars :: + - * / : +;; +;; Pathname diffs -> +;; Symbol chars :: . +;; Of course there is no pathname "mode" and in fact we have not implemented +;; this table. However, if there was such a mode, this is what it would look +;; like. -;;;----------------------------------------------- -;;; Table definitions -;;;----------------------------------------------- +;;----------------------------------------------- +;; Table definitions +;;----------------------------------------------- (defun cmpl-make-standard-completion-syntax-table () + ;; XEmacs change: Left the original code alone. -sb (let ((table (make-vector 256 0)) ;; default syntax is whitespace i) ;; alpha chars @@ -587,9 +588,9 @@ "This variable holds the current completion syntax table.") (make-variable-buffer-local 'cmpl-syntax-table) -;;;----------------------------------------------- -;;; Installing the appropriate mode tables -;;;----------------------------------------------- +;;----------------------------------------------- +;; Installing the appropriate mode tables +;;----------------------------------------------- (add-hook 'lisp-mode-hook '(lambda () @@ -604,15 +605,15 @@ (setq cmpl-syntax-table cmpl-fortran-syntax-table) (completion-setup-fortran-mode))) -;;;----------------------------------------------- -;;; Symbol functions -;;;----------------------------------------------- +;;----------------------------------------------- +;; Symbol functions +;;----------------------------------------------- (defvar cmpl-symbol-start nil "Holds first character of symbol, after any completion symbol function.") (defvar cmpl-symbol-end nil "Holds last character of symbol, after any completion symbol function.") -;;; These are temp. vars. we use to avoid using let. -;;; Why ? Small speed improvement. +;; These are temp. vars. we use to avoid using let. +;; Why ? Small speed improvement. (defvar cmpl-saved-syntax nil) (defvar cmpl-saved-point nil) @@ -620,6 +621,7 @@ "Returns the symbol that the point is currently on. But only if it is longer than `completion-min-length'." (setq cmpl-saved-syntax (syntax-table)) + ;; XEmacs change (set-syntax-table cmpl-syntax-table) (cond ;; Cursor is on following-char and after preceding-char @@ -656,23 +658,24 @@ nil) )) -;;; tests for symbol-under-point -;;; `^' indicates cursor pos. where value is returned -;;; simple-word-test -;;; ^^^^^^^^^^^^^^^^ --> simple-word-test -;;; _harder_word_test_ -;;; ^^^^^^^^^^^^^^^^^^ --> harder_word_test -;;; .___.______. -;;; --> nil -;;; /foo/bar/quux.hello -;;; ^^^^^^^^^^^^^^^^^^^ --> /foo/bar/quux.hello -;;; +;; tests for symbol-under-point +;; `^' indicates cursor pos. where value is returned +;; simple-word-test +;; ^^^^^^^^^^^^^^^^ --> simple-word-test +;; _harder_word_test_ +;; ^^^^^^^^^^^^^^^^^^ --> harder_word_test +;; .___.______. +;; --> nil +;; /foo/bar/quux.hello +;; ^^^^^^^^^^^^^^^^^^^ --> /foo/bar/quux.hello +;; (defun symbol-before-point () "Returns a string of the symbol immediately before point. Returns nil if there isn't one longer than `completion-min-length'." ;; This is called when a word separator is typed so it must be FAST ! (setq cmpl-saved-syntax (syntax-table)) + ;; XEmacs change (set-syntax-table cmpl-syntax-table) ;; Cursor is on following-char and after preceding-char (cond ((= (setq cmpl-preceding-syntax (char-syntax (preceding-char))) ?_) @@ -680,6 +683,7 @@ (setq cmpl-symbol-end (point) cmpl-symbol-start (scan-sexps (1+ cmpl-symbol-end) -1) ) + ;; XEmacs change ;; remove chars to ignore at the start (cond ((= (char-syntax (char-after cmpl-symbol-start)) ?w) (goto-char cmpl-symbol-start) @@ -724,31 +728,33 @@ nil) )) -;;; tests for symbol-before-point -;;; `^' indicates cursor pos. where value is returned -;;; simple-word-test -;;; ^ --> nil -;;; ^ --> nil -;;; ^ --> simple-w -;;; ^ --> simple-word-test -;;; _harder_word_test_ -;;; ^ --> harder_word_test -;;; ^ --> harder_word_test -;;; ^ --> harder -;;; .___.... -;;; --> nil +;; tests for symbol-before-point +;; `^' indicates cursor pos. where value is returned +;; simple-word-test +;; ^ --> nil +;; ^ --> nil +;; ^ --> simple-w +;; ^ --> simple-word-test +;; _harder_word_test_ +;; ^ --> harder_word_test +;; ^ --> harder_word_test +;; ^ --> harder +;; .___.... +;; --> nil (defun symbol-under-or-before-point () - ;;; This could be made slightly faster but it is better to avoid - ;;; copying all the code. - ;;; However, it is only used by the completion string prompter. - ;;; If it comes into common use, it could be rewritten. + ;; This could be made slightly faster but it is better to avoid + ;; copying all the code. + ;; However, it is only used by the completion string prompter. + ;; If it comes into common use, it could be rewritten. + ;; XEmacs change (setq cmpl-saved-syntax (syntax-table)) (set-syntax-table cmpl-syntax-table) (cond ((memq (char-syntax (following-char)) '(?w ?_)) (set-syntax-table cmpl-saved-syntax) (symbol-under-point)) (t + ;; XEmacs change (set-syntax-table cmpl-saved-syntax) (symbol-before-point)) )) @@ -760,6 +766,7 @@ ;; end chars." ;; Cursor is on following-char and after preceding-char (setq cmpl-saved-syntax (syntax-table)) + ;; XEmacs change (set-syntax-table cmpl-syntax-table) (cond ((memq (setq cmpl-preceding-syntax (char-syntax (preceding-char))) '(?_ ?w)) @@ -789,42 +796,42 @@ nil) )) -;;; tests for symbol-before-point-for-complete -;;; `^' indicates cursor pos. where value is returned -;;; simple-word-test -;;; ^ --> nil -;;; ^ --> nil -;;; ^ --> simple-w -;;; ^ --> simple-word-test -;;; _harder_word_test_ -;;; ^ --> harder_word_test -;;; ^ --> harder_word_test_ -;;; ^ --> harder_ -;;; .___.... -;;; --> nil +;; tests for symbol-before-point-for-complete +;; `^' indicates cursor pos. where value is returned +;; simple-word-test +;; ^ --> nil +;; ^ --> nil +;; ^ --> simple-w +;; ^ --> simple-word-test +;; _harder_word_test_ +;; ^ --> harder_word_test +;; ^ --> harder_word_test_ +;; ^ --> harder_ +;; .___.... +;; --> nil -;;;--------------------------------------------------------------------------- -;;; Statistics Recording -;;;--------------------------------------------------------------------------- +;;--------------------------------------------------------------------------- +;; Statistics Recording +;;--------------------------------------------------------------------------- -;;; Note that the guts of this has been turned off. The guts -;;; are in completion-stats.el. +;; Note that the guts of this has been turned off. The guts +;; are in completion-stats.el. -;;;----------------------------------------------- -;;; Conditionalizing code on *record-cmpl-statistics-p* -;;;----------------------------------------------- -;;; All statistics code outside this block should use this +;;----------------------------------------------- +;; Conditionalizing code on *record-cmpl-statistics-p* +;;----------------------------------------------- +;; All statistics code outside this block should use this (defmacro cmpl-statistics-block (&rest body)) -;;; "Only executes body if we are recording statistics." -;;; (list 'cond -;;; (list* '*record-cmpl-statistics-p* body) -;;; )) +;; "Only executes body if we are recording statistics." +;; (list 'cond +;; (list* '*record-cmpl-statistics-p* body) +;; )) -;;;----------------------------------------------- -;;; Completion Sources -;;;----------------------------------------------- +;;----------------------------------------------- +;; Completion Sources +;;----------------------------------------------- ;; ID numbers (defconst cmpl-source-unknown 0) @@ -839,43 +846,43 @@ -;;;--------------------------------------------------------------------------- -;;; Completion Method #2: dabbrev-expand style -;;;--------------------------------------------------------------------------- -;;; -;;; This method is used if there are no useful stored completions. It is -;;; based on dabbrev-expand with these differences : -;;; 1) Faster (we don't use regexps) -;;; 2) case coercion handled correctly -;;; This is called cdabbrev to differentiate it. -;;; We simply search backwards through the file looking for words which -;;; start with the same letters we are trying to complete. -;;; +;;--------------------------------------------------------------------------- +;; Completion Method #2: dabbrev-expand style +;;--------------------------------------------------------------------------- +;; +;; This method is used if there are no useful stored completions. It is +;; based on dabbrev-expand with these differences : +;; 1) Faster (we don't use regexps) +;; 2) case coercion handled correctly +;; This is called cdabbrev to differentiate it. +;; We simply search backwards through the file looking for words which +;; start with the same letters we are trying to complete. +;; (defvar cdabbrev-completions-tried nil) -;;; "A list of all the cdabbrev completions since the last reset.") +;; "A list of all the cdabbrev completions since the last reset.") (defvar cdabbrev-current-point 0) -;;; "The current point position the cdabbrev search is at.") +;; "The current point position the cdabbrev search is at.") (defvar cdabbrev-current-window nil) -;;; "The current window we are looking for cdabbrevs in. T if looking in -;;; (other-buffer), NIL if no more cdabbrevs.") +;; "The current window we are looking for cdabbrevs in. T if looking in +;; (other-buffer), NIL if no more cdabbrevs.") (defvar cdabbrev-wrapped-p nil) -;;; "T if the cdabbrev search has wrapped around the file.") +;; "T if the cdabbrev search has wrapped around the file.") (defvar cdabbrev-abbrev-string "") (defvar cdabbrev-start-point 0) (defvar cdabbrev-stop-point) -;;; Test strings for cdabbrev -;;; cdat-upcase ;;same namestring -;;; CDAT-UPCASE ;;ok -;;; cdat2 ;;too short -;;; cdat-1-2-3-4 ;;ok -;;; a-cdat-1 ;;doesn't start correctly -;;; cdat-simple ;;ok +;; Test strings for cdabbrev +;; cdat-upcase ;;same namestring +;; CDAT-UPCASE ;;ok +;; cdat2 ;;too short +;; cdat-1-2-3-4 ;;ok +;; a-cdat-1 ;;doesn't start correctly +;; cdat-simple ;;ok (defun reset-cdabbrev (abbrev-string &optional initial-completions-tried) @@ -1014,35 +1021,35 @@ (t (reset-cdabbrev-window) (next-cdabbrev)))))) -;;; The following must be eval'd in the minibuffer :: -;;; (reset-cdabbrev "cdat") -;;; (next-cdabbrev) --> "cdat-simple" -;;; (next-cdabbrev) --> "cdat-1-2-3-4" -;;; (next-cdabbrev) --> "CDAT-UPCASE" -;;; (next-cdabbrev) --> "cdat-wrapping" -;;; (next-cdabbrev) --> "cdat_start_sym" -;;; (next-cdabbrev) --> nil -;;; (next-cdabbrev) --> nil -;;; (next-cdabbrev) --> nil +;; The following must be eval'd in the minibuffer :: +;; (reset-cdabbrev "cdat") +;; (next-cdabbrev) --> "cdat-simple" +;; (next-cdabbrev) --> "cdat-1-2-3-4" +;; (next-cdabbrev) --> "CDAT-UPCASE" +;; (next-cdabbrev) --> "cdat-wrapping" +;; (next-cdabbrev) --> "cdat_start_sym" +;; (next-cdabbrev) --> nil +;; (next-cdabbrev) --> nil +;; (next-cdabbrev) --> nil -;;; _cdat_start_sym -;;; cdat-wrapping +;; _cdat_start_sym +;; cdat-wrapping -;;;--------------------------------------------------------------------------- -;;; Completion Database -;;;--------------------------------------------------------------------------- +;;--------------------------------------------------------------------------- +;; Completion Database +;;--------------------------------------------------------------------------- -;;; We use two storage modes for the two search types :: -;;; 1) Prefix {cmpl-prefix-obarray} for looking up possible completions -;;; Used by search-completion-next -;;; the value of the symbol is nil or a cons of head and tail pointers -;;; 2) Interning {cmpl-obarray} to see if it's in the database -;;; Used by find-exact-completion, completion-in-database-p -;;; The value of the symbol is the completion entry +;; We use two storage modes for the two search types :: +;; 1) Prefix {cmpl-prefix-obarray} for looking up possible completions +;; Used by search-completion-next +;; the value of the symbol is nil or a cons of head and tail pointers +;; 2) Interning {cmpl-obarray} to see if it's in the database +;; Used by find-exact-completion, completion-in-database-p +;; The value of the symbol is the completion entry -;;; bad things may happen if this length is changed due to the way -;;; GNU implements obarrays +;; bad things may happen if this length is changed due to the way +;; GNU implements obarrays (defconst cmpl-obarray-length 511) (defvar cmpl-prefix-obarray (make-vector cmpl-obarray-length 0) @@ -1053,19 +1060,19 @@ "An obarray used to store the downcased completions. Each symbol is bound to a single completion entry.") -;;;----------------------------------------------- -;;; Completion Entry Structure Definition -;;;----------------------------------------------- +;;----------------------------------------------- +;; Completion Entry Structure Definition +;;----------------------------------------------- -;;; A completion entry is a LIST of string, prefix-symbol num-uses, and -;;; last-use-time (the time the completion was last used) -;;; last-use-time is T if the string should be kept permanently -;;; num-uses is incremented everytime the completion is used. +;; A completion entry is a LIST of string, prefix-symbol num-uses, and +;; last-use-time (the time the completion was last used) +;; last-use-time is T if the string should be kept permanently +;; num-uses is incremented every time the completion is used. -;;; We chose lists because (car foo) is faster than (aref foo 0) and the -;;; creation time is about the same. +;; We chose lists because (car foo) is faster than (aref foo 0) and the +;; creation time is about the same. -;;; READER MACROS +;; READER MACROS (defmacro completion-string (completion-entry) (list 'car completion-entry)) @@ -1083,7 +1090,7 @@ (defmacro completion-source (completion-entry) (list 'nth 3 completion-entry)) -;;; WRITER MACROS +;; WRITER MACROS (defmacro set-completion-string (completion-entry string) (list 'setcar completion-entry string)) @@ -1093,7 +1100,7 @@ (defmacro set-completion-last-use-time (completion-entry last-use-time) (list 'setcar (list 'cdr (list 'cdr completion-entry)) last-use-time)) -;;; CONSTRUCTOR +;; CONSTRUCTOR (defun make-completion (string) "Returns a list of a completion entry." (list (list string 0 nil current-completion-source))) @@ -1104,12 +1111,12 @@ -;;;----------------------------------------------- -;;; Prefix symbol entry definition -;;;----------------------------------------------- -;;; A cons of (head . tail) +;;----------------------------------------------- +;; Prefix symbol entry definition +;;----------------------------------------------- +;; A cons of (head . tail) -;;; READER Macros +;; READER Macros (defmacro cmpl-prefix-entry-head (prefix-entry) (list 'car prefix-entry)) @@ -1117,7 +1124,7 @@ (defmacro cmpl-prefix-entry-tail (prefix-entry) (list 'cdr prefix-entry)) -;;; WRITER Macros +;; WRITER Macros (defmacro set-cmpl-prefix-entry-head (prefix-entry new-head) (list 'setcar prefix-entry new-head)) @@ -1125,15 +1132,15 @@ (defmacro set-cmpl-prefix-entry-tail (prefix-entry new-tail) (list 'setcdr prefix-entry new-tail)) -;;; Constructor +;; Constructor (defun make-cmpl-prefix-entry (completion-entry-list) "Makes a new prefix entry containing only completion-entry." (cons completion-entry-list completion-entry-list)) -;;;----------------------------------------------- -;;; Completion Database - Utilities -;;;----------------------------------------------- +;;----------------------------------------------- +;; Completion Database - Utilities +;;----------------------------------------------- (defun clear-all-completions () "Initializes the completion storage. All existing completions are lost." @@ -1171,13 +1178,13 @@ completions-list-return-value)))) -;;;----------------------------------------------- -;;; Updating the database -;;;----------------------------------------------- -;;; -;;; These are the internal functions used to update the datebase -;;; -;;; +;;----------------------------------------------- +;; Updating the database +;;----------------------------------------------- +;; +;; These are the internal functions used to update the datebase +;; +;; (defvar completion-to-accept nil) ;;"Set to a string that is pending its acceptance." ;; this checked by the top level reading functions @@ -1193,7 +1200,7 @@ (defvar cmpl-db-debug-p nil "Set to T if you want to debug the database.") -;;; READS +;; READS (defun find-exact-completion (string) "Returns the completion entry for string or nil. Sets up `cmpl-db-downcase-string' and `cmpl-db-symbol'." @@ -1272,7 +1279,7 @@ (error "Completion database corrupted. Try M-x clear-all-completions. Send bug report.") ) -;;; WRITES +;; WRITES (defun add-completion-to-tail-if-new (string) "If STRING is not in the database add it to appropriate prefix list. STRING is added to the end of the appropriate prefix list with @@ -1401,52 +1408,52 @@ (error "Unknown completion `%s'" completion-string) )) -;;; Tests -- -;;; - Add and Find - -;;; (add-completion-to-head "banana") --> ("banana" 0 nil 0) -;;; (find-exact-completion "banana") --> ("banana" 0 nil 0) -;;; (find-exact-completion "bana") --> nil -;;; (car (find-cmpl-prefix-entry "ban")) --> (("banana" ...)) -;;; (cdr (find-cmpl-prefix-entry "ban")) --> (("banana" ...)) -;;; (add-completion-to-head "banish") --> ("banish" 0 nil 0) -;;; (find-exact-completion "banish") --> ("banish" 0 nil 0) -;;; (car (find-cmpl-prefix-entry "ban")) --> (("banish" ...) ("banana" ...)) -;;; (cdr (find-cmpl-prefix-entry "ban")) --> (("banana" ...)) -;;; (add-completion-to-head "banana") --> ("banana" 0 nil 0) -;;; (car (find-cmpl-prefix-entry "ban")) --> (("banana" ...) ("banish" ...)) -;;; (cdr (find-cmpl-prefix-entry "ban")) --> (("banish" ...)) -;;; -;;; - Deleting - -;;; (add-completion-to-head "banner") --> ("banner" 0 nil 0) -;;; (delete-completion "banner") -;;; (find-exact-completion "banner") --> nil -;;; (car (find-cmpl-prefix-entry "ban")) --> (("banana" ...) ("banish" ...)) -;;; (cdr (find-cmpl-prefix-entry "ban")) --> (("banish" ...)) -;;; (add-completion-to-head "banner") --> ("banner" 0 nil 0) -;;; (delete-completion "banana") -;;; (car (find-cmpl-prefix-entry "ban")) --> (("banner" ...) ("banish" ...)) -;;; (cdr (find-cmpl-prefix-entry "ban")) --> (("banish" ...)) -;;; (delete-completion "banner") -;;; (delete-completion "banish") -;;; (find-cmpl-prefix-entry "ban") --> nil -;;; (delete-completion "banner") --> error -;;; -;;; - Tail - -;;; (add-completion-to-tail-if-new "banana") --> ("banana" 0 nil 0) -;;; (car (find-cmpl-prefix-entry "ban")) --> (("banana" ...)) -;;; (cdr (find-cmpl-prefix-entry "ban")) --> (("banana" ...)) -;;; (add-completion-to-tail-if-new "banish") --> ("banish" 0 nil 0) -;;; (car (find-cmpl-prefix-entry "ban")) -->(("banana" ...) ("banish" ...)) -;;; (cdr (find-cmpl-prefix-entry "ban")) -->(("banish" ...)) -;;; +;; Tests -- +;; - Add and Find - +;; (add-completion-to-head "banana") --> ("banana" 0 nil 0) +;; (find-exact-completion "banana") --> ("banana" 0 nil 0) +;; (find-exact-completion "bana") --> nil +;; (car (find-cmpl-prefix-entry "ban")) --> (("banana" ...)) +;; (cdr (find-cmpl-prefix-entry "ban")) --> (("banana" ...)) +;; (add-completion-to-head "banish") --> ("banish" 0 nil 0) +;; (find-exact-completion "banish") --> ("banish" 0 nil 0) +;; (car (find-cmpl-prefix-entry "ban")) --> (("banish" ...) ("banana" ...)) +;; (cdr (find-cmpl-prefix-entry "ban")) --> (("banana" ...)) +;; (add-completion-to-head "banana") --> ("banana" 0 nil 0) +;; (car (find-cmpl-prefix-entry "ban")) --> (("banana" ...) ("banish" ...)) +;; (cdr (find-cmpl-prefix-entry "ban")) --> (("banish" ...)) +;; +;; - Deleting - +;; (add-completion-to-head "banner") --> ("banner" 0 nil 0) +;; (delete-completion "banner") +;; (find-exact-completion "banner") --> nil +;; (car (find-cmpl-prefix-entry "ban")) --> (("banana" ...) ("banish" ...)) +;; (cdr (find-cmpl-prefix-entry "ban")) --> (("banish" ...)) +;; (add-completion-to-head "banner") --> ("banner" 0 nil 0) +;; (delete-completion "banana") +;; (car (find-cmpl-prefix-entry "ban")) --> (("banner" ...) ("banish" ...)) +;; (cdr (find-cmpl-prefix-entry "ban")) --> (("banish" ...)) +;; (delete-completion "banner") +;; (delete-completion "banish") +;; (find-cmpl-prefix-entry "ban") --> nil +;; (delete-completion "banner") --> error +;; +;; - Tail - +;; (add-completion-to-tail-if-new "banana") --> ("banana" 0 nil 0) +;; (car (find-cmpl-prefix-entry "ban")) --> (("banana" ...)) +;; (cdr (find-cmpl-prefix-entry "ban")) --> (("banana" ...)) +;; (add-completion-to-tail-if-new "banish") --> ("banish" 0 nil 0) +;; (car (find-cmpl-prefix-entry "ban")) -->(("banana" ...) ("banish" ...)) +;; (cdr (find-cmpl-prefix-entry "ban")) -->(("banish" ...)) +;; -;;;--------------------------------------------------------------------------- -;;; Database Update :: Interface level routines -;;;--------------------------------------------------------------------------- -;;; -;;; These lie on top of the database ref. functions but below the standard -;;; user interface level +;;--------------------------------------------------------------------------- +;; Database Update :: Interface level routines +;;--------------------------------------------------------------------------- +;; +;; These lie on top of the database ref. functions but below the standard +;; user interface level (defun interactive-completion-string-reader (prompt) @@ -1553,38 +1560,38 @@ (setq cmpl-completions-accepted-p t))))) )) -;;; Tests -- -;;; - Add and Find - -;;; (add-completion "banana" 5 10) -;;; (find-exact-completion "banana") --> ("banana" 5 10 0) -;;; (add-completion "banana" 6) -;;; (find-exact-completion "banana") --> ("banana" 6 10 0) -;;; (add-completion "banish") -;;; (car (find-cmpl-prefix-entry "ban")) --> (("banish" ...) ("banana" ...)) -;;; -;;; - Accepting - -;;; (setq completion-to-accept "banana") -;;; (accept-completion) -;;; (find-exact-completion "banana") --> ("banana" 7 10) -;;; (car (find-cmpl-prefix-entry "ban")) --> (("banana" ...) ("banish" ...)) -;;; (setq completion-to-accept "banish") -;;; (add-completion "banner") -;;; (car (find-cmpl-prefix-entry "ban")) -;;; --> (("banner" ...) ("banish" 1 ...) ("banana" 7 ...)) -;;; -;;; - Deleting - -;;; (kill-completion "banish") -;;; (car (find-cmpl-prefix-entry "ban")) --> (("banner" ...) ("banana" ...)) +;; Tests -- +;; - Add and Find - +;; (add-completion "banana" 5 10) +;; (find-exact-completion "banana") --> ("banana" 5 10 0) +;; (add-completion "banana" 6) +;; (find-exact-completion "banana") --> ("banana" 6 10 0) +;; (add-completion "banish") +;; (car (find-cmpl-prefix-entry "ban")) --> (("banish" ...) ("banana" ...)) +;; +;; - Accepting - +;; (setq completion-to-accept "banana") +;; (accept-completion) +;; (find-exact-completion "banana") --> ("banana" 7 10) +;; (car (find-cmpl-prefix-entry "ban")) --> (("banana" ...) ("banish" ...)) +;; (setq completion-to-accept "banish") +;; (add-completion "banner") +;; (car (find-cmpl-prefix-entry "ban")) +;; --> (("banner" ...) ("banish" 1 ...) ("banana" 7 ...)) +;; +;; - Deleting - +;; (kill-completion "banish") +;; (car (find-cmpl-prefix-entry "ban")) --> (("banner" ...) ("banana" ...)) -;;;--------------------------------------------------------------------------- -;;; Searching the database -;;;--------------------------------------------------------------------------- -;;; Functions outside this block must call completion-search-reset followed -;;; by calls to completion-search-next or completion-search-peek -;;; +;;--------------------------------------------------------------------------- +;; Searching the database +;;--------------------------------------------------------------------------- +;; Functions outside this block must call completion-search-reset followed +;; by calls to completion-search-next or completion-search-peek +;; -;;; Status variables +;; Status variables ;; Commented out to improve loading speed (defvar cmpl-test-string "") ;; "The current string used by completion-search-next." @@ -1709,50 +1716,50 @@ ;; Completely unsuccessful, return nil )) -;;; Tests -- -;;; - Add and Find - -;;; (add-completion "banana") -;;; (completion-search-reset "ban") -;;; (completion-search-next 0) --> "banana" -;;; -;;; - Discrimination - -;;; (add-completion "cumberland") -;;; (add-completion "cumberbund") -;;; cumbering -;;; (completion-search-reset "cumb") -;;; (completion-search-peek t) --> "cumberbund" -;;; (completion-search-next 0) --> "cumberbund" -;;; (completion-search-peek t) --> "cumberland" -;;; (completion-search-next 1) --> "cumberland" -;;; (completion-search-peek nil) --> nil -;;; (completion-search-next 2) --> "cumbering" {cdabbrev} -;;; (completion-search-next 3) --> nil or "cumming"{depends on context} -;;; (completion-search-next 1) --> "cumberland" -;;; (completion-search-peek t) --> "cumbering" {cdabbrev} -;;; -;;; - Accepting - -;;; (completion-search-next 1) --> "cumberland" -;;; (setq completion-to-accept "cumberland") -;;; (completion-search-reset "foo") -;;; (completion-search-reset "cum") -;;; (completion-search-next 0) --> "cumberland" -;;; -;;; - Deleting - -;;; (kill-completion "cumberland") -;;; cummings -;;; (completion-search-reset "cum") -;;; (completion-search-next 0) --> "cumberbund" -;;; (completion-search-next 1) --> "cummings" -;;; -;;; - Ignoring Capitalization - -;;; (completion-search-reset "CuMb") -;;; (completion-search-next 0) --> "cumberbund" +;; Tests -- +;; - Add and Find - +;; (add-completion "banana") +;; (completion-search-reset "ban") +;; (completion-search-next 0) --> "banana" +;; +;; - Discrimination - +;; (add-completion "cumberland") +;; (add-completion "cumberbund") +;; cumbering +;; (completion-search-reset "cumb") +;; (completion-search-peek t) --> "cumberbund" +;; (completion-search-next 0) --> "cumberbund" +;; (completion-search-peek t) --> "cumberland" +;; (completion-search-next 1) --> "cumberland" +;; (completion-search-peek nil) --> nil +;; (completion-search-next 2) --> "cumbering" {cdabbrev} +;; (completion-search-next 3) --> nil or "cumming"{depends on context} +;; (completion-search-next 1) --> "cumberland" +;; (completion-search-peek t) --> "cumbering" {cdabbrev} +;; +;; - Accepting - +;; (completion-search-next 1) --> "cumberland" +;; (setq completion-to-accept "cumberland") +;; (completion-search-reset "foo") +;; (completion-search-reset "cum") +;; (completion-search-next 0) --> "cumberland" +;; +;; - Deleting - +;; (kill-completion "cumberland") +;; cummings +;; (completion-search-reset "cum") +;; (completion-search-next 0) --> "cumberbund" +;; (completion-search-next 1) --> "cummings" +;; +;; - Ignoring Capitalization - +;; (completion-search-reset "CuMb") +;; (completion-search-next 0) --> "cumberbund" -;;;----------------------------------------------- -;;; COMPLETE -;;;----------------------------------------------- +;;----------------------------------------------- +;; COMPLETE +;;----------------------------------------------- (defun completion-mode () "Toggles whether or not to add new words to the completion database." @@ -1776,7 +1783,7 @@ `-' :: same as -1 (insert previous completion) {See the comments at the top of `completion.el' for more info.}" (interactive "*p") - ;;; Set up variables + ;; Set up variables (cond ((eq last-command this-command) ;; Undo last one (delete-region cmpl-last-insert-location (point)) @@ -1877,9 +1884,9 @@ (setq this-command 'failed-complete) )))) -;;;----------------------------------------------- -;;; "Complete" Key Keybindings -;;;----------------------------------------------- +;;----------------------------------------------- +;; "Complete" Key Keybindings +;;----------------------------------------------- ;; XEmacs change ;;(global-set-key "\M-\r" 'complete) @@ -1889,24 +1896,24 @@ (global-set-key '(control return) 'complete) ;; XEmacs: #### still need to take care of function-key-map -;;; Tests - -;;; (add-completion "cumberland") -;;; (add-completion "cumberbund") -;;; cum -;;; Cumber -;;; cumbering -;;; cumb +;; Tests - +;; (add-completion "cumberland") +;; (add-completion "cumberbund") +;; cum +;; Cumber +;; cumbering +;; cumb -;;;--------------------------------------------------------------------------- -;;; Parsing definitions from files into the database -;;;--------------------------------------------------------------------------- +;;--------------------------------------------------------------------------- +;; Parsing definitions from files into the database +;;--------------------------------------------------------------------------- -;;;----------------------------------------------- -;;; Top Level functions :: -;;;----------------------------------------------- +;;----------------------------------------------- +;; Top Level functions :: +;;----------------------------------------------- -;;; User interface +;; User interface (defun add-completions-from-file (file) "Parse possible completions from a file and add them to data base." (interactive "fFile: ") @@ -1952,7 +1959,7 @@ start-num))) )) -;;; Find file hook +;; Find file hook (defun cmpl-find-file-hook () (cond (enable-completion (cond ((and (memq major-mode '(emacs-lisp-mode lisp-mode)) @@ -1968,9 +1975,9 @@ (add-hook 'find-file-hooks 'cmpl-find-file-hook) -;;;----------------------------------------------- -;;; Tags Table Completions -;;;----------------------------------------------- +;;----------------------------------------------- +;; Tags Table Completions +;;----------------------------------------------- (defun add-completions-from-tags-table () ;; Inspired by eero@media-lab.media.mit.edu @@ -1992,31 +1999,31 @@ )))) -;;;----------------------------------------------- -;;; Lisp File completion parsing -;;;----------------------------------------------- -;;; This merely looks for phrases beginning with (def.... or -;;; (package:def ... and takes the next word. -;;; -;;; We tried using forward-lines and explicit searches but the regexp technique -;;; was faster. (About 100K characters per second) -;;; +;;----------------------------------------------- +;; Lisp File completion parsing +;;----------------------------------------------- +;; This merely looks for phrases beginning with (def.... or +;; (package:def ... and takes the next word. +;; +;; We tried using forward-lines and explicit searches but the regexp technique +;; was faster. (About 100K characters per second) +;; (defconst *lisp-def-regexp* "\n(\\(\\w*:\\)?def\\(\\w\\|\\s_\\)*\\s +(*" "A regexp that searches for lisp definition form." ) -;;; Tests - -;;; (and (string-match *lisp-def-regexp* "\n(defun foo") (match-end 0)) -> 8 -;;; (and (string-match *lisp-def-regexp* "\n(si:def foo") (match-end 0)) -> 9 -;;; (and (string-match *lisp-def-regexp* "\n(def-bar foo")(match-end 0)) -> 10 -;;; (and (string-match *lisp-def-regexp* "\n(defun (foo") (match-end 0)) -> 9 +;; Tests - +;; (and (string-match *lisp-def-regexp* "\n(defun foo") (match-end 0)) -> 8 +;; (and (string-match *lisp-def-regexp* "\n(si:def foo") (match-end 0)) -> 9 +;; (and (string-match *lisp-def-regexp* "\n(def-bar foo")(match-end 0)) -> 10 +;; (and (string-match *lisp-def-regexp* "\n(defun (foo") (match-end 0)) -> 9 -;;; Parses all the definition names from a Lisp mode buffer and adds them to -;;; the completion database. +;; Parses all the definition names from a Lisp mode buffer and adds them to +;; the completion database. (defun add-completions-from-lisp-buffer () - ;;; Benchmarks - ;;; Sun-3/280 - 1500 to 3000 lines of lisp code per second + ;; Benchmarks + ;; Sun-3/280 - 1500 to 3000 lines of lisp code per second (let (string) (save-excursion (goto-char (point-min)) @@ -2030,24 +2037,25 @@ )))) -;;;----------------------------------------------- -;;; C file completion parsing -;;;----------------------------------------------- -;;; C : -;;; Looks for #define or [<storage class>] [<type>] <name>{,<name>} -;;; or structure, array or pointer defs. -;;; It gets most of the definition names. -;;; -;;; As you might suspect by now, we use some symbol table hackery -;;; -;;; Symbol separator chars (have whitespace syntax) --> , ; * = ( -;;; Opening char --> [ { -;;; Closing char --> ] } -;;; opening and closing must be skipped over -;;; Whitespace chars (have symbol syntax) -;;; Everything else has word syntax +;;----------------------------------------------- +;; C file completion parsing +;;----------------------------------------------- +;; C : +;; Looks for #define or [<storage class>] [<type>] <name>{,<name>} +;; or structure, array or pointer defs. +;; It gets most of the definition names. +;; +;; As you might suspect by now, we use some symbol table hackery +;; +;; Symbol separator chars (have whitespace syntax) --> , ; * = ( +;; Opening char --> [ { +;; Closing char --> ] } +;; opening and closing must be skipped over +;; Whitespace chars (have symbol syntax) +;; Everything else has word syntax (defun cmpl-make-c-def-completion-syntax-table () + ;; XEmacs change (let ((table (make-vector 256 0)) (whitespace-chars '(? ?\n ?\t ?\f ?\v ?\r)) ;; unfortunately the ?( causes the parens to appear unbalanced @@ -2071,7 +2079,7 @@ (defconst cmpl-c-def-syntax-table (cmpl-make-c-def-completion-syntax-table)) -;;; Regexps +;; Regexps (defconst *c-def-regexp* ;; This stops on lines with possible definitions "\n[_a-zA-Z#]" @@ -2096,21 +2104,21 @@ ; (and (eq 0 (string-match regexp string)) (match-end 0)) ; ) -;;; Tests - -;;; (test-c-def-regexp *c-def-regexp* "\n#define foo") -> 10 (9) -;;; (test-c-def-regexp *c-def-regexp* "\nfoo (x, y) {") -> 6 (6) -;;; (test-c-def-regexp *c-def-regexp* "\nint foo (x, y)") -> 10 (5) -;;; (test-c-def-regexp *c-def-regexp* "\n int foo (x, y)") -> nil -;;; (test-c-def-regexp *c-cont-regexp* "oo, bar") -> 4 -;;; (test-c-def-regexp *c-cont-regexp* "oo, *bar") -> 5 -;;; (test-c-def-regexp *c-cont-regexp* "a [5][6], bar") -> 10 -;;; (test-c-def-regexp *c-cont-regexp* "oo(x,y)") -> nil -;;; (test-c-def-regexp *c-cont-regexp* "a [6] ,\t bar") -> 9 -;;; (test-c-def-regexp *c-cont-regexp* "oo {trout =1} my_carp;") -> 14 -;;; (test-c-def-regexp *c-cont-regexp* "truct_p complex foon") -> nil +;; Tests - +;; (test-c-def-regexp *c-def-regexp* "\n#define foo") -> 10 (9) +;; (test-c-def-regexp *c-def-regexp* "\nfoo (x, y) {") -> 6 (6) +;; (test-c-def-regexp *c-def-regexp* "\nint foo (x, y)") -> 10 (5) +;; (test-c-def-regexp *c-def-regexp* "\n int foo (x, y)") -> nil +;; (test-c-def-regexp *c-cont-regexp* "oo, bar") -> 4 +;; (test-c-def-regexp *c-cont-regexp* "oo, *bar") -> 5 +;; (test-c-def-regexp *c-cont-regexp* "a [5][6], bar") -> 10 +;; (test-c-def-regexp *c-cont-regexp* "oo(x,y)") -> nil +;; (test-c-def-regexp *c-cont-regexp* "a [6] ,\t bar") -> 9 +;; (test-c-def-regexp *c-cont-regexp* "oo {trout =1} my_carp;") -> 14 +;; (test-c-def-regexp *c-cont-regexp* "truct_p complex foon") -> nil -;;; Parses all the definition names from a C mode buffer and adds them to the -;;; completion database. +;; Parses all the definition names from a C mode buffer and adds them to the +;; completion database. (defun add-completions-from-c-buffer () ;; Benchmark -- ;; Sun 3/280-- 1250 lines/sec. @@ -2207,11 +2215,11 @@ ))))) -;;;--------------------------------------------------------------------------- -;;; Init files -;;;--------------------------------------------------------------------------- +;;--------------------------------------------------------------------------- +;; Init files +;;--------------------------------------------------------------------------- -;;; The version of save-completions-to-file called at kill-emacs time. +;; The version of save-completions-to-file called at kill-emacs time. (defun kill-emacs-save-completions () (if (and save-completions-flag enable-completion cmpl-initialized-p) (cond @@ -2227,12 +2235,12 @@ (defconst saved-cmpl-file-header ";;; Completion Initialization file. -;;; Version = %s -;;; Format is (<string> . <last-use-time>) -;;; <string> is the completion -;;; <last-use-time> is the time the completion was last used -;;; If it is t, the completion will never be pruned from the file. -;;; Otherwise it is in hours since origin. +;; Version = %s +;; Format is (<string> . <last-use-time>) +;; <string> is the completion +;; <last-use-time> is the time the completion was last used +;; If it is t, the completion will never be pruned from the file. +;; Otherwise it is in hours since origin. \n") (defun completion-backup-filename (filename) @@ -2335,14 +2343,14 @@ (record-save-completions total-in-db total-perm total-saved)) )))) -;;;(defun autosave-completions () -;;; (if (and save-completions-flag enable-completion cmpl-initialized-p -;;; *completion-auto-save-period* -;;; (> cmpl-emacs-idle-time *completion-auto-save-period*) -;;; cmpl-completions-accepted-p) -;;; (save-completions-to-file))) +;;(defun autosave-completions () +;; (if (and save-completions-flag enable-completion cmpl-initialized-p +;; *completion-auto-save-period* +;; (> cmpl-emacs-idle-time *completion-auto-save-period*) +;; cmpl-completions-accepted-p) +;; (save-completions-to-file))) -;;;(add-hook 'cmpl-emacs-idle-time-hooks 'autosave-completions) +;;(add-hook 'cmpl-emacs-idle-time-hooks 'autosave-completions) (defun load-completions-from-file (&optional filename no-message-p) "Loads a completion init file FILENAME. @@ -2461,9 +2469,9 @@ ) -;;;----------------------------------------------- -;;; Kill EMACS patch -;;;----------------------------------------------- +;;----------------------------------------------- +;; Kill EMACS patch +;;----------------------------------------------- (add-hook 'kill-emacs-hook '(lambda () @@ -2471,9 +2479,9 @@ (cmpl-statistics-block (record-cmpl-kill-emacs)))) -;;;----------------------------------------------- -;;; Kill region patch -;;;----------------------------------------------- +;;----------------------------------------------- +;; Kill region patch +;;----------------------------------------------- (defun completion-kill-region (&optional beg end) "Kill between point and mark. @@ -2501,18 +2509,18 @@ (global-set-key "\C-w" 'completion-kill-region) -;;;----------------------------------------------- -;;; Patches to self-insert-command. -;;;----------------------------------------------- +;;----------------------------------------------- +;; Patches to self-insert-command. +;;----------------------------------------------- -;;; Need 2 versions: generic separator chars. and space (to get auto fill -;;; to work) +;; Need 2 versions: generic separator chars. and space (to get auto fill +;; to work) -;;; All common separators (eg. space "(" ")" """) characters go through a -;;; function to add new words to the list of words to complete from: -;;; COMPLETION-SEPARATOR-SELF-INSERT-COMMAND (arg). -;;; If the character before this was an alpha-numeric then this adds the -;;; symbol before point to the completion list (using ADD-COMPLETION). +;; All common separators (eg. space "(" ")" """) characters go through a +;; function to add new words to the list of words to complete from: +;; COMPLETION-SEPARATOR-SELF-INSERT-COMMAND (arg). +;; If the character before this was an alpha-numeric then this adds the +;; symbol before point to the completion list (using ADD-COMPLETION). (defun completion-separator-self-insert-command (arg) (interactive "p") @@ -2528,12 +2536,12 @@ (funcall auto-fill-function)) ) -;;;----------------------------------------------- -;;; Wrapping Macro -;;;----------------------------------------------- +;;----------------------------------------------- +;; Wrapping Macro +;;----------------------------------------------- -;;; Note that because of the way byte compiling works, none of -;;; the functions defined with this macro get byte compiled. +;; Note that because of the way byte compiling works, none of +;; the functions defined with this macro get byte compiled. (defmacro def-completion-wrapper (function-name type &optional new-name) "Add a call to update the completion database before function execution. @@ -2582,18 +2590,18 @@ (add-hook 'pre-command-hook 'completion-before-command) -;;;--------------------------------------------------------------------------- -;;; Patches to standard keymaps insert completions -;;;--------------------------------------------------------------------------- +;;--------------------------------------------------------------------------- +;; Patches to standard keymaps insert completions +;;--------------------------------------------------------------------------- -;;;----------------------------------------------- -;;; Separators -;;;----------------------------------------------- -;;; We've used the completion syntax table given as a guide. -;;; -;;; Global separator chars. -;;; We left out <tab> because there are too many special cases for it. Also, -;;; in normal coding it's rarely typed after a word. +;;----------------------------------------------- +;; Separators +;;----------------------------------------------- +;; We've used the completion syntax table given as a guide. +;; +;; Global separator chars. +;; We left out <tab> because there are too many special cases for it. Also, +;; in normal coding it's rarely typed after a word. (global-set-key " " 'completion-separator-self-insert-autofilling) (global-set-key "!" 'completion-separator-self-insert-command) (global-set-key "%" 'completion-separator-self-insert-command) @@ -2615,14 +2623,14 @@ (global-set-key "," 'completion-separator-self-insert-command) (global-set-key "?" 'completion-separator-self-insert-command) -;;; We include period and colon even though they are symbol chars because : -;;; - in text we want to pick up the last word in a sentence. -;;; - in C pointer refs. we want to pick up the first symbol -;;; - it won't make a difference for lisp mode (package names are short) +;; We include period and colon even though they are symbol chars because : +;; - in text we want to pick up the last word in a sentence. +;; - in C pointer refs. we want to pick up the first symbol +;; - it won't make a difference for lisp mode (package names are short) (global-set-key "." 'completion-separator-self-insert-command) (global-set-key ":" 'completion-separator-self-insert-command) -;;; Lisp Mode diffs +;; Lisp Mode diffs (define-key lisp-mode-map "!" 'self-insert-command) (define-key lisp-mode-map "&" 'self-insert-command) (define-key lisp-mode-map "%" 'self-insert-command) @@ -2630,7 +2638,11 @@ (define-key lisp-mode-map "=" 'self-insert-command) (define-key lisp-mode-map "^" 'self-insert-command) -;;; C mode diffs. +;; Avoid warnings. +(defvar c-mode-map) +(defvar fortran-mode-map) + +;; C mode diffs. (defun completion-c-mode-hook () (def-completion-wrapper electric-c-semi :separator) (define-key c-mode-map "+" 'completion-separator-self-insert-command) @@ -2641,7 +2653,7 @@ (completion-c-mode-hook) (add-hook 'c-mode-hook 'completion-c-mode-hook)) -;;; FORTRAN mode diffs. (these are defined when fortran is called) +;; FORTRAN mode diffs. (these are defined when fortran is called) (defun completion-setup-fortran-mode () (define-key fortran-mode-map "+" 'completion-separator-self-insert-command) (define-key fortran-mode-map "-" 'completion-separator-self-insert-command) @@ -2649,9 +2661,9 @@ (define-key fortran-mode-map "/" 'completion-separator-self-insert-command) ) -;;;----------------------------------------------- -;;; End of line chars. -;;;----------------------------------------------- +;;----------------------------------------------- +;; End of line chars. +;;----------------------------------------------- (def-completion-wrapper newline :separator) (def-completion-wrapper newline-and-indent :separator) (def-completion-wrapper comint-send-input :separator) @@ -2660,9 +2672,9 @@ (def-completion-wrapper eval-last-sexp :separator) ;;(def-completion-wrapper minibuffer-complete-and-exit :minibuffer) -;;;----------------------------------------------- -;;; Cursor movement -;;;----------------------------------------------- +;;----------------------------------------------- +;; Cursor movement +;;----------------------------------------------- (def-completion-wrapper next-line :under-or-before) (def-completion-wrapper previous-line :under-or-before) @@ -2680,13 +2692,15 @@ (def-completion-wrapper delete-backward-char :backward) (def-completion-wrapper delete-backward-char-untabify :backward) -;;; Tests -- -;;; foobarbiz -;;; foobar -;;; fooquux -;;; fooper +;; Tests -- +;; foobarbiz +;; foobar +;; fooquux +;; fooper (cmpl-statistics-block (record-completion-file-loaded)) +(provide 'completion) + ;;; completion.el ends here
--- a/lisp/packages/dabbrev.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/dabbrev.el Mon Aug 13 08:46:35 2007 +0200 @@ -7,21 +7,24 @@ ;; Lindberg's last update version: 5.7 ;; Keywords: abbrev expand completion -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by +;; This file is part of XEmacs. + +;; XEmacs 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 of the License, or ;; (at your option) any later version. ;; -;; This program 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. +;; XEmacs 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 this program; if not, write to the Free Software -;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +;; along with XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 59 Temple Place - Suite 330, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary: @@ -43,7 +46,7 @@ ;; ;; Set the variables you want special for your mode like this: ;; (set (make-local-variable 'dabbrev-case-replace) nil) -;; Then you don't interfer with other modes. +;; Then you don't interfere with other modes. ;; ;; If your mode handles buffers that refers to other buffers ;; (i.e. compilation-mode, gud-mode), then try to set @@ -92,11 +95,9 @@ ;;; Code: -;;;---------------------------------------------------------------- -;;;---------------------------------------------------------------- -;;; Customization variables -;;;---------------------------------------------------------------- -;;;---------------------------------------------------------------- +;;---------------------------------------------------------------- +;; Customization variables +;;---------------------------------------------------------------- (defvar dabbrev-backward-only nil "*If non-nil, `dabbrev-expand' only looks backwards.") @@ -108,7 +109,7 @@ Example: Set this to \"\\\\$\" for programming languages in which variable names may appear with or without a leading `$'. -(For example, in Makefiles.) +\(For example, in Makefiles.) Set this to nil if no characters should be skipped.") @@ -218,11 +219,9 @@ It will not even look in the current buffer if it is not a member of this list.") -;;;---------------------------------------------------------------- -;;;---------------------------------------------------------------- -;;; Internal variables -;;;---------------------------------------------------------------- -;;;---------------------------------------------------------------- +;;---------------------------------------------------------------- +;; Internal variables +;;---------------------------------------------------------------- ;; Last obarray of completions in `dabbrev-completion' (defvar dabbrev--last-obarray nil) @@ -257,17 +256,19 @@ ;; The buffer we last did a completion in. (defvar dabbrev--last-completion-buffer nil) +;; Non-nil means we should upcase +;; when copying successive words. +(defvar dabbrev--last-case-pattern nil) + ;; Same as dabbrev-check-other-buffers, but is set for every expand. (defvar dabbrev--check-other-buffers dabbrev-check-other-buffers) ;; The regexp for recognizing a character in an abbreviation. (defvar dabbrev--abbrev-char-regexp nil) -;;;---------------------------------------------------------------- -;;;---------------------------------------------------------------- -;;; Macros -;;;---------------------------------------------------------------- -;;;---------------------------------------------------------------- +;;---------------------------------------------------------------- +;; Macros +;;---------------------------------------------------------------- ;;; Get the buffer that mini-buffer was activated from (defsubst dabbrev--minibuffer-origin () @@ -297,11 +298,9 @@ (goto-char point) (dabbrev--substitute-expansion nil init (extent-string extent)))) -;;;---------------------------------------------------------------- -;;;---------------------------------------------------------------- -;;; Exported functions -;;;---------------------------------------------------------------- -;;;---------------------------------------------------------------- +;;---------------------------------------------------------------- +;; Exported functions +;;---------------------------------------------------------------- ;; XEmacs changes: ;;;###autoload @@ -358,7 +357,8 @@ (setq dabbrev--last-abbreviation abbrev) ;; Find all expansion (let ((completion-list - (dabbrev--find-all-expansions abbrev ignore-case-p))) + (dabbrev--find-all-expansions abbrev ignore-case-p)) + (completion-ignore-case ignore-case-p)) ;; Make an obarray with all expansions (setq my-obarray (make-vector (length completion-list) 0)) (or (> (length my-obarray) 0) @@ -413,8 +413,9 @@ (current-window-configuration)))) (with-output-to-temp-buffer " *Completions*" (display-completion-list (all-completions init my-obarray) + :activate-callback 'dabbrev--extent-clicked-on - arg))) + :user-data arg))) (message "Making completion list...done"))) (and (window-minibuffer-p (selected-window)) (message nil)))) @@ -441,7 +442,8 @@ See also `dabbrev-abbrev-char-regexp' and \\[dabbrev-completion]." (interactive "*P") - (let (abbrev expansion old direction (orig-point (point))) + (let (abbrev record-case-pattern + expansion old direction (orig-point (point))) ;; abbrev -- the abbrev to expand ;; expansion -- the expansion found (eventually) or nil until then ;; old -- the text currently in the buffer @@ -486,6 +488,8 @@ (setq expansion (buffer-substring dabbrev--last-expansion-location (point))) + (if dabbrev--last-case-pattern + (setq expansion (upcase expansion))) ;; Record the end of this expansion, in case we repeat this. (setq dabbrev--last-expansion-location (point))) @@ -499,6 +503,7 @@ (if dabbrev-backward-only 1 0) (prefix-numeric-value arg))) (setq abbrev (dabbrev--abbrev-at-point)) + (setq record-case-pattern t) (setq old nil))) ;;-------------------------------- @@ -538,16 +543,23 @@ ;; Success: stick it in and return. (setq buffer-undo-list (cons orig-point buffer-undo-list)) (dabbrev--substitute-expansion old abbrev expansion) + +;; If we are not copying successive words now, +;; set dabbrev--last-case-pattern. + (and record-case-pattern + (setq dabbrev--last-case-pattern + (and (eval dabbrev-case-fold-search) + (not dabbrev-upcase-means-case-search) + (equal abbrev (upcase abbrev))))) + ;; Save state for re-expand. (setq dabbrev--last-expansion expansion) (setq dabbrev--last-abbreviation abbrev) (setq dabbrev--last-abbrev-location (point-marker)))))) -;;;---------------------------------------------------------------- -;;;---------------------------------------------------------------- -;;; Local functions -;;;---------------------------------------------------------------- -;;;---------------------------------------------------------------- +;;---------------------------------------------------------------- +;; Local functions +;;---------------------------------------------------------------- ;;; Checks if OTHER-BUFFER has the same major mode as current buffer. (defun dabbrev--same-major-mode-p (other-buffer) @@ -779,6 +791,19 @@ (and nil use-case-replace (setq old (concat abbrev (or old ""))) (setq expansion (concat abbrev expansion))) + ;; If the given abbrev is mixed case and its case pattern + ;; matches the start of the expansion, + ;; copy the expansion's case + ;; instead of downcasing all the rest. + (if (and (string= abbrev + (substring expansion 0 (length abbrev))) + (not (string= abbrev (downcase abbrev))) + (not (string= abbrev (upcase abbrev)))) + (setq use-case-replace nil)) + (if (equal abbrev " ") + (setq use-case-replace nil)) + (if use-case-replace + (setq expansion (downcase expansion))) (if old (save-excursion (search-backward old)) @@ -797,7 +822,7 @@ ;;; ABBREV is string to find as prefix of word. Second arg, REVERSE, ;;; is t for reverse search, nil for forward. Variable dabbrev-limit -;;; controls the maximum search region size. Third argment IGNORE-CASE +;;; controls the maximum search region size. Third argument IGNORE-CASE ;;; non-nil means treat case as insignificant while looking for a match ;;; and when comparing with previous matches. Also if that's non-nil ;;; and the match is found at the beginning of a sentence and is in @@ -860,11 +885,11 @@ (setq dabbrev--last-table (cons found-string dabbrev--last-table)) (if (and ignore-case (eval dabbrev-case-replace)) + ;; XEmacs: FSF has just `result', which makes absolutely + ;; no sense in this context (downcase result) result))))))) (provide 'dabbrev) ;; dabbrev.el ends here - -
--- a/lisp/packages/desktop.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/desktop.el Mon Aug 13 08:46:35 2007 +0200 @@ -22,9 +22,10 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary: @@ -88,6 +89,7 @@ ;; f89-kam@nada.kth.se (Klas Mellbourn) for a mh-e tip. ;; kifer@sbkifer.cs.sunysb.edu (M. Kifer) for a bug hunt. ;; treese@lcs.mit.edu (Win Treese) for ange-ftp tips. +;; pot@cnuce.cnr.it (Francesco Potorti`) for misc. tips. ;; --------------------------------------------------------------------------- ;; TODO: ;; @@ -148,7 +150,7 @@ (make-variable-buffer-local 'desktop-locals-to-save) ;; We skip .log files because they are normally temporary. -;; (ftp) files because they require passwords and whatsnot. +;; (ftp) files because they require passwords and whatnot. ;; TAGS files to save time (tags-file-name is saved instead). (defvar desktop-buffers-not-to-save "\\(^nn\\.a[0-9]+\\|\\.log\\|(ftp)\\|^tags\\|^TAGS\\)$" @@ -159,6 +161,19 @@ "^/[^/:]*:" "Regexp identifying files whose buffers are to be excluded from saving.") +(defvar desktop-buffer-major-mode nil + "When desktop creates a buffer, this holds the desired Major mode.") + +(defvar desktop-buffer-file-name nil + "When desktop creates a buffer, this holds the file name to visit.") + +(defvar desktop-buffer-name nil + "When desktop creates a buffer, this holds the desired buffer name.") + +(defvar desktop-buffer-misc nil + "When desktop creates a buffer, this holds a list of misc info. +It is used by the `desktop-buffer-handlers' functions.") + (defvar desktop-buffer-handlers '(desktop-buffer-dired desktop-buffer-rmail @@ -166,11 +181,11 @@ desktop-buffer-info desktop-buffer-file) "*List of functions to call in order to create a buffer. -The functions are called without explicit parameters but may access -the the major mode as `mam', the file name as `fn', the buffer name as -`bn', the default directory as `dd'. If some function returns non-nil -no further functions are called. If the function returns t then the -buffer is considered created.") +The functions are called without explicit parameters but can use the +variables `desktop-buffer-major-mode', `desktop-buffer-file-name', +`desktop-buffer-name'. +If one function returns non-nil, no further functions are called. +If the function returns t then the buffer is considered created.") (defvar desktop-create-buffer-form "(desktop-create-buffer 205" "Opening of form for creation of new buffers.") @@ -222,6 +237,17 @@ nil (signal (car err) (cdr err))))))) ;; ---------------------------------------------------------------------------- +(defun desktop-list* (&rest args) + (if (null (cdr args)) + (car args) + (setq args (nreverse args)) + (let ((value (cons (nth 1 args) (car args)))) + (setq args (cdr (cdr args))) + (while args + (setq value (cons (car args) value)) + (setq args (cdr args))) + value))) + (defun desktop-internal-v2s (val) "Convert VALUE to a pair (QUOTE . TXT); (eval (read TXT)) gives VALUE. TXT is a string that when read and evaluated yields value. @@ -259,6 +285,7 @@ ((consp val) (let ((p val) newlist + use-list* anynil) (while (consp p) (let ((q.txt (desktop-internal-v2s (car p)))) @@ -268,22 +295,15 @@ (if p (let ((last (desktop-internal-v2s p)) (el (car newlist))) - (setcar newlist - (if (or anynil (setq anynil (null (car last)))) - (cons nil - (concat "(cons " - (if (eq (car el) 'must) "'" "") - (cdr el) - " " - (if (eq (car last) 'must) "'" "") - (cdr last) - ")")) - (cons 'must - (concat (cdr el) " . " (cdr last))))))) + (or anynil (setq anynil (null (car last)))) + (or anynil + (setq newlist (cons '(must . ".") newlist))) + (setq use-list* t) + (setq newlist (cons last newlist)))) (setq newlist (nreverse newlist)) (if anynil (cons nil - (concat "(list " + (concat (if use-list* "(desktop-list* " "(list ") (mapconcat (lambda (el) (if (eq (car el) 'must) (concat "'" (cdr el)) @@ -445,20 +465,26 @@ (delete-file filename))))) ;; ---------------------------------------------------------------------------- (defun desktop-read () - "Read the Desktop file and the files it specifies." + "Read the Desktop file and the files it specifies. +This is a no-op when Emacs is running in batch mode." (interactive) - (let ((filename)) - (if (file-exists-p (concat "./" desktop-basefilename)) - (setq desktop-dirname (expand-file-name "./")) - (if (file-exists-p (concat "~/" desktop-basefilename)) - (setq desktop-dirname (expand-file-name "~/")) - (setq desktop-dirname nil))) - (if desktop-dirname - (progn - (load (concat desktop-dirname desktop-basefilename) t t t) - (run-hooks 'desktop-delay-hook) - (message "Desktop loaded.")) - (desktop-clear)))) + (if noninteractive + nil + (let ((dirs '("./" "~/"))) + (while (and dirs + (not (file-exists-p (expand-file-name + desktop-basefilename + (car dirs))))) + (setq dirs (cdr dirs))) + (setq desktop-dirname (and dirs (expand-file-name (car dirs)))) + (if desktop-dirname + (progn + (load (expand-file-name desktop-basefilename desktop-dirname) + t t t) + (run-hooks 'desktop-delay-hook) + (setq desktop-delay-hook nil) + (message "Desktop loaded.")) + (desktop-clear))))) ;; ---------------------------------------------------------------------------- (defun desktop-load-default () "Load the `default' start-up library manually. @@ -472,52 +498,56 @@ ;; Note: the following functions use the dynamic variable binding in Lisp. ;; (defun desktop-buffer-info () "Load an info file." - (if (eq 'Info-mode mam) + (if (eq 'Info-mode desktop-buffer-major-mode) (progn (require 'info) - (Info-find-node (nth 0 misc) (nth 1 misc)) + (Info-find-node (nth 0 desktop-buffer-misc) + (nth 1 desktop-buffer-misc)) t))) ;; ---------------------------------------------------------------------------- (defun desktop-buffer-rmail () "Load an RMAIL file." - (if (eq 'rmail-mode mam) + (if (eq 'rmail-mode desktop-buffer-major-mode) (condition-case error - (progn (rmail-input fn) t) + (progn (rmail-input desktop-buffer-file-name) t) (file-locked (kill-buffer (current-buffer)) 'ignored)))) ;; ---------------------------------------------------------------------------- (defun desktop-buffer-mh () "Load a folder in the mh system." - (if (eq 'mh-folder-mode mam) + (if (eq 'mh-folder-mode desktop-buffer-major-mode) (progn (require 'mh-e) (mh-find-path) - (mh-visit-folder bn) + (mh-visit-folder desktop-buffer-name) t))) ;; ---------------------------------------------------------------------------- (defun desktop-buffer-dired () "Load a directory using dired." - (if (eq 'dired-mode mam) - (if (file-directory-p (file-name-directory (car misc))) + (if (eq 'dired-mode desktop-buffer-major-mode) + (if (file-directory-p (file-name-directory (car desktop-buffer-misc))) (progn - (dired (car misc)) - (mapcar 'dired-insert-subdir (cdr misc)) + (dired (car desktop-buffer-misc)) + (mapcar 'dired-insert-subdir (cdr desktop-buffer-misc)) t) - (message "Directory %s no longer exists." (car misc)) + (message "Directory %s no longer exists." (car desktop-buffer-misc)) (sit-for 1) 'ignored))) ;; ---------------------------------------------------------------------------- (defun desktop-buffer-file () "Load a file." - (if fn - (if (or (file-exists-p fn) + (if desktop-buffer-file-name + (if (or (file-exists-p desktop-buffer-file-name) (and desktop-missing-file-warning (y-or-n-p (format "File \"%s\" no longer exists. Re-create? " - fn)))) - (progn (find-file fn) t) + desktop-buffer-file-name)))) + (progn (find-file desktop-buffer-file-name) t) 'ignored))) ;; ---------------------------------------------------------------------------- ;; Create a buffer, load its file, set is mode, ...; called from Desktop file ;; only. -(defun desktop-create-buffer (ver fn bn mam mim pt mk ro misc &optional locals) +(defun desktop-create-buffer (ver desktop-buffer-file-name desktop-buffer-name + desktop-buffer-major-mode + mim pt mk ro desktop-buffer-misc + &optional locals) (let ((hlist desktop-buffer-handlers) (result) (handler)) @@ -527,8 +557,8 @@ (setq hlist (cdr hlist))) (if (eq result t) (progn - (if (not (equal (buffer-name) bn)) - (rename-buffer bn)) + (if (not (equal (buffer-name) desktop-buffer-name)) + (rename-buffer desktop-buffer-name)) (auto-fill-mode (if (nth 0 mim) 1 0)) (goto-char pt) (if (consp mk) @@ -553,8 +583,13 @@ )))) ;; Backward compatibility -- update parameters to 205 standards. -(defun desktop-buffer (fn bn mam mim pt mk ro tl fc cfs cr misc) - (desktop-create-buffer 205 fn bn mam (cdr mim) pt mk ro misc +(defun desktop-buffer (desktop-buffer-file-name desktop-buffer-name + desktop-buffer-major-mode + mim pt mk ro tl fc cfs cr + desktop-buffer-misc) + (desktop-create-buffer 205 desktop-buffer-file-name desktop-buffer-name + desktop-buffer-major-mode (cdr mim) pt mk ro + desktop-buffer-misc (list (cons 'truncate-lines tl) (cons 'fill-column fc) (cons 'case-fold-search cfs)
--- a/lisp/packages/diff.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/diff.el Mon Aug 13 08:46:35 2007 +0200 @@ -18,9 +18,10 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary: @@ -35,7 +36,7 @@ ;;; This is duplicated in vc.el. ;;;###autoload (defvar diff-switches (purecopy "-c") - "*A string or list of strings specifying switches to be be passed to diff.") + "*A string or list of strings specifying switches to be passed to diff.") (defvar diff-command "diff" "*The command to use to run diff.") @@ -44,7 +45,7 @@ '( ;; -u format: @@ -OLDSTART,OLDEND +NEWSTART,NEWEND @@ ("^@@ -\\([0-9]+\\),[0-9]+ \\+\\([0-9]+\\),[0-9]+ @@$" 1 2) - + ;; -c format: *** OLDSTART,OLDEND **** ("^\\*\\*\\* \\([0-9]+\\),[0-9]+ \\*\\*\\*\\*$" 1 nil) ;; --- NEWSTART,NEWEND ---- @@ -60,7 +61,7 @@ ;; -n format: {a,d,c}OLDSTART LINES-CHANGED ("^[adc]\\([0-9]+\\)\\( [0-9]+\\)?$" 1) ) - "Alist (REGEXP OLD-IDX NEW-IDX) of regular expressions to match difference + "Alist (REGEXP OLD-IDX NEW-IDX) of regular expressions to match difference sections in \\[diff] output. If REGEXP matches, the OLD-IDX'th subexpression gives the line number in the old file, and NEW-IDX'th subexpression gives the line number in the new file. If OLD-IDX or NEW-IDX @@ -121,7 +122,7 @@ (match-end subexpr))))) (save-excursion (save-match-data - (set-buffer (find-file-noselect file))) + (set-buffer (find-file-noselect file))) (save-excursion (goto-line line) (point-marker))))) @@ -232,6 +233,18 @@ "No more differences" "Diff" 'diff-parse-differences)) (pop-to-buffer buf) + ;; Avoid frightening people with "abnormally terminated" + ;; if diff finds differences. + (set (make-local-variable 'compilation-exit-message-function) + (lambda (status code msg) + (cond ((not (eq status 'exit)) + (cons msg code)) + ((zerop code) + '("finished (no differences)\n" . "no differences")) + ((= code 1) + '("finished\n" . "differences found")) + (t + (cons msg code))))) (set (make-local-variable 'diff-old-file) old) (set (make-local-variable 'diff-new-file) new) (set (make-local-variable 'diff-old-temp-file) old-alt)
--- a/lisp/packages/edit-faces.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/edit-faces.el Mon Aug 13 08:46:35 2007 +0200 @@ -57,11 +57,12 @@ ;; auto-show-mode is too confusing in this mode (setq auto-show-mode nil) (setq mode-popup-menu edit-faces-menu) - (if current-menubar - (progn - (set (make-local-variable 'current-menubar) - (copy-sequence current-menubar)) - (add-submenu nil edit-faces-menu)))) + (if (featurep 'menubar) + (if current-menubar + (progn + (set (make-local-variable 'current-menubar) + (copy-sequence current-menubar)) + (add-submenu nil edit-faces-menu))))) (let ((map edit-faces-mode-map)) (define-key map "<" 'ef-smaller)
--- a/lisp/packages/emacsbug.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/emacsbug.el Mon Aug 13 08:46:35 2007 +0200 @@ -21,9 +21,10 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary: @@ -38,54 +39,115 @@ (require 'sendmail) -(defvar bug-gnu-emacs "xemacs@cs.uiuc.edu" - "Address of site maintaining mailing list for GNU Emacs bugs.") +;; XEmacs: Screen for whether a beta version is running and redirect +;; reports to the beta list instead of the newsgroup. I don't think +;; there's an XEmacs equivalent to system-configuration-options, but +;; there should be. -sb +(defvar report-emacs-bug-pretest-address "xemacs-beta@xemacs.org" + "Address of mailing list for XEmacs beta bugs.") + +(defvar bug-gnu-emacs "xemacs@xemacs.org" + "Address of site maintaining mailing list for XEmacs bugs.") (defvar report-emacs-bug-orig-text nil "The automatically-created initial text of bug report.") ;;;###autoload -(defun report-emacs-bug (topic) - "Report a bug in GNU Emacs. +(defun report-xemacs-bug (topic) + "Report a bug in XEmacs. Prompts for bug subject. Leaves you in a mail buffer." (interactive "sBug Subject: ") - (mail nil bug-gnu-emacs topic) - (goto-char (point-min)) - (re-search-forward (concat "^" (regexp-quote mail-header-separator) "\n")) - (insert "In " (emacs-version) "\n") - (if (and system-configuration-options - (not (equal system-configuration-options ""))) - (insert "configured using `configure " - system-configuration-options "'\n")) - (insert "\n") - ;; This is so the user has to type something - ;; in order to send easily. - (use-local-map (nconc (make-sparse-keymap) (current-local-map))) - (define-key (current-local-map) "\C-c\C-i" 'report-emacs-bug-info) - (with-output-to-temp-buffer "*Bug Help*" - (princ (substitute-command-keys - "Type \\[mail-send-and-exit] to send the bug report.\n")) - (terpri) - (princ (substitute-command-keys - "Type \\[report-emacs-bug-info] to visit in Info the Emacs Manual section + (if (mail nil + (if (string-match "\(beta[0-9]+\)" emacs-version) + ;; If there are four numbers in emacs-version, + ;; this is a pretest version. + report-emacs-bug-pretest-address + bug-gnu-emacs) + topic) + (let (user-point) + ;; The rest of this does not execute + ;; if the user was asked to confirm and said no. + (goto-char (point-min)) + (re-search-forward (concat "^" (regexp-quote mail-header-separator) "\n")) + (insert "In " (emacs-version) "\n") + (if (and (boundp 'system-configuration-options) + system-configuration-options + (not (equal system-configuration-options ""))) + (insert "configured using `configure " + system-configuration-options "'\n")) + (insert "\n") + (insert "Please describe exactly what actions triggered the bug\n" + "and the precise symptoms of the bug:\n\n") + (setq user-point (point)) + (insert "\n\n\n" + "Recent input:\n") + (let ((before-keys (point))) + ;; XEmacs: + (insert (key-description (recent-keys))) +; (insert (mapconcat (lambda (key) +; (if (or (integerp key) +; (symbolp key) +; (listp key)) +; (single-key-description key) +; (prin1-to-string key nil))) +; (recent-keys) +; " ")) + (save-restriction + (narrow-to-region before-keys (point)) + (goto-char before-keys) + (while (progn (move-to-column 50) (not (eobp))) + (search-forward " " nil t) + (insert "\n")))) + (let ((message-buf (get-buffer " *Message-Log*"))) + (if message-buf + (progn + (insert "\n\nRecent messages:\n") + (insert-buffer-substring message-buf + (save-excursion + (set-buffer message-buf) + (goto-char (point-max)) + (forward-line -10) + (point)) + (save-excursion + (set-buffer message-buf) + (point-max)))))) + ;; This is so the user has to type something + ;; in order to send easily. + ;; XEmacs: FSF non-abstraction of data? + ;; (use-local-map (nconc (make-sparse-keymap) (current-local-map))) + (use-local-map (current-local-map)) + (define-key (current-local-map) "\C-c\C-i" 'report-emacs-bug-info) + (with-output-to-temp-buffer "*Bug Help*" + (princ (substitute-command-keys + "Type \\[mail-send-and-exit] to send the bug report.\n")) + (princ (substitute-command-keys + "Type \\[kill-buffer] RET to cancel (don't send it).\n")) + (terpri) + (princ (substitute-command-keys + "Type \\[report-emacs-bug-info] to visit in Info the Emacs Manual section about when and how to write a bug report, and what information to supply so that the bug can be fixed. Type SPC to scroll through this section and its subsections."))) - ;; Make it less likely people will send empty messages. - (make-local-variable 'mail-send-hook) - (add-hook 'mail-send-hook 'report-emacs-bug-hook) - (save-excursion - (goto-char (point-max)) - (skip-chars-backward " \t\n") - (make-local-variable 'report-emacs-bug-orig-text) - (setq report-emacs-bug-orig-text (buffer-substring (point-min) (point))))) + ;; Make it less likely people will send empty messages. + (make-local-variable 'mail-send-hook) + (add-hook 'mail-send-hook 'report-emacs-bug-hook) + (save-excursion + (goto-char (point-max)) + (skip-chars-backward " \t\n") + (make-local-variable 'report-emacs-bug-orig-text) + (setq report-emacs-bug-orig-text + (buffer-substring (point-min) (point)))) + (goto-char user-point)))) + +;; ;;;###autoload +;; (defalias 'report-emacs-bug 'report-xemacs-bug) (defun report-emacs-bug-info () "Go to the Info node on reporting Emacs bugs." (interactive) (info) (Info-directory) - (Info-menu "emacs") + (Info-menu "xemacs") (Info-goto-node "Bugs")) (defun report-emacs-bug-hook ()
--- a/lisp/packages/etags.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/etags.el Mon Aug 13 08:46:35 2007 +0200 @@ -796,7 +796,7 @@ 'find-tag-history)) (if (string-equal tag-name "") ;; #### - This is a really LAME way of doing it! --Stig - (list default) ;indicate exact symbol match + default ;indicate exact symbol match tag-name))) (defvar last-tag-data nil
--- a/lisp/packages/fast-lock.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/fast-lock.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,10 +1,10 @@ ;;; fast-lock.el --- Automagic text properties caching for fast Font Lock mode. -;; Copyright (C) 1994, 1995 Free Software Foundation, Inc. +;; Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc. ;; Author: Simon Marshall <simon@gnu.ai.mit.edu> ;; Keywords: faces files -;; Version: 3.08 +;; Version: 3.10.01 ;; This file is part of XEmacs. ;; @@ -19,10 +19,11 @@ ;; GNU General Public License for more details. ;; ;; You should have received a copy of the GNU General Public License -;; along with XEmacs; if not, write to the Free Software -;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +;; along with XEmacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary: @@ -38,7 +39,7 @@ ;; ;; Put in your ~/.emacs: ;; -;; (add-hook 'font-lock-mode-hook 'turn-on-fast-lock) +;; (setq font-lock-support-mode 'fast-lock-mode) ;; ;; Start up a new Emacs and use font-lock as usual (except that you can use the ;; so-called "gaudier" fontification regexps on big files without frustration). @@ -65,105 +66,141 @@ ;; History: ;; ;; 0.02--1.00: -;; - Changed name from turbo-prop to fast-lock. Automagic for font-lock only. -;; - Made `fast-lock-mode' a minor mode, like G. Dinesh Dutt's fss-mode. +;; - Changed name from turbo-prop to fast-lock. Automagic for font-lock only +;; - Made `fast-lock-mode' a minor mode, like G. Dinesh Dutt's fss-mode ;; 1.00--1.01: -;; - Turn on `fast-lock-mode' only if `buffer-file-name' or `interactive-p'. -;; - Made `fast-lock-file-name' use `buffer-name' if `buffer-file-name' is nil. -;; - Moved save-all conditions to `fast-lock-save-cache'. -;; - Added `fast-lock-save-text-properties' to `kill-buffer-hook'. -;; 1.01--2.00: complete rewrite---not worth the space to document. -;; - Changed structure of text properties cache and threw out file mod checks. +;; - Turn on `fast-lock-mode' only if `buffer-file-name' or `interactive-p' +;; - Made `fast-lock-file-name' use `buffer-name' if `buffer-file-name' is nil +;; - Moved save-all conditions to `fast-lock-save-cache' +;; - Added `fast-lock-save-text-properties' to `kill-buffer-hook' +;; 1.01--2.00: complete rewrite---not worth the space to document +;; - Changed structure of text properties cache and threw out file mod checks ;; 2.00--2.01: ;; - Made `condition-case' forms understand `quit'. -;; - Made `fast-lock' require `font-lock'. -;; - Made `fast-lock-cache-name' chase links (from Ben Liblit). +;; - Made `fast-lock' require `font-lock' +;; - Made `fast-lock-cache-name' chase links (from Ben Liblit) ;; 2.01--3.00: -;; - Changed structure of cache to include `font-lock-keywords' (from rms). -;; - Changed `fast-lock-cache-mechanisms' to `fast-lock-cache-directories'. -;; - Removed `fast-lock-read-others'. -;; - Made `fast-lock-read-cache' ignore cache owner. -;; - Made `fast-lock-save-cache-external' create cache directory. -;; - Made `fast-lock-save-cache-external' save `font-lock-keywords'. -;; - Made `fast-lock-cache-data' check `font-lock-keywords'. -;; 3.00--3.01: incorporated port of 2.00 to Lucid, made by Barry Warsaw. -;; - Package now provides itself. -;; - Lucid: Use `font-lock-any-extents-p' for `font-lock-any-properties-p'. -;; - Lucid: Use `list-faces' for `face-list'. -;; - Lucid: Added `set-text-properties'. -;; - Lucid: Made `turn-on-fast-lock' pass 1 not t to `fast-lock-mode'. -;; - Removed test for `fast-lock-mode' from `fast-lock-read-cache'. -;; - Lucid: Added Lucid-specific `fast-lock-get-face-properties'. -;; 3.01--3.02: now works with Lucid Emacs, thanks to Barry Warsaw. -;; - Made `fast-lock-cache-name' map ":" to ";" for OS/2 (from Serganova Vera). -;; - Made `fast-lock-cache-name' use abbreviated file name (from Barry Warsaw). -;; - Lucid: Separated handlers for `error' and `quit' for `condition-case'. +;; - Changed structure of cache to include `font-lock-keywords' (from rms) +;; - Changed `fast-lock-cache-mechanisms' to `fast-lock-cache-directories' +;; - Removed `fast-lock-read-others' +;; - Made `fast-lock-read-cache' ignore cache owner +;; - Made `fast-lock-save-cache-external' create cache directory +;; - Made `fast-lock-save-cache-external' save `font-lock-keywords' +;; - Made `fast-lock-cache-data' check `font-lock-keywords' +;; 3.00--3.01: incorporated port of 2.00 to Lucid, made by Barry Warsaw +;; - Package now provides itself +;; - Lucid: Use `font-lock-any-extents-p' for `font-lock-any-properties-p' +;; - Lucid: Use `list-faces' for `face-list' +;; - Lucid: Added `set-text-properties' +;; - Lucid: Made `turn-on-fast-lock' pass 1 not t to `fast-lock-mode' +;; - Removed test for `fast-lock-mode' from `fast-lock-read-cache' +;; - Lucid: Added Lucid-specific `fast-lock-get-face-properties' +;; 3.01--3.02: now works with Lucid Emacs, thanks to Barry Warsaw +;; - Made `fast-lock-cache-name' map ":" to ";" for OS/2 (from Serganova Vera) +;; - Made `fast-lock-cache-name' use abbreviated file name (from Barry Warsaw) +;; - Lucid: Separated handlers for `error' and `quit' for `condition-case' ;; 3.02--3.03: -;; - Changed `fast-lock-save-cache-external' to `fast-lock-save-cache-data'. -;; - Lucid: Added Lucid-specific `fast-lock-set-face-properties'. +;; - Changed `fast-lock-save-cache-external' to `fast-lock-save-cache-data' +;; - Lucid: Added Lucid-specific `fast-lock-set-face-properties' ;; 3.03--3.04: -;; - Corrected `subrp' test of Lucid code. -;; - Replaced `font-lock-any-properties-p' with `text-property-not-all'. -;; - Lucid: Made `fast-lock-set-face-properties' put `text-prop' on extents. -;; - Made `fast-lock-cache-directories' a regexp alist (from Colin Rafferty). -;; - Made `fast-lock-cache-directory' to return a usable cache file directory. +;; - Corrected `subrp' test of Lucid code +;; - Replaced `font-lock-any-properties-p' with `text-property-not-all' +;; - Lucid: Made `fast-lock-set-face-properties' put `text-prop' on extents +;; - Made `fast-lock-cache-directories' a regexp alist (from Colin Rafferty) +;; - Made `fast-lock-cache-directory' to return a usable cache file directory ;; 3.04--3.05: -;; - Lucid: Fix for XEmacs 19.11 `text-property-not-all'. -;; - Replaced `subrp' test of Lucid code with `emacs-version' `string-match'. -;; - Made `byte-compile-warnings' omit `unresolved' on compilation. -;; - Made `fast-lock-save-cache-data' use a buffer (from Rick Sladkey). -;; - Reverted to old `fast-lock-get-face-properties' (from Rick Sladkey). -;; 3.05--3.06: incorporated hack of 3.03, made by Jonathan Stigelman (Stig). -;; - Reverted to 3.04 version of `fast-lock-get-face-properties'. -;; - XEmacs: Removed `list-faces' `defalias'. -;; - Made `fast-lock-mode' and `turn-on-fast-lock' succeed `autoload' cookies. -;; - Added `lazy-lock-submit-bug-report'. -;; - Renamed `fast-lock-save-size' to `fast-lock-minimum-size'. -;; - Made `fast-lock-save-cache' output a message if no save ever attempted. -;; - Made `fast-lock-save-cache-data' output a message if save attempted. -;; - Made `fast-lock-cache-data' output a message if load attempted. -;; - Made `fast-lock-save-cache-data' do `condition-case' not `unwind-protect'. -;; - Made `fast-lock-save-cache' and `fast-lock-read-cache' return nothing. -;; - Made `fast-lock-save-cache' check `buffer-modified-p' (Stig). -;; - Added `fast-lock-save-events'. -;; - Added `fast-lock-after-save-hook' to `after-save-hook' (Stig). -;; - Added `fast-lock-kill-buffer-hook' to `kill-buffer-hook'. -;; - Changed `fast-lock-save-caches' to `fast-lock-kill-emacs-hook'. -;; - Added `fast-lock-kill-emacs-hook' to `kill-emacs-hook'. -;; - Made `fast-lock-save-cache' check `verify-visited-file-modtime' (Stig). -;; - Made `visited-file-modtime' be the basis of the timestamp (Stig). -;; - Made `fast-lock-save-cache-1' and `fast-lock-cache-data' use/reformat it. -;; - Added `fast-lock-cache-filename' to keep track of the cache file name. -;; - Added `fast-lock-after-fontify-buffer'. -;; - Added `fast-lock-save-faces' list of faces to save (idea from Stig/Tibor). -;; - Made `fast-lock-get-face-properties' functions use it. -;; - XEmacs: Made `fast-lock-set-face-properties' do extents the Font Lock way. -;; - XEmacs: Removed fix for `text-property-not-all' (19.11 support dropped). -;; - Made `fast-lock-mode' ensure `font-lock-mode' is on. -;; - Made `fast-lock-save-cache' do `cdr-safe' not `cdr' (from Dave Foster). -;; - Made `fast-lock-save-cache' do `set-buffer' first (from Dave Foster). -;; - Made `fast-lock-save-cache' loop until saved or quit (from Georg Nikodym). -;; - Made `fast-lock-cache-data' check `buffer-modified-p'. -;; - Made `fast-lock-cache-data' do `font-lock-compile-keywords' if necessary. -;; - XEmacs: Made `font-lock-compile-keywords' `defalias'. +;; - Lucid: Fix for XEmacs 19.11 `text-property-not-all' +;; - Replaced `subrp' test of Lucid code with `emacs-version' `string-match' +;; - Made `byte-compile-warnings' omit `unresolved' on compilation +;; - Made `fast-lock-save-cache-data' use a buffer (from Rick Sladkey) +;; - Reverted to old `fast-lock-get-face-properties' (from Rick Sladkey) +;; 3.05--3.06: incorporated hack of 3.03, made by Jonathan Stigelman (Stig) +;; - Reverted to 3.04 version of `fast-lock-get-face-properties' +;; - XEmacs: Removed `list-faces' `defalias' +;; - Made `fast-lock-mode' and `turn-on-fast-lock' succeed `autoload' cookies +;; - Added `fast-lock-submit-bug-report' +;; - Renamed `fast-lock-save-size' to `fast-lock-minimum-size' +;; - Made `fast-lock-save-cache' output a message if no save ever attempted +;; - Made `fast-lock-save-cache-data' output a message if save attempted +;; - Made `fast-lock-cache-data' output a message if load attempted +;; - Made `fast-lock-save-cache-data' do `condition-case' not `unwind-protect' +;; - Made `fast-lock-save-cache' and `fast-lock-read-cache' return nothing +;; - Made `fast-lock-save-cache' check `buffer-modified-p' (Stig) +;; - Added `fast-lock-save-events' +;; - Added `fast-lock-after-save-hook' to `after-save-hook' (Stig) +;; - Added `fast-lock-kill-buffer-hook' to `kill-buffer-hook' +;; - Changed `fast-lock-save-caches' to `fast-lock-kill-emacs-hook' +;; - Added `fast-lock-kill-emacs-hook' to `kill-emacs-hook' +;; - Made `fast-lock-save-cache' check `verify-visited-file-modtime' (Stig) +;; - Made `visited-file-modtime' be the basis of the timestamp (Stig) +;; - Made `fast-lock-save-cache-1' and `fast-lock-cache-data' use/reformat it +;; - Added `fast-lock-cache-filename' to keep track of the cache file name +;; - Added `fast-lock-after-fontify-buffer' +;; - Added `fast-lock-save-faces' list of faces to save (idea from Stig/Tibor) +;; - Made `fast-lock-get-face-properties' functions use it +;; - XEmacs: Made `fast-lock-set-face-properties' do extents the Font Lock way +;; - XEmacs: Removed fix for `text-property-not-all' (19.11 support dropped) +;; - Made `fast-lock-mode' ensure `font-lock-mode' is on +;; - Made `fast-lock-save-cache' do `cdr-safe' not `cdr' (from Dave Foster) +;; - Made `fast-lock-save-cache' do `set-buffer' first (from Dave Foster) +;; - Made `fast-lock-save-cache' loop until saved or quit (from Georg Nikodym) +;; - Made `fast-lock-cache-data' check `buffer-modified-p' +;; - Made `fast-lock-cache-data' do `font-lock-compile-keywords' if necessary +;; - XEmacs: Made `font-lock-compile-keywords' `defalias' ;; 3.06--3.07: -;; - XEmacs: Add `fast-lock-after-fontify-buffer' to the Font Lock hook. -;; - Made `fast-lock-cache-name' explain the use of `directory-abbrev-alist'. -;; - Made `fast-lock-mode' use `buffer-file-truename' not `buffer-file-name'. +;; - XEmacs: Add `fast-lock-after-fontify-buffer' to the Font Lock hook +;; - Made `fast-lock-cache-name' explain the use of `directory-abbrev-alist' +;; - Made `fast-lock-mode' use `buffer-file-truename' not `buffer-file-name' ;; 3.07--3.08: -;; - Made `fast-lock-read-cache' set `fast-lock-cache-filename'. +;; - Made `fast-lock-read-cache' set `fast-lock-cache-filename' +;; 3.08--3.09: +;; - Made `fast-lock-save-cache' cope if `fast-lock-minimum-size' is an a list +;; - Made `fast-lock-mode' respect the value of `font-lock-inhibit-thing-lock' +;; - Added `fast-lock-after-unfontify-buffer' +;; 3.09--3.10: +;; - Rewrite for Common Lisp macros +;; - Made fast-lock.el barf on a crap 8+3 pseudo-OS (Eli Zaretskii help) +;; - XEmacs: Made `add-minor-mode' succeed `autoload' cookie +;; - XEmacs: Made `fast-lock-save-faces' default to `font-lock-face-list' +;; - Made `fast-lock-save-cache' use `font-lock-value-in-major-mode' +;; - Wrap with `save-buffer-state' (Ray Van Tassle report) +;; - Made `fast-lock-mode' wrap `font-lock-support-mode' +;; 3.10--3.11: (require 'font-lock) +;; Make sure fast-lock.el is supported. +(if (and (eq system-type 'ms-dos) (not (msdos-long-file-names))) + (error "`fast-lock' was written for long file name systems")) + (eval-when-compile - ;; Shut Emacs' byte-compiler up (cf. stop me getting mail from users). - (setq byte-compile-warnings '(free-vars callargs redefine))) + ;; + ;; We don't do this at the top-level as we only use non-autoloaded macros. + (require 'cl) + ;; + ;; I prefer lazy code---and lazy mode. + (setq byte-compile-dynamic t byte-compile-dynamic-docstrings t) + ;; But, we make sure that the code is as zippy as can be. + (setq byte-optimize t) + ;; + ;; We use this to preserve or protect things when modifying text properties. + (defmacro save-buffer-state (varlist &rest body) + "Bind variables according to VARLIST and eval BODY restoring buffer state." + (` (let* ((,@ (append varlist + '((modified (buffer-modified-p)) + (inhibit-read-only t) (buffer-undo-list t) + before-change-functions after-change-functions + deactivate-mark buffer-file-name buffer-file-truename)))) + (,@ body) + (when (and (not modified) (buffer-modified-p)) + (set-buffer-modified-p nil))))) + (put 'save-buffer-state 'lisp-indent-function 1)) (defun fast-lock-submit-bug-report () "Submit via mail a bug report on fast-lock.el." (interactive) (let ((reporter-prompt-for-summary-p t)) - (reporter-submit-bug-report "simon@gnu.ai.mit.edu" "fast-lock 3.08" + (reporter-submit-bug-report "simon@gnu.ai.mit.edu" "fast-lock 3.10.01" '(fast-lock-cache-directories fast-lock-minimum-size fast-lock-save-others fast-lock-save-events fast-lock-save-faces) nil nil @@ -172,11 +209,11 @@ I want to report a bug. I've read the `Bugs' section of `Info' on Emacs, so I know how to make a clear and unambiguous report. To reproduce the bug: -Start a fresh Emacs via `" invocation-name " -no-init-file -no-site-file'. +Start a fresh editor via `" invocation-name " -no-init-file -no-site-file'. In the `*scratch*' buffer, evaluate:")))) ;;;###autoload -(defvar fast-lock-mode nil) ; for modeline +(defvar fast-lock-mode nil) (defvar fast-lock-cache-timestamp nil) ; for saving/reading (defvar fast-lock-cache-filename nil) ; for deleting @@ -185,7 +222,7 @@ (defvar fast-lock-cache-directories '("." "~/.emacs-flc") ; - `internal', keep each file's Font Lock cache file in the same file. ; - `external', keep each file's Font Lock cache file in the same directory. - "Directories in which Font Lock cache files are saved and read. + "*Directories in which Font Lock cache files are saved and read. Each item should be either DIR or a cons pair of the form (REGEXP . DIR) where DIR is a directory name (relative or absolute) and REGEXP is a regexp. @@ -203,31 +240,31 @@ home directory hierarchy, or otherwise the absolute directory `~/.emacs-flc'.") (defvar fast-lock-minimum-size (* 25 1024) - "If non-nil, the minimum size for buffers. + "*Minimum size of a buffer for cached fontification. Only buffers more than this can have associated Font Lock cache files saved. -If nil, means size is irrelevant.") +If nil, means cache files are never created. +If a list, each element should be a cons pair of the form (MAJOR-MODE . SIZE), +where MAJOR-MODE is a symbol or t (meaning the default). For example: + ((c-mode . 25600) (c++-mode . 25600) (rmail-mode . 1048576)) +means that the minimum size is 25K for buffers in C or C++ modes, one megabyte +for buffers in Rmail mode, and size is irrelevant otherwise.") (defvar fast-lock-save-events '(kill-buffer kill-emacs) - "A list of events under which caches will be saved. + "*Events under which caches will be saved. Valid events are `save-buffer', `kill-buffer' and `kill-emacs'. If concurrent editing sessions use the same associated cache file for a file's buffer, then you should add `save-buffer' to this list.") (defvar fast-lock-save-others t - "If non-nil, save Font Lock cache files irrespective of file owner. + "*If non-nil, save Font Lock cache files irrespective of file owner. If nil, means only buffer files known to be owned by you can have associated Font Lock cache files saved. Ownership may be unknown for networked files.") (defvar fast-lock-save-faces - ;; Since XEmacs uses extents for everything, we have to pick the right ones. - ;; In XEmacs 19.13 we can't identify which text properties are Font Lock's. - (if (save-match-data (string-match "XEmacs" (emacs-version))) - '(font-lock-string-face font-lock-doc-string-face font-lock-type-face - font-lock-function-name-face font-lock-comment-face - font-lock-keyword-face font-lock-preprocessor-face) - ;; For Emacs 19.30 I don't think this is generally necessary. - nil) - "A list of faces that will be saved in a Font Lock cache file. + (when (save-match-data (string-match "XEmacs" (emacs-version))) + ;; XEmacs uses extents for everything, so we have to pick the right ones. + font-lock-face-list) + "Faces that will be saved in a Font Lock cache file. If nil, means information for all faces will be saved.") ;; User Functions: @@ -238,7 +275,7 @@ With arg, turn Fast Lock mode on if and only if arg is positive and the buffer is associated with a file. Enable it automatically in your `~/.emacs' by: - (add-hook 'font-lock-mode-hook 'turn-on-fast-lock) + (setq font-lock-support-mode 'fast-lock-mode) If Fast Lock mode is enabled, and the current buffer does not contain any text properties, any associated Font Lock cache is used if its timestamp matches the @@ -264,17 +301,17 @@ ;; but many packages temporarily wrap that to nil when doing their own thing. (set (make-local-variable 'fast-lock-mode) (and buffer-file-truename + (not (memq 'fast-lock-mode font-lock-inhibit-thing-lock)) (if arg (> (prefix-numeric-value arg) 0) (not fast-lock-mode)))) (if (and fast-lock-mode (not font-lock-mode)) - ;; Turned on `fast-lock-mode' rather than using `font-lock-mode-hook'. - (progn - (add-hook 'font-lock-mode-hook 'turn-on-fast-lock) + ;; Turned on `fast-lock-mode' rather than `font-lock-mode'. + (let ((font-lock-support-mode 'fast-lock-mode)) (font-lock-mode t)) ;; Let's get down to business. (set (make-local-variable 'fast-lock-cache-timestamp) nil) (set (make-local-variable 'fast-lock-cache-filename) nil) - (if (and fast-lock-mode (not font-lock-fontified)) - (fast-lock-read-cache)))) + (when (and fast-lock-mode (not font-lock-fontified)) + (fast-lock-read-cache)))) (defun fast-lock-read-cache () "Read the Font Lock cache for the current buffer. @@ -295,20 +332,19 @@ ;; Keep trying directories until fontification is turned off. (while (and directories (not font-lock-fontified)) (let ((directory (fast-lock-cache-directory (car directories) nil))) - (if (not directory) - nil - (setq fast-lock-cache-filename (fast-lock-cache-name directory)) - (condition-case nil - (if (file-readable-p fast-lock-cache-filename) - (load fast-lock-cache-filename t t t)) - (error nil) (quit nil))) + (condition-case nil + (when directory + (setq fast-lock-cache-filename (fast-lock-cache-name directory)) + (when (file-readable-p fast-lock-cache-filename) + (load fast-lock-cache-filename t t t))) + (error nil) (quit nil)) (setq directories (cdr directories)))) ;; Unset `fast-lock-cache-filename', and restore `font-lock-fontified', if ;; we don't use a cache. (Note that `fast-lock-cache-data' sets the value ;; of `fast-lock-cache-timestamp'.) (set-buffer-modified-p modified) - (if (not font-lock-fontified) - (setq fast-lock-cache-filename nil font-lock-fontified fontified)))) + (unless font-lock-fontified + (setq fast-lock-cache-filename nil font-lock-fontified fontified)))) (defun fast-lock-save-cache (&optional buffer) "Save the Font Lock cache of BUFFER or the current buffer. @@ -327,39 +363,41 @@ See `fast-lock-mode'." (interactive) (save-excursion - (and buffer (set-buffer buffer)) - (let ((file-timestamp (visited-file-modtime)) (saved nil)) - (if (and fast-lock-mode - ;; - ;; "Only save if the buffer matches the file, the file has - ;; changed, and it was changed by the current emacs session." - ;; - ;; Only save if the buffer is not modified, - ;; (i.e., so we don't save for something not on disk) - (not (buffer-modified-p)) - ;; and the file's timestamp is the same as the buffer's, - ;; (i.e., someone else hasn't written the file in the meantime) - (verify-visited-file-modtime (current-buffer)) - ;; and the file's timestamp is different from the cache's. - ;; (i.e., a save has occurred since the cache was read) - (not (equal fast-lock-cache-timestamp file-timestamp)) - ;; - ;; Only save if user's restrictions are satisfied. - (or (not fast-lock-minimum-size) - (<= fast-lock-minimum-size (buffer-size))) - (or fast-lock-save-others - (eq (user-uid) (nth 2 (file-attributes buffer-file-name)))) - ;; - ;; Only save if there are `face' properties to save. - (text-property-not-all (point-min) (point-max) 'face nil)) - ;; Try each directory until we manage to save or the user quits. - (let ((directories fast-lock-cache-directories)) - (while (and directories (memq saved '(nil error))) - (let* ((dir (fast-lock-cache-directory (car directories) t)) - (file (and dir (fast-lock-cache-name dir)))) - (if (and file (file-writable-p file)) - (setq saved (fast-lock-save-cache-1 file file-timestamp))) - (setq directories (cdr directories))))))))) + (when buffer + (set-buffer buffer)) + (let ((min-size (font-lock-value-in-major-mode fast-lock-minimum-size)) + (file-timestamp (visited-file-modtime)) (saved nil)) + (when (and fast-lock-mode + ;; + ;; "Only save if the buffer matches the file, the file has + ;; changed, and it was changed by the current emacs session." + ;; + ;; Only save if the buffer is not modified, + ;; (i.e., so we don't save for something not on disk) + (not (buffer-modified-p)) + ;; and the file's timestamp is the same as the buffer's, + ;; (i.e., someone else hasn't written the file in the meantime) + (verify-visited-file-modtime (current-buffer)) + ;; and the file's timestamp is different from the cache's. + ;; (i.e., a save has occurred since the cache was read) + (not (equal fast-lock-cache-timestamp file-timestamp)) + ;; + ;; Only save if user's restrictions are satisfied. + (and min-size (>= (buffer-size) min-size)) + (or fast-lock-save-others + (eq (user-uid) (nth 2 (file-attributes buffer-file-name)))) + ;; + ;; Only save if there are `face' properties to save. + (text-property-not-all (point-min) (point-max) 'face nil)) + ;; + ;; Try each directory until we manage to save or the user quits. + (let ((directories fast-lock-cache-directories)) + (while (and directories (memq saved '(nil error))) + (let* ((dir (fast-lock-cache-directory (car directories) t)) + (file (and dir (fast-lock-cache-name dir)))) + (when (and file (file-writable-p file)) + (setq saved (fast-lock-save-cache-1 file file-timestamp))) + (setq directories (cdr directories))))))))) ;;;###autoload (defun turn-on-fast-lock () @@ -370,29 +408,32 @@ (defun fast-lock-after-fontify-buffer () ;; Delete the Font Lock cache file used to restore fontification, if any. - (if fast-lock-cache-filename - (if (file-writable-p fast-lock-cache-filename) - (delete-file fast-lock-cache-filename) - (message "File %s font lock cache cannot be deleted" (buffer-name)))) + (when fast-lock-cache-filename + (if (file-writable-p fast-lock-cache-filename) + (delete-file fast-lock-cache-filename) + (message "File %s font lock cache cannot be deleted" (buffer-name)))) ;; Flag so that a cache will be saved later even if the file is never saved. (setq fast-lock-cache-timestamp nil)) + +(defalias 'fast-lock-after-unfontify-buffer + 'ignore) ;; Miscellaneous Functions: -(defun fast-lock-after-save-hook () +(defun fast-lock-save-cache-after-save-file () ;; Do `fast-lock-save-cache' if `save-buffer' is on `fast-lock-save-events'. - (if (memq 'save-buffer fast-lock-save-events) - (fast-lock-save-cache))) + (when (memq 'save-buffer fast-lock-save-events) + (fast-lock-save-cache))) -(defun fast-lock-kill-buffer-hook () +(defun fast-lock-save-cache-before-kill-buffer () ;; Do `fast-lock-save-cache' if `kill-buffer' is on `fast-lock-save-events'. - (if (memq 'kill-buffer fast-lock-save-events) - (fast-lock-save-cache))) + (when (memq 'kill-buffer fast-lock-save-events) + (fast-lock-save-cache))) -(defun fast-lock-kill-emacs-hook () +(defun fast-lock-save-caches-before-kill-emacs () ;; Do `fast-lock-save-cache's if `kill-emacs' is on `fast-lock-save-events'. - (if (memq 'kill-emacs fast-lock-save-events) - (mapcar 'fast-lock-save-cache (buffer-list)))) + (when (memq 'kill-emacs fast-lock-save-events) + (mapcar 'fast-lock-save-cache (buffer-list)))) (defun fast-lock-cache-directory (directory create) "Return usable directory based on DIRECTORY. @@ -410,8 +451,8 @@ ;; A directory iff the file name matches the regexp. (let ((bufile (expand-file-name buffer-file-truename)) (case-fold-search nil)) - (if (save-match-data (string-match (car directory) bufile)) - (cdr directory))))))) + (when (save-match-data (string-match (car directory) bufile)) + (cdr directory))))))) (cond ((not dir) nil) ((file-accessible-directory-p dir) @@ -478,7 +519,7 @@ fast-lock-cache-filename file)) (error (setq saved 'error)) (quit (setq saved 'quit))) (kill-buffer tpbuf) - (message "Saving %s font lock cache... %s." buname + (message "Saving %s font lock cache...%s" buname (cond ((eq saved 'error) "failed") ((eq saved 'quit) "aborted") (t "done"))) @@ -488,7 +529,8 @@ (defun fast-lock-cache-data (version timestamp keywords properties &rest ignored) ;; Change from (HIGH LOW) for back compatibility. Remove for version 3! - (if (consp (cdr-safe timestamp)) (setcdr timestamp (nth 1 timestamp))) + (when (consp (cdr-safe timestamp)) + (setcdr timestamp (nth 1 timestamp))) ;; Compile KEYWORDS and `font-lock-keywords' in case one is and one isn't. (let ((current font-lock-keywords)) (setq keywords (font-lock-compile-keywords keywords) @@ -507,7 +549,7 @@ (condition-case nil (fast-lock-set-face-properties properties) (error (setq loaded 'error)) (quit (setq loaded 'quit))) - (message "Loading %s font lock cache... %s." buname + (message "Loading %s font lock cache...%s" buname (cond ((eq loaded 'error) "failed") ((eq loaded 'quit) "aborted") (t "done")))) @@ -552,101 +594,104 @@ (setq end (or (text-property-not-all start limit 'face face) limit) regions (cons start (cons end regions)))) ;; Add `face' face's regions, if any, to properties. - (if regions (setq properties (cons (cons face regions) properties)))) + (when regions + (push (cons face regions) properties))) properties))) (defun fast-lock-set-face-properties (properties) "Set all `face' text properties to PROPERTIES in the current buffer. -Any existing `face' text properties are removed first. Leaves buffer modified. +Any existing `face' text properties are removed first. See `fast-lock-get-face-properties' for the format of PROPERTIES." - (save-restriction - (widen) - (font-lock-unfontify-region (point-min) (point-max)) - (while properties - (let ((plist (list 'face (car (car properties)))) - (regions (cdr (car properties)))) + (save-buffer-state (plist regions) + (save-restriction + (widen) + (font-lock-unfontify-region (point-min) (point-max)) + (while properties + (setq plist (list 'face (car (car properties))) + regions (cdr (car properties)) + properties (cdr properties)) ;; Set the `face' property for each start/end region. (while regions (set-text-properties (nth 0 regions) (nth 1 regions) plist) - (setq regions (nthcdr 2 regions))) - (setq properties (cdr properties)))))) + (setq regions (nthcdr 2 regions))))))) ;; Functions for XEmacs: -(if (save-match-data (string-match "XEmacs" (emacs-version))) - ;; It would be better to use XEmacs 19.12's `map-extents' over extents with - ;; `font-lock' property, but `face' properties are on different extents. - (defun fast-lock-get-face-properties () - "Return a list of all `face' text properties in the current buffer. +(when (save-match-data (string-match "XEmacs" (emacs-version))) + ;; + ;; It would be better to use XEmacs' `map-extents' over extents with a + ;; `font-lock' property, but `face' properties are on different extents. + (defun fast-lock-get-face-properties () + "Return a list of all `face' text properties in the current buffer. Each element of the list is of the form (VALUE START1 END1 START2 END2 ...) where VALUE is a `face' property value and STARTx and ENDx are positions. Only those `face' VALUEs in `fast-lock-save-faces' are returned." - (save-restriction - (widen) - (let ((properties ()) cell) - (map-extents - (function - (lambda (extent ignore) - (let ((value (extent-face extent))) - ;; We're only interested if it's one of `fast-lock-save-faces'. - (if (and value (or (null fast-lock-save-faces) + (save-restriction + (widen) + (let ((properties ()) cell) + (map-extents + (function (lambda (extent ignore) + (let ((value (extent-face extent))) + ;; We're only interested if it's one of `fast-lock-save-faces'. + (when (and value (or (null fast-lock-save-faces) (memq value fast-lock-save-faces))) - (let ((start (extent-start-position extent)) - (end (extent-end-position extent))) - ;; Make or add to existing list of regions with the same - ;; `face' property value. - (if (setq cell (assq value properties)) - (setcdr cell (cons start (cons end (cdr cell)))) - (setq properties (cons (list value start end) - properties))))) - ;; Return nil to keep `map-extents' going. - nil)))) - properties)))) - -(if (save-match-data (string-match "XEmacs" (emacs-version))) - ;; Make extents just like XEmacs's font-lock.el does. - (defun fast-lock-set-face-properties (properties) - "Set all `face' text properties to PROPERTIES in the current buffer. + (let ((start (extent-start-position extent)) + (end (extent-end-position extent))) + ;; Make or add to existing list of regions with the same + ;; `face' property value. + (if (setq cell (assq value properties)) + (setcdr cell (cons start (cons end (cdr cell)))) + (push (list value start end) properties)))) + ;; Return nil to keep `map-extents' going. + nil)))) + properties))) + ;; + ;; Make extents just like XEmacs' font-lock.el does. + (defun fast-lock-set-face-properties (properties) + "Set all `face' text properties to PROPERTIES in the current buffer. Any existing `face' text properties are removed first. See `fast-lock-get-face-properties' for the format of PROPERTIES." - (save-restriction - (widen) - (font-lock-unfontify-region (point-min) (point-max)) - (while properties - (let ((face (car (car properties))) - (regions (cdr (car properties)))) - ;; Set the `face' property, etc., for each start/end region. - (while regions - (font-lock-set-face (nth 0 regions) (nth 1 regions) face) - (setq regions (nthcdr 2 regions))) - (setq properties (cdr properties))))))) + (save-restriction + (widen) + (font-lock-unfontify-region (point-min) (point-max)) + (while properties + (let ((face (car (car properties))) + (regions (cdr (car properties)))) + ;; Set the `face' property, etc., for each start/end region. + (while regions + (font-lock-set-face (nth 0 regions) (nth 1 regions) face) + (setq regions (nthcdr 2 regions))) + (setq properties (cdr properties)))))) + ;; + ;; XEmacs 19.12 font-lock.el's `font-lock-fontify-buffer' runs a hook. + (add-hook 'font-lock-after-fontify-buffer-hook + 'fast-lock-after-fontify-buffer)) -(if (save-match-data (string-match "XEmacs" (emacs-version))) - ;; XEmacs 19.12 font-lock.el's `font-lock-fontify-buffer' runs a hook. - (add-hook 'font-lock-after-fontify-buffer-hook - 'fast-lock-after-fontify-buffer)) +(unless (boundp 'font-lock-inhibit-thing-lock) + (defvar font-lock-inhibit-thing-lock nil + "List of Font Lock mode related modes that should not be turned on.")) -(or (fboundp 'font-lock-compile-keywords) - (defalias 'font-lock-compile-keywords 'identity)) +(unless (fboundp 'font-lock-value-in-major-mode) + (defun font-lock-value-in-major-mode (alist) + ;; Return value in ALIST for `major-mode'. + (if (consp alist) + (cdr (or (assq major-mode alist) (assq t alist))) + alist))) + +(unless (fboundp 'font-lock-compile-keywords) + (defalias 'font-lock-compile-keywords 'identity)) ;; Install ourselves: -;; We don't install ourselves on `font-lock-mode-hook' as packages with similar -;; functionality exist, and fast-lock.el should be dumpable without forcing -;; people to use caches or making it difficult for people to use alternatives. -(add-hook 'after-save-hook 'fast-lock-after-save-hook) -(add-hook 'kill-buffer-hook 'fast-lock-kill-buffer-hook) -(add-hook 'kill-emacs-hook 'fast-lock-kill-emacs-hook) +(add-hook 'after-save-hook 'fast-lock-save-cache-after-save-file) +(add-hook 'kill-buffer-hook 'fast-lock-save-cache-before-kill-buffer) +(add-hook 'kill-emacs-hook 'fast-lock-save-caches-before-kill-emacs) -;; Maybe save on the modeline? -;;(setcdr (assq 'font-lock-mode minor-mode-alist) '(" Fast")) - -;(or (assq 'fast-lock-mode minor-mode-alist) -; (setq minor-mode-alist (cons '(fast-lock-mode " Fast") minor-mode-alist))) - -;; XEmacs change: do it the right way. This works with modeline mousing. ;;;###autoload -(add-minor-mode 'fast-lock-mode " Fast") +(if (fboundp 'add-minor-mode) (add-minor-mode 'fast-lock-mode nil)) +;;;###dont-autoload +(unless (assq 'fast-lock-mode minor-mode-alist) + (setq minor-mode-alist (append minor-mode-alist '((fast-lock-mode nil))))) ;; Provide ourselves:
--- a/lisp/packages/font-lock.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/font-lock.el Mon Aug 13 08:46:35 2007 +0200 @@ -656,7 +656,7 @@ (put-nonduplicable-text-property start end 'font-lock nil)) (defsubst font-lock-any-faces-p (start end) - ;; Return non-nil if we've put any syntax highlighting on the + ;; Return non-nil if we've put any syntax highlighting on ;; the characters in the range. ;; ;; used to look for 'text-prop property, but this has problems if
--- a/lisp/packages/generic-sc.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/generic-sc.el Mon Aug 13 08:46:35 2007 +0200 @@ -820,7 +820,7 @@ system) (funcall f) (add-hook 'find-file-hooks 'sc-mode-line) - (add-menu '() sc-generic-name sc-menu) + (add-submenu '() (cons sc-generic-name sc-menu)) (add-hook 'activate-menubar-hook 'sc-sensitize-menu) (run-hooks 'sc-mode-hook) (setq sc-mode system)))))) @@ -1140,7 +1140,7 @@ (defun rcs-register (file revision) (if (and (not (file-exists-p "RCS")) (y-or-n-p "Directory RCS does not exist, create it?")) - (make-directory "SCCS")) + (make-directory "RCS")) (sc-do-command "*RCS*" "ci" "ci" file (rcs-name file) "-u")) (defun rcs-check-out (file lockp)
--- a/lisp/packages/gnuserv.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/gnuserv.el Mon Aug 13 08:46:35 2007 +0200 @@ -37,7 +37,7 @@ ; Arup Mukherjee <arup+@cmu.edu> May/1994 ; Updated for XEmacs 19.10, and others: ; - use find-file-other-screen if present -; - new variable gnuserv-frame can be set to a frame or screen which is +; - new variable gnuserv-frame can be set to a frame or screen which ; is used for all edited files. ; - check to see if server.el is already loaded and complain if it is, since ; gnuserv.el can't coexist with server.el @@ -222,10 +222,12 @@ (defun server-make-window-visible () "Try to make this window even more visible." - (and (boundp 'window-system) - (boundp 'window-system-version) - (eq window-system 'x) - (eq window-system-version 11) + (and (or (and (boundp 'window-system) + (boundp 'window-system-version) + (eq window-system 'x) + (eq window-system-version 11)) + (and (fboundp 'console-type) + (eq 'x (console-type)))) (cond ((fboundp 'raise-frame) (raise-frame (selected-frame))) ((fboundp 'deiconify-screen) @@ -496,7 +498,15 @@ (server-start nil) (if server-buffer-clients (progn (server-switch-buffer (server-done)) - (cond ((or ;(not window-system) #### someone examine! + (cond ((fboundp 'console-type) ;; XEmacs 19.14+ + (or (and (equal (console-type) 'x) + gnuserv-frame + (frame-live-p gnuserv-frame)) + (condition-case () + (delete-frame (selected-frame) nil) + (error + (message "Not deleting last visible frame..."))))) + ((or (not window-system) (and gnuserv-frame (or (and (fboundp 'frame-live-p) (frame-live-p gnuserv-frame))
--- a/lisp/packages/hexl.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/hexl.el Mon Aug 13 08:46:35 2007 +0200 @@ -20,9 +20,10 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary: @@ -55,9 +56,9 @@ ;; (defvar hexl-program "hexl" - "The program that will hexlify and de-hexlify its stdin. + "The program that will hexlify and dehexlify its stdin. `hexl-program' will always be concatenated with `hexl-options' -and \"-de\" when dehexlfying a buffer.") +and \"-de\" when dehexlifying a buffer.") (defvar hexl-iso "" "If your emacs can handle ISO characters, this should be set to @@ -82,13 +83,12 @@ (defvar hexl-mode-old-local-map) (defvar hexl-mode-old-mode-name) (defvar hexl-mode-old-major-mode) +(defvar hexl-mode-old-write-contents-hooks) +(defvar hexl-mode-old-require-final-newline) +(defvar hexl-mode-old-syntax-table) ;; routines -(defvar hexl-mode-old-local-map) -(defvar hexl-mode-old-mode-name) -(defvar hexl-mode-old-major-mode) - ;;;###autoload (defun hexl-mode (&optional arg) "\\<hexl-mode-map> @@ -163,8 +163,26 @@ \\[describe-bindings] for advanced commands." (interactive "p") (if (eq major-mode 'hexl-mode) - (error "You are already in hexl mode.") - (kill-all-local-variables) + (error "You are already in hexl mode") + + (let ((modified (buffer-modified-p)) + (inhibit-read-only t) + (original-point (1- (point))) + max-address) + (and (eobp) (not (bobp)) + (setq original-point (1- original-point))) + (if (not (or (eq arg 1) (not arg))) + ;; if no argument then we guess at hexl-max-address + (setq max-address (+ (* (/ (1- (buffer-size)) 68) 16) 15)) + (setq max-address (1- (buffer-size))) + (hexlify-buffer) + (set-buffer-modified-p modified)) + (make-local-variable 'hexl-max-address) + (setq hexl-max-address max-address) + (hexl-goto-address original-point)) + + ;; We do not turn off the old major mode; instead we just + ;; override most of it. That way, we can restore it perfectly. (make-local-variable 'hexl-mode-old-local-map) (setq hexl-mode-old-local-map (current-local-map)) (use-local-map hexl-mode-map) @@ -177,32 +195,27 @@ (setq hexl-mode-old-major-mode major-mode) (setq major-mode 'hexl-mode) + (make-local-variable 'hexl-mode-old-syntax-table) + (setq hexl-mode-old-syntax-table (syntax-table)) + (set-syntax-table (standard-syntax-table)) + + (make-local-variable 'hexl-mode-old-write-contents-hooks) + (setq hexl-mode-old-write-contents-hooks write-contents-hooks) (make-local-variable 'write-contents-hooks) (add-hook 'write-contents-hooks 'hexl-save-buffer) + (make-local-variable 'hexl-mode-old-require-final-newline) + (setq hexl-mode-old-require-final-newline require-final-newline) + (make-local-variable 'require-final-newline) + (setq require-final-newline nil) + + ;; Add hooks to rehexlify or dehexlify on various events. (make-local-hook 'after-revert-hook) (add-hook 'after-revert-hook 'hexl-after-revert-hook nil t) - (make-local-variable 'hexl-max-address) - - (make-local-variable 'change-major-mode-hook) - (add-hook 'change-major-mode-hook 'hexl-maybe-dehexlify-buffer) - - (make-local-variable 'require-final-newline) - (setq require-final-newline nil) - - (let ((modified (buffer-modified-p)) - (inhibit-read-only t) - (original-point (1- (point)))) - (and (eobp) (not (bobp)) - (setq original-point (1- original-point))) - (if (not (or (eq arg 1) (not arg))) - ;; if no argument then we guess at hexl-max-address - (setq hexl-max-address (+ (* (/ (1- (buffer-size)) 68) 16) 15)) - (setq hexl-max-address (1- (buffer-size))) - (hexlify-buffer) - (set-buffer-modified-p modified) - (hexl-goto-address original-point))))) + (make-local-hook 'change-major-mode-hook) + (add-hook 'change-major-mode-hook 'hexl-maybe-dehexlify-buffer nil t)) + (run-hooks 'hexl-mode-hook)) (defun hexl-after-revert-hook () (hexlify-buffer) @@ -263,8 +276,15 @@ (remove-hook 'write-contents-hooks 'hexl-save-buffer) (set-buffer-modified-p modified) (goto-char original-point))) + + (remove-hook 'after-revert-hook 'hexl-after-revert-hook t) + (remove-hook 'change-major-mode-hook 'hexl-maybe-dehexlify-buffer t) + + (setq write-contents-hooks hexl-mode-old-write-contents-hooks) + (setq require-final-newline hexl-mode-old-require-final-newline) (setq mode-name hexl-mode-old-mode-name) (use-local-map hexl-mode-old-local-map) + (set-syntax-table hexl-mode-old-syntax-table) (setq major-mode hexl-mode-old-major-mode) (force-mode-line-update)) @@ -302,7 +322,7 @@ (+ (* (/ address 16) 68) 11 (/ (* (% address 16) 5) 2))) (defun hexl-goto-address (address) - "Goto hexl-mode (decimal) address ADDRESS. + "Go to hexl-mode (decimal) address ADDRESS. Signal error if ADDRESS out of range." (interactive "nAddress: ") (if (or (< address 0) (> address hexl-max-address)) @@ -502,12 +522,12 @@ (recenter 0)))) (defun hexl-beginning-of-1k-page () - "Goto to beginning of 1k boundry." + "Go to beginning of 1k boundary." (interactive) (hexl-goto-address (logand (hexl-current-address) -1024))) (defun hexl-end-of-1k-page () - "Goto to end of 1k boundry." + "Go to end of 1k boundary." (interactive) (hexl-goto-address (let ((address (logior (hexl-current-address) 1023))) (if (> address hexl-max-address) @@ -515,12 +535,12 @@ address))) (defun hexl-beginning-of-512b-page () - "Goto to beginning of 512 byte boundry." + "Go to beginning of 512 byte boundary." (interactive) (hexl-goto-address (logand (hexl-current-address) -512))) (defun hexl-end-of-512b-page () - "Goto to end of 512 byte boundry." + "Go to end of 512 byte boundary." (interactive) (hexl-goto-address (let ((address (logior (hexl-current-address) 511))) (if (> address hexl-max-address) @@ -536,18 +556,31 @@ ;00000000: 0011 2233 4455 6677 8899 aabb ccdd eeff 0123456789ABCDEF +;;;###autoload (defun hexlify-buffer () - "Convert a binary buffer to hexl format." + "Convert a binary buffer to hexl format. +This discards the buffer's undo information." (interactive) + (and buffer-undo-list + (or (y-or-n-p "Converting to hexl format discards undo info; ok? ") + (error "Aborted"))) + (setq buffer-undo-list nil) (let ((binary-process-output nil) ; for Ms-Dos - (binary-process-input t)) + (binary-process-input t) + (buffer-undo-list t)) (shell-command-on-region (point-min) (point-max) hexlify-command t))) (defun dehexlify-buffer () - "Convert a hexl format buffer to binary." + "Convert a hexl format buffer to binary. +This discards the buffer's undo information." (interactive) + (and buffer-undo-list + (or (y-or-n-p "Converting from hexl format discards undo info; ok? ") + (error "Aborted"))) + (setq buffer-undo-list nil) (let ((binary-process-output t) ; for Ms-Dos - (binary-process-input nil)) + (binary-process-input nil) + (buffer-undo-list t)) (shell-command-on-region (point-min) (point-max) dehexlify-command t))) (defun hexl-char-after-point () @@ -567,13 +600,13 @@ (let ((ch (logior character 32))) (if (and (>= ch ?a) (<= ch ?f)) (- ch (- ?a 10)) - (error (format "Invalid hex digit `%c'." ch)))))) + (error "Invalid hex digit `%c'." ch))))) (defun hexl-oct-char-to-integer (character) "Take a char and return its value as if it was a octal digit." (if (and (>= character ?0) (<= character ?7)) (- character ?0) - (error (format "Invalid octal digit `%c'." character)))) + (error "Invalid octal digit `%c'." character))) (defun hexl-printable-character (ch) "Return a displayable string for character CH." @@ -650,104 +683,109 @@ (if hexl-mode-map nil - (setq hexl-mode-map (make-sparse-keymap)) - (set-keymap-name hexl-mode-map 'hexl-mode-map) + (setq hexl-mode-map (make-sparse-keymap)) - (define-key hexl-mode-map 'left 'hexl-backward-char) - (define-key hexl-mode-map 'right 'hexl-forward-char) - (define-key hexl-mode-map 'up 'hexl-previous-line) - (define-key hexl-mode-map 'down 'hexl-next-line) - (define-key hexl-mode-map '(meta left) 'hexl-backward-short) - (define-key hexl-mode-map '(meta right) 'hexl-forward-short) - (define-key hexl-mode-map 'next 'hexl-scroll-up) - (define-key hexl-mode-map 'prior 'hexl-scroll-down) - - (define-key hexl-mode-map "\C-a" 'hexl-beginning-of-line) - (define-key hexl-mode-map "\C-b" 'hexl-backward-char) - (define-key hexl-mode-map "\C-d" 'undefined) - (define-key hexl-mode-map "\C-e" 'hexl-end-of-line) - (define-key hexl-mode-map "\C-f" 'hexl-forward-char) + (define-key hexl-mode-map [left] 'hexl-backward-char) + (define-key hexl-mode-map [right] 'hexl-forward-char) + (define-key hexl-mode-map [up] 'hexl-previous-line) + (define-key hexl-mode-map [down] 'hexl-next-line) + (define-key hexl-mode-map [M-left] 'hexl-backward-short) + (define-key hexl-mode-map [M-right] 'hexl-forward-short) + (define-key hexl-mode-map [next] 'hexl-scroll-up) + (define-key hexl-mode-map [prior] 'hexl-scroll-down) + (define-key hexl-mode-map [home] 'hexl-beginning-of-buffer) + (define-key hexl-mode-map [deletechar] 'undefined) + (define-key hexl-mode-map [deleteline] 'undefined) + (define-key hexl-mode-map [insertline] 'undefined) + (define-key hexl-mode-map [S-delete] 'undefined) + (define-key hexl-mode-map "\177" 'undefined) - (if (not (eq (key-binding (char-to-string help-char)) 'help-command)) - (define-key hexl-mode-map (char-to-string help-char) 'undefined)) + (define-key hexl-mode-map "\C-a" 'hexl-beginning-of-line) + (define-key hexl-mode-map "\C-b" 'hexl-backward-char) + (define-key hexl-mode-map "\C-d" 'undefined) + (define-key hexl-mode-map "\C-e" 'hexl-end-of-line) + (define-key hexl-mode-map "\C-f" 'hexl-forward-char) + + (if (not (eq (key-binding (char-to-string help-char)) 'help-command)) + (define-key hexl-mode-map (char-to-string help-char) 'undefined)) - (define-key hexl-mode-map "\C-i" 'hexl-self-insert-command) - (define-key hexl-mode-map "\C-j" 'hexl-self-insert-command) - (define-key hexl-mode-map "\C-k" 'undefined) - (define-key hexl-mode-map "\C-m" 'hexl-self-insert-command) - (define-key hexl-mode-map "\C-n" 'hexl-next-line) - (define-key hexl-mode-map "\C-o" 'undefined) - (define-key hexl-mode-map "\C-p" 'hexl-previous-line) - (define-key hexl-mode-map "\C-q" 'hexl-quoted-insert) - (define-key hexl-mode-map "\C-t" 'undefined) - (define-key hexl-mode-map "\C-v" 'hexl-scroll-up) - (define-key hexl-mode-map "\C-w" 'undefined) - (define-key hexl-mode-map "\C-y" 'undefined) + (define-key hexl-mode-map "\C-i" 'hexl-self-insert-command) + (define-key hexl-mode-map "\C-j" 'hexl-self-insert-command) + (define-key hexl-mode-map "\C-k" 'undefined) + (define-key hexl-mode-map "\C-m" 'hexl-self-insert-command) + (define-key hexl-mode-map "\C-n" 'hexl-next-line) + (define-key hexl-mode-map "\C-o" 'undefined) + (define-key hexl-mode-map "\C-p" 'hexl-previous-line) + (define-key hexl-mode-map "\C-q" 'hexl-quoted-insert) + (define-key hexl-mode-map "\C-t" 'undefined) + (define-key hexl-mode-map "\C-v" 'hexl-scroll-up) + (define-key hexl-mode-map "\C-w" 'undefined) + (define-key hexl-mode-map "\C-y" 'undefined) - (let ((ch 32)) - (while (< ch 127) - (define-key hexl-mode-map (char-to-string ch) 'hexl-self-insert-command) - (setq ch (1+ ch)))) + (let ((ch 32)) + (while (< ch 127) + (define-key hexl-mode-map (format "%c" ch) 'hexl-self-insert-command) + (setq ch (1+ ch)))) - (define-key hexl-mode-map "\e\C-a" 'hexl-beginning-of-512b-page) - (define-key hexl-mode-map "\e\C-b" 'hexl-backward-short) - (define-key hexl-mode-map "\e\C-c" 'undefined) - (define-key hexl-mode-map "\e\C-d" 'hexl-insert-decimal-char) - (define-key hexl-mode-map "\e\C-e" 'hexl-end-of-512b-page) - (define-key hexl-mode-map "\e\C-f" 'hexl-forward-short) - (define-key hexl-mode-map "\e\C-g" 'undefined) - (define-key hexl-mode-map "\e\C-h" 'undefined) - (define-key hexl-mode-map "\e\C-i" 'undefined) - (define-key hexl-mode-map "\e\C-j" 'undefined) - (define-key hexl-mode-map "\e\C-k" 'undefined) - (define-key hexl-mode-map "\e\C-l" 'undefined) - (define-key hexl-mode-map "\e\C-m" 'undefined) - (define-key hexl-mode-map "\e\C-n" 'undefined) - (define-key hexl-mode-map "\e\C-o" 'hexl-insert-octal-char) - (define-key hexl-mode-map "\e\C-p" 'undefined) - (define-key hexl-mode-map "\e\C-q" 'undefined) - (define-key hexl-mode-map "\e\C-r" 'undefined) - (define-key hexl-mode-map "\e\C-s" 'undefined) - (define-key hexl-mode-map "\e\C-t" 'undefined) - (define-key hexl-mode-map "\e\C-u" 'undefined) + (define-key hexl-mode-map "\e\C-a" 'hexl-beginning-of-512b-page) + (define-key hexl-mode-map "\e\C-b" 'hexl-backward-short) + (define-key hexl-mode-map "\e\C-c" 'undefined) + (define-key hexl-mode-map "\e\C-d" 'hexl-insert-decimal-char) + (define-key hexl-mode-map "\e\C-e" 'hexl-end-of-512b-page) + (define-key hexl-mode-map "\e\C-f" 'hexl-forward-short) + (define-key hexl-mode-map "\e\C-g" 'undefined) + (define-key hexl-mode-map "\e\C-h" 'undefined) + (define-key hexl-mode-map "\e\C-i" 'undefined) + (define-key hexl-mode-map "\e\C-j" 'undefined) + (define-key hexl-mode-map "\e\C-k" 'undefined) + (define-key hexl-mode-map "\e\C-l" 'undefined) + (define-key hexl-mode-map "\e\C-m" 'undefined) + (define-key hexl-mode-map "\e\C-n" 'undefined) + (define-key hexl-mode-map "\e\C-o" 'hexl-insert-octal-char) + (define-key hexl-mode-map "\e\C-p" 'undefined) + (define-key hexl-mode-map "\e\C-q" 'undefined) + (define-key hexl-mode-map "\e\C-r" 'undefined) + (define-key hexl-mode-map "\e\C-s" 'undefined) + (define-key hexl-mode-map "\e\C-t" 'undefined) + (define-key hexl-mode-map "\e\C-u" 'undefined) - (define-key hexl-mode-map "\e\C-w" 'undefined) - (define-key hexl-mode-map "\e\C-x" 'hexl-insert-hex-char) - (define-key hexl-mode-map "\e\C-y" 'undefined) + (define-key hexl-mode-map "\e\C-w" 'undefined) + (define-key hexl-mode-map "\e\C-x" 'hexl-insert-hex-char) + (define-key hexl-mode-map "\e\C-y" 'undefined) - (define-key hexl-mode-map "\ea" 'undefined) ;hexl-beginning-of-1k-page - (define-key hexl-mode-map "\eb" 'hexl-backward-word) - (define-key hexl-mode-map "\ec" 'undefined) - (define-key hexl-mode-map "\ed" 'undefined) - (define-key hexl-mode-map "\ee" 'undefined) ;hexl-end-of-1k-page - (define-key hexl-mode-map "\ef" 'hexl-forward-word) - (define-key hexl-mode-map "\eg" 'hexl-goto-hex-address) - (define-key hexl-mode-map "\eh" 'undefined) - (define-key hexl-mode-map "\ei" 'undefined) - (define-key hexl-mode-map "\ej" 'hexl-goto-address) - (define-key hexl-mode-map "\ek" 'undefined) - (define-key hexl-mode-map "\el" 'undefined) - (define-key hexl-mode-map "\em" 'undefined) - (define-key hexl-mode-map "\en" 'undefined) - (define-key hexl-mode-map "\eo" 'undefined) - (define-key hexl-mode-map "\ep" 'undefined) - (define-key hexl-mode-map "\eq" 'undefined) - (define-key hexl-mode-map "\er" 'undefined) - (define-key hexl-mode-map "\es" 'undefined) - (define-key hexl-mode-map "\et" 'undefined) - (define-key hexl-mode-map "\eu" 'undefined) - (define-key hexl-mode-map "\ev" 'hexl-scroll-down) - (define-key hexl-mode-map "\ey" 'undefined) - (define-key hexl-mode-map "\ez" 'undefined) - (define-key hexl-mode-map "\e<" 'hexl-beginning-of-buffer) - (define-key hexl-mode-map "\e>" 'hexl-end-of-buffer) + (define-key hexl-mode-map "\ea" 'undefined) + (define-key hexl-mode-map "\eb" 'hexl-backward-word) + (define-key hexl-mode-map "\ec" 'undefined) + (define-key hexl-mode-map "\ed" 'undefined) + (define-key hexl-mode-map "\ee" 'undefined) + (define-key hexl-mode-map "\ef" 'hexl-forward-word) + (define-key hexl-mode-map "\eg" 'hexl-goto-hex-address) + (define-key hexl-mode-map "\eh" 'undefined) + (define-key hexl-mode-map "\ei" 'undefined) + (define-key hexl-mode-map "\ej" 'hexl-goto-address) + (define-key hexl-mode-map "\ek" 'undefined) + (define-key hexl-mode-map "\el" 'undefined) + (define-key hexl-mode-map "\em" 'undefined) + (define-key hexl-mode-map "\en" 'undefined) + (define-key hexl-mode-map "\eo" 'undefined) + (define-key hexl-mode-map "\ep" 'undefined) + (define-key hexl-mode-map "\eq" 'undefined) + (define-key hexl-mode-map "\er" 'undefined) + (define-key hexl-mode-map "\es" 'undefined) + (define-key hexl-mode-map "\et" 'undefined) + (define-key hexl-mode-map "\eu" 'undefined) + (define-key hexl-mode-map "\ev" 'hexl-scroll-down) + (define-key hexl-mode-map "\ey" 'undefined) + (define-key hexl-mode-map "\ez" 'undefined) + (define-key hexl-mode-map "\e<" 'hexl-beginning-of-buffer) + (define-key hexl-mode-map "\e>" 'hexl-end-of-buffer) - (define-key hexl-mode-map "\C-c\C-c" 'hexl-mode-exit) + (define-key hexl-mode-map "\C-c\C-c" 'hexl-mode-exit) - (define-key hexl-mode-map "\C-x[" 'hexl-beginning-of-1k-page) - (define-key hexl-mode-map "\C-x]" 'hexl-end-of-1k-page) - (define-key hexl-mode-map "\C-x\C-p" 'undefined) - (define-key hexl-mode-map "\C-x\C-s" 'hexl-save-buffer) - (define-key hexl-mode-map "\C-x\C-t" 'undefined)) + (define-key hexl-mode-map "\C-x[" 'hexl-beginning-of-1k-page) + (define-key hexl-mode-map "\C-x]" 'hexl-end-of-1k-page) + (define-key hexl-mode-map "\C-x\C-p" 'undefined) + (define-key hexl-mode-map "\C-x\C-s" 'hexl-save-buffer) + (define-key hexl-mode-map "\C-x\C-t" 'undefined)) ;;; hexl.el ends here
--- a/lisp/packages/icomplete.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/icomplete.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,69 +1,70 @@ ;;; icomplete.el --- minibuffer completion with incremental feedback -;;; Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. +;;; Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. ;;; Author: Ken Manheimer <klm@nist.gov> ;;; Maintainer: Ken Manheimer <klm@nist.gov> -;;; Version: $Id: icomplete.el,v 1.1.1.1 1996/12/18 03:31:39 steve Exp $ +;;; Version: $Id: icomplete.el,v 1.1.1.2 1996/12/18 03:44:58 steve Exp $ ;;; Created: Mar 1993 klm@nist.gov - first release to usenet ;;; Keywords: help, abbrev ;;; Hacked for XEmacs: David Hughes 7th September 1995 -;; This file is part of GNU Emacs. +;; This file is part of XEmacs. -;; 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 +;; XEmacs 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. +;; XEmacs 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, 675 Mass Ave, Cambridge, MA 02139, USA. +;; along with XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.29. +;;; Synched up with: FSF 19.34. ;;; Commentary: -;;; Loading this package implements a more fine-grained minibuffer -;;; completion feedback scheme. Prospective completions are concisely -;;; indicated within the minibuffer itself, with each successive -;;; keystroke. +;; Loading this package implements a more fine-grained minibuffer +;; completion feedback scheme. Prospective completions are concisely +;; indicated within the minibuffer itself, with each successive +;; keystroke. -;;; See 'icomplete-completions' docstring for a description of the -;;; icomplete display format. +;; See 'icomplete-completions' docstring for a description of the +;; icomplete display format. -;;; See the `icomplete-minibuffer-setup-hook' docstring for a means to -;;; customize icomplete setup for interoperation with other -;;; minibuffer-oriented packages. +;; See the `icomplete-minibuffer-setup-hook' docstring for a means to +;; customize icomplete setup for interoperation with other +;; minibuffer-oriented packages. -;;; To activate icomplete mode, simply load the package. You can -;;; subsequently deactivate it by invoking the function icomplete-mode -;;; with a negative prefix-arg (C-U -1 ESC-x icomplete-mode). Also, -;;; you can prevent activation of the mode during package load by -;;; first setting the variable `icomplete-mode' to nil. Icompletion -;;; can be enabled any time after the package is loaded by invoking -;;; icomplete-mode without a prefix arg. +;; To activate icomplete mode, simply load the package. You can +;; subsequently deactivate it by invoking the function icomplete-mode +;; with a negative prefix-arg (C-U -1 ESC-x icomplete-mode). Also, +;; you can prevent activation of the mode during package load by +;; first setting the variable `icomplete-mode' to nil. Icompletion +;; can be enabled any time after the package is loaded by invoking +;; icomplete-mode without a prefix arg. -;;; This version of icomplete runs on Emacs 19.18 and later. (It -;;; depends on the incorporation of minibuffer-setup-hook.) The elisp -;;; archives, ftp://archive.cis.ohio-state.edu/pub/gnu/emacs/elisp-archive, -;;; probably still has a version that works in GNU Emacs v18. +;; This version of icomplete runs on Emacs 19.18 and later. (It +;; depends on the incorporation of minibuffer-setup-hook.) The elisp +;; archives, ftp://archive.cis.ohio-state.edu/pub/gnu/emacs/elisp-archive, +;; probably still has a version that works in GNU Emacs v18. -;;; Thanks to everyone for their suggestions for refinements of this -;;; package. I particularly have to credit Michael Cook, who -;;; implemented an incremental completion style in his 'iswitch' -;;; functions that served as a model for icomplete. Some other -;;; contributors: Noah Freidman (restructuring as minor mode), Colin -;;; Rafferty (lemacs reconciliation), Lars Lindberg, RMS, and -;;; others. +;; Thanks to everyone for their suggestions for refinements of this +;; package. I particularly have to credit Michael Cook, who +;; implemented an incremental completion style in his 'iswitch' +;; functions that served as a model for icomplete. Some other +;; contributors: Noah Freidman (restructuring as minor mode), Colin +;; Rafferty (lemacs reconciliation), Lars Lindberg, RMS, and +;; others. -;;; klm. +;; klm. ;;; Code: @@ -71,13 +72,6 @@ (provide 'icomplete) ;;;_* User Customization variables -(defvar icomplete-compute-delay .3 - "*Completions-computation stall, used only with large-number -completions - see `icomplete-delay-completions-threshold'.") -(defvar icomplete-delay-completions-threshold 400 - "*Pending-completions number over which to apply icomplete-compute-delay.") -(defvar icomplete-max-delay-chars 3 - "*Maximum number of initial chars to apply icomplete compute delay.") ;;;_* Initialization ;;;_ = icomplete-minibuffer-setup-hook @@ -123,13 +117,26 @@ minibuffer completion.") (add-hook 'icomplete-post-command-hook 'icomplete-exhibit) -;;;_ > icomplete-run-pre-command-hooks -(defun icomplete-run-pre-command-hooks () - (run-hooks 'icomplete-pre-command-hook)) +;; XEmacs addition +(defvar icomplete-show-key-bindings t + "When non-nil show key bindings as well as completion when matching +a command.") -;;;_ > icomplete-run-post-command-hooks -(defun icomplete-run-post-command-hooks () - (run-hooks 'icomplete-post-command-hook)) +;; XEmacs addition +(defun icomplete-get-keys (func-name) + "Return the keys `func-name' is bound to as a string." + (when (commandp func-name) + (let* ((sym (intern func-name)) + (keys (where-is-internal sym))) + (concat "<" + (if keys + (mapconcat 'key-description + (sort '([next] [kp_next] [(control v)]) + #'(lambda (x y) + (< (length x) (length y)))) + ", ") + "Unbound") + ">")))) ;;;_ > icomplete-mode (&optional prefix) ;;;###autoload @@ -154,34 +161,37 @@ the selected window is a minibuffer, and not in the middle of macro execution, and minibuffer-completion-table is not a symbol (which would - indicate some non-standard, non-simple completion mechansm, + indicate some non-standard, non-simple completion mechanism, like file-name and other custom-func completions)." (and (window-minibuffer-p (selected-window)) - (not executing-macro) + (not executing-kbd-macro) (not (symbolp minibuffer-completion-table)))) + ;;;_ > icomplete-minibuffer-setup () ;;;###autoload (defun icomplete-minibuffer-setup () - "Run in minibuffer on activation to establish incremental completion. - -Usually run by inclusion in minibuffer-setup-hook." - +Usually run by inclusion in `minibuffer-setup-hook'." (cond ((and icomplete-mode (icomplete-simple-completing-p)) (make-local-hook 'pre-command-hook) - (add-hook 'pre-command-hook 'icomplete-run-pre-command-hooks nil t) + (add-hook 'pre-command-hook + (function (lambda () + (run-hooks 'icomplete-pre-command-hook))) + nil t) (make-local-hook 'post-command-hook) - (add-hook 'post-command-hook 'icomplete-run-post-command-hooks nil t) + (add-hook 'post-command-hook + (function (lambda () + (run-hooks 'icomplete-post-command-hook))) + nil t) (run-hooks 'icomplete-minibuffer-setup-hook)))) - + ;;;_* Completion ;;;_ > icomplete-tidy () (defun icomplete-tidy () "Remove completions display \(if any) prior to new user input. - -Should be run in on the minibuffer pre-command-hook. See `icomplete-mode' +Should be run in on the minibuffer `pre-command-hook'. See `icomplete-mode' and `minibuffer-setup-hook'." (if (icomplete-simple-completing-p) (if (and (boundp 'icomplete-eoinput) @@ -196,15 +206,15 @@ ;; Reestablish the local variable 'cause minibuffer-setup is weird: (make-local-variable 'icomplete-eoinput) (setq icomplete-eoinput 1)))) + ;;;_ > icomplete-exhibit () (defun icomplete-exhibit () "Insert icomplete completions display. - -Should be run via minibuffer post-command-hook. See `icomplete-mode' +Should be run via minibuffer `post-command-hook'. See `icomplete-mode' and `minibuffer-setup-hook'." (if (icomplete-simple-completing-p) - (let* ((contents (buffer-substring (point-min)(point-max))) - (buffer-undo-list t)) + (let ((contents (buffer-substring (point-min)(point-max))) + (buffer-undo-list t)) (save-excursion (goto-char (point-max)) ; Register the end of input, so we @@ -215,28 +225,14 @@ (make-local-variable 'icomplete-eoinput)) (setq icomplete-eoinput (point)) ; Insert the match-status information: - (if (and (> (point-max) 1) - (or - ;; Don't bother with delay after certain number of chars: - (> (point-max) icomplete-max-delay-chars) - ;; Don't delay if alternatives number is small enough: - (if minibuffer-completion-table - (cond ((numberp minibuffer-completion-table) - (< minibuffer-completion-table - icomplete-delay-completions-threshold)) - ((sequencep minibuffer-completion-table) - (< (length minibuffer-completion-table) - icomplete-delay-completions-threshold)) - )) - ;; Delay - give some grace time for next keystroke, before - ;; embarking on computing completions: - (sit-for icomplete-compute-delay))) + (if (> (point-max) 1) (insert-string (icomplete-completions contents minibuffer-completion-table minibuffer-completion-predicate (not minibuffer-completion-confirm)))))))) + ;;;_ > icomplete-completions (name candidates predicate require-match) (defun icomplete-completions (name candidates predicate require-match) "Identify prospective candidates for minibuffer completion. @@ -250,10 +246,10 @@ \(...) - a single prospect is identified and matching is enforced, \[...] - a single prospect is identified but matching is optional, or \{...} - multiple prospects, separated by commas, are indicated, and - further input is required to distingish a single one. + further input is required to distinguish a single one. -The displays for disambiguous matches have \" [Matched]\" appended -\(whether complete or not), or \" \[No matches]\", if no eligible +The displays for unambiguous matches have ` [Matched]' appended +\(whether complete or not), or ` \[No matches]', if no eligible matches exist." (let ((comps (all-completions name candidates predicate)) @@ -264,64 +260,53 @@ (open-bracket-prospects "{") (close-bracket-prospects "}") ) - (catch 'input - (cond ((null comps) (format " %sNo matches%s" - open-bracket-determined + (cond ((null comps) (format " %sNo matches%s" + open-bracket-determined + close-bracket-determined)) + ((null (cdr comps)) ;one match + (concat (if (and (> (length (car comps)) + (length name))) + (concat open-bracket-determined + (substring (car comps) (length name)) + close-bracket-determined) + "") + " [Matched]" + ;; XEmacs + (if (and icomplete-show-key-bindings + (commandp (car comps))) + (icomplete-get-keys (car comps)) + "") + )) + (t ;multiple matches + (let* ((most (try-completion name candidates predicate)) + (most-len (length most)) + most-is-exact + (alternatives + (apply + (function concat) + (cdr (apply + (function nconc) + (mapcar '(lambda (com) + (if (= (length com) most-len) + ;; Most is one exact match, + ;; note that and leave out + ;; for later indication: + (progn + (setq most-is-exact t) + ()) + (list "," + (substring com + most-len)))) + comps)))))) + (concat (and (> most-len (length name)) + (concat open-bracket-determined + (substring most (length name)) close-bracket-determined)) - ((null (cdr comps)) ;one match - (concat (if (and (> (length (car comps)) - (length name))) - (concat open-bracket-determined - (substring (car comps) (length name)) - close-bracket-determined) - "") - " [Matched]")) - (t ;multiple matches - (let* ((most - (try-completion name candidates - (and predicate - ;; Wrap predicate in impatience - ie, - ;; `throw' up when pending input is - ;; noticed. Adds some overhead to - ;; predicate, but should be worth it. - (function - (lambda (item) - (if (input-pending-p) - (throw 'input "") - (apply predicate - item nil))))))) - (most-len (length most)) - most-is-exact - (alternatives - (substring - (apply (function concat) - (mapcar (function - (lambda (com) - (if (input-pending-p) - (throw 'input "")) - (if (= (length com) most-len) - ;; Most is one exact match, - ;; note that and leave out - ;; for later indication: - (progn - (setq most-is-exact t) - ()) - (concat "," - (substring com - most-len))))) - comps)) - 1))) - (concat (and (> most-len (length name)) - (concat open-bracket-determined - (substring most (length name)) - close-bracket-determined)) - open-bracket-prospects - (if most-is-exact - ;; Add a ',' at the front to indicate "complete but - ;; not unique": - (concat "," alternatives) - alternatives) - close-bracket-prospects))))))) + open-bracket-prospects + (if most-is-exact + (concat "," alternatives) + alternatives) + close-bracket-prospects)))))) ;;;_ + Initialization ;;; If user hasn't setq-default icomplete-mode to nil, then setup for
--- a/lisp/packages/info.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/info.el Mon Aug 13 08:46:35 2007 +0200 @@ -1824,7 +1824,10 @@ (if Info-standalone (save-buffers-kill-emacs) (switch-to-buffer (prog1 (other-buffer (current-buffer)) - (bury-buffer (current-buffer)))))) + (bury-buffer (current-buffer)) + (if (featurep 'toolbar) + (if (frame-live-p toolbar-info-frame) + (delete-frame toolbar-info-frame))))))) (defun Info-undefined () "Make command be undefined in Info."
--- a/lisp/packages/informat.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/informat.el Mon Aug 13 08:46:35 2007 +0200 @@ -19,9 +19,10 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Code:
--- a/lisp/packages/ispell.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/ispell.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,319 +1,318 @@ -;;;;;;;;;;;;;;;;;;;;;;;;;;; -*- Mode: emacs-lisp -*- ;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; GNU EMACS interface for International Ispell Version 3.1 by Geoff Kuenning. -;;; -;;; -;;; Copyright (C) 1994, 1995 Free Software Foundation, Inc. -;;; -;;; -;;; Authors : Ken Stevens <k.stevens@ieee.org> -;;; Last Modified On: Tue Jun 13 12:05:28 EDT 1995 -;;; Update Revision : 2.37 -;;; Syntax : emacs-lisp -;;; Status : Release with 3.1.12+ ispell. -;;; Version : International Ispell Version 3.1 by Geoff Kuenning. -;;; Bug Reports : ispell-el-bugs@itcorp.com -;;; -;;; Note: version numbers and time stamp are not updated -;;; when this file is edited for release with GNU emacs. -;;; -;;; 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, 675 Mass Ave, Cambridge, MA 02139, USA. -;;; +;;; ispell.el --- spell checking using Ispell + +;; Copyright (C) 1994, 1995 Free Software Foundation, Inc. + +;; Authors : Ken Stevens <k.stevens@ieee.org> +;; Last Modified On: Tue Jun 13 12:05:28 EDT 1995 +;; Update Revision : 2.37 +;; Syntax : emacs-lisp +;; Status : Release with 3.1.12+ ispell. +;; Version : International Ispell Version 3.1 by Geoff Kuenning. +;; Bug Reports : ispell-el-bugs@itcorp.com + +;; Note: version numbers and time stamp are not updated +;; when this file is edited for release with GNU emacs. + +;; This file is part of XEmacs. + +;; XEmacs 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. + +;; XEmacs 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 XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. + ;;; Commentary: -;;; -;;; INSTRUCTIONS -;;; -;;; This code contains a section of user-settable variables that you should -;;; inspect prior to installation. Look past the end of the history list. -;;; Set them up for your locale and the preferences of the majority of the -;;; users. Otherwise the users may need to set a number of variables -;;; themselves. -;;; You particularly may want to change the default dictionary for your -;;; country and language. -;;; -;;; -;;; To fully install this, add this file to your Emacs Lisp directory and -;;; compile it with M-X byte-compile-file. Then add the following to the -;;; appropriate init file: -;;; -;;; (autoload 'ispell-word "ispell" -;;; "Check the spelling of word in buffer." t) -;;; (global-set-key "\e$" 'ispell-word) -;;; (autoload 'ispell-region "ispell" -;;; "Check the spelling of region." t) -;;; (autoload 'ispell-buffer "ispell" -;;; "Check the spelling of buffer." t) -;;; (autoload 'ispell-complete-word "ispell" -;;; "Look up current word in dictionary and try to complete it." t) -;;; (autoload 'ispell-change-dictionary "ispell" -;;; "Change ispell dictionary." t) -;;; (autoload 'ispell-message "ispell" -;;; "Check spelling of mail message or news post.") -;;; -;;; Depending on the mail system you use, you may want to include these: -;;; -;;; (add-hook 'news-inews-hook 'ispell-message) -;;; (add-hook 'mail-send-hook 'ispell-message) -;;; (add-hook 'mh-before-send-letter-hook 'ispell-message) -;;; -;;; -;;; Ispell has a TeX parser and a nroff parser (the default). -;;; The parsing is controlled by the variable ispell-parser. Currently -;;; it is just a "toggle" between TeX and nroff, but if more parsers are -;;; added it will be updated. See the variable description for more info. -;;; -;;; -;;; TABLE OF CONTENTS -;;; -;;; ispell-word -;;; ispell-region -;;; ispell-buffer -;;; ispell-message -;;; ispell-continue -;;; ispell-complete-word -;;; ispell-complete-word-interior-frag -;;; ispell-change-dictionary -;;; ispell-kill-ispell -;;; ispell-pdict-save -;;; -;;; -;;; Commands in ispell-region: -;;; Character replacement: Replace word with choice. May query-replace. -;;; ' ': Accept word this time. -;;; 'i': Accept word and insert into private dictionary. -;;; 'a': Accept word for this session. -;;; 'A': Accept word and place in buffer-local dictionary. -;;; 'r': Replace word with typed-in value. Rechecked. -;;; 'R': Replace word with typed-in value. Query-replaced in buffer. Rechecked. -;;; '?': Show these commands -;;; 'x': Exit spelling buffer. Move cursor to original point. -;;; 'X': Exit spelling buffer. Leave cursor at the current point. -;;; 'q': Quit spelling session (Kills ispell process). -;;; 'l': Look up typed-in replacement in alternate dictionary. Wildcards okay. -;;; 'u': Like 'i', but the word is lower-cased first. -;;; 'm': Like 'i', but allows one to include dictionary completion info. -;;; 'C-l': redraws screen -;;; 'C-r': recursive edit -;;; 'C-z': suspend emacs or iconify frame -;;; -;;; Buffer-Local features: -;;; There are a number of buffer-local features that can be used to customize -;;; ispell for the current buffer. This includes language dictionaries, -;;; personal dictionaries, parsing, and local word spellings. Each of these -;;; local customizations are done either through local variables, or by -;;; including the keyword and argument(s) at the end of the buffer (usually -;;; prefixed by the comment characters). See the end of this file for -;;; examples. The local keywords and variables are: -;;; -;;; ispell-dictionary-keyword language-dictionary -;;; uses local variable ispell-local-dictionary -;;; ispell-pdict-keyword personal-dictionary -;;; uses local variable ispell-local-pdict -;;; ispell-parsing-keyword mode-arg extended-char-arg -;;; ispell-words-keyword any number of local word spellings -;;; -;;; -;;; BUGS: -;;; Highlighting in version 19 still doesn't work on tty's. -;;; On some versions of emacs, growing the minibuffer fails. -;;; -;;; HISTORY -;;; -;;; Revision 2.37 1995/6/13 12:05:28 stevens -;;; Removed autoload from ispell-dictionary-alist. *choices* mode-line shows -;;; misspelled word. Block skip for pgp & forwarded messages added. -;;; -;;; Revision 2.36 1995/2/6 17:39:38 stevens -;;; Properly adjust screen with different ispell-choices-win-default-height -;;; settings. Skips SGML entity references. -;;; -;;; Revision 2.35 1995/1/13 14:16:46 stevens -;;; Skips SGML tags, ispell-change-dictionary fix for add-hook, assure personal -;;; dictionary is saved when called from the menu -;;; -;;; Revision 2.34 1994/12/08 13:17:41 stevens -;;; Interaction corrected to function with all 3.1 ispell versions. -;;; -;;; Revision 2.33 1994/11/24 02:31:20 stevens -;;; Repaired bug introduced in 2.32 that corrupts buffers when correcting. -;;; Improved buffer scrolling. Nondestructive buffer selections allowed. -;;; -;;; Revision 2.32 1994/10/31 21:10:08 geoff -;;; Many revisions accepted from RMS/FSF. I think (though I don't know) that -;;; this represents an 'official' version. -;;; -;;; Revision 2.31 1994/5/31 10:18:17 stevens -;;; Repaired comments. buffer-local commands executed in `ispell-word' now. -;;; German dictionary described for extended character mode. Dict messages. -;;; -;;; Revision 2.30 1994/5/20 22:18:36 stevens -;;; Continue ispell from ispell-word, C-z functionality fixed. -;;; -;;; Revision 2.29 1994/5/12 09:44:33 stevens -;;; Restored ispell-use-ptys-p, ispell-message aborts sends with interrupt. -;;; defined fn ispell -;;; -;;; Revision 2.28 1994/4/28 16:24:40 stevens -;;; Window checking when ispell-message put on gnus-inews-article-hook jwz. -;;; prefixed ispell- to highlight functions and horiz-scroll fn. -;;; Try and respect case of word in ispell-complete-word. -;;; Ignore non-char events. Ispell-use-ptys-p commented out. Lucid menu. -;;; Better interrupt handling. ispell-message improvements from Ethan. -;;; -;;; Revision 2.27 -;;; version 18 explicit C-g handling disabled as it didn't work. Added -;;; ispell-extra-args for ispell customization (jwz) -;;; -;;; Revision 2.26 1994/2/15 16:11:14 stevens -;;; name changes for copyright assignment. Added word-frags in complete-word. -;;; Horizontal scroll (John Conover). Query-replace matches words now. bugs. -;;; -;;; Revision 2.25 -;;; minor mods, upgraded ispell-message -;;; -;;; Revision 2.24 -;;; query-replace more robust, messages, defaults, ispell-change-dict. -;;; -;;; Revision 2.23 1993/11/22 23:47:03 stevens -;;; ispell-message, Fixed highlighting, added menu-bar, fixed ispell-help, ... -;;; -;;; Revision 2.22 -;;; Added 'u' command. Fixed default in ispell-local-dictionary. -;;; fixed affix rules display. Tib skipping more robust. Contributions by -;;; Per Abraham (parser selection), Denis Howe, and Eberhard Mattes. -;;; -;;; Revision 2.21 1993/06/30 14:09:04 stevens -;;; minor bugs. (nroff word skipping fixed) -;;; -;;; Revision 2.20 1993/06/30 14:09:04 stevens -;;; -;;; Debugging and contributions by: Boris Aronov, Rik Faith, Chris Moore, -;;; Kevin Rodgers, Malcolm Davis. -;;; Particular thanks to Michael Lipp, Jamie Zawinski, Phil Queinnec -;;; and John Heidemann for suggestions and code. -;;; Major update including many tweaks. -;;; Many changes were integrations of suggestions. -;;; lookup-words rehacked to use call-process (Jamie). -;;; ispell-complete-word rehacked to be compatible with the rest of the -;;; system for word searching and to include multiple wildcards, -;;; and it's own dictionary. -;;; query-replace capability added. New options 'X', 'R', and 'A'. -;;; buffer-local modes for dictionary, word-spelling, and formatter-parsing. -;;; Many random bugs, like commented comments being skipped, fix to -;;; keep-choices-win, fix for math mode, added pipe mode choice, -;;; fixed 'q' command, ispell-word checks previous word and leave cursor -;;; in same location. Fixed tib code which could drop spelling regions. -;;; Cleaned up setq calls for efficiency. Gave more context on window overlays. -;;; Assure context on ispell-command-loop. Window lossage in look cmd fixed. -;;; Due to pervasive opinion, common-lisp package syntax removed. Display -;;; problem when not highlighting. -;;; -;;; Revision 2.19 1992/01/10 10:54:08 geoff -;;; Make another attempt at fixing the "Bogus, dude" problem. This one is -;;; less elegant, but has the advantage of working. -;;; -;;; Revision 2.18 1992/01/07 10:04:52 geoff -;;; Fix the "Bogus, Dude" problem in ispell-word. -;;; -;;; Revision 2.17 1991/09/12 00:01:42 geoff -;;; Add some changes to make ispell-complete-word work better, though -;;; still not perfectly. -;;; -;;; Revision 2.16 91/09/04 18:00:52 geoff -;;; More updates from Sebastian, to make the multiple-dictionary support -;;; more flexible. -;;; -;;; Revision 2.15 91/09/04 17:30:02 geoff -;;; Sebastian Kremer's tib support -;;; -;;; Revision 2.14 91/09/04 16:19:37 geoff -;;; Don't do set-window-start if the move-to-window-line moved us -;;; downward, rather than upward. This prevents getting the buffer all -;;; confused. Also, don't use the "not-modified" function to clear the -;;; modification flag; instead use set-buffer-modified-p. This prevents -;;; extra messages from flashing. -;;; -;;; Revision 2.13 91/09/04 14:35:41 geoff -;;; Fix a spelling error in a comment. Add code to handshake with the -;;; ispell process before sending anything to it. -;;; -;;; Revision 2.12 91/09/03 20:14:21 geoff -;;; Add Sebastian Kremer's multiple-language support. -;;; -;;; -;;; Walt Buehring -;;; Texas Instruments - Computer Science Center -;;; ARPA: Buehring%TI-CSL@CSNet-Relay -;;; UUCP: {smu, texsun, im4u, rice} ! ti-csl ! buehring -;;; -;;; ispell-region and associated routines added by -;;; Perry Smith -;;; pedz@bobkat -;;; Tue Jan 13 20:18:02 CST 1987 -;;; -;;; extensively modified by Mark Davies and Andrew Vignaux -;;; {mark,andrew}@vuwcomp -;;; Sun May 10 11:45:04 NZST 1987 -;;; -;;; Ken Stevens ARPA: k.stevens@ieee.org -;;; Tue Jan 3 16:59:07 PST 1989 -;;; This file has overgone a major overhaul to be compatible with ispell -;;; version 2.1. Most of the functions have been totally rewritten, and -;;; many user-accessible variables have been added. The syntax table has -;;; been removed since it didn't work properly anyway, and a filter is -;;; used rather than a buffer. Regular expressions are used based on -;;; ispell's internal definition of characters (see ispell(4)). -;;; Some new updates: -;;; - Updated to version 3.0 to include terse processing. -;;; - Added a variable for the look command. -;;; - Fixed a bug in ispell-word when cursor is far away from the word -;;; that is to be checked. -;;; - Ispell places the incorrect word or guess in the minibuffer now. -;;; - fixed a bug with 'l' option when multiple windows are on the screen. -;;; - lookup-words just didn't work with the process filter. Fixed. -;;; - Rewrote the process filter to make it cleaner and more robust -;;; in the event of a continued line not being completed. -;;; - Made ispell-init-process more robust in handling errors. -;;; - Fixed bug in continuation location after a region has been modified by -;;; correcting a misspelling. -;;; Mon 17 Sept 1990 -;;; -;;; Sebastian Kremer <sk@thp.uni-koeln.de> -;;; Wed Aug 7 14:02:17 MET DST 1991 -;;; - Ported ispell-complete-word from Ispell 2 to Ispell 3. -;;; - Added ispell-kill-ispell command. -;;; - Added ispell-dictionary and ispell-dictionary-alist variables to -;;; support other than default language. See their docstrings and -;;; command ispell-change-dictionary. -;;; - (ispelled it :-) -;;; - Added ispell-skip-tib variable to support the tib bibliography -;;; program. -;;; -;;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;; INSTRUCTIONS +;; +;; This code contains a section of user-settable variables that you should +;; inspect prior to installation. Look past the end of the history list. +;; Set them up for your locale and the preferences of the majority of the +;; users. Otherwise the users may need to set a number of variables +;; themselves. +;; You particularly may want to change the default dictionary for your +;; country and language. +;; +;; +;; To fully install this, add this file to your Emacs Lisp directory and +;; compile it with M-X byte-compile-file. Then add the following to the +;; appropriate init file: +;; +;; (autoload 'ispell-word "ispell" +;; "Check the spelling of word in buffer." t) +;; (global-set-key "\e$" 'ispell-word) +;; (autoload 'ispell-region "ispell" +;; "Check the spelling of region." t) +;; (autoload 'ispell-buffer "ispell" +;; "Check the spelling of buffer." t) +;; (autoload 'ispell-complete-word "ispell" +;; "Look up current word in dictionary and try to complete it." t) +;; (autoload 'ispell-change-dictionary "ispell" +;; "Change ispell dictionary." t) +;; (autoload 'ispell-message "ispell" +;; "Check spelling of mail message or news post.") +;; +;; Depending on the mail system you use, you may want to include these: +;; +;; (add-hook 'news-inews-hook 'ispell-message) +;; (add-hook 'mail-send-hook 'ispell-message) +;; (add-hook 'mh-before-send-letter-hook 'ispell-message) +;; +;; +;; Ispell has a TeX parser and a nroff parser (the default). +;; The parsing is controlled by the variable ispell-parser. Currently +;; it is just a "toggle" between TeX and nroff, but if more parsers are +;; added it will be updated. See the variable description for more info. +;; +;; +;; TABLE OF CONTENTS +;; +;; ispell-word +;; ispell-region +;; ispell-buffer +;; ispell-message +;; ispell-continue +;; ispell-complete-word +;; ispell-complete-word-interior-frag +;; ispell-change-dictionary +;; ispell-kill-ispell +;; ispell-pdict-save +;; +;; +;; Commands in ispell-region: +;; Character replacement: Replace word with choice. May query-replace. +;; ' ': Accept word this time. +;; 'i': Accept word and insert into private dictionary. +;; 'a': Accept word for this session. +;; 'A': Accept word and place in buffer-local dictionary. +;; 'r': Replace word with typed-in value. Rechecked. +;; 'R': Replace word with typed-in value. Query-replaced in buffer. Rechecked. +;; '?': Show these commands +;; 'x': Exit spelling buffer. Move cursor to original point. +;; 'X': Exit spelling buffer. Leave cursor at the current point. +;; 'q': Quit spelling session (Kills ispell process). +;; 'l': Look up typed-in replacement in alternate dictionary. Wildcards okay. +;; 'u': Like 'i', but the word is lower-cased first. +;; 'm': Like 'i', but allows one to include dictionary completion info. +;; 'C-l': redraws screen +;; 'C-r': recursive edit +;; 'C-z': suspend emacs or iconify frame +;; +;; Buffer-Local features: +;; There are a number of buffer-local features that can be used to customize +;; ispell for the current buffer. This includes language dictionaries, +;; personal dictionaries, parsing, and local word spellings. Each of these +;; local customizations are done either through local variables, or by +;; including the keyword and argument(s) at the end of the buffer (usually +;; prefixed by the comment characters). See the end of this file for +;; examples. The local keywords and variables are: +;; +;; ispell-dictionary-keyword language-dictionary +;; uses local variable ispell-local-dictionary +;; ispell-pdict-keyword personal-dictionary +;; uses local variable ispell-local-pdict +;; ispell-parsing-keyword mode-arg extended-char-arg +;; ispell-words-keyword any number of local word spellings +;; +;; +;; BUGS: +;; Highlighting in version 19 still doesn't work on tty's. +;; On some versions of emacs, growing the minibuffer fails. +;; +;; HISTORY +;; +;; Revision 2.38 1996/5/30 ethanb@phys.washington.edu +;; Update ispell-message for gnus 5 (news-inews-hook => message-send-hook; +;; different header for quoted message). +;; +;; Revision 2.37 1995/6/13 12:05:28 stevens +;; Removed autoload from ispell-dictionary-alist. *choices* mode-line shows +;; misspelled word. Block skip for pgp & forwarded messages added. +;; RMS: the autoload changes had problems and I removed them. +;; +;; Revision 2.36 1995/2/6 17:39:38 stevens +;; Properly adjust screen with different ispell-choices-win-default-height +;; settings. Skips SGML entity references. +;; +;; Revision 2.35 1995/1/13 14:16:46 stevens +;; Skips SGML tags, ispell-change-dictionary fix for add-hook, assure personal +;; dictionary is saved when called from the menu +;; +;; Revision 2.34 1994/12/08 13:17:41 stevens +;; Interaction corrected to function with all 3.1 ispell versions. +;; +;; Revision 2.33 1994/11/24 02:31:20 stevens +;; Repaired bug introduced in 2.32 that corrupts buffers when correcting. +;; Improved buffer scrolling. Nondestructive buffer selections allowed. +;; +;; Revision 2.32 1994/10/31 21:10:08 geoff +;; Many revisions accepted from RMS/FSF. I think (though I don't know) that +;; this represents an 'official' version. +;; +;; Revision 2.31 1994/5/31 10:18:17 stevens +;; Repaired comments. buffer-local commands executed in `ispell-word' now. +;; German dictionary described for extended character mode. Dict messages. +;; +;; Revision 2.30 1994/5/20 22:18:36 stevens +;; Continue ispell from ispell-word, C-z functionality fixed. +;; +;; Revision 2.29 1994/5/12 09:44:33 stevens +;; Restored ispell-use-ptys-p, ispell-message aborts sends with interrupt. +;; defined fn ispell +;; +;; Revision 2.28 1994/4/28 16:24:40 stevens +;; Window checking when ispell-message put on gnus-inews-article-hook jwz. +;; prefixed ispell- to highlight functions and horiz-scroll fn. +;; Try and respect case of word in ispell-complete-word. +;; Ignore non-char events. Ispell-use-ptys-p commented out. Lucid menu. +;; Better interrupt handling. ispell-message improvements from Ethan. +;; +;; Revision 2.27 +;; version 18 explicit C-g handling disabled as it didn't work. Added +;; ispell-extra-args for ispell customization (jwz) +;; +;; Revision 2.26 1994/2/15 16:11:14 stevens +;; name changes for copyright assignment. Added word-frags in complete-word. +;; Horizontal scroll (John Conover). Query-replace matches words now. bugs. +;; +;; Revision 2.25 +;; minor mods, upgraded ispell-message +;; +;; Revision 2.24 +;; query-replace more robust, messages, defaults, ispell-change-dict. +;; +;; Revision 2.23 1993/11/22 23:47:03 stevens +;; ispell-message, Fixed highlighting, added menu-bar, fixed ispell-help, ... +;; +;; Revision 2.22 +;; Added 'u' command. Fixed default in ispell-local-dictionary. +;; fixed affix rules display. Tib skipping more robust. Contributions by +;; Per Abraham (parser selection), Denis Howe, and Eberhard Mattes. +;; +;; Revision 2.21 1993/06/30 14:09:04 stevens +;; minor bugs. (nroff word skipping fixed) +;; +;; Revision 2.20 1993/06/30 14:09:04 stevens +;; +;; Debugging and contributions by: Boris Aronov, Rik Faith, Chris Moore, +;; Kevin Rodgers, Malcolm Davis. +;; Particular thanks to Michael Lipp, Jamie Zawinski, Phil Queinnec +;; and John Heidemann for suggestions and code. +;; Major update including many tweaks. +;; Many changes were integrations of suggestions. +;; lookup-words rehacked to use call-process (Jamie). +;; ispell-complete-word rehacked to be compatible with the rest of the +;; system for word searching and to include multiple wildcards, +;; and it's own dictionary. +;; query-replace capability added. New options 'X', 'R', and 'A'. +;; buffer-local modes for dictionary, word-spelling, and formatter-parsing. +;; Many random bugs, like commented comments being skipped, fix to +;; keep-choices-win, fix for math mode, added pipe mode choice, +;; fixed 'q' command, ispell-word checks previous word and leave cursor +;; in same location. Fixed tib code which could drop spelling regions. +;; Cleaned up setq calls for efficiency. Gave more context on window overlays. +;; Assure context on ispell-command-loop. Window lossage in look cmd fixed. +;; Due to pervasive opinion, common-lisp package syntax removed. Display +;; problem when not highlighting. +;; +;; Revision 2.19 1992/01/10 10:54:08 geoff +;; Make another attempt at fixing the "Bogus, dude" problem. This one is +;; less elegant, but has the advantage of working. +;; +;; Revision 2.18 1992/01/07 10:04:52 geoff +;; Fix the "Bogus, Dude" problem in ispell-word. +;; +;; Revision 2.17 1991/09/12 00:01:42 geoff +;; Add some changes to make ispell-complete-word work better, though +;; still not perfectly. +;; +;; Revision 2.16 91/09/04 18:00:52 geoff +;; More updates from Sebastian, to make the multiple-dictionary support +;; more flexible. +;; +;; Revision 2.15 91/09/04 17:30:02 geoff +;; Sebastian Kremer's tib support +;; +;; Revision 2.14 91/09/04 16:19:37 geoff +;; Don't do set-window-start if the move-to-window-line moved us +;; downward, rather than upward. This prevents getting the buffer all +;; confused. Also, don't use the "not-modified" function to clear the +;; modification flag; instead use set-buffer-modified-p. This prevents +;; extra messages from flashing. +;; +;; Revision 2.13 91/09/04 14:35:41 geoff +;; Fix a spelling error in a comment. Add code to handshake with the +;; ispell process before sending anything to it. +;; +;; Revision 2.12 91/09/03 20:14:21 geoff +;; Add Sebastian Kremer's multiple-language support. +;; +;; +;; Walt Buehring +;; Texas Instruments - Computer Science Center +;; ARPA: Buehring%TI-CSL@CSNet-Relay +;; UUCP: {smu, texsun, im4u, rice} ! ti-csl ! buehring +;; +;; ispell-region and associated routines added by +;; Perry Smith +;; pedz@bobkat +;; Tue Jan 13 20:18:02 CST 1987 +;; +;; extensively modified by Mark Davies and Andrew Vignaux +;; {mark,andrew}@vuwcomp +;; Sun May 10 11:45:04 NZST 1987 +;; +;; Ken Stevens ARPA: k.stevens@ieee.org +;; Tue Jan 3 16:59:07 PST 1989 +;; This file has overgone a major overhaul to be compatible with ispell +;; version 2.1. Most of the functions have been totally rewritten, and +;; many user-accessible variables have been added. The syntax table has +;; been removed since it didn't work properly anyway, and a filter is +;; used rather than a buffer. Regular expressions are used based on +;; ispell's internal definition of characters (see ispell(4)). +;; Some new updates: +;; - Updated to version 3.0 to include terse processing. +;; - Added a variable for the look command. +;; - Fixed a bug in ispell-word when cursor is far away from the word +;; that is to be checked. +;; - Ispell places the incorrect word or guess in the minibuffer now. +;; - fixed a bug with 'l' option when multiple windows are on the screen. +;; - lookup-words just didn't work with the process filter. Fixed. +;; - Rewrote the process filter to make it cleaner and more robust +;; in the event of a continued line not being completed. +;; - Made ispell-init-process more robust in handling errors. +;; - Fixed bug in continuation location after a region has been modified by +;; correcting a misspelling. +;; Mon 17 Sept 1990 +;; +;; Sebastian Kremer <sk@thp.uni-koeln.de> +;; Wed Aug 7 14:02:17 MET DST 1991 +;; - Ported ispell-complete-word from Ispell 2 to Ispell 3. +;; - Added ispell-kill-ispell command. +;; - Added ispell-dictionary and ispell-dictionary-alist variables to +;; support other than default language. See their docstrings and +;; command ispell-change-dictionary. +;; - (ispelled it :-) +;; - Added ispell-skip-tib variable to support the tib bibliography +;; program. +;; ********************************************************************** +;; The following variables should be set according to personal preference +;; and location of binaries: +;; ********************************************************************** -;;; ********************************************************************** -;;; The following variables should be set according to personal preference -;;; and location of binaries: -;;; ********************************************************************** +;; ******* THIS FILE IS WRITTEN FOR ISPELL VERSION 3.1 - -;;; ******* THIS FILE IS WRITTEN FOR ISPELL VERSION 3.1 ;;; Code: (defvar ispell-highlight-p t @@ -327,8 +326,8 @@ It's most convenient if the cursor color and highlight color are slightly different.") -(defvar ispell-check-comments nil - "*Spelling of comments checked when non-nil.") +(defvar ispell-check-comments t + "*If nil, don't check spelling of comments.") (defvar ispell-query-replace-choices nil "*Corrections made throughout region when non-nil. @@ -414,7 +413,6 @@ "*Formatting function for displaying word being spell checked. The function must take one string argument and return a string.") -;; XEmacs change - ispell-local-pdict depends on this ;;;###autoload (defvar ispell-personal-dictionary nil "*File name of your personal spelling dictionary, or nil. @@ -442,6 +440,10 @@ words as correct. See also `ispell-dictionary-alist', which may be used for language-specific arguments.") +;;; The preparation of the menu bar menu must be autoloaded +;;; because otherwise this file gets autoloaded every time Emacs starts +;;; so that it can set up the menus and determine keyboard equivalents. + ;;;###autoload (defvar ispell-dictionary-alist-1 ; sk 9-Aug-1991 18:28 '((nil ; default (english.aff) @@ -535,25 +537,24 @@ contain the same character set as casechars and otherchars in the language.aff file \(e.g., english.aff\).") - ;;;###autoload (defvar ispell-menu-map nil "Key map for ispell menu") ;;;###autoload -(defvar ispell-menu-lucid nil "Spelling menu for Lucid Emacs.") +(defvar ispell-menu-xemacs nil "Spelling menu for XEmacs.") -;;; Break out lucid menu and split into several calls to avoid having +;;; Break out XEmacs menu and split into several calls to avoid having ;;; long lines in loaddefs.el. Detect need off following constant. ;;;###autoload -(defconst ispell-menu-map-needed ; make sure this is not Lucid Emacs +(defconst ispell-menu-map-needed ; make sure this is not XEmacs (and (not ispell-menu-map) (string-lessp "19" emacs-version) ;; make sure this isn't XEmacs (not (string-match "XEmacs" emacs-version)))) -;;; setup dictionary +;;; Set up dictionary ;;;###autoload (if ispell-menu-map-needed (let ((dicts (reverse (cons (cons "default" nil) ispell-dictionary-alist))) @@ -637,11 +638,11 @@ (vector (concat "Select " (capitalize name)) (list 'ispell-change-dictionary name) t)))))) - (setq ispell-menu-lucid menu) + (setq ispell-menu-xemacs menu) (if current-menubar (progn (delete-menu-item '("Edit" "Spell")) ; in case already defined - (add-menu '("Edit") "Spell" ispell-menu-lucid))))) + (add-menu '("Edit") "Spell" ispell-menu-xemacs))))) ;;; ********************************************************************** @@ -1111,7 +1112,7 @@ ;; Quit and preserve point. ((= char ?X) (ispell-pdict-save ispell-silently-savep) - (message + (message "%s" (substitute-command-keys (concat "Spell-checking suspended;" " use C-u \\[ispell-word] to resume"))) @@ -1264,6 +1265,9 @@ (if (string-lessp "19" emacs-version) (message nil)) (enlarge-window 2) + ;; Make sure we display the minibuffer + ;; in this window, not some other. + (set-minibuffer-window (selected-window)) (insert (concat help-1 "\n" help-2 "\n" help-3)))) (sit-for 5) (erase-buffer))))) @@ -1331,7 +1335,7 @@ ;;; multiple lines. ;;; "ispell-filter-continue" is true when we have received only part of a ;;; line as output from a generating function ("output" did not end with \n) -;;; NOTE THAT THIS FUNCTION WILL FAIL IF THE PROCESS OUTPUT DOESNT END WITH \n! +;;; THIS FUNCTION WILL FAIL IF THE PROCESS OUTPUT DOESN'T END WITH \n! ;;; This is the case when a process dies or fails. The default behavior ;;; in this case treats the next input received as fresh input. @@ -1709,7 +1713,7 @@ (re-search-forward ispell-tib-ref-beginning end t) (setq ref-type 'tib)) (and ispell-skip-sgml - (search-forward "[<&]" end t) + (re-search-forward "[<&]" end t) (setq ref-type 'sgml))) (if (or (and (eq 'tib ref-type) ; tib tag is 2 chars. (= (- (point) 2) start)) @@ -1723,7 +1727,7 @@ (not (re-search-forward ispell-tib-ref-end reg-end t))) (and (eq 'sgml ref-type) - (not (search-forward "[>;]" reg-end t)))) + (not (re-search-forward "[>;]" reg-end t)))) (progn (ispell-pdict-save ispell-silently-savep) (ding) @@ -1790,6 +1794,8 @@ (concat "Ispell misalignment: word " "`%s' point %d; please retry") (car poss) word-start)) + (if (not (pos-visible-in-window-p)) + (sit-for 0)) (if ispell-keep-choices-win (setq replace (ispell-command-loop @@ -1865,10 +1871,8 @@ offset-change (+ offset-change change) end (+ end change))))) (if (not ispell-quit) - (message - (concat "Continuing spelling check using " - (or ispell-dictionary "default") - " dictionary..."))) + (message "Continuing spelling check using %s dictionary..." + (or ispell-dictionary "default"))) (sit-for 0))) ;; finished with line! (setq ispell-filter (cdr ispell-filter))))) @@ -2059,8 +2063,11 @@ "^#! /bin/[ck]?sh" ;; Matches context difference listing "\\(diff -c .*\\)?\n\\*\\*\\* .*\n--- .*\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*" + ;; Matches reporter.el bug report + "^current state:\n==============\n" ;; Matches "----------------- cut here" - "^[-=_]+\\s ?cut here") + ;; and "------- Start of forwarded message" + "^[-=_]+\\s ?\\(cut here\\|Start of forwarded message\\)") "\\|") "*End of text which will be checked in ispell-message. If it is a string, limit at first occurrence of that regular expression. @@ -2099,13 +2106,13 @@ Don't check spelling of message headers except the Subject field. Don't check included messages. -To abort spell checking of a message REGION and send the message anyway, +To abort spell checking of a message region and send the message anyway, use the `x' or `q' command. (Any subsequent regions will be checked.) The `X' command aborts the message send so that you can edit the buffer. To spell-check whenever a message is sent, include the appropriate lines in your .emacs file: - (add-hook 'news-inews-hook 'ispell-message) + (add-hook 'message-send-hook 'ispell-message) (add-hook 'mail-send-hook 'ispell-message) (add-hook 'mh-before-send-letter-hook 'ispell-message) @@ -2137,11 +2144,16 @@ ((featurep 'sc) ; sc 2.3 (concat "\\(" sc-cite-regexp "\\)" "\\|" (ispell-non-empty-string sc-reference-tag-string))) - ((equal major-mode 'news-reply-mode) ;GNUS + ((equal major-mode 'news-reply-mode) ;GNUS 4 & below (concat "In article <" "\\|" (if mail-yank-prefix (ispell-non-empty-string mail-yank-prefix) "^ \\|^\t"))) + ((equal major-mode 'message-mode) ;GNUS 5 + (concat ".*@.* writes:$" "\\|" + (if mail-yank-prefix + (ispell-non-empty-string mail-yank-prefix) + "^ \\|^\t"))) ((equal major-mode 'mh-letter-mode) ; mh mail message (ispell-non-empty-string mh-ins-buf-prefix)) ((not internal-messagep) ; Assume n sent us this message. @@ -2202,7 +2214,7 @@ (point)))) (end (or (and end-c end-fwd (min end-c end-fwd)) end-c end-fwd - ;; defalut to limit of text. + ;; default to limit of text. (marker-position limit)))) (goto-char start) (ispell-region start end) @@ -2404,4 +2416,3 @@ ; LocalWords: regexps ispell-tib-ref-beginning ispell-tib-ref-end ;; ispell.el ends here -
--- a/lisp/packages/jka-compr.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/jka-compr.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,86 +1,103 @@ -;;; jka-compr.el - reading/writing/loading compressed files. -;;; Copyright (C) 1993, 1994 Free Software Foundation, Inc. +;;; jka-compr.el --- reading/writing/loading compressed files + +;; Copyright (C) 1993, 1994 Free Software Foundation, Inc. ;; Author: jka@ece.cmu.edu (Jay K. Adams) ;; Keywords: data -;;; Synched up with: Very close to the version supplied with -;;; FSF 19.29 but not quite synched. +;; This file is part of XEmacs. + +;; XEmacs 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. + +;; XEmacs 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 XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. + +;; Synched up with: FSF 19.34 ;;; Commentary: -;;; This package implements low-level support for reading, writing, -;;; and loading compressed files. It hooks into the low-level file -;;; I/O functions (including write-region and insert-file-contents) so -;;; that they automatically compress or uncompress a file if the file -;;; appears to need it (based on the extension of the file name). -;;; Packages like Rmail, VM, GNUS, and Info should be able to work -;;; with compressed files without modification. +;; This package implements low-level support for reading, writing, +;; and loading compressed files. It hooks into the low-level file +;; I/O functions (including write-region and insert-file-contents) so +;; that they automatically compress or uncompress a file if the file +;; appears to need it (based on the extension of the file name). +;; Packages like Rmail, VM, GNUS, and Info should be able to work +;; with compressed files without modification. -;;; INSTRUCTIONS: -;;; -;;; To use jka-compr, simply load this package, and edit as usual. -;;; Its operation should be transparent to the user (except for -;;; messages appearing when a file is being compressed or -;;; uncompressed). -;;; -;;; The variable, jka-compr-compression-info-list can be used to -;;; customize jka-compr to work with other compression programs. -;;; The default value of this variable allows jka-compr to work with -;;; Unix compress and gzip. -;;; -;;; If you are concerned about the stderr output of gzip and other -;;; compression/decompression programs showing up in your buffers, you -;;; should set the discard-error flag in the compression-info-list. -;;; This will cause the stderr of all programs to be discarded. -;;; However, it also causes emacs to call compression/uncompression -;;; programs through a shell (which is specified by jka-compr-shell). -;;; This may be a drag if, on your system, starting up a shell is -;;; slow. -;;; -;;; If you don't want messages about compressing and decompressing -;;; to show up in the echo area, you can set the compress-name and -;;; decompress-name fields of the jka-compr-compression-info-list to -;;; nil. +;; INSTRUCTIONS: +;; +;; To use jka-compr, simply load this package, and edit as usual. +;; Its operation should be transparent to the user (except for +;; messages appearing when a file is being compressed or +;; uncompressed). +;; +;; The variable, jka-compr-compression-info-list can be used to +;; customize jka-compr to work with other compression programs. +;; The default value of this variable allows jka-compr to work with +;; Unix compress and gzip. +;; +;; If you are concerned about the stderr output of gzip and other +;; compression/decompression programs showing up in your buffers, you +;; should set the discard-error flag in the compression-info-list. +;; This will cause the stderr of all programs to be discarded. +;; However, it also causes emacs to call compression/uncompression +;; programs through a shell (which is specified by jka-compr-shell). +;; This may be a drag if, on your system, starting up a shell is +;; slow. +;; +;; If you don't want messages about compressing and decompressing +;; to show up in the echo area, you can set the compress-name and +;; decompress-name fields of the jka-compr-compression-info-list to +;; nil. -;;; APPLICATION NOTES: -;;; -;;; crypt++ -;;; jka-compr can coexist with crpyt++ if you take all the decompression -;;; entries out of the crypt-encoding-list. Clearly problems will arise if -;;; you have two programs trying to compress/decompress files. jka-compr -;;; will not "work with" crypt++ in the following sense: you won't be able to -;;; decode encrypted compressed files--that is, files that have been -;;; compressed then encrypted (in that order). Theoretically, crypt++ and -;;; jka-compr could properly handle a file that has been encrypted then -;;; compressed, but there is little point in trying to compress an encrypted -;;; file. -;;; +;; APPLICATION NOTES: +;; +;; crypt++ +;; jka-compr can coexist with crpyt++ if you take all the decompression +;; entries out of the crypt-encoding-list. Clearly problems will arise if +;; you have two programs trying to compress/decompress files. jka-compr +;; will not "work with" crypt++ in the following sense: you won't be able to +;; decode encrypted compressed files--that is, files that have been +;; compressed then encrypted (in that order). Theoretically, crypt++ and +;; jka-compr could properly handle a file that has been encrypted then +;; compressed, but there is little point in trying to compress an encrypted +;; file. +;; -;;; ACKNOWLEDGMENTS -;;; -;;; jka-compr is a V19 adaptation of jka-compr for V18 of Emacs. Many people -;;; have made helpful suggestions, reported bugs, and even fixed bugs in -;;; jka-compr. I recall the following people as being particularly helpful. -;;; -;;; Jean-loup Gailly -;;; David Hughes -;;; Richard Pieri -;;; Daniel Quinlan -;;; Chris P. Ross -;;; Rick Sladkey -;;; -;;; Andy Norman's ange-ftp was the inspiration for the original jka-compr for -;;; Version 18 of Emacs. -;;; -;;; After I had made progress on the original jka-compr for V18, I learned of a -;;; package written by Kazushi Jam Marukawa, called jam-zcat, that did exactly -;;; what I was trying to do. I looked over the jam-zcat source code and -;;; probably got some ideas from it. -;;; +;; ACKNOWLEDGMENTS +;; +;; jka-compr is a V19 adaptation of jka-compr for V18 of Emacs. Many people +;; have made helpful suggestions, reported bugs, and even fixed bugs in +;; jka-compr. I recall the following people as being particularly helpful. +;; +;; Jean-loup Gailly +;; David Hughes +;; Richard Pieri +;; Daniel Quinlan +;; Chris P. Ross +;; Rick Sladkey +;; +;; Andy Norman's ange-ftp was the inspiration for the original jka-compr for +;; Version 18 of Emacs. +;; +;; After I had made progress on the original jka-compr for V18, I learned of a +;; package written by Kazushi Jam Marukawa, called jam-zcat, that did exactly +;; what I was trying to do. I looked over the jam-zcat source code and +;; probably got some ideas from it. +;; ;;; Code: @@ -155,7 +172,7 @@ nil "The entry in `file-name-handler-alist' used by the jka-compr I/O functions.") -;;; Functions for accessing the return value of jka-get-compression-info +;;; Functions for accessing the return value of jka-compr-get-compression-info (defun jka-compr-info-regexp (info) (aref info 0)) (defun jka-compr-info-compress-message (info) (aref info 1)) (defun jka-compr-info-compress-program (info) (aref info 2)) @@ -485,13 +502,18 @@ (if (and beg end) (- end beg) end)) - (jka-compr-call-process uncompress-program - (concat uncompress-message - " " base-name) - local-file - t - nil - uncompress-args)) + ;; If visiting, bind off buffer-file-name so that + ;; file-locking will not ask whether we should + ;; really edit the buffer. + (let ((buffer-file-name + (if visit nil buffer-file-name))) + (jka-compr-call-process uncompress-program + (concat uncompress-message + " " base-name) + local-file + t + nil + uncompress-args))) (setq size (- (point) start)) (if replace (let* ((del-beg (point)) @@ -609,6 +631,7 @@ ;;; Support for loading compressed files. +;;; XEmacs: autoload this function ;;;###autoload (defun jka-compr-load (file &optional noerror nomessage nosuffix) "Documented as original." @@ -623,7 +646,8 @@ (or nomessage (message "Loading %s..." file)) - (load load-file noerror t t) + (let ((load-force-doc-strings t)) + (load load-file noerror t t)) (or nomessage (message "Loading %s...done." file))) @@ -631,11 +655,20 @@ (jka-compr-delete-temp-file local-copy)) t)) + +(defun jka-compr-byte-compiler-base-file-name (file) + (let ((info (jka-compr-get-compression-info file))) + (if (and info (jka-compr-info-strip-extension info)) + (save-match-data + (substring file 0 (string-match (jka-compr-info-regexp info) file))) + file))) (put 'write-region 'jka-compr 'jka-compr-write-region) (put 'insert-file-contents 'jka-compr 'jka-compr-insert-file-contents) (put 'file-local-copy 'jka-compr 'jka-compr-file-local-copy) (put 'load 'jka-compr 'jka-compr-load) +(put 'byte-compiler-base-file-name 'jka-compr + 'jka-compr-byte-compiler-base-file-name) (defun jka-compr-handler (operation &rest args) (save-match-data @@ -656,12 +689,29 @@ (inhibit-file-name-operation operation)) (apply operation args))) +;; XEmacs change: I don't have a clue what this is trying do. -sb +;; ;;;###autoload(defun auto-compression-mode (&optional arg) +;; ;;;###autoload "\ +;; ;;;###autoloadToggle automatic file compression and uncompression. +;; ;;;###autoloadWith prefix argument ARG, turn auto compression on if positive, else off. +;; ;;;###autoloadReturns the new status of auto compression (non-nil means on)." +;; ;;;###autoload (interactive "P") +;; ;;;###autoload (if (not (fboundp 'jka-compr-installed-p)) +;; ;;;###autoload (progn +;; ;;;###autoload (require 'jka-compr) +;; ;;;###autoload ;; That turned the mode on, so make it initially off. +;; ;;;###autoload (toggle-auto-compression))) +;; ;;;###autoload (toggle-auto-compression arg t)) + +;; XEmacs: autoload this function ;;;###autoload -(defun toggle-auto-compression (arg) - "Toggle automatic file compression and decompression. +(defun toggle-auto-compression (&optional arg message) + "Toggle automatic file compression and uncompression. With prefix argument ARG, turn auto compression on if positive, else off. -Returns the new status of auto compression (non-nil means on)." - (interactive "P") +Returns the new status of auto compression (non-nil means on). +If the argument MESSAGE is non-nil, it means to print a message +saying whether the mode is now on or off." + (interactive "P\np") (let* ((installed (jka-compr-installed-p)) (flag (if (null arg) (not installed) @@ -679,7 +729,7 @@ (jka-compr-uninstall))) - (and (interactive-p) + (and message (if flag (message "Automatic file (de)compression is now ON.") (message "Automatic file (de)compression is now OFF."))) @@ -722,6 +772,7 @@ ;; inhibit-first-line-modes-suffixes, so that a ;; -*- line in the first file of a compressed tar ;; file doesn't override tar-mode. + ;; XEmacs: the (now)superfluous conditional doesn't hurt (and (boundp 'inhibit-first-line-modes-suffixes) (setq inhibit-first-line-modes-suffixes (cons (jka-compr-info-regexp x) @@ -741,6 +792,7 @@ (mapcar (function (lambda (x) (and (jka-compr-info-strip-extension x) + ;; XEmacs: the (now)superfluous conditional doesn't hurt (and (boundp 'inhibit-first-line-modes-suffixes) (setq inhibit-first-line-modes-suffixes (delete (jka-compr-info-regexp x)
--- a/lisp/packages/lazy-lock.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/lazy-lock.el Mon Aug 13 08:46:35 2007 +0200 @@ -691,7 +691,7 @@ ;; mouse dragging. (defun lazy-lock-post-command-fontify-stealthily () ;; Do groovy things if (a-d) above, (e) not moving the mouse, and (f) no - ;; input after after waiting for `lazy-lock-stealth-time'. + ;; input after waiting for `lazy-lock-stealth-time'. (if (and lazy-lock-cache-continue lazy-lock-stealth-time) (condition-case data (if (lazy-lock-sit-for lazy-lock-stealth-time)
--- a/lisp/packages/ledit.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/ledit.el Mon Aug 13 08:46:35 2007 +0200 @@ -3,7 +3,7 @@ ;; Copyright (C) 1985 Free Software Foundation, Inc. ;; Maintainer: FSF -;; Keyord: languages +;; Keyword: languages ;; This file is part of XEmacs. @@ -19,9 +19,10 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary:
--- a/lisp/packages/lpr.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/lpr.el Mon Aug 13 08:46:35 2007 +0200 @@ -19,9 +19,10 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary: @@ -33,10 +34,14 @@ ;;;###autoload (defvar lpr-switches nil - "*List of strings to pass as extra switch args to `lpr' when it is invoked.") + "*List of strings to pass as extra options for the printer program. +See `lpr-command'.") (defvar lpr-add-switches (eq system-type 'berkeley-unix) - "*Non-nil means construct -T and -J options for the `lpr'.") + "*Non-nil means construct -T and -J options for the printer program. +These are made assuming that the program is `lpr'; +if you are using some other incompatible printer program, +this variable should be nil.") ;;;###autoload (defvar lpr-command @@ -47,7 +52,7 @@ ;; Default is nil, because that enables us to use pr -f ;; which is more reliable than pr with no args, which is what lpr -p does. (defvar lpr-headers-switches nil - "*List of strings to use as options for `lpr' to request page headings. + "*List of strings of options to request page headings in the printer program. If nil, we run `lpr-page-header-program' to make page headings and print the result.") @@ -59,7 +64,8 @@ "*Name of program for adding page headers to a file.") (defvar lpr-page-header-switches '("-f") - "*List of strings to use as options for `lpr-page-header-program'.") + "*List of strings to use as options for the page-header-generating program. +The variable `lpr-page-header-program' specifies the program to use.") ;;;###autoload (defun lpr-buffer () @@ -95,6 +101,10 @@ ;; and it seems to annoying to do for that MIPS system. (let ((name (concat (buffer-name) " Emacs buffer")) (title (concat (buffer-name) " Emacs buffer")) + ;; On MS-DOS systems, make pipes use binary mode if the + ;; original file is binary. + (binary-process-input buffer-file-type) + (binary-process-output buffer-file-type) (width tab-width) switch-string) (save-excursion
--- a/lisp/packages/makeinfo.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/makeinfo.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,26 +1,28 @@ -;;;; makeinfo.el -- run makeinfo conveniently. -;;; Copyright (C) 1991, 1993 Free Software Foundation, Inc. +;;; makeinfo.el --- run makeinfo conveniently + +;; Copyright (C) 1991, 1993 Free Software Foundation, Inc. -;;; Author: Robert J. Chassell -;;; Maintainer: FSF +;; Author: Robert J. Chassell +;; Maintainer: FSF -;;; This file is part of GNU Emacs. +;; This file is part of XEmacs. -;; 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 +;; XEmacs 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. +;; XEmacs 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, 675 Mass Ave, Cambridge, MA 02139, USA. +;; 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. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary:
--- a/lisp/packages/makesum.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/makesum.el Mon Aug 13 08:46:35 2007 +0200 @@ -19,9 +19,10 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary: @@ -106,6 +107,7 @@ (setq lines (nreverse lines)) (while lines (end-of-line) + ;; XEmacs change (indent-to 41 1) (insert (car lines)) (forward-line 1)
--- a/lisp/packages/man.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/man.el Mon Aug 13 08:46:35 2007 +0200 @@ -616,8 +616,9 @@ ;; This looks slightly better if they only ;; overran by a couple of chars. (setq truncate-lines t) - ;; turn off horizontal scrollbars in this buffer - (set-specifier scrollbar-height (cons (current-buffer) 0)) + (if (featurep 'scrollbar) + ;; turn off horizontal scrollbars in this buffer + (set-specifier scrollbar-height (cons (current-buffer) 0))) (run-hooks 'Manual-mode-hook)) (defun Manual-last-page ()
--- a/lisp/packages/metamail.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/metamail.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,10 +1,9 @@ ;;; metamail.el --- Metamail interface for GNU Emacs -;; Keywords: mail, news, mime, multimedia -;; Copyright (C) 1993 Masanobu UMEDA +;; Copyright (C) 1993, 1996 Masanobu UMEDA ;; Author: Masanobu UMEDA <umerin@mse.kyutech.ac.jp> -;; Version: Header: /cadillac-inferno-5/cvs-master/lemacs/lisp/packages/metamail.el,v 1.1 1993/12/01 08:54:51 jwz Exp +;; Version: $Header: /afs/informatik.uni-tuebingen.de/local/web/xemacs/xemacs-cvs/XEmacs/xemacs-19/lisp/packages/metamail.el,v 1.1.1.2 1996/12/18 03:45:03 steve Exp $ ;; Keywords: mail, news, mime, multimedia ;; This file is part of XEmacs. @@ -21,23 +20,33 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: Very similar to but not quite synched with -;;; FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary: -;; LCD Archive Entry: -;; metamail|Masanobu UMEDA|umerin@mse.kyutech.ac.jp| -;; Metamail interface for GNU Emacs| -;; !Date: 1993/12/01 08:54:51 !|!Revision: 1.1 !|~/misc/metamail.el.Z| +;; I trashed all the differences this file had from the FSF version. +;; So sue me. -sb + +;; The latest version will be at: +;; ftp://ftp.kyutech.ac.jp/pub/MultiMedia/mime/emacs-mime-tools.shar ;; Note: Metamail does not have all options which is compatible with ;; the environment variables. For that reason, matamail.el have to ;; hack the environment variables. In addition, there is no way to ;; display all header fields without extra informative body messages -;; which is suppressed by "-q" option. +;; which are suppressed by "-q" option. + +;; The following definition is what I'm using with GNUS 4: +;;(setq gnus-show-mime-method +;; (function +;; (lambda () +;; (metamail-interpret-header) +;; (let ((metamail-switches ;Suppress header fields in a body. +;; (append metamail-switches '("-q")))) +;; (metamail-interpret-body))))) ;; The idea of using metamail to process MIME messages is from ;; gnus-mime.el by Spike <Spike@world.std.com>. @@ -47,31 +56,118 @@ (defvar metamail-program-name "metamail" "*Metamail program name.") -(defvar metamail-environment "KEYHEADS='*';export KEYHEADS;" - "*Environment variables for Metamail. -It must be an emtpy string or a string terminated with ';'.") +(defvar metamail-mailer-name "emacs" + "*Mailer name set to MM_MAILER environment variable.") + +(defvar metamail-environment '("KEYHEADS=*" "MM_QUIET=1") + "*Environment variables passed to `metamail'. +It must be a list of strings that have the format ENVVARNAME=VALUE. +It is not expected to be altered globally by `set' or `setq'. +Instead, change its value temporary using `let' or `let*' form.") + +(defvar metamail-switches '("-x" "-d" "-z") + "*Switches for `metamail' program. +`-z' is required to remove zap file. +It is not expected to be altered globally by `set' or `setq'. +Instead, change its value temporary using `let' or `let*' form. +`-m MAILER' argument is automatically generated from the +`metamail-mailer-name' variable.") -(defvar metamail-switches '("-m" "emacs" "-x" "-d" "-z") - "*Switches for Metamail program. --z is required to remove zap file.") +;;;###autoload +(defun metamail-interpret-header () + "Interpret a header part of a MIME message in current buffer. +Its body part is not interpreted at all." + (interactive) + (save-excursion + (let* ((buffer-read-only nil) + (metamail-switches ;Inhibit processing an empty body. + (append metamail-switches '("-c" "text/plain" "-E" "7bit"))) + (end (progn + (goto-char (point-min)) + (search-forward "\n\n" nil 'move) + ;; An extra newline is inserted by metamail if there + ;; is no body part. So, insert a dummy body by + ;; itself. + (insert "\n") + (point)))) + (metamail-region (point-min) end nil nil 'nodisplay) + ;; Remove an extra newline inserted by myself. + (goto-char (point-min)) + (if (search-forward "\n\n\n" nil t) + (delete-char -1)) + ))) -(defun metamail-buffer (&optional buffer) - "Process current buffer through 'metamail'. -Optional argument BUFFER specifies a buffer to be filled (nil means current)." - (interactive) - (metamail-region (point-min) (point-max) buffer)) +;;;###autoload +(defun metamail-interpret-body (&optional viewmode nodisplay) + "Interpret a body part of a MIME message in current buffer. +Optional argument VIEWMODE specifies the value of the +EMACS_VIEW_MODE environment variable (defaulted to 1). +Optional argument NODISPLAY non-nil means buffer is not +redisplayed as output is inserted. +Its header part is not interpreted at all." + (interactive "p") + (save-excursion + (let ((contype nil) + (encoding nil) + (end (progn + (goto-char (point-min)) + (search-forward "\n\n" nil t) + (point)))) + ;; Find Content-Type and Content-Transfer-Encoding from the header. + (save-restriction + (narrow-to-region (point-min) end) + (setq contype + (or (mail-fetch-field "Content-Type") "text/plain")) + (setq encoding + (or (mail-fetch-field "Content-Transfer-Encoding") "7bit"))) + ;; Interpret the body part only. + (let ((metamail-switches ;Process body part only. + (append metamail-switches + (list "-b" "-c" contype "-E" encoding)))) + (metamail-region end (point-max) viewmode nil nodisplay)) + ;; Mode specific hack. + (cond ((eq major-mode 'rmail-mode) + ;; Adjust the marker of this message if in Rmail mode buffer. + (set-marker (aref rmail-message-vector (1+ rmail-current-message)) + (point-max)))) + ))) -(defun metamail-region (beg end &optional buffer) +;;;###autoload +(defun metamail-buffer (&optional viewmode buffer nodisplay) + "Process current buffer through `metamail'. +Optional argument VIEWMODE specifies the value of the +EMACS_VIEW_MODE environment variable (defaulted to 1). +Optional argument BUFFER specifies a buffer to be filled (nil +means current). +Optional argument NODISPLAY non-nil means buffer is not +redisplayed as output is inserted." + (interactive "p") + (metamail-region (point-min) (point-max) viewmode buffer nodisplay)) + +;;;###autoload +(defun metamail-region (beg end &optional viewmode buffer nodisplay) "Process current region through 'metamail'. -Optional argument BUFFER specifies a buffer to be filled (nil means current)." - (interactive "r") +Optional argument VIEWMODE specifies the value of the +EMACS_VIEW_MODE environment variable (defaulted to 1). +Optional argument BUFFER specifies a buffer to be filled (nil +means current). +Optional argument NODISPLAY non-nil means buffer is not +redisplayed as output is inserted." + (interactive "r\np") (let ((curbuf (current-buffer)) (buffer-read-only nil) - (metafile (make-temp-name "/tmp/metamail"))) + (metafile (make-temp-name "/tmp/metamail")) + (option-environment + (list (concat "EMACS_VIEW_MODE=" + (if (numberp viewmode) viewmode 1))))) (save-excursion ;; Gee! Metamail does not ouput to stdout if input comes from ;; stdin. - (write-region beg end metafile nil 'nomessage) + (let ((selective-display nil) ;Disable ^M to nl translation. + (kanji-fileio-code 2) ;Write in JIS code when nemacs. + (file-coding-system ;Write in JUNET style when mule. + (if (featurep 'mule) *junet*))) + (write-region beg end metafile nil 'nomessage)) (if buffer (set-buffer buffer)) (setq buffer-read-only nil) @@ -79,46 +175,31 @@ (if (eq curbuf (current-buffer)) (delete-region beg end) (delete-region (point-min) (point-max))) - ;; We have to pass the environment variable KEYHEADS to /bin/sh - ;; to display all header fields. Metamail should have an - ;; optional argument to pass such information directly. - (apply (function call-process) - "/bin/sh" - nil - t ;Output to current buffer - t ;Force redisplay - (list "-c" - ;; Construct environment and the command. - (concat - metamail-environment - metamail-program-name - " " - (mapconcat (function identity) metamail-switches " ") - " " - metafile - ))) + ;; We have to pass the environment variable KEYHEADS to display + ;; all header fields. Metamail should have an optional argument + ;; to pass such information directly. + (let ((process-environment + (append process-environment + metamail-environment option-environment))) + ;; Specify character coding system. + (if (boundp 'NEMACS) + (define-program-kanji-code nil metamail-program-name 2)) ;JIS + (if (featurep 'mule) + (define-program-coding-system nil metamail-program-name *junet*)) + (apply (function call-process) + metamail-program-name + nil + t ;Output to current buffer + (not nodisplay) ;Force redisplay + (append metamail-switches + (list "-m" (or metamail-mailer-name "emacs")) + (list metafile)))) + ;; `metamail' may not delete the temporary file! + (condition-case error + (delete-file metafile) + (error nil)) ))) -;(defun metamail-region (beg end &optional buffer) -; "Process current region through 'metamail'. -;Optional argument BUFFER specifies a buffer to be filled (nil means current)." -; (interactive "r") -; (let ((curbuf (current-buffer)) -; (buffer-read-only nil) -; (metafile (make-temp-name "/tmp/metamail"))) -; (save-excursion -; (write-region (point-min) (point-max) metafile nil 'nomessage) -; (if (eq curbuf -; (if buffer (get-buffer buffer) (current-buffer))) -; (delete-region (point-min) (point-max))) -; (apply (function call-process) -; metamail-program-name -; nil -; (or buffer t) ;BUFFER or current buffer -; nil ;don't redisplay -; (append metamail-switches (list metafile))) -; ))) - (provide 'metamail) ;;; metamail.el ends here
--- a/lisp/packages/mode-motion+.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/mode-motion+.el Mon Aug 13 08:46:35 2007 +0200 @@ -32,6 +32,9 @@ ;; at all. ; Change History +; Revision 3.16 Fri Jun 28 13:01:12 1996 ritchier@msc.ie +; Stop multiple highlighting lossage with 19.14 release. + ; Revision 3.15 Thu Feb 15 14:26:34 GMT 1996 Russell.Ritchie@gssec.bt.co.uk ; lisp-interaction-popup-menu => lisp-interaction-mode-popup-menu, ; emacs-lisp-popup-menu => emacs-lisp-mode-popup-menu. @@ -245,7 +248,7 @@ (require 'thing) (require 'mode-motion) -(defconst mode-motion+-version "3.15") +(defconst mode-motion+-version "3.16") ;;; This file defines a set of mouse motion handlers that do some ;;; highlighting of the text when the mouse moves over. @@ -1101,13 +1104,6 @@ (and buffer (set-buffer buffer) (select-window window)) - - ;; kludge: if point = end-of-window, then probably the mouse - ;; is actually between the last line and the modeline. In - ;; this case move point to back one - (and point - (not (< point (window-end window))) - (setq point (1- point))) ;; Create a new mode-motion-extent if there isn't one ;; (or a destroyed one) (if (and (extent-live-p mode-motion-extent) @@ -1162,18 +1158,10 @@ (if (or (not (motion-handler-follow-point handler)) (pos-visible-in-window-p point)) (progn - ;; set the extent face + (set-extent-endpoints + mode-motion-extent (car region) (cdr region)) (set-extent-face mode-motion-extent (motion-handler-face handler)) - ;; set the new boundary - (set-extent-endpoints - mode-motion-extent (car region) (cdr region)) - ;; highlight if required - (set-extent-property - mode-motion-extent 'highlight - (motion-handler-highlight handler)) - (highlight-extent mode-motion-extent - (motion-handler-highlight handler)) ;; make point follow the mouse or point to ;; the beginning of the line do not move the ;; cursor if a mark is set.
--- a/lisp/packages/page-ext.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/page-ext.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,233 +1,236 @@ ;;; page-ext.el --- extended page handling commands -;; You may use these commands to handle an address list or other -;; small data base. - ;; Copyright (C) 1990, 1991, 1993, 1994 Free Software Foundation ;; Maintainer: Robert J. Chassell <bob@gnu.ai.mit.edu> -;; This file is part of GNU Emacs. +;; This file is part of XEmacs. -;; 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 +;; XEmacs 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. +;; XEmacs 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, 675 Mass Ave, Cambridge, MA 02139, USA. +;; along with XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. + +;;; Commentary: + +;; You may use these commands to handle an address list or other +;; small data base. ;;; Summary -; The current page commands are: +;; The current page commands are: -; forward-page C-x ] -; backward-page C-x [ -; narrow-to-page C-x p -; count-lines-page C-x l -; mark-page C-x C-p (change this to C-x C-p C-m) -; sort-pages not bound -; what-page not bound +;; forward-page C-x ] +;; backward-page C-x [ +;; narrow-to-page C-x p +;; count-lines-page C-x l +;; mark-page C-x C-p (change this to C-x C-p C-m) +;; sort-pages not bound +;; what-page not bound -; The new page handling commands all use `C-x C-p' as a prefix. This -; means that the key binding for `mark-page' must be changed. -; Otherwise, no other changes are made to the current commands or -; their bindings. +;; The new page handling commands all use `C-x C-p' as a prefix. This +;; means that the key binding for `mark-page' must be changed. +;; Otherwise, no other changes are made to the current commands or +;; their bindings. -; New page handling commands: +;; New page handling commands: -; next-page C-x C-p C-n -; previous-page C-x C-p C-p -; search-pages C-x C-p C-s -; add-new-page C-x C-p C-a -; sort-pages-buffer C-x C-p s -; set-page-delimiter C-x C-p C-l -; pages-directory C-x C-p C-d -; pages-directory-for-addresses C-x C-p d -; pages-directory-goto C-c C-c +;; next-page C-x C-p C-n +;; previous-page C-x C-p C-p +;; search-pages C-x C-p C-s +;; add-new-page C-x C-p C-a +;; sort-pages-buffer C-x C-p s +;; set-page-delimiter C-x C-p C-l +;; pages-directory C-x C-p C-d +;; pages-directory-for-addresses C-x C-p d +;; pages-directory-goto C-c C-c ;;; Using the page commands -; The page commands are helpful in several different contexts. For -; example, programmers often divide source files into sections using the -; `page-delimiter'; you can use the `pages-directory' command to list -; the sections. +;; The page commands are helpful in several different contexts. For +;; example, programmers often divide source files into sections using the +;; `page-delimiter'; you can use the `pages-directory' command to list +;; the sections. -; You may change the buffer local value of the `page-delimiter' with -; the `set-page-delimiter' command. This command is bound to `C-x C-p -; C-l' The command prompts you for a new value for the page-delimiter. -; Called with a prefix-arg, the command resets the value of the -; page-delimiter to its original value. +;; You may change the buffer local value of the `page-delimiter' with +;; the `set-page-delimiter' command. This command is bound to `C-x C-p +;; C-l' The command prompts you for a new value for the page-delimiter. +;; Called with a prefix-arg, the command resets the value of the +;; page-delimiter to its original value. -; You may set several user options: -; -; The `pages-directory-buffer-narrowing-p' variable causes the -; `pages-directory-goto' command to narrow to the destination page. -; -; The `pages-directory-for-adding-page-narrowing-p' variable, causes the -; `add-new-page' command to narrow to the new entry. -; -; The `pages-directory-for-adding-new-page-before-current-page-p' variable -; causes the `add-new-page' command to insert a new page before current -; page. -; -; These variables are true by default. -; -; Additional, addresses-related user options are described in the next page -; of this file. +;; You may set several user options: +;; +;; The `pages-directory-buffer-narrowing-p' variable causes the +;; `pages-directory-goto' command to narrow to the destination page. +;; +;; The `pages-directory-for-adding-page-narrowing-p' variable, causes the +;; `add-new-page' command to narrow to the new entry. +;; +;; The `pages-directory-for-adding-new-page-before-current-page-p' variable +;; causes the `add-new-page' command to insert a new page before current +;; page. +;; +;; These variables are true by default. +;; +;; Additional, addresses-related user options are described in the next page +;; of this file. ;;; Handling an address list or small data base -; You may use the page commands to handle an address list or other -; small data base. Put each address or entry on its own page. The -; first line of text in each page is a `header line' and is listed by -; the `pages-directory' or `pages-directory-for-addresses' command. +;; You may use the page commands to handle an address list or other +;; small data base. Put each address or entry on its own page. The +;; first line of text in each page is a `header line' and is listed by +;; the `pages-directory' or `pages-directory-for-addresses' command. -; Specifically: -; -; 1. Begin each entry with a `page-delimiter' (which is, by default, -; `^L' at the beginning of the line). -; -; 2. The first line of text in each entry is the `heading line'; it -; will appear in the pages-directory-buffer which is constructed -; using the `C-x C-p C-d' (pages-directory) command or the `C-x -; C-p d' (pages-directory-for-addresses) command. -; -; The heading line may be on the same line as the page-delimiter -; or it may follow after. It is the first non-blank line on the -; page. Conventionally, the heading line is placed on the line -; immediately following the line containing page-delimiter. -; -; 3. Follow the heading line with the body of the entry. The body -; extends up to the next `page-delimiter'. The body may be of any -; length. It is conventional to place a blank line after the last -; line of the body. +;; Specifically: +;; +;; 1. Begin each entry with a `page-delimiter' (which is, by default, +;; `^L' at the beginning of the line). +;; +;; 2. The first line of text in each entry is the `heading line'; it +;; will appear in the pages-directory-buffer which is constructed +;; using the `C-x C-p C-d' (pages-directory) command or the `C-x +;; C-p d' (pages-directory-for-addresses) command. +;; +;; The heading line may be on the same line as the page-delimiter +;; or it may follow after. It is the first non-blank line on the +;; page. Conventionally, the heading line is placed on the line +;; immediately following the line containing page-delimiter. +;; +;; 3. Follow the heading line with the body of the entry. The body +;; extends up to the next `page-delimiter'. The body may be of any +;; length. It is conventional to place a blank line after the last +;; line of the body. -; For example, a file might look like this: -; -; FSF -; Free Software Foundation -; 675 Massachusetts Avenue -; Cambridge, MA 02139 USA -; (617) 876-3296 -; gnu@prep.ai.mit.edu -; -; -; House Subcommittee on Intellectual Property, -; U.S. House of Representatives, -; Washington, DC 20515 -; -; Congressional committee concerned with permitting or preventing -; monopolistic restrictions on the use of software technology. -; -; -; George Lakoff -; ``Women, Fire, and Dangerous Things: -; What Categories Reveal about the Mind'' -; 1987, Univ. of Chicago Press -; -; About philosophy, Whorfian effects, and linguistics. -; -; -; OBI (On line text collection.) -; Open Book Initiative -; c/o Software Tool & Die -; 1330 Beacon St, Brookline, MA 02146 USA -; (617) 739-0202 -; obi@world.std.com +;; For example, a file might look like this: +;; +;; FSF +;; Free Software Foundation +;; 59 Temple Place - Suite 330 +;; Boston, MA 02111-1307 USA. +;; (617) 542-5942 +;; gnu@prep.ai.mit.edu +;; +;; +;; House Subcommittee on Intellectual Property, +;; U.S. House of Representatives, +;; Washington, DC 20515 +;; +;; Congressional committee concerned with permitting or preventing +;; monopolistic restrictions on the use of software technology. +;; +;; +;; George Lakoff +;; ``Women, Fire, and Dangerous Things: +;; What Categories Reveal about the Mind'' +;; 1987, Univ. of Chicago Press +;; +;; About philosophy, Whorfian effects, and linguistics. +;; +;; +;; OBI (On line text collection.) +;; Open Book Initiative +;; c/o Software Tool & Die +;; 1330 Beacon St, Brookline, MA 02146 USA +;; (617) 739-0202 +;; obi@world.std.com -; In this example, the heading lines are: -; -; FSF -; House Subcommittee on Intellectual Property -; George Lakoff -; OBI (On line text collection.) +;; In this example, the heading lines are: +;; +;; FSF +;; House Subcommittee on Intellectual Property +;; George Lakoff +;; OBI (On line text collection.) -; The `C-x C-p s' (sort-pages-buffer) command sorts the entries in the -; buffer alphabetically. +;; The `C-x C-p s' (sort-pages-buffer) command sorts the entries in the +;; buffer alphabetically. -; You may use any of the page commands, including the `next-page', -; `previous-page', `add-new-page', `mark-page', and `search-pages' -; commands. +;; You may use any of the page commands, including the `next-page', +;; `previous-page', `add-new-page', `mark-page', and `search-pages' +;; commands. -; You may use either the `C-x C-p d' (pages-directory-for-addresses) -; or the `C-x C-p C-d' (pages-directory) command to construct and -; dislay a directory of all the heading lines. +;; You may use either the `C-x C-p d' (pages-directory-for-addresses) +;; or the `C-x C-p C-d' (pages-directory) command to construct and +;; display a directory of all the heading lines. -; In the directory, you may position the cursor over a heading line -; and type `C-c C-c' (pages-directory-goto) to go to the entry to -; which it refers in the pages buffer. +;; In the directory, you may position the cursor over a heading line +;; and type `C-c C-c' (pages-directory-goto) to go to the entry to +;; which it refers in the pages buffer. -; You can type `C-c C-p C-a' (add-new-page) to add a new entry in the -; pages buffer or address file. This is the same command you use to -; add a new entry when you are in the pages buffer or address file. +;; You can type `C-c C-p C-a' (add-new-page) to add a new entry in the +;; pages buffer or address file. This is the same command you use to +;; add a new entry when you are in the pages buffer or address file. -; If you wish, you may create several different directories, -; one for each different buffer. +;; If you wish, you may create several different directories, +;; one for each different buffer. ;; `pages-directory-for-addresses' in detail -; The `pages-directory-for-addresses' assumes a default addresses -; file. You do not need to specify the addresses file but merely type -; `C-x C-p d' from any buffer. The command finds the file, constructs -; a directory for it, and switches you to the directory. If you call -; the command with a prefix arg, `C-u C-x C-p d', it prompts you for a -; file name. +;; The `pages-directory-for-addresses' assumes a default addresses +;; file. You do not need to specify the addresses file but merely type +;; `C-x C-p d' from any buffer. The command finds the file, constructs +;; a directory for it, and switches you to the directory. If you call +;; the command with a prefix arg, `C-u C-x C-p d', it prompts you for a +;; file name. -; You may customize the addresses commands: +;; You may customize the addresses commands: -; The `pages-addresses-file-name' variable determines the name of -; the addresses file; by default it is "~/addresses". +;; The `pages-addresses-file-name' variable determines the name of +;; the addresses file; by default it is "~/addresses". -; The `pages-directory-for-addresses-goto-narrowing-p' variable -; determines whether `pages-directory-goto' narrows the addresses -; buffer to the entry, which it does by default. +;; The `pages-directory-for-addresses-goto-narrowing-p' variable +;; determines whether `pages-directory-goto' narrows the addresses +;; buffer to the entry, which it does by default. -; The `pages-directory-for-addresses-buffer-keep-windows-p' variable -; determines whether `pages-directory-for-addresses' deletes other -; windows to show as many lines as possible on the screen or works -; in the usual Emacs manner and keeps other windows. Default is to -; keep other windows. +;; The `pages-directory-for-addresses-buffer-keep-windows-p' variable +;; determines whether `pages-directory-for-addresses' deletes other +;; windows to show as many lines as possible on the screen or works +;; in the usual Emacs manner and keeps other windows. Default is to +;; keep other windows. -; The `pages-directory-for-adding-addresses-narrowing-p' variable -; determines whether `pages-directory-for-addresses' narrows the -; addresses buffer to a new entry when you are adding that entry. -; Default is to narrow to new entry, which means you see a blank -; screen before you write the new entry. +;; The `pages-directory-for-adding-addresses-narrowing-p' variable +;; determines whether `pages-directory-for-addresses' narrows the +;; addresses buffer to a new entry when you are adding that entry. +;; Default is to narrow to new entry, which means you see a blank +;; screen before you write the new entry. ;; `pages-directory' in detail -; Call the `pages-directory' command from the buffer for which you -; want a directory created; it creates a directory for the buffer and -; pops you to the directory. +;; Call the `pages-directory' command from the buffer for which you +;; want a directory created; it creates a directory for the buffer and +;; pops you to the directory. -; The `pages-directory' command has several options: +;; The `pages-directory' command has several options: -; Called with a prefix arg, `C-u C-x C-p C-d', the `pages-directory' -; prompts you for a regular expression and only lists only those -; header lines that are part of pages that contain matches to the -; regexp. In the example above, `C-u C-x C-p C-d 617 RET' would -; match the telephone area code of the first and fourth entries, so -; only the header lines of those two entries would appear in the -; pages-directory-buffer. -; -; Called with a numeric argument, the `pages-directory' command -; lists the number of lines in each page. This is helpful when you -; are printing hardcopy. +;; Called with a prefix arg, `C-u C-x C-p C-d', the `pages-directory' +;; prompts you for a regular expression and only lists only those +;; header lines that are part of pages that contain matches to the +;; regexp. In the example above, `C-u C-x C-p C-d 617 RET' would +;; match the telephone area code of the first and fourth entries, so +;; only the header lines of those two entries would appear in the +;; pages-directory-buffer. +;; +;; Called with a numeric argument, the `pages-directory' command +;; lists the number of lines in each page. This is helpful when you +;; are printing hardcopy. -; Called with a negative numeric argument, the `pages-directory' -; command lists the lengths of pages whose contents match a regexp. +;; Called with a negative numeric argument, the `pages-directory' +;; command lists the lengths of pages whose contents match a regexp. ;;; Code: @@ -414,7 +417,7 @@ (skip-chars-forward " \t\n") )) - ;; ENDRECFUN is is called with point within the record. + ;; ENDRECFUN is called with point within the record. ;; It should move point to the end of the record. (function (lambda () (if (re-search-forward
--- a/lisp/packages/ps-print.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/ps-print.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,8 +1,9 @@ ;;; ps-print.el --- Jim's Pretty-Good PostScript Generator for Emacs 19. -;; Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. +;; Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc. ;; Author: Jim Thompson <thompson@wg2.waii.com> +;; Maintainer: duthen@cegelec-red.fr (Jacques Duthen Prestataire) ;; Keywords: print, PostScript ;; This file is part of XEmacs. @@ -19,7 +20,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. ;; LCD Archive Entry: ;; ps-print|James C. Thompson|thompson@wg2.waii.com| @@ -31,7 +33,7 @@ ;; version number. When reporting bugs, please also report the ;; version of Emacs, if any, that ps-print was distributed with.) -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary: @@ -85,7 +87,7 @@ ;; printout than to find 50 single-page printouts). ;; ;; Ps-print has a hook in the kill-emacs-hooks so that you won't -;; accidently quit from Emacs while you have unprinted PostScript +;; accidentally quit from Emacs while you have unprinted PostScript ;; waiting in the spool buffer. If you do attempt to exit with ;; spooled PostScript, you'll be asked if you want to print it, and if ;; you decline, you'll be asked to confirm the exit; this is modeled @@ -200,7 +202,7 @@ ;; Ps-print keeps internal lists of which fonts are bold and which are ;; italic; these lists are built the first time you invoke ps-print. ;; For the sake of efficiency, the lists are built only once; the same -;; lists are referred in later invokations of ps-print. +;; lists are referred in later invocations of ps-print. ;; ;; Because these lists are built only once, it's possible for them to ;; get out of sync, if a face changes, or if new faces are added. To @@ -257,7 +259,7 @@ ;; or variables. Functions are called, and should return a string to ;; show in the header. Variables should contain strings to display in ;; the header. In either case, function or variable, the PostScript -;; strings delimeters are added by ps-print, and should not be part of +;; string delimeters are added by ps-print, and should not be part of ;; the returned value. ;; ;; Here's an example: say we want the left header to display the text @@ -304,29 +306,9 @@ ;; formats for; it should contain one of the symbols ps-letter, ;; ps-legal, or ps-a4. The default is ps-letter. ;; -;; -;; Installing ps-print -;; ------------------- -;; -;; 1. Place ps-print.el somewhere in your load-path and byte-compile -;; it. You can ignore all byte-compiler warnings; they are the -;; result of multi-Emacs support. This step is necessary only if -;; you're installing your own ps-print; if ps-print came with your -;; copy of Emacs, this been done already. -;; -;; 2. Place in your .emacs file the line -;; -;; (require 'ps-print) -;; -;; to load ps-print. Or you may cause any of the ps-print commands -;; to be autoloaded with an autoload command such as: -;; -;; (autoload 'ps-print-buffer "ps-print" -;; "Generate and print a PostScript image of the buffer..." t) -;; -;; 3. Make sure that the variables ps-lpr-command and ps-lpr-switches -;; contain appropriate values for your system; see the usage notes -;; below and the documentation of these variables. +;; Make sure that the variables ps-lpr-command and ps-lpr-switches +;; contain appropriate values for your system; see the usage notes +;; below and the documentation of these variables. ;; ;; New since version 1.5 ;; --------------------- @@ -459,6 +441,8 @@ `ps-print-headers'.") ;;;###autoload +;;; The 19.33 fsf version includes a test on pixel components instead +;;; of color-instance-rgb-components (defvar ps-print-color-p (and (or (fboundp 'x-color-values) ; fsf (fboundp 'color-instance-rgb-components)) ; xemacs @@ -608,9 +592,9 @@ ;;;###autoload (defun ps-print-buffer-with-faces (&optional filename) "Generate and print a PostScript image of the buffer. - Like `ps-print-buffer', but includes font, color, and underline -information in the generated image." +information in the generated image. This command works only if you +are using a window system, so it has a way to determine color values." (interactive (list (ps-print-preprint current-prefix-arg))) (ps-generate (current-buffer) (point-min) (point-max) 'ps-generate-postscript-with-faces) @@ -620,7 +604,6 @@ ;;;###autoload (defun ps-print-region (from to &optional filename) "Generate and print a PostScript image of the region. - Like `ps-print-buffer', but prints just the current region." (interactive (list (point) (mark) (ps-print-preprint current-prefix-arg))) @@ -632,9 +615,9 @@ ;;;###autoload (defun ps-print-region-with-faces (from to &optional filename) "Generate and print a PostScript image of the region. - Like `ps-print-region', but includes font, color, and underline -information in the generated image." +information in the generated image. This command works only if you +are using a window system, so it has a way to determine color values." (interactive (list (point) (mark) (ps-print-preprint current-prefix-arg))) (ps-generate (current-buffer) from to @@ -645,7 +628,6 @@ ;;;###autoload (defun ps-spool-buffer () "Generate and spool a PostScript image of the buffer. - Like `ps-print-buffer' except that the PostScript image is saved in a local buffer to be sent to the printer later. @@ -658,9 +640,9 @@ ;;;###autoload (defun ps-spool-buffer-with-faces () "Generate and spool a PostScript image of the buffer. - Like `ps-spool-buffer', but includes font, color, and underline -information in the generated image. +information in the generated image. This command works only if you +are using a window system, so it has a way to determine color values. Use the command `ps-despool' to send the spooled images to the printer." @@ -672,7 +654,6 @@ ;;;###autoload (defun ps-spool-region (from to) "Generate a PostScript image of the region and spool locally. - Like `ps-spool-buffer', but spools just the current region. Use the command `ps-despool' to send the spooled images to the printer." @@ -684,9 +665,9 @@ ;;;###autoload (defun ps-spool-region-with-faces (from to) "Generate a PostScript image of the region and spool locally. - Like `ps-spool-region', but includes font, color, and underline -information in the generated image. +information in the generated image. This command works only if you +are using a window system, so it has a way to determine color values. Use the command `ps-despool' to send the spooled images to the printer." (interactive "r") @@ -745,12 +726,12 @@ %*** NOTE: the following are missing in the Adobe documentation, %*** but appear in the displayed table: %*** macron at 0225, dieresis at 0230, cedilla at 0233, space at 0240. -% \20x +% ^Px /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent /dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron -% \24x +% ^Tx /space /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright /ordfeminine /guillemotleft @@ -759,7 +740,7 @@ /acute /mu /paragraph /periodcentered /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown -% \30x +% ^Xx /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute /Ecircumflex /Edieresis @@ -768,7 +749,7 @@ /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls -% \34x +% ^\\x /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla /egrave /eacute /ecircumflex /edieresis @@ -1198,9 +1179,11 @@ (listp filename))) (let* ((name (concat (buffer-name) ".ps")) (prompt (format "Save PostScript to file: (default %s) " - name))) - (read-file-name prompt default-directory - name nil)))) + name)) + (res (read-file-name prompt default-directory name nil))) + (if (file-directory-p res) + (expand-file-name name (file-name-as-directory res)) + res)))) ;; The following functions implement a simple list-buffering scheme so ;; that ps-print doesn't have to repeatedly switch between buffers @@ -1565,6 +1548,9 @@ (defun ps-color-values (x-color) (cond ((fboundp 'x-color-values) (x-color-values x-color)) + ;; From fsf 19.33 + ;; ((fboundp 'pixel-components) + ;; (pixel-components x-color)) ((and (fboundp 'color-instance-rgb-components) (xemacs-color-device)) (color-instance-rgb-components @@ -1644,6 +1630,9 @@ (memq face kind-list)))) (defun ps-xemacs-face-kind-p (face kind kind-regex kind-list) + ;; fsf 19.33: + ;; (let* ((frame-font (or (face-font face) (face-font 'default))) + ;; (kind-cons (assq kind (x-font-properties frame-font))) (let* ((frame-font (or (face-font-instance face) (face-font-instance 'default))) (kind-cons (and frame-font @@ -1802,8 +1791,20 @@ (min (next-overlay-change from) to))) (setq position (min property-change overlay-change)) + ;; The code below is not quite correct, + ;; because a non-nil overlay invisible property + ;; which is inactive according to the current value + ;; of buffer-invisibility-spec nonetheless overrides + ;; a face text property. (setq face - (cond ((get-text-property from 'invisible) nil) + (cond ((let ((prop (get-text-property from 'invisible))) + ;; Decide whether this invisible property + ;; really makes the text invisible. + (if (eq buffer-invisibility-spec t) + (not (null prop)) + (or (memq prop buffer-invisibility-spec) + (assq prop buffer-invisibility-spec)))) + nil) ((get-text-property from 'face)) (t 'default))) (let ((overlays (overlays-at from)) @@ -1817,7 +1818,11 @@ 0))) (if (and (or overlay-invisible overlay-face) (> overlay-priority face-priority)) - (setq face (cond (overlay-invisible nil) + (setq face (cond ((if (eq buffer-invisibility-spec t) + (not (null overlay-invisible)) + (or (memq overlay-invisible buffer-invisibility-spec) + (assq overlay-invisible buffer-invisibility-spec))) + nil) ((and face overlay-face))) face-priority overlay-priority))) (setq overlays (cdr overlays)))) @@ -1831,7 +1836,10 @@ (defun ps-generate (buffer from to genfunc) (let ((from (min to from)) - (to (max to from))) + (to (max to from)) + ;; This avoids trouble if chars with read-only properties + ;; are copied into ps-spool-buffer. + (inhibit-read-only t)) (save-restriction (narrow-to-region from to) (if ps-razzle-dazzle @@ -1875,11 +1883,11 @@ (while (re-search-backward "^/PageCount 0 def$" nil t) (replace-match (format "/PageCount %d def" ps-page-count) t)) - ;; Setting this variable tells the unwind form that the + ;; Setting this variable tells the unwind form that ;; the postscript was generated without error. (setq completed-safely t)) - ;; Unwind form: If some bad mojo ocurred while generating + ;; Unwind form: If some bad mojo occurred while generating ;; postscript, delete all the postscript that was generated. ;; This protects the previously spooled files from getting ;; corrupted. @@ -1911,9 +1919,14 @@ (message "Printing...")) (save-excursion (set-buffer ps-spool-buffer) - (apply 'call-process-region - (point-min) (point-max) ps-lpr-command nil 0 nil - ps-lpr-switches)) + (if (and (eq system-type 'ms-dos) (stringp dos-ps-printer)) + (write-region (point-min) (point-max) dos-ps-printer t 0) + (let ((binary-process-input t)) ; for MS-DOS + (apply 'call-process-region + (point-min) (point-max) ps-lpr-command nil + (if (fboundp 'start-process) 0 nil) + nil + ps-lpr-switches)))) (if ps-razzle-dazzle (message "Printing...done"))) (kill-buffer ps-spool-buffer))) @@ -1959,7 +1972,7 @@ (defun ps-article-subject () (save-excursion (goto-char (point-min)) - (if (re-search-forward "^Subject:[ \t]+\\(.*\\)$") + (if (re-search-forward "^Subject:[ \t]+\\(.*\\)$" nil t) (buffer-substring (match-beginning 1) (match-end 1)) "Subject ???"))) @@ -1969,7 +1982,7 @@ (defun ps-article-author () (save-excursion (goto-char (point-min)) - (if (re-search-forward "^From:[ \t]+\\(.*\\)$") + (if (re-search-forward "^From:[ \t]+\\(.*\\)$" nil t) (let ((fromstring (buffer-substring (match-beginning 1) (match-end 1)))) (cond @@ -2042,7 +2055,7 @@ (defun ps-info-file () (save-excursion (goto-char (point-min)) - (if (re-search-forward "File:[ \t]+\\([^, \t\n]*\\)") + (if (re-search-forward "File:[ \t]+\\([^, \t\n]*\\)" nil t) (buffer-substring (match-beginning 1) (match-end 1)) "File ???"))) @@ -2051,7 +2064,7 @@ (defun ps-info-node () (save-excursion (goto-char (point-min)) - (if (re-search-forward "Node:[ \t]+\\([^,\t\n]*\\)") + (if (re-search-forward "Node:[ \t]+\\([^,\t\n]*\\)" nil t) (buffer-substring (match-beginning 1) (match-end 1)) "Node ???")))
--- a/lisp/packages/rcompile.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/rcompile.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,6 +1,6 @@ -;;; rcompile.el Run a compilation on a remote machine +;;; rcompile.el --- run a compilation on a remote machine -;;; Copyright (C) 1993, 1994 Free Software Foundation, Inc. +;; Copyright (C) 1993, 1994 Free Software Foundation, Inc. ;; Author: Albert <alon@milcse.rtsg.mot.com> ;; Maintainer: FSF @@ -8,59 +8,60 @@ ;; Version: 1.1 ;; Keywords: tools, processes -;; This file is part of GNU Emacs. +;; This file is part of XEmacs. -;; 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 +;; XEmacs 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. +;; XEmacs 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, 675 Mass Ave, Cambridge, MA 02139, USA. +;; along with XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary: -;;; This package is for running a remote compilation and using emacs to parse -;;; the error messages. It works by rsh'ing the compilation to a remote host -;;; and parsing the output. If the file visited at the time remote-compile was -;;; called was loaded remotely (ange-ftp), the host and user name are obtained -;;; by the calling ange-ftp-ftp-name on the current directory. In this case the -;;; next-error command will also ange-ftp the files over. This is achieved -;;; automatically because the compilation-parse-errors function uses -;;; default-directory to build it's file names. If however the file visited was -;;; loaded locally, remote-compile prompts for a host and user and assumes the -;;; files mounted locally (otherwise, how was the visited file loaded). +;; This package is for running a remote compilation and using emacs to parse +;; the error messages. It works by rsh'ing the compilation to a remote host +;; and parsing the output. If the file visited at the time remote-compile was +;; called was loaded remotely (ange-ftp), the host and user name are obtained +;; by the calling ange-ftp-ftp-name on the current directory. In this case the +;; next-error command will also ange-ftp the files over. This is achieved +;; automatically because the compilation-parse-errors function uses +;; default-directory to build it's file names. If however the file visited was +;; loaded locally, remote-compile prompts for a host and user and assumes the +;; files mounted locally (otherwise, how was the visited file loaded). -;;; See the user defined variables section for more info. +;; See the user defined variables section for more info. -;;; I was contemplating redefining "compile" to "remote-compile" automatically -;;; if the file visited was ange-ftp'ed but decided against it for now. If you -;;; feel this is a good idea, let me know and I'll consider it again. +;; I was contemplating redefining "compile" to "remote-compile" automatically +;; if the file visited was ange-ftp'ed but decided against it for now. If you +;; feel this is a good idea, let me know and I'll consider it again. ;;; Installation: -;;; To use rcompile, you also need to give yourself permission to connect to -;;; the remote host. You do this by putting lines like: +;; To use rcompile, you also need to give yourself permission to connect to +;; the remote host. You do this by putting lines like: -;;; monopoly alon -;;; vme33 -;;; -;;; in a file named .rhosts in the home directory (of the remote machine). -;;; Be careful what you put in this file. A line like: -;;; -;;; + -;;; -;;; Will allow anyone access to your account without a password. I suggest you -;;; read the rhosts(5) manual page before you edit this file (if you are not -;;; familiar with it already) +;; monopoly alon +;; vme33 +;; +;; in a file named .rhosts in the home directory (of the remote machine). +;; Be careful what you put in this file. A line like: +;; +;; + +;; +;; Will allow anyone access to your account without a password. I suggest you +;; read the rhosts(5) manual page before you edit this file (if you are not +;; familiar with it already) ;;; Code: @@ -80,7 +81,7 @@ (defvar remote-compile-run-before nil "*Command to run before compilation. -This can be used for setting up enviroment variables, +This can be used for setting up environment variables, since rsh does not invoke the shell as a login shell and files like .login \(tcsh\) and .bash_profile \(bash\) are not run. nil means run no commands.") @@ -102,7 +103,7 @@ ;;;###autoload (defun remote-compile (host user command) - "Compile the the current buffer's directory on HOST. Log in as USER. + "Compile the current buffer's directory on HOST. Log in as USER. See \\[compile]." (interactive (let ((parsed (and (featurep 'ange-ftp)
--- a/lisp/packages/refbib.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/refbib.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,8 +1,10 @@ ;;; refbib.el --- convert refer-style references to ones usable by Latex bib -;; Keywords: bib, tex ;; Copyright (C) 1989 Free Software Foundation, Inc. +;; Author: Henry Kautz <kautz@research.att.com> +;; Keywords: bib, tex + ;; This file is part of XEmacs. ;; XEmacs is free software; you can redistribute it and/or modify it @@ -17,38 +19,45 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: Very close to FSF 19.28 but not synched. +;;; Synched up with: FSF 19.34 + +;;; Commentary: ;; Use: from a buffer containing the refer-style bibliography, ;; M-x r2b-convert-buffer ;; Program will prompt for an output buffer name, and will log ;; warnings during the conversion process in the buffer *Log*. -; HISTORY -; 9/88, created -; modified 1/19/89, allow books with editor but no author; -; added %O ordering field; -; appended illegal multiple fields, instead of -; discarding; -; added rule, a tech report whose %R number -; contains "ISBN" is really a book -; added rule, anything with an editor is a book -; or a proceedings -; added 'manual type, for items with institution -; but no author or editor -; fixed bug so trailing blanks are trimmed -; added 'proceedings type -; used "organization" field for proceedings -; modified 2/16/89, updated help messages -; modified 2/23/89, include capitalize stop words in r2b stop words, -; fixed problems with contractions (e.g. it's), -; caught multiple stop words in a row -; modified 3/1/89, fixed capitialize-title for first words all caps -; modified 3/15/89, allow use of " to delimit fields -; modified 4/18/89, properly "quote" special characters on output -(provide 'refer-to-bibtex) +;;; Change Log: + +;; HISTORY +;; 9/88, created H.Kautz +;; modified 1/19/89, allow books with editor but no author; +;; added %O ordering field; +;; appended illegal multiple fields, instead of +;; discarding; +;; added rule, a tech report whose %R number +;; contains "ISBN" is really a book +;; added rule, anything with an editor is a book +;; or a proceedings +;; added 'manual type, for items with institution +;; but no author or editor +;; fixed bug so trailing blanks are trimmed +;; added 'proceedings type +;; used "organization" field for proceedings +;; modified 2/16/89, updated help messages +;; modified 2/23/89, include capitalize stop words in r2b stop words, +;; fixed problems with contractions (e.g. it's), +;; caught multiple stop words in a row +;; modified 3/1/89, fixed capitalize-title for first words all caps +;; modified 3/15/89, allow use of " to delimit fields +;; modified 4/18/89, properly "quote" special characters on output + +;;; Code: + ;********************************************************** ; User Parameters @@ -66,7 +75,7 @@ for the journal name should be listed as beginning with a capital letter, even if it really doesn't. For example, a value of '((\"Aij\" \"{Artificial Intelligence}\") -(\"Ijcai81\" \"ijcai7\")) would expand Aij to the text string +\(\"Ijcai81\" \"ijcai7\")) would expand Aij to the text string \"Artificial Intelligence\", but would replace Ijcai81 with the BibTeX macro \"ijcai7\".") @@ -81,29 +90,29 @@ Because titles are capitalized before matching, the abbreviated title should be listed as beginning with a capital letter, even if it doesn't. For example, a value of '((\"Aij\" \"{Artificial Intelligence}\") -(\"Ijcai81\" \"ijcai7\")) would expand Aij to the text string +\(\"Ijcai81\" \"ijcai7\")) would expand Aij to the text string \"Artificial Intelligence\", but would replace Ijcai81 with the BibTeX macro \"ijcai7\".") (defvar r2b-proceedings-list '() " Assoc list of books or journals which are really conference proceedings, -but whose name and whose abbrev expansion (as defined in r2b-journal-abbrevs -and r2b-booktitle-abbrevs) does not contain the words 'conference' or -'proceedings'. (Those cases are handled automatically.) +but whose name and whose abbrev expansion (as defined in `r2b-journal-abbrevs' +and `r2b-booktitle-abbrevs') does not contain the words \"conference\" or +\"proceedings\". (Those cases are handled automatically.) The entry must match the given data exactly. Because titles are capitalized before matching, the items in this list should begin with a capital letter. For example, suppose the title \"Ijcai81\" is used for the proceedings of -a conference, and it's expansion is the BibTeX macro \"ijcai7\". Then -r2b-proceedings-list should be '((\"Ijcai81\") ...). If instead its +a conference, and its expansion is the BibTeX macro \"ijcai7\". Then +`r2b-proceedings-list' should be '((\"Ijcai81\") ...). If instead its expansion were \"Proceedings of the Seventh International Conference -on Artificial Intelligence\", then you would NOT need to include Ijcai81 -in r2b-proceedings-list (although it wouldn't cause an error).") +on Artificial Intelligence\", then you would NOT need to include Ijcai81 +in `r2b-proceedings-list' (although it wouldn't cause an error).") (defvar r2b-additional-stop-words "Some\\|What" - "Words other than the capitialize-title-stop-words + "Words other than the `capitalize-title-stop-words' which are not to be used to build the citation key") @@ -118,14 +127,14 @@ (concat "the\\|and\\|of\\|is\\|a\\|an\\|of\\|for\\|in\\|to\\|in\\|on\\|at\\|" "by\\|with\\|that\\|its") - "Words not to be capitialized in a title (unless they are the first + "Words not to be capitalized in a title (unless they are the first word in the title)") (defvar capitalize-title-stop-regexp (concat "\\(" capitalize-title-stop-words "\\)\\(\\b\\|'\\)")) (defun capitalize-title-region (begin end) - "Like capitalize-region, but don't capitalize stop words, except the first" + "Like `capitalize-region', but don't capitalize stop words, except the first." (interactive "r") (let ((case-fold-search nil) (orig-syntax-table (syntax-table))) (unwind-protect @@ -148,7 +157,7 @@ (defun capitalize-title (s) - "Like capitalize, but don't capitalize stop words, except the first" + "Like `capitalize', but don't capitalize stop words, except the first." (save-excursion (set-buffer (get-buffer-create "$$$Scratch$$$")) (erase-buffer) @@ -158,7 +167,7 @@ ;********************************************************* (defun r2b-reset () - "unbind defvars, for debugging" + "Unbind defvars, for debugging." (interactive) (makunbound 'r2b-journal-abbrevs) (makunbound 'r2b-booktitle-abbrevs) @@ -166,8 +175,7 @@ (makunbound 'capitalize-title-stop-words) (makunbound 'capitalize-title-stop-regexp) (makunbound 'r2b-additional-stop-words) - (makunbound 'r2b-stop-regexp) - ) + (makunbound 'r2b-stop-regexp)) (defvar r2b-stop-regexp (concat "\\`\\(\\(" @@ -179,11 +187,10 @@ (if r2b-trace-on (progn (apply (function message) args) - (sit-for 0) - ))) + (sit-for 0)))) (defun r2b-match (exp) - "returns string matched in current buffer" + "Returns string matched in current buffer." (buffer-substring (match-beginning exp) (match-end exp))) (defvar r2b-out-buf-name "*Out*" "*output from refer-to-bibtex" ) @@ -227,12 +234,11 @@ )) (defun r2b-clear-variables () - "set all global vars used by r2b to nil" + "Set all global vars used by r2b to nil." (let ((vars r2b-variables)) (while vars (set (car vars) nil) - (setq vars (cdr vars))) - )) + (setq vars (cdr vars))))) (defun r2b-warning (&rest args) (setq r2b-error-found t) @@ -240,8 +246,7 @@ (princ "\n" r2b-log) (princ "\n" r2b-out-buf) (princ "% " r2b-out-buf) - (princ (apply (function format) args) r2b-out-buf) - ) + (princ (apply (function format) args) r2b-out-buf)) (defun r2b-get-field (var field &optional unique required capitalize) "Set VAR to string value of FIELD, if any. If none, VAR is set to @@ -282,7 +287,7 @@ )) (defun r2b-set-match (var n regexp string ) - "set VAR to the Nth subpattern in REGEXP matched by STRING, or nil if none" + "Set VAR to the Nth subpattern in REGEXP matched by STRING, or nil if none." (set var (if (and (stringp string) (string-match regexp string)) (substring string (match-beginning n) (match-end n)) @@ -295,7 +300,7 @@ ("sep") ("oct") ("nov") ("dec"))) (defun r2b-convert-month () - "Try to convert r2bv-month to a standard 3 letter name" + "Try to convert `r2bv-month' to a standard 3 letter name." (if r2bv-month (let ((months r2b-month-abbrevs)) (if (string-match "[^0-9]" r2bv-month) @@ -320,7 +325,7 @@ ) (defun r2b-snarf-input () - "parse buffer into global variables" + "Parse buffer into global variables." (let ((case-fold-search t)) (r2b-trace "snarfing...") (sit-for 0) @@ -380,9 +385,9 @@ (defun r2b-put-field (field data &optional abbrevs) - "print bibtex FIELD = {DATA} if DATA not null; precede + "Print bibtex FIELD = {DATA} if DATA not null; precede with a comma and newline; if ABBREVS list is given, then -try to replace the {DATA} with an abbreviation" +try to replace the {DATA} with an abbreviation." (if data (let (match nodelim multi-line index) (cond @@ -437,7 +442,7 @@ (defun r2b-require (vars) - "If any of VARS is null, set to empty string and log error" + "If any of VARS is null, set to empty string and log error." (cond ((null vars)) ((listp vars) (r2b-require (car vars)) (r2b-require (cdr vars))) @@ -452,11 +457,11 @@ (defmacro r2b-moveq (new old) - "set NEW to OLD and set OLD to nil" + "Set NEW to OLD and set OLD to nil." (list 'progn (list 'setq new old) (list 'setq old 'nil))) (defun r2b-isa-proceedings (name) - "return t if NAME is the name of proceedings" + "Return t if NAME is the name of proceedings." (and name (or @@ -468,8 +473,8 @@ ))) (defun r2b-isa-university (name) - "return t if NAME is a university or similar organization, -but not a publisher" + "Return t if NAME is a university or similar organization, +but not a publisher." (and name (string-match "university" name) @@ -478,7 +483,7 @@ )) (defun r2b-barf-output () - "generate bibtex based on global variables" + "Generate bibtex based on global variables." (let ((standard-output r2b-out-buf) (case-fold-search t) match) (r2b-trace "...barfing") @@ -608,8 +613,8 @@ (defun r2b-convert-record (output-name) - "transform current bib entry and append to buffer OUTPUT; -do M-x r2b-help for more info" + "Transform current bib entry and append to buffer OUTPUT; +do \"M-x r2b-help\" for more info." (interactive (list (read-string "Output to buffer: " r2b-out-buf-name))) (let (rec-end rec-begin not-done) @@ -645,8 +650,8 @@ (defun r2b-convert-buffer (output-name) - "transform current buffer and append to buffer OUTPUT; -do M-x r2b-help for more info" + "Transform current buffer and append to buffer OUTPUT; +do \"M-x r2b-help\" for more info." (interactive (list (read-string "Output to buffer: " r2b-out-buf-name))) (save-excursion @@ -703,17 +708,27 @@ then include the following line in your .emacs file: (setq r2b-load-quietly t) To see this message again, perform - M-x r2b-help") + M-x r2b-help +Please send bug reports and suggestions to + Henry Kautz + kautz@research.att.com + allegra!kautz") (defun r2b-help () - "print help message" + "Print help message." (interactive) (with-output-to-temp-buffer "*Help*" - (princ r2b-help-message))) + (princ r2b-help-message) + (save-excursion + (set-buffer standard-output) + (help-mode)))) (if (not r2b-load-quietly) (r2b-help)) (message "r2b loaded") +(provide 'refer-to-bibtex) + +;;; refbib.el ends here
--- a/lisp/packages/resume.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/resume.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,131 +1,131 @@ ;;; resume.el --- process command line args from within a suspended Emacs job +;; Copyright (C) 1988, 1992 Free Software Foundation, Inc. + +;; Author: Joe Wells <jbw@bucsf.bu.edu> +;; Adapted-By: ESR ;; Keywords: processes -;; Copyright (C) 1988 Free Software Foundation, Inc. +;; This file is part of XEmacs. -;; This file is not yet part of GNU Emacs, but soon will be. +;; XEmacs 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. No author or distributor -;; accepts responsibility to anyone for the consequences of using it -;; or for whether it serves any particular purpose or works at all, -;; unless he says so in writing. Refer to the GNU Emacs General Public -;; License for full details. +;; XEmacs 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 XEmacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Synched up with: 19.34 -;; Everyone is granted permission to copy, modify and redistribute -;; GNU Emacs, but only under the conditions described in the -;; GNU Emacs General Public License. A copy of this license is -;; supposed to have been given to you along with GNU Emacs so you -;; can know your rights and responsibilities. It should be in a -;; file named COPYING. Among other things, the copyright notice -;; and this notice must be preserved on all copies. -;; -;;; Synched up with: Not synched with FSF but close to 19.28. +;;; Commentary: + +;; The purpose of this library is to handle command line arguments +;; when you resume an existing Emacs job. + +;; In order to use it, you must put this code in your .emacs file. -;; by Joe Wells -;; jbw@bucsf.bu.edu -;; joew@uswat.uswest.com (maybe, ... the mailer there sucks) +;; (add-hook 'suspend-hook 'resume-suspend-hook) +;; (add-hook 'suspend-resume-hook 'resume-process-args) + +;; You can't get the benefit of this library by using the `emacs' command, +;; since that always starts a new Emacs job. Instead you must use a +;; command called `edit' which knows how to resume an existing Emacs job +;; if you have one, or start a new Emacs job if you don't have one. + +;; To define the `edit' command, run the script etc/emacs.csh (if you use CSH), +;; or etc/emacs.bash if you use BASH. You would normally do this in your +;; login script. ;; Stephan Gildea suggested bug fix (gildea@bbn.com). ;; Ideas from Michael DeCorte and other people. -;; For csh users, insert the following alias in your .cshrc file -;; (after removing the leading double semicolons): -;; -;;# The following line could be just EMACS=emacs, but this depends on -;;# your site. -;;set EMACS=emacs -;;set EMACS_PATTERN="^\[[0-9]\] . Stopped ............ $EMACS" -;;alias emacs \ -;;' \\ -;; jobs >! /tmp/jobs$$ \\ -;; && grep "$EMACS_PATTERN" /tmp/jobs$$ >& /dev/null \\ -;; && echo `pwd` \!* >! ~/.emacs_args && eval "%$EMACS" \\ -;;|| test -S ~/.emacs_server && emacsclient \!* \\ -;;|| test "$?DISPLAY" = 1 && eval "\$EMACS -i \!* &" \\ -;;|| test "$?WINDOW_PARENT" = 1 && eval "emacstool -f emacstool-init \!* &" \\ -;;|| eval "\$EMACS -nw \!*"' -;; -;; The alias works as follows: -;; 1. If there is a suspended emacs jobs that is a child of the -;; current shell, place its arguments in the ~/.emacs_args file and -;; resume it. -;; 2. Else if the ~/.emacs_server socket has been created, presume an -;; emacs server is running and attempt to connect to it. If no emacs -;; server is listening on the socket, this will fail. -;; 3. Else if the DISPLAY environment variable is set, presume we are -;; running under X Windows and start a new X Gnu Emacs process in the -;; background. -;; 4. Else if the WINDOW_PARENT environment variable is set, presume we -;; are running under Sunview and Suntools and start an emacstool -;; process in the background. -;; 5. Else start a regular emacs process. -;; -;; Notes: -;; "test -S" checks if a unix domain socket by that name exists. -;; The output of the "jobs" command is not piped directly into "grep" -;; because that would run the "jobs" command in a subshell. -;; Before resuming a suspended emacs, the current directory and all -;; command line arguments are placed in a file. -;; The command to run emacs is always preceded by a \ to prevent -;; possible alias loops. -;; The "-nw" switch in the last line is is undocumented, and it means -;; no windowing system. - -(setq suspend-resume-hook 'resume-process-args) -(setq suspend-hook 'resume-preparation) +;;; Code: -(defvar emacs-args-file "~/.emacs_args" +(defvar resume-emacs-args-file (expand-file-name "~/.emacs_args") "*This file is where arguments are placed for a suspended emacs job.") -(defun resume-preparation () - (condition-case () - (delete-file emacs-args-file) - (error nil))) +(defvar resume-emacs-args-buffer " *Command Line Args*" + "Buffer that is used by resume-process-args.") (defun resume-process-args () - "This should be called from inside of suspend-resume-hook. -Grabs the contents of the file whose name is stored in -emacs-args-file, and processes these arguments like command line options." - (let ((resume-start-buffer (current-buffer)) - (resume-args-buffer (get-buffer-create " *Command Line Args*")) - resume-args) + "Handler for command line args given when Emacs is resumed." + (let ((start-buffer (current-buffer)) + (args-buffer (get-buffer-create resume-emacs-args-buffer)) + length args + (command-line-default-directory default-directory)) (unwind-protect (progn - (set-buffer resume-args-buffer) + (set-buffer args-buffer) (erase-buffer) - ;; Get the contents of emacs-args-file, then delete the file. + ;; get the contents of resume-emacs-args-file (condition-case () - (progn - (insert-file-contents emacs-args-file) - (delete-file emacs-args-file)) - ;; The file doesn't exist or we can't delete it, ergo no arguments. - ;; (If we can't delete it now, we probably couldn't delete it - ;; before suspending, and that implies it may be vestigial.) - (file-error (erase-buffer))) - ;; Get the arguments from the buffer. - (goto-char (point-min)) - (while (progn (skip-chars-forward " \t\n") (not (eobp))) - (setq resume-args - (cons (buffer-substring (point) - (progn - (skip-chars-forward "^ \t\n") - (point))) - resume-args))) - (cond (resume-args - ;; Arguments are now in reverse order. - (setq resume-args (nreverse resume-args)) - ;; The "first argument" is really a default directory to use - ;; while processing the rest of the arguments. - (setq default-directory (concat (car resume-args) "/")) - ;; Actually process the arguments. - (command-line-1 (cdr resume-args))))) + (let ((result (insert-file-contents resume-emacs-args-file))) + (setq length (car (cdr result)))) + ;; the file doesn't exist, ergo no arguments + (file-error + (erase-buffer) + (setq length 0))) + (if (<= length 0) + (setq args nil) + ;; get the arguments from the buffer + (goto-char (point-min)) + (while (not (eobp)) + (skip-chars-forward " \t\n") + (let ((begin (point))) + (skip-chars-forward "^ \t\n") + (setq args (cons (buffer-substring begin (point)) args))) + (skip-chars-forward " \t\n")) + ;; arguments are now in reverse order + (setq args (nreverse args)) + ;; make sure they're not read again + (erase-buffer)) + (resume-write-buffer-to-file (current-buffer) resume-emacs-args-file) + ;; if nothing was in buffer, args will be null + (or (null args) + (setq command-line-default-directory + (file-name-as-directory (car args)) + args (cdr args))) + ;; actually process the arguments + ;; XEmacs: command-line-1 doesn't take a parameter + (let ((command-line-args-left args)) + (command-line-1))) ;; If the command line args don't result in a find-file, the - ;; buffer will be left in resume-args-buffer. So we change back to the + ;; buffer will be left in args-buffer. So we change back to the ;; original buffer. The reason I don't just use ;; (let ((default-directory foo)) ;; (command-line-1 args)) ;; in the context of the original buffer is because let does not ;; work properly with buffer-local variables. - (if (eq (current-buffer) resume-args-buffer) - (set-buffer resume-start-buffer))))) + (if (eq (current-buffer) args-buffer) + (set-buffer start-buffer))))) + +;;;###autoload +(defun resume-suspend-hook () + "Clear out the file used for transmitting args when Emacs resumes." + (save-excursion + (set-buffer (get-buffer-create resume-emacs-args-buffer)) + (erase-buffer) + (resume-write-buffer-to-file (current-buffer) resume-emacs-args-file))) + +(defun resume-write-buffer-to-file (buffer file) + "Writes the contents of BUFFER into FILE, if permissions allow." + (if (not (file-writable-p file)) + (error "No permission to write file %s" file)) + (save-excursion + (set-buffer buffer) + (clear-visited-file-modtime) + (save-restriction + (widen) + (write-region (point-min) (point-max) file nil 'quiet)) + (set-buffer-modified-p nil))) + +(provide 'resume) + +;;; resume.el ends here
--- a/lisp/packages/rnews.el Mon Aug 13 08:45:53 2007 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,982 +0,0 @@ -;;; rnews.el --- USENET news reader for gnu emacs -;; Keywords: news - -;; Copyright (C) 1985, 1986, 1987 Free Software Foundation, Inc. - -;; This file is part of XEmacs. - -;; XEmacs 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. - -;; XEmacs 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 XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. - -;;; Synched up with: FSF 19.30. -;;; Obsolete and should be removed. - -;; Created Sun Mar 10,1985 at 21:35:01 ads and sundar@hernes.ai.mit.edu -;; Should do the point pdl stuff sometime -;; finito except pdl.... Sat Mar 16,1985 at 06:43:44 -;; lets keep the summary stuff out until we get it working .. -;; sundar@hermes.ai.mit.edu Wed Apr 10,1985 at 16:32:06 -;; hack slash maim. mly@prep.ai.mit.edu Thu 18 Apr, 1985 06:11:14 -;; modified to correct reentrance bug, to not bother with groups that -;; received no new traffic since last read completely, to find out -;; what traffic a group has available much more quickly when -;; possible, to do some completing reads for group names - should -;; be much faster... -;; KING@KESTREL.arpa, Thu Mar 13 09:03:28 1986 -;; made news-{next,previous}-group skip groups with no new messages; and -;; added checking for unsubscribed groups to news-add-news-group -;; tower@prep.ai.mit.edu Jul 18 1986 -;; bound rmail-output to C-o; and changed header-field commands binding to -;; agree with the new C-c C-f usage in sendmail -;; tower@prep Sep 3 1986 -;; added news-rotate-buffer-body -;; tower@prep Oct 17 1986 -;; made messages more user friendly, cleanuped news-inews -;; move posting and mail code to new file rnewpost.el -;; tower@prep Oct 29 1986 -;; added caesar-region, rename news-caesar-buffer-body, hacked accordingly -;; tower@prep Nov 21 1986 -;; added (provide 'rnews) tower@prep 22 Apr 87 -(provide 'rnews) -(require 'mail-utils) - -(autoload 'rmail-output "rmailout" - "Append this message to Unix mail file named FILE-NAME." - t) - -(autoload 'news-reply "rnewspost" - "Compose and post a reply to the current article on USENET. -While composing the reply, use \\[mail-yank-original] to yank the original -message into it." - t) - -(autoload 'news-mail-other-window "rnewspost" - "Send mail in another window. -While composing the message, use \\[mail-yank-original] to yank the -original message into it." - t) - -(autoload 'news-post-news "rnewspost" - "Begin editing a new USENET news article to be posted." - t) - -(autoload 'news-mail-reply "rnewspost" - "Mail a reply to the author of the current article. -While composing the reply, use \\[mail-yank-original] to yank the original -message into it." - t) - -(defvar news-group-hook-alist nil - "Alist of (GROUP-REGEXP . HOOK) pairs. -Just before displaying a message, each HOOK is called -if its GROUP-REGEXP matches the current newsgroup name.") - -(defvar rmail-last-file (expand-file-name "~/mbox.news")) - -;Now in paths.el. -;(defvar news-path "/usr/spool/news/" -; "The root directory below which all news files are stored.") - -(defvar news-startup-file "$HOME/.newsrc" "Contains ~/.newsrc") -(defvar news-certification-file "$HOME/.news-dates" "Contains ~/.news-dates") - -;; random headers that we decide to ignore. -(defvar news-ignored-headers - "^Path:\\|^Posting-Version:\\|^Article-I.D.:\\|^Expires:\\|^Date-Received:\\|^References:\\|^Control:\\|^Xref:\\|^Lines:\\|^Posted:\\|^Relay-Version:\\|^Message-ID:\\|^Nf-ID:\\|^Nf-From:\\|^Approved:\\|^Sender:" - "All random fields within the header of a message.") - -(defvar news-mode-map nil) -(defvar news-read-first-time-p t) -;; Contains the (dotified) news groups of which you are a member. -(defvar news-user-group-list nil) - -(defvar news-current-news-group nil) -(defvar news-current-group-begin nil) -(defvar news-current-group-end nil) -(defvar news-current-certifications nil - "An assoc list of a group name and the time at which it is -known that the group had no new traffic") -(defvar news-current-certifiable nil - "The time when the directory we are now working on was written") - -(defvar news-message-filter nil - "User specifiable filter function that will be called during -formatting of the news file") - -;(defvar news-mode-group-string "Starting-Up" -; "Mode line group name info is held in this variable") -(defvar news-list-of-files nil - "Global variable in which we store the list of files -associated with the current newsgroup") -(defvar news-list-of-files-possibly-bogus nil - "variable indicating we only are guessing at which files are available. -Not currently used.") - -;; association list in which we store lists of the form -;; (pointified-group-name (first last old-last)) -(defvar news-group-article-assoc nil) - -(defvar news-current-message-number 0 "Displayed Article Number") -(defvar news-total-current-group 0 "Total no of messages in group") - -(defvar news-unsubscribe-groups ()) -(defvar news-point-pdl () "List of visited news messages.") -(defvar news-no-jumps-p t) -(defvar news-buffer () "Buffer into which news files are read.") - -(defmacro news-push (item ref) - (list 'setq ref (list 'cons item ref))) - -(defmacro news-cadr (x) (list 'car (list 'cdr x))) -(defmacro news-cdar (x) (list 'cdr (list 'car x))) -(defmacro news-caddr (x) (list 'car (list 'cdr (list 'cdr x)))) -(defmacro news-cadar (x) (list 'car (list 'cdr (list 'car x)))) -(defmacro news-caadr (x) (list 'car (list 'car (list 'cdr x)))) -(defmacro news-cdadr (x) (list 'cdr (list 'car (list 'cdr x)))) - -(defmacro news-wins (pfx index) - (` (file-exists-p (concat (, pfx) "/" (int-to-string (, index)))))) - -(defvar news-max-plausible-gap 2 - "* In an rnews directory, the maximum possible gap size. -A gap is a sequence of missing messages between two messages that exist. -An empty file does not contribute to a gap -- it ends one.") - -(defun news-find-first-and-last (prefix base) - (and (news-wins prefix base) - (cons (news-find-first-or-last prefix base -1) - (news-find-first-or-last prefix base 1)))) - -(defmacro news-/ (a1 a2) -;; a form of / that guarantees that (/ -1 2) = 0 - (if (zerop (/ -1 2)) - (` (/ (, a1) (, a2))) - (` (if (< (, a1) 0) - (- (/ (- (, a1)) (, a2))) - (/ (, a1) (, a2)))))) - -(defun news-find-first-or-last (pfx base dirn) - ;; first use powers of two to find a plausible ceiling - (let ((original-dir dirn)) - (while (news-wins pfx (+ base dirn)) - (setq dirn (* dirn 2))) - (setq dirn (news-/ dirn 2)) - ;; Then use a binary search to find the high water mark - (let ((offset (news-/ dirn 2))) - (while (/= offset 0) - (if (news-wins pfx (+ base dirn offset)) - (setq dirn (+ dirn offset))) - (setq offset (news-/ offset 2)))) - ;; If this high-water mark is bogus, recurse. - (let ((offset (* news-max-plausible-gap original-dir))) - (while (and (/= offset 0) (not (news-wins pfx (+ base dirn offset)))) - (setq offset (- offset original-dir))) - (if (= offset 0) - (+ base dirn) - (news-find-first-or-last pfx (+ base dirn offset) original-dir))))) - -(defun rnews () -"Read USENET news for groups for which you are a member and add or -delete groups. -You can reply to articles posted and send articles to any group. - -Type \\[describe-mode] once reading news to get a list of rnews commands." - (interactive) - (let ((last-buffer (buffer-name))) - (make-local-variable 'rmail-last-file) - (switch-to-buffer (setq news-buffer (get-buffer-create "*news*"))) - (news-mode) - (setq news-buffer-save last-buffer) - (setq buffer-read-only nil) - (erase-buffer) - (setq buffer-read-only t) - (set-buffer-modified-p t) - (sit-for 0) - (message "Getting new USENET news...") - (news-set-mode-line) - (news-get-certifications) - (news-get-new-news))) - -(defun news-group-certification (group) - (cdr-safe (assoc group news-current-certifications))) - - -(defun news-set-current-certifiable () - ;; Record the date that corresponds to the directory you are about to check - (let ((file (concat news-path - (string-subst-char ?/ ?. news-current-news-group)))) - (setq news-current-certifiable - (nth 5 (file-attributes - (or (file-symlink-p file) file)))))) - -(defun news-get-certifications () - ;; Read the certified-read file from last session - (save-excursion - (save-window-excursion - (setq news-current-certifications - (car-safe - (condition-case var - (let* - ((file (substitute-in-file-name news-certification-file)) - (buf (find-file-noselect file))) - (and (file-exists-p file) - (progn - (switch-to-buffer buf 'norecord) - (unwind-protect - (read-from-string (buffer-string)) - (kill-buffer buf))))) - (error nil))))))) - -(defun news-write-certifications () - ;; Write a certification file. - ;; This is an assoc list of group names with doubletons that represent - ;; mod times of the directory when group is read completely. - (save-excursion - (save-window-excursion - (with-output-to-temp-buffer - "*CeRtIfIcAtIoNs*" - (print news-current-certifications)) - (let ((buf (get-buffer "*CeRtIfIcAtIoNs*"))) - (switch-to-buffer buf) - (write-file (substitute-in-file-name news-certification-file)) - (kill-buffer buf))))) - -(defun news-set-current-group-certification () - (let ((cgc (assoc news-current-news-group news-current-certifications))) - (if cgc (setcdr cgc news-current-certifiable) - (news-push (cons news-current-news-group news-current-certifiable) - news-current-certifications)))) - -(defun news-set-minor-modes () - "Creates a minor mode list that has group name, total articles, -and attribute for current article." - (setq news-minor-modes (list (cons 'foo - (concat news-current-message-number - "/" - news-total-current-group - (news-get-attribute-string))))) - ;; Detect Emacs versions 18.16 and up, which display - ;; directly from news-minor-modes by using a list for mode-name. - (or (boundp 'minor-mode-alist) - (setq minor-modes news-minor-modes))) - -(defun news-set-message-counters () - "Scan through current news-groups filelist to figure out how many messages -are there. Set counters for use with minor mode display." - (if (null news-list-of-files) - (setq news-current-message-number 0))) - -(if news-mode-map - nil - (setq news-mode-map (make-keymap)) - (suppress-keymap news-mode-map) - (define-key news-mode-map "." 'beginning-of-buffer) - (define-key news-mode-map " " 'scroll-up) - (define-key news-mode-map "\177" 'scroll-down) - (define-key news-mode-map "n" 'news-next-message) - (define-key news-mode-map "c" 'news-make-link-to-message) - (define-key news-mode-map "p" 'news-previous-message) - (define-key news-mode-map "j" 'news-goto-message) - (define-key news-mode-map "q" 'news-exit) - (define-key news-mode-map "e" 'news-exit) - (define-key news-mode-map "\ej" 'news-goto-news-group) - (define-key news-mode-map "\en" 'news-next-group) - (define-key news-mode-map "\ep" 'news-previous-group) - (define-key news-mode-map "l" 'news-list-news-groups) - (define-key news-mode-map "?" 'describe-mode) - (define-key news-mode-map "g" 'news-get-new-news) - (define-key news-mode-map "f" 'news-reply) - (define-key news-mode-map "m" 'news-mail-other-window) - (define-key news-mode-map "a" 'news-post-news) - (define-key news-mode-map "r" 'news-mail-reply) - (define-key news-mode-map "o" 'news-save-item-in-file) - (define-key news-mode-map "\C-o" 'rmail-output) - (define-key news-mode-map "t" 'news-show-all-headers) - (define-key news-mode-map "x" 'news-force-update) - (define-key news-mode-map "A" 'news-add-news-group) - (define-key news-mode-map "u" 'news-unsubscribe-current-group) - (define-key news-mode-map "U" 'news-unsubscribe-group) - (define-key news-mode-map "\C-c\C-r" 'news-caesar-buffer-body)) - -(defun news-mode () - "News Mode is used by M-x rnews for reading USENET Newsgroups articles. -New readers can find additional help in newsgroup: news.announce.newusers . -All normal editing commands are turned off. -Instead, these commands are available: - -. move point to front of this news article (same as Meta-<). -Space scroll to next screen of this news article. -Delete scroll down previous page of this news article. -n move to next news article, possibly next group. -p move to previous news article, possibly previous group. -j jump to news article specified by numeric position. -M-j jump to news group. -M-n goto next news group. -M-p goto previous news group. -l list all the news groups with current status. -? print this help message. -C-c C-r caesar rotate all letters by 13 places in the article's body (rot13). -g get new USENET news. -f post a reply article to USENET. -a post an original news article. -A add a newsgroup. -o save the current article in the named file (append if file exists). -C-o output this message to a Unix-format mail file (append it). -c \"copy\" (actually link) current or prefix-arg msg to file. - warning: target directory and message file must be on same device - (UNIX magic) -t show all the headers this news article originally had. -q quit reading news after updating .newsrc file. -e exit updating .newsrc file. -m mail a news article. Same as C-x 4 m. -x update last message seen to be the current message. -r mail a reply to this news article. Like m but initializes some fields. -u unsubscribe from current newsgroup. -U unsubscribe from specified newsgroup." - (interactive) - (kill-all-local-variables) - (make-local-variable 'news-read-first-time-p) - (setq news-read-first-time-p t) - (make-local-variable 'news-current-news-group) -; (setq news-current-news-group "??") - (make-local-variable 'news-current-group-begin) - (setq news-current-group-begin 0) - (make-local-variable 'news-current-message-number) - (setq news-current-message-number 0) - (make-local-variable 'news-total-current-group) - (make-local-variable 'news-buffer-save) - (make-local-variable 'version-control) - (setq version-control 'never) - (make-local-variable 'news-point-pdl) -; This breaks it. I don't have time to figure out why. -- RMS -; (make-local-variable 'news-group-article-assoc) - (setq major-mode 'news-mode) - (setq modeline-process '(news-minor-modes)) - (setq mode-name "NEWS") - (news-set-mode-line) - (set-syntax-table text-mode-syntax-table) - (use-local-map news-mode-map) - (setq local-abbrev-table text-mode-abbrev-table) - (run-hooks 'news-mode-hook)) - -(defun string-subst-char (new old string) - (let (index) - (setq old (regexp-quote (char-to-string old)) - string (substring string 0)) - (while (setq index (string-match old string)) - (aset string index new))) - string) - -;; update read message number -(defmacro news-update-message-read (ngroup nno) - (list 'setcar - (list 'news-cdadr - (list 'assoc ngroup 'news-group-article-assoc)) - nno)) - -(defun news-parse-range (number-string) - "Parse string representing range of numbers of he form <a>-<b> -to a list (a . b)" - (let ((n (string-match "-" number-string))) - (if n - (cons (string-to-int (substring number-string 0 n)) - (string-to-int (substring number-string (1+ n)))) - (setq n (string-to-int number-string)) - (cons n n)))) - -;(defun is-in (elt lis) -; (catch 'foo -; (while lis -; (if (equal (car lis) elt) -; (throw 'foo t) -; (setq lis (cdr lis)))))) - -(defun news-get-new-news () - "Get new USENET news, if there is any for the current user." - (interactive) - (if (not (null news-user-group-list)) - (news-update-newsrc-file)) - (setq news-group-article-assoc ()) - (setq news-user-group-list ()) - (message "Looking up %s file..." news-startup-file) - (let ((file (substitute-in-file-name news-startup-file)) - (temp-user-groups ())) - (save-excursion - (let ((newsrcbuf (find-file-noselect file)) - start end endofline tem) - (set-buffer newsrcbuf) - (goto-char 0) - (while (search-forward ": " nil t) - (setq end (point)) - (beginning-of-line) - (setq start (point)) - (end-of-line) - (setq endofline (point)) - (setq tem (buffer-substring start (- end 2))) - (let ((range (news-parse-range - (buffer-substring end endofline)))) - (if (assoc tem news-group-article-assoc) - (message "You are subscribed twice to %s; I ignore second" - tem) - (setq temp-user-groups (cons tem temp-user-groups) - news-group-article-assoc - (cons (list tem (list (car range) - (cdr range) - (cdr range))) - news-group-article-assoc))))) - (kill-buffer newsrcbuf))) - (setq temp-user-groups (nreverse temp-user-groups)) - (message "Prefrobnicating...") - (switch-to-buffer news-buffer) - (setq news-user-group-list temp-user-groups) - (while (and temp-user-groups - (not (news-read-files-into-buffer - (car temp-user-groups) nil))) - (setq temp-user-groups (cdr temp-user-groups))) - (if (null temp-user-groups) - (message "No news is good news.") - (message "")))) - -(defun news-list-news-groups () - "Display all the news groups to which you belong." - (interactive) - (with-output-to-temp-buffer "*Newsgroups*" - (save-excursion - (set-buffer standard-output) - (insert - "News Group Msg No. News Group Msg No.\n") - (insert - "------------------------- -------------------------\n") - (let ((temp news-user-group-list) - (flag nil)) - (while temp - (let ((item (assoc (car temp) news-group-article-assoc))) - (insert (car item)) - (indent-to (if flag 52 20)) - (insert (int-to-string (news-cadr (news-cadr item)))) - (if flag - (insert "\n") - (indent-to 33)) - (setq temp (cdr temp) flag (not flag)))))))) - -;; Mode line hack -(defun news-set-mode-line () - "Set mode line string to something useful." - (setq mode-line-process - (concat " " - (if (integerp news-current-message-number) - (int-to-string news-current-message-number) - "??") - "/" - (if (integerp news-current-group-end) - (int-to-string news-current-group-end) - news-current-group-end))) - (setq mode-line-buffer-identification - (concat "NEWS: " - news-current-news-group - ;; Enough spaces to pad group name to 17 positions. - (substring " " - 0 (max 0 (- 17 (length news-current-news-group)))))) - (set-buffer-modified-p t) - (sit-for 0)) - -(defun news-goto-news-group (gp) - "Takes a string and goes to that news group." - (interactive (list (completing-read "NewsGroup: " - news-group-article-assoc))) - (message "Jumping to news group %s..." gp) - (news-select-news-group gp) - (message "Jumping to news group %s... done." gp)) - -(defun news-select-news-group (gp) - (let ((grp (assoc gp news-group-article-assoc))) - (if (null grp) - (error "Group %s not subscribed to" gp) - (progn - (news-update-message-read news-current-news-group - (news-cdar news-point-pdl)) - (news-read-files-into-buffer (car grp) nil) - (news-set-mode-line))))) - -(defun news-goto-message (arg) - "Goes to the article ARG in current newsgroup." - (interactive "p") - (if (null current-prefix-arg) - (setq arg (read-no-blanks-input "Go to article: " ""))) - (news-select-message arg)) - -(defun news-select-message (arg) - (if (stringp arg) (setq arg (string-to-int arg))) - (let ((file (concat news-path - (string-subst-char ?/ ?. news-current-news-group) - "/" arg))) - (if (= arg - (or (news-cadr (memq (news-cdar news-point-pdl) news-list-of-files)) - 0)) - (setcdr (car news-point-pdl) arg)) - (setq news-current-message-number arg) - (if (file-exists-p file) - (let ((buffer-read-only nil)) - (news-read-in-file file) - (news-set-mode-line)) - (news-set-mode-line) - (error "Article %d nonexistent" arg)))) - -(defun news-force-update () - "updates the position of last article read in the current news group" - (interactive) - (setcdr (car news-point-pdl) news-current-message-number) - (message "Updated to %d" news-current-message-number)) - -(defun news-next-message (arg) - "Move ARG messages forward within one newsgroup. -Negative ARG moves backward. -If ARG is 1 or -1, moves to next or previous newsgroup if at end." - (interactive "p") - (let ((no (+ arg news-current-message-number))) - (if (or (< no news-current-group-begin) - (> no news-current-group-end)) - (cond ((= arg 1) - (news-set-current-group-certification) - (news-next-group)) - ((= arg -1) - (news-previous-group)) - (t (error "Article out of range"))) - (let ((plist (news-get-motion-lists - news-current-message-number - news-list-of-files))) - (if (< arg 0) - (news-select-message (nth (1- (- arg)) (car (cdr plist)))) - (news-select-message (nth (1- arg) (car plist)))))))) - -(defun news-previous-message (arg) - "Move ARG messages backward in current newsgroup. -With no arg or arg of 1, move one message -and move to previous newsgroup if at beginning. -A negative ARG means move forward." - (interactive "p") - (news-next-message (- arg))) - -(defun news-move-to-group (arg) - "Given arg move forward or backward to a new newsgroup." - (let ((cg news-current-news-group)) - (let ((plist (news-get-motion-lists cg news-user-group-list)) - ngrp) - (if (< arg 0) - (or (setq ngrp (nth (1- (- arg)) (news-cadr plist))) - (error "No previous news groups")) - (or (setq ngrp (nth arg (car plist))) - (error "No more news groups"))) - (news-select-news-group ngrp)))) - -(defun news-next-group () - "Moves to the next user group." - (interactive) -; (message "Moving to next group...") - (news-move-to-group 0) - (while (null news-list-of-files) - (news-move-to-group 0))) -; (message "Moving to next group... done.") - -(defun news-previous-group () - "Moves to the previous user group." - (interactive) -; (message "Moving to previous group...") - (news-move-to-group -1) - (while (null news-list-of-files) - (news-move-to-group -1))) -; (message "Moving to previous group... done.") - -(defun news-get-motion-lists (arg listy) - "Given a msgnumber/group this will return a list of two lists; -one for moving forward and one for moving backward." - (let ((temp listy) - (result ())) - (catch 'out - (while temp - (if (equal (car temp) arg) - (throw 'out (cons (cdr temp) (list result))) - (setq result (nconc (list (car temp)) result)) - (setq temp (cdr temp))))))) - -;; miscellaneous io routines -(defun news-read-in-file (filename) - (erase-buffer) - (let ((start (point))) - (insert-file-contents filename) - (news-convert-format) - ;; Run each hook that applies to the current newsgroup. - (let ((hooks news-group-hook-alist)) - (while hooks - (goto-char start) - (if (string-match (car (car hooks)) news-group-name) - (funcall (cdr (car hooks)))) - (setq hooks (cdr hooks)))) - (goto-char start) - (forward-line 1) - (if (eobp) - (message "(Empty file?)") - (goto-char start)))) - -(defun news-convert-format () - (save-excursion - (save-restriction - (let* ((start (point)) - (end (condition-case () - (progn (search-forward "\n\n") (point)) - (error nil))) - has-from has-date) - (cond (end - (narrow-to-region start end) - (goto-char start) - (setq has-from (search-forward "\nFrom:" nil t)) - (cond ((and (not has-from) has-date) - (goto-char start) - (search-forward "\nDate:") - (beginning-of-line) - (kill-line) (kill-line))) - (news-delete-headers start) - (goto-char start))))))) - -(defun news-show-all-headers () - "Redisplay current news item with all original headers" - (interactive) - (let (news-ignored-headers - (buffer-read-only ())) - (erase-buffer) - (news-set-mode-line) - (news-read-in-file - (concat news-path - (string-subst-char ?/ ?. news-current-news-group) - "/" (int-to-string news-current-message-number))))) - -(defun news-delete-headers (pos) - (goto-char pos) - (and (stringp news-ignored-headers) - (while (re-search-forward news-ignored-headers nil t) - (beginning-of-line) - (delete-region (point) - (progn (re-search-forward "\n[^ \t]") - (forward-char -1) - (point)))))) - -(defun news-exit () - "Quit news reading session and update the .newsrc file." - (interactive) - (if (y-or-n-p "Do you really wanna quit reading news ? ") - (progn (message "Updating %s..." news-startup-file) - (news-update-newsrc-file) - (news-write-certifications) - (message "Updating %s... done" news-startup-file) - (message "Now do some real work") - (and (fboundp 'bury-buffer) (bury-buffer (current-buffer))) - (switch-to-buffer news-buffer-save) - (setq news-user-group-list ())) - (message ""))) - -(defun news-update-newsrc-file () - "Updates the .newsrc file in the users home dir." - (let ((newsrcbuf (find-file-noselect - (substitute-in-file-name news-startup-file))) - (tem news-user-group-list) - group) - (save-excursion - (if (not (null news-current-news-group)) - (news-update-message-read news-current-news-group - (news-cdar news-point-pdl))) - (set-buffer newsrcbuf) - (while tem - (setq group (assoc (car tem) news-group-article-assoc)) - (if (= (news-cadr (news-cadr group)) (news-caddr (news-cadr group))) - nil - (goto-char 0) - (if (search-forward (concat (car group) ": ") nil t) - (kill-line nil) - (insert (car group) ": \n") (backward-char 1)) - (insert (int-to-string (car (news-cadr group))) "-" - (int-to-string (news-cadr (news-cadr group))))) - (setq tem (cdr tem))) - (while news-unsubscribe-groups - (setq group (assoc (car news-unsubscribe-groups) - news-group-article-assoc)) - (goto-char 0) - (if (search-forward (concat (car group) ": ") nil t) - (progn - (backward-char 2) - (kill-line nil) - (insert "! " (int-to-string (car (news-cadr group))) - "-" (int-to-string (news-cadr (news-cadr group)))))) - (setq news-unsubscribe-groups (cdr news-unsubscribe-groups))) - (save-buffer) - (kill-buffer (current-buffer))))) - - -(defun news-unsubscribe-group (group) - "Removes you from newgroup GROUP." - (interactive (list (completing-read "Unsubscribe from group: " - news-group-article-assoc))) - (news-unsubscribe-internal group)) - -(defun news-unsubscribe-current-group () - "Removes you from the newsgroup you are now reading." - (interactive) - (if (y-or-n-p "Do you really want to unsubscribe from this group ? ") - (news-unsubscribe-internal news-current-news-group))) - -(defun news-unsubscribe-internal (group) - (let ((tem (assoc group news-group-article-assoc))) - (if tem - (progn - (setq news-unsubscribe-groups (cons group news-unsubscribe-groups)) - (news-update-message-read group (news-cdar news-point-pdl)) - (if (equal group news-current-news-group) - (news-next-group)) - (message "")) - (error "Not subscribed to group: %s" group)))) - -(defun news-save-item-in-file (file) - "Save the current article that is being read by appending to a file." - (interactive "FSave item in file: ") - (append-to-file (point-min) (point-max) file)) - -(defun news-get-pruned-list-of-files (gp-list end-file-no) - "Given a news group it finds all files in the news group. -The arg must be in slashified format. -Using ls was found to be too slow in a previous version." - (let - ((answer - (and - (not (and end-file-no - (equal (news-set-current-certifiable) - (news-group-certification gp-list)) - (setq news-list-of-files nil - news-list-of-files-possibly-bogus t))) - (let* ((file-directory (concat news-path - (string-subst-char ?/ ?. gp-list))) - tem - (last-winner - (and end-file-no - (news-wins file-directory end-file-no) - (news-find-first-or-last file-directory end-file-no 1)))) - (setq news-list-of-files-possibly-bogus t news-list-of-files nil) - (if last-winner - (progn - (setq news-list-of-files-possibly-bogus t - news-current-group-end last-winner) - (while (> last-winner end-file-no) - (news-push last-winner news-list-of-files) - (setq last-winner (1- last-winner))) - news-list-of-files) - (if (or (not (file-directory-p file-directory)) - (not (file-readable-p file-directory))) - nil - (setq news-list-of-files - (condition-case error - (directory-files file-directory) - (file-error - (if (string= (nth 2 error) "permission denied") - (message "Newsgroup %s is read-protected" - gp-list) - (signal 'file-error (cdr error))) - nil))) - (setq tem news-list-of-files) - (while tem - (if (or (not (string-match "^[0-9]*$" (car tem))) - ;; dont get confused by directories that look like numbers - (file-directory-p - (concat file-directory "/" (car tem))) - (<= (string-to-int (car tem)) end-file-no)) - (setq news-list-of-files - (delq (car tem) news-list-of-files))) - (setq tem (cdr tem))) - (if (null news-list-of-files) - (progn (setq news-current-group-end 0) - nil) - (setq news-list-of-files - (mapcar 'string-to-int news-list-of-files)) - (setq news-list-of-files (sort news-list-of-files '<)) - (setq news-current-group-end - (elt news-list-of-files - (1- (length news-list-of-files)))) - news-list-of-files))))))) - (or answer (progn (news-set-current-group-certification) nil)))) - -(defun news-read-files-into-buffer (group reversep) - (let* ((files-start-end (news-cadr (assoc group news-group-article-assoc))) - (start-file-no (car files-start-end)) - (end-file-no (news-cadr files-start-end)) - (buffer-read-only nil)) - (setq news-current-news-group group) - (setq news-current-message-number nil) - (setq news-current-group-end nil) - (news-set-mode-line) - (news-get-pruned-list-of-files group end-file-no) - (news-set-mode-line) - ;; @@ should be a lot smarter than this if we have to move - ;; @@ around correctly. - (setq news-point-pdl (list (cons (car files-start-end) - (news-cadr files-start-end)))) - (if (null news-list-of-files) - (progn (erase-buffer) - (setq news-current-group-end end-file-no) - (setq news-current-group-begin end-file-no) - (setq news-current-message-number end-file-no) - (news-set-mode-line) -; (message "No new articles in " group " group.") - nil) - (setq news-current-group-begin (car news-list-of-files)) - (if reversep - (setq news-current-message-number news-current-group-end) - (if (> (car news-list-of-files) end-file-no) - (setcdr (car news-point-pdl) (car news-list-of-files))) - (setq news-current-message-number news-current-group-begin)) - (news-set-message-counters) - (news-set-mode-line) - (news-read-in-file (concat news-path - (string-subst-char ?/ ?. group) - "/" - (int-to-string - news-current-message-number))) - (news-set-message-counters) - (news-set-mode-line) - t))) - -(defun news-add-news-group (gp) - "Resubscribe to or add a USENET news group named GROUP (a string)." -; @@ (completing-read ...) -; @@ could be based on news library file ../active (slightly facist) -; @@ or (expensive to compute) all directories under the news spool directory - (interactive "sAdd news group: ") - (let ((file-dir (concat news-path (string-subst-char ?/ ?. gp)))) - (save-excursion - (if (null (assoc gp news-group-article-assoc)) - (let ((newsrcbuf (find-file-noselect - (substitute-in-file-name news-startup-file)))) - (if (file-directory-p file-dir) - (progn - (switch-to-buffer newsrcbuf) - (goto-char 0) - (if (search-forward (concat gp "! ") nil t) - (progn - (message "Re-subscribing to group %s." gp) - ;;@@ news-unsubscribe-groups isn't being used - ;;(setq news-unsubscribe-groups - ;; (delq gp news-unsubscribe-groups)) - (backward-char 2) - (delete-char 1) - (insert ":")) - (progn - (message - "Added %s to your list of newsgroups." gp) - (end-of-buffer) - (insert gp ": 1-1\n"))) - (search-backward gp nil t) - (let (start end endofline tem) - (search-forward ": " nil t) - (setq end (point)) - (beginning-of-line) - (setq start (point)) - (end-of-line) - (setq endofline (point)) - (setq tem (buffer-substring start (- end 2))) - (let ((range (news-parse-range - (buffer-substring end endofline)))) - (setq news-group-article-assoc - (cons (list tem (list (car range) - (cdr range) - (cdr range))) - news-group-article-assoc)))) - (save-buffer) - (kill-buffer (current-buffer))) - (message "Newsgroup %s doesn't exist." gp))) - (message "Already subscribed to group %s." gp))))) - -(defun news-make-link-to-message (number newname) - "Forges a link to an rnews message numbered number (current if no arg) -Good for hanging on to a message that might or might not be -automatically deleted." - (interactive "P -FName to link to message: ") - (add-name-to-file - (concat news-path - (string-subst-char ?/ ?. news-current-news-group) - "/" (if number - (prefix-numeric-value number) - news-current-message-number)) - newname)) - -;;; caesar-region written by phr@prep.ai.mit.edu Nov 86 -;;; modified by tower@prep Nov 86 -(defun caesar-region (&optional n) - "Caesar rotation of region by N, default 13, for decrypting netnews." - (interactive (if current-prefix-arg ; Was there a prefix arg? - (list (prefix-numeric-value current-prefix-arg)) - (list nil))) - (cond ((not (numberp n)) (setq n 13)) - ((< n 0) (setq n (- 26 (% (- n) 26)))) - (t (setq n (% n 26)))) ;canonicalize N - (if (not (zerop n)) ; no action needed for a rot of 0 - (progn - (if (or (not (boundp 'caesar-translate-table)) - (/= (aref caesar-translate-table ?a) (+ ?a n))) - (let ((i 0) (lower "abcdefghijklmnopqrstuvwxyz") upper) - (message "Building caesar-translate-table...") - (setq caesar-translate-table (make-vector 256 0)) - (while (< i 256) - (aset caesar-translate-table i i) - (setq i (1+ i))) - (setq lower (concat lower lower) upper (upcase lower) i 0) - (while (< i 26) - (aset caesar-translate-table (+ ?a i) (aref lower (+ i n))) - (aset caesar-translate-table (+ ?A i) (aref upper (+ i n))) - (setq i (1+ i))) - (message "Building caesar-translate-table... done"))) - (let ((from (region-beginning)) - (to (region-end)) - (i 0) str len) - (setq str (buffer-substring from to)) - (setq len (length str)) - (while (< i len) - (aset str i (aref caesar-translate-table (aref str i))) - (setq i (1+ i))) - (goto-char from) - (kill-region from to) - (insert str))))) - -;;; news-caesar-buffer-body written by paul@media-lab.mit.edu Wed Oct 1, 1986 -;;; hacked further by tower@prep.ai.mit.edu -(defun news-caesar-buffer-body (&optional rotnum) - "Caesar rotates all letters in the current buffer by 13 places. -Used to encode/decode possibly offensive messages (commonly in net.jokes). -With prefix arg, specifies the number of places to rotate each letter forward. -Mail and USENET news headers are not rotated." - (interactive (if current-prefix-arg ; Was there a prefix arg? - (list (prefix-numeric-value current-prefix-arg)) - (list nil))) - (save-excursion - (let ((buffer-status buffer-read-only)) - (setq buffer-read-only nil) - ;; setup the region - (set-mark (if (progn (goto-char (point-min)) - (search-forward - (concat "\n" - (if (equal major-mode 'news-mode) - "" - mail-header-separator) - "\n") nil t)) - (point) - (point-min))) - (goto-char (point-max)) - (caesar-region rotnum) - (setq buffer-read-only buffer-status))))
--- a/lisp/packages/rnewspost.el Mon Aug 13 08:45:53 2007 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,468 +0,0 @@ -;;; rnewspost.el --- USENET news poster/mailer for GNU Emacs -;; Keywords: mail, news - -;; Copyright (C) 1985, 1993, 1994 Free Software Foundation, Inc. - -;; This file is part of XEmacs. - -;; XEmacs 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. - -;; XEmacs 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 XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. - -;;; Synched up with: FSF 19.28. - -;; moved posting and mail code from rnews.el -;; tower@prep.ai.mit.edu Wed Oct 29 1986 -;; brought posting code almost up to the revision of RFC 850 for News 2.11 -;; - couldn't see handling the special meaning of the Keyword: poster -;; - not worth the code space to support the old A news Title: (which -;; Subject: replaced) and Article-I.D.: (which Message-ID: replaced) -;; tower@prep Nov 86 -;; changed C-c C-r key-binding due to rename of news-caesar-buffer-body -;; tower@prep 21 Nov 86 -;; added (require 'rnews) tower@prep 22 Apr 87 -;; restricted call of news-show-all-headers in news-post-news & news-reply -;; tower@prep 28 Apr 87 -;; commented out Posting-Front-End to save USENET bytes tower@prep Jul 31 87 -;; commented out -n and -t args in news-inews tower@prep 15 Oct 87 -(require 'sendmail) -(require 'rnews) - -;Now in paths.el. -;(defvar news-inews-program "inews" -; "Function to post news.") - -;; Replying and posting news items are done by these functions. -;; imported from rmail and modified to work with rnews ... -;; Mon Mar 25,1985 at 03:07:04 ads@mit-hermes. -;; this is done so that rnews can operate independently from rmail.el and -;; sendmail and dosen't have to autoload these functions. -;; -;;; >> Nuked by Mly to autoload those functions again, as the duplication of -;;; >> code was making maintenance too difficult. - -(defvar news-reply-mode-map () "Mode map used by news-reply.") - -(or news-reply-mode-map - (progn - (setq news-reply-mode-map (make-keymap)) - (define-key news-reply-mode-map "\C-c?" 'describe-mode) - (define-key news-reply-mode-map "\C-c\C-f\C-d" 'news-reply-distribution) - (define-key news-reply-mode-map "\C-c\C-f\C-k" 'news-reply-keywords) - (define-key news-reply-mode-map "\C-c\C-f\C-n" 'news-reply-newsgroups) - (define-key news-reply-mode-map "\C-c\C-f\C-f" 'news-reply-followup-to) - (define-key news-reply-mode-map "\C-c\C-f\C-s" 'mail-subject) - (define-key news-reply-mode-map "\C-c\C-f\C-a" 'news-reply-summary) - (define-key news-reply-mode-map "\C-c\C-r" 'news-caesar-buffer-body) - (define-key news-reply-mode-map "\C-c\C-w" 'news-reply-signature) - (define-key news-reply-mode-map "\C-c\C-y" 'news-reply-yank-original) - (define-key news-reply-mode-map "\C-c\C-q" 'mail-fill-yanked-message) - (define-key news-reply-mode-map "\C-c\C-c" 'news-inews) - (define-key news-reply-mode-map "\C-c\C-s" 'news-inews) - (define-key news-reply-mode-map 'button3 'news-reply-menu))) - -(defun news-reply-mode () - "Major mode for editing news to be posted on USENET. -First-time posters are asked to please read the articles in newsgroup: - news.announce.newusers . -Like Text Mode but with these additional commands: - -C-c C-s news-inews (post the message) C-c C-c news-inews -C-c C-f move to a header field (and create it if there isn't): - C-c C-f C-n move to Newsgroups: C-c C-f C-s move to Subj: - C-c C-f C-f move to Followup-To: C-c C-f C-k move to Keywords: - C-c C-f C-d move to Distribution: C-c C-f C-a move to Summary: -C-c C-y news-reply-yank-original (insert current message, in NEWS). -C-c C-q mail-fill-yanked-message (fill what was yanked). -C-c C-r caesar rotate all letters by 13 places in the article's body (rot13)." - (interactive) - ;; require... - (or (fboundp 'mail-setup) (load "sendmail")) - (kill-all-local-variables) - (make-local-variable 'mail-reply-buffer) - (setq mail-reply-buffer nil) - (set-syntax-table text-mode-syntax-table) - (use-local-map news-reply-mode-map) - (setq local-abbrev-table text-mode-abbrev-table) - (setq major-mode 'news-reply-mode) - (setq mode-name "News") - (make-local-variable 'paragraph-separate) - (make-local-variable 'paragraph-start) - (setq paragraph-start (concat "^" mail-header-separator "$\\|" - paragraph-start)) - (setq paragraph-separate (concat "^" mail-header-separator "$\\|" - paragraph-separate)) - (run-hooks 'text-mode-hook 'news-reply-mode-hook)) - -(defvar news-reply-yank-from "" - "Save From: field for news-reply-yank-original.") - -(defvar news-reply-yank-message-id "" - "Save Message-Id: field for news-reply-yank-original.") - -(defun news-reply-yank-original (arg) - "Insert the message being replied to, if any (in postnews). -Puts point before the text and mark after. -Indents each nonblank line ARG spaces (default 3). -Just \\[universal-argument] as argument means don't indent -and don't delete any header fields." - (interactive "P") - (let ((zmacs-regions nil)) - (mail-yank-original arg) - (exchange-point-and-mark) - (run-hooks 'news-reply-header-hook))) - -(defvar news-reply-header-hook - '(lambda () - (insert "In article " news-reply-yank-message-id - " " news-reply-yank-from " writes:\n\n")) - "Hook for inserting a header at the top of a yanked message.") - -(defun news-reply-newsgroups () - "Move point to end of Newsgroups: field. -RFC 850 constrains the Newsgroups: field to be a comma separated list of valid -newsgroups names at your site: -Newsgroups: news.misc,comp.misc,rec.misc" - (interactive) - (expand-abbrev) - (goto-char (point-min)) - (mail-position-on-field "Newsgroups")) - -(defun news-reply-followup-to () - "Move point to end of Followup-To: field. Create the field if none. -One usually requests followups to only one newsgroup. -RFC 850 constrains the Followup-To: field to be a comma separated list of valid -newsgroups names at your site, that are also in the Newsgroups: field: -Newsgroups: news.misc,comp.misc,rec.misc,misc.misc,soc.misc -Followup-To: news.misc,comp.misc,rec.misc" - (interactive) - (expand-abbrev) - (or (mail-position-on-field "Followup-To" t) - (progn (mail-position-on-field "newsgroups") - (insert "\nFollowup-To: "))) - ;; @@ could do a completing read based on the Newsgroups: field to - ;; @@ fill in the Followup-To: field -) - -(defun news-reply-distribution () - "Move point to end of Distribution: optional field. -Create the field if none. Without this field the posting goes to all of -USENET. The field is used to restrict the posting to parts of USENET." - (interactive) - (expand-abbrev) - (mail-position-on-field "Distribution") - ;; @@could do a completing read based on the news library file: - ;; @@ ../distributions to fill in the field. - ) - -(defun news-reply-keywords () - "Move point to end of Keywords: optional field. Create the field if none. -Used as an aid to the news reader, it can contain a few, well selected keywords -identifying the message." - (interactive) - (expand-abbrev) - (mail-position-on-field "Keywords")) - -(defun news-reply-summary () - "Move point to end of Summary: optional field. Create the field if none. -Used as an aid to the news reader, it can contain a succinct -summary (abstract) of the message." - (interactive) - (expand-abbrev) - (mail-position-on-field "Summary")) - -(defun news-reply-signature () - "The inews program appends ~/.signature automatically." - (interactive) - (message "~/.signature will be appended automatically.")) - -(defun news-setup (to subject in-reply-to newsgroups replybuffer) - "Setup the news reply or posting buffer with the proper headers and in -news-reply-mode." - (setq mail-reply-buffer replybuffer) - (let ((mail-setup-hook nil)) - (if (null to) - ;; this hack is needed so that inews wont be confused by - ;; the fcc: and bcc: fields - (let ((mail-self-blind nil) - (mail-archive-file-name nil)) - (mail-setup to subject in-reply-to nil replybuffer nil) - (beginning-of-line) - ;;(kill-line 1) ; XEmacs fix to longstanding damned annoying bug - (delete-region (point) (progn (forward-line 1) (point))) - (goto-char (point-max))) - (mail-setup to subject in-reply-to nil replybuffer nil)) - ;;;(mail-position-on-field "Posting-Front-End") - ;;;(insert (emacs-version)) - (goto-char (point-max)) - (if (let ((case-fold-search t)) - (re-search-backward "^Subject:" (point-min) t)) - (progn (beginning-of-line) - (insert "Newsgroups: " (or newsgroups "") "\n") - (if (not newsgroups) - (backward-char 1) - (goto-char (point-max))))) - (run-hooks 'news-setup-hook))) - -(defun news-inews () - "Send a news message using inews." - (interactive) - (let* ((case-fold-search nil) - ;;newsgroups subject - ) - (save-excursion - (save-restriction - (goto-char (point-min)) - (search-forward (concat "\n" mail-header-separator "\n")) - (narrow-to-region (point-min) (point)) - ;;(setq newsgroups (mail-fetch-field "newsgroups") - ;; subject (mail-fetch-field "subject")) - ) - (widen) - (goto-char (point-min)) - (run-hooks 'news-inews-hook) - (goto-char (point-min)) - (search-forward (concat "\n" mail-header-separator "\n")) - (replace-match "\n\n") - (goto-char (point-max)) - ;; require a newline at the end for inews to append .signature to - (or (= (preceding-char) ?\n) - (insert ?\n)) - (message "Posting to USENET...") - (call-process-region (point-min) (point-max) - news-inews-program nil 0 nil - "-h") ; take all header lines! - ;@@ setting of subject and newsgroups still needed? - ;"-t" subject - ;"-n" newsgroups - (message "Posting to USENET... done") - (goto-char (point-min)) ;restore internal header separator - (search-forward "\n\n") - (replace-match (concat "\n" mail-header-separator "\n")) - (set-buffer-modified-p nil)) - (and (fboundp 'bury-buffer) (bury-buffer)))) - -(defvar news-reply-subject-prefix nil - "*The prefix to use when replying to a news message (such as \"Re:\").") - -;@@ shares some code with news-reply and news-post-news -(defun news-mail-reply () - "Mail a reply to the author of the current article. -While composing the reply, use \\[news-reply-yank-original] to yank the -original message into it." - (interactive) - (let (from subject date to reply-to references message-id ;;b - (buffer (current-buffer))) - (save-restriction - (widen) - (narrow-to-region (point-min) (progn (goto-char (point-min)) - (search-forward "\n\n") - (- (point) 1))) - (setq from (mail-fetch-field "from") - subject (mail-fetch-field "subject") - reply-to (mail-fetch-field "reply-to") - date (mail-fetch-field "date") - references (mail-fetch-field "references") - message-id (mail-fetch-field "message-id")) - (if (and news-reply-subject-prefix subject - (not (string-match - (concat "^[ \t]*" (regexp-quote news-reply-subject-prefix) - "[ )t]*") - subject))) - (setq subject (concat news-reply-subject-prefix " " subject))) - (setq to from) - (pop-to-buffer "*mail*") -;; (setq b (current-buffer)) - (if (mail nil (if reply-to reply-to to) subject - (let ((stop-pos - (string-match " *at \\| *@ \\| *(\\| *<" from))) - (concat (if stop-pos (substring from 0 stop-pos) from) - "'s message of " - date)) - nil - buffer) - (save-excursion -;; (set-buffer b) - (mail-position-on-field "References") - (if references (insert references)) - (if (and references message-id) (insert " ")) - (if message-id (insert message-id))))))) - -;@@ the guts of news-reply and news-post-news should be combined. -tower -(defun news-reply () - "Compose and post a reply (aka a followup) to the current article on USENET. -While composing the followup, use \\[news-reply-yank-original] to yank the -original message into it." - (interactive) - (if (y-or-n-p "Are you sure you want to followup to all of USENET? ") - (let (from subject date followup-to newsgroups message-of - references distribution message-id - (buffer (current-buffer))) - (save-restriction - (and (not (= 0 (buffer-size))) ;@@real problem is non-existence of - ;@@ of article file - (equal major-mode 'news-mode) ;@@ if rmail-mode, - ;@@ should show full headers - (progn - (news-show-all-headers) ;@@ should save/restore header state, - ;@@ but rnews.el lacks support - (narrow-to-region (point-min) (progn (goto-char (point-min)) - (search-forward "\n\n") - (- (point) 1))))) - (setq from (mail-fetch-field "from") - news-reply-yank-from from - ;; @@ not handling old Title: field - subject (mail-fetch-field "subject") - date (mail-fetch-field "date") - followup-to (mail-fetch-field "followup-to") - newsgroups (or followup-to - (mail-fetch-field "newsgroups")) - references (mail-fetch-field "references") - ;; @@ not handling old Article-I.D.: field - distribution (mail-fetch-field "distribution") - message-id (mail-fetch-field "message-id") - news-reply-yank-message-id message-id) - (pop-to-buffer "*post-news*") - (news-reply-mode) - (if (and (buffer-modified-p) - (not - (y-or-n-p "Unsent article being composed; erase it? "))) - () - (progn - (erase-buffer) - (and subject - (progn (if (string-match "\\`Re: " subject) - (while (string-match "\\`Re: " subject) - (setq subject (substring subject 4)))) - (setq subject (concat "Re: " subject)))) - (and from - (progn - (let ((stop-pos - (string-match " *at \\| *@ \\| *(\\| *<" from))) - (setq message-of - (concat - (if stop-pos (substring from 0 stop-pos) from) - "'s message of " - date))))) - (news-setup - nil - subject - message-of - newsgroups - buffer) - (if followup-to - (progn (news-reply-followup-to) - (insert followup-to))) - (if distribution - (progn - (mail-position-on-field "Distribution") - (insert distribution))) - (mail-position-on-field "References") - (if references - (insert references)) - (if (and references message-id) - (insert " ")) - (if message-id - (insert message-id)) - (goto-char (point-max)))))) - (message ""))) - -;@@ the guts of news-reply and news-post-news should be combined. -tower -(defun news-post-news () - "Begin editing a new USENET news article to be posted. -Type \\[describe-mode] once editing the article to get a list of commands." - (interactive) - (if (y-or-n-p "Are you sure you want to post to all of USENET? ") - (let ((buffer (current-buffer))) - (save-restriction - (and (not (= 0 (buffer-size))) ;@@real problem is non-existence of - ;@@ of article file - (equal major-mode 'news-mode) ;@@ if rmail-mode, - ;@@ should show full headers - (progn - (news-show-all-headers) ;@@ should save/restore header state, - ;@@ but rnews.el lacks support - (narrow-to-region (point-min) (progn (goto-char (point-min)) - (search-forward "\n\n") - (- (point) 1))))) - (setq news-reply-yank-from (mail-fetch-field "from") - ;; @@ not handling old Article-I.D.: field - news-reply-yank-message-id (mail-fetch-field "message-id"))) - (pop-to-buffer "*post-news*") - (news-reply-mode) - (if (and (buffer-modified-p) - (not (y-or-n-p "Unsent article being composed; erase it? "))) - () ;@@ not saving point from last time - (progn (erase-buffer) - (news-setup () () () () buffer)))) - (message ""))) - -(defun news-mail-other-window () - "Send mail in another window. -While composing the message, use \\[news-reply-yank-original] to yank the -original message into it." - (interactive) - (mail-other-window nil nil nil nil nil (current-buffer))) - - -;; menus - -(defconst news-reply-menu - '("Post News" - "Go to Field:" - "----" - ["Subject:" mail-subject t] - ["Summary:" news-reply-summary t] - ["Keywords:" news-reply-keywords t] - ["Newsgroups:" news-reply-newsgroups t] - ["Followup-To:" news-reply-followup-to t] - ["Distribution:" news-reply-distribution t] - ["Text" (let ((mail-header-separator "")) (mail-text)) t] - "----" - "Miscellaneous Commands:" - "----" - ["Yank Original" news-reply-yank-original t] - ["Fill Yanked Message" mail-fill-yanked-message t] -;; ["Insert Signature" news-reply-signature t] - ["Caesar (rot13) Message" news-caesar-buffer-body t] - "----" - ["Post Message" news-inews t] - )) - -(defun news-reply-menu (event) - (interactive "e") - (select-window (event-window event)) - (let (yank sig fill rot (rest news-reply-menu)) - (while rest - (if (vectorp (car rest)) - (cond ((eq (aref (car rest) 1) 'news-reply-yank-original) - (setq yank (car rest))) - ((eq (aref (car rest) 1) 'news-reply-signature) - (setq sig (car rest))) - ((eq (aref (car rest) 1) 'mail-fill-yanked-message) - (setq fill (car rest))) - ((eq (aref (car rest) 1) 'news-caesar-buffer-body) - (setq rot (car rest))))) - (setq rest (cdr rest))) - (if yank (aset yank 2 (not (null mail-reply-buffer)))) - (if sig (aset sig 2 (and (stringp mail-signature-file) - (file-exists-p mail-signature-file)))) - (let ((body-p (save-excursion - (goto-char (point-min)) - (and (search-forward (concat "\n" mail-header-separator - "\n") nil t) - (not (looking-at "[ \t\n]*\\'")))))) - (if fill (aset fill 2 body-p)) - (if rot (aset rot 2 body-p)))) - (let ((popup-menu-titles nil)) - (popup-menu 'news-reply-menu)))
--- a/lisp/packages/saveconf.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/saveconf.el Mon Aug 13 08:46:35 2007 +0200 @@ -269,8 +269,10 @@ ;; Recover buffer contexts, if any. ;; (while (setq sexpr (read context-buffer)) - (set-buffer (find-file-noselect sexpr)) - (goto-char (read context-buffer))) + (set-buffer (find-file-noselect sexpr t)) + (if (zerop (buffer-size)) + (kill-buffer (current-buffer)) + (goto-char (read context-buffer)))) (bury-buffer "*scratch*") (kill-buffer context-buffer) t )
--- a/lisp/packages/saveplace.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/saveplace.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,11 +1,11 @@ ;;; saveplace.el --- automatically save place in files. -;; Copyright (C) 1993 Free Software Foundation, Inc. +;; Copyright (C) 1993, 1994 Free Software Foundation, Inc. ;; Author: Karl Fogel <kfogel@cs.oberlin.edu> ;; Maintainer: FSF ;; Created: July, 1993 -;; Version: 1.0 +;; Version: >1.0 (RMS doesn't keep version numbers :-( ) ;; Keywords: bookmarks, placeholders ;; This file is part of XEmacs. @@ -22,9 +22,12 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: Not synched with FSF but close to 19.30. +;;; Synched up with: FSF 19.34. + +;;; Commentary: ;; Automatically save place in files, so that visiting them later ;; (even during a different Emacs session) automatically moves point @@ -32,8 +35,10 @@ ;; value of buffer-local variable save-place to determine whether to ;; save position or not. ;; -;; Don't autoload this, rather, load it, since it modifies -;; find-file-hooks and other hooks. +;; Thanks to Stefan Schoef, who sent a patch with the +;; `save-place-version-control' stuff in it. + +;;; Code: ;; this is what I was using during testing: ;; (define-key ctl-x-map "p" 'toggle-save-place) @@ -58,12 +63,22 @@ (make-variable-buffer-local 'save-place) -(defvar save-place-file "~/.emacs-places" +(defvar save-place-file (convert-standard-filename "~/.emacs-places") "*Name of the file that records `save-place-alist' value.") +(defvar save-place-version-control 'nospecial + "*Controls whether to make numbered backups of master save-place file. +It can have four values: t, nil, `never', and `nospecial'. The first +three have the same meaning that they do for the variable +`version-control', and the final value `nospecial' means just use the +value of `version-control'.") + (defvar save-place-loaded nil "Non-nil means that the `save-place-file' has been loaded.") +(defvar save-place-limit nil + "Maximum number of entries to retain in the list; nil means no limit.") + (defun toggle-save-place (&optional parg) "Toggle whether to save your place in this file between sessions. If this mode is enabled, point is recorded when you kill the buffer @@ -78,13 +93,12 @@ \(setq-default save-place t\)" (interactive "P") (if (not buffer-file-name) - (message - (format "Buffer \"%s\" not visiting a file." (buffer-name))) + (message "Buffer `%s' not visiting a file" (buffer-name)) (if (and save-place (or (not parg) (<= parg 0))) (progn - (message "No place will be saved in this file.") + (message "No place will be saved in this file") (setq save-place nil)) - (message "Place will be saved.") + (message "Place will be saved") (setq save-place t)))) (defun save-place-to-alist () @@ -102,13 +116,16 @@ (setq save-place-alist (delq cell save-place-alist)))) (if save-place (setq save-place-alist - (cons (cons buffer-file-name (point)) + (cons (cons buffer-file-name + (if (not (eq major-mode 'hexl-mode)) + (point) + (1+ (hexl-current-address)))) save-place-alist)))))) (defun save-place-alist-to-file () (let ((file (expand-file-name save-place-file))) (save-excursion - (message (format "Saving places to %s..." file)) + (message "Saving places to %s..." file) (set-buffer (get-buffer-create " *Saved Places*")) (delete-region (point-min) (point-max)) (if (file-readable-p file) @@ -116,9 +133,16 @@ (delete-region (point-min) (point-max)) (goto-char (point-min)) (print save-place-alist (current-buffer)) - (write-file file) - (kill-buffer (current-buffer)) - (message (format "Saving places to %s... done." file))))) + (let ((version-control + (cond + ((null save-place-version-control) nil) + ((eq 'never save-place-version-control) 'never) + ((eq 'nospecial save-place-version-control) version-control) + (t + t)))) + (write-file file) + (kill-buffer (current-buffer)) + (message "Saving places to %s...done" file))))) (defun load-save-place-alist-from-file () (if (not save-place-loaded) @@ -129,8 +153,7 @@ ;; load it if it exists: (if (file-readable-p file) (save-excursion - (message (format "Loading places from %s..." - save-place-file)) + (message "Loading places from %s..." save-place-file) ;; don't want to use find-file because we have been ;; adding hooks to it. (set-buffer (get-buffer-create " *Saved Places*")) @@ -140,8 +163,25 @@ (setq save-place-alist (car (read-from-string (buffer-substring (point-min) (point-max))))) + + ;; If there is a limit, and we're over it, then we'll + ;; have to truncate the end of the list: + (if save-place-limit + (if (<= save-place-limit 0) + ;; Zero gets special cased. I'm not thrilled + ;; with this, but the loop for >= 1 is tight. + (setq save-place-alist nil) + ;; Else the limit is >= 1, so enforce it by + ;; counting and then `setcdr'ing. + (let ((s save-place-alist) + (count 1)) + (while s + (if (>= count save-place-limit) + (setcdr s nil) + (setq count (1+ count))) + (setq s (cdr s)))))) (kill-buffer (current-buffer)) - (message (format "Loading places from %s... done." file)) + (message "Loading places from %s...done" file) t) t) nil)))) @@ -160,25 +200,28 @@ ;; overhead of function call by checking here too. (and buffer-file-name (save-place-to-alist)) (setq buf-list (cdr buf-list)))))) - -(add-hook - 'find-file-hooks - (function - (lambda () - (or save-place-loaded (load-save-place-alist-from-file)) - (let ((cell (assoc buffer-file-name save-place-alist))) - (if cell - (progn - (goto-char (cdr cell)) - ;; and make sure it will be saved again for later. - (setq save-place t))))))) + +(defun save-place-find-file-hook () + (or save-place-loaded (load-save-place-alist-from-file)) + (let ((cell (assoc buffer-file-name save-place-alist))) + (if cell + (progn + (or after-find-file-from-revert-buffer + (goto-char (cdr cell))) + ;; and make sure it will be saved again for later + (setq save-place t))))) -(add-hook 'kill-emacs-hook - (function - (lambda () - (progn - (save-places-to-alist) - (save-place-alist-to-file))))) +(defun save-place-kill-emacs-hook () + ;; First update the alist. This loads the old save-place-file if nec. + (save-places-to-alist) + ;; Now save the alist in the file, if we have ever loaded the file + ;; (including just now). + (if save-place-loaded + (save-place-alist-to-file))) + +(add-hook 'find-file-hooks 'save-place-find-file-hook t) + +(add-hook 'kill-emacs-hook 'save-place-kill-emacs-hook) (add-hook 'kill-buffer-hook 'save-place-to-alist)
--- a/lisp/packages/server.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/server.el Mon Aug 13 08:46:35 2007 +0200 @@ -21,57 +21,58 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with FSF 19.30. +;;; Synched up with FSF 19.34. ;;; Commentary: -;;; This Lisp code is run in Emacs when it is to operate as -;;; a server for other processes. +;; This Lisp code is run in Emacs when it is to operate as +;; a server for other processes. -;;; Load this library and do M-x server-edit to enable Emacs as a server. -;;; Emacs runs the program ../etc/emacsserver as a subprocess -;;; for communication with clients. If there are no client buffers to edit, -;;; server-edit acts like (switch-to-buffer (other-buffer)) +;; Load this library and do M-x server-edit to enable Emacs as a server. +;; Emacs runs the program ../../lib-src/emacsserver as a subprocess +;; for communication with clients. If there are no client buffers to edit, +;; server-edit acts like (switch-to-buffer (other-buffer)) -;;; When some other program runs "the editor" to edit a file, -;;; "the editor" can be the Emacs client program ../etc/emacsclient. -;;; This program transmits the file names to Emacs through -;;; the server subprocess, and Emacs visits them and lets you edit them. +;; When some other program runs "the editor" to edit a file, +;; "the editor" can be the Emacs client program ../../lib-src/emacsclient. +;; This program transmits the file names to Emacs through +;; the server subprocess, and Emacs visits them and lets you edit them. -;;; Note that any number of clients may dispatch files to emacs to be edited. +;; Note that any number of clients may dispatch files to emacs to be edited. -;;; When you finish editing a Server buffer, again call server-edit -;;; to mark that buffer as done for the client and switch to the next -;;; Server buffer. When all the buffers for a client have been edited -;;; and exited with server-edit, the client "editor" will return -;;; to the program that invoked it. +;; When you finish editing a Server buffer, again call server-edit +;; to mark that buffer as done for the client and switch to the next +;; Server buffer. When all the buffers for a client have been edited +;; and exited with server-edit, the client "editor" will return +;; to the program that invoked it. -;;; Your editing commands and Emacs's display output go to and from -;;; the terminal in the usual way. Thus, server operation is possible -;;; only when Emacs can talk to the terminal at the time you invoke -;;; the client. This is possible in four cases: +;; Your editing commands and Emacs's display output go to and from +;; the terminal in the usual way. Thus, server operation is possible +;; only when Emacs can talk to the terminal at the time you invoke +;; the client. This is possible in four cases: -;;; 1. On a window system, where Emacs runs in one window and the -;;; program that wants to use "the editor" runs in another. +;; 1. On a window system, where Emacs runs in one window and the +;; program that wants to use "the editor" runs in another. -;;; 2. On a multi-terminal system, where Emacs runs on one terminal and the -;;; program that wants to use "the editor" runs on another. +;; 2. On a multi-terminal system, where Emacs runs on one terminal and the +;; program that wants to use "the editor" runs on another. -;;; 3. When the program that wants to use "the editor" is running -;;; as a subprocess of Emacs. +;; 3. When the program that wants to use "the editor" is running +;; as a subprocess of Emacs. -;;; 4. On a system with job control, when Emacs is suspended, the program -;;; that wants to use "the editor" will stop and display -;;; "Waiting for Emacs...". It can then be suspended, and Emacs can be -;;; brought into the foreground for editing. When done editing, Emacs is -;;; suspended again, and the client program is brought into the foreground. +;; 4. On a system with job control, when Emacs is suspended, the program +;; that wants to use "the editor" will stop and display +;; "Waiting for Emacs...". It can then be suspended, and Emacs can be +;; brought into the foreground for editing. When done editing, Emacs is +;; suspended again, and the client program is brought into the foreground. -;;; The buffer local variable "server-buffer-clients" lists -;;; the clients who are waiting for this buffer to be edited. -;;; The global variable "server-clients" lists all the waiting clients, -;;; and which files are yet to be edited for each. +;; The buffer local variable "server-buffer-clients" lists +;; the clients who are waiting for this buffer to be edited. +;; The global variable "server-clients" lists all the waiting clients, +;; and which files are yet to be edited for each. ;;; Code: @@ -194,7 +195,7 @@ ;; Remove this line from STRING. (setq string (substring string (match-end 0))) (if (string-match "^Error: " request) - (message (concat "Server error: " (substring request (match-end 0)))) + (message "Server error: %s" (substring request (match-end 0))) (if (string-match "^Client: " request) (progn (setq request (substring request (match-end 0))) @@ -205,7 +206,11 @@ (substring request (match-beginning 0) (1- (match-end 0))))) (setq request (substring request (match-end 0))) (if (string-match "\\`\\+[0-9]+\\'" arg) + ;; ARG is a line number option. (setq lineno (read (substring arg 1))) + ;; ARG is a file name. + ;; Collapse multiple slashes to single slashes. + (setq arg (command-line-normalize-file-name arg)) (setq files (cons (list arg lineno) files)) @@ -223,7 +228,9 @@ (defun server-visit-files (files client) "Finds FILES and returns the list CLIENT with the buffers nconc'd. FILES is an alist whose elements are (FILENAME LINENUMBER)." - (let (client-record (obuf (current-buffer))) + ;; Bind last-nonmenu-event to force use of keyboard, not mouse, for queries. + ;; XEmacs: this doesn't work as far as I can tell. -sb + (let (client-record (last-nonmenu-event t) (obuf (current-buffer))) ;; Restore the current buffer afterward, but not using save-excursion, ;; because we don't want to save point in this buffer ;; if it happens to be one of those specified by the server. @@ -284,6 +291,7 @@ ;; It cannot handle that. (or first (sit-for 1)) (setq first nil) + ;; XEmacs: FSF uses obsolete send-string (process-send-string server-process (format "Close: %s Done\n" (car client))) (server-log (format "Close: %s Done\n" (car client)))))
--- a/lisp/packages/spell.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/spell.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,8 +1,10 @@ ;;; spell.el --- spelling correction interface for Emacs. -;; Keywords: wp, unix ;; Copyright (C) 1985 Free Software Foundation, Inc. +;; Maintainer: FSF +;; Keywords: wp, unix + ;; This file is part of XEmacs. ;; XEmacs is free software; you can redistribute it and/or modify it @@ -17,9 +19,19 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. + +;;; Synched up with: FSF 19.34. + +;;; Commentary: -;;; Synched up with: FSF 19.28. +;; This mode provides an Emacs interface to the UNIX spell(1) program. +;; Entry points are `spell-buffer', `spell-word', `spell-region' and +;; `spell-string'. These facilities are documented in the Emacs user's +;; manual. + +;;; Code: (defvar spell-command "spell" "*Command to run the spell program.") @@ -29,6 +41,10 @@ This function might remove text-processor commands. nil means don't alter the text before checking it.") +;;;###autoload +(put 'spell-filter 'risky-local-variable t) + +;;;###autoload (defun spell-buffer () "Check spelling of every word in the buffer. For each incorrect word, you are asked for the correct spelling @@ -38,6 +54,7 @@ (interactive) (spell-region (point-min) (point-max) "buffer")) +;;;###autoload (defun spell-word () "Check spelling of word at or before point. If it is not correct, ask user for the correct spelling @@ -52,6 +69,7 @@ (setq end (point))) (spell-region beg end (buffer-substring beg end)))) +;;;###autoload (defun spell-region (start end &optional description) "Like `spell-buffer' but applies only to region. Used in a program, applies from START to END. @@ -113,6 +131,7 @@ newword))))))) +;;;###autoload (defun spell-string (string) "Check spelling of string supplied as argument." (interactive "sSpell string: ") @@ -133,3 +152,5 @@ (while (search-forward "\n" nil t) (replace-match " ")) (message "%sincorrect" (buffer-substring 1 (point-max))))))) + +;;; spell.el ends here
--- a/lisp/packages/texinfmt.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/texinfmt.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,26 +1,28 @@ -;;;; texinfmt.el -;;; Copyright (C) 1985, 1986, 1988, 1990, 1991, -;;; 1992, 1993, 1994, 1995 Free Software Foundation, Inc. +;;; texinfmt.el --- format Texinfo files into Info files. + +;; Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993 Free Software +;; Foundation, Inc. ;; Maintainer: Robert J. Chassell <bug-texinfo@prep.ai.mit.edu> -;;; This file is part of GNU Emacs. +;; This file is part of XEmacs. -;; 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 +;; XEmacs 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. +;; XEmacs 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, 675 Mass Ave, Cambridge, MA 02139, USA. +;; along with XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Code: @@ -891,11 +893,6 @@ (file-name-nondirectory (expand-file-name arg))) (insert "Info file: " texinfo-format-filename ", -*-Text-*-\n" - ;; Date string removed so that regression testing is easier. - ;; "produced on " - ;; (substring (current-time-string) 8 10) " " - ;; (substring (current-time-string) 4 7) " " - ;; (substring (current-time-string) -4) " " "produced by `texinfo-format-buffer'\n" "from file" (if (buffer-file-name input-buffer) @@ -1568,10 +1565,7 @@ ; The `@today{}' command requires a pair of braces, like `@dots{}'. (defun texinfo-format-today () (texinfo-parse-arg-discard) - (insert (format "%s %s %s" - (substring (current-time-string) 8 10) - (substring (current-time-string) 4 7) - (substring (current-time-string) -4)))) + (insert (format-time-string "%e %b %Y"))) ;;; @ignore @@ -2792,11 +2786,11 @@ ;;; @set, @clear, @ifset, @ifclear ;; If a flag is set with @set FLAG, then text between @ifset and @end -;; ifset is formatted normally, but if the flag is is cleared with +;; ifset is formatted normally, but if the flag is cleared with ;; @clear FLAG, then the text is not formatted; it is ignored. ;; If a flag is cleared with @clear FLAG, then text between @ifclear -;; and @end ifclear is formatted normally, but if the flag is is set with +;; and @end ifclear is formatted normally, but if the flag is set with ;; @set FLAG, then the text is not formatted; it is ignored. @ifclear ;; is the opposite of @ifset. @@ -2896,7 +2890,7 @@ ;; In the original version, include files were ignored by Info but ;; incorporated in to the printed manual. To make references to the ;; included file, the Texinfo source file has to refer to the included -;; files using the `(filename)nodename' format for refering to other +;; files using the `(filename)nodename' format for referring to other ;; Info files. Also, the included files had to be formatted on their ;; own. It was just like they were another file. @@ -2989,7 +2983,6 @@ (put 'settitle 'texinfo-format 'texinfo-discard-line-with-args) (put 'setx 'texinfo-format 'texinfo-discard-line-with-args) (put 'shortcontents 'texinfo-format 'texinfo-discard-line-with-args) -(put 'shorttitlepage 'texinfo-format 'texinfo-discard-line-with-args) (put 'smallbook 'texinfo-format 'texinfo-discard-line) (put 'summarycontents 'texinfo-format 'texinfo-discard-line-with-args)
--- a/lisp/packages/texnfo-upd.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/texnfo-upd.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,150 +1,152 @@ -;;; Texinfo mode utilities for updating nodes and menus in Texinfo files. -;;; Copyright 1989, 1990, 1991, 1992 Free Software Foundation +;;; texnfo-upd.el --- utilities for updating nodes and menus in Texinfo files + +;; Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. ;; Author: Robert J. Chassell ;; Maintainer: bug-texinfo@prep.ai.mit.edu ;; Keywords: maint, tex, docs -;; This file is part of GNU Emacs. +;; This file is part of XEmacs. -;; GNU Emacs is free software; you can redistribute it and/or modify +;; XEmacs 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. +;; XEmacs 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, 675 Mass Ave, Cambridge, MA 02139, USA. +;; along with XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.29. +;;; Synched up with: FSF 19.34. ;;; Commentary: -;;; Known bug: update commands fail to ignore @ignore. +;; Known bug: update commands fail to ignore @ignore. -;;; Summary: how to use the updating commands +;; Summary: how to use the updating commands -; The node and menu updating functions automatically +;; The node and menu updating functions automatically -; * insert missing `@node' lines, -; * insert the `Next', `Previous' and `Up' pointers of a node, -; * insert or update the menu for a section, -; * create a master menu for a Texinfo source file. -; -; Passed an argument, the `texinfo-update-node' and -; `texinfo-make-menu' functions do their jobs in the region. -; -; In brief, the functions for creating or updating nodes and menus, are: -; -; texinfo-update-node (&optional region-p) -; texinfo-every-node-update () -; texinfo-sequential-node-update (&optional region-p) -; -; texinfo-make-menu (&optional region-p) -; texinfo-all-menus-update () -; texinfo-master-menu () -; -; texinfo-insert-node-lines (&optional title-p) -; -; texinfo-indent-menu-description (column &optional region-p) +;; * insert missing `@node' lines, +;; * insert the `Next', `Previous' and `Up' pointers of a node, +;; * insert or update the menu for a section, +;; * create a master menu for a Texinfo source file. +;; +;; Passed an argument, the `texinfo-update-node' and +;; `texinfo-make-menu' functions do their jobs in the region. +;; +;; In brief, the functions for creating or updating nodes and menus, are: +;; +;; texinfo-update-node (&optional region-p) +;; texinfo-every-node-update () +;; texinfo-sequential-node-update (&optional region-p) +;; +;; texinfo-make-menu (&optional region-p) +;; texinfo-all-menus-update () +;; texinfo-master-menu () +;; +;; texinfo-insert-node-lines (&optional title-p) +;; +;; texinfo-indent-menu-description (column &optional region-p) -; The `texinfo-column-for-description' variable specifies the column to -; which menu descriptions are indented. +;; The `texinfo-column-for-description' variable specifies the column to +;; which menu descriptions are indented. -; Texinfo file structure -; ---------------------- +;; Texinfo file structure +;; ---------------------- -; To use the updating commands, you must structure your Texinfo file -; hierarchically. Each `@node' line, with the exception of the top -; node, must be accompanied by some kind of section line, such as an -; `@chapter' or `@section' line. Each node-line/section-line -; combination must look like this: +;; To use the updating commands, you must structure your Texinfo file +;; hierarchically. Each `@node' line, with the exception of the top +;; node, must be accompanied by some kind of section line, such as an +;; `@chapter' or `@section' line. Each node-line/section-line +;; combination must look like this: -; @node Lists and Tables, Cross References, Structuring, Top -; @comment node-name, next, previous, up -; @chapter Making Lists and Tables +;; @node Lists and Tables, Cross References, Structuring, Top +;; @comment node-name, next, previous, up +;; @chapter Making Lists and Tables -; or like this (without the `@comment' line): +;; or like this (without the `@comment' line): -; @node Lists and Tables, Cross References, Structuring, Top -; @chapter Making Lists and Tables +;; @node Lists and Tables, Cross References, Structuring, Top +;; @chapter Making Lists and Tables -; If the file has a `top' node, it must be called `top' or `Top' and -; be the first node in the file. +;; If the file has a `top' node, it must be called `top' or `Top' and +;; be the first node in the file. ;;; The update node functions described in detail -; The `texinfo-update-node' function without an argument inserts -; the correct next, previous and up pointers for the node in which -; point is located (i.e., for the node preceding point). +;; The `texinfo-update-node' function without an argument inserts +;; the correct next, previous and up pointers for the node in which +;; point is located (i.e., for the node preceding point). -; With an argument, the `texinfo-update-node' function inserts the -; correct next, previous and up pointers for the nodes inside the -; region. +;; With an argument, the `texinfo-update-node' function inserts the +;; correct next, previous and up pointers for the nodes inside the +;; region. -; It does not matter whether the `@node' line has pre-existing -; `Next', `Previous', or `Up' pointers in it. They are removed. +;; It does not matter whether the `@node' line has pre-existing +;; `Next', `Previous', or `Up' pointers in it. They are removed. -; The `texinfo-every-node-update' function runs `texinfo-update-node' -; on the whole buffer. +;; The `texinfo-every-node-update' function runs `texinfo-update-node' +;; on the whole buffer. -; The `texinfo-sequential-node-update' function inserts the -; immediately following and preceding node into the `Next' or -; `Previous' pointers regardless of their hierarchical level. This is -; only useful for certain kinds of text, like a novel, which you go -; through sequentially. +;; The `texinfo-sequential-node-update' function inserts the +;; immediately following and preceding node into the `Next' or +;; `Previous' pointers regardless of their hierarchical level. This is +;; only useful for certain kinds of text, like a novel, which you go +;; through sequentially. ;;; The menu making functions described in detail -; The `texinfo-make-menu' function without an argument creates or -; updates a menu for the section encompassing the node that follows -; point. With an argument, it makes or updates menus for the nodes -; within or part of the marked region. +;; The `texinfo-make-menu' function without an argument creates or +;; updates a menu for the section encompassing the node that follows +;; point. With an argument, it makes or updates menus for the nodes +;; within or part of the marked region. -; Whenever an existing menu is updated, the descriptions from -; that menu are incorporated into the new menu. This is done by copying -; descriptions from the existing menu to the entries in the new menu -; that have the same node names. If the node names are different, the -; descriptions are not copied to the new menu. +;; Whenever an existing menu is updated, the descriptions from +;; that menu are incorporated into the new menu. This is done by copying +;; descriptions from the existing menu to the entries in the new menu +;; that have the same node names. If the node names are different, the +;; descriptions are not copied to the new menu. -; Menu entries that refer to other Info files are removed since they -; are not a node within current buffer. This is a deficiency. +;; Menu entries that refer to other Info files are removed since they +;; are not a node within current buffer. This is a deficiency. -; The `texinfo-all-menus-update' function runs `texinfo-make-menu' -; on the whole buffer. +;; The `texinfo-all-menus-update' function runs `texinfo-make-menu' +;; on the whole buffer. -; The `texinfo-master-menu' function creates an extended menu located -; after the top node. (The file must have a top node.) The function -; first updates all the regular menus in the buffer (incorporating the -; descriptions from pre-existing menus), and then constructs a master -; menu that includes every entry from every other menu. (However, the -; function cannot update an already existing master menu; if one -; exists, it must be removed before calling the function.) +;; The `texinfo-master-menu' function creates an extended menu located +;; after the top node. (The file must have a top node.) The function +;; first updates all the regular menus in the buffer (incorporating the +;; descriptions from pre-existing menus), and then constructs a master +;; menu that includes every entry from every other menu. (However, the +;; function cannot update an already existing master menu; if one +;; exists, it must be removed before calling the function.) -; The `texinfo-indent-menu-description' function indents every -; description in the menu following point, to the specified column. -; Non-nil argument (prefix, if interactive) means indent every -; description in every menu in the region. This function does not -; indent second and subsequent lines of a multi-line description. +;; The `texinfo-indent-menu-description' function indents every +;; description in the menu following point, to the specified column. +;; Non-nil argument (prefix, if interactive) means indent every +;; description in every menu in the region. This function does not +;; indent second and subsequent lines of a multi-line description. -; The `texinfo-insert-node-lines' function inserts `@node' before the -; `@chapter', `@section', and such like lines of a region in a Texinfo -; file where the `@node' lines are missing. -; -; With a non-nil argument (prefix, if interactive), the function not -; only inserts `@node' lines but also inserts the chapter or section -; titles as the names of the corresponding nodes; and inserts titles -; as node names in pre-existing `@node' lines that lack names. -; -; Since node names should be more concise than section or chapter -; titles, node names so inserted will need to be edited manually. +;; The `texinfo-insert-node-lines' function inserts `@node' before the +;; `@chapter', `@section', and such like lines of a region in a Texinfo +;; file where the `@node' lines are missing. +;; +;; With a non-nil argument (prefix, if interactive), the function not +;; only inserts `@node' lines but also inserts the chapter or section +;; titles as the names of the corresponding nodes; and inserts titles +;; as node names in pre-existing `@node' lines that lack names. +;; +;; Since node names should be more concise than section or chapter +;; titles, node names so inserted will need to be edited manually. ;;; Code: @@ -750,7 +752,7 @@ menus) before it constructs the master menu. The function removes the detailed part of an already existing master -menu. This action depends on the pre-exisitng master menu using the +menu. This action depends on the pre-existing master menu using the standard `texinfo-master-menu-header'. The master menu has the following format, which is adapted from the @@ -964,11 +966,11 @@ ; last `* ' entry (goto-char end-of-menu) ;; handle multi-line description - (if (not (re-search-backward "^\* " nil t)) + (if (not (re-search-backward "^\\* " nil t)) (error "No entries in menu.")) (point)))) (while (< (point) last-entry) - (if (re-search-forward "^\* " end-of-menu t) + (if (re-search-forward "^\\* " end-of-menu t) (progn (setq this-menu-list (cons @@ -976,7 +978,7 @@ (point) ;; copy multi-line descriptions (save-excursion - (re-search-forward "\\(^\* \\|^@e\\)" nil t) + (re-search-forward "\\(^\\* \\|^@e\\)" nil t) (- (point) 3))) this-menu-list))))) this-menu-list)) @@ -1003,10 +1005,11 @@ t) "top") ((re-search-forward texinfo-section-types-regexp nil t) - (buffer-substring (progn (beginning-of-line) ; copy its name - (1+ (point))) - (progn (forward-word 1) - (point)))) + (buffer-substring-no-properties + (progn (beginning-of-line) ; copy its name + (1+ (point))) + (progn (forward-word 1) + (point)))) (t (error "texinfo-specific-section-type: Chapter or section not found.")))))) @@ -1361,7 +1364,7 @@ The first and second arguments bound the search for a pointer to the beginning and end, respectively, of the enclosing higher level section. The third argument is a string specifying the general kind -of section such as \"chapter\ or \"section\". When looking for the +of section such as \"chapter\" or \"section\". When looking for the `Next' pointer, the section found will be at the same hierarchical level in the Texinfo file; when looking for the `Previous' pointer, the section found will be at the same or higher hierarchical level in @@ -1558,7 +1561,7 @@ Return type of pointer (either 'normal or 'no-pointer). The first argument is a string specifying the general kind of section -such as \"chapter\ or \"section\". The section found will be at the +such as \"chapter\" or \"section\". The section found will be at the same hierarchical level in the Texinfo file, or, in the case of the up pointer, some level higher. The second argument (one of 'next, 'previous, or 'up) specifies whether to find the `Next', `Previous',
--- a/lisp/packages/time.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/time.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,9 +1,8 @@ ;;; time.el --- display time and load in mode line of Emacs. -;; Copyright (C) 1985, 1986, 1987, 1992-1994 Free Software Foundation, Inc. +;; Copyright (C) 1985, 86, 87, 93, 94, 1996 Free Software Foundation, Inc. ;; Maintainer: FSF -;; Keywords: extensions ;; This file is part of XEmacs. @@ -19,18 +18,19 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: Not synched with FSF. ;;; Commentary: -;;; Facilities to display current time/date and a new-mail indicator -;;; in the Emacs mode line. The single entry point is `display-time'. +;; Facilities to display current time/date and a new-mail indicator +;; in the Emacs mode line. The single entry point is `display-time'. -;;; See also reportmail.el. -;;; This uses the XEmacs timeout-event mechanism, via a version -;;; of Kyle Jones' itimer package. +;; See also reportmail.el. +;; This uses the XEmacs timeout-event mechanism, via a version +;; of Kyle Jones' itimer package. ;;; Code:
--- a/lisp/packages/uncompress.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/uncompress.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,42 +1,73 @@ -;;; Synched up with: Not synched with FSF. Close though. -;;; #### This loser doesn't even provide .gz support here! -;;; FSF's version does. +;;; uncompress.el --- auto-decompression hook for visiting .Z files -;;; uncompress.el --- auto-decompression hook for visiting .Z files +;; Copyright (C) 1992, 1994 Free Software Foundation, Inc. + +;; Maintainer: FSF ;; Keywords: unix extensions +;; This file is part of XEmacs. -;; ============================================================ -;; NOTE: crypt.el is a much more complete version of this hack. -;; ============================================================ +;; XEmacs 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. + +;; XEmacs 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 XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. +;;; Synched up with: 19.34. + +;;; Commentary: + +;; This package can be used to arrange for automatic uncompress of +;; files packed with the UNIX compress(1) utility when they are visited. +;; All that's necessary is to load it. This can conveniently be done from +;; your .emacs file. + +;;; Code: ;; When we are about to make a backup file, ;; uncompress the file we visited ;; so that making the backup can work properly. ;; This is used as a write-file-hook. +(defvar uncompress-program "gunzip" + "Program to use for uncompression.") + (defun uncompress-backup-file () (and buffer-file-name make-backup-files (not buffer-backed-up) (not (file-exists-p buffer-file-name)) - (call-process "uncompress" nil nil nil buffer-file-name)) + (call-process uncompress-program nil nil nil buffer-file-name)) nil) (or (assoc "\\.Z$" auto-mode-alist) (setq auto-mode-alist (cons '("\\.Z$" . uncompress-while-visiting) auto-mode-alist))) +(or (assoc "\\.gz$" auto-mode-alist) + (setq auto-mode-alist + (cons '("\\.gz$" . uncompress-while-visiting) auto-mode-alist))) (defun uncompress-while-visiting () - "Temporary \"major mode\" used for .Z files, to uncompress the contents. + "Temporary \"major mode\" used for .Z and .gz files, to uncompress them. It then selects a major mode from the uncompressed file name and contents." (if (and (not (null buffer-file-name)) (string-match "\\.Z$" buffer-file-name)) (set-visited-file-name - (substring buffer-file-name 0 (match-beginning 0)))) + (substring buffer-file-name 0 (match-beginning 0))) + (if (and (not (null buffer-file-name)) + (string-match "\\.gz$" buffer-file-name)) + (set-visited-file-name + (substring buffer-file-name 0 (match-beginning 0))))) (message "Uncompressing...") (let ((buffer-read-only nil)) - (shell-command-on-region (point-min) (point-max) "uncompress" t)) + (shell-command-on-region (point-min) (point-max) uncompress-program t)) (message "Uncompressing...done") (set-buffer-modified-p nil) (make-local-variable 'write-file-hooks) @@ -52,10 +83,18 @@ "Hook to read and uncompress the compressed version of a file." ;; Just pretend we had visited the compressed file, ;; and uncompress-while-visiting will do the rest. - (if (file-exists-p (concat buffer-file-name ".Z")) - (progn - (setq buffer-file-name (concat buffer-file-name ".Z")) - (insert-file-contents buffer-file-name t) - (goto-char (point-min)) - (setq error nil) - t))) + (let (name) + (if (file-exists-p (setq name (concat buffer-file-name ".Z"))) + (setq buffer-file-name name) + (if (file-exists-p (setq name (concat buffer-file-name ".gz"))) + (setq buffer-file-name name))) + (if (eq name buffer-file-name) + (progn + (insert-file-contents buffer-file-name t) + (goto-char (point-min)) + (setq error nil) + t)))) + +(provide 'uncompress) + +;;; uncompress.el ends here
--- a/lisp/packages/underline.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/underline.el Mon Aug 13 08:46:35 2007 +0200 @@ -19,9 +19,10 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary: @@ -38,6 +39,7 @@ Works by overstriking underscores. Called from program, takes two arguments START and END which specify the range to operate on." + ;; XEmacs: FSF doesn't use a '*', a bug? -sb (interactive "*r") (save-excursion (let ((end1 (make-marker))) @@ -61,6 +63,9 @@ (while (re-search-forward "_\b\\|\b_" end1 t) (delete-char -2))))) +;; XEmacs: The rest of these functions are not in FSF. I don't see any +;; point in removing them. -sb + ;;;###autoload (defun unoverstrike-region (start end) "Remove all overstriking (character-backspace-character) in the region.
--- a/lisp/packages/vc.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/vc.el Mon Aug 13 08:46:35 2007 +0200 @@ -114,7 +114,7 @@ ;;; XEmacs - This is dumped into loaddefs.el already. ;; (defvar diff-switches "-c" -;; "*A string or list of strings specifying switches to be be passed to diff.") +;; "*A string or list of strings specifying switches to be passed to diff.") ;;;###autoload (defvar vc-checkin-hook nil
--- a/lisp/packages/xscheme.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/packages/xscheme.el Mon Aug 13 08:46:35 2007 +0200 @@ -24,7 +24,7 @@ ;;; Requires C-Scheme release 5 or later ;;; Changes to Control-G handler require runtime version 13.85 or later -;;; $Header: /afs/informatik.uni-tuebingen.de/local/web/xemacs/xemacs-cvs/XEmacs/xemacs-19/lisp/packages/xscheme.el,v 1.1.1.1 1996/12/18 03:31:43 steve Exp $ +;;; $Header: /afs/informatik.uni-tuebingen.de/local/web/xemacs/xemacs-cvs/XEmacs/xemacs-19/lisp/packages/xscheme.el,v 1.1.1.2 1996/12/18 03:45:01 steve Exp $ (require 'scheme) @@ -288,7 +288,7 @@ themselves to the Scheme process. The command character ? will list the available commands. -For older releases of Scheme, the major mode will be be +For older releases of Scheme, the major mode will be scheme-interaction-mode , and the command characters must be sent as if they were expressions.
--- a/lisp/pcl-cvs/cookie.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/pcl-cvs/cookie.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,4 +1,4 @@ -;;; $Id: cookie.el,v 1.1.1.1 1996/12/18 03:32:25 steve Exp $ +;;; $Id: cookie.el,v 1.1.1.2 1996/12/18 03:45:29 steve Exp $ ;;; cookie.el -- Utility to display cookies in buffers ;; Copyright (C) 1991-1995 Free Software Foundation @@ -809,7 +809,7 @@ ((>= pos (elib-wrapper->start-marker (dll-last dll))) (dll-nth dll -2)) - ;; We now now that pos is within a cookie. + ;; We now know that pos is within a cookie. (t ;; Make an educated guess about which of the three known ;; cookies (the first, the last, or GUESS) is nearest.
--- a/lisp/prim/about.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/prim/about.el Mon Aug 13 08:46:35 2007 +0200 @@ -437,11 +437,13 @@ been the name of the product since version 19.11.)") (insert "\n\n\n\t") - (about-face "SunPro is now DevPro (SunSoft Developer Products)\n" 'italic) + (about-face "SunPro is now DevPro (Sun Developer Products)\n" 'italic) (insert " - In mid-'94 Sun completed a reorganization where SunPro moved to - SunSoft. As a consequence, SunPro is now called SunSoft Developer - Products, or DevPro for short. ") + In mid-'94 Sun completed a reorganization where SunPro moved + to SunSoft. As a consequence, SunPro was then called SunSoft + Developer Products, or DevPro for short. De-planetization is + continuing in 1996, and the name `Sunsoft' is falling into + disuse in favour of `Sun'.") (insert "\n\n\n\t") (about-face "Lucid goes under\n" 'italic)
--- a/lisp/prim/advocacy.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/prim/advocacy.el Mon Aug 13 08:46:35 2007 +0200 @@ -41,15 +41,23 @@ (max-faces (length (face-list)))) (with-output-to-temp-buffer "*Praise*" (set-buffer "*Praise*") + (if (glyphp xemacs-logo) + (let ((p (point))) + (insert "\n") + (indent-to (startup-center-spaces xemacs-logo)) + (set-extent-begin-glyph (make-extent (point) (point)) xemacs-logo) + (insert "\n\n"))) (while (> count 0) (progn (insert-face xemacs-praise-message (get-face (nth (random max-faces) (face-list)))) (setq count (- count 1)))))) (let ((sound-file - (or (file-exists-p xemacs-praise-sound-file) - (file-exists-p - (concat data-directory xemacs-praise-sound-file))))) + (or (and (file-exists-p xemacs-praise-sound-file) + xemacs-praise-sound-file) + (and (file-exists-p + (concat data-directory xemacs-praise-sound-file)) + (concat data-directory xemacs-praise-sound-file))))) (if (and (device-sound-enabled-p) sound-file) (progn (sit-for 0)
--- a/lisp/prim/cmdloop.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/prim/cmdloop.el Mon Aug 13 08:46:35 2007 +0200 @@ -134,8 +134,9 @@ "Redisplay the last error-message. See the variable `last-error'." (interactive) (with-displaying-help-buffer - (princ "Last error was:\n" standard-output) - (display-error last-error standard-output))) + (lambda () + (princ "Last error was:\n" standard-output) + (display-error last-error standard-output)))) ;;#### Must be done later in the loadup sequence
--- a/lisp/prim/disp-table.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/prim/disp-table.el Mon Aug 13 08:46:35 2007 +0200 @@ -39,15 +39,17 @@ (defun describe-display-table (dt) "Describe the display table DT in a help buffer." (with-displaying-help-buffer - (princ "\nCharacter display glyph sequences:\n") - (save-excursion - (set-buffer standard-output) - (let ((vector (make-vector 256 nil)) - (i 0)) - (while (< i 256) - (aset vector i (aref dt i)) - (setq i (1+ i))) - (describe-vector vector))))) + (lambda () + (princ "\nCharacter display glyph sequences:\n") + (save-excursion + (set-buffer standard-output) + (let ((vector (make-vector 256 nil)) + (i 0)) + (while (< i 256) + (aset vector i (aref dt i)) + (setq i (1+ i))) + ;;; ### No such function `describe-vector'... + (describe-vector vector)))))) ;;;###autoload (defun describe-current-display-table (&optional domain) @@ -78,9 +80,9 @@ current-display-table (list (cons fdt-locale (mapcar - #'(lambda (fdt-x) - (funcall fdt-function (cdr fdt-x)) - fdt-x) + (lambda (fdt-x) + (funcall fdt-function (cdr fdt-x)) + fdt-x) (cdar (specifier-spec-list current-display-table fdt-locale))))))) @@ -93,8 +95,8 @@ (defun standard-display-8bit (l h &optional locale) "Display characters in the range L to H literally." (frob-display-table - #'(lambda (x) - (standard-display-8bit-1 x l h)) + (lambda (x) + (standard-display-8bit-1 x l h)) locale)) (defun standard-display-default-1 (dt l h) @@ -106,16 +108,16 @@ (defun standard-display-default (l h &optional locale) "Display characters in the range L to H using the default notation." (frob-display-table - #'(lambda (x) - (standard-display-default-1 x l h)) + (lambda (x) + (standard-display-default-1 x l h)) locale)) ;;;###autoload (defun standard-display-ascii (c s &optional locale) "Display character C using printable string S." (frob-display-table - #'(lambda (x) - (aset x c s)) + (lambda (x) + (aset x c s)) locale)) @@ -127,8 +129,8 @@ This function assumes that your terminal uses the SO/SI characters; it is meaningless for an X frame." (frob-display-table - #'(lambda (x) - (aset x c (concat "\016" (char-to-string sc) "\017"))) + (lambda (x) + (aset x c (concat "\016" (char-to-string sc) "\017"))) locale)) @@ -140,8 +142,8 @@ This function assumes VT100-compatible escapes; it is meaningless for an X frame." (frob-display-table - #'(lambda (x) - (aset x c (concat "\e(0" (char-to-string gc) "\e(B"))) + (lambda (x) + (aset x c (concat "\e(0" (char-to-string gc) "\e(B"))) locale)) ;;; #### should frob in a 'tty locale. @@ -153,8 +155,8 @@ (defun standard-display-underline (c uc &optional locale) "Display character C as character UC plus underlining." (frob-display-table - #'(lambda (x) - (aset x c (concat "\e[4m" (char-to-string uc) "\e[m"))) + (lambda (x) + (aset x c (concat "\e[4m" (char-to-string uc) "\e[m"))) locale)) ;;;###autoload @@ -165,12 +167,12 @@ With prefix argument, enable European character display iff arg is positive." (interactive "P") (frob-display-table - #'(lambda (x) - (if (or (<= (prefix-numeric-value arg) 0) - (and (null arg) - (equal (aref x 160) (char-to-string 160)))) - (standard-display-default-1 x 160 255) - (standard-display-8bit-1 x 160 255))) + (lambda (x) + (if (or (<= (prefix-numeric-value arg) 0) + (and (null arg) + (equal (aref x 160) (char-to-string 160)))) + (standard-display-default-1 x 160 255) + (standard-display-8bit-1 x 160 255))) locale)) (provide 'disp-table)
--- a/lisp/prim/env.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/prim/env.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,6 +1,6 @@ ;;; env.el --- functions to manipulate environment variables. -;;; Copyright 1991, 1994 Free Software Foundation, Inc. +;; Copyright 1991, 1994 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: processes, unix @@ -19,16 +19,17 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary: -;; UNIX processes inherit a list of name-to-string associations from -;; their parents called their `environment'; these are commonly used -;; to control program options. This package permits you to set -;; environment variables to be passed to any sub-process run under XEmacs. +;; UNIX processes inherit a list of name-to-string associations from their +;; parents called their `environment'; these are commonly used to control +;; program options. This package permits you to set environment variables +;; to be passed to any sub-process run under XEmacs. ;;; Code:
--- a/lisp/prim/extents.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/prim/extents.el Mon Aug 13 08:46:35 2007 +0200 @@ -28,7 +28,7 @@ (defun mapcar-extents (function &optional predicate buffer-or-string from to flags property value) "Applies FUNCTION to all extents which overlap a region in BUFFER-OR-STRING. -The region is is delimited by FROM and TO. FUNCTION is called with +The region is delimited by FROM and TO. FUNCTION is called with one argument, the extent. A list of the values returned by FUNCTION is returned. An optional PREDICATE may be used to further limit the extents over which FUNCTION is mapped. The optional arguments FLAGS,
--- a/lisp/prim/faces.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/prim/faces.el Mon Aug 13 08:46:35 2007 +0200 @@ -41,7 +41,7 @@ (let (face) (while (= (length face) 0) ; nil or "" (setq face (completing-read prompt - (mapcar '(lambda (x) (list (symbol-name x))) + (mapcar (lambda (x) (list (symbol-name x))) (face-list)) nil t))) (intern face))) @@ -697,7 +697,7 @@ (null props)) (defun face-equal (face1 face2 &optional domain) - "True if the given faces will display in the the same way. + "True if the given faces will display in the same way. See `face-property-instance' for the semantics of the DOMAIN argument." (if (null domain) (setq domain (selected-window))) (if (not (valid-specifier-domain-p domain)) @@ -1167,15 +1167,27 @@ (defun face-complain-about-font (face device) (if (symbolp face) (setq face (symbol-name face))) ;; (if (not inhibit-font-complaints) - (display-warning - 'font - (format "%s: couldn't deduce %s %s version of %S\n" - invocation-name - (if (string-match "\\`[aeiouAEIOU]" face) "an" "a") - face - (face-font-name 'default device))) -;; ) - ) + (display-warning + 'font + (let ((default-name (face-font-name 'default device))) + (format "%s: couldn't deduce %s %s version of the font +%S. + +Please specify X resources to make the %s face +visually distinguishable from the default face. +For example, you could add one of the following to $HOME/Emacs: + +Emacs.%s.attributeFont: -dt-*-medium-i-* +or +Emacs.%s.attributeForeground: hotpink\n" + invocation-name + (if (string-match "\\`[aeiouAEIOU]" face) "an" "a") + face + default-name + face + face + face + )))) (defun init-other-random-faces (device) "Initializes the colors and fonts of the bold, italic, bold-italic, @@ -1198,7 +1210,7 @@ (make-face-italic 'italic device)) (or (face-differs-from-default-p 'italic device) (progn - (make-face-bold 'bold device) ; bold if possible, then complain + (make-face-bold 'italic device) ; bold if possible, then complain (face-complain-about-font 'italic device))) ;; similar for bold-italic.
--- a/lisp/prim/files.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/prim/files.el Mon Aug 13 08:46:35 2007 +0200 @@ -276,6 +276,13 @@ ; inhibit-file-name-handlers))) ; (inhibit-file-name-operation op)) ; (apply op args)) + +(defun convert-standard-filename (filename) + "Convert a standard file's name to something suitable for the current OS. +This function's standard definition is trivial; it just returns the argument. +However, on some systems, the function is redefined +with a definition that really does change some file names." + filename) (defun pwd () "Show the current default directory." @@ -284,7 +291,7 @@ (defvar cd-path nil "Value of the CDPATH environment variable, as a list. -Not actually set up until the first time you you use it.") +Not actually set up until the first time you use it.") (defvar path-separator ":" "Character used to separate concatenated paths.") @@ -544,7 +551,9 @@ ;; XEmacs: this used to have (selected-frame) as the third argument, ;; but this is obnoxious. If the user wants the buffer in a ;; different frame, then it should be this way. - (pop-to-buffer buffer t))) + + ;; Change documented above undone --mrb + (pop-to-buffer buffer t (selected-frame)))) (defun switch-to-buffer-other-frame (buffer) "Switch to buffer BUFFER in a newly-created frame." @@ -1017,99 +1026,73 @@ (error (message "File local-variables error: %s" (prin1-to-string err)))))) -(defvar auto-mode-alist (mapcar 'purecopy - '(("\\.te?xt\\'" . text-mode) - ("\\.c\\'" . c-mode) - ("\\.h\\'" . c-mode) - ("\\.tex\\'" . tex-mode) - ("\\.ltx\\'" . latex-mode) - ("\\.e\\'" . eiffel-mode) - ("\\.el\\'" . emacs-lisp-mode) - ("\\.mm\\'" . nroff-mode) - ("\\.me\\'" . nroff-mode) - ("\\.ms\\'" . nroff-mode) - ("\\.man\\'" . nroff-mode) - ("\\.scm\\'" . scheme-mode) - ("\\.l\\'" . lisp-mode) - ("\\.lisp\\'" . lisp-mode) - ("\\.f\\'" . fortran-mode) - ("\\.for\\'" . fortran-mode) - ("\\.p\\'" . pascal-mode) - ("\\.pas\\'" . pascal-mode) - ("\\.mss\\'" . scribe-mode) - ("\\.ad[abs]\\'" . ada-mode) - ("\\.icn\\'" . icon-mode) - ("\\.pl\\'" . perl-mode) - ("\\.cc\\'" . c++-mode) - ("\\.hh\\'" . c++-mode) - ("\\.C\\'" . c++-mode) - ("\\.H\\'" . c++-mode) - ("\\.cpp\\'" . c++-mode) - ("\\.cxx\\'" . c++-mode) - ("\\.hxx\\'" . c++-mode) - ("\\.c\\+\\+\\'" . c++-mode) - ("\\.h\\+\\+\\'" . c++-mode) - ("\\.java\\'" . java-mode) - ("\\.mk\\'" . makefile-mode) - ("\\.mak\\'" . makefile-mode) - ("[Mm]akefile\\(.in\\)?\\'" . makefile-mode) +(defvar auto-mode-alist + (mapcar + 'purecopy + '(("\\.te?xt\\'" . text-mode) + ("\\.[ch]\\'" . c-mode) + ("\\.ltx\\'" . latex-mode) + ("\\.el\\'" . emacs-lisp-mode) + ("\\.l\\(i?sp\\)?\\'" . lisp-mode) + ("\\.f\\(or\\)?\\'" . fortran-mode) + ("\\.p\\(as\\)?\\'" . pascal-mode) + ("\\.ad[abs]\\'" . ada-mode) + ("\\.pl\\'" . perl-mode) + ("\\.\\([CH]\\|cc\\|hh\\)\\'" . c++-mode) + ("\\.[ch]\\(pp\\|xx\\|\\+\\+\\)\\'" . c++-mode) + ("\\.java\\'" . java-mode) + ("\\.ma?k\\'" . makefile-mode) + ("[Mm]akefile\\(.in\\)?\\(.in\\)?\\'" . makefile-mode) ;;; Less common extensions come here ;;; so more common ones above are found faster. - ("\\.texinfo\\'" . texinfo-mode) - ("\\.texi\\'" . texinfo-mode) - ("\\.s\\'" . asm-mode) - ("ChangeLog\\'" . change-log-mode) - ("change.log\\'" . change-log-mode) - ("changelo\\'" . change-log-mode) - ("ChangeLog.[0-9]+\\'" . change-log-mode) - ("\\$CHANGE_LOG\\$\\.TXT" . change-log-mode) - ("\\.scm\\.[0-9]*\\'" . scheme-mode) + ("\\.texi\\(nfo\\)?\\'" . texinfo-mode) + ("\\.s\\'" . asm-mode) + ("[Cc]hange.?[Ll]og?\\(.[0-9]+\\)?\\'" . change-log-mode) + ("\\$CHANGE_LOG\\$\\.TXT" . change-log-mode) + ("\\.scm\\(\\.[0-9]*\\)?\\'" . scheme-mode) + ("\\.py\\'" . python-mode) + ("\\.e\\'" . eiffel-mode) + ("\\.mss\\'" . scribe-mode) + ("\\.m\\([mes]\\|an\\)\\'" . nroff-mode) + ("\\.icn\\'" . icon-mode) ;;; The following should come after the ChangeLog pattern ;;; for the sake of ChangeLog.1, etc. ;;; and after the .scm.[0-9] pattern too. - ("\\.[12345678]\\'" . nroff-mode) - ("\\.TeX\\'" . tex-mode) - ("\\.sty\\'" . latex-mode) - ("\\.cls\\'" . latex-mode) ;LaTeX 2e class - ("\\.bbl\\'" . latex-mode) - ("\\.bib\\'" . bibtex-mode) - ("\\.article\\'" . text-mode) - ("\\.letter\\'" . text-mode) - ("\\.tcl\\'" . tcl-mode) - ("\\.wrl\\'" . vrml-mode) - ("\\.f90\\'" . f90-mode) - ("\\.lsp\\'" . lisp-mode) - ("\\.awk\\'" . awk-mode) - ("\\.prolog\\'" . prolog-mode) - ("\\.tar\\'" . tar-mode) - ("\\.\\(arc\\|zip\\|lzh\\|zoo\\)\\'" . archive-mode) - ;; Mailer puts message to be edited in - ;; /tmp/Re.... or Message - ("^/tmp/Re" . text-mode) - ("/Message[0-9]*\\'" . text-mode) - ("/drafts/[0-9]+\\'" . mh-letter-mode) - ;; some news reader is reported to use this - ("^/tmp/fol/" . text-mode) - ("\\.y\\'" . c-mode) - ("\\.lex\\'" . c-mode) - ("\\.oak\\'" . scheme-mode) - ("\\.html\\'" . html-mode) - ("\\.htm\\'" . html-mode) - ("\\.shtml\\'" . html-mode) - ("\\.html3\\'" . html3-mode) - ("\\.ht3\\'" . html3-mode) - ("\\.sgm\\'" . sgml-mode) - ("\\.sgml\\'" . sgml-mode) - ("\\.dtd\\'" . sgml-mode) - ("\\.c?ps\\'" . postscript-mode) - ;; .emacs following a directory delimiter - ;; in either Unix or VMS syntax. - ("[]>:/]\\..*emacs\\'" . emacs-lisp-mode) - ;; _emacs following a directory delimiter - ;; in MsDos syntax - ("[:/]_emacs\\'" . emacs-lisp-mode) - ("\\.ml\\'" . lisp-mode))) - "Alist of filename patterns vs corresponding major mode functions. + ("\\.[12345678]\\'" . nroff-mode) + ("\\.[tT]e[xX]\\'" . tex-mode) + ("\\.\\(sty\\|cls\\|bbl\\)\\'" . latex-mode) + ("\\.bib\\'" . bibtex-mode) + ("\\.article\\'" . text-mode) + ("\\.letter\\'" . text-mode) + ("\\.\\(tcl\\|exp\\)\\'" . tcl-mode) + ("\\.wrl\\'" . vrml-mode) + ("\\.f90\\'" . f90-mode) + ("\\.awk\\'" . awk-mode) + ("\\.prolog\\'" . prolog-mode) + ("\\.tar\\'" . tar-mode) + ("\\.\\(arc\\|zip\\|lzh\\|zoo\\)\\'" . archive-mode) + ;; Mailer puts message to be edited in + ;; /tmp/Re.... or Message + ("^/tmp/Re" . text-mode) + ("/Message[0-9]*\\'" . text-mode) + ("/drafts/[0-9]+\\'" . mh-letter-mode) + ;; some news reader is reported to use this + ("^/tmp/fol/" . text-mode) + ("\\.y\\'" . c-mode) + ("\\.lex\\'" . c-mode) + ("\\.oak\\'" . scheme-mode) + ("\\.s?html?\\'" . html-mode) + ("\\.htm?l?3\\'" . html3-mode) + ("\\.\\(sgml?\\|dtd\\)\\'" . sgml-mode) + ("\\.c?ps\\'" . postscript-mode) + ;; .emacs following a directory delimiter + ;; in either Unix or VMS syntax. + ("[]>:/]\\..*emacs\\'" . emacs-lisp-mode) + ;; _emacs following a directory delimiter + ;; in MsDos syntax + ("[:/]_emacs\\'" . emacs-lisp-mode) + ("\\.ml\\'" . lisp-mode))) + "Alist of filename patterns vs. corresponding major mode functions. Each element looks like (REGEXP . FUNCTION) or (REGEXP FUNCTION NON-NIL). \(NON-NIL stands for anything that is not nil; the value does not matter.) Visiting a file whose name matches REGEXP specifies FUNCTION as the @@ -1119,30 +1102,30 @@ calling FUNCTION (if it's not nil), we delete the suffix that matched REGEXP and search the list again for another match.") -(defconst interpreter-mode-alist (mapcar 'purecopy - '(("perl" . perl-mode) - ("suidperl" . perl-mode) - ("taintperl" . perl-mode) - ("sh" . ksh-mode) - ("bash" . ksh-mode) - ("ksh" . ksh-mode) - ("scope" . tcl-mode) - ("wish" . tcl-mode) - ("wishx" . tcl-mode) - ("tcl" . tcl-mode) - ("tclsh" . tcl-mode) - ("expect" . tcl-mode) - ("rexx" . rexx-mode) - ("awk" . awk-mode) - ("nawk" . awk-mode) - ("gawk" . awk-mode) - ("mawk" . awk-mode) - ("scm" . scheme-mode))) +(defconst interpreter-mode-alist + (mapcar 'purecopy + '(("^#!.*csh" . csh-mode) + ("^#!.*sh\\b" . ksh-mode) + ("^#!.*\\b\\(scope\\|wish\\|tcl\\|expect\\)" . tcl-mode) + ("perl" . perl-mode) + ("python" . python-mode) + ("awk\\b" . awk-mode) + ("rexx" . rexx-mode) + ("scm" . scheme-mode) + ("^:" . ksh-mode) + )) "Alist mapping interpreter names to major modes. -This alist applies to files whose first line starts with `#!'. -Each element looks like (INTERPRETER . MODE). -The car of each element is compared with -the name of the interpreter specified in the first line. +This alist is used to guess the major mode of a file based on the +contents of the first line. This line often contains something like: +#!/bin/sh +but may contain something more imaginative like +#! /bin/env python +or +eval 'exec perl -w -S $0 ${1+\"$@\"}'. + +Each alist element looks like (INTERPRETER . MODE). +The car of each element is a regular expression which is compared +with the name of the interpreter specified in the first line. If it matches, mode MODE is selected.") (defconst inhibit-first-line-modes-regexps (purecopy '("\\.tar\\'")) @@ -1199,23 +1182,24 @@ (setq mode (cdr (car alist)) keep-going nil))) (setq alist (cdr alist)))) - (if mode - (funcall mode) - ;; If we can't deduce a mode from the file name, - ;; look for an interpreter specified in the first line. - (let ((interpreter - (save-excursion - (goto-char (point-min)) - (if (looking-at "#! *\\([^ \t\n]+\\)") - (buffer-substring (match-beginning 1) - (match-end 1)) - ""))) - elt) - ;; Map interpreter name to a mode. - (setq elt (assoc (file-name-nondirectory interpreter) - interpreter-mode-alist)) - (if elt - (funcall (cdr elt))))))))))) + ;; If we can't deduce a mode from the file name, + ;; look for an interpreter specified in the first line. + (if (null mode) + (let ((firstline + (buffer-substring + (point-min) + (save-excursion + (goto-char (point-min)) (end-of-line) (point))))) + (setq alist interpreter-mode-alist) + (while alist + (if (string-match (car (car alist)) firstline) + (progn + (setq mode (cdr (car alist))) + (setq alist nil)) + (setq alist (cdr alist)))))) + (if mode + (funcall mode)) + )))))) (defun hack-local-variables (&optional force) "Parse, and bind or evaluate as appropriate, any local variables @@ -1355,12 +1339,11 @@ (defun hack-local-variables-prop-line (&optional force) ;; Set local variables specified in the -*- line. ;; Returns t if mode was set. - (let (modes mode-p) + (let ((result nil)) (save-excursion (goto-char (point-min)) (skip-chars-forward " \t\n\r") - (let ((result nil) - (end (save-excursion + (let ((end (save-excursion ;; If the file begins with "#!" ;; (un*x exec interpreter magic), look ;; for mode frobs in the first two @@ -1402,36 +1385,28 @@ (val (save-restriction (narrow-to-region (point) end) (read (current-buffer))))) + ;; Case sensitivity! Icepicks in my forehead! + (if (equal (downcase (symbol-name key)) "mode") + (setq key 'mode)) (setq result (cons (cons key val) result)) (skip-chars-forward " \t;"))) - (setq result (nreverse result)))) - - ;; Mode is magic. - (let (mode) - ;; with the removal of the downcase above, we have to - ;; add a check for Mode:, which is common. - (while (setq mode (or (assq 'mode result) - (assq 'Mode result))) - (setq result (delq mode result)) - (setq modes (cons (intern (concat (downcase (symbol-name - (cdr mode))) - "-mode")) - modes)))) + (setq result (nreverse result)))))) - (if (and result - (or force (hack-local-variables-p t))) - (while result - (let ((key (car (car result))) - (val (cdr (car result)))) - ;; 'mode has already been removed from this list. - (hack-one-local-variable key val)) - (setq result (cdr result)))))) - ;; If we found modes to use, invoke them now, - ;; outside the save-excursion. - (if modes - (progn (mapcar 'funcall modes) - (setq mode-p t))) - mode-p)) + (let ((set-any-p (or force (hack-local-variables-p t))) + (mode-p nil)) + (while result + (let ((key (car (car result))) + (val (cdr (car result)))) + (cond ((eq key 'mode) + (setq mode-p t) + (funcall (intern (concat (downcase (symbol-name val)) + "-mode")))) + (set-any-p + (hack-one-local-variable key val)) + (t + nil))) + (setq result (cdr result))) + mode-p))) (defconst ignored-local-variables (list 'enable-local-eval)
--- a/lisp/prim/fill.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/prim/fill.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,6 +1,6 @@ ;;; fill.el --- fill commands for XEmacs. -;; Copyright (C) 1985, 1986, 1992-1995 Free Software Foundation, Inc. +;; Copyright (C) 1985, 86, 92, 94, 95, 1996 Free Software Foundation, Inc. ;; Keywords: wp @@ -18,9 +18,10 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary: @@ -29,26 +30,27 @@ ;;; Code: -(defvar fill-individual-varying-indent nil +(defconst fill-individual-varying-indent nil "*Controls criterion for a new paragraph in `fill-individual-paragraphs'. Non-nil means changing indent doesn't end a paragraph. That mode can handle paragraphs with extra indentation on the first line, but it requires separator lines between paragraphs. A value of nil means that any change in indentation starts a new paragraph.") -(defvar sentence-end-double-space t +(defconst sentence-end-double-space t "*Non-nil means a single space does not end a sentence.") (defconst colon-double-space nil "*Non-nil means put two spaces after a colon when filling.") (defvar fill-paragraph-function nil - "Mode-specific function to fill a paragraph.") + "Mode-specific function to fill a paragraph, or nil if there is none. +If the function returns nil, then `fill-paragraph' does its normal work.") (defun set-fill-prefix () "Set the fill prefix to the current line up to point. -Filling expects lines to start with the fill prefix -and reinserts the fill prefix in each resulting line." +Filling expects lines to start with the fill prefix and +reinserts the fill prefix in each resulting line." (interactive) (setq fill-prefix (buffer-substring (save-excursion (move-to-left-margin) (point)) @@ -59,12 +61,12 @@ (message "fill-prefix: \"%s\"" fill-prefix) (message "fill-prefix cancelled"))) -(defvar adaptive-fill-mode t +(defconst adaptive-fill-mode t "*Non-nil means determine a paragraph's fill prefix from its text.") ;; #### - this is still weak. Yeah, there's filladapt, but this should ;; still be better... --Stig -(defvar adaptive-fill-regexp (purecopy "[ \t]*\\([#;>*]+ +\\)?") +(defconst adaptive-fill-regexp (purecopy "[ \t]*\\([#;>*]+ +\\)?") "*Regexp to match text at start of line that constitutes indentation. If Adaptive Fill mode is enabled, whatever text matches this pattern on the second line of a paragraph is used as the standard indentation @@ -103,8 +105,9 @@ (defun canonically-space-region (beg end) "Remove extra spaces between words in region. -Puts one space between words in region; two between sentences. -Remove indentation from each line." +Leave one space between words, two at end of sentences or after colons +(depending on values of `sentence-end-double-space' and `colon-double-space'). + Remove indentation from each line." (interactive "r") (save-excursion (goto-char beg) @@ -136,7 +139,12 @@ (goto-char beg) (while (and (< (point) end) (re-search-forward "[.?!][])}\"']*$" end t)) + ;; We insert before markers in case a caller such as + ;; do-auto-fill has done a save-excursion with point at the end + ;; of the line and wants it to stay at the end of the line. (insert ? )))) +;; XEmacs: we don't have this function. +;; (insert-before-markers-and-inherit ? )))) ;; XEmacs -- added DONT-SKIP-FIRST. Port of older code changes by Stig. ;; #### probably this junk is broken -- do-auto-fill doesn't actually use @@ -144,7 +152,7 @@ (defun fill-context-prefix (from to &optional first-line-regexp dont-skip-first) "Compute a fill prefix from the text between FROM and TO. -This uses the variables `adapive-fill-prefix' and `adaptive-fill-function'. +This uses the variables `adaptive-fill-prefix' and `adaptive-fill-function'. If FIRST-LINE-REGEXP is non-nil, then when taking a prefix from the first line, insist it must match FIRST-LINE-REGEXP." (save-excursion @@ -155,12 +163,14 @@ ;; Non-nil if we are on the second line. at-second result) + ;; XEmacs change (if (not dont-skip-first) (forward-line 1)) (if (>= (point) to) (goto-char firstline) (setq at-second t)) (move-to-left-margin) + ;; XEmacs change (let ((start (point)) (eol (save-excursion (end-of-line) (point)))) (setq result @@ -182,7 +192,8 @@ (or (null fill-prefix) (string= fill-prefix ""))) (setq fill-prefix (fill-context-prefix from to nil dont-skip-first)))) -(defun fill-region-as-paragraph (from to &optional justify nosqueeze) +(defun fill-region-as-paragraph (from to &optional justify + nosqueeze squeeze-after) "Fill the region as one paragraph. It removes any paragraph breaks in the region and extra newlines at the end, indents and fills lines between the margins given by the @@ -193,8 +204,9 @@ function, but with a prefix arg, does full justification instead. From a program, optional third arg JUSTIFY can specify any type of -justification, and fourth arg NOSQUEEZE non-nil means not to make spaces -between words canonical before filling. +ustification. Fourth arg NOSQUEEZE non-nil means not to make spaces +between words canonical before filling. Fifth arg SQUEEZE-AFTER, if non-nil, +means don't canonicalize spaces before that position. If `sentence-end-double-space' is non-nil, then period followed by one space does not end a sentence, so don't break a line there." @@ -221,6 +233,7 @@ (setq from (point)) ;; Delete all but one soft newline at end of region. + ;; And leave TO before that one. (goto-char to) (while (and (> (point) from) (eq ?\n (char-after (1- (point))))) (if (and oneleft @@ -287,7 +300,8 @@ (delete-region (point) (match-end 0))) (forward-line 1)) (goto-char from) - (and (looking-at fpre) (goto-char (match-end 0))) + (if (looking-at fpre) + (goto-char (match-end 0))) (setq from (point))))) ;; Remove indentation from lines other than the first. (beginning-of-line 2) @@ -300,6 +314,7 @@ ;; Make sure sentences ending at end of line get an extra space. ;; loses on split abbrevs ("Mr.\nSmith") (while (re-search-forward "[.?!][])}\"']*$" nil t) + ;; XEmacs change (no insert-and-inherit) (or (eobp) (insert ?\ ))) (goto-char from) (skip-chars-forward " \t") @@ -307,9 +322,10 @@ (subst-char-in-region from (point-max) ?\n ?\ ) (if (and nosqueeze (not (eq justify 'full))) nil - (canonically-space-region (point) (point-max)) + (canonically-space-region (or squeeze-after (point)) (point-max)) (goto-char (point-max)) (delete-horizontal-space) + ;; XEmacs change (no insert-and-inherit) (insert " ")) (goto-char (point-min)) @@ -336,7 +352,9 @@ (forward-char -2) (skip-chars-backward "^ \n" linebeg))) ;; If the left margin and fill prefix by themselves - ;; pass the fill-column, keep at least one word. + ;; pass the fill-column. or if they are zero + ;; but we have no room for even one word, + ;; keep at least one word anyway. ;; This handles ALL BUT the first line of the paragraph. (if (if (zerop prefixcol) (save-excursion @@ -385,20 +403,23 @@ (skip-chars-forward " \t") (skip-chars-forward "^ \t\n") (setq first nil)))) - ;; Replace whitespace here with one newline, then indent to left - ;; margin. - (skip-chars-backward " \t") - (insert ?\n) - ;; Give newline the properties of the space(s) it replaces - (set-text-properties (1- (point)) (point) - (text-properties-at (point))) - (indent-to-left-margin) - ;; Insert the fill prefix after indentation. - ;; Set prefixcol so whitespace in the prefix won't get lost. - (and fill-prefix (not (equal fill-prefix "")) - (progn - (insert fill-prefix) - (setq prefixcol (current-column))))) + ;; Check again to see if we got to the end of the paragraph. + (if (save-excursion (skip-chars-forward " \t") (eobp)) + (or nosqueeze (delete-horizontal-space)) + ;; Replace whitespace here with one newline, then indent to left + ;; margin. + (skip-chars-backward " \t") + (insert ?\n) + ;; Give newline the properties of the space(s) it replaces + (set-text-properties (1- (point)) (point) + (text-properties-at (point))) + (indent-to-left-margin) + ;; Insert the fill prefix after indentation. + ;; Set prefixcol so whitespace in the prefix won't get lost. + (and fill-prefix (not (equal fill-prefix "")) + (progn + (insert fill-prefix) + (setq prefixcol (current-column)))))) ;; Justify the line just ended, if desired. (if justify (if (eobp) @@ -532,6 +553,7 @@ When calling from a program, operates just on region between BEGIN and END, unless optional fourth arg WHOLE-PAR is non-nil. In that case bounds are extended to include entire paragraphs as in the interactive command." + ;; XEmacs change (was mark-active) (interactive (list (if (region-active-p) (region-beginning) (point)) (if (region-active-p) (region-end) (point)) (let ((s (completing-read @@ -565,6 +587,7 @@ (defun set-justification-none (b e) "Disable automatic filling for paragraphs in the region. If the mark is not active, this applies to the current paragraph." + ;; XEmacs change (was mark-active) (interactive (list (if (region-active-p) (region-beginning) (point)) (if (region-active-p) (region-end) (point)))) (set-justification b e 'none t)) @@ -573,6 +596,7 @@ "Make paragraphs in the region left-justified. This is usually the default, but see the variable `default-justification'. If the mark is not active, this applies to the current paragraph." + ;; XEmacs change (was mark-active) (interactive (list (if (region-active-p) (region-beginning) (point)) (if (region-active-p) (region-end) (point)))) (set-justification b e 'left t)) @@ -581,6 +605,7 @@ "Make paragraphs in the region right-justified: Flush at the right margin and ragged on the left. If the mark is not active, this applies to the current paragraph." + ;; XEmacs change (was mark-active) (interactive (list (if (region-active-p) (region-beginning) (point)) (if (region-active-p) (region-end) (point)))) (set-justification b e 'right t)) @@ -589,6 +614,7 @@ "Make paragraphs in the region fully justified: This makes lines flush on both margins by inserting spaces between words. If the mark is not active, this applies to the current paragraph." + ;; XEmacs change (was mark-active) (interactive (list (if (region-active-p) (region-beginning) (point)) (if (region-active-p) (region-end) (point)))) (set-justification b e 'full t)) @@ -596,6 +622,7 @@ (defun set-justification-center (b e) "Make paragraphs in the region centered. If the mark is not active, this applies to the current paragraph." + ;; XEmacs change (was mark-active) (interactive (list (if (region-active-p) (region-beginning) (point)) (if (region-active-p) (region-end) (point)))) (set-justification b e 'center t)) @@ -737,6 +764,7 @@ (search-backward " "))) (skip-chars-backward " ") (setq nmove (1- nmove)))) + ;; XEmacs change (insert " ") (skip-chars-backward " ") (setq ncols (1- ncols))))))) @@ -748,7 +776,7 @@ (defun unjustify-current-line () "Remove justification whitespace from current line. If the line is centered or right-justified, this function removes any -indentation past the left margin. If the line is full-jusitified, it removes +indentation past the left margin. If the line is full-justified, it removes extra spaces between words. It does nothing in other justification modes." (let ((justify (current-justification))) (cond ((eq 'left justify) nil) @@ -774,7 +802,7 @@ (defun unjustify-region (&optional begin end) "Remove justification whitespace from region. For centered or right-justified regions, this function removes any indentation -past the left margin from each line. For full-jusitified lines, it removes +past the left margin from each line. For full-justified lines, it removes extra spaces between words. It does nothing in other justification modes. Arguments BEGIN and END are optional; default is the whole buffer." (save-excursion @@ -851,7 +879,10 @@ (point)))) fill-prefix-regexp (regexp-quote fill-prefix))) (forward-line 1) - (move-to-left-margin) + (if (bolp) + ;; If forward-line went past a newline + ;; move further to the left margin. + (move-to-left-margin)) ;; Now stop the loop if end of paragraph. (and (not (eobp)) (if fill-individual-varying-indent @@ -861,6 +892,7 @@ (not (looking-at paragraph-separate)) (save-excursion (not (and (looking-at fill-prefix-regexp) + ;; XEmacs change (progn (forward-char (length fill-prefix)) (looking-at paragraph-separate))))))
--- a/lisp/prim/float-sup.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/prim/float-sup.el Mon Aug 13 08:46:35 2007 +0200 @@ -19,19 +19,24 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. + +;;; Code: ;; Provide a meaningful error message if we are running on ;; bare (non-float) emacs. ;; Can't test for 'floatp since that may be defined by float-imitation ;; packages like float.el in this very directory. +;; XEmacs change (or (featurep 'lisp-float-type) (error "Floating point was disabled at compile time")) ;; define pi and e via math-lib calls. (much less prone to killer typos.) +;; XEmacs change (purecopy) (defconst pi (purecopy (* 4 (atan 1))) "The value of Pi (3.1415926...)") (defconst e (purecopy (exp 1)) "The value of e (2.7182818...)") @@ -39,13 +44,13 @@ ;; (defconst pi 3.14159265358979323846264338327 ;; "The value of Pi (3.14159265358979323846264338327...)") +;; XEmacs change (purecopy) (defconst degrees-to-radians (purecopy (/ pi 180.0)) "Degrees to radian conversion constant") (defconst radians-to-degrees (purecopy (/ 180.0 pi)) "Radian to degree conversion constant") -;; these expand to a single multiply by a float -;; when byte compiled +;; these expand to a single multiply by a float when byte compiled (defmacro degrees-to-radians (x) "Convert ARG from degrees to radians." @@ -54,4 +59,7 @@ "Convert ARG from radians to degrees." (list '* (/ 180.0 pi) x)) +;; Provided in C code in XEmacs +;; (provide 'lisp-float-type) + ;;; float-sup.el ends here
--- a/lisp/prim/frame.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/prim/frame.el Mon Aug 13 08:46:35 2007 +0200 @@ -773,15 +773,18 @@ (or deselect-frame-hook (add-hook 'deselect-frame-hook 'default-deselect-frame-hook)) -(defun default-drag-and-drop-functions (frame filepath) +(defun default-drag-and-drop-functions (frame filepath &optional data) "Implements the `drag-and-drop-functions' variable. For use as the value of `drag-and-drop-functions'. -This default simply pops up the file in the selected frame." - (let ((x pop-up-windows)) - (setq pop-up-windows nil) - (pop-to-buffer (find-file-noselect filepath) nil frame) - (make-frame-visible frame) - (setq pop-up-windows x))) +This default simply pops up the file in the selected frame or, +if the dragged object is a buffer, inserts it at point." + (if data + (insert data) + (let ((x pop-up-windows)) + (setq pop-up-windows nil) + (pop-to-buffer (find-file-noselect filepath) nil frame) + (make-frame-visible frame) + (setq pop-up-windows x)))) (and (boundp 'drag-and-drop-functions) (or drag-and-drop-functions
--- a/lisp/prim/help.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/prim/help.el Mon Aug 13 08:46:35 2007 +0200 @@ -352,6 +352,9 @@ ;; a help message and then prompting for input in the minibuffer -- ;; this macro usually selects the help buffer, which is not what you ;; want in those situations. + +;;; ### Should really be a macro (as suggested above) to eliminate the +;;; requirement of caller to code a lambda form in THUNK -- mrb (defun with-displaying-help-buffer (thunk) (let ((winconfig (current-window-configuration)) (was-one-window (one-window-p)))
--- a/lisp/prim/keymap.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/prim/keymap.el Mon Aug 13 08:46:35 2007 +0200 @@ -201,7 +201,7 @@ ;; Yet more RMS brain-death. (defun minor-mode-key-binding (key &optional accept-default) "Find the visible minor mode bindings of KEY. -Return an alist of pairs (MODENAME . BINDING), where MODENAME is the +Return an alist of pairs (MODENAME . BINDING), where MODENAME is the symbol which names the minor mode binding KEY, and BINDING is KEY's definition in that mode. In particular, if KEY has no minor-mode bindings, return nil. If the first binding is a
--- a/lisp/prim/lisp.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/prim/lisp.el Mon Aug 13 08:46:35 2007 +0200 @@ -19,9 +19,10 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary: @@ -41,17 +42,19 @@ (defun forward-sexp (&optional arg) "Move forward across one balanced expression (sexp). -With argument, do it that many times. -Negative arg -N means move backward across N balanced expressions." +With argument, do it that many times. Negative arg -N means +move backward across N balanced expressions." + ;; XEmacs change (for zmacs regions) (interactive "_p") (or arg (setq arg 1)) - ;; #### evil hack! The other half of the evil hack below. + ;; XEmacs: evil hack! The other half of the evil hack below. (if (and (> arg 0) (looking-at "#s(")) (goto-char (+ (point) 2))) (goto-char (or (scan-sexps (point) arg) (buffer-end arg))) (if (< arg 0) (backward-prefix-chars)) - ;; #### evil hack! Skip back over #s so that structures are read properly. - ;; the current cheesified syntax tables just aren't up to this. + ;; XEmacs: evil hack! Skip back over #s so that structures are read + ;; properly. the current cheesified syntax tables just aren't up to + ;; this. (if (and (< arg 0) (eq (char-after (point)) ?\() (>= (- (point) (point-min)) 2) @@ -61,24 +64,27 @@ (defun backward-sexp (&optional arg) "Move backward across one balanced expression (sexp). -With argument, do it that many times. -Negative arg -N means move forward across N balanced expressions." +With argument, do it that many times. Negative arg -N means +move forward across N balanced expressions." + ;; XEmacs change (for zmacs regions) (interactive "_p") (or arg (setq arg 1)) (forward-sexp (- arg))) (defun mark-sexp (arg) "Set mark ARG sexps from point. -The place mark goes is the same place \\[forward-sexp] would move to -with the same argument. +The place mark goes is the same place \\[forward-sexp] would +move to with the same argument. Repeat this command to mark more sexps in the same direction." (interactive "p") + ;; XEmacs change (mark-something 'mark-sexp 'forward-sexp arg)) (defun forward-list (&optional arg) "Move forward across one balanced group of parentheses. With argument, do it that many times. Negative arg -N means move backward across N groups of parentheses." + ;; XEmacs change (interactive "_p") (or arg (setq arg 1)) (goto-char (or (scan-lists (point) arg 0) (buffer-end arg)))) @@ -87,6 +93,7 @@ "Move backward across one balanced group of parentheses. With argument, do it that many times. Negative arg -N means move forward across N groups of parentheses." + ;; XEmacs change (for zmacs regions) (interactive "_p") (or arg (setq arg 1)) (forward-list (- arg))) @@ -96,6 +103,7 @@ With argument, do this that many times. A negative argument means move backward but still go down a level. In Lisp programs, an argument is required." + ;; XEmacs change (for zmacs regions) (interactive "_p") (let ((inc (if (> arg 0) 1 -1))) (while (/= arg 0) @@ -115,6 +123,7 @@ With argument, do this that many times. A negative argument means move backward but still to a less deep spot. In Lisp programs, an argument is required." + ;; XEmacs change (for zmacs regions) (interactive "_p") (let ((inc (if (> arg 0) 1 -1))) (while (/= arg 0) @@ -147,6 +156,7 @@ syntax at the beginning of a line. If `defun-prompt-regexp' is non-nil, then a string which matches that regexp may precede the open-parenthesis, and point ends up at the beginning of the line." + ;; XEmacs change (for zmacs regions) (interactive "_p") (and (beginning-of-defun-raw arg) (progn (beginning-of-line) t))) @@ -164,6 +174,7 @@ nil 'move (or arg 1)) (progn (goto-char (1- (match-end 0)))) t)) +;; XEmacs change (optional buffer parameter) (defun buffer-end (arg &optional buffer) "Return `point-max' of BUFFER if ARG is > 0; return `point-min' otherwise. BUFFER defaults to the current buffer if omitted." @@ -175,11 +186,12 @@ An end of a defun occurs right after the close-parenthesis that matches the open-parenthesis that starts a defun; see `beginning-of-defun'." + ;; XEmacs change (for zmacs regions) (interactive "_p") (if (or (null arg) (= arg 0)) (setq arg 1)) (let ((first t)) (while (and (> arg 0) (< (point) (point-max))) - (let ((pos (point))) + (let ((pos (point)) npos) (while (progn (if (and first (progn @@ -257,18 +269,18 @@ (defun lisp-complete-symbol () "Perform completion on Lisp symbol preceding point. -That symbol is compared against the symbols that exist -and any additional characters determined by what is there -are inserted. -If the symbol starts just after an open-parenthesis, -only symbols with function definitions are considered. -Otherwise, all symbols with function definitions, values -or properties are considered." +Compare that symbol against the known Lisp symbols. + +The context determines which symbols are considered. +If the symbol starts just after an open-parenthesis, only symbols +with function definitions are considered. Otherwise, all symbols with +function definitions, values or properties are considered." (interactive) (let* ((end (point)) (buffer-syntax (syntax-table)) (beg (unwind-protect (save-excursion + ;; XEmacs change (if emacs-lisp-mode-syntax-table (set-syntax-table emacs-lisp-mode-syntax-table)) (backward-sexp 1) @@ -280,6 +292,7 @@ (predicate (if (eq (char-after (1- beg)) ?\() 'fboundp + ;; XEmacs change #'(lambda (sym) (or (boundp sym) (fboundp sym) (symbol-plist sym))))) @@ -294,10 +307,10 @@ (t (message "Making completion list...") (let ((list (all-completions pattern obarray predicate)) - ;FSFmacs crock unnecessary in XEmacs + ;FSFmacs crock unnecessary in XEmacs (ROTFL -sb) ;see minibuf.el ;(completion-fixup-function - ; #'(lambda () (if (save-excursion + ; (function (lambda () (if (save-excursion ; (goto-char (max (point-min) ; (- (point) 4))) ; (looking-at " <f>")) @@ -314,6 +327,6 @@ (setq list (nreverse new)))) (with-output-to-temp-buffer "*Completions*" (display-completion-list list))) - (message "Making completion list...done"))))) + (message "Making completion list...%s" "done"))))) ;;; lisp.el ends here
--- a/lisp/prim/loaddefs.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/prim/loaddefs.el Mon Aug 13 08:46:35 2007 +0200 @@ -318,16 +318,18 @@ ;;; (point-min) (point-max)) ;;;*** - -;;;### (autoloads nil "byte-optimize" "bytecomp/byte-optimize.el" (12558 60872)) + +;;;*** + +;;;### (autoloads nil "byte-optimize" "bytecomp/byte-optimize.el" (12851 23344)) ;;; Generated autoloads from bytecomp/byte-optimize.el ;;;*** -;;;### (autoloads nil "bytecomp-runtime" "bytecomp/bytecomp-runtime.el" (12558 60873)) +;;;### (autoloads nil "bytecomp-runtime" "bytecomp/bytecomp-runtime.el" (12851 23345)) ;;; Generated autoloads from bytecomp/bytecomp-runtime.el -;;;### (autoloads (batch-byte-recompile-directory batch-byte-recompile-directory-norecurse batch-byte-compile display-call-tree byte-compile-sexp byte-compile compile-defun byte-compile-file byte-recompile-file byte-recompile-directory byte-force-recompile) "bytecomp" "bytecomp/bytecomp.el" (12639 8562)) +;;;### (autoloads (batch-byte-recompile-directory batch-byte-recompile-directory-norecurse batch-byte-compile display-call-tree byte-compile-sexp byte-compile compile-defun byte-compile-file byte-recompile-file byte-recompile-directory byte-force-recompile) "bytecomp" "bytecomp/bytecomp.el" (12851 23348)) ;;; Generated autoloads from bytecomp/bytecomp.el (autoload 'byte-force-recompile "bytecomp" "\ @@ -455,7 +457,7 @@ ;;;*** -;;;### (autoloads (list-yahrzeit-dates calendar) "calendar" "calendar/calendar.el" (12478 30570)) +;;;### (autoloads (list-yahrzeit-dates calendar) "calendar" "calendar/calendar.el" (12851 23350)) ;;; Generated autoloads from calendar/calendar.el (defvar calendar-week-start-day 0 "\ @@ -801,7 +803,7 @@ (defvar diary-list-include-blanks nil "\ *If nil, do not include days with no diary entry in the list of diary entries. -Such days will then not be shown in the the fancy diary buffer, even if they +Such days will then not be shown in the fancy diary buffer, even if they are holidays.") (defvar holidays-in-diary-buffer t "\ @@ -1018,46 +1020,48 @@ Requires floating point." nil nil) ;;;*** - -;;;### (autoloads nil "cl-autoload" "cl/cl-autoload.el" (12639 8884)) + +;;;*** + +;;;### (autoloads nil "cl-autoload" "cl/cl-autoload.el" (12860 19476)) ;;; Generated autoloads from cl/cl-autoload.el ;;;*** -;;;### (autoloads nil "cl-compat" "cl/cl-compat.el" (12559 34923)) +;;;### (autoloads nil "cl-compat" "cl/cl-compat.el" (12860 19471)) ;;; Generated autoloads from cl/cl-compat.el - -;;;*** ;;;### (autoloads nil "cl-defs" "cl/cl-defs.el" (12639 8885)) ;;; Generated autoloads from cl/cl-defs.el ;;;*** - -;;;### (autoloads nil "cl-extra" "cl/cl-extra.el" (12648 18630)) + +;;;*** + +;;;*** + +;;;### (autoloads nil "cl-extra" "cl/cl-extra.el" (12860 19472)) ;;; Generated autoloads from cl/cl-extra.el ;;;*** -;;;### (autoloads nil "cl-macs" "cl/cl-macs.el" (12639 56810)) +;;;### (autoloads nil "cl-macs" "cl/cl-macs.el" (12860 19474)) ;;; Generated autoloads from cl/cl-macs.el ;;;*** -;;;### (autoloads nil "cl-seq" "cl/cl-seq.el" (12639 8882)) +;;;### (autoloads nil "cl-seq" "cl/cl-seq.el" (12860 19474)) ;;; Generated autoloads from cl/cl-seq.el ;;;*** -;;;### (autoloads nil "cl" "cl/cl.el" (12639 8883)) +;;;### (autoloads nil "cl" "cl/cl.el" (12860 19475)) ;;; Generated autoloads from cl/cl.el - -;;;*** ;;;### (autoloads nil "background" "comint/background.el" (12675 57061)) ;;; Generated autoloads from comint/background.el -;;;### (autoloads (comint-dynamic-list-completions comint-dynamic-complete comint-run make-comint) "comint" "comint/comint.el" (12690 2170)) +;;;### (autoloads (comint-dynamic-list-completions comint-dynamic-complete comint-run make-comint) "comint" "comint/comint.el" (12860 19312)) ;;; Generated autoloads from comint/comint.el (autoload 'make-comint "comint" "\ @@ -1117,7 +1121,7 @@ ;;;*** -;;;### (autoloads (perldb xdb dbx sdb) "gud" "comint/gud.el" (12376 19387)) +;;;### (autoloads (perldb xdb dbx sdb) "gud" "comint/gud.el" (12851 23355)) ;;; Generated autoloads from comint/gud.el (autoload 'sdb "gud" "\ @@ -1154,8 +1158,10 @@ (add-hook 'same-window-buffer-names "*inferior-lisp*") ;;;*** - -;;;### (autoloads nil "kermit" "comint/kermit.el" (12546 50426)) + +;;;*** + +;;;### (autoloads nil "kermit" "comint/kermit.el" (12851 23354)) ;;; Generated autoloads from comint/kermit.el ;;;### (autoloads (rlogin) "rlogin" "comint/rlogin.el" (12282 38441)) @@ -1262,7 +1268,7 @@ ;;;*** -;;;### (autoloads (ange-ftp-hook-function) "ange-ftp" "dired/ange-ftp.el" (12639 8565)) +;;;### (autoloads (ange-ftp-hook-function) "ange-ftp" "dired/ange-ftp.el" (12851 23360)) ;;; Generated autoloads from dired/ange-ftp.el (defvar ange-ftp-path-format '("^/\\(\\([^@/:]*\\)@\\)?\\([^@/:]*\\):\\(.*\\)" 3 2 4) "\ @@ -1282,9 +1288,11 @@ ;;;*** -;;;### (autoloads nil "dired-chmod" "dired/dired-chmod.el" (12376 19393)) +;;;### (autoloads (dired-make-permissions-interactive) "dired-chmod" "dired/dired-chmod.el" (12860 19316)) ;;; Generated autoloads from dired/dired-chmod.el +(autoload 'dired-make-permissions-interactive "dired-chmod" nil nil nil) + ;;;*** ;;;### (autoloads nil "dired-guess" "dired/dired-guess.el" (12376 19389)) @@ -1373,7 +1381,7 @@ ;;;*** -;;;### (autoloads (dired-extra-startup) "dired-x" "dired/dired-x.el" (12376 19392)) +;;;### (autoloads (dired-extra-startup) "dired-x" "dired/dired-x.el" (12851 23360)) ;;; Generated autoloads from dired/dired-x.el (autoload 'dired-extra-startup "dired-x" "\ @@ -1418,7 +1426,7 @@ ;;;### (autoloads nil "dired-xemacs-menu" "dired/dired-xemacs-menu.el" (12322 8756)) ;;; Generated autoloads from dired/dired-xemacs-menu.el -;;;### (autoloads (dired-noselect dired-other-window dired) "dired" "dired/dired.el" (12727 30096)) +;;;### (autoloads (dired-noselect dired-other-window dired) "dired" "dired/dired.el" (12860 19316)) ;;; Generated autoloads from dired/dired.el (defvar dired-listing-switches (purecopy "-al") "\ @@ -1561,11 +1569,11 @@ ;;; Generated autoloads from dired/gmhist.el ;;;*** - -;;;### (autoloads nil "cl-read" "edebug/cl-read.el" (12639 8664)) + +;;;*** + +;;;### (autoloads nil "cl-read" "edebug/cl-read.el" (12851 23502)) ;;; Generated autoloads from edebug/cl-read.el - -;;;*** ;;;### (autoloads nil "cl-specs" "edebug/cl-specs.el" (12546 50556)) ;;; Generated autoloads from edebug/cl-specs.el @@ -1628,7 +1636,7 @@ ;;;*** -;;;### (autoloads (ediff-show-registry) "ediff-mult" "ediff/ediff-mult.el" (12675 57187)) +;;;### (autoloads (ediff-show-registry) "ediff-mult" "ediff/ediff-mult.el" (12851 23556)) ;;; Generated autoloads from ediff/ediff-mult.el (autoload 'ediff-show-registry "ediff-mult" "\ @@ -1642,16 +1650,18 @@ ;;; Generated autoloads from ediff/ediff-ptch.el ;;;*** - -;;;### (autoloads nil "ediff-util" "ediff/ediff-util.el" (12740 28878)) + +;;;*** + +;;;### (autoloads nil "ediff-util" "ediff/ediff-util.el" (12851 23554)) ;;; Generated autoloads from ediff/ediff-util.el - -;;;*** ;;;### (autoloads nil "ediff-vers" "ediff/ediff-vers.el" (12675 57186)) ;;; Generated autoloads from ediff/ediff-vers.el - -;;;### (autoloads nil "ediff-wind" "ediff/ediff-wind.el" (12730 62153)) + +;;;*** + +;;;### (autoloads nil "ediff-wind" "ediff/ediff-wind.el" (12851 23552)) ;;; Generated autoloads from ediff/ediff-wind.el ;;;### (autoloads (electric-buffer-list) "ebuff-menu" "electric/ebuff-menu.el" (12698 33526)) @@ -1791,8 +1801,10 @@ Read and execute a Teco command string." t nil) ;;;*** - -;;;### (autoloads nil "tpu-doc" "emulators/tpu-doc.el" (12376 19403)) + +;;;*** + +;;;### (autoloads nil "tpu-doc" "emulators/tpu-doc.el" (12851 23364)) ;;; Generated autoloads from emulators/tpu-doc.el ;;;### (autoloads (tpu-edt-on) "tpu-edt" "emulators/tpu-edt.el" (12657 40693)) @@ -1902,11 +1914,11 @@ ;;; Generated autoloads from eos/eos.el ;;;*** - -;;;### (autoloads nil "loaddefs-eos" "eos/loaddefs-eos.el" (12748 8006)) + +;;;*** + +;;;### (autoloads nil "loaddefs-eos" "eos/loaddefs-eos.el" (12748 9797)) ;;; Generated autoloads from eos/loaddefs-eos.el - -;;;*** ;;;### (autoloads nil "sun-eos-browser" "eos/sun-eos-browser.el" (12740 25240)) ;;; Generated autoloads from eos/sun-eos-browser.el @@ -1945,11 +1957,11 @@ ;;; Generated autoloads from eos/sun-eos-menubar.el ;;;*** - -;;;### (autoloads nil "sun-eos-toolbar" "eos/sun-eos-toolbar.el" (12740 25234)) + +;;;*** + +;;;### (autoloads nil "sun-eos-toolbar" "eos/sun-eos-toolbar.el" (12860 19463)) ;;; Generated autoloads from eos/sun-eos-toolbar.el - -;;;*** ;;;### (autoloads nil "sun-eos" "eos/sun-eos.el" (12740 25239)) ;;; Generated autoloads from eos/sun-eos.el @@ -2311,14 +2323,26 @@ Zippy goes to the analyst." t nil) ;;;*** - -;;;### (autoloads nil "custom" "gnus/custom.el" (12747 23775)) + +;;;*** + +;;;### (autoloads nil "custom" "gnus/custom.el" (12851 23371)) ;;; Generated autoloads from gnus/custom.el - -;;;### (autoloads nil "dgnushack" "gnus/dgnushack.el" (12740 29825)) + +;;;*** + +;;;### (autoloads nil "dgnushack" "gnus/dgnushack.el" (12851 23372)) ;;; Generated autoloads from gnus/dgnushack.el -;;;### (autoloads (gnus-cache-generate-nov-databases gnus-cache-generate-active gnus-jog-cache) "gnus-cache" "gnus/gnus-cache.el" (12740 29819)) +;;;### (autoloads (gnus-earcon-display) "earcon" "gnus/earcon.el" (12851 23768)) +;;; Generated autoloads from gnus/earcon.el + +(autoload 'gnus-earcon-display "earcon" "\ +Play sounds in message buffers." t nil) + +;;;*** + +;;;### (autoloads (gnus-cache-generate-nov-databases gnus-cache-generate-active gnus-jog-cache) "gnus-cache" "gnus/gnus-cache.el" (12851 23388)) ;;; Generated autoloads from gnus/gnus-cache.el (autoload 'gnus-jog-cache "gnus-cache" "\ @@ -2331,72 +2355,83 @@ Generate NOV files recursively starting in DIR." t nil) ;;;*** - -;;;### (autoloads nil "gnus-cite" "gnus/gnus-cite.el" (12747 7527)) + +;;;*** + +;;;### (autoloads nil "gnus-cite" "gnus/gnus-cite.el" (12851 23375)) ;;; Generated autoloads from gnus/gnus-cite.el - -;;;### (autoloads nil "gnus-cus" "gnus/gnus-cus.el" (12740 29826)) + +;;;*** + +;;;### (autoloads nil "gnus-cus" "gnus/gnus-cus.el" (12851 23377)) ;;; Generated autoloads from gnus/gnus-cus.el + +;;;*** ;;;### (autoloads nil "gnus-demon" "gnus/gnus-demon.el" (12740 29833)) ;;; Generated autoloads from gnus/gnus-demon.el ;;;*** -;;;### (autoloads nil "gnus-edit" "gnus/gnus-edit.el" (12740 29827)) +;;;### (autoloads nil "gnus-edit" "gnus/gnus-edit.el" (12851 23378)) ;;; Generated autoloads from gnus/gnus-edit.el ;;;*** -;;;### (autoloads nil "gnus-ems" "gnus/gnus-ems.el" (12743 11575)) +;;;### (autoloads nil "gnus-ems" "gnus/gnus-ems.el" (12851 23380)) ;;; Generated autoloads from gnus/gnus-ems.el - -;;;### (autoloads nil "gnus-gl" "gnus/gnus-gl.el" (12730 62156)) + +;;;*** + +;;;### (autoloads nil "gnus-gl" "gnus/gnus-gl.el" (12851 23409)) ;;; Generated autoloads from gnus/gnus-gl.el + +;;;*** ;;;### (autoloads nil "gnus-kill" "gnus/gnus-kill.el" (12727 30112)) ;;; Generated autoloads from gnus/gnus-kill.el - -;;;*** ;;;### (autoloads nil "gnus-mh" "gnus/gnus-mh.el" (12740 29827)) ;;; Generated autoloads from gnus/gnus-mh.el ;;;*** - -;;;### (autoloads nil "gnus-msg" "gnus/gnus-msg.el" (12747 7527)) + +;;;*** + +;;;### (autoloads nil "gnus-msg" "gnus/gnus-msg.el" (12851 23383)) ;;; Generated autoloads from gnus/gnus-msg.el - -;;;### (autoloads nil "gnus-nocem" "gnus/gnus-nocem.el" (12727 30244)) + +;;;*** + +;;;### (autoloads nil "gnus-nocem" "gnus/gnus-nocem.el" (12851 23411)) ;;; Generated autoloads from gnus/gnus-nocem.el ;;;*** -;;;### (autoloads nil "gnus-picon" "gnus/gnus-picon.el" (12747 7528)) +;;;### (autoloads nil "gnus-picon" "gnus/gnus-picon.el" (12851 23411)) ;;; Generated autoloads from gnus/gnus-picon.el + +;;;*** ;;;### (autoloads nil "gnus-salt" "gnus/gnus-salt.el" (12745 38025)) ;;; Generated autoloads from gnus/gnus-salt.el - -;;;### (autoloads (gnus-score-mode) "gnus-scomo" "gnus/gnus-scomo.el" (12740 29833)) -;;; Generated autoloads from gnus/gnus-scomo.el - -(autoload 'gnus-score-mode "gnus-scomo" "\ -Mode for editing Gnus score files. -This mode is an extended emacs-lisp mode. - -\\{gnus-score-mode-map}" t nil) - -;;;*** - -;;;### (autoloads nil "gnus-score" "gnus/gnus-score.el" (12744 54649)) + +;;;*** + +;;;### (autoloads nil "gnus-score" "gnus/gnus-score.el" (12851 23370)) ;;; Generated autoloads from gnus/gnus-score.el - -;;;*** ;;;### (autoloads nil "gnus-setup" "gnus/gnus-setup.el" (12727 30246)) ;;; Generated autoloads from gnus/gnus-setup.el +;;;### (autoloads (gnus-sound-play) "gnus-sound" "gnus/gnus-sound.el" (12851 23768)) +;;; Generated autoloads from gnus/gnus-sound.el + +(autoload 'gnus-sound-play "gnus-sound" "\ +Play a sound through the speaker." t nil) + +;;;*** + ;;;### (autoloads (gnus-batch-brew-soup) "gnus-soup" "gnus/gnus-soup.el" (12743 11596)) ;;; Generated autoloads from gnus/gnus-soup.el @@ -2416,29 +2451,33 @@ ;;; Generated autoloads from gnus/gnus-srvr.el ;;;*** - -;;;### (autoloads nil "gnus-topic" "gnus/gnus-topic.el" (12727 30243)) + +;;;*** + +;;;### (autoloads nil "gnus-topic" "gnus/gnus-topic.el" (12851 23374)) ;;; Generated autoloads from gnus/gnus-topic.el ;;;*** -;;;### (autoloads nil "gnus-uu" "gnus/gnus-uu.el" (12743 11578)) +;;;### (autoloads nil "gnus-uu" "gnus/gnus-uu.el" (12851 23384)) ;;; Generated autoloads from gnus/gnus-uu.el ;;;*** -;;;### (autoloads nil "gnus-vis" "gnus/gnus-vis.el" (12747 7527)) +;;;### (autoloads nil "gnus-vis" "gnus/gnus-vis.el" (12851 23386)) ;;; Generated autoloads from gnus/gnus-vis.el + +;;;*** ;;;### (autoloads nil "gnus-vm" "gnus/gnus-vm.el" (12727 30121)) ;;; Generated autoloads from gnus/gnus-vm.el ;;;*** -;;;### (autoloads nil "gnus-xmas" "gnus/gnus-xmas.el" (12747 65521)) +;;;### (autoloads nil "gnus-xmas" "gnus/gnus-xmas.el" (12851 23412)) ;;; Generated autoloads from gnus/gnus-xmas.el -;;;### (autoloads (gnus-batch-score gnus-fetch-group gnus gnus-other-frame gnus-slave gnus-no-server gnus-slave-no-server gnus-add-configuration gnus-update-format) "gnus" "gnus/gnus.el" (12748 38)) +;;;### (autoloads (gnus-batch-score gnus-fetch-group gnus gnus-other-frame gnus-slave gnus-no-server gnus-slave-no-server gnus-add-configuration gnus-update-format) "gnus" "gnus/gnus.el" (12851 23411)) ;;; Generated autoloads from gnus/gnus.el (autoload 'gnus-update-format "gnus" "\ @@ -2488,12 +2527,9 @@ ;;;### (autoloads nil "mailheader" "gnus/mailheader.el" (12727 30250)) ;;; Generated autoloads from gnus/mailheader.el -;;;### (autoloads (unbold-region bold-region message-news-other-frame message-news-other-window message-mail-other-frame message-mail-other-window message-bounce message-resend message-forward message-recover message-supersede message-cancel-news message-followup message-wide-reply message-reply message-news message-mail message-mode) "message" "gnus/message.el" (12747 7528)) +;;;### (autoloads (unbold-region bold-region message-news-other-frame message-news-other-window message-mail-other-frame message-mail-other-window message-bounce message-resend message-forward message-recover message-supersede message-cancel-news message-followup message-wide-reply message-reply message-news message-mail message-mode) "message" "gnus/message.el" (12851 23414)) ;;; Generated autoloads from gnus/message.el -(defvar message-directory "~/Mail/" "\ -*Directory from which all other mail file variables are derived.") - (defvar message-fcc-handler-function 'rmail-output "\ *A function called to save outgoing articles. This function will be called with the name of the file to store the @@ -2576,10 +2612,6 @@ (defvar message-user-organization-file "/usr/lib/news/organization" "\ *Local news organization file.") -(defvar message-autosave-directory (concat (file-name-as-directory message-directory) "drafts/") "\ -*Directory where message autosaves buffers. -If nil, message won't autosave.") - (defvar message-signature-before-forwarded-message t "\ *If non-nil, put the signature before any included forwarded message.") @@ -2750,48 +2782,57 @@ which specify the range to operate on." t nil) ;;;*** - -;;;### (autoloads nil "messagexmas" "gnus/messagexmas.el" (12743 11600)) + +;;;*** + +;;;### (autoloads nil "messagexmas" "gnus/messagexmas.el" (12851 23415)) ;;; Generated autoloads from gnus/messagexmas.el - -;;;### (autoloads nil "nnbabyl" "gnus/nnbabyl.el" (12740 29830)) + +;;;*** + +;;;### (autoloads nil "messcompat" "gnus/messcompat.el" (12852 5842)) +;;; Generated autoloads from gnus/messcompat.el + +;;;*** + +;;;### (autoloads nil "nnbabyl" "gnus/nnbabyl.el" (12851 23387)) ;;; Generated autoloads from gnus/nnbabyl.el - -;;;*** ;;;### (autoloads nil "nndb" "gnus/nndb.el" (12740 29835)) ;;; Generated autoloads from gnus/nndb.el - -;;;### (autoloads nil "nndir" "gnus/nndir.el" (12727 30126)) + +;;;*** + +;;;### (autoloads nil "nndir" "gnus/nndir.el" (12851 23389)) ;;; Generated autoloads from gnus/nndir.el ;;;*** -;;;### (autoloads nil "nndoc" "gnus/nndoc.el" (12727 30128)) +;;;### (autoloads nil "nndoc" "gnus/nndoc.el" (12851 23390)) ;;; Generated autoloads from gnus/nndoc.el - -;;;*** ;;;### (autoloads nil "nndraft" "gnus/nndraft.el" (12727 30254)) ;;; Generated autoloads from gnus/nndraft.el ;;;*** - -;;;### (autoloads nil "nneething" "gnus/nneething.el" (12727 30128)) + +;;;*** + +;;;### (autoloads nil "nneething" "gnus/nneething.el" (12851 23391)) ;;; Generated autoloads from gnus/nneething.el -;;;### (autoloads (nnfolder-generate-active-file) "nnfolder" "gnus/nnfolder.el" (12740 29830)) +;;;### (autoloads (nnfolder-generate-active-file) "nnfolder" "gnus/nnfolder.el" (12851 23392)) ;;; Generated autoloads from gnus/nnfolder.el (autoload 'nnfolder-generate-active-file "nnfolder" "\ Look for mbox folders in the nnfolder directory and make them into groups." t nil) ;;;*** - -;;;### (autoloads nil "nnheader" "gnus/nnheader.el" (12747 7528)) + +;;;*** + +;;;### (autoloads nil "nnheader" "gnus/nnheader.el" (12851 23393)) ;;; Generated autoloads from gnus/nnheader.el - -;;;*** ;;;### (autoloads nil "nnheaderems" "gnus/nnheaderems.el" (12740 29835)) ;;; Generated autoloads from gnus/nnheaderems.el @@ -2807,16 +2848,20 @@ Finds out what articles are to be part of the nnkiboze groups." t nil) ;;;*** - -;;;### (autoloads nil "nnmail" "gnus/nnmail.el" (12743 11580)) + +;;;*** + +;;;### (autoloads nil "nnmail" "gnus/nnmail.el" (12851 23394)) ;;; Generated autoloads from gnus/nnmail.el - -;;;### (autoloads nil "nnmbox" "gnus/nnmbox.el" (12740 29831)) + +;;;*** + +;;;### (autoloads nil "nnmbox" "gnus/nnmbox.el" (12851 23395)) ;;; Generated autoloads from gnus/nnmbox.el ;;;*** -;;;### (autoloads nil "nnmh" "gnus/nnmh.el" (12745 38025)) +;;;### (autoloads nil "nnmh" "gnus/nnmh.el" (12851 23396)) ;;; Generated autoloads from gnus/nnmh.el ;;;### (autoloads (nnml-generate-nov-databases) "nnml" "gnus/nnml.el" (12745 38025)) @@ -2843,52 +2888,94 @@ Revert posting and mailing methods to the standard Emacs methods." t nil) ;;;*** - -;;;### (autoloads nil "nnspool" "gnus/nnspool.el" (12743 11584)) + +;;;*** + +;;;### (autoloads nil "nnspool" "gnus/nnspool.el" (12851 23399)) ;;; Generated autoloads from gnus/nnspool.el ;;;*** -;;;### (autoloads nil "nntp" "gnus/nntp.el" (12744 54653)) +;;;### (autoloads nil "nntp" "gnus/nntp.el" (12851 23398)) ;;; Generated autoloads from gnus/nntp.el + +;;;*** ;;;### (autoloads nil "nnvirtual" "gnus/nnvirtual.el" (12740 29832)) ;;; Generated autoloads from gnus/nnvirtual.el -;;;### (autoloads (gnus-smiley-display) "smiley" "gnus/smiley.el" (12743 11601)) +;;;### (autoloads (gnus-score-mode) "score-mode" "gnus/score-mode.el" (12851 23766)) +;;; Generated autoloads from gnus/score-mode.el + +(autoload 'gnus-score-mode "score-mode" "\ +Mode for editing Gnus score files. +This mode is an extended emacs-lisp mode. + +\\{gnus-score-mode-map}" t nil) + +;;;*** + +;;;### (autoloads (gnus-smiley-display smiley-buffer smiley-region) "smiley" "gnus/smiley.el" (12851 23416)) ;;; Generated autoloads from gnus/smiley.el +(autoload 'smiley-region "smiley" "\ +Smilify the region between point and mark." t nil) + +(autoload 'smiley-buffer "smiley" nil t nil) + (autoload 'gnus-smiley-display "smiley" nil t nil) ;;;*** - -;;;### (autoloads nil "adapt" "hm--html-menus/adapt.el" (12351 16418)) + +;;;*** + +;;;### (autoloads nil "adapt" "hm--html-menus/adapt.el" (12851 23560)) ;;; Generated autoloads from hm--html-menus/adapt.el - -;;;### (autoloads nil "hm--date" "hm--html-menus/hm--date.el" (12376 19696)) + +;;;*** + +;;;### (autoloads nil "hm--date" "hm--html-menus/hm--date.el" (12851 23561)) ;;; Generated autoloads from hm--html-menus/hm--date.el ;;;*** -;;;### (autoloads nil "hm--html-configuration" "hm--html-menus/hm--html-configuration.el" (12583 60715)) +;;;### (autoloads nil "hm--html-configuration" "hm--html-menus/hm--html-configuration.el" (12851 23566)) ;;; Generated autoloads from hm--html-menus/hm--html-configuration.el ;;;*** -;;;### (autoloads nil "hm--html-keys" "hm--html-menus/hm--html-keys.el" (12583 60717)) +;;;### (autoloads nil "hm--html-drag-and-drop" "hm--html-menus/hm--html-drag-and-drop.el" (12851 23773)) +;;; Generated autoloads from hm--html-menus/hm--html-drag-and-drop.el + +;;;*** + +;;;### (autoloads nil "hm--html-keys" "hm--html-menus/hm--html-keys.el" (12851 23568)) ;;; Generated autoloads from hm--html-menus/hm--html-keys.el ;;;*** -;;;### (autoloads nil "hm--html-menu" "hm--html-menus/hm--html-menu.el" (12583 60713)) +;;;### (autoloads nil "hm--html-menu" "hm--html-menus/hm--html-menu.el" (12851 23562)) ;;; Generated autoloads from hm--html-menus/hm--html-menu.el - -;;;*** - -;;;### (autoloads nil "hm--html" "hm--html-menus/hm--html.el" (12639 8719)) + +;;;### (autoloads (hm--html-minor-mode hm--html-mode) "hm--html-mode" "hm--html-menus/hm--html-mode.el" (12851 23773)) +;;; Generated autoloads from hm--html-menus/hm--html-mode.el + +(autoload 'hm--html-mode "hm--html-mode" "\ +Major mode for editing HTML hypertext documents. +Special commands:\\{hm--html-mode-map} +Turning on hm--html-mode calls the value of the variable hm--html-mode-hook, +if that value is non-nil." t nil) + +(autoload 'hm--html-minor-mode "hm--html-mode" "\ +Toggle hm--html-minor-mode. +With arg, turn hm--html-minor-mode on iff arg is positive." t nil) + +;;;*** + +;;;*** + +;;;### (autoloads nil "hm--html" "hm--html-menus/hm--html.el" (12851 23565)) ;;; Generated autoloads from hm--html-menus/hm--html.el - -;;;*** ;;;### (autoloads nil "html-mode" "hm--html-menus/html-mode.el" (12639 8719)) ;;; Generated autoloads from hm--html-menus/html-mode.el @@ -2915,14 +3002,21 @@ Get the display for Mosaic." t nil) ;;;*** - -;;;### (autoloads nil "tmpl-minor-mode" "hm--html-menus/tmpl-minor-mode.el" (12639 8720)) + +;;;*** + +;;;### (autoloads nil "internal-drag-and-drop" "hm--html-menus/internal-drag-and-drop.el" (12851 23775)) +;;; Generated autoloads from hm--html-menus/internal-drag-and-drop.el + +;;;*** + +;;;### (autoloads nil "tmpl-minor-mode" "hm--html-menus/tmpl-minor-mode.el" (12852 6069)) ;;; Generated autoloads from hm--html-menus/tmpl-minor-mode.el - -;;;### (autoloads nil "hact" "hyperbole/hact.el" (12376 19672)) + +;;;*** + +;;;### (autoloads nil "hact" "hyperbole/hact.el" (12178 36891)) ;;; Generated autoloads from hyperbole/hact.el - -;;;*** ;;;### (autoloads nil "hactypes" "hyperbole/hactypes.el" (12558 60986)) ;;; Generated autoloads from hyperbole/hactypes.el @@ -3443,11 +3537,11 @@ ;;; Generated autoloads from ilisp/comint-ipc.el ;;;*** - -;;;### (autoloads nil "comint-v18" "ilisp/comint-v18.el" (12376 19423)) + +;;;*** + +;;;### (autoloads nil "comint-v18" "ilisp/comint-v18.el" (12851 23418)) ;;; Generated autoloads from ilisp/comint-v18.el - -;;;*** ;;;### (autoloads nil "completer" "ilisp/completer.el" (12675 57068)) ;;; Generated autoloads from ilisp/completer.el @@ -3687,39 +3781,41 @@ ;;; Generated autoloads from ilisp/ilxemacs.el ;;;*** - -;;;### (autoloads nil "iso-ascii" "iso/iso-ascii.el" (12282 38391)) + +;;;*** + +;;;### (autoloads nil "iso-ascii" "iso/iso-ascii.el" (12860 19463)) ;;; Generated autoloads from iso/iso-ascii.el - -;;;### (autoloads nil "iso-cvt" "iso/iso-cvt.el" (12376 19651)) + +;;;*** + +;;;### (autoloads nil "iso-cvt" "iso/iso-cvt.el" (12860 19464)) ;;; Generated autoloads from iso/iso-cvt.el ;;;*** -;;;### (autoloads nil "iso-insert" "iso/iso-insert.el" (12376 19650)) +;;;### (autoloads nil "iso-insert" "iso/iso-insert.el" (12860 19465)) ;;; Generated autoloads from iso/iso-insert.el ;;;*** -;;;### (autoloads nil "iso-swed" "iso/iso-swed.el" (12376 19650)) +;;;### (autoloads nil "iso-swed" "iso/iso-swed.el" (12860 19465)) ;;; Generated autoloads from iso/iso-swed.el ;;;*** -;;;### (autoloads nil "iso-syntax" "iso/iso-syntax.el" (12376 19652)) +;;;### (autoloads nil "iso-syntax" "iso/iso-syntax.el" (12860 19466)) ;;; Generated autoloads from iso/iso-syntax.el - -;;;*** ;;;### (autoloads nil "iso8859-1" "iso/iso8859-1.el" (12376 19650)) ;;; Generated autoloads from iso/iso8859-1.el ;;;*** - -;;;### (autoloads nil "swedish" "iso/swedish.el" (12376 19651)) + +;;;*** + +;;;### (autoloads nil "swedish" "iso/swedish.el" (12860 19466)) ;;; Generated autoloads from iso/swedish.el - -;;;*** ;;;### (autoloads nil "site-start" "lisp/site-start.el" (12605 44813)) ;;; Generated autoloads from lisp/site-start.el @@ -3777,7 +3873,7 @@ ;;;*** -;;;### (autoloads (mc-mh-snarf-keys mc-mh-verify-signature mc-mh-decrypt-message mc-gnus-decrypt-message mc-gnus-snarf-keys mc-gnus-verify-signature mc-vm-snarf-keys mc-vm-decrypt-message mc-vm-verify-signature mc-rmail-decrypt-message mc-rmail-verify-signature mc-rmail-summary-snarf-keys mc-rmail-summary-decrypt-message mc-rmail-summary-verify-signature mc-snarf-keys mc-snarf mc-insert-public-key mc-verify-signature mc-verify mc-sign-message mc-sign mc-decrypt-message mc-decrypt mc-encrypt-message mc-encrypt mc-cleanup-recipient-headers) "mc-toplev" "mailcrypt/mc-toplev.el" (12639 8701)) +;;;### (autoloads (mc-mh-snarf-keys mc-mh-verify-signature mc-mh-decrypt-message mc-gnus-decrypt-message mc-gnus-snarf-keys mc-gnus-verify-signature mc-vm-snarf-keys mc-vm-decrypt-message mc-vm-verify-signature mc-rmail-decrypt-message mc-rmail-verify-signature mc-rmail-summary-snarf-keys mc-rmail-summary-decrypt-message mc-rmail-summary-verify-signature mc-snarf-keys mc-snarf mc-insert-public-key mc-verify-signature mc-verify mc-sign-message mc-sign mc-decrypt-message mc-decrypt mc-encrypt-message mc-encrypt mc-cleanup-recipient-headers) "mc-toplev" "mailcrypt/mc-toplev.el" (12860 19469)) ;;; Generated autoloads from mailcrypt/mc-toplev.el (autoload 'mc-cleanup-recipient-headers "mc-toplev" nil nil nil) @@ -3971,7 +4067,7 @@ ;;;### (autoloads nil "mh-seq" "mh-e/mh-seq.el" (12657 40776)) ;;; Generated autoloads from mh-e/mh-seq.el -;;;### (autoloads nil "mh-utils" "mh-e/mh-utils.el" (12657 40777)) +;;;### (autoloads nil "mh-utils" "mh-e/mh-utils.el" (12860 19470)) ;;; Generated autoloads from mh-e/mh-utils.el (put 'mh-progs 'risky-local-variable t) @@ -3979,11 +4075,13 @@ (put 'mh-lib 'risky-local-variable t) ;;;*** - -;;;### (autoloads nil "abbrev" "modes/abbrev.el" (12639 8573)) + +;;;*** + +;;;### (autoloads nil "abbrev" "modes/abbrev.el" (12860 19320)) ;;; Generated autoloads from modes/abbrev.el -;;;### (autoloads (ada-make-filename-from-adaname ada-mode) "ada-mode" "modes/ada-mode.el" (12559 34908)) +;;;### (autoloads (ada-make-filename-from-adaname ada-mode) "ada-mode" "modes/ada-mode.el" (12860 19346)) ;;; Generated autoloads from modes/ada-mode.el (autoload 'ada-mode "ada-mode" "\ @@ -4037,11 +4135,11 @@ Execute Gnatf: '\\[ada-gnatf-current]'" t nil) (autoload 'ada-make-filename-from-adaname "ada-mode" "\ -determine the filename of a package/procedure from its own Ada name." t nil) - -;;;*** - -;;;### (autoloads (archive-mode) "arc-mode" "modes/arc-mode.el" (12559 34909)) +Determine the filename of a package/procedure from its own Ada name." t nil) + +;;;*** + +;;;### (autoloads (archive-mode) "arc-mode" "modes/arc-mode.el" (12860 19347)) ;;; Generated autoloads from modes/arc-mode.el (autoload 'archive-mode "arc-mode" "\ @@ -4059,7 +4157,7 @@ ;;;*** -;;;### (autoloads (asm-mode) "asm-mode" "modes/asm-mode.el" (12558 60896)) +;;;### (autoloads (asm-mode) "asm-mode" "modes/asm-mode.el" (12860 19341)) ;;; Generated autoloads from modes/asm-mode.el (autoload 'asm-mode "asm-mode" "\ @@ -4079,17 +4177,18 @@ Turning on Asm mode runs the hook `asm-mode-hook' at the end of initialization. -Special commands:\\{asm-mode-map} +Special commands: +\\{asm-mode-map} " t nil) ;;;*** - -;;;### (autoloads nil "auto-show" "modes/auto-show.el" (12698 33539)) + +;;;*** + +;;;### (autoloads nil "auto-show" "modes/auto-show.el" (12861 45384)) ;;; Generated autoloads from modes/auto-show.el - -;;;*** - -;;;### (autoloads (awk-mode) "awk-mode" "modes/awk-mode.el" (12559 34897)) + +;;;### (autoloads (awk-mode) "awk-mode" "modes/awk-mode.el" (12860 19319)) ;;; Generated autoloads from modes/awk-mode.el (autoload 'awk-mode "awk-mode" "\ @@ -4102,13 +4201,13 @@ with no args, if that value is non-nil." t nil) ;;;*** - -;;;### (autoloads nil "bib-mode" "modes/bib-mode.el" (12559 34898)) + +;;;*** + +;;;### (autoloads nil "bib-mode" "modes/bib-mode.el" (12860 19320)) ;;; Generated autoloads from modes/bib-mode.el - -;;;*** - -;;;### (autoloads (bibtex-mode) "bibtex" "modes/bibtex.el" (12147 25394)) + +;;;### (autoloads (bibtex-mode) "bibtex" "modes/bibtex.el" (12851 23421)) ;;; Generated autoloads from modes/bibtex.el (autoload 'bibtex-mode "bibtex" "\ @@ -4195,7 +4294,7 @@ School name (for theses) series The name of a series or set of books. - An individual book will will also have it's own title + An individual book will also have its own title title The title of the thing being referenced type @@ -4238,18 +4337,20 @@ ;;; Generated autoloads from modes/cc-lobotomy.el ;;;*** - -;;;### (autoloads nil "cc-mode" "modes/cc-mode.el" (12740 25201)) + +;;;*** + +;;;### (autoloads nil "cc-mode" "modes/cc-mode.el" (12851 27486)) ;;; Generated autoloads from modes/cc-mode.el -;;;### (autoloads (common-lisp-indent-function) "cl-indent" "modes/cl-indent.el" (12147 25404)) +;;;### (autoloads (common-lisp-indent-function) "cl-indent" "modes/cl-indent.el" (12860 19322)) ;;; Generated autoloads from modes/cl-indent.el (autoload 'common-lisp-indent-function "cl-indent" nil nil nil) ;;;*** -;;;### (autoloads (c-macro-expand) "cmacexp" "modes/cmacexp.el" (12546 50436)) +;;;### (autoloads (c-macro-expand) "cmacexp" "modes/cmacexp.el" (12860 19323)) ;;; Generated autoloads from modes/cmacexp.el (autoload 'c-macro-expand "cmacexp" "\ @@ -4265,20 +4366,22 @@ For use inside Lisp programs, see also `c-macro-expansion'." t nil) ;;;*** - -;;;### (autoloads nil "cperl-mode" "modes/cperl-mode.el" (12675 57223)) + +;;;*** + +;;;### (autoloads nil "cperl-mode" "modes/cperl-mode.el" (12851 23434)) ;;; Generated autoloads from modes/cperl-mode.el -;;;### (autoloads (enriched-decode enriched-encode enriched-mode) "enriched" "modes/enriched.el" (12648 18668)) +;;;### (autoloads (enriched-decode enriched-encode enriched-mode) "enriched" "modes/enriched.el" (12860 19332)) ;;; Generated autoloads from modes/enriched.el (autoload 'enriched-mode "enriched" "\ Minor mode for editing text/enriched files. These are files with embedded formatting information in the MIME standard text/enriched format. -Turning the mode on runs `enriched-mode-hooks'. - -More information about enriched-mode is available in the file +Turning the mode on runs `enriched-mode-hook'. + +More information about Enriched mode is available in the file etc/enriched.doc in the Emacs distribution directory. Commands: @@ -4291,7 +4394,23 @@ ;;;*** -;;;### (autoloads (f90-mode) "f90" "modes/f90.el" (12675 57071)) +;;;### (autoloads (executable-self-display executable-set-magic) "executable" "modes/executable.el" (12860 38202)) +;;; Generated autoloads from modes/executable.el + +(autoload 'executable-set-magic "executable" "\ +Set this buffer's interpreter to INTERPRETER with optional ARGUMENT. +The variables `executable-magicless-file-regexp', `executable-prefix', +`executable-insert', `executable-query' and `executable-chmod' control +when and how magic numbers are inserted or replaced and scripts made +executable." t nil) + +(autoload 'executable-self-display "executable" "\ +Turn a text file into a self-displaying Un*x command. +The magic number of such a command displays all lines but itself." t nil) + +;;;*** + +;;;### (autoloads (f90-mode) "f90" "modes/f90.el" (12860 19341)) ;;; Generated autoloads from modes/f90.el (autoload 'f90-mode "f90" "\ @@ -4347,7 +4466,7 @@ Do not left-justify line numbers. (default nil) f90-startup-message Set to nil to inhibit message first time F90 mode is used. (default t) - f90-keywords + f90-keywords-re List of keywords used for highlighting/upcase-keywords etc. Turning on F90 mode calls the value of the variable `f90-mode-hook' @@ -4355,7 +4474,7 @@ ;;;*** -;;;### (autoloads (follow-delete-other-windows-and-split follow-mode turn-off-follow-mode turn-on-follow-mode) "follow" "modes/follow.el" (12720 56486)) +;;;### (autoloads (follow-delete-other-windows-and-split follow-mode turn-off-follow-mode turn-on-follow-mode) "follow" "modes/follow.el" (12860 19352)) ;;; Generated autoloads from modes/follow.el (add-minor-mode 'follow-mode nil 'follow-mode-map) @@ -4426,7 +4545,7 @@ ;;;### (autoloads nil "fortran-misc" "modes/fortran-misc.el" (12376 19458)) ;;; Generated autoloads from modes/fortran-misc.el -;;;### (autoloads (fortran-mode) "fortran" "modes/fortran.el" (12558 60889)) +;;;### (autoloads (fortran-mode) "fortran" "modes/fortran.el" (12860 19328)) ;;; Generated autoloads from modes/fortran.el (defvar fortran-tab-mode-default nil "\ @@ -4508,14 +4627,55 @@ ;;;*** -;;;### (autoloads nil "hideif" "modes/hideif.el" (12639 8574)) +;;;### (autoloads (hide-ifdef-mode) "hideif" "modes/hideif.el" (12860 19330)) ;;; Generated autoloads from modes/hideif.el (add-minor-mode 'hide-ifdef-mode " Ifdef") -;;;*** - -;;;### (autoloads (hs-minor-mode hs-hide-block hs-hide-all) "hideshow" "modes/hideshow.el" (12648 18570)) +(autoload 'hide-ifdef-mode "hideif" "\ +Toggle Hide-Ifdef mode. This is a minor mode, albeit a large one. +With ARG, turn Hide-Ifdef mode on if arg is positive, off otherwise. +In Hide-Ifdef mode, code within #ifdef constructs that the C preprocessor +would eliminate may be hidden from view. Several variables affect +how the hiding is done: + +hide-ifdef-env + An association list of defined and undefined symbols for the + current buffer. Initially, the global value of `hide-ifdef-env' + is used. + +hide-ifdef-define-alist + An association list of defined symbol lists. + Use `hide-ifdef-set-define-alist' to save the current `hide-ifdef-env' + and `hide-ifdef-use-define-alist' to set the current `hide-ifdef-env' + from one of the lists in `hide-ifdef-define-alist'. + +hide-ifdef-lines + Set to non-nil to not show #if, #ifdef, #ifndef, #else, and + #endif lines when hiding. + +hide-ifdef-initially + Indicates whether `hide-ifdefs' should be called when Hide-Ifdef mode + is activated. + +hide-ifdef-read-only + Set to non-nil if you want to make buffers read only while hiding. + After `show-ifdefs', read-only status is restored to previous value. + +\\{hide-ifdef-mode-map}" t nil) + +(defvar hide-ifdef-initially nil "\ +*Non-nil means call `hide-ifdefs' when Hide-Ifdef mode is first activated.") + +(defvar hide-ifdef-read-only nil "\ +*Set to non-nil if you want buffer to be read-only while hiding text.") + +(defvar hide-ifdef-lines nil "\ +*Non-nil means hide the #ifX, #else, and #endif lines.") + +;;;*** + +;;;### (autoloads (hs-minor-mode hs-hide-block hs-hide-all) "hideshow" "modes/hideshow.el" (12860 19348)) ;;; Generated autoloads from modes/hideshow.el (defvar hs-minor-mode nil "\ @@ -4524,26 +4684,22 @@ (autoload 'hs-hide-all "hideshow" "\ Hides all top-level blocks, displaying only first and last lines. -When done, point is repositioned at the beginning of the line, and -hs-hide-hooks is called. See documentation for `run-hooks'." t nil) +It moves point to the beginning of the line, and it runs the normal hook +`hs-hide-hook'. See documentation for `run-hooks'." t nil) (autoload 'hs-hide-block "hideshow" "\ Selects a block and hides it. With prefix arg, reposition at end. Block is defined as a sexp for lispish modes, mode-specific otherwise. Comments are blocks, too. Upon completion, point is at repositioned and -hs-hide-hooks is called. See documentation for `run-hooks'." t nil) +the normal hook `hs-hide-hook' is run. See documentation for `run-hooks'." t nil) (autoload 'hs-minor-mode "hideshow" "\ Toggle hideshow minor mode. With ARG, turn hideshow minor mode on if ARG is positive, off otherwise. When hideshow minor mode is on, the menu bar is augmented with hideshow commands and the hideshow commands are enabled. The variables - - selective-display - selective-display-ellipses - -are set to t. Lastly, the hooks set in hs-minor-mode-hook are called. -See documentation for `run-hooks'. +`selective-display' and `selective-display-ellipses' are set to t. +Last, the normal hook `hs-minor-mode-hook' is run; see the doc for `run-hooks'. Turning hideshow minor mode off reverts the menu bar and the variables to default values and disables the hideshow commands." t nil) @@ -4552,7 +4708,7 @@ ;;;*** -;;;### (autoloads (icon-mode) "icon" "modes/icon.el" (12559 34901)) +;;;### (autoloads (icon-mode) "icon" "modes/icon.el" (12860 19325)) ;;; Generated autoloads from modes/icon.el (autoload 'icon-mode "icon" "\ @@ -4590,11 +4746,55 @@ ;;;*** -;;;### (autoloads (ksh-mode) "ksh-mode" "modes/ksh-mode.el" (12714 11717)) +;;;### (autoloads (imenu imenu-add-to-menubar) "imenu" "modes/imenu.el" (12860 19511)) +;;; Generated autoloads from modes/imenu.el + +(defvar imenu-generic-expression nil "\ +The regex pattern to use for creating a buffer index. + +If non-nil this pattern is passed to `imenu-create-index-with-pattern' +to create a buffer index. + +It is an alist with elements that look like this: (MENU-TITLE +REGEXP INDEX). + +MENU-TITLE is a string used as the title for the submenu or nil if the +entries are not nested. + +REGEXP is a regexp that should match a construct in the buffer that is +to be displayed in the menu; i.e., function or variable definitions, +etc. It contains a substring which is the name to appear in the +menu. See the info section on Regexps for more information. + +INDEX points to the substring in REGEXP that contains the name (of the +function, variable or type) that is to appear in the menu. + +For emacs-lisp-mode for example PATTERN would look like: + +'((nil \"^\\\\s-*(def\\\\(un\\\\|subst\\\\|macro\\\\|advice\\\\)\\\\s-+\\\\([-A-Za-z0-9+]+\\\\)\" 2) + (\"*Vars*\" \"^\\\\s-*(def\\\\(var\\\\|const\\\\)\\\\s-+\\\\([-A-Za-z0-9+]+\\\\)\" 2) + (\"*Types*\" \"^\\\\s-*(def\\\\(type\\\\|struct\\\\|class\\\\|ine-condition\\\\)\\\\s-+\\\\([-A-Za-z0-9+]+\\\\)\" 2)) + +The variable is buffer-local.") + +(make-variable-buffer-local 'imenu-generic-expression) + +(autoload 'imenu-add-to-menubar "imenu" "\ +Adds an `imenu' entry to the menu bar for the current buffer. +NAME is a string used to name the menu bar item. +See the command `imenu' for more information." t nil) + +(autoload 'imenu "imenu" "\ +Jump to a place in the buffer chosen using a buffer menu or mouse menu. +See `imenu-choose-buffer-index' for more information." t nil) + +;;;*** + +;;;### (autoloads (ksh-mode) "ksh-mode" "modes/ksh-mode.el" (12860 19340)) ;;; Generated autoloads from modes/ksh-mode.el (autoload 'ksh-mode "ksh-mode" "\ -ksh-mode 2.6 - Major mode for editing (Bourne, Korn or Bourne again) +ksh-mode $Revision: 1.1.1.2 $ - Major mode for editing (Bourne, Korn or Bourne again) shell scripts. Special key bindings and commands: \\{ksh-mode-map} @@ -4691,22 +4891,12 @@ Installation: - Put ksh-mode.el in some directory in your load-path. - Put the following forms in your .emacs file. - - (setq auto-mode-alist - (append auto-mode-alist - (list - '(\"\\\\.sh$\" . ksh-mode) - '(\"\\\\.ksh$\" . ksh-mode) - '(\"\\\\.bashrc\" . ksh-mode) - '(\"\\\\..*profile\" . ksh-mode)))) (setq ksh-mode-hook (function (lambda () (font-lock-mode 1) ;; font-lock the buffer (setq ksh-indent 8) - (setq ksh-group-offset -8)) + (setq ksh-group-offset -8) (setq ksh-brace-offset -8) (setq ksh-tab-always-indent t) (setq ksh-match-and-tell t) @@ -4714,21 +4904,23 @@ )))" t nil) ;;;*** - -;;;### (autoloads nil "lisp-mnt" "modes/lisp-mnt.el" (12546 50449)) + +;;;*** + +;;;### (autoloads nil "lisp-mnt" "modes/lisp-mnt.el" (12860 19343)) ;;; Generated autoloads from modes/lisp-mnt.el ;;;*** -;;;### (autoloads nil "lisp-mode" "modes/lisp-mode.el" (12728 13792)) +;;;### (autoloads nil "lisp-mode" "modes/lisp-mode.el" (12860 19331)) ;;; Generated autoloads from modes/lisp-mode.el ;;;*** -;;;### (autoloads nil "list-mode" "modes/list-mode.el" (12740 25196)) +;;;### (autoloads nil "list-mode" "modes/list-mode.el" (12851 27167)) ;;; Generated autoloads from modes/list-mode.el -;;;### (autoloads (makefile-mode) "make-mode" "modes/make-mode.el" (12558 60885)) +;;;### (autoloads (makefile-mode) "make-mode" "modes/make-mode.el" (12860 19318)) ;;; Generated autoloads from modes/make-mode.el (autoload 'makefile-mode "make-mode" "\ @@ -4838,36 +5030,36 @@ ;;;*** -;;;### (autoloads (modula-2-mode) "modula2" "modes/modula2.el" (12376 19453)) +;;;### (autoloads (modula-2-mode) "modula2" "modes/modula2.el" (12860 19331)) ;;; Generated autoloads from modes/modula2.el (autoload 'modula-2-mode "modula2" "\ This is a mode intended to support program development in Modula-2. -All control constructs of Modula-2 can be reached by typing -Control-C followed by the first character of the construct. -\\{m2-mode-map} - Control-c b begin Control-c c case - Control-c d definition Control-c e else - Control-c f for Control-c h header - Control-c i if Control-c m module - Control-c l loop Control-c o or - Control-c p procedure Control-c Control-w with - Control-c r record Control-c s stdio - Control-c t type Control-c u until - Control-c v var Control-c w while - Control-c x export Control-c y import - Control-c { begin-comment Control-c } end-comment - Control-c Control-z suspend-emacs Control-c Control-t toggle - Control-c Control-c compile Control-x ` next-error - Control-c Control-l link - - m2-indent controls the number of spaces for each indentation. - m2-compile-command holds the command to compile a Modula-2 program. - m2-link-command holds the command to link a Modula-2 program." t nil) - -;;;*** - -;;;### (autoloads (electric-nroff-mode nroff-mode) "nroff-mode" "modes/nroff-mode.el" (12648 18567)) +All control constructs of Modula-2 can be reached by typing C-c +followed by the first character of the construct. +\\<m2-mode-map> + \\[m2-begin] begin \\[m2-case] case + \\[m2-definition] definition \\[m2-else] else + \\[m2-for] for \\[m2-header] header + \\[m2-if] if \\[m2-module] module + \\[m2-loop] loop \\[m2-or] or + \\[m2-procedure] procedure Control-c Control-w with + \\[m2-record] record \\[m2-stdio] stdio + \\[m2-type] type \\[m2-until] until + \\[m2-var] var \\[m2-while] while + \\[m2-export] export \\[m2-import] import + \\[m2-begin-comment] begin-comment \\[m2-end-comment] end-comment + \\[suspend-emacs] suspend Emacs \\[m2-toggle] toggle + \\[m2-compile] compile \\[m2-next-error] next-error + \\[m2-link] link + + `m2-indent' controls the number of spaces for each indentation. + `m2-compile-command' holds the command to compile a Modula-2 program. + `m2-link-command' holds the command to link a Modula-2 program." t nil) + +;;;*** + +;;;### (autoloads (electric-nroff-mode nroff-mode) "nroff-mode" "modes/nroff-mode.el" (12860 19335)) ;;; Generated autoloads from modes/nroff-mode.el (autoload 'nroff-mode "nroff-mode" "\ @@ -4902,7 +5094,7 @@ ;;;*** -;;;### (autoloads (outline-minor-mode outline-mode) "outline" "modes/outline.el" (12648 18566)) +;;;### (autoloads (outline-minor-mode outline-mode) "outline" "modes/outline.el" (12860 19322)) ;;; Generated autoloads from modes/outline.el (defvar outline-minor-mode nil "\ @@ -5147,7 +5339,7 @@ ;;;*** -;;;### (autoloads (run-prolog inferior-prolog-mode prolog-mode) "prolog" "modes/prolog.el" (12558 60895)) +;;;### (autoloads (run-prolog inferior-prolog-mode prolog-mode) "prolog" "modes/prolog.el" (12860 19336)) ;;; Generated autoloads from modes/prolog.el (autoload 'prolog-mode "prolog" "\ @@ -5188,6 +5380,34 @@ ;;;*** +;;;### (autoloads (python-mode) "python-mode" "modes/python-mode.el" (12851 23770)) +;;; Generated autoloads from modes/python-mode.el + +(eval-when-compile (condition-case nil (progn (require 'cl) (require 'imenu)) (error nil))) + +(autoload 'python-mode "python-mode" "\ +Major mode for editing Python files. +To submit a problem report, enter `\\[py-submit-bug-report]' from a +`python-mode' buffer. Do `\\[py-describe-mode]' for detailed +documentation. To see what version of `python-mode' you are running, +enter `\\[py-version]'. + +This mode knows about Python indentation, tokens, comments and +continuation lines. Paragraphs are separated by blank lines only. + +COMMANDS +\\{py-mode-map} +VARIABLES + +py-indent-offset indentation increment +py-block-comment-prefix comment string used by comment-region +py-python-command shell command to invoke Python interpreter +py-scroll-process-buffer always scroll Python process buffer +py-temp-directory directory used for temp files (if needed) +py-beep-if-tab-change ring the bell if tab-width is changed" t nil) + +;;;*** + ;;;### (autoloads (rexx-mode) "rexx-mode" "modes/rexx-mode.el" (12558 60898)) ;;; Generated autoloads from modes/rexx-mode.el @@ -5294,7 +5514,7 @@ ;;;*** -;;;### (autoloads (scheme-mode) "scheme" "modes/scheme.el" (12376 19455)) +;;;### (autoloads (scheme-mode) "scheme" "modes/scheme.el" (12860 19337)) ;;; Generated autoloads from modes/scheme.el (autoload 'scheme-mode "scheme" "\ @@ -5478,10 +5698,64 @@ ;;;*** +;;;### (autoloads (sh-mode) "sh-script" "modes/sh-script.el" (12860 38202)) +;;; Generated autoloads from modes/sh-script.el + +(put 'sh-mode 'mode-class 'special) + +(autoload 'sh-mode "sh-script" "\ +Major mode for editing shell scripts. +This mode works for many shells, since they all have roughly the same syntax, +as far as commands, arguments, variables, pipes, comments etc. are concerned. +Unless the file's magic number indicates the shell, your usual shell is +assumed. Since filenames rarely give a clue, they are not further analyzed. + +This mode adapts to the variations between shells (see `sh-set-shell') by +means of an inheritance based feature lookup (see `sh-feature'). This +mechanism applies to all variables (including skeletons) that pertain to +shell-specific features. + +The default style of this mode is that of Rosenblatt's Korn shell book. +The syntax of the statements varies with the shell being used. The +following commands are available, based on the current shell's syntax: + +\\[sh-case] case statement +\\[sh-for] for loop +\\[sh-function] function definition +\\[sh-if] if statement +\\[sh-indexed-loop] indexed loop from 1 to n +\\[sh-while-getopts] while getopts loop +\\[sh-repeat] repeat loop +\\[sh-select] select loop +\\[sh-until] until loop +\\[sh-while] while loop + +\\[backward-delete-char-untabify] Delete backward one position, even if it was a tab. +\\[sh-newline-and-indent] Delete unquoted space and indent new line same as this one. +\\[sh-end-of-command] Go to end of successive commands. +\\[sh-beginning-of-command] Go to beginning of successive commands. +\\[sh-set-shell] Set this buffer's shell, and maybe its magic number. +\\[sh-execute-region] Have optional header and region be executed in a subshell. + +\\[sh-maybe-here-document] Without prefix, following an unquoted < inserts here document. +{, (, [, ', \", ` + Unless quoted with \\, insert the pairs {}, (), [], or '', \"\", ``. + +If you generally program a shell different from your login shell you can +set `sh-shell-file' accordingly. If your shell's file name doesn't correctly +indicate what shell it is use `sh-alias-alist' to translate. + +If your shell gives error messages with line numbers, you can use \\[executable-interpret] +with your script for an edit-interpret-debug cycle." t nil) + +(defalias 'shell-script-mode 'sh-mode) + +;;;*** + ;;;### (autoloads nil "simula" "modes/simula.el" (12546 50444)) ;;; Generated autoloads from modes/simula.el -;;;### (autoloads (tcl-help-on-word inferior-tcl tcl-mode) "tcl" "modes/tcl.el" (12639 8579)) +;;;### (autoloads (tcl-help-on-word inferior-tcl tcl-mode) "tcl" "modes/tcl.el" (12851 23429)) ;;; Generated autoloads from modes/tcl.el (autoload 'tcl-mode "tcl" "\ @@ -5704,8 +5978,10 @@ value of texinfo-mode-hook." t nil) ;;;*** - -;;;### (autoloads nil "text-mode" "modes/text-mode.el" (12546 50443)) + +;;;*** + +;;;### (autoloads nil "text-mode" "modes/text-mode.el" (12860 19337)) ;;; Generated autoloads from modes/text-mode.el ;;;### (autoloads (tc-recenter tc-scroll-down tc-scroll-up tc-scroll-line tc-associated-buffer tc-merge tc-dissociate tc-split tc-associate-buffer tc-two-columns) "two-column" "modes/two-column.el" (12648 18571)) @@ -5892,11 +6168,13 @@ This is meant to be added to `find-file-hooks'." nil nil) ;;;*** - -;;;### (autoloads nil "view" "modes/view.el" (12546 50445)) + +;;;*** + +;;;### (autoloads nil "view" "modes/view.el" (12860 19339)) ;;; Generated autoloads from modes/view.el -;;;### (autoloads (vrml-mode) "vrml-mode" "modes/vrml-mode.el" (12714 11717)) +;;;### (autoloads (vrml-mode) "vrml-mode" "modes/vrml-mode.el" (12851 23428)) ;;; Generated autoloads from modes/vrml-mode.el (autoload 'vrml-mode "vrml-mode" "\ @@ -5928,7 +6206,7 @@ ;;;*** -;;;### (autoloads (xpm-mode) "xpm-mode" "modes/xpm-mode.el" (12559 34912)) +;;;### (autoloads (xpm-mode) "xpm-mode" "modes/xpm-mode.el" (12860 19349)) ;;; Generated autoloads from modes/xpm-mode.el (autoload 'xpm-mode "xpm-mode" "\ @@ -6218,7 +6496,7 @@ ;;;*** -;;;### (autoloads (add-log-current-defun change-log-mode add-change-log-entry-other-window add-change-log-entry find-change-log prompt-for-change-log-name) "add-log" "packages/add-log.el" (12558 60906)) +;;;### (autoloads (add-log-current-defun change-log-mode add-change-log-entry-other-window add-change-log-entry find-change-log prompt-for-change-log-name) "add-log" "packages/add-log.el" (12860 19357)) ;;; Generated autoloads from packages/add-log.el (defvar change-log-default-name nil "\ @@ -6242,6 +6520,7 @@ (autoload 'find-change-log "add-log" "\ Find a change log file for \\[add-change-log-entry] and return the name. + Optional arg FILE-NAME specifies the file to use. If FILE-NAME is nil, use the value of `change-log-default-name'. If 'change-log-default-name' is nil, behave as though it were 'ChangeLog' @@ -6291,7 +6570,7 @@ ;;;*** -;;;### (autoloads (apropos-documentation apropos-value apropos apropos-command) "apropos" "packages/apropos.el" (12740 25203)) +;;;### (autoloads (apropos-documentation apropos-value apropos apropos-command) "apropos" "packages/apropos.el" (12860 19361)) ;;; Generated autoloads from packages/apropos.el (fset 'command-apropos 'apropos-command) @@ -6321,14 +6600,18 @@ Returns list of symbols and documentation found." t nil) ;;;*** - -;;;### (autoloads nil "array" "packages/array.el" (12547 2408)) + +;;;*** + +;;;*** + +;;;### (autoloads nil "array" "packages/array.el" (12860 19359)) ;;; Generated autoloads from packages/array.el -;;;### (autoloads nil "auto-save" "packages/auto-save.el" (12376 19476)) +;;;### (autoloads nil "auto-save" "packages/auto-save.el" (12178 28935)) ;;; Generated autoloads from packages/auto-save.el -;;;### (autoloads (define-auto-insert auto-insert) "autoinsert" "packages/autoinsert.el" (12546 50457)) +;;;### (autoloads (define-auto-insert auto-insert) "autoinsert" "packages/autoinsert.el" (12860 19362)) ;;; Generated autoloads from packages/autoinsert.el (autoload 'auto-insert "autoinsert" "\ @@ -6342,17 +6625,44 @@ ;;;*** -;;;### (autoloads nil "avoid" "packages/avoid.el" (12558 60916)) +;;;### (autoloads (mouse-avoidance-mode) "avoid" "packages/avoid.el" (12860 19406)) ;;; Generated autoloads from packages/avoid.el +(autoload 'mouse-avoidance-mode "avoid" "\ +Set cursor avoidance mode to MODE. +MODE should be one of the symbols `banish', `exile', `jump', `animate', +`cat-and-mouse', `proteus', or `none'. + +If MODE is nil, toggle mouse avoidance between `none` and `banish' +modes. Positive numbers and symbols other than the above are treated +as equivalent to `banish'; negative numbers and `-' are equivalent to `none'. + +Effects of the different modes: + * banish: Move the mouse to the upper-right corner on any keypress. + * exile: Move the mouse to the corner only if the cursor gets too close, + and allow it to return once the cursor is out of the way. + * jump: If the cursor gets too close to the mouse, displace the mouse + a random distance & direction. + * animate: As `jump', but shows steps along the way for illusion of motion. + * cat-and-mouse: Same as `animate'. + * proteus: As `animate', but changes the shape of the mouse pointer too. + +Whenever the mouse is moved, the frame is also raised. + +\(see `mouse-avoidance-threshold' for definition of \"too close\", +and `mouse-avoidance-nudge-dist' and `mouse-avoidance-nudge-var' for +definition of \"random distance\".)" t nil) + (add-minor-mode 'mouse-avoidance-mode " Avoid") ;;;*** ;;;### (autoloads nil "balloon-help" "packages/balloon-help.el" (12547 2421)) ;;; Generated autoloads from packages/balloon-help.el - -;;;### (autoloads nil "big-menubar" "packages/big-menubar.el" (12376 19509)) + +;;;*** + +;;;### (autoloads nil "big-menubar" "packages/big-menubar.el" (12851 23447)) ;;; Generated autoloads from packages/big-menubar.el ;;;### (autoloads (blink-cursor-mode) "blink-cursor" "packages/blink-cursor.el" (12639 8850)) @@ -6371,7 +6681,7 @@ ;;;### (autoloads nil "blink-paren" "packages/blink-paren.el" (12376 19480)) ;;; Generated autoloads from packages/blink-paren.el -;;;### (autoloads (bookmark-menu-delete bookmark-menu-rename bookmark-menu-locate bookmark-menu-jump bookmark-menu-insert bookmark-bmenu-list bookmark-load bookmark-save bookmark-write bookmark-delete bookmark-insert bookmark-rename bookmark-insert-location bookmark-relocate bookmark-jump bookmark-set) "bookmark" "packages/bookmark.el" (12675 57084)) +;;;### (autoloads (bookmark-menu-delete bookmark-menu-rename bookmark-menu-locate bookmark-menu-jump bookmark-menu-insert bookmark-bmenu-list bookmark-load bookmark-save bookmark-write bookmark-delete bookmark-insert bookmark-rename bookmark-insert-location bookmark-relocate bookmark-jump bookmark-set) "bookmark" "packages/bookmark.el" (12851 23442)) ;;; Generated autoloads from packages/bookmark.el (if (symbolp (key-binding "r")) nil (progn (define-key ctl-x-map "rb" 'bookmark-jump) (define-key ctl-x-map "rm" 'bookmark-set) (define-key ctl-x-map "rl" 'bookmark-bmenu-list))) @@ -6593,15 +6903,15 @@ ;;;### (autoloads nil "buff-menu" "packages/buff-menu.el" (12731 19066)) ;;; Generated autoloads from packages/buff-menu.el -;;;### (autoloads (command-history-mode list-command-history repeat-matching-complex-command) "chistory" "packages/chistory.el" (12546 50458)) +;;;### (autoloads (command-history-mode list-command-history repeat-matching-complex-command) "chistory" "packages/chistory.el" (12860 19367)) ;;; Generated autoloads from packages/chistory.el (autoload 'repeat-matching-complex-command "chistory" "\ Edit and re-evaluate complex command with name matching PATTERN. -Matching occurrences are displayed, most recent first, until you -select a form for evaluation. If PATTERN is empty (or nil), every form -in the command history is offered. The form is placed in the minibuffer -for editing and the result is evaluated." t nil) +Matching occurrences are displayed, most recent first, until you select +a form for evaluation. If PATTERN is empty (or nil), every form in the +command history is offered. The form is placed in the minibuffer for +editing and the result is evaluated." t nil) (autoload 'list-command-history "chistory" "\ List history of commands typed to minibuffer. @@ -6625,7 +6935,7 @@ ;;;*** -;;;### (autoloads nil "cmuscheme" "packages/cmuscheme.el" (12546 63751)) +;;;### (autoloads nil "cmuscheme" "packages/cmuscheme.el" (12861 45244)) ;;; Generated autoloads from packages/cmuscheme.el (add-hook 'same-window-buffer-names "*scheme*") @@ -6644,7 +6954,7 @@ ;;;*** -;;;### (autoloads (compare-windows) "compare-w" "packages/compare-w.el" (12547 2409)) +;;;### (autoloads (compare-windows) "compare-w" "packages/compare-w.el" (12860 19369)) ;;; Generated autoloads from packages/compare-w.el (autoload 'compare-windows "compare-w" "\ @@ -6664,7 +6974,7 @@ ;;;*** -;;;### (autoloads (first-error previous-error next-error compilation-minor-mode grep compile) "compile" "packages/compile.el" (12743 22077)) +;;;### (autoloads (first-error previous-error next-error compilation-minor-mode grep compile) "compile" "packages/compile.el" (12860 19372)) ;;; Generated autoloads from packages/compile.el (defvar compilation-mode-hook nil "\ @@ -6743,6 +7053,8 @@ See variables `compilation-parse-errors-function' and `compilation-error-regexp-alist' for customization ideas." t nil) +(define-key ctl-x-map "`" 'next-error) + (autoload 'previous-error "compile" "\ Visit previous compilation error message and corresponding source code. This operates on the output from the \\[compile] command." t nil) @@ -6752,19 +7064,17 @@ Visit corresponding source code. This operates on the output from the \\[compile] command." t nil) -(define-key ctl-x-map "`" 'next-error) - -;;;*** - -;;;### (autoloads nil "completion" "packages/completion.el" (12547 2470)) +;;;*** + +;;;*** + +;;;### (autoloads nil "completion" "packages/completion.el" (12860 19412)) ;;; Generated autoloads from packages/completion.el - -;;;*** ;;;### (autoloads nil "crypt" "packages/crypt.el" (12743 22078)) ;;; Generated autoloads from packages/crypt.el -;;;### (autoloads (dabbrev-expand dabbrev-completion) "dabbrev" "packages/dabbrev.el" (12547 2413)) +;;;### (autoloads (dabbrev-expand dabbrev-completion) "dabbrev" "packages/dabbrev.el" (12860 19377)) ;;; Generated autoloads from packages/dabbrev.el (define-key global-map [(meta /)] 'dabbrev-expand) @@ -6808,18 +7118,24 @@ See also `dabbrev-abbrev-char-regexp' and \\[dabbrev-completion]." t nil) ;;;*** - -;;;### (autoloads nil "desktop" "packages/desktop.el" (12547 2459)) + +;;;*** + +;;;*** + +;;;### (autoloads nil "desktop" "packages/desktop.el" (12860 19404)) ;;; Generated autoloads from packages/desktop.el - -;;;### (autoloads nil "detexinfo" "packages/detexinfo.el" (12376 19504)) + +;;;*** + +;;;### (autoloads nil "detexinfo" "packages/detexinfo.el" (12285 55375)) ;;; Generated autoloads from packages/detexinfo.el -;;;### (autoloads (diff-backup diff) "diff" "packages/diff.el" (12547 2411)) +;;;### (autoloads (diff-backup diff) "diff" "packages/diff.el" (12860 19374)) ;;; Generated autoloads from packages/diff.el (defvar diff-switches (purecopy "-c") "\ -*A string or list of strings specifying switches to be be passed to diff.") +*A string or list of strings specifying switches to be passed to diff.") (autoload 'diff "diff" "\ Find and display the differences between OLD and NEW files. @@ -6835,166 +7151,10 @@ ;;;*** -;;;### (autoloads (ediff-documentation ediff-version ediff-revision ediff-patch-buffer ediff-patch-file run-ediff-from-cvs-buffer ediff-merge-revisions-with-ancestor ediff-merge-revisions ediff-merge-buffers-with-ancestor ediff-merge-buffers ediff-merge-files-with-ancestor ediff-merge-files ediff-regions-linewise ediff-regions-wordwise ediff-windows-linewise ediff-windows-wordwise ediff-merge-directory-revisions-with-ancestor ediff-merge-directory-revisions ediff-merge-directories-with-ancestor ediff-merge-directories ediff-directories3 ediff-directory-revisions ediff-directories ediff-buffers3 ediff-buffers ediff-files3 ediff-files) "ediff" "ediff/ediff.el" (12740 25250)) -;;; Generated autoloads from ediff/ediff.el - -(autoload 'ediff-files "ediff" "\ -Run Ediff on a pair of files, FILE-A and FILE-B." t nil) - -(autoload 'ediff-files3 "ediff" "\ -Run Ediff on three files, FILE-A, FILE-B, and FILE-C." t nil) - -(defalias 'ediff3 'ediff-files3) - -(defalias 'ediff 'ediff-files) - -(autoload 'ediff-buffers "ediff" "\ -Run Ediff on a pair of buffers, BUFFER-A and BUFFER-B." t nil) - -(defalias 'ebuffers 'ediff-buffers) - -(autoload 'ediff-buffers3 "ediff" "\ -Run Ediff on three buffers, BUFFER-A, BUFFER-B, and BUFFER-C." t nil) - -(defalias 'ebuffers3 'ediff-buffers3) - -(autoload 'ediff-directories "ediff" "\ -Run Ediff on a pair of directories, DIR1 and DIR2, comparing files that have -the same name in both. The third argument, REGEXP, is a regular expression that -can be used to filter out certain file names." t nil) - -(defalias 'edirs 'ediff-directories) - -(autoload 'ediff-directory-revisions "ediff" "\ -Run Ediff on a directory, DIR1, comparing its files with their revisions. -The second argument, REGEXP, is a regular expression that filters the file -names. Only the files that are under revision control are taken into account." t nil) - -(defalias 'edir-revisions 'ediff-directory-revisions) - -(autoload 'ediff-directories3 "ediff" "\ -Run Ediff on three directories, DIR1, DIR2, and DIR3, comparing files that -have the same name in all three. The last argument, REGEXP, is a regular -expression that can be used to filter out certain file names." t nil) - -(defalias 'edirs3 'ediff-directories3) - -(autoload 'ediff-merge-directories "ediff" "\ -Run Ediff on a pair of directories, DIR1 and DIR2, merging files that have -the same name in both. The third argument, REGEXP, is a regular expression that -can be used to filter out certain file names." t nil) - -(defalias 'edirs-merge 'ediff-merge-directories) - -(autoload 'ediff-merge-directories-with-ancestor "ediff" "\ -Merge files in directories DIR1 and DIR2 using files in ANCESTOR-DIR as ancestors. -Ediff merges files that have identical names in DIR1, DIR2. If a pair of files -in DIR1 and DIR2 doesn't have an ancestor in ANCESTOR-DIR, Ediff will merge -without ancestor. The fourth argument, REGEXP, is a regular expression that -can be used to filter out certain file names." t nil) - -(autoload 'ediff-merge-directory-revisions "ediff" "\ -Run Ediff on a directory, DIR1, merging its files with their revisions. -The second argument, REGEXP, is a regular expression that filters the file -names. Only the files that are under revision control are taken into account." t nil) - -(defalias 'edir-merge-revisions 'ediff-merge-directory-revisions) - -(autoload 'ediff-merge-directory-revisions-with-ancestor "ediff" "\ -Run Ediff on a directory, DIR1, merging its files with their revisions and ancestors. -The second argument, REGEXP, is a regular expression that filters the file -names. Only the files that are under revision control are taken into account." t nil) - -(defalias 'edir-merge-revisions-with-ancestor 'ediff-merge-directory-revisions-with-ancestor) - -(defalias 'edirs-merge-with-ancestor 'ediff-merge-directories-with-ancestor) - -(autoload 'ediff-windows-wordwise "ediff" "\ -Compare WIND-A and WIND-B, which are selected by clicking, wordwise. -With prefix argument, DUMB-MODE, or on a non-windowing display, works as -follows: -If WIND-A is nil, use selected window. -If WIND-B is nil, use window next to WIND-A." t nil) - -(autoload 'ediff-windows-linewise "ediff" "\ -Compare WIND-A and WIND-B, which are selected by clicking, linewise. -With prefix argument, DUMB-MODE, or on a non-windowing display, works as -follows: -If WIND-A is nil, use selected window. -If WIND-B is nil, use window next to WIND-A." t nil) - -(autoload 'ediff-regions-wordwise "ediff" "\ -Run Ediff on a pair of regions in two different buffers. -Regions (i.e., point and mark) are assumed to be set in advance. -This function is effective only for relatively small regions, up to 200 -lines. For large regions, use `ediff-regions-linewise'." t nil) - -(autoload 'ediff-regions-linewise "ediff" "\ -Run Ediff on a pair of regions in two different buffers. -Regions (i.e., point and mark) are assumed to be set in advance. -Each region is enlarged to contain full lines. -This function is effective for large regions, over 100-200 -lines. For small regions, use `ediff-regions-wordwise'." t nil) - -(defalias 'ediff-merge 'ediff-merge-files) - -(autoload 'ediff-merge-files "ediff" "\ -Merge two files without ancestor." t nil) - -(autoload 'ediff-merge-files-with-ancestor "ediff" "\ -Merge two files with ancestor." t nil) - -(defalias 'ediff-merge-with-ancestor 'ediff-merge-files-with-ancestor) - -(autoload 'ediff-merge-buffers "ediff" "\ -Merge buffers without ancestor." t nil) - -(autoload 'ediff-merge-buffers-with-ancestor "ediff" "\ -Merge buffers with ancestor." t nil) - -(autoload 'ediff-merge-revisions "ediff" "\ -Run Ediff by merging two revisions of a file. -The file is the optional FILE argument or the file visited by the current -buffer." t nil) - -(autoload 'ediff-merge-revisions-with-ancestor "ediff" "\ -Run Ediff by merging two revisions of a file with a common ancestor. -The file is the the optional FILE argument or the file visited by the current -buffer." t nil) - -(autoload 'run-ediff-from-cvs-buffer "ediff" "\ -Run Ediff-merge on appropriate revisions of the selected file. -First run after `M-x cvs-update'. Then place the cursor on a lide describing a -file and then run `run-ediff-from-cvs-buffer'." t nil) - -(autoload 'ediff-patch-file "ediff" "\ -Run Ediff by patching SOURCE-FILENAME." t nil) - -(autoload 'ediff-patch-buffer "ediff" "\ -Run Ediff by patching BUFFER-NAME." t nil) - -(defalias 'epatch 'ediff-patch-file) - -(defalias 'epatch-buffer 'ediff-patch-buffer) - -(autoload 'ediff-revision "ediff" "\ -Run Ediff by comparing versions of a file. -The file is an optional FILE argument or the file visited by the current -buffer. Use `vc.el' or `rcs.el' depending on `ediff-version-control-package'." t nil) - -(autoload 'ediff-version "ediff" "\ -Return string describing the version of Ediff. -When called interactively, displays the version." t nil) - -(autoload 'ediff-documentation "ediff" "\ -Display Ediff's manual." t nil) - -;;;*** - ;;;### (autoloads nil "doctex" "packages/doctex.el" (12376 19483)) ;;; Generated autoloads from packages/doctex.el -;;;### (autoloads (edit-faces) "edit-faces" "packages/edit-faces.el" (12743 11607)) +;;;### (autoloads (edit-faces) "edit-faces" "packages/edit-faces.el" (12860 19407)) ;;; Generated autoloads from packages/edit-faces.el (autoload 'edit-faces "edit-faces" "\ @@ -7007,11 +7167,11 @@ ;;;*** -;;;### (autoloads (report-emacs-bug) "emacsbug" "packages/emacsbug.el" (12547 2416)) +;;;### (autoloads (report-xemacs-bug) "emacsbug" "packages/emacsbug.el" (12860 19379)) ;;; Generated autoloads from packages/emacsbug.el -(autoload 'report-emacs-bug "emacsbug" "\ -Report a bug in GNU Emacs. +(autoload 'report-xemacs-bug "emacsbug" "\ +Report a bug in XEmacs. Prompts for bug subject. Leaves you in a mail buffer." t nil) ;;;*** @@ -7051,7 +7211,7 @@ ;;;*** -;;;### (autoloads (tags-apropos list-tags tags-query-replace tags-search tags-loop-continue next-file find-tag-other-window find-tag visit-tags-table) "etags" "packages/etags.el" (12743 22077)) +;;;### (autoloads (tags-apropos list-tags tags-query-replace tags-search tags-loop-continue next-file find-tag-other-window find-tag visit-tags-table) "etags" "packages/etags.el" (12860 19381)) ;;; Generated autoloads from packages/etags.el (defvar tags-build-completion-table 'ask "\ @@ -7216,7 +7376,7 @@ ;;;### (autoloads nil "fa-extras" "packages/fa-extras.el" (12547 2465)) ;;; Generated autoloads from packages/fa-extras.el -;;;### (autoloads (turn-on-fast-lock fast-lock-mode) "fast-lock" "packages/fast-lock.el" (12558 60915)) +;;;### (autoloads (turn-on-fast-lock fast-lock-mode) "fast-lock" "packages/fast-lock.el" (12860 19403)) ;;; Generated autoloads from packages/fast-lock.el (defvar fast-lock-mode nil) @@ -7226,7 +7386,7 @@ With arg, turn Fast Lock mode on if and only if arg is positive and the buffer is associated with a file. Enable it automatically in your `~/.emacs' by: - (add-hook 'font-lock-mode-hook 'turn-on-fast-lock) + (setq font-lock-support-mode 'fast-lock-mode) If Fast Lock mode is enabled, and the current buffer does not contain any text properties, any associated Font Lock cache is used if its timestamp matches the @@ -7251,7 +7411,7 @@ (autoload 'turn-on-fast-lock "fast-lock" "\ Unconditionally turn on Fast Lock mode." nil nil) -(add-minor-mode 'fast-lock-mode " Fast") +(if (fboundp 'add-minor-mode) (add-minor-mode 'fast-lock-mode nil)) ;;;*** @@ -7283,7 +7443,7 @@ ;;;### (autoloads nil "filladapt" "packages/filladapt.el" (12731 4993)) ;;; Generated autoloads from packages/filladapt.el -;;;### (autoloads (font-lock-fontify-buffer turn-off-font-lock turn-on-font-lock font-lock-mode) "font-lock" "packages/font-lock.el" (12730 62099)) +;;;### (autoloads (font-lock-fontify-buffer turn-off-font-lock turn-on-font-lock font-lock-mode) "font-lock" "packages/font-lock.el" (12851 23456)) ;;; Generated autoloads from packages/font-lock.el (defvar font-lock-auto-fontify t "\ @@ -7512,7 +7672,7 @@ ;;;### (autoloads nil "func-menu" "packages/func-menu.el" (12721 2479)) ;;; Generated autoloads from packages/func-menu.el -;;;### (autoloads (sc-mode) "generic-sc" "packages/generic-sc.el" (12147 25472)) +;;;### (autoloads (sc-mode) "generic-sc" "packages/generic-sc.el" (12860 19356)) ;;; Generated autoloads from packages/generic-sc.el (autoload 'sc-mode "generic-sc" "\ @@ -7569,7 +7729,7 @@ ;;;*** -;;;### (autoloads (gnuserv-start) "gnuserv" "packages/gnuserv.el" (12740 25205)) +;;;### (autoloads (gnuserv-start) "gnuserv" "packages/gnuserv.el" (12860 19405)) ;;; Generated autoloads from packages/gnuserv.el (autoload 'gnuserv-start "gnuserv" "\ @@ -7594,7 +7754,7 @@ ;;;*** -;;;### (autoloads (hexl-find-file hexl-mode) "hexl" "packages/hexl.el" (12675 57080)) +;;;### (autoloads (hexlify-buffer hexl-find-file hexl-mode) "hexl" "packages/hexl.el" (12860 19384)) ;;; Generated autoloads from packages/hexl.el (autoload 'hexl-mode "hexl" "\ @@ -7673,6 +7833,10 @@ Edit file FILENAME in hexl-mode. Switch to a buffer visiting file FILENAME, creating one in none exists." t nil) +(autoload 'hexlify-buffer "hexl" "\ +Convert a binary buffer to hexl format. +This discards the buffer's undo information." t nil) + ;;;*** ;;;### (autoloads (hypropos-popup-menu hypropos-set-variable hyper-describe-function hyper-describe-variable hyper-apropos) "hyper-apropos" "packages/hyper-apropos.el" (12607 29142)) @@ -7704,7 +7868,7 @@ ;;;*** -;;;### (autoloads (icomplete-minibuffer-setup icomplete-mode) "icomplete" "packages/icomplete.el" (12547 2477)) +;;;### (autoloads (icomplete-minibuffer-setup icomplete-mode) "icomplete" "packages/icomplete.el" (12860 19419)) ;;; Generated autoloads from packages/icomplete.el (autoload 'icomplete-mode "icomplete" "\ @@ -7713,12 +7877,11 @@ (autoload 'icomplete-minibuffer-setup "icomplete" "\ Run in minibuffer on activation to establish incremental completion. - -Usually run by inclusion in minibuffer-setup-hook." nil nil) - -;;;*** - -;;;### (autoloads (Info-elisp-ref Info-emacs-key Info-goto-emacs-key-command-node Info-goto-emacs-command-node Info-emacs-command Info-search Info-visit-file Info-goto-node Info-query info) "info" "packages/info.el" (12740 25202)) +Usually run by inclusion in `minibuffer-setup-hook'." nil nil) + +;;;*** + +;;;### (autoloads (Info-elisp-ref Info-emacs-key Info-goto-emacs-key-command-node Info-goto-emacs-command-node Info-emacs-command Info-search Info-visit-file Info-goto-node Info-query info) "info" "packages/info.el" (12860 19356)) ;;; Generated autoloads from packages/info.el (autoload 'info "info" "\ @@ -7771,7 +7934,7 @@ ;;;*** -;;;### (autoloads (batch-info-validate Info-validate Info-split Info-tagify) "informat" "packages/informat.el" (12547 2425)) +;;;### (autoloads (batch-info-validate Info-validate Info-split Info-tagify) "informat" "packages/informat.el" (12860 19385)) ;;; Generated autoloads from packages/informat.el (autoload 'Info-tagify "informat" "\ @@ -7802,7 +7965,7 @@ ;;;*** -;;;### (autoloads (ispell-message ispell-minor-mode ispell-complete-word-interior-frag ispell-complete-word ispell-continue ispell-buffer ispell-region ispell-change-dictionary ispell-kill-ispell ispell-help ispell-word) "ispell" "packages/ispell.el" (12727 30153)) +;;;### (autoloads (ispell-message ispell-minor-mode ispell-complete-word-interior-frag ispell-complete-word ispell-continue ispell-buffer ispell-region ispell-change-dictionary ispell-kill-ispell ispell-help ispell-word) "ispell" "packages/ispell.el" (12860 19389)) ;;; Generated autoloads from packages/ispell.el (defvar ispell-personal-dictionary nil "\ @@ -7859,8 +8022,8 @@ (defvar ispell-menu-map nil "\ Key map for ispell menu") -(defvar ispell-menu-lucid nil "\ -Spelling menu for Lucid Emacs.") +(defvar ispell-menu-xemacs nil "\ +Spelling menu for XEmacs.") (defconst ispell-menu-map-needed (and (not ispell-menu-map) (string-lessp "19" emacs-version) (not (string-match "XEmacs" emacs-version)))) @@ -7969,13 +8132,13 @@ Don't check spelling of message headers except the Subject field. Don't check included messages. -To abort spell checking of a message REGION and send the message anyway, +To abort spell checking of a message region and send the message anyway, use the `x' or `q' command. (Any subsequent regions will be checked.) The `X' command aborts the message send so that you can edit the buffer. To spell-check whenever a message is sent, include the appropriate lines in your .emacs file: - (add-hook 'news-inews-hook 'ispell-message) + (add-hook 'message-send-hook 'ispell-message) (add-hook 'mail-send-hook 'ispell-message) (add-hook 'mh-before-send-letter-hook 'ispell-message) @@ -7985,16 +8148,18 @@ ;;;*** -;;;### (autoloads (jka-compr-install toggle-auto-compression jka-compr-load) "jka-compr" "packages/jka-compr.el" (12639 8598)) +;;;### (autoloads (jka-compr-install toggle-auto-compression jka-compr-load) "jka-compr" "packages/jka-compr.el" (12860 19409)) ;;; Generated autoloads from packages/jka-compr.el (autoload 'jka-compr-load "jka-compr" "\ Documented as original." nil nil) (autoload 'toggle-auto-compression "jka-compr" "\ -Toggle automatic file compression and decompression. +Toggle automatic file compression and uncompression. With prefix argument ARG, turn auto compression on if positive, else off. -Returns the new status of auto compression (non-nil means on)." t nil) +Returns the new status of auto compression (non-nil means on). +If the argument MESSAGE is non-nil, it means to print a message +saying whether the mode is now on or off." t nil) (autoload 'jka-compr-install "jka-compr" "\ Install jka-compr. @@ -8003,7 +8168,7 @@ ;;;*** -;;;### (autoloads (turn-on-lazy-lock lazy-lock-mode) "lazy-lock" "packages/lazy-lock.el" (12743 11606)) +;;;### (autoloads (turn-on-lazy-lock lazy-lock-mode) "lazy-lock" "packages/lazy-lock.el" (12851 23453)) ;;; Generated autoloads from packages/lazy-lock.el (defvar lazy-lock-mode nil) @@ -8038,7 +8203,7 @@ ;;;*** -;;;### (autoloads (ledit-from-lisp-mode ledit-mode) "ledit" "packages/ledit.el" (12547 2428)) +;;;### (autoloads (ledit-from-lisp-mode ledit-mode) "ledit" "packages/ledit.el" (12860 19391)) ;;; Generated autoloads from packages/ledit.el (defconst ledit-save-files t "\ @@ -8070,11 +8235,12 @@ ;;;### (autoloads nil "lispm-fonts" "packages/lispm-fonts.el" (12376 19482)) ;;; Generated autoloads from packages/lispm-fonts.el -;;;### (autoloads (print-region lpr-region print-buffer lpr-buffer) "lpr" "packages/lpr.el" (12546 50464)) +;;;### (autoloads (print-region lpr-region print-buffer lpr-buffer) "lpr" "packages/lpr.el" (12860 19392)) ;;; Generated autoloads from packages/lpr.el (defvar lpr-switches nil "\ -*List of strings to pass as extra switch args to `lpr' when it is invoked.") +*List of strings to pass as extra options for the printer program. +See `lpr-command'.") (defvar lpr-command (if (memq system-type '(usg-unix-v dgux hpux irix)) "lp" "lpr") "\ *Name of program for printing a file.") @@ -8096,11 +8262,13 @@ `lpr-switches' is a list of extra switches (strings) to pass to lpr." t nil) ;;;*** - -;;;### (autoloads nil "makeinfo" "packages/makeinfo.el" (12547 2422)) + +;;;*** + +;;;### (autoloads nil "makeinfo" "packages/makeinfo.el" (12860 19382)) ;;; Generated autoloads from packages/makeinfo.el -;;;### (autoloads (make-command-summary) "makesum" "packages/makesum.el" (12547 2408)) +;;;### (autoloads (make-command-summary) "makesum" "packages/makesum.el" (12860 19364)) ;;; Generated autoloads from packages/makesum.el (autoload 'make-command-summary "makesum" "\ @@ -8109,7 +8277,7 @@ ;;;*** -;;;### (autoloads (manual-entry) "man" "packages/man.el" (12727 30154)) +;;;### (autoloads (manual-entry) "man" "packages/man.el" (12860 19390)) ;;; Generated autoloads from packages/man.el (autoload 'manual-entry "man" "\ @@ -8129,25 +8297,59 @@ ;;;*** -;;;### (autoloads nil "metamail" "packages/metamail.el" (12547 2454)) +;;;### (autoloads (metamail-region metamail-buffer metamail-interpret-body metamail-interpret-header) "metamail" "packages/metamail.el" (12860 19404)) ;;; Generated autoloads from packages/metamail.el +(autoload 'metamail-interpret-header "metamail" "\ +Interpret a header part of a MIME message in current buffer. +Its body part is not interpreted at all." t nil) + +(autoload 'metamail-interpret-body "metamail" "\ +Interpret a body part of a MIME message in current buffer. +Optional argument VIEWMODE specifies the value of the +EMACS_VIEW_MODE environment variable (defaulted to 1). +Optional argument NODISPLAY non-nil means buffer is not +redisplayed as output is inserted. +Its header part is not interpreted at all." t nil) + +(autoload 'metamail-buffer "metamail" "\ +Process current buffer through `metamail'. +Optional argument VIEWMODE specifies the value of the +EMACS_VIEW_MODE environment variable (defaulted to 1). +Optional argument BUFFER specifies a buffer to be filled (nil +means current). +Optional argument NODISPLAY non-nil means buffer is not +redisplayed as output is inserted." t nil) + +(autoload 'metamail-region "metamail" "\ +Process current region through 'metamail'. +Optional argument VIEWMODE specifies the value of the +EMACS_VIEW_MODE environment variable (defaulted to 1). +Optional argument BUFFER specifies a buffer to be filled (nil +means current). +Optional argument NODISPLAY non-nil means buffer is not +redisplayed as output is inserted." t nil) + ;;;*** ;;;### (autoloads nil "mime-compose" "packages/mime-compose.el" (12727 30155)) ;;; Generated autoloads from packages/mime-compose.el - -;;;### (autoloads nil "mode-motion+" "packages/mode-motion+.el" (12583 60690)) + +;;;*** + +;;;### (autoloads nil "mode-motion+" "packages/mode-motion+.el" (12860 19415)) ;;; Generated autoloads from packages/mode-motion+.el - -;;;*** ;;;### (autoloads nil "netunam" "packages/netunam.el" (12547 2429)) ;;; Generated autoloads from packages/netunam.el ;;;*** - -;;;### (autoloads nil "page-ext" "packages/page-ext.el" (12547 2433)) + +;;;*** + +;;;*** + +;;;### (autoloads nil "page-ext" "packages/page-ext.el" (12860 19393)) ;;; Generated autoloads from packages/page-ext.el ;;;### (autoloads (blink-paren paren-set-mode) "paren" "packages/paren.el" (12648 18575)) @@ -8200,7 +8402,7 @@ ;;;*** -;;;### (autoloads (ps-despool ps-spool-region-with-faces ps-spool-region ps-spool-buffer-with-faces ps-spool-buffer ps-print-region-with-faces ps-print-region ps-print-buffer-with-faces ps-print-buffer) "ps-print" "packages/ps-print.el" (12743 11610)) +;;;### (autoloads (ps-despool ps-spool-region-with-faces ps-spool-region ps-spool-buffer-with-faces ps-spool-buffer ps-print-region-with-faces ps-print-region ps-print-buffer-with-faces ps-print-buffer) "ps-print" "packages/ps-print.el" (12860 19418)) ;;; Generated autoloads from packages/ps-print.el (defvar ps-paper-type 'ps-letter "\ @@ -8224,24 +8426,22 @@ (autoload 'ps-print-buffer-with-faces "ps-print" "\ Generate and print a PostScript image of the buffer. - Like `ps-print-buffer', but includes font, color, and underline -information in the generated image." t nil) +information in the generated image. This command works only if you +are using a window system, so it has a way to determine color values." t nil) (autoload 'ps-print-region "ps-print" "\ Generate and print a PostScript image of the region. - Like `ps-print-buffer', but prints just the current region." t nil) (autoload 'ps-print-region-with-faces "ps-print" "\ Generate and print a PostScript image of the region. - Like `ps-print-region', but includes font, color, and underline -information in the generated image." t nil) +information in the generated image. This command works only if you +are using a window system, so it has a way to determine color values." t nil) (autoload 'ps-spool-buffer "ps-print" "\ Generate and spool a PostScript image of the buffer. - Like `ps-print-buffer' except that the PostScript image is saved in a local buffer to be sent to the printer later. @@ -8249,24 +8449,23 @@ (autoload 'ps-spool-buffer-with-faces "ps-print" "\ Generate and spool a PostScript image of the buffer. - Like `ps-spool-buffer', but includes font, color, and underline -information in the generated image. +information in the generated image. This command works only if you +are using a window system, so it has a way to determine color values. Use the command `ps-despool' to send the spooled images to the printer." t nil) (autoload 'ps-spool-region "ps-print" "\ Generate a PostScript image of the region and spool locally. - Like `ps-spool-buffer', but spools just the current region. Use the command `ps-despool' to send the spooled images to the printer." t nil) (autoload 'ps-spool-region-with-faces "ps-print" "\ Generate a PostScript image of the region and spool locally. - Like `ps-spool-region', but includes font, color, and underline -information in the generated image. +information in the generated image. This command works only if you +are using a window system, so it has a way to determine color values. Use the command `ps-despool' to send the spooled images to the printer." t nil) @@ -8284,11 +8483,11 @@ ;;;*** -;;;### (autoloads (remote-compile) "rcompile" "packages/rcompile.el" (12720 56487)) +;;;### (autoloads (remote-compile) "rcompile" "packages/rcompile.el" (12860 19401)) ;;; Generated autoloads from packages/rcompile.el (autoload 'remote-compile "rcompile" "\ -Compile the the current buffer's directory on HOST. Log in as USER. +Compile the current buffer's directory on HOST. Log in as USER. See \\[compile]." t nil) ;;;*** @@ -8297,11 +8496,11 @@ ;;; Generated autoloads from packages/recent-files.el ;;;*** - -;;;### (autoloads nil "refbib" "packages/refbib.el" (12547 2434)) + +;;;*** + +;;;### (autoloads nil "refbib" "packages/refbib.el" (12860 19394)) ;;; Generated autoloads from packages/refbib.el - -;;;*** ;;;### (autoloads nil "remote" "packages/remote.el" (12547 2435)) ;;; Generated autoloads from packages/remote.el @@ -8310,14 +8509,14 @@ ;;;### (autoloads nil "reportmail" "packages/reportmail.el" (12743 22077)) ;;; Generated autoloads from packages/reportmail.el - -;;;### (autoloads nil "resume" "packages/resume.el" (12547 2437)) + +;;;*** + +;;;### (autoloads (resume-suspend-hook) "resume" "packages/resume.el" (12860 19395)) ;;; Generated autoloads from packages/resume.el -;;;*** - -;;;### (autoloads nil "rnews" "packages/rnews.el" (12547 2438)) -;;; Generated autoloads from packages/rnews.el +(autoload 'resume-suspend-hook "resume" "\ +Clear out the file used for transmitting args when Emacs resumes." nil nil) ;;;*** @@ -8325,16 +8524,16 @@ ;;; Generated autoloads from packages/rnewspost.el ;;;*** - -;;;### (autoloads nil "saveconf" "packages/saveconf.el" (12547 2439)) + +;;;*** + +;;;### (autoloads nil "saveconf" "packages/saveconf.el" (12860 19396)) ;;; Generated autoloads from packages/saveconf.el ;;;*** -;;;### (autoloads nil "saveplace" "packages/saveplace.el" (12547 2414)) +;;;### (autoloads nil "saveplace" "packages/saveplace.el" (12860 19378)) ;;; Generated autoloads from packages/saveplace.el - -;;;*** ;;;### (autoloads nil "sccs" "packages/sccs.el" (12547 2430)) ;;; Generated autoloads from packages/sccs.el @@ -8346,7 +8545,7 @@ ;;;*** -;;;### (autoloads nil "server" "packages/server.el" (12547 2441)) +;;;### (autoloads nil "server" "packages/server.el" (12860 19397)) ;;; Generated autoloads from packages/server.el (make-obsolete 'server-start 'gnuserv-start) @@ -8369,9 +8568,32 @@ ;;;*** -;;;### (autoloads nil "spell" "packages/spell.el" (12547 2436)) +;;;### (autoloads (spell-string spell-region spell-word spell-buffer) "spell" "packages/spell.el" (12860 19394)) ;;; Generated autoloads from packages/spell.el +(put 'spell-filter 'risky-local-variable t) + +(autoload 'spell-buffer "spell" "\ +Check spelling of every word in the buffer. +For each incorrect word, you are asked for the correct spelling +and then put into a query-replace to fix some or all occurrences. +If you do not want to change a word, just give the same word +as its \"correct\" spelling; then the query replace is skipped." t nil) + +(autoload 'spell-word "spell" "\ +Check spelling of word at or before point. +If it is not correct, ask user for the correct spelling +and `query-replace' the entire buffer to substitute it." t nil) + +(autoload 'spell-region "spell" "\ +Like `spell-buffer' but applies only to region. +Used in a program, applies from START to END. +DESCRIPTION is an optional string naming the unit being checked: +for example, \"word\"." t nil) + +(autoload 'spell-string "spell" "\ +Check spelling of string supplied as argument." t nil) + ;;;*** ;;;### (autoloads nil "supercite" "packages/supercite.el" (12547 2458)) @@ -8439,7 +8661,7 @@ ;;;*** -;;;### (autoloads (batch-texinfo-format texinfo-format-region texinfo-format-buffer) "texinfmt" "packages/texinfmt.el" (12547 2445)) +;;;### (autoloads (batch-texinfo-format texinfo-format-region texinfo-format-buffer) "texinfmt" "packages/texinfmt.el" (12860 19400)) ;;; Generated autoloads from packages/texinfmt.el (autoload 'texinfo-format-buffer "texinfmt" "\ @@ -8469,7 +8691,7 @@ ;;;### (autoloads nil "texnfo-tex" "packages/texnfo-tex.el" (12657 40704)) ;;; Generated autoloads from packages/texnfo-tex.el -;;;### (autoloads (texinfo-sequential-node-update texinfo-every-node-update texinfo-update-node) "texnfo-upd" "packages/texnfo-upd.el" (12547 2451)) +;;;### (autoloads (texinfo-sequential-node-update texinfo-every-node-update texinfo-update-node) "texnfo-upd" "packages/texnfo-upd.el" (12860 19402)) ;;; Generated autoloads from packages/texnfo-upd.el (autoload 'texinfo-update-node "texnfo-upd" "\ @@ -8529,7 +8751,7 @@ ;;;*** -;;;### (autoloads (display-time) "time" "packages/time.el" (12546 50463)) +;;;### (autoloads (display-time) "time" "packages/time.el" (12860 19391)) ;;; Generated autoloads from packages/time.el (defvar display-time-day-and-date nil "\ @@ -8545,11 +8767,13 @@ echo area instead of in the mode-line." t nil) ;;;*** - -;;;### (autoloads nil "uncompress" "packages/uncompress.el" (12547 2442)) + +;;;*** + +;;;### (autoloads nil "uncompress" "packages/uncompress.el" (12860 19397)) ;;; Generated autoloads from packages/uncompress.el -;;;### (autoloads (ununderline-and-unoverstrike-region overstrike-region unoverstrike-region ununderline-region underline-region) "underline" "packages/underline.el" (12546 50465)) +;;;### (autoloads (ununderline-and-unoverstrike-region overstrike-region unoverstrike-region ununderline-region underline-region) "underline" "packages/underline.el" (12860 19398)) ;;; Generated autoloads from packages/underline.el (autoload 'underline-region "underline" "\ @@ -8618,7 +8842,7 @@ ;;;*** -;;;### (autoloads (vc-update-change-log vc-rename-file vc-cancel-version vc-revert-buffer vc-print-log vc-retrieve-snapshot vc-create-snapshot vc-directory vc-insert-headers vc-version-other-window vc-version-diff vc-diff vc-register vc-next-action vc-file-status) "vc" "packages/vc.el" (12675 57076)) +;;;### (autoloads (vc-update-change-log vc-rename-file vc-cancel-version vc-revert-buffer vc-print-log vc-retrieve-snapshot vc-create-snapshot vc-directory vc-insert-headers vc-version-other-window vc-version-diff vc-diff vc-register vc-next-action vc-file-status) "vc" "packages/vc.el" (12851 23437)) ;;; Generated autoloads from packages/vc.el (defvar vc-checkin-hook nil "\ @@ -8770,7 +8994,7 @@ ;;;*** -;;;### (autoloads (run-scheme) "xscheme" "packages/xscheme.el" (12547 2448)) +;;;### (autoloads (run-scheme) "xscheme" "packages/xscheme.el" (12851 23446)) ;;; Generated autoloads from packages/xscheme.el (defvar scheme-program-name "scheme" "\ @@ -8793,11 +9017,11 @@ ;;; Generated autoloads from pcl-cvs/compile-all.el ;;;*** - -;;;### (autoloads nil "cookie" "pcl-cvs/cookie.el" (12675 57120)) + +;;;*** + +;;;### (autoloads nil "cookie" "pcl-cvs/cookie.el" (12851 23481)) ;;; Generated autoloads from pcl-cvs/cookie.el - -;;;*** ;;;### (autoloads nil "dll-debug" "pcl-cvs/dll-debug.el" (12675 57121)) ;;; Generated autoloads from pcl-cvs/dll-debug.el @@ -8853,14 +9077,14 @@ ;;;*** -;;;### (autoloads (about-xemacs) "about" "prim/about.el" (12748 7624)) +;;;### (autoloads (about-xemacs) "about" "prim/about.el" (12851 23470)) ;;; Generated autoloads from prim/about.el (autoload 'about-xemacs "about" nil t nil) ;;;*** -;;;### (autoloads (all-hail-emacs all-hail-xemacs praise-be-unto-emacs praise-be-unto-xemacs) "advocacy" "prim/advocacy.el" (12740 25220)) +;;;### (autoloads (all-hail-emacs all-hail-xemacs praise-be-unto-emacs praise-be-unto-xemacs) "advocacy" "prim/advocacy.el" (12860 19434)) ;;; Generated autoloads from prim/advocacy.el (defvar xemacs-praise-sound-file "sounds/im_so_happy.au" "\ @@ -8892,18 +9116,18 @@ ;;;*** -;;;### (autoloads (describe-buffer-case-table) "case-table" "prim/case-table.el" (12648 18583)) +;;;### (autoloads (describe-buffer-case-table) "case-table" "prim/case-table.el" (12851 23462)) ;;; Generated autoloads from prim/case-table.el (autoload 'describe-buffer-case-table "case-table" "\ Describe the case table of the current buffer." t nil) ;;;*** - -;;;### (autoloads nil "cmdloop" "prim/cmdloop.el" (12648 18587)) + +;;;*** + +;;;### (autoloads nil "cmdloop" "prim/cmdloop.el" (12851 23468)) ;;; Generated autoloads from prim/cmdloop.el - -;;;*** ;;;### (autoloads nil "cmdloop1" "prim/cmdloop1.el" (12546 50501)) ;;; Generated autoloads from prim/cmdloop1.el @@ -8950,7 +9174,7 @@ ;;;### (autoloads nil "dialog" "prim/dialog.el" (12573 6368)) ;;; Generated autoloads from prim/dialog.el -;;;### (autoloads (standard-display-european standard-display-underline standard-display-graphic standard-display-g1 standard-display-ascii standard-display-default standard-display-8bit make-display-table describe-current-display-table) "disp-table" "prim/disp-table.el" (12648 18591)) +;;;### (autoloads (standard-display-european standard-display-underline standard-display-graphic standard-display-g1 standard-display-ascii standard-display-default standard-display-8bit make-display-table describe-current-display-table) "disp-table" "prim/disp-table.el" (12851 23478)) ;;; Generated autoloads from prim/disp-table.el (autoload 'describe-current-display-table "disp-table" "\ @@ -8989,7 +9213,7 @@ ;;;*** -;;;### (autoloads (setenv) "env" "prim/env.el" (12546 50503)) +;;;### (autoloads (setenv) "env" "prim/env.el" (12860 19430)) ;;; Generated autoloads from prim/env.el (autoload 'setenv "env" "\ @@ -9009,39 +9233,43 @@ ;;; Generated autoloads from prim/events.el ;;;*** - -;;;### (autoloads nil "extents" "prim/extents.el" (12639 8620)) + +;;;*** + +;;;### (autoloads nil "extents" "prim/extents.el" (12851 23473)) ;;; Generated autoloads from prim/extents.el ;;;*** -;;;### (autoloads nil "faces" "prim/faces.el" (12743 11619)) +;;;### (autoloads nil "faces" "prim/faces.el" (12851 23477)) ;;; Generated autoloads from prim/faces.el ;;;*** - -;;;### (autoloads nil "files" "prim/files.el" (12743 11613)) + +;;;*** + +;;;### (autoloads nil "files" "prim/files.el" (12860 19422)) ;;; Generated autoloads from prim/files.el ;;;*** -;;;### (autoloads nil "fill" "prim/fill.el" (12528 23894)) +;;;### (autoloads nil "fill" "prim/fill.el" (12860 19424)) ;;; Generated autoloads from prim/fill.el - -;;;### (autoloads nil "float-sup" "prim/float-sup.el" (12546 50479)) + +;;;*** + +;;;### (autoloads nil "float-sup" "prim/float-sup.el" (12860 19426)) ;;; Generated autoloads from prim/float-sup.el - -;;;*** ;;;### (autoloads nil "format" "prim/format.el" (12648 18601)) ;;; Generated autoloads from prim/format.el ;;;*** - -;;;### (autoloads nil "frame" "prim/frame.el" (12741 25956)) + +;;;*** + +;;;### (autoloads nil "frame" "prim/frame.el" (12851 23472)) ;;; Generated autoloads from prim/frame.el - -;;;*** ;;;### (autoloads nil "glyphs" "prim/glyphs.el" (12740 25218)) ;;; Generated autoloads from prim/glyphs.el @@ -9050,17 +9278,21 @@ ;;; Generated autoloads from prim/gui.el ;;;*** - -;;;### (autoloads nil "help" "prim/help.el" (12747 13261)) + +;;;*** + +;;;### (autoloads nil "help" "prim/help.el" (12851 23462)) ;;; Generated autoloads from prim/help.el + +;;;*** ;;;### (autoloads nil "inc-vers" "prim/inc-vers.el" (12546 50487)) ;;; Generated autoloads from prim/inc-vers.el + +;;;*** ;;;### (autoloads nil "indent" "prim/indent.el" (12648 18582)) ;;; Generated autoloads from prim/indent.el - -;;;*** ;;;### (autoloads nil "isearch-mode" "prim/isearch-mode.el" (12698 33552)) ;;; Generated autoloads from prim/isearch-mode.el @@ -9074,26 +9306,32 @@ ;;; Generated autoloads from prim/keydefs.el ;;;*** - -;;;### (autoloads nil "keymap" "prim/keymap.el" (12558 60933)) + +;;;*** + +;;;### (autoloads nil "keymap" "prim/keymap.el" (12851 23469)) ;;; Generated autoloads from prim/keymap.el ;;;*** -;;;### (autoloads nil "lisp" "prim/lisp.el" (12546 50478)) +;;;### (autoloads nil "lisp" "prim/lisp.el" (12860 19424)) ;;; Generated autoloads from prim/lisp.el ;;;*** - -;;;### (autoloads nil "loaddefs" "prim/loaddefs.el" (12748 8002)) + +;;;*** + +;;;### (autoloads nil "loaddefs" "prim/loaddefs.el" (12860 42262)) ;;; Generated autoloads from prim/loaddefs.el ;;;*** ;;;### (autoloads nil "loadup-el" "prim/loadup-el.el" (12639 8618)) ;;; Generated autoloads from prim/loadup-el.el - -;;;### (autoloads nil "loadup" "prim/loadup.el" (12728 8250)) + +;;;*** + +;;;### (autoloads nil "loadup" "prim/loadup.el" (12860 19422)) ;;; Generated autoloads from prim/loadup.el ;;;### (autoloads (apply-macro-to-region-lines kbd-macro-query insert-kbd-macro name-last-kbd-macro) "macros" "prim/macros.el" (12546 50477)) @@ -9180,24 +9418,26 @@ ;;; Generated autoloads from prim/menubar.el ;;;*** - -;;;### (autoloads nil "minibuf" "prim/minibuf.el" (12740 25211)) + +;;;*** + +;;;### (autoloads nil "minibuf" "prim/minibuf.el" (12851 23464)) ;;; Generated autoloads from prim/minibuf.el ;;;*** -;;;### (autoloads nil "misc" "prim/misc.el" (12558 60927)) +;;;### (autoloads nil "misc" "prim/misc.el" (12860 19429)) ;;; Generated autoloads from prim/misc.el + +;;;*** ;;;### (autoloads nil "mode-motion" "prim/mode-motion.el" (12657 40715)) ;;; Generated autoloads from prim/mode-motion.el ;;;*** -;;;### (autoloads nil "modeline" "prim/modeline.el" (12730 62103)) +;;;### (autoloads nil "modeline" "prim/modeline.el" (12860 31802)) ;;; Generated autoloads from prim/modeline.el - -;;;*** ;;;### (autoloads nil "mouse" "prim/mouse.el" (12744 55115)) ;;; Generated autoloads from prim/mouse.el @@ -9321,11 +9561,11 @@ ;;; Generated autoloads from prim/register.el ;;;*** - -;;;### (autoloads nil "replace" "prim/replace.el" (12740 25219)) + +;;;*** + +;;;### (autoloads nil "replace" "prim/replace.el" (12851 23479)) ;;; Generated autoloads from prim/replace.el - -;;;*** ;;;### (autoloads (reposition-window) "reposition" "prim/reposition.el" (12546 50489)) ;;; Generated autoloads from prim/reposition.el @@ -9355,8 +9595,10 @@ ;;; Generated autoloads from prim/scrollbar.el ;;;*** - -;;;### (autoloads nil "simple" "prim/simple.el" (12690 2179)) + +;;;*** + +;;;### (autoloads nil "simple" "prim/simple.el" (12860 19432)) ;;; Generated autoloads from prim/simple.el ;;;### (autoloads (reverse-region sort-columns sort-regexp-fields sort-fields sort-float-fields sort-numeric-fields sort-pages sort-paragraphs sort-lines sort-subr) "sort" "prim/sort.el" (12546 50495)) @@ -9491,29 +9733,31 @@ or HP9000s700, or running a NetAudio server." t nil) ;;;*** - -;;;### (autoloads nil "specifier" "prim/specifier.el" (12639 8622)) + +;;;*** + +;;;### (autoloads nil "specifier" "prim/specifier.el" (12851 23475)) ;;; Generated autoloads from prim/specifier.el ;;;*** -;;;### (autoloads nil "startup" "prim/startup.el" (12740 25213)) +;;;### (autoloads nil "startup" "prim/startup.el" (12851 23466)) ;;; Generated autoloads from prim/startup.el ;;;*** -;;;### (autoloads nil "subr" "prim/subr.el" (12639 8613)) +;;;### (autoloads nil "subr" "prim/subr.el" (12851 23467)) ;;; Generated autoloads from prim/subr.el - -;;;*** ;;;### (autoloads nil "symbols" "prim/symbols.el" (12546 50529)) ;;; Generated autoloads from prim/symbols.el - -;;;### (autoloads nil "syntax" "prim/syntax.el" (12546 50506)) + +;;;*** + +;;;### (autoloads nil "syntax" "prim/syntax.el" (12851 23473)) ;;; Generated autoloads from prim/syntax.el -;;;### (autoloads (tabify untabify) "tabify" "prim/tabify.el" (12639 8615)) +;;;### (autoloads (tabify untabify) "tabify" "prim/tabify.el" (12860 19429)) ;;; Generated autoloads from prim/tabify.el (autoload 'untabify "tabify" "\ @@ -9536,11 +9780,11 @@ ;;; Generated autoloads from prim/toolbar.el ;;;*** - -;;;### (autoloads nil "undo-stack" "prim/undo-stack.el" (12639 8852)) + +;;;*** + +;;;### (autoloads nil "undo-stack" "prim/undo-stack.el" (12851 23479)) ;;; Generated autoloads from prim/undo-stack.el - -;;;*** ;;;### (autoloads nil "update-elc" "prim/update-elc.el" (12546 50504)) ;;; Generated autoloads from prim/update-elc.el @@ -9574,43 +9818,50 @@ ;;; Generated autoloads from prim/window.el ;;;*** - -;;;### (autoloads nil "iso-sgml" "psgml/iso-sgml.el" (12639 8920)) + +;;;*** + +;;;### (autoloads nil "iso-sgml" "psgml/iso-sgml.el" (12851 23594)) ;;; Generated autoloads from psgml/iso-sgml.el ;;;*** - -;;;### (autoloads nil "psgml-api" "psgml/psgml-api.el" (12639 8921)) + +;;;*** + +;;;### (autoloads nil "nefarious" "psgml/nefarious.el" (12860 19489)) +;;; Generated autoloads from psgml/nefarious.el + +;;;### (autoloads nil "psgml-api" "psgml/psgml-api.el" (12851 23596)) ;;; Generated autoloads from psgml/psgml-api.el ;;;*** -;;;### (autoloads nil "psgml-charent" "psgml/psgml-charent.el" (12639 8921)) +;;;### (autoloads nil "psgml-charent" "psgml/psgml-charent.el" (12851 23597)) ;;; Generated autoloads from psgml/psgml-charent.el ;;;*** - -;;;### (autoloads nil "psgml-debug" "psgml/psgml-debug.el" (12639 8922)) + +;;;*** + +;;;### (autoloads nil "psgml-debug" "psgml/psgml-debug.el" (12860 19480)) ;;; Generated autoloads from psgml/psgml-debug.el - -;;;*** - -;;;### (autoloads nil "psgml-dtd" "psgml/psgml-dtd.el" (12639 8923)) + +;;;### (autoloads nil "psgml-dtd" "psgml/psgml-dtd.el" (12851 23598)) ;;; Generated autoloads from psgml/psgml-dtd.el ;;;*** -;;;### (autoloads nil "psgml-edit" "psgml/psgml-edit.el" (12648 18637)) +;;;### (autoloads nil "psgml-edit" "psgml/psgml-edit.el" (12851 23600)) ;;; Generated autoloads from psgml/psgml-edit.el -;;;### (autoloads (style-format) "psgml-fs" "psgml/psgml-fs.el" (12648 18670)) +;;;### (autoloads (style-format) "psgml-fs" "psgml/psgml-fs.el" (12851 23593)) ;;; Generated autoloads from psgml/psgml-fs.el (autoload 'style-format "psgml-fs" nil t nil) ;;;*** -;;;### (autoloads nil "psgml-html" "psgml/psgml-html.el" (12657 40787)) +;;;### (autoloads nil "psgml-html" "psgml/psgml-html.el" (12851 23601)) ;;; Generated autoloads from psgml/psgml-html.el (autoload 'html-mode "psgml-html" "\ @@ -9620,41 +9871,35 @@ HTML3 mode." t) ;;;*** - -;;;### (autoloads nil "psgml-info" "psgml/psgml-info.el" (12639 8925)) + +;;;*** + +;;;### (autoloads nil "psgml-info" "psgml/psgml-info.el" (12851 23602)) ;;; Generated autoloads from psgml/psgml-info.el ;;;*** - -;;;### (autoloads nil "psgml-other" "psgml/psgml-other.el" (12639 8926)) + +;;;*** + +;;;### (autoloads nil "psgml-lfix" "psgml/psgml-lfix.el" (12860 19490)) +;;; Generated autoloads from psgml/psgml-lfix.el + +;;;### (autoloads nil "psgml-other" "psgml/psgml-other.el" (12851 23603)) ;;; Generated autoloads from psgml/psgml-other.el ;;;*** - -;;;### (autoloads nil "psgml-parse" "psgml/psgml-parse.el" (12639 8928)) + +;;;*** + +;;;### (autoloads nil "psgml-parse" "psgml/psgml-parse.el" (12860 19482)) ;;; Generated autoloads from psgml/psgml-parse.el ;;;*** -;;;### (autoloads nil "psgml-style" "psgml/psgml-style.el" (12648 18671)) -;;; Generated autoloads from psgml/psgml-style.el - -;;;### (autoloads (tmpl-expand-templates-in-buffer tmpl-expand-templates-in-region) "psgml-tmpl-mode" "psgml/psgml-tmpl-mode.el" (12638 54483)) -;;; Generated autoloads from psgml/psgml-tmpl-mode.el - -(autoload 'tmpl-expand-templates-in-region "psgml-tmpl-mode" "\ -Expand the templates in the region from BEGIN to END. -If BEGIN and and are nil, then the current region is used." t nil) - -(autoload 'tmpl-expand-templates-in-buffer "psgml-tmpl-mode" "\ -Expand all templates in the current buffer." t nil) - -;;;*** - -;;;### (autoloads nil "psgml-xemacs" "psgml/psgml-xemacs.el" (12648 18639)) +;;;### (autoloads nil "psgml-xemacs" "psgml/psgml-xemacs.el" (12851 23606)) ;;; Generated autoloads from psgml/psgml-xemacs.el -;;;### (autoloads (sgml-mode) "psgml" "psgml/psgml.el" (12648 18638)) +;;;### (autoloads (sgml-mode) "psgml" "psgml/psgml.el" (12860 19487)) ;;; Generated autoloads from psgml/psgml.el (autoload 'sgml-mode "psgml" "\ @@ -9740,8 +9985,13 @@ ;;;### (autoloads nil "rmail-lucid" "rmail/rmail-lucid.el" (12376 19553)) ;;; Generated autoloads from rmail/rmail-lucid.el - -;;;### (autoloads (rmail-input rmail-mode rmail) "rmail" "rmail/rmail.el" (12727 30166)) + +;;;*** + +;;;### (autoloads nil "rmail-xemacs" "rmail/rmail-xemacs.el" (12860 19512)) +;;; Generated autoloads from rmail/rmail-xemacs.el + +;;;### (autoloads (rmail-input rmail-mode rmail) "rmail" "rmail/rmail.el" (12860 19435)) ;;; Generated autoloads from rmail/rmail.el (defvar rmail-dont-reply-to-names nil "\ @@ -9888,14 +10138,16 @@ ;;; Generated autoloads from sunpro/eserve.el ;;;*** - -;;;### (autoloads nil "sunpro-init" "sunpro/sunpro-init.el" (12740 25230)) + +;;;*** + +;;;### (autoloads nil "sunpro-init" "sunpro/sunpro-init.el" (12851 23501)) ;;; Generated autoloads from sunpro/sunpro-init.el + +;;;*** ;;;### (autoloads nil "sunpro-keys" "sunpro/sunpro-keys.el" (11903 15927)) ;;; Generated autoloads from sunpro/sunpro-keys.el - -;;;*** ;;;### (autoloads nil "sunpro-load" "sunpro/sunpro-load.el" (12256 51714)) ;;; Generated autoloads from sunpro/sunpro-load.el @@ -9967,11 +10219,11 @@ ;;;### (autoloads nil "scoansi" "term/scoansi.el" (12740 25282)) ;;; Generated autoloads from term/scoansi.el - -;;;### (autoloads nil "sun-mouse" "term/sun-mouse.el" (12639 8860)) + +;;;*** + +;;;### (autoloads nil "sun-mouse" "term/sun-mouse.el" (12851 23483)) ;;; Generated autoloads from term/sun-mouse.el - -;;;*** ;;;### (autoloads nil "sun" "term/sun.el" (12639 8861)) ;;; Generated autoloads from term/sun.el @@ -10096,57 +10348,59 @@ ;;; Generated autoloads from url/md5.el ;;;*** - -;;;### (autoloads nil "mm" "url/mm.el" (12715 10594)) + +;;;*** + +;;;### (autoloads nil "mm" "url/mm.el" (12851 23581)) ;;; Generated autoloads from url/mm.el - -;;;*** ;;;### (autoloads nil "ssl" "url/ssl.el" (12715 10594)) ;;; Generated autoloads from url/ssl.el ;;;*** - -;;;### (autoloads nil "url-cookie" "url/url-cookie.el" (12727 30991)) + +;;;*** + +;;;### (autoloads nil "url-cookie" "url/url-cookie.el" (12851 23589)) ;;; Generated autoloads from url/url-cookie.el ;;;*** -;;;### (autoloads nil "url-file" "url/url-file.el" (12740 27393)) +;;;### (autoloads nil "url-file" "url/url-file.el" (12851 23583)) ;;; Generated autoloads from url/url-file.el - -;;;*** ;;;### (autoloads nil "url-gopher" "url/url-gopher.el" (12639 8908)) ;;; Generated autoloads from url/url-gopher.el - -;;;### (autoloads nil "url-hash" "url/url-hash.el" (12648 18631)) + +;;;*** + +;;;### (autoloads nil "url-hash" "url/url-hash.el" (12851 23573)) ;;; Generated autoloads from url/url-hash.el ;;;*** -;;;### (autoloads nil "url-http" "url/url-http.el" (12740 27393)) +;;;### (autoloads nil "url-http" "url/url-http.el" (12851 23584)) ;;; Generated autoloads from url/url-http.el ;;;*** -;;;### (autoloads nil "url-irc" "url/url-irc.el" (12740 27199)) +;;;### (autoloads nil "url-irc" "url/url-irc.el" (12851 23582)) ;;; Generated autoloads from url/url-irc.el + +;;;*** ;;;### (autoloads nil "url-mail" "url/url-mail.el" (12727 30990)) ;;; Generated autoloads from url/url-mail.el - -;;;*** ;;;### (autoloads nil "url-misc" "url/url-misc.el" (12740 27393)) ;;; Generated autoloads from url/url-misc.el ;;;*** - -;;;### (autoloads nil "url-news" "url/url-news.el" (12720 56537)) + +;;;*** + +;;;### (autoloads nil "url-news" "url/url-news.el" (12851 23585)) ;;; Generated autoloads from url/url-news.el - -;;;*** ;;;### (autoloads nil "url-nfs" "url/url-nfs.el" (12740 27199)) ;;; Generated autoloads from url/url-nfs.el @@ -10160,21 +10414,23 @@ ;;; Generated autoloads from url/url-pgp.el ;;;*** - -;;;### (autoloads nil "url-sysdp" "url/url-sysdp.el" (12727 30990)) + +;;;*** + +;;;### (autoloads nil "url-sysdp" "url/url-sysdp.el" (12851 23586)) ;;; Generated autoloads from url/url-sysdp.el ;;;*** -;;;### (autoloads nil "url-vars" "url/url-vars.el" (12740 27394)) +;;;### (autoloads nil "url-vars" "url/url-vars.el" (12851 23588)) ;;; Generated autoloads from url/url-vars.el ;;;*** -;;;### (autoloads nil "url-wais" "url/url-wais.el" (12714 11783)) +;;;### (autoloads nil "url-wais" "url/url-wais.el" (12851 23588)) ;;; Generated autoloads from url/url-wais.el -;;;### (autoloads (url-retrieve url-cache-expired url-popup-info url-get-url-at-point url-buffer-visiting url-normalize-url url-file-attributes) "url" "url/url.el" (12740 27391)) +;;;### (autoloads (url-retrieve url-cache-expired url-popup-info url-get-url-at-point url-buffer-visiting url-normalize-url url-file-attributes) "url" "url/url.el" (12851 23581)) ;;; Generated autoloads from url/url.el (autoload 'url-file-attributes "url" "\ @@ -10232,11 +10488,13 @@ ;;; Generated autoloads from url/urlauth.el ;;;*** - -;;;### (autoloads nil "abbrevlist" "utils/abbrevlist.el" (12559 34915)) + +;;;*** + +;;;### (autoloads nil "abbrevlist" "utils/abbrevlist.el" (12860 19437)) ;;; Generated autoloads from utils/abbrevlist.el -;;;### (autoloads (defadvice ad-add-advice) "advice" "utils/advice.el" (12559 34922)) +;;;### (autoloads (defadvice ad-add-advice) "advice" "utils/advice.el" (12860 19442)) ;;; Generated autoloads from utils/advice.el (defvar ad-redefinition-action 'warn "\ @@ -10374,11 +10632,11 @@ Return a list of all annotations in existence." nil nil) ;;;*** - -;;;### (autoloads nil "assoc" "utils/assoc.el" (12559 34934)) + +;;;*** + +;;;### (autoloads nil "assoc" "utils/assoc.el" (12860 19447)) ;;; Generated autoloads from utils/assoc.el - -;;;*** ;;;### (autoloads nil "atomic-extents" "utils/atomic-extents.el" (12639 8649)) ;;; Generated autoloads from utils/atomic-extents.el @@ -10413,11 +10671,11 @@ For example, invoke `emacs -batch -f batch-update-autoloads *.el'." nil nil) ;;;*** - -;;;### (autoloads nil "blessmail" "utils/blessmail.el" (12559 34936)) + +;;;*** + +;;;### (autoloads nil "blessmail" "utils/blessmail.el" (12860 19451)) ;;; Generated autoloads from utils/blessmail.el - -;;;*** ;;;### (autoloads (browse-url-lynx-emacs browse-url-lynx-xterm browse-url-w3 browse-url-iximosaic browse-url-grail browse-url-mosaic browse-url-netscape) "browse-url" "utils/browse-url.el" (12745 43114)) ;;; Generated autoloads from utils/browse-url.el @@ -10477,11 +10735,13 @@ ;;;### (autoloads nil "delbackspace" "utils/delbackspace.el" (12740 50723)) ;;; Generated autoloads from utils/delbackspace.el - -;;;### (autoloads nil "derived" "utils/derived.el" (12639 8645)) + +;;;*** + +;;;### (autoloads nil "derived" "utils/derived.el" (12860 19437)) ;;; Generated autoloads from utils/derived.el -;;;### (autoloads (docref-setup) "docref" "utils/docref.el" (12559 34937)) +;;;### (autoloads (docref-setup) "docref" "utils/docref.el" (12860 19452)) ;;; Generated autoloads from utils/docref.el (autoload 'docref-setup "docref" "\ @@ -10490,7 +10750,7 @@ ;;;*** -;;;### (autoloads (easy-menu-define) "easymenu" "utils/easymenu.el" (12686 31729)) +;;;### (autoloads (easy-menu-define) "easymenu" "utils/easymenu.el" (12860 19455)) ;;; Generated autoloads from utils/easymenu.el (autoload 'easy-menu-define "easymenu" "\ @@ -10699,13 +10959,13 @@ ;;; Generated autoloads from utils/finder-inf.el ;;;*** - -;;;### (autoloads nil "finder" "utils/finder.el" (12546 50542)) + +;;;*** + +;;;### (autoloads nil "finder" "utils/finder.el" (12860 19447)) ;;; Generated autoloads from utils/finder.el - -;;;*** - -;;;### (autoloads (enable-flow-control-on enable-flow-control) "flow-ctrl" "utils/flow-ctrl.el" (12639 8648)) + +;;;### (autoloads (enable-flow-control-on enable-flow-control) "flow-ctrl" "utils/flow-ctrl.el" (12851 23485)) ;;; Generated autoloads from utils/flow-ctrl.el (autoload 'enable-flow-control "flow-ctrl" "\ @@ -10718,21 +10978,29 @@ Use `(enable-flow-control-on \"vt100\" \"h19\")' to enable flow control on VT-100 and H19 terminals. When flow control is enabled, you must type C-\\ to get the effect of a C-s, and type C-^ -to get the effect of a C-q." nil nil) - -;;;*** - -;;;### (autoloads nil "foldout" "utils/foldout.el" (12558 60956)) +to get the effect of a C-q. + +This function has no effect unless the current device is a tty. + +The tty terminal type is determined from the TERM environment variable. +Trailing hyphens and everything following is stripped, so a TERM +value of \"vt100-nam\" is treated the same as \"vt100\"." nil nil) + +;;;*** + +;;;*** + +;;;### (autoloads nil "foldout" "utils/foldout.el" (12860 19450)) ;;; Generated autoloads from utils/foldout.el ;;;*** -;;;### (autoloads nil "forms-d2" "utils/forms-d2.el" (12559 34931)) +;;;### (autoloads nil "forms-d2" "utils/forms-d2.el" (12860 19445)) ;;; Generated autoloads from utils/forms-d2.el ;;;*** -;;;### (autoloads nil "forms-pass" "utils/forms-pass.el" (12559 34932)) +;;;### (autoloads nil "forms-pass" "utils/forms-pass.el" (12860 19445)) ;;; Generated autoloads from utils/forms-pass.el ;;;### (autoloads (forms-find-file-other-window forms-find-file forms-mode) "forms" "utils/forms.el" (12559 34930)) @@ -10768,7 +11036,7 @@ ;;;### (autoloads nil "hide-copyleft" "utils/hide-copyleft.el" (12743 20032)) ;;; Generated autoloads from utils/hide-copyleft.el -;;;### (autoloads (highlight-headers-follow-url highlight-headers-follow-url-mosaic highlight-headers-follow-url-netscape highlight-headers) "highlight-headers" "utils/highlight-headers.el" (12743 22083)) +;;;### (autoloads (highlight-headers-follow-url highlight-headers-follow-url-mosaic highlight-headers-follow-url-netscape highlight-headers) "highlight-headers" "utils/highlight-headers.el" (12851 23484)) ;;; Generated autoloads from utils/highlight-headers.el (autoload 'highlight-headers "highlight-headers" "\ @@ -10806,7 +11074,7 @@ ;;;### (autoloads nil "live-icon" "utils/live-icon.el" (12657 40747)) ;;; Generated autoloads from utils/live-icon.el -;;;### (autoloads (unload-feature) "loadhist" "utils/loadhist.el" (12558 60957)) +;;;### (autoloads (unload-feature) "loadhist" "utils/loadhist.el" (12860 19452)) ;;; Generated autoloads from utils/loadhist.el (autoload 'unload-feature "loadhist" "\ @@ -10816,7 +11084,7 @@ ;;;*** -;;;### (autoloads (what-domain mail-extract-address-components) "mail-extr" "utils/mail-extr.el" (12743 22084)) +;;;### (autoloads (what-domain mail-extract-address-components) "mail-extr" "utils/mail-extr.el" (12851 23488)) ;;; Generated autoloads from utils/mail-extr.el (autoload 'mail-extract-address-components "mail-extr" "\ @@ -10854,16 +11122,18 @@ If third arg ALL is non-nil, concatenate all such fields with commas between." nil nil) ;;;*** - -;;;### (autoloads nil "mailpost" "utils/mailpost.el" (12559 46922)) + +;;;*** + +;;;### (autoloads nil "mailpost" "utils/mailpost.el" (12860 19438)) ;;; Generated autoloads from utils/mailpost.el - -;;;*** ;;;### (autoloads nil "map-ynp" "utils/map-ynp.el" (12740 25222)) ;;; Generated autoloads from utils/map-ynp.el - -;;;### (autoloads nil "meese" "utils/meese.el" (12559 34917)) + +;;;*** + +;;;### (autoloads nil "meese" "utils/meese.el" (12860 19438)) ;;; Generated autoloads from utils/meese.el ;;;### (autoloads (read-passwd) "passwd" "utils/passwd.el" (12559 34928)) @@ -10925,25 +11195,36 @@ ;;;*** -;;;### (autoloads (pp) "pp" "utils/pp.el" (12559 34933)) +;;;### (autoloads (pp-eval-last-sexp pp-eval-expression pp) "pp" "utils/pp.el" (12860 19446)) ;;; Generated autoloads from utils/pp.el +(defalias 'pprint 'pp) + (autoload 'pp "pp" "\ Output the pretty-printed representation of OBJECT, any Lisp object. Quoting characters are printed when needed to make output that `read' can handle, whenever this is possible. Output stream is STREAM, or value of `standard-output' (which see)." nil nil) -(defalias 'pprint 'pp) - -;;;*** - -;;;### (autoloads nil "regi" "utils/regi.el" (12558 60951)) +(autoload 'pp-eval-expression "pp" "\ +Evaluate EXPRESSION and pretty-print value into a new display buffer. +If the pretty-printed value fits on one line, the message line is used +instead. Value is also consed on to front of variable values 's +value." t nil) + +(autoload 'pp-eval-last-sexp "pp" "\ +Run `pp-eval-expression' on sexp before point (which see). +With argument, pretty-print output into current buffer. +Ignores leading comment characters." t nil) + +;;;*** + +;;;*** + +;;;### (autoloads nil "regi" "utils/regi.el" (12860 19444)) ;;; Generated autoloads from utils/regi.el - -;;;*** - -;;;### (autoloads (reporter-submit-bug-report) "reporter" "utils/reporter.el" (12559 34929)) + +;;;### (autoloads (reporter-submit-bug-report) "reporter" "utils/reporter.el" (12860 19442)) ;;; Generated autoloads from utils/reporter.el (autoload 'reporter-submit-bug-report "reporter" nil nil nil) @@ -10955,7 +11236,7 @@ ;;;*** -;;;### (autoloads (make-ring ringp) "ring" "utils/ring.el" (12639 8649)) +;;;### (autoloads (make-ring ringp) "ring" "utils/ring.el" (12860 19443)) ;;; Generated autoloads from utils/ring.el (autoload 'ringp "ring" "\ @@ -10967,15 +11248,17 @@ Make a ring that can contain SIZE elements." nil nil) ;;;*** - -;;;### (autoloads nil "shadowfile" "utils/shadowfile.el" (12558 60958)) + +;;;*** + +;;;### (autoloads nil "shadowfile" "utils/shadowfile.el" (12860 19453)) ;;; Generated autoloads from utils/shadowfile.el -;;;### (autoloads (skeleton-pair-insert-maybe skeleton-insert skeleton-proxy define-skeleton) "skeleton" "utils/skeleton.el" (12675 57223)) +;;;### (autoloads (skeleton-pair-insert-maybe skeleton-insert skeleton-proxy skeleton-proxy-new define-skeleton) "skeleton" "utils/skeleton.el" (12860 19448)) ;;; Generated autoloads from utils/skeleton.el (defvar skeleton-filter 'identity "\ -Function for transforming a skeleton-proxy's aliases' variable value.") +Function for transforming a skeleton proxy's aliases' variable value.") (autoload 'define-skeleton "skeleton" "\ Define a user-configurable COMMAND that enters a statement skeleton. @@ -10983,9 +11266,23 @@ which contains the skeleton, has a documentation to that effect. INTERACTOR and ELEMENT ... are as defined under `skeleton-insert'." nil 'macro) +(autoload 'skeleton-proxy-new "skeleton" "\ +Insert skeleton defined by variable of same name (see `skeleton-insert'). +Prefix ARG allows wrapping around words or regions (see `skeleton-insert'). +If no ARG was given, but the region is visible, ARG defaults to -1 depending +on `skeleton-autowrap'. An ARG of M-0 will prevent this just for once. +This command can also be an abbrev expansion (3rd and 4th columns in +\\[edit-abbrevs] buffer: \"\" command-name). + +When called as a function, optional first argument STR may also be a string +which will be the value of `str' whereas the skeleton's interactor is then +ignored." t nil) + (autoload 'skeleton-proxy "skeleton" "\ Insert skeleton defined by variable of same name (see `skeleton-insert'). Prefix ARG allows wrapping around words or regions (see `skeleton-insert'). +If no ARG was given, but the region is visible, ARG defaults to -1 depending +on `skeleton-autowrap'. An ARG of M-0 will prevent this just for once. This command can also be an abbrev expansion (3rd and 4th columns in \\[edit-abbrevs] buffer: \"\" command-name). @@ -11032,9 +11329,9 @@ formatted with `skeleton-subprompt'. Such an INTERACTOR may also a list of strings with the subskeleton being repeated once for each string. -Quoted lisp-expressions are evaluated evaluated for their side-effect. -Other lisp-expressions are evaluated and the value treated as above. -Note that expressions may not return `t' since this impplies an +Quoted Lisp expressions are evaluated evaluated for their side-effect. +Other Lisp expressions are evaluated and the value treated as above. +Note that expressions may not return `t' since this implies an endless loop. Modes can define other symbols by locally setting them to any valid skeleton element. The following local variables are available: @@ -11043,7 +11340,7 @@ then: insert previously read string once more help help-form during interaction with the user or `nil' input initial input (string or cons with index) while reading str - v1, v2 local variables for memorising anything you want + v1, v2 local variables for memorizing anything you want When done with skeleton, but before going back to `_'-point call `skeleton-end-hook' if that is non-`nil'." nil nil) @@ -11051,8 +11348,9 @@ (autoload 'skeleton-pair-insert-maybe "skeleton" "\ Insert the character you type ARG times. -With no ARG, if `skeleton-pair' is non-nil, and if -`skeleton-pair-on-word' is non-nil or we are not before or inside a +With no ARG, if `skeleton-pair' is non-nil, pairing can occur. If the region +is visible the pair is wrapped around it depending on `skeleton-autowrap'. +Else, if `skeleton-pair-on-word' is non-nil or we are not before or inside a word, and if `skeleton-pair-filter' returns nil, pairing is performed. If a match is found in `skeleton-pair-alist', that is inserted, else @@ -11060,11 +11358,11 @@ symmetrical ones, and the same character twice for the others." t nil) ;;;*** - -;;;### (autoloads nil "soundex" "utils/soundex.el" (12558 60959)) + +;;;*** + +;;;### (autoloads nil "soundex" "utils/soundex.el" (12860 19454)) ;;; Generated autoloads from utils/soundex.el - -;;;*** ;;;### (autoloads nil "symbol-syntax" "utils/symbol-syntax.el" (12573 6370)) ;;; Generated autoloads from utils/symbol-syntax.el @@ -11073,11 +11371,11 @@ ;;;### (autoloads nil "sysdep" "utils/sysdep.el" (12714 11722)) ;;; Generated autoloads from utils/sysdep.el - -;;;### (autoloads nil "text-props" "utils/text-props.el" (12639 8651)) + +;;;*** + +;;;### (autoloads nil "text-props" "utils/text-props.el" (12851 23491)) ;;; Generated autoloads from utils/text-props.el - -;;;*** ;;;### (autoloads nil "thing" "utils/thing.el" (12558 60956)) ;;; Generated autoloads from utils/thing.el @@ -11087,7 +11385,7 @@ ;;;### (autoloads nil "timezone" "utils/timezone.el" (12546 50543)) ;;; Generated autoloads from utils/timezone.el -;;;### (autoloads (tq-create) "tq" "utils/tq.el" (12558 60960)) +;;;### (autoloads (tq-create) "tq" "utils/tq.el" (12860 19454)) ;;; Generated autoloads from utils/tq.el (autoload 'tq-create "tq" "\ @@ -11098,7 +11396,7 @@ ;;;*** -;;;### (autoloads (trace-function-background trace-function) "trace" "utils/trace.el" (12546 50540)) +;;;### (autoloads (trace-function-background trace-function) "trace" "utils/trace.el" (12860 19443)) ;;; Generated autoloads from utils/trace.el (defvar trace-buffer "*trace-output*" "\ @@ -11125,6 +11423,11 @@ ;;;### (autoloads nil "tree-menu" "utils/tree-menu.el" (12558 60954)) ;;; Generated autoloads from utils/tree-menu.el + +;;;*** + +;;;### (autoloads nil "uniquify" "utils/uniquify.el" (12860 19513)) +;;; Generated autoloads from utils/uniquify.el ;;;### (autoloads (y-or-n-p-with-timeout yes-or-no-p-with-timeout with-timeout with-timeout-internal) "with-timeout" "utils/with-timeout.el" (12558 60948)) ;;; Generated autoloads from utils/with-timeout.el @@ -11219,8 +11522,12 @@ ;;; Generated autoloads from vm/tapestry.el ;;;*** - -;;;### (autoloads nil "vm-autoload" "vm/vm-autoload.el" (12744 48175)) + +;;;*** + +;;;*** + +;;;### (autoloads nil "vm-autoload" "vm/vm-autoload.el" (12860 37536)) ;;; Generated autoloads from vm/vm-autoload.el ;;;*** @@ -11228,13 +11535,17 @@ ;;;### (autoloads nil "vm-byteopts" "vm/vm-byteopts.el" (12244 51680)) ;;; Generated autoloads from vm/vm-byteopts.el -;;;### (autoloads nil "vm-delete" "vm/vm-delete.el" (12740 28348)) +;;;### (autoloads nil "vm-delete" "vm/vm-delete.el" (12851 23492)) ;;; Generated autoloads from vm/vm-delete.el - -;;;### (autoloads nil "vm-digest" "vm/vm-digest.el" (12376 19586)) + +;;;*** + +;;;*** + +;;;### (autoloads nil "vm-digest" "vm/vm-digest.el" (12860 19456)) ;;; Generated autoloads from vm/vm-digest.el -;;;### (autoloads (vm-easy-menu-create-keymaps vm-easy-menu-define) "vm-easymenu" "vm/vm-easymenu.el" (12376 19602)) +;;;### (autoloads (vm-easy-menu-create-keymaps vm-easy-menu-define) "vm-easymenu" "vm/vm-easymenu.el" (12312 61359)) ;;; Generated autoloads from vm/vm-easymenu.el (autoload 'vm-easy-menu-define "vm-easymenu" "\ @@ -11309,14 +11620,16 @@ ;;; Generated autoloads from vm/vm-edit.el ;;;*** - -;;;### (autoloads nil "vm-folder" "vm/vm-folder.el" (12740 28349)) + +;;;*** + +;;;### (autoloads nil "vm-folder" "vm/vm-folder.el" (12851 23493)) ;;; Generated autoloads from vm/vm-folder.el - -;;;### (autoloads nil "vm-license" "vm/vm-license.el" (12376 19590)) + +;;;*** + +;;;### (autoloads nil "vm-license" "vm/vm-license.el" (12244 51663)) ;;; Generated autoloads from vm/vm-license.el - -;;;*** ;;;### (autoloads nil "vm-mark" "vm/vm-mark.el" (12376 19590)) ;;; Generated autoloads from vm/vm-mark.el @@ -11358,11 +11671,11 @@ ;;;### (autoloads nil "vm-pop" "vm/vm-pop.el" (12740 28349)) ;;; Generated autoloads from vm/vm-pop.el - -;;;### (autoloads nil "vm-reply" "vm/vm-reply.el" (12376 19587)) + +;;;*** + +;;;### (autoloads nil "vm-reply" "vm/vm-reply.el" (12860 19457)) ;;; Generated autoloads from vm/vm-reply.el - -;;;*** ;;;### (autoloads nil "vm-save" "vm/vm-save.el" (12376 19592)) ;;; Generated autoloads from vm/vm-save.el @@ -11407,16 +11720,18 @@ ;;; Generated autoloads from vm/vm-undo.el ;;;*** - -;;;### (autoloads nil "vm-vars" "vm/vm-vars.el" (12740 28350)) + +;;;*** + +;;;*** + +;;;### (autoloads nil "vm-vars" "vm/vm-vars.el" (12860 19459)) ;;; Generated autoloads from vm/vm-vars.el ;;;*** ;;;### (autoloads nil "vm-version" "vm/vm-version.el" (12740 28351)) ;;; Generated autoloads from vm/vm-version.el - -;;;*** ;;;### (autoloads nil "vm-virtual" "vm/vm-virtual.el" (12312 61353)) ;;; Generated autoloads from vm/vm-virtual.el @@ -11427,59 +11742,58 @@ ;;; Generated autoloads from vm/vm-window.el ;;;*** - -;;;### (autoloads nil "docomp" "w3/docomp.el" (12727 30855)) + +;;;*** + +;;;### (autoloads nil "docomp" "w3/docomp.el" (12851 23512)) ;;; Generated autoloads from w3/docomp.el ;;;*** -;;;### (autoloads nil "font" "w3/font.el" (12720 56497)) +;;;### (autoloads nil "font" "w3/font.el" (12851 23504)) ;;; Generated autoloads from w3/font.el ;;;*** -;;;### (autoloads nil "images" "w3/images.el" (12714 11732)) +;;;### (autoloads nil "images" "w3/images.el" (12851 23505)) ;;; Generated autoloads from w3/images.el ;;;*** -;;;### (autoloads nil "w3-about" "w3/w3-about.el" (12745 49143)) +;;;### (autoloads nil "w3-about" "w3/w3-about.el" (12851 23537)) ;;; Generated autoloads from w3/w3-about.el - -;;;### (autoloads nil "w3-annotat" "w3/w3-annotat.el" (12727 30858)) + +;;;*** + +;;;### (autoloads nil "w3-annotat" "w3/w3-annotat.el" (12851 23513)) ;;; Generated autoloads from w3/w3-annotat.el ;;;*** -;;;### (autoloads nil "w3-auto" "w3/w3-auto.el" (12727 30865)) +;;;### (autoloads nil "w3-auto" "w3/w3-auto.el" (12851 23540)) ;;; Generated autoloads from w3/w3-auto.el - -;;;### (autoloads nil "w3-beta" "w3/w3-beta.el" (12686 31748)) -;;; Generated autoloads from w3/w3-beta.el - -;;;*** - -;;;### (autoloads nil "w3-draw" "w3/w3-draw.el" (12727 30859)) + +;;;*** + +;;;### (autoloads nil "w3-draw" "w3/w3-draw.el" (12851 23509)) ;;; Generated autoloads from w3/w3-draw.el ;;;*** -;;;### (autoloads nil "w3-e19" "w3/w3-e19.el" (12727 30856)) +;;;### (autoloads nil "w3-e19" "w3/w3-e19.el" (12851 23517)) ;;; Generated autoloads from w3/w3-e19.el ;;;*** -;;;### (autoloads nil "w3-emulate" "w3/w3-emulate.el" (12714 11733)) +;;;### (autoloads nil "w3-emulate" "w3/w3-emulate.el" (12851 23506)) ;;; Generated autoloads from w3/w3-emulate.el ;;;*** -;;;### (autoloads nil "w3-forms" "w3/w3-forms.el" (12740 27003)) +;;;### (autoloads nil "w3-forms" "w3/w3-forms.el" (12851 23511)) ;;; Generated autoloads from w3/w3-forms.el - -;;;*** - -;;;### (autoloads (w3-use-hotlist) "w3-hot" "w3/w3-hot.el" (12727 30861)) + +;;;### (autoloads (w3-use-hotlist) "w3-hot" "w3/w3-hot.el" (12851 23539)) ;;; Generated autoloads from w3/w3-hot.el (autoload 'w3-use-hotlist "w3-hot" "\ @@ -11489,76 +11803,93 @@ visited or interesting items you have found on the World Wide Web." t nil) ;;;*** - -;;;### (autoloads nil "w3-imap" "w3/w3-imap.el" (12715 10457)) + +;;;*** + +;;;### (autoloads nil "w3-imap" "w3/w3-imap.el" (12851 23517)) ;;; Generated autoloads from w3/w3-imap.el ;;;*** -;;;### (autoloads nil "w3-keyword" "w3/w3-keyword.el" (12727 30860)) +;;;### (autoloads nil "w3-keyword" "w3/w3-keyword.el" (12851 23541)) ;;; Generated autoloads from w3/w3-keyword.el ;;;*** -;;;### (autoloads nil "w3-latex" "w3/w3-latex.el" (12727 30593)) +;;;### (autoloads nil "w3-latex" "w3/w3-latex.el" (12851 23543)) ;;; Generated autoloads from w3/w3-latex.el ;;;*** -;;;### (autoloads nil "w3-menu" "w3/w3-menu.el" (12727 30864)) +;;;### (autoloads nil "w3-menu" "w3/w3-menu.el" (12851 23542)) ;;; Generated autoloads from w3/w3-menu.el - -;;;### (autoloads nil "w3-mouse" "w3/w3-mouse.el" (12720 56526)) + +;;;*** + +;;;### (autoloads nil "w3-mouse" "w3/w3-mouse.el" (12851 23543)) ;;; Generated autoloads from w3/w3-mouse.el ;;;*** -;;;### (autoloads nil "w3-mule" "w3/w3-mule.el" (12686 31739)) +;;;### (autoloads nil "w3-mule" "w3/w3-mule.el" (12851 23509)) ;;; Generated autoloads from w3/w3-mule.el ;;;*** -;;;### (autoloads nil "w3-parse" "w3/w3-parse.el" (12727 30863)) +;;;### (autoloads nil "w3-parse" "w3/w3-parse.el" (12851 23520)) ;;; Generated autoloads from w3/w3-parse.el ;;;*** -;;;### (autoloads nil "w3-prefs" "w3/w3-prefs.el" (12740 27017)) +;;;### (autoloads nil "w3-prefs" "w3/w3-prefs.el" (12851 23544)) ;;; Generated autoloads from w3/w3-prefs.el - -;;;### (autoloads nil "w3-print" "w3/w3-print.el" (12727 30863)) + +;;;*** + +;;;### (autoloads nil "w3-print" "w3/w3-print.el" (12851 23537)) ;;; Generated autoloads from w3/w3-print.el ;;;*** -;;;### (autoloads nil "w3-speak" "w3/w3-speak.el" (12740 27018)) +;;;### (autoloads nil "w3-speak" "w3/w3-speak.el" (12851 23545)) ;;; Generated autoloads from w3/w3-speak.el - -;;;### (autoloads nil "w3-style" "w3/w3-style.el" (12727 30864)) + +;;;*** + +;;;### (autoloads nil "w3-style" "w3/w3-style.el" (12851 23516)) ;;; Generated autoloads from w3/w3-style.el ;;;*** -;;;### (autoloads nil "w3-sysdp" "w3/w3-sysdp.el" (12727 30857)) +;;;### (autoloads nil "w3-sysdp" "w3/w3-sysdp.el" (12851 23541)) ;;; Generated autoloads from w3/w3-sysdp.el - -;;;### (autoloads nil "w3-toolbar" "w3/w3-toolbar.el" (12686 31734)) + +;;;*** + +;;;### (autoloads nil "w3-toolbar" "w3/w3-toolbar.el" (12851 23506)) ;;; Generated autoloads from w3/w3-toolbar.el ;;;*** -;;;### (autoloads nil "w3-vars" "w3/w3-vars.el" (12745 49201)) +;;;### (autoloads nil "w3-vars" "w3/w3-vars.el" (12851 23524)) ;;; Generated autoloads from w3/w3-vars.el ;;;*** -;;;### (autoloads nil "w3-widget" "w3/w3-widget.el" (12720 56504)) +;;;### (autoloads nil "w3-widget" "w3/w3-widget.el" (12851 23518)) ;;; Generated autoloads from w3/w3-widget.el - -;;;### (autoloads nil "w3-xemac" "w3/w3-xemac.el" (12727 30860)) + +;;;*** + +;;;### (autoloads nil "w3-xem20" "w3/w3-xem20.el" (12851 23771)) +;;; Generated autoloads from w3/w3-xem20.el + +;;;*** + +;;;### (autoloads nil "w3-xemac" "w3/w3-xemac.el" (12851 23514)) ;;; Generated autoloads from w3/w3-xemac.el -;;;### (autoloads (w3-follow-link w3-follow-link-other-frame w3-do-setup w3 w3-preview-this-buffer w3-batch-fetch w3-follow-url-at-point w3-follow-url-at-point-other-frame w3-maybe-follow-link w3-maybe-follow-link-mouse w3-fetch w3-fetch-other-frame w3-find-file w3-open-local) "w3" "w3/w3.el" (12740 27016)) +;;;### (autoloads (w3-follow-link w3-follow-link-other-frame w3-do-setup w3 w3-preview-this-buffer w3-batch-fetch w3-follow-url-at-point w3-follow-url-at-point-other-frame w3-maybe-follow-link w3-maybe-follow-link-mouse w3-fetch w3-fetch-other-frame w3-find-file w3-open-local) "w3" "w3/w3.el" (12851 23536)) ;;; Generated autoloads from w3/w3.el (autoload 'w3-open-local "w3" "\ @@ -11648,24 +11979,26 @@ to disk." t nil) ;;;*** - -;;;### (autoloads nil "widget-edit" "w3/widget-edit.el" (12740 27017)) + +;;;*** + +;;;### (autoloads nil "widget-edit" "w3/widget-edit.el" (12851 23539)) ;;; Generated autoloads from w3/widget-edit.el - -;;;*** ;;;### (autoloads nil "widget" "w3/widget.el" (12720 56523)) ;;; Generated autoloads from w3/widget.el - -;;;### (autoloads nil "x-compose" "x11/x-compose.el" (12202 12100)) + +;;;*** + +;;;### (autoloads nil "x-compose" "x11/x-compose.el" (12851 23496)) ;;; Generated autoloads from x11/x-compose.el + +;;;*** ;;;### (autoloads nil "x-faces" "x11/x-faces.el" (12698 33571)) ;;; Generated autoloads from x11/x-faces.el - -;;;*** - -;;;### (autoloads (font-menu-weight-constructor font-menu-size-constructor font-menu-family-constructor reset-device-font-menus) "x-font-menu" "x11/x-font-menu.el" (12675 57137)) + +;;;### (autoloads (font-menu-weight-constructor font-menu-size-constructor font-menu-family-constructor reset-device-font-menus) "x-font-menu" "x11/x-font-menu.el" (12851 23497)) ;;; Generated autoloads from x11/x-font-menu.el (defvar font-menu-ignore-scaled-fonts t "\ @@ -11692,28 +12025,36 @@ (autoload 'font-menu-weight-constructor "x-font-menu" nil nil nil) ;;;*** - -;;;### (autoloads nil "x-init" "x11/x-init.el" (12698 33574)) + +;;;*** + +;;;### (autoloads nil "x-init" "x11/x-init.el" (12851 23499)) ;;; Generated autoloads from x11/x-init.el + +;;;*** ;;;### (autoloads nil "x-iso8859-1" "x11/x-iso8859-1.el" (12639 8655)) ;;; Generated autoloads from x11/x-iso8859-1.el ;;;*** - -;;;### (autoloads nil "x-menubar" "x11/x-menubar.el" (12743 24793)) + +;;;*** + +;;;### (autoloads nil "x-menubar" "x11/x-menubar.el" (12860 19461)) ;;; Generated autoloads from x11/x-menubar.el ;;;### (autoloads nil "x-misc" "x11/x-misc.el" (12639 8659)) ;;; Generated autoloads from x11/x-misc.el + +;;;*** ;;;### (autoloads nil "x-mouse" "x11/x-mouse.el" (12698 33572)) ;;; Generated autoloads from x11/x-mouse.el + +;;;*** ;;;### (autoloads nil "x-scrollbar" "x11/x-scrollbar.el" (12639 8659)) ;;; Generated autoloads from x11/x-scrollbar.el - -;;;*** ;;;### (autoloads nil "x-select" "x11/x-select.el" (12546 50544)) ;;; Generated autoloads from x11/x-select.el
--- a/lisp/prim/loadup.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/prim/loadup.el Mon Aug 13 08:46:35 2007 +0200 @@ -3,7 +3,7 @@ ;; It is not a good idea to edit this file. Use site-init.el or site-load.el ;; instead. ;; -;; Copyright (C) 1985, 1986, 1992, 1993, 1994 Free Software Foundation, Inc. +;; Copyright (C) 1985, 1986, 1992, 1994 Free Software Foundation, Inc. ;; Copyright (C) 1996 Richard Mlynarik. ;; Copyright (C) 1995, 1996 Ben Wing. @@ -24,9 +24,10 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: Last synched with FSF 19.30, with divergence since. ;;; Commentary: @@ -64,146 +65,143 @@ (setq load-warn-when-source-newer t ; set to nil at the end load-warn-when-source-only t) - (let ((l #'(lambda (x) - (load x) - ;; garbage collect after loading every file in an attempt to - ;; minimize the size of the dumped image (if we don't do - ;; this, there will be lots of extra space in the data - ;; segment filled with garbage-collected junk) - (garbage-collect)))) - (funcall l "backquote") ; needed for defsubst etc. - (funcall l "bytecomp-runtime") ; define defsubst - (funcall l "subr") ;; now load the most basic Lisp functions - (funcall l "replace") ;; match-string used in version.el. - (funcall l "version.el") ;Ignore compiled-by-mistake version.elc - (funcall l "cl") - (funcall l "cmdloop") - (or (fboundp 'recursive-edit) (funcall l "cmdloop1")) - (funcall l "keymap") - (funcall l "syntax") - (funcall l "device") - (funcall l "console") - (funcall l "obsolete") - (funcall l "specifier") - (funcall l "faces") ; must be loaded before any make-face call - ;(funcall l "facemenu") #### not yet ported - (funcall l "glyphs") - (funcall l "objects") - (funcall l "extents") - (funcall l "events") - (funcall l "text-props") - (funcall l "process") - (funcall l "frame") ; move up here cause some stuff needs it here - (funcall l "map-ynp") - (funcall l "simple") - (funcall l "keydefs") ; Before loaddefs so that keymap vars exist. - (funcall l "abbrev") - (funcall l "derived") - (funcall l "minibuf") - (funcall l "list-mode") - (funcall l "modeline") ;after simple.el so it can reference functions - ;defined there. - ;; If SparcWorks support is included some additional packages are - ;; dumped which would normally have autoloads. To avoid - ;; duplicate doc string warnings, SparcWorks uses a separate - ;; autoloads file with the dumped packages removed. - (if (featurep 'sparcworks) - (funcall l "eos/loaddefs-eos") - (funcall l "loaddefs")) - (funcall l "misc") - (funcall l "profile") - (funcall l "help") - ;; (funcall l "hyper-apropos") Soon... - (funcall l "files") - (funcall l "lib-complete") - (funcall l "format") - (funcall l "indent") - (funcall l "isearch-mode") - (funcall l "buffer") - (funcall l "buff-menu") - (funcall l "undo-stack") - (funcall l "window") - (funcall l "paths.el") ; don't get confused if paths compiled. - (funcall l "startup") - (funcall l "lisp") - (funcall l "page") - (funcall l "register") - (funcall l "iso8859-1") ; This must be before any modes + ;; garbage collect after loading every file in an attempt to + ;; minimize the size of the dumped image (if we don't do this, + ;; there will be lots of extra space in the data segment filled + ;; with garbage-collected junk) + (defmacro load-gc (file) + (list 'prog1 (list 'load file) '(garbage-collect))) + (load-gc "backquote") ; needed for defsubst etc. + (load-gc "bytecomp-runtime") ; define defsubst + (load-gc "subr") ; load the most basic Lisp functions + (load-gc "replace") ; match-string used in version.el. + (load-gc "version.el") ; Ignore compiled-by-mistake version.elc + (load-gc "cl") + (load-gc "cmdloop") + (or (fboundp 'recursive-edit) (load-gc "cmdloop1")) + (load-gc "keymap") + (load-gc "syntax") + (load-gc "device") + (load-gc "console") + (load-gc "obsolete") + (load-gc "specifier") + (load-gc "faces") ; must be loaded before any make-face call + ;(load-gc "facemenu") #### not yet ported + (load-gc "glyphs") + (load-gc "objects") + (load-gc "extents") + (load-gc "events") + (load-gc "text-props") + (load-gc "process") + (load-gc "frame") ; move up here cause some stuff needs it here + (load-gc "map-ynp") + (load-gc "simple") + (load-gc "keydefs") ; Before loaddefs so that keymap vars exist. + (load-gc "abbrev") + (load-gc "derived") + (load-gc "minibuf") + (load-gc "list-mode") + (load-gc "modeline") ; after simple.el so it can reference functions + ; defined there. + ;; If SparcWorks support is included some additional packages are + ;; dumped which would normally have autoloads. To avoid + ;; duplicate doc string warnings, SparcWorks uses a separate + ;; autoloads file with the dumped packages removed. + ;;; After fixing, eos/loaddefs-eos and loaddefs appear identical?!! + ;;; So just make loaddefs-eos go away... + ;;;(load-gc (if (featurep 'sparcworks) "eos/loaddefs-eos" "loaddefs")) + (load-gc "loaddefs") + (load-gc "misc") + (load-gc "profile") + (load-gc "help") + ;; (load-gc "hyper-apropos") Soon... + (load-gc "files") + (load-gc "lib-complete") + (load-gc "format") + (load-gc "indent") + (load-gc "isearch-mode") + (load-gc "buffer") + (load-gc "buff-menu") + (load-gc "undo-stack") + (load-gc "window") + (load-gc "paths.el") ; don't get confused if paths compiled. + (load-gc "startup") + (load-gc "lisp") + (load-gc "page") + (load-gc "register") + (load-gc "iso8859-1") ; This must be before any modes ; (sets standard syntax table.) - (funcall l "paragraphs") - (funcall l "lisp-mode") - (funcall l "text-mode") - (funcall l "fill") - (funcall l "cc-mode") - (if (eq system-type 'vax-vms) - (funcall l "vmsproc")) - (if (eq system-type 'vax-vms) - (funcall l "vms-patch")) - (if (eq system-type 'windows-nt) - (progn - (funcall l "ls-lisp") - (funcall l "winnt"))) - (if (eq system-type 'ms-dos) - (progn - (funcall l "ls-lisp") - (funcall l "dos-fns") - (funcall l "disp-table") ; needed to setup ibm-pc char set, - ; see internal.el - )) - (if (featurep 'lisp-float-type) - (funcall l "float-sup")) - (funcall l "itimer") ; for vars auto-save-timeout and auto-gc-threshold - (if (featurep 'toolbar) - (funcall l "toolbar") - (progn - ;; but still define a few functions. - (defun toolbar-button-p (obj) "No toolbar support." nil) - (defun toolbar-specifier-p (obj) "No toolbar support." nil))) - (if (featurep 'scrollbar) - (funcall l "scrollbar")) - (if (featurep 'menubar) - (funcall l "menubar")) - (if (featurep 'dialog) - (funcall l "dialog")) - (if (featurep 'window-system) - (progn - (funcall l "gui") - (funcall l "mode-motion") - (funcall l "mouse"))) - (if (featurep 'x) - ;; preload the X code, for faster startup. - (progn - (if (featurep 'menubar) - (progn - (funcall l "x-menubar") - ;; autoload this. - ;;(funcall l "x-font-menu") - )) - (funcall l "x-faces") - (funcall l "x-iso8859-1") - (funcall l "x-mouse") - (funcall l "x-select") - (if (featurep 'scrollbar) - (funcall l "x-scrollbar")) - (funcall l "x-misc") - (funcall l "x-init") - (if (featurep 'toolbar) - (funcall l "x-toolbar")) - )) - (if (featurep 'tty) - ;; preload the TTY init code. - (funcall l "tty-init")) - (if (featurep 'tooltalk) - (funcall l "tooltalk/tooltalk-load")) - (funcall l "vc-hooks") - (funcall l "ediff-hook") - (funcall l "fontl-hooks") - (funcall l "auto-show") - (if (featurep 'energize) - (funcall l "energize/energize-load.el")) - (if (featurep 'sparcworks) - (funcall l "sunpro/sunpro-load.el")) - ))) ;; end of call-with-condition-handler + (load-gc "paragraphs") + (load-gc "lisp-mode") + (load-gc "text-mode") + (load-gc "fill") + (load-gc "cc-mode") + ;; we no longer load buff-menu automatically. + ;; it will get autoloaded if needed. + + (cond ; Differences based on system-type + ((eq system-type 'vax-vms) + (load-gc "vmsproc") + (load-gc "vms-patch")) + ((eq system-type 'windows-nt) + (load-gc "ls-lisp") + (load-gc "winnt")) + ((eq system-type 'ms-dos) + (load-gc "ls-lisp") + (load-gc "dos-fns") + (load-gc "disp-table"))) ; needed to setup ibm-pc char set, + ; see internal.el + (when (featurep 'lisp-float-type) + (load-gc "float-sup")) + (load-gc "itimer") ; for vars auto-save-timeout and auto-gc-threshold + (if (featurep 'toolbar) + (load-gc "toolbar") + ;; else still define a few functions. + (defun toolbar-button-p (obj) "No toolbar support." nil) + (defun toolbar-specifier-p (obj) "No toolbar support." nil)) + (when (featurep 'scrollbar) + (load-gc "scrollbar")) + (when (featurep 'menubar) + (load-gc "menubar")) + (when (featurep 'dialog) + (load-gc "dialog")) + (when (featurep 'window-system) + (load-gc "gui") + (load-gc "mode-motion") + (load-gc "mouse")) + (when (featurep 'x) + ;; preload the X code, for faster startup. + (when (featurep 'menubar) + (load-gc "x-menubar") + ;; autoload this. + ;;(load-gc "x-font-menu") + ) + (load-gc "x-faces") + (load-gc "x-iso8859-1") + (load-gc "x-mouse") + (load-gc "x-select") + (when (featurep 'scrollbar) + (load-gc "x-scrollbar")) + (load-gc "x-misc") + (load-gc "x-init") + (when (featurep 'toolbar) + (load-gc "x-toolbar")) + ) + (when (featurep 'tty) + ;; preload the TTY init code. + (load-gc "tty-init")) + (when (featurep 'tooltalk) + (load-gc "tooltalk/tooltalk-load")) + (load-gc "vc-hooks") + (load-gc "ediff-hook") + (load-gc "fontl-hooks") + (load-gc "auto-show") + (when (featurep 'energize) + (load-gc "energize/energize-load.el")) + (when (featurep 'sparcworks) + (load-gc "sunpro/sunpro-load.el")) + (fmakunbound 'load-gc) + )) ;; end of call-with-condition-handler (setq load-warn-when-source-newer nil ; set to t at top of file @@ -215,12 +213,12 @@ (equal (nth 5 command-line-args) "no-site-file")) (setq site-start-file nil)) -;;; If you want additional libraries to be preloaded and their -;;; doc strings kept in the DOC file rather than in core, -;;; you may load them with a "site-load.el" file. -;;; But you must also cause them to be scanned when the DOC file -;;; is generated. For VMS, you must edit ../../vms/makedoc.com. -;;; For other systems, you must edit ../../src/Makefile.in.in. +;; If you want additional libraries to be preloaded and their +;; doc strings kept in the DOC file rather than in core, +;; you may load them with a "site-load.el" file. +;; But you must also cause them to be scanned when the DOC file +;; is generated. For VMS, you must edit ../../vms/makedoc.com. +;; For other systems, you must edit ../../src/Makefile.in.in. (if (load "site-load" t) (garbage-collect)) @@ -248,13 +246,13 @@ ; (1+ (apply 'max versions)) ; 1))))) -;;; Note: all compiled Lisp files loaded above this point -;;; must be among the ones parsed by make-docfile -;;; to construct DOC. Any that are not processed -;;; for DOC will not have doc strings in the dumped XEmacs. +;; Note: all compiled Lisp files loaded above this point +;; must be among the ones parsed by make-docfile +;; to construct DOC. Any that are not processed +;; for DOC will not have doc strings in the dumped XEmacs. -;;; Don't bother with these if we're running temacs, i.e. if we're -;;; just debugging don't waste time finding doc strings. +;; Don't bother with these if we're running temacs, i.e. if we're +;; just debugging don't waste time finding doc strings. (if (or (equal (nth 3 command-line-args) "dump") (equal (nth 4 command-line-args) "dump")) @@ -285,9 +283,9 @@ (Verify-documentation) )) -;;; Note: You can cause additional libraries to be preloaded -;;; by writing a site-init.el that loads them. -;;; See also "site-load" above. +; Note: You can cause additional libraries to be preloaded +; by writing a site-init.el that loads them. +; See also "site-load" above. (if (stringp site-start-file) (load "site-init" t)) (setq current-load-list nil) @@ -316,10 +314,10 @@ (setq name (substring name 0 (match-beginning 0)))) (if (eq system-type 'ms-dos) (message "Dumping under the name xemacs") - (message "Dumping under names xemacs and %s" name))) - (condition-case () - (delete-file "xemacs") - (file-error nil)) + (message "Dumping under names xemacs and %s" name)) + (condition-case () (delete-file name ) (file-error nil)) + (condition-case () (delete-file "xemacs") (file-error nil)) + ) (if (fboundp 'really-free) (really-free)) ;; Note that FSF used to dump under `xemacs'! @@ -360,12 +358,13 @@ ;; run-emacs-from-temacs doesn't actually return anyway. (kill-emacs))) -;;; Avoid error if user loads some more libraries now. +;; Avoid error if user loads some more libraries now. (setq purify-flag nil) -;;; If you are using 'recompile', then you should have used -l loadup-el.el -;;; so that the .el files always get loaded (the .elc files may be out-of- -;;; date or bad). +;; XEmacs change +;; If you are using 'recompile', then you should have used -l loadup-el.el +;; so that the .el files always get loaded (the .elc files may be out-of- +;; date or bad). (if (or (equal (nth 3 command-line-args) "recompile") (equal (nth 4 command-line-args) "recompile")) (progn @@ -377,10 +376,6 @@ (kill-emacs)))) -;;; For machines with CANNOT_DUMP defined in config.h, -;;; this file must be loaded each time XEmacs is run. -;;; So run the startup code now. - ;; For machines with CANNOT_DUMP defined in config.h, ;; this file must be loaded each time Emacs is run. ;; So run the startup code now.
--- a/lisp/prim/minibuf.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/prim/minibuf.el Mon Aug 13 08:46:35 2007 +0200 @@ -347,7 +347,7 @@ (setq mode-motion-hook 'minibuffer-mouse-tracker)) (make-local-variable 'mouse-track-click-hook) (add-hook 'mouse-track-click-hook - 'minibuffer-maybe-select-highlighted-completion)) + 'minibuffer-smart-maybe-select-highlighted-completion)) (set-window-buffer window buffer) (select-window window) (set-window-hscroll window 0) @@ -999,7 +999,7 @@ (defun minibuffer-smart-select-kludge-filename (string) (save-excursion (set-buffer mouse-grabbed-buffer) ; the minibuf - (let ((kludge-string (append (buffer-string) string))) + (let ((kludge-string (concat (buffer-string) string))) (if (or (and (fboundp 'ange-ftp-ftp-path) (ange-ftp-ftp-path kludge-string)) (and (fboundp 'efs-ftp-path) (efs-ftp-path kludge-string))) @@ -1015,7 +1015,7 @@ \\[minibuffer-smart-select-highlighted-completion] will select the highlighted completion under the mouse. -If the mouse is clicked while while not over a highlighted completion, +If the mouse is clicked while not over a highlighted completion, then the global binding of \\[minibuffer-smart-select-highlighted-completion] \ will be executed instead. In this\nway you can get at the normal global \ behavior of \\[minibuffer-smart-select-highlighted-completion] as well as
--- a/lisp/prim/misc.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/prim/misc.el Mon Aug 13 08:46:35 2007 +0200 @@ -18,9 +18,10 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Code:
--- a/lisp/prim/modeline.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/prim/modeline.el Mon Aug 13 08:46:35 2007 +0200 @@ -433,5 +433,6 @@ 'modeline-process (purecopy ")%]----") (purecopy '(line-number-mode "L%l--")) + (purecopy '(column-number-mode "C%c--")) (purecopy '(-3 . "%p")) (purecopy "-%-")))
--- a/lisp/prim/replace.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/prim/replace.el Mon Aug 13 08:46:35 2007 +0200 @@ -279,8 +279,8 @@ (run-hooks 'occur-mode-hook)) (defun occur-mode-mouse-goto (e) - "go to occurence highlighted by mouse. This function is only reasonable when bound -to a mouse key in the occur buffer" + "Go to the occurrence highlighted by mouse. +This function is only reasonable when bound to a mouse key in the occur buffer" (interactive "e") (let ((window-save (selected-window)) (frame-save (selected-frame)))
--- a/lisp/prim/simple.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/prim/simple.el Mon Aug 13 08:46:35 2007 +0200 @@ -213,7 +213,8 @@ (defun just-one-space () "Delete all spaces and tabs around point, leaving one space." (interactive "*") - (expand-abbrev) + (if abbrev-mode + (expand-abbrev)) (skip-chars-backward " \t") (if (= (following-char) ? ) (forward-char 1)
--- a/lisp/prim/specifier.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/prim/specifier.el Mon Aug 13 08:46:35 2007 +0200 @@ -274,7 +274,7 @@ The specifier `scrollbar-width', for example, is of type `integer', meaning its valid instantiators are integers. The specifier governing the background color of the `default' face (you can -retrieve this specifier using `(face-foreground 'default)') is +retrieve this specifier using `(face-background 'default)') is of type `color', meaning its valid instantiators are strings naming colors and color-instance objects. For some types of specifiers, such as `image' and `toolbar', the instantiators can be very @@ -297,7 +297,7 @@ don't recognize this color, so you could provide a backup \"forest green\". Color TTY devices probably won't recognize this either, so you could provide a second backup \"green\". You'd -do this by specifying an instantiator +do this by specifying this list of instantiators: '(\"darkseagreen2\" \"forest green\" \"green\") @@ -337,8 +337,8 @@ Finally, VALUE can itself be a specifier (of the same type as SPECIFIER), if you want to copy specifications from one specifier to another; this is equivalent to calling `copy-specifier', and -LOCALE, TAG-SET, and HOW-TO-ADD have the same semantics as that -function. +LOCALE, TAG-SET, and HOW-TO-ADD have the same semantics as with +that function. Note that `set-specifier' is exactly complementary to `specifier-specs' except in the case where SPECIFIER has no specs at all in it but nil @@ -349,7 +349,7 @@ and an inst-list, etc. (The built-in specifier types are designed in such a way as to avoid any such ambiguities.) -NOTE: If you want to to work with spec-lists, you should probably not +NOTE: If you want to work with spec-lists, you should probably not use either `set-specifier' or `specifier-specs', but should use the lower-level functions `add-spec-list-to-specifier' and `specifier-spec-list'. These functions always work with fully-qualified spec-lists; thus, there
--- a/lisp/prim/startup.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/prim/startup.el Mon Aug 13 08:46:35 2007 +0200 @@ -827,50 +827,67 @@ (+ left-margin (round (/ (/ (- fill-area-width glyph-pixwidth) 2) avg-pixwidth))))) -(defun startup-splash-frame () - (let ((p (point))) - (if (eq 'x (console-type (selected-console))) (insert "\n")) - (indent-to (startup-center-spaces xemacs-logo)) - (set-extent-begin-glyph (make-extent (point) (point)) xemacs-logo) - (if (eq 'x (console-type (selected-console))) - (insert "\n\n") - (insert "\n")) - (splash-frame-present-hack (make-extent p (point)) 'about-xemacs)) - - (insert "\n" (emacs-version) "\n") - (let ((after-change-functions nil) ; no font-lock, thank you - (l `((face bold-italic -"Copyright (C) 1985-1996 Free Software Foundation, Inc. +(defun startup-splash-frame-body () + `("\n" ,(emacs-version) "\n" + (face bold-italic "\ +Copyright (C) 1985-1996 Free Software Foundation, Inc. Copyright (C) 1990-1994 Lucid, Inc. Copyright (C) 1993-1996 Sun Microsystems, Inc. All Rights Reserved. Copyright (C) 1994-1996 Board of Trustees, University of Illinois -Copyright (C) 1995-1996 Ben Wing.") - ,@(if (featurep 'sparcworks) '( -"\n\nSunSoft provides support for the SPARCworks/XEmacs EOS integration package -only. All other XEmacs packages are provided to you \"AS IS\".")) - "\n\nType " (key describe-no-warranty) " to refer to the GPL " - "Version 2, dated June 1991, for full details.\n" - "You may give out copies of XEmacs; type " - (key describe-copying) " to see the conditions.\n" - "Type " (key describe-distribution) - " for information on getting the latest version." +Copyright (C) 1995-1996 Ben Wing\n\n") + + ,@(if (featurep 'sparcworks) + `( "\ +Sun provides support for the WorkShop/XEmacs integration package only. +All other XEmacs packages are provided to you \"AS IS\". +For full details, type " (key describe-no-warranty) +" to refer to the GPL Version 2, dated June 1991.\n\n" +,@(let ((lang (or (getenv "LANG") (getenv "LC_ALL")))) + (if (and + (not (featurep 'mule)) ; Already got mule? + (not (eq 'tty (console-type))) ; No Mule support on tty's yet + lang ; Non-English locale? + (not (string-equal lang "C")) + (not (string-match "^en" lang)) + (locate-file "xemacs-mule" exec-path)) ; Comes with Sun WorkShop + '( "\ +This version of XEmacs has been built with support for Latin-1 languages only. +To handle other languages you need to run a Multi-lingual (`Mule') version of +XEmacs, by either running the command `xemacs-mule', or by using the X resource +`ESERVE*defaultXEmacsPath: xemacs-mule' when starting XEmacs from Sun WorkShop.\n\n")))) - "\n\nType " (key help-command) " for help; " - (key advertised-undo) - " to undo changes. (`C-' means use the CTRL key.)\n" - "To get out of XEmacs, type " (key save-buffers-kill-emacs) ".\n" - "Type " (key help-with-tutorial) - " for a tutorial on using XEmacs.\n" - "Type " (key info) " to enter Info, " - "which you can use to read documentation.\n\n" - (face (bold red) - ( -"For tips and answers to frequently asked questions, see the XEmacs FAQ.\n" - "(It's on the Help menu, or type " - (key xemacs-local-faq) " [a capital F!].)"))))) - (while l - (splash-frame-present (car l)) - (setq l (cdr l)))) + '("XEmacs comes with ABSOLUTELY NO WARRANTY; type " + (key describe-no-warranty) " for full details.\n")) + + "You may give out copies of XEmacs; type " + (key describe-copying) " to see the conditions.\n" + "Type " (key describe-distribution) + " for information on getting the latest version.\n\n" + + "Type " (key help-command) " or use the " (face bold "Help") " menu to get help.\n" + "Type " (key advertised-undo) " to undo changes (`C-' means use the Control key).\n" + "To get out of XEmacs, type " (key save-buffers-kill-emacs) ".\n" + "Type " (key help-with-tutorial) " for a tutorial on using XEmacs.\n" + "Type " (key info) " to enter Info, " + "which you can use to read online documentation.\n\n" + (face (bold red) ( "\ +For tips and answers to frequently asked questions, see the XEmacs FAQ. +\(It's on the Help menu, or type " (key xemacs-local-faq) " [a capital F!].\)")))) + +(defun startup-splash-frame () + (let ((p (point)) + (cramped-p (eq 'tty (console-type)))) + (unless cramped-p (insert "\n")) + (indent-to (startup-center-spaces xemacs-logo)) + (set-extent-begin-glyph (make-extent (point) (point)) xemacs-logo) + (insert (if cramped-p "\n" "\n\n")) + (splash-frame-present-hack (make-extent p (point)) 'about-xemacs)) + + (let ((after-change-functions nil)) ; no font-lock, thank you + (dolist (l (startup-splash-frame-body)) + (splash-frame-present l))) + (set-buffer-modified-p nil)) + ; (let ((present-file ; #'(lambda (f) ; (splash-frame-present @@ -883,7 +900,7 @@ ; (insert " and ") ; (funcall present-file "sample.Xdefaults") ; (insert (format "\nin the directory %s." data-directory))) - (set-buffer-modified-p nil)) + ;;;; Computing the default load-path, etc. ;;;
--- a/lisp/prim/subr.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/prim/subr.el Mon Aug 13 08:46:35 2007 +0200 @@ -523,7 +523,7 @@ ; alternate names (not obsolete) (if (not (fboundp 'mod)) (define-function 'mod '%)) (define-function 'move-marker 'set-marker) -(define-function 'beep 'ding) ;preserve lingual purtity +(define-function 'beep 'ding) ; preserve lingual purity (define-function 'indent-to-column 'indent-to) (define-function 'backward-delete-char 'delete-backward-char) (define-function 'search-forward-regexp (symbol-function 're-search-forward))
--- a/lisp/prim/tabify.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/prim/tabify.el Mon Aug 13 08:46:35 2007 +0200 @@ -18,9 +18,10 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary: @@ -47,6 +48,7 @@ (indent-tabs-mode nil)) (skip-chars-backward "\t" start) (delete-region tab-beg (point)) + ;; XEmacs change -- show progress (indent-to column) (if (> (/ (* 100 (- (point) start)) (- (point-max) start)) percent) (progn @@ -76,6 +78,7 @@ (let ((column (current-column)) (indent-tabs-mode t)) (delete-region (match-beginning 0) (point)) + ;; XEmacs change -- show progress (indent-to column) (if (> (/ (* 100 (- (point) start)) (- (point-max) start)) percent) (progn
--- a/lisp/prim/undo-stack.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/prim/undo-stack.el Mon Aug 13 08:46:35 2007 +0200 @@ -104,7 +104,7 @@ ;;; Conceptually, we can implement the "undoable stack" using ;;; two stacks of a sort called "truncatable stack", which are ;;; just simple stacks, but where you can truncate elements -;;; of of the bottom of the stack. Then, the undoable stack +;;; off of the bottom of the stack. Then, the undoable stack ;;; ;;; 1 -> 2 -> 3 -> 4 -> 5 -> 6 ;;; ^^
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/psgml/ChangeLog Mon Aug 13 08:46:35 2007 +0200 @@ -0,0 +1,878 @@ +Tue Sep 10 17:52:40 1996 Steven L Baur <steve@miranova.com> + + * Various files: Sync'ed with 1.0a12 + +Fri Jul 12 18:20:07 1996 Steven L Baur <steve@miranova.com> + + * Various files: Sync'ed up to Wingpsgml + + * iso-sgml.el: Added Appendix 2 Proposed entity additions to Latin-2 + +Fri Jul 12 03:38:10 1996 Adrian Aichner <aichner@ecf.teradyne.com> + + * psgml-edit.el: Allow user to control capitalization of auto-inserted + keywords. + + +Sun Sep 1 01:53:33 1996 Lennart Staflin <lenst@lysator.liu.se> + + * Version 1.0a12 + + * psgml-maint.el: new file. Used to compile psgml. + +Tue Aug 20 23:11:30 1996 Lennart Staflin <lenst@lysator.liu.se> + + * psgml.el: + (sgml-validate-error-regexps): Fixes from Dave Love <d.love@dl.ac.uk> + and David Megginson <dmeggins@uottawa.ca> for use with nsgmls. + (sgml-validate-command): changed default validate command to use + nsgmls. + +Sun Aug 11 19:21:56 1996 Lennart Staflin <lenst@lysator.liu.se> + + * iso88591.map: added code to character mappings. + +Thu Jun 13 20:43:53 1996 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-parse.el (sgml-get-and-move): use sgml-final, not + sgml-state-final-p. In this case the substate can be an AND-state. + +Tue May 21 07:39:34 1996 Lennart Staflin <lenst@lysator.liu.se> + + * Version 1.0a11 released. + +Mon May 20 23:14:02 1996 Lennart Staflin <lenst@lysator.liu.se> + + * psgml.el (psgml-version): bump version. + (sgml-build-custom-menus): fix button3 after easy-menu redefines + it. (this was actually done at an earlier date). + +Fri May 3 18:16:18 1996 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-parse.el (sgml-push-to-entity): remove binding + before/after change functions. This probably made them nil in the + main buffer. + +Fri Apr 5 14:37:47 1996 Karl Eichwalder <ke@ke.Central.DE> + + * psgml.texi, psgml-api.texi: Add INFO-DIR-ENTRY. + + * aclocal.m4, configure.in, Makefile.in: New. + * INSTALL, install-sh, mkinstalldirs: Add from autoconf-2.9 + package. + +Fri Apr 5 09:47:01 1996 Lennart Staflin <lenst@lysator.liu.se> + + * Version 1.0a10 released. + +Thu Mar 21 22:14:43 1996 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-parse.el (sgml-cache-catalog): use file-truename on file + to be cached. + +Wed Mar 20 20:59:35 1996 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-info.el (sgml-eltype-refrenced-elements): allow for + exceptions. + +Tue Mar 19 21:59:27 1996 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-api.el (sgml-map-content): use max from main buffer when + setting parser goal. (fix bug 75). + +Sun Mar 17 15:06:26 1996 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-edit.el (sgml-list-valid-tags): Show current + shortreference map name. + + * psgml-parse.el (sgml-lookup-shortref-name): new func. + + * psgml-edit.el (sgml-what-element): display 'shortref' if cursor + over beginning of a shortref + + * psgml-parse.el (sgml-is-goal-after-start): handle stag in entity + differently from stag in buffer. + +Tue Mar 12 21:22:52 1996 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-parse.el: removed use of & in functions and variable + names. + + * psgml-dtd.el (sgml-remove-redundant-states-1): remove unused + variable res. + + * psgml.el (sgml-parse-colon-path): remove unused variable cd-prefix + +Sun Feb 18 16:33:43 1996 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-parse.el (sgml-push-to-entity): set mc-flag to nil so that + MULE does not mangle binary data. (reported by Jeffrey Friedl + <jfriedl@nff.ncl.omron.co.jp>) + +Mon Jan 22 22:57:54 1996 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-edit.el (sgml-down-element): make sure sgml-last-element + has a reasonable value even if there is an error + +Sat Jan 6 22:07:44 1996 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-parse.el (sgml-parse-nametoken): change buffer-substring + to buffer-substring-no-properties + +Sun Nov 5 13:41:36 1995 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-dtd.el (sgml-parse-attribute-definition): remove + unnecessary call to sgml-general-case. + (sgml-check-nametoken-group): added a revers to get name tokens in + same order as declared. + +Sat Nov 4 12:58:56 1995 Lennart Staflin <lenst@lysator.liu.se> + + * psgml.el (sgml-validate-error-regexps): added new regexp for + nsgmls (from David M). + + * psgml-edit.el (sgml-insert-attributes): call auto-fill-function + after. + + * psgml.el (sgml-default-validate-command): add %v for + sgml-declaration variable + +Sat Aug 26 13:57:07 1995 Lennart Staflin <lenst@lysator.liu.se> + + * fs.el (fs-para): fix typo (bug 61). + + * psgml-edit.el (sgml-custom-dtd): new arglist to + sgml-doctype-insert. + + * psgml-api.el (sgml-map-content): don't take hook-variables as + parameters. Move data parsing to separate function. (bug 59) + +Wed Aug 23 20:53:50 1995 Lennart Staflin <lenst@lysator.liu.se> + + * Version 1.0 a8 released. + + * psgml-edit.el (sgml-expand-shortref-to-text): use + sgml-rs-ignore-pos. + (sgml-expand-shortref-to-entity): dito. + + * psgml-other.el (sgml-build-custom-menus): make menu entry call + sgml-insert-markup. + + * psgml.el (sgml-doctype): typo. + + * psgml-parse.el (sgml-rs-ignore-pos): Replaces + sgml-last-start-pos, now buffer local. (bug 49) + (sgml-push-to-entity): set sgml-rs-ignore-pos to start of entity + reference. (bug 49) + + * psgml-edit.el (sgml-doctype-insert): Remove &rest (bug 56). + + * psgml-lucid.el (sgml-build-custom-menus): Fix (bug 56). + + * psgml-other.el (sgml-build-custom-menus): Fix (bug 56). + + * psgml-edit.el (sgml-edit-attrib-specification-list): Use the + attlist for attribute names, not the name parsed from the + buffer. This fixes problems with attached text properties. + (fixes bug 53). + +Tue Aug 22 20:56:06 1995 Lennart Staflin <lenst@lysator.liu.se> + + * Version 1.0a7 released + + * psgml.el (psgml-version): bump version + +Mon Aug 21 23:38:49 1995 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-parse.el (sgml-extid-sysid): handle old style extids. + (sgml-check-entities): log message on missmatch + +Wed Aug 16 22:54:42 1995 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-parse.el + (sgml-make-extid): optional argument dir added. New representation + for external identifiers. + (sgml-extid-dir): New attr of extid + (sgml-extid-expand): new fun. + (sgml-path-lookup): use sgml-extid-expand + (sgml-lookup-sysid-as-file): take extid as argument instead of sysid, + use sgml-extid-expand + (sgml-parse-external): don't expand sysid + + +Thu Aug 10 22:33:50 1995 Lennart Staflin <lenst@lysator.liu.se> + + * psgml.el (sgml-default-validate-command): new function. + (sgml-validate): use new func. + (sgml-validate-command): new possible value: a list of templates + to try. + +Mon Jul 31 22:34:10 1995 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-parse.el (sgml-entity-insert-text): mark entities not + found. + (sgml-entity-marked-undefined-p): new func. + (sgml-push-to-entity): set default-directory to that of external + entities file. + (sgml-parse-external): expand sysid as file name + + * psgml-info.el (sgml-display-table): add nosort option. + (sgml-general-dtd-info): more info. including undef entities. + +Sun Jul 30 22:23:15 1995 Lennart Staflin <lenst@lysator.liu.se> + + * test/son2.sgml: check that inclusions are inherited from the doc + element. + + * test/doc.dtd: adding ix element as inclusion in doc. + +Wed Jul 26 22:07:16 1995 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-parse.el (sgml-parse-catalog-buffer): recoded. Now all + entries are on the format (type name file) and name might be nil + for "noname" entries. + (sgml-catalog-lookup): changed to handle new internal catalog + format. + +Mon Jul 24 00:07:02 1995 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-parse.el (sgml-parse-catalog-buffer): Handle full catalog + format. + (sgml-catalog-lookup): Handle new catalog format including + parameter entities. + (sgml-search-catalog): new function, can be used to look up + SGMLDECL etc.. + + * psgml.el (sgml-system-identifiers-are-preferred): new option. + +Sun Jul 23 20:56:00 1995 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-other.el (sgml-popup-multi-menu): kludge to force + x-popup-menu to be two level. + + * psgml-parse.el (sgml-do-data): move start after data consumed. + +Mon May 1 20:57:29 1995 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-edit.el (sgml-normalize-content): fixing arithmetic error + + * psgml-parse.el (sgml-make-shortmap): add missing = to skip strings + +Sun Apr 23 23:01:35 1995 Lennart Staflin <lenst@lysator.liu.se> + + * Id 46: turns on autofill, fixed. + + * psgml-parse.el (sgml-auto-fill-inhibit-function): new variable + (do-auto-fill): advise do-auto-fill to honour above variable + (sgml-need-dtd): set sgml-auto-fill-inhibit-function, and don't + set auto-fill-function. + (sgml-safe-context-of): new fun + (sgml-safe-element-at): new fun + (sgml-in-prolog-p): new fun + +Mon Apr 10 21:26:30 1995 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-dtd.el (sgml-write-dtd): set file-type for oemacs. + +Tue Mar 28 19:01:53 1995 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-parse.el (sgml-try-merge-compiled-dtd): entd should be + ents. + + +Mon Mar 27 18:31:26 1995 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-parse.el (sgml-bdtd-load): var. renamed. + (sgml-eltypes-in-state): fix som inconsitencies with + token/eltype/symbol. + (sgml-list-implications): fix bug handling empty elements. + + * psgml.el (sgml-recompile-out-of-date-cdtd): renamed from + sgml-ignore-out-of-date-cdtd. + +Sun Mar 26 16:25:10 1995 Lennart Staflin <lenst@lysator.liu.se> + + * Id 34: CATALOG searching priorities, fixed. + + * psgml-parse.el (sgml-catalog-lookup): + Giv PUBLIC entries priority over ENTITY and DOCTYPE + + * Id 35: Entity manager handling of system id, fixed. + + * psgml-parse.el (sgml-lookup-sysid-as-file): new func. + (sgml-external-file): call new func. + + * Id 41: selecting from a popup menu should not be an error + Installing patch from Tim Bradshaw <tfb@edinburgh.ac.uk>, + Also fixing consequences. + Also making new menu function sgml-popup-multi-menu, + which uses call-back style. Nicer attributes menu. + + * psgml-other.el (sgml-set-face-for): Use sgml-type instead of + type for overlay property. + + * psgml-edit.el (sgml-attrib-menu): Make all attributes into one + list with submenues for every attribute. + +Thu Mar 23 20:23:26 1995 Lennart Staflin <lenst@lysator.liu.se> + + * psgml.el (sgml-mode): append to post-command-hook, this makes + psgml work better with auto-show. + + * psgml-parse.el (sgml-throw-on-error): new var. + (sgml-error): Throw if sgml-throw-on-error is set. + (sgml-push-to-entity): remove fifth arg to insert-file-contents + + * psgml-edit.el: (sgml-indent-line) + Make sgml-indent-line better behaved. + 1. Don't tab outside document element. + 2. Ignore parse errors. + + +Sun Mar 19 16:46:45 1995 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-parse.el (sgml-bdtd-load): if sgml-ignore-out-of-date-cdtd + is ask, ask before recompiling. + +Thu Mar 2 19:08:59 1995 Lennart Staflin <lenst@lysator.liu.se> + + * Id 38: auto-fill breaks pubid, fixed + + * psgml-parse.el (sgml-do-auto-fill): new function, won't + auto-fill outside document element + (sgml-need-dtd): set auto-fill-function. + +Wed Feb 22 22:51:30 1995 Lennart Staflin <lenst@lysator.liu.se> + + * Id 37: sgml-kill-element with cursor inside tag + fixed. + + * psgml-edit.el (sgml-kill-element): signal error if point is + inside markup + +Sat Jan 28 14:35:01 1995 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-edit.el (sgml-insert-element): Leave point at the end of + the element. + + * psgml.texi: Patch from Kevin R + +Mon Jan 23 19:29:33 1995 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-edit.el (sgml-tag-regexp): make it handle unclosed tags + and net tags. + + * psgml-parse.el (struct sgml-tree): new field asl, constuctor + changed. + (sgml-open-element): pass asl to sgml-make-tree + (sgml-element-attribute-specification-list): use sgml-tree-asl. + +Sat Jan 14 16:27:46 1995 Lennart Staflin <lenst@lysator.liu.se> + + * psgml.el (sgml-mode-abbrev-table): new var. From patch by Karl + Eichwalder. + (sgml-validate-command): fixed doc. (Kevin Rodgers) + +Thu Jan 12 16:57:05 1995 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-other.el (sgml-set-face-for): installed patch from Kevin + + * psgml-parse.el (sgml-do-end-tag): move call to sgml-set-markup-type + +Sun Dec 11 16:38:29 1994 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-edit.el (sgml-do-set-option): take care of + read-from-string. + + * psgml.el (psgml-version): bump + (sgml-ignore-out-of-date-cdtd): new option + + * psgml-parse.el (sgml-bdtd-load): make up to date test optional. + +Fri Dec 9 22:02:13 1994 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-other.el: Add ranges to multipart menus. + + * psgml-edit.el (sgml-normalize-start-tag): Don't recreate + NET-start tags. + +Sun Dec 4 01:23:46 1994 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-edit.el (sgml-expand-shortref-to-text): update sgml-goal + (sgml-expand-shortref-to-entity): dito + +Tue Nov 29 13:13:13 1994 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-dtd.el (sgml-before-eltype-modification): obsolete? + + * psgml-parse.el: Major changes to handling of compiled dtds + +Fri Nov 25 23:01:46 1994 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-edit.el (sgml-entities-menu): sort entities menu + +Thu Nov 17 20:45:02 1994 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-parse.el (sgml-path-lookup): set cand not res. + +Sat Nov 12 08:09:13 1994 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-dtd.el (sgml-code-dtd): map over all eltypes, not only + defined, when outputing the names + +Thu Nov 3 06:47:17 1994 Lennart Staflin <lenst@lysator.liu.se> + + * Patch from Norman Walsh + + * psgml-parse.el (sgml-do-entity-ref): check + sgml-warn-about-undefined-entities. + + * psgml.el (sgml-warn-about-undefined-entities): new var. + +Mon Oct 31 20:10:58 1994 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-parse.el (sgml-try-merge-compiled-dtd): Immediately exit + entity check loop if discrepancy found. + +Sun Oct 30 17:02:09 1994 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-parse.el (sgml-copy-eltypes): remove + + * psgml.el ((fboundp 'run-hook-with-args)): conditionally define + + * psgml-edit.el (sgml-list-valid-tags): don't show shortmap. + + * psgml-dtd.el (sgml-before-eltype-modification): use + sgml-merge-eltypes instead of sgml-copy-eltypes. + (sgml-do-usemap-element): call sgml-before-eltype-modification. + + * psgml-parse.el (sgml-merge-eltypes): don't overwrite values in + old eltypes. + +Sat Oct 29 00:15:41 1994 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-parse.el (sgml-setup-doctype): new func. + + +Thu Oct 27 01:51:37 1994 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-parse.el (sgml-show-warnings): instead of suppress + warnings, defualt nil. Set to t by next trouble spot. Warnings + also shown when parsing dtd. + (sgml-parse-external): moved + (sgml-do-doctype): include the code that sgml-check-doctype-body + did have + (sgml-make-primitive-content-token): moved + +Wed Oct 26 23:23:26 1994 Lennart Staflin <lenst@lysator.liu.se> + + * psgml.el (psgml-version): bump version + (sgml-ignore-undefined-elements): new option + + * psgml-parse.el (sgml-eltype-all-miscdata): replace the function + sgml-eltype-all-appdata. + (sgml-eltype-set-all-miscdata): new func. + +Tue Oct 25 01:26:03 1994 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-dtd.el (sgml-declare-entity): handle #DEFAULT + + * psgml-parse.el (sgml-lookup-entity): support default entity + (sgml-entity-declare): dito + (sgml-merge-entity-tables): dito + +Sat Oct 22 01:24:50 1994 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-parse.el (sgml-read-dtd): Decode current buffer. + +Fri Oct 14 00:41:19 1994 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-dtd.el (sgml-code-dtd): take dtd as argument + (sgml-save-dtd): take optional dtd + + * Id 27: insert-element looping + Test if inside markup when producing menus and completion tables. + +Wed Sep 28 08:10:19 1994 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-parse.el (sgml-set-parse-state): Use smgl-goto-epos + (sgml-push-to-entity): reuse buffers always + (sgml-close-element): don't promote position of tag + + * psgml-dtd.el (sgml-parse-external): remove use of sgml-gname-symbol + (sgml-check-declared-value): "- + (sgml-check-default-value): "- + +Tue Sep 27 20:11:57 1994 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-parse.el (sgml-open-element): take attribute specification + list as argument. Call hook sgml-open-element-hook. + (sgml-data-function): new var + (sgml-pi-function): new var + remove sgml-{g,e}name-symbol + (sgml-skip-cdata): rename to sgml-do-data + +Mon Sep 26 09:44:35 1994 Lennart Staflin <lenst@lysator.liu.se> + + * Version 1.0 a3 + +Sun Sep 25 16:12:06 1994 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-parse.el: move sgml-set-markup-type + + * psgml-edit.el (sgml-do-set-option): add event argument + + * Id 1: C-c C-d may hang + psgml-edit.el (sgml-next-data-field): check if at end of buffer + + * psgml-edit.el (sgml-normalize-start-tag): can`t use + sgml-change-start-tag becuse trimming may have moved cursor to + some other place if the tag is implied. + + +Sun Sep 25 14:54:19 1994 Lennart Staflin (lenst@lysita) + + * psgml-lucid.el: Implement changes in psgml-other. + * Id 24: Lucid menubar problems, see above. + +Sun Sep 25 10:17:25 1994 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-other.el (sgml-popup-menu): new func. + (sgml-max-menu-size): move here + + * psgml.el: split sgml-user-options into sgml-file-options and + sgml-user-options. Fix some properties and buffer local status. + (sgml-valid-option): new func. + (sgml-save-options): save all file options that are valid. + + * psgml-edit.el: options menu split into file and user options, + sgml-split-menu move to emacs specific files (psgml-other, + psgml-lucid). The emacs specific provides a sgml-popup-menu. + + * psgml.el (sgml-live-element-indicator): remove buffer localness + + * psgml-parse.el (sgml-parse-catalog-buffer): use sgml-parse-name + for doctype. + +Fri Sep 23 00:19:18 1994 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-dtd.el (sgml-reduce-|): inline sgml-make-alt + + * psgml-parse.el (sgml-add-move-to-set): make into macro + (sgml-state-final-p): make into macro + + * psgml-dtd.el (sgml-make-primitive-content-token): make defsubst + + * psgml-parse.el (sgml-parse-name): remove defsubst + (sgml-parse-name): add compiler macro + + * psgml-dtd.el (sgml-remove-redundant-states-1): new optimizer + (sgml-make-*): use it + (sgml-make-+): use it + (sgml-make-conc): use it + + * psgml-parse.el (sgml-parse-ds): make defsubst + (sgml-parse-parameter-entity-ref): make defsubst + (sgml-do-parameter-entity-ref): new sub for above + (sgml-eltype-token): def compiler macro + (sgml-token-eltype): def compiler macro + + * psgml-dtd.el (sgml-parse-connector): make defsubst + (sgml-make-opt): nconc instead of append + + * psgml-parse.el (sgml-parser-loop): check for end tag before + skipping cdata + (sgml-skip-ps): make defsubst + + * psgml-dtd.el (sgml-parse-prolog): add cleanup entities + + * psgml-parse.el (sgml-parser-loop): move parsing of end-tag to + after shortref + + * psgml.el (sgml-debug): use sgml-log-message + + * psgml-parse.el (sgml-deref-shortmap): respect the nobol argument + (sgml-last-start-pos): New variable + (sgml-push-to-entity): set sgml-last-start-pos to buffer start if + entering an internal entity + (sgml-pop-entity): set sgml-last-start-pos + (sgml-parse-to): set sgml-last-start-pos + (sgml-parser-loop): call deref map with disabling of &#RS if point + is equal to sgml-last-start-pos + +Thu Sep 22 01:03:56 1994 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-parse.el (sgml-cleanup-entities): clean up buffers used by + sgml-push-to-entity if some looping code has left a lot of buffers. + (sgml-need-dtd): call sgml-cleanup-entities + (sgml-push-to-entity): check that the sgml-cleanup-entities works, + cludge to make sure shortref maps don't find record-start in the + beginning of internal entities. This cludge breaks the epos + promotion code. + (sgml-set-parse-state): when setting parse state to start of a + element goto epos-end (not start+len). + +Sun Sep 18 05:49:17 1994 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-parse.el + (sgml-parse-parameter-entity-ref): call sgml-push-to-entity with + optional argument 'param. + (sgml-push-to-entity): take new optional argument and pass it to + sgml-entity-insert-text. + (sgml-entity-insert-text): take extra type argument. + ci 2.8 + (sgml-eltype-mixed): add comp.macro + (sgml-parse-name): make defsubst + +Thu Sep 15 02:06:22 1994 Lennart Staflin (lenst@lysita) + + * psgml-parse.el (sgml-current-entity-map): add default-directory + (sgml-set-global): set default-directory in + sgml-current-entity-map + (sgml-check-name): fix bug in compiler-macro + (sgml-insert-external-entity): don't accepty directories as result + (sgml-push-to-entity): copy default-directory to new buffer + + * psgml.el (sgml-catalog-files): new default value + +Wed Sep 14 04:36:29 1994 Lennart Staflin (lenst@lysita) + + * psgml-parse.el (sgml-dtd): make type an untyped vector + +Tue Sep 13 06:35:43 1994 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-parse.el (sgml-check-name): add comp-mac + (sgml-final): make defsubst + (sgml-final&): sub for above + (sgml-parse-pcdata): make defsubst + (sgml-eltype-name): add comp-mac + +Mon Sep 12 05:11:38 1994 Lennart Staflin (lenst@lysita) + + * psgml-parse.el (sgml-parse-processing-instruction): make defsubst + (sgml-do-processing-instruction): broken out from above + +Mon Sep 12 01:36:46 1994 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-parse.el (sgml-parse-general-entity-ref): make defsubst + (sgml-do-general-entity-ref): broken out from above + (sgml-set-markup-type): make defsubst + +Sun Sep 11 21:49:14 1994 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-parse.el (sgml-is-enabled-net): make defsubst + (sgml-parse-s): make defsubst + (sgml-element-mixed): add a compiler macro + +Sun Sep 11 00:00:45 1994 Lennart Staflin (lenst@lysita) + + * psgml-lucid.el: Install patch + From: Tim Bradshaw <tfb@edinburgh.ac.uk> + in 4.0b2 with lemacs 19.10 and up I don't think you want to add + the SGML menus before the "Help" menu since then they come out at + the right hand of the menubar. Attached patch to psgml-lucid does + the trick. + + +Thu Sep 8 23:38:20 1994 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-dtd.el (sgml-check-content): ANY also mixed + + +Thu Sep 8 22:35:19 1994 Lennart Staflin (lenst@lysita) + + * psgml-parse.el (sgml-make-shortmap): Only warning for strange + short ref delimiter + + * psgml-dtd.el (sgml-dtd-shortmaps): New variable + (sgml-declare-shortref): add mapping to variable + (sgml-check-doctype-body): add shortref maps from variable to dtd + struct + + * psgml-edit.el (sgml-custom-dtd): new command + (sgml-custom-markup): new command + +Thu Sep 8 01:17:59 1994 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-edit.el (sgml-normalize): expand short references also + +Wed Sep 7 20:56:41 1994 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-parse.el (sgml-reparse-buffer): New function. + + * nefarious.el (sgml-map-element-types): Update for 1.0 + + +Sun Sep 4 17:09:27 1994 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-edit.el (sgml-untag-element): require tags to be in the + buffer + + * psgml-parse.el (sgml-update-display): parse to point-max after + parse to window-end + + * psgml.el (sgml-validate-command): change to use format string + (sgml-validate): use format + + * psgml-edit.el (sgml-operate-on-tags): give tags uniq numbers as + invisible property + +Sun Sep 4 10:21:54 1994 Lennart Staflin (lenst@lysita) + + * psgml-dtd.el (sgml-check-element-type): Fix problem with ranked + groups + + +Sun Sep 4 00:10:50 1994 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-edit.el (sgml-indent-line): use sgml-find-context-of at + end of buffer. + +Sun Sep 3 23:00:00 1994 Lennart Staflin <lenst@lysator.liu.se> + + * Version 0.4b2 + +Fri Sep 2 19:48:41 1994 Lennart Staflin (lenst@lysita) + + * psgml.el (sgml-local-catalogs): new variable + + * psgml-parse.el: Implement local serach maps for entities + + +Tue Aug 30 17:28:42 1994 Lennart Staflin (lenst@lysita) + + * psgml-parse.el: Introduce sgml-current-omittag and + sgml-current-shorttag that holds golbal copies of sgml-omittag and + sgml-shorttag. Change variable references where apropriate + + * psgml-edit.el (sgml-next-trouble-spot): ignore warnings before + point + (sgml-expand-entity-reference): New command + +Mon Aug 29 07:44:48 1994 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-parse.el (sgml-parser-loop): Take argument: a function + that should return t if the loop should be prematurely exited + (sgml-parse-to): take optional argument to pass to sgml-parser-loop + + * psgml.el (sgml-command-post): function called from + post-command-hook. Activates DTD is `sgml-auto-activate-dtd' is + set and call `sgml-update-display' in psgml-parse if there is an + active DTD. + (sgml-auto-activate-dtd): New variable. + + * psgml-parse.el (sgml-update-display): instead of + sgml-set-live-indicator + + * psgml-dtd.el (sgml-parse-character-reference): only parse + function character refrences if optional argument is true + +Sat Aug 27 10:53:54 1994 Lennart Staflin (lenst@lysita) + + * psgml-parse.el: Implement short references + +Fri Aug 26 02:47:35 1994 Lennart Staflin <lenst@lysator.liu.se> + + * psgml-edit.el (sgml-operate-on-tags): only set inivisible + property (and rear-nonsticky) + + * psgml-parse.el (sgml-parse-to): remove sgml-hide manipulation + +Fri Aug 26 00:02:30 1994 Lennart Staflin (lenst@lysita) + + * psgml-parse.el (sgml-set-live-element-indicator): don't let + point be inside an invisible region. + +Thu Aug 25 04:35:33 1994 Lennart Staflin (lenst@konrad) + + * psgml-edit.el (sgml-operate-on-tags): use category sgml-hide + instead of invisible+read-only. + + * psgml-parse.el (sgml-parse-to): temporary set sgml-hide's + property intangible to nil when parsing. + + * psgml.el (sgml-max-menu-size): set as 2/3 of frame-height + (psgml-version): bump version + + * psgml-parse.el (sgml-do-pcdata): set markup type nil, to delete + any overlays left from previous parse. + + * psgml-other.el (sgml-mode-map): change Fold to View + (sgml-set-face-after-change): disable + + * Version 1a1 + +Wed Aug 24 20:29:37 1994 Lennart Staflin (lenst@dell) + + * psgml-edit.el: changing append to nconc + + * psgml-parse.el: changing append to nconc + +Wed Aug 24 07:06:39 1994 Lennart Staflin (lenst@lysita) + + * psgml-parse.el (sgml-set-live-element-indicator): parse to + window-end after sit-for to set faces. + + * psgml.el (sgml-exposed-tags): new variable. + + * psgml-edit.el (sgml-operate-on-tags): install patch + From: kevinr@airedale (Kevin Rodgers) + (sgml-operate-on-tags): installed another patch from above. Added + variable sgml-exposed-tags. + +Tue Aug 23 02:32:45 1994 Lennart Staflin (lenst@lysita) + + * psgml-parse.el (sgml-load-dtd): install patch + date: 1994/08/19 18:30:03; author: kevinr; state: Exp; + lines: +3 -3 sgml-load-dtd, sgml-external-file: Use + `expand-file-name' instead of `concat'. + + * psgml-dtd.el (sgml-make-pcdata): change sgml-make-opt to + sgml-make-* + +Mon Aug 22 21:30:04 1994 Lennart Staflin (lenst@lysita) + + * psgml-edit.el: split psgml-parse into psgml-parse and psgml-edit + +Sat Aug 20 02:10:32 1994 Lennart Staflin (lenst@lysita) + + * psgml.texi (Attributes): add C-c C-d in attribute edit mode. + +Sat Aug 13 00:59:17 1994 Lennart Staflin (lenst@lysita) + + * psgml.el (sgml-mode): add some documentation. + +Mon Jul 19 1994 00:33:28 Kevin Rodgers <kevinr@ihs.com> + + * psgml-parse.el (sgml-close-element-hook): Define. + (sgml-close-element): Invoke `sgml-close-element-hook' after + `(sgml-tree-end sgml-current-tree)' and `(sgml-tree-etag-len + sgml-current-tree)' have been set. + +Fri Aug 12 21:19:52 1994 Lennart Staflin (lenst@lysita) + + * psgml-parse.el (sgml-pub-expand-char): remove test -- expand any + character. + + * experiment.el (sgml-pub-expand-char): remove test -- expand any + character. + +Thu Aug 11 20:13:44 1994 Lennart Staflin (lenst@lysita) + + * psgml-parse.el (sgml-push-to-param): move call to + sgml-external-file to before set-buffer. Simplify testing. + +Tue Jul 12 1994 21:39:20 Kevin Rodgers <kevinr@ihs.com> + + * psgml-parse.el (sgml-map-public): Accept an additional + optional argument, NAME, and map `n' to it if it's not nil. + (sgml-external-file): Pass the optional argument NAME to + `sgml-map-public'. + (sgml-pub-expand-char): Recognize `n' as well as `c', `o', and + `d' (and their upper-case variants). + +Wed Jul 6 21:17:41 1994 Lennart Staflin (lenst@konrad) + + * psgml-parse.el (sgml-next-data-field): stop any where but avoid + current element (previously only stopped at the beginning of an + element)
--- a/lisp/psgml/README.psgml Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/psgml/README.psgml Mon Aug 13 08:46:35 2007 +0200 @@ -1,7 +1,7 @@ -This is the READ ME file for psgml.el version 1a9. -*- text -*- +This is the READ ME file for psgml.el version 1a12. -*- text -*- PSGML is a major mode for editing SGML documents. It works with -GNU Emacs 19.19 and later or with Lucid Emacs 19.9. +GNU Emacs 19.19 and later or with XEmacs 19.13. This distribution should contain the following source files: psgml.el @@ -17,42 +17,86 @@ psgml-api.texi -- internals documentation psgml-api.el -- Extra functions for the API fs.el -- Example use of psgml to format a SGML file - style.el -- example style file for fs.el + style.fs -- example style file for fs.el catalog.sgml -- example SGML-file for fs.el and style.el iso88591.map + Makefile.in In addition the distribution contains the formatted versions of the documentation files (psgml.info, ...). But the compiled elisp code is no longer supplied. You will have to byte compile the files before -PSGML will achive usable speed. +PSGML will achieve usable speed. -If you are not using Lucid Emacs or XEmacs you should compile: - psgml.el - psgml-other.el - psgml-edit.el - psgml-parse.el - psgml-dtd.el - psgml-info.el - psgml-charent.el +PSGML now comes with autoconf support. See INSTALL for generic +instructions. Run + + sh configure + make -If you on the other hand are using Lucid Emacs or XEmacs you should -compile - psgml.el - psgml-lucid.el - psgml-edit.el - psgml-parse.el - psgml-dtd.el - psgml-info.el - psgml-charent.el +and possibly + + make install -Additionally the following can be compiled, they are not normaly used -by PSGML: - psgml-api.el -- Extra functions for the API - fs.el -- Example use of psgml to format a SGML file - psgml-debug.el -- some functions used in development +If you are using xemacs, you can run give the argument `--with-xemacs' +to configure, or use `make xemacs'. + +Instead of using configure you can load the psgml-main.el file and run +the command psgml-compile-files. Then you have to set load-path or +move the .elc files. Send bug reports, comments and suggestions to lenst@lysator.liu.se. +New in version 1.0a12 + +See ChangeLog... + + +New in version 1.0a11 + +* Autoconf support + +Tanks to Karl Eichwalder. + +* Bugs fixed + +** after-change-function lost if text entity referenced + +** Mouse button 3, has wrong binding in XEmacs. + + +New in version 1.0a10 + +* Changed how fontification is done + +First the current line is parsed and fontified. If this would mean +parsing more than 500 chars, wait 1 second first. + +Wait 6 seconds and then fontify rest of buffer. + +These waits and the parsing can be interrupted by any input event. + +This seems to work well with Emacs 19.29 and XEmacs 19.13 on Linux. + +* XEmacs menus made with easy-menu + +Now there is only one set of menu for both Emacs and XEmacs. + +* Tracing catalog lookup + +To help debug entity lookup there is a new option +`sgml-trace-entity-lookup'. If this option is t messages will be +logged in *SGML LOG* buffer when external entities are looked up. +These messages shows entity, catalogs searched, and entry type in +catalog where entity was found. + + + +* Renamed default style sheet for fs.el + +The default style sheet used by fs.el, style sheet formatter example +is now "style.fs". + + New in version 1.0a9 * XEmacs may have problem if sgml-set-face is t @@ -60,7 +104,7 @@ I tried with the latest version on a sun4 Solaris 2 machine and PSGML would always parse to the end of the buffer even if I typed something. There seem to be a problem with the input-pending-p function. I don't -know if this is specific fo Solaris. Emacs on Solaris has problems +know if this is specific for Solaris. Emacs on Solaris has problems with signal handling. @@ -72,11 +116,11 @@ ** sgml-map-content: new optional argument. If the argument ENTITY-FUN is specified it should be a function with one argument. The function will be called for data entity references instead of the entity text -beeing passed to the DATA-FUN. The argument is the entity referenced. +being passed to the DATA-FUN. The argument is the entity referenced. Use `sgml-entity-name', `sgml-entity-type' etc. -Version 1.0a8 has only bugfixes. +Version 1.0a8 has only bug-fixes. New in version 1.0a7 @@ -88,8 +132,8 @@ ** New option: sgml-system-identifiers-are-preferred If nil PSGML will look up external entities by searching the catalogs in `sgml-local-catalogs' and `sgml-catalog-files' and only if the entity -is not found in will a given system identifer be used. If the variable -is non-nil and a system identifer is given, the system identifier will +is not found in will a given system identifier be used. If the variable +is non-nil and a system identifier is given, the system identifier will be used for the entity. If no system identifier is given the catalogs will searched. @@ -108,7 +152,7 @@ (parent-file context-element* top-element (has-seen-element*)?) -*** parent-file (string) is the name of the file contatining the +*** parent-file (string) is the name of the file containing the document entity. *** context-element (string) is used to set up exceptions and short @@ -150,7 +194,7 @@ psgml. Use (require 'psgml-api) to use the API functions (psgml-api includes the rest of the psgml files). -The new functions in psgml-api is two functions to travers the element +The new functions in psgml-api is two functions to traverse the element structure. *** (sgml-map-content element element-function data-function pi-function) @@ -189,7 +233,7 @@ it used to leave point at the beginning of the element. * sgml-hide-tags/attributes is better at handling minimized tags - + * New options ** sgml-validate-files and slight change of sgml-validate-command. ** sgml-recompile-out-of-date-cdtd @@ -197,8 +241,8 @@ * Now saving attribute specification list in parse tree Faster sgml-element-attval, but more memory used. -* Long menus that are split into submenus now show the range of -choices in the different submenus. +* Long menus that are split into sub-menus now show the range of +choices in the different sub-menus. The option `sgml-range-indicator-max-length' determines how many characters from the first and the last choice to show. @@ -273,7 +317,7 @@ * Compiled DTDs are now associated with external `Document Type -Declaration Subset' entitys. You will have to create a catalog with +Declaration Subset' entities. You will have to create a catalog with entries for all the DTDs that should be compiled. This should make it, in most cases, unnecessary to make saved dtds or to set the `sgml-default-dtd-file', at the expense of having to maintain the @@ -350,7 +394,7 @@ Now it should be possible to edit html files if you put them in sgml-mode. The file must either start with a proper DOCTYPE or with a -<html> tag. To be abel to start with empty files and to edit files +<html> tag. To be able to start with empty files and to edit files not starting with <html> you can create a html-mode that sets the default document type name: @@ -372,7 +416,7 @@ * Handling of tags for undefined elements ** Start-tags for undefined elements will either be ignored, if -`sgml-ignore-undefined-elements' is t, or assumed to be acceptabled in +`sgml-ignore-undefined-elements' is t, or assumed to be acceptable in the current element and defined with `O O ANY'. ** An end-tag for an element that is not currently open will be ignored. @@ -433,7 +477,7 @@ entities are expanded to the replacement text of the entity, other short references are expanded into general entity references. If argument, TO-ENTITY, is non-nil, or if called interactive with numeric -prefix argument, all short references are replaced by generaly entity +prefix argument, all short references are replaced by generally entity references. ** sgml-normalize: expand short references also @@ -466,13 +510,13 @@ transparent. * Local catalog files -Variabel `sgml-local-catalogs' +Variable `sgml-local-catalogs' A list of SGML entity catalogs to be searched first when parsing the buffer. -This is used in addtion to `sgml-catalog-files', and `sgml-public-map'. +This is used in addition to `sgml-catalog-files', and `sgml-public-map'. This variable is automatically local to the buffer. * New commands -Thanks to David Megginson the custom menus are now reacable from the +Thanks to David Megginson the custom menus are now reachable from the keyboard: ** C-c C-u C-d (sgml-custom-dtd) ** C-c C-u C-m (sgml-custom-markup) @@ -576,3 +620,9 @@ `sgml-exposed-tags' is local to each buffer in which it has been set; use `setq-default' to set it to a value that is shared among buffers. + + +Local variables: +mode: text +mode: outline +end:
--- a/lisp/psgml/catalog.sgml Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/psgml/catalog.sgml Mon Aug 13 08:46:35 2007 +0200 @@ -1,4 +1,3 @@ - <!doctype example [ <!element example - - (front, body) > <!element front - - (titlegrp) > @@ -8,52 +7,63 @@ <!element (title|subtitle|keyword|lit) - - (#PCDATA) > <!element list - - (item*) > <!element item - - (p*) > + +<!ENTITY soi "<keyword>storage object identifier</keyword>"> + ]> <example> -<front> -<titlegrp> -<title>Entity Management</title> -<subtitle>Excerpts from: SGML Open Technical Resolution 9401:1995</subtitle> -</titlegrp> -</front> -<body> -<p>An entry in the catalog is interpreted as follows:<list> -<item><p>The PUBLIC keyword indicates that an entity manager should use the -associated <keyword>storage object identifier</keyword> to locate the entity -text for an entity with the specified public identifier.</p></item> -<item><p>The ENTITY keyword indicates that an entity manager should use the -associated <keyword>storage object identifier</keyword> to locate the entity -text for an entity with the entity name specified by the <keyword>entity name + <front> + <titlegrp> + <title>Entity Management</title> + <subtitle>Excerpts from: SGML Open Technical Resolution +9401:1995</subtitle> + </titlegrp> + </front> + <body> + <p>An entry in the catalog is interpreted as follows:<list> + <item><p>The PUBLIC keyword indicates that an entity manager +should use the associated &soi; to locate the entity text for an +entity with the specified public identifier.</p></item> + <item><p>The ENTITY keyword indicates that an entity manager +should use the associated <keyword>storage object identifier</keyword> +to locate the entity text for an entity with the entity name specified +by the <keyword>entity name spec</keyword>.</p></item> + <item><p>The DOCTYPE keyword indicates that an entity manager +should use the associated &soi; to locate the entity text (to be used +as the external subset) for a doctype declaration whose document type +name is specified by the <keyword>entity name spec</keyword>.</p></item> -<item><p>The DOCTYPE keyword indicates that an entity manager should -use the associated <keyword>storage object identifier</keyword> to -locate the entity text (to be used as the external subset) for a -doctype declaration whose document type name is specified by the -<keyword>entity name spec</keyword>.</p></item> -<item><p>The LINKTYPE keyword indicates that an entity manager should use -the associated <keyword>storage object identifier</keyword> to locate the -entity text (to be used as the external subset) for a linktype declaration -whose link type name is specified by the <keyword>entity name spec</keyword>. + <item><p>The LINKTYPE keyword indicates that an entity manager +should use the associated &soi; to locate the entity text (to be used +as the external subset) for a linktype declaration whose link type +name is specified by the <keyword>entity name spec</keyword>. </p></item> -<item><p>The SGMLDECL keyword indicates that an entity manager should use -the associated <keyword>storage object identifier</keyword> to locate the -entity text to be used as the SGML declaration.</p></item> -<item><p>The DTDDECL keyword indicates that an entity manager should -use the associated <keyword>storage object identifier</keyword> to -locate the entity text to be used as the SGML declaration. Note that -the <keyword>public identifier </keyword> in a DTDDECL entry is meant -to match a public identifier given as part of the doctype declaration -to reference the external subset.</p></item> -<item><p>The DOCUMENT keyword indicates that an entity manager should use -the associated <keyword>storage object identifier</keyword> to locate the -entity in which parsing begins.</p></item> -</list></p> - <p> -For example, the following are possible -catalog entries that associate a public identifier with an s.o.i.:</p> + <item><p>The SGMLDECL keyword indicates that an entity manager +should use the associated &soi; to locate the entity text to be used +as the SGML declaration.</p></item> + <item><p>The DTDDECL keyword indicates that an entity manager +should use the associated &soi; to locate the entity text to be used +as the SGML declaration. Note that the <keyword>public +identifier</keyword> in a DTDDECL entry is meant to match a public +identifier given as part of the doctype declaration to reference the +external subset.</p></item> + <item><p>The DOCUMENT keyword indicates that an entity manager +should use the associated &soi; to locate the entity in which parsing +begins.</p></item> + </list></p> + <p>For example, the following are possible catalog entries that +associate a public identifier with an s.o.i.:</p> <lit>PUBLIC "ISO 8879-1986//ENTITIES Added Latin 1//EN" "iso-lat1.gml" -PUBLIC "-//USA/AAP//DTD BK-1//EN" "aapbook.dtd" -PUBLIC "-//ACME DTD Writers//DTD General Report//EN" "report.dtd"</lit> - </body> +PUBLIC "-//USA/AAP//DTD BK-1//EN" "aapbook.dtd" PUBLIC "-//ACME DTD +Writers//DTD General Report//EN" "report.dtd"</lit> + </body> </example> + + + +<!-- Keep this comment at the end of the file +Local variables: +sgml-exposed-tags:("title" "body") +End: +-->
--- a/lisp/psgml/iso-sgml.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/psgml/iso-sgml.el Mon Aug 13 08:46:35 2007 +0200 @@ -16,7 +16,7 @@ ;; Edit SGML or HTML buffers with ISO 8859-1 (Latin-1) display| ;; 10-May-1995|1.4|~/misc/iso-sgml.el.Z| -;; $Id: iso-sgml.el,v 1.1.1.1 1996/12/18 03:35:17 steve Exp $ +;; $Id: iso-sgml.el,v 1.1.1.2 1996/12/18 03:47:13 steve Exp $ ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -37,6 +37,8 @@ ;; Based on iso-cvt.el from Michael Gschwind <mike@vlsivie.tuwien.ac.at>, ;; iso-sgml.el transparently displays entity references in SGML or HTML ;; buffers as ISO 8859-1 (aka Latin-1) characters. +;; Modified for XEmacs 19.15 to include the proposed extensions to Latin-1 +;; by Steve Baur <steve@miranova.com> ;; SEE ALSO: ;; iso-cvt.el @@ -54,7 +56,7 @@ ;; Code: -(defconst isosgml-version "$Id: iso-sgml.el,v 1.1.1.1 1996/12/18 03:35:17 steve Exp $" +(defconst isosgml-version "$Id: iso-sgml.el,v 1.1.1.2 1996/12/18 03:47:13 steve Exp $" "iso-sgml RCS version number") (defvar isosgml-modes-list '(html-mode html-helper-mode sgml-mode) @@ -106,29 +108,61 @@ ("Ý\;" "Ý") ("á\;" "á") ("â\;" "â") + ("´\;" "´") ("æ\;" "æ") ("à\;" "à") ("å\;" "å") ("ã\;" "ã") + ("¦\;" "¦") ("ç\;" "ç") + ("¸\;" "¸") + ("¢\;" "¢") + ("©\;" "©") + ("¤\;" "¤") + ("°\;" "°") ("é\;" "é") ("ê\;" "ê") ("è\;" "è") ("ë\;" "ë") + ("½\;" "½") + ("¼\;" "¼") + ("¾\;" "¾") ("í\;" "í") ("î\;" "î") ("ì\;" "ì") + ("¡\;" "¡") + ("¿\;" "¿") ("ï\;" "ï") + ("«\;" "«") + ("¯\;" "¯") + ("µ\;" "µ") + ("·\;" "·") + (" \;" " ") + ("¬\;" "¬") ("ñ\;" "ñ") ("ó\;" "ó") ("ô\;" "ô") ("ò\;" "ò") + ("ª\;" "ª") + ("º\;" "º") ("ø\;" "ø") ("õ\;" "õ") + ("¶\;" "¶") + ("£\;" "£") + ("±\;" "±") + ("«\;" "»") + ("®\;" "®") + ("§\;" "§") + ("­\;" "") + ("¹\;" "¹") + ("²\;" "²") + ("²\;" "³") ("ú\;" "ú") ("û\;" "û") ("ù\;" "ù") + ("¨\;" "¨") ("ý\;" "ý") + ("¥\;" "¥") ("Ä\;" "Ä") ("ä\;" "ä") ("Ö\;" "Ö") @@ -194,8 +228,8 @@ ;; iso-sgml.el ends here ; $Log: iso-sgml.el,v $ -; Revision 1.1.1.1 1996/12/18 03:35:17 steve -; XEmacs 19.14 -- Release +; Revision 1.1.1.2 1996/12/18 03:47:13 steve +; XEmacs 19.15-b2 ; ; Revision 1.4 1995/05/10 06:19:41 lepied ; * protect code with unwind-protect to prevent errors
--- a/lisp/psgml/iso88591.map Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/psgml/iso88591.map Mon Aug 13 08:46:35 2007 +0200 @@ -1,3 +1,35 @@ +160 [nbsp ] +161 [iexcl ] +162 [cent ] +163 [pound ] +164 [curren] +165 [yen ] +166 [brvbar] +167 [sect ] +168 [uml ] +169 [copy ] +170 [ordf ] +171 [laquo ] +172 [not ] +173 [shy ] +174 [reg ] +175 [macr ] +176 [deg ] +177 [plusmn] +178 [sup2 ] +179 [sup3 ] +180 [acute ] +181 [micro ] +182 [para ] +183 [middot] +184 [cedil ] +185 [sup1 ] +186 [ordm ] +187 [raquo ] +188 [frac14] +189 [frac12] +190 [frac34] +191 [iquest] 192 [Agrave] 193 [Aacute] 194 [Acirc ] @@ -60,3 +92,65 @@ 253 [yacute] 254 [thorn ] 255 [yuml ] +192 À +193 Á +194 Â +195 Ã +196 Ä +197 Å +198 Æ +199 Ç +200 È +201 É +202 Ê +203 Ë +204 Ì +205 Í +206 Î +207 Ï +208 Ð +209 Ñ +210 Ò +211 Ó +212 Ô +213 Õ +214 Ö +216 Ø +217 Ù +218 Ú +219 Û +220 Ü +221 Ý +222 Þ +223 ß +224 à +225 á +226 â +227 ã +228 ä +229 å +230 æ +231 ç +232 è +233 é +234 ê +235 ë +236 ì +237 í +238 î +239 ï +240 ð +241 ñ +242 ò +243 ó +244 ô +245 õ +246 ö +248 ø +249 ù +250 ú +251 û +252 ü +253 ý +254 þ +255 ÿ
--- a/lisp/psgml/psgml-api.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/psgml/psgml-api.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,5 +1,5 @@ ;;; psgml-api.el --- Extra API functions for PSGML -;; $Id: psgml-api.el,v 1.1.1.1 1996/12/18 03:35:18 steve Exp $ +;; $Id: psgml-api.el,v 1.1.1.2 1996/12/18 03:47:13 steve Exp $ ;; Copyright (C) 1994 Lennart Staflin @@ -70,18 +70,20 @@ (sgml-pop-all-entities) (sgml-need-dtd) (sgml-element-end element) ; Make sure all content is parsed - (save-excursion - (sgml-set-parse-state element 'start) - (when (eobp) (sgml-pop-entity)) - (when (eolp) (forward-char 1)) - (sgml-parse-data (point-max) data-fun pi-fun entity-fun) - (let ((c (sgml-tree-content element))) - (while c - (sgml-pop-all-entities) - (funcall element-fun c) - (sgml-set-parse-state c 'after) - (sgml-parse-data (point-max) data-fun pi-fun entity-fun) - (setq c (sgml-tree-next c))))) + (let ((main-buffer-max (point-max))) + (save-excursion + (sgml-set-parse-state element 'start) + (when (eobp) (sgml-pop-entity)) + (when (eolp) (forward-char 1)) + (sgml-parse-data main-buffer-max data-fun pi-fun entity-fun) + (let ((c (sgml-tree-content element))) + (while c + (sgml-pop-all-entities) + (funcall element-fun c) + (sgml-set-parse-state c 'after) + (sgml-parse-data main-buffer-max data-fun pi-fun entity-fun) + (setq c (sgml-tree-next c))))) + ) (sgml-pop-all-entities)) (defun sgml-parse-data (sgml-goal sgml-data-function sgml-pi-function
--- a/lisp/psgml/psgml-charent.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/psgml/psgml-charent.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,6 +1,6 @@ ;;;; psgml-charent.el ;;; Last edited: Mon Nov 28 22:18:09 1994 by lenst@lysistrate (Lennart Staflin) -;;; $Id: psgml-charent.el,v 1.1.1.1 1996/12/18 03:35:18 steve Exp $ +;;; $Id: psgml-charent.el,v 1.1.1.2 1996/12/18 03:47:13 steve Exp $ ;; Copyright (C) 1994 Lennart Staflin @@ -31,12 +31,13 @@ ;;;; Code: (provide 'psgml-charent) +(require 'psgml-parse) ;;;; Variable declarations (defvar sgml-display-char-list-filename - (expand-file-name sgml-data-directory "iso88591.map") + "iso88591.map" "*Name of file holding relations between character codes and character names of displayable characters") @@ -114,7 +115,4 @@ - -(require 'psgml-parse) - ;;; psgml-charent.el ends here
--- a/lisp/psgml/psgml-debug.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/psgml/psgml-debug.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,6 +1,6 @@ ;;;;\filename dump.el -;;;\Last edited: Fri Nov 25 18:30:01 1994 by lenst@dell (Lennart Staflin) -;;;\RCS $Id: psgml-debug.el,v 1.1.1.1 1996/12/18 03:35:18 steve Exp $ +;;;\Last edited: Sun Mar 24 19:17:42 1996 by lenst@triton.lstaflin.pp.se (Lennart Staflin) +;;;\RCS $Id: psgml-debug.el,v 1.1.1.2 1996/12/18 03:47:13 steve Exp $ ;;;\author {Lennart Staflin} ;;;\maketitle @@ -9,13 +9,14 @@ (require 'psgml) (require 'psgml-parse) (require 'psgml-edit) -;;(require 'psgml-dtd) +(require 'psgml-dtd) (autoload 'sgml-translate-model "psgml-dtd" "" nil) ;;;; Debugging (define-key sgml-mode-map "\C-c," 'sgml-goto-cache) (define-key sgml-mode-map "\C-c\C-x" 'sgml-dump-tree) +(define-key sgml-mode-map "\C-c." 'sgml-shortref-identify) (defun sgml-this-element () (interactive) @@ -27,7 +28,7 @@ (setq sgml-dtd-info (sgml-pstate-dtd sgml-buffer-parse-state) sgml-top-tree (sgml-pstate-top-tree sgml-buffer-parse-state)) (sgml-find-start-point (point)) - (message "%s" (sgml-element-context-string sgml-top-tree))) + (message "%s" (sgml-dump-node sgml-current-tree))) (defun sgml-dump-tree (arg) (interactive "P") @@ -36,6 +37,27 @@ (with-output-to-temp-buffer "*Dump*" (sgml-dump-rec (sgml-pstate-top-tree sgml-buffer-parse-state)))) +(defun sgml-auto-dump () + (let ((standard-output (get-buffer-create "*Dump*")) + (cb (current-buffer))) + + (when sgml-buffer-parse-state + (unwind-protect + (progn (set-buffer standard-output) + (erase-buffer)) + (set-buffer cb)) + + (sgml-dump-rec (sgml-pstate-top-tree sgml-buffer-parse-state)) + + )) + ) + +(defun sgml-start-auto-dump () + (interactive) + (add-hook 'post-command-hook + (function sgml-auto-dump) + 'append)) + (defun sgml-comepos (epos) (if (sgml-strict-epos-p epos) (format "%s:%s" @@ -43,20 +65,41 @@ (sgml-epos-pos epos)) (format "%s" epos))) +(defun sgml-dump-node (u) + (format + "%s%s start:%s(%s) end:%s(%s) epos:%s/%s net:%s\n" + (make-string (sgml-tree-level u) ?. ) + (sgml-element-gi u) + (sgml-element-start u) (sgml-tree-stag-len u) + (if (sgml-tree-etag-epos u) (sgml-tree-end u)) (sgml-tree-etag-len u) + (sgml-comepos (sgml-tree-stag-epos u)) + (sgml-comepos (sgml-tree-etag-epos u)) + (sgml-tree-net-enabled u))) + (defun sgml-dump-rec (u) (while u - (princ - (format - "%s%s start:%s(%s) end:%s(%s) epos:%s/%s net:%s\n" - (make-string (sgml-tree-level u) ?. ) - (sgml-element-gi u) - (sgml-element-start u) (sgml-tree-stag-len u) - (if (sgml-tree-etag-epos u) (sgml-tree-end u)) (sgml-tree-etag-len u) - (sgml-comepos (sgml-tree-stag-epos u)) - (sgml-comepos (sgml-tree-etag-epos u)) - (sgml-tree-net-enabled u))) + (princ (sgml-dump-node u)) (sgml-dump-rec (sgml-tree-content u)) (setq u (sgml-tree-next u)))) + +(defun sgml-shortref-identify () + (interactive) + (sgml-find-context-of (point)) + (let* ((nobol (eq (point) sgml-rs-ignore-pos)) + (tem (sgml-deref-shortmap sgml-current-shortmap nobol))) + (message "%s (%s)" tem nobol))) + +(defun sgml-lookup-shortref-name (table map) + (car (rassq map (cdr table)))) + +(defun sgml-show-current-map () + (interactive) + (sgml-find-context-of (point)) + (let ((name (sgml-lookup-shortref-name + (sgml-dtd-shortmaps sgml-dtd-info) + sgml-current-shortmap))) + (message "Current map: %s" + (or name "#EMPTY")))) ;;;; For edebug @@ -65,12 +108,18 @@ ;;(put 'push 'edebug-form-hook '(form sexp)) ;;(put 'setf 'edebug-form-hook '(sexp form)) +(setq edebug-print-level 3 + edebug-print-length 5 + edebug-print-circle nil +) + (eval-when (load) - (def-edebug-spec sgml-with-parser-syntax (&rest form)) - (def-edebug-spec sgml-skip-upto (sexp)) - (def-edebug-spec sgml-check-delim (sexp &optional sexp)) - (def-edebug-spec sgml-parse-delim (sexp &optional sexp)) - (def-edebug-spec sgml-is-delim (sexp &optional sexp sexp sexp))) + (unless sgml-running-xemacs + (def-edebug-spec sgml-with-parser-syntax (&rest form)) + (def-edebug-spec sgml-skip-upto (sexp)) + (def-edebug-spec sgml-check-delim (sexp &optional sexp)) + (def-edebug-spec sgml-parse-delim (sexp &optional sexp)) + (def-edebug-spec sgml-is-delim (sexp &optional sexp sexp sexp)))) ;;;; dump @@ -93,7 +142,6 @@ (with-output-to-temp-buffer "*Element dump*" (sgml-dp-element (sgml-lookup-eltype el-name)))) - (defun sgml-dp-element (el) (cond ((sgml-eltype-defined el) @@ -129,11 +177,11 @@ (make-string indent ? ) i (sgml-untangel-moves (sgml-state-opts (car x))) (sgml-untangel-moves (sgml-state-reqs (car x)))))) - (t ; &node - (princ (format "%s%d: &node next=%d\n" + (t ; and-node + (princ (format "%s%d: and-node next=%d\n" (make-string indent ? ) i - (sgml-code-xlate (sgml-&node-next (car x))))) - (loop for m in (sgml-&node-dfas (car x)) + (sgml-code-xlate (sgml-and-node-next (car x))))) + (loop for m in (sgml-and-node-dfas (car x)) do (sgml-dp-model m (+ indent 2)))))))) (defun sgml-untangel-moves (moves) @@ -142,6 +190,29 @@ (sgml-code-xlate (sgml-move-dest m))))) +;;;; Dump state + +(defun sgml-dump-state () + (interactive) + (with-output-to-temp-buffer "*State dump*" + (sgml-dp-state sgml-current-state))) + +(defun sgml-dp-state (state &optional indent) + (or indent (setq indent 0)) + (cond + ((sgml-normal-state-p state) + (sgml-dp-model state indent)) + (t + (princ (format "%sand-state\n" (make-string indent ? ))) + (sgml-dp-state (sgml-and-state-substate state) (+ 2 indent)) + (princ (format "%s--next\n" (make-string indent ? ))) + (sgml-dp-state (sgml-and-state-next state) (+ 2 indent)) + (princ (format "%s--dfas\n" (make-string indent ? ))) + (loop for m in (sgml-and-state-dfas state) + do (sgml-dp-model m (+ indent 2)) + (princ (format "%s--\n" (make-string indent ? ))))))) + + ;;;; Build autoloads for all interactive functions in psgml-parse (defun sgml-build-autoloads () @@ -211,7 +282,7 @@ (defun profile-sgml (&optional file) (interactive) - (or file (setq file (expand-file-name "~/src/psgml/test/shortref.sgml"))) + (or file (setq file (expand-file-name "~/src/psgml/0/test/shortref.sgml"))) (find-file file) (sgml-need-dtd) (sgml-instrument-parser)
--- a/lisp/psgml/psgml-dtd.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/psgml/psgml-dtd.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,5 +1,5 @@ ;;;; psgml-dtd.el --- DTD parser for SGML-editing mode with parsing support -;; $Id: psgml-dtd.el,v 1.1.1.1 1996/12/18 03:35:19 steve Exp $ +;; $Id: psgml-dtd.el,v 1.1.1.2 1996/12/18 03:47:13 steve Exp $ ;; Copyright (C) 1994 Lennart Staflin @@ -84,7 +84,7 @@ (setq m (sgml-move-dest (car ms)) ms (cdr ms)) (unless (sgml-normal-state-p m) - (setq m (sgml-&node-next m))) + (setq m (sgml-and-node-next m))) (unless (memq m states) (nconc states (list m)))) (setq l (cdr l))) @@ -156,7 +156,6 @@ (no (list s)) (l (sgml-state-reqs s)) (nl (sgml-state-opts s)) - (res s) dest) (while (or l (setq l (prog1 nl (setq nl nil)))) (cond @@ -238,7 +237,7 @@ (car l)) (defun sgml-make-& (dfas) - (let ((&n (sgml-make-&node dfas (sgml-make-state))) + (let ((&n (sgml-make-and-node dfas (sgml-make-state))) (s (sgml-make-state)) (l dfas)) (while l ; For each si: @@ -759,7 +758,7 @@ (sgml-translate-moves (sgml-state-opts (caar p))) (sgml-translate-moves (sgml-state-reqs (caar p)))) (t - (sgml-translate-node (sgml-&node-next (caar p))))) + (sgml-translate-node (sgml-and-node-next (caar p))))) (setq p (cdr p))) sgml-translate-table)) @@ -832,8 +831,8 @@ (sgml-code-move x))) (t ; s is a &-node (insert 255) ; Tag &-node - (insert (sgml-code-xlate (sgml-&node-next s))) - (sgml-code-sequence (m (sgml-&node-dfas s)) + (insert (sgml-code-xlate (sgml-and-node-next s))) + (sgml-code-sequence (m (sgml-and-node-dfas s)) (sgml-code-model m))))))) (defun sgml-code-element (et)
--- a/lisp/psgml/psgml-edit.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/psgml/psgml-edit.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,5 +1,6 @@ ;;; psgml-edit.el --- Editing commands for SGML-mode with parsing support -;; $Id: psgml-edit.el,v 1.1.1.1 1996/12/18 03:35:19 steve Exp $ +;;-*-byte-compile-warnings:(free-vars unused-vars unresolved callargs redefine)-*- +;; $Id: psgml-edit.el,v 1.1.1.2 1996/12/18 03:47:14 steve Exp $ ;; Copyright (C) 1994, 1995, 1996 Lennart Staflin @@ -30,6 +31,7 @@ (provide 'psgml-edit) (require 'psgml) (require 'psgml-parse) +(require 'tempo) ;;;; Variables @@ -105,6 +107,8 @@ (interactive) (let ((to (sgml-find-element-after (point) (sgml-last-element)))) + (when (sgml-strict-epos-p (sgml-element-stag-epos to)) + (error "Sub-element in other entity")) (goto-char (sgml-element-stag-end to)) (sgml-set-last-element (if (sgml-element-empty to) (sgml-element-parent to) @@ -169,10 +173,10 @@ (unless (sgml-element-empty element) (goto-char (sgml-element-end element)) (delete-char (- (sgml-element-etag-len element))) - (insert (sgml-end-tag-of gi))) + (tempo-process-and-insert-string (sgml-end-tag-of gi))) (goto-char (sgml-element-start element)) (delete-char (sgml-element-stag-len element)) - (insert (sgml-start-tag-of gi)) + (tempo-process-and-insert-string (sgml-start-tag-of gi)) (forward-char -1) (let* ((newel (sgml-find-element-of (point))) (newattlist (sgml-element-attlist newel)) @@ -298,8 +302,6 @@ This uses the selective display feature." (interactive) (let* ((el (sgml-find-element-of (point))) - (start (sgml-element-start el)) - (end (sgml-element-end el)) (c (sgml-element-content el))) (while c (sgml-fold-region (sgml-element-start c) @@ -363,6 +365,7 @@ (sgml-with-parser-syntax (let ((stag (sgml-is-start-tag)) (etag (sgml-is-end-tag))) + ;; Wing change (when (and (not (member* (sgml-element-gi (if (or stag etag) @@ -415,8 +418,7 @@ (push-mark) (sgml-note-change-at (point)) ; Prune the parse tree (sgml-parse-to (point)) - (let ((sgml-last-trouble-spot (point)) - (sgml-throw-on-warning 'trouble)) + (let ((sgml-throw-on-warning 'trouble)) (or (catch sgml-throw-on-warning (sgml-parse-until-end-of nil t)) (message "Ok")))) @@ -429,7 +431,10 @@ "Display a list of the contextually valid tags." (interactive) (sgml-parse-to-here) - (let ((model (sgml-element-model sgml-current-tree))) + (let ((model (sgml-element-model sgml-current-tree)) + (smap-name (sgml-lookup-shortref-name + (sgml-dtd-shortmaps sgml-dtd-info) + sgml-current-shortmap))) (with-output-to-temp-buffer "*Tags*" (princ (format "Current element: %s %s\n" (sgml-element-name sgml-current-tree) @@ -447,6 +452,9 @@ (if (eq model sgml-any) "[ANY]" ""))) + (when smap-name + (princ (format "Current short reference map: %s\n" smap-name))) + (cond ((sgml-final-p sgml-current-state) (princ "Valid end-tags : ") (loop for e in (sgml-current-list-of-endable-eltypes) @@ -540,7 +548,12 @@ (defun sgml-what-element () "Display what element is under the cursor." (interactive) - (let ((el (sgml-find-element-of (point)))) + (let* ((pos (point)) + (nobol (eq (point) sgml-rs-ignore-pos)) + (sref (sgml-deref-shortmap sgml-current-shortmap nobol)) + (el nil)) + (goto-char pos) + (setq el (sgml-find-element-of pos)) (assert (not (null el))) (message "%s %s" (cond ((eq el sgml-top-tree) @@ -549,6 +562,8 @@ "start-tag") ((>= (point) (sgml-element-etag-start el)) "end-tag") + (sref + "shortref") (t "content")) (sgml-element-context-string el)))) @@ -575,7 +590,7 @@ (fixup-whitespace))) (t (insert "\n")))) - (insert tag) + (tempo-process-and-insert-string tag) (sgml-indent-line) (unless no-nl-after (save-excursion @@ -645,14 +660,14 @@ (save-excursion (when (and element (not (equal element ""))) (goto-char end) - (insert (sgml-end-tag-of element)) + (tempo-process-and-insert-string (sgml-end-tag-of element)) (goto-char start) (sgml-insert-tag (sgml-start-tag-of element))))) (defun sgml-insert-attributes (avl attlist) "Insert the attributes with values AVL and declarations ATTLIST. AVL should be a assoc list mapping symbols to strings." - (let (name val dcl def tem) + (let (name val dcl def) (loop for attspec in attlist do (setq name (sgml-attspec-name attspec) val (cdr-safe (sgml-lookup-attspec name avl)) @@ -676,9 +691,10 @@ ((and sgml-minimize-attributes sgml-shorttag (member (sgml-general-case val) (sgml-declared-value-token-group dcl))) - (insert " " val)) + (tempo-process-and-insert-string (concat " " val))) (t - (insert " " name "=" (sgml-quote-attribute-value val))))) + (tempo-process-and-insert-string (concat " " name "=")) + (insert (sgml-quote-attribute-value val))))) (when auto-fill-function (funcall auto-fill-function)))) @@ -711,6 +727,11 @@ (sgml-message "%s" sgml-current-state) nil))) +(defun sgml-element-endable-p () + (sgml-parse-to-here) + (and (not (eq sgml-current-tree sgml-top-tree)) + (sgml-final-p sgml-current-state))) + (defun sgml-insert-end-tag () "Insert end-tag for the current open element." (interactive "*") @@ -727,18 +748,19 @@ (unless (bolp) (insert "\n"))) (when (prog1 (bolp) - (insert (if (eq t (sgml-element-net-enabled sgml-current-tree)) - "/" - ;; wing change: If there is more than one endable - ;; tag, we probably want the outermost one rather - ;; than the innermost one. Thus, we end a </ul> - ;; even when a </li> is possible. - (sgml-end-tag-of - (car (last (sgml-current-list-of-endable-eltypes))))))) + (tempo-process-and-insert-string + (if (eq t (sgml-element-net-enabled sgml-current-tree)) + "/" + ;; wing change: If there is more than one endable + ;; tag, we probably want the outermost one rather + ;; than the innermost one. Thus, we end a </ul> + ;; even when a </li> is possible. + (sgml-end-tag-of + (car (last (sgml-current-list-of-endable-eltypes))))))) (sgml-indent-line))))) (defun sgml-insert-start-tag (name asl attlist &optional net) - (insert "<" name) + (tempo-process-and-insert-string (concat "<" name)) (sgml-insert-attributes asl attlist) (insert (if net "/" ">"))) @@ -819,8 +841,7 @@ (1+ sgml-split-level) 0)) (let ((u (sgml-find-context-of (point))) - (start (point-marker)) - before) + (start (point-marker))) (loop repeat sgml-split-level do (goto-char (sgml-element-start u)) (setq u (sgml-element-parent u))) @@ -964,7 +985,7 @@ (defun sgml-doctype-insert (doctype vars) "Insert string DOCTYPE (ignored if nil) and set variables in &rest VARS. VARS should be a list of variables and values. -For backward compatibility a singel string instead of a variable is +For backward compatibility a single string instead of a variable is assigned to sgml-default-dtd-file. All variables are made buffer local and are also added to the buffers local variables list." @@ -988,43 +1009,44 @@ "Pop up a menu of the attributes of the current element \(or the element whith start-tag before point)." (interactive "e") - (let* ((el (sgml-find-attribute-element)) - (attlist (sgml-non-fixed-attributes (sgml-element-attlist el))) - tokens menu other) + (let ((menu (sgml-make-attrib-menu (sgml-find-attribute-element)))) + (sgml-popup-multi-menu event "Attributes" menu))) + +(defun sgml-make-attrib-menu (el) + (let ((attlist (sgml-non-fixed-attributes (sgml-element-attlist el)))) (or attlist (error "No non-fixed attributes for element")) - (setq menu - (loop for attdecl in attlist - for name = (sgml-attdecl-name attdecl) - for defval = (sgml-attdecl-default-value attdecl) - for tokens = (or (sgml-declared-value-token-group - (sgml-attdecl-declared-value attdecl)) - (sgml-declared-value-notation - (sgml-attdecl-declared-value attdecl))) - collect - (cons - (sgml-attdecl-name attdecl) - (nconc - (if tokens - (loop for val in tokens collect - (list val - (list 'sgml-insert-attribute name val))) - (list - (list "Set attribute value" - (list 'sgml-insert-attribute - (sgml-attdecl-name attdecl) - (list 'sgml-read-attribute-value - (list 'quote attdecl) - (sgml-element-attval el name)))))) - (if (sgml-default-value-type-p 'required defval) - nil - (list "--" - (list (if (sgml-default-value-type-p nil defval) - (format "Default: %s" - (sgml-default-value-attval defval)) - "#IMPLIED") - (list 'sgml-insert-attribute name nil)))))))) - (sgml-popup-multi-menu event "Attributes" menu))) + (loop for attdecl in attlist + for name = (sgml-attdecl-name attdecl) + for defval = (sgml-attdecl-default-value attdecl) + for tokens = (or (sgml-declared-value-token-group + (sgml-attdecl-declared-value attdecl)) + (sgml-declared-value-notation + (sgml-attdecl-declared-value attdecl))) + collect + (cons + (sgml-attdecl-name attdecl) + (nconc + (if tokens + (loop for val in tokens collect + (list val + (list 'sgml-insert-attribute name val))) + (list + (list "Set attribute value" + (list 'sgml-insert-attribute + (sgml-attdecl-name attdecl) + (list 'sgml-read-attribute-value + (list 'quote attdecl) + (sgml-element-attval el name)))))) + (if (sgml-default-value-type-p 'required defval) + nil + (list "--" + (list (if (sgml-default-value-type-p nil defval) + (format "Default: %s" + (sgml-default-value-attval defval)) + "#IMPLIED") + (list 'sgml-insert-attribute name nil)))))))) + ) ;;;; SGML mode: Fill @@ -1251,19 +1273,19 @@ (al sgml-attlist)) (while (not (eq ?> (following-char))) (sgml-parse-s) - (let ((name (sgml-check-nametoken))) - (forward-char 3) - (unless (memq (get-text-property (point) 'category) - '(sgml-default sgml-fixed)) - (push - (sgml-make-attspec (sgml-attdecl-name (car al)) - (sgml-extract-attribute-value - (sgml-attdecl-declared-value (car al)))) - asl)) - (while (progn (beginning-of-line 2) - (or (eolp) - (not (get-text-property (point) 'read-only)))))) - ; was (eq t) + (sgml-check-nametoken) ; attribute name, should match head of al + (forward-char 3) + (unless (memq (get-text-property (point) 'category) + '(sgml-default sgml-fixed)) + (push + (sgml-make-attspec (sgml-attdecl-name (car al)) + (sgml-extract-attribute-value + (sgml-attdecl-declared-value (car al)))) + asl)) + (while (progn (beginning-of-line 2) + (or (eolp) + (not (get-text-property (point) 'read-only))))) + (forward-line 1) (setq al (cdr al))) asl))) @@ -1353,8 +1375,9 @@ (cond ((eq action 'hide) (let ((tag (downcase - (buffer-substring (1+ (match-beginning 0)) - (match-beginning 1))))) + (buffer-substring-no-properties + (1+ (match-beginning 0)) + (match-beginning 2))))) (if (or attr-p (not (member tag sgml-exposed-tags))) (add-text-properties (match-beginning markup-index) (match-end markup-index) @@ -1402,7 +1425,8 @@ (sgml-entity-insert-text entity) (setq sgml-goal (point-max)) ; May have changed size of buffer ;; now parse the entity text - (goto-char (setq sgml-rs-ignore-pos sgml-markup-start)))))) + (setq sgml-rs-ignore-pos sgml-markup-start) + (goto-char sgml-markup-start))))) (defun sgml-expand-shortref-to-entity (name) (let ((end (point)) @@ -1493,7 +1517,7 @@ sgml-normalize-trims) (skip-chars-backward " \t\n\r")) (delete-char (sgml-tree-etag-len element)) - (save-excursion (insert (sgml-end-tag-of element)))))) + (save-excursion (tempo-process-and-insert-string (sgml-end-tag-of element)))))) (defun sgml-make-character-reference (&optional invert)
--- a/lisp/psgml/psgml-fs.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/psgml/psgml-fs.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,10 +1,10 @@ -;;; fs.el --- Format a SGML-file according to a style file +;;; psgml-fs.el --- Format a SGML-file according to a style file ;; Copyright (C) 1995 Lennart Staflin ;; Author: Lennart Staflin <lenst@lysator.liu.se> -;; Version: $Id: psgml-fs.el,v 1.1.1.1 1996/12/18 03:35:17 steve Exp $ +;; Version: $Id: psgml-fs.el,v 1.1.1.2 1996/12/18 03:47:13 steve Exp $ ;; Keywords: -;; Last edited: Mon Jan 8 22:12:00 1996 by lenst@triton.lstaflin.pp.se (Lennart Staflin) +;; Last edited: Thu Mar 21 22:32:27 1996 by lenst@triton.lstaflin.pp.se (Lennart Staflin) ;;; This program is free software; you can redistribute it and/or modify ;;; it under the terms of the GNU General Public License as published by @@ -23,9 +23,9 @@ ;;; ;;; Commentary: -;; The function `style-format' formats the SGML-file in the current buffer -;; according to the style defined in the file `style.el' (or the file given -;; by the variable `fs-style'). +;; The function `style-format' formats the SGML-file in the current +;; buffer according to the style defined in the file `psgml-style.fs' +;; (or the file given by the variable `fs-style'). ;; To try it load this file and open the test file example.sgml. Then ;; run the emacs command `M-x style-format'. @@ -159,7 +159,7 @@ ;;;; Style driven engine -(defvar fs-style "psgml-style.el" +(defvar fs-style "psgml-style.fs" "*Style sheet to use for `style-format'. The value can be the style-sheet list, or it can be a file name \(string) of a file containing the style sheet or it can be the name @@ -238,4 +238,4 @@ (sgml-element-attval e name)) -;;; fs.el ends here +;;; psgml-fs.el ends here
--- a/lisp/psgml/psgml-html.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/psgml/psgml-html.el Mon Aug 13 08:46:35 2007 +0200 @@ -640,6 +640,7 @@ (substring time 0 20) (nth 1 (current-time-zone)) " " + (substring time -4) "\n"))) (defun html-helper-insert-timestamp-delimiter-at-point () @@ -733,7 +734,7 @@ "---" ["HTML-Quote Region" html-quote-region t] "---") - (cdr sgml-sgml-menu)))) + (cdr sgml-main-menu)))) (defun sgml-html-netscape-file () "Preview the file for the current buffer in Netscape."
--- a/lisp/psgml/psgml-info.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/psgml/psgml-info.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,6 +1,6 @@ ;;;; psgml-info.el -;;; Last edited: Mon Aug 7 23:00:54 1995 by lenst@katja.lysator.liu.se (Lennart Staflin) -;;; $Id: psgml-info.el,v 1.1.1.1 1996/12/18 03:35:21 steve Exp $ +;;; Last edited: Wed Mar 20 21:24:16 1996 by lenst@triton.lstaflin.pp.se (Lennart Staflin) +;;; $Id: psgml-info.el,v 1.1.1.2 1996/12/18 03:47:14 steve Exp $ ;; Copyright (C) 1994, 1995 Lennart Staflin @@ -97,10 +97,14 @@ (sgml-add-last-unique (sgml-move-dest m) states))) (t ; &-node - (sgml-add-last-unique (sgml-&node-next (car agenda)) states) - (loop for dfa in (sgml-&node-dfas (car agenda)) do + (sgml-add-last-unique (sgml-and-node-next (car agenda)) states) + (loop for dfa in (sgml-and-node-dfas (car agenda)) do (sgml-add-last-unique dfa states)))) (setq agenda (cdr agenda))) + (setq res (sort (set-difference + (union res (sgml-eltype-includes eltype)) + (sgml-eltype-excludes eltype)) + (function string-lessp))) (setf (sgml-eltype-appdata eltype 're-cache) res) res))))) @@ -345,11 +349,23 @@ (princ (format "\nUSEMAP: %s\n" s)))) ;; ---- (princ "\nOCCURS IN:\n\n") - (sgml-map-eltypes - (function (lambda (cand) - (when (memq et (sgml-eltype-refrenced-elements cand)) - (princ (format " %s" (sgml-eltype-name cand)))))) - (sgml-pstate-dtd sgml-buffer-parse-state))))) + (let ((occurs-in ())) + (sgml-map-eltypes + (function (lambda (cand) + (when (memq et (sgml-eltype-refrenced-elements cand)) + (push cand occurs-in)))) + (sgml-pstate-dtd sgml-buffer-parse-state)) + + (loop with col = 0 + for occur-et in (sort occurs-in (function string-lessp)) + for name = (sgml-eltype-name occur-et) + do + (when (and (> col 0) (> (+ col (length name) 1) fill-column)) + (princ "\n") + (setq col 0)) + (princ " ") (princ name) + (incf col (length name)) + (incf col 1)))))) ;;;; Print general info about the DTD.
--- a/lisp/psgml/psgml-other.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/psgml/psgml-other.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,5 +1,5 @@ ;;;; psgml-other.el --- Part of SGML-editing mode with parsing support -;; $Id: psgml-other.el,v 1.1.1.1 1996/12/18 03:35:21 steve Exp $ +;; $Id: psgml-other.el,v 1.1.1.2 1996/12/18 03:47:14 steve Exp $ ;; Copyright (C) 1994 Lennart Staflin @@ -23,9 +23,7 @@ ;;;; Commentary: -;;; Part of psgml.el - -;;; Menus for use with FSF Emacs 19 +;;; Part of psgml.el. Code not compatible with XEmacs. ;;;; Code: @@ -38,115 +36,6 @@ into several panes.") -;;;; Menu bar - -(easy-menu-define - sgml-dtd-menu sgml-mode-map "DTD menu" - '("DTD")) - -(defconst sgml-dtd-root-menu - '("DTD" - ["Parse DTD" sgml-parse-prolog t] - ("Info" - ["General DTD info" sgml-general-dtd-info t] - ["Describe element type" sgml-describe-element-type t] - ["Describe entity" sgml-describe-entity t] - ["List elements" sgml-list-elements t] - ["List attributes" sgml-list-attributes t] - ["List terminals" sgml-list-terminals t] - ["List content elements" sgml-list-content-elements t] - ["List occur in elements" sgml-list-occur-in-elements t] - ) - "--" - ["Load Parsed DTD" sgml-load-dtd t] - ["Save Parsed DTD" sgml-save-dtd t] - )) - -(easy-menu-define - sgml-view-menu sgml-mode-map "View menu" - '("View" - ["Fold Element" sgml-fold-element t] - ["Fold Subelement" sgml-fold-subelement t] - ["Unfold Line" sgml-unfold-line t] - ["Unfold Element" sgml-unfold-element t] - ["Expand" sgml-expand-element t] - ["Fold Region" sgml-fold-region t] - ["Unfold All" sgml-unfold-all t] - ["Hide Tags" sgml-hide-tags t] - ["Hide Attributes" sgml-hide-attributes t] - ["Show All Tags" sgml-show-tags t] - ) - ) - - -(easy-menu-define - sgml-markup-menu sgml-mode-map "Markup menu" - '("Markup") -) - -(defconst sgml-markup-root-menu - '("Markup" - ["Insert Element" sgml-element-menu t] - ["Insert Start-Tag" sgml-start-tag-menu t] - ["Insert End-Tag" sgml-end-tag-menu t] - ["Tag Region" sgml-tag-region-menu t] - ["Insert Attribute" sgml-attrib-menu t] - ["Insert Entity" sgml-entities-menu t] - )) - -(easy-menu-define - sgml-move-menu sgml-mode-map "Menu of move commands" - '("Move" - ["Next trouble spot" sgml-next-trouble-spot t] - ["Next data field" sgml-next-data-field t] - ["Forward element" sgml-forward-element t] - ["Backward element" sgml-backward-element t] - ["Up element" sgml-up-element t] - ["Down element" sgml-down-element t] - ["Backward up element" sgml-backward-up-element t] - ["Beginning of element" sgml-beginning-of-element t] - ["End of element" sgml-end-of-element t] - )) - -(easy-menu-define - sgml-modify-menu sgml-mode-map "Menu of modification commands" - '("Modify" - ["Normalize" sgml-normalize t] - ["Expand All Short References" sgml-expand-all-shortrefs t] - ["Expand Entity Reference" sgml-expand-entity-reference t] - ["Normalize Element" sgml-normalize-element t] - ["Make Character Reference" sgml-make-character-reference t] - ["Unmake Character Reference" (sgml-make-character-reference t) t] - ["Fill Element" sgml-fill-element t] - ["Change Element Name..." sgml-change-element-name t] - ["Edit Attributes..." sgml-edit-attributes t] - ["Kill Markup" sgml-kill-markup t] - ["Kill Element" sgml-kill-element t] - ["Untag Element" sgml-untag-element t] - ["Trim and leave element" sgml-trim-and-leave-element t] - ["Decode Character Entities" sgml-charent-to-display-char t] - ["Encode Characters" sgml-display-char-to-charent t] - ) - ) - -(easy-menu-define - sgml-main-menu sgml-mode-map "Main menu" - '("SGML" - ["Reset Buffer" normal-mode t] - ["End Element" sgml-insert-end-tag t] - ["Show Context" sgml-show-context t] - ["What Element" sgml-what-element t] - ["List Valid Tags" sgml-list-valid-tags t] - ["Show/Hide Warning Log" sgml-show-or-clear-log t] - ["Validate" sgml-validate t] - ["File Options >" sgml-file-options-menu t] - ["User Options >" sgml-user-options-menu t] - ["Save File Options" sgml-save-options t] - ["Submit Bug Report" sgml-submit-bug-report t] - ) - ) - - ;;;; Key Commands ;; Doesn't this work in Lucid? *** @@ -164,22 +53,21 @@ (x-popup-menu event (let ((menus (list (cons title entries)))) - (cond ((> (length entries) - sgml-max-menu-size) - (setq menus - (loop for i from 1 while entries - collect - (let ((submenu - (subseq entries 0 (min (length entries) - sgml-max-menu-size)))) - (setq entries (nthcdr sgml-max-menu-size - entries)) - (cons - (format "%s '%s'-'%s'" - title - (sgml-range-indicator (caar submenu)) - (sgml-range-indicator (caar (last submenu)))) - submenu)))))) + (cond + ((> (length entries) sgml-max-menu-size) + (setq menus + (loop for i from 1 while entries + collect + (let ((submenu + (subseq entries 0 (min (length entries) + sgml-max-menu-size)))) + (setq entries (nthcdr sgml-max-menu-size entries)) + (cons + (format "%s '%s'-'%s'" + title + (sgml-range-indicator (caar submenu)) + (sgml-range-indicator (caar (last submenu)))) + submenu)))))) (cons title menus)))) (defun sgml-range-indicator (string) @@ -197,61 +85,6 @@ ; on the first level (eval (car (x-popup-menu event (cons title menus))))) - - -;;;; Build Custom Menus - -(defun sgml-build-custom-menus () - ;; Build custom menus -;; (sgml-add-custom-entries -;; sgml-markup-menu -;; (mapcar (function (lambda (e) -;; (sgml-markup (car e) (cadr e)))) -;; sgml-custom-markup)) - (easy-menu-define - sgml-markup-menu sgml-mode-map "Markup menu" - (append sgml-markup-root-menu - (list "----") - (loop for e in sgml-custom-markup collect - (vector (first e) - (` (sgml-insert-markup (, (cadr e)))) - t)))) - (easy-menu-define - sgml-dtd-menu sgml-mode-map "DTD menu" - (append sgml-dtd-root-menu - (list "----") - (loop for e in sgml-custom-dtd collect - (vector (first e) - (` (sgml-doctype-insert (, (cadr e)) - '(, (cddr e)))) - t))))) - - -;(defun sgml-add-custom-entries (keymap entries) -; "Add to KEYMAP the ENTRIES, a list of (name . command) pairs. -;The entries are added last in keymap and a blank line precede it." -; (let ((l keymap) -; (last (last keymap))) ; cons with keymap name -; ;; Find the cons before 'blank-c' event, or last cons. -; (while (and (cdr l) -; (consp (cadr l)) -; (not (eq 'blank-c (caadr l)))) -; (setq l (cdr l))) -; ;; Delete entries after -; (setcdr l nil) -; (when entries ; now add the entries -; (setcdr l -; (cons -; '(blank-c "") ; a blank line before custom entries -; (loop for i from 0 as e in entries -; collect (cons (intern (concat "custom" i)) e))))) -; ;; add keymap name to keymap -; (setcdr (last keymap) last))) - - - - - ;;;; Insert with properties @@ -271,42 +104,61 @@ ;;;; Set face of markup +(defvar sgml-use-text-properties nil) + (defun sgml-set-face-for (start end type) - (let ((current (overlays-at start)) - (face (cdr (assq type sgml-markup-faces))) - (pos start) - o) - (while current - (cond ((and (null o) - (eq type (overlay-get (car current) 'sgml-type))) - (setq o (car current))) - ((overlay-get (car current) 'sgml-type) - (delete-overlay (car current)))) - (setq current (cdr current))) - (while (< (setq pos (next-overlay-change pos)) - end) - (setq current (overlays-at pos)) - (while current - (when (overlay-get (car current) 'sgml-type) - (delete-overlay (car current))) - (setq current (cdr current)))) - (cond (o - (move-overlay o start end) - (if (null (overlay-get o 'face)) - (overlay-put o 'face face))) - (face - (setq o (make-overlay start end)) - (overlay-put o 'sgml-type type) - (overlay-put o 'face face))))) + (let ((face (cdr (assq type sgml-markup-faces)))) + (cond + (sgml-use-text-properties + (let ((inhibit-read-only t) + (after-change-function nil) + (before-change-function nil)) + (put-text-property start end 'face face))) + (t + (let ((current (overlays-at start)) + (pos start) + old-overlay) + (while current + (cond ((and (null old-overlay) + (eq type (overlay-get (car current) 'sgml-type))) + (setq old-overlay (car current))) + ((overlay-get (car current) 'sgml-type) + (message "delov: %s" (overlay-get (car current) 'sgml-type)) + (delete-overlay (car current)))) + (setq current (cdr current))) + (while (< (setq pos (next-overlay-change pos)) + end) + (setq current (overlays-at pos)) + (while current + (when (overlay-get (car current) 'sgml-type) + (delete-overlay (car current))) + (setq current (cdr current)))) + (cond (old-overlay + (move-overlay old-overlay start end) + (if (null (overlay-get old-overlay 'face)) + (overlay-put old-overlay 'face face))) + (face + (setq old-overlay (make-overlay start end)) + (overlay-put old-overlay 'sgml-type type) + (overlay-put old-overlay 'face face)))))))) (defun sgml-set-face-after-change (start end &optional pre-len) - (when sgml-set-face + ;; If inserting in front of an markup overlay, move that overlay. + ;; this avoids the overlay beeing deleted and recreated by + ;; sgml-set-face-for. + (when (and sgml-set-face (not sgml-use-text-properties)) (loop for o in (overlays-at start) do (cond ((not (overlay-get o 'sgml-type))) ((= start (overlay-start o)) (move-overlay o end (overlay-end o))))))) +(defun sgml-fix-overlay-after-change (overlay flag start end &optional size) + (message "sfix(%s): %d-%d (%s)" flag start end size) + (overlay-put overlay 'front-nonsticky t) + (when nil + (move-overlay overlay end (overlay-end overlay)))) + (defalias 'next-overlay-at 'next-overlay-change) ; fix bug in cl.el (defun sgml-clear-faces () @@ -316,6 +168,12 @@ do (delete-overlay o))) +;;;; Emacs before 19.29 + +(unless (fboundp 'buffer-substring-no-properties) + (defalias 'buffer-substring-no-properties 'buffer-substring)) + + ;;;; Provide (provide 'psgml-other)
--- a/lisp/psgml/psgml-parse.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/psgml/psgml-parse.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,5 +1,5 @@ ;;;; psgml-parse.el --- Parser for SGML-editing mode with parsing support -;; $Id: psgml-parse.el,v 1.1.1.1 1996/12/18 03:35:21 steve Exp $ +;; $Id: psgml-parse.el,v 1.1.1.2 1996/12/18 03:47:15 steve Exp $ ;; Copyright (C) 1994, 1995 Lennart Staflin @@ -182,6 +182,11 @@ (defvar sgml-current-local-ecat nil "Value of `sgml-local-ecat-files' in main buffer. Valid during parsing.") +(defvar sgml-current-top-buffer nil + "The buffer of the document entity, the main buffer. +Valid during parsing. This is used to find current directory for +catalogs.") + (defvar sgml-current-state nil "Current state in content model or model type if CDATA, RCDATA or ANY.") @@ -312,41 +317,41 @@ ;; [Alt: they could perhaps have been keept in one set but ;; marked in different ways.] -;; The &-model groups creates too big state machines, therefor -;; there is a datastruture called &-node. - -;; A &-node is a specification for a dfa that has not been computed. +;; The and-model groups creates too big state machines, therefor +;; there is a datastruture called and-node. + +;; A and-node is a specification for a dfa that has not been computed. ;; It contains a set of dfas that all have to be traversed befor going -;; to the next state. The &-nodes are only stored in moves and are -;; not seen by the parser. When a move is taken the &-node is converted -;; to a &-state. - -;; A &-state keeps track of which dfas still need to be +;; to the next state. The and-nodes are only stored in moves and are +;; not seen by the parser. When a move is taken the and-node is converted +;; to a and-state. + +;; A and-state keeps track of which dfas still need to be ;; traversed and the state of the current dfa. ;; move = <token, node> -;; node = normal-state | &-node - -;; &-node = <dfas, next> +;; node = normal-state | and-node + +;; and-node = <dfas, next> ;; where: dfas is a set of normal-state ;; next is a normal-state -;; State = normal-state | &-state +;; State = normal-state | and-state ;; The parser only knows about the state type. ;; normal-state = <opts, reqs> ;; where: opts is a set of moves for optional tokens ;; reqs is a set of moves for required tokens -;; &-state = <substate, dfas, next> +;; and-state = <substate, dfas, next> ;; where: substate is a normal-state ;; dfas is a set of states ;; next is the next state -;; The &-state is only used during the parsing. +;; The and-state is only used during the parsing. ;; Primitiv functions to get data from parse state need -;; to know both normal-state and &-state. +;; to know both normal-state and and-state. ;;; Representations: @@ -409,33 +414,33 @@ (sgml-add-req-move s1 token s2) s1)) -;;&-state: (state next . dfas) - -(defsubst sgml-make-&state (state dfas next) +;;and-state: (state next . dfas) + +(defsubst sgml-make-and-state (state dfas next) (cons state (cons next dfas))) -(defsubst sgml-step-&state (state &state) - (cons state (cdr &state))) - -(defsubst sgml-&state-substate (s) +(defsubst sgml-step-and-state (state and-state) + (cons state (cdr and-state))) + +(defsubst sgml-and-state-substate (s) (car s)) -(defsubst sgml-&state-dfas (s) +(defsubst sgml-and-state-dfas (s) (cddr s)) -(defsubst sgml-&state-next (s) +(defsubst sgml-and-state-next (s) (cadr s)) -;;&-node: (next . dfas) - -(defsubst sgml-make-&node (dfas next) +;;and-node: (next . dfas) + +(defsubst sgml-make-and-node (dfas next) (cons next dfas)) -(defmacro sgml-&node-next (n) +(defmacro sgml-and-node-next (n) (` (car (, n)))) -(defmacro sgml-&node-dfas (n) +(defmacro sgml-and-node-dfas (n) (` (cdr (, n)))) @@ -453,23 +458,23 @@ (let ((dest (sgml-move-dest c))) (if (sgml-normal-state-p dest) dest - ;; dest is a &-node - (sgml-next-sub& (sgml-&node-dfas dest) + ;; dest is a and-node + (sgml-next-sub-and (sgml-and-node-dfas dest) + token + (sgml-and-node-next dest))))))) + (t ;state is a and-state + (sgml-get-and-move state token)))) + +(defun sgml-get-and-move (state token) + ;; state is a and-state + (let ((m (sgml-get-move (sgml-and-state-substate state) token))) + (cond (m (cons m (cdr state))) + ((sgml-final (sgml-and-state-substate state)) + (sgml-next-sub-and (sgml-and-state-dfas state) token - (sgml-&node-next dest))))))) - (t ;state is a &-state - (sgml-get-&move state token)))) - -(defun sgml-get-&move (state token) - ;; state is a &-state - (let ((m (sgml-get-move (sgml-&state-substate state) token))) - (cond (m (cons m (cdr state))) - ((sgml-state-final-p (sgml-&state-substate state)) - (sgml-next-sub& (sgml-&state-dfas state) - token - (sgml-&state-next state)))))) - -(defun sgml-next-sub& (dfas token next) + (sgml-and-state-next state)))))) + +(defun sgml-next-sub-and (dfas token next) "Compute the next state, choosing from DFAS and moving by TOKEN. If this is not possible, but all DFAS are final, move by TOKEN in NEXT." (let ((allfinal t) @@ -480,7 +485,7 @@ (setq s1 (car l) allfinal (and allfinal (sgml-state-final-p s1)) s2 (sgml-get-move s1 token) - res (and s2 (sgml-make-&state s2 (remq s1 dfas) next)) + res (and s2 (sgml-make-and-state s2 (remq s1 dfas) next)) l (cdr l))) (cond (res) (allfinal (sgml-get-move next token))))) @@ -492,34 +497,35 @@ (defun sgml-required-tokens (state) (if (sgml-normal-state-p state) (sgml-tokens-of-moves (sgml-state-reqs state)) - (or (sgml-required-tokens (sgml-&state-substate state)) - (loop for s in (sgml-&state-dfas state) + (or (sgml-required-tokens (sgml-and-state-substate state)) + (loop for s in (sgml-and-state-dfas state) nconc (sgml-tokens-of-moves (sgml-state-reqs s))) - (sgml-tokens-of-moves (sgml-state-reqs (sgml-&state-next state)))))) + (sgml-tokens-of-moves (sgml-state-reqs (sgml-and-state-next state)))))) (defsubst sgml-final (state) (if (sgml-normal-state-p state) (sgml-state-final-p state) - (sgml-final& state))) - -(defun sgml-final& (state) - (and (sgml-final (sgml-&state-substate state)) - (loop for s in (sgml-&state-dfas state) + (sgml-final-and state))) + +(defun sgml-final-and (state) + (and (sgml-final (sgml-and-state-substate state)) + (loop for s in (sgml-and-state-dfas state) always (sgml-state-final-p s)) - (sgml-state-final-p (sgml-&state-next state)))) + (sgml-state-final-p (sgml-and-state-next state)))) (defun sgml-optional-tokens (state) (if (sgml-normal-state-p state) (sgml-tokens-of-moves (sgml-state-opts state)) (nconc - (sgml-optional-tokens (sgml-&state-substate state)) - (if (sgml-final (sgml-&state-substate state)) - (loop for s in (sgml-&state-dfas state) + (sgml-optional-tokens (sgml-and-state-substate state)) + (if (sgml-final (sgml-and-state-substate state)) + (loop for s in (sgml-and-state-dfas state) nconc (sgml-tokens-of-moves (sgml-state-opts s)))) - (if (loop for s in (sgml-&state-dfas state) + (if (loop for s in (sgml-and-state-dfas state) always (sgml-state-final-p s)) - (sgml-tokens-of-moves (sgml-state-opts (sgml-&state-next state))))))) + (sgml-tokens-of-moves + (sgml-state-opts (sgml-and-state-next state))))))) ;;;; Attribute Types @@ -975,12 +981,14 @@ ;;;; Load a saved dtd +;;; Wing addition (defmacro sgml-char-int (ch) (if (fboundp 'char-int) (` (char-int (, ch))) ch)) (defsubst sgml-read-octet () + ;; Wing change (prog1 (sgml-char-int (following-char)) (forward-char))) @@ -1028,10 +1036,10 @@ (sgml-read-nodes (make-vector n nil))) (loop for i below n do (aset sgml-read-nodes i (sgml-make-state))) (loop for e across sgml-read-nodes do - (cond ((eq 255 (sgml-read-peek)) ; a &node + (cond ((eq 255 (sgml-read-peek)) ; a and-node (sgml-read-octet) ; skip - (setf (sgml-&node-next e) (sgml-read-node-ref)) - (setf (sgml-&node-dfas e) (sgml-read-model-seq))) + (setf (sgml-and-node-next e) (sgml-read-node-ref)) + (setf (sgml-and-node-dfas e) (sgml-read-model-seq))) (t ; a normal-state (setf (sgml-state-opts e) (sgml-read-moves)) (setf (sgml-state-reqs e) (sgml-read-moves))))) @@ -1198,6 +1206,8 @@ (sgml-check-dtd-subset) (sgml-pop-entity) (erase-buffer) + ;; For XEmacs-20.0/Mule + (setq file-coding-system 'noconv) (sgml-write-dtd sgml-dtd-info to-file) t)) @@ -1225,6 +1235,7 @@ "Merge the binary coded dtd in the current buffer with the current dtd. The current dtd is the variable sgml-dtd-info. Return t if mereged was successfull or nil if failed." + (setq file-coding-system 'noconv) (goto-char (point-min)) (sgml-read-sexp) ; skip filev (let ((dependencies (sgml-read-sexp)) @@ -1777,26 +1788,6 @@ (defun sgml-entity-marked-undefined-p (entity) (cdddr entity)) -(defun sgml-entity-insert-text (entity &optional ptype) - "Insert the text of ENTITY. -PTYPE can be 'param if this is a parameter entity." - (let ((text (sgml-entity-text entity))) - (cond - ((stringp text) - (insert text)) - (t - (unless (sgml-insert-external-entity text - (or ptype - (sgml-entity-type entity)) - (sgml-entity-name entity)) - ;; Mark entity as not found - (setcdr (cddr entity) t) ;*** - ))))) - -(defun sgml-entity-file (entity &optional ptype) - (sgml-external-file (sgml-entity-text entity) - (or ptype (sgml-entity-type entity)) - (sgml-entity-name entity))) ;;; Entity tables ;; Represented by a cons-cell whose car is the default entity (or nil) @@ -1839,16 +1830,30 @@ (nconc tab1 (cdr tab2)) (setcar tab1 (or (car tab1) (car tab2)))) + +(defun sgml-entity-insert-text (entity &optional ptype) + "Insert the text of ENTITY. +PTYPE can be 'param if this is a parameter entity." + (let ((text (sgml-entity-text entity))) + (cond + ((stringp text) + (insert text)) + (t + (sgml-insert-external-entity text + (or ptype + (sgml-entity-type entity)) + (sgml-entity-name entity)))))) ;;;; External identifyer resolve -(defun sgml-cache-catalog (file cache-var parser-fun) +(defun sgml-cache-catalog (file cache-var parser-fun + &optional default-dir) "Return parsed catalog. FILE is the file containing the catalog. Maintains a cache of parsed catalog files in variable CACHE-VAR. The parsing is done by function PARSER-FUN that should parse the current buffer and return the parsed repreaentation of the catalog." - (setq file (expand-file-name file)) + (setq file (file-truename (expand-file-name file default-dir))) (and (file-readable-p file) (let ((c (assoc file (symbol-value cache-var))) @@ -1866,6 +1871,19 @@ (message "Loading %s ... done" file) new))))) +(defun sgml-main-directory () + "Directory of the document entity." + (let ((cb (current-buffer))) + (set-buffer sgml-current-top-buffer) + (prog1 default-directory + (set-buffer cb)))) + +(defun sgml-trace-lookup (&rest args) + "Log a message like `sgml-log-message', but only if `sgml-trace-entity-lookup' is set." + (when sgml-trace-entity-lookup + (apply (function sgml-log-message) args))) + + (defun sgml-catalog-lookup (files pubid type name) "Look up the public identifier/entity name in catalogs. FILES is a list of catalogs to use. PUBID is the public identifier @@ -1875,37 +1893,41 @@ type 'entity)) ((eq type 'dtd) (setq type 'doctype))) - + ;;(sgml-trace-lookup " [pubid='%s' type=%s name='%s']" pubid type name) (loop for f in files thereis (let ((cat (sgml-cache-catalog f 'sgml-catalog-assoc - (function sgml-parse-catalog-buffer)))) + (function sgml-parse-catalog-buffer) + (sgml-main-directory)))) + (sgml-trace-lookup " catalog: %s %s" + (expand-file-name f (sgml-main-directory)) + (if (null cat) "empty/non existent" "exists")) (or ;; Giv PUBLIC entries priority over ENTITY and DOCTYPE (if pubid (loop for (key cname file) in cat - thereis (and (eq 'public key) - (string= pubid cname) - (file-readable-p file) - file))) + thereis (if (and (eq 'public key) + (string= pubid cname)) + (if (file-readable-p file) + (progn + (sgml-trace-lookup " >> %s [by pubid]" file) + file) + (progn + (sgml-trace-lookup " !unreadable %s" file) + nil))))) (loop for (key cname file) in cat - thereis (and (eq type key) - (or (null cname) - (string= name cname)) - (file-readable-p file) - file)))))) - -(defun sgml-search-catalog (func filter) - (loop - for files in (list sgml-local-catalogs sgml-catalog-files) - thereis - (loop for file in files thereis - (loop for entry in (sgml-cache-catalog - file 'sgml-catalog-assoc - (function sgml-parse-catalog-buffer)) - when (or (null filter) - (memq (car entry) filter)) - thereis (funcall func entry))))) + ;;do (sgml-trace-lookup " %s %s" key cname) + thereis (if (and (eq type key) + (or (null cname) + (string= name cname))) + (if (file-readable-p file) + (progn + (sgml-trace-lookup " >> %s [by %s %s]" + file key cname) + file) + (progn + (sgml-trace-lookup " !unreadable %s" file) + nil)))))))) (defun sgml-path-lookup (extid type name) (let* ((pubid (sgml-extid-pubid extid)) @@ -1939,6 +1961,11 @@ ;; extid is (pubid . sysid) (let ((pubid (sgml-extid-pubid extid))) (when pubid (setq pubid (sgml-canonize-pubid pubid))) + (sgml-trace-lookup "Start looking for %s entity %s public %s system %s" + (or type "-") + (or name "?") + pubid + (sgml-extid-sysid extid)) (or (if sgml-system-identifiers-are-preferred (sgml-lookup-sysid-as-file extid)) (sgml-catalog-lookup sgml-current-localcat pubid type name) @@ -1979,6 +2006,7 @@ ;; Parse a buffer full of catalogue entries. (defun sgml-parse-catalog-buffer () "Parse all entries in a catalogue." + (sgml-trace-lookup " (Parsing catalog)") (loop while (sgml-skip-cs) for type = (downcase (sgml-check-cat-literal)) @@ -2122,14 +2150,17 @@ (car epos))) (defun sgml-epos-pos (epos) + "The buffer position of EPOS withing its entity." (if (consp epos) (cdr epos) epos)) (defun sgml-bpos-p (epos) + "True if EPOS is a position in the main buffer." (numberp epos)) (defun sgml-strict-epos-p (epos) + "True if EPOS is a position in an entity other then the main buffer." (consp epos)) (defun sgml-epos (pos) @@ -2138,21 +2169,31 @@ (sgml-make-epos sgml-current-eref pos) pos)) -(defun sgml-epos-erliest (epos) +(defun sgml-epos-before (epos) + "The last position in buffer not after EPOS. +If EPOS is a buffer position this is the same. If EPOS is in an entity +this is the buffer position before the entity reference." (while (consp epos) (setq epos (sgml-eref-start (sgml-epos-eref epos)))) epos) -(defun sgml-epos-latest (epos) +(defun sgml-epos-after (epos) + "The first position in buffer after EPOS. +If EPOS is in an other entity, buffer position is after +entity reference leading to EPOS." (while (consp epos) (setq epos (sgml-eref-end (sgml-epos-eref epos)))) epos) (defun sgml-epos-promote (epos) + "Convert position in entity structure EPOS to a buffer position. +If EPOS is in an entity, the buffer position will be the position +before the entity reference if EPOS is first character in entity +text. Otherwise buffer position will be after entity reference." (while (and (consp epos) (= (cdr epos) 1)) (setq epos (sgml-eref-start (car epos)))) - (sgml-epos-latest epos)) + (sgml-epos-after epos)) ;;;; DTD repository @@ -2240,8 +2281,7 @@ (when file (setq file (expand-file-name file))) (sgml-debug "Find compiled dtd for %s %s" pubid file) (let ((ce (or (sgml-ecat-lookup sgml-current-local-ecat pubid file) - (sgml-ecat-lookup sgml-ecat-files pubid file))) - cfile dtd ents) + (sgml-ecat-lookup sgml-ecat-files pubid file)))) (and ce (let ((cfile (car ce)) (ents (cdr ce))) @@ -2301,7 +2341,13 @@ ENTITY can also be a file name. Optional argument REF-START should be the start point of the entity reference. Optional argument TYPE, overrides the entity type in entity look up." + (sgml-debug "Push to %s" + (cond ((stringp entity) + (format "string '%s'" entity)) + (t + (sgml-entity-name entity)))) (when ref-start + ;; don't consider a RS shortref here again (setq sgml-rs-ignore-pos ref-start)) (unless (and sgml-scratch-buffer (buffer-name sgml-scratch-buffer)) @@ -2315,9 +2361,20 @@ (sgml-epos (or ref-start (point))) (sgml-epos (point))))) (set-buffer sgml-scratch-buffer) + ;; For MULE to not misinterpret binary data set the mc-flag + ;; (reported by Jeffrey Friedl <jfriedl@nff.ncl.omron.co.jp>) + (setq mc-flag nil) + ;; For XEmacs 20.0/Mule + (setq file-coding-system 'noconv) (when (eq sgml-scratch-buffer (default-value 'sgml-scratch-buffer)) (make-local-variable 'sgml-scratch-buffer) (setq sgml-scratch-buffer nil)) + (when after-change-function ;*** + (message "OOPS: after-change-function not NIL in scratch buffer %s: %s" + (current-buffer) + after-change-function) + (setq before-change-function nil + after-change-function nil)) (setq sgml-last-entity-buffer (current-buffer)) (erase-buffer) (setq default-directory dd) @@ -2332,17 +2389,26 @@ (stringp (sgml-entity-text entity))) (point) 0)) + (when sgml-buffer-parse-state + (sgml-debug "-- pstate set in scratch buffer") + (setq sgml-buffer-parse-state nil)) (cond ((stringp entity) ; a file name (save-excursion (insert-file-contents entity)) (setq default-directory (file-name-directory entity))) - ((and sgml-parsing-dtd - (consp (sgml-entity-text entity))) ; external id? - (let ((file (sgml-entity-file entity type))) - (sgml-debug "Push to %s = %s" (sgml-entity-text entity) file) + ((consp (sgml-entity-text entity)) ; external id? + (let* ((extid (sgml-entity-text entity)) + (file + (sgml-external-file extid + (or type (sgml-entity-type entity)) + (sgml-entity-name entity)))) + (when sgml-parsing-dtd + (push (or file t) + (sgml-dtd-dependencies sgml-dtd-info))) + (sgml-debug "Push to %s = %s" extid file) (cond - ((and file - (sgml-try-merge-compiled-dtd (car (sgml-entity-text entity)) + ((and file sgml-parsing-dtd + (sgml-try-merge-compiled-dtd (sgml-extid-pubid extid) file)) (goto-char (point-max))) (file @@ -2350,13 +2416,27 @@ (erase-buffer) (insert-file-contents file nil nil nil) (setq default-directory (file-name-directory file)) - (goto-char (point-min)) - (push file (sgml-dtd-dependencies sgml-dtd-info))) - (t - (push t (sgml-dtd-dependencies sgml-dtd-info)) - (save-excursion (sgml-entity-insert-text entity type)))))) - (t - (save-excursion (sgml-entity-insert-text entity type)))))) + (goto-char (point-min))) + (t ;; No file for entity + (save-excursion + (let* ((pubid (sgml-extid-pubid extid)) + (sysid (sgml-extid-sysid extid))) + (or (if sysid ; try the sysid hooks + (loop for fn in sgml-sysid-resolve-functions + thereis (funcall fn sysid))) + (progn + ;; Mark entity as not found + (setcdr (cddr entity) t) ;*** + (sgml-log-warning "External entity %s not found" + (sgml-entity-name entity)) + (when pubid + (sgml-log-warning " Public identifier %s" pubid)) + (when sysid + (sgml-log-warning " System identfier %s" sysid)) + nil)))))))) + (t ;; internal entity + (save-excursion + (insert (sgml-entity-text entity))))))) (defun sgml-pop-entity () (cond ((and (boundp 'sgml-previous-buffer) @@ -2411,7 +2491,7 @@ excludes includes pstate net-enabled conref &optional shortmap pshortmap asl))) eltype ; element object - ;;start ; start point in buffer + ;;start ; start point in buffer ;;end ; end point in buffer stag-epos ; start-tag entity position etag-epos ; end-tag entity position @@ -2433,13 +2513,8 @@ ) -;;element-end (e): -;; If bpos-p (etag-epos (e)): -;; return etag-epos (e) + etag-len (e) -;; If etag-len (e) = 0: return promote (etag-epos (e)) -;; else: return latest (etag-epos (e)) (defun sgml-tree-end (tree) - "Buffer position after end of TREE" + "Buffer position after end of TREE." (let ((epos (sgml-tree-etag-epos tree)) (len (sgml-tree-etag-len tree))) (cond ((sgml-bpos-p epos) @@ -2447,7 +2522,7 @@ ((zerop len) (sgml-epos-promote epos)) (t - (sgml-epos-latest epos))))) + (sgml-epos-after epos))))) ;;;; (text) Element view of parse tree @@ -2532,7 +2607,7 @@ ((zerop len) (sgml-epos-promote epos)) (t - (sgml-epos-latest epos))))) + (sgml-epos-after epos))))) (defun sgml-element-empty (element) "True if ELEMENT is empty." @@ -2567,38 +2642,66 @@ (point-min))) (goto-char (or (next-single-property-change (point) 'invisible) (point-max))))) - (when (and (not (input-pending-p)) + (when (and (not executing-macro) (or sgml-live-element-indicator - sgml-set-face)) - (let ((deactivate-mark nil) - (sgml-suppress-warning t) - (oldname sgml-current-element-name)) - (condition-case nil - (save-excursion + sgml-set-face) + (not (null sgml-buffer-parse-state)) + (sit-for 0)) + (let ((deactivate-mark nil)) + (sgml-need-dtd) + (let ((start + (save-excursion (sgml-find-start-point (point)) + (sgml-pop-all-entities) + (point))) + (eol-pos + (save-excursion (end-of-line 1) (point)))) + (let ((quiet (< (- (point) start) 500))) + ;;(message "Should parse %s to %s => %s" start (point) quiet) + (when (if quiet + t + (setq sgml-current-element-name "?") + (sit-for 1)) + + ;; Find current element (cond ((and (memq this-command sgml-users-of-last-element) sgml-last-element) (setq sgml-current-element-name (sgml-element-gi sgml-last-element))) - (sgml-live-element-indicator - (setq sgml-current-element-name "*error*") (save-excursion - (sgml-parse-to (point) (function input-pending-p))) - (unless (input-pending-p) - (setq sgml-current-element-name - (sgml-element-gi sgml-current-tree))))) - (unless (input-pending-p) - (force-mode-line-update) - (when (and sgml-set-face - (null - (sgml-tree-etag-epos - (sgml-pstate-top-tree sgml-buffer-parse-state)))) - (sit-for 0) - (sgml-parse-until-end-of nil nil - (function input-pending-p) - t)))) - (error nil)))))) - + (condition-case nil + (sgml-parse-to + (point) (function input-pending-p) quiet) + (error + (setq sgml-current-element-name "*error*"))) + (unless (input-pending-p) + (setq sgml-current-element-name + (sgml-element-gi sgml-current-tree)))))) + ;; Set face on current line + (when (and sgml-set-face (not (input-pending-p))) + (save-excursion + (condition-case nil + (sgml-parse-to + eol-pos (function input-pending-p) quiet) + (error nil))))))) + ;; Set face in rest of buffer + (sgml-fontify-buffer 6) ;*** make option for delay + )))) + +(defun sgml-fontify-buffer (delay) + (and + sgml-set-face + (null (sgml-tree-etag-epos + (sgml-pstate-top-tree sgml-buffer-parse-state))) + (sit-for delay) + (condition-case nil + (save-excursion + (message "Fontifying...") + (sgml-parse-until-end-of nil nil + (function input-pending-p) + t) + (message "Fontifying...done")) + (error nil)))) (defun sgml-set-active-dtd-indicator (name) (set (make-local-variable 'sgml-active-dtd-indicator) @@ -2614,11 +2717,11 @@ dtd top-tree) -(defsubst sgml-excludes () - (sgml-tree-excludes sgml-current-tree)) - -(defsubst sgml-includes () - (sgml-tree-includes sgml-current-tree)) +;(defsubst sgml-excludes () +; (sgml-tree-excludes sgml-current-tree)) + +;(defsubst sgml-includes () +; (sgml-tree-includes sgml-current-tree)) (defsubst sgml-current-mixed-p () (sgml-element-mixed sgml-current-tree)) @@ -2627,8 +2730,8 @@ "Set initial state of parsing" (make-local-variable 'before-change-function) (setq before-change-function 'sgml-note-change-at) - (set (make-local-variable 'after-change-function) - 'sgml-set-face-after-change) + (make-local-variable 'after-change-function) + (setq after-change-function 'sgml-set-face-after-change) (sgml-set-active-dtd-indicator (sgml-dtd-doctype dtd)) (let ((top-type ; Fake element type for the top ; node of the parse tree @@ -2647,7 +2750,8 @@ "Set parse state from TREE, either from start of TREE if WHERE is start or from after TREE if WHERE is after." (setq sgml-current-tree tree - sgml-markup-tree tree) + sgml-markup-tree tree + sgml-rs-ignore-pos 0 ) (let ((empty (sgml-element-empty tree))) (cond ((and (eq where 'start) @@ -2733,8 +2837,10 @@ (- after-tag before-tag) ; stag-len sgml-current-tree ; parent (1+ (sgml-tree-level sgml-current-tree)) ; level - (append (sgml-eltype-excludes eltype) (sgml-excludes)) - (append (sgml-eltype-includes eltype) (sgml-includes)) + (append (sgml-eltype-excludes eltype) + (sgml-tree-excludes sgml-current-tree)) + (append (sgml-eltype-includes eltype) + (sgml-tree-includes sgml-current-tree)) sgml-current-state (if (sgml-tree-net-enabled sgml-current-tree) 1) conref @@ -2752,8 +2858,12 @@ ;; (setf (sgml-tree-content sgml-current-tree) nt)))) ;; Install new node in tree (cond (sgml-previous-tree + (sgml-debug "Open element %s: after %s" + eltype (sgml-tree-eltype sgml-previous-tree)) (setf (sgml-tree-next sgml-previous-tree) nt)) (t + (sgml-debug "Open element %s: first in %s" + eltype (sgml-tree-eltype sgml-current-tree)) (setf (sgml-tree-content sgml-current-tree) nt))) ;; Prune tree ;; *** all the way up? tree-end = nil? @@ -2786,6 +2896,7 @@ (setq sgml-goal (point))) (when sgml-throw-on-element-change (throw sgml-throw-on-element-change 'end)) + (sgml-debug "Close element %s" (sgml-tree-eltype sgml-current-tree)) (setf (sgml-tree-etag-epos sgml-current-tree) ;;(sgml-promoted-epos before-tag after-tag) (sgml-epos before-tag)) @@ -2808,6 +2919,7 @@ (defun sgml-note-change-at (at &optional end) ;; Inform the cache that there have been some changes after AT (when sgml-buffer-parse-state + (sgml-debug "sgml-note-change-at %s" at) (let ((u (sgml-pstate-top-tree sgml-buffer-parse-state))) (when u ;;(message "%d" at) @@ -2860,12 +2972,12 @@ ;; Test if accepted in state ((or (eq state sgml-any) (and (sgml-model-group-p state) - (not (memq token (sgml-excludes))) - (or (memq token (sgml-includes)) + (not (memq token (sgml-tree-excludes tree))) + (or (memq token (sgml-tree-includes tree)) (sgml-get-move state token)))) nil) ;; Test if end tag implied - ((or (eq state sgml-empty) + ((or (eq state sgml-empty) (and (sgml-final-p state) (not (eq tree sgml-top-tree)))) (unless (eq state sgml-empty) ; not realy implied @@ -3180,6 +3292,9 @@ (defun sgml-lookup-shortref-map (table name) (cdr (assoc name (cdr table)))) +(defun sgml-lookup-shortref-name (table map) + (car (rassq map (cdr table)))) + (defun sgml-merge-shortmaps (tab1 tab2) "Merge tables of short reference maps TAB2 into TAB1, modifying TAB1." (nconc tab1 (cdr tab2))) @@ -3224,6 +3339,12 @@ (message "Parsing doctype...done")))) (setq sgml-markup-type 'doctype)) +(defun sgml-check-end-of-entity (type) + (unless (eobp) + (sgml-parse-error "Illegal character '%c' in %s" + (following-char) + type))) + (defun sgml-setup-doctype (docname external) (let ((sgml-parsing-dtd t)) (setq sgml-no-elements 0) @@ -3232,14 +3353,16 @@ (sgml-skip-ps) (cond ((sgml-parse-delim "DSO") - (sgml-check-dtd-subset) - (sgml-check-delim "DSC"))) + (let ((original-buffer (current-buffer))) + (sgml-check-dtd-subset) + (if (eq (current-buffer) original-buffer) + (sgml-check-delim "DSC") + (sgml-parse-error "Illegal character '%c' in doctype declaration" + (following-char)))))) (cond (external (sgml-push-to-entity (sgml-make-entity docname 'dtd external)) - (unless (eobp) - (sgml-check-dtd-subset) - (unless (eobp) - (sgml-parse-error "DTD subset ended"))) + (sgml-check-dtd-subset) + (sgml-check-end-of-entity "DTD subset") (sgml-pop-entity))) ;;; (loop for map in sgml-dtd-shortmaps do ;;; (sgml-add-shortref-map @@ -3316,7 +3439,7 @@ (t (forward-char 1))))) (defun sgml-do-usemap () - (let (mapname associated) + (let (mapname) ;;(setq sgml-markup-type 'usemap) (unless (sgml-parse-rni "empty") (setq mapname (sgml-check-name))) @@ -3476,6 +3599,7 @@ (defun sgml-need-dtd () "Make sure that an eventual DTD is parsed or loaded." + (sgml-pop-all-entities) (sgml-cleanup-entities) (when (null sgml-buffer-parse-state) ; first parse in this buffer ;;(sgml-set-initial-state) ; fall back DTD @@ -3485,6 +3609,7 @@ (if sgml-default-dtd-file (sgml-load-dtd sgml-default-dtd-file) (sgml-load-doctype))) + (sgml-debug "Need dtd getting state from %s" (buffer-name)) (setq sgml-dtd-info (sgml-pstate-dtd sgml-buffer-parse-state) sgml-top-tree (sgml-pstate-top-tree sgml-buffer-parse-state)) (sgml-set-global)) @@ -3515,7 +3640,7 @@ (setq sgml-dtd-info (sgml-pstate-dtd sgml-buffer-parse-state) sgml-top-tree (sgml-pstate-top-tree sgml-buffer-parse-state)) (sgml-set-global) - + ;;*** what is sgml-current-tree now? (while (stringp (cadr modifier)) ; Loop thru the context elements (let ((et (sgml-lookup-eltype (car modifier)))) (sgml-open-element et nil (point-min) (point-min)) @@ -3541,8 +3666,8 @@ (sgml-lookup-eltype seenel)))))) (let ((top (sgml-pstate-top-tree sgml-buffer-parse-state))) - (setf (sgml-tree-includes top) (sgml-includes)) - (setf (sgml-tree-excludes top) (sgml-excludes)) + (setf (sgml-tree-includes top) (sgml-tree-includes sgml-current-tree)) + (setf (sgml-tree-excludes top) (sgml-tree-excludes sgml-current-tree)) (setf (sgml-tree-shortmap top) sgml-current-shortmap) (setf (sgml-eltype-model (sgml-tree-eltype top)) sgml-current-state))) @@ -3552,12 +3677,15 @@ (setq sgml-current-omittag sgml-omittag sgml-current-shorttag sgml-shorttag sgml-current-localcat sgml-local-catalogs - sgml-current-local-ecat sgml-local-ecat-files)) + sgml-current-local-ecat sgml-local-ecat-files + sgml-current-top-buffer (current-buffer))) (defun sgml-parse-prolog () "Parse the document prolog to learn the DTD." (interactive) - (sgml-clear-log) + (sgml-debug "Parse prolog in buffer %s" (buffer-name)) + (unless sgml-debug + (sgml-clear-log)) (message "Parsing prolog...") (sgml-cleanup-entities) (sgml-set-global) @@ -3578,6 +3706,7 @@ (error "No document type defined by prolog")) (sgml-message "Parsing prolog...done")) + (defun sgml-parse-until-end-of (sgml-close-element-trap &optional cont extra-cond quiet) "Parse until the SGML-CLOSE-ELEMENT-TRAP has ended, @@ -3600,6 +3729,14 @@ called in the parser loop, and the loop is exited if the function returns t. If third argument QUIT is non-nil, no \"Parsing...\" message will be displayed." (sgml-need-dtd) + + (unless before-change-function + (message "WARN: before-change-function has been lost, restoring (%s)" + (current-buffer)) + (setq before-change-function 'sgml-note-change-at) + (setq after-change-function 'sgml-set-face-after-change) + ) + (sgml-find-start-point (min sgml-goal (point-max))) (assert sgml-current-tree) (let ((bigparse (and (not quiet) (> (- sgml-goal (point)) 10000)))) @@ -3610,13 +3747,15 @@ (when bigparse (sgml-message "")))) -(defun sgml-parse-continue (sgml-goal) +(defun sgml-parse-continue (sgml-goal &optional extra-cond quiet) "Parse until (at least) SGML-GOAL." (assert sgml-current-tree) - (sgml-message "Parsing...") + (unless quiet + (sgml-message "Parsing...")) (sgml-with-parser-syntax - (sgml-parser-loop nil)) - (sgml-message "")) + (sgml-parser-loop extra-cond)) + (unless quiet + (sgml-message ""))) (defun sgml-reparse-buffer (shortref-fun) "Reparse the buffer and let SHORTREF-FUN take care of short references. @@ -3705,7 +3844,7 @@ ;; Restore position, to consider the delim for S+ or data (progn (goto-char sgml-markup-start) nil))) - (setq sgml-rs-ignore-pos (point)) + (setq sgml-rs-ignore-pos sgml-markup-start) ; don't reconsider RS (funcall sgml-shortref-handler tem)) ((and (not (sgml-current-mixed-p)) (sgml-parse-s sgml-current-shortmap))) @@ -3731,7 +3870,7 @@ (when sgml-throw-on-element-change (throw sgml-throw-on-element-change 'start)) (setq sgml-conref-flag nil) - (let (temp net-enabled et asl) + (let (net-enabled et asl) (setq et (if (sgml-is-delim "TAGC") ; empty start-tag (sgml-do-empty-start-tag) (sgml-lookup-eltype (sgml-check-name)))) @@ -3839,8 +3978,9 @@ (defun sgml-is-goal-after-start (goal tree) (and tree - ;;(not (zerop (sgml-tree-stag-len tree))) - (> goal (sgml-element-start tree)))) + (if (sgml-bpos-p (sgml-tree-stag-epos tree)) + (> goal (sgml-tree-stag-epos tree)) + (>= goal (sgml-epos-after (sgml-tree-stag-epos tree)))))) (defun sgml-find-start-point (goal) (let ((u sgml-top-tree)) @@ -4124,4 +4264,7 @@ (provide 'psgml-parse) +;; Local variables: +;; byte-compile-warnings:(free-vars unresolved callargs redefine) +;; End: ;;; psgml-parse.el ends here
--- a/lisp/psgml/psgml-style.el Mon Aug 13 08:45:53 2007 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -;;; style.el --- example style file for psgml-fs.el and catalog.sgml - -( - ("example" - default-top 1 - default-bottom 1) - ("front") - ("body") - ("pubfront" text "") - ("abstract" - block t - before (block t text "ABSTRACT") - left 4) - ("p" block t) - ("title" block t) - ("titlegrp" block t bottom 2 default-bottom 0 default-top 0) - ("subtitle" before (text " // ")) - ("list" block t) - ("head" block t) - ("item" - left (+ (fs-char 'left) 3) - hang-from " * ") - ("keyword" - before (text "|") - after (text "|")) - ("chapter" block t top 2 before (text "CHAPTER")) - ("lit" block t literal t) - (t - before (text (format "<%s>" (sgml-element-gi e))) - after (text " ") - ) -)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/psgml/psgml-style.fs Mon Aug 13 08:46:35 2007 +0200 @@ -0,0 +1,32 @@ +;;; style.fs --- example style file for fs.el and catalog.sgml -*- lisp -*- + +( + ("example" + default-top 1 + default-bottom 1) + ("front") + ("body") + ("pubfront" text "") + ("abstract" + block t + before (block t text "ABSTRACT") + left 4) + ("p" block t) + ("title" block t) + ("titlegrp" block t bottom 2 default-bottom 0 default-top 0) + ("subtitle" before (text " // ")) + ("list" block t) + ("head" block t) + ("item" + left (+ (fs-char 'left) 3) + hang-from " * ") + ("keyword" + before (text "|") + after (text "|")) + ("chapter" block t top 2 before (text "CHAPTER")) + ("lit" block t literal t) + (t + before (text (format "<%s>" (sgml-element-gi e))) + after (text " ") + ) +)
--- a/lisp/psgml/psgml-xemacs.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/psgml/psgml-xemacs.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,10 +1,12 @@ ;;;; psgml-xemacs.el --- Part of SGML-editing mode with parsing support -;; $Id: psgml-xemacs.el,v 1.1.1.1 1996/12/18 03:35:23 steve Exp $ +;; $Id: psgml-xemacs.el,v 1.1.1.2 1996/12/18 03:47:15 steve Exp $ ;; Copyright (C) 1994 Lennart Staflin ;; Author: Lennart Staflin <lenst@lysator.liu.se> ;; William M. Perry <wmperry@indiana.edu> +;; Synced up with Ben Wing's changes for XEmacs 19.14 by +;; Steven L Baur <steve@miranova.com> ;; ;; This program is free software; you can redistribute it and/or @@ -90,6 +92,7 @@ (eval (event-object event))))) ((button-release-event-p event) ; don't beep twice nil) + ;; [sb] added condition ((and (fboundp 'event-matches-key-specifier-p) (event-matches-key-specifier-p event (quit-char))) (signal 'quit nil)) @@ -115,81 +118,6 @@ ;;;; XEmacs menu bar -(defvar sgml-dtd-menu - '("DTD" - ["Parse DTD" sgml-parse-prolog t] - ("Info" - ["Describe element type" sgml-describe-element-type t] - ["Describe entity" sgml-describe-entity t] - ["List elements" sgml-list-elements t] - ["List attributes" sgml-list-attributes t] - ["List terminals" sgml-list-terminals t] - ["List content elements" sgml-list-content-elements t] - ["List occur in elements" sgml-list-occur-in-elements t] - ) - "---" - ["Load Parsed DTD" sgml-load-dtd t] - ["Save Parsed DTD" sgml-save-dtd t] - )) - -(defvar sgml-fold-menu - '("Fold" - ["Fold Element" sgml-fold-element t] - ["Fold Subelement" sgml-fold-subelement t] - ["Fold Region" sgml-fold-region t] - ["Unfold Line" sgml-unfold-line t] - ["Unfold Element" sgml-unfold-element t] - ["Unfold All" sgml-unfold-all t] - ["Expand" sgml-expand-element t] - )) - -(defvar sgml-markup-menu - '("Markup" - ["Insert Element" (sgml-element-menu last-command-event) t] - ["Insert Start-Tag" (sgml-start-tag-menu last-command-event) t] - ["Insert End-Tag" (sgml-end-tag-menu last-command-event) t] - ["Tag Region" (sgml-tag-region-menu last-command-event) t] - ["Insert Attribute" (sgml-attrib-menu last-command-event) t] - ["Insert Entity" (sgml-entities-menu last-command-event) t] - )) - -(defvar - sgml-move-menu - '("Move" - ["Next trouble spot" sgml-next-trouble-spot t] - ["Next data field" sgml-next-data-field t] - ["Forward element" sgml-forward-element t] - ["Backward element" sgml-backward-element t] - ["Up element" sgml-up-element t] - ["Down element" sgml-down-element t] - ["Backward up element" sgml-backward-up-element t] - ["Beginning of element" sgml-beginning-of-element t] - ["End of element" sgml-end-of-element t] - ) - "Menu of move commands" - ) - -(defvar - sgml-modify-menu - '("Modify" - ["Normalize" sgml-normalize t] - ["Expand All Short References" sgml-expand-all-shortrefs t] - ["Expand Entity Reference" sgml-expand-entity-reference t] - ["Normalize Element" sgml-normalize-element t] - ["Make Character Reference" sgml-make-character-reference t] - ["Unmake Character Reference" (sgml-make-character-reference t) t] - ["Fill Element" sgml-fill-element t] - ["Change Element Name..." sgml-change-element-name t] - ["Edit Attributes..." sgml-edit-attributes t] - ["Kill Markup" sgml-kill-markup t] - ["Kill Element" sgml-kill-element t] - ["Untag Element" sgml-untag-element t] - ["Decode Character Entities" sgml-charent-to-display-char t] - ["Encode Characters" sgml-display-char-to-charent t] - ) - "Menu of modification commands" - ) - (defun sgml-make-options-menu (vars) (loop for var in vars for type = (sgml-variable-type var) @@ -216,62 +144,21 @@ (`(sgml-do-set-option '(, var))) t))))) -(defvar sgml-sgml-menu - (append - '("SGML" - ["Reset Buffer" normal-mode t] - ["Show Context" sgml-show-context t] - ["What Element" sgml-what-element t] - ["Show Valid Tags" sgml-list-valid-tags t] - ["Show/Hide Warning Log" sgml-show-or-clear-log t] - ["Validate" sgml-validate t]) - (if (or (not (boundp 'emacs-major-version)) - (and (boundp 'emacs-minor-version) - (< emacs-minor-version 10))) - '( - ["File Options" sgml-file-options-menu t] - ["User Options" sgml-user-options-menu t] - ) - (list - (cons "File Options" (sgml-make-options-menu sgml-file-options)) - (cons "User Options" (sgml-make-options-menu sgml-user-options)))) - '(["Save File Options" sgml-save-options t] - ["Submit Bug Report" sgml-submit-bug-report t] - ))) -(defun sgml-install-xemacs-menus () - "Install xemacs menus for psgml mode" - (set-buffer-menubar (copy-sequence current-menubar)) - (add-menu nil (car sgml-sgml-menu) (cdr sgml-sgml-menu)) - (add-menu nil (car sgml-markup-menu) (copy-sequence (cdr sgml-markup-menu))) - (add-menu nil (car sgml-modify-menu) (cdr sgml-modify-menu)) - (add-menu nil (car sgml-move-menu) (cdr sgml-move-menu)) - (add-menu nil (car sgml-fold-menu) (cdr sgml-fold-menu)) - (add-menu nil (car sgml-dtd-menu) (cdr sgml-dtd-menu)) -) - - -;;;; Custom menus - -(defun sgml-build-custom-menus () - (and sgml-custom-markup (add-menu-item '("Markup") "------------" nil t - "Insert Element")) - (mapcar (function - (lambda (x) - (add-menu-item '("Markup") (nth 0 x) - (list 'sgml-insert-markup (nth 1 x)) - t - "------------"))) - sgml-custom-markup) - (and sgml-custom-dtd (add-menu-item '("DTD") "-------------" nil t)) - (mapcar (function - (lambda (x) - (add-menu-item '("DTD") (nth 0 x) - (list 'apply ''sgml-doctype-insert - (cadr x) - (list 'quote (cddr x))) - t))) - sgml-custom-dtd)) +(unless (or (not (boundp 'emacs-major-version)) + (and (boundp 'emacs-minor-version) + (< emacs-minor-version 10))) + (loop for ent on sgml-main-menu + if (vectorp (car ent)) + do (cond + ((equal (aref (car ent) 0) "File Options >") + (setcar ent + (cons "File Options" + (sgml-make-options-menu sgml-file-options)))) + ((equal (aref (car ent) 0) "User Options >") + (setcar ent + (cons "User Options" + (sgml-make-options-menu sgml-user-options))))))) ;;;; Key definitions @@ -311,9 +198,9 @@ (let ((face (cdr (assq type sgml-markup-faces))) o) (loop for e being the extents from start to end - do (when (extent-property e 'type) + do (when (extent-property e 'sgml-type) (cond ((and (null o) - (eq type (extent-property e 'type))) + (eq type (extent-property e 'sgml-type))) (setq o e)) (t (delete-extent e))))) @@ -321,13 +208,15 @@ (set-extent-endpoints o start end)) (face (setq o (make-extent start end)) - (set-extent-property o 'type type) + (set-extent-property o 'sgml-type type) (set-extent-property o 'face face) + (set-extent-property o 'start-open t) (set-extent-face o face))))) (defun sgml-set-face-after-change (start end &optional pre-len) + ;; This should not be needed with start-open t (when sgml-set-face - (let ((o (extent-at start nil 'type))) + (let ((o (extent-at start nil 'sgml-type))) (cond ((null o)) ((= start (extent-start-position o))
--- a/lisp/psgml/psgml.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/psgml/psgml.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,7 +1,7 @@ ;;; psgml.el --- SGML-editing mode with parsing support -;; $Id: psgml.el,v 1.1.1.1 1996/12/18 03:35:23 steve Exp $ +;; $Id: psgml.el,v 1.1.1.2 1996/12/18 03:47:15 steve Exp $ -;; Copyright (C) 1993, 1994, 1995 Lennart Staflin +;; Copyright (C) 1993, 1994, 1995, 1996 Lennart Staflin ;; Copyright (C) 1992 Free Software Foundation, Inc. ;; Author: Lennart Staflin <lenst@lysator.liu.se> @@ -50,12 +50,13 @@ ;;; Code: -(defconst psgml-version "1.0a9" +(defconst psgml-version "1.0a12" "Version of psgml package.") (defconst psgml-maintainer-address "lenst@lysator.liu.se") (require 'cl) +(require 'easymenu) (defvar sgml-debug nil) @@ -69,6 +70,7 @@ "Abbrev table in use in sgml-mode.") (define-abbrev-table 'sgml-mode-abbrev-table ()) +;;; Wing addition (defvar sgml-mode-syntax-table nil "Syntax table used in sgml mode.") @@ -245,7 +247,7 @@ (defvar sgml-balanced-tag-edit t "*If non-nil, always insert start-end tag pairs.") -(defvar sgml-omittag-transparent (not sgml-balanced-tag-edit) +(defvar sgml-omittag-transparent (not sgml-balanced-tag-edit) ;; wing change "*If non-nil, will show legal tags inside elements with omittable start tags and legal tags beyond omittable end tags.") @@ -275,6 +277,10 @@ ("Yes" . t) ("Ask" . ask))) +(defvar sgml-trace-entity-lookup nil + "*If non-nil, log messages about catalog files used to look for +external entities.") + (defvar sgml-indent-step 2 "*How much to increment indent for every element level. If nil, no indentation. @@ -287,6 +293,7 @@ Setting this variable automatically makes it local to the current buffer.") (make-variable-buffer-local 'sgml-indent-data) +;;; Wing addition (defvar sgml-inhibit-indent-tags nil "*List of tags within which indentation is inhibited. The tags should be given as strings.") @@ -296,6 +303,7 @@ Set this before loading psgml.") (defvar sgml-system-path nil + ;; wing addition "*List of directories used to look for system identifiers. The directory listed in `sgml-data-directory' is always searched in addition to the directories listed here.") @@ -303,7 +311,7 @@ (defun sgml-parse-colon-path (cd-path) "Explode a colon-separated list of paths into a string list." - (let (cd-prefix cd-list (cd-start 0) cd-colon) + (let (cd-list (cd-start 0) cd-colon) (setq cd-path (concat cd-path ":")) (while (setq cd-colon (string-match ":" cd-path cd-start)) (setq cd-list @@ -317,6 +325,7 @@ (defvar sgml-public-map (sgml-parse-colon-path (or (getenv "SGML_PATH") + ;; Wing change (concat "%S:" (directory-file-name sgml-data-directory) "%o/%c/%d"))) @@ -345,15 +354,17 @@ (defvar sgml-catalog-files (sgml-parse-colon-path (or (getenv "SGML_CATALOG_FILES") + ;; Wing addition (concat "CATALOG:" - (expand-file-name - "CATALOG" - sgml-data-directory)))) + (expand-file-name + "CATALOG" + sgml-data-directory)))) "*List of catalog entry files. The files are in the format defined in the SGML Open Draft Technical Resolution on Entity Management.") (put 'sgml-catalog-files 'sgml-type 'list) +;;; Wing addition (defvar sgml-ecat-files (list "ECAT" "~/sgml/ECAT" @@ -442,7 +453,7 @@ ;;; Its error messages can be parsed by next-error. ;;; The -s option suppresses output. -(defvar sgml-validate-command "sgmls -s %s %s" +(defvar sgml-validate-command "nsgmls -s %s %s" "*The shell command to validate an SGML document. This is a `format' control string that by default should contain two @@ -470,8 +481,10 @@ format control string instead of the defaults.") (defvar sgml-validate-error-regexps - '(("\\(error\\|warning\\) at \\([^,]+\\), line \\([0-9]+\\)" 2 3) - ("^\\(.+\\):\\([0-9]+\\):\\([0-9]+\\):E: " 1 2 3)) + '((":\\(.+\\):\\([0-9]+\\):\\([0-9]+\\):[EX]: " 1 2 3) + ("\\(error\\|warning\\) at \\([^,]+\\), line \\([0-9]+\\)" 2 3) + ("\n[a-zA-Z]?:?[^0-9 \n\t:]+:[ \t]*\\([^ \n\t:]+\\):\ +\\([0-9]+\\):\\(\\([0-9]+\\)[: \t]\\)?" 1 2 4)) "Alist of regexps to recognize error messages from `sgml-validate'. See `compilation-error-regexp-alist'.") @@ -512,6 +525,8 @@ sgml-balanced-tag-edit sgml-omittag-transparent sgml-leave-point-after-insert + sgml-insert-missing-element-comment + sgml-insert-end-tag-on-new-line sgml-warn-about-undefined-elements sgml-warn-about-undefined-entities sgml-ignore-undefined-elements @@ -521,6 +536,7 @@ sgml-validate-command sgml-markup-faces sgml-system-identifiers-are-preferred + sgml-trace-entity-lookup sgml-system-path sgml-public-map sgml-catalog-files @@ -610,10 +626,9 @@ (defun sgml-save-options () "Save user options for sgml-mode that have buffer local values." (interactive) - (let ((l sgml-file-options)) - (loop for var in sgml-file-options do - (when (sgml-valid-option var) - (sgml-set-local-variable var (symbol-value var)))))) + (loop for var in sgml-file-options do + (when (sgml-valid-option var) + (sgml-set-local-variable var (symbol-value var))))) ;;;; Run hook with args @@ -795,12 +810,138 @@ (define-key sgml-mode-map "\e\C-t" 'sgml-transpose-element) (define-key sgml-mode-map "\M-\t" 'sgml-complete) -;;; Menu bar +;;;; Menu bar + +(easy-menu-define + sgml-dtd-menu sgml-mode-map "DTD menu" + '("DTD")) + +(defconst sgml-dtd-root-menu + '("DTD" + ["Parse DTD" sgml-parse-prolog t] + ("Info" + ["General DTD info" sgml-general-dtd-info t] + ["Describe element type" sgml-describe-element-type t] + ["Describe entity" sgml-describe-entity t] + ["List elements" sgml-list-elements t] + ["List attributes" sgml-list-attributes t] + ["List terminals" sgml-list-terminals t] + ["List content elements" sgml-list-content-elements t] + ["List occur in elements" sgml-list-occur-in-elements t] + ) + "--" + ["Load Parsed DTD" sgml-load-dtd t] + ["Save Parsed DTD" sgml-save-dtd t] + )) + +(easy-menu-define + sgml-view-menu sgml-mode-map "View menu" + '("View" + ["Fold Element" sgml-fold-element t] + ["Fold Subelement" sgml-fold-subelement t] + ["Unfold Line" sgml-unfold-line t] + ["Unfold Element" sgml-unfold-element t] + ["Expand" sgml-expand-element t] + ["Fold Region" sgml-fold-region t] + ["Unfold All" sgml-unfold-all t] + ["Hide Tags" sgml-hide-tags t] + ["Hide Attributes" sgml-hide-attributes t] + ["Show All Tags" sgml-show-tags t] + ) + ) + + +(defconst sgml-markup-root-menu + '("Markup" + ["Insert Element" sgml-element-menu t] + ["Insert Start-Tag" sgml-start-tag-menu t] + ["Insert End-Tag" sgml-end-tag-menu t] + ["Tag Region" sgml-tag-region-menu t] + ["Insert Attribute" sgml-attrib-menu t] + ["Insert Entity" sgml-entities-menu t] + )) + +(easy-menu-define + sgml-markup-menu sgml-mode-map "Markup menu" + sgml-markup-root-menu) -(eval-when-compile - (autoload 'sgml-build-custom-menus "psgml-other")) ; Avoid compiler warnings +(easy-menu-define + sgml-move-menu sgml-mode-map "Menu of move commands" + '("Move" + ["Next trouble spot" sgml-next-trouble-spot t] + ["Next data field" sgml-next-data-field t] + ["Forward element" sgml-forward-element t] + ["Backward element" sgml-backward-element t] + ["Up element" sgml-up-element t] + ["Down element" sgml-down-element t] + ["Backward up element" sgml-backward-up-element t] + ["Beginning of element" sgml-beginning-of-element t] + ["End of element" sgml-end-of-element t] + )) + +(easy-menu-define + sgml-modify-menu sgml-mode-map "Menu of modification commands" + '("Modify" + ["Normalize" sgml-normalize t] + ["Expand All Short References" sgml-expand-all-shortrefs t] + ["Expand Entity Reference" sgml-expand-entity-reference t] + ["Normalize Element" sgml-normalize-element t] + ["Make Character Reference" sgml-make-character-reference t] + ["Unmake Character Reference" (sgml-make-character-reference t) t] + ["Fill Element" sgml-fill-element t] + ["Change Element Name..." sgml-change-element-name t] + ["Edit Attributes..." sgml-edit-attributes t] + ["Kill Markup" sgml-kill-markup t] + ["Kill Element" sgml-kill-element t] + ["Untag Element" sgml-untag-element t] + ["Trim and leave element" sgml-trim-and-leave-element t] + ["Decode Character Entities" sgml-charent-to-display-char t] + ["Encode Characters" sgml-display-char-to-charent t] + ) + ) -;; load menu file at the end +(easy-menu-define + sgml-main-menu sgml-mode-map "Main menu" + '("SGML" + ["Reset Buffer" normal-mode t] + ["End Element" sgml-insert-end-tag t] + ["Show Context" sgml-show-context t] + ["What Element" sgml-what-element t] + ["List Valid Tags" sgml-list-valid-tags t] + ["Show/Hide Warning Log" sgml-show-or-clear-log t] + ["Validate" sgml-validate t] + ["File Options >" sgml-file-options-menu t] + ["User Options >" sgml-user-options-menu t] + ["Save File Options" sgml-save-options t] + ["Submit Bug Report" sgml-submit-bug-report t] + ) + ) + + +(defun sgml-build-custom-menus () + "Build custom parts of Markup and DTD menus." + (let ((button3 (lookup-key (current-local-map) [button3]))) + (easy-menu-define + sgml-markup-menu sgml-mode-map "Markup menu" + (append sgml-markup-root-menu + (list "----") + (loop for e in sgml-custom-markup collect + (vector (first e) + (` (sgml-insert-markup (, (cadr e)))) + t)))) + (easy-menu-define + sgml-dtd-menu sgml-mode-map "DTD menu" + (append sgml-dtd-root-menu + (list "----") + (loop for e in sgml-custom-dtd collect + (vector (first e) + (` (sgml-doctype-insert (, (cadr e)) + '(, (cddr e)))) + t)))) + (unless (or (null button3) + (numberp button3)) + (local-set-key [button3] button3)))) + ;;;; Post command hook @@ -815,7 +956,9 @@ (make-variable-buffer-local 'sgml-buffer-parse-state) (eval-and-compile ; Interface to psgml-parse - (loop for fun in '(sgml-need-dtd sgml-update-display sgml-subst-expand + (loop for fun in '(sgml-need-dtd sgml-update-display + sgml-fontify-buffer + sgml-subst-expand sgml-declaration) do (autoload fun "psgml-parse"))) @@ -828,7 +971,8 @@ (not (zerop (buffer-size))) (looking-at ".*<")) (setq sgml-auto-activate-dtd-tried t) - (sgml-need-dtd)) + (sgml-need-dtd) + (sgml-fontify-buffer 0)) (when sgml-buffer-parse-state (sgml-update-display)))) @@ -953,7 +1097,13 @@ (setq sgml-default-dtd-file nil))) (add-hook 'post-command-hook 'sgml-command-post 'append) (run-hooks 'text-mode-hook 'sgml-mode-hook) - (sgml-build-custom-menus)) + (sgml-build-custom-menus) + (easy-menu-add sgml-main-menu) + (easy-menu-add sgml-modify-menu) + (easy-menu-add sgml-move-menu) + (easy-menu-add sgml-markup-menu) + (easy-menu-add sgml-view-menu) + (easy-menu-add sgml-dtd-menu)) (defun sgml-default-dtd-file () (and (buffer-file-name) @@ -1162,6 +1312,7 @@ nil nil nil) (autoload 'sgml-indent-line "psgml-edit" nil) +(autoload 'sgml-element-endable-p "psgml-edit" nil) ;;; Generated by sgml-build-autoloads @@ -1294,8 +1445,7 @@ (cond (sgml-running-xemacs - (require 'psgml-xemacs) - (add-hook 'sgml-mode-hook 'sgml-install-xemacs-menus)) + (require 'psgml-xemacs)) (t (require 'psgml-other)))
--- a/lisp/rmail/rmail-lucid.el Mon Aug 13 08:45:53 2007 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,218 +0,0 @@ -;; Mouse and font support for RMAIL running in Lucid GNU Emacs -;; written by Wilson H. Tien (wtien@urbana.mcd.mot.com); modified by jwz. -;; Copyright (C) 1992-1993 Free Software Foundation, Inc. - -;; This file is part of XEmacs. - -;; XEmacs 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. - -;; XEmacs 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 XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. - -;;; Right button pops up a menu of commands in Rmail and Rmail summary buffers. -;;; Middle button selects indicated mail message in Rmail summary buffer - -(defvar rmail-summary-mode-menu - '("Rmail Summary Commands" - ["Select Message" rmail-summary-goto-msg t nil] - "----" - ["Previous Page" scroll-down t] - ["Next Page" scroll-up t] - "----" - ["Delete Message" rmail-summary-delete-forward t nil] - ["Undelete Message" rmail-summary-undelete t nil] - "----" - ["Exit rmail Summary" rmail-summary-exit t] - ["Quit rmail" rmail-summary-quit t])) - -(defun rmail-summary-update-menubar () - ;; if min point is in visible in the window, don't make page-up menu item - ;; selectable - (let ((current-menubar rmail-summary-mode-menu) - (select '("Select Message")) - (delete '("Delete Message")) - (undelete '("Undelete Message")) - (prev-page '("Previous Page")) - (next-page '("Next Page"))) - (beginning-of-line) - (let ((curmsg (string-to-int - (buffer-substring (point) - (min (point-max) (+ 5 (point)))))) - deleted-p) - (if (= 0 curmsg) - (progn - (rmail-update-menu-item delete nil) - (rmail-update-menu-item undelete nil) - (rmail-update-menu-item select nil)) - (pop-to-buffer rmail-buffer) - (setq deleted-p (rmail-message-deleted-p curmsg)) - (pop-to-buffer rmail-summary-buffer) - (let ((delete-menu-item - (car (find-menu-item current-menubar delete))) - (undelete-menu-item - (car (find-menu-item current-menubar undelete))) - (select-menu-item - (car (find-menu-item current-menubar select))) - (msg (format "#%d" curmsg))) - (aset delete-menu-item 2 (not deleted-p)) - (aset delete-menu-item 3 msg) - (aset undelete-menu-item 2 deleted-p) - (aset undelete-menu-item 3 msg) - (aset select-menu-item 2 t) - (aset select-menu-item 3 msg)))) - (rmail-update-menu-item prev-page (> (window-start) (point-min))) - (rmail-update-menu-item next-page (< (window-end) (point-max))))) - -(defun rmail-summary-mode-menu (event) - "Pops up a menu of applicable rmail summary commands." - (interactive "e") - (mouse-set-point event) - (beginning-of-line) - (rmail-summary-update-menubar) - (popup-menu rmail-summary-mode-menu)) - -;; The following are for rmail mode -(defconst rmail-mode-menu - '("Rmail Commands" - ["Previous Page" scroll-down t] - ["Next Page" scroll-up t] - ["Top Of This Message" rmail-beginning-of-message t] - "----" - "Go To Message:" - "----" - ["Next Nondeleted Message" rmail-next-undeleted-message t] - ["Previous Nondeleted Message" rmail-previous-undeleted-message t] - ["Next Message" rmail-next-message t] - ["Previous Message" rmail-previous-message t] - ["First Message" rmail-show-message t] - ["Last Message" rmail-last-message t] - "----" - ["Delete This Message" rmail-delete-forward t] - ["Undelete This Message" rmail-undelete-previous-message t] - ["Save This Message" rmail-output-to-rmail-file t] - "----" - ["Reply This Message" rmail-reply t] - ["Forward This Message" rmail-forward t] -; ["Continue This Message" rmail-continue t] - "----" - ["Add Label" rmail-add-label t] - ["Kill Label" rmail-kill-label t] - ["Next Labeled Message" rmail-next-labeled-message t] - ["Previous Labeled Message" rmail-previous-labeled-message t] - ["Summary by Label" rmail-summary-by-labels t] - "----" - ["Summary" rmail-summary t] - ["Get New Mail" rmail-get-new-mail t] - ["rmail Input From" rmail-input t] - ["Expunge rmail" rmail-expunge t] - ["Expunge and Save" rmail-expunge-and-save t] - ["Quit rmail" rmail-quit t])) - -(defun rmail-update-menu-item (item p) - "If P is true, enable the menu item. O/w disable it." - (aset (car (or (find-menu-item current-menubar item) - (error "couldn't find rmail menu item %S" item))) - 2 p)) - -(defun rmail-update-menubar () - (let ((current-menubar rmail-mode-menu) - (prev-page '("Previous Page")) - (next-page '("Next Page")) - (top-page '("Top Of This Message")) - (real-next '("Next Message")) - (real-prev '("Previous Message")) - (undel-next '("Next Nondeleted Message")) - (undel-prev '("Previous Nondeleted Message")) - (delete '("Delete This Message")) - (undelete '("Undelete This Message")) - i) - ;; Disable/enable page-up/page-down menu items - (rmail-update-menu-item prev-page (> (window-start) (point-min))) - (rmail-update-menu-item next-page (< (window-end) (point-max))) - (rmail-update-menu-item top-page (> (window-start) (point-min))) - (rmail-update-menu-item real-next - (/= rmail-current-message rmail-total-messages)) - (rmail-update-menu-item real-prev (/= rmail-current-message 1)) - (setq i (1+ rmail-current-message)) - (while (and (<= i rmail-total-messages) (rmail-message-deleted-p i)) - (setq i (1+ i))) - (rmail-update-menu-item undel-next (<= i rmail-total-messages)) - (setq i (1- rmail-current-message)) - (while (and (>= i 1) (rmail-message-deleted-p i)) - (setq i (1- i))) - (rmail-update-menu-item undel-prev (>= i 1)) - (rmail-update-menu-item delete - (not (rmail-message-deleted-p rmail-current-message))) - (rmail-update-menu-item undelete - (rmail-message-deleted-p rmail-current-message)) - t)) - -(defun rmail-mode-menu (event) - "Pops up a menu of applicable rmail commands." - (interactive "e") - (select-window (event-window event)) - (rmail-update-menubar) - (popup-menu rmail-mode-menu)) - -(defun rmail-activate-menubar-hook () - (cond ((eq major-mode 'rmail-mode) - (rmail-update-menubar)) - ((eq major-mode 'rmail-summary-mode) - (rmail-summary-update-menubar)))) - -(add-hook 'activate-menubar-hook 'rmail-activate-menubar-hook) - -;;; Put message headers in boldface, etc... - -(require 'highlight-headers) - -(defun rmail-fontify-headers () - (highlight-headers (point-min) (point-max) t)) - -(add-hook 'rmail-show-message-hook 'rmail-fontify-headers) - -;; MENU and MENUBAR setup for both Rmail and Rmail summary buffers -(defun rmail-install-menubar () - (if (and current-menubar (not (assoc (car rmail-mode-menu) current-menubar))) - (let ((menu (cond ((eq major-mode 'rmail-mode) rmail-mode-menu) - ((eq major-mode 'rmail-summary-mode) - rmail-summary-mode-menu) - (t (error "not rmail or rmail summary mode"))))) - (set-buffer-menubar (copy-sequence current-menubar)) - (add-menu nil (car rmail-mode-menu) (cdr menu))))) - -(defun rmail-mode-menu-setup () - (rmail-install-menubar) - (define-key rmail-mode-map 'button3 'rmail-mode-menu)) - -(add-hook 'rmail-mode-hook 'rmail-mode-menu-setup) - -(defun rmail-summary-mode-menu-setup () - (rmail-install-menubar) - (define-key rmail-summary-mode-map 'button2 'rmail-summary-mouse-goto-msg) - (define-key rmail-summary-mode-map 'button3 'rmail-summary-mode-menu)) - -(defun rmail-summary-mouse-goto-msg (e) - (interactive "e") - (mouse-set-point e) - (beginning-of-line) - (rmail-summary-goto-msg)) - -(defun rmail-install-mouse-tracker () - (require 'mode-motion) - (setq mode-motion-hook 'mode-motion-highlight-line)) - -(add-hook 'rmail-summary-mode-hook 'rmail-install-mouse-tracker) -(add-hook 'rmail-summary-mode-hook 'rmail-summary-mode-menu-setup) - - -(provide 'rmail-lucid)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/rmail/rmail-xemacs.el Mon Aug 13 08:46:35 2007 +0200 @@ -0,0 +1,220 @@ +;; Mouse and font support for RMAIL running in Lucid GNU Emacs +;; written by Wilson H. Tien (wtien@urbana.mcd.mot.com); modified by jwz. +;; Copyright (C) 1992-1993 Free Software Foundation, Inc. + +;; This file is part of XEmacs. + +;; XEmacs 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. + +;; XEmacs 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 XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + +;;; Right button pops up a menu of commands in Rmail and Rmail summary buffers. +;;; Middle button selects indicated mail message in Rmail summary buffer + +(defvar rmail-summary-mode-menu + '("Rmail Summary Commands" + ["Select Message" rmail-summary-goto-msg t nil] + "----" + ["Previous Page" scroll-down t] + ["Next Page" scroll-up t] + "----" + ["Delete Message" rmail-summary-delete-forward t nil] + ["Undelete Message" rmail-summary-undelete t nil] + "----" + ["Exit rmail Summary" rmail-summary-exit t] + ["Quit rmail" rmail-summary-quit t])) + +(defun rmail-summary-update-menubar () + ;; if min point is in visible in the window, don't make page-up menu item + ;; selectable + (let ((current-menubar rmail-summary-mode-menu) + (select '("Select Message")) + (delete '("Delete Message")) + (undelete '("Undelete Message")) + (prev-page '("Previous Page")) + (next-page '("Next Page"))) + (beginning-of-line) + (let ((curmsg (string-to-int + (buffer-substring (point) + (min (point-max) (+ 5 (point)))))) + deleted-p) + (if (= 0 curmsg) + (progn + (rmail-update-menu-item delete nil) + (rmail-update-menu-item undelete nil) + (rmail-update-menu-item select nil)) + (pop-to-buffer rmail-buffer) + (setq deleted-p (rmail-message-deleted-p curmsg)) + (pop-to-buffer rmail-summary-buffer) + (let ((delete-menu-item + (car (find-menu-item current-menubar delete))) + (undelete-menu-item + (car (find-menu-item current-menubar undelete))) + (select-menu-item + (car (find-menu-item current-menubar select))) + (msg (format "#%d" curmsg))) + (aset delete-menu-item 2 (not deleted-p)) + (aset delete-menu-item 3 msg) + (aset undelete-menu-item 2 deleted-p) + (aset undelete-menu-item 3 msg) + (aset select-menu-item 2 t) + (aset select-menu-item 3 msg)))) + (rmail-update-menu-item prev-page (> (window-start) (point-min))) + (rmail-update-menu-item next-page (< (window-end) (point-max))))) + +(defun rmail-summary-mode-menu (event) + "Pops up a menu of applicable rmail summary commands." + (interactive "e") + (mouse-set-point event) + (beginning-of-line) + (rmail-summary-update-menubar) + (popup-menu rmail-summary-mode-menu)) + +;; The following are for rmail mode +(defconst rmail-mode-menu + '("Rmail Commands" + ["Previous Page" scroll-down t] + ["Next Page" scroll-up t] + ["Top Of This Message" rmail-beginning-of-message t] + "----" + "Go To Message:" + "----" + ["Next Nondeleted Message" rmail-next-undeleted-message t] + ["Previous Nondeleted Message" rmail-previous-undeleted-message t] + ["Next Message" rmail-next-message t] + ["Previous Message" rmail-previous-message t] + ["First Message" rmail-show-message t] + ["Last Message" rmail-last-message t] + "----" + ["Delete This Message" rmail-delete-forward t] + ["Undelete This Message" rmail-undelete-previous-message t] + ["Save This Message" rmail-output-to-rmail-file t] + "----" + ["Reply This Message" rmail-reply t] + ["Forward This Message" rmail-forward t] +; ["Continue This Message" rmail-continue t] + "----" + ["Add Label" rmail-add-label t] + ["Kill Label" rmail-kill-label t] + ["Next Labeled Message" rmail-next-labeled-message t] + ["Previous Labeled Message" rmail-previous-labeled-message t] + ["Summary by Label" rmail-summary-by-labels t] + "----" + ["Summary" rmail-summary t] + ["Get New Mail" rmail-get-new-mail t] + ["rmail Input From" rmail-input t] + ["Expunge rmail" rmail-expunge t] + ["Expunge and Save" rmail-expunge-and-save t] + ["Quit rmail" rmail-quit t])) + +(defun rmail-update-menu-item (item p) + "If P is true, enable the menu item. O/w disable it." + (aset (car (or (find-menu-item current-menubar item) + (error "couldn't find rmail menu item %S" item))) + 2 p)) + +(defun rmail-update-menubar () + (let ((current-menubar rmail-mode-menu) + (prev-page '("Previous Page")) + (next-page '("Next Page")) + (top-page '("Top Of This Message")) + (real-next '("Next Message")) + (real-prev '("Previous Message")) + (undel-next '("Next Nondeleted Message")) + (undel-prev '("Previous Nondeleted Message")) + (delete '("Delete This Message")) + (undelete '("Undelete This Message")) + i) + ;; Disable/enable page-up/page-down menu items + (rmail-update-menu-item prev-page (> (window-start) (point-min))) + (rmail-update-menu-item next-page (< (window-end) (point-max))) + (rmail-update-menu-item top-page (> (window-start) (point-min))) + (rmail-update-menu-item real-next + (/= rmail-current-message rmail-total-messages)) + (rmail-update-menu-item real-prev (/= rmail-current-message 1)) + (setq i (1+ rmail-current-message)) + (while (and (<= i rmail-total-messages) (rmail-message-deleted-p i)) + (setq i (1+ i))) + (rmail-update-menu-item undel-next (<= i rmail-total-messages)) + (setq i (1- rmail-current-message)) + (while (and (>= i 1) (rmail-message-deleted-p i)) + (setq i (1- i))) + (rmail-update-menu-item undel-prev (>= i 1)) + (rmail-update-menu-item delete + (not (rmail-message-deleted-p rmail-current-message))) + (rmail-update-menu-item undelete + (rmail-message-deleted-p rmail-current-message)) + t)) + +(defun rmail-mode-menu (event) + "Pops up a menu of applicable rmail commands." + (interactive "e") + (select-window (event-window event)) + (rmail-update-menubar) + (popup-menu rmail-mode-menu)) + +(defun rmail-activate-menubar-hook () + (cond ((eq major-mode 'rmail-mode) + (rmail-update-menubar)) + ((eq major-mode 'rmail-summary-mode) + (rmail-summary-update-menubar)))) + +(add-hook 'activate-menubar-hook 'rmail-activate-menubar-hook) + +;;; Put message headers in boldface, etc... + +(require 'highlight-headers) + +(defun rmail-fontify-headers () + (highlight-headers (point-min) (point-max) t)) + +(add-hook 'rmail-show-message-hook 'rmail-fontify-headers) + +;; MENU and MENUBAR setup for both Rmail and Rmail summary buffers +(defun rmail-install-menubar () + (if (and current-menubar (not (assoc (car rmail-mode-menu) current-menubar))) + (let ((menu (cond ((eq major-mode 'rmail-mode) rmail-mode-menu) + ((eq major-mode 'rmail-summary-mode) + rmail-summary-mode-menu) + (t (error "not rmail or rmail summary mode"))))) + (set-buffer-menubar (copy-sequence current-menubar)) + (add-menu nil (car rmail-mode-menu) (cdr menu))))) + +(defun rmail-mode-menu-setup () + (rmail-install-menubar) + (define-key rmail-mode-map 'button3 'rmail-mode-menu)) + +(if (featurep 'menubar) + (add-hook 'rmail-mode-hook 'rmail-mode-menu-setup)) + +(defun rmail-summary-mode-menu-setup () + (rmail-install-menubar) + (define-key rmail-summary-mode-map 'button2 'rmail-summary-mouse-goto-msg) + (define-key rmail-summary-mode-map 'button3 'rmail-summary-mode-menu)) + +(defun rmail-summary-mouse-goto-msg (e) + (interactive "e") + (mouse-set-point e) + (beginning-of-line) + (rmail-summary-goto-msg)) + +(defun rmail-install-mouse-tracker () + (require 'mode-motion) + (setq mode-motion-hook 'mode-motion-highlight-line)) + +(add-hook 'rmail-summary-mode-hook 'rmail-install-mouse-tracker) +(if (featurep 'menubar) + (add-hook 'rmail-summary-mode-hook 'rmail-summary-mode-menu-setup)) + + +(provide 'rmail-xemacs)
--- a/lisp/rmail/rmail.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/rmail/rmail.el Mon Aug 13 08:46:35 2007 +0200 @@ -208,7 +208,7 @@ (list (read-file-name "Run rmail on RMAIL file: " nil nil t)))) (if (string-match "XEmacs" emacs-version) - (require 'rmail-lucid)) + (require 'rmail-xemacs)) (or rmail-last-file (setq rmail-last-file (expand-file-name "~/xmail"))) (let* ((file-name (expand-file-name (or file-name-arg rmail-file-name)))
--- a/lisp/sunpro/sunpro-init.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/sunpro/sunpro-init.el Mon Aug 13 08:46:35 2007 +0200 @@ -79,35 +79,44 @@ (defun sunpro-startup () (when (not (noninteractive)) - (let ((sunpro-dir-p - #'(lambda (dir) - (and dir - (file-exists-p (concat dir "bin/workshop")) - (file-exists-p (concat dir "lib/workshop.el")))))) - + (flet + ((sunpro-dir-p (dir) + (and dir + (file-exists-p (concat dir "bin/workshop")) + (file-exists-p (concat dir "lib/workshop.el"))))) (defconst sunpro-dir (cond + ;; Look on the PATH ((let ((path exec-path) dir (found nil)) (while (and path (not found)) - (setq dir (car path)) + (setq dir (or (car path) ".")) (setq path (cdr path)) (setq dir (concat dir (if (string-match "/$" dir) "../" "/../"))) - (setq found (funcall sunpro-dir-p dir))) - (if found - (expand-file-name dir)))) - - ((let ((dir exec-directory) (i 0) (found nil)) - (while (and (< i 8) (not found)) - (setq i (1+ i)) - (setq dir (concat dir "../")) - (setq found (funcall sunpro-dir-p dir)) - ) + (setq found (sunpro-dir-p dir))) (if found (expand-file-name dir)))) - ("/opt/SUNWspro/")) ; Default install location + ;; Check for standard Sun DevPro CD Install layout + ((if (string-match "contrib/[^/]+/[^/]+/[^/]+/[^/]+/$" exec-directory) + (let ((dir (substring exec-directory 0 (match-beginning 0)))) + (if (sunpro-dir-p dir) + (expand-file-name dir))))) + + ;; Default install location + ("/opt/SUNWspro/")) + + "Directory where Sun Developer Products are installed.")) - "Directory where Sunsoft Developer Products are installed.")) + ;; Sunpro ships the mule version as a 2-file addition to the + ;; non-mule distribution - the binary and the doc file. + ;; + ;; This is a quick hack, I know... + ;; There ought to be a better way to do this. + ;; Perhaps a --xemacs-flavor=mule flag? + (if (featurep 'mule) + (let ((mule-doc-file-name (concat internal-doc-file-name "-mule"))) + (if (file-exists-p (concat doc-directory mule-doc-file-name)) + (setq internal-doc-file-name mule-doc-file-name)))) ;; Connect to tooltalk (and (featurep 'tooltalk) @@ -129,7 +138,7 @@ ; 'global 'x)) (cond - ;; Use Sunsoft WorkShop if available + ;; Use Sun WorkShop if available ((sunpro-update-paths-for-workshop) (require 'workshop))
--- a/lisp/term/sun-mouse.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/term/sun-mouse.el Mon Aug 13 08:46:35 2007 +0200 @@ -595,7 +595,7 @@ evaluated for their side-effects rather than their values. If the selected form is a menu or a symbol whose value is a menu, then it is displayed and evaluated as a pullright menu item. - If the the FORM of the first ITEM is nil, the STRING of the item + If the FORM of the first ITEM is nil, the STRING of the item is used as a label for the menu, i.e. it's inverted and not selectable." (if (symbolp menu) (setq menu (symbol-value menu)))
--- a/lisp/url/ChangeLog Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/url/ChangeLog Mon Aug 13 08:46:35 2007 +0200 @@ -1,14 +1,144 @@ -Thu Jun 13 00:20:04 1996 William Perry <wmperry@monolith.spry.com> +Thu Aug 1 13:26:02 1996 William Perry <wmperry@cs.indiana.edu> + +* url.el: made url-insert-file-contents interactive + +* url-sysdp.el: +added data-directory to sysdep version of x-library-search-path for +emacs under windows 95/nt + +Tue Jul 23 00:19:22 1996 William Perry <wmperry@cs.indiana.edu> + +* url.el: fix for no_proxy checking for local files + +Mon Jul 22 03:22:52 1996 William Perry <wmperry@cs.indiana.edu> + +* url-sysdp.el: added stub for make-local-hook - more Emacs 19.2x lossage. + +Sun Jul 21 20:10:42 1996 William Perry <wmperry@cs.indiana.edu> + +* url-vars.el: Created version 1.0.40 + +* url.el: +In url-after-change-function, don't change buffers if its been killed. + +Fri Jul 19 04:39:08 1996 William Perry <wmperry@cs.indiana.edu> + +* url-vars.el: Created version 1.0.39 + +Thu Jul 18 14:06:54 1996 William Perry <wmperry@cs.indiana.edu> + +* url-vars.el: duh - make url-current-server buffer local. + +Fri Jul 12 06:10:02 1996 William Perry <wmperry@cs.indiana.edu> + +* url.el: Only match against the hostname in the URL for the no_proxy checking + +* url-hash.el: removed old aliases for w3-*hash functions + +Thu Jul 11 05:10:47 1996 William Perry <wmperry@cs.indiana.edu> + +* url-sysdp.el: version of valid-color-name-p and device-class for the OS/2 +presentation manager. + +* url.el, url-file.el: handle : in filenames gracefully + +* url-vars.el: Created version 1.0.38 + +Wed Jul 10 23:33:39 1996 William Perry <wmperry@cs.indiana.edu> + +* dist.Makefile: fixed install target - duh + +* url-irc.el: fixed bad variable name + +* mm.el: require cl to avoid stupid compiler errors + +* url.el: new function url-remove-compressed-extensions + +* url-vars.el, mm.el: *** empty log message *** + +* url-cookie.el, url-vars.el: +can now control when/how/if an HTTP cookie is accepted + +Tue Jul 9 21:01:15 1996 William Perry <wmperry@cs.indiana.edu> + +* url-sysdp.el: added more overlay functions + +* url-vars.el: Created version 1.0.37 + +* url-vars.el, dist.Makefile, mm.el: *** empty log message *** + +* url.el: autoload url-nfs + +* url-http.el: *** empty log message *** + +* mm.el: Fixed mm-save-binary-file + +* url-vars.el: fix for mule stuff Emacs vs. XEmacs + +* url-wais.el: *** empty log message *** + +* url.el: turn off url-download-minor-mode stuff + +Mon Jul 1 15:32:13 1996 William Perry <wmperry@cs.indiana.edu> + +* url-sysdp.el: Added stub for buffer-substring-no-properties + +* url-sysdp.el: Fix to device-or-frame-type to work under Emacs 19.28 + +* url-sysdp.el: Added in stubs for plist-put and plist-get, and an Emacs 19.2x +specific version of facep. everything almost works in 19.28 now. + +Sun Jun 30 18:12:20 1996 William Perry <wmperry@cs.indiana.edu> + +* url-sysdp.el: Changed email address info + +Fri Jun 28 16:08:08 1996 William Perry <wmperry@cs.indiana.edu> + +* mm.el: Fix for stupid problem in mm-copy-tree + +Wed Jun 26 16:37:12 1996 William Perry <wmperry@cs.indiana.edu> + +* url-news.el, url.el: +Patch from Darrell Kindred <dkindred+@cmu.edu> for news problems + 1. nnheader-init-server-buffer isn't called, so the + first call to nntp-open-server fails. (Patch inserts + a call to nnheader-init-server-buffer in url-news-open-host.) + 2. The `&', '<', and '>' characters don't get turned into + entities in news from lines, subject, body, etc. The result + is that "William Perry <wmperry@monolith.spry.com>" shows up + as "William Perry @monolith.spry.com>". (The patch moves + w3-insert-entities-in-string to url.el and renames it to + url-insert-entities-in-string, then calls it from url-format-news. + 3. When displayed, news articles get an extra, empty + "References" entry. (Patch inserts a `(delete "" ...)' + to remove the trailing empty reference from the list.) + +Tue Jun 25 18:44:30 1996 William Perry <wmperry@cs.indiana.edu> + +* mm.el: Potential fix for cl's version of copy-tree fucking things up in mm.el + +* url-sysdp.el: Added bogus definition of set-marker-insertion-type + +Fri Jun 14 17:45:16 1996 William Perry <wmperry@cs.indiana.edu> + +* url-cookie.el: fixed bug in cookie support + +* url-cookie.el: Require cl for the def. of assoc* + +* url-vars.el, url.el: +Fixes for mule from MORIOKA Tomohiko <morioka@jaist.ac.jp> + +Thu Jun 13 00:20:04 1996 William Perry <wmperry@cs.indiana.edu> * url-misc.el, url.el: fixed asynch stuff through a proxy -Wed Jun 12 04:00:39 1996 William Perry <wmperry@monolith.spry.com> +Wed Jun 12 04:00:39 1996 William Perry <wmperry@cs.indiana.edu> * url-nfs.el: Initial revision * url.el: Added 'nfs' url type as per the WebNFS specification -Tue Jun 11 17:28:53 1996 William Perry <wmperry@monolith.spry.com> +Tue Jun 11 17:28:53 1996 William Perry <wmperry@cs.indiana.edu> * url-vars.el: *** empty log message *** @@ -18,7 +148,7 @@ * url-irc.el: Initial revision -Mon Jun 10 18:58:03 1996 William Perry <wmperry@monolith.spry.com> +Mon Jun 10 18:58:03 1996 William Perry <wmperry@cs.indiana.edu> * md5.el: compilation warnings removed @@ -26,7 +156,7 @@ New version of md5.el that actually incorporates an md5 implementation in lisp! Whoah. -Sun Jun 9 17:32:55 1996 William Perry <wmperry@monolith.spry.com> +Sun Jun 9 17:32:55 1996 William Perry <wmperry@cs.indiana.edu> * url-http.el: protect against malformed HTTP URLs getting passed in via url-retrieve @@ -35,9 +165,9 @@ * url-file.el: fixed problem with ftp links -* dist.Makefile: Initial revision +* url-sysdp.el, dist.Makefile: Initial revision -* base64.el, descrip.mms, docomp.el, md5.el, mm.el, ssl.el, url-cookie.el, url-file.el, url-gopher.el, url-hash.el, url-http.el, url-mail.el, url-misc.el, url-news.el, url-parse.el, url-pgp.el, url-sysdp.el, url-vars.el, url-wais.el, url.el, urlauth.el: +* base64.el, descrip.mms, docomp.el, md5.el, mm.el, ssl.el, url-cookie.el, url-file.el, url-gopher.el, url-hash.el, url-http.el, url-mail.el, url-misc.el, url-news.el, url-parse.el, url-pgp.el, url-vars.el, url-wais.el, url.el, urlauth.el: Initial rev Wed Jun 5 14:31:40 1996 William Perry <wmperry@cs.indiana.edu>
--- a/lisp/url/Makefile Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/url/Makefile Mon Aug 13 08:46:35 2007 +0200 @@ -2,7 +2,7 @@ ELISP-TO-COMPILE = /tmp/elc-url-${USER} # what emacs is called on your system -EMACS = xemacs +EMACS = emacs # where the Info file should go INFODIR = . @@ -19,9 +19,8 @@ # MAKEINFO = makeinfo MAKEINFO = makeinfo -# How to make a directory -# need a -p if you want to make the parents! -MKDIR = mkdir +# Where your version of 'install' lives +INSTALL = install # Various other stuff used RM = rm -f @@ -99,27 +98,6 @@ clean: rm -f $(OBJECTS) -ChangeLog: - /usr/local/bin/rcs2log -h cs.indiana.edu -i 0 >| ChangeLog - -version: ChangeLog url.info - @echo -n "Creating new version " - @mkdir $(DIRNAME) - @./incvers - @co -q $(DISTFILES) - @rcs -q -s$(VTYPE)$(MAJOR)-$(MINOR)-`cat .version` url-vars.el - @rcs -q -s$(VTYPE)$(MAJOR)-$(MINOR)-`cat .version` url.texi - @co -q -kv $(SOURCES) docomp.el url.texi - @mv $(DISTFILES) $(DIRNAME) - @cp Makefile $(DIRNAME)/Makefile - @touch $(DIRNAME)/THIS-IS-VERSION-$(MAJOR).$(MINOR).`cat .version` - @mv ChangeLog url.info* $(DIRNAME) - @echo -n "$(MAJOR).$(MINOR)." - @echo `cat .version` - @tar czf url-$(MAJOR).$(MINOR).`cat .version`.tar.gz $(DIRNAME) - @rcs -nv$(MAJOR)-$(MINOR)-`cat .version`: $(SOURCES) - @rm -fr $(DIRNAME) - url.html: url.texi @texi2html -menu -split_node -verbose url.texi @@ -136,8 +114,7 @@ install: url @echo Installing in $(LISPDIR) - if [ ! -d $(LISPDIR) ] ; then $(MKDIR) $(LISPDIR) ; fi - (cd $(LISPDIR) ; $(RM) $(SOURCES) $(OBJECTS) url-sysdp.el*) - $(CP) $(SOURCES) $(OBJECTS) $(LISPDIR) - if [ ! -d $(INFODIR) ] ; then $(MKDIR) $(INFODIR) ; fi - $(CP) url.info* $(INFODIR) + $(INSTALL) -d $(LISPDIR) + $(INSTALL) -m 644 $(SOURCES) $(OBJECTS) $(LISPDIR) +# $(INSTALL) -d $(INFODIR) +# $(INSTALL) -m 644 url.info* $(INFODIR)
--- a/lisp/url/mm.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/url/mm.el Mon Aug 13 08:46:35 2007 +0200 @@ -92,6 +92,9 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Variables, etc ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(eval-and-compile + (require 'cl)) + (defconst mm-version (let ((x "1.96")) (if (string-match "Revision: \\([^ \t\n]+\\)" x) (substring x (match-beginning 1) (match-end 1)) @@ -347,31 +350,42 @@ fname (format fmt (concat base (int-to-string x))))) (expand-file-name fname mm-temporary-directory)))) -(if (not (fboundp 'copy-tree)) - (defun copy-tree (tree) - (if (consp tree) - (cons (copy-tree (car tree)) - (copy-tree (cdr tree))) - (if (vectorp tree) - (let* ((new (copy-sequence tree)) - (i (1- (length new)))) - (while (>= i 0) - (aset new i (copy-tree (aref new i))) - (setq i (1- i))) - new) - tree)))) +(if (and (fboundp 'copy-tree) + (subrp (symbol-function 'copy-tree))) + (fset 'mm-copy-tree 'copy-tree) + (defun mm-copy-tree (tree) + (if (consp tree) + (cons (mm-copy-tree (car tree)) + (mm-copy-tree (cdr tree))) + (if (vectorp tree) + (let* ((new (copy-sequence tree)) + (i (1- (length new)))) + (while (>= i 0) + (aset new i (mm-copy-tree (aref new i))) + (setq i (1- i))) + new) + tree)))) (if (not (fboundp 'w3-save-binary-file)) (defun mm-save-binary-file () - (let ((x (read-file-name "Filename to save as: " - (or mm-download-directory "~/"))) - (require-final-newline nil)) - (save-excursion - (if (featurep 'mule) - (let ((mc-flag t)) - (write-region (point-min) (point-max) x nil nil *noconv*)) - (write-region (point-min) (point-max) x)) - (kill-buffer (current-buffer))))) + ;; Ok, this is truly fucked. In XEmacs, if you use the mouse to select + ;; a URL that gets saved via this function, read-file-name will pop up a + ;; dialog box for file selection. For some reason which buffer we are in + ;; gets royally screwed (even with save-excursions and the whole nine + ;; yards). SO, we just keep the old buffer name around and away we go. + (let ((old-buff (current-buffer)) + (file (read-file-name "Filename to save as: " + (or mm-download-directory "~/") + (file-name-nondirectory (url-view-url t)) + nil + (file-name-nondirectory (url-view-url t)))) + (require-final-newline nil)) + (set-buffer old-buff) + (if (featurep 'mule) + (let ((mc-flag t)) + (write-region (point-min) (point-max) file nil nil *noconv*)) + (write-region (point-min) (point-max) file)) + (kill-buffer (current-buffer)))) (fset 'mm-save-binary-file 'w3-save-binary-file)) (if (not (fboundp 'w3-maybe-eval)) @@ -386,6 +400,21 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; The mailcap parser ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(defun mm-viewer-unescape (format &optional filename url) + (save-excursion + (set-buffer (get-buffer-create " *mm-parse*")) + (erase-buffer) + (insert format) + (goto-char (point-min)) + (while (re-search-forward "%\\(.\\)" nil t) + (let ((escape (aref (match-string 1) 0))) + (replace-match "" t t) + (case escape + (?% (insert "%")) + (?s (insert (or filename "\"\""))) + (?u (insert (or url "\"\"")))))) + (buffer-string))) + (defun mm-in-assoc (elt list) ;; Check to see if ELT matches any of the regexps in the car elements of LIST (let (rslt) @@ -841,7 +870,7 @@ (mm-unescape-mime-test (cdr-safe (assoc request viewer)) info))) (t ;; MUST make a copy *sigh*, else we modify mm-mime-data - (setq viewer (copy-tree viewer)) + (setq viewer (mm-copy-tree viewer)) (let ((view (assoc "viewer" viewer)) (test (assoc "test" viewer))) (if view (setcdr view (mm-unescape-mime-test (cdr view) info)))
--- a/lisp/url/url-cookie.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/url/url-cookie.el Mon Aug 13 08:46:35 2007 +0200 @@ -29,6 +29,7 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'timezone) +(require 'cl) (let ((keywords '(:name :value :expires :path :domain :test :secure))) @@ -280,9 +281,13 @@ last (1+ last))) (if (string-match url-cookie-two-dot-domains domain) (setq mindots 2)) - (if (< numdots mindots) ; Not enough dots in domain name! - nil - (string-match (concat (regexp-quote domain) "$") host)))) + (cond + ((string= host domain) ; Apparently netscape lets you do this + t) + ((< numdots mindots) ; Not enough dots in domain name! + nil) + (t + (string-match (concat (regexp-quote domain) "$") host))))) (defun url-header-comparison (x y) (string= (downcase x) (downcase y))) @@ -319,15 +324,27 @@ (url-match expires 3) " " (url-match expires 4) " [" (url-match expires 5) "]"))) - (if (url-cookie-host-can-set-p url-current-server domain) - (while rest - (url-cookie-store (car (car rest)) (cdr (car rest)) - expires domain path secure) - (setq rest (cdr rest))) + (cond + ((and (listp url-privacy-level) (memq 'cookies url-privacy-level)) + ;; user never wants cookies + nil) + ((and url-cookie-confirmation + (not (funcall url-confirmation-func + (format "Allow %s to set a cookie? " + url-current-server)))) + ;; user wants to be asked, and declined. + nil) + ((url-cookie-host-can-set-p url-current-server domain) + ;; Cookie is accepted by the user, and passes our security checks + (while rest + (url-cookie-store (car (car rest)) (cdr (car rest)) + expires domain path secure) + (setq rest (cdr rest)))) + (t (url-warn 'url (format (concat "%s tried to set a cookie for domain %s\n" "Permission denied - cookie rejected.\n" "Set-Cookie: %s") - url-current-server domain str))))) + url-current-server domain str)))))) (provide 'url-cookie)
--- a/lisp/url/url-file.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/url/url-file.el Mon Aug 13 08:46:35 2007 +0200 @@ -118,6 +118,7 @@ mod-time (nth 5 attr) size (nth 7 attr) typ (or (mm-extension-to-mime (url-file-extension file)) "")) + (setq file (url-hexify-string file)) (if (equal '(0 0) mod-time) ; Set to null if unknown or (setq mod-time "Unknown ") (setq mod-time (current-time-string mod-time)))
--- a/lisp/url/url-hash.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/url/url-hash.el Mon Aug 13 08:46:35 2007 +0200 @@ -50,22 +50,6 @@ clrhash maphash copy-hashtable))) - ((fboundp 'w3-maphash) - (mapcar (function - (lambda (sym) - (let ((new-sym (intern (format "url-%s" sym))) - (old-sym (intern (format "w3-%s" sym)))) - (defalias new-sym old-sym)))) - '(make-hashtable - make-key-weak-hashtable - make-value-weak-hashtable - make-weak-hashtable - hashtablep - puthash - gethash - clrhash - maphash - copy-hashtable))) (t (defconst url-hashtable-primes '(13 29 37 47 59 71 89 107 131 163 197 239 293 353 431 521 631 761 919 @@ -125,22 +109,6 @@ "Make a new hashtable which contains the same keys and values as the given table. The keys and values will not themselves be copied." (copy-sequence old-table)) - (mapcar (function - (lambda (sym) - (let ((new-sym (intern (format "w3-%s" sym))) - (old-sym (intern (format "url-%s" sym)))) - (fset new-sym old-sym)))) - '(make-hashtable - make-key-weak-hashtable - make-value-weak-hashtable - make-weak-hashtable - hashtablep - puthash - gethash - clrhash - maphash - copy-hashtable)) )) (provide 'url-hash) -(provide 'w3-hash)
--- a/lisp/url/url-http.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/url/url-http.el Mon Aug 13 08:46:35 2007 +0200 @@ -609,10 +609,11 @@ (condition-case () (url-kill-process process) (error nil)))) - (if (not url-be-asynchronous) - (message "Retrieval complete.")) - (remove-hook 'after-change-functions - 'url-after-change-function))))) + (if url-be-asynchronous + nil + (message "Retrieval complete.") + (remove-hook 'after-change-functions + 'url-after-change-function)))))) (progn (ding) (url-warn 'security "Aborting connection to bad port..."))))))
--- a/lisp/url/url-irc.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/url/url-irc.el Mon Aug 13 08:46:35 2007 +0200 @@ -42,7 +42,7 @@ (format "%s:%d" host port))) (zenirc-server-alist (list - (list host port pass nil user)))) + (list host port password nil user)))) (zenirc) (goto-char (point-max)) (if (not channel)
--- a/lisp/url/url-news.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/url/url-news.el Mon Aug 13 08:46:35 2007 +0200 @@ -33,22 +33,31 @@ (set-buffer nntp-server-buffer) (buffer-string))) (url-parse-mime-headers) - (let ((from (cdr (assoc "from" url-current-mime-headers))) - (subj (cdr (assoc "subject" url-current-mime-headers))) - (org (cdr (assoc "organization" url-current-mime-headers))) - (typ (or (cdr (assoc "content-type" url-current-mime-headers)) - "text/plain")) - (grps (mapcar 'car - (url-split - (or (cdr (assoc "newsgroups" url-current-mime-headers)) - "") - "[ \t\n,]+"))) - (refs (mapcar 'car - (url-split - (or (cdr (assoc "references" url-current-mime-headers)) - "") - "[ \t,\n<>]+"))) - (date (cdr (assoc "date" url-current-mime-headers)))) + (let* ((from (cdr (assoc "from" url-current-mime-headers))) + (qfrom (if from (url-insert-entities-in-string from) nil)) + (subj (cdr (assoc "subject" url-current-mime-headers))) + (qsubj (if subj (url-insert-entities-in-string subj) nil)) + (org (cdr (assoc "organization" url-current-mime-headers))) + (qorg (if org (url-insert-entities-in-string org) nil)) + (typ (or (cdr (assoc "content-type" url-current-mime-headers)) + "text/plain")) + (qgrps (mapcar 'car + (url-split + (url-insert-entities-in-string + (or (cdr (assoc "newsgroups" + url-current-mime-headers)) + "")) + "[ \t\n,]+"))) + (qrefs (delete "" + (mapcar + 'url-insert-entities-in-string + (mapcar 'car + (url-split + (or (cdr (assoc "references" + url-current-mime-headers)) + "") + "[ \t,\n<>]+"))))) + (date (cdr (assoc "date" url-current-mime-headers)))) (setq url-current-file "" url-current-type "") (if (or (not (string-match "text/" typ)) @@ -56,27 +65,27 @@ nil ; Let natural content-type take over (insert "<html>\n" " <head>\n" - " <title>" subj "</title>\n" - " <link rev=\"made\" href=\"mailto:" from "\">\n" + " <title>" qsubj "</title>\n" + " <link rev=\"made\" href=\"mailto:" qfrom "\">\n" " </head>\n" " <body>\n" " <div>\n" - " <h1 align=center>" subj "</h1>\n" + " <h1 align=center>" qsubj "</h1>\n" " <p role=\"headers\">\n" - " <b>From</b>: <address> " from "</address><br>\n" + " <b>From</b>: " qfrom "<br>\n" " <b>Newsgroups</b>: " (mapconcat (function (lambda (grp) - (concat "<a href=\"" grp "\"> " grp "</a>"))) grps ", ") + (concat "<a href=\"" grp "\">" grp "</a>"))) qgrps ", ") "<br>\n" (if org (concat - " <b>Organization</b>: <i> " org "</i> <br>\n") + " <b>Organization</b>: <i> " qorg "</i> <br>\n") "") " <b>Date</b>: <date> " date "</date> <br>\n" " </p> <hr>\n" - (if (null refs) + (if (null qrefs) "" (concat " <p>References\n" @@ -86,18 +95,21 @@ (lambda (ref) (concat " <li> <a href=\"" ref "\"> " ref "</a></li>\n"))) - refs "") + qrefs "") " </ol>\n" " </p>\n" " <hr>\n")) " <ul plain>\n" " <li><a href=\"newspost:disfunctional\"> " "Post to this group </a></li>\n" - " <li><a href=\"mailto:" from "\"> Reply to " from + " <li><a href=\"mailto:" qfrom "\"> Reply to " qfrom "</a></li>\n" " </ul>\n" " <hr>" - " <xmp>\n") + " <pre>\n") + (let ((s (buffer-substring (point) (point-max)))) + (delete-region (point) (point-max)) + (insert (url-insert-entities-in-string s))) (goto-char (point-max)) (setq url-current-mime-type "text/html" url-current-mime-viewer (mm-mime-info url-current-mime-type nil 5)) @@ -108,7 +120,7 @@ "text/html") url-current-mime-headers)))) (insert "\n" - " </xmp>\n" + " </pre>\n" " </div>\n" " </body>\n" "</html>\n" @@ -154,6 +166,8 @@ "</html>\n")) (defun url-news-open-host (host port user pass) + (if (fboundp 'nnheader-init-server-buffer) + (nnheader-init-server-buffer)) (nntp-open-server host (list (string-to-int port))) (if (and user pass) (progn @@ -232,7 +246,7 @@ (url-news-open-host host port (url-user urlobj) (url-password urlobj)) (cond ((string-match "@" article) ; Its a specific article - (url-news-fetch-message-id article)) + (url-news-fetch-message-id host port article)) ((string= article "") ; List all newsgroups (gnus) (kill-buffer url-working-buffer)) @@ -256,7 +270,7 @@ (url-news-open-host host port (url-user urlobj) (url-password urlobj)) (cond ((string-match "@" article) ; Its a specific article - (url-news-fetch-message-id article)) + (url-news-fetch-message-id host port article)) ((string-match "/\\([0-9]+\\)$" article) (url-news-fetch-article-number (substring article 0 (match-beginning 0))
--- a/lisp/url/url-sysdp.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/url/url-sysdp.el Mon Aug 13 08:46:35 2007 +0200 @@ -148,7 +148,8 @@ (sysdep-defconst window-system-version 0) (sysdep-defvar list-buffers-directory nil) -(sysdep-defvar x-library-search-path '("/usr/X11R6/lib/X11/" +(sysdep-defvar x-library-search-path (` + ("/usr/X11R6/lib/X11/" "/usr/X11R5/lib/X11/" "/usr/lib/X11R6/X11/" "/usr/lib/X11R5/X11/" @@ -167,7 +168,10 @@ "/usr/local/x11r5/lib/X11/" "/usr/lpp/Xamples/lib/X11/" "/usr/openwin/lib/X11/" - "/usr/openwin/share/lib/X11/") + "/usr/openwin/share/lib/X11/" + (, data-directory) + ) + ) "Search path used for X11 libraries.") ;; frame-related stuff. @@ -291,6 +295,15 @@ (sysdep-defalias 'face-list 'list-faces) +(sysdep-defun facep (face) + "Return t if X is a face name or an internal face vector." + ;; CAUTION!!! This is Emacs 19.x, for x <= 28, specific + ;; I know of no version of Lucid Emacs or XEmacs that did not have + ;; facep. Even if they did, they are unsupported, so big deal. + (and (or (internal-facep face) + (and (symbolp face) (assq face global-face-data))) + t)) + (sysdep-defun set-face-property (face property value &optional locale tag-set how-to-add) "Change a property of FACE." @@ -301,8 +314,32 @@ "Return FACE's value of the given PROPERTY." (and (symbolp face) (get face property))) +;; Property list functions +;; +(sysdep-defun plist-put (plist prop val) + "Change value in PLIST of PROP to VAL. +PLIST is a property list, which is a list of the form +(PROP1 VALUE1 PROP2 VALUE2 ...). PROP is a symbol and VAL is any object. +If PROP is already a property on the list, its value is set to VAL, +otherwise the new PROP VAL pair is added. The new plist is returned; +use `(setq x (plist-put x prop val))' to be sure to use the new value. +The PLIST is modified by side effects." + (let ((node (memq prop plist))) + (if node + (setcar (cdr node) val) + (setq plist (cons prop (cons val plist)))) + plist)) + +(sysdep-defun plist-get (plist prop) + "Extract a value from a property list. +PLIST is a property list, which is a list of the form +(PROP1 VALUE1 PROP2 VALUE2...). This function returns the value +corresponding to the given PROP, or nil if PROP is not +one of the properties on the list." + (car-safe (cdr-safe (memq prop plist)))) + ;; Device functions -;; By wmperry@spry.com +;; By wmperry@cs.indiana.edu ;; This is a complete implementation of all the device-* functions found in ;; XEmacs 19.14. A 'device' for Emacs 19 is just a frame, from which we can ;; determine the connection to an X display, etc. @@ -457,7 +494,6 @@ str)) (t "stdio"))) - (sysdep-defun device-connection (&optional device) "Return the connection of the specified device. DEVICE defaults to the selected device if omitted" @@ -555,6 +591,7 @@ (sysdep-defalias 'device-class (cond + ;; First, Xwindows ((and (eq window-system 'x) (fboundp 'x-display-visual-class)) (function (lambda (&optional device) @@ -563,6 +600,22 @@ ((string-match "color" val) 'color) ((string-match "gray-scale" val) 'grayscale) (t 'mono)))))) + ;; Now, Presentation-Manager under OS/2 + ((and (eq window-system 'pm) (fboundp 'pm-display-visual-class)) + (function + (lambda (&optional device) + (let ((val (symbol-name (pm-display-visual-class device)))) + (cond + ((string-match "color" val) 'color) + ((string-match "gray-scale" val) 'grayscale) + (t 'mono)))))) + ;; A slightly different way of doing it under OS/2 + ((and (eq window-system 'pm) (fboundp 'pm-display-color-p)) + (function + (lambda (&optional device) + (if (pm-display-color-p) + 'color + 'mono)))) ((fboundp 'number-of-colors) (function (lambda (&optional device) @@ -598,7 +651,8 @@ "Return the type (e.g. `x' or `tty') of DEVICE-OR-FRAME. DEVICE-OR-FRAME should be a device or a frame object. See `device-type' for a description of the possible types." - (if (cdr-safe (assq 'display (frame-parameters device-or-frame))) + (if (or (cdr-safe (assq 'display (frame-parameters device-or-frame))) + (cdr-safe (assq 'window-id (frame-parameters device-or-frame)))) window-system 'tty)) @@ -628,6 +682,8 @@ (sysdep-fset 'extent-end-position 'overlay-end) (sysdep-fset 'extent-start-position 'overlay-start) (sysdep-fset 'set-extent-endpoints 'move-overlay) +(sysdep-fset 'set-extent-property 'overlay-put) +(sysdep-fset 'make-extent 'make-overlay) (sysdep-defun extent-property (extent property &optional default) (or (overlay-get extent property) default)) @@ -649,7 +705,6 @@ (< (- (extent-end-position a) (extent-start-position a)) (- (extent-end-position b) (extent-start-position b))))))))) - (sysdep-defun overlays-in (beg end) "Return a list of the overlays that overlap the region BEG ... END. Overlap means that at least one character is contained within the overlay @@ -693,6 +748,12 @@ (throw 'done tmp)))))) ;; misc +(sysdep-fset 'make-local-hook 'make-local-variable) + +(sysdep-defun buffer-substring-no-properties (beg end) + "Return the text from BEG to END, without text properties, as a string." + (format "%s" (buffer-substring beg end))) + (sysdep-defun symbol-value-in-buffer (symbol buffer &optional unbound-value) "Return the value of SYMBOL in BUFFER, or UNBOUND-VALUE if it is unbound." (save-excursion @@ -796,6 +857,9 @@ (fboundp 'color-defined-p)) ; NS/Emacs 19 'color-defined-p) ((and window-system + (fboundp 'pm-color-defined-p)) + 'pm-color-defined-p) + ((and window-system (fboundp 'x-color-defined-p)) ; Emacs 19 'x-color-defined-p) ((fboundp 'get-color) ; Epoch @@ -882,6 +946,12 @@ (sysdep-defun find-face (face) (car-safe (memq face (face-list)))) +(sysdep-defun set-marker-insertion-type (marker type) + "Set the insertion-type of MARKER to TYPE. +If TYPE is t, it means the marker advances when you insert text at it. +If TYPE is nil, it means the marker stays behind when you insert text at it." + nil) + ;; window functions ;; not defined in v18 @@ -894,7 +964,6 @@ "Returns non-nil if WINDOW is a minibuffer window." (eq window (minibuffer-window))) -;; not defined in v18 (sysdep-defun window-live-p (window) "Returns t if OBJ is a window which is currently visible." (and (windowp window)
--- a/lisp/url/url-vars.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/url/url-vars.el Mon Aug 13 08:46:35 2007 +0200 @@ -24,8 +24,8 @@ ;;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(defconst url-version (let ((x "1.13")) - (if (string-match "Revision: \\([^ \t\n]+\\)" x) +(defconst url-version (let ((x "p1.0.41")) + (if (string-match "State: \\([^ \t\n]+\\)" x) (substring x (match-beginning 1) (match-end 1)) x)) "Version # of URL package.") @@ -65,6 +65,7 @@ url-current-object url-current-port url-current-referer + url-current-server url-current-type url-current-user )) @@ -116,15 +117,32 @@ (defvar url-bug-address "wmperry@spry.com" "Where to send bug reports.") +(defvar url-cookie-confirmation nil + "*If non-nil, confirmation by the user is required before accepting any +HTTP cookies.") + (defvar url-personal-mail-address nil "*Your full email address. This is what is sent to HTTP/1.0 servers as the FROM field. If not set when url-do-setup is run, it defaults to the value of url-pgp/pem-entity.") -(defvar url-mule-retrieval-coding-system (if (featurep 'mule) *euc-japan* +(defvar url-mule-retrieval-coding-system (if (featurep 'mule) + (if (boundp '*euc-japan*) + *euc-japan* + 'euc-japan-unix) nil) "Coding system for retrieval, used before hexified.") +(defvar url-mule-no-coding-system (cond + ((and (featurep 'mule) + (string-match "XEmacs" emacs-version)) + 'noconv) + ((featurep 'mule) + '*noconv*) + (t nil)) + "*Variable containing a symbol that specifies no coding system is to be used. +Only used if you are in a Mule-enabled Emacsen.") + (defvar url-directory-index-file "index.html" "*The filename to look for when indexing a directory. If this file exists, and is readable, then it will be viewed instead of @@ -152,6 +170,7 @@ os -- the operating system info lastloc -- the last location agent -- Do not send the User-Agent string +cookie -- never accept HTTP cookies Samples: @@ -184,8 +203,8 @@ (".uue" . "x-uuencoded") (".hqx" . "x-hqx") (".Z" . "x-compress")) - "*An assoc list of file extensions and the appropriate uncompression -programs for each.") + "*An assoc list of file extensions and the appropriate +content-transfer-encodings for each.") (defvar url-xterm-command "xterm -title %s -ut -e %s %s %s" "*Command used to start an xterm window.") @@ -487,6 +506,9 @@ (defvar url-remote-telnet-prog "telnet" "*Program for remote telnet connections.") +(defvar url-running-xemacs (string-match "XEmacs" emacs-version) + "*In XEmacs?.") + (defvar url-gateway-telnet-program "itelnet" "*Program to run in a subprocess when using gateway-method 'program.")
--- a/lisp/url/url-wais.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/url/url-wais.el Mon Aug 13 08:46:35 2007 +0200 @@ -240,7 +240,7 @@ (insert "<title>WAIS search</title>\n" "<h1>WAIS search of " (nth 2 href) "</h1>" "<hr>\n" - "<form>\n" + (format "<form action=\"%s\" enctype=\"application/x-w3-wais\">\n" url) "Enter search term: <input name=\"internal-wais\">\n" "</form>\n" "<hr>\n"))))))
--- a/lisp/url/url.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/url/url.el Mon Aug 13 08:46:35 2007 +0200 @@ -86,6 +86,7 @@ (autoload 'url-gopher "url-gopher") (autoload 'url-irc "url-irc") (autoload 'url-http "url-http") +(autoload 'url-nfs "url-nfs") (autoload 'url-mailserver "url-mail") (autoload 'url-mailto "url-mail") (autoload 'url-info "url-misc") @@ -280,58 +281,87 @@ (defun url-after-change-function (&rest args) ;; The nitty gritty details of messaging the HTTP/1.0 status messages ;; in the minibuffer." - (save-excursion - (set-buffer url-working-buffer) - (let (status-message) - (if url-current-content-length - nil + (if (get-buffer url-working-buffer) + (save-excursion + (set-buffer url-working-buffer) + (let (status-message) + (if url-current-content-length + nil + (goto-char (point-min)) + (skip-chars-forward " \t\n") + (if (not (looking-at "HTTP/[0-9]\.[0-9]")) + (setq url-current-content-length 0) + (setq url-current-isindex + (and (re-search-forward "$\r*$" nil t) (point))) + (if (re-search-forward + "^content-type:[ \t]*\\([^\r\n]+\\)\r*$" + url-current-isindex t) + (setq url-current-mime-type (downcase + (url-eat-trailing-space + (buffer-substring + (match-beginning 1) + (match-end 1)))))) + (if (re-search-forward "^content-length:\\([^\r\n]+\\)\r*$" + url-current-isindex t) + (setq url-current-content-length + (string-to-int (buffer-substring (match-beginning 1) + (match-end 1)))) + (setq url-current-content-length nil)))) + (goto-char (point-min)) + (if (re-search-forward "^status:\\([^\r]*\\)" url-current-isindex t) + (progn + (setq status-message (buffer-substring (match-beginning 1) + (match-end 1))) + (replace-match (concat "btatus:" status-message)))) + (goto-char (point-max)) + (cond + (status-message (url-lazy-message "%s" status-message)) + ((and url-current-content-length (> url-current-content-length 1) + url-current-mime-type) + (url-lazy-message "Read %d of %d bytes (%d%%) [%s]" + (point-max) url-current-content-length + (url-percentage (point-max) + url-current-content-length) + url-current-mime-type)) + ((and url-current-content-length (> url-current-content-length 1)) + (url-lazy-message "Read %d of %d bytes (%d%%)" + (point-max) url-current-content-length + (url-percentage (point-max) + url-current-content-length))) + ((and (/= 1 (point-max)) url-current-mime-type) + (url-lazy-message "Read %d bytes. [%s]" (point-max) + url-current-mime-type)) + ((/= 1 (point-max)) + (url-lazy-message "Read %d bytes." (point-max))) + (t (url-lazy-message "Waiting for response."))))))) + +(defun url-insert-entities-in-string (string) + "Convert HTML markup-start characters to entity references in STRING. + Also replaces the \" character, so that the result may be safely used as + an attribute value in a tag. Returns a new string with the result of the + conversion. Replaces these characters as follows: + & ==> & + < ==> < + > ==> > + \" ==> "" + (if (string-match "[&<>\"]" string) + (save-excursion + (set-buffer (get-buffer-create " *entity*")) + (erase-buffer) + (buffer-disable-undo (current-buffer)) + (insert string) (goto-char (point-min)) - (skip-chars-forward " \t\n") - (if (not (looking-at "HTTP/[0-9]\.[0-9]")) - (setq url-current-content-length 0) - (setq url-current-isindex - (and (re-search-forward "$\r*$" nil t) (point))) - (if (re-search-forward - "^content-type:[ \t]*\\([^\r\n]+\\)\r*$" - url-current-isindex t) - (setq url-current-mime-type (downcase - (url-eat-trailing-space - (buffer-substring - (match-beginning 1) - (match-end 1)))))) - (if (re-search-forward "^content-length:\\([^\r\n]+\\)\r*$" - url-current-isindex t) - (setq url-current-content-length - (string-to-int (buffer-substring (match-beginning 1) - (match-end 1)))) - (setq url-current-content-length nil)))) - (goto-char (point-min)) - (if (re-search-forward "^status:\\([^\r]*\\)" url-current-isindex t) - (progn - (setq status-message (buffer-substring (match-beginning 1) - (match-end 1))) - (replace-match (concat "btatus:" status-message)))) - (goto-char (point-max)) - (cond - (status-message (url-lazy-message "%s" status-message)) - ((and url-current-content-length (> url-current-content-length 1) - url-current-mime-type) - (url-lazy-message "Read %d of %d bytes (%d%%) [%s]" - (point-max) url-current-content-length - (url-percentage (point-max) url-current-content-length) - url-current-mime-type)) - ((and url-current-content-length (> url-current-content-length 1)) - (url-lazy-message "Read %d of %d bytes (%d%%)" - (point-max) url-current-content-length - (url-percentage (point-max) - url-current-content-length))) - ((and (/= 1 (point-max)) url-current-mime-type) - (url-lazy-message "Read %d bytes. [%s]" (point-max) - url-current-mime-type)) - ((/= 1 (point-max)) - (url-lazy-message "Read %d bytes." (point-max))) - (t (url-lazy-message "Waiting for response.")))))) - + (while (progn + (skip-chars-forward "^&<>\"") + (not (eobp))) + (insert (cdr (assq (char-after (point)) + '((?\" . """) + (?& . "&") + (?< . "<") + (?> . ">"))))) + (delete-char 1)) + (buffer-string)) + string)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Information information @@ -562,6 +592,7 @@ (defun url-insert-file-contents (url &rest args) "Insert the contents of the URL in this buffer." + (interactive "sURL: ") (save-excursion (let ((old-asynch url-be-asynchronous)) (setq-default url-be-asynchronous nil) @@ -801,7 +832,10 @@ (save-excursion (set-buffer (get-buffer-create buffer)) (setq mc-flag nil) - (set-process-coding-system conn *noconv* *noconv*))) + (if (not url-running-xemacs) + (set-process-coding-system conn *noconv* *noconv*) + (set-process-input-coding-system conn 'noconv) + (set-process-output-coding-system conn 'noconv)))) conn) (error "Unable to connect to %s:%s" host service)))) ((eq tmp-gateway-method 'program) @@ -1471,7 +1505,7 @@ (and (< char ?a) (> char ?Z)) (and (< char ?@) - (> char ?:))) + (>= char ?:))) (if (< char 16) (upcase (format "%%0%x" char)) (upcase (format "%%%x" char))) @@ -1544,6 +1578,11 @@ (goto-char (point-min)) (url-replace-regexp "Process WWW.*" "")) +(defun url-remove-compressed-extensions (filename) + (while (assoc (url-file-extension filename) url-uncompressor-alist) + (setq filename (url-file-extension filename t))) + filename) + (defun url-uncompress () "Do any necessary uncompression on `url-working-buffer'" (set-buffer url-working-buffer) @@ -2201,16 +2240,13 @@ (let* ((urlobj (url-generic-parse-url url)) (type (url-type urlobj)) (url-using-proxy (and + (url-host urlobj) (if (assoc "no_proxy" url-proxy-services) (not (string-match (cdr (assoc "no_proxy" url-proxy-services)) - url)) + (url-host urlobj))) t) - (not - (and - (string-match "file:" url) - (not (string-match "file://" url)))) (cdr (assoc type url-proxy-services)))) (handler nil) (original-url url) @@ -2227,8 +2263,8 @@ (save-excursion (set-buffer (get-buffer-create url-working-buffer)) (setq url-current-can-be-cached (not no-cache))) - (if url-be-asynchronous - (url-download-minor-mode t)) +; (if url-be-asynchronous +; (url-download-minor-mode t)) (if (and handler (fboundp handler)) (funcall handler url) (set-buffer (get-buffer-create url-working-buffer))
--- a/lisp/utils/abbrevlist.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/utils/abbrevlist.el Mon Aug 13 08:46:35 2007 +0200 @@ -20,9 +20,10 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Code:
--- a/lisp/utils/advice.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/utils/advice.el Mon Aug 13 08:46:35 2007 +0200 @@ -21,14 +21,15 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. ;; LCD Archive Entry: ;; advice|Hans Chalupsky|hans@cs.buffalo.edu| ;; Overloading mechanism for Emacs Lisp functions| ;; 1994/08/05 03:42:04|2.14|~/packages/advice.el.Z| -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34 (In a fashion. Many comments are dated). ;;; Commentary: @@ -3953,6 +3954,13 @@ (ad-recover-all) (setq ad-advised-functions nil)) +;; Until the Advice-related changes to `data.c' are part of Lemacs we +;; have to load the old implementation of advice activation hooks: +;; XEmacs: Not sure what this is supposed to accomplish. There is no +;; ad-hooks.el. -sb +;(if (ad-lemacs-p) +; (require 'ad-hooks)) + (ad-start-advice) (provide 'advice)
--- a/lisp/utils/assoc.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/utils/assoc.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,22 +1,28 @@ ;;; assoc.el --- insert/delete/sort functions on association lists +;; Copyright (C) 1996 Free Software Foundation, Inc. + ;; Author: Barry A. Warsaw <bwarsaw@cen.com> ;; Keywords: extensions -;; This software is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY. No author or distributor accepts -;; responsibility to anyone for the consequences of using it or for -;; whether it serves any particular purpose or works at all, unless he -;; says so in writing. +;; This file is part of XEmacs. + +;; XEmacs 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. -;; This software was written as part of the supercite author's -;; official duty as an employee of the United States Government and is -;; thus in the public domain. You are free to use that particular -;; software as you wish, but WITHOUT ANY WARRANTY WHATSOEVER. It -;; would be nice, though if when you use any of this code, you give -;; due credit to the author. +;; XEmacs 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. -;;; Synched up with: FSF 19.30. +;; You should have received a copy of the GNU General Public License +;; along with XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. + +;;; Synched up with: FSF 19.34. ;;; Commentary:
--- a/lisp/utils/blessmail.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/utils/blessmail.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,27 +1,28 @@ ;;; blessmail.el --- Decide whether movemail needs special privileges. -;;; Copyright (C) 1994 Free Software Foundation, Inc. +;; Copyright (C) 1994 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: internal -;; This file is part of GNU Emacs. +;; This file is part of XEmacs. -;; 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 +;; XEmacs 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. +;; XEmacs 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, 675 Mass Ave, Cambridge, MA 02139, USA. +;; along with XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary:
--- a/lisp/utils/derived.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/utils/derived.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,11 +1,9 @@ ;;; derived.el --- allow inheritance of major modes. - ;;; (formerly mode-clone.el) ;; Copyright (C) 1993, 1994 Free Software Foundation, Inc. ;; Author: David Megginson (dmeggins@aix1.uottawa.ca) -;; Keywords: extensions ;; Maintainer: FSF ;; This file is part of XEmacs. @@ -22,9 +20,10 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary: @@ -104,6 +103,7 @@ ;; PUBLIC: define a new major mode which inherits from an existing one. +;; XEmacs -- no autoload (defmacro define-derived-mode (child parent name &optional docstring &rest body) "Create a new mode as a variant of an existing mode. @@ -212,6 +212,7 @@ ;; Utility functions for defining a derived mode. +;; XEmacs -- don't autoload (defun derived-mode-init-mode-variables (mode) "Initialise variables for a new mode. Right now, if they don't already exist, set up a blank keymap, an @@ -220,7 +221,8 @@ (if (boundp (derived-mode-map-name mode)) t - (eval (` (defvar (, (derived-mode-map-name mode)) + (eval (` (defvar (, (derived-mode-map-name mode)) + ;; XEmacs change (make-sparse-keymap (derived-mode-map-name mode)) (, (format "Keymap for %s." mode))))) (put (derived-mode-map-name mode) 'derived-mode-unmerged t)) @@ -228,6 +230,11 @@ (if (boundp (derived-mode-syntax-table-name mode)) t (eval (` (defvar (, (derived-mode-syntax-table-name mode)) + ;; XEmacs change + ;; Make a syntax table which doesn't specify anything + ;; for any char. Valid data will be merged in by + ;; derived-mode-merge-syntax-tables. + ;; (make-char-table 'syntax-table nil) (make-syntax-table) (, (format "Syntax table for %s." mode))))) (put (derived-mode-syntax-table-name mode) 'derived-mode-unmerged t)) @@ -263,8 +270,8 @@ (new-map (eval map-name)) (old-map (current-local-map))) (and old-map - (get map-name 'derived-mode-unmerged) - (derived-mode-merge-keymaps old-map new-map)) + (get map-name 'derived-mode-unmerged) + (derived-mode-merge-keymaps old-map new-map)) (put map-name 'derived-mode-unmerged nil) (use-local-map new-map))) @@ -307,7 +314,7 @@ "Merge an old keymap into a new one. The old keymap is set to be the parent of the new one, so that there will be automatic inheritance." - ;; XEmacs change. FSF 19.30 has a whole bunch of weird crap here + ;; XEmacs change. FSF 19.30 & 19.34 has a whole bunch of weird crap here ;; for merging prefix keys and such. Hopefully none of this is ;; necessary in XEmacs. (set-keymap-parents new (list old))) @@ -315,6 +322,7 @@ (defun derived-mode-merge-syntax-tables (old new) "Merge an old syntax table into a new one. Where the new table already has an entry, nothing is copied from the old one." + ;; XEmacs change (no set-char-table-parent) (let ((idx 0) (end (min (length new) (length old)))) (while (< idx end)
--- a/lisp/utils/docref.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/utils/docref.el Mon Aug 13 08:46:35 2007 +0200 @@ -6,26 +6,27 @@ ;; Keywords: docs, help, lisp ;; original name was cross-ref.el. -;; This file is part of GNU Emacs. +;; This file is part of XEmacs. -;; 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 +;; XEmacs 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. +;; XEmacs 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, 675 Mass Ave, Cambridge, MA 02139, USA. +;; along with XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary: -;; + ;; This package allows you to use a simple form of cross references in ;; your Emacs Lisp documentation strings. Cross-references look like ;; \\(type@[label@]data), where type defines a method for retrieving @@ -129,7 +130,7 @@ highlight them with face defined by \\(v@docref-highlight-face). Cross-reference has the following format: \\ (TYPE[@LABEL]@DATA), where -TYPE defines method used to retrive xref data (like reading from file or +TYPE defines method used to retrieve xref data (like reading from file or calling \\(f@describe-function)), DATA is an argument to this method \(like file name or function name), and LABEL is displayed in text using \\(v@docref-highlight-face). @@ -148,7 +149,8 @@ (let ((old-modified (buffer-modified-p))) (while (re-search-forward "[\\](\\([^\)\@]+\\)\\(@[^\)\@]+\\)?@\\([^\)]*\\))" nil t) - (let* ((type (buffer-substring (match-beginning 1) (match-end 1))) + (let* ((start (match-beginning 0)) + (type (buffer-substring (match-beginning 1) (match-end 1))) (data (buffer-substring (match-beginning 3) (match-end 3))) (label (if (match-beginning 2) @@ -169,7 +171,8 @@ (set-buffer-modified-p old-modified))))) (defun docref-insert-label (string ref) - (let ((label (concat string))) + (let ((label (concat string)) + (pos (point))) ;; decorate the label (let ((leading-space-end (save-match-data (if (string-match "^\\([ \t\n]+\\)" label)
--- a/lisp/utils/easymenu.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/utils/easymenu.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,11 +1,11 @@ ;;; easymenu.el - Easy menu support for Emacs 19 and XEmacs. ;; -;; $Id: easymenu.el,v 1.1.1.1 1996/12/18 03:32:46 steve Exp $ +;; $Id: easymenu.el,v 1.1.1.2 1996/12/18 03:45:41 steve Exp $ ;; ;; LCD Archive Entry: ;; easymenu|Per Abrahamsen|abraham@iesd.auc.dk| ;; Easy menu support for XEmacs| -;; $Date: 1996/12/18 03:32:46 $|$Revision: 1.1.1.1 $|~/misc/easymenu.el.gz| +;; $Date: 1996/12/18 03:45:41 $|$Revision: 1.1.1.2 $|~/misc/easymenu.el.gz| ;; Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. ;; @@ -144,49 +144,55 @@ (easy-menu-do-define (quote (, symbol)) (, maps) (, doc) (, menu))))) (defun easy-menu-do-define (symbol maps doc menu) - (set symbol menu) - (fset symbol (list 'lambda '(e) - doc - '(interactive "@e") - '(run-hooks 'activate-menubar-hook) - '(setq zmacs-region-stays 't) - (list 'popup-menu symbol)))) + (if (featurep 'menubar) + (progn + (set symbol menu) + (fset symbol (list 'lambda '(e) + doc + '(interactive "@e") + '(run-hooks 'activate-menubar-hook) + '(setq zmacs-region-stays 't) + (list 'popup-menu symbol)))))) (fset 'easy-menu-change (symbol-function 'add-menu)) +;; This variable hold the easy-menu mode menus of all major and +;; minor modes currently in effect. (defvar easy-menu-all-popups nil) - ;; This variable hold the easy-menu mode menus of all major and - ;; minor modes currently in effect. - (make-variable-buffer-local 'easy-menu-all-popups) +(make-variable-buffer-local 'easy-menu-all-popups) (defun easy-menu-add (menu &optional map) "Add MENU to the current menu bar." - (if easy-menu-all-popups - (setq easy-menu-all-popups (cons menu easy-menu-all-popups)) - (setq easy-menu-all-popups (list menu mode-popup-menu))) - (setq mode-popup-menu menu) + (if (featurep 'menubar) + (progn + (if easy-menu-all-popups + (setq easy-menu-all-popups (cons menu easy-menu-all-popups)) + (setq easy-menu-all-popups (list menu mode-popup-menu))) + (setq mode-popup-menu menu) - (cond ((null current-menubar) - ;; Don't add it to a non-existing menubar. - nil) - ((assoc (car menu) current-menubar) - ;; Already present. - nil) - ((equal current-menubar '(nil)) - ;; Set at left if only contains right marker. - (set-buffer-menubar (list menu nil))) - (t - ;; Add at right. - (set-buffer-menubar (copy-sequence current-menubar)) - (add-menu nil (car menu) (cdr menu))))) + (cond ((null current-menubar) + ;; Don't add it to a non-existing menubar. + nil) + ((assoc (car menu) current-menubar) + ;; Already present. + nil) + ((equal current-menubar '(nil)) + ;; Set at left if only contains right marker. + (set-buffer-menubar (list menu nil))) + (t + ;; Add at right. + (set-buffer-menubar (copy-sequence current-menubar)) + (add-menu nil (car menu) (cdr menu))))))) (defun easy-menu-remove (menu) "Remove MENU from the current menu bar." - (setq easy-menu-all-popups (delq menu easy-menu-all-popups) - mode-popup-menu (car easy-menu-all-popups)) - (and current-menubar - (assoc (car menu) current-menubar) - (delete-menu-item (list (car menu))))) + (if (featurep 'menubar) + (progn + (setq easy-menu-all-popups (delq menu easy-menu-all-popups) + mode-popup-menu (car easy-menu-all-popups)) + (and current-menubar + (assoc (car menu) current-menubar) + (delete-menu-item (list (car menu))))))) (provide 'easymenu)
--- a/lisp/utils/finder.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/utils/finder.el Mon Aug 13 08:46:35 2007 +0200 @@ -31,9 +31,10 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary: @@ -51,6 +52,7 @@ (require 'lisp-mnt) (require 'finder-inf) +;; XEmacs addition (require 'picture) (require 'mode-motion) @@ -74,7 +76,7 @@ '( (abbrev . "abbreviation handling, typing shortcuts, macros") (bib . "code related to the `bib' bibliography processor") - (c . "C, C++, and Objective-C language support") + (c . "support for the C language and related languages") (calendar . "calendar and time management support") (comm . "communications, networking, remote access to files") (data . "support editing files of data") @@ -82,7 +84,7 @@ (emulations . "emulations of other editors") (extensions . "Emacs Lisp language extensions") (faces . "support for multiple fonts") - (frames . "support for Emacs frames and windows") + (frames . "support for Emacs frames and window systems") (games . "games, jokes and amusements") (hardware . "support for interfacing with exotic hardware") (help . "support for on-line help systems") @@ -114,11 +116,13 @@ (define-key map " " 'finder-select) (define-key map "f" 'finder-select) (define-key map "\C-m" 'finder-select) + ;; XEmacs changes (define-key map "e" 'finder-edit) (define-key map "v" 'finder-view) (define-key map "?" 'finder-summary) (define-key map "q" 'finder-exit) (define-key map "d" 'finder-list-keywords) + ;; XEmacs change (define-key map [button2] 'finder-mouse-select) (setq finder-mode-map map))) @@ -136,6 +140,7 @@ Optional arguments are a list of Emacs Lisp directories to compile from; no arguments compiles from `load-path'." (save-excursion + ;; XEmacs change (find-file "finder-inf.el") (let ((processed nil) (directory-abbrev-alist @@ -197,24 +202,44 @@ (eval-current-buffer) ;; So we get the new keyword list immediately (basic-save-buffer)))) +(defun finder-compile-keywords-make-dist () + "Regenerate `finder-inf.el' for the Emacs distribution." + (finder-compile-keywords default-directory)) + ;;; Now the retrieval code +(defun finder-insert-at-column (column &rest strings) + "Insert list of STRINGS, at column COLUMN." + (if (> (current-column) column) (insert "\n")) + (move-to-column column) + (let ((col (current-column))) + (if (< col column) + (indent-to column) + (if (and (/= col column) + (= (preceding-char) ?\t)) + (let (indent-tabs-mode) + (delete-char -1) + (indent-to col) + (move-to-column column))))) + (apply 'insert strings)) + (defun finder-list-keywords () "Display descriptions of the keywords in the Finder buffer." (interactive) (setq buffer-read-only nil) (erase-buffer) (mapcar - (function (lambda (assoc) - (let ((keyword (car assoc))) - (insert (symbol-name keyword)) - (insert-at-column 14 (concat (cdr assoc) "\n")) - (cons (symbol-name keyword) keyword)))) + (lambda (assoc) + (let ((keyword (car assoc))) + (insert (symbol-name keyword)) + (finder-insert-at-column 14 (concat (cdr assoc) "\n")) + (cons (symbol-name keyword) keyword))) finder-known-keywords) (goto-char (point-min)) (setq finder-headmark (point)) (setq buffer-read-only t) (set-buffer-modified-p nil) + ;; XEmacs change (if (not (one-window-p)) (balance-windows)) (finder-summary)) @@ -227,14 +252,11 @@ "The following packages match the keyword `" key "':\n\n") (setq finder-headmark (point)) (mapcar - (function (lambda (x) - (if (memq id (car (cdr (cdr x)))) - (progn - (insert (car x)) - (insert-at-column 16 - (concat (car (cdr x)) "\n")) - )) - )) + (lambda (x) + (if (memq id (car (cdr (cdr x)))) + (progn + (insert (car x)) + (finder-insert-at-column 16 (concat (car (cdr x)) "\n"))))) finder-package-info) (goto-char (point-min)) (forward-line) @@ -243,27 +265,8 @@ (shrink-window-if-larger-than-buffer) (finder-summary))) -;; Return full pathname for FILE from finder-package-info -;; or by searching for library in load-path. +;; Search for a file named FILE the same way `load' would search. (defun finder-find-library (file) - (let ((dir (nth 3 (assoc file finder-package-info))) - (path)) - (if dir - (setq path (expand-file-name - file - ;; Dir may be relative, in which case, we first expand it - ;; relative to the first element of - ;; finder-abbreviate-directory-list or to the local emacs - ;; root directory. - (expand-file-name - dir (or (car finder-abbreviate-directory-list) - finder-emacs-root-directory))))) - (if (and path (file-exists-p path)) - path - (finder-find-library-in-load-path file)))) - -;; Search for a file named FILE the same way `load' would search. -(defun finder-find-library-in-load-path (file) (if (file-name-absolute-p file) file (let ((dirs load-path) @@ -282,6 +285,7 @@ (if (null str) (error "Can't find any Commentary section")) (pop-to-buffer "*Finder*") + ;; XEmacs change (setq buffer-read-only nil mode-motion-hook 'mode-motion-highlight-line) (erase-buffer) @@ -297,8 +301,7 @@ (setq buffer-read-only t) (set-buffer-modified-p nil) (shrink-window-if-larger-than-buffer) - (finder-summary) - )) + (finder-summary))) (defun finder-current-item () (if (and finder-headmark (< (point) finder-headmark)) @@ -307,6 +310,7 @@ (beginning-of-line) (current-word)))) +;; XEmacs change (defun finder-edit () (interactive) (let ((entry (finder-current-item))) @@ -318,6 +322,7 @@ ;; a finder keyword (error "Finder-edit works on Emacs Lisp libraries only")))) +;; XEmacs change (defun finder-view () (interactive) (let ((entry (finder-current-item))) @@ -332,10 +337,12 @@ (defun finder-select () (interactive) (let ((key (finder-current-item))) + ;; XEmacs change (if (string-match finder-file-regexp key) (finder-commentary key) (finder-list-matches key)))) +;; XEmacs change (defun finder-mouse-select (ev) (interactive "e") (goto-char (event-point ev)) @@ -357,6 +364,7 @@ " (interactive) (pop-to-buffer "*Finder*") + ;; XEmacs change (setq buffer-read-only nil mode-motion-hook 'mode-motion-highlight-line) (erase-buffer) @@ -365,19 +373,20 @@ (setq mode-name "Finder") (setq major-mode 'finder-mode) (make-local-variable 'finder-headmark) - (setq finder-headmark nil) -) + (setq finder-headmark nil)) (defun finder-summary () "Summarize basic Finder commands." (interactive) - (message + (message "%s" (substitute-command-keys + ;; XEmacs change "\\<finder-mode-map>\\[finder-select] = select, \\[finder-list-keywords] = keywords, \\[finder-edit] = edit, \\[finder-view] = view, \\[finder-exit] = quit, \\[finder-summary] = help"))) (defun finder-exit () "Exit Finder mode and kill the buffer" (interactive) + ;; XEmacs change (or (one-window-p t 0) (delete-window)) (kill-buffer "*Finder*"))
--- a/lisp/utils/flow-ctrl.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/utils/flow-ctrl.el Mon Aug 13 08:46:35 2007 +0200 @@ -90,16 +90,19 @@ Use `(enable-flow-control-on \"vt100\" \"h19\")' to enable flow control on VT-100 and H19 terminals. When flow control is enabled, you must type C-\\ to get the effect of a C-s, and type C-^ -to get the effect of a C-q." - (let ((term (getenv "TERM")) - hyphend) - (if term - (progn - ;; Strip off hyphen and what follows - (while (setq hyphend (string-match "[-_][^-_]+$" term)) - (setq term (substring term 0 hyphend))) - (and (member term losing-terminal-types) - (enable-flow-control)))))) +to get the effect of a C-q. + +This function has no effect unless the current device is a tty. + +The tty terminal type is determined from the TERM environment variable. +Trailing hyphens and everything following is stripped, so a TERM +value of \"vt100-nam\" is treated the same as \"vt100\"." + (and + (eq (device-type) 'tty) + (getenv "TERM") + (member (replace-in-string (getenv "TERM") "[-_].*$" "") + losing-terminal-types) + (enable-flow-control))) (provide 'flow-ctrl)
--- a/lisp/utils/foldout.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/utils/foldout.el Mon Aug 13 08:46:35 2007 +0200 @@ -21,9 +21,10 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary:
--- a/lisp/utils/forms-d2.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/utils/forms-d2.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,7 +1,9 @@ ;;; forms-d2.el --- demo forms-mode -;; Keywords: extensions -;;; Synched up with: FSF 19.30. +;; Author: Johan Vromans +;; Created: 1989 + +;;; Synched up with: FSF 19.34. ;; This sample forms exploit most of the features of forms mode. @@ -41,14 +43,14 @@ (arch-tocol (- target (length (nth field forms-fields))) fill)) ;; Record filters. -;; This example uses the (defun ...) method of defining. ;; -(defun forms-new-record-filter (the-record) +(defun arch-new-record-filter (the-record) "Form a new record with some defaults." (aset the-record arch-from (user-full-name)) (aset the-record arch-date (current-time-string)) the-record ; return it ) +(setq forms-new-record-filter 'arch-new-record-filter) ;; The format list. (setq forms-format-list
--- a/lisp/utils/forms-pass.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/utils/forms-pass.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,7 +1,6 @@ ;;; forms-pass.el --- passwd file demo for forms-mode -;; Keywords: extensions -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;; This demo visits your passwd file.
--- a/lisp/utils/highlight-headers.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/utils/highlight-headers.el Mon Aug 13 08:46:35 2007 +0200 @@ -230,7 +230,7 @@ (setq e (make-extent (match-end 0) (match-end 0)))) (t - ;; okay, make the beginning of the the invisible + ;; okay, make the beginning of the invisible ;; move forward to only hide the modem noise... (set-extent-endpoints e (match-beginning 2)
--- a/lisp/utils/loadhist.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/utils/loadhist.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,5 +1,5 @@ ;;; loadhist.el --- lisp functions for working with feature groups -;;; Copyright (C) 1995 Free Software Foundation, Inc. +;; Copyright (C) 1995 Free Software Foundation, Inc. ;; Author: Eric S. Raymond <esr@snark.thyrsus.com> ;; Version: 1.0 @@ -19,9 +19,10 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary:
--- a/lisp/utils/mail-extr.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/utils/mail-extr.el Mon Aug 13 08:46:35 2007 +0200 @@ -139,7 +139,7 @@ ;; Tue Mar 23 21:23:18 1993 Joe Wells (jbw at csd.bu.edu) ;; ;; * Made mail-full-name-prefixes a user-customizable variable. -;; Allow passing the address as a buffer as well as as a string. +;; Allow passing the address as a buffer as well as a string. ;; Allow [ and ] as name characters (Finnish character set). ;; ;; Mon Mar 22 21:20:56 1993 Joe Wells (jbw at bigbird.bu.edu)
--- a/lisp/utils/mailpost.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/utils/mailpost.el Mon Aug 13 08:46:35 2007 +0200 @@ -3,13 +3,30 @@ ;; This is in the public domain ;; since Delp distributed it without a copyright notice in 1986. -;;; Synched up with: FSF 19.30. - ;; Author: Gary Delp <delp@huey.Udel.Edu> ;; Maintainer: FSF ;; Created: 13 Jan 1986 ;; Keywords: mail +;; This file is part of XEmacs. + +;; XEmacs 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. + +;; XEmacs 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 XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. + +;;; Synched up with: FSF 19.34. + ;;; Commentary: ;; Yet another mail interface. this for the rmail system to provide
--- a/lisp/utils/meese.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/utils/meese.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,13 +1,16 @@ ;;; meese.el --- protect the impressionable young minds of America -;;; Synched up with: FSF 19.30. - ;; This is in the public domain on account of being distributed since ;; 1985 or 1986 without a copyright notice. ;; Maintainer: FSF ;; Keywords: games +;;; Commentary: +;; This file is grossly misnamed. It should be called reno.el. + +;;; Synched up with: FSF 19.34. + ;;; Code: (defun protect-innocence-hook ()
--- a/lisp/utils/pp.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/utils/pp.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,10 +1,9 @@ ;;; pp.el --- pretty printer for Emacs Lisp -;; Keywords: lisp, tools, language, extensions - ;; Copyright (C) 1989, 1993 Free Software Foundation, Inc. -;; Author: Randal Schwartz <merlyn@ora.com> +;; Author: Randal Schwartz <merlyn@stonehenge.com> +;; Keywords: lisp, tools, language, extensions ;; This file is part of XEmacs. @@ -20,26 +19,20 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.28. +;;; Synched up with: FSF 19.34. ;;; Code: (defvar pp-escape-newlines t - "*Value of `print-escape-newlines' used by pp-* functions.") + "*Value of print-escape-newlines used by pp-* functions.") +;; XEmacs changes (defvar pp-print-readably t "*Value of `print-readably' used by pp-* functions.") ;;;###autoload -(defun pp (object &optional stream) - "Output the pretty-printed representation of OBJECT, any Lisp object. -Quoting characters are printed when needed to make output that `read' -can handle, whenever this is possible. -Output stream is STREAM, or value of `standard-output' (which see)." - (princ (pp-to-string object) (or stream standard-output))) - -;;;###autoload (defalias 'pprint 'pp) (defun pp-to-string (object) @@ -50,16 +43,15 @@ (set-buffer (generate-new-buffer " pp-to-string")) (unwind-protect (progn - (emacs-lisp-mode) - (let ((print-escape-newlines pp-escape-newlines) - (print-readably pp-print-readably)) + (lisp-mode-variables t) + (let ((print-escape-newlines pp-escape-newlines)) (prin1 object (current-buffer))) (goto-char (point-min)) (while (not (eobp)) ;; (message "%06d" (- (point-max) (point))) (cond - ((looking-at "\\s\(") - (while (looking-at "\\s(") + ((looking-at "\\s(\\|#\\s(") + (while (looking-at "\\s(\\|#\\s(") (forward-char 1))) ((and (looking-at "\\(quote[ \t]+\\)\\([^.)]\\)") (> (match-beginning 1) 1) @@ -106,6 +98,15 @@ (buffer-string)) (kill-buffer (current-buffer))))) +;;;###autoload +(defun pp (object &optional stream) + "Output the pretty-printed representation of OBJECT, any Lisp object. +Quoting characters are printed when needed to make output that `read' +can handle, whenever this is possible. +Output stream is STREAM, or value of `standard-output' (which see)." + (princ (pp-to-string object) (or stream standard-output))) + +;;;###autoload (defun pp-eval-expression (expression) "Evaluate EXPRESSION and pretty-print value into a new display buffer. If the pretty-printed value fits on one line, the message line is used @@ -113,13 +114,11 @@ value." (interactive "xPp-eval: ") (setq values (cons (eval expression) values)) - (let* ((old-show-hook - (or (let ((sym (if (> (string-to-int emacs-version) 18) - 'temp-buffer-show-function - 'temp-buffer-show-hook))) - (and (boundp 'sym) (symbol-value sym))) - 'display-buffer)) - (temp-buffer-show-hook + (let* ((old-show-function temp-buffer-show-function) + ;; Use this function to display the buffer. + ;; This function either decides not to display it at all + ;; or displays it in the usual way. + (temp-buffer-show-function (function (lambda (buf) (save-excursion @@ -127,20 +126,27 @@ (goto-char (point-min)) (end-of-line 1) (if (or (< (1+ (point)) (point-max)) - (>= (- (point) (point-min)) (screen-width))) - (progn + (>= (- (point) (point-min)) (frame-width))) + (let ((temp-buffer-show-function old-show-function) + (old-selected (selected-window)) + (window (display-buffer buf))) (goto-char (point-min)) ; expected by some hooks ... - (funcall old-show-hook buf)) + (make-frame-visible (window-frame window)) + (unwind-protect + (progn + (select-window window) + (run-hooks 'temp-buffer-show-hook)) + (select-window old-selected))) (message "%s" (buffer-substring (point-min) (point))) - (delete-windows-on buf) ; no need to kill it - ))))) - (temp-buffer-show-function temp-buffer-show-hook)) ; emacs19 name + )))))) (with-output-to-temp-buffer "*Pp Eval Output*" (pp (car values))) (save-excursion (set-buffer "*Pp Eval Output*") - (emacs-lisp-mode)))) + (let (emacs-lisp-mode-hook) + (emacs-lisp-mode))))) +;;;###autoload (defun pp-eval-last-sexp (arg) "Run `pp-eval-expression' on sexp before point (which see). With argument, pretty-print output into current buffer.
--- a/lisp/utils/regi.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/utils/regi.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,13 +1,13 @@ ;;; regi.el --- REGular expression Interpreting engine +;; Copyright (C) 1993 Free Software Foundation, Inc. + ;; Author: 1993 Barry A. Warsaw, Century Computing, Inc. <bwarsaw@cen.com> ;; Maintainer: bwarsaw@cen.com ;; Created: 24-Feb-1993 ;; Version: 1.8 ;; Last Modified: 1993/06/01 21:33:00 -;; Keywords: extensions, matching, wp - -;; Copyright (C) 1993 Barry A. Warsaw +;; Keywords: extensions, matching ;; This file is part of XEmacs. @@ -23,14 +23,10 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;; LCD Archive Entry -;; regi|Barry A. Warsaw|bwarsaw@cen.com -;; |REGular expression Interpreting engine -;; |1993/06/01 21:33:00|1.8| - -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Code: @@ -113,7 +109,7 @@ `every' -- execute after frame is matched on a line Note that NEGATE-P and CASE-FOLD-SEARCH are meaningless if PRED is one -of these special symbols. Only the first occurance of each symbol in +of these special symbols. Only the first occurrence of each symbol in a frame entry is used, the rest are ignored. Your FUNC can return values which control regi processing. If a list
--- a/lisp/utils/reporter.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/utils/reporter.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,45 +1,57 @@ ;;; reporter.el --- customizable bug reporting of lisp programs -;; Author: 1993 Barry A. Warsaw <bwarsaw@cnri.reston.va.us> -;; Maintainer: bwarsaw@cnri.reston.va.us +;; Copyright (C) 1993 1994 1995 1996 Free Software Foundation, Inc. + +;; Author: 1993-1996 Barry A. Warsaw ;; Created: 19-Apr-1993 -;; Version: 2.21 -;; Last Modified: 2-jan-95 -;; Keywords: mail, lisp - -;; Copyright (C) 1993 1994 Barry A. Warsaw -;; Copyright (C) 1993 1994 Free Software Foundation, Inc. +;; Version: 3.3 +;; Last Modified: 1996/07/02 00:39:09 +;; Keywords: maint mail tools ;; This file is part of XEmacs. -;; XEmacs is free software; you can redistribute it and/or modify it -;; under the terms of the GNU General Public License as published by +;; XEmacs 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. -;; XEmacs 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. +;; XEmacs 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 XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; along with XEmacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary: -;; -;; Introduction -;; ============ -;; This program is for lisp package authors and can be used to ease -;; reporting of bugs. When invoked, reporter-submit-bug-report will -;; set up a mail buffer with the appropriate bug report address, -;; including a lisp expression the maintainer of the package can eval -;; to completely reproduce the environment in which the bug was -;; observed (e.g. by using eval-last-sexp). This package proved -;; especially useful during my development of cc-mode.el, which is -;; highly dependent on its configuration variables. + +;; End User Interface +;; ================== +;; The variable `mail-user-agent' contains a symbol indicating which +;; Emacs mail package end users would like to use to compose outgoing +;; mail. See that variable for details. + +;; Mail Package Interface +;; ====================== +;; Mail package authors can configure reporter to support their +;; package by calling the function `define-mail-user-agent' See that +;; function for details. + +;; Lisp Package Authors +;; ==================== +;; Reporter was written primarily for Emacs Lisp package authors so +;; that their users can easily report bugs. When invoked, +;; reporter-submit-bug-report will set up an outgoing mail buffer with +;; the appropriate bug report address, including a lisp expression the +;; maintainer of the package can eval to completely reproduce the +;; environment in which the bug was observed (e.g. by using +;; eval-last-sexp). This package proved especially useful during my +;; development of cc-mode, which is highly dependent on its +;; configuration variables. ;; ;; Do a "C-h f reporter-submit-bug-report" for more information. ;; Here's an example usage: @@ -49,7 +61,6 @@ ;;(defun mypkg-submit-bug-report () ;; "Submit via mail a bug report on mypkg" ;; (interactive) -;; (require 'reporter) ;; (reporter-submit-bug-report ;; mypkg-maintainer-address ;; (concat "mypkg.el " mypkg-version) @@ -60,50 +71,62 @@ ;; Mailing List ;; ============ -;; I've set up a mailing list to report bugs or suggest enhancements, -;; etc. This list's intended audience is elisp package authors who are -;; using reporter and want to stay current with releases. Here are the -;; relevent addresses: +;; I've set up a Majordomo mailing list to report bugs or suggest +;; enhancements, etc. This list's intended audience is elisp package +;; authors who are using reporter and want to stay current with +;; releases. Here are the relevant addresses: ;; -;; Administrivia: reporter-request@anthem.nlm.nih.gov -;; Submissions: reporter@anthem.nlm.nih.gov +;; Administrivia: reporter-request@python.org +;; Submissions: reporter@python.org ;; Packages that currently use reporter are: cc-mode, supercite, elp, -;; tcl, ediff, crypt, vm, edebug, archie, and efs. If you know of -;; others, please email me! - -;; LCD Archive Entry: -;; reporter|Barry A. Warsaw|bwarsaw@cnri.reston.va.us| -;; Customizable bug reporting of lisp programs.| -;; 1994/11/29 16:13:50|2.21|~/misc/reporter.el.Z| +;; tcl, ediff, crypt++ (crypt), dired-x, rmailgen, mode-line, vm, +;; mh-e, edebug, archie, viper, w3-mode, framepop, hl319, hilit19, +;; pgp, eos, hm--html, efs. +;; +;; If you know of others, please email me! ;;; Code: -;; vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv -;; user defined variables +;; vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv +;; End user interface + +;; XEmacs -- don't autoload +(defvar mail-user-agent 'sendmail-user-agent + "*Your preference for a mail composition package. +Various Emacs Lisp packages (e.g. reporter) require you to compose an +outgoing email message. As there are several such packages available +for Emacs, you can indicate your preference by setting this variable. + +Valid values currently are: -(defvar reporter-mailer '(vm-mail reporter-mail) - "*Mail package to use to generate bug report buffer. -This can either be a function symbol or a list of function symbols. -If a list, it tries to use each specified mailer in order until an -existing one is found. + 'sendmail-user-agent -- use Emacs built-in Mail package + 'vm-user-agent -- use Kyle Jones' VM package + 'mh-e-user-agent -- use the Emacs interface to the MH mail system -MH-E users may want to use `mh-smail'.") +Additional valid symbols may be available; check with the author of +your package for details.") + + + +;; vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv +;; Package author interface variables (defvar reporter-prompt-for-summary-p nil "Interface variable controlling prompting for problem summary. When non-nil, `reporter-submit-bug-report' prompts the user for a brief summary of the problem, and puts this summary on the Subject: -line. +line. If this variable is a string, that string is used as the prompt +string. Default behavior is to not prompt (i.e. nil). If you want reporter to -prompt, you should `let' bind this variable to t before calling +prompt, you should `let' bind this variable before calling `reporter-submit-bug-report'. Note that this variable is not buffer-local so you should never just `setq' it.") (defvar reporter-dont-compact-list nil - "Interface variable controlling compating of list values. + "Interface variable controlling compacting of list values. When non-nil, this must be a list of variable symbols. When a variable containing a list value is formatted in the bug report mail buffer, it normally is compacted so that its value fits one the fewest @@ -115,23 +138,26 @@ `setq' it. If you want to changes its default value, you should `let' bind it.") -;; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -;; end of user defined variables +;; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +;; End of editable variables + (defvar reporter-eval-buffer nil "Buffer to retrieve variable's value from. This is necessary to properly support the printing of buffer-local variables. Current buffer will always be the mail buffer being composed.") -(defconst reporter-version "2.21" +(defconst reporter-version "3.2" "Reporter version number.") (defvar reporter-initial-text nil "The automatically created initial text of a bug report.") (make-variable-buffer-local 'reporter-initial-text) + +;; status feedback to the user (defvar reporter-status-message nil) (defvar reporter-status-count nil) @@ -144,6 +170,7 @@ (setq reporter-status-count (1+ reporter-status-count))) +;; dumping/pretty printing of values (defun reporter-beautify-list (maxwidth compact-p) ;; pretty print a list (reporter-update-status) @@ -218,7 +245,8 @@ (mail-position-on-field "X-Reporter-Void-Vars-Found") (end-of-line) (insert (symbol-name varsym) " "))) - (error (error)))) + (error + (error "")))) (defun reporter-dump-state (pkgname varlist pre-hooks post-hooks) ;; Dump the state of the mode specific variables. @@ -303,14 +331,35 @@ 'move) ;search for and move (buffer-substring (match-beginning 0) (match-end 0)))) -;; Serves as an interface to `mail', -;; but when the user says "no" to discarding an unset message, -;; it gives an error. + +;; Serves as an interface to `mail' (sendmail.el), but when the user +;; answers "no" to discarding an unsent message, it gives an error. (defun reporter-mail (&rest args) - (interactive "P") (or (apply 'mail args) (error "Bug report aborted"))) +(defun reporter-compose-outgoing () + ;; compose the outgoing mail buffer, and return the selected + ;; paradigm, with the current-buffer tacked onto the beginning of + ;; the list. + (let* ((agent mail-user-agent) + (compose (get mail-user-agent 'composefunc))) + ;; Sanity check. If this fails then we'll try to use the SENDMAIL + ;; protocol, otherwise we must signal an error. + (if (not (and compose (fboundp compose))) + (progn + (setq agent 'sendmail-user-agent + compose (get agent 'composefunc)) + (if (not (and compose (fboundp compose))) + (error "Could not find a valid `mail-user-agent'.") + (ding) + (message "`%s' is an invalid `mail-user-agent'; using `sendmail-user-agent'." + mail-user-agent) + ))) + (funcall compose) + agent)) + + ;;;###autoload (defun reporter-submit-bug-report (address pkgname varlist &optional pre-hooks post-hooks salutation) @@ -326,38 +375,31 @@ ;; This function will prompt for a summary if ;; reporter-prompt-for-summary-p is non-nil. - ;; The mailer used is described in the variable `reporter-mailer'. + ;; The mailer used is described in by the variable `mail-user-agent'. (let ((reporter-eval-buffer (current-buffer)) final-resting-place after-sep-pos (reporter-status-message "Formatting bug report buffer...") (reporter-status-count 0) (problem (and reporter-prompt-for-summary-p - (read-string "(Very) brief summary of problem: "))) - (mailbuf - (progn - (call-interactively - (if (nlistp reporter-mailer) - reporter-mailer - (let ((mlist reporter-mailer) - (mailer nil)) - (while mlist - (if (commandp (car mlist)) - (setq mailer (car mlist) - mlist nil) - (setq mlist (cdr mlist)))) - (if (not mailer) - (error - "Variable `%s' does not contain a command for mailing" - "reporter-mailer")) - mailer))) - (current-buffer)))) + (read-string (if (stringp reporter-prompt-for-summary-p) + reporter-prompt-for-summary-p + "(Very) brief summary of problem: ")))) + (agent (reporter-compose-outgoing)) + (mailbuf (current-buffer)) + hookvar) + ;; do the work (require 'sendmail) - (pop-to-buffer reporter-eval-buffer) - (pop-to-buffer mailbuf) + ;; If mailbuf did not get made visible before, make it visible now. + (let (same-window-buffer-names same-window-regexps) + (pop-to-buffer mailbuf) + ;; Just in case the original buffer is not visible now, bring it + ;; back somewhere + (display-buffer reporter-eval-buffer)) (goto-char (point-min)) ;; different mailers use different separators, some may not even - ;; use m-h-s, but sendmail.el stuff must have m-h-s bound. + ;; use mail-header-separator, but sendmail.el stuff must have this + ;; variable bound. (let ((mail-header-separator (reporter-calculate-separator))) (mail-position-on-field "to") (insert address) @@ -380,29 +422,32 @@ (set-marker final-resting-place nil))) ;; save initial text and set up the `no-empty-submission' hook. - ;; This only works for mailers that support mail-send-hook, - ;; e.g. sendmail.el - (if (fboundp 'add-hook) + ;; This only works for mailers that support a pre-send hook, and + ;; for which the paradigm has a non-nil value for the `hookvar' + ;; key in its agent (i.e. sendmail.el's mail-send-hook). + (save-excursion + (goto-char (point-max)) + (skip-chars-backward " \t\n") + (setq reporter-initial-text (buffer-substring after-sep-pos (point)))) + (if (setq hookvar (get agent 'hookvar)) (progn - (save-excursion - (goto-char (point-max)) - (skip-chars-backward " \t\n") - (setq reporter-initial-text - (buffer-substring after-sep-pos (point)))) - (make-variable-buffer-local 'mail-send-hook) - (add-hook 'mail-send-hook 'reporter-bug-hook))) + (make-variable-buffer-local hookvar) + (add-hook hookvar 'reporter-bug-hook))) - ;; minibuf message - ;; C-c C-c can't be generalized because they don't always run - ;; mail-send-and-exit. E.g. vm-mail-send-and-exit. I don't want - ;; to hard code these. - (let* ((sendkey "C-c C-c") - (killkey-whereis (where-is-internal 'kill-buffer nil t)) - (killkey (if killkey-whereis - (key-description killkey-whereis) - "M-x kill-buffer"))) - (message "Please type in your report. Hit %s to send, %s to abort." - sendkey killkey)) + ;; compose the minibuf message and display this. + (let* ((sendkey-whereis (where-is-internal + (get agent 'sendfunc) nil t)) + (abortkey-whereis (where-is-internal + (get agent 'abortfunc) nil t)) + (sendkey (if sendkey-whereis + (key-description sendkey-whereis) + "C-c C-c")) ; TBD: BOGUS hardcode + (abortkey (if abortkey-whereis + (key-description abortkey-whereis) + "M-x kill-buffer")) ; TBD: BOGUS hardcode + ) + (message "Please enter your report. Type %s to send, %s to abort." + sendkey abortkey)) )) (defun reporter-bug-hook () @@ -420,9 +465,51 @@ (length reporter-initial-text)) (string= (buffer-substring after-sep-pos (point)) reporter-initial-text)) - (error "Empty bug report cannot be sent")) + (error "Empty bug report cannot be sent.")) ))) +;; paradigm definitions +(defun define-mail-user-agent (symbol composefunc sendfunc + &optional abortfunc hookvar) + "Define a symbol appropriate for `mail-user-agent'. + +SYMBOL can be any meaningful lisp symbol. It need not have a function +or variable definition, as it is only used for its property list. +The property names are equivalent to the formal argument described +below (but in lower case). Additional properties can be placed on the +symbol. + +COMPOSEFUNC is program callable function that composes an outgoing +mail message buffer. This function should set up the basics of the +buffer without requiring user interaction. It should populate the +standard mail headers, leaving the `to:' and `subject:' headers blank. + +SENDFUNC is the command a user would type to send the message. + +Optional ABORTFUNC is the command a user would type to abort the +message. For mail packages that don't have a separate abort function, +this can be `kill-buffer' (the equivalent of omitting this argument). + +Optional HOOKVAR is a hook variable that gets run before the message +is actually sent. Reporter will install `reporter-bug-hook' onto this +hook so that empty bug reports can be suppressed by raising an error. +If not supplied, `mail-send-hook' will be used." + (put symbol 'composefunc composefunc) + (put symbol 'sendfunc sendfunc) + (put symbol 'abortfunc (or abortfunc 'kill-buffer)) + (put symbol 'hookvar (or hookvar 'mail-send-hook))) + +(define-mail-user-agent 'sendmail-user-agent + 'reporter-mail 'mail-send-and-exit) + +(define-mail-user-agent 'vm-user-agent + 'vm-mail 'vm-mail-send-and-exit) + +(define-mail-user-agent 'mh-e-user-agent + 'mh-smail-batch 'mh-send-letter 'mh-fully-kill-draft + 'mh-before-send-letter-hook) + + (provide 'reporter) ;;; reporter.el ends here
--- a/lisp/utils/ring.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/utils/ring.el Mon Aug 13 08:46:35 2007 +0200 @@ -5,42 +5,44 @@ ;; Maintainer: FSF ;; Keywords: extensions -;; This file is part of GNU Emacs. +;; This file is part of XEmacs. -;; 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 +;; XEmacs 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. +;; XEmacs 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, 675 Mass Ave, Cambridge, MA 02139, USA. +;; along with XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary: -;;; This code defines a ring data structure. A ring is a -;;; (hd-index length . vector) -;;; list. You can insert to, remove from, and rotate a ring. When the ring -;;; fills up, insertions cause the oldest elts to be quietly dropped. -;;; -;;; In ring-ref, 0 is the index of the newest element. Higher indexes -;;; correspond to older elements until they wrap. -;;; -;;; hd-index = index of the newest item on the ring. -;;; length = number of ring items. -;;; -;;; These functions are used by the input history mechanism, but they can -;;; be used for other purposes as well. +;; This code defines a ring data structure. A ring is a +;; (hd-index length . vector) +;; list. You can insert to, remove from, and rotate a ring. When the ring +;; fills up, insertions cause the oldest elts to be quietly dropped. +;; +;; In ring-ref, 0 is the index of the newest element. Higher indexes +;; correspond to older elements until they wrap. +;; +;; hd-index = index of the newest item on the ring. +;; length = number of ring items. +;; +;; These functions are used by the input history mechanism, but they can +;; be used for other purposes as well. ;;; Code: +;; XEmacs change ;;;###autoload (defun ringp (x) "Returns t if X is a ring; nil otherwise." @@ -48,6 +50,7 @@ (consp (cdr x)) (integerp (car (cdr x))) (vectorp (cdr (cdr x))))) +;; XEmacs change ;;;###autoload (define-obsolete-function-alias 'ring-p 'ringp)
--- a/lisp/utils/shadowfile.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/utils/shadowfile.el Mon Aug 13 08:46:35 2007 +0200 @@ -5,77 +5,81 @@ ;; Author: Boris Goldowsky <boris@gnu.ai.mit.edu> ;; Keywords: comm -;; This file is part of GNU Emacs. +;; This file is part of XEmacs. -;; 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 +;; XEmacs 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. +;; XEmacs 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, 675 Mass Ave, Cambridge, MA 02139, USA. +;; along with XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; LCD Archive Entry: -;;; shadowfile|Boris Goldowsky|boris@gnu.ai.mit.edu| -;;; Helps you keep identical copies of files in multiple places.| -;;; $Date: 1996/12/18 03:32:59 $ |$Revision: 1.1.1.1 $|~/misc/shadowfile.el.Z| +;; LCD Archive Entry: +;; shadowfile|Boris Goldowsky|boris@gnu.ai.mit.edu| +;; Helps you keep identical copies of files in multiple places.| +;; $Date: 1996/12/18 03:45:48 $ |$Revision: 1.1.1.2 $|~/misc/shadowfile.el.Z| ;;; Synched up with: FSF 19.30. -;;; Commentary: -;;; -;;; This package helps you to keep identical copies of files in more than one -;;; place - possibly on different machines. When you save a file, it checks -;;; whether it is on the list of files with "shadows", and if so, it tries to -;;; copy it when you exit emacs (or use the shadow-copy-files command). +;; Commentary: + +;; This package helps you to keep identical copies of files in more than one +;; place - possibly on different machines. When you save a file, it checks +;; whether it is on the list of files with "shadows", and if so, it tries to +;; copy it when you exit emacs (or use the shadow-copy-files command). + +;; Installation & Use: + +;; Put (require 'shadowfile) in your .emacs; add clusters (if necessary) +;; and file groups with shadow-define-cluster, +;; shadow-define-literal-group, and shadow-define-regexp-group (see the +;; documentation for these functions for information on how and when to +;; use them). After doing this once, everything should be automatic. + +;; The lists of clusters and shadows are saved in a file called .shadows, +;; so that they can be remembered from one emacs session to another, even +;; (as much as possible) if the emacs session terminates abnormally. The +;; files needing to be copied are stored in .shadow_todo; if a file cannot +;; be copied for any reason, it will stay on the list to be tried again +;; next time. The .shadows file should itself have shadows on all your +;; accounts so that the information in it is consistent everywhere, but +;; .shadow_todo is local information and should have no shadows. -;;; Installation & Use: -;;; -;;; Put (require 'shadowfile) in your .emacs; add clusters (if necessary) -;;; and file groups with shadow-define-cluster, shadow-define-literal-group, -;;; and shadow-define-regexp-group (see the documentation for these functions -;;; for information on how and when to use them). After doing this once, -;;; everything should be automatic. -;;; The lists of clusters and shadows are saved in a file called -;;; .shadows, so that they can be remembered from one emacs session to -;;; another, even (as much as possible) if the emacs session terminates -;;; abnormally. The files needing to be copied are stored in .shadow_todo; if -;;; a file cannot be copied for any reason, it will stay on the list to be -;;; tried again next time. The .shadows file should itself have shadows on -;;; all your accounts so that the information in it is consistent everywhere, -;;; but .shadow_todo is local information and should have no shadows. -;;; If you do not want to copy a particular file, you can answer "no" -;;; and be asked again next time you hit C-x 4 s or exit emacs. If you do not -;;; want to be asked again, use shadow-cancel, and you will not be asked until -;;; you change the file and save it again. If you do not want to shadow -;;; that file ever again, you can edit it out of the .shadows buffer. -;;; Anytime you edit the .shadows buffer, you must type M-x shadow-read-files -;;; to load in the new information, or your changes will be overwritten! +;; If you do not want to copy a particular file, you can answer "no" and +;; be asked again next time you hit C-x 4 s or exit emacs. If you do not +;; want to be asked again, use shadow-cancel, and you will not be asked +;; until you change the file and save it again. If you do not want to +;; shadow that file ever again, you can edit it out of the .shadows +;; buffer. Anytime you edit the .shadows buffer, you must type M-x +;; shadow-read-files to load in the new information, or your changes will +;; be overwritten! -;;; Bugs & Warnings: -;;; -;;; - It is bad to have two emacses both running shadowfile at the same -;;; time. It tries to detect this condition, but is not always successful. -;;; -;;; - You have to be careful not to edit a file in two locations -;;; before shadowfile has had a chance to copy it; otherwise -;;; "updating shadows" will overwrite one of the changed versions. -;;; -;;; - It ought to check modification times of both files to make sure -;;; it is doing the right thing. This will have to wait until -;;; file-newer-than-file-p works between machines. -;;; -;;; - It will not make directories for you, it just fails to copy files -;;; that belong in non-existent directories. -;;; -;;; Please report any bugs to me (boris@gnu.ai.mit.edu). Also let me know -;;; if you have suggestions or would like to be informed of updates. +;; Bugs & Warnings: +;; +;; - It is bad to have two emacses both running shadowfile at the same +;; time. It tries to detect this condition, but is not always successful. +;; +;; - You have to be careful not to edit a file in two locations +;; before shadowfile has had a chance to copy it; otherwise +;; "updating shadows" will overwrite one of the changed versions. +;; +;; - It ought to check modification times of both files to make sure +;; it is doing the right thing. This will have to wait until +;; file-newer-than-file-p works between machines. +;; +;; - It will not make directories for you, it just fails to copy files +;; that belong in non-existent directories. +;; +;; Please report any bugs to me (boris@gnu.ai.mit.edu). Also let me know +;; if you have suggestions or would like to be informed of updates. ;;; Code: @@ -499,7 +503,8 @@ (let ((msg (shadow-join (mapcar (function cdr) (shadow-shadows-of (buffer-file-name))) " "))) - (message (if (zerop (length msg)) + (message "%s" + (if (zerop (length msg)) "No shadows." msg)))) @@ -537,8 +542,8 @@ (shadow-remove-from-todo pair))) shadow-files-to-copy '("shadow" "shadows" "cancel copy")) - (message (format "There are %d shadows to be updated." - (length shadow-files-to-copy))) + (message "There are %d shadows to be updated." + (length shadow-files-to-copy)) (shadow-write-todo-file)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -580,8 +585,7 @@ (progn (write-region (point-min) (point-max) to) (shadow-remove-from-todo s)) - (error (message (format "Shadow %s not updated!" - (cdr s))))))))) + (error (message "Shadow %s not updated!" (cdr s)))))))) (defun shadow-shadows-of (file) "Returns copy operations needed to update FILE. @@ -632,8 +636,8 @@ (setq shadow-files-to-copy (shadow-union shadows shadow-files-to-copy)) (shadow-when (not shadow-inhibit-message) - (message (substitute-command-keys - "Use \\[shadow-copy-files] to update shadows.")) + (message "%s" (substitute-command-keys + "Use \\[shadow-copy-files] to update shadows.")) (sit-for 1)) (shadow-write-todo-file))) nil) ; Return nil for write-file-hooks
--- a/lisp/utils/skeleton.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/utils/skeleton.el Mon Aug 13 08:46:35 2007 +0200 @@ -5,23 +5,24 @@ ;; Maintainer: FSF ;; Keywords: extensions, abbrev, languages, tools -;; This file is part of GNU Emacs. +;; This file is part of XEmacs. -;; 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 +;; XEmacs 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. +;; XEmacs 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, 675 Mass Ave, Cambridge, MA 02139, USA. +;; along with XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary: @@ -49,6 +50,16 @@ "aTransformation function: ") +(defvar skeleton-autowrap t + "Controls wrapping behaviour of functions created with `define-skeleton'. +When the region is visible (due to `transient-mark-mode' or marking a region +with the mouse) and this is non-`nil' and the function was called without an +explicit ARG, then the ARG defaults to -1, i.e. wrapping around the visible +region. + +We will probably delete this variable in a future Emacs version +unless we get a substantial number of complaints about the auto-wrap +feature.") (defvar skeleton-end-hook (lambda () @@ -60,7 +71,7 @@ ;;;###autoload (defvar skeleton-filter 'identity - "Function for transforming a skeleton-proxy's aliases' variable value.") + "Function for transforming a skeleton proxy's aliases' variable value.") (defvar skeleton-untabify t "When non-`nil' untabifies when deleting backwards with element -ARG.") @@ -83,9 +94,10 @@ "*Replacement for %s in prompts of recursive subskeletons.") -(defvar skeleton-abbrev-cleanup nil) +(defvar skeleton-abbrev-cleanup nil + "Variable used to delete the character that led to abbrev expansion.") - +;; XEmacs -- won't byte compile without the wrapper (eval-and-compile (defvar skeleton-debug nil "*If non-nil `define-skeleton' will override previous definition.")) @@ -105,10 +117,61 @@ (if skeleton-debug (set command skeleton)) `(progn - (defvar ,command ',skeleton ,documentation) - (defalias ',command 'skeleton-proxy))) + (defun ,command (&optional str arg) + ,(concat documentation + (if (string-match "\n\\>" documentation) + "" "\n") + "\n" + "This is a skeleton command (see `skeleton-insert'). +Normally the skeleton text is inserted at point, with nothing \"inside\". +If there is a highlighted region, the skeleton text is wrapped +around the region text. + +A prefix argument ARG says to wrap the skeleton around the next ARG words. +A prefix argument of zero says to wrap around zero words---that is, nothing. +This is a way of overiding the use of a highlighted region.") + (interactive "*P\nP") + (skeleton-proxy-new ',skeleton str arg)))) - +;;;###autoload +(defun skeleton-proxy-new (skeleton &optional str arg) + "Insert skeleton defined by variable of same name (see `skeleton-insert'). +Prefix ARG allows wrapping around words or regions (see `skeleton-insert'). +If no ARG was given, but the region is visible, ARG defaults to -1 depending +on `skeleton-autowrap'. An ARG of M-0 will prevent this just for once. +This command can also be an abbrev expansion (3rd and 4th columns in +\\[edit-abbrevs] buffer: \"\" command-name). + +When called as a function, optional first argument STR may also be a string +which will be the value of `str' whereas the skeleton's interactor is then +ignored." + (interactive "*P\nP") + (setq skeleton (funcall skeleton-filter skeleton)) + (if (not skeleton) + (if (memq this-command '(self-insert-command + skeleton-pair-insert-maybe + expand-abbrev)) + (setq buffer-undo-list (primitive-undo 1 buffer-undo-list))) + (skeleton-insert skeleton + (if (setq skeleton-abbrev-cleanup + (or (eq this-command 'self-insert-command) + (eq this-command + 'skeleton-pair-insert-maybe))) + () + ;; Pretend C-x a e passed its prefix arg to us + (if (or arg current-prefix-arg) + (prefix-numeric-value (or arg + current-prefix-arg)) + (and skeleton-autowrap + (or (eq last-command 'mouse-drag-region) + (and (boundp 'transient-mark-mode) + transient-mark-mode mark-active)) + -1))) + (if (stringp str) + str)) + (and skeleton-abbrev-cleanup + (setq skeleton-abbrev-cleanup (point)) + (add-hook 'post-command-hook 'skeleton-abbrev-cleanup nil t)))) ;; This command isn't meant to be called, only it's aliases with meaningful ;; names are. @@ -116,6 +179,8 @@ (defun skeleton-proxy (&optional str arg) "Insert skeleton defined by variable of same name (see `skeleton-insert'). Prefix ARG allows wrapping around words or regions (see `skeleton-insert'). +If no ARG was given, but the region is visible, ARG defaults to -1 depending +on `skeleton-autowrap'. An ARG of M-0 will prevent this just for once. This command can also be an abbrev expansion (3rd and 4th columns in \\[edit-abbrevs] buffer: \"\" command-name). @@ -124,7 +189,7 @@ ignored." (interactive "*P\nP") (let ((function (nth 1 (backtrace-frame 1)))) - (if (eq function 'nth) ; uncompiled lisp function + (if (eq function 'nth) ; uncompiled Lisp function (setq function (nth 1 (backtrace-frame 5))) (if (eq function 'byte-code) ; tracing byte-compiled function (setq function (nth 1 (backtrace-frame 2))))) @@ -142,13 +207,17 @@ ;; Pretend C-x a e passed its prefix arg to us (if (or arg current-prefix-arg) (prefix-numeric-value (or arg - current-prefix-arg)))) + current-prefix-arg)) + (and skeleton-autowrap + (or (eq last-command 'mouse-drag-region) + (and (boundp 'transient-mark-mode) + transient-mark-mode mark-active)) + -1))) (if (stringp str) str)) - (if skeleton-abbrev-cleanup - (setq deferred-action-list t - deferred-action-function 'skeleton-abbrev-cleanup - skeleton-abbrev-cleanup (point)))))) + (and skeleton-abbrev-cleanup + (setq skeleton-abbrev-cleanup (point)) + (add-hook 'post-command-hook 'skeleton-abbrev-cleanup nil t))))) (defun skeleton-abbrev-cleanup (&rest list) @@ -156,10 +225,8 @@ (if (integerp skeleton-abbrev-cleanup) (progn (delete-region skeleton-abbrev-cleanup (point)) - (setq deferred-action-list () - deferred-action-function nil - skeleton-abbrev-cleanup nil)))) - + (setq skeleton-abbrev-cleanup nil) + (remove-hook 'post-command-hook 'skeleton-abbrev-cleanup t)))) ;;;###autoload (defun skeleton-insert (skeleton &optional skeleton-regions str) @@ -201,9 +268,9 @@ formatted with `skeleton-subprompt'. Such an INTERACTOR may also a list of strings with the subskeleton being repeated once for each string. -Quoted lisp-expressions are evaluated evaluated for their side-effect. -Other lisp-expressions are evaluated and the value treated as above. -Note that expressions may not return `t' since this impplies an +Quoted Lisp expressions are evaluated evaluated for their side-effect. +Other Lisp expressions are evaluated and the value treated as above. +Note that expressions may not return `t' since this implies an endless loop. Modes can define other symbols by locally setting them to any valid skeleton element. The following local variables are available: @@ -212,7 +279,7 @@ then: insert previously read string once more help help-form during interaction with the user or `nil' input initial input (string or cons with index) while reading str - v1, v2 local variables for memorising anything you want + v1, v2 local variables for memorizing anything you want When done with skeleton, but before going back to `_'-point call `skeleton-end-hook' if that is non-`nil'." @@ -382,20 +449,19 @@ ;; Maybe belongs into simple.el or elsewhere - +;###autoload (define-skeleton local-variables-section "Insert a local variables section. Use current comment syntax if any." - () - '(save-excursion - (if (re-search-forward page-delimiter nil t) - (error "Not on last page."))) - comment-start "Local Variables:" comment-end \n - comment-start "mode: " (completing-read "Mode: " obarray (lambda (symbol) (if (commandp symbol) (string-match "-mode$" (symbol-name symbol)))) t) + '(save-excursion + (if (re-search-forward page-delimiter nil t) + (error "Not on last page."))) + comment-start "Local Variables:" comment-end \n + comment-start "mode: " str & -5 | '(kill-line 0) & -1 | comment-end \n ( (completing-read (format "Variable, %s: " skeleton-subprompt) obarray @@ -406,9 +472,9 @@ comment-start str ": " (read-from-minibuffer "Expression: " nil read-expression-map nil 'read-expression-history) | _ - comment-end \n) + comment-end \n) resume: - comment-start "End:" comment-end) + comment-start "End:" comment-end \n) ;; Variables and command for automatically inserting pairs like () or "". @@ -439,80 +505,83 @@ (defun skeleton-pair-insert-maybe (arg) "Insert the character you type ARG times. -With no ARG, if `skeleton-pair' is non-nil, and if -`skeleton-pair-on-word' is non-nil or we are not before or inside a +With no ARG, if `skeleton-pair' is non-nil, pairing can occur. If the region +is visible the pair is wrapped around it depending on `skeleton-autowrap'. +Else, if `skeleton-pair-on-word' is non-nil or we are not before or inside a word, and if `skeleton-pair-filter' returns nil, pairing is performed. If a match is found in `skeleton-pair-alist', that is inserted, else the defaults are used. These are (), [], {}, <> and `' for the symmetrical ones, and the same character twice for the others." (interactive "*P") - (if (or arg - overwrite-mode - (not skeleton-pair) - (if (not skeleton-pair-on-word) (looking-at "\\w")) - (funcall skeleton-pair-filter)) - (self-insert-command (prefix-numeric-value arg)) - (self-insert-command 1) - (if skeleton-abbrev-cleanup - () - ;; (preceding-char) is stripped of any Meta-stuff in last-command-char - (if (setq arg (assq (preceding-char) skeleton-pair-alist)) - ;; typed char is inserted (car is no real interactor) - (let (skeleton-end-hook) - (skeleton-insert arg)) - (save-excursion - (insert (or (cdr (assq (preceding-char) - '((?( . ?)) - (?[ . ?]) - (?{ . ?}) - (?< . ?>) - (?` . ?')))) - last-command-char))))))) + (let ((mark (and skeleton-autowrap + (or (eq last-command 'mouse-drag-region) + (and (boundp 'transient-mark-mode) + transient-mark-mode mark-active)))) + (skeleton-end-hook)) + (if (or arg + (not skeleton-pair) + (and (not mark) + (or overwrite-mode + (if (not skeleton-pair-on-word) (looking-at "\\w")) + (funcall skeleton-pair-filter)))) + (self-insert-command (prefix-numeric-value arg)) + (setq last-command-char (logand last-command-char 255)) + (or skeleton-abbrev-cleanup + (skeleton-insert + (cons nil (or (assq last-command-char skeleton-pair-alist) + (assq last-command-char '((?( _ ?)) + (?[ _ ?]) + (?{ _ ?}) + (?< _ ?>) + (?` _ ?'))) + `(,last-command-char _ ,last-command-char))) + (if mark -1)))))) -;;; ;; A more serious example can be found in sh-script.el -;;; ;; The quote before (defun prevents this from being byte-compiled. -;;;(defun mirror-mode () -;;; "This major mode is an amusing little example of paired insertion. -;;;All printable characters do a paired self insert, while the other commands -;;;work normally." -;;; (interactive) -;;; (kill-all-local-variables) -;;; (make-local-variable 'pair) -;;; (make-local-variable 'pair-on-word) -;;; (make-local-variable 'pair-filter) -;;; (make-local-variable 'pair-alist) -;;; (setq major-mode 'mirror-mode -;;; mode-name "Mirror" -;;; pair-on-word t -;;; ;; in the middle column insert one or none if odd window-width -;;; pair-filter (lambda () -;;; (if (>= (current-column) -;;; (/ (window-width) 2)) -;;; ;; insert both on next line -;;; (next-line 1) -;;; ;; insert one or both? -;;; (= (* 2 (1+ (current-column))) -;;; (window-width)))) -;;; ;; mirror these the other way round as well -;;; pair-alist '((?) _ ?() -;;; (?] _ ?[) -;;; (?} _ ?{) -;;; (?> _ ?<) -;;; (?/ _ ?\\) -;;; (?\\ _ ?/) -;;; (?` ?` _ "''") -;;; (?' ?' _ "``")) -;;; ;; in this mode we exceptionally ignore the user, else it's no fun -;;; pair t) -;;; (let ((map (make-keymap)) -;;; (i ? )) -;;; (use-local-map map) -;;; (setq map (car (cdr map))) -;;; (while (< i ?\^?) -;;; (aset map i 'skeleton-pair-insert-maybe) -;;; (setq i (1+ i)))) -;;; (run-hooks 'mirror-mode-hook)) +;; A more serious example can be found in sh-script.el +;;; (defun mirror-mode () +;; "This major mode is an amusing little example of paired insertion. +;;All printable characters do a paired self insert, while the other commands +;;work normally." +;; (interactive) +;; (kill-all-local-variables) +;; (make-local-variable 'skeleton-pair) +;; (make-local-variable 'skeleton-pair-on-word) +;; (make-local-variable 'skeleton-pair-filter) +;; (make-local-variable 'skeleton-pair-alist) +;; (setq major-mode 'mirror-mode +;; mode-name "Mirror" +;; skeleton-pair-on-word t +;; ;; in the middle column insert one or none if odd window-width +;; skeleton-pair-filter (lambda () +;; (if (>= (current-column) +;; (/ (window-width) 2)) +;; ;; insert both on next line +;; (next-line 1) +;; ;; insert one or both? +;; (= (* 2 (1+ (current-column))) +;; (window-width)))) +;; ;; mirror these the other way round as well +;; skeleton-pair-alist '((?) _ ?() +;; (?] _ ?[) +;; (?} _ ?{) +;; (?> _ ?<) +;; (?/ _ ?\\) +;; (?\\ _ ?/) +;; (?` ?` _ "''") +;; (?' ?' _ "``")) +;; ;; in this mode we exceptionally ignore the user, else it's no fun +;; skeleton-pair t) +;; (let ((map (make-vector 256 'skeleton-pair-insert-maybe)) +;; (i 0)) +;; (use-local-map `(keymap ,map)) +;; (while (< i ? ) +;; (aset map i nil) +;; (aset map (+ i 128) nil) +;; (setq i (1+ i)))) +;; (run-hooks 'mirror-mode-hook)) + +(provide 'skeleton) ;; skeleton.el ends here
--- a/lisp/utils/soundex.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/utils/soundex.el Mon Aug 13 08:46:35 2007 +0200 @@ -7,23 +7,24 @@ ;; Keywords: matching ;; Created: Sat May 15 14:48:18 1993 -;; This file is part of GNU Emacs. +;; This file is part of XEmacs. -;; 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 +;; XEmacs 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. +;; XEmacs 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, 675 Mass Ave, Cambridge, MA 02139, USA. +;; along with XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary:
--- a/lisp/utils/text-props.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/utils/text-props.el Mon Aug 13 08:46:35 2007 +0200 @@ -90,7 +90,7 @@ ;;; shell-font.el and font-lock.el could put-text-property to attach fonts to ;;; the buffer. However, what these packages are interested in is the ;;; efficient extent partitioning behavior which this code exhibits, not the -;;; duplicability aspect of it. In fact, either of these packages could be be +;;; duplicability aspect of it. In fact, either of these packages could be ;;; implemented by creating a one-character non-expandable extent for each ;;; character in the buffer, except that that would be extremely wasteful of ;;; memory. (Redisplay performance would be fine, however.)
--- a/lisp/utils/tq.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/utils/tq.el Mon Aug 13 08:46:35 2007 +0200 @@ -6,23 +6,24 @@ ;; Adapted-By: ESR ;; Keywords: extensions -;; This file is part of GNU Emacs. +;; This file is part of XEmacs. -;; 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 +;; XEmacs 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. +;; XEmacs 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, 675 Mass Ave, Cambridge, MA 02139, USA. +;; along with XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;;; Commentary: @@ -102,9 +103,9 @@ (copy-to-buffer buf (point-min) (point-max)) (delete-region (point-min) (point)) (pop-to-buffer buf nil) - (error (concat "Spurious communication from process " - (process-name (tq-process tq)) - ", see buffer " (buffer-name buf) "."))) + (error "Spurious communication from process %s, see buffer %s" + (process-name (tq-process tq)) + (buffer-name buf))) (goto-char (point-min)) (if (re-search-forward (tq-queue-head-regexp tq) nil t) (let ((answer (buffer-substring (point-min) (point))))
--- a/lisp/utils/trace.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/utils/trace.el Mon Aug 13 08:46:35 2007 +0200 @@ -20,9 +20,10 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30. +;;; Synched up with: FSF 19.34. ;; LCD Archive Entry: ;; trace|Hans Chalupsky|hans@cs.buffalo.edu| @@ -165,6 +166,7 @@ (require 'advice) +;; XEmacs change (leave the version # in place) (defconst trace-version "2.0") ;;;###autoload
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/utils/uniquify.el Mon Aug 13 08:46:35 2007 +0200 @@ -0,0 +1,384 @@ +;;; uniquify.el --- unique buffer names dependent on file name + +;; Copyright (c) 1989, 1995 Free Software Foundation, Inc. + +;; Author: Dick King <king@reasoning.com> +;; Maintainer: Michael Ernst <mernst@theory.lcs.mit.edu> +;; Created: 15 May 86 + +;; 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. + +;;; Commentary: + +;; Emacs's standard method for making buffer names unique adds <2>, <3>, +;; etc. to the end of (all but one of) the buffers. This file replaces +;; that behavior, for buffers visiting files and dired buffers, with a +;; uniquification that adds parts of the file name until the buffer names +;; are unique. For instance, buffers visiting /u/mernst/tmp/Makefile and +;; /usr/projects/zaphod/Makefile would be named Makefile|tmp and +;; Makefile|zaphod, respectively (instead of Makefile and Makefile<2>). +;; Other buffer name styles are also available. + +;; To use this file, just load it. +;; To disable it after loading, set variable uniquify-buffer-name-style to nil. +;; For other options, see "User-visible variables", below. + +;; A version of uniquify.el that works under Emacs 18, Emacs 19, XEmacs, +;; and InfoDock is available from the maintainer. + +;;; Change Log: + +;; Originally by Dick King <king@reasoning.com> 15 May 86 +;; Converted for Emacs 18 by Stephen Gildea <gildea@lcs.mit.edu> +;; Make uniquify-min-dir-content 0 truly non-invasive. gildea 23 May 89 +;; Some cleanup. uniquify-min-dir-content default 0. gildea 01 Jun 89 +;; Don't rename to "". Michael Ernst <mernst@theory.lcs.mit.edu> 15 Jun 94 +;; Add kill-buffer-hook. Kenneth Manheimer <ken.manheimer@nist.gov> 09 May 95 +;; Add advice for rename-buffer and create-file-buffer, handle dired buffers, +;; kill-buffer-rationalize-buffer-names-p, documentation. mernst 24 May 95 +;; Remove free variables, fix typos. mernst 5 Jun 95 +;; Efficiently support Emacs 19.27 & earlier. ken.manheimer, mernst 10 Jun 95 +;; Rename user options to "uniquify-...", add uniquify-reverse-dir-content-p, +;; add uniquify-ask-about-buffer-names-p. king, mernst 13 Jun 95 +;; Prefix functions by "uniquify-..."; rename mnemonic-buffer-names to +;; uniquify-buffer-name-style; add 'forward and 'post-forward-angle-brackets +;; styles; remove uniquify-reverse-dir-content-p; add +;; uniquify-trailing-separator-p. mernst 4 Aug 95 + +;; Valuable feedback was provided by +;; Paul Smith <psmith@baynetworks.com>, +;; Alastair Burt <burt@dfki.uni-kl.de>, +;; Bob Weiner <weiner@footloose.sps.mot.com>, +;; Albert L. Ting <alt@vlibs.com>, +;; gyro@reasoning.com. + + +;;; Code: + +(provide 'uniquify) + +;;; User-visible variables + +(defvar uniquify-buffer-name-style 'post-forward + "*If non-nil, buffer names are uniquified with parts of directory name. +The value determines the buffer name style and is one of `forward', +`reverse', `post-forward' (the default), or `post-forward-angle-brackets'. +For example, files `/foo/bar/mumble/name' and `/baz/quux/mumble/name' +would have the following buffer names in the various styles: + forward bar/mumble/name quux/mumble/name + reverse name\\mumble\\bar name\\mumble\\quux + post-forward name|bar/mumble name|quux/mumble + post-forward-angle-brackets name<bar/mumble> name<quux/mumble> + nil name name<2>") + +(defvar uniquify-after-kill-buffer-p nil + "*If non-nil, rerationalize buffer names after a buffer has been killed. +This can be dangerous if Emacs Lisp code is keeping track of buffers by their +names (rather than keeping pointers to the buffers themselves).") + +(defconst uniquify-ask-about-buffer-names-p nil + "*If non-nil, permit user to choose names for buffers with same base file. +If the user chooses to name a buffer, uniquification is preempted and no +other buffer names are changed.") + +(defvar uniquify-min-dir-content 0 + "*Minimum parts of directory name included in buffer name.") + +(defvar uniquify-separator nil + "*String separator for buffer name components. +When `uniquify-buffer-name-style' is `post-forward', separates +base file name from directory part in buffer names (default \"|\"). +When `uniquify-buffer-name-style' is `reverse', separates all +file name components (default \"\\\").") + +(defvar uniquify-trailing-separator-p nil + "*If non-nil, add a file name separator to dired buffer names. +If `uniquify-buffer-name-style' is `forward', add the separator at the end; +if it is `reverse', add the separator at the beginning; otherwise, this +variable is ignored.") + + +;;; Utilities + +(defmacro uniquify-push (item list) + (` (setq (, list) (cons (, item) (, list))))) + +(defmacro uniquify-fix-list-base (a) + (` (car (, a)))) + +(defmacro uniquify-fix-list-filename (a) + (` (car (cdr (, a))))) + +(defmacro uniquify-fix-list-buffer (a) + (` (car (cdr (cdr (, a)))))) + +(defmacro uniquify-cadddr (a) + (` (car (cdr (cdr (cdr (, a))))))) + +;; Internal variables used free +(defvar uniquify-non-file-buffer-names nil) +(defvar uniquify-possibly-resolvable nil) + +;;; Main entry point. + +(defun uniquify-rationalize-file-buffer-names (&optional newbuffile newbuf) + "Makes file buffer names unique by adding segments from file name. +If `uniquify-min-dir-content' > 0, always pulls that many +file name elements. Arguments cause only a subset of buffers to be renamed." + (interactive) + (let (fix-list + uniquify-non-file-buffer-names + (depth uniquify-min-dir-content)) + (let ((buffers (buffer-list))) + (while buffers + (let* ((buffer (car buffers)) + (bfn (if (eq buffer newbuf) + (and newbuffile + (expand-file-name newbuffile)) + (uniquify-buffer-file-name buffer))) + (rawname (and bfn (file-name-nondirectory bfn))) + (deserving (and rawname + (or (not newbuffile) + (equal rawname + (file-name-nondirectory newbuffile)))))) + (if deserving + (uniquify-push (list rawname bfn buffer nil) fix-list) + (uniquify-push (list (buffer-name buffer)) + uniquify-non-file-buffer-names))) + (setq buffers (cdr buffers)))) + ;; selects buffers whose names may need changing, and others that + ;; may conflict. + (setq fix-list + (sort fix-list 'uniquify-fix-list-filename-lessp)) + ;; bringing conflicting names together + (uniquify-rationalize-a-list fix-list depth) + (mapcar 'uniquify-unrationalized-buffer fix-list))) + +;; uniquify's version of buffer-file-name +(defun uniquify-buffer-file-name (buffer) + "Return name of file BUFFER is visiting, or nil if none. +Works on dired buffers as well as ordinary file-visiting buffers." + (or (buffer-file-name buffer) + (save-excursion + (set-buffer buffer) + list-buffers-directory))) + +(defun uniquify-fix-list-filename-lessp (fixlist1 fixlist2) + (uniquify-filename-lessp + (uniquify-fix-list-filename fixlist1) (uniquify-fix-list-filename fixlist2))) + +;; This examines the filename components in reverse order. +(defun uniquify-filename-lessp (s1 s2) + (let ((s1f (file-name-nondirectory s1)) + (s2f (file-name-nondirectory s2))) + (and (not (equal s2f "")) + (or (string-lessp s1f s2f) + (and (equal s1f s2f) + (let ((s1d (file-name-directory s1)) + (s2d (file-name-directory s2))) + (and (not (<= (length s2d) 1)) + (or (<= (length s1d) 1) + (uniquify-filename-lessp + (substring s1d 0 -1) + (substring s2d 0 -1)))))))))) + +;; Was named do-the-buffers-you-couldnt-rationalize +(defun uniquify-unrationalized-buffer (item) + (or (uniquify-cadddr item) nil)) ;maybe better in the future + +(defun uniquify-rationalize-a-list (fix-list depth) + (let (conflicting-sublist + (old-name "") + proposed-name uniquify-possibly-resolvable) + (while fix-list + (let ((item (car fix-list))) + (setq proposed-name (uniquify-get-proposed-name item depth)) + (if (not (equal proposed-name old-name)) + (progn + (uniquify-rationalize-conflicting-sublist + conflicting-sublist old-name depth) + (setq conflicting-sublist nil))) + (uniquify-push item conflicting-sublist) + (setq old-name proposed-name)) + (setq fix-list (cdr fix-list))) + (uniquify-rationalize-conflicting-sublist + conflicting-sublist old-name depth))) + +(defun uniquify-get-proposed-name (item depth) + (let (index + (extra-string "") + (n depth) + (base (uniquify-fix-list-base item)) + (fn (uniquify-fix-list-filename item))) + (while (and (> n 0) + (setq index (string-match + (concat "\\(^\\|/[^/]*\\)/" + (regexp-quote extra-string) + (regexp-quote base) + "\\'") + fn))) + (setq extra-string (substring fn + (if (zerop index) 0 (1+ index)) + ;; (- (length base)) fails for base = "". + ;; Equivalently, we could have used + ;; (apply 'substring ... + ;; (and (not (string= "" base)) + ;; (list (- (length base))))) + (- (length fn) (length base))) + n (1- n))) + (if (zerop n) (setq uniquify-possibly-resolvable t)) + + + ;; Distinguish directories by adding extra separator. + (if (and uniquify-trailing-separator-p + (file-directory-p fn) + (not (string-equal base ""))) + (cond ((eq uniquify-buffer-name-style 'forward) + (setq base (concat base "/"))) + ((eq uniquify-buffer-name-style 'reverse) + (setq base (concat (or uniquify-separator "\\") base))))) + + ;; Trim trailing separator on directory part + (if (and (not (string-equal extra-string "")) + (or (eq uniquify-buffer-name-style 'post-forward) + (eq uniquify-buffer-name-style 'post-forward-angle-brackets))) + (setq extra-string (substring extra-string 0 + (- (length extra-string) 1)))) + + (cond ((string-equal extra-string "") + base) + ((string-equal base "") + extra-string) + ((eq uniquify-buffer-name-style 'forward) + (concat extra-string base)) + ((eq uniquify-buffer-name-style 'reverse) + (concat base (uniquify-reverse-components extra-string))) + ((eq uniquify-buffer-name-style 'post-forward) + (concat base (or uniquify-separator "|") extra-string)) + ((eq uniquify-buffer-name-style 'post-forward-angle-brackets) + (concat base "<" extra-string ">")) + (t (error "Bad value for uniquify-buffer-name-style: %s" + uniquify-buffer-name-style))))) + + +;; Deal with conflicting-sublist, which is set by uniquify-rationalize-a-list. +;; This is only called by uniquify-rationalize-a-list. +(defun uniquify-rationalize-conflicting-sublist (conflicting-sublist old-name depth) + (or (null conflicting-sublist) + (and (null (cdr conflicting-sublist)) + (not (assoc old-name uniquify-non-file-buffer-names)) + (or (and (not (string= old-name "")) + (uniquify-rename-buffer (car conflicting-sublist) old-name)) + t)) + (if uniquify-possibly-resolvable + (uniquify-rationalize-a-list conflicting-sublist (1+ depth))))) + +(defun uniquify-rename-buffer (item newname) + (let ((buffer (uniquify-fix-list-buffer item))) + (if (not (equal newname (buffer-name buffer))) + (let ((unset (current-buffer)) + ;; avoid hooks on rename-buffer + (uniquify-buffer-name-style nil)) + (set-buffer buffer) + (rename-buffer newname) + (set-buffer unset)))) + (rplaca (nthcdr 3 item) t)) + +(defun uniquify-reverse-components (instring) + (let ((sofar '()) + (cursor 0) + (len (length instring)) + (sep (or uniquify-separator "\\"))) + (while (< cursor len) + (if (= (aref instring cursor) ?/) + (setq sofar (cons sep sofar) + cursor (1+ cursor)) + (let ((first-slash (or (string-match "/" instring cursor) len))) + (setq sofar (cons (substring instring cursor first-slash) sofar) + cursor first-slash)))) + (apply (function concat) sofar))) + + +;;; Hooks from the rest of Emacs + +;; Emacs 19 (Emacs or XEmacs) + +;; The logical place to put all this code is in generate-new-buffer-name. +;; It's written in C, so we would add a generate-new-buffer-name-function +;; which, if non-nil, would be called instead of the C. One problem with +;; that is that generate-new-buffer-name takes a potential buffer name as +;; its argument -- not other information, such as what file the buffer will +;; visit. + +;; The below solution works because generate-new-buffer-name is called +;; only by rename-buffer (which, as of 19.29, is never called from C) and +;; generate-new-buffer, which is called only by Lisp functions +;; create-file-buffer and rename-uniquely. Rename-uniquely generally +;; isn't used for buffers visiting files, so it's sufficient to hook +;; rename-buffer and create-file-buffer. (Setting find-file-hooks isn't +;; sufficient.) + +(defadvice rename-buffer (after rename-buffer-uniquify activate) + "Uniquify buffer names with parts of directory name." + (if (and uniquify-buffer-name-style + ;; UNIQUE argument + (ad-get-arg 1)) + (progn + (if uniquify-after-kill-buffer-p + ;; call with no argument; rationalize vs. old name as well as new + (uniquify-rationalize-file-buffer-names) + ;; call with argument: rationalize vs. new name only + (uniquify-rationalize-file-buffer-names + (uniquify-buffer-file-name (current-buffer)) (current-buffer))) + (setq ad-return-value (buffer-name (current-buffer)))))) + +(defadvice create-file-buffer (after create-file-buffer-uniquify activate) + "Uniquify buffer names with parts of directory name." + (if uniquify-buffer-name-style + (uniquify-rationalize-file-buffer-names (ad-get-arg 0) ad-return-value))) + +;; Buffer deletion +;; Rerationalize after a buffer is killed, to reduce coinciding buffer names. +;; This mechanism uses `kill-buffer-hook', which runs *before* deletion. +;; That means that the kill-buffer-hook function cannot just delete the +;; buffer -- it has to set something to do the rationalization *later*. +;; It actually puts another function on `post-command-hook'. This other +;; function runs the rationalization and then removes itself from the hook. +;; Is there a better way to accomplish this? +;; (This ought to set some global variables so the work is done only for +;; buffers with names similar to the deleted buffer. -MDE) + +(defun delay-uniquify-rationalize-file-buffer-names () + "Add `delayed-uniquify-rationalize-file-buffer-names' to `post-command-hook'. +For use on, eg, `kill-buffer-hook', to rationalize *after* buffer deletion." + (if (and uniquify-buffer-name-style + uniquify-after-kill-buffer-p) + (add-hook 'post-command-hook + 'delayed-uniquify-rationalize-file-buffer-names))) + +(defun delayed-uniquify-rationalize-file-buffer-names () + "Rerationalize buffer names and remove self from `post-command-hook'. +See also `delay-rationalize-file-buffer-names' for hook setter." + (uniquify-rationalize-file-buffer-names) + (remove-hook 'post-command-hook + 'delayed-uniquify-rationalize-file-buffer-names)) + +(add-hook 'kill-buffer-hook 'delay-uniquify-rationalize-file-buffer-names) + +;;; uniquify.el ends here +
--- a/lisp/version.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/version.el Mon Aug 13 08:46:35 2007 +0200 @@ -23,10 +23,10 @@ ;; The following line is modified automatically ;; by loading inc-version.el, each time a new Emacs is dumped. -(defconst emacs-version "19.14" "\ +(defconst emacs-version "19.15" "\ Version numbers of this version of Emacs.") -(setq emacs-version (purecopy (concat emacs-version " XEmacs Lucid"))) +(setq emacs-version (purecopy (concat emacs-version " XEmacs Lucid (beta2)"))) (defconst emacs-major-version (progn (or (string-match "^[0-9]+" emacs-version)
--- a/lisp/vm/vm-autoload.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/vm/vm-autoload.el Mon Aug 13 08:46:35 2007 +0200 @@ -7,7 +7,7 @@ time the current folder is expunged. With a prefix argument COUNT, the current message and the next -COUNT - 1 messages are deleted. A negative argument means the +COUNT - 1 messages are deleted. A negative argument means the current message and the previous |COUNT| - 1 messages are deleted. @@ -19,7 +19,7 @@ (autoload (quote vm-undelete-message) "vm-delete" "Remove the `deleted' attribute from the current message. With a prefix argument COUNT, the current message and the next -COUNT - 1 messages are undeleted. A negative argument means the +COUNT - 1 messages are undeleted. A negative argument means the current message and the previous |COUNT| - 1 messages are deleted. @@ -100,6 +100,19 @@ to be forwarded. See the docs for vm-reorder-message-headers to find out how KEEP-LIST and DISCARD-REGEXP are used." nil nil) +(autoload (quote vm-rfc1521-encapsulate-messages) "vm-digest" "Encapsulate the messages in MESSAGE-LIST as per RFC 1521 (MIME). +The resulting digest is inserted at point in the current buffer. +MIME headers at point-max are added/updated. +Point is not moved. + +MESSAGE-LIST should be a list of message structs (real or virtual). +These are the messages that will be encapsulated. +KEEP-LIST should be a list of regexps matching headers to keep. +DISCARD-REGEXP should be a regexp that matches headers to be discarded. +KEEP-LIST and DISCARD-REGEXP are used to order and trim the headers +to be forwarded. See the docs for vm-reorder-message-headers +to find out how KEEP-LIST and DISCARD-REGEXP are used." nil nil) + (autoload (quote vm-rfc1153-or-rfc934-burst-message) "vm-digest" "Burst messages from the digest message M. M should be a message struct for a real message. If RFC1153 is non-nil, assume the digest is of the form specified by @@ -127,9 +140,11 @@ (autoload (quote vm-burst-rfc1153-digest) "vm-digest" "Burst an RFC 1153 style digest" t nil) +(autoload (quote vm-burst-rfc1521-digest) "vm-digest" "Burst an RFC 1521 (MIME) style digest" t nil) + (autoload (quote vm-guess-digest-type) "vm-digest" "Guess the digest type of the message M. M should be the message struct of a real message. -Returns either \"rfc934\" or \"rfc1153\"." nil nil) +Returns either \"rfc934\", \"rfc1153\", or \"rfc1521\"." nil nil) (autoload (quote vm-easy-menu-define) "vm-easymenu" "Define a menu bar submenu in maps MAPS, according to MENU. The menu keymap is stored in symbol SYMBOL, both as its value @@ -386,7 +401,7 @@ This function works by examining the beginning of a folder. If optional arg FILE is present the type of FILE is returned instead. If optional second and third arg START and END are provided, -vm-get-folder-type will examine the the text between those buffer +vm-get-folder-type will examine the text between those buffer positions. START and END default to 1 and (buffer-size) + 1. Returns @@ -1472,6 +1487,8 @@ (autoload (quote vm-send-rfc1153-digest) "vm-reply" "Like vm-send-digest but always sends an RFC 1153 digest." t nil) +(autoload (quote vm-send-rfc1521-digest) "vm-reply" "Like vm-send-digest but always sends an RFC 1521 (MIME) digest." t nil) + (autoload (quote vm-continue-composing-message) "vm-reply" "Find and select the most recently used mail composition buffer. If the selected buffer is already a Mail mode buffer then it is buried before beginning the search. Non Mail mode buffers and @@ -1503,6 +1520,8 @@ (autoload (quote vm-send-rfc1153-digest-other-frame) "vm-reply" "Like vm-send-rfc1153-digest, but run in a newly created frame." t nil) +(autoload (quote vm-send-rfc1521-digest-other-frame) "vm-reply" "Like vm-send-rfc1521-digest, but run in a newly created frame." t nil) + (autoload (quote vm-match-data) "vm-save" nil nil nil) (autoload (quote vm-auto-select-folder) "vm-save" nil nil nil)
--- a/lisp/vm/vm-delete.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/vm/vm-delete.el Mon Aug 13 08:46:35 2007 +0200 @@ -24,7 +24,7 @@ time the current folder is expunged. With a prefix argument COUNT, the current message and the next -COUNT - 1 messages are deleted. A negative argument means the +COUNT - 1 messages are deleted. A negative argument means the current message and the previous |COUNT| - 1 messages are deleted. @@ -71,7 +71,7 @@ "Remove the `deleted' attribute from the current message. With a prefix argument COUNT, the current message and the next -COUNT - 1 messages are undeleted. A negative argument means the +COUNT - 1 messages are undeleted. A negative argument means the current message and the previous |COUNT| - 1 messages are deleted.
--- a/lisp/vm/vm-digest.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/vm/vm-digest.el Mon Aug 13 08:46:35 2007 +0200 @@ -210,6 +210,88 @@ (insert (format "This is an RFC 1153 digest.\n(%d message%s)\n----------------------------------------------------------------------\n" (length message-list) (if (cdr message-list) "s" ""))) (goto-char start))))) +(defun vm-rfc1521-encapsulate-messages (message-list keep-list discard-regexp) + "Encapsulate the messages in MESSAGE-LIST as per RFC 1521 (MIME). +The resulting digest is inserted at point in the current buffer. +MIME headers at point-max are added/updated. +Point is not moved. + +MESSAGE-LIST should be a list of message structs (real or virtual). +These are the messages that will be encapsulated. +KEEP-LIST should be a list of regexps matching headers to keep. +DISCARD-REGEXP should be a regexp that matches headers to be discarded. +KEEP-LIST and DISCARD-REGEXP are used to order and trim the headers +to be forwarded. See the docs for vm-reorder-message-headers +to find out how KEEP-LIST and DISCARD-REGEXP are used." + (if message-list + (let ((target-buffer (current-buffer)) + (mlist message-list) + (boundary (format "-----%07X%07X" (abs (random)) (abs (random)))) +; insertion-point + source-buffer m start) + (save-restriction + ;; narrow to a zero length region to avoid interacting + ;; with anything that might have already been inserted + ;; into the buffer. + (narrow-to-region (point) (point)) + (setq start (point)) + (while mlist + (insert "--" boundary "\nContent-Type: message/rfc822\n\n") + (setq m (vm-real-message-of (car mlist)) + source-buffer (vm-buffer-of m)) + (save-excursion + (set-buffer source-buffer) + (save-restriction + (widen) + (save-excursion + (set-buffer target-buffer) + (let ((beg (point))) + (insert-buffer-substring source-buffer (vm-headers-of m) + (vm-text-end-of m)) + (goto-char beg) + (vm-reorder-message-headers nil nil + "\\(X-VM-\\|Status:\\)") + (vm-reorder-message-headers nil keep-list discard-regexp) + )))) + (goto-char (point-max)) + (insert "\n") + (setq mlist (cdr mlist))) + (insert "--" boundary "--\n") + + (goto-char start) + (insert "--" boundary "\nContent-Type: text/plain\n\n") + (insert (format + "This is an RFC 1521 (MIME) digest; %d message%s.\n\n\n\n\n" + (length message-list) + (if (cdr message-list) "s" ""))) +; (setq insertion-point (point-marker)) + (goto-char start)) + + ;; outside of the save-restriction + (save-excursion + (let (end) + (goto-char (point-min)) + (re-search-forward + (concat "^" (regexp-quote mail-header-separator) "$") + nil t) + (setq end (point)) + (goto-char (point-min)) + (cond + ((re-search-forward "^content-type:" end t) + (delete-region (point) (progn (forward-line 1) (point))) + (while (looking-at " \t") + (delete-region (point) (progn (forward-line 1) (point)))))) + (goto-char end) + (insert "MIME-Version: 1.0\n" + "Content-Type: multipart/digest; boundary=\"" + boundary "\"\n") + )) + +; (goto-char insertion-point) +; (set-marker insertion-point nil) + ))) + + (defun vm-rfc1153-or-rfc934-burst-message (m rfc1153) "Burst messages from the digest message M. M should be a message struct for a real message. @@ -371,6 +453,8 @@ (vm-rfc934-burst-message m)) ((equal digest-type "rfc1153") (vm-rfc1153-burst-message m)) + ((equal digest-type "rfc1521") + (error "Don't yet know how to burst MIME digests.")) (t (error "Unknown digest type: %s" digest-type))) (message "Bursting %s digest... done" digest-type) (vm-clear-modification-flag-undos) @@ -393,7 +477,8 @@ (setq totals-blurb (vm-emit-totals-blurb)) (vm-display nil nil '(vm-burst-digest vm-burst-rfc934-digest - vm-burst-rfc1153-digest) + vm-burst-rfc1153-digest + vm-burst-rfc1521-digest) (list this-command)) (if (vm-thoughtfully-select-message) (vm-preview-current-message) @@ -410,16 +495,25 @@ (interactive) (vm-burst-digest "rfc1153")) +(defun vm-burst-rfc1521-digest () + "Burst an RFC 1521 (MIME) style digest" + (interactive) + (vm-burst-digest "rfc1521")) + (defun vm-guess-digest-type (m) "Guess the digest type of the message M. M should be the message struct of a real message. -Returns either \"rfc934\" or \"rfc1153\"." +Returns either \"rfc934\", \"rfc1153\", or \"rfc1521\"." (save-excursion (set-buffer (vm-buffer-of m)) (save-excursion (save-restriction (widen) - (goto-char (vm-text-of m)) - (if (search-forward "\n----------------------------------------------------------------------\n" nil t) - "rfc1153" - "rfc934"))))) + (goto-char (vm-headers-of m)) + (if (let ((case-fold-search t)) + (re-search-forward "^MIME-Version:" nil t)) + "rfc1521" + (goto-char (vm-text-of m)) + (if (search-forward "\n----------------------------------------------------------------------\n" nil t) + "rfc1153" + "rfc934"))))))
--- a/lisp/vm/vm-folder.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/vm/vm-folder.el Mon Aug 13 08:46:35 2007 +0200 @@ -440,7 +440,7 @@ This function works by examining the beginning of a folder. If optional arg FILE is present the type of FILE is returned instead. If optional second and third arg START and END are provided, -vm-get-folder-type will examine the the text between those buffer +vm-get-folder-type will examine the text between those buffer positions. START and END default to 1 and (buffer-size) + 1. Returns
--- a/lisp/vm/vm-reply.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/vm/vm-reply.el Mon Aug 13 08:46:35 2007 +0200 @@ -529,6 +529,10 @@ (vm-rfc1153-encapsulate-messages vm-forward-list vm-forwarded-headers vm-unforwarded-header-regexp)) + ((equal vm-forwarding-digest-type "rfc1521") + (vm-rfc1521-encapsulate-messages + vm-forward-list vm-forwarded-headers + vm-unforwarded-header-regexp)) ((equal vm-forwarding-digest-type nil) (vm-no-frills-encapsulate-message (car vm-forward-list) vm-forwarded-headers @@ -686,7 +690,11 @@ ((equal vm-digest-send-type "rfc1153") (vm-rfc1153-encapsulate-messages mlist vm-rfc1153-digest-headers - vm-rfc1153-digest-discard-header-regexp))) + vm-rfc1153-digest-discard-header-regexp)) + ((equal vm-digest-send-type "rfc1521") + (vm-rfc1521-encapsulate-messages + mlist vm-rfc1521-digest-headers + vm-rfc1521-digest-discard-header-regexp))) (goto-char start) (setq mp mlist) (if prefix @@ -718,6 +726,12 @@ (let ((vm-digest-send-type "rfc1153")) (vm-send-digest preamble))) +(defun vm-send-rfc1521-digest (&optional preamble) + "Like vm-send-digest but always sends an RFC 1521 (MIME) digest." + (interactive "P") + (let ((vm-digest-send-type "rfc1521")) + (vm-send-digest preamble))) + (defun vm-continue-composing-message (&optional not-picky) "Find and select the most recently used mail composition buffer. If the selected buffer is already a Mail mode buffer then it is @@ -852,6 +866,8 @@ vm-send-rfc934-digest-other-frame vm-send-rfc1153-digest vm-send-rfc1153-digest-other-frame + vm-send-rfc1521-digest + vm-send-rfc1521-digest-other-frame vm-forward-message vm-forward-message-other-frame vm-forward-message-all-headers @@ -985,3 +1001,14 @@ (vm-send-rfc1153-digest prefix)) (if (vm-multiple-frames-possible-p) (vm-set-hooks-for-frame-deletion))) + +(defun vm-send-rfc1521-digest-other-frame (&optional prefix) + "Like vm-send-rfc1521-digest, but run in a newly created frame." + (interactive "P") + (if (vm-multiple-frames-possible-p) + (vm-goto-new-frame 'composition)) + (let ((vm-frame-per-composition nil) + (vm-search-other-frames nil)) + (vm-send-rfc1153-digest prefix)) + (if (vm-multiple-frames-possible-p) + (vm-set-hooks-for-frame-deletion)))
--- a/lisp/vm/vm-vars.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/vm/vm-vars.el Mon Aug 13 08:46:35 2007 +0200 @@ -762,6 +762,7 @@ \"rfc934\" \"rfc1153\" +\"rfc1521\" nil A nil value means don't use a digest, just mark the beginning and @@ -791,18 +792,20 @@ \"rfc934\" \"rfc1153\" + \"rfc1521\" \"guess\" If the value is \"guess\", and you take the default response when vm-burst-digest queries you, VM will try to guess the digest type.") -(defvar vm-digest-send-type "rfc934" +(defvar vm-digest-send-type "rfc1521" "*String that specifies the type of digest vm-send-digest will use. Legal values of this variable are: \"rfc934\" \"rfc1153\" +\"rfc1521\" ") @@ -896,6 +899,48 @@ vm-rfc1153-digest-headers list appearing last in the headers of the digestified messages.") +(defvar vm-rfc1521-digest-headers + '() + "*List of headers that should be appear in RFC 1521 digests +created by VM. These should be listed in the order you wish them +to appear in the digest. Regular expressions are allowed. +There is no need to anchor patterns with \"^\", as searches always +start at the beginning of a line. Put a colon at the end of +patterns to get exact matches. (E.g. \"Date\" matches \"Date\" +and \"Date-Sent\".) Header names are always matched case +insensitively. + +If the value of vm-rfc1521-digest-discard-header-regexp is nil, the headers +matched by vm-rfc1521-digest-headers are the only headers that will be +kept. + +If vm-rfc1521-digest-discard-header-regexp is non-nil, then only +headers matched by that variable will be discarded; all others +will be kept. vm-rfc1521-digest-headers determines the order of +appearance in that case, with headers not matching any in the +vm-rfc1521-digest-headers list appearing last in the headers of +the digestified messages.") + + +(defvar vm-rfc1521-digest-discard-header-regexp "\\(X400-\\)?Received:" + "*Non-nil value should be a regular expression header that tells +what headers should not appear in RFC 1521 digests created by VM. This +variable along with vm-rfc1521-digest-headers determines which headers +are kept and which headers are discarded. + +If the value of vm-rfc1521-digest-discard-header-regexp is nil, the headers +matched by vm-rfc1521-digest-headers are the only headers that will be +kept. + +If vm-rfc1521-digest-discard-header-regexp is non-nil, then only +headers matched by this variable will be discarded; all others +will be kept. vm-rfc1521-digest-headers determines the order of +appearance in that case, with headers not matching any in the +vm-1521-digest-headers list appearing last in the headers of +the digestified messages.") + + + (defvar vm-resend-bounced-headers '("Resent-" "From:" "Sender:" "Reply-To:" @@ -1045,7 +1090,7 @@ the maximum allowed length of the substituted string. If the string is longer than this value the right end of the string is truncated. If the value is negative, the string is truncated on -on the left instead of the right. +the left instead of the right. The summary format need not be one line per message but it must end with a newline, otherwise the message pointer will not be displayed correctly @@ -1522,7 +1567,7 @@ (defvar vm-strip-reply-headers nil "*Non-nil value causes VM to strip away all comments and extraneous text from the headers generated in reply messages. If you use the \"fakemail\" -program as distributed with Emacs, you probably want to set this variable to +program as distributed with Emacs, you probably want to set this variable to t, because as of Emacs v18.52 \"fakemail\" could not handle unstripped headers.") @@ -2020,6 +2065,7 @@ ("vm-burst-digest") ("vm-burst-rfc934-digest") ("vm-burst-rfc1153-digest") + ("vm-burst-rfc1521-digest") ("vm-edit-message") ("vm-discard-cached-data") ("vm-edit-message-end") @@ -2088,6 +2134,7 @@ ("vm-send-digest") ("vm-send-rfc934-digest") ("vm-send-rfc1153-digest") + ("vm-send-rfc1521-digest") ("vm-reply-other-frame") ("vm-reply-include-text-other-frame") ("vm-followup-other-frame") @@ -2101,6 +2148,7 @@ ("vm-send-digest-other-frame") ("vm-send-rfc934-digest-other-frame") ("vm-send-rfc1153-digest-other-frame") + ("vm-send-rfc1521-digest-other-frame") ("vm-continue-composing-message") ("vm-auto-archive-messages") ("vm-save-message") @@ -2176,7 +2224,7 @@ "unanswered")) (defvar vm-key-functions nil) -(defconst vm-digest-type-alist '(("rfc934") ("rfc1153"))) +(defconst vm-digest-type-alist '(("rfc934") ("rfc1153") ("rfc1521"))) (defvar vm-completion-auto-correct t "Non-nil means that minibuffer-complete-file should aggressively erase the trailing part of a word that caused completion to fail, and retry
--- a/lisp/w3/ChangeLog Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/w3/ChangeLog Mon Aug 13 08:46:35 2007 +0200 @@ -1,23 +1,430 @@ -Thu Jun 13 00:25:50 1996 William Perry <wmperry@monolith.spry.com> +Sun Aug 11 16:41:58 1996 William Perry <wmperry@cs.indiana.edu> + +* w3-vars.el: Created version 3.0.11 + +* font.el: +Fix for font-default-font-for-device under XEmacs when you use a font +like '10x20' instead of the fully specified version + +Sat Aug 10 16:14:08 1996 William Perry <wmperry@cs.indiana.edu> + +* w3-forms.el: +Do not encode the '.' in application/x-www-form-urlencoded. Fucking +netscape compatbility. What _SPEC_?! There aren't any specs on the +web, right?! + +* w3-forms.el: +Fixed problem with submissions of a form with the exact same arguments +causes elements from both form to be submitted. ack. + +Tue Aug 6 14:03:52 1996 William Perry <wmperry@cs.indiana.edu> + +* w3-parse.el: +fixed stupid mistake in DTD I made when changing to 3.2 DTD - left +'style' out of head's content-model so no in-document stylesheet stuff +was getting parsed. gack. + +* w3-forms.el: No longer put a 'choose' in front of option menus + +* w3-speak.el: fixed bugs + +Mon Aug 5 14:03:09 1996 William Perry <wmperry@cs.indiana.edu> + +* w3-vars.el: Created version 3.0.10 + +* default.css: A few mild changes, and docs. + +Sun Aug 4 23:51:26 1996 William Perry <wmperry@cs.indiana.edu> + +* w3-speak.el: new version of w3-speak from raman + +* w3-draw.el: Style search alg. now looks for tag/id|name first. Now supports +inlined 'style' keyword on any tag. Gack *sigh* + +* w3-style.el: +Can now have periods in class names. Fixed bug where the class would +be normalized to lowercase as well as the tag name. BAD BAD BAD. + +* w3-speak.el: some changes from raman + +* w3-style.el: Think I finally fixed some stylesheet weirdness + +* w3.el: Don't override user prefs w/w3-user-colors-take-precedence -duh + +* w3-parse.el: fixed graphical entities + +Sat Aug 3 20:09:50 1996 William Perry <wmperry@cs.indiana.edu> + +* w3-vars.el: +Added textual representation of the 'artist formerly known as prince' +graphical icons + +Thu Aug 1 13:32:54 1996 William Perry <wmperry@cs.indiana.edu> + +* w3-vars.el: Created version 3.0.9 + +* w3-sysdp.el: +added data-directory to sysdep version of x-library-search-path for +emacs under windows 95/nt + +* w3-vars.el: +Implemented &prince; and &princesymbol; graphical entities. Thanks +for the note Jamie Z! + +* w3-forms.el: fix for gopher searches + +* w3-draw.el: Added support for balloon-help + +Fri Jul 26 05:57:21 1996 William Perry <wmperry@cs.indiana.edu> + +* w3-display.el, w3-texinfo.el: Initial revision + +* w3-parse.el: *** empty log message *** + +* w3-hot.el: Should now be able to handle XMosaic style hotlist files + +* w3-parse.el: +Added some HTML 3.2 stuff, reorged some of the content-models, et. c + +* w3-draw.el: few fixes to the title handling. +don't display any text outside the <html></html> area + +* w3-style.el: +Changes to w3-style-parse-css to gracefully ignore <!-- and --> in a +stylesheet, for those losers who insist on using SGML comments to hide +the <style> tag from stupid browsers. + +* w3-parse.el: +Changed the content model of the <style> tag to CDATA so that idiots +who want to hide the style information from stupid old browsers by the absolutely braindead use of comments (<!-- ... -->) can. *sigh* + +Thu Jul 25 05:00:55 1996 William Perry <wmperry@cs.indiana.edu> + +* w3-style.el: Fixed stupid bug in :device: handling + +Tue Jul 23 00:40:54 1996 William Perry <wmperry@cs.indiana.edu> + +* w3-keyword.el: more keywords for speech stuff + +* docomp.el: *** empty log message *** + +* w3-draw.el: +Beginnings of support for the new and improved fucked up netscapism +<spacer> tag + +Mon Jul 22 03:22:52 1996 William Perry <wmperry@cs.indiana.edu> + +* w3-sysdp.el: added stub for make-local-hook - more Emacs 19.2x lossage. + +* w3-forms.el: +always encode hex strigs into uppercase for stupid broken fucking +braindead forms decoders!!! + +Sun Jul 21 20:07:50 1996 William Perry <wmperry@cs.indiana.edu> + +* w3-vars.el: Created version 3.0.8 + +* w3.txi: fixed a few compilation errors in w3.txi + +* w3.txi: Revamped a few nodes, removed the downloading/compiling notes, and +documented url-proxy-services and improved the proxy section in +general. + +* w3-hot.el: Should now auto-recognize HTML bookmark files + +* font.el: Allow a font to have a size like "+12pt" + +* w3-draw.el: +Now handles <font face="xxxx"> ala Internet Exploiter and Nutscrape + +* w3.el: Added function for reloading all stylesheets + +* w3-menu.el: Added option to the 'style' menu for reloading stylesheets + +* w3-forms.el: +fixed problem with dropwon menus with the same 'value' would show the first item with that value, not necessarily the one the user selected. + +* w3-widget.el: w3-follow-inlined-image works again + +* w3-draw.el, w3-keyword.el, w3-menu.el, w3-vars.el, w3-xemac.el, w3.el: +You can now load delayed images + +Sat Jul 20 05:15:06 1996 William Perry <wmperry@cs.indiana.edu> + +* w3.txi: Removed 16-bit windows section. +removed programming interface chapter. +fixed Gnus accessing function docs. +added pointer to browse-url-browser-function. +removed docs of w3-delimit-emphasis / w3-delimit-links. + +* w3-forms.el: +If a form has an invalid encoding type, issue a warning about the bad +html and the fall back on application/x-www-form-urlencoded + +* w3-style.el: +@import no longer causes a 'buffer-modified, kill it anyway?' question. +newer CSS font shorthand supported. +split the font-family on commas, not spaces, ala newer CSS. + +* font.el: A few changes to the default font-family-mappings + +* w3-draw.el: +Allow global document stuff to be specified on the 'body' tag as well +as the 'html' tag. + +Fri Jul 19 04:35:48 1996 William Perry <wmperry@cs.indiana.edu> + +* w3-vars.el: Created version 3.0.7 + +Thu Jul 18 14:20:20 1996 William Perry <wmperry@cs.indiana.edu> + +* default.css: +moved monospaced font declaration for pre/xmp into the :xemacs: section + +Tue Jul 16 02:49:55 1996 William Perry <wmperry@cs.indiana.edu> + +* w3-latex.el: Lots of patches from stephen peters. +* Fix to backslash handling code so that it works. + +* Fix to ~ (very important, that) so that it generates a + `\textasciitilde', since in a <tt> environment the previous call + would work incorrectly. Similar fix for ^ characters. + +* For carriage returns in a verbatim environment, use `\newline' + instead of `\ '. Also adds a \nullspace command for use in <pre> + environments, since the existing code for <pre> tended to eat + leading whitespace without it. + +* Use `\newline' instead of `\linebreak', since \linebreak tries to + justify the line out to the text width. + +* Added `\batchmode' call at the beginning of the generated LaTeX, to + force attempted recovery of any errors. + +* Added calls to not indent paragraphs and skip lines between + paragraphs. I'm not sure whether I like this better or not, but I + figured that most HTML browsers currently use that formatting. This + should be changed once stylesheets are working nicely, to use + whatever's specified in the stylesheet for LaTeX. + +Mon Jul 15 17:33:19 1996 William Perry <wmperry@cs.indiana.edu> + +* w3-draw.el: +tty-closest-color-matching now works for netscape-style color crap as +well as stylesheet stuff + +* w3-parse.el, w3-xemac.el: anal retentive patch for mispelling in comments + +Sat Jul 13 22:47:21 1996 William Perry <wmperry@cs.indiana.edu> + +* w3.el: +w3-echo-link stuff is now handled in the new widget-motion-hook variable. + +* widget-edit.el: +New hook - widget-motion-hook - called with the widget moved to. + +* w3-draw.el: +w3-echo-link stuff is now handled in the new widget-motion-hook variable. +when following a link, its color is changed correctly. + +Fri Jul 12 05:52:49 1996 William Perry <wmperry@cs.indiana.edu> + +* w3-style.el: fixed problem parsing class attributes in CSS + +* w3-style.el: *** empty log message *** + +Thu Jul 11 18:00:20 1996 William Perry <wmperry@cs.indiana.edu> + +* w3-style.el: deal gracefully with device-bitplanes returning nil + +* w3-style.el: You can now use a :speech: device section in a CSS stylesheet + +* patch-for-old-emacsen: Initial revision + +* w3-sysdp.el: version of valid-color-name-p and device-class for the OS/2 +presentation manager. + +* w3-e19.el: Some OS/2 hacks + +* w3-draw.el: +sanity check the fill-prefix before setting it, and issue a warning if +list indentation tries to overflow the right window margin. + +* w3-vars.el: Created version 3.0.6 + +Wed Jul 10 23:50:10 1996 William Perry <wmperry@cs.indiana.edu> + +* w3-draw.el: fixed problem with emacspeak + +* default.css: *** empty log message *** + +* dist.Makefile: fixed install target - duh + +* w3.el: some more mule fixing + +* w3.el: remove compression extensions from default save-as filenames + +* w3.el: fixed w3-save-binary-file to set initial-contents on the call to +read-file-name + +* w3-hot.el: fixed problem with w3-hotlist-add-document-at-point + +* w3-parse.el: Fix for mule and character entities > 127 + +* w3-draw.el: +fixed mysterious problem of stylesheet formatting info not working +correctly the first time a tag was seen. *dumb* mistake on my part. + +Tue Jul 9 21:01:15 1996 William Perry <wmperry@cs.indiana.edu> + +* w3-sysdp.el: added more overlay functions + +* w3-vars.el: Created version 3.0.5 + +* w3.el: *** empty log message *** + +* dist.Makefile: +Now uses 'install' to do the copying around, instead of trying to fake it. + +* dist.Makefile: *** empty log message *** + +* font.el: Require disp-table so that display table stuff is loaded (apparently +XEmacs 19.13 didn't autoload or dump it - *sigh*) + +* dist.Makefile: No longer mention THIS-IS-VERSION-XX in the makefile + +* w3.el: *** empty log message *** + +* w3.el: Fixed w3-save-binary-file + +* w3.el, w3-speak.el, w3-style.el, w3-draw.el: voices-via-stylesheet fixes + +* dtk-css-speech.el: Initial revision + +* w3-forms.el: wais submissions work again + +* w3-print.el: fix problem with ps-print and forms printing (read-only text) + +Sun Jul 7 22:04:07 1996 William Perry <wmperry@cs.indiana.edu> + +* w3-vars.el: Created version 3.0.4 + +* w3-forms.el: <input type=radio checked> works now + +* w3-forms.el: Radio buttons work again. *sigh* + +Thu Jul 4 16:32:06 1996 William Perry <wmperry@cs.indiana.edu> + +* w3-draw.el: Let stylesheets handle the w3-delimit-links stuff + +Mon Jul 1 15:42:21 1996 William Perry <wmperry@cs.indiana.edu> + +* w3-vars.el: Created version 3.0.3 + +* widget-edit.el: another patch to not require new-style backquote processing + +* w3-sysdp.el: Added stub for buffer-substring-no-properties + +* w3-menu.el: +Do not use menus under Emacs 19.28 - they are broken / incompatible +with that version of easymenu + +* w3-sysdp.el: Fix to device-or-frame-type to work under Emacs 19.28 + +* w3.el: fix for set-auto-mode lossage on null buffer-file-name + +* w3-sysdp.el: Added in stubs for plist-put and plist-get, and an Emacs 19.2x +specific version of facep. everything almost works in 19.28 now. + +* widget-edit.el: Don't assume native backquoting abilities + +Sun Jun 30 22:53:02 1996 William Perry <wmperry@cs.indiana.edu> + +* w3-vars.el: Created version 3.0.2 + +* w3.txi: *** empty log message *** + +* w3.el, w3-xemac.el, w3-widget.el, w3-toolbar.el, w3-sysdp.el, w3-style.el, w3-speak.el, w3-print.el, w3-prefs.el, w3-parse.el, w3-mule.el, w3-mouse.el, w3-menu.el, w3-latex.el, w3-keyword.el, w3-imap.el, w3-hot.el, w3-forms.el, w3-emulate.el, w3-e19.el, w3-draw.el, w3-annotat.el, w3-about.el, images.el, font.el, w3-vars.el: +Changed email address info + +* dist.Makefile: Added w3-latex.el to the dist.Makefile + +* w3-vars.el, default.css: *** empty log message *** + +* font.el: final fix for font-height lossage + +* docomp.el: added menubar-visible-p + +Wed Jun 26 16:38:12 1996 William Perry <wmperry@cs.indiana.edu> + +* font.el: +Use truncate instead of round for font sizes - usually gives better results + +* w3-annotat.el, w3.el: +Patch from Darrell Kindred <dkindred+@cmu.edu> for news problems +1. nnheader-init-server-buffer isn't called, so the + first call to nntp-open-server fails. (Patch inserts + a call to nnheader-init-server-buffer in url-news-open-host.) + 2. The `&', '<', and '>' characters don't get turned into + entities in news from lines, subject, body, etc. The result + is that "William Perry <wmperry@monolith.spry.com>" shows up + as "William Perry @monolith.spry.com>". (The patch moves + w3-insert-entities-in-string to url.el and renames it to + url-insert-entities-in-string, then calls it from url-format-news. + 3. When displayed, news articles get an extra, empty + "References" entry. (Patch inserts a `(delete "" ...)' + to remove the trailing empty reference from the list.) + +Tue Jun 25 19:00:48 1996 William Perry <wmperry@cs.indiana.edu> + +* w3-menu.el: Revamped the options menu - added the edit-preferences button. + +* w3.el: Fix for window-splitting with the back button + +* w3-sysdp.el: Added bogus definition of set-marker-insertion-type + +Mon Jun 24 14:51:18 1996 William Perry <wmperry@cs.indiana.edu> + +* w3-about.el: changed pointers for xemacs.cs.uiuc.edu to xemacs.org + +Fri Jun 14 16:50:26 1996 William Perry <wmperry@cs.indiana.edu> + +* w3-auto.el: *** empty log message *** + +* w3-vars.el, w3.el, w3-forms.el: +Fixes for mule from MORIOKA Tomohiko <morioka@jaist.ac.jp> + +* w3-xem20.el: Initial revision + +* w3-prefs.el: fixed problem under FSFmacs + +Thu Jun 13 14:31:38 1996 William Perry <wmperry@cs.indiana.edu> + +* w3-menu.el: +Extended w3-menu-save-options to save more info. Different way of +turning menubar on/off in XEmacs 19.14 (menubar-visible-p specifier) + +* w3-latex.el: Applied hypertext link printing patches from Stephen Peters +<speters%samsun@us.oracle.com> * w3.el: patch for imbalanced tags in w3-document-information * w3-prefs.el: All the panels work to some degree now -Wed Jun 12 03:25:39 1996 William Perry <wmperry@monolith.spry.com> +Wed Jun 12 03:25:39 1996 William Perry <wmperry@cs.indiana.edu> * w3-prefs.el: More panels work * w3-forms.el: fix for radio button munging -Tue Jun 11 23:47:37 1996 William Perry <wmperry@monolith.spry.com> +Tue Jun 11 23:47:37 1996 William Perry <wmperry@cs.indiana.edu> * widget-edit.el: fixed bug in widget-forward if a widget extended to (point-max) * w3.el: *** empty log message *** -Sun Jun 9 21:21:35 1996 William Perry <wmperry@monolith.spry.com> +Sun Jun 9 21:21:35 1996 William Perry <wmperry@cs.indiana.edu> * widget-edit.el: Few bug fixes for widget-backward behaviour
--- a/lisp/w3/Makefile Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/w3/Makefile Mon Aug 13 08:46:35 2007 +0200 @@ -1,9 +1,8 @@ # what emacs is called on your system EMACS = emacs -# How to make a directory -# need a -p if you want to make the parents! -MKDIR = mkdir +# How to install a file +INSTALL = install # Various other stuff used RM = rm -f @@ -20,7 +19,7 @@ DOTEMACS = $$HOME/.emacs # Where the Emacs-W3 configuration files should be installed -DOTDIR = $$HOME/.w3/ +DOTDIR = $$HOME/.w3 # Change this to be how to convert texinfo files into info files # examples: @@ -30,7 +29,7 @@ ############## no user servicable parts beyond this point ################### # Have to preload a few things to get a nice clean compile -SHELL=/bin/sh + DEPS = -l ./docomp.el -l ./w3-vars.el # compile with noninteractive and relatively clean environment @@ -42,21 +41,28 @@ SOURCES = \ w3.el w3-draw.el w3-e19.el w3-mule.el w3-parse.el w3-print.el \ w3-vars.el w3-xemac.el w3-style.el w3-about.el w3-hot.el \ - w3-toolbar.el font.el \ + w3-toolbar.el font.el w3-sysdp.el \ w3-annotat.el w3-auto.el w3-forms.el images.el w3-imap.el \ w3-emulate.el w3-menu.el w3-keyword.el w3-mouse.el widget.el \ - widget-edit.el w3-widget.el w3-speak.el w3-prefs.el + widget-edit.el w3-widget.el w3-speak.el w3-prefs.el w3-latex.el -OBJECTS = $(SOURCES:.el=.elc) +OBJECTS = \ + w3.elc w3-draw.elc w3-e19.elc w3-mule.elc w3-parse.elc \ + w3-print.elc w3-vars.elc w3-xemac.elc w3-style.elc \ + w3-about.elc w3-hot.elc \ + w3-toolbar.elc font.elc w3-annotat.elc w3-auto.elc \ + w3-forms.elc images.elc w3-imap.elc w3-emulate.elc w3-menu.elc \ + w3-keyword.elc w3-mouse.elc widget.elc widget-edit.elc \ + w3-widget.elc w3-speak.elc w3-prefs.elc w3-latex.elc DISTFILES = Makefile ChangeLog $(SOURCES) w3.txi docomp.el \ - clean-cache default.css w3-sysdp.el + clean-cache default.css .SUFFIXES: .elc .el .el,v .el.elc: - @echo Compiling $< - @URLDIR=$(URLDIR) $(EMACS) $(BATCHFLAGS) $(DEPS) -f batch-byte-compile $< + URLDIR=$(URLDIR) $(EMACS) $(BATCHFLAGS) $(DEPS) \ + -f batch-byte-compile $< w3: $(URLDIR) docomp.el $(OBJECTS) @echo Build of w3 complete... @@ -69,17 +75,17 @@ install: all @echo Installing in $(LISPDIR) - @if [ ! -d $(LISPDIR) ] ; then $(MKDIR) $(LISPDIR) ; fi - @(cd $(LISPDIR) ; $(RM) $(SOURCES) $(OBJECTS) w3-sysdp.el*) - @$(CP) $(SOURCES) $(OBJECTS) THIS* $(LISPDIR) - @if [ ! -d $(INFODIR) ] ; then $(MKDIR) $(INFODIR) ; fi - @$(CP) w3.info* $(INFODIR) - @$(CP) default.css $(DOTDIR)/stylesheet + $(INSTALL) -d $(LISPDIR) + $(INSTALL) -m 644 $(SOURCES) $(OBJECTS) $(LISPDIR) + $(INSTALL) -d $(INFODIR) + $(INSTALL) -m 644 w3.info* $(INFODIR) + $(INSTALL) -d $(DOTDIR) + $(INSTALL) -m 644 default.css $(DOTDIR)/stylesheet emacs: @echo Adding w3 setup to $(DOTEMACS) - $(EMACS) -batch -q -l docomp.el -f hack-dot-emacs $(DOTEMACS) \ - $(LISPDIR) $(URLDIR) + URLDIR=$(URLDIR) $(EMACS) -batch -q -l docomp.el -f hack-dot-emacs \ + $(DOTEMACS) $(LISPDIR) $(URLDIR) clean: $(RM) $(OBJECTS)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/w3/clean-cache Mon Aug 13 08:46:35 2007 +0200 @@ -0,0 +1,62 @@ +#!/bin/sh +# +# Copyright © 1995, William M. Perry <wmperry@spry.com> +# +# Author: William M. Perry <wmperry@spry.com> +# Maintainer: William M. Perry <wmperry@spry.com> +# Created: 95/04/18 10:44:15 +# Version: $Revision: 1.1.1.1 $ +# Modified: $Date: 1996/12/18 03:46:20 $ +# Keywords: cache clean +# +# This shell script will clean out your cache directory for emacs-w3 +# It is designed to be run from a cron (see crontab(5)) or at(1) +# +# This should probably only be run occasionally: like once a month, or +# when you determine that the cache size is too big. Something like: +# +# CACHEMAXSIZE=5000 +# SIZE=`du -s $CACHE_ROOT | awk '{print $1}' +# if [ $SIZE -gt 5000 ] ; then +# /run/the/real/clean-cache +# fi + +if [ -z "$CACHE_ROOT" ] ; then + CACHE_ROOT=/tmp/$USER # The root directory of the cache +fi + +if [ -z "$CONTROL_FILE" ] ; then + CONTROL_FILE="$CACHE_ROOT/.clean" +fi + +if [ -z "$CLEAN_PROTOCOLS" ] ; then + CLEAN_PROTOCOLS="http gopher file ftp wais news" +fi + +if [ -f "$CONTROL_FILE" ] ; then + echo "Starting to clean $CACHE_ROOT..." `date` + + for x in $CLEAN_PROTOCOLS + do + if [ -d "$x" ] ; then + echo " Cleaning $x files" + find $CACHE_ROOT/$x -depth -type f \( ! -anewer "$CONTROL_FILE" \) \ + -exec rm -f {} \; + find $CACHE_ROOT/$x -depth -type d -exec rmdir {} \; + fi + done + + touch "$CONTROL_FILE" + echo "Cache clean ended: "`date` +else + echo "The cleaning control file ($CONTROL_FILE) could not be found." + echo "To create it (and make all your cache files 'current' do:" + echo "" + echo "touch $CONTROL_FILE" + echo "find $CACHE_ROOT -exec touch {} \;" + echo "" + echo "PLEASE NOTE: This can damage your cache, by changing the times it" + echo "sends to the remote server to see if the file was modified." + echo "I recommend just touching the file, then rerunning this script to" + echo "wipe the cache clean and start over." +fi
--- a/lisp/w3/default.css Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/w3/default.css Mon Aug 13 08:46:35 2007 +0200 @@ -1,11 +1,26 @@ -/* File: default.css +/****************************************************************************** +** File: default.css ** Purpose: Default Stylesheet for Emacs-W3 ** Info: Copyright (c) 1995 William M. Perry <wmperry@spry.com> ** Created: William M. Perry <wmperry@spry.com>, Aug-31-1995 ** Maintainer: William M. Perry <wmperry@spry.com> ** ** This contains the top level fallback default styles for Emacs-w3 -*/ +** +****************************************************************************** +** +** To specify device-dependent styles, you must mark a section with +** :devicetype: +** If you are not using 'devicetype', then anything up to the next +** :xxx: media descriptor is ignored. +** +** There are a few special Emacs-W3 sections +** +** emacs - only include this chunk if you are using Emacs 19 +** xemacs - only include this chunk if you are using XEmacs +** normal - always include this chunk (useful for switching out of another +** device-type block +******************************************************************************/ /* ** Headers @@ -14,7 +29,7 @@ h1,h2,h3, h4,h5,h6 { display: block; - font-family : utopia charter times itc-zapf-chancery inja; + font-family : serif; font-weight : bold; } @@ -24,12 +39,21 @@ */ :xemacs: - h1 { font-size : 24pt } - h2 { font-size : 18pt } - h3 { font-size : 16pt } - h4 { font-size : 14pt } - h5 { font-size : 12pt } - h6 { font-size : 10pt } + h1 { font-size : +10pt } + h2 { font-size : +6pt } + h3 { font-size : +3pt } + h4 { } /* Do nothing, normal sized font, just bold */ + h5 { font-size : -3pt } + h6 { font-size : -6pt } + +/* +** Emacs-19 also doesn't handle how Emacs-W3 changes this type of font +** very well, so lets only do it under XEmacs for now. Emacs-19 can only +** do monospaced fonts anyway, so its redundant. +*/ + pre,xmp, + plaintext { font-family: monospace; display: block } +key,code,tt { font-family: monospace } /* ** Best we can do under Emacs-19 is use the default font and try to make @@ -38,7 +62,15 @@ :emacs: h1,h2,h3, -h4,h5,h6 { font-style: small-caps; text-decoration: underline } +h4,h5,h6 { + font-style: small-caps; + text-decoration: underline; + color: blue; + } + +strong,em { color: red } + dfn { font-style: italic } + s,strike { color: green } :normal: p { display: block } @@ -57,23 +89,15 @@ dd { insert-before: 3em; display: list-item } /* -** All items that require fixed-width fonts -*/ - - pre,xmp, - plaintext { font-family: monospace; display: block } -key,code,tt { font-family: monospace } - -/* ** All logical emphasis tags, the way god intended */ - strong,em { font-weight: bold } - dfn { font-style: italic } + strong,em { font-weight: bold } + dfn { font-style: italic } s,strike { text-decoration: line-through } - sub { text-position: sub } - sup { text-position: sup } - secret { text-transform: rot13 } + sub { text-position: sub } + sup { text-position: sup } + secret { text-transform: rot13 } /* ** Physical emphasis - spawn of evil @@ -96,9 +120,9 @@ */ a { cursor: hand2 } -a.link { color: #FF0000 } -a.visited { color: #B22222 } -a.active { color: #FF0000 } +a:link { color: #FF0000 } +a:visited { color: #B22222 } +a:active { color: #FF0000 } /* ** Various other character-level formatting issues @@ -110,13 +134,11 @@ /* ** Now for monochrome defaults -** Anything up to the next :xxx: media descriptor is only used if -** you are on that type of media. */ :mono: - a.link { color: black; text-decoration: underline } -a.visited { color: black; text-decoration: underline } - a.active { color: white } + a:link { color: black; text-decoration: underline } +a:visited { color: black; text-decoration: underline } + a:active { color: white } /* ** All the TTY specific formatting @@ -131,16 +153,16 @@ h1,h2,h3, h4,h5,h6 { - insert-before: *; - insert-after: * + insert.before: *; + insert.after: * } -a.visited{ +a:visited{ insert.before: "{{"; insert.after: "}}" } -a.link { +a:link { insert.before: "[["; insert.after: "]]" } @@ -172,6 +194,31 @@ h1,h2,h3, h4,h5,h6 { color : cyan } -a.visited { color : magenta } - a.link { color : red } - a.active { color : yellow } +a:visited { color : magenta } + a:link { color : red } + a:active { color : yellow } + +:speech: +h1,h2,h3, +h4,h5,h6 { voice-family: paul; stress: 8; } + h1 { pitch: 9; pitch-range: 9; } + h2 { pitch: 8; pitch-range: 8; } + h3 { pitch: 7; pitch-range: 7; } + h4 { pitch: 6; pitch-range: 6; } + h5,h6 { pitch: 5; pitch-range: 5; } + li { pitch: 6; richness: 6; } + dt { voice-family: harry; } + dd { pitch: 6; richness: 6; } +pre,xmp, +plaintext { pitch: 1; pitch-range: 1; stress: 1; richness: 9; } +key,code, + tt { pitch: 1; pitch-range: 1; stress: 1; richness: 9; } +strong,em { pitch: 6; stress: 8; pitch-range: 9; } + dfn { pitch: 7; pitch-range: 6; stress: 6; } + s,strike { richness: 9; } + b { pitch: 6; pitch-range: 9; stress: 8; } + i { pitch: 7; pitch-range: 6; stress: 6; } + u { richness: 0; } +a:link { voice-family: harry; } +a:visited { voice-family: betty; } +a:active { voice-family: ursula; }
--- a/lisp/w3/docomp.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/w3/docomp.el Mon Aug 13 08:46:35 2007 +0200 @@ -52,6 +52,7 @@ ;; For XEmacs/Lucid (w3-declare-variables 'current-menubar 'default-menubar 'extent 'mode-motion-hook 'mode-popup-menu 'sound-alist + 'menubar-visible-p 'inhibit-help-echo 'default-toolbar 'bottom-toolbar-height 'top-toolbar-height 'toolbar-buttons-captioned-p @@ -62,7 +63,7 @@ ;; For MULE (w3-declare-variables '*noconv* '*autoconv* '*euc-japan* '*internal* - 'w3-mime-list-for-code-conversion + 'w3-mime-list-for-code-conversion 'lc-ltn1 'file-coding-system-for-read 'file-coding-system) ;; For Mailcrypt
--- a/lisp/w3/font.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/w3/font.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,11 +1,11 @@ -;;; font.el,v --- New font model +;;; font.el --- New font model ;; Author: wmperry -;; Created: 1996/05/29 15:44:56 -;; Version: 1.45 +;; Created: 1996/08/11 16:40:36 +;; Version: 1.8 ;; Keywords: faces ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Copyright (c) 1995 by William M. Perry (wmperry@spry.com) +;;; Copyright (c) 1995, 1996 by William M. Perry (wmperry@cs.indiana.edu) ;;; ;;; This file is not part of GNU Emacs, but the same permissions apply. ;;; @@ -28,8 +28,10 @@ ;;; The emacsen compatibility package - load it up before anything else ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (eval-and-compile - (load-library "w3-sysdp")) + (load-library "w3-sysdp") + (require 'cl)) +(require 'disp-table) (if (not (fboundp '<<)) (fset '<< 'lsh)) (if (not (fboundp '&)) (fset '& 'logand)) (if (not (fboundp '|)) (fset '| 'logior)) @@ -92,7 +94,12 @@ (defvar font-family-mappings '( - ("serif" . ("garamond" + ("serif" . ("new century schoolbook" + "utopia" + "charter" + "times" + "lucidabright" + "garamond" "palatino" "times new roman" "baskerville" @@ -102,15 +109,19 @@ "rockwell" )) ("sans-serif" . ("lucida" - "lucidatypewriter" + "helvetica" "gills-sans" "avant-garde" "univers" - "helvetica" "optima")) ("elfin" . ("tymes")) - ("monospace" . ("courier" "lucidatypewriter" "fixed")) - ("cursive" . ("sirene" "zapf chancery")) + ("monospace" . ("courier" + "fixed" + "lucidatypewriter" + "clean" + "terminal")) + ("cursive" . ("sirene" + "zapf chancery")) ) "A list of font family mappings.") @@ -228,11 +239,24 @@ (pix-width (float (or (device-pixel-width device) 1024))) (mm-width (float (or (device-mm-width device) 293))) (retval nil)) - (if (string-match "[^0-9.]+$" spec) - (setq type (substring spec (match-beginning 0)) - spec (substring spec 0 (match-beginning 0))) + (cond + ((string-match "^ *\\([-+*/]\\) *" spec) ; math! whee! + (let ((math-func (intern (match-string 1 spec))) + (other (font-spatial-to-canonical + (substring spec (match-end 0) nil))) + (default (font-spatial-to-canonical + (font-default-size-for-device device)))) + (if (fboundp math-func) + (setq type "px" + spec (int-to-string (funcall math-func default other))) + (setq type "px" + spec (int-to-string other))))) + ((string-match "[^0-9.]+$" spec) + (setq type (substring spec (match-beginning 0)) + spec (substring spec 0 (match-beginning 0)))) + (t (setq type "px" - spec spec)) + spec spec))) (setq num (string-to-number spec)) (cond ((member type '("pixel" "px" "pix")) @@ -486,7 +510,9 @@ (defun font-default-font-for-device (&optional device) (or device (setq device (selected-device))) (if font-running-xemacs - (face-font-name 'default device) + (font-truename + (make-font-specifier + (face-font-name 'default device))) (cdr-safe (assq 'font (frame-parameters device))))) (defun font-default-object-for-device (&optional device) @@ -505,9 +531,10 @@ (defun font-default-size-for-device (&optional device) (or device (setq device (selected-device))) - (if font-running-xemacs - (format "%dpx" (face-height 'default device)) - (font-size (font-default-object-for-device device)))) + ;; face-height isn't the right thing (always 1 pixel too high?) + ;; (if font-running-xemacs + ;; (format "%dpx" (face-height 'default device)) + (font-size (font-default-object-for-device device))) (defun x-font-create-name (fontobj &optional device) (if (and (not (or (font-family fontobj) @@ -532,7 +559,7 @@ (setq weight (font-higher-weight weight (and (font-bold-p fontobj) :bold))) (if (stringp size) - (setq size (round (font-spatial-to-canonical size device)))) + (setq size (truncate (font-spatial-to-canonical size device)))) (setq weight (or (cdr-safe (assq weight x-font-weight-mappings)) "*")) (let ((done nil) ; Did we find a good font yet? (font-name nil) ; font name we are currently checking
--- a/lisp/w3/images.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/w3/images.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,11 +1,11 @@ -;;; images.el,v --- Automatic image converters +;;; images.el --- Automatic image converters ;; Author: wmperry -;; Created: 1996/05/26 01:17:31 -;; Version: 1.14 +;; Created: 1996/06/30 18:00:34 +;; Version: 1.2 ;; Keywords: images ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Copyright (c) 1995 by William M. Perry (wmperry@spry.com) +;;; Copyright (c) 1995 - 1996 by William M. Perry (wmperry@cs.indiana.edu) ;;; ;;; This file is not part of GNU Emacs, but the same permissions apply. ;;;
--- a/lisp/w3/w3-about.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/w3/w3-about.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,11 +1,11 @@ -;;; w3-about.el,v --- About pages for emacs-w3 +;;; w3-about.el --- About pages for emacs-w3 ;; Author: wmperry -;; Created: 1996/05/07 16:04:04 -;; Version: 1.29 +;; Created: 1996/06/30 18:02:26 +;; Version: 1.3 ;; Keywords: hypermedia ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Copyright (c) 1993, 1994, 1995 by William M. Perry (wmperry@spry.com) +;;; Copyright (c) 1993 - 1996 by William M. Perry (wmperry@cs.indiana.edu) ;;; ;;; This file is not part of GNU Emacs, but the same permissions apply. ;;; @@ -44,7 +44,7 @@ <html> <head> <title>Emacs-W3 v%s</title> - <link rel=\"made\" href=\"mailto:wmperry@spry.com\"> + <link rel=\"made\" href=\"mailto:wmperry@cs.indiana.edu\"> <link rel=\"stylesheet\" href=\"about:style\"> </head> <body> @@ -353,7 +353,7 @@ <html> <head> <title>Versions of Emacs</title> - <link rel=\"made\" href=\"mailto:wmperry@spry.com\"> + <link rel=\"made\" href=\"mailto:wmperry@cs.indiana.edu\"> <link rel=\"stylesheet\" href=\"about:style\"> </head> <body> @@ -431,15 +431,14 @@ <body> <hr width=\"85%\"> <hr width=\"75%\" label=\" The Emacs-W3 Team \"> - <hr width=\"65%\" label=\" 1993 - 1995 \"> + <hr width=\"65%\" label=\" 1993 - 1996 \"> <hr width=\"55%\"> <dl> <dt> Author - <dd> William Perry <wmperry@spry.com> (Hey, that's <i>me</i>)! + <dd> William Perry <wmperry@cs.indiana.edu> (Hey, that's <i>me</i>)! <br> - The main author of Emacs-W3, actually employed by SPRY, - Inc. to work on HTTP servers and sometimes client issues when - he is bored. + The main author of Emacs-W3. Currently unsure what to put in here + about his employer. :) <dt> Supporting Cast <dd> <dl>
--- a/lisp/w3/w3-annotat.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/w3/w3-annotat.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,11 +1,11 @@ -;;; w3-annotat.el,v --- Annotation functions for Emacs-W3 +;;; w3-annotat.el --- Annotation functions for Emacs-W3 ;; Author: wmperry -;; Created: 1996/06/06 14:14:34 +;; Created: 1996/06/30 18:02:56 ;; Version: 1.3 ;; Keywords: faces, help, comm, news, mail, processes, mouse, hypermedia ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Copyright (c) 1993, 1994, 1995 by William M. Perry (wmperry@spry.com) +;;; Copyright (c) 1993 - 1996 by William M. Perry (wmperry@cs.indiana.edu) ;;; ;;; This file is not part of GNU Emacs, but the same permissions apply. ;;; @@ -177,13 +177,13 @@ (setq w3-current-annotation (cons url title)) (insert "<html>\n" " <head>\n" - " <title>" (w3-insert-entities-in-string title) "</title>" + " <title>" (url-insert-entities-in-string title) "</title>" " </head>\n" - " <h1>" (w3-insert-entities-in-string title) "</h1>\n" + " <h1>" (url-insert-entities-in-string title) "</h1>\n" " <p>\n" - " <address>" (w3-insert-entities-in-string (user-full-name)) + " <address>" (url-insert-entities-in-string (user-full-name)) (if (stringp url-personal-mail-address) - (concat " <" (w3-insert-entities-in-string + (concat " <" (url-insert-entities-in-string url-personal-mail-address) ">") "") "</address>\n"
--- a/lisp/w3/w3-auto.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/w3/w3-auto.el Mon Aug 13 08:46:35 2007 +0200 @@ -53,6 +53,10 @@ (autoload 'widget-put "widget-edit") (autoload 'widget-forward "widget-edit") (autoload 'widget-backward "widget-edit") + +;; Preferences +(autoload 'w3-preferences-edit "w3-prefs") + (defvar widget-field-new nil) (provide 'w3-auto)
--- a/lisp/w3/w3-draw.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/w3/w3-draw.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,11 +1,11 @@ -;;; w3-draw.el,v --- Emacs-W3 drawing functions for new display engine +;;; w3-draw.el --- Emacs-W3 drawing functions for new display engine ;; Author: wmperry -;; Created: 1996/06/03 16:59:57 -;; Version: 1.365 +;; Created: 1996/08/25 17:12:32 +;; Version: 1.17 ;; Keywords: faces, help, hypermedia ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Copyright (c) 1993, 1994, 1995 by William M. Perry (wmperry@spry.com) +;;; Copyright (c) 1993 - 1996 by William M. Perry (wmperry@cs.indiana.edu) ;;; ;;; This file is not part of GNU Emacs, but the same permissions apply. ;;; @@ -25,7 +25,7 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; This function will take a stream of HTML from w3-preparse-buffer +;;; This function will take a stream of HTML from w3-parse-buffer ;;; and draw it out ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -76,15 +76,27 @@ prefix-vector)) (defsubst w3-set-fill-prefix-length (len) - (let ((len len)) - (setq fill-prefix (if (< len 80) - (aref w3-fill-prefixes-vector len) - (make-string len ? ))))) + (setq fill-prefix (if (< len (- (or w3-strict-width (window-width)) 4)) + (if (< len 80) + (aref w3-fill-prefixes-vector len) + (make-string len ? )) + (url-warn + 'html + "Runaway indentation! Too deep for window width!") + fill-prefix))) (defsubst w3-get-default-style-info (info) (and w3-current-stylesheet (or - ;; Check for tag/class first! + ;; Check for tag/id|name first! + (cdr-safe (assq info + (cdr-safe + (assoc (or (cdr-safe (assq 'id args)) + (cdr-safe (assq 'name args))) + (cdr-safe + (assq tag w3-current-stylesheet)))))) + + ;; Check for tag/class next (cdr-safe (assq info (cdr-safe (assoc (cdr-safe (assq 'class args)) @@ -105,7 +117,7 @@ (cdr-safe (assq tag w3-current-stylesheet))))))))) -(defun w3-normalize-color (color) +(defsubst w3-normalize-color (color) (cond ((valid-color-name-p color) color) @@ -115,7 +127,9 @@ (w3-normalize-color (mapconcat (function (lambda (x) (if (memq x '(?\t ?\r ?\n ? )) "" (char-to-string x)))) color ""))) - (t + ((valid-color-name-p (font-normalize-color color)) + (font-normalize-color color)) + (t (w3-warn 'html (format "Bad color specification: %s" color)) nil))) @@ -156,19 +170,9 @@ (defvar w3-face-cache nil "Cache for w3-face-for-element") -;; This is just for if we don't have Emacspeak loaded so we do not -;; get compile/run-time errors. -(defvar dtk-voice-table nil - "Association between symbols and strings to set dtk voices. -The string can set any dtk parameter. ") - -(defsubst w3-valid-voice-p (voice) - (cadr (assq voice dtk-voice-table))) - (defsubst w3-voice-for-element () (let ((temporary-voice (w3-get-default-style-info 'voice-spec))) - (and temporary-voice (w3-valid-voice-p temporary-voice) - (cons tag temporary-voice)))) + (and temporary-voice (cons tag temporary-voice)))) (defsubst w3-face-for-element () (let* ((font-spec (w3-get-default-style-info 'font-spec)) @@ -202,6 +206,7 @@ (id (and (listp args) (or (cdr-safe (assq 'name args)) (cdr-safe (assq 'id args)))))) + ;; This allows _ANY_ tag, whether it is known or not, to be ;; the target of a # reference in a URL (if id @@ -211,6 +216,16 @@ (set-marker (make-marker) (point-max))) w3-id-positions)))) + + (if (and (listp args) (cdr-safe (assq 'style args))) + (let ((unique-id (or id (url-create-unique-id))) + (sheet "")) + (setq sheet (format "%s.%s { %s }\n" tag unique-id + (cdr-safe (assq 'style args))) + args (cons (cons 'id unique-id) args)) + + (w3-handle-style (list (cons 'data sheet) + (cons 'notation "css"))))) (goto-char (point-max)) (if (and (w3-get-state :next-break) (not (memq tag @@ -232,13 +247,13 @@ (setq data-after (and tag (w3-get-default-style-info 'insert.after)))))) - (if data-before (w3-handle-single-tag 'text data-before)) + (if data-before (w3-handle-text data-before)) (setq w3-current-formatter (get tag 'w3-formatter)) (cond ((eq w3-current-formatter 'ack) nil) ((null w3-current-formatter) (w3-handle-unknown-tag tag args)) (t (funcall w3-current-formatter args))) - (if data-after (w3-handle-single-tag 'text data-after))))) + (if data-after (w3-handle-text data-after))))) (if (not (eq tag 'text)) (setq w3-last-tag tag)) (goto-char opos)))) @@ -255,6 +270,9 @@ (let* ((tag 'html) (args nil) (face (cdr (w3-face-for-element)))) + (if (not face) + (setq tag 'body + face (cdr (w3-face-for-element)))) (and face (if (not (fboundp 'valid-specifier-locale-p)) nil @@ -284,7 +302,6 @@ (w3-put-state :href nil) ; Current link destination (w3-put-state :name nil) ; Current link ID tag (w3-put-state :image nil) ; Current image destination - (w3-put-state :mpeg nil) ; Current mpeg destination (w3-put-state :form nil) ; Current form information (w3-put-state :optarg nil) ; Option arguments (w3-put-state :w3-graphic nil) ; Image stuff for non-xemacs @@ -365,9 +382,11 @@ (put tag 'w3-formatter handler) (funcall handler args)) (end-tag-p - (put tag 'w3-formatter 'w3-handle-emphasis-end)) + (put tag 'w3-formatter 'w3-handle-emphasis-end) + (w3-handle-emphasis-end args)) (t - (put tag 'w3-formatter 'w3-handle-emphasis))))) + (put tag 'w3-formatter 'w3-handle-emphasis) + (w3-handle-emphasis args))))) (defun w3-handle-text (&optional args) ;; This is the main workhorse of the display engine. @@ -423,7 +442,7 @@ (t nil))) (add-text-properties st (point) (list 'face faces)) (if (car voices) - (add-text-properties st (point) (list 'personality (car voices)))) + (add-text-properties st (point) (list 'personality (cdar voices)))) ) (if (not (memq (char-after (1- (point))) '(? ?.))) (w3-put-state :needspace t)) @@ -640,7 +659,7 @@ (w3-pop-alignment))) (defun w3-handle-p (&optional args) - (if (or (not (memq w3-last-tag '(li dt dd))) + (if (or (not (memq w3-last-tag '(li tr td th dt dd))) (memq tag '(ol ul dl menu dir))) (let ((name (or (cdr-safe (assq 'name args)) (cdr-safe (assq 'id args)))) @@ -913,14 +932,28 @@ (w3-handle-text "[END MATH]") (w3-handle-br)) +(defun w3-handle-tr (&optional args) + (w3-handle-br)) + +(defun w3-handle-/tr (&optional args) + (w3-handle-br)) + +(defun w3-handle-td (&optional args) + (w3-handle-text " | ")) + +(defun w3-handle-/td (&optional args) + (w3-handle-text " | ")) + +(defun w3-handle-th (&optional args) + (w3-handle-text " | ")) + +(defun w3-handle-/th (&optional args) + (w3-handle-text " | ")) + (defun w3-handle-table (&optional args) - (w3-handle-br) - (w3-handle-text "[START TABLE - Not Implemented (Yet)]") (w3-handle-br)) (defun w3-handle-/table (&optional args) - (w3-handle-br) - (w3-handle-text "[END TABLE]") (w3-handle-br)) (defun w3-handle-div (&optional args) @@ -985,6 +1018,37 @@ ; For some reason netscape treats </br> like <br> - ugh. (fset 'w3-handle-/br 'w3-handle-br) +(defun w3-create-blank-pixmap (width height) + (let ((retval + (concat "/* XPM */\n" + "static char *pixmap[] = {\n" + ;;"/* width height num_colors chars_per_pixel */\n" + (format "\" %d %d 2 1\",\n" width height) + ;;"/* colors */\n" + "\". c #000000 s background\",\n" + "\"# c #FFFFFF s foreground\",\n" + ;;"/* pixels /*\n" + )) + (line (concat "\"" (make-string width ?.) "\""))) + (while (/= 1 height) + (setq retval (concat retval line ",\n") + height (1- height))) + (concat retval line "\n};"))) + +(defun w3-handle-spacer (&optional args) + (let ((type (cdr-safe (assq 'type args))) + (size (cdr-safe (assq 'size args))) + (w (or (cdr-safe (assq 'width args)) 1)) + (h (or (cdr-safe (assq 'height args)) 1)) + (align (cdr-safe (assq 'align args))) + (glyph nil)) + (condition-case () + (setq glyph (make-glyph + (vector 'xpm :data (w3-create-blank-pixmap w h)))) + (error nil)) + ) + ) + (defun w3-handle-font (&optional args) (let* ((sizearg (cdr-safe (assq 'size args))) (sizenum (cond @@ -996,13 +1060,16 @@ ((string= sizearg (int-to-string (string-to-int sizearg))) (string-to-int sizearg)) (t nil))) + (family (cdr-safe (assq 'face args))) (color (cdr-safe (assq 'color args))) (normcolor (if color (w3-normalize-color color))) - (w3-current-stylesheet (` ((font - (internal - (font-size-index . (, sizenum)) - (foreground . (, normcolor)))))))) - (w3-generate-stylesheet-faces w3-current-stylesheet) + (w3-current-stylesheet (list + (list 'font + (list 'internal + (cons 'font-family family) + (cons 'font-size-index sizenum) + (cons 'foreground normcolor)))))) + (w3-style-post-process-stylesheet w3-current-stylesheet) (w3-handle-emphasis args))) (defun w3-handle-/font (&optional args) @@ -1021,47 +1088,8 @@ ;;; Bonus HTML Tags just for fun :) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun w3-handle-embed (&optional args) - (let* ((buf (url-generate-new-buffer-name " *embed*")) - (w3-draw-buffer (current-buffer)) - (url-working-buffer buf) - (data (cdr-safe (assq 'data args))) - (href (and (not data) - (url-expand-file-name - (or (cdr-safe (assq 'src args)) - (cdr-safe (assq 'href args))) - (cdr-safe (assoc (cdr-safe (assq 'base args)) - w3-base-alist))))) - (type (or (cdr-safe (assq 'type args)) "text/plain")) - (parse nil)) - (if (and href (not (string= type "video/mpeg"))) - ;; MPEG movies can be _HUGE_, delay loading them as - ;; long as possible - (save-excursion - (set-buffer (get-buffer-create buf)) - (setq url-be-asynchronous nil) - (url-retrieve href) - (setq data (buffer-string)) - (kill-buffer (current-buffer)))) - (cond - ((string= type "text/plain") - (insert data)) - ((string-match "^text/html" type) - (save-excursion - (set-buffer (get-buffer-create - (url-generate-new-buffer-name " *embed*"))) - (erase-buffer) - (insert data) - (setq parse (w3-preparse-buffer (current-buffer) t)) - (kill-buffer (current-buffer))) - (while parse - (w3-handle-single-tag (car (car parse)) (cdr (car parse))) - (setq parse (cdr parse)))) - ((string= type "video/mpeg") - (let ((width (cdr-safe (assq 'width args))) - (height (cdr-safe (assq 'height args)))) - (setq width (if width (string-to-int width)) - height (if height (string-to-int height))) - (w3-add-delayed-mpeg href (point) width height)))))) + ;; This needs to be reimplemented!!! + ) (defun w3-handle-blink (&optional args) ;; Keep track of all the buffers with blinking in them, and do GC @@ -1273,6 +1301,11 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Tags that don't really get drawn, etc. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(defun w3-handle-/html (&optional args) + ;; Technically, we are not supposed to have any text outside the + ;; html element, so start ignoring everything. + (put 'text 'w3-formatter 'ack)) + (defun w3-handle-body (&optional args) (if (not w3-user-colors-take-precedence) (let* ((vlink (cdr-safe (assq 'vlink args))) @@ -1399,13 +1432,13 @@ (let* ((src (widget-get widget 'src)) (cached-glyph (w3-image-cached-p src))) (if (and cached-glyph (w3-glyphp cached-glyph)) - (setq w3-image-widgets-waiting (cons widget - w3-image-widgets-waiting)) + (setq w3-image-widgets-waiting (cons widget w3-image-widgets-waiting)) (cond ((or w3-delay-image-loads (not (fboundp 'valid-specifier-domain-p))) - nil) ; Do nothing, cannot do images + (w3-add-delayed-graphic widget)) ((not (w3-image-loadable-p src nil)) ; Hey, we can't load it! - (w3-warn 'images (format "Skipping image %s" (url-basepath src t)))) + (w3-warn 'images (format "Skipping image %s" (url-basepath src t))) + (w3-add-delayed-graphic widget)) (t ; Grab the images (let ( (url-request-method "GET") @@ -1528,10 +1561,8 @@ (defun w3-handle-/title (&optional args) (put 'text 'w3-formatter nil) (let ((ttl (w3-get-state :title))) - (cond - ((and (symbolp ttl) (eq ttl t)) - nil) - ((stringp ttl) + (if (not (stringp ttl)) + nil (setq ttl (w3-fix-spaces ttl)) (if (and ttl (string= ttl "")) (setq ttl (w3-fix-spaces (url-view-url t)))) @@ -1539,8 +1570,7 @@ ;; Make the URL show in list-buffers output (make-local-variable 'list-buffers-directory) (setq list-buffers-directory (url-view-url t)) - (w3-put-state :title t)) - (t nil)))) + (w3-put-state :title t)))) (fset 'w3-handle-/head 'w3-handle-/title) @@ -1557,12 +1587,6 @@ (assoc base w3-base-alist)))) (setcdr href-node href))) (w3-put-state :seen-this-url (url-have-visited-url href)) - (if (and w3-delimit-links (not (eq w3-delimit-links 'linkname)) href) - (progn - (if (w3-get-state :seen-this-url) - (w3-handle-text (cdr w3-link-start-delimiter)) - (w3-handle-text (car w3-link-start-delimiter))) - (w3-put-state :needspace 'never))) (w3-put-state :zone (point)) (w3-put-state :link-args args) (if title (w3-put-state :link-title title)) @@ -1570,9 +1594,20 @@ (if name (w3-put-state :name name)))) (defun w3-follow-hyperlink (widget &rest ignore) - (let ((target (widget-get widget 'target)) - (href (widget-get widget 'href))) + (let* ((target (widget-get widget 'target)) + (href (widget-get widget 'href)) + (tag 'a) + (args '((class . "visited"))) + (face (cdr (w3-face-for-element))) + (old-face (and (widget-get widget :from) + (get-text-property (widget-get widget :from) 'face))) + (faces (cond + ((and old-face (consp old-face)) (cons face old-face)) + (old-face (cons face (list old-face))) + (t (list face))))) (if target (setq target (intern (downcase target)))) + (put-text-property (widget-get widget :from) (widget-get widget :to) + 'face faces) (case target ((_blank external) (w3-fetch-other-frame href)) @@ -1582,6 +1617,13 @@ (otherwise (w3-fetch href))))) +(defun w3-balloon-help-callback (object &optional event) + (let* ((widget (widget-at (extent-start-position object))) + (href (and widget (widget-get widget 'href)))) + (if href + (url-truncate-url-for-viewing href) + nil))) + (defun w3-handle-hyperlink-end (&optional args) (let* ((href (w3-get-state :href)) (old-args (w3-get-state :link-args)) @@ -1606,14 +1648,10 @@ :notify 'w3-follow-hyperlink :from (set-marker (make-marker) zone) :to (set-marker (make-marker) (point)) - :help-echo (case w3-echo-link - (text - (buffer-substring - zone (point))) - (url href) - (otherwise nil))) + ) (alist-to-plist old-args)) 'face faces + 'balloon-help 'w3-balloon-help-callback 'title (cons (set-marker (make-marker) zone) (set-marker (make-marker) (point))) @@ -1621,21 +1659,6 @@ (w3-put-state :zone nil) (w3-put-state :href nil) (w3-put-state :name nil) - - (if (and w3-delimit-links href) - (progn - (delete-region (point) (progn (skip-chars-backward " ") - (point))) - (if (eq w3-delimit-links 'linkname) - (w3-handle-text (concat (if btdt (cdr w3-link-start-delimiter) - (car w3-link-start-delimiter)) - (or name "noname") - (if btdt (cdr w3-link-end-delimiter) - (car w3-link-end-delimiter)))) - (if btdt - (w3-handle-text (cdr w3-link-end-delimiter)) - (w3-handle-text (car w3-link-end-delimiter))))) - (goto-char (point-max))) (if (and w3-link-info-display-function (fboundp w3-link-info-display-function)) (let ((info (condition-case () @@ -1940,6 +1963,9 @@ (let* ((tag 'html) (args nil) (face (cdr (w3-face-for-element)))) + (if (not face) + (setq tag 'body + face (cdr (w3-face-for-element)))) (and face (if (not (fboundp 'valid-specifier-locale-p)) nil
--- a/lisp/w3/w3-e19.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/w3/w3-e19.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,11 +1,11 @@ -;;; w3-e19.el,v --- Emacs 19.xx specific functions for emacs-w3 +;;; w3-e19.el --- Emacs 19.xx specific functions for emacs-w3 ;; Author: wmperry -;; Created: 1996/06/06 14:14:34 -;; Version: 1.157 +;; Created: 1996/07/11 04:49:02 +;; Version: 1.3 ;; Keywords: faces, help, mouse, hypermedia ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Copyright (c) 1993, 1994, 1995 by William M. Perry (wmperry@spry.com) +;;; Copyright (c) 1993 - 1996 by William M. Perry (wmperry@cs.indiana.edu) ;;; ;;; This file is part of GNU Emacs. ;;; @@ -169,6 +169,8 @@ (cond ((eq window-system 'x) (x-color-values color)) + ((eq window-system 'pm) + (pm-color-values color)) ((eq window-system 'ns) (ns-color-values color)) (t nil)))
--- a/lisp/w3/w3-emulate.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/w3/w3-emulate.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,11 +1,11 @@ -;;; w3-emulate.el,v --- All variable definitions for emacs-w3 +;;; w3-emulate.el --- All variable definitions for emacs-w3 ;; Author: wmperry -;; Created: 1996/05/24 15:25:13 -;; Version: 1.10 +;; Created: 1996/06/30 18:05:22 +;; Version: 1.2 ;; Keywords: comm, help, hypermedia ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Copyright (c) 1996 by William M. Perry (wmperry@spry.com) +;;; Copyright (c) 1996 by William M. Perry (wmperry@cs.indiana.edu) ;;; ;;; This file is not part of GNU Emacs, but the same permissions apply. ;;;
--- a/lisp/w3/w3-forms.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/w3/w3-forms.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,11 +1,11 @@ -;;; w3-forms.el,v --- Emacs-w3 forms parsing code for new display engine +;;; w3-forms.el --- Emacs-w3 forms parsing code for new display engine ;; Author: wmperry -;; Created: 1996/06/06 14:14:34 -;; Version: 1.51 +;; Created: 1996/08/10 16:14:08 +;; Version: 1.14 ;; Keywords: faces, help, comm, data, languages ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Copyright (c) 1993, 1994, 1995 by William M. Perry (wmperry@spry.com) +;;; Copyright (c) 1996 by William M. Perry (wmperry@cs.indiana.edu) ;;; ;;; This file is not part of GNU Emacs, but the same permissions apply. ;;; @@ -74,7 +74,8 @@ (buffer-read-only nil) (inhibit-read-only t) (widget-creation-function nil) - (action (nth 6 args)) + (action (cons (cons 'form-number (w3-get-state :formnum)) + (nth 6 args))) (node (assoc action w3-form-elements)) (name (or (nth 1 args) (if (memq (nth 0 args) '(submit reset)) @@ -129,9 +130,20 @@ (if formobj (progn (setq widget (w3-form-element-widget formobj)) - (widget-radio-add-item widget (list 'item :format "%t" :tag "")) + (widget-radio-add-item widget + (list 'item + :format "%t" + :tag "" + :value (w3-form-element-value el))) + (if (w3-form-element-default-value el) + (widget-value-set widget (w3-form-element-value el))) nil) - (setq widget (widget-create 'radio (list 'item :format "%t" :tag "")) + (setq widget (widget-create 'radio + :value (w3-form-element-value el) + (list 'item + :format "%t" + :tag "" + :value (w3-form-element-value el))) w3-form-radio-elements (cons (cons name el) w3-form-radio-elements)) widget))) @@ -162,7 +174,6 @@ (defun w3-form-create-file-browser (el face) (widget-create 'file :value-face face :value (w3-form-element-value el))) - (defvar w3-form-valid-key-sizes '( ("1024 (Premium)" . 1024) @@ -193,19 +204,16 @@ (defun w3-form-create-option-list (el face) (let ((widget (apply 'widget-create 'choice :value (w3-form-element-value el) :tag "Choose" + :format "%v" :size (w3-form-element-size el) :value-face face (mapcar (function (lambda (x) (list 'choice-item :format "%[%t%]" - :tag (car x) :value (cdr x)))) + :tag (car x) :value (car x)))) (reverse (w3-form-element-options el)))))) - (widget-value-set widget (cdr-safe (assoc (w3-form-element-value el) - (w3-form-element-options el)))) - (goto-char (point-max)) - (skip-chars-backward "\r\n") - (delete-region (point) (point-max)) + (widget-value-set widget (w3-form-element-value el)) widget)) ;(defun w3-form-create-multiline (el face) @@ -392,13 +400,17 @@ (cons (w3-form-element-name formobj) (w3-form-element-value formobj)))) (radio - ;; this is probably broken - (let ((x (widget-radio-chosen widget))) - (if (or (not x) - (not (eq x (w3-form-element-widget formobj)))) + (let* ((radio-name (w3-form-element-name formobj)) + (radio-object (cdr-safe + (assoc radio-name + w3-form-radio-elements))) + (chosen-widget (and radio-object + (widget-radio-chosen + (w3-form-element-widget + radio-object))))) + (if (assoc radio-name result) nil - (cons (w3-form-element-name formobj) - (w3-form-element-value formobj))))) + (cons radio-name (widget-value chosen-widget))))) (checkbox (if (widget-value widget) (cons (w3-form-element-name formobj) @@ -416,7 +428,9 @@ (cons (w3-form-element-name formobj) dat)))) (option (cons (w3-form-element-name formobj) - (widget-value widget))) + (cdr-safe + (assoc (widget-value widget) + (w3-form-element-options formobj))))) (keygen (cons (w3-form-element-name formobj) (format "Should create a %d bit RSA key" @@ -475,7 +489,10 @@ (defun w3-form-encode (result &optional enctype) "Create a string suitably encoded for a URL request." (let ((func (intern (concat "w3-form-encode-" enctype)))) - (if (fboundp func) (funcall func result)))) + (if (fboundp func) + (funcall func result) + (w3-warn 'html (format "Bad encoding type for form data: %s" enctype)) + (w3-form-encode-application/x-www-form-urlencoded result)))) (defun w3-form-encode-text/plain (result) (let ((query "")) @@ -495,33 +512,40 @@ (w3-form-encode-helper result) "\n")) query)) +(defun w3-form-encode-application/x-w3-wais (result) + (cdr (car (w3-form-encode-helper result)))) + (defun w3-form-encode-application/x-gopher-query (result) - (concat "\t" (nth 5 (car result)))) + (concat "\t" (cdr (car (w3-form-encode-helper result))))) (defconst w3-xwfu-acceptable-chars (list ?a ?b ?c ?d ?e ?f ?g ?h ?i ?j ?k ?l ?m ?n ?o ?p ?q ?r ?s ?t ?u ?v ?w ?x ?y ?z ?A ?B ?C ?D ?E ?F ?G ?H ?I ?J ?K ?L ?M ?N ?O ?P ?Q ?R ?S ?T ?U ?V ?W ?X ?Y ?Z ?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9 - ?_;; BOGUS! This is for #!%#@!ing netscape compatibility + ?_ ;; BOGUS! This is for #!%#@!ing netscape compatibility + ?. ;; BOGUS! This is for #!%#@!ing netscape compatibility ) "A list of characters that we do not have to escape in the media type -application/x-www/form-urlencoded") +application/x-www-form-urlencoded") (defun w3-form-encode-xwfu (chunk) "Escape characters in a string for application/x-www-form-urlencoded. Blasphemous crap because someone didn't think %20 was good enough for encoding spaces. Die Die Die." (if (and (featurep 'mule) chunk) - (setq chunk (code-convert-string - chunk *internal* url-mule-retrieval-coding-system))) + (setq chunk (if w3-running-xemacs + (decode-coding-string + chunk url-mule-retrieval-coding-system) + (code-convert-string + chunk *internal* url-mule-retrieval-coding-system)))) (mapconcat (function (lambda (char) (cond ((= char ? ) "+") ((memq char w3-xwfu-acceptable-chars) (char-to-string char)) - (t (format "%%%02x" char))))) + (t (upcase (format "%%%02x" char)))))) chunk "")) (defun w3-form-encode-application/x-www-form-urlencoded (result) @@ -576,7 +600,8 @@ (cons (cons "Content-type" enctype) url-request-extra-headers))) (w3-fetch theurl))) ((string= "GET" themeth) - (let ((theurl (concat theurl "?" query))) + (let ((theurl (concat theurl (if (string-match "gopher" enctype) + "" "?") query))) (w3-fetch theurl))) (t (w3-warn 'html (format "Unknown submit method: %s" themeth))
--- a/lisp/w3/w3-hot.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/w3/w3-hot.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,5 +1,11 @@ +;;; w3-hot.el --- Main functions for emacs-w3 on all platforms/versions +;; Author: wmperry +;; Created: 1996/07/26 05:22:59 +;; Version: 1.5 +;; Keywords: faces, help, comm, news, mail, processes, mouse, hypermedia + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Copyright (c) 1993, 1994, 1995 by William M. Perry (wmperry@spry.com) +;;; Copyright (c) 1993 - 1996 by William M. Perry (wmperry@cs.indiana.edu) ;;; ;;; This file is not part of GNU Emacs, but the same permissions apply. ;;; @@ -35,6 +41,25 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defvar w3-html-bookmarks nil) +(defun w3-hotlist-break-shit () + (let ((todo '(w3-hotlist-apropos + w3-hotlist-delete + w3-hotlist-rename-entry + w3-hotlist-append + w3-use-hotlist + w3-hotlist-add-document + w3-hotlist-add-document-at-point + )) + (cur nil)) + (while todo + (setq cur (car todo) + todo (cdr todo)) + (fset cur + (` + (lambda (&rest ignore) + (error "Sorry, `%s' does not work with html bookmarks" + (quote (, cur))))))))) + (defun w3-read-html-bookmarks (fname) "Import an HTML file into the Emacs-w3 format." (interactive "fBookmark file: ") @@ -49,7 +74,8 @@ (parse (w3-parse-buffer (current-buffer) t))) (setq parse w3-last-parse-tree bkmarks (nreverse (w3-grok-html-bookmarks parse)) - w3-html-bookmarks bkmarks)))) + w3-html-bookmarks bkmarks))) + (w3-hotlist-break-shit)) (eval-when-compile (defvar cur-stack nil) @@ -84,11 +110,11 @@ ((eq tag 'title) (setq cur-title (list (w3-normalize-spaces (car content)))) (w3-grok-html-bookmarks-internal content)) - ((eq tag 'dl) + ((memq tag '(dl ol ul)) (push-new-menu) (w3-grok-html-bookmarks-internal content) (finish-submenu)) - ((and (eq tag 'dt) + ((and (memq tag '(dt li)) (stringp (car content))) (setq cur-title (cons (w3-normalize-spaces (car content)) cur-title))) @@ -231,6 +257,25 @@ (setq w3-hotlist (nconc x w3-hotlist)) (and (fboundp 'w3-add-hotlist-menu) (funcall 'w3-add-hotlist-menu)))) +(defun w3-hotlist-parse-old-mosaic-format () + (let (cur-link cur-alias) + (while (re-search-forward "^\n" nil t) (replace-match "")) + (goto-line 3) + (while (not (eobp)) + (re-search-forward "^[^ ]*" nil t) + (setq cur-link (buffer-substring (match-beginning 0) (match-end 0))) + (setq cur-alias (buffer-substring (progn + (forward-line 1) + (beginning-of-line) + (point)) + (progn + (end-of-line) + (point)))) + (if (not (equal cur-alias "")) + (setq w3-hotlist (cons (list cur-alias cur-link) w3-hotlist))) + (if (fboundp 'w3-add-hotlist-menu) + (funcall 'w3-add-hotlist-menu))))) + (defun w3-parse-hotlist (&optional fname) "Read in the hotlist specified by FNAME" (if (not fname) (setq fname w3-hotlist-file)) @@ -239,28 +284,21 @@ (message "%s does not exist!" fname) (let* ((old-buffer (current-buffer)) (buffer (get-buffer-create " *HOTW3*")) - cur-link - cur-alias) + (case-fold-search t)) (set-buffer buffer) (erase-buffer) (insert-file-contents fname) (goto-char (point-min)) - (while (re-search-forward "^\n" nil t) (replace-match "")) - (goto-line 3) - (while (not (eobp)) - (re-search-forward "^[^ ]*" nil t) - (setq cur-link (buffer-substring (match-beginning 0) (match-end 0))) - (setq cur-alias (buffer-substring (progn - (forward-line 1) - (beginning-of-line) - (point)) - (progn - (end-of-line) - (point)))) - (if (not (equal cur-alias "")) - (setq w3-hotlist (cons (list cur-alias cur-link) w3-hotlist)))) + (cond + ((looking-at "ncsa-xmosaic-hotlist-format-1");; Old-style NCSA Mosaic + (w3-hotlist-parse-old-mosaic-format)) + ((or (looking-at "<!DOCTYPE") ; Some HTML style, including netscape + (re-search-forward "<a[ \n]+href" nil t)) + (w3-read-html-bookmarks fname)) + (t + (message "Cannot determine format of hotlist file: %s" fname))) + (set-buffer-modified-p nil) (kill-buffer buffer) - (and (fboundp 'w3-add-hotlist-menu) (funcall 'w3-add-hotlist-menu)) (set-buffer old-buffer)))) ;;;###autoload @@ -288,9 +326,8 @@ (if (and title (marker-buffer (car title)) (marker-buffer (cdr title))) - (setq title (buffer-substring (car title) (cdr title))) + (setq title (buffer-substring-no-properties (car title) (cdr title))) (setq title "None")) - (remove-text-properties 1 (length title)) (w3-hotlist-add-document pref-arg title url) (and (fboundp 'w3-add-hotlist-menu) (funcall 'w3-add-hotlist-menu))))
--- a/lisp/w3/w3-imap.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/w3/w3-imap.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,11 +1,11 @@ -;;; w3-imap.el,v --- Imagemap functions +;;; w3-imap.el --- Imagemap functions ;; Author: wmperry -;; Created: 1996/05/27 17:50:43 -;; Version: 1.19 +;; Created: 1996/06/30 18:07:16 +;; Version: 1.2 ;; Keywords: hypermedia ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Copyright (c) 1996 by William M. Perry (wmperry@spry.com) +;;; Copyright (c) 1996 by William M. Perry (wmperry@cs.indiana.edu) ;;; ;;; This file is part of GNU Emacs. ;;;
--- a/lisp/w3/w3-keyword.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/w3/w3-keyword.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,11 +1,11 @@ -;;; w3-keyword.el,v --- Emacs-W3 binding style sheet mechanism +;;; w3-keyword.el --- Emacs-W3 binding style sheet mechanism ;; Author: wmperry -;; Created: 1996/05/30 14:37:30 +;; Created: 1996/07/23 00:40:54 ;; Version: 1.4 ;; Keywords: hypermedia ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Copyright (c) 1996 by William M. Perry (wmperry@spry.com) +;;; Copyright (c) 1996 by William M. Perry (wmperry@cs.indiana.edu) ;;; ;;; This file is not part of GNU Emacs, but the same permissions apply. ;;; @@ -32,18 +32,25 @@ ;;; defconst doesn't work either, because the byte-compiler gets too ;;; smart for us, and the .elc files are no longer portable. Joy oh joy! ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - (let ((keywords '( :align + :average-pitch :link-title :background :center + :data :depth + :left-volume + :right-volume + :pitch-range + :stress + :richness :figalt :figdata :fillcol :form :formnum + :gain :header-start :help-echo :href @@ -51,7 +58,6 @@ :image :lists :map - :mpeg :name :needspace :next-break
--- a/lisp/w3/w3-latex.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/w3/w3-latex.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,7 +1,7 @@ -;;; w3-latex.el,v --- Emacs-W3 printing via LaTeX +;;; w3-latex.el --- Emacs-W3 printing via LaTeX ;; Author: wmperry -;; Created: 1996/06/06 15:00:18 -;; Version: 1.4 +;; Created: 1996/06/30 18:08:34 +;; Version: 1.3 ;; Keywords: hypermedia, printing, typesetting ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -25,7 +25,7 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Elisp code to convert a W3 parse tree into a LaTeX buffer. ;;; -;;; Heavily hacked upon by William Perry <wmperry@spry.com> to add more +;;; Heavily hacked upon by William Perry <wmperry@cs.indiana.edu> to add more ;;; bells and whistles. ;;; ;;; KNOWN BUGS: @@ -40,7 +40,8 @@ (require 'w3-print) (defvar w3-latex-print-links nil - "*If non-nil, prints the URLs of hypertext links as footnotes on a page.") + "*If non-nil, prints the URLs of hypertext links as endnotes at the end of +the document. If `footnote', prints the URL's as footnotes on a page.") (defvar w3-latex-use-latex2e nil "*If non-nil, configures LaTeX parser to use LaTeX2e syntax. A `nil' @@ -57,6 +58,7 @@ ;; Internal variables - do not touch! (defvar w3-latex-current-url nil "What URL we are formatting") (defvar w3-latex-verbatim nil "Whether we are in a {verbatim} block or not") +(defvar w3-latex-links-list nil "List of links for endnote usage") (defvar w3-latex-entities '((nbsp . "~") @@ -84,7 +86,7 @@ (para . "\\P ") (middot . "$\\cdot$") (cedil . "\\c{ }") - (sup1 . "$^{1}") + (sup1 . "$^{1}$") ; (ordm . "") (raquo . "$\\gg$") (frac14 . "$\frac{1}{4}$") @@ -175,17 +177,16 @@ (defun w3-latex-insert-string (str) ;;; convert string to a LaTeX-compatible one. - (let ((todo (list (cons "\\\\" "\\BaCkSlAsH") + (let ((todo (list (cons "\\\\" "-BaCkSlAsH-") (cons "[%&#_{}$]" "\\\\\\&") - (cons "[~^]" "\\\\\\&{ }") + (cons "\\^" "{\\\\textasciicircum}") + (cons "~" "{\\\\textasciitilde}") (cons "[*]" "{\\&}") (cons "[><|]" "$\\&$") - (cons "\\\\BaCkSlAsH" "$\\backslash$") - (cons "\n" (if w3-latex-verbatim - "\\\\newline\n" - " "))))) + (cons "-BaCkSlAsH-" "$\\\\backslash$")))) (if w3-latex-verbatim - (setq todo (append todo '((" " . "\\\\ "))))) + (setq todo (append todo '(("\n" . "\\\\newline\\\\nullspace\n") + (" " . "\\\\ "))))) (save-excursion (set-buffer (get-buffer-create " *w3-latex-munging*")) (erase-buffer) @@ -198,6 +199,10 @@ (setq str (w3-latex-replace-entities (buffer-string)))) (insert str))) +(defun w3-latex-ignore (tree) + ;;; ignores any contents of this tree. + nil) + (defun w3-latex-contents (tree) ;;; passes contents of subtree through to the latex-subtree (let ((contents (car (cdr (cdr tree))))) @@ -211,8 +216,12 @@ (if w3-latex-current-url (insert "% from <URL:" w3-latex-current-url ">\n")) (insert "%\n" - "\\begin{document}\n") + "\\batchmode\n\\begin{document}\n") + (insert "\\setlength{\\parindent}{0pt}\n" + "\\setlength{\\parskip}{1.5ex}\n") + (insert "\\newcommand{\\nullspace}{\\rule{0pt}{0pt}}") (w3-latex-contents tree) + (if w3-latex-links-list (w3-latex-endnotes)) (insert "\\end{document}\n")) (defun w3-latex-title (tree) @@ -312,25 +321,57 @@ (defun w3-latex-break (tree) ;; no content allowed - (insert "\\linebreak")) + (insert "\\newline ")) + +(defun w3-latex-endnotes () + (let ((i 1)) + (insert "\\begin{thebibliography}{99}\n") + (while w3-latex-links-list + (insert (concat "\\bibitem{ref" (number-to-string i) "}")) + (w3-latex-insert-string (car w3-latex-links-list)) + (insert "\n") + (setq w3-latex-links-list (cdr w3-latex-links-list)) + (setq i (1+ i))) + (insert "\\end{thebibliography}\n"))) (defun w3-latex-href (tree) - (let ((href (cdr-safe (assq 'href (cadr tree))))) + (let ((href (cdr-safe (assq 'href (cadr tree)))) + (name (cdr-safe (assq 'name (cadr tree))))) (cond ((not w3-latex-print-links) ; No special treatment (w3-latex-contents tree)) + (name + (w3-latex-contents tree) + (insert (concat "\\label{" name "}"))) (href ; Special treatment requested - (insert "\\underline{") ; and we have a URL - underline - (w3-latex-contents tree) ; it and prepare a footnote. - (insert "}\\footnote{" href "}")) +; (insert "\\underline{") ; and we have a URL - underline + (w3-latex-contents tree) ; it. +; (insert "}") + (cond + ((char-equal ?# (aref href 0)) + (insert (concat " (see page~\\pageref{" + (substring href 1) + "})"))) + ((eq w3-latex-print-links 'footnote) + (insert "\\footnote{") ; Request to prepare footnote + (w3-latex-insert-string href) + (insert "}")) + (t ; Otherwise, prepare endnotes + (let ((mem (member href w3-latex-links-list)) + (i (1+ (length w3-latex-links-list)))) + (if mem + (setq i (- i (length mem))) + (setq w3-latex-links-list + (append w3-latex-links-list (cons href nil)))) + (insert (concat "~\\cite{ref" (number-to-string i) "}")))))) (t ; Special treatment requested, but (w3-latex-contents tree))))) ; no URL - do nothing. (defun w3-latex-preformatted (tree) (let ((w3-latex-verbatim t)) - (insert "\\tt{") + (insert "\\par\\noindent\\begin{tt}") (w3-latex-contents tree) - (insert "}") + (insert "\\end{tt}\\par") )) (defun w3-latex-xmp (tree) @@ -423,7 +464,7 @@ w3-temporary-directory) nil 5) (shell-command (format - "(cd %s ; latex w3-tmp.latex ; xdvi w3-tmp.dvi ; rm -f w3-tmp*) &" + "(cd %s ; latex w3-tmp.latex ; latex w3-tmp.latex ; xdvi w3-tmp.dvi ; rm -f w3-tmp*) &" w3-temporary-directory)))) (provide 'w3-latex)
--- a/lisp/w3/w3-menu.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/w3/w3-menu.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,11 +1,11 @@ -;;; $RCSFile: w3-menu.el,v $ --- menu functions for emacs-w3 +;;; w3-menu.el --- Menu functions for emacs-w3 ;; Author: wmperry -;; Created: 1996/06/03 17:35:14 -;; Version: 1.28 +;; Created: 1996/07/21 18:29:01 +;; Version: 1.7 ;; Keywords: menu, hypermedia ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Copyright (c) 1996 by William M. Perry (wmperry@spry.com) +;;; Copyright (c) 1996 by William M. Perry (wmperry@cs.indiana.edu) ;;; ;;; This file is part of GNU Emacs. ;;; @@ -118,12 +118,10 @@ (interactive) (cond ;; XEmacs style - ((and w3-running-xemacs (w3-menubar-active)) - ;; Turn the menubar off - (setq current-menubar nil)) (w3-running-xemacs - ;; Turn the menubar on - (w3-menu-install-menus)) + (set-specifier menubar-visible-p (cons (current-buffer) + (not (specifier-instance + menubar-visible-p))))) ;; Emacs 19 style (t (menu-bar-mode (if (w3-menubar-active) -1 1))))) @@ -135,7 +133,7 @@ (defun w3-menubar-active () (if w3-running-xemacs - (and (featurep 'menubar) current-menubar) + (and (featurep 'menubar) (specifier-instance menubar-visible-p)) (and (boundp 'menu-bar-mode) menu-bar-mode))) (defun w3-menu-global-menubar () @@ -253,6 +251,8 @@ (defconst w3-menu-options-menu (list "Options" + ["Edit Preferences" w3-preferences-edit t] + "---" ["Show Menubar" w3-toggle-menubar :style toggle :selected (w3-menubar-active)] (if (and w3-running-xemacs (featurep 'toolbar)) @@ -276,20 +276,6 @@ :style toggle :selected (not w3-delay-image-loads)] ["Flush Image Cache" (setq w3-graphics-list nil) w3-graphics-list] "----" - ["Privacy Mode" (progn - (setq url-privacy-level - (if (eq 'paranoid url-privacy-level) - 'none - 'paranoid)) - (url-setup-privacy-info)) - :style toggle :selected (not (eq url-privacy-level 'none))] - ["Color Printing" (setq ps-print-color-p (not ps-print-color-p)) - :style toggle :selected (and (boundp 'ps-print-color-p) - ps-print-color-p)] - ["Honor Automatic Refreshes" - (setq url-honor-refresh-requests (not url-honor-refresh-requests)) - :style toggle :selected (not (null url-honor-refresh-requests))] - "----" ["Download to disk" (setq w3-dump-to-disk (not w3-dump-to-disk)) :style toggle :selected w3-dump-to-disk] ["Caching" (setq url-automatic-caching (not url-automatic-caching)) @@ -298,13 +284,6 @@ (setq url-standalone-mode (not url-standalone-mode)) :style toggle :selected url-standalone-mode] "----" - ["Fancy Gopher" - (setq url-use-hypertext-gopher (not url-use-hypertext-gopher)) - :style toggle :selected url-use-hypertext-gopher] - ["Fancy Directory Listings" - (setq url-use-hypertext-dired (not url-use-hypertext-dired)) - :style toggle :selected url-use-hypertext-dired] - "----" ["Save Options" w3-menu-save-options t] ) "W3 menu options list.") @@ -322,6 +301,8 @@ ["Honor Color Requests" (setq w3-user-colors-take-precedence (not w3-user-colors-take-precedence)) :style toggle :selected (not w3-user-colors-take-precedence)] + "---" + ["Reload Stylesheets" w3-refresh-stylesheets t] ) "W3 menu style list.") @@ -493,7 +474,9 @@ (lookup-key w3-mode-menu-map [rootmenu]))))) (defun w3-menu-install-menus () - (cond ((consp w3-use-menus) + (cond ((= emacs-minor-version 28) ; Hey, get with the times people!! + nil) + ((consp w3-use-menus) (w3-menu-install-menubar)) ((eq w3-use-menus 1) (w3-menu-install-menubar-item)) @@ -569,23 +552,39 @@ (list 'quote val)))))) (if var (princ "\n")))) '( - w3-delay-image-loads - w3-delay-mpeg-loads ps-print-color-p - w3-color-use-reducing - w3-color-filter - w3-dump-to-disk - w3-user-colors-take-precedence - w3-do-incremental-display url-automatic-caching - url-standalone-mode - url-use-hypertext-gopher - url-use-hypertext-dired + url-be-asynchronous + url-honor-refresh-requests + url-privacy-level url-proxy-services - url-be-asynchronous + url-standalone-mode + url-use-hypertext-dired + url-use-hypertext-gopher + w3-color-filter + w3-color-use-reducing w3-default-homepage - url-privacy-level + w3-default-stylesheet + w3-delay-image-loads + w3-do-incremental-display + w3-dump-to-disk + w3-file-done-hook + w3-file-prepare-hook + w3-honor-stylesheets + w3-image-mappings + w3-load-hook + w3-mode-hook + w3-netscape-compatible-comments + w3-preferences-cancel-hook + w3-preferences-default-hook + w3-preferences-ok-hook + w3-preferences-setup-hook + w3-source-file-hook + w3-style-ie-compatibility w3-toolbar-orientation + w3-toolbar-type + w3-use-menus + w3-user-colors-take-precedence ) ) (princ ";; ==========================\n")
--- a/lisp/w3/w3-mouse.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/w3/w3-mouse.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,11 +1,11 @@ -;;; w3-xemac.el,v --- XEmacs specific functions for emacs-w3 +;;; w3-xemac.el --- XEmacs specific functions for emacs-w3 ;; Author: wmperry -;; Created: 1996/05/29 18:21:00 -;; Version: 1.7 +;; Created: 1996/06/30 18:09:28 +;; Version: 1.2 ;; Keywords: mouse, hypermedia ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Copyright (c) 1996 by William M. Perry (wmperry@spry.com) +;;; Copyright (c) 1996 by William M. Perry (wmperry@cs.indiana.edu) ;;; ;;; This file is part of GNU Emacs. ;;;
--- a/lisp/w3/w3-mule.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/w3/w3-mule.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,11 +1,11 @@ -;;; w3-mule.el,v --- MULE 18/19 specific functions for emacs-w3 +;;; w3-mule.el --- MULE 18/19 specific functions for emacs-w3 ;; Author: wmperry -;; Created: 1996/04/25 14:41:19 -;; Version: 1.15 +;; Created: 1996/06/30 18:09:59 +;; Version: 1.2 ;; Keywords: faces, help, i18n, mouse, hypermedia ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Copyright (c) 1993, 1994, 1995 by William M. Perry (wmperry@spry.com) +;;; Copyright (c) 1993 - 1996 by William M. Perry (wmperry@cs.indiana.edu) ;;; ;;; This file is part of GNU Emacs. ;;;
--- a/lisp/w3/w3-parse.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/w3/w3-parse.el Mon Aug 13 08:46:35 2007 +0200 @@ -3,8 +3,8 @@ ;; Filename: w3-parse.el ;; Purpose: Parse HTML and/or SGML for Emacs W3 browser. -;; Copyright © 1995 Joseph Brian Wells -;; Copyright © 1993, 1994, 1995 by William M. Perry (wmperry@spry.com) +;; Copyright © 1995, 1996 Joseph Brian Wells +;; Copyright © 1993, 1994, 1995 by William M. Perry (wmperry@cs.indiana.edu) ;; ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -288,7 +288,16 @@ (while html-entities (put (car (car html-entities)) 'html-entity-expansion (cons 'CDATA (if (integerp (cdr (car html-entities))) - (char-to-string (cdr (car html-entities))) + (char-to-string + (let ((c (cdr (car html-entities)))) + (cond + ((and (> c 127) (boundp 'MULE)) + (make-character lc-ltn1 c)) + ;;((and (> c 127) (featurep 'mule)) + ;; What??? + ;;) + (t + c)))) (cdr (car html-entities))))) (setq html-entities (cdr html-entities)))) @@ -315,7 +324,7 @@ (setq cur (car html-entities) html-entities (cdr html-entities)) (put (nth 0 cur) 'html-entity-expansion - (cons 'nil (format "img src=\"%s/%s%s\" alt=\"%s\"" + (cons 'nil (format "<img src=\"%s/%s%s\" alt=\"%s\">" w3-icon-directory (nth 1 cur) (if w3-icon-format @@ -433,8 +442,17 @@ ;; that functionality belongs in char-to-string. ;; The largest valid character in the I18N version of HTML is 65533. ;; <URL:ftp://ds.internic.net/internet-drafts/draft-ietf-html-i18n-01.txt> - (insert (char-to-string w3-p-s-num))) - + ;; wrongo! Apparently, mule doesn't do sane things with char-to-string + ;; -wmp 7/9/96 + (insert (char-to-string + (cond + ((and (boundp 'MULE) (> w3-p-s-num 127)) + (make-character lc-ltn1 w3-p-s-num)) + ;;((and (featurep 'mule) (> w3-p-s-num 127)) + ;;what?? + ;;) + (t + w3-p-s-num))))) ((looking-at "&#\\(re\\|rs\\|space\\|tab\\)[\ ;\n]?") ; \n should be \r (replace-match (assq (upcase (char-after (+ 3 (point)))) '(;; *** Strictly speaking, record end should be @@ -604,7 +622,7 @@ ;; NEW-STATE (optional, default *same) is the index of the state to ;; move to after processing the element or one of these: ;; *same: no state change occurs. -;; *next: change the the current state + 1. +;; *next: change the current state + 1. ;; The initial state is 0. NEW-STATE does not matter if ACTION is ;; *close. ;; @@ -1150,6 +1168,7 @@ (w3-expand-parameters '( (%headempty . (link base meta range)) + (%headmisc . (script)) (%head-deprecated . (nextid)) ;; client-side imagemaps @@ -1160,22 +1179,12 @@ (%heading . (h1 h2 h3 h4 h5 h6)) - ;; Netscape's CENTER, FONT, and BASEFONT are handled - ;; non-standardly. In actual psuedo-HTML on the net, these are - ;; used as both text-level constructs and block-level constructs. - ;; They are the only items in both %block and %text in this - ;; definition here. - ;; *** Perhaps add BLINK here too? But no one uses that as a block - ;; construct. What about NOBR? - (%netscape-crud . (center font basefont)) - ;; Emacs-w3 extensions - (%emacsw3-crud-nonempty . (roach secret wired)) (%emacsw3-crud . (pinhead flame cookie yogsothoth hype peek)) - (%block . (p %list dl form %preformatted %netscape-crud font + (%block . (p %list dl form %preformatted font %blockquote isindex fn table fig note - %block-deprecated %block-obsoleted)) + center %block-deprecated %block-obsoleted)) (%list . (ul ol)) (%preformatted . (pre)) (%blockquote . (bq)) @@ -1185,14 +1194,13 @@ ;; Why is IMG in this list? (%pre.exclusion . (*include img *discard tab math big small sub sup)) - (%text . (*data b %notmath %netscape-crud sub sup - %emacsw3-crud %emacsw3-crud-nonempty)) + (%text . (*data b %notmath sub sup %emacsw3-crud)) (%notmath . (%special %font %phrase %misc)) - (%font . (i u s strike tt big small)) ; B left out for MATH handling - (%phrase . (em strong code samp kbd var cite blink)) - ;; Don't know if this is right place for EMBED. - (%special . (a img br wbr nobr tab math embed)) - (%misc . (q lang au dfn person acronym abbrev ins del)) + (%font . (i u s strike tt big small sub sup + roach secret wired)) ;; B left out for MATH + (%phrase . (em strong dfn code samp kbd var cite blink)) + (%special . (a img applet font br script map math tab)) + (%misc . (q lang au person acronym abbrev ins del)) (%formula . (*data %math)) (%math . (box above below %mathvec root sqrt array sub sup @@ -1258,7 +1266,8 @@ ]) (end-tag-omissible . t)) ((head) - (content-model . [((title isindex %headempty style %head-deprecated) + (content-model . [((title isindex %headempty %headmisc + style %head-deprecated) nil nil ;; *** Should only close if tag can @@ -1266,6 +1275,11 @@ ;; I haven't bothered to enumerate them. (*close))]) (end-tag-omissible . t)) + ;; SCRIPT - - (#PCDATA) + ((script) + (content-model . CDATA ; not official, but allows + ; comment hiding of script + )) ;; TITLE - - (#PCDATA) ((title) (content-model . RCDATA ; not official @@ -1274,13 +1288,7 @@ ;; STYLE - O (#PCDATA) ;; STYLE needs to be #PCDATA to allow omitted end tag. Bleagh. ((style) - (content-model . [((*data) - include-space - nil - ;; *** Should only close if tag can - ;; legitimately follow style. So many can that - ;; I haven't bothered to enumerate them. - (*close))]) + (content-model . CDATA) (end-tag-omissible . t)) ((body) (content-model . [((banner) nil nil (*retry *next)) @@ -1302,7 +1310,7 @@ ((credit plaintext) *close)) nil)]) (end-tag-omissible . t)) - ((div banner) + ((div banner center) (content-model . [((%body.content) nil ;; Push <P> before data characters. Non-SGML. @@ -1450,9 +1458,6 @@ (end-tag-omissible . t)) ((%emacsw3-crud) (content-model . EMPTY)) - ((%netscape-crud) - ;; Special non-SGML treatment of Netscape's shit. - (content-model . XINHERIT)) ;; FORM - - %body.content -(FORM) +(INPUT|KEYGEN|SELECT|TEXTAREA) ((form) ;; Same as BODY. Ugh! @@ -1515,7 +1520,7 @@ ) nil)]) (exclusions . (a))) - ((b %font %phrase %misc nobr %emacsw3-crud-nonempty) + ((b font %font %phrase %misc nobr) (content-model . [((%text) include-space ((%in-text-ignore))
--- a/lisp/w3/w3-prefs.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/w3/w3-prefs.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,11 +1,11 @@ -;;; w3-prefs.el,v --- Preferences panels for Emacs-W3 +;;; w3-prefs.el --- Preferences panels for Emacs-W3 ;; Author: wmperry -;; Created: 1996/06/06 14:14:34 -;; Version: 1.10 +;; Created: 1996/06/30 18:10:45 +;; Version: 1.5 ;; Keywords: hypermedia, preferences ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Copyright (c) 1996 by William M. Perry (wmperry@spry.com) +;;; Copyright (c) 1996 by William M. Perry (wmperry@cs.indiana.edu) ;;; ;;; This file is not part of GNU Emacs, but the same permissions apply. ;;; @@ -32,6 +32,7 @@ (require 'w3-vars) (require 'w3-keyword) (require 'w3-widget) +(require 'w3-toolbar) (defvar w3-preferences-glyph nil) (defvar w3-preferences-map nil)
--- a/lisp/w3/w3-print.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/w3/w3-print.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,11 +1,11 @@ -;;; w3-print.el,v --- Printing support for emacs-w3 +;;; w3-print.el --- Printing support for emacs-w3 ;; Author: wmperry -;; Created: 1996/06/06 15:03:15 -;; Version: 1.15 +;; Created: 1996/07/09 02:54:01 +;; Version: 1.3 ;; Keywords: faces, help, printing, hypermedia ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Copyright (c) 1993, 1994 by William M. Perry (wmperry@spry.com) +;;; Copyright (c) 1993 - 1996 by William M. Perry (wmperry@cs.indiana.edu) ;;; ;;; This file is part of GNU Emacs. ;;; @@ -67,6 +67,7 @@ function (or function 'ps-print-buffer-with-faces)) (let ((ps-bold-faces ps-bold-faces) (ps-italic-faces ps-italic-faces) + (inhibit-read-only t) (ps-underline-faces (cond ((boundp 'ps-underline-faces) (symbol-value 'ps-underline-faces))
--- a/lisp/w3/w3-speak.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/w3/w3-speak.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,11 +1,12 @@ -;;; w3-speak.el,v --- Emacs-W3 speech interface -;; Author: wmperry -;; Created: 1996/06/03 15:53:35 -;; Version: 1.6 +;;; w3-speak.el --- Emacs-W3 speech interface +;; Authors: wmperry and Raman +;; Created: 1996/07/09 14:08:09 +;; Version: 1.4 ;; Keywords: hypermedia, speech +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;{{{ Copyright -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Copyright (c) 1996 by William M. Perry (wmperry@spry.com) +;;; Copyright (c) 1996 by William M. Perry (wmperry@cs.indiana.edu) ;;; ;;; This file is not part of GNU Emacs, but the same permissions apply. ;;; @@ -31,7 +32,10 @@ ;;; This file would not be possible without the help of ;;; T.V. Raman (raman@adobe.com) and his continued efforts to make Emacs-W3 ;;; even remotely useful. :) + +;;}}} ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;{{{ Required modules (require 'widget) (require 'w3-forms) @@ -45,12 +49,15 @@ (progn (require 'emacspeak) (require 'dtk-voices) + (require 'dtk-css-speech) (require 'emacspeak-speak) (require 'emacspeak-sounds) (eval-when (compile) (require 'emacspeak-fix-interactive))) (error (message "Emacspeak not found - speech will not work."))) +;;}}} + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; How to get information summarizing a form field, so it can be spoken in @@ -69,20 +76,6 @@ (get type 'w3-speak-summarizer)) ;;}}} -;;{{{ Associate summarizer functions for form fields - -(w3-speak-define-field-summarizer 'text) -(w3-speak-define-field-summarizer 'option) -(w3-speak-define-field-summarizer 'checkbox) -(w3-speak-define-field-summarizer 'reset) -(w3-speak-define-field-summarizer 'submit) -(w3-speak-define-field-summarizer 'button) -(w3-speak-define-field-summarizer 'radio) -(w3-speak-define-field-summarizer 'multiline) -(w3-speak-define-field-summarizer 'image) - -;;}}} - ;;{{{ define the form field summarizer functions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -99,13 +92,23 @@ (let ( (label (w3-speak-extract-form-field-label data)) (name (w3-form-element-name data)) - (value (widget-get (w3-form-element-widget data)))) + (value (widget-value (w3-form-element-widget data)))) (dtk-speak (format "Text field %s %s " (or label (concat "called " name)) (concat "set to " value))))) +(defun w3-speak-summarize-file-field (data) + "Summarize a f field of type file given the field data." + (let ( + (label (w3-speak-extract-form-field-label data)) + (name (w3-form-element-name data)) + (value (widget-value (w3-form-element-widget data)))) + (dtk-speak + (format "File field %s %s " (or label (concat "called " name)) + (concat "set to " value))))) + (defun w3-speak-summarize-textarea-field (data) - "Summarize a text field given the field data." + "Summarize a textarea field given the field data." (let ( (name (w3-form-element-name data)) (label (w3-speak-extract-form-field-label data)) @@ -170,6 +173,21 @@ (format "Radio button %s is %s" (or label name) (if checked "pressed" "not pressed"))))) + +;;}}} +;;{{{ Associate summarizer functions for form fields + +(w3-speak-define-field-summarizer 'text) +(w3-speak-define-field-summarizer 'option) +(w3-speak-define-field-summarizer 'checkbox) +(w3-speak-define-field-summarizer 'reset) +(w3-speak-define-field-summarizer 'submit) +(w3-speak-define-field-summarizer 'button) +(w3-speak-define-field-summarizer 'radio) +(w3-speak-define-field-summarizer 'multiline) +(w3-speak-define-field-summarizer 'image) +(w3-speak-define-field-summarizer 'file) + ;;}}} ;;{{{ speaking form fields @@ -193,6 +211,7 @@ (data (message "Please define a summarizer function for %s" type)) (t nil)))) + ;;}}} ;;{{{ Movement notification @@ -212,22 +231,21 @@ (defadvice w3-follow-link (around emacspeak pre act) "Provide feedback on what you did. " (let ((data (w3-speak-extract-form-field-information)) - (form-field-p nil) - (this-zone nil) - (opoint nil)) + (form-field-p nil)) (if data - (setq form-field-p t - opoint (point))) + (setq form-field-p t)) ad-do-it (when form-field-p (w3-speak-summarize-form-field) (case (w3-form-element-type data) - ((radio checkbox) + ((radio checkbox button) (emacspeak-auditory-icon 'button)) + ((text textarea) + (emacspeak-auditory-icon 'close-object) ;; fill in any others here (otherwise nil))) - ad-return-value)) + ad-return-value))) (defadvice w3-revert-form (after emacspeak pre act) "Announce that you cleared the form. " @@ -241,16 +259,20 @@ (defadvice widget-forward (after emacspeak pre act) "Produce an auditory icon when moving forward. If on a form field, then summarize it." + (declare (special emacspeak-lazy-message-time)) (when (interactive-p) - (w3-speak-summarize-form-field) - (emacspeak-auditory-icon 'large-movement))) + (let ((emacspeak-lazy-message-time 0)) + (w3-speak-summarize-form-field) + (emacspeak-auditory-icon 'large-movement)))) (defadvice widget-backward (after emacspeak pre act) "Produce an auditory icon when moving backward. If on a form field, then summarize it." + (declare (special emacspeak-lazy-message-time)) (when (interactive-p ) + (let ((emacspeak-lazy-message-time 0)) (w3-speak-summarize-form-field) - (emacspeak-auditory-icon 'large-movement))) + (emacspeak-auditory-icon 'large-movement)))) (defadvice w3-start-of-document (after emacspeak pre act) "Produce an auditory icon. Also speak the first line. " @@ -259,7 +281,7 @@ (emacspeak-auditory-icon 'large-movement))) (defadvice w3-end-of-document (after emacspeak pre act) - "Produce an auditory icon. Also speak the first line." + "Produce an auditory icon. " (when (interactive-p) (emacspeak-speak-line) (emacspeak-auditory-icon 'large-movement))) @@ -277,13 +299,21 @@ (emacspeak-speak-mode-line))) (defadvice w3-fetch (around emacspeak act comp ) - "First produce an auditory icon to indicate retrieval. -After retrieval, -set voice-lock-mode to t after displaying the buffer, -and then speak the mode-line. " + "First produce an auditory icon to indicate retrieval. After +retrieval, set voice-lock-mode to t after displaying the buffer, and +then speak the mode-line. " (declare (special dtk-punctuation-mode)) - (emacspeak-auditory-icon 'select-object) - ad-do-it) + (when (interactive-p) + (emacspeak-auditory-icon 'select-object) + ad-do-it + (set (make-local-variable 'voice-lock-mode) t) + (setq dtk-punctuation-mode "some") + (modify-syntax-entry 10 " ") + (emacspeak-auditory-icon 'open-object) + (emacspeak-speak-mode-line ))) + +;;}}} +;;{{{ top level (defun w3-speak-mode-hook () (set (make-local-variable 'voice-lock-mode) t) @@ -310,4 +340,14 @@ w3-delimit-emphasis nil) (add-hook 'w3-mode-hook 'w3-speak-mode-hook))) +;;}}} +;;{{{ make-local-hook + +;;; hope this is correct: +(unless (fboundp 'make-local-hook) +(defun make-local-hook (var) + (make-variable-buffer-local var)) +) + +;;}}} (provide 'w3-speak)
--- a/lisp/w3/w3-style.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/w3/w3-style.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,11 +1,11 @@ -;;; w3-style.el,v --- Emacs-W3 binding style sheet mechanism +;;; w3-style.el --- Emacs-W3 binding style sheet mechanism ;; Author: wmperry -;; Created: 1996/05/31 21:34:16 -;; Version: 1.82 +;; Created: 1996/08/12 03:10:30 +;; Version: 1.13 ;; Keywords: faces, hypermedia ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Copyright (c) 1993, 1994, 1995 by William M. Perry (wmperry@spry.com) +;;; Copyright (c) 1993 - 1996 by William M. Perry (wmperry@cs.indiana.edu) ;;; ;;; This file is not part of GNU Emacs, but the same permissions apply. ;;; @@ -139,6 +139,7 @@ (url-retrieve url) (w3-style-css-clean) (setq sheet (buffer-string)) + (set-buffer-modified-p nil) (kill-buffer (current-buffer))) (insert sheet) (goto-char save-pos)))) @@ -175,6 +176,40 @@ (widen) results)) +(defun w3-style-active-device-types (&optional device) + (let ((types (list 'normal 'default (if w3-running-xemacs 'xemacs 'emacs))) + (type (device-type device))) + (cond + ((featurep 'emacspeak) + (setq types (cons 'speech types))) + ((eq type 'tty) + (if (and (fboundp 'tty-color-list) + (/= 0 (length (tty-color-list)))) + (setq types (cons 'ansi-tty types)) + (setq types (cons 'tty types)))) + ((eq 'color (device-class)) + (if (not (device-bitplanes)) + (setq types (cons 'color types)) + (setq types + (append + (list (intern (format "%dbit-color" + (device-bitplanes))) + (intern (format "%dbit" + (device-bitplanes))) + 'color) types)) + (if (= 24 (device-bitplanes)) + (setq types (cons 'truecolor types))))) + ((eq 'grayscale (device-class)) + (setq types (append (list (intern (format "%dbit-grayscale" + (device-bitplanes))) + 'grayscale) + types))) + ((eq 'mono (device-class)) + (setq types (append (list 'mono 'monochrome) types))) + (t + (setq types (cons 'unknown types)))) + types)) + (defun w3-style-parse-css (fname &optional string inherit) (let ( (url-mime-accept-string @@ -189,38 +224,8 @@ (class nil) (defines nil) (device-type nil) - (active-device-types (list 'normal 'default - (if w3-running-FSF19 'emacs 'xemacs))) + (active-device-types (w3-style-active-device-types (selected-device))) (sheet inherit)) - (let ((type (device-type))) - (cond - ((eq type 'tty) - (if (and (fboundp 'tty-color-list) - (/= 0 (length (tty-color-list)))) - (setq active-device-types (cons 'ansi-tty active-device-types)) - (setq active-device-types (cons 'tty active-device-types)))) - ((eq 'color (device-class)) - (setq active-device-types - (append - (list (intern (format "%dbit-color" - (device-bitplanes))) - (intern (format "%dbit" - (device-bitplanes))) - 'color) active-device-types)) - (if (= 24 (device-bitplanes)) - (setq active-device-types (cons 'truecolor active-device-types)))) - ((eq 'grayscale (device-class)) - (setq active-device-types (append - (list (intern (format "%dbit-grayscale" - (device-bitplanes))) - 'grayscale) - active-device-types))) - ((eq 'mono (device-class)) - (setq active-device-types (append (list 'mono 'monochrome) - active-device-types))) - (t - (setq active-device-types (cons 'unknown active-device-types))))) - (save-excursion (set-buffer (get-buffer-create (url-generate-new-buffer-name " *style*"))) @@ -234,6 +239,11 @@ (while (not (eobp)) (setq save-pos (point)) (cond + ;; *sigh* SGML comments are being used to 'hide' data inlined + ;; with the <style> tag from older browsers. + ((or (looking-at "<!--+") ; begin + (looking-at "--+>")) ; end + (goto-char (match-end 0))) ;; C++ style comments, and we are doing IE compatibility ((and (looking-at "//") w3-style-ie-compatibility) (end-of-line)) @@ -258,7 +268,7 @@ (w3-warn 'style (format "Unknown directive: @%s" directive) 'warning))))) ;; Giving us some output device information - ((looking-at "[ \t\r]*:\\([^:]+\\):") + ((looking-at "[ \t\r]*:\\([^: \n]+\\):") (downcase-region (match-beginning 1) (match-end 1)) (setq device-type (intern (buffer-substring (match-beginning 1) (match-end 1)))) @@ -266,13 +276,13 @@ (if (not (memq device-type active-device-types)) ;; Not applicable to us... skip the info (progn - (if (re-search-forward ":[^:]*:" nil t) + (if (re-search-forward ":[^:{ ]*:" nil t) (goto-char (match-beginning 0)) (goto-char (point-max)))))) ;; Default is to treat it like a stylesheet declaration (t - (skip-chars-forward "^{:") - (downcase-region save-pos (point)) + (skip-chars-forward "^{") + ;;(downcase-region save-pos (point)) (setq applies-to (w3-style-css-applies-to save-pos (point))) (skip-chars-forward "^{") (setq save-pos (point)) @@ -288,7 +298,7 @@ (setq cur (car applies-to) applies-to (cdr applies-to)) (cond - ((string-match "\\(.*\\)\\.\\(.*\\)" cur) ; Normal class + ((string-match "\\([^.]*\\)\\.\\(.*\\)" cur) ; Normal class (setq tag (intern (downcase (match-string 1 cur))) class (match-string 2 cur))) ((string-match "\\(.*\\):\\(.*\\)" cur) ; Pseudo class @@ -379,14 +389,84 @@ ;; This rounds to the nearest '10' (format "%dpt" (* 10 (round (/ size 10)))))) +(defsubst w3-style-speech-normalize-number (num) + (if num (% (abs (read num)) 9))) + +(defun w3-generate-stylesheet-voices (sheet) + (let ((todo sheet) + cur cur-classes + node family gain + left right pitch + pitch-range stress + richness voice + ) + (while todo + (setq cur (car todo) + cur-classes (cdr cur) + todo (cdr todo)) + (while cur-classes + (setq node (cdr (car cur-classes)) + cur (car cur-classes) + cur-classes (cdr cur-classes) + family (cdr-safe (assq 'voice-family node)) + family (if family (intern (downcase family))) + gain (w3-style-speech-normalize-number + (cdr-safe (assq 'gain node))) + left (w3-style-speech-normalize-number + (cdr-safe (assq 'left-volume node))) + right (w3-style-speech-normalize-number + (cdr-safe (assq 'right-volume node))) + pitch (w3-style-speech-normalize-number + (cdr-safe (assq 'pitch node))) + pitch-range (w3-style-speech-normalize-number + (cdr-safe (assq 'pitch-range node))) + stress (w3-style-speech-normalize-number + (cdr-safe (assq 'stress node))) + richness (w3-style-speech-normalize-number + (cdr-safe (assq 'richness node)))) + (if (or family gain left right pitch pitch-range stress richness) + (setq voice (dtk-personality-from-speech-style + (make-dtk-speech-style :family (or family 'paul) + :gain (or gain 5) + :left-volume (or left 5) + :right-volume (or right 5) + :average-pitch (or pitch 5) + :pitch-range (or pitch-range 5) + :stress (or stress 5) + :richness (or richness 5)))) + (setq voice nil)) + (if voice (setcdr cur (cons (cons 'voice-spec voice) (cdr cur)))) + ) + ) + ) + ) + +(defun w3-style-post-process-stylesheet (sheet) + (w3-generate-stylesheet-faces sheet) + (if (featurep 'emacspeak) + (w3-generate-stylesheet-voices w3-user-stylesheet))) + +(defun w3-style-css-split-font-shorthand (font) + ;; [<font-weight> || <font-style>]? <font-size> [ / <line-height> ]? <font-family> + (let (weight size height family) + (if (not (string-match " *\\([0-9.]+[^ /]+\\)" font)) + (error "Malformed font shorthand: %s" font)) + (setq weight (if (/= 0 (match-beginning 0)) + (substring font 0 (match-beginning 0))) + size (match-string 1 font) + font (substring font (match-end 0) nil)) + (if (string-match " */ *\\([^ ]+\\) *" font) + ;; they specified a line-height as well + (setq height (match-string 1 font) + family (substring font (match-end 0) nil)) + (setq family (url-strip-leading-spaces font))) + (list weight size height family))) + (defun w3-generate-stylesheet-faces (sheet) (let ((todo sheet) (cur nil) (cur-classes nil) (node nil) - (voice nil) - (voice-person nil) - (voice-tone nil) (fore nil) (back nil) (pixmap nil) @@ -409,8 +489,6 @@ cur-classes (cdr cur-classes) fore (cdr-safe (assq 'color node)) back (cdr-safe (assq 'background node)) - voice-person (cdr-safe (assq 'voice node)) - voice-tone (cdr-safe (assq 'voice-tone node)) decoration (cdr-safe (assq 'text-decoration node)) pixmap (cdr-safe (assq 'backdrop node)) index (cdr-safe (assq 'font-size-index node)) @@ -424,17 +502,6 @@ style (cdr-safe (assq 'font-style node)) shorthand (cdr-safe (assq 'font node))) - (setq voice (if (or voice-person voice-tone) - (intern - (cond - ((and voice-person voice-tone) - (concat voice-person "-" voice-tone)) - (voice-person voice-person) - (voice-tone - (concat "default-voice-" voice-tone)) - (t - (error "IMPOSSIBLE")))))) - ;; Make sure all 'break' items get intern'd (if (or style decoration) (setq style (concat style decoration))) @@ -442,15 +509,15 @@ (if (and (cdr break-style) (stringp (cdr break-style))) (setcdr break-style (intern (cdr break-style)))) (if shorthand - (let ((shorthand (split-string shorthand "[ \t]"))) - (setq size (or (nth 0 shorthand) size) - family (or (nth 1 shorthand) size) - weight (or (nth 2 shorthand) weight) + (progn + (setq shorthand (w3-style-css-split-font-shorthand shorthand)) + (setq weight (or (nth 0 shorthand) weight) + size (or (nth 1 shorthand) size) + family (or (nth 3 shorthand) family) weight (or (cdr-safe (assoc weight w3-style-font-weight-mappings)) - weight) - style (or (nth 3 shorthand) style)))) + weight)))) (if style (setq style (mapcar (function @@ -462,7 +529,7 @@ (intern-soft (concat "font-set-" (downcase x) "-p")))) (delete "" (split-string style "[ \t&,]"))))) - (if family (setq family (delete "" (split-string family "[ \t]")))) + (if family (setq family (delete "" (split-string family ",")))) (if (or family weight style size) (progn (setq font (make-font :family family :weight weight :size size)) @@ -471,7 +538,6 @@ (funcall (car style) font t)) (setq style (cdr style)))) (setq font nil)) - (if voice (setcdr cur (cons (cons 'voice-spec voice) (cdr cur)))) (if font (setcdr cur (cons (cons 'font-spec font) (cdr cur)))) (if fore (setcdr cur (cons (cons 'foreground fore) (cdr cur)))) (if back (setcdr cur (cons (cons 'background back) (cdr cur)))) @@ -507,8 +573,7 @@ (t (w3-warn 'html "Unknown stylesheet notation: %s" type)))) (setq w3-current-stylesheet stylesheet) - (if (and w3-current-stylesheet (fboundp 'make-face)) - (w3-generate-stylesheet-faces w3-current-stylesheet)))) + (w3-style-post-process-stylesheet w3-current-stylesheet))) (defun w3-display-stylesheet (&optional sheet) (interactive)
--- a/lisp/w3/w3-sysdp.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/w3/w3-sysdp.el Mon Aug 13 08:46:35 2007 +0200 @@ -148,7 +148,8 @@ (sysdep-defconst window-system-version 0) (sysdep-defvar list-buffers-directory nil) -(sysdep-defvar x-library-search-path '("/usr/X11R6/lib/X11/" +(sysdep-defvar x-library-search-path (` + ("/usr/X11R6/lib/X11/" "/usr/X11R5/lib/X11/" "/usr/lib/X11R6/X11/" "/usr/lib/X11R5/X11/" @@ -167,7 +168,10 @@ "/usr/local/x11r5/lib/X11/" "/usr/lpp/Xamples/lib/X11/" "/usr/openwin/lib/X11/" - "/usr/openwin/share/lib/X11/") + "/usr/openwin/share/lib/X11/" + (, data-directory) + ) + ) "Search path used for X11 libraries.") ;; frame-related stuff. @@ -291,6 +295,15 @@ (sysdep-defalias 'face-list 'list-faces) +(sysdep-defun facep (face) + "Return t if X is a face name or an internal face vector." + ;; CAUTION!!! This is Emacs 19.x, for x <= 28, specific + ;; I know of no version of Lucid Emacs or XEmacs that did not have + ;; facep. Even if they did, they are unsupported, so big deal. + (and (or (internal-facep face) + (and (symbolp face) (assq face global-face-data))) + t)) + (sysdep-defun set-face-property (face property value &optional locale tag-set how-to-add) "Change a property of FACE." @@ -301,8 +314,32 @@ "Return FACE's value of the given PROPERTY." (and (symbolp face) (get face property))) +;; Property list functions +;; +(sysdep-defun plist-put (plist prop val) + "Change value in PLIST of PROP to VAL. +PLIST is a property list, which is a list of the form +(PROP1 VALUE1 PROP2 VALUE2 ...). PROP is a symbol and VAL is any object. +If PROP is already a property on the list, its value is set to VAL, +otherwise the new PROP VAL pair is added. The new plist is returned; +use `(setq x (plist-put x prop val))' to be sure to use the new value. +The PLIST is modified by side effects." + (let ((node (memq prop plist))) + (if node + (setcar (cdr node) val) + (setq plist (cons prop (cons val plist)))) + plist)) + +(sysdep-defun plist-get (plist prop) + "Extract a value from a property list. +PLIST is a property list, which is a list of the form +(PROP1 VALUE1 PROP2 VALUE2...). This function returns the value +corresponding to the given PROP, or nil if PROP is not +one of the properties on the list." + (car-safe (cdr-safe (memq prop plist)))) + ;; Device functions -;; By wmperry@spry.com +;; By wmperry@cs.indiana.edu ;; This is a complete implementation of all the device-* functions found in ;; XEmacs 19.14. A 'device' for Emacs 19 is just a frame, from which we can ;; determine the connection to an X display, etc. @@ -457,7 +494,6 @@ str)) (t "stdio"))) - (sysdep-defun device-connection (&optional device) "Return the connection of the specified device. DEVICE defaults to the selected device if omitted" @@ -555,6 +591,7 @@ (sysdep-defalias 'device-class (cond + ;; First, Xwindows ((and (eq window-system 'x) (fboundp 'x-display-visual-class)) (function (lambda (&optional device) @@ -563,6 +600,22 @@ ((string-match "color" val) 'color) ((string-match "gray-scale" val) 'grayscale) (t 'mono)))))) + ;; Now, Presentation-Manager under OS/2 + ((and (eq window-system 'pm) (fboundp 'pm-display-visual-class)) + (function + (lambda (&optional device) + (let ((val (symbol-name (pm-display-visual-class device)))) + (cond + ((string-match "color" val) 'color) + ((string-match "gray-scale" val) 'grayscale) + (t 'mono)))))) + ;; A slightly different way of doing it under OS/2 + ((and (eq window-system 'pm) (fboundp 'pm-display-color-p)) + (function + (lambda (&optional device) + (if (pm-display-color-p) + 'color + 'mono)))) ((fboundp 'number-of-colors) (function (lambda (&optional device) @@ -598,7 +651,8 @@ "Return the type (e.g. `x' or `tty') of DEVICE-OR-FRAME. DEVICE-OR-FRAME should be a device or a frame object. See `device-type' for a description of the possible types." - (if (cdr-safe (assq 'display (frame-parameters device-or-frame))) + (if (or (cdr-safe (assq 'display (frame-parameters device-or-frame))) + (cdr-safe (assq 'window-id (frame-parameters device-or-frame)))) window-system 'tty)) @@ -628,6 +682,8 @@ (sysdep-fset 'extent-end-position 'overlay-end) (sysdep-fset 'extent-start-position 'overlay-start) (sysdep-fset 'set-extent-endpoints 'move-overlay) +(sysdep-fset 'set-extent-property 'overlay-put) +(sysdep-fset 'make-extent 'make-overlay) (sysdep-defun extent-property (extent property &optional default) (or (overlay-get extent property) default)) @@ -649,7 +705,6 @@ (< (- (extent-end-position a) (extent-start-position a)) (- (extent-end-position b) (extent-start-position b))))))))) - (sysdep-defun overlays-in (beg end) "Return a list of the overlays that overlap the region BEG ... END. Overlap means that at least one character is contained within the overlay @@ -693,6 +748,12 @@ (throw 'done tmp)))))) ;; misc +(sysdep-fset 'make-local-hook 'make-local-variable) + +(sysdep-defun buffer-substring-no-properties (beg end) + "Return the text from BEG to END, without text properties, as a string." + (format "%s" (buffer-substring beg end))) + (sysdep-defun symbol-value-in-buffer (symbol buffer &optional unbound-value) "Return the value of SYMBOL in BUFFER, or UNBOUND-VALUE if it is unbound." (save-excursion @@ -796,6 +857,9 @@ (fboundp 'color-defined-p)) ; NS/Emacs 19 'color-defined-p) ((and window-system + (fboundp 'pm-color-defined-p)) + 'pm-color-defined-p) + ((and window-system (fboundp 'x-color-defined-p)) ; Emacs 19 'x-color-defined-p) ((fboundp 'get-color) ; Epoch @@ -882,6 +946,12 @@ (sysdep-defun find-face (face) (car-safe (memq face (face-list)))) +(sysdep-defun set-marker-insertion-type (marker type) + "Set the insertion-type of MARKER to TYPE. +If TYPE is t, it means the marker advances when you insert text at it. +If TYPE is nil, it means the marker stays behind when you insert text at it." + nil) + ;; window functions ;; not defined in v18 @@ -894,7 +964,6 @@ "Returns non-nil if WINDOW is a minibuffer window." (eq window (minibuffer-window))) -;; not defined in v18 (sysdep-defun window-live-p (window) "Returns t if OBJ is a window which is currently visible." (and (windowp window)
--- a/lisp/w3/w3-toolbar.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/w3/w3-toolbar.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,11 +1,11 @@ -;;; w3-toolbar.el,v --- Toolbar functions for emacs-w3 +;;; w3-toolbar.el --- Toolbar functions for emacs-w3 ;; Author: wmperry -;; Created: 1996/05/01 16:00:48 -;; Version: 1.10 +;; Created: 1996/06/30 18:12:43 +;; Version: 1.2 ;; Keywords: mouse, toolbar ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Copyright (c) 1995 by William M. Perry (wmperry@spry.com) +;;; Copyright (c) 1995, 1996 by William M. Perry (wmperry@cs.indiana.edu) ;;; ;;; This file is part of GNU Emacs. ;;;
--- a/lisp/w3/w3-vars.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/w3/w3-vars.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,11 +1,11 @@ ;;; w3-vars.el,v --- All variable definitions for emacs-w3 ;; Author: wmperry -;; Created: 1996/06/06 14:20:01 -;; Version: 1.219 +;; Created: 1996/08/29 04:09:40 +;; Version: 1.18 ;; Keywords: comm, help, hypermedia ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Copyright (c) 1993, 1994, 1995 by William M. Perry (wmperry@spry.com) +;;; Copyright (c) 1993 - 1996 by William M. Perry (wmperry@cs.indiana.edu) ;;; ;;; This file is not part of GNU Emacs, but the same permissions apply. ;;; @@ -28,7 +28,7 @@ ;;; Variable definitions for w3 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defconst w3-version-number - (let ((x "p2-3-67")) + (let ((x "p3.0.12")) (if (string-match "State:[ \t\n]+.\\([^ \t\n]+\\)" x) (setq x (substring x (match-beginning 1) (match-end 1))) (setq x (substring x 1))) @@ -36,7 +36,7 @@ (function (lambda (x) (if (= x ?-) "." (char-to-string x)))) x "")) "Version # of w3-mode.") -(defconst w3-version-date (let ((x "1996/06/06 14:20:01")) +(defconst w3-version-date (let ((x "1996/08/29 04:09:40")) (if (string-match "Date: \\([^ \t\n]+\\)" x) (substring x (match-beginning 1) (match-end 1)) x)) @@ -360,7 +360,7 @@ ;;; Figure out what flavor of emacs we are running ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defvar w3-running-xemacs (string-match "XEmacs\\|Lucid" emacs-version) - "*In XEmacs or Lucid Emacs?.") + "*In XEmacs?.") (defvar w3-running-FSF19 (and (string-match "^19" emacs-version) (not w3-running-xemacs)) @@ -389,34 +389,6 @@ should be in different colors/fonts.") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; embedded document variables -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(defvar w3-mpeg-size 150 "*The height and width of an mpeg window.") -(defvar w3-mpeg-args '("-loop") "*Arguments to mpeg_play.") -(defvar w3-mpeg-program "mpeg_play" "*The mpeg_play executable.") -(defvar w3-delayed-movies nil "A list of mpeg movies for this buffer.") - -(defvar w3-embedded-data-converters - '(("application/eqn" . w3-embed-eqn) - ("application/postscript" . w3-embed-postscript) - ("text/plain". w3-embed-text) - ("text/html" . w3-embed-text) - ("image/.*" . w3-embed-image)) - "An assoc list of regular expressions to match against MIME content-types -for embedded data in HTML documents. The cdr is a function to be passed -to 'funcall', with the embedded data and content-type as the sole arguments -passed to the function.") - -(if w3-running-xemacs - (progn - (condition-case () - (require 'annotations) - (error nil)) - (setq w3-embedded-data-converters - (cons (cons "video/mpeg" 'w3-embed-mpeg) - w3-embedded-data-converters)))) - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Graphics parsing stuff ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defvar w3-graphics-always-show-entities t @@ -434,9 +406,6 @@ "*A buffer-local variable holding positions and urls of images within the buffer.") -(defvar w3-delay-mpeg-loads t - "*Whether to delay loading mpegs or not.") - (defvar w3-image-mappings '( ("image/x-xbitmap" . xbm) @@ -749,6 +718,8 @@ (play.start "play.start" ) (play.stop "play.stop" ) (previous "previous" ) + (prince "prince" "the artist formerly known as prince") + (princesymbol "prince" "the artist formerly known as prince") (printer "printer" ) (sadsmiley "sadsmiley" ":(") (smiley "smiley" ":)") @@ -845,7 +816,6 @@ :image :lists :map - :mpeg :name :needspace :next-break @@ -936,7 +906,8 @@ (defvar w3-annotation-marker "<ncsa-annotation-format-1>") (defvar w3-annotation-minor-mode nil "Whether we are in the minor mode.") -(defconst w3-bug-address "wmperry@spry.com" "Address of current maintainer.") +(defconst w3-bug-address "wmperry@cs.indiana.edu" + "Address of current maintainer, where to send bug reports.") (defvar w3-continuation '(url-uncompress url-clean-text) "List of functions to call to process a document completely.") (defvar w3-current-annotation nil "URL of document we are annotating...") @@ -1008,7 +979,6 @@ w3-current-links w3-current-source w3-delayed-images - w3-delayed-movies w3-hidden-forms w3-invisible-href-list w3-state-vector
--- a/lisp/w3/w3-widget.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/w3/w3-widget.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,12 +1,12 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; w3-widget.el,v --- An image widget +;;; w3-widget.el --- An image widget ;; Author: wmperry -;; Created: 1996/05/29 03:11:24 -;; Version: 1.14 +;; Created: 1996/07/21 18:11:36 +;; Version: 1.3 ;; Keywords: faces, help, comm, news, mail, processes, mouse, hypermedia ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Copyright (c) 1993, 1994, 1995 by William M. Perry (wmperry@spry.com) +;;; Copyright (c) 1993 - 1996 by William M. Perry (wmperry@cs.indiana.edu) ;;; ;;; This file is not part of GNU Emacs, but the same permissions apply. ;;; @@ -183,11 +183,15 @@ :delete 'widget-default-delete :notify 'w3-image-widget-callback))) (alt - (setq real-widget (widget-create 'item :format "%v" :value alt)))) + (setq real-widget + (widget-create 'push :tag alt :format "%[%t%]" + :delete 'widget-default-delete + :notify 'w3-image-widget-callback)))) (if (not real-widget) nil (widget-put real-widget 'usemap (widget-get widget 'usemap)) (widget-put real-widget 'href href) + (widget-put real-widget 'src (widget-get widget 'src)) (widget-put real-widget 'ismap server-map) (widget-put real-widget :parent widget) (widget-put widget :children (list real-widget))))
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/w3/w3-xem20.el Mon Aug 13 08:46:35 2007 +0200 @@ -0,0 +1,76 @@ +;;; w3-xem20.el,v --- XEmacs 20.0 with Mule specific functions +;; Author: MORIOKA Tomohiko +;; Created: 1996/06/14 16:44:59 +;; Version: 1.1 +;; Keywords: faces, help, i18n, mouse, hypermedia + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; Copyright (c) 1996 by MORIOKA Tomohiko +;;; +;;; 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, 675 Mass Ave, Cambridge, MA 02139, USA. +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; Printing a mule buffer as postscript. Requires m2ps +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(defun w3-m2ps-buffer (&optional buffer) + "Print a buffer by passing it through m2ps and lpr." + (or buffer (setq buffer (current-buffer))) + (let ((x (save-excursion (set-buffer buffer) tab-width))) + (save-excursion + (set-buffer (get-buffer-create " *mule-print*")) + (erase-buffer) + (insert-buffer buffer) + (if (/= x tab-width) + (progn + (setq tab-width x) + (message "Converting tabs") + (untabify (point-min) (point-max)))) + (setq file-coding-system *internal*) + (shell-command-on-region (point-min) (point-max) + "m2ps | lpr" t)))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; Multi-Lingual Emacs (MULE) Specific Functions +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(defvar attributed-region nil + "Bogus definition to get rid of compile-time warnings.") + +(defun w3-inhibit-code-conversion (proc buf) + "Inhibit Mule's subprocess PROC from code converting in BUF." + (save-excursion + (set-buffer buf) + (setq mc-flag nil)) + (set-process-input-coding-system proc url-mule-no-coding-system) + (set-process-output-coding-system proc url-mule-no-coding-system)) + +(defvar w3-mime-list-for-code-conversion + '("text/plain" "text/html") + "List of MIME types that require Mules' code conversion.") +(make-variable-buffer-local 'w3-mime-list-for-code-conversion) + +(defun w3-convert-code-for-mule (mmtype) + "Convert current data into the appropriate coding system" + (and (or (not mmtype) (member mmtype w3-mime-list-for-code-conversion)) + (let* ((c (detect-coding-region (point-min) (point-max))) + (code (or (and (listp c) (car c)) c))) + (setq mc-flag t) + (decode-coding-region (point-min) (point-max) code) + (set-file-coding-system code) + ))) + +(provide 'w3-xem20)
--- a/lisp/w3/w3-xemac.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/w3/w3-xemac.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,11 +1,11 @@ -;;; w3-xemac.el,v --- XEmacs specific functions for emacs-w3 +;;; w3-xemac.el --- XEmacs specific functions for emacs-w3 ;; Author: wmperry -;; Created: 1996/06/06 14:14:34 -;; Version: 1.165 +;; Created: 1996/07/21 06:38:10 +;; Version: 1.4 ;; Keywords: faces, help, mouse, hypermedia ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Copyright (c) 1993, 1994, 1995 by William M. Perry (wmperry@spry.com) +;;; Copyright (c) 1993 - 1996 by William M. Perry (wmperry@cs.indiana.edu) ;;; ;;; This file is part of GNU Emacs. ;;; @@ -33,30 +33,27 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun w3-mouse-handler (e) "Function to message the url under the mouse cursor" + (interactive "e") (let* ((pt (event-point e)) - (props (and pt (extent-properties-at pt))) - (link (nth 1 (nth 1 (memq 'w3 props)))) ; The link info if it exists - (form (nth 1 (memq 'w3form props))) ; The form info it it exists - (dely (nth 0 (nth 1 (memq 'w3delayed props)))) ; The delayed img info - (mpeg (nth 1 (memq 'w3mpeg props))) ; the delayed mpeg info - (imag (nth 1 (memq 'w3graphic props)))) ; The image info if it exists + (good (eq (event-window e) (selected-window))) + (widget (and good pt (number-or-marker-p pt) (widget-at pt))) + (link (and widget (widget-get widget 'href))) + (form (and widget (widget-get widget 'w3-form-data))) + (imag nil) + ) (cond (link (message "%s" link)) (form - (let ((args (nth 0 form))) - (cond - ((string= "SUBMIT" (nth 1 form)) - (message "Submit form to %s" (cdr-safe (assq 'action args)))) - ((string= "RESET" (nth 1 form)) - (message "Reset form contents")) - (t - (message "Form entry (name=%s, type=%s)" (nth 2 form) - (if (equal "" (nth 1 form)) - "text" - (downcase (nth 1 form)))))))) - (dely (message "Delayed image (%s)" (car dely))) + (cond + ((eq 'submit (w3-form-element-type form)) + (message "Submit form to %s" + (cdr-safe (assq 'action (w3-form-element-action form))))) + ((eq 'reset (w3-form-element-type form)) + (message "Reset form contents")) + (t + (message "Form entry (name=%s, type=%s)" (w3-form-element-name form) + (w3-form-element-type form))))) (imag (message "Inlined image (%s)" (car imag))) - (mpeg (message "Delayed mpeg (%s)" (car mpeg))) (t (message ""))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -133,9 +130,8 @@ "XEmacs specific stuff for w3-mode" (cond ((not w3-track-mouse) - nil) - ((or (not (boundp 'inhibit-help-echo)) - inhibit-help-echo) + (setq inhibit-help-echo nil)) + (inhibit-help-echo (setq mode-motion-hook 'w3-mouse-handler)) (t nil)) (if (eq (device-type) 'tty)
--- a/lisp/w3/w3.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/w3/w3.el Mon Aug 13 08:46:35 2007 +0200 @@ -1,11 +1,11 @@ -;;; w3.el,v --- Main functions for emacs-w3 on all platforms/versions +;;; w3.el --- Main functions for emacs-w3 on all platforms/versions ;; Author: wmperry -;; Created: 1996/06/06 15:03:12 -;; Version: 1.550 +;; Created: 1996/08/19 03:30:47 +;; Version: 1.22 ;; Keywords: faces, help, comm, news, mail, processes, mouse, hypermedia ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Copyright (c) 1993, 1994, 1995 by William M. Perry (wmperry@spry.com) +;;; Copyright (c) 1993 - 1996 by William M. Perry (wmperry@cs.indiana.edu) ;;; ;;; This file is not part of GNU Emacs, but the same permissions apply. ;;; @@ -285,21 +285,15 @@ (w3-notify-when-ready bufnam)) (funcall view))) ((stringp view) - (let ((fname (url-generate-unique-filename fmt)) proc) + (let ((fname (url-generate-unique-filename fmt)) + (proc nil) + (file-coding-system url-mule-no-coding-system)) (if (url-file-directly-accessible-p (url-view-url t)) (make-symbolic-link url-current-file fname t) - (if (featurep 'mule) - (write-region (point-min) (point-max) fname nil nil *noconv*) - (write-region (point-min) (point-max) fname))) + (write-region (point-min) (point-max) fname)) (if (get-buffer url-working-buffer) (kill-buffer url-working-buffer)) - (if (string-match "%s" view) - (setq view (concat (substring view 0 (match-beginning 0)) - fname (substring view (match-end 0))))) - (if (string-match "%u" view) - (setq view (concat (substring view 0 (match-beginning 0)) - url - (substring view (match-end 0))))) + (setq view (mm-viewer-unescape view fname url)) (message "Passing to viewer %s " view) (setq proc (w3-start-viewer fname view)) (set-process-filter proc 'w3-viewer-filter) @@ -314,30 +308,25 @@ (defun w3-save-binary-file () "Save a buffer to disk - this is used when `w3-dump-to-disk' is non-nil" - (interactive) - (let ((x (read-file-name "Filename to save as: " - (or mm-download-directory "~/") - (concat (or mm-download-directory "~/") - (url-basepath (or url-current-file "") t)) - nil - (url-basepath (or url-current-file "") t))) - (require-final-newline nil)) - (save-excursion - ;; more fixes from the MULE guys - (if w3-dump-to-disk - (let (jka-compr-compression-info-list - jam-zcat-filename-list) - (if (featurep 'mule) - (let ((mc-flag t)) - (write-file x *noconv*)) - (write-file x))) - (let ((fnha file-name-handler-alist) - (file-name-handler-alist nil)) - (if (featurep 'mule) - (let ((mc-flag t)) - (write-file x *noconv*)) - (write-file x)))) - (kill-buffer (current-buffer))))) + ;; Ok, this is truly fucked. In XEmacs, if you use the mouse to select + ;; a URL that gets saved via this function, read-file-name will pop up a + ;; dialog box for file selection. For some reason which buffer we are in + ;; gets royally screwed (even with save-excursions and the whole nine + ;; yards). SO, we just keep the old buffer name around and away we go. + (let ((old-buff (current-buffer)) + (file (read-file-name "Filename to save as: " + (or mm-download-directory "~/") + (url-remove-compressed-extensions + (file-name-nondirectory (url-view-url t))) + nil + (url-remove-compressed-extensions + (file-name-nondirectory (url-view-url t))))) + (require-final-newline nil)) + (set-buffer old-buff) + (let ((mc-flag t) + (file-coding-system url-mule-no-coding-system)) + (write-region (point-min) (point-max) file)) + (kill-buffer (current-buffer)))) (defun w3-build-url (protocol) "Build a url for PROTOCOL, return it as a string" @@ -568,7 +557,8 @@ (w3-sentinel lastbuf))))) (if w3-track-last-buffer (setq w3-last-buffer buf)) - (let ((w3-notify (if (memq w3-notify '(newframe bully aggressive)) + (let ((w3-notify (if (memq w3-notify '(newframe bully + semibully aggressive)) w3-notify 'aggressive))) (w3-notify-when-ready buf)) @@ -796,8 +786,8 @@ (setq str (format "<A HREF=\"%s\">%s</A>" (widget-get p 'href) (read-string "Link text: " (buffer-substring - (car (widget-get p 'title)) - (cdr (widget-get p 'title))))))) + (widget-get p :from) + (widget-get p :to)))))) (t (setq str (format "<A HREF=\"%s\">%s</A>" (url-view-url t) (read-string "Link text: " (buffer-name)))))) @@ -1026,9 +1016,10 @@ (goto-char (point-min)) (setq buffer-file-truename nil buffer-file-name nil) - ;; Null filename bugs `set-auto-mode' in Mule ... - (if (not (featurep 'mule)) - (set-auto-mode)) + ;; Null filename bugs `set-auto-mode' in Mule ... + (condition-case () + (set-auto-mode) + (error nil)) (buffer-enable-undo) (set-buffer-modified-p nil) (w3-notify-when-ready (get-buffer tmp)))) @@ -1493,34 +1484,6 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Functions to handle formatting an html buffer ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(defun w3-insert-entities-in-string (string) - "Convert HTML markup-start characters to entity references in STRING. - Also replaces the \" character, so that the result may be safely used as - an attribute value in a tag. Returns a new string with the result of the - conversion. Replaces these characters as follows: - & ==> & - < ==> < - > ==> > - \" ==> "" - (if (string-match "[&<>\"]" string) - (save-excursion - (set-buffer (get-buffer-create " *entity*")) - (erase-buffer) - (buffer-disable-undo (current-buffer)) - (insert string) - (goto-char (point-min)) - (while (progn - (skip-chars-forward "^&<>\"") - (not (eobp))) - (insert (cdr (assq (char-after (point)) - '((?\" . """) - (?& . "&") - (?< . "<") - (?> . ">"))))) - (delete-char 1)) - (buffer-string)) - string)) - (defun w3-insert-headers () ;; Insert some HTTP/1.0 headers if necessary (url-lazy-message "Inserting HTTP/1.0 headers...") @@ -1530,7 +1493,7 @@ (goto-char (setq y (point-max))) (while hdrs (if (setq x (w3-in-assoc (car hdrs) url-current-mime-headers)) - (insert "<LI> <B>" (car x) "</B>: " (w3-insert-entities-in-string + (insert "<LI> <B>" (car x) "</B>: " (url-insert-entities-in-string (if (numberp (cdr x)) (int-to-string (cdr x)) (cdr x))))) @@ -1542,23 +1505,9 @@ (url-lazy-message "Inserting HTTP/1.0 headers... done.") (insert "<HR><UL>")))) -(defun w3-add-delayed-mpeg (src st &optional width height) - ;; Add a delayed mpeg for the current buffer. - (setq w3-delayed-movies (cons (list src - (set-marker (make-marker) st) - width height) - w3-delayed-movies)) - (w3-handle-text (concat "[MPEG(" (url-basepath src t) ")]")) - (put-text-property st (point) 'w3mpeg (list 'w3mpeg src st))) - -(defun w3-add-delayed-graphic (src st align alt args) +(defun w3-add-delayed-graphic (widget) ;; Add a delayed image for the current buffer. - (setq st (set-marker (make-marker) st) - w3-delayed-images (cons (list src st align alt args) - w3-delayed-images)) - (w3-handle-text alt) - (if (string= alt "") nil - (put-text-property st (point) 'w3delayed t))) + (setq w3-delayed-images (cons widget w3-delayed-images))) (defun w3-load-flavors () @@ -1612,6 +1561,8 @@ nil nil "Description of Problem:")))) +(defalias 'w3-bug 'w3-submit-bug) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Support for searching ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -1768,7 +1719,7 @@ "</h1>\n\t\t\t<ol>\n") (while tmp (insert "\t\t\t\t<li> <a href=\"" (car (cdr (car tmp))) - "\">" (w3-insert-entities-in-string + "\">" (url-insert-entities-in-string (car (car tmp))) "</a></li>\n") (setq tmp (cdr tmp))) (insert "\n\t\t\t</ol>\n\t\t</div>\n\t</body>\n</html>\n"))) @@ -1795,7 +1746,7 @@ (function (lambda (url desc) (insert (format "\t\t\t\t<li> <a href=\"%s\">%s</a>\n" - url (w3-insert-entities-in-string desc))))) + url (url-insert-entities-in-string desc))))) url-history-list) (insert "\n\t\t\t</ol>\n\t\t</div>\n\t</body>\n</html>\n"))))) @@ -1929,7 +1880,6 @@ (w3-quit nil))))) (buffer-list)) (let ((x w3-current-last-buffer)) - (and (fboundp 'w3-mpeg-kill-processes) (w3-mpeg-kill-processes)) (kill-buffer (current-buffer)) (if (and (bufferp x) (buffer-name x)) (w3-notify-when-ready x))))) @@ -1950,15 +1900,14 @@ nil)))) (defun w3-load-delayed-images () - "Load inlined images that were delayed, if necessary. -This function searches through `w3-delayed-images' and fetches the -appropriate picture for each point in the buffer and inserts it." + "Load inlined images that were delayed, if any." (interactive) - (and (fboundp 'w3-insert-graphic) - (let ((buffer-read-only nil)) - (mapcar (function (lambda (data) (apply 'w3-insert-graphic data))) - (nreverse w3-delayed-images)))) - (setq w3-delayed-images nil)) + (let ((w3-delay-image-loads nil) + (todo w3-delayed-images)) + (setq w3-delayed-images nil) + (while todo + (w3-maybe-start-image-download (car todo)) + (setq todo (cdr todo))))) (defun w3-save-this-url () "Save url under point in the kill ring" @@ -2142,6 +2091,14 @@ "\tftp://ftp.cs.indiana.edu/pub/elisp/w3/images/\n" )))) +(defun w3-refresh-stylesheets () + "Reload all stylesheets." + (interactive) + (setq w3-user-stylesheet nil + w3-face-cache nil) + (w3-find-default-stylesheets) + (w3-style-post-process-stylesheet w3-user-stylesheet)) + (defun w3-find-default-stylesheets () (let* ((lightp (w3-color-light-p 'default)) (longname (if lightp "stylesheet-light" "stylesheet-dark")) @@ -2244,18 +2201,14 @@ (setq w3-user-colors-take-precedence t) (w3-warn 'html - "Disabled document color specification because of mono display.")) - (setq w3-user-colors-take-precedence nil)) + "Disabled document color specification because of mono display."))) - (w3-find-default-stylesheets) + (w3-refresh-stylesheets) (if (not url-global-history-file) (setq url-global-history-file (expand-file-name "history" w3-configuration-directory))) - (if w3-user-stylesheet - (w3-generate-stylesheet-faces w3-user-stylesheet)) - (if (and w3-use-netscape-configuration-file w3-netscape-configuration-file (fboundp 'w3-read-netscape-config)) @@ -2376,11 +2329,10 @@ (let ((require-final-newline nil) (file-name-handler-alist nil) (write-file-hooks nil) - (write-contents-hooks nil)) - (if (featurep 'mule) - (let ((mc-flag t)) - (write-file fname nil *noconv*)) - (write-file fname)) + (write-contents-hooks nil) + (mc-flag t) + (file-coding-system url-mule-no-coding-system)) + (write-file fname) (message "Download of %s complete." (url-view-url t)) (sit-for 3) (kill-buffer buff))))) @@ -2392,11 +2344,11 @@ (urlobj (url-generic-parse-url url)) (url-working-buffer (generate-new-buffer (concat " *" url " download*"))) - (stub-fname (url-basepath (or (url-filename urlobj) "") t)) + (stub-fname (url-remove-compressed-extensions + (url-basepath (or (url-filename urlobj) "") t))) (fname (read-file-name "Filename to save as: " (or mm-download-directory "~/") - (concat (or mm-download-directory "~/") - stub-fname) + stub-fname nil stub-fname))) (setq-default url-be-asynchronous t) @@ -2484,6 +2436,17 @@ (w3-follow-link) (w3-fetch (cdr (assoc choice links-alist)))))) +(defun w3-widget-motion-hook (widget) + (assert widget nil "Bad data to w3-widget-motion-hook! Bad hook bad!") + (case w3-echo-link + (text + (message "%s" (w3-fix-spaces (buffer-substring (widget-get widget :from) + (widget-get widget :to))))) + (url + (if (widget-get widget 'href) + (message "%s" (widget-get widget 'href)))) + (otherwise nil))) + (defun w3-mode () "Mode for viewing HTML documents. If called interactively, will display the current buffer as HTML. @@ -2503,6 +2466,8 @@ (mapcar (function (lambda (x) (set-variable (car x) (cdr x)))) tmp) (w3-mode-version-specifics) (w3-menu-install-menus) + (make-local-hook 'widget-motion-hook) + (add-hook 'widget-motion-hook 'w3-widget-motion-hook) (run-hooks 'w3-mode-hook) (widget-setup) (setq url-current-passwd-count 0
--- a/lisp/w3/widget-edit.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/w3/widget-edit.el Mon Aug 13 08:46:35 2007 +0200 @@ -44,6 +44,11 @@ (defvar widget-mouse-face 'highlight) (defvar widget-field-face 'italic) +(defvar widget-motion-hook nil + "*Hook to be run after widget traversal (via `widget-forward|backward'). +The hooks will all be called with on argument - the widget that was just +selected.") + ;;; Utility functions. ;; ;; These are not really widget specific. @@ -125,7 +130,8 @@ (defmacro widget-specify-insert (&rest form) ;; Execute FORM without inheriting any text properties. - `(save-restriction + (` + (save-restriction (let ((inhibit-read-only t) result after-change-functions) @@ -133,11 +139,11 @@ (narrow-to-region (- (point) 2) (point)) (widget-specify-none (point-min) (point-max)) (goto-char (1+ (point-min))) - (setq result (progn ,@form)) + (setq result (progn (,@ form))) (delete-region (point-min) (1+ (point-min))) (delete-region (1- (point-max)) (point-max)) (goto-char (point-max)) - result))) + result)))) ;;; Widget Properties. @@ -350,10 +356,10 @@ (goto-char (max button field))) (button (goto-char button)) (field (goto-char field))))) - (let ((help-echo (or (get-text-property (point) 'button) - (get-text-property (point) 'field)))) - (if (and help-echo (setq help-echo (widget-get help-echo :help-echo))) - (message "%s" help-echo)))) + (run-hook-with-args 'widget-motion-hook (or + (get-text-property (point) 'button) + (get-text-property (point) 'field))) + ) (defun widget-backward (arg) "Move point to the previous field or button.
--- a/lisp/x11/x-compose.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/x11/x-compose.el Mon Aug 13 08:46:35 2007 +0200 @@ -767,7 +767,7 @@ (define-key binding 'help 'compose-help))))) compose-map nil) -;; Make display display the accented letters +;; Make redisplay display the accented letters (if (memq (default-value 'ctl-arrow) '(t nil)) (setq-default ctl-arrow 'iso-8859/1))
--- a/lisp/x11/x-font-menu.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/x11/x-font-menu.el Mon Aug 13 08:46:35 2007 +0200 @@ -70,7 +70,7 @@ ;;; - bitmap fonts, which can be assumed to look as good as possible; ;;; - bitmap fonts which have been (or can be) automatically scaled to ;;; a new size, and which almost always look awful; -;;; - and true outline fonts, which should look ok any any size, but in +;;; - and true outline fonts, which should look ok at any size, but in ;;; practice (on at least some systems) look awful at any size, and ;;; even in theory are unlikely ever to look as good as non-scaled ;;; bitmap fonts. @@ -367,24 +367,25 @@ (and (string-match x-font-regexp-foundry-and-family name) (setq family (capitalize (match-string 1 name)))) (setq entry (vassoc family (aref dcache 0))) - (mapcar #'(lambda (item) - ;; - ;; Items on the Size menu are enabled iff current font has - ;; that size. Only the size of the current font is - ;; selected. (If the current font comes in size 0, it is - ;; scalable, and thus has every size.) - ;; - (setq s (nth 3 (aref item 1))) - (if (or (member s (aref entry 2)) - (and (not font-menu-ignore-scaled-fonts) - (member 0 (aref entry 2)))) - (enable-menu-item item) - (disable-menu-item item)) - (if (eq size s) - (select-toggle-menu-item item) - (deselect-toggle-menu-item item)) - item) - (aref dcache 2))) + (mapcar + (lambda (item) + ;; + ;; Items on the Size menu are enabled iff current font has + ;; that size. Only the size of the current font is + ;; selected. (If the current font comes in size 0, it is + ;; scalable, and thus has every size.) + ;; + (setq s (nth 3 (aref item 1))) + (if (or (member s (aref entry 2)) + (and (not font-menu-ignore-scaled-fonts) + (member 0 (aref entry 2)))) + (enable-menu-item item) + (disable-menu-item item)) + (if (eq size s) + (select-toggle-menu-item item) + (deselect-toggle-menu-item item)) + item) + (aref dcache 2))) ))) ;;;###autoload
--- a/lisp/x11/x-init.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/x11/x-init.el Mon Aug 13 08:46:35 2007 +0200 @@ -49,8 +49,8 @@ ;;; OpenWindows-like "find" processing. These functions are really Sunisms, ;;; but we put them here instead of in x-win-sun.el in case someone wants -;;; to use them when not running on a Sun console (presumably after adding -;;; the to different keys, or putting them on menus.) +;;; to use them when not running on a Sun console (presumably after binding +;;; them to different keys, or putting them on menus.) (defvar ow-find-last-string nil) (defvar ow-find-last-clipboard nil) @@ -77,7 +77,7 @@ (zmacs-activate-region))) (defun ow-find-backward () - "Search backward the previous occurence of the text of the selection." + "Search backward the previous occurrence of the text of the selection." (interactive) (ow-find t)) @@ -86,104 +86,95 @@ ;;; Sun have done to the default keymap for the Sun keyboards. (defun x-initialize-keyboard () - "Don't call this." - (cond (;; This is some heuristic junk that tries to guess whether this is - ;; a Sun keyboard. - ;; - ;; One way of implementing this (which would require C support) would - ;; be to examine the X keymap itself and see if the layout looks even - ;; remotely like a Sun - check for the Find key on a particular - ;; keycode, for example. It'd be nice to have a table of this to - ;; recognize various keyboards; see also xkeycaps. - ;; - (let ((vendor (x-server-vendor))) - (or (string-match "Sun Microsystems" vendor) + "Perform X-Server-specific initializations. Don't call this." + ;; This is some heuristic junk that tries to guess whether this is + ;; a Sun keyboard. + ;; + ;; One way of implementing this (which would require C support) would + ;; be to examine the X keymap itself and see if the layout looks even + ;; remotely like a Sun - check for the Find key on a particular + ;; keycode, for example. It'd be nice to have a table of this to + ;; recognize various keyboards; see also xkeycaps. + (let ((vendor (x-server-vendor))) + (cond ((or (string-match "Sun Microsystems" vendor) ;; MIT losingly fails to tell us what hardware the X server ;; is managing, so assume all MIT displays are Suns... HA HA! (string-equal "MIT X Consortium" vendor) - (string-equal "X Consortium" vendor))) - ;; - ;; Ok, we think this could be a Sun keyboard. Load the Sun code. - ;; - (or (load "x-win-sun" t t) - (warn "Unable to load term file x-win-sun")) - ) - ((string-match "XFree86" (x-server-vendor)) - ;; Those XFree86 people do some weird keysym stuff, too. - (or (load "x-win-xfree86" t t) - (warn "Unable to load term file x-win-xfree86"))) - )) + (string-equal "X Consortium" vendor)) + ;; Ok, we think this could be a Sun keyboard. Load the Sun code. + (or (load "x-win-sun" t t) + (warn "Unable to load term file x-win-sun"))) + ((string-match "XFree86" vendor) + ;; Those XFree86 people do some weird keysym stuff, too. + (or (load "x-win-xfree86" t t) + (warn "Unable to load term file x-win-xfree86"))) + ))) (defvar pre-x-win-initted nil) (defun init-pre-x-win () "Initialize X Windows at startup (pre). Don't call this." - (if (not pre-x-win-initted) - (progn - (require 'x-iso8859-1) - (setq character-set-property 'x-iso8859/1) ; see x-iso8859-1.el + (when (not pre-x-win-initted) + (require 'x-iso8859-1) + (setq character-set-property 'x-iso8859/1) ; see x-iso8859-1.el - (setq initial-frame-plist (if initial-frame-unmapped-p - '(initially-unmapped t) - nil)) - (setq pre-x-win-initted t)))) + (setq initial-frame-plist (if initial-frame-unmapped-p + '(initially-unmapped t) + nil)) + (setq pre-x-win-initted t))) (defvar x-win-initted nil) (defun init-x-win () "Initialize X Windows at startup. Don't call this." - (if (not x-win-initted) - (progn - (init-pre-x-win) + (when (not x-win-initted) + (init-pre-x-win) - ;; Open the X display when this file is loaded - ;; (Note that the first frame is created later.) - (setq x-initial-argv-list (cons (car command-line-args) - command-line-args-left)) - (make-x-device nil) - (setq command-line-args-left (cdr x-initial-argv-list)) - (setq x-win-initted t)))) + ;; Open the X display when this file is loaded + ;; (Note that the first frame is created later.) + (setq x-initial-argv-list (cons (car command-line-args) + command-line-args-left)) + (make-x-device nil) + (setq command-line-args-left (cdr x-initial-argv-list)) + (setq x-win-initted t))) (defvar post-x-win-initted nil) (defun init-post-x-win () "Initialize X Windows at startup (post). Don't call this." - (if (not post-x-win-initted) - (progn - ;; We can't load this until after the initial X device is created - ;; because the icon initialization needs to access the display to get - ;; any toolbar-related color resources. - (if (featurep 'toolbar) - (init-x-toolbar)) - ;; these are only ever called if zmacs-regions is true. - (add-hook 'zmacs-deactivate-region-hook 'x-disown-selection) - (add-hook 'zmacs-activate-region-hook 'x-activate-region-as-selection) - (add-hook 'zmacs-update-region-hook 'x-activate-region-as-selection) + (when (not post-x-win-initted) + ;; We can't load this until after the initial X device is created + ;; because the icon initialization needs to access the display to get + ;; any toolbar-related color resources. + (if (featurep 'toolbar) + (init-x-toolbar)) + ;; these are only ever called if zmacs-regions is true. + (add-hook 'zmacs-deactivate-region-hook 'x-disown-selection) + (add-hook 'zmacs-activate-region-hook 'x-activate-region-as-selection) + (add-hook 'zmacs-update-region-hook 'x-activate-region-as-selection) - ;; Motif-ish bindings - ;; The following two were generally unliked. - ;;(define-key global-map '(shift delete) - ;; 'x-kill-primary-selection) - ;;(define-key global-map '(control delete) - ;; 'x-delete-primary-selection) - (define-key global-map '(shift insert) 'x-yank-clipboard-selection) - (define-key global-map '(control insert) 'x-copy-primary-selection) - ;; (Are these Sunisms?) - (define-key global-map 'copy 'x-copy-primary-selection) - (define-key global-map 'paste 'x-yank-clipboard-selection) - (define-key global-map 'cut 'x-kill-primary-selection) + ;; Motif-ish bindings + ;; The following two were generally unliked. + ;;(define-key global-map '(shift delete) 'x-kill-primary-selection) + ;;(define-key global-map '(control delete) 'x-delete-primary-selection) + (define-key global-map '(shift insert) 'x-yank-clipboard-selection) + (define-key global-map '(control insert) 'x-copy-primary-selection) + ;; These are Sun-isms. + (define-key global-map 'copy 'x-copy-primary-selection) + (define-key global-map 'paste 'x-yank-clipboard-selection) + (define-key global-map 'cut 'x-kill-primary-selection) - (define-key global-map 'menu 'popup-mode-menu) - ;;(define-key global-map '(shift menu) 'x-goto-menubar) ;NYI + (define-key global-map 'menu 'popup-mode-menu) + ;;(define-key global-map '(shift menu) 'x-goto-menubar) ;NYI - ;; This runs after the first frame has been created (we can't - ;; talk to the X server before that) but before the - ;; site-start-file or .emacs file, so sites and users have a - ;; chance to override it. - (add-hook 'before-init-hook 'x-initialize-keyboard) + ;; This runs after the first frame has been created (we can't + ;; talk to the X server before that) but before the + ;; site-start-file or .emacs file, so sites and users have a + ;; chance to override it. + (add-hook 'before-init-hook 'x-initialize-keyboard) - (setq post-x-win-initted t)))) + (setq post-x-win-initted t))) (defun make-frame-on-display (display &optional parms) "Create a frame on the X display named DISPLAY.
--- a/lisp/x11/x-menubar.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/x11/x-menubar.el Mon Aug 13 08:46:35 2007 +0200 @@ -168,8 +168,9 @@ ) ("Printing Options" ["Command-Line Switches for `lpr'/`lp'..." - (setq lpr-switches (read-string "Switches for `lpr'/`lp': " - lpr-switches)) + (setq lpr-switches + (read-expression "Switches for `lpr'/`lp': " + (format "%S" lpr-switches))) t] ["Pretty-Print With Color" (setq ps-print-color-p (not ps-print-color-p)) @@ -561,8 +562,9 @@ ))) -;;; Add Load Init button to menubar when starting up with -q (defun maybe-add-init-button () + "Don't call this. +Adds `Load .emacs' button to menubar when starting up with -q." ;; by Stig@hackvan.com (cond (init-file-user nil) @@ -1113,7 +1115,10 @@ (expand-file-name save-options-file (file-name-directory actual-save-options-init-file)) - t)) + ;; Don't hack-homedir in abbreviate-file-name. This will + ;; cause an incorrect expansion if the save-options variables + ;; have ~ in them. + )) (init-output-buffer (find-file-noselect actual-save-options-init-file)) init-output-marker
--- a/lisp/x11/x-win-sun.el Mon Aug 13 08:45:53 2007 +0200 +++ b/lisp/x11/x-win-sun.el Mon Aug 13 08:46:35 2007 +0200 @@ -93,6 +93,11 @@ ;; kp_enter is ok (append ;; Sun Function keys + (cond ((x-keysym-on-keyboard-p "F21") + '((f21 . pause) + (f22 . print) + (f23 . scroll_lock)))) + (cond ((x-keysym-on-keyboard-p "SunCut") ; X11 R6 mappings '((SunProps . props) (Undo . undo) (SunFront . front) (SunCopy . copy) @@ -114,41 +119,54 @@ (f25 . kp_divide) (f26 . kp_multiply) (f31 . kp_5)) + + ;; Map f33 and r13 to end or kp_end + (cond + ((not (x-keysym-on-keyboard-p "End")) + '((f33 . end) (r13 . end))) + ((not (x-keysym-on-keyboard-p "KP_End")) + '((f33 . kp_end) (r13 . kp_end)))) + (if (x-keysym-on-keyboard-p "F36") '((f36 . stop) (f37 . again)) ; MIT Type 5 name - '((f11 . stop) (f12 . again))))) ; Sun name or MIT Type 4 name + '((f11 . stop) (f12 . again))) ; Sun name or MIT Type 4 name - ;; Type 4 keyboards have a real kp_subtract and a f24 labelled `=' - ;; Type 5 keyboards have no key labelled `=' and a f24 labelled `-' - (if (x-keysym-on-keyboard-p "F24") - (if (x-keysym-on-keyboard-p "KP_Subtract") - '((f24 . kp_equal)) - '((f24 . kp_subtract)))) + ;; Type 4 keyboards have a real kp_subtract and a f24 labelled `=' + ;; Type 5 keyboards have no key labelled `=' and a f24 labelled `-' + (if (x-keysym-on-keyboard-p "F24") + (if (x-keysym-on-keyboard-p "KP_Subtract") + '((f24 . kp_equal)) + '((f24 . kp_subtract)))) - ;; Map f33 (Sun name) or r13 (MIT name) to end or kp_end - (cond ((x-keysym-on-keyboard-p "F33") - (cond ((not (x-keysym-on-keyboard-p "End")) '((f33 . end))) - ((not (x-keysym-on-keyboard-p "KP_End")) '((f33 . kp_end))))) - ((x-keysym-on-keyboard-p "R13") - (cond ((not (x-keysym-on-keyboard-p "End")) '((r13 . end))) - ((not (x-keysym-on-keyboard-p "KP_End")) '((r13 . kp_end)))))) - - ;; Map f27 to home or kp_home, as appropriate - (cond ((not (x-keysym-on-keyboard-p "Home")) '((f27 . home))) - ((not (x-keysym-on-keyboard-p "KP_Home")) '((f27 . kp_home)))) + ;; Map f27 to home or kp_home, as appropriate + (cond ((not (x-keysym-on-keyboard-p "Home")) '((f27 . home))) + ((not (x-keysym-on-keyboard-p "KP_Home")) '((f27 . kp_home)))) - ;; Map f29 to prior or kp_prior, as appropriate - (cond ((not (x-keysym-on-keyboard-p "Prior")) '((f29 . prior))) - ((not (x-keysym-on-keyboard-p "KP_Prior")) '((f29 . kp_prior)))) + ;; Map f29 to prior or kp_prior, as appropriate + (cond ((not (x-keysym-on-keyboard-p "Prior")) '((f29 . prior))) + ((not (x-keysym-on-keyboard-p "KP_Prior")) '((f29 . kp_prior)))) - ;; Map f35 to next or kp_next, as appropriate - (cond ((not (x-keysym-on-keyboard-p "Next")) '((f35 . next))) - ((not (x-keysym-on-keyboard-p "KP_Next")) '((f35 . kp_next)))) + ;; Map f35 to next or kp_next, as appropriate + (cond ((not (x-keysym-on-keyboard-p "Next")) '((f35 . next))) + ((not (x-keysym-on-keyboard-p "KP_Next")) '((f35 . kp_next)))) + )) (cond ((x-keysym-on-keyboard-p "apRead") ; SunOS 4.1.1 '((apRead . f11) (apEdit . f12))) ((x-keysym-on-keyboard-p "SunF36") ; SunOS 5 '((SunF36 . f11) (SunF37 . f12)))) + + ;; !@#$ SunOS 4 with SunOS5 X server + (if (string-match "sunos4.1" system-configuration) + '((unknown_keysym_0xFF9A . kp_prior) + (unknown_keysym_0xFF9B . kp_next) + (unknown_keysym_0xFF95 . kp_home) + (unknown_keysym_0xFF9C . kp_end) + (unknown_keysym_0xFF96 . kp_left) + (unknown_keysym_0xFF97 . kp_up) + (unknown_keysym_0xFF98 . kp_right) + (unknown_keysym_0xFF99 . kp_down) + (unknown_keysym_0xFF9E . kp_insert))) )) (fmakunbound 'x11-remap-keysyms-using-function-key-map)
--- a/lwlib/Makefile Mon Aug 13 08:45:53 2007 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -srcdir=/m/xemacs-19.14/lwlib -C_SWITCH_X_SITE=-I/usr/X11R6/include -C_SWITCH_SITE= -I/usr/i486-linuxaout/include -I/m/xpm-3.4h/lib -SHELL=/bin/sh -CC=gcc -CFLAGS=-bi486-linuxaout -O4 -m486 -malign-functions=2 -malign-jumps=2 -malign-loops=2 -CPP=gcc -E -I/usr/i486-linuxaout/include -I/m/xpm-3.4h/lib -I/usr/X11R6/include -RANLIB=ranlib -RM = rm -f -AR = ar cq - -VPATH=/m/xemacs-19.14/lwlib -EZ_OBJS = -ENERGIZEP = -EZ_SUBDIR = -SRCS = lwlib.c lwlib-Xlw.c xlwmenu.c xlwscrollbar.c lwlib-Xaw.c lwlib-utils.c lwlib-config.c -OBJS = lwlib.o lwlib-Xlw.o xlwmenu.o xlwscrollbar.o lwlib-Xaw.o lwlib-utils.o lwlib-config.o $(EZ_OBJS) -all:: $(EZ_SUBDIR) liblw.a -ALL_CFLAGS = -I. -I/usr/i486-linuxaout/include -I/m/xpm-3.4h/lib -I/usr/X11R6/include -DFUNCPROTO=11 -DNARROWPROTO -D_BSD_SOURCE -DNEED_LUCID -DNEED_ATHENA -DMENUBARS_LUCID -DSCROLLBARS_LUCID -DDIALOGS_ATHENA $(ENERGIZEP) ${CFLAGS} -DCONST_IS_LOSING -.c.o: - $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $< -liblw.a: $(OBJS) - $(RM) $@ - $(AR) $@ $(OBJS) - -if [ -n $(RANLIB) ]; then $(RANLIB) $@; fi -FRC.mostlyclean: -mostlyclean: FRC.mostlyclean - rm -f liblw.a liblw_pure_*.a *.o -clean: mostlyclean -distclean: clean - rm -f Makefile Makefile.in .pure -realclean: distclean -extraclean: distclean - -rm -f *~ \#* m/?*~ s/?*~ -lwlib-config.o: lwlib.h ../src/config.h -lwlib-Xaw.o: lwlib.h lwlib-internal.h lwlib-Xaw.h ../src/config.h -lwlib-Xlw.o: lwlib.h lwlib-internal.h lwlib-Xlw.h xlwmenu.h ../src/config.h -lwlib-Xm.o: lwlib.h lwlib-internal.h lwlib-utils.h lwlib-Xm.h -lwlib-Xm.o: ../src/config.h -lwlib-utils.o: lwlib-utils.h ../src/config.h -lwlib.o: lwlib.h lwlib-internal.h lwlib-utils.h ../src/config.h -lwlib.o: lwlib-Xlw.h lwlib-Xm.h lwlib-Xaw.h ../src/config.h -xlwmenu.o: lwlib.h xlwmenu.h xlwmenuP.h ../src/config.h -xlwscrollbar.o: lwlib.h xlwscrollbar.h xlwscrollbarP.h ../src/config.h
--- a/lwlib/Makefile.in Mon Aug 13 08:45:53 2007 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,253 +0,0 @@ -# Generated automatically from Makefile.in.in by configure. -/* Makefile for Lucid Widget Library - Copyright (C) 1994 Lucid, Inc. - Copyright (C) 1995 Tinker Systems and INS Engineering Corp. - Copyright (C) 1994, 1995 Board of Trustees, University of Illinois - -This file is part of the Lucid Widget Library. - -The Lucid Widget Library 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. - -The Lucid Widget Library 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, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -/* Some people use these in paths they define. We don't want their paths - getting changed on them. */ -#undef sparc -#undef sun -#undef unix -#undef sgi -#undef NeXT - -srcdir=/m/xemacs-19.14/lwlib -C_SWITCH_X_SITE=-I/usr/X11R6/include -C_SWITCH_SITE= -I/usr/i486-linuxaout/include -I/m/xpm-3.4h/lib - -SHELL=/bin/sh - -CC=gcc -CFLAGS=-bi486-linuxaout -O4 -m486 -malign-functions=2 -malign-jumps=2 -malign-loops=2 -CPP=gcc -E -I/usr/i486-linuxaout/include -I/m/xpm-3.4h/lib -I/usr/X11R6/include -RANLIB=ranlib - -RM = rm -f -AR = ar cq - - -#define THIS_IS_YMAKEFILE -#define NOT_C_CODE -#include "../src/config.h" - -/* With the traditional VPATH setting, it is not possible to - simultaneously compile in-place and in another directory. The - mistaken definition is that *all* dependencies are searched for in - the VPATH directory, rather than just the dependencies that are not - themselves targets. Thus, if there is an up-to-date .o file in the - in-place location, it will not get recompiled in the not-in-place - location. - - The GNU Make `vpath' directive continues this tradition, but at - least lets you restrict the classes of files that it applies to. - This allows us to kludge around the problem. */ -#ifdef USE_GNU_MAKE -vpath %.c /m/xemacs-19.14/lwlib -vpath %.h /m/xemacs-19.14/lwlib -/* now list files that should NOT be searched in the srcdir. - This includes any .c or .h that's built from something else - (e.g. a .in file). */ -/* none here */ -#else -VPATH=/m/xemacs-19.14/lwlib -#endif - -#ifndef C_SWITCH_MACHINE -#define C_SWITCH_MACHINE -#endif - -#ifndef C_SWITCH_SYSTEM -#define C_SWITCH_SYSTEM -#endif - -#ifndef C_SWITCH_X_SYSTEM -#define C_SWITCH_X_SYSTEM -#endif - -#ifndef C_SWITCH_X_MACHINE -#define C_SWITCH_X_MACHINE -#endif - -#if defined (CONST_IS_LOSING) -# define CONST_FLAG -DCONST_IS_LOSING -#else -# define CONST_FLAG -#endif - -#if defined (LWLIB_MENUBARS_LUCID) -# define LWLIB_MENUBARS -DMENUBARS_LUCID -#else -# if defined (LWLIB_MENUBARS_MOTIF) -# define LWLIB_MENUBARS -DMENUBARS_MOTIF -# else -# define LWLIB_MENUBARS -# endif -#endif - -#if defined (LWLIB_SCROLLBARS_LUCID) -# define LWLIB_SCROLLBARS -DSCROLLBARS_LUCID -#else -# if defined (LWLIB_SCROLLBARS_MOTIF) -# define LWLIB_SCROLLBARS -DSCROLLBARS_MOTIF -# else -# if defined (LWLIB_SCROLLBARS_ATHENA) -# define LWLIB_SCROLLBARS -DSCROLLBARS_ATHENA -# else -# define LWLIB_SCROLLBARS -# endif -# endif -#endif - -#if defined (LWLIB_DIALOGS_MOTIF) -# define LWLIB_DIALOGS -DDIALOGS_MOTIF -#else -# if defined (LWLIB_DIALOGS_ATHENA) -# define LWLIB_DIALOGS -DDIALOGS_ATHENA -# else -# define LWLIB_DIALOGS -# endif -#endif - -#undef NEED_TOOLKIT - -/* If Motif was chosen as the tookit for anything, then - LWLIB_USES_MOTIF should have gotten defined. */ -#if defined (LWLIB_USES_MOTIF) -# ifndef NEED_TOOLKIT -# define NEED_TOOLKIT -# endif -# define NEED_MOTIF -DNEED_MOTIF -# define MOTIF_SRCS lwlib-Xm.c -# define MOTIF_OBJS lwlib-Xm.o -#else -# define NEED_MOTIF -# define MOTIF_SRCS -# define MOTIF_OBJS -#endif - -#if defined (LWLIB_MENUBARS_LUCID) || defined (LWLIB_SCROLLBARS_LUCID) -# ifndef NEED_TOOLKIT -# define NEED_TOOLKIT -# endif -# define NEED_LUCID -DNEED_LUCID -# ifdef LWLIB_MENUBARS_LUCID -# define LUCID_MENUBAR_SRCS xlwmenu.c -# define LUCID_MENUBAR_OBJS xlwmenu.o -# else -# define LUCID_MENUBAR_SRCS -# define LUCID_MENUBAR_OBJS -# endif -# ifdef LWLIB_SCROLLBARS_LUCID -# define LUCID_SCROLLBAR_SRCS xlwscrollbar.c -# define LUCID_SCROLLBAR_OBJS xlwscrollbar.o -# else -# define LUCID_SCROLLBAR_SRCS -# define LUCID_SCROLLBAR_OBJS -# endif -# define LUCID_SRCS lwlib-Xlw.c LUCID_MENUBAR_SRCS LUCID_SCROLLBAR_SRCS -# define LUCID_OBJS lwlib-Xlw.o LUCID_MENUBAR_OBJS LUCID_SCROLLBAR_OBJS -#else -# define NEED_LUCID -# define LUCID_SRCS -# define LUCID_OBJS -#endif - -#if defined (LWLIB_SCROLLBARS_ATHENA) || defined (LWLIB_DIALOGS_ATHENA) -# ifndef NEED_TOOLKIT -# define NEED_TOOLKIT -# endif -# define NEED_ATHENA -DNEED_ATHENA -# define ATHENA_SRCS lwlib-Xaw.c -# define ATHENA_OBJS lwlib-Xaw.o -#else -# define NEED_ATHENA -# define ATHENA_SRCS -# define ATHENA_OBJS -#endif - -#ifdef ENERGIZE -EZ_OBJS = energize/blpsheet.o energize/build.o energize/classbr_ps.o \ - energize/ctreebr_ps.o energize/debuggerps.o \ - energize/editmode.o energize/leb_psheet.o \ - energize/projectdisp.o energize/projectps.o \ - energize/search.o energize/target.o -ENERGIZEP = -DENERGIZE -EZ_SUBDIR = ez_dialog -#else -EZ_OBJS = -ENERGIZEP = -EZ_SUBDIR = -#endif - -SRCS = lwlib.c MOTIF_SRCS LUCID_SRCS ATHENA_SRCS lwlib-utils.c \ - lwlib-config.c -OBJS = lwlib.o MOTIF_OBJS LUCID_OBJS ATHENA_OBJS lwlib-utils.o \ - lwlib-config.o $(EZ_OBJS) - -#ifdef NEED_TOOLKIT -all:: $(EZ_SUBDIR) liblw.a -#else -all:: -#endif - -ALL_CFLAGS = -I. C_SWITCH_MACHINE C_SWITCH_SITE C_SWITCH_X_SITE \ - C_SWITCH_X_MACHINE C_SWITCH_X_SYSTEM \ - C_SWITCH_SYSTEM NEED_LUCID NEED_MOTIF NEED_ATHENA \ - LWLIB_MENUBARS LWLIB_SCROLLBARS LWLIB_DIALOGS \ - $(ENERGIZEP) ${CFLAGS} CONST_FLAG -.c.o: - $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $< - -liblw.a: $(OBJS) - $(RM) $@ - $(AR) $@ $(OBJS) - -if [ -n $(RANLIB) ]; then \ - $(RANLIB) $@; \ - fi - -#ifdef ENERGIZE -ez_dialog: - cd energize ; $(MAKE) $(MFLAGS) -#endif - -FRC.mostlyclean: -mostlyclean: FRC.mostlyclean - rm -f liblw.a liblw_pure_*.a *.o -clean: mostlyclean -#ifdef ENERGIZE - cd energize ; $(MAKE) $(MFLAGS) clean -#endif -distclean: clean - rm -f Makefile Makefile.in .pure -realclean: distclean -extraclean: distclean - -rm -f *~ \#* m/?*~ s/?*~ - - -lwlib-config.o: lwlib.h ../src/config.h -lwlib-Xaw.o: lwlib.h lwlib-internal.h lwlib-Xaw.h ../src/config.h -lwlib-Xlw.o: lwlib.h lwlib-internal.h lwlib-Xlw.h xlwmenu.h ../src/config.h -lwlib-Xm.o: lwlib.h lwlib-internal.h lwlib-utils.h lwlib-Xm.h -lwlib-Xm.o: ../src/config.h -lwlib-utils.o: lwlib-utils.h ../src/config.h -lwlib.o: lwlib.h lwlib-internal.h lwlib-utils.h ../src/config.h -lwlib.o: lwlib-Xlw.h lwlib-Xm.h lwlib-Xaw.h ../src/config.h -xlwmenu.o: lwlib.h xlwmenu.h xlwmenuP.h ../src/config.h -xlwscrollbar.o: lwlib.h xlwscrollbar.h xlwscrollbarP.h ../src/config.h
--- a/lwlib/lwlib-Xlw.c Mon Aug 13 08:45:53 2007 +0200 +++ b/lwlib/lwlib-Xlw.c Mon Aug 13 08:46:35 2007 +0200 @@ -229,17 +229,17 @@ int ac = 0; Widget scrollbar; - XtSetArg (al[ac], XmNminimum, 1); ac++; - XtSetArg (al[ac], XmNmaximum, INT_MAX); ac++; - XtSetArg (al[ac], XmNincrement, 1); ac++; - XtSetArg (al[ac], XmNpageIncrement, 1); ac++; + XtSetArg (al[ac], (String) XmNminimum, 1); ac++; + XtSetArg (al[ac], (String) XmNmaximum, INT_MAX); ac++; + XtSetArg (al[ac], (String) XmNincrement, 1); ac++; + XtSetArg (al[ac], (String) XmNpageIncrement, 1); ac++; if (vertical) { - XtSetArg (al[ac], XmNorientation, XmVERTICAL); ac++; + XtSetArg (al[ac], (String) XmNorientation, XmVERTICAL); ac++; } else { - XtSetArg (al[ac], XmNorientation, XmHORIZONTAL); ac++; + XtSetArg (al[ac], (String) XmNorientation, XmHORIZONTAL); ac++; } scrollbar =
--- a/lwlib/lwlib-Xm.c Mon Aug 13 08:45:53 2007 +0200 +++ b/lwlib/lwlib-Xm.c Mon Aug 13 08:46:35 2007 +0200 @@ -152,8 +152,8 @@ XtResource resource; char *result = NULL; - resource.resource_name = "labelString"; - resource.resource_class = "LabelString"; /* #### should be Xmsomething... */ + resource.resource_name = (String) "labelString"; + resource.resource_class = (String) "LabelString"; /* #### should be Xmsomething... */ resource.resource_type = XtRString; resource.resource_size = sizeof (String); resource.resource_offset = 0; @@ -222,9 +222,9 @@ xm_update_label (widget_instance* instance, Widget widget, widget_value* val) { XmString built_string = 0; - XmString key_string = 0; - XmString val_string = 0; - XmString name_string = 0; + XmString key_string = 0; + XmString val_string = 0; + XmString name_string = 0; Arg al [256]; int ac; @@ -236,7 +236,7 @@ /* * Sigh. The main text of a label is the name field for menubar * entries. The value field is a possible additional field to be - * contatenated on to the name field. HOWEVER, with dialog boxes + * concatenated on to the name field. HOWEVER, with dialog boxes * the value field is the complete text which is supposed to be * displayed as the label. Yuck. */ @@ -667,7 +667,7 @@ static void xm_update_text (widget_instance* instance, Widget widget, widget_value* val) { - XmTextSetString (widget, val->value ? val->value : ""); + XmTextSetString (widget, val->value ? val->value : (char *) ""); XtRemoveAllCallbacks (widget, XmNactivateCallback); XtAddCallback (widget, XmNactivateCallback, xm_generic_callback, instance); XtRemoveAllCallbacks (widget, XmNvalueChangedCallback); @@ -679,7 +679,7 @@ xm_update_text_field (widget_instance* instance, Widget widget, widget_value* val) { - XmTextFieldSetString (widget, val->value ? val->value : ""); + XmTextFieldSetString (widget, val->value ? val->value : (char *) ""); XtRemoveAllCallbacks (widget, XmNactivateCallback); XtAddCallback (widget, XmNactivateCallback, xm_generic_callback, instance); XtRemoveAllCallbacks (widget, XmNvalueChangedCallback); @@ -1011,8 +1011,8 @@ static Widget make_dialog (char* name, Widget parent, Boolean pop_up_p, - char* shell_title, char* icon_name, Boolean text_input_slot, - Boolean radio_box, Boolean list, + CONST char* shell_title, CONST char* icon_name, + Boolean text_input_slot, Boolean radio_box, Boolean list, int left_buttons, int right_buttons) { Widget result; @@ -1043,19 +1043,19 @@ XtSetArg(al[ac], XmNtitle, shell_title); ac++; XtSetArg(al[ac], XtNallowShellResize, True); ac++; XtSetArg(al[ac], XmNdeleteResponse, XmUNMAP); ac++; - result = XmCreateDialogShell (parent, "dialog", al, ac); + result = XmCreateDialogShell (parent, (char *) "dialog", al, ac); XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++; /* XtSetArg(al[ac], XmNautoUnmanage, TRUE); ac++; */ /* ####is this ok? */ XtSetArg(al[ac], XmNnavigationType, XmTAB_GROUP); ac++; - form = XmCreateForm (result, shell_title, al, ac); + form = XmCreateForm (result, (char *) shell_title, al, ac); } else { ac = 0; XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++; XtSetArg(al[ac], XmNnavigationType, XmTAB_GROUP); ac++; - form = XmCreateForm (parent, shell_title, al, ac); + form = XmCreateForm (parent, (char *) shell_title, al, ac); result = form; } @@ -1076,7 +1076,7 @@ XtSetArg(al[ac], XmNleftOffset, 13); ac++; XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++; XtSetArg(al[ac], XmNrightOffset, 13); ac++; - row = XmCreateRowColumn (form, "row", al, ac); + row = XmCreateRowColumn (form, (char *) "row", al, ac); n_children = 0; for (i = 0; i < left_buttons; i++) @@ -1115,7 +1115,8 @@ /* invisible seperator button */ ac = 0; XtSetArg (al[ac], XmNmappedWhenManaged, FALSE); ac++; - children [n_children] = XmCreateLabel (row, "separator_button", al, ac); + children [n_children] = XmCreateLabel (row, (char *) "separator_button", + al, ac); DO_DND_KLUDGE (children [n_children]); n_children++; @@ -1142,7 +1143,7 @@ XtSetArg(al[ac], XmNleftOffset, 0); ac++; XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++; XtSetArg(al[ac], XmNrightOffset, 0); ac++; - separator = XmCreateSeparator (form, "", al, ac); + separator = XmCreateSeparator (form, (char *) "", al, ac); ac = 0; XtSetArg(al[ac], XmNlabelType, XmPIXMAP); ac++; @@ -1152,7 +1153,7 @@ XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++; XtSetArg(al[ac], XmNleftOffset, 13); ac++; XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++; - icon = XmCreateLabel (form, icon_name, al, ac); + icon = XmCreateLabel (form, (char *) icon_name, al, ac); DO_DND_KLUDGE (icon); ac = 0; @@ -1165,7 +1166,7 @@ XtSetArg(al[ac], XmNbottomWidget, separator); ac++; XtSetArg(al[ac], XmNleftAttachment, XmATTACH_NONE); ac++; XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++; - icon_separator = XmCreateLabel (form, "", al, ac); + icon_separator = XmCreateLabel (form, (char *) "", al, ac); DO_DND_KLUDGE (icon_separator); if (text_input_slot) @@ -1181,7 +1182,7 @@ XtSetArg(al[ac], XmNleftWidget, icon); ac++; XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++; XtSetArg(al[ac], XmNrightOffset, 13); ac++; - value = XmCreateTextField (form, "value", al, ac); + value = XmCreateTextField (form, (char *) "value", al, ac); DO_DND_KLUDGE (value); } else if (radio_box) @@ -1201,14 +1202,17 @@ XtSetArg(al[ac], XmNleftWidget, icon); ac++; XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++; XtSetArg(al[ac], XmNrightOffset, 13); ac++; - value = XmCreateRadioBox (form, "radiobutton1", al, ac); + value = XmCreateRadioBox (form, (char *) "radiobutton1", al, ac); ac = 0; i = 0; - radio_butt = XmCreateToggleButtonGadget (value, "radio1", al, ac); + radio_butt = XmCreateToggleButtonGadget (value, (char *) "radio1", + al, ac); children [i++] = radio_butt; - radio_butt = XmCreateToggleButtonGadget (value, "radio2", al, ac); + radio_butt = XmCreateToggleButtonGadget (value, (char *) "radio2", + al, ac); children [i++] = radio_butt; - radio_butt = XmCreateToggleButtonGadget (value, "radio3", al, ac); + radio_butt = XmCreateToggleButtonGadget (value, (char *) "radio3", + al, ac); children [i++] = radio_butt; XtManageChildren (children, i); } @@ -1225,7 +1229,7 @@ XtSetArg(al[ac], XmNleftWidget, icon); ac++; XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++; XtSetArg(al[ac], XmNrightOffset, 13); ac++; - value = XmCreateScrolledList (form, "list", al, ac); + value = XmCreateScrolledList (form, (char *) "list", al, ac); /* this is the easiest way I found to have the dble click in the list activate the default button */ @@ -1245,7 +1249,7 @@ XtSetArg(al[ac], XmNleftWidget, icon); ac++; XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++; XtSetArg(al[ac], XmNrightOffset, 13); ac++; - message = XmCreateLabel (form, "message", al, ac); + message = XmCreateLabel (form, (char *) "message", al, ac); DO_DND_KLUDGE (message); if (list) @@ -1406,8 +1410,8 @@ Widget parent = instance->parent; Widget widget; Boolean pop_up_p = instance->pop_up_p; - char* shell_name = 0; - char* icon_name = 0; + CONST char* shell_name = 0; + CONST char* icon_name = 0; Boolean text_input_slot = False; Boolean radio_box = False; Boolean list = False;
--- a/lwlib/lwlib-internal.h Mon Aug 13 08:45:53 2007 +0200 +++ b/lwlib/lwlib-internal.h Mon Aug 13 08:46:35 2007 +0200 @@ -39,7 +39,7 @@ typedef struct _widget_creation_entry { - char* type; + CONST char* type; widget_creation_function function; } widget_creation_entry;
--- a/lwlib/lwlib.c Mon Aug 13 08:45:53 2007 +0200 +++ b/lwlib/lwlib.c Mon Aug 13 08:46:35 2007 +0200 @@ -35,7 +35,7 @@ #define alloca __builtin_alloca #endif -#if ((!__GNUC__) && !defined(__hpux)) && !defined(_AIX) && !defined (_SCO_DS) && !defined (__USLC__) +#if ((!__GNUC__) && !defined(__hpux)) && !defined(_AIX) && !defined (_SCO_DS) && !defined (__USLC__) && !defined(sinix) #include <alloca.h> #endif @@ -475,10 +475,10 @@ return (s1 && s2) ? strcmp (s1, s2) : s1 ? False : !!s2; } -static int -max (int i1, int i2) +static change_type +max (change_type i1, change_type i2) { - return i1 > i2 ? i1 : i2; + return (int)i1 > (int)i2 ? i1 : i2; }
--- a/lwlib/xlwmenu.c Mon Aug 13 08:45:53 2007 +0200 +++ b/lwlib/xlwmenu.c Mon Aug 13 08:46:35 2007 +0200 @@ -65,15 +65,15 @@ It's fair to assume that those who do have $LANG set also have the *fontList resource set, or at least know how to deal with this. */ - XtRString, "-*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-1"}, + XtRString, (String) "-*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-1"}, #else {XtNfont, XtCFont, XtRFontStruct, sizeof(XFontStruct *), - offset(menu.font),XtRString, "XtDefaultFont"}, + offset(menu.font), XtRString, "XtDefaultFont"}, #endif {XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel), - offset(menu.foreground), XtRString, "XtDefaultForeground"}, + offset(menu.foreground), XtRString, (String) "XtDefaultForeground"}, {XtNbuttonForeground, XtCButtonForeground, XtRPixel, sizeof(Pixel), - offset(menu.button_foreground), XtRString, "XtDefaultForeground"}, + offset(menu.button_foreground), XtRString, (String)"XtDefaultForeground"}, {XtNmargin, XtCMargin, XtRDimension, sizeof(Dimension), offset(menu.margin), XtRImmediate, (XtPointer)2}, {XmNmarginWidth, XmCMarginWidth, XmRHorizontalDimension, sizeof(Dimension), @@ -139,9 +139,9 @@ static XtActionsRec xlwMenuActionsList [] = { - {"start", Start}, - {"drag", Drag}, - {"select", Select}, + {(String) "start", Start}, + {(String) "drag", Drag}, + {(String) "select", Select}, }; #define SuperClass ((CoreWidgetClass)&coreClassRec) @@ -150,7 +150,7 @@ { { /* CoreClass fields initialization */ (WidgetClass) SuperClass, /* superclass */ - "XlwMenu", /* class_name */ + (String) "XlwMenu", /* class_name */ sizeof(XlwMenuRec), /* size */ XlwMenuClassInitialize, /* class_initialize */ NULL, /* class_part_initialize */ @@ -367,6 +367,7 @@ "Kill Buffer" -> "killBuffer" "Find File..." -> "findFile" "Search and Replace..." -> "searchAndReplace" + "C++ Mode Commands" -> "cppModeCommands" */ # define GOOD_CHAR(c) (((c) >= 'a' && (c) <= 'z') || \ @@ -393,12 +394,25 @@ out++; } } + else if ((unsigned char)*in == '+') + { + /* for char '+' convert to 'P', e.g for C++ to cPP */ + *out = 'P'; + in++; + out++; + } else { /* A bogus char between words; skip it. */ in++; } } + + /* Add the following define to --cflags to generate a translation + file for menu localizations */ +#ifdef PRINT_XLWMENU_RESOURCE_CONVERSIONS + printf("Emacs*XlwMenu.%s.labelString:\t%s\n", outpointer, inpointer); +#endif *out = 0; #undef GOOD_CHAR } @@ -406,7 +420,7 @@ static XtResource nameResource[] = { - { "labelString", "LabelString", XtRString, sizeof(String), + { (String) "labelString", (String) "LabelString", XtRString, sizeof(String), 0, XtRImmediate, 0 } };
--- a/lwlib/xlwmenu.h Mon Aug 13 08:45:53 2007 +0200 +++ b/lwlib/xlwmenu.h Mon Aug 13 08:46:35 2007 +0200 @@ -10,35 +10,35 @@ #include "lwlib.h" /* Resource names used by the XlwMenu widget */ -#define XtNbuttonForeground "buttonForeground" -#define XtCButtonForeground "ButtonForeground" -#define XtNmargin "margin" -#define XtNhorizontalSpacing "horizontalSpacing" -#define XtNverticalSpacing "verticalSpacing" -#define XtNarrowSpacing "arrowSpacing" -#define XtNmenu "menu" -#define XtCMenu "Menu" -#define XtNopen "open" -#define XtNselect "select" -#define XtNmenuBorderWidth "menuBorderWidth" -#define XtNhorizontal "horizontal" -#define XtCHorizontal "Horizontal" +#define XtNbuttonForeground (String) "buttonForeground" +#define XtCButtonForeground (String) "ButtonForeground" +#define XtNmargin (String) "margin" +#define XtNhorizontalSpacing (String) "horizontalSpacing" +#define XtNverticalSpacing (String) "verticalSpacing" +#define XtNarrowSpacing (String) "arrowSpacing" +#define XtNmenu (String) "menu" +#define XtCMenu (String) "Menu" +#define XtNopen (String) "open" +#define XtNselect (String) "select" +#define XtNmenuBorderWidth (String) "menuBorderWidth" +#define XtNhorizontal (String) "horizontal" +#define XtCHorizontal (String) "Horizontal" #ifndef XtNcursor -#define XtNcursor "cursor" +#define XtNcursor (String) "cursor" #endif #ifndef XtCCursor -#define XtCCursor "Cursor" +#define XtCCursor (String) "Cursor" #endif #ifndef XtNuseBackingStore -#define XtNuseBackingStore "useBackingStore" +#define XtNuseBackingStore (String) "useBackingStore" #endif #ifndef XtCUseBackingStore -#define XtCUseBackingStore "UseBackingStore" +#define XtCUseBackingStore (String) "UseBackingStore" #endif -#define XtNbounceDown "bounceDown" -#define XtCBounceDown "BounceDown" -#define XtNresourceLabels "resourceLabels" -#define XtCResourceLabels "ResourceLabels" +#define XtNbounceDown (String) "bounceDown" +#define XtCBounceDown (String) "BounceDown" +#define XtNresourceLabels (String) "resourceLabels" +#define XtCResourceLabels (String) "ResourceLabels" /* Motif-compatible resource names */ #ifndef XmNshadowThickness
--- a/lwlib/xlwscrollbar.c Mon Aug 13 08:45:53 2007 +0200 +++ b/lwlib/xlwscrollbar.c Mon Aug 13 08:46:35 2007 +0200 @@ -116,75 +116,84 @@ #define offset(field) XtOffset(XlwScrollBarWidget, field) static XtResource resources[] = { - { XmNforeground, XmCForeground, XtRPixel, sizeof(Pixel), - offset(sb.foreground), XtRImmediate, XtDefaultForeground }, + { (String) XmNforeground, (String) XmCForeground, XtRPixel, sizeof(Pixel), + offset(sb.foreground), XtRImmediate, (XtPointer) XtDefaultForeground }, + + { (String) XmNtopShadowColor, (String) XmCTopShadowColor, XtRPixel, + sizeof(Pixel), offset(sb.topShadowColor), XtRImmediate, (XtPointer) ~0 }, + { (String) XmNbottomShadowColor, (String) XmCBottomShadowColor, XtRPixel, + sizeof(Pixel), offset(sb.bottomShadowColor), XtRImmediate, + (XtPointer)~0 }, - { XmNtopShadowColor, XmCTopShadowColor, XtRPixel, sizeof(Pixel), - offset(sb.topShadowColor), XtRImmediate, (XtPointer) ~0 }, - { XmNbottomShadowColor, XmCBottomShadowColor, XtRPixel, sizeof(Pixel), - offset(sb.bottomShadowColor), XtRImmediate, (XtPointer)~0 }, + { (String) XmNtopShadowPixmap, (String) XmCTopShadowPixmap, XtRPixmap, + sizeof (Pixmap), offset(sb.topShadowPixmap), XtRImmediate, + (XtPointer)None}, + { (String) XmNbottomShadowPixmap, (String) XmCBottomShadowPixmap, + XtRPixmap, sizeof (Pixmap), offset(sb.bottomShadowPixmap), + XtRImmediate, (XtPointer)None}, - { XmNtopShadowPixmap, XmCTopShadowPixmap, XtRPixmap, sizeof (Pixmap), - offset(sb.topShadowPixmap), XtRImmediate, (XtPointer)None}, - { XmNbottomShadowPixmap, XmCBottomShadowPixmap, XtRPixmap, sizeof (Pixmap), - offset(sb.bottomShadowPixmap), XtRImmediate, (XtPointer)None}, - - { XmNtroughColor, XmCTroughColor, XtRPixel, sizeof(Pixel), + { (String)XmNtroughColor, (String)XmCTroughColor, XtRPixel, sizeof(Pixel), offset(sb.troughColor), XtRImmediate, (XtPointer)~0 }, - { XmNshadowThickness, XmCShadowThickness, XtRInt, sizeof(int), - offset(sb.shadowThickness), XtRImmediate, (XtPointer)2 }, + { (String)XmNshadowThickness, (String)XmCShadowThickness, XtRInt, + sizeof(int), offset(sb.shadowThickness), XtRImmediate, (XtPointer)2 }, - { XmNborderWidth, XmCBorderWidth, XtRDimension, sizeof(Dimension), - offset(core.border_width), XtRImmediate, (XtPointer)0 }, + { (String) XmNborderWidth, (String) XmCBorderWidth, XtRDimension, + sizeof(Dimension), offset(core.border_width), XtRImmediate, + (XtPointer)0 }, - { XmNshowArrows, XmCShowArrows, XtRBoolean, sizeof(Boolean), - offset(sb.showArrows), XtRImmediate, (XtPointer)True }, + { (String) XmNshowArrows, (String) XmCShowArrows, XtRBoolean, + sizeof(Boolean), offset(sb.showArrows), XtRImmediate, (XtPointer)True }, - { XmNinitialDelay, XmCInitialDelay, XtRInt, sizeof(int), + { (String) XmNinitialDelay, (String) XmCInitialDelay, XtRInt, sizeof(int), offset(sb.initialDelay), XtRImmediate, (XtPointer) 250 }, - { XmNrepeatDelay, XmCRepeatDelay, XtRInt, sizeof(int), + { (String) XmNrepeatDelay, (String) XmCRepeatDelay, XtRInt, sizeof(int), offset(sb.repeatDelay), XtRImmediate, (XtPointer) 50 }, - { XmNorientation, XmCOrientation, XtROrientation, sizeof(unsigned char), - offset(sb.orientation), XtRImmediate, (XtPointer) XmVERTICAL }, - + { (String) XmNorientation, (String) XmCOrientation, XtROrientation, + sizeof(unsigned char), offset(sb.orientation), XtRImmediate, + (XtPointer) XmVERTICAL }, - { XmNminimum, XmCMinimum, XtRInt, sizeof(int), + { (String) XmNminimum, (String) XmCMinimum, XtRInt, sizeof(int), offset(sb.minimum), XtRImmediate, (XtPointer) 0}, - { XmNmaximum, XmCMaximum, XtRInt, sizeof(int), + { (String) XmNmaximum, (String) XmCMaximum, XtRInt, sizeof(int), offset(sb.maximum), XtRImmediate, (XtPointer) 100}, - { XmNvalue, XmCValue, XtRInt, sizeof(int), + { (String) XmNvalue, (String) XmCValue, XtRInt, sizeof(int), offset(sb.value), XtRImmediate, (XtPointer) 0}, - { XmNsliderSize, XmCSliderSize, XtRInt, sizeof(int), + { (String) XmNsliderSize, (String) XmCSliderSize, XtRInt, sizeof(int), offset(sb.sliderSize), XtRImmediate, (XtPointer) 10}, - { XmNincrement, XmCIncrement, XtRInt, sizeof(int), + { (String) XmNincrement, (String) XmCIncrement, XtRInt, sizeof(int), offset(sb.increment), XtRImmediate, (XtPointer) 1}, - { XmNpageIncrement, XmCPageIncrement, XtRInt, sizeof(int), + { (String)XmNpageIncrement, (String)XmCPageIncrement, XtRInt, sizeof(int), offset(sb.pageIncrement), XtRImmediate, (XtPointer) 10}, - { XmNvalueChangedCallback, XmCValueChangedCallback, XtRCallback, sizeof(XtPointer), - offset(sb.valueChangedCBL), XtRCallback, NULL}, - { XmNincrementCallback, XmCIncrementCallback, XtRCallback, sizeof(XtPointer), - offset(sb.incrementCBL), XtRCallback, NULL}, - { XmNdecrementCallback, XmCDecrementCallback, XtRCallback, sizeof(XtPointer), - offset(sb.decrementCBL), XtRCallback, NULL}, - { XmNpageIncrementCallback, XmCPageIncrementCallback, XtRCallback, sizeof(XtPointer), - offset(sb.pageIncrementCBL), XtRCallback, NULL}, - { XmNpageDecrementCallback, XmCPageDecrementCallback, XtRCallback, sizeof(XtPointer), - offset(sb.pageDecrementCBL), XtRCallback, NULL}, - { XmNtoTopCallback, XmCToTopCallback, XtRCallback, sizeof(XtPointer), - offset(sb.toTopCBL), XtRCallback, NULL}, - { XmNtoBottomCallback, XmCToBottomCallback, XtRCallback, sizeof(XtPointer), - offset(sb.toBottomCBL), XtRCallback, NULL}, - { XmNdragCallback, XmCDragCallback, XtRCallback, sizeof(XtPointer), - offset(sb.dragCBL), XtRCallback, NULL}, + { (String) XmNvalueChangedCallback, (String) XmCValueChangedCallback, + XtRCallback, sizeof(XtPointer), offset(sb.valueChangedCBL), + XtRCallback, NULL}, + { (String) XmNincrementCallback, (String) XmCIncrementCallback, + XtRCallback, sizeof(XtPointer), offset(sb.incrementCBL), + XtRCallback, NULL}, + { (String) XmNdecrementCallback, (String) XmCDecrementCallback, + XtRCallback, sizeof(XtPointer), offset(sb.decrementCBL), + XtRCallback, NULL}, + { (String) XmNpageIncrementCallback, (String) XmCPageIncrementCallback, + XtRCallback, sizeof(XtPointer), offset(sb.pageIncrementCBL), + XtRCallback, NULL}, + { (String) XmNpageDecrementCallback, (String) XmCPageDecrementCallback, + XtRCallback, sizeof(XtPointer), offset(sb.pageDecrementCBL), + XtRCallback, NULL}, + { (String) XmNtoTopCallback, (String) XmCToTopCallback, XtRCallback, + sizeof(XtPointer), offset(sb.toTopCBL), XtRCallback, NULL}, + { (String) XmNtoBottomCallback, (String) XmCToBottomCallback, XtRCallback, + sizeof(XtPointer), offset(sb.toBottomCBL), XtRCallback, NULL}, + { (String) XmNdragCallback, (String) XmCDragCallback, XtRCallback, + sizeof(XtPointer), offset(sb.dragCBL), XtRCallback, NULL}, - { XmNknobStyle, XmCKnobStyle, XtRString, sizeof(char *), + { (String) XmNknobStyle, (String) XmCKnobStyle, XtRString, sizeof(char *), offset(sb.knobStyle), XtRImmediate, NULL}, - { XmNarrowPosition, XmCArrowPosition, XtRString, sizeof(char *), - offset(sb.arrowPosition), XtRImmediate, NULL}, + { (String) XmNarrowPosition, (String) XmCArrowPosition, XtRString, + sizeof(char *), offset(sb.arrowPosition), XtRImmediate, NULL}, }; /************************************************************************ @@ -225,13 +234,13 @@ ** */ static XtActionsRec actions[] = { - {"Select", Select}, - {"PageDownOrRight", PageDownOrRight}, - {"PageUpOrLeft", PageUpOrLeft}, - {"Drag", Drag}, - {"Release", Release}, - {"Jump", Jump}, - {"Abort", Abort}, + {(String) "Select", Select}, + {(String) "PageDownOrRight", PageDownOrRight}, + {(String) "PageUpOrLeft", PageUpOrLeft}, + {(String) "Drag", Drag}, + {(String) "Release", Release}, + {(String) "Jump", Jump}, + {(String) "Abort", Abort}, }; /************************************************************************ @@ -258,7 +267,7 @@ /* core_class fields */ { /* superclass */ (WidgetClass) &coreClassRec, - /* class_name */ "XlwScrollBar", + /* class_name */ (String) "XlwScrollBar", /* widget_size */ sizeof(XlwScrollBarRec), /* class_initialize */ NULL, /* class_part_init */ NULL,
--- a/man/Makefile Mon Aug 13 08:45:53 2007 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -SHELL = /bin/sh -CC=gcc -CFLAGS=-bi486-linuxaout -O4 -m486 -malign-functions=2 -malign-jumps=2 -malign-loops=2 -YACC=bison -y -version=19.14 -configuration=i486-unknown-linux2.0.0 -prefix=/usr/local -exec_prefix=${prefix} -bindir=${exec_prefix}/bin -libdir=${exec_prefix}/lib -srcdir=/m/xemacs-19.14/man - -VPATH=/m/xemacs-19.14/man -LOADLIBES= -L/usr/i486-linuxaout -L/lib-aout -L/m/xpm-3.4h/lib -lgcc -lc -lgcc /usr/lib/crtn.o -CPPFLAGS= -ALL_CFLAGS = -I/usr/i486-linuxaout/include -I/m/xpm-3.4h/lib -DFUNCPROTO=11 -DNARROWPROTO -D_BSD_SOURCE -Demacs -DHAVE_CONFIG_H -DHAVE_STDARG_H -DHAVE_STRING_H -DHAVE_ALLOCA_H -Dxfree=free -I. -I../src -I${srcdir} -I${srcdir}/../src ${CFLAGS} -CPP_CFLAGS = -I/usr/i486-linuxaout/include -I/m/xpm-3.4h/lib -DFUNCPROTO=11 -DNARROWPROTO -D_BSD_SOURCE -Demacs -DHAVE_CONFIG_H -DHAVE_STDARG_H -DHAVE_STRING_H -DHAVE_ALLOCA_H -Dxfree=free -I. -I../src -I${srcdir} -I${srcdir}/../src ${CPPFLAGS} ${CFLAGS} -OBJS = makeinfo.o getopt.o getopt1.o alloca.o -SUBDIR = xemacs lispref new-users-guide internals -SUBDIR_MAKEFILES = xemacs/Makefile lispref/Makefile new-users-guide/Makefile internals/Makefile -.c.o: - ${CC} -c ${CPP_CFLAGS} $< -../info/%.info : %.texi - -./makeinfo -o $@ $< -srcs = ange-ftp cc-mode cl dired ediff external-widget forms gnus hyperbole ilisp info internals ispell mailcrypt message mh-e oo-browser pcl-cvs psgml rmail standards supercite term termcap texinfo viper vm w3 xemacs-faq -info = $(srcs:%=../info/%.info) -all : ${SUBDIR} $(info) -.RECURSIVE: ${SUBDIR} -xemacs: FRC.xemacs -lispref: FRC.lispref -new-users-guide: FRC.new-users-guide -internals: FRC.internals -${SUBDIR}: ${SUBDIR_MAKEFILES} makeinfo FRC - cd $@ && $(MAKE) all $(MFLAGS) CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' -makeinfo: ../src/config.h $(OBJS) - $(CC) -o makeinfo $(OBJS) -texindex: texindex.o - $(CC) -o texindex texindex.o -alloca.c : - [ -h alloca.c ] || ln -s ../src/alloca.c . -getopt.h : - [ -h getopt.h ] || ln -s ../lib-src/getopt.h . -getopt.c : - [ -h getopt.c ] || ln -s ../lib-src/getopt.c . -getopt1.c : - [ -h getopt1.c ] || ln -s ../lib-src/getopt1.c . -mostlyclean: clean - (cd xemacs && $(MAKE) $(MFLAGS) mostlyclean) - (cd lispref && $(MAKE) $(MFLAGS) mostlyclean) - (cd new-users-guide && $(MAKE) $(MFLAGS) mostlyclean) - (cd internals && $(MAKE) $(MFLAGS) mostlyclean) -clean: - rm -f *.dvi - rm -f getopt1.c getopt.c getopt.h alloca.c makeinfo texindex - rm -f *.toc *.aux *.log *.cp *.fn *.ky *.pg *.vr *.o core -distclean: mostlyclean - (cd xemacs && $(MAKE) $(MFLAGS) distclean) - (cd lispref && $(MAKE) $(MFLAGS) distclean) - (cd new-users-guide && $(MAKE) $(MFLAGS) distclean) - (cd internals && $(MAKE) $(MFLAGS) distclean) - rm -f Makefile Makefile.in -realclean: distclean - (cd xemacs && $(MAKE) $(MFLAGS) realclean) - (cd lispref && $(MAKE) $(MFLAGS) realclean) - (cd new-users-guide && $(MAKE) $(MFLAGS) realclean) - (cd internals && $(MAKE) $(MFLAGS) realclean) -extraclean: distclean - (cd xemacs && $(MAKE) $(MFLAGS) extraclean) - (cd lispref && $(MAKE) $(MFLAGS) extraclean) - (cd new-users-guide && $(MAKE) $(MFLAGS) extraclean) - (cd internals && $(MAKE) $(MFLAGS) extraclean) - -rm -f *~ \#* -makeinfo.o : getopt.h -getopt.o : getopt.h -getopt1.o : getopt.h -texindex.o : getopt.h -FRC FRC.xemacs FRC.lispref FRC.new-users-guide FRC.internals:
--- a/man/Makefile.in Mon Aug 13 08:45:53 2007 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,212 +0,0 @@ -# Generated automatically from Makefile.in.in by configure. -/* Makefile for man subdirectory in XEmacs - Copyright (C) 1995 Board of Trustees, University of Illinois - Copyright (C) 1994, 1995 Sun Microsystems. - -This file is part of XEmacs. - -XEmacs 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. - -XEmacs 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 XEmacs; see the file COPYING. If not, write to the Free -Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -/* Avoid trouble on systems where the `SHELL' variable might be - inherited from the environment. */ -SHELL = /bin/sh - -/* Some people use these in paths they define. We don't want their paths - getting changed on them. */ -#undef sparc -#undef sun -#undef unix -#undef i386 -#undef ppc -#undef sgi - -/* ==================== Things `configure' will edit ==================== */ - -CC=gcc -CFLAGS=-bi486-linuxaout -O4 -m486 -malign-functions=2 -malign-jumps=2 -malign-loops=2 -YACC=bison -y -version=19.14 -configuration=i486-unknown-linux2.0.0 - -/* ==================== Where To Install Things ==================== */ - -/* The default location for installation. Everything is placed in - subdirectories of this directory. The default values for many of - the variables below are expressed in terms of this one, so you may - not need to change them. This is set with the --prefix option to - `../configure'. */ -prefix=/usr/local - -/* Like `prefix', but used for architecture-specific files. This is - set with the --exec-prefix option to `../configure'. */ -exec_prefix=${prefix} - -/* Where to install Emacs and other binaries that people will want to - run directly (like etags). This is set with the --bindir option - to `../configure'. */ -bindir=${exec_prefix}/bin - -/* Where to install and expect executable files to be run by Emacs - rather than directly by users, and other architecture-dependent - data. ${archlibdir} is usually below this. This is set with the - --libdir option to `../configure'. */ -libdir=${exec_prefix}/lib - -/* Where to find the source code. This is set by the configure - script's `--srcdir' option. However, the value of ${srcdir} in - this makefile is not identical to what was specified with --srcdir, - since the variable here has `/man' added at the end. */ -srcdir=/m/xemacs-19.14/man - -/* ============================= Targets ============================== */ - -#define NO_SHORTNAMES -#define THIS_IS_YMAKEFILE -#define NOT_C_CODE -#include "../src/config.h" - -/* With the traditional VPATH setting, it is not possible to - simultaneously compile in-place and in another directory. The - mistaken definition is that *all* dependencies are searched for in - the VPATH directory, rather than just the dependencies that are not - themselves targets. Thus, if there is an up-to-date .o file in the - in-place location, it will not get recompiled in the not-in-place - location. - - The GNU Make `vpath' directive continues this tradition, but at - least lets you restrict the classes of files that it applies to. - This allows us to kludge around the problem. */ -#ifdef USE_GNU_MAKE -vpath %.c /m/xemacs-19.14/man -vpath %.h /m/xemacs-19.14/man -/* now list files that should NOT be searched in the srcdir. - This includes any .c or .h that's built from something else - (e.g. a .in file). */ -/* none here */ -#else -VPATH=/m/xemacs-19.14/man -#endif - -#ifndef C_SWITCH_SYSTEM -#define C_SWITCH_SYSTEM -#endif - -#ifndef C_SWITCH_SITE -#define C_SWITCH_SITE -#endif - -#ifndef LD_SWITCH_SITE -#define LD_SWITCH_SITE -#endif - -LOADLIBES=LD_SWITCH_SITE -lgcc -lc -lgcc /usr/lib/crtn.o - -CPPFLAGS= - -ALL_CFLAGS = C_SWITCH_SITE C_SWITCH_SYSTEM -Demacs -DHAVE_CONFIG_H \ - -DHAVE_STDARG_H -DHAVE_STRING_H -DHAVE_ALLOCA_H -Dxfree=free \ - -I. -I../src -I${srcdir} -I${srcdir}/../src ${CFLAGS} -CPP_CFLAGS = C_SWITCH_SITE C_SWITCH_SYSTEM -Demacs -DHAVE_CONFIG_H \ - -DHAVE_STDARG_H -DHAVE_STRING_H -DHAVE_ALLOCA_H -Dxfree=free \ - -I. -I../src -I${srcdir} -I${srcdir}/../src ${CPPFLAGS} ${CFLAGS} -OBJS = makeinfo.o getopt.o getopt1.o alloca.o - -/* Subdirectories to make recursively. */ -SUBDIR = xemacs lispref new-users-guide internals - -/* The makefiles of the directories in $SUBDIR. */ -SUBDIR_MAKEFILES = xemacs/Makefile lispref/Makefile new-users-guide/Makefile internals/Makefile - -.c.o: - ${CC} -c ${CPP_CFLAGS} $< - -../info/%.info : %.texi - -./makeinfo -o $@ $< - -srcs = ange-ftp cc-mode cl dired ediff external-widget forms gnus \ - hyperbole ilisp info internals ispell mailcrypt message mh-e \ - oo-browser pcl-cvs psgml rmail standards supercite term termcap \ - texinfo viper vm w3 xemacs-faq - -info = $(srcs:%=../info/%.info) - -all : ${SUBDIR} $(info) - -.RECURSIVE: ${SUBDIR} - -xemacs: FRC.xemacs -lispref: FRC.lispref -new-users-guide: FRC.new-users-guide -internals: FRC.internals - -${SUBDIR}: ${SUBDIR_MAKEFILES} makeinfo FRC - cd $@ && $(MAKE) all $(MFLAGS) \ - CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' - -makeinfo: ../src/config.h $(OBJS) - $(CC) -o makeinfo $(OBJS) - -texindex: texindex.o - $(CC) -o texindex texindex.o - -alloca.c : - [ -h alloca.c ] || ln -s ../src/alloca.c . - -getopt.h : - [ -h getopt.h ] || ln -s ../lib-src/getopt.h . - -getopt.c : - [ -h getopt.c ] || ln -s ../lib-src/getopt.c . - -getopt1.c : - [ -h getopt1.c ] || ln -s ../lib-src/getopt1.c . - -mostlyclean: clean - (cd xemacs && $(MAKE) $(MFLAGS) mostlyclean) - (cd lispref && $(MAKE) $(MFLAGS) mostlyclean) - (cd new-users-guide && $(MAKE) $(MFLAGS) mostlyclean) - (cd internals && $(MAKE) $(MFLAGS) mostlyclean) - -clean: - rm -f *.dvi - rm -f getopt1.c getopt.c getopt.h alloca.c makeinfo texindex - rm -f *.toc *.aux *.log *.cp *.fn *.ky *.pg *.vr *.o core - -/* These are needed because they are present in the other makefiles. */ -distclean: mostlyclean - (cd xemacs && $(MAKE) $(MFLAGS) distclean) - (cd lispref && $(MAKE) $(MFLAGS) distclean) - (cd new-users-guide && $(MAKE) $(MFLAGS) distclean) - (cd internals && $(MAKE) $(MFLAGS) distclean) - rm -f Makefile Makefile.in -realclean: distclean - (cd xemacs && $(MAKE) $(MFLAGS) realclean) - (cd lispref && $(MAKE) $(MFLAGS) realclean) - (cd new-users-guide && $(MAKE) $(MFLAGS) realclean) - (cd internals && $(MAKE) $(MFLAGS) realclean) -extraclean: distclean - (cd xemacs && $(MAKE) $(MFLAGS) extraclean) - (cd lispref && $(MAKE) $(MFLAGS) extraclean) - (cd new-users-guide && $(MAKE) $(MFLAGS) extraclean) - (cd internals && $(MAKE) $(MFLAGS) extraclean) - -rm -f *~ \#* - -makeinfo.o : getopt.h -getopt.o : getopt.h -getopt1.o : getopt.h -texindex.o : getopt.h - -FRC FRC.xemacs FRC.lispref FRC.new-users-guide FRC.internals: -
--- a/man/Makefile.in.in Mon Aug 13 08:45:53 2007 +0200 +++ b/man/Makefile.in.in Mon Aug 13 08:46:35 2007 +0200 @@ -136,8 +136,8 @@ srcs = ange-ftp cc-mode cl dired ediff external-widget forms gnus \ hyperbole ilisp info internals ispell mailcrypt message mh-e \ - oo-browser pcl-cvs psgml rmail standards supercite term termcap \ - texinfo viper vm w3 xemacs-faq + oo-browser pcl-cvs psgml psgml-api rmail standards supercite term \ + termcap texinfo viper vm w3 xemacs-faq info = $(srcs:%=../info/%.info)
--- a/man/ange-ftp.texi Mon Aug 13 08:45:53 2007 +0200 +++ b/man/ange-ftp.texi Mon Aug 13 08:46:35 2007 +0200 @@ -519,7 +519,7 @@ @code{ange-ftp-dumb-unix-host-regexp}: The FTP servers on some machines have problems if the @code{ls} command is used. The usual indication that something is wrong is when ange-ftp erroneously thinks that a directory -is just a plain file. The routine @code{ange-ftp-add-dumb-unix-host} can can +is just a plain file. The routine @code{ange-ftp-add-dumb-unix-host} can be called to tell ange-ftp to limit itself to the @code{DIR} command and not @code{ls} for a given host (but this change will take effect for the current GNU Emacs session only). If a large number of machines with @@ -576,7 +576,7 @@ @vindex ange-ftp-make-backup-files @cindex backup files -@code{ange-ftp-path-format}: This variable dictates the the format of a +@code{ange-ftp-path-format}: This variable dictates the format of a fully expanded remote pathname. This is a cons @code{(REGEXP . (HOST USER PATH))}, where @code{REGEXP} is a regular expression matching the full remote pathname, and @code{HOST}, @code{USER}, and @code{PATH} are @@ -761,7 +761,7 @@ executing @code{revert-buffer} @pindex revert-buffer with a prefix argument (@kbd{C-u g} in the Dired buffer) -will force a refresh of both the the buffer @emph{and also ange-ftp's +will force a refresh of both the buffer @emph{and also ange-ftp's internal cache}. If you find that filename completion isn't working on a @cindex filename completion file that you @emph{know} is there, this is how to fix the problem. @@ -1025,7 +1025,7 @@ if you use a VMS host regularly, it's a good idea to set @code{ange-ftp-vms-host-regexp} to a regular expression matching that @vindex ange-ftp-vms-host-regexp -host's name. For instance, if use use @code{ymir.claremont.edu} a lot, +host's name. For instance, if you use @code{ymir.claremont.edu} a lot, place the following in your .emacs: @example (setq ange-ftp-vms-host-regexp "^ymir.claremont.edu$")
--- a/man/br-design.texi Mon Aug 13 08:45:53 2007 +0200 +++ b/man/br-design.texi Mon Aug 13 08:46:35 2007 +0200 @@ -124,7 +124,7 @@ demonstration of the generality of the concept. The road from prototype to a professional tool required a good amount -of work over an extended period as as an independent project. Browser +of work over an extended period as an independent project. Browser performance, structure and features were improved throughout this period. A number of new languages were also added and all of these were integrated via a single common kernel. A complete user manual was
--- a/man/cc-mode.texi Mon Aug 13 08:45:53 2007 +0200 +++ b/man/cc-mode.texi Mon Aug 13 08:46:35 2007 +0200 @@ -17,12 +17,12 @@ @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @comment @comment texinfo manual for @file{cc-mode.el} version 4 -@comment manual version: 2.35 +@comment manual version: 2.55 @comment generated from the original README file by Krishna Padmasola @comment <krishna@earth-gw.njit.edu> @comment @comment Barry A. Warsaw <bwarsaw@cnri.reston.va.us> -@comment Last modification: 1996/01/19 20:50:48 +@comment Last modification: 1996/08/21 19:29:16 @comment @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -33,7 +33,7 @@ @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @ifinfo -Copyright @copyright{} 1995 Free Software Foundation, Inc. +Copyright @copyright{} 1995, 1996 Free Software Foundation, Inc. @end ifinfo @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -50,8 +50,8 @@ @center @titlefont{CC-MODE Version 4} @sp 2 -@center A GNU Emacs mode for editing C, C++, and Objective-C code. -@center (manual revision: 2.35) +@center A GNU Emacs mode for editing C, C++, Objective-C, and Java code. +@center (manual revision: 2.55) @sp 2 @center Barry A. Warsaw @@ -84,14 +84,13 @@ * Getting Connected:: * New Indentation Engine:: * Minor Modes:: -* Indentation Commands:: +* Commands:: * Customizing Indentation:: * Syntactic Symbols:: * Performance Issues:: * Frequently Asked Questions:: * Getting the latest cc-mode release:: * Sample .emacs File:: -* Requirements:: * Limitations and Known Bugs:: * Mailing Lists and Submitting Bug Reports:: * Concept Index:: @@ -123,7 +122,10 @@ @dfn{ARM} @footnote{i.e. ``The Annotated C++ Reference Manual'', by Ellis and Stroustrup.} C++, Objective-C, and Java files. In this way, you can easily set up consistent coding styles for use in editing all C, -C++, Objective-C, and Java programs. +C++, Objective-C, and Java programs. @code{cc-mode} does @emph{not} +handle font-locking (a.k.a. syntax coloring, keyword highlighting) or +anything of that nature, for any of the 4 modes. Those are handled by +other Emacs packages. This manual will describe the following: @@ -143,34 +145,35 @@ refer to the package as @code{cc-mode}, but there really is no top level @code{cc-mode} entry point. I call it @code{cc-mode} simply to differentiate it from @file{c-mode.el}. All of the variables, commands, -and functions in @code{cc-mode} are prefixed with @code{c-<thing>}, and -@code{c-mode}, @code{c++-mode}, @code{objc-mode}, and @code{java-mode} -entry points are provided. This file is intended to be a replacement -for @file{c-mode.el} and @file{c++-mode.el}. +and functions in @code{cc-mode} are prefixed with +@code{c-@var{<thing>}}, and @code{c-mode}, @code{c++-mode}, +@code{objc-mode}, and @code{java-mode} entry points are provided. This +file is intended to be a replacement for @file{c-mode.el} and +@file{c++-mode.el}. @findex c-version The major version number was incremented to 4 with the addition of @code{objc-mode}. To find the minor revision number of this release, use -@kbd{M-x c-version RET}. Work has already begun on @code{cc-mode} -version 5, in which Emacs 18 will not be supported. - -As of this writing (19-Jan-1996), both Emacs 19.30 and XEmacs 19.13 are -distributed with @code{cc-mode}. Emacs 19.31 and XEmacs 19.14 will both -contain the latest version of cc-mode when it is released. If you are -running older versions of these Emacsen, you may want to upgrade your -copy of @code{cc-mode}. See @ref{Getting the latest cc-mode release}. +@kbd{M-x c-version RET}. + +As of this writing (20-Aug-1996), both Emacs 19.33 and XEmacs 19.14 are +distributed with @code{cc-mode}, however neither have the very latest +version. In all likelihood, Emacs 19.34 and XEmacs 19.15 will contain +the latest version of @code{cc-mode}. You may therefore, want to +upgrade your copy of @code{cc-mode}. See @ref{Getting the latest +cc-mode release}. @cindex @file{cc-compat.el} file -This distribution also contains a file called @file{cc-compat.el} -which should ease your transition from BOCM to @code{cc-mode}. It -currently comes unguaranteed and unsupported, but this may change for -future versions. +This distribution also contains a file called @file{cc-compat.el} which +should ease your transition from BOCM to @code{cc-mode}. It currently +comes unguaranteed and unsupported, but this may change for future +versions. If you have a BOCM configuration you are really happy with, +and want to postpone learning how to configure @code{cc-mode}, take a +look at that file. It maps BOCM configuration variables to +@code{cc-mode}'s new indentation model. A special word of thanks goes to Krishna Padmasola for his work in converting the original @file{README} file to texinfo format. -@code{cc-mode} users have been clamoring for a manual for a long time, -and thanks to Krishna, it is now available <clap> <clap> <clap>! -@code{:-)} @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -183,17 +186,18 @@ @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @file{cc-mode.el} works well with the 2 main branches of Emacs 19: -XEmacs and the Emacs 19 maintained by the FSF. Emacs 19 users will want -to use Emacs version 19.21 or better, XEmacs users will want 19.6 or -better. Earlier versions of these Emacsen have deficiencies and/or bugs -which will adversely affect the performance and usability of -@code{cc-mode}. +XEmacs, maintained by @code{xemacs.org} and the Emacs 19 maintained by +the Free Software Foundation. Emacs 19 users will want to use Emacs +version 19.21 or better, XEmacs users will want 19.6 or better. Earlier +versions of these Emacsen have deficiencies and/or bugs which will +adversely affect the performance and usability of @code{cc-mode}. You +are better off just getting the latest version of Emacs or XEmacs. @cindex @file{cc-mode-18.el} file -Similarly if you use the @file{cc-mode-18.el} compatibility file, -@file{cc-mode.el} will work with Emacs 18, but only moderately well. A +@file{cc-mode.el} will work with Emacs 18 if you use the +@file{cc-mode-18.el} compatibility file, but only moderately well. A word of warning though, @emph{Emacs 18 lacks some fundamental -functionality and that ultimately means using Emacs 18 is a losing +functionality and ultimately, using Emacs 18 is a losing battle}. Hence @code{cc-mode} under Emacs 18 is no longer supported and it is highly recommended that you upgrade to Emacs 19. If you use @code{cc-mode} under Emacs 18, you're on your own. With @code{cc-mode} @@ -201,7 +205,9 @@ Note that as of XEmacs 19.13 and Emacs 19.30, your Emacs already comes with @code{cc-mode} version 4 preconfigured for your use. You should be -able to safely skip the rest of the setup information in this chapter. +able to safely skip the rest of the setup information in this chapter, +unless you want to install the latest version of @code{cc-mode} into one +of these Emacsen. @cindex @file{.emacs} file The first thing you will want to do is put @file{cc-mode.el} somewhere @@ -290,7 +296,7 @@ @end example Alternatively, if you want to make sure @code{cc-mode} is loaded when -Emacs starts up, you could use this line instead of the three autoloads +Emacs starts up, you could use this line instead of the autoloads above: @example @@ -299,12 +305,12 @@ @end example Next, you will want to set up Emacs so that it edits C files in -@code{c-mode}, C++ files in @code{c++-mode}, and Objective-C files in -@code{objc-mode}. All users should add the following to their -@file{.emacs} file. Note that this assumes you'll be editing @code{.h} -and @code{.c} files as C, @code{.hh}, @code{.cc}, @code{.H}, and -@code{.C} files as C++, @code{.m} files as Objective-C, and @code{.java} -files as Java code. YMMV: +@code{c-mode}, C++ files in @code{c++-mode}, Objective-C files in +@code{objc-mode}, and Java files in @code{java-mode}. You should +add the following to your @file{.emacs} file, which assumes +you'll be editing @code{.h} and @code{.c} files as C, @code{.hh}, +@code{.cc}, @code{.H}, and @code{.C} files as C++, @code{.m} files as +Objective-C, and @code{.java} files as Java code. YMMV: @example @group @@ -326,7 +332,7 @@ You may already have some or all of these settings on your @code{auto-mode-alist}, but it won't hurt to put them on there again. -That's all you need -- I know, I know, it sounds like a lot @code{:-)}, +That's all you need --- I know, I know, it sounds like a lot @code{:-)}, but after you've done all this, you should only need to quit and restart Emacs. The next time you visit a C, C++, Objective-C, or Java file you should be using @code{cc-mode}. You can check this easily by hitting @@ -341,23 +347,16 @@ @end example @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - -@menu -* Syntactic Analysis:: -* Indentation Calculation:: -@end menu - @node New Indentation Engine, Minor Modes, Getting Connected, Top @comment node-name, next, previous,up @chapter New Indentation Engine @cindex New Indentation Engine - @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @code{cc-mode} has a new indentation engine, providing a simplified, yet flexible and general mechanism for customizing indentation. It breaks -indentation calculation into two steps. First for the line of code being +indentation calculation into two steps. First, for the line of code being indented, @code{cc-mode} analyzes what kind of language construct it's looking at, then it applies user defined offsets to the current line based on this analysis. @@ -367,12 +366,11 @@ being used so that you will know how to customize @code{cc-mode} for your personal coding style. -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @menu * Syntactic Analysis:: * Indentation Calculation:: @end menu -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @node Syntactic Analysis, Indentation Calculation, , New Indentation Engine @@ -429,7 +427,10 @@ We can use the command @kbd{C-c C-s} (@code{c-show-syntactic-information}) to simply report what the syntactic analysis is for the current line. Running this command on -line 4 this example, we'd see in the echo area: +line 4 this example, we'd see in the echo area@footnote{With a universal +argument (i.e. @kbd{C-u C-c C-s}) the analysis is inserted into the +buffer as a comment +on the current line.}: @example ((statement . 35)) @@ -438,7 +439,7 @@ This tells us that the line is a statement and it is indented relative to buffer position 35, which happens to be the @samp{i} in @code{int} on -line 3. If you were to move point to line 3 and hit @kbd{C-c C-s}, you +line 3. If you were to move Point to line 3 and hit @kbd{C-c C-s}, you would see: @example @@ -504,7 +505,7 @@ @end example @noindent -Hitting @kbd{C-c C-s} on line 3 of example 3 gives us: +Hitting @kbd{C-c C-s} on line 3 of this example gives: @example ((comment-intro) (defun-block-intro . 46)) @@ -512,7 +513,7 @@ @end example @noindent -so you can see that the syntactic component list contains two syntactic +and you can see that the syntactic component list contains two syntactic components. Also notice that the first component, @samp{(comment-intro)} has no relative buffer position. @@ -533,7 +534,7 @@ First, the syntactic symbols are looked up in the @code{c-offsets-alist} variable, which is an association list of syntactic symbols and the -offsets to apply for those symbols. These offsets are added to the +offsets to apply for those symbols. These offsets are added to a running total. Second, if the component has a relative buffer position, @code{cc-mode} @@ -557,7 +558,7 @@ @end example @kindex TAB -Let's say point is on line 3 and we hit the @key{TAB} key to re-indent +Let's say Point is on line 3 and we hit the @key{TAB} key to re-indent the line. Remember that the syntactic component list for that line is: @example @@ -573,7 +574,7 @@ running total indentation of 4 spaces. Next @code{cc-mode} goes to buffer position 29 and asks for the current -column. Since the brace at buffer position 29 is in column zero, it +column. This brace is in column zero, so @code{cc-mode} adds @samp{0} to the running total. Since there is only one syntactic component on the list for this line, indentation calculation is complete, and the total indentation for the line @@ -628,7 +629,7 @@ @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Minor Modes, Indentation Commands, New Indentation Engine, Top +@node Minor Modes, Commands, New Indentation Engine, Top @comment node-name, next, previous,up @chapter Minor Modes @@ -639,17 +640,16 @@ find useful while you enter new C code. The first is called @dfn{auto-newline} mode, and the second is called @dfn{hungry-delete} mode. These minor modes can be toggled on and off independently, and -@code{cc-mode} can be configured so that it comes up with any +@code{cc-mode} can be configured so that it starts up with any combination of these minor modes. By default, both of these minor modes are turned off. The state of the minor modes is always reflected in the minor mode list on the modeline of the @code{cc-mode} buffer. When auto-newline mode is enabled, you will see @samp{C/a} on the mode line @footnote{Remember -that the @samp{C} would be replaced with @samp{C++} or @samp{ObjC} if -you were editing C++ or Objective-C code.}. When hungry delete mode is -enabled you would see @samp{C/h} and when both modes are enabled, you'd -see @samp{C/ah}. +that the @samp{C} could be replaced with @samp{C++}, @samp{ObjC}, or +@samp{Java}.}. When hungry delete mode is enabled you would see +@samp{C/h} and when both modes are enabled, you'd see @samp{C/ah}. @kindex C-c C-a @kindex C-c C-d @@ -661,12 +661,12 @@ @findex toggle-auto-state (c-) @findex toggle-auto-hungry-state (c-) @code{cc-mode} provides keybindings which allow you to toggle the minor -modes while editing code on the fly. To toggle just the auto-newline +modes on the fly while editing code. To toggle just the auto-newline state, hit @kbd{C-c C-a} (@code{c-toggle-auto-state}). When you do this, you should see the @samp{a} indicator either appear or disappear on the modeline. Similarly, to toggle just the hungry-delete state, use -@kbd{C-c C-d} (@code{c-toggle-hungry-state}), and to toggle both states -together, use @kbd{C-c C-t} (@code{c-toggle-auto-hungry-state}). +@kbd{C-c C-d} (@code{c-toggle-hungry-state}), and to toggle both states, +use @kbd{C-c C-t} (@code{c-toggle-auto-hungry-state}). To set up the auto-newline and hungry-delete states to your preferred values, you would need to add some lisp to your @file{.emacs} file that @@ -764,7 +764,7 @@ add various newlines before and/or after the typed brace. Re-indentation occurs automatically whenever the electric behavior is enabled. If the brace ends up on a line other than the one it was typed -on, then that line is on is also indented according to +on, then that line is also indented according to @code{c-offsets-alist}. @cindex class-open syntactic symbol @@ -781,6 +781,8 @@ @cindex block-close syntactic symbol @cindex substatement-open syntactic symbol @cindex statement-case-open syntactic symbol +@cindex extern-lang-open syntactic symbol +@cindex extern-lang-close syntactic symbol The insertion of newlines is controlled by the @code{c-hanging-braces-alist} variable. This variable contains a @@ -790,8 +792,10 @@ @code{defun-close}, @code{inline-open}, @code{inline-close}, @code{brace-list-open}, @code{brace-list-close}, @code{brace-list-intro}, @code{brace-list-entry}, @code{block-open}, -@code{block-close}, @code{substatement-open}, and -@code{statement-case-open}. @xref{Syntactic Symbols} for a more +@code{block-close}, @code{substatement-open}, +@code{statement-case-open}, +@code{extern-lang-open}, and @code{extern-lang-close}. +@xref{Syntactic Symbols} for a more detailed description of these syntactic symbols. @cindex custom indentation function @@ -800,8 +804,8 @@ @xref{Custom Brace and Colon Hanging} for a more detailed discussion of using a function as a brace hanging @var{ACTION}. -When @var{ACTION} is a list, it can contain any combination of the -symbols @code{before} or @code{after}, directing @code{cc-mode} where to +When the @var{ACTION} is a list, it can contain any combination of the +symbols @code{before} and @code{after}, directing @code{cc-mode} where to put newlines in relationship to the brace being inserted. Thus, if the list contains only the symbol @code{after}, then the brace is said to @dfn{hang} on the right side of the line, as in: @@ -830,7 +834,8 @@ (defvar c-hanging-braces-alist '((brace-list-open) (substatement-open after) - (block-close . c-snug-do-while))) + (block-close . c-snug-do-while) + (extern-lang-open after))) @end group @end example @@ -838,10 +843,10 @@ @noindent which says that @code{brace-list-open} braces should both hang on the right side, and allow subsequent text to follow on the same line as the -brace. Also, @code{substatement-open} braces should hang on the right -side, but subsequent text should follow on the next line. Here, in the -@code{block-close} entry, you also see an example of using a function as -an @var{ACTION}. +brace. Also, @code{substatement-open} and @code{extern-lang-open} +braces should hang on the right side, but subsequent text should follow +on the next line. Here, in the @code{block-close} entry, you also see +an example of using a function as an @var{ACTION}. @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -859,9 +864,9 @@ @code{c-hanging-colons-alist}. The syntactic symbols appropriate for this assocation list are: @code{case-label}, @code{label}, @code{access-label}, @code{member-init-intro}, and @code{inher-intro}. -@xref{Hanging Braces} and @ref{Custom Brace and Colon Hanging} for -details. Note however, that @code{c-hanging-colons-alist} does not -implement functions as @var{ACTION}s. +Note however, that for @code{c-hanging-colons-alist} @var{ACTION}s as +functions are not supported. See also @ref{Custom Brace and Colon +Hanging} for details. @cindex clean-ups In C++, double-colons are used as a scope operator but because these @@ -900,8 +905,8 @@ @vindex electric-pound-behavior (c-) @vindex c-offsets-alist @vindex offsets-alist (c-) -A few other keys also provide electric behavior. For example the -@kbd{#} key (@code{c-electric-pound}) is electric when it is typed as +A few other keys also provide electric behavior. For example +@kbd{#} (@code{c-electric-pound}) is electric when typed as the first non-whitespace character on a line. In this case, the variable @code{c-electric-pound-behavior} is consulted for the electric behavior. This variable takes a list value, although the only element @@ -914,7 +919,8 @@ @findex electric-star (c-) @findex electric-slash (c-) @cindex comment-only line -Stars and slashes (i.e. @kbd{*} and @kbd{/}) are also electric under +Stars and slashes (i.e. @kbd{*} and @kbd{/}, @code{c-electric-star} and +@code{c-electric-slash} respectively) are also electric under certain circumstances. If a star is inserted as the second character of a C style block comment on a @dfn{comment-only} line, then the comment delimiter is indented as defined by @code{c-offsets-alist}. A @@ -939,6 +945,14 @@ comment (also only on a comment-only line), then the line is indented as defined by @code{c-offsets-alist}. +@findex c-electric-lt-gt +@findex electric-lt-gt (c-) +@kindex < +@kindex > +Less-than and greater-than signs (@code{c-electric-lt-gt}) are also +electric, but only in C++ mode. Hitting the second of two @kbd{<} or +@kbd{>} keys re-indents the line if it is a C++ style stream operator. + @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @node Clean-ups, , Other electric commands, Auto-newline insertion @@ -972,7 +986,7 @@ @itemize @bullet @item -@code{brace-else-brace} -- cleans up @samp{@} else @{} constructs by +@code{brace-else-brace} --- cleans up @samp{@} else @{} constructs by placing the entire construct on a single line. Clean-up occurs when the open brace after the @samp{else} is typed. So for example, this: @example @@ -1004,7 +1018,7 @@ @end example @item -@code{empty-defun-braces} -- cleans up braces following a top-level +@code{empty-defun-braces} --- cleans up braces following a top-level function or class definition that contains no body. Clean up occurs when the closing brace is typed. Thus the following: @example @@ -1028,7 +1042,7 @@ @end example @item -@code{defun-close-semi} -- cleans up the terminating semi-colon on +@code{defun-close-semi} --- cleans up the terminating semi-colon on top-level function or class definitions when they follow a close brace. Clean up occurs when the semi-colon is typed. So for example, the following: @@ -1056,11 +1070,11 @@ @end example @item -@code{list-close-comma} -- cleans up commas following braces in array +@code{list-close-comma} --- cleans up commas following braces in array and aggregate initializers. Clean up occurs when the comma is typed. @item -@code{scope-operator} -- cleans up double colons which may designate a +@code{scope-operator} --- cleans up double colons which may designate a C++ scope operator split across multiple lines@footnote{Certain C++ constructs introduce ambiguous situations, so @code{scope-operator} clean-ups may not always be correct. This usually only occurs when @@ -1108,19 +1122,32 @@ @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Indentation Commands, Customizing Indentation, Minor Modes, Top +@node Commands, Customizing Indentation, Minor Modes, Top @comment node-name, next, previous,up -@chapter Indentation Commands +@chapter Commands +@cindex Commands +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +@menu +* Indentation Commands:: +* Other Commands:: +@end menu + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@node Indentation Commands, Other Commands, , Commands +@comment node-name, next, previous,up + +@section Indentation Commands @cindex Indentation Commands @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @findex c-set-style @findex set-style (c-) Various commands are provided which allow you to conveniently re-indent -C constructs, and these are outlined below. There are several things to +C constructs. There are several things to note about these indentation commands. First, when you -change your programming style, either though @code{c-set-style} or some +change your programming style, either interactively or through some other means, your file does @emph{not} automatically get re-indented. When you change style parameters, you will typically need to reformat the line, expression, or buffer to see the effects of your changes. @@ -1129,26 +1156,25 @@ @findex c-hanging-braces-alist @findex hanging-braces-alist (c-) Second, changing some variables have no effect on existing code, even -when you do re-indent. For example, the @code{c-hanging-*} variables and -@code{c-cleanup-list} only affect newly entered code. So for example, -changing @code{c-hanging-braces-alist} and re-indenting the buffer will -not adjust placement of braces already in the file. +when you do re-indent. For example, the @code{c-hanging-*} variables +and @code{c-cleanup-list} only affect new code as it is typed in. So +for example, changing @code{c-hanging-braces-alist} and re-indenting the +buffer will not adjust placement of braces already in the file. @vindex c-progress-interval @vindex progress-interval (c-) Third, re-indenting large portions of code is currently rather inefficient. Improvements have been made since previous releases of -@code{cc-mode}, and much more radical improvements will be made for the -next release, but for now you need to be aware of this @footnote{In -particular, I have had people complain about the speed that -@code{cc-mode} re-indents @code{lex(1)} output. Lex, yacc, and other -code generators usually output some pretty perverse code. @emph{Don't} -try to indent this stuff with @code{cc-mode}!}. Some provision has been -made to at least inform you as to the progress of your large -re-indentation command. The variable @code{c-progress-interval} -controls how often a progress message is displayed. Set this variable -to @code{nil} to inhibit progress messages. Note that this feature only -works with Emacs 19. +@code{cc-mode}, and much more radical improvements are planned, but for +now you need to be aware of this @footnote{In particular, I have had +people complain about the speed that @code{cc-mode} re-indents +@code{lex(1)} output. Lex, yacc, and other code generators usually +output some pretty perversely formatted code. @emph{Don't} try to +indent this stuff with @code{cc-mode}!}. Some provision has been made +to at least inform you as to the progress of the re-indentation. The +variable @code{c-progress-interval} controls how often a progress +message is displayed. Set this variable to @code{nil} to inhibit +progress messages. Note that this feature only works with Emacs 19. Also, except as noted below, re-indentation is always driven by the same mechanisms that control on-the-fly indentation of code. @xref{New @@ -1160,23 +1186,34 @@ @vindex tab-always-indent (c-) @kindex TAB @cindex literal +@vindex indent-tabs-mode +@vindex c-insert-tab-function +@vindex insert-tab-function (c-) +@findex tab-to-tab-stop To indent a single line of code, use @kbd{TAB} (@code{c-indent-command}). The behavior of this command is controlled by the variable @code{c-tab-always-indent}. When this variable is @code{t}, @kbd{TAB} always just indents the current line. When -@code{nil}, the line is indented only if point is at the left -margin, or on or before the first non-whitespace character on the line, -otherwise a real tab character is inserted. If this variable's value is -something other that @code{t} or @code{nil} (e.g. @code{'other}), then a -real tab character is inserted only when point is inside a -literal (see @ref{Auto-newline insertion}), otherwise the line is -indented. +@code{nil}, the line is indented only if Point is at the left margin, or +on or before the first non-whitespace character on the line, otherwise +@emph{something else happens}@footnote{Actually what happens is that the +function stored in the variable @code{c-insert-tab-function} is called. +Normally this just inserts a real tab character, or the equivalent +number of spaces, depending on the setting of the variable +@code{indent-tabs-mode}. If you preferred, you could set +@code{c-insert-tab-function} to @code{tab-to-tab-stop} for example.}. +If the value of @code{c-tab-always-indent} is something other than +@code{t} or @code{nil} (e.g. @code{'other}), then a real tab +character@footnote{The caveat about @code{indent-tabs-mode} in the +previous footnote also applies here.} is inserted only when Point is +inside a literal (see @ref{Auto-newline insertion}), otherwise the line +is indented. @kindex M-C-q @findex c-indent-exp @findex indent-exp (c-) To indent an entire balanced brace or parenthesis expression, use -@kbd{M-C-q} (@code{c-indent-exp}). Note that point should be on +@kbd{M-C-q} (@code{c-indent-exp}). Note that Point should be on the opening brace or parenthesis of the expression you want to indent. @kindex C-c C-q @@ -1184,7 +1221,7 @@ @findex indent-defun (c-) Another very convenient keystroke is @kbd{C-c C-q} (@code{c-indent-defun}) when re-indents the entire top-level function or -class definition that encompases point. It leaves point at the +class definition that encompases Point. It leaves Point at the same position within the buffer. @kindex M-C-\ @@ -1192,7 +1229,7 @@ To indent any arbitrary region of code, use @kbd{M-C-\} (@code{indent-region}). This is a standard Emacs command, specially tailored for C code in a @code{cc-mode} buffer. Note that of course, -point and mark must delineate the region you +Point and Mark must delineate the region you want to indent. @kindex M-C-h @@ -1202,9 +1239,108 @@ (@code{c-mark-function}) is useful for marking the current top-level function or class definition as the current region. +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@node Other Commands, , Indentation Commands, Commands +@comment node-name, next, previous,up + +@section Other Commands +@cindex Other Commands +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +@code{cc-mode} contains other useful command for moving around in C +code. + +@table @code +@item C-c C-u (c-up-conditional) +@kindex C-c C-u +@findex c-up-conditional +@findex up-conditional (c-) +Move Point back to the containing preprocessor conditional, leaving the +Mark behind. A prefix argument acts as a repeat count. With a negative +argument, move Point forward to the end of the containing +preprocessor conditional. When going backwards, @code{#elif} is treated +like @code{#else} followed by @code{#if}. When going forwards, +@code{#elif} is ignored.@refill + +@item C-c C-p (c-backward-conditional) +@kindex C-c C-p +@findex c-backward-conditional +@findex backward-conditional (c-) +Move Point back over a preprocessor conditional, leaving Mark +behind. A prefix argument acts as a repeat count. With a negative +argument, move forward. + +@item C-c C-n (c-forward-conditional) +@kindex C-c C-n +@findex c-forward-conditional +@findex forward-conditional (c-) +Move Point forward across a preprocessor conditional, leaving Mark +behind. A prefix argument acts as a repeat count. With a negative +argument, move backward. + +@item M-a (c-beginning-of-statement) +@kindex ESC a +@findex c-beginning-of-statement +@findex beginning-of-statement (c-) +Move Point to the beginning of the innermost C statement. If Point is +already at the beginning of a statement, it moves to the beginning of +the preceding statement. With prefix argument @var{n}, move back +@var{n} @minus{} 1 statements. + +If Point is within a string or comment, or next to a comment (only +whitespace between them), this command moves by sentences instead of +statements. + +When called from a program, this function takes two optional arguments: +the numeric prefix argument, and a buffer position limit (don't move +back before that place). + +@item M-e (c-end-of-statement) +@kindex ESC e +@findex c-end-of-statement +@findex end-of-statement (c-) +Move Point to the end of the innermost C statement. If Point is at the +end of a statement, move to the end of the next statement. With prefix +argument @var{n}, move forward @var{n} @minus{} 1 statements. + +If Point is within a string or comment, or next to a comment (only +whitespace between them), this command moves by sentences instead of +statements. + +When called from a program, this function takes two optional arguments: +the numeric prefix argument, and a buffer position limit (don't move +past that place). + +@item M-x c-forward-into-nomenclature +@findex c-forward-into-nomenclature +@findex forward-into-nomenclature (c-) +A popular programming style, especially for object-oriented languages +such as C++ is to write symbols in a mixed case format, where the first +letter of each word is capitalized, and not separated by underscores. +E.g. @samp{SymbolsWithMixedCaseAndNoUnderlines}. + +This command moves Point forward to end of a C++ nomenclature +section or word. With prefix argument @var{n}, move @var{n} times. + +@item M-x c-backward-into-nomenclature +@findex c-backward-into-nomenclature +@findex backward-into-nomenclature (c-) +Move Point backward to beginning of a C++ nomenclature +section or word. With prefix argument @var{n}, move @var{n} times. If +@var{n} is negative, move forward. + +@kindex C-c : +@findex c-scope-operator +@findex scope-operator (c-) +@item C-c : (c-scope-operator) +In C++, it is also sometimes desirable to insert the double-colon scope +operator without performing the electric behavior of colon insertion. +@kbd{C-c :} does just this. + +@end table @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Customizing Indentation, Syntactic Symbols, Indentation Commands, Top +@node Customizing Indentation, Syntactic Symbols, Commands, Top @comment node-name, next, previous,up @chapter Customizing Indentation @@ -1226,33 +1362,33 @@ @cindex c-basic-offset @cindex basic-offset (c-) As mentioned previously, the variable @code{c-offsets-alist} is an -association list between syntactic symbols and the offsets to be applied -for those symbols. In fact, these offset values can be an integer, a -function or variable name, or one of the following symbols: @code{+}, +association list of syntactic symbols and the offsets to be applied for +those symbols. In fact, these offset values can be any of an integer, +a function or variable name, or one of the following symbols: @code{+}, @code{-}, @code{++}, @code{--}, @code{*}, or @code{/}. These symbols describe offset in multiples of the value of the variable @code{c-basic-offset}. By defining a style's indentation in terms of this fundamental variable, you can change the amount of whitespace given to an indentation level while leaving the same relationship between -levels. Here are multiples of @code{c-basic-offset} that the special +levels. Here are the values that the special symbols correspond to: -@itemize @bullet - -@item -@code{+ } = @code{c-basic-offset} times 1 -@item -@code{- } = @code{c-basic-offset} times -1 -@item -@code{++} = @code{c-basic-offset} times 2 -@item -@code{--} = @code{c-basic-offset} times -2 -@item -@code{* } = @code{c-basic-offset} times 0.5 -@item -@code{/ } = @code{c-basic-offset} times -0.5 - -@end itemize +@table @code + +@item + +@code{c-basic-offset} times 1 +@item - +@code{c-basic-offset} times -1 +@item ++ +@code{c-basic-offset} times 2 +@item -- +@code{c-basic-offset} times -2 +@item * +@code{c-basic-offset} times 0.5 +@item / +@code{c-basic-offset} times -0.5 + +@end table @noindent So, for example, because most of the default offsets are defined in @@ -1278,6 +1414,22 @@ int add( int val, int incr, int doit ) @{ + if( doit ) + @{ + return( val + incr ); + @} + return( val ); +@} + +@end group +@end example +@noindent +to +@example +@group + +int add( int val, int incr, int doit ) +@{ if( doit ) @{ return( val + incr ); @@ -1288,22 +1440,6 @@ @end group @end example -@noindent -to -@example -@group - -int add( int val, int incr, int doit ) -@{ - if( doit ) - @{ - return( val + incr ); - @} - return( val ); -@} - -@end group -@end example To change indentation styles more radically, you will want to change the value associated with the syntactic symbols in the @@ -1327,17 +1463,19 @@ @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! As an example of how to customize indentation, let's change the -style of example 2 above from: +style of this example@footnote{In this an subsequent examples, the +original code is formatted using the @samp{gnu} style unless otherwise +indicated. @xref{Styles}.}: @example @group 1: int add( int val, int incr, int doit ) 2: @{ -3: if( doit ) -4: @{ -5: return( val + incr ); -6: @} -7: return( val ); +3: if( doit ) +4: @{ +5: return( val + incr ); +6: @} +7: return( val ); 8: @} @end group @@ -1349,11 +1487,11 @@ 1: int add( int val, int incr, int doit ) 2: @{ -3: if( doit ) -4: @{ -5: return( val + incr ); -6: @} -7: return( val ); +3: if( doit ) +4: @{ +5: return( val + incr ); +6: @} +7: return( val ); 8: @} @end group @@ -1363,11 +1501,11 @@ block following a condition so that the braces line up under the conditional, instead of being indented. Notice that the construct we want to change starts on line 4. To change the indentation of a line, -we need to see which syntactic component affect the offset calculations +we need to see which syntactic components affect the offset calculations for that line. Hitting @kbd{C-c C-s} on line 4 yields: @example -((substatement-open . 46)) +((substatement-open . 44)) @end example @@ -1385,7 +1523,7 @@ After you hit return, @code{cc-mode} will then prompt you for the new offset value, with the old value as the default. The default in this -case is @samp{+}, so hit backspace to delete the @samp{+}, then hit +case is @samp{+}, but we want no extra indentation so enter @samp{0} and @kbd{RET}. This will associate the offset 0 with the syntactic symbol @code{substatement-open} in the @code{c-offsets-alist} variable. @@ -1401,11 +1539,11 @@ 1: int add( int val, int incr, int doit ) 2: @{ -3: if( doit ) -4: @{ -5: return( val + incr ); -6: @} -7: return( val ); +3: if( doit ) +4: @{ +5: return( val + incr ); +6: @} +7: return( val ); 8: @} @end group @@ -1434,18 +1572,37 @@ @vindex java-mode-hook @cindex hooks To make this change permanent, you need to add some lisp code to your -@file{.emacs} file. @code{cc-mode} provides four hooks that you can use -to customize your language editing styles. Four language specific hooks -are provided, according to Emacs major mode conventions: -@code{c-mode-hook}, @code{c++-mode-hook}, @code{objc-mode-hook}, and -@code{java-mode-hook}. These get run as the last thing when you enter -@code{c-mode}, @code{c++-mode}, @code{objc-mode}, or -@code{java-mode-hook} respectively. @code{cc-mode} also provides a hook -called @code{c-mode-common-hook} which is run by all three modes -@emph{before} the language specific hook. Thus, to make changes -consistently across all supported @code{cc-mode} modes, use -@code{c-mode-common-hook}. Most of the examples in this section will -assume you are using the common hook. +@file{.emacs} file. @code{cc-mode} provides several hooks that you can +use to customize the mode according to your coding style. Each language +mode has its own hook, adhering to standard to Emacs major mode +conventions. There is also one general hook: + +@itemize @bullet + +@item +@code{c-mode-hook} --- for C buffers only +@item +@code{c++-mode-hook} --- for C++ buffers only +@item +@code{objc-mode-hook} --- for Objective-C buffers only +@item +@code{java-mode-hook} --- for Java buffers only +@item +@code{c-mode-common-hook} --- common across all languages + +@end itemize + +The language hooks get run as the last thing when you enter that +language-specific mode. The @code{c-mode-common-hook} is run by all +supported modes @emph{before} the language specific hook, and thus can +contain customizations that are common across all languages. Most of +the examples in this section will assume you are using the common +hook@footnote{The interaction between @code{java-mode} and the hook +variables is slightly different than for the other modes. +@code{java-mode} sets the style (see @ref{Styles}) of the buffer to +@samp{java} @emph{before} running the @code{c-mode-common-hook} or +@code{java-mode-hook}. You need to be aware of this so any style +settings in @code{c-mode-common-hook} doesn't clobber your Java style.}. Here's a simplified example of what you can add to your @file{.emacs} file to make the changes described in the previous section @@ -1471,10 +1628,6 @@ @emph{style} that groups all your customizations under a single name. -The offset value can also be a function, and this is how power users -gain enormous flexibility in customizing indentation. @xref{Advanced -Customizations} for details. - @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @node Styles, Advanced Customizations, Permanent Customization, Customizing Indentation @comment node-name, next, previous,up @@ -1492,7 +1645,7 @@ styles in use. For this reason, @code{cc-mode} makes it convenient for you to set up logical groupings of customizations called @dfn{styles}, associate a single name for any particular style, and pretty easily -start editing new or existing code using these styles. This chapter +start editing new or existing code using these styles. This section describes how to set up styles and how to edit your C code using styles. @menu @@ -1517,30 +1670,29 @@ @itemize @bullet @item @cindex GNU style -@code{gnu} -- coding style blessed by the Free Software Foundation +@code{gnu} --- coding style blessed by the Free Software Foundation for C code in GNU programs. @item @cindex K&R style -@code{k&r} -- The classic Kernighan and Ritchie style for C code. +@code{k&r} --- The classic Kernighan and Ritchie style for C code. @item @cindex BSD style -@code{bsd} -- @strong{<TBD> Anybody know anything about the history of -this style?} +@code{bsd} --- Also known as ``Allman style'' after Eric Allman. + +@item +@cindex Whitesmith style +@code{whitesmith} --- Popularized by the examples that came with +Whitesmiths C, an early commercial C compiler. @item @cindex Stroustrup style -@code{stroustrup} -- The classic Stroustrup style for C++ code. - -@item -@cindex Whitesmith style -@code{whitesmith} -- @strong{<TBD> Anybody know anything about the history of -this style?} +@code{stroustrup} --- The classic Stroustrup style for C++ code. @item @cindex Ellemtel style -@code{ellemtel} -- Popular C++ coding standards as defined by +@code{ellemtel} --- Popular C++ coding standards as defined by ``Programming in C++, Rules and Recommendations'', Erik Nyquist and Mats Henricson, Ellemtel @footnote{This document is ftp'able from @code{euagate.eua.ericsson.se}}. @@ -1548,14 +1700,9 @@ @item @cindex Java style @cindex java-mode -@code{java} -- The style for editing Java code. Note that this style is +@code{java} --- The style for editing Java code. Note that this style is automatically installed when you enter @code{java-mode}. -@item -@cindex CC-MODE style -@code{CC-MODE} -- Style that encapsulates the default values of the -@code{cc-mode} variables. See below for details. - @end itemize @findex c-set-style @@ -1574,17 +1721,17 @@ Setting a style in this way does @emph{not} automatically re-indent your file. For commands that you can use to view the effect of your changes, -see @ref{Indentation Commands}. +see @ref{Commands}. Once you find a built-in style you like, you can make the change permanent by adding a call to your @file{.emacs} file. Let's say for -example that you want to use the @code{ellemtel} style in all your +example that you want to use the @samp{ellemtel} style in all your files. You would add this: @example @group (defun my-c-mode-common-hook () - ;; use Ellemtel style for all C, C++, and Objective-C code + ;; use Ellemtel style for all C like languages (c-set-style "ellemtel") ;; other customizations can go here ) @@ -1593,18 +1740,18 @@ @end group @end example -There is one other special style you can use, called @code{CC-MODE}. -This is a style that is calculated by @code{cc-mode} when it starts up. -The @code{CC-MODE} style is also special because all other styles -implicitly inherit from it; in other words, whenever you set a style, -@code{cc-mode} first re-instates the @code{CC-MODE} style, then applies -your new style configurations. - -The @code{CC-MODE} style exists because once @code{cc-mode} initializes, -it institutes the @code{gnu} style for compatibility with BOCM's -defaults. Any customizations you make in mode hooks will be based on -the @code{gnu} style, unless you first do a @code{c-set-style} to -@code{CC-MODE} or some other built-in style. +There is one other special style you can use, called @samp{cc-mode} +style. This style is special because all other styles implicitly +inherit from it; in other words, whenever you set a style, +@samp{cc-mode} is applied before the one you selected. This means +your style need only define the differences between it and +@samp{cc-mode} style. + +Note that for BOCM compatibility, @samp{gnu} is the default +style, and any non-style based customizations you make (i.e. in +@code{c-mode-common-hook} in your +@file{.emacs} file) will be based on @samp{gnu} style unless you do +a @code{c-set-style} as the first thing in your hook. @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -1620,17 +1767,18 @@ @findex c-add-style @findex add-style (c-) If none of the built-in styles is appropriate, you'll probably want to -add a new style definition. Styles are kept in the @code{c-style-alist} -variable, but you probably won't want to modify this variable directly. -@code{cc-mode} provides a function, called @code{c-add-style}, that you -can use to easily add new styles or update existing styles. This -function takes two arguments, a @var{stylename} string, and an -association list @var{description} of style customizations. If -@var{stylename} is not already in @code{c-style-alist}, the new style is -added, otherwise the style already associated with @var{stylename} is -changed to the new @var{description}. This function also takes an -optional third argument, which if non-@code{nil}, automatically -institutes the new style in the current buffer. +add a new @dfn{style definition}. Styles are kept in the +@code{c-style-alist} variable, but you should never modify this variable +directly. Instead, @code{cc-mode} provides the function +@code{c-add-style} that you can use to easily add new styles or change +existing styles. This function takes two arguments, a @var{stylename} +string, and an association list @var{description} of style +customizations. If @var{stylename} is not already in +@code{c-style-alist}, the new style is added, otherwise the style is +changed to the new @var{description}. +This function also takes an optional third argument, which if +non-@code{nil}, automatically applies the new style to the current +buffer. The sample @file{.emacs} file provides a concrete example of how a new style can be added and automatically set. @xref{Sample .emacs File}. @@ -1656,10 +1804,9 @@ @vindex c-file-offsets @vindex file-offsets (c-) -The variable @code{c-file-style} can be set to a style name string as -described in @ref{Built-in Styles}. When the file is visited, -@code{cc-mode} will automatically set the file's style to this style -using @code{c-set-style}. +The variable @code{c-file-style} can be set to a style name string. +When the file is visited, @code{cc-mode} will automatically set the +file's style to this style using @code{c-set-style}. @vindex c-offsets-alist @vindex offsets-alist (c-) @@ -1671,7 +1818,9 @@ @code{c-set-offset}. Note that file style settings (i.e. @code{c-file-style}) are applied -before file offset settings (i.e. @code{c-file-offsets}). +before file offset settings (i.e. @code{c-file-offsets})@footnote{File +styles are only supported since XEmacs 19.12 and Emacs 19.29. They work +via the standard Emacs hook variable @code{hack-local-variables-hook}.}. @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -1687,15 +1836,15 @@ @vindex c-basic-offset @vindex basic-offset (c-) For most users, @code{cc-mode} will support their coding styles with -very little need for customizations. Usually, one of the standard -styles defined in @code{c-style-alist} will do the trick. At most, -perhaps one of the syntactic symbol offsets will need to be tweaked -slightly, or maybe @code{c-basic-offset} will need to be changed. -However, some styles require a more advanced ability for customization, -and one of the real strengths of @code{cc-mode} is that the syntactic -analysis model provides a very flexible framework for customizing -indentation. This allows you to perform special indentation calculations -for situations not handled by the mode directly. +very little need for more advanced customizations. Usually, one of the +standard styles defined in @code{c-style-alist} will do the trick. At +most, perhaps one of the syntactic symbol offsets will need to be +tweaked slightly, or maybe @code{c-basic-offset} will need to be +changed. However, some styles require a more flexible framework for +customization, and one of the real strengths of @code{cc-mode} is that +the syntactic analysis model provides just such a framework. This allows +you to implement special indentation calculations for situations not +handled by the mode directly. @menu * Custom Indentation Functions:: @@ -1733,14 +1882,14 @@ @end example In this example, lines 4 through 6 are assigned the @code{stream-op} -syntactic symbol. If @code{stream-op} had an offset of @code{+}, and -@code{c-basic-offset} was 2, lines 4 through 6 would simply be indented -two spaces to the right of line 3. But perhaps we'd like @code{cc-mode} -to be a little more intelligent so that it offsets the stream operators -under the operator in line 3. To do this, we have to write a custom -indentation function which finds the column of first stream operator on -the first line of the statement. Here is the lisp code (from the -@file{cc-mode.el} source file) that implements this: +syntactic symbol. Here, @code{stream-op} has an offset of @code{+}, and +with a @code{c-basic-offset} of 2, you can see that lines 4 through 6 +are simply indented two spaces to the right of line 3. But perhaps we'd +like @code{cc-mode} to be a little more intelligent so that it lines up +all the @samp{<<} symbols in lines 3 through 6. To do this, we have +to write a custom indentation function which finds the column of first +stream operator on the first line of the statement. Here is the lisp +code (from the @file{cc-mode.el} source file) that implements this: @example @group @@ -1760,7 +1909,7 @@ Custom indent functions take a single argument, which is a syntactic component cons cell (see @ref{Syntactic Analysis}). The function returns an integer offset value that will be added to the -running total indentation for the lne. Note that what actually gets +running total indentation for the line. Note that what actually gets returned is the difference between the column that the first stream operator is on, and the column of the buffer relative position passed in the function's argument. Remember that @code{cc-mode} automatically @@ -1802,7 +1951,90 @@ @vindex offsets-alist (c-) Custom indentation functions can be as simple or as complex as you like, and any syntactic symbol that appears in @code{c-offsets-alist} can have -a custom indentation function associated with it. +a custom indentation function associated with it. @code{cc-mode} comes +with several standard custom indentation functions, not all of which are +used by the default styles. + +@itemize @bullet +@item +@findex c-lineup-arglist +@findex lineup-arglist (c-) +@code{c-lineup-arglist} --- lines up function argument lines under the +argument on the previous line. + +@item +@findex c-lineup-arglist-intro-after-paren +@findex lineup-arglist-intro-after-paren (c-) +@code{c-lineup-arglist-intro-after-paren} --- similar to +@code{c-lineup-arglist}, but works for argument lists that begin with an +open parenthesis followed by a newline. + +@item +@findex c-lineup-arglist-close-under-paren +@findex lineup-arglist-close-under-paren (c-) +@code{c-lineup-arglist-close-under-paren} --- set your +@code{arglist-close} syntactic symbol to this line-up function so that +parentheses that close argument lists will line up under the parenthesis +that opened the argument list. + +@item +@findex c-lineup-streamop +@findex lineup-streamop (c-) +@code{c-lineup-streamop} --- lines up C++ stream operators +(e.g. @samp{<<} and @samp{>>}). + +@item +@findex c-lineup-multi-inher +@findex lineup-multi-inher (c-) +@code{c-lineup-multi-inher} --- lines up multiple inheritance lines. + +@item +@findex c-lineup-C-comments +@findex lineup-C-comments (c-) +@code{c-lineup-C-comments} --- lines up C block comment continuation +lines. + +@item +@findex c-lineup-comment +@findex lineup-comment (c-) +@vindex c-comment-only-line-offset +@vindex comment-only-line-offset (c-) +@code{c-lineup-comment} --- implements the old comment line up behavior +specified by the variable @code{c-comment-only-line-offset}. + +@item +@findex c-lineup-runin-statements +@findex lineup-runin-statements (c-) +@code{c-lineup-runin-statements} --- lines up @code{statement}s for coding +standards which place the first statement in a block on the same line as +the block opening brace. + +@item +@findex c-lineup-math +@findex lineup-math (c-) +@code{c-lineup-math} --- lines up math @code{statement-cont} lines under +the previous line after the equals sign. + +@item +@findex c-lineup-ObjC-method-call +@findex lineup-ObjC-method-call (c-) +@code{c-lineup-ObjC-method-call} --- for Objective-C code, lines up +selector arguments just after the message receiver. + +@item +@findex c-lineup-ObjC-method-args +@findex lineup-ObjC-method-args (c-) +@code{c-lineup-ObjC-method-args} --- for Objective-C code, lines up the +colons that separate arguments by aligning colons vertically. + +@item +@findex c-lineup-ObjC-method-args-2 +@findex lineup-ObjC-method-args-2 (c-) +@code{c-lineup-ObjC-method-args-2} --- similar to +@code{c-lineup-ObjC-method-args} but lines up the colon on the current +line with the colon on the previous line. + +@end itemize @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @node Custom Brace and Colon Hanging, Customizing Semi-colons and Commas, Custom Indentation Functions, Advanced Customizations @@ -1816,7 +2048,7 @@ @vindex hanging-braces-alist (c-) Syntactic symbols aren't the only place where you can customize @code{cc-mode} with the lisp equivalent of callback functions. Brace -hanginess can also be determined by custom functions associated with +``hanginess'' can also be determined by custom functions associated with syntactic symbols on the @code{c-hanging-braces-alist} variable. Remember that @var{ACTION}'s are typically a list containing some combination of the symbols @code{before} and @code{after} (see @@ -1830,10 +2062,10 @@ brace was inserted. The @var{ACTION} function is expected to return a list containing some combination of @code{before} and @code{after}. The function can also return @code{nil}. This return value has the normal -brace hanging semantics described in @ref{Hanging Braces}. +brace hanging semantics. As an example, @code{cc-mode} itself uses this feature to dynamically -determine the hanginess of braces which close @samp{do-while} +determine the hanginess of braces which close ``do-while'' constructs: @example @group @@ -1842,7 +2074,7 @@ @{ int i=0; do @{ - handle_string( atleast_one_string( i )); + handle_string( atleast_one_string[i] ); i++; @} while( i < count ); @} @@ -1855,7 +2087,7 @@ @code{cc-mode} assigns the @code{block-close} syntactic symbol to the brace that closes the @code{do} construct, and normally we'd like the line that follows a @code{block-close} brace to begin on a separate -line. However, with @samp{do-while} constructs, we want the +line. However, with ``do-while'' constructs, we want the @code{while} clause to follow the closing brace. To do this, we associate the @code{block-close} symbol with the @var{ACTION} function @code{c-snug-do-while}: @@ -1881,10 +2113,10 @@ @end example -This function simply looks to see if the brace closes a @samp{do-while} -clause and if so, returns the list @samp{@code{(before)}} indicating +This function simply looks to see if the brace closes a ``do-while'' +clause and if so, returns the list @samp{(before)} indicating that a newline should be inserted before the brace, but not after it. -In all other cases, it returns the list @samp{@code{(before after)}} so +In all other cases, it returns the list @samp{(before after)} so that the brace appears on a line by itself. @vindex c-syntactic-context @@ -1920,15 +2152,15 @@ @itemize @bullet @item -non-@code{nil} -- A newline is inserted, and no more functions from the +non-@code{nil} --- A newline is inserted, and no more functions from the list are called. @item -@code{stop} -- No more functions from the list are called, but no +@code{stop} --- No more functions from the list are called, but no newline is inserted. @item -@code{nil} -- No determination is made, and the next function in the +@code{nil} --- No determination is made, and the next function in the list is called. @end itemize @@ -1939,6 +2171,25 @@ semi-colons which do not appear inside parenthesis lists (i.e. those that separate @code{for}-clause statements). +Here's an example of a criteria function that will prevent newlines from +being inserted after semicolons when there is a non-blank following +line. Otherwise, it makes no determination: + +@example +@group + +(defun my-semicolon-criteria () + (save-excursion + (if (and (= last-command-char ?\;) + (zerop (forward-line 1)) + (not (looking-at "^[ \t]*$"))) + 'stop + nil))) + +@end group +@end example + + @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @node Other Special Indentations, , Customizing Semi-colons and Commas, Advanced Customizations @comment node-name, next, previous,up @@ -1947,6 +2198,14 @@ @cindex Customizing Semi-colons and Commas @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@vindex c-label-minimum-indentation +@vindex label-minimum-indentation (c-) +In @samp{gnu} style (see @ref{Built-in Styles}), a minimum indentation +is imposed on lines with @code{label} or @code{case-label} syntax. This +minimum indentation is controlled by the variable +@code{c-label-minimum-indentation}. The default value for this variable +is 1. + @vindex c-special-indent-hook @vindex special-indent-hook (c-) One other customization variable is available in @code{cc-mode}: @@ -1955,10 +2214,18 @@ to do any special indentation or line adjustments your style dictates, such as adding extra indentation to constructors or destructor declarations in a class definition, etc. Note however, that you should -not change point or mark inside your @code{c-special-indent-hook} +not change Point or Mark inside your @code{c-special-indent-hook} functions (i.e. you'll probably want to wrap your function in a @code{save-excursion}). +Setting @code{c-special-indent-hook} in your style definition is handled +slightly differently than other variables. In your style definition, +you should set the value for +@code{c-special-indent-hook} to a function or list of functions, which +will be appended to @code{c-special-indent-hook} using @code{add-hook}. +That way, the current setting for the buffer local value of +@code{c-special-indent-hook} won't be overridden. + @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @node Syntactic Symbols, Performance Issues, Customizing Indentation, Top @@ -1970,9 +2237,120 @@ @vindex c-offsets-alist @vindex offsets-alist (c-) -The complete list of recognized syntactic symbols is described in the -@code{c-offsets-alist} variable. This chapter will provide some -examples to help clarify these symbols. + +Here is a complete list of the recognized syntactic symbols as described +in the @code{c-offsets-alist} variable, along with a brief description. +More detailed descriptions follow below. + +@itemize @bullet +@item +@code{string} --- inside multi-line string +@item +@code{c} --- inside a multi-line C style block comment +@item +@code{defun-open} --- brace that opens a function definition +@item +@code{defun-close} --- brace that closes a function definition +@item +@code{defun-block-intro} --- the first line in a top-level defun +@item +@code{class-open} --- brace that opens a class definition +@item +@code{class-close} --- brace that closes a class definition +@item +@code{inline-open} --- brace that opens an in-class inline method +@item +@code{inline-close} --- brace that closes an in-class inline method +@item +@code{ansi-funcdecl-cont} --- the nether region between an ANSI function +declaration and the defun opening brace +@item +@code{knr-argdecl-intro} --- first line of a K&R C argument declaration +@item +@code{knr-argdecl} --- subsequent lines in a K&R C argument declaration +@item +@code{topmost-intro} --- the first line in a topmost construct definition +@item +@code{topmost-intro-cont} --- topmost definition continuation lines +@item +@code{member-init-intro} --- first line in a member initialization list +@item +@code{member-init-cont} --- subsequent member initialization list lines +@item +@code{inher-intro} --- first line of a multiple inheritance list +@item +@code{inher-cont} --- subsequent multiple inheritance lines +@item +@code{block-open} --- statement block open brace +@item +@code{block-close} --- statement block close brace +@item +@code{brace-list-open} --- open brace of an enum or static array list +@item +@code{brace-list-close} --- close brace of an enum or static array list +@item +@code{brace-list-intro} --- first line in an enum or static array list +@item +@code{brace-list-entry} --- subsequent lines in an enum or static array list +@item +@code{statement} --- a C (or like) statement +@item +@code{statement-cont} --- a continuation of a C (or like) statement +@item +@code{statement-block-intro} --- the first line in a new statement block +@item +@code{statement-case-intro} --- the first line in a case `block' +@item +@code{statement-case-open} --- the first line in a case block starting +with brace +@item +@code{substatement} --- the first line after an if/while/for/do/else +@item +@code{substatement-open} --- the brace that opens a substatement block +@item +@code{case-label} --- a case or default label +@item +@code{access-label} --- C++ private/protected/public access label +@item +@code{label} --- any non-special C (or like) label +@item +@code{do-while-closure} --- the `while' that ends a do/while construct +@item +@code{else-clause} --- the `else' of an if/else construct +@item +@code{comment-intro} --- a line containing only a comment introduction +@item +@code{arglist-intro} --- the first line in an argument list +@item +@code{arglist-cont} --- subsequent argument list lines when no arguments +follow on the same line as the the arglist opening paren +@item +@code{arglist-cont-nonempty} --- subsequent argument list lines when at +least one argument follows on the same line as the arglist opening paren +@item +@code{arglist-close} --- the solo close paren of an argument list +@item +@code{stream-op} --- lines continuing a stream operator construct +@item +@code{inclass} --- the construct is nested inside a class definition +@item +@code{cpp-macro} --- the start of a cpp macro +@item +@code{friend} --- a C++ friend declaration +@item +@code{objc-method-intro} --- the first line of an Objective-C method definition +@item +@code{objc-method-args-cont} --- lines continuing an Objective-C method +definition +@item +@code{objc-method-call-cont} --- lines continuing an Objective-C method call +@item +@code{extern-lang-open} --- brace that opens an external language block +@item +@code{extern-lang-close} --- brace that closes an external language block +@item +@code{inextern-lang} --- analogous to `inclass' syntactic symbol +@end itemize @cindex -open syntactic symbols @cindex -close syntactic symbols @@ -2009,6 +2387,11 @@ @end group @end example +@cindex topmost-intro syntactic symbol +@cindex topmost-intro-cont syntactic symbol +@cindex defun-open syntactic symbol +@cindex defun-close syntactic symbol +@cindex defun-block-intro syntactic symbol Line 1 shows a @code{topmost-intro} since it is the first line that introduces a top-level construct. Line 2 is a continuation of the top-level construct introduction so it has the syntax @@ -2019,6 +2402,8 @@ the first line of a brace-block, which happens to be enclosed in a top-level function definition. +@cindex statement syntactic symbol +@cindex statement-cont syntactic symbol Lines 5, 6, and 7 are all given @code{statement} syntax since there isn't much special about them. Note however that line 8 is given @code{statement-cont} syntax since it continues the statement begun @@ -2045,35 +2430,63 @@ 14: dString.tune( 'D' ); 15: gString.tune( 'G' ); 16: @} - 17: @} + 17: friend class Luthier; + 18: @} @end group @end example +@cindex class-open syntactic symbol +@cindex class-close syntactic symbol As in the previous example, line 1 has the @code{topmost-intro} syntax. Here however, the brace that opens a C++ class definition on line 4 is -assigned the @code{class-open} syntax. Note that in C++, structs and -unions are essentially equivalent syntactically (and are very similar -semantically), so replacing the @code{class} keyword in the example -above with @code{struct} or @code{union} would still result in a syntax -of @code{class-open} for line 4 @footnote{This is the case even for C -and Objective-C. For consistency, structs in all three languages are -syntactically equivalent to classes. Note however that the keyword -@code{class} is meaningless in C and Objective-C.}. Similarly, line 17 -is assigned @code{class-close} syntax. - +assigned the @code{class-open} syntax. Note that in C++, classes, +structs, and unions are essentially equivalent syntactically (and are +very similar semantically), so replacing the @code{class} keyword in the +example above with @code{struct} or @code{union} would still result in a +syntax of @code{class-open} for line 4 @footnote{This is the case even +for C and Objective-C. For consistency, structs in all supported +languages are syntactically equivalent to classes. Note however that +the keyword @code{class} is meaningless in C and Objective-C.}. +Similarly, line 18 is assigned @code{class-close} syntax. + +@cindex inher-intro syntactic symbol +@cindex inher-cont syntactic symbol Line 2 introduces the inheritance list for the class so it is assigned the @code{inher-intro} syntax, and line 3, which continues the inheritance list is given @code{inher-cont} syntax. -Things get interesting at line 5. The primary syntactic symbol for this -line is @code{access-label} since this a label keyword that specifies -access protection in C++. However, this line actually shows two -syntactic symbols when you hit @kbd{C-c C-s}. This is because it is -also a top-level construct inside a class definition. Thus the other -syntactic symbol assigned to this line is @code{inclass}. Similarly, -line 6 is given both @code{inclass} and @code{topmost-intro} syntax. - +@cindex access-label syntactic symbol +@cindex inclass syntactic symbol +Hitting @kbd{C-c C-s} on line 5 shows the following analysis: + +@example +@group + +@code{((inclass . 1) (access-label . 67))} + +@end group +@end example + +@noindent +The primary syntactic symbol for this line is @code{access-label} as +this a label keyword that specifies access protection in C++. However, +because this line is also a top-level construct inside a class +definition, the analysis actually shows two syntactic symbols. The +other syntactic symbol assigned to this line is @code{inclass}. +Similarly, line 6 is given both @code{inclass} and @code{topmost-intro} +syntax: + +@example +@group + +@code{((inclass . 58) (topmost-intro . 60))} + +@end group +@end example + +@cindex member-init-intro syntactic symbol +@cindex member-init-cont syntactic symbol Line 7 introduces a C++ member initialization list and as such is given @code{member-init-intro} syntax. Note that in this case it is @emph{not} assigned @code{inclass} since this is not considered a @@ -2082,14 +2495,27 @@ list started on line 7. @cindex in-class inline methods -Line 11 is assigned @code{inline-open} because it opens an -@dfn{in-class} C++ inline method definition. This is distinct from, but -related to, the C++ notion of an inline function in that its definition -occurs inside an enclosing class definition, which in C++ implies that -the function should be inlined. For example, if the definition of the -@code{Bass} constructor appeared outside the class definition, line 11 -would be given the @code{defun-open} syntax, even if the keyword -@code{inline} appeared before the method name, as in: +@cindex inline-open syntactic symbol +@cindex inline-close syntactic symbol +But the line 11's analysis is a bit more complicated: + +@example +@group + +@code{((inclass . 1) (inline-open))} + +@end group +@end example + +This line is assigned a syntax of both @code{inline-open} and +@code{inclass} because it opens an @dfn{in-class} C++ inline method +definition. This is distinct from, but related to, the C++ notion of an +inline function in that its definition occurs inside an enclosing class +definition, which in C++ implies that the function should be inlined. +For example, if the definition of the @code{Bass} constructor appeared +outside the class definition, line 11 would be given the +@code{defun-open} syntax, even if the keyword @code{inline} appeared +before the method name, as in: @example @group @@ -2117,11 +2543,21 @@ @end group @end example -@noindent -Similarly, line 16 is given @code{inline-close} syntax. - -As in the first example above, line 12 is given @code{defun-block-open} -syntax and lines 13 through 15 are all given @code{statement} syntax. +@cindex friend syntactic symbol +Returning to the previous example, line 16 is given @code{inline-close} +syntax, while line 12 is given @code{defun-block-open} syntax, and lines +13 through 15 are all given @code{statement} syntax. Line 17 is +interesting in that it's syntactic analysis list contains three +elements: + +@example + +@code{((friend) (inclass . 58) (topmost-intro . 380))} + +@end example + +The @code{friend} syntactic symbol is a modifier that typically does not +have a relative buffer position. Here is another (totally contrived) example which illustrates how syntax is assigned to various conditional constructs: @@ -2152,25 +2588,32 @@ @noindent Only the lines that illustrate new syntactic symbols will be discussed. +@cindex substatement-open syntactic symbol +@cindex substatement-block-intro syntactic symbol +@cindex block-close syntactic symbol Line 4 has a brace which opens a conditional's substatement block. It is thus assigned @code{substatement-open} syntax, and since line 5 is the first line in the substatement block, it is assigned @code{substatement-block-intro} syntax. Lines 6 and 7 are assigned similar syntax. Line 8 contains the brace that closes the inner -substatement block. It is given the generic syntax @code{block-close}, +substatement block. It is given the syntax @code{block-close}, as are lines 11 and 14. -Line 9 is a little different -- since it contains the keyword -@code{else} matching the @code{if} statement introduced on line 5; it is +@cindex else-clause syntactic symbol +@cindex substatement syntactic symbol +Line 9 is a little different --- since it contains the keyword +@code{else} matching the @code{if} statement introduced on line 5, it is given the @code{else-clause} syntax. Note also that line 10 is slightly different too. Because @code{else} is considered a conditional introducing keyword @footnote{The list of conditional keywords are (in -C, Objective-C and C++): @code{for}, @code{if}, @code{do}, @code{else}, -@code{while}, and @code{switch}. C++ has two additional conditional -keywords: @code{try} and @code{catch}.}, and because the following -substatement is not a brace block, line 10 is assigned the +C, C++, Objective-C, and Java): @code{for}, @code{if}, @code{do}, +@code{else}, @code{while}, and @code{switch}. C++ and Java have two +additional conditional keywords: @code{try} and @code{catch}. Java also +has the @code{finally} and @code{synchronized} keywords.}, and because +the following substatement is not a brace block, line 10 is assigned the @code{substatement} syntax. +@cindex do-while-closure syntactic symbol One other difference is seen on line 15. The @code{while} construct that closes a @code{do} conditional is given the special syntax @code{do-while-closure} if it appears on a line by itself. Note that if @@ -2202,10 +2645,13 @@ @end group @end example +@cindex case-label syntactic symbol +@cindex statement-case-intro syntactic symbol +@cindex statement-case-open syntactic symbol Here, lines 4, 7, and 10 are all assigned @code{case-label} syntax, while lines 5 and 8 are assigned @code{statement-case-intro}. Line 11 is treated slightly differently since it contains a brace that opens a -block -- it is given @code{statement-case-open} syntax. +block --- it is given @code{statement-case-open} syntax. @cindex brace lists There are a set of syntactic symbols that are used to recognize @@ -2225,6 +2671,10 @@ @end group @end example +@cindex brace-list-open syntactic symbol +@cindex brace-list-intro syntactic symbol +@cindex brace-list-close syntactic symbol +@cindex brace-list-entry syntactic symbol Following convention, line 2 in this example is assigned @code{brace-list-open} syntax, and line 3 is assigned @code{brace-list-intro} syntax. Likewise, line 6 is assigned @@ -2232,6 +2682,30 @@ @code{brace-list-entry} syntax, as would all subsequent lines in this initializer list. +External language definition blocks also have their own syntactic +symbols. In this example: +@example +@group + + 1: extern "C" + 2: @{ + 3: int thing_one( int ); + 4: int thing_two( double ); + 5: @} + +@end group +@end example + +@cindex extern-lang-open syntactic symbol +@cindex extern-lang-close syntactic symbol +@cindex inextern-lang syntactic symbol +@cindex inclass syntactic symbol +@noindent +line 2 is given the @code{extern-lang-open} syntax while line 5 is given +the @code{extern-lang-close} syntax. The analysis for line 3 yields: +@code{((inextern-lang) (topmost-intro . 14))}, where +@code{inextern-lang} is a modifier similar in purpose to @code{inclass}. + A number of syntactic symbols are associated with parenthesis lists, a.k.a argument lists, as found in function declarations and function calls. This example illustrates these: @@ -2260,20 +2734,25 @@ @end group @end example +@cindex arglist-intro syntactic symbol +@cindex arglist-close syntactic symbol Lines 5 and 12 are assigned @code{arglist-intro} syntax since they are the first line following the open parenthesis, and lines 7 and 14 are assigned @code{arglist-close} syntax since they contain the parenthesis that closes the argument list. -The other lines with relevant syntactic symbols include lines 2 and 17 -which are assigned @code{arglist-cont-nonempty} syntax. What this means +@cindex arglist-cont-nonempty syntactic symbol +@cindex arglist-cont syntactic symbol +Lines that continue argument lists can be assigned one of two syntactic +symbols. For example, Lines 2 and 17 +are assigned @code{arglist-cont-nonempty} syntax. What this means is that they continue an argument list, but that the line containing the -parenthesis that opens the list is @emph{non-empty} following the open +parenthesis that opens the list is @emph{not empty} following the open parenthesis. Contrast this against lines 6 and 13 which are assigned @code{arglist-cont} syntax. This is because the parenthesis that opens their argument lists is the last character on that line @footnote{The need for this somewhat confusing arrangement is that the typical -indentation desired for these lines is calculated very differently. +indentation desired for these lines is calculated differently. This should be simplified in version 5 of @code{cc-mode}, along with the added distinction between argument lists in function declarations, and argument lists in function calls.}. @@ -2315,18 +2794,21 @@ @itemize @bullet +@cindex ansi-funcdecl-cont syntactic symbol @item -line 2 which is assigned the @code{ansi-funcdecl-cont} syntax; - +line 2, assigned the @code{ansi-funcdecl-cont} syntax; + +@cindex comment-intro syntactic symbol @item -line 4 which is assigned both @code{defun-block-intro} @emph{and} +line 4, assigned both @code{defun-block-intro} @emph{and} @code{comment-intro} syntax @footnote{The @code{comment-intro} syntactic -symbol is known generically as a @dfn{modifier} since it always appears -on a syntactic analysis list with other symbols, and never has a -relative buffer position.}; - +symbol is is another example of a @dfn{modifier} since it always appears +on a syntactic analysis list with other symbols, and rarely has an +associated relative buffer position.}; + +@cindex c syntactic symbol @item -line 5 which is assigned @code{c} syntax; +line 5, assigned @code{c} syntax; @item @cindex syntactic whitespace @@ -2334,23 +2816,28 @@ assigned @code{defun-block-intro}. Note that the appearance of the comment on lines 4 and 5 do not cause line 6 to be assigned @code{statement} syntax because comments are considered to be -@dfn{syntactic whitespace}, which are essentially ignored when analyzing +@dfn{syntactic whitespace}, which are ignored when analyzing code; +@cindex string syntactic symbol @item -line 8 which is assigned @code{string} syntax; - +line 8, assigned @code{string} syntax; + +@cindex label syntactic symbol @item -line 10 which is assigned @code{label} syntax; - +line 10, assigned @code{label} syntax; + +@cindex block-open syntactic symbol @item -line 11 which is assigned @code{block-open} syntax; - +line 11, assigned @code{block-open} syntax; + +@cindex cpp-macro syntactic symbol @item -lines 12 and 14 which are assigned @code{cpp-macro} syntax; - +lines 12 and 14, assigned @code{cpp-macro} syntax; + +@cindex stream-op syntactic symbol @item -line 17 which is assigned @code{stream-op} syntax @footnote{In C++ only.}. +line 17, assigned @code{stream-op} syntax @footnote{In C++ only.}. @end itemize @@ -2371,14 +2858,35 @@ @end group @end example +@cindex objc-method-intro syntactic symbol +@cindex objc-method-args-cont syntactic symbol +@cindex objc-method-call-cont syntactic symbol Here, line 1 is assigned @code{objc-method-intro} syntax, and line 2 is assigned @code{objc-method-args-cont} syntax. Lines 5 and 6 are both assigned @code{objc-method-call-cont} syntax. -Other syntactic symbols may be recognized by @code{cc-mode}, but these -are more obscure and so I haven't included examples of them. These -include: @code{knr-argdecl-intro}, @code{knr-argdecl}, and the -@code{friend} modifier. +@cindex knr-argdecl-intro +@cindex knr-argdecl +Two other syntactic symbols can appear in old style, non-prototyped C +code @footnote{a.k.a. K&R C, or Kernighan & Ritchie C}: +@example +@group + + 1: int add_three_integers(a, b, c) + 2: int a; + 3: int b; + 4: int c; + 5: @{ + 6: return a + b + c; + 7: @} + +@end group +@end example + +Here, line 2 is the first line in an argument declaration list and so is +given the @code{knr-argdecl-intro} syntactic symbol. Subsequent lines +(i.e. lines 3 and 4 in this example), are given @code{knr-argdecl} +syntax. @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @node Performance Issues, Frequently Asked Questions, Syntactic Symbols, Top @@ -2390,16 +2898,16 @@ C and it's derivative languages are highly complex creatures. Often, ambiguous code situations arise that require @code{cc-mode} to scan -large portions of the buffer to determine syntactic context. Some -pathological code can cause @code{cc-mode} to slow down considerably. +large portions of the buffer to determine syntactic context. Such +pathological code@footnote{such as the output of @code{lex(1)}!} +can cause @code{cc-mode} to perform fairly badly. This section identifies some of the coding styles to watch out for, and suggests some workarounds that you can use to improve performance. Note that this is an area that will get a lot of attention in @code{cc-mode} version 5. The mode should end up being much faster, at the expense of dropping Emacs 18 support, owing to the implementation of -syntactic analysis caching. This is the last release of @code{cc-mode} -that will be compatible with Emacs 18. +syntactic analysis caching. Because @code{cc-mode} has to scan the buffer backwards from the current insertion point, and because C's syntax is fairly difficult to parse in @@ -2422,26 +2930,26 @@ reasonable'' is difficult to define, so @code{cc-mode} doesn't do it for you. -@cindex @file{cc-lobotomy.el} file You will probably notice pathological behavior from @code{cc-mode} when working in files containing large amounts of cpp macros. This is -because @code{cc-mode} cannot quickly skip backwards over these lines, -which do not contribute to the syntactic calculations. You'll probably -also have problems if you are editing ``K&R'' C code, i.e. C code that -does not use function prototypes. This is because there are ambiguities -in the C syntax when K&R style argument lists are used, and -@code{cc-mode} has to use a slower scan to determine what it's looking -at. +because @code{cc-mode} cannot quickly skip backwards over these lines. @vindex c-recognize-knr-p @vindex recognize-knr-p (c-) -For the latter problem, I would suggest converting to ANSI style -protocols, and turning the variable @code{c-recognize-knr-p} to -@code{nil} (this is it's default value for all modes). - +Previous versions of @code{cc-mode} had potential performance problems +when recognizing ``K&R'' style function argument declarations. This was +because there are ambiguities in the C syntax when K&R style argument +lists are used (it is hard to distinguish them from top-level +declarations). @code{cc-mode} has adopted BOCM's convention for +limiting the search: it assumes that argdecls are indented at least one +space, and that the function headers are not indented at all. With +current versions of @code{cc-mode}, +@code{c-recognize-knr-p} is deprecated. + +@cindex @file{cc-lobotomy.el} file @vindex cc-lobotomy-pith-list -For the former problem, you might want to investigate some of the -speed-ups provided for you in the file @file{cc-lobotomy.el}, which +You might want to investigate some of the +speed-ups contained in the file @file{cc-lobotomy.el}, which is part of the canonical @code{cc-mode} distribution. As mentioned previous, @code{cc-mode} always trades accuracy for speed, however it is recognized that sometimes you need speed and can sacrifice some accuracy @@ -2458,6 +2966,7 @@ @chapter Frequently Asked Questions @cindex Frequently Asked Questions +@comment FAQ @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @kindex C-x h @@ -2475,21 +2984,21 @@ @strong{A.} Visit the file and hit @kbd{C-x h} to mark the whole buffer. Then hit @kbd{@key{ESC} C-\}. -@sp 2 +@sp 1 @strong{Q.} @emph{How do I re-indent the entire function? @kbd{@key{ESC} C-x} doesn't work.} @strong{A.} @kbd{@key{ESC} C-x} is reserved for future Emacs use. To re-indent the entire function hit @kbd{C-c C-q}. -@sp 2 +@sp 1 @strong{Q.} @emph{How do I re-indent the current block?} @strong{A.} First move to the brace which opens the block with @kbd{@key{ESC} C-u}, then re-indent that expression with @kbd{@key{ESC} C-q}. -@sp 2 +@sp 1 @strong{Q.} @emph{Why doesn't the @key{RET} key indent the line to where the new text should go after inserting the newline?} @@ -2507,7 +3016,7 @@ This is a very common question. @code{:-)} If you want this to be the default behavior, don't lobby me, lobby RMS! -@sp 2 +@sp 1 @strong{Q.} @emph{I put @code{(c-set-offset 'substatement-open 0)} in my @file{.emacs} file but I get an error saying that @@ -2528,12 +3037,24 @@ See the sample @file{.emacs} file @ref{Sample .emacs File} for details. +@sp 1 @strong{Q.} @emph{How do I make strings, comments, keywords, and other constructs appear in different colors, or in bold face, etc.?} @strong{A.} ``Syntax Colorization'' is an Emacs 19 feature, controlled by @code{font-lock-mode}. It is not part of @code{cc-mode}. +@sp 1 +@strong{Q.} @emph{I @code{setq} @code{c-basic-offset} to 4 in my +@file{.emacs} file, but why does everything still get indented with only +2 spaces?} + +@strong{A.} It's because @code{c-basic-offset} is now a ``buffer local +variable'', meaning its value is unique to each buffer. The prefered +way to customize this is to change its value in a ``mode hook'' (most +likely @code{c-mode-common-hook}. Alternatively you can use +@code{setq-default} to change its value globally. + @end quotation @@ -2547,16 +3068,26 @@ @code{cc-mode} is now distributed with both Emacs 19 and XEmacs 19, so you would typically just use the version that comes with your Emacs. -Users of older versions of Emacs can get the latest release from this -URL: +These may be slightly out of date due to release schedule skew, so you +should always check the canonical site for the latest version. @example - - @code{ftp://ftp.python.org/pub/emacs/cc-mode.tar.gz} - +@group + + World Wide Web: + + @code{http://www.python.org/ftp/emacs/} + + Anonymous FTP: + + @code{ftp://ftp.python.org/pub/emacs/} + +@end group @end example -Note that this is a ``gzipped'' tar file. +There are many files under these directories; you can pick up the entire +distribution (named @code{cc-mode.tar.gz}; a gzip'd tar file), or any of +the individual files, including PostScript documentation. If you do not have anonymous ftp access, you can get the distribution through an anonymous ftp-to-mail gateway, such as the one run by DEC at @@ -2574,10 +3105,12 @@ @end example @noindent or just send the message "help" for more information on ftpmail. -Response times will vary with the number of requests in the queue. +Response times will vary with the number of requests in the queue. I am +in no way connected to this service, so I make no claims or guarantees +about its availability! @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Sample .emacs File, Requirements, Getting the latest cc-mode release, Top +@node Sample .emacs File, Limitations and Known Bugs, Getting the latest cc-mode release, Top @comment node-name, next, previous,up @chapter Sample @file{.emacs} file @@ -2623,8 +3156,9 @@ indent-tabs-mode nil) ;; we like auto-newline and hungry-delete (c-toggle-auto-hungry-state 1) - ;; keybindings for C, C++, and Objective-C. We can put these in - ;; c-mode-map because c++-mode-map and objc-mode-map inherit it + ;; keybindings for all supported languages. We can put these in + ;; c-mode-map because c++-mode-map, objc-mode-map, and java-mode-map + ;; inherit from it. (define-key c-mode-map "\C-m" 'newline-and-indent) ) @@ -2634,34 +3168,7 @@ @end example @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Requirements, Limitations and Known Bugs, Sample .emacs File, Top -@comment node-name, next, previous,up -@chapter Requirements -@cindex Requirements -@comment * Requirements -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - -@cindex reporter.el -@file{cc-mode.el} requires @file{reporter.el} for submission of bug -reports. @file{reporter.el} is distributed with the latest Emacs 19s. -Here is the Emacs Lisp Archive anonymous ftp'ing record for those of you -who are using older Emacsen. - -@comment * Here's the Emacs Lisp Archive information for @file{reporter.el}: -@example - - GNU Emacs Lisp Code Directory Apropos -- "reporter" -"~/" refers to archive.cis.ohio-state.edu:/pub/gnu/emacs/elisp-archive/ - -reporter (2.12) 06-Jul-1994 - Barry A. Warsaw, <bwarsaw@@cnri.reston.va.us> - ~/misc/reporter.el.Z - Customizable bug reporting of lisp programs. - -@end example - -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Limitations and Known Bugs, Mailing Lists and Submitting Bug Reports, Requirements, Top +@node Limitations and Known Bugs, Mailing Lists and Submitting Bug Reports, Sample .emacs File, Top @comment node-name, next, previous,up @chapter Limitations and Known Bugs @cindex Limitations and Known Bugs @@ -2681,14 +3188,17 @@ @item There is still some weird behavior when filling C block comments. -My suggestion is to check out add-on fill packages such as -@code{filladapt}, available at the elisp archive. - -@cindex inline-close -@kindex TAB +My suggestion is to check out separate fill packages such as +@code{filladapt} or @code{adaptive-fill-mode}. These can do a much +better job of filling comment regions. + +@cindex c-indent-exp +@cindex indent-exp (c-) @item -Lines following @code{inline-close} braces which hang ``after'' do not -line up correctly. Hit @kbd{TAB} to reindent the line. +@code{c-indent-exp} has not been fully optimized. It essentially +equivalent to hitting @kbd{TAB} (@code{c-indent-command}) on every +line. Some information is cached from line to line, but such caching +invariable causes inaccuracies in analysis in some bizarre situations. @end itemize @@ -2710,17 +3220,16 @@ Please try to boil your example down to just the essential code needed to reproduce the problem, and include an exact recipe of steps needed to expose the bug. Be especially sure to include any code that appears -@emph{before} your bug example. - -Bug reports are now to be sent to @code{bug-gnu-emacs@@prep.ai.mit.edu} -which is mirrored on the Usenet newsgroup @code{gnu.emacs.bug}. Other -questions and suggestions should be mailed to -@code{help-gnu-emacs@@prep.ai.mit.edu} which is mirrored on +@emph{before} your bug example, if you think it might affect my ability +to reproduce it. + +Bug reports are now sent to the following email addresses: +@code{cc-mode-help@@python.org} and +@code{bug-gnu-emacs@@prep.ai.mit.edu}; the latter is mirrored on the Usenet +newsgroup @code{gnu.emacs.bug}. Other questions and suggestions should +be mailed to @code{help-gnu-emacs@@prep.ai.mit.edu} which is mirrored on @code{gnu.emacs.help}. -Note that the @code{cc-mode} Majordomo mailing lists have been -disbanded! With the inclusion of @code{cc-mode} in both of the latest -flavors of Emacs 19, the need for them has ended. @c !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @node Concept Index, Command Index, Mailing Lists and Submitting Bug Reports, Top @@ -2741,8 +3250,8 @@ @end ifinfo Since all @code{cc-mode} commands are prepended with the string -@samp{c-}, each appears under its @code{c-<thing>} name and its -@code{<thing> (c-)} name. +@samp{c-}, each appears under its @code{c-@var{<thing>}} name and its +@code{@var{<thing>} (c-)} name. @iftex @sp 2 @end iftex @@ -2768,8 +3277,8 @@ @end ifinfo Since all @code{cc-mode} variables are prepended with the string -@samp{c-}, each appears under its @code{c-<thing>} name and its -@code{<thing> (c-)} name. +@samp{c-}, each appears under its @code{c-@var{<thing>}} name and its +@code{@var{<thing>} (c-)} name. @iftex @sp 2 @end iftex
--- a/man/cl.texi Mon Aug 13 08:45:53 2007 +0200 +++ b/man/cl.texi Mon Aug 13 08:46:35 2007 +0200 @@ -160,7 +160,7 @@ The package described here was written by Dave Gillespie, @file{daveg@@synaptics.com}. It is a total rewrite of the original -1986 @file{cl.el} package by Cesar Quiroz. Most features of the +1986 @file{cl.el} package by Cesar Quiroz. Most features of the Quiroz package have been retained; any incompatibilities are noted in the descriptions below. Care has been taken in this version to ensure that each function is defined efficiently,
--- a/man/dired.texi Mon Aug 13 08:45:53 2007 +0200 +++ b/man/dired.texi Mon Aug 13 08:46:35 2007 +0200 @@ -2240,7 +2240,7 @@ Default: @kbd{C-o} -Temporary marker used by by Dired to implement omitting. +Temporary marker used by Dired to implement omitting. Should never be used as marker by the user or other packages. @cindex Omitting additional files There is one exception to this rule: by doing
--- a/man/ediff.texi Mon Aug 13 08:45:53 2007 +0200 +++ b/man/ediff.texi Mon Aug 13 08:46:35 2007 +0200 @@ -347,7 +347,7 @@ Some commands take negative prefix arguments as well. For instance, typing @kbd{-} and then @kbd{j} will take Ediff to the last -difference. Typing @kbd{-2} then @kbd{j} takes Ediff to to the penultimate +difference. Typing @kbd{-2} then @kbd{j} takes Ediff to the penultimate difference region, etc. Without the prefix argument, all commands operate on the current
--- a/man/emerge.txt Mon Aug 13 08:45:53 2007 +0200 +++ b/man/emerge.txt Mon Aug 13 08:46:35 2007 +0200 @@ -670,7 +670,7 @@ (autoload 'emerge-execute-line "emerge" "Process the current line. Based on entries found, call emerge correctly -on the files files listed." +on the files listed." t) - Use with Ange-FTP
--- a/man/gnus.texi Mon Aug 13 08:45:53 2007 +0200 +++ b/man/gnus.texi Mon Aug 13 08:46:35 2007 +0200 @@ -539,9 +539,15 @@ @vindex gnus-subscribe-alphabetically Subscribe all new groups alphabetically. -@item gnus-subscribe-hierarchically -@vindex gnus-subscribe-hierarchically -Subscribe all new groups hierarchically. +@item gnus-subscribe-hierarchically +@vindex gnus-subscribe-hierarchically +Subscribe all new groups hierarchically. The difference between this +function and @code{gnus-subscribe-alphabetically} is slight. +@code{gnus-subscribe-alphabetically} will subscribe new groups in a +strictly alphabetical fashion, while this function will enter groups +into it's hierarchy. So if you want to have the @samp{rec} hierarchy +before the @samp{comp} hierarchy, this function will not mess that +configuration up. Or something like that. @item gnus-subscribe-interactively @vindex gnus-subscribe-interactively @@ -697,6 +703,11 @@ control on or off. Version control is off by default when saving the startup files. +@vindex gnus-init-file +When Gnus starts, it will read the @code{gnus-init-file} file, which is +@file{~/.gnus.el} by default. This is a normal Emacs Lisp file and can +be used to avoid cluttering your @file{.emacs} file with Gnus stuff. + @node Auto Save @section Auto Save @@ -1490,9 +1501,9 @@ @kindex G r (Group) @findex gnus-group-rename-group Rename the current group to something else -(@code{gnus-group-rename-group}). This is legal only on some groups -- -mail groups mostly. This command might very well be quite slow on some -backends. +(@code{gnus-group-rename-group}). This is legal only on some +groups---mail groups mostly. This command might very well be quite slow +on some backends. @item G e @kindex G e (Group) @@ -1531,7 +1542,7 @@ Make a Gnus archive group (@code{gnus-group-make-archive-group}). By default a group pointing to the most recent articles will be created (@code{gnus-group-recent-archive-directory}), but given a prefix, a full -group will be created from from @code{gnus-group-archive-directory}. +group will be created from @code{gnus-group-archive-directory}. @item G k @kindex G k (Group) @@ -1539,6 +1550,7 @@ Make a kiboze group. You will be prompted for a name, for a regexp to match groups to be ``included'' in the kiboze group, and a series of strings to match on headers (@code{gnus-group-make-kiboze-group}). +@xref{Kibozed Groups} @item G D @kindex G D (Group) @@ -1768,7 +1780,7 @@ @item A m @kindex A m (Group) @findex gnus-group-list-matching -List all subscribed groups with unread articles that match a regexp +List all unread, subscribed groups with names that match a regexp (@code{gnus-group-list-matching}). @item A M @@ -2459,10 +2471,10 @@ (@code{gnus-group-save-newsrc}). If given a prefix, force saving the file(s) whether Gnus thinks it is necessary or not. -@item Z -@kindex Z (Group) -@findex gnus-group-clear-dribble -Clear the dribble buffer (@code{gnus-group-clear-dribble}). +@c @item Z +@c @kindex Z (Group) +@c @findex gnus-group-clear-dribble +@c Clear the dribble buffer (@code{gnus-group-clear-dribble}). @end table @@ -2779,7 +2791,9 @@ @item gnus-auto-select-same @vindex gnus-auto-select-same If non-@code{nil}, all the movement commands will try to go to the next -article with the same subject as the current. This variable is not +article with the same subject as the current. (@dfn{Same} here might +mean @dfn{roughly equal}. See @code{gnus-summary-gather-subject-limit} +for details (@pxref{Customizing Threading}).) This variable is not particularly useful if you use a threaded display. @item gnus-summary-check-current @@ -5050,6 +5064,12 @@ @findex gnus-article-hide-pgp Hide @sc{pgp} signatures (@code{gnus-article-hide-pgp}). +@item W W P +@kindex W W P (Summary) +@findex gnus-article-hide-pem +Hide @sc{pem} (privacy enhavnced hessages) gruft +(@code{gnus-article-hide-pem}). + @item W W c @kindex W W c (Summary) @findex gnus-article-hide-citation @@ -5167,7 +5187,9 @@ @item W w @kindex W w (Summary) @findex gnus-article-fill-cited-article -Do word wrap (@code{gnus-article-fill-cited-article}). +Do word wrap (@code{gnus-article-fill-cited-article}). If you use this +function in @code{gnus-article-display-hook}, it should be run fairly +late and certainly after any highlighting. @item W c @kindex W c (Summary) @@ -5194,19 +5216,19 @@ @vindex gnus-article-x-face-too-ugly Look for and display any X-Face headers (@code{gnus-article-display-x-face}). The command executed by this -function is given by the @code{gnus-article-x-face-command} variable. If -this variable is a string, this string will be executed in a sub-shell. -If it is a function, this function will be called with the face as the -argument. If the @code{gnus-article-x-face-too-ugly} (which is a regexp) -matches the @code{From} header, the face will not be shown. The default -action under Emacs is to fork off an @code{xv} to view the face; under -XEmacs the default action is to display the face before the @code{From} -header. (It's nicer if XEmacs has been compiled with X-Face support -- -that will make display somewhat faster. If there's no native X-Face -support, Gnus will try to convert the @code{X-Face} header using +function is given by the @code{gnus-article-x-face-command} variable. +If this variable is a string, this string will be executed in a +sub-shell. If it is a function, this function will be called with the +face as the argument. If the @code{gnus-article-x-face-too-ugly} (which +is a regexp) matches the @code{From} header, the face will not be shown. +The default action under Emacs is to fork off an @code{xv} to view the +face; under XEmacs the default action is to display the face before the +@code{From} header. (It's nicer if XEmacs has been compiled with X-Face +support---that will make display somewhat faster. If there's no native +X-Face support, Gnus will try to convert the @code{X-Face} header using external programs from the @code{pbmplus} package and friends.) If you want to have this function in the display hook, it should probably come -last. +last. @item W b @kindex W b (Summary) @@ -6541,6 +6563,8 @@ Messages will be saved in all those groups. @item an alist of regexps, functions and forms When a key ``matches'', the result is used. +@item @code{nil} +No message archiving will take place. This is the default. @end itemize Let's illustrate: @@ -6571,8 +6595,6 @@ "misc-mail"))) @end lisp -This is the default. - How about storing all news messages in one file, but storing all mail messages in one file per month: @@ -6591,8 +6613,8 @@ Gnus, or the next time you press @kbd{F} in the group buffer. You can enter it and read the articles in it just like you'd read any other group. If the group gets really big and annoying, you can simply rename -if (using @kbd{G r} in the group buffer) to something nice -- -@samp{misc-mail-september-1995}, or whatever. New messages will +if (using @kbd{G r} in the group buffer) to something +nice---@samp{misc-mail-september-1995}, or whatever. New messages will continue to be stored in the old (now empty) group. That's the default method of archiving sent mail. Gnus also offers two @@ -7108,8 +7130,8 @@ @cindex news backends A newsreader is normally used for reading news. Gnus currently provides -only two methods of getting news -- it can read from an @sc{nntp} -server, or it can read from a local spool. +only two methods of getting news---it can read from an @sc{nntp} server, +or it can read from a local spool. @menu * NNTP:: Reading news from an @sc{nntp} server. @@ -8728,6 +8750,10 @@ you. Oh joy! Now you can grind any @sc{nntp} server down to a halt with useless requests! Oh happiness! +@kindex G k (Group) +To create a kibozed group, use the @kbd{G k} command in the group +buffer. + The address field of the @code{nnkiboze} method is, as with @code{nnvirtual}, a regexp to match groups to be ``included'' in the @code{nnkiboze} group. There most similarities between @code{nnkiboze} @@ -8799,7 +8825,7 @@ * Score Variables:: Customize your scoring. (My, what terminology). * Score File Format:: What a score file may contain. * Score File Editing:: You can edit score files by hand as well. -* Adaptive Scoring:: Big Sister Gnus *knows* what you read. +* Adaptive Scoring:: Big Sister Gnus @emph{knows} what you read. * Followups To Yourself:: Having Gnus notice when people answer you. * Scoring Tips:: How to score effectively. * Reverse Scoring:: That problem child of old is not problem. @@ -8913,11 +8939,12 @@ Prompt for a score, and mark all articles with a score below this as read (@code{gnus-score-set-mark-below}). -@item V E -@kindex V E (Summary) +@item V x +@kindex V x (Summary) @findex gnus-score-set-expunge-below -Expunge all articles with a score below the default score (or the -numeric prefix) (@code{gnus-score-set-expunge-below}). +Prompt for a score, and add a score rule to the current score file to +expunge all articles below this score +(@code{gnus-score-set-expunge-below}). @end table The keystrokes for actually making score entries follow a very regular @@ -9309,6 +9336,8 @@ like, it would feel kinda silly not to provide this function. Just in case. You never know. Better safe than sorry. Once burnt, twice shy. Don't judge a book by its cover. Never not have sex on a first date. +(I have been told that at least one person, and I quote, ``found this +function indispensable'', however.) @item Head, Body, All These three match keys use the same match types as the @code{From} (etc) @@ -9381,7 +9410,7 @@ rest. Next time you enter the group, you will see new articles in the interesting threads, plus any new threads. -I.e. -- the orphan score atom is for high-volume groups where there +I.e.---the orphan score atom is for high-volume groups where there exist a few interesting threads which can't be found automatically by ordinary scoring rules. @@ -9581,8 +9610,7 @@ @vindex gnus-inews-article-hook These two functions are both primarily meant to be used in hooks like -@code{gnus-inews-article-hook}. - +@code{message-send-hook}. @node Scoring Tips @section Scoring Tips @@ -10130,7 +10158,7 @@ normal format spec, almost. You can also say @samp{%6,4y}, which means that the field will never be -more than 6 characters wide and never less than 4 characters wide. +more than 4 characters wide and never less than 6 characters wide. There are also specs for highlighting, and these are shared by all the format variables. Text inside the @samp{%(} and @samp{%)} specifiers @@ -10306,7 +10334,7 @@ @cindex window height @cindex window width Finding the right sizes can be a bit complicated. No window may be less -than @code{gnus-window-min-height} (default 2) characters high, and all +than @code{gnus-window-min-height} (default 1) characters high, and all windows must be at least @code{gnus-window-min-width} (default 1) characters wide. Gnus will try to enforce this before applying the splits. If you want to use the normal Emacs window width/height limit, @@ -10370,10 +10398,25 @@ @code{gnus-buffer-configuration}: @code{group}, @code{summary}, @code{article}, @code{server}, -@code{browse}, @code{group-mail}, @code{summary-mail}, -@code{summary-reply}, @code{info}, @code{summary-faq}, -@code{edit-group}, @code{edit-server}, @code{reply}, @code{reply-yank}, -@code{followup}, @code{followup-yank}, @code{edit-score}. +@code{browse}, @code{message}, @code{pick}, @code{info}, +@code{summary-faq}, @code{edit-group}, @code{edit-server}, +@code{edit-score}, @code{post}, @code{reply}, @code{forward}, +@code{reply-yank}, @code{mail-bounce}, @code{draft}, +@code{pipe}, @code{bug}, @code{compose-bounce}. + +Note that the @code{message} key is used for both +@code{gnus-group-mail} and @code{gnus-summary-mail-other-window}. If +it is desireable to distinguish between the two, something like this +might be used: + +@lisp +(message (horizontal 1.0 + (vertical 1.0 (message 1.0 point)) + (vertical 0.24 + (if (buffer-live-p gnus-summary-buffer) + '(summary 0.5)) + (group 1.0))))) +@end lisp @findex gnus-add-configuration Since the @code{gnus-buffer-configuration} variable is so long and @@ -10390,7 +10433,7 @@ @end lisp You'd typically stick these @code{gnus-add-configuration} calls in your -@file{.gnus} file or in some startup hook -- they should be run after +@file{.gnus} file or in some startup hook---they should be run after Gnus has been loaded. @@ -10801,7 +10844,7 @@ @menu * Picon Basics:: What are picons and How do I get them. * Picon Requirements:: Don't go further if you aren't using XEmacs. -* Easy Picons:: Displaying Picons -- the easy way. +* Easy Picons:: Displaying Picons---the easy way. * Hard Picons:: The way you should do it. You'll learn something. * Picon Configuration:: Other variables you can trash/tweak/munge/play with. @end menu @@ -10878,8 +10921,8 @@ default (which by default maps to the buffer @samp{*Picons*}). Other valid places could be @code{article}, @code{summary}, or @samp{"*scratch*"} for all I care. Just make sure that you've made the -buffer visible using the standard Gnus window configuration routines -- -@xref{Windows Configuration}. +buffer visible using the standard Gnus window configuration +routines---@xref{Windows Configuration}. @end table @@ -11031,6 +11074,11 @@ gather statistics on the headers fetched, or perhaps you'd like to prune some headers. I don't see why you'd want that, though. +@item gnus-shell-command-separator +@vindex gnus-shell-command-separator +String used to separate to shell commands. The default is @samp{;}. + + @end table @@ -11228,10 +11276,10 @@ @cindex RFC 1036 There are no known breaches of this standard, either. -@item Usenet Seal of Approval -@cindex Usenet Seal of Approval -Gnus hasn't been formally through the Seal process, but I have read -through the Seal text and I think Gnus would pass. +@item Good Net-Keeping Seal of Approval +@cindex Good Net-Keeping Seal of Approval +Gnus has been through the Seal process and failed. I think it'll pass +the next inspection. @item Son-of-RFC 1036 @cindex Son-of-RFC 1036 @@ -12657,9 +12705,9 @@ These slots are, in order: @code{number}, @code{subject}, @code{from}, @code{date}, @code{id}, @code{references}, @code{chars}, @code{lines}, -@code{xref}. There are macros for accessing and setting these slots -- -they all have predictable names beginning with @code{mail-header-} and -@code{mail-header-set-}, respectively. +@code{xref}. There are macros for accessing and setting these +slots---they all have predictable names beginning with +@code{mail-header-} and @code{mail-header-set-}, respectively. The @code{xref} slot is really a @code{misc} slot. Any extra info will be put in there. @@ -12822,7 +12870,7 @@ @end lisp This sort of thing has been done for bunches of functions. Gnus does -not redefine any native Emacs functions while running under XEmacs -- it +not redefine any native Emacs functions while running under XEmacs---it does this @code{defalias} thing with Gnus equivalents instead. Cleaner all over.
--- a/man/hyperbole.texi Mon Aug 13 08:45:53 2007 +0200 +++ b/man/hyperbole.texi Mon Aug 13 08:46:35 2007 +0200 @@ -443,7 +443,7 @@ If you maintain or use Hyperbole, you should consider joining one of the two Hyperbole interest mailing lists. @xref{Menus}, and the description -of the the Msg/ menu item, for a convenient means of joining and mailing +of the Msg/ menu item, for a convenient means of joining and mailing to these lists. @cindex mail lists @@ -2999,7 +2999,7 @@ The current view spec is saved whenever the outline is saved. The next time the outline is read in, this will be the initial view. -The rest of this section documents the the view spec characters that are +The rest of this section documents the view spec characters that are presently supported and explains how to invoke a view spec. There is no user-level way to add your own view spec characters, so all character codes are reserved for future use. @@ -3478,7 +3478,7 @@ Move to the previous entry at any level. @kindex u @item u -Move the the previous entry one level up. +Move to the previous entry one level up. @kindex . @kindex < @item .
--- a/man/internals/internals.texi Mon Aug 13 08:45:53 2007 +0200 +++ b/man/internals/internals.texi Mon Aug 13 08:46:35 2007 +0200 @@ -146,6 +146,7 @@ * General Coding Rules:: * Writing Lisp Primitives:: * Adding Global Lisp Variables:: +* Techniques for XEmacs Developers:: A Summary of the Various XEmacs Modules @@ -369,6 +370,9 @@ @item version 18.36 (a beta version) released on January 21, 1987. @item +January 27, 1987: The Great Usenet Renaming. net.emacs is now +comp.emacs. +@item version 18.37 (a beta version) released on February 12, 1987. @item version 18.38 (a beta version) released on March 3, 1987. @@ -396,9 +400,6 @@ @item version 18.52 released on September 1, 1988. @item -January 27, 1989: The Great Usenet Renaming. net.emacs is now -comp.emacs. -@item version 18.53 released on February 24, 1989. @item version 18.54 released on April 26, 1989. @@ -1002,7 +1003,7 @@ etc. The important idea here is that there are a number of independent -subsystems each with their own responsibility and persistent state, just +subsystems each with its own responsibility and persistent state, just like different employees in a company, and each subsystem is periodically given commands from other subsystems. Commands can flow from any one subsystem to any other, but there is usually some sort of @@ -1574,6 +1575,7 @@ * General Coding Rules:: * Writing Lisp Primitives:: * Adding Global Lisp Variables:: +* Techniques for XEmacs Developers:: @end menu @node General Coding Rules @@ -1946,6 +1948,33 @@ Lisp object, and you will be the one who's unhappy when you can't figure out how your variable got overwritten. +@node Techniques for XEmacs Developers +@section Techniques for XEmacs Developers + +To make a quantified XEmacs, do: @code{make quantmacs}. + +You simply can't dump Quantified and Purified images. Run the image +like so: @code{quantmacs -batch -l loadup.el run-temacs -q}. + +Before you go through the trouble, are you compiling with all +debugging and error-checking off? If not try that first. Be warned +that while Quantify is directly responsible for quite a few +optimizations which have been made to XEmacs, doing a run which +generates results which can be acted upon is not necessarily a trivial +task. + +Also, if you're still willing to do some runs make sure you configure +with the @samp{--quantify} flag. That will keep Quantify from starting +to record data until after the loadup is completed and will shut off +recording right before it shuts down (which generates enough bogus data +to throw most results off). It also enables three additional elisp +commands: @code{quantify-start-recording-data}, +@code{quantify-stop-recording-data} and @code{quantify-clear-data}. + +To get started debugging XEmacs, take a look at the @file{gdbinit} and +@file{dbxrc} files in the @file{src} directory. + + @node A Summary of the Various XEmacs Modules, Allocation of Objects in XEmacs Lisp, Rules When Writing New C Code, Top @chapter A Summary of the Various XEmacs Modules @@ -2235,7 +2264,7 @@ @file{emacsfns.h} contains prototypes for most of the exported functions in the various modules. (In particular, prototypes for Lisp primitives -should always go in this header file. Prototypes for other functions +should always go into this header file. Prototypes for other functions can either go here or in a module-specific header file, depending on how general-purpose the function is and whether it has special-purpose argument types requiring definitions not in @file{lisp.h}.) All @@ -2409,15 +2438,15 @@ 6059 bufslots.h @end example -@file{buffer.c} implements the buffer Lisp object type. This includes -functions that create and destroy buffers; retrieve buffers by name or -by other properties; manipulate lists of buffers (remember that buffers -are permanent objects and stored in various ordered lists); retrieve or -change buffer properties; etc. It also contains the definitions of all -the built-in buffer-local variables (which can be viewed as buffer -properties). It does @emph{not} contain code to manipulate buffer-local -variables (that's in @file{symbols.c}, described above); or code to manipulate -the text in a buffer. +@file{buffer.c} implements the @dfn{buffer} Lisp object type. This +includes functions that create and destroy buffers; retrieve buffers by +name or by other properties; manipulate lists of buffers (remember that +buffers are permanent objects and stored in various ordered lists); +retrieve or change buffer properties; etc. It also contains the +definitions of all the built-in buffer-local variables (which can be +viewed as buffer properties). It does @emph{not} contain code to +manipulate buffer-local variables (that's in @file{symbols.c}, described +above); or code to manipulate the text in a buffer. @file{buffer.h} defines the structures associated with a buffer and the various macros for retrieving text from a buffer and special buffer positions @@ -2453,13 +2482,13 @@ 10975 marker.c @end example -This module implements the marker Lisp object type, which conceptually -is a pointer to a text position in a buffer that moves around as text is -inserted and deleted, so as to remain in the same relative position. -This module doesn't actually move the markers around -- that's handled -in @file{insdel.c}. This module just creates them and implements the -primitives for working with them. As markers are simple objects, this -does not entail much. +This module implements the @dfn{marker} Lisp object type, which +conceptually is a pointer to a text position in a buffer that moves +around as text is inserted and deleted, so as to remain in the same +relative position. This module doesn't actually move the markers around +-- that's handled in @file{insdel.c}. This module just creates them and +implements the primitives for working with them. As markers are simple +objects, this does not entail much. Note that the standard arithmetic primitives (e.g. @code{+}) accept markers in place of integers and automatically substitute the value of @@ -2473,8 +2502,8 @@ 15686 extents.h @end example -This module implements the extent Lisp object type, which is like a -marker that works over a range of text rather than a single position. +This module implements the @dfn{extent} Lisp object type, which is like +a marker that works over a range of text rather than a single position. Extents are also much more complex and powerful than markers and have a more efficient (and more algorithmically complex) implementation. The implementation is described in detail in comments in @file{extents.c}. @@ -2586,8 +2615,8 @@ These implement the handling of events (user input and other system notifications). -@file{events.c} and @file{events.h} define the event Lisp object type -and primitives for manipulating it. +@file{events.c} and @file{events.h} define the @dfn{event} Lisp object +type and primitives for manipulating it. @file{event-stream.c} implements the basic functions for working with event queues, dispatching an event by looking it up in relevant keymaps @@ -2624,8 +2653,8 @@ 2621 keymap.h @end example -@file{keymap.c} and @file{keymap.h} define the keymap Lisp object type -and associated methods and primitives. (Remember that keymaps are +@file{keymap.c} and @file{keymap.h} define the @dfn{keymap} Lisp object +type and associated methods and primitives. (Remember that keymaps are objects that associate event descriptions with functions to be called to ``execute'' those events; @code{dispatch-event} looks up events in the relevant keymaps.) @@ -2687,12 +2716,12 @@ 22993 device.h @end example -These modules implement the device Lisp object type. This abstracts a -particular screen or connection on which frames are displayed. As with -Lisp objects, event interfaces, and other subsystems, the device code is -separated into a generic component that contains a standardized -interface (in the form of a set of methods) onto particular device -types. +These modules implement the @dfn{device} Lisp object type. This +abstracts a particular screen or connection on which frames are +displayed. As with Lisp objects, event interfaces, and other +subsystems, the device code is separated into a generic component that +contains a standardized interface (in the form of a set of methods) onto +particular device types. The device subsystem defines all the methods and provides method services for not only device operations but also for the frame, window, @@ -2718,9 +2747,9 @@ MDI (Multiple Document Interface) protocol in Microsoft Windows or a similar scheme. -The @file{frame-*} files implement the frame Lisp object type and provide the -generic and device-type-specific operations on frames (e.g. raising, -lowering, resizing, moving, etc.). +The @file{frame-*} files implement the @dfn{frame} Lisp object type and +provide the generic and device-type-specific operations on frames +(e.g. raising, lowering, resizing, moving, etc.). @@ -2736,8 +2765,8 @@ buffer's text can be displayed. Windows can also have scrollbars displayed around their edges. -@file{window.c} and @file{window.h} implement the window Lisp object -type and provide code to manage windows. Since windows have no +@file{window.c} and @file{window.h} implement the @dfn{window} Lisp +object type and provide code to manage windows. Since windows have no associated resources in the window system (the window system knows only about the frame; no child windows or anything are used for XEmacs windows), there is no device-type-specific code here; all of that code @@ -2911,7 +2940,7 @@ 14240 lstream.h @end example -These modules implement the stream Lisp object type. This is an +These modules implement the @dfn{stream} Lisp object type. This is an internal-only Lisp object that implements a generic buffering stream. The idea is to provide a uniform interface onto all sources and sinks of data, including file descriptors, stdio streams, chunks of memory, Lisp @@ -3016,11 +3045,11 @@ 3369 hash.h @end example -These files implement the hashtable Lisp object type. @file{hash.c} and -@file{hash.h} provide a generic C implementation of hash tables (which -can stand independently of XEmacs), and @file{elhash.c} and -@file{elhash.h} provide a Lisp interface onto the C hash tables using -the hashtable Lisp object type. +These files implement the @dfn{hashtable} Lisp object type. +@file{hash.c} and @file{hash.h} provide a generic C implementation of +hash tables (which can stand independently of XEmacs), and +@file{elhash.c} and @file{elhash.h} provide a Lisp interface onto the C +hash tables using the hashtable Lisp object type. @@ -3029,7 +3058,7 @@ 11167 specifier.h @end example -This module implements the specifier Lisp object type. This is +This module implements the @dfn{specifier} Lisp object type. This is primarily used for displayable properties, and allows for values that are specific to a particular buffer, window, frame, device, or device class, as well as a default value existing. This is used, for example, @@ -3094,8 +3123,9 @@ 20234 rangetab.c @end example -This module implements the range table Lisp object type, which provides -for a mapping from ranges of integers to arbitrary Lisp objects. +This module implements the @dfn{range table} Lisp object type, which +provides for a mapping from ranges of integers to arbitrary Lisp +objects. @@ -3104,13 +3134,13 @@ 2206 opaque.h @end example -This module implements the opaque Lisp object type, an internal-only -Lisp object that encapsulates an arbitrary block of memory so that it -can be managed by the Lisp allocation system. To create an opaque -object, you call @code{make_opaque()}, passing a pointer to a block of -memory. An object is created that is big enough to hold the memory, -which is copied into the object's storage. The object will then stick -around as long as you keep pointers to it, after which it will be +This module implements the @dfn{opaque} Lisp object type, an +internal-only Lisp object that encapsulates an arbitrary block of memory +so that it can be managed by the Lisp allocation system. To create an +opaque object, you call @code{make_opaque()}, passing a pointer to a +block of memory. An object is created that is big enough to hold the +memory, which is copied into the object's storage. The object will then +stick around as long as you keep pointers to it, after which it will be automatically reclaimed. @cindex mark method @@ -3629,17 +3659,20 @@ to support). This code is still in beta. @file{mule-charset.*} and @file{mule-coding.*} provide the heart of the -XEmacs MULE support. @file{mule-charset.*} implements the @dfn{charset} Lisp object, -which encapsulates a character set (an ordered one- or two-dimensional -set of characters, such as US ASCII or JISX0208 Japanese Kanji). -@file{mule-coding.*} implements the coding-system Lisp object, which -encapsulates a method of converting between different encodings. An -encoding is a representation of a stream of characters from multiple -character sets using a stream of bytes or words and defines (e.g.) which -escape sequences are used to specify particular character sets, how the -indices for a character are converted into bytes (sometimes this -involves setting the high bit; sometimes complicated rearranging of the -values takes place, as in the Shift-JIS encoding), etc. +XEmacs MULE support. @file{mule-charset.*} implements the @dfn{charset} +Lisp object type, which encapsulates a character set (an ordered one- or +two-dimensional set of characters, such as US ASCII or JISX0208 Japanese +Kanji). + +@file{mule-coding.*} implements the @dfn{coding-system} Lisp object +type, which encapsulates a method of converting between different +encodings. An encoding is a representation of a stream of characters +from multiple character sets using a stream of bytes or words and +defines (e.g.) which escape sequences are used to specify particular +character sets, how the indices for a character are converted into bytes +(sometimes this involves setting the high bit; sometimes complicated +rearranging of the values takes place, as in the Shift-JIS encoding), +etc. @file{mule-ccl.c} provides the CCL (Code Conversion Language) interpreter. CCL is similar in spirit to Lisp byte code and is used to @@ -4091,7 +4124,7 @@ lrecord_header} at their beginning. lcrecords, however, actually have a @code{struct lcrecord_header}. This, in turn, has a @code{struct lrecord_header} at its beginning, so sanity is preserved; but it also -has a pointer used to chain all lrecords together, and a special ID +has a pointer used to chain all lcrecords together, and a special ID field used to distinguish one lcrecord from another. (This field is used only for debugging and could be removed, but the space gain is not significant.) @@ -4462,7 +4495,7 @@ looking for unused strings. Each chunk of string data is preceded by a pointer to the corresponding @code{struct Lisp_String}, which indicates both whether the string is used and how big the string is, i.e. how to -get to the next chuck of string data. Holes are compressed by +get to the next chunk of string data. Holes are compressed by block-copying the next string into the empty space and relocating the pointer stored in the corresponding @code{struct Lisp_String}. @strong{This means you have to be careful with strings in your code.} @@ -4534,7 +4567,7 @@ synchronous event queue (first-in, first-out) in a process that we will call @dfn{collection}. - Note that each application has their own event queue. (It is + Note that each application has its own event queue. (It is immaterial whether the collection process directly puts the events in the proper application's queue, or puts them into a single system queue, which is later split up.) @@ -5005,8 +5038,7 @@ struct specbinding @{ Lisp_Object symbol, old_value; - Lisp_Object (*func) (); - Lisp_Object unused; /* Dividing by 16 is faster than by 12 */ + Lisp_Object (*func) (Lisp_Object); /* for unwind-protect */ @}; @end example @@ -6398,17 +6430,16 @@ Thus, there is a hierarchy console -> display -> frame -> window. There is a separate Lisp object type for each of these four concepts. -Furthermore, there is logically a @dfn{selected console}, +Furthermore, there is logically a @dfn{selected console}, @dfn{selected display}, @dfn{selected frame}, and @dfn{selected window}. -This particular object is distinguished in various ways, such as -that it is the default object for various functions that act -on objects of that type. Note that every containing object -rememembers the ``selected'' object among the objects that it -contains: e.g. not only is there a selected window, but -every frame remembers the last window in it that was selected, -and changing the selected frame causes the remembered window -within it to become the selected window. Similar relationships -apply for consoles to devices and devices to frames. +Each of these objects is distinguished in various ways, such as being the +default object for various functions that act on objects of that type. +Note that every containing object rememembers the ``selected'' object +among the objects that it contains: e.g. not only is there a selected +window, but every frame remembers the last window in it that was +selected, and changing the selected frame causes the remembered window +within it to become the selected window. Similar relationships apply +for consoles to devices and devices to frames. @node Point @section Point @@ -6465,8 +6496,8 @@ @enumerate @item -Horizontal combination windows can never have children that -are horizontal combination windows; same for vertical. +Horizontal combination windows can never have children that are +horizontal combination windows; same for vertical. @item Only leaf windows can be split (obviously) and this splitting does one
--- a/man/lispref/annotations.texi Mon Aug 13 08:45:53 2007 +0200 +++ b/man/lispref/annotations.texi Mon Aug 13 08:46:35 2007 +0200 @@ -100,7 +100,7 @@ The annotation is placed in the inside margin area, as close as possible to the first or last non-whitespace character on a line. If the inside margin is not wide enough for the annotation to fit, it will be -displayed if and only if the the specifier @code{use-left-overflow} or +displayed if and only if the specifier @code{use-left-overflow} or @code{use-right-overflow} (depending on which side the annotation appears in) is non-@code{nil}.
--- a/man/lispref/commands.texi Mon Aug 13 08:45:53 2007 +0200 +++ b/man/lispref/commands.texi Mon Aug 13 08:46:35 2007 +0200 @@ -724,7 +724,7 @@ @defvar last-command-char If the value of @code{last-command-event} is a keyboard event, then this -is the nearest @sc{ASCII} equivalent to it. This the the value that +is the nearest @sc{ASCII} equivalent to it. This is the value that @code{self-insert-command} will put in the buffer. Remember that there is @emph{not} a 1:1 mapping between keyboard events and @sc{ASCII} characters: the set of keyboard events is much larger, so writing code @@ -1087,7 +1087,7 @@ @defun event-over-text-area-p event Given a mouse-motion, button-press, or button-release event, this -function returns @code{t} if the event is over the the text area of a +function returns @code{t} if the event is over the text area of a window. Otherwise, @code{nil} is returned. The modeline is not considered to be part of the text area. @end defun
--- a/man/lispref/consoles-devices.texi Mon Aug 13 08:45:53 2007 +0200 +++ b/man/lispref/consoles-devices.texi Mon Aug 13 08:46:35 2007 +0200 @@ -26,11 +26,14 @@ normal window-system concept of a window. Frames can overlap, be displayed at various locations within the display, be resized, etc. For TTY, only one frame can be displayed at a time, and it occupies the -entire TTY display area. However, you can still define multiple frames +entire TTY display area. +@ignore @c Not yet implemented +However, you can still define multiple frames and switch between them. Their contents are entirely separate from each other. These sorts of frames resemble the ``virtual console'' capability provided under Linux or the multiple screens provided by the multiplexing program @samp{screen} under Unix. +@end ignore When you start up XEmacs, an initial console and device are created to receive input and display frames on. This will either be an X display
--- a/man/lispref/display.texi Mon Aug 13 08:45:53 2007 +0200 +++ b/man/lispref/display.texi Mon Aug 13 08:46:35 2007 +0200 @@ -208,20 +208,31 @@ @end example @end defun -Almost all the messages displayed in the echo area are also recorded -in the @samp{*Messages*} buffer. +Some of the messages displayed in the echo area are also recorded in the +@samp{ *Message-Log*} buffer. +@ignore @defopt message-log-max This variable specifies how many lines to keep in the @samp{*Messages*} buffer. The value @code{t} means there is no limit on how many lines to keep. The value @code{nil} disables message logging entirely. Here's how to display a message and prevent it from being logged: +@defopt log-message-max-size +This variable specifies how many lines to keep in the @samp{* Message-Log*} +buffer. The value @code{t} means there is no limit on how many lines to +keep. The value @code{nil} disables message logging entirely. Here's +how to display a message and prevent it from being logged: @example (let (message-log-max) (message @dots{})) @end example @end defopt +@end ignore +@defopt log-message-max-size +This variable specifies the maximum size of @samp{* Message-Log*} +buffer. +@end defopt @defvar echo-keystrokes This variable determines how much time should elapse before command
--- a/man/lispref/extents.texi Mon Aug 13 08:45:53 2007 +0200 +++ b/man/lispref/extents.texi Mon Aug 13 08:46:35 2007 +0200 @@ -407,7 +407,7 @@ @defun mapcar-extents function &optional predicate buffer-or-string from to flags property value This function applies @var{function} to all extents which overlap a -region in @var{buffer-or-string}. The region is is delimited by +region in @var{buffer-or-string}. The region is delimited by @var{from} and @var{to}. @var{function} is called with one argument, the extent. A list of the values returned by @var{function} is returned. An optional @var{predicate} may be used to further limit the
--- a/man/lispref/frames.texi Mon Aug 13 08:45:53 2007 +0200 +++ b/man/lispref/frames.texi Mon Aug 13 08:46:35 2007 +0200 @@ -608,13 +608,12 @@ is used whenever that frame is selected. If the frame has a minibuffer, you can get it with @code{minibuffer-window} (@pxref{Minibuffer Misc}). -However, you can also create a frame with no minibuffer (this is not -implemented as of 19.13, but will be in 19.14). Such a frame must use -the minibuffer window of some other frame. When you create the frame, -you can specify explicitly the minibuffer window to use (in some other -frame). If you don't, then the minibuffer is found in the frame which is -the value of the variable @code{default-minibuffer-frame}. Its value -should be a frame which does have a minibuffer. +However, you can also create a frame with no minibuffer. Such a frame +must use the minibuffer window of some other frame. When you create the +frame, you can specify explicitly the minibuffer window to use (in some +other frame). If you don't, then the minibuffer is found in the frame +which is the value of the variable @code{default-minibuffer-frame}. Its +value should be a frame which does have a minibuffer. @ignore Not yet in XEmacs If you use a minibuffer-only frame, you might want that frame to raise
--- a/man/lispref/glyphs.texi Mon Aug 13 08:45:53 2007 +0200 +++ b/man/lispref/glyphs.texi Mon Aug 13 08:46:35 2007 +0200 @@ -74,7 +74,7 @@ @end defun @defun make-glyph-internal &optional type -This function creates a new, uninitialzed glyph of type @var{type}. +This function creates a new, uninitialized glyph of type @var{type}. @end defun @defun make-pointer-glyph &optional spec-list @@ -185,7 +185,7 @@ the specification(s) for the given locale or locale type will be returned. This will only work if the actual value of @var{property} is a specifier (this will always be the case for built-in properties, but -not or not may apply to user-defined properties). If the actual value +may or may not apply to user-defined properties). If the actual value of @var{property} is not a specifier, this value will simply be returned regardless of @var{locale}. @@ -243,7 +243,7 @@ @var{domain} defaults to the selected window if omitted. @var{domain} can be a frame or device, instead of a window. The value -returned for a such a domain is used in special circumstances when a +returned for such a domain is used in special circumstances when a more specific domain does not apply; for example, a frame value might be used for coloring a toolbar, which is conceptually attached to a frame rather than a particular window. The value is also useful in @@ -496,8 +496,9 @@ @item jpeg (A JPEG-format image; only if JPEG support was compiled into this XEmacs. Can be instanced as @code{color-pixmap}. If you have the JPEG -libraries present on your system, XEmacs will automatically detect this -and use them, unless you explicitly disable it at configure time.) +libraries present on your system when XEmacs is built, XEmacs will +automatically detect this and use them, unless you explicitly disable it +at configure time.) @item png (A PNG/GIF24 image; only if PNG support was compiled into this XEmacs. Can be instanced as @code{color-pixmap}.) @@ -596,12 +597,13 @@ the image is being instantiated. If the instantiator specifies data from a file, the data will be read in -at the time that the instantiator is added to the image (which may be -well before when the image is actually displayed), and the instantiator -will be converted into one of the inline-data forms, with the filename -retained using a @code{:file} keyword. This implies that the file must -exist when the instantiator is added to the image, but does not need to -exist at any other time (e.g. it may safely be a temporary file). +at the time that the instantiator is added to the image specifier (which +may be well before the image is actually displayed), and the +instantiator will be converted into one of the inline-data forms, with +the filename retained using a @code{:file} keyword. This implies that +the file must exist when the instantiator is added to the image, but +does not need to exist at any other time (e.g. it may safely be a +temporary file). @defun valid-image-instantiator-format-p format This function returns non-@code{nil} if @var{format} is a valid image @@ -1007,7 +1009,7 @@ @defun set-frame-pointer frame image-instance This function sets the mouse pointer of @var{frame} to the given pointer image instance. You should not call this function directly. -(If you do, the pointer will change the next time the mouse moves.) +(If you do, the pointer will change again the next time the mouse moves.) @end defun @node Redisplay Glyphs
--- a/man/lispref/internationalization.texi Mon Aug 13 08:45:53 2007 +0200 +++ b/man/lispref/internationalization.texi Mon Aug 13 08:46:35 2007 +0200 @@ -140,7 +140,7 @@ @dots{} ) @end example -It is most efficient to specify the domain in the first line of of the +It is most efficient to specify the domain in the first line of the function body, before the @code{interactive} form. For variables and constants which have documentation strings, specify the
--- a/man/lispref/menus.texi Mon Aug 13 08:45:53 2007 +0200 +++ b/man/lispref/menus.texi Mon Aug 13 08:46:35 2007 +0200 @@ -169,7 +169,7 @@ @item :suffix @var{string} The string is appended to the displayed name. This provides a convenient way of adding the name of a command's ``argument'' to the -menu, like like @samp{Kill Buffer NAME}. +menu, like @samp{Kill Buffer NAME}. @item :keys @var{string} Normally, the keyboard equivalents of commands in menus are displayed
--- a/man/lispref/specifiers.texi Mon Aug 13 08:45:53 2007 +0200 +++ b/man/lispref/specifiers.texi Mon Aug 13 08:46:35 2007 +0200 @@ -293,16 +293,16 @@ @item font The valid instantiators are strings describing fonts or vectors -indicating inheritance from the font of some face. Instance objects -are font-instance objects, which are specific to a particular device. -The instantiation method in this specifier can fail, unlike for -integer, natnum, boolean, and generic specifiers. +indicating inheritance from the font of some face. Instance objects are +font-instance objects, which are specific to a particular device. The +instantiation method for font specifiers can fail, unlike for integer, +natnum, boolean, and generic specifiers. @item color The valid instantiators are strings describing colors or vectors indicating inheritance from the foreground or background of some face. Instance objects are color-instance objects, which are specific to a -particular device. The instantiation method in this specifier can fail, +particular device. The instantiation method for color specifiers can fail, as for font specifiers. @item image @@ -313,7 +313,7 @@ background-pixmap property of some face. Instance objects are either strings (for text images), image-instance objects (for pixmap images), or subwindow objects (for subwindow images). The instantiation method -in this specifier can fail, as for font and color specifiers. +for image specifiers can fail, as for font and color specifiers. @item face-boolean The valid instantiators are the symbols @code{t} and @code{nil} and @@ -328,6 +328,13 @@ or four elements). @xref{Toolbar} for more information. @end table +Color and font instance objects can also be used in turn as +instantiators for a new color or font instance object. Since these +instance objects are device-specific, the instantiator can be used +directly as the new instance object, but only if they are of the same +device. If the devices differ, the base color or font of the +instantiating object is effectively used instead as the instantiator. + @xref{Faces and Window-System Objects} for more information on fonts, colors, and face-boolean specifiers. @xref{Glyphs} for more information about image specifiers. @xref{Toolbar} for more information on toolbar
--- a/man/lispref/tips.texi Mon Aug 13 08:45:53 2007 +0200 +++ b/man/lispref/tips.texi Mon Aug 13 08:46:35 2007 +0200 @@ -533,7 +533,7 @@ The indentation commands of the Lisp modes in XEmacs, such as @kbd{M-;} (@code{indent-for-comment}) and @key{TAB} (@code{lisp-indent-line}) automatically indent comments according to these conventions, -depending on the the number of semicolons. @xref{Comments,, +depending on the number of semicolons. @xref{Comments,, Manipulating Comments, emacs, The XEmacs Reference Manual}. @node Library Headers
--- a/man/make-stds.texi Mon Aug 13 08:45:53 2007 +0200 +++ b/man/make-stds.texi Mon Aug 13 08:46:35 2007 +0200 @@ -669,7 +669,7 @@ named, use @code{ln} or @code{cp} to install the proper files in it, and then @code{tar} that subdirectory. -Compress the tar file file with @code{gzip}. For example, the actual +Compress the tar file with @code{gzip}. For example, the actual distribution file for GCC version 1.40 is called @file{gcc-1.40.tar.gz}. The @code{dist} target should explicitly depend on all non-source files
--- a/man/makeinfo.c Mon Aug 13 08:45:53 2007 +0200 +++ b/man/makeinfo.c Mon Aug 13 08:46:35 2007 +0200 @@ -2904,9 +2904,8 @@ } } -/* Remove upto COUNT characters of whitespace from the - the current output line. If COUNT is less than zero, - then remove until none left. */ +/* Remove upto COUNT characters of whitespace from the current output + line. If COUNT is less than zero, then remove until none left. */ static void kill_self_indent (int count) { @@ -3201,7 +3200,7 @@ } /* Search forward for STRING in input_text. - FROM says where where to start. */ + FROM says where to start. */ static int search_forward (char *string, int from) { @@ -6084,7 +6083,7 @@ case IFSET: case IFCLEAR: /* If IFSET and NAME is not set, or if IFCLEAR and NAME is set, - read lines from the the file until we reach a matching + read lines from the file until we reach a matching "@end CONDITION". This means that we only take note of "@ifset/clear" and "@end" commands. */ {
--- a/man/new-users-guide/xmenu.texi Mon Aug 13 08:45:53 2007 +0200 +++ b/man/new-users-guide/xmenu.texi Mon Aug 13 08:46:35 2007 +0200 @@ -136,7 +136,7 @@ which provides commands for editing, help and other options. All these options are also available via key commands, the menus just provide convenient short-cuts. The key commands are displayed -right besides some of the the options. The following is a brief +right besides some of the options. The following is a brief description of the four default menus on the menu bar: @menu
--- a/man/psgml-api.texi Mon Aug 13 08:45:53 2007 +0200 +++ b/man/psgml-api.texi Mon Aug 13 08:46:35 2007 +0200 @@ -1,10 +1,18 @@ \input texinfo @c -*-texinfo-*- @c %**start of header -@setfilename psgml-api.info +@setfilename ../info/psgml-api.info @settitle psgml-api @c @setchapternewpage odd @c %**end of header -@c $Id: psgml-api.texi,v 1.1.1.1 1996/12/18 03:36:11 steve Exp $ +@c $Id: psgml-api.texi,v 1.1.1.2 1996/12/18 03:47:33 steve Exp $ + +@ifinfo +@format +START-INFO-DIR-ENTRY +* PSGML-API: (psgml-api). PSGML, the API documentation. +END-INFO-DIR-ENTRY +@end format +@end ifinfo @ifinfo Documentation for PSGML, a major mode for SGML. @@ -592,6 +600,23 @@ system identifier is not handled the function should return nil. @end defvar +@defvar sgml-doctype-parsed-hook +This hook is caled after the doctype has been parsed. +It can be used to load any additional information into the DTD structure. +@end defvar + +@defvar sgml-close-element-hook +@c *** +The hook run by `sgml-close-element'. +These functions are invoked with `sgml-current-tree' bound to the +element just parsed. +@end defvar + +*** sgml-new-attribute-list-function +This hook is run when a new element is inserted to construct the +attribute specification list. The default function prompts for the +required attributes. + @c ------------------------------------------------------------------ @node Implementation, Index, Hooks, Top
--- a/man/psgml.texi Mon Aug 13 08:45:53 2007 +0200 +++ b/man/psgml.texi Mon Aug 13 08:46:35 2007 +0200 @@ -7,12 +7,20 @@ @syncodeindex vr cp @synindex ky cp @c %**end of header -@c $Id: psgml.texi,v 1.1.1.1 1996/12/18 03:36:10 steve Exp $ +@c $Id: psgml.texi,v 1.1.1.2 1996/12/18 03:47:31 steve Exp $ + +@ifinfo +@format +START-INFO-DIR-ENTRY +* PSGML: (psgml). PSGML, a major mode for SGML documents. +END-INFO-DIR-ENTRY +@end format +@end ifinfo @ifinfo Documentation for PSGML, a major mode for SGML. -Copyright 1994 Lennart Staflin +Copyright 1994, 1996 Lennart Staflin Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and @@ -49,7 +57,7 @@ @c start the copyright page. @page @vskip 0pt plus 1filll -Copyright @copyright{} 1994 Lennart Staflin +Copyright @copyright{} 1994, 1996 Lennart Staflin @c Published by ... @@ -83,9 +91,8 @@ @ifinfo @top PSGML -PSGML is a major mode for editing SGML documents, with special -additions for HTML. This is the DRAFT documentation for PSGML -version 1.0. +PSGML is a major mode for editing SGML documents. This is the DRAFT +documentation for PSGML version 1.0. @end ifinfo @menu @@ -98,10 +105,15 @@ * Managing the DTD:: Specifying what DTD to use * Edit:: Commands for editing * Display:: Appearance of text in the buffer +* Miscellaneous options:: * Bugs:: Reporting bugs * Index:: @end menu + +@c *** section about error recovery ?? + + @c ------------------------------------------------------------------ @node Introduction, Install, Top, Top @@ -113,11 +125,10 @@ @cindex RANK @cindex SGML Declaration -PSGML is a major mode for editing SGML documents, and includes a number -of features for working specifically with HTML. It works with GNU Emacs -19.19 and later or with Lucid Emacs 19.9 and later. PSGML contains a -simple SGML parser and can work with any DTD. Functions provided -includes menus and commands for inserting tags with only the +PSGML is a major mode for editing SGML documents. It works with GNU +Emacs 19.19 and later or with Lucid Emacs 19.9 and later. PSGML +contains a simple SGML parser and can work with any DTD. Functions +provided includes menus and commands for inserting tags with only the contextually valid tags, identification of structural errors, editing of attribute values in a separate window with information about types and defaults, and structure based editing. @@ -128,8 +139,11 @@ A good introduction to SGML is @cite{A Gentle Introduction to SGML} produced by Text Encoding Initiative (this is really chapter 2 of TEI -P3). This can be found on +P3). This can be found on + +@display @file{ftp://ftp.ifi.uio.no/pub/SGML/TEI/P3SG.DOC}. +@end display A SGML document has three major parts, in order: @@ -143,11 +157,11 @@ @end enumerate The SGML declaration contains general information about character sets, -concrete syntax, and SGML features used. PSGML does not use the SGML -Declaration, it can be left out, and if included is ignored. Many SGML +concrete syntax, and SGML features used. PSGML does not use the SGML +Declaration, it can be left out, and if included is ignored. Many SGML systems allow the SGML declaration to be defaulted. PSGML always use the Concrete Reference Syntax but without limitations on -lengths. Features used has to be indicated with variables (@pxref{SGML +lengths. Features used has to be indicated with variables (@pxref{SGML declaration}). The document type declaration specifies the valid elements and entities @@ -155,7 +169,7 @@ reside in another file (@pxref{Managing the DTD}). The system declaration for PSGML: -@format +@example SYSTEM "ISO 8879:1986" CHARSET BASESET "ISO 646-1983//CHARSET @@ -173,7 +187,7 @@ GENERAL NO MODEL NO EXCLUDE NO CAPACITY NO NONSGML NO SGML NO FORMAL NO SDIF PACK NO UNPACK NO -@end format +@end example @c ------------------------------------------------------------------------- @@ -181,13 +195,32 @@ @comment node-name, next, previous, up @chapter Installing PSGML +To install PSGML you first need to uncompress and unpack the source +archive. This is done with the @code{gunzip} and @code{tar} commands. + +@example +gunzip psgml-1.0a12.tar.gz; tar xf psgml-1.0a12.tar +@end example + +This should create a subdirectory to the current directory with the +source code. This directory contains a @code{configure} command (see the +file INSTALL for more information about configure). You can use the +@code{configure} command to configure the package or you can load the +file @file{psgml-maint} and execute the @code{psgml-compile-files} +command. + Place the @file{*.el} and the @file{*.elc} files in a directory where Emacs can find it (i.e. one of the directories in the @code{load-path} variable, you can add a directory to this variable in your -@file{.emacs}.) If you obtained PSGML without @file{*.elc} files, you -can create them by letting Emacs byte compile the @file{*.el} files (use -@kbd{M-x byte-compile-file}). Parsing SGML in Emacs Lisp is slow and -needs all the speed it can get. +@file{.emacs}.) + +If you use the @code{configure} approach, compile psgml with @code{make} +and the you can run @code{make install} to install it in the system +library @file{site-lisp}. The files are installed in a subdirectory +named @file{psgml}. The location of @file{site-lisp} is figured out by +@code{configure}, but you can change it in the @file{Makefile}. You +need to make sure that this subdirectory is in Emacs @code{load-path}. + Put the following line in your .emacs: @@ -258,10 +291,13 @@ @cindex public identifier @cindex system identifier @cindex external identifier +@cindex entity catalog + +@c *** sgml-sysid-resolve-functions SGML can refer to an external file (really entity) with an @emph{external identifier}, this is a @emph{public identifier} or a -@emph{system identifier}. +@emph{system identifier}, or both. A typical public identifier looks like @@ -285,37 +321,69 @@ catalog files and then search the list of file name templates in the variable @code{sgml-public-map}. -*** Describe the catalog format - -The catalog format is according to SGML/Opens resoution on entity -management. The catalog consists of a series of entries and comment. A +The catalog format is according to SGML/Opens resolution on entity +management. The catalog consists of a series of entries and comments. A comment is delimited by @samp{--} like in a markup declaration. The entry types recognized are described in the following table. @table @samp -@item PUBLIC @var{pubid} @var{file} +@item public @var{pubid} @var{file} The @var{file} will be used for the entity text of an entity with the public identifier @var{pubid}. -@item ENTITY @var{name} @var{file} +@item entity @var{name} @var{file} The @var{file} will be used for the entity text of an entity -with the name @var{name}. If the @var{name} starts with a @samp{%} the +with the name @var{name}. If the @var{name} starts with a @samp{%} the rest of the name will be matched against parameter entities. -@item DOCTYPE @var{name} @var{file} -The DOCTYPE keyword indicates that an entity manager should use the -associated |storage object identifier| to locate the entity text -(to be used as the external subset) for a doctype declaration whose -document type name is specified by the |entity name spec|. +@item doctype @var{name} @var{file} +The @var{file} will be used for the entity text of an entity +used as external subset of a document declaration with @var{name} as +document type name. -@item SGMLDECL @var{file} -The SGMLDECL keyword indicates that an entity manager should use -the associated |storage object identifier| to locate the entity -text to be used as the SGML declaration. +@item sgmldecl @var{file} +Used to specify a default SGML declaration. Recognized but not used by +PSGML other than to pass to an external validation command +(@code{sgml-validate-command}). @end table +When PSGML is looking for the file containing an external entity, the +following things will be tried in order: + +@enumerate + +@vindex sgml-system-identifiers-are-preferred +@item +Try the system identifier, as a file name, if there is a system +identifier and the variable @code{sgml-system-identifiers-are-preferred} +is non-@code{nil} and there is no elements containing @samp{%s} in +@code{sgml-public-map}. If the system identifier is a relative file name +it will be relative to the directory containing the defining entity. + +@item +Look thru each catalog in @code{sgml-local-catalogs} and +@code{sgml-catalog-files} in order. For each catalog look first for +entries matching the public identifier, if any. Then look for other +matching entries in the order they appear in the catalog. + +Currently an entry will be ignored if it is matching but its file is +non-existent or unreadable. (This is under reconsideration, perhaps it +should signal error instead). + +@item +Try the system identifier, if any, as a file name. +If @code{sgml-system-identifiers-are-preferred} is @code{nil} +and there is no elements containing @samp{%s} in @code{sgml-public-map}. + +@item +Try the entries in @code{sgml-public-map}. Using the catalogs are +preferred. The @code{sgml-public-map} may disappear in a future version +of PSGML (not soon though). + +@end enumerate + The @code{sgml-public-map} variable can contain a list of file name templates where @samp{%P} will be substituted with the whole public identifier, owner is substituted for @samp{%O}, public text class for @@ -323,7 +391,12 @@ will be converted to lower case and the owner and description will be transliterated according to the variable @code{sgml-public-transliterations}. The templates in the list is tried -in order until an existing file is found. +in order until an existing file is found. The @code{sgml-public-map} is +modeled after @file{sgmls} environment variable @code{SGML_PATH} and +psgml understand the following substitution characters: %%, %N, %P, %S, +%Y, %C, %L, %O, %T, and %V. The the default value of +@code{sgml-public-map} is taken from the environment variable +@code{SGML_PATH}. Given the public identifier above and the file name template @samp{/usr/local/lib/sgml/%o/%c/%d}, the resulting file name is @@ -356,9 +429,19 @@ buffer. @end defopt +@defopt sgml-system-identifiers-are-preferred +If @code{nil}, PSGML will look up external entities by searching the +catalogs in @code{sgml-local-catalogs} and @code{sgml-catalog-files} and +only if the entity is not found in the catalogs will a given system +identifier be used. If the variable is non-nil and a system identifier is +given, the system identifier will be used for the entity. If no system +identifier is given the catalogs will searched. +@end defopt + + @defopt sgml-public-map -This should be a list of file name templates. This variable is -initialized from the environment variable @code{SGML_PATH}. This is +This should be a list of file name templates. This variable is +initialized from the environment variable @code{SGML_PATH}. This is the same environment variable that @file{sgmls} uses. If the environment variable is undefined the default is @@ -377,34 +460,49 @@ @kindex C-c C-v @findex sgml-validate -PSGML can not validate an SGML document (see below what it can and can't -do). If you have a validating SGML parser, like @file{sgmls}, you can -run the parser on your file with the command @kbd{C-c C-v} -(@code{sgml-validate}). +PSGML can not validate an SGML document (see below what it can +and can't do). If you have a validating SGML parser, like +@file{sgmls}, you can run the parser on your file with the +command @kbd{C-c C-v} (@code{sgml-validate}). Some variables control this function: @defopt sgml-validate-command The shell command to validate an SGML document. -This is a @code{format} control string that by default should contain -two `%s' conversion specifications: the first will be replaced by the +This is a @code{format} control string that by default should contain two +@code{%s} conversion specifications: the first will be replaced by the value of @code{sgml-declaration} (or the empty string, if nil); the -second will be replaced by the current buffer's file name (or the empty -string, if nil). +second will be replaced by the current buffer's file name (or the +empty string, if nil). + +If @code{sgml-validate-files} is non-nil, the format string should contain +one @code{%s} conversion specification for each element of its result. -If @code{sgml-validate-files} is non-nil, the format string should -contain one `%s' conversion specification for each element of its -result. +If sgml-validate-command is a list, then every element should be a +string. The strings will be tried in order and @samp{%}-sequences in the +string will be replaced according to the list below, if the string contains +@samp{%}-sequences with no replacement value the next string will be tried. + +@table @code +@item %b +means the visited file of the current buffer -The default value is @code{sgml -s %s %s}. +@item %s +means the SGML declaration specified in the sgml-declaration variable + +@item %d +means the file containing the DOCTYPE declaration, if not in the buffer +@end table + +The default value is @code{nsgmls -s %s %s}. @end defopt @defopt sgml-validate-files -If non-nil, a function of no arguments that returns a list of file -names. These file names will serve as the arguments to the -@code{sgml-validate-command} format control string instead of the -defaults. +If non-nil, a function of no arguments that returns a list of +file names. These file names will serve as the arguments to the +@code{sgml-validate-command} format control string instead of +the defaults. @end defopt @defopt sgml-declaration @@ -412,9 +510,9 @@ @end defopt @defopt sgml-offer-save -If non-nil, @kbd{C-c C-v} (@code{sgml-validate}) will ask about saving -modified buffers before running the validate command. The default value -is @code{t}. +If non-nil, @kbd{C-c C-v} (@code{sgml-validate}) will ask about +saving modified buffers before running the validate command. +The default value is @code{t}. @end defopt @@ -433,12 +531,11 @@ @item Errors in attribute specifications. @item -Markup errors in entity replacement text. -@item Omitted start-tags for empty elements. @end itemize +@c -------------------------------------------------------------------------- @node SGML declaration, Managing the DTD, Validate, Top @comment node-name, next, previous, up @chapter SGML Declaration @@ -485,41 +582,110 @@ @comment node-name, next, previous, up @chapter Document Type Declaration @cindex DOCTYPE +@cindex DTD + +@vindex sgml-default-doctype-name +PSGML needs to know about the DTD you are using for many of its commands. +If you do not have a @samp{DOCTYPE} declaration in your file, +PSGML will try assume that there is one of the form + +@example +<!DOCTYPE @var{name} SYSTEM> +@end example + +where @var{name} is the value of @code{sgml-default-doctype-name}, if +the value is non-@code{nil}, else the GI of the first tag will be used. @findex sgml-parse-prolog -PSGML needs to know about the DTD you are using for many of its commands. -You can use PSGML without specifying a DTD, it will then accept any tags -and assume a content model of @code{ANY} with no omissible tags. - -If you have a @samp{DOCTYPE} declaration in your file, PSGML will try to -parse this. Either the first time you do something that needs to parse -the document or with the command @code{sgml-parse-prolog}. Big DTDs -take some time to parse. - -@vindex sgml-system-path -@vindex sgml-default-dtd-file -@vindex sgml-parent-document -You can have the @samp{DOCTYPE} declaration in another file either by -setting @code{sgml-parent-document} to the other file or by creating a -saved DTD and setting @code{sgml-default-dtd-file} to that file. If -@code{sgml-default-dtd-file} contains a relative file name, the -directories in @code{sgml-system-path} will be searched for the file. - - -@findex sgml-save-dtd -@findex sgml-load-dtd -If parsing the DTD takes too long time you can save the parsed DTD in a -file using the command @kbd{M-x sgml-save-dtd}. Next time PSGML can -load that file instead of parsing the DTD. For PSGML to find the saved -DTD you must either save the DTD using the default name or do a @kbd{M-x -sgml-save-options} after saving the DTD. To directly use an already -parsed and saved DTD, load the file containing the saved DTD with the -command @kbd{M-x sgml-load-dtd}. +@vindex sgml-auto-activate-dtd +PSGML will try to parse the document type declaration the first time +you do something that needs to parse the document or immediately if the +variable @code{sgml-auto-activate-dtd} is @code{t}. You can also +initiate the parsing of the document type declaration with the command +@code{sgml-parse-prolog}. Big DTDs take some time to parse. When the DTD has been parsed or loaded the name of the document element will be displayed in the mode line inside brackets. If there was an error parsing the DTD or there is no DTD, the mode line will display -@samp{[ANY]}. +@samp{[ANY]} (*** this is not really correct! a DTD will be established +even if there are missing entities, it may even be empty). + +@menu +* Precompiled DTD Subsets:: +* Using a Split Document:: +* Inserting a DOCTYPE:: +* Information from the DTD:: +@end menu + + +@c ------------------------------------------------------------ +@node Precompiled DTD Subsets, Using a Split Document, Managing the DTD, Managing the DTD +@comment node-name, next, previous, up +@section Precompiled DTD Subsets + +If parsing the DTD takes too long time you can arrange to have PSGML +cache an internal complied version of the DTD. Caching can be done of +DTD fragments in favourable situations. It is possible to have an +external DTD subset cached but still have an internal DTD subset as long +as the internal subset does not define parameter entities that affect +the parsing of the external subset (*** what is the exact conditions?, +probably you can't use the cached external subset if the internal subset +defines parameter entities that are also defined in the external subset +with another value). + +@vindex sgml-ecat-files +@vindex sgml-local-ecat-files +To enable caching you have to create special catalog files, hear after +called ECAT files due to (temporary) lack of imagination. These catalogs +have similar syntax to the entity catalogs and there are two variables +containing lists of catalogs to search: @code{sgml-ecat-files} and +@code{sgml-local-ecat-files}. The ECAT files can contain the following +types of entries: + +@table @samp +@item file @var{dtdfile} @var{entitydef} @var{cfile} +The @var{dtdfile} is the name of a file containing a DTD subset that +should be cached in @var{cfile}. The @var{entitydef} is optional and if +given have the following syntax: +@example +[ @var{name1} @var{literal1} @var{name2} @var{literal2} @dots{} ] +@end example +Using @var{entitydef} will modify the DTD subset by defining the +parameter entity with name @var{name1} to be @var{literal1}, @dots{}. The +cached version of the subset will be created with those entity +definitions, and when PSGML search for a matching cached subset will check +that the parameter entities in @var{entitydef} has been defined with +those values before trying to use @file{cfile}. + +@item public @var{pubid} @var{entitydef} @var{cfile} +Cache the DTD subset with public identifier @var{pubid} in file +@var{cfile}. +@end table + + +@defopt sgml-recompile-out-of-date-cdtd +If non-@code{nil}, out of date compiled DTDs will be automatically +recompiled. If the value is @code{ask}, PSGML will ask before +recompiling. A @code{nil} value will cause PSGML to silently load an out +of date compiled DTD. A DTD that refers to undefined external entities +is always out of date, thus in such case it can be useful to set this +variable to @code{nil}. +@end defopt + + +Previous versions of PSGML have had another way of speeding up DTD +parsing. This code remains in this version of PSGML, but is not actively +maintained and may disappear in the future. + +@findex sgml-save-dtd +@findex sgml-load-dtd +@vindex sgml-default-dtd-file +You can save the parsed DTD in a file using the command @kbd{M-x +sgml-save-dtd}. Next time PSGML can load that file instead of parsing +the DTD. For PSGML to find the saved DTD you must either save the DTD +using the default name or do a @kbd{M-x sgml-save-options} after saving +the DTD. To directly use an already parsed and saved DTD, load the file +containing the saved DTD with the command @kbd{M-x sgml-load-dtd}. @defopt sgml-default-dtd-file This is the default file name for saved DTD. This is set by @@ -528,14 +694,71 @@ variables section of the file. @end defopt +@c true with system-path +@c either or by creating a saved DTD and setting +@c @code{sgml-default-dtd-file} to that file. If +@c @code{sgml-default-dtd-file} contains a relative file name, the +@c directories in @code{sgml-system-path} will be searched for the file. + + +@c ------------------------------------------------------------ +@node Using a Split Document, Inserting a DOCTYPE, Precompiled DTD Subsets, Managing the DTD +@comment node-name, next, previous, up +@section Using a Split Document + +@c *** why not defopt?? +@vindex sgml-doctype +You can have the @samp{DOCTYPE} declaration in another file by setting +@code{sgml-doctype} to the other file. + @defopt sgml-parent-document -This can be set to the name (a string) of a file containing the -@samp{DOCTYPE} declaration to use, or a list @code{(@var{filename} -@var{doctypename})}, where @var{filename} is the name of a file -containing the @samp{DOCTYPE} declaration to use, with the modification -that the document type name is @var{doctypename}. +Used when the current file is part of a bigger document. + +The variable describes how the current file's content fit into the element +hierarchy. The variable should have the form + +@lisp +(@var{parent-file} @var{context-element}* @var{top-element} (@var{has-seen-element}*)?) +@end lisp + +@table @var +@item parent-file +is a string, the name of the file containing the +document entity. + +@item context-element +is a string, that is the name of an element type. +It can occur 0 or more times and is used to set up +exceptions and short reference map. Good candidates +for these elements are the elements open when the +entity pointing to the current file is used. + +@item top-element +is a string that is the name of the element type +of the top level element in the current file. The file +should contain one instance of this element, unless +the last (lisp) element of sgml-parent-document is a +list. If it is a list, the top level of the file +should follow the content model of top-element. + +@item has-seen-element +is a string that is the name of an element type. This +element is satisfied in the content model of top-element. +@end table @end defopt + +@c ------------------------------------------------------------ +@node Inserting a DOCTYPE, Information from the DTD, Using a Split Document, Managing the DTD +@comment node-name, next, previous, up +@section Inserting a DOCTYPE + +@kindex C-c C-u C-d +@findex sgml-custom-dtd +*** Describe the DTD menu in general. Describe customized entries for +special DTDs. Mention @kbd{C-c C-u C-d} for inserting a DOCTYPE from +keyboard. + If you change the doctype you must execute @code{sgml-parse-prolog}, changes in the doctype are not automatically recognized. @@ -543,7 +766,7 @@ Menu entries to be added to the DTD menu. The value should be a list of entries to be added to the DTD menu. -Every entry should be a list. The first element of the entry is a string +Every entry should be a list. The first element of the entry is a string used as the menu entry. The second element is a string containing a doctype declaration (this can be nil if no doctype). The rest of the list should be a list of variables and values. For backward @@ -570,6 +793,55 @@ @end example @end defopt + +@c ------------------------------------------------------------ +@node Information from the DTD, , Inserting a DOCTYPE, Managing the DTD +@comment node-name, next, previous, up +@section Information from the DTD +@cindex DTD +@cindex Element + +PSGML can list various information about the current DTD. +The following commands can be used via @kbd{M-x} and +can also be found in the DTD menu. + +@table @code +@findex sgml-general-dtd-info +@item sgml-general-dtd-info +Display information about the current DTD. + +@findex sgml-describe-element-type +@item sgml-describe-element-type +Describe the properties of an element type as declared in the current DTD. + +@cindex entity +@findex sgml-describe-entity +@item sgml-describe-entity +Describe the properties of an entity as declared in the current DTD. + +@findex sgml-list-elements +@item sgml-list-elements +Will list all elements and the attributes declared for the element. + +@findex sgml-list-attributes +@item sgml-list-attributes + Will list all attributes declared and the elements that use them. + +@findex sgml-list-terminals +@item sgml-list-terminals +Will list all elements that can contain data. + +@findex sgml-list-occur-in-elements +@item sgml-list-occur-in-elements +Will list all element types and where it can occur. + +@findex sgml-list-content-elements +@item sgml-list-content-elements +Will list all element types and the element types that can occur +in its content. +@end table + + @c --------------------------------------------------------------------------- @node Edit, Display, Managing the DTD, Top @comment node-name, next, previous, up @@ -583,6 +855,7 @@ * Move:: Move in the element structure * Attributes:: Editing attributes * Change and delete:: Changing and deleting markup +* Translating characters and entities:: @end menu @c ------------------------------------------------------------------ @@ -627,17 +900,28 @@ @kindex C-c C-e @findex sgml-insert-element +@vindex sgml-insert-end-tag-on-new-line @item C-c C-e -Insert start and end-tags for an element (@code{sgml-insert-element}). -The name of the element is read from the mini-buffer with completion on -valid elements. +Insert start and end-tags for an element +(@code{sgml-insert-element}). The name of the element is read +from the mini-buffer with completion on valid elements. If +@code{sgml-insert-end-tag-on-new-line} is non-nil or the +element has element content, the end-tag will be inserted on a +new line after the start-tag. +@vindex sgml-omittag-transparent If @code{sgml-omittag-transparent} is nil, the list of valid elements will only contain the elements that can be in the content of the current element. +@vindex sgml-auto-insert-required-elements +@vindex sgml-insert-missing-element-comment Required elements in the content will be automatically inserted if the -option @code{sgml-auto-insert-required-elements} is non-nil. +option @code{sgml-auto-insert-required-elements} is non-nil. +When the content model demands an element but there is more +than one to choose from, a comment can be inserted with the +available choices if the option +@code{sgml-insert-missing-element-comment} is non-nil. @kindex C-c C-r @findex sgml-tag-region @@ -674,6 +958,13 @@ Value for @var{attribute} (@var{type} Default: @var{current value}): @end example +@kindex C-c C-u C-m +@findex sgml-custom-markup +@item C-c C-u C-m +Give keyboard access to the customized part of the Markup menu. +Emacs will prompt for the markup to insert using the menu line as +selector. (See @var{sgml-custom-markup} below.) + @end table Menu bar: @@ -723,7 +1014,7 @@ @kindex S-@key{mouse-1} A menu is also available directly with a mouse button click in the buffer. In GNU Emacs it is the first mouse button combined with shift -(@kbd{S-@key{mouse-1}}). In Lucid Emacs it is bound to the third mouse +(@kbd{S-@key{mouse-1}}). In XEmacs it is bound to the third mouse button. The mouse button click will pop-up a menu of valid tags or a menu of attributes if the point is in a start-tag. The attributes menu works as the ``Insert attribute'' menu from the menu-bar. The tags list @@ -790,6 +1081,19 @@ @end defopt +@defopt sgml-insert-missing-element-comment +If non-nil, and sgml-auto-insert-required-elements also true, +@code{sgml-insert-element} will insert a comment if there is an +element required but there is more than one to choose from. +@end defopt + +@defopt sgml-insert-end-tag-on-new-line +If non-nil, @code{sgml-insert-element} will put the end-tag on +a new line after the start-tag. Useful on slow terminals if you +find the end-tag after the cursor irritating. +@end defopt + + @c ------------------------------------------------------------------------- @node Complete, Information, Insert, Edit @comment node-name, next, previous, up @@ -1012,7 +1316,7 @@ @c -------------------------------------------------------------------------- -@node Change and delete, , Attributes, Edit +@node Change and delete, Translating characters and entities, Attributes, Edit @comment node-name, next, previous, up @section Changing and deleting markup @@ -1071,6 +1375,13 @@ fill the pure elements recursively. @end enumerate +@findex sgml-expand-all-shortrefs +@item M-x sgml-expand-all-shortrefs +Short references to text entities are expanded to the replacement text +of the entity other short references are expanded into general entity +references. If argument, @var{to-entity}, is non-@code{nil}, or if +called interactive with numeric prefix argument, all short references +are replaced by generally entity references. @findex sgml-normalize @item M-x sgml-normalize @@ -1078,6 +1389,8 @@ @enumerate @item +expand short references, +@item insert missing tags, @item replace minimized tags with full tags, @@ -1085,6 +1398,9 @@ fix attribute specification lists according to options set. @end enumerate +There is one argument, @var{to-entity}, with the same meaning as for +@code{sgml-expand-all-shortrefs}. + There is one option for the normalize command. With its default value, normalize may actually change the data content of some elements. But only by removing some white-space from the end of elements with omitted @@ -1099,18 +1415,44 @@ @end defopt +@c -------------------------------------------------------------------------- +@node Translating characters and entities, , Change and delete, Edit +@comment node-name, next, previous, up +@section Translating between characters and entity references + +@c *** Need work.. + +Set the variable @code{sgml-display-char-list-filename} to a file file that +contains mappings between all characters present in the presentation +character set, and their "standard replacement text" names, e.g. "å" +-> "[aring ]", e.t.c. + +The default value for this variable is `iso88591.map'. + +The use the functions (also in the Modify menu) + +@table @code +@findex sgml-charent-to-display-char +@item sgml-charent-to-display-char +@findex sgml-display-char-to-charent +@item sgml-display-char-to-charent +@end table + +to translate between entities and characters. + @c --------------------------------------------------------------------------- -@node Display, Bugs, Edit, Top +@node Display, Miscellaneous options, Edit, Top @comment node-name, next, previous, up @chapter Appearance of text in the buffer @menu * Fold:: Folding editing +* Hiding markup:: * Highlight:: Highlighting markup @end menu @c --------------------------------------------------------------------------- -@node Fold, Highlight, Display, Display +@node Fold, Hiding markup, Display, Display @comment node-name, next, previous, up @section Folding editing @@ -1171,20 +1513,28 @@ @end table +@c --------------------------------------------------------------------------- +@node Hiding markup, Highlight, Fold, Display +@comment node-name, next, previous, up +@section Hiding markup + +*** Describe hide-tags @c --------------------------------------------------------------------------- -@node Highlight, , Fold, Display +@node Highlight, , Hiding markup, Display @comment node-name, next, previous, up @section Highlighting markup -PSGML can highlight the markup as it parses it by giving the markup a -different @dfn{face} (@pxref{Faces, , Using Multiple Typefaces, emacs, -The Emacs Editor}). The highlighting will only be done if the variable -@code{sgml-set-face} is non-nil. The default settings make tags bold -and comments italic, but this can be modified with the variable -@code{sgml-markup-faces}. +PSGML can highlight the markup giving the markup a different @dfn{face} +(@pxref{Faces, , Using Multiple Typefaces, emacs, The Emacs Editor}). +The highlighting will only be done if the variable @code{sgml-set-face} +is non-@code{nil}. The default settings make tags bold and comments +italic, but this can be modified with the variable +@code{sgml-markup-faces}. When highlighting is on PSGML will parse after +every command until the whole buffer has been parsed or user event +occurs. @findex sgml-clear-faces To remove the highlighting type @kbd{M-x sgml-clear-faces}. @@ -1224,8 +1574,35 @@ @end table @end defopt + + @c ------------------------------------------------------------------ -@node Bugs, Index, Display, Top +@node Miscellaneous options, Bugs, Display, Top +@comment node-name, next, previous, up +@chapter Miscellaneous options + +*** describe sgml-save-options + +@defopt sgml-ignore-undefined-elements +Start-tags for undefined elements will either be ignored, if +@code{sgml-ignore-undefined-elements} is @code{t}, or assumed to be +acceptable in the current element and defined with @code{O O ANY} +@end defopt + +@defopt sgml-range-indicator-max-length +Maximum number of characters used from the first and last entry +of a sub-menu to indicate the range of that menu. + +@vindex sgml-max-menu-size +This is used for long menus of elements, tags or entities that are split +into @code{sgml-max-menu-size} big sub-menus. +@end defopt + + + + +@c ------------------------------------------------------------------ +@node Bugs, Index, Miscellaneous options, Top @comment node-name, next, previous, up @chapter Bugs @@ -1237,7 +1614,7 @@ You can report a bug with the command @kbd{M-x sgml-submit-bug-report}. When PSGML needs contextual information it parses the document up to -the point. During the parsing, it builds a parse tree. The parse +the point. During the parsing, it builds a parse tree. The parse tree is used to initialize the next parse, to avoid having to parse things already parsed. Changes to the buffer is supposed to prune the tree of all outdated information. But if you get strange @@ -1253,4 +1630,5 @@ @printindex cp +@contents @bye
--- a/man/supercite.texi Mon Aug 13 08:45:53 2007 +0200 +++ b/man/supercite.texi Mon Aug 13 08:46:35 2007 +0200 @@ -961,7 +961,7 @@ (setq mail-citation-hook 'sc-cite-original) @end example -Note the lack of of a single quote on the first argument to @code{setq}. +Note the lack of a single quote on the first argument to @code{setq}. @node MH-E with any Emacsen, VM with any Emacsen, Emacs 18 MUAs, Getting Connected @comment node-name, next, previous, up @@ -1236,7 +1236,7 @@ affect alternative citing styles. @item -@emph{Processes the the mail headers.} +@emph{Processes the mail headers.} @vindex sc-confirm-always-p @vindex confirm-always-p (sc-) @vindex sc-mail-warn-if-non-rfc822-p
--- a/man/termcap.texi Mon Aug 13 08:45:53 2007 +0200 +++ b/man/termcap.texi Mon Aug 13 08:46:35 2007 +0200 @@ -2116,7 +2116,7 @@ On a few old terminals the same string is used to enter and exit insert mode. This string turns insert mode on if it was off, and off -it it was on. You can tell these terminals because the @samp{ei} +if it was on. You can tell these terminals because the @samp{ei} string equals the @samp{im} string. If you want to support these terminals, you must always remember accurately whether insert mode is in effect. However, these terminals are obsolete, and it is
--- a/man/viper-cmd.texi Mon Aug 13 08:45:53 2007 +0200 +++ b/man/viper-cmd.texi Mon Aug 13 08:46:35 2007 +0200 @@ -1259,8 +1259,8 @@ @node Mouse-bound Commands,,,Commands @section Mouse-bound Commands -The following two mouse actions are normally bound to to special search and -insert commands in of Viper: +The following two mouse actions are normally bound to special search and +insert commands in Viper: @table @kbd @item S-mouse-1 (Emacs)
--- a/man/viper.texi Mon Aug 13 08:45:53 2007 +0200 +++ b/man/viper.texi Mon Aug 13 08:46:35 2007 +0200 @@ -1703,7 +1703,7 @@ Set this to @code{nil}, if you want @kbd{l,h} to cross lines, etc. @xref{Movement and Markers}, for more info. @item vip-ex-style-editing-in-insert t -Set this to to @code{nil}, if you want @kbd{ESC} to not move back and +Set this to @code{nil}, if you want @kbd{ESC} to not move back and @kbd{C-h} to not stop at the beginning of a line in Insert state. @item vip-always t
--- a/man/w3.texi Mon Aug 13 08:45:53 2007 +0200 +++ b/man/w3.texi Mon Aug 13 08:46:35 2007 +0200 @@ -36,9 +36,9 @@ @center @titlefont{Emacs-W3} @center @titlefont{User's Manual} @sp 4 -@center Third Edition, Emacs-W3 Version 2.3.0 +@center Third Edition, Emacs-W3 Version 3.0 @sp 1 -@center February 1996 +@center August 1996 @sp 5 @center William M. Perry @center @i{wmperry@@cs.indiana.edu} @@ -60,8 +60,8 @@ following chapters. @menu -* Introduction:: What exactly is Emacs-W3? -* Setting Up:: How to set up and install Emacs-W3. +* Introduction:: Overview of Emacs-W3. +* Starting Up:: What happens when you start Emacs-W3 * Basic Usage:: Basic movement and usage of Emacs-W3. * Compatibility:: Explanation of compatibility with other web browsers. @@ -75,8 +75,6 @@ * More Help:: How to get more help---mailing lists, newsgroups, etc. * Future Directions:: Plans for future revisions -* Programming Interface:: How to use Emacs-W3 from other emacs - programs. Appendices: * Reporting Bugs:: How to report a bug in Emacs-W3 @@ -90,7 +88,7 @@ @end menu @end ifinfo -@node Introduction, Setting Up, Top, Top +@node Introduction, Starting Up, Top, Top @chapter Introduction @cindex World Wide Web Emacs-W3 is an Emacs subsystem that allows the user to browse the wonderful @@ -225,29 +223,13 @@ @center ---------- @end ifinfo @iftex -@section HTML 3.0 +@section HTML 3.2 @end iftex -@cindex HTML 3.0 -The HTML 3.0 language is an extension of HTML, with a large degree of -backward compatibility with HTML 2.0. The idea of having one huge HTML -3.0 document has been dropped in favor of several smaller supplementatry -RFCs. This will allow the standard to be upgraded much more quickly -than trying to agree on all the features at once. - -As each new chunk of HTML 3.0 is proposed and agreed upon, Emacs-W3 will -support it. +@cindex HTML 3.2 +The HTML 3.2 language is an extension of HTML, with a large degree of +backward compatibility with HTML 2.0. This basically documents current +practice as of January, 1996. -:: WORK :: List currently supported chunks (embed, etc) :: -@itemize @bullet -@item Embed -Embedding of arbitrary objects into an HTML document. With the <embed> -tag, any type of document can be inserted. The most entertaining use of -this is with embedding MPEG movies into an emacs buffer. This requires -Lucid Emacs 19.10, or XEmacs 19.11, as well as a slightly patched -version of mpeg_play 2.0@footnote{The patch is available from -ftp://ftp.cs.indiana.edu/pub/elisp/w3/mpeg_patch}. - -@end itemize @ifinfo @center ---------- @center Netscape-HTML @@ -257,15 +239,11 @@ @section Netscape-HTML @end iftex I hate to say it, but I broke down and actually included some of the -Netscape extensions into Emacs-W3. +Netscape extensions into Emacs-W3. The thing I hate to say even more, +is that most of the uglier things in Netscape-HTML are now in the HTML +3.2 specification. All hail the W3Cs lack of backbone. @table @b -@item <font>...</font> -Changes the font size. Valid values range from 0-7. The default -font size is 3. The value given can optionally have a '+' or '-' -character in front of it to specify that it is relative to the document -basefont. Stylesheets are recommended instead, as they allow much -greater control.@xref{Style Sheets} @item <center>...</center> This ugly, ill-thought-out alternative to the HTML 3.0 align attribute on headers and paragraphs was included for compatibility, and as an example @@ -273,40 +251,6 @@ @item <isindex> The isindex tag can now take a prompt attribute, to get rid of the default 'This is a searchable index' label. -@item <hr width=xx align=xx> -The width and alignment of a horizontal rule can now be controlled. The -WIDTH attribute specifies how wide the rule should be, as a percentage -of the window width. - - -The ALIGN attribute specifies where the horizontal rule is placed. -Valid values are left, right, center, and indent. -@item <body background=@var{URL} bgcolor=@var{RGB} TEXT=@var{RGB} LINK=@var{RGB} ALINK=@var{RGB} VLINK=@var{RGB}> -Various colors can now be set on a document wide basis. This is done -with various attributes on the BODY tag. Stylesheets are really a -better way to do this, and are recommended. This is just for -compatibility. @xref{Style Sheets} -@b{NOTE:} Netscape requires that all colors be specified in RGB values - -this is not very intuitive for the avergage author, so Emacs-W3 allows -you to use logical system colors (ie: @samp{"PaleGoldenrod"} instead of -@samp{"#eee8aa"}). -@table @b -@item BACKGROUND=@var{url} -Specifies a graphic to tile in the background of the document. This -only works in XEmacs 19.12 or later. -@item BGCOLOR=@var{color} -Specifies the background of the document, as a color instead of a -graphic. -@item TEXT=@var{color} -Specifies the color of text on the page. -@item LINK=@var{color} -Specifies the color of hypertext links on the page. -@item VLINK=@var{color} -Specifies the color of hypertext links that have been visited already. -@item ALINK=@var{color} -Specifies the color of active hypertext links (links that have been -clicked on, but not yet fully retrieved). -@end table @end table @ifinfo @center ---------- @@ -425,10 +369,9 @@ news://hostname:port/messageID work, but will not work in most other browsers. - @item HTTP -Supports both the HTTP/0.9 and HTTP/1.0 protocols. Fully MIME-compliant -with regards to HTTP/1.0. +Supports the HTTP/0.9, HTTP/1.0, and HTTP/1.1 protocols. Fully +MIME-compliant with regards to HTTP/1.0. @item Gopher Support for all gopher types, including CSO queries. @item Gopher+ @@ -469,83 +412,22 @@ http://www.commerce.net/information/standards/drafts/shttp.txt. @end table -@node Setting Up, Retrieving Emacs-W3, Introduction, Top +@node Starting Up, Basic Setup, Introduction, Top @comment node-name, next, previous, up -@chapter Setting Up -@cindex Setting Up Emacs-W3 -@cindex Retrieving Emacs-W3 +@chapter Starting Up +@cindex Starting Up Emacs-W3 This section of the manual deals with getting, compiling, and configuring @i{Emacs-W3}. @ifinfo @menu -* Retrieving Emacs-W3:: Retrieving Emacs-W3 via anonymous ftp -* Compiling Emacs-W3:: Compiling Emacs-W3 and its associated files * Basic Setup:: Basic setup that everyone needs to do * Firewalls:: How to set Emacs-W3 up to use a particular firewall setup. * Proxy Gateways:: Using a proxy server @end menu @end ifinfo -@node Retrieving Emacs-W3, Compiling Emacs-W3, Setting Up, Setting Up -@comment node-name, next, previous, up -@section Retrieving Emacs-W3 -:: WORK :: Document that Emacs-W3 now requires the URL package as well - -@node Compiling Emacs-W3, Basic Setup, Retrieving Emacs-W3, Setting Up -@comment node-name, next, previous, up -@section Compiling Emacs-W3 -To install Emacs-W3, go into the @file{w3} subdirectory and edit the -@file{Makefile}. These variables might need to be changed: -@table @code -@item EMACS -This variable controls what version of Emacs is used to compile the -programs. It should be the full path to the Emacs executable on the -system. The default is to use GNU Emacs (@file{emacs}). -@item LISPDIR -This variable controls where the lisp code is copied to when it is -installed (with @code{make install}). This is usually the users -personal lisp code directory. The value is run through -@dfn{expand-file-name} and then added to the load-path. Default is -@file{~/lisp}. -@item DOTEMACS -This variable points to the Emacs customization file, default is -@file{~/.emacs}. -@item INFODIR -This variable points to the local info directory. This can be any valid -directory, as long as it is in @code{Info-default-directory-list} so -that info-mode can find it. Default is @file{/usr/local/info/}. - -@item MAKEINFO -This variables controls how the info files are built. Possible values -are @code{makeinfo} or @code{emacs -batch -q -f -batch-texinfo-format}. Default is @code{makeinfo}. -@end table -Once the @file{Makefile} has been modified, several different targets -can be built. -@table @code -@item make w3 -This compiles all the .el files into the much faster .elc files. -@item make install -Compiles all the .el files and copies .el and .elc files into the -directory specified by @code{LISPDIR}. -@item make emacs -Modifies the file specified by @code{DOTEMACS}. A statement modifying -the load-path variable and several autoload statements are added to the -end of the file. -@item make all -Compiles and installs the .el files, and also modify/create the -@code{DOTEMACS} file. -@item make w3.info -Creates the Emacs-readable info files. The info files are created in -the directory specified by @code{INFODIR}. The makefile variable -@code{MAKEINFO} determines how the info file is built. -@item make w3.dvi -Creates the printable documentation, using tex and texindex to properly -generate the indices. A @file{w3.dvi} file is left in the current -directory. -@end table -@node Basic Setup, Firewalls, Compiling Emacs-W3, Setting Up +@node Basic Setup, Firewalls, Starting Up, Starting Up @comment node-name, next, previous, up @section Basic Setup There are a few variables that almost all people need to change. @@ -644,7 +526,7 @@ port number. The default is for xterm, which is very UNIX and XWindows-centric. @end table -@node Firewalls, Proxy Gateways, Basic Setup, Setting Up +@node Firewalls, Proxy Gateways, Basic Setup, Starting Up @comment node-name, next, previous, up @section Firewalls @cindex Gateways @@ -663,11 +545,10 @@ ftp://sunsite.unc.edu/pub/Linux/apps/comm/term} for slip-like access to the internet. - -NOTE: Emacs 19.22 has patches to enable native TERM networking. To -enable it, #define TERM in the appropriate s/*.h file for the operating -system, then change the SYSTEM_LIBS define to include the @file{termnet} -library that comes with the latest versions of TERM. +NOTE: XEmacs and Emacs 19.22 or later have patches to enable native TERM +networking. To enable it, #define TERM in the appropriate s/*.h file +for the operating system, then change the SYSTEM_LIBS define to include +the @file{termnet} library that comes with the latest versions of TERM. @item @cindex Faulty hostname resolvers @@ -681,7 +562,6 @@ someplace with a raw ip number, but not its hostname (http://129.79.254.191/ works, but http://www.cs.indiana.edu/ doesn't). - If for some reason it is not feasible to recompile Emacs with the @file{-lresolv} library or dynamic linking, it is just like being behind a firewall. Another alternative is to set the variable @@ -691,16 +571,6 @@ @code{efs-nslookup-on-connect}, and @code{efs-nslookup-threshold} if are using EFS, or @code{ange-ftp-nslookup-program} if using Ange-FTP. -@cindex Connections hanging with XEmacs & solaris -@cindex Solaris networking problems -@cindex XEmacs & Solaris network problems -@item -Running XEmacs 19.x and Solaris 2.x (SunOS 5.x). For some reason, -network processes under Solaris and XEmacs never get a status of -@code{exit} or @code{closed}. This causes retrieval of HTTP and gopher -pages to hang indefinitely, with Emacs chewing up large amounts of CPU -time. - @end enumerate @vindex url-gateway-local-host-regexp @@ -758,7 +628,6 @@ signifies the end of the setup of @code{url-gateway-telnet-program}. The default should work fine for telnet. - @cindex Host-based gateways @cindex Hair-pulling gateway-headaches @vindex url-gateway-host @@ -774,7 +643,6 @@ username and password to login. The most common of these is the @dfn{rsh} command. - @vindex url-gateway-program-interactive @vindex url-gateway-handholding-password-regexp @vindex url-gateway-handholding-login-regexp @@ -789,7 +657,6 @@ @code{url-gateway-handholding-password-regexp} should match the login and password prompts on the gateway system respectively. For example: - @example (setq url-gateway-connect-program "telnet" url-gateway-host-program "telnet" @@ -809,7 +676,6 @@ should appear @b{no where} in the login banner/setup, or things could get very confused. - @vindex url-gateway-host-program-ready-regexp @vindex url-gateway-host-program The variable @code{url-gateway-host-program-ready-regexp} should contain @@ -818,7 +684,6 @@ off-firewall machine. (Basically the same as @code{url-gateway-telnet-ready-regexp}. - Emacs-W3 should now be able to get outside the local network. If none of this makes sense, its probably my fault. Please check with the network administrators to see if they have a program that does most of @@ -827,19 +692,55 @@ helpful/knowledgeable about the local setup than I would be. But feel free to mail me as a last resort. - -@node Proxy Gateways, Basic Usage, Firewalls, Setting Up +@node Proxy Gateways, Basic Usage, Firewalls, Starting Up @comment node-name, next, previous, up @section Proxy Gateways -In late January 1993, Kevin Altis and Lou Montulli proposed and implemented a -new proxy service. This service requires the use of environment -variables to specify a gateway server/port # to send protocol requests -to. Each protocol (HTTP, WAIS, gopher, FTP, etc.@:) can have a -different gateway server. The environment variables are -@var{PROTOCOL}_proxy, where @var{PROTOCOL} is one of gopher, file, HTTP, -FTP, or WAIS. +@vindex url-proxy-services +@cindex Proxy Servers +@cindex Proxies +@cindex Proxies, environment variables +@cindex HTTP Proxy +In late January 1993, Kevin Altis and Lou Montulli proposed and +implemented a new proxy service. This service requires the use of +environment variables to specify a gateway server/port # to send +protocol requests to. Each protocol (HTTP, WAIS, gopher, FTP, etc.@:) +can have a different gateway server. The environment variables are +@var{PROTOCOL}_proxy, where @var{PROTOCOL} is one of the supported +network protocols (gopher, file, HTTP, FTP, etc.) + +@cindex No Proxy +@cindex Proxies, exclusion lists +@vindex NO_PROXY +For companies with internal intranets, it will usually be helpful to +define a list of hosts that should be contacted directly, @b{not} sent +through the proxy. The @var{NO_PROXY} environment variable controls +what hosts are able to be contacted directly. This should be a comma +separated list of hostnames, domain names, or a mixture of both. +Asterisks can be used as a wildcard. For example: -:: WORK :: +@example +NO_PROXY=*.aventail.com,home.com,*.seanet.com +@end example + +tells Emacs-W3 to contact all machines in the @b{aventail.com} and +@b{seanet.com} domains directly, as well as the machine named +@b{home.com}. + +@vindex url-proxy-services +@cindex Proxies, setting from lisp +For those adventurous souls who enjoy writing regular expressions, all +the proxy settings can be manipulated from Emacs-Lisp. The variable +@code{url-proxy-services} controls this. This is an assoc list, keyed +on the protocol type (http, gopher, etc) in all lowercase. The +@code{cdr} of each entry should be the fully-specified URL of the proxy +server to contact, or, in the case of the special "no_proxy" entry, a +regular expression that matches any hostnames that should be contacted +directly. + +@example +(setq url-proxy-services '(("http" . "http://proxy.aventail.com/") + ("no_proxy" . "^.*\\(aventail\\|seanet\\)\.com"))) +@end example @node Basic Usage, , Proxy Gateways, Top @comment node-name, next, previous, up @@ -1928,7 +1829,6 @@ * VMS:: The wonderful world of VAX|AXP-VMS! * OS/2:: The next-best thing to Unix. * MS-DOS:: The wonderful world of MS-DOG! -* 16-Bit Windows:: Windows 3.1, 3.11, and WFW 3.11. * 32-Bit Windows:: Windows NT, Chicago/Windows 95. * Amiga:: The Amiga, for those who still love them. @end menu @@ -1948,7 +1848,7 @@ @cindex Warp :: WORK :: OS/2 Specific instructions -@node MS-DOS, 16-Bit Windows, OS/2, Non-Unix Operating Systems +@node MS-DOS, 32-Bit Windows, OS/2, Non-Unix Operating Systems @section MS-DOS @cindex MS-DOS @cindex Microsloth @@ -1956,17 +1856,8 @@ @cindex MS-DOG :: WORK :: DOS Specific instructions -@node 16-Bit Windows, 32-Bit Windows, MS-DOS, Non-Unix Operating Systems -@section 16-Bit Windows -@cindex 16-Bit Windows -@cindex Microsloth -@cindex Windows (16-Bit) -@cindex Windows For Workgroups -:: WORK :: 16bit Windows Specific instructions - -@node 32-Bit Windows, Amiga, 16-Bit Windows, Non-Unix Operating Systems +@node 32-Bit Windows, Amiga, MS-DOS, Non-Unix Operating Systems @section 32-Bit Windows -@cindex Chicago @cindex Windows (32-Bit) @cindex 32-Bit Windows @cindex Microsloth @@ -2019,8 +1910,8 @@ @example <style notation="css"> /* This is a comment -** These will be ignored, up to the terminating end-of-line -# +** These will be ignored, up to the terminating */ + h1 @{ align: center, color: yellow, background: red, @@ -2114,10 +2005,10 @@ @code{url-temporary-directory}, in a user-specific subdirectory (determined by the @code{user-real-login-name} function). The cache files are stored under their original names, so a URL like: -http://www.spry.com/foo/bar/baz.html would be stored in a cache file -named: /tmp/wmperry/com/spry/www/foo/bar/baz.html. Sometimes, espcially -with gopher links, there will be name conflicts, and an error will be -signalled. This cannot be avoided, and still have reasonable +http://www.aventail.com/foo/bar/baz.html would be stored in a cache file +named: /tmp/wmperry/com/aventail/www/foo/bar/baz.html. Sometimes, +espcially with gopher links, there will be name conflicts, and an error +will be signalled. This cannot be avoided, and still have reasonable performance at startup time (reading in an index file of all the cached pages can take a long time on slow machines, or even fast machines with large caches). When running XEmacs 19.12 or later, a different naming @@ -2144,16 +2035,19 @@ @cindex VM @cindex Using Emacs-W3 with VM @cindex GNUS -@cindex Using Emacs-W3 with GNUS +@cindex Using Emacs-W3 with Gnus @cindex RMAIL @cindex Using Emacs-W3 with RMAIL More and more people are including URLs in their signatures, and within the body of mail messages. It can get quite tedious to type these into the minibuffer to follow one. -With the latest versions of VM (the 5.9x series of betas), URLs are -highlighted, and can be followed with the mouse or the return -key. +@vindex browse-url-browser-function +With the latest versions of VM (the 5.9x series of betas) and Gnus +(5.x), URLs are automatically highlighted, and can be followed with the +mouse or the return key. How the URLs are viewed is determined by the +variable @code{browse-url-browser-function}, and it should be set to the +symbol @code{browse-url-w3}. To access URLs from within RMAIL, the following hook should do the trick. @@ -2165,18 +2059,6 @@ (define-key rmail-mode-map "\r" 'w3-maybe-follow-link)))) @end example -To access URLs from within GNUS, the following hook should do the -trick. -@example -(add-hook 'gnus-article-mode-hook - (function - (lambda () - (define-key gnus-article-mode-map [mouse-2] - 'w3-maybe-follow-link-mouse) - (define-key gnus-article-mode-map "\r" - 'w3-maybe-follow-link)))) -@end example - @node Debugging HTML, Native WAIS Support, Interfacing to Mail/News, Advanced Features @section Debugging HTML @cindex Debugging @@ -2300,12 +2182,6 @@ are @code{'yes-or-no-p} or @code{'y-or-n-p}, or any function that takes a single argument (the prompt), and returns @code{t} only if a positive answer is gotten. Defaults to @code{'yes-or-no-p}. -@item w3-delimit-links -@vindex w3-delimit-links -:: WORK :: This is going away, and should be specified with stylesheets instead -@item w3-delimit-emphasis -@vindex w3-delimit-emphasis -:: WORK :: This is going away, and should be specified with stylesheets instead @item w3-default-action @vindex w3-default-action A lisp symbol specifying what action to take for files with extensions @@ -2443,414 +2319,15 @@ As a last resort, mail me. I'll try to answer as quickly as I can. -@node Future Directions, Programming Interface, More Help, Top +@node Future Directions, Reporting Bugs, More Help, Top @chapter Future Directions Changes are constantly being made to the Emacs browser (hopefully all for the better). This is a list of the things that are being worked on right now. :: WORK :: Revamp the todo list -@node Programming Interface, Generalized ZONES, Future Directions, Top -@comment node-name, next, previous, up -@chapter Internals of Emacs-W3 -@cindex Internals of Emacs-W3 -@cindex Using Emacs-W3 from other programs -This chapter attempts to explain some of the internal workings of -Emacs-W3 and various data structures that are used. It also details -some functions that are useful for using some of the Emacs-W3 -functionality from within other programs, or extending the current -capabilities of Emacs-W3. -@ifinfo -@menu -* Generalized ZONES:: A generic interface to 'zones' of text - that can contain information. -* Global Variables:: Global variables used throughout Emacs-W3 -* Data Structures:: The various data structures used in Emacs-W3 -* Miscellaneous Functions:: Miscellaneous functions to interface - with w3 and access its data structures -* MIME functions:: MIME functions---parsing messages, - mailcap files, and more. -@end menu -@end ifinfo -@node Generalized ZONES, Global Variables,Programming Interface, Programming Interface, Programming Interface -@comment node-name, next, previous, up -@section Generalized ZONES -Due to the many different @i{flavors} of Emacs in existence, the -addition of data and font information to arbitrary regions of text has -been generalized. The following functions are defined for -using/manipulating these @dfn{zones} of data. - -@table @code -@findex w3-add-zone -@item w3-add-zone (start end style data &optional highlight) -Creates a zone between buffer positions start and end, with font -information specified by style, and a data segment of data. If the -optional argument highlight is non-@code{nil}, then the region -highlights when the mouse moves over it. - - -@findex w3-zone-at -@item w3-zone-at (point) -Returns the zone at @var{point}. Preference is given to hypertext -links, then to form entry areas, then to inlined images. So if an -inlined image was part of a hypertext link, this would always return the -hypertext link. - -@findex w3-zone-data -@item w3-zone-data (zone) -Returns the zone's data segment. The data structures used in Emacs-W3 are -relatively simple. They are just list structures that follow a certain -format. The two main data types are @dfn{form objects}, @dfn{link -objects},and @dfn{inlined images}. All the information for these types -of links are stored as lists. - -@findex w3-zone-hidden-p -@item w3-zone-hidden-p (zone) -Returns @code{t} if and only if a zone is currently invisible. -@findex w3-hide-zone -@item w3-hide-zone (start end) -Makes a region of text from @code{start} to @code{end} invisible. -@findex w3-unhide-zone -@item w3-unhide-zone (start end) -Makes a region of text from @code{start} to @code{end} visible -again. -@findex w3-zone-start -@item w3-zone-start (zone) -Returns an integer that is the start of zone, as a buffer position. In -Emacs 18.xx, this returns a marker instead of an integer, but it can be -used just like an integer. -@findex w3-zone-end -@item w3-zone-end (zone) -Returns an integer that is the end of zone, as a buffer position. In -Emacs 18.xx, this returns a marker instead of an integer, but it can be -used just like an integer. -@findex w3-zone-eq -@item w3-zone-eq (zone1 zone2) -Returns @code{t} if and only if zone1 and zone2 represent the same -region of text in the same buffer, with the same properties and -data. -@findex w3-delete-zone -@item w3-delete-zone (zone) -Removes zone from its buffer (or current buffer). The return value is -irrelevant, and varies for each version of Emacs. -@findex w3-all-zones -@item w3-all-zones () -Returns a list of all the zones contained in the current buffer. Useful -for extracting information about hypertext links or form entry -areas. Programs should not rely on this list being sorted, as the order -varies with each version of Emacs. -@item w3-zone-at (pt) -Returns the zone at character position PT in the current buffer that is -either a link or a forms entry area. Returns @code{nil} if no link at -point. - -@end table -@findex w3-zone-data -These data structures are what is generally returned by -@code{w3-zone-data}. - -@node Global Variables, Data Structures , Generalized ZONES, Programming Interface -@comment node-name, next, previous, up -@section Global variables -There are also some variables that may be useful when writing a program -or function that interacts with Emacs-W3. All of the -@code{w3-current-*} variables are local to each buffer. - - -@table @code -@vindex url-current-mime-headers -@item url-current-mime-headers -An assoc list of all the MIME headers for the current document. Keyed -on the lowercase MIME header (e.g., @samp{content-type} or -@samp{content-encoding}. -@vindex url-current-server -@item url-current-server -Server that the current document was retrieved from. -@vindex url-current-file -@item url-current-file -Filename of the current document -@vindex url-current-type -@item url-current-type -A string representing what network protocol was used to retrieve the -current buffer's document. Can be one of http, gopher, file, ftp, news, -or mailto. -@vindex url-current-port -@item url-current-port -Port # of the current document. -@vindex w3-current-last-buffer -@item w3-current-last-buffer -The last buffer seen before this one. -@vindex w3-running-FSF19 -@item w3-running-FSF19 -This is @code{t} if and only if we are running in FSF Emacs 19. -@vindex w3-running-xemacs -@item w3-running-xemacs -This is @code{t} if and only if we are running in Lucid Emacs, WinEmacs, or -XEmacs. -@end table - -@node Data Structures, Miscellaneous Functions, Global Variables, Programming Interface -@comment node-name, next, previous, up -@section Data Structures -Form objects are used to store information about a FORM data entry area. -@enumerate -@item -@code{'w3form} -@item -A cons pair of (METHOD . URL), where METHOD specifies what method to use -to retrieve the form when it is submitted (e.g., @samp{GET}) and URL is a -fully specified URL pointing at where to submit the FORM data to. -@item -The type of input area this is. (e.g., @samp{CHECKBOX} or -@samp{RADIO}) -@item -The name of the input tag. This is used when sending the form to the -server, so that the server can tell what data is what. -@item -The default value of the input area. Gotten from the INPUT tag at -creation time. -@item -The current value of the input area. -@item -Whether the item is checked or not. Only used for RADIO or CHECKBOX -items. -@item -The size (in characters) of the input area. Not used for CHECKBOX, -RADIO, or TEXTAREA input areas. -@item -The maximum length of the input. Only used for TEXT or PASSWORD input -areas. -@item -The form that this input area belongs to. Each form in the same buffer -has a unique identifier assigned when the document is parsed. It is -used when the form is submitted to get only the data for the correct -form. -@item -A list of strings that represent the choices for this input area. Only -used for SELECT tags. -@item -A string or @code{nil}, specifying the ID attribute on this input -tag. -@end enumerate - -A new development in the World Wide Web is the concept of collapsible -areas of text. If a zone controls one of these regions, it is marked -with the @b{w3expandlist} property. The format of this structure -is: - -@enumerate -@item -@code{'w3expandlist} -@item -A marker representing the start of the hidden text as a buffer position. -@item -A marker representing the end of the hidden text as a buffer position. -@end enumerate - -A zone with the @b{w3graphic} property is a link to an inlined image's -source file. -@enumerate -@item -@code{'w3graphic} -@item -@findex w3-follow-inlined-image -The full URL of the inlined image. This is only ever returned if the -inlined image is the only extent under point, or -@code{w3-follow-inlined-image} is invoked. -@end enumerate - -A zone with the @b{w3} property is a full-fledged hypertext link to -another document. -@enumerate -@item -@code{'w3} -@item -The ID attribute of this link. Used for resolving references to -specific points within a document (e.g., @samp{file.html#sectionA}. -@item -The HREF attribute of this link. This is a fully specified URL pointing -at a network resource. All relative directory references should have -been removed before being stored in this structure. -@item -The text between the <A> and </A> tags. This is used to build menus or -to get the text of a link without doing a buffer-substring. -@item -The URN attribute of this link. Currently not used for anything, -waiting for the URN specification to be hammered out. -@item -The REL attribute of this link. Specifies the links relevance to the -current document. -@item -The REV attribute of this link. Specifies the current documents -relevance to the link. -@item -The METHODS attribute, which tells what methods can be used on this -link. (e.g., @samp{GET, HEAD, PUT}. -@end enumerate -@node Miscellaneous Functions, MIME functions, Data Structures, Programming Interface -@comment node-name, next, previous, up -@section Miscellaneous Functions -I have done quite a bit of work trying to make a clean interface to the -internals of Emacs-W3. - -@table @code -@findex url-clear-tmp-buffer -@vindex url-working-buffer -@item url-clear-tmp-buffer -Sets the current buffer to be @code{url-working-buffer}, creating it if -necessary, and erase it. This should usually be called before -retrieving URLs. - -@findex w3-convert-html-to-latex -@item w3-convert-html-to-latex -Takes a buffer of HTML markup (which should be in -@code{w3-working-buffer}), and convert it into LaTeX. This is an -adaptation of the simple sed scripts from Cern. Does as good a job as -the html2latex program, and I usually prefer its formatting over -html2latex's. - -@findex w3-fetch -@item w3-fetch -Takes a URL as its only argument. It then attempts to retrieve the URL. -For example: @samp{(w3-fetch "http://cs.indiana.edu/")} would retrieve -the Indiana University CS home page and parse it as HTML. - - -@findex url-generate-new-buffer-name -@item url-generate-new-buffer-name -Takes a string, and returns the first unique buffer name using that -string as a base. For example @samp{(url-generate-new-buffer-name -"new-buff")} would return @samp{"new-buff<1>"} if buffer @code{new-buff} -already existed. - - -@findex url-generate-unique-filename -@item url-generate-unique-filename -Returns a string that represents a unique filename in the /tmp -directory. For example, @samp{(url-generate-unique-filename)} would -return @samp{"/tmp/url-tmp129440"}. The filename is arrived at by using -a unique prefix (url-tmp), the uid of the current user (12944 in my -case), and a number that is incremented if a file already exists. - - -@findex url-buffer-visiting -@item url-buffer-visiting (url) -Returns the name of a buffer (if any) that is visiting URL. - -@findex url-create-mime-request -@vindex url-request-extra-headers -@vindex url-request-data -@vindex url-request-method -@vindex url-mime-accept-string -@vindex url-current-server -@cindex Creating an HTTP request -@item url-create-mime-request (fname ref-url) -Creates a MIME request for the file fname. The Referer: field of the -HTTP/1.0 request is set to the value of ref-url if necessary. Returns a -string that can be sent to an HTTP server. The request uses several -variables that control how the request looks. - - -If the value of @code{url-request-extra-headers} is non-@code{nil}, then -it is used as extra MIME headers when an HTTP/1.0 request is -created. - -@findex url-get-url-at-point -@item url-get-url-at-point -Returns the url at a point specified by an optional argument. If no -argument is given to the function, the current buffer position is used. -Tries to find the URL closest to that point, but does not change the -users position in the buffer. Has a preference for looking backward -when not directly on a URL. - - -@findex url-hexify-string -@item url-hexify-string -Takes a string and replaces any characters that are not acceptable in a -URL with the "escaped" encoding that is standard for URLs (replaces the -character with a % followed by the hexadecimal representation of the -ASCII value of the character). For example, @samp{(url-hexify-string -"this is a test")} would return @samp{"this%20is%20a%20test"}. - - -@findex url-open-stream -@item url-open-stream -Takes the same parameters as @code{open-network-stream}, and functions -similarly. It takes a process name, a buffer name, a host name, and a -port number or server name. It attempts to open a network connection to -the remote host on the specified port/service name, with output going to -the buffer. It returns the process object that is the network -connection. - - -@findex url-retrieve -@item url-retrieve -:: WORK :: Need to describe the url-request-* variables and the no-cache and - expected-md5 arguments to url-retrieve :: - - -@findex url-unhex-string -@item url-unhex-string -This is the opposite of @code{url-hexify-string}. It removes any %XXX -encoded characters in a string. For example @samp{(url-unhex-string -"this%20is%20a%20test")} would return @samp{"this is a test"}. - -@findex w3-view-this-url -@item w3-view-this-url -Returns the URL of the hyperlink under point (if no hyperlink is under -point, then it returns @code{nil}). If the optional argument is -@code{nil}, then the URL is also displayed in the minibuffer. - - -@findex url-view-url -@item url-view-url -Returns the URL of current document. If the optional argument is -@code{nil}, then the URL is also displayed in the minibuffer. - -@end table - -@node MIME functions, Reporting Bugs, Miscellaneous Functions, Programming Interface -@section MIME Functions -@table @code -@item mm-compose-type(TYPE) -Composes a body section of MIME-type TYPE. This uses the compose field -of a mailcap entry to generate the data, and returns a string that -contains the data, with a correct content-type header. - -@item mm-extension-to-mime(EXTN) -Returns the MIME content-type of the file extension EXTN. -@item mm-mime-info(ST ND REQUEST) -Returns the mime viewer command for a specific MIME type. If ST is a -number, then the MIME type is the @code{buffer-substring} between ST and -ND, otherwise ST should be a string specifying the MIME type and -associated data. Returns @code{nil} if the specified type is not found. - - -Expects a complete content-type header line as its argument. This can -be simple like text/html, or complex like text/plain; charset=blah; foo=bar - - -Third argument REQUEST specifies what information to return. If it is -@code{nil} or the empty string, the viewer (second field of the mailcap -entry) is returned. If it is a string, then the mailcap field -corresponding to that string is returned (print, description, whatever). -If a number, then all the information for this specific viewer is -returned. -@item mm-parse-mailcap(FILE) -Parses the mailcap file specified by FILE. -@item mm-parse-mailcaps(PATH) -Parses the default mailcap files. Optional argument PATH specifies a -UNIX-style path of where to find the mailcap files. This function must -be run before the rest of the mm-* functions. -@item mm-parse-mimetype-file(FILE) -Parses out a mime-types file specified by FILE. -@item mm-parse-mimetypes(PATH) -Parses the default mimetypes files. Optional argument PATH specifies a -UNIX-style path of where to find the mimetypes files. -@end table - -@node Reporting Bugs, Installing SSL, MIME functions, Top +@node Reporting Bugs, Installing SSL, Future Directions, Top @appendix Reporting Bugs @cindex Reporting Bugs @cindex Bugs
--- a/man/xemacs-faq.texi Mon Aug 13 08:45:53 2007 +0200 +++ b/man/xemacs-faq.texi Mon Aug 13 08:46:35 2007 +0200 @@ -1022,7 +1022,7 @@ @chapter 8. The keyboard @menu -* 8.1.:: 8.1. What is the difference in in key sequences between XEmacs and GNU Emacs? +* 8.1.:: 8.1. What is the difference in key sequences between XEmacs and GNU Emacs? * 8.2.:: 8.2. How can I make XEmacs recognize the Alt key of my HP workstation as a Meta key? * 8.3.:: 8.3. How can I stop the down-arrow-key from adding empty lines at the bottom of my buffers? * 8.4.:: 8.4. I wonder if there is an interactive function that can generate "fake" keyboard events. This way, I could simply map them inside XEmacs.
--- a/man/xemacs/basic.texi Mon Aug 13 08:45:53 2007 +0200 +++ b/man/xemacs/basic.texi Mon Aug 13 08:46:35 2007 +0200 @@ -477,7 +477,7 @@ If your keyboard has a @key{META} key (labelled with a diamond on Sun-type keyboards and labelled @samp{Alt} on some other keyboards), the easiest way to specify a numeric argument is to type digits and/or a -minus sign while holding down the the @key{META} key. For example, +minus sign while holding down the @key{META} key. For example, @example M-5 C-n @end example
--- a/man/xemacs/building.texi Mon Aug 13 08:45:53 2007 +0200 +++ b/man/xemacs/building.texi Mon Aug 13 08:46:35 2007 +0200 @@ -19,7 +19,7 @@ @end menu @node Compilation, Lisp Modes, Running, Running -@section Running `make', or Compilers Generally +@section Running ``make'', or Compilers Generally @cindex inferior process @cindex make @cindex compilation errors
--- a/man/xemacs/calendar.texi Mon Aug 13 08:45:53 2007 +0200 +++ b/man/xemacs/calendar.texi Mon Aug 13 08:46:35 2007 +0200 @@ -1085,7 +1085,7 @@ @kindex i b (Calendar mode) @findex insert-block-diary-entry - You can make a diary entry entry for a block of dates by setting the mark + You can make a diary entry for a block of dates by setting the mark at the date at one end of the block, moving point to the date at the other end of the block, and using the @kbd{i b} command. This command causes the end of your diary file to be displayed in another window and the
--- a/man/xemacs/custom.texi Mon Aug 13 08:45:53 2007 +0200 +++ b/man/xemacs/custom.texi Mon Aug 13 08:46:35 2007 +0200 @@ -380,9 +380,9 @@ of a file, in addition to specifying them in the @code{Local Variables} section at the end of a file. -If the first line of a file contains two occurences of @code{`-*-'}, Emacs -uses the information between them to determine what the major mode and -variable settings should be. For example, these are all legal: +If the first line of a file contains two occurrences of @code{`-*-'}, +XEmacs uses the information between them to determine what the major +mode and variable settings should be. For example, these are all legal: @example ;;; -*- mode: emacs-lisp -*- @@ -1862,10 +1862,10 @@ @item @code{scrollBarPlacement} (class @code{ScrollBarPlacement}): string Where the horizontal and vertical scrollbars should be positioned. This -should be one of the four strings @samp{bottom-left}, -@samp{bottom-right}, @samp{top-left}, and @samp{top-right}. Default is -@samp{bottom-right} for the Motif and Lucid scrollbars and -@samp{bottom-left} for the Athena scrollbars. +should be one of the four strings @samp{BOTTOM_LEFT}, +@samp{BOTTOM_RIGHT}, @samp{TOP_LEFT}, and @samp{TOP_RIGHT}. Default is +@samp{BOTTOM_RIGHT} for the Motif and Lucid scrollbars and +@samp{BOTTOM_LEFT} for the Athena scrollbars. @item @code{topToolBarHeight} (class @code{TopToolBarHeight}): integer @itemx @code{bottomToolBarHeight} (class @code{BottomToolBarHeight}): integer
--- a/man/xemacs/files.texi Mon Aug 13 08:45:53 2007 +0200 +++ b/man/xemacs/files.texi Mon Aug 13 08:46:35 2007 +0200 @@ -254,7 +254,7 @@ @findex find-this-file-other-window Use the function @code{find-this-file-other-window} to edit a file mentioned in the buffer you are editing or to test if that file exists. -To do do this, use the minibuffer completion after snatching the part or +To do this, use the minibuffer completion after snatching the part or all of the filename. By providing a prefix argument, the function calls @code{filename-at-point} and switches you to a buffer visiting the file @var{filename} in another window. The function creates a buffer if none
--- a/man/xemacs/m-x.texi Mon Aug 13 08:45:53 2007 +0200 +++ b/man/xemacs/m-x.texi Mon Aug 13 08:46:35 2007 +0200 @@ -135,7 +135,7 @@ Normally, when describing a command that is run by name, we omit the @key{RET} that is needed to terminate the name. Thus we may refer to @kbd{M-x auto-fill-mode} rather than @kbd{M-x auto-fill-mode} @key{RET}. -We mention the @key{RET} only when it it necessary to emphasize its +We mention the @key{RET} only when it is necessary to emphasize its presence, for example, when describing a sequence of input that contains a command name and arguments that follow it.
--- a/man/xemacs/misc.texi Mon Aug 13 08:45:53 2007 +0200 +++ b/man/xemacs/misc.texi Mon Aug 13 08:46:35 2007 +0200 @@ -737,7 +737,7 @@ To start Viper, put the command @example -(require 'viper) +(viper-mode) @end example in your @file{.emacs} file. @@ -745,6 +745,7 @@ Viper comes with a separate manual that is provided standard with the XEmacs distribution. +@ignore @item evi (alternative vi emulator) @cindex evi evi is an alternative vi emulator that also provides a nearly complete @@ -755,6 +756,7 @@ Warning: loading more than one vi emulator at once may cause name conflicts; no one has checked. +@end ignore @item EDT (DEC VMS editor) @findex edt-emulation-on
--- a/man/xemacs/new.texi Mon Aug 13 08:45:53 2007 +0200 +++ b/man/xemacs/new.texi Mon Aug 13 08:46:35 2007 +0200 @@ -8,6 +8,7 @@ @unnumberedsec General Changes @itemize @bullet +@ignore @item XEmacs has a new vi emulation mode called evi mode. To start evi mode in Emacs, type the command @kbd{M-x evi}. If you want @@ -17,6 +18,17 @@ (setq term-setup-hook 'evi) @end example @xref{evi Mode} for a brief discussion. +@end ignore + +@item +XEmacs has a new vi emulation mode called ``viper'' mode. To start +viper mode in XEmacs, type the command @kbd{M-x viper-mode}. If you +want XEmacs to automatically put you in viper-mode all the time, include +this line in your @file{.emacs} file: +@example +(viper-mode) +@end example + @item Earlier versions of Emacs only allowed keybindings to ASCII character sequences. XEmacs has greatly expanded this by allowing you to
--- a/man/xemacs/trouble.texi Mon Aug 13 08:45:53 2007 +0200 +++ b/man/xemacs/trouble.texi Mon Aug 13 08:46:35 2007 +0200 @@ -354,7 +354,7 @@ @findex open-dribble-file @cindex dribble file - The easy way to record the input to Emacs precisely is to to write a + The easy way to record the input to Emacs precisely is to write a dribble file; execute the Lisp expression: @example
--- a/man/xemacs/xemacs.texi Mon Aug 13 08:45:53 2007 +0200 +++ b/man/xemacs/xemacs.texi Mon Aug 13 08:46:35 2007 +0200 @@ -93,7 +93,7 @@ XEmacs is the extensible, customizable, self-documenting real-time display editor. This Info file describes how to edit with Emacs and some of how to customize it, but not how to extend it. It -corresponds to XEmacs version 19.13. +corresponds to XEmacs version 19.15. This manual is intended as a detailed reference to XEmacs. If you are looking for an introductory manual, see the New User's
--- a/src/Emacs.ad.h Mon Aug 13 08:45:53 2007 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,75 +0,0 @@ -/* Do not edit this file! - Automatically generated from /m/xemacs-19.14/etc/Emacs.ad - */ -"Emacs.modeline*attributeForeground: Black", -"Emacs.modeline*attributeBackground: Gray75", -"Emacs.text-cursor*attributeBackground: Red3", -"*menubar*Foreground: Gray30", -"*menubar*Background: Gray75", -"*menubar*buttonForeground: Blue", -"*XlwMenu*selectColor: ForestGreen", -"*XmToggleButton*selectColor: ForestGreen", -"*popup*Foreground: Black", -"*popup*Background: Gray75", -"*dialog*Foreground: Black", -"*dialog*Background: #A5C0C1", -"*dialog*XmTextField*Background: WhiteSmoke", -"*dialog*XmText*Background: WhiteSmoke", -"*dialog*XmList*Background: WhiteSmoke", -"*dialog*Command*Background: WhiteSmoke", -"*XlwScrollBar*Foreground: Gray30", -"*XlwScrollBar*Background: Gray75", -"*XmScrollBar*Foreground: Gray30", -"*XmScrollBar*Background: Gray75", -"*topToolBarShadowColor: Gray90", -"*bottomToolBarShadowColor: Gray40", -"*backgroundToolBarColor: Gray75", -"*toolBarShadowThickness: 2", -"*menubar*Font: -*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-*", -"*popup*Font: -*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-*", -"*XmDialogShell*FontList: -*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-*", -"*XmTextField*FontList: -*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*", -"*XmText*FontList: -*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*", -"*XmList*FontList: -*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*", -"*Dialog*Font: -*-helvetica-bold-r-*-*-*-140-*-*-*-*-iso8859-*", -"*dialog*button1.accelerators:#override\ -<KeyPress>Return: ArmAndActivate()\\n\ -<KeyPress>KP_Enter: ArmAndActivate()\\n\ -Ctrl<KeyPress>m: ArmAndActivate()\\n", -"*XmTextField*translations: #override\\n\ - !<Key>osfBackSpace: delete-previous-character()\\n\ - !<Key>osfDelete: delete-previous-character()\\n\ - !Ctrl<Key>h: delete-previous-character()\\n\ - !Ctrl<Key>d: delete-next-character()\\n\ - !Meta<Key>osfDelete: delete-previous-word()\\n\ - !Meta<Key>osfBackSpace: delete-previous-word()\\n\ - !Meta<Key>d: delete-next-word()\\n\ - !Ctrl<Key>k: delete-to-end-of-line()\\n\ - !Ctrl<Key>g: process-cancel()\\n\ - !Ctrl<Key>b: backward-character()\\n\ - !<Key>osfLeft: backward-character()\\n\ - !Ctrl<Key>f: forward-character()\\n\ - !<Key>osfRight: forward-character()\\n\ - !Meta<Key>b: backward-word()\\n\ - !Meta<Key>osfLeft: backward-word()\\n\ - !Meta<Key>f: forward-word()\\n\ - !Meta<Key>osfRight: forward-word()\\n\ - !Ctrl<Key>e: end-of-line()\\n\ - !Ctrl<Key>a: beginning-of-line()\\n\ - !Ctrl<Key>w: cut-clipboard()\\n\ - !Meta<Key>w: copy-clipboard()\\n\ - <Btn2Up>: copy-primary()\\n", -"*dialog*XmPushButton*translations:#override\\n\ - <Btn1Down>: Arm()\\n\ - <Btn1Down>,<Btn1Up>: Activate()\ - Disarm()\\n\ - <Btn1Down>(2+): MultiArm()\\n\ - <Btn1Up>(2+): MultiActivate()\\n\ - <Btn1Up>: Activate()\ - Disarm()\\n\ - <Key>osfSelect: ArmAndActivate()\\n\ - <Key>osfActivate: ArmAndActivate()\\n\ - <Key>osfHelp: Help()\\n\ - ~Shift ~Meta ~Alt <Key>Return: ArmAndActivate()\\n\ - <EnterWindow>: Enter()\\n\ - <LeaveWindow>: Leave()\\n",
--- a/src/EmacsFrame.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/EmacsFrame.c Mon Aug 13 08:46:35 2007 +0200 @@ -102,13 +102,13 @@ {XtNrightToolBarWidth, XtCRightToolBarWidth, XtRInt, sizeof (int), offset (right_toolbar_width), XtRImmediate, (XtPointer)-1}, {XtNtopToolBarShadowColor, XtCTopToolBarShadowColor, XtRPixel, sizeof(Pixel), - offset(top_toolbar_shadow_pixel), XtRString, "Gray90"}, + offset(top_toolbar_shadow_pixel), XtRString, (String) "Gray90"}, {XtNbottomToolBarShadowColor, XtCBottomToolBarShadowColor, XtRPixel, sizeof(Pixel), offset(bottom_toolbar_shadow_pixel), XtRString, - "Gray40"}, + (String) "Gray40"}, {XtNbackgroundToolBarColor, XtCBackgroundToolBarColor, XtRPixel, sizeof(Pixel), offset(background_toolbar_pixel), XtRString, - "Gray75"}, + (String) "Gray75"}, {XtNtopToolBarShadowPixmap, XtCTopToolBarShadowPixmap, XtRPixmap, sizeof (Pixmap), offset(top_toolbar_shadow_pixmap), XtRImmediate, (XtPointer)None}, @@ -130,9 +130,9 @@ offset(font), XtRImmediate, (XtPointer)0 }, {XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel), - offset(foreground_pixel), XtRString, "XtDefaultForeground"}, + offset(foreground_pixel), XtRString, (String) "XtDefaultForeground"}, {XtNcursorColor, XtCForeground, XtRPixel, sizeof(Pixel), - offset(cursor_color), XtRString, "XtDefaultForeground"}, + offset(cursor_color), XtRString, (String) "XtDefaultForeground"}, {XtNbarCursor, XtCBarCursor, XtRBoolean, sizeof (Boolean), offset (bar_cursor), XtRImmediate, (XtPointer)0}, {XtNvisualBell, XtCVisualBell, XtRBoolean, sizeof (Boolean), @@ -155,7 +155,7 @@ static XtActionsRec emacsFrameActionsTable [] = { - {"mapping", (XtActionProc) emacs_Xt_mapping_action}, + {(String) "mapping", (XtActionProc) emacs_Xt_mapping_action}, }; static char @@ -174,7 +174,7 @@ #else /* superclass */ &widgetClassRec, #endif - /* class_name */ "EmacsFrame", + /* class_name */ (String) "EmacsFrame", /* widget_size */ sizeof(EmacsFrameRec), /* class_initialize */ EmacsFrameClassInitialize, /* class_part_initialize */ 0, @@ -265,22 +265,23 @@ struct frame *f = ew->emacs_frame.frame; Widget shell_widget = FRAME_X_SHELL_WIDGET (f); - attrs->event_mask = (ExposureMask | - StructureNotifyMask | - VisibilityChangeMask | - PropertyChangeMask | - StructureNotifyMask | - /*SubstructureNotifyMask |*/ - /*SubstructureRedirectMask |*/ /* Only for WMs! */ - KeyPressMask | - KeyReleaseMask | - ButtonPressMask | - ButtonReleaseMask | - FocusChangeMask | - PointerMotionHintMask | - PointerMotionMask | - LeaveWindowMask | - EnterWindowMask); + attrs->event_mask = + ExposureMask | + VisibilityChangeMask | + PropertyChangeMask | + StructureNotifyMask | + SubstructureNotifyMask | + /*SubstructureRedirectMask |*/ /* Only for WMs! */ + KeyPressMask | + KeyReleaseMask | + ButtonPressMask | + ButtonReleaseMask | + FocusChangeMask | + PointerMotionHintMask | + PointerMotionMask | + LeaveWindowMask | + EnterWindowMask; + #ifdef I18N4 /* Make sure that events wanted by the input method are selected. */
--- a/src/EmacsFrame.h Mon Aug 13 08:45:53 2007 +0200 +++ b/src/EmacsFrame.h Mon Aug 13 08:46:35 2007 +0200 @@ -25,178 +25,178 @@ #define _EmacsFrame_h #ifndef XtNminibuffer -#define XtNminibuffer "minibuffer" +#define XtNminibuffer (String) "minibuffer" #endif #ifndef XtCMinibuffer -#define XtCMinibuffer "Minibuffer" +#define XtCMinibuffer (String) "Minibuffer" #endif #ifndef XtNunsplittable -#define XtNunsplittable "unsplittable" +#define XtNunsplittable (String) "unsplittable" #endif #ifndef XtCUnsplittable -#define XtCUnsplittable "Unsplittable" +#define XtCUnsplittable (String) "Unsplittable" #endif #ifndef XtNinternalBorderWidth -#define XtNinternalBorderWidth "internalBorderWidth" +#define XtNinternalBorderWidth (String) "internalBorderWidth" #endif #ifndef XtCInternalBorderWidth -#define XtCInternalBorderWidth "InternalBorderWidth" +#define XtCInternalBorderWidth (String) "InternalBorderWidth" #endif #ifndef XtNscrollBarWidth -#define XtNscrollBarWidth "scrollBarWidth" +#define XtNscrollBarWidth (String) "scrollBarWidth" #endif #ifndef XtCScrollBarWidth -#define XtCScrollBarWidth "ScrollBarWidth" +#define XtCScrollBarWidth (String) "ScrollBarWidth" #endif #ifndef XtNscrollBarHeight -#define XtNscrollBarHeight "scrollBarHeight" +#define XtNscrollBarHeight (String) "scrollBarHeight" #endif #ifndef XtCScrollBarHeight -#define XtCScrollBarHeight "ScrollBarHeight" +#define XtCScrollBarHeight (String) "ScrollBarHeight" #endif #ifndef XtNtopToolBarHeight -#define XtNtopToolBarHeight "topToolBarHeight" +#define XtNtopToolBarHeight (String) "topToolBarHeight" #endif #ifndef XtCTopToolBarHeight -#define XtCTopToolBarHeight "TopToolBarHeight" +#define XtCTopToolBarHeight (String) "TopToolBarHeight" #endif #ifndef XtNbottomToolBarHeight -#define XtNbottomToolBarHeight "bottomToolBarHeight" +#define XtNbottomToolBarHeight (String) "bottomToolBarHeight" #endif #ifndef XtCBottomToolBarHeight -#define XtCBottomToolBarHeight "BottomToolBarHeight" +#define XtCBottomToolBarHeight (String) "BottomToolBarHeight" #endif #ifndef XtNleftToolBarWidth -#define XtNleftToolBarWidth "leftToolBarWidth" +#define XtNleftToolBarWidth (String) "leftToolBarWidth" #endif #ifndef XtCLeftToolBarWidth -#define XtCLeftToolBarWidth "LeftToolBarWidth" +#define XtCLeftToolBarWidth (String) "LeftToolBarWidth" #endif #ifndef XtNrightToolBarWidth -#define XtNrightToolBarWidth "rightToolBarWidth" +#define XtNrightToolBarWidth (String) "rightToolBarWidth" #endif #ifndef XtCRightToolBarWidth -#define XtCRightToolBarWidth "RightToolBarWidth" +#define XtCRightToolBarWidth (String) "RightToolBarWidth" #endif #ifndef XtNtopToolBarShadowColor -#define XtNtopToolBarShadowColor "topToolBarShadowColor" +#define XtNtopToolBarShadowColor (String) "topToolBarShadowColor" #endif #ifndef XtCTopToolBarShadowColor -#define XtCTopToolBarShadowColor "TopToolBarShadowColor" +#define XtCTopToolBarShadowColor (String) "TopToolBarShadowColor" #endif #ifndef XtNbottomToolBarShadowColor -#define XtNbottomToolBarShadowColor "bottomToolBarShadowColor" +#define XtNbottomToolBarShadowColor (String) "bottomToolBarShadowColor" #endif #ifndef XtCBottomToolBarShadowColor -#define XtCBottomToolBarShadowColor "BottomToolBarShadowColor" +#define XtCBottomToolBarShadowColor (String) "BottomToolBarShadowColor" #endif #ifndef XtNbackgroundToolBarColor -#define XtNbackgroundToolBarColor "backgroundToolBarColor" +#define XtNbackgroundToolBarColor (String) "backgroundToolBarColor" #endif #ifndef XtCBackgroundToolBarColor -#define XtCBackgroundToolBarColor "BackgroundToolBarColor" +#define XtCBackgroundToolBarColor (String) "BackgroundToolBarColor" #endif #ifndef XtNtopToolBarShadowPixmap -#define XtNtopToolBarShadowPixmap "topToolBarShadowPixmap" +#define XtNtopToolBarShadowPixmap (String) "topToolBarShadowPixmap" #endif #ifndef XtCTopToolBarShadowPixmap -#define XtCTopToolBarShadowPixmap "TopToolBarShadowPixmap" +#define XtCTopToolBarShadowPixmap (String) "TopToolBarShadowPixmap" #endif #ifndef XtNbottomToolBarShadowPixmap -#define XtNbottomToolBarShadowPixmap "bottomToolBarShadowPixmap" +#define XtNbottomToolBarShadowPixmap (String) "bottomToolBarShadowPixmap" #endif #ifndef XtCBottomToolBarShadowPixmap -#define XtCBottomToolBarShadowPixmap "BottomToolBarShadowPixmap" +#define XtCBottomToolBarShadowPixmap (String) "BottomToolBarShadowPixmap" #endif #ifndef XtNtoolBarShadowThickness -#define XtNtoolBarShadowThickness "toolBarShadowThickness" +#define XtNtoolBarShadowThickness (String) "toolBarShadowThickness" #endif #ifndef XtCToolBarShadowThickness -#define XtCToolBarShadowThickness "ToolBarShadowThickness" +#define XtCToolBarShadowThickness (String) "ToolBarShadowThickness" #endif #ifndef XtNscrollBarPlacement -#define XtNscrollBarPlacement "scrollBarPlacement" +#define XtNscrollBarPlacement (String) "scrollBarPlacement" #endif #ifndef XtCScrollBarPlacement -#define XtCScrollBarPlacement "ScrollBarPlacement" +#define XtCScrollBarPlacement (String) "ScrollBarPlacement" #endif #ifndef XtRScrollBarPlacement -#define XtRScrollBarPlacement "ScrollBarPlacement" +#define XtRScrollBarPlacement (String) "ScrollBarPlacement" #endif #ifndef XtNinterline -#define XtNinterline "interline" +#define XtNinterline (String) "interline" #endif #ifndef XtCInterline -#define XtCInterline "Interline" +#define XtCInterline (String) "Interline" #endif #ifndef XtNfont -#define XtNfont "font" +#define XtNfont (String) "font" #endif #ifndef XtCFont -#define XtCFont "Font" +#define XtCFont (String) "Font" #endif #ifndef XtNforeground -#define XtNforeground "foreground" +#define XtNforeground (String) "foreground" #endif #ifndef XtCForeground -#define XtCForeground "Foreground" +#define XtCForeground (String) "Foreground" #endif #ifndef XtNiconic -#define XtNiconic "iconic" +#define XtNiconic (String) "iconic" #endif #ifndef XtCIconic -#define XtCIconic "Iconic" +#define XtCIconic (String) "Iconic" #endif #ifndef XtNcursorColor -#define XtNcursorColor "cursorColor" +#define XtNcursorColor (String) "cursorColor" #endif #ifndef XtCCursorColor -#define XtCCursorColor "CursorColor" +#define XtCCursorColor (String) "CursorColor" #endif #ifndef XtNbarCursor -#define XtNbarCursor "barCursor" +#define XtNbarCursor (String) "barCursor" #endif #ifndef XtCBarCursor -#define XtCBarCursor "BarCursor" +#define XtCBarCursor (String) "BarCursor" #endif #ifndef XtNvisualBell -#define XtNvisualBell "visualBell" +#define XtNvisualBell (String) "visualBell" #endif #ifndef XtCVisualBell -#define XtCVisualBell "VisualBell" +#define XtCVisualBell (String) "VisualBell" #endif #ifndef XtNbellVolume -#define XtNbellVolume "bellVolume" +#define XtNbellVolume (String) "bellVolume" #endif #ifndef XtCBellVolume -#define XtCBellVolume "BellVolume" +#define XtCBellVolume (String) "BellVolume" #endif #ifndef XtNpointerBackground -#define XtNpointerBackground "pointerBackground" +#define XtNpointerBackground (String) "pointerBackground" #endif #ifndef XtNpointerColor @@ -204,75 +204,75 @@ #endif #ifndef XtNtextPointer -#define XtNtextPointer "textPointer" +#define XtNtextPointer (String) "textPointer" #endif #ifndef XtNspacePointer -#define XtNspacePointer "spacePointer" +#define XtNspacePointer (String) "spacePointer" #endif #ifndef XtNmodeLinePointer -#define XtNmodeLinePointer "modePointer" +#define XtNmodeLinePointer (String) "modePointer" #endif #ifndef XtNgcPointer -#define XtNgcPointer "gcPointer" +#define XtNgcPointer (String) "gcPointer" #endif #ifndef XtNemacsFrame -#define XtNemacsFrame "emacsFrame" +#define XtNemacsFrame (String) "emacsFrame" #endif #ifndef XtCEmacsFrame -#define XtCEmacsFrame "EmacsFrame" +#define XtCEmacsFrame (String) "EmacsFrame" #endif #ifndef XtNgeometry -#define XtNgeometry "geometry" +#define XtNgeometry (String) "geometry" #endif #ifndef XtCGeometry -#define XtCGeometry "Geometry" +#define XtCGeometry (String) "Geometry" #endif #ifndef XtNinitialGeometry -#define XtNinitialGeometry "initialGeometry" +#define XtNinitialGeometry (String) "initialGeometry" #endif #ifndef XtCInitialGeometry -#define XtCInitialGeometry "InitialGeometry" +#define XtCInitialGeometry (String) "InitialGeometry" #endif #ifndef XtNmenubar -#define XtNmenubar "menubar" +#define XtNmenubar (String) "menubar" #endif #ifndef XtCMenubar -#define XtCMenubar "Menubar" +#define XtCMenubar (String) "Menubar" #endif #ifndef XtNinitiallyUnmapped -#define XtNinitiallyUnmapped "initiallyUnmapped" +#define XtNinitiallyUnmapped (String) "initiallyUnmapped" #endif #ifndef XtCInitiallyUnmapped -#define XtCInitiallyUnmapped "InitiallyUnmapped" +#define XtCInitiallyUnmapped (String) "InitiallyUnmapped" #endif #ifndef XtNpreferredWidth -#define XtNpreferredWidth "preferredWidth" +#define XtNpreferredWidth (String) "preferredWidth" #endif #ifndef XtCPreferredWidth -#define XtCPreferredWidth "PreferredWidth" +#define XtCPreferredWidth (String) "PreferredWidth" #endif #ifndef XtNpreferredHeight -#define XtNpreferredHeight "preferredHeight" +#define XtNpreferredHeight (String) "preferredHeight" #endif #ifndef XtCPreferredHeight -#define XtCPreferredHeight "PreferredHeight" +#define XtCPreferredHeight (String) "PreferredHeight" #endif #ifndef XtNuseBackingStore -#define XtNuseBackingStore "useBackingStore" +#define XtNuseBackingStore (String) "useBackingStore" #endif #ifndef XtCUseBackingStore -#define XtCUseBackingStore "UseBackingStore" +#define XtCUseBackingStore (String) "UseBackingStore" #endif /* scrollbar placement types; like in ScrolledW.h */
--- a/src/EmacsManager.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/EmacsManager.c Mon Aug 13 08:46:35 2007 +0200 @@ -70,7 +70,7 @@ #else /* superclass */ (WidgetClass) &compositeClassRec, #endif - /* class_name */ "EmacsManager", + /* class_name */ (String) "EmacsManager", /* widget_size */ sizeof(EmacsManagerRec), /* class_initialize */ ClassInitialize, /* class_part_init */ NULL,
--- a/src/EmacsManager.h Mon Aug 13 08:45:53 2007 +0200 +++ b/src/EmacsManager.h Mon Aug 13 08:46:35 2007 +0200 @@ -27,18 +27,18 @@ #define _EmacsManager_h #ifndef XtNresizeCallback -#define XtNresizeCallback "resizeCallback" +#define XtNresizeCallback (String) "resizeCallback" #endif #ifndef XtNqueryGeometryCallback -#define XtNqueryGeometryCallback "queryGeometryCallback" +#define XtNqueryGeometryCallback (String) "queryGeometryCallback" #endif #ifndef XtNuserData -#define XtNuserData "userData" +#define XtNuserData (String) "userData" #endif #ifndef XtCUserData -#define XtCUserData "UserData" +#define XtCUserData (String) "UserData" #endif /* scrollbar placement types; like in ScrolledW.h */
--- a/src/EmacsShell.h Mon Aug 13 08:45:53 2007 +0200 +++ b/src/EmacsShell.h Mon Aug 13 08:46:35 2007 +0200 @@ -26,31 +26,31 @@ #define _EmacsShell_h #ifndef XtNwidthCells -#define XtNwidthCells "widthCells" +#define XtNwidthCells (String) "widthCells" #endif #ifndef XtCWidthCells -#define XtCWidthCells "WidthCells" +#define XtCWidthCells (String) "WidthCells" #endif #ifndef XtNheightCells -#define XtNheightCells "heightCells" +#define XtNheightCells (String) "heightCells" #endif #ifndef XtCHeightCells -#define XtCHeightCells "HeightCells" +#define XtCHeightCells (String) "HeightCells" #endif #ifndef XtNminWidthCells -#define XtNminWidthCells "minWidthCells" +#define XtNminWidthCells (String) "minWidthCells" #endif #ifndef XtCMinWidthCells -#define XtCMinWidthCells "MinWidthCells" +#define XtCMinWidthCells (String) "MinWidthCells" #endif #ifndef XtNminHeightCells -#define XtNminHeightCells "minHeightCells" +#define XtNminHeightCells (String) "minHeightCells" #endif #ifndef XtCMinHeightCells -#define XtCMinHeightCells "MinHeightCells" +#define XtCMinHeightCells (String) "MinHeightCells" #endif typedef struct _TopLevelEmacsShellClassRec *TopLevelEmacsShellWidgetClass;
--- a/src/Makefile Mon Aug 13 08:45:53 2007 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1752 +0,0 @@ -dot = . -lispdir = ${srcdir}/$(dot)$(dot)/lisp/ -libsrc = $(dot)$(dot)/lib-src/ -etcdir = $(dot)$(dot)/etc/ -srcdir=/m/xemacs-19.14/src -CC=gcc -CPP=gcc -E -I/usr/i486-linuxaout/include -I/m/xpm-3.4h/lib -I/usr/X11R6/include -CFLAGS=-bi486-linuxaout -O4 -m486 -malign-functions=2 -malign-jumps=2 -malign-loops=2 -C_SWITCH_SYSTEM= -DFUNCPROTO=11 -DNARROWPROTO -D_BSD_SOURCE -LN_S=ln -s -native_sound_lib= -SHELL=/bin/sh - -VPATH=/m/xemacs-19.14/src -STARTFILES = pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o -ILD=/cadillac1/code/bin.sun4/ild -PURIFY_PROG=/local/bin/purify -QUANTIFY_PROG=/local/bin/quantify -windows=no -record-data=no -PURECOV_PROG=/local/bin/purecov -MYCPPFLAGS= -LOCALCPP= -SHORT= -JPEG_LIBS = -ljpeg -CPPFLAGS=-Demacs -DHAVE_CONFIG_H $(MYCPPFLAG) -I. -I${srcdir} -DFUNCPROTO=11 -DNARROWPROTO -D_BSD_SOURCE -I/usr/i486-linuxaout/include -I/m/xpm-3.4h/lib -I/usr/X11R6/include $(LIBX11_INCLUDES) -ALL_CFLAGS=$(CPPFLAGS) ${CFLAGS} -LDFLAGS = -L/usr/i486-linuxaout -L/lib-aout -L/m/xpm-3.4h/lib -L/usr/X11R6/lib -L. $(LIBX11_LDFLAGS) -.c.o: - $(CC) -c $(ALL_CFLAGS) $< -LWLIBSRCDIR = ${srcdir}/$(dot)$(dot)/lwlib -XMU_LIB = -lXmu -LWLIBBUILDDIR = $(dot)$(dot)/lwlib -LIBX11_LDFLAGS = -L$(LWLIBBUILDDIR) -LIBX11_INCLUDES = -I$(LWLIBSRCDIR) - XPM_LIBS = -lXpm -XFACE_LIBS = -lcompface -USAGE_TRACKING_LIBS = -TOOLKIT_LIBS = -lXaw -LIBX11_LIBS = -llw $(TOOLKIT_LIBS) $(XPM_LIBS) $(XFACE_LIBS) $(JPEG_LIBS) -lpng -lz $(USAGE_TRACKING_LIBS) -LIBW= -LIBX= $(LIBX11_LIBS) $(XMU_LIB) -lXt -lSM -lICE $(LIBW) -lXext -lX11 -GNULIB_VAR = -STARTFLAGS = -LD= $(CC) -nostdlib -objs= abbrev.o alloc.o blocktype.o buffer.o bytecode.o callint.o callproc.o casefiddle.o casetab.o cmdloop.o cmds.o console.o console-stream.o data.o database.o device.o dialog.o dired.o doc.o doprnt.o dynarr.o editfns.o elhash.o emacs.o eval.o events.o event-stream.o event-unixoid.o extents.o faces.o fileio.o filelock.o filemode.o floatfns.o fns.o font-lock.o frame.o general.o getloadavg.o dgif_lib.o gif_err.o gifalloc.o glyphs.o gui.o hash.o indent.o inline.o insdel.o intl.o keymap.o lread.o lstream.o macros.o marker.o md5.o menubar.o minibuf.o objects.o opaque.o print.o process.o profile.o pure.o rangetab.o realpath.o redisplay.o redisplay-output.o regex.o scrollbar.o search.o signal.o sound.o linuxplay.o specifier.o strftime.o symbols.o syntax.o sysdep.o toolbar.o console-tty.o device-tty.o event-tty.o frame-tty.o objects-tty.o redisplay-tty.o cm.o undo.o unexelf.o console-x.o device-x.o dialog-x.o event-Xt.o frame-x.o glyphs-x.o gui-x.o menubar-x.o objects-x.o redisplay-x.o scrollbar-x.o toolbar-x.o xgccache.o xselect.o window.o -termcapobjs = tparam.o -rallocobjs = ralloc.o -rallocdocsrc = ralloc.c -mallocobjs = gmalloc.o vm-limit.o -mallocdocsrc = -allocaobjs = -otherobjs= $(termcapobjs) lastfile.o $(mallocobjs) $(rallocobjs) $(allocaobjs) EmacsFrame.o EmacsShell.o TopLevelEmacsShell.o TransientEmacsShell.o EmacsManager.o -lisp= ${lispdir}paths.el ${lispdir}prim/loadup.el ${lispdir}prim/subr.elc ${lispdir}prim/cmdloop.elc ${lispdir}utils/text-props.elc ${lispdir}prim/gui.elc ${lispdir}prim/mouse.elc ${lispdir}prim/mode-motion.elc ${lispdir}prim/keymap.elc ${lispdir}prim/syntax.elc ${lispdir}prim/minibuf.elc ${lispdir}prim/faces.elc ${lispdir}prim/objects.elc ${lispdir}prim/process.elc ${lispdir}prim/keydefs.elc ${lispdir}prim/device.elc ${lispdir}prim/obsolete.elc ${lispdir}prim/glyphs.elc ${lispdir}prim/extents.elc ${lispdir}prim/backquote.elc ${lispdir}prim/events.elc ${lispdir}prim/console.elc ${lispdir}utils/map-ynp.elc ${lispdir}prim/modeline.elc ${lispdir}prim/profile.elc ${lispdir}modes/list-mode.elc ${lispdir}utils/derived.elc ${lispdir}cl/cl.elc ${lispdir}cl/cl-defs.elc ${lispdir}prim/undo-stack.elc ${lispdir}prim/simple.elc ${lispdir}prim/help.elc ${lispdir}prim/files.elc ${lispdir}utils/lib-complete.elc ${lispdir}prim/indent.elc ${lispdir}prim/frame.elc ${lispdir}prim/toolbar.elc ${lispdir}prim/format.elc ${lispdir}prim/window.elc ${lispdir}prim/startup.elc ${lispdir}prim/lisp.elc ${lispdir}prim/page.elc ${lispdir}prim/register.elc ${lispdir}iso/iso8859-1.elc ${lispdir}prim/paragraphs.elc ${lispdir}modes/lisp-mode.elc ${lispdir}modes/text-mode.elc ${lispdir}prim/fill.elc ${lispdir}prim/isearch-mode.elc ${lispdir}prim/misc.elc ${lispdir}modes/cc-mode.elc ${lispdir}packages/vc-hooks.elc ${lispdir}prim/replace.elc ${lispdir}prim/specifier.elc ${lispdir}modes/auto-show.elc ${lispdir}prim/loaddefs.elc ${lispdir}term/tty-init.elc ${lispdir}bytecomp/bytecomp-runtime.elc ${lispdir}prim/float-sup.elc ${lispdir}prim/itimer.elc ${lispdir}ediff/ediff-hook.elc ${lispdir}packages/fontl-hooks.elc ${lispdir}prim/scrollbar.elc ${lispdir}prim/buffer.elc ${lispdir}prim/menubar.elc ${lispdir}packages/buff-menu.elc ${lispdir}prim/dialog.elc ${lispdir}modes/abbrev.elc ${lispdir}x11/x-menubar.elc ${lispdir}x11/x-faces.elc ${lispdir}x11/x-iso8859-1.elc ${lispdir}x11/x-mouse.elc ${lispdir}x11/x-select.elc ${lispdir}x11/x-scrollbar.elc ${lispdir}x11/x-toolbar.elc ${lispdir}x11/x-misc.elc ${lispdir}x11/x-init.elc -otherlisp= ${lispdir}bytecomp/bytecomp.elc ${lispdir}bytecomp/byte-optimize.elc ${lispdir}utils/advice.elc -LIBES = $(LIBX) -ltermcap -lcurses $(GNULIB_VAR) -lm -lgcc -lc -lgcc /usr/lib/crtn.o $(GNULIB_VAR) -all: xemacs -LOADPATH = EMACSLOADPATH="${lispdir}prim" -DUMPENV = $(LOADPATH) -release: temacs ${lisp} ${libsrc}DOC - -if [ -w ${srcdir}/../lisp ]; then w=`pwd`; cd ${srcdir}; $${w}/temacs -batch -l inc-vers; else true; fi - $(DUMPENV) ./temacs -batch -l loadup.el dump - touch release -xemacs: temacs ${libsrc}DOC ${lisp} - $(DUMPENV) ./temacs -batch -l loadup.el dump -xemacs-no-site-file: temacs ${libsrc}DOC ${lisp} - $(DUMPENV) ./temacs -batch -l loadup.el dump no-site-file -obj_src = $(objs:.o=.c) -${libsrc}DOC: ${libsrc}make-docfile ${obj_src} ${lisp} - rm -f ${libsrc}DOC - ${libsrc}make-docfile -d ${srcdir} ${obj_src} ${mallocdocsrc} ${rallocdocsrc} ${lispdir}version.el ${lisp} > ${libsrc}DOC -dump_elcs: dump-elcs -dump-elcs: temacs - $(LOADPATH) ./temacs -batch -l ../prim/update-elc.el $(lisp) $(otherlisp) -${libsrc}make-docfile: - cd ${libsrc}; ${MAKE} ${MFLAGS} make-docfile -LINT.c=$(LINT) $(LINTFLAGS) $(LINTINCLUDES) -LINTFILES= $(objs:.o=.ln) -LINTINCLUDES = -Demacs -DHAVE_CONFIG_H $(MYCPPFLAG) -I. -I${srcdir} -DFUNCPROTO=11 -DNARROWPROTO -D_BSD_SOURCE -I/usr/i486-linuxaout/include -I/m/xpm-3.4h/lib -I/usr/X11R6/include $(LIBX11_INCLUDES) -LINTFLAGS= -fd -m -p -s -u -v -x -lint: $(LINTFILES) - $(LINT.c) $(LINTFILES) -force: -$(LWLIBBUILDDIR)/liblw.a: force - cd ${LWLIBBUILDDIR}; ${MAKE} ${MFLAGS} -temacs_deps: $(LOCALCPP) $(SHORT) $(STARTFILES) ${objs} ${otherobjs} $(LWLIBBUILDDIR)/liblw.a prefix-args -temacs: $(LOCALCPP) $(SHORT) $(STARTFILES) ${objs} ${otherobjs} $(LWLIBBUILDDIR)/liblw.a prefix-args - $(LD) `./prefix-args -Xlinker ${STARTFLAGS} ${LDFLAGS} ` -o $@ ${STARTFILES} ${objs} ${otherobjs} ${LIBES} -cemacs: $(LOCALCPP) $(SHORT) $(STARTFILES) ${objs} ${otherobjs} $(LWLIBBUILDDIR)/liblw.a prefix-args - $(LD) $(ENERGIZEP) `./prefix-args -Xlinker ${STARTFLAGS} ${LDFLAGS} ` -o $@ ${STARTFILES} ${objs} ${otherobjs} ${LIBES} -puremacs: $(LOCALCPP) $(SHORT) $(STARTFILES) ${objs} ${otherobjs} $(LWLIBBUILDDIR)/liblw.a prefix-args - $(PURIFY_PROG) $(LD) `./prefix-args -Xlinker ${STARTFLAGS} ${LDFLAGS} ` -o $@ ${STARTFILES} ${objs} ${otherobjs} ${LIBES} -quantmacs: $(LOCALCPP) $(SHORT) $(STARTFILES) ${objs} ${otherobjs} $(LWLIBBUILDDIR)/liblw.a prefix-args - $(QUANTIFY_PROG) $(LD) `./prefix-args -Xlinker ${STARTFLAGS} ${LDFLAGS} ` -o $@ ${STARTFILES} ${objs} ${otherobjs} ${LIBES} -covmacs: $(LOCALCPP) $(SHORT) $(STARTFILES) ${objs} ${otherobjs} $(LWLIBBUILDDIR)/liblw.a prefix-args - $(PURECOV_PROG) $(LD) `./prefix-args -Xlinker ${STARTFLAGS} ${LDFLAGS} ` -o $@ ${STARTFILES} ${objs} ${otherobjs} ${LIBES} -TopLevelEmacsShell.o : ${srcdir}/EmacsShell-sub.c - $(CC) -c $(ALL_CFLAGS) -DDEFINE_TOP_LEVEL_EMACS_SHELL ${srcdir}/EmacsShell-sub.c - mv EmacsShell-sub.o TopLevelEmacsShell.o -TransientEmacsShell.o : ${srcdir}/EmacsShell-sub.c TopLevelEmacsShell.o - $(CC) -c $(ALL_CFLAGS) -DDEFINE_TRANSIENT_EMACS_SHELL ${srcdir}/EmacsShell-sub.c - mv EmacsShell-sub.o TransientEmacsShell.o -prefix-args: ${srcdir}/prefix-args.c config.h - $(CC) $(ALL_CFLAGS) ${srcdir}/prefix-args.c -o prefix-args -CPP = $(CC) -E -config.h: ${srcdir}/config.h.in - @echo "The file config.h needs to be set up from config.h.in." - @echo "Consult the file \`INSTALL' for instructions for building Emacs." - exit 1 -paths.h: ${srcdir}/paths.h.in - @echo "The file paths.h needs to be set up from paths.h.in." - @echo "Consult the file \`INSTALL' for instructions for building Emacs." - exit 1 -Emacs.ad.h: ${srcdir}/${etcdir}Emacs.ad - @echo "The file Emacs.ad.h needs to be set up from ${srcdir}/${etcdir}Emacs.ad" - @echo "Consult the file \`INSTALL' for instructions for building Emacs." - exit 1 -${libsrc}emacstool: ${libsrc}emacstool.c - cd ${libsrc}; ${MAKE} ${MFLAGS} emacstool -mostlyclean: - rm -f temacs puremacs quantmacs prefix-args xmakefile* core depend.* \#* *.o - rm -f ${libsrc}DOC -clean: mostlyclean - rm -f xemacs libextcli* -distclean: clean versionclean - rm -f config.h paths.h Emacs.ad.h Makefile Makefile.in .pure -realclean: distclean - rm -f TAGS -versionclean: - -rm -f xemacs emacs-* ${libsrc}DOC* -extraclean: realclean - -rm -f *~ \#* m/?*~ s/?*~ -SOURCES = *.[chm] *.pswm [sm]/?* COPYING paths.h.in Makefile.in.in config.h.in README COPYING ChangeLog vms.pp-trans -unlock: - chmod u+w $(SOURCES) -relock: - chmod -w $(SOURCES) -.c.dep: - $(CC) -MM $(ALL_CFLAGS) $< > $*.dep -.SUFFIXES: .dep -obj_dep = $(objs:.o=.dep) -gnu-depend: $(obj_dep) - - cat $(obj_dep) | sh ${libsrc}process-gnu-depends.sh > depend.out -depend: - : > depend.tmp - makedepend -f depend.tmp -Dsubprocesses -DMOCKLISP_SUPPORT -DHAVE_X_WINDOWS -- $(CPPFLAGS) $(ALL_CFLAGS) -- *.c - sh ${libsrc}process-depends.sh < depend.tmp > depend.out -sgiplay.o: config.h -sgiplay.o: libst.h -unexconvex.o: getpagesize.h -unexec.o: getpagesize.h -unexaix.o: config.h -unexalpha.o: config.h -unexapollo.o: config.h -unexconvex.o: config.h -unexec.o: config.h -unexelf.o: config.h -unexenix.o: config.h -unexfreebsd.o: config.h -unexhp9k3.o: config.h -unexhp9k800.o: config.h -unexmips.o: config.h -unexsunos4.o: config.h -EmacsFrame.o: $(LWLIBSRCDIR)/lwlib.h -EmacsFrame.o: EmacsFrame.h -EmacsFrame.o: EmacsFrameP.h -EmacsFrame.o: EmacsManager.h -EmacsFrame.o: blocktype.h -EmacsFrame.o: buffer.h -EmacsFrame.o: bufslots.h -EmacsFrame.o: config.h -EmacsFrame.o: conslots.h -EmacsFrame.o: console-x.h -EmacsFrame.o: console.h -EmacsFrame.o: device.h -EmacsFrame.o: dynarr.h -EmacsFrame.o: faces.h -EmacsFrame.o: frame.h -EmacsFrame.o: frameslots.h -EmacsFrame.o: glyphs-x.h -EmacsFrame.o: glyphs.h -EmacsFrame.o: objects-x.h -EmacsFrame.o: objects.h -EmacsFrame.o: redisplay.h -EmacsFrame.o: scrollbar.h -EmacsFrame.o: specifier.h -EmacsFrame.o: toolbar.h -EmacsFrame.o: window.h -EmacsFrame.o: xintrinsic.h -EmacsFrame.o: xintrinsicp.h -EmacsFrame.o: xmprimitivep.h -EmacsFrame.o: xmu.h -EmacsManager.o: EmacsManager.h -EmacsManager.o: EmacsManagerP.h -EmacsManager.o: config.h -EmacsManager.o: xintrinsicp.h -EmacsManager.o: xmmanagerp.h -EmacsShell-sub.o: EmacsShell.h -EmacsShell-sub.o: EmacsShellP.h -EmacsShell-sub.o: config.h -EmacsShell-sub.o: xintrinsic.h -EmacsShell-sub.o: xintrinsicp.h -EmacsShell.o: EmacsShell.h -EmacsShell.o: config.h -EmacsShell.o: xintrinsicp.h -abbrev.o: blocktype.h -abbrev.o: buffer.h -abbrev.o: bufslots.h -abbrev.o: commands.h -abbrev.o: config.h -abbrev.o: dynarr.h -abbrev.o: insdel.h -abbrev.o: redisplay.h -abbrev.o: scrollbar.h -abbrev.o: syntax.h -abbrev.o: window.h -alloc.o: backtrace.h -alloc.o: blocktype.h -alloc.o: buffer.h -alloc.o: bufslots.h -alloc.o: bytecode.h -alloc.o: config.h -alloc.o: conslots.h -alloc.o: console.h -alloc.o: device.h -alloc.o: dynarr.h -alloc.o: elhash.h -alloc.o: events.h -alloc.o: extents.h -alloc.o: frame.h -alloc.o: frameslots.h -alloc.o: glyphs.h -alloc.o: puresize.h -alloc.o: redisplay.h -alloc.o: scrollbar.h -alloc.o: specifier.h -alloc.o: systime.h -alloc.o: toolbar.h -alloc.o: window.h -alloca.o: config.h -blocktype.o: blocktype.h -blocktype.o: config.h -blocktype.o: dynarr.h -buffer.o: blocktype.h -buffer.o: buffer.h -buffer.o: bufslots.h -buffer.o: commands.h -buffer.o: config.h -buffer.o: conslots.h -buffer.o: console.h -buffer.o: device.h -buffer.o: dynarr.h -buffer.o: elhash.h -buffer.o: extents.h -buffer.o: faces.h -buffer.o: frame.h -buffer.o: frameslots.h -buffer.o: insdel.h -buffer.o: process.h -buffer.o: redisplay.h -buffer.o: scrollbar.h -buffer.o: specifier.h -buffer.o: syntax.h -buffer.o: sysdep.h -buffer.o: sysfile.h -buffer.o: toolbar.h -buffer.o: window.h -bytecode.o: blocktype.h -bytecode.o: buffer.h -bytecode.o: bufslots.h -bytecode.o: config.h -bytecode.o: dynarr.h -bytecode.o: syntax.h -callint.o: blocktype.h -callint.o: buffer.h -callint.o: bufslots.h -callint.o: bytecode.h -callint.o: commands.h -callint.o: config.h -callint.o: dynarr.h -callint.o: events.h -callint.o: insdel.h -callint.o: redisplay.h -callint.o: scrollbar.h -callint.o: systime.h -callint.o: window.h -callproc.o: blocktype.h -callproc.o: buffer.h -callproc.o: bufslots.h -callproc.o: commands.h -callproc.o: config.h -callproc.o: dynarr.h -callproc.o: insdel.h -callproc.o: lstream.h -callproc.o: paths.h -callproc.o: process.h -callproc.o: redisplay.h -callproc.o: scrollbar.h -callproc.o: sysdep.h -callproc.o: sysfile.h -callproc.o: sysproc.h -callproc.o: systime.h -callproc.o: systty.h -callproc.o: window.h -casefiddle.o: blocktype.h -casefiddle.o: buffer.h -casefiddle.o: bufslots.h -casefiddle.o: commands.h -casefiddle.o: config.h -casefiddle.o: dynarr.h -casefiddle.o: insdel.h -casefiddle.o: syntax.h -casetab.o: blocktype.h -casetab.o: buffer.h -casetab.o: bufslots.h -casetab.o: config.h -casetab.o: dynarr.h -casetab.o: opaque.h -cm.o: blocktype.h -cm.o: config.h -cm.o: conslots.h -cm.o: console-tty.h -cm.o: console.h -cm.o: device.h -cm.o: dynarr.h -cm.o: frame.h -cm.o: frameslots.h -cm.o: lstream.h -cm.o: redisplay.h -cm.o: scrollbar.h -cm.o: specifier.h -cm.o: systty.h -cm.o: toolbar.h -cmdloop.o: blocktype.h -cmdloop.o: buffer.h -cmdloop.o: bufslots.h -cmdloop.o: commands.h -cmdloop.o: config.h -cmdloop.o: conslots.h -cmdloop.o: console.h -cmdloop.o: device.h -cmdloop.o: dynarr.h -cmdloop.o: events.h -cmdloop.o: frame.h -cmdloop.o: frameslots.h -cmdloop.o: macros.h -cmdloop.o: redisplay.h -cmdloop.o: scrollbar.h -cmdloop.o: specifier.h -cmdloop.o: systime.h -cmdloop.o: toolbar.h -cmdloop.o: window.h -cmds.o: blocktype.h -cmds.o: buffer.h -cmds.o: bufslots.h -cmds.o: commands.h -cmds.o: config.h -cmds.o: dynarr.h -cmds.o: insdel.h -cmds.o: syntax.h -console-stream.o: blocktype.h -console-stream.o: config.h -console-stream.o: conslots.h -console-stream.o: console-stream.h -console-stream.o: console-tty.h -console-stream.o: console.h -console-stream.o: device.h -console-stream.o: dynarr.h -console-stream.o: events.h -console-stream.o: frame.h -console-stream.o: frameslots.h -console-stream.o: redisplay.h -console-stream.o: scrollbar.h -console-stream.o: specifier.h -console-stream.o: sysdep.h -console-stream.o: systime.h -console-stream.o: systty.h -console-stream.o: toolbar.h -console-stream.o: window.h -console-tty.o: blocktype.h -console-tty.o: buffer.h -console-tty.o: bufslots.h -console-tty.o: config.h -console-tty.o: conslots.h -console-tty.o: console-stream.h -console-tty.o: console-tty.h -console-tty.o: console.h -console-tty.o: device.h -console-tty.o: dynarr.h -console-tty.o: events.h -console-tty.o: faces.h -console-tty.o: frame.h -console-tty.o: frameslots.h -console-tty.o: lstream.h -console-tty.o: redisplay.h -console-tty.o: scrollbar.h -console-tty.o: specifier.h -console-tty.o: sysdep.h -console-tty.o: systime.h -console-tty.o: systty.h -console-tty.o: toolbar.h -console-x.o: blocktype.h -console-x.o: config.h -console-x.o: conslots.h -console-x.o: console-x.h -console-x.o: console.h -console-x.o: dynarr.h -console-x.o: process.h -console-x.o: redisplay.h -console-x.o: xintrinsic.h -console.o: blocktype.h -console.o: buffer.h -console.o: bufslots.h -console.o: config.h -console.o: conslots.h -console.o: console-tty.h -console.o: console.h -console.o: device.h -console.o: dynarr.h -console.o: events.h -console.o: frame.h -console.o: frameslots.h -console.o: redisplay.h -console.o: scrollbar.h -console.o: specifier.h -console.o: sysdep.h -console.o: systime.h -console.o: systty.h -console.o: toolbar.h -console.o: window.h -data.o: blocktype.h -data.o: buffer.h -data.o: bufslots.h -data.o: bytecode.h -data.o: config.h -data.o: dynarr.h -data.o: sysfloat.h -database.o: blocktype.h -database.o: config.h -database.o: database.h -database.o: dynarr.h -debug.o: blocktype.h -debug.o: bytecode.h -debug.o: config.h -debug.o: debug.h -debug.o: dynarr.h -device-tty.o: blocktype.h -device-tty.o: buffer.h -device-tty.o: bufslots.h -device-tty.o: config.h -device-tty.o: conslots.h -device-tty.o: console-stream.h -device-tty.o: console-tty.h -device-tty.o: console.h -device-tty.o: device.h -device-tty.o: dynarr.h -device-tty.o: events.h -device-tty.o: faces.h -device-tty.o: frame.h -device-tty.o: frameslots.h -device-tty.o: lstream.h -device-tty.o: redisplay.h -device-tty.o: scrollbar.h -device-tty.o: specifier.h -device-tty.o: sysdep.h -device-tty.o: systime.h -device-tty.o: systty.h -device-tty.o: toolbar.h -device-x.o: $(LWLIBSRCDIR)/lwlib.h -device-x.o: blocktype.h -device-x.o: buffer.h -device-x.o: bufslots.h -device-x.o: config.h -device-x.o: conslots.h -device-x.o: console-x.h -device-x.o: console.h -device-x.o: device.h -device-x.o: dynarr.h -device-x.o: events.h -device-x.o: faces.h -device-x.o: frame.h -device-x.o: frameslots.h -device-x.o: glyphs-x.h -device-x.o: glyphs.h -device-x.o: objects-x.h -device-x.o: objects.h -device-x.o: redisplay.h -device-x.o: scrollbar.h -device-x.o: specifier.h -device-x.o: sysdep.h -device-x.o: sysfile.h -device-x.o: systime.h -device-x.o: toolbar.h -device-x.o: window.h -device-x.o: xgccache.h -device-x.o: xintrinsic.h -device-x.o: xintrinsicp.h -device-x.o: xmu.h -device.o: blocktype.h -device.o: buffer.h -device.o: bufslots.h -device.o: config.h -device.o: conslots.h -device.o: console.h -device.o: device.h -device.o: dynarr.h -device.o: elhash.h -device.o: events.h -device.o: faces.h -device.o: frame.h -device.o: frameslots.h -device.o: keymap.h -device.o: redisplay.h -device.o: scrollbar.h -device.o: specifier.h -device.o: sysdep.h -device.o: systime.h -device.o: toolbar.h -device.o: window.h -dgif_lib.o: config.h -dgif_lib.o: gif_lib.h -dialog-x.o: $(LWLIBSRCDIR)/lwlib.h -dialog-x.o: EmacsFrame.h -dialog-x.o: EmacsManager.h -dialog-x.o: EmacsShell.h -dialog-x.o: blocktype.h -dialog-x.o: buffer.h -dialog-x.o: bufslots.h -dialog-x.o: commands.h -dialog-x.o: config.h -dialog-x.o: conslots.h -dialog-x.o: console-x.h -dialog-x.o: console.h -dialog-x.o: device.h -dialog-x.o: dynarr.h -dialog-x.o: events.h -dialog-x.o: frame.h -dialog-x.o: frameslots.h -dialog-x.o: gui-x.h -dialog-x.o: opaque.h -dialog-x.o: redisplay.h -dialog-x.o: scrollbar.h -dialog-x.o: specifier.h -dialog-x.o: systime.h -dialog-x.o: toolbar.h -dialog-x.o: window.h -dialog-x.o: xintrinsic.h -dialog.o: blocktype.h -dialog.o: config.h -dialog.o: dynarr.h -dired.o: blocktype.h -dired.o: buffer.h -dired.o: bufslots.h -dired.o: commands.h -dired.o: config.h -dired.o: dynarr.h -dired.o: elhash.h -dired.o: regex.h -dired.o: sysdir.h -dired.o: sysfile.h -doc.o: blocktype.h -doc.o: buffer.h -doc.o: bufslots.h -doc.o: bytecode.h -doc.o: config.h -doc.o: dynarr.h -doc.o: insdel.h -doc.o: keymap.h -doc.o: sysfile.h -doprnt.o: blocktype.h -doprnt.o: buffer.h -doprnt.o: bufslots.h -doprnt.o: config.h -doprnt.o: dynarr.h -doprnt.o: lstream.h -dynarr.o: blocktype.h -dynarr.o: config.h -dynarr.o: dynarr.h -ecrt0.o: config.h -editfns.o: blocktype.h -editfns.o: buffer.h -editfns.o: bufslots.h -editfns.o: commands.h -editfns.o: config.h -editfns.o: conslots.h -editfns.o: console.h -editfns.o: device.h -editfns.o: dynarr.h -editfns.o: events.h -editfns.o: extents.h -editfns.o: frame.h -editfns.o: frameslots.h -editfns.o: insdel.h -editfns.o: redisplay.h -editfns.o: scrollbar.h -editfns.o: specifier.h -editfns.o: sysdep.h -editfns.o: syspwd.h -editfns.o: systime.h -editfns.o: toolbar.h -editfns.o: window.h -elhash.o: blocktype.h -elhash.o: bytecode.h -elhash.o: config.h -elhash.o: dynarr.h -elhash.o: elhash.h -elhash.o: hash.h -emacs.o: backtrace.h -emacs.o: blocktype.h -emacs.o: buffer.h -emacs.o: bufslots.h -emacs.o: commands.h -emacs.o: config.h -emacs.o: conslots.h -emacs.o: console.h -emacs.o: dynarr.h -emacs.o: process.h -emacs.o: sysdep.h -emacs.o: sysfile.h -emacs.o: systime.h -emacs.o: systty.h -energize.o: config.h -epoch.o: blocktype.h -epoch.o: config.h -epoch.o: conslots.h -epoch.o: console-x.h -epoch.o: console.h -epoch.o: device.h -epoch.o: dynarr.h -epoch.o: events.h -epoch.o: frame.h -epoch.o: frameslots.h -epoch.o: objects-x.h -epoch.o: objects.h -epoch.o: scrollbar.h -epoch.o: specifier.h -epoch.o: systime.h -epoch.o: toolbar.h -epoch.o: xintrinsic.h -eval.o: backtrace.h -eval.o: blocktype.h -eval.o: buffer.h -eval.o: bufslots.h -eval.o: bytecode.h -eval.o: commands.h -eval.o: config.h -eval.o: conslots.h -eval.o: console.h -eval.o: dynarr.h -eval.o: opaque.h -event-Xt.o: $(LWLIBSRCDIR)/lwlib.h -event-Xt.o: Emacs.ad.h -event-Xt.o: EmacsFrame.h -event-Xt.o: blocktype.h -event-Xt.o: buffer.h -event-Xt.o: bufslots.h -event-Xt.o: commands.h -event-Xt.o: config.h -event-Xt.o: conslots.h -event-Xt.o: console-tty.h -event-Xt.o: console-x.h -event-Xt.o: console.h -event-Xt.o: device.h -event-Xt.o: dynarr.h -event-Xt.o: events.h -event-Xt.o: frame.h -event-Xt.o: frameslots.h -event-Xt.o: objects-x.h -event-Xt.o: objects.h -event-Xt.o: paths.h -event-Xt.o: process.h -event-Xt.o: redisplay.h -event-Xt.o: scrollbar.h -event-Xt.o: specifier.h -event-Xt.o: sysproc.h -event-Xt.o: systime.h -event-Xt.o: systty.h -event-Xt.o: toolbar.h -event-Xt.o: xintrinsic.h -event-Xt.o: xintrinsicp.h -event-stream.o: blocktype.h -event-stream.o: buffer.h -event-stream.o: bufslots.h -event-stream.o: commands.h -event-stream.o: config.h -event-stream.o: conslots.h -event-stream.o: console.h -event-stream.o: device.h -event-stream.o: dynarr.h -event-stream.o: elhash.h -event-stream.o: events.h -event-stream.o: frame.h -event-stream.o: frameslots.h -event-stream.o: insdel.h -event-stream.o: keymap.h -event-stream.o: lstream.h -event-stream.o: macros.h -event-stream.o: opaque.h -event-stream.o: process.h -event-stream.o: redisplay.h -event-stream.o: scrollbar.h -event-stream.o: specifier.h -event-stream.o: sysdep.h -event-stream.o: systime.h -event-stream.o: toolbar.h -event-stream.o: window.h -event-tty.o: blocktype.h -event-tty.o: config.h -event-tty.o: conslots.h -event-tty.o: console-tty.h -event-tty.o: console.h -event-tty.o: device.h -event-tty.o: dynarr.h -event-tty.o: events.h -event-tty.o: frame.h -event-tty.o: frameslots.h -event-tty.o: paths.h -event-tty.o: process.h -event-tty.o: scrollbar.h -event-tty.o: specifier.h -event-tty.o: sysproc.h -event-tty.o: systime.h -event-tty.o: systty.h -event-tty.o: syswait.h -event-tty.o: toolbar.h -event-unixoid.o: blocktype.h -event-unixoid.o: config.h -event-unixoid.o: conslots.h -event-unixoid.o: console-stream.h -event-unixoid.o: console-tty.h -event-unixoid.o: console.h -event-unixoid.o: device.h -event-unixoid.o: dynarr.h -event-unixoid.o: events.h -event-unixoid.o: paths.h -event-unixoid.o: process.h -event-unixoid.o: sysdep.h -event-unixoid.o: sysproc.h -event-unixoid.o: systime.h -event-unixoid.o: systty.h -events.o: blocktype.h -events.o: buffer.h -events.o: bufslots.h -events.o: config.h -events.o: conslots.h -events.o: console-tty.h -events.o: console-x.h -events.o: console.h -events.o: device.h -events.o: dynarr.h -events.o: events.h -events.o: extents.h -events.o: frame.h -events.o: frameslots.h -events.o: glyphs.h -events.o: keymap.h -events.o: redisplay.h -events.o: scrollbar.h -events.o: specifier.h -events.o: systime.h -events.o: systty.h -events.o: toolbar.h -events.o: window.h -events.o: xintrinsic.h -extents.o: blocktype.h -extents.o: buffer.h -extents.o: bufslots.h -extents.o: config.h -extents.o: conslots.h -extents.o: console.h -extents.o: debug.h -extents.o: device.h -extents.o: dynarr.h -extents.o: elhash.h -extents.o: extents.h -extents.o: faces.h -extents.o: frame.h -extents.o: frameslots.h -extents.o: glyphs.h -extents.o: hash.h -extents.o: insdel.h -extents.o: opaque.h -extents.o: process.h -extents.o: redisplay.h -extents.o: scrollbar.h -extents.o: specifier.h -extents.o: toolbar.h -faces.o: EmacsFrame.h -faces.o: blocktype.h -faces.o: buffer.h -faces.o: bufslots.h -faces.o: config.h -faces.o: conslots.h -faces.o: console-x.h -faces.o: console.h -faces.o: device.h -faces.o: dynarr.h -faces.o: elhash.h -faces.o: extents.h -faces.o: faces.h -faces.o: frame.h -faces.o: frameslots.h -faces.o: glyphs.h -faces.o: hash.h -faces.o: objects-x.h -faces.o: objects.h -faces.o: redisplay.h -faces.o: scrollbar.h -faces.o: specifier.h -faces.o: toolbar.h -faces.o: window.h -faces.o: xintrinsic.h -fileio.o: blocktype.h -fileio.o: buffer.h -fileio.o: bufslots.h -fileio.o: config.h -fileio.o: conslots.h -fileio.o: console.h -fileio.o: device.h -fileio.o: dynarr.h -fileio.o: events.h -fileio.o: frame.h -fileio.o: frameslots.h -fileio.o: insdel.h -fileio.o: lstream.h -fileio.o: paths.h -fileio.o: redisplay.h -fileio.o: scrollbar.h -fileio.o: specifier.h -fileio.o: sysdep.h -fileio.o: sysdir.h -fileio.o: sysfile.h -fileio.o: sysproc.h -fileio.o: syspwd.h -fileio.o: systime.h -fileio.o: toolbar.h -fileio.o: window.h -filelock.o: blocktype.h -filelock.o: buffer.h -filelock.o: bufslots.h -filelock.o: config.h -filelock.o: dynarr.h -filelock.o: paths.h -filelock.o: sysdir.h -filelock.o: sysfile.h -filelock.o: syspwd.h -filemode.o: blocktype.h -filemode.o: config.h -filemode.o: dynarr.h -filemode.o: sysfile.h -floatfns.o: blocktype.h -floatfns.o: config.h -floatfns.o: dynarr.h -floatfns.o: sysfloat.h -fns.o: blocktype.h -fns.o: buffer.h -fns.o: bufslots.h -fns.o: bytecode.h -fns.o: commands.h -fns.o: config.h -fns.o: conslots.h -fns.o: console.h -fns.o: device.h -fns.o: dynarr.h -fns.o: events.h -fns.o: extents.h -fns.o: frame.h -fns.o: frameslots.h -fns.o: scrollbar.h -fns.o: specifier.h -fns.o: systime.h -fns.o: toolbar.h -font-lock.o: blocktype.h -font-lock.o: buffer.h -font-lock.o: bufslots.h -font-lock.o: config.h -font-lock.o: dynarr.h -font-lock.o: insdel.h -font-lock.o: syntax.h -frame-tty.o: blocktype.h -frame-tty.o: config.h -frame-tty.o: conslots.h -frame-tty.o: console-tty.h -frame-tty.o: console.h -frame-tty.o: device.h -frame-tty.o: dynarr.h -frame-tty.o: frame.h -frame-tty.o: frameslots.h -frame-tty.o: scrollbar.h -frame-tty.o: specifier.h -frame-tty.o: systty.h -frame-tty.o: toolbar.h -frame-x.o: $(LWLIBSRCDIR)/lwlib.h -frame-x.o: EmacsFrame.h -frame-x.o: EmacsFrameP.h -frame-x.o: EmacsManager.h -frame-x.o: EmacsShell.h -frame-x.o: ExternalShell.h -frame-x.o: blocktype.h -frame-x.o: buffer.h -frame-x.o: bufslots.h -frame-x.o: config.h -frame-x.o: conslots.h -frame-x.o: console-x.h -frame-x.o: console.h -frame-x.o: device.h -frame-x.o: dynarr.h -frame-x.o: events.h -frame-x.o: extents.h -frame-x.o: faces.h -frame-x.o: frame.h -frame-x.o: frameslots.h -frame-x.o: glyphs-x.h -frame-x.o: glyphs.h -frame-x.o: objects-x.h -frame-x.o: objects.h -frame-x.o: redisplay.h -frame-x.o: scrollbar-x.h -frame-x.o: scrollbar.h -frame-x.o: specifier.h -frame-x.o: systime.h -frame-x.o: toolbar.h -frame-x.o: window.h -frame-x.o: xintrinsic.h -frame-x.o: xintrinsicp.h -frame-x.o: xmprimitivep.h -frame-x.o: xmu.h -frame.o: blocktype.h -frame.o: buffer.h -frame.o: bufslots.h -frame.o: config.h -frame.o: conslots.h -frame.o: console.h -frame.o: device.h -frame.o: dynarr.h -frame.o: events.h -frame.o: extents.h -frame.o: faces.h -frame.o: frame.h -frame.o: frameslots.h -frame.o: glyphs.h -frame.o: menubar.h -frame.o: redisplay.h -frame.o: scrollbar.h -frame.o: specifier.h -frame.o: sysdep.h -frame.o: systime.h -frame.o: toolbar.h -frame.o: window.h -free-hook.o: blocktype.h -free-hook.o: config.h -free-hook.o: dynarr.h -free-hook.o: hash.h -general.o: blocktype.h -general.o: config.h -general.o: dynarr.h -getloadavg.o: blocktype.h -getloadavg.o: config.h -getloadavg.o: dynarr.h -gif_err.o: config.h -gif_err.o: gif_lib.h -gifalloc.o: config.h -gifalloc.o: gif_lib.h -glyphs-x.o: $(LWLIBSRCDIR)/lwlib.h -glyphs-x.o: ${srcdir}/${etcdir}xemacs.xbm -glyphs-x.o: bitmaps.h -glyphs-x.o: blocktype.h -glyphs-x.o: buffer.h -glyphs-x.o: bufslots.h -glyphs-x.o: config.h -glyphs-x.o: conslots.h -glyphs-x.o: console-x.h -glyphs-x.o: console.h -glyphs-x.o: device.h -glyphs-x.o: dynarr.h -glyphs-x.o: frame.h -glyphs-x.o: frameslots.h -glyphs-x.o: gif_lib.h -glyphs-x.o: glyphs-x.h -glyphs-x.o: glyphs.h -glyphs-x.o: insdel.h -glyphs-x.o: objects-x.h -glyphs-x.o: objects.h -glyphs-x.o: opaque.h -glyphs-x.o: scrollbar.h -glyphs-x.o: specifier.h -glyphs-x.o: sysfile.h -glyphs-x.o: toolbar.h -glyphs-x.o: xintrinsic.h -glyphs-x.o: xmu.h -glyphs.o: blocktype.h -glyphs.o: buffer.h -glyphs.o: bufslots.h -glyphs.o: config.h -glyphs.o: conslots.h -glyphs.o: console.h -glyphs.o: device.h -glyphs.o: dynarr.h -glyphs.o: elhash.h -glyphs.o: faces.h -glyphs.o: frame.h -glyphs.o: frameslots.h -glyphs.o: glyphs.h -glyphs.o: objects.h -glyphs.o: redisplay.h -glyphs.o: scrollbar.h -glyphs.o: specifier.h -glyphs.o: toolbar.h -glyphs.o: window.h -gmalloc.o: config.h -gmalloc.o: getpagesize.h -gui-x.o: $(LWLIBSRCDIR)/lwlib.h -gui-x.o: blocktype.h -gui-x.o: buffer.h -gui-x.o: bufslots.h -gui-x.o: config.h -gui-x.o: conslots.h -gui-x.o: console-x.h -gui-x.o: console.h -gui-x.o: device.h -gui-x.o: dynarr.h -gui-x.o: frame.h -gui-x.o: frameslots.h -gui-x.o: gui-x.h -gui-x.o: opaque.h -gui-x.o: scrollbar.h -gui-x.o: specifier.h -gui-x.o: toolbar.h -gui-x.o: xintrinsic.h -gui.o: blocktype.h -gui.o: config.h -gui.o: dynarr.h -hash.o: blocktype.h -hash.o: config.h -hash.o: dynarr.h -hash.o: elhash.h -hash.o: hash.h -hftctl.o: blocktype.h -hftctl.o: config.h -hftctl.o: dynarr.h -hpplay.o: blocktype.h -hpplay.o: config.h -hpplay.o: dynarr.h -indent.o: blocktype.h -indent.o: buffer.h -indent.o: bufslots.h -indent.o: config.h -indent.o: conslots.h -indent.o: console.h -indent.o: device.h -indent.o: dynarr.h -indent.o: extents.h -indent.o: faces.h -indent.o: frame.h -indent.o: frameslots.h -indent.o: glyphs.h -indent.o: insdel.h -indent.o: redisplay.h -indent.o: scrollbar.h -indent.o: specifier.h -indent.o: toolbar.h -indent.o: window.h -inline.o: $(LWLIBSRCDIR)/lwlib.h -inline.o: blocktype.h -inline.o: buffer.h -inline.o: bufslots.h -inline.o: bytecode.h -inline.o: config.h -inline.o: conslots.h -inline.o: console-x.h -inline.o: console.h -inline.o: device.h -inline.o: dynarr.h -inline.o: elhash.h -inline.o: events.h -inline.o: extents.h -inline.o: faces.h -inline.o: frame.h -inline.o: frameslots.h -inline.o: glyphs-x.h -inline.o: glyphs.h -inline.o: gui-x.h -inline.o: keymap.h -inline.o: lstream.h -inline.o: objects.h -inline.o: opaque.h -inline.o: process.h -inline.o: redisplay.h -inline.o: scrollbar.h -inline.o: specifier.h -inline.o: syntax.h -inline.o: systime.h -inline.o: toolbar.h -inline.o: window.h -inline.o: xintrinsic.h -insdel.o: blocktype.h -insdel.o: buffer.h -insdel.o: bufslots.h -insdel.o: config.h -insdel.o: conslots.h -insdel.o: console.h -insdel.o: device.h -insdel.o: dynarr.h -insdel.o: extents.h -insdel.o: frame.h -insdel.o: frameslots.h -insdel.o: insdel.h -insdel.o: lstream.h -insdel.o: redisplay.h -insdel.o: scrollbar.h -insdel.o: specifier.h -insdel.o: toolbar.h -intl.o: blocktype.h -intl.o: bytecode.h -intl.o: config.h -intl.o: conslots.h -intl.o: console.h -intl.o: device.h -intl.o: dynarr.h -keymap.o: blocktype.h -keymap.o: buffer.h -keymap.o: bufslots.h -keymap.o: bytecode.h -keymap.o: commands.h -keymap.o: config.h -keymap.o: conslots.h -keymap.o: console.h -keymap.o: device.h -keymap.o: dynarr.h -keymap.o: elhash.h -keymap.o: events.h -keymap.o: frame.h -keymap.o: frameslots.h -keymap.o: insdel.h -keymap.o: keymap.h -keymap.o: redisplay.h -keymap.o: scrollbar.h -keymap.o: specifier.h -keymap.o: systime.h -keymap.o: toolbar.h -keymap.o: window.h -libsst.o: blocktype.h -libsst.o: config.h -libsst.o: dynarr.h -libsst.o: libsst.h -linuxplay.o: blocktype.h -linuxplay.o: config.h -linuxplay.o: dynarr.h -lread.o: blocktype.h -lread.o: buffer.h -lread.o: bufslots.h -lread.o: bytecode.h -lread.o: commands.h -lread.o: config.h -lread.o: dynarr.h -lread.o: insdel.h -lread.o: lstream.h -lread.o: opaque.h -lread.o: paths.h -lread.o: sysfile.h -lstream.o: blocktype.h -lstream.o: buffer.h -lstream.o: bufslots.h -lstream.o: config.h -lstream.o: dynarr.h -lstream.o: insdel.h -lstream.o: lstream.h -lstream.o: sysfile.h -macros.o: blocktype.h -macros.o: buffer.h -macros.o: bufslots.h -macros.o: commands.h -macros.o: config.h -macros.o: conslots.h -macros.o: console.h -macros.o: device.h -macros.o: dynarr.h -macros.o: events.h -macros.o: frame.h -macros.o: frameslots.h -macros.o: keymap.h -macros.o: macros.h -macros.o: redisplay.h -macros.o: scrollbar.h -macros.o: specifier.h -macros.o: systime.h -macros.o: toolbar.h -macros.o: window.h -malloc.o: config.h -malloc.o: getpagesize.h -marker.o: blocktype.h -marker.o: buffer.h -marker.o: bufslots.h -marker.o: config.h -marker.o: dynarr.h -md5.o: blocktype.h -md5.o: buffer.h -md5.o: bufslots.h -md5.o: config.h -md5.o: dynarr.h -md5.o: insdel.h -menubar-x.o: $(LWLIBSRCDIR)/lwlib.h -menubar-x.o: EmacsFrame.h -menubar-x.o: EmacsManager.h -menubar-x.o: EmacsShell.h -menubar-x.o: blocktype.h -menubar-x.o: buffer.h -menubar-x.o: bufslots.h -menubar-x.o: commands.h -menubar-x.o: config.h -menubar-x.o: conslots.h -menubar-x.o: console-x.h -menubar-x.o: console.h -menubar-x.o: device.h -menubar-x.o: dynarr.h -menubar-x.o: events.h -menubar-x.o: frame.h -menubar-x.o: frameslots.h -menubar-x.o: gui-x.h -menubar-x.o: opaque.h -menubar-x.o: redisplay.h -menubar-x.o: scrollbar.h -menubar-x.o: specifier.h -menubar-x.o: systime.h -menubar-x.o: toolbar.h -menubar-x.o: window.h -menubar-x.o: xintrinsic.h -menubar.o: blocktype.h -menubar.o: config.h -menubar.o: conslots.h -menubar.o: console.h -menubar.o: device.h -menubar.o: dynarr.h -menubar.o: frame.h -menubar.o: frameslots.h -menubar.o: menubar.h -menubar.o: redisplay.h -menubar.o: scrollbar.h -menubar.o: specifier.h -menubar.o: toolbar.h -menubar.o: window.h -minibuf.o: blocktype.h -minibuf.o: buffer.h -minibuf.o: bufslots.h -minibuf.o: commands.h -minibuf.o: config.h -minibuf.o: conslots.h -minibuf.o: console-stream.h -minibuf.o: console.h -minibuf.o: device.h -minibuf.o: dynarr.h -minibuf.o: events.h -minibuf.o: frame.h -minibuf.o: frameslots.h -minibuf.o: insdel.h -minibuf.o: redisplay.h -minibuf.o: scrollbar.h -minibuf.o: specifier.h -minibuf.o: systime.h -minibuf.o: toolbar.h -minibuf.o: window.h -mocklisp.o: blocktype.h -mocklisp.o: buffer.h -mocklisp.o: bufslots.h -mocklisp.o: config.h -mocklisp.o: dynarr.h -msdos.o: config.h -nas.o: blocktype.h -nas.o: config.h -nas.o: dynarr.h -objects-tty.o: blocktype.h -objects-tty.o: config.h -objects-tty.o: conslots.h -objects-tty.o: console-tty.h -objects-tty.o: console.h -objects-tty.o: device.h -objects-tty.o: dynarr.h -objects-tty.o: insdel.h -objects-tty.o: objects-tty.h -objects-tty.o: objects.h -objects-tty.o: specifier.h -objects-tty.o: systty.h -objects-x.o: blocktype.h -objects-x.o: buffer.h -objects-x.o: bufslots.h -objects-x.o: config.h -objects-x.o: conslots.h -objects-x.o: console-x.h -objects-x.o: console.h -objects-x.o: device.h -objects-x.o: dynarr.h -objects-x.o: insdel.h -objects-x.o: objects-x.h -objects-x.o: objects.h -objects-x.o: specifier.h -objects-x.o: xintrinsic.h -objects.o: blocktype.h -objects.o: buffer.h -objects.o: bufslots.h -objects.o: config.h -objects.o: conslots.h -objects.o: console.h -objects.o: device.h -objects.o: dynarr.h -objects.o: elhash.h -objects.o: faces.h -objects.o: frame.h -objects.o: frameslots.h -objects.o: objects.h -objects.o: redisplay.h -objects.o: scrollbar.h -objects.o: specifier.h -objects.o: toolbar.h -objects.o: window.h -opaque.o: blocktype.h -opaque.o: config.h -opaque.o: dynarr.h -opaque.o: opaque.h -print.o: backtrace.h -print.o: blocktype.h -print.o: buffer.h -print.o: bufslots.h -print.o: bytecode.h -print.o: config.h -print.o: conslots.h -print.o: console-stream.h -print.o: console-tty.h -print.o: console.h -print.o: device.h -print.o: dynarr.h -print.o: extents.h -print.o: frame.h -print.o: frameslots.h -print.o: insdel.h -print.o: lstream.h -print.o: scrollbar.h -print.o: specifier.h -print.o: systty.h -print.o: toolbar.h -process.o: blocktype.h -process.o: buffer.h -process.o: bufslots.h -process.o: commands.h -process.o: config.h -process.o: conslots.h -process.o: console.h -process.o: device.h -process.o: dynarr.h -process.o: events.h -process.o: frame.h -process.o: frameslots.h -process.o: insdel.h -process.o: lstream.h -process.o: opaque.h -process.o: paths.h -process.o: process.h -process.o: redisplay.h -process.o: scrollbar.h -process.o: specifier.h -process.o: sysdep.h -process.o: sysfile.h -process.o: sysproc.h -process.o: systime.h -process.o: systty.h -process.o: syswait.h -process.o: toolbar.h -process.o: window.h -profile.o: backtrace.h -profile.o: blocktype.h -profile.o: bytecode.h -profile.o: config.h -profile.o: dynarr.h -profile.o: hash.h -profile.o: systime.h -pure.o: blocktype.h -pure.o: config.h -pure.o: dynarr.h -pure.o: puresize.h -ralloc.o: blocktype.h -ralloc.o: config.h -ralloc.o: dynarr.h -ralloc.o: getpagesize.h -rangetab.o: blocktype.h -rangetab.o: config.h -rangetab.o: dynarr.h -realpath.o: config.h -redisplay-output.o: blocktype.h -redisplay-output.o: buffer.h -redisplay-output.o: bufslots.h -redisplay-output.o: config.h -redisplay-output.o: conslots.h -redisplay-output.o: console.h -redisplay-output.o: debug.h -redisplay-output.o: device.h -redisplay-output.o: dynarr.h -redisplay-output.o: faces.h -redisplay-output.o: frame.h -redisplay-output.o: frameslots.h -redisplay-output.o: glyphs.h -redisplay-output.o: redisplay.h -redisplay-output.o: scrollbar.h -redisplay-output.o: specifier.h -redisplay-output.o: sysdep.h -redisplay-output.o: toolbar.h -redisplay-output.o: window.h -redisplay-tty.o: blocktype.h -redisplay-tty.o: buffer.h -redisplay-tty.o: bufslots.h -redisplay-tty.o: config.h -redisplay-tty.o: conslots.h -redisplay-tty.o: console-tty.h -redisplay-tty.o: console.h -redisplay-tty.o: device.h -redisplay-tty.o: dynarr.h -redisplay-tty.o: events.h -redisplay-tty.o: faces.h -redisplay-tty.o: frame.h -redisplay-tty.o: frameslots.h -redisplay-tty.o: glyphs.h -redisplay-tty.o: lstream.h -redisplay-tty.o: objects-tty.h -redisplay-tty.o: objects.h -redisplay-tty.o: redisplay.h -redisplay-tty.o: scrollbar.h -redisplay-tty.o: specifier.h -redisplay-tty.o: sysdep.h -redisplay-tty.o: systime.h -redisplay-tty.o: systty.h -redisplay-tty.o: toolbar.h -redisplay-tty.o: window.h -redisplay-x.o: $(LWLIBSRCDIR)/lwlib.h -redisplay-x.o: EmacsFrame.h -redisplay-x.o: EmacsFrameP.h -redisplay-x.o: blocktype.h -redisplay-x.o: buffer.h -redisplay-x.o: bufslots.h -redisplay-x.o: config.h -redisplay-x.o: conslots.h -redisplay-x.o: console-x.h -redisplay-x.o: console.h -redisplay-x.o: debug.h -redisplay-x.o: device.h -redisplay-x.o: dynarr.h -redisplay-x.o: faces.h -redisplay-x.o: frame.h -redisplay-x.o: frameslots.h -redisplay-x.o: glyphs-x.h -redisplay-x.o: glyphs.h -redisplay-x.o: objects-x.h -redisplay-x.o: objects.h -redisplay-x.o: paths.h -redisplay-x.o: redisplay.h -redisplay-x.o: scrollbar.h -redisplay-x.o: specifier.h -redisplay-x.o: sysdep.h -redisplay-x.o: sysproc.h -redisplay-x.o: systime.h -redisplay-x.o: toolbar.h -redisplay-x.o: window.h -redisplay-x.o: xgccache.h -redisplay-x.o: xintrinsic.h -redisplay-x.o: xintrinsicp.h -redisplay-x.o: xmprimitivep.h -redisplay.o: blocktype.h -redisplay.o: buffer.h -redisplay.o: bufslots.h -redisplay.o: commands.h -redisplay.o: config.h -redisplay.o: conslots.h -redisplay.o: console.h -redisplay.o: debug.h -redisplay.o: device.h -redisplay.o: dynarr.h -redisplay.o: extents.h -redisplay.o: faces.h -redisplay.o: frame.h -redisplay.o: frameslots.h -redisplay.o: glyphs.h -redisplay.o: insdel.h -redisplay.o: menubar.h -redisplay.o: objects.h -redisplay.o: process.h -redisplay.o: redisplay.h -redisplay.o: scrollbar.h -redisplay.o: specifier.h -redisplay.o: toolbar.h -redisplay.o: window.h -regex.o: blocktype.h -regex.o: buffer.h -regex.o: bufslots.h -regex.o: config.h -regex.o: dynarr.h -regex.o: regex.h -regex.o: syntax.h -scrollbar-x.o: $(LWLIBSRCDIR)/lwlib.h -scrollbar-x.o: EmacsFrame.h -scrollbar-x.o: EmacsManager.h -scrollbar-x.o: blocktype.h -scrollbar-x.o: config.h -scrollbar-x.o: conslots.h -scrollbar-x.o: console-x.h -scrollbar-x.o: console.h -scrollbar-x.o: device.h -scrollbar-x.o: dynarr.h -scrollbar-x.o: frame.h -scrollbar-x.o: frameslots.h -scrollbar-x.o: glyphs-x.h -scrollbar-x.o: glyphs.h -scrollbar-x.o: gui-x.h -scrollbar-x.o: redisplay.h -scrollbar-x.o: scrollbar-x.h -scrollbar-x.o: scrollbar.h -scrollbar-x.o: specifier.h -scrollbar-x.o: toolbar.h -scrollbar-x.o: window.h -scrollbar-x.o: xintrinsic.h -scrollbar.o: blocktype.h -scrollbar.o: buffer.h -scrollbar.o: bufslots.h -scrollbar.o: commands.h -scrollbar.o: config.h -scrollbar.o: conslots.h -scrollbar.o: console.h -scrollbar.o: device.h -scrollbar.o: dynarr.h -scrollbar.o: frame.h -scrollbar.o: frameslots.h -scrollbar.o: glyphs.h -scrollbar.o: redisplay.h -scrollbar.o: scrollbar.h -scrollbar.o: specifier.h -scrollbar.o: toolbar.h -scrollbar.o: window.h -search.o: blocktype.h -search.o: buffer.h -search.o: bufslots.h -search.o: commands.h -search.o: config.h -search.o: dynarr.h -search.o: insdel.h -search.o: opaque.h -search.o: regex.h -search.o: syntax.h -signal.o: blocktype.h -signal.o: config.h -signal.o: conslots.h -signal.o: console.h -signal.o: device.h -signal.o: dynarr.h -signal.o: events.h -signal.o: frame.h -signal.o: frameslots.h -signal.o: scrollbar.h -signal.o: specifier.h -signal.o: sysdep.h -signal.o: systime.h -signal.o: toolbar.h -sound.o: blocktype.h -sound.o: buffer.h -sound.o: bufslots.h -sound.o: commands.h -sound.o: config.h -sound.o: conslots.h -sound.o: console-x.h -sound.o: console.h -sound.o: device.h -sound.o: dynarr.h -sound.o: redisplay.h -sound.o: sysdep.h -sound.o: xintrinsic.h -specifier.o: blocktype.h -specifier.o: buffer.h -specifier.o: bufslots.h -specifier.o: config.h -specifier.o: conslots.h -specifier.o: console.h -specifier.o: device.h -specifier.o: dynarr.h -specifier.o: frame.h -specifier.o: frameslots.h -specifier.o: opaque.h -specifier.o: redisplay.h -specifier.o: scrollbar.h -specifier.o: specifier.h -specifier.o: toolbar.h -specifier.o: window.h -strftime.o: blocktype.h -strftime.o: config.h -strftime.o: dynarr.h -sunOS-fix.o: config.h -sunplay.o: blocktype.h -sunplay.o: config.h -sunplay.o: dynarr.h -sunplay.o: sysdep.h -sunpro.o: blocktype.h -sunpro.o: config.h -sunpro.o: dynarr.h -symbols.o: blocktype.h -symbols.o: buffer.h -symbols.o: bufslots.h -symbols.o: config.h -symbols.o: conslots.h -symbols.o: console.h -symbols.o: dynarr.h -syntax.o: blocktype.h -syntax.o: buffer.h -syntax.o: bufslots.h -syntax.o: commands.h -syntax.o: config.h -syntax.o: dynarr.h -syntax.o: insdel.h -syntax.o: syntax.h -sysdep.o: blocktype.h -sysdep.o: buffer.h -sysdep.o: bufslots.h -sysdep.o: config.h -sysdep.o: conslots.h -sysdep.o: console-stream.h -sysdep.o: console-x.h -sysdep.o: console.h -sysdep.o: device.h -sysdep.o: dynarr.h -sysdep.o: events.h -sysdep.o: frame.h -sysdep.o: frameslots.h -sysdep.o: process.h -sysdep.o: redisplay.h -sysdep.o: scrollbar.h -sysdep.o: specifier.h -sysdep.o: sysdep.h -sysdep.o: sysdir.h -sysdep.o: sysfile.h -sysdep.o: systime.h -sysdep.o: syswait.h -sysdep.o: toolbar.h -sysdep.o: window.h -sysdep.o: xintrinsic.h -termcap.o: blocktype.h -termcap.o: config.h -termcap.o: conslots.h -termcap.o: console.h -termcap.o: device.h -termcap.o: dynarr.h -terminfo.o: config.h -toolbar-x.o: $(LWLIBSRCDIR)/lwlib.h -toolbar-x.o: EmacsFrame.h -toolbar-x.o: EmacsFrameP.h -toolbar-x.o: EmacsManager.h -toolbar-x.o: blocktype.h -toolbar-x.o: buffer.h -toolbar-x.o: bufslots.h -toolbar-x.o: config.h -toolbar-x.o: conslots.h -toolbar-x.o: console-x.h -toolbar-x.o: console.h -toolbar-x.o: device.h -toolbar-x.o: dynarr.h -toolbar-x.o: faces.h -toolbar-x.o: frame.h -toolbar-x.o: frameslots.h -toolbar-x.o: glyphs-x.h -toolbar-x.o: glyphs.h -toolbar-x.o: objects-x.h -toolbar-x.o: objects.h -toolbar-x.o: redisplay.h -toolbar-x.o: scrollbar.h -toolbar-x.o: specifier.h -toolbar-x.o: toolbar.h -toolbar-x.o: window.h -toolbar-x.o: xgccache.h -toolbar-x.o: xintrinsic.h -toolbar-x.o: xintrinsicp.h -toolbar-x.o: xmprimitivep.h -toolbar.o: blocktype.h -toolbar.o: buffer.h -toolbar.o: bufslots.h -toolbar.o: config.h -toolbar.o: conslots.h -toolbar.o: console.h -toolbar.o: device.h -toolbar.o: dynarr.h -toolbar.o: frame.h -toolbar.o: frameslots.h -toolbar.o: glyphs.h -toolbar.o: redisplay.h -toolbar.o: scrollbar.h -toolbar.o: specifier.h -toolbar.o: toolbar.h -toolbar.o: window.h -tooltalk.o: blocktype.h -tooltalk.o: buffer.h -tooltalk.o: bufslots.h -tooltalk.o: config.h -tooltalk.o: dynarr.h -tooltalk.o: elhash.h -tooltalk.o: process.h -tooltalk.o: tooltalk.h -tparam.o: config.h -undo.o: blocktype.h -undo.o: buffer.h -undo.o: bufslots.h -undo.o: config.h -undo.o: dynarr.h -undo.o: extents.h -vm-limit.o: blocktype.h -vm-limit.o: config.h -vm-limit.o: dynarr.h -vm-limit.o: mem-limits.h -vmsproc.o: vmsproc.h -window.o: blocktype.h -window.o: buffer.h -window.o: bufslots.h -window.o: commands.h -window.o: config.h -window.o: conslots.h -window.o: console.h -window.o: device.h -window.o: dynarr.h -window.o: faces.h -window.o: frame.h -window.o: frameslots.h -window.o: glyphs.h -window.o: objects.h -window.o: redisplay.h -window.o: scrollbar.h -window.o: specifier.h -window.o: toolbar.h -window.o: window.h -xgccache.o: blocktype.h -xgccache.o: config.h -xgccache.o: dynarr.h -xgccache.o: hash.h -xgccache.o: xgccache.h -xmu.o: config.h -xselect.o: blocktype.h -xselect.o: buffer.h -xselect.o: bufslots.h -xselect.o: config.h -xselect.o: conslots.h -xselect.o: console-x.h -xselect.o: console.h -xselect.o: device.h -xselect.o: dynarr.h -xselect.o: frame.h -xselect.o: frameslots.h -xselect.o: objects-x.h -xselect.o: objects.h -xselect.o: opaque.h -xselect.o: scrollbar.h -xselect.o: specifier.h -xselect.o: systime.h -xselect.o: toolbar.h -xselect.o: xintrinsic.h
--- a/src/Makefile.in Mon Aug 13 08:45:53 2007 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3231 +0,0 @@ -# Generated automatically from Makefile.in.in by configure. -/* Makefile for src subdirectory in XEmacs. - Copyright (C) 1985, 1987, 1988, 1993, 1994 Free Software Foundation, Inc. - Copyright (C) 1994, 1995 Board of Trustees, University of Illinois - -This file is part of XEmacs. - -XEmacs 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. - -XEmacs 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 XEmacs; see the file COPYING. If not, write to -the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -/* Synched up with: Not synched with FSF. */ - - - -/* Some people use these in paths they define. We don't want their paths - getting changed on them. */ -#undef sparc -#undef sun -#undef unix -#undef sgi -#undef NeXT - -dot = . -/* On Xenix and the IBM RS6000, double-dot gets screwed up. */ -lispdir = ${srcdir}/$(dot)$(dot)/lisp/ -libsrc = $(dot)$(dot)/lib-src/ -etcdir = $(dot)$(dot)/etc/ - -/* Here are the things that we expect ../configure to edit. */ -srcdir=/m/xemacs-19.14/src -CC=gcc -CPP=gcc -E -I/usr/i486-linuxaout/include -I/m/xpm-3.4h/lib -I/usr/X11R6/include -CFLAGS=-bi486-linuxaout -O4 -m486 -malign-functions=2 -malign-jumps=2 -malign-loops=2 -C_SWITCH_SYSTEM= -DFUNCPROTO=11 -DNARROWPROTO -D_BSD_SOURCE -LN_S=ln -s -native_sound_lib= - -/* just to be sure the sh is used */ -SHELL=/bin/sh - -#define NO_SHORTNAMES -#define NOT_C_CODE -#include "config.h" - -/* With the traditional VPATH setting, it is not possible to - simultaneously compile in-place and in another directory. The - mistaken definition is that *all* dependencies are searched for in - the VPATH directory, rather than just the dependencies that are not - themselves targets. Thus, if there is an up-to-date .o file in the - in-place location, it will not get recompiled in the not-in-place - location. - - The GNU Make `vpath' directive continues this tradition, but at - least lets you restrict the classes of files that it applies to. - This allows us to kludge around the problem. */ -#ifdef USE_GNU_MAKE -vpath %.c /m/xemacs-19.14/src -vpath %.h /m/xemacs-19.14/src -/* now list files that should NOT be searched in the srcdir. - This includes any .c or .h that's built from something else - (e.g. a .in file). */ -vpath config.h -vpath paths.h -vpath Emacs.ad.h -#else -VPATH=/m/xemacs-19.14/src -#endif - -#ifdef USE_LCC -/* Why is this here? -# undef LIB_STANDARD -# define LIB_STANDARD -*/ -# define LCCFLAGS -Xa -wucp -XW'[Oo]ld style func dcl' $(ENERGIZEP) -#ifdef NEW_LCC -# define LCCLINK -Xdbx -#else -# define LCCLINK -#endif -# define ORDINARY_LINK -#else -# define LCCFLAGS -# define LCCLINK -#endif - -/* On some machines #define register is done in config; - don't let it interfere with this file. */ -#undef register - -/* On some systems we may not be able to use the system make command. */ -#ifdef MAKE_COMMAND -MAKE = MAKE_COMMAND -#endif - -#ifdef C_COMPILER -CC = C_COMPILER -#endif - -/* Some machines don't find the standard C libraries in the usual place. */ -#ifndef ORDINARY_LINK -#ifndef LIB_STANDARD -#define LIB_STANDARD -lc -#endif -#else -#ifndef LIB_STANDARD -#define LIB_STANDARD -#endif -#endif - -/* Unless inhibited or changed, use -lg to link for debugging. */ -#ifndef LIBS_DEBUG -#define LIBS_DEBUG -lg -#endif - -/* Some s/*.h files define this to request special libraries. */ -#ifndef LIBS_SYSTEM -#define LIBS_SYSTEM -#endif - -/* Some m/*.h files define this to request special libraries. */ -#ifndef LIBS_MACHINE -#define LIBS_MACHINE -#endif - -#ifndef LIB_MATH -# ifdef LISP_FLOAT_TYPE -# define LIB_MATH -lm -# else /* ! defined (LISP_FLOAT_TYPE) */ -# define LIB_MATH -# endif /* ! defined (LISP_FLOAT_TYPE) */ -#endif /* LIB_MATH */ - -/* Some s/*.h files define this to request special switches in ld. */ -#ifndef LD_SWITCH_SYSTEM -#if !defined (__GNUC__) && (defined(COFF_ENCAPSULATE) || (defined (BSD) && !defined (COFF))) -#define LD_SWITCH_SYSTEM -X -#else /* ! defined(COFF_ENCAPSULATE) || (defined (BSD) && !defined (COFF)) */ -#define LD_SWITCH_SYSTEM -#endif /* ! defined(COFF_ENCAPSULATE) || (defined (BSD) && !defined (COFF)) */ -#endif /* LD_SWITCH_SYSTEM */ - -#ifndef LD_SWITCH_CALL_SHARED -#define LD_SWITCH_CALL_SHARED -#endif /* define a call_shared switch */ - -#ifndef LD_SWITCH_SHARED -#define LD_SWITCH_SHARED -c -#endif /* define a shared switch */ - -/* Some m/*.h files define this to request special switches in ld. */ -#ifndef LD_SWITCH_MACHINE -#define LD_SWITCH_MACHINE -#endif - -/* Some m/*.h files define this to request special switches in cc. */ -#ifndef C_SWITCH_MACHINE -#define C_SWITCH_MACHINE -#endif - -/* Some s/*.h files define this to request special switches in cc. */ -#ifndef C_SWITCH_SYSTEM -#define C_SWITCH_SYSTEM -#endif - -/* These macros are for switches specifically related to X Windows. */ -#ifndef C_SWITCH_X_MACHINE -#define C_SWITCH_X_MACHINE -#endif - -#ifndef C_SWITCH_X_SYSTEM -#define C_SWITCH_X_SYSTEM -#endif - -#ifndef C_SWITCH_X_SITE -#define C_SWITCH_X_SITE -#endif - -#ifndef LD_SWITCH_X_SYSTEM -#define LD_SWITCH_X_SYSTEM -#endif - -#ifndef LD_SWITCH_X_SITE -#define LD_SWITCH_X_SITE -#endif - -/* These can be passed in from config.h to define special load and - compile switches needed by individual sites */ -#ifndef LD_SWITCH_SITE -#define LD_SWITCH_SITE -#endif - -#ifndef C_SWITCH_SITE -#define C_SWITCH_SITE -#endif - -#ifndef ORDINARY_LINK - -#ifndef CRT0_COMPILE -#define CRT0_COMPILE $(CC) -c $(ALL_CFLAGS) C_SWITCH_ASM -#endif - -#ifndef START_FILES -#ifdef NO_REMAP -#ifdef COFF_ENCAPSULATE -#define START_FILES pre-crt0.o /usr/local/lib/gcc-crt0.o -#else /* ! defined (COFF_ENCAPSULATE) */ -#define START_FILES pre-crt0.o /lib/crt0.o -#endif /* ! defined (COFF_ENCAPSULATE) */ -#else /* ! defined (NO_REMAP) */ -#define START_FILES ecrt0.o -#endif /* ! defined (NO_REMAP) */ -#endif /* START_FILES */ -STARTFILES = START_FILES - -#else /* ORDINARY_LINK */ - -/* config.h might want to force START_FILES anyway */ -#ifdef START_FILES -STARTFILES = START_FILES -#else -STARTFILES = -#endif /* START_FILES */ - -#endif /* not ORDINARY_LINK */ - -/* Unless inhibited or changed, use -g to compile for debugging. */ -#ifndef C_DEBUG_SWITCH -#define C_DEBUG_SWITCH -g -#endif - -/* If user wants to optimize, this is how. */ -#ifndef C_OPTIMIZE_SWITCH -#define C_OPTIMIZE_SWITCH -O -#endif - -/* cc switches needed to make `asm' keyword work. - Nothing special needed on most machines. */ -#ifndef C_SWITCH_ASM -#define C_SWITCH_ASM -#endif - -ILD=/cadillac1/code/bin.sun4/ild - -PURIFY_PROG=/local/bin/purify -QUANTIFY_PROG=/local/bin/quantify -windows=no -record-data=no -PURECOV_PROG=/local/bin/purecov -#ifdef QUANTIFY -#define QUANTIFY_INCLUDES -I/local/include -#define QUANTIFY_LIBS /local/lib/quantify_stubs.a -#else -#define QUANTIFY_INCLUDES -#define QUANTIFY_LIBS -#endif - -/* Figure out whether the system cpp can handle long names. - Do it by testing it right now. - If it loses, arrange to use the GNU cpp. */ - -#define LONGNAMEBBBFOOX -#ifdef LONGNAMEBBBARFOOX -/* Installed cpp fails to distinguish those names! */ -/* Arrange to compile the GNU cpp later on */ -#define NEED_CPP -/* Cause cc to invoke the cpp that comes with Emacs, - which will be in a file named localcpp. */ -MYCPPFLAG= -Blocal -/* LOCALCPP is the local one or nothing. - CPP is the local one or the standardone. */ -LOCALCPP= localcpp -#else -MYCPPFLAGS= -LOCALCPP= -#endif /* ! defined (LONGNAMEBBBARFOOX) */ - -#ifdef SHORTNAMES -SHORT= shortnames -#else -SHORT= -#endif - -#ifdef HAVE_NATIVE_SOUND -# if defined (SOLARIS2) -# define SOUND_CFLAGS C_SWITCH_SITE -I/usr/demo/SOUND/include -# define SOUND_LIBS ${native_sound_lib} -# define SOUND_OBJS sunplay.o -# else /* !SOLARIS2 */ -# if defined (SPARC) -# define SOUND_CFLAGS C_SWITCH_SITE -I/usr/demo/SOUND -# define SOUND_LIBS ${native_sound_lib} -# define SOUND_OBJS sunplay.o -# else /* !SUNOS4 */ -# if defined (IRIX4) || defined (IRIX5) -# define SOUND_CFLAGS -# define SOUND_LIBS -laudio -# define SOUND_OBJS sgiplay.o -# else /* !IRIX */ -# if defined (hp9000s800) -# ifdef USE_GCC -# define SOUND_CFLAGS -Dconst= -Dvolatile= -I/usr/audio/examples -# else /* ! USE_GCC */ -# define SOUND_CFLAGS +e -I/usr/audio/examples -# endif /* USE_GCC */ -# define SOUND_LIBS -lAlib -# define SOUND_OBJS hpplay.o -# else /* !HP9000S800 */ -# if defined (LINUX) -# define SOUND_CFLAGS -# define SOUND_LIBS -# define SOUND_OBJS linuxplay.o -# else /* !LINUX */ - ERROR!! HAVE\_NATIVE\_SOUND can only be defined on Solaris, SunOS, SGI, hp9000s800, or Linux -# endif /* !LINUX */ -# endif /* !HP9000S800 */ -# endif /* !IRIX */ -# endif /* !SUNOS4 */ -# endif /* !SOLARIS2 */ -#else /* !HAVE_NATIVE_SOUND */ -# define SOUND_CFLAGS -# define SOUND_LIBS -# define SOUND_OBJS -#endif /* ! HAVE_NATIVE_SOUND */ - -#ifdef HAVE_NAS_SOUND -# define NAS_CFLAGS C_SWITCH_SITE -# define NAS_LIBS -laudio -# define NAS_OBJS nas.o -#else -# define NAS_CFLAGS -# define NAS_LIBS -# define NAS_OBJS -#endif /* HAVE_NAS_SOUND */ - -#ifdef ENERGIZE -CONN_DIR=../connection -# define ENERGIZE_INCLUDES -I${I_DIR_PREFIX}${CONN_DIR} -# define ENERGIZE_LDFLAGS -L${CONN_DIR} -# if defined(ENERGIZE_3) -# define ENERGIZE_LIBS -lenergize -# elif defined (ENERGIZE_2) -# define ENERGIZE_LIBS -lconn -# else -# define ENERGIZE_LIBS -lconn -# endif -#else /* !ENERGIZE */ -# define ENERGIZE_INCLUDES -# define ENERGIZE_LDFLAGS -# define ENERGIZE_LIBS -#endif /* !ENERGIZE */ - -#ifdef HAVE_SOCKS -# define SOCKS_LIBS -lsocks -#else /* !HAVE_SOCKS */ -# define SOCKS_LIBS -#endif /* !HAVE_SOCKS */ - -#ifdef HAVE_GIF -# define GIF_OBJS dgif_lib.o gif_err.o gifalloc.o -#else -# define GIF_OBJS -#endif - -#ifdef HAVE_PNG -# ifdef HAVE_PNG_GNUZ -# define PNG_LIBS -lpng -lgz -# else -# define PNG_LIBS -lpng -lz -# endif -#else -# define PNG_LIBS -#endif - -#ifdef HAVE_DATABASE - -# define DATABASE_OBJS database.o - -# if !defined (DATABASE_DBM_LIBS) -# if defined (HAVE_GNU_DBM) && defined (HAVE_LIBGDBM) -# define DATABASE_DBM_LIBS -lgdbm -# elif defined (HAVE_DBM) && defined (HAVE_LIBDBM) -# define DATABASE_DBM_LIBS -ldbm -# else -# define DATABASE_DBM_LIBS -# endif -# endif - -# if !defined (DATABASE_DB_LIBS) -# if defined (HAVE_BERKELEY_DB) && defined (HAVE_LIBDB) -# define DATABASE_DB_LIBS -ldb -# else -# define DATABASE_DB_LIBS -# endif -# endif - -# define DATABASE_LIBS DATABASE_DBM_LIBS DATABASE_DB_LIBS - -#else /* not HAVE_DATABASE */ - -# define DATABASE_OBJS -# define DATABASE_LIBS - -#endif /* not HAVE_DATABASE */ - -#ifdef HAVE_JPEG -JPEG_LIBS = -ljpeg -#endif - -/* If you want to debug, you can add C_DEBUG_SWITCH to this list. - If you want to optimize, you can add C_OPTIMIZE_SWITCH to the list. */ - -/* -Demacs is needed to make some files produce the correct version - for use in Emacs. - - -DHAVE_CONFIG_H is needed for some other files to take advantage of - the information in `config.h'. */ - -/* C_SWITCH_X_SITE must come before C_SWITCH_X_MACHINE and C_SWITCH_X_SYSTEM - since it may have -I options that should override those two. */ - -CPPFLAGS=-Demacs -DHAVE_CONFIG_H $(MYCPPFLAG) -I. \ - -I${srcdir} LCCFLAGS C_SWITCH_MACHINE C_SWITCH_SYSTEM \ - C_SWITCH_SITE C_SWITCH_X_SITE C_SWITCH_X_MACHINE \ - C_SWITCH_X_SYSTEM $(LIBX11_INCLUDES) QUANTIFY_INCLUDES -ALL_CFLAGS=$(CPPFLAGS) ${CFLAGS} - -#ifdef NEED_XILDOFF -#define XILDOFF -xildoff -#else -#define XILDOFF -#endif - -LDFLAGS = LD_SWITCH_SITE LD_SWITCH_X_SITE LD_SWITCH_SYSTEM \ - LD_SWITCH_X_SYSTEM LD_SWITCH_MACHINE \ - -L. $(LIBX11_LDFLAGS) ENERGIZE_LDFLAGS XILDOFF - -#ifdef HAVE_NEXTSTEP -.m.o: - $(CC) -c $(ALL_CFLAGS) $< -#endif - -.c.o: - $(CC) -c $(ALL_CFLAGS) $< - - -#ifndef LIBX11_MACHINE -#define LIBX11_MACHINE -#endif - -#ifndef LIBX11_SYSTEM -#define LIBX11_SYSTEM -#endif - -LWLIBSRCDIR = ${srcdir}/$(dot)$(dot)/lwlib - -#ifdef HAVE_X_WINDOWS - -#ifdef HAVE_TOOLBARS -#define TOOLBAR_X_OBJS toolbar-x.o -#else -#define TOOLBAR_X_OBJS -#endif - -#ifdef HAVE_MENUBARS -#define MENUBAR_X_OBJS menubar-x.o -#else -#define MENUBAR_X_OBJS -#endif - -#ifdef HAVE_SCROLLBARS -#define SCROLLBAR_X_OBJS scrollbar-x.o -#else -#define SCROLLBAR_X_OBJS -#endif - -#ifdef HAVE_DIALOGS -#define DIALOG_X_OBJS dialog-x.o -#else -#define DIALOG_X_OBJS -#endif - -#if defined (HAVE_MENUBARS) || defined (HAVE_SCROLLBARS) || defined (HAVE_DIALOGS) || defined (HAVE_TOOLBARS) -#define GUI_X_OBJS gui-x.o -#else -#define GUI_X_OBJS -#endif -#define XOBJS console-x.o device-x.o DIALOG_X_OBJS event-Xt.o frame-x.o \ - glyphs-x.o GUI_X_OBJS MENUBAR_X_OBJS objects-x.o redisplay-x.o \ - SCROLLBAR_X_OBJS TOOLBAR_X_OBJS xgccache.o xselect.o - -#ifdef HAVE_XMU -#define XMU_OBJS -XMU_LIB = -lXmu -#else -#define XMU_OBJS xmu.o -#endif - -#ifdef EPOCH -#define EPOCH_OBJS epoch.o -#else -#define EPOCH_OBJS -#endif - -/* LWLIBSRCDIR is defined above regardless of X being used or not. - This avoids having to conditionalize the dependencies on lwlib.h */ -LWLIBBUILDDIR = $(dot)$(dot)/lwlib - -LIBX11_LDFLAGS = -L$(LWLIBBUILDDIR) -LIBX11_INCLUDES = -I$(LWLIBSRCDIR) - -#ifdef HAVE_XPM -/* Force the Xpm library to be statically linked, always, if at Sun. */ -# ifdef USAGE_TRACKING - XPM_LIBS = -Bstatic -lXpm -Bdynamic -# else - XPM_LIBS = -lXpm -# endif /* at Sun */ -#endif /* HAVE_XPM */ - -#ifdef HAVE_XFACE -XFACE_LIBS = -lcompface -#endif /* HAVE_XFACE */ - -#ifdef USAGE_TRACKING -/* Force the ut library to be statically linked, always. */ -# if defined (SOLARIS2) || defined (SUNOS4) - USAGE_TRACKING_LIBS = -Bstatic -lut -Bdynamic -# else - USAGE_TRACKING_LIBS = -lut -# endif /* SOLARIS2 || SUNOS4 */ -#else -USAGE_TRACKING_LIBS = -#endif /* USAGE_TRACKING */ - - -#ifdef LWLIB_USES_MOTIF -TOOLKIT_LIBS = -lXm -#else /* ! LWLIB_USES_MOTIF */ -TOOLKIT_LIBS = -lXaw -#endif /* ! LWLIB_USES_MOTIF */ - -LIBX11_LIBS = -llw $(TOOLKIT_LIBS) $(XPM_LIBS) $(XFACE_LIBS) $(JPEG_LIBS) PNG_LIBS $(USAGE_TRACKING_LIBS) - -#ifdef AIX4 -#define LIBI18N -li18n -#else -#define LIBI18N -#endif /* AIX4 */ - -#ifdef THIS_IS_X11R6 -#ifdef NEED_LIBW -LIBW= -lw -#else -LIBW= -#endif -LIBX= $(LIBX11_LIBS) $(XMU_LIB) -lXt -lSM -lICE $(LIBW) -lXext -lX11 LIBX11_MACHINE LIBX11_SYSTEM LIBI18N -#else -LIBX= $(LIBX11_LIBS) $(XMU_LIB) -lXt -lXext -lX11 LIBX11_MACHINE LIBX11_SYSTEM LIBI18N -#endif - -#else -# define XOBJS -# define XMU_OBJS -# define EPOCH_OBJS -#endif /* HAVE_X_WINDOWS */ - -#ifdef HAVE_NEXTSTEP -#ifdef HAVE_TOOLBARS -#define TOOLBAR_NS_OBJS toolbar-ns.o -#else -#define TOOLBAR_NS_OBJS -#endif -#ifdef HAVE_MENUBARS -#define MENUBAR_NS_OBJS menubar-ns.o -#else -#define MENUBAR_NS_OBJS -#endif -#ifdef HAVE_SCROLLBARS -#define SCROLLBAR_NS_OBJS scrollbar-ns.o -#else -#define SCROLLBAR_NS_OBJS -#endif -#ifdef HAVE_DIALOGS -#define DIALOG_NS_OBJS dialog-ns.o -#else -#define DIALOG_NS_OBJS -#endif -#define NSOBJS console-ns.o device-ns.o DIALOG_NS_OBJS event-ns.o frame-ns.o \ - glyphs-ns.o MENUBAR_NS_OBJS nsselect.o objects-ns.o \ - redisplay-ns.o SCROLLBAR_NS_OBJS TOOLBAR_NS_OBJS - -#else -# define NSOBJS -#endif /* HAVE_NEXTSTEP */ - -#ifdef DYNODUMP -DYNODUMPBUILDDIR = $(dot)$(dot)/dynodump -#endif - -#ifndef ORDINARY_LINK -/* Fix linking if compiled with GCC. */ -#ifdef __GNUC__ - -#if __GNUC__ > 1 - -/* Versions of GCC >= 2.0 put their library, libgcc.a, in obscure - places that are difficult to figure out at make time. Fortunately, - these same versions allow you to pass arbitrary flags on to the - linker, so there's no reason not to use it as a linker. - - Well, it's not quite perfect. The `-nostdlib' keeps GCC from - searching for libraries in its internal directories, so we have to - ask GCC explicitly where to find libgcc.a. */ - -#ifndef LINKER -#define LINKER $(CC) -nostdlib -/* GCC passes any argument prefixed with -Xlinker directly to the - linker. See prefix-args.c for an explanation of why we don't do - this with the shell's `for' construct. - Note that some people don't have '.' in their paths, so we must - use ./prefix-args. */ -#define YMF_PASS_LDFLAGS(flags) `./prefix-args -Xlinker flags` -#endif /* LINKER */ - -#ifndef LIB_GCC -/* Ask GCC where to find libgcc.a. */ -#define LIB_GCC `$(CC) -print-libgcc-file-name` -#endif /* LIB_GCC */ - -GNULIB_VAR = LIB_GCC - -#else /* __GNUC__ < 2 */ - -#ifndef LIB_GCC -#define LIB_GCC /usr/local/lib/gcc-gnulib -#endif /* LIB_GCC */ -GNULIB_VAR = `if [ -f LIB_GCC ] ; then echo LIB_GCC; else echo; fi` -#endif /* __GNUC__ < 2 */ -#else /* ! defined (__GNUC__) */ -GNULIB_VAR = - -#endif /* ! defined (__GNUC__) */ -#else -GNULIB_VAR = -#endif /* not ORDINARY_LINK */ - -/* Specify address for ld to start loading at, - if requested by configuration. */ -#ifdef LD_TEXT_START_ADDR -STARTFLAGS = -T LD_TEXT_START_ADDR -e __start -#else -STARTFLAGS = -#endif - -#ifdef ORDINARY_LINK -LD = $(CC) $(CFLAGS) -#else -#ifdef COFF_ENCAPSULATE -LD=$(CC) -nostdlib -#else /* not ORDINARY_LINK */ -#ifdef LINKER -LD=LINKER -#else /* ! defined (LINKER) */ -LD=ld -#endif /* ! defined (LINKER) */ -#endif /* ! defined (COFF_ENCAPSULATE) */ -#endif /* not ORDINARY_LINK */ - -/* A macro which other sections of the makefile can redefine to munge the - flags before they're passed to LD. This is helpful if you have - redefined LD to something odd, like "gcc". */ -#ifndef YMF_PASS_LDFLAGS -#define YMF_PASS_LDFLAGS(flags) flags -#endif - -/* Allow config.h to specify a replacement file for unexec.c. */ -#ifndef UNEXEC -#define UNEXEC unexec.o -#endif -#ifndef UNEXEC_SRC -#define UNEXEC_SRC unexec.c -#endif - -#ifdef ENERGIZE -# ifdef EMACS_BTL - BTLDIR=$(srcdir)/../btl -# define BTLOBJS cadillac-btl.o cadillac-btl-process.o cadillac-btl-asm.o \ - cadillac-btl-emacs.o -# else -# define BTLOBJS -# endif /* BTL */ -# if defined(FREE_CHECKING) || defined(DEBUG_INPUT_BLOCKING) || defined(DEBUG_GCPRO) -# define FREECHECKOBJS free-hook.o -# else /* !FREE */ -# define FREECHECKOBJS -# endif /* !FREE */ -# define ENERGIZE_OBJS energize.o FREECHECKOBJS -#else /* !ENERGIZE */ -# define ENERGIZE_OBJS -# define BTLOBJS -#endif /* !ENERGIZE */ - -#ifdef HAVE_REALPATH -#define REALPATH_OBJS -#else -#define REALPATH_OBJS realpath.o -#endif - -#ifdef TOOLTALK -# define TOOLTALK_OBJS tooltalk.o -# if (defined (IRIX5) || defined (HPUX) || defined (POWERPC)) -# define LIB_TOOLTALK -ltt -# else -# if (defined (SPARC) && !defined (USG)) -# define LIB_TOOLTALK -ltt -lI18N -# else -# if ((defined (SPARC) || defined(INTEL386)) && defined (USG)) -# define LIB_TOOLTALK -ltt -lce -# endif /* ((SPARC || INTEL386) && USG) */ -# endif /* ! (SPARC && !USG) */ -# endif /* !IRIX5 */ -#else /* !TOOLTALK */ -# define TOOLTALK_OBJS -# define LIB_TOOLTALK -#endif /* !TOOLTALK */ - -#ifdef HAVE_CDE -# define LIB_CDE -lDtSvc -#else -# define LIB_CDE -#endif - -#if (defined(LIB_INTL) && (!(defined(I18N3) || defined(I18N4)))) - /* this should be defined by s- files, but we should not use it unless - I18N3 or I18N4 are defined. */ -# undef LIB_INTL -#endif - -#ifndef LIB_INTL -# define LIB_INTL -#endif - -#ifdef MOCKLISP_SUPPORT -# define MOCKLISPOBJS mocklisp.o -#else -# define MOCKLISPOBJS -#endif - -#ifdef DEBUG_XEMACS -# define DEBUG_OBJS debug.o -#else -# define DEBUG_OBJS -#endif - -#ifdef SUNPRO -# define SUNPRO_OBJS sunpro.o -#else -# define SUNPRO_OBJS -#endif - -#ifdef HAVE_TTY -#define TTY_OBJS console-tty.o device-tty.o event-tty.o frame-tty.o \ - objects-tty.o redisplay-tty.o cm.o -#else -#define TTY_OBJS -#endif - -#ifdef HAVE_TOOLBARS -#define TOOLBAR_OBJS toolbar.o -#else -#define TOOLBAR_OBJS -#endif -#ifdef HAVE_MENUBARS -#define MENUBAR_OBJS menubar.o -#else -#define MENUBAR_OBJS -#endif -#ifdef HAVE_SCROLLBARS -#define SCROLLBAR_OBJS scrollbar.o -#else -#define SCROLLBAR_OBJS -#endif -#ifdef HAVE_DIALOGS -#define DIALOG_OBJS dialog.o -#else -#define DIALOG_OBJS -#endif -#if defined (HAVE_MENUBARS) || defined (HAVE_SCROLLBARS) || defined (HAVE_DIALOGS) || defined (HAVE_TOOLBARS) -#define GUI_OBJS gui.o -#else -#define GUI_OBJS -#endif - -#ifdef HAVE_UNIXOID_EVENT_LOOP -#define EVENT_UNIXOID_OBJS event-unixoid.o -#else -#define EVENT_UNIXOID_OBJS -#endif - -/* lastfile must follow all files whose initialized data areas should - be dumped as pure by dump-emacs. - */ - -/* NOTE: The last line cannot be all macros, because make will barf - if they all come out null. */ - -objs= abbrev.o alloc.o blocktype.o buffer.o bytecode.o \ - callint.o callproc.o casefiddle.o casetab.o cmdloop.o \ - cmds.o console.o console-stream.o \ - data.o DATABASE_OBJS DEBUG_OBJS device.o DIALOG_OBJS dired.o doc.o \ - doprnt.o dynarr.o \ - editfns.o elhash.o emacs.o ENERGIZE_OBJS EPOCH_OBJS eval.o events.o \ - event-stream.o EVENT_UNIXOID_OBJS extents.o \ - faces.o fileio.o filelock.o filemode.o floatfns.o fns.o font-lock.o \ - frame.o \ - general.o getloadavg.o GIF_OBJS glyphs.o GUI_OBJS \ - hash.o \ - indent.o inline.o insdel.o intl.o \ - keymap.o \ - lread.o lstream.o \ - macros.o marker.o md5.o MENUBAR_OBJS minibuf.o MOCKLISPOBJS \ - NAS_OBJS NSOBJS \ - objects.o opaque.o \ - print.o process.o profile.o pure.o \ - rangetab.o REALPATH_OBJS redisplay.o redisplay-output.o regex.o \ - SCROLLBAR_OBJS search.o signal.o sound.o SOUND_OBJS specifier.o \ - strftime.o SUNPRO_OBJS symbols.o syntax.o sysdep.o \ - TOOLBAR_OBJS TOOLTALK_OBJS TTY_OBJS \ - undo.o UNEXEC \ - XOBJS XMU_OBJS \ - window.o - -#ifdef HAVE_TTY -# ifdef HAVE_NCURSES -/* If your machine needs -ltermcap, define LIBS_TERMCAP to include - -lncurses -ltermcap in your s or m file (conditionalized on - HAVE_NCURSES). */ -# ifndef LIBS_TERMCAP -# define LIBS_TERMCAP -lncurses -# endif /* LIBS_TERMCAP */ -termcapobjs = terminfo.o -# elif defined (TERMINFO) -/* Used to be -ltermcap here. If your machine needs that, - define LIBS_TERMCAP in the m/<machine>.h file. */ -# ifndef LIBS_TERMCAP -# define LIBS_TERMCAP -lcurses -# endif /* LIBS_TERMCAP */ -termcapobjs = terminfo.o -# else /* ! defined (TERMINFO) */ -# ifndef LIBS_TERMCAP -# define LIBS_TERMCAP -termcapobjs = termcap.o tparam.o -# else /* LIBS_TERMCAP */ -termcapobjs = tparam.o -# endif /* LIBS_TERMCAP */ -# endif /* ! defined (TERMINFO) */ -#else /* !HAVE_TTY */ -# undef LIBS_TERMCAP -# define LIBS_TERMCAP -#endif /* !HAVE_TTY */ - - -#ifdef REL_ALLOC -rallocobjs = ralloc.o -rallocdocsrc = ralloc.c -#else -rallocobjs = -rallocdocsrc = -#endif - -#ifndef SYSTEM_MALLOC -# ifdef GNU_MALLOC /* New GNU malloc */ -# ifdef ERROR_CHECK_MALLOC -mallocobjs = gmalloc.o free-hook.o vm-limit.o -mallocdocsrc = free-hook.c -# else -mallocobjs = gmalloc.o vm-limit.o -mallocdocsrc = -# endif -# else /* Old GNU malloc */ -mallocobjs = malloc.o -mallocdocsrc = -# endif /* Old GNU malloc */ -#else -mallocobjs = -mallocdocsrc = -#endif /* SYSTEM_MALLOC */ - -allocaobjs = - -#ifdef HAVE_X_WINDOWS - -# ifdef EXTERNAL_WIDGET -# define EXTERNAL_WIDGET_OBJS ExternalShell.o extw-Xt-nonshared.o extw-Xlib-nonshared.o - -/* Now we try to figure out how to link a shared library. - If we can't figure it out, leave EXTW_LINK undefined and a shared - library will not be created. */ - -# ifdef USE_GCC -# ifdef USG5 -# define EXTW_LINK(objs, output) $(CC) -shared objs -Xlinker -z -Xlinker text -o output - /* I can't figure out how to do shared a.out libraries, so just punt. */ -# elif !defined (LINUX) || defined (__ELF__) -# define EXTW_LINK(objs, output) $(CC) -shared objs -o output -# endif -# elif defined (USG5) -# if defined (IRIX) -# define EXTW_LINK(objs, output) $(LD) -shared -g -check_registry ${TOOLROOT}/usr/lib/so_locations objs -o output -# else /* not IRIX */ -# define EXTW_LINK(objs, output) $(CC) -G objs -z text -o output -# endif /* not IRIX */ -# else /* not USG5 */ -# if defined (DEC_ALPHA) && defined (OSF1) -# define EXTW_LINK(objs, output) $(LD) $(LDFLAGS) LD_SWITCH_SHARED -d objs -o output $(LIBES) -# else /* !(DEC_ALPHA && OSF1) */ -# define EXTW_LINK(objs, output) $(LD) -dc objs -assert pure-text -o output -# endif /* !(DEC_ALPHA && OSF1) */ -# endif /* not USG5 */ - -# ifdef LWLIB_USES_MOTIF -# ifdef EXTW_LINK -# define MOTIF_OTHER_FILES libextcli_Xm.a libextcli_Xm.so.1 -# else -# define MOTIF_OTHER_FILES libextcli_Xm.a -# endif -# else -# define MOTIF_OTHER_FILES -#endif - -# ifdef EXTW_LINK -# define OTHER_FILES MOTIF_OTHER_FILES \ - libextcli_Xt.a libextcli_Xt.so.1 \ - libextcli_Xlib.a libextcli_Xlib.so.1 -# else -# define OTHER_FILES MOTIF_OTHER_FILES \ - libextcli_Xt.a libextcli_Xlib.a -# endif -# else /* !EXTERNAL_WIDGET */ -# define EXTERNAL_WIDGET_OBJS -# endif /* !EXTERNAL_WIDGET */ - -# define LIBX11_OBJS EmacsFrame.o EmacsShell.o TopLevelEmacsShell.o TransientEmacsShell.o EmacsManager.o EXTERNAL_WIDGET_OBJS -# define LWLIB_DEPS $(LWLIBBUILDDIR)/liblw.a - -#else /* !X */ -# define LIBX11_OBJS -# define LWLIB_DEPS -#endif - -/* define otherobjs as list of object files that make-docfile - should not be told about. */ -otherobjs= $(termcapobjs) BTLOBJS lastfile.o $(mallocobjs) $(rallocobjs) $(allocaobjs) LIBX11_OBJS - -#ifdef LISP_FLOAT_TYPE -#define FLOAT_LISP ${lispdir}prim/float-sup.elc -#else -#define FLOAT_LISP -#endif - -#ifdef HAVE_X_WINDOWS -/* lisp files that are preloaded if compiled with support for X Windows */ -# ifdef HAVE_TOOLBARS -# define X11_TOOLBAR_LISP ${lispdir}x11/x-toolbar.elc -# else -# define X11_TOOLBAR_LISP -# endif -# ifdef HAVE_MENUBARS -# define X11_MENUBAR_LISP ${lispdir}x11/x-menubar.elc -# else -# define X11_MENUBAR_LISP -# endif -# ifdef HAVE_SCROLLBARS -# define X11_SCROLLBAR_LISP ${lispdir}x11/x-scrollbar.elc -# else -# define X11_SCROLLBAR_LISP -# endif -#define X11_LISP X11_MENUBAR_LISP \ - ${lispdir}x11/x-faces.elc \ - ${lispdir}x11/x-iso8859-1.elc ${lispdir}x11/x-mouse.elc \ - ${lispdir}x11/x-select.elc X11_SCROLLBAR_LISP \ - X11_TOOLBAR_LISP ${lispdir}x11/x-misc.elc \ - ${lispdir}x11/x-init.elc -#else -#define X11_LISP -#endif - -#ifdef HAVE_NEXTSTEP -/* lisp files that are preloaded if compiled with support for NeXTstep */ -#define NS_LISP -#else -#define NS_LISP -#endif - -#ifdef HAVE_TTY -/* lisp files that are preloaded if compiled with support for NeXTstep */ -#define TTY_LISP ${lispdir}term/tty-init.elc -#else -#define TTY_LISP -#endif - -#ifdef EPOCH -#define EPOCH_LISP ${lispdir}epoch/epoch.elc -#else -#define EPOCH_LISP -#endif - -#ifdef ENERGIZE -/* Lisp files that are preloaded if compiled with support for Energize - */ -#define ENERGIZE_LISP ${lispdir}comint/gdb.elc \ - ${lispdir}comint/comint.elc ${lispdir}comint/shell.elc \ - ${lispdir}utils/ring.elc ${lispdir}packages/compile.elc \ - ${lispdir}modes/view-less.elc ${lispdir}emulators/evi.elc \ - ${lispdir}packages/font-lock.elc ${lispdir}packages/fast-lock.elc \ - ${lispdir}dired/dired.elc ${lispdir}dired/dired-x.elc \ - ${lispdir}dired/dired-lucid.elc ${lispdir}prim/userlock.elc \ - ${lispdir}energize/energize-init.elc \ - ${lispdir}energize/energize-mode.elc \ - ${lispdir}energize/energize-windows.elc \ - ${lispdir}energize/energize-menus.elc \ - ${lispdir}energize/energize-shell.elc \ - ${lispdir}energize/energize-visit-use.elc \ - ${lispdir}energize/energize-vi.elc \ - ${lispdir}energize/energize-font-lock.elc \ - ${lispdir}energize/energize-advice.elc -#else -#define ENERGIZE_LISP -#endif - -#ifdef SUNPRO -/* Lisp files that are preloaded if compiled with support for SunPro - products */ -#define SUNPRO_LISP ${lispdir}packages/sccs.elc \ - ${lispdir}sunpro/sunpro-init.elc \ - ${lispdir}sunpro/sunpro-menubar.elc \ - ${lispdir}sunpro/sunpro-keys.elc \ - ${lispdir}eos/sun-eos-init.elc \ - ${lispdir}eos/sun-eos-load.elc \ - ${lispdir}eos/sun-eos-common.elc \ - ${lispdir}eos/sun-eos-editor.elc \ - ${lispdir}eos/sun-eos-browser.elc \ - ${lispdir}eos/sun-eos-debugger.elc \ - ${lispdir}eos/sun-eos-debugger-extra.elc \ - ${lispdir}comint/comint.elc \ - ${lispdir}utils/ring.elc \ - ${lispdir}eos/sun-eos-toolbar.elc \ - ${lispdir}eos/sun-eos-menubar.elc \ - ${lispdir}utils/annotations.elc \ - ${lispdir}eos/loaddefs-eos.elc -#else -#define SUNPRO_LISP ${lispdir}prim/loaddefs.elc -#endif - -#ifdef TOOLTALK -/* Lisp files that are preloaded if compiled with support for Tooltalk - */ -#define TOOLTALK_LISP ${lispdir}tooltalk/tooltalk-macros.elc \ - ${lispdir}tooltalk/tooltalk-util.elc \ - ${lispdir}tooltalk/tooltalk-init.elc -#else -#define TOOLTALK_LISP -#endif - -#ifdef LISP_COMMAND_LOOP -#define CMDLOOP_LISP ${lispdir}prim/cmdloop1.elc -#else -#define CMDLOOP_LISP -#endif - -#ifdef HAVE_TOOLBARS -#define TOOLBAR_LISP ${lispdir}prim/toolbar.elc -#else -#define TOOLBAR_LISP -#endif -#ifdef HAVE_MENUBARS -#define MENUBAR_LISP ${lispdir}prim/menubar.elc -#else -#define MENUBAR_LISP -#endif -#ifdef HAVE_SCROLLBARS -#define SCROLLBAR_LISP ${lispdir}prim/scrollbar.elc -#else -#define SCROLLBAR_LISP -#endif -#ifdef HAVE_DIALOGS -#define DIALOG_LISP ${lispdir}prim/dialog.elc -#else -#define DIALOG_LISP -#endif -#ifdef HAVE_WINDOW_SYSTEM -#define MOUSE_LISP ${lispdir}prim/gui.elc ${lispdir}prim/mouse.elc \ - ${lispdir}prim/mode-motion.elc -#else -#define MOUSE_LISP -#endif - -/* List of Lisp files loaded into the dumped Emacs. - Every file that is loaded from loadup.el must be enumerated - here, or the functions won't have have docstrings. - This is dumb, this list should be generated automatically. - [Note: "version.el" is included in the doc separately, but is not listed - here because we don't want things to appear to be out-of-date just - because the version number has been incremented. -- D.N.G. 8/28/93] - */ -/* loaddefs is now included handled by the SUNPRO_LISP define because - SparcWorks support requires an altered version. */ -lisp= ${lispdir}paths.el \ - ${lispdir}prim/loadup.el ${lispdir}prim/subr.elc \ - ${lispdir}prim/cmdloop.elc CMDLOOP_LISP \ - ${lispdir}utils/text-props.elc MOUSE_LISP \ - ${lispdir}prim/keymap.elc ${lispdir}prim/syntax.elc \ - ${lispdir}prim/minibuf.elc ${lispdir}prim/faces.elc \ - ${lispdir}prim/objects.elc ${lispdir}prim/process.elc \ - ${lispdir}prim/keydefs.elc ${lispdir}prim/device.elc \ - ${lispdir}prim/obsolete.elc ${lispdir}prim/glyphs.elc \ - ${lispdir}prim/extents.elc ${lispdir}prim/backquote.elc \ - ${lispdir}prim/events.elc ${lispdir}prim/console.elc \ - ${lispdir}utils/map-ynp.elc ${lispdir}prim/modeline.elc \ - ${lispdir}prim/profile.elc ${lispdir}modes/list-mode.elc \ - ${lispdir}utils/derived.elc ${lispdir}cl/cl.elc \ - ${lispdir}cl/cl-defs.elc ${lispdir}prim/undo-stack.elc \ - ${lispdir}prim/simple.elc ${lispdir}prim/help.elc \ - ${lispdir}prim/files.elc ${lispdir}utils/lib-complete.elc \ - ${lispdir}prim/indent.elc ${lispdir}prim/frame.elc \ - TOOLBAR_LISP ${lispdir}prim/format.elc \ - ${lispdir}prim/window.elc ${lispdir}prim/startup.elc \ - ${lispdir}prim/lisp.elc ${lispdir}prim/page.elc \ - ${lispdir}prim/register.elc ${lispdir}iso/iso8859-1.elc \ - ${lispdir}prim/paragraphs.elc ${lispdir}modes/lisp-mode.elc \ - ${lispdir}modes/text-mode.elc ${lispdir}prim/fill.elc \ - ${lispdir}prim/isearch-mode.elc ${lispdir}prim/misc.elc \ - ${lispdir}modes/cc-mode.elc ${lispdir}packages/vc-hooks.elc \ - ${lispdir}prim/replace.elc ${lispdir}prim/specifier.elc \ - ${lispdir}modes/auto-show.elc SUNPRO_LISP TTY_LISP \ - ${lispdir}bytecomp/bytecomp-runtime.elc FLOAT_LISP EPOCH_LISP \ - ${lispdir}prim/itimer.elc ${lispdir}ediff/ediff-hook.elc \ - ${lispdir}packages/fontl-hooks.elc SCROLLBAR_LISP \ - ${lispdir}prim/buffer.elc MENUBAR_LISP \ - ${lispdir}packages/buff-menu.elc DIALOG_LISP \ - ${lispdir}modes/abbrev.elc X11_LISP NS_LISP ENERGIZE_LISP TOOLTALK_LISP - -/* Other Lisp files that are not dumped out but where it's convenient - (or required?) for them to be byte-compiled early, before xemacs - is dumped out. Don't list them in ${lisp} because then the doc-snarfing - routines get confused. */ -otherlisp= ${lispdir}bytecomp/bytecomp.elc \ - ${lispdir}bytecomp/byte-optimize.elc \ - ${lispdir}utils/advice.elc - -LIBES = NAS_LIBS SOUND_LIBS SOCKS_LIBS ENERGIZE_LIBS LIB_CDE \ - LIB_TOOLTALK $(LIBX) \ - LIBS_SYSTEM LIBS_MACHINE LIBS_TERMCAP LIB_INTL QUANTIFY_LIBS \ - DATABASE_LIBS LIBS_DEBUG $(GNULIB_VAR) LIB_MATH LIB_STANDARD \ - $(GNULIB_VAR) - -/* Enable recompilation of certain other files depending on system type. */ - -#ifndef OTHER_FILES -#define OTHER_FILES -#endif - -/* Enable inclusion of object files in temacs depending on system type. */ -#ifndef OBJECTS_SYSTEM -#define OBJECTS_SYSTEM -#endif - -#ifndef OBJECTS_MACHINE -#define OBJECTS_MACHINE -#endif - -all: xemacs OTHER_FILES - -/* "make release" to build "xemacs" with an incremented version number; - "make xemacs" to just build "xemacs" without incrementing the version. */ - -#ifdef I18N3 -modir = ${etcdir} -# define MOFILE ${modir}emacs.mo -#else -# define MOFILE -#endif - -LOADPATH = EMACSLOADPATH="${lispdir}prim" -DUMPENV = $(LOADPATH) - -release: temacs ${lisp} ${libsrc}DOC MOFILE OTHER_FILES -#ifdef CANNOT_DUMP - ln temacs xemacs -#else -#ifdef HAVE_SHM - -if [ -w ${srcdir}/../lisp ]; then \ - w=`pwd`; cd ${srcdir}; $${w}/temacs -nl -batch -l inc-vers; \ - else true; fi - $(DUMPENV) ./temacs -nl -batch -l loadup.el dump -#else /* ! defined (HAVE_SHM) */ - -if [ -w ${srcdir}/../lisp ]; then \ - w=`pwd`; cd ${srcdir}; $${w}/temacs -batch -l inc-vers; \ - else true; fi - $(DUMPENV) ./temacs -batch -l loadup.el dump -#endif /* ! defined (HAVE_SHM) */ - touch release -#endif /* ! defined (CANNOT_DUMP) */ - -xemacs: temacs ${libsrc}DOC ${lisp} MOFILE OTHER_FILES - $(DUMPENV) ./temacs -batch -l loadup.el dump - -xemacs-no-site-file: temacs ${libsrc}DOC ${lisp} MOFILE OTHER_FILES - $(DUMPENV) ./temacs -batch -l loadup.el dump no-site-file - -obj_src = $(objs:.o=.c) - - -#ifdef NO_DOC_FILE -${libsrc}DOC: ${libsrc}make-docfile -#else -${libsrc}DOC: ${libsrc}make-docfile ${obj_src} ${lisp} -#endif - rm -f ${libsrc}DOC - ${libsrc}make-docfile -d ${srcdir} ${obj_src} \ - ${mallocdocsrc} ${rallocdocsrc} ${lispdir}version.el \ - ${lisp} > ${libsrc}DOC - -dump_elcs: dump-elcs - -dump-elcs: temacs - $(LOADPATH) ./temacs -batch -l ../prim/update-elc.el $(lisp) $(otherlisp) - -${libsrc}make-docfile: - cd ${libsrc}; ${MAKE} ${MFLAGS} make-docfile - -/* Lint Section */ -LINT.c=$(LINT) $(LINTFLAGS) $(LINTINCLUDES) -LINTFILES= $(objs:.o=.ln) -LINTINCLUDES = -Demacs -DHAVE_CONFIG_H $(MYCPPFLAG) -I. \ - -I${srcdir} LCCFLAGS C_SWITCH_MACHINE C_SWITCH_SYSTEM \ - C_SWITCH_SITE C_SWITCH_X_SITE C_SWITCH_X_MACHINE \ - C_SWITCH_X_SYSTEM $(LIBX11_INCLUDES) -LINTFLAGS= -fd -m -p -s -u -v -x -lint: $(LINTFILES) - $(LINT.c) $(LINTFILES) -/* end of Lint Section */ - -force: -$(LWLIBBUILDDIR)/liblw.a: force - cd ${LWLIBBUILDDIR}; ${MAKE} ${MFLAGS} - -#ifdef DYNODUMP -$(DYNODUMPBUILDDIR)/dynodump.so: force - cd ${DYNODUMPBUILDDIR}; ${MAKE} ${MFLAGS} -#endif - -/* Some systems define this to cause parallel Make-ing. */ -#ifndef MAKE_PARALLEL -#define MAKE_PARALLEL -#endif - -#ifdef DYNODUMP -#define DYNODUMP_DEPS $(DYNODUMPBUILDDIR)/dynodump.so -#else -#define DYNODUMP_DEPS -#endif - -#define TEMACS_DEPS MAKE_PARALLEL $(LOCALCPP) $(SHORT) $(STARTFILES) \ - ${objs} ${otherobjs} OBJECTS_SYSTEM \ - OBJECTS_MACHINE LWLIB_DEPS DYNODUMP_DEPS prefix-args - -#define TEMACS_LINK_ARGS YMF_PASS_LDFLAGS \ - (${STARTFLAGS} ${LDFLAGS} LD_SWITCH_CALL_SHARED) -o $@ \ - ${STARTFILES} ${objs} ${otherobjs} OBJECTS_SYSTEM \ - OBJECTS_MACHINE ${LIBES} - -temacs_deps: TEMACS_DEPS - -temacs: TEMACS_DEPS - $(LD) LCCLINK TEMACS_LINK_ARGS - -cemacs: TEMACS_DEPS - $(LD) $(ENERGIZEP) TEMACS_LINK_ARGS - -puremacs: TEMACS_DEPS - $(PURIFY_PROG) $(LD) TEMACS_LINK_ARGS - -quantmacs: TEMACS_DEPS - $(QUANTIFY_PROG) $(LD) TEMACS_LINK_ARGS - -covmacs: TEMACS_DEPS - $(PURECOV_PROG) $(LD) TEMACS_LINK_ARGS - -TopLevelEmacsShell.o : ${srcdir}/EmacsShell-sub.c - $(CC) -c $(ALL_CFLAGS) -DDEFINE_TOP_LEVEL_EMACS_SHELL ${srcdir}/EmacsShell-sub.c - mv EmacsShell-sub.o TopLevelEmacsShell.o - -TransientEmacsShell.o : ${srcdir}/EmacsShell-sub.c TopLevelEmacsShell.o - $(CC) -c $(ALL_CFLAGS) -DDEFINE_TRANSIENT_EMACS_SHELL ${srcdir}/EmacsShell-sub.c - mv EmacsShell-sub.o TransientEmacsShell.o - -#ifdef EXTERNAL_WIDGET - -#if USE_GCC -# define PIC_ARG -fpic -#else -# ifdef IRIX -# define PIC_ARG -KPIC -# else -# define PIC_ARG -K pic -# endif -#endif - -# define EXTERNAL_CLIENT_MOTIF_OBJS_SHARED ExternalClient-Xm-shared.o extw-Xt-shared.o extw-Xlib-shared.o -# define EXTERNAL_CLIENT_XT_OBJS_SHARED ExternalClient-Xt-shared.o extw-Xt-shared.o extw-Xlib-shared.o -# define EXTERNAL_CLIENT_XLIB_OBJS_SHARED ExternalClient-Xlib-shared.o extw-Xlib-shared.o -# define EXTERNAL_CLIENT_MOTIF_OBJS_NONSHARED ExternalClient-Xm-nonshared.o extw-Xt-nonshared.o extw-Xlib-nonshared.o -# define EXTERNAL_CLIENT_XT_OBJS_NONSHARED ExternalClient-Xt-nonshared.o extw-Xt-nonshared.o extw-Xlib-nonshared.o -# define EXTERNAL_CLIENT_XLIB_OBJS_NONSHARED ExternalClient-Xlib-nonshared.o extw-Xlib-nonshared.o - -/* Add dependencies so things work right with a parallel make */ -ExternalClient-Xm-shared.o: ${srcdir}/ExternalClient.c ExternalClient-Xt-shared.o ExternalClient-Xm-nonshared.o - $(CC) -c PIC_ARG $(ALL_CFLAGS) -DEXTW_USES_MOTIF ${srcdir}/ExternalClient.c - mv ExternalClient.o ExternalClient-Xm-shared.o - -ExternalClient-Xt-shared.o: ${srcdir}/ExternalClient.c ExternalClient-Xt-nonshared.o - $(CC) -c PIC_ARG $(ALL_CFLAGS) ${srcdir}/ExternalClient.c - mv ExternalClient.o ExternalClient-Xt-shared.o - -ExternalClient-Xlib-shared.o: ${srcdir}/ExternalClient-Xlib.c ExternalClient-Xlib-nonshared.o - $(CC) -c PIC_ARG $(ALL_CFLAGS) ${srcdir}/ExternalClient-Xlib.c - mv ExternalClient-Xlib.o ExternalClient-Xlib-shared.o - -ExternalClient-Xm-nonshared.o: ${srcdir}/ExternalClient.c ExternalClient-Xt-nonshared.o - $(CC) -c $(ALL_CFLAGS) -DEXTW_USES_MOTIF ${srcdir}/ExternalClient.c - mv ExternalClient.o ExternalClient-Xm-nonshared.o - -ExternalClient-Xt-nonshared.o: ${srcdir}/ExternalClient.c - $(CC) -c $(ALL_CFLAGS) ${srcdir}/ExternalClient.c - mv ExternalClient.o ExternalClient-Xt-nonshared.o - -ExternalClient-Xlib-nonshared.o: ${srcdir}/ExternalClient-Xlib.c - $(CC) -c $(ALL_CFLAGS) ${srcdir}/ExternalClient-Xlib.c - mv ExternalClient-Xlib.o ExternalClient-Xlib-nonshared.o - -/* We compile the common files twice (once with PIC and once without) - because on some systems, compiling with PIC but not linking into - a shared library messes things up. */ -extw-Xt-shared.o: ${srcdir}/extw-Xt.c extw-Xt-nonshared.o - $(CC) -c PIC_ARG $(ALL_CFLAGS) ${srcdir}/extw-Xt.c - mv extw-Xt.o extw-Xt-shared.o - -extw-Xlib-shared.o: ${srcdir}/extw-Xlib.c extw-Xlib-nonshared.o - $(CC) -c PIC_ARG $(ALL_CFLAGS) ${srcdir}/extw-Xlib.c - mv extw-Xlib.o extw-Xlib-shared.o - -extw-Xt-nonshared.o: ${srcdir}/extw-Xt.c - $(CC) -c $(ALL_CFLAGS) ${srcdir}/extw-Xt.c - mv extw-Xt.o extw-Xt-nonshared.o - -extw-Xlib-nonshared.o: ${srcdir}/extw-Xlib.c - $(CC) -c $(ALL_CFLAGS) ${srcdir}/extw-Xlib.c - mv extw-Xlib.o extw-Xlib-nonshared.o - -libextcli_Xm.a: EXTERNAL_CLIENT_MOTIF_OBJS_NONSHARED - ar r libextcli_Xm.a EXTERNAL_CLIENT_MOTIF_OBJS_NONSHARED - -libextcli_Xt.a: EXTERNAL_CLIENT_XT_OBJS_NONSHARED - ar r libextcli_Xt.a EXTERNAL_CLIENT_XT_OBJS_NONSHARED - -libextcli_Xlib.a: EXTERNAL_CLIENT_XLIB_OBJS_NONSHARED - ar r libextcli_Xlib.a EXTERNAL_CLIENT_XLIB_OBJS_NONSHARED - -#ifdef EXTW_LINK - -libextcli_Xm.so.1: EXTERNAL_CLIENT_MOTIF_OBJS_SHARED - EXTW_LINK(EXTERNAL_CLIENT_MOTIF_OBJS_SHARED, libextcli_Xm.so.1) - -libextcli_Xt.so.1: EXTERNAL_CLIENT_XT_OBJS_SHARED - EXTW_LINK(EXTERNAL_CLIENT_XT_OBJS_SHARED, libextcli_Xt.so.1) - -libextcli_Xlib.so.1: EXTERNAL_CLIENT_XLIB_OBJS_SHARED - EXTW_LINK(EXTERNAL_CLIENT_XLIB_OBJS_SHARED, libextcli_Xlib.so.1) - -#endif - -#endif /* EXTERNAL_WIDGET */ - -prefix-args: ${srcdir}/prefix-args.c config.h - $(CC) $(ALL_CFLAGS) ${srcdir}/prefix-args.c -o prefix-args - -/* These are needed for C compilation, on the systems that need them */ -#ifdef NEED_CPP -CPP = ./localcpp -localcpp: - cd ${cppdir}; ${MAKE} ${MFLAGS} EMACS=-DEMACS - ln ${cppdir}cpp localcpp /* Name where ALL_CFLAGS will refer to it */ -/* cc appears to be cretinous and require all of these to exist - if -B is specified -- we can't use one local pass and let the - others be the standard ones. What a loser. - We can't even use ln, since they are probably - on different disks. */ - cp /lib/ccom localccom - -cp /lib/optim localoptim - -cp /lib/c2 localc2 - cp /bin/as localas -#else /* ! defined (NEED_CPP) */ -CPP = $(CC) -E -#endif /* ! defined (NEED_CPP) */ - -#ifdef SHORTNAMES -shortnames: - cd ${shortnamesdir}; ${MAKE} ${MFLAGS} -#endif - -config.h: ${srcdir}/config.h.in - @echo "The file config.h needs to be set up from config.h.in." - @echo "Consult the file \`INSTALL' for instructions for building Emacs." - exit 1 - -paths.h: ${srcdir}/paths.h.in - @echo "The file paths.h needs to be set up from paths.h.in." - @echo "Consult the file \`INSTALL' for instructions for building Emacs." - exit 1 - -Emacs.ad.h: ${srcdir}/${etcdir}Emacs.ad - @echo "The file Emacs.ad.h needs to be set up from ${srcdir}/${etcdir}Emacs.ad" - @echo "Consult the file \`INSTALL' for instructions for building Emacs." - exit 1 - -/* Some machines have alloca built-in. - They should define HAVE_ALLOCA, or may just let alloca.s - be used but generate no code. - Some have it written in assembler in alloca.s. - Some use the C version in alloca.c (these define C_ALLOCA in config.h). - */ - -#ifdef C_ALLOCA -/* We could put something in alloca.c to #define free and malloc - whenever emacs was #defined, but that's not appropriate for all - users of alloca in Emacs. Check out ../lib-src/getopt.c. */ -alloca.o : ${srcdir}/alloca.c - $(CC) -c $(CPPFLAGS) -Dfree=xfree -Dmalloc=xmalloc \ - $(ALL_CFLAGS) $< -#else -#ifndef HAVE_ALLOCA -alloca.o : ${srcdir}/alloca.s config.h -/* $(CPP) is cc -E, which may get confused by filenames - that do not end in .c. So copy file to a safe name. */ - cp ${srcdir}/alloca.s allocatem.c -/* Remove any ^L, blank lines, and preprocessor comments, - since some assemblers barf on them. Use a different basename for the - output file, since some stupid compilers (Green Hill's) use that - name for the intermediate assembler file. */ - $(CPP) $(CPPFLAGS) $(ALL_CFLAGS) allocatem.c | \ - sed -e 's///' -e 's/^#.*//' | \ - sed -n -e '/^..*$$/p' > allocax.s - -rm -f alloca.o -/* Xenix, in particular, needs to run assembler via cc. */ - $(CC) -c allocax.s - mv allocax.o alloca.o - rm -f allocax.s allocatem.c -#endif /* HAVE_ALLOCA */ -#endif /* ! defined (C_ALLOCA) */ - -#ifdef USE_LCC /* lcc doesn't do asm() yet */ -ecrt0.o: ${srcdir}/ecrt0.c - gcc -c -g -Demacs $< -#endif /* USE_LCC */ - -#ifdef EMACS_BTL -BTL_INCLUDES=-I$(BTLDIR) -# define BTL_COMPILE \ - -DEMACS_BTL -D`lucid-arch` -I. $(BTL_INCLUDES) $(BTLDIR)/$(@:.o=.c) - -cadillac-btl.o cadillac-btl-process.o cadillac-btl-emacs.o: - $(CC) $(CFLAGS) -c BTL_COMPILE -# ifndef USE_LCC -cadillac-btl-asm.o: - $(CC) $(CFLAGS) -c BTL_COMPILE -# else /* lcc doesn't do asm() yet */ -cadillac-btl-asm.o: - gcc -O -g -c BTL_COMPILE -# endif /* lcc */ -#endif /* EMACS_BTL */ - -#ifdef ENERGIZE -energize.o: ${srcdir}/energize.c - $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) ENERGIZE_INCLUDES $(BTL_INCLUDES) $< -#endif /* ENERGIZE */ - -#ifdef HAVE_NATIVE_SOUND -# if defined (SUNOS4) || defined (SOLARIS2) -sunplay.o: ${srcdir}/sunplay.c - $(CC) -c $(ALL_CFLAGS) SOUND_CFLAGS $< -# endif /* SUNOS4 or SOLARIS2 */ -# ifdef hp9000s800 -hpplay.o: ${srcdir}/hpplay.c - $(CC) -c -Demacs $(ALL_CFLAGS) SOUND_CFLAGS $< -# endif /* hp9000s800 */ -#endif /* HAVE_NATIVE_SOUND */ - -#ifdef HAVE_NAS_SOUND -nas.o: ${srcdir}/nas.c - $(CC) -c $(ALL_CFLAGS) NAS_CFLAGS $< -#endif /* HAVE_NAS_SOUND */ - -/* System-specific programs to be made. - OTHER_FILES, OBJECTS_SYSTEM and OBJECTS_MACHINE - select which of these should be compiled. */ - -${libsrc}emacstool: ${libsrc}emacstool.c - cd ${libsrc}; ${MAKE} ${MFLAGS} emacstool -mostlyclean: - rm -f temacs puremacs quantmacs prefix-args xmakefile* core depend.* \#* *.o - rm -f ${libsrc}DOC -clean: mostlyclean - rm -f xemacs libextcli* -/**/# This is used in making a distribution. -/**/# Do not use it on development directories! -distclean: clean versionclean - rm -f config.h paths.h Emacs.ad.h Makefile Makefile.in .pure -realclean: distclean - rm -f TAGS -versionclean: - -rm -f xemacs emacs-* ${libsrc}DOC* -extraclean: realclean - -rm -f *~ \#* m/?*~ s/?*~ - -/* The rule for the [sm] files has to be written a little funny to - avoid looking like a C comment to CPP. */ -SOURCES = *.[chm] *.pswm [sm]/?* COPYING paths.h.in Makefile.in.in \ - config.h.in README COPYING ChangeLog vms.pp-trans -unlock: - chmod u+w $(SOURCES) - -relock: - chmod -w $(SOURCES) - -#ifdef __GNUC__ - -/*** Dependency processing using GCC ***/ - -.c.dep: - $(CC) -MM $(ALL_CFLAGS) $< > $*.dep - -.SUFFIXES: .dep - -obj_dep = $(objs:.o=.dep) - -gnu-depend: $(obj_dep) - /* #### Needs a bit of work: it doesn't see the object files that - we aren't compiling */ - cat $(obj_dep) | sh ${libsrc}process-gnu-depends.sh > depend.out - -#endif /* GCC */ - -/*** Dependency processing using makedepend ***/ - -depend: - : > depend.tmp - makedepend -f depend.tmp -Dsubprocesses -DMOCKLISP_SUPPORT -DHAVE_X_WINDOWS -- $(CPPFLAGS) $(ALL_CFLAGS) -- *.c - sh ${libsrc}process-depends.sh < depend.tmp > depend.out - -/* Manually-generated dependencies (makedepend misbehaves on these) */ - -/* (actually makedepend does OK on these but we want to conditionalize - them) */ -#ifdef EXTERNAL_WIDGET -ExternalClient-Xlib.o: extw-Xlib.h -ExternalClient-Xm.o: config.h -ExternalClient-Xm.o: xintrinsicp.h -ExternalClient-Xm.o: ExternalClient.h -ExternalClient-Xm.o: ExternalClientP.h -ExternalClient-Xm.o: extw-Xlib.h -ExternalClient-Xm.o: extw-Xt.h -ExternalClient-Xt.o: config.h -ExternalClient-Xt.o: xintrinsicp.h -ExternalClient-Xt.o: ExternalClient.h -ExternalClient-Xt.o: ExternalClientP.h -ExternalClient-Xt.o: extw-Xlib.h -ExternalClient-Xt.o: extw-Xt.h -ExternalShell.o: ExternalShell.h -ExternalShell.o: ExternalShellP.h -ExternalShell.o: config.h -ExternalShell.o: extw-Xlib.h -ExternalShell.o: extw-Xt.h -ExternalShell.o: xintrinsic.h -ExternalShell.o: xintrinsicp.h -extw-Xlib-shared.o: config.h -extw-Xlib-shared.o: extw-Xlib.h -extw-Xt-shared.o: config.h -extw-Xt-shared.o: extw-Xlib.h -extw-Xt-shared.o: extw-Xt.h -extw-Xlib-nonshared.o: config.h -extw-Xlib-nonshared.o: extw-Xlib.h -extw-Xt-nonshared.o: config.h -extw-Xt-nonshared.o: extw-Xlib.h -extw-Xt-nonshared.o: extw-Xt.h -#endif - -#ifdef EMACS_BTL -cadillac-btl.o: $(BTLDIR)/cadillac-btl.c -cadillac-btl.o: $(BTLDIR)/cadillac-btl.h -cadillac-btl.o: $(BTLDIR)/cadillac-btl-extern.h -cadillac-btl-asm.o: $(BTLDIR)/cadillac-btl-asm.c -cadillac-btl-asm.o: $(BTLDIR)/cadillac-btl.h -cadillac-btl-asm.o: $(BTLDIR)/cadillac-btl-extern.h -cadillac-btl-emacs.o: $(BTLDIR)/cadillac-btl-extern.h -cadillac-btl-process.o: $(BTLDIR)/cadillac-btl-process.c -cadillac-btl-process.o: $(BTLDIR)/cadillac-btl.h -cadillac-btl-process.o: $(BTLDIR)/cadillac-btl-extern.h -#endif /* EMACS_BTL */ - -/* (makedepend definitely misbehaves on these) */ -sgiplay.o: config.h -sgiplay.o: libst.h -unexconvex.o: getpagesize.h -unexec.o: getpagesize.h -unexaix.o: config.h -unexalpha.o: config.h -unexapollo.o: config.h -unexconvex.o: config.h -unexec.o: config.h -unexelf.o: config.h -unexenix.o: config.h -unexfreebsd.o: config.h -unexhp9k3.o: config.h -unexhp9k800.o: config.h -unexmips.o: config.h -unexsunos4.o: config.h - -/* Dependencies generated by 'make depend' */ - - -EmacsFrame.o: $(LWLIBSRCDIR)/lwlib.h -EmacsFrame.o: EmacsFrame.h -EmacsFrame.o: EmacsFrameP.h -EmacsFrame.o: EmacsManager.h -EmacsFrame.o: blocktype.h -EmacsFrame.o: buffer.h -EmacsFrame.o: bufslots.h -EmacsFrame.o: config.h -EmacsFrame.o: conslots.h -EmacsFrame.o: console-x.h -EmacsFrame.o: console.h -EmacsFrame.o: device.h -EmacsFrame.o: dynarr.h -EmacsFrame.o: faces.h -EmacsFrame.o: frame.h -EmacsFrame.o: frameslots.h -EmacsFrame.o: glyphs-x.h -EmacsFrame.o: glyphs.h -EmacsFrame.o: objects-x.h -EmacsFrame.o: objects.h -EmacsFrame.o: redisplay.h -EmacsFrame.o: scrollbar.h -EmacsFrame.o: specifier.h -EmacsFrame.o: toolbar.h -EmacsFrame.o: window.h -EmacsFrame.o: xintrinsic.h -EmacsFrame.o: xintrinsicp.h -EmacsFrame.o: xmprimitivep.h -EmacsFrame.o: xmu.h -EmacsManager.o: EmacsManager.h -EmacsManager.o: EmacsManagerP.h -EmacsManager.o: config.h -EmacsManager.o: xintrinsicp.h -EmacsManager.o: xmmanagerp.h -EmacsShell-sub.o: EmacsShell.h -EmacsShell-sub.o: EmacsShellP.h -EmacsShell-sub.o: config.h -EmacsShell-sub.o: xintrinsic.h -EmacsShell-sub.o: xintrinsicp.h -EmacsShell.o: EmacsShell.h -EmacsShell.o: config.h -EmacsShell.o: xintrinsicp.h -abbrev.o: blocktype.h -abbrev.o: buffer.h -abbrev.o: bufslots.h -abbrev.o: commands.h -abbrev.o: config.h -abbrev.o: dynarr.h -abbrev.o: insdel.h -abbrev.o: redisplay.h -abbrev.o: scrollbar.h -abbrev.o: syntax.h -abbrev.o: window.h -alloc.o: backtrace.h -alloc.o: blocktype.h -alloc.o: buffer.h -alloc.o: bufslots.h -alloc.o: bytecode.h -alloc.o: config.h -alloc.o: conslots.h -alloc.o: console.h -alloc.o: device.h -alloc.o: dynarr.h -alloc.o: elhash.h -alloc.o: events.h -alloc.o: extents.h -alloc.o: frame.h -alloc.o: frameslots.h -alloc.o: glyphs.h -alloc.o: puresize.h -alloc.o: redisplay.h -alloc.o: scrollbar.h -alloc.o: specifier.h -alloc.o: systime.h -alloc.o: toolbar.h -alloc.o: window.h -alloca.o: config.h -blocktype.o: blocktype.h -blocktype.o: config.h -blocktype.o: dynarr.h -buffer.o: blocktype.h -buffer.o: buffer.h -buffer.o: bufslots.h -buffer.o: commands.h -buffer.o: config.h -buffer.o: conslots.h -buffer.o: console.h -buffer.o: device.h -buffer.o: dynarr.h -buffer.o: elhash.h -buffer.o: extents.h -buffer.o: faces.h -buffer.o: frame.h -buffer.o: frameslots.h -buffer.o: insdel.h -buffer.o: process.h -buffer.o: redisplay.h -buffer.o: scrollbar.h -buffer.o: specifier.h -buffer.o: syntax.h -buffer.o: sysdep.h -buffer.o: sysfile.h -buffer.o: toolbar.h -buffer.o: window.h -bytecode.o: blocktype.h -bytecode.o: buffer.h -bytecode.o: bufslots.h -bytecode.o: config.h -bytecode.o: dynarr.h -bytecode.o: syntax.h -callint.o: blocktype.h -callint.o: buffer.h -callint.o: bufslots.h -callint.o: bytecode.h -callint.o: commands.h -callint.o: config.h -callint.o: dynarr.h -callint.o: events.h -callint.o: insdel.h -callint.o: redisplay.h -callint.o: scrollbar.h -callint.o: systime.h -callint.o: window.h -callproc.o: blocktype.h -callproc.o: buffer.h -callproc.o: bufslots.h -callproc.o: commands.h -callproc.o: config.h -callproc.o: dynarr.h -callproc.o: insdel.h -callproc.o: lstream.h -callproc.o: paths.h -callproc.o: process.h -callproc.o: redisplay.h -callproc.o: scrollbar.h -callproc.o: sysdep.h -callproc.o: sysfile.h -callproc.o: sysproc.h -callproc.o: systime.h -callproc.o: systty.h -callproc.o: window.h -casefiddle.o: blocktype.h -casefiddle.o: buffer.h -casefiddle.o: bufslots.h -casefiddle.o: commands.h -casefiddle.o: config.h -casefiddle.o: dynarr.h -casefiddle.o: insdel.h -casefiddle.o: syntax.h -casetab.o: blocktype.h -casetab.o: buffer.h -casetab.o: bufslots.h -casetab.o: config.h -casetab.o: dynarr.h -casetab.o: opaque.h -cm.o: blocktype.h -cm.o: config.h -cm.o: conslots.h -cm.o: console-tty.h -cm.o: console.h -cm.o: device.h -cm.o: dynarr.h -cm.o: frame.h -cm.o: frameslots.h -cm.o: lstream.h -cm.o: redisplay.h -cm.o: scrollbar.h -cm.o: specifier.h -cm.o: systty.h -cm.o: toolbar.h -cmdloop.o: blocktype.h -cmdloop.o: buffer.h -cmdloop.o: bufslots.h -cmdloop.o: commands.h -cmdloop.o: config.h -cmdloop.o: conslots.h -cmdloop.o: console.h -cmdloop.o: device.h -cmdloop.o: dynarr.h -cmdloop.o: events.h -cmdloop.o: frame.h -cmdloop.o: frameslots.h -cmdloop.o: macros.h -cmdloop.o: redisplay.h -cmdloop.o: scrollbar.h -cmdloop.o: specifier.h -cmdloop.o: systime.h -cmdloop.o: toolbar.h -cmdloop.o: window.h -cmds.o: blocktype.h -cmds.o: buffer.h -cmds.o: bufslots.h -cmds.o: commands.h -cmds.o: config.h -cmds.o: dynarr.h -cmds.o: insdel.h -cmds.o: syntax.h -console-stream.o: blocktype.h -console-stream.o: config.h -console-stream.o: conslots.h -console-stream.o: console-stream.h -console-stream.o: console-tty.h -console-stream.o: console.h -console-stream.o: device.h -console-stream.o: dynarr.h -console-stream.o: events.h -console-stream.o: frame.h -console-stream.o: frameslots.h -console-stream.o: redisplay.h -console-stream.o: scrollbar.h -console-stream.o: specifier.h -console-stream.o: sysdep.h -console-stream.o: systime.h -console-stream.o: systty.h -console-stream.o: toolbar.h -console-stream.o: window.h -console-tty.o: blocktype.h -console-tty.o: buffer.h -console-tty.o: bufslots.h -console-tty.o: config.h -console-tty.o: conslots.h -console-tty.o: console-stream.h -console-tty.o: console-tty.h -console-tty.o: console.h -console-tty.o: device.h -console-tty.o: dynarr.h -console-tty.o: events.h -console-tty.o: faces.h -console-tty.o: frame.h -console-tty.o: frameslots.h -console-tty.o: lstream.h -console-tty.o: redisplay.h -console-tty.o: scrollbar.h -console-tty.o: specifier.h -console-tty.o: sysdep.h -console-tty.o: systime.h -console-tty.o: systty.h -console-tty.o: toolbar.h -console-x.o: blocktype.h -console-x.o: config.h -console-x.o: conslots.h -console-x.o: console-x.h -console-x.o: console.h -console-x.o: dynarr.h -console-x.o: process.h -console-x.o: redisplay.h -console-x.o: xintrinsic.h -console.o: blocktype.h -console.o: buffer.h -console.o: bufslots.h -console.o: config.h -console.o: conslots.h -console.o: console-tty.h -console.o: console.h -console.o: device.h -console.o: dynarr.h -console.o: events.h -console.o: frame.h -console.o: frameslots.h -console.o: redisplay.h -console.o: scrollbar.h -console.o: specifier.h -console.o: sysdep.h -console.o: systime.h -console.o: systty.h -console.o: toolbar.h -console.o: window.h -data.o: blocktype.h -data.o: buffer.h -data.o: bufslots.h -data.o: bytecode.h -data.o: config.h -data.o: dynarr.h -data.o: sysfloat.h -database.o: blocktype.h -database.o: config.h -database.o: database.h -database.o: dynarr.h -debug.o: blocktype.h -debug.o: bytecode.h -debug.o: config.h -debug.o: debug.h -debug.o: dynarr.h -device-tty.o: blocktype.h -device-tty.o: buffer.h -device-tty.o: bufslots.h -device-tty.o: config.h -device-tty.o: conslots.h -device-tty.o: console-stream.h -device-tty.o: console-tty.h -device-tty.o: console.h -device-tty.o: device.h -device-tty.o: dynarr.h -device-tty.o: events.h -device-tty.o: faces.h -device-tty.o: frame.h -device-tty.o: frameslots.h -device-tty.o: lstream.h -device-tty.o: redisplay.h -device-tty.o: scrollbar.h -device-tty.o: specifier.h -device-tty.o: sysdep.h -device-tty.o: systime.h -device-tty.o: systty.h -device-tty.o: toolbar.h -device-x.o: $(LWLIBSRCDIR)/lwlib.h -device-x.o: blocktype.h -device-x.o: buffer.h -device-x.o: bufslots.h -device-x.o: config.h -device-x.o: conslots.h -device-x.o: console-x.h -device-x.o: console.h -device-x.o: device.h -device-x.o: dynarr.h -device-x.o: events.h -device-x.o: faces.h -device-x.o: frame.h -device-x.o: frameslots.h -device-x.o: glyphs-x.h -device-x.o: glyphs.h -device-x.o: objects-x.h -device-x.o: objects.h -device-x.o: redisplay.h -device-x.o: scrollbar.h -device-x.o: specifier.h -device-x.o: sysdep.h -device-x.o: sysfile.h -device-x.o: systime.h -device-x.o: toolbar.h -device-x.o: window.h -device-x.o: xgccache.h -device-x.o: xintrinsic.h -device-x.o: xintrinsicp.h -device-x.o: xmu.h -device.o: blocktype.h -device.o: buffer.h -device.o: bufslots.h -device.o: config.h -device.o: conslots.h -device.o: console.h -device.o: device.h -device.o: dynarr.h -device.o: elhash.h -device.o: events.h -device.o: faces.h -device.o: frame.h -device.o: frameslots.h -device.o: keymap.h -device.o: redisplay.h -device.o: scrollbar.h -device.o: specifier.h -device.o: sysdep.h -device.o: systime.h -device.o: toolbar.h -device.o: window.h -dgif_lib.o: config.h -dgif_lib.o: gif_lib.h -dialog-x.o: $(LWLIBSRCDIR)/lwlib.h -dialog-x.o: EmacsFrame.h -dialog-x.o: EmacsManager.h -dialog-x.o: EmacsShell.h -dialog-x.o: blocktype.h -dialog-x.o: buffer.h -dialog-x.o: bufslots.h -dialog-x.o: commands.h -dialog-x.o: config.h -dialog-x.o: conslots.h -dialog-x.o: console-x.h -dialog-x.o: console.h -dialog-x.o: device.h -dialog-x.o: dynarr.h -dialog-x.o: events.h -dialog-x.o: frame.h -dialog-x.o: frameslots.h -dialog-x.o: gui-x.h -dialog-x.o: opaque.h -dialog-x.o: redisplay.h -dialog-x.o: scrollbar.h -dialog-x.o: specifier.h -dialog-x.o: systime.h -dialog-x.o: toolbar.h -dialog-x.o: window.h -dialog-x.o: xintrinsic.h -dialog.o: blocktype.h -dialog.o: config.h -dialog.o: dynarr.h -dired.o: blocktype.h -dired.o: buffer.h -dired.o: bufslots.h -dired.o: commands.h -dired.o: config.h -dired.o: dynarr.h -dired.o: elhash.h -dired.o: regex.h -dired.o: sysdir.h -dired.o: sysfile.h -doc.o: blocktype.h -doc.o: buffer.h -doc.o: bufslots.h -doc.o: bytecode.h -doc.o: config.h -doc.o: dynarr.h -doc.o: insdel.h -doc.o: keymap.h -doc.o: sysfile.h -doprnt.o: blocktype.h -doprnt.o: buffer.h -doprnt.o: bufslots.h -doprnt.o: config.h -doprnt.o: dynarr.h -doprnt.o: lstream.h -dynarr.o: blocktype.h -dynarr.o: config.h -dynarr.o: dynarr.h -ecrt0.o: config.h -editfns.o: blocktype.h -editfns.o: buffer.h -editfns.o: bufslots.h -editfns.o: commands.h -editfns.o: config.h -editfns.o: conslots.h -editfns.o: console.h -editfns.o: device.h -editfns.o: dynarr.h -editfns.o: events.h -editfns.o: extents.h -editfns.o: frame.h -editfns.o: frameslots.h -editfns.o: insdel.h -editfns.o: redisplay.h -editfns.o: scrollbar.h -editfns.o: specifier.h -editfns.o: sysdep.h -editfns.o: syspwd.h -editfns.o: systime.h -editfns.o: toolbar.h -editfns.o: window.h -elhash.o: blocktype.h -elhash.o: bytecode.h -elhash.o: config.h -elhash.o: dynarr.h -elhash.o: elhash.h -elhash.o: hash.h -emacs.o: backtrace.h -emacs.o: blocktype.h -emacs.o: buffer.h -emacs.o: bufslots.h -emacs.o: commands.h -emacs.o: config.h -emacs.o: conslots.h -emacs.o: console.h -emacs.o: dynarr.h -emacs.o: process.h -emacs.o: sysdep.h -emacs.o: sysfile.h -emacs.o: systime.h -emacs.o: systty.h -energize.o: config.h -epoch.o: blocktype.h -epoch.o: config.h -epoch.o: conslots.h -epoch.o: console-x.h -epoch.o: console.h -epoch.o: device.h -epoch.o: dynarr.h -epoch.o: events.h -epoch.o: frame.h -epoch.o: frameslots.h -epoch.o: objects-x.h -epoch.o: objects.h -epoch.o: scrollbar.h -epoch.o: specifier.h -epoch.o: systime.h -epoch.o: toolbar.h -epoch.o: xintrinsic.h -eval.o: backtrace.h -eval.o: blocktype.h -eval.o: buffer.h -eval.o: bufslots.h -eval.o: bytecode.h -eval.o: commands.h -eval.o: config.h -eval.o: conslots.h -eval.o: console.h -eval.o: dynarr.h -eval.o: opaque.h -event-Xt.o: $(LWLIBSRCDIR)/lwlib.h -event-Xt.o: Emacs.ad.h -event-Xt.o: EmacsFrame.h -event-Xt.o: blocktype.h -event-Xt.o: buffer.h -event-Xt.o: bufslots.h -event-Xt.o: commands.h -event-Xt.o: config.h -event-Xt.o: conslots.h -event-Xt.o: console-tty.h -event-Xt.o: console-x.h -event-Xt.o: console.h -event-Xt.o: device.h -event-Xt.o: dynarr.h -event-Xt.o: events.h -event-Xt.o: frame.h -event-Xt.o: frameslots.h -event-Xt.o: objects-x.h -event-Xt.o: objects.h -event-Xt.o: paths.h -event-Xt.o: process.h -event-Xt.o: redisplay.h -event-Xt.o: scrollbar.h -event-Xt.o: specifier.h -event-Xt.o: sysproc.h -event-Xt.o: systime.h -event-Xt.o: systty.h -event-Xt.o: toolbar.h -event-Xt.o: xintrinsic.h -event-Xt.o: xintrinsicp.h -event-stream.o: blocktype.h -event-stream.o: buffer.h -event-stream.o: bufslots.h -event-stream.o: commands.h -event-stream.o: config.h -event-stream.o: conslots.h -event-stream.o: console.h -event-stream.o: device.h -event-stream.o: dynarr.h -event-stream.o: elhash.h -event-stream.o: events.h -event-stream.o: frame.h -event-stream.o: frameslots.h -event-stream.o: insdel.h -event-stream.o: keymap.h -event-stream.o: lstream.h -event-stream.o: macros.h -event-stream.o: opaque.h -event-stream.o: process.h -event-stream.o: redisplay.h -event-stream.o: scrollbar.h -event-stream.o: specifier.h -event-stream.o: sysdep.h -event-stream.o: systime.h -event-stream.o: toolbar.h -event-stream.o: window.h -event-tty.o: blocktype.h -event-tty.o: config.h -event-tty.o: conslots.h -event-tty.o: console-tty.h -event-tty.o: console.h -event-tty.o: device.h -event-tty.o: dynarr.h -event-tty.o: events.h -event-tty.o: frame.h -event-tty.o: frameslots.h -event-tty.o: paths.h -event-tty.o: process.h -event-tty.o: scrollbar.h -event-tty.o: specifier.h -event-tty.o: sysproc.h -event-tty.o: systime.h -event-tty.o: systty.h -event-tty.o: syswait.h -event-tty.o: toolbar.h -event-unixoid.o: blocktype.h -event-unixoid.o: config.h -event-unixoid.o: conslots.h -event-unixoid.o: console-stream.h -event-unixoid.o: console-tty.h -event-unixoid.o: console.h -event-unixoid.o: device.h -event-unixoid.o: dynarr.h -event-unixoid.o: events.h -event-unixoid.o: paths.h -event-unixoid.o: process.h -event-unixoid.o: sysdep.h -event-unixoid.o: sysproc.h -event-unixoid.o: systime.h -event-unixoid.o: systty.h -events.o: blocktype.h -events.o: buffer.h -events.o: bufslots.h -events.o: config.h -events.o: conslots.h -events.o: console-tty.h -events.o: console-x.h -events.o: console.h -events.o: device.h -events.o: dynarr.h -events.o: events.h -events.o: extents.h -events.o: frame.h -events.o: frameslots.h -events.o: glyphs.h -events.o: keymap.h -events.o: redisplay.h -events.o: scrollbar.h -events.o: specifier.h -events.o: systime.h -events.o: systty.h -events.o: toolbar.h -events.o: window.h -events.o: xintrinsic.h -extents.o: blocktype.h -extents.o: buffer.h -extents.o: bufslots.h -extents.o: config.h -extents.o: conslots.h -extents.o: console.h -extents.o: debug.h -extents.o: device.h -extents.o: dynarr.h -extents.o: elhash.h -extents.o: extents.h -extents.o: faces.h -extents.o: frame.h -extents.o: frameslots.h -extents.o: glyphs.h -extents.o: hash.h -extents.o: insdel.h -extents.o: opaque.h -extents.o: process.h -extents.o: redisplay.h -extents.o: scrollbar.h -extents.o: specifier.h -extents.o: toolbar.h -faces.o: EmacsFrame.h -faces.o: blocktype.h -faces.o: buffer.h -faces.o: bufslots.h -faces.o: config.h -faces.o: conslots.h -faces.o: console-x.h -faces.o: console.h -faces.o: device.h -faces.o: dynarr.h -faces.o: elhash.h -faces.o: extents.h -faces.o: faces.h -faces.o: frame.h -faces.o: frameslots.h -faces.o: glyphs.h -faces.o: hash.h -faces.o: objects-x.h -faces.o: objects.h -faces.o: redisplay.h -faces.o: scrollbar.h -faces.o: specifier.h -faces.o: toolbar.h -faces.o: window.h -faces.o: xintrinsic.h -fileio.o: blocktype.h -fileio.o: buffer.h -fileio.o: bufslots.h -fileio.o: config.h -fileio.o: conslots.h -fileio.o: console.h -fileio.o: device.h -fileio.o: dynarr.h -fileio.o: events.h -fileio.o: frame.h -fileio.o: frameslots.h -fileio.o: insdel.h -fileio.o: lstream.h -fileio.o: paths.h -fileio.o: redisplay.h -fileio.o: scrollbar.h -fileio.o: specifier.h -fileio.o: sysdep.h -fileio.o: sysdir.h -fileio.o: sysfile.h -fileio.o: sysproc.h -fileio.o: syspwd.h -fileio.o: systime.h -fileio.o: toolbar.h -fileio.o: window.h -filelock.o: blocktype.h -filelock.o: buffer.h -filelock.o: bufslots.h -filelock.o: config.h -filelock.o: dynarr.h -filelock.o: paths.h -filelock.o: sysdir.h -filelock.o: sysfile.h -filelock.o: syspwd.h -filemode.o: blocktype.h -filemode.o: config.h -filemode.o: dynarr.h -filemode.o: sysfile.h -floatfns.o: blocktype.h -floatfns.o: config.h -floatfns.o: dynarr.h -floatfns.o: sysfloat.h -fns.o: blocktype.h -fns.o: buffer.h -fns.o: bufslots.h -fns.o: bytecode.h -fns.o: commands.h -fns.o: config.h -fns.o: conslots.h -fns.o: console.h -fns.o: device.h -fns.o: dynarr.h -fns.o: events.h -fns.o: extents.h -fns.o: frame.h -fns.o: frameslots.h -fns.o: scrollbar.h -fns.o: specifier.h -fns.o: systime.h -fns.o: toolbar.h -font-lock.o: blocktype.h -font-lock.o: buffer.h -font-lock.o: bufslots.h -font-lock.o: config.h -font-lock.o: dynarr.h -font-lock.o: insdel.h -font-lock.o: syntax.h -frame-tty.o: blocktype.h -frame-tty.o: config.h -frame-tty.o: conslots.h -frame-tty.o: console-tty.h -frame-tty.o: console.h -frame-tty.o: device.h -frame-tty.o: dynarr.h -frame-tty.o: frame.h -frame-tty.o: frameslots.h -frame-tty.o: scrollbar.h -frame-tty.o: specifier.h -frame-tty.o: systty.h -frame-tty.o: toolbar.h -frame-x.o: $(LWLIBSRCDIR)/lwlib.h -frame-x.o: EmacsFrame.h -frame-x.o: EmacsFrameP.h -frame-x.o: EmacsManager.h -frame-x.o: EmacsShell.h -frame-x.o: ExternalShell.h -frame-x.o: blocktype.h -frame-x.o: buffer.h -frame-x.o: bufslots.h -frame-x.o: config.h -frame-x.o: conslots.h -frame-x.o: console-x.h -frame-x.o: console.h -frame-x.o: device.h -frame-x.o: dynarr.h -frame-x.o: events.h -frame-x.o: extents.h -frame-x.o: faces.h -frame-x.o: frame.h -frame-x.o: frameslots.h -frame-x.o: glyphs-x.h -frame-x.o: glyphs.h -frame-x.o: objects-x.h -frame-x.o: objects.h -frame-x.o: redisplay.h -frame-x.o: scrollbar-x.h -frame-x.o: scrollbar.h -frame-x.o: specifier.h -frame-x.o: systime.h -frame-x.o: toolbar.h -frame-x.o: window.h -frame-x.o: xintrinsic.h -frame-x.o: xintrinsicp.h -frame-x.o: xmprimitivep.h -frame-x.o: xmu.h -frame.o: blocktype.h -frame.o: buffer.h -frame.o: bufslots.h -frame.o: config.h -frame.o: conslots.h -frame.o: console.h -frame.o: device.h -frame.o: dynarr.h -frame.o: events.h -frame.o: extents.h -frame.o: faces.h -frame.o: frame.h -frame.o: frameslots.h -frame.o: glyphs.h -frame.o: menubar.h -frame.o: redisplay.h -frame.o: scrollbar.h -frame.o: specifier.h -frame.o: sysdep.h -frame.o: systime.h -frame.o: toolbar.h -frame.o: window.h -free-hook.o: blocktype.h -free-hook.o: config.h -free-hook.o: dynarr.h -free-hook.o: hash.h -general.o: blocktype.h -general.o: config.h -general.o: dynarr.h -getloadavg.o: blocktype.h -getloadavg.o: config.h -getloadavg.o: dynarr.h -gif_err.o: config.h -gif_err.o: gif_lib.h -gifalloc.o: config.h -gifalloc.o: gif_lib.h -glyphs-x.o: $(LWLIBSRCDIR)/lwlib.h -glyphs-x.o: ${srcdir}/${etcdir}xemacs.xbm -glyphs-x.o: bitmaps.h -glyphs-x.o: blocktype.h -glyphs-x.o: buffer.h -glyphs-x.o: bufslots.h -glyphs-x.o: config.h -glyphs-x.o: conslots.h -glyphs-x.o: console-x.h -glyphs-x.o: console.h -glyphs-x.o: device.h -glyphs-x.o: dynarr.h -glyphs-x.o: frame.h -glyphs-x.o: frameslots.h -glyphs-x.o: gif_lib.h -glyphs-x.o: glyphs-x.h -glyphs-x.o: glyphs.h -glyphs-x.o: insdel.h -glyphs-x.o: objects-x.h -glyphs-x.o: objects.h -glyphs-x.o: opaque.h -glyphs-x.o: scrollbar.h -glyphs-x.o: specifier.h -glyphs-x.o: sysfile.h -glyphs-x.o: toolbar.h -glyphs-x.o: xintrinsic.h -glyphs-x.o: xmu.h -glyphs.o: blocktype.h -glyphs.o: buffer.h -glyphs.o: bufslots.h -glyphs.o: config.h -glyphs.o: conslots.h -glyphs.o: console.h -glyphs.o: device.h -glyphs.o: dynarr.h -glyphs.o: elhash.h -glyphs.o: faces.h -glyphs.o: frame.h -glyphs.o: frameslots.h -glyphs.o: glyphs.h -glyphs.o: objects.h -glyphs.o: redisplay.h -glyphs.o: scrollbar.h -glyphs.o: specifier.h -glyphs.o: toolbar.h -glyphs.o: window.h -gmalloc.o: config.h -gmalloc.o: getpagesize.h -gui-x.o: $(LWLIBSRCDIR)/lwlib.h -gui-x.o: blocktype.h -gui-x.o: buffer.h -gui-x.o: bufslots.h -gui-x.o: config.h -gui-x.o: conslots.h -gui-x.o: console-x.h -gui-x.o: console.h -gui-x.o: device.h -gui-x.o: dynarr.h -gui-x.o: frame.h -gui-x.o: frameslots.h -gui-x.o: gui-x.h -gui-x.o: opaque.h -gui-x.o: scrollbar.h -gui-x.o: specifier.h -gui-x.o: toolbar.h -gui-x.o: xintrinsic.h -gui.o: blocktype.h -gui.o: config.h -gui.o: dynarr.h -hash.o: blocktype.h -hash.o: config.h -hash.o: dynarr.h -hash.o: elhash.h -hash.o: hash.h -hftctl.o: blocktype.h -hftctl.o: config.h -hftctl.o: dynarr.h -hpplay.o: blocktype.h -hpplay.o: config.h -hpplay.o: dynarr.h -indent.o: blocktype.h -indent.o: buffer.h -indent.o: bufslots.h -indent.o: config.h -indent.o: conslots.h -indent.o: console.h -indent.o: device.h -indent.o: dynarr.h -indent.o: extents.h -indent.o: faces.h -indent.o: frame.h -indent.o: frameslots.h -indent.o: glyphs.h -indent.o: insdel.h -indent.o: redisplay.h -indent.o: scrollbar.h -indent.o: specifier.h -indent.o: toolbar.h -indent.o: window.h -inline.o: $(LWLIBSRCDIR)/lwlib.h -inline.o: blocktype.h -inline.o: buffer.h -inline.o: bufslots.h -inline.o: bytecode.h -inline.o: config.h -inline.o: conslots.h -inline.o: console-x.h -inline.o: console.h -inline.o: device.h -inline.o: dynarr.h -inline.o: elhash.h -inline.o: events.h -inline.o: extents.h -inline.o: faces.h -inline.o: frame.h -inline.o: frameslots.h -inline.o: glyphs-x.h -inline.o: glyphs.h -inline.o: gui-x.h -inline.o: keymap.h -inline.o: lstream.h -inline.o: objects.h -inline.o: opaque.h -inline.o: process.h -inline.o: redisplay.h -inline.o: scrollbar.h -inline.o: specifier.h -inline.o: syntax.h -inline.o: systime.h -inline.o: toolbar.h -inline.o: window.h -inline.o: xintrinsic.h -insdel.o: blocktype.h -insdel.o: buffer.h -insdel.o: bufslots.h -insdel.o: config.h -insdel.o: conslots.h -insdel.o: console.h -insdel.o: device.h -insdel.o: dynarr.h -insdel.o: extents.h -insdel.o: frame.h -insdel.o: frameslots.h -insdel.o: insdel.h -insdel.o: lstream.h -insdel.o: redisplay.h -insdel.o: scrollbar.h -insdel.o: specifier.h -insdel.o: toolbar.h -intl.o: blocktype.h -intl.o: bytecode.h -intl.o: config.h -intl.o: conslots.h -intl.o: console.h -intl.o: device.h -intl.o: dynarr.h -keymap.o: blocktype.h -keymap.o: buffer.h -keymap.o: bufslots.h -keymap.o: bytecode.h -keymap.o: commands.h -keymap.o: config.h -keymap.o: conslots.h -keymap.o: console.h -keymap.o: device.h -keymap.o: dynarr.h -keymap.o: elhash.h -keymap.o: events.h -keymap.o: frame.h -keymap.o: frameslots.h -keymap.o: insdel.h -keymap.o: keymap.h -keymap.o: redisplay.h -keymap.o: scrollbar.h -keymap.o: specifier.h -keymap.o: systime.h -keymap.o: toolbar.h -keymap.o: window.h -libsst.o: blocktype.h -libsst.o: config.h -libsst.o: dynarr.h -libsst.o: libsst.h -linuxplay.o: blocktype.h -linuxplay.o: config.h -linuxplay.o: dynarr.h -lread.o: blocktype.h -lread.o: buffer.h -lread.o: bufslots.h -lread.o: bytecode.h -lread.o: commands.h -lread.o: config.h -lread.o: dynarr.h -lread.o: insdel.h -lread.o: lstream.h -lread.o: opaque.h -lread.o: paths.h -lread.o: sysfile.h -lstream.o: blocktype.h -lstream.o: buffer.h -lstream.o: bufslots.h -lstream.o: config.h -lstream.o: dynarr.h -lstream.o: insdel.h -lstream.o: lstream.h -lstream.o: sysfile.h -macros.o: blocktype.h -macros.o: buffer.h -macros.o: bufslots.h -macros.o: commands.h -macros.o: config.h -macros.o: conslots.h -macros.o: console.h -macros.o: device.h -macros.o: dynarr.h -macros.o: events.h -macros.o: frame.h -macros.o: frameslots.h -macros.o: keymap.h -macros.o: macros.h -macros.o: redisplay.h -macros.o: scrollbar.h -macros.o: specifier.h -macros.o: systime.h -macros.o: toolbar.h -macros.o: window.h -malloc.o: config.h -malloc.o: getpagesize.h -marker.o: blocktype.h -marker.o: buffer.h -marker.o: bufslots.h -marker.o: config.h -marker.o: dynarr.h -md5.o: blocktype.h -md5.o: buffer.h -md5.o: bufslots.h -md5.o: config.h -md5.o: dynarr.h -md5.o: insdel.h -menubar-x.o: $(LWLIBSRCDIR)/lwlib.h -menubar-x.o: EmacsFrame.h -menubar-x.o: EmacsManager.h -menubar-x.o: EmacsShell.h -menubar-x.o: blocktype.h -menubar-x.o: buffer.h -menubar-x.o: bufslots.h -menubar-x.o: commands.h -menubar-x.o: config.h -menubar-x.o: conslots.h -menubar-x.o: console-x.h -menubar-x.o: console.h -menubar-x.o: device.h -menubar-x.o: dynarr.h -menubar-x.o: events.h -menubar-x.o: frame.h -menubar-x.o: frameslots.h -menubar-x.o: gui-x.h -menubar-x.o: opaque.h -menubar-x.o: redisplay.h -menubar-x.o: scrollbar.h -menubar-x.o: specifier.h -menubar-x.o: systime.h -menubar-x.o: toolbar.h -menubar-x.o: window.h -menubar-x.o: xintrinsic.h -menubar.o: blocktype.h -menubar.o: config.h -menubar.o: conslots.h -menubar.o: console.h -menubar.o: device.h -menubar.o: dynarr.h -menubar.o: frame.h -menubar.o: frameslots.h -menubar.o: menubar.h -menubar.o: redisplay.h -menubar.o: scrollbar.h -menubar.o: specifier.h -menubar.o: toolbar.h -menubar.o: window.h -minibuf.o: blocktype.h -minibuf.o: buffer.h -minibuf.o: bufslots.h -minibuf.o: commands.h -minibuf.o: config.h -minibuf.o: conslots.h -minibuf.o: console-stream.h -minibuf.o: console.h -minibuf.o: device.h -minibuf.o: dynarr.h -minibuf.o: events.h -minibuf.o: frame.h -minibuf.o: frameslots.h -minibuf.o: insdel.h -minibuf.o: redisplay.h -minibuf.o: scrollbar.h -minibuf.o: specifier.h -minibuf.o: systime.h -minibuf.o: toolbar.h -minibuf.o: window.h -mocklisp.o: blocktype.h -mocklisp.o: buffer.h -mocklisp.o: bufslots.h -mocklisp.o: config.h -mocklisp.o: dynarr.h -msdos.o: config.h -nas.o: blocktype.h -nas.o: config.h -nas.o: dynarr.h -objects-tty.o: blocktype.h -objects-tty.o: config.h -objects-tty.o: conslots.h -objects-tty.o: console-tty.h -objects-tty.o: console.h -objects-tty.o: device.h -objects-tty.o: dynarr.h -objects-tty.o: insdel.h -objects-tty.o: objects-tty.h -objects-tty.o: objects.h -objects-tty.o: specifier.h -objects-tty.o: systty.h -objects-x.o: blocktype.h -objects-x.o: buffer.h -objects-x.o: bufslots.h -objects-x.o: config.h -objects-x.o: conslots.h -objects-x.o: console-x.h -objects-x.o: console.h -objects-x.o: device.h -objects-x.o: dynarr.h -objects-x.o: insdel.h -objects-x.o: objects-x.h -objects-x.o: objects.h -objects-x.o: specifier.h -objects-x.o: xintrinsic.h -objects.o: blocktype.h -objects.o: buffer.h -objects.o: bufslots.h -objects.o: config.h -objects.o: conslots.h -objects.o: console.h -objects.o: device.h -objects.o: dynarr.h -objects.o: elhash.h -objects.o: faces.h -objects.o: frame.h -objects.o: frameslots.h -objects.o: objects.h -objects.o: redisplay.h -objects.o: scrollbar.h -objects.o: specifier.h -objects.o: toolbar.h -objects.o: window.h -opaque.o: blocktype.h -opaque.o: config.h -opaque.o: dynarr.h -opaque.o: opaque.h -print.o: backtrace.h -print.o: blocktype.h -print.o: buffer.h -print.o: bufslots.h -print.o: bytecode.h -print.o: config.h -print.o: conslots.h -print.o: console-stream.h -print.o: console-tty.h -print.o: console.h -print.o: device.h -print.o: dynarr.h -print.o: extents.h -print.o: frame.h -print.o: frameslots.h -print.o: insdel.h -print.o: lstream.h -print.o: scrollbar.h -print.o: specifier.h -print.o: systty.h -print.o: toolbar.h -process.o: blocktype.h -process.o: buffer.h -process.o: bufslots.h -process.o: commands.h -process.o: config.h -process.o: conslots.h -process.o: console.h -process.o: device.h -process.o: dynarr.h -process.o: events.h -process.o: frame.h -process.o: frameslots.h -process.o: insdel.h -process.o: lstream.h -process.o: opaque.h -process.o: paths.h -process.o: process.h -process.o: redisplay.h -process.o: scrollbar.h -process.o: specifier.h -process.o: sysdep.h -process.o: sysfile.h -process.o: sysproc.h -process.o: systime.h -process.o: systty.h -process.o: syswait.h -process.o: toolbar.h -process.o: window.h -profile.o: backtrace.h -profile.o: blocktype.h -profile.o: bytecode.h -profile.o: config.h -profile.o: dynarr.h -profile.o: hash.h -profile.o: systime.h -pure.o: blocktype.h -pure.o: config.h -pure.o: dynarr.h -pure.o: puresize.h -ralloc.o: blocktype.h -ralloc.o: config.h -ralloc.o: dynarr.h -ralloc.o: getpagesize.h -rangetab.o: blocktype.h -rangetab.o: config.h -rangetab.o: dynarr.h -realpath.o: config.h -redisplay-output.o: blocktype.h -redisplay-output.o: buffer.h -redisplay-output.o: bufslots.h -redisplay-output.o: config.h -redisplay-output.o: conslots.h -redisplay-output.o: console.h -redisplay-output.o: debug.h -redisplay-output.o: device.h -redisplay-output.o: dynarr.h -redisplay-output.o: faces.h -redisplay-output.o: frame.h -redisplay-output.o: frameslots.h -redisplay-output.o: glyphs.h -redisplay-output.o: redisplay.h -redisplay-output.o: scrollbar.h -redisplay-output.o: specifier.h -redisplay-output.o: sysdep.h -redisplay-output.o: toolbar.h -redisplay-output.o: window.h -redisplay-tty.o: blocktype.h -redisplay-tty.o: buffer.h -redisplay-tty.o: bufslots.h -redisplay-tty.o: config.h -redisplay-tty.o: conslots.h -redisplay-tty.o: console-tty.h -redisplay-tty.o: console.h -redisplay-tty.o: device.h -redisplay-tty.o: dynarr.h -redisplay-tty.o: events.h -redisplay-tty.o: faces.h -redisplay-tty.o: frame.h -redisplay-tty.o: frameslots.h -redisplay-tty.o: glyphs.h -redisplay-tty.o: lstream.h -redisplay-tty.o: objects-tty.h -redisplay-tty.o: objects.h -redisplay-tty.o: redisplay.h -redisplay-tty.o: scrollbar.h -redisplay-tty.o: specifier.h -redisplay-tty.o: sysdep.h -redisplay-tty.o: systime.h -redisplay-tty.o: systty.h -redisplay-tty.o: toolbar.h -redisplay-tty.o: window.h -redisplay-x.o: $(LWLIBSRCDIR)/lwlib.h -redisplay-x.o: EmacsFrame.h -redisplay-x.o: EmacsFrameP.h -redisplay-x.o: blocktype.h -redisplay-x.o: buffer.h -redisplay-x.o: bufslots.h -redisplay-x.o: config.h -redisplay-x.o: conslots.h -redisplay-x.o: console-x.h -redisplay-x.o: console.h -redisplay-x.o: debug.h -redisplay-x.o: device.h -redisplay-x.o: dynarr.h -redisplay-x.o: faces.h -redisplay-x.o: frame.h -redisplay-x.o: frameslots.h -redisplay-x.o: glyphs-x.h -redisplay-x.o: glyphs.h -redisplay-x.o: objects-x.h -redisplay-x.o: objects.h -redisplay-x.o: paths.h -redisplay-x.o: redisplay.h -redisplay-x.o: scrollbar.h -redisplay-x.o: specifier.h -redisplay-x.o: sysdep.h -redisplay-x.o: sysproc.h -redisplay-x.o: systime.h -redisplay-x.o: toolbar.h -redisplay-x.o: window.h -redisplay-x.o: xgccache.h -redisplay-x.o: xintrinsic.h -redisplay-x.o: xintrinsicp.h -redisplay-x.o: xmprimitivep.h -redisplay.o: blocktype.h -redisplay.o: buffer.h -redisplay.o: bufslots.h -redisplay.o: commands.h -redisplay.o: config.h -redisplay.o: conslots.h -redisplay.o: console.h -redisplay.o: debug.h -redisplay.o: device.h -redisplay.o: dynarr.h -redisplay.o: extents.h -redisplay.o: faces.h -redisplay.o: frame.h -redisplay.o: frameslots.h -redisplay.o: glyphs.h -redisplay.o: insdel.h -redisplay.o: menubar.h -redisplay.o: objects.h -redisplay.o: process.h -redisplay.o: redisplay.h -redisplay.o: scrollbar.h -redisplay.o: specifier.h -redisplay.o: toolbar.h -redisplay.o: window.h -regex.o: blocktype.h -regex.o: buffer.h -regex.o: bufslots.h -regex.o: config.h -regex.o: dynarr.h -regex.o: regex.h -regex.o: syntax.h -scrollbar-x.o: $(LWLIBSRCDIR)/lwlib.h -scrollbar-x.o: EmacsFrame.h -scrollbar-x.o: EmacsManager.h -scrollbar-x.o: blocktype.h -scrollbar-x.o: config.h -scrollbar-x.o: conslots.h -scrollbar-x.o: console-x.h -scrollbar-x.o: console.h -scrollbar-x.o: device.h -scrollbar-x.o: dynarr.h -scrollbar-x.o: frame.h -scrollbar-x.o: frameslots.h -scrollbar-x.o: glyphs-x.h -scrollbar-x.o: glyphs.h -scrollbar-x.o: gui-x.h -scrollbar-x.o: redisplay.h -scrollbar-x.o: scrollbar-x.h -scrollbar-x.o: scrollbar.h -scrollbar-x.o: specifier.h -scrollbar-x.o: toolbar.h -scrollbar-x.o: window.h -scrollbar-x.o: xintrinsic.h -scrollbar.o: blocktype.h -scrollbar.o: buffer.h -scrollbar.o: bufslots.h -scrollbar.o: commands.h -scrollbar.o: config.h -scrollbar.o: conslots.h -scrollbar.o: console.h -scrollbar.o: device.h -scrollbar.o: dynarr.h -scrollbar.o: frame.h -scrollbar.o: frameslots.h -scrollbar.o: glyphs.h -scrollbar.o: redisplay.h -scrollbar.o: scrollbar.h -scrollbar.o: specifier.h -scrollbar.o: toolbar.h -scrollbar.o: window.h -search.o: blocktype.h -search.o: buffer.h -search.o: bufslots.h -search.o: commands.h -search.o: config.h -search.o: dynarr.h -search.o: insdel.h -search.o: opaque.h -search.o: regex.h -search.o: syntax.h -signal.o: blocktype.h -signal.o: config.h -signal.o: conslots.h -signal.o: console.h -signal.o: device.h -signal.o: dynarr.h -signal.o: events.h -signal.o: frame.h -signal.o: frameslots.h -signal.o: scrollbar.h -signal.o: specifier.h -signal.o: sysdep.h -signal.o: systime.h -signal.o: toolbar.h -sound.o: blocktype.h -sound.o: buffer.h -sound.o: bufslots.h -sound.o: commands.h -sound.o: config.h -sound.o: conslots.h -sound.o: console-x.h -sound.o: console.h -sound.o: device.h -sound.o: dynarr.h -sound.o: redisplay.h -sound.o: sysdep.h -sound.o: xintrinsic.h -specifier.o: blocktype.h -specifier.o: buffer.h -specifier.o: bufslots.h -specifier.o: config.h -specifier.o: conslots.h -specifier.o: console.h -specifier.o: device.h -specifier.o: dynarr.h -specifier.o: frame.h -specifier.o: frameslots.h -specifier.o: opaque.h -specifier.o: redisplay.h -specifier.o: scrollbar.h -specifier.o: specifier.h -specifier.o: toolbar.h -specifier.o: window.h -strftime.o: blocktype.h -strftime.o: config.h -strftime.o: dynarr.h -sunOS-fix.o: config.h -sunplay.o: blocktype.h -sunplay.o: config.h -sunplay.o: dynarr.h -sunplay.o: sysdep.h -sunpro.o: blocktype.h -sunpro.o: config.h -sunpro.o: dynarr.h -symbols.o: blocktype.h -symbols.o: buffer.h -symbols.o: bufslots.h -symbols.o: config.h -symbols.o: conslots.h -symbols.o: console.h -symbols.o: dynarr.h -syntax.o: blocktype.h -syntax.o: buffer.h -syntax.o: bufslots.h -syntax.o: commands.h -syntax.o: config.h -syntax.o: dynarr.h -syntax.o: insdel.h -syntax.o: syntax.h -sysdep.o: blocktype.h -sysdep.o: buffer.h -sysdep.o: bufslots.h -sysdep.o: config.h -sysdep.o: conslots.h -sysdep.o: console-stream.h -sysdep.o: console-x.h -sysdep.o: console.h -sysdep.o: device.h -sysdep.o: dynarr.h -sysdep.o: events.h -sysdep.o: frame.h -sysdep.o: frameslots.h -sysdep.o: process.h -sysdep.o: redisplay.h -sysdep.o: scrollbar.h -sysdep.o: specifier.h -sysdep.o: sysdep.h -sysdep.o: sysdir.h -sysdep.o: sysfile.h -sysdep.o: systime.h -sysdep.o: syswait.h -sysdep.o: toolbar.h -sysdep.o: window.h -sysdep.o: xintrinsic.h -termcap.o: blocktype.h -termcap.o: config.h -termcap.o: conslots.h -termcap.o: console.h -termcap.o: device.h -termcap.o: dynarr.h -terminfo.o: config.h -toolbar-x.o: $(LWLIBSRCDIR)/lwlib.h -toolbar-x.o: EmacsFrame.h -toolbar-x.o: EmacsFrameP.h -toolbar-x.o: EmacsManager.h -toolbar-x.o: blocktype.h -toolbar-x.o: buffer.h -toolbar-x.o: bufslots.h -toolbar-x.o: config.h -toolbar-x.o: conslots.h -toolbar-x.o: console-x.h -toolbar-x.o: console.h -toolbar-x.o: device.h -toolbar-x.o: dynarr.h -toolbar-x.o: faces.h -toolbar-x.o: frame.h -toolbar-x.o: frameslots.h -toolbar-x.o: glyphs-x.h -toolbar-x.o: glyphs.h -toolbar-x.o: objects-x.h -toolbar-x.o: objects.h -toolbar-x.o: redisplay.h -toolbar-x.o: scrollbar.h -toolbar-x.o: specifier.h -toolbar-x.o: toolbar.h -toolbar-x.o: window.h -toolbar-x.o: xgccache.h -toolbar-x.o: xintrinsic.h -toolbar-x.o: xintrinsicp.h -toolbar-x.o: xmprimitivep.h -toolbar.o: blocktype.h -toolbar.o: buffer.h -toolbar.o: bufslots.h -toolbar.o: config.h -toolbar.o: conslots.h -toolbar.o: console.h -toolbar.o: device.h -toolbar.o: dynarr.h -toolbar.o: frame.h -toolbar.o: frameslots.h -toolbar.o: glyphs.h -toolbar.o: redisplay.h -toolbar.o: scrollbar.h -toolbar.o: specifier.h -toolbar.o: toolbar.h -toolbar.o: window.h -tooltalk.o: blocktype.h -tooltalk.o: buffer.h -tooltalk.o: bufslots.h -tooltalk.o: config.h -tooltalk.o: dynarr.h -tooltalk.o: elhash.h -tooltalk.o: process.h -tooltalk.o: tooltalk.h -tparam.o: config.h -undo.o: blocktype.h -undo.o: buffer.h -undo.o: bufslots.h -undo.o: config.h -undo.o: dynarr.h -undo.o: extents.h -vm-limit.o: blocktype.h -vm-limit.o: config.h -vm-limit.o: dynarr.h -vm-limit.o: mem-limits.h -vmsproc.o: vmsproc.h -window.o: blocktype.h -window.o: buffer.h -window.o: bufslots.h -window.o: commands.h -window.o: config.h -window.o: conslots.h -window.o: console.h -window.o: device.h -window.o: dynarr.h -window.o: faces.h -window.o: frame.h -window.o: frameslots.h -window.o: glyphs.h -window.o: objects.h -window.o: redisplay.h -window.o: scrollbar.h -window.o: specifier.h -window.o: toolbar.h -window.o: window.h -xgccache.o: blocktype.h -xgccache.o: config.h -xgccache.o: dynarr.h -xgccache.o: hash.h -xgccache.o: xgccache.h -xmu.o: config.h -xselect.o: blocktype.h -xselect.o: buffer.h -xselect.o: bufslots.h -xselect.o: config.h -xselect.o: conslots.h -xselect.o: console-x.h -xselect.o: console.h -xselect.o: device.h -xselect.o: dynarr.h -xselect.o: frame.h -xselect.o: frameslots.h -xselect.o: objects-x.h -xselect.o: objects.h -xselect.o: opaque.h -xselect.o: scrollbar.h -xselect.o: specifier.h -xselect.o: systime.h -xselect.o: toolbar.h -xselect.o: xintrinsic.h
--- a/src/Makefile.in.in Mon Aug 13 08:45:53 2007 +0200 +++ b/src/Makefile.in.in Mon Aug 13 08:46:35 2007 +0200 @@ -252,10 +252,10 @@ ILD=/cadillac1/code/bin.sun4/ild -PURIFY_PROG=/local/bin/purify -QUANTIFY_PROG=/local/bin/quantify -windows=no -record-data=no -PURECOV_PROG=/local/bin/purecov -#ifdef QUANTIFY +PURIFY_PROG=purify +QUANTIFY_PROG=quantify +PURECOV_PROG=purecov +#ifdef QUANTIFY #define QUANTIFY_INCLUDES -I/local/include #define QUANTIFY_LIBS /local/lib/quantify_stubs.a #else @@ -717,7 +717,7 @@ #ifdef TOOLTALK # define TOOLTALK_OBJS tooltalk.o -# if (defined (IRIX5) || defined (HPUX) || defined (POWERPC)) +# if (defined (IRIX5) || defined (HPUX) || defined (POWERPC) || defined (AIX4)) # define LIB_TOOLTALK -ltt # else # if (defined (SPARC) && !defined (USG)) @@ -739,6 +739,12 @@ # define LIB_CDE #endif +#ifdef HAVE_OFFIX_DND +# define LIB_OFFIX_DND -lDnd +#else +# define LIB_OFFIX_DND +#endif + #if (defined(LIB_INTL) && (!(defined(I18N3) || defined(I18N4)))) /* this should be defined by s- files, but we should not use it unless I18N3 or I18N4 are defined. */ @@ -895,7 +901,11 @@ mallocdocsrc = #endif /* SYSTEM_MALLOC */ +#ifdef FORCE_ALLOCA_H +allocaobjs = alloca.o +#else /* !FORCE_ALLOCA_H */ allocaobjs = @ALLOCA@ +#endif /* !FORCE_ALLOCA_H */ #ifdef HAVE_X_WINDOWS @@ -1056,7 +1066,7 @@ ${lispdir}eos/sun-eos-toolbar.elc \ ${lispdir}eos/sun-eos-menubar.elc \ ${lispdir}utils/annotations.elc \ - ${lispdir}eos/loaddefs-eos.elc + ${lispdir}prim/loaddefs.elc #else #define SUNPRO_LISP ${lispdir}prim/loaddefs.elc #endif @@ -1106,8 +1116,8 @@ /* List of Lisp files loaded into the dumped Emacs. Every file that is loaded from loadup.el must be enumerated - here, or the functions won't have have docstrings. - This is dumb, this list should be generated automatically. + here, or the functions won't have docstrings. + This is dumb - this list should be generated automatically. [Note: "version.el" is included in the doc separately, but is not listed here because we don't want things to appear to be out-of-date just because the version number has been incremented. -- D.N.G. 8/28/93] @@ -1157,7 +1167,7 @@ ${lispdir}bytecomp/byte-optimize.elc \ ${lispdir}utils/advice.elc -LIBES = NAS_LIBS SOUND_LIBS SOCKS_LIBS ENERGIZE_LIBS LIB_CDE \ +LIBES = NAS_LIBS SOUND_LIBS SOCKS_LIBS ENERGIZE_LIBS LIB_CDE LIB_OFFIX_DND \ LIB_TOOLTALK $(LIBX) \ LIBS_SYSTEM LIBS_MACHINE LIBS_TERMCAP LIB_INTL QUANTIFY_LIBS \ DATABASE_LIBS LIBS_DEBUG $(GNULIB_VAR) LIB_MATH LIB_STANDARD \ @@ -1245,7 +1255,8 @@ -I${srcdir} LCCFLAGS C_SWITCH_MACHINE C_SWITCH_SYSTEM \ C_SWITCH_SITE C_SWITCH_X_SITE C_SWITCH_X_MACHINE \ C_SWITCH_X_SYSTEM $(LIBX11_INCLUDES) -LINTFLAGS= -fd -m -p -s -u -v -x +/* LINTFLAGS= -fd -m -p -s -u -v -x */ +LINTFLAGS= -fd -m -s -u -v -x lint: $(LINTFILES) $(LINT.c) $(LINTFILES) /* end of Lint Section */
--- a/src/buffer.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/buffer.c Mon Aug 13 08:46:35 2007 +0200 @@ -1432,10 +1432,13 @@ DEFUN ("record-buffer", Frecord_buffer, Srecord_buffer, 1, 1, 0 /* -Put the element for buffer BUF at the front of buffer-alist. -This is done when a buffer is selected \"visibly\". -It keeps buffer-alist in the order of recency of selection -so that other-buffer will return something nice. +Place buffer BUF first in the buffer order. +Call this function when a buffer is selected \"visibly\". + +This function changes the global buffer order and the per-frame buffer +order for the selected frame. The buffer order keeps track of recency +of selection so that `other-buffer' will return a recently selected +buffer. See `other-buffer' for more information. */ ) (buf) Lisp_Object buf; @@ -1966,7 +1969,7 @@ DEFVAR_LISP ("change-major-mode-hook", &Vchange_major_mode_hook /* List of hooks to be run before killing local variables in a buffer. -This should be used by by any mode that temporarily alters the contents or +This should be used by any mode that temporarily alters the contents or the read-only state of the buffer. See also `kill-all-local-variables'. */ ); Vchange_major_mode_hook = Qnil; @@ -2465,8 +2468,7 @@ Note that this is overridden by the variable `truncate-partial-width-windows' if that variable is non-nil and this buffer is not full-frame width. -*/ , - redisplay_variable_changed); +*/ , redisplay_variable_changed); DEFVAR_BUFFER_LOCAL ("default-directory", directory /* Name of default directory of current buffer. Should end with slash. @@ -2760,7 +2762,7 @@ && (int) strlen (pwd) < MAXPATHLEN) strcpy (buf, pwd); else if (getwd (buf) == 0) - fatal ("`getwd' failed: %s\n", buf); + fatal ("`getwd' failed: errno %d\n", errno); #ifndef VMS /* Maybe this should really use some standard subroutine
--- a/src/callint.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/callint.c Mon Aug 13 08:46:35 2007 +0200 @@ -108,6 +108,7 @@ Does not do I/O. f -- Existing file name. F -- Possibly nonexistent file name. +i -- Always nil, ignore. Use to skip arguments when interactive. k -- Key sequence (a vector of events). K -- Key sequence to be redefined (do not automatically down-case). m -- Value of mark as number. Does not do I/O. @@ -702,6 +703,11 @@ arg_from_tty = 1; break; } + case 'i': /* Ignore: always nil. Use to skip arguments. */ + { + args[argnum] = Qnil; + break; + } case 'k': /* Key sequence (vector of events) */ { Lisp_Object tem = Fread_key_sequence (PROMPT (), Qnil, Qnil);
--- a/src/config.h Mon Aug 13 08:45:53 2007 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,668 +0,0 @@ -/* src/config.h. Generated automatically by configure. */ -/* XEmacs site configuration template file. -*- C -*- - Copyright (C) 1986, 1991, 1992, 1993, 1994 Free Software Foundation, Inc. - -This file is part of XEmacs. - -XEmacs 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. - -XEmacs 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 XEmacs; see the file COPYING. If not, write to -the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -/* Synched up with: FSF 19.30 (more or less). */ - -/* No code in XEmacs #includes config.h twice, but some of the code - intended to work with other packages as well (like gmalloc.c) - think they can include it as many times as they like. */ -#ifndef _CONFIG_H_ -#define _CONFIG_H_ - -/* #### This will be removed in 19.15. */ -#define LOSING_BYTECODE - - -/* These are all defined in the top-level Makefile by configure. - They're here only for reference. */ - -/* Define LISP_FLOAT_TYPE if you want XEmacs to support floating-point - numbers. */ -#define LISP_FLOAT_TYPE 1 - -/* Define GNU_MALLOC if you want to use the *new* GNU memory allocator. */ -#define GNU_MALLOC 1 - -/* Define USE_SYSTEM_MALLOC if you forcing the use of it. */ -/* #undef USE_SYSTEM_MALLOC */ - -/* Define HAVE_TTY if you want TTY support compiled in. */ -#define HAVE_TTY 1 - -/* Define HAVE_X_WINDOWS if you want to use the X window system. */ -#define HAVE_X_WINDOWS 1 - -/* Define HAVE_NEXTSTEP if you want to use the NeXTstep window system. */ -/* #undef HAVE_NEXTSTEP */ - -/* Define HAVE_WINDOW_SYSTEM if any windowing system is available. */ -#if defined (HAVE_X_WINDOWS) || defined (HAVE_NEXTSTEP) -#define HAVE_WINDOW_SYSTEM -#endif - -/* Define HAVE_UNIXOID_EVENT_LOOP if we use select() to wait for events. */ -#if defined (HAVE_X_WINDOWS) || defined (HAVE_TTY) -#define HAVE_UNIXOID_EVENT_LOOP -#endif - -/* Define this if you're using XFree386. */ -#define HAVE_XFREE386 1 - -/* #undef THIS_IS_X11R4 */ -/* #undef THIS_IS_X11R5 */ -#define THIS_IS_X11R6 1 - -/* Define USER_FULL_NAME to return a string - that is the user's full name. - It can assume that the variable `pw' - points to the password file entry for this user. - - At some sites, the pw_gecos field contains - the user's full name. If neither this nor any other - field contains the right thing, use pw_name, - giving the user's login name, since that is better than nothing. */ -#define USER_FULL_NAME pw->pw_gecos - -/* Define AMPERSAND_FULL_NAME if you use the convention - that & in the full name stands for the login id. */ -/* #undef AMPERSAND_FULL_NAME */ - -/* Some things figured out by the configure script, grouped as they are in - configure.in. */ -/* #undef HAVE_MACH_MACH_H */ -/* #undef HAVE_SYS_STROPTS_H */ -#define HAVE_SYS_TIMEB_H 1 -#define HAVE_SYS_TIME_H 1 -#define HAVE_UNISTD_H 1 -#define HAVE_UTIME_H 1 -#define HAVE_SYS_WAIT_H 1 -/* #undef HAVE_LIBGEN_H */ -#define HAVE_LOCALE_H 1 -/* #undef HAVE_X11_LOCALE_H */ -#define HAVE_LINUX_VERSION_H 1 -#define STDC_HEADERS 1 -#define TIME_WITH_SYS_TIME 1 -/* #undef WORDS_BIGENDIAN */ - -#define HAVE_LONG_FILE_NAMES 1 - -#ifdef HAVE_LONG_FILE_NAMES -#define CLASH_DETECTION -#endif - -/* #undef HAVE_LIBDNET */ -/* #undef HAVE_LIBRESOLV */ - -/* Define if `sys_siglist' is declared by <signal.h>. */ -#define SYS_SIGLIST_DECLARED 1 - -/* Define if `struct utimbuf' is declared by <utime.h>. */ -#define HAVE_STRUCT_UTIMBUF 1 - -/* Define if `struct timeval' is declared by <sys/time.h>. */ -#define HAVE_TIMEVAL 1 - - -/* #undef TM_IN_SYS_TIME */ -/* #undef HAVE_TM_ZONE */ -#define HAVE_TZNAME 1 - -/* Define if netdb.h declares h_errno. */ -#define HAVE_H_ERRNO 1 - -/* Define if localtime caches TZ */ -#define LOCALTIME_CACHE 1 - -/* Define if gettimeofday can't accept two arguments */ -/* #undef GETTIMEOFDAY_ONE_ARGUMENT */ - -/* Define in keyword `inline' exists. */ -#define HAVE_INLINE 1 - -#define HAVE_ALLOCA_H 1 -/* #undef HAVE_VFORK_H */ -/* #undef vfork */ - -#define HAVE_MMAP 1 -#define HAVE_STRCOLL 1 - -#define SIZEOF_SHORT 2 -#define SIZEOF_INT 4 -#define SIZEOF_LONG 4 - -#define HAVE_ACOSH 1 -#define HAVE_ASINH 1 -#define HAVE_ATANH 1 - -#if defined (HAVE_ACOSH) && defined (HAVE_ASINH) && defined (HAVE_ATANH) -#define HAVE_INVERSE_HYPERBOLIC -#endif - -#define HAVE_CBRT 1 -#define HAVE_CLOSEDIR 1 -#define HAVE_DUP2 1 -/* #undef HAVE_EACCESS */ -#define HAVE_FMOD 1 -#define HAVE_FPATHCONF 1 -#define HAVE_FREXP 1 -#define HAVE_FTIME 1 -#define HAVE_GETHOSTNAME 1 -#define HAVE_GETPAGESIZE 1 -#define HAVE_GETTIMEOFDAY 1 -#define HAVE_GETWD 1 -/* #undef HAVE_LOGB */ -#define HAVE_LRAND48 1 -/* #undef HAVE_MATHERR */ -#define HAVE_MKDIR 1 -#define HAVE_MKTIME 1 -#define HAVE_PERROR 1 -/* #undef HAVE_POLL */ -#define HAVE_RANDOM 1 -#define HAVE_REALPATH 1 -#define HAVE_RENAME 1 -#define HAVE_RES_INIT 1 -#define HAVE_RINT 1 -#define HAVE_RMDIR 1 -#define HAVE_SELECT 1 -#define HAVE_SETITIMER 1 -#define HAVE_SETPGID 1 -#define HAVE_SETSID 1 -#define HAVE_SIGBLOCK 1 -/* #undef HAVE_SIGHOLD */ -#define HAVE_SIGPROCMASK 1 -#define HAVE_SIGSETJMP 1 -#define HAVE_STRCASECMP 1 -#define HAVE_STRERROR 1 -#define HAVE_TZSET 1 -#define HAVE_UTIMES 1 -#define HAVE_WAITPID 1 - -#define HAVE_SOCKETS 1 -/* #undef HAVE_SOCKADDR_SUN_LEN */ -/* #undef HAVE_SYSVIPC */ - -#define SYSV_SYSTEM_DIR 1 -/* #undef NONSYSTEM_DIR_LIBRARY */ - -#define HAVE_TERMIOS 1 -/* #undef HAVE_TERMIO */ - -#define NLIST_STRUCT 1 - -#define UNEXEC_SRC unexelf.c -/* #undef AIX_SMT_EXP */ - -/* Define HAVE_SOCKS if you have the `socks' library and want XEmacs to - use it. */ -/* #undef HAVE_SOCKS */ - -/* Define HAVE_TERM if you run the `term' program (e.g. under Linux) and - want XEmacs to use it. */ -/* #undef HAVE_TERM */ - -/* Define HAVE_XPM if you have the `xpm' library and want XEmacs to use it. */ -#define HAVE_XPM 1 - -/* Define HAVE_XFACE if you have the `compface' library and want to use it. - This will permit X-face pixmaps in mail and news messages to display - quickly. */ -#define HAVE_XFACE 1 - -/* Define HAVE_GIF if you want XEmacs to support converting GIF - (Graphics Interchange Format) images. */ -#define HAVE_GIF 1 - -/* Define HAVE_JPEG if you have the JPEG library and want XEmacs to use it. - This is for converting JPEG images. */ -#define HAVE_JPEG 1 - -/* Define HAVE_PNG if you have the PNG library and want XEmacs to use it. - This is for converting PNG images. */ -#define HAVE_PNG 1 - -/* Define HAVE_PNG_GNUZ if you want to use -lgz instead of -lz for PNG. */ -/* #undef HAVE_PNG_GNUZ */ - -/* Define HAVE_TIFF if you have the TIFF library and want XEmacs to use it. - This is for converting TIFF images. */ -/* #undef HAVE_TIFF */ - -/* Define HAVE_XMU if you have the Xmu library. This should always be - the case except on losing HPUX systems. */ -#define HAVE_XMU 1 - -/* Define HAVE_DBM if you want to use the DBM libraries */ -#define HAVE_DBM 1 - -/* Define HAVE_GNU_DBM if you want to use the GNU DBM libraries; - if you define this, you should also define HAVE_DBM */ -/* #undef HAVE_GNU_DBM */ - -/* Define HAVE_BERKELEY_DB if you want to use the BerkDB libraries */ -/* #undef HAVE_BERKELEY_DB */ - -/* Define HAVE_LIBGDBM if you have -lgdbm (separated from HAVE_DBM - stuff because FreeBSD has the DBM routines in libc) */ -/* #undef HAVE_LIBGDBM */ - -/* Define HAVE_LIBDBM if you have -ldbm */ -/* #undef HAVE_LIBDBM */ - -/* Define HAVE_LIBDB if you have -ldb */ -/* #undef HAVE_LIBDB */ - -#if defined (HAVE_DBM) || defined (HAVE_BERKELEY_DB) -# define HAVE_DATABASE -#endif - -/* Define HAVE_XAUTH if the Xauth library is present. This will add - some extra functionality to gnuserv. */ -#define HAVE_XAUTH 1 - -/* Define HAVE_XLOCALE_H if X11/Xlocale.h is present. */ -#define HAVE_XLOCALE_H 1 - -/* Define HAVE_NCURSES if -lncurses is present. */ -/* #undef HAVE_NCURSES */ - -/* Define HAVE_NCURSES_CURSES_H if ncurses/curses.h is present. */ -/* #undef HAVE_NCURSES_CURSES_H */ - -/* Define HAVE_NCURSES_TERM_H if ncurses/term.h is present. */ -/* #undef HAVE_NCURSES_TERM_H */ - -/* Define EPOCH to include extra functionality that was present in Epoch. - This code has received only limited testing. */ -/* #undef EPOCH */ - -#define LOWTAGS - -/* Define USE_ASSERTIONS if you want the abort() to be changed to assert() - If the assertion fails, assert_failed() will be called. This is - recommended for general use because it gives more info about the crash - than just the abort() message. Too many people "Can't find the corefile" - or have limited core dumps out of existence. */ -#define USE_ASSERTIONS 1 - -/* Define one or more of the following if you want lots of extra checks - (e.g. structure validation) compiled in. These should be turned - on during the beta-test cycle. */ - -/* Check the entire extent structure of a buffer each time an extent - change is done, and do other extent-related checks. */ -/* #undef ERROR_CHECK_EXTENTS */ -/* Make sure that all X... macros are dereferencing the correct type, - and that all XSET... macros (as much as possible) are setting the - correct type of structure. Highly recommended for all - development work. */ -/* #undef ERROR_CHECK_TYPECHECK */ -/* Make sure valid buffer positions are passed to BUF_* macros. */ -/* #undef ERROR_CHECK_BUFPOS */ -/* Attempt to catch bugs related to garbage collection (e.g. - insufficient GCPRO'ing). */ -/* #undef ERROR_CHECK_GC */ -/* Attempt to catch freeing of a non-malloc()ed block, heap corruption, - etc. */ -/* #undef ERROR_CHECK_MALLOC */ - -/* Define DEBUG_XEMACS if you want extra debugging code compiled in. - This is mainly intended for use by developers. */ -/* #undef DEBUG_XEMACS */ - -/* Define MEMORY_USAGE_STATS if you want extra code compiled in to - determine where XEmacs's memory is going. */ -/* #undef MEMORY_USAGE_STATS */ - -/* Define QUANTIFY if using Quantify from Pure Software. This adds - some additional calls to control data collection. This is only - intended for use by the developers. */ -/* #undef QUANTIFY */ - -/* Define EXTERNAL_WIDGET to compile support for using the editor as a - widget in another program. */ -/* #undef EXTERNAL_WIDGET */ - -/* There are some special-case defines for gcc and lcc. */ -#define USE_GCC 1 -/* #undef USE_LCC */ - -/* Allow the user to override the default value of PURESIZE at configure - time. This must come before we include the sys files in order for - it to be able to override any changes in them. */ -/* #undef PURESIZE */ - - -/* Define this if you want to use the Common Desktop Environment -*/ -/* #undef HAVE_CDE */ - -/* Mocklisp Support. */ -/* #undef MOCKLISP_SUPPORT */ - -/* enable special GNU Make features in the Makefiles. */ -/* #undef USE_GNU_MAKE */ - -/* Undocumented debugging option: Don't automatically rebuild the DOC - file. This saves a lot of time when you're repeatedly - compiling-running-crashing. */ -/* #undef NO_DOC_FILE */ - - /* To eliminate use of `const' in the XEmacs sources, - do `#define CONST_IS_LOSING' */ -#define CONST_IS_LOSING 1 - -/* # undef CONST */ -# ifdef CONST_IS_LOSING -# define CONST -# else -# define CONST const -# endif /* CONST */ - -/* If not defined, use unions instead of ints. A few systems (DEC Alpha) - seem to require this, probably because something with the int - definitions isn't right with 64-bit systems. - - (It's NO_UNION_TYPE instead of USE_UNION_TYPE for historical reasons.) -*/ -#define NO_UNION_TYPE 1 - -/* The configuration script defines opsysfile to be the name of the - s/...h file that describes the system type you are using. The file - is chosen based on the configuration name you give. - - See the file ../etc/MACHINES for a list of systems and the - configuration names to use for them. - - See s/template.h for documentation on writing s/...h files. */ -#define config_opsysfile "s/linux.h" -#include config_opsysfile - -/* The configuration script defines machfile to be the name of the - m/...h file that describes the machine you are using. The file is - chosen based on the configuration name you give. - - See the file ../etc/MACHINES for a list of machines and the - configuration names to use for them. - - See m/template.h for documentation on writing m/...h files. */ -#define config_machfile "m/intel386.h" -#include config_machfile - -#if defined (USE_SYSTEM_MALLOC) && !defined (SYSTEM_MALLOC) -#define SYSTEM_MALLOC -#endif - -#if 0 /* RMSmacs */ -/* These typedefs shouldn't appear when alloca.s or Makefile.in - includes config.h. */ -#ifndef NOT_C_CODE -#ifndef SPECIAL_EMACS_INT -typedef long EMACS_INT; -typedef unsigned long EMACS_UINT; -#endif -#endif -#endif - -/* The configuration name. This is used as the install directory name - for the lib-src programs. */ -#define EMACS_CONFIGURATION "i486-unknown-linux2.0.0" - -/* Load in the conversion definitions if this system - needs them and the source file being compiled has not - said to inhibit this. There should be no need for you - to alter these lines. */ - -#ifdef SHORTNAMES -#ifndef NO_SHORTNAMES -#include "../shortnames/remap.h" -#endif /* not NO_SHORTNAMES */ -#endif /* SHORTNAMES */ - -/* Define REL_ALLOC if you want to use the relocating allocator for - buffer space. */ -#define REL_ALLOC 1 - -/* Define LD_SWITCH_SITE to contain any special flags your loader may need. */ -#define LD_SWITCH_SITE -L/usr/i486-linuxaout -L/lib-aout -L/m/xpm-3.4h/lib - -/* Define C_SWITCH_SITE to contain any special flags your compiler needs. */ -#define C_SWITCH_SITE -I/usr/i486-linuxaout/include -I/m/xpm-3.4h/lib - -/* Define LD_SWITCH_X_SITE to contain any special flags your loader - may need to deal with X Windows. For instance, if you've defined - HAVE_X_WINDOWS above and your X libraries aren't in a place that - your loader can find on its own, you might want to add "-L/..." or - something similar. */ -#define LD_SWITCH_X_SITE -L/usr/X11R6/lib - -/* Define LD_SWITCH_X_SITE_AUX with an -R option - in case it's needed (for Solaris, for example). */ -#define LD_SWITCH_X_SITE_AUX - -/* Define C_SWITCH_X_SITE to contain any special flags your compiler - may need to deal with X Windows. For instance, if you've defined - HAVE_X_WINDOWS above and your X include files aren't in a place - that your compiler can find on its own, you might want to add - "-I/..." or something similar. */ -#define C_SWITCH_X_SITE -I/usr/X11R6/include - -/* Define the return type of signal handlers if the s-xxx file - did not already do so. */ -#define RETSIGTYPE void - -/* SIGTYPE is the macro we actually use. */ -#ifndef SIGTYPE -#define SIGTYPE RETSIGTYPE -#define SIGRETURN return -#endif - -/* Define DYNODUMP if it is necessary to properly dump on this system. - Currently this is only Solaris. */ -/* #undef DYNODUMP */ - -/* Define NEED_XILDOFF if the -xildoff flag must be passed to cc to - avoid invoking the incremental linker ild which is incompatible - with dynodump. This is needed for recent Sunsoft compilers. */ -/* #undef NEED_XILDOFF */ - -/* Define ENERGIZE to compile with support for the Energize Programming System. - If you do this, don't forget to define ENERGIZE in lwlib/Imakefile as well. - You will need to set your C_SWITCH_SITE and LD_SWITCH_SITE to point at the - Energize connection library (libconn.a) and associated header files. - */ -/* #undef ENERGIZE */ -/* #undef ENERGIZE_2 */ -/* #undef ENERGIZE_3 */ - -/* Define SUNPRO to compiled in support for Sun Sparcworks. */ -/* #undef SUNPRO */ - -/* Sun SparcStations, SGI machines, and HP9000s700s have support for playing - different sound files as beeps. If you are on a SparcStation but do not - have the sound option installed for some reason, then undefine - HAVE_NATIVE_SOUND. (It's usually found in /usr/demo/SOUND/ on SunOS 4 - and Solaris systems; on Solaris, you may need to install the "SUNWaudmo" - package.) - */ -#define HAVE_NATIVE_SOUND 1 - -/* If you wish to compile with support for the Network Audio System - system define HAVE_NAS_SOUND. - NAS_NO_ERROR_JUMP means that the NAS libraries don't inlcude some - error handling changes. - */ -/* #undef HAVE_NAS_SOUND */ -/* #undef NAS_NO_ERROR_JUMP */ - -/* Compile in support for SunPro usage-tracking code. */ -/* #undef USAGE_TRACKING */ - -/* Define TOOLTALK if your site supports the ToolTalk library. */ -/* #undef TOOLTALK */ - -/* #undef LWLIB_USES_MOTIF */ -#define LWLIB_MENUBARS_LUCID 1 -/* #undef LWLIB_MENUBARS_MOTIF */ -#define LWLIB_SCROLLBARS_LUCID 1 -/* #undef LWLIB_SCROLLBARS_MOTIF */ -/* #undef LWLIB_SCROLLBARS_ATHENA */ -/* #undef LWLIB_DIALOGS_MOTIF */ -#define LWLIB_DIALOGS_ATHENA 1 - -/* Other things that can be disabled by configure. */ -#define HAVE_MENUBARS 1 -#define HAVE_SCROLLBARS 1 -#define HAVE_DIALOGS 1 -#define HAVE_TOOLBARS 1 - - -#if defined (HAVE_MENUBARS) || defined (HAVE_DIALOGS) -#define HAVE_POPUPS -#endif - -/* If you are using SunOS 4.1.1 and X11r5, then you need this patch. - There is a stupid bug in the SunOS libc.a: two functions which X11r5 - uses, mbstowcs() and wcstombs(), are unusable when programs are - statically linked (as XEmacs must be) because the static version of - libc.a contains the *dynamic* versions of these functions. These - functions don't seem to be called when XEmacs is running, so it's - enough to define stubs for them. - - This appears to be fixed in SunOS 4.1.2. - - Also, SunOS 4.1.1 contains buggy versions of strcmp and strcpy that - sometimes reference memory past the end of the string, which can segv. - I don't know whether this is has been fixed as of 4.1.2 or 4.1.3. - */ -#if defined (sparc) && !defined (USG) -#define OBJECTS_SYSTEM sunOS-fix.o strcmp.o strcpy.o -#endif - -/* If you turn this flag on, it forces encapsulation in all -circumstances; this can be used to make sure things compile OK -on various systems. */ -#define DEBUG_ENCAPSULATION - -/* basic system calls */ - -#if defined (INTERRUPTIBLE_IO) || defined (DEBUG_ENCAPSULATION) -# define ENCAPSULATE_READ -# define ENCAPSULATE_WRITE -#endif -#if defined (INTERRUPTIBLE_OPEN) || defined (DEBUG_ENCAPSULATION) -# define ENCAPSULATE_OPEN -#endif -#if defined (INTERRUPTIBLE_CLOSE) || defined (DEBUG_ENCAPSULATION) -# define ENCAPSULATE_CLOSE -#endif - -/* stdio calls */ - -#if defined (INTERRUPTIBLE_IO) || defined (DEBUG_ENCAPSULATION) -# define ENCAPSULATE_FREAD -# define ENCAPSULATE_FWRITE -#endif -#if defined (INTERRUPTIBLE_OPEN) || defined (DEBUG_ENCAPSULATION) -# define ENCAPSULATE_FOPEN -#endif -#if defined (INTERRUPTIBLE_CLOSE) || defined (DEBUG_ENCAPSULATION) -# define ENCAPSULATE_FCLOSE -#endif - -/* directory calls */ - -#if defined (DEBUG_ENCAPSULATION) -# define ENCAPSULATE_CHDIR -# define ENCAPSULATE_MKDIR -# define ENCAPSULATE_OPENDIR -# define ENCAPSULATE_READDIR -# define ENCAPSULATE_RMDIR -#endif - -/* file-information calls */ - -#if defined (DEBUG_ENCAPSULATION) -# define ENCAPSULATE_ACCESS -# define ENCAPSULATE_LSTAT -# define ENCAPSULATE_READLINK -# define ENCAPSULATE_STAT -#endif - -/* file-manipulation calls */ - -#if defined (DEBUG_ENCAPSULATION) -# define ENCAPSULATE_CHMOD -# define ENCAPSULATE_CREAT -# define ENCAPSULATE_LINK -# define ENCAPSULATE_RENAME -# define ENCAPSULATE_SYMLINK -# define ENCAPSULATE_UNLINK -#endif - -#if (defined (MSDOS) && defined (FEPCTRL)) || (defined (WIN32) && defined (USE_IME)) -#define HAVE_FEP -#endif - -#if defined (HAVE_SOCKS) && !defined (DO_NOT_SOCKSIFY) -#define accept Raccept -#define bind Rbind -#define connect Rconnect -#define getsockname Rgetsockname -#define listen Rlisten -#endif /* HAVE_SOCKS && !DO_NOT_SOCKSIFY */ - -#ifndef SHORTBITS -#define SHORTBITS (8 * SIZEOF_SHORT) -#endif -#ifndef INTBITS -#define INTBITS (8 * SIZEOF_INT) -#endif -#ifndef LONGBITS -#define LONGBITS (8 * SIZEOF_LONG) -#endif - -#ifdef HAVE_INLINE -# if defined (__GNUC__) -# if defined (DONT_EXTERN_INLINE_FUNCTIONS) -# define INLINE inline -# else -# define INLINE extern inline -# endif -# else -# define INLINE static inline -# endif -#else -# define INLINE static -#endif - -/* We want to avoid saving the signal mask if possible, because - that necessitates a system call. */ -#ifdef HAVE_SIGSETJMP -# define SETJMP(x) sigsetjmp (x, 0) -# define LONGJMP(x, y) siglongjmp (x, y) -# define JMP_BUF sigjmp_buf -#else -# define SETJMP(x) setjmp (x) -# define LONGJMP(x, y) longjmp (x, y) -# define JMP_BUF jmp_buf -#endif - -#endif /* _CONFIG_H_ */
--- a/src/config.h.in Mon Aug 13 08:45:53 2007 +0200 +++ b/src/config.h.in Mon Aug 13 08:46:35 2007 +0200 @@ -353,6 +353,10 @@ */ #undef HAVE_CDE +/* Define this if you want to use the OffiX Drag and Drop +*/ +#undef HAVE_OFFIX_DND + /* Mocklisp Support. */ #undef MOCKLISP_SUPPORT @@ -479,7 +483,7 @@ /* Define NEED_XILDOFF if the -xildoff flag must be passed to cc to avoid invoking the incremental linker ild which is incompatible - with dynodump. This is needed for recent Sunsoft compilers. */ + with dynodump. This is needed for recent Sun compilers. */ #undef NEED_XILDOFF /* Define ENERGIZE to compile with support for the Energize Programming System. @@ -599,6 +603,9 @@ /* file-information calls */ #if defined (DEBUG_ENCAPSULATION) +#ifdef HAVE_EACCESS +# define ENCAPSULATE_EACCESS +#endif # define ENCAPSULATE_ACCESS # define ENCAPSULATE_LSTAT # define ENCAPSULATE_READLINK
--- a/src/console.h Mon Aug 13 08:45:53 2007 +0200 +++ b/src/console.h Mon Aug 13 08:46:35 2007 +0200 @@ -105,8 +105,8 @@ int (*frame_visible_p_method) (struct frame *f); int (*frame_totally_visible_p_method) (struct frame *f); int (*frame_iconified_p_method) (struct frame *f); - void (*set_title_from_char_method) (struct frame *f, char *title); - void (*set_icon_name_from_char_method) (struct frame *f, char *title); + void (*set_title_from_bufbyte_method) (struct frame *f, Bufbyte *title); + void (*set_icon_name_from_bufbyte_method) (struct frame *f, Bufbyte *title); void (*set_frame_pointer_method) (struct frame *f); void (*set_frame_icon_method) (struct frame *f); void (*popup_menu_method) (Lisp_Object menu, Lisp_Object event); @@ -523,16 +523,12 @@ #define CONSOLE_LAST_NONMINIBUF_FRAME(con) NON_LVALUE ((con)->_last_nonminibuf_frame) #define CONSOLE_QUIT_CHAR(con) ((con)->quit_char) -#define CDFW_CONSOLE(obj) \ - (WINDOWP (obj) \ - ? WINDOW_CONSOLE (XWINDOW (obj)) \ - : (FRAMEP (obj) \ - ? FRAME_CONSOLE (XFRAME (obj)) \ - : (DEVICEP (obj) \ - ? DEVICE_CONSOLE (XDEVICE (obj)) \ - : (CONSOLEP (obj) \ - ? obj \ - : Qnil)))) +#define CDFW_CONSOLE(obj) \ + (WINDOWP (obj) ? WINDOW_CONSOLE (XWINDOW (obj)) \ + : (FRAMEP (obj) ? FRAME_CONSOLE (XFRAME (obj)) \ + : (DEVICEP (obj) ? DEVICE_CONSOLE (XDEVICE (obj)) \ + : (CONSOLEP (obj) ? obj \ + : Qnil)))) #define CONSOLE_LOOP(concons) LIST_LOOP (concons, Vconsole_list) #define CONSOLE_DEVICE_LOOP(devcons, con) \
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/dbxrc Mon Aug 13 08:46:35 2007 +0200 @@ -0,0 +1,107 @@ +# -*- ksh -*- +# You can use this file to debug XEmacs using Sun WorkShop's dbx. +# Add the contents of this file to $HOME/.dbxrc or +# Source the contents of this file with something like: +# test -r ./dbxrc && . ./dbxrc + +ignore POLL +ignore IO + +function lbt { + call Fbacktrace (Qexternal_debugging_output, Qt) +} + +function dp { + call debug_print ($1); +} + +function xptr { + print ("$1"<<4) & 0xFFFFFFF) +} + +function xint { + print ((int)($1 << 4))>>4; +} + +#function xstring { +# print *(struct Lisp_String *) ($1 & 0xFFFFFFF); +# #print ((struct Lisp_String *) ($1 & 0xFFFFFFF))->_data; +#} + +function xlisp { + print $1 ($2 & 0xFFFFFFF); + #print ((struct Lisp_String *) ($1 & 0xFFFFFFF))->_data; +} + +function defxlisp { + eval "function $1 { print $2 (\$1 & 0xFFFFFFF) ; }" +} + +function defxstruct { + defxlisp "$1" "*(struct $2 *)" +} + +defxstruct xstring 'Lisp_String' +defxstruct xlstream 'lstream' +defxstruct xsubr 'Lisp_Subr' +defxstruct xbitvec 'Lisp_Bit_Vector' +defxstruct xbuffer 'buffer' +defxstruct xbytecode 'Lisp_Bytecode' +defxstruct xcharset 'Lisp_Charset' +defxstruct xchartab 'Lisp_Char_Table' +defxstruct xchartabentry 'Lisp_Char_Table_Entry' +defxstruct xcodesys 'Lisp_Coding_System' +defxstruct xcolorinst 'Lisp_Color_Instance' +defxstruct xcons 'Lisp_Cons' +defxstruct xdevice 'device' +defxstruct xevent 'Lisp_Event' +defxstruct xextent 'extent' +defxstruct xextentaux 'extent_auxilliary' +defxstruct xfloat 'Lisp_Float' +defxstruct xfontinst 'Lisp_Font_Instance' +defxstruct xframe 'frame' +defxstruct xglyph 'Lisp_Glyph' +defxstruct xhashtable 'hashtable_struct' +defxstruct ximageinst 'Lisp_Image_Instance' +defxstruct xkeymap 'keymap' +defxstruct xmarker 'Lisp_Marker' +defxstruct xmenubardata 'menubar_data' +defxstruct xopaque 'Lisp_Opaque' +defxstruct xprocess 'Lisp_Process' +defxstruct xrangetab 'Lisp_Range_Table' +defxstruct xspec 'Lisp_Specifier' +defxstruct xsubwindow 'Lisp_Subwindow' +defxstruct xsymbol 'Lisp_Symbol' +defxstruct xtoolbarbutton 'toolbar_button' +defxstruct xtoolbardata 'toolbar_data' +defxstruct xtooltalkmess 'Lisp_Tooltalk_Message' +defxstruct xtooltalkpatt 'Lisp_Tooltalk_Pattern' +defxstruct xvector 'Lisp_Vector' +defxstruct xwindow 'window' +defxstruct xwindowconfig 'window_config' + +function pproc { + print *(`process.c`struct Lisp_Process*)$1 ; + dp "(`process.c`struct Lisp_Process*)$1->name" ; + dp "(`process.c`struct Lisp_Process*)$1->command" ; +} + +function xtype { + print (enum Lisp_Type) (($1 >> 28) & 7) +} + +dbxenv suppress_startup_message 4.0 + +function dp_args { + dp "*(((Lisp_Object*)($1))+0)" + dp "*(((Lisp_Object*)($1))+1)" +} + +function dp_core { + print ((struct x_frame *)(((struct frame*)(Fselected_frame(Qnil)&0x00FFFFFF))->frame_data))->widget->core +} + +# Barf! +function print_shell { + print *(`frame-x.c`TopLevelShellRec*) (((struct `frame-x.c`x_frame*) (((struct `frame-x.c`frame*) (Fselected_frame(Qnil)&0x00FFFFFF))->frame_data))->widget) +}
--- a/src/device-x.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/device-x.c Mon Aug 13 08:46:35 2007 +0200 @@ -62,23 +62,30 @@ static XrmOptionDescRec emacs_options[] = { - {"-geometry", ".geometry", XrmoptionSepArg, NULL}, - {"-iconic", ".iconic", XrmoptionNoArg, (XtPointer) "yes"}, - - {"-internal-border-width", "*EmacsFrame.internalBorderWidth", XrmoptionSepArg, NULL}, - {"-ib", "*EmacsFrame.internalBorderWidth", XrmoptionSepArg, NULL}, - {"-scrollbar-width", "*EmacsFrame.scrollBarWidth", XrmoptionSepArg, NULL}, - {"-scrollbar-height", "*EmacsFrame.scrollBarHeight", XrmoptionSepArg, NULL}, + {(String)"-geometry", (String)".geometry", XrmoptionSepArg, NULL}, + {(String)"-iconic", (String)".iconic", XrmoptionNoArg, (XtPointer) "yes"}, + + {(String)"-internal-border-width", (String)"*EmacsFrame.internalBorderWidth", + XrmoptionSepArg, NULL}, + {(String)"-ib", (String)"*EmacsFrame.internalBorderWidth", XrmoptionSepArg, + NULL}, + {(String)"-scrollbar-width", (String)"*EmacsFrame.scrollBarWidth", + XrmoptionSepArg, NULL}, + {(String)"-scrollbar-height", (String)"*EmacsFrame.scrollBarHeight", + XrmoptionSepArg, NULL}, /* #### Beware! If the type of the shell changes, update this. */ - {"-T", "*TopLevelEmacsShell.title", XrmoptionSepArg, NULL}, - {"-wn", "*TopLevelEmacsShell.title", XrmoptionSepArg, NULL}, - {"-title", "*TopLevelEmacsShell.title", XrmoptionSepArg, NULL}, - {"-iconname", "*TopLevelEmacsShell.iconName", XrmoptionSepArg, NULL}, - {"-in", "*TopLevelEmacsShell.iconName", XrmoptionSepArg, NULL}, - {"-mc", "*pointerColor", XrmoptionSepArg, NULL}, - {"-cr", "*cursorColor", XrmoptionSepArg, NULL}, - {"-fontset", "*FontSet", XrmoptionSepArg, NULL}, + {(String)"-T", (String)"*TopLevelEmacsShell.title", XrmoptionSepArg, NULL}, + {(String)"-wn", (String)"*TopLevelEmacsShell.title", XrmoptionSepArg, NULL}, + {(String)"-title", (String)"*TopLevelEmacsShell.title", XrmoptionSepArg, + NULL}, + {(String)"-iconname", (String)"*TopLevelEmacsShell.iconName", + XrmoptionSepArg, NULL}, + {(String)"-in", (String)"*TopLevelEmacsShell.iconName", XrmoptionSepArg, + NULL}, + {(String)"-mc", (String)"*pointerColor", XrmoptionSepArg, NULL}, + {(String)"-cr", (String)"*cursorColor", XrmoptionSepArg, NULL}, + {(String)"-fontset", (String)"*FontSet", XrmoptionSepArg, NULL}, }; static void validify_resource_string (char *str); @@ -278,7 +285,7 @@ Xatoms_of_objects_x (d); x_init_device_class (d); - /* Run the the elisp side of the X device initialization. */ + /* Run the elisp side of the X device initialization. */ call0 (Qinit_pre_x_win); } @@ -1187,7 +1194,7 @@ CONST char *keysym_string; KeySym keysym_KeySym; KeySym *keysym_ptr, *keysym_last; - int code, min_code, max_code, keysyms_per_code; + int min_code, max_code, keysyms_per_code; if (!DEVICE_X_P (d)) signal_simple_error ("Not an X device", device);
--- a/src/device.h Mon Aug 13 08:45:53 2007 +0200 +++ b/src/device.h Mon Aug 13 08:46:35 2007 +0200 @@ -314,9 +314,9 @@ #define INVALIDATE_DEVICE_PIXEL_TO_GLYPH_CACHE(d) \ (d)->pixel_to_glyph_cache.valid = 0 -#define INVALIDATE_PIXEL_TO_GLYPH_CACHE do { \ - Lisp_Object _devcons_, _concons_; \ - DEVICE_LOOP_NO_BREAK (_devcons_, _concons_) \ +#define INVALIDATE_PIXEL_TO_GLYPH_CACHE do { \ + Lisp_Object _devcons_, _concons_; \ + DEVICE_LOOP_NO_BREAK (_devcons_, _concons_) \ INVALIDATE_DEVICE_PIXEL_TO_GLYPH_CACHE (XDEVICE (XCONS (_devcons_)->car));\ } while (0) @@ -354,14 +354,11 @@ inline. Also, the majority of the time the object will turn out to be a window so we move it from being checked last to being checked first. */ -#define DFW_DEVICE(obj) \ - (WINDOWP (obj) \ - ? WINDOW_DEVICE (XWINDOW (obj)) \ - : (FRAMEP (obj) \ - ? FRAME_DEVICE (XFRAME (obj)) \ - : (DEVICEP (obj) \ - ? obj \ - : Qnil))) +#define DFW_DEVICE(obj) \ + (WINDOWP (obj) ? WINDOW_DEVICE (XWINDOW (obj)) \ + : (FRAMEP (obj) ? FRAME_DEVICE (XFRAME (obj)) \ + : (DEVICEP (obj) ? obj \ + : Qnil))) /* NO_BREAK means that "break" doesn't do what you think it does! Use goto instead. "continue" is OK, though. */
--- a/src/dialog-x.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/dialog-x.c Mon Aug 13 08:46:35 2007 +0200 @@ -45,7 +45,7 @@ widget_value *wv; int got_some; wv = xmalloc_widget_value (); - wv->name = "value"; + wv->name = (char *) "value"; got_some = lw_get_some_values (id, wv); if (got_some) { @@ -145,7 +145,7 @@ wv_closure = make_opaque_ptr (kids); record_unwind_protect (widget_value_unwind, wv_closure); - prev->name = "message"; + prev->name = (char *) "message"; prev->value = xstrdup (name); prev->enabled = 1;
--- a/src/dired.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/dired.c Mon Aug 13 08:46:35 2007 +0200 @@ -63,7 +63,7 @@ char statbuf [MAXNAMLEN+2]; char *statbuf_tail; - Lisp_Object tail_cons; + Lisp_Object tail_cons = Qnil; char slashfilename[MAXNAMLEN+2]; char *filename = slashfilename; @@ -335,7 +335,6 @@ file = FILE_SYSTEM_CASE (file); #endif dirname = Fexpand_file_name (dirname, Qnil); - bestmatch = Qnil; file_name_length = string_char_length (XSTRING (file)); /* With passcount = 0, ignore files that end in an ignored extension. @@ -354,7 +353,6 @@ report_file_error ("Opening directory", list1 (dirname)); /* Loop reading blocks */ - /* (att3b compiler bug requires do a null comparison this way) */ while (1) { DIRENTRY *dp; @@ -371,12 +369,7 @@ d_name = (Bufbyte *) dp->d_name; len = NAMLEN (dp); - /* mrb: #### FIX: The Name must be converted using - file-name-coding system or some such. At least this - change allows the saving of files in directories with - Japanese file names */ - /*cclen = bytecount_to_charcount (d_name, len);*/ - cclen = len; + cclen = bytecount_to_charcount (d_name, len); /* Can't just use QUIT because we have to make sure the file descriptor gets closed. */ @@ -403,14 +396,14 @@ #define TRIVIAL_DIRECTORY_ENTRY(n) (!strcmp (n, ".") || !strcmp (n, "..")) #endif /* "." and ".." are never interesting as completions, but are - actually in the way in a directory contains only one file. */ + actually in the way in a directory containing only one file. */ if (!passcount && TRIVIAL_DIRECTORY_ENTRY (dp->d_name)) continue; } else { /* Compare extensions-to-be-ignored against end of this file name */ - /* if name is not an exact match against specified string */ + /* if name is not an exact match against specified string. */ if (!passcount && cclen > file_name_length) { Lisp_Object tem; @@ -442,7 +435,7 @@ if (!passcount && ignored_extension_p) continue; - if (!passcount && regexp_ignore_completion_p (d_name, Qnil, 0, len)) + if (!passcount && regexp_ignore_completion_p (d_name, Qnil, 0, cclen)) continue; /* Update computation of how much all possible completions match */ @@ -454,16 +447,9 @@ struct gcpro ngcpro1; NGCPRO1 (name); /* This is a possible completion */ - if (directoryp) - { - /* This completion is a directory; make it end with '/' */ - name = Ffile_name_as_directory - /* make_string (d_name, len); */ - (make_ext_string (d_name, len, FORMAT_BINARY)); - } - else - /* name = make_string (d_name, len) */ - name = make_ext_string (d_name, len, FORMAT_BINARY); + name = make_string (d_name, len); + if (directoryp) /* Completion is a directory; end it with '/' */ + name = Ffile_name_as_directory (name); if (all_flag) { bestmatch = Fcons (name, bestmatch); @@ -490,14 +476,14 @@ use it as the best match rather than one that is not an exact match. This way, we get the case pattern of the actual match. */ - if ((matchsize == len + if ((matchsize == cclen && matchsize + !!directoryp < string_char_length (XSTRING (bestmatch))) || /* If there is no exact match ignoring case, prefer a match that does not change the case of the input. */ - (((matchsize == len) + (((matchsize == cclen) == (matchsize + !!directoryp == string_char_length (XSTRING (bestmatch)))) @@ -509,11 +495,9 @@ && 0 <= scmp_1 (p1, string_data (XSTRING (file)), file_name_length, 0))) { - /* bestmatch = make_string (d_name, len); */ /* mrb */ - bestmatch = make_ext_string (d_name, len, FORMAT_BINARY); + bestmatch = make_string (d_name, len); if (directoryp) - bestmatch = - Ffile_name_as_directory (bestmatch); + bestmatch = Ffile_name_as_directory (bestmatch); } }
--- a/src/doc.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/doc.c Mon Aug 13 08:46:35 2007 +0200 @@ -111,7 +111,7 @@ space_left = buffer_size - (p - buffer); } - /* Don't read too too much at one go. */ + /* Don't read too much at one go. */ if (space_left > 1024 * 8) space_left = 1024 * 8; nread = read (fd, p, space_left); @@ -171,6 +171,12 @@ return return_me; } +#define string_join(dest, s1, s2) \ + memcpy ((void *) dest, (void *) XSTRING_data (s1), XSTRING_length (s1)); \ + memcpy ((void *) ((Bufbyte *) dest + XSTRING_length (s1)), \ + (void *) XSTRING_data (s2), XSTRING_length (s2)); \ + dest[XSTRING_length (s1) + XSTRING_length (s2)] = '\0' + /* Extract a doc string from a file. FILEPOS says where to get it. (This could actually be byte code instructions/constants instead of a doc string.) @@ -227,8 +233,11 @@ minsize = 12; name_nonreloc = (char *) alloca (minsize + string_length (XSTRING (file)) + 8); + /* strcpy (name_nonreloc, (char *) string_data (XSTRING (Vdoc_directory))); strcat (name_nonreloc, (char *) string_data (XSTRING (file))); + */ + string_join (name_nonreloc, Vdoc_directory, file); munge_doc_file_name (name_nonreloc); } else
--- a/src/ecrt0.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/ecrt0.c Mon Aug 13 08:46:35 2007 +0200 @@ -521,6 +521,7 @@ asm(" comm float_soft, 4"); asm(" comm flag_68881, 4"); asm(" comm flag_68010, 4"); + asm(" comm flag_68040, 4"); asm(" comm flag_fpa, 4"); #endif /* new hp assembler */
--- a/src/elhash.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/elhash.c Mon Aug 13 08:46:35 2007 +0200 @@ -305,14 +305,12 @@ CHECK_SYMBOL (sym); - if (EQ (sym, Qeq)) - return HASHTABLE_EQ; - if (EQ (sym, Qequal)) - return HASHTABLE_EQUAL; - if (EQ (sym, Qeql)) - return HASHTABLE_EQL; + if (EQ (sym, Qeq)) return HASHTABLE_EQ; + if (EQ (sym, Qequal)) return HASHTABLE_EQUAL; + if (EQ (sym, Qeql)) return HASHTABLE_EQL; + signal_simple_error ("Invalid hashtable test fun", sym); - return 0; /* not reached */ + return HASHTABLE_EQ; /* not reached */ } DEFUN ("make-hashtable", Fmake_hashtable, Smake_hashtable, 1, 2, 0 /* @@ -911,6 +909,6 @@ void vars_of_elhash (void) { - /* This must not be staticpro'd */ + /* This must NOT be staticpro'd */ Vall_weak_hashtables = Qnil; }
--- a/src/emacs.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/emacs.c Mon Aug 13 08:46:35 2007 +0200 @@ -168,13 +168,12 @@ { fatal_error_in_progress = 1; shut_down_emacs (sig, Qnil); -#ifdef DEBUG_XEMACS stderr_out("\nLisp backtrace follows:\n\n"); Fbacktrace(Qexternal_debugging_output, Qt); /* Check for Sun-style stack printing via /proc */ { - char *pstack = "/usr/proc/bin/pstack"; + CONST char *pstack = "/usr/proc/bin/pstack"; if (access(pstack, X_OK) == 0) { char buf[100]; @@ -184,7 +183,6 @@ system(buf); } } -#endif } #ifdef VMS LIB$STOP (SS$_ABORT); @@ -1562,6 +1560,13 @@ "Use `M-x recover-session' to recover them.\n" "\n" "Please report this bug to the address `crashes@xemacs.org'.\n" + "*MAKE SURE* to include as much configuration information as\n" + "possible; at the very least what OS and hardware you are running\n" + "on, and hopefully also what compiler and compiler options the\n" + "binary was compiled with, what options XEmacs was compiled with,\n" + "whether you are using a prebuilt binary from ftp.xemacs.org or\n" + "compiled XEmacs yourself for your system, etc.\n" + "\n" "If at all possible, *please* try to obtain a C stack backtrace;\n" "it will help us immensely in determining what went wrong.\n" "To do this, locate the core file that was produced as a result\n" @@ -1571,7 +1576,7 @@ "\n" " gdb "); { - char *name; + CONST char *name; char *dir = 0; /* Now try to determine the actual path to the executable, @@ -1608,8 +1613,11 @@ #ifdef TOOLTALK tt_session_quit (tt_default_session ()); +#if 0 + /* The following crashes when built on X11R5 and run on X11R6 */ tt_close (); #endif +#endif /* TOOLTALK */ #ifdef VMS kill_vms_processes (); @@ -1621,7 +1629,7 @@ /* Nothing like this can be implemented on an Apollo. What a loss! */ -extern int my_edata; +extern char my_edata[]; #ifdef HAVE_SHM
--- a/src/eval.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/eval.c Mon Aug 13 08:46:35 2007 +0200 @@ -114,7 +114,7 @@ /* Pointer to first unused element in specpdl. */ struct specbinding *specpdl_ptr; -/* specpdl_ptr - specpdl. Callers outside this this file should use +/* specpdl_ptr - specpdl. Callers outside this file should use * specpdl_depth () function-call */ static int specpdl_depth_counter; @@ -4620,13 +4620,15 @@ /* The special binding stack */ /**********************************************************************/ +#define min_max_specpdl_size 400 + static void grow_specpdl (void) { if (specpdl_size >= max_specpdl_size) { - if (max_specpdl_size < 400) - max_specpdl_size = 400; + if (max_specpdl_size < min_max_specpdl_size) + max_specpdl_size = min_max_specpdl_size; if (specpdl_size >= max_specpdl_size) { if (!NILP (Vdebug_on_error) || !NILP (Vdebug_on_signal))
--- a/src/event-Xt.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/event-Xt.c Mon Aug 13 08:46:35 2007 +0200 @@ -165,15 +165,18 @@ static CONST char * index_to_name (int indice) { - return ((indice == ShiftMapIndex ? "ModShift" - : (indice == LockMapIndex ? "ModLock" - : (indice == ControlMapIndex ? "ModControl" - : (indice == Mod1MapIndex ? "Mod1" - : (indice == Mod2MapIndex ? "Mod2" - : (indice == Mod3MapIndex ? "Mod3" - : (indice == Mod4MapIndex ? "Mod4" - : (indice == Mod5MapIndex ? "Mod5" - : "???"))))))))); + switch (indice) + { + case ShiftMapIndex: return "ModShift"; + case LockMapIndex: return "ModLock"; + case ControlMapIndex: return "ModControl"; + case Mod1MapIndex: return "Mod1"; + case Mod2MapIndex: return "Mod2"; + case Mod3MapIndex: return "Mod3"; + case Mod4MapIndex: return "Mod4"; + case Mod5MapIndex: return "Mod5"; + default: return "???"; + } } /* Boy, I really wish C had local functions... */ @@ -196,13 +199,13 @@ struct x_device *xd = DEVICE_X_DATA (d); int modifier_index, modifier_key, column, mkpm; int warned_about_overlapping_modifiers = 0; - int warned_about_predefined_modifiers = 0; - int warned_about_duplicate_modifiers = 0; - int meta_bit = 0; + int warned_about_predefined_modifiers = 0; + int warned_about_duplicate_modifiers = 0; + int meta_bit = 0; int hyper_bit = 0; int super_bit = 0; - int alt_bit = 0; - int mode_bit = 0; + int alt_bit = 0; + int mode_bit = 0; xd->lock_interpretation = 0; @@ -413,18 +416,22 @@ static void x_handle_sticky_modifiers (XEvent *ev, struct device *d) { - struct x_device *xd = DEVICE_X_DATA (d); - KeyCode keycode = ev->xkey.keycode; - int type = ev->xany.type; - int is_modifier = - (type == KeyPress || type == KeyRelease) && - x_key_is_modifier_p (keycode, d); - - if (!modifier_keys_are_sticky) + struct x_device *xd; + KeyCode keycode; + int type; + + if (!modifier_keys_are_sticky) /* Optimize for non-sticky modifiers */ return; - if (!is_modifier) - { + xd = DEVICE_X_DATA (d); + keycode = ev->xkey.keycode; + type = ev->type; + + if (! ((type == KeyPress || type == KeyRelease) && + x_key_is_modifier_p (keycode, d))) + { /* Not a modifier key */ + Bool key_event_p = (type == KeyPress || type == KeyRelease); + if (type == KeyPress && !xd->last_downkey) xd->last_downkey = keycode; else if (type == ButtonPress || @@ -440,7 +447,10 @@ if (type == KeyPress || type == ButtonPress) xd->down_mask = 0; - ev->xkey.state |= xd->need_to_add_mask; + if (key_event_p) + ev->xkey.state |= xd->need_to_add_mask; + else + ev->xbutton.state |= xd->need_to_add_mask; if (type == KeyRelease && keycode == xd->last_downkey) /* If I hold press-and-release the Control key and then press @@ -458,13 +468,25 @@ occur at the same time, the key was actually auto- repeated. Under Open-Windows, at least, this works. */ - xd->release_time = ev->xkey.time; + xd->release_time = key_event_p ? ev->xkey.time : ev->xbutton.time; } - else + else /* Modifier key pressed */ { + int i; KeySym *syms = &xd->x_keysym_map [(keycode - xd->x_keysym_map_min_code) * xd->x_keysym_map_keysyms_per_code]; - int i; + + /* If a non-modifier key was pressed in the middle of a bunch + of modifiers, then it unsticks all the modifiers that were + previously pressed. We cannot unstick the modifiers until + now because we want to check for auto-repeat of the + non-modifier key. */ + + if (xd->last_downkey) + { + xd->last_downkey = 0; + xd->need_to_add_mask = 0; + } #define FROB(mask) \ do { \ @@ -493,33 +515,16 @@ } \ } while (0) - /* If a non-modifier key was pressed in the middle of a bunch - of modifiers, then it unsticks all the modifiers that were - previously pressed. We cannot unstick the modifiers until - now because we want to check for auto-repeat of the - non-modifier key. */ - - if (xd->last_downkey) - { - xd->last_downkey = 0; - xd->need_to_add_mask = 0; - } - for (i = 0; i < xd->x_keysym_map_keysyms_per_code; i++) - { - if (syms[i] == XK_Control_L || syms[i] == XK_Control_R) - FROB (ControlMask); - if (syms[i] == XK_Shift_L || syms[i] == XK_Shift_R) - FROB (ShiftMask); - if (syms[i] == XK_Meta_L || syms[i] == XK_Meta_R) - FROB (xd->MetaMask); - if (syms[i] == XK_Super_L || syms[i] == XK_Super_R) - FROB (xd->SuperMask); - if (syms[i] == XK_Hyper_L || syms[i] == XK_Hyper_R) - FROB (xd->HyperMask); - if (syms[i] == XK_Alt_L || syms[i] == XK_Alt_R) - FROB (xd->AltMask); - } + switch (syms[i]) + { + case XK_Control_L: case XK_Control_R: FROB (ControlMask); break; + case XK_Shift_L: case XK_Shift_R: FROB (ShiftMask); break; + case XK_Meta_L: case XK_Meta_R: FROB (xd->MetaMask); break; + case XK_Super_L: case XK_Super_R: FROB (xd->SuperMask); break; + case XK_Hyper_L: case XK_Hyper_R: FROB (xd->HyperMask); break; + case XK_Alt_L: case XK_Alt_R: FROB (xd->AltMask); break; + } } #undef FROB } @@ -539,28 +544,32 @@ keysym_obeys_caps_lock_p (KeySym sym, struct device *d) { struct x_device *xd = DEVICE_X_DATA (d); - /* Eeeeevil hack. Don't apply caps-lock to things that aren't alphabetic + /* Eeeeevil hack. Don't apply Caps_Lock to things that aren't alphabetic characters, where "alphabetic" means something more than simply A-Z. - That is, if caps-lock is down, typing ESC doesn't produce Shift-ESC. + That is, if Caps_Lock is down, typing ESC doesn't produce Shift-ESC. But if shift-lock is down, then it does. */ if (xd->lock_interpretation == XK_Shift_Lock) return 1; - if (((sym >= XK_A) && (sym <= XK_Z)) || - ((sym >= XK_a) && (sym <= XK_z)) || - ((sym >= XK_Agrave) && (sym <= XK_Odiaeresis)) || - ((sym >= XK_agrave) && (sym <= XK_odiaeresis)) || - ((sym >= XK_Ooblique) && (sym <= XK_Thorn)) || - ((sym >= XK_oslash) && (sym <= XK_thorn))) - return 1; - else - return 0; + + return + ((sym >= XK_A) && (sym <= XK_Z)) || + ((sym >= XK_a) && (sym <= XK_z)) || + ((sym >= XK_Agrave) && (sym <= XK_Odiaeresis)) || + ((sym >= XK_agrave) && (sym <= XK_odiaeresis)) || + ((sym >= XK_Ooblique) && (sym <= XK_Thorn)) || + ((sym >= XK_oslash) && (sym <= XK_thorn)); } /* called from EmacsFrame.c (actually from Xt itself) when a - MappingNotify event is received. For non-obvious reasons, - our event handler does not see these events, so we need a - special translation. */ + MappingNotify event is received. In its infinite wisdom, Xt + decided that Xt event handlers never get MappingNotify events. + O'Reilly Xt Programming Manual 9.1.2 says: + + MappingNotify is automatically handled by Xt, so it isn't passed + to event handlers and you don't need to worry about it. + + Of course, we DO worry about it, so we need a special translation. */ void emacs_Xt_mapping_action (Widget w, XEvent* event) { @@ -574,10 +583,13 @@ take extra MappingKeyboard events out of the queue before requesting the current keymap from the server. */ - if (event->xmapping.request == MappingKeyboard) - x_reset_key_mapping (d); - else if (event->xmapping.request == MappingModifier) - x_reset_modifier_mapping (d); + switch (event->xmapping.request) + { + case MappingKeyboard: x_reset_key_mapping (d); break; + case MappingModifier: x_reset_modifier_mapping (d); break; + case MappingPointer: /* Do something here? */ break; + default: abort(); + } } @@ -601,7 +613,7 @@ { char *name; KeySym keysym = 0; - struct device *d = get_device_from_display (event->xany.display); + /* struct device *d = get_device_from_display (event->xany.display); */ /* Apparently it's necessary to specify a dummy here (rather than passing in 0) to avoid crashes on German IRIX */ char dummy[256]; @@ -693,55 +705,35 @@ static void set_last_server_timestamp (struct device *d, XEvent *x_event) { - switch (x_event->xany.type) + Time t; + switch (x_event->type) { case KeyPress: - case KeyRelease: - DEVICE_X_LAST_SERVER_TIMESTAMP (d) = x_event->xkey.time; - break; - + case KeyRelease: t = x_event->xkey.time; break; case ButtonPress: - case ButtonRelease: - DEVICE_X_LAST_SERVER_TIMESTAMP (d) = x_event->xbutton.time; - break; - - case MotionNotify: - DEVICE_X_LAST_SERVER_TIMESTAMP (d) = x_event->xmotion.time; - break; - + case ButtonRelease: t = x_event->xbutton.time; break; case EnterNotify: - case LeaveNotify: - DEVICE_X_LAST_SERVER_TIMESTAMP (d) = x_event->xcrossing.time; - break; - - case PropertyNotify: - DEVICE_X_LAST_SERVER_TIMESTAMP (d) = x_event->xproperty.time; - break; - - case SelectionClear: - DEVICE_X_LAST_SERVER_TIMESTAMP (d) = x_event->xselectionclear.time; - break; - - case SelectionRequest: - DEVICE_X_LAST_SERVER_TIMESTAMP (d) = x_event->xselectionrequest.time; - break; - - case SelectionNotify: - DEVICE_X_LAST_SERVER_TIMESTAMP (d) = x_event->xselection.time; - break; + case LeaveNotify: t = x_event->xcrossing.time; break; + case MotionNotify: t = x_event->xmotion.time; break; + case PropertyNotify: t = x_event->xproperty.time; break; + case SelectionClear: t = x_event->xselectionclear.time; break; + case SelectionRequest: t = x_event->xselectionrequest.time; break; + case SelectionNotify: t = x_event->xselection.time; break; + default: return; } + DEVICE_X_LAST_SERVER_TIMESTAMP (d) = t; } static int x_event_to_emacs_event (XEvent *x_event, struct Lisp_Event *emacs_event) { - Display *display = x_event->xany.display; - struct device *d = get_device_from_display (display); + Display *display = x_event->xany.display; + struct device *d = get_device_from_display (display); struct x_device *xd = DEVICE_X_DATA (d); set_last_server_timestamp (d, x_event); - switch (x_event->xany.type) + switch (x_event->type) { case KeyRelease: x_handle_sticky_modifiers (x_event, d); @@ -751,283 +743,229 @@ case ButtonPress: case ButtonRelease: { - unsigned int modifiers = 0; - int shift_p; - int lock_p; -#ifdef EXTERNAL_WIDGET - struct frame *f = x_any_window_to_frame (d, x_event->xany.window); -#endif - - /* If this is a synthetic KeyPress or Button event, and the user - has expressed a disinterest in this security hole, then drop - it on the floor. - */ - if (((x_event->xany.type == KeyPress) - ? x_event->xkey.send_event - : x_event->xbutton.send_event) -#ifdef EXTERNAL_WIDGET - /* ben: events get sent to an ExternalShell using XSendEvent. - This is not a perfect solution. */ - && !FRAME_X_EXTERNAL_WINDOW_P (f) -#endif - && !x_allow_sendevents) - return 0; - - x_handle_sticky_modifiers (x_event, d); - - shift_p = x_event->xkey.state & ShiftMask; - lock_p = x_event->xkey.state & LockMask; - - if (x_event->xany.type == KeyPress) - DEVICE_X_GLOBAL_MOUSE_TIMESTAMP (d) = x_event->xkey.time; - else - DEVICE_X_GLOBAL_MOUSE_TIMESTAMP (d) = x_event->xbutton.time; + unsigned int modifiers = 0; + int shift_p; + int lock_p; + Bool key_event_p = (x_event->type == KeyPress); + unsigned int *state = + key_event_p ? &x_event->xkey.state : &x_event->xbutton.state; - /* Ignore the caps-lock key w.r.t. mouse presses and releases. */ - if (x_event->xany.type != KeyPress) - lock_p = 0; - - if (x_event->xkey.state & ControlMask) modifiers |= MOD_CONTROL; - if (x_event->xkey.state & xd->MetaMask) modifiers |= MOD_META; - if (x_event->xkey.state & xd->SuperMask) modifiers |= MOD_SUPER; - if (x_event->xkey.state & xd->HyperMask) modifiers |= MOD_HYPER; - if (x_event->xkey.state & xd->AltMask) modifiers |= MOD_ALT; + /* If this is a synthetic KeyPress or Button event, and the user + has expressed a disinterest in this security hole, then drop + it on the floor. */ + if ((key_event_p + ? x_event->xkey.send_event + : x_event->xbutton.send_event) +#ifdef EXTERNAL_WIDGET + /* ben: events get sent to an ExternalShell using XSendEvent. + This is not a perfect solution. */ + && !FRAME_X_EXTERNAL_WINDOW_P ( + x_any_window_to_frame (d, x_event->xany.window)) +#endif + && !x_allow_sendevents) + return 0; + + DEVICE_X_MOUSE_TIMESTAMP (d) = + DEVICE_X_GLOBAL_MOUSE_TIMESTAMP (d) = + key_event_p ? x_event->xkey.time : x_event->xbutton.time; + + x_handle_sticky_modifiers (x_event, d); + + if (*state & ControlMask) modifiers |= MOD_CONTROL; + if (*state & xd->MetaMask) modifiers |= MOD_META; + if (*state & xd->SuperMask) modifiers |= MOD_SUPER; + if (*state & xd->HyperMask) modifiers |= MOD_HYPER; + if (*state & xd->AltMask) modifiers |= MOD_ALT; - /* Ignore the caps-lock key if any other modifiers are down; this is - so that Caps doesn't turn C-x into C-X, which would suck. */ - if (modifiers) - { - x_event->xkey.state &= (~LockMask); - lock_p = 0; - } - - if (shift_p || lock_p) - modifiers |= MOD_SHIFT; - - DEVICE_X_MOUSE_TIMESTAMP (d) = DEVICE_X_GLOBAL_MOUSE_TIMESTAMP (d); + /* Ignore the Caps_Lock key if: + - any other modifiers are down, so that Caps_Lock doesn't + turn C-x into C-X, which would suck. + - the event was a mouse event. */ + if (modifiers || ! key_event_p) + *state &= (~LockMask); + + shift_p = *state & ShiftMask; + lock_p = *state & LockMask; + + if (shift_p || lock_p) + modifiers |= MOD_SHIFT; - switch (x_event->xany.type) - { - case KeyPress: - { - Lisp_Object keysym; - KeyCode keycode = x_event->xkey.keycode; - - if (x_key_is_modifier_p (keycode, d)) /* it's a modifier key */ - return 0; + if (key_event_p) + { + Lisp_Object keysym; + XKeyEvent *ev = &x_event->xkey; + KeyCode keycode = ev->keycode; + - /* This used to compute the frame from the given X window - and store it here, but we really don't care about the - frame. */ - emacs_event->channel = DEVICE_CONSOLE (d); - keysym = x_to_emacs_keysym (x_event, 0); + if (x_key_is_modifier_p (keycode, d)) /* it's a modifier key */ + return 0; + + /* This used to compute the frame from the given X window and + store it here, but we really don't care about the frame. */ + emacs_event->channel = DEVICE_CONSOLE (d); + keysym = x_to_emacs_keysym (x_event, 0); - /* If the emacs keysym is nil, then that means that the - X keysym was NoSymbol, which probably means that - we're in the midst of reading a Multi_key sequence, - or a "dead" key prefix. Ignore it. */ - if (NILP (keysym)) - return 0; + /* If the emacs keysym is nil, then that means that the + X keysym was NoSymbol, which probably means that + we're in the midst of reading a Multi_key sequence, + or a "dead" key prefix. Ignore it. */ + if (NILP (keysym)) + return 0; - /* More caps-lock garbage: caps-lock should *only* add - the shift modifier to two-case keys (that is, A-Z and - related characters). So at this point (after looking - up the keysym) if the keysym isn't a dual-case - alphabetic, and if the caps lock key was down but the - shift key wasn't, then turn off the shift modifier. - Gag barf retch. */ - /* #### type lossage: assuming equivalence of emacs and - X keysyms */ - /* !!#### maybe fix for Mule */ - if (! (CHAR_OR_CHAR_INTP (keysym) - && keysym_obeys_caps_lock_p - ((KeySym) XCHAR_OR_CHAR_INT (keysym), d)) - && lock_p - && !shift_p) - modifiers &= (~MOD_SHIFT); + /* More Caps_Lock garbage: Caps_Lock should *only* add the + shift modifier to two-case keys (that is, A-Z and + related characters). So at this point (after looking up + the keysym) if the keysym isn't a dual-case alphabetic, + and if the caps lock key was down but the shift key + wasn't, then turn off the shift modifier. Gag barf */ + /* #### type lossage: assuming equivalence of emacs and + X keysyms */ + /* !!#### maybe fix for Mule */ + if (lock_p && !shift_p && + ! (CHAR_OR_CHAR_INTP (keysym) + && keysym_obeys_caps_lock_p + ((KeySym) XCHAR_OR_CHAR_INT (keysym), d))) + modifiers &= (~MOD_SHIFT); - /* If this key contains two distinct keysyms, that is, - "shift" generates a different keysym than the - non-shifted key, then don't apply the shift modifier - bit: it's implicit. Otherwise, if there would be no - other way to tell the difference between the shifted - and unshifted version of this key, apply the shift - bit. Non-graphics, like Backspace and F1 get the - shift bit in the modifiers slot. Neither the - characters "a", "A", "2", nor "@" normally have the - shift bit set. However, "F1" normally does. */ - if (modifiers & MOD_SHIFT) - { - KeySym top, bot; - if (x_event->xkey.state & xd->ModeMask) - bot = XLookupKeysym (&x_event->xkey, 2), - top = XLookupKeysym (&x_event->xkey, 3); - else - bot = XLookupKeysym (&x_event->xkey, 0), - top = XLookupKeysym (&x_event->xkey, 1); - if (top && bot && top != bot) - modifiers &= ~MOD_SHIFT; - } - emacs_event->event_type = key_press_event; - emacs_event->timestamp = x_event->xkey.time; - emacs_event->event.key.modifiers = modifiers; - emacs_event->event.key.keysym = keysym; - break; - } - case ButtonPress: - case ButtonRelease: - { - struct frame *frame = - x_window_to_frame (d, x_event->xbutton.window); - if (! frame) - return 0; /* not for us */ - XSETFRAME (emacs_event->channel, frame); - } - - if (x_event->type == ButtonPress) - emacs_event->event_type = button_press_event; - else emacs_event->event_type = button_release_event; - emacs_event->timestamp = x_event->xbutton.time; - emacs_event->event.button.modifiers = modifiers; - emacs_event->event.button.button = x_event->xbutton.button; - emacs_event->event.button.x = x_event->xbutton.x; - emacs_event->event.button.y = x_event->xbutton.y; - break; - } + /* If this key contains two distinct keysyms, that is, + "shift" generates a different keysym than the + non-shifted key, then don't apply the shift modifier + bit: it's implicit. Otherwise, if there would be no + other way to tell the difference between the shifted + and unshifted version of this key, apply the shift bit. + Non-graphics, like Backspace and F1 get the shift bit + in the modifiers slot. Neither the characters "a", + "A", "2", nor "@" normally have the shift bit set. + However, "F1" normally does. */ + if (modifiers & MOD_SHIFT) + { + int Mode_switch_p = *state & xd->ModeMask; + KeySym bot = XLookupKeysym (ev, Mode_switch_p ? 2 : 0); + KeySym top = XLookupKeysym (ev, Mode_switch_p ? 3 : 1); + if (top && bot && top != bot) + modifiers &= ~MOD_SHIFT; + } + emacs_event->event_type = key_press_event; + emacs_event->timestamp = ev->time; + emacs_event->event.key.modifiers = modifiers; + emacs_event->event.key.keysym = keysym; + } + else /* Mouse press/release event */ + { + XButtonEvent *ev = &x_event->xbutton; + struct frame *frame = x_window_to_frame (d, ev->window); + if (! frame) + return 0; /* not for us */ + XSETFRAME (emacs_event->channel, frame); + + emacs_event->event_type = (x_event->type == ButtonPress) ? + button_press_event : button_release_event; + + emacs_event->event.button.modifiers = modifiers; + emacs_event->timestamp = ev->time; + emacs_event->event.button.button = ev->button; + emacs_event->event.button.x = ev->x; + emacs_event->event.button.y = ev->y; + } } - break; + break; case MotionNotify: { - Window w = x_event->xmotion.window; - struct frame *frame = x_window_to_frame (d, w); - XEvent event2; + XMotionEvent *ev = &x_event->xmotion; + struct frame *frame = x_window_to_frame (d, ev->window); + unsigned int modifiers = 0; + XMotionEvent event2; - if (! frame) - return 0; /* not for us */ + if (! frame) + return 0; /* not for us */ - /* We use MotionHintMask, so we will get only one motion event - until the next time we call XQueryPointer or the user clicks - the mouse. So call XQueryPointer now (meaning that the event - will be in sync with the server just before Fnext_event() - returns). If the mouse is still in motion, then the server - will immediately generate exactly one more motion event, which - will be on the queue waiting for us next time around. - */ - event2 = *x_event; - if (XQueryPointer (x_event->xmotion.display, event2.xmotion.window, - &event2.xmotion.root, &event2.xmotion.subwindow, - &event2.xmotion.x_root, &event2.xmotion.y_root, - &event2.xmotion.x, &event2.xmotion.y, - &event2.xmotion.state)) - *x_event = event2; - - DEVICE_X_MOUSE_TIMESTAMP (d) = x_event->xmotion.time; + /* We use MotionHintMask, so we will get only one motion event + until the next time we call XQueryPointer or the user + clicks the mouse. So call XQueryPointer now (meaning that + the event will be in sync with the server just before + Fnext_event() returns). If the mouse is still in motion, + then the server will immediately generate exactly one more + motion event, which will be on the queue waiting for us + next time around. */ + event2 = *ev; + if (XQueryPointer (event2.display, event2.window, + &event2.root, &event2.subwindow, + &event2.x_root, &event2.y_root, + &event2.x, &event2.y, + &event2.state)) + ev = &event2; /* only one structure copy */ - XSETFRAME (emacs_event->channel, frame); - emacs_event->event_type = pointer_motion_event; - emacs_event->timestamp = x_event->xmotion.time; - emacs_event->event.motion.x = x_event->xmotion.x; - emacs_event->event.motion.y = x_event->xmotion.y; - { - unsigned int modifiers = 0; - if (x_event->xmotion.state & ShiftMask) modifiers |= MOD_SHIFT; - if (x_event->xmotion.state & ControlMask) modifiers |= MOD_CONTROL; - if (x_event->xmotion.state & xd->MetaMask) modifiers |= MOD_META; - if (x_event->xmotion.state & xd->SuperMask) modifiers |= MOD_SUPER; - if (x_event->xmotion.state & xd->HyperMask) modifiers |= MOD_HYPER; - if (x_event->xmotion.state & xd->AltMask) modifiers |= MOD_ALT; - /* Currently ignores Shift_Lock but probably shouldn't - (but it definitely should ignore Caps_Lock). */ - emacs_event->event.motion.modifiers = modifiers; - } + DEVICE_X_MOUSE_TIMESTAMP (d) = ev->time; + + XSETFRAME (emacs_event->channel, frame); + emacs_event->event_type = pointer_motion_event; + emacs_event->timestamp = ev->time; + emacs_event->event.motion.x = ev->x; + emacs_event->event.motion.y = ev->y; + if (ev->state & ShiftMask) modifiers |= MOD_SHIFT; + if (ev->state & ControlMask) modifiers |= MOD_CONTROL; + if (ev->state & xd->MetaMask) modifiers |= MOD_META; + if (ev->state & xd->SuperMask) modifiers |= MOD_SUPER; + if (ev->state & xd->HyperMask) modifiers |= MOD_HYPER; + if (ev->state & xd->AltMask) modifiers |= MOD_ALT; + /* Currently ignores Shift_Lock but probably shouldn't + (but it definitely should ignore Caps_Lock). */ + emacs_event->event.motion.modifiers = modifiers; } - break; + break; case ClientMessage: - /* Patch bogus TAKE_FOCUS messages from MWM; CurrentTime is passed as the - timestamp of the TAKE_FOCUS, which the ICCCM explicitly prohibits. */ - if (x_event->xclient.message_type == DEVICE_XATOM_WM_PROTOCOLS (d) - && x_event->xclient.data.l[0] == DEVICE_XATOM_WM_TAKE_FOCUS (d) - && x_event->xclient.data.l[1] == 0) - { - x_event->xclient.data.l[1] = DEVICE_X_LAST_SERVER_TIMESTAMP (d); - } - /* fall through */ + { + /* Patch bogus TAKE_FOCUS messages from MWM; CurrentTime is + passed as the timestamp of the TAKE_FOCUS, which the ICCCM + explicitly prohibits. */ + XClientMessageEvent *ev = &x_event->xclient; + if (ev->message_type == DEVICE_XATOM_WM_PROTOCOLS (d) + && ev->data.l[0] == DEVICE_XATOM_WM_TAKE_FOCUS (d) + && ev->data.l[1] == 0) + { + ev->data.l[1] = DEVICE_X_LAST_SERVER_TIMESTAMP (d); + } + } + /* fall through */ default: /* it's a magic event */ { - struct frame *f; - - switch (x_event->type) - { - /* Note: the number of cases could be reduced to two or - three by using xany.window, but it's perhaps clearer - and potentially more robust this way */ - case SelectionRequest: - f = x_window_to_frame (d, x_event->xselectionrequest.owner); - break; - - case SelectionClear: - f = x_window_to_frame (d, x_event->xselectionclear.window); - break; - - case SelectionNotify: - f = x_window_to_frame (d, x_event->xselection.requestor); - break; - - case PropertyNotify: - f = x_window_to_frame (d, x_event->xproperty.window); - break; - - case Expose: - case GraphicsExpose: - f = x_window_to_frame (d, x_event->xexpose.window); - break; - - case MapNotify: - case UnmapNotify: - f = x_any_window_to_frame (d, x_event->xmap.window); - break; - - case EnterNotify: - case LeaveNotify: - f = x_any_window_to_frame (d, x_event->xcrossing.window); - break; + struct frame *frame; + Window w; + + switch (x_event->type) + { + /* Note: the number of cases could be reduced to two or + three by using xany.window, but it's perhaps clearer + and potentially more robust this way */ + case SelectionRequest: w = x_event->xselectionrequest.owner; break; + case SelectionClear: w = x_event->xselectionclear.window; break; + case SelectionNotify: w = x_event->xselection.requestor; break; + case PropertyNotify: w = x_event->xproperty.window; break; + case ClientMessage: w = x_event->xclient.window; break; + case ConfigureNotify: w = x_event->xconfigure.window; break; + case Expose: + case GraphicsExpose: w = x_event->xexpose.window; break; + case MapNotify: + case UnmapNotify: w = x_event->xmap.window; break; + case EnterNotify: + case LeaveNotify: w = x_event->xcrossing.window; break; + case FocusIn: + case FocusOut: w = x_event->xfocus.window; break; + case VisibilityNotify: w = x_event->xvisibility.window; break; + default: w = x_event->xany.window; break; + } + frame = x_any_window_to_frame (d, w); + + if (!frame) + return 0; - case FocusIn: - case FocusOut: - /* It's curious that we're using x_any_window_to_frame() - here. I don't know if this causes problems. */ - f = x_any_window_to_frame (d, x_event->xfocus.window); - - case ClientMessage: - f = x_any_window_to_frame (d, x_event->xclient.window); - break; - - case MappingNotify: - case VisibilityNotify: - f = x_any_window_to_frame (d, x_event->xvisibility.window); - break; - - case ConfigureNotify: - f = x_any_window_to_frame (d, x_event->xconfigure.window); - break; - - default: - f = x_any_window_to_frame (d, x_event->xany.window); - break; - } - - if (!f) - return 0; - - emacs_event->event_type = magic_event; - XSETFRAME (emacs_event->channel, f); - memcpy ((char *) &emacs_event->event.magic.underlying_x_event, - (char *) x_event, - sizeof (XEvent)); - break; + emacs_event->event_type = magic_event; + XSETFRAME (emacs_event->channel, frame); + emacs_event->event.magic.underlying_x_event = *x_event; + break; } } return 1; @@ -1086,7 +1024,7 @@ /* focus events are sometimes generated just before a frame is destroyed. */ return; - handle_focus_event_1 (f, event->xany.type == FocusIn); + handle_focus_event_1 (f, event->type == FocusIn); } static void @@ -1095,7 +1033,7 @@ Lisp_Object frame = Qnil; XSETFRAME (frame, f); - if (event->xany.type == MapNotify) + if (event->type == MapNotify) { XWindowAttributes xwa; @@ -1310,19 +1248,13 @@ if (FRAME_X_EXTERNAL_WINDOW_P (f)) break; #endif - handle_focus_event_1 (f, event->xany.type == FocusIn); + handle_focus_event_1 (f, event->type == FocusIn); break; case ClientMessage: handle_client_message (f, event); break; -#if 0 - /* this is where we ought to be handling this event, but - we don't see it here. --ben */ - case MappingNotify: /* The user has run xmodmap */ -#endif - case VisibilityNotify: /* window visiblity has changed */ if (event->xvisibility.state == VisibilityUnobscured) FRAME_X_TOTALLY_VISIBLE_P (f) = 1; @@ -1331,10 +1263,26 @@ break; case ConfigureNotify: - if (event->xconfigure.window != XtWindow (FRAME_X_SHELL_WIDGET (f))) - break; - FRAME_X_SHELL_WIDGET (f)->core.x = event->xconfigure.x; - FRAME_X_SHELL_WIDGET (f)->core.y = event->xconfigure.y; +#ifdef HAVE_XIM + XIC_SetGeometry (f); +#endif + /* ### If the following code fails to work, simply always call + x_smash_bastardly_shell_position always. In this case we no + longer rely on the data in the events, merely on their + occurrence. */ + /* ### Well, actually we shouldn't have to ever call + x_smash_bastardly_shell_position. We should just call + XtTranslateCoordinates and only access the core.{x,y} fields + using XtGetValue -- mrb */ + { + XConfigureEvent *ev = &event->xconfigure; + if (ev->window == XtWindow (FRAME_X_SHELL_WIDGET (f)) && + ! (ev->x == 0 && ev->y == 0 && !ev->send_event)) + { + FRAME_X_SHELL_WIDGET (f)->core.x = ev->x; + FRAME_X_SHELL_WIDGET (f)->core.y = ev->y; + } + } break; default: @@ -1759,12 +1707,11 @@ { switch (mode) { - case NotifyNormal: return "Normal"; - case NotifyGrab: return "Grab"; - case NotifyUngrab: return "Ungrab"; + case NotifyNormal: return "Normal"; + case NotifyGrab: return "Grab"; + case NotifyUngrab: return "Ungrab"; case NotifyWhileGrabbed: return "WhileGrabbed"; - default: - return "???"; + default: return "???"; } } @@ -1773,15 +1720,14 @@ { switch (detail) { - case NotifyAncestor: return "Ancestor"; - case NotifyInferior: return "Inferior"; - case NotifyNonlinear: return "Nonlinear"; - case NotifyNonlinearVirtual: return "NonlinearVirtual"; - case NotifyPointer: return "Pointer"; - case NotifyPointerRoot: return "PointerRoot"; - case NotifyDetailNone: return "DetailNone"; - default: - return "???"; + case NotifyAncestor: return "Ancestor"; + case NotifyInferior: return "Inferior"; + case NotifyNonlinear: return "Nonlinear"; + case NotifyNonlinearVirtual: return "NonlinearVirtual"; + case NotifyPointer: return "Pointer"; + case NotifyPointerRoot: return "PointerRoot"; + case NotifyDetailNone: return "DetailNone"; + default: return "???"; } } @@ -1790,11 +1736,10 @@ { switch (state) { - case VisibilityFullyObscured: return "FullyObscured"; + case VisibilityFullyObscured: return "FullyObscured"; case VisibilityPartiallyObscured: return "PartiallyObscured"; - case VisibilityUnobscured: return "Unobscured"; - default: - return "???"; + case VisibilityUnobscured: return "Unobscured"; + default: return "???"; } } @@ -1854,11 +1799,11 @@ keysym = x_to_emacs_keysym (event, 0); if (CHAR_OR_CHAR_INTP (keysym)) { - if (XCHAR_OR_CHAR_INT (keysym) > 32 - && XCHAR_OR_CHAR_INT (keysym) < 127) - stderr_out (" keysym: %c\n", XCHAR_OR_CHAR_INT (keysym)); + Emchar c = XCHAR_OR_CHAR_INT (keysym); + if (c > 32 && c < 127) + stderr_out (" keysym: %c\n", c); else - stderr_out (" keysym: %d\n", XCHAR_OR_CHAR_INT (keysym)); + stderr_out (" keysym: %d\n", c); } else stderr_out (" keysym: %s\n", string_data (XSYMBOL (keysym)->name)); @@ -1870,8 +1815,8 @@ { XExposeEvent *ev = &event->xexpose; describe_event_window (ev->window, ev->display); - stderr_out (" region: %d %d %d %d\n", ev->x, ev->y, - ev->width, ev->height); + stderr_out (" region: x=%d y=%d width=%d height=%d\n", + ev->x, ev->y, ev->width, ev->height); stderr_out (" count: %d\n", ev->count); } else @@ -1886,8 +1831,8 @@ stderr_out (" major: %s\n", (ev ->major_code == X_CopyArea ? "CopyArea" : (ev->major_code == X_CopyPlane ? "CopyPlane" : "?"))); - stderr_out (" region: %d %d %d %d\n", ev->x, ev->y, - ev->width, ev->height); + stderr_out (" region: x=%d y=%d width=%d height=%d\n", + ev->x, ev->y, ev->width, ev->height); stderr_out (" count: %d\n", ev->count); } else @@ -2016,9 +1961,9 @@ we_didnt_get_an_event: while (NILP (dispatch_event_queue) && - !completed_timeouts && - !fake_event_occurred && - !process_events_occurred && + !completed_timeouts && + !fake_event_occurred && + !process_events_occurred && !tty_events_occurred) {
--- a/src/event-stream.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/event-stream.c Mon Aug 13 08:46:35 2007 +0200 @@ -812,7 +812,7 @@ redisplay (); if (event_matches_key_specifier_p (XEVENT (event), make_char (' '))) { - /* Discard next key if is is a space */ + /* Discard next key if it is a space */ reset_key_echo (command_builder, 1); Fnext_command_event (event, Qnil); } @@ -2969,8 +2969,7 @@ /* Compare the current state of the command builder against the local and global keymaps, and return the binding. If there is no match, try again, - case-insensitively. The return value will be - + case-insensitively. The return value will be one of: -- nil (there is no binding) -- a keymap (part of a command has been specified) -- a command (anything that satisfies `commandp'; this includes @@ -2989,7 +2988,7 @@ && (NILP (XEVENT_NEXT (evee))) && (XEVENT_TYPE (evee) == misc_user_event)) { - Lisp_Object fn = XEVENT (evee)->event.eval.function; + Lisp_Object fn = XEVENT (evee)->event.eval.function; Lisp_Object arg = XEVENT (evee)->event.eval.object; return (list2 (fn, arg)); } @@ -3022,44 +3021,40 @@ /* If key-sequence wasn't bound, we'll try some fallbacks. */ - { - Lisp_Object terminal = builder->most_current_event; - /* If we didn't find a binding, and the last event in the sequence is a shifted character, then try again with the lowercase version. */ - if (!NILP (Vretry_undefined_key_binding_unshifted) - && XEVENT_TYPE (terminal) == key_press_event - && ((XEVENT (terminal)->event.key.modifiers & MOD_SHIFT) - || (CHAR_OR_CHAR_INTP (XEVENT (terminal)->event.key.keysym) - && XCHAR_OR_CHAR_INT (XEVENT (terminal)->event.key.keysym) - >= 'A' - && XCHAR_OR_CHAR_INT (XEVENT (terminal)->event.key.keysym) - <= 'Z'))) - { - struct Lisp_Event terminal_copy; - terminal_copy = *XEVENT (terminal); - - if (XEVENT (terminal)->event.key.modifiers & MOD_SHIFT) - XEVENT (terminal)->event.key.modifiers &= (~ MOD_SHIFT); - else - XEVENT (terminal)->event.key.keysym - = make_char (XCHAR_OR_CHAR_INT (XEVENT (terminal)-> - event.key.keysym) - + 'a' - 'A'); - - result = command_builder_find_leaf (builder, allow_misc_user_events_p); - if (!NILP (result)) - return (result); - /* If there was no match with the lower-case version either, then - put back the upper-case event for the error message. - But make sure that function-key-map didn't change things out - from under us. */ - if (EQ (terminal, builder->most_current_event)) - *XEVENT (terminal) = terminal_copy; - } - } - + if (XEVENT_TYPE (builder->most_current_event) == key_press_event + && !NILP (Vretry_undefined_key_binding_unshifted)) + { + Lisp_Object terminal = builder->most_current_event; + struct key_data* key = & XEVENT (terminal)->event.key; + Emchar c; + if ((key->modifiers & MOD_SHIFT) + || (CHAR_OR_CHAR_INTP (key->keysym) + && ((c = XCHAR_OR_CHAR_INT (key->keysym)), c >= 'A' && c <= 'Z'))) + { + struct Lisp_Event terminal_copy; + terminal_copy = *XEVENT (terminal); + + if (key->modifiers & MOD_SHIFT) + key->modifiers &= (~ MOD_SHIFT); + else + key->keysym = make_char (c + 'a' - 'A'); + + result = command_builder_find_leaf (builder, allow_misc_user_events_p); + if (!NILP (result)) + return (result); + /* If there was no match with the lower-case version either, + then put back the upper-case event for the error + message. But make sure that function-key-map didn't + change things out from under us. */ + if (EQ (terminal, builder->most_current_event)) + *XEVENT (terminal) = terminal_copy; + } + } + + /* help-char is `auto-bound' in every keymap */ if (!NILP (Vprefix_help_command) && event_matches_key_specifier_p (XEVENT (builder->most_current_event), Vhelp_char)) @@ -3157,7 +3152,7 @@ /* Vthis_command_keys having value Qnil means that the next time push_this_command_keys is called, it should start over. - The times at which the the command-keys are reset + The times at which the command-keys are reset (instead of merely being augmented) are pretty conterintuitive. (More specifically: @@ -3294,13 +3289,12 @@ -- add the event to the event chain forming the current command (doing meta-translation as necessary) - -- return the binding of the this event chain; this will be one of + -- return the binding of this event chain; this will be one of: -- nil (there is no binding) -- a keymap (part of a command has been specified) -- a command (anything that satisfies `commandp'; this includes some symbols, lists, subrs, strings, vectors, and compiled-function objects) - */ static Lisp_Object lookup_command_event (struct command_builder *command_builder, @@ -3452,7 +3446,7 @@ w = XWINDOW (Fselected_window (Qnil)); - /* We're executing a new command, so the old value of is irrelevant. */ + /* We're executing a new command, so the old value is irrelevant. */ zmacs_region_stays = 0; /* If the previous command tried to force a specific window-start, @@ -3540,12 +3534,21 @@ This could be done via a function on the post-command-hook, but we don't want the user to accidentally remove it. */ + + Lisp_Object win = Fselected_window (Qnil); + +#if 0 + /* If the last command deleted the frame, `win' might be nil. + It seems safest to do nothing in this case. */ + /* ### This doesn't really fix the problem, + if delete-frame is called by some hook */ + if (NILP (win)) + return; +#endif + if (! zmacs_region_stays - && (!MINI_WINDOW_P (XWINDOW (Fselected_window (Qnil))) - /* but don't leave the region around if it's in the - minibuffer. */ - || EQ (zmacs_region_buffer (), - WINDOW_BUFFER (XWINDOW (Fselected_window (Qnil)))))) + && (!MINI_WINDOW_P (XWINDOW (win)) + || EQ (zmacs_region_buffer (), WINDOW_BUFFER (XWINDOW (win))))) zmacs_deactivate_region (); else zmacs_update_region (); @@ -3733,7 +3736,7 @@ /* Reset the command builder for reading the next sequence. */ reset_this_command_keys (console, 1); } - else + else /* key sequence is bound to a command */ { Vthis_command = leaf; /* Don't push an undo boundary if the command set the prefix arg, @@ -3762,20 +3765,15 @@ if (--command_builder->self_insert_countdown < 0) command_builder->self_insert_countdown = 20; } - execute_command_event (command_builder, - !NILP (Fequal (event, - command_builder-> - most_current_event)) - ? event - /* Use the translated event that - was most recently seen. This way, - last-command-event becomes f1 - instead of the P from ESC O P. - But must copy it, else we'll lose - when the command-builder events - are deallocated. */ - : Fcopy_event (command_builder-> - most_current_event, Qnil)); + execute_command_event + (command_builder, + !NILP (Fequal (event, command_builder-> most_current_event)) + ? event + /* Use the translated event that was most recently seen. + This way, last-command-event becomes f1 instead of + the P from ESC O P. But we must copy it, else we'll + lose when the command-builder events are deallocated. */ + : Fcopy_event (command_builder-> most_current_event, Qnil)); } break; } @@ -4207,7 +4205,7 @@ DEFVAR_LISP ("last-command-char", &Vlast_command_char /* If the value of `last-command-event' is a keyboard event, then -this is the nearest ASCII equivalent to it. This the the value that +this is the nearest ASCII equivalent to it. This is the value that `self-insert-command' will put in the buffer. Remember that there is NOT a 1:1 mapping between keyboard events and ASCII characters: the set of keyboard events is much larger, so writing code that examines this @@ -4333,6 +4331,7 @@ Vdribble_file = Qnil; staticpro (&Vdribble_file); + #ifdef DEBUG_XEMACS DEFVAR_INT ("debug-emacs-events", &debug_emacs_events /* If non-zero, display debug information about Emacs events that XEmacs sees.
--- a/src/events.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/events.c Mon Aug 13 08:46:35 2007 +0200 @@ -416,7 +416,7 @@ You will lose. It is not necessary to call this function, as event objects are garbage-collected like all other objects; however, it may be more efficient to explicitly deallocate events when you are sure -that that is safe. +that it is safe to do so. */ ) (event) Lisp_Object event; @@ -713,11 +713,11 @@ else if (c == ' ') k = QKspace; - event->event_type = key_press_event; - event->timestamp = 0; /* #### */ - event->channel = make_console (con); - event->event.key.keysym = (!NILP (k) ? k : make_char (c)); - event->event.key.modifiers = m; + event->event_type = key_press_event; + event->timestamp = 0; /* #### */ + event->channel = make_console (con); + event->event.key.keysym = (!NILP (k) ? k : make_char (c)); + event->event.key.modifiers = m; } @@ -824,32 +824,32 @@ DEFUN ("character-to-event", Fcharacter_to_event, Scharacter_to_event, 1, 4, 0 /* -Converts a keystroke specifier intoto an event structure, replete with +Converts a keystroke specifier into an event structure, replete with bucky bits. The keystroke is the first argument, and the event to fill in is the second. This function contains knowledge about what the codes ``mean'' -- for example, the number 9 is converted to the character ``Tab'', not the distinct character ``Control-I''. Note that CH (the keystroke specifier) can be an integer, a character, - a symbol such as 'clear, or a list such as '(control backspace). +a symbol such as 'clear, or a list such as '(control backspace). -If the optional second argument is an event, it is modified; otherwise, a - new event object is created. +If the optional second argument is an event, it is modified; +otherwise, a new event object is created. -Optional third arg CONSOLE is the console to store in the event, and defaults - to the selected console. +Optional third arg CONSOLE is the console to store in the event, and +defaults to the selected console. If CH is an integer or character, the high bit may be interpreted as the - meta key. (This is done for backward compatibility in lots of places.) - If USE-CONSOLE-META-FLAG is nil, this will always be the case. If - USE-CONSOLE-META-FLAG is non-nil, the `meta' flag for CONSOLE affects - whether the high bit is interpreted as a meta key. (See `set-input-mode'.) - If you don't want this silly meta interpretation done, you should pass - in a list containing the character. +meta key. (This is done for backward compatibility in lots of places.) +If USE-CONSOLE-META-FLAG is nil, this will always be the case. If +USE-CONSOLE-META-FLAG is non-nil, the `meta' flag for CONSOLE affects +whether the high bit is interpreted as a meta key. (See `set-input-mode'.) +If you don't want this silly meta interpretation done, you should pass +in a list containing the character. Beware that character-to-event and event-to-character are not strictly - inverse functions, since events contain much more information than the - ASCII character set can encode. +inverse functions, since events contain much more information than the +ASCII character set can encode. */ ) (ch, event, console, use_console_meta_flag) Lisp_Object ch, event, console, use_console_meta_flag;
--- a/src/events.h Mon Aug 13 08:45:53 2007 +0200 +++ b/src/events.h Mon Aug 13 08:46:35 2007 +0200 @@ -27,14 +27,14 @@ #include "systime.h" -/* There is one object, called an event_stream. This object contains - callback functions for doing the window-system dependent operations that - XEmacs requires. +/* There is one object called an event_stream. This object contains + callback functions for doing the window-system-dependent operations + that XEmacs requires. If XEmacs is compiled with support for X11 and the X Toolkit, then this event_stream structure will contain functions that can cope with input on XEmacs windows on multiple displays, as well as input from dumb tty - frames. + frames. If it is desired to have XEmacs able to open frames on the displays of multiple heterogeneous machines, X11 and SunView, or X11 and NeXT, for @@ -52,7 +52,7 @@ The slots of the event_stream structure: - next_event_cb A function which fills in an XEmacs_event struture + next_event_cb A function which fills in an XEmacs_event structure with the next event available. If there is no event available, then this should block. @@ -174,7 +174,7 @@ If this is an integer, it will be in the printing ASCII range: >32 and <127. modifiers Bucky-bits on that key: control, meta, etc. - For most keys, Shift is not a bit; that is implicit + For many keys, Shift is not a bit; that is implicit in the keyboard layout. button_press_event @@ -462,7 +462,7 @@ Lisp_Object event_chain_nth (Lisp_Object event_chain, int n); Lisp_Object copy_event_chain (Lisp_Object event_chain); -/* True is this is a non-internal event +/* True if this is a non-internal event (keyboard press, menu, scrollbar, mouse button) */ int command_event_p (Lisp_Object event); @@ -471,9 +471,9 @@ int event_stream_event_pending_p (int user); void event_stream_next_event (struct Lisp_Event *event); void event_stream_handle_magic_event (struct Lisp_Event *event); -void event_stream_select_console (struct console *c); +void event_stream_select_console (struct console *c); void event_stream_unselect_console (struct console *c); -void event_stream_select_process (struct Lisp_Process *proc); +void event_stream_select_process (struct Lisp_Process *proc); void event_stream_unselect_process (struct Lisp_Process *proc); void event_stream_quit_p (void); @@ -523,9 +523,9 @@ extern int fake_event_occurred; -int event_stream_unixoid_select_console (struct console *con); +int event_stream_unixoid_select_console (struct console *con); int event_stream_unixoid_unselect_console (struct console *con); -int event_stream_unixoid_select_process (struct Lisp_Process *proc); +int event_stream_unixoid_select_process (struct Lisp_Process *proc); int event_stream_unixoid_unselect_process (struct Lisp_Process *proc); int read_event_from_tty_or_stream_desc (struct Lisp_Event *event, struct console *c, int fd);
--- a/src/extents.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/extents.c Mon Aug 13 08:46:35 2007 +0200 @@ -975,7 +975,7 @@ the stack of extents, it might not be there. If you need it to be there, use the _force version. - Similarly, a string may or may not have an extent_info struture. + Similarly, a string may or may not have an extent_info structure. (Generally it won't if there haven't been any extents added to the string.) So use the _force version if you need the extent_info structure to be there. */ @@ -6129,7 +6129,7 @@ /* Note: in some cases when the property itself is 'start-open or 'end-closed, the checks to set the openness may do a bit of extra work; but it won't hurt because we then fix up the - openness later in in put_text_prop_openness_mapper(). */ + openness later on in put_text_prop_openness_mapper(). */ if (!EQ (Fextent_property (extent, Qtext_prop, Qnil), closure->prop)) /* It's not for this property; do nothing. */ return 0; @@ -6171,7 +6171,7 @@ /* Even if we're adding a prop, at this point, we want all other extents of this prop to go away (as now they overlap). So the theory here is that, when we are adding a prop to a region that has multiple (disjoint) - occurences of that prop in it already, we pick one of those and extend + occurrences of that prop in it already, we pick one of those and extend it, and remove the others. */
--- a/src/faces.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/faces.c Mon Aug 13 08:46:35 2007 +0200 @@ -1795,28 +1795,22 @@ fold = XFACE (old_face); fnew = XFACE (new_face); - Fcopy_specifier (fold->foreground, fnew->foreground, locale, - tag_set, exact_p, how_to_add); - Fcopy_specifier (fold->background, fnew->background, locale, - tag_set, exact_p, how_to_add); - Fcopy_specifier (fold->font, fnew->font, locale, - tag_set, exact_p, how_to_add); - Fcopy_specifier (fold->display_table, fnew->display_table, locale, - tag_set, exact_p, how_to_add); - Fcopy_specifier (fold->background_pixmap, fnew->background_pixmap, - locale, tag_set, exact_p, how_to_add); - Fcopy_specifier (fold->underline, fnew->underline, locale, - tag_set, exact_p, how_to_add); - Fcopy_specifier (fold->strikethru, fnew->strikethru, locale, - tag_set, exact_p, how_to_add); - Fcopy_specifier (fold->highlight, fnew->highlight, locale, - tag_set, exact_p, how_to_add); - Fcopy_specifier (fold->dim, fnew->dim, locale, - tag_set, exact_p, how_to_add); - Fcopy_specifier (fold->blinking, fnew->blinking, locale, - tag_set, exact_p, how_to_add); - Fcopy_specifier (fold->reverse, fnew->reverse, locale, - tag_set, exact_p, how_to_add); +#define COPY_PROPERTY(property) \ + Fcopy_specifier (fold->property, fnew->property, \ + locale, tag_set, exact_p, how_to_add); + + COPY_PROPERTY (foreground); + COPY_PROPERTY (background); + COPY_PROPERTY (font); + COPY_PROPERTY (display_table); + COPY_PROPERTY (background_pixmap); + COPY_PROPERTY (underline); + COPY_PROPERTY (strikethru); + COPY_PROPERTY (highlight); + COPY_PROPERTY (dim); + COPY_PROPERTY (blinking); + COPY_PROPERTY (reverse); +#undef COPY_PROPERTY /* #### should it copy the individual specifiers, if they exist? */ fnew->plist = Fcopy_sequence (fold->plist);
--- a/src/fileio.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/fileio.c Mon Aug 13 08:46:35 2007 +0200 @@ -33,6 +33,9 @@ #include "sysdep.h" #include "window.h" /* minibuf_level */ +#ifdef HAVE_LIBGEN_H /* Must come before sysfile.h */ +#include <libgen.h> +#endif #include "sysfile.h" #include "sysproc.h" #include "syspwd.h" @@ -46,10 +49,6 @@ #endif #endif -#ifdef HAVE_LIBGEN_H -#include <libgen.h> -#endif - /* Nonzero during writing of auto-save files */ static int auto_saving; @@ -2908,7 +2907,9 @@ Lisp_Object Qfind_buffer_file_type; #endif /* DOS_NT */ -#define READ_BUF_SIZE (2 << 16) +/* Stack sizes > 2**16 is a good way to elicit compiler bugs */ +/* #define READ_BUF_SIZE (2 << 16) */ +#define READ_BUF_SIZE (1 << 15) DEFUN ("insert-file-contents-internal", Finsert_file_contents_internal, Sinsert_file_contents_internal, 1, 5, 0 /*
--- a/src/filelock.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/filelock.c Mon Aug 13 08:46:35 2007 +0200 @@ -406,8 +406,7 @@ } -DEFUN ("lock-buffer", Flock_buffer, Slock_buffer, - 0, 1, 0 /* +DEFUN ("lock-buffer", Flock_buffer, Slock_buffer, 0, 1, 0 /* Lock FILE, if current buffer is modified. FILE defaults to current buffer's visited file, or else nothing is done if current buffer isn't visiting a file. @@ -425,8 +424,7 @@ return Qnil; } -DEFUN ("unlock-buffer", Funlock_buffer, Sunlock_buffer, - 0, 0, 0 /* +DEFUN ("unlock-buffer", Funlock_buffer, Sunlock_buffer, 0, 0, 0 /* Unlock the file visited in the current buffer, if it should normally be locked. */ )
--- a/src/fns.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/fns.c Mon Aug 13 08:46:35 2007 +0200 @@ -3136,8 +3136,8 @@ DEFUN ("featurep", Ffeaturep, Sfeaturep, 1, 1, 0 /* Return t if FEATURE is present in this Emacs. -Use this to conditionalize execution of lisp code based on the presence or -absence of emacs or environment extensions. +Use this to conditionalize execution of lisp code based on the +presence or absence of emacs or environment extensions. Use `provide' to declare that a feature is available. This function looks at the value of the variable `features'. */ ) @@ -3152,6 +3152,7 @@ DEFUN ("provide", Fprovide, Sprovide, 1, 1, 0 /* Announce that FEATURE is a feature of the current Emacs. +This function updates the value of the variable `features'. */ ) (feature) Lisp_Object feature;
--- a/src/font-lock.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/font-lock.c Mon Aug 13 08:46:35 2007 +0200 @@ -443,7 +443,7 @@ a) If you move past the start of defun, you will have to recompute defun, which in this case means that start of defun goes all the way back - to the beginning of the the file; so you want + to the beginning of the file; so you want to set start of defun a ways back from the current point. b) If you move a line backwards but within start of
--- a/src/frame-x.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/frame-x.c Mon Aug 13 08:46:35 2007 +0200 @@ -491,7 +491,7 @@ { /* Naturally those bastards who wrote Xt couldn't be bothered to learn about race conditions and such. We can't trust - the X and Y values to have any resemblance of correctness, + the X and Y values to have any semblance of correctness, so we smash the right values in place. */ /* We might be called before we've actually realized the window (if @@ -509,12 +509,12 @@ EmacsFrame w = (EmacsFrame) FRAME_X_TEXT_WIDGET (f); Widget gw = (Widget) w; -#define FROB(propprop, value) \ -do { \ - if (EQ (property, propprop)) \ - { \ - return (value); \ - } \ +#define FROB(propprop, value) \ +do { \ + if (EQ (property, propprop)) \ + { \ + return (value); \ + } \ } while (0) if (EQ (property, Qleft) || EQ (property, Qtop)) @@ -573,12 +573,12 @@ EmacsFrame w = (EmacsFrame) FRAME_X_TEXT_WIDGET (f); Widget gw = (Widget) w; -#define FROB(propprop, value) \ -do { \ - Lisp_Object temtem = (value); \ - if (!NILP (temtem)) \ - /* backwards order; we reverse it below */ \ - result = Fcons (temtem, Fcons (propprop, result)); \ +#define FROB(propprop, value) \ +do { \ + Lisp_Object temtem = (value); \ + if (!NILP (temtem)) \ + /* backwards order; we reverse it below */ \ + result = Fcons (temtem, Fcons (propprop, result)); \ } while (0) x_smash_bastardly_shell_position (shell); @@ -608,40 +608,40 @@ /* Functions called only from `x_set_frame_properties' to set -** individual properties. */ + individual properties. */ -static void -x_set_title_from_char (struct frame *f, char *name) +static void +x_set_frame_text_value (struct frame *f, Bufbyte *value, + String Xt_resource_name, + String Xt_resource_encoding_name) { - CONST char *old_name = 0; - CONST char *new_name; - Arg av[1]; + Atom encoding = XA_STRING; + String new_XtValue = (String) value; + String old_XtValue; + Bufbyte *ptr; + Arg av[2]; - GET_C_CHARPTR_EXT_CTEXT_DATA_ALLOCA (name, new_name); - XtSetArg (av[0], XtNtitle, &old_name); + /* ### Caching is device-independent - belongs in update_frame_title. */ + XtSetArg (av[0], Xt_resource_name, &old_XtValue); XtGetValues (FRAME_X_SHELL_WIDGET (f), av, 1); - if (!old_name || strcmp (new_name, old_name)) + if (!old_XtValue || strcmp (new_XtValue, old_XtValue)) { - XtSetArg (av[0], XtNtitle, new_name); - XtSetValues (FRAME_X_SHELL_WIDGET (f), av, 1); + XtSetArg (av[0], Xt_resource_name, new_XtValue); + XtSetArg (av[1], Xt_resource_encoding_name, encoding); + XtSetValues (FRAME_X_SHELL_WIDGET (f), av, 2); } } -static void -x_set_icon_name_from_char (struct frame *f, char *name) +static void +x_set_title_from_bufbyte (struct frame *f, Bufbyte *name) { - CONST char *old_name = 0; - CONST char *new_name; - Arg av[1]; + x_set_frame_text_value (f, name, XtNtitle, XtNtitleEncoding); +} - GET_C_CHARPTR_EXT_CTEXT_DATA_ALLOCA (name, new_name); - XtSetArg (av[0], XtNiconName, &old_name); - XtGetValues (FRAME_X_SHELL_WIDGET (f), av, 1); - if (!old_name || strcmp (new_name, old_name)) - { - XtSetArg (av[0], XtNiconName, new_name); - XtSetValues (FRAME_X_SHELL_WIDGET (f), av, 1); - } +static void +x_set_icon_name_from_bufbyte (struct frame *f, Bufbyte *name) +{ + x_set_frame_text_value (f, name, XtNiconName, XtNiconNameEncoding); } /* Set the initial frame size as specified. This function is used @@ -941,7 +941,7 @@ x_cde_transfer_callback (Widget widget, XtPointer clientData, XtPointer callData) { - char *filePath; + char *filePath, *buf, *data; int ii; Lisp_Object path = Qnil; Lisp_Object frame = Qnil; @@ -965,12 +965,70 @@ va_run_hook_with_args (Qdrag_and_drop_functions, 2, frame, path); } } - + else if (transferInfo->dropData->protocol == DtDND_BUFFER_TRANSFER) + { + for (ii = 0; ii < transferInfo->dropData->numItems; ii++) + { + filePath = transferInfo->dropData->data.buffers[ii].name; + path = (filePath != NULL) ? + make_string (filePath, strlen (filePath)) : Qnil; + buf = transferInfo->dropData->data.buffers[ii].bp; + data = make_string (buf, transferInfo->dropData->data.buffers[ii].size); + va_run_hook_with_args(Qdrag_and_drop_functions, 3, frame, path, data); + } + } + UNGCPRO; return; } #endif +#ifdef HAVE_OFFIX_DND +#include <OffiX/DragAndDrop.h> + +void +x_offix_drop_event_handler (Widget widget, XtPointer data, XEvent *event, + Boolean *b) +{ + int i, len, Type; + unsigned char *Data; + unsigned long Size; + + Lisp_Object path = Qnil; + Lisp_Object frame = Qnil; + + struct gcpro gcpro1, gcpro2; + + Type = DndDataType (event); + if ((Type != DndFile) && (Type != DndFiles) && (Type != DndExe)) + return; + DndGetData (&Data, &Size); + + GCPRO2 (path, frame); + + frame = make_frame ((struct frame *) data); + + if (Type == DndFiles) + { + while (*Data) + { + len = strlen ((char*) Data); + path = make_string ((char*) Data, len); + va_run_hook_with_args (Qdrag_and_drop_functions, 2, frame, path); + Data += len+1; + } + } + else + { + path = make_string ((char*) Data, strlen (Data)); + va_run_hook_with_args (Qdrag_and_drop_functions, 2, frame, path); + } + + UNGCPRO; + return; +} +#endif /* HAVE_OFFIX_DND */ + /************************************************************************/ /* widget creation */ @@ -1470,8 +1528,8 @@ #endif { XtSetArg (av[ac], XtNinput, True); ac++; - XtSetArg (av[ac], XtNminWidthCells, 10); ac++; - XtSetArg (av[ac], XtNminHeightCells, 1); ac++; + XtSetArg (av[ac], (String) XtNminWidthCells, 10); ac++; + XtSetArg (av[ac], (String) XtNminHeightCells, 1); ac++; } if (!NILP (parent)) @@ -1507,7 +1565,7 @@ /* Create the text area */ ac = 0; XtSetArg (av[ac], XtNborderWidth, 0); ac++; /* should this be settable? */ - XtSetArg (av[ac], XtNemacsFrame, f); ac++; + XtSetArg (av[ac], (String) XtNemacsFrame, f); ac++; text = XtCreateWidget (name, emacsFrameClass, container, av, ac); @@ -1631,14 +1689,24 @@ dnd_transfer_cb_rec[1].closure = NULL; DtDndVaDropRegister (FRAME_X_TEXT_WIDGET (f), - DtDND_FILENAME_TRANSFER, - XmDROP_COPY, - dnd_transfer_cb_rec, + DtDND_FILENAME_TRANSFER | DtDND_BUFFER_TRANSFER, + XmDROP_COPY, dnd_transfer_cb_rec, + DtNtextIsBuffer, True, DtNpreserveRegistration, False, NULL); } #endif +#ifdef HAVE_OFFIX_DND + { + DndInitialize (FRAME_X_SHELL_WIDGET (f)); + DndRegisterDropWidget (FRAME_X_TEXT_WIDGET (f), + x_offix_drop_event_handler, + (XtPointer) f); + + } +#endif + /* Do a stupid property change to force the server to generate a propertyNotify event so that the event_stream server timestamp will be initialized to something relevant to the time we created the window. @@ -1854,7 +1922,7 @@ doesn't put the frame where you expect it to: i.e. it's closer to the lower-right corner than -) it should be, and it appears that the size of + it should be, and it appears that the size of the WM decorations was not taken into account. This is *not* a problem with this function. Both mwm and twm have bugs in handling this @@ -2223,8 +2291,8 @@ CONSOLE_HAS_METHOD (x, internal_frame_property_p); CONSOLE_HAS_METHOD (x, frame_properties); CONSOLE_HAS_METHOD (x, set_frame_properties); - CONSOLE_HAS_METHOD (x, set_title_from_char); - CONSOLE_HAS_METHOD (x, set_icon_name_from_char); + CONSOLE_HAS_METHOD (x, set_title_from_bufbyte); + CONSOLE_HAS_METHOD (x, set_icon_name_from_bufbyte); CONSOLE_HAS_METHOD (x, frame_visible_p); CONSOLE_HAS_METHOD (x, frame_totally_visible_p); CONSOLE_HAS_METHOD (x, frame_iconified_p);
--- a/src/frame.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/frame.c Mon Aug 13 08:46:35 2007 +0200 @@ -22,7 +22,7 @@ /* Synched up with: FSF 19.30. */ -/* This file has been Mule-ized except for the frame-title stuff. */ +/* This file has been Mule-ized. */ #include <config.h> #include "lisp.h" @@ -54,7 +54,7 @@ Lisp_Object Vmap_frame_hook, Qmap_frame_hook; Lisp_Object Vunmap_frame_hook, Qunmap_frame_hook; Lisp_Object Vallow_deletion_of_last_visible_frame; -#ifdef HAVE_CDE +#if defined (HAVE_CDE) || defined (HAVE_OFFIX_DND) Lisp_Object Vdrag_and_drop_functions, Qdrag_and_drop_functions; #endif Lisp_Object Vmouse_motion_handler; @@ -95,8 +95,8 @@ Lisp_Object Qframe_x_p, Qframe_tty_p; Lisp_Object Qdelete_frame; -Lisp_Object Vframe_title_format; -Lisp_Object Vframe_icon_title_format; +Lisp_Object Qframe_title_format, Vframe_title_format; +Lisp_Object Qframe_icon_title_format, Vframe_icon_title_format; Lisp_Object Vdefault_frame_name; Lisp_Object Vdefault_frame_plist; @@ -1144,7 +1144,7 @@ on the FRAME's console. Otherwise, all frames are considered. */ ) (frame, frametype, console) - Lisp_Object frame, frametype, console; + Lisp_Object frame, frametype, console; { XSETFRAME (frame, decode_frame (frame)); @@ -1306,7 +1306,7 @@ minibuffer_selected = EQ (minibuf_window, Fselected_window (Qnil)); - /* If we were focussed on this frame, then we're not any more. + /* If we were focused on this frame, then we're not any more. Assume that we lost the focus; that way, the call to Fselect_frame() below won't end up making us explicitly focus on another frame, which is generally undesirable in @@ -1384,7 +1384,7 @@ Fselect_window (minibuf_window); } - /* Before here, we haven't made any dangerous changed (just checked for + /* Before here, we haven't made any dangerous changes (just checked for error conditions). Now run the delete-frame-hook. Remember that user code there could do any number of dangerous things, including signalling an error. @@ -1468,7 +1468,7 @@ another one. */ if (EQ (frame, CONSOLE_LAST_NONMINIBUF_FRAME (con))) { - Lisp_Object frmcons, devcons, concons; + Lisp_Object frmcons, devcons; set_console_last_nonminibuf_frame (con, Qnil); @@ -1571,8 +1571,8 @@ second argument FORCE is non-nil, you can delete the last frame. (This will automatically call `save-buffers-kill-emacs'.) */ ) - (frame, force) - Lisp_Object frame, force; + (frame, force) + Lisp_Object frame, force; { /* This function can GC */ struct frame *f; @@ -1623,14 +1623,16 @@ y = XINT (XCDR (XCDR (val))); f = XFRAME (w->frame); - if (x >= 0 && y >= 0 && - pixel_to_glyph_translation (f, x, y, &x, &y, &obj_x, &obj_y, &w, - &bufpos, &closest, &modeline_closest, - &obj1, &obj2) - != OVER_NOTHING) + if (x >= 0 && y >= 0) { - XCAR (XCDR (val)) = make_int (x); - XCDR (XCDR (val)) = make_int (y); + if (pixel_to_glyph_translation (f, x, y, &x, &y, &obj_x, &obj_y, &w, + &bufpos, &closest, &modeline_closest, + &obj1, &obj2) + != OVER_NOTHING) + { + XCAR (XCDR (val)) = make_int (x); + XCDR (XCDR (val)) = make_int (y); + } } else { @@ -1676,8 +1678,8 @@ or Emacs hasn't been programmed to read its mouse position, it returns the device's selected window for WINDOW and nil for X and Y. */ ) - (device) - Lisp_Object device; + (device) + Lisp_Object device; { struct device *d = decode_device (device); Lisp_Object frame; @@ -1726,8 +1728,8 @@ defaults to the selected device. If the mouse position can't be determined (e.g. DEVICE is a TTY device), nil is returned instead of an event. */ ) - (device) - Lisp_Object device; + (device) + Lisp_Object device; { struct device *d = decode_device (device); Lisp_Object frame; @@ -1755,8 +1757,8 @@ Note also: Warping the mouse is contrary to the ICCCM, so be very sure that the behavior won't end up being obnoxious! */ ) - (window, x, y) - Lisp_Object window, x, y; + (window, x, y) + Lisp_Object window, x, y; { struct window *w; int pix_x, pix_y; @@ -1782,8 +1784,8 @@ before calling this function on it, like this. (while (not (frame-visible-p frame)) (sleep-for .5)) */ ) - (window, x, y) - Lisp_Object window, x, y; + (window, x, y) + Lisp_Object window, x, y; { struct window *w; @@ -1804,8 +1806,8 @@ If omitted, FRAME defaults to the currently selected frame. Also raises the frame so that nothing obscures it. */ ) - (frame) - Lisp_Object frame; + (frame) + Lisp_Object frame; { struct frame *f = decode_frame (frame); @@ -1855,7 +1857,7 @@ If omitted, FRAME defaults to the currently selected frame. */ ) (frame) - Lisp_Object frame; + Lisp_Object frame; { struct frame *f, *sel_frame; struct device *d; @@ -1885,7 +1887,7 @@ Also raises the frame so that nothing obscures it. */ ) (frame) - Lisp_Object frame; + Lisp_Object frame; { return Fmake_frame_visible (frame); } @@ -1912,7 +1914,7 @@ Always returns t for tty frames. */ ) (frame) - Lisp_Object frame; + Lisp_Object frame; { struct frame *f = decode_frame (frame); return (FRAMEMETH_OR_GIVEN (f, frame_totally_visible_p, (f), f->visible) @@ -1943,7 +1945,7 @@ If DEVICE is specified only frames on that device will be returned. */ ) (device) - Lisp_Object device; + Lisp_Object device; { Lisp_Object devcons, concons; struct frame *f; @@ -1981,7 +1983,7 @@ doesn't support multiple overlapping frames, this function does nothing. */ ) (frame) - Lisp_Object frame; + Lisp_Object frame; { struct frame *f = decode_frame (frame); @@ -2143,8 +2145,8 @@ The following symbols etc. have predefined meanings: - name Name of the frame, used for resourcing. Unchangeable - after creation. + name Name of the frame, used with X resources. + Unchangeable after creation. height Height of the frame, in lines. @@ -2186,7 +2188,7 @@ etc. [Giving a vector of a face and a property is equivalent to calling `set-face-property' on the face and property, - with a local of FRAME. Giving the vector to + with a locale of FRAME. Giving the vector to `frame-property' calls `face-property-instance' on the face and property.] @@ -2200,7 +2202,7 @@ frames. */ ) (frame, plist) - Lisp_Object frame, plist; + Lisp_Object frame, plist; { struct frame *f = decode_frame (frame); Lisp_Object tail; @@ -2219,8 +2221,6 @@ prop = get_property_alias (prop); - if (EQ (prop, Qminibuffer)) - store_minibuf_frame_prop (f, val); #if 0 /* mly wants this, but it's not reasonable to change the name of a frame after it has been created, because the old name was used @@ -2300,24 +2300,22 @@ property = get_property_alias (property); -#define FROB(propprop, value) \ -do { \ - if (EQ (property, propprop)) \ - { \ - return (value); \ - } \ +#define FROB(propprop, value) \ +do { \ + if (EQ (property, propprop)) \ + return (value); \ } while (0) FROB (Qname, f->name); FROB (Qheight, make_int (FRAME_HEIGHT (f))); - FROB (Qwidth, make_int (FRAME_WIDTH (f))); + FROB (Qwidth, make_int (FRAME_WIDTH (f))); /* NOTE: FSF returns Qnil instead of Qt for FRAME_HAS_MINIBUF_P. This is over-the-top bogosity, because it's inconsistent with the semantics of `minibuffer' when passed to `make-frame'. Returning Qt makes things consistent. */ - FROB (Qminibuffer, (! FRAME_HAS_MINIBUF_P (f) ? Qt - : FRAME_MINIBUF_ONLY_P (f) ? Qonly - : FRAME_MINIBUF_WINDOW (f))); + FROB (Qminibuffer, (FRAME_HAS_MINIBUF_P (f) ? Qt : + FRAME_MINIBUF_ONLY_P (f) ? Qonly : + FRAME_MINIBUF_WINDOW (f))); FROB (Qunsplittable, FRAME_NO_SPLIT_P (f) ? Qt : Qnil); FROB (Qbuffer_predicate, f->buffer_predicate); @@ -2369,24 +2367,24 @@ GCPRO1 (result); -#define FROB(propprop, value) \ -do { \ - Lisp_Object temtem = (value); \ - if (!NILP (temtem)) \ - /* backwards order; we reverse it below */ \ - result = Fcons (temtem, Fcons (propprop, result)); \ +#define FROB(propprop, value) \ +do { \ + Lisp_Object temtem = (value); \ + if (!NILP (temtem)) \ + /* backwards order; we reverse it below */ \ + result = Fcons (temtem, Fcons (propprop, result)); \ } while (0) FROB (Qname, f->name); FROB (Qheight, make_int (FRAME_HEIGHT (f))); - FROB (Qwidth, make_int (FRAME_WIDTH (f))); + FROB (Qwidth, make_int (FRAME_WIDTH (f))); /* NOTE: FSF returns Qnil instead of Qt for FRAME_HAS_MINIBUF_P. This is over-the-top bogosity, because it's inconsistent with the semantics of `minibuffer' when passed to `make-frame'. Returning Qt makes things consistent. */ - FROB (Qminibuffer, (! FRAME_HAS_MINIBUF_P (f) ? Qt - : FRAME_MINIBUF_ONLY_P (f) ? Qonly - : FRAME_MINIBUF_WINDOW (f))); + FROB (Qminibuffer, (FRAME_HAS_MINIBUF_P (f) ? Qt : + FRAME_MINIBUF_ONLY_P (f) ? Qonly : + FRAME_MINIBUF_WINDOW (f))); FROB (Qunsplittable, FRAME_NO_SPLIT_P (f) ? Qt : Qnil); FROB (Qbuffer_predicate, f->buffer_predicate); @@ -2414,7 +2412,7 @@ Return the height in pixels of FRAME. */ ) (frame) - Lisp_Object frame; + Lisp_Object frame; { struct frame *f = decode_frame (frame); return (make_int (f->pixheight)); @@ -2424,7 +2422,7 @@ Return the width in pixels of FRAME. */ ) (frame) - Lisp_Object frame; + Lisp_Object frame; { struct frame *f = decode_frame (frame); return (make_int (f->pixwidth)); @@ -2434,8 +2432,8 @@ Return the name of FRAME (defaulting to the selected frame). This is not the same as the `title' of the frame. */ ) - (frame) - Lisp_Object frame; + (frame) + Lisp_Object frame; { return (decode_frame (frame)->name); } @@ -2450,8 +2448,8 @@ anything else interesting has happened. It wraps around occasionally. No argument or nil as argument means use selected frame as FRAME. */ ) - (frame) - Lisp_Object frame; + (frame) + Lisp_Object frame; { return make_int (decode_frame (frame)->modiff); } @@ -2471,7 +2469,7 @@ but that the idea of the actual height of the frame should not be changed. */ ) (frame, rows, pretend) - Lisp_Object frame, rows, pretend; + Lisp_Object frame, rows, pretend; { struct frame *f = decode_frame (frame); XSETFRAME (frame, f); @@ -2488,7 +2486,7 @@ but that the idea of the actual width of the frame should not be changed. */ ) (frame, cols, pretend) - Lisp_Object frame, cols, pretend; + Lisp_Object frame, cols, pretend; { struct frame *f = decode_frame (frame); XSETFRAME (frame, f); @@ -2506,7 +2504,7 @@ but that the idea of the actual size of the frame should not be changed. */ ) (frame, cols, rows, pretend) - Lisp_Object frame, cols, rows, pretend; + Lisp_Object frame, cols, rows, pretend; { struct frame *f = decode_frame (frame); XSETFRAME (frame, f); @@ -2525,7 +2523,7 @@ the rightmost or bottommost possible position (that stays within the screen). */ ) (frame, xoffset, yoffset) - Lisp_Object frame, xoffset, yoffset; + Lisp_Object frame, xoffset, yoffset; { struct frame *f = decode_frame (frame); CHECK_INT (xoffset); @@ -2774,7 +2772,7 @@ struct window *w = XWINDOW (FRAME_SELECTED_WINDOW (f)); Lisp_Object title_format; Lisp_Object icon_format; - char *frame_title_string = 0; + Bufbyte *title; /* We don't change the title for the minibuffer unless the frame only has a minibuffer. */ @@ -2782,38 +2780,35 @@ return; /* And we don't want dead buffers to blow up on us. */ - else if (!BUFFER_LIVE_P (XBUFFER (w->buffer))) + if (!BUFFER_LIVE_P (XBUFFER (w->buffer))) return; - title_format = Vframe_title_format; - icon_format = Vframe_icon_title_format; - - if (HAS_FRAMEMETH_P (f, set_title_from_char)) - { - frame_title_string = - generate_formatted_string (w, title_format, Qnil, DEFAULT_INDEX, - CURRENT_DISP); - FRAMEMETH (f, set_title_from_char, (f, frame_title_string)); - } - - if (HAS_FRAMEMETH_P (f, set_icon_name_from_char)) + title = NULL; + title_format = symbol_value_in_buffer (Qframe_title_format, w->buffer); + icon_format = symbol_value_in_buffer (Qframe_icon_title_format, w->buffer); + + if (HAS_FRAMEMETH_P (f, set_title_from_bufbyte)) { - if (!EQ (icon_format, title_format) || - !HAS_FRAMEMETH_P (f, set_title_from_char)) + title = generate_formatted_string (w, title_format, Qnil, + DEFAULT_INDEX, CURRENT_DISP); + FRAMEMETH (f, set_title_from_bufbyte, (f, title)); + } + + if (HAS_FRAMEMETH_P (f, set_icon_name_from_bufbyte)) + { + if (!EQ (icon_format, title_format) || !title) { - if (frame_title_string) - xfree (frame_title_string); - - frame_title_string = - generate_formatted_string (w, icon_format, Qnil, DEFAULT_INDEX, - CURRENT_DISP); + if (title) + xfree (title); + + title = generate_formatted_string (w, icon_format, Qnil, + DEFAULT_INDEX, CURRENT_DISP); } - - FRAMEMETH (f, set_icon_name_from_char, (f, frame_title_string)); + FRAMEMETH (f, set_icon_name_from_bufbyte, (f, title)); } - if (frame_title_string) - xfree (frame_title_string); + if (title) + xfree (title); } @@ -2879,7 +2874,7 @@ defsymbol (&Qmouse_leave_frame_hook, "mouse-leave-frame-hook"); defsymbol (&Qmap_frame_hook, "map-frame-hook"); defsymbol (&Qunmap_frame_hook, "unmap-frame-hook"); -#ifdef HAVE_CDE +#if defined (HAVE_CDE) || defined (HAVE_OFFIX_DND) defsymbol (&Qdrag_and_drop_functions, "drag-and-drop-functions"); #endif @@ -2893,6 +2888,9 @@ defsymbol (&Qframe_being_created, "frame-being-created"); defsymbol (&Qmake_initial_minibuffer_frame, "make-initial-minibuffer-frame"); + defsymbol (&Qframe_title_format, "frame-title-format"); + defsymbol (&Qframe_icon_title_format, "frame-icon-title-format"); + defsymbol (&Qvisible, "visible"); defsymbol (&Qiconic, "iconic"); defsymbol (&Qinvisible, "invisible"); @@ -3014,6 +3012,8 @@ DEFVAR_LISP ("delete-frame-hook", &Vdelete_frame_hook /* Function or functions to call when a frame is deleted. One argument, the to-be-deleted frame. +When this hook is called, the selected frame is different from +the to-be-deleted frame, and the hook should not change that. */ ); Vdelete_frame_hook = Qnil; @@ -3057,10 +3057,13 @@ */ ); Vallow_deletion_of_last_visible_frame = Qnil; -#ifdef HAVE_CDE +#if defined (HAVE_CDE) || defined (HAVE_OFFIX_DND) DEFVAR_LISP ("drag-and-drop-functions", &Vdrag_and_drop_functions /* Function or functions to run when an object is dropped on a frame. -Each function is called with two args, a frame and a pathname. +Each function is called with either two or three args. If called with +two args, the args are a frame and a pathname. If with three, the +args are a frame, a pathname (which is may be either a string or nil) +and the textual representation of the dragged object. */ ); Vdrag_and_drop_functions = Qnil; #endif
--- a/src/glyphs-x.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/glyphs-x.c Mon Aug 13 08:46:35 2007 +0200 @@ -1881,12 +1881,11 @@ static void png_read_from_memory(png_structp png_ptr, png_bytep data, png_uint_32 length) { - png_uint_32 check; struct png_memory_storage *tbr = (struct png_memory_storage *) png_get_io_ptr (png_ptr); if (length > (tbr->len - tbr->index)) - png_error(png_ptr, "Read Error"); + png_error (png_ptr, (png_const_charp) "Read Error"); memcpy(data,tbr->bytes + tbr->index,length); tbr->index = tbr->index + length; } @@ -1939,6 +1938,8 @@ return Qnil; } +/* This doesn't appear to be used. */ +#if 0 #define get_png_val(p) _get_png_val (&(p), info_ptr.bit_depth) png_uint_16 _get_png_val (png_byte **pp, int bit_depth) @@ -1952,6 +1953,7 @@ return c; } +#endif static void png_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
--- a/src/gui-x.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/gui-x.c Mon Aug 13 08:46:35 2007 +0200 @@ -358,14 +358,14 @@ /* !!#### This function has not been Mule-ized */ /* This function cannot GC because gc_currently_forbidden is set when it's called */ - Lisp_Object name = Qnil; - Lisp_Object callback = Qnil; - Lisp_Object suffix = Qnil; - Lisp_Object active_p = Qt; - Lisp_Object include_p = Qt; + Lisp_Object name = Qnil; + Lisp_Object callback = Qnil; + Lisp_Object suffix = Qnil; + Lisp_Object active_p = Qt; + Lisp_Object include_p = Qt; Lisp_Object selected_p = Qnil; - Lisp_Object keys = Qnil; - Lisp_Object style = Qnil; + Lisp_Object keys = Qnil; + Lisp_Object style = Qnil; Lisp_Object config_tag = Qnil; int length = vector_length (XVECTOR (desc)); Lisp_Object *contents = vector_data (XVECTOR (desc)); @@ -409,12 +409,12 @@ if (!KEYWORDP (key)) signal_simple_error_2 ("not a keyword", key, desc); - if (EQ (key, Q_active)) active_p = val; - else if (EQ (key, Q_suffix)) suffix = val; - else if (EQ (key, Q_keys)) keys = val; - else if (EQ (key, Q_style)) style = val; + if (EQ (key, Q_active)) active_p = val; + else if (EQ (key, Q_suffix)) suffix = val; + else if (EQ (key, Q_keys)) keys = val; + else if (EQ (key, Q_style)) style = val; else if (EQ (key, Q_selected)) selected_p = val, selected_spec = 1; - else if (EQ (key, Q_included)) include_p = val, included_spec = 1; + else if (EQ (key, Q_included)) include_p = val, included_spec = 1; else if (EQ (key, Q_config)) config_tag = val; else if (EQ (key, Q_filter)) signal_simple_error(":filter keyword not permitted on leaf nodes", desc); @@ -439,7 +439,7 @@ { CONST char *const_bogosity; CHECK_STRING (suffix); - GET_C_STRING_CTEXT_DATA_ALLOCA (suffix, const_bogosity); + GET_C_STRING_FILENAME_DATA_ALLOCA (suffix, const_bogosity); wv->value = (char *) const_bogosity; wv->value = xstrdup (wv->value); }
--- a/src/hpplay.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/hpplay.c Mon Aug 13 08:46:35 2007 +0200 @@ -106,17 +106,31 @@ playParams.priority = APriorityNormal; /* normal priority */ - speaker = (char *) (string_data (XSYMBOL (Vhp_play_speaker)->name)); + /* + * We can't signal an error, because all h*ll would break loose if + * we did. + */ + if (SYMBOLP (Vhp_play_speaker)) + { + speaker = (char *) (string_data (XSYMBOL (Vhp_play_speaker)->name)); - /* - * setup the playback parameters - */ + /* + * setup the playback parameters + */ - /* speaker selection */ - if ( strcmp(speaker,"external") == 0 ) { - gainEntry.u.o.out_dst = AODTMonoJack; - } else { - gainEntry.u.o.out_dst = AODTMonoIntSpeaker; + /* speaker selection */ + if ( strcmp(speaker,"external") == 0 ) { + gainEntry.u.o.out_dst = AODTMonoJack; + } else { + gainEntry.u.o.out_dst = AODTMonoIntSpeaker; + } + } + else + { + /* + * Quietly revert to the internal speaker + */ + gainEntry.u.o.out_dst = AODTMonoIntSpeaker; } gainEntry.u.o.out_ch = AOCTMono;
--- a/src/keymap.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/keymap.c Mon Aug 13 08:46:35 2007 +0200 @@ -484,23 +484,23 @@ } if (modifiers & MOD_META) /* Utterly hateful ESC lossage */ - { - Lisp_Object submap = Fgethash (MAKE_MODIFIER_HASH_KEY (MOD_META), - k->table, Qnil); - if (NILP (submap)) - return (Qnil); - k = XKEYMAP (submap); - modifiers &= ~MOD_META; - } + { + Lisp_Object submap = Fgethash (MAKE_MODIFIER_HASH_KEY (MOD_META), + k->table, Qnil); + if (NILP (submap)) + return (Qnil); + k = XKEYMAP (submap); + modifiers &= ~MOD_META; + } if (modifiers != 0) - { - Lisp_Object submap = Fgethash (MAKE_MODIFIER_HASH_KEY (modifiers), - k->table, Qnil); - if (NILP (submap)) - return (Qnil); - k = XKEYMAP (submap); - } + { + Lisp_Object submap = Fgethash (MAKE_MODIFIER_HASH_KEY (modifiers), + k->table, Qnil); + if (NILP (submap)) + return (Qnil); + k = XKEYMAP (submap); + } return (Fgethash (keysym, k->table, Qnil)); } @@ -518,7 +518,6 @@ /* keys = Fcons (keysym, Qnil); */ Fputhash (value, keys, inverse_table); } - else if (!CONSP (keys)) { /* Now it's necessary to cons */ @@ -1970,17 +1969,16 @@ /************************************************************************/ /* We need a very fast (i.e., non-consing) version of lookup-key in order - to make where-is-internal really fly. - */ + to make where-is-internal really fly. */ struct raw_lookup_key_mapper_closure - { - int remaining; - CONST struct key_data *raw_keys; - int raw_keys_count; - int keys_so_far; - int accept_default; - }; +{ + int remaining; + CONST struct key_data *raw_keys; + int raw_keys_count; + int keys_so_far; + int accept_default; +}; static Lisp_Object raw_lookup_key_mapper (Lisp_Object k, void *); @@ -2191,7 +2189,7 @@ keys = wrong_type_argument (Qsequencep, keys); return Flookup_key (keymap, keys, accept_default); } - else + else /* STRINGP (keys) */ { int length = string_char_length (XSTRING (keys)); int i;
--- a/src/lisp.h Mon Aug 13 08:45:53 2007 +0200 +++ b/src/lisp.h Mon Aug 13 08:46:35 2007 +0200 @@ -649,7 +649,7 @@ /* unsafe! */ #define POINTER_TYPE_P(type) ((type) != Lisp_Int) -/* This should be the underlying type intowhich a Lisp_Object must fit. +/* This should be the underlying type into which a Lisp_Object must fit. In a strict ANSI world, this must be `int', since ANSI says you can't use bitfields on any type other than `int'. However, on a machine where `int' and `long' are not the same size, this should be the @@ -820,7 +820,7 @@ #ifdef LRECORD_STRING struct lrecord_header lheader; #endif - long _size; + Bytecount _size; Bufbyte *_data; Lisp_Object plist; }; @@ -852,8 +852,11 @@ # define charcount_to_bytecount(ptr, len) (len) #define string_length(s) ((s)->_size) +#define XSTRING_length(s) string_length (XSTRING (s)) #define string_data(s) ((s)->_data + 0) +#define XSTRING_data(s) string_data (XSTRING (s)) #define string_byte(s, i) ((s)->_data[i] + 0) +#define XSTRING_byte(s, i) string_byte (XSTRING (s), i) #define string_byte_addr(s, i) (&((s)->_data[i])) #define set_string_length(s, len) do { (s)->_size = (len); } while (0) #define set_string_data(s, ptr) do { (s)->_data = (ptr); } while (0) @@ -876,7 +879,7 @@ #endif long size; /* next is now chained through v->contents[size], terminated by Qzero. - * This means that pure vectors don't need a "next" */ + This means that pure vectors don't need a "next" */ /* struct Lisp_Vector *next; */ Lisp_Object contents[1]; };
--- a/src/lrecord.h Mon Aug 13 08:45:53 2007 +0200 +++ b/src/lrecord.h Mon Aug 13 08:46:35 2007 +0200 @@ -57,65 +57,66 @@ the opaque type. */ struct lrecord_header - { - /* It would be better to put the mark-bit together with the - * following datatype identification field in an 8- or 16-bit integer - * rather than playing funny games with changing header->implementation - * and "wasting" 32 bits on the below pointer. - * The type-id would then be a 7 or 15 - * bit index into a table of lrecord-implementations rather than a - * direct pointer. There would be 24 (or 16) bits left over for - * datatype-specific per-instance flags. - * The below is the simplest thing to do for the present, - * and doesn't incur that much overhead as most Emacs records - * are of such a size that the overhead isn't too bad. - * (The marker datatype is the worst case.) - * It also has the very very very slight advantage that type-checking - * involves one memory read (of the "implementation" slot) and a - * comparison against a link-time constant address rather than a - * read and a comparison against a variable value. (Variable since - * it is a very good idea to assign the indices into the hypothetical - * type-code table dynamically rather that pre-defining them.) - * I think I remember that Elk Lisp does something like this. - * Gee, I wonder if some cretin has patented it? - */ - CONST struct lrecord_implementation *implementation; - }; +{ + /* It would be better to put the mark-bit together with the + following datatype identification field in an 8- or 16-bit + integer rather than playing funny games with changing + header->implementation and "wasting" 32 bits on the below + pointer. The type-id would then be a 7 or 15 bit index into a + table of lrecord-implementations rather than a direct pointer. + There would be 24 (or 16) bits left over for datatype-specific + per-instance flags. + + The below is the simplest thing to do for the present, + and doesn't incur that much overhead as most Emacs records + are of such a size that the overhead isn't too bad. + (The marker datatype is the worst case.) + + It also has the very very very slight advantage that type-checking + involves one memory read (of the "implementation" slot) and a + comparison against a link-time constant address rather than a + read and a comparison against a variable value. (Variable since + it is a very good idea to assign the indices into the hypothetical + type-code table dynamically rather that pre-defining them.) + I think I remember that Elk Lisp does something like this. + Gee, I wonder if some cretin has patented it? */ + CONST struct lrecord_implementation *implementation; +}; #define set_lheader_implementation(header,imp) (header)->implementation=(imp) struct lcrecord_header - { - struct lrecord_header lheader; - /* The "next" field is normally used to chain all lrecords together - * so that the GC can find (and free) all of them. - * "alloc_lcrecord" threads records together. - * The "next" field may be used for other purposes as long as some - * other mechanism is provided for letting the GC do its work. - * (For example, the event and marker datatypes allocates members out - * of memory chunks, and it are able to find all unmarked - * events by sweeping through the elements of the list of chunks) - */ - struct lcrecord_header *next; - /* This is just for debugging/printing convenience. - Having this slot doesn't hurt us much spacewise, since an lcrecord - already has the above slots together with malloc overhead. */ - int uid :31; - /* A flag that indicates whether this lcrecord is on a "free list". - Free lists are used to minimize the number of calls to malloc() - when we're repeatedly allocating and freeing a number of the - same sort of lcrecord. Lcrecords on a free list always get - marked in a different fashion, so we can use this flag as a - sanity check to make sure that free lists only have freed lcrecords - and no freed lcrecords are elsewhere. */ - int free :1; - }; +{ + struct lrecord_header lheader; + /* The "next" field is normally used to chain all lrecords together + so that the GC can find (and free) all of them. + "alloc_lcrecord" threads records together. + + The "next" field may be used for other purposes as long as some + other mechanism is provided for letting the GC do its work. (For + example, the event and marker datatypes allocate members out of + memory chunks, and are able to find all unmarked members by + sweeping through the elements of the list of chunks) */ + struct lcrecord_header *next; + /* This is just for debugging/printing convenience. + Having this slot doesn't hurt us much spacewise, since an lcrecord + already has the above slots together with malloc overhead. */ + unsigned int uid :31; + /* A flag that indicates whether this lcrecord is on a "free list". + Free lists are used to minimize the number of calls to malloc() + when we're repeatedly allocating and freeing a number of the + same sort of lcrecord. Lcrecords on a free list always get + marked in a different fashion, so we can use this flag as a + sanity check to make sure that free lists only have freed lcrecords + and there are no freed lcrecords elsewhere. */ + unsigned int free :1; +}; /* Used for lcrecords in an lcrecord-list. */ struct free_lcrecord_header - { - struct lcrecord_header lcheader; - Lisp_Object chain; - }; +{ + struct lcrecord_header lcheader; + Lisp_Object chain; +}; /* This as the value of lheader->implementation->finalizer * means that this record is already marked */ @@ -126,56 +127,56 @@ void (*markobj) (Lisp_Object)); struct lrecord_implementation - { - CONST char *name; - /* This function is called at GC time, to make sure that all Lisp_Objects - pointed to by this object get properly marked. It should call - the mark_object function on all Lisp_Objects in the object. If - the return value is non-nil, it should be a Lisp_Object to be - marked (don't call the mark_object function explicitly on it, - because the GC routines will do this). Doing it this way reduces - recursion, so the object returned should preferably be the one - with the deepest level of Lisp_Object pointers. This function - can be NULL, meaning no GC marking is necessary. */ - Lisp_Object (*marker) (Lisp_Object, void (*mark_object) (Lisp_Object)); - /* This can be NULL if the object is an lcrecord; the - default_object_printer() in print.c will be used. */ - void (*printer) (Lisp_Object, Lisp_Object printcharfun, int escapeflag); - /* This function is called at GC time when the object is about to - be freed, and at dump time (FOR_DISKSAVE will be non-zero in this - case). It should perform any necessary cleanup (e.g. freeing - malloc()ed memory. This can be NULL, meaning no special - finalization is necessary. +{ + CONST char *name; + /* This function is called at GC time, to make sure that all Lisp_Objects + pointed to by this object get properly marked. It should call + the mark_object function on all Lisp_Objects in the object. If + the return value is non-nil, it should be a Lisp_Object to be + marked (don't call the mark_object function explicitly on it, + because the GC routines will do this). Doing it this way reduces + recursion, so the object returned should preferably be the one + with the deepest level of Lisp_Object pointers. This function + can be NULL, meaning no GC marking is necessary. */ + Lisp_Object (*marker) (Lisp_Object, void (*mark_object) (Lisp_Object)); + /* This can be NULL if the object is an lcrecord; the + default_object_printer() in print.c will be used. */ + void (*printer) (Lisp_Object, Lisp_Object printcharfun, int escapeflag); + /* This function is called at GC time when the object is about to + be freed, and at dump time (FOR_DISKSAVE will be non-zero in this + case). It should perform any necessary cleanup (e.g. freeing + malloc()ed memory. This can be NULL, meaning no special + finalization is necessary. - WARNING: remember that the finalizer is called at dump time even - though the object is not being freed. */ - void (*finalizer) (void *header, int for_disksave); - /* This can be NULL, meaning compare objects with EQ(). */ - int (*equal) (Lisp_Object obj1, Lisp_Object obj2, int depth); - /* This can be NULL, meaning use the Lisp_Object itself as the hash; - but *only* if the `equal' function is EQ (if two objects are - `equal', they *must* hash to the same value or the hashing won't - work). */ - unsigned long (*hash) (Lisp_Object, int); - Lisp_Object (*getprop) (Lisp_Object obj, Lisp_Object prop); - int (*putprop) (Lisp_Object obj, Lisp_Object prop, Lisp_Object val); - int (*remprop) (Lisp_Object obj, Lisp_Object prop); - Lisp_Object (*plist) (Lisp_Object obj); + WARNING: remember that the finalizer is called at dump time even + though the object is not being freed. */ + void (*finalizer) (void *header, int for_disksave); + /* This can be NULL, meaning compare objects with EQ(). */ + int (*equal) (Lisp_Object obj1, Lisp_Object obj2, int depth); + /* This can be NULL, meaning use the Lisp_Object itself as the hash; + but *only* if the `equal' function is EQ (if two objects are + `equal', they *must* hash to the same value or the hashing won't + work). */ + unsigned long (*hash) (Lisp_Object, int); + Lisp_Object (*getprop) (Lisp_Object obj, Lisp_Object prop); + int (*putprop) (Lisp_Object obj, Lisp_Object prop, Lisp_Object val); + int (*remprop) (Lisp_Object obj, Lisp_Object prop); + Lisp_Object (*plist) (Lisp_Object obj); - /* Only one of these is non-0. If both are 0, it means that this type - is not instantiable by alloc_lcrecord(). */ - unsigned int static_size; - unsigned int (*size_in_bytes_method) (CONST void *header); - /* A unique subtag-code (dynamically) assigned to this datatype. */ - /* (This is a pointer so the rest of this structure can be read-only.) */ - int *lrecord_type_index; - /* A "basic" lrecord is any lrecord that's not an lcrecord, i.e. - one that does not have an lcrecord_header at the front and which - is (usually) allocated in frob blocks. We only use this flag - for some consistency checking, and that only when error-checking - is enabled. */ - int basic_p; - }; + /* Only one of these is non-0. If both are 0, it means that this type + is not instantiable by alloc_lcrecord(). */ + unsigned int static_size; + unsigned int (*size_in_bytes_method) (CONST void *header); + /* A unique subtag-code (dynamically) assigned to this datatype. */ + /* (This is a pointer so the rest of this structure can be read-only.) */ + int *lrecord_type_index; + /* A "basic" lrecord is any lrecord that's not an lcrecord, i.e. + one that does not have an lcrecord_header at the front and which + is (usually) allocated in frob blocks. We only use this flag for + some consistency checking, and that only when error-checking is + enabled. */ + int basic_p; +}; extern int gc_in_progress; @@ -274,51 +275,51 @@ #ifdef ERROR_CHECK_TYPECHECK -# define DECLARE_LRECORD(c_name, structtype) \ -extern CONST_IF_NOT_DEBUG struct lrecord_implementation \ - lrecord_##c_name[]; \ -INLINE structtype *error_check_##c_name (Lisp_Object _obj); \ -INLINE structtype * \ -error_check_##c_name (Lisp_Object _obj) \ -{ \ - XUNMARK (_obj); \ - assert (RECORD_TYPEP (_obj, lrecord_##c_name) || \ - MARKED_RECORD_P (_obj)); \ - return (structtype *) XPNTR (_obj); \ -} \ +# define DECLARE_LRECORD(c_name, structtype) \ +extern CONST_IF_NOT_DEBUG struct lrecord_implementation \ + lrecord_##c_name[]; \ +INLINE structtype *error_check_##c_name (Lisp_Object _obj); \ +INLINE structtype * \ +error_check_##c_name (Lisp_Object _obj) \ +{ \ + XUNMARK (_obj); \ + assert (RECORD_TYPEP (_obj, lrecord_##c_name) || \ + MARKED_RECORD_P (_obj)); \ + return (structtype *) XPNTR (_obj); \ +} \ extern Lisp_Object Q##c_name##p -# define DECLARE_NONRECORD(c_name, type_enum, structtype) \ -INLINE structtype *error_check_##c_name (Lisp_Object _obj); \ -INLINE structtype * \ -error_check_##c_name (Lisp_Object _obj) \ -{ \ - XUNMARK (_obj); \ - assert (XGCTYPE (_obj) == type_enum); \ - return (structtype *) XPNTR (_obj); \ -} \ +# define DECLARE_NONRECORD(c_name, type_enum, structtype) \ +INLINE structtype *error_check_##c_name (Lisp_Object _obj); \ +INLINE structtype * \ +error_check_##c_name (Lisp_Object _obj) \ +{ \ + XUNMARK (_obj); \ + assert (XGCTYPE (_obj) == type_enum); \ + return (structtype *) XPNTR (_obj); \ +} \ extern Lisp_Object Q##c_name##p # define XRECORD(x, c_name, structtype) error_check_##c_name (x) # define XNONRECORD(x, c_name, type_enum, structtype) error_check_##c_name (x) -# define XSETRECORD(var, p, c_name) do \ -{ \ - XSETOBJ (var, Lisp_Record, p); \ - assert (RECORD_TYPEP (var, lrecord_##c_name) || \ - MARKED_RECORD_P (var)); \ +# define XSETRECORD(var, p, c_name) do \ +{ \ + XSETOBJ (var, Lisp_Record, p); \ + assert (RECORD_TYPEP (var, lrecord_##c_name) || \ + MARKED_RECORD_P (var)); \ } while (0) #else /* not ERROR_CHECK_TYPECHECK */ -# define DECLARE_LRECORD(c_name, structtype) \ -extern Lisp_Object Q##c_name##p; \ -extern CONST_IF_NOT_DEBUG struct lrecord_implementation \ +# define DECLARE_LRECORD(c_name, structtype) \ +extern Lisp_Object Q##c_name##p; \ +extern CONST_IF_NOT_DEBUG struct lrecord_implementation \ lrecord_##c_name[] -# define DECLARE_NONRECORD(c_name, type_enum, structtype) \ +# define DECLARE_NONRECORD(c_name, type_enum, structtype) \ extern Lisp_Object Q##c_name##p # define XRECORD(x, c_name, structtype) ((structtype *) XPNTR (x)) -# define XNONRECORD(x, c_name, type_enum, structtype) \ +# define XNONRECORD(x, c_name, type_enum, structtype) \ ((structtype *) XPNTR (x)) # define XSETRECORD(var, p, c_name) XSETOBJ (var, Lisp_Record, p) @@ -350,21 +351,21 @@ FSF Emacs does not have this problem because RMS took the cheesy way out and disabled returning from a signal entirely. */ -#define CONCHECK_RECORD(x, c_name) do \ -{ if (!RECORD_TYPEP (x, lrecord_##c_name)) \ - x = wrong_type_argument (Q##c_name##p, x); } \ +#define CONCHECK_RECORD(x, c_name) do \ +{ if (!RECORD_TYPEP (x, lrecord_##c_name)) \ + x = wrong_type_argument (Q##c_name##p, x); } \ while (0) -#define CONCHECK_NONRECORD(x, lisp_enum, predicate) do \ -{ if (XTYPE (x) != lisp_enum) \ - x = wrong_type_argument (predicate, x); } \ +#define CONCHECK_NONRECORD(x, lisp_enum, predicate) do \ +{ if (XTYPE (x) != lisp_enum) \ + x = wrong_type_argument (predicate, x); } \ while (0) -#define CHECK_RECORD(x, c_name) do \ -{ if (!RECORD_TYPEP (x, lrecord_##c_name)) \ - dead_wrong_type_argument (Q##c_name##p, x); } \ +#define CHECK_RECORD(x, c_name) do \ +{ if (!RECORD_TYPEP (x, lrecord_##c_name)) \ + dead_wrong_type_argument (Q##c_name##p, x); } \ while (0) -#define CHECK_NONRECORD(x, lisp_enum, predicate) do \ -{ if (XTYPE (x) != lisp_enum) \ - dead_wrong_type_argument (predicate, x); } \ +#define CHECK_NONRECORD(x, lisp_enum, predicate) do \ +{ if (XTYPE (x) != lisp_enum) \ + dead_wrong_type_argument (predicate, x); } \ while (0) void *alloc_lcrecord (int size, CONST struct lrecord_implementation *); @@ -375,13 +376,13 @@ /* Copy the data from one lcrecord structure into another, but don't overwrite the header information. */ -#define copy_lcrecord(dst, src) \ - memcpy ((char *) dst + sizeof (struct lcrecord_header), \ - (char *) src + sizeof (struct lcrecord_header), \ +#define copy_lcrecord(dst, src) \ + memcpy ((char *) dst + sizeof (struct lcrecord_header), \ + (char *) src + sizeof (struct lcrecord_header), \ sizeof (*dst) - sizeof (struct lcrecord_header)) -#define zero_lcrecord(lcr) \ - memset ((char *) lcr + sizeof (struct lcrecord_header), 0, \ +#define zero_lcrecord(lcr) \ + memset ((char *) lcr + sizeof (struct lcrecord_header), 0, \ sizeof (*lcr) - sizeof (struct lcrecord_header)) #endif /* _XEMACS_LRECORD_H_ */
--- a/src/lstream.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/lstream.c Mon Aug 13 08:46:35 2007 +0200 @@ -1527,7 +1527,7 @@ Lisp_Object make_lisp_buffer_output_stream (struct buffer *buf, Bufpos pos, int flags) { - Lisp_Object lstr = make_lisp_buffer_stream_1 (buf, pos, 0, flags, "w"); + Lisp_Object lstr = make_lisp_buffer_stream_1 (buf, pos, 0, flags, "wc"); Lstream_set_character_mode (XLSTREAM (lstr)); return lstr;
--- a/src/m/delta.h Mon Aug 13 08:45:53 2007 +0200 +++ b/src/m/delta.h Mon Aug 13 08:46:35 2007 +0200 @@ -168,3 +168,7 @@ # endif #endif /* not __GNUC__ */ + +#ifdef HAVE_INET_SOCKETS /* this comes from autoconf */ +# define HAVE_SOCKETS /* NSE may or may not have been installed */ +#endif
--- a/src/m/sparc.h Mon Aug 13 08:45:53 2007 +0200 +++ b/src/m/sparc.h Mon Aug 13 08:46:35 2007 +0200 @@ -91,9 +91,11 @@ /* Must use the system's termcap, if we use any termcap. It does special things. */ +#ifndef LIBS_TERMCAP #ifndef TERMINFO #define LIBS_TERMCAP -ltermcap #endif +#endif /* Mask for address bits within a memory segment */
--- a/src/malloc.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/malloc.c Mon Aug 13 08:46:35 2007 +0200 @@ -363,7 +363,7 @@ #ifndef VMS /* Maximum virtual memory on VMS is difficult to calculate since it - * depends on several dynmacially changing things. Also, alignment + * depends on several dynamically changing things. Also, alignment * isn't that important. That is why much of the code here is ifdef'ed * out for VMS systems. */
--- a/src/md5.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/md5.c Mon Aug 13 08:46:35 2007 +0200 @@ -177,8 +177,7 @@ } /* MD5 finalization. Ends an MD5 message-digest operation, writing the - the message digest and zeroizing the context. - */ + message digest and zeroizing the context. */ void MD5Final (unsigned char digest[16], MD5_CTX *context) {
--- a/src/menubar-x.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/menubar-x.c Mon Aug 13 08:46:35 2007 +0200 @@ -228,7 +228,7 @@ } else if (menubar_root_p) { - wv->name = "menubar"; + wv->name = (char *) "menubar"; wv->type = CASCADE_TYPE; /* Well, nothing else seems to fit and this is ignored anyway... */ } @@ -367,7 +367,7 @@ wv->next = NULL; wv->contents = xmalloc_widget_value (); wv->contents->type = TEXT_TYPE; - wv->contents->name = "No menu"; + wv->contents->name = (char *) "No menu"; wv->contents->next = NULL; } assert (wv && wv->type == CASCADE_TYPE && wv->contents);
--- a/src/objects-x.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/objects-x.c Mon Aug 13 08:46:35 2007 +0200 @@ -809,24 +809,23 @@ handle_nonfull_spec_fonts = 0; } - void Xatoms_of_objects_x (struct device *d) { #define ATOM(x) XInternAtom (DEVICE_X_DISPLAY (d), (x), False) - - DEVICE_XATOM_FOUNDRY (d) = ATOM ("FOUNDRY"); - DEVICE_XATOM_FAMILY_NAME (d) = ATOM ("FAMILY_NAME"); - DEVICE_XATOM_WEIGHT_NAME (d) = ATOM ("WEIGHT_NAME"); - DEVICE_XATOM_SLANT (d) = ATOM ("SLANT"); - DEVICE_XATOM_SETWIDTH_NAME (d) = ATOM ("SETWIDTH_NAME"); - DEVICE_XATOM_ADD_STYLE_NAME (d) = ATOM ("ADD_STYLE_NAME"); - DEVICE_XATOM_PIXEL_SIZE (d) = ATOM ("PIXEL_SIZE"); - DEVICE_XATOM_POINT_SIZE (d) = ATOM ("POINT_SIZE"); - DEVICE_XATOM_RESOLUTION_X (d) = ATOM ("RESOLUTION_X"); - DEVICE_XATOM_RESOLUTION_Y (d) = ATOM ("RESOLUTION_Y"); - DEVICE_XATOM_SPACING (d) = ATOM ("SPACING"); - DEVICE_XATOM_AVERAGE_WIDTH (d) = ATOM ("AVERAGE_WIDTH"); - DEVICE_XATOM_CHARSET_REGISTRY (d) = ATOM ("CHARSET_REGISTRY"); - DEVICE_XATOM_CHARSET_ENCODING (d) = ATOM ("CHARSET_ENCODING"); +#define ATOMIZE(x) DEVICE_XATOM_##x (d) = ATOM(#x) + ATOMIZE (FOUNDRY); + ATOMIZE (FAMILY_NAME); + ATOMIZE (WEIGHT_NAME); + ATOMIZE (SLANT); + ATOMIZE (SETWIDTH_NAME); + ATOMIZE (ADD_STYLE_NAME); + ATOMIZE (PIXEL_SIZE); + ATOMIZE (POINT_SIZE); + ATOMIZE (RESOLUTION_X); + ATOMIZE (RESOLUTION_Y); + ATOMIZE (SPACING); + ATOMIZE (AVERAGE_WIDTH); + ATOMIZE (CHARSET_REGISTRY); + ATOMIZE (CHARSET_ENCODING); }
--- a/src/objects.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/objects.c Mon Aug 13 08:46:35 2007 +0200 @@ -703,17 +703,6 @@ /* No equal or hash methods; ignore the face the font is based off of for `equal' */ - -int -font_spec_matches_charset (struct device *d, Lisp_Object charset, - CONST Bufbyte *nonreloc, Lisp_Object reloc, - Bytecount offset, Bytecount length) -{ - return DEVMETH_OR_GIVEN (d, font_spec_matches_charset, - (d, charset, nonreloc, reloc, offset, length), - 1); -} - static Lisp_Object font_instantiate (Lisp_Object specifier, Lisp_Object matchspec, Lisp_Object domain, Lisp_Object instantiator, @@ -734,7 +723,8 @@ } instantiator = Ffont_instance_name (instantiator); } - else if (STRINGP (instantiator)) + + if (STRINGP (instantiator)) { /* First, look to see if we can retrieve a cached value. */ instance = Fgethash (instantiator, d->font_instance_cache, Qunbound);
--- a/src/objects.h Mon Aug 13 08:45:53 2007 +0200 +++ b/src/objects.h Mon Aug 13 08:46:35 2007 +0200 @@ -139,7 +139,7 @@ void *data; }; -#define COLOR_INSTANCE_NAME(c) ((c)->name) +#define COLOR_INSTANCE_NAME(c) ((c)->name) #define COLOR_INSTANCE_DEVICE(c) ((c)->device) /**************************************************************************** @@ -154,15 +154,10 @@ #define CHECK_FONT_INSTANCE(x) CHECK_RECORD (x, font_instance) #define CONCHECK_FONT_INSTANCE(x) CONCHECK_RECORD (x, font_instance) -int font_spec_matches_charset (struct device *d, Lisp_Object charset, - CONST Bufbyte *nonreloc, - Lisp_Object reloc, Bytecount offset, - Bytecount length); - Lisp_Object Fmake_font_instance (Lisp_Object name, Lisp_Object device, Lisp_Object no_error); -Lisp_Object Ffont_instance_p (Lisp_Object obj); -Lisp_Object Ffont_instance_name (Lisp_Object obj); +Lisp_Object Ffont_instance_p (Lisp_Object obj); +Lisp_Object Ffont_instance_name (Lisp_Object obj); Lisp_Object Ffont_instance_truename (Lisp_Object obj); extern Lisp_Object Vthe_null_font_instance; @@ -183,12 +178,11 @@ void *data; }; -#define FONT_INSTANCE_NAME(f) ((f)->name) -#define FONT_INSTANCE_DEVICE(f) ((f)->device) - -#define FONT_INSTANCE_WIDTH(f) ((f)->width) -#define FONT_INSTANCE_HEIGHT(f) ((f)->height) -#define FONT_INSTANCE_ASCENT(f) ((f)->ascent) +#define FONT_INSTANCE_NAME(f) ((f)->name) +#define FONT_INSTANCE_DEVICE(f) ((f)->device) +#define FONT_INSTANCE_ASCENT(f) ((f)->ascent) #define FONT_INSTANCE_DESCENT(f) ((f)->descent) +#define FONT_INSTANCE_WIDTH(f) ((f)->width) +#define FONT_INSTANCE_HEIGHT(f) ((f)->height) #endif /* _XEMACS_OBJECTS_H_ */
--- a/src/paths.h Mon Aug 13 08:45:53 2007 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -/* Hey Emacs, this is -*- C -*- code! */ - -/* Synched up with: Not synched with FSF. */ - -/* Think twice before editing this file. Generated automatically by configure. - - The file startup.el guesses at reasonable values for load-path, exec-path, - and lock-directory. This means that if you move emacs and its associated - sub-tree to a different place in the filesystem, or to a different machine, - you won't have to do anything for it to work. - - If you define the paths in this file then they will take precedence over - any value generated by the heuristic in startup.el. The hardcoded paths - will be checked to see if they are valid, in which case they will be used. - Otherwise the editor will attempt to make its normal guess. - - See the NEWS file for a description of the heuristic used to locate the lisp - and exec directories at startup time. If you are looking at this file - because you are having trouble, then you would be much better off arranging - for those heuristics to succeed than defining the paths in this file. - - ** Let me say that again. If you're editing this file, you're making - ** a mistake. Re-read the section on installation in ../etc/NEWS. - - If it defines anything, this file should define some subset of the following: - - PATH_PREFIX The default value of `prefix-directory'. This is the - default root for everything. - - PATH_LOADSEARCH The default value of `load-path'. - - PATH_EXEC The default value of `exec-directory' and `exec-path'. - (exec-path also contains the value of whatever is in - the PATH environment variable.) - - PATH_DATA The default value of `data-directory'. This - is where architecture-independent files are - searched for. - - PATH_LOCK The name of the directory that contains lock files - with which we record what files are being modified in - Emacs. This directory should be writable by everyone. - If this is specified, the string must end with a slash! - - PATH_SUPERLOCK The name of the file !!!SuperLock!!! in the lock - directory. You probably should let this default... - - PATH_INFO The default value of `Info-directory-list'. - This is where info files are searched for. */ -#define PATH_PREFIX "/usr/local" -/* #define PATH_LOADSEARCH "/usr/local/lib/xemacs-19.14/lisp" */ -/* #define PATH_EXEC "/usr/local/lib/xemacs-19.14/i486-unknown-linux2.0.0" */ -/* #define PATH_DATA "/usr/local/lib/xemacs-19.14/etc" */ -/* #define PATH_LOCK "/usr/local/lib/xemacs/lock" */ -/* #define PATH_INFO "/usr/local/lib/xemacs-19.14/info" */
--- a/src/print.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/print.c Mon Aug 13 08:46:35 2007 +0200 @@ -1010,7 +1010,8 @@ /* we don't really want to see that junk in the bytecode instructions. */ if (STRINGP (b->bytecodes) && !print_readably) { - sprintf (buf, "\"...(%ld)\"", string_length (XSTRING (b->bytecodes))); + sprintf (buf, "\"...(%ld)\"", + (long) string_length (XSTRING (b->bytecodes))); write_c_string (buf, printcharfun); } else
--- a/src/puresize.h Mon Aug 13 08:45:53 2007 +0200 +++ b/src/puresize.h Mon Aug 13 08:46:35 2007 +0200 @@ -32,9 +32,9 @@ things configured in. */ #if (LONGBITS == 64) -# define BASE_PURESIZE 905000 +# define BASE_PURESIZE 912000 #else -# define BASE_PURESIZE 540000 +# define BASE_PURESIZE 552000 #endif /* If any particular systems need to change the base puresize, they
--- a/src/ralloc.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/ralloc.c Mon Aug 13 08:46:35 2007 +0200 @@ -909,7 +909,7 @@ blocks of the given size left. Note that this scheme, given it's first-fit strategy, is prone to - fragmentation of the the first part of memory earmarked for this + fragmentation of the first part of memory earmarked for this purpose. [ACP Vol I]. We can't use the workaround of using a randomized first fit because we don't want to presume too much about the memory map. Instead, we try to coalesce empty or
--- a/src/redisplay-tty.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/redisplay-tty.c Mon Aug 13 08:46:35 2007 +0200 @@ -1088,7 +1088,9 @@ CONSOLE_TTY_DATA (c)->term_entry_buffer = (char *) xmalloc (2044); bufptr = CONSOLE_TTY_DATA (c)->term_entry_buffer; + EMACS_BLOCK_SIGNAL (SIGTTOU); status = tgetent (entry_buffer, terminal_type); + EMACS_UNBLOCK_SIGNAL (SIGTTOU); #if 0 if (status < 0) return TTY_UNABLE_OPEN_DATABASE;
--- a/src/redisplay.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/redisplay.c Mon Aug 13 08:46:35 2007 +0200 @@ -140,8 +140,8 @@ face_index findex; /* The height of a pixmap may either be predetermined if the user - has set a baseline value, or it may be depedent on whatever the - line ascent and descent values end up being based just on font + has set a baseline value, or it may be dependent on whatever the + line ascent and descent values end up being, based just on font information. In the first case we can immediately update the values, thus their inclusion here. In the last case we cannot determine the actual contribution to the line height until we @@ -416,7 +416,7 @@ /* non-nil if any window has changed since the last time redisplay completed */ int windows_changed; -/* non-nil if any frame's window struture has changed since the last +/* non-nil if any frame's window structure has changed since the last time redisplay completed */ int windows_structure_changed; @@ -869,7 +869,7 @@ data->last_char_width = fi->width; else data->last_char_width = -1; - data->new_ascent = max (data->new_ascent, (int) fi->ascent); + data->new_ascent = max (data->new_ascent, (int) fi->ascent); data->new_descent = max (data->new_descent, (int) fi->descent); } @@ -4035,14 +4035,13 @@ } /* The caller is responsible for freeing the returned string. */ -char * +Bufbyte * generate_formatted_string (struct window *w, Lisp_Object format_str, Lisp_Object result_str, face_index findex, int type) { struct display_line *dl; struct display_block *db; int elt = 0; - char *retval; dl = &formatted_string_display_line; db = get_display_block_from_line (dl, TEXT); @@ -4057,15 +4056,13 @@ if (Dynarr_atp (db->runes, elt)->type == RUNE_CHAR) Dynarr_add (formatted_string_emchar_dynarr, Dynarr_atp (db->runes, elt)->object.chr.ch); - elt++; } - retval = (char *) (convert_emchar_string_into_malloced_string - (Dynarr_atp (formatted_string_emchar_dynarr, 0), - Dynarr_length (formatted_string_emchar_dynarr), 0)); - - return retval; + return + convert_emchar_string_into_malloced_string + ( Dynarr_atp (formatted_string_emchar_dynarr, 0), + Dynarr_length (formatted_string_emchar_dynarr), 0); } /* Update just the modeline. Assumes the desired display structs. If @@ -4144,6 +4141,7 @@ real_current_modeline_height (struct window *w) { Fset_marker (w->start[CMOTION_DISP], w->start[CURRENT_DISP], w->buffer); + Fset_marker (w->pointm[CMOTION_DISP], w->pointm[CURRENT_DISP], w->buffer); if (ensure_modeline_generated (w, CMOTION_DISP)) {
--- a/src/redisplay.h Mon Aug 13 08:45:53 2007 +0200 +++ b/src/redisplay.h Mon Aug 13 08:46:35 2007 +0200 @@ -26,9 +26,9 @@ #define _XEMACS_REDISPLAY_H_ /* Redisplay DASSERT types */ -#define DB_DISP_POS 1 -#define DB_DISP_TEXT_LAYOUT 2 -#define DB_DISP_REDISPLAY 4 +#define DB_DISP_POS 1 +#define DB_DISP_TEXT_LAYOUT 2 +#define DB_DISP_REDISPLAY 4 /* These are the possible return values from pixel_to_glyph_translation. */ #define OVER_MODELINE 0 @@ -249,7 +249,7 @@ and control chars */ int cursor_elt; /* rune block of TEXT display block cursor is at or -1 */ - char used_prop_data; /* can't incrementally updated if line + char used_prop_data; /* can't incrementally update if line used propogation data */ layout_bounds bounds; /* line boundary positions */ @@ -298,10 +298,10 @@ Bytind pos, end; extent_dynarr *extents; glyph_block_dynarr *begin_glyphs, *end_glyphs; - int invisible:1; - int invisible_ellipses:1; - int previously_invisible:1; - int invisible_ellipses_already_displayed:1; + unsigned int invisible:1; + unsigned int invisible_ellipses:1; + unsigned int previously_invisible:1; + unsigned int invisible_ellipses_already_displayed:1; }; @@ -455,7 +455,7 @@ extern Lisp_Object Vglobal_mode_string; -/* The following two variables are defined in emacs.c are are used +/* The following two variables are defined in emacs.c and are used to convey information discovered on the command line way early (before *anything* is initialized). */ @@ -490,9 +490,9 @@ int window_half_pixpos (struct window *w); void redisplay_echo_area (void); void free_display_structs (struct window_mirror *mir); -char *generate_formatted_string (struct window *w, Lisp_Object format_str, - Lisp_Object result_str, face_index findex, - int type); +Bufbyte *generate_formatted_string (struct window *w, Lisp_Object format_str, + Lisp_Object result_str, face_index findex, + int type); int real_current_modeline_height (struct window *w); int pixel_to_glyph_translation (struct frame *f, int x_coord, int y_coord, int *col, int *row,
--- a/src/regex.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/regex.c Mon Aug 13 08:46:35 2007 +0200 @@ -1042,7 +1042,9 @@ This is a variable only so users of regex can assign to it; we never change it ourselves. */ #if defined (MATCH_MAY_ALLOCATE) -int re_max_failures = 200000; +/* 4400 was enough to cause a crash on Alpha OSF/1, + whose default stack limit is 2mb. */ +int re_max_failures = 4000; #else int re_max_failures = 2000; #endif @@ -2660,7 +2662,7 @@ default: normal_backslash: /* You might think it would be useful for \ to mean - not to translate; but if we don't translate it + not to translate; but if we don't translate it, it will never match anything. */ c = TRANSLATE (c); goto normal_char; @@ -3604,9 +3606,9 @@ /* re_match_2 matches the compiled pattern in BUFP against the - the (virtual) concatenation of STRING1 and STRING2 (of length SIZE1 - and SIZE2, respectively). We start matching at POS, and stop - matching at STOP. + (virtual) concatenation of STRING1 and STRING2 (of length SIZE1 and + SIZE2, respectively). We start matching at POS, and stop matching + at STOP. If REGS is non-null and the `no_sub' field of BUFP is nonzero, we store offsets for the substring each group matched in REGS. See the @@ -3668,7 +3670,7 @@ to resume scanning the pattern; the second one is where to resume scanning the strings. If the latter is zero, the failure point is a ``dummy''; if a failure happens and the failure point is a dummy, - it gets discarded and the next next one is tried. */ + it gets discarded and the next one is tried. */ #ifdef MATCH_MAY_ALLOCATE /* otherwise, this is global. */ fail_stack_type fail_stack; #endif
--- a/src/s/decosf3-1.h Mon Aug 13 08:45:53 2007 +0200 +++ b/src/s/decosf3-1.h Mon Aug 13 08:46:35 2007 +0200 @@ -26,7 +26,5 @@ /* #### why the hell is configure so broken on this system? */ #define HAVE_SELECT -#define HAVE_UNION_WAIT -#undef HAVE_WAITPID #define BROKEN_SIGIO
--- a/src/s/hpux10.h Mon Aug 13 08:45:53 2007 +0200 +++ b/src/s/hpux10.h Mon Aug 13 08:46:35 2007 +0200 @@ -2,22 +2,39 @@ /* System description file for hpux version 10. */ -#include "hpux9.h" +#include "hpux9shr.h" /* We have to go this route, rather than hpux9's approach of renaming the functions via macros. The system's stdlib.h has fully prototyped declarations, which yields a conflicting definition of srand48; it tries to redeclare what was once srandom to be srand48. So we go with HAVE_LRAND48 being defined. */ -#undef random /* XEmacs addition: necessary? */ #undef srandom #undef srand48 #undef HAVE_RANDOM #define HPUX10 #define FORCE_ALLOCA_H - -/* XEmacs addition: New paths for hpux 10 */ -#undef C_SWITCH_X_SYSTEM -#define C_SWITCH_X_SYSTEM -I/usr/include/X11R5 -I/usr/include/Motif1.2 -I/opt/audio/include -#undef LD_SWITCH_X_SYSTEM -#define LD_SWITCH_X_SYSTEM -L/usr/lib/X11R5 -L/usr/lib/Motif1.2 -L/opt/audio/lib +/* XEmacs addition */ +#ifndef OBJECTS_SYSTEM +#define OBJECTS_SYSTEM strcat.o +#endif +/* AlainF 20-Jul-1996 -- fixes for 10.10, untested for 10.0x */ +/* Fix kernel file name for 10.10 */ +#undef KERNEL_FILE +#define KERNEL_FILE "/stand/vmunix" +/* The curses library seems to have a badly broken version of select(2) + that makes "poll: interrupted system call" messages to appear and + Emacs suprocesses to hang (e.g. TeX compilation w/ AUCTeX) */ +#undef LIBS_TERMCAP +#define LIBS_TERMCAP -ltermcap +/* 10.10 has Xmu in /usr/contrib/X11R5/lib */ +#ifndef HAVE_LIBXMU +#undef C_SWITCH_X_SYSTEM +#define C_SWITCH_X_SYSTEM -I/usr/include/X11R5 -I/usr/include/Motif1.2 -I/usr/contrib/include/X11R5 +#undef LD_SWITCH_X_DEFAULT +#define LD_SWITCH_X_DEFAULT -L/usr/lib/X11R5 -L/usr/lib/Motif1.2 -L/usr/contrib/lib/X11R5 +#undef LIBXMU +#define LIBXMU -lXmu +#define HAVE_LIBXMU 1 +#undef NO_EDITRES +#endif
--- a/src/s/hpux9.h Mon Aug 13 08:45:53 2007 +0200 +++ b/src/s/hpux9.h Mon Aug 13 08:46:35 2007 +0200 @@ -31,7 +31,11 @@ #define C_SWITCH_SYSTEM -Wp,-H200000 -D_BSD */ #undef C_SWITCH_SYSTEM -#define C_SWITCH_SYSTEM -Ae -Wp,-H100000 +# ifdef __hp9000s300 +# define C_SWITCH_SYSTEM -Aa -D_HPUX_SOURCE +# else +# define C_SWITCH_SYSTEM -Ae -Wp,-H100000 +# endif /* XEmacs: commented out #else #define C_SWITCH_SYSTEM -D_BSD @@ -72,3 +76,7 @@ /* XEmacs: apparently rint() is totally broken in HPUX 9. */ #undef HAVE_RINT +/* XEmacs addition */ +#ifndef OBJECTS_SYSTEM +#define OBJECTS_SYSTEM strcat.o +#endif
--- a/src/s/hpux9shr.h Mon Aug 13 08:45:53 2007 +0200 +++ b/src/s/hpux9shr.h Mon Aug 13 08:46:35 2007 +0200 @@ -5,7 +5,7 @@ #define ORDINARY_LINK /* XEmacs change */ -/* Only support for hp9000s300 currently */ +/* Only support for hp9000s700 currently */ #if !defined(__hp9000s300) /* #ifndef USE_GCC */ #define HPUX_USE_SHLIBS
--- a/src/s/linux.h Mon Aug 13 08:45:53 2007 +0200 +++ b/src/s/linux.h Mon Aug 13 08:46:35 2007 +0200 @@ -60,7 +60,7 @@ people are using newer mailers that have heard of flock. Change this if you need to. */ -#define MAIL_USE_FLOCK +/* #define MAIL_USE_FLOCK*/ /* Here, on a separate page, add any special hacks needed to make Emacs work on this system. For example,
--- a/src/s/sol2-5.h Mon Aug 13 08:45:53 2007 +0200 +++ b/src/s/sol2-5.h Mon Aug 13 08:46:35 2007 +0200 @@ -27,7 +27,7 @@ files. */ int getpagesize (void); long random (void); -int srandom (unsigned int seed); +void srandom (unsigned int seed); #endif /* NOT_C_CODE */ /* 2.5 now has random back in libc but we don't want to use it. */
--- a/src/s/sunos4-0.h Mon Aug 13 08:45:53 2007 +0200 +++ b/src/s/sunos4-0.h Mon Aug 13 08:46:35 2007 +0200 @@ -94,7 +94,7 @@ # ifdef __GNUC__ /* XEmacs addition: */ - /* gcc has the bug that it claims to conform the the ANSI C standard + /* gcc has the bug that it claims to conform to the ANSI C standard (which is what setting __STDC__ to 1 means) but does not necessarily provide all of the library routines which the standard requires of a conforming compiler -- such as memmove. The other Sun ANSI compilers
--- a/src/scrollbar.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/scrollbar.c Mon Aug 13 08:46:35 2007 +0200 @@ -825,8 +825,8 @@ Sscrollbar_vertical_drag, 1, 1, 0 /* Function called when the user drags the vertical scrollbar thumb. One argument, a cons containing the scrollbar's window and a value -(#### document me!). You can advise this function to change the -scrollbar behavior. +between point-min and point-max. You can advise this function to +change the scrollbar behavior. */ ) (object) Lisp_Object object;
--- a/src/specifier.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/specifier.c Mon Aug 13 08:46:35 2007 +0200 @@ -504,7 +504,7 @@ { /* This cannot GC. */ if ((DEVICEP (locale) && DEVICE_LIVE_P (XDEVICE (locale))) || - (FRAMEP (locale) && FRAME_LIVE_P (XFRAME (locale))) || + (FRAMEP (locale) && FRAME_LIVE_P (XFRAME (locale))) || (BUFFERP (locale) && BUFFER_LIVE_P (XBUFFER (locale))) || /* dead windows are allowed because they may become live windows again when a window configuration is restored */ @@ -528,7 +528,7 @@ { /* This cannot GC. */ if ((DEVICEP (domain) && DEVICE_LIVE_P (XDEVICE (domain))) || - (FRAMEP (domain) && FRAME_LIVE_P (XFRAME (domain))) || + (FRAMEP (domain) && FRAME_LIVE_P (XFRAME (domain))) || (WINDOWP (domain) && WINDOW_LIVE_P (XWINDOW (domain)))) return Qt; else @@ -549,7 +549,7 @@ /* This cannot GC. */ if (EQ (locale_type, Qglobal) || EQ (locale_type, Qdevice) || - EQ (locale_type, Qframe) || + EQ (locale_type, Qframe) || EQ (locale_type, Qwindow) || EQ (locale_type, Qbuffer)) return Qt; @@ -609,18 +609,14 @@ decode_locale_type (Lisp_Object locale_type) { /* This cannot GC. */ - if (EQ (locale_type, Qglobal)) - return LOCALE_GLOBAL; - if (EQ (locale_type, Qdevice)) - return LOCALE_DEVICE; - if (EQ (locale_type, Qframe)) - return LOCALE_FRAME; - if (EQ (locale_type, Qwindow)) - return LOCALE_WINDOW; - if (EQ (locale_type, Qbuffer)) - return LOCALE_BUFFER; + if (EQ (locale_type, Qglobal)) return LOCALE_GLOBAL; + if (EQ (locale_type, Qdevice)) return LOCALE_DEVICE; + if (EQ (locale_type, Qframe)) return LOCALE_FRAME; + if (EQ (locale_type, Qwindow)) return LOCALE_WINDOW; + if (EQ (locale_type, Qbuffer)) return LOCALE_BUFFER; + signal_simple_error ("Invalid specifier locale type", locale_type); - return 0; + return LOCALE_GLOBAL; /* not reached */ } Lisp_Object
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/strcat.c Mon Aug 13 08:46:35 2007 +0200 @@ -0,0 +1,55 @@ +/* Copyright (C) 1991 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Synched up with: Not in FSF. */ + +/* In HPUX 10 the strcat function references memory past the last byte of + the string! This will core dump if the memory following the last byte is + not mapped. + + Here is a correct version from glibc 1.09. +*/ + +char *strcat (char *dest, const char *src); + +/* Append SRC on the end of DEST. */ +char * +strcat (char *dest, const char *src) +{ + register char *s1 = dest; + register const char *s2 = src; + char c; + + /* Find the end of the string. */ + do + c = *s1++; + while (c != '\0'); + + /* Make S1 point before the next character, so we can increment + it while memory is read (wins on pipelined cpus). */ + s1 -= 2; + + do + { + c = *s2++; + *++s1 = c; + } + while (c != '\0'); + + return dest; +}
--- a/src/sunplay.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/sunplay.c Mon Aug 13 08:46:35 2007 +0200 @@ -33,9 +33,20 @@ #include <sys/fcntl.h> #include <sys/file.h> +/* libaudio.h includes a header which defines CONST. We temporarily + undefine it in order to eliminate a compiler warning. Yes, this is + a hack. */ +#undef CONST #include <multimedia/libaudio.h> #include <multimedia/audio_device.h> +#undef CONST +#ifdef CONST_IS_LOSING +# define CONST +#else +# define CONST const +#endif /* CONST */ + #if __STDC__ || defined(STDC_HEADERS) /* warning suppression */ extern int audio__setplayhdr(); extern int audio__setgain(); @@ -45,7 +56,6 @@ extern int audio_cmp_hdr(); extern int audio_enc_to_str(); extern int audio_drain(); -extern void usleep(); #endif
--- a/src/symbols.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/symbols.c Mon Aug 13 08:46:35 2007 +0200 @@ -725,7 +725,7 @@ SYMVAL_BOOLEAN_FORWARD: (declare with DEFVAR_INT or DEFVAR_BOOL) Similar to SYMVAL_OBJECT_FORWARD except that the C variable - is is of type "int" and is an integer or boolean, respectively. + is of type "int" and is an integer or boolean, respectively. SYMVAL_CONST_OBJECT_FORWARD: SYMVAL_CONST_FIXNUM_FORWARD:
--- a/src/syntax.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/syntax.c Mon Aug 13 08:46:35 2007 +0200 @@ -55,26 +55,26 @@ /* This is the internal form of the parse state used in parse-partial-sexp. */ struct lisp_parse_state - { - int depth; /* Depth at end of parsing */ - Emchar instring; /* -1 if not within string, else desired terminator. */ - int incomment; /* Nonzero if within a comment at end of parsing */ - int comstyle; /* comment style a=0, or b=1 */ - int quoted; /* Nonzero if just after an escape char at end of +{ + int depth; /* Depth at end of parsing */ + Emchar instring; /* -1 if not within string, else desired terminator */ + int incomment; /* Nonzero if within a comment at end of parsing */ + int comstyle; /* comment style a=0, or b=1 */ + int quoted; /* Nonzero if just after an escape char at end of parsing */ - Bufpos thislevelstart;/* Char number of most recent start-of-expression - at current level */ - Bufpos prevlevelstart;/* Char number of start of containing expression */ - Bufpos location; /* Char number at which parsing stopped. */ - int mindepth; /* Minimum depth seen while scanning. */ - Bufpos comstart; /* Position just after last comment starter. */ - }; + Bufpos thislevelstart;/* Char number of most recent start-of-expression + at current level */ + Bufpos prevlevelstart;/* Char number of start of containing expression */ + Bufpos location; /* Char number at which parsing stopped */ + int mindepth; /* Minimum depth seen while scanning */ + Bufpos comstart; /* Position just after last comment starter */ +}; /* These variables are a cache for finding the start of a defun. - find_start_pos is the place for which the defun start was found. - find_start_value is the defun start position found for it. + find_start_pos is the place for which the defun start was found. + find_start_value is the defun start position found for it. find_start_buffer is the buffer it was found in. - find_start_begv is the BEGV value when it was found. + find_start_begv is the BEGV value when it was found. find_start_modiff is the value of MODIFF when it was found. */ static Bufpos find_start_pos; @@ -117,11 +117,11 @@ } /* Record what we found, for the next try. */ - find_start_value = tem; + find_start_value = tem; find_start_buffer = buf; find_start_modiff = BUF_MODIFF (buf); - find_start_begv = BUF_BEGV (buf); - find_start_pos = pos; + find_start_begv = BUF_BEGV (buf); + find_start_pos = pos; return find_start_value; } @@ -131,7 +131,7 @@ Any vector of 256 elements will do. */ ) (obj) - Lisp_Object obj; + Lisp_Object obj; { if (VECTORP (obj) && vector_length (XVECTOR (obj)) == 0400) return Qt; @@ -201,8 +201,8 @@ } /* Convert a letter which signifies a syntax code - into the code it signifies. - This is used by modify-syntax-entry, and other things. */ + into the code it signifies. + This is used by modify-syntax-entry, and other things. */ CONST unsigned char syntax_spec_code[0400] = { 0377, 0377, 0377, 0377, 0377, 0377, 0377, 0377, @@ -252,7 +252,7 @@ syntax table. */ ) (ch, table) - Lisp_Object ch, table; + Lisp_Object ch, table; { CHECK_CHAR_COERCE_INT (ch); table = check_syntax_table (table, current_buffer->syntax_table); @@ -389,7 +389,7 @@ and nil is returned. */ ) (count, buffer) - Lisp_Object count, buffer; + Lisp_Object count, buffer; { Bufpos val; struct buffer *buf = decode_buffer (buffer, 0); @@ -595,8 +595,8 @@ Point is set in either case. Optional argument BUFFER defaults to the current buffer. */ ) - (n, buffer) - Lisp_Object n, buffer; + (n, buffer) + Lisp_Object n, buffer; { Bufpos from; Bufpos stop;
--- a/src/syntax.h Mon Aug 13 08:45:53 2007 +0200 +++ b/src/syntax.h Mon Aug 13 08:46:35 2007 +0200 @@ -34,29 +34,29 @@ */ enum syntaxcode - { - Swhitespace, /* for a whitespace character */ - Spunct, /* for random punctuation characters */ - Sword, /* for a word constituent */ - Ssymbol, /* symbol constituent but not word constituent */ - Sopen, /* for a beginning delimiter */ - Sclose, /* for an ending delimiter */ - Squote, /* for a prefix character like Lisp ' */ - Sstring, /* for a string-grouping character like Lisp " */ - Smath, /* for delimiters like $ in Tex. */ - Sescape, /* for a character that begins a C-style escape */ - Scharquote, /* for a character that quotes the following character */ - Scomment, /* for a comment-starting character */ - Sendcomment, /* for a comment-ending character */ - Sinherit, /* use the standard syntax table for this character */ - Sextword, /* extended word; works mostly like a word constituent. - See the comment in syntax.c. */ - Smax /* Upper bound on codes that are meaningful */ - }; +{ + Swhitespace, /* whitespace character */ + Spunct, /* random punctuation character */ + Sword, /* word constituent */ + Ssymbol, /* symbol constituent but not word constituent */ + Sopen, /* a beginning delimiter */ + Sclose, /* an ending delimiter */ + Squote, /* a prefix character like Lisp ' */ + Sstring, /* a string-grouping character like Lisp " */ + Smath, /* delimiters like $ in TeX. */ + Sescape, /* a character that begins a C-style escape */ + Scharquote, /* a character that quotes the following character */ + Scomment, /* a comment-starting character */ + Sendcomment, /* a comment-ending character */ + Sinherit, /* use the standard syntax table for this character */ + Sextword, /* extended word; works mostly like a word constituent. + See the comment in syntax.c. */ + Smax /* Upper bound on codes that are meaningful */ +}; extern Lisp_Object Qsyntax_table_p; Lisp_Object Fsyntax_table_p (Lisp_Object); -Lisp_Object Fsyntax_table (Lisp_Object); +Lisp_Object Fsyntax_table (Lisp_Object); Lisp_Object Fset_syntax_table (Lisp_Object, Lisp_Object); /* Return the raw syntax code for a particular character and table */ @@ -207,9 +207,9 @@ ? SYNTAX_COMMENT_STYLE_B \ : 0))) -/* This array, indexed by a character, contains the syntax code which that - character signifies (as a char). For example, - (enum syntaxcode) syntax_spec_code['w'] is Sword. */ +/* This array, indexed by a character, contains the syntax code which + that character signifies (as a char). + For example, (enum syntaxcode) syntax_spec_code['w'] is Sword. */ extern CONST unsigned char syntax_spec_code[0400];
--- a/src/sysdep.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/sysdep.c Mon Aug 13 08:46:35 2007 +0200 @@ -51,6 +51,9 @@ #include "window.h" #include <setjmp.h> +#ifdef HAVE_LIBGEN_H /* Must come before sysfile.h */ +#include <libgen.h> +#endif #include "sysfile.h" #include "syswait.h" #include "sysdir.h" @@ -908,7 +911,7 @@ { int filedesc = DEVICE_INFD (d); -#if defined (I_SETSIG) +#if defined (I_SETSIG) && !defined(HPUX10) ioctl (filedesc, I_GETSIG, &DEVICE_OLD_SIGIO_FLAG (d)); DEVICE_OLD_SIGIO_FLAG (d) &= ~S_INPUT; #elif defined (FASYNC) @@ -929,8 +932,6 @@ #ifdef HAVE_WINDOW_SYSTEM else if (!DEVICE_STREAM_P (d)) { - /* Process group for socket should be -pid for delivery to self. */ - owner = -owner; ioctl_status = ioctl (filedesc, SIOCGPGRP, &DEVICE_OLD_FCNTL_OWNER (d)); ioctl_status = ioctl (filedesc, SIOCSPGRP, &owner); @@ -965,8 +966,6 @@ #ifdef HAVE_WINDOW_SYSTEM else if (!DEVICE_STREAM_P (d)) { - /* Process group for socket should be -pid for delivery to self. */ - owner = -owner; ioctl_status = ioctl (filedesc, SIOCSPGRP, &DEVICE_OLD_FCNTL_OWNER (d)); } @@ -987,7 +986,7 @@ if (d->sigio_enabled) return; -#if defined (I_SETSIG) +#if defined (I_SETSIG) && !defined(HPUX10) ioctl (filedesc, I_SETSIG, DEVICE_OLD_SIGIO_FLAG (d) | S_INPUT); #elif defined (FASYNC) fcntl (filedesc, F_SETFL, DEVICE_OLD_SIGIO_FLAG (d) | FASYNC); @@ -999,7 +998,6 @@ use the following crud to do the appropriate thing. */ int on = 1; int ioctl_status; /* ####DG: check if IOCTL succeeds here. */ - int socket_pgroup = -getpid (); if (DEVICE_TTY_P (d)) { @@ -1009,7 +1007,6 @@ else if (!DEVICE_STREAM_P (d)) { ioctl_status = ioctl (filedesc, FIOASYNC, &on); - ioctl_status = ioctl (filedesc, SIOCSPGRP, &socket_pgroup); } #endif } @@ -1037,7 +1034,7 @@ if (!d->sigio_enabled) return; -#if defined (I_SETSIG) +#if defined (I_SETSIG) && !defined(HPUX10) ioctl (filedesc, I_SETSIG, DEVICE_OLD_SIGIO_FLAG (d)); #elif defined (FASYNC) fcntl (filedesc, F_SETFL, DEVICE_OLD_SIGIO_FLAG (d)); @@ -1049,7 +1046,6 @@ use the following crud to do the appropriate thing. */ int off = 0; - int socket_pgroup = 0; int ioctl_status; /* See comment for request_sigio_on_device */ @@ -1061,7 +1057,6 @@ else { ioctl_status = ioctl (filedesc, FIOASYNC, &off); - ioctl_status = ioctl (filedesc, SIOCSPGRP, &socket_pgroup); } } #elif defined (FIOASYNC) @@ -3058,7 +3053,6 @@ { DIRENTRY *rtnval; - /* #### currently we don't do conversions on the incoming data */ /* Apparently setting errno is necessary on some systems? Maybe readdir() doesn't always set errno ?! */ while (!(errno = 0, rtnval = readdir (dirp)) @@ -3113,6 +3107,20 @@ #endif /* ENCAPSULATE_ACCESS */ +#ifdef HAVE_EACCESS +#ifdef ENCAPSULATE_EACCESS + +int +sys_eaccess (CONST char *path, int mode) +{ + PATHNAME_CONVERT_OUT (path); + return eaccess (path, mode); +} + +#endif /* ENCAPSULATE_EACCESS */ +#endif /* HAVE_EACCESS */ + + #ifdef ENCAPSULATE_LSTAT int
--- a/src/sysdir.h Mon Aug 13 08:45:53 2007 +0200 +++ b/src/sysdir.h Mon Aug 13 08:46:35 2007 +0200 @@ -45,6 +45,9 @@ SunOS 4.1.2 host, reading a directory that is remote-mounted from a Solaris 2.1 host and is in a native Solaris 2.1 filesystem. + (and Solaris 2 doesn't have a d_nameln member at all! Posix.1 + doesn't specify it -- mrb) + Since applying strlen to the name always works, we'll just do that. */ #define NAMLEN(p) strlen (p->d_name)
--- a/src/sysfile.h Mon Aug 13 08:45:53 2007 +0200 +++ b/src/sysfile.h Mon Aug 13 08:46:35 2007 +0200 @@ -177,6 +177,17 @@ # define sys_access access #endif +#ifdef ENCAPSULATE_EACCESS +extern int sys_eaccess (CONST char *path, int mode); +#endif +#if defined (ENCAPSULATE_EACCESS) && !defined (DONT_ENCAPSULATE) +# undef eaccess +# define eaccess sys_eaccess +#endif +#if !defined (ENCAPSULATE_EACCESS) && defined (DONT_ENCAPSULATE) +# define sys_eaccess eaccess +#endif + #ifdef ENCAPSULATE_LSTAT extern int sys_lstat (CONST char *path, struct stat *buf); #endif
--- a/src/toolbar.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/toolbar.c Mon Aug 13 08:46:35 2007 +0200 @@ -252,16 +252,13 @@ static enum toolbar_pos decode_toolbar_position (Lisp_Object position) { - if (EQ (position, Qtop)) - return TOP_TOOLBAR; - else if (EQ (position, Qbottom)) - return BOTTOM_TOOLBAR; - else if (EQ (position, Qleft)) - return LEFT_TOOLBAR; - else if (EQ (position, Qright)) - return RIGHT_TOOLBAR; + if (EQ (position, Qtop)) return TOP_TOOLBAR; + if (EQ (position, Qbottom)) return BOTTOM_TOOLBAR; + if (EQ (position, Qleft)) return LEFT_TOOLBAR; + if (EQ (position, Qright)) return RIGHT_TOOLBAR; signal_simple_error ("Invalid toolbar position", position); - return 0; /* not reached */ + + return TOP_TOOLBAR; /* not reached */ } DEFUN ("set-default-toolbar-position", Fset_default_toolbar_position, @@ -664,7 +661,7 @@ { if (!NILP (buttons)) { - /* If this is the case the the only thing we saw was a + /* If this is the case the only thing we saw was a pushright marker. */ if (EQ (buttons, first_button)) { @@ -1249,13 +1246,13 @@ toolbar_size_changed_in_frame (Lisp_Object specifier, struct frame *f, Lisp_Object oldval) { - enum toolbar_pos pos; + int pos; - for (pos = 0; pos < 4; pos++) - if (EQ (specifier, Vtoolbar_size[pos])) + for (pos = 0; pos < countof (Vtoolbar_size); pos++) + if (EQ (specifier, Vtoolbar_size[(enum toolbar_pos) pos])) break; - assert (pos < 4); + assert (pos < countof (Vtoolbar_size)); MAYBE_FRAMEMETH (f, toolbar_size_changed_in_frame, (f, pos, oldval)); @@ -1268,13 +1265,13 @@ toolbar_visible_p_changed_in_frame (Lisp_Object specifier, struct frame *f, Lisp_Object oldval) { - enum toolbar_pos pos; + int pos; - for (pos = 0; pos < 4; pos++) - if (EQ (specifier, Vtoolbar_visible_p[pos])) + for (pos = 0; pos < countof (Vtoolbar_visible_p); pos++) + if (EQ (specifier, Vtoolbar_visible_p[(enum toolbar_pos) pos])) break; - assert (pos < 4); + assert (pos < countof (Vtoolbar_visible_p)); MAYBE_FRAMEMETH (f, toolbar_visible_p_changed_in_frame, (f, pos, oldval));
--- a/src/tooltalk.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/tooltalk.c Mon Aug 13 08:46:35 2007 +0200 @@ -979,7 +979,7 @@ CHECK_STRING (vtype); CHECK_TOOLTALK_CONSTANT (mode); - n = tooltalk_constant_value (mode); + n = (Tt_mode) tooltalk_constant_value (mode); if (!VALID_TOOLTALK_MESSAGEP (m)) return Qnil; @@ -1195,10 +1195,11 @@ CHECK_STRING (vtype); CHECK_TOOLTALK_CONSTANT (mode); - n = tooltalk_constant_value (mode); + n = (Tt_mode) tooltalk_constant_value (mode); if (!VALID_TOOLTALK_PATTERNP (p)) return Qnil; + { CONST char *vtype_ext;
--- a/src/unexec.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/unexec.c Mon Aug 13 08:46:35 2007 +0200 @@ -1101,7 +1101,7 @@ ) { /* Write only a page of zeros at once, - so that we we don't overshoot the start + so that we don't overshoot the start of the valid memory in the old data segment. */ if (nwrite > pagesize) nwrite = pagesize;
--- a/src/unexfreebsd.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/unexfreebsd.c Mon Aug 13 08:46:35 2007 +0200 @@ -289,8 +289,15 @@ /* We can get relocation sites in the bss region, for objects whose contents are copied from a shared library. We don't need or want to restore these at present. */ +#ifndef sparc if (ri->r_copy) return; +#else + /* Struct relocation_info_sparc doesn't have member r_copy. + Instead, we use the address to check if this is run-time-copied. */ + if (ri->r_address >= ts->bssaddr && ri->r_address < ts->endaddr) + return; +#endif offset = unexec_addr_to_offset (ri->r_address, ts); if (offset == -1) @@ -351,6 +358,7 @@ source++; *target = *source; } + break; default: unexec_error ("unknown reloc type %d seen during unexec()", 0, ri->r_type);
--- a/src/unexhp9k3.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/unexhp9k3.c Mon Aug 13 08:46:35 2007 +0200 @@ -41,6 +41,9 @@ #include <string.h> #include <stdio.h> #include <signal.h> +#ifdef __hp9000s300 +# include </usr/include/debug.h> +#endif #include <a.out.h> #include <unistd.h> #include <ctype.h> @@ -382,6 +385,14 @@ unexec_pad (new_fd, old_dataddr - old_hdr.a_text); /* + * Update debug header spoo + */ + if (new_hdr.a_extension > 0) + { + new_hdr.a_extension += LESYM_OFFSET(new_hdr) - LESYM_OFFSET(old_hdr); + } + + /* * go back and write the new header. */ unexec_write (new_fd, 0, (char *) &new_hdr, sizeof (new_hdr)); @@ -448,8 +459,43 @@ #endif unexec_copy (new_fd, old_fd, old_mcaloff, new_mcaloff, old_buf.st_size - old_mcaloff); + + { + long curpos, offset; + struct _debug_header dhdr; + int new_header_delta; + + new_header_delta = LESYM_OFFSET(new_hdr) - LESYM_OFFSET(old_hdr); + if ((new_header_delta > 0) && + ((offset = EXT_OFFSET(old_hdr)) > 0)) + { + curpos = lseek(new_fd, 0, SEEK_CUR); + lseek(old_fd, offset, 0); + if (read(old_fd, &dhdr, sizeof(dhdr)) == sizeof(dhdr)) + { + dhdr.header_offset += new_header_delta; + dhdr.gntt_offset += new_header_delta; + dhdr.lntt_offset += new_header_delta; + dhdr.slt_offset += new_header_delta; + dhdr.vt_offset += new_header_delta; + dhdr.xt_offset += new_header_delta; + lseek(new_fd, EXT_OFFSET(new_hdr), SEEK_SET); + if (write(new_fd, &dhdr, sizeof(dhdr)) != sizeof(dhdr)) + { + unexec_error("Unable to write debug information to \"%s\"\n", + 1, new_name); + } + lseek(new_fd, curpos, SEEK_SET); + } + else + { + unexec_error("Unable to read debug information from \"%s\"\n", + 1, old_name); + } + } + } } - + /* make the output file executable -- then quit */ unexec_fchmod (new_fd, 0755);
--- a/src/unexsol2.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/unexsol2.c Mon Aug 13 08:46:35 2007 +0200 @@ -20,7 +20,7 @@ /* Synched up with: Not in FSF. */ -/* #pragma ident "@(#) $Id: unexsol2.c,v 1.1.1.1 1996/12/18 03:39:00 steve Exp $" */ +/* #pragma ident "@(#) $Id: unexsol2.c,v 1.1.1.2 1996/12/18 03:48:53 steve Exp $" */ #include <stdlib.h> #include <stdio.h> @@ -29,6 +29,8 @@ #define DYNODUMP_SO "../dynodump/dynodump.so" #define DYNODUMP_SYM "dynodump" +int unexec (char *new_name, char *old_name, unsigned int data_start, + unsigned int bss_start, unsigned int entry_address); int unexec(char *new_name, char *old_name, unsigned int data_start, unsigned int bss_start, unsigned int entry_address)
--- a/src/window.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/window.c Mon Aug 13 08:46:35 2007 +0200 @@ -3057,7 +3057,7 @@ } pos = (((old_pos * new_pixsize) << 1) + old_pixsize) / div_val; - /* All but the the last window should have a height which is + /* All but the last window should have a height which is a multiple of the default line height. */ if (!NILP (c->next)) pos = (pos / line_size) * line_size;
--- a/src/xselect.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/xselect.c Mon Aug 13 08:46:35 2007 +0200 @@ -353,7 +353,7 @@ /* No, this is no good, because then Motif text fields don't bother to look up the new value, and you can't Copy from a buffer, Paste into a text field, then Copy something else from the buffer and - paste it intot he text field -- it pastes the first thing again. */ + paste it into the text field -- it pastes the first thing again. */ /* && !owned_p */ ) { @@ -367,7 +367,8 @@ int dataid; /* 1.2 wants long, but 1.1.5 wants int... */ #endif XmString fmh; - fmh = XmStringCreateLtoR ("Clipboard", XmSTRING_DEFAULT_CHARSET); + fmh = XmStringCreateLtoR ((String) "Clipboard", + XmSTRING_DEFAULT_CHARSET); while (ClipboardSuccess != XmClipboardStartCopy (display, selecting_window, fmh, thyme, #ifdef MOTIF_INCREMENTAL_CLIPBOARDS_WORK @@ -379,7 +380,8 @@ ; XmStringFree (fmh); while (ClipboardSuccess != - XmClipboardCopy (display, selecting_window, itemid, "STRING", + XmClipboardCopy (display, selecting_window, itemid, + (String) "STRING", #ifdef MOTIF_INCREMENTAL_CLIPBOARDS_WORK /* O'Reilly examples say size can be 0, but this clearly is not the case. */ @@ -503,8 +505,8 @@ if (STRINGP (check) || VECTORP (check) || SYMBOLP (check) || - INTP (check) || - CHARP (check) || + INTP (check) || + CHARP (check) || NILP (value)) return value; @@ -2112,17 +2114,18 @@ Xatoms_of_xselect (struct device *d) { #define ATOM(x) XInternAtom (DEVICE_X_DISPLAY (d), (x), False) +#define ATOMIZE(x) DEVICE_XATOM_##x (d) = ATOM(#x) /* Non-predefined atoms that we might end up using a lot */ - DEVICE_XATOM_CLIPBOARD (d) = ATOM ("CLIPBOARD"); - DEVICE_XATOM_TIMESTAMP (d) = ATOM ("TIMESTAMP"); - DEVICE_XATOM_TEXT (d) = ATOM ("TEXT"); - DEVICE_XATOM_DELETE (d) = ATOM ("DELETE"); - DEVICE_XATOM_MULTIPLE (d) = ATOM ("MULTIPLE"); - DEVICE_XATOM_INCR (d) = ATOM ("INCR"); - DEVICE_XATOM_EMACS_TMP (d) = ATOM ("_EMACS_TMP_"); - DEVICE_XATOM_TARGETS (d) = ATOM ("TARGETS"); - DEVICE_XATOM_NULL (d) = ATOM ("NULL"); - DEVICE_XATOM_ATOM_PAIR (d) = ATOM ("ATOM_PAIR"); - DEVICE_XATOM_COMPOUND_TEXT (d) = ATOM ("COMPOUND_TEXT"); + ATOMIZE (CLIPBOARD); + ATOMIZE (TIMESTAMP); + ATOMIZE (TEXT); + ATOMIZE (DELETE); + ATOMIZE (MULTIPLE); + ATOMIZE (INCR); + ATOMIZE (TARGETS); + ATOMIZE (NULL); + ATOMIZE (ATOM_PAIR); + ATOMIZE (COMPOUND_TEXT); + DEVICE_XATOM_EMACS_TMP (d) = ATOM ("_EMACS_TMP_"); }