Local Variables:
coding: iso-2022-7bit
End:
-
-arch-tag: 7ec2c5ea-4fe4-4937-b2cf-863e3cadc5c3
-2003-08-18 Lute Kamstra <Lute.Kamstra@cwi.nl>
-
- * configure.in: Revert the change of 2003-07-29 as GTK+ 2.2 is not
- required anymore.
-
-2003-08-07 Andrew Choi <akochoi@shaw.ca>
-
- * configure.in [powerpc-apple-darwin*]: Use the -no-cpp-precomp
- option instead of -traditional-cpp for CPP.
-
2003-07-29 Richard M. Stallman <rms@gnu.org>
* configure.in (HAVE_XIM): Define if XIM is available.
(*-sunos5.6*, *-solaris2.6*): New alternative.
(*-sunos5*): Use version 2.6 as default.
-2002-09-06 Kai Gro\e,A_\e(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+2002-09-06 Kai Gro\e,b_\e(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
* configure.in: Fix typo.
* configure.in (gamedir): Handle it like lispdir.
(--with-game-dir option): Delete.
-2002-06-21 Pavel Jan\e,Am\e(Bk <Pavel@Janik.cz>
+2002-06-21 Pavel Jan\e,Bm\e(Bk <Pavel@Janik.cz>
* configure.in: Add support for mipseb-*-netbsd* machines.
-2002-06-18 Kai Gro\e,A_\e(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+2002-06-18 Kai Gro\e,b_\e(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
* Makefile.in (install-arch-indep, uninstall): Add Tramp.
-2002-06-17 Kai Gro\e,A_\e(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+2002-06-17 Kai Gro\e,b_\e(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
* info/dir (File): Add an entry for Tramp.
* configure.in (emacs_cv_speed_t): Add square brackets for clarity.
-2002-05-04 Pavel Jan\e,Am\e(Bk <Pavel@Janik.cz>
+2002-05-04 Pavel Jan\e,Bm\e(Bk <Pavel@Janik.cz>
* make-dist: Do not distribute lock/ directory.
* configure.in: Delete configure check for access to the game user.
-2002-04-29 Pavel Jan\e,Am\e(Bk <Pavel@Janik.cz>
+2002-04-29 Pavel Jan\e,Bm\e(Bk <Pavel@Janik.cz>
* make-dist: lwlib/Imakefile is removed.
* make-dist: Create directories in mac/Emacs.app.
-2002-04-25 Pavel Jan\e,Am\e(Bk <Pavel@Janik.cz>
+2002-04-25 Pavel Jan\e,Bm\e(Bk <Pavel@Janik.cz>
* make-dist: lwlib-Xol* are removed.
* configure.in: Add --game-dir, --game-user. Test to see if we
can use them.
-2002-04-08 Pavel Jan\e,Am\e(Bk <Pavel@Janik.cz>
+2002-04-08 Pavel Jan\e,Bm\e(Bk <Pavel@Janik.cz>
* configure.in: Add --with-sound.
* configure.in (hppa*-*-linux-gnu*): New alternative.
-2001-12-08 Pavel Jan\e,Am\e(Bk <Pavel@Janik.cz>
+2001-12-08 Pavel Jan\e,Bm\e(Bk <Pavel@Janik.cz>
* make-dist: Copy COPYING to leim/, lwlib/, mac/ and nt/ when
creating distribution.
(HAVE_DES_H, HAVE_KRB5_H): Properly quote args of AC_CHECK_HEADERS;
this is required by recent Autoconf versions.
-2001-12-02 Pavel Jan\e,Am\e(Bk <Pavel@Janik.cz>
+2001-12-02 Pavel Jan\e,Bm\e(Bk <Pavel@Janik.cz>
* make-dist: Do not try to link removed files (aclocal.m4, _emacs,
TODO, vms-pp.trans and others).
-2001-11-29 Pavel Jan\e,Am\e(Bk <Pavel@Janik.cz>
+2001-11-29 Pavel Jan\e,Bm\e(Bk <Pavel@Janik.cz>
* make-dist: Use COPYING from the top-level directory.
* configure.in: Add support for FreeBSD/Alpha.
-2001-11-29 Pavel Jan\e,Am\e(Bk <Pavel@Janik.cz>
+2001-11-29 Pavel Jan\e,Bm\e(Bk <Pavel@Janik.cz>
* make-dist: Add COPYING to the top-level directory of the
distribution. Simplify the logic behind copying.
2001-11-22 Colin Walters <walters@debian.org>
* Makefile.in (install-arch-indep): Install the calc .info files.
- (uninstall): Handle deletion of calc .info files (thanks Pavel Jan\e,Am\e(Bk).
+ (uninstall): Handle deletion of calc .info files (thanks Pavel Jan\e,Bm\e(Bk).
2001-11-17 Eli Zaretskii <eliz@is.elta.co.il>
* configure.in: Add coff.h to the list in AC_CHECK_HEADERS.
-2001-11-15 Pavel Jan\e,Am\e(Bk <Pavel@Janik.cz>
+2001-11-15 Pavel Jan\e,Bm\e(Bk <Pavel@Janik.cz>
* Makefile.in (uninstall): Fix previous change.
* configure.in, Makefile.in: Add support for --program-prefix,
--program-suffix and --program-transform-name options.
-2001-11-13 Pavel Jan\e,Am\e(Bk <Pavel@Janik.cz>
+2001-11-13 Pavel Jan\e,Bm\e(Bk <Pavel@Janik.cz>
* Makefile.in (install-arch-indep): Use `${manext}' instead of `.1'.
(install-arch-indep): Install emacsclient manual page.
2001-11-12 Eli Zaretskii <eliz@is.elta.co.il>
* make-dist: Add lispref/index.*perm files to the distribution.
- From Pavel Jan\e,Am\e(Bk <Pavel@Janik.cz>.
+ From Pavel Jan\e,Bm\e(Bk <Pavel@Janik.cz>.
-2001-11-12 Pavel Jan\e,Am\e(Bk <Pavel@Janik.cz>
+2001-11-12 Pavel Jan\e,Bm\e(Bk <Pavel@Janik.cz>
* Makefile.in (uninstall): Remove gfdl.1 when uninstalling.
* configure.in: Added a check for <nlist.h>
-2001-11-01 Pavel Jan\e,Am\e(Bk <Pavel@Janik.cz>
+2001-11-01 Pavel Jan\e,Bm\e(Bk <Pavel@Janik.cz>
* configure.in: Reindent --help output.
From Per Starback (starback@ling.uu.se).
Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted provided the copyright notice and this notice are preserved.
-
-;;; arch-tag: ac61a779-1480-4884-b292-d0c39c127a73
+++ /dev/null
- Building and Installing Emacs from CVS
-
-Some of the files that are included in the Emacs tarball, such as
-byte-compiled Lisp files, are not stored in the CVS repository.
-Therefore, to build from CVS you must run "make bootstrap"
-instead of just "make":
-
- $ ./configure
- $ make bootstrap
-
-The bootstrap process makes sure all necessary files are rebuilt
-before it builds the final Emacs binary.
-
-Normally, it is not necessary to use "make bootstrap" after every CVS
-update. Unless there are problems, we suggest the following
-procedure:
-
- $ ./configure
- $ make
- $ cd lisp
- $ make recompile EMACS=../src/emacs
- $ cd ..
- $ make
-
-(If you want to install the Emacs binary, type "make install" instead
-of "make" in the last command.)
-
-If the above procedure fails, try "make bootstrap".
-
-Users of non-Posix systems (MS-Windows etc.) should run the
-platform-specific configuration scripts (nt/configure.bat, config.bat,
-etc.) before "make bootstrap" or "make"; the rest of the procedure is
-applicable to those systems as well.
-
-Note that "make bootstrap" overwrites some files that are under CVS
-control, such as lisp/loaddefs.el. This could produce CVS conflicts
-next time that you resync with the CVS. If you see such conflicts,
-overwrite your local copy of the file with the clean version from the
-CVS repository. For example:
-
- cvs update -C lisp/loaddefs.el
-
-Questions, requests, and bug reports about the CVS versions of Emacs
-sould be sent to emacs-pretest-bug@gnu.org rather.
src/xrdb.c
src/xselect.c
src/xterm.c
-
-;;; arch-tag: 869126d4-4851-41b2-8470-14dd492a3c98
-(cd lispintro && $(MAKE) $(MFLAGS) clean)
(cd leim; $(MAKE) $(MFLAGS) clean)
-# arch-tag: c1162ff6-e0a8-4366-bc1a-2eb544007156
-2003-08-19 Miles Bader <miles@gnu.org>
-
- * quick-install-emacs: Add arch-specific ignored files to
- quick-install-emacs. Use quoting for periods that's acceptable
- to recent versions of gawk.
-
-2003-08-11 Markus Rost <rost@math.ohio-state.edu>
-
- * cus-test.el: Remove obsolete workaround.
-
2003-04-22 Andrew Innes <andrewi@gnu.org>
* nt/makedist.bat: Fix multi-file .zip distribution, by splitting
Copyright (C) 2001 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted provided the copyright notice and this notice are preserved.
-
-;;; arch-tag: 97728c77-77c0-4156-b669-0e8c07d94e5a
make-tarball.txt instructions to create pretest or release tarballs
quick-install-emacs install emacs quickly (`incrementally')
revdiff get CVS diffs of files
-
-# arch-tag: 812b9461-bc0a-46a7-925e-24bd41118463
(rx (and "EMACSVER" (1+ space)
(submatch (1+ (in "0-9.")))))))
-;;; arch-tag: 4ea83636-2293-408b-884e-ad64f22a3bf5
;; admin.el ends here.
XCloseDisplay (dpy);
return 0;
}
-
-/* arch-tag: f1be90ac-5b70-43c2-835e-5a6432a25145
- (do not change this comment) */
# Local Variables:
# mode: cperl
# End:
-
-# arch-tag: 20a4452d-610a-4e54-9abc-ffe79f5c0d30
--- /dev/null
+# Makefile -- Makefile to generate charset maps in etc/charsets.
+# Copyright (C) 2003
+# National Institute of Advanced Industrial Science and Technology (AIST)
+# Registration Number H13PRO009
+#
+# 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
+
+# At first, set these environment variables:
+# GLIBC_CHARMAPS
+# Directory of glibc-VERSION/localedate/charmaps.
+# VERSION must be 2.3 or the later.
+# MISC_CHARMAPS
+# Direcory containing these charmap files:
+# o bulgarian-mik.txt.gz
+# provided at <http://czyborra.com/charsets/>
+# o PTCP154
+# provided at <http://www.iana.org/assignments/charset-reg/>
+# o stdenc.txt and symbol.txt
+# provided at <http://www.unicode.org/Public/MAPPINGS/>
+# o Uni2JIS
+# provided at <http://kanji.zinbun.kyoto-u.ac.jp/~yasuoka/CJK.html>
+# o 720.htm and 858.htm
+# provided at <http://www.microsoft.com/globaldev/reference/oem/>
+# OLDEMACS
+# emacs of version 21.3.50 or later
+#
+# Then, do this:
+# % make install
+
+CHARSETS = ${ISO8859} ${IBM} ${CODEPAGE} ${CJK} ${MISC} ${MULE}
+
+# Note: We can not prepend "ISO-" to these map files because of file
+# name limits on DOS.
+ISO8859 = \
+ 8859-2.map 8859-3.map 8859-4.map 8859-5.map 8859-6.map 8859-7.map \
+ 8859-8.map 8859-9.map 8859-10.map 8859-11.map 8859-13.map 8859-14.map \
+ 8859-15.map 8859-16.map
+
+IBM = \
+ IBM037.map IBM038.map \
+ IBM256.map IBM273.map IBM274.map IBM275.map IBM277.map IBM278.map \
+ IBM280.map IBM281.map IBM284.map IBM285.map IBM290.map IBM297.map \
+ IBM420.map IBM423.map IBM424.map IBM437.map IBM500.map IBM850.map \
+ IBM851.map IBM852.map IBM855.map IBM856.map IBM857.map IBM860.map \
+ IBM861.map IBM862.map IBM863.map IBM864.map IBM865.map IBM866.map \
+ IBM868.map IBM869.map IBM870.map IBM871.map IBM874.map IBM875.map \
+ IBM880.map IBM891.map IBM903.map IBM904.map IBM905.map IBM918.map \
+ IBM1004.map IBM1026.map IBM1047.map
+
+CODEPAGE = \
+ CP737.map CP775.map CP1125.map\
+ CP1250.map CP1251.map CP1252.map CP1253.map CP1254.map \
+ CP1255.map CP1256.map CP1257.map CP1258.map \
+ CP10007.map \
+ CP720.map CP858.map
+
+CJK = GB2312.map GBK.map GB180302.map GB180304.map \
+ BIG5.map BIG5-HKSCS.map\
+ CNS-1.map CNS-2.map CNS-3.map CNS-4.map CNS-5.map CNS-6.map CNS-7.map \
+ CNS-F.map \
+ JISX0201.map JISX0208.map JISX0212.map JISX2131.map JISX2132.map \
+ JISC6226.map \
+ KSC5601.map KSC5636.map JOHAB.map
+
+MISC = KOI-8.map KOI8-R.map KOI8-U.map KOI8-T.map ALTERNATIVNYJ.map \
+ MIK.map PTCP154.map \
+ TIS-620.map VISCII.map VSCII.map VSCII-2.map\
+ KA-PS.map KA-ACADEMY.map \
+ HP-ROMAN8.map NEXTSTEP.map MACINTOSH.map EBCDICUK.map EBCDICUS.map \
+ stdenc.map symbol.map \
+ CP949-2BYTE.map \
+ BIG5-1.map BIG5-2.map
+
+# Emacs-mule charsets.
+MULE = MULE-ethiopic.map MULE-ipa.map MULE-is13194.map \
+ MULE-sisheng.map MULE-tibetan.map \
+ MULE-lviscii.map MULE-uviscii.map
+
+charsets: ${CHARSETS}
+
+AWK = gawk
+
+# Rules for each charset
+
+VSCII.map: ${GLIBC_CHARMAPS}/TCVN5712-1 mapconv compact.awk
+ # Generating $@...
+ @mapconv $< '/^<.*[ ]\/x[0-9a-f].[ ]/' GLIBC-1 compact.awk > $@
+
+VSCII-2.map: ${GLIBC_CHARMAPS}/TCVN5712-1 mapconv compact.awk
+ # Generating $@...
+ @mapconv $< '/^<.*[ ]\/x[2-7a-f].[ ]/' GLIBC-1 compact.awk \
+ | sed 's/0x20-0x7F.*/0x00-0x7F 0x0000/' > $@
+
+ALTERNATIVNYJ.map: IBM866.map
+ # Generating $@...
+ @echo "# Modified from ibm866 according to the chart at" > $@
+ @echo "# http://www.cyrillic.com/ref/cyrillic/koi-8alt.html," >> $@
+ @echo "# with guesses for the Unicodes of the glyphs." >> $@
+ @sed -e '/0xF2/ s/ .*/ 0x2019/' \
+ -e '/0xF3/ s/ .*/ 0x2018/' \
+ -e '/0xF4/ s/ .*/ 0x0301/' \
+ -e '/0xF5/ s/ .*/ 0x0300/' \
+ -e '/0xF6/ s/ .*/ 0x203A/' \
+ -e '/0xF7/ s/ .*/ 0x2039/' \
+ -e '/0xF8/ s/ .*/ 0x2191/' \
+ -e '/0xF9/ s/ .*/ 0x2193/' \
+ -e '/0xFA/ s/ .*/ 0x00B1/' \
+ -e '/0xFB/ s/ .*/ 0x00F7/' < $< >> $@
+
+MIK.map: ${MISC_CHARMAPS}/bulgarian-mik.txt.gz mapconv compact.awk
+ # Generating $@...
+ @mapconv $< '1,$$' CZYBORRA compact.awk > $@
+
+PTCP154.map: ${MISC_CHARMAPS}/PTCP154 mapconv compact.awk
+ # Generating $@...
+ @mapconv $< '/^0x/' IANA compact.awk > $@
+
+stdenc.map: ${MISC_CHARMAPS}/stdenc.txt mapconv compact.awk
+ # Generating $@...
+ @mapconv $< '/^[0-9A-Fa-f]/' UNICODE compact.awk > $@
+
+symbol.map: ${MISC_CHARMAPS}/symbol.txt mapconv compact.awk
+ # Generating $@...
+ @mapconv $< '/^[0-9A-Fa-f]/' UNICODE compact.awk > $@
+
+CP720.map: ${MISC_CHARMAPS}/720.htm mapconv compact.awk
+ # Generating $@...
+ @mapconv $< '/^[0-9A-F]/' MICROSOFT compact.awk > $@
+
+CP858.map: ${MISC_CHARMAPS}/858.htm mapconv compact.awk
+ # Generating $@...
+ @mapconv $< '/^[0-9A-F]/' MICROSOFT compact.awk > $@
+
+CP949-2BYTE.map: ${GLIBC_CHARMAPS}/CP949 mapconv compact.awk
+ # Generating $@...
+ @mapconv $< '/^<.*[ ]\/x[89a-f]/' GLIBC-2 compact.awk > $@
+
+GB2312.map: ${GLIBC_CHARMAPS}/GB2312 mapconv compact.awk
+ # Generating $@...
+ @mapconv $< '/^<.*[ ]\/x[a-f]/' GLIBC-2-7 compact.awk > $@
+
+GBK.map: ${GLIBC_CHARMAPS}/GBK mapconv compact.awk
+ # Generating $@...
+ @mapconv $< '/^<.*[ ]\/x[89a-f]/' GLIBC-2 compact.awk > $@
+
+GB180302.map: ${GLIBC_CHARMAPS}/GB18030 mapconv gb180302.awk
+ # Generating $@...
+ @mapconv $< '/^<.*[ ]\/x..\/x..[ ]/' GLIBC-2 gb180302.awk > $@
+
+GB180304.map: GB180302.map gb180304.awk
+ # Generating $@...
+ @$(AWK) -f gb180304.awk < $< > $@
+
+JISX0201.map: ${GLIBC_CHARMAPS}/JIS_X0201 mapconv compact.awk
+ # Generating $@...
+ @mapconv $< '/^<.*[ ]\/x[0-9]/' GLIBC-1 compact.awk > $@
+ @echo "# Generated by hand" >> $@
+ @echo "0xA1-0xDF 0xFF61" >> $@
+
+JISX0208.map: ${GLIBC_CHARMAPS}/EUC-JP mapconv
+ # Generating $@...
+ @mapconv $< '/^<.*[ ]\/x[a-f]/' GLIBC-2-7 > $@
+
+JISX0212.map: ${GLIBC_CHARMAPS}/EUC-JP mapconv compact.awk
+ # Generating $@...
+ @mapconv $< '/^<.*[ ]\/x8f/ s,/x8f,,' GLIBC-2-7 compact.awk > $@
+
+JISX2131.map: ${GLIBC_CHARMAPS}/EUC-JISX0213 mapconv
+ # Generating $@...
+ @mapconv $< '/^<.*[ ]\/x[a-f]/' GLIBC-2-7 > $@
+
+JISX2132.map: ${GLIBC_CHARMAPS}/EUC-JISX0213 mapconv
+ # Generating $@...
+ @mapconv $< '/^<.*[ ]\/x8f/ s,/x8f,,' GLIBC-2-7 > $@
+
+JISC6226.map : ${MISC_CHARMAPS}/Uni2JIS mapconv kuten.awk
+ # Generating $@...
+ @mapconv $< '/^[^#].*0-/' YASUOKA kuten.awk > $@
+
+KSC5601.map: ${GLIBC_CHARMAPS}/EUC-KR mapconv compact.awk
+ # Generating $@...
+ @mapconv $< '/^<.*[ ]\/x[a-f]/' GLIBC-2-7 compact.awk > $@
+
+BIG5.map: ${GLIBC_CHARMAPS}/BIG5 mapconv compact.awk
+ # Generating $@...
+ @mapconv $< '/^<.*[ ]\/x[a-f]/' GLIBC-2 > $@
+
+BIG5-1.map: BIG5.map mapconv big5.awk
+ # Generating $@...
+ @echo "Generated from $<" > $@
+ @sed -n -e '/0xa140/,/0xc8fe/p' < $< | gawk -f big5.awk >> $@
+
+BIG5-2.map: BIG5.map mapconv big5.awk
+ # Generating $@...
+ @echo "Generated from $<" > $@
+ @sed -n -e '/0xc940/,$$ p' < $< | gawk -f big5.awk >> $@
+
+BIG5-HKSCS.map: ${GLIBC_CHARMAPS}/BIG5-HKSCS mapconv compact.awk
+ # Generating $@...
+ @mapconv $< '/^<.*[ ]\/x[89a-f].\//' GLIBC-2 compact.awk > $@
+
+JOHAB.map: ${GLIBC_CHARMAPS}/JOHAB mapconv compact.awk
+ # Generating $@...
+ @mapconv $< '/^<.*[ ]\/x[89a-f]/' GLIBC-2 compact.awk > $@
+
+CNS-1.map: ${GLIBC_CHARMAPS}/EUC-TW mapconv compact.awk
+ # Generating $@...
+ @mapconv $< '/^<.*[ ]\/x[a-f]/' GLIBC-2-7 compact.awk > $@
+
+CNS-2.map: ${GLIBC_CHARMAPS}/EUC-TW mapconv compact.awk
+ # Generating $@...
+ @mapconv $< '/^<.*\/x8e\/xa2/s,/x8e/xa2,,' GLIBC-2-7 compact.awk > $@
+
+CNS-3.map: ${GLIBC_CHARMAPS}/EUC-TW mapconv compact.awk
+ # Generating $@...
+ @mapconv $< '/^<.*\/x8e\/xa3/ s,/x8e/xa3,,' GLIBC-2-7 compact.awk > $@
+
+CNS-4.map: ${GLIBC_CHARMAPS}/EUC-TW mapconv compact.awk
+ # Generating $@...
+ @mapconv $< '/^<.*\/x8e\/xa4/ s,/x8e/xa4,,' GLIBC-2-7 compact.awk > $@
+
+CNS-5.map: ${GLIBC_CHARMAPS}/EUC-TW mapconv compact.awk
+ # Generating $@...
+ @mapconv $< '/^<.*\/x8e\/xa5/ s,/x8e/xa5,,' GLIBC-2-7 compact.awk > $@
+
+CNS-6.map: ${GLIBC_CHARMAPS}/EUC-TW mapconv compact.awk
+ # Generating $@...
+ @mapconv $< '/^<.*\/x8e\/xa6/ s,/x8e/xa6,,' GLIBC-2-7 compact.awk > $@
+
+CNS-7.map: ${GLIBC_CHARMAPS}/EUC-TW mapconv compact.awk
+ # Generating $@...
+ @mapconv $< '/^<.*\/x8e\/xa7/ s,/x8e/xa7,,' GLIBC-2-7 compact.awk > $@
+
+CNS-F.map: ${GLIBC_CHARMAPS}/EUC-TW mapconv compact.awk
+ # Generating $@...
+ @mapconv $< '/^<.*\/x8e\/xaf/ s,/x8e/xaf,,' GLIBC-2-7 compact.awk > $@
+
+# General target to produce map files for mule charsets.
+MULE-%.map: mule-charsets.el
+ # Generating $@...
+ @${OLDEMACS} -batch -l ./mule-charsets.el $@
+
+# General target to produce map files for ISO-8859, GEORGIAN, and
+# EBCDIC charsets. We can not use the original file name because of
+# file name limit on DOS. "KA" is ISO 639 language code for Georgian.
+
+8859-%.map: ${GLIBC_CHARMAPS}/ISO-8859-% mapconv compact.awk
+ # Generating $@...
+ @mapconv $< '/^<.*[ ]\/x/' GLIBC-1 compact.awk > $@
+
+KA-%.map: ${GLIBC_CHARMAPS}/GEORGIAN-% mapconv compact.awk
+ # Generating $@...
+ @mapconv $< '/^<.*[ ]\/x/' GLIBC-1 compact.awk > $@
+
+EBCDIC%.map: ${GLIBC_CHARMAPS}/EBCDIC-% mapconv compact.awk
+ # Generating $@...
+ @mapconv $< '/^<.*[ ]\/x/' GLIBC-1 compact.awk > $@
+
+# General target to produce map files for single-byte charsets.
+
+%.map: ${GLIBC_CHARMAPS}/% mapconv compact.awk
+ # Generating $@...
+ @mapconv $< '/^<.*[ ]\/x/' GLIBC-1 compact.awk > $@
+
+install: ${CHARSETS}
+ cp ${CHARSETS} ../../etc/charsets
+
+# Clear files that are automatically generated.
+clean:
+ rm -f ${CHARSETS}
--- /dev/null
+BEGIN {
+ tohex["A"] = 10;
+ tohex["B"] = 11;
+ tohex["C"] = 12;
+ tohex["D"] = 13;
+ tohex["E"] = 14;
+ tohex["F"] = 15;
+ tohex["a"] = 10;
+ tohex["b"] = 11;
+ tohex["c"] = 12;
+ tohex["d"] = 13;
+ tohex["e"] = 14;
+ tohex["f"] = 15;
+}
+
+function decode_hex(str) {
+ n = 0;
+ len = length(str);
+ for (i = 1; i <= len; i++)
+ {
+ c = substr (str, i, 1);
+ if (c >= "0" && c <= "9")
+ n = n * 16 + (c - "0");
+ else
+ n = n * 16 + tohex[c];
+ }
+ return n;
+}
+
+function decode_big5(big5) {
+ b0 = int(big5 / 256);
+ b1 = big5 % 256;
+# (0xFF - 0xA1 + 0x7F - 0x40) = 157
+# (0xA1 - (0x7F - 0x40)) = 98
+# (0xC9 - 0xA1) * (0xFF - 0xA1 + 0x7F - 0x40) = 6280
+ if (b1 < 127)
+ idx = (b0 - 161) * 157 + (b1 - 64);
+ else
+ idx = (b0 - 161) * 157 + (b1 - 98);
+ if (b0 >= 201)
+ idx -= 6280;
+ b0 = int(idx / 94) + 33;
+ b1 = (idx % 94) + 33;
+ return (b0 * 256 + b1)
+}
+
+{
+ big5 = decode_hex($1);
+ code = decode_big5(big5);
+ printf "0x%04X %s\n", code, $2;
+}
+
+
--- /dev/null
+# compact.awk -- Make charset map compact.
+# Copyright (C) 2003
+# National Institute of Advanced Industrial Science and Technology (AIST)
+# Registration Number H13PRO009
+#
+# 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.
+
+# Comment:
+# Make a charset map compact by changing this kind of line sequence:
+# 0x00 0x0000
+# 0x01 0x0001
+# ...
+# 0x7F 0x007F
+# to one line of this format:
+# 0x00-0x7F 0x0000
+
+BEGIN {
+ tohex["0"] = 1;
+ tohex["1"] = 2;
+ tohex["2"] = 3;
+ tohex["3"] = 4;
+ tohex["4"] = 5;
+ tohex["5"] = 6;
+ tohex["6"] = 7;
+ tohex["7"] = 8;
+ tohex["8"] = 9;
+ tohex["9"] = 10;
+ tohex["A"] = 11;
+ tohex["B"] = 12;
+ tohex["C"] = 13;
+ tohex["D"] = 14;
+ tohex["E"] = 15;
+ tohex["F"] = 16;
+ tohex["a"] = 11;
+ tohex["b"] = 12;
+ tohex["c"] = 13;
+ tohex["d"] = 14;
+ tohex["e"] = 15;
+ tohex["f"] = 16;
+ from_code = 0;
+ to_code = -1;
+ to_unicode = 0;
+ from_unicode = 0;
+}
+
+function decode_hex(str, idx) {
+ n = 0;
+ len = length(str);
+ for (i = idx; i <= len; i++)
+ {
+ c = tohex[substr (str, i, 1)];
+ if (c == 0)
+ break;
+ n = n * 16 + c - 1;
+ }
+ return n;
+}
+
+/^\#/ {
+ print;
+ next;
+}
+
+{
+ code = decode_hex($1, 3);
+ unicode = decode_hex($2, 3);
+ if ((code == to_code + 1) && (unicode == to_unicode + 1))
+ {
+ to_code++;
+ to_unicode++;
+ }
+ else
+ {
+ if (to_code < 256)
+ {
+ if (from_code == to_code)
+ printf "0x%02X 0x%04X\n", from_code, from_unicode;
+ else if (from_code < to_code)
+ printf "0x%02X-0x%02X 0x%04X\n", from_code, to_code, from_unicode;
+ }
+ else
+ {
+ if (from_code == to_code)
+ printf "0x%04X 0x%04X\n", from_code, from_unicode;
+ else if (from_code < to_code)
+ printf "0x%04X-0x%04X 0x%04X\n", from_code, to_code, from_unicode;
+ }
+ from_code = to_code = code;
+ from_unicode = to_unicode = unicode;
+ }
+}
+
+END {
+ if (to_code < 256)
+ {
+ if (from_code == to_code)
+ printf "0x%02X 0x%04X\n", from_code, from_unicode;
+ else
+ printf "0x%02X-0x%02X 0x%04X\n", from_code, to_code, from_unicode;
+ }
+ else
+ {
+ if (from_code == to_code)
+ printf "0x%04X 0x%04X\n", from_code, from_unicode;
+ else
+ printf "0x%04X-0x%04X 0x%04X\n", from_code, to_code, from_unicode;
+ }
+}
--- /dev/null
+BEGIN {
+ tohex["A"] = 10;
+ tohex["B"] = 11;
+ tohex["C"] = 12;
+ tohex["D"] = 13;
+ tohex["E"] = 14;
+ tohex["F"] = 15;
+ tohex["a"] = 10;
+ tohex["b"] = 11;
+ tohex["c"] = 12;
+ tohex["d"] = 13;
+ tohex["e"] = 14;
+ tohex["f"] = 15;
+ from_gb = 0;
+ to_gb = -1;
+ to_unicode = 0;
+ from_unicode = 0;
+}
+
+function decode_hex(str) {
+ n = 0;
+ len = length(str);
+ for (i = 1; i <= len; i++)
+ {
+ c = substr (str, i, 1);
+ if (c >= "0" && c <= "9")
+ n = n * 16 + (c - "0");
+ else
+ n = n * 16 + tohex[c];
+ }
+ return n;
+}
+
+function gb_to_index(gb) {
+ b0 = int(gb / 256);
+ b1 = gb % 256;
+ idx = (((b0 - 129)) * 191 + b1 - 64);
+# if (b1 >= 128)
+# idx--;
+ return idx
+}
+
+function index_to_gb(idx) {
+ b0 = int(idx / 191) + 129;
+ b1 = (idx % 191) + 64;
+# if (b1 >= 127)
+# b1++;
+ return (b0 * 256 + b1);
+}
+
+/^\#/ {
+ print;
+ next;
+}
+
+{
+ gb = gb_to_index(decode_hex(substr($1, 3, 4)));
+ unicode = decode_hex(substr($2, 3, 4));
+ if ((gb == to_gb + 1) && (unicode == to_unicode + 1))
+ {
+ to_gb++;
+ to_unicode++;
+ }
+ else
+ {
+ if (from_gb == to_gb)
+ printf "0x%04X 0x%04X\n", index_to_gb(from_gb), from_unicode;
+ else if (from_gb < to_gb)
+ printf "0x%04X-0x%04X 0x%04X\n",
+ index_to_gb(from_gb), index_to_gb(to_gb), from_unicode;
+ from_gb = to_gb = gb;
+ from_unicode = to_unicode = unicode;
+ }
+}
+
+END {
+ if (from_gb <= to_gb)
+ printf "0x%04X-0x%04X 0x%04X\n",
+ index_to_gb(from_gb), index_to_gb(to_gb), from_unicode;
+}
--- /dev/null
+BEGIN {
+ tohex["A"] = 10;
+ tohex["B"] = 11;
+ tohex["C"] = 12;
+ tohex["D"] = 13;
+ tohex["E"] = 14;
+ tohex["F"] = 15;
+ tohex["a"] = 10;
+ tohex["b"] = 11;
+ tohex["c"] = 12;
+ tohex["d"] = 13;
+ tohex["e"] = 14;
+ tohex["f"] = 15;
+}
+
+function decode_hex(str) {
+ n = 0;
+ len = length(str);
+ for (i = 1; i <= len; i++)
+ {
+ c = substr (str, i, 1);
+ if (c >= "0" && c <= "9")
+ n = n * 16 + (c - "0");
+ else
+ n = n * 16 + tohex[c];
+ }
+ return n;
+}
+
+function gb_to_index(gb) {
+ b0 = int(gb / 256);
+ b1 = gb % 256;
+ idx = (((b0 - 129)) * 191 + b1 - 64);
+# if (b1 >= 127)
+# idx--;
+ return idx
+}
+
+function index_to_gb(idx) {
+ b3 = (idx % 10) + 48;
+ idx = int(idx / 10);
+ b2 = (idx % 126) + 129;
+ idx = int(idx / 126);
+ b1 = (idx % 10) + 48;
+ b0 = int(idx / 10) + 129;
+ return sprintf("%02X%02X%02X%02X", b0, b1, b2, b3);
+}
+
+/^\#/ {
+ print;
+ next;
+}
+
+/0x....-0x..../ {
+ gb_from = gb_to_index(decode_hex(substr($1, 3, 4)));
+ gb_to = gb_to_index(decode_hex(substr($1, 10, 4)));
+ unicode = decode_hex(substr($2, 3, 4));
+ while (gb_from <= gb_to)
+ {
+ table[unicode++] = 1;
+ gb_from++;
+ }
+ next;
+}
+
+{
+ gb = decode_hex(substr($1, 3, 4));
+ unicode = decode_hex(substr($2, 3, 4));
+ table[unicode] = 1;
+}
+
+END {
+ from_gb = -1;
+ to_gb = 0;
+ from_i = 0;
+ table[65536] = 1;
+ for (i = 128; i <= 65536; i++)
+ {
+ if (table[i] == 0)
+ {
+ if (i < 55296 || i >= 57344)
+ {
+ if (from_gb < 0)
+ {
+ from_gb = to_gb;
+ from_i = i;
+ }
+ to_gb++;
+ }
+ }
+ else if (from_gb >= 0)
+ {
+ if (from_gb + 1 == to_gb)
+ printf "0x%s\t\t0x%04X\n",
+ index_to_gb(from_gb), from_i;
+ else
+ printf "0x%s-0x%s\t0x%04X\n",
+ index_to_gb(from_gb), index_to_gb(to_gb - 1), from_i;
+ from_gb = -1;
+ }
+ }
+}
--- /dev/null
+/^[0-9]/ {
+ ku=substr($1, 3, 2) + 32;
+ ten=substr($1, 5, 2) + 32;
+ printf "0x%02X%02X %s\n", ku, ten, $2;
+}
--- /dev/null
+#!/bin/sh
+#
+# Copyright (C) 2003
+# National Institute of Advanced Industrial Science and Technology (AIST)
+# Registration Number H13PRO009
+#
+# 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.
+
+# Comment:
+# Convert charset map of various format into this:
+# 0xXX 0xYYYY
+# where,
+# XX is a code point of the charset in hexa-decimal,
+# YYYY is the corresponding Unicode character code in hexa-decimal.
+# Arguments are:
+# $1: source map file
+# $2: address pattern for sed (optionally with substitution command)
+# $3: format of source map file
+# GLIBC-1 GLIBC-2 GLIBC-2-7 CZYBORRA IANA UNICODE YASUOKA MICROSOFT
+# $4: awk script
+
+BASE=`basename $1`
+
+case "$3" in
+ GLIBC*)
+ SOURCE=`echo $1 | sed 's/.*\(glibc.*$\)/\1/'`;;
+ CZYBORRA)
+ SOURCE="http://czyborra.com/charsets/${BASE}";;
+ IANA)
+ SOURCE="http://www.iana.org/assignments/charset-reg/${BASE}";;
+ UNICODE)
+ SOURCE="http://www.unicode.org/Public/MAPPINGS/.../${BASE}";;
+ YASUOKA)
+ SOURCE="http://kanji.zinbun.kyoto-u.ac.jp/~yasuoka/.../${BASE}";;
+ MICROSOFT)
+ SOURCE="http://www.microsoft.com/globaldev/reference/oem/${BASE}";;
+ *)
+ echo "Unknown file type: $3";
+ exit 1;;
+esac
+
+echo "# Generated from $SOURCE"
+
+if [ -n "$4" ] ; then
+ if [ -f "$4" ] ; then
+ AWKPROG="gawk -f $4"
+ else
+ echo "Awk program does not exist: $4"
+ exit 1
+ fi
+else
+ AWKPROG=cat
+fi
+
+if [ "$3" == "GLIBC-1" ] ; then
+ # Source format is:
+ # <UYYYY> /xXX
+ sed -n -e "$2 p" < $1 \
+ | sed -e 's,<U\([^>]*\)>[ ]*/x\(..\).*,0x\2 0x\1,' \
+ | sort | ${AWKPROG}
+elif [ "$3" == "GLIBC-2" ] ; then
+ # Source format is:
+ # <UYYYY> /xXX/xZZ
+ sed -n -e "$2 p" < $1 \
+ | sed -e 's,<U\([^>]*\)>[ ]*/x\(..\)/x\(..\).*,0x\2\3 0x\1,' \
+ | sort | ${AWKPROG}
+elif [ "$3" == "GLIBC-2-7" ] ; then
+ # Source format is:
+ # <UYYYY> /xXX/xZZ
+ # We must drop MSBs of XX and ZZ
+ sed -n -e "$2 p" < $1 \
+ | sed -e 's/xa/x2/g' -e 's/xb/x3/g' -e 's/xc/x4/g' \
+ -e 's/xd/x5/g' -e 's/xe/x6/g' -e 's/xf/x7/g' \
+ -e 's,<U\([^>]*\)>[ ]*/x\(..\)/x\(..\).*,0x\2\3 0x\1,' \
+ | tee temp \
+ | sort | ${AWKPROG}
+elif [ "$3" == "CZYBORRA" ] ; then
+ # Source format is:
+ # =XX U+YYYY
+ zcat $1 | sed -n -e "$2 p" \
+ | sed -e 's/=\(..\)[^U]*U+\([0-9A-F]*\).*/0x\1 0x\2/' \
+ | sort | ${AWKPROG}
+elif [ "$3" == "IANA" ] ; then
+ # Source format is:
+ # 0xXX 0xYYYY
+ sed -n -e "$2 p" < $1 \
+ | sed -e 's/\(0x[0-9A-Fa-f]*\)[^0]*\(0x[0-9A-Fa-f]*\).*/\1 \2/' \
+ | sort | ${AWKPROG}
+elif [ "$3" == "UNICODE" ] ; then
+ # Source format is:
+ # YYYY XX
+ sed -n -e "$2 p" < $1 \
+ | sed -e 's/\([0-9A-F]*\)[^0-9A-F]*\([0-9A-F]*\).*/0x\2 0x\1/' \
+ | sort | ${AWKPROG}
+elif [ "$3" == "YASUOKA" ] ; then
+ # Source format is:
+ # YYYY 0-XXXX (XXXX is a Kuten code)
+ sed -n -e "$2 p" < $1 \
+ | sed -e 's/\([0-9A-F]*\)[^0]*0-\([0-9]*\).*/0x\2 0x\1/' \
+ | sort | ${AWKPROG}
+elif [ "$3" == "MICROSOFT" ] ; then
+ # Source format is:
+ # XX = U+YYYY
+ sed -n -e "$2 p" < $1 \
+ | sed -e 's/\([0-9A-F]*\).*U+\([0-9A-F]*\).*/0x\1 0x\2/' \
+ | sort | ${AWKPROG}
+else
+ echo "Invalid arguments"
+ exit 1
+fi
--- /dev/null
+;; mule-charsets.el -- Generate Mule-orignal charset maps.
+;; Copyright (C) 2003
+;; National Institute of Advanced Industrial Science and Technology (AIST)
+;; Registration Number H13PRO009
+
+;; 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.
+
+(if (or (< emacs-major-version 21)
+ (< emacs-minor-version 3)
+ (and (= emacs-minor-version 3)
+ (string< emacs-version "21.3.50")))
+ (error "Use Emacs of version 21.3.50 or later"))
+
+(defun func (start end)
+ (while (<= start end)
+ (let ((split (split-char start))
+ (unicode (encode-char start 'ucs)))
+ (if unicode
+ (if (nth 2 split)
+ (insert (format "0x%02X%02X 0x%04X\n"
+ (nth 1 split) (nth 2 split) unicode))
+ (insert (format "0x%02X 0x%04X\n" (nth 1 split) unicode)))))
+ (setq start (1+ start))))
+
+(defconst charset-alist
+ '(("MULE-ethiopic.map" . ethiopic)
+ ("MULE-ipa.map" . ipa)
+ ("MULE-is13194.map" . indian-is13194)
+ ("MULE-sisheng.map" . chinese-sisheng)
+ ("MULE-tibetan.map" . tibetan)
+ ("MULE-lviscii.map" . vietnamese-viscii-lower)
+ ("MULE-uviscii.map" . vietnamese-viscii-upper)))
+
+(setq file (car command-line-args-left))
+(or (stringp file)
+ (error "Invalid file name: %s" file))
+(setq charset (cdr (assoc file charset-alist)))
+(or charset
+ (error "Invalid charset: %s" (car command-line-args-left)))
+
+(with-temp-buffer
+ (map-charset-chars 'func charset)
+ (write-file file))
}
}
-# arch-tag: e75331f5-5d1b-4393-ad5b-b0f87b5d47b0
;; This avoids a hang of `cus-test-apropos' in 21.2.
;; (add-to-list 'cus-test-skip-list 'sh-alias-alist)
+;; Don't create a file `filesets-menu-cache-file'.
+(setq filesets-menu-cache-file "")
+;; Disable filesets hooks.
+(add-hook
+ 'cus-test-after-load-libs-hook
+ (lambda nil
+ (remove-hook 'menu-bar-update-hook 'filesets-build-menu-maybe)
+ (remove-hook 'kill-emacs-hook 'filesets-exit)
+ (remove-hook 'kill-buffer-hook 'filesets-remove-from-ubl)
+ (remove-hook 'first-change-hook 'filesets-reset-filename-on-change)
+ ))
+
;; Loading dunnet in batch mode leads to a Dead end.
(let (noninteractive) (load "dunnet"))
(add-to-list 'cus-test-libs-noloads "dunnet")
(provide 'cus-test)
-;;; arch-tag: a4991a31-548d-48fb-8ba1-1ebbe68eb2e7
;;; cus-test.el ends here
rm -f $new_tmp $old_tmp
-# arch-tag: ef2c96e2-ea67-4668-925c-d9a6f3d205cf
Local Variables:
mode: text
End:
-
-# arch-tag: caf47b2c-b56b-44f7-a760-b5bfbed15fd3
make-changelog-diff $oldtag $newtag
echo " announcement created in $outfile" >&2
-
-# arch-tag: 605e00c7-7330-4c45-81e1-2ed53a13c39f
x
s/^\n//
p"
-
-# arch-tag: 7604a259-40b4-4f97-86b2-496a9c546f0a
# Local Variables:
# mode: cperl
# End:
-
-# arch-tag: 5c3f9713-9ece-4a12-b3f8-deaff15974ba
him to set a Reply-to header to <emacs-pretest-bug@gnu.org>.
For a release, Richard should prepare the announcement himself,
possibly starting from a previous announcment.
-
-# arch-tag: c23c771f-ca26-4584-8a04-50ecf0989390
there has been discussion on eliminating this use of cpp and relying
solely on autoconf processing. rms says to leave it be.
-
-;;; arch-tag: d654291e-9fc8-41b7-ab0c-d3cde842a8e0
it from other casting. We commit the changes and can now go about modifying
LOW and HIGH separately. When HIGH is ready to handle the type change, the
cast can be removed.
-
-;;; arch-tag: 3309cc41-5d59-421b-b7be-c94b04083bb5
there was a mass-change to remove such from various branches in cvs. probably
it's a good idea to avoid adding trailing whitespace in new code/docs and in
changes.
-
-;;; arch-tag: de441379-c345-4826-a784-352b5413a698
copy temacs.exe obj\i386\r
obj\i386\temacs -batch -l loadup dump\r
copy obj\i386\emacs.exe .\r
-
-goto skipArchTag
- arch-tag: 0ca3036d-3a1e-47ea-87c6-9c0845253496
-:skipArchTag
echo Or: %0 emacs-version dist-basename distfiles "zipfiles" short-version\r
echo (e.g., %0 20.6 emacs-20.6 d:\andrewi\distfiles zipfiles 206)\r
:end\r
-
-goto skipArchTag
- arch-tag: 6e2ddd92-c1c9-4992-b6b5-207aaab72f68
-:skipArchTag
PUBLIC_LIBSRC_BINARIES='b2m emacsclient etags ctags ebrowse'
PUBLIC_LIBSRC_SCRIPTS='grep-changelog rcs-checkin'
-AVOID="CVS -DIC README COPYING ChangeLog ~ [.]orig$ [.]rej$ Makefile makefile stamp-subdir .cvsignore .arch-ids {arch} [.][cho]$ make-docfile testfile test-distrib"
+AVOID="CVS -DIC README COPYING ChangeLog ~ \.orig$ \.rej$ Makefile makefile stamp-subdir .cvsignore \.[cho]$ make-docfile testfile test-distrib"
# Prune old binaries lying around in the source tree
PRUNE=no
done
) | eval $EXEC
-
-# arch-tag: 9322b572-9755-4cf7-a67a-21e6505f1477
# Local Variables:
# mode: cperl
# End:
-
-# arch-tag: 2798b20d-c7f2-4c78-8378-7bb529c36a09
# Exit with failure, since people may have generic build scripts that
# try things like "autogen.sh && ./configure && make".
exit 1
-
-# arch-tag: a123408c-fada-4bf7-98a0-a786cff918f0
set X11=\r
set nodebug=\r
set djgpp_ver=\r
-
-goto skipArchTag
- arch-tag: 2d2fed23-4dc6-4006-a2e4-49daf0031f33
-:skipArchTag
powerpc-apple-darwin* )
machine=powermac opsys=darwin
# Define CPP as follows to make autoconf work correctly.
- CPP="gcc -E -no-cpp-precomp"
+ CPP="cc -E -traditional-cpp"
;;
## AMD x86-64 Linux-based GNU system
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
for ac_declaration in \
- ''\
- '#include <stdlib.h>' \
+ '' \
'extern "C" void std::exit (int) throw (); using std::exit;' \
'extern "C" void std::exit (int); using std::exit;' \
'extern "C" void exit (int) throw ();' \
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <stdlib.h>
$ac_declaration
+#include <stdlib.h>
int
main ()
{
fi
fi
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
- #include <X11/Xlib.h>
- #include <X11/Xresource.h>
-int
-main ()
-{
-XIMProc callback;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- HAVE_XIM=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_XIM 1
-_ACEOF
-
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-HAVE_XIM=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-
if test "${with_xim}" != "no"; then
_ACEOF
fi
-
-
-if test "${HAVE_XIM}" != "no"; then
+if test "${HAVE_X11}" = "yes"; then
late_CFLAGS=$CFLAGS
if test "$GCC" = yes; then
CFLAGS="$CFLAGS --pedantic-errors"
powerpc-apple-darwin* )
machine=powermac opsys=darwin
# Define CPP as follows to make autoconf work correctly.
- CPP="gcc -E -no-cpp-precomp"
+ CPP="cc -E -traditional-cpp"
;;
## AMD x86-64 Linux-based GNU system
AC_MSG_ERROR([Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}]);
fi
GLIB_REQUIRED=2.0.1
- GTK_REQUIRED=2.0.1
+ GTK_REQUIRED=2.2
GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
dnl Check if --with-pkg-config-prog has been given.
], [GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"])
-m4_if(dnl Do not change this comment
- arch-tag: 156a4dd5-bddc-4d18-96ac-f37742cf6a5e
-)dnl
-2003-09-02 Glenn Morris <gmorris@ast.cam.ac.uk>
-
- * TODO: Add invisible text kill/yank issue.
-
-2003-08-20 Stephen Eglen <stephen@gnu.org>
-
- * MORE.STUFF: Update URLs for several projects.
-
2003-07-22 Andrew Choi <akochoi@shaw.ca>
* PROBLEMS: Truncated process output with pty's on Mac OS X.
Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted provided the copyright notice and this notice are preserved.
-
-;;; arch-tag: 094f3a51-bd72-44d0-8fac-2ac242c6c5b1
look at the disassembly to determine which registers are being used,
and look at those registers directly, to see the actual current values
of these variables.
-
-;;; arch-tag: fbf32980-e35d-481f-8e4c-a2eca2586e6b
Iris 4D (mips-sgi-irix[456].*)
- Emacs 21.3 is reported to work on IRIX 6.5.x.
-
You can build a 64-bit executable (with larger maximum buffer size)
on Irix 6.5 by specifying the 64-bit ABI using the `-64' compiler
flag or otherwise (see cc(1)). This may work on earlier Irix 6
systems if you edit src/s/irix6-0.h following irix6-5.h.
+ Building Emacs 21.1 and 21.2 on versions of Irix before 6.5.10,
+ especially when Emacs is built with GCC, was reported to have subtle
+ problems such as being unable to print to stdout under the -batch
+ command-line option. Building with the native compiler or upgrading
+ the OS to a newer version solves these problems. There's evidence
+ that these problems are actually related to the runtime libraries
+ (before IRIX 6.5.10, the IRIX runtimes were based on the MIPSpro 7.2
+ compilers), so installing patches for the runtime from
+ http://www.sgi.com/support/patch_intro.html could solve the problem
+ even without upgrading the OS. The dump process is the crucial
+ step that needs the upgraded runtime, so a workaround is to dump
+ Emacs on a machine with a newer OS, then copy the binary to the
+ older OS.
+
If compiling with GCC on Irix 6 yields an error "conflicting types
for `initstate'", install GCC 2.95 or a newer version, and this
problem should go away. It is possible that this problem results
could also try reinstalling the same version of GCC, and telling us
whether that fixes the problem.
+ The 19.26 pretest was reported to work on IRIX 4.0.5 and 5.2.
+ 19.23 was reported to work on IRIX 5.2, but you may need to install
+ the "compiler_dev.hdr.internal" subsystem in order to compile unexelfsgi.c.
+ 19.22 was known to work on all Silicon Graphics machines running
+ IRIX 4.0.5 or IRIX 5.1.
+
+ Compiling with -O using IRIX compilers prior to 3.10.1 may not work.
+ Don't use -O or use GCC instead.
+
+ Most IRIX 3.3 systems do not have an ANSI C compiler, but a few do.
+ Compile Emacs 18 with the -cckr switch on these machines.
+
+ There is a bug in IRIX 3.3 that can sometimes leave ptys owned by root
+ with a permission of 622. This causes malfunctions in use of
+ subprocesses of Emacs. Irix versions 4.0 and later with GNU Emacs
+ versions 18.59 and later fix this bug.
+
Masscomp (m68k-masscomp-rtu)
18.36 worked on a 5500DP running RTU v3.1a and compiler version 3.2
mode: indented-text
fill-prefix: " "
End:
-
-arch-tag: 7d2e93c7-e982-40ec-9055-3cd064042473
mode: outline
fill-column: 72
End:
-
-arch-tag: 6e42bba8-7532-4a23-8486-99dbc5770a8e
mode: outline
paragraph-separate: "[ \f]*$"
end:
-
-arch-tag: f6696cad-eb1b-4c5f-8057-4e3954a98d18
etc/MAILINGLISTS) might be archived specifically (try a web search
engine) or retrievable from general Usenet archive services.
-* emacswiki.org
-
-The Emacs Wiki has an area for storing elisp files
-<URL:http://www.emacswiki.org/cgi-bin/wiki.pl/ElispArea>.
-
* Maintenance versions of some packages distributed with Emacs
You might find bug-fixes or enhancements in these places.
* BibTeX:
<URL:http://www.ida.ing.tu-bs.de/people/dirk/bibtex/index.html>
- * BS: <URL:http://www.geekware.de/software/emacs/index.html>
+ * BS: <URL:http://home.netsurf.de/olaf.sylvester/emacs>
* Calculator: <URL:http://www.cs.cornell.edu/eli/misc/calculator.el>
* CPerl: <URL:ftp://ftp.math.ohio-state.edu/pub/users/ilya>
- * Ediff and Viper: <URL:http://www.cs.sunysb.edu/~kifer/emacs.html>
+ * Ediff and Viper: <URL:ftp://ftp.cs.sunysb.edu/pub/TechReports/kifer/>
* Eldoc and Rlogin:
<URL:ftp://ftp.splode.com/pub/users/friedman/packages/>
* QuickURL: <URL:http://www.acemake.com/hagbard/archives/quickurl.el>
- * RefTeX: <URL:http://zon.astro.uva.nl/~dominik/Tools/>
+ * RefTeX: <URL:http://www.strw.leidenuniv.nl/%7Edominik/Tools/>
- * Speedbar, Checkdoc etc: <URL:http://cedet.sourceforge.net/>
+ * Speedbar, Checkdoc etc: <URL:ftp://www.ultranet.com/pub/zappo/>
* SQL: <URL:http://www.geocities.com/TimesSquare/6120/emacs.html>
You might like to check whether they are packaged for your system.
Several are for Debian GNU/Linux in particular.
- * AUCTeX: fancy (La)TeX support: <URL:http://www.gnu.org/software/auctex/>
+ * AUCTeX: fancy (La)TeX support: <URL:http://sunsite.dk/auctex/>
There's an AUCTeX mail list/newsgroup:
<URL:news://sunsite.dk/emacs.auctex>.
mirrors of the `CTAN' TeX archives.
* Dismal: spreadsheet:
- <URL:http://acs.ist.psu.edu/dismal/dismal.html>
+ <URL:http://www.psychology.nottingham.ac.uk/staff/ritter/papers/dismal/
+ dismal.html>
* EDB: database:
<URL:http://sdg.lcs.mit.edu/%7Emernst/software/edb-mrp.tar.gz>
Not maintained?
- * Ee: categorizing information manager:
- <URL:http://www.jurta.org/emacs/ee/>
-
* EIEIO (object system), ETalk (interface to Internet talk):
- <URL:http://cedet.sourceforge.net/eieio.shtml>
+ <URL:ftp://www.ultranet.com/pub/zappo/>
* EFS: enhanced version of ange-ftp:
<URL:http://www-uk.hpl.hp.com/people/ange/efs>
From GNU distribution mirrors. (Much of this functionality is now
in Emacs.)
- * Emacs statistical system (ESS): statistical programming within Emacs
- <URL:http://www.analytics.washington.edu/Zope/wikis/ess/FrontPage>
-
* Emacspeak -- A Speech Output Subsystem For Emacs:
<URL:http://emacspeak.sourceforge.net/>
Provides an interactive environment for manipulating an inferior
process running some form of Lisp.
- * JDE: <URL:http://jdee.sunsite.dk/>
- Provides a Java development environment for Emacs.
+ * JDE: <URL:http://sunsite.auc.dk/jde/>
+ Provides a Java-specific `Integrated Development Environment'.
* Mule-UCS: Universal enCoding System:
<URL:ftp://ftp.m17n.org/pub/mule/Mule-UCS/>
* Pointers to MIME packages:
<URL:http://bmrc.berkeley.edu/%7Etrey/emacs/mime.html>
- * Preview LaTeX: embed preview LaTeX images in source buffer.
- <URL:http://preview-latex.sourceforge.net/>
-
* PSGML: <URL:http://www.lysator.liu.se/projects/about_psgml.html>
DTD-aware serious SGML/XML editing.
SJ3 Ver.2
* Tramp: Remote file access via rsh/ssh
- <URL:http://savannah.gnu.org/projects/tramp/>
+ <URL:ftp://ls6.cs.uni-dortmund.de/pub/tramp.tar.gz>
* VM (View Mail): <URL:http://www.wonderworks.com/vm/> Alternative
mail reader. There is a VM newsgroup: <URL:news:gnu.emacs.vm.info>
mode: view
eval: (goto-address)
End:
-
-arch-tag: c1d4e7c8-db85-44e6-909e-659e2b20fefa
e/eterm: e/eterm.ti
TERMINFO=`pwd`; export TERMINFO; $(TIC) e/eterm.ti
-# arch-tag: 4261f003-cf77-4478-a10a-5284e9d8f797
\f
* Changes in Emacs 21.4
-** Under XFree86 4, the display table is modified so that `' is
-displayed as balanced quotes, not the ASCII glyphs whose shape has
-been changed generally in the XFree86 fonts.
-
** sql changes.
*** The variable `sql-product' controls the highlightng of different
default-frame-alist. It supports variable heights, like the `bar'
cursor does.
-+++
-** On X, MS Windows, and Mac OS, the blinking cursor's "off" state is
-now controlled by the variable `blink-cursor-alist'.
-
** Filesets are collections of files. You can define a fileset in
various ways, such as based on a directory tree or based on
program files that include other program files.
default, all trivial operations involving whole lines are performed
automatically. The game uses faces for better visual feedback.
++++
+** On X, MS Windows, and Mac OS, the blinking cursor's "off" state is
+now shown as a hollow box or a thin bar. However, you can control how
+it blinks off by setting the variable `blink-cursor-alist'.
+
** The new variable `x-select-request-type' controls how Emacs
requests X selection. The default value is nil, which means that
Emacs requests X selection with types COMPOUND_TEXT and UTF8_STRING,
face. This lets you have different colors or markings for vacations,
appointments, paydays or anything else using a sexp.
-+++
-** The new function `calendar-goto-day-of-year' (g D) prompts for a
-year and day number, and moves to that date. Negative day numbers
-count backward from the end of the year.
-
-** The function `simple-diary-display' now by default sets a header line.
-This can be controlled through the variables `diary-header-line-flag'
-and `diary-header-line-format'.
-
** VC Changes
*** The key C-x C-q no longer checks files in or out, it only changes
`query-replace' and related functions simply ignore
a match if part of it has a read-only property.
-** The new Lisp library fringe.el controls the apperance of fringes.
\f
* Lisp Changes in Emacs 21.4
-** `latin1-char-displayable-p' is obsoleted by `char-displayable-p'.
-
-** New coding system property `mime-text-unsuitable' indicates that
-the coding system's `mime-charset' is not suitable for MIME text
-parts, e.g. utf-16.
-
-** The argument to forward-word, backward-word, forward-to-indentation
-and backward-to-indentation is now optional, and defaults to 1.
-
+++
** The new function `window-inside-edges' returns the edges of the
actual text portion of the window, not including the scroll bar or
argument is a minibuffer. If the argument is omitted it defaults to
the current buffer.
-+++
** There is a new Warnings facility; see the functions `warn'
and `display-warning'.
** The new function `merge-coding-systems' fills in unspecified aspects
of one coding system from another coding system.
----
** The variable `safe-local-eval-forms' specifies a list of forms that
are ok to evaluate when they appear in an `eval' local variables
specification. Normally Emacs asks for confirmation before evaluating
such a form, but if the form appears in this list, no confirmation is
needed.
----
** If a function has a non-nil `safe-local-eval-function' property,
that means it is ok to evaluate some calls to that function when it
appears in an `eval' local variables specification. If the property
If the form is not "ok to call", that means Emacs asks for
confirmation as before.
-+++
** Controlling the default left and right fringe widths.
The default left and right fringe widths for all windows of a frame
of the currently defined fringe bitmaps. The width of the built-in
fringe bitmaps is 8 pixels.
-+++
** Per-window fringes settings
Windows can now have their own individual fringe widths and position
the buffer in a window, or use `set-window-buffer' to force an update
of the display margins.
-+++
** The function `set-window-buffer' now has an optional third argument
KEEP-MARGINS which will preserve the window's current margin, fringe,
and scroll-bar settings if non-nil.
write-contents-hooks to write-contents-functions.
Marked local-write-file-hooks as obsolete (use the LOCAL arg of `add-hook').
-+++
** The new variable `delete-frame-functions' replaces `delete-frame-hook'.
It was renamed to follow the naming conventions for abnormal hooks. The old
name remains available as an alias, but has been marked obsolete.
-+++
** The `read-file-name' function now takes an additional argument which
specifies a predicate which the file name read must satify. The
new variable `read-file-name-predicate' contains the predicate argument
while reading the file name from the minibuffer; the predicate in this
variable is used by read-file-name-internal to filter the completion list.
----
** The new variable `read-file-name-function' can be used by lisp code
to override the internal read-file-name function.
-+++
** The new function `read-directory-name' can be used instead of
`read-file-name' to read a directory name; when used, completion
will only show directories.
-+++
** The new function `file-remote-p' tests a file name and returns
non-nil if it specifies a remote file (one that Emacs accesses using
its own special methods and not directly through the file system).
----
** When a Lisp file uses CL functions at run-time, compiling the file
now issues warnings about these calls, unless the file performs
(require 'cl) when loaded.
-+++
+** The new Lisp library fringe.el controls the apperance of fringes.
+
** The `defmacro' form may contain declarations specifying how to
indent the macro in Lisp mode and how to debug it with Edebug. The
syntax of defmacro has been extended to
Set NAME's `edebug-form-spec' property to DEBUG. (This is
equivalent to writing a `def-edebug-spec' for the macro.
-+++
** Interactive commands can be remapped through keymaps.
This is an alternative to using defadvice or substitute-key-definition
command before remapping. It is equal to `this-command' when the
command was not remapped.
-+++
** New variable emulation-mode-map-alists.
Lisp packages using many minor mode keymaps can now maintain their own
although it applies to overlays as well. This variable was introduced
to implement the `font-lock-face' property.
-+++
** New special text property `font-lock-face'.
This property acts like the `face' property, but it is controlled by
property. Instead, it is implemented inside font-core.el, using the
new variable `char-property-alias-alist'.
-+++
** New function remove-list-of-text-properties.
The new function `remove-list-of-text-properties' is almost the same
as `remove-text-properties'. The only difference is that it takes
a list of property names as argument rather than a property list.
-+++
** New function insert-for-yank.
This function normally works like `insert' but removes the text
character of the string, the insertion of the text may be modified in
a number of ways. See the description of `yank-handler' below.
-+++
** New function insert-buffer-substring-as-yank.
This function works like `insert-buffer-substring', but removes the
text properties in the `yank-excluded-properties' list.
-+++
** New function insert-buffer-substring-no-properties.
This function is like insert-buffer-substring, but removes all
text properties from the inserted substring.
-+++
** New `yank-handler' text property may be used to control how
previously killed text on the kill-ring is reinserted.
-The value of the yank-handler property must be a list with one to four
+The value of the yank-handler property must be a list with one to five
elements with the following format:
(FUNCTION PARAM NOEXCLUDE UNDO).
called with two arguments, the start and end of the current region.
FUNCTION may set `yank-undo-function' to override the UNDO value.
-*** The functions kill-new, kill-append, and kill-region now have an
-optional argument to specify the yank-handler text property to put on
-the killed text.
+*** The functions kill-new, kill-append, and kill-region now has an
+optional third argument to specify the yank-handler text property
+to put on the killed text.
*** The function yank-pop will now use a non-nil value of the variable
`yank-undo-function' (instead of delete-region) to undo the previous
This is relevant only if Lisp code looks for
the bindings that were made with easymenu.
-+++
** The function `commandp' takes an additional optional
argument. If it is non-nil, then `commandp' checks
for a function that could be called with `call-interactively',
This is like window-height but does not count the mode line
or the header line.
-+++
** New function format-mode-line.
This returns the mode-line or header-line of the selected (or a
specified) window as a string with or without text properties.
-+++
** New functions `lax-plist-get' and `lax-plist-put'.
These functions are like `plist-get' and `plist-put' except that they
compare the property name using `equal' rather than `eq'.
-+++
** New function `tool-bar-local-item-from-menu'
The `tool-bar-add-item-from-menu' must not be used (as previously
mode: outline
paragraph-separate: "[ \f]*$"
end:
-
-arch-tag: 1aca9dfa-2ac4-4d14-bebf-0007cee12793
*** RCS customization.
There is a new variable vc-consult-headers. If it is t (the default),
-VC searches for RCS headers in working files (like `$Id: ONEWS,v 1.8 2003/02/04 14:30:40 lektu Exp $') and
+VC searches for RCS headers in working files (like `$Id: ONEWS,v 1.7 2002/08/21 00:18:46 rms Exp $') and
determines the state of the file from them, not from the master file.
This is fast and more reliable when you use branches. (The variable
was already present in Emacs 19.29, but didn't get mentioned in the
paragraph-separate: "[ \f]*$"
end:
-arch-tag: 944be39b-afe8-4217-9977-c745b68a7ca2
Local variables:
mode: text
end:
-
-arch-tag: c006f958-d769-44c7-a9f4-e2faf070624d
Local variables:
mode: text
end:
-
-arch-tag: 33dc900d-9c58-473b-87c9-b6d7222323ea
Local variables:
mode: text
end:
-
-arch-tag: 8fed393b-c9c5-47d1-afbb-c0e7a135094a
Local variables:
mode: text
end:
-
-arch-tag: 373312be-99a8-46d5-bcb0-a62577ab5045
The command to resume a tags-search or tags-query-replace in
GNU Emacs is Meta-Comma.
-
-arch-tag: e5a3da2f-f13d-400e-95e2-b6e1a520af90
mode: outline
paragraph-separate: "[ \f]*$"
end:
-
-arch-tag: 49fc0d95-88cb-4715-b21c-f27fb5a4764a
** Please keep the entries in this file alphabetical **
-arch-tag: 1253ce32-1cbd-428a-ac36-70ed9e3999fc
* Make compile.el record the markers that point to error loci
on text properties in the error message lines.
-* Fix the kill/yank treatment of invisible text. At the moment,
- invisible text is placed in the kill-ring, so that the contents of
- the ring may not correspond to the text as displayed to the user. It
- ought to be possible to omit text which is invisible (due to a
- text-property, overlay, or selective display) from the kill-ring.
-
Important features:
* Provide user-friendly ways to list all available font families,
other variable, without changing the value of `values'.
* Fix skip-chars-{for,back}ward to allow character classes.
-
-;;; arch-tag: b0a3e40b-726a-457d-9999-ba848321b036
same spirit. Please read the file COPYING and then do give copies of
GNU Emacs to your friends. Help stamp out software obstructionism
("ownership") by using, writing, and sharing free software!
-
-;;; arch-tag: a0f84628-777f-4238-8865-451a73167f55
;;; Local Variables:
;;; coding: koi8-r
-;;; End:
-;;; arch-tag: 70cf6ad7-c2e4-41fe-8199-74aa52683b0e
+;;; End:
\ No newline at end of file
;;; Local Variables:
;;; coding: chinese-iso-8bit
;;; End:
-
-;;; arch-tag: 46a53d82-a85a-46b6-bdc7-583aca063578
;;; Local Variables:
;;; coding: iso-latin-2
;;; End:
-
-;;; arch-tag: 479ef577-3d4d-4384-aeea-9fe79d5e89ca
;;; Local Variables:
;;; coding: latin-1
;;; End:
-
-;;; arch-tag: a8f2fe06-631d-4ae1-887e-446f971b0baa
;;; Local Variables:
;;; coding: latin-1
;;; End:
-
-;;; arch-tag: 66aae86e-6f86-4a3e-b82a-44a783f774fd
;;; Local Variables:
;;; coding: latin-1
;;; End:
-
-;;; arch-tag: f6c5c2ff-bf24-477c-bd18-32f76f51ba65
copie di GNU Emacs ai vostri amici. Aiutateci a combattere
l'ostruzionismo al software ("la proprietà") usando, scrivendo e
condividendo software libero!
-
-;;; arch-tag: c6f7079d-8032-473d-91d4-36754af15719
;;; Local Variables:
;;; coding: iso-2022-jp
;;; End:
-
-;;; arch-tag: 7136abc2-eb97-4f51-80a2-fa690ba4cfe8
COPYING\e$(C@L6s4B\e(B \e$(CFD@O@;\e(B \e$(C@P0m\e(B \e$(C3-\e(B \e$(CHD?!\e(B GNU \e$(C@L8F=:@G\e(B \e$(C:9;g:;@;\e(B \e$(CD#18?!0T\e(B
\e$(CAV=J=C?@\e(B. \e$(C@Z@/\e(B \e$(C<RGAF.?~>n8&\e(B \e$(C>20m\e(B \e$(C885i0m\e(B \e$(C0x@/GT@87N=a\e(B \e$(C<RGAF.?~>n\e(B
\e$(C9fGX8&\e(B ("\e$(C<R@/1G\e(B") \e$(C1Y@}GO4B5%\e(B \e$(C55?s=C4Y\e(B.
-
-;;; arch-tag: 44503bc5-b2c1-4169-962d-9d33157221a9
lezen van een scherm.
Merk op dat er een tweeregelige overlap is als je van een scherm naar
-het volgende scherm gaat; dit zorgt voor continuïteit bij het lezen van
+het volgende scherm gaat; dit zorgt voor continuiteit bij het lezen van
de tekst.
Het eerste wat je moet weten is hoe je naar verschillende plaatsen in de
-tekst kunt bewegen. Je weet al hoe je een scherm vooruit moet gaan: met
+tekst kan bewegen. Je weet al hoe je een scherm vooruit moet gaan: met
C-v. Om een scherm terug te gaan, type M-v (houd de META toets ingedrukt
en type v, of type <ESC>v als je geen META, EDIT of ALT toets hebt).
* SAMENVATTING
--------------
-De volgende commando's zijn handig om volledige schermen te bekijken:
+De volgende commando's zijn handig volledige schermen te bekijken:
C-v ga een scherm vooruit
M-v ga een scherm terug
Het is handig om per scherm te bewegen, maar hoe beweeg je nu
naar een specifieke plaats op het scherm?
-Er is een aantal manieren waarop je dit kunt doen. De basismanier is
+Er is een aantal manieren waarop je dit kan doen. De basismanier is
m.b.v de commando's C-p, C-b, C-f en C-n. Elk van deze commando's
-verplaatst de cursor precies een regel of teken in een bepaalde richting
+verplaatst de cursor precies een rij of colomn in een bepaalde richting
op het scherm. Hier volgt een figuur met de vier commando's en de
richting waarin ze de cursor bewegen:
de figuur. Type dan C-l om de hele figuur in het midden van het
centrum te plaatsen.
-Met een beetje kennis van het Engels zijn deze commando's gemakkelijk te
+Met een beetje kennis van het engels zijn deze commando's gemakkelijk te
onthouden: de P komt van previous (vorige), de N van next (volgende), de
B van backward (achteruit) en de F van forward (vooruit). Dit zijn de
basiscommando's om de cursor te bewegen, dus je zult ze CONTINUE
>> Type een paar keer C-n om de cursor op deze regel te krijgen.
>> Beweeg binnen de regel met C-f (herhaaldelijk) en terug omhoog met C-p
- Let op wat C-p doet als de cursor midden in een regel staat.
+ Let op wat C-P doet als de cursor midden in een regel staan.
-Elke regel eindigt met een Newline teken (het Engelse `new line' betekent
+Elke regel eindigt met een Newline teken (het engelse `new line' betekent
`nieuwe regel'); dit teken scheidt elke regel van de volgende. De laatste
regel in een bestand moet eigenlijk ook met een Newline eindigen (maar dat
is niet noodzakelijk voor Emacs ).
->> Type het commando C-b terwijl de cursor aan het begin van een regel
- staat. De cursor zal naar het eind van de vorige regel bewegen,
- omdat je achteruit over het Newline teken gaat.
+>> Type een C-b terwijl de cursor aan het begin van een regel staat.
+ De cursor zal naar het eind van de vorige regel bewegen, omdat je
+ achteruit over het Newline teken gaat.
Net als C-b kan ook C-f over Newline tekens heen bewegen.
->> Type nog een aantal keren het commando C-b, zodat je door krijgt waar de
- cursor is.
- Type dan enkele keren C-f om de cursor terug naar het einde van de regel
- te bewegen.
- Een C-f commnado beweegt de cursor dan naar de volgende regel.
+>> Type nog wat C-b's zodat je door krijgt waar de cursor is.
+ Type dan C-f's om terug naar het einde van de regel te bewegen.
+ Een C-f beweegt dan naar de volgende regel.
Wanneer je de cursor voorbij het begin of het einde van het scherm beweegt
zal de tekst over het scherm heen schuiven. Dit heet `scrollen', of
-`schuiven' in goed Nederlands. Door te scrollen zorgt Emacs ervoor dat de
-cursor de gewenste beweging kan doen zonder dat de cursor van het scherm
-af beweegt.
+`schuiven' in goed nederlands. Door te scrollen zorgt Emacs ervoor dat
+de cursor de gewenste beweging kan doen zonder dat de cursor van het
+scherm af beweegt.
>> Probeer de cursor voorbij de onderkant van het scherm te bewegen met
C-n en zie wat er gebeurt.
-Als beweging op letterteken te langzaam gaat, kun je de cursor ook per
-woord bewegen. M-f (Meta-f) beweegt de cursor een woord vooruit en M-b
-een woord achteruit.
+Als beweging op karakterbasis te langzaam gaat, kan je ook per woord
+bewegen. M-f (Meta-f) beweegt een woord vooruit en M-b een woord
+achteruit.
->> Type enkele keren M-f en M-b.
+>> Type een paar M-f's en M-b's.
-Als je midden in een woord staat beweegt M-f de cursor naar het eind van
-het woord. Als je op een witte ruimte tussen woorden staat beweegt M-f de
-cursor naar het eind van het volgende woord. Het commando M-b beweegt
-analoog, de andere kant op.
+Als je midden in een woord staan beweegt M-f naar het eind van het
+woord. Als je op witruimte tussen woorden staat beweegt M-f naar het
+eind van het volgende woord. M-b beweegt analoog, de andere kant op.
->> Type enkele keren M-f en M-b en daar tussendoor enkele keren C-f en C-b,
- zodat je ziet wat M-f en M-b doen vanaf bepaalde plaatsen in een
- woord en tussen twee woorden.
+>> Type een paar M-f's en M-b's met tussendoor wat C-f's en C-b's zodat
+ je ziet wat M-f en M-b doen vanaf bepaalde plaatsen in een woord en
+ tussen twee woorden.
Merk op dat er een analogie zit tussen enerzijds C-f en C-b en
anderzijds M-f en M-b. Het is bij veel commando's zo dat Meta tekens
gebruikt worden om iets te doen in eenheden van de taal (woorden,
-zinnen, alinea's) terwijl Control tekens te maken hebben met dingen die
-los staan van wat je aan het editten bent (tekens, regels, etc).
+zinnen, paragrafen) terwijl Control tekens te maken hebben met dingen
+die los staan van wat je aan het editen bent (tekens, regels, etc).
-Deze analogie gaat ook op voor regels en zinnen: C-a en C-e bewegen de
-cursor naar het begin of eind van een regel, terwijl met M-a,
-respectievelijk M-e, de cursor naar het begin of eind van een zin gaat.
+Deze analogie gaat ook op voor regels en zinnen: C-a en C-e bewegen naar
+het begin of eind van een regel, terwijl M-a en M-e naar het begin of
+eind van een zin gaan.
->> Type enkele keren C-a en dan enkele keren C-e.
- Type enkele keren M-a en dan enkele keren M-e.
+>> Probeer een paar C-a's gevolgd door een paar C-e's.
+ Probeer een paar M-a's gevolgd door een paar M-e's.
-Zie hoe herhaalde C-a commando's niets doen, terwijl herhaalde M-a
-commando's steeds een zin terug bewegen. Alhoewel ze niet volledig
-overeenkomen is het gedrag van allebei niet onnatuurlijk.
+Zie hoe herhaalde C-a's niets doen, terwijl herhaalde M-a's steeds een
+zin terug bewegen. Alhoewel ze niet volledig overeenkomen is het gedrag
+van allebei niet onnatuurlijk.
De plaats van de cursor in de tekst wordt `punt' genoemd (zonder
-lidwoord, `point' in het Engels). Anders gezegd: de cursor laat op het
+lidwoord, `point' in het engels). Anders gezegd: de cursor laat op het
scherm de plek zien waarop punt in de tekst staat.
Nu volgt een samenvatting van eenvoudige cursorbewegingsoperaties,
Deze commando's worden het frequentst gebruikt.
Er zijn nog twee belangrijk cursorbewegingsoperaties: M-<
-(Meta kleiner-dan) beweegt de cursor naar het begin van het bestand,
-en M-> (Meta groter-dan) beweegt de cursor naar het eind.
+(Meta kleiner-dan) beweegt naar het begin van het bestand,
+en M-> (Meta groter-dan) beweegt naar het eind.
-Op de meeste toetsenborden zit de '<' boven de komma, zodat je de Shift
-toets (ook wel bekend als de hoofdlettertoets) moet gebruiken om het '<'
+Op de meeste toetsenborden zit de "<" boven de comma, zodat je de Shift
+toets (ook wel bekend als de hoofdlettertoets) moet gebruiken om het "<"
teken in te typen. Op deze toetsenborden moet je ook de shift gebruiken
om M-< in te typen: zonder shift zou je M-, (Meta komma) typen.
>> Type nu M-> om naar het eind van het bestand te springen.
Gebruik daarna M-v om hier weer terug te komen.
-Als je toetsenbord pijltjestoetsen heeft kun je ook die gebruiken om de
+Als je toetsenbord pijltjestoetsen heeft kan je ook die gebruiken om de
cursor te verplaatsen. We raden je aan om C-b, C-f, C-n en C-p op zijn
minst te leren, om drie redenen. Ten eerste werken ze op alle
toetsenborden, ook die zonder pijltjestoetsen. Ten tweede zul je merken
-dat, wanneer je eenmaal wat ervaring hebt opgedaan in het omgaan met
-Emacs, het gebruik van deze CTRL tekens sneller gaat dan het werken met
-pijltjestoetsen (omdat je handen in de typehouding kunnen blijven). Ten
-derde, als je eenmaal gewend bent aan deze commando's met CTRL tekens,
-kun je makkelijk andere geavanceerde cursorbewegingscommando's leren.
+dat, wanneer je eenmaal wat ervaring hebt opgedaan in omgaan met Emacs,
+het gebruik van deze CTRL tekens sneller is dan de pijltjestoetsen (omdat
+je handen in de typehouding kunnen blijven). Ten derde, als je eenmaal
+gewend bent aan deze commando's met CTRL tekens, kan je makkelijk andere
+geavanceerde cursorbewegingscommandos leren.
De meeste Emacs commando's accepteren een numeriek argument. Voor de
meeste commando's is dit argument het aantal keren dat het commando
-herhaald moet worden. Je geeft dit numerieke argument aan, dat vooraf
-gegaan wordt door het commando C-u, de cijfers van het getal te typen.
-Als je toetsenbord een META (of EDIT of ALT) toets heeft, is er ook
-een andere manier om het getal aan te geven: type de cijfers terwijl
-je de META toets ingedrukt houdt. We raden je aan de C-u manier te
-leren omdat die werkt op elk willekeurig toetsenbord.
+herhaald moet worden. Je geeft dit numerieke argument aan door voor het
+commando, C-u gevolgd door de cijfers van het getal te typen. Als je
+toetsenbord een META (of EDIT of ALT) toets heeft, is er ook een andere
+manier om het getal aan te geven: type de cijfers terwijl je de META toets
+ingedrukt houdt. We raden je aan de C-u manier te leren omdat die werkt
+op elk willekeurig toetsenbord.
Bijvoorbeeld, C-u 8 C-f beweegt de cursor 8 plaatsen naar voren.
->> Probeer eens om met C-n of C-p en één numeriek argument de cursor
- met slechts een commando naar een regel in de buurt van deze zin te
- bewegen.
+>> Probeer eens om met C-n of C-p en een numeriek argument de cursor
+ met slechts een commando naar een regel in de buurt van deze zin
+ te bewegen.
Voor de meeste commando's is het numerieke argument het aantal keren dat
het commando herhaald moet worden. Voor sommige commando's betekent het
>> Probeer nu C-u 8 C-v.
-Als het goed is is de tekst daarmee 8 regels opgeschoven. Als je weer
-terug omlaag wil scrollen kun je een argument aan M-v geven.
+Als het goed is is de tekst daarmee 8 regels opgeschoven. Als je het weer
+terug omlaag wil scrollen kan je een argument aan M-v geven.
Als je een windowing systeem gebruikt, zoals X Windows, dan zou je een
lange rechthoek moeten zien aan de linkerkant van het Emacs window. Deze
rechthoek heet een scrollbar (misschien is `verschuifbalk' een goede
-vertaling). Je kunt de tekst scrollen door met de muis in de scrollbar te
+vertaling). Je kan de tekst scrollen door met de muis in de scrollbar te
klikken.
>> Klik met de middelste muisknop bovenaan het donkere gebied in de
afhankelijk is van hoe hoog of laag je klikt.
>> Beweeg de muis heen en weer terwijl je de middelste muisknop ingedrukt
- houdt. Je zult zien dat de tekst met de muis mee heen en weer scrollt.
+ houdt. Je zal zien dat de tekst met de muis mee heen en weer scrollt.
* ALS EMACS HANGT
-----------------
-Als Emacs niet meer op commando's reageert kun je haar veilig onderbreken
-door C-g te typen. Je kunt C-g gebruiken om een commando te stoppen als
-het te lang duurt om het uit te voeren.
+Als Emacs niet meer op commando's reageert kan je haar veilig onderbreken
+door C-g te typen. Je kan C-g gebruiken om een commando te stoppen als
+het te lang duurt om uit te voeren.
-Je kunt C-g ook gebruiken om een numeriek argument weg te gooien of
+Je kan C-g ook gebruiken om een numeriek argument weg te gooien of
om het begin van een commando dat je niet wilt afmaken te vergeten.
>> Type nu C-u 100 om een numeriek argument te maken met de waarde 100, en
type dan C-g. Type vervolgens C-f. Als het goed is is de cursor maar
- één positie verplaatst, omdat je het argument weggegooid hebt met C-g.
+ een positie verplaatst, omdat het argument weggegooid hebt met C-g.
-Als je per ongeluk een <ESC> typt kun je dat ongedaan maken met het
-commando C-g.
+Als je per ongeluk een <ESC> typt kan je daarvan komen met een C-g.
* ONMOGELIJKE COMMANDO'S
Sommige Emacs commando's zijn onmogelijk gemaakt zodat beginnende
gebruikers ze niet per ongeluk kunnen uitvoeren.
-Als je één van de onmogelijke commando's intypt laat Emacs uitleg zien
+Als je een van de onmogelijke commando's intypt laat Emacs uitleg zien
over het commando dat je gegeven hebt en vraagt of je het werkelijk uit
wilt voeren.
----------
Emacs kan meerdere vensters laten zien, elk venster met zijn eigen tekst.
-We zullen later uitleggen hoe je met meerdere vensters om kunt gaan. Op
+We zullen later uitleggen hoe je met meerdere vensters om kan gaan. Op
dit moment willen we slechts uitleggen hoe je van extra vensters af kunt
-komen en terug kunt keren naar simpelweg editten met 1 venster. Het is
+komen en terug kan keren naar simpelweg editen met 1 venster. Het is
eenvoudig:
C-x 1 een enkel venster (i.e. gooi alle andere vensters weg)
-----------------------
Als je tekst toe wilt voegen type je die eenvoudigweg in. Tekens die je
-kunt zien, zoals A, 7, *, en dergelijke, worden door Emacs als tekst
-geïnterpreteerd en meteen aan de tekst. Type <Return> (de `volgende regel'
-toets) om een Newline toe te voegen en dus een nieuwe regel te beginnen.
+kan zien, zoals A, 7, *, en dergelijke, worden door Emacs als tekst
+ge-interpreteerd en meteen aan de tekst toegevoegd. Type <Return> (de
+`volgende regel' toets) om een Newline toe te voegen en dus een nieuwe
+regel te beginnen.
-Je kunt het laatste teken dat je intypte weghalen door <Delete> te typen.
-<Delete> is een toets op het toetsenbord, die soms ook wel "Del"
+Je kan het laatste teken dat je intypte weghalen door <Delete> te typen.
+<Delete> is een toets op het toetsenbord, die misschien ook wel "Del"
heet. In sommige gevallen dient de "Backspace" toets als <Delete>, maar
niet altijd!
>> Probeer dit nu: type een paar letters en haal ze weer weg door een paar
keer op <Delete> te drukken. Maak je niet druk over het feit dat dit
- bestand verandert; je zult niets veranderen aan de originele versie van
- deze uitleg. Je zit slechts je eigen kopie te wijzigen.
+ bestand verandert; je zal niets veranderen aan de originele versie van
+ deze uitleg. Je zit slechts je eigen copie te wijzigen.
-Als een regel tekst te lang wordt om de regel op het scherm te laten
+Als een regel tekst te lang wordt om op een regel op het scherm te laten
zien dan gaat de regel verder op een volgende schermregel. Een backslash
("\") in de rechtermarge laat dan zien dat de regel op de volgende
schermregel verder gaat.
>> Voeg nu tekst toe totdat je de rechter kantlijn raakt, en blijf
- toevoegen. Je zult zien dat er een vervolgregel verschijnt.
+ toevoegen. Je zal zien dat er een vervolgregel verschijnt.
->> Type weer enkele keren <Delete> om zoveel tekens weg te halen tot
- de regel weer op een schermregel past. De vervolgregel zal verdwijnen.
+>> Type weer wat <Delete>s om zoveel tekens weg te halen tot de regel weer
+ op een schermregel past. De vervolgregel zal verdwijnen.
-Je kunt een Newline weggooien als elk ander teken. Als je een Newline
+Je kan een Newline weggooien als elk ander teken. Als je een Newline
weggooit voeg je de twee regels waar de Newline tussen staat samen tot een
enkele regel. Als de regel die het resultaat is van deze operatie niet op
-een schermregel past zal hij getoond worden met een vervolgregel.
+een schermregel past zal ze getoond worden met een vervolgregel.
>> Beweeg de cursor naar het begin van een regel en type <Delete>. Dit
voegt de huidige en vorige regel samen.
>> Type <Return> om de Newline die je net weggooide weer toe te voegen.
Je herinnert je dat je bij de meeste Emacs commando's het aantal keren dat
-iets herhaald moet worden, op kunt geven. Dit geldt ook voor gewone tekens.
+het herhaald moet worden op kan geven. Dit geldt ook voor gewone tekens.
Als je een gewoon teken herhaalt wordt dat teken herhaaldelijk toegevoegd.
>> Probeer dat nu: type C-u 8 * om ******** toe te voegen.
Je hebt nu de basismanier geleerd om iets in Emacs te typen en fouten te
-corrigeren. Je kunt tekst ook per woord of regel weggooien. Hier volgt
+corrigeren. Je kan tekst ook per woord of regel weggooien. Hier volgt
een samenvatting van de commando's om tekst te verwijderen:
<Delete> haal het teken weg dat voor de cursor staat
- C-d haal het teken weg dat achter de cursor staat
+ C-d haal het teken weg dat achter de cursor staat
M-<Delete> gooi het woord weg dat voor de cursor staat
M-d gooi het woord weg dat achter de cursor staat
C-e en M-e in hun relatie tot regels en zinnen.
Als je meer dan een enkel teken tegelijk weghaalt bewaart Emacs de tekst
-die je weggooit zodat je hem weer terug kunt halen. Weggegooide tekst
-terughalen heet "yanken". Je kunt weggegooide tekst terugbrengen op de
-plaats waar je hem hebt weggegooid of op een andere plaats in de tekst.
-Je kunt ook meerdere keren yanken om er meedere kopieën van te maken. Het
+die je weggooit zodat je haar weer terug kan halen. Weggegooide tekst
+terughalen heet "yanken". Je kan weggegooide tekst terugbrengen op de
+plaats waar je haar hebt weggegooid of op een andere plaats in de tekst.
+Je kan ook meerdere keren yanken om er meedere copi-en van te maken. Het
yank-commando is C-y.
Merk op dat er een verschil is tussen het weghalen en weggooien van iets:
-iets dat je hebt weggooid kun je terugbrengen, maar iets dat je hebt
-weggehaald niet. (In het Engels is het verschil tussen `killing' en
-`deleting' duidelijker dan tussen de Nederlandse vertaling `weggooien' en
+iets dat je hebt weggooid kan je terugbrengen, maar iets dat je hebt
+weggehaald niet. (In het engels is het verschil tussen `killing' en
+`deleting' duidelijker dan tussen de nederlandse vertaling `weggooien' en
`weghalen'.) In het algemeen geldt dat de commando's die meer tekst dan
-een enkel teken, Newline of spatie verwijderen deze tekst bewaren zodat die
+een enkel teken, Newline of spatie verwijderen deze tekst bewaren zodat ze
geyankt kan worden, terwijl dat niet geldt voor commando's die slechts een
enkel teken weghalen.
->> Zet de cursor op het begin van een regel die niet leeg is.
- Type C-k om de tekst op die regel weg te gooien.
+>> Zet de cursor op het begin van een regel die niet leef is.
+ Type C-k om de tekst op die regl weg te gooien.
>> Type C-k een tweede keer. Nu gooit dit commando het Newline teken
- weg.
+ weggooit.
-Merk op hoe een enkel C-k commando de inhoud van een regel weggooit, een
-tweede C-k commando de regel zelf zodat alle volgende regels een regel
-omhoog komen. Het numerieke argument is voor C-k bijzonder: het aangegeven
-aantal regels zal worden weggegooid, inclusief de inhoud. Dit is meer dan
-simpelweg herhaling: C-u 2 C-k gooit twee regels weg, terwijl tweemaal
-C-k typen dat niet doet.
+Merk op hoe een enkele C-k de inhoud van een regel weggooit, een tweede
+C-k de regel zelf zodat alle volgende regels een regel omhoog komen. Het
+numerieke argument is voor C-k bijzonder: het aangegeven aantal regels zal
+worden weggegooid, inclusief de inhoud. Dit is meer dan simpelweg
+herhaling: C-u 2 C-k gooit twee regels weg, terwijl tweemaal C-k typen dat
+niet doet.
Om de laatst weggegooide tekst terug te halen naar de plaats waar de
cursor nu op staat (te yanken), type C-y.
Om de weggegooide tekst terug te halen:
->> Type C-y. Beweeg de cursor enkele regels naar beneden en type weer C-y.
- Je ziet nu hoe je tekst kunt kopiëren.
+>> Type C-y. Beweeg de cursor wat regels naar beneden en type weer C-y.
+ Je ziet nu hoe je tekst kan copieren.
-Wat nu te doen als je tekst terug wilt brengen, maar je hebt intussen al
-iets anders weggegooid? C-y zou datgene terugbrengen wat je het
+Wat nu te doen als je wat tekst terug wilt brengen, maar je hebt intussen
+al iets anders weggegooid? C-y zou datgene terugbrengen wat je het
recentst hebt weggegooid. Gelukkig is de voorgaande tekst niet verloren
gegaan. Je kunt die tekst terughalen met M-y. Nadat je C-y hebt getypt
om de recentst weggegooide tekst terug te halen, vervangt M-y die tekst
met de tekst die je daarvoor had weggegooid. Je kunt M-y herhalen om
-tekst terug te halen die je reeds langer geleden hebt weggegooid. Als
-je de tekst te pakken hebt die je zocht hoef je niets te doen om die
-daar te houden. Je kunt gewoon verder werken en de teruggehaalde tekst
-met rust laten.
+tekst terug te halen die je steeds langer geleden hebt weggegooid. Als je
+de tekst te pakken hebt die je zocht hoe je niets te doen om die daar te
+houden. Je kan gewoon verder werken en de teruggehaalde tekst met rust
+laten.
Als je M-y vaak genoeg typt kom je terug waar je begon, bij de recentst
weggegooide tekst.
Type C-y om de tweede regel die je weggooide terug te halen.
Type nog een M-y en die regel wordt vervangen door de eerste regel
die je weggooide.
- Type nog enkele keren M-y en zie wat er langs komt. Herhaal dit tot de
+ Type nog wat M-y's en zie wat er langs komt. Herhaal dit tot de
tweede regel weer langs komt, en dan nog een paar keer.
- Je kunt ook experimenteren met positieve en negatieve argumenten aan
+ Je kan ook experimenteren met positieve en negatieve argumenten aan
M-y.
* HERSTELLEN
------------
-Als je de tekst veranderd hebt en als je daar toch niet tevreden mee bent,
-dan kun je de verandering ongedaan maken met het herstel commando, C-x u.
+Als je de tekst veranderd hebt en je daar toch niet tevreden mee bent,
+dan kan je de verandering ongedaan maken met het herstel commando, C-x u.
Normaal gesproken herstelt C-x u de veranderingen die het gevolg zijn van
een enkel commando; door herhaaldelijk C-x u te typen, worden steeds
Er zijn echter twee uitzonderingen: commando's die de tekst niet wijzigen,
zoals cursorbewegingen, worden overgeslagen, en commando's die simpelweg
de ingetypte letter aan de tekst toevoegen worden meestal gegroepeerd
-in groepjes van maximaal 20 tekens, zodat je minder vaak het commando
-C-x u hoeft te typen om het toevoegen van tekst te herstellen.
+in groepjes van maximaal 20 tekens, zodat je minder C-x u's hoeft te
+type om het toevoegen van teksts te herstellen.
->> Gooi deze regel weg met C-k; met C-x u zou hij weer moeten verschijnen.
+>> Gooi deze regel weg met C-k; met C-x u zou ze weer moeten verschijnen.
C-_ is een alternatief voor C-x u. Het levert exact hetzelfde resultaat
-op, maar het is makkelijker om dat een paar keer achter elkaar te typen.
-Een nadeel van C-_ is dat op sommige toetsenborden het intypen ervan
-niet triviaal is. Dat is ook de reden voor het alternatief, C-x u. Op
-sommige terminals kun je C-_ typen door te doen alsof je C-/ typt.
+op, maar is makkelijker om een paar keer achter elkaar te typen. Een
+nadeel van C-_ is dat op sommige toetsenborden het intypen ervan niet
+triviaal is. Dat is ook de reden het alternatief, C-x u. Op sommige
+terminals kan je C-_ typen door te doen alsof je C-/ typt.
Een numeriek argument aan C-_ of C-x u duidt het aantal herhalingen aan.
-----------
Om een tekst die je gemaakt of veranderd hebt op te slaan moet je de
-tekst in een bestand bewaren (`to save a file' in het Engels). Als je
+tekst in een bestand bewaren (`to save a file' in het engels). Als je
dat niet doet ben je die veranderingen kwijt op het moment dat je uit
-Emacs gaat. Je kunt een bestand veranderen door het bestand te `bezoeken'.
-(Ook wel `vinden'; `finding' of `visiting' in het Engels.)
+Emacs gaat. Je kan een bestand veranderen door het bestand `bezoeken'.
+(Ook wel `vinden'; `finding' of `visiting' in het engels.)
Het bezoeken van een bestand betekent dat je de inhoud van dat bestand
in Emacs ziet. Het lijkt er dan op alsof je het bestand aan het
veranderen bent. Echter, deze veranderingen zijn slechts tijdelijk
-zolang je het bestand niet bewaart. Op deze manier kun je nooit per
+zolang je het bestand niet bewaart. Op deze manier kan je nooit per
ongeluk een half gewijzigd bestand op het systeem achterlaten. Zelfs
als je het bestand bewaart, zorgt Emacs ervoor dat het originele
bestand onder een gewijzigde naam nog steeds beschikbaar is, voor het
eindigt met streepjes, met aan het begin "--:-- TUTORIAL.nl" of iets
dergelijks. Dit deel van het scherm laat normaal de naam van het bestand
zien dat je op dat moment bezoekt. Op dit moment bezoek je een bestand
-dat "TUTORIAL.nl" heet; het is je eigen kopie van de Nederlandstalige
-Emacs uitleg (`tutorial' in het Engels). Als je in Emacs een bestand
+dat "TUTORIAL.nl" heet; het is je eigen copie van de nederlandstalige
+Emacs uitleg (`tutorial' in het engels). Als je in Emacs een bestand
bezoekt dan staat de naam van het bestand altijd op deze plaats.
-De commando's om een bestand te bezoeken of te bewaren zijn anders dan de
+De commando's om een bestand te bezoek of te bewaren zijn anders dan de
commando's die je tot nu toe geleerd hebt; ze bestaan namelijk uit twee
tekens. Beide commando's beginnen met het teken Control-x. Er zijn een
heleboel commando's die met Control-x beginnen. Veel van die commando's
hebt getypt vraagt Emacs om de naam van het bestand. De naam die je
intypt verschijnt op de onderste regel van het scherm. Wanneer die regel
-voor dit soort invoer gebruikt wordt, heet ze de minibuffer. Je kunt de
+voor dit soort invoer gebruikt wordt, heet ze de minibuffer. Je kan de
gebruikelijke Emacs commando's gebruiken om de filename in te typen.
Tijdens het invoeren van de naam van het bestand (of willekeurig wat
-voor minibuffer invoer) kun je het commando afbreken met C-g.
+voor minibuffer invoer) kan je het commando afbreken met C-g.
->> Type C-x C-f gevolgd door C-g. Dit commando breekt de minibuffer af en
+>> Type C-x C-f gevolgd door C-g. Dit breekt de minibuffer af en
ook het C-x C-f commando dat van de minibuffer gebruik maakte.
Netto resultaat is dat je geen bestand bezoekt.
Als je de naam van een bestand hebt ingevoerd, type dan <Return> om het
-af te sluiten. Hierna gaat het C-x C-f commando aan het werk en haalt
-het bestand op dat je aangegeven hebt. Als het C-x C-f commando daarmee
-klaar is,verdwijnt de minibuffer.
+af te sluiten. Hierna gaat het C-x C-f commando aan het werk en bezoekt
+het bestand dat je aangegeven hebt. Als het C-x C-f commando klaar is,
+verdwijnt de minibuffer.
-Na korte tijd verschijnt de inhoud van het bestand op het scherm en kun
+Na korte tijd verschijnt de inhoud van het bestand op het scherm en kan
je de inhoud wijzigen. Als je de wijzigingen op wilt slaan, type dan het
commando
C-x C-s bewaar bestand (met de s van `save file')
-Dit commando bewaart de tekst zoals Emacs die nu heeft in het bestand.
-De eerstekeer dat je dit doet bewaart Emacs het originele bestand onder een
-andere naam zodat het nog niet verloren is. De nieuwe naam bestaat uit de
-oude naam gevolgd door een "~".
+Dit bewaart de tekst zoals Emacs die nu heeft in het bestand. De eerste
+keer dat je dit doet bewaart Emacs het originele bestand onder een andere
+naam zodat het nog niet verloren is. De nieuwe naam bestaat uit de oude
+naam gevolgd door een "~".
Als Emacs klaar is het bestand te bewaren laat ze de naam van het bestand
zien. Het is een goede gewoonte een bestand redelijk vaak te bewaren
zodat er niet teveel werk verloren gaat als het systeem hangt of crasht.
->> Type C-x C-s, om je kopie van deze uitleg te bewaren. Als het goed is
+>> Type C-x C-s, om je copie van deze uitleg te bewaren. Als het goed is
verschijnt "Wrote ...TUTORIAL" op de onderste schermregel.
OPMERKING: Op sommige systemen gebeurt er helemaal niets als je C-x C-s
to Incremental Search" sectie in het Emacs handboek over hoe om te gaan
met deze situatie.
-Je kunt een bestaand bestand bezoeken, om het te bekijken of het te
-wijzigen. Je kunt ook een bestand bezoeken dat nog niet bestaat. Dit is
-dé manier om met Emacs een nieuw bestand te maken: bezoek het bestand, dat
+Je kan een bestaand bestand bezoeken, om het te bekijken of het te
+wijzigen. Je kan ook een bestand bezoeken dat nog niet bestaat. Dit is
+de manier om met Emacs een nieuw bestand te maken: bezoek het bestand, dat
initieel leeg zal zijn, en voeg tekst toe. Zodra je de tekst bewaart
-wordt het bestand werkelijk gecreëerd, met de tekst als inhoud. Vanaf dat
+wordt het bestand werkelijk gecreeerd, met de tekst als inhoud. Vanaf dat
moment ben je dus bezig met een bestaand bestand.
---------
Als je een tweede bestand bezoekt met C-x C-f blijft het eerste bestand
-gewoon in Emacs. Je kunt naar dat bestand terug door het gewoon nog een
-keer te bezoeken met C-x C-f. Op deze manier kun je een behoorlijk aantal
+gewoon in Emacs. Je kan naar dat bestand terug door het gewoon nog een
+keer te bezoeken met C-x C-f. Op deze manier kan je een behoorlijk aantal
bestanden in Emacs krijgen.
->> Creëer een bestand dat "foo" heet door te typen: C-f C-f foo
- <Return>. Voeg hieraan wat tekst toe en bewaar "foo"
+>> Cre-eer een bestand dat "foo" heet door te typen: C-f C-f foo
+ <Return>. Voeg hieraan wat tekst toe, wijzig haar, en bewaar "foo"
door C-x C-s te typen. Type hierna C-x C-f TUTORIAL <Return> om
weer hier, in de uitleg, terug te komen.
Als je de tekst van het ene bestand verandert en dan een ander bestand
bezoekt dan wordt het eerste bestand niet bewaard. De wijzigingen blijven
-in Emacs, in de buffer die bij het bestand hoort. Het creëren of
+in Emacs, in de buffer die bij het bestand hoort. Het cre-eren of
modificeren van de buffer van het tweede bestand heeft geen effect op de
eerste buffer. Dit is erg nuttig, maar betekent ook dat er een eenvoudige
manier nodig is om het eerste bestand te bewaren. Het zou erg vervelend
zijn om er eerst naar terug te moeten gaan met C-x C-f om het dan te
-kunnen bewaren met C-x C-s. Dus hebben we het commando:
+kunnen bewaren met C-x C-s. Dus hebben we
- C-x s bewaar een paar buffers
+ C-x s bewaar een paar buffers
C-x s vraagt voor elke buffer die veranderingen heeft die nog niet
opgeslagen zijn, of je de buffer wilt bewaren.
->> Voeg wat tekst toe en type C-x s.
+>> Voeg een wat tekst toe en type C-x s.
Emacs vraagt nu of je de buffer die TUTORIAL.nl heet wilt bewaren.
- Beantwoord deze vraag positief door een "y" in te typen (de y van
- "yes", Engels voor "ja").
+ Bewantwoord deze vraag positief door een "y" in te typen (de y van
+ "yes", engels voor "ja").
* UITGEBREIDE COMMANDO'S
toetsenbord passen, zelfs als we hun aantal kunnen vergroten door de
control of meta toets te gebruiken. Emacs lost dit probleem op met het X
commando (met de X van eXtensie of uitbreiding). Het X commando komt in
-twee smaken voor:
+twee smaken:
C-x teken eXtensie; wordt gevolgd door een teken
M-x genaamd commando eXtensie; wordt gevolgd door een naam.
bewaren voordat Emacs daadwerkelijk eindigt.)
C-z is het commando om Emacs *tijdelijk* te verlaten, zodat je daarna weer
-terug kunt keren in dezelfde Emacs sessie.
+terug kan keren in dezelfde Emacs sessie.
Op systemen die deze mogelijkheid bieden, zet C-z Emacs stil: je komt weer
-terug in de shell, maar Emacs is nog aanwezig. In de meeste shells kun je
+terug in de shell, maar Emacs is nog aanwezig. In de meeste shells kan je
Emacs weer activeren met het "fg" commando, of met "%emacs".
Op systemen die niet de mogelijkheid bieden om programma's stil te zetten
-creëert C-z een subshell onder Emacs om je zo in de gelegenheid te
+cre-eert C-z een subshell onder Emacs om je zo in de gelegenheid te
stellen andere programma's uit te voeren en daarna weer in Emacs terug te
keren; Emacs wordt dus niet werkelijk verlaten. In dit geval is het
shellcommando "exit" de normale manier om de subshell te verlaten en in
Emacs terug te keren.
Het moment om C-x C-c te gebruiken is wanneer je uit gaat loggen. Het is
-ook het juiste commando om Emacs te beëindigen wanneer Emacs opgestart
+ook het juiste commando om Emacs te be-eindigen wanneer Emacs opgestart
was door een mail programma of iets dergelijks, aangezien die misschien
niet met een stilgezette Emacs om kunnen gaan. Normaal gezien is het
echter beter Emacs stil te zetten met C-z dan om Emacs te verlaten,
C-x C-c verlaat Emacs
C-x u herstel
-Commando's waaraan een uitgebreid commando wordt toegevoegd, worden nog
-minder vaak gebruikt, of worden alleen onder bepaalde omstandigheden gebruikt.
-Een voorbeeld is het commando replace-string, dat in de hele tekst een string
-vervangt door een andere string (`to replace' betekent `vervangen').
-Als je M-x typt echoot Emacs onderaan het scherm `M-x' en moet je de naam van
-het commando intypen, in dit geval "replace-string". Als je gewoon
-"repl s<TAB>" typt maakt Emacs de naam zelf af. Beëindig het commando
-met <Return>.
+Genaamde uitgebreide commando's worden nog minder vaak gebruikt, of worden
+alleen onder bepaalde omstandigheden gebruikt. Een voorbeeld is het
+commando replace-string, dat in de hele tekst een string vervangt door een
+andere string (`to replace' betekent `vervangen'). Als je M-x typt echoot
+Emacs onderaan het scherm `M-x' en moet je de naam van het commando
+intypen, in dit geval "replace-string". Als je gewoon "repl s<TAB>" typt
+maakt Emacs de naam zelf af. Be-eindig het commando met <Return>.
Het replace-string commando heeft twee argumenten nodig: de string die
vervangen moet worden en de string waarmee die vervangen moet worden.
>> Plaats de cursor op de lege regel twee regels onder deze.
Type dan M-x repl s<Return>gewijzigd<Return>veranderd<Return>.
- Zie hoe deze regel daardoor gewijzigd is. Je hebt elke keer dat het woord
-"g-e-w-i-j-z-i-g-d" voor kwam, vervangen door "veranderd"; beginnend op
+ Zie hoe deze regel daardoor gewijzigd is. Je hebt elk voorkomen van
+ het woord g-e-w-i-j-z-i-g-d vervangen door "veranderd"; beginnend op
de plek waar de cursor staat.
---------------------
Als je een bestand veranderd hebt maar het nog niet bewaard hebt, zouden
-de veranderingen verloren kunnen gaan als het systeem zou hangen of
+de veranderinge verloren kunnen gaan als het systeem zou hangen of
herstarten. Om je hiertegen te beschermen bewaart Emacs om de zoveel tijd
de veranderde tekst automatisch. De naam van het bestand waarin de tekst
automatisch bewaard wordt begint en eindigt met een #. Bijvoorbeeld, als
bestand werkelijk bewaart, wordt het automatisch bewaarde bestand weer
weggegooid.
-Als de computer crasht kun je de automatisch bewaarde tekst terugkrijgen
-door de file normaal te bezoeken (de originele file, niet de automatisch
+Als de computer crasht kan je de automatisch bewaarde tekst terugkrijgen
+door de file normal te bezoeken (de originele file, niet de automatisch
bewaarde), gevolgd door M-x recover file<Return>. Als Emacs vraagt om
-bevestiging, antwoord dan:"yes<Return>", en de automatisch bewaarde
+bevestiging, antwoord dan yes<Return> en de automatisch bewaarde
informatie wordt teruggehaald.
Als je een commando langzaam intypt echoot Emacs de tekens aan de
onderkant van het scherm, in een deel dat het "echo gebied" genoemd wordt.
-Dit gebied omvat de onderste regel van het scherm.
+Dit gebied bevat de onderste regel van het scherm.
* MODE-REGEL
------------
De regel direct boven het echo gebied heet de "mode-regel". De mode-regel
-ziet er ongeveer zo uit:
+zier er ongeveer zo uit:
--**-Emacs: TUTORIAL.nl (Fundamental)--68%------------------------
procent van de tekst bevindt zich boven het scherm. Als het bestand vanaf
het begin op het scherm staat, staat er --Top-- in plaats van --00%--.
Als het laatste stuk tekst op het scherm staat, zal er --Bot-- staan (van
-`bottom', `onderkant' in het Nederlands). Als de tekst zo klein is dat die
+`bottom', `onderkant' in het nederlands). Als de tekst zo klein is dat ze
volledig op het scherm past staat --All-- in de mode-regel.
De sterretjes aan het begin betekenen dat je de tekst gemodificeerd hebt.
In de mode-regel staat tussen haakjes in welke mode je aan het werken
bent. Tenzij een andere mode gewenst is, zit je in de "Fundamental" mode
-zoals nu (`fundamental' is `basis' in het Nederlands). Een dergelijke
-mode heet een hoofdmode (`major mode' in het Engels).
+zoals nu (`fundamental' is `basis' in het nederlands). Een dergelijke
+mode heet een hoofdmode (`major mode' in het engels).
-Emacs heeft verschillende hoofdmodes. Sommige daarvan zijn bedoeld voor
+Emacs heeft verschillende hoofdmodes. Sommige daarvan zijn bedoelt voor
het bewerken van verschillende talen of soorten tekst, zoals bijvoorbeeld
Lisp mode, Text mode, etc. Op elk moment is er altijd precies een mode
actief, en de naam daarvan staat in de mode-regel, op de plaats waar nu
"Fundamental" staat.
-Het komt voor dat sommige commado's zich in verschillende modes anders
-gedragen. Zo bestaat er een commando om een commentaar in een programma te
-typen, en aangezien elke programmeertaal een ander idee heeft over hoe
-commentaar eruit moet zien, moet elke hoofdmode op een andere manier het
-commentaar beginnen. Elke hoofdmode is de naam van een uitgebreid commando,
-en met dat commando schakel je om naar die hoofdmode. Zo is bijvoorbeeld
+Elke hoofdmode zorgt ervoor dat sommige commando's zich anders gedragen.
+Zo bestaat er een commando om een commentaar in een programma te typen, en
+aangezien elke programmeertaal een ander idee heeft over hoe commentaar
+eruit moet zien, moet elke hoofdmode op een andere manier het commentaar
+beginnen. Elke hoofdmode is de naam van een uitgebreid commando, en met
+dat commando schakel je om naar die hoofdmode. Zo is bijvoorbeeld
M-x fundamental-mode het commando om naar de basismode om te schakelen.
-Als je Nederlandse of Engelse tekst wil gaan bewerken, zoals bijvoorbeeld
-dit bestand, kun je beter "text mode" gebruiken, de mode om tekst in een
+Als je nederlandse of engelse tekst wil gaan bewerken, zoals bijvoorbeeld
+dit bestand, kan je beter "text mode" gebruiken, de mode om tekst in een
gewone taal te bewerken:
>> Type M-x text-mode<Return>.
Wees gerust; geen van de commando's die je geleerd hebt zorgen voor
-grondige veranderingen in Emacs. Een van de dingen die je kunt merken is
-bijvoorbeeld dat M-f en M-b nu apostrofs als onderdeel van een woord
+grondige veranderingen in Emacs. Een van de dingen die je kan merken is
+bijvoorbeeld dat M-f en M-b nu apostrophes als onderdeel van een woord
beschouwen. In de vorige, Fundamental, mode behandelen M-f en M-b de
-apostrof als ruimte tussen twee woorden.
+apostrophe als ruimte tussen twee woorden.
Het is gebruikelijk dat hoofdmodes dergelijke subtiele verschillen hebben.
De meeste commando's doen dus min of meer hetzelfde in elke hoofdmode.
-Met het commando C-h m kun je de documentatie over de huidige hoofdmode
+Met het commando C-h m kan je de documentatie over de huidige hoofdmode
lezen.
>> Gebruik C-u C-v een paar keer om deze zin in de buurt van de bovenkant
Hoofdmodes heten hoofdmodes omdat er ook bijmodes zijn. Bijmodes zijn
geen alternatieven voor hoofdmodes; het zijn slechts kleine modificaties
daarvan. Elke bijmode kan aan- of uitgezet worden, onafhankelijk van
-andere bijmodes en onafhankelijk van de hoofdmode. Je kunt dus nul, een,
+andere bijmodes en onafhankelijk van de hoofdmode. Je kan dus nul, een,
of willekeurig veel minor modes gebruiken.
Een nuttige bijmode voor het bewerken van tekst in een natuurlijke taal,
-zoals Nederlands, is Auto Fill mode (`auto fill' betekent automatisch
+zoals nederlands, is Auto Fill mode (`auto fill' betekent automatisch
uitvullen). Wanneer deze mode aanstaat breekt Emacs automatisch een regel
tussen twee woorden af als de regel anders te lang zou worden.
-Je kunt Auto Fill mode aanzetten met M-x auto-fill-mode<Return>. Als deze
-mode al aanstaat, kun je hem uitzetten met M-x auto-fill-mode<Return>.
+Je kan Auto Fill mode aanzetten met M-x auto-fill-mode<Return>. Als deze
+mode al aanstaat, kan je hem uitzetten met M-x auto-fill-mode<Return>.
Als de mode uitstaat zet dit commando de mode aan; als ze aanstaat zet dit
commando de mode uit. Het commando zet de mode steeds aan en uit zet (`to
-toggle' in het Engels).
+toggle' in het engels).
>> Type nu M-x auto-fill-mode<Return>. Type nu vele malen asdf op een
- regel zodat je kunt zien dat de regel in tweeën gesplitst wordt. Er
+ regel zodat je kan zien dat de regel in twee-en gesplitst wordt. Er
moeten wel spaties tussen de woorden staan, omdat de Auto Fill mode
- alleen op spaties de regel afbreekt.
+ alleen op spaties de regel breekt.
-De rechter kantlijn staat meestal op 70 tekens, maar die kun je veranderen
+De rechter kantlijn staat meestal op 70 tekens, maar die kan je veranderen
met het C-x f commando. Dit commando accepteert een numeriek argument
-om de gewenste kantlijn te verkrijgen.
+dat de gewenste kantlijn is.
>> Type C-x f met 20 als argument (C-u 20 C-x f).
Type wat tekst en zie dat Emacs de regels afbreekt bij 20 tekens.
- Zet de kantlijn nu terug op 70, dus met C-u 70 C-x f.
+ Zet de kantlijn nu terug op 70, weer met C-x f.
Als je de tekst midden in een regel verandert vult Auto Fill mode
de regel niet opnieuw.
-Om een alinea opnieuw te vullen, type M-q (Meta-q) terwijl de
-cursor in de alinea staat.
+Om een paragraaf opnieuw te vullen, type M-q (Meta-q) terwijl de
+cursor in de paragraaf staat.
->> Plaats de cursor in de voorgaande alinea en type M-q.
+>> Plaats de cursor in de voorgaande paragraaf en type M-q.
* ZOEKEN
Als je C-s typt verschijnt de string "I-search" in het echo gebied. Dit
betekent dat Emacs bezig is met een `incremental search' (incrementele
-zoekopdracht) en wacht op het intypen van de zoekstring. <RET> beëindigt
+zoekopdracht) en wacht op het intypen van de zoekstring. <RET> be-eindigt
het zoeken.
->> Type nu C-s om het zoeken te starten. Type nu, LANGZAAM, één letter per
- keer, het woord `cursor', met een pauze na elke letter zodat je kunt
+>> Type nu C-s om het zoeken te start. Type nu, LANGZAAM, een letter per
+ keer, het woord `cursor', met een pauze na elke letter zodat je kan
zien wat er met de cursor gebeurt. Je hebt nu eenmaal naar het woord
`cursor' gezocht.
->> Type nogmaals C-s, om het volgende woord `cursor' te zoeken
-
-> Type nu viermaal <Delete> en let op de cursorbewegingen.
->> Type <RET> om het zoeken te beëindigen.
+>> Type nogmaals C-s, om naar het volgende voorkomen van `cursor' te
+ zoeken.
+>> Type nu viermaal <Delete> en let op de cursorbewegingen.
+>> Type <RET> om het zoeken te be-eindigen.
Zag je wat er gebeurde? Tijdens incrementeel zoeken probeert Emacs naar
de eerste plek te gaan waar de string staat die je tot dan toe getypt
hebt. Om naar de volgende plek te gaan, type je C-s nog een keer. Als er
-geen volgende plek is gevonden piept Emacs en vertelt je dat de zoekopdracht
-is beëindigd. (`failing' in het Engels); met C-g kun je het zoeken afbreken.
+geen volgende plek is piept Emacs en vertelt je dat de zoekopdracht faalt
+(`failing' in het engels); met C-g kan je het zoeken afbreken.
-Als je tijdens incrementeel zoeken <Delete> typt, zul je zien dat het
+OPMERKING: Op sommige systemen gebeurt er helemaal niets als je C-x C-s
+typt, en daarna ook niets meer. Dit komt door een eigenschap van de
+machine waarop je werkt die te maken heeft met `flow control'. Met C-s
+stopt de `flow' en komt niets meer van wat je typt bij Emacs terecht. Om
+deze situatie te herstellen, type C-q. Lees daarna de "Spontaneous Entry
+to Incremental Search" sectie in het Emacs handboek over hoe om te gaan
+met deze situatie.
+
+Als je tijdens incrementeel zoeken <Delete> typt, zal je zien dat het
laatste teken dat je in de zoekstring typte weggehaald wordt en dat het
zoeken teruggaat naar de voorgaande plaats. Als je bijvoorbeeld begint
-met zoeken en je typt een "c" dan ga je naar de plaats waar de "c" het
-eerst voorkomt. Type je vervolgens een "u" dan gaat de cursor naar de
-plaats waar de string "cu" het eerst voorkomt". Als je nu <Delete> typt, dan
-wordt de "u" van de zoekstring afgehaald en gaat de cursor terug naar de
-plaats waar hij stond voordat je de "u" intypte, i.e. de plaats waar "c" het
-eerst voorkomt.
+met zoeken en je typt een "c" dan ga je naar het eerste voorkomen van een
+"c". Type je vervolgens een "u" dan gaat de cursor naar het eerste
+voorkomen van de string "cu". Als je nu <Delete> typt, dan wordt de "u"
+van de zoekstring afgehaald en gaat de cursor terug naar de plaats waar
+hij stond voordat je de "u" intypte, i.e. het eerste voorkomen van de "c".
Als je tijdens een zoekoperatie een control- of meta-teken intypt dan
-wordt het zoeken beëindigd. Er zijn een paar uitzonderingen, namelijk
+wordt het zoeken be-eindigd. Er zijn een paar uitzonderingen, namelijk
tekens die tijdens zoeken een speciale betekenis hebben, zoals C-s en C-r.
-Met C-s begin je te zoeken naar de plaats waar de zoekstring voor het eerst
-voorkomt NA de huidige cursorpositie. Als je iets wilt zoeken dat eerder in
-de tekst moet voorkomen, gebruik dan C-r i.p.v. C-s. Alles wat we nu weten
-over C-s geldt ook voor C-r, alleen de zoekrichting is omgedraaid.
+Met C-s begin je te zoeken naar het eerste voorkomen van de zoekstring NA
+de huidige cursorpositie. Als je iets wilt zoeken dat eerder in de tekst
+moet voorkomen, gebruik dan C-r i.p.v. C-s. Alles wat we nu weten over
+C-s geldt ook voor C-r, alleen de zoekrichting is omgedraaid.
* MEERDERE VENSTERS
-------------------
Een van Emacs' aardige eigenschappen is dat je meerdere vensters op het
-scherm kunt laten zien.
+scherm kan laten zien.
>> Zet de cursor op deze regel en type C-u 0 C-l.
>> Type C-M-v om de tekst in het onderste venster te verschuiven.
(Als je geen Meta toets hebt, type dan ESC C-v.)
->> Type C-x o (met de `o' van `other'; `ander' in het Nederlands)
+>> Type C-x o (met de `o' van `other'; `ander' in het nederlands)
om de cursor naar het andere venster te verplaatsen.
>> Verschuif de tekst in het onderste venster, m.b.v. C-v en M-v.
te zetten. De cursor staat weer precies op de plaats waar
hij stond toen je het venster verliet.
-Je kunt C-x o blijven gebruiken om van venster naar venster te gaan. Elk
+Je kan C-x o blijven gebruiken om van venster naar venster te gaan. Elk
venster heeft zijn eigen cursorpositie; de cursor is altijd maar zichtbaar
in een daarvan. Alle normale commando's hebben betrekking op het venster
-waarin de cursor staat. Dit venster is het `geselecteerde venster'
-(`selected window' in het Engels).
+waar de cursor in staat. Dit venster is het `geselecteerde venster'
+(`selected window' in het engels).
Het C-M-v commando is erg nuttig wanneer je tekst aan het bewerken bent in
het ene venster, terwijl je het andere venster als referentie gebruikt.
-Je kunt de cursor dan altijd in het venster houden waarin je bezig bent,
+Je kan de cursor dan altijd in het venster houden waarin je bezig bent,
terwijl je met C-M-v door de tekst in het andere venster loopt.
C-M-v is een voorbeeld van een CONTROL-META teken. Als je een echte META
-toets hebt kun je C-M-v intypen door zowel CTRL als META ingedrukt te
+toets hebt kan je C-M-v intypen door zowel CTRL als META ingedrukt te
houden terwijl je v typt. Het maakt niet uit in welke volgorde je de CTRL
-en META indrukt; het gaat erom welke toetsen ingedrukt zijn terwijl je typt.
+en META indrukt; het gaat erom welke ingedrukt zijn terwijl je typt.
-Als je geen echte META toets hebt kun je ESC gebruiken; de volgorde maakt
+Als je geen echte META toets hebt kan je ESC gebruiken; de volgorde maakt
dan wel uit. Je moet dan ESC typen, gevolgd door CTRL-v; CTRL-ESC v zal
niet werken. Dit komt doordat ESC zelf een teken is, terwijl CTRL en META
dat niet zijn.
* RECURSIEVE BEWERKINGSNIVEAUS
------------------------------
-Soms kom je in Emacs in een recursief bewerkingsniveau terecht (Engels:
+Soms kom je in Emacs in een recursief bewerkingsniveau terecht (engels:
`recursive editing level'). Dit is te zien in de moderegel aan de rechte
-haken die om de haakjes van de naam van de hoofdmode staan. Dan staat er
+haken om de haakjes die om naam van de hoofdmode staan. Dan staat er
bijvoorbeeld [(Fundamental)] in plaats van (Fundamental).
Type ESC ESC ESC Om uit een recursief bewerkingsniveau te komen. Dit is
-een generiek `ontsnappingscommando'. Je kunt het ook gebruiken om extra
+een generiek `ontsnappingscommando'. Je kan het ook gebruiken om extra
vensters weg te gooien of om uit de minibuffer te komen.
>> Type M-x om in een minibuffer te komen, en type dan ESC ESC ESC
C-p runs the command previous-line
- (Nederlands: C-p voert het commando previous-line uit.)
+ (nederlands: C-p voert het commando previous-line uit.)
Dit commando vertelt je `de naam van de functie'. Functies worden vooral
gebruikt om Emacs uit te breiden of aan de wensen van de gebruiker aan te
Dit laat de documentatie van de functie zien, inclusief de naam van de
functies, in een apart venster. Als je klaar bent met lezen, type C-x 1
om van dat venster af te komen. Je hoeft dat natuurlijk niet meteen te
-doen. Je kunt ook eerst wat anders doen voordat je C-x 1 typt.
+doen. Je kan ook eerst wat anders doen voordat je C-x 1 typt.
Hier zijn nog wat nuttige mogelijkheden van C-h:
>> Type C-h a file<Return>.
Dit laat in een ander venster alle M-x commando's zien met `file' in hun
-naam. Je zult teken-commando's zien als C-x C-f naast de overeenkomende
+naam. Je zal teken-commando's zien als C-x C-f naast de overeenkomende
commandonaam zoals find-file.
>> Type C-M-v herhaaldelijk om de tekst in het hulpvenster te verschuiven.
dan niet zitten en maak jezelf geen verwijten. Klaag erover!
-* KOPIËREN
+* COPI-EREN
-----------
-(De Engelse versie van) deze uitleg is voorafgegaan door een lange reeks
+(De engelse versie van) deze uitleg is voorafgegaan door een lange reeks
van Emacs tutorials, die begon met de uitleg die Stuart Cracraft schreef
-voor de originele Emacs. Deze Nederlandse vertaling is gemaakt door
+voor de originele Emacs. Deze nederlandse vertaling is gemaakt door
Pieter Schoenmakers <tiggr@ics.ele.tue.nl> op basis van de GNU Emacs 20.2
TUTORIAL.
-(Wat nu volgt is een vertaling naar het Nederlands van de condities voor
+(Wat nu volgt is een vertaling naar het nederlands van de condities voor
gebruik en verspreiding van deze uitleg. Deze vertaling is niet
gecontroleerd door een jurist. Er kunnen derhalve geen rechten aan de
-vertaling worden ontleend, en de vertaling wordt gevolgd door het Engelse
+vertaling worden ontleend, en de vertaling wordt gevolgd door het engelse
origineel.)
Deze versie van de uitleg valt onder copyright, net als GNU Emacs.
-Je mag deze uitleg distribueren onder bepaalde condities:
+Je mag deze uitleg distribu-eren onder bepaalde condities:
Copyright (c) 1985, 1996, 1997 Free Software Foundation
- Iedereen mag letterlijke kopieën van dit document, zowel ontvangen als
+ Iedereen mag letterlijke copi-en van dit document, zoals ontvangen,
verspreiden, op elke medium, vooropgesteld dat de copyrightmelding en
toestemmingsmelding niet aangetast worden en dat de verspreider aan de
- ontvanger dezelfde distributierechten verleent als aan hem verleend
+ ontvanger dezelfde distributierechten verleend als aan hem verleend
door deze melding.
Toestemming wordt verleend om gemodificeerde versies van dit document,
vooropgesteld dat ze ook duidelijk melding maken van degene die als
laatste modificaties doorgevoerd heeft.
-De condities voor het kopiëren van Emacs zelf zijn complexer dan dit,
+De condities voor het copi-eren van Emacs zelf zijn complexer dan dit,
maar gebaseerd op dezelfde gedachte. Lees het bestand COPYING en geef
-vervolgens kopieën van Emacs aan al je vrienden. Help bij het uitroeien
+vervolgens copi-en van Emacs aan al je vrienden. Help bij het uitroeien
van softwarebeschermingspolitiek (`software eigendom') door vrije software
-te gebruiken, te schrijven en te delen!
+te gebruiken, schrijven en delen!
(Engels origineel van de copyrightmelding en condities:
same spirit. Please read the file COPYING and then do give copies of
GNU Emacs to your friends. Help stamp out software obstructionism
("ownership") by using, writing, and sharing free software!)
-
-;;; arch-tag: 3399e308-e605-4125-8fbb-b2fe91ac3149
-;;; arch-tag: 6c6b7445-4cd5-44ca-a101-7f4697b92f60
spirit. Citiþi fiºierul COPYING ºi apoi distribuiþi prietenilor copii
ale Emacs-ului. Contribuiþi la eliminarea obstrucþionismului software
folosind, scriind ºi distribuind free software!
-
-;;; arch-tag: dcf252cf-bd67-4f8d-a440-1ec4b8dbfd70
// Alex Ott.
// âÏÌØÛÏÅ ÓÐÁÓÉÂÏ ÷ÌÁÄÉÍÉÒÕ âÏÒÍÏÔÏ×Õ, ÎÁ ÂÁÚÅ ÐÅÒÅ×ÏÄÁ ËÏÔÏÒÏÇÏ ÂÙÌ ÓÄÅÌÁÎ
// ÜÔÏÔ ÐÅÒÅ×ÏÄ
-
-;;; arch-tag: ad4e5698-ea8b-45b7-b236-ed5ad5b72d2b
;;; Local Variables:
;;; coding: iso-latin-2
;;; End:
-
-;;; arch-tag: 87861cfa-5cf6-4b87-9fab-86c93c5ca9f3
;;; Local Variables:
;;; coding: iso-latin-2
;;; End:
-
-;;; arch-tag: 985059e4-44c6-4ac9-b627-46c8db57acf6
same spirit. Please read the file COPYING and then do give copies of
GNU Emacs to your friends. Help stamp out software obstructionism
("ownership") by using, writing, and sharing free software!
-
-;;; arch-tag: b352f774-622b-4cc6-85ce-43e3baf4fc1b
Translate - January 1999 by Virach Sornlertlamvanich
-;;; arch-tag: 79ad252a-448a-4dc9-a4cb-2097dd1ec014
;;; Local Variables:
;;; coding: utf-8
;;; End:
-
-;;; arch-tag: 8788b16b-e739-4304-a7f2-729bdb999fa0
;;; Local Variables:
;;; coding: chinese-big5
;;; End:
-
-;;; arch-tag: a51dafb4-e602-432b-8020-5d5d5f150811
# local variables:
# tab-width: 4
# End:
-
-# arch-tag: cbaa71af-719b-4647-a2c1-cd4d36a4fc64
% Local variables:
% compile-command: "tex calccard"
% End:
-
-% arch-tag: a2764f34-ec23-4083-bd5c-53f9e70a5da9
%\copyrightnotice
\bye
-
-% arch-tag: dd78e947-5b89-4e5b-8bab-b6003719dce5
% Local variables:
% compile-command: "csplain cs-refcard"
% End:
-
-% arch-tag: 24ab5519-539c-4941-9a95-4ed9d819030f
% Title: GNU Emacs Survival Card
% Author: Wlodek Bzyl <matwb@univ.gda.pl>
%
-% $Revision: 1.2 $
-% $Date: 2003/02/04 14:30:41 $
+% $Revision: 1.1 $
+% $Date: 2001/04/18 13:59:16 $
%
%**start of header
% Local variables:
% compile-command: "csplain survival"
% End:
-
-% arch-tag: 86b21d3f-d8b6-412d-8d77-e6e8728f590e
.so man1/etags.1
-
-.\" arch-tag: 54d4579b-9d66-4ba5-9fda-f01ec83612ad
% Local variables:
% compile-command: "tex refcard"
% End:
-
-% arch-tag: af0a2666-f289-49f1-a9cc-cedab9783314
\bye
-% arch-tag: 483e7bb4-4576-4733-9fca-0eae1c861484
document into another language, under the above conditions for
modified versions, except that this permission notice may be stated
in a translation approved by the Free Software Foundation.
-
-.\" arch-tag: 04dfd376-b46e-4924-919a-cecc3b257eaa
}
-# arch-tag: 1e1b74b9-bf2c-4b23-870f-9eebff7515cb
@ whichjob = 1 + $isjob + $?DISPLAY * 2 + $?WINDOW_PARENT * 4; \
test -S ~/.emacs_server && emacsclient \!* \
|| echo `pwd` \!* >! ~/.emacs_args && eval $emacs_command[$whichjob]'
-
-# arch-tag: 433d58df-15b9-446f-ad37-f0393e3a23d4
for the Debian GNU/Linux system (but may be used by others).
.SH COPYING
This manual page is in the public domain.
-
-.\" arch-tag: 2b35e723-b197-4073-8752-231bc8b3d3f3
document into another language, under the above conditions for
modified versions, except that this permission notice may be stated
in a translation approved by the Free Software Foundation.
-
-.\" arch-tag: a1f44815-5163-4026-89c1-4404e4b81d37
document into another language, under the above conditions for
modified versions, except that this permission notice may be stated
in a translation approved by the Free Software Foundation.
-
-.\" arch-tag: 9534977f-af78-42f0-991d-1df6b6c05573
\bye
-% arch-tag: ffe6a489-24a2-4083-b8c3-5d03b621689d
% Local variables:
% compile-command: "tex fr-refcard"
% End:
-
-% arch-tag: 39d6dc6e-1a4a-4071-84db-4719d4e9e40d
% Title: GNU Emacs Survival Card
% Author: Wlodek Bzyl <matwb@univ.gda.pl>
%
-% $Revision: 1.2 $
-% $Date: 2003/02/04 14:30:41 $
+% $Revision: 1.1 $
+% $Date: 2001/11/18 18:33:57 $
%
%**start of header
% Local variables:
% compile-command: "tex survival"
% End:
-
-% arch-tag: 2fb4e93f-8bfa-4ab4-bc6d-b475131d766a
recommend releasing these examples in parallel under your choice of
free software license, such as the GNU General Public License,
to permit their use in free software.
-
-.\" arch-tag: 3a15de89-40c2-46b8-a9a2-0710357a9baa
(if (symbolp arg)
(set_proc_str (get-pname arg))
(error arg " is illegal argument to set-proc-str"))))
-
-;;; arch-tag: 2e76c01f-8d6a-4d04-b9ab-0eaabec96aee
set key \2463 \kendscn
set key \2457 \kupscn
set key \2465 \kdnscn
-
-;;; arch-tag: b066a884-e956-4f46-9d9c-13502f6cf7a6
set key \2318 \255 ;; m-del
-;;; arch-tag: 93cefb0a-2b07-4d09-ae78-4d807b15645d
%&mex
%=====================================================================
-% $Revision: 1.3 $
-% $Date: 2003/02/04 14:30:42 $
+% $Revision: 1.2 $
+% $Date: 2001/09/23 17:45:20 $
%=====================================================================
% Reference Card for GNU Emacs version 20 on Unix systems was
% translated into Polish language by W{\l}odek Bzyl (matwb@univ.gda.pl)
\copyrightnotice
\bye
-
-% arch-tag: 19d15a16-70be-40c8-ad91-88899aac32a9
% Local variables:
% compile-command: "tex refcard"
% End:
-
-% arch-tag: d67bdf5d-b77c-44eb-a22e-f4f7d25174d2
;;; life-universe-everything: 42
;;; symbolic-formulas: (("Eastern area") ("West-district") ("North&South") ("Other"))
;;; End:
-
-;;; arch-tag: 4fcb0843-e3f9-4270-b8fb-998129190765
% Local variables:
% compile-command: "csplain sk-dired-ref"
% End:
-
-% arch-tag: d5b57e24-16ec-4981-9315-14d3d16d3062
% Local variables:
% compile-command: "csplain sk-refcard"
% End:
-
-% arch-tag: 9f8eacf2-daf9-4162-bc8d-4af7b269f3d3
% Title: GNU Emacs Survival Card
% Author: Wlodek Bzyl <matwb@univ.gda.pl>
%
-% $Revision: 1.2 $
-% $Date: 2003/02/04 14:30:42 $
+% $Revision: 1.1 $
+% $Date: 2001/04/18 13:58:29 $
%
%**start of header
% Local variables:
% compile-command: "csplain sk-survival"
% End:
-
-% arch-tag: 126389ad-40b2-4bf9-ac1d-e5105d0986b9
% Local variables:
% compile-command: "tex survival"
% End:
-
-% arch-tag: 4f9a0562-617b-4843-aee1-450c41d6b22c
time-stamp-format: "%:b %:d, %:y"
compile-command: "make just-tasks"
End:
-
-@ignore
- arch-tag: 7ed10085-fa7c-47d4-9ed5-39e885603e5c
-@end ignore
exit 0
#
# Upon system reboot, all processes will inherit the new large ulimit.
-
-# arch-tag: 6f9a7072-9d07-4431-b0bb-e867648ad0b4
% Local variables:
% compile-command: "tex refcard"
% End:
-
-% arch-tag: 342a9548-4de4-499d-b864-74fb426b6729
% Local variables:
% compile-command: "tex viperCard"
% End:
-
-% arch-tag: e287b45c-4c5e-4bf9-ae28-ead4cd9f68e3
-# $Id: 4Corner.tit,v 1.2 2001/03/06 13:29:34 handa Exp $
+# $Id: 4Corner.tit,v 1.3 1995/01/02 06:09:19 ygz Exp $
# HANZI input table for cxterm
# To be used by cxterm, convert me to .cit format first
# .cit version 2
99901 æÎ
99903 ¿¢
99904 ºa
-
-# arch-tag: aa089b66-ed25-422f-97e2-78574370efa5
napa ùÚ # ---> 6v1-0^1- 0
,nr\040 ùÛ # ---> 8v6v4^ 0
weu\040 ùÜ # ---> 2^3^7^ 0
-
-# arch-tag: 344d9e2d-e34b-4c61-ac52-aa46da44347d
-# $Id: CCDOSPY.tit,v 1.1 1999/10/08 20:06:27 fx Exp $
+# $Id: CCDOSPY.tit,v 1.1 1991/10/27 06:21:16 ygz Exp $
# HANZI input table for cxterm
# To be used by cxterm, convert me to .cit format first
# .cit version 1
zuj ×ê×ë߬çÚõò
zun ×ð×ñߤé×÷®
zuo ×ò×ó×ô×õ×ö×÷×ø×ùßòàÜâôëÑìñ
-
-# arch-tag: cc94b635-0552-40f3-8513-5edab6f13ce5
zoology °Êª«¾Ç
-# arch-tag: 618eec81-84f6-42ce-b2e7-01569fb3f8cb
z2 ¼õ±Î¾C¿¬¹Èîg÷´ÆRÃïö}á¼ævæ©Ámólâ°ê¢ä»åçWðjðæòj
z3 ÃͶþͽØD
z4 ¶Æ¿D¶ø¾ÒéMØ´Êó鮩íÛäéj
-
-# arch-tag: 7f36821c-dc1c-4119-8679-f354a58ff15f
zuo3 ¥ª¦õðw
zuo4 °µ§@§¤®yÜ`¯®Æw¬gÌ©Ð_ÍÚßÜÑY
zuo5
-
-# arch-tag: cd75d187-c91f-4197-8e77-1ee1a89a38bb
| ¡U¡ý¡Y¢x¡ü
} ¡¢¡b¡d
~ ¡\¡ã¡Û
-
-# arch-tag: 6c85fd95-a46d-4b07-8a87-2121eb14e132
-# $Id: Punct.tit,v 1.1 1999/10/08 20:06:50 fx Exp $
+# $Id: Punct.tit,v 1.1 1991/10/27 06:21:16 ygz Exp $
# HANZI input table for cxterm
# To be used by cxterm, convert me to .cit format first
# .cit version 1
symbol ¡á¡â¡ã¡ä¡å¡æ¡ç¡è¡é¡ê¡ë¡ì¡í
| £ü¡¬¡Î
~ £þ¡«¡×¡Ø¡Þ
-
-# arch-tag: 4d0e14b7-4eb2-4310-9582-e981f4c4a7f0
| ¡U
} ¡b
~ ¡ã
-
-# arch-tag: 5c41662d-6b85-467f-a977-ba80a6bd9f2c
-# $Id: QJ.tit,v 1.1 1999/10/08 20:06:51 fx Exp $
+# $Id: QJ.tit,v 1.1 1991/10/27 06:21:16 ygz Exp $
# HANZI input table for cxterm
# To be used by cxterm, convert me to .cit format first
# .cit version 1
| £ü
} £ý
~ £þ
-
-# arch-tag: 3ee780cd-600a-49e7-a77b-85b898adc205
-# $Id: SW.tit,v 1.1 1999/10/08 20:06:53 fx Exp $
+# $Id: SW.tit,v 1.1 1991/10/27 06:21:16 ygz Exp $
# HANZI input table for cxterm
# To be used by cxterm, convert me to .cit format first
# .cit version 1
zy °±´Ôµª¶Ì·Õ·ú¸×º¤ºÐÂÈÄÊÆóÆøÇâÇèÉÏЩÐéÑõÕ½Ö¹ÙÚÙÝÙÞê¨
zy ëë®ë¯ë°ë±ë²ë³ë´ëµõºö´÷ª
zz ´Ó¿¨ÁìÂƵÇêÈËÌ°Õ§ÕêÖÚêßì£ì¨ò¢ò¥
-
-# arch-tag: 0e108249-9190-46f4-884f-6af10a9aeb89
-# $Id: TONEPY.tit,v 1.1 1999/10/08 20:06:56 fx Exp $
+# $Id: TONEPY.tit,v 1.1 1991/10/27 06:28:34 ygz Exp $
# HANZI input table for cxterm
# To be used by cxterm, convert me to .cit format first
# .cit version 1
zuo3 ´é×ó×ô
zuo4 Ôä×õ×ö×÷×ø×ùÚèßòâôëÑìñõ¡
zuo5
-
-# arch-tag: 6a2668ac-399a-4504-bb7a-5c641cb8e0ef
zp4 ¥÷©Á¾Ä¼«¤ÀÁTàóô\Ê®ÏýèßéÃêëðx
zp6 ¼XµI¨WÌÞÙÈÓÇóFñãånåýóVï´Ê·ÍZÓbãËøtÊÒêýöc
zul4 ßú
-
-# arch-tag: e40a2740-dae5-4fd9-a32e-bedf6503dc65
-2003-08-25 Jesper Harder <harder@ifa.au.dk> (tiny change)
-
- * quail/latin-pre.el ("german-prefix"): Fix typo in the docstring.
-
-2003-08-20 Dave Love <fx@gnu.org>
-
- * quail/latin-ltx.el: Add \rhd.
-
-2003-08-19 Markus Rost <rost@math.ohio-state.edu>
-
- * quail/latin-pre.el ("french-prefix"): Fix spacing in docstring.
-
2003-07-21 KAWABATA, Taichi <kawabata@m17n.org>
* quail/indian.el (quail-indian-update-translation): Adjusted the
Copyright (C) 1997, 1998, 1999, 2001 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted provided the copyright notice and this notice are preserved.
-
-;;; arch-tag: 4b364045-a476-4ff7-92ad-dde58dbd45b4
\YOO èÛø[¡¼¡¼ì{ì|ÂDïjÂCïlù\ÂBóÐñÇùÎÅ¿÷®ö÷²ÃXÄJóÈóÖóËÄI¡¼óÍóÎÄK¡¼óÏ¡¼õkÆsÄÏõnõv¡¼¡¼¡¼ö®Å`ö¯÷¯ÅÀ÷«¡¼¡¼ÅíÅëøWø×
\YUK êé³bߢ×L×K×E§¿¡¼µËµÍ¡¼¡¼ßs¡¼ã¦¡¼¡¼ÜæÜù»Mæý¡¼íêí衼¦G¡¼Ëx¡¼ÌÒ¡¼ªÐªÒÍ°¡¼¡¼¡¼Ä¤Ð[Ð_ÐgÐeÎúO×H¯Ö¡¼¡¼¯â®Ó¡¼
<hr></pre></body></html>
-
-<!-- arch-tag: bae78679-a82a-442d-a0cc-07d8f7f72c53
- (do not change this comment) -->
\YOO öÐöÑöÒöÓöÖöØöÙöÚöÛöÜöÝöÞößöáöâöãöäöåöæöçöëöíöîöïöðöñöòöóöôöõööö÷öøöùöúöûöüöýöþ÷Ý÷£÷¤÷¥÷¦÷§÷¨÷ª÷«÷¬÷÷®÷¯
\YUK ì¢ëàëáëâëãëäÄòëæëçëéëêëëëíëïëðëñëòëóëôëöëùëúëûëþì¡ë¾ë¿ëÀëÂëÃëÄëÅëÆëÇëÉëËëÌëÍëÏëÑëÒëÓëÔëÕëÖë×ëÛëÜëÝëÞëß
<hr></pre></body></html>
-
-<!-- arch-tag: 31cf695a-5f79-4a94-be79-54c38c444946
- (do not change this comment) -->
extraclean: distclean
-rm -f *~ \#* m/?*~ s/?*~
-
-# arch-tag: f666a939-8145-4d64-a6a6-cc1f61bd32ca
;;
(provide 'ja-dic)
-;;; arch-tag: 18f1f3f5-d706-4c5d-bdac-a6a762de287d
;;; ja-dic.el ends here
distclean maintainer-clean:
if exist stamp-subdir $(DELTREE) $(SUBDIRS)
$(DEL) stamp-subdir
-
-# arch-tag: cded53b4-4803-496b-8c05-7daff80e5b3b
distclean maintainer-clean:
if exist stamp-subdir $(DELTREE) $(SUBDIRS)
- $(DEL) stamp-subdir
-
-# arch-tag: 08250c45-fa9c-4f39-a175-a0c5c36dd67b
("dd" ?ð)
("DD" ?Ð)
("Dd" ?Ð))
-
-;;; arch-tag: 8cb44078-9c51-4e81-9ef8-7d5b89f62e31
;; coding: iso-2022-7bit
;; End:
-;;; arch-tag: 3a0cc2ac-de48-42fe-9e80-05d8aa6faa36
;;; cyril-jis.el ends here
;; coding: iso-2022-7bit
;; End:
-;;; arch-tag: e6d34b16-8710-4181-a17e-819a1df0334f
;;; cyrillic.el ends here
([kp-0] ?0)
([kp-add] ?+))
-;;; arch-tag: 0a27dffc-a5e1-479f-9da2-a9eb91b34d8a
;;; czech.el ends here
(if (ethio-prefer-amharic-p) ?\e$(3"c\e(B ?\e$(3"f\e(B)
"ethiopic"))
-;;; arch-tag: 66c182a8-d802-40fa-9c0d-d8ebe2f909d5
;;; ethiopic.el ends here
("e1" ?) ;; Letter not in Unicode (private use code).
)
-;;; arch-tag: 7b26f205-7091-435e-a2cf-8778f899dc8a
;;; georgian.el ends here
("y;:" ?\e,F`\e(B))
-;;; arch-tag: 2a37e042-db1b-4ecf-b755-117775a3c150
;;; greek.el ends here
("SC/" ?\e$(C!K\e(B)
("SF" ?\e$(C"5\e(B))
-;;; arch-tag: 26bc93fc-64ee-4fb1-b26d-22220d132dbe
;;; hangul.el ends here
("mdq" ?\e$(CH}\e(B)
("mda" ?\e$(CH~\e(B))
-;;; arch-tag: 20ea2223-ab47-414f-8e28-d03dc83617b7
;;; hangul3.el ends here
("glf" "\e$B5Merk#pvs\\e(B")
("unknown" "\e$B4#<5DNFJFdFuJ=KsL]QeRIRpS&S9SuS{T*T+T8T:T>TBTCTKTNTQTWT\T_UNU~V&V,V-V.V/V0V2V4V8VNW;WjWnWpY0YKY^Z1Zs[=[b[n\)\-\.\/\0\1\O\S\j\n\o\p\q\x]&]6]B]i^<^L^c_&_1`<a:a<a>b<bBbXbmbpbsc%c5cNcdc}d&d1d=dIdLdYdddfdhdte9eaebemenevf$g3g\h4h6hHhMhWhhiFi[ibj,jQj^jmk\lCmZmhmimzn%n}o'oZo]p#p-pXp]p`q;qIqRr;r@rGrOrZr_rer~s#s%\e(B"))
-;;; arch-tag: 06336a2c-696e-45f1-9990-aff251e7493a
;;; hanja-jis.el ends here
("gml" "\e$(C}j}k}l}m}n}o}p}q}r}s}t}u}v}w}x}y}z}{}|}}\e(B")
("glf" "\e$(C}~\e(B"))
-;;; arch-tag: f83c4a34-ee8a-4d7f-95a2-e18816c57182
;;; hanja.el ends here
("m8" "\e$(C}j}k}l}m}n}o}p}q}r}s}t}u}v}w}x}y}z}{}|}}\e(B")
("mdw" "\e$(C}~\e(B"))
-;;; arch-tag: 2dda6492-e6e3-47a0-aa88-8d9bdf3a200f
;;; hanja3.el ends here
("/" ?.)
("'" ?,))
-;;; arch-tag: 771b887d-15af-4a4d-b4ce-a4a86f5ca0cf
;;; hebrew.el ends here
"tamil-inscript" "Tamil" "TmlIS"
"Tamil keyboard Inscript.")
-;;; arch-tag: 9e5a621e-f7d5-4fce-9543-0a51b407c940
;;; indian.el ends here
("`" ?\e,0q\e(B)
(":" ?\e,0r\e(B))
-;;; arch-tag: cf2614cc-ecce-4ef5-ba51-37faeed41691
;;; ipa.el ends here
(vector (japanese-katakana (aref trans 0))))
(t trans)))))
-;;; arch-tag: 47e0bfd4-6ecc-4d01-89a8-d687c5e01ff7
;;; japanese.el ends here
(v-state (lao-vowel-key-alist . t-state))
(t-state lao-tone-key-alist))))
-;;; arch-tag: 23863a30-a8bf-402c-b7ce-c517a7aa8570
;;; lao.el ends here
("z~~" ["z~"])
)
-;;; arch-tag: 722466a6-363d-431c-9161-879e16e2da5d
;;; latin-alt.el ends here
("\\lesssim" ?\e$,1y2\e(B)
("\\lfloor" ?\e$,1zj\e(B)
("\\lhd" ?\e$,2"!\e(B)
- ("\\rhd" ?\e$,2!w\e(B)
("\\ll" ?\e$,1y*\e(B)
("\\llcorner" ?\e$,1z~\e(B)
("\\lnapprox" ?\e$,1zF\e(B)
("\\rdq" ?\\e$,1r}\e(B)
)
-;;; arch-tag: 3daae613-2c53-446e-a0a1-ee2e1ebed15f
;;; latin-ltx.el ends here
("s<" ?\e,B9\e(B)
("z<" ?\e,B>\e(B))
-;;; arch-tag: 170180fb-9617-4d58-9d51-65ca23c05d94
;;; latin-post.el ends here
acute | ' | 'e -> \e,Ai\e(B
grave | ` | `a -> \e,A`\e(B
circumflex | ^ | ^a -> \e,Ab\e(B
- diaeresis | \" | \"i -> \e,Ao\e(B
+ diaeresis | \" | \"i -> \e,Ao\e(B
cedilla | ~ or , | ~c -> \e,Ag\e(B ,c -> \e,Ag\e(B
symbol | ~ | ~> -> \e,A;\e(B ~< -> \e,A+\e(B
" nil t nil nil nil nil nil nil nil nil t)
"german-prefix" "German" "DE>" t
"German (Deutsch) input method with prefix modifiers
Key translation rules are:
- \"A -> \e,AD\e(B -> \"O -> \e,AV\e(B \"U -> \e,A\\e(B \"s -> \e,A_\e(B
+ \"A -> \e,AD\e(B -> \"O -> \e,AV\e(B \"U -> \e,A\\e(B \"s -> ?\e,A_\e(B
" nil t nil nil nil nil nil nil nil nil t)
(quail-define-rules
("~|" ?\e,A&\e(B)
("~~" ?\e,A8\e(B)
)
-
-;;; arch-tag: 83017837-6b84-4366-b183-e0577e3ed838
;;; latin-pre.el ends here
lao-transcription-tone-alist)
(t-state lao-transcription-tone-alist))))
-;;; arch-tag: f65e4038-e187-4906-997b-d2de7ed813d2
;;; lrt.el ends here
(quail-defrule "v" (nth 2 (assoc "chinese-punct" quail-package-alist)))
-;;; arch-tag: 941fd2ac-2d26-4b0e-8458-b5e485c5aa7d
;;; py-punct.el ends here
(quail-defrule "v" (nth 2 (assoc "chinese-punct-b5" quail-package-alist)))
-;;; arch-tag: fe8176d3-b467-47d5-9ed9-75b6e27cf29b
;;; pypunct-b5.el ends here
("‌" ?\) ;; ZERO WIDTH NON-JOINER
)
-;;; arch-tag: ad2a65ea-f903-423b-b3bd-08d0912ae41f
;;; sgml-input.el ends here
([kp-0] ?0)
([kp-add] ?+))
-;;; arch-tag: 8aedb992-e191-4eec-ad0d-71a352e02a3d
;;; slovak.el ends here
("Russ" "\e$(C,",#,$,%,&,',(,),*,+,,,-,.,/,0,1,2,3,4,5,6,7,8,9,:,;,<,=,>,?,@,A\e(B")
("russ" "\e$(C,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\e(B"))
-;;; arch-tag: a77d89b9-9847-41d2-8e3a-7cce841ebb3b
;;; symbol-ksc.el ends here
"\e,T;\e(B" "\e,Th\e(B" "\e,T:\e(B" "\e,TO\e(B" "\e,Tm\e(B" "\e,TF\e(B" "\e,T%\e(B" 0 ; x .. DEL
]))
-;;; arch-tag: fed6c468-0616-44b0-88bf-47347bf64825
;;; thai.el ends here
(tibetan-vowel-tibkey-alist . m-state))
(m-state tibetan-modifier-tibkey-alist))))
-;;; arch-tag: 828fdb1a-733f-4c7b-b882-a19d2449ac99
;;; tibetan.el ends here
(provide 'uni-input)
-;;; arch-tag: e0d91c7c-19a1-43d3-8f2b-28c0e031efaa
;;; uni-input.el ends here
(viet-quail-define-rules)
-;;; arch-tag: d2c29221-5a2e-46b2-898b-0e56bc4eb858
;;; viqr.el ends here
;; coding: iso-2022-7bit
;; End:
-;;; arch-tag: 60db6880-0c9f-4456-b9fe-628de053a5ab
;;; vntelex.el ends here
;; ("w\"" ?\e,A>\e(B))
-;;; arch-tag: aeef0eae-0a50-4606-9120-020d59d5e208
;;; welsh.el ends here
-2003-08-25 Takaaki Ota <Takaaki.Ota@am.sony.com> (tiny change)
-
- * etags.c (consider_token): check C++ `operator' only when the
- token len is long enough.
-
-2003-08-20 Dave Love <fx@gnu.org>
-
- * Makefile.in: Remove obsolete references to alloca.
-
2003-07-29 Ken Brush <ken@wirex.com>
* emacsclient.c (main)
Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted provided the copyright notice and this notice are preserved.
-
-;;; arch-tag: 2d979296-954c-448e-95c1-b46d134513dc
CC=@CC@
CFLAGS=@CFLAGS@
+ALLOCA=@ALLOCA@
version=@version@
configuration=@configuration@
EXEEXT=@EXEEXT@
#define NOT_C_CODE
#include "../src/config.h"
+/* We won't really call alloca;
+ don't let the file name alloca.c get messed up. */
+#ifdef alloca
+#undef alloca
+#endif
+
/* Some machines don\'t find the standard C libraries in the usual place. */
#ifndef ORDINARY_LINK
#ifndef LIB_STANDARD_LIBSRC
$(CC) ${ALL_CFLAGS} -o test-distrib ${srcdir}/test-distrib.c
./test-distrib ${srcdir}/testfile
-GETOPTOBJS = getopt.o getopt1.o
+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}/alloca.c
+ ${CC} -Demacs -c ${BASE_CFLAGS} ${srcdir}/alloca.c
#ifdef REGEXP_IN_LIBC
REGEXPOBJ =
digest-doc${EXEEXT}: ${srcdir}/digest-doc.c
$(CC) ${ALL_CFLAGS} ${srcdir}/digest-doc.c $(LOADLIBES) -o digest-doc
-sorted-doc${EXEEXT}: ${srcdir}/sorted-doc.c
- $(CC) ${ALL_CFLAGS} ${srcdir}/sorted-doc.c $(LOADLIBES) -o sorted-doc
+sorted-doc${EXEEXT}: ${srcdir}/sorted-doc.c ${ALLOCA}
+ $(CC) ${ALL_CFLAGS} ${srcdir}/sorted-doc.c ${ALLOCA} $(LOADLIBES) -o sorted-doc
b2m${EXEEXT}: ${srcdir}/b2m.c ../src/config.h $(GETOPTDEPS)
$(CC) ${ALL_CFLAGS} ${srcdir}/b2m.c -DVERSION="\"${version}\"" \
$(CC) -o xveterm -DXVIEW -DTTERM ${ALL_CFLAGS} ${srcdir}/emacstool.c \
-lxview -lolgx -lX -I$(OPENWINHOME)/include -L$(OPENWINHOME)/lib \
$(LOADLIBES)
-
-/* arch-tag: cc40144d-fbd2-436b-9a22-dcb5b5b6a2af
- (do not change this comment) */
exit (BAD);
}
-/* arch-tag: 5a3ad2af-a802-408f-83cc-e7cf5e98653e
- (do not change this comment) */
use Date::Parse;
my($whoami) = basename $0;
-my($version) = '$Revision: 1.5 $';
+my($version) = '$Revision: 1.4 $';
my($usage) = "Usage: $whoami [--help] [--version] [--[no]full-headers] [Babyl-file]
\tBy default, full headers are printed.\n";
}
close(STDOUT) || die "$whoami: Error closing stdout: $!\n";
-
-# arch-tag: 8c7c8ab0-721c-46d7-ba3e-139801240aa8
fatal ("virtual memory exhausted", 0);
return result;
}
-
-/* arch-tag: b93c25a9-9012-44f1-b78b-9cc7aed44a7a
- (do not change this comment) */
}
return 0;
}
-
-/* arch-tag: 2ba2c9b0-4157-4eba-bd9f-967e3677e35f
- (do not change this comment) */
/* ebrowse.c ends here. */
-
-/* arch-tag: fc03b4bc-91a9-4c3d-b3b9-12a77fa86dd8
- (do not change this comment) */
}
#endif /* ! HAVE_STRERROR */
-
-/* arch-tag: f39bb9c4-73eb-477e-896d-50832e2ca9a7
- (do not change this comment) */
(tty_view, input_event_filter_function, NOTIFY_SAFE);
}
#endif XVIEW
-
-/* arch-tag: 7a2e7105-c059-418a-b3d9-5b5de96abb4e
- (do not change this comment) */
fvdef = vignore;
return FALSE;
}
- if (len >= 10 && strneq (str+len-10, "::operator", 10))
+ if (strneq (str+len-10, "::operator", 10))
{
if (*c_extp & C_AUTO) /* automatic detection of C++ */
*c_extp = (*c_extp | C_PLPL) & ~C_AUTO;
* c-font-lock-extra-types: ("FILE" "bool" "language" "linebuffer" "fdesc" "node" "regexp")
* End:
*/
-
-/* arch-tag: 8a9b748d-390c-4922-99db-2eeefa921051
- (do not change this comment) */
#endif /* not MSDOS */
#endif /* not BSD 4.2 (or newer) */
-
-/* arch-tag: acb0afa6-315a-4c5b-b9e3-def5725c8783
- (do not change this comment) */
}
#endif /* TEST */
-
-/* arch-tag: 0e6da124-7269-4785-a9de-094c263d20dc
- (do not change this comment) */
#undef __need_getopt
#endif /* getopt.h */
-
-/* arch-tag: 9adb7828-e6a6-40cd-8512-0cdf1f20ddd4
- (do not change this comment) */
#endif /* TEST */
-/* arch-tag: 28a5c558-b0c0-4bff-b5bc-e2e20291d4b6
- (do not change this comment) */
}
-# arch-tag: 9e4f6749-e053-4bb7-b3ad-11947318418e
# grep-changelog ends here.
fprintf (stderr, "usage: %s [-de] [-iso]\n", progname);
exit (1);
}
-
-/* arch-tag: 20e04fb7-926e-4e48-be86-64fe869ecdaa
- (do not change this comment) */
else
printf("string too long for set-proc-str: %s\n", ptr);
}
-
-/* arch-tag: eb7ae804-0d6e-4077-ab42-7173821410c3
- (do not change this comment) */
fclose (infile);
return 0;
}
-
-/* arch-tag: f7203aaf-991a-4238-acb5-601db56f2894
- (do not change this comment) */
$(BLD)\yow.obj : \
$(SRC)\yow.c \
$(EMACS_ROOT)\lib-src\..\src\paths.h
-
-# arch-tag: 59e1b54b-4cc2-4086-bb0b-ecfad4b683e9
$(BLD)/yow.$(O) : \
$(SRC)/yow.c \
$(EMACS_ROOT)/lib-src/../src/paths.h
-
-# arch-tag: c051bc02-a6de-474b-889a-27f7b2fbbcea
}
#endif /* ! HAVE_STRERROR */
-
-/* arch-tag: 1c323112-41fe-4fe5-8de9-494de631f73f
- (do not change this comment) */
{
return _chdir (path);
}
-
-/* arch-tag: 7b63fb83-70ee-4124-8822-54e53e5d0773
- (do not change this comment) */
#undef _WINSOCK_H
/* end of ntlib.h */
-
-/* arch-tag: 93444f66-7b98-4aa5-a5cd-01444094af28
- (do not change this comment) */
}
#endif /* MAIL_USE_POP */
-
-/* arch-tag: ceb37041-b7ad-49a8-a63d-286618b8367d
- (do not change this comment) */
extern void pop_close _ARGS((popserver));
#undef _ARGS
-
-/* arch-tag: 76cc5f58-8e86-48fa-bc72-a7c6cb1c4f1c
- (do not change this comment) */
}
exit (1);
}
-
-/* arch-tag: 8db68f7e-2322-4944-a315-dba349bdbf39
- (do not change this comment) */
ci -d -q -u $owner -m"entered into RCS" "$file" || exit
done
-# arch-tag: 89c86949-ef04-4380-838b-bc1444dcb074
Report bugs to <bug-gnu-emacs@gnu.org>.'
-Id='$Id: rcs2log,v 1.50 2002/02/03 17:31:31 eggert Exp $'
+Id='$Id: rcs2log,v 1.49 2001/11/28 23:55:08 eggert Exp eggert $'
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2001, 2002
# Free Software Foundation, Inc.
# Local Variables:
# tab-width:4
# End:
-
-# arch-tag: cea067bd-a552-4254-ba17-078208933073
return 0;
}
-
-/* arch-tag: ce28f204-1e70-4b34-8210-3d54a5662071
- (do not change this comment) */
#endif
return (0);
}
-
-/* arch-tag: 3a89005d-df98-4c32-aa9f-33570e16a26a
- (do not change this comment) */
errno = saved_errno;
return ret;
}
-
-/* arch-tag: 2bf5c52e-4beb-463a-954e-c58b9c64736b
- (do not change this comment) */
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
-# $Id: vcdiff,v 1.7 2001/02/20 12:36:28 gerd Exp $
+# $Id: vcdiff,v 1.6 1997/01/01 05:33:42 eggert Exp $
#
DIFF="diff"
then status=$s
fi
done
-
-# arch-tag: 4344ba3a-bcbe-4f77-971c-f43c1606953a
printf("%s\n", buf);
}
-/* arch-tag: e40fc0df-bafb-4001-af24-5c883d1c685e
- (do not change this comment) */
-2003-09-02 Jason Rumney <jasonr@gnu.org>
-
- * international/titdic-cnv.el (tsang-quick-converter): Fix broken
- line-ends from CVS before doing conversion.
-
-2003-09-02 Glenn Morris <gmorris@ast.cam.ac.uk>
-
- * calendar/diary-lib.el (diary-header-line-flag)
- (diary-header-line-format): New variables.
- (list-diary-entries): Use them to set header line in simple diary.
-
- * progmodes/sh-script.el (sh-font-lock-keywords): Use something
- other than font-lock-string-face to highlight backslashes.
-
-2003-09-01 Jason Rumney <jasonr@gnu.org>
-
- * international/titdic-cnv.el (tit-read-key-value): Include \r in
- regexp.
-
-2003-09-01 Dave Love <fx@gnu.org>
-
- * mouse.el (mouse-popup-menubar, mouse-skip-word): Doc fix.
-
- * menu-bar.el (menu-bar-showhide-menu): Amend date and time label
- and :help; also line and column numbers labels.
-
- * international/mule-util.el (char-displayable-p): Moved from
- latin1-disp, renamed and autoloaded.
-
- * international/latin1-disp.el (latin1-char-displayable-p): Now
- obsolete alias. Replace uses with char-displayable-p.
- (latin1-display-ucs-per-lynx): Fix last change.
-
- * international/mule-cmds.el (standard-display-european-internal):
- Don't use char code for Latin-1 NBSP.
- <XFree86 4>: Unfrob NBSP display table. Set display table to use
- U+2018, U+2019 for `'.
- (select-safe-coding-system): Message fix.
-
-2003-09-01 Kenichi Handa <handa@m17n.org>
-
- * international/fontset.el (setup-default-fontset): For Thai
- font, specify "*" family.
-
-2003-09-01 Kevin Rodgers <ihs_4664@yahoo.com> (tiny change)
-
- * progmodes/compile.el (previous-error): Accept a prefix
- argument, similarly to next-error.
-
-2003-08-31 Masatake YAMATO <jet@gyve.org>
-
- * pcvs.el (cvs-do-removal): Use = instead of eq to check
- the numbre of files. Bind the numbre of files to a a local
- variable. Suggestd by Kevin Rodgers <ihs_4664@yahoo.com>.
-
-2003-08-30 Eli Zaretskii <eliz@elta.co.il>
-
- * vc-hooks.el (vc-make-version-backup): Fix the change made on
- 2003-07-26: msdos-long-file-names is a function, not a variable.
-
-2003-08-29 Richard M. Stallman <rms@gnu.org>
-
- * mail/sendmail.el (sendmail-sync-aliases, mail-setup):
- Do nothing with mail-personal-alias-file if it is nil.
-
- * mail/mailabbrev.el (mail-abbrevs-sync-aliases):
- Do nothing if mail-personal-alias-file is nil.
-
- * term.el (term-exec-1): Bind coding-system-for-read.
-
- * dired.el (dired-mouse-find-file-other-window):
- Use dired-view-command-alist here, as in dired-view-file.
- (dired-view-command-alist): Use %s to substitute file name.
- Handle .ps_pages, .eps, .jpg, .gif, .png.
-
-2003-08-29 Paul Pogonyshev <pogonyshev@gmx.net>
-
- * info.el (Info-mode-map): Bind S-tab and <backtab> to
- `Info-prev-reference', instead of M-tab.
-
-2003-08-29 Martin Stjernholm <mast@lysator.liu.se>
-
- * simple.el (blink-matching-open): Work correctly on chars that
- are designated as parens through the syntax-table text property.
-
-2003-08-29 Thierry Emery <thierry.emery@club-internet.fr> (tiny change)
-
- * kinsoku.el (kinsoku-longer, kinsoku-shorter): Do not choose a
- line break position in the middle of a non-kinsoku (e.g. latin)
- word, making it skip until either a space or a character with
- category "|".
- (kinsoku-longer): Test for end of buffer.
-
-2003-08-28 Eli Zaretskii <eliz@elta.co.il>
-
- * mail/rmail.el (rmail-convert-to-babyl-format): Detect
- quoted-printable- and base64-encoded messages and decode them
- automatically. Set the message's encoding from the charset=
- header, if any. Decode base64-encoded messages in Mail format as
- well.
-
-2003-08-26 Glenn Morris <gmorris@ast.cam.ac.uk>
-
- * mail/smtpmail.el Fix previous change:
- (smtpmail-send-queued-mail): Set smtpmail-mail-address before
- calling smtpmail-via-smtp.
- (smtpmail-via-smtp): Add fall-back values for envelope-from.
-
-2003-08-26 John Paul Wallington <jpw@gnu.org>
-
- * image.el (image-jpeg-p): Don't search beyond length of data.
-
-2003-08-26 Martin Stjernholm <bug-cc-mode@gnu.org>
-
- * progmodes/cc-cmds.el (c-electric-brace): Work around for a
- misfeature in `expand-abbrev' which caused electric keywords like
- "else" to disappear if an open brace was typed directly
- afterwards.
-
-2003-08-26 Martin Stjernholm <bug-cc-mode@gnu.org>
-
- * progmodes/cc-vars.el (c-extra-types-widget): The doc string is
- mandatory in `define-widget'.
-
- * progmodes/cc-align.el, progmodes/cc-langs.el (c-lineup-math):
- Don't align the operators "!=", "<=" and ">=" as assignment
- operators.
-
- (c-assignment-operators): New language constant that only contains
- the assignment operators.
-
- (c-assignment-op-regexp): New language variable used by
- `c-lineup-math'.
-
-2003-08-26 Martin Stjernholm <bug-cc-mode@gnu.org>
-
- * progmodes/cc-engine.el (c-just-after-func-arglist-p): Safeguard
- against unbalanced sexps.
-
-2003-08-26 Terje Rosten <terjeros@phys.ntnu.no>
-
- * version.el (emacs-version): Check for gtk. Include gtk version
- info.
-
-2003-08-25 John Paul Wallington <jpw@gnu.org>
-
- * man.el (Man-default-man-entry): Don't whizz past the section
- number before looking for it.
-
-2003-08-24 Nick Roberts <nick@nick.uklinux.net>
-
- * progmodes/gud.el (gud-display-line): Don't set window-point if
- source buffer is not visible. (Only happens with M-x gdba).
-
- * gdb-ui.el (gdba): Remove gdb-quit (previously removed) from
- documentation.
- (gdb-source, gdb-source-info): Update to assembler unnecessary
- as its done after each GDB command anyway.
- (gdb-pre-prompt): Use with-current-buffer.
- (gdb-insert-field): Add help-echo text.
- (gdb-invalidate-assembler): Re-display of assembler now done in
- gdb-info-breakpoints-custom.
- (gdb-info-breakpoints-custom): Force re-display of assembler to
- happen *after* update of breakpoints buffer.
- (gdb-display-source-buffer): Don't choke if gdb-source-window
- isn't visible.
- (gdb-put-string, gdb-put-arrow): Remove free variables.
-
-2003-08-24 John Paul Wallington <jpw@gnu.org>
-
- * ibuffer.el (ibuffer-formats): Make name and size columns wider.
-
- * man.el (Man-default-man-entry): Strip text properties when
- snarfing parts of entry because `format' preserves properties.
-
-2003-08-24 Glenn Morris <gmorris@ast.cam.ac.uk>
-
- * files.el (file-newest-backup): Use `expand-file-name'.
-
- * calendar/diary-lib.el (simple-diary-display, make-diary-entry):
- Allow the diary to pop up a new frame, if needed.
-
- * mail/sendmail.el (mail-specify-envelope-from): Doc change.
- * mail/smtpmail.el (smtpmail-mail-address): Doc change.
- (smtpmail-send-it): Make treatment of envelope-from consistent with
- sendmail.el.
-
- * progmodes/sh-script.el (sh-builtins): Add some bash builtins.
- (sh-leading-keywords): Add the bash `time' reserved word.
- (sh-variables): Add some bash variables.
- (sh-add-completer): Fix nil branch of case statement.
-
-2003-08-24 Masatake YAMATO <jet@gyve.org>
-
- * progmodes/ld-script.el: New file.
-
-2003-08-23 Markus Rost <rost@math.ohio-state.edu>
-
- * vc-hooks.el (vc-ignore-vc-files, vc-master-templates): Doc fix.
-
-2003-08-23 Andre Spiegel <spiegel@gnu.org>
-
- * vc-hooks.el (vc-ignore-vc-files, vc-master-templates): Better
- explain obsolescence, and what to use instead.
-
-2003-08-23 Masatake YAMATO <jet@gyve.org>
-
- * pcvs.el (cvs-do-removal): Show the deleted file name
- on the prompt.
-
-2003-08-20 Dave Love <fx@gnu.org>
-
- * international/mule.el (make-coding-system)
- (set-buffer-file-coding-system): Doc fix.
-
- * emacs-lisp/lisp-mode.el (common-lisp-mode): New.
-
- * emacs-lisp/lisp.el (beginning-of-defun-function): Doc fix.
-
- * international/utf-8.el (ucs-unicode-to-mule-cjk): Use smaller
- :size.
-
- * international/utf-16.el: Add mime-text-unsuitable coding system
- properties.
-
- * international/latin1-disp.el (latin1-display): Add ?\e$,1s"\e(B.
-
- * cus-edit.el: Add some :links.
- (bib): Remove.
-
- * textmodes/bib-mode.el (bib): Add :group external.
-
-2003-08-18 Luc Teirlinck <teirllm@mail.auburn.edu>
-
- * wid-edit.el (widget-echo-help): Make it handle expressions that
- evaluate to strings.
-
-2003-08-18 Michael Mauger <mmaug@yahoo.com>
-
- Version 1.8.0 of sql-mode. (Patch submitted 2003-06-21)
-
- Simplify selection of SQL products to define highlighting and
- interactive mode. Includes detailed instructions on adding
- support for new products.
-
- * progmodes/sql.el (sql-product): New variable. Identifies SQL
- product for use in highlighting and interactive mode.
- (sql-interactive-product): New variable. SQL product for
- sql-interactive-mode.
- (sql-product-support): New variable. Specifies product-specific
- parameters to drive highlighting and interactive mode.
- (sql-imenu-generic-expression): Add more object types.
- (sql-sqlite-options): Correct comment.
- (sql-ms-program): Use "osql" rather than "isql".
- (sql-prompt-regexp, sql-prompt-length): Update comment.
- (sql-mode-menu): Add "Start SQLi session" entry. Replace
- Highlighting submenu with Product menu. Fix Send Region entry.
- (sql-mode-abbrev-table): Add abbreviations. Support of
- SYSTEM-FLAG on define-abbrev. Support was removed with last
- check-in; it now handles older Emacsen without the SYSTEM-FLAG.
- (sql-mode-font-lock-object-name): Add font-lock pattern for object
- names.
- (sql-mode-ansi-font-lock-keywords): Set as default value.
- (sql-mode-oracle-font-lock-keywords): Set as default value.
- Support Oracle 9i keywords.
- (sql-mode-postgres-font-lock-keywords): Set as default value.
- (sql-mode-linter-font-lock-keywords): Set as default value.
- (sql-mode-ms-font-lock-keywords): New variable. Support Microsoft
- SQLServer 2000.
- (sql-mode-sybase-font-lock-keywords)
- (sql-mode-interbase-font-lock-keywords)
- (sql-mode-sqlite-font-lock-keywords)
- (sql-mode-strong-font-lock-keywords)
- (sql-mode-mysql-font-lock-keywords)
- (sql-mode-db2-font-lock-keywords): New variables. Default to ANSI
- keywords.
- (sql-mode-font-lock-defaults): Update comment.
- (sql-product-feature): New function. Returns feature associated
- with a product from `sql-product-support' alist.
- (sql-product-font-lock): New function. Set font-lock support
- based on `sql-product'.
- (sql-add-product-keywords): New function. Add font-lock rules to
- product-specific keyword variables.
- (sql-set-product): New function. Set `sql-product' and apply
- appropriate font-lock highlighting.
- (sql-highlight-product): New function. Set font-lock support
- based on a product. Also set mode name to include product name.
- (sql-highlight-ansi-keywords, sql-highlight-oracle-keywords)
- (sql-highlight-postgres-keywords, sql-highlight-linter-keywords):
- Use `sql-set-product'.
- (sql-highlight-ms-keywords)
- (sql-highlight-sybase-keywords)
- (sql-highlight-interbase-keywords)
- (sql-highlight-strong-keywords)
- (sql-highlight-mysql-keywords)
- (sql-highlight-sqlite-keywords)
- (sql-highlight-db2-keywords): New functions. Use
- `sql-set-product'.
- (sql-get-login): Prompt in the same order as the tokens.
- (sql-mode): Uses `sql-product-highlight' and
- `sql-product-font-lock'.
- (sql-product-interactive): New function. Common portions of
- product-specific interactive mode wrappers.
- (sql-interactive-mode): Rewritten to use product features.
- (sql-oracle, sql-sybase, sql-informix, sql-sqlite, sql-mysql)
- (sql-solid, sql-ingres, sql-ms, sql-postgres, sql-interbase)
- (sql-db2, sql-linter): Use `sql-product-interactive'.
- (sql-connect-oracle, sql-connect-sybase, sql-connect-informix)
- (sql-connect-sqlite, sql-connect-mysql, sql-connect-solid)
- (sql-connect-ingres, sql-connect-postgres)
- (sql-connect-interbase, sql-connect-db2, sql-connect-linter): New
- functions. Format command line parameters and invoke comint on
- the appropriate interpreter. Code was in the corresponding
- `sql-xyz' function before.
- (sql-connect-ms): New function. Support -E argument to use
- operating system credentials for authentication.
-
-2003-08-18 Kenichi Handa <handa@m17n.org>
-
- * international/mule.el (encode-char): Fix for the ASCII case.
-
-2003-08-15 Kenichi Handa <handa@m17n.org>
-
- * international/fontset.el (setup-default-fontset): Change "*" to
- nil in the specifications of font family.
-
-2003-08-18 Kim F. Storm <storm@cua.dk>
-
- * kmacro.el (kmacro-keymap): Group related bindings in
- initialization for clarity. Bind C-s to start macro.
- Remove C-r binding.
- (kmacro-initial-counter-value): New defvar to hold initial counter
- value in case we set the value before defining a macro.
- (kmacro-insert-counter): Clear kmacro-initial-counter-value..
- (kmacro-set-counter): Set kmacro-initial-counter-value if we are
- not defining or executing macro. Doc fix.
- (kmacro-add-counter): Clear kmacro-initial-counter-value.
- (kmacro-view-last-item, kmacro-view-item-no): New defvars used to
- temporarily view older elements on the macro ring without cycling
- the ring.
- (kmacro-display): Doc fix.
- (kmacro-exec-ring-item): New helper function.
- (kmacro-call-ring-2nd): Use it.
- (kmacro-call-ring-2nd-repeat): Doc fix.
- (kmacro-start-macro): Use (and clear) kmacro-initial-counter-value.
- (kmacro-end-or-call-macro): Execute last viewed macro (using
- kmacro-exec-ring-item) from ring if this follows
- kmacro-view-macro. This allows us to find a macro on the ring
- with C-x C-k C-v C-v ... and execute it (with C-k) without cycling
- the ring to bring it to the head of the ring.
- (kmacro-bind-to-key): Doc fix (describe reserved bindings).
- Allow binding to reserved keys without specifying C-x C-k prefix.
- Ask for confirmation if entered key sequence is already bound to
- a non-macro command.
- (kmacro-view-macro): Repeating command will show older elements
- on the macro ring; C-k will execute the last viewed macro.
- (kmacro-view-macro-repeat): Doc fix. Change its kmacro-repeat
- property from 'ring to 'head.
-
-2003-08-17 Alan Shutko <ats@acm.org>
-
- * calendar/calendar.el (calendar-make-alist): Correct off-by-one
- keeping December out of the alist.
-
-2003-08-17 Edward M. Reingold <reingold@emr.cs.iit.edu>
-
- * calendar/cal-move.el (calendar-goto-day-of-year): New function.
- * calendar/calendar.el (calendar-mode-map): Bind it to key.
- * calendar/cal-menu.el (calendar-mode-map): Add it to menu.
- (calendar-flatten): New function.
- (calendar-mouse-view-other-diary-entries)
- (calendar-mouse-view-diary-entries): Rewritten to put any holidays
- in the menu title and to show multi-line diary entries correctly
- in the menu.
-
-2003-08-17 Luc Teirlinck <teirllm@mail.auburn.edu>
-
- * info.el (Info-scroll-prefer-subnodes): Add :version keyword to
- defcustom, because the default was recently changed.
-
-2003-08-16 Richard M. Stallman <rms@gnu.org>
-
- * net/ange-ftp.el (ange-ftp-error): Add save-excursion.
-
- * emacs-lisp/lisp-mode.el (eval-last-sexp-print-value):
- New subroutine, broken out of eval-last-sexp-1.
- (eval-last-sexp-1): Use eval-last-sexp-print-value.
-
- * custom.el (custom-load-symbol): Load cus-load and cus-start first.
-
- * dabbrev.el (dabbrev--safe-replace-match): Use with-no-warnings.
-
- * simple.el (eval-expression): Use eval-last-sexp-print-value.
-
-2003-08-14 Jari Aalto <jari.aalto@poboxes.com>
-
- * progmodes/compile.el (compilation-error-regexp-alist):
- Added Java ANt error detection as described in document
- http://ant.apache.org/faq.html
-
-2003-08-12 Juri Linkov <juri@jurta.org> (tiny change)
-
- * simple.el (backward-word, forward-to-indentation)
- (backward-to-indentation): Argument changed to optional.
- (next-line, previous-line): Use `or' instead of `unless'.
-
-2003-08-12 Vinicius Jose Latorre <viniciusjl@ig.com.br>
-
- * progmodes/ebnf-iso.el (ebnf-no-meta-identifier): Becomes a var
- instead of a constant.
-
-2003-08-12 Markus Rost <rost@math.ohio-state.edu>
-
- * shell.el (shell): With prefix-arg, suggest a new buffer name.
-
-2003-08-12 Andre Spiegel <spiegel@gnu.org>
-
- * vc-sccs.el (vc-sccs-state-heuristic): Fix parentheses.
- (vc-sccs-workfile-version): Search the entire delta table, rather
- than just the first entry, because that might be a deleted version.
-
-2003-08-11 Karl Fogel <kfogel@red-bean.com>
-
- * menu-bar.el (menu-bar-options-menu): Supply a body for the
- [save-place] binding in the Options menu. Have it require
- 'saveplace' and then toggle the variable manually, to avoid an an
- unbound variable error. Thanks to <Sebastien.Kirche@sage.com>
- for the bug report.
-
-2003-08-11 Nick Roberts <nick@nick.uklinux.net>
-
- * gdb-ui.el (gdb-insert-field, gdb-array-format1)
- (gdb-info-breakpoints-custom, gdb-info-frames-custom)
- (gdb-info-threads-custom): Add help-echo text.
- (gdb-display-back): Don't use purecopy.
- (gdb-info-breakpoints-custom, gdb-reset)
- (gdb-assembler-custom): Use display-images-p to test if breakpoint
- icons can be displayed.
-
-2003-08-11 Markus Rost <rost@math.ohio-state.edu>
-
- * textmodes/reftex-vars.el (reftex-auto-recenter-toc): Fix typo.
-
-2003-08-11 Stefan Monnier <monnier@cs.yale.edu>
-
- * bookmark.el (bookmark-completing-read):
- Return a string, instead of a list of one string.
- Use a popup menu if activated from the mouse.
- (bookmark-edit-annotation): Remove unused vars.
- (bookmark-jump, bookmark-relocate, bookmark-insert-location)
- (bookmark-rename, bookmark-insert, bookmark-delete): Adjust calls
- to bookmark-completing-read.
- (bookmark-bmenu-show-filenames, bookmark-bmenu-hide-filenames)
- (bookmark-bmenu-mark, bookmark-bmenu-select, bookmark-bmenu-unmark)
- (bookmark-bmenu-delete, bookmark-bmenu-list): Use inhibit-read-only
- and erase-buffer.
- (bookmark-menu-delete, bookmark-menu-rename, bookmark-menu-locate)
- (bookmark-menu-jump, bookmark-menu-insert)
- (bookmark-popup-menu-and-apply-function)
- (bookmark-menu-popup-paned-bookmark-menu): Remove.
- (bookmark-menu-build-paned-menu): Remove by folding it into
- bookmark-menu-popup-paned-menu.
- (menu-bar-bookmark-map): Move the define-key statements here.
- Use the "non-menu" commands since they now pop up a menu if needed.
- (bookmark-exit-hook-internal): Simplify.
-
-2003-08-11 Carsten Dominik <dominik@sand.science.uva.nl>
-
- * textmodes/reftex.el: Updated to version 4.21
- * reftex-auc.el: likewise.
- * reftex-cite.el: likewise.
- * reftex-dcr.el: likewise.
- * reftex-global.el: likewise.
- * reftex-index.el: likewise.
- * reftex-parse.el: likewise.
- * reftex-ref.el: likewise.
- * reftex-sel.el: likewise.
- * reftex-toc.el: likewise.
- * reftex-vars.el: likewise.
-
-2003-08-08 Vinicius Jose Latorre <viniciusjl@ig.com.br>
-
- * progmodes/ebnf2ps.el (ebnf-total, ebnf-nprod): Move defvar before
- first use.
-
-2003-08-07 Vinicius Jose Latorre <viniciusjl@ig.com.br>
-
- * progmodes/ebnf2ps.el (ebnf-begin-job): Code fix.
-
-2003-08-06 Glenn Morris <gmorris@ast.cam.ac.uk>
-
- * calendar/calendar.el (list-diary-entries-hook)
- (diary-display-hook, nongregorian-diary-listing-hook)
- (mark-diary-entries-hook, nongregorian-diary-marking-hook):
- Add some customize options for these hooks.
- (calendar-abbrev-construct): Don't try to take a substring longer
- than the original string.
-
-2003-08-05 Richard M. Stallman <rms@gnu.org>
-
- * emacs-lisp/testcover.el (noreturn): Report error if does return.
- (testcover-reinstrument-clauses): Doc fix.
-
- * emacs-lisp/warnings.el: Doc fixes, args renamed.
- (warning-type-format): Rename from warning-group-format.
-
- * emacs-lisp/bytecomp.el (byte-compile-not-obsolete-var): New var.
- (byte-compile-variable-ref): Handle byte-compile-not-obsolete-var.
- (byte-compile-defvar): Bind byte-compile-not-obsolete-var
- to prevent warnings about defvar for an obsolete variable.
-
- * emacs-lisp/bytecomp.el (byte-compile-log-warning):
- warning-group-format renamed to warning-type-format.
-
- * subr.el (read-passwd): Use clear-string instead of fillarray.
-
- * edmacro.el (edmacro-format-keys): Use edmacro-sanitize-for-string.
- Use vconcat instead of concat.
- (edmacro-sanitize-for-string): New function.
-
-2003-08-05 Dave Love <fx@gnu.org>
-
- * cus-start.el: Add open-paren-in-column-0-is-defun-start,
- line-number-display-limit-width.
-
- * textmodes/tex-mode.el (tex-dvi-view-command): Fix quoted quotes.
-
2003-08-05 Kenichi Handa <handa@m17n.org>
* international/code-pages.el: Don't require mule-diag.
- * international/mule-diag.el (non-iso-charset-alist):
- Add autoload cookie.
+ * international/mule-diag.el (non-iso-charset-alist): Add
+ autoload cookie.
* language/devan-util.el (dev-glyph-order): Add an entry for the
glyph code #xC4.
`calendar-day-name' and `calendar-month-name' functions.
* calendar/diary-lib.el (list-diary-entries): Adapt for new
- behaviour of `calendar-day-name' and `calendar-month-name' functions.
+ behaviour of `calendar-day-name' and `calendar-month-name'
+ functions.
(diary-name-pattern): Use abbrev arrays, rather than fixing
abbrevs at three chars. Calling syntax change.
(mark-diary-entries): Adapt for new behaviours of
(mark-hebrew-diary-entries): Adapt for new behaviours of
`diary-name-pattern' and `calendar-make-alist' functions.
- * calendar/cal-islam.el (calendar-islamic-month-name-array):
- Add doc string.
+ * calendar/cal-islam.el (calendar-islamic-month-name-array): Add
+ doc string.
(list-islamic-diary-entries): Adapt for new behaviours of
`calendar-day-name' and `add-to-diary-list' functions.
(mark-islamic-diary-entries): Adapt for new behaviours of
(c-search-decl-header-end): Don't trip up on operator identifiers
in C++ and operators like == in all languages.
- * progmodes/cc-engine.el (c-backward-to-decl-anchor):
- Detect leading labels correctly.
+ * progmodes/cc-engine.el (c-backward-to-decl-anchor): Detect
+ leading labels correctly.
2003-08-02 Andreas Schwab <schwab@suse.de>
2003-07-30 Kenichi Handa <handa@m17n.org>
- * international/fontset.el (setup-default-fontset):
- Change registry names of Akurti fonts.
+ * international/fontset.el (setup-default-fontset): Change
+ registry names of Akurti fonts.
2003-07-29 Jesper Harder <harder@ifa.au.dk> (tiny change)
2003-07-28 Nick Roberts <nick@nick.uklinux.net>
- * gdb-ui.el (gdb-setup-windows, gdb-restore-windows):
- Restore assembler in source window if that is what has been selected.
+ * gdb-ui.el (gdb-setup-windows, gdb-restore-windows): Restore
+ assembler in source window if that is what has been selected.
(menu): Add gdb-restore-windows to menu. Make gdba
specific menus only visible from gdba.
2003-07-26 Markus Rost <rost@math.ohio-state.edu>
- * international/quail.el (quail-translate-key): Fix previous change.
+ * international/quail.el (quail-translate-key): Fix previous
+ change.
2003-07-25 John Paul Wallington <jpw@gnu.org>
Copyright (C) 2001, 2002 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted provided the copyright notice and this notice are preserved.
-
-;;; arch-tag: 5fcf8004-6f58-452a-b9d6-6950323a19c1
Copyright (C) 1985, 1986 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted provided the copyright notice and this notice are preserved.
-
-;;; arch-tag: b6060738-7fac-4c9c-80ae-67995bae78a7
Copyright (C) 1986, 1987, 1988 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted provided the copyright notice and this notice are preserved.
-
-;;; arch-tag: c315ba16-14ba-4b07-86e6-013a18f11be7
Copyright (C) 1989, 1993 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted provided the copyright notice and this notice are preserved.
-
-;;; arch-tag: f07a3446-5672-464a-8fdc-2ca92e8e7b2a
Copyright (C) 1993, 1994 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted provided the copyright notice and this notice are preserved.
-
-;;; arch-tag: 91035822-35c7-44a9-8417-2454b88c3db2
Copyright (C) 1994, 1995 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted provided the copyright notice and this notice are preserved.
-
-;;; arch-tag: 1a8fbb45-25d0-48e2-a926-29ca4e3d343a
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted provided the copyright notice and this notice are preserved.
-
-;;; arch-tag: f90e8ffe-6bd0-4423-97d9-637ac4382520
Copyright (C) 1997, 1998 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted provided the copyright notice and this notice are preserved.
-
-;;; arch-tag: 0995d517-13da-45ab-9c2d-7911aa25512b
Copyright (C) 1999 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted provided the copyright notice and this notice are preserved.
-
-;;; arch-tag: efdc1531-ed46-4e14-be59-bee4b23088f3
Copyright (C) 2000, 2001 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted provided the copyright notice and this notice are preserved.
-
-;;; arch-tag: a7cd2b86-43eb-409b-883f-3700fa85334f
# Maintenance productions for the Lisp directory
-# Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
setwins=subdirs=`find $$wd -type d -print`; \
for file in $$subdirs; do \
- case $$file in */Old | */RCS | */CVS | */CVS/* | */.arch-ids | */.arch-ids/* | */=* ) ;; \
+ case $$file in */Old | */RCS | */CVS | */CVS/* | */=* ) ;; \
*) wins="$$wins $$file" ;; \
esac; \
done
distclean:
-rm -f ./Makefile
-# arch-tag: d4ea703a-b91c-405c-a171-8dde30b163a7
# Makefile ends here.
(if (or noquery (y-or-n-p (format "Expand `%s'? " string)))
(expand-abbrev)))))))
-;;; arch-tag: dbd6f3ae-dfe3-40ba-b00f-f9e3ff960df5
;;; abbrev.el ends here
(provide 'abbrevlist)
-;;; arch-tag: 178f0638-6597-4c16-bcee-576c3d8e9217
;;; abbrevlist.el ends here
(provide 'add-log)
-;;; arch-tag: 81eee6fc-088f-4372-a37f-80ad9620e762
;;; add-log.el ends here
(run-hooks 'align-load-hook)
-;;; arch-tag: ef79cccf-1db8-4888-a8a1-d7ce2d1532f7
;;; align.el ends here
;; Author: Ken Manheimer <klm@zope.com>
;; Maintainer: Ken Manheimer <klm@zope.com>
;; Created: Dec 1991 - first release to usenet
-;; Version: $Id: allout.el,v 1.43 2003/05/06 17:38:32 lektu Exp $||
+;; Version: $Id: allout.el,v 1.42 2003/02/24 17:29:49 lektu Exp $||
;; Keywords: outlines mode wp languages
;; This file is part of GNU Emacs.
;;;_ : Version
;;;_ = allout-version
(defvar allout-version
- (let ((rcs-rev "$Revision: 1.43 $"))
+ (let ((rcs-rev "$Revision: 1.42 $"))
(condition-case err
(save-match-data
(string-match "Revision: \\([0-9]+\\.[0-9]+\\)" rcs-rev)
;;;allout-layout: (0 : -1 -1 0)
;;;End:
-;;; arch-tag: cf38fbc3-c044-450f-8bff-afed8ba5681c
;;; allout.el ends here
(provide 'ansi-color)
-;;; arch-tag: 00726118-9432-44fd-b72d-d2af7591c99c
;;; ansi-color.el ends here
(provide 'apropos)
-;;; arch-tag: d56fa2ac-e56b-4ce3-84ff-852f9c0dc66e
;;; apropos.el ends here
(provide 'arc-mode)
-;;; arch-tag: e5966a01-35ec-4f27-8095-a043a79b457b
;;; arc-mode.el ends here
(provide 'array)
-;;; arch-tag: 0086605d-79fe-4a1a-992a-456417261f80
;;; array.el ends here
(provide 'autoarg)
-;;; arch-tag: 2ba2ab4f-d60e-402a-ae4d-37e29af723c2
;;; autoarg.el ends here
(provide 'autoinsert)
-;;; arch-tag: 5b6630ac-c735-43cf-b097-b78c622af909
;;; autoinsert.el ends here
(run-hooks 'auto-revert-load-hook)
-;;; arch-tag: f6bcb07b-4841-477e-9e44-b18678e58876
;;; autorevert.el ends here
(if mouse-avoidance-mode
(mouse-avoidance-mode mouse-avoidance-mode))
-;;; arch-tag: 64ad4ef8-a870-4183-8d96-3aa93b7a6800
;;; avoid.el ends here
\f
(provide 'battery)
-;;; arch-tag: 65916f50-4754-4b6b-ac21-0b510f545a37
;;; battery.el ends here
;; no-update-autoloads: t
;; End:
-;;; arch-tag: 23b5c7e6-e47b-49ed-8c6c-ed213c5fffe0
;;; bindings.el ends here
Optional second arg DEFAULT is a string to return if the user enters
the empty string."
(bookmark-maybe-load-default-file) ; paranoia
- (if (listp last-nonmenu-event)
- (bookmark-menu-popup-paned-menu t prompt (bookmark-all-names))
- (let* ((completion-ignore-case bookmark-completion-ignore-case)
- (default default)
- (prompt (if default
- (concat prompt (format " (%s): " default))
- (concat prompt ": ")))
- (str
- (completing-read prompt
- bookmark-alist
- nil
- 0
- nil
- 'bookmark-history)))
- (if (string-equal "" str) default str))))
+ (let* ((completion-ignore-case bookmark-completion-ignore-case)
+ (default default)
+ (prompt (if default
+ (concat prompt (format " (%s): " default))
+ (concat prompt ": ")))
+ (str
+ (completing-read prompt
+ bookmark-alist
+ nil
+ 0
+ nil
+ 'bookmark-history)))
+ (if (string-equal "" str)
+ (list default)
+ (list str))))
(defmacro bookmark-maybe-historicize-string (string)
(defun bookmark-edit-annotation (bookmark)
"Pop up a buffer for editing bookmark BOOKMARK's annotation."
- (pop-to-buffer (generate-new-buffer-name "*Bookmark Annotation Compose*"))
- (bookmark-edit-annotation-mode bookmark))
+ (let ((buf (current-buffer))
+ (point (point)))
+ (pop-to-buffer (generate-new-buffer-name "*Bookmark Annotation Compose*"))
+ (bookmark-edit-annotation-mode bookmark)))
(defun bookmark-insert-current-bookmark ()
will then jump to the new location, as well as recording it in place
of the old one in the permanent bookmark record."
(interactive
- (list (bookmark-completing-read "Jump to bookmark"
- bookmark-current-bookmark)))
+ (bookmark-completing-read "Jump to bookmark" bookmark-current-bookmark))
(bookmark-maybe-historicize-string bookmark)
(let ((cell (bookmark-jump-noselect bookmark)))
(and cell
This makes an already existing bookmark point to that file, instead of
the one it used to point at. Useful when a file has been renamed
after a bookmark was set in it."
- (interactive (list (bookmark-completing-read "Bookmark to relocate")))
+ (interactive (bookmark-completing-read "Bookmark to relocate"))
(bookmark-maybe-historicize-string bookmark)
(bookmark-maybe-load-default-file)
(let* ((bmrk-filename (bookmark-get-filename bookmark))
"Insert the name of the file associated with BOOKMARK.
Optional second arg NO-HISTORY means don't record this in the
minibuffer history list `bookmark-history'."
- (interactive (list (bookmark-completing-read "Insert bookmark location")))
+ (interactive (bookmark-completing-read "Insert bookmark location"))
(or no-history (bookmark-maybe-historicize-string bookmark))
(let ((start (point)))
(prog1
While you are entering the new name, consecutive C-w's insert
consecutive words from the text of the buffer into the new bookmark
name."
- (interactive (list (bookmark-completing-read "Old bookmark name")))
+ (interactive (bookmark-completing-read "Old bookmark name"))
(bookmark-maybe-historicize-string old)
(bookmark-maybe-load-default-file)
`bookmark-alist' is nil. If that happens, you need to load in some
bookmarks. See help on function `bookmark-load' for more about
this."
- (interactive (list (bookmark-completing-read "Insert bookmark contents")))
+ (interactive (bookmark-completing-read "Insert bookmark contents"))
(bookmark-maybe-historicize-string bookmark)
(bookmark-maybe-load-default-file)
(let ((orig-point (point))
Optional second arg BATCH means don't update the bookmark list buffer,
probably because we were called from there."
(interactive
- (list (bookmark-completing-read "Delete bookmark"
- bookmark-current-bookmark)))
+ (bookmark-completing-read "Delete bookmark" bookmark-current-bookmark))
(bookmark-maybe-historicize-string bookmark)
(bookmark-maybe-load-default-file)
(let ((will-go (bookmark-get-bookmark bookmark)))
(if (interactive-p)
(switch-to-buffer (get-buffer-create "*Bookmark List*"))
(set-buffer (get-buffer-create "*Bookmark List*")))
- (let ((inhibit-read-only t))
- (erase-buffer)
+ (let ((buffer-read-only nil))
+ (delete-region (point-max) (point-min))
+ (goto-char (point-min)) ;sure are playing it safe...
(insert "% Bookmark\n- --------\n")
(bookmark-maybe-sort-alist)
(mapcar
(goto-char (point-min))
(forward-line 2)
(setq bookmark-bmenu-hidden-bookmarks ())
- (let ((inhibit-read-only t))
+ (let ((buffer-read-only nil))
(while (< (point) (point-max))
(let ((bmrk (bookmark-bmenu-bookmark)))
(setq bookmark-bmenu-hidden-bookmarks
(backward-word 1)
(setq bookmark-bmenu-bookmark-column (current-column)))
(save-excursion
- (let ((inhibit-read-only t))
+ (let ((buffer-read-only nil))
(while bookmark-bmenu-hidden-bookmarks
(move-to-column bookmark-bmenu-bookmark-column t)
(bookmark-kill-line)
(interactive)
(beginning-of-line)
(if (bookmark-bmenu-check-position)
- (let ((inhibit-read-only t))
+ (let ((buffer-read-only nil))
(delete-char 1)
(insert ?>)
(forward-line 1)
(goto-char (point-min))
(while (re-search-forward "^>" nil t)
(setq tem (bookmark-bmenu-bookmark))
- (let ((inhibit-read-only t))
+ (let ((buffer-read-only nil))
(delete-char -1)
(insert ?\ ))
(or (string-equal tem bmrk)
(beginning-of-line)
(if (bookmark-bmenu-check-position)
(progn
- (let ((inhibit-read-only t))
+ (let ((buffer-read-only nil))
(delete-char 1)
;; any flags to reset according to circumstances? How about a
;; flag indicating whether this bookmark is being visited?
(interactive)
(beginning-of-line)
(if (bookmark-bmenu-check-position)
- (let ((inhibit-read-only t))
+ (let ((buffer-read-only nil))
(delete-char 1)
(insert ?D)
(forward-line 1)
\f
;;; Menu bar stuff. Prefix is "bookmark-menu".
+(defun bookmark-menu-build-paned-menu (name entries)
+ "Build a multi-paned menu named NAME from the strings in ENTRIES.
+That is, ENTRIES is a list of strings which appear as the choices
+in the menu. The number of panes depends on the number of entries.
+The visible entries are truncated to `bookmark-menu-length', but the
+strings returned are not."
+ (let* ((f-height (/ (frame-height) 2))
+ (pane-list
+ (let (temp-pane-list
+ (iter 0))
+ (while entries
+ (let (lst
+ (count 0))
+ (while (and (< count f-height) entries)
+ (let ((str (car entries)))
+ (setq lst (cons
+ (cons
+ (if (> (length str) bookmark-menu-length)
+ (substring str 0 bookmark-menu-length)
+ str)
+ str)
+ lst))
+ (setq entries (cdr entries))
+ (setq count (1+ count))))
+ (setq iter (1+ iter))
+ (setq
+ temp-pane-list
+ (cons
+ (cons
+ (format "-*- %s (%d) -*-" name iter)
+ (nreverse lst))
+ temp-pane-list))))
+ (nreverse temp-pane-list))))
+
+ ;; Return the menu:
+ (cons (concat "-*- " name " -*-") pane-list)))
+
+
(defun bookmark-menu-popup-paned-menu (event name entries)
"Pop up multi-paned menu at EVENT, return string chosen from ENTRIES.
That is, ENTRIES is a list of strings which appear as the choices
in the menu.
-The number of panes depends on the number of entries.
-The visible entries are truncated to `bookmark-menu-length', but the
-strings returned are not."
- (let ((f-height (/ (frame-height) 2))
- (pane-list nil)
- (iter 0))
- (while entries
- (let (lst
- (count 0))
- (while (and (< count f-height) entries)
- (let ((str (car entries)))
- (push (cons
- (if (> (length str) bookmark-menu-length)
- (substring str 0 bookmark-menu-length)
- str)
- str)
- lst)
- (setq entries (cdr entries))
- (setq count (1+ count))))
- (setq iter (1+ iter))
- (push (cons
- (format "-*- %s (%d) -*-" name iter)
- (nreverse lst))
- pane-list)))
-
- ;; Popup the menu and return the string.
- (x-popup-menu event (cons (concat "-*- " name " -*-")
- (nreverse pane-list)))))
+The number of panes depends on the number of entries."
+ (interactive "e")
+ (x-popup-menu event (bookmark-menu-build-paned-menu name entries)))
+
+
+(defun bookmark-menu-popup-paned-bookmark-menu (event name)
+ "Pop up menu of bookmarks, return chosen bookmark.
+Pop up at EVENT, menu's name is NAME.
+The number of panes depends on the number of bookmarks."
+ (bookmark-menu-popup-paned-menu event name (bookmark-all-names)))
+
+
+(defun bookmark-popup-menu-and-apply-function (func-sym menu-label event)
+ ;; help function for making menus that need to apply a bookmark
+ ;; function to a string.
+ (let* ((choice (bookmark-menu-popup-paned-bookmark-menu
+ event menu-label)))
+ (if choice (apply func-sym (list choice)))))
+
+
+;;;###autoload
+(defun bookmark-menu-insert (event)
+ "Insert the text of the file pointed to by bookmark BOOKMARK.
+You may have a problem using this function if the value of variable
+`bookmark-alist' is nil. If that happens, you need to load in some
+bookmarks. See help on function `bookmark-load' for more about
+this.
+
+Warning: this function only takes an EVENT as argument. Use the
+corresponding bookmark function from Lisp \(the one without the
+\"-menu-\" in its name\)."
+ (interactive "e")
+ (bookmark-popup-menu-and-apply-function
+ 'bookmark-insert "Insert Bookmark Contents" event))
+
+
+;;;###autoload
+(defun bookmark-menu-jump (event)
+ "Jump to bookmark BOOKMARK (a point in some file).
+You may have a problem using this function if the value of variable
+`bookmark-alist' is nil. If that happens, you need to load in some
+bookmarks. See help on function `bookmark-load' for more about
+this.
+
+Warning: this function only takes an EVENT as argument. Use the
+corresponding bookmark function from Lisp \(the one without the
+\"-menu-\" in its name\)."
+ (interactive "e")
+ (bookmark-popup-menu-and-apply-function
+ 'bookmark-jump "Jump to Bookmark" event))
+
+
+;;;###autoload
+(defun bookmark-menu-locate (event)
+ "Insert the name of the file associated with BOOKMARK.
+\(This is not the same as the contents of that file\).
+
+Warning: this function only takes an EVENT as argument. Use the
+corresponding bookmark function from Lisp \(the one without the
+\"-menu-\" in its name\)."
+ (interactive "e")
+ (bookmark-popup-menu-and-apply-function
+ 'bookmark-insert-location "Insert Bookmark Location" event))
+
+
+;;;###autoload
+(defun bookmark-menu-rename (event)
+ "Change the name of OLD-BOOKMARK to NEWNAME.
+If called from keyboard, prompts for OLD-BOOKMARK and NEWNAME.
+If called from menubar, OLD-BOOKMARK is selected from a menu, and
+prompts for NEWNAME.
+If called from Lisp, prompts for NEWNAME if only OLD-BOOKMARK was
+passed as an argument. If called with two strings, then no prompting
+is done. You must pass at least OLD-BOOKMARK when calling from Lisp.
+
+While you are entering the new name, consecutive C-w's insert
+consecutive words from the text of the buffer into the new bookmark
+name.
+
+Warning: this function only takes an EVENT as argument. Use the
+corresponding bookmark function from Lisp \(the one without the
+\"-menu-\" in its name\)."
+ (interactive "e")
+ (bookmark-popup-menu-and-apply-function
+ 'bookmark-rename "Rename Bookmark" event))
+
+
+;;;###autoload
+(defun bookmark-menu-delete (event)
+ "Delete the bookmark named NAME from the bookmark list.
+Removes only the first instance of a bookmark with that name. If
+there are one or more other bookmarks with the same name, they will
+not be deleted. Defaults to the \"current\" bookmark \(that is, the
+one most recently used in this file, if any\).
+
+Warning: this function only takes an EVENT as argument. Use the
+corresponding bookmark function from Lisp \(the one without the
+\"-menu-\" in its name\)."
+ (interactive "e")
+ (bookmark-popup-menu-and-apply-function
+ 'bookmark-delete "Delete Bookmark" event))
;; Thanks to Roland McGrath for fixing menubar.el so that the
;; Emacs menubar stuff.
;;;###autoload
-(defvar menu-bar-bookmark-map
- (let ((map (make-sparse-keymap "Bookmark functions")))
- (define-key map [load] '("Load a Bookmark File..." . bookmark-load))
- (define-key map [write] '("Save Bookmarks As..." . bookmark-write))
- (define-key map [save] '("Save Bookmarks" . bookmark-save))
- (define-key map [edit] '("Edit Bookmark List" . bookmark-bmenu-list))
- (define-key map [delete] '("Delete Bookmark" . bookmark-delete))
- (define-key map [rename] '("Rename Bookmark" . bookmark-rename))
- (define-key map [locate] '("Insert Location" . bookmark-locate))
- (define-key map [insert] '("Insert Contents" . bookmark-insert))
- (define-key map [set] '("Set Bookmark" . bookmark-set))
- (define-key map [jump] '("Jump to Bookmark" . bookmark-jump))
- map))
+(defvar menu-bar-bookmark-map (make-sparse-keymap "Bookmark functions"))
;;;###autoload
-(defalias 'menu-bar-bookmark-map menu-bar-bookmark-map)
+(defalias 'menu-bar-bookmark-map (symbol-value 'menu-bar-bookmark-map))
;; make bookmarks appear toward the right side of the menu.
(if (boundp 'menu-bar-final-items)
(cons 'bookmark menu-bar-final-items)))
(setq menu-bar-final-items '(bookmark)))
+;;;###autoload (define-key menu-bar-bookmark-map [load]
+;;;###autoload '("Load a Bookmark File..." . bookmark-load))
+
+;;;###autoload (define-key menu-bar-bookmark-map [write]
+;;;###autoload '("Save Bookmarks As..." . bookmark-write))
+
+;;;###autoload (define-key menu-bar-bookmark-map [save]
+;;;###autoload '("Save Bookmarks" . bookmark-save))
+
+;;;###autoload (define-key menu-bar-bookmark-map [edit]
+;;;###autoload '("Edit Bookmark List" . bookmark-bmenu-list))
+
+;;;###autoload (define-key menu-bar-bookmark-map [delete]
+;;;###autoload '("Delete Bookmark" . bookmark-menu-delete))
+
+;;;###autoload (define-key menu-bar-bookmark-map [rename]
+;;;###autoload '("Rename Bookmark" . bookmark-menu-rename))
+
+;;;###autoload (define-key menu-bar-bookmark-map [locate]
+;;;###autoload '("Insert Location" . bookmark-menu-locate))
+
+;;;###autoload (define-key menu-bar-bookmark-map [insert]
+;;;###autoload '("Insert Contents" . bookmark-menu-insert))
+
+;;;###autoload (define-key menu-bar-bookmark-map [set]
+;;;###autoload '("Set Bookmark" . bookmark-set))
+
+;;;###autoload (define-key menu-bar-bookmark-map [jump]
+;;;###autoload '("Jump to Bookmark" . bookmark-menu-jump))
+
;;;; end bookmark menu stuff ;;;;
\f
;;; Load Hook
(defvar bookmark-load-hook nil
- "Hook run at the end of loading bookmark.")
+ "Hook to run at the end of loading bookmark.")
;;; Exit Hook, called from kill-emacs-hook
(defvar bookmark-exit-hook nil
- "Hook run when emacs exits.")
+ "Hook to run when emacs exits")
(defun bookmark-exit-hook-internal ()
"Save bookmark state, if necessary, at Emacs exit time.
This also runs `bookmark-exit-hooks'."
- (run-hooks 'bookmark-exit-hooks)
- (and bookmark-alist
- (bookmark-time-to-save-p t)
- (bookmark-save)))
+ (and
+ (progn (run-hooks 'bookmark-exit-hooks) t)
+ bookmark-alist
+ (bookmark-time-to-save-p t)
+ (bookmark-save)))
(add-hook 'kill-emacs-hook 'bookmark-exit-hook-internal)
(provide 'bookmark)
-;;; arch-tag: 139f519a-dd0c-4b8d-8b5d-f9fcf53ca8f6
;;; bookmark.el ends here
(defvar bs--marked-buffers nil
"Currently marked buffers in Buffer Selection Menu.")
-(defvar bs-mode-map
- (let ((map (make-sparse-keymap)))
- (define-key map " " 'bs-select)
- (define-key map "f" 'bs-select)
- (define-key map "v" 'bs-view)
- (define-key map "!" 'bs-select-in-one-window)
- (define-key map [mouse-2] 'bs-mouse-select) ;; for GNU EMACS
- (define-key map [button2] 'bs-mouse-select) ;; for XEmacs
- (define-key map "F" 'bs-select-other-frame)
- (let ((key ?1))
- (while (<= key ?9)
- (define-key map (char-to-string key) 'digit-argument)
- (setq key (1+ key))))
- (define-key map "-" 'negative-argument)
- (define-key map "\e-" 'negative-argument)
- (define-key map "o" 'bs-select-other-window)
- (define-key map "\C-o" 'bs-tmp-select-other-window)
- ;; for GNU EMACS
- (define-key map [mouse-3] 'bs-mouse-select-other-frame)
- ;; for XEmacs
- (define-key map [button3] 'bs-mouse-select-other-frame)
- (define-key map [up] 'bs-up)
- (define-key map "n" 'bs-down)
- (define-key map "p" 'bs-up)
- (define-key map [down] 'bs-down)
- (define-key map "\C-m" 'bs-select)
- (define-key map "b" 'bs-bury-buffer)
- (define-key map "s" 'bs-save)
- (define-key map "S" 'bs-show-sorted)
- (define-key map "a" 'bs-toggle-show-all)
- (define-key map "d" 'bs-delete)
- (define-key map "\C-d" 'bs-delete-backward)
- (define-key map "k" 'bs-delete)
- (define-key map "g" 'bs-refresh)
- (define-key map "C" 'bs-set-configuration-and-refresh)
- (define-key map "c" 'bs-select-next-configuration)
- (define-key map "q" 'bs-kill)
- ;; (define-key map "z" 'bs-kill)
- (define-key map "\C-c\C-c" 'bs-kill)
- (define-key map "\C-g" 'bs-abort)
- (define-key map "\C-]" 'bs-abort)
- (define-key map "%" 'bs-toggle-readonly)
- (define-key map "~" 'bs-clear-modified)
- (define-key map "M" 'bs-toggle-current-to-show)
- (define-key map "+" 'bs-set-current-buffer-to-show-always)
- ;;(define-key map "-" 'bs-set-current-buffer-to-show-never)
- (define-key map "t" 'bs-visit-tags-table)
- (define-key map "m" 'bs-mark-current)
- (define-key map "u" 'bs-unmark-current)
- (define-key map ">" 'scroll-right)
- (define-key map "<" 'scroll-left)
- (define-key map "?" 'bs-help)
- map)
+(defvar bs-mode-map ()
"Keymap of `bs-mode'.")
+(if bs-mode-map
+ ()
+ (setq bs-mode-map (make-sparse-keymap))
+ (define-key bs-mode-map " " 'bs-select)
+ (define-key bs-mode-map "f" 'bs-select)
+ (define-key bs-mode-map "v" 'bs-view)
+ (define-key bs-mode-map "!" 'bs-select-in-one-window)
+ (define-key bs-mode-map [mouse-2] 'bs-mouse-select) ;; for GNU EMACS
+ (define-key bs-mode-map [button2] 'bs-mouse-select) ;; for XEmacs
+ (define-key bs-mode-map "F" 'bs-select-other-frame)
+
+ (let ((key ?1))
+ (while (<= key ?9)
+ (define-key bs-mode-map (char-to-string key) 'digit-argument)
+ (setq key (1+ key))))
+
+ (define-key bs-mode-map "-" 'negative-argument)
+ (define-key bs-mode-map "\e-" 'negative-argument)
+
+ (define-key bs-mode-map "o" 'bs-select-other-window)
+ (define-key bs-mode-map "\C-o" 'bs-tmp-select-other-window)
+ ;; for GNU EMACS
+ (define-key bs-mode-map [mouse-3] 'bs-mouse-select-other-frame)
+ ;; for XEmacs
+ (define-key bs-mode-map [button3] 'bs-mouse-select-other-frame)
+ (define-key bs-mode-map [up] 'bs-up)
+ (define-key bs-mode-map "n" 'bs-down)
+ (define-key bs-mode-map "p" 'bs-up)
+ (define-key bs-mode-map [down] 'bs-down)
+ (define-key bs-mode-map "\C-m" 'bs-select)
+ (define-key bs-mode-map "b" 'bs-bury-buffer)
+ (define-key bs-mode-map "s" 'bs-save)
+ (define-key bs-mode-map "S" 'bs-show-sorted)
+ (define-key bs-mode-map "a" 'bs-toggle-show-all)
+ (define-key bs-mode-map "d" 'bs-delete)
+ (define-key bs-mode-map "\C-d" 'bs-delete-backward)
+ (define-key bs-mode-map "k" 'bs-delete)
+ (define-key bs-mode-map "g" 'bs-refresh)
+ (define-key bs-mode-map "C" 'bs-set-configuration-and-refresh)
+ (define-key bs-mode-map "c" 'bs-select-next-configuration)
+ (define-key bs-mode-map "q" 'bs-kill)
+ ;; (define-key bs-mode-map "z" 'bs-kill)
+ (define-key bs-mode-map "\C-c\C-c" 'bs-kill)
+ (define-key bs-mode-map "\C-g" 'bs-abort)
+ (define-key bs-mode-map "\C-]" 'bs-abort)
+ (define-key bs-mode-map "%" 'bs-toggle-readonly)
+ (define-key bs-mode-map "~" 'bs-clear-modified)
+ (define-key bs-mode-map "M" 'bs-toggle-current-to-show)
+ (define-key bs-mode-map "+" 'bs-set-current-buffer-to-show-always)
+ ;;(define-key bs-mode-map "-" 'bs-set-current-buffer-to-show-never)
+ (define-key bs-mode-map "t" 'bs-visit-tags-table)
+ (define-key bs-mode-map "m" 'bs-mark-current)
+ (define-key bs-mode-map "u" 'bs-unmark-current)
+ (define-key bs-mode-map ">" 'scroll-right)
+ (define-key bs-mode-map "<" 'scroll-left)
+ (define-key bs-mode-map "\e\e" nil)
+ (define-key bs-mode-map "\e\e\e" 'bs-kill)
+ (define-key bs-mode-map [escape escape escape] 'bs-kill)
+ (define-key bs-mode-map "?" 'bs-help))
+
;; ----------------------------------------------------------------------
;; Functions
;; ----------------------------------------------------------------------
;; Now provide feature bs
(provide 'bs)
-;;; arch-tag: c0d9ab34-bf06-4368-ae9d-af88878e6802
;;; bs.el ends here
(goto-char desired-point))
(current-buffer))))
-;;; arch-tag: e7dfcfc9-6cb2-46e4-bf55-8ef1936d83c6
;;; buff-menu.el ends here
(provide 'button)
-;;; arch-tag: 5f2c7627-413b-4097-b282-630f89d9c5e9
;;; button.el ends here
(math-read-angle-brackets))
(t (throw 'syntax "Expected a number")))))
-;;; arch-tag: 5599e45d-e51e-44bb-9a20-9f4ed8c96c32
;;; calc-aent.el ends here
(math-scale-int 1 (- (nth 2 f)))))))
f))
-;;; arch-tag: 52e7dcdf-9688-464d-a02b-4bbe789348d0
;;; calc-alg.el ends here
(math-commutative-collect (nth 2 b) (not neg)))
(setq bterms (cons (if neg (math-neg b) b) bterms)))))
-;;; arch-tag: 6c396b5b-14c6-40ed-bb2a-7cc2e8111465
;;; calc-arith.el ends here
math-radix-float-cache))))))))
-;;; arch-tag: f6dba7bc-53b2-41ae-919c-c266ab0ca8b3
;;; calc-bin.el ends here
-;;; arch-tag: 1d75ee9b-0815-42bd-a321-bb3dc001cc02
;;; calc-comb.el ends here
(t (calc-record-why 'numberp a)
(list 'calcFunc-im a)))))
-;;; arch-tag: de73a331-941c-4507-ae76-46c76adc70dd
;;; calc-cplx.el ends here
(setq bp (if buf nil (cdr bp))))
(or first calc-embedded-quiet (message "")))))
-;;; arch-tag: 1b8f311e-fba1-40d3-b8c3-1d6f68fd26fc
;;; calc-embed.el ends here
(run-hooks 'calc-ext-load-hook)
-;;; arch-tag: 1814ba7f-a390-49dc-9e25-a5adc205e97e
;;; calc-ext.el ends here
book salvage)))
res)))
-;;; arch-tag: 82f30ca8-d02f-4b33-84b4-bb6ecd84597b
;;; calc-fin.el ends here
(math-read-token)
res))
-;;; arch-tag: a3d8f33b-9508-4043-8060-d02b8c9c750c
;;; calc-forms.el ends here
(math-reject-arg b 'integerp))
(math-reject-arg a 'integerp)))
-;;; arch-tag: 89d65274-0b3b-42d8-aacd-eaf86da5b4ea
;;; calc-frac.el ends here
(put 'calcFunc-ltpt 'math-expandable t)
-;;; arch-tag: 421ddb7a-550f-4dda-a31c-06638ebfc43a
;;; calc-funcs.el ends here
(goto-char (point-max))
(insert "\n"))))))
-;;; arch-tag: e4b06a52-c386-4d54-a2bb-7c0a0ef533c2
;;; calc-graph.el ends here
"} (matrix brackets); . (abbreviate); / (multi-lines)")
"vec/mat" ?v))
-;;; arch-tag: 2d347593-7591-449e-a64a-93dab5f2f686
;;; calc-help.el ends here
(error "Interval form is incomplete"))
(t (error "Object is incomplete"))))
-;;; arch-tag: b8001270-4dc7-481b-a3e3-a952e19b390d
;;; calc-incom.el ends here
(error "Not a Calc command: %s" (key-description keys)))))
-;;; arch-tag: 4ba0d360-2bb6-40b8-adfa-eb373765b3f9
;;; calc-keypd.el ends here
(setq h (1+ h))))
h))
-;;; arch-tag: 483bfe15-f290-4fef-bb7d-ce65be687f2e
;;; calc-lang.el ends here
(or (consp b)
(< a b))))
-;;; arch-tag: 08ba8ec2-fcff-4b80-a079-ec661bdb057e
;;; calc-macs.el ends here
(save-buffer))
(message "Wrote file calcsum.tex"))
-;;; arch-tag: 46cf3de8-6248-4a11-9034-d9850195761d
;;; calc-maint.el ends here
(setq mat (cons (cons 'vec row) mat)))
(cons 'vec (nreverse mat))))
-;;; arch-tag: 980eac49-00e0-4870-b72a-e726b74c7990
;;; calc-map.el ends here
(t (list 'calcFunc-deg a))))
(put 'calcFunc-deg 'math-expandable t)
-;;; arch-tag: c7367e8e-d0b8-4f70-8577-2fb3f31dbb4c
;;; calc-math.el ends here
" )))
(defalias 'calc-report-bug 'report-calc-bug)
-;;; arch-tag: 7984d9d0-62e5-41dc-afb8-e904b975f250
;;; calc-misc.el ends here
(error "Unrecognized character: %c" (aref arg bad)))
(calc-change-mode 'calc-matrix-brackets code t))))
-;;; arch-tag: ecc70eea-c712-43f2-9085-4205e58d6ddf
;;; calc-mode.el ends here
(math-reject-arg m "*Singular matrix"))
(math-reject-arg m 'square-matrixp)))
-;;; arch-tag: fc0947b1-90e1-4a23-8950-d8ead9c3a306
;;; calc-mtx.el ends here
(defun calcFunc-expandpow (x n)
(math-normalize (math-expand-power x n)))
-;;; arch-tag: d2566c51-2ccc-45f1-8c50-f3462c2953ff
;;; calc-poly.el ends here
(math-read-expr-level (nth 3 op)) (nth 1 x))
(throw 'syntax "Syntax error"))))))
-;;; arch-tag: 4c5a183b-c9e5-4632-bb3f-e41a764518b0
;;; calc-prog.el ends here
nil nil)
(cdr rules)))))))
-;;; arch-tag: ca8d7b7d-bff1-4535-90f3-e2241f5e786b
;;; calc-rewr.el ends here
hasfitparams(pv)))),
fitparam(n) = x := x ]"))
-;;; arch-tag: 0ed54a52-38f3-4ed7-9ca7-b8ecf8f2febe
;;; calc-rules.el ends here
(interactive "P")
(calc-sel-add-both-sides no-simp t))
-;;; arch-tag: e5169792-777d-428f-bff5-acca66813fa2
;;; calc-sel.el ends here
(math-div (math-mul suminvsqrwts (1- len)) len))
(if pop len (1- len)))))))))
-;;; arch-tag: 423858e9-8513-489c-9f35-710cd9d9c307
;;; calc-stat.el ends here
(calc-slow-wrapper
(calc-binary-op "sub" 'calcFunc-subscr arg)))
-;;; arch-tag: 2fbfec82-a521-42ca-bcd8-4f254ae6313e
;;; calc-store.el ends here
(nth 2 expr)))
(t (cons (car expr) (mapcar 'math-map-over-constants-rec (cdr expr))))))
-;;; arch-tag: 789332ef-a178-49d3-8fb7-5d7ed7e21f56
;;; calc-stuff.el ends here
(kill-line n)))
(calc-trail-here)))
-;;; arch-tag: 59b76655-d882-4aab-a3ee-b83870e530d0
;;; calc-trail.el ends here
(or (eq (car (car list)) 'pop)
(calc-undo-does-pushes (cdr list)))))
-;;; arch-tag: eeb485d2-fb3d-454a-9d79-450af1f50d6c
;;; calc-undo.el ends here
;; coding: iso-latin-1
;; End:
-;;; arch-tag: e993314f-3adc-4191-be61-4ef8874881c4
;;; calc-units.el ends here
(setq mat (nconc mat (list (math-read-vector)))))
mat)
-;;; arch-tag: 7902a7af-ec69-440a-8635-ebb4db263402
;;; calc-vec.el ends here
(calc-enter-result num "edit" vals)
(calc-enter-result 1 "edit" vals (- num))))))))))
-;;; arch-tag: ca61019e-caca-4daa-b32c-b6afe372d5b5
;;; calc-yank.el ends here
(run-hooks 'calc-load-hook)
-;;; arch-tag: 0c3b170c-4ce6-4eaf-8d9b-5834d1fe938f
;;; calc.el ends here
(math-normalize accum))))
(list 'calcFunc-taylor expr var num))))
-;;; arch-tag: f2932ec8-dd63-418b-a542-11a644b9d4c4
;;; calcalg2.el ends here
(while (setq expr (cdr expr))
(math-all-vars-rec (car expr)))))
-;;; arch-tag: ff9f2920-8111-48b5-b3fa-b0682c3e44a6
;;; calcalg3.el ends here
(math-comp-to-string-raw-step (cdr cl) indent))
""))
-;;; arch-tag: 7c45d10a-a286-4dab-af49-7ae8989fbf78
;;; calccomp.el ends here
(interactive "P")
(calc-rewrite-selection "InvertRules" many "jinv"))
-;;; arch-tag: 7c5b8d65-b8f0-45d9-820d-9930f8ee114b
;;; calcsel2.el ends here
(provide 'calculator)
-;;; arch-tag: a1b9766c-af8a-4a74-b466-65ad8eeb0c73
;;; calculator.el ends here
(setq global-mode-string
(append global-mode-string '(appt-mode-string))))
-;;; arch-tag: bf5791c4-8921-499e-a26f-772b1788d347
;;; appt.el ends here
(provide 'cal-china)
-;;; arch-tag: 7e5b7e0d-676c-47e3-8696-93e7ea0ab644
;;; cal-china.el ends here
(provide 'cal-coptic)
-;;; arch-tag: 72d49161-25df-4072-9312-b182cdca7627
;;; cal-coptic.el ends here
(provide 'cal-dst)
-;;; arch-tag: a141d204-213c-4ca5-bdc6-f9df3aa92aad
;;; cal-dst.el ends here
(provide 'cal-french)
-;;; arch-tag: 7e8045a3-8609-46b5-9cde-cf40ce541cf9
;;; cal-french.el ends here
(provide 'cal-hebrew)
-;;; arch-tag: aaab6718-7712-42ac-a32d-28fe1f944f3c
;;; cal-hebrew.el ends here
(provide 'cal-islam)
-;;; arch-tag: a951b6c1-6f47-48d5-bac3-1b505cd719f7
;;; cal-islam.el ends here
(provide 'cal-iso)
-;;; arch-tag: 3c0154cc-d30f-4981-9f60-42bdf7a468f6
;;; cal-iso.el ends here
(provide 'cal-julian)
-;;; arch-tag: 0520acdd-1c60-4188-9aa8-9b8c24d856ae
;;; cal-julian.el ends here
(provide 'cal-mayan)
-;;; arch-tag: 54f35144-cd0f-4873-935a-a60129de07df
;;; cal-mayan.el ends here
'("Astronomical Date" . calendar-goto-astro-day-number))
(define-key calendar-mode-map [menu-bar goto iso]
'("ISO Date" . calendar-goto-iso-date))
-(define-key calendar-mode-map [menu-bar goto day-of-year]
- '("Day of Year" . calendar-goto-day-of-year))
(define-key calendar-mode-map [menu-bar goto gregorian]
'("Other Date" . calendar-goto-date))
(define-key calendar-mode-map [menu-bar goto end-of-year]
(define-key calendar-mode-map [menu-bar scroll fwd-1]
'("Forward 1 Month" . scroll-calendar-left))
-(defun calendar-flatten (list)
- "Flatten LIST eliminating sublists structure; result is a list of atoms.
-This is the same as the preorder list of leaves in a rooted forest."
- (if (atom list)
- (list list)
- (if (cdr list)
- (append (calendar-flatten (car list)) (calendar-flatten (cdr list)))
- (calendar-flatten (car list)))))
-
(defun cal-menu-x-popup-menu (position menu)
"Like `x-popup-menu', but prints an error message if popup menus are
not available."
(if l l '("None")))))))
(and selection (call-interactively selection))))
-(defun calendar-mouse-view-diary-entries (&optional date diary)
- "Pop up menu of diary entries for mouse-selected date.
-Use optional DATE and alternative file DIARY.
-
-Any holidays are shown if `holidays-in-diary-buffer' is t."
+(defun calendar-mouse-view-diary-entries ()
+ "Pop up menu of diary entries for mouse selected date."
(interactive)
- (let* ((date (if date date (calendar-event-to-date)))
- (diary-file (if diary diary diary-file))
- (diary-list-include-blanks nil)
- (diary-display-hook 'ignore)
- (diary-entries
- (mapcar '(lambda (x) (split-string (car (cdr x)) "\^M\\|\n"))
- (list-diary-entries date 1)))
- (holidays (if holidays-in-diary-buffer
- (mapcar '(lambda (x) (list x))
- (check-calendar-holidays date))))
- (title (concat "Diary entries "
- (if diary (format "from %s " diary) "")
- "for "
- (calendar-date-string date)))
+ (let* ((date (calendar-event-to-date))
+ (l (mapcar '(lambda (x) (list (car (cdr x))))
+ (let ((diary-list-include-blanks nil)
+ (diary-display-hook 'ignore))
+ (list-diary-entries date 1))))
(selection
(cal-menu-x-popup-menu
event
- (list title
- (append
- (list title)
- (if holidays
- (mapcar '(lambda (x) (list (concat " " (car x))))
- holidays))
- (if holidays
- (list "--shadow-etched-in" "--shadow-etched-in"))
- (if diary-entries
- (mapcar 'list (calendar-flatten diary-entries))
- '("None")))))))
+ (list
+ (format "Diary entries for %s" (calendar-date-string date))
+ (append
+ (list (format "Diary entries for %s" (calendar-date-string date)))
+ (if l l '("None")))))))
(and selection (call-interactively selection))))
(defun calendar-mouse-view-other-diary-entries ()
"Pop up menu of diary entries from alternative file on mouse-selected date."
(interactive)
- (calendar-mouse-view-diary-entries
- (calendar-event-to-date)
- (read-file-name "Enter diary file name: " default-directory nil t)))
+ (let* ((date (calendar-event-to-date))
+ (diary-list-include-blanks nil)
+ (diary-display-hook 'ignore)
+ (diary-file (read-file-name
+ "Enter diary file name: "
+ default-directory nil t))
+ ; The following doesn't really do the right thing. The problem is
+ ; that a newline in the diary entry does not give a newline in a
+ ; pop-up menu; for that you need a separate list item. When the (car
+ ; (cdr x)) contains newlines, the item should be split into a list of
+ ; items. Too minor and messy to worry about.
+ (l (mapcar '(lambda (x) (list (car (cdr x))))
+ (list-diary-entries date 1)))
+ (selection
+ (cal-menu-x-popup-menu
+ event
+ (list
+ (format "Diary entries from %s for %s"
+ diary-file
+ (calendar-date-string date))
+ (append
+ (list (format "Diary entries from %s for %s"
+ diary-file
+ (calendar-date-string date)))
+ (if l l '("None")))))))
+ (and selection (call-interactively selection))))
(defun calendar-mouse-insert-diary-entry ()
"Insert diary entry for mouse-selected date."
(provide 'cal-menu)
-;;; arch-tag: aa81cf73-ce89-48a4-97ec-9ef861e87fe9
;;; cal-menu.el ends here
(calendar-cursor-to-visible-date date)
(run-hooks 'calendar-move-hook))
-(defun calendar-goto-day-of-year (year day &optional noecho)
- "Move cursor to YEAR, DAY number; echo DAY/YEAR unless NOECHO is t.
-Negative DAY counts backward from end of year."
- (interactive
- (let* ((year (calendar-read
- "Year (>0): "
- (lambda (x) (> x 0))
- (int-to-string (extract-calendar-year
- (calendar-current-date)))))
- (last (if (calendar-leap-year-p year) 366 365))
- (day (calendar-read
- (format "Day number (+/- 1-%d): " last)
- '(lambda (x) (and (<= 1 (abs x)) (<= (abs x) last))))))
- (list year day)))
- (calendar-goto-date
- (calendar-gregorian-from-absolute
- (if (< 0 day)
- (+ -1 day (calendar-absolute-from-gregorian (list 1 1 year)))
- (+ 1 day (calendar-absolute-from-gregorian (list 12 31 year))))))
- (or noecho (calendar-print-day-of-year)))
-
(provide 'cal-move)
-;;; arch-tag: d0883c46-7e16-4914-8ff8-8f67e699b781
;;; cal-move.el ends here
(provide 'cal-persia)
-;;; arch-tag: 2832383c-e4b4-4dc2-8ee9-cfbdd53e5e2d
;;; cal-persia.el ends here
(provide 'cal-tex)
-;;; arch-tag: ca8168a4-5a00-4508-a565-17e3bccce6d0
;;; cal-tex.el ends here
(provide 'cal-x)
-;;; arch-tag: c6dbddca-ae84-442d-87fc-244b76e38e17
;;; cal-x.el ends here
diary entries from various included files, each day's entries sorted into
lexicographic order."
:type 'hook
- :options '(include-other-diary-files sort-diary-entries)
:group 'diary)
;;;###autoload
if that day is a holiday; if you want such days to be shown in the fancy
diary buffer, set the variable `diary-list-include-blanks' to t."
:type 'hook
- :options '(fancy-diary-display)
:group 'diary)
;;;###autoload
and `list-islamic-diary-entries'. The documentation for these functions
describes the style of such diary entries."
:type 'hook
- :options '(list-hebrew-diary-entries list-islamic-diary-entries)
:group 'diary)
;;;###autoload
part of the mark-diary-entries-hook, you will probably also want to use the
function `include-other-diary-files' as part of `list-diary-entries-hook'."
:type 'hook
- :options '(mark-included-diary-files)
:group 'diary)
;;;###autoload
and `mark-islamic-diary-entries'. The documentation for these functions
describes the style of such diary entries."
:type 'hook
- :options '(mark-hebrew-diary-entries mark-islamic-diary-entries)
:group 'diary)
;;;###autoload
"Move cursor to DATE."
t)
-(autoload 'calendar-goto-day-of-year "cal-move"
- "Move cursor to day of year."
- t)
-
(autoload 'calendar-only-one-frame-setup "cal-x"
"Start calendar and display it in a dedicated frame.")
(define-key calendar-mode-map "\C-x\C-x" 'calendar-exchange-point-and-mark)
(define-key calendar-mode-map "\e=" 'calendar-count-days-region)
(define-key calendar-mode-map "gd" 'calendar-goto-date)
- (define-key calendar-mode-map "gD" 'calendar-goto-day-of-year)
(define-key calendar-mode-map "gj" 'calendar-goto-julian-date)
(define-key calendar-mode-map "ga" 'calendar-goto-astro-day-number)
(define-key calendar-mode-map "gh" 'calendar-goto-hebrew-date)
elements replaced by the first three characters taken from the
corresponding element of FULL. If optional argument PERIOD is non-nil,
each element returned has a final `.' character."
- (let (elem array name)
+ (let (elem array)
(dotimes (i (length full))
- (setq name (aref full i)
- elem (or (aref abbrev i)
- (substring name 0
- (min calendar-abbrev-length (length name))))
+ (setq elem (or (aref abbrev i)
+ (substring (aref full i) 0 calendar-abbrev-length))
elem (format "%s%s" elem (if period "." ""))
array (append array (list elem))))
(vconcat array)))
(aseqp (if abbrevs (calendar-abbrev-construct abbrevs sequence
'period)))
alist elem)
- (dotimes (i (length sequence) (reverse alist))
+ (dotimes (i (1- (length sequence)) (reverse alist))
(setq index (+ i offset)
elem (elt sequence i)
alist
;;; byte-compile-dynamic: t
;;; End:
-;;; arch-tag: 19c61596-c8fb-4c69-bcf1-7dd739919cd8
;;; calendar.el ends here
(list entry ret-attr))))
-;; This can be removed once the kill/yank treatment of invisible text
-;; (see etc/TODO) is fixed. -- gm
-(defcustom diary-header-line-flag t
- "*If non-nil, `simple-diary-display' will show a header line.
-The format of the header is specified by `diary-header-line-format'."
- :group 'diary
- :type 'boolean
- :version "21.4")
-
-(defcustom diary-header-line-format
- '(:eval (calendar-string-spread
- (list (if selective-display
- "Selective display active - press \"s\" in calendar \
-before edit/copy"
- "Diary"))
- ?\ (frame-width)))
- "*Format of the header line displayed by `simple-diary-display'.
-Only used if `diary-header-line-flag' is non-nil."
- :group 'diary
- :type 'sexp
- :version "21.4")
(defun list-diary-entries (date number)
"Create and display a buffer containing the relevant lines in diary-file.
(setq file-glob-attrs (nth 1 (diary-pull-attrs nil "")))
(setq selective-display t)
(setq selective-display-ellipses nil)
- (if diary-header-line-flag
- (setq header-line-format diary-header-line-format))
(setq old-diary-syntax-table (syntax-table))
(set-syntax-table diary-syntax-table)
(unwind-protect
'list-diary-entries-hook)
(if diary-display-hook
(run-hooks 'diary-display-hook)
+ ;; FIXME Error if calendar-setup 'calendar-only -- gm.
(simple-diary-display))
(run-hooks 'diary-hook)
diary-entries-list))))
"Display the diary buffer if there are any relevant entries or holidays."
(let* ((holiday-list (if holidays-in-diary-buffer
(check-calendar-holidays original-date)))
- (hol-string (format "%s%s%s"
- date-string
- (if holiday-list ": " "")
- (mapconcat 'identity holiday-list "; ")))
- (msg (format "No diary entries for %s" hol-string))
- ;; If selected window is dedicated (to the calendar),
- ;; need a new one to display the diary.
- (pop-up-frames (window-dedicated-p (selected-window))))
- (calendar-set-mode-line (format "Diary for %s" hol-string))
+ (msg (format "No diary entries for %s %s"
+ (concat date-string (if holiday-list ":" ""))
+ (mapconcat 'identity holiday-list "; "))))
+ (calendar-set-mode-line
+ (concat "Diary for " date-string
+ (if holiday-list ": " "")
+ (mapconcat 'identity holiday-list "; ")))
(if (or (not diary-entries-list)
(and (not (cdr diary-entries-list))
(string-equal (car (cdr (car diary-entries-list))) "")))
- (if (< (length msg) (frame-width))
+ (if (<= (length msg) (frame-width))
(message "%s" msg)
(set-buffer (get-buffer-create holiday-buffer))
(setq buffer-read-only nil)
(defun make-diary-entry (string &optional nonmarking file)
"Insert a diary entry STRING which may be NONMARKING in FILE.
If omitted, NONMARKING defaults to nil and FILE defaults to `diary-file'."
- (let ((pop-up-frames (window-dedicated-p (selected-window))))
- (find-file-other-window (substitute-in-file-name (or file diary-file))))
+ (find-file-other-window (substitute-in-file-name (or file diary-file)))
(widen)
(goto-char (point-max))
(when (let ((case-fold-search t))
(provide 'diary-lib)
-;;; arch-tag: 22dd506e-2e33-410d-9ae1-095a0c1b2010
;;; diary-lib.el ends here
(provide 'holidays)
-;;; arch-tag: 48eb3117-75a7-4dbe-8fd9-873c3cbb0d37
;;; holidays.el ends here
(provide 'lunar)
-;;; arch-tag: 72f0b8a4-7bcc-4a1b-b67a-ff53c4a1d222
;;; lunar.el ends here
(provide 'parse-time)
-;;; arch-tag: 07066094-45a8-4c68-b307-86195e2c1103
;;; parse-time.el ends here
(provide 'solar)
-;;; arch-tag: bc0ff693-df58-4666-bde4-2a7837ccb8fe
;;; solar.el ends here
(provide 'time-date)
-;;; arch-tag: addcf07b-b20a-465b-af72-550b8ac5190f
;;; time-date.el ends here
(if (file-readable-p timeclock-file)
(timeclock-reread-log))
-;;; arch-tag: a0be3377-deb6-44ec-b9a2-a7be28436a40
;;; timeclock.el ends here
;; Author: Oliver Seidel <os10000@seidel-space.de>
;; [Not clear the above works, July 2000]
;; Created: 2 Aug 1997
-;; Version: $Id: todo-mode.el,v 1.50 2001/12/11 07:36:30 pj Exp $
+;; Version: $Id: todo-mode.el,v 1.49 2001/11/17 04:01:31 rms Exp $
;; Keywords: calendar, todo
;; This file is part of GNU Emacs.
;;
;; Which version of todo-mode.el does this documentation refer to?
;;
-;; $Id: todo-mode.el,v 1.50 2001/12/11 07:36:30 pj Exp $
+;; $Id: todo-mode.el,v 1.49 2001/11/17 04:01:31 rms Exp $
;;
;; Pre-Requisites
;;
(provide 'todo-mode)
-;;; arch-tag: 6fd91be5-776e-4464-a109-da4ea0e4e497
;;; todo-mode.el ends here
(provide 'case-table)
-;;; arch-tag: 3c2cf885-2c9a-449a-9972-2e269191896d
;;; case-table.el ends here
(provide 'cdl)
-;;; arch-tag: b8e95a6e-2387-4077-ad9a-af54b09b8615
;;; cdl.el ends here
(provide 'chistory)
-;;; arch-tag: c201a0cd-89f2-4d39-a532-4cb309391dbd
;;; chistory.el ends here
(provide 'cmuscheme)
-;;; arch-tag: e8795f4a-c496-45a2-97b4-8e0f2a2c57d2
;;; cmuscheme.el ends here
(provide 'comint)
-;;; arch-tag: 1793314c-09db-40be-9549-9aeae3e75164
;;; comint.el ends here
(provide 'compare-w)
-;;; arch-tag: 4177aab1-48e6-4a98-b7a1-000ee285de46
;;; compare-w.el ends here
(provide 'complete)
-;;; arch-tag: fc7e2768-ff44-4e22-b579-4d825b968458
;;; complete.el ends here
(provide 'completion)
-;;; arch-tag: 6990dafe-4abd-4a1f-8c42-ffb25e120f5e
;;; completion.el ends here
(make-obsolete 'decompose-composite-char 'char-to-string "21.1")
\f
-
-;;; arch-tag: ee703d77-1723-45d4-a31f-e9f0f867aa33
;;; composite.el ends here
(kill-emacs))
\f
-
-;;; arch-tag: b7b6421a-bf7a-44fd-a382-6f44976bdf68
;;; cus-dep.el ends here
(defgroup emulations nil
"Emulations of other editors."
- :link '(custom-manual "(emacs)Emulation")
:group 'editing)
(defgroup mouse nil
"Interfacing to external utilities."
:group 'emacs)
+(defgroup bib nil
+ "Code related to the `bib' bibliography processor."
+ :tag "Bibliography"
+ :group 'external)
+
(defgroup processes nil
"Process, subshell, compilation, and job control support."
:group 'external
(defgroup c nil
"Support for the C language and related languages."
- :link '(custom-manual "(ccmode)")
:group 'languages)
(defgroup tools nil
(defgroup news nil
"Support for netnews reading and posting."
- :link '(custom-manual "(gnus)")
:group 'applications)
(defgroup games nil
(defgroup i18n nil
"Internationalization and alternate character-set support."
- :link '(custom-manual "(emacs)International")
:group 'environment
:group 'editing)
(defgroup customize '((widgets custom-group))
"Customization of the Customization support."
:link '(custom-manual "(elisp)Customization")
+ :link '(url-link :tag "(Old?) Development Page"
+ "http://www.dina.kvl.dk/~abraham/custom/")
:prefix "custom-"
:group 'help)
(defgroup abbrev-mode nil
"Word abbreviations mode."
- :link '(custom-manual "(emacs)Abbrevs")
:group 'abbrev)
(defgroup alloc nil
(defgroup undo nil
"Undoing changes in buffers."
- :link '(custom-manual "(emacs)Undo")
:group 'editing)
(defgroup modeline nil
(defgroup fill nil
"Indenting and filling text."
- :link '(custom-manual "(emacs)Filling Text")
:group 'editing)
(defgroup editing-basics nil
(defgroup minibuffer nil
"Controling the behaviour of the minibuffer."
- :link '(custom-manual "(emacs)Minibuffer")
:group 'environment)
(defgroup keyboard nil
(defgroup windows nil
"Windows within a frame."
- :link '(custom-manual "(emacs)Windows")
:group 'environment)
;;; Utilities.
(provide 'cus-edit)
-;;; arch-tag: 64533aa4-1b1a-48c3-8812-f9dc718e8a6f
;;; cus-edit.el ends here
(provide 'cus-face)
-;;; arch-tag: 9a5c4b63-0d27-4c92-a5af-f2c7ed764c2b
;;; cus-face.el ends here
;; syntax.c
(parse-sexp-ignore-comments editing-basics boolean)
(words-include-escapes editing-basics boolean)
- (open-paren-in-column-0-is-defun-start editing-basics boolean
- "21.1")
;; window.c
(temp-buffer-show-function windows (choice (const nil) function))
(display-buffer-function windows (choice (const nil) function))
(line-number-display-limit display
(choice integer
(const :tag "No limit" nil)))
- (line-number-display-limit-width display integer)
(highlight-nonselected-windows display boolean)
(message-log-max debug (choice (const :tag "Disable" nil)
(integer :menu-tag "lines"
(put symbol 'custom-version version)))))
(custom-add-to-group 'iswitchb 'read-buffer-function 'custom-variable)
-(custom-add-to-group 'font-lock 'open-paren-in-column-0-is-defun-start
- 'custom-variable)
(put 'selection-coding-system 'custom-set
(lambda (symbol value)
(set-selection-coding-system value)
(unless purify-flag
(provide 'cus-start))
-;;; arch-tag: 4502730d-bcb3-4f5e-99a3-a86f2d54af60
;;; cus-start.el ends here
(unless (looking-at "\n")
(princ "\n")))))
-;;; arch-tag: cd6919bc-63af-410e-bae2-b6702e762344
;;; cus-theme.el ends here
"Load all dependencies for SYMBOL."
(unless custom-load-recursion
(let ((custom-load-recursion t))
- ;; Load these files if not already done,
- ;; to make sure we know all the dependencies of SYMBOL.
- (condition-case nil
- (require 'cus-load)
- (error nil))
- (condition-case nil
- (require 'cus-start)
- (error nil))
(dolist (load (get symbol 'custom-loads))
(cond ((symbolp load) (condition-case nil (require load) (error nil)))
;; This is subsumed by the test below, but it's much faster.
(provide 'custom)
-;;; arch-tag: 041b6116-aabe-4f9a-902d-74092bc3dab2
;;; custom.el ends here
(provide 'cvs-status)
-;;; arch-tag: db8b5094-d02a-473e-a476-544e89ff5ad0
;;; cvs-status.el ends here
(defun dabbrev--safe-replace-match (string &optional fixedcase literal)
(if (eq major-mode 'picture-mode)
- (with-no-warnings
- (picture-replace-match string fixedcase literal))
+ (picture-replace-match string fixedcase literal)
(replace-match string fixedcase literal)))
;;;----------------------------------------------------------------
(provide 'dabbrev)
-;;; arch-tag: 29e58596-f080-4306-a409-70296cf9d46f
;;; dabbrev.el ends here
(provide 'delim-col)
-;;; arch-tag: 1cc0c5c5-1b2a-43e4-9ba5-bf9441cfd1a9
;;; delim-col.el ends here
(provide 'delsel)
-;;; arch-tag: 1e388890-1b50-4ed0-9347-763b1343b6ed
;;; delsel.el ends here
(provide 'descr-text)
-;;; arch-tag: fc55a498-f3e9-4312-b5bd-98cc02480af1
;;; descr-text.el ends here
;; - buffer-read-only
;; - some local variables
-;; To use this, add these lines to the bottom of your .emacs file:
+;; To use this, first put these two lines in the bottom of your .emacs
+;; file (the later the better):
;;
-;; (require 'desktop)
-;; (setq desktop-enable t)
+;; (desktop-load-default)
+;; (desktop-read)
;;
-;; Between the first two lines you may wish to add something that updates the
+;; Between these two lines you may wish to add something that updates the
;; variables `desktop-globals-to-save' and/or `desktop-locals-to-save'. If
;; for instance you want to save the local variable `foobar' for every buffer
;; in which it is local, you could add the line
;;
-;; (add-to-list 'desktop-locals-to-save 'foobar)
+;; (setq desktop-locals-to-save (cons 'foobar desktop-locals-to-save))
;;
;; To avoid saving excessive amounts of data you may also wish to add
;; something like the following
desktop-enable
(let ((exists (file-exists-p (expand-file-name desktop-base-file-name desktop-dirname))))
(or
- (eq desktop-save t)
+ (eq desktop-save 't)
(and exists (memq desktop-save '(ask-if-new if-exists)))
(and
(or
(provide 'desktop)
-;;; arch-tag: 221907c3-1771-4fd3-9c2e-c6f700c6ede9
;;; desktop.el ends here
;; use `combine-after-change-calls' to minimize the slowdown of font-lock.
;;
-;;; arch-tag: 2571d7ff-bc28-4cf9-8585-42e21890be66
;;; diff-mode.el ends here
(provide 'diff)
-;;; arch-tag: 7de2c29b-7ea5-4b85-9b9d-72dd860de2bd
;;; diff.el ends here
(provide 'dired-aux)
-;;; arch-tag: 4b508de9-a153-423d-8d3f-a1bbd86f4f60
;;; dired-aux.el ends here
;; Author: Sebastian Kremer <sk@thp.uni-koeln.de>
;; Lawrence R. Dodd <dodd@roebling.poly.edu>
-;; Maintainer: nobody (want to volunteer?)
+;; Maintainer: FSF (unless Dodd can be found)
;; Version: 2.37+
;; Date: 1994/08/18 19:27:42
;; Keywords: dired extensions files
;; As Barry Warsaw would say: "This might be useful..."
(provide 'dired-x)
-;;; arch-tag: 71a43ba2-7a00-4793-a028-0613dd7765ae
;;; dired-x.el ends here
;; Note this can't simply be run inside function `dired-ls' as the hook
;; functions probably depend on the dired-subdir-alist to be OK.
-(defcustom dired-view-command-alist
- '(("[.]\\(ps\\|ps_pages\\|eps\\)\\'" . "gv -spartan -color -watch %s")
- ("[.]pdf\\'" . "xpdf %s")
- ("[.]\\(jpe?g\\|gif\\|png\\)\\'" . "eog %s")
- ("[.]dvi\\'" . "xdvi -sidemargin 0.5 -topmargin 1 %s"))
- "Alist specifying how to view special types of files.
-Each element has the form (REGEXP . SHELL-COMMAND).
-When the file name matches REGEXP, `dired-view-file'
-invokes SHELL-COMMAND to view the file, processing it through `format'.
-Use `%s' in SHELL-COMMAND to specify where to put the file name."
- :group 'dired
- :type '(alist :key-type regexp :value-type string)
- :version "21.4")
-
;; Internal variables
(defvar dired-marker-char ?* ; the answer is 42
(set-buffer (window-buffer window))
(goto-char pos)
(setq file (dired-get-file-for-visit)))
- (if (file-directory-p file)
- (or (and (cdr dired-subdir-alist)
- (dired-goto-subdir file))
- (progn
- (select-window window)
- (dired-other-window file)))
- (let (cmd)
- ;; Look for some other way to view a certain file.
- (dolist (elt dired-view-command-alist)
- (if (string-match (car elt) file)
- (setq cmd (cdr elt))))
- (if cmd
- (call-process shell-file-name nil 0 nil
- "-c"
- (concat (format cmd (shell-quote-argument file))
- " &"))
- (select-window window)
- (find-file-other-window (file-name-sans-versions file t)))))))
+ (select-window window)
+ (find-file-other-window (file-name-sans-versions file t))))
+
+(defcustom dired-view-command-alist
+ '(("[.]ps\\'" . "gv -spartan -color -watch")
+ ("[.]pdf\\'" . "xpdf")
+ ("[.]dvi\\'" . "xdvi -sidemargin 0.5 -topmargin 1"))
+ "Alist specifying how to view special types of files.
+Each element has the form (REGEXP . SHELL-COMMAND).
+When the file name matches REGEXP, `dired-view-file'
+invokes SHELL-COMMAND to view the file, putting the file name
+at the end of the command."
+ :group 'dired
+ :type '(alist :key-type regexp :value-type string)
+ :version "21.4")
(defun dired-view-file ()
"In Dired, examine a file in view mode, returning to dired when done.
(if cmd
(call-process shell-file-name nil 0 nil
"-c"
- (concat (format cmd (shell-quote-argument file))
+ (concat cmd " "
+ (shell-quote-argument file)
" &"))
(view-file file))))))
(run-hooks 'dired-load-hook) ; for your customizations
-;;; arch-tag: e1af7a8f-691c-41a0-aac1-ddd4d3c87517
;;; dired.el ends here
(provide 'dirtrack)
-;;; arch-tag: 168de071-be88-4937-aff6-2aba9f328d5a
;;; dirtrack.el ends here
(provide 'disp-table)
-;;; arch-tag: ffe4c28c-960c-47aa-b8a8-ae89d371ffc7
;;; disp-table.el ends here
(provide 'dos-fns)
-;;; arch-tag: 00b03579-8ebb-4a02-8762-5c5a929774ad
;;; dos-fns.el ends here
:type '(hook)
:version "20.3.3")
-;;; arch-tag: dce8a0d9-ab29-413f-84ed-8b89d6190546
;;; dos-vars.el ends here
(provide 'dos-w32)
-;;; arch-tag: dcfefdd2-362f-4fbc-9141-9634f5f4d6a7
;;; dos-w32.el ends here
(provide 'double)
-;;; arch-tag: 2e170036-44cb-4493-bc32-ada0a4395221
;;; double.el ends here
(provide 'ebuff-menu)
-;;; arch-tag: 1d4509b3-eece-4d4f-95ea-77c83eaf0275
;;; ebuff-menu.el ends here
(provide 'echistory)
-;;; arch-tag: 1e5018fe-190f-44a7-9109-a895dcac4c50
;;; echistory.el ends here
;;; End:
-;;; arch-tag: a86d448e-58d7-4572-a1d9-fdedfa22f648
;;; ediff-diff.el ends here
(customize-group "ediff"))
-;;; arch-tag: 05659813-7fcf-4274-964f-d2f577431a9d
;;; ediff-help.el ends here
(provide 'ediff-hook)
-;;; arch-tag: 512f8656-8a4b-4789-af5d-5c6144498df3
;;; ediff-hook.el ends here
(provide 'ediff-init)
-;;; arch-tag: fa31d384-1e70-4d4b-82a7-3e96307c46f5
;;; ediff-init.el ends here
;;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body))
;;; End:
-;;; arch-tag: 9b798cf9-02ba-487f-a62e-b63aa823dbfb
;;; ediff-merg.el ends here
;;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body))
;;; End:
-;;; arch-tag: c8a76898-f96f-4d9c-be9d-129134017188
;;; ediff-mult.el ends here
;;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body))
;;; End:
-;;; arch-tag: 2fe2161e-e116-469b-90fa-5cbb44c1bd1b
;;; ediff-ptch.el ends here
;;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body))
;;; End:
-;;; arch-tag: f51099b6-ef4b-470f-88a1-3a0e0b03a879
;;; ediff-util.el ends here
(provide 'ediff-vers)
-;;; arch-tag: bbb34f0c-2a90-426a-a77a-c75f479ebbbf
;;; ediff-vers.el ends here
;;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body))
;;; End:
-;;; arch-tag: 73d9a5d7-eed7-4d9c-8b4b-21d5d78eb597
;;; ediff-wind.el ends here
(run-hooks 'ediff-load-hook)
-;;; arch-tag: 97c71396-db02-4f41-8b48-6a51c3348fcc
;;; ediff.el ends here
(while (memq (aref rest-mac i) (cdr mdigs))
(incf i))
(and (not (memq (aref rest-mac i) pkeys))
- (prog1 (vconcat "M-" (edmacro-subseq rest-mac 0 i) " ")
+ (prog1 (concat "M-" (edmacro-subseq rest-mac 0 i) " ")
(callf edmacro-subseq rest-mac i)))))
(and (eq (aref rest-mac 0) ?\C-u)
(eq (key-binding [?\C-u]) 'universal-argument)
'(?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9))
(incf i))
(and (not (memq (aref rest-mac i) pkeys))
- (prog1 (vconcat "C-u " (edmacro-subseq rest-mac 1 i) " ")
+ (prog1 (concat "C-u " (edmacro-subseq rest-mac 1 i) " ")
(callf edmacro-subseq rest-mac i)))))))
(bind-len (apply 'max 1
(loop for map in maps
(t
(error "Unrecognized item in macro: %s" ch)))))
(or fkey key) " "))))
- (if prefix
- (setq desc (concat (edmacro-sanitize-for-string prefix) desc)))
+ (if prefix (setq desc (concat prefix desc)))
(unless (string-match " " desc)
(let ((times 1) (pos bind-len))
(while (not (edmacro-mismatch rest-mac rest-mac
(setq i (1+ i) start (1+ start)))
res))))))
-(defun edmacro-sanitize-for-string (seq)
- "Convert a key sequence vector into a string.
-The string represents the same events; Meta is indicated by bit 7.
-This function assumes that the events can be stored in a string."
- (setq seq (copy-sequence seq))
- (loop for i below (length seq) do
- (when (< (aref seq i) 0)
- (setf (aref seq i) (logand (aref seq i) 127))))
- seq)
-
(defun edmacro-fix-menu-commands (macro &optional noerror)
(if (vectorp macro)
(let (result)
(provide 'edmacro)
-;;; arch-tag: 726807b4-3ae6-49de-b0ae-b9590973e0d7
;;; edmacro.el ends here
(provide 'ehelp)
-;;; arch-tag: e0e3037f-42c0-433e-ba18-322c5d951f46
;;; ehelp.el ends here
(provide 'electric)
-;;; arch-tag: dae045eb-dc2d-4fb7-9f27-9cc2ce277be8
;;; electric.el ends here
(provide 'elide-head)
-;;; arch-tag: a00e6b5b-6aeb-45b1-b734-63e23df80928
;;; elide-head.el ends here
(provide 'advice)
-;;; arch-tag: 29f8c9a1-8c88-471f-95d7-e28541c6b7c0
;;; advice.el ends here
(provide 'assoc)
-;;; arch-tag: 3e58bd89-d912-4b74-a0dc-6ed9735922bc
;;; assoc.el ends here
(authors root)
(write-file file)))
-;;; arch-tag: 659d5900-5ff2-43b0-954c-a315cc1e4dc1
;;; authors.el ends here
(provide 'autoload)
-;;; arch-tag: 00244766-98f4-4767-bf42-8a22103441c6
;;; autoload.el ends here
tail))
(t (cons 'list heads)))))
-;;; arch-tag: 1a26206a-6b5e-4c56-8e24-2eef0f7e0e7a
;;; backquote.el ends here
(nth 2 result) (nth 1 result)))))
(provide 'benchmark)
-
-;;; arch-tag: be570e24-4b51-4784-adf3-fa2b56c31946
;;; benchmark.el ends here
(provide 'bindat)
-;;; arch-tag: 5e6708c3-03e2-4ad7-9885-5041b779c3fb
;;; bindat.el ends here
byte-optimize-lapcode))))
nil)
-;;; arch-tag: 0f14076b-737e-4bef-aae6-908826ec1ff1
;;; byte-opt.el ends here
;; (file-format emacs19))"
;; nil)
-;;; arch-tag: 76f8328a-1f66-4df2-9b6d-5c3666dc05e9
;;; byte-run.el ends here
;;; This version incorporates changes up to version 2.10 of the
;;; Zawinski-Furuseth compiler.
-(defconst byte-compile-version "$Revision: 2.136 $")
+(defconst byte-compile-version "$Revision: 2.134 $")
;; This file is part of GNU Emacs.
(const callargs) (const redefine)
(const obsolete) (const noruntime) (const cl-functions))))
-(defvar byte-compile-not-obsolete-var nil
- "If non-nil, this is a variable that shouldn't be reported as obsolete.")
-
(defcustom byte-compile-generate-call-tree nil
"*Non-nil means collect call-graph information when compiling.
This records functions were called and from where.
;; Also log the current function and file if not already done.
(defun byte-compile-log-warning (string &optional fill level)
(let ((warning-prefix-function 'byte-compile-warning-prefix)
- (warning-type-format "")
+ (warning-group-format "")
(warning-fill-prefix (if fill " ")))
(display-warning 'bytecomp string level "*Compile-Log*")))
(if (symbolp var) "constant" "nonvariable")
(prin1-to-string var))
(if (and (get var 'byte-obsolete-variable)
- (memq 'obsolete byte-compile-warnings)
- (not (eq var byte-compile-not-obsolete-var)))
+ (memq 'obsolete byte-compile-warnings))
(let* ((ob (get var 'byte-obsolete-variable))
(when (cdr ob)))
(byte-compile-warn "%s is an obsolete variable%s; %s" var
fun var string))
`(put ',var 'variable-documentation ,string))
(if (cddr form) ; `value' provided
- (let ((byte-compile-not-obsolete-var var))
- (if (eq fun 'defconst)
- ;; `defconst' sets `var' unconditionally.
- (let ((tmp (make-symbol "defconst-tmp-var")))
- `(funcall '(lambda (,tmp) (defconst ,var ,tmp))
- ,value))
- ;; `defvar' sets `var' only when unbound.
- `(if (not (default-boundp ',var)) (setq-default ,var ,value))))
+ (if (eq fun 'defconst)
+ ;; `defconst' sets `var' unconditionally.
+ (let ((tmp (make-symbol "defconst-tmp-var")))
+ `(funcall '(lambda (,tmp) (defconst ,var ,tmp))
+ ,value))
+ ;; `defvar' sets `var' only when unbound.
+ `(if (not (default-boundp ',var)) (setq-default ,var ,value)))
(when (eq fun 'defconst)
;; This will signal an appropriate error at runtime.
`(eval ',form)))
(run-hooks 'bytecomp-load-hook)
-;;; arch-tag: 9c97b0f0-8745-4571-bfc3-8dceb677292a
;;; bytecomp.el ends here
(provide 'checkdoc)
-;;; arch-tag: c49a7ec8-3bb7-46f2-bfbc-d5f26e033b26
;;; checkdoc.el ends here
(provide 'cl-compat)
-;;; arch-tag: 9996bb4f-aaf5-4592-b436-bf64759a3163
;;; cl-compat.el ends here
(run-hooks 'cl-extra-load-hook)
-;;; arch-tag: bcd03437-0871-43fb-a8f1-ad0e0b5427ed
;;; cl-extra.el ends here
;(put 'defclass 'common-lisp-indent-function '((&whole 2 &rest (&whole 2 &rest 1) &rest (&whole 2 &rest 1)))
;(put 'defgeneric 'common-lisp-indent-function 'defun)
-;;; arch-tag: 7914d50f-92ec-4476-93fc-0f043a380e03
;;; cl-indent.el ends here
;;; byte-compile-warnings: (redefine callargs free-vars unresolved obsolete noruntime)
;;; End:
-;;; arch-tag: afd947a6-b553-4df1-bba5-000be6388f46
;;; cl-macs.el ends here
(run-hooks 'cl-seq-load-hook)
-;;; arch-tag: ec1cc072-9006-4225-b6ba-d6b07ed1710c
;;; cl-seq.el ends here
;; LCD Archive Entry:
;; cl-specs.el|Daniel LaLiberte|liberte@holonexus.org
;; |Edebug specs for cl.el
-;; |$Date: 2003/06/16 16:27:27 $|1.1|
+;; |$Date: 2003/02/04 12:53:34 $|1.1|
;; This file is part of GNU Emacs.
(def-edebug-spec loop-d-type-spec
(&or (loop-d-type-spec . [&or nil loop-d-type-spec]) cl-type-spec))
-;;; arch-tag: b29aa3c2-cf67-4af8-9ee1-318fea61b478
;;; cl-specs.el ends here
(run-hooks 'cl-load-hook)
-;;; arch-tag: 5f07fa74-f153-4524-9303-21f5be125851
;;; cl.el ends here
:type '(choice (integer :tag "Limit")
(const :tag "No limit")))
-;; The character classes have the Latin-1 version and the Latin-9
-;; version, which is probably enough.
+;; Would it be cleaner to specify Latin-1 coding for this file,
+;; and not use both unibyte and multibyte copyright symbol characters?
+
+;; The character classes include the unibyte (C) sign,
+;; the Latin-1 version, and the Latin-9 version.
(defcustom copyright-regexp
"\\([\81©\8e©]\\|@copyright{}\\|[Cc]opyright\\s *:?\\s *\\(?:(C)\\)?\
\\|[Cc]opyright\\s *:?\\s *[\81©\8e©]\\)\
;; coding: emacs-mule
;; End:
-;;; arch-tag: b4991afb-b6b1-4590-bebe-e076d9d4aee8
;;; copyright.el ends here
(provide 'crm)
-;;; arch-tag: db1911d9-86c6-4a42-b32a-4910701b15a6
;;; crm.el ends here
(provide 'cust-print)
-;;; arch-tag: 3a5a8650-622c-48c4-87d8-e01bf72ec580
;;; cust-print.el ends here
(provide 'debug)
-;;; arch-tag: b6ec7047-f801-4103-9c63-d69322db9d3b
;;; debug.el ends here
(provide 'derived)
-;;; arch-tag: 630be248-47d1-4f02-afa0-8207de0ebea0
;;; derived.el ends here
(provide 'disass)
-;;; arch-tag: 89482fe4-a087-4761-8dc6-d771054e763a
;;; disass.el ends here
(provide 'easy-mmode)
-;;; arch-tag: d48a5250-6961-4528-9cb0-3c9ea042a66a
;;; easy-mmode.el ends here
(provide 'easymenu)
-;;; arch-tag: 2a04020d-90d2-476d-a7c6-71e072007a4a
;;; easymenu.el ends here
(provide 'edebug)
-;;; arch-tag: 19c8d05c-4554-426e-ac72-e0fa1fcb0808
;;; edebug.el ends here
;; Keywords: extensions
;; Created: 1995-10-06
-;; $Id: eldoc.el,v 1.25 2003/05/06 17:36:16 lektu Exp $
+;; $Id: eldoc.el,v 1.24 2003/02/11 00:11:55 monnier Exp $
;; This file is part of GNU Emacs.
(provide 'eldoc)
-;;; arch-tag: c9a58f9d-2055-46c1-9b82-7248b71a8375
;;; eldoc.el ends here
(provide 'elint)
-;;; arch-tag: b2f061e2-af84-4ddc-8e39-f5e969ac228f
;;; elint.el ends here
\f
(provide 'elp)
-;;; arch-tag: c4eef311-9b3e-4bb2-8a54-3485d41b4eb1
;;; elp.el ends here
;;; eval: (put 'ewoc--set-buffer-bind-dll-let* 'lisp-indent-hook 2)
;;; End:
-;;; arch-tag: d78915b9-9a07-44bf-aac6-04a1fc1bd6d4
;;; ewoc.el ends here
(provide 'find-func)
-;;; arch-tag: 43ecd81c-74dc-4d9a-8f63-a61e55670d64
;;; find-func.el ends here
(provide 'find-gc)
-;;; arch-tag: 4a26a538-a008-40d9-a1ef-23bb6dbecef4
;;; find-gc.el ends here
(provide 'lisp-float-type)
-;;; arch-tag: e7837072-a4af-4d08-9953-8a3e755abf9d
;;; float-sup.el ends here
(provide 'gulp)
-;;; arch-tag: 42750a11-460a-4efc-829f-342d075530e5
;;; gulp.el ends here
(provide 'helper)
-;;; arch-tag: a0984577-d3e9-4124-ae0d-c46fe740f6a9
;;; helper.el ends here
(provide 'levents)
-;;; arch-tag: a80c21da-69d7-46de-9cdb-5f68577b5525
;;; levents.el ends here
(provide 'lisp-mnt)
-;;; arch-tag: fa3c5ab4-a37b-4e46-b7cf-b6d78b90e69e
;;; lisp-mnt.el ends here
(set-syntax-table lisp-mode-syntax-table)
(run-mode-hooks 'lisp-mode-hook))
-;; Used in old LispM code.
-(defalias 'common-lisp-mode 'lisp-mode)
-
;; This will do unless inf-lisp.el is loaded.
(defun lisp-eval-defun (&optional and-go)
"Send the current defun to the Lisp process made by \\[run-lisp]."
expr
'args)))))
expr)))))))
- (eval-last-sexp-print-value value))))
-
-(defun eval-last-sexp-print-value (value)
- (let ((unabbreviated (let ((print-length nil) (print-level nil))
- (prin1-to-string value)))
- (print-length eval-expression-print-length)
- (print-level eval-expression-print-level)
- (char-string (prin1-char value))
- (beg (point))
- end)
- (prog1
- (prin1 value)
- (if (and (eq standard-output t) char-string)
- (princ (concat " = " char-string)))
- (setq end (point))
- (when (and (bufferp standard-output)
- (or (not (null print-length))
- (not (null print-level)))
- (not (string= unabbreviated
- (buffer-substring-no-properties beg end))))
- (last-sexp-setup-props beg end value
- unabbreviated
- (buffer-substring-no-properties beg end))
- ))))
+ (let ((unabbreviated (let ((print-length nil) (print-level nil))
+ (prin1-to-string value)))
+ (print-length eval-expression-print-length)
+ (print-level eval-expression-print-level)
+ (char-string (prin1-char value))
+ (beg (point))
+ end)
+ (prog1
+ (prin1 value)
+ (if (and (eq standard-output t) char-string)
+ (princ (concat " = " char-string)))
+ (setq end (point))
+ (when (and (bufferp standard-output)
+ (or (not (null print-length))
+ (not (null print-level)))
+ (not (string= unabbreviated
+ (buffer-substring-no-properties beg end))))
+ (last-sexp-setup-props beg end value
+ unabbreviated
+ (buffer-substring-no-properties beg end))
+ ))))))
(defun eval-last-sexp (eval-last-sexp-arg-internal)
(provide 'lisp-mode)
-;;; arch-tag: 414c7f93-c245-4b77-8ed5-ed05ef7ff1bf
;;; lisp-mode.el ends here
if defining `defun-prompt-regexp' is not sufficient to handle the mode's
needs.
-The function (of no args) should go to the line on which the current
-defun starts, and return non-nil, or should return nil if it can't
-find the beginning.")
+The function should go to the line on which the current defun starts,
+and return non-nil, or should return nil if it can't find the beginning.")
(defun beginning-of-defun (&optional arg)
"Move backward to the beginning of a defun.
(display-completion-list list)))
(message "Making completion list...%s" "done")))))))
-;;; arch-tag: aa7fa8a4-2e6f-4e9b-9cd9-fef06340e67e
;;; lisp.el ends here
\f
(provide 'lmenu)
-;;; arch-tag: 7051c396-2837-435a-ae11-b2d2e2af8fc1
;;; lmenu.el ends here
(provide 'lselect)
-;;; arch-tag: 92fa54d4-c5d1-4e9b-ad58-cf1e13930556
;;; lselect.el ends here
(provide 'lucid)
-;;; arch-tag: 80f9ab46-0b36-4151-86ed-3edb6d449c9e
;;; lucid.el ends here
;; Return the number of actions that were taken.
actions))
-;;; arch-tag: 1d0a3201-a151-4c10-b231-4da47c9e6dc3
;;; map-ynp.el ends here
(provide 'pp) ; so (require 'pp) works
-;;; arch-tag: b0f7c65b-02c7-42bb-9ee3-508a59b8fbb9
;;; pp.el ends here
(provide 're-builder)
-;;; arch-tag: 5c5515ac-4085-4524-a421-033f44f032e7
;;; re-builder.el ends here
(provide 'regexp-opt)
-;;; arch-tag: 6c5a66f4-29af-4fd6-8c3b-4b554d5b4370
;;; regexp-opt.el ends here
\f
(provide 'regi)
-;;; arch-tag: 804b4e45-4109-4f76-9a88-21887b881747
;;; regi.el ends here
(provide 'ring)
-;;; arch-tag: e707682b-ed69-47c9-b20f-cf2c68cc92d2
;;; ring.el ends here
(provide 'rx)
-;;; arch-tag: 12d01a63-0008-42bb-ab8c-1c7d63be370b
;;; rx.el ends here
(provide 'shadow)
-;;; arch-tag: 0480e8a7-62ed-4a12-a9f6-f44ded9b0830
;;; shadow.el ends here
(provide 'sregex)
-;;; arch-tag: 460c1f5a-eb6e-42ec-a451-ffac78bdf492
;;; sregex.el ends here
;; (syntax-ppss-depth (syntax-ppss))))
(provide 'syntax)
-
-;;; arch-tag: 302f1eeb-e77c-4680-a8c5-c543e01161a5
;;; syntax.el ends here
+++ /dev/null
-;;;; testcover-ses.el -- Example use of `testcover' to test "SES"
-
-;; Copyright (C) 2002 Free Software Foundation, Inc.
-
-;; Author: Jonathan Yavner <jyavner@engineer.com>
-;; Maintainer: Jonathan Yavner <jyavner@engineer.com>
-;; Keywords: spreadsheet lisp utility
-
-;; GNU Emacs is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-
-;; GNU Emacs is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-
-(require 'testcover)
-
-;;;Here are some macros that exercise SES. Set `pause' to t if you want the
-;;;macros to pause after each step.
-(let* ((pause nil)
- (x (if pause "\18q" ""))
- (y "\18\ 6ses-test.ses\r\e<"))
- ;;Fiddle with the existing spreadsheet
- (fset 'ses-exercise-example
- (concat "\18\ 6" data-directory "ses-example.ses\r\e<"
- x "\1510\ e"
- x "\v"
- x "\1f"
- x "\10\10\ 6pses-center\r"
- x "\ 6p\r"
- x "\15\10\t\t"
- x "\r\ 2 A9 B9\r"
- x "\15\ e\ 2\ 2\ 2"
- x "\r\ 1\v2\r"
- x "\ e\ e\ 6"
- x "50\r"
- x "\154\1f"
- x "\ 3\e\f"
- x "\1f"
- x "(+ \18o\ e\ e\ 6\0\ 6\ 6"
- x "\15-1\18o\ 3\12 \ 3\13\r\ 2"
- x "\1f"
- x))
- ;;Create a new spreadsheet
- (fset 'ses-exercise-new
- (concat y
- x "\ 3\10\"%.8g\"\r"
- x "2\r"
- x "\ f"
- x "\10"
- x "\152\ f"
- x "\"Header\r"
- x "(sqrt 1\r\ 2"
- x "pses-center\r\ 6"
- x "\t"
- x "\10(+ A2 A3\r"
- x "\ 6(* B2 A3\r"
- x "\152\ 3\e\b"
- x "\r\7f\7f\7fB3\r"
- x "\18\13"
- x))
- ;;Basic cell display
- (fset 'ses-exercise-display
- (concat y "\e:(revert-buffer t t)\r"
- x "\ 5"
- x "\"Very long\r\ 2"
- x "w3\r"
- x "w3\r"
- x "(/ 1 0\r\ 2"
- x "234567\r\ 2"
- x "\155w"
- x "\t1\r\ 2"
- x "\ 2\ 3\ 3"
- x "\ 6234567\r\ 2"
- x "\t\ 4\ 2"
- x "\ 2\ 3\ 3"
- x "345678\r\ 2"
- x "\153w"
- x "\0\e>"
- x "\ 3\ 3"
- x "\18\18"
- x "\ 5"
- x "\18\18\ 1"
- x "\ 5"
- x "\ 6\ 5"
- x "\ 3\ 3"
- x "1\r\ 2"
- x "\ 3\ 3\ 6"
- x "\ 5"
- x "\ 2\ 2\ 2\"1234567-1234567-1234567\r\ 2"
- x "123\r\ 2"
- x "\152\ f"
- x "\ e\"1234567-1234567-1234567\r\ 2"
- x "123\r\ 2"
- x "\ 6\ 6w8\r"
- x "\ 2\ 2\"1234567\r"
- x "\ e\ 2w5\r"
- x))
- ;;Cell formulas
- (fset 'ses-exercise-formulas
- (concat y "\e:(revert-buffer t t)\r"
- x "\t\t"
- x "\t"
- x "(* B1 B2 D1\r\ 2"
- x "(* B2 B3\r\ 2"
- x "\ e(apply '+ (ses-range B1 B3)\r\ 2"
- x "(apply 'ses+ (ses-range B1 B3)\r\ 2"
- x "\ e(apply 'ses+ (ses-range A2 A3)\r\ 2"
- x "\ e(mapconcat'number-to-string(ses-range B2 B4) \"-\"\r\ 2"
- x "\ 2(apply 'concat (reverse (ses-range A3 D3))\r\ 2"
- x "\ 2(* (+ A2 A3) (ses+ B2 B3)\r\ 2"
- x "\ e"
- x "\152\ f"
- x "\155\t"
- x "\10(apply 'ses+ (ses-range E1 E2)\r\ 2"
- x "\10(apply 'ses+ (ses-range A5 B5)\r\ 2"
- x "\10(apply 'ses+ (ses-range E1 F1)\r\ 2"
- x "\10(apply 'ses+ (ses-range D1 E1)\r\ 2"
- x "\t"
- x "(ses-average (ses-range A2 A5)\r\ 2"
- x "\ e(apply 'ses+ (ses-range A5 A6)\r\ 2"
- x "\ 2\ 2\ek"
- x "\ e\ e\v"
- x "\10\10\10\ f"
- x "\ e\152\ f"
- x "\10\153\v"
- x "\ 2\ 2\ 2\eo"
- x "\ 6\152\eo"
- x "\ 2\153\ek"
- x "\ 6(ses-average (ses-range B3 E3)\r\ 2"
- x "\ 2\ek"
- x "\ e\1012345678\r\ 2"
- x))
- ;;Recalculating and reconstructing
- (fset 'ses-exercise-recalc
- (concat y "\e:(revert-buffer t t)\r"
- x "\ 3\e\f"
- x "\t\t"
- x "\ 3\ 3"
- x "(/ 1 0\r\ 2"
- x "\ 3\ 3"
- x "\n"
- x "\ 3\ 3"
- x "\ 3\10\"%.6g\"\r"
- x "\ 3\e\f"
- x "\e>\18nw\ 6\ 6\ 6"
- x "\0\e>\exdelete-region\r"
- x "\ 3\e\f"
- x "\158\ e"
- x "\0\e>\exdelete-region\r"
- x "\ 3\e\f"
- x "\ 3\ e"
- x "\ e\v\ 2\ek"
- x "\ 3\f"
- x "\ 2\"Very long\r"
- x "\10\ 3\14"
- x "\ 2\r\r"
- x "\ e\ 3\14"
- x "\ 6\eo"
- x "\ 6\ 3\14"
- x "\ 2\ 2\"Very long2\r"
- x "\ 2\eo\ 6"
- x "\ 3\14"
- x "\r\7f\7f\7fC3\r"
- x "\ e\r\7f\7f\7fC2\r"
- x "\10\0\ e\ 6\ 3\ 3"
- x "\r\7f\7fC4\r"
- x "\ e\ e\r\7f\7f\7fC2\r"
- x "\ 6\0\ 2\10\10"
- x "\ 3\ 3"
- x "\exses-mode\r"
- x "\e<\ f"
- x "\152\ek"
- x))
- ;;Header line
- (fset 'ses-exercise-header-row
- (concat y "\e:(revert-buffer t t)\r"
- x "\18<"
- x "\18>"
- x "\156\18<"
- x "\18>"
- x "\157\18<"
- x "\18>"
- x "\158\18<"
- x "\152\18<"
- x "\18>"
- x "\ 6\153w\ 2"
- x "\1510\18<"
- x "\18>"
- x "\152\v"
- x))
- ;;Detecting unsafe formulas and printers
- (fset 'ses-exercise-unsafe
- (concat y "\e:(revert-buffer t t)\r"
- x "p(lambda (x) (delete-file x))\rn"
- x "p(lambda (x) (delete-file \"ses-nothing\"))\ry"
- x "\0\ 6\17\19n"
- x "\ e(delete-file \"x\"\rn"
- x "(delete-file \"ses-nothing\"\ry\ 2"
- x "\0\ 6\17\19n"
- x "(open-network-stream \"x\" nil \"localhost\" \"smtp\"\ry\ 2"
- x "\0\ 6\17\19n"
- x))
- ;;Inserting and deleting rows
- (fset 'ses-exercise-rows
- (concat y "\e:(revert-buffer t t)\r"
- x "\ e\ 6"
- x "\ 3\10\"%s=\"\r"
- x "\1520\ f"
- x "\ep\"%s+\"\r"
- x "\ e\ f"
- x "123456789\r\ 2"
- x "\0\1521\ e\ 6"
- x "\ 3\ 3"
- x "\e\f"
- x "\10\10(not B25\r\ 2"
- x "\ e\ek"
- x "jA3\r"
- x "\1519\v"
- x "\10\ 6\v"
- x "\15100\ f" ;Make this approx your CPU speed in MHz
- x))
- ;;Inserting and deleting columns
- (fset 'ses-exercise-columns
- (concat y "\e:(revert-buffer t t)\r"
- x "\ 3\10\"%s@\"\r"
- x "\eo"
- x "\ f"
- x "\eo"
- x "\v"
- x "\ek"
- x "w8\r"
- x "\ep\"%.7s*\"\r"
- x "\eo"
- x "\ 6"
- x "\152\eo"
- x "\153\ek"
- x "\ 3\10\"%.6g\"\r"
- x "\1526\eo"
- x "\0\1526\t"
- x "\1526\eo"
- x "\ 3\e\b0\r"
- x "\1526\t"
- x "\15400\ 2"
- x "\1550\ek"
- x "\0\ e\ e\ 6\ 6\ 3\e\13D"
- x))
- (fset 'ses-exercise-editing
- (concat y "\e:(revert-buffer t t)\r"
- x "\ e\ e\ e1\r\ 2"
- x "\ 6(\ 2'\ 6x\r\ 2"
- x "\ 2\10\10\10\ f"
- x "\1f"
- x "\r\r"
- x "w9\r"
- x "\ e\r\ 2.5\r"
- x "\ e\ 6\r\ 2 10\r"
- x "w12\r"
- x "\r\ 1'\r"
- x "\r\ 1\ 4\r"
- x "jA4\r"
- x "(+ A2 100\r\ 2"
- x "\10\103\r\ 2"
- x "jB1\r"
- x "(not A1\r\ 2"
- x "\ 2\"Very long\r\ 2"
- x "\ 3\ 3"
- x "\eh"
- x "\eH"
- x "\ 3\ 3"
- x "\e>\t"
- x "\10\10\ 4"
- x "\10\ 4"
- x "\ 6\ 6\152\7f"
- x "\10\7f"
- x "\eo"
- x "\eh"
- x "\0\ f\ 6"
- x "\"Also very long\r\ 2"
- x "\ e\ 6\eH"
- x "\0'\r\ 2"
- x "'Trial\r\ 2"
- x "\ e\ 2'qwerty\r\ 2"
- x "\ 6(concat \18o\e<\0\ e\ e"
- x "\15-1\18o\ 3\12\r\ 2"
- x "(apply '+ \18o\e<\0\ e\ 6\15-1\18o\ 3\13\r\ 2"
- x "\10\152\7f"
- x "\15-2\7f"
- x "\15-2\ 4"
- x "\152\ 4"
- x "\ 2\10\10\v"
- x "\ e\ 6\eH"
- x "\ 2\10\0\ f"
- x "\"Another long one\r\ 2"
- x "\ e\ e\ 6\eH"
- x "\ 1\10\ 5"
- x "\ 3\ 3\e<"
- x "\ e\ 5"
- x "\e>\10\ f"
- x "\0\ 5\ 6\ 5"
- x))
- ;;Sorting of columns
- (fset 'ses-exercise-sort-column
- (concat y "\e:(revert-buffer t t)\r"
- x "\"Very long\r"
- x "\ 699\r"
- x "\ 6\eo13\r"
- x "(+ A3 B3\r"
- x "7\r8\r(* A4 B4\r"
- x "\0\10\10\10\ 3\e\13A\r"
- x "\ e\0\10\10\10\ 3\e\13B\r"
- x "\10\10\ 6\0\ e\ e\ 6\ 6\ 3\e\13C\r"
- x "\ 6\eo\10\ f"
- x "\ 2\0\ e\ e\ e\15\ 3\e\13C\r"
- x))
- ;;Simple cell printers
- (fset 'ses-exercise-cell-printers
- (concat y "\e:(revert-buffer t t)\r"
- x "\ 6\"4\11\t76\r\ 2"
- x "\"4\11\n7\r\ 2"
- x "p\"{%S}\"\r"
- x "p(\"[%s]\")\r"
- x "p(\"<%s>\")\r"
- x "\ 2\0\ 6\ 6"
- x "p\r"
- x "pnil\r"
- x "pses-dashfill\r"
- x "48\r\ 2"
- x "\t"
- x "\ 2\0\ 6p\r"
- x "\ 6p\r"
- x "pses-dashfill\r"
- x "\ 2\0\ 6\ 6pnil\r"
- x "5\r\ 2"
- x "pses-center\r"
- x "\ 3\10\"%s\"\r"
- x "w8\r"
- x "\ep\r"
- x "\ep\"%.7g@\"\r"
- x "\ 3\10\r"
- x "\ 3\10\"%.6g#\"\r"
- x "\ 3\10\"%.6g.\"\r"
- x "\ 3\10\"%.6g.\"\r"
- x "\epidentity\r"
- x "6\r\ 2"
- x "\ e\"UPCASE\r\ 2"
- x "\epdowncase\r"
- x "(* 3 4\r\ 2"
- x "p(lambda\11 (x)\11 '(\"Hi\"))\r"
- x "p(lambda\11 (x)\11 '(\"Bye\"))\r"
- x))
- ;;Spanning cell printers
- (fset 'ses-exercise-spanning-printers
- (concat y "\e:(revert-buffer t t)\r"
- x "\ep\"%.6g*\"\r"
- x "pses-dashfill-span\r"
- x "5\r\ 2"
- x "pses-tildefill-span\r"
- x "\"4\r\ 2"
- x "\ep\"$%s\"\r"
- x "\ep(\"$%s\")\r"
- x "8\r\ 2"
- x "\ep(\"!%s!\")\r"
- x "\t\"12345678\r\ 2"
- x "pses-dashfill-span\r"
- x "\"23456789\r\ 2"
- x "\t"
- x "(not t\r\ 2"
- x "\ 2w6\r"
- x "\"5\r\ 2"
- x "\ e\ 6\eo"
- x "\ek"
- x "\ek"
- x "\t"
- x "\ 2\10\ 3\ 3"
- x "\eo"
- x "\ e\152\ek"
- x "\ 2\ 2\ek"
- x))
- ;;Cut/copy/paste - within same buffer
- (fset 'ses-exercise-paste-1buf
- (concat y "\e:(revert-buffer t t)\r"
- x "\ e\0\ 6\ew"
- x "\ 3\ 3\10\ 6\19"
- x "\ e\eo"
- x "\"middle\r\ 2"
- x "\0\ 6\ e\ 6"
- x "\ew"
- x "\10\0\ 6"
- x "\ew"
- x "\ 3\ 3\ 6\ e"
- x "\19"
- x "\152\19y"
- x "\ 6\15\19y"
- x "\10\10\ 6\15\19y"
- x "\e>"
- x "\19y"
- x "\e>\19y"
- x "\e<"
- x "p\"<%s>\"\r"
- x "\ 6pses-dashfill\r"
- x "\ 2\0\ 6\ 6\ 6\ e\ e\ e"
- x "\17"
- x "\1f"
- x "\15\19y"
- x "\r\0\ 2\ 2\ 2\ew"
- x "\r\ 6\19"
- x "\153\10(+ G2 H1\r"
- x "\0\ 2\ew"
- x "\ 3\ 3\e>\ 2"
- x "\19"
- x "\ 2\158\10(ses-average (ses-range G2 H2)\r\ 2"
- x "\0\ 6\17\ek"
- x "\157\ e"
- x "\19"
- x "\10\ 2(ses-average (ses-range E7 E9)\r\ 2"
- x "\0\ 6\17\v"
- x "\ e\19"
- x "\ 2\ 2\10(ses-average (ses-range E7 F7)\r\ 2"
- x "\0\ 6\17\ek"
- x "\ 6\19"
- x "\ 2\ 2\10(ses-average (ses-range D6 E6)\r\ 2"
- x "\0\ 6\17\ek"
- x "\ 6\19"
- x "\ 1\152\ f"
- x "\"Line A\r\ 2"
- x "pses-tildefill-span\r"
- x "\ e\ 6\"Subline A(1)\r\ 2"
- x "pses-dashfill-span\r"
- x "\ 2\10\0\ e\ e\ e\ew\ 3\ 3"
- x "\ 1\10\10\10\10\10\10"
- x "\19"
- x "\0\ e\ 6\ 6\ew\ 3\ 3"
- x "\ 6\19"
- x))
- ;;Cut/copy/paste - between two buffers
- (fset 'ses-exercise-paste-2buf
- (concat y "\e:(revert-buffer t t)\r"
- x "\ 6\ e\eo\"middle\r\ 2\0\ 6\ e\ 6"
- x "\17"
- x "\184bses-test.txt\r"
- x " \ 1\19"
- x "\ 5\"xxx\0\ 2\ 2\ 2\ 2"
- x "\ew\18o"
- x "\1f"
- x "\19"
- x "\18o\ 5\"\0\ 2\ 2\ 2\ 2\ 2"
- x "\ew\18o\19"
- x "\18o123.45\0\ 2\ 2\ 2\ 2\ 2\ 2"
- x "\17\18o\19"
- x "\18o1 \ 2\ 2\0\ 6\ 6\ 6\ 6\ 6\ 6\ 6"
- x "\17\18o\19"
- x "\e>\19y"
- x "\ 6\18o symb\0\ 2\ 2\ 2\ 2"
- x "\17\18o\15\19\ey\152\ey"
- x "\18o1\t\0\ 2\ 2"
- x "\17\18o\ 2\19"
- x "w9\n\ep\"<%s>\"\n"
- x "\18o\n2\t\"3\nxxx\t5\n\0\10\10"
- x "\17\18o\19y"
- x))
- ;;Export text, import it back
- (fset 'ses-exercise-import-export
- (concat y "\e:(revert-buffer t t)\r"
- x "\ e\ e\ 6\0\ 6xt"
- x "\184bses-test.txt\r"
- x "\n\19\15-1\18o"
- x "xT\18o\19\15-1\18o"
- x "\ 3\ 3\ 6'crunch\r\ 2"
- x "\10\10\10pses-center-span\r"
- x "\0\ e\ e\ e\ exT"
- x "\18o\n\19\15-1\18o"
- x "\0\19y"
- x "\ 6\0\ 2\10\10xt"
- x "\ e\ e\0\15\19y"
- x "12345678\r\ 2"
- x "\ 6\ 6'bunch\r"
- x "\0\10\10xtxT"
- x)))
-
-(defun ses-exercise-macros ()
- "Executes all SES coverage-test macros."
- (dolist (x '(ses-exercise-example
- ses-exercise-new
- ses-exercise-display
- ses-exercise-formulas
- ses-exercise-recalc
- ses-exercise-header-row
- ses-exercise-unsafe
- ses-exercise-rows
- ses-exercise-columns
- ses-exercise-editing
- ses-exercise-sort-column
- ses-exercise-cell-printers
- ses-exercise-spanning-printers
- ses-exercise-paste-1buf
- ses-exercise-paste-2buf
- ses-exercise-import-export))
- (message "<Testing %s>" x)
- (execute-kbd-macro x)))
-
-(defun ses-exercise-signals ()
- "Exercise code paths that lead to error signals, other than those for
-spreadsheet files with invalid formatting."
- (message "<Checking for expected errors>")
- (switch-to-buffer "ses-test.ses")
- (deactivate-mark)
- (ses-jump 'A1)
- (ses-set-curcell)
- (dolist (x '((ses-column-widths 14)
- (ses-column-printers "%s")
- (ses-column-printers ["%s" "%s" "%s"]) ;Should be two
- (ses-column-widths [14])
- (ses-delete-column -99)
- (ses-delete-column 2)
- (ses-delete-row -1)
- (ses-goto-data 'hogwash)
- (ses-header-row -56)
- (ses-header-row 99)
- (ses-insert-column -14)
- (ses-insert-row 0)
- (ses-jump 'B8) ;Covered by preceding cell
- (ses-printer-validate '("%s" t))
- (ses-printer-validate '([47]))
- (ses-read-header-row -1)
- (ses-read-header-row 32767)
- (ses-relocate-all 0 0 -1 1)
- (ses-relocate-all 0 0 1 -1)
- (ses-select (ses-range A1 A2) 'x (ses-range B1 B1))
- (ses-set-cell 0 0 'hogwash nil)
- (ses-set-column-width 0 0)
- (ses-yank-cells #("a\nb"
- 0 1 (ses (A1 nil nil))
- 2 3 (ses (A3 nil nil)))
- nil)
- (ses-yank-cells #("ab"
- 0 1 (ses (A1 nil nil))
- 1 2 (ses (A2 nil nil)))
- nil)
- (ses-yank-pop nil)
- (ses-yank-tsf "1\t2\n3" nil)
- (let ((curcell nil)) (ses-check-curcell))
- (let ((curcell 'A1)) (ses-check-curcell 'needrange))
- (let ((curcell '(A1 . A2))) (ses-check-curcell 'end))
- (let ((curcell '(A1 . A2))) (ses-sort-column "B"))
- (let ((curcell '(C1 . D2))) (ses-sort-column "B"))
- (execute-kbd-macro "jB10\n\152\ 4")
- (execute-kbd-macro [?j ?B ?9 ?\n ?\C-@ ?\C-f ?\C-f cut])
- (progn (kill-new "x") (execute-kbd-macro "\e>\19n"))
- (execute-kbd-macro "\ 2\0\ew")))
- (condition-case nil
- (progn
- (eval x)
- (signal 'singularity-error nil)) ;Shouldn't get here
- (singularity-error (error "No error from %s?" x))
- (error nil)))
- ;;Test quit-handling in ses-update-cells. Cant' use `eval' here.
- (let ((inhibit-quit t))
- (setq quit-flag t)
- (condition-case nil
- (progn
- (ses-update-cells '(A1))
- (signal 'singularity-error nil))
- (singularity-error (error "Quit failure in ses-update-cells"))
- (error nil))
- (setq quit-flag nil)))
-
-(defun ses-exercise-invalid-spreadsheets ()
- "Execute code paths that detect invalid spreadsheet files."
- ;;Detect invalid spreadsheets
- (let ((p&d "\n\n\f\n(ses-cell A1 nil nil nil nil)\n\n")
- (cw "(ses-column-widths [7])\n")
- (cp "(ses-column-printers [ses-center])\n")
- (dp "(ses-default-printer \"%.7g\")\n")
- (hr "(ses-header-row 0)\n")
- (p11 "(2 1 1)")
- (igp ses-initial-global-parameters))
- (dolist (x (list "(1)"
- "(x 2 3)"
- "(1 x 3)"
- "(1 -1 0)"
- "(1 2 x)"
- "(1 2 -1)"
- "(3 1 1)"
- "\n\n\f(2 1 1)"
- "\n\n\f\n(ses-cell)(2 1 1)"
- "\n\n\f\n(x)\n(2 1 1)"
- "\n\n\n\f\n(ses-cell A2)\n(2 2 2)"
- "\n\n\n\f\n(ses-cell B1)\n(2 2 2)"
- "\n\n\f\n(ses-cell A1 nil nil nil nil)\n(2 1 1)"
- (concat p&d "(x)\n(x)\n(x)\n(x)\n" p11)
- (concat p&d "(ses-column-widths)(x)\n(x)\n(x)\n" p11)
- (concat p&d cw "(x)\n(x)\n(x)\n(2 1 1)")
- (concat p&d cw "(ses-column-printers)(x)\n(x)\n" p11)
- (concat p&d cw cp "(x)\n(x)\n" p11)
- (concat p&d cw cp "(ses-default-printer)(x)\n" p11)
- (concat p&d cw cp dp "(x)\n" p11)
- (concat p&d cw cp dp "(ses-header-row)" p11)
- (concat p&d cw cp dp hr p11)
- (concat p&d cw cp dp "\n" hr igp)))
- (condition-case nil
- (with-temp-buffer
- (insert x)
- (ses-load)
- (signal 'singularity-error nil)) ;Shouldn't get here
- (singularity-error (error "%S is an invalid spreadsheet!" x))
- (error nil)))))
-
-(defun ses-exercise-startup ()
- "Prepare for coverage tests"
- ;;Clean up from any previous runs
- (condition-case nil (kill-buffer "ses-example.ses") (error nil))
- (condition-case nil (kill-buffer "ses-test.ses") (error nil))
- (condition-case nil (delete-file "ses-test.ses") (file-error nil))
- (delete-other-windows) ;Needed for "\C-xo" in ses-exercise-editing
- (setq ses-mode-map nil) ;Force rebuild
- (testcover-unmark-all "ses.el")
- ;;Enable
- (let ((testcover-1value-functions
- ;;forward-line always returns 0, for us.
- ;;remove-text-properties always returns t for us.
- ;;ses-recalculate-cell returns the same " " any time curcell is a cons
- ;;Macros ses-dorange and ses-dotimes-msg generate code that always
- ;; returns nil
- (append '(forward-line remove-text-properties ses-recalculate-cell
- ses-dorange ses-dotimes-msg)
- testcover-1value-functions))
- (testcover-constants
- ;;These maps get initialized, then never changed again
- (append '(ses-mode-map ses-mode-print-map ses-mode-edit-map)
- testcover-constants)))
- (testcover-start "ses.el" t))
- (require 'unsafep)) ;In case user has safe-functions = t!
-
-
-;;;#########################################################################
-(defun ses-exercise ()
- "Executes all SES coverage tests and displays the results."
- (interactive)
- (ses-exercise-startup)
- ;;Run the keyboard-macro tests
- (let ((safe-functions nil)
- (ses-initial-size '(1 . 1))
- (ses-initial-column-width 7)
- (ses-initial-default-printer "%.7g")
- (ses-after-entry-functions '(forward-char))
- (ses-mode-hook nil))
- (ses-exercise-macros)
- (ses-exercise-signals)
- (ses-exercise-invalid-spreadsheets)
- ;;Upgrade of old-style spreadsheet
- (with-temp-buffer
- (insert " \n\n\f\n(ses-cell A1 nil nil nil nil)\n\n(ses-column-widths [7])\n(ses-column-printers [nil])\n(ses-default-printer \"%.7g\")\n\n( ;Global parameters (these are read first)\n 1 ;SES file-format\n 1 ;numrows\n 1 ;numcols\n)\n\n")
- (ses-load))
- ;;ses-vector-delete is always called from buffer-undo-list with the same
- ;;symbol as argument. We'll give it a different one here.
- (let ((x [1 2 3]))
- (ses-vector-delete 'x 0 0))
- ;;ses-create-header-string behaves differently in a non-window environment
- ;;but we always test under windows.
- (let ((window-system (not window-system)))
- (scroll-left 7)
- (ses-create-header-string))
- ;;Test for nonstandard after-entry functions
- (let ((ses-after-entry-functions '(forward-line))
- ses-mode-hook)
- (ses-read-cell 0 0 1)
- (ses-read-symbol 0 0 t)))
- ;;Tests with unsafep disabled
- (let ((safe-functions t)
- ses-mode-hook)
- (message "<Checking safe-functions = t>")
- (kill-buffer "ses-example.ses")
- (find-file "ses-example.ses"))
- ;;Checks for nonstandard default values for new spreadsheets
- (let (ses-mode-hook)
- (dolist (x '(("%.6g" 8 (2 . 2))
- ("%.8g" 6 (3 . 3))))
- (let ((ses-initial-size (nth 2 x))
- (ses-initial-column-width (nth 1 x))
- (ses-initial-default-printer (nth 0 x)))
- (with-temp-buffer
- (set-buffer-modified-p t)
- (ses-mode)))))
- ;;Test error-handling in command hook, outside a macro.
- ;;This will ring the bell.
- (let (curcell-overlay)
- (ses-command-hook))
- ;;Due to use of run-with-timer, ses-command-hook sometimes gets called
- ;;after we switch to another buffer.
- (switch-to-buffer "*scratch*")
- (ses-command-hook)
- ;;Print results
- (message "<Marking source code>")
- (testcover-mark-all "ses.el")
- (testcover-next-mark)
- ;;Cleanup
- (delete-other-windows)
- (kill-buffer "ses-test.txt")
- ;;Could do this here: (testcover-end "ses.el")
- (message "Done"))
-
-;;; arch-tag: 87052ba4-5cf8-46cf-9375-fe245f3360b8
-;; testcover-ses.el ends here.
+++ /dev/null
-;;;; testcover-unsafep.el -- Use testcover to test unsafep's code coverage
-
-;; Copyright (C) 2002 Free Software Foundation, Inc.
-
-;; Author: Jonathan Yavner <jyavner@engineer.com>
-;; Maintainer: Jonathan Yavner <jyavner@engineer.com>
-;; Keywords: safety lisp utility
-
-;; This file is part of GNU Emacs.
-
-;; GNU Emacs is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-
-;; GNU Emacs is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-
-(require 'testcover)
-
-;;;These forms are all considered safe
-(defconst testcover-unsafep-safe
- '(((lambda (x) (* x 2)) 14)
- (apply 'cdr (mapcar '(lambda (x) (car x)) y))
- (cond ((= x 4) 5) (t 27))
- (condition-case x (car y) (error (car x)))
- (dolist (x y) (message "here: %s" x))
- (dotimes (x 14 (* x 2)) (message "here: %d" x))
- (let (x) (dolist (y '(1 2 3) (1+ y)) (push y x)))
- (let (x) (apply '(lambda (x) (* x 2)) 14))
- (let ((x '(2))) (push 1 x) (pop x) (add-to-list 'x 2))
- (let ((x 1) (y 2)) (setq x (+ x y)))
- (let ((x 1)) (let ((y (+ x 3))) (* x y)))
- (let* nil (current-time))
- (let* ((x 1) (y (+ x 3))) (* x y))
- (mapcar (lambda (x &optional y &rest z) (setq y (+ x 2)) (* y 3)) '(1 2 3))
- (mapconcat #'(lambda (var) (propertize var 'face 'bold)) '("1" "2") ", ")
- (setq buffer-display-count 14 mark-active t)
- ;;This is not safe if you insert it into a buffer!
- (propertize "x" 'display '(height (progn (delete-file "x") 1))))
- "List of forms that `unsafep' should decide are safe.")
-
-;;;These forms are considered unsafe
-(defconst testcover-unsafep-unsafe
- '(( (add-to-list x y)
- . (unquoted x))
- ( (add-to-list y x)
- . (unquoted y))
- ( (add-to-list 'y x)
- . (global-variable y))
- ( (not (delete-file "unsafep.el"))
- . (function delete-file))
- ( (cond (t (aset local-abbrev-table 0 0)))
- . (function aset))
- ( (cond (t (setq unsafep-vars "")))
- . (risky-local-variable unsafep-vars))
- ( (condition-case format-alist 1)
- . (risky-local-variable format-alist))
- ( (condition-case x 1 (error (setq format-alist "")))
- . (risky-local-variable format-alist))
- ( (dolist (x (sort globalvar 'car)) (princ x))
- . (function sort))
- ( (dotimes (x 14) (delete-file "x"))
- . (function delete-file))
- ( (let ((post-command-hook "/tmp/")) 1)
- . (risky-local-variable post-command-hook))
- ( (let ((x (delete-file "x"))) 2)
- . (function delete-file))
- ( (let (x) (add-to-list 'x (delete-file "x")))
- . (function delete-file))
- ( (let (x) (condition-case y (setq x 1 z 2)))
- . (global-variable z))
- ( (let (x) (condition-case z 1 (error (delete-file "x"))))
- . (function delete-file))
- ( (let (x) (mapc (lambda (x) (setcar x 1)) '((1 . 2) (3 . 4))))
- . (function setcar))
- ( (let (y) (push (delete-file "x") y))
- . (function delete-file))
- ( (let* ((x 1)) (setq y 14))
- . (global-variable y))
- ( (mapc 'car (list '(1 . 2) (cons 3 4) (kill-buffer "unsafep.el")))
- . (function kill-buffer))
- ( (mapcar x y)
- . (unquoted x))
- ( (mapcar '(lambda (x) (rename-file x "x")) '("unsafep.el"))
- . (function rename-file))
- ( (mapconcat x1 x2 " ")
- . (unquoted x1))
- ( (pop format-alist)
- . (risky-local-variable format-alist))
- ( (push 1 format-alist)
- . (risky-local-variable format-alist))
- ( (setq buffer-display-count (delete-file "x"))
- . (function delete-file))
- ;;These are actualy safe (they signal errors)
- ( (apply '(x) '(1 2 3))
- . (function (x)))
- ( (let (((x))) 1)
- . (variable (x)))
- ( (let (1) 2)
- . (variable 1))
- )
- "A-list of (FORM . REASON)... that`unsafep' should decide are unsafe.")
-
-
-;;;#########################################################################
-(defun testcover-unsafep ()
- "Executes all unsafep tests and displays the coverage results."
- (interactive)
- (testcover-unmark-all "unsafep.el")
- (testcover-start "unsafep.el")
- (let (save-functions)
- (dolist (x testcover-unsafep-safe)
- (if (unsafep x)
- (error "%S should be safe" x)))
- (dolist (x testcover-unsafep-unsafe)
- (if (not (equal (unsafep (car x)) (cdr x)))
- (error "%S should be unsafe: %s" (car x) (cdr x))))
- (setq safe-functions t)
- (if (or (unsafep '(delete-file "x"))
- (unsafep-function 'delete-file))
- (error "safe-functions=t should allow delete-file"))
- (setq safe-functions '(setcar))
- (if (unsafep '(setcar x 1))
- (error "safe-functions=(setcar) should allow setcar"))
- (if (not (unsafep '(setcdr x 1)))
- (error "safe-functions=(setcar) should not allow setcdr")))
- (testcover-mark-all "unsafep.el")
- (testcover-end "unsafep.el")
- (message "Done"))
-
-;;; arch-tag: a7616c27-1998-47ae-9304-76d1439dbf29
-;; testcover-unsafep.el ends here.
result))
(defun testcover-reinstrument-clauses (clauselist)
- "Reinstrument each list in CLAUSELIST.
-Result is t if every clause is 1-valued."
+ "Reinstruments each list in CLAUSELIST. Result is t if every
+clause is 1-valued."
(let ((result t))
(mapc #'(lambda (x)
(setq result (and (testcover-reinstrument-list x) result)))
(eval-buffer buf t)))
(defmacro 1value (form)
- "For coverage testing, indicate FORM should always have the same value."
+ "For code-coverage testing, indicate that FORM is expected to always have
+the same value."
form)
(defmacro noreturn (form)
- "For coverage testing, indicate that FORM will never return."
- `(prog1 ,form
- (error "Form marked with `noreturn' did return")))
+ "For code-coverage testing, indicate that FORM will always signal an error."
+ form)
;;;=========================================================================
(goto-char (next-overlay-change (point)))
(end-of-line))
-;;; arch-tag: 72324a4a-4a2e-4142-9249-cc56d6757588
;; testcover.el ends here.
\f
(provide 'timer)
-;;; arch-tag: b1a9237b-7787-4382-9e46-8f2c3b3273e0
;;; timer.el ends here
(provide 'tq)
-;;; arch-tag: 65dea08c-4edd-4cde-83a5-e8a15b993b79
;;; tq.el ends here
(provide 'trace)
-;;; arch-tag: cfd170a7-4932-4331-8c8b-b7151942e5a1
;;; trace.el ends here
(local-variable-p sym)))
`(global-variable ,sym))))
-;;; arch-tag: 6216f98b-eb8f-467a-9c33-7a7644f50658
;; unsafep.el ends here.
Each element looks like (LEVEL STRING FUNCTION) and
defines LEVEL as a severity level. STRING specifies the
description of this level. STRING should use `%s' to
-specify where to put the warning type information,
+specify where to put the warning group information,
or it can omit the `%s' so as not to include that information.
The optional FUNCTION, if non-nil, is a function to call
(defcustom warning-suppress-log-types nil
"List of warning types that should not be logged.
-If any element of this list matches the TYPE argument to `display-warning',
+If any element of this list matches the GROUP argument to `display-warning',
the warning is completely ignored.
-The element must match the first elements of TYPE.
+The element must match the first elements of GROUP.
Thus, (foo bar) as an element matches (foo bar)
-or (foo bar ANYTHING...) as TYPE.
-If TYPE is a symbol FOO, that is equivalent to the list (FOO),
+or (foo bar ANYTHING...) as GROUP.
+If GROUP is a symbol FOO, that is equivalent to the list (FOO),
so only the element (FOO) will match it."
:group 'warnings
:type '(repeat (repeat symbol))
:version "21.4")
(defcustom warning-suppress-types nil
- "List of warning types not to display immediately.
-If any element of this list matches the TYPE argument to `display-warning',
+ "Custom groups for warnings not to display immediately.
+If any element of this list matches the GROUP argument to `display-warning',
the warning is logged nonetheless, but the warnings buffer is
not immediately displayed.
-The element must match an initial segment of the list TYPE.
+The element must match an initial segment of the list GROUP.
Thus, (foo bar) as an element matches (foo bar)
-or (foo bar ANYTHING...) as TYPE.
-If TYPE is a symbol FOO, that is equivalent to the list (FOO),
+or (foo bar ANYTHING...) as GROUP.
+If GROUP is a symbol FOO, that is equivalent to the list (FOO),
so only the element (FOO) will match it.
See also `warning-suppress-log-types'."
:group 'warnings
;;; safely, testing the existing value, before they call one of the
;;; warnings functions.
;;;###autoload
-(defvar warning-type-format " (%s)"
- "Format for displaying the warning type in the warning message.
-The result of formatting the type this way gets included in the
+(defvar warning-group-format " (%s)"
+ "Format for displaying the warning group in the warning message.
+The result of formatting the group this way gets included in the
message under the control of the string in `warning-levels'.")
\f
(defun warning-numeric-level (level)
(link (memq elt warning-levels)))
(length link)))
-(defun warning-suppress-p (type suppress-list)
- "Non-nil if a warning with type TYPE should be suppressed.
+(defun warning-suppress-p (group suppress-list)
+ "Non-nil if a warning with group GROUP should be suppressed.
SUPPRESS-LIST is the list of kinds of warnings to suppress."
(let (some-match)
(dolist (elt suppress-list)
- (if (symbolp type)
- ;; If TYPE is a symbol, the ELT must be (TYPE).
+ (if (symbolp group)
+ ;; If GROUP is a symbol, the ELT must be (GROUP).
(if (and (consp elt)
- (eq (car elt) type)
+ (eq (car elt) group)
(null (cdr elt)))
(setq some-match t))
- ;; If TYPE is a list, ELT must match it or some initial segment of it.
- (let ((tem1 type)
+ ;; If GROUP is a list, ELT must match it or some initial segment of it.
+ (let ((tem1 group)
(tem2 elt)
(match t))
;; Check elements of ELT until we run out of them.
(setq match nil))
(setq tem1 (cdr tem1)
tem2 (cdr tem2)))
- ;; If ELT is an initial segment of TYPE, MATCH is t now.
+ ;; If ELT is an initial segment of GROUP, MATCH is t now.
;; So set SOME-MATCH.
(if match
(setq some-match t)))))
some-match))
\f
;;;###autoload
-(defun display-warning (type message &optional level buffer-name)
+(defun display-warning (group message &optional level buffer-name)
"Display a warning message, MESSAGE.
-TYPE is the warning type: either a custom group name (a symbol),
-or a list of symbols whose first element is a custom group name.
+GROUP should be a custom group name (a symbol),
+or else a list of symbols whose first element is a custom group name.
\(The rest of the symbols represent subcategories, for warning purposes
only, and you can use whatever symbols you like.)
(setq level (cdr (assq level warning-level-aliases))))
(or (< (warning-numeric-level level)
(warning-numeric-level warning-minimum-log-level))
- (warning-suppress-p type warning-suppress-log-types)
- (let* ((typename (if (consp type) (car type) type))
+ (warning-suppress-p group warning-suppress-log-types)
+ (let* ((groupname (if (consp group) (car group) group))
(buffer (get-buffer-create (or buffer-name "*Warnings*")))
(level-info (assq level warning-levels))
start end)
(setq level-info (funcall warning-prefix-function
level level-info)))
(insert (format (nth 1 level-info)
- (format warning-type-format typename))
+ (format warning-group-format groupname))
message)
(newline)
(when (and warning-fill-prefix (not (string-match "\n" message)))
;; immediate display.
(or (< (warning-numeric-level level)
(warning-numeric-level warning-minimum-level))
- (warning-suppress-p type warning-suppress-types)
+ (warning-suppress-p group warning-suppress-types)
(let ((window (display-buffer buffer)))
(when (and (markerp warning-series)
(eq (marker-buffer warning-series) buffer))
(sit-for 0)))))))
\f
;;;###autoload
-(defun lwarn (type level message &rest args)
+(defun lwarn (group level message &rest args)
"Display a warning message made from (format MESSAGE ARGS...).
Aside from generating the message with `format',
this is equivalent to `display-warning'.
-TYPE is the warning type: either a custom group name (a symbol).
-or a list of symbols whose first element is a custom group name.
+GROUP should be a custom group name (a symbol).
+or else a list of symbols whose first element is a custom group name.
\(The rest of the symbols represent subcategories and
can be whatever you like.)
if you do not attend to it promptly.
:error -- invalid data or circumstances.
:warning -- suspicious data or circumstances."
- (display-warning type (apply 'format message args) level))
+ (display-warning group (apply 'format message args) level))
;;;###autoload
(defun warn (message &rest args)
"Display a warning message made from (format MESSAGE ARGS...).
Aside from generating the message with `format',
this is equivalent to `display-warning', using
-`emacs' as the type and `:warning' as the level."
+`emacs' as the group and `:warning' as the level."
(display-warning 'emacs (apply 'format message args)))
(provide 'warnings)
-;;; arch-tag: faaad1c8-7b2a-4161-af38-5ab4afde0496
;;; warnings.el ends here
(provide 'emacs-lock)
-;;; arch-tag: 58e6cb43-7cf0-401a-bcb6-4902a0b8bdc1
;;; emacs-lock.el ends here
(provide 'emerge)
-;;; arch-tag: a575f092-6e44-400e-b8a2-4124e9377585
;;; emerge.el ends here
(run-hooks 'crisp-load-hook)
(provide 'crisp)
-;;; arch-tag: e5369375-fafb-4240-b7ae-4cb460ef05ee
;;; crisp.el ends here
(provide 'cua)
-;;; arch-tag: 21fb6289-ba25-4fee-bfdc-f9fb351acf05
;;; cua-base.el ends here
(setq cua--global-mark-initialized t))
-;;; arch-tag: 553d8076-a91d-48ae-825d-6cb962a5f67f
;;; cua-gmrk.el ends here
(setq cua--rectangle-initialized t))
-;;; arch-tag: b730df53-17b9-4a89-bd63-4a71ec196731
;;; cua-rect.el ends here
("HELP" . [help]) ("DO" . [menu]) ("F17" . [f17]) ("F18" . [f18])
("F19" . [f19]) ("F20" . [f20])))
-;;; arch-tag: 36f498cf-c3f6-41b0-911b-83b1348855ec
;;; edt-lk201.el ends here
(sit-for 600)
(kill-emacs t)
-;;; arch-tag: 9eea59c8-b8b7-4d66-b858-c8920624c518
;;; edt-mapper.el ends here
("HELP" . "" ) ("DO" . "" ) ("F17" . "" ) ("F18" . "" )
("F19" . "" ) ("F20" . "" )))
-;;; arch-tag: 4593d053-183a-4062-97de-57b8877595ce
;;; edt-pc.el ends here
"Set terminal width to 132 columns."
(vt100-wide-mode 1))
-;;; arch-tag: c9f10c95-915f-44b5-93ff-4654abca4dd4
;;; edt-vt100.el ends here
(provide 'edt)
-;;; arch-tag: 18d1c54f-6900-4078-8bbc-7c2292f48941
;;; edt.el ends here
(setq i (1+ i)))))
-;;; arch-tag: 0899d2bd-9e12-4b4e-9aef-d0014d3b6414
;;; keypad.el ends here
(provide 'pc-mode)
-;;; arch-tag: df007c05-f885-4cd0-8c1e-487d0f8dd9c9
;;; pc-mode.el ends here
:group 'pc-select
:require 'pc-select)
-;;; arch-tag: 10697b70-ae07-4f3e-ad23-7814a3f418c2
;;; pc-select.el ends here
(provide 'tpu-edt)
-;;; arch-tag: f3dfe61c-2cbd-4f73-b9cc-eb215020b857
;;; tpu-edt.el ends here
GOLD-map)
(message "The cursor is now bound to the flow of your text."))
-;;; arch-tag: 89676fa4-33ec-48cb-9135-6f3bf230ab1a
;;; tpu-extras.el ends here
")
(goto-char (point-min))
-;;; arch-tag: bab5872f-cd3a-4c1c-aedb-047b67646f6c
;;; tpu-mapper.el ends here
(provide 'vi)
-;;; arch-tag: ac9bdac3-8acb-4ddd-bdae-c6dd873153b3
;;; vi.el ends here
(provide 'vip)
-;;; arch-tag: bff623ef-48f7-41d4-9aa3-2e840c9ab415
;;; vip.el ends here
-;;; arch-tag: 739a6450-5fda-44d0-88b0-325053d888c2
;;; viper-cmd.el ends here
-;;; arch-tag: 56b80d36-f880-4d10-bd66-85ad91a295db
;;; viper-ex.el ends here
;;; eval: (put 'viper-deflocalvar 'lisp-indent-hook 'defun)
;;; End:
-;;; arch-tag: 4efa2416-1fcb-4690-be10-1a2a0248d250
;;; viper-init.el ends here
;;; End:
-;;; arch-tag: 43af4b2f-0bea-400b-889e-221ebc00acb1
;;; viper-keym.el ends here
(call-last-kbd-macro)))
-;;; arch-tag: ecd3cc5c-8cd0-4bbe-b2ec-7e75a4b7d0aa
;;; viper-macs.el ends here
;;; End:
-;;; arch-tag: e56b2390-06c4-4dd1-96f5-c7876e2d8c2f
;;; viper-mous.el ends here
;;; eval: (put 'viper-deflocalvar 'lisp-indent-hook 'defun)
;;; End:
-;;; arch-tag: 7f023fd5-dd9e-4378-a397-9c179553b0e3
;;; viper-util.el ends here
;;; eval: (put 'viper-deflocalvar 'lisp-indent-hook 'defun)
;;; End:
-;;; arch-tag: 5f3e844c-c4e6-4bbd-9b73-63bdc14e7d79
;;; viper.el ends here
(provide 'ws-mode)
-;;; arch-tag: 6dd864bf-2ccb-4d59-af6e-492eba2890a3
;;; ws-mode.el ends here
(provide 'env)
-;;; arch-tag: b7d6a8f7-bc81-46db-8e39-8d721d4ed0b8
;;; env.el ends here
eshell-prevent-alias-expansion))))
(eshell-parse-command alias))))))))))
-;;; arch-tag: 8b018fc1-4e07-4ccc-aa73-c0a1ba361f82
;;; em-alias.el ends here
(goto-char (point-min))
(looking-at msg)))
-;;; arch-tag: e738b4ef-8671-42ae-a757-291779b92491
;;; em-banner.el ends here
(eval-when-compile
(defvar print-func))
-;;; arch-tag: 385a31b1-cb95-46f0-9829-9d352ee77db8
;;; em-basic.el ends here
;;; Code:
-;;; arch-tag: 0e914699-673a-45f8-8cbf-82e1dbc571bc
;;; em-cmpl.el ends here
;;; Code:
-;;; arch-tag: 1e9c5a95-f1bd-45f8-ad36-55aac706e787
;;; em-dirs.el ends here
(eshell-glob-entries (car rdirs) globs recurse-p)
(setq rdirs (cdr rdirs)))))
-;;; arch-tag: d0548f54-fb7c-4978-a88e-f7c26f7f68ca
;;; em-glob.el ends here
(isearch-done)
(eshell-send-input))
-;;; arch-tag: 1a847333-f864-4b96-9acd-b549d620b6c6
;;; em-hist.el ends here
;;; Code:
-;;; arch-tag: 9295181c-0cb2-499c-999b-89f5359842cb
;;; em-ls.el ends here
(lambda (str)
(split-string str ,sep))) lst))))
-;;; arch-tag: 8b5ce022-17f3-4c40-93c7-5faafaa63f31
;;; em-pred.el ends here
;;; Code:
-;;; arch-tag: 01c1574b-ce70-4e89-bc38-e6619f61e208
;;; em-prompt.el ends here
;;; Code:
-;;; arch-tag: 76d84f12-cc56-4d67-9b7d-c6b44ad20530
;;; em-rebind.el ends here
;;; Code:
-;;; arch-tag: a346439d-5ba8-4faf-ac2b-3aacfeaa4647
;;; em-script.el ends here
;;; Code:
-;;; arch-tag: 8c0112c7-379c-4d54-9a1c-204d68786a4b
;;; em-smart.el ends here
;;; Code:
-;;; arch-tag: ab7c8fe4-3101-4257-925b-1354c6b2fe9d
;;; em-term.el ends here
;;; Code:
-;;; arch-tag: 2462edd2-a76a-4cf2-897d-92e9a82ac1c9
;;; em-unix.el ends here
;;; Code:
-;;; arch-tag: f944cfda-a118-470c-a0d6-b41a3a5c99c7
;;; em-xtra.el ends here
(char-to-string (char-after)))))
(goto-char end)))))))
-;;; arch-tag: 7f593a2b-8fc1-4def-8f84-8f51ed0198d6
;;; esh-arg.el ends here
(defalias 'eshell-lisp-command* 'eshell-lisp-command)
-;;; arch-tag: 8e4f3867-a0c5-441f-96ba-ddd142d94366
;;; esh-cmd.el ends here
;;; Code:
-;;; arch-tag: 178d4064-7e60-4745-b81f-bab5d8d7c40f
;;; esh-ext.el ends here
;;; Code:
-;;; arch-tag: 9ca2080f-d5e0-4b26-aa0b-d59194a905a2
;;; esh-io.el ends here
;; (delete-file "README.texi")
;; (kill-buffer "README.texi"))
-;;; arch-tag: 662089b6-78ec-48c5-b94f-d212279e8902
;;; esh-maint.el ends here
;;; Code:
-;;; arch-tag: ec65bc2b-da14-4547-81d3-a32af3a4dc57
;;; esh-mode.el ends here
(unload-feature module)
(message "Unloading %s...done" (symbol-name module))))))
-;;; arch-tag: 97a3fa16-9d08-40e6-bc2c-36bd70986507
;;; esh-module.el ends here
;;; Code:
-;;; arch-tag: 45c6c2d0-8091-46a1-a205-2f4bafd8230c
;;; esh-opt.el ends here
;;; Code:
-;;; arch-tag: ac477a3e-ee4d-4b44-8ec6-212010e607bb
;;; esh-proc.el ends here
"\n"))))
nil t))
-;;; arch-tag: 6e32275a-8285-4a4e-b7cf-819aa7c86b8e
;;; esh-test.el ends here
;;; Code:
-;;; arch-tag: 70159778-5c7a-480a-bae4-3ad332fca19d
;;; esh-util.el ends here
;;; Code:
-;;; arch-tag: 393654fe-bdad-4f27-9a10-b1472ded14cf
;;; esh-var.el ends here
(run-hooks 'eshell-load-hook)
-;;; arch-tag: 9d4d5214-0e4e-4e02-b349-39add640d63f
;;; eshell.el ends here
;; run load hooks
(run-hooks 'expand-load-hook)
-;;; arch-tag: fee53e9e-30e3-4ef3-b191-9785e1f8e885
;;; expand.el ends here
(facemenu-update)
(provide 'facemenu)
-
-;;; arch-tag: 85f6d02b-9085-420e-b651-0678f0e9c7eb
;;; facemenu.el ends here
(provide 'faces)
-;;; arch-tag: 19a4759f-2963-445f-b004-425b9aadd7d6
;;; faces.el ends here
(provide 'fast-lock)
-;;; arch-tag: 638c431e-8cae-4538-80a1-963ff97d233e
;;; fast-lock.el ends here
(eval (cons 'progn ffap-bindings)))
\f
-
-;;; arch-tag: 9dd3e88a-5dec-4607-bd57-60ae9ede8ebc
;;; ffap.el ends here
(provide 'filecache)
-;;; arch-tag: 433d3ca4-4af2-47ce-b2cf-1f727460f538
;;; filecache.el ends here
;; ordinary or numeric backups. It might create a directory for
;; backups as a side-effect, according to `backup-directory-alist'.
(let* ((filename (file-name-sans-versions
- (make-backup-file-name (expand-file-name filename))))
+ (make-backup-file-name filename)))
(file (file-name-nondirectory filename))
(dir (file-name-directory filename))
(comp (file-name-all-completions file dir))
(define-key ctl-x-5-map "\C-f" 'find-file-other-frame)
(define-key ctl-x-5-map "r" 'find-file-read-only-other-frame)
-;;; arch-tag: bc68d3ea-19ca-468b-aac6-3a4a7766101f
;;; files.el ends here
;;; sentence-end-double-space:t
;;; End:
-;;; arch-tag: 2c03f85f-c3df-4cec-b0a3-b46fd5592d70
;;; filesets.el ends here
\f
(provide 'find-dired)
-;;; arch-tag: 8edece95-af00-4221-bc74-a4bd2f75f9b0
;;; find-dired.el ends here
(provide 'find-file)
-;;; arch-tag: 5a2fc49e-3b0a-4708-9acf-fb14e471a97a
;;; find-file.el ends here
;; autocompile: t
;; End:
-;;; arch-tag: a711374c-f12a-46f6-aa18-ba7d77b9602a
;;; find-lisp.el ends here
\f
(provide 'finder)
-;;; arch-tag: ec85ff49-8cb8-41f5-a63f-9131d53ce2c5
;;; finder.el ends here
(provide 'flow-ctrl)
-;;; arch-tag: 0eb7b19e-0d93-4e0b-9ea2-72b574076a56
;;; flow-ctrl.el ends here
(provide 'foldout)
-;;; arch-tag: 19d095a2-1f09-42a7-a5ac-e2a3078cfe95
;;; foldout.el ends here
;; | save it". -- Douglas Adams, "Last Chance to See" |
;; \------------------------------------------------------------------------/
-;;; arch-tag: 7b16bb1a-808c-4991-a8cc-66d3822936d0
;;; follow.el ends here
;;; font-core.el ends here
-;;; arch-tag: f8c286e1-02f7-41d9-b89b-1b67780aed71
(when (eq font-lock-support-mode 'jit-lock-mode)
(require 'jit-lock))
-;;; arch-tag: 682327e4-64d8-4057-b20b-1fbb9f1fc54c
;;; font-lock.el ends here
(provide 'format)
-;;; arch-tag: c387e9c7-a93d-47bf-89bc-8ca67e96755a
;;; format.el ends here
;; That's all, folks!
-;;; arch-tag: 8e5d5dac-7abf-4722-ab5e-03eb749beaca
;;; forms-d2.el ends here
"Shell: " 7
"\n"))
-;;; arch-tag: 74801012-1a2d-4173-b9e4-fcfa241e2305
;;; forms-pass.el ends here
(provide 'forms) ;;; official
(provide 'forms-mode) ;;; for compatibility
-(defconst forms-version (substring "$Revision: 2.48 $" 11 -2)
+(defconst forms-version (substring "$Revision: 2.47 $" 11 -2)
"The version number of forms-mode (as string). The complete RCS id is:
- $Id: forms.el,v 2.48 2003/05/29 23:53:21 monnier Exp $")
+ $Id: forms.el,v 2.47 2003/05/28 11:19:48 rms Exp $")
(defcustom forms-mode-hook nil
"Hook run upon entering Forms mode."
(goto-char (point-max))
(insert ret)))))
-;;; arch-tag: 4a6695c7-d47a-4a21-809b-5cec7f8ec7a1
;;; forms.el ends here
(provide 'frame)
-;;; arch-tag: 82979c70-b8f2-4306-b2ad-ddbd6b328b56
;;; frame.el ends here
(provide 'fringe)
-;;; arch-tag: 6611ef60-0869-47ed-8b93-587ee7d3ff5d
;;; fringe.el ends here
+++ /dev/null
-;;; gdb-ui.el --- User Interface for running GDB
-
-;; Author: Nick Roberts <nick@nick.uklinux.net>
-;; Maintainer: FSF
-;; Keywords: unix, tools
-
-;; Copyright (C) 2002 Free Software Foundation, Inc.
-
-;; This file is part of GNU Emacs.
-
-;; GNU Emacs is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-
-;; GNU Emacs is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-
-;;; Commentary:
-
-;; This mode acts as a graphical user interface to GDB. You can interact with
-;; GDB through the GUD buffer in the usual way, but there are also further
-;; buffers which control the execution and describe the state of your program.
-;; It separates the input/output of your program from that of GDB and displays
-;; expressions and their current values in their own buffers. It also uses
-;; features of Emacs 21 such as the display margin for breakpoints, and the
-;; toolbar (see the GDB Graphical Interface section in the Emacs info manual).
-
-;; Start the debugger with M-x gdba.
-
-;; This file is based on gdba.el from GDB 5.0 written by Tom Lord and Jim
-;; Kingdon and uses GDB's annotation interface. You don't need to know about
-;; annotations to use this mode as a debugger, but if you are interested
-;; developing the mode itself, then see the Annotations section in the GDB
-;; info manual.
-;;
-;; Known Bugs:
-;; Does not auto-display arrays of structures or structures containing arrays.
-;; On MS Windows, Gdb 5.1.1 from MinGW 2.0 does not flush the output from the
-;; inferior.
-
-;;; Code:
-
-(require 'gud)
-
-(defcustom gdb-window-height 20
- "Number of lines in a frame for a displayed expression in GDB-UI."
- :type 'integer
- :group 'gud)
-
-(defcustom gdb-window-width 30
- "Width of a frame for a displayed expression in GDB-UI."
- :type 'integer
- :group 'gud)
-
-(defvar gdb-current-address "main" "Initialisation for Assembler buffer.")
-(defvar gdb-previous-address nil)
-(defvar gdb-previous-frame nil)
-(defvar gdb-current-frame "main")
-(defvar gdb-display-in-progress nil)
-(defvar gdb-dive nil)
-(defvar gdb-view-source t "Non-nil means that source code can be viewed")
-(defvar gdb-selected-view 'source "Code type that user wishes to view")
-(defvar gdb-buffer-type nil)
-(defvar gdb-variables '()
- "A list of variables that are local to the GUD buffer.")
-
-
-;;;###autoload
-(defun gdba (command-line)
- "Run gdb on program FILE in buffer *gud-FILE*.
-The directory containing FILE becomes the initial working directory
-and source-file directory for your debugger.
-
-If `gdb-many-windows' is nil (the default value) then gdb starts with
-just two windows : the GUD and the source buffer. If it is t the
-following layout will appear (keybindings given in relevant buffer) :
-
----------------------------------------------------------------------
- GDB Toolbar
----------------------------------------------------------------------
-GUD buffer (I/O of GDB) | Locals buffer
- |
- |
- |
----------------------------------------------------------------------
-Source buffer | Input/Output (of debuggee) buffer
- | (comint-mode)
- |
- |
- |
- |
- |
- |
----------------------------------------------------------------------
-Stack buffer | Breakpoints buffer
- RET gdb-frames-select | SPC gdb-toggle-breakpoint
- | RET gdb-goto-breakpoint
- | d gdb-delete-breakpoint
----------------------------------------------------------------------
-
-All the buffers share the toolbar and source should always display in the same
-window e.g after typing g on a breakpoint in the breakpoints buffer. Breakpoint
-icons are displayed both by setting a break with gud-break and by typing break
-in the GUD buffer.
-
-This works best (depending on the size of your monitor) using most of the
-screen.
-
-Displayed expressions appear in separate frames. Arrays may be displayed
-as slices and visualised using the graph program from plotutils if installed.
-Pointers in structures may be followed in a tree-like fashion.
-
-The following interactive lisp functions help control operation :
-
-`gdb-many-windows' - Toggle the number of windows gdb uses.
-`gdb-restore-windows' - To restore the window layout."
- ;;
- (interactive (list (gud-query-cmdline 'gdba)))
- ;;
- ;; Let's start with a basic gud-gdb buffer and then modify it a bit.
- (gdb command-line)
- ;;
- (set (make-local-variable 'gud-minor-mode) 'gdba)
- (set (make-local-variable 'gud-marker-filter) 'gud-gdba-marker-filter)
- ;;
- (gud-def gud-break (if (not (string-equal mode-name "Assembler"))
- (gud-call "break %f:%l" arg)
- (save-excursion
- (beginning-of-line)
- (forward-char 2)
- (gud-call "break *%a" arg)))
- "\C-b" "Set breakpoint at current line or address.")
- ;;
- (gud-def gud-remove (if (not (string-equal mode-name "Assembler"))
- (gud-call "clear %f:%l" arg)
- (save-excursion
- (beginning-of-line)
- (forward-char 2)
- (gud-call "clear *%a" arg)))
- "\C-d" "Remove breakpoint at current line or address.")
- ;;
- (gud-def gud-until (if (not (string-equal mode-name "Assembler"))
- (gud-call "until %f:%l" arg)
- (save-excursion
- (beginning-of-line)
- (forward-char 2)
- (gud-call "until *%a" arg)))
- "\C-u" "Continue to current line or address.")
-
- (setq comint-input-sender 'gdb-send)
- ;;
- ;; (re-)initialise
- (setq gdb-current-address "main")
- (setq gdb-previous-address nil)
- (setq gdb-previous-frame nil)
- (setq gdb-current-frame "main")
- (setq gdb-display-in-progress nil)
- (setq gdb-dive nil)
- (setq gdb-view-source t)
- (setq gdb-selected-view 'source)
- ;;
- (mapc 'make-local-variable gdb-variables)
- (setq gdb-buffer-type 'gdba)
- ;;
- (gdb-clear-inferior-io)
- ;;
- (if (eq window-system 'w32)
- (gdb-enqueue-input (list "set new-console off\n" 'ignore)))
- (gdb-enqueue-input (list "set height 0\n" 'ignore))
- ;; find source file and compilation directory here
- (gdb-enqueue-input (list "server list main\n" 'ignore)) ; C program
- (gdb-enqueue-input (list "server list MAIN__\n" 'ignore)) ; Fortran program
- (gdb-enqueue-input (list "server info source\n" 'gdb-source-info))
- ;;
- (run-hooks 'gdba-mode-hook))
-
-(defun gud-display ()
- "Auto-display (possibly dereferenced) C expression at point."
- (interactive)
- (save-excursion
- (let ((expr (gud-find-c-expr)))
- (gdb-enqueue-input
- (list (concat "server ptype " expr "\n")
- `(lambda () (gud-display1 ,expr)))))))
-
-(defun gud-display1 (expr)
- (goto-char (point-min))
- (if (looking-at "No symbol")
- (progn
- (gdb-set-output-sink 'user)
- (gud-call (concat "server ptype " expr)))
- (goto-char (- (point-max) 1))
- (if (equal (char-before) (string-to-char "\*"))
- (gdb-enqueue-input
- (list (concat "display* " expr "\n") 'ignore))
- (gdb-enqueue-input
- (list (concat "display " expr "\n") 'ignore)))))
-
-; this would messy because these bindings don't work with M-x gdb
-; (define-key global-map "\C-x\C-a\C-a" 'gud-display)
-; (define-key gud-minor-mode-map "\C-c\C-a" 'gud-display)
-
-
-\f
-;; ======================================================================
-;;
-;; In this world, there are gdb variables (of unspecified
-;; representation) and buffers associated with those objects.
-;; The list of variables is built up by the expansions of
-;; def-gdb-variable
-
-(defmacro def-gdb-var (root-symbol &optional default doc)
- (let* ((root (symbol-name root-symbol))
- (accessor (intern (concat "gdb-get-" root)))
- (setter (intern (concat "gdb-set-" root)))
- (name (intern (concat "gdb-" root))))
- `(progn
- (defvar ,name ,default ,doc)
- (if (not (memq ',name gdb-variables))
- (push ',name gdb-variables))
- (defun ,accessor ()
- (buffer-local-value ',name gud-comint-buffer))
- (defun ,setter (val)
- (with-current-buffer gud-comint-buffer
- (setq ,name val))))))
-
-(def-gdb-var buffer-type nil
- "One of the symbols bound in gdb-buffer-rules")
-
-(def-gdb-var burst ""
- "A string of characters from gdb that have not yet been processed.")
-
-(def-gdb-var input-queue ()
- "A list of high priority gdb command objects.")
-
-(def-gdb-var idle-input-queue ()
- "A list of low priority gdb command objects.")
-
-(def-gdb-var prompting nil
- "True when gdb is idle with no pending input.")
-
-(def-gdb-var output-sink 'user
- "The disposition of the output of the current gdb command.
-Possible values are these symbols:
-
- user -- gdb output should be copied to the GUD buffer
- for the user to see.
-
- inferior -- gdb output should be copied to the inferior-io buffer
-
- pre-emacs -- output should be ignored util the post-prompt
- annotation is received. Then the output-sink
- becomes:...
- emacs -- output should be collected in the partial-output-buffer
- for subsequent processing by a command. This is the
- disposition of output generated by commands that
- gdb mode sends to gdb on its own behalf.
- post-emacs -- ignore input until the prompt annotation is
- received, then go to USER disposition.
-")
-
-(def-gdb-var current-item nil
- "The most recent command item sent to gdb.")
-
-(def-gdb-var pending-triggers '()
- "A list of trigger functions that have run later than their output
-handlers.")
-
-;; end of gdb variables
-
-(defun gdb-get-target-string ()
- (with-current-buffer gud-comint-buffer
- gud-target-name))
-\f
-
-;;
-;; gdb buffers.
-;;
-;; Each buffer has a TYPE -- a symbol that identifies the function
-;; of that particular buffer.
-;;
-;; The usual gdb interaction buffer is given the type `gdba' and
-;; is constructed specially.
-;;
-;; Others are constructed by gdb-get-create-buffer and
-;; named according to the rules set forth in the gdb-buffer-rules-assoc
-
-(defvar gdb-buffer-rules-assoc '())
-
-(defun gdb-get-buffer (key)
- "Return the gdb buffer tagged with type KEY.
-The key should be one of the cars in `gdb-buffer-rules-assoc'."
- (save-excursion
- (gdb-look-for-tagged-buffer key (buffer-list))))
-
-(defun gdb-get-create-buffer (key)
- "Create a new gdb buffer of the type specified by KEY.
-The key should be one of the cars in `gdb-buffer-rules-assoc'."
- (or (gdb-get-buffer key)
- (let* ((rules (assoc key gdb-buffer-rules-assoc))
- (name (funcall (gdb-rules-name-maker rules)))
- (new (get-buffer-create name)))
- (with-current-buffer new
- ;; FIXME: This should be set after calling the function, since the
- ;; function should run kill-all-local-variables.
- (set (make-local-variable 'gdb-buffer-type) key)
- (if (cdr (cdr rules))
- (funcall (car (cdr (cdr rules)))))
- (set (make-local-variable 'gud-comint-buffer) gud-comint-buffer)
- (set (make-local-variable 'gud-minor-mode) 'gdba)
- (set (make-local-variable 'tool-bar-map) gud-tool-bar-map)
- new))))
-
-(defun gdb-rules-name-maker (rules) (car (cdr rules)))
-
-(defun gdb-look-for-tagged-buffer (key bufs)
- (let ((retval nil))
- (while (and (not retval) bufs)
- (set-buffer (car bufs))
- (if (eq gdb-buffer-type key)
- (setq retval (car bufs)))
- (setq bufs (cdr bufs)))
- retval))
-
-;;
-;; This assoc maps buffer type symbols to rules. Each rule is a list of
-;; at least one and possible more functions. The functions have these
-;; roles in defining a buffer type:
-;;
-;; NAME - Return a name for this buffer type.
-;;
-;; The remaining function(s) are optional:
-;;
-;; MODE - called in a new buffer with no arguments, should establish
-;; the proper mode for the buffer.
-;;
-
-(defun gdb-set-buffer-rules (buffer-type &rest rules)
- (let ((binding (assoc buffer-type gdb-buffer-rules-assoc)))
- (if binding
- (setcdr binding rules)
- (push (cons buffer-type rules)
- gdb-buffer-rules-assoc))))
-
-;; GUD buffers are an exception to the rules
-(gdb-set-buffer-rules 'gdba 'error)
-
-;;
-;; Partial-output buffer : This accumulates output from a command executed on
-;; behalf of emacs (rather than the user).
-;;
-(gdb-set-buffer-rules 'gdb-partial-output-buffer
- 'gdb-partial-output-name)
-
-(defun gdb-partial-output-name ()
- (concat "*partial-output-"
- (gdb-get-target-string)
- "*"))
-
-\f
-(gdb-set-buffer-rules 'gdb-inferior-io
- 'gdb-inferior-io-name
- 'gdb-inferior-io-mode)
-
-(defun gdb-inferior-io-name ()
- (concat "*input/output of "
- (gdb-get-target-string)
- "*"))
-
-(defvar gdb-inferior-io-mode-map
- (let ((map (make-sparse-keymap)))
- (define-key map "\C-c\C-c" 'gdb-inferior-io-interrupt)
- (define-key map "\C-c\C-z" 'gdb-inferior-io-stop)
- (define-key map "\C-c\C-\\" 'gdb-inferior-io-quit)
- (define-key map "\C-c\C-d" 'gdb-inferior-io-eof)
- map))
-
-(define-derived-mode gdb-inferior-io-mode comint-mode "Debuggee I/O"
- "Major mode for gdb inferior-io."
- :syntax-table nil :abbrev-table nil
- ;; We want to use comint because it has various nifty and familiar
- ;; features. We don't need a process, but comint wants one, so create
- ;; a dummy one.
- (make-comint-in-buffer
- (substring (buffer-name) 1 (- (length (buffer-name)) 1))
- (current-buffer) "hexl")
- (setq comint-input-sender 'gdb-inferior-io-sender))
-
-(defun gdb-inferior-io-sender (proc string)
- ;; PROC is the pseudo-process created to satisfy comint.
- (with-current-buffer (process-buffer proc)
- (setq proc (get-buffer-process gud-comint-buffer))
- (process-send-string proc string)
- (process-send-string proc "\n")))
-
-(defun gdb-inferior-io-interrupt ()
- "Interrupt the program being debugged."
- (interactive)
- (interrupt-process
- (get-buffer-process gud-comint-buffer) comint-ptyp))
-
-(defun gdb-inferior-io-quit ()
- "Send quit signal to the program being debugged."
- (interactive)
- (quit-process
- (get-buffer-process gud-comint-buffer) comint-ptyp))
-
-(defun gdb-inferior-io-stop ()
- "Stop the program being debugged."
- (interactive)
- (stop-process
- (get-buffer-process gud-comint-buffer) comint-ptyp))
-
-(defun gdb-inferior-io-eof ()
- "Send end-of-file to the program being debugged."
- (interactive)
- (process-send-eof
- (get-buffer-process gud-comint-buffer)))
-\f
-
-;;
-;; gdb communications
-;;
-
-;; INPUT: things sent to gdb
-;;
-;; There is a high and low priority input queue. Low priority input is sent
-;; only when the high priority queue is idle.
-;;
-;; The queues are lists. Each element is either a string (indicating user or
-;; user-like input) or a list of the form:
-;;
-;; (INPUT-STRING HANDLER-FN)
-;;
-;; The handler function will be called from the partial-output buffer when the
-;; command completes. This is the way to write commands which invoke gdb
-;; commands autonomously.
-;;
-;; These lists are consumed tail first.
-;;
-
-(defun gdb-send (proc string)
- "A comint send filter for gdb.
-This filter may simply queue output for a later time."
- (gdb-enqueue-input (concat string "\n")))
-
-;; Note: Stuff enqueued here will be sent to the next prompt, even if it
-;; is a query, or other non-top-level prompt. To guarantee stuff will get
-;; sent to the top-level prompt, currently it must be put in the idle queue.
-;; ^^^^^^^^^
-;; [This should encourage gdb extensions that invoke gdb commands to let
-;; the user go first; it is not a bug. -t]
-;;
-
-(defun gdb-enqueue-input (item)
- (if (gdb-get-prompting)
- (progn
- (gdb-send-item item)
- (gdb-set-prompting nil))
- (gdb-set-input-queue
- (cons item (gdb-get-input-queue)))))
-
-(defun gdb-dequeue-input ()
- (let ((queue (gdb-get-input-queue)))
- (and queue
- (if (not (cdr queue))
- (let ((answer (car queue)))
- (gdb-set-input-queue '())
- answer)
- (gdb-take-last-elt queue)))))
-
-(defun gdb-enqueue-idle-input (item)
- (if (and (gdb-get-prompting)
- (not (gdb-get-input-queue)))
- (progn
- (gdb-send-item item)
- (gdb-set-prompting nil))
- (gdb-set-idle-input-queue
- (cons item (gdb-get-idle-input-queue)))))
-
-(defun gdb-dequeue-idle-input ()
- (let ((queue (gdb-get-idle-input-queue)))
- (and queue
- (if (not (cdr queue))
- (let ((answer (car queue)))
- (gdb-set-idle-input-queue '())
- answer)
- (gdb-take-last-elt queue)))))
-
-;; Don't use this in general.
-(defun gdb-take-last-elt (l)
- (if (cdr (cdr l))
- (gdb-take-last-elt (cdr l))
- (let ((answer (car (cdr l))))
- (setcdr l '())
- answer)))
-
-\f
-;;
-;; output -- things gdb prints to emacs
-;;
-;; GDB output is a stream interrupted by annotations.
-;; Annotations can be recognized by their beginning
-;; with \C-j\C-z\C-z<tag><opt>\C-j
-;;
-;; The tag is a string obeying symbol syntax.
-;;
-;; The optional part `<opt>' can be either the empty string
-;; or a space followed by more data relating to the annotation.
-;; For example, the SOURCE annotation is followed by a filename,
-;; line number and various useless goo. This data must not include
-;; any newlines.
-;;
-
-(defcustom gud-gdba-command-name "gdb -annotate=2 -noasync"
- "Default command to execute an executable under the GDB-UI debugger."
- :type 'string
- :group 'gud)
-
-(defvar gdb-annotation-rules
- '(("pre-prompt" gdb-pre-prompt)
- ("prompt" gdb-prompt)
- ("commands" gdb-subprompt)
- ("overload-choice" gdb-subprompt)
- ("query" gdb-subprompt)
- ("prompt-for-continue" gdb-subprompt)
- ("post-prompt" gdb-post-prompt)
- ("source" gdb-source)
- ("starting" gdb-starting)
- ("exited" gdb-stopping)
- ("signalled" gdb-stopping)
- ("signal" gdb-stopping)
- ("breakpoint" gdb-stopping)
- ("watchpoint" gdb-stopping)
- ("frame-begin" gdb-frame-begin)
- ("stopped" gdb-stopped)
- ("display-begin" gdb-display-begin)
- ("display-end" gdb-display-end)
-; GDB commands info stack, info locals and frame generate an error-begin
-; annotation at start when there is no stack but this is a quirk/bug in
-; annotations.
-; ("error-begin" gdb-error-begin)
- ("display-number-end" gdb-display-number-end)
- ("array-section-begin" gdb-array-section-begin)
- ("array-section-end" gdb-array-section-end)
- ;; ("elt" gdb-elt)
- ("field-begin" gdb-field-begin)
- ("field-end" gdb-field-end)
- ) "An assoc mapping annotation tags to functions which process them.")
-
-(defconst gdb-source-spec-regexp
- "\\(.*\\):\\([0-9]*\\):[0-9]*:[a-z]*:\\(0x[a-f0-9]*\\)")
-
-;; Do not use this except as an annotation handler.
-(defun gdb-source (args)
- (string-match gdb-source-spec-regexp args)
- ;; Extract the frame position from the marker.
- (setq gud-last-frame
- (cons
- (match-string 1 args)
- (string-to-int (match-string 2 args))))
- (setq gdb-current-address (match-string 3 args))
- (setq gdb-view-source t))
-
-(defun gdb-send-item (item)
- (gdb-set-current-item item)
- (if (stringp item)
- (progn
- (gdb-set-output-sink 'user)
- (process-send-string (get-buffer-process gud-comint-buffer) item))
- (progn
- (gdb-clear-partial-output)
- (gdb-set-output-sink 'pre-emacs)
- (process-send-string (get-buffer-process gud-comint-buffer)
- (car item)))))
-
-(defun gdb-pre-prompt (ignored)
- "An annotation handler for `pre-prompt'. This terminates the collection of
-output from a previous command if that happens to be in effect."
- (let ((sink (gdb-get-output-sink)))
- (cond
- ((eq sink 'user) t)
- ((eq sink 'emacs)
- (gdb-set-output-sink 'post-emacs)
- (let ((handler
- (car (cdr (gdb-get-current-item)))))
- (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer)
- (funcall handler))))
- (t
- (gdb-set-output-sink 'user)
- (error "Phase error in gdb-pre-prompt (got %s)" sink)))))
-
-(defun gdb-prompt (ignored)
- "An annotation handler for `prompt'.
-This sends the next command (if any) to gdb."
- (let ((sink (gdb-get-output-sink)))
- (cond
- ((eq sink 'user) t)
- ((eq sink 'post-emacs)
- (gdb-set-output-sink 'user))
- (t
- (gdb-set-output-sink 'user)
- (error "Phase error in gdb-prompt (got %s)" sink))))
- (let ((highest (gdb-dequeue-input)))
- (if highest
- (gdb-send-item highest)
- (let ((lowest (gdb-dequeue-idle-input)))
- (if lowest
- (gdb-send-item lowest)
- (progn
- (gdb-set-prompting t)
- (gud-display-frame)))))))
-
-(defun gdb-subprompt (ignored)
- "An annotation handler for non-top-level prompts."
- (let ((highest (gdb-dequeue-input)))
- (if highest
- (gdb-send-item highest)
- (gdb-set-prompting t))))
-
-(defun gdb-starting (ignored)
- "An annotation handler for `starting'. This says that I/O for the
-subprocess is now the program being debugged, not GDB."
- (let ((sink (gdb-get-output-sink)))
- (cond
- ((eq sink 'user)
- (progn
- (setq gud-running t)
- (gdb-set-output-sink 'inferior)))
- (t (error "Unexpected `starting' annotation")))))
-
-(defun gdb-stopping (ignored)
- "An annotation handler for `exited' and other annotations which say that I/O
-for the subprocess is now GDB, not the program being debugged."
- (let ((sink (gdb-get-output-sink)))
- (cond
- ((eq sink 'inferior)
- (gdb-set-output-sink 'user))
- (t (error "Unexpected stopping annotation")))))
-
-(defun gdb-frame-begin (ignored)
- (let ((sink (gdb-get-output-sink)))
- (cond
- ((eq sink 'inferior)
- (gdb-set-output-sink 'user))
- ((eq sink 'user) t)
- ((eq sink 'emacs) t)
- (t (error "Unexpected frame-begin annotation (%S)" sink)))))
-
-(defun gdb-stopped (ignored)
- "An annotation handler for `stopped'. It is just like gdb-stopping, except
-that if we already set the output sink to 'user in gdb-stopping, that is fine."
- (setq gud-running nil)
- (let ((sink (gdb-get-output-sink)))
- (cond
- ((eq sink 'inferior)
- (gdb-set-output-sink 'user))
- ((eq sink 'user) t)
- (t (error "Unexpected stopped annotation")))))
-
-(defun gdb-post-prompt (ignored)
- "An annotation handler for `post-prompt'. This begins the collection of
-output from the current command if that happens to be appropriate."
- (if (not (gdb-get-pending-triggers))
- (progn
- (gdb-get-current-frame)
- (gdb-invalidate-frames)
- (gdb-invalidate-breakpoints)
- (gdb-invalidate-assembler)
- (gdb-invalidate-registers)
- (gdb-invalidate-locals)
- (gdb-invalidate-display)
- (gdb-invalidate-threads)))
- (let ((sink (gdb-get-output-sink)))
- (cond
- ((eq sink 'user) t)
- ((eq sink 'pre-emacs)
- (gdb-set-output-sink 'emacs))
- (t
- (gdb-set-output-sink 'user)
- (error "Phase error in gdb-post-prompt (got %s)" sink)))))
-
-;; If we get an error whilst evaluating one of the expressions
-;; we won't get the display-end annotation. Set the sink back to
-;; user to make sure that the error message is seen.
-;; NOT USED: see annotation-rules for reason.
-;(defun gdb-error-begin (ignored)
-; (gdb-set-output-sink 'user))
-
-(defun gdb-display-begin (ignored)
- (gdb-set-output-sink 'emacs)
- (gdb-clear-partial-output)
- (setq gdb-display-in-progress t))
-
-(defvar gdb-expression-buffer-name nil)
-(defvar gdb-display-number nil)
-(defvar gdb-dive-display-number nil)
-
-(defun gdb-display-number-end (ignored)
- (set-buffer (gdb-get-buffer 'gdb-partial-output-buffer))
- (setq gdb-display-number (buffer-string))
- (setq gdb-expression-buffer-name
- (concat "*display " gdb-display-number "*"))
- (save-excursion
- (if (progn
- (set-buffer (window-buffer))
- gdb-dive)
- (progn
- (let ((number gdb-display-number))
- (switch-to-buffer
- (set-buffer (get-buffer-create gdb-expression-buffer-name)))
- (gdb-expressions-mode)
- (setq gdb-dive-display-number number)))
- (set-buffer (get-buffer-create gdb-expression-buffer-name))
- (if (display-graphic-p)
- (catch 'frame-exists
- (dolist (frame (frame-list))
- (if (string-equal (frame-parameter frame 'name)
- gdb-expression-buffer-name)
- (throw 'frame-exists nil)))
- (gdb-expressions-mode)
- (make-frame `((height . ,gdb-window-height)
- (width . ,gdb-window-width)
- (tool-bar-lines . nil)
- (menu-bar-lines . nil)
- (minibuffer . nil))))
- (gdb-expressions-mode)
- (gdb-display-buffer (get-buffer gdb-expression-buffer-name)))))
- (set-buffer (gdb-get-buffer 'gdb-partial-output-buffer))
- (setq gdb-dive nil))
-
-(defvar gdb-nesting-level nil)
-(defvar gdb-expression nil)
-(defvar gdb-point nil)
-(defvar gdb-annotation-arg nil)
-
-(defun gdb-delete-line ()
- "Delete the current line."
- (delete-region (line-beginning-position) (line-beginning-position 2)))
-
-(defun gdb-display-end (ignored)
- (set-buffer (gdb-get-buffer 'gdb-partial-output-buffer))
- (goto-char (point-min))
- (search-forward ": ")
- (looking-at "\\(.*?\\) =")
- (let ((char "")
- (gdb-temp-value (match-string 1)))
- ;;move * to front of expression if necessary
- (if (looking-at ".*\\*")
- (progn
- (setq char "*")
- (setq gdb-temp-value (substring gdb-temp-value 1 nil))))
- (with-current-buffer gdb-expression-buffer-name
- (setq gdb-expression gdb-temp-value)
- (if (not (string-match "::" gdb-expression))
- (setq gdb-expression (concat char gdb-current-frame
- "::" gdb-expression))
- ;;else put * back on if necessary
- (setq gdb-expression (concat char gdb-expression)))
- (if (not header-line-format)
- (setq header-line-format (concat "-- " gdb-expression " %-")))))
- ;;
- ;;-if scalar/string
- (if (not (re-search-forward "##" nil t))
- (progn
- (with-current-buffer gdb-expression-buffer-name
- (let ((buffer-read-only nil))
- (delete-region (point-min) (point-max))
- (insert-buffer-substring
- (gdb-get-buffer 'gdb-partial-output-buffer)))))
- ;; display expression name...
- (goto-char (point-min))
- (let ((start (progn (point)))
- (end (progn (end-of-line) (point))))
- (with-current-buffer gdb-expression-buffer-name
- (let ((buffer-read-only nil))
- (delete-region (point-min) (point-max))
- (insert-buffer-substring (gdb-get-buffer
- 'gdb-partial-output-buffer)
- start end)
- (insert "\n"))))
- (goto-char (point-min))
- (re-search-forward "##" nil t)
- (setq gdb-nesting-level 0)
- (if (looking-at "array-section-begin")
- (progn
- (gdb-delete-line)
- (setq gdb-point (point))
- (gdb-array-format)))
- (if (looking-at "field-begin \\(.\\)")
- (progn
- (setq gdb-annotation-arg (match-string 1))
- (gdb-field-format-begin))))
- (with-current-buffer gdb-expression-buffer-name
- (if gdb-dive-display-number
- (progn
- (let ((buffer-read-only nil))
- (goto-char (point-max))
- (insert "\n")
- (insert-text-button "[back]" 'type 'gdb-display-back)))))
- (gdb-clear-partial-output)
- (gdb-set-output-sink 'user)
- (setq gdb-display-in-progress nil))
-
-(define-button-type 'gdb-display-back
- 'help-echo "mouse-2, RET: go back to previous display buffer"
- 'action (lambda (button) (gdb-display-go-back)))
-
-(defun gdb-display-go-back ()
- ;; delete display so they don't accumulate and delete buffer
- (let ((number gdb-display-number))
- (gdb-enqueue-input
- (list (concat "server delete display " number "\n") 'ignore))
- (switch-to-buffer (concat "*display " gdb-dive-display-number "*"))
- (kill-buffer (get-buffer (concat "*display " number "*")))))
-
-;; prefix annotations with ## and process whole output in one chunk
-;; in gdb-partial-output-buffer (to allow recursion).
-
-;; array-section flags are just removed again but after counting. They
-;; might also be useful for arrays of structures and structures with arrays.
-(defun gdb-array-section-begin (args)
- (if gdb-display-in-progress
- (progn
- (with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer)
- (goto-char (point-max))
- (insert (concat "\n##array-section-begin " args "\n"))))))
-
-(defun gdb-array-section-end (ignored)
- (if gdb-display-in-progress
- (progn
- (with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer)
- (goto-char (point-max))
- (insert "\n##array-section-end\n")))))
-
-(defun gdb-field-begin (args)
- (if gdb-display-in-progress
- (progn
- (with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer)
- (goto-char (point-max))
- (insert (concat "\n##field-begin " args "\n"))))))
-
-(defun gdb-field-end (ignored)
- (if gdb-display-in-progress
- (progn
- (with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer)
- (goto-char (point-max))
- (insert "\n##field-end\n")))))
-
-(defun gdb-elt (ignored)
- (if gdb-display-in-progress
- (progn
- (goto-char (point-max))
- (insert "\n##elt\n"))))
-
-(defun gdb-field-format-begin ()
- ;; get rid of ##field-begin
- (gdb-delete-line)
- (gdb-insert-field)
- (setq gdb-nesting-level (+ gdb-nesting-level 1))
- (while (re-search-forward "##" nil t)
- ;; keep making recursive calls...
- (if (looking-at "field-begin \\(.\\)")
- (progn
- (setq gdb-annotation-arg (match-string 1))
- (gdb-field-format-begin)))
- ;; until field-end.
- (if (looking-at "field-end") (gdb-field-format-end))))
-
-(defun gdb-field-format-end ()
- ;; get rid of ##field-end and `,' or `}'
- (gdb-delete-line)
- (gdb-delete-line)
- (setq gdb-nesting-level (- gdb-nesting-level 1)))
-
-(defvar gdb-dive-map
- (let ((map (make-sparse-keymap)))
- (define-key map [mouse-2] 'gdb-dive)
- (define-key map [S-mouse-2] 'gdb-dive-new-frame)
- map))
-
-(defun gdb-dive (event)
- "Dive into structure."
- (interactive "e")
- (setq gdb-dive t)
- (gdb-dive-new-frame event))
-
-(defun gdb-dive-new-frame (event)
- "Dive into structure and display in a new frame."
- (interactive "e")
- (save-excursion
- (mouse-set-point event)
- (let ((point (point)) (gdb-full-expression gdb-expression)
- (end (progn (end-of-line) (point)))
- (gdb-part-expression "") (gdb-last-field nil) (gdb-display-char nil))
- (beginning-of-line)
- (if (looking-at "\*") (setq gdb-display-char "*"))
- (re-search-forward "\\(\\S-+\\) = " end t)
- (setq gdb-last-field (match-string-no-properties 1))
- (goto-char (match-beginning 1))
- (let ((last-column (current-column)))
- (while (re-search-backward "\\s-\\(\\S-+\\) = {" nil t)
- (goto-char (match-beginning 1))
- (if (and (< (current-column) last-column)
- (> (count-lines 1 (point)) 1))
- (progn
- (setq gdb-part-expression
- (concat "." (match-string-no-properties 1)
- gdb-part-expression))
- (setq last-column (current-column))))))
- ;; * not needed for components of a pointer to a structure in gdb
- (if (string-equal "*" (substring gdb-full-expression 0 1))
- (setq gdb-full-expression (substring gdb-full-expression 1 nil)))
- (setq gdb-full-expression
- (concat gdb-full-expression gdb-part-expression "." gdb-last-field))
- (gdb-enqueue-input
- (list (concat "server display" gdb-display-char
- " " gdb-full-expression "\n")
- 'ignore)))))
-
-(defun gdb-insert-field ()
- (let ((start (progn (point)))
- (end (progn (next-line) (point)))
- (num 0))
- (with-current-buffer gdb-expression-buffer-name
- (let ((buffer-read-only nil))
- (if (string-equal gdb-annotation-arg "\*") (insert "\*"))
- (while (<= num gdb-nesting-level)
- (insert "\t")
- (setq num (+ num 1)))
- (insert-buffer-substring (gdb-get-buffer
- 'gdb-partial-output-buffer)
- start end)
- (add-text-properties
- (- (point) (- end start)) (- (point) 1)
- `(mouse-face highlight
- local-map ,gdb-dive-map
- help-echo "mouse-2: dive, S-mouse-2: dive in a new frame"))))
- (delete-region start end)))
-
-(defvar gdb-values nil)
-
-(defun gdb-array-format ()
- (while (re-search-forward "##" nil t)
- ;; keep making recursive calls...
- (if (looking-at "array-section-begin")
- (progn
- ;;get rid of ##array-section-begin
- (gdb-delete-line)
- (setq gdb-nesting-level (+ gdb-nesting-level 1))
- (gdb-array-format)))
- ;;until *matching* array-section-end is found
- (if (looking-at "array-section-end")
- (if (eq gdb-nesting-level 0)
- (progn
- (let ((values (buffer-substring gdb-point (- (point) 2))))
- (with-current-buffer gdb-expression-buffer-name
- (setq gdb-values
- (concat "{" (replace-regexp-in-string "\n" "" values)
- "}"))
- (gdb-array-format1))))
- ;;else get rid of ##array-section-end etc
- (gdb-delete-line)
- (setq gdb-nesting-level (- gdb-nesting-level 1))
- (gdb-array-format)))))
-
-(defvar gdb-array-start nil)
-(defvar gdb-array-stop nil)
-
-(defvar gdb-array-slice-map
- (let ((map (make-sparse-keymap)))
- (define-key map "\r" 'gdb-array-slice)
- (define-key map [mouse-2] 'gdb-mouse-array-slice)
- map))
-
-(defun gdb-mouse-array-slice (event)
- "Select an array slice to display."
- (interactive "e")
- (mouse-set-point event)
- (gdb-array-slice))
-
-(defun gdb-array-slice ()
- (interactive)
- (save-excursion
- (let ((n -1) (stop 0) (start 0) (point (point)))
- (beginning-of-line)
- (while (search-forward "[" point t)
- (setq n (+ n 1)))
- (setq start (string-to-int (read-string "Start index: ")))
- (aset gdb-array-start n start)
- (setq stop (string-to-int (read-string "Stop index: ")))
- (aset gdb-array-stop n stop)))
- (gdb-array-format1))
-
-(defvar gdb-display-string nil)
-(defvar gdb-array-size nil)
-
-(defun gdb-array-format1 ()
- (setq gdb-display-string "")
- (let ((buffer-read-only nil))
- (delete-region (point-min) (point-max))
- (let ((gdb-value-list (split-string gdb-values ", ")))
- (string-match "\\({+\\)" (car gdb-value-list))
- (let* ((depth (- (match-end 1) (match-beginning 1)))
- (indices (make-vector depth '0))
- (index 0) (num 0) (array-start "")
- (array-stop "") (array-slice "") (array-range nil)
- (flag t) (indices-string ""))
- (dolist (gdb-value gdb-value-list)
- (string-match "{*\\([^}]*\\)\\(}*\\)" gdb-value)
- (setq num 0)
- (while (< num depth)
- (setq indices-string
- (concat indices-string
- "[" (int-to-string (aref indices num)) "]"))
- (if (not (= (aref gdb-array-start num) -1))
- (if (or (< (aref indices num) (aref gdb-array-start num))
- (> (aref indices num) (aref gdb-array-stop num)))
- (setq flag nil))
- (aset gdb-array-size num (aref indices num)))
- (setq num (+ num 1)))
- (if flag
- (let ((gdb-display-value (match-string 1 gdb-value)))
- (setq gdb-display-string (concat gdb-display-string " "
- gdb-display-value))
- (insert
- (concat indices-string "\t" gdb-display-value "\n"))))
- (setq indices-string "")
- (setq flag t)
- ;; 0<= index < depth, start at right : (- depth 1)
- (setq index (- (- depth 1)
- (- (match-end 2) (match-beginning 2))))
- ;;don't set for very last brackets
- (when (>= index 0)
- (aset indices index (+ 1 (aref indices index)))
- (setq num (+ 1 index))
- (while (< num depth)
- (aset indices num 0)
- (setq num (+ num 1)))))
- (setq num 0)
- (while (< num depth)
- (if (= (aref gdb-array-start num) -1)
- (progn
- (aset gdb-array-start num 0)
- (aset gdb-array-stop num (aref indices num))))
- (setq array-start (int-to-string (aref gdb-array-start num)))
- (setq array-stop (int-to-string (aref gdb-array-stop num)))
- (setq array-range (concat "[" array-start
- ":" array-stop "]"))
- (add-text-properties
- 1 (+ (length array-start) (length array-stop) 2)
- `(mouse-face highlight
- local-map ,gdb-array-slice-map
- help-echo "mouse-2, RET: select slice for this index") array-range)
- (goto-char (point-min))
- (setq array-slice (concat array-slice array-range))
- (setq num (+ num 1)))
- (goto-char (point-min))
- (insert "Array Size : ")
- (setq num 0)
- (while (< num depth)
- (insert
- (concat "["
- (int-to-string (+ (aref gdb-array-size num) 1)) "]"))
- (setq num (+ num 1)))
- (insert
- (concat "\n Slice : " array-slice "\n\nIndex\tValues\n\n"))))))
-
-(defun gud-gdba-marker-filter (string)
- "A gud marker filter for gdb. Handle a burst of output from GDB."
- (let (
- ;; Recall the left over burst from last time
- (burst (concat (gdb-get-burst) string))
- ;; Start accumulating output for the GUD buffer
- (output ""))
- ;;
- ;; Process all the complete markers in this chunk.
- (while (string-match "\n\032\032\\(.*\\)\n" burst)
- (let ((annotation (match-string 1 burst)))
- ;;
- ;; Stuff prior to the match is just ordinary output.
- ;; It is either concatenated to OUTPUT or directed
- ;; elsewhere.
- (setq output
- (gdb-concat-output
- output
- (substring burst 0 (match-beginning 0))))
-
- ;; Take that stuff off the burst.
- (setq burst (substring burst (match-end 0)))
-
- ;; Parse the tag from the annotation, and maybe its arguments.
- (string-match "\\(\\S-*\\) ?\\(.*\\)" annotation)
- (let* ((annotation-type (match-string 1 annotation))
- (annotation-arguments (match-string 2 annotation))
- (annotation-rule (assoc annotation-type
- gdb-annotation-rules)))
- ;; Call the handler for this annotation.
- (if annotation-rule
- (funcall (car (cdr annotation-rule))
- annotation-arguments)
- ;; Else the annotation is not recognized. Ignore it silently,
- ;; so that GDB can add new annotations without causing
- ;; us to blow up.
- ))))
- ;;
- ;; Does the remaining text end in a partial line?
- ;; If it does, then keep part of the burst until we get more.
- (if (string-match "\n\\'\\|\n\032\\'\\|\n\032\032.*\\'"
- burst)
- (progn
- ;; Everything before the potential marker start can be output.
- (setq output
- (gdb-concat-output output
- (substring burst 0 (match-beginning 0))))
- ;;
- ;; Everything after, we save, to combine with later input.
- (setq burst (substring burst (match-beginning 0))))
- ;;
- ;; In case we know the burst contains no partial annotations:
- (progn
- (setq output (gdb-concat-output output burst))
- (setq burst "")))
- ;;
- ;; Save the remaining burst for the next call to this function.
- (gdb-set-burst burst)
- output))
-
-(defun gdb-concat-output (so-far new)
- (let ((sink (gdb-get-output-sink )))
- (cond
- ((eq sink 'user) (concat so-far new))
- ((or (eq sink 'pre-emacs) (eq sink 'post-emacs)) so-far)
- ((eq sink 'emacs)
- (gdb-append-to-partial-output new)
- so-far)
- ((eq sink 'inferior)
- (gdb-append-to-inferior-io new)
- so-far)
- (t (error "Bogon output sink %S" sink)))))
-
-(defun gdb-append-to-partial-output (string)
- (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer)
- (goto-char (point-max))
- (insert string)))
-
-(defun gdb-clear-partial-output ()
- (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer)
- (delete-region (point-min) (point-max))))
-
-(defun gdb-append-to-inferior-io (string)
- (with-current-buffer (gdb-get-create-buffer 'gdb-inferior-io)
- (goto-char (point-max))
- (insert-before-markers string))
- (if (not (string-equal string ""))
- (gdb-display-buffer (gdb-get-create-buffer 'gdb-inferior-io))))
-
-(defun gdb-clear-inferior-io ()
- (with-current-buffer (gdb-get-create-buffer 'gdb-inferior-io)
- (delete-region (point-min) (point-max))))
-\f
-
-;; One trick is to have a command who's output is always available in a buffer
-;; of it's own, and is always up to date. We build several buffers of this
-;; type.
-;;
-;; There are two aspects to this: gdb has to tell us when the output for that
-;; command might have changed, and we have to be able to run the command
-;; behind the user's back.
-;;
-;; The idle input queue and the output phasing associated with the variable
-;; gdb-output-sink help us to run commands behind the user's back.
-;;
-;; Below is the code for specificly managing buffers of output from one
-;; command.
-;;
-
-;; The trigger function is suitable for use in the assoc GDB-ANNOTATION-RULES
-;; It adds an idle input for the command we are tracking. It should be the
-;; annotation rule binding of whatever gdb sends to tell us this command
-;; might have changed it's output.
-;;
-;; NAME is the function name. DEMAND-PREDICATE tests if output is really needed.
-;; GDB-COMMAND is a string of such. OUTPUT-HANDLER is the function bound to the
-;; input in the input queue (see comment about ``gdb communications'' above).
-
-(defmacro def-gdb-auto-update-trigger (name demand-predicate gdb-command
- output-handler)
- `(defun ,name (&optional ignored)
- (if (and (,demand-predicate)
- (not (member ',name
- (gdb-get-pending-triggers))))
- (progn
- (gdb-enqueue-idle-input
- (list ,gdb-command ',output-handler))
- (gdb-set-pending-triggers
- (cons ',name
- (gdb-get-pending-triggers)))))))
-
-(defmacro def-gdb-auto-update-handler (name trigger buf-key custom-defun)
- `(defun ,name ()
- (gdb-set-pending-triggers
- (delq ',trigger
- (gdb-get-pending-triggers)))
- (let ((buf (gdb-get-buffer ',buf-key)))
- (and buf
- (with-current-buffer buf
- (let ((p (point))
- (buffer-read-only nil))
- (delete-region (point-min) (point-max))
- (insert-buffer-substring (gdb-get-create-buffer
- 'gdb-partial-output-buffer))
- (goto-char p)))))
- ;; put customisation here
- (,custom-defun)))
-
-(defmacro def-gdb-auto-updated-buffer (buffer-key trigger-name gdb-command
- output-handler-name custom-defun)
- `(progn
- (def-gdb-auto-update-trigger ,trigger-name
- ;; The demand predicate:
- (lambda () (gdb-get-buffer ',buffer-key))
- ,gdb-command
- ,output-handler-name)
- (def-gdb-auto-update-handler ,output-handler-name
- ,trigger-name ,buffer-key ,custom-defun)))
-
-\f
-;;
-;; Breakpoint buffer : This displays the output of `info breakpoints'.
-;;
-(gdb-set-buffer-rules 'gdb-breakpoints-buffer
- 'gdb-breakpoints-buffer-name
- 'gdb-breakpoints-mode)
-
-(def-gdb-auto-updated-buffer gdb-breakpoints-buffer
- ;; This defines the auto update rule for buffers of type
- ;; `gdb-breakpoints-buffer'.
- ;;
- ;; It defines a function to serve as the annotation handler that
- ;; handles the `foo-invalidated' message. That function is called:
- gdb-invalidate-breakpoints
- ;;
- ;; To update the buffer, this command is sent to gdb.
- "server info breakpoints\n"
- ;;
- ;; This also defines a function to be the handler for the output
- ;; from the command above. That function will copy the output into
- ;; the appropriately typed buffer. That function will be called:
- gdb-info-breakpoints-handler
- ;; buffer specific functions
- gdb-info-breakpoints-custom)
-
-(defvar gdb-cdir nil "Compilation directory.")
-
-(defconst breakpoint-xpm-data "/* XPM */
-static char *magick[] = {
-/* columns rows colors chars-per-pixel */
-\"12 12 2 1\",
-\" c red\",
-\"+ c None\",
-/* pixels */
-\"++++++++++++\",
-\"+++ +++\",
-\"++ ++\",
-\"+ +\",
-\"+ +\",
-\"+ +\",
-\"+ +\",
-\"+ +\",
-\"+ +\",
-\"++ ++\",
-\"+++ +++\",
-\"++++++++++++\"
-};"
- "XPM data used for breakpoint icon.")
-
-(defconst breakpoint-enabled-pbm-data
-"P1
-12 12\",
-0 0 0 0 0 0 0 0 0 0 0 0
-0 0 0 1 1 1 1 1 1 0 0 0
-0 0 1 1 1 1 1 1 1 1 0 0
-0 1 1 1 1 1 1 1 1 1 1 0
-0 1 1 1 1 1 1 1 1 1 1 0
-0 1 1 1 1 1 1 1 1 1 1 0
-0 1 1 1 1 1 1 1 1 1 1 0
-0 1 1 1 1 1 1 1 1 1 1 0
-0 1 1 1 1 1 1 1 1 1 1 0
-0 0 1 1 1 1 1 1 1 1 0 0
-0 0 0 1 1 1 1 1 1 0 0 0
-0 0 0 0 0 0 0 0 0 0 0 0"
- "PBM data used for enabled breakpoint icon.")
-
-(defconst breakpoint-disabled-pbm-data
-"P1
-12 12\",
-0 0 0 0 0 0 0 0 0 0 0 0
-0 0 0 1 0 1 0 1 0 0 0 0
-0 0 1 0 1 0 1 0 1 0 0 0
-0 1 0 1 0 1 0 1 0 1 0 0
-0 0 1 0 1 0 1 0 1 0 1 0
-0 1 0 1 0 1 0 1 0 1 0 0
-0 0 1 0 1 0 1 0 1 0 1 0
-0 1 0 1 0 1 0 1 0 1 0 0
-0 0 1 0 1 0 1 0 1 0 1 0
-0 0 0 1 0 1 0 1 0 1 0 0
-0 0 0 0 1 0 1 0 1 0 0 0
-0 0 0 0 0 0 0 0 0 0 0 0"
- "PBM data used for disabled breakpoint icon.")
-
-(defvar breakpoint-enabled-icon
- (find-image `((:type xpm :data ,breakpoint-xpm-data)
- (:type pbm :data ,breakpoint-enabled-pbm-data)))
- "Icon for enabled breakpoint in display margin")
-
-(defvar breakpoint-disabled-icon
- (find-image `((:type xpm :data ,breakpoint-xpm-data :conversion disabled)
- (:type pbm :data ,breakpoint-disabled-pbm-data)))
- "Icon for disabled breakpoint in display margin")
-
-;;-put breakpoint icons in relevant margins (even those set in the GUD buffer)
-(defun gdb-info-breakpoints-custom ()
- (let ((flag)(address))
- ;;
- ;; remove all breakpoint-icons in source buffers but not assembler buffer
- (dolist (buffer (buffer-list))
- (with-current-buffer buffer
- (if (and (eq gud-minor-mode 'gdba)
- (not (string-match "^\*" (buffer-name))))
- (if (display-images-p)
- (remove-images (point-min) (point-max))
- (gdb-remove-strings (point-min) (point-max))))))
- (with-current-buffer (gdb-get-buffer 'gdb-breakpoints-buffer)
- (save-excursion
- (goto-char (point-min))
- (while (< (point) (- (point-max) 1))
- (forward-line 1)
- (if (looking-at "[^\t].*breakpoint")
- (progn
- (looking-at "[0-9]*\\s-*\\S-*\\s-*\\S-*\\s-*\\(.\\)")
- (setq flag (char-after (match-beginning 1)))
- (beginning-of-line)
- (if (re-search-forward "in\\s-+\\S-+\\s-+at\\s-+" nil t)
- (progn
- (looking-at "\\(\\S-*\\):\\([0-9]+\\)")
- (let ((line (match-string 2)) (buffer-read-only nil)
- (file (match-string 1)))
- (add-text-properties (point-at-bol) (point-at-eol)
- '(mouse-face highlight
- help-echo "mouse-2, RET: visit breakpoint"))
- (with-current-buffer
- (find-file-noselect
- (if (file-exists-p file) file
- (expand-file-name file gdb-cdir)))
- (save-current-buffer
- (set (make-local-variable 'gud-minor-mode) 'gdba)
- (set (make-local-variable 'tool-bar-map)
- gud-tool-bar-map)
- (setq left-margin-width 2)
- (if (get-buffer-window (current-buffer))
- (set-window-margins (get-buffer-window
- (current-buffer))
- left-margin-width
- right-margin-width)))
- ;; only want one breakpoint icon at each location
- (save-excursion
- (goto-line (string-to-number line))
- (let ((start (progn (beginning-of-line)
- (- (point) 1)))
- (end (progn (end-of-line) (+ (point) 1))))
- (if (display-images-p)
- (progn
- (remove-images start end)
- (if (eq ?y flag)
- (put-image breakpoint-enabled-icon
- (+ start 1)
- "breakpoint icon enabled"
- 'left-margin)
- (put-image breakpoint-disabled-icon
- (+ start 1)
- "breakpoint icon disabled"
- 'left-margin)))
- (gdb-remove-strings start end)
- (if (eq ?y flag)
- (gdb-put-string "B" (+ start 1))
- (gdb-put-string "b" (+ start 1))))))))))))
- (end-of-line)))))
- (if (gdb-get-buffer 'gdb-assembler-buffer) (gdb-assembler-custom)))
-
-(defun gdb-breakpoints-buffer-name ()
- (with-current-buffer gud-comint-buffer
- (concat "*breakpoints of " (gdb-get-target-string) "*")))
-
-(defun gdb-display-breakpoints-buffer ()
- (interactive)
- (gdb-display-buffer
- (gdb-get-create-buffer 'gdb-breakpoints-buffer)))
-
-(defun gdb-frame-breakpoints-buffer ()
- (interactive)
- (switch-to-buffer-other-frame
- (gdb-get-create-buffer 'gdb-breakpoints-buffer)))
-
-(defvar gdb-breakpoints-mode-map
- (let ((map (make-sparse-keymap))
- (menu (make-sparse-keymap "Breakpoints")))
- (define-key menu [toggle] '("Toggle" . gdb-toggle-breakpoint))
- (define-key menu [delete] '("Delete" . gdb-delete-breakpoint))
- (define-key menu [goto] '("Goto" . gdb-goto-breakpoint))
-
- (suppress-keymap map)
- (define-key map [menu-bar breakpoints] (cons "Breakpoints" menu))
- (define-key map " " 'gdb-toggle-breakpoint)
- (define-key map "d" 'gdb-delete-breakpoint)
- (define-key map "\r" 'gdb-goto-breakpoint)
- (define-key map [mouse-2] 'gdb-mouse-goto-breakpoint)
- map))
-
-(defun gdb-breakpoints-mode ()
- "Major mode for gdb breakpoints.
-
-\\{gdb-breakpoints-mode-map}"
- (setq major-mode 'gdb-breakpoints-mode)
- (setq mode-name "Breakpoints")
- (use-local-map gdb-breakpoints-mode-map)
- (setq buffer-read-only t)
- (gdb-invalidate-breakpoints))
-
-(defun gdb-toggle-breakpoint ()
- "Enable/disable the breakpoint at current line."
- (interactive)
- (save-excursion
- (beginning-of-line 1)
- (if (not (looking-at "\\([0-9]+\\).*point\\s-*\\S-*\\s-*\\(.\\)"))
- (error "Not recognized as break/watchpoint line")
- (gdb-enqueue-input
- (list
- (concat
- (if (eq ?y (char-after (match-beginning 2)))
- "server disable "
- "server enable ")
- (match-string 1) "\n")
- 'ignore)))))
-
-(defun gdb-delete-breakpoint ()
- "Delete the breakpoint at current line."
- (interactive)
- (beginning-of-line 1)
- (if (not (looking-at "\\([0-9]+\\).*point\\s-*\\S-*\\s-*\\(.\\)"))
- (error "Not recognized as break/watchpoint line")
- (gdb-enqueue-input
- (list (concat "server delete " (match-string 1) "\n") 'ignore))))
-
-(defvar gdb-source-window nil)
-
-(defun gdb-goto-breakpoint ()
- "Display the file in the source buffer at the breakpoint specified on the
-current line."
- (interactive)
- (save-excursion
- (beginning-of-line 1)
- (re-search-forward "in\\s-+\\S-+\\s-+at\\s-+" nil t)
- (looking-at "\\(\\S-*\\):\\([0-9]+\\)"))
- (if (match-string 2)
- (let ((line (match-string 2))
- (file (match-string 1)))
- (save-selected-window
- (select-window gdb-source-window)
- (switch-to-buffer (find-file-noselect
- (if (file-exists-p file)
- file
- (expand-file-name file gdb-cdir))))
- (goto-line (string-to-number line))))))
-
-(defun gdb-mouse-goto-breakpoint (event)
- "Display the file in the source buffer at the selected breakpoint."
- (interactive "e")
- (mouse-set-point event)
- (gdb-goto-breakpoint))
-\f
-;;
-;; Frames buffer. This displays a perpetually correct bactracktrace
-;; (from the command `where').
-;;
-;; Alas, if your stack is deep, it is costly.
-;;
-(gdb-set-buffer-rules 'gdb-stack-buffer
- 'gdb-stack-buffer-name
- 'gdb-frames-mode)
-
-(def-gdb-auto-updated-buffer gdb-stack-buffer
- gdb-invalidate-frames
- "server where\n"
- gdb-info-frames-handler
- gdb-info-frames-custom)
-
-(defun gdb-info-frames-custom ()
- (with-current-buffer (gdb-get-buffer 'gdb-stack-buffer)
- (save-excursion
- (let ((buffer-read-only nil))
- (goto-char (point-min))
- (while (< (point) (point-max))
- (add-text-properties (point-at-bol) (point-at-eol)
- '(mouse-face highlight
- help-echo "mouse-2, RET: Select frame"))
- (beginning-of-line)
- (if (or (looking-at "^#[0-9]*\\s-*\\S-* in \\(\\S-*\\)")
- (looking-at "^#[0-9]*\\s-*\\(\\S-*\\)"))
- (if (equal (match-string 1) gdb-current-frame)
- (put-text-property (point-at-bol) (point-at-eol)
- 'face
- `(:background ,(face-attribute 'default :foreground)
- :foreground ,(face-attribute 'default :background)))))
- (forward-line 1))))))
-
-(defun gdb-stack-buffer-name ()
- (with-current-buffer gud-comint-buffer
- (concat "*stack frames of " (gdb-get-target-string) "*")))
-
-(defun gdb-display-stack-buffer ()
- (interactive)
- (gdb-display-buffer
- (gdb-get-create-buffer 'gdb-stack-buffer)))
-
-(defun gdb-frame-stack-buffer ()
- (interactive)
- (switch-to-buffer-other-frame
- (gdb-get-create-buffer 'gdb-stack-buffer)))
-
-(defvar gdb-frames-mode-map
- (let ((map (make-sparse-keymap)))
- (suppress-keymap map)
- (define-key map "\r" 'gdb-frames-select)
- (define-key map [mouse-2] 'gdb-frames-mouse-select)
- map))
-
-(defun gdb-frames-mode ()
- "Major mode for gdb frames.
-
-\\{gdb-frames-mode-map}"
- (setq major-mode 'gdb-frames-mode)
- (setq mode-name "Frames")
- (setq buffer-read-only t)
- (use-local-map gdb-frames-mode-map)
- (font-lock-mode -1)
- (gdb-invalidate-frames))
-
-(defun gdb-get-frame-number ()
- (save-excursion
- (let* ((pos (re-search-backward "^#\\([0-9]*\\)" nil t))
- (n (or (and pos (match-string-no-properties 1)) "0")))
- n)))
-
-(defun gdb-frames-select ()
- "Make the frame on the current line become the current frame and display the
-source in the source buffer."
- (interactive)
- (gdb-enqueue-input
- (list (concat "server frame " (gdb-get-frame-number) "\n") 'ignore))
- (gud-display-frame))
-
-(defun gdb-frames-mouse-select (event)
- "Make the selected frame become the current frame and display the source in
-the source buffer."
- (interactive "e")
- (mouse-set-point event)
- (gdb-frames-select))
-\f
-;;
-;; Threads buffer. This displays a selectable thread list.
-;;
-(gdb-set-buffer-rules 'gdb-threads-buffer
- 'gdb-threads-buffer-name
- 'gdb-threads-mode)
-
-(def-gdb-auto-updated-buffer gdb-threads-buffer
- gdb-invalidate-threads
- "info threads\n"
- gdb-info-threads-handler
- gdb-info-threads-custom)
-
-(defun gdb-info-threads-custom ()
- (with-current-buffer (gdb-get-buffer 'gdb-threads-buffer)
- (let ((buffer-read-only nil))
- (goto-char (point-min))
- (while (< (point) (point-max))
- (add-text-properties (point-at-bol) (point-at-eol)
- '(mouse-face highlight
- help-echo "mouse-2, RET: select thread"))
- (forward-line 1)))))
-
-(defun gdb-threads-buffer-name ()
- (with-current-buffer gud-comint-buffer
- (concat "*threads of " (gdb-get-target-string) "*")))
-
-(defun gdb-display-threads-buffer ()
- (interactive)
- (gdb-display-buffer
- (gdb-get-create-buffer 'gdb-threads-buffer)))
-
-(defun gdb-frame-threads-buffer ()
- (interactive)
- (switch-to-buffer-other-frame
- (gdb-get-create-buffer 'gdb-threads-buffer)))
-
-(defvar gdb-threads-mode-map
- (let ((map (make-sparse-keymap)))
- (suppress-keymap map)
- (define-key map "\r" 'gdb-threads-select)
- (define-key map [mouse-2] 'gdb-threads-mouse-select)
- map))
-
-(defun gdb-threads-mode ()
- "Major mode for gdb frames.
-
-\\{gdb-frames-mode-map}"
- (setq major-mode 'gdb-threads-mode)
- (setq mode-name "Threads")
- (setq buffer-read-only t)
- (use-local-map gdb-threads-mode-map)
- (gdb-invalidate-threads))
-
-(defun gdb-get-thread-number ()
- (save-excursion
- (re-search-backward "^\\s-*\\([0-9]*\\)" nil t)
- (match-string-no-properties 1)))
-
-
-(defun gdb-threads-select ()
- "Make the thread on the current line become the current thread and display the
-source in the source buffer."
- (interactive)
- (gdb-enqueue-input
- (list (concat "thread " (gdb-get-thread-number) "\n") 'ignore))
- (gud-display-frame))
-
-(defun gdb-threads-mouse-select (event)
- "Make the selected frame become the current frame and display the source in
-the source buffer."
- (interactive "e")
- (mouse-set-point event)
- (gdb-threads-select))
-\f
-;;
-;; Registers buffer.
-;;
-(gdb-set-buffer-rules 'gdb-registers-buffer
- 'gdb-registers-buffer-name
- 'gdb-registers-mode)
-
-(def-gdb-auto-updated-buffer gdb-registers-buffer
- gdb-invalidate-registers
- "server info registers\n"
- gdb-info-registers-handler
- gdb-info-registers-custom)
-
-(defun gdb-info-registers-custom ())
-
-(defvar gdb-registers-mode-map
- (let ((map (make-sparse-keymap)))
- (suppress-keymap map)
- map))
-
-(defun gdb-registers-mode ()
- "Major mode for gdb registers.
-
-\\{gdb-registers-mode-map}"
- (setq major-mode 'gdb-registers-mode)
- (setq mode-name "Registers")
- (setq buffer-read-only t)
- (use-local-map gdb-registers-mode-map)
- (gdb-invalidate-registers))
-
-(defun gdb-registers-buffer-name ()
- (with-current-buffer gud-comint-buffer
- (concat "*registers of " (gdb-get-target-string) "*")))
-
-(defun gdb-display-registers-buffer ()
- (interactive)
- (gdb-display-buffer
- (gdb-get-create-buffer 'gdb-registers-buffer)))
-
-(defun gdb-frame-registers-buffer ()
- (interactive)
- (switch-to-buffer-other-frame
- (gdb-get-create-buffer 'gdb-registers-buffer)))
-\f
-;;
-;; Locals buffer.
-;;
-(gdb-set-buffer-rules 'gdb-locals-buffer
- 'gdb-locals-buffer-name
- 'gdb-locals-mode)
-
-(def-gdb-auto-updated-buffer gdb-locals-buffer
- gdb-invalidate-locals
- "server info locals\n"
- gdb-info-locals-handler
- gdb-info-locals-custom)
-
-;; Abbreviate for arrays and structures.
-;; These can be expanded using gud-display.
-(defun gdb-info-locals-handler nil
- (gdb-set-pending-triggers (delq 'gdb-invalidate-locals
- (gdb-get-pending-triggers)))
- (let ((buf (gdb-get-buffer 'gdb-partial-output-buffer)))
- (with-current-buffer buf
- (goto-char (point-min))
- (while (re-search-forward "^ .*\n" nil t)
- (replace-match "" nil nil))
- (goto-char (point-min))
- (while (re-search-forward "{[-0-9, {}\]*\n" nil t)
- (replace-match "(array);\n" nil nil))
- (goto-char (point-min))
- (while (re-search-forward "{.*=.*\n" nil t)
- (replace-match "(structure);\n" nil nil))))
- (let ((buf (gdb-get-buffer 'gdb-locals-buffer)))
- (and buf (with-current-buffer buf
- (let ((p (point))
- (buffer-read-only nil))
- (delete-region (point-min) (point-max))
- (insert-buffer-substring (gdb-get-create-buffer
- 'gdb-partial-output-buffer))
- (goto-char p)))))
- (run-hooks 'gdb-info-locals-hook))
-
-(defun gdb-info-locals-custom ()
- nil)
-
-(defvar gdb-locals-mode-map
- (let ((map (make-sparse-keymap)))
- (suppress-keymap map)
- map))
-
-(defun gdb-locals-mode ()
- "Major mode for gdb locals.
-
-\\{gdb-locals-mode-map}"
- (setq major-mode 'gdb-locals-mode)
- (setq mode-name "Locals")
- (setq buffer-read-only t)
- (use-local-map gdb-locals-mode-map)
- (gdb-invalidate-locals))
-
-(defun gdb-locals-buffer-name ()
- (with-current-buffer gud-comint-buffer
- (concat "*locals of " (gdb-get-target-string) "*")))
-
-(defun gdb-display-locals-buffer ()
- (interactive)
- (gdb-display-buffer
- (gdb-get-create-buffer 'gdb-locals-buffer)))
-
-(defun gdb-frame-locals-buffer ()
- (interactive)
- (switch-to-buffer-other-frame
- (gdb-get-create-buffer 'gdb-locals-buffer)))
-\f
-;;
-;; Display expression buffer.
-;;
-(gdb-set-buffer-rules 'gdb-display-buffer
- 'gdb-display-buffer-name
- 'gdb-display-mode)
-
-(def-gdb-auto-updated-buffer gdb-display-buffer
- ;; `gdb-display-buffer'.
- gdb-invalidate-display
- "server info display\n"
- gdb-info-display-handler
- gdb-info-display-custom)
-
-(defun gdb-info-display-custom ()
- (let ((display-list nil))
- (with-current-buffer (gdb-get-buffer 'gdb-display-buffer)
- (goto-char (point-min))
- (while (< (point) (- (point-max) 1))
- (forward-line 1)
- (if (looking-at "\\([0-9]+\\): \\([ny]\\)")
- (setq display-list
- (cons (string-to-int (match-string 1)) display-list)))
- (end-of-line)))
- (if (not (display-graphic-p))
- (progn
- (dolist (buffer (buffer-list))
- (if (string-match "\\*display \\([0-9]+\\)\\*" (buffer-name buffer))
- (progn
- (let ((number
- (match-string 1 (buffer-name buffer))))
- (if (not (memq (string-to-int number) display-list))
- (kill-buffer
- (get-buffer (concat "*display " number "*")))))))))
- (gdb-delete-frames display-list))))
-
-(defun gdb-delete-frames (display-list)
- (dolist (frame (frame-list))
- (let ((frame-name (frame-parameter frame 'name)))
- (if (string-match "\\*display \\([0-9]+\\)\\*" frame-name)
- (progn
- (let ((number (match-string 1 frame-name)))
- (if (not (memq (string-to-int number) display-list))
- (progn (kill-buffer
- (get-buffer (concat "*display " number "*")))
- (delete-frame frame)))))))))
-
-(defvar gdb-display-mode-map
- (let ((map (make-sparse-keymap))
- (menu (make-sparse-keymap "Display")))
- (define-key menu [toggle] '("Toggle" . gdb-toggle-display))
- (define-key menu [delete] '("Delete" . gdb-delete-display))
-
- (suppress-keymap map)
- (define-key map [menu-bar display] (cons "Display" menu))
- (define-key map " " 'gdb-toggle-display)
- (define-key map "d" 'gdb-delete-display)
- map))
-
-(defun gdb-display-mode ()
- "Major mode for gdb display.
-
-\\{gdb-display-mode-map}"
- (setq major-mode 'gdb-display-mode)
- (setq mode-name "Display")
- (setq buffer-read-only t)
- (use-local-map gdb-display-mode-map)
- (gdb-invalidate-display))
-
-(defun gdb-display-buffer-name ()
- (with-current-buffer gud-comint-buffer
- (concat "*Displayed expressions of " (gdb-get-target-string) "*")))
-
-(defun gdb-display-display-buffer ()
- (interactive)
- (gdb-display-buffer
- (gdb-get-create-buffer 'gdb-display-buffer)))
-
-(defun gdb-frame-display-buffer ()
- (interactive)
- (switch-to-buffer-other-frame
- (gdb-get-create-buffer 'gdb-display-buffer)))
-
-(defun gdb-toggle-display ()
- "Enable/disable the displayed expression at current line."
- (interactive)
- (save-excursion
- (beginning-of-line 1)
- (if (not (looking-at "\\([0-9]+\\): \\([ny]\\)"))
- (error "No expression on this line")
- (gdb-enqueue-input
- (list
- (concat
- (if (eq ?y (char-after (match-beginning 2)))
- "server disable display "
- "server enable display ")
- (match-string 1) "\n")
- 'ignore)))))
-
-(defun gdb-delete-display ()
- "Delete the displayed expression at current line."
- (interactive)
- (with-current-buffer (gdb-get-buffer 'gdb-display-buffer)
- (beginning-of-line 1)
- (if (not (looking-at "\\([0-9]+\\): \\([ny]\\)"))
- (error "No expression on this line")
- (let ((number (match-string 1)))
- (gdb-enqueue-input
- (list (concat "server delete display " number "\n") 'ignore))))))
-
-(defvar gdb-expressions-mode-map
- (let ((map (make-sparse-keymap)))
- (suppress-keymap map)
- (define-key map "v" 'gdb-array-visualise)
- (define-key map "q" 'gdb-delete-expression)
- (define-key map [mouse-3] 'gdb-expressions-popup-menu)
- map))
-
-(defvar gdb-expressions-mode-menu
- '("GDB Expressions Commands"
- "----"
- ["Visualise" gdb-array-visualise t]
- ["Delete" gdb-delete-expression t])
- "Menu for `gdb-expressions-mode'.")
-
-(defun gdb-expressions-popup-menu (event)
- "Explicit Popup menu as this buffer doesn't have a menubar."
- (interactive "@e")
- (mouse-set-point event)
- (popup-menu gdb-expressions-mode-menu))
-
-(defun gdb-expressions-mode ()
- "Major mode for display expressions.
-
-\\{gdb-expressions-mode-map}"
- (setq major-mode 'gdb-expressions-mode)
- (setq mode-name "Expressions")
- (use-local-map gdb-expressions-mode-map)
- (make-local-variable 'gdb-display-number)
- (make-local-variable 'gdb-values)
- (make-local-variable 'gdb-expression)
- (set (make-local-variable 'gdb-display-string) nil)
- (set (make-local-variable 'gdb-dive-display-number) nil)
- (set (make-local-variable 'gud-minor-mode) 'gdba)
- (set (make-local-variable 'gdb-array-start) (make-vector 16 '-1))
- (set (make-local-variable 'gdb-array-stop) (make-vector 16 '-1))
- (set (make-local-variable 'gdb-array-size) (make-vector 16 '-1))
- (setq buffer-read-only t))
-\f
-
-;;;; Window management
-
-;;; The way we abuse the dedicated-p flag is pretty gross, but seems
-;;; to do the right thing. Seeing as there is no way for Lisp code to
-;;; get at the use_time field of a window, I'm not sure there exists a
-;;; more elegant solution without writing C code.
-
-(defun gdb-display-buffer (buf &optional size)
- (let ((must-split nil)
- (answer nil))
- (unwind-protect
- (progn
- (walk-windows
- #'(lambda (win)
- (if (or (eq gud-comint-buffer (window-buffer win))
- (eq gdb-source-window win))
- (set-window-dedicated-p win t))))
- (setq answer (get-buffer-window buf))
- (if (not answer)
- (let ((window (get-lru-window)))
- (if window
- (progn
- (set-window-buffer window buf)
- (setq answer window))
- (setq must-split t)))))
- (walk-windows
- #'(lambda (win)
- (if (or (eq gud-comint-buffer (window-buffer win))
- (eq gdb-source-window win))
- (set-window-dedicated-p win nil)))))
- (if must-split
- (let* ((largest (get-largest-window))
- (cur-size (window-height largest))
- (new-size (and size (< size cur-size) (- cur-size size))))
- (setq answer (split-window largest new-size))
- (set-window-buffer answer buf)))
- answer))
-
-(defun gdb-display-source-buffer (buffer)
- (if (eq gdb-selected-view 'source)
- (progn
- (if (window-live-p gdb-source-window)
- (set-window-buffer gdb-source-window buffer)
- (gdb-display-buffer buffer)
- (setq gdb-source-window (get-buffer-window buffer)))
- gdb-source-window)
- (if (window-live-p gdb-source-window)
- (set-window-buffer gdb-source-window
- (gdb-get-buffer 'gdb-assembler-buffer))
- (let ((buf (gdb-get-buffer 'gdb-assembler-buffer)))
- (gdb-display-buffer buf)
- (setq gdb-source-window (get-buffer-window buf))))
- nil))
-
-\f
-;;; Shared keymap initialization:
-
-(let ((menu (make-sparse-keymap "GDB-Frames")))
- (define-key gud-menu-map [frames]
- `(menu-item "GDB-Frames" ,menu :visible (eq gud-minor-mode 'gdba)))
- (define-key menu [gdb] '("Gdb" . gdb-frame-gdb-buffer))
- (define-key menu [locals] '("Locals" . gdb-frame-locals-buffer))
- (define-key menu [registers] '("Registers" . gdb-frame-registers-buffer))
- (define-key menu [frames] '("Stack" . gdb-frame-stack-buffer))
- (define-key menu [breakpoints] '("Breakpoints" . gdb-frame-breakpoints-buffer))
- (define-key menu [display] '("Display" . gdb-frame-display-buffer))
- (define-key menu [threads] '("Threads" . gdb-frame-threads-buffer))
-; (define-key menu [assembler] '("Assembler" . gdb-frame-assembler-buffer))
-)
-
-(let ((menu (make-sparse-keymap "GDB-Windows")))
- (define-key gud-menu-map [displays]
- `(menu-item "GDB-Windows" ,menu :visible (eq gud-minor-mode 'gdba)))
- (define-key menu [gdb] '("Gdb" . gdb-display-gdb-buffer))
- (define-key menu [locals] '("Locals" . gdb-display-locals-buffer))
- (define-key menu [registers] '("Registers" . gdb-display-registers-buffer))
- (define-key menu [frames] '("Stack" . gdb-display-stack-buffer))
- (define-key menu [breakpoints] '("Breakpoints" . gdb-display-breakpoints-buffer))
- (define-key menu [display] '("Display" . gdb-display-display-buffer))
- (define-key menu [threads] '("Threads" . gdb-display-threads-buffer))
-; (define-key menu [assembler] '("Assembler" . gdb-display-assembler-buffer))
-)
-
-(let ((menu (make-sparse-keymap "View")))
- (define-key gud-menu-map [view]
- `(menu-item "View" ,menu :visible (eq gud-minor-mode 'gdba)))
-; (define-key menu [both] '(menu-item "Both" gdb-view-both
-; :help "Display both source and assembler"
-; :button (:radio . (eq gdb-selected-view 'both))))
- (define-key menu [assembler] '(menu-item "Assembler" gdb-view-assembler
- :help "Display assembler only"
- :button (:radio . (eq gdb-selected-view 'assembler))))
- (define-key menu [source] '(menu-item "Source" gdb-view-source-function
- :help "Display source only"
- :button (:radio . (eq gdb-selected-view 'source)))))
-
-(let ((menu (make-sparse-keymap "GDB-UI")))
- (define-key gud-menu-map [ui]
- `(menu-item "GDB-UI" ,menu :visible (eq gud-minor-mode 'gdba)))
- (define-key menu [gdb-restore-windows]
- '("Restore window layout" . gdb-restore-windows))
- (define-key menu [gdb-many-windows]
- (menu-bar-make-toggle gdb-many-windows gdb-many-windows
- "Display other windows" "Many Windows %s"
- "Display locals, stack and breakpoint information")))
-
-(defun gdb-frame-gdb-buffer ()
- (interactive)
- (switch-to-buffer-other-frame
- (gdb-get-create-buffer 'gdba)))
-
-(defun gdb-display-gdb-buffer ()
- (interactive)
- (gdb-display-buffer
- (gdb-get-create-buffer 'gdba)))
-
-(defvar gdb-main-file nil "Source file from which program execution begins.")
-
-(defun gdb-view-source-function ()
- (interactive)
- (if gdb-view-source
- (if gud-last-last-frame
- (set-window-buffer gdb-source-window
- (gud-find-file (car gud-last-last-frame)))
- (set-window-buffer gdb-source-window (gud-find-file gdb-main-file))))
- (setq gdb-selected-view 'source))
-
-(defun gdb-view-assembler()
- (interactive)
- (set-window-buffer gdb-source-window
- (gdb-get-create-buffer 'gdb-assembler-buffer))
- (setq gdb-selected-view 'assembler))
-
-;(defun gdb-view-both()
-;(interactive)
-;(setq gdb-selected-view 'both))
-
-;; layout for all the windows
-(defun gdb-setup-windows ()
- (gdb-display-locals-buffer)
- (gdb-display-stack-buffer)
- (delete-other-windows)
- (gdb-display-breakpoints-buffer)
- (gdb-display-display-buffer)
- (delete-other-windows)
- (switch-to-buffer gud-comint-buffer)
- (split-window nil ( / ( * (window-height) 3) 4))
- (split-window nil ( / (window-height) 3))
- (split-window-horizontally)
- (other-window 1)
- (switch-to-buffer (gdb-locals-buffer-name))
- (other-window 1)
- (if (and gdb-view-source
- (eq gdb-selected-view 'source))
- (switch-to-buffer
- (if gud-last-last-frame
- (gud-find-file (car gud-last-last-frame))
- (gud-find-file gdb-main-file)))
- (switch-to-buffer (gdb-get-create-buffer 'gdb-assembler-buffer)))
- (setq gdb-source-window (get-buffer-window (current-buffer)))
- (split-window-horizontally)
- (other-window 1)
- (switch-to-buffer (gdb-inferior-io-name))
- (other-window 1)
- (switch-to-buffer (gdb-stack-buffer-name))
- (split-window-horizontally)
- (other-window 1)
- (switch-to-buffer (gdb-breakpoints-buffer-name))
- (other-window 1))
-
-(defcustom gdb-many-windows nil
- "Nil means that gdb starts with just two windows : the GUD and
-the source buffer."
- :type 'boolean
- :group 'gud)
-
-(defun gdb-many-windows (arg)
-"Toggle the number of windows in the basic arrangement."
- (interactive "P")
- (setq gdb-many-windows
- (if (null arg)
- (not gdb-many-windows)
- (> (prefix-numeric-value arg) 0)))
- (gdb-restore-windows))
-
-(defun gdb-restore-windows ()
- "Restore the basic arrangement of windows used by gdba.
-This arrangement depends on the value of `gdb-many-windows'."
- (interactive)
- (if gdb-many-windows
- (progn
- (switch-to-buffer gud-comint-buffer)
- (delete-other-windows)
- (gdb-setup-windows))
- (switch-to-buffer gud-comint-buffer)
- (delete-other-windows)
- (split-window)
- (other-window 1)
- (if (and gdb-view-source
- (eq gdb-selected-view 'source))
- (switch-to-buffer
- (if gud-last-last-frame
- (gud-find-file (car gud-last-last-frame))
- (gud-find-file gdb-main-file)))
- (switch-to-buffer (gdb-get-create-buffer 'gdb-assembler-buffer)))
- (setq gdb-source-window (get-buffer-window (current-buffer)))
- (other-window 1)))
-
-(defun gdb-reset ()
- "Exit a debugging session cleanly by killing the gdb buffers and resetting
- the source buffers."
- (gdb-delete-frames '())
- (dolist (buffer (buffer-list))
- (if (not (eq buffer gud-comint-buffer))
- (with-current-buffer buffer
- (if (eq gud-minor-mode 'gdba)
- (if (string-match "^\*.+*$" (buffer-name))
- (kill-buffer nil)
- (if (display-images-p)
- (remove-images (point-min) (point-max))
- (gdb-remove-strings (point-min) (point-max)))
- (setq left-margin-width 0)
- (setq gud-minor-mode nil)
- (kill-local-variable 'tool-bar-map)
- (setq gud-running nil)
- (if (get-buffer-window (current-buffer))
- (set-window-margins (get-buffer-window
- (current-buffer))
- left-margin-width
- right-margin-width))))))))
-
-(defun gdb-source-info ()
- "Find the source file where the program starts and displays it with related
-buffers."
- (goto-char (point-min))
- (if (search-forward "directory is " nil t)
- (progn
- (if (looking-at "\\S-*:\\(\\S-*\\)")
- (setq gdb-cdir (match-string 1))
- (looking-at "\\S-*")
- (setq gdb-cdir (match-string 0)))
- (search-forward "Located in ")
- (looking-at "\\S-*")
- (setq gdb-main-file (match-string 0)))
- (setq gdb-view-source nil))
- (delete-other-windows)
- (switch-to-buffer gud-comint-buffer)
- (if gdb-many-windows
- (gdb-setup-windows)
- (gdb-display-breakpoints-buffer)
- (gdb-display-display-buffer)
- (delete-other-windows)
- (split-window)
- (other-window 1)
- (if gdb-view-source
- (switch-to-buffer
- (if gud-last-last-frame
- (gud-find-file (car gud-last-last-frame))
- (gud-find-file gdb-main-file)))
- (switch-to-buffer (gdb-get-create-buffer 'gdb-assembler-buffer)))
- (setq gdb-source-window (get-buffer-window (current-buffer)))
- (other-window 1)))
-
-;;from put-image
-(defun gdb-put-string (putstring pos)
- "Put string PUTSTRING in front of POS in the current buffer.
-PUTSTRING is displayed by putting an overlay into the current buffer with a
-`before-string' STRING that has a `display' property whose value is
-PUTSTRING."
- (let ((gdb-string "x")
- (buffer (current-buffer)))
- (let ((overlay (make-overlay pos pos buffer))
- (prop (list (list 'margin 'left-margin) putstring)))
- (put-text-property 0 (length gdb-string) 'display prop gdb-string)
- (overlay-put overlay 'put-break t)
- (overlay-put overlay 'before-string gdb-string))))
-
-;;from remove-images
-(defun gdb-remove-strings (start end &optional buffer)
- "Remove strings between START and END in BUFFER.
-Remove only strings that were put in BUFFER with calls to `put-string'.
-BUFFER nil or omitted means use the current buffer."
- (unless buffer
- (setq buffer (current-buffer)))
- (let ((overlays (overlays-in start end)))
- (while overlays
- (let ((overlay (car overlays)))
- (when (overlay-get overlay 'put-break)
- (delete-overlay overlay)))
- (setq overlays (cdr overlays)))))
-
-(defun gdb-put-arrow (putstring pos)
- "Put arrow string PUTSTRING in the left margin in front of POS
-in the current buffer. PUTSTRING is displayed by putting an
-overlay into the current buffer with a `before-string'
-\"gdb-arrow\" that has a `display' property whose value is
-PUTSTRING. POS may be an integer or marker."
- (let ((gdb-string "gdb-arrow")
- (buffer (current-buffer)))
- (let ((overlay (make-overlay pos pos buffer))
- (prop (list (list 'margin 'left-margin) putstring)))
- (put-text-property 0 (length gdb-string) 'display prop gdb-string)
- (overlay-put overlay 'put-arrow t)
- (overlay-put overlay 'before-string gdb-string))))
-
-(defun gdb-remove-arrow (&optional buffer)
- "Remove arrow in BUFFER.
-Remove only images that were put in BUFFER with calls to `put-arrow'.
-BUFFER nil or omitted means use the current buffer."
- (unless buffer
- (setq buffer (current-buffer)))
- (let ((overlays (overlays-in (point-min) (point-max))))
- (while overlays
- (let ((overlay (car overlays)))
- (when (overlay-get overlay 'put-arrow)
- (delete-overlay overlay)))
- (setq overlays (cdr overlays)))))
-
-(defun gdb-array-visualise ()
- "Visualise arrays and slices using graph program from plotutils."
- (interactive)
- (when (and (display-graphic-p) gdb-display-string)
- (let ((n 0) m)
- (catch 'multi-dimensional
- (while (eq (aref gdb-array-start n) (aref gdb-array-stop n))
- (setq n (+ n 1)))
- (setq m (+ n 1))
- (while (< m (length gdb-array-start))
- (if (not (eq (aref gdb-array-start m) (aref gdb-array-stop m)))
- (progn
- (x-popup-dialog
- t `(,(concat "Only one dimensional data can be visualised.\n"
- "Use an array slice to reduce the number of\n"
- "dimensions") ("OK" t)))
- (throw 'multi-dimensional nil))
- (setq m (+ m 1))))
- (shell-command (concat "echo" gdb-display-string " | graph -a 1 "
- (int-to-string (aref gdb-array-start n))
- " -x "
- (int-to-string (aref gdb-array-start n))
- " "
- (int-to-string (aref gdb-array-stop n))
- " 1 -T X"))))))
-
-(defun gdb-delete-expression ()
- "Delete displayed expression and its frame."
- (interactive)
- (gdb-enqueue-input
- (list (concat "server delete display " gdb-display-number "\n")
- 'ignore)))
-\f
-;;
-;; Assembler buffer.
-;;
-(gdb-set-buffer-rules 'gdb-assembler-buffer
- 'gdb-assembler-buffer-name
- 'gdb-assembler-mode)
-
-(def-gdb-auto-updated-buffer gdb-assembler-buffer
- gdb-invalidate-assembler
- (concat "server disassemble " gdb-current-address "\n")
- gdb-assembler-handler
- gdb-assembler-custom)
-
-(defun gdb-assembler-custom ()
- (let ((buffer (gdb-get-buffer 'gdb-assembler-buffer))
- (gdb-arrow-position 1) (address) (flag))
- (with-current-buffer buffer
- (if (not (equal gdb-current-address "main"))
- (progn
- (gdb-remove-arrow)
- (goto-char (point-min))
- (if (re-search-forward gdb-current-address nil t)
- (progn
- (setq gdb-arrow-position (point))
- (gdb-put-arrow "=>" (point))))))
- ;; remove all breakpoint-icons in assembler buffer before updating.
- (if (display-images-p)
- (remove-images (point-min) (point-max))
- (gdb-remove-strings (point-min) (point-max))))
- (with-current-buffer (gdb-get-buffer 'gdb-breakpoints-buffer)
- (goto-char (point-min))
- (while (< (point) (- (point-max) 1))
- (forward-line 1)
- (if (looking-at "[^\t].*breakpoint")
- (progn
- (looking-at
- "[0-9]*\\s-*\\S-*\\s-*\\S-*\\s-*\\(.\\)\\s-*0x\\(\\S-*\\)")
- (setq flag (char-after (match-beginning 1)))
- (setq address (match-string 2))
- ;; remove leading 0s from output of info break.
- (if (string-match "^0+\\(.*\\)" address)
- (setq address (match-string 1 address)))
- (with-current-buffer buffer
- (goto-char (point-min))
- (if (re-search-forward address nil t)
- (let ((start (progn (beginning-of-line) (- (point) 1)))
- (end (progn (end-of-line) (+ (point) 1))))
- (if (display-images-p)
- (progn
- (remove-images start end)
- (if (eq ?y flag)
- (put-image breakpoint-enabled-icon
- (+ start 1)
- "breakpoint icon enabled"
- 'left-margin)
- (put-image breakpoint-disabled-icon
- (+ start 1)
- "breakpoint icon disabled"
- 'left-margin)))
- (gdb-remove-strings start end)
- (if (eq ?y flag)
- (gdb-put-string "B" (+ start 1))
- (gdb-put-string "b" (+ start 1)))))))))))
- (if (not (equal gdb-current-address "main"))
- (set-window-point (get-buffer-window buffer) gdb-arrow-position))))
-
-(defvar gdb-assembler-mode-map
- (let ((map (make-sparse-keymap)))
- (suppress-keymap map)
- map))
-
-(defun gdb-assembler-mode ()
- "Major mode for viewing code assembler.
-
-\\{gdb-assembler-mode-map}"
- (setq major-mode 'gdb-assembler-mode)
- (setq mode-name "Assembler")
- (setq left-margin-width 2)
- (setq fringes-outside-margins t)
- (setq buffer-read-only t)
- (use-local-map gdb-assembler-mode-map)
- (gdb-invalidate-assembler))
-
-(defun gdb-assembler-buffer-name ()
- (with-current-buffer gud-comint-buffer
- (concat "*Machine Code " (gdb-get-target-string) "*")))
-
-(defun gdb-display-assembler-buffer ()
- (interactive)
- (gdb-display-buffer
- (gdb-get-create-buffer 'gdb-assembler-buffer)))
-
-(defun gdb-frame-assembler-buffer ()
- (interactive)
- (switch-to-buffer-other-frame
- (gdb-get-create-buffer 'gdb-assembler-buffer)))
-
-;; modified because if gdb-current-address has changed value a new command
-;; must be enqueued to update the buffer with the new output
-(defun gdb-invalidate-assembler (&optional ignored)
- (if (gdb-get-buffer 'gdb-assembler-buffer)
- (progn
- (unless (string-equal gdb-current-frame gdb-previous-frame)
- (if (or (not (member 'gdb-invalidate-assembler
- (gdb-get-pending-triggers)))
- (not (string-equal gdb-current-address
- gdb-previous-address)))
- (progn
- ;; take previous disassemble command off the queue
- (with-current-buffer gud-comint-buffer
- (let ((queue (gdb-get-idle-input-queue)) (item))
- (dolist (item queue)
- (if (equal (cdr item) '(gdb-assembler-handler))
- (gdb-set-idle-input-queue
- (delete item (gdb-get-idle-input-queue)))))))
- (gdb-enqueue-idle-input
- (list (concat "server disassemble " gdb-current-address "\n")
- 'gdb-assembler-handler))
- (gdb-set-pending-triggers
- (cons 'gdb-invalidate-assembler
- (gdb-get-pending-triggers)))
- (setq gdb-previous-address gdb-current-address)
- (setq gdb-previous-frame gdb-current-frame)))))))
-
-(defun gdb-get-current-frame ()
- (if (not (member 'gdb-get-current-frame (gdb-get-pending-triggers)))
- (progn
- (gdb-enqueue-idle-input
- (list (concat "server info frame\n") 'gdb-frame-handler))
- (gdb-set-pending-triggers
- (cons 'gdb-get-current-frame
- (gdb-get-pending-triggers))))))
-
-(defun gdb-frame-handler ()
- (gdb-set-pending-triggers
- (delq 'gdb-get-current-frame (gdb-get-pending-triggers)))
- (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer)
- (goto-char (point-min))
- (forward-line)
- (if (looking-at ".*= 0x\\(\\S-*\\) in \\(\\S-*\\)")
- (progn
- (setq gdb-current-frame (match-string 2))
- (let ((address (match-string 1)))
- ;; remove leading 0s from output of info frame command.
- (if (string-match "^0+\\(.*\\)" address)
- (setq gdb-current-address
- (concat "0x" (match-string 1 address)))
- (setq gdb-current-address (concat "0x" address))))
- (if (or (if (not (looking-at ".*(\\S-*:[0-9]*)"))
- (progn (setq gdb-view-source nil) t))
- (eq gdb-selected-view 'assembler))
- (progn
- (set-window-buffer
- gdb-source-window
- (gdb-get-create-buffer 'gdb-assembler-buffer))
- ;;update with new frame for machine code if necessary
- (gdb-invalidate-assembler)))))))
-
-(provide 'gdb-ui)
-
-;;; arch-tag: e9fb00c5-74ef-469f-a088-37384caae352
-;;; gdb-ui.el ends here
(provide 'generic-x)
-;;; arch-tag: cde692a5-9ff6-4506-9999-c67999c2bdb5
;;; generic-x.el ends here
(provide 'generic)
-;;; arch-tag: 239c1fc4-1303-48d9-9ac0-657d655669ea
;;; generic.el ends here
Copyright (C) 2002 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted provided the copyright notice and this notice are preserved.
-
-;;; arch-tag: 3f33a3e7-090d-492b-bedd-02a1417d32b4
Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted provided the copyright notice and this notice are preserved.
-
-;;; arch-tag: c2f4e9c8-94fb-4c63-bdfd-4ab680cc9db7
(provide 'binhex)
-;;; arch-tag: 8476badd-1e76-4f1d-a640-f9a38c72eed8
;;; binhex.el ends here
(run-hooks 'earcon-load-hook)
-;;; arch-tag: 844dfeea-980c-4ed0-907f-a30bf139691c
;;; earcon.el ends here
(provide 'flow-fill)
-;;; arch-tag: addc0040-bc53-4f17-b4bc-1eb44eed6f0b
;;; flow-fill.el ends here
(provide 'format-spec)
-;;; arch-tag: c22d49cf-d167-445d-b7f1-2504d4173f53
;;; format-spec.el ends here
(provide 'gnus-agent)
-;;; arch-tag: b0ba4afc-5229-4cee-ad25-9956daa4e91e
;;; gnus-agent.el ends here
(run-hooks 'gnus-art-load-hook)
-;;; arch-tag: 2654516f-6279-48f9-a83b-05c1fa450c33
;;; gnus-art.el ends here
(provide 'gnus-async)
-;;; arch-tag: fee61de5-3ea2-4de6-8578-2f90ce89391d
;;; gnus-async.el ends here
(run-hooks 'gnus-audio-load-hook)
-;;; arch-tag: 6f129e78-3416-4fc9-973f-6cf5ac8d654b
;;; gnus-audio.el ends here
(provide 'gnus-bcklg)
-;;; arch-tag: 66259e56-505a-4bba-8a0d-3552c5b94e39
;;; gnus-bcklg.el ends here
(provide 'gnus-cache)
-;;; arch-tag: 05a79442-8c58-4e65-bd0a-3cbb1b89a33a
;;; gnus-cache.el ends here
;; coding: iso-8859-1
;; End:
-;;; arch-tag: 1997b044-6067-471e-8c8f-dc903093098a
;;; gnus-cite.el ends here
(provide 'gnus-cus)
-;;; arch-tag: a37c285a-49bc-4235-8244-804536effeaf
;;; gnus-cus.el ends here
(provide 'gnus-demon)
-;;; arch-tag: 8dd5cd3d-6ae4-46b4-9b15-f5fca09fd392
;;; gnus-demon.el ends here
(provide 'gnus-draft)
-;;; arch-tag: 3d92af58-8c97-4a5c-9db4-a98e85198022
;;; gnus-draft.el ends here
(provide 'gnus-dup)
-;;; arch-tag: 903e94db-7b00-4d19-83ee-cf34a81fa5fb
;;; gnus-dup.el ends here
(provide 'gnus-eform)
-;;; arch-tag: ef50678c-2c28-49ef-affc-e53b3b2c0bf6
;;; gnus-eform.el ends here
(provide 'gnus-ems)
-;;; arch-tag: e7360b45-14b5-4171-aa39-69a44aed3cdb
;;; gnus-ems.el ends here
(provide 'gnus-gl)
-;;; arch-tag: 6f1bab2c-c2a3-4764-9ef6-0714cd5902a4
;;; gnus-gl.el ends here
(provide 'gnus-group)
-;;; arch-tag: 2eb5440f-0bca-4091-814c-e37817536af6
;;; gnus-group.el ends here
(provide 'gnus-int)
-;;; arch-tag: bbc90087-9b7f-4017-a92c-3abf180ac86d
;;; gnus-int.el ends here
(provide 'gnus-kill)
-;;; arch-tag: b30c0f53-df1a-490b-b81e-17b13474f395
;;; gnus-kill.el ends here
(provide 'gnus-logic)
-;;; arch-tag: 9651a100-4a59-4b69-a55b-e511e67c0f8d
;;; gnus-logic.el ends here
(provide 'gnus-mh)
-;;; arch-tag: 2d5696d3-b363-48e5-8749-c256be56acca
;;; gnus-mh.el ends here
(provide 'gnus-ml)
-;;; arch-tag: 936c0fe6-acce-4c16-87d0-eded88078896
;;; gnus-ml.el ends here
(provide 'gnus-mlspl)
-;;; arch-tag: 62b3381f-1e45-4b61-be1a-29fb27703322
;;; gnus-mlspl.el ends here
(provide 'gnus-move)
-;;; arch-tag: 503742b8-7d66-4d79-bb31-4a698070707b
;;; gnus-move.el ends here
(provide 'gnus-msg)
-;;; arch-tag: 9f22b2f5-1c0a-49de-916e-4c88e984852b
;;; gnus-msg.el ends here
(provide 'gnus-mule)
-;;; arch-tag: 525e6b69-85de-4dfc-9dbb-764c795d63af
;;; gnus-mule.el ends here
(provide 'gnus-nocem)
-;;; arch-tag: 0e0c74ea-2f8e-4f3e-8fff-09f767c1adef
;;; gnus-nocem.el ends here
(provide 'gnus-range)
-;;; arch-tag: 4780bdd8-5a15-4aff-be28-18727895b6ad
;;; gnus-range.el ends here
(provide 'gnus-salt)
-;;; arch-tag: 35449164-77b3-4398-bcbd-a2e3e998f810
;;; gnus-salt.el ends here
(provide 'gnus-score)
-;;; arch-tag: d3922589-764d-46ae-9954-9330fd192634
;;; gnus-score.el ends here
(run-hooks 'gnus-setup-load-hook)
-;;; arch-tag: 08e4af93-8565-46bf-905c-36229400609d
;;; gnus-setup.el ends here
(provide 'gnus-soup)
-;;; arch-tag: eddfa69d-13e8-4aea-84ef-62a526ef185c
;;; gnus-soup.el ends here
;; coding: iso-8859-1
;; End:
-;;; arch-tag: a4328fa1-1f84-4b09-97ad-4b5767cfd50f
;;; gnus-spec.el ends here
(provide 'gnus-srvr)
-;;; arch-tag: c0117f64-27ca-475d-9406-8da6854c7a25
;;; gnus-srvr.el ends here
(provide 'gnus-start)
-;;; arch-tag: f4584a22-b7b7-4853-abfc-a637329af5d2
;;; gnus-start.el ends here
(run-hooks 'gnus-sum-load-hook)
-;;; arch-tag: 17c6748f-6d00-4d36-bf01-835c42f31235
;;; gnus-sum.el ends here
(provide 'gnus-topic)
-;;; arch-tag: bf176856-f30c-40f0-ae77-e41529a1134c
;;; gnus-topic.el ends here
(provide 'gnus-undo)
-;;; arch-tag: 0d787bc7-787d-499a-837f-211d2cb07f2e
;;; gnus-undo.el ends here
(provide 'gnus-util)
-;;; arch-tag: f94991af-d32b-4c97-8c26-ca12a934de49
;;; gnus-util.el ends here
(provide 'gnus-uu)
-;;; arch-tag: 05312384-0a83-4720-9a58-b3160b888853
;;; gnus-uu.el ends here
(provide 'gnus-vm)
-;;; arch-tag: 42ca7f88-a12f-461d-be3e-cac7efb44866
;;; gnus-vm.el ends here
(provide 'gnus-win)
-;;; arch-tag: ccd5a394-2ddf-4397-b8f8-6d80d3e46e2b
;;; gnus-win.el ends here
(provide 'gnus)
-;;; arch-tag: acebeeab-f331-4f8f-a7ea-89c58c84f636
;;; gnus.el ends here
(provide 'ietf-drums)
-;;; arch-tag: 379a0191-dbae-4ca6-a0f5-d4202c209ef9
;;; ietf-drums.el ends here
(provide 'imap)
-;;; arch-tag: 27369ed6-33e4-482f-96f1-8bb906ba70f7
;;; imap.el ends here
(provide 'mail-parse)
-;;; arch-tag: 3e63d75c-c962-4784-ab01-7ba07ca9d2d4
;;; mail-parse.el ends here
(provide 'mail-prsvr)
-;;; arch-tag: 9ba878cc-8b43-4f7a-85b1-69b1a9a5d9f5
;;; mail-prsvr.el ends here
(provide 'mail-source)
-;;; arch-tag: 72948025-1d17-4d6c-bb12-ef1aa2c490fd
;;; mail-source.el ends here
(provide 'mailcap)
-;;; arch-tag: 1fd4f9c9-c305-4d2e-9747-3a4d45baa0bd
;;; mailcap.el ends here
;; coding: iso-8859-1
;; End:
-;;; arch-tag: 94b32cac-4504-4b6c-8181-030ebf380ee0
;;; message.el ends here
(provide 'messcompat)
-;;; arch-tag: a76673be-905e-4bbd-8966-615370494a7b
;;; messcompat.el ends here
(provide 'mm-bodies)
-;;; arch-tag: 41104bb6-4443-4ca9-8d5c-ff87ecf27d8d
;;; mm-bodies.el ends here
(provide 'mm-decode)
-;;; arch-tag: 4f35d360-56b8-4030-9388-3ed82d359b9b
;;; mm-decode.el ends here
(provide 'mm-encode)
-;;; arch-tag: 7d01bba4-d469-4851-952b-dc863f84ed66
;;; mm-encode.el ends here
(error nil))
(delete-region ,(point-min-marker) ,(point-max-marker))))))))))
-;;; arch-tag: 460e7424-05f2-4a1d-a0f2-70ec081eff7d
;;; mm-partial.el ends here
(provide 'mm-util)
-;;; arch-tag: 94dc5388-825d-4fd1-bfa5-2100aa351238
;;; mm-util.el ends here
(provide 'mm-uu)
-;;; arch-tag: 7db076bf-53db-4320-aa19-ca76a1d2ab2c
;;; mm-uu.el ends here
(provide 'mm-view)
-;;; arch-tag: b60e749a-d05c-47f2-bccd-bdaa59327cb2
;;; mm-view.el ends here
(provide 'mml)
-;;; arch-tag: 583c96cf-1ffe-451b-a5e5-4733ae9ddd12
;;; mml.el ends here
(provide 'nnagent)
-;;; arch-tag: af710b77-f816-4969-af31-6fd94fb42245
;;; nnagent.el ends here
(provide 'nnbabyl)
-;;; arch-tag: aa7ddedb-8c07-4c0e-beb0-58e795c2b81b
;;; nnbabyl.el ends here
(provide 'nndir)
-;;; arch-tag: 56f09f68-0e4e-4816-818a-df80b4a394c8
;;; nndir.el ends here
(provide 'nndoc)
-;;; arch-tag: f5c2970e-0387-47ac-a0b3-6cc317dffabe
;;; nndoc.el ends here
(provide 'nndraft)
-;;; arch-tag: 3ce26ca0-41cb-48b1-8703-4dad35e188aa
;;; nndraft.el ends here
(provide 'nneething)
-;;; arch-tag: 1277f386-88f2-4459-bb24-f3f45962a6c5
;;; nneething.el ends here
(provide 'nnfolder)
-;;; arch-tag: a040d0f4-4f4e-445f-8972-839575c5f7e6
;;; nnfolder.el ends here
(provide 'nngateway)
-;;; arch-tag: f7ecb92e-b10c-43d5-9a9b-1314233341fc
;;; nngateway.el ends here
(provide 'nnheader)
-;;; arch-tag: a9c4b7d9-52ae-4ec9-b196-dfd93124d202
;;; nnheader.el ends here
(provide 'nnimap)
-;;; arch-tag: 2b001f20-3ff9-4094-a0ad-46807c1ba70b
;;; nnimap.el ends here
(provide 'nnkiboze)
-;;; arch-tag: 66068271-bdc9-4801-bcde-779702e73a05
;;; nnkiboze.el ends here
(provide 'nnlistserv)
-;;; arch-tag: 7705176f-d332-4a5e-a520-d0d319445617
;;; nnlistserv.el ends here
(provide 'nnmail)
-;;; arch-tag: fe8f671a-50db-428a-bb5d-f00462f72ed7
;;; nnmail.el ends here
(provide 'nnmbox)
-;;; arch-tag: 611dd95f-be37-413a-b3ae-8b059ba93659
;;; nnmbox.el ends here
(provide 'nnmh)
-;;; arch-tag: 36c12a98-3bad-44b3-9953-628078ef0e04
;;; nnmh.el ends here
(provide 'nnml)
-;;; arch-tag: 52c97dc3-9735-45de-b439-9e4d23b52004
;;; nnml.el ends here
backend function))))))))
(provide 'nnoo)
-;;; arch-tag: 0196b5ed-6f34-4778-a455-73a971f837e7
;;; nnoo.el ends here
(provide 'nnslashdot)
-;;; arch-tag: aa73df7a-f7e6-4eef-bdea-5ce2f8c691b3
;;; nnslashdot.el ends here
(provide 'nnsoup)
-;;; arch-tag: b0451389-5703-4450-9425-f66f6b38c828
;;; nnsoup.el ends here
(provide 'nnspool)
-;;; arch-tag: bdac8d27-2934-4eee-bad0-49e6b90c0d05
;;; nnspool.el ends here
(provide 'nntp)
-;;; arch-tag: 8655466a-b1b5-4929-9c45-7b1b2e767271
;;; nntp.el ends here
;; coding: iso-8859-1
;; End:
-;;; arch-tag: ab6bfc45-8fe1-4647-9c78-41050eb152b8
;;; nnultimate.el ends here
(provide 'nnvirtual)
-;;; arch-tag: ca8c8ad9-1bd8-4b0f-9722-90dc645a45f5
;;; nnvirtual.el ends here
(provide 'nnwarchive)
-;;; arch-tag: 1ab7a15c-777a-40e0-95c0-0c41b3963578
;;; nnwarchive.el ends here
(provide 'nnweb)
-;;; arch-tag: f59307eb-c90f-479f-b7d2-dbd8bf51b697
;;; nnweb.el ends here
(provide 'pop3)
-;;; arch-tag: 2facc142-1d74-498e-82af-4659b64cac12
;;; pop3.el ends here
(provide 'qp)
-;;; arch-tag: db89e52a-e4a1-4b69-926f-f434f04216ba
;;; qp.el ends here
(provide 'rfc1843)
-;;; arch-tag: 5149c301-a6ca-4731-9c9d-ba616e2cb687
;;; rfc1843.el ends here
(provide 'rfc2045)
-;;; arch-tag: 9ca54127-97bc-432c-b6e2-8c59cadba306
;;; rfc2045.el ends here
(provide 'rfc2047)
-;;; arch-tag: a07fe3d4-22b5-4c4a-bd89-b1f82d5d36f6
;;; rfc2047.el ends here
(provide 'rfc2104)
-;;; arch-tag: cf671d5c-a45f-4a09-815e-704e59e43950
;;; rfc2104.el ends here
(provide 'rfc2231)
-;;; arch-tag: c3ab751d-d108-406a-b301-68882ad8cd63
;;; rfc2231.el ends here
(provide 'score-mode)
-;;; arch-tag: a74a416b-2505-4ad4-bc4e-a418c96b8845
;;; score-mode.el ends here
(provide 'smiley)
-;;; arch-tag: e726728a-14fb-4e6a-9aef-889941bdf7ad
;;; smiley-ems.el ends here
(provide 'starttls)
-;;; arch-tag: 648b3bd8-63bd-47f5-904c-7c819aea2297
;;; starttls.el ends here
(provide 'utf7)
-;;; arch-tag: 96078b55-85c7-4161-aed2-932c24b282c7
;;; utf7.el ends here
(provide 'uudecode)
-;;; arch-tag: e1f09ed5-62b4-4677-9f13-4e81c4fe8ce3
;;; uudecode.el ends here
(provide 'webmail)
-;;; arch-tag: f75a4558-a8f6-46ec-b1c3-7a6434b3dd71
;;; webmail.el ends here
(provide 'gs)
-;;; arch-tag: 06ab51b8-4932-4cfe-9f60-b924a8edb3f0
;;; gs.el ends here
(provide 'help-fns)
-;;; arch-tag: 9e10331c-ae81-4d13-965d-c4819aaab0b3
;;; help-fns.el ends here
(provide 'help-macro)
-;;; arch-tag: 59fee949-1686-485a-8a05-83418073e257
;;; help-macro.el ends here
(provide 'help-mode)
-;;; arch-tag: 850954ae-3725-4cb4-8e91-0bf6d52d6b0b
;;; help-mode.el ends here
;; defcustoms which require 'help'.
(provide 'help)
-;;; arch-tag: cf427352-27e9-49b7-9a6f-741ebab02423
;;; help.el ends here
(provide 'hexl)
-;;; arch-tag: d5a7aa8a-9bce-480b-bcff-6c4c7ca5ea4a
;;; hexl.el ends here
(provide 'hi-lock)
-;;; arch-tag: d2e8fd07-4cc9-4c6f-a200-1e729bc54066
;;; hi-lock.el ends here
(provide 'hilit-chg)
-;;; arch-tag: de00301d-5bad-44da-aa82-e0e010b0c463
;;; hilit-chg.el ends here
(provide 'hippie-exp)
-;;; arch-tag: 5e6e00bf-b061-4a7a-9b46-de0ae105ab99
;;; hippie-exp.el ends here
(provide 'hl-line)
-;;; arch-tag: ac806940-0876-4959-8c89-947563ee2833
;;; hl-line.el ends here
(provide 'ibuf-ext)
-;;; arch-tag: 9af21953-deda-4c30-b76d-f81d9128e76d
;;; ibuf-ext.el ends here
(provide 'ibuf-macs)
-;;; arch-tag: 2748edce-82c9-4cd9-9d9d-bd73e43c20c5
;;; ibuf-macs.el ends here
the ability to filter the displayed buffers by various criteria."
:group 'convenience)
-(defcustom ibuffer-formats '((mark modified read-only " " (name 18 18 :left :elide)
- " " (size 9 -1 :right)
+(defcustom ibuffer-formats '((mark modified read-only " " (name 16 16 :left :elide)
+ " " (size 7 -1 :right)
" " (mode 16 16 :right :elide) " " filename-and-process)
(mark " " (name 16 -1) " " filename))
"A list of ways to display buffer lines.
;; coding: iso-8859-1
;; End:
-;;; arch-tag: 72581688-0603-4954-b8cf-837c700f62e8
;;; ibuffer.el ends here
;;;outline-layout: (-2 :)
;;;End:
-;;; arch-tag: 339ec25a-0741-4eb6-be63-997532e89b0f
;;; icomplete.el ends here
ido-current-directory
(concat ido-current-directory filename)))))
-;;; arch-tag: b63a3500-1735-41bd-8a01-05373f0864da
;;; ido.el ends here
(provide 'ielm)
-;;; arch-tag: ef60e4c0-9c4f-4bdb-8402-271313329790
;;; ielm.el ends here
(provide 'image-file)
-;;; arch-tag: 04cafe36-f7ba-4c80-9f47-4cb656520ce1
;;; image-file.el ends here
(when (and (>= code #xe0) (<= code #xef))
;; APP0 LEN1 LEN2 "JFIF\0"
(throw 'jfif
- (string-match "JFIF\\|Exif"
- (substring data i (min (+ i nbytes) len)))))
+ (string-match "JFIF\\|Exif" (substring data i (+ i nbytes)))))
(setq i (+ i 1 nbytes))))))))
(provide 'image)
-;;; arch-tag: 8e76a07b-eb48-4f3e-a7a0-1a7ba9f096b3
;;; image.el ends here
(provide 'imenu)
-;;; arch-tag: 98a2f5f5-4b91-4704-b18c-3aacf77d77a7
;;; imenu.el ends here
(define-key ctl-x-map "\t" 'indent-rigidly)
(define-key esc-map "i" 'tab-to-tab-stop)
-;;; arch-tag: f402b2a7-e44f-492f-b5b8-38996020b7c3
;;; indent.el ends here
\f
(provide 'info-look)
-;;; arch-tag: 0f1e3ea3-32a2-4461-bbab-3cff93539a74
;;; info-look.el ends here
(provide 'info-xref)
-;;; arch-tag: 69d4d528-69ed-4cc2-8eb4-c666a0c1d5ac
;;; info-xref.el ends here
Setting this option to nil results in behavior similar to the stand-alone
Info reader program, which visits the first subnode from the menu only
when you hit the end of the current node."
- :version "21.4"
:type 'boolean
:group 'info)
(define-key Info-mode-map " " 'Info-scroll-up)
(define-key Info-mode-map "\C-m" 'Info-follow-nearest-node)
(define-key Info-mode-map "\t" 'Info-next-reference)
- (define-key Info-mode-map [(shift tab)] 'Info-prev-reference)
- (define-key Info-mode-map [backtab] 'Info-prev-reference)
+ (define-key Info-mode-map "\e\t" 'Info-prev-reference)
(define-key Info-mode-map "1" 'Info-nth-menu-item)
(define-key Info-mode-map "2" 'Info-nth-menu-item)
(define-key Info-mode-map "3" 'Info-nth-menu-item)
(provide 'info)
-;;; arch-tag: f2480fe2-2139-40c1-a49b-6314991164ac
;;; info.el ends here
(provide 'informat)
-;;; arch-tag: 581c440e-5be1-4f31-b005-2d5824bbf569
;;; informat.el ends here
(provide 'ccl)
-;;; arch-tag: 836bcd27-63a1-4a56-b232-1145ecf823fb
;;; ccl.el ends here
;;; coding: iso-2022-7bit
;;; End:
-;;; arch-tag: 85889c35-9f4d-4912-9bf5-82de31b0d42d
;;; characters.el ends here
(provide 'code-pages)
-;;; arch-tag: 8b6e3c73-b271-4198-866d-ea6d0ceff1b2
;;; code-pages.el ends here
(provide 'codepage)
-;;; arch-tag: 80328de8-b94e-4386-be26-5876105731f0
;;; codepage.el ends here
(provide 'encoded-kb)
-;;; arch-tag: 76f0f9b3-65e7-45c3-b692-59509a87ad44
;;; encoded-kb.el ends here
(latin-iso8859-2 . (nil . "ISO8859-2"))
(latin-iso8859-3 . (nil . "ISO8859-3"))
(latin-iso8859-4 . (nil . "ISO8859-4"))
- ;; Setting "*" family is for a workaround of the problem
- ;; that a font of wrong size is preferred if the font
- ;; family matches with a requested one.
(thai-tis620 . ("*" . "TIS620"))
- (greek-iso8859-7 . (nil . "ISO8859-7"))
- (arabic-iso8859-6 . (nil . "ISO8859-6"))
- (hebrew-iso8859-8 . (nil . "ISO8859-8"))
- (katakana-jisx0201 . (nil . "JISX0201"))
+ (greek-iso8859-7 . ("*" . "ISO8859-7"))
+ (arabic-iso8859-6 . ("*" . "ISO8859-6"))
+ (hebrew-iso8859-8 . ("*" . "ISO8859-8"))
+ (katakana-jisx0201 . ("*" . "JISX0201"))
(latin-jisx0201 . (nil . "JISX0201"))
- (cyrillic-iso8859-5 . (nil . "ISO8859-5"))
+ (cyrillic-iso8859-5 . ("*" . "ISO8859-5"))
(latin-iso8859-9 . (nil . "ISO8859-9"))
- (japanese-jisx0208-1978 . (nil . "JISX0208.1978"))
- (chinese-gb2312 . (nil . "GB2312.1980"))
- (japanese-jisx0208 . (nil . "JISX0208.1990"))
- (korean-ksc5601 . (nil . "KSC5601.1989"))
- (japanese-jisx0212 . (nil . "JISX0212"))
- (chinese-cns11643-1 . (nil . "CNS11643.1992-1"))
- (chinese-cns11643-2 . (nil . "CNS11643.1992-2"))
- (chinese-cns11643-3 . (nil . "CNS11643.1992-3"))
- (chinese-cns11643-4 . (nil . "CNS11643.1992-4"))
- (chinese-cns11643-5 . (nil . "CNS11643.1992-5"))
- (chinese-cns11643-6 . (nil . "CNS11643.1992-6"))
- (chinese-cns11643-7 . (nil . "CNS11643.1992-7"))
- (chinese-big5-1 . (nil . "Big5"))
- (chinese-big5-2 . (nil . "Big5"))
+ (japanese-jisx0208-1978 . ("*" . "JISX0208.1978"))
+ (chinese-gb2312 . ("*" . "GB2312.1980"))
+ (japanese-jisx0208 . ("*" . "JISX0208.1990"))
+ (korean-ksc5601 . ("*" . "KSC5601.1989"))
+ (japanese-jisx0212 . ("*" . "JISX0212"))
+ (chinese-cns11643-1 . ("*" . "CNS11643.1992-1"))
+ (chinese-cns11643-2 . ("*" . "CNS11643.1992-2"))
+ (chinese-cns11643-3 . ("*" . "CNS11643.1992-3"))
+ (chinese-cns11643-4 . ("*" . "CNS11643.1992-4"))
+ (chinese-cns11643-5 . ("*" . "CNS11643.1992-5"))
+ (chinese-cns11643-6 . ("*" . "CNS11643.1992-6"))
+ (chinese-cns11643-7 . ("*" . "CNS11643.1992-7"))
+ (chinese-big5-1 . ("*" . "Big5"))
+ (chinese-big5-2 . ("*" . "Big5"))
(chinese-sisheng . (nil . "sisheng_cwnn"))
(vietnamese-viscii-lower . (nil . "VISCII1.1"))
(vietnamese-viscii-upper . (nil . "VISCII1.1"))
- (arabic-digit . (nil . "MuleArabic-0"))
- (arabic-1-column . (nil . "MuleArabic-1"))
- (arabic-2-column . (nil . "MuleArabic-2"))
+ (arabic-digit . ("*" . "MuleArabic-0"))
+ (arabic-1-column . ("*" . "MuleArabic-1"))
+ (arabic-2-column . ("*" . "MuleArabic-2"))
(ipa . (nil . "MuleIPA"))
- (ethiopic . (nil . "Ethiopic-Unicode"))
+ (ethiopic . ("*" . "Ethiopic-Unicode"))
(ascii-right-to-left . (nil . "ISO8859-1"))
- (indian-is13194 . (nil . "IS13194-Devanagari"))
- (indian-2-column . (nil . "MuleIndian-2"))
- (lao . (nil . "MuleLao-1"))
+ (indian-is13194 . ("*" . "IS13194-Devanagari"))
+ (indian-2-column . ("*" . "MuleIndian-2"))
+ (lao . ("*" . "MuleLao-1"))
(tibetan . ("proportional" . "MuleTibetan-2"))
- (tibetan-1-column . (nil . "MuleTibetan-1"))
+ (tibetan-1-column . ("*" . "MuleTibetan-1"))
(latin-iso8859-14 . (nil . "ISO8859-14"))
(latin-iso8859-15 . (nil . "ISO8859-15"))
(mule-unicode-0100-24ff . (nil . "ISO10646-1"))
(mule-unicode-2500-33ff . (nil . "ISO10646-1"))
(mule-unicode-e000-ffff . (nil . "ISO10646-1"))
- (japanese-jisx0213-1 . (nil . "JISX0213.2000-1"))
- (japanese-jisx0213-2 . (nil . "JISX0213.2000-2"))
+ (japanese-jisx0213-1 . ("*" . "JISX0213.2000-1"))
+ (japanese-jisx0213-2 . ("*" . "JISX0213.2000-2"))
;; unicode
((,(decode-char 'ucs #x0900) . ,(decode-char 'ucs #x097F))
- . (nil . "ISO10646.indian-1"))
+ . ("*" . "ISO10646.indian-1"))
;; Indian CDAC
(,(indian-font-char-range 'cdac:dv-ttsurekh)
- . (nil . "Devanagari-CDAC"))
+ . ("*" . "Devanagari-CDAC"))
(,(indian-font-char-range 'cdac:sd-ttsurekh)
- . (nil . "Sanskrit-CDAC"))
+ . ("*" . "Sanskrit-CDAC"))
(,(indian-font-char-range 'cdac:bn-ttdurga)
- . (nil . "Bengali-CDAC"))
+ . ("*" . "Bengali-CDAC"))
(,(indian-font-char-range 'cdac:as-ttdurga)
- . (nil . "Assamese-CDAC"))
+ . ("*" . "Assamese-CDAC"))
(,(indian-font-char-range 'cdac:pn-ttamar)
- . (nil . "Punjabi-CDAC"))
+ . ("*" . "Punjabi-CDAC"))
(,(indian-font-char-range 'cdac:gj-ttavantika)
- . (nil . "Gujarati-CDAC"))
+ . ("*" . "Gujarati-CDAC"))
(,(indian-font-char-range 'cdac:or-ttsarala)
- . (nil . "Oriya-CDAC"))
+ . ("*" . "Oriya-CDAC"))
(,(indian-font-char-range 'cdac:tm-ttvalluvar)
- . (nil . "Tamil-CDAC"))
+ . ("*" . "Tamil-CDAC"))
(,(indian-font-char-range 'cdac:tl-tthemalatha)
- . (nil . "Telugu-CDAC"))
+ . ("*" . "Telugu-CDAC"))
(,(indian-font-char-range 'cdac:kn-ttuma)
- . (nil . "Kannada-CDAC"))
+ . ("*" . "Kannada-CDAC"))
(,(indian-font-char-range 'cdac:ml-ttkarthika)
- . (nil . "Malayalam-CDAC"))
+ . ("*" . "Malayalam-CDAC"))
;; Indian AKRUTI
(,(indian-font-char-range 'akruti:dev)
- . (nil . "Devanagari-Akruti"))
+ . ("*" . "Devanagari-Akruti"))
(,(indian-font-char-range 'akruti:bng)
- . (nil . "Bengali-Akruti"))
+ . ("*" . "Bengali-Akruti"))
(,(indian-font-char-range 'akruti:pnj)
- . (nil . "Punjabi-Akruti"))
+ . ("*" . "Punjabi-Akruti"))
(,(indian-font-char-range 'akruti:guj)
- . (nil . "Gujarati-Akruti"))
+ . ("*" . "Gujarati-Akruti"))
(,(indian-font-char-range 'akruti:ori)
- . (nil . "Oriay-Akruti"))
+ . ("*" . "Oriay-Akruti"))
(,(indian-font-char-range 'akruti:tml)
- . (nil . "Tamil-Akruti"))
+ . ("*" . "Tamil-Akruti"))
(,(indian-font-char-range 'akruti:tlg)
- . (nil . "Telugu-Akruti"))
+ . ("*" . "Telugu-Akruti"))
(,(indian-font-char-range 'akruti:knd)
- . (nil . "Kannada-Akruti"))
+ . ("*" . "Kannada-Akruti"))
(,(indian-font-char-range 'akruti:mal)
- . (nil . "Malayalam-Akruti"))
+ . ("*" . "Malayalam-Akruti"))
))
(set-fontset-font "fontset-default" (car elt) (cdr elt))))
;;
(provide 'fontset)
-;;; arch-tag: bb53e629-0234-403c-950e-551e61554849
;;; fontset.el ends here
(isearch-update)))
(isearch-process-search-char last-char)))
-;;; arch-tag: 1a90a6cf-2cb2-477a-814a-9ff895852822
;;; isearch-x.el ends here
(add-hook 'minibuffer-setup-hook 'iso-acc-minibuf-setup)
-;;; arch-tag: 149ff409-7c3e-4574-9b5d-ac038939c0a6
;;; iso-acc.el ends here
(provide 'iso-ascii)
-;;; arch-tag: 687edf0d-f792-471e-b50e-be805938359a
;;; iso-ascii.el ends here
(provide 'iso-cvt)
-;;; arch-tag: 64ae843f-ed0e-43e1-ba50-ffd581b90840
;;; iso-cvt.el ends here
(provide 'iso-insert)
-;;; arch-tag: eb5f97bd-a034-4851-92ff-ab1f1bf92814
;;; iso-insert.el ends here
(provide 'iso-swed)
-;;; arch-tag: 6b3dc269-660c-44b6-a25f-680b921eaf2c
;;; iso-swed.el ends here
(provide 'iso-transl)
-;;; arch-tag: 034cfedf-7ebd-461d-bcd0-5c79e6dc0b61
;;; iso-transl.el ends here
;; coding: iso-2022-7bit
;; End:
-;;; arch-tag: dec06fb0-8118-45b1-80d7-dc360b6fd3b2
;;; ja-dic-cnv.el ends here
;; coding: iso-2022-7bit
;; End:
-;;; arch-tag: df2218fa-469c-40f6-bace-7f89a053f9c0
;;; ja-dic-utl.el ends here
;; Try to resolve `kinsoku' restriction by making the current line longer.
(defun kinsoku-longer ()
- (let ((pos-and-column
- (save-excursion
- (forward-char 1)
- (while (and (not (eobp))
- (or (aref (char-category-set (following-char)) ?>)
- ;; protect non-kinsoku words
- (not (or (eq (preceding-char) ? )
- (aref (char-category-set (preceding-char))
- ?|)))))
- (forward-char 1))
- (cons (point) (current-column)))))
+ (let ((pos-and-column (save-excursion
+ (forward-char 1)
+ (while (aref (char-category-set (following-char)) ?>)
+ (forward-char 1))
+ (cons (point) (current-column)))))
(if (or (<= kinsoku-limit 0)
(< (cdr pos-and-column) (+ (current-fill-column) kinsoku-limit)))
(goto-char (car pos-and-column)))))
(defun kinsoku-shorter (linebeg)
(let ((pos (save-excursion
(forward-char -1)
- (while (and
- (< linebeg (point))
- (or (aref (char-category-set (preceding-char)) ?<)
- (aref (char-category-set (following-char)) ?>)
- ;; protect non-kinsoku words
- (not (or (eq (preceding-char) ? )
- (aref (char-category-set (preceding-char))
- ?|)))))
+ (while (and (< linebeg (point))
+ (or (aref (char-category-set (preceding-char)) ?<)
+ (aref (char-category-set (following-char)) ?>)))
(forward-char -1))
(point))))
(if (< linebeg pos)
(aref (char-category-set (preceding-char)) ?<))
(kinsoku-shorter linebeg))))
-;;; arch-tag: e6b036bc-9e5b-4e9f-a22c-4ed04e37777e
;;; kinsoku.el ends here
;;
(provide 'kkc)
-;;; arch-tag: 3cbfd56e-74e6-4f60-bb46-ba7c2d366fbf
;;; kkc.el ends here
;;; no-byte-compile: t
;;; End:
-;;; arch-tag: c2ee6895-edc3-40b2-9518-8c09f1d56c54
;;; latin-1.el ends here
;;; no-byte-compile: t
;;; End:
-;;; arch-tag: 2b9f9c30-1a63-4877-8a80-e95a5e4c57c9
;;; latin-2.el ends here
;;; no-byte-compile: t
;;; End:
-;;; arch-tag: 64d9d46d-fe0b-4a8e-9c28-ba7e20bbc552
;;; latin-3.el ends here
;;; no-byte-compile: t
;;; End:
-;;; arch-tag: c6b2558b-1943-4626-beb5-139630c8e352
;;; latin-4.el ends here
;;; no-byte-compile: t
;;; End:
-;;; arch-tag: 7f91a36a-39fb-4b5d-806f-f171abee71ad
;;; latin-5.el ends here
;;; no-byte-compile: t
;;; End:
-;;; arch-tag: a916b4b5-4204-485b-8b57-8ab3a43a2e29
;;; latin-8.el ends here
;;; no-byte-compile: t
;;; End:
-;;; arch-tag: 84d442ad-d595-4016-8b84-ea92704fd235
;;; latin-9.el ends here
(if sets
(progn
(mapc #'latin1-display-setup sets)
- (unless (char-displayable-p
+ (unless (latin1-char-displayable-p
(make-char 'mule-unicode-0100-24ff 32 33))
;; It doesn't look as though we have a Unicode font.
(map-char-table
(?\\e$,1rt\e(B "--") ;; EM DASH
(?\\e$,1ub\e(B "TM") ;; TRADE MARK SIGN
(?\\e$,1s:\e(B ">") ;; SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
- (?\e$,1s"\e(B "\e,A7\e(B")
)))
(setq latin1-display t))
(mapc #'latin1-display-reset latin1-display-sets)
(setq language 'cyrillic-iso))
(let* ((info (get-language-info language 'charset))
(char (and info (make-char (car (remq 'ascii info)) ?\ ))))
- (and char (char-displayable-p char))))
+ (and char (latin1-char-displayable-p char))))
-;; Backwards compatibility.
-(defalias 'latin1-char-displayable-p 'char-displayable-p)
-(make-obsolete 'latin1-char-displayable-p 'char-displayable-p "21.5")
+;; This should be moved into mule-utils or somewhere after 21.1.
+(defun latin1-char-displayable-p (char)
+ "Return non-nil if we should be able to display CHAR.
+On a multi-font display, the test is only whether there is an
+appropriate font from the selected frame's fontset to display CHAR's
+charset in general. Since fonts may be specified on a per-character
+basis, this may not be accurate."
+ (cond ((< char 256)
+ ;; Single byte characters are always displayable.
+ t)
+ ((display-multi-font-p)
+ ;; On a window system, a character is displayable if we have
+ ;; a font for that character in the default face of the
+ ;; currently selected frame.
+ (let ((fontset (frame-parameter (selected-frame) 'font))
+ font-pattern)
+ (if (query-fontset fontset)
+ (setq font-pattern (fontset-font fontset char)))
+ (or font-pattern
+ (setq font-pattern (fontset-font "fontset-default" char)))
+ (if font-pattern
+ (progn
+ ;; Now FONT-PATTERN is a string or a cons of family
+ ;; field pattern and registry field pattern.
+ (or (stringp font-pattern)
+ (setq font-pattern (concat "-"
+ (or (car font-pattern) "*")
+ "-*-"
+ (cdr font-pattern))))
+ (x-list-fonts font-pattern 'default (selected-frame) 1)))))
+ (t
+ (let ((coding (terminal-coding-system)))
+ (if coding
+ (let ((safe-chars (coding-system-get coding 'safe-chars))
+ (safe-charsets (coding-system-get coding 'safe-charsets)))
+ (or (and safe-chars
+ (aref safe-chars char))
+ (and safe-charsets
+ (memq (char-charset char) safe-charsets)))))))))
(defun latin1-display-setup (set &optional force)
"Set up Latin-1 display for characters in the given SET.
is't changed if the display can render Unicode characters."
(interactive "p")
(if (> arg 0)
- (unless (char-displayable-p
+ (unless (latin1-char-displayable-p
(make-char 'mule-unicode-0100-24ff 32 33))
;; It doesn't look as though we have a Unicode font.
(let ((latin1-display-format "%s"))
(?\\e$,3sc\e(B "\"")
(?\\e$,3sd\e(B ",")
;; Not from Lynx
- (?\e$,3r_\e(B "")
- (?\e$,3u=\e(B "?")))))
+ (?\e$,3r_\e(B . "")
+ (?\e$,3u=\e(B . "?")))))
(aset standard-display-table
(make-char 'mule-unicode-0100-24ff) nil)
(aset standard-display-table
(provide 'latin1-disp)
-;;; arch-tag: 68b2872e-d667-4f48-8e2f-ec2ba2d29406
;;; latin1-disp.el ends here
-;;; mule-cmds.el --- commands for mulitilingual environment -*-coding: iso-2022-7bit -*-
+;;; mule-cmds.el --- commands for mulitilingual environment
;; Copyright (C) 1995, 2003 Electrotechnical Laboratory, JAPAN.
;; Licensed to the Free Software Foundation.
;; Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
(insert "\n")
(fill-region-as-paragraph pos (point)))
(insert "Or specify any other coding system
-at the risk of losing the problematic characters.\n")))
+on your risk of losing the problematic characters.\n")))
;; Read a coding system.
(setq default-coding-system (or (car safe) (car codings)))
(aset standard-display-table 160 [32])
;; With luck, non-Latin-1 fonts are more recent and so don't
;; have this bug.
- (aset standard-display-table (make-char 'latin-iso8859-1 160) [32])
+ (aset standard-display-table 2208 [32]) ; Latin-1 NBSP
;; Most Windows programs send out apostrophes as \222. Most X fonts
;; don't contain a character at that position. Map it to the ASCII
;; apostrophe. [This is actually RIGHT SINGLE QUOTATION MARK,
;; fonts probably have the appropriate glyph at this position,
;; so they could use standard-display-8bit. It's better to use a
;; proper windows-1252 coding system. --fx]
- (aset standard-display-table 146 [39])
- ;; XFree86 4 has changed most of the fonts from their designed
- ;; versions such that `' no longer appears as balanced quotes.
- ;; Assume it has iso10646 fonts installed, so we can display
- ;; balanced quotes.
- (when (and (eq window-system 'x)
- (string= "The XFree86 Project, Inc" (x-server-vendor))
- (> (aref (number-to-string (nth 2 (x-server-version))) 0)
- ?3))
- (aset standard-display-table ?' [?\e$,1ry\e(B])
- (aset standard-display-table ?` [?\e$,1rx\e(B])
- ;; The fonts don't have the relevant bug.
- (aset standard-display-table 160 nil)
- (aset standard-display-table (make-char 'latin-iso8859-1 160)
- nil)))))
+ (aset standard-display-table 146 [39]))))
(defun set-language-environment-coding-systems (language-name
&optional eol-type)
(substring enc2 0 i2))))
-;;; arch-tag: b382c432-4b36-460e-bf4c-05efd0bb18dc
;;; mule-cmds.el ends here
(update-coding-systems-internal)
-;;; arch-tag: 7d5fed55-b6df-42f6-8d3d-0011190551f5
;;; mule-conf.el ends here
(provide 'mule-diag)
-;;; arch-tag: cd3b607c-2893-45a0-a4fa-a6535754dbee
;;; mule-diag.el ends here
;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
;; Licensed to the Free Software Foundation.
-;; Copyright (C) 2000, 2002 Free Software Foundation, Inc.
;; Keywords: mule, multilingual
coding-priority))
(detect-coding-region from to))))
-;;;###autoload
-(defun char-displayable-p (char)
- "Return non-nil if we should be able to display CHAR.
-On a multi-font display, the test is only whether there is an
-appropriate font from the selected frame's fontset to display CHAR's
-charset in general. Since fonts may be specified on a per-character
-basis, this may not be accurate."
- (cond ((< char 256)
- ;; Single byte characters are always displayable.
- t)
- ((display-multi-font-p)
- ;; On a window system, a character is displayable if we have
- ;; a font for that character in the default face of the
- ;; currently selected frame.
- (let ((fontset (frame-parameter (selected-frame) 'font))
- font-pattern)
- (if (query-fontset fontset)
- (setq font-pattern (fontset-font fontset char)))
- (or font-pattern
- (setq font-pattern (fontset-font "fontset-default" char)))
- (if font-pattern
- (progn
- ;; Now FONT-PATTERN is a string or a cons of family
- ;; field pattern and registry field pattern.
- (or (stringp font-pattern)
- (setq font-pattern (concat "-"
- (or (car font-pattern) "*")
- "-*-"
- (cdr font-pattern))))
- (x-list-fonts font-pattern 'default (selected-frame) 1)))))
- (t
- (let ((coding (terminal-coding-system)))
- (if coding
- (let ((safe-chars (coding-system-get coding 'safe-chars))
- (safe-charsets (coding-system-get coding 'safe-charsets)))
- (or (and safe-chars
- (aref safe-chars char))
- (and safe-charsets
- (memq (char-charset char) safe-charsets)))))))))
\f
(provide 'mule-util)
;; coding: iso-2022-7bit
;; End:
-;;; arch-tag: 5bdb52b6-a3a5-4529-b7a0-37d01b0e570b
;;; mule-util.el ends here
(setq split (split-char trans)
charset (car split)))
(cond ((eq charset 'ascii)
- (or trans char))
+ char)
((eq charset 'latin-iso8859-1)
(+ (nth 1 split) 128))
((eq charset 'mule-unicode-0100-24ff)
The value is a symbol whose name is the `MIME-charset' parameter of
the coding system.
- o mime-text-unsuitable
-
- A non-nil value means the `mime-charset' property names a charset
- which is unsuitable for the top-level media type \"text\".
-
o valid-codes (meaningful only for a coding system based on CCL)
The value is a list to indicate valid byte ranges of the encoded
leaves the end-of-line conversion unspecified, FORCE controls what to
do. If FORCE is nil, get the unspecified aspect (or aspects) from the
buffer's previous `buffer-file-coding-system' value (if it is
-specified there). Otherwise, leave it unspecified.
+specified there). Otherwise, levae it unspecified.
This marks the buffer modified so that the succeeding \\[save-buffer]
surely saves the buffer with CODING-SYSTEM. From a program, if you
(goto-char (point-min))
(- (point-max) (point)))))
-;; From X registry 2001/06/01
-;; 20. NON-STANDARD CHARACTER SET ENCODINGS
-
-;; See Section 6 of the Compound Text standard.
-
-;; Name Reference
-;; ---- ---------
-;; "DEC.CNS11643.1986-2" [53]
-;; CNS11643 2-plane using the recommended
-;; internal representation scheme
-;; "DEC.DTSCS.1990-2" [54]
-;; DEC Taiwan Supplemental Character Set
-;; "fujitsu.u90x03" [87]
-;; "ILA" [62]
-;; registry prefix
-;; "IPSYS" [59]
-;; registry prefix
-;; "omron_UDC" [45]
-;; omron User Defined Charset
-;; "omron_UDC_ja" [45]
-;; omron User Defined Charset for Japanese
-;; "omron_UDC_zh" [45]
-;; omron User Defined Charset for Chinese(Main land)
-;; "omron_UDC_tw" [45]
-;; omron User Defined Charset for Chinese(Taiwan)
-
;; If you add charsets here, be sure to modify the regexp used by
;; ctext-pre-write-conversion to look up non-standard charsets.
(defvar ctext-non-standard-designations-alist
;;;
(provide 'mule)
-;;; arch-tag: 9aebaa6e-0e8a-40a9-b857-cb5d04a39e7c
;;; mule.el ends here
(provide 'ogonek)
-;;; arch-tag: 672d7744-28ac-412b-965e-06a27e50d1d7
;;; ogonek.el ends here
;;
(provide 'quail)
-;;; arch-tag: 46d7db54-5467-42c4-a2a9-53ca90a1e886
;;; quail.el ends here
(#xffe3 ?¡Ã)
(#xffe5 ?¢D)))
-;;; arch-tag: 4fbf5312-bb44-4f23-8ae2-7ab2ee1c540f
;;; subst-big5.el ends here
(#xffe3 ?£þ)
(#xffe5 ?£¤)))
-;;; arch-tag: 369bc330-663d-4cc0-8ca9-45567586fb04
;;; subst-gb2312.el ends here
(#x9fa5 ?\8fíã)
(#xff5e ?\8f¢·)))
-;;; arch-tag: 7f320453-b293-4159-af5e-6f0bab03048c
;;; subst-jis.el ends here
(#xffe5 ?¡Í)
(#xffe6 ?£Ü)))
-;;; arch-tag: b978fd7b-d182-4f63-af47-a028e074c57f
;;; subst-ksc.el ends here
(provide 'swedish)
-;;; arch-tag: a117019d-acac-4ac4-8eac-0dbd49a41d32
;;; swedish.el ends here
;; Return a value of the key in the current line.
(defsubst tit-read-key-value ()
- (if (looking-at "[^ \t\r\n]+")
+ (if (looking-at "[^ \t\n]+")
(car (read-from-string (concat "\"" (match-string 0) "\"")))))
;; Return an appropriate quail-package filename from FILENAME (TIT
(insert "(quail-define-rules\n")
(save-excursion
(set-buffer dicbuf)
- ;; Handle double CR line ends, which result when checking out of
- ;; CVS on MS-Windows.
- (goto-char (point-min))
- (while (re-search-forward "\r\r$" nil t)
- (replace-match ""))
(goto-char (point-min))
(search-forward "A440")
(beginning-of-line)
;; coding: iso-2022-7bit
;; End:
-;;; arch-tag: 8ad478b2-a985-4da2-b47f-d8ee5d7c24a3
;;; titdic-cnv.el ends here
(provide 'ucs-tables)
-;;; arch-tag: b497e22b-7fe1-486a-9352-e2d7f7d76a76
;;; ucs-tables.el ends here
;;; utf-16.el --- UTF-16 encoding/decoding
-;; Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2002 Free Software Foundation, Inc.
;; Author: Dave Love <fx@gnu.org>
;; Keywords: Unicode, UTF-16, i18n
;;; Commentary:
;; Support for UTF-16, which is a two-byte encoding (modulo
-;; surrogates) of Unicode, defined in RFC 2781. It is written either
-;; in little or big endian order and either with or without the
-;; leading BOM (a two-byte signature which identifies their byte sex).
+;; surrogates) of Unicode, written either in little or big endian
+;; order and either with or without the leading BOM (a two-byte
+;; signature which identifies their byte sex)a.
;;
-;; We provide these base coding systems.
+;; We provides these base coding systems.
;; name endian BOM
;; ---- ------ ---
;; mule-utf-16le little no
mule-unicode-2500-33ff
mule-unicode-e000-ffff)
(mime-charset . utf-16le)
- (mime-text-unsuitable . t)
(valid-codes (0 . 255))
(dependency unify-8859-on-encoding-mode
unify-8859-on-decoding-mode
mule-unicode-e000-ffff)
(coding-category . coding-category-utf-16-le)
(mime-charset . utf-16)
- (mime-text-unsuitable . t)
(valid-codes (0 . 255))
(dependency unify-8859-on-encoding-mode
unify-8859-on-decoding-mode
mule-unicode-e000-ffff)
(coding-category . coding-category-utf-16-be)
(mime-charset . utf-16)
- (mime-text-unsuitable . t)
(valid-codes (0 . 255))
(dependency unify-8859-on-encoding-mode
unify-8859-on-decoding-mode
(define-coding-system-alias 'mule-utf-16-be 'mule-utf-16be-with-signature)
(define-coding-system-alias 'utf-16-be 'mule-utf-16be-with-signature)
-;;; arch-tag: 85455d46-d9c9-466d-a6f3-c3582a7367c4
;;; utf-16.el ends here
;; (utf-7-encode from to t))
(provide 'utf-7)
-
-;;; arch-tag: 975ee403-90a4-4286-97d2-4ed1323f4ef9
;;; utf-7.el ends here
(setq ucs-mule-cjk-to-unicode
(make-hash-table :test 'eq :size 43000 :rehash-size 1000)
ucs-unicode-to-mule-cjk
- (make-hash-table :test 'eq :size 21500 :rehash-size 1000))
+ (make-hash-table :test 'eq :size 43000 :rehash-size 1000))
;; Load the files explicitly, to avoid having to keep
;; around the large tables they contain (as well as the
;; ones which get built).
;;; `((,(string-as-multibyte "[\200-\237\240-\377]")
;;; . utf-8-compose-function))))
-;;; arch-tag: b08735b7-753b-4ae6-b754-0f3efe4515c5
;;; utf-8.el ends here
isearch-case-fold-search case-fold)
(isearch-search))
-;;; arch-tag: 74850515-f7d8-43a6-8a2c-ca90a4c1e675
;;; isearch.el ends here
;; Installation:
;; To get the functions in this package bound to keys, use
;; M-x iswitchb-mode or customize the option `iswitchb-mode'.
-;; Alternatively, add the following line to your .emacs:
-;; (iswitchb-mode 1)
;; As you type in a substring, the list of buffers currently matching
;; the substring is displayed as you type. The list is ordered so
(provide 'iswitchb)
-;;; arch-tag: d74198ae-753f-44f2-b34f-0c515398d90a
;;; iswitchb.el ends here
(provide 'jit-lock)
-;;; arch-tag: 56b5de6e-f581-453b-bb97-49c39372ff9e
;;; jit-lock.el ends here
(provide 'jka-compr)
-;;; arch-tag: 3f15b630-e9a7-46c4-a22a-94afdde86ebc
;;; jka-compr.el ends here
(provide 'kermit)
-;;; arch-tag: 6633215d-6c47-4e66-9f27-16fba02a8dce
;;; kermit.el ends here
(defvar kmacro-keymap
(let ((map (make-sparse-keymap)))
- ;; Start, end, execute macros
(define-key map "s" 'kmacro-start-macro)
- (define-key map "\C-s" 'kmacro-start-macro)
(define-key map "\C-k" 'kmacro-end-or-call-macro-repeat)
- (define-key map "r" 'apply-macro-to-region-lines)
- (define-key map "q" 'kbd-macro-query) ;; Like C-x q
-
- ;; macro ring
- (define-key map "\C-n" 'kmacro-cycle-ring-next)
- (define-key map "\C-p" 'kmacro-cycle-ring-previous)
+ (define-key map "\C-e" 'kmacro-edit-macro-repeat)
+ (define-key map "\r" 'kmacro-edit-macro)
+ (define-key map " " 'kmacro-step-edit-macro)
+ (define-key map "l" 'kmacro-edit-lossage)
+ (define-key map "\C-i" 'kmacro-insert-counter)
+ (define-key map "\C-a" 'kmacro-add-counter)
(define-key map "\C-v" 'kmacro-view-macro-repeat)
- (define-key map "\C-d" 'kmacro-delete-ring-head)
- (define-key map "\C-t" 'kmacro-swap-ring)
(define-key map "\C-l" 'kmacro-call-ring-2nd-repeat)
-
- ;; macro counter
+ (define-key map "\C-r" 'kmacro-view-ring-2nd)
+ (define-key map "\C-n" 'kmacro-cycle-ring-next)
+ (define-key map "\C-p" 'kmacro-cycle-ring-previous)
(define-key map "\C-f" 'kmacro-set-format)
(define-key map "\C-c" 'kmacro-set-counter)
- (define-key map "\C-i" 'kmacro-insert-counter)
- (define-key map "\C-a" 'kmacro-add-counter)
-
- ;; macro editing
- (define-key map "\C-e" 'kmacro-edit-macro-repeat)
- (define-key map "\r" 'kmacro-edit-macro)
- (define-key map "e" 'edit-kbd-macro)
- (define-key map "l" 'kmacro-edit-lossage)
- (define-key map " " 'kmacro-step-edit-macro)
-
- ;; naming and binding
+ (define-key map "\C-t" 'kmacro-swap-ring)
(define-key map "b" 'kmacro-bind-to-key)
+ (define-key map "\C-d" 'kmacro-delete-ring-head)
+ ;; Compatibility bindings
+ (define-key map "q" 'kbd-macro-query)
(define-key map "n" 'name-last-kbd-macro)
+ (define-key map "e" 'edit-kbd-macro)
+ (define-key map "r" 'apply-macro-to-region-lines)
map)
"Keymap for keyboard macro commands.")
(defalias 'kmacro-keymap kmacro-keymap)
(defvar kmacro-counter-value-start kmacro-counter
"Macro counter at start of macro execution.")
-(defvar kmacro-last-counter 0
- "Last counter inserted by key macro.")
-
-(defvar kmacro-initial-counter-value nil
- "Initial counter value for the next keyboard macro to be defined.")
+(defvar kmacro-last-counter 0 "Last counter inserted by key macro.")
(defun kmacro-insert-counter (arg)
"Insert macro counter and increment with ARG or 1 if missing.
With \\[universal-argument], insert previous kmacro-counter (but do not modify counter)."
(interactive "P")
- (setq kmacro-initial-counter-value nil)
(if (and arg (listp arg))
(insert (format kmacro-counter-format kmacro-last-counter))
(insert (format kmacro-counter-format kmacro-counter))
(defun kmacro-set-counter (arg)
"Set kmacro-counter to ARG or prompt if missing.
-With \\[universal-argument] prefix, reset counter to its value prior to this iteration of the macro."
+With \\[universal-argument], reset counter to its value prior to this iteration of the macro."
(interactive "NMacro counter value: ")
(setq kmacro-last-counter kmacro-counter
kmacro-counter (if (and current-prefix-arg (listp current-prefix-arg))
kmacro-counter-value-start
arg))
- ;; setup initial macro counter value if we are not executing a macro.
- (setq kmacro-initial-counter-value
- (and (not (or defining-kbd-macro executing-kbd-macro))
- kmacro-counter))
(unless executing-kbd-macro
(kmacro-display-counter)))
"Add numeric prefix arg (prompt if missing) to macro counter.
With \\[universal-argument], restore previous counter value."
(interactive "NAdd to macro counter: ")
- (setq kmacro-initial-counter-value nil)
(let ((last kmacro-last-counter))
(setq kmacro-last-counter kmacro-counter
kmacro-counter (if (and current-prefix-arg (listp current-prefix-arg))
instead it is available in the variables `last-kbd-macro', `kmacro-counter',
and `kmacro-counter-format'.")
-;; Remember what we are currently looking at with kmacro-view-macro.
-
-(defvar kmacro-view-last-item nil)
-(defvar kmacro-view-item-no 0)
-
(defun kmacro-ring-head ()
"Return pseudo head element in macro ring."
(t nil)))
-(defun kmacro-display (macro &optional trunc descr empty)
- "Display a keyboard MACRO.
-Optional arg TRUNC non-nil specifies to limit width of macro to 60 chars.
-Optional arg DESCR is descriptive text for macro; default is \"Macro:\".
-Optional arg EMPTY is message to print if no macros are defined."
+(defun kmacro-display (macro &optional trunc descr empty )
+ "Display a keyboard MACRO."
(if macro
(let* ((x 60)
(m (format-kbd-macro macro))
keys)))
-(defun kmacro-exec-ring-item (item arg)
- "Execute item ITEM from the macro ring."
- ;; Use counter and format specific to the macro on the ring!
- (let ((kmacro-counter (nth 1 item))
- (kmacro-counter-format-start (nth 2 item)))
- (execute-kbd-macro (car item) arg #'kmacro-loop-setup-function)
- (setcar (cdr item) kmacro-counter)))
-
-
(defun kmacro-call-ring-2nd (arg)
"Execute second keyboard macro at in macro ring."
(interactive "P")
(unless (kmacro-ring-empty-p)
- (kmacro-exec-ring-item (car kmacro-ring) arg)))
+ ;; should use counter format specific to the macro on the ring!
+ (let ((kmacro-counter (nth 1 (car kmacro-ring)))
+ (kmacro-counter-format-start (nth 2 (car kmacro-ring))))
+ (execute-kbd-macro (car (car kmacro-ring)) arg #'kmacro-loop-setup-function)
+ (setcar (cdr (car kmacro-ring)) kmacro-counter))))
(defun kmacro-call-ring-2nd-repeat (arg)
- "Execute second keyboard macro at in macro ring.
-This is like `kmacro-call-ring-2nd', but allows repeating macro commands
-without repeating the prefix."
+ "Like `kmacro-call-ring-2nd', but allow repeat without repeating prefix."
(interactive "P")
(let ((keys (kmacro-get-repeat-prefix)))
(kmacro-call-ring-2nd arg)
(kmacro-display (car (car kmacro-ring)) "2nd macro")))
+
(defun kmacro-cycle-ring-next (&optional arg)
"Move to next keyboard macro in keyboard macro ring.
Displays the selected macro in the echo area."
kmacro-ring))
(if (>= len kmacro-ring-max)
(setcdr (nthcdr len kmacro-ring) nil))))
- (setq kmacro-counter (or (if arg (prefix-numeric-value arg))
- kmacro-initial-counter-value
- 0)
- kmacro-initial-counter-value nil
+ (setq kmacro-counter (if arg (prefix-numeric-value arg) 0)
kmacro-counter-value-start kmacro-counter
kmacro-last-counter kmacro-counter
kmacro-counter-format-start kmacro-counter-format))
(if kmacro-call-repeat-key
(kmacro-call-macro arg no-repeat t)
(kmacro-end-macro arg)))
- ((and (eq this-command 'kmacro-view-macro) ;; We are in repeat mode!
- kmacro-view-last-item)
- (kmacro-exec-ring-item (car kmacro-view-last-item) arg))
((and arg (listp arg))
(kmacro-call-ring-2nd 1))
(t
;;; Misc. commands
-;; An idea for macro bindings:
-;; Create a separate keymap installed as a minor-mode keymap (e.g. in
-;; the emulation-mode-map-alists) in which macro bindings are made
-;; independent of any other bindings. When first binding is made,
-;; the kemap is created, installed, and enabled. Key seq. C-x C-k +
-;; can then be used to toggle the use of this keymap on and off.
-;; This means that it would be safe(r) to bind ordinary keys like
-;; letters and digits, provided that we inhibit the keymap while
-;; executing the macro later on (but that's controversial...)
-
(defun kmacro-bind-to-key (arg)
- "When not defining or executing a macro, offer to bind last macro to a key.
-The key sequences [C-x C-k 0] through [C-x C-k 9] and [C-x C-k A]
-through [C-x C-k Z] are reserved for user bindings, and to bind to
-one of these sequences, just enter the digit or letter, rather than
-the whole sequence.
-
-You can bind to any valid key sequence, but if you try to bind to
-a key with an existing command binding, you will be asked for
-confirmation whether to replace that binding. Note that the
-binding is made in the `global-map' keymap, so the macro binding
-may be shaded by a local key binding."
+ "When not defining or executing a macro, offer to bind last macro to a key."
(interactive "p")
(if (or defining-kbd-macro executing-kbd-macro)
(if defining-kbd-macro
(message "Cannot save macro while defining it."))
(unless last-kbd-macro
(error "No keyboard macro defined"))
- (let ((key-seq (read-key-sequence "Bind last macro to key: "))
- ok cmd)
- (when (= (length key-seq) 1)
- (let ((ch (aref key-seq 0)))
- (if (or (and (>= ch ?0) (<= ch ?9))
- (and (>= ch ?A) (<= ch ?Z)))
- (setq key-seq (concat "\C-x\C-k" key-seq)
- ok t))))
- (when (and (not (equal key-seq "\a"))
- (or ok
- (not (setq cmd (key-binding key-seq)))
- (stringp cmd)
- (vectorp cmd)
- (yes-or-no-p (format "%s runs command %S. Bind anyway? "
- (format-kbd-macro key-seq)
- cmd))))
- (define-key global-map key-seq last-kbd-macro)
- (message "Keyboard macro bound to %s" (format-kbd-macro key-seq))))))
+ (let ((key-seq (read-key-sequence "Bind last macro to key: ")))
+ (unless (equal key-seq "\a")
+ (define-key global-map key-seq last-kbd-macro)))))
(defun kmacro-view-macro (&optional arg)
- "Display the last keyboard macro.
-If repeated, it shows previous elements in the macro ring."
+ "Display the last keyboard macro."
(interactive)
- (cond
- ((or (kmacro-ring-empty-p)
- (not (eq last-command 'kmacro-view-macro)))
- (setq kmacro-view-last-item nil))
- ((null kmacro-view-last-item)
- (setq kmacro-view-last-item kmacro-ring
- kmacro-view-item-no 2))
- ((consp kmacro-view-last-item)
- (setq kmacro-view-last-item (cdr kmacro-view-last-item)
- kmacro-view-item-no (1+ kmacro-view-item-no)))
- (t
- (setq kmacro-view-last-item nil)))
- (setq this-command 'kmacro-view-macro
- last-command this-command) ;; in case we repeat
- (kmacro-display (if kmacro-view-last-item
- (car (car kmacro-view-last-item))
- last-kbd-macro)
- nil
- (if kmacro-view-last-item
- (concat (cond ((= kmacro-view-item-no 2) "2nd")
- ((= kmacro-view-item-no 3) "3nd")
- (t (format "%dth" kmacro-view-item-no)))
- " previous macro")
- "Last macro")))
+ (kmacro-display last-kbd-macro))
+
(defun kmacro-view-macro-repeat (&optional arg)
- "Display the last keyboard macro.
-If repeated, it shows previous elements in the macro ring.
-To execute the displayed macro ring item without changing the macro ring,
-just enter C-k.
-This is like `kmacro-view-macro', but allows repeating macro commands
-without repeating the prefix."
+ "Like `kmacro-view-macro', but allow repeat without repeating prefix."
(interactive)
(let ((keys (kmacro-get-repeat-prefix)))
(kmacro-view-macro arg)
(if (and last-kbd-macro keys)
(kmacro-repeat-on-last-key keys))))
-(put 'kmacro-view-macro-repeat 'kmacro-repeat 'ring)
+(put 'kmacro-view-macro-repeat 'kmacro-repeat 'head)
(defun kmacro-edit-macro-repeat (&optional arg)
(setq last-kbd-macro kmacro-step-edit-new-macro))))
(provide 'kmacro)
-
-;;; arch-tag: d3fe0b24-ae41-47de-a4d6-41a77d5559f0
;;; kmacro.el ends here
;;
(provide 'china-util)
-;;; arch-tag: 5a47b084-b9ac-420e-8191-70c5b3a14836
;;; china-util.el ends here
(provide 'chinese)
-;;; arch-tag: b82fcf7a-84f6-4e0b-b38c-1742dac0e09f
;;; chinese.el ends here
;; coding: iso-2022-7bit
;; End:
-;;; arch-tag: f6d9dd5d-685c-45d6-a5d8-1e2178228b7e
;;; cyril-util.el ends here
(provide 'cyrillic)
-;;; arch-tag: bda71ae0-ba41-4cb6-a6e0-1dff542313d3
;;; cyrillic.el ends here
(provide 'czech)
-;;; arch-tag: 45ac0d83-ca13-4b5e-9e82-821e44080c24
;;; czech.el ends here
(provide 'devan-util)
-;;; arch-tag: 9bc4d6e3-f2b9-4110-886e-ff9b66b7eebc
;;; devan-util.el ends here
(provide 'devanagari)
-;;; arch-tag: fd13667d-868b-41e8-81ef-79dd28bbfed2
;;; devanagari.el ends here
(set-language-info-alist
"ASCII" (cdr (assoc "English" language-info-alist)))
-;;; arch-tag: e440bdb0-91b0-4fb4-ae38-425780f8f745
;;; english.el ends here
;;
(provide 'ethio-util)
-;;; arch-tag: c8feb3d6-39bf-4b0a-b6ef-26f03fbc8140
;;; ethio-util.el ends here
(provide 'ethiopic)
-;;; arch-tag: e81329d9-1286-43ba-92fd-54ce5c7b213c
;;; ethiopic.el ends here
(provide 'european)
-;;; arch-tag: 9e018b12-fb02-4120-907b-9adeaf84b5c2
;;; european.el ends here
(provide 'georgian)
-;;; arch-tag: 15499fbb-26d4-4a13-9d78-135eef7d32f5
;;; georgian.el ends here
(provide 'greek)
-;;; arch-tag: 9ba48d79-84bc-45e1-9318-685dc3921410
;;; greek.el ends here
(provide 'hebrew)
-;;; arch-tag: 3ca04f32-3f1e-498e-af46-8267498ba5d9
;;; hebrew.el ends here
(provide 'ind-util)
-;;; arch-tag: 59aacd71-46c2-4cb3-bb26-e12bbad55545
;;; ind-util.el ends here
(provide 'indian)
-;;; arch-tag: 83aa8fc7-7ee2-4364-a6e5-498f5e3b8c2f
;;; indian.el ends here
;;
(provide 'japan-util)
-;;; arch-tag: b579595c-c9ad-4b57-9314-98cd8b214f89
;;; japan-util.el ends here
(provide 'japanese)
-;;; arch-tag: 450f5537-9d53-4d5e-b731-4cf116d8cbc9
;;; japanese.el ends here
;;
(provide 'korea-util)
-;;; arch-tag: b17d0981-05da-4577-99f8-1db87fff8b44
;;; korea-util.el ends here
(provide 'korean)
-;;; arch-tag: ca7c7348-5ca3-4623-887a-7fd33d725d0e
;;; korean.el ends here
;;
(provide 'lao-util)
-;;; arch-tag: 1f828781-3cb8-4695-88af-8f33222338ce
;;; lao-util.el ends here
(provide 'lao)
-;;; arch-tag: ba540fd9-6352-4449-a9cd-669afd21fa57
;;; lao.el ends here
(provide 'malayalam)
-;;; arch-tag: 5f500e53-1e4f-4bb2-aa93-ad8736f0349f
;;; malayalam.el ends here
(provide 'misc-lang)
-;;; arch-tag: 6953585c-1a1a-4c09-be82-a2518afb6074
;;; misc-lang.el ends here
(provide 'mlm-util)
-;;; arch-tag: 7f25ee67-8f9d-49f2-837b-35c412c00eba
;;; devan-util.el ends here
(provide 'romanian)
-;;; arch-tag: a0bf93ee-2f02-4678-a477-c08acc35366b
;;; romanian.el ends here
(provide 'slovak)
-;;; arch-tag: 1bae098a-33b2-4426-8c29-59e44fe05484
;;; slovak.el ends here
(provide 'tamil)
-;;; arch-tag: 2201ac78-7d1e-4674-9bcb-9923c7a2bd9c
;;; tamil.el ends here
;;
(provide 'thai-util)
-;;; arch-tag: 59425d6a-8cf9-4e06-a6ab-8ab7dc7a7a97
;;; thai-util.el ends here
(provide 'thai)
-;;; arch-tag: c7eb0e91-4db0-4619-81f8-8762e7d51e15
;;; thai.el ends here
(provide 'tibet-util)
-;;; arch-tag: 7a7333e8-1584-446c-b39c-a02b9def265d
;;; tibet-util.el ends here
(provide 'tibetan)
-;;; arch-tag: 8d37c8d7-f95d-450f-9ec2-819e61fc79a7
;;; tibetan.el ends here
(provide 'tml-util)
-;;; arch-tag: 4d1c9737-e7b1-44cf-a040-4f64c50e773e
;;; tml-util.el ends here
nil)
(provide 'utf-8-lang)
-
-;;; arch-tag: dfa339e1-296f-4b1e-9fe8-2b65279ec813
;;; utf-8-lang.el ends here
;;;
(provide 'viet-util)
-;;; arch-tag: 082a4d3b-168f-45b4-b3e1-82bfa1b5a194
;;; viet-util.el ends here
(provide 'vietnamese)
-;;; arch-tag: 5bd4f1aa-2d4e-4f33-b7d8-0679c6a19ee6
;;; vietnamese.el ends here
(provide 'lazy-lock)
-;;; arch-tag: c1776846-f046-4a45-9684-54b951b12fc9
;;; lazy-lock.el ends here
(provide 'ledit)
-;;; arch-tag: f0f1ca13-8d31-478c-ae1b-b448c55a8faf
;;; ledit.el ends here
(provide 'loadhist)
-;;; arch-tag: 70bb846a-c413-4f01-bf88-78dba4ac0798
;;; loadhist.el ends here
;;; no-byte-compile: t
;;; no-update-autoloads: t
;;; End:
-
-;;; arch-tag: 121e1dd4-36e1-45ac-860e-239f577a6335
;;; loadup.el ends here
(provide 'locate)
-;;; arch-tag: 60c4d098-b5d5-4b3c-a3e0-51a2e9f43898
;;; locate.el ends here
(provide 'log-edit)
-;;; arch-tag: 8089b39c-983b-4e83-93cd-ed0a64c7fdcc
;;; log-edit.el ends here
(provide 'log-view)
-;;; arch-tag: 0d64220b-ce7e-4f62-9c2a-6b04c2f81f4f
;;; log-view.el ends here
(provide 'lpr)
-;;; arch-tag: 21c3f821-ebec-4ca9-ac67-a81e4b75c62a
;;; lpr.el ends here
(provide 'ls-lisp)
-;;; arch-tag: e55f399b-05ec-425c-a6d5-f5e349c35ab4
;;; ls-lisp.el ends here
(provide 'macros)
-;;; arch-tag: 346ed1a5-1220-4bc8-b533-961ee704361f
;;; macros.el ends here
(write-region (point-min) (point-max) "blessmail")
(kill-emacs)
-;;; arch-tag: c3329fe2-f945-41a9-8b00-b4b038ff182f
;;; blessmail.el ends here
(provide 'emacsbug)
-;;; arch-tag: 248b6523-c3b5-4fec-9a3f-0411fafa7d49
;;; emacsbug.el ends here
(provide 'feedmail)
-;;; arch-tag: ec27b380-11c0-4dfd-8436-f636cf2bb992
;;; feedmail.el ends here
(provide 'footnote)
-;;; arch-tag: 9bcfb6d7-2161-4caf-8793-700f62400398
;;; footnote.el ends here
\f
(provide 'mail-extr)
-;;; arch-tag: 7785fade-1073-4ed6-b4f6-28db34a7982d
;;; mail-extr.el ends here
\f
(provide 'mail-hist)
-;;; arch-tag: 9ff9a07c-9dca-482d-ba87-54f42778559d
;;; mail-hist.el ends here
(provide 'mail-utils)
-;;; arch-tag: b24aec2f-fd65-4ceb-9e39-3cc2827036fd
;;; mail-utils.el ends here
"The modification time of your mail alias file when it was last examined.")
(defun mail-abbrevs-sync-aliases ()
- (when mail-personal-alias-file
- (if (file-exists-p mail-personal-alias-file)
- (let ((modtime (nth 5 (file-attributes mail-personal-alias-file))))
- (if (not (equal mail-abbrev-modtime modtime))
- (progn
- (setq mail-abbrev-modtime modtime)
- (build-mail-abbrevs)))))))
+ (if (file-exists-p mail-personal-alias-file)
+ (let ((modtime (nth 5 (file-attributes mail-personal-alias-file))))
+ (if (not (equal mail-abbrev-modtime modtime))
+ (progn
+ (setq mail-abbrev-modtime modtime)
+ (build-mail-abbrevs))))))
;;;###autoload
(defun mail-abbrevs-setup ()
(if mail-abbrevs-mode
(mail-abbrevs-enable))
-;;; arch-tag: 5aa2d901-73f8-4ad7-b73c-4802282ad2ff
;;; mailabbrev.el ends here
(provide 'mailalias)
-;;; arch-tag: 1d6a0f87-eb34-4d45-8816-60c1b952cf46
;;; mailalias.el ends here
(provide 'mailheader)
-;;; arch-tag: 6e7aa221-80b5-4b3d-b46f-fd66ab567be0
;;; mailheader.el ends here
(provide 'mailpost)
-;;; arch-tag: 1f8ca085-60a6-4eac-8efb-69ffec2fa124
;;; mailpost.el ends here
;; Copyright (C) 1993, 1996 Free Software Foundation, Inc.
;; Author: Masanobu UMEDA <umerin@mse.kyutech.ac.jp>
-;; Version: $Id: metamail.el,v 1.15 2003/02/04 13:14:00 lektu Exp $
+;; Version: $Id: metamail.el,v 1.14 2000/11/12 00:22:02 fx Exp $
;; Keywords: mail, news, mime, multimedia
;; This file is part of GNU Emacs.
(provide 'metamail)
-;;; arch-tag: 52c0cb6f-d800-4776-9789-f0275cb5490e
;;; metamail.el ends here
(provide 'mspools)
-;;; arch-tag: 8990b3ee-68c8-4892-98f1-51a735c8bac6
;;; mspools.el ends here
\f
(provide 'reporter)
-
-;;; arch-tag: 33612ff4-fbbc-4be2-b183-560ce9e0199b
;;; reporter.el ends here
(provide 'rfc2368)
-;;; arch-tag: ea804934-ad96-4f69-957b-857a76e4fd95
;;; rfc2368.el ends here
(provide 'rfc822)
-;;; arch-tag: 5d388a24-e173-40fb-9b8e-85269de44b37
;;; rfc822.el ends here
(provide 'rmail-spam-filter)
-;;; arch-tag: 03e1d45d-b72f-4dd7-8f04-e7fd78249746
;;; rmail-spam-filter ends here
(save-excursion
(skip-chars-forward " \t\n")
(point)))
- (save-excursion
- (let* ((header-end
- (progn
- (save-excursion
- (goto-char start)
- (forward-line 1)
- (if (looking-at "0")
- (forward-line 1)
- (forward-line 2))
- (save-restriction
- (narrow-to-region (point) (point-max))
- (rfc822-goto-eoh)
- (point)))))
- (case-fold-search t)
- (quoted-printable-header-field-end
- (save-excursion
- (goto-char start)
- (re-search-forward
- "^content-transfer-encoding:\\(\n?[\t ]\\)*quoted-printable\\(\n?[\t ]\\)*"
- header-end t)))
- (base64-header-field-end
- (save-excursion
- (goto-char start)
- (re-search-forward
- "^content-transfer-encoding:\\(\n?[\t ]\\)*base64\\(\n?[\t ]\\)*"
- header-end t))))
- (if quoted-printable-header-field-end
- (save-excursion
- (rmail-decode-quoted-printable header-end (point))
- ;; Change "quoted-printable" to "8bit",
- ;; to reflect the decoding we just did.
- (goto-char quoted-printable-header-field-end)
- (delete-region (point) (search-backward ":"))
- (insert ": 8bit")))
- (if base64-header-field-end
- (save-excursion
- (base64-decode-region (1+ header-end)
- (- (point) 2))
- ;; Change "base64" to "8bit", to reflect the
- ;; decoding we just did.
- (goto-char (1+ header-end))
- (while (search-forward "\r\n" (point-max) t)
- (replace-match "\n"))
- (goto-char base64-header-field-end)
- (delete-region (point) (search-backward ":"))
- (insert ": 8bit")))
- (setq last-coding-system-used nil)
- (or rmail-enable-mime
- (not rmail-enable-multibyte)
- (let ((mime-charset
- (if (and rmail-decode-mime-charset
- (save-excursion
- (goto-char start)
- (search-forward "\n\n" nil t)
- (let ((case-fold-search t))
- (re-search-backward
- rmail-mime-charset-pattern
- start t))))
- (intern (downcase (match-string 1))))))
- (rmail-decode-region start (point) mime-charset)))))
+ (setq last-coding-system-used nil)
+ (or rmail-enable-mime
+ (not rmail-enable-multibyte)
+ (decode-coding-region start (point)
+ (or rmail-file-coding-system
+ 'undecided)))
;; Add an X-Coding-System: header if we don't have one.
(save-excursion
(goto-char start)
(re-search-forward
"^content-transfer-encoding:\\(\n?[\t ]\\)*quoted-printable\\(\n?[\t ]\\)*"
header-end t)))
- (base64-header-field-end
- (save-excursion
- (re-search-forward
- "^content-transfer-encoding:\\(\n?[\t ]\\)*base64\\(\n?[\t ]\\)*"
- header-end t)))
(size
;; Get the numeric value from the Content-Length field.
(save-excursion
;; to reflect the decoding we just did.
(goto-char quoted-printable-header-field-end)
(delete-region (point) (search-backward ":"))
- (insert ": 8bit")))
- (if base64-header-field-end
- (save-excursion
- (base64-decode-region header-end (point))
- ;; Change "base64" to "8bit", to reflect the
- ;; decoding we just did.
- (goto-char base64-header-field-end)
- (delete-region (point) (search-backward ":"))
(insert ": 8bit"))))
(save-excursion
(provide 'rmail)
-;;; arch-tag: cff0a950-57fe-4f73-a86e-91ff75afd06c
;;; rmail.el ends here
(provide 'rmailedit)
-;;; arch-tag: 93c22709-a14a-46c1-ab91-52c3f5a0ec12
;;; rmailedit.el ends here
(- (buffer-size) omax)))))
keyword))
-;;; arch-tag: b26b3392-99ca-4e1d-933a-dab59b04e9a8
;;; rmailkwd.el ends here
(setq rmail-inbox-list (rmail-parse-file-inboxes))
(rmail-show-message rmail-current-message))
-;;; arch-tag: 74ed1d50-2c25-4cbd-b5ae-d29ed8aba6e4
;;; rmailmsc.el ends here
(if rmail-delete-after-output
(rmail-delete-forward)))
-;;; arch-tag: 447117c6-1a9a-4b88-aa43-3101b043e3a4
;;; rmailout.el ends here
(provide 'rmailsort)
-;;; arch-tag: 0d90896b-0c35-46ac-b240-38be5ada2360
;;; rmailsort.el ends here
(provide 'rmailsum)
-;;; arch-tag: 556079ee-75c1-47f5-9884-2e0a0bc6c5a1
;;; rmailsum.el ends here
(defcustom mail-specify-envelope-from nil
"*If non-nil, specify the envelope-from address when sending mail.
The value used to specify it is whatever is found in
-the variable `mail-envelope-from', with `user-mail-address' as fallback.
+`mail-envelope-from', with `user-mail-address' as fallback.
On most systems, specifying the envelope-from address is a
-privileged operation. This variable affects sendmail and
-smtpmail -- if you use feedmail to send mail, see instead the
-variable `feedmail-deduce-envelope-from'."
+privileged operation. This variable is only used if
+`send-mail-function' is set to `sendmail-send-it'."
:version "21.1"
:type 'boolean
:group 'sendmail)
\f
(defun sendmail-sync-aliases ()
- (when mail-personal-alias-file
- (let ((modtime (nth 5 (file-attributes mail-personal-alias-file))))
- (or (equal mail-alias-modtime modtime)
- (setq mail-alias-modtime modtime
- mail-aliases t)))))
+ (let ((modtime (nth 5 (file-attributes mail-personal-alias-file))))
+ (or (equal mail-alias-modtime modtime)
+ (setq mail-alias-modtime modtime
+ mail-aliases t))))
(defun mail-setup (to subject in-reply-to cc replybuffer actions)
(or mail-default-reply-to
(if (eq mail-aliases t)
(progn
(setq mail-aliases nil)
- (when mail-personal-alias-file
- (if (file-exists-p mail-personal-alias-file)
- (build-mail-aliases)))))
+ (if (file-exists-p mail-personal-alias-file)
+ (build-mail-aliases))))
;; Don't leave this around from a previous message.
(kill-local-variable 'buffer-file-coding-system)
;; This doesn't work for enable-multibyte-characters.
(provide 'sendmail)
-;;; arch-tag: 48bc1025-d993-4d31-8d81-2a29491f0626
;;; sendmail.el ends here
;;;
(defvar smtpmail-mail-address nil
- "Value to use for envelope-from address for mail from ambient buffer.")
+ "Value of `user-mail-address' in ambient buffer.")
;;;###autoload
(defun smtpmail-send-it ()
(case-fold-search nil)
delimline
(mailbuf (current-buffer))
- ;; Examine this variable now, so that
- ;; local binding in the mail buffer will take effect.
- (smtpmail-mail-address
- (or (and mail-specify-envelope-from (mail-envelope-from))
- user-mail-address))
+ (smtpmail-mail-address user-mail-address)
(smtpmail-code-conv-from
(if enable-multibyte-characters
(let ((sendmail-coding-system smtpmail-code-conv-from))
(with-temp-buffer
(let ((coding-system-for-read 'no-conversion))
(insert-file-contents file-msg))
- (let ((smtpmail-mail-address
- (or (and mail-specify-envelope-from (mail-envelope-from))
- user-mail-address)))
- (if (not (null smtpmail-recipient-address-list))
- (if (not (smtpmail-via-smtp smtpmail-recipient-address-list
- (current-buffer)))
- (error "Sending failed; SMTP protocol error"))
- (error "Sending failed; no recipients"))))
+ (if (not (null smtpmail-recipient-address-list))
+ (if (not (smtpmail-via-smtp smtpmail-recipient-address-list
+ (current-buffer)))
+ (error "Sending failed; SMTP protocol error"))
+ (error "Sending failed; no recipients")))
(delete-file file-msg)
(delete-file (concat file-msg ".el"))
(delete-region (point-at-bol) (point-at-bol 2)))
(host (or smtpmail-smtp-server
(error "`smtpmail-smtp-server' not defined")))
(port smtpmail-smtp-service)
- ;; smtpmail-mail-address should be set to the appropriate
- ;; buffer-local value by the caller, but in case not:
- (envelope-from (or smtpmail-mail-address
- (and mail-specify-envelope-from
- (mail-envelope-from))
- user-mail-address))
+ (envelope-from (or (mail-envelope-from)
+ smtpmail-mail-address
+ user-mail-address))
response-code
greeting
process-buffer
"")))
; (smtpmail-send-command process (format "MAIL FROM:%s@%s" (user-login-name) (smtpmail-fqdn)))
(smtpmail-send-command process (format "MAIL FROM: <%s>%s%s"
- envelope-from
+ envelope-from
size-part
body-part))
(provide 'smtpmail)
-;;; arch-tag: a76992df-6d71-43b7-9e72-4bacc6c05466
;;; smtpmail.el ends here
(provide 'supercite)
(run-hooks 'sc-load-hook)
-;;; arch-tag: a5d5bfa6-3bd5-4414-8c65-0afc83e45cd3
;;; supercite.el ends here
(provide 'uce)
-;;; arch-tag: 44b68c87-9b29-47bd-822c-3feee3883221
;;; uce.el ends here
(provide 'undigest)
-;;; arch-tag: 3a28b9fb-c1f5-43ef-9278-285f3e4b874d
;;; undigest.el ends here
;;; unrmail.el ends here
-;;; arch-tag: 14c6290d-60b2-456f-8909-5c2387de6acb
(provide 'vms-pmail)
-;;; arch-tag: 336850fc-7812-4663-8e4d-b9c13f47dce1
;;; vms-pmail.el ends here
- $(DEL) term\*.orig term\*.rej term\*.crlf
- $(DEL) textmodes\*.orig textmodes\*.rej textmodes\*.crlf
- $(DEL_TREE) deleted
-
-# arch-tag: 01ddeb44-fb4c-4366-8478-4a6c21a68fb3
#
clean:
- $(DEL) *~
-
-# arch-tag: bd03b562-c58d-4403-99db-c7bccd8c49a0
(provide 'makesum)
-;;; arch-tag: c2383336-fc89-46ad-8110-ded42bffaee3
;;; makesum.el ends here
(skip-chars-backward "-a-zA-Z0-9._+:")
(let ((start (point)))
(skip-chars-forward "-a-zA-Z0-9._+:")
- (setq word (buffer-substring-no-properties start (point))))
+ (setq word (buffer-substring start (point))))
(if (string-match "[._]+$" word)
(setq word (substring word 0 (match-beginning 0))))
;; If looking at something like ioctl(2) or brc(1M), include the
;; section number in the returned value. Remove text properties.
- (concat word
+ (forward-word 1)
+ ;; Use `format' here to clear any text props from `word'.
+ (format "%s%s"
+ word
(if (looking-at
(concat "[ \t]*([ \t]*\\(" Man-section-regexp "\\)[ \t]*)"))
- (format "(%s)" (match-string-no-properties 1)))))))
+ (format "(%s)" (match-string 1))
+ "")))))
\f
;; ======================================================================
(provide 'man)
-;;; arch-tag: 587cda76-8e23-4594-b1f3-89b6b09a0d47
;;; man.el ends here
(provide 'master)
-;;; arch-tag: dca08daa-8127-45ae-b77e-b135160dce98
;;; master.el ends here
(cons "Cut" (cons "Delete text in region and copy it to the clipboard"
'clipboard-kill-region)))
- ;; These are Sun server keysyms for the Cut, Copy and Paste keys
- ;; (also for XFree86 on Sun keyboard):
(define-key global-map [f20] 'clipboard-kill-region)
(define-key global-map [f16] 'clipboard-kill-ring-save)
(define-key global-map [f18] 'clipboard-yank)
- ;; X11R6 versions:
+ ;; X11R6 versions
(define-key global-map [cut] 'clipboard-kill-region)
(define-key global-map [copy] 'clipboard-kill-ring-save)
(define-key global-map [paste] 'clipboard-yank))
(define-key menu-bar-showhide-menu [column-number-mode]
(menu-bar-make-mm-toggle column-number-mode
- "Column Numbers"
+ "Show Column Numbers"
"Show the current column number in the mode line"))
(define-key menu-bar-showhide-menu [line-number-mode]
(menu-bar-make-mm-toggle line-number-mode
- "Line Numbers"
+ "Show Line Numbers"
"Show the current line number in the mode line"))
(define-key menu-bar-showhide-menu [linecolumn-separator]
(customize-mark-as-set 'display-time-mode))
(define-key menu-bar-showhide-menu [showhide-date-time]
- '(menu-item "Date, Time and Mail" showhide-date-time
- :help "Display date, time, mail status in mode line"
+ '(menu-item "Date and Time" showhide-date-time
+ :help "Display date and time in the mode line"
:button (:toggle . display-time-mode)))
(define-key menu-bar-showhide-menu [datetime-separator]
(menu-bar-make-toggle toggle-save-place-globally save-place
"Save Place in Files between Sessions"
"Saving place in files %s"
- "Visit files of previous session when restarting Emacs"
- (require 'saveplace)
- ;; Do it by name, to avoid a free-variable
- ;; warning during byte compilation.
- (set-default
- 'save-place (not (symbol-value 'save-place)))))
+ "Visit files of previous session when restarting Emacs"))
(define-key menu-bar-options-menu [uniquify]
(menu-bar-make-toggle toggle-uniquify-buffer-names uniquify-buffer-name-style
(provide 'menu-bar)
-;;; arch-tag: 6e6a3c22-4ec4-4d3d-8190-583f8ef94ced
;;; menu-bar.el ends here
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
-
-;;; arch-tag: 87324964-69b6-4925-a3c2-9c1df53d7d51
;;; sentence-end-double-space: nil
;;; End:
-;;; arch-tag: 49879e46-5aa3-4569-bece-e5a58731d690
;;; mh-alias.el ends here
;;; sentence-end-double-space: nil
;;; End:
-;;; arch-tag: 62865511-e610-4923-b0b5-f45a8ab70a34
;;; mh-comp.el ends here
;;; sentence-end-double-space: nil
;;; End:
-;;; arch-tag: 778d2a20-82e2-4276-be9d-309386776a68
;;; mh-customize.el ends here
;;; sentence-end-double-space: nil
;;; End:
-;;; arch-tag: cce884de-bd37-4104-9963-e4439d5ed22b
;;; mh-e.el ends here
;;; sentence-end-double-space: nil
;;; End:
-;;; arch-tag: 1936c4f1-4843-438e-bc4b-a63bb75a7762
;;; mh-funcs.el ends here
;;; sentence-end-double-space: nil
;;; End:
-;;; arch-tag: 07d66ef6-8726-4ac6-9ecf-e566cd5bfb45
;;; mh-identity.el ends here
;;; sentence-end-double-space: nil
;;; End:
-;;; arch-tag: 3713cf2a-6082-4cb4-8ce2-99d9acaba835
;;; mh-inc.el ends here
;;; sentence-end-double-space: nil
;;; End:
-;;; arch-tag: 607762ad-0dff-4fe1-a27e-6c0dde0dcc47
;;; mh-index ends here
;;; sentence-end-double-space: nil
;;; End:
-;;; arch-tag: 603335f1-77ff-4306-8828-5d3dad51abe1
;;; mh-junk.el ends here
;;; no-byte-compile: t
;;; no-update-autoloads: t
;;; End:
-
-;;; arch-tag: bc36a104-1edb-45d5-8aad-a85b45648378
;;; mh-loaddefs.el ends here
;;; sentence-end-double-space: nil
;;; End:
-;;; arch-tag: 0dd36518-1b64-4a84-8f4e-59f422d3f002
;;; mh-mime.el ends here
;;; sentence-end-double-space: nil
;;; End:
-;;; arch-tag: aef2b271-7768-42bd-a782-9a14ba9f83f7
;;; mh-pick.el ends here
;;; sentence-end-double-space: nil
;;; End:
-;;; arch-tag: 8e952711-01a2-485b-bf21-c9e3ad4de942
;;; mh-seq.el ends here
;;; sentence-end-double-space: nil
;;; End:
-;;; arch-tag: d38ddcd4-3c00-4e37-99bf-8b89dda7b32c
;;; mh-speed.el ends here
;;; sentence-end-double-space: nil
;;; End:
-;;; arch-tag: 1af39fdf-f66f-4b06-9b48-18a7656c8e36
;;; mh-utils.el ends here
;;; sentence-end-double-space: nil
;;; End:
-;;; arch-tag: f531e3cc-98ba-4f9f-b6a1-e282173a6aa9
;;; mh-xemacs-compat.el ends here
;;; sentence-end-double-space: nil
;;; End:
-;;; arch-tag: 5b06d860-a468-4a0f-a61b-255a148985e4
;;; mh-xemacs-icons.el ends here
(provide 'midnight)
-;;; arch-tag: a5979be9-2890-46a3-ba84-791f0a4a6e80
;;; midnight.el ends here
(provide 'minibuf-eldef)
-;;; arch-tag: 7e421fae-c275-4729-b0da-7836af377d3d
;;; minibuf-eldef.el ends here
(provide 'misc)
-;;; arch-tag: 908f7884-c19e-4388-920c-9cfa425e449b
;;; misc.el ends here
(provide 'mouse-copy)
-;;; arch-tag: 3d50293b-c089-4273-b412-4fc96a5f26ff
;;; mouse-copy.el ends here
(provide 'mouse-drag)
-;;; arch-tag: e47354ff-82f5-42c4-b3dc-88dd9c04b770
;;; mouse-drag.el ends here
(provide 'mouse-sel)
-;;; arch-tag: 86e6c73f-deaa-48d3-a24e-c565fda1f7d7
;;; mouse-sel.el ends here
(lookup-key menubar (vector (car submap)))))))
(defun mouse-popup-menubar (event prefix)
- "Pop up a menu equivalent to the menu bar for keyboard EVENT with PREFIX.
+ "Pops up a menu equivalent to the menu bar a keyboard EVENT with PREFIX.
The contents are the items that would be in the menu bar whether or
not it is actually displayed."
(interactive "@e \nP")
(while (and (not (eobp)) (= (following-char) char))
(forward-char 1))))))
+;; Return a list of region bounds based on START and END according to MODE.
+;; If MODE is 0 then set point to (min START END), mark to (max START END).
+;; If MODE is 1 then set point to start of word at (min START END),
+;; mark to end of word at (max START END).
+;; If MODE is 2 then do the same for lines.
(defun mouse-start-end (start end mode)
-"Return a list of region bounds based on START and END according to MODE.
-If MODE is 0 then set point to (min START END), mark to (max START END).
-If MODE is 1 then set point to start of word at (min START END),
-mark to end of word at (max START END).
-If MODE is 2 then do the same for lines."
(if (> start end)
(let ((temp start))
(setq start end
(make-obsolete 'mldrag-drag-vertical-line 'mouse-drag-vertical-line "21.1")
(provide 'mldrag)
-;;; arch-tag: 9a710ce1-914a-4923-9b81-697f7bf82ab3
;;; mouse.el ends here
(provide 'msb)
(eval-after-load "msb" '(run-hooks 'msb-after-load-hook 'msb-after-load-hooks))
-;;; arch-tag: 403f9e82-b92e-4e7a-a797-5d6d9b76da36
;;; msb.el ends here
(provide 'mwheel)
-;;; arch-tag: 50ed00e7-3686-4b7a-8037-fb31aa5c237f
;;; mwheel.el ends here
;; Display the last chunk of output from the ftp process for the given HOST
;; USER pair, and signal an error including MSG in the text.
(defun ange-ftp-error (host user msg)
- (save-excursion ;; Prevent pop-to-buffer from changing current buffer.
- (let ((cur (selected-window))
- (pop-up-windows t))
- (pop-to-buffer
- (get-buffer-create
- (ange-ftp-ftp-process-buffer host user)))
- (goto-char (point-max))
- (select-window cur))
- (signal 'ftp-error (list (format "FTP Error: %s" msg)))))
+ (let ((cur (selected-window))
+ (pop-up-windows t))
+ (pop-to-buffer
+ (get-buffer-create
+ (ange-ftp-ftp-process-buffer host user)))
+ (goto-char (point-max))
+ (select-window cur))
+ (signal 'ftp-error (list (format "FTP Error: %s" msg))))
(defun ange-ftp-set-buffer-mode ()
"Set correct modes for the current buffer if visiting a remote file."
(provide 'ange-ftp)
-;;; arch-tag: 2987ef88-cb56-4ec1-87a9-79132572e316
;;; ange-ftp.el ends here
(provide 'browse-url)
-;;; arch-tag: d2079573-5c06-4097-9598-f550fba19430
;;; browse-url.el ends here
"Display a button for the JPEG DATA."
(eudc-bob-display-jpeg data nil))
-;;; arch-tag: 8f1853df-c9b6-4c5a-bdb1-d94dbd651fb3
;;; eudc-bob.el ends here
(overlay-get (car (overlays-at (point))) 'eudc-record)
(eudc-insert-record-at-point-into-bbdb)))
-;;; arch-tag: 8cbda7dc-3163-47e6-921c-6ec5083df2d7
;;; eudc-export.el ends here
""
eudc-hotlist-menu))
-;;; arch-tag: 9b633ab3-6a6e-4b46-b12e-d96739a7e0e8
;;; eudc-hotlist.el ends here
(provide 'eudc-vars)
-;;; arch-tag: 80050575-b838-4246-8ebc-b2d7c5a2e482
;;; eudc-vars.el ends here
(provide 'eudc)
-;;; arch-tag: e18872b6-db83-400b-869d-be54e9a4160c
;;; eudc.el ends here
(provide 'eudcb-bbdb)
-;;; arch-tag: 38276208-75de-4dbc-ba6f-8db684c32e0a
;;; eudcb-bbdb.el ends here
(provide 'eudcb-ldap)
-;;; arch-tag: 0f254dc0-7378-4fd4-ae26-18666184e96b
;;; eudcb-ldap.el ends here
(provide 'eudcb-ph)
-;;; arch-tag: 4365bbf5-af20-453e-b5b6-2e7118ebfcdb
;;; eudcb-ph.el ends here
(provide 'goto-addr)
-;;; arch-tag: ca47c505-5661-425d-a471-62bc6e75cf0a
;;; goto-addr.el ends here
(provide 'ldap)
-;;; arch-tag: 47913a76-6155-42e6-ac58-6d28b5d50eb0
;;; ldap.el ends here
(provide 'net-utils)
-;;; arch-tag: 97119e91-9edb-4376-838b-bf7058fa1314
;;; net-utils.el ends here
(provide 'netrc)
-;;; arch-tag: af9929cc-2d12-482f-936e-eb4366f9fa55
;;; netrc.el ends here
(provide 'quickurl)
-;;; arch-tag: a8183ea5-80c2-4082-a7d1-b0fdf2da467e
;;; quickurl.el ends here
(set (make-local-variable 'comint-file-name-prefix)
(concat "/" host ":")))))
-;;; arch-tag: 2866a132-ece4-4ce9-9f91-ec147f803f73
;;; rcompile.el ends here
;; Maintainer: Noah Friedman <friedman@splode.com>
;; Keywords: unix, comm
-;; $Id: rlogin.el,v 1.4 2003/05/06 17:46:28 lektu Exp $
+;; $Id: rlogin.el,v 1.3 2002/03/14 11:51:47 miles Exp $
;; This file is part of GNU Emacs.
(provide 'rlogin)
-;;; arch-tag: 6e20eabf-feda-40fa-ab40-0d156db447e4
;;; rlogin.el ends here
(provide 'snmp-mode)
-;;; arch-tag: eb6cc0f9-1e47-4023-8625-bc9aae6c3527
;;; snmp-mode.el ends here
(provide 'telnet)
-;;; arch-tag: 98218821-d04a-48b6-9058-57d0d4677a56
;;; telnet.el ends here
(provide 'tls)
-;;; arch-tag: 5596d1c4-facc-4bc4-94a9-9863b928d7ac
;;; tls.el ends here
;; Furthermore, there are no backup files on FTP hosts.
;; Worth further investigations.
-;;; arch-tag: 759fb338-5c63-4b99-bd36-b4d59db91cff
;;; tramp-ftp.el ends here
;; * (RMS) Use unwind-protect to clean up the state so as to make the state
;; regular again.
-;;; arch-tag: fcc9dbec-7503-4d73-b638-3c8aa59575f5
;;; tramp-smb.el ends here
(compilation-minor-mode 1))
(provide 'tramp-util)
-
-;;; arch-tag: 500f9992-a44e-46d0-83a7-980799251808
;;; tramp-util.el ends here
(insert "begin 600 xxx\n"))))
(provide 'tramp-uu)
-
-;;; arch-tag: 7153f2c6-8be5-4cd2-8c06-0fbcf5190ef6
;;; tramp-uu.el ends here
;; No need to load this again if anyone asks.
(provide 'tramp-vc)
-;;; arch-tag: 27cc42ce-da19-468d-ad5c-a2690558db60
;;; tramp-vc.el ends here
;; unhandled-file-name-directory
;; vc-registered
-;;; arch-tag: 3a21a994-182b-48fa-b0cd-c1d9fede424a
;;; tramp.el ends here
(provide 'trampver)
-;;; arch-tag: 443576ca-f8f1-4bb1-addc-5c70861e93b1
;;; trampver.el ends here
(provide 'webjump)
-;;; arch-tag: f1d20156-0a6f-488b-bd91-f69ee8b6d5cc
;;; webjump.el ends here
(provide 'zone-mode)
-;;; arch-tag: 6a2940ef-fd4f-4de7-b979-b027b09821fe
;;; zone-mode.el ends here
(provide 'newcomment)
-;;; arch-tag: 01e3320a-00c8-44ea-a696-8f8e7354c858
;;; newcomment.el ends here
(provide 'novice)
-;;; arch-tag: f83c0f96-497e-4db6-a430-8703716c6dd9
;;; novice.el ends here
(provide 'auto-show)
-;;; arch-tag: 49587cbf-95cc-4061-b564-274aaec37469
;;; auto-show.el ends here
(provide 'awk-mode)
-;;; arch-tag: 14ebc02a-b3c5-4e76-8034-6ca9ac0af0e6
;;; awk-mode.el ends here
(provide 'float)
-;;; arch-tag: cc0c89c6-5718-49af-978e-585f6b14e347
;;; float.el ends here
(provide 'hilit19)
-;;; arch-tag: db99739a-4837-41ee-ad02-3baced8ae71d
;;; hilit19.el ends here
(provide 'hscroll)
-;;; arch-tag: 48377520-e5ca-401d-b360-3881b2d5a05a
;;; hscroll.el ends here
(provide 'mlsupport)
-;;; arch-tag: b0ad09bc-8cb2-4be0-8888-2e874839bcbc
;;; mlsupport.el ends here
(provide 'outline)
-;;; arch-tag: 14ed00e1-bd40-4db8-86e5-3b82ce326e45
;;; ooutline.el ends here
(provide 'options)
-;;; arch-tag: d18211a1-f3fb-48c9-a449-d5acde406a3c
;;; options.el ends here
(provide 'profile)
-;;; arch-tag: 816f97e8-efff-4da2-9a95-7bc392f58b19
;;; profile.el ends here
(provide 'rnews)
-;;; arch-tag: c032a20b-cafb-466c-b3fa-5be404a18f8c
;;; rnews.el ends here
(provide 'rnewspost)
-;;; arch-tag: 18f7b2af-cf9a-49e4-878b-71eb49913e00
;;; rnewspost.el ends here
;; Maintainer: Noah Friedman <friedman@splode.com>
;; Keywords: minibuffer, window, frame, display
-;; $Id: rsz-mini.el,v 1.1 2001/08/30 07:29:18 gerd Exp $
+;; $Id: rsz-mini.el,v 1.29 2001/07/16 12:22:59 pj Exp $
;; This file is part of GNU Emacs.
(provide 'rsz-mini)
-;;; arch-tag: 3cb85d51-ab33-4e46-8362-dd87a5d06c99
;;; rsz-mini.el ends here
(require 'supercite)
(provide 'sc)
-;;; arch-tag: 31e8ae19-689e-4b7d-9161-6d7dd60c6ece
;;; sc.el ends here
(provide 'scribe)
-;;; arch-tag: 64f454c4-7544-4ea2-9d14-f0b668f2cdc6
;;; scribe.el ends here
(provide 'sun-curs)
-;;; arch-tag: 7cc861e5-e2d9-4191-b211-2baaaab54e78
;;; sun-curs.el ends here
(provide 'sun-fns)
-;;; arch-tag: 1c4c1192-f71d-4d5f-b883-ae659c28e132
;;; sun-fns.el ends here
(provide 'uncompress)
-;;; arch-tag: 626658d4-fcce-499a-990d-d165f2ed7da3
;;; uncompress.el ends here
(provide 'x-apollo)
-;;; arch-tag: 4f3e86f4-557c-44b3-978e-144fc4dc812e
;;; x-apollo.el ends here
(provide 'x-menu)
-;;; arch-tag: 889f6d49-c01b-49e7-aaef-b0c6966c2961
;;; x-menu.el ends here
(provide 'outline)
(provide 'noutline)
-;;; arch-tag: 1724410e-7d4d-4f46-b801-49e18171e874
;;; outline.el ends here
(provide 'paren)
-;;; arch-tag: d0969b88-7ac0-4bd0-bd53-e73b892b86a9
;;; paren.el ends here
(let ((load-path (list (expand-file-name "lisp"))))
(batch-byte-compile)))
-;;; arch-tag: cb299b78-1d6c-4c02-945b-12fa2e856d6f
;;; patcomp.el ends here
(convert-standard-filename "~/.abbrev_defs"))
"*Default name of file to read abbrevs from.")
-;;; arch-tag: bae27ffb-9944-4c87-b569-30d4635a99e1
;;; paths.el ends here
(setq pcomplete-stub nondir)
(pcomplete-uniqify-list entries)))
-;;; arch-tag: d2aeac43-4bf5-4509-a496-74b863c6642b
;;; pcmpl-cvs.el ends here
;;;###autoload
(defalias 'pcomplete/gdb 'pcomplete/xargs)
-;;; arch-tag: 06d2b429-dcb1-4a57-84e1-f70d87781183
;;; pcmpl-gnu.el ends here
(pcomplete-uniqify-list points)
(cons "swap" (pcmpl-linux-mounted-directories))))))
-;;; arch-tag: bb0961a6-a623-463d-92c6-497c317293b1
;;; pcmpl-linux.el ends here
(t
(error "You must select a mode: -q, -i, -U, --verify, etc"))))))
-;;; arch-tag: 4e64b490-fecf-430e-b2b9-70a8ad64b8c1
;;; pcmpl-rpm.el ends here
(pcomplete-here* (pcmpl-unix-group-names)))
(while (pcomplete-here (pcomplete-entries))))
-;;; arch-tag: 3f9eb5af-7e0e-449d-b586-381cbbf8fc5c
;;; pcmpl-unix.el ends here
; (defalias 'pc-match-beginning 'pcomplete-match-beginning)
; (defalias 'pc-match-end 'pcomplete-match-end)
-;;; arch-tag: ae32ef2d-dbed-4244-8b0f-cf5a2a3b07a4
;;; pcomplete.el ends here
;;
(provide 'pcvs-defs)
-;;; arch-tag: c7c701d0-d1d4-4aa9-a302-007bb03aca5e
;;; pcvs-defs.el ends here
(provide 'pcvs-info)
-;;; arch-tag: d85dde07-bdc2-400a-882f-92f398c7b0ba
;;; pcvs-info.el ends here
(provide 'pcvs-parse)
-;;; arch-tag: 35418375-1a23-40a0-957d-96b0262f91d6
;;; pcvs-parse.el ends here
(provide 'pcvs-util)
-;;; arch-tag: 3b2588bb-2ae3-4f1f-bf5b-dea91b1f8a59
;;; pcvs-util.el ends here
(shrink-window-if-larger-than-buffer))))
(if (not (or silent
(unwind-protect
- (yes-or-no-p
- (let ((nfiles (length files)))
- (if (= 1 nfiles)
- (format "Delete file: \"%s\" ? "
- (cvs-fileinfo->file (car files)))
- (format "Delete %d files? " nfiles))))
+ (yes-or-no-p (format "Delete %d files? " (length files)))
(cvs-bury-buffer tmpbuf cvs-buffer))))
(progn (message "Aborting") nil)
(dolist (fi files)
\f
(provide 'pcvs)
-;;; arch-tag: 8e3a7494-0453-4389-9ab3-a557ce9fab61
;;; pcvs.el ends here
(provide '5x5)
-;;; arch-tag: ec4dabd5-572d-41ea-b48c-ec5ce0d68fa9
;;; 5x5.el ends here
(animate-string "my sunshine" 18 34)
(animate-string "to stay!" 19 34))
-;;; arch-tag: 275289a3-6ac4-41da-b527-a1147045392f
;;; animate.el ends here
(provide 'blackbox)
-;;; arch-tag: 6c474c62-5617-4b10-9b44-ac430168c0e2
;;; blackbox.el ends here
(provide 'bruce)
-;;; arch-tag: b83ded51-4ccb-41ef-8bd6-3b521e81dd9b
;;; bruce.el ends here
(provide 'cookie1)
-;;; arch-tag: 4a8a8712-df6a-4f34-b030-108a1b47f9f2
;;; cookie1.el ends here
;;; (delete-backward-char 1)
;;; (insert ")\n"))))))
-;;; arch-tag: 8f094d88-ffe1-4f99-afe3-a5e81dd939d9
;;; decipher.el ends here
(provide 'dissociate)
-;;; arch-tag: 90d197d1-409b-45c5-a0b5-fbfb2e06334f
;;; dissociate.el ends here
(provide 'doctor)
-;;; arch-tag: 579380f6-4902-4ea5-bccb-6339e30e1257
;;; doctor.el ends here
(provide 'dunnet)
-;;; arch-tag: 4cc8e47c-d9e1-4ef4-936b-578e7f529558
;;; dunnet.el ends here
;;; Provide ourselves.
(provide 'fortune)
-;;; arch-tag: a1e4cb8a-3792-40e7-86a7-fc75ce094bcc
;;; fortune.el ends here
(provide 'gamegrid)
-;;; arch-tag: a96c2ff4-1c12-427e-bd3d-faeaf174cd46
;;; gamegrid.el ends here
(provide 'gametree)
-;;; arch-tag: aaa30943-9ae4-4cc1-813d-a46f96b7e4f1
;;; gametree.el ends here
(provide 'gomoku)
-;;; arch-tag: b1b8205e-77fc-4597-b373-3ea2c04311eb
;;; gomoku.el ends here
(provide 'handwrite)
-;;; arch-tag: f2285ae9-e41b-4c96-8343-87dce41e44b7
;;; handwrite.el ends here
(provide 'hanoi)
-;;; arch-tag: 7a901659-4346-495c-8883-14cbf540610c
;;; hanoi.el ends here
(provide 'landmark)
-;;; arch-tag: ae5031be-96e6-459e-a3df-1df53117d3f2
;;; landmark.el ends here
(provide 'life)
-;;; arch-tag: e9373544-755e-42f5-a9a1-4d4c422bb97a
;;; life.el ends here
(add-hook 'find-file-hook 'protect-innocence-hook)
(provide 'meese)
-;;; arch-tag: 47af12d2-6a7d-4e2e-a1ea-eae75a77e3f0
;;; meese.el ends here
(provide 'morse)
-;;; arch-tag: 3331e6c1-9a9e-453f-abfd-163a9c3f93a6
;;; morse.el ends here
(provide 'mpuz)
-;;; arch-tag: 2781d6ba-89e7-43b5-85c7-5d3a2e73feb1
;;; mpuz.el ends here
(provide 'pong)
-;;; arch-tag: 1fdf0fc5-13e2-4de4-aae4-09bdd5af99f3
;;; pong.el ends here
(provide 'snake)
-;;; arch-tag: 512ffc92-cfac-4287-9a4e-92890701a5c8
;;; snake.el ends here
(provide 'solitaire)
-;;; arch-tag: 1b18ee1c-1e79-4a5b-8658-9560b82e63dd
;;; solitaire.el ends here
(provide 'spook)
-;;; arch-tag: c682b61f-92b6-4492-9c0d-2367e562449c
;;; spook.el ends here
(provide 'studly)
-;;; arch-tag: 0dbf5a60-d2e6-48c2-86ae-77fc8575ac67
;;; studly.el ends here
(provide 'tetris)
-;;; arch-tag: fb780d53-3ff0-49f0-8e19-f7f13cf2d49e
;;; tetris.el ends here
(provide 'yow)
-;;; arch-tag: d13db89b-84f1-4141-a5ce-261d1733a65c
;;; yow.el ends here
;;;;;;;;;;;;;;;
(provide 'zone)
-;;; arch-tag: 7092503d-74a9-4325-a55c-a026ede58cea
;;; zone.el ends here
(provide 'printing)
-;;; arch-tag: 9ce9ac3f-0f60-4370-900b-1943215d9d18
;;; printing.el ends here
;;;###autoload
(defun ada-mode ()
"Ada mode is the major mode for editing Ada code.
-This version was built on $Date: 2003/05/13 20:48:15 $.
+This version was built on $Date: 2003/05/04 19:52:34 $.
Bindings are as follows: (Note: 'LFD' is control-j.)
\\{ada-mode-map}
;;; provide ourselves
(provide 'ada-mode)
-;;; arch-tag: 1b7d45ec-1698-43b5-8d4a-e479ea023270
;;; ada-mode.el ends here
;; Copyright (C) 1998, 99, 2000-2003 Free Software Foundation, Inc.
;; Author: Emmanuel Briot <briot@gnat.com>
-;; Ada Core Technologies's version: $Revision: 1.12 $
+;; Ada Core Technologies's version: $Revision: 1.61 $
;; Keywords: languages, ada, project file
;; This file is part of GNU Emacs.
(provide 'ada-prj)
-;;; arch-tag: 65978c77-816e-49c6-896e-6905605d1b4c
;;; ada-prj.el ends here
;; Copyright(C) 1987, 93, 94, 96, 97, 98, 99, 2000
;; Free Software Foundation, Inc.
-;; Ada Core Technologies's version: $Revision: 1.16 $
+;; Ada Core Technologies's version: $Revision: 1.23 $
;; This file is part of GNU Emacs.
(provide 'ada-stmt)
-;;; arch-tag: 94f51555-cc0e-44e5-8865-8788aae8ecd3
;;; ada-stmt.el ends here
(provide 'ada-xref)
-;;; arch-tag: 415a39fe-577b-4676-b3b1-6ff6db7ca24e
;;; ada-xref.el ends here
alist nil))))))
;;; Local IspellPersDict: .ispell_antlr
-
-;;; arch-tag: 5de2be79-3d13-4560-8fbc-f7d0234dcb5c
;;; antlr-mode.el ends here
(provide 'asm-mode)
-;;; arch-tag: 210e695f-f338-4376-8913-a4c5c72ac848
;;; asm-mode.el ends here
;; Author: Dave Love <fx@gnu.org>
;; Keywords: languages
-;; $Revision: 1.4 $
+;; $Revision: 1.3 $
;; This file is part of GNU Emacs.
(provide 'autoconf-mode)
-;;; arch-tag: 4f44778f-2ab3-49a1-a103-f0acb9df2de4
;;; autoconf.el ends here
(save-excursion
(beginning-of-line)
(when (c-syntactic-re-search-forward
- c-assignment-op-regexp
- (c-point 'eol) t t t)
- (setq equalp (- (or (match-beginning 1)
- (match-end 0))
- (c-point 'boi))))))
+ ;; This regexp avoids matches on ==.
+ "\\(\\=\\|[^=]\\)=\\([^=]\\|$\\)"
+ (c-point 'eol) t t)
+ (setq equalp (- (match-beginning 2) (c-point 'boi))))))
(save-excursion
(goto-char startpos)
(if (or (if (c-syntactic-re-search-forward
- c-assignment-op-regexp
- (min endpos (c-point 'eol)) t t t)
+ "\\(\\=\\|[^=]\\)=\\([^=]\\|$\\)"
+ (min endpos (c-point 'eol)) t t)
(progn
- (goto-char (or (match-beginning 1)
- (match-end 0)))
+ (goto-char (match-beginning 2))
nil)
t)
(save-excursion
\f
(cc-provide 'cc-align)
-;;; arch-tag: 4d71ed28-bf51-4509-a148-f39669669a2e
;;; cc-align.el ends here
(goto-char (min start-point end-point)))))))
(cc-provide 'cc-awk) ; Changed from 'awk-mode, ACM 2002/5/21
-
-;;; arch-tag: c4836289-3aa4-4a59-9934-9ccc2bacccf3
;;; awk-mode.el ends here
\f
(provide 'cc-bytecomp)
-;;; arch-tag: 2d71b3ad-57b0-4b13-abd3-ab836e08f975
;;; cc-bytecomp.el ends here
(when (save-excursion
(skip-chars-backward " \t")
(not (bolp)))
- (c-newline-and-indent)
- ;; Set markers around the newline and indention inserted
- ;; above. We insert the start marker here and not before
- ;; the call to kludge around a misfeature in expand-abbrev:
- ;; If the line contains e.g. "else" then expand-abbrev will
- ;; be called when c-newline-and-indent inserts the newline.
- ;; That function first removes the abbrev "else" and then
- ;; inserts the expansion, which is an identical "else" in
- ;; this case. So the marker that we put after "else" would
- ;; end up before it.
(setq delete-temp-newline
- (cons (copy-marker (c-point 'eopl) t)
- (point-marker))))
+ (list (point-marker)))
+ (c-newline-and-indent)
+ (setcdr delete-temp-newline (point-marker)))
(unwind-protect
(progn
(if (eq last-command-char ?{)
\f
(cc-provide 'cc-cmds)
-;;; arch-tag: bf0611dc-d1f4-449e-9e45-4ec7c6936677
;;; cc-cmds.el ends here
\f
(cc-provide 'cc-compat)
-
-;;; arch-tag: 564dab2f-e6ad-499c-a4a3-fedec3ecc192
;;; cc-compat.el ends here
\f
;;; Variables also used at compile time.
-(defconst c-version "5.30.6"
+(defconst c-version "5.30.5"
"CC Mode version number.")
(defconst c-version-sym (intern c-version))
\f
(cc-provide 'cc-defs)
-;;; arch-tag: 3bb2629d-dd84-4ff0-ad39-584be0fe3cda
;;; cc-defs.el ends here
;; otherwise, we could be looking at a hanging member init
;; colon
(goto-char checkpoint)
- (while (and
- (eq (char-before) ?,)
- ;; this will catch member inits with multiple
- ;; line arglists
- (progn
- (forward-char -1)
- (c-backward-syntactic-ws (c-point 'bol))
- (c-safe (c-backward-sexp 1) t))
- (or (not (looking-at "\\s\("))
- (c-safe (c-backward-sexp 1) t)))
+ (while (eq (char-before) ?,)
+ ;; this will catch member inits with multiple
+ ;; line arglists
+ (forward-char -1)
+ (c-backward-syntactic-ws (c-point 'bol))
+ (if (eq (char-before) ?\))
+ (c-backward-sexp 2)
+ (c-backward-sexp 1))
(c-backward-syntactic-ws lim))
(if (and (eq (char-before) ?:)
(progn
\f
(cc-provide 'cc-engine)
-;;; arch-tag: 149add18-4673-4da5-ac47-6805e4eae089
;;; cc-engine.el ends here
\f
(cc-provide 'cc-fonts)
-;;; arch-tag: 2f65f405-735f-4da5-8d4b-b957844c5203
;;; cc-fonts.el ends here
'("defined"))
pike '("defined" "efun" "constant"))
-(c-lang-defconst c-assignment-operators
- "List of all assignment operators."
- t '("=" "*=" "/=" "%=" "+=" "-=" ">>=" "<<=" "&=" "^=" "|=")
- java (append (c-lang-const c-assignment-operators)
- '(">>>="))
- c++ (append (c-lang-const c-assignment-operators)
- '("and_eq" "or_eq" "xor_eq"))
- idl nil)
-
(c-lang-defconst c-operators
"List describing all operators, along with their precedence and
associativity. The order in the list corresponds to the precedence of
(right-assoc-sequence "?" ":")
;; Assignment.
- (right-assoc ,@(c-lang-const c-assignment-operators))
+ (right-assoc "=" "*=" "/=" "%=" "+=" "-=" ">>=" "<<=" "&=" "^=" "|="
+ ,@(when (c-major-mode-is 'java-mode)
+ '(">>>="))
+ ,@(when (c-major-mode-is 'c++-mode)
+ '("and_eq" "or_eq" "xor_eq")))
;; Exception.
,@(when (c-major-mode-is 'c++-mode)
(c-lang-defvar c-nonsymbol-token-regexp
(c-lang-const c-nonsymbol-token-regexp))
-(c-lang-defconst c-assignment-op-regexp
- ;; Regexp matching all assignment operators and only them. The
- ;; beginning of the first submatch is used to detect the end of the
- ;; token, along with the end of the whole match.
- t (if (c-lang-const c-assignment-operators)
- (concat
- ;; Need special case for "=" since it's a prefix of "==".
- "=\\([^=]\\|$\\)"
- "\\|"
- (c-make-keywords-re nil
- (set-difference (c-lang-const c-assignment-operators)
- '("=")
- :test 'string-equal)))
- "\\<\\>"))
-(c-lang-defvar c-assignment-op-regexp
- (c-lang-const c-assignment-op-regexp))
-
(c-lang-defconst c-<-op-cont-regexp
;; Regexp matching the second and subsequent characters of all
;; multicharacter tokens that begin with "<".
(c-lang-defconst c-opt-<>-sexp-key
;; Adorned regexp matching keywords that can be followed by an angle
- ;; bracket sexp. Always set when `c-recognize-<>-arglists' is.
+ ;; bracket sexp.
t (if (c-lang-const c-recognize-<>-arglists)
(c-make-keywords-re t (c-lang-const c-<>-sexp-kwds))))
(c-lang-defvar c-opt-<>-sexp-key (c-lang-const c-opt-<>-sexp-key))
\f
(cc-provide 'cc-langs)
-;;; arch-tag: 1ab57482-cfc2-4c5b-b628-3539c3098822
;;; cc-langs.el ends here
\f
(cc-provide 'cc-menus)
-;;; arch-tag: f6b60933-91f0-4145-ab44-70ca6d1b919b
;;; cc-menus.el ends here
\f
(cc-provide 'cc-mode)
-
-;;; arch-tag: 7825e5c4-fd09-439f-a04d-4c13208ba3d7
;;; cc-mode.el ends here
\f
(cc-provide 'cc-styles)
-;;; arch-tag: c764f61a-96ba-484a-a68f-101c0e9d5d2c
;;; cc-styles.el ends here
working due to this change.")
(define-widget 'c-extra-types-widget 'radio
- "Internal CC Mode widget for the `*-font-lock-extra-types' variables."
+ ;; Widget for a list of regexps for the extra types.
:args '((const :tag "none" nil)
(repeat :tag "types" regexp)))
;; in older versions in Emacs, so depending on the load order we might
;; not install the values below. There's no kludge to cope with this
;; (as opposed to the *-font-lock-keywords-* variables) since the old
-;; values work fairly well anyway.
+;; values works fairly well anyway.
(defcustom c-font-lock-extra-types
'("FILE" "\\sw+_t"
\f
(cc-provide 'cc-vars)
-;;; arch-tag: d62e9a55-c9fe-409b-b5b6-050b6aa202c9
;;; cc-vars.el ends here
;; Cleanup.
(kill-buffer outbuf))))
-;;; arch-tag: 4f20253c-71ef-4e6d-a774-19087060910e
;;; cmacexp.el ends here
;; in unnamed entity at line 4 char 8 of file:///home/reto/test/group.xml
("Warning:.*\n.* line \\([0-9]+\\) char \\([0-9]+\\) of file://\\(.+\\)"
3 1 2)
-
- ;; See http://ant.apache.org/faq.html
- ;; Ant Java: works for jikes
- ("^\\s-*\\[[^]]*\\]\\s-*\\(.+\\):\\([0-9]+\\):\\([0-9]+\\):[0-9]+:[0-9]+:" 1 2 3)
-
- ;; Ant Java: works for javac
- ("^\\s-*\\[[^]]*\\]\\s-*\\(.+\\):\\([0-9]+\\):" 1 2)
-
)
"Alist that specifies how to match errors in compiler output.
(consp argp))))
;;;###autoload (define-key ctl-x-map "`" 'next-error)
-(defun previous-error (argp)
+(defun previous-error ()
"Visit previous compilation error message and corresponding source code.
-
-A prefix ARGP specifies how many error messages to move;
-negative means move forward to next error messages.
-
-This operates on the output from the \\[compile] and \\[grep] commands."
- (interactive "P")
- (next-error (- (prefix-numeric-value argp))))
+This operates on the output from the \\[compile] command."
+ (interactive)
+ (next-error -1))
(defun first-error ()
"Reparse the error message buffer and start at the first error.
(provide 'compile)
-;;; arch-tag: 12465727-7382-4f72-b234-79855a00dd8c
;;; compile.el ends here
(provide 'cperl-mode)
-;;; arch-tag: 42e5b19b-e187-4537-929f-1a7408980ce6
;;; cperl-mode.el ends here
(provide 'cpp)
-;;; arch-tag: fb7d433d-745d-495a-96f0-86908ab63f74
;;; cpp.el ends here
;;}}}
-;;; arch-tag: 225fb5e2-0838-4eb1-88ce-3811c5e4d738
;;; cwarn.el ends here
(run-hooks 'dcl-mode-load-hook) ; for your customizations
-;;; arch-tag: e00d421b-f26c-483e-a8bd-af412ea7764a
;;; dcl-mode.el ends here
(provide 'delphi)
(defconst delphi-version
- (let ((revision "$Revision: 3.10 $"))
+ (let ((revision "$Revision: 3.9 $"))
(string-match ": \\([^ ]+\\)" revision)
(match-string 1 revision))
"Version of this delphi mode.")
(run-hooks 'delphi-mode-hook))
-;;; arch-tag: 410e192d-e9b5-4397-ad62-12340fc3fa41
;;; delphi.el ends here
(provide 'ebnf-bnf)
-;;; arch-tag: 3b1834d3-8367-475b-80d5-8e0bbd00ce50
;;; ebnf-bnf.el ends here
;;; ebnf-iso.el --- parser for ISO EBNF
-;; Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
;; Author: Vinicius Jose Latorre <vinicius@cpqd.com.br>
;; Maintainer: Vinicius Jose Latorre <vinicius@cpqd.com.br>
;; Keywords: wp, ebnf, PostScript
-;; Time-stamp: <2003/08/12 21:29:14 vinicius>
+;; Time-stamp: <2003-02-10 10:26:32 jbarranquero>
;; Version: 1.6
;; This file is part of GNU Emacs.
"Value returned by `ebnf-iso-lex' function.")
-(defvar ebnf-no-meta-identifier nil
- "Used by `ebnf-iso-term' and `ebnf-iso-lex' functions.")
+(defconst ebnf-no-meta-identifier nil)
\f
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(provide 'ebnf-iso)
-;;; arch-tag: 03315eef-8f64-404a-bf9d-256d42442ee3
;;; ebnf-iso.el ends here
(provide 'ebnf-otz)
-;;; arch-tag: 7ef2249d-9e8b-4bc1-999f-95d784690636
;;; ebnf-otz.el ends here
(provide 'ebnf-yac)
-;;; arch-tag: 8a96989c-0b1d-42ba-a020-b2901f9a2a4d
;;; ebnf-yac.el ends here
;; Author: Vinicius Jose Latorre <vinicius@cpqd.com.br>
;; Maintainer: Vinicius Jose Latorre <vinicius@cpqd.com.br>
;; Keywords: wp, ebnf, PostScript
-;; Time-stamp: <2003/08/08 23:09:36 vinicius>
+;; Time-stamp: <2003-02-10 10:40:14 jbarranquero>
;; Version: 3.6.1
;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/
(format ebnf-message-float value)))
-(defvar ebnf-total 0)
-(defvar ebnf-nprod 0)
-
-
(defsubst ebnf-message-info (messag)
(message "%s...%3d%%"
messag
(defvar ebnf-tree nil)
(defvar ebnf-direction "R")
+(defvar ebnf-total 0)
+(defvar ebnf-nprod 0)
(defun ebnf-generate-postscript (from to)
(defun ebnf-begin-job ()
- (ps-printing-region nil nil nil)
+ (ps-printing-region nil nil)
(if ebnf-use-float-format
(setq ebnf-format-float "%1.3f"
ebnf-message-float "%3.2f")
(provide 'ebnf2ps)
-;;; arch-tag: 148bc8af-5398-468b-b922-eeb7afef3e4f
;;; ebnf2ps.el ends here
;;; eval:(put 'ebrowse-for-all-trees 'lisp-indent-hook 1)
;;; End:
-;;; arch-tag: 4fa3c8bf-1771-479b-bcd7-b029c7c9677b
;;; ebrowse.el ends here
\f
(provide 'etags)
-;;; arch-tag: b897c2b5-08f3-4837-b2d3-0e7d6db1b63e
;;; etags.el ends here
(provide 'executable)
-;;; arch-tag: 58458d1c-d9db-45ec-942b-8bbb1d5e319d
;;; executable.el ends here
(provide 'f90)
-;;; arch-tag: fceac97c-c147-44bd-aec0-172d4b560ef8
;;; f90.el ends here
(provide 'fortran)
-;;; arch-tag: 74935096-21c4-4cab-8ee5-6ef16090dc04
;;; fortran.el ends here
(provide 'glasses)
-;;; arch-tag: a3515167-c89e-484f-90a1-d85143e52b12
;;; glasses.el ends here
(if buffer
(progn
(with-current-buffer buffer
- (unless (or (verify-visited-file-modtime buffer) gud-keep-buffer)
- (if (yes-or-no-p
+ (if (not (or (verify-visited-file-modtime buffer) gud-keep-buffer))
+ (progn
+ (if
+ (yes-or-no-p
(format "File %s changed on disk. Reread from disk? "
(buffer-name)))
(revert-buffer t t)
- (setq gud-keep-buffer t)))
+ (setq gud-keep-buffer t))))
(save-restriction
(widen)
(goto-line line)
(setq pos (point))
(setq overlay-arrow-string "=>")
(or overlay-arrow-position
- (setq overlay-arrow-position (make-marker)))
+ (setq overlay-arrow-position (make-marker)))
(set-marker overlay-arrow-position (point) (current-buffer)))
(cond ((or (< pos (point-min)) (> pos (point-max)))
- (widen)
- (goto-char pos))))
- (if window (set-window-point window overlay-arrow-position))))))
+ (widen)
+ (goto-char pos))))
+ (set-window-point window overlay-arrow-position)))))
;; The gud-call function must do the right thing whether its invoking
;; keystroke is from the GUD buffer itself (via major-mode binding)
(provide 'gud)
-;;; arch-tag: 6d990948-df65-461a-be39-1c7fb83ac4c4
;;; gud.el ends here
(provide 'hideif)
-;;; arch-tag: c6381d17-a59a-483a-b945-658f22277981
;;; hideif.el ends here
(provide 'hideshow)
-;;; arch-tag: 378b6852-e82a-466a-aee8-d9c73859a65e
;;; hideshow.el ends here
(provide 'icon)
-;;; arch-tag: 8abf8c99-e7df-44af-a58f-ef5ed2ee52cb
;;; icon.el ends here
(provide 'idlw-rinfo)
(provide 'idlwave-rinfo)
-;;; arch-tag: d0b65da3-7f5e-4992-b8dd-885800b5cd6b
;;; idlw-rinfo.el ends here
;; Chris Chase <chase@att.com>
;; Maintainer: J.D. Smith <jdsmith@as.arizona.edu>
;; Version: 4.15
-;; Date: $Date: 2002/10/17 15:41:01 $
+;; Date: $Date: 2002/09/13 06:18:53 $
;; Keywords: processes
;; This file is part of GNU Emacs.
(if idlwave-shell-use-toolbar
(add-hook 'idlwave-shell-mode-hook 'idlwave-toolbar-add-everywhere))
-
-;;; arch-tag: 20c2e8ce-0709-41d8-a5b6-bb039148440a
;;; idlw-shell.el ends here
;; Author: Carsten Dominik <dominik@astro.uva.nl>
;; Maintainer: J.D. Smith <jdsmith@as.arizona.edu>
;; Version: 4.15
-;; Date: $Date: 2003/02/04 13:24:35 $
+;; Date: $Date: 2002/09/12 16:56:54 $
;; Keywords: processes
;; This file is part of GNU Emacs.
;;; idlw-toolbar.el ends here
-;;; arch-tag: ec9a3717-c44c-4716-9bda-cdacbe5ddb62
;; Chris Chase <chase@att.com>
;; Maintainer: J.D. Smith <jdsmith@as.arizona.edu>
;; Version: 4.15
-;; Date: $Date: 2003/07/21 21:36:29 $
+;; Date: $Date: 2003/05/06 17:40:52 $
;; Keywords: languages
;; This file is part of GNU Emacs.
(provide 'idlwave)
-;;; arch-tag: f77f3b0c-c37c-424f-a328-0886fd42b6fb
;;; idlwave.el ends here
(provide 'inf-lisp)
-;;; arch-tag: 5b74abc3-a085-4b91-8ab8-8da6899d3b92
;;; inf-lisp.el ends here
+++ /dev/null
-;;; ld-script.el --- GNU linker script editing mode for Emacs
-
-;; Copyright (C) 2003 Free Software Foundation, Inc.
-
-;; Author: Masatake YAMATO<jet@gyve.org>
-;; Keywords: languages, faces
-
-;; 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 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.
-
-;; 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, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-
-;;; Codes:
-
-;; Custom
-(defgroup ld-script nil
- "GNU linker script code editing commands for Emacs."
- :prefix "ld-script-"
- :group 'languages)
-
-(defvar ld-script-location-counter-face 'ld-script-location-counter-face)
-(defface ld-script-location-counter-face
- '((t (:weight bold :inherit font-lock-builtin-face)))
- "Face for location counter in GNU ld script."
- :group 'ld-script)
-
-;; Syntax rules
-(defvar ld-script-mode-syntax-table
- (let ((st (make-syntax-table)))
- (modify-syntax-entry ?\ "-" st)
- (modify-syntax-entry ?{ "(}" st)
- (modify-syntax-entry ?} "){" st)
- (modify-syntax-entry ?\( "()" st)
- (modify-syntax-entry ?\) ")(" st)
- (modify-syntax-entry ?\[ "(]" st)
- (modify-syntax-entry ?\] ")[" st)
- (modify-syntax-entry ?_ "w" st)
- (modify-syntax-entry ?. "_" st)
- (modify-syntax-entry ?\\ "\\" st)
- (modify-syntax-entry ?: "." st)
- (modify-syntax-entry ?, "." st)
- (modify-syntax-entry ?? "." st)
- (modify-syntax-entry ?= "." st)
- (modify-syntax-entry ?* ". 23" st)
- (modify-syntax-entry ?/ ". 14" st)
- (modify-syntax-entry ?+ "." st)
- (modify-syntax-entry ?- "." st)
- (modify-syntax-entry ?! "." st)
- (modify-syntax-entry ?~ "." st)
- (modify-syntax-entry ?% "." st)
- (modify-syntax-entry ?< "." st)
- (modify-syntax-entry ?> "." st)
- (modify-syntax-entry ?& "." st)
- (modify-syntax-entry ?| "." st)
- (modify-syntax-entry ?\" "\"" st)
- st)
- "Syntax table used while in `ld-script-mode'.")
-
-;; Font lock keywords
-(defvar ld-script-keywords
- '("ENTRY" "INCLUDE" "INPUT" "GROUP"
- "OUTPUT" "SEARCH_DIR" "STARTUP"
- "OUTPUT_FORMAT" "TARGET"
- "ASSERT" "EXTERN" "FORCE_COMMON_ALLOCATION" "NOCROSSREFS" "OUTPUT_ARCH"
- "PROVIDE"
- "SECTIONS" "SORT" "COMMON" "KEEP"
- "BYTE" "SHORT" "LONG" "QUAD" "SQAD"
- "FILL"
- "CREATE_OBJECT_SYMBOLS"
- "CONSTRUCTORS"
- "NOLOAD" "DSECT" "COPY" "INFO" "OVERLAY"
- "AT"
- "MEMORY"
- "PHDRS" "FILEHDR" "FLAGS"
- "PT_NULL" "PT_LOAD" "PT_DYNAMIC" "PT_INTERP" "PT_NONE" "PT_SHLIB" "PT_PHDR"
- "VERSION")
- "Keywords used of GNU ld script.")
-
-(defvar ld-script-builtins
- '("ABSOLUTE"
- "ADDR"
- "ALIGN"
- "BLOCK"
- "DEFINED"
- "LOADADDR"
- "MAX"
- "MIN"
- "NEXT"
- "SIZEOF"
- "SIZEOF_HEADERS"
- "sizeof_headers")
- "Builtin functions of GNU ld script.")
-
-(defvar ld-script-font-lock-keywords
- `((,(regexp-opt ld-script-keywords 'words)
- 1 font-lock-keyword-face)
- (,(regexp-opt ld-script-builtins 'words)
- 1 font-lock-builtin-face)
- ("/DISCARD/" . font-lock-warning-face)
- ("##\\|#[^#\n]+$" . font-lock-preprocessor-face)
- ("\\W\\(\\.\\)\\W" 1 ld-script-location-counter-face)
- )
- "Default font-lock-keywords for `ld-script mode'.")
-
-;;;###autoload
-(add-to-list 'auto-mode-alist '("\\.lds" . ld-script-mode))
-
-;;;###autoload
-(define-derived-mode ld-script-mode nil "LD-Script"
- "A major mode to edit GNU ld script files"
- (set (make-local-variable 'comment-start) "/* ")
- (set (make-local-variable 'comment-end) " */")
- (set (make-local-variable 'indent-line-function) #'indent-relative)
- (set (make-local-variable 'font-lock-defaults) '(ld-script-font-lock-keywords nil)))
-
-;;; arch-tag: 83280b6b-e6fc-4d00-a630-922d7aec5593
-;;; ld-script.el ends here
;;; "m4_syscmd" "m4_sysval" "m4_traceoff" "m4_traceon" "m4_translit"
;;; "m4_m4_undefine" "m4_undivert"))
-;;; arch-tag: 87811d86-94c1-474b-9666-587f6da74af1
;;; m4-mode.el ends here
(provide 'make-mode)
-;;; arch-tag: bd23545a-de91-44fb-b1b2-feafbb2635a0
;;; make-mode.el ends here
(provide 'mantemp)
-;;; arch-tag: 49794712-3b1b-4baa-9785-39556cb52c94
;;; mantemp.el ends here
(provide 'meta-mode)
(run-hooks 'meta-mode-load-hook)
-;;; arch-tag: ec2916b2-3a83-4cf7-962d-d8019370c006
;;; meta-mode.el ends here
(add-to-list 'auto-mode-alist '("\\.mixal\\'" . mixal-mode))
(provide 'mixal-mode)
-
-;;; arch-tag: be7c128a-bf61-4951-a90e-9398267ce3f3
;;; mixal-mode.el ends here
(provide 'modula2)
-;;; arch-tag: a21df1cb-5ece-4709-9219-1e7cd2d85d90
;;; modula2.el ends here
(provide 'octave-hlp)
-;;; arch-tag: df5ef8fa-76c9-44e5-9835-cb5a502c6282
;;; octave-hlp.el ends here
(provide 'octave-inf)
-;;; arch-tag: bdce0395-24d1-4bb4-bfba-6fb1eeb1a660
;;; octave-inf.el ends here
(provide 'octave-mod)
-;;; arch-tag: 05f1ce09-be87-4c00-803e-4919ffa26c23
;;; octave-mod.el ends here
(provide 'pascal)
-;;; arch-tag: 04535136-fd93-40b4-a505-c9bebdc051f5
;;; pascal.el ends here
(provide 'perl-mode)
-;;; arch-tag: 8c7ff68d-15f3-46a2-ade2-b7c41f176826
;;; perl-mode.el ends here
(provide 'prolog)
-;;; arch-tag: f3ec6748-1272-4ab6-8826-c50cb1607636
;;; prolog.el ends here
(provide 'ps-mode)
-;;; arch-tag: dce13d2d-69fb-4ec4-9d5d-6dd29c3f0e6e
;;; ps-mode.el ends here
(provide 'scheme)
-;;; arch-tag: a8f06bc1-ad11-42d2-9e36-ce651df37a90
;;; scheme.el ends here
;; but it *did* have an asterisk in the docstring!
(defcustom sh-builtins
'((bash eval sh-append posix
- "." "alias" "bg" "bind" "builtin" "compgen" "complete"
- "declare" "dirs" "disown" "enable" "fc" "fg" "help" "history"
- "jobs" "kill" "let" "local" "popd" "printf" "pushd" "source"
+ "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
(defcustom sh-leading-keywords
- '((bash eval sh-append sh
- "time")
-
- (csh "else")
+ '((csh "else")
(es "true" "unwind-protect" "whatis")
(defvar sh-variables
'((bash eval sh-append sh
- "allow_null_glob_expansion" "auto_resume" "BASH" "BASH_ENV"
- "BASH_VERSINFO" "BASH_VERSION" "cdable_vars" "COMP_CWORD"
- "COMP_LINE" "COMP_POINT" "COMP_WORDS" "COMPREPLY" "DIRSTACK"
- "ENV" "EUID" "FCEDIT" "FIGNORE" "FUNCNAME"
- "glob_dot_filenames" "GLOBIGNORE" "GROUPS" "histchars"
- "HISTCMD" "HISTCONTROL" "HISTFILE" "HISTFILESIZE"
- "HISTIGNORE" "history_control" "HISTSIZE"
- "hostname_completion_file" "HOSTFILE" "HOSTTYPE" "IGNOREEOF"
- "ignoreeof" "INPUTRC" "LINENO" "MACHTYPE" "MAIL_WARNING"
- "noclobber" "nolinks" "notify" "no_exit_on_failed_exec"
- "NO_PROMPT_VARS" "OLDPWD" "OPTERR" "OSTYPE" "PIPESTATUS"
- "PPID" "POSIXLY_CORRECT" "PROMPT_COMMAND" "PS3" "PS4"
- "pushd_silent" "PWD" "RANDOM" "REPLY" "SECONDS" "SHELLOPTS"
- "SHLVL" "TIMEFORMAT" "TMOUT" "UID")
+ "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"
;; The next entry is only used for defining the others
(shell eval sh-append executable-font-lock-keywords
- ;; Using font-lock-string-face here confuses sh-get-indent-info.
- '("\\\\[^A-Za-z0-9]" 0 font-lock-warning-face)
+ '("\\\\[^A-Za-z0-9]" 0 font-lock-string-face)
'("\\${?\\([A-Za-z_][A-Za-z0-9_]*\\|[0-9]+\\|[$*_]\\)" 1
font-lock-variable-name-face))
(rpm eval sh-append rpm2
process-environment)
sh-shell-variables))))
(case code
- ((nil) (try-completion string sh-shell-variables predicate))
+ (nil (try-completion string sh-shell-variables predicate))
(lambda (test-completion string sh-shell-variables predicate))
(t (all-completions string sh-shell-variables predicate)))))
(provide 'sh-script)
-;;; arch-tag: eccd8b72-f337-4fc2-ae86-18155a69d937
;;; sh-script.el ends here
(provide 'simula)
-;;; arch-tag: 488c1bb0-eebf-4f06-93df-1df603f06255
;;; simula.el ends here
;;; sql.el --- specialized comint.el for SQL interpreters
-;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
;; Author: Alex Schroeder <alex@gnu.org>
;; Maintainer: Alex Schroeder <alex@gnu.org>
-;; Version: 1.8.0
+;; Version: 1.7.0
;; Keywords: comm languages processes
;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?SqlMode
;;; Bugs:
-;; sql-ms now uses osql instead of isql. Osql flushes its error
-;; stream more frequently than isql so that error messages are
-;; available. There is no prompt and some output still is buffered.
-;; This improves the interaction under Emacs but it still is somewhat
-;; awkward.
-
-;; Quoted identifiers are not supported for hilighting. Most
-;; databases support the use of double quoted strings in place of
-;; identifiers; ms (Microsoft SQLServer) also supports identifiers
-;; enclosed within brackets [].
+;; Using sql-ms (isql by Microsoft): When commands with syntax errors
+;; or execution errors are executed, there is no server feedback.
+;; This happens in stored procedures for example. The server messages
+;; only appear after the process is exited. This makes things
+;; somewhat unreliable.
;; ChangeLog available on request.
-;;; Product Support:
-
-;; To add support for additional SQL products the following steps
-;; must be followed ("xyz" is the name of the product in the examples
-;; below):
-
-;; 1) Add the product to `sql-product' choice list.
-
-;; (const :tag "XyzDB" xyz)
-
-;; 2) Add an entry to the `sql-product-support' list.
-
-;; (xyz
-;; :font-lock sql-mode-xyz-font-lock-keywords
-;; :sqli-login (user password server database)
-;; :sqli-connect sql-connect-xyz
-;; :sqli-prompt-regexp "^xyzdb> "
-;; :sqli-prompt-length 7
-;; :sqli-input-sender nil
-;; :syntax-alist ((?# . "w")))
-
-;; 3) Add customizable values for the product interpreter and options.
-
-;; ;; Customization for XyzDB
-;;
-;; (defcustom sql-xyz-program "ixyz"
-;; "*Command to start ixyz by XyzDB."
-;; :type 'file
-;; :group 'SQL)
-;;
-;; (defcustom sql-xyz-options '("-X" "-Y" "-Z")
-;; "*List of additional options for `sql-xyz-program'."
-;; :type '(repeat string)
-;; :group 'SQL)
-
-;; 4) Add an entry to SQL->Product submenu.
-
-;; ["XyzDB" sql-highlight-xyz-keywords
-;; :style radio
-;; :selected (eq sql-product 'xyz)]
-
-;; 5) Add the font-lock specifications. At a minimum, default to
-;; using ANSI keywords. See sql-mode-oracle-font-lock-keywords for
-;; a more complex example.
-
-;; (defvar sql-mode-xyz-font-lock-keywords sql-mode-ansi-font-lock-keywords
-;; "XyzDB SQL keywords used by font-lock.")
-
-;; 6) Add a product highlighting function.
-
-;; (defun sql-highlight-xyz-keywords ()
-;; "Highlight XyzDB keywords."
-;; (interactive)
-;; (sql-set-product 'xyz))
-
-;; 7) Add an autoloaded SQLi function.
-
-;; ;;;###autoload
-;; (defun sql-xyz ()
-;; "Run ixyz by XyzDB as an inferior process."
-;; (interactive)
-;; (sql-product-interactive 'xyz))
-
-;; 8) Add a connect function which formats the command line arguments
-;; and starts the product interpreter in a comint buffer. See the
-;; existing connect functions for examples of the types of
-;; processing available.
-
-;; (defun sql-connect-xyz ()
-;; "Create comint buffer and connect to XyzDB using the login
-;; parameters and command options."
-;;
-;; ;; Do something with `sql-user', `sql-password',
-;; ;; `sql-database', and `sql-server'.
-;; (let ((params sql-xyz-options))
-;; (if (not (string= "" sql-server))
-;; (setq params (append (list "-S" sql-server) params)))
-;; (if (not (string= "" sql-database))
-;; (setq params (append (list "-D" sql-database) params)))
-;; (if (not (string= "" sql-password))
-;; (setq params (append (list "-P" sql-password) params)))
-;; (if (not (string= "" sql-user))
-;; (setq params (append (list "-U" sql-user) params)))
-;; (set-buffer (apply 'make-comint "SQL" sql-xyz-program
-;; nil params))))
-
-;; 9) Save and compile sql.el.
-
;;; To Do:
;; Add better hilight support for other brands; there is a bias towards
;; Gregor Zych <zych@pool.informatik.rwth-aachen.de>
;; nino <nino@inform.dk>
;; Berend de Boer <berend@pobox.com>
-;; Michael Mauger <mmaug@yahoo.com>
\f
(require 'comint)
;; Need the following to allow GNU Emacs 19 to compile the file.
-(eval-when-compile
- (require 'regexp-opt))
+(require 'regexp-opt)
(require 'custom)
;;; Allow customization
:version "20.4"
:group 'processes)
-;; These four variables will be used as defaults, if set.
+;; These three variables will be used as defaults, if set.
(defcustom sql-user ""
"*Default username."
:type 'string
:group 'SQL)
-;; SQL Product support
-(defcustom sql-product 'ansi
- "*Select the SQL database product used so that buffers can be
-highlighted properly when you open them."
- :type '(choice (const :tag "ANSI" ansi)
- (const :tag "DB2" db2)
- (const :tag "Informix" informix)
- (const :tag "Ingres" ingres)
- (const :tag "Interbase" interbase)
- (const :tag "Linter" linter)
- (const :tag "Microsoft" ms)
- (const :tag "MySQL" mysql)
- (const :tag "Oracle" oracle)
- (const :tag "PostGres" postgres)
- (const :tag "Solid" solid)
- (const :tag "SQLite" sqlite)
- (const :tag "Sybase" sybase))
- :group 'SQL)
-
-(defvar sql-interactive-product nil
- "Product under `sql-interactive-mode'.")
-
-(defvar sql-product-support
- '((ansi
- :font-lock sql-mode-ansi-font-lock-keywords)
- (db2
- :font-lock sql-mode-db2-font-lock-keywords
- :sqli-login nil
- :sqli-connect sql-connect-db2
- :sqli-prompt-regexp "^db2 => "
- :sqli-prompt-length 7)
- (informix
- :font-lock sql-mode-informix-font-lock-keywords
- :sqli-login (database)
- :sqli-connect sql-connect-informix
- :sqli-prompt-regexp "^SQL> "
- :sqli-prompt-length 5)
- (ingres
- :font-lock sql-mode-ingres-font-lock-keywords
- :sqli-login (database)
- :sqli-connect sql-connect-ingres
- :sqli-prompt-regexp "^\* "
- :sqli-prompt-length 2)
- (interbase
- :font-lock sql-mode-interbase-font-lock-keywords
- :sqli-login (user password database)
- :sqli-connect sql-connect-interbase
- :sqli-prompt-regexp "^SQL> "
- :sqli-prompt-length 5)
- (linter
- :font-lock sql-mode-linter-font-lock-keywords
- :sqli-login (user password database server)
- :sqli-connect sql-connect-linter
- :sqli-prompt-regexp "^SQL>"
- :sqli-prompt-length 4)
- (ms
- :font-lock sql-mode-ms-font-lock-keywords
- :sqli-login (user password server database)
- :sqli-connect sql-connect-ms
- :sqli-prompt-regexp "^[0-9]*>"
- :sqli-prompt-length 5
- :syntax-alist ((?@ . "w")))
- (mysql
- :font-lock sql-mode-mysql-font-lock-keywords
- :sqli-login (user password database server)
- :sqli-connect sql-connect-mysql
- :sqli-prompt-regexp "^mysql> "
- :sqli-prompt-length 6)
- (oracle
- :font-lock sql-mode-oracle-font-lock-keywords
- :sqli-login (user password database)
- :sqli-connect sql-connect-oracle
- :sqli-prompt-regexp "^SQL> "
- :sqli-prompt-length 5
- :syntax-alist ((?$ . "w") (?# . "w")))
- (postgres
- :font-lock sql-mode-postgres-font-lock-keywords
- :sqli-login (database server)
- :sqli-connect sql-connect-postgres
- :sqli-prompt-regexp "^.*> *"
- :sqli-prompt-length 5)
- (solid
- :font-lock sql-mode-solid-font-lock-keywords
- :sqli-login (user password server)
- :sqli-connect sql-connect-solid
- :sqli-prompt-regexp "^"
- :sqli-prompt-length 0)
- (sqlite
- :font-lock sql-mode-sqlite-font-lock-keywords
- :sqli-login (user password server database)
- :sqli-connect sql-connect-sqlite
- :sqli-prompt-regexp "^sqlite> "
- :sqli-prompt-length 8)
- (sybase
- :font-lock sql-mode-sybase-font-lock-keywords
- :sqli-login (server user password database)
- :sqli-connect sql-connect-sybase
- :sqli-prompt-regexp "^SQL> "
- :sqli-prompt-length 5
- :syntax-alist ((?@ . "w")))
- )
- "This variable contains a list of product features for each of the
-SQL products handled by `sql-mode'. Without an entry in this list a
-product will not be properly highlighted and will not support
-`sql-interactive-mode'.
-
-Each element in the list is in the following format:
-
- \(PRODUCT FEATURE VALUE ...)
-
-where PRODUCT is the appropriate value of `sql-product'. The product
-name is then followed by FEATURE-VALUE pairs. If a FEATURE is not
-specified, its VALUE is treated as nil. FEATURE must be one of the
-following:
-
- :font-lock name of the variable containing the product
- specific font lock highlighting patterns.
-
- :sqli-login a list of login parameters (i.e., user,
- password, database and server) needed to
- connect to the database.
-
- :sqli-connect the name of a function which accepts no
- parameters that will use the values of
- `sql-user', `sql-password',
- `sql-database' and `sql-server' to open a
- comint buffer and connect to the
- database. Do product specific
- configuration of comint in this function.
-
- :sqli-prompt-regexp a regular expression string that matches the
- prompt issued by the product interpreter.
-
- :sqli-prompt-length the length of the prompt on the line.
-
- :syntax-alist an alist of syntax table entries to enable
- special character treatment by font-lock and
- imenu. ")
-
;; misc customization of sql.el behaviour
(defcustom sql-electric-stuff nil
;; imenu support for sql-mode.
(defvar sql-imenu-generic-expression
- ;; Items are in reverse order because they are rendered in reverse.
- '(("Rules/Defaults" "^\\s-*create\\s-+\\(rule\\|default\\)\\s-+\\(\\w+\\)" 2)
- ("Sequences" "^\\s-*create\\s-+sequence\\s-+\\(\\w+\\)" 1)
- ("Triggers" "^\\s-*\\(create\\s-+\\(or\\s-+replace\\s-+\\)?\\)?trigger\\s-+\\(\\w+\\)" 3)
- ("Functions" "^\\s-*\\(create\\s-+\\(or\\s-+replace\\s-+\\)?\\)?function\\s-+\\(\\w+\\)" 3)
- ("Procedures" "^\\s-*\\(create\\s-+\\(or\\s-+replace\\s-+\\)?\\)?proc\\(edure\\)?\\s-+\\(\\w+\\)" 4)
- ("Packages" "^\\s-*create\\s-+\\(or\\s-+replace\\s-+\\)?package\\s-+\\(body\\s-+\\)?\\(\\w+\\)" 3)
- ("Indexes" "^\\s-*create\\s-+index\\s-+\\(\\w+\\)" 1)
- ("Tables/Views" "^\\s-*create\\s-+\\(\\(global\\s-+\\)?\\(temporary\\s-+\\)?table\\|view\\)\\s-+\\(\\w+\\)" 4))
+ '(("Tables" "^\\s-*create\\s-+table\\s-+\\(\\w+\\)" 1)
+ ("Indexes" "^\\s-*create\\s-+index\\s-+\\(\\w+\\)" 1))
"Define interesting points in the SQL buffer for `imenu'.
This is used to set `imenu-generic-expression' when SQL mode is
:group 'SQL)
(defcustom sql-sqlite-options nil
- "*List of additional options for `sql-sqlite-program'.
+ "*List of additional options for `sql-mysql-program'.
The following list of options is reported to make things work
on Windows: \"-C\" \"-t\" \"-f\" \"-n\"."
:type '(repeat string)
;; Customization for Microsoft
-(defcustom sql-ms-program "osql"
- "*Command to start osql by Microsoft.
+(defcustom sql-ms-program "isql"
+ "*Command to start isql by Microsoft.
Starts `sql-interactive-mode' after doing some setup.
(defvar sql-prompt-regexp nil
"Prompt used to initialize `comint-prompt-regexp'.
-You can change `sql-prompt-regexp' on `sql-interactive-mode-hook'.")
+You can change `comint-prompt-regexp' on `sql-interactive-mode-hook'.")
(defvar sql-prompt-length 0
"Prompt used to set `left-margin' in `sql-interactive-mode'.
-You can change `sql-prompt-length' on `sql-interactive-mode-hook'.")
+You can change it on `sql-interactive-mode-hook'.")
(defvar sql-alternate-buffer-name nil
"Buffer-local string used to possibly rename the SQLi buffer.
(get-buffer-process sql-buffer))]
["Send Region" sql-send-region (and (or (and (boundp 'mark-active); Emacs
mark-active)
- (mark t)); XEmacs
+ (mark)); XEmacs
(buffer-live-p sql-buffer)
(get-buffer-process sql-buffer))]
["Send Buffer" sql-send-buffer (and (buffer-live-p sql-buffer)
(get-buffer-process sql-buffer))]
- ["--" nil nil]
- ["Start SQLi session" sql-product-interactive (sql-product-feature :sqli-connect)]
["Show SQLi buffer" sql-show-sqli-buffer t]
["Set SQLi buffer" sql-set-sqli-buffer t]
["Pop to SQLi buffer after send"
sql-toggle-pop-to-buffer-after-send-region
:style toggle
:selected sql-pop-to-buffer-after-send-region]
- ["--" nil nil]
- ("Product"
- ["ANSI" sql-highlight-ansi-keywords
- :style radio
- :selected (eq sql-product 'ansi)]
- ["DB2" sql-highlight-db2-keywords
- :style radio
- :selected (eq sql-product 'db2)]
- ["Informix" sql-highlight-informix-keywords
- :style radio
- :selected (eq sql-product 'informix)]
- ["Ingres" sql-highlight-ingres-keywords
- :style radio
- :selected (eq sql-product 'ingres)]
- ["Interbase" sql-highlight-interbase-keywords
- :style radio
- :selected (eq sql-product 'interbase)]
- ["Linter" sql-highlight-linter-keywords
- :style radio
- :selected (eq sql-product 'linter)]
- ["Microsoft" sql-highlight-ms-keywords
- :style radio
- :selected (eq sql-product 'ms)]
- ["MySQL" sql-highlight-mysql-keywords
- :style radio
- :selected (eq sql-product 'mysql)]
- ["Oracle" sql-highlight-oracle-keywords
- :style radio
- :selected (eq sql-product 'oracle)]
- ["Postgres" sql-highlight-postgres-keywords
- :style radio
- :selected (eq sql-product 'postgres)]
- ["Solid" sql-highlight-solid-keywords
- :style radio
- :selected (eq sql-product 'solid)]
- ["SQLite" sql-highlight-sqlite-keywords
- :style radio
- :selected (eq sql-product 'sqlite)]
- ["Sybase" sql-highlight-sybase-keywords
- :style radio
- :selected (eq sql-product 'sybase)]
+ ("Highlighting"
+ ["ANSI SQL keywords" sql-highlight-ansi-keywords t]
+ ["Oracle keywords" sql-highlight-oracle-keywords t]
+ ["Postgres keywords" sql-highlight-postgres-keywords t]
+ ["Linter keywords" sql-highlight-linter-keywords t]
)))
;; easy menu for sql-interactive-mode.
"Abbrev table used in `sql-mode' and `sql-interactive-mode'.")
(if sql-mode-abbrev-table
()
- (let ((nargs (cdr (subr-arity (symbol-function 'define-abbrev))))
- d-a)
- ;; In Emacs 21.3+, provide SYSTEM-FLAG to define-abbrev.
- (setq d-a
- (if (>= nargs 6)
- '(lambda (name expansion) (define-abbrev sql-mode-abbrev-table name expansion nil 0 t))
- '(lambda (name expansion) (define-abbrev sql-mode-abbrev-table name expansion))))
-
- (define-abbrev-table 'sql-mode-abbrev-table nil)
- (funcall d-a "ins" "insert")
- (funcall d-a "upd" "update")
- (funcall d-a "del" "delete")
- (funcall d-a "sel" "select")
- (funcall d-a "proc" "procedure")
- (funcall d-a "func" "function")
- (funcall d-a "cr" "create")))
+ (let ((wrapper))
+ (define-abbrev-table 'sql-mode-abbrev-table ())
+ (define-abbrev sql-mode-abbrev-table "ins" "insert")
+ (define-abbrev sql-mode-abbrev-table "upd" "update")
+ (define-abbrev sql-mode-abbrev-table "del" "delete")
+ (define-abbrev sql-mode-abbrev-table "sel" "select")))
;; Syntax Table
;; Font lock support
-(defvar sql-mode-font-lock-object-name
- (list (concat "^\\s-*\\(create\\(\\s-+or\\s-+replace\\)?\\|drop\\|alter\\)?\\s-+"
- "\\(\\(global\\s-+\\)?\\(temporary\\s-+\\)?table\\|view\\|package\\(\\s-+body\\)?\\|"
- "proc\\(edure\\)?\\|function\\|trigger\\|sequence\\|rule\\|default\\)\\s-+\\(\\w+\\)")
- 8 'font-lock-function-name-face)
-
- "Pattern to match the names of top-level objects in a CREATE,
-DROP or ALTER statement.
-
-The format of variable should be a valid `font-lock-keywords'
-entry.")
+(defvar sql-mode-ansi-font-lock-keywords nil
+ "ANSI SQL keywords used by font-lock.
-(defvar sql-mode-ansi-font-lock-keywords
+This variable is used by `sql-mode' and `sql-interactive-mode'. The
+regular expressions are created during compilation by calling the
+function `regexp-opt'. Therefore, take a look at the source before
+you define your own sql-mode-ansi-font-lock-keywords. You may want to
+add functions and PL/SQL keywords.")
+(if sql-mode-ansi-font-lock-keywords
+ ()
(let ((ansi-keywords (eval-when-compile
(concat "\\b"
(regexp-opt '(
-
"authorization" "avg" "begin" "close" "cobol" "commit"
"continue" "count" "declare" "double" "end" "escape"
"exec" "fetch" "foreign" "fortran" "found" "go" "goto" "indicator"
"key" "language" "max" "min" "module" "numeric" "open" "pascal" "pli"
"precision" "primary" "procedure" "references" "rollback"
-"schema" "section" "some" "sqlcode" "sqlerror" "sum" "work"
-
-) t) "\\b")))
+"schema" "section" "some" "sqlcode" "sqlerror" "sum" "work") t) "\\b")))
(ansi-reserved-words (eval-when-compile
(concat "\\b"
(regexp-opt '(
-
"all" "and" "any" "as" "asc" "between" "by" "check" "create"
"current" "default" "delete" "desc" "distinct" "exists" "float" "for"
"from" "grant" "group" "having" "in" "insert" "into" "is"
"like" "not" "null" "of" "on" "option" "or" "order" "privileges"
"public" "select" "set" "table" "to" "union" "unique"
-"update" "user" "values" "view" "where" "with"
-
-) t) "\\b")))
+"update" "user" "values" "view" "where" "with") t) "\\b")))
(ansi-types (eval-when-compile
(concat "\\b"
(regexp-opt '(
-
;; ANSI Keywords that look like types
"character" "cursor" "dec" "int" "real"
;; ANSI Reserved Word that look like types
-"char" "integer" "smallint"
-
-) t) "\\b"))))
- (list (cons ansi-keywords 'font-lock-keyword-face)
+"char" "integer" "smallint" ) t) "\\b"))))
+ (setq sql-mode-ansi-font-lock-keywords
+ (list (cons ansi-keywords 'font-lock-function-name-face)
(cons ansi-reserved-words 'font-lock-keyword-face)
- (cons ansi-types 'font-lock-type-face)))
+ (cons ansi-types 'font-lock-type-face)))))
- "ANSI SQL keywords used by font-lock.
+(defvar sql-mode-oracle-font-lock-keywords nil
+ "Oracle SQL keywords used by font-lock.
This variable is used by `sql-mode' and `sql-interactive-mode'. The
regular expressions are created during compilation by calling the
function `regexp-opt'. Therefore, take a look at the source before
-you define your own sql-mode-ansi-font-lock-keywords. You may want to
-add functions and PL/SQL keywords.")
-
-(defvar sql-mode-oracle-font-lock-keywords
+you define your own sql-mode-oracle-font-lock-keywords. You may want
+to add functions and PL/SQL keywords.")
+(if sql-mode-oracle-font-lock-keywords
+ ()
(let ((oracle-keywords (eval-when-compile
(concat "\\b"
(regexp-opt '(
-;; Oracle (+ANSI) SQL keywords
-
-; ANSI keywords
-"authorization" "avg" "begin" "close" "cobol" "commit"
-"continue" "count" "declare" "double" "end" "escape"
-"exec" "fetch" "foreign" "fortran" "found" "go" "goto" "indicator"
-"key" "language" "max" "min" "module" "numeric" "open" "pascal" "pli"
-"precision" "primary" "procedure" "references" "rollback"
-"schema" "section" "some" "sqlcode" "sqlerror" "sum" "work"
-
-; ANSI reserved words
-"all" "and" "any" "as" "asc" "between" "by" "check" "create"
-"current" "default" "delete" "desc" "distinct" "exists" "float" "for"
-"from" "grant" "group" "having" "in" "insert" "into" "is"
-"like" "not" "null" "of" "on" "option" "or" "order" "privileges"
-"public" "select" "set" "table" "to" "union" "unique"
-"update" "user" "values" "view" "where" "with"
-
-"access" "add" "admin" "after" "allocate" "alter" "analyze" "archive"
-"archivelog" "audit" "authid" "backup" "become" "before" "block"
-"body" "cache" "cancel" "cascade" "change" "checkpoint" "cluster"
-"comment" "compile" "compress" "compute" "connect" "constraint"
-"constraints" "contents" "controlfile" "cross" "currval" "cycle"
-"database" "datafile" "dba" "deterministic" "disable" "dismount"
-"drop" "dump" "each" "else" "else" "elsif" "enable" "events" "except"
-"exceptions" "exclusive" "execute" "exit" "explain" "extent"
-"externally" "false" "file" "flush" "force" "freelist" "freelists"
-"full" "function" "global" "grant" "groups" "identified" "if"
-"immediate" "including" "increment" "index" "initial" "initrans"
-"inner" "instance" "intersect" "join" "layer" "left" "level" "link"
-"lists" "lock" "logfile" "long" "loop" "manage" "manual"
-"maxdatafiles" "maxextents" "maxinistances" "maxlogfiles"
-"maxloghistory" "maxlogmembers" "maxtrans" "maxvalue" "merge"
-"minextents" "minus" "minvalue" "mode" "modify" "mount" "natural"
-"new" "next" "nextval" "noarchivelog" "noaudit" "nocache" "nocompress"
-"nocycle" "nomaxvalue" "nominvalue" "none" "noorder" "noresetlogs"
-"normal" "nosort" "nowait" "off" "offline" "old" "online" "only"
-"optimal" "others" "out" "outer" "over" "own" "package" "parallel"
-"parallel_enable" "pctfree" "pctincrease" "pctused" "plan" "pragma"
-"preserve" "prior" "private" "profile" "quota" "raise" "raw" "read"
-"recover" "referencing" "rename" "replace" "resetlogs" "resource"
-"restrict_references" "restricted" "return" "returning" "reuse"
-"revoke" "right" "rnds" "rnps" "role" "roles" "row" "rowlabel"
-"rownum" "rows" "savepoint" "scn" "segment" "sequence" "session"
-"share" "shared" "size" "snapshot" "sort" "statement_id" "statistics"
-"stop" "storage" "subtype" "successful" "switch" "synonym" "sysdate"
-"system" "tables" "tablespace" "temporary" "then" "thread" "tracing"
-"transaction" "trigger" "triggers" "true" "truncate" "type" "uid"
-"under" "unlimited" "until" "use" "using" "validate" "when" "while"
-"wnds" "wnps" "write"
-
-) t) "\\b")))
+"admin" "after" "allocate" "analyze" "archive" "archivelog" "backup"
+"become" "before" "block" "body" "cache" "cancel" "cascade" "change"
+"checkpoint" "compile" "constraint" "constraints" "contents"
+"controlfile" "cycle" "database" "datafile" "dba" "disable" "dismount"
+"dump" "each" "else" "elsif" "enable" "events" "except" "exceptions"
+"execute" "exit" "explain" "extent" "externally" "false" "flush" "force"
+"freelist" "freelists" "function" "groups" "if" "including" "initrans"
+"instance" "layer" "link" "lists" "logfile" "loop" "manage" "manual"
+"maxdatafiles" "maxinistances" "maxlogfiles" "maxloghistory"
+"maxlogmembers" "maxtrans" "maxvalue" "minextents" "minvalue" "mount"
+"new" "next" "noarchivelog" "nocache" "nocycle" "nomaxvalue"
+"nominvalue" "none" "noorder" "noresetlogs" "normal" "nosort" "off"
+"old" "only" "optimal" "others" "out" "own" "package" "parallel"
+"pctincrease" "pctused" "plan" "pragma" "private" "profile" "quota"
+"raise" "read" "recover" "referencing" "resetlogs" "restrict_references"
+"restricted" "return" "returning" "reuse" "rnds" "rnps" "role" "roles"
+"savepoint" "scn" "segment" "sequence" "shared" "snapshot" "sort"
+"statement_id" "statistics" "stop" "storage" "subtype" "switch" "system"
+"tables" "tablespace" "temporary" "thread" "time" "tracing"
+"transaction" "triggers" "true" "truncate" "type" "under" "unlimited"
+"until" "use" "using" "when" "while" "wnds" "wnps" "write") t) "\\b")))
(oracle-warning-words (eval-when-compile
(concat "\\b"
(regexp-opt '(
-;; PLSQL defined exceptions
-
-"access_into_null" "case_not_found" "collection_is_null"
-"cursor_already_open" "dup_val_on_index" "invalid_cursor"
+"cursor_already_open" "dup_val_on_index" "exception" "invalid_cursor"
"invalid_number" "login_denied" "no_data_found" "not_logged_on"
-"program_error" "rowtype_mismatch" "self_is_null" "storage_error"
-"subscript_beyond_count" "subscript_outside_limit" "sys_invalid_rowid"
-"timeout_on_resource" "too_many_rows" "value_error" "zero_divide"
-"exception" "notfound"
-
-) t) "\\b")))
-
- (oracle-sqlplus-commands
- (eval-when-compile
- (concat "^\\(\\("
+"notfound" "others" "pragma" "program_error" "storage_error"
+"timeout_on_resource" "too_many_rows" "transaction_backed_out"
+"value_error" "zero_divide") t) "\\b")))
+ (oracle-reserved-words (eval-when-compile
+ (concat "\\b"
(regexp-opt '(
-;; SQL*Plus commands
-
-"@" "@@" "accept" "append" "archive" "attribute" "break"
-"btitle" "change" "clear" "column" "connect" "copy" "define"
-"del" "describe" "disconnect" "edit" "execute" "exit" "get" "help"
-"host" "input" "list" "password" "pause" "print" "prompt" "recover"
-"remark" "repfooter" "repheader" "run" "save" "show" "shutdown"
-"spool" "start" "startup" "store" "timing" "ttitle" "undefine"
-"variable" "whenever"
-
-) t)
-
- "\\)\\|"
- "\\(compute\\s-+\\(avg\\|cou\\|min\\|max\\|num\\|sum\\|std\\|var\\)\\)\\|"
- "\\(set\\s-+\\(appi\\(nfo\\)?\\|array\\(size\\)?\\|"
- "auto\\(commit\\)?\\|autop\\(rint\\)?\\|autorecovery\\|"
- "autot\\(race\\)?\\|blo\\(ckterminator\\)?\\|cmds\\(ep\\)?\\|"
- "colsep\\|com\\(patibility\\)?\\|con\\(cat\\)?\\|"
- "copyc\\(ommit\\)?\\|copytypecheck\\|def\\(ine\\)?\\|"
- "describe\\|echo\\|editf\\(ile\\)?\\|emb\\(edded\\)?\\|"
- "esc\\(ape\\)?\\|feed\\(back\\)?\\|flagger\\|"
- "flu\\(sh\\)?\\|hea\\(ding\\)?\\|heads\\(ep\\)?\\|"
- "instance\\|lin\\(esize\\)?\\|lobof\\(fset\\)?\\|"
- "logsource\\|long\\|longc\\(hunksize\\)?\\|mark\\(up\\)?\\|"
- "newp\\(age\\)?\\|null\\|numf\\(ormat\\)?\\|"
- "num\\(width\\)?\\|pages\\(ize\\)?\\|pau\\(se\\)?\\|"
- "recsep\\|recsepchar\\|serverout\\(put\\)?\\|"
- "shift\\(inout\\)?\\|show\\(mode\\)?\\|"
- "sqlbl\\(anklines\\)?\\|sqlc\\(ase\\)?\\|"
- "sqlco\\(ntinue\\)?\\|sqln\\(umber\\)?\\|"
- "sqlpluscompat\\(ibility\\)?\\|sqlpre\\(fix\\)?\\|"
- "sqlp\\(rompt\\)?\\|sqlt\\(erminator\\)?\\|"
- "suf\\(fix\\)?\\|tab\\|term\\(out\\)?\\|ti\\(me\\)?\\|"
- "timi\\(ng\\)?\\|trim\\(out\\)?\\|trims\\(pool\\)?\\|"
- "und\\(erline\\)?\\|ver\\(ify\\)?\\|wra\\(p\\)?\\)\\)\\)"
- "\\b.*$"
- )))
-
- (oracle-types
- (eval-when-compile
+"access" "add" "alter" "audit" "cluster" "column" "comment" "compress"
+"connect" "drop" "else" "exclusive" "file" "grant"
+"identified" "immediate" "increment" "index" "initial" "intersect"
+"level" "lock" "long" "maxextents" "minus" "mode" "modify" "noaudit"
+"nocompress" "nowait" "number" "offline" "online" "pctfree" "prior"
+"raw" "rename" "resource" "revoke" "row" "rowlabel" "rownum"
+"rows" "session" "share" "size" "start" "successful" "synonym" "sysdate"
+"then" "trigger" "uid" "validate" "whenever") t) "\\b")))
+ (oracle-types (eval-when-compile
(concat "\\b"
(regexp-opt '(
;; Oracle Keywords that look like types
;; Oracle Reserved Words that look like types
-
-"bfile" "binary_integer" "blob" "boolean" "byte" "char" "character"
-"clob" "date" "day" "dec" "decimal" "double" "float" "int" "integer"
-"interval" "local" "long" "month" "natural" "naturaln" "nchar" "nclob"
-"number" "numeric" "nvarchar2" "pls_integer" "positive" "positiven"
-"precision" "raw" "real" "rowid" "second" "signtype" "smallint"
-"string" "time" "timestamp" "urowid" "varchar" "varchar2" "year"
-"zone"
-
-) t) "\\b")))
+"binary_integer" "blob" "boolean" "constant" "date" "decimal" "rowid"
+"varchar" "varchar2") t) "\\b")))
(oracle-builtin-functions (eval-when-compile
(concat "\\b"
(regexp-opt '(
;; Misc Oracle builtin functions
-
-"abs" "acos" "add_months" "ascii" "asciistr" "asin" "atan" "atan2"
-"avg" "bfilename" "bin_to_num" "bitand" "case" "cast" "ceil"
-"chartorowid" "chr" "coalesce" "compose" "concat" "convert" "corr"
-"cos" "cosh" "count" "covar_pop" "covar_samp" "cume_dist"
-"current_date" "current_timestamp" "current_user" "dbtimezone"
-"decode" "decompose" "dense_rank" "depth" "deref" "dump" "empty_blob"
-"empty_clob" "existsnode" "exp" "extract" "extractvalue" "first"
-"first_value" "floor" "from_tz" "greatest" "group_id" "grouping"
-"grouping_id" "hextoraw" "initcap" "instr" "lag" "last" "last_day"
-"last_value" "lead" "least" "length" "ln" "localtimestamp" "log"
-"lower" "lpad" "ltrim" "make_ref" "max" "min" "mod" "months_between"
-"nchr" "new_time" "next_day" "nls_charset_decl_len" "nls_charset_id"
-"nls_charset_name" "nls_initcap" "nls_lower" "nlssort" "nls_upper"
-"ntile" "nullif" "numtodsinterval" "numtoyminterval" "nvl" "nvl2"
-"path" "percent_rank" "percentile_cont" "percentile_disc" "power"
-"rank" "ratio_to_report" "rawtohex" "rawtonhex" "ref" "reftohex"
-"regr_slope" "regr_intercept" "regr_count" "regr_r2" "regr_avgx"
-"regr_avgy" "regr_sxx" "regr_syy" "regr_sxy" "round"
-"row_number" "rowidtochar" "rowidtonchar" "rpad" "rtrim"
-"sessiontimezone" "sign" "sin" "sinh" "soundex" "sqrt" "stddev"
-"stddev_pop" "stddev_samp" "substr" "sum" "sys_connect_by_path"
-"sys_context" "sys_dburigen" "sys_extract_utc" "sys_guid" "sys_typeid"
-"sys_xmlagg" "sys_xmlgen" "sysdate" "systimestamp" "tan" "tanh"
-"to_char" "to_clob" "to_date" "to_dsinterval" "to_lob" "to_multi_byte"
-"to_nchar" "to_nclob" "to_number" "to_single_byte" "to_timestamp"
-"to_timestamp_tz" "to_yminterval" "translate" "treat" "trim" "trunc"
-"tz_offset" "uid" "unistr" "updatexml" "upper" "user" "userenv"
-"value" "var_pop" "var_samp" "variance" "vsize" "width_bucket"
-"xmlagg" "xmlcolattval" "xmlconcat" "xmlelement" "xmlforest"
-"xmlsequence" "xmltransform"
-
-) t) "\\b"))))
- (list (cons oracle-sqlplus-commands 'font-lock-doc-face)
- (cons oracle-keywords 'font-lock-keyword-face)
+"abs" "add_months" "ascii" "avg" "ceil" "chartorowid" "chr" "concat"
+"convert" "cos" "cosh" "count" "currval" "decode" "dump" "exp" "floor"
+"glb" "greatest" "greatest_lb" "hextoraw" "initcap" "instr" "instrb"
+"last_day" "least" "least_ub" "length" "lengthb" "ln" "log" "lower"
+"lpad" "ltrim" "lub" "max" "min" "mod" "months_between" "new_time"
+"next_day" "nextval" "nls_initcap" "nls_lower" "nls_upper" "nlssort"
+"nvl" "power" "rawtohex" "replace" "round" "rowidtochar" "rpad"
+"rtrim" "sign" "sin" "sinh" "soundex" "sqlcode" "sqlerrm" "sqrt"
+"stddev" "sum" "substr" "substrb" "tan" "tanh" "to_char"
+"to_date" "to_label" "to_multi_byte" "to_number" "to_single_byte"
+"translate" "trim" "trunc" "uid" "upper" "userenv" "variance" "vsize") t) "\\b"))))
+ (setq sql-mode-oracle-font-lock-keywords
+ (append sql-mode-ansi-font-lock-keywords
+ (list (cons oracle-keywords 'font-lock-function-name-face)
(cons oracle-warning-words 'font-lock-warning-face)
+ (cons oracle-reserved-words 'font-lock-keyword-face)
;; XEmacs doesn't have font-lock-builtin-face
(if (string-match "XEmacs\\|Lucid" emacs-version)
(cons oracle-builtin-functions 'font-lock-preprocessor-face)
;; GNU Emacs 19 doesn't have it either
(if (string-match "GNU Emacs 19" emacs-version)
- (cons oracle-builtin-functions 'font-lock-keyword-face)
+ (cons oracle-builtin-functions 'font-lock-function-name-face)
;; Emacs
(cons oracle-builtin-functions 'font-lock-builtin-face)))
- (cons oracle-types 'font-lock-type-face)))
+ (cons oracle-types 'font-lock-type-face))))))
- "Oracle SQL keywords used by font-lock.
+(defvar sql-mode-postgres-font-lock-keywords nil
+ "Postgres SQL keywords used by font-lock.
This variable is used by `sql-mode' and `sql-interactive-mode'. The
regular expressions are created during compilation by calling the
function `regexp-opt'. Therefore, take a look at the source before
-you define your own sql-mode-oracle-font-lock-keywords. You may want
-to add functions and PL/SQL keywords.")
+you define your own sql-mode-postgres-font-lock-keywords.")
-(defvar sql-mode-postgres-font-lock-keywords
+(if sql-mode-postgres-font-lock-keywords
+ ()
(let ((postgres-reserved-words (eval-when-compile
(concat "\\b"
(regexp-opt '(
(postgres-types (eval-when-compile
(concat "\\b"
(regexp-opt '(
-
"bool" "box" "circle" "char" "char2" "char4" "char8" "char16" "date"
"float4" "float8" "int2" "int4" "int8" "line" "lseg" "money" "path"
"point" "polygon" "serial" "text" "time" "timespan" "timestamp" "varchar"
-
) t)"\\b")))
(postgres-builtin-functions (eval-when-compile
(concat "\\b"
(regexp-opt '(
;; Misc Postgres builtin functions
-
"abstime" "age" "area" "box" "center" "date_part" "date_trunc"
"datetime" "dexp" "diameter" "dpow" "float" "float4" "height"
"initcap" "integer" "isclosed" "isfinite" "isoldpath" "isopen"
"position" "radius" "reltime" "revertpoly" "rpad" "rtrim" "substr"
"substring" "text" "timespan" "translate" "trim" "upgradepath"
"upgradepoly" "upper" "varchar" "width"
-
) t) "\\b"))))
+ (setq sql-mode-postgres-font-lock-keywords
(append sql-mode-ansi-font-lock-keywords
(list (cons postgres-reserved-words 'font-lock-keyword-face)
;; XEmacs doesn't have 'font-lock-builtin-face
(cons postgres-builtin-functions 'font-lock-preprocessor-face)
;; Emacs
(cons postgres-builtin-functions 'font-lock-builtin-face))
- (cons postgres-types 'font-lock-type-face))))
+ (cons postgres-types 'font-lock-type-face))))))
- "Postgres SQL keywords used by font-lock.
+
+(defvar sql-mode-linter-font-lock-keywords nil
+ "Linter SQL keywords used by font-lock.
This variable is used by `sql-mode' and `sql-interactive-mode'. The
regular expressions are created during compilation by calling the
-function `regexp-opt'. Therefore, take a look at the source before
-you define your own sql-mode-postgres-font-lock-keywords.")
+function `regexp-opt'.")
-(defvar sql-mode-linter-font-lock-keywords
+(if sql-mode-linter-font-lock-keywords
+ ()
(let ((linter-keywords (eval-when-compile
(concat "\\b"
(regexp-opt '(
-
"autocommit" "autoinc" "autorowid" "cancel" "cascade" "channel"
"committed" "count" "countblob" "cross" "current" "data" "database"
"datafile" "datafiles" "datesplit" "dba" "dbname" "default" "deferred"
"trigger_info_size" "true" "trunc" "uncommitted" "unicode" "unknown"
"unlimited" "unlisted" "user" "utf8" "value" "varying" "volumes"
"wait" "windows_code" "workspace" "write" "xml"
-
) t) "\\b")))
(linter-reserved-words (eval-when-compile
(concat "\\b"
(regexp-opt '(
-
"access" "action" "add" "address" "after" "all" "alter" "always" "and"
"any" "append" "as" "asc" "ascic" "async" "at_begin" "at_end" "audit"
"aud_obj_name_len" "backup" "base" "before" "between" "blobfile"
"start" "stop" "sync" "synchronize" "synonym" "sysdate" "table" "then"
"to" "union" "unique" "unlock" "until" "update" "using" "values"
"view" "when" "where" "with" "without"
-
) t) "\\b")))
(linter-types (eval-when-compile
(concat "\\b"
(regexp-opt '(
-
"bigint" "bitmap" "blob" "boolean" "char" "character" "date"
"datetime" "dec" "decimal" "double" "float" "int" "integer" "nchar"
"number" "numeric" "real" "smallint" "varbyte" "varchar" "byte"
"cursor" "long"
-
) t) "\\b")))
(linter-builtin-functions (eval-when-compile
(concat "\\b"
(regexp-opt '(
-
"abs" "acos" "asin" "atan" "atan2" "avg" "ceil" "cos" "cosh" "divtime"
"exp" "floor" "getbits" "getblob" "getbyte" "getlong" "getraw"
"getstr" "gettext" "getword" "hextoraw" "lenblob" "length" "log"
"to_gmtime" "to_localtime" "to_number" "trim" "upper" "decode"
"substr" "substring" "chr" "dayname" "days" "greatest" "hex" "initcap"
"instr" "least" "multime" "replace" "width"
-
) t) "\\b"))))
+ (setq sql-mode-linter-font-lock-keywords
(append sql-mode-ansi-font-lock-keywords
- (list (cons linter-keywords 'font-lock-keywords-face)
+ (list (cons linter-keywords 'font-lock-function-name-face)
(cons linter-reserved-words 'font-lock-keyword-face)
;; XEmacs doesn't have font-lock-builtin-face
(if (string-match "XEmacs\\|Lucid" emacs-version)
(cons linter-builtin-functions 'font-lock-preprocessor-face)
;; GNU Emacs 19 doesn't have it either
(if (string-match "GNU Emacs 19" emacs-version)
- (cons linter-builtin-functions 'font-lock-keywords-face)
+ (cons linter-builtin-functions 'font-lock-function-name-face)
;; Emacs
(cons linter-builtin-functions 'font-lock-builtin-face)))
- (cons linter-types 'font-lock-type-face))))
-
- "Linter SQL keywords used by font-lock.
+ (cons linter-types 'font-lock-type-face))))))
-This variable is used by `sql-mode' and `sql-interactive-mode'. The
-regular expressions are created during compilation by calling the
-function `regexp-opt'.")
-
-(defvar sql-mode-ms-font-lock-keywords
- (let ((ms-reserved-words (eval-when-compile
- (concat "\\b"
- (regexp-opt '(
-
-"absolute" "add" "all" "alter" "and" "any" "as" "asc" "authorization"
-"avg" "backup" "begin" "between" "break" "browse" "bulk" "by"
-"cascade" "case" "check" "checkpoint" "close" "clustered" "coalesce"
-"column" "commit" "committed" "compute" "confirm" "constraint"
-"contains" "containstable" "continue" "controlrow" "convert" "count"
-"create" "cross" "current" "current_date" "current_time"
-"current_timestamp" "current_user" "database" "deallocate"
-"declare" "default" "delete" "deny" "desc" "disk" "distinct"
-"distributed" "double" "drop" "dummy" "dump" "else" "end" "errlvl"
-"errorexit" "escape" "except" "exec" "execute" "exists" "exit" "fetch"
-"file" "fillfactor" "first" "floppy" "for" "foreign" "freetext"
-"freetexttable" "from" "full" "goto" "grant" "group" "having"
-"holdlock" "identity" "identity_insert" "identitycol" "if" "in"
-"index" "inner" "insert" "intersect" "into" "is" "isolation" "join"
-"key" "kill" "last" "left" "level" "like" "lineno" "load" "max" "min"
-"mirrorexit" "national" "next" "nocheck" "nolock" "nonclustered" "not"
-"null" "nullif" "of" "off" "offsets" "on" "once" "only" "open"
-"opendatasource" "openquery" "openrowset" "option" "or" "order"
-"outer" "output" "over" "paglock" "percent" "perm" "permanent" "pipe"
-"plan" "precision" "prepare" "primary" "print" "prior" "privileges"
-"proc" "procedure" "processexit" "public" "raiserror" "read"
-"readcommitted" "readpast" "readtext" "readuncommitted" "reconfigure"
-"references" "relative" "repeatable" "repeatableread" "replication"
-"restore" "restrict" "return" "revoke" "right" "rollback" "rowcount"
-"rowguidcol" "rowlock" "rule" "save" "schema" "select" "serializable"
-"session_user" "set" "shutdown" "some" "statistics" "sum"
-"system_user" "table" "tablock" "tablockx" "tape" "temp" "temporary"
-"textsize" "then" "to" "top" "tran" "transaction" "trigger" "truncate"
-"tsequal" "uncommitted" "union" "unique" "update" "updatetext"
-"updlock" "use" "user" "values" "view" "waitfor" "when" "where"
-"while" "with" "work" "writetext"
-"collate" "function" "openxml" "returns"
-
-) t) "\\b")))
- (ms-types (eval-when-compile
- (concat "\\b"
- (regexp-opt '(
-
-"binary" "bit" "char" "character" "cursor" "datetime" "dec" "decimal"
-"double" "float" "image" "int" "integer" "money" "national" "nchar"
-"ntext" "numeric" "numeric" "nvarchar" "precision" "real"
-"smalldatetime" "smallint" "smallmoney" "text" "timestamp" "tinyint"
-"uniqueidentifier" "varbinary" "varchar" "varying"
-
-) t) "\\b")))
-
- (ms-vars "\\b@[a-zA-Z0-9_]*\\b")
-
- (ms-builtin-functions (eval-when-compile
- (concat "\\b"
- (regexp-opt '(
-;; Misc MS builtin functions
-
-"@@connections" "@@cpu_busy" "@@cursor_rows" "@@datefirst" "@@dbts"
-"@@error" "@@fetch_status" "@@identity" "@@idle" "@@io_busy"
-"@@langid" "@@language" "@@lock_timeout" "@@max_connections"
-"@@max_precision" "@@nestlevel" "@@options" "@@pack_received"
-"@@pack_sent" "@@packet_errors" "@@procid" "@@remserver" "@@rowcount"
-"@@servername" "@@servicename" "@@spid" "@@textsize" "@@timeticks"
-"@@total_errors" "@@total_read" "@@total_write" "@@trancount"
-"@@version" "abs" "acos" "and" "app_name" "ascii" "asin" "atan" "atn2"
-"avg" "case" "cast" "ceiling" "char" "charindex" "coalesce"
-"col_length" "col_name" "columnproperty" "containstable" "convert"
-"cos" "cot" "count" "current_timestamp" "current_user" "cursor_status"
-"databaseproperty" "datalength" "dateadd" "datediff" "datename"
-"datepart" "day" "db_id" "db_name" "degrees" "difference" "exp"
-"file_id" "file_name" "filegroup_id" "filegroup_name"
-"filegroupproperty" "fileproperty" "floor" "formatmessage"
-"freetexttable" "fulltextcatalogproperty" "fulltextserviceproperty"
-"getansinull" "getdate" "grouping" "host_id" "host_name" "ident_incr"
-"ident_seed" "identity" "index_col" "indexproperty" "is_member"
-"is_srvrolemember" "isdate" "isnull" "isnumeric" "left" "len" "log"
-"log10" "lower" "ltrim" "max" "min" "month" "nchar" "newid" "nullif"
-"object_id" "object_name" "objectproperty" "openquery" "openrowset"
-"parsename" "patindex" "patindex" "permissions" "pi" "power"
-"quotename" "radians" "rand" "replace" "replicate" "reverse" "right"
-"round" "rtrim" "session_user" "sign" "sin" "soundex" "space" "sqrt"
-"square" "stats_date" "stdev" "stdevp" "str" "stuff" "substring" "sum"
-"suser_id" "suser_name" "suser_sid" "suser_sname" "system_user" "tan"
-"textptr" "textvalid" "typeproperty" "unicode" "upper" "user"
-"user_id" "user_name" "var" "varp" "year"
-
-) t) "\\b")))
-
- (ms-config-commands
- (eval-when-compile
- (concat "^\\(\\(set\\s-+\\("
- (regexp-opt '(
-
-"datefirst" "dateformat" "deadlock_priority" "lock_timeout"
-"concat_null_yields_null" "cursor_close_on_commit"
-"disable_def_cnst_chk" "fips_flagger" "identity_insert" "language"
-"offsets" "quoted_identifier" "arithabort" "arithignore" "fmtonly"
-"nocount" "noexec" "numeric_roundabort" "parseonly"
-"query_governor_cost_limit" "rowcount" "textsize" "ansi_defaults"
-"ansi_null_dflt_off" "ansi_null_dflt_on" "ansi_nulls" "ansi_padding"
-"ansi_warnings" "forceplan" "showplan_all" "showplan_text"
-"statistics" "implicit_transactions" "remote_proc_transactions"
-"transaction" "xact_abort"
-
-) t)
- "\\)\\)\\|go\\s-*\\|use\\s-+\\|setuser\\s-+\\|dbcc\\s-+\\).*$"))))
-
- (list (cons ms-config-commands 'font-lock-doc-face)
- (cons ms-reserved-words 'font-lock-keyword-face)
- ;; XEmacs doesn't have 'font-lock-builtin-face
- (if (string-match "XEmacs\\|Lucid" emacs-version)
- (cons ms-builtin-functions 'font-lock-preprocessor-face)
- ;; Emacs
- (cons ms-builtin-functions 'font-lock-builtin-face))
- (cons ms-vars 'font-lock-variable-name-face)
- (cons ms-types 'font-lock-type-face)))
-
- "Microsoft SQLServer SQL keywords used by font-lock.
-
-This variable is used by `sql-mode' and `sql-interactive-mode'. The
-regular expressions are created during compilation by calling the
-function `regexp-opt'. Therefore, take a look at the source before
-you define your own sql-mode-ms-font-lock-keywords.")
-
-(defvar sql-mode-sybase-font-lock-keywords sql-mode-ansi-font-lock-keywords
- "Sybase SQL keywords used by font-lock.
-
-This variable is used by `sql-mode' and `sql-interactive-mode'. The
-regular expressions are created during compilation by calling the
-function `regexp-opt'. Therefore, take a look at the source before
-you define your own sql-mode-sybase-font-lock-keywords.")
-
-(defvar sql-mode-informix-font-lock-keywords sql-mode-ansi-font-lock-keywords
- "Informix SQL keywords used by font-lock.
-
-This variable is used by `sql-mode' and `sql-interactive-mode'. The
-regular expressions are created during compilation by calling the
-function `regexp-opt'. Therefore, take a look at the source before
-you define your own sql-mode-informix-font-lock-keywords.")
-
-(defvar sql-mode-interbase-font-lock-keywords sql-mode-ansi-font-lock-keywords
- "Interbase SQL keywords used by font-lock.
-
-This variable is used by `sql-mode' and `sql-interactive-mode'. The
-regular expressions are created during compilation by calling the
-function `regexp-opt'. Therefore, take a look at the source before
-you define your own sql-mode-interbase-font-lock-keywords.")
-
-(defvar sql-mode-ingres-font-lock-keywords sql-mode-ansi-font-lock-keywords
- "Ingres SQL keywords used by font-lock.
-
-This variable is used by `sql-mode' and `sql-interactive-mode'. The
-regular expressions are created during compilation by calling the
-function `regexp-opt'. Therefore, take a look at the source before
-you define your own sql-mode-interbase-font-lock-keywords.")
-
-(defvar sql-mode-solid-font-lock-keywords sql-mode-ansi-font-lock-keywords
- "Solid SQL keywords used by font-lock.
-
-This variable is used by `sql-mode' and `sql-interactive-mode'. The
-regular expressions are created during compilation by calling the
-function `regexp-opt'. Therefore, take a look at the source before
-you define your own sql-mode-solid-font-lock-keywords.")
-
-(defvar sql-mode-mysql-font-lock-keywords sql-mode-ansi-font-lock-keywords
- "MySQL SQL keywords used by font-lock.
-
-This variable is used by `sql-mode' and `sql-interactive-mode'. The
-regular expressions are created during compilation by calling the
-function `regexp-opt'. Therefore, take a look at the source before
-you define your own sql-mode-mysql-font-lock-keywords.")
-
-(defvar sql-mode-sqlite-font-lock-keywords sql-mode-ansi-font-lock-keywords
- "SQLite SQL keywords used by font-lock.
-
-This variable is used by `sql-mode' and `sql-interactive-mode'. The
-regular expressions are created during compilation by calling the
-function `regexp-opt'. Therefore, take a look at the source before
-you define your own sql-mode-sqlite-font-lock-keywords.")
-
-(defvar sql-mode-db2-font-lock-keywords sql-mode-ansi-font-lock-keywords
- "DB2 SQL keywords used by font-lock.
-
-This variable is used by `sql-mode' and `sql-interactive-mode'. The
-regular expressions are created during compilation by calling the
-function `regexp-opt'. Therefore, take a look at the source before
-you define your own sql-mode-db2-font-lock-keywords.")
-
-(defvar sql-mode-font-lock-keywords nil
+(defvar sql-mode-font-lock-keywords sql-mode-ansi-font-lock-keywords
"SQL keywords used by font-lock.
-Setting this variable directly no longer has any affect. Use
-`sql-product' and `sql-add-product-keywords' to control the
-highlighting rules in sql-mode.")
-
-\f
-
-;;; SQL Product support functions
-
-(defun sql-product-feature (feature &optional product)
- "Lookup `feature' needed to support the current SQL product.
-
-See \[sql-product-support] for a list of products and supported features."
- (cadr
- (memq feature
- (assoc (or product sql-product)
- sql-product-support))))
-
-(defun sql-product-font-lock (keywords-only imenu)
- "Sets `font-lock-defaults' and `font-lock-keywords' based on
-the product-specific keywords and syntax-alists defined in
-`sql-product-support'."
- (let
- ;; Get the product-specific syntax-alist.
- ((syntax-alist
- (append
- (sql-product-feature :syntax-alist)
- '((?_ . "w") (?. . "w")))))
-
- ;; Get the product-specific keywords.
- (setq sql-mode-font-lock-keywords
- (append
- (eval (sql-product-feature :font-lock))
- (list sql-mode-font-lock-object-name)))
-
- ;; Setup font-lock. (What is the minimum we should have to do
- ;; here?)
- (setq font-lock-set-defaults nil
- font-lock-keywords sql-mode-font-lock-keywords
- font-lock-defaults (list 'sql-mode-font-lock-keywords
- keywords-only t syntax-alist))
-
- ;; Setup imenu; it needs the same syntax-alist.
- (when imenu
- (setq imenu-syntax-alist syntax-alist))))
-
-;;;###autoload
-(defun sql-add-product-keywords (product keywords)
- "Append a `font-lock-keywords' entry to the existing entries defined
- for the specified `product'."
-
- (let ((font-lock (sql-product-feature :font-lock product)))
- (set font-lock (append (eval font-lock) (list keywords)))))
+This variable defaults to `sql-mode-ansi-font-lock-keywords'. This is
+used for the default `font-lock-defaults' value in `sql-mode'. This
+can be changed by some entry functions to provide more hilighting.")
\f
;;; Functions to switch highlighting
-(defun sql-highlight-product ()
- "Turns on the appropriate font highlighting for the SQL product
-selected."
-
- (when (eq major-mode 'sql-mode)
- ;; Setup font-lock
- (sql-product-font-lock nil t)
-
- ;; Force fontification, if its enabled.
- (if font-lock-mode
- (font-lock-fontify-buffer))
-
- ;; Set the mode name to include the product.
- (setq mode-name (concat "SQL[" (prin1-to-string sql-product) "]"))))
-
-(defun sql-set-product (product)
- "Set `sql-product' to product and enable appropriate
-highlighting."
- (interactive "SEnter SQL product: ")
- (when (not (assoc product sql-product-support))
- (error "SQL product %s is not supported; treated as ANSI" product)
- (setq product 'ansi))
-
- ;; Save product setting and fontify.
- (setq sql-product product)
- (sql-highlight-product))
-
(defun sql-highlight-oracle-keywords ()
- "Highlight Oracle keywords."
+ "Highlight Oracle keywords.
+Basically, this just sets `font-lock-keywords' appropriately."
(interactive)
- (sql-set-product 'oracle))
+ (setq font-lock-keywords sql-mode-oracle-font-lock-keywords)
+ (font-lock-fontify-buffer))
(defun sql-highlight-postgres-keywords ()
- "Highlight Postgres keywords."
+ "Highlight Postgres keywords.
+Basically, this just sets `font-lock-keywords' appropriately."
(interactive)
- (sql-set-product 'postgres))
+ (setq font-lock-keywords sql-mode-postgres-font-lock-keywords)
+ (font-lock-fontify-buffer))
(defun sql-highlight-linter-keywords ()
- "Highlight LINTER keywords."
- (interactive)
- (sql-set-product 'linter))
-
-(defun sql-highlight-ms-keywords ()
- "Highlight Microsoft SQLServer keywords."
+ "Highlight LINTER keywords.
+Basically, this just sets `font-lock-keywords' appropriately."
(interactive)
- (sql-set-product 'ms))
+ (setq font-lock-keywords sql-mode-linter-font-lock-keywords)
+ (font-lock-fontify-buffer))
(defun sql-highlight-ansi-keywords ()
- "Highlight ANSI SQL keywords."
+ "Highlight ANSI SQL keywords.
+Basically, this just sets `font-lock-keywords' appropriately."
(interactive)
- (sql-set-product 'ansi))
-
-(defun sql-highlight-sybase-keywords ()
- "Highlight Sybase SQL keywords."
- (interactive)
- (sql-set-product 'sybase))
-
-(defun sql-highlight-informix-keywords ()
- "Highlight Informix SQL keywords."
- (interactive)
- (sql-set-product 'informix))
-
-(defun sql-highlight-interbase-keywords ()
- "Highlight Interbase SQL keywords."
- (interactive)
- (sql-set-product 'interbase))
-
-(defun sql-highlight-ingres-keywords ()
- "Highlight Ingres SQL keywords."
- (interactive)
- (sql-set-product 'ingres))
-
-(defun sql-highlight-solid-keywords ()
- "Highlight Solid SQL keywords."
- (interactive)
- (sql-set-product 'solid))
-
-(defun sql-highlight-mysql-keywords ()
- "Highlight MySQL SQL keywords."
- (interactive)
- (sql-set-product 'mysql))
-
-(defun sql-highlight-sqlite-keywords ()
- "Highlight SQLite SQL keywords."
- (interactive)
- (sql-set-product 'sqlite))
-
-(defun sql-highlight-db2-keywords ()
- "Highlight DB2 SQL keywords."
- (interactive)
- (sql-set-product 'db2))
+ (setq font-lock-keywords sql-mode-ansi-font-lock-keywords)
+ (font-lock-fontify-buffer))
\f
Sybase: \\[sql-sybase]
Ingres: \\[sql-ingres]
Microsoft: \\[sql-ms]
- DB2: \\[sql-db2]
Interbase: \\[sql-interbase]
Linter: \\[sql-linter]
The function asks for the username if WHAT contains symbol `user', for
the password if it contains symbol `password', for the server if it
contains symbol `server', and for the database if it contains symbol
-`database'. The members of WHAT are processed in the order in which
-they are provided.
+`database'.
In order to ask the user for username, password and database, call the
function like this: (sql-get-login 'user 'password 'database)."
(interactive)
- (while what
- (cond
- ((eq (car what) 'user) ; user
+ (if (memq 'user what)
(setq sql-user
(read-from-minibuffer "User: " sql-user nil nil
sql-user-history)))
- ((eq (car what) 'password) ; password
+ (if (memq 'password what)
(setq sql-password
(sql-read-passwd "Password: " sql-password)))
- ((eq (car what) 'server) ; server
+ (if (memq 'server what)
(setq sql-server
(read-from-minibuffer "Server: " sql-server nil nil
sql-server-history)))
- ((eq (car what) 'database) ; database
+ (if (memq 'database what)
(setq sql-database
(read-from-minibuffer "Database: " sql-database nil nil
sql-database-history))))
- (setq what (cdr what))))
(defun sql-find-sqli-buffer ()
"Return the current default SQLi buffer or nil.
(easy-menu-add sql-mode-menu)); XEmacs
(set-syntax-table sql-mode-syntax-table)
(make-local-variable 'font-lock-defaults)
- (make-local-variable 'sql-mode-font-lock-keywords)
+ ;; Note that making KEYWORDS-ONLY nil will cause havoc if you try
+ ;; SELECT 'x' FROM DUAL with SQL*Plus, because the title of the column
+ ;; will have just one quote. Therefore syntactic hilighting is
+ ;; disabled for interactive buffers. `_' and `.' are considered part
+ ;; of words.
+ (setq font-lock-defaults '(sql-mode-font-lock-keywords
+ nil t ((?_ . "w") (?. . "w"))))
(make-local-variable 'comment-start)
(setq comment-start "--")
;; Make each buffer in sql-mode remember the "current" SQLi buffer.
;; Add imenu support for sql-mode. Note that imenu-generic-expression
;; is buffer-local, so we don't need a local-variable for it. SQL is
;; case-insensitive, that's why we have to set imenu-case-fold-search.
+ ;; imenu-syntax-alist makes sure that `_' is considered part of object
+ ;; names.
(setq imenu-generic-expression sql-imenu-generic-expression
- imenu-case-fold-search t)
+ imenu-case-fold-search t
+ imenu-syntax-alist '(("_" . "w")))
;; Make `sql-send-paragraph' work on paragraphs that contain indented
;; lines.
(make-local-variable 'paragraph-separate)
(setq local-abbrev-table sql-mode-abbrev-table)
(setq abbrev-all-caps 1)
;; Run hook
- (run-hooks 'sql-mode-hook)
- ;; Catch changes to sql-product and highlight accordingly
- (sql-highlight-product)
- (add-hook 'hack-local-variables-hook 'sql-highlight-product t t))
+ (run-hooks 'sql-mode-hook))
\f
\(setq comint-output-filter-functions
\(function (lambda (STR) (comint-show-output))))"
(comint-mode)
- ;; Get the `sql-product' for this interactive session.
- (set (make-local-variable 'sql-product)
- (or sql-interactive-product
- sql-product))
- ;; Setup the mode.
+ (setq comint-prompt-regexp sql-prompt-regexp)
+ (setq left-margin sql-prompt-length)
(setq major-mode 'sql-interactive-mode)
- (setq mode-name (concat "SQLi[" (prin1-to-string sql-product) "]"))
+ (setq mode-name "SQLi")
(use-local-map sql-interactive-mode-map)
(if sql-interactive-mode-menu
- (easy-menu-add sql-interactive-mode-menu)) ; XEmacs
+ (easy-menu-add sql-interactive-mode-menu)); XEmacs
(set-syntax-table sql-mode-syntax-table)
- (make-local-variable 'sql-mode-font-lock-keywords)
(make-local-variable 'font-lock-defaults)
;; Note that making KEYWORDS-ONLY nil will cause havoc if you try
;; SELECT 'x' FROM DUAL with SQL*Plus, because the title of the column
;; will have just one quote. Therefore syntactic hilighting is
- ;; disabled for interactive buffers. No imenu support.
- (sql-product-font-lock t nil)
+ ;; disabled for interactive buffers. `_' and `.' are considered part
+ ;; of words.
+ (setq font-lock-defaults '(sql-mode-font-lock-keywords
+ t t ((?_ . "w") (?. . "w"))))
;; Enable commenting and uncommenting of the region.
(make-local-variable 'comment-start)
(setq comment-start "--")
- ;; Abbreviation table init and case-insensitive. It is not activated
+ ;; Abbreviation table init and case-insensitive. It is not activatet
;; by default.
(setq local-abbrev-table sql-mode-abbrev-table)
(setq abbrev-all-caps 1)
;; Exiting the process will call sql-stop.
(set-process-sentinel (get-buffer-process sql-buffer) 'sql-stop)
- ;; Create a usefull name for renaming this buffer later.
- (make-local-variable 'sql-alternate-buffer-name)
- (setq sql-alternate-buffer-name (sql-make-alternate-buffer-name))
- ;; User stuff. Initialize before the hook.
- (set (make-local-variable 'sql-prompt-regexp)
- (sql-product-feature :sqli-prompt-regexp))
- (set (make-local-variable 'sql-prompt-length)
- (sql-product-feature :sqli-prompt-length))
- (make-local-variable 'sql-input-ring-separator)
- (make-local-variable 'sql-input-ring-file-name)
- ;; Run hook.
- (run-hooks 'sql-interactive-mode-hook)
- ;; Set comint based on user overrides.
- (setq comint-prompt-regexp sql-prompt-regexp)
- (setq left-margin sql-prompt-length)
;; People wanting a different history file for each
;; buffer/process/client/whatever can change separator and file-name
;; on the sql-interactive-mode-hook.
(setq comint-input-ring-separator sql-input-ring-separator
comint-input-ring-file-name sql-input-ring-file-name)
+ ;; Create a usefull name for renaming this buffer later.
+ (make-local-variable 'sql-alternate-buffer-name)
+ (setq sql-alternate-buffer-name (sql-make-alternate-buffer-name))
+ ;; User stuff.
+ (run-hooks 'sql-interactive-mode-hook)
;; Calling the hook before calling comint-read-input-ring allows users
;; to set comint-input-ring-file-name in sql-interactive-mode-hook.
(comint-read-input-ring t))
;;; Entry functions for different SQL interpreters.
-;;;###autoload
-(defun sql-product-interactive (&optional product)
- "Run product interpreter as an inferior process.
-
-If buffer `*SQL*' exists but no process is running, make a new process.
-If buffer exists and a process is running, just switch to buffer
-`*SQL*'.
-
-\(Type \\[describe-mode] in the SQL buffer for a list of commands.)"
- (interactive)
- (setq product (or product sql-product))
- (when (sql-product-feature :sqli-connect product)
- (if (comint-check-proc "*SQL*")
- (pop-to-buffer "*SQL*")
- ;; Get credentials.
- (apply 'sql-get-login (sql-product-feature :sqli-login product))
- ;; Connect to database.
- (message "Login...")
- (funcall (sql-product-feature :sqli-connect product))
- ;; Set SQLi mode.
- (setq sql-interactive-product product)
- (setq sql-buffer (current-buffer))
- (sql-interactive-mode)
- ;; All done.
- (message "Login...done")
- (pop-to-buffer sql-buffer))))
-
;;;###autoload
(defun sql-oracle ()
"Run sqlplus by Oracle as an inferior process.
\(Type \\[describe-mode] in the SQL buffer for a list of commands.)"
(interactive)
- (sql-product-interactive 'oracle))
-
-(defun sql-connect-oracle ()
- "Create comint buffer and connect to Oracle using the login
-parameters and command options."
- ;; Produce user/password@database construct. Password without user
- ;; is meaningless; database without user/password is meaningless,
- ;; because "@param" will ask sqlplus to interpret the script
- ;; "param".
- (let ((parameter nil))
- (if (not (string= "" sql-user))
- (if (not (string= "" sql-password))
- (setq parameter (concat sql-user "/" sql-password))
- (setq parameter sql-user)))
- (if (and parameter (not (string= "" sql-database)))
- (setq parameter (concat parameter "@" sql-database)))
- (if parameter
- (setq parameter (nconc (list parameter) sql-oracle-options))
- (setq parameter sql-oracle-options))
- (if parameter
- (set-buffer (apply 'make-comint "SQL" sql-oracle-program nil
- parameter))
- (set-buffer (make-comint "SQL" sql-oracle-program nil)))
- ;; SQL*Plus is buffered on WindowsNT; this handles &placeholders.
+ (if (comint-check-proc "*SQL*")
+ (pop-to-buffer "*SQL*")
+ (sql-get-login 'user 'password 'database)
+ (message "Login...")
+ ;; Produce user/password@database construct. Password without user
+ ;; is meaningless; database without user/password is meaningless,
+ ;; because "@param" will ask sqlplus to interpret the script
+ ;; "param".
+ (let ((parameter nil))
+ (if (not (string= "" sql-user))
+ (if (not (string= "" sql-password))
+ (setq parameter (concat sql-user "/" sql-password))
+ (setq parameter sql-user)))
+ (if (and parameter (not (string= "" sql-database)))
+ (setq parameter (concat parameter "@" sql-database)))
+ (if parameter
+ (setq parameter (nconc (list parameter) sql-oracle-options))
+ (setq parameter sql-oracle-options))
+ (if parameter
+ (set-buffer (apply 'make-comint "SQL" sql-oracle-program nil
+ parameter))
+ (set-buffer (make-comint "SQL" sql-oracle-program nil))))
+ (setq sql-prompt-regexp "^SQL> ")
+ (setq sql-prompt-length 5)
+ (setq sql-buffer (current-buffer))
+ ;; set sql-mode-font-lock-keywords to something different before
+ ;; calling sql-interactive-mode.
+ (setq sql-mode-font-lock-keywords sql-mode-oracle-font-lock-keywords)
+ (sql-interactive-mode)
+ ;; If running on NT, make sure we do placeholder replacement
+ ;; ourselves. This must come after sql-interactive-mode because all
+ ;; local variables will be killed, there.
(if (eq window-system 'w32)
- (setq comint-input-sender 'sql-query-placeholders-and-send))))
+ (setq comint-input-sender 'sql-query-placeholders-and-send))
+ (message "Login...done")
+ (pop-to-buffer sql-buffer)))
\f
\(Type \\[describe-mode] in the SQL buffer for a list of commands.)"
(interactive)
- (sql-product-interactive 'sybase))
-
-(defun sql-connect-sybase ()
- "Create comint buffer and connect to Sybase using the login
-parameters and command options."
- ;; Put all parameters to the program (if defined) in a list and call
- ;; make-comint.
- (let ((params sql-sybase-options))
- (if (not (string= "" sql-server))
- (setq params (append (list "-S" sql-server) params)))
- (if (not (string= "" sql-database))
- (setq params (append (list "-D" sql-database) params)))
- (if (not (string= "" sql-password))
- (setq params (append (list "-P" sql-password) params)))
- (if (not (string= "" sql-user))
- (setq params (append (list "-U" sql-user) params)))
- (set-buffer (apply 'make-comint "SQL" sql-sybase-program
- nil params))))
+ (if (comint-check-proc "*SQL*")
+ (pop-to-buffer "*SQL*")
+ (sql-get-login 'server 'user 'password 'database)
+ (message "Login...")
+ ;; Put all parameters to the program (if defined) in a list and call
+ ;; make-comint.
+ (let ((params sql-sybase-options))
+ (if (not (string= "" sql-server))
+ (setq params (append (list "-S" sql-server) params)))
+ (if (not (string= "" sql-database))
+ (setq params (append (list "-D" sql-database) params)))
+ (if (not (string= "" sql-password))
+ (setq params (append (list "-P" sql-password) params)))
+ (if (not (string= "" sql-user))
+ (setq params (append (list "-U" sql-user) params)))
+ (set-buffer (apply 'make-comint "SQL" sql-sybase-program
+ nil params)))
+ (setq sql-prompt-regexp "^SQL> ")
+ (setq sql-prompt-length 5)
+ (setq sql-buffer (current-buffer))
+ (sql-interactive-mode)
+ (message "Login...done")
+ (pop-to-buffer sql-buffer)))
\f
\(Type \\[describe-mode] in the SQL buffer for a list of commands.)"
(interactive)
- (sql-product-interactive 'informix))
-
-(defun sql-connect-informix ()
- "Create comint buffer and connect to Informix using the login
-parameters and command options."
- ;; username and password are ignored.
- (if (string= "" sql-database)
- (set-buffer (make-comint "SQL" sql-informix-program nil))
- (set-buffer (make-comint "SQL" sql-informix-program nil sql-database "-"))))
+ (if (comint-check-proc "*SQL*")
+ (pop-to-buffer "*SQL*")
+ (sql-get-login 'database)
+ (message "Login...")
+ ;; username and password are ignored.
+ (if (string= "" sql-database)
+ (set-buffer (make-comint "SQL" sql-informix-program nil))
+ (set-buffer (make-comint "SQL" sql-informix-program nil sql-database "-")))
+ (setq sql-prompt-regexp "^SQL> ")
+ (setq sql-prompt-length 5)
+ (setq sql-buffer (current-buffer))
+ (sql-interactive-mode)
+ (message "Login...done")
+ (pop-to-buffer sql-buffer)))
\f
\(Type \\[describe-mode] in the SQL buffer for a list of commands.)"
(interactive)
- (sql-product-interactive 'sqlite))
-
-(defun sql-connect-sqlite ()
- "Create comint buffer and connect to SQLite using the login
-parameters and command options."
- ;; Put all parameters to the program (if defined) in a list and call
- ;; make-comint.
- (let ((params))
- (if (not (string= "" sql-database))
- (setq params (append (list sql-database) params)))
- (if (not (string= "" sql-server))
- (setq params (append (list (concat "--host=" sql-server)) params)))
- (if (not (string= "" sql-password))
- (setq params (append (list (concat "--password=" sql-password)) params)))
- (if (not (string= "" sql-user))
- (setq params (append (list (concat "--user=" sql-user)) params)))
- (if (not (null sql-sqlite-options))
- (setq params (append sql-sqlite-options params)))
- (set-buffer (apply 'make-comint "SQL" sql-sqlite-program
- nil params))))
+ (if (comint-check-proc "*SQL*")
+ (pop-to-buffer "*SQL*")
+ (sql-get-login 'database)
+ (message "Login...")
+ ;; Put all parameters to the program (if defined) in a list and call
+ ;; make-comint.
+ (let ((params))
+ (if (not (string= "" sql-database))
+ (setq params (append (list sql-database) params)))
+ (if (not (string= "" sql-server))
+ (setq params (append (list (concat "--host=" sql-server)) params)))
+ (if (not (string= "" sql-password))
+ (setq params (append (list (concat "--password=" sql-password)) params)))
+ (if (not (string= "" sql-user))
+ (setq params (append (list (concat "--user=" sql-user)) params)))
+ (if (not (null sql-sqlite-options))
+ (setq params (append sql-sqlite-options params)))
+ (set-buffer (apply 'make-comint "SQL" sql-sqlite-program
+ nil params)))
+ (setq sql-prompt-regexp "^sqlite> ")
+ (setq sql-prompt-length 8)
+ (setq sql-buffer (current-buffer))
+ (sql-interactive-mode)
+ (message "Login...done")
+ (pop-to-buffer sql-buffer)))
\f
\(Type \\[describe-mode] in the SQL buffer for a list of commands.)"
(interactive)
- (sql-product-interactive 'mysql))
-
-(defun sql-connect-mysql ()
- "Create comint buffer and connect to MySQL using the login
-parameters and command options."
- ;; Put all parameters to the program (if defined) in a list and call
- ;; make-comint.
- (let ((params))
- (if (not (string= "" sql-database))
- (setq params (append (list sql-database) params)))
- (if (not (string= "" sql-server))
- (setq params (append (list (concat "--host=" sql-server)) params)))
- (if (not (string= "" sql-password))
- (setq params (append (list (concat "--password=" sql-password)) params)))
- (if (not (string= "" sql-user))
- (setq params (append (list (concat "--user=" sql-user)) params)))
- (if (not (null sql-mysql-options))
- (setq params (append sql-mysql-options params)))
- (set-buffer (apply 'make-comint "SQL" sql-mysql-program
- nil params))))
+ (if (comint-check-proc "*SQL*")
+ (pop-to-buffer "*SQL*")
+ (sql-get-login 'user 'password 'database 'server)
+ (message "Login...")
+ ;; Put all parameters to the program (if defined) in a list and call
+ ;; make-comint.
+ (let ((params))
+ (if (not (string= "" sql-database))
+ (setq params (append (list sql-database) params)))
+ (if (not (string= "" sql-server))
+ (setq params (append (list (concat "--host=" sql-server)) params)))
+ (if (not (string= "" sql-password))
+ (setq params (append (list (concat "--password=" sql-password)) params)))
+ (if (not (string= "" sql-user))
+ (setq params (append (list (concat "--user=" sql-user)) params)))
+ (if (not (null sql-mysql-options))
+ (setq params (append sql-mysql-options params)))
+ (set-buffer (apply 'make-comint "SQL" sql-mysql-program
+ nil params)))
+ (setq sql-prompt-regexp "^mysql>")
+ (setq sql-prompt-length 6)
+ (setq sql-buffer (current-buffer))
+ (sql-interactive-mode)
+ (message "Login...done")
+ (pop-to-buffer sql-buffer)))
\f
\(Type \\[describe-mode] in the SQL buffer for a list of commands.)"
(interactive)
- (sql-product-interactive 'solid))
-
-(defun sql-connect-solid ()
- "Create comint buffer and connect to Solid using the login
-parameters and command options."
- ;; Put all parameters to the program (if defined) in a list and call
- ;; make-comint.
- (let ((params))
- ;; It only makes sense if both username and password are there.
- (if (not (or (string= "" sql-user)
- (string= "" sql-password)))
- (setq params (append (list sql-user sql-password) params)))
- (if (not (string= "" sql-server))
- (setq params (append (list sql-server) params)))
- (set-buffer (apply 'make-comint "SQL" sql-solid-program
- nil params))))
+ (if (comint-check-proc "*SQL*")
+ (pop-to-buffer "*SQL*")
+ (sql-get-login 'user 'password 'server)
+ (message "Login...")
+ ;; Put all parameters to the program (if defined) in a list and call
+ ;; make-comint.
+ (let ((params))
+ ;; It only makes sense if both username and password are there.
+ (if (not (or (string= "" sql-user)
+ (string= "" sql-password)))
+ (setq params (append (list sql-user sql-password) params)))
+ (if (not (string= "" sql-server))
+ (setq params (append (list sql-server) params)))
+ (set-buffer (apply 'make-comint "SQL" sql-solid-program
+ nil params)))
+ (setq sql-prompt-regexp "^")
+ (setq sql-prompt-length 0)
+ (setq sql-buffer (current-buffer))
+ (sql-interactive-mode)
+ (message "Login...done")
+ (pop-to-buffer sql-buffer)))
\f
\(Type \\[describe-mode] in the SQL buffer for a list of commands.)"
(interactive)
- (sql-product-interactive 'ingres))
-
-(defun sql-connect-ingres ()
- "Create comint buffer and connect to Ingres using the login
-parameters and command options."
- ;; username and password are ignored.
- (if (string= "" sql-database)
- (set-buffer (make-comint "SQL" sql-ingres-program nil))
- (set-buffer (make-comint "SQL" sql-ingres-program nil sql-database))))
+ (if (comint-check-proc "*SQL*")
+ (pop-to-buffer "*SQL*")
+ (sql-get-login 'database)
+ (message "Login...")
+ ;; username and password are ignored.
+ (if (string= "" sql-database)
+ (set-buffer (make-comint "SQL" sql-ingres-program nil))
+ (set-buffer (make-comint "SQL" sql-ingres-program nil sql-database)))
+ (setq sql-prompt-regexp "^\* ")
+ (setq sql-prompt-length 2)
+ (setq sql-buffer (current-buffer))
+ (sql-interactive-mode)
+ (message "Login...done")
+ (pop-to-buffer sql-buffer)))
\f
;;;###autoload
(defun sql-ms ()
- "Run osql by Microsoft as an inferior process.
+ "Run isql by Microsoft as an inferior process.
If buffer `*SQL*' exists but no process is running, make a new process.
If buffer exists and a process is running, just switch to buffer
\(Type \\[describe-mode] in the SQL buffer for a list of commands.)"
(interactive)
- (sql-product-interactive 'ms))
-
-(defun sql-connect-ms ()
- "Create comint buffer and connect to Microsoft using the login
-parameters and command options."
- ;; Put all parameters to the program (if defined) in a list and call
- ;; make-comint.
- (let ((params sql-ms-options))
- (if (not (string= "" sql-server))
+ (if (comint-check-proc "*SQL*")
+ (pop-to-buffer "*SQL*")
+ (sql-get-login 'user 'password 'database 'server)
+ (message "Login...")
+ ;; Put all parameters to the program (if defined) in a list and call
+ ;; make-comint.
+ (let ((params sql-ms-options))
+ (if (not (string= "" sql-server))
(setq params (append (list "-S" sql-server) params)))
- (if (not (string= "" sql-database))
+ (if (not (string= "" sql-database))
(setq params (append (list "-d" sql-database) params)))
- (if (not (string= "" sql-user))
- (setq params (append (list "-U" sql-user) params)))
- (if (not (string= "" sql-password))
- (setq params (append (list "-P" sql-password) params))
- (if (string= "" sql-user)
- ;; if neither user nor password is provided, use system
- ;; credentials.
- (setq params (append (list "-E") params))
- ;; If -P is passed to ISQL as the last argument without a
- ;; password, it's considered null.
- (setq params (append params (list "-P")))))
- (set-buffer (apply 'make-comint "SQL" sql-ms-program
- nil params))))
+ (if (not (string= "" sql-user))
+ (setq params (append (list "-U" sql-user) params)))
+ (if (not (string= "" sql-password))
+ (setq params (append (list "-P" sql-password) params))
+ ;; If -P is passed to ISQL as the last argument without a password,
+ ;; it's considered null.
+ (setq params (append params (list "-P"))))
+ (set-buffer (apply 'make-comint "SQL" sql-ms-program
+ nil params)))
+ (setq sql-prompt-regexp "^[0-9]*>")
+ (setq sql-prompt-length 5)
+ (setq sql-buffer (current-buffer))
+ (sql-interactive-mode)
+ (message "Login...done")
+ (pop-to-buffer sql-buffer)))
\f
\(Type \\[describe-mode] in the SQL buffer for a list of commands.)"
(interactive)
- (sql-product-interactive 'postgres))
-
-(defun sql-connect-postgres ()
- "Create comint buffer and connect to Postgres using the login
-parameters and command options."
- ;; username and password are ignored. Mark Stosberg suggest to add
- ;; the database at the end. Jason Beegan suggest using --pset and
- ;; pager=off instead of \\o|cat. The later was the solution by
- ;; Gregor Zych. Jason's suggestion is the default value for
- ;; sql-postgres-options.
- (let ((params sql-postgres-options))
- (if (not (string= "" sql-database))
- (setq params (append params (list sql-database))))
- (if (not (string= "" sql-server))
- (setq params (append (list "-h" sql-server) params)))
- (set-buffer (apply 'make-comint "SQL" sql-postgres-program
- nil params))))
+ (if (comint-check-proc "*SQL*")
+ (pop-to-buffer "*SQL*")
+ (sql-get-login 'database 'server)
+ (message "Login...")
+ ;; username and password are ignored. Mark Stosberg suggest to add
+ ;; the database at the end. Jason Beegan suggest using --pset and
+ ;; pager=off instead of \\o|cat. The later was the solution by
+ ;; Gregor Zych. Jason's suggestion is the default value for
+ ;; sql-postgres-options.
+ (let ((params sql-postgres-options))
+ (if (not (string= "" sql-database))
+ (setq params (append params (list sql-database))))
+ (if (not (string= "" sql-server))
+ (setq params (append (list "-h" sql-server) params)))
+ (set-buffer (apply 'make-comint "SQL" sql-postgres-program
+ nil params)))
+ (setq sql-prompt-regexp "^.*> *")
+ (setq sql-prompt-length 5)
+ ;; This is a lousy hack to prevent psql from truncating it's output
+ ;; and giving stupid warnings. If s.o. knows a way to prevent psql
+ ;; from acting this way, then I would be very thankful to
+ ;; incorporate this (Gregor Zych <zych@pool.informatik.rwth-aachen.de>)
+ ;; (comint-send-string "*SQL*" "\\o \| cat\n")
+ (setq sql-mode-font-lock-keywords sql-mode-postgres-font-lock-keywords)
+ (setq sql-buffer (current-buffer))
+ (sql-interactive-mode)
+ (message "Login...done")
+ (pop-to-buffer sql-buffer)))
\f
\(Type \\[describe-mode] in the SQL buffer for a list of commands.)"
(interactive)
- (sql-product-interactive 'interbase))
-
-(defun sql-connect-interbase ()
- "Create comint buffer and connect to Interbase using the login
-parameters and command options."
- ;; Put all parameters to the program (if defined) in a list and call
- ;; make-comint.
- (let ((params sql-interbase-options))
- (if (not (string= "" sql-user))
- (setq params (append (list "-u" sql-user) params)))
- (if (not (string= "" sql-password))
- (setq params (append (list "-p" sql-password) params)))
- (if (not (string= "" sql-database))
- (setq params (cons sql-database params))) ; add to the front!
- (set-buffer (apply 'make-comint "SQL" sql-interbase-program
- nil params))))
+ (if (comint-check-proc "*SQL*")
+ (pop-to-buffer "*SQL*")
+ (sql-get-login 'user 'password 'database)
+ (message "Login...")
+ ;; Put all parameters to the program (if defined) in a list and call
+ ;; make-comint.
+ (let ((params sql-interbase-options))
+ (if (not (string= "" sql-user))
+ (setq params (append (list "-u" sql-user) params)))
+ (if (not (string= "" sql-password))
+ (setq params (append (list "-p" sql-password) params)))
+ (if (not (string= "" sql-database))
+ (setq params (cons sql-database params))); add to the front!
+ (set-buffer (apply 'make-comint "SQL" sql-interbase-program
+ nil params)))
+ (setq sql-prompt-regexp "^SQL> ")
+ (setq sql-prompt-length 5)
+ (setq sql-buffer (current-buffer))
+ (sql-interactive-mode)
+ (message "Login...done")
+ (pop-to-buffer sql-buffer)))
\f
\(Type \\[describe-mode] in the SQL buffer for a list of commands.)"
(interactive)
- (sql-product-interactive 'db2))
-
-(defun sql-connect-db2 ()
- "Create comint buffer and connect to DB2 using the login
-parameters and command options."
- ;; Put all parameters to the program (if defined) in a list and call
- ;; make-comint.
- (set-buffer (apply 'make-comint "SQL" sql-db2-program
- nil sql-db2-options))
- ;; Properly escape newlines when DB2 is interactive.
- (setq comint-input-sender 'sql-escape-newlines-and-send))
+ (if (comint-check-proc "*SQL*")
+ (pop-to-buffer "*SQL*")
+ (message "Login...")
+ ;; Put all parameters to the program (if defined) in a list and call
+ ;; make-comint.
+ (set-buffer (apply 'make-comint "SQL" sql-db2-program
+ nil sql-db2-options))
+ (setq sql-prompt-regexp "^db2 => ")
+ (setq sql-prompt-length 7)
+ (setq sql-buffer (current-buffer))
+ (sql-interactive-mode)
+ ;; Escape newlines. This must come after sql-interactive-mode
+ ;; because all local variables will be killed, there.
+ (setq comint-input-sender 'sql-escape-newlines-and-send)
+ (message "Login...done")
+ (pop-to-buffer sql-buffer)))
;;;###autoload
(defun sql-linter ()
The buffer is put in sql-interactive-mode, giving commands for sending
input. See `sql-interactive-mode'.
+To use LINTER font locking by default, put this line into your .emacs :
+ (setq sql-mode-font-lock-keywords sql-mode-linter-font-lock-keywords)
+
\(Type \\[describe-mode] in the SQL buffer for a list of commands.)"
(interactive)
- (sql-product-interactive 'linter))
-
-(defun sql-connect-linter ()
- "Create comint buffer and connect to Linter using the login
-parameters and command options."
- ;; Put all parameters to the program (if defined) in a list and call
- ;; make-comint.
- (let ((params sql-linter-options) (login nil) (old-mbx (getenv "LINTER_MBX")))
- (if (not (string= "" sql-user))
- (setq login (concat sql-user "/" sql-password)))
- (setq params (append (list "-u" login) params))
- (if (not (string= "" sql-server))
- (setq params (append (list "-n" sql-server) params)))
- (if (string= "" sql-database)
- (setenv "LINTER_MBX" nil)
- (setenv "LINTER_MBX" sql-database))
- (set-buffer (apply 'make-comint "SQL" sql-linter-program nil
- params))
- (setenv "LINTER_MBX" old-mbx)))
+ (if (comint-check-proc "*SQL*")
+ (pop-to-buffer "*SQL*")
+ (sql-get-login 'user 'password 'database 'server)
+ (message "Login...")
+ ;; Put all parameters to the program (if defined) in a list and call
+ ;; make-comint.
+ (let ((params sql-linter-options) (login nil) (old-mbx (getenv "LINTER_MBX")))
+ (if (not (string= "" sql-user))
+ (setq login (concat sql-user "/" sql-password)))
+ (setq params (append (list "-u" login) params))
+ (if (not (string= "" sql-server))
+ (setq params (append (list "-n" sql-server) params)))
+ (if (string= "" sql-database)
+ (setenv "LINTER_MBX" nil)
+ (setenv "LINTER_MBX" sql-database))
+ (set-buffer (apply 'make-comint "SQL" sql-linter-program nil
+ params))
+ (setenv "LINTER_MBX" old-mbx)
+ )
+ (setq sql-prompt-regexp "^SQL>")
+ (setq sql-prompt-length 4)
+ (setq sql-buffer (current-buffer))
+ (sql-interactive-mode)
+ (message "Login...done")
+ (pop-to-buffer sql-buffer)))
\f
(provide 'sql)
-;;; arch-tag: 7e1fa1c4-9ca2-402e-87d2-83a5eccb7ac3
;;; sql.el ends here
;; Author: Tom Tromey <tromey@redhat.com>
;; Chris Lindblad <cjl@lcs.mit.edu>
;; Keywords: languages tcl modes
-;; Version: $Revision: 1.75 $
+;; Version: $Revision: 1.74 $
;; This file is part of GNU Emacs.
(provide 'tcl)
-;;; arch-tag: 8a032554-c3ef-422e-b84c-acec0522179d
;;; tcl.el ends here
;; Authors: Reto Zimmermann <reto@gnu.org>
;; Rodney J. Whitby <software.vhdl-mode@rwhitby.net>
;; Maintainer: Reto Zimmermann <reto@gnu.org>
-;; RCS: $Id: vhdl-mode.el,v 1.20 2003/03/05 07:50:38 lektu Exp $
+;; RCS: $Id: vhdl-mode.el,v 32.51 2002/11/12 18:10:27 reto Exp reto $
;; Keywords: languages vhdl
;; WWW: http://opensource.ethz.ch/emacs/vhdl-mode.html
(provide 'vhdl-mode)
-;;; arch-tag: 780d7073-9b5d-4c6c-b0d8-26b28783aba3
;;; vhdl-mode.el ends here
(provide 'which-func)
-;;; arch-tag: fa8a55c7-bfe3-4ffc-95ab-01bf21796827
;;; which-func.el ends here
(provide 'xscheme)
-;;; arch-tag: cfc14adc-2917-409e-ad16-432e8d0017de
;;; xscheme.el ends here
(provide 'ps-bdf)
-;;; arch-tag: 9b875ba8-565a-4ecf-acaa-30cee732c898
;;; ps-bdf.el ends here
(provide 'ps-mule)
-;;; arch-tag: bca017b2-66a7-4e59-8584-103e749eadbe
;;; ps-mule.el ends here
(provide 'ps-print)
-;;; arch-tag: fb06a585-1112-4206-885d-a57d95d50579
;;; ps-print.el ends here
;; Maintainer: FSF
;; Keywords: files
-(defconst recentf-version "$Revision: 1.24 $")
+(defconst recentf-version "$Revision: 1.23 $")
;; This file is part of GNU Emacs.
(run-hooks 'recentf-load-hook)
-;;; arch-tag: 78f1eec9-0d16-4d19-a4eb-2e4529edb62a
;;; recentf.el ends here
(provide 'rect)
-;;; arch-tag: 178847b3-1f50-4b03-83de-a6e911cc1d16
;;; rect.el ends here
(delete-extract-rectangle start end)
(extract-rectangle start end))))
-;;; arch-tag: ce14dd68-8265-475f-9341-5d4ec5a53035
;;; register.el ends here
(provide 'repeat)
-;;; arch-tag: cd569600-a1ad-4fa7-9062-bb91dfeaf1db
;;; repeat.el ends here
'query-replace 'region))))
(move-overlay replace-overlay start end (current-buffer)))))
-;;; arch-tag: 16b4cd61-fd40-497b-b86f-b667c4cf88e4
;;; replace.el ends here
(provide 'reposition)
-;;; arch-tag: 79487039-3bd7-4ab5-a3e8-ecf3b4919010
;;; reposition.el ends here
(provide 'resume)
-;;; arch-tag: c90b2761-4803-4e58-a0ae-c4721368b628
;;; resume.el ends here
(provide 'reveal)
-;;; arch-tag: 96ba0242-2274-4ed7-8e10-26bc0707b4d8
;;; reveal.el ends here
(provide 'rfn-eshadow)
-;;; arch-tag: dcf70a52-0115-4ec2-b1e3-4f8d3541a888
;;; rfn-eshadow.el ends here
(provide 'rot13)
-;;; arch-tag: ad5b9ca8-946c-4414-996f-e9b1bf9ec79f
;;; rot13.el ends here
;; coding: iso-latin-1
;; End:
-;;; arch-tag: b2f24546-5605-44c4-b67b-c9a4eeba3ee8
;;; ruler-mode.el ends here
(provide 's-region)
-;;; arch-tag: a471e912-18d7-4247-a29b-2100bca180ff
;;; s-region.el ends here
(provide 'saveplace) ; why not...
-;;; arch-tag: 3c2ef47b-0a22-4558-b116-118c9ef454a0
;;; saveplace.el ends here
(provide 'scroll-all)
-;;; arch-tag: db20089a-b157-45df-b5d4-2430e60acdd8
;;; scroll-all.el ends here
\f
(provide 'scroll-bar)
-;;; arch-tag: 6f1d01d0-0b1e-4bf8-86db-d491e0f399f3
;;; scroll-bar.el ends here
(provide 'select)
-;;; arch-tag: bb634f97-8a3b-4b0a-b940-f6e09982328c
;;; select.el ends here
\f
(provide 'server)
-;;; arch-tag: 1f7ecb42-f00a-49f8-906d-61995d84c8d6
;;; server.el ends here
(provide 'ses)
-;;; arch-tag: 88c1ccf0-4293-4824-8c5d-0757b52217f3
;; ses.el ends here.
(provide 'shadowfile)
-;;; arch-tag: e2f4cdd7-2bab-4def-9130-9e69b412b79e
;;; shadowfile.el ends here
(interactive
(list
(and current-prefix-arg
- (read-buffer "Shell buffer: "
- (generate-new-buffer-name "*shell*")))))
+ (read-buffer "Shell buffer: " "*shell*"))))
(setq buffer (get-buffer-create (or buffer "*shell*")))
;; Pop to buffer, so that the buffer's window will be correctly set
;; when we call comint (so that comint sets the COLUMNS env var properly).
(provide 'shell)
-;;; arch-tag: bcb5f12a-c1f4-4aea-a809-2504bd5bd797
;;; shell.el ends here
(insert-and-inherit char)
(setq arg (1- arg)))))
-(defun forward-to-indentation (&optional arg)
+(defun forward-to-indentation (arg)
"Move forward ARG lines and position at first nonblank character."
(interactive "p")
- (forward-line (or arg 1))
+ (forward-line arg)
(skip-chars-forward " \t"))
-(defun backward-to-indentation (&optional arg)
+(defun backward-to-indentation (arg)
"Move backward ARG lines and position at first nonblank character."
(interactive "p")
- (forward-line (- (or arg 1)))
+ (forward-line (- arg))
(skip-chars-forward " \t"))
(defun back-to-indentation ()
(let ((print-length eval-expression-print-length)
(print-level eval-expression-print-level))
- (if eval-expression-insert-value
- (with-no-warnings
- (eval-last-sexp-print-value (car values)))
- (prin1 (car values) t))))
+ (prin1 (car values)
+ (if eval-expression-insert-value (current-buffer) t))))
(defun edit-and-eval-command (prompt command)
"Prompting with PROMPT, let user edit COMMAND and eval result.
using `forward-line' instead. It is usually easier to use
and more reliable (no dependence on goal column, etc.)."
(interactive "p")
- (or arg (setq arg 1))
+ (unless arg (setq arg 1))
(if (and next-line-add-newlines (= arg 1))
(if (save-excursion (end-of-line) (eobp))
;; When adding a newline, don't expand an abbrev.
`forward-line' with a negative argument instead. It is usually easier
to use and more reliable (no dependence on goal column, etc.)."
(interactive "p")
- (or arg (setq arg 1))
+ (unless arg (setq arg 1))
(if (interactive-p)
(condition-case nil
(line-move (- arg))
(goto-char (car pos1))
(insert word2))))
\f
-(defun backward-word (&optional arg)
+(defun backward-word (arg)
"Move backward until encountering the beginning of a word.
With argument, do this that many times."
(interactive "p")
- (forward-word (- (or arg 1))))
+ (forward-word (- arg)))
(defun mark-word (arg)
"Set mark arg words away from point.
(point)))))
(let* ((oldpos (point))
(blinkpos)
- (mismatch)
- matching-paren)
+ (mismatch))
(save-excursion
(save-restriction
(if blink-matching-paren-distance
(setq blinkpos (scan-sexps oldpos -1)))
(error nil)))
(and blinkpos
- (save-excursion
- (goto-char blinkpos)
- (not (looking-at "\\s$")))
- (setq matching-paren
- (or (and parse-sexp-lookup-properties
- (let ((prop (get-text-property blinkpos 'syntax-table)))
- (and (consp prop)
- (eq (car prop) 4)
- (cdr prop))))
- (matching-paren (char-after blinkpos)))
- mismatch
- (or (null matching-paren)
+ (/= (char-syntax (char-after blinkpos))
+ ?\$)
+ (setq mismatch
+ (or (null (matching-paren (char-after blinkpos)))
(/= (char-after (1- oldpos))
- matching-paren))))
+ (matching-paren (char-after blinkpos))))))
(if mismatch (setq blinkpos nil))
(if blinkpos
;; Don't log messages about paren matching.
;
(provide 'simple)
-
-;;; arch-tag: 24af67c0-2a49-44f6-b3b1-312d8b570dfd
;;; simple.el ends here
(provide 'skeleton)
-;;; arch-tag: ccad7bd5-eb5d-40de-9ded-900197215c3e
;;; skeleton.el ends here
;; Author: Stefan Monnier <monnier@cs.yale.edu>
;; Keywords: merge diff3 cvs conflict
-;; Revision: $Id: smerge-mode.el,v 1.21 2003/02/04 12:05:02 lektu Exp $
+;; Revision: $Id: smerge-mode.el,v 1.20 2002/10/10 17:30:20 monnier Exp $
;; This file is part of GNU Emacs.
(provide 'smerge-mode)
-
-;;; arch-tag: 605c8d1e-e43d-4943-a6f3-1bcc4333e690
;;; smerge-mode.el ends here
(provide 'sort)
-;;; arch-tag: fbac12be-2a7b-4c8a-9665-264d61f70bd9
;;; sort.el ends here
(provide 'soundex)
-;;; arch-tag: b2615a98-feb7-430e-a717-171086738953
;;; soundex.el ends here
;; run load-time hooks
(run-hooks 'speedbar-load-hook)
-;;; arch-tag: 4477e6d1-f78c-48b9-a503-387d3c9767d5
;;; speedbar.el ends here
(setq file (replace-match "/" t t file)))
file))
-;;; arch-tag: 7e294698-244d-4758-984b-4047f887a5db
;;; startup.el ends here
(run-hooks 'strokes-load-hook)
(provide 'strokes)
-;;; arch-tag: 8377f60e-43fb-467a-bbcd-2774f91f833e
;;; strokes.el ends here
(second (read-passwd "Confirm password: " nil default)))
(if (equal first second)
(progn
- (and (arrayp second) (clear-string second))
+ (and (arrayp second) (fillarray second ?\0))
(setq success first))
- (and (arrayp first) (clear-string first))
- (and (arrayp second) (clear-string second))
+ (and (arrayp first) (fillarray first ?\0))
+ (and (arrayp second) (fillarray second ?\0))
(message "Password not repeated accurately; please start over")
(sit-for 1))))
success)
(clear-this-command-keys)
(if (= c ?\C-u)
(progn
- (and (arrayp pass) (clear-string pass))
+ (and (arrayp pass) (fillarray pass ?\0))
(setq pass ""))
(if (and (/= c ?\b) (/= c ?\177))
(let* ((new-char (char-to-string c))
(new-pass (concat pass new-char)))
- (and (arrayp pass) (clear-string pass))
- (clear-string new-char)
+ (and (arrayp pass) (fillarray pass ?\0))
+ (fillarray new-char ?\0)
(setq c ?\0)
(setq pass new-pass))
(if (> (length pass) 0)
(let ((new-pass (substring pass 0 -1)))
- (and (arrayp pass) (clear-string pass))
+ (and (arrayp pass) (fillarray pass ?\0))
(setq pass new-pass))))))
(message nil)
(or pass default ""))))
character numbers specifying the substring. They default to the
beginning and the end of BUFFER. Strip text properties from the
inserted text according to `yank-excluded-properties'."
- ;; Since the buffer text should not normally have yank-handler properties,
- ;; there is no need to handle them here.
(let ((opoint (point)))
(insert-buffer-substring buf start end)
(remove-yank-excluded-properties opoint (point))))
(put symbol 'abortfunc (or abortfunc 'kill-buffer))
(put symbol 'hookvar (or hookvar 'mail-send-hook)))
-;;; arch-tag: f7e0e6e5-70aa-4897-ae72-7a3511ec40bc
;;; subr.el ends here
(provide 'tabify)
-;;; arch-tag: c83893b1-e0cc-4e57-8a09-73fd03466416
;;; tabify.el ends here
(provide 'talk)
-;;; arch-tag: 7ab0ad88-1788-4886-a44c-ae685e6f8a1a
;;; talk.el ends here
\f
(provide 'tar-mode)
-;;; arch-tag: 8a585a4a-340e-42c2-89e7-d3b1013a4b78
;;; tar-mode.el ends here
(provide 'tempo)
-;;; arch-tag: b3c0ee36-db3b-47bc-875f-091b4e27a063
;;; tempo.el ends here
(process-connection-type t)
;; We should suppress conversion of end-of-line format.
(inhibit-eol-conversion t)
- ;; inhibit-eol-conversion doesn't seem to do the job, but this does.
- (coding-system-for-read 'unknown-unix)
)
(apply 'start-process name buffer
"/bin/sh" "-c"
\f
(provide 'term)
-;;; arch-tag: eee16bc8-2cd7-4147-9534-a5694752f716
;;; term.el ends here
(define-key function-key-map "\eN" [27]) ; ALT map
)
-;;; arch-tag: abec1b03-582f-49f8-b8cb-e2fd52ea4bd7
;;; AT386.el ends here
(load "term/vt100" nil t)
-;;; arch-tag: c72f446f-e6b7-4749-90a4-bd68632adacf
;;; apollo.el ends here
(provide 'bg-mouse)
-;;; arch-tag: b3d06605-2971-44b1-be2c-e49c24e1a8d3
;;; bg-mouse.el ends here
;;; HP terminals usually encourage using ^H as the rubout character
(load "term/keyswap" nil t)
-;;; arch-tag: 754e4520-0a3e-4e6e-8ca5-9481b1f85cf7
;;; bobcat.el ends here
;; characters to arrive at our display code verbatim.
(standard-display-8bit 127 255)
-;;; arch-tag: eea04c06-7311-4b5a-b531-3c1be1b070af
;;; internal.el ends here
(define-key function-key-map "\e[196q" [C-delete])
(define-key function-key-map "\e[197q" [M-delete])
-;;; arch-tag: b1d0e73a-bb7d-47be-9fb2-6fb126469a1b
;;; iris-ansi.el ends here
(aset the-table ?\^h ?\177)
(setq keyboard-translate-table the-table))
-;;; arch-tag: 67cf7009-e23e-421c-9648-078e7277297c
;;; keyswap.el ends here
;; The third arg only matters in that it is not t or nil.
(set-input-mode (nth 0 value) (nth 1 value) 'iso-latin-1 (nth 3 value)))
-;;; arch-tag: 5d0c4f63-739b-4862-abf3-041fe42adb8f
;;; linux.el ends here
(define-key function-key-map "\eOx" [kp-8])
(define-key function-key-map "\eOy" [kp-9])
-;;; arch-tag: 7ffb4444-6a23-43e1-b457-43cf4f673c0d
;;; lk201.el ends here
"The list of X colors from the `rgb.txt' file.
XConsortium: rgb.txt,v 10.41 94/02/20 18:39:36 rws Exp")
-;;; arch-tag: 71dfcd14-cde8-4d66-b05c-85ec94fb23a6
;;; mac-win.el ends here
(define-key news-fkey-prefix "x" [kp-8])
)
-;;; arch-tag: bfe141a0-623b-4b42-b753-5d9353776c5e
;;; news.el ends here
;; ---------------------------------------------------------------------------
-;;; arch-tag: 5cbdb455-b495-427b-95d0-e417d77d00b4
;;; pc-win.el ends here
;; This recomputes all the default faces given the colors we've just set up.
(tty-set-up-initial-frame-faces)
-;;; arch-tag: 20cf2fb6-6318-4bab-9dbf-1d15048f2257
;;; rxvt.el ends here
(provide 'sun-mouse)
(provide 'term/sun-mouse) ; have to (require 'term/sun-mouse)
-;;; arch-tag: 6e879372-b899-4509-833f-d7f6250e309a
;;; sun-mouse.el ends here
(sun-mouse-handler)) ; Now, execute this mouse blip.
(define-key ctl-x-map "\C-@" 'sun-mouse-once)
-;;; arch-tag: db761d47-fd7d-42b4-aae1-04fa116b6ba6
;;; sun.el ends here
(get-window-with-predicate (lambda (w)
(coordinates-in-window-p (cons x y) w))))
-;;; arch-tag: ec644ed4-cac4-43b8-b3db-cfe83e9098d7
;;; sup-mouse.el ends here
(setq colors (cdr colors)))
count))
-;;; arch-tag: 84d5c3ef-ae22-4754-99ac-e6350c0967ae
;;; tty-colors.el ends here
(tvi970-set-keypad-mode 1)
-;;; arch-tag: c1334cf0-1462-41c3-a963-c077d175f8f0
;;; tvi970.el ends here
(send-string-to-terminal (if vt100-wide-mode "\e[?3h" "\e[?3l"))
(set-frame-width terminal-frame (if vt100-wide-mode 132 80)))
-;;; arch-tag: 9ff41f24-a7c9-4dee-9cf2-fbaa951eb840
;;; vt100.el ends here
(load "term/vt100" nil t)
-;;; arch-tag: 6e839cfc-125a-4574-82f1-c23a51f7c50f
;;; vt102.el ends here
(load "term/vt100" nil t)
-;;; arch-tag: 1d92d70f-dd55-4a1d-9088-e215a4883801
;;; vt125.el ends here
;; Make F11 an escape key.
(define-key function-key-map "\e[23~" [?\e])
-;;; arch-tag: 0f78f583-9f32-4237-b106-28bcfff21d89
;;; vt200.el ends here
;; Make F11 an escape key.
(define-key function-key-map "\e[23~" [?\e])
-;;; arch-tag: a6abb38f-60ea-449e-a9e9-3fb8572c52ae
;;; vt201.el ends here
;; Make F11 an escape key.
(define-key function-key-map "\e[23~" [?\e])
-;;; arch-tag: 98fc4867-a20d-46a1-a276-d7be31e49871
;;; vt220.el ends here
;; Make F11 an escape key.
(define-key function-key-map "\e[23~" [?\e])
-;;; arch-tag: d9f88e9c-02dc-49ff-871c-a415f08e4eb7
;;; vt240.el ends here
;; Make F11 an escape key.
(define-key function-key-map "\e[23~" [?\e])
-;;; arch-tag: 876831c9-a6f2-444a-b033-706e6fbc149f
;;; vt300.el ends here
;; Make F11 an escape key.
(define-key function-key-map "\e[23~" [?\e])
-;;; arch-tag: f9f4c954-0b9e-45f9-b450-a320d32abd9c
;;; vt320.el ends here
;; Make F11 an escape key.
(define-key function-key-map "\e[23~" [?\e])
-;;; arch-tag: a70809c5-6b21-42cc-ba20-536683e5e7d5
;;; vt400.el ends here
;; Make F11 an escape key.
(define-key function-key-map "\e[23~" [?\e])
-;;; arch-tag: df2f897c-3a12-4b3c-9259-df089f96c160
;;; vt420.el ends here
(if (null font)
(error "Font not found")))))
-;;; arch-tag: 69fb1701-28c2-4890-b351-3d1fe4b4f166
;;; w32-win.el ends here
(send-string-to-terminal
(concat "\ea23R" (1+ (frame-width)) "C\eG0")))))
-;;; arch-tag: b6a05d37-eead-4cf6-b997-0f956c68881c
;;; wyse50.el ends here
;; Turn on support for mouse wheels.
(mouse-wheel-mode 1)
-;;; arch-tag: f1501302-db8b-4d95-88e3-116697d89f78
;;; x-win.el ends here
;; This recomputes all the default faces given the colors we've just set up.
(tty-set-up-initial-frame-faces)
-;;; arch-tag: 12e7ebdd-1e6c-4b25-b0f9-35ace25e855a
;;; xterm.el ends here
(provide 'terminal)
-;;; arch-tag: 0ae1d7d7-90ef-4566-a531-6e7ff8c79b2f
;;; terminal.el ends here
;; Don't hesitate to ask me any questions.
-;;; arch-tag: 3e63b881-aaaa-4b83-a072-220d4661a8a3
;;; artist.el ends here
(defgroup bib nil
"Major mode for editing bib files."
:prefix "bib-"
- :group 'external
:group 'wp)
(defcustom bib-file "~/my-bibliography.bib"
(provide 'bib-mode)
-;;; arch-tag: e3a97958-3c2c-487f-9557-fafc3c98452d
;;; bib-mode.el ends here
(provide 'bibtex)
-;;; arch-tag: ee2be3af-caad-427f-b42a-d20fad630d04
;;; bibtex.el ends here
(message "Warning: invalid <x-display> parameter %s" param))
(list start end 'display prop)))
-;;; arch-tag: 05cae488-3fea-45cd-ac29-5b02cb64e42b
;;; enriched.el ends here
"")
string))
-;;; arch-tag: 727ad455-1161-4fa9-8df5-0f74b179216d
;;; fill.el ends here
(provide 'flyspell)
-;;; arch-tag: 05d915b9-e9cf-44fb-9137-fc28f5eaab2a
;;; flyspell.el ends here
; LocalWords: uuencoded unidiff sc nn VM SGML eval IspellPersDict unsplitable
; LocalWords: lns XEmacs HTML casechars Multibyte
-;;; arch-tag: 4941b9f9-3b7c-4a76-a4ed-5fa8b6010ef5
;;; ispell.el ends here
;;; Place `provide' at end of file.
(provide 'makeinfo)
-;;; arch-tag: 5f810713-3de2-4e20-8030-4bc3dd0d9604
;;; makeinfo.el ends here
(provide 'nroff-mode)
-;;; arch-tag: 6e276340-6c65-4f65-b4e3-0ca431ddfb6c
;;; nroff-mode.el ends here
:syntax-table nil)
(provide 'page-ext)
-
-;;; arch-tag: 2f311550-c6e0-4458-9c12-7f039c058bdb
;;; page-ext.el ends here
;;; Place `provide' at end of file.
(provide 'page)
-;;; arch-tag: e8d7a0bd-8655-4b6e-b852-f2ee25316a1d
;;; page.el ends here
;;; coding: iso-2022-7bit
;;; End:
-;;; arch-tag: e727eb1a-527a-4464-b9d7-9d3ec0d1a575
;;; paragraphs.el ends here
(provide 'picture)
-;;; arch-tag: e452d08d-a470-4fbf-896e-ea276698d1ca
;;; picture.el ends here
(provide 'po)
-;;; arch-tag: 56748a57-d64c-4200-8f6b-c3a70496eb8c
;;; po.el ends here
(provide 'refbib)
(provide 'refer-to-bibtex)
-;;; arch-tag: 664afee2-6e76-4408-ba56-981d8a179586
;;; refbib.el ends here
(setq refer-bib-files files))
files))
-;;; arch-tag: 151f641b-e79b-462b-9a29-a95c3793f300
;;; refer.el ends here
;; Copyright (C) 2000, 2003 Free Software Foundation, Inc.
;; Author: Dave Love <fx@gnu.org>
-;; Maintainer: Miles Bader <miles@gnu.org>
;; Keywords: wp
;; This file is part of GNU Emacs.
(provide 'refill)
-;;; arch-tag: 2c4ce9e8-1daa-4a3b-b6f8-fd6ac5bf6138
;;; refill.el ends here
;;; reftex-auc.el --- RefTeX's interface to AUC TeX
-;; Copyright (c) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
+;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
-;; Version: 4.21
+;; Version: 4.18
;; This file is part of GNU Emacs.
;; Tell if a certain flag is set in reftex-plug-into-AUCTeX
(or (eq t reftex-plug-into-AUCTeX)
(and (listp reftex-plug-into-AUCTeX)
- (nth which reftex-plug-into-AUCTeX))))
+ (nth which reftex-plug-into-AUCTeX))))
(defun reftex-arg-label (optional &optional prompt definition)
"Use `reftex-label', `reftex-reference' or AUCTeX's code to insert label arg.
((and definition (reftex-plug-flag 1))
;; Create a new label, with a temporary brace for `reftex-what-macro'
(unwind-protect
- (progn (insert "{") (setq label (or (reftex-label nil t) "")))
- (delete-backward-char 1)))
+ (progn (insert "{") (setq label (or (reftex-label nil t) "")))
+ (delete-backward-char 1)))
((and (not definition) (reftex-plug-flag 2))
;; Reference a label with RefTeX
(setq label (reftex-reference nil t)))
(t
;; AUCTeX's default mechanism
(setq label (completing-read (TeX-argument-prompt optional prompt "Key")
- (LaTeX-label-list)))))
+ (LaTeX-label-list)))))
(if (and definition (not (string-equal "" label)))
- (LaTeX-add-labels label))
+ (LaTeX-add-labels label))
(TeX-argument-insert label optional)))
(defun reftex-arg-cite (optional &optional prompt definition)
(setq items (list (or (reftex-citation t) ""))))
(t
(setq prompt (concat (if optional "(Optional) " "")
- (if prompt prompt "Add key")
- ": (default none) "))
+ (if prompt prompt "Add key")
+ ": (default none) "))
(setq items (multi-prompt "," t prompt (LaTeX-bibitem-list)))))
(apply 'LaTeX-add-bibitems items)
(TeX-argument-insert (mapconcat 'identity items ",") optional)))
(defun reftex-arg-index-tag (optional &optional prompt &rest args)
- "Prompt for an index tag with completion.
+ "Prompt for an index tag with completion.
This is the name of an index, not the entry."
(let (tag taglist)
(setq prompt (concat (if optional "(Optional) " "")
- (if prompt prompt "Index tag")
- ": (default none) "))
+ (if prompt prompt "Index tag")
+ ": (default none) "))
(if (and reftex-support-index (reftex-plug-flag 4))
- ;; Use RefTeX completion
- (progn
- (reftex-access-scan-info nil)
- (setq taglist
- (cdr (assoc 'index-tags
- (symbol-value reftex-docstruct-symbol)))
- tag (completing-read prompt (mapcar 'list taglist))))
+ ;; Use RefTeX completion
+ (progn
+ (reftex-access-scan-info nil)
+ (setq taglist
+ (cdr (assoc 'index-tags
+ (symbol-value reftex-docstruct-symbol)))
+ tag (completing-read prompt (mapcar 'list taglist))))
;; Just ask like AUCTeX does.
(setq tag (read-string prompt)))
(TeX-argument-insert tag optional)))
argument identify one of multiple indices."
(let* (tag key)
(if (and reftex-support-index (reftex-plug-flag 4))
- (progn
- (reftex-access-scan-info nil)
- (setq tag (reftex-what-index-tag)
- key (reftex-index-complete-key (or tag "idx"))))
+ (progn
+ (reftex-access-scan-info nil)
+ (setq tag (reftex-what-index-tag)
+ key (reftex-index-complete-key (or tag "idx"))))
(setq key (completing-read (TeX-argument-prompt optional prompt "Key")
- (LaTeX-index-entry-list))))
+ (LaTeX-index-entry-list))))
(unless (string-equal "" key)
(LaTeX-add-index-entries key))
(TeX-argument-insert key optional)))
(defun reftex-what-index-tag ()
;; Look backward to find out what index the macro at point belongs to
(let ((macro (save-excursion
- (and (re-search-backward "\\\\[a-zA-Z*]+" nil t)
- (match-string 0))))
- tag entry)
+ (and (re-search-backward "\\\\[a-zA-Z*]+" nil t)
+ (match-string 0))))
+ tag entry)
(when (and macro
- (setq entry (assoc macro reftex-index-macro-alist)))
+ (setq entry (assoc macro reftex-index-macro-alist)))
(setq tag (nth 1 entry))
(cond
((stringp tag) tag)
((integerp tag)
- (save-excursion
- (goto-char (match-end 1))
- (or (reftex-nth-arg tag (nth 6 entry)) "idx")))
+ (save-excursion
+ (goto-char (match-end 1))
+ (or (reftex-nth-arg tag (nth 6 entry)) "idx")))
(t "idx")))))
(defvar LaTeX-label-function)
;; Replace AUCTeX functions with RefTeX functions.
;; Which functions are replaced is controlled by the variable
;; `reftex-plug-into-AUCTeX'.
-
+
(if (reftex-plug-flag 0)
(setq LaTeX-label-function 'reftex-label)
(setq LaTeX-label-function nil))
(and (reftex-plug-flag 3)
(fboundp 'TeX-arg-cite)
(fset 'TeX-arg-cite 'reftex-arg-cite))
-
- (and (reftex-plug-flag 4)
+
+ (and (reftex-plug-flag 4)
(fboundp 'TeX-arg-index-tag)
(fset 'TeX-arg-index-tag 'reftex-arg-index-tag))
- (and (reftex-plug-flag 4)
+ (and (reftex-plug-flag 4)
(fboundp 'TeX-arg-index)
(fset 'TeX-arg-index 'reftex-arg-index)))
(unless reftex-docstruct-symbol
(reftex-tie-multifile-symbols))
(when (and reftex-docstruct-symbol
- (symbolp reftex-docstruct-symbol))
+ (symbolp reftex-docstruct-symbol))
(let ((list (get reftex-docstruct-symbol 'reftex-label-alist-style))
- entry changed)
+ entry changed)
(while entry-list
- (setq entry (pop entry-list))
- (unless (member entry list)
- (setq reftex-tables-dirty t
- changed t)
- (push entry list)))
+ (setq entry (pop entry-list))
+ (unless (member entry list)
+ (setq reftex-tables-dirty t
+ changed t)
+ (push entry list)))
(when changed
- (put reftex-docstruct-symbol 'reftex-label-alist-style list)))))
+ (put reftex-docstruct-symbol 'reftex-label-alist-style list)))))
(defalias 'reftex-add-to-label-alist 'reftex-add-label-environments)
(defun reftex-add-section-levels (entry-list)
(unless reftex-docstruct-symbol
(reftex-tie-multifile-symbols))
(when (and reftex-docstruct-symbol
- (symbolp reftex-docstruct-symbol))
+ (symbolp reftex-docstruct-symbol))
(let ((list (get reftex-docstruct-symbol 'reftex-section-levels))
- entry changed)
+ entry changed)
(while entry-list
- (setq entry (pop entry-list))
- (unless (member entry list)
- (setq reftex-tables-dirty t
- changed t)
- (push entry list)))
+ (setq entry (pop entry-list))
+ (unless (member entry list)
+ (setq reftex-tables-dirty t
+ changed t)
+ (push entry list)))
(when changed
- (put reftex-docstruct-symbol 'reftex-section-levels list)))))
+ (put reftex-docstruct-symbol 'reftex-section-levels list)))))
(defun reftex-notice-new-section ()
(reftex-notice-new 1 'force))
-;;; arch-tag: 4a798e68-3405-421c-a09b-0269aac64ab4
;;; reftex-auc.el ends here
;;; reftex-cite.el --- creating citations with RefTeX
-;; Copyright (c) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
+;; Copyright (c) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
-;; Version: 4.21
+;; Version: 4.18
;; This file is part of GNU Emacs.
(defmacro reftex-with-special-syntax-for-bib (&rest body)
`(let ((saved-syntax (syntax-table)))
(unwind-protect
- (progn
- (set-syntax-table reftex-syntax-table-for-bib)
- ,@body)
+ (progn
+ (set-syntax-table reftex-syntax-table-for-bib)
+ ,@body)
(set-syntax-table saved-syntax))))
(defun reftex-default-bibliography ()
;; Return the expanded value of `reftex-default-bibliography'.
;; The expanded value is cached.
(unless (eq (get 'reftex-default-bibliography :reftex-raw)
- reftex-default-bibliography)
+ reftex-default-bibliography)
(put 'reftex-default-bibliography :reftex-expanded
- (reftex-locate-bibliography-files
- default-directory reftex-default-bibliography))
+ (reftex-locate-bibliography-files
+ default-directory reftex-default-bibliography))
(put 'reftex-default-bibliography :reftex-raw
- reftex-default-bibliography))
+ reftex-default-bibliography))
(get 'reftex-default-bibliography :reftex-expanded))
(defun reftex-bib-or-thebib ()
;; citation
;; Find the bof of the current file
(let* ((docstruct (symbol-value reftex-docstruct-symbol))
- (rest (or (member (list 'bof (buffer-file-name)) docstruct)
- docstruct))
- (bib (assq 'bib rest))
- (thebib (assq 'thebib rest))
- (bibmem (memq bib rest))
- (thebibmem (memq thebib rest)))
+ (rest (or (member (list 'bof (buffer-file-name)) docstruct)
+ docstruct))
+ (bib (assq 'bib rest))
+ (thebib (assq 'thebib rest))
+ (bibmem (memq bib rest))
+ (thebibmem (memq thebib rest)))
(when (not (or thebib bib))
(setq bib (assq 'bib docstruct)
- thebib (assq 'thebib docstruct)
- bibmem (memq bib docstruct)
- thebibmem (memq thebib docstruct)))
+ thebib (assq 'thebib docstruct)
+ bibmem (memq bib docstruct)
+ thebibmem (memq thebib docstruct)))
(if (> (length bibmem) (length thebibmem))
- (if bib 'bib nil)
+ (if bib 'bib nil)
(if thebib 'thebib nil))))
(defun reftex-get-bibfile-list ()
;; Find a certain reference in any of the BibTeX files.
(defun reftex-pop-to-bibtex-entry (key file-list &optional mark-to-kill
- highlight item return)
+ highlight item return)
;; Find BibTeX KEY in any file in FILE-LIST in another window.
;; If MARK-TO-KILL is non-nil, mark new buffer to kill.
;; If HIGHLIGHT is non-nil, highlight the match.
;; If RETURN is non-nil, just return the entry.
(let* ((re
- (if item
- (concat "\\\\bibitem\\(\\[[^]]*\\]\\)?{" (regexp-quote key) "}")
- (concat "@[a-zA-Z]+[ \t\n\r]*[{(][ \t\n\r]*" (regexp-quote key)
- "[, \t\r\n}]")))
- (buffer-conf (current-buffer))
+ (if item
+ (concat "\\\\bibitem\\(\\[[^]]*\\]\\)?{" (regexp-quote key) "}")
+ (concat "@[a-zA-Z]+[ \t\n\r]*[{(][ \t\n\r]*" (regexp-quote key)
+ "[, \t\r\n}]")))
+ (buffer-conf (current-buffer))
file buf pos)
(catch 'exit
(goto-char (point-min))
(when (re-search-forward re nil t)
(goto-char (match-beginning 0))
- (setq pos (point))
- (when return
- ;; Just return the relevant entry
- (if item (goto-char (match-end 0)))
- (setq return (buffer-substring
- (point) (reftex-end-of-bib-entry item)))
- (set-buffer buffer-conf)
- (throw 'exit return))
- (switch-to-buffer-other-window buf)
- (goto-char pos)
+ (setq pos (point))
+ (when return
+ ;; Just return the relevant entry
+ (if item (goto-char (match-end 0)))
+ (setq return (buffer-substring
+ (point) (reftex-end-of-bib-entry item)))
+ (set-buffer buffer-conf)
+ (throw 'exit return))
+ (switch-to-buffer-other-window buf)
+ (goto-char pos)
(recenter 0)
(if highlight
(reftex-highlight 0 (match-beginning 0) (match-end 0)))
(throw 'exit (selected-window))))
(set-buffer buffer-conf)
(if item
- (error "No \\bibitem with citation key %s" key)
- (error "No BibTeX entry with citation key %s" key)))))
+ (error "No \\bibitem with citation key %s" key)
+ (error "No BibTeX entry with citation key %s" key)))))
(defun reftex-end-of-bib-entry (item)
- (save-excursion
+ (save-excursion
(condition-case nil
- (if item
- (progn (end-of-line)
- (re-search-forward
- "\\\\bibitem\\|\\end{thebibliography}")
- (1- (match-beginning 0)))
- (progn (forward-list 1) (point)))
+ (if item
+ (progn (end-of-line)
+ (re-search-forward
+ "\\\\bibitem\\|\\end{thebibliography}")
+ (1- (match-beginning 0)))
+ (progn (forward-list 1) (point)))
(error (min (point-max) (+ 300 (point)))))))
;; Parse bibtex buffers
-(defun reftex-extract-bib-entries (buffers)
+(defun reftex-extract-bib-entries (buffers re-list)
;; Extract bib entries which match regexps from BUFFERS.
;; BUFFERS is a list of buffers or file names.
;; Return list with entries."
- (let* (re-list first-re rest-re
- (buffer-list (if (listp buffers) buffers (list buffers)))
- found-list entry buffer1 buffer alist
- key-point start-point end-point default)
-
- ;; Read a regexp, completing on known citation keys.
- (setq default (regexp-quote (reftex-get-bibkey-default)))
- (setq re-list
- (split-string
- (completing-read
- (concat
- "Regex { && Regex...}: "
- "[" default "]: ")
- (if reftex-mode
- (if (fboundp 'LaTeX-bibitem-list)
- (LaTeX-bibitem-list)
- (cdr (assoc 'bibview-cache
- (symbol-value reftex-docstruct-symbol))))
- nil)
- nil nil nil 'reftex-cite-regexp-hist)
- "[ \t]*&&[ \t]*"))
-
- (if (or (null re-list ) (equal re-list '("")))
- (setq re-list (list default)))
-
- (setq first-re (car re-list) ; We'll use the first re to find things,
- rest-re (cdr re-list)) ; the others to narrow down.
- (if (string-match "\\`[ \t]*\\'" (or first-re ""))
- (error "Empty regular expression"))
+ (let* ((buffer-list (if (listp buffers) buffers (list buffers)))
+ (first-re (car re-list)) ; We'll use the first re to find things,
+ (rest-re (cdr re-list)) ; the others to narrow down.
+ found-list entry buffer1 buffer alist
+ key-point start-point end-point default)
(save-excursion
(save-window-excursion
(message "Scanning bibliography database %s" buffer1))
(set-buffer buffer1)
- (reftex-with-special-syntax-for-bib
- (save-excursion
- (goto-char (point-min))
- (while (re-search-forward first-re nil t)
- (catch 'search-again
- (setq key-point (point))
- (unless (re-search-backward
- "\\(\\`\\|[\n\r]\\)[ \t]*@\\([a-zA-Z]+\\)[ \t\n\r]*[{(]" nil t)
- (throw 'search-again nil))
- (setq start-point (point))
- (goto-char (match-end 0))
- (condition-case nil
- (up-list 1)
- (error (goto-char key-point)
+ (reftex-with-special-syntax-for-bib
+ (save-excursion
+ (goto-char (point-min))
+ (while (re-search-forward first-re nil t)
+ (catch 'search-again
+ (setq key-point (point))
+ (unless (re-search-backward
+ "^[ \t]*@\\([a-zA-Z]+\\)[ \t\n\r]*[{(]" nil t)
+ (throw 'search-again nil))
+ (setq start-point (point))
+ (goto-char (match-end 0))
+ (condition-case nil
+ (up-list 1)
+ (error (goto-char key-point)
(throw 'search-again nil)))
- (setq end-point (point))
-
- ;; Ignore @string, @comment and @c entries or things
- ;; outside entries
- (when (or (string= (downcase (match-string 2)) "string")
- (string= (downcase (match-string 2)) "comment")
- (string= (downcase (match-string 2)) "c")
- (< (point) key-point)) ; this means match not in {}
- (goto-char key-point)
- (throw 'search-again nil))
-
- ;; Well, we have got a match
- ;;(setq entry (concat
- ;; (buffer-substring start-point (point)) "\n"))
- (setq entry (buffer-substring start-point (point)))
-
- ;; Check if other regexp match as well
- (setq re-list rest-re)
- (while re-list
- (unless (string-match (car re-list) entry)
- ;; nope - move on
- (throw 'search-again nil))
- (pop re-list))
-
- (setq alist (reftex-parse-bibtex-entry
- nil start-point end-point))
- (push (cons "&entry" entry) alist)
-
- ;; check for crossref entries
- (if (assoc "crossref" alist)
- (setq alist
- (append
- alist (reftex-get-crossref-alist alist))))
-
- ;; format the entry
- (push (cons "&formatted" (reftex-format-bib-entry alist))
- alist)
-
- ;; make key the first element
- (push (reftex-get-bib-field "&key" alist) alist)
-
- ;; add it to the list
- (push alist found-list)))))
- (reftex-kill-temporary-buffers))))
+ (setq end-point (point))
+
+ ;; Ignore @string, @comment and @c entries or things
+ ;; outside entries
+ (when (or (member-ignore-case (match-string 1)
+ '("string" "comment" "c"))
+ (< (point) key-point)) ; this means match not in {}
+ (goto-char key-point)
+ (throw 'search-again nil))
+
+ ;; Well, we have got a match
+ (setq entry (buffer-substring start-point (point)))
+
+ ;; Check if other regexp match as well
+ (setq re-list rest-re)
+ (while re-list
+ (unless (string-match (car re-list) entry)
+ ;; nope - move on
+ (throw 'search-again nil))
+ (pop re-list))
+
+ (setq alist (reftex-parse-bibtex-entry
+ nil start-point end-point))
+ (push (cons "&entry" entry) alist)
+
+ ;; check for crossref entries
+ (if (assoc "crossref" alist)
+ (setq alist
+ (append
+ alist (reftex-get-crossref-alist alist))))
+
+ ;; format the entry
+ (push (cons "&formatted" (reftex-format-bib-entry alist))
+ alist)
+
+ ;; make key the first element
+ (push (reftex-get-bib-field "&key" alist) alist)
+
+ ;; add it to the list
+ (push alist found-list)))))
+ (reftex-kill-temporary-buffers))))
(setq found-list (nreverse found-list))
;; Sorting
nil)))))
;; Parse the bibliography environment
-(defun reftex-extract-bib-entries-from-thebibliography (files)
+(defun reftex-extract-bib-entries-from-thebibliography (files re-list)
;; Extract bib-entries from the \begin{thebibliography} environment.
;; Parsing is not as good as for the BibTeX database stuff.
;; The environment should be located in file FILE.
- (let* (start end buf entries re re-list file default)
+ (let* (start end buf entries re file default)
(unless files
(error "Need file name to find thebibliography environment"))
(while (setq file (pop files))
- (setq buf (reftex-get-file-buffer-force
- file (not reftex-keep-temporary-buffers)))
+ (setq buf (reftex-get-file-buffer-force
+ file (not reftex-keep-temporary-buffers)))
(unless buf
- (error "No such file %s" file))
+ (error "No such file %s" file))
(message "Scanning thebibliography environment in %s" file)
(save-excursion
- (set-buffer buf)
- (save-restriction
- (widen)
- (goto-char (point-min))
- (while (re-search-forward
- "\\(\\`\\|[\n\r]\\)[ \t]*\\\\begin{thebibliography}" nil t)
- (beginning-of-line 2)
- (setq start (point))
- (if (re-search-forward
- "\\(\\`\\|[\n\r]\\)[ \t]*\\\\end{thebibliography}" nil t)
- (progn
- (beginning-of-line 1)
- (setq end (point))))
- (when (and start end)
- (setq entries
- (append entries
+ (set-buffer buf)
+ (save-restriction
+ (widen)
+ (goto-char (point-min))
+ (while (re-search-forward
+ "\\(\\`\\|[\n\r]\\)[ \t]*\\\\begin{thebibliography}" nil t)
+ (beginning-of-line 2)
+ (setq start (point))
+ (if (re-search-forward
+ "\\(\\`\\|[\n\r]\\)[ \t]*\\\\end{thebibliography}" nil t)
+ (progn
+ (beginning-of-line 1)
+ (setq end (point))))
+ (when (and start end)
+ (setq entries
+ (append entries
(mapcar 'reftex-parse-bibitem
- (delete ""
- (split-string
- (buffer-substring-no-properties start end)
- "[ \t\n\r]*\\\\bibitem\\(\\[[^]]*]\\)*"))))))
- (goto-char end)))))
+ (delete ""
+ (split-string
+ (buffer-substring-no-properties start end)
+ "[ \t\n\r]*\\\\bibitem\\(\\[[^]]*]\\)*"))))))
+ (goto-char end)))))
(unless entries
(error "No bibitems found"))
- ;; Read a regexp, completing on known citation keys.
- (setq default (regexp-quote (reftex-get-bibkey-default)))
- (setq re-list
- (split-string
- (completing-read
- (concat
- "Regex { && Regex...}: "
- "[" default "]: ")
- (if reftex-mode
- (if (fboundp 'LaTeX-bibitem-list)
- (LaTeX-bibitem-list)
- (cdr (assoc 'bibview-cache
- (symbol-value reftex-docstruct-symbol))))
- nil)
- nil nil nil 'reftex-cite-regexp-hist)
- "[ \t]*&&[ \t]*"))
-
- (if (or (null re-list ) (equal re-list '("")))
- (setq re-list (list default)))
-
- (if (string-match "\\`[ \t]*\\'" (car re-list))
- (error "Empty regular expression"))
-
(while (and (setq re (pop re-list)) entries)
- (setq entries
- (delq nil (mapcar
- (lambda (x)
- (if (string-match re (cdr (assoc "&entry" x)))
- x nil))
- entries))))
- (setq entries
- (mapcar
- (lambda (x)
- (push (cons "&formatted" (reftex-format-bibitem x)) x)
- (push (reftex-get-bib-field "&key" x) x)
- x)
- entries))
+ (setq entries
+ (delq nil (mapcar
+ (lambda (x)
+ (if (string-match re (cdr (assoc "&entry" x)))
+ x nil))
+ entries))))
+ (setq entries
+ (mapcar
+ (lambda (x)
+ (push (cons "&formatted" (reftex-format-bibitem x)) x)
+ (push (reftex-get-bib-field "&key" x) x)
+ x)
+ entries))
entries))
(let* ((macro (reftex-what-macro 1)))
(save-excursion
(if (and macro (string-match "cite" (car macro)))
- (goto-char (cdr macro)))
+ (goto-char (cdr macro)))
(skip-chars-backward "^a-zA-Z0-9")
(reftex-this-word))))
(progn
(set-buffer (get-buffer-create " *RefTeX-scratch*"))
(fundamental-mode)
- (set-syntax-table reftex-syntax-table-for-bib)
+ (set-syntax-table reftex-syntax-table-for-bib)
(erase-buffer)
(insert entry))
(widen)
;; Extract the field FIELDNAME from an ENTRY
(let ((cell (assoc fieldname entry)))
(if cell
- (if format
- (format format (cdr cell))
- (cdr cell))
+ (if format
+ (format format (cdr cell))
+ (cdr cell))
"")))
(defun reftex-format-bib-entry (entry)
(setq authors (reftex-truncate authors 30 t t))
(when (reftex-use-fonts)
(put-text-property 0 (length key) 'face
- (reftex-verified-face reftex-label-face
- 'font-lock-constant-face
- 'font-lock-reference-face)
+ (reftex-verified-face reftex-label-face
+ 'font-lock-constant-face
+ 'font-lock-reference-face)
key)
(put-text-property 0 (length authors) 'face reftex-bib-author-face
authors)
(let ((key "") (text ""))
(when (string-match "\\`{\\([^}]+\\)}\\([^\000]*\\)" item)
(setq key (match-string 1 item)
- text (match-string 2 item)))
+ text (match-string 2 item)))
;; Clean up the text a little bit
(while (string-match "[\n\r\t]\\|[ \t][ \t]+" text)
(setq text (replace-match " " nil t text)))
(if (string-match "\\`[ \t]+" text)
- (setq text (replace-match "" nil t text)))
+ (setq text (replace-match "" nil t text)))
(list
(cons "&key" key)
(cons "&text" text)
(defun reftex-format-bibitem (item)
;; Format a \bibitem entry so that it is (relatively) nice to look at.
(let ((text (reftex-get-bib-field "&text" item))
- (key (reftex-get-bib-field "&key" item))
- (lines nil))
+ (key (reftex-get-bib-field "&key" item))
+ (lines nil))
;; Wrap the text into several lines.
(while (and (> (length text) 70)
- (string-match " " (substring text 60)))
- (push (substring text 0 (+ 60 (match-beginning 0))) lines)
- (setq text (substring text (+ 61 (match-beginning 0)))))
+ (string-match " " (substring text 60)))
+ (push (substring text 0 (+ 60 (match-beginning 0))) lines)
+ (setq text (substring text (+ 61 (match-beginning 0)))))
(push text lines)
(setq text (mapconcat 'identity (nreverse lines) "\n "))
;; This really does the work of reftex-citation.
(let* ((format (reftex-figure-out-cite-format arg no-insert format-key))
- (docstruct-symbol reftex-docstruct-symbol)
- (selected-entries (reftex-offer-bib-menu))
- (insert-entries selected-entries)
- entry string cite-view)
+ (docstruct-symbol reftex-docstruct-symbol)
+ (selected-entries (reftex-offer-bib-menu))
+ (insert-entries selected-entries)
+ entry string cite-view)
(unless selected-entries (error "Quit"))
(if (stringp selected-entries)
- ;; Nonexistent entry
- (setq selected-entries nil
- insert-entries (list (list selected-entries
- (cons "&key" selected-entries))))
+ ;; Nonexistent entry
+ (setq selected-entries nil
+ insert-entries (list (list selected-entries
+ (cons "&key" selected-entries))))
;; It makes sense to compute the cite-view strings.
(setq cite-view t))
;; All keys go into a single command - we need to trick a little
(pop selected-entries)
(let ((concat-keys (mapconcat 'car selected-entries ",")))
- (setq insert-entries
- (list (list concat-keys (cons "&key" concat-keys))))))
-
+ (setq insert-entries
+ (list (list concat-keys (cons "&key" concat-keys))))))
+
(unless no-insert
;; We shall insert this into the buffer...
(message "Formatting...")
(while (setq entry (pop insert-entries))
- ;; Format the citation and insert it
- (setq string (if reftex-format-cite-function
- (funcall reftex-format-cite-function
- (reftex-get-bib-field "&key" entry)
- format)
- (reftex-format-citation entry format)))
- (insert string))
+ ;; Format the citation and insert it
+ (setq string (if reftex-format-cite-function
+ (funcall reftex-format-cite-function
+ (reftex-get-bib-field "&key" entry)
+ format)
+ (reftex-format-citation entry format)))
+ (insert string))
;; Reposition cursor?
(when (string-match "\\?" string)
- (search-backward "?")
- (delete-char 1))
+ (search-backward "?")
+ (delete-char 1))
;; Tell AUCTeX
- (when (and reftex-mode
- (fboundp 'LaTeX-add-bibitems)
- reftex-plug-into-AUCTeX)
- (apply 'LaTeX-add-bibitems (mapcar 'car selected-entries)))
-
+ (when (and reftex-mode
+ (fboundp 'LaTeX-add-bibitems)
+ reftex-plug-into-AUCTeX)
+ (apply 'LaTeX-add-bibitems (mapcar 'car selected-entries)))
+
;; Produce the cite-view strings
(when (and reftex-mode reftex-cache-cite-echo cite-view)
- (mapcar (lambda (entry)
- (reftex-make-cite-echo-string entry docstruct-symbol))
- selected-entries))
+ (mapcar (lambda (entry)
+ (reftex-make-cite-echo-string entry docstruct-symbol))
+ selected-entries))
(message ""))
(set-marker reftex-select-return-marker nil)
(reftex-kill-buffer "*RefTeX Select*")
-
+
;; Check if the prefix arg was numeric, and call recursively
(when (integerp arg)
(if (> arg 1)
- (progn
- (skip-chars-backward "}")
- (decf arg)
- (reftex-do-citation arg))
- (forward-char 1)))
-
+ (progn
+ (skip-chars-backward "}")
+ (decf arg)
+ (reftex-do-citation arg))
+ (forward-char 1)))
+
;; Return the citation key
(car (car selected-entries))))
;; Check if there is already a cite command at point and change cite format
;; in order to only add another reference in the same cite command.
(let ((macro (car (reftex-what-macro 1)))
- (cite-format-value (reftex-get-cite-format))
- key format)
+ (cite-format-value (reftex-get-cite-format))
+ key format)
(cond
(no-insert
;; Format does not really matter because nothing will be inserted.
(setq format "%l"))
-
+
((and (stringp macro)
- (string-match "\\`\\\\cite\\|cite\\'" macro))
+ (string-match "\\`\\\\cite\\|cite\\'" macro))
;; We are already inside a cite macro
(if (or (not arg) (not (listp arg)))
- (setq format
- (concat
- (if (member (preceding-char) '(?\{ ?,)) "" ",")
- "%l"
- (if (member (following-char) '(?\} ?,)) "" ",")))
- (setq format "%l")))
+ (setq format
+ (concat
+ (if (member (preceding-char) '(?\{ ?,)) "" ",")
+ "%l"
+ (if (member (following-char) '(?\} ?,)) "" ",")))
+ (setq format "%l")))
(t
;; Figure out the correct format
(setq format
(if (and (symbolp cite-format-value)
- (assq cite-format-value reftex-cite-format-builtin))
- (nth 2 (assq cite-format-value reftex-cite-format-builtin))
- cite-format-value))
+ (assq cite-format-value reftex-cite-format-builtin))
+ (nth 2 (assq cite-format-value reftex-cite-format-builtin))
+ cite-format-value))
(when (listp format)
- (setq key
- (or format-key
- (reftex-select-with-char
- "" (concat "SELECT A CITATION FORMAT\n\n"
- (mapconcat
- (lambda (x)
- (format "[%c] %s %s" (car x)
- (if (> (car x) 31) " " "")
- (cdr x)))
- format "\n")))))
- (if (assq key format)
- (setq format (cdr (assq key format)))
- (error "No citation format associated with key `%c'" key)))))
+ (setq key
+ (or format-key
+ (reftex-select-with-char
+ "" (concat "SELECT A CITATION FORMAT\n\n"
+ (mapconcat
+ (lambda (x)
+ (format "[%c] %s %s" (car x)
+ (if (> (car x) 31) " " "")
+ (cdr x)))
+ format "\n")))))
+ (if (assq key format)
+ (setq format (cdr (assq key format)))
+ (error "No citation format associated with key `%c'" key)))))
format))
(defun reftex-citep ()
;; Offer bib menu and return list of selected items
(let ((bibtype (reftex-bib-or-thebib))
- found-list rtn key data selected-entries)
- (while
- (not
- (catch 'done
- ;; Scan bibtex files
- (setq found-list
- (cond
- ((eq bibtype 'bib)
-; ((assq 'bib (symbol-value reftex-docstruct-symbol))
- ;; using BibTeX database files.
- (reftex-extract-bib-entries (reftex-get-bibfile-list)))
- ((eq bibtype 'thebib)
-; ((assq 'thebib (symbol-value reftex-docstruct-symbol))
- ;; using thebibliography environment.
- (reftex-extract-bib-entries-from-thebibliography
- (reftex-uniquify
- (mapcar 'cdr
- (reftex-all-assq
- 'thebib (symbol-value reftex-docstruct-symbol))))))
- (reftex-default-bibliography
- (message "Using default bibliography")
- (reftex-extract-bib-entries (reftex-default-bibliography)))
- (t (error "No valid bibliography in this document, and no default available"))))
-
- (unless found-list
- (error "Sorry, no matches found"))
-
- ;; Remember where we came from
- (setq reftex-call-back-to-this-buffer (current-buffer))
- (set-marker reftex-select-return-marker (point))
-
- ;; Offer selection
- (save-window-excursion
- (delete-other-windows)
- (let ((default-major-mode 'reftex-select-bib-mode))
- (reftex-kill-buffer "*RefTeX Select*")
- (switch-to-buffer-other-window "*RefTeX Select*")
- (unless (eq major-mode 'reftex-select-bib-mode)
- (reftex-select-bib-mode))
- (let ((buffer-read-only nil))
- (erase-buffer)
- (reftex-insert-bib-matches found-list)))
- (setq buffer-read-only t)
- (if (= 0 (buffer-size))
- (error "No matches found"))
- (setq truncate-lines t)
- (goto-char 1)
- (while t
- (setq rtn
- (reftex-select-item
- reftex-citation-prompt
- reftex-citation-help
- reftex-select-bib-map
- nil
- 'reftex-bibtex-selection-callback nil))
- (setq key (car rtn)
- data (nth 1 rtn))
- (unless key (throw 'done t))
- (cond
- ((eq key ?g)
- ;; Start over
- (throw 'done nil))
- ((eq key ?r)
- ;; Restrict with new regular expression
- (setq found-list (reftex-restrict-bib-matches found-list))
- (let ((buffer-read-only nil))
- (erase-buffer)
- (reftex-insert-bib-matches found-list))
- (goto-char 1))
- ((eq key ?A)
- ;; Take all (marked)
- (setq selected-entries
- (if reftex-select-marked
- (mapcar 'car (nreverse reftex-select-marked))
- found-list))
- (throw 'done t))
- ((eq key ?a)
- ;; Take all (marked), and push the symbol 'concat
- (setq selected-entries
- (cons 'concat
- (if reftex-select-marked
- (mapcar 'car (nreverse reftex-select-marked))
- found-list)))
- (throw 'done t))
- ((or (eq key ?\C-m)
- (eq key 'return))
- ;; Take selected
- (setq selected-entries
- (if reftex-select-marked
- (cons 'concat
- (mapcar 'car (nreverse reftex-select-marked)))
- (if data (list data) nil)))
- (throw 'done t))
- ((stringp key)
- ;; Got this one with completion
- (setq selected-entries key)
- (throw 'done t))
- (t
- (ding))))))))
+ found-list rtn key data selected-entries re-list)
+ (while
+ (not
+ (catch 'done
+ ;; Get the search regexps, completing on known citation keys.
+ (setq re-list
+ (let ((default (regexp-quote (reftex-get-bibkey-default))))
+ (split-string
+ (completing-read
+ (concat
+ "Regex { && Regex...}: "
+ "[" default "]: ")
+ (if reftex-mode
+ (if (fboundp 'LaTeX-bibitem-list)
+ (LaTeX-bibitem-list)
+ (cdr (assoc 'bibview-cache
+ (symbol-value reftex-docstruct-symbol))))
+ nil)
+ nil nil nil 'reftex-cite-regexp-hist default)
+ "[ \t]*&&[ \t]*")))
+
+ (if (string-match "\\`[ \t]*\\'" (car re-list))
+ (error "Empty regular expression"))
+
+ ;; Scan bibtex files
+ (setq found-list
+ (cond
+ ((eq bibtype 'bib)
+; ((assq 'bib (symbol-value reftex-docstruct-symbol))
+ ;; using BibTeX database files.
+ (reftex-extract-bib-entries (reftex-get-bibfile-list) re-list))
+ ((eq bibtype 'thebib)
+; ((assq 'thebib (symbol-value reftex-docstruct-symbol))
+ ;; using thebibliography environment.
+ (reftex-extract-bib-entries-from-thebibliography
+ (reftex-uniquify
+ (mapcar 'cdr
+ (reftex-all-assq
+ 'thebib (symbol-value reftex-docstruct-symbol))))
+ re-list))
+ (reftex-default-bibliography
+ (message "Using default bibliography")
+ (reftex-extract-bib-entries (reftex-default-bibliography)
+ re-list))
+ (t (error "No valid bibliography in this document, and no default available"))))
+
+ (unless found-list
+ (error "Sorry, no matches found"))
+
+ ;; Remember where we came from
+ (setq reftex-call-back-to-this-buffer (current-buffer))
+ (set-marker reftex-select-return-marker (point))
+
+ ;; Offer selection
+ (save-window-excursion
+ (delete-other-windows)
+ (let ((default-major-mode 'reftex-select-bib-mode))
+ (reftex-kill-buffer "*RefTeX Select*")
+ (switch-to-buffer-other-window "*RefTeX Select*")
+ (unless (eq major-mode 'reftex-select-bib-mode)
+ (reftex-select-bib-mode))
+ (let ((buffer-read-only nil))
+ (erase-buffer)
+ (reftex-insert-bib-matches found-list)))
+ (setq buffer-read-only t)
+ (if (= 0 (buffer-size))
+ (error "No matches found"))
+ (setq truncate-lines t)
+ (goto-char 1)
+ (while t
+ (setq rtn
+ (reftex-select-item
+ reftex-citation-prompt
+ reftex-citation-help
+ reftex-select-bib-map
+ nil
+ 'reftex-bibtex-selection-callback nil))
+ (setq key (car rtn)
+ data (nth 1 rtn))
+ (unless key (throw 'done t))
+ (cond
+ ((eq key ?g)
+ ;; Start over
+ (throw 'done nil))
+ ((eq key ?r)
+ ;; Restrict with new regular expression
+ (setq found-list (reftex-restrict-bib-matches found-list))
+ (let ((buffer-read-only nil))
+ (erase-buffer)
+ (reftex-insert-bib-matches found-list))
+ (goto-char 1))
+ ((eq key ?A)
+ ;; Take all (marked)
+ (setq selected-entries
+ (if reftex-select-marked
+ (mapcar 'car (nreverse reftex-select-marked))
+ found-list))
+ (throw 'done t))
+ ((eq key ?a)
+ ;; Take all (marked), and push the symbol 'concat
+ (setq selected-entries
+ (cons 'concat
+ (if reftex-select-marked
+ (mapcar 'car (nreverse reftex-select-marked))
+ found-list)))
+ (throw 'done t))
+ ((or (eq key ?\C-m)
+ (eq key 'return))
+ ;; Take selected
+ (setq selected-entries
+ (if reftex-select-marked
+ (cons 'concat
+ (mapcar 'car (nreverse reftex-select-marked)))
+ (if data (list data) nil)))
+ (throw 'done t))
+ ((stringp key)
+ ;; Got this one with completion
+ (setq selected-entries key)
+ (throw 'done t))
+ (t
+ (ding))))))))
selected-entries))
(defun reftex-restrict-bib-matches (found-list)
;; Limit FOUND-LIST with more regular expressions
(let ((re-list (split-string (read-string
- "RegExp [ && RegExp...]: "
- nil 'reftex-cite-regexp-hist)
- "[ \t]*&&[ \t]*"))
- (found-list-r found-list)
- re)
+ "RegExp [ && RegExp...]: "
+ nil 'reftex-cite-regexp-hist)
+ "[ \t]*&&[ \t]*"))
+ (found-list-r found-list)
+ re)
(while (setq re (pop re-list))
(setq found-list-r
- (delq nil
- (mapcar
- (lambda (x)
- (if (string-match
- re (cdr (assoc "&entry" x)))
- x
- nil))
- found-list-r))))
+ (delq nil
+ (mapcar
+ (lambda (x)
+ (if (string-match
+ re (cdr (assoc "&entry" x)))
+ x
+ nil))
+ found-list-r))))
(if found-list-r
- found-list-r
+ found-list-r
(ding)
found-list)))
(defun reftex-insert-bib-matches (list)
;; Insert the bib matches and number them correctly
(let ((mouse-face
- (if (memq reftex-highlight-selection '(mouse both))
- reftex-mouse-selected-face
- nil))
- tmp len)
- (mapcar
+ (if (memq reftex-highlight-selection '(mouse both))
+ reftex-mouse-selected-face
+ nil))
+ tmp len)
+ (mapcar
(lambda (x)
(setq tmp (cdr (assoc "&formatted" x))
- len (length tmp))
+ len (length tmp))
(put-text-property 0 len :data x tmp)
(put-text-property 0 (1- len) 'mouse-face mouse-face tmp)
(insert tmp))
((= l ?A) (car (reftex-get-bib-names "author" entry)))
((= l ?b) (reftex-get-bib-field "booktitle" entry "in: %s"))
((= l ?B) (reftex-abbreviate-title
- (reftex-get-bib-field "booktitle" entry "in: %s")))
+ (reftex-get-bib-field "booktitle" entry "in: %s")))
((= l ?c) (reftex-get-bib-field "chapter" entry))
((= l ?d) (reftex-get-bib-field "edition" entry))
((= l ?e) (reftex-format-names
((= l ?r) (reftex-get-bib-field "address" entry))
((= l ?t) (reftex-get-bib-field "title" entry))
((= l ?T) (reftex-abbreviate-title
- (reftex-get-bib-field "title" entry)))
+ (reftex-get-bib-field "title" entry)))
((= l ?v) (reftex-get-bib-field "volume" entry))
((= l ?y) (reftex-get-bib-field "year" entry)))))
(defun reftex-make-cite-echo-string (entry docstruct-symbol)
;; Format a bibtex entry for the echo area and cache the result.
(let* ((key (reftex-get-bib-field "&key" entry))
- (string
- (let* ((reftex-cite-punctuation '(" " " & " " etal.")))
- (reftex-format-citation entry reftex-cite-view-format)))
- (cache (assq 'bibview-cache (symbol-value docstruct-symbol)))
- (cache-entry (assoc key (cdr cache))))
+ (string
+ (let* ((reftex-cite-punctuation '(" " " & " " etal.")))
+ (reftex-format-citation entry reftex-cite-view-format)))
+ (cache (assq 'bibview-cache (symbol-value docstruct-symbol)))
+ (cache-entry (assoc key (cdr cache))))
(unless cache
;; This docstruct has no cache - make one.
(set docstruct-symbol (cons (cons 'bibview-cache nil)
- (symbol-value docstruct-symbol))))
+ (symbol-value docstruct-symbol))))
(when reftex-cache-cite-echo
(setq key (copy-sequence key))
(set-text-properties 0 (length key) nil key)
(set-text-properties 0 (length string) nil string)
(if cache-entry
- (unless (string= (cdr cache-entry) string)
- (setcdr cache-entry string)
- (put reftex-docstruct-symbol 'modified t))
- (push (cons key string) (cdr cache))
- (put reftex-docstruct-symbol 'modified t)))
+ (unless (string= (cdr cache-entry) string)
+ (setcdr cache-entry string)
+ (put reftex-docstruct-symbol 'modified t))
+ (push (cons key string) (cdr cache))
+ (put reftex-docstruct-symbol 'modified t)))
string))
(defun reftex-bibtex-selection-callback (data ignore no-revisit)
(catch 'exit
(save-excursion
- (set-buffer reftex-call-back-to-this-buffer)
- (setq bibtype (reftex-bib-or-thebib))
- (cond
- ((eq bibtype 'bib)
-; ((assq 'bib (symbol-value reftex-docstruct-symbol))
- (setq bibfile-list (reftex-get-bibfile-list)))
- ((eq bibtype 'thebib)
-; ((assq 'thebib (symbol-value reftex-docstruct-symbol))
- (setq bibfile-list
- (reftex-uniquify
- (mapcar 'cdr
- (reftex-all-assq
- 'thebib (symbol-value reftex-docstruct-symbol))))
- item t))
- (reftex-default-bibliography
- (setq bibfile-list (reftex-default-bibliography)))
- (t (ding) (throw 'exit nil))))
+ (set-buffer reftex-call-back-to-this-buffer)
+ (setq bibtype (reftex-bib-or-thebib))
+ (cond
+ ((eq bibtype 'bib)
+; ((assq 'bib (symbol-value reftex-docstruct-symbol))
+ (setq bibfile-list (reftex-get-bibfile-list)))
+ ((eq bibtype 'thebib)
+; ((assq 'thebib (symbol-value reftex-docstruct-symbol))
+ (setq bibfile-list
+ (reftex-uniquify
+ (mapcar 'cdr
+ (reftex-all-assq
+ 'thebib (symbol-value reftex-docstruct-symbol))))
+ item t))
+ (reftex-default-bibliography
+ (setq bibfile-list (reftex-default-bibliography)))
+ (t (ding) (throw 'exit nil))))
(when no-revisit
- (setq bibfile-list (reftex-visited-files bibfile-list)))
+ (setq bibfile-list (reftex-visited-files bibfile-list)))
(condition-case nil
- (reftex-pop-to-bibtex-entry
- key bibfile-list (not reftex-keep-temporary-buffers) t item)
- (error (ding))))
-
+ (reftex-pop-to-bibtex-entry
+ key bibfile-list (not reftex-keep-temporary-buffers) t item)
+ (error (ding))))
+
(select-window win)))
-;;; arch-tag: d53d0a5a-ab32-4b52-a846-2a7c3527cd89
;;; reftex-cite.el ends here
;;; reftex-dcr.el --- viewing cross references and citations with RefTeX
-;; Copyright (c) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
+;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
-;; Version: 4.21
+;; Version: 4.18
;;
;; This file is part of GNU Emacs.
;; See where we are.
(let* ((macro (car (reftex-what-macro-safe 1)))
(key (reftex-this-word "^{}%\n\r, \t"))
- dw)
+ dw)
(if (or (null macro) (reftex-in-comment))
- (error "Not on a crossref macro argument"))
+ (error "Not on a crossref macro argument"))
(setq reftex-call-back-to-this-buffer (current-buffer))
(setq dw (reftex-view-cr-ref arg key auto-how)))
(auto-how nil) ;; No further action for automatic display (speed)
((or (equal macro "\\label")
- (member macro reftex-macros-with-labels))
+ (member macro reftex-macros-with-labels))
;; A label macro: search for reference macros
(reftex-access-scan-info arg)
(setq dw (reftex-view-regexp-match
- (format reftex-find-reference-format (regexp-quote key))
- 4 nil nil)))
+ (format reftex-find-reference-format (regexp-quote key))
+ 4 nil nil)))
((equal macro "\\bibitem")
;; A bibitem macro: search for citations
(reftex-access-scan-info arg)
(setq dw (reftex-view-regexp-match
- (format reftex-find-citation-regexp-format (regexp-quote key))
- 4 nil nil)))
+ (format reftex-find-citation-regexp-format (regexp-quote key))
+ 4 nil nil)))
((member macro reftex-macros-with-index)
(reftex-access-scan-info arg)
(setq dw (reftex-view-regexp-match
- (format reftex-find-index-entry-regexp-format
- (regexp-quote key))
- 3 nil nil)))
- (t
+ (format reftex-find-index-entry-regexp-format
+ (regexp-quote key))
+ 3 nil nil)))
+ (t
(reftex-access-scan-info arg)
(catch 'exit
- (let ((list reftex-view-crossref-extra)
- entry mre action group)
- (while (setq entry (pop list))
- (setq mre (car entry)
- action (nth 1 entry)
- group (nth 2 entry))
- (when (string-match mre macro)
- (setq dw (reftex-view-regexp-match
- (format action key) group nil nil))
- (throw 'exit t))))
- (error "Not on a crossref macro argument"))))
+ (let ((list reftex-view-crossref-extra)
+ entry mre action group)
+ (while (setq entry (pop list))
+ (setq mre (car entry)
+ action (nth 1 entry)
+ group (nth 2 entry))
+ (when (string-match mre macro)
+ (setq dw (reftex-view-regexp-match
+ (format action key) group nil nil))
+ (throw 'exit t))))
+ (error "Not on a crossref macro argument"))))
(if (and (eq arg 2) (windowp dw)) (select-window dw))))
-
+
(defun reftex-view-cr-cite (arg key how)
- ;; View crossreference of a ref cite. HOW can have the values
+ ;; View crossreference of a ref cite. HOW can have the values
;; nil: Show in another window.
;; echo: Show one-line info in echo area.
;; tmp-window: Show in small window and arrange for window to disappear.
(if (eq how 'tmp-window)
;; Remember the window configuration
- (put 'reftex-auto-view-crossref 'last-window-conf
- (current-window-configuration)))
+ (put 'reftex-auto-view-crossref 'last-window-conf
+ (current-window-configuration)))
(let (files size item (pos (point)) (win (selected-window)) pop-win
- (bibtype (reftex-bib-or-thebib)))
+ (bibtype (reftex-bib-or-thebib)))
;; Find the citation mode and the file list
(cond
; ((assq 'bib (symbol-value reftex-docstruct-symbol))
((eq bibtype 'bib)
(setq item nil
- files (reftex-get-bibfile-list)))
+ files (reftex-get-bibfile-list)))
; ((assq 'thebib (symbol-value reftex-docstruct-symbol))
((eq bibtype 'thebib)
(setq item t
- files (reftex-uniquify
- (mapcar 'cdr
- (reftex-all-assq
- 'thebib (symbol-value reftex-docstruct-symbol))))))
+ files (reftex-uniquify
+ (mapcar 'cdr
+ (reftex-all-assq
+ 'thebib (symbol-value reftex-docstruct-symbol))))))
(reftex-default-bibliography
(setq item nil
- files (reftex-default-bibliography)))
+ files (reftex-default-bibliography)))
(how) ;; don't throw for special display
(t (error "Cannot display crossref")))
(if (eq how 'echo)
- ;; Display in Echo area
- (reftex-echo-cite key files item)
+ ;; Display in Echo area
+ (reftex-echo-cite key files item)
;; Display in a window
(if (not (eq how 'tmp-window))
- ;; Normal display
- (reftex-pop-to-bibtex-entry key files nil t item)
- ;; A temporary window
- (condition-case nil
- (reftex-pop-to-bibtex-entry key files nil t item)
- (error (goto-char pos)
- (message "cite: no such citation key %s" key)
- (error "")))
- ;; Resize the window
- (setq size (max 1 (count-lines (point)
- (reftex-end-of-bib-entry item))))
- (let ((window-min-height 2))
- (shrink-window (1- (- (window-height) size)))
- (recenter 0))
- ;; Arrange restoration
- (add-hook 'pre-command-hook 'reftex-restore-window-conf))
-
- ;; Normal display in other window
+ ;; Normal display
+ (reftex-pop-to-bibtex-entry key files nil t item)
+ ;; A temporary window
+ (condition-case nil
+ (reftex-pop-to-bibtex-entry key files nil t item)
+ (error (goto-char pos)
+ (message "cite: no such citation key %s" key)
+ (error "")))
+ ;; Resize the window
+ (setq size (max 1 (count-lines (point)
+ (reftex-end-of-bib-entry item))))
+ (let ((window-min-height 2))
+ (shrink-window (1- (- (window-height) size)))
+ (recenter 0))
+ ;; Arrange restoration
+ (add-hook 'pre-command-hook 'reftex-restore-window-conf))
+
+ ;; Normal display in other window
(add-hook 'pre-command-hook 'reftex-highlight-shall-die)
(setq pop-win (selected-window))
(select-window win)
(goto-char pos)
(when (equal arg 2)
- (select-window pop-win)))))
+ (select-window pop-win)))))
(defun reftex-view-cr-ref (arg label how)
- ;; View crossreference of a ref macro. HOW can have the values
+ ;; View crossreference of a ref macro. HOW can have the values
;; nil: Show in another window.
;; echo: Show one-line info in echo area.
;; tmp-window: Show in small window and arrange for window to disappear.
;; Ensure access to scanning info
(reftex-access-scan-info (or arg current-prefix-arg))
-
+
(if (eq how 'tmp-window)
;; Remember the window configuration
- (put 'reftex-auto-view-crossref 'last-window-conf
- (current-window-configuration)))
+ (put 'reftex-auto-view-crossref 'last-window-conf
+ (current-window-configuration)))
(let* ((xr-data (assoc 'xr (symbol-value reftex-docstruct-symbol)))
- (xr-re (nth 2 xr-data))
- (entry (assoc label (symbol-value reftex-docstruct-symbol)))
- (win (selected-window)) pop-win (pos (point)))
+ (xr-re (nth 2 xr-data))
+ (entry (assoc label (symbol-value reftex-docstruct-symbol)))
+ (win (selected-window)) pop-win (pos (point)))
(if (and (not entry) (stringp label) xr-re (string-match xr-re label))
- ;; Label is defined in external document
- (save-excursion
- (save-match-data
- (set-buffer
- (or (reftex-get-file-buffer-force
- (cdr (assoc (match-string 1 label) (nth 1
- xr-data))))
- (error "Problem with external label %s" label))))
- (setq label (substring label (match-end 1)))
- (reftex-access-scan-info)
- (setq entry
- (assoc label (symbol-value reftex-docstruct-symbol)))))
+ ;; Label is defined in external document
+ (save-excursion
+ (save-match-data
+ (set-buffer
+ (or (reftex-get-file-buffer-force
+ (cdr (assoc (match-string 1 label) (nth 1
+ xr-data))))
+ (error "Problem with external label %s" label))))
+ (setq label (substring label (match-end 1)))
+ (reftex-access-scan-info)
+ (setq entry
+ (assoc label (symbol-value reftex-docstruct-symbol)))))
(if (eq how 'echo)
- ;; Display in echo area
- (reftex-echo-ref label entry (symbol-value reftex-docstruct-symbol))
+ ;; Display in echo area
+ (reftex-echo-ref label entry (symbol-value reftex-docstruct-symbol))
(let ((window-conf (current-window-configuration)))
- (condition-case nil
- (reftex-show-label-location entry t nil t t)
- (error (set-window-configuration window-conf)
- (message "ref: Label %s not found" label)
- (error "ref: Label %s not found" label)))) ;; 2nd is line OK
+ (condition-case nil
+ (reftex-show-label-location entry t nil t t)
+ (error (set-window-configuration window-conf)
+ (message "ref: Label %s not found" label)
+ (error "ref: Label %s not found" label)))) ;; 2nd is line OK
(add-hook 'pre-command-hook 'reftex-highlight-shall-die)
(when (eq how 'tmp-window)
- ;; Resize window and arrange restauration
- (shrink-window (1- (- (window-height) 9)))
- (recenter '(4))
- (add-hook 'pre-command-hook 'reftex-restore-window-conf))
+ ;; Resize window and arrange restauration
+ (shrink-window (1- (- (window-height) 9)))
+ (recenter '(4))
+ (add-hook 'pre-command-hook 'reftex-restore-window-conf))
(setq pop-win (selected-window))
(select-window win)
(goto-char pos)
(when (equal arg 2)
- (select-window pop-win)))))
+ (select-window pop-win)))))
(defun reftex-mouse-view-crossref (ev)
"View cross reference of \\ref or \\cite macro where you click.
(or (eq reftex-auto-view-crossref 'window) (not (current-message)))
;; Make sure we are not already displaying this one
(not (memq last-command '(reftex-view-crossref
- reftex-mouse-view-crossref)))
+ reftex-mouse-view-crossref)))
;; Quick precheck if this might be a relevant spot
;; FIXME: Can fail with backslash in comment
- (save-excursion
- (search-backward "\\" nil t)
- (looking-at "\\\\[a-zA-Z]*\\(cite\\|ref\\|bibentry\\)"))
+ (save-excursion
+ (search-backward "\\" nil t)
+ (looking-at "\\\\[a-zA-Z]*\\(cite\\|ref\\|bibentry\\)"))
(condition-case nil
- (let ((current-prefix-arg nil))
- (cond
- ((eq reftex-auto-view-crossref t)
- (reftex-view-crossref -1 'echo))
- ((eq reftex-auto-view-crossref 'window)
- (reftex-view-crossref -1 'tmp-window))
- (t nil)))
- (error nil))))
+ (let ((current-prefix-arg nil))
+ (cond
+ ((eq reftex-auto-view-crossref t)
+ (reftex-view-crossref -1 'echo))
+ ((eq reftex-auto-view-crossref 'window)
+ (reftex-view-crossref -1 'tmp-window))
+ (t nil)))
+ (error nil))))
(defun reftex-restore-window-conf ()
(set-window-configuration (get 'reftex-auto-view-crossref 'last-window-conf))
(put 'reftex-auto-view-crossref 'last-window-conf nil)
(remove-hook 'pre-command-hook 'reftex-restore-window-conf))
-
+
(defun reftex-echo-ref (label entry docstruct)
;; Display crossref info in echo area.
(cond
(message "ref(%s): %s" (nth 1 entry) (nth 2 entry)))
(let ((buf (get-buffer " *Echo Area*")))
(when buf
- (save-excursion
- (set-buffer buf)
- (run-hooks 'reftex-display-copied-context-hook)))))))
+ (save-excursion
+ (set-buffer buf)
+ (run-hooks 'reftex-display-copied-context-hook)))))))
(defun reftex-echo-cite (key files item)
;; Display citation info in echo area.
(let* ((cache (assq 'bibview-cache (symbol-value reftex-docstruct-symbol)))
- (cache-entry (assoc key (cdr cache)))
- entry string buf (all-files files))
+ (cache-entry (assoc key (cdr cache)))
+ entry string buf (all-files files))
(if (and reftex-cache-cite-echo cache-entry)
- ;; We can just use the cache
- (setq string (cdr cache-entry))
+ ;; We can just use the cache
+ (setq string (cdr cache-entry))
;; Need to look in the database
(unless reftex-revisit-to-echo
- (setq files (reftex-visited-files files)))
-
- (setq entry
- (condition-case nil
- (save-excursion
- (reftex-pop-to-bibtex-entry key files nil nil item t))
- (error
- (if (and files (= (length all-files) (length files)))
- (message "cite: no such database entry: %s" key)
- (message (substitute-command-keys
- (format reftex-no-info-message "cite"))))
- nil)))
+ (setq files (reftex-visited-files files)))
+
+ (setq entry
+ (condition-case nil
+ (save-excursion
+ (reftex-pop-to-bibtex-entry key files nil nil item t))
+ (error
+ (if (and files (= (length all-files) (length files)))
+ (message "cite: no such database entry: %s" key)
+ (message (substitute-command-keys
+ (format reftex-no-info-message "cite"))))
+ nil)))
(when entry
- (if item
- (setq string (reftex-nicify-text entry))
- (setq string (reftex-make-cite-echo-string
- (reftex-parse-bibtex-entry entry)
- reftex-docstruct-symbol)))))
+ (if item
+ (setq string (reftex-nicify-text entry))
+ (setq string (reftex-make-cite-echo-string
+ (reftex-parse-bibtex-entry entry)
+ reftex-docstruct-symbol)))))
(unless (or (null string) (equal string ""))
(message "cite: %s" string))
(when (setq buf (get-buffer " *Echo Area*"))
(save-excursion
- (set-buffer buf)
- (run-hooks 'reftex-display-copied-context-hook)))))
+ (set-buffer buf)
+ (run-hooks 'reftex-display-copied-context-hook)))))
(defvar reftex-use-itimer-in-xemacs nil
"*Non-nil means use the idle timers in XEmacs for crossref display.
(interactive)
(if reftex-auto-view-crossref-timer
(progn
- (if (featurep 'xemacs)
- (if reftex-use-itimer-in-xemacs
- (delete-itimer reftex-auto-view-crossref-timer)
- (remove-hook 'post-command-hook 'reftex-start-itimer-once))
- (cancel-timer reftex-auto-view-crossref-timer))
- (setq reftex-auto-view-crossref-timer nil)
- (message "Automatic display of crossref information was turned off"))
+ (if (featurep 'xemacs)
+ (if reftex-use-itimer-in-xemacs
+ (delete-itimer reftex-auto-view-crossref-timer)
+ (remove-hook 'post-command-hook 'reftex-start-itimer-once))
+ (cancel-timer reftex-auto-view-crossref-timer))
+ (setq reftex-auto-view-crossref-timer nil)
+ (message "Automatic display of crossref information was turned off"))
(setq reftex-auto-view-crossref-timer
- (if (featurep 'xemacs)
- (if reftex-use-itimer-in-xemacs
- (start-itimer "RefTeX Idle Timer"
- 'reftex-view-crossref-when-idle
- reftex-idle-time reftex-idle-time t)
- (add-hook 'post-command-hook 'reftex-start-itimer-once)
- t)
- (run-with-idle-timer
- reftex-idle-time t 'reftex-view-crossref-when-idle)))
+ (if (featurep 'xemacs)
+ (if reftex-use-itimer-in-xemacs
+ (start-itimer "RefTeX Idle Timer"
+ 'reftex-view-crossref-when-idle
+ reftex-idle-time reftex-idle-time t)
+ (add-hook 'post-command-hook 'reftex-start-itimer-once)
+ t)
+ (run-with-idle-timer
+ reftex-idle-time t 'reftex-view-crossref-when-idle)))
(unless reftex-auto-view-crossref
(setq reftex-auto-view-crossref t))
(message "Automatic display of crossref information was turned on")))
(defun reftex-start-itimer-once ()
(and reftex-mode
- (not (itimer-live-p reftex-auto-view-crossref-timer))
- (setq reftex-auto-view-crossref-timer
- (start-itimer "RefTeX Idle Timer"
- 'reftex-view-crossref-when-idle
- reftex-idle-time nil t))))
+ (not (itimer-live-p reftex-auto-view-crossref-timer))
+ (setq reftex-auto-view-crossref-timer
+ (start-itimer "RefTeX Idle Timer"
+ 'reftex-view-crossref-when-idle
+ reftex-idle-time nil t))))
(defun reftex-view-crossref-from-bibtex (&optional arg)
"View location in a LaTeX document which cites the BibTeX entry at point.
link to a document, call the function with with a prefix arg.
Calling this function several times find successive citation locations."
(interactive "P")
- (when arg
+ (when arg
;; Break connection to reference buffer
(put 'reftex-bibtex-view-cite-locations :ref-buffer nil))
(let ((ref-buffer (get 'reftex-bibtex-view-cite-locations :ref-buffer)))
;; Establish connection to reference buffer
(unless ref-buffer
(setq ref-buffer
- (save-excursion
- (completing-read
- "Reference buffer: "
- (delq nil
- (mapcar
- (lambda (b)
- (set-buffer b)
- (if reftex-mode (list (buffer-name b)) nil))
- (buffer-list)))
- nil t)))
+ (save-excursion
+ (completing-read
+ "Reference buffer: "
+ (delq nil
+ (mapcar
+ (lambda (b)
+ (set-buffer b)
+ (if reftex-mode (list (buffer-name b)) nil))
+ (buffer-list)))
+ nil t)))
(put 'reftex-bibtex-view-cite-locations :ref-buffer ref-buffer))
;; Search for citations
(bibtex-beginning-of-entry)
(if (looking-at
- "@[a-zA-Z]+[ \t\n\r]*[{(][ \t\n\r]*\\([^, \t\r\n}]+\\)")
- (progn
- (goto-char (match-beginning 1))
- (reftex-view-regexp-match
- (format reftex-find-citation-regexp-format
- (regexp-quote (match-string 1)))
- 4 arg ref-buffer))
+ "@[a-zA-Z]+[ \t\n\r]*[{(][ \t\n\r]*\\([^, \t\r\n}]+\\)")
+ (progn
+ (goto-char (match-beginning 1))
+ (reftex-view-regexp-match
+ (format reftex-find-citation-regexp-format
+ (regexp-quote (match-string 1)))
+ 4 arg ref-buffer))
(error "Cannot find citation key in BibTeX entry"))))
(defun reftex-view-regexp-match (re &optional highlight-group new ref-buffer)
;;; Decide if new search or continued search
(let* ((oldprop (get 'reftex-view-regexp-match :props))
- (newprop (list (current-buffer) re))
- (cont (and (not new) (equal oldprop newprop)))
- (cnt (if cont (get 'reftex-view-regexp-match :cnt) 0))
- (current-window (selected-window))
- (window-conf (current-window-configuration))
- match pop-window)
+ (newprop (list (current-buffer) re))
+ (cont (and (not new) (equal oldprop newprop)))
+ (cnt (if cont (get 'reftex-view-regexp-match :cnt) 0))
+ (current-window (selected-window))
+ (window-conf (current-window-configuration))
+ match pop-window)
(switch-to-buffer-other-window (or ref-buffer (current-buffer)))
;; Search
(condition-case nil
- (if cont
- (setq match (reftex-global-search-continue))
- (reftex-access-scan-info)
- (setq match (reftex-global-search re (reftex-all-document-files))))
+ (if cont
+ (setq match (reftex-global-search-continue))
+ (reftex-access-scan-info)
+ (setq match (reftex-global-search re (reftex-all-document-files))))
(error nil))
;; Evaluate the match.
(if match
- (progn
- (put 'reftex-view-regexp-match :props newprop)
- (put 'reftex-view-regexp-match :cnt (incf cnt))
- (reftex-highlight 0 (match-beginning highlight-group)
- (match-end highlight-group))
- (add-hook 'pre-command-hook 'reftex-highlight-shall-die)
- (setq pop-window (selected-window)))
+ (progn
+ (put 'reftex-view-regexp-match :props newprop)
+ (put 'reftex-view-regexp-match :cnt (incf cnt))
+ (reftex-highlight 0 (match-beginning highlight-group)
+ (match-end highlight-group))
+ (add-hook 'pre-command-hook 'reftex-highlight-shall-die)
+ (setq pop-window (selected-window)))
(put 'reftex-view-regexp-match :props nil)
(or cont (set-window-configuration window-conf)))
(select-window current-window)
(if match
- (progn
- (message "Match Nr. %s" cnt)
- pop-window)
+ (progn
+ (message "Match Nr. %s" cnt)
+ pop-window)
(if cont
- (error "No further matches (total number of matches: %d)" cnt)
- (error "No matches")))))
+ (error "No further matches (total number of matches: %d)" cnt)
+ (error "No matches")))))
(defvar reftex-global-search-marker (make-marker))
(defun reftex-global-search (regexp file-list)
(unless (get 'reftex-global-search :file-list)
(error "No global search to continue"))
(let* ((file-list (get 'reftex-global-search :file-list))
- (regexp (get 'reftex-global-search :regexp))
- (buf (or (marker-buffer reftex-global-search-marker)
- (reftex-get-file-buffer-force (car file-list))))
- (pos (or (marker-position reftex-global-search-marker) 1))
- file)
+ (regexp (get 'reftex-global-search :regexp))
+ (buf (or (marker-buffer reftex-global-search-marker)
+ (reftex-get-file-buffer-force (car file-list))))
+ (pos (or (marker-position reftex-global-search-marker) 1))
+ file)
;; Take up starting position
(unless buf (error "No such buffer %s" buf))
(switch-to-buffer buf)
(goto-char pos)
;; Search and switch file if necessary
(if (catch 'exit
- (while t
- (when (re-search-forward regexp nil t)
- (move-marker reftex-global-search-marker (point))
- (throw 'exit t))
- ;; No match - goto next file
- (pop file-list)
- (or file-list (throw 'exit nil))
- (setq file (car file-list)
- buf (reftex-get-file-buffer-force file))
- (unless buf (error "Cannot access file %s" file))
- (put 'reftex-global-search :file-list file-list)
- (switch-to-buffer buf)
- (widen)
- (goto-char 1)))
- t
+ (while t
+ (when (re-search-forward regexp nil t)
+ (move-marker reftex-global-search-marker (point))
+ (throw 'exit t))
+ ;; No match - goto next file
+ (pop file-list)
+ (or file-list (throw 'exit nil))
+ (setq file (car file-list)
+ buf (reftex-get-file-buffer-force file))
+ (unless buf (error "Cannot access file %s" file))
+ (put 'reftex-global-search :file-list file-list)
+ (switch-to-buffer buf)
+ (widen)
+ (goto-char 1)))
+ t
(move-marker reftex-global-search-marker nil)
(error "All files processed"))))
-;;; arch-tag: d2f52b56-744e-44ad-830d-1fc193b90eda
;;; reftex-dcr.el ends here
;;; reftex-global.el --- operations on entire documents with RefTeX
-;; Copyright (c) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
+;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
-;; Version: 4.21
+;; Version: 4.18
;; This file is part of GNU Emacs.
(reftex-access-scan-info t)
(let ((master (reftex-TeX-master-file))
- (cnt 0)
+ (cnt 0)
(dlist
(mapcar
- (lambda (x)
- (let (x1)
- (cond
- ((memq (car x)
- '(toc bof eof bib thebib label-numbers xr xr-doc
- master-dir file-error bibview-cache appendix
- is-multi index))
- nil)
- (t
- (setq x1 (reftex-all-assoc-string
- (car x) (symbol-value reftex-docstruct-symbol)))
- (if (< 1 (length x1))
- (append (list (car x))
- (mapcar (lambda(x)
- (abbreviate-file-name (nth 3 x)))
- x1))
- (list nil))))))
+ (lambda (x)
+ (let (x1)
+ (cond
+ ((memq (car x)
+ '(toc bof eof bib thebib label-numbers xr xr-doc
+ master-dir file-error bibview-cache appendix
+ is-multi index))
+ nil)
+ (t
+ (setq x1 (reftex-all-assoc-string
+ (car x) (symbol-value reftex-docstruct-symbol)))
+ (if (< 1 (length x1))
+ (append (list (car x))
+ (mapcar (lambda(x)
+ (abbreviate-file-name (nth 3 x)))
+ x1))
+ (list nil))))))
(reftex-uniquify-by-car (symbol-value reftex-docstruct-symbol)))))
(setq dlist (reftex-uniquify-by-car dlist))
(set (make-local-variable 'TeX-master) master)
(erase-buffer)
(insert " MULTIPLE LABELS IN CURRENT DOCUMENT:\n")
- (insert
+ (insert
" Move point to label and type `r' to run a query-replace on the label\n"
" and its references. Type `q' to exit this buffer.\n\n")
(insert " LABEL FILE\n")
(insert " -------------------------------------------------------------\n")
(use-local-map (make-sparse-keymap))
(local-set-key [?q] (lambda () "Kill this buffer." (interactive)
- (kill-buffer (current-buffer)) (delete-window)))
+ (kill-buffer (current-buffer)) (delete-window)))
(local-set-key [?r] 'reftex-change-label)
(while dlist
(when (and (car (car dlist))
(cdr (car dlist)))
- (incf cnt)
+ (incf cnt)
(insert (mapconcat 'identity (car dlist) "\n ") "\n"))
(pop dlist))
(goto-char (point-min))
(message "Document does not contain duplicate labels."))))
(defun reftex-change-label (&optional from to)
- "Run `query-replace-regexp' of FROM with TO in all macro arguments.
+ "Run `query-replace-regexp' of FROM with TO in all \\label and \\ref commands.
Works on the entire multifile document.
If you exit (\\[keyboard-quit], RET or q), you can resume the query replace
with the command \\[tags-loop-continue].
(setq to (read-string (format "Replace label %s with: "
from))))
(reftex-query-replace-document
- (concat "{" (regexp-quote from) "}")
- (format "{%s}" to))))
+ (concat "\\\\\\(label\\|[a-zA-Z]*ref\\){" (regexp-quote from) "}")
+ (format "\\\\\\1{%s}" to))))
(defun reftex-renumber-simple-labels ()
"Renumber all simple labels in the document to make them sequentially.
(reftex-access-scan-info 1)
;; Get some insurance
(if (and (reftex-is-multi)
- (not (yes-or-no-p "Replacing all simple labels in multiple files is risky. Continue? ")))
+ (not (yes-or-no-p "Replacing all simple labels in multiple files is risky. Continue? ")))
(error "Abort"))
;; Make the translation list
- (let* ((re-core (concat "\\("
- (mapconcat 'cdr reftex-typekey-to-prefix-alist "\\|")
- "\\)"))
- (label-re (concat "\\`" re-core "\\([0-9]+\\)\\'"))
- (search-re (concat "[{,]\\(" re-core "\\([0-9]+\\)\\)[,}]"))
- (error-fmt "Undefined label or reference %s. Ignore and continue? ")
- (label-numbers-alist (mapcar (lambda (x) (cons (cdr x) 0))
- reftex-typekey-to-prefix-alist))
- (files (reftex-all-document-files))
- (list (symbol-value reftex-docstruct-symbol))
- translate-alist n entry label new-label nr-cell changed-sequence)
+ (let* ((re-core (concat "\\("
+ (mapconcat 'cdr reftex-typekey-to-prefix-alist "\\|")
+ "\\)"))
+ (label-re (concat "\\`" re-core "\\([0-9]+\\)\\'"))
+ (search-re (concat "[{,]\\(" re-core "\\([0-9]+\\)\\)[,}]"))
+ (error-fmt "Undefined label or reference %s. Ignore and continue? ")
+ (label-numbers-alist (mapcar (lambda (x) (cons (cdr x) 0))
+ reftex-typekey-to-prefix-alist))
+ (files (reftex-all-document-files))
+ (list (symbol-value reftex-docstruct-symbol))
+ translate-alist n entry label new-label nr-cell changed-sequence)
(while (setq entry (pop list))
(when (and (stringp (car entry))
- (string-match label-re (car entry)))
- (setq label (car entry)
- nr-cell (assoc (match-string 1 (car entry))
- label-numbers-alist))
- (if (assoc label translate-alist)
- (error "Duplicate label %s" label))
- (setq new-label (concat (match-string 1 (car entry))
- (int-to-string (incf (cdr nr-cell)))))
- (push (cons label new-label) translate-alist)
- (or (string= label new-label) (setq changed-sequence t))))
+ (string-match label-re (car entry)))
+ (setq label (car entry)
+ nr-cell (assoc (match-string 1 (car entry))
+ label-numbers-alist))
+ (if (assoc label translate-alist)
+ (error "Duplicate label %s" label))
+ (setq new-label (concat (match-string 1 (car entry))
+ (int-to-string (incf (cdr nr-cell)))))
+ (push (cons label new-label) translate-alist)
+ (or (string= label new-label) (setq changed-sequence t))))
(unless changed-sequence
(error "Simple labels are already in correct sequence"))
(reftex-save-all-document-buffers)
;; First test to check for erros
- (setq n (reftex-translate
- files search-re translate-alist error-fmt 'test))
+ (setq n (reftex-translate
+ files search-re translate-alist error-fmt 'test))
;; Now the real thing.
- (if (yes-or-no-p
- (format "Replace %d items at %d places in %d files? "
- (length translate-alist) n (length files)))
- (progn
- (let ((inhibit-quit t)) ;; Do not disturb...
- (reftex-translate
- files search-re translate-alist error-fmt nil)
- (setq quit-flag nil))
- (if (and (reftex-is-multi)
- (yes-or-no-p "Save entire document? "))
- (reftex-save-all-document-buffers))
- ;; Rescan again...
- (reftex-access-scan-info 1)
- (message "Done replacing simple labels."))
+ (if (yes-or-no-p
+ (format "Replace %d items at %d places in %d files? "
+ (length translate-alist) n (length files)))
+ (progn
+ (let ((inhibit-quit t)) ;; Do not disturb...
+ (reftex-translate
+ files search-re translate-alist error-fmt nil)
+ (setq quit-flag nil))
+ (if (and (reftex-is-multi)
+ (yes-or-no-p "Save entire document? "))
+ (reftex-save-all-document-buffers))
+ ;; Rescan again...
+ (reftex-access-scan-info 1)
+ (message "Done replacing simple labels."))
(message "No replacements done"))))
(defun reftex-translate (files search-re translate-alist error-fmt test)
;; In FILES, look for SEARCH-RE and replace match 1 of it with
- ;; its association in TRANSLATE-ALSIT.
+ ;; its association in TRANSLATE-ALSIT.
;; If we do not find an association and TEST is non-nil, query
- ;; to ignore the problematic string.
+ ;; to ignore the problematic string.
;; If TEST is nil, it is ignored without query.
;; Return the number of replacements.
(let ((n 0) file label match-data buf macro pos cell)
(while (setq file (pop files))
(setq buf (reftex-get-file-buffer-force file))
(unless buf
- (error "No such file %s" file))
+ (error "No such file %s" file))
(set-buffer buf)
(save-excursion
- (save-restriction
- (widen)
- (goto-char (point-min))
- (while (re-search-forward search-re nil t)
- (backward-char)
- (save-excursion
- (setq label (reftex-match-string 1)
- cell (assoc label translate-alist)
- match-data (match-data)
- macro (reftex-what-macro 1)
- pos (cdr macro))
- (goto-char (or pos (point)))
- (when (and macro
- (or (looking-at "\\\\ref")
- (looking-at "\\\\[a-zA-Z]*ref\\(range\\)?[^a-zA-Z]")
- (looking-at "\\\\ref[a-zA-Z]*[^a-zA-Z]")
- (looking-at (format
- reftex-find-label-regexp-format
- (regexp-quote label)))))
- ;; OK, we should replace it.
- (set-match-data match-data)
- (cond
- ((and test (not cell))
- ;; We've got a problem
- (unwind-protect
- (progn
- (reftex-highlight 1 (match-beginning 0) (match-end 0))
- (ding)
- (or (y-or-n-p (format error-fmt label))
- (error "Abort")))
- (reftex-unhighlight 1)))
- ((and test cell)
- (incf n))
- ((and (not test) cell)
- ;; Replace
- (goto-char (match-beginning 1))
- (delete-region (match-beginning 1) (match-end 1))
- (insert (cdr cell)))
- (t nil))))))))
+ (save-restriction
+ (widen)
+ (goto-char (point-min))
+ (while (re-search-forward search-re nil t)
+ (backward-char)
+ (save-excursion
+ (setq label (reftex-match-string 1)
+ cell (assoc label translate-alist)
+ match-data (match-data)
+ macro (reftex-what-macro 1)
+ pos (cdr macro))
+ (goto-char (or pos (point)))
+ (when (and macro
+ (or (looking-at "\\\\ref")
+ (looking-at "\\\\[a-zA-Z]*ref\\(range\\)?[^a-zA-Z]")
+ (looking-at "\\\\ref[a-zA-Z]*[^a-zA-Z]")
+ (looking-at (format
+ reftex-find-label-regexp-format
+ (regexp-quote label)))))
+ ;; OK, we should replace it.
+ (set-match-data match-data)
+ (cond
+ ((and test (not cell))
+ ;; We've got a problem
+ (unwind-protect
+ (progn
+ (reftex-highlight 1 (match-beginning 0) (match-end 0))
+ (ding)
+ (or (y-or-n-p (format error-fmt label))
+ (error "Abort")))
+ (reftex-unhighlight 1)))
+ ((and test cell)
+ (incf n))
+ ((and (not test) cell)
+ ;; Replace
+ (goto-char (match-beginning 1))
+ (delete-region (match-beginning 1) (match-end 1))
+ (insert (cdr cell)))
+ (t nil))))))))
n))
(defun reftex-save-all-document-buffers ()
labels."
(interactive)
(let ((files (reftex-all-document-files))
- file buffer)
+ file buffer)
(save-excursion
(while (setq file (pop files))
- (setq buffer (reftex-get-buffer-visiting file))
- (when buffer
- (set-buffer buffer)
- (save-buffer))))))
+ (setq buffer (reftex-get-buffer-visiting file))
+ (when buffer
+ (set-buffer buffer)
+ (save-buffer))))))
(defun reftex-ensure-write-access (files)
"Make sure we have write access to all files in FILES.
(let (file buf)
(while (setq file (pop files))
(unless (file-exists-p file)
- (ding)
- (or (y-or-n-p (format "No such file %s. Continue? " file))
- (error "Abort")))
+ (ding)
+ (or (y-or-n-p (format "No such file %s. Continue? " file))
+ (error "Abort")))
(unless (file-writable-p file)
- (ding)
- (or (y-or-n-p (format "No write access to %s. Continue? " file))
- (error "Abort")))
+ (ding)
+ (or (y-or-n-p (format "No write access to %s. Continue? " file))
+ (error "Abort")))
(when (and (setq buf (reftex-get-buffer-visiting file))
- (save-excursion
- (set-buffer buf)
- buffer-read-only))
- (ding)
- (or (y-or-n-p (format "Buffer %s is read-only. Continue? "
- (buffer-name buf)))
- (error "Abort"))))))
-
-;;; arch-tag: 2dbf7633-92c8-4340-8656-7aa019d0f80d
+ (save-excursion
+ (set-buffer buf)
+ buffer-read-only))
+ (ding)
+ (or (y-or-n-p (format "Buffer %s is read-only. Continue? "
+ (buffer-name buf)))
+ (error "Abort"))))))
+
;;; reftex-global.el ends here
;;; reftex-index.el --- index support with RefTeX
-;; Copyright (c) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
+;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
-;; Version: 4.21
+;; Version: 4.18
;; This file is part of GNU Emacs.
`reftex-index-math-format', which see."
(interactive "P")
(let* ((use-default (not (equal arg '(16)))) ; check for double prefix
- ;; check if we have an active selection
- (active (if (boundp 'zmacs-regions)
- (and zmacs-regions (region-exists-p)) ; XEmacs
- (and transient-mark-mode mark-active))) ; Emacs
- (beg (if active
- (region-beginning)
- (save-excursion
- (skip-syntax-backward "w\\") (point))))
- (end (if active
- (region-end)
- (save-excursion
- (skip-syntax-forward "w\\") (point))))
- (sel (buffer-substring beg end))
- (mathp (condition-case nil (texmathp) (error nil)))
- (current-prefix-arg nil) ; we want to call reftex-index without prefix.
- key def-char def-tag full-entry)
+ ;; check if we have an active selection
+ (active (if (boundp 'zmacs-regions)
+ (and zmacs-regions (region-exists-p)) ; XEmacs
+ (and transient-mark-mode mark-active))) ; Emacs
+ (beg (if active
+ (region-beginning)
+ (save-excursion
+ (skip-syntax-backward "w\\") (point))))
+ (end (if active
+ (region-end)
+ (save-excursion
+ (skip-syntax-forward "w\\") (point))))
+ (sel (buffer-substring beg end))
+ (mathp (condition-case nil (texmathp) (error nil)))
+ (current-prefix-arg nil) ; we want to call reftex-index without prefix.
+ key def-char def-tag full-entry)
(if phrase
- (progn
- (reftex-index-visit-phrases-buffer)
- (reftex-index-new-phrase sel))
+ (progn
+ (reftex-index-visit-phrases-buffer)
+ (reftex-index-new-phrase sel))
(if (equal sel "")
- ;; Nothing selected, no word, so use full reftex-index command
- (reftex-index)
- ;; OK, we have something to index here.
- ;; Add the dollars when necessary
- (setq key (if mathp
- (format reftex-index-math-format sel)
- sel))
- ;; Get info from `reftex-index-default-macro'
- (setq def-char (if use-default (car reftex-index-default-macro)))
- (setq def-tag (if use-default (nth 1 reftex-index-default-macro)))
- ;; Does the user want to edit the entry?
- (setq full-entry (if arg
- (reftex-index-complete-key
- def-tag nil (cons key 0))
- key))
- ;; Delete what is in the buffer and make the index entry
- (delete-region beg end)
- (reftex-index def-char full-entry def-tag sel)))))
-
+ ;; Nothing selected, no word, so use full reftex-index command
+ (reftex-index)
+ ;; OK, we have something to index here.
+ ;; Add the dollars when necessary
+ (setq key (if mathp
+ (format reftex-index-math-format sel)
+ sel))
+ ;; Get info from `reftex-index-default-macro'
+ (setq def-char (if use-default (car reftex-index-default-macro)))
+ (setq def-tag (if use-default (nth 1 reftex-index-default-macro)))
+ ;; Does the user want to edit the entry?
+ (setq full-entry (if arg
+ (reftex-index-complete-key
+ def-tag nil (cons key 0))
+ key))
+ ;; Delete what is in the buffer and make the index entry
+ (delete-region beg end)
+ (reftex-index def-char full-entry def-tag sel)))))
+
(defun reftex-index (&optional char key tag sel no-insert)
"Query for an index macro and insert it along with its argments.
The index macros available are those defined in `reftex-index-macro' or
;; Find out which macro we are going to use
(let* ((char (or char
- (reftex-select-with-char reftex-query-index-macro-prompt
- reftex-query-index-macro-help)))
- (macro (nth 1 (assoc char reftex-key-to-index-macro-alist)))
- (entry (or (assoc macro reftex-index-macro-alist)
- (error "No index macro associated with %c" char)))
- (ntag (nth 1 entry))
- (tag (or tag (nth 1 entry)))
- (nargs (nth 4 entry))
- (nindex (nth 5 entry))
- (opt-args (nth 6 entry))
- (repeat (nth 7 entry))
- opt tag1 value)
+ (reftex-select-with-char reftex-query-index-macro-prompt
+ reftex-query-index-macro-help)))
+ (macro (nth 1 (assoc char reftex-key-to-index-macro-alist)))
+ (entry (or (assoc macro reftex-index-macro-alist)
+ (error "No index macro associated with %c" char)))
+ (ntag (nth 1 entry))
+ (tag (or tag (nth 1 entry)))
+ (nargs (nth 4 entry))
+ (nindex (nth 5 entry))
+ (opt-args (nth 6 entry))
+ (repeat (nth 7 entry))
+ opt tag1 value)
;; Get the supported arguments
(if (stringp tag)
- (setq tag1 tag)
+ (setq tag1 tag)
(setq tag1 (or (reftex-index-complete-tag tag opt-args) "")))
(setq key (or key
- (reftex-index-complete-key
- (if (string= tag1 "") "idx" tag1)
- (member nindex opt-args))))
+ (reftex-index-complete-key
+ (if (string= tag1 "") "idx" tag1)
+ (member nindex opt-args))))
;; Insert the macro and ask for any additional args
(insert macro)
(loop for i from 1 to nargs do
(setq opt (member i opt-args)
- value (cond ((= nindex i) key)
- ((equal ntag i) tag1)
- (t (read-string (concat "Macro arg nr. "
- (int-to-string i)
- (if opt " (optional)" "")
- ": ")))))
+ value (cond ((= nindex i) key)
+ ((equal ntag i) tag1)
+ (t (read-string (concat "Macro arg nr. "
+ (int-to-string i)
+ (if opt " (optional)" "")
+ ": ")))))
(unless (and opt (string= value ""))
- (insert (if opt "[" "{") value (if opt "]" "}"))))
+ (insert (if opt "[" "{") value (if opt "]" "}"))))
(and repeat (stringp sel) (insert sel))
(and key reftex-plug-into-AUCTeX (fboundp 'LaTeX-add-index-entries)
- (LaTeX-add-index-entries key))
+ (LaTeX-add-index-entries key))
(reftex-index-update-taglist tag1)
(reftex-notice-new)))
(defun reftex-default-index ()
(cond ((null reftex-index-default-tag) nil)
- ((stringp reftex-index-default-tag) reftex-index-default-tag)
- (t (or (get reftex-docstruct-symbol 'default-index-tag)
- "idx"))))
+ ((stringp reftex-index-default-tag) reftex-index-default-tag)
+ (t (or (get reftex-docstruct-symbol 'default-index-tag)
+ "idx"))))
(defun reftex-update-default-index (tag &optional tag-list)
(if (and (not (equal tag ""))
- (stringp tag)
- (eq reftex-index-default-tag 'last)
- (or (null tag-list)
- (member tag tag-list)))
+ (stringp tag)
+ (eq reftex-index-default-tag 'last)
+ (or (null tag-list)
+ (member tag tag-list)))
(put reftex-docstruct-symbol 'default-index-tag tag)))
(defun reftex-index-complete-tag (&optional itag opt-args)
;; OPT-ARGS is a list of optional argument indices, as given by
;; `reftex-parse-args'.
(let* ((opt (and (integerp itag) (member itag opt-args)))
- (index-tags (cdr (assq 'index-tags
- (symbol-value reftex-docstruct-symbol))))
- (default (reftex-default-index))
- (prompt (concat "Index tag"
- (if default (format " (default: %s)" default) "")
- (if opt " (optional)" "") ": "))
- (tag (completing-read prompt (mapcar 'list index-tags))))
+ (index-tags (cdr (assq 'index-tags
+ (symbol-value reftex-docstruct-symbol))))
+ (default (reftex-default-index))
+ (prompt (concat "Index tag"
+ (if default (format " (default: %s)" default) "")
+ (if opt " (optional)" "") ": "))
+ (tag (completing-read prompt (mapcar 'list index-tags))))
(if (and default (equal tag "")) (setq tag default))
(reftex-update-default-index tag)
tag))
(defun reftex-index-select-tag ()
;; Have the user select an index tag.
;; FIXME: should we cache tag-alist, prompt and help?
- (let* ((index-tags (cdr (assoc 'index-tags
- (symbol-value reftex-docstruct-symbol))))
- (default (reftex-default-index)))
- (cond
+ (let* ((index-tags (cdr (assoc 'index-tags
+ (symbol-value reftex-docstruct-symbol))))
+ (default (reftex-default-index)))
+ (cond
((null index-tags)
(error "No index tags available"))
((= (length index-tags) 1)
;; Just one index, use it
(car index-tags))
-
+
((> (length index-tags) 1)
;; Several indices, ask.
(let* ((tags (copy-sequence index-tags))
- (cnt 0)
- tag-alist i val len tag prompt help rpl)
- ;; Move idx and glo up in the list to ensure ?i and ?g shortcuts
- (if (member "glo" tags)
- (setq tags (cons "glo" (delete "glo" tags))))
- (if (member "idx" tags)
- (setq tags (cons "idx" (delete "idx" tags))))
- ;; Find unique shortcuts for each index.
- (while (setq tag (pop tags))
- (setq len (length tag)
- i -1
- val nil)
- (catch 'exit
- (while (and (< (incf i) len) (null val))
- (unless (assq (aref tag i) tag-alist)
- (push (list (aref tag i)
- tag
- (concat (substring tag 0 i)
- "[" (substring tag i (incf i)) "]"
- (substring tag i)))
- tag-alist)
- (throw 'exit t)))
- (push (list (+ ?0 (incf cnt)) tag
- (concat "[" (int-to-string cnt) "]:" tag))
- tag-alist)))
- (setq tag-alist (nreverse tag-alist))
- ;; Compute Prompt and Help strings
- (setq prompt
- (concat
- (format "Select Index%s: "
- (if default (format " (Default <%s>)" default) ""))
- (mapconcat (lambda(x) (nth 2 x)) tag-alist " ")))
- (setq help
- (concat "Select an Index\n===============\n"
- (if default
- (format "[^M] %s (the default)\n" default)
- "")
- (mapconcat (lambda(x)
- (apply 'format "[%c] %s" x))
- tag-alist "\n")))
- ;; Query the user for an index-tag
- (setq rpl (reftex-select-with-char prompt help 3 t))
- (message "")
- (if (and default (equal rpl ?\C-m))
- default
- (if (assq rpl tag-alist)
- (progn
- (reftex-update-default-index (nth 1 (assq rpl tag-alist)))
- (nth 1 (assq rpl tag-alist)))
- (error "No index tag associated with %c" rpl)))))
+ (cnt 0)
+ tag-alist i val len tag prompt help rpl)
+ ;; Move idx and glo up in the list to ensure ?i and ?g shortcuts
+ (if (member "glo" tags)
+ (setq tags (cons "glo" (delete "glo" tags))))
+ (if (member "idx" tags)
+ (setq tags (cons "idx" (delete "idx" tags))))
+ ;; Find unique shortcuts for each index.
+ (while (setq tag (pop tags))
+ (setq len (length tag)
+ i -1
+ val nil)
+ (catch 'exit
+ (while (and (< (incf i) len) (null val))
+ (unless (assq (aref tag i) tag-alist)
+ (push (list (aref tag i)
+ tag
+ (concat (substring tag 0 i)
+ "[" (substring tag i (incf i)) "]"
+ (substring tag i)))
+ tag-alist)
+ (throw 'exit t)))
+ (push (list (+ ?0 (incf cnt)) tag
+ (concat "[" (int-to-string cnt) "]:" tag))
+ tag-alist)))
+ (setq tag-alist (nreverse tag-alist))
+ ;; Compute Prompt and Help strings
+ (setq prompt
+ (concat
+ (format "Select Index%s: "
+ (if default (format " (Default <%s>)" default) ""))
+ (mapconcat (lambda(x) (nth 2 x)) tag-alist " ")))
+ (setq help
+ (concat "Select an Index\n===============\n"
+ (if default
+ (format "[^M] %s (the default)\n" default)
+ "")
+ (mapconcat (lambda(x)
+ (apply 'format "[%c] %s" x))
+ tag-alist "\n")))
+ ;; Query the user for an index-tag
+ (setq rpl (reftex-select-with-char prompt help 3 t))
+ (message "")
+ (if (and default (equal rpl ?\C-m))
+ default
+ (if (assq rpl tag-alist)
+ (progn
+ (reftex-update-default-index (nth 1 (assq rpl tag-alist)))
+ (nth 1 (assq rpl tag-alist)))
+ (error "No index tag associated with %c" rpl)))))
(t (error "This should not happen (reftex-index-select-tag)")))))
(defun reftex-index-complete-key (&optional tag optional initial)
;; Restrict completion table on index tag TAG.
;; OPTIONAL indicates if the arg is optional.
(let* ((table (reftex-sublist-nth
- (symbol-value reftex-docstruct-symbol) 6
- (lambda(x) (and (eq (car x) 'index)
- (string= (nth 1 x) (or tag ""))))
- t))
- (prompt (concat "Index key" (if optional " (optional)" "") ": "))
- (key (completing-read prompt table nil nil initial)))
+ (symbol-value reftex-docstruct-symbol) 6
+ (lambda(x) (and (eq (car x) 'index)
+ (string= (nth 1 x) (or tag ""))))
+ t))
+ (prompt (concat "Index key" (if optional " (optional)" "") ": "))
+ (key (completing-read prompt table nil nil initial)))
key))
(defun reftex-index-update-taglist (newtag)
- ;; add NEWTAG to the list of available index tags.
+ ;; add NEWTAG to the list of available index tags.
(let ((cell (assoc 'index-tags (symbol-value reftex-docstruct-symbol))))
(and newtag (cdr cell) (not (member newtag (cdr cell)))
- (push newtag (cdr cell)))))
+ (push newtag (cdr cell)))))
(defvar reftex-index-map (make-sparse-keymap)
"Keymap used for *Index* buffers.")
(interactive)
(kill-all-local-variables)
(setq major-mode 'reftex-index-mode
- mode-name "RefTeX Index")
+ mode-name "RefTeX Index")
(use-local-map reftex-index-map)
(set (make-local-variable 'revert-buffer-function) 'reftex-index-revert)
(set (make-local-variable 'reftex-index-restriction-data) nil)
(set (make-local-variable 'reftex-index-restriction-indicator) nil)
(setq mode-line-format
- (list "---- " 'mode-line-buffer-identification
- " " 'global-mode-string
- " R<" 'reftex-index-restriction-indicator ">"
- " -%-"))
+ (list "---- " 'mode-line-buffer-identification
+ " " 'global-mode-string
+ " R<" 'reftex-index-restriction-indicator ">"
+ " -%-"))
(setq truncate-lines t)
(when (featurep 'xemacs)
;; XEmacs needs the call to make-local-hook
;; Note: This function just looks for the nearest match of the
;; context string and may fail if the entry moved and an identical
;; entry is close to the old position. Frequent rescans make this
- ;; safer.
+ ;; safer.
(let* ((file (nth 3 data))
- (literal (nth 2 data))
- (pos (nth 4 data))
- (re (regexp-quote literal))
- (match
- (cond
- ((or (not no-revisit)
- (reftex-get-buffer-visiting file))
- (switch-to-buffer-other-window
- (reftex-get-file-buffer-force file nil))
- (goto-char (or pos (point-min)))
- (or (looking-at re)
- (reftex-nearest-match re (length literal))))
- (t (message reftex-no-follow-message) nil))))
+ (literal (nth 2 data))
+ (pos (nth 4 data))
+ (re (regexp-quote literal))
+ (match
+ (cond
+ ((or (not no-revisit)
+ (reftex-get-buffer-visiting file))
+ (switch-to-buffer-other-window
+ (reftex-get-file-buffer-force file nil))
+ (goto-char (or pos (point-min)))
+ (or (looking-at re)
+ (reftex-nearest-match re (length literal))))
+ (t (message reftex-no-follow-message) nil))))
(when match
(goto-char (match-beginning 0))
(recenter '(4))
match))
(defun reftex-display-index (&optional tag overriding-restriction
- &rest locations)
+ &rest locations)
"Display a buffer with an index compiled from the current document.
When the document has multiple indices, first prompts for the correct one.
When index support is turned off, offer to turn it on.
;; Determine the correct index to process
(let* ((docstruct (symbol-value reftex-docstruct-symbol))
- (docstruct-symbol reftex-docstruct-symbol)
- (index-tag (or tag (reftex-index-select-tag)))
- (master (reftex-TeX-master-file))
- (calling-file (buffer-file-name))
- (restriction
- (or overriding-restriction
- (and (interactive-p)
- (reftex-get-restriction current-prefix-arg docstruct))))
- (locations
- ;; See if we are on an index macro as initial position
- (or locations
- (let* ((what-macro (reftex-what-macro-safe 1))
- (macro (car what-macro))
- (here-I-am (when (member macro reftex-macros-with-index)
- (save-excursion
- (goto-char (+ (cdr what-macro)
- (length macro)))
- (reftex-move-over-touching-args)
- (reftex-where-am-I)))))
- (if (eq (car (car here-I-am)) 'index)
- (list (car here-I-am))))))
- buffer-name)
+ (docstruct-symbol reftex-docstruct-symbol)
+ (index-tag (or tag (reftex-index-select-tag)))
+ (master (reftex-TeX-master-file))
+ (calling-file (buffer-file-name))
+ (restriction
+ (or overriding-restriction
+ (and (interactive-p)
+ (reftex-get-restriction current-prefix-arg docstruct))))
+ (locations
+ ;; See if we are on an index macro as initial position
+ (or locations
+ (let* ((what-macro (reftex-what-macro-safe 1))
+ (macro (car what-macro))
+ (here-I-am (when (member macro reftex-macros-with-index)
+ (save-excursion
+ (goto-char (+ (cdr what-macro)
+ (length macro)))
+ (reftex-move-over-touching-args)
+ (reftex-where-am-I)))))
+ (if (eq (car (car here-I-am)) 'index)
+ (list (car here-I-am))))))
+ buffer-name)
(setq buffer-name (reftex-make-index-buffer-name index-tag))
;; Goto the buffer and put it into the correct mode
-
+
(when (or restriction current-prefix-arg)
- (reftex-kill-buffer buffer-name))
+ (reftex-kill-buffer buffer-name))
(if (get-buffer-window buffer-name)
- (select-window (get-buffer-window buffer-name))
+ (select-window (get-buffer-window buffer-name))
(let ((default-major-mode 'reftex-index-mode))
- (switch-to-buffer buffer-name)))
+ (switch-to-buffer buffer-name)))
(or (eq major-mode 'reftex-index-mode) (reftex-index-mode))
(set (make-local-variable 'reftex-index-tag) index-tag)
(set (make-local-variable 'reftex-docstruct-symbol) docstruct-symbol)
(if restriction
- (setq reftex-index-restriction-indicator (car restriction)
- reftex-index-restriction-data (cdr restriction))
+ (setq reftex-index-restriction-indicator (car restriction)
+ reftex-index-restriction-data (cdr restriction))
(if (interactive-p)
- (setq reftex-index-restriction-indicator nil
- reftex-index-restriction-data nil)))
+ (setq reftex-index-restriction-indicator nil
+ reftex-index-restriction-data nil)))
(when (= (buffer-size) 0)
;; buffer is empty - fill it
(message "Building %s buffer..." buffer-name)
;; it with whatever the DOCSTRUCT contains.
;; REMARK can be a note to add to the entry.
(let* ((all docstruct)
- (indent " ")
- (context reftex-index-include-context)
- (context-indent (concat indent " "))
- (section-chars (mapcar 'identity reftex-index-section-letters))
- (this-section-char 0)
- (font (reftex-use-fonts))
- (bor (car reftex-index-restriction-data))
- (eor (nth 1 reftex-index-restriction-data))
- (mouse-face
- (if (memq reftex-highlight-selection '(mouse both))
- reftex-mouse-selected-face
- nil))
- (index-face (reftex-verified-face reftex-label-face
- 'font-lock-constant-face
- 'font-lock-reference-face))
- sublist cell from to first-char)
+ (indent " ")
+ (context reftex-index-include-context)
+ (context-indent (concat indent " "))
+ (section-chars (mapcar 'identity reftex-index-section-letters))
+ (this-section-char 0)
+ (font (reftex-use-fonts))
+ (bor (car reftex-index-restriction-data))
+ (eor (nth 1 reftex-index-restriction-data))
+ (mouse-face
+ (if (memq reftex-highlight-selection '(mouse both))
+ reftex-mouse-selected-face
+ nil))
+ (index-face (reftex-verified-face reftex-label-face
+ 'font-lock-constant-face
+ 'font-lock-reference-face))
+ sublist cell from to first-char)
;; Make the sublist and sort it
(when bor
(while (setq cell (pop all))
(if (eq cell eor)
- (setq all nil)
- (and (eq (car cell) 'index)
- (equal (nth 1 cell) tag)
- (push cell sublist))))
+ (setq all nil)
+ (and (eq (car cell) 'index)
+ (equal (nth 1 cell) tag)
+ (push cell sublist))))
(setq sublist (sort (nreverse sublist)
- (lambda (a b) (string< (nth 8 a) (nth 8 b)))))
+ (lambda (a b) (string< (nth 8 a) (nth 8 b)))))
(when update-one
;; Delete the entry at place
(and (bolp) (forward-char 1))
(delete-region (previous-single-property-change (1+ (point)) :data)
- (or (next-single-property-change (point) :data)
- (point-max))))
+ (or (next-single-property-change (point) :data)
+ (point-max))))
;; Walk through the list and insert all entries
(while (setq cell (pop sublist))
(unless update-one
- (setq first-char (upcase (string-to-char (nth 6 cell))))
- (when (and (not (equal first-char this-section-char))
- (member first-char section-chars))
- ;; There is a new initial letter, so start a new section
- (reftex-index-insert-new-letter first-char font)
- (setq section-chars (delete first-char section-chars)
- this-section-char first-char))
- (when (= this-section-char 0)
- (setq this-section-char ?!)
- (reftex-index-insert-new-letter this-section-char font)))
+ (setq first-char (upcase (string-to-char (nth 6 cell))))
+ (when (and (not (equal first-char this-section-char))
+ (member first-char section-chars))
+ ;; There is a new initial letter, so start a new section
+ (reftex-index-insert-new-letter first-char font)
+ (setq section-chars (delete first-char section-chars)
+ this-section-char first-char))
+ (when (= this-section-char 0)
+ (setq this-section-char ?!)
+ (reftex-index-insert-new-letter this-section-char font)))
(setq from (point))
(insert indent (nth 7 cell))
(when font
- (setq to (point))
- (put-text-property
- (- (point) (length (nth 7 cell))) to
- 'face index-face)
- (goto-char to))
+ (setq to (point))
+ (put-text-property
+ (- (point) (length (nth 7 cell))) to
+ 'face index-face)
+ (goto-char to))
(when (or remark (nth 9 cell))
- (and (< (current-column) 40)
- ;; FIXME: maybe this is too slow?
- (insert (make-string (max (- 40 (current-column)) 0) ?\ )))
- (and (nth 9 cell) (insert " " (substring (nth 5 cell) (nth 9 cell))))
- (and remark (insert " " remark)))
+ (and (< (current-column) 40)
+ ;; FIXME: maybe this is too slow?
+ (insert (make-string (max (- 40 (current-column)) 0) ?\ )))
+ (and (nth 9 cell) (insert " " (substring (nth 5 cell) (nth 9 cell))))
+ (and remark (insert " " remark)))
(insert "\n")
(setq to (point))
(when context
- (insert context-indent (nth 2 cell) "\n")
- (setq to (point)))
+ (insert context-indent (nth 2 cell) "\n")
+ (setq to (point)))
(put-text-property from to :data cell)
(when mouse-face
- (put-text-property from (1- to)
- 'mouse-face mouse-face))
+ (put-text-property from (1- to)
+ 'mouse-face mouse-face))
(goto-char to))))
(defun reftex-index-insert-new-letter (letter &optional font)
;; Start a new section in the index
(let ((from (point)))
- (insert "\n" letter letter letter
- "-----------------------------------------------------------------")
+ (insert "\n" letter letter letter
+ "-----------------------------------------------------------------")
(when font
(put-text-property from (point) 'face reftex-index-section-face))
(insert "\n")))
(defun reftex-get-restriction (arg docstruct)
;; Interprete the prefix ARG and derive index restriction specs.
(let* ((beg (min (point) (or (condition-case nil (mark) (error nil))
- (point-max))))
- (end (max (point) (or (condition-case nil (mark) (error nil))
- (point-min))))
- bor eor label here-I-am)
+ (point-max))))
+ (end (max (point) (or (condition-case nil (mark) (error nil))
+ (point-min))))
+ bor eor label here-I-am)
(cond
((eq arg 2)
(setq here-I-am (car (reftex-where-am-I))
- bor (if (eq (car here-I-am) 'toc)
- here-I-am
- (reftex-last-assoc-before-elt
- 'toc here-I-am docstruct))
- eor (car (memq (assq 'toc (cdr (memq bor docstruct))) docstruct))
- label (nth 6 bor)))
+ bor (if (eq (car here-I-am) 'toc)
+ here-I-am
+ (reftex-last-assoc-before-elt
+ 'toc here-I-am docstruct))
+ eor (car (memq (assq 'toc (cdr (memq bor docstruct))) docstruct))
+ label (nth 6 bor)))
((eq arg 3)
(save-excursion
- (setq label "region")
- (goto-char beg)
- (setq bor (car (reftex-where-am-I)))
- (setq bor (nth 1 (memq bor docstruct)))
- (goto-char end)
- (setq eor (nth 1 (memq (car (reftex-where-am-I)) docstruct)))))
+ (setq label "region")
+ (goto-char beg)
+ (setq bor (car (reftex-where-am-I)))
+ (setq bor (nth 1 (memq bor docstruct)))
+ (goto-char end)
+ (setq eor (nth 1 (memq (car (reftex-where-am-I)) docstruct)))))
(t nil))
(if (and label (or bor eor))
- (list label bor eor)
+ (list label bor eor)
nil)))
(defun reftex-index-pre-command-hook ()
;; Used in the post-command-hook for the *Index* buffer
(when (get-text-property (point) :data)
(and (> (point) 1)
- (not (get-text-property (point) 'intangible))
- (memq reftex-highlight-selection '(cursor both))
- (reftex-highlight 1
- (or (previous-single-property-change (1+ (point)) :data)
- (point-min))
- (or (next-single-property-change (point) :data)
- (point-max)))))
+ (not (get-text-property (point) 'intangible))
+ (memq reftex-highlight-selection '(cursor both))
+ (reftex-highlight 1
+ (or (previous-single-property-change (1+ (point)) :data)
+ (point-min))
+ (or (next-single-property-change (point) :data)
+ (point-max)))))
(if (integerp reftex-index-follow-mode)
;; Remove delayed action
(setq reftex-index-follow-mode t)
(and reftex-index-follow-mode
- (not (equal reftex-last-follow-point (point)))
- ;; Show context in other window
- (setq reftex-last-follow-point (point))
- (condition-case nil
- (reftex-index-visit-location nil (not reftex-revisit-to-follow))
- (error t)))))
+ (not (equal reftex-last-follow-point (point)))
+ ;; Show context in other window
+ (setq reftex-last-follow-point (point))
+ (condition-case nil
+ (reftex-index-visit-location nil (not reftex-revisit-to-follow))
+ (error t)))))
(defun reftex-index-show-help ()
"Show a summary of special key bindings."
(interactive "p")
(setq reftex-callback-fwd t)
(or (eobp) (forward-char 1))
- (goto-char (or (next-single-property-change (point) :data)
- (point)))
+ (goto-char (or (next-single-property-change (point) :data)
+ (point)))
(unless (get-text-property (point) :data)
- (goto-char (or (next-single-property-change (point) :data)
- (point)))))
+ (goto-char (or (next-single-property-change (point) :data)
+ (point)))))
(defun reftex-index-previous (&optional arg)
"Move to previous selectable item."
(interactive "p")
(setq reftex-callback-fwd nil)
(goto-char (or (previous-single-property-change (point) :data)
- (point)))
+ (point)))
(unless (get-text-property (point) :data)
(goto-char (or (previous-single-property-change (point) :data)
- (point)))))
+ (point)))))
(defun reftex-index-toggle-follow ()
"Toggle follow (other window follows with context)."
(interactive)
(interactive)
(let ((index-tag reftex-index-tag))
(if (and reftex-enable-partial-scans
- (null current-prefix-arg))
- (let* ((data (get-text-property (point) :data))
- (file (nth 3 data))
- (line (+ (count-lines (point-min) (point)) (if (bolp) 1 0))))
- (if (not file)
- (error "Don't know which file to rescan. Try `C-u r'")
- (switch-to-buffer (reftex-get-file-buffer-force file))
- (setq current-prefix-arg '(4))
- (reftex-display-index index-tag nil line)))
+ (null current-prefix-arg))
+ (let* ((data (get-text-property (point) :data))
+ (file (nth 3 data))
+ (line (+ (count-lines (point-min) (point)) (if (bolp) 1 0))))
+ (if (not file)
+ (error "Don't know which file to rescan. Try `C-u r'")
+ (switch-to-buffer (reftex-get-file-buffer-force file))
+ (setq current-prefix-arg '(4))
+ (reftex-display-index index-tag nil line)))
(reftex-index-Rescan))
(reftex-kill-temporary-buffers)))
(defun reftex-index-Rescan (&rest ignore)
"Regenerate the *Index* buffer after reparsing the entire document."
(interactive)
(let ((index-tag reftex-index-tag)
- (line (+ (count-lines (point-min) (point)) (if (bolp) 1 0))))
+ (line (+ (count-lines (point-min) (point)) (if (bolp) 1 0))))
(switch-to-buffer
(reftex-get-file-buffer-force reftex-last-index-file))
(setq current-prefix-arg '(16))
"Regenerate the *Index* from the internal lists. No reparsing os done."
(interactive)
(let ((buf (current-buffer))
- (index-tag reftex-index-tag)
- (data (get-text-property (point) :data))
- (line (+ (count-lines (point-min) (point)) (if (bolp) 1 0))))
+ (index-tag reftex-index-tag)
+ (data (get-text-property (point) :data))
+ (line (+ (count-lines (point-min) (point)) (if (bolp) 1 0))))
(switch-to-buffer
(reftex-get-file-buffer-force reftex-last-index-file))
(reftex-erase-buffer buf)
(setq current-prefix-arg nil
- reftex-last-follow-point 1)
+ reftex-last-follow-point 1)
(reftex-display-index index-tag nil data line)))
(defun reftex-index-switch-index-tag (&rest ignore)
"Switch to a different index of the same document."
;; Optional FORCE means, even if point is not on an index entry.
(interactive)
(let* ((data (get-text-property (point) :data))
- (docstruct (symbol-value reftex-docstruct-symbol))
- bor eor)
+ (docstruct (symbol-value reftex-docstruct-symbol))
+ bor eor)
(if (and (not data) force)
- (setq data (assq 'toc docstruct)))
+ (setq data (assq 'toc docstruct)))
(when data
(setq bor (reftex-last-assoc-before-elt 'toc data docstruct)
- eor (car (memq (assq 'toc (cdr (memq bor docstruct)))
- docstruct))
- reftex-index-restriction-data (list bor eor)
- reftex-index-restriction-indicator (nth 6 bor) )))
+ eor (car (memq (assq 'toc (cdr (memq bor docstruct)))
+ docstruct))
+ reftex-index-restriction-data (list bor eor)
+ reftex-index-restriction-indicator (nth 6 bor) )))
(reftex-index-revert))
(defun reftex-index-widen (&rest ignore)
"Show the unrestricted index (all entries)."
(interactive)
(setq reftex-index-restriction-indicator nil
- reftex-index-restriction-data nil)
+ reftex-index-restriction-data nil)
(reftex-index-revert)
(message "Index widened"))
(defun reftex-index-restriction-forward (&rest ignore)
When index is restricted, select the next section as restriction criterion."
(interactive)
(let* ((docstruct (symbol-value reftex-docstruct-symbol))
- (bor (nth 1 reftex-index-restriction-data)))
+ (bor (nth 1 reftex-index-restriction-data)))
(if (or (not bor)
- (not (eq (car bor) 'toc)))
- (reftex-index-restrict-to-section t)
+ (not (eq (car bor) 'toc)))
+ (reftex-index-restrict-to-section t)
(setq reftex-index-restriction-indicator (nth 6 bor)
- reftex-index-restriction-data
- (list bor
- (car (memq (assq 'toc (cdr (memq bor docstruct)))
- docstruct))))
+ reftex-index-restriction-data
+ (list bor
+ (car (memq (assq 'toc (cdr (memq bor docstruct)))
+ docstruct))))
(reftex-index-revert))))
(defun reftex-index-restriction-backward (&rest ignore)
"Restrict to next section.
When index is restricted, select the previous section as restriction criterion."
(interactive)
(let* ((docstruct (symbol-value reftex-docstruct-symbol))
- (eor (car reftex-index-restriction-data))
- (bor (reftex-last-assoc-before-elt 'toc eor docstruct t)))
+ (eor (car reftex-index-restriction-data))
+ (bor (reftex-last-assoc-before-elt 'toc eor docstruct t)))
(if (or (not bor)
- (not (eq (car bor) 'toc)))
- (reftex-index-restrict-to-section t)
+ (not (eq (car bor) 'toc)))
+ (reftex-index-restrict-to-section t)
(setq reftex-index-restriction-indicator (nth 6 bor)
- reftex-index-restriction-data
- (list bor eor))
+ reftex-index-restriction-data
+ (list bor eor))
(reftex-index-revert))))
(defun reftex-index-visit-location (&optional final no-revisit)
show-window show-buffer match)
(unless data (error "Don't know which index entry to visit"))
-
+
(if (eq (car data) 'index)
- (setq match (reftex-index-show-entry data no-revisit)))
+ (setq match (reftex-index-show-entry data no-revisit)))
(setq show-window (selected-window)
show-buffer (current-buffer))
;; values are accessible individually.
(interactive)
(let* ((arg (nth 5 data))
- (context (nth 2 data))
- (sc reftex-index-special-chars)
- (boa (if (string-match (regexp-quote (concat "{" arg "}")) context)
- (1+ (match-beginning 0))
- (error "Something is wrong here")))
- (eoa (1- (match-end 0)))
- (boactual (if (string-match (concat "[^" (nth 3 sc) "]" (nth 2 sc))
- context boa)
- (1+ (match-beginning 0))
- eoa))
- (boattr (if (string-match (concat "[^" (nth 3 sc) "]" (nth 1 sc))
- context boa)
- (1+ (match-beginning 0))
- boactual))
- (pre (substring context 0 boa))
- (key (substring context boa boattr))
- (attr (substring context boattr boactual))
- (actual (substring context boactual eoa))
- (post (substring context eoa)))
+ (context (nth 2 data))
+ (sc reftex-index-special-chars)
+ (boa (if (string-match (regexp-quote (concat "{" arg "}")) context)
+ (1+ (match-beginning 0))
+ (error "Something is wrong here")))
+ (eoa (1- (match-end 0)))
+ (boactual (if (string-match (concat "[^" (nth 3 sc) "]" (nth 2 sc))
+ context boa)
+ (1+ (match-beginning 0))
+ eoa))
+ (boattr (if (string-match (concat "[^" (nth 3 sc) "]" (nth 1 sc))
+ context boa)
+ (1+ (match-beginning 0))
+ boactual))
+ (pre (substring context 0 boa))
+ (key (substring context boa boattr))
+ (attr (substring context boattr boactual))
+ (actual (substring context boactual eoa))
+ (post (substring context eoa)))
(list pre key attr actual post)))
(defun reftex-index-edit ()
"Edit the index entry at point."
(interactive)
(let* ((data (get-text-property (point) :data))
- old new)
+ old new)
(unless data (error "Don't know which index entry to edit"))
(reftex-index-view-entry)
(setq old (nth 2 data) new (read-string "Edit: " old))
"Toggle the page range start attribute `|('."
(interactive)
(let* ((data (get-text-property (point) :data))
- (bor (concat (nth 1 reftex-index-special-chars) "("))
- new analyze attr)
+ (bor (concat (nth 1 reftex-index-special-chars) "("))
+ new analyze attr)
(unless data (error "Don't know which index entry to edit"))
(setq analyze (reftex-index-analyze-entry data)
- attr (nth 2 analyze))
+ attr (nth 2 analyze))
(setf (nth 2 analyze) (if (string= attr bor) "" bor))
(setq new (apply 'concat analyze))
- (reftex-index-change-entry
+ (reftex-index-change-entry
new (if (string= (nth 2 analyze) bor)
- "Entry is now START-OF-PAGE-RANGE"
- "START-OF-PAGE-RANGE canceled"))))
+ "Entry is now START-OF-PAGE-RANGE"
+ "START-OF-PAGE-RANGE canceled"))))
(defun reftex-index-toggle-range-end ()
"Toggle the page-range-end attribute `|)'."
(interactive)
(let* ((data (get-text-property (point) :data))
- (eor (concat (nth 1 reftex-index-special-chars) ")"))
- new analyze attr)
+ (eor (concat (nth 1 reftex-index-special-chars) ")"))
+ new analyze attr)
(unless data (error "Don't know which index entry to edit"))
(setq analyze (reftex-index-analyze-entry data)
- attr (nth 2 analyze))
+ attr (nth 2 analyze))
(setf (nth 2 analyze) (if (string= attr eor) "" eor))
(setq new (apply 'concat analyze))
(reftex-index-change-entry
new (if (string= (nth 2 analyze) eor)
- "Entry is now END-OF-PAGE-RANGE"
- "END-OF-PAGE-RANGE canceled"))))
+ "Entry is now END-OF-PAGE-RANGE"
+ "END-OF-PAGE-RANGE canceled"))))
(defun reftex-index-edit-key ()
"Edit the KEY part of the index entry."
"EDIT the ATTRIBUTE part of the entry. With arg: remove entire ATTRIBUTE."
(interactive "P")
(reftex-index-edit-part arg 2 (nth 1 reftex-index-special-chars)
- "Attribute: "))
+ "Attribute: "))
(defun reftex-index-edit-visual (&optional arg)
"EDIT the VISUAL part of the entry. With arg: remove entire VISUAL string."
(defun reftex-index-edit-part (arg n initial prompt &optional dont-allow-empty)
;; This function does the work for all partial editing commands
(let* ((data (get-text-property (point) :data))
- new analyze opart npart)
+ new analyze opart npart)
(unless data (error "Don't know which index entry to edit"))
;; Analyze the whole context string
(setq analyze (reftex-index-analyze-entry data)
- opart (nth n analyze))
+ opart (nth n analyze))
(and (> (length opart) 0) (setq opart (substring opart 1)))
;; Have the user editing the part
(setq npart (if arg "" (read-string (concat prompt initial) opart)))
;; Tests:
(cond ((string= npart opart)
- (error "Not changed"))
- ((string= npart "")
- (if dont-allow-empty
- (error "Illegal value")
- (setf (nth n analyze) npart)))
- (t (setf (nth n analyze) (concat initial npart))))
+ (error "Not changed"))
+ ((string= npart "")
+ (if dont-allow-empty
+ (error "Illegal value")
+ (setf (nth n analyze) npart)))
+ (t (setf (nth n analyze) (concat initial npart))))
(setq new (apply 'concat analyze))
;; Change the entry and insert the changed version into the index.
- (reftex-index-change-entry
+ (reftex-index-change-entry
new (if (string= npart "")
- (format "Deleted: %s" opart)
- (format "New value is: %s" npart)))))
+ (format "Deleted: %s" opart)
+ (format "New value is: %s" npart)))))
(defun reftex-index-level-down ()
"Make index entry a subitem of another entry."
(interactive)
(let* ((data (get-text-property (point) :data))
- (docstruct (symbol-value reftex-docstruct-symbol))
- old new prefix key)
+ (docstruct (symbol-value reftex-docstruct-symbol))
+ old new prefix key)
(unless data (error "Don't know which index entry to change"))
(setq old (nth 2 data)
- key (nth 6 data)
- prefix (completing-read
- "Prefix: "
- (reftex-sublist-nth
- docstruct 6
- (lambda (x)
- (and (eq (car x) 'index)
- (string= (nth 1 x) reftex-index-tag))) t)))
- (unless (string-match
- (concat (regexp-quote (car reftex-index-special-chars)) "\\'")
- prefix)
+ key (nth 6 data)
+ prefix (completing-read
+ "Prefix: "
+ (reftex-sublist-nth
+ docstruct 6
+ (lambda (x)
+ (and (eq (car x) 'index)
+ (string= (nth 1 x) reftex-index-tag))) t)))
+ (unless (string-match
+ (concat (regexp-quote (car reftex-index-special-chars)) "\\'")
+ prefix)
(setq prefix (concat prefix (car reftex-index-special-chars))))
(if (string-match (regexp-quote key) old)
- (setq new (replace-match (concat prefix key) t t old))
+ (setq new (replace-match (concat prefix key) t t old))
(error "Cannot construct new index key"))
(reftex-index-change-entry new (format "Added prefix: %s" prefix))))
"Remove the highest level of a hierarchical index entry."
(interactive)
(let* ((data (get-text-property (point) :data))
- old new prefix)
+ old new prefix)
(unless data (error "Don't know which entry to change"))
(setq old (nth 2 data))
(if (string-match (concat "{\\([^" (nth 0 reftex-index-special-chars) "]*"
- "[^" (nth 3 reftex-index-special-chars) "]"
- (regexp-quote (nth 0 reftex-index-special-chars))
- "\\)")
- old)
- (setq prefix (substring old (match-beginning 1) (match-end 1))
- new (concat (substring old 0 (match-beginning 1))
- (substring old (match-end 1))))
+ "[^" (nth 3 reftex-index-special-chars) "]"
+ (regexp-quote (nth 0 reftex-index-special-chars))
+ "\\)")
+ old)
+ (setq prefix (substring old (match-beginning 1) (match-end 1))
+ new (concat (substring old 0 (match-beginning 1))
+ (substring old (match-end 1))))
(error "Entry is not a subitem"))
(reftex-index-change-entry new (format "Removed prefix: %s" prefix))))
(defun reftex-index-change-entry (new &optional message)
;; Change the full context string of the index entry at point to
;; NEW. This actually edits the buffer where the entry is defined.
-
+
(let* ((data (get-text-property (point) :data))
- old beg end info)
+ old beg end info)
(unless data (error "Cannot change entry"))
(reftex-index-view-entry)
(setq beg (match-beginning 0) end (match-end 0))
(set-buffer (get-file-buffer (nth 3 data)))
(goto-char beg)
(unless (looking-at (regexp-quote old))
- (error "This should not happen (reftex-index-change-entry)"))
+ (error "This should not happen (reftex-index-change-entry)"))
(delete-region beg end)
(insert new)
(goto-char (1- beg))
(when (and (re-search-forward (reftex-everything-regexp) nil t)
- (match-end 10)
- (< (abs (- (match-beginning 10) beg)) (length new))
- (setq info (reftex-index-info-safe buffer-file-name)))
- (setcdr data (cdr info))))
+ (match-end 10)
+ (< (abs (- (match-beginning 10) beg)) (length new))
+ (setq info (reftex-index-info-safe buffer-file-name)))
+ (setcdr data (cdr info))))
(let ((buffer-read-only nil))
(save-excursion
- (reftex-insert-index (list data) reftex-index-tag t
- "EDITED")))
+ (reftex-insert-index (list data) reftex-index-tag t
+ "EDITED")))
(setq reftex-last-follow-point 1)
(and message (message message))))
(loop for x in
'(("n" . reftex-index-next)
- ("p" . reftex-index-previous)
- ("?" . reftex-index-show-help)
- (" " . reftex-index-view-entry)
- ("\C-m" . reftex-index-goto-entry-and-hide)
- ("\C-i" . reftex-index-goto-entry)
- ("\C-k" . reftex-index-kill)
- ("r" . reftex-index-rescan)
- ("R" . reftex-index-Rescan)
- ("g" . revert-buffer)
- ("q" . reftex-index-quit)
- ("k" . reftex-index-quit-and-kill)
- ("f" . reftex-index-toggle-follow)
- ("s" . reftex-index-switch-index-tag)
- ("e" . reftex-index-edit)
- ("^" . reftex-index-level-up)
- ("_" . reftex-index-level-down)
- ("}" . reftex-index-restrict-to-section)
- ("{" . reftex-index-widen)
- (">" . reftex-index-restriction-forward)
- ("<" . reftex-index-restriction-backward)
- ("(" . reftex-index-toggle-range-beginning)
- (")" . reftex-index-toggle-range-end)
- ("|" . reftex-index-edit-attribute)
- ("@" . reftex-index-edit-visual)
- ("*" . reftex-index-edit-key)
- ("\C-c=". reftex-index-goto-toc)
- ("c" . reftex-index-toggle-context))
+ ("p" . reftex-index-previous)
+ ("?" . reftex-index-show-help)
+ (" " . reftex-index-view-entry)
+ ("\C-m" . reftex-index-goto-entry-and-hide)
+ ("\C-i" . reftex-index-goto-entry)
+ ("\C-k" . reftex-index-kill)
+ ("r" . reftex-index-rescan)
+ ("R" . reftex-index-Rescan)
+ ("g" . revert-buffer)
+ ("q" . reftex-index-quit)
+ ("k" . reftex-index-quit-and-kill)
+ ("f" . reftex-index-toggle-follow)
+ ("s" . reftex-index-switch-index-tag)
+ ("e" . reftex-index-edit)
+ ("^" . reftex-index-level-up)
+ ("_" . reftex-index-level-down)
+ ("}" . reftex-index-restrict-to-section)
+ ("{" . reftex-index-widen)
+ (">" . reftex-index-restriction-forward)
+ ("<" . reftex-index-restriction-backward)
+ ("(" . reftex-index-toggle-range-beginning)
+ (")" . reftex-index-toggle-range-end)
+ ("|" . reftex-index-edit-attribute)
+ ("@" . reftex-index-edit-visual)
+ ("*" . reftex-index-edit-key)
+ ("\C-c=". reftex-index-goto-toc)
+ ("c" . reftex-index-toggle-context))
do (define-key reftex-index-map (car x) (cdr x)))
(loop for key across "0123456789" do
;; The capital letters and the exclamation mark
(loop for key across (concat "!" reftex-index-section-letters) do
(define-key reftex-index-map (vector (list key))
- (list 'lambda '() '(interactive)
- (list 'reftex-index-goto-letter key))))
+ (list 'lambda '() '(interactive)
+ (list 'reftex-index-goto-letter key))))
(defun reftex-index-goto-letter (char)
"Go to the CHAR section in the index."
(let ((pos (point))
- (case-fold-search nil))
+ (case-fold-search nil))
(goto-line 3)
(if (re-search-forward (concat "^" (char-to-string char)) nil t)
- (progn
- (beginning-of-line)
- (recenter 0)
- (reftex-index-next))
+ (progn
+ (beginning-of-line)
+ (recenter 0)
+ (reftex-index-next))
(goto-char pos)
(if (eq char ?!)
- (error "This <%s> index does not contain entries sorted before the letters"
- reftex-index-tag)
- (error "This <%s> index does not contain entries starting with `%c'"
- reftex-index-tag char)))))
+ (error "This <%s> index does not contain entries sorted before the letters"
+ reftex-index-tag)
+ (error "This <%s> index does not contain entries starting with `%c'"
+ reftex-index-tag char)))))
-(easy-menu-define
+(easy-menu-define
reftex-index-menu reftex-index-map
"Menu for Index buffer"
`("Index"
- ["Goto section A-Z"
+ ["Goto section A-Z"
(message "To go to a section, just press any of: !%s"
- reftex-index-section-letters) t]
+ reftex-index-section-letters) t]
["Show Entry" reftex-index-view-entry t]
["Go To Entry" reftex-index-goto-entry t]
["Exit & Go To Entry" reftex-index-goto-entry-and-hide t]
["Context" reftex-index-toggle-context :style toggle
:selected reftex-index-include-context]
"--"
- ["Follow Mode" reftex-index-toggle-follow :style toggle
+ ["Follow Mode" reftex-index-toggle-follow :style toggle
:selected reftex-index-follow-mode])
"--"
["Help" reftex-index-show-help t]))
(set-marker reftex-index-return-marker (point))
(reftex-index-selection-or-word arg 'phrase)
(if (eq major-mode 'reftex-index-phrases-mode)
- (message
+ (message
(substitute-command-keys
- "Return to LaTeX with \\[reftex-index-phrases-save-and-return]"))))
+ "Return to LaTeX with \\[reftex-index-phrases-save-and-return]"))))
(defun reftex-index-visit-phrases-buffer ()
"Switch to the phrases buffer, initialize if empty."
(interactive)
(reftex-access-scan-info)
(let* ((master (reftex-TeX-master-file))
- (name (concat (file-name-sans-extension master)
- reftex-index-phrase-file-extension)))
+ (name (concat (file-name-sans-extension master)
+ reftex-index-phrase-file-extension)))
(find-file name)
(unless (eq major-mode 'reftex-index-phrases-mode)
(reftex-index-phrases-mode))
(if (= (buffer-size) 0)
- (reftex-index-initialize-phrases-buffer master))))
+ (reftex-index-initialize-phrases-buffer master))))
(defun reftex-index-initialize-phrases-buffer (&optional master)
"Initialize the phrases buffer by creating the header.
If the buffer is non-empty, delete the old header first."
(interactive)
(let* ((case-fold-search t)
- (default-key (car reftex-index-default-macro))
- (default-macro (nth 1 (assoc default-key
- reftex-key-to-index-macro-alist)))
- (macro-alist
- (sort (copy-sequence reftex-index-macro-alist)
- (lambda (a b) (equal (car a) default-macro))))
- macro entry key repeat)
-
+ (default-key (car reftex-index-default-macro))
+ (default-macro (nth 1 (assoc default-key
+ reftex-key-to-index-macro-alist)))
+ (macro-alist
+ (sort (copy-sequence reftex-index-macro-alist)
+ (lambda (a b) (equal (car a) default-macro))))
+ macro entry key repeat)
+
(if master (set (make-local-variable 'TeX-master)
- (file-name-nondirectory master)))
+ (file-name-nondirectory master)))
(when (> (buffer-size) 0)
(goto-char 1)
(set-mark (point))
(while (re-search-forward reftex-index-phrases-macrodef-regexp nil t)
- (end-of-line))
+ (end-of-line))
(beginning-of-line 2)
(if (looking-at reftex-index-phrases-comment-regexp)
- (beginning-of-line 2))
+ (beginning-of-line 2))
(while (looking-at "^[ \t]*$")
- (beginning-of-line 2))
+ (beginning-of-line 2))
(cond ((fboundp 'zmacs-activate-region) (zmacs-activate-region))
- ((boundp 'make-active) (setq mark-active t)))
+ ((boundp 'make-active) (setq mark-active t)))
(if (yes-or-no-p "Delete and rebuilt header ")
- (delete-region (point-min) (point))))
+ (delete-region (point-min) (point))))
;; Insert the mode line
(insert
(format "%% -*- mode: reftex-index-phrases; TeX-master: \"%s\" -*-\n"
- (file-name-nondirectory (reftex-index-phrase-tex-master))))
+ (file-name-nondirectory (reftex-index-phrase-tex-master))))
;; Insert the macro definitions
(insert "% Key Macro Format Repeat\n")
(insert "%---------------------------------------------------------------------\n")
(while (setq entry (pop macro-alist))
(setq macro (car entry)
- repeat (nth 7 entry)
- key (car (delq nil (mapcar (lambda (x) (if (equal (nth 1 x) macro)
- (car x)
- nil))
- reftex-key-to-index-macro-alist))))
+ repeat (nth 7 entry)
+ key (car (delq nil (mapcar (lambda (x) (if (equal (nth 1 x) macro)
+ (car x)
+ nil))
+ reftex-key-to-index-macro-alist))))
(insert (format ">>>INDEX_MACRO_DEFINITION:\t%s\t%-20s\t%s\n"
- (char-to-string key) (concat macro "{%s}")
- (if repeat "t" "nil"))))
+ (char-to-string key) (concat macro "{%s}")
+ (if repeat "t" "nil"))))
(insert "%---------------------------------------------------------------------\n\n\n")))
(defvar TeX-master)
(defun reftex-index-phrase-tex-master (&optional dir)
"Return the name of the master file associated with a phrase buffer."
(if (and (boundp 'TeX-master)
- (local-variable-p 'TeX-master (current-buffer))
- (stringp TeX-master))
+ (local-variable-p 'TeX-master (current-buffer))
+ (stringp TeX-master))
;; We have a local variable which tells us which file to use
(expand-file-name TeX-master dir)
;; have to guess
(interactive)
(kill-all-local-variables)
(setq major-mode 'reftex-index-phrases-mode
- mode-name "Phrases")
+ mode-name "Phrases")
(use-local-map reftex-index-phrases-map)
- (set (make-local-variable 'font-lock-defaults)
+ (set (make-local-variable 'font-lock-defaults)
reftex-index-phrases-font-lock-defaults)
(easy-menu-add reftex-index-phrases-menu reftex-index-phrases-map)
(set (make-local-variable 'reftex-index-phrases-marker) (make-marker))
;; Font Locking stuff
(let ((ss (if (featurep 'xemacs) 'secondary-selection ''secondary-selection)))
(setq reftex-index-phrases-font-lock-keywords
- (list
- (cons reftex-index-phrases-comment-regexp 'font-lock-comment-face)
- (list reftex-index-phrases-macrodef-regexp
- '(1 font-lock-type-face)
- '(2 font-lock-keyword-face)
- (list 3 ss)
- '(4 font-lock-function-name-face)
- (list 5 ss)
- '(6 font-lock-string-face))
- (list reftex-index-phrases-phrase-regexp1
- '(1 font-lock-keyword-face)
- (list 2 ss)
- '(3 font-lock-string-face)
- (list 4 ss))
- (list reftex-index-phrases-phrase-regexp2
- '(1 font-lock-keyword-face)
- (list 2 ss)
- '(3 font-lock-string-face)
- (list 4 ss)
- '(5 font-lock-function-name-face))
- (cons "^\t$" ss)))
+ (list
+ (cons reftex-index-phrases-comment-regexp 'font-lock-comment-face)
+ (list reftex-index-phrases-macrodef-regexp
+ '(1 font-lock-type-face)
+ '(2 font-lock-keyword-face)
+ (list 3 ss)
+ '(4 font-lock-function-name-face)
+ (list 5 ss)
+ '(6 font-lock-string-face))
+ (list reftex-index-phrases-phrase-regexp1
+ '(1 font-lock-keyword-face)
+ (list 2 ss)
+ '(3 font-lock-string-face)
+ (list 4 ss))
+ (list reftex-index-phrases-phrase-regexp2
+ '(1 font-lock-keyword-face)
+ (list 2 ss)
+ '(3 font-lock-string-face)
+ (list 4 ss)
+ '(5 font-lock-function-name-face))
+ (cons "^\t$" ss)))
(setq reftex-index-phrases-font-lock-defaults
- '((reftex-index-phrases-font-lock-keywords)
- nil t nil beginning-of-line))
- (put 'reftex-index-phrases-mode 'font-lock-defaults
+ '((reftex-index-phrases-font-lock-keywords)
+ nil t nil beginning-of-line))
+ (put 'reftex-index-phrases-mode 'font-lock-defaults
reftex-index-phrases-font-lock-defaults) ; XEmacs
)
(decf arg)
(end-of-line)
(if (re-search-forward reftex-index-phrases-phrase-regexp12 nil t)
- (progn
- (goto-char (match-beginning 0))
- (reftex-index-this-phrase))
+ (progn
+ (goto-char (match-beginning 0))
+ (reftex-index-this-phrase))
(error "No more phrase lines after point"))))
(defun reftex-index-this-phrase ()
(save-excursion
(beginning-of-line)
(cond ((looking-at reftex-index-phrases-comment-regexp)
- (if (interactive-p) (error "Comment line")))
- ((looking-at "^[ \t]*$")
- (if (interactive-p) (error "Empty line")))
- ((looking-at reftex-index-phrases-macrodef-regexp)
- (if (interactive-p) (error "Macro definition line")))
- ((looking-at reftex-index-phrases-phrase-regexp12)
- ;; This is a phrase
- (let* ((char (if (not (equal (match-string 1) ""))
- (string-to-char (match-string 1))))
- (phrase (match-string 3))
- (index-key (match-string 6))
- (macro-data (cdr (if (null char)
- (car reftex-index-phrases-macro-data)
- (assoc char reftex-index-phrases-macro-data))))
- (macro-fmt (car macro-data))
- (repeat (nth 1 macro-data))
- (files
- (cond ((and (stringp reftex-index-phrases-restrict-file)
- (file-regular-p reftex-index-phrases-restrict-file))
- (list reftex-index-phrases-restrict-file))
- ((stringp reftex-index-phrases-restrict-file)
- (error "Illegal restriction file %s"
- reftex-index-phrases-restrict-file))
- (t reftex-index-phrases-files)))
- (as-words reftex-index-phrases-search-whole-words))
- (unless macro-data
- (error "No macro associated with key %c" char))
- (unwind-protect
- (let ((overlay-arrow-string "=>")
- (overlay-arrow-position
- reftex-index-phrases-marker)
- (replace-count 0))
- ;; Show the overlay arrow
- (move-marker reftex-index-phrases-marker
- (match-beginning 0) (current-buffer))
- ;; Start the query-replace
- (reftex-query-index-phrase-globally
- files phrase macro-fmt
- index-key repeat as-words)
- (message "%s replaced"
- (reftex-number replace-count "occurrence"))))))
- (t (error "Cannot parse this line")))))
+ (if (interactive-p) (error "Comment line")))
+ ((looking-at "^[ \t]*$")
+ (if (interactive-p) (error "Empty line")))
+ ((looking-at reftex-index-phrases-macrodef-regexp)
+ (if (interactive-p) (error "Macro definition line")))
+ ((looking-at reftex-index-phrases-phrase-regexp12)
+ ;; This is a phrase
+ (let* ((char (if (not (equal (match-string 1) ""))
+ (string-to-char (match-string 1))))
+ (phrase (match-string 3))
+ (index-key (match-string 6))
+ (macro-data (cdr (if (null char)
+ (car reftex-index-phrases-macro-data)
+ (assoc char reftex-index-phrases-macro-data))))
+ (macro-fmt (car macro-data))
+ (repeat (nth 1 macro-data))
+ (files
+ (cond ((and (stringp reftex-index-phrases-restrict-file)
+ (file-regular-p reftex-index-phrases-restrict-file))
+ (list reftex-index-phrases-restrict-file))
+ ((stringp reftex-index-phrases-restrict-file)
+ (error "Illegal restriction file %s"
+ reftex-index-phrases-restrict-file))
+ (t reftex-index-phrases-files)))
+ (as-words reftex-index-phrases-search-whole-words))
+ (unless macro-data
+ (error "No macro associated with key %c" char))
+ (unwind-protect
+ (let ((overlay-arrow-string "=>")
+ (overlay-arrow-position
+ reftex-index-phrases-marker)
+ (replace-count 0))
+ ;; Show the overlay arrow
+ (move-marker reftex-index-phrases-marker
+ (match-beginning 0) (current-buffer))
+ ;; Start the query-replace
+ (reftex-query-index-phrase-globally
+ files phrase macro-fmt
+ index-key repeat as-words)
+ (message "%s replaced"
+ (reftex-number replace-count "occurrence"))))))
+ (t (error "Cannot parse this line")))))
(defun reftex-index-all-phrases ()
"Index all phrases in the phrases buffer.
(reftex-index-phrases-parse-header t)
(goto-char beg)
(while (not (or (eobp)
- (>= (point) end)))
+ (>= (point) end)))
(save-excursion (reftex-index-this-phrase))
(beginning-of-line 2)))
Also switches to the LaTeX document to find out which files belong to
the document and stores the list in `reftex-index-phrases-files'."
(let* ((master (reftex-index-phrase-tex-master))
- buf)
+ buf)
(if get-files
- ;; Get the file list
- (save-excursion
- (setq buf (reftex-get-file-buffer-force master))
- (unless buf (error "Master file %s not found" master))
- (set-buffer buf)
- (reftex-access-scan-info)
- (setq reftex-index-phrases-files
- (reftex-all-document-files))))
+ ;; Get the file list
+ (save-excursion
+ (setq buf (reftex-get-file-buffer-force master))
+ (unless buf (error "Master file %s not found" master))
+ (set-buffer buf)
+ (reftex-access-scan-info)
+ (setq reftex-index-phrases-files
+ (reftex-all-document-files))))
;; Parse the files header for macro definitions
(setq reftex-index-phrases-macro-data nil)
(save-excursion
(goto-char (point-min))
(while (re-search-forward reftex-index-phrases-macrodef-regexp nil t)
- (push (list
- (string-to-char (match-string 2))
- (match-string 4)
- (equal (match-string 6) "t"))
- reftex-index-phrases-macro-data))
+ (push (list
+ (string-to-char (match-string 2))
+ (match-string 4)
+ (equal (match-string 6) "t"))
+ reftex-index-phrases-macro-data))
;; Reverse the list, so that the first macro is first
(if (null reftex-index-phrases-macro-data)
- (error "No valid MACRO DEFINITION line in %s file (make sure to use TAB separators)" reftex-index-phrase-file-extension))
- (setq reftex-index-phrases-macro-data
- (nreverse reftex-index-phrases-macro-data))
+ (error "No valid MACRO DEFINITION line in %s file (make sure to use TAB separators)" reftex-index-phrase-file-extension))
+ (setq reftex-index-phrases-macro-data
+ (nreverse reftex-index-phrases-macro-data))
(goto-char (point-min)))))
(defun reftex-index-phrases-apply-to-region (beg end)
index the new part without having to go over the unchanged parts again."
(interactive "r")
(let ((win-conf (current-window-configuration))
- (reftex-index-phrases-restrict-file (buffer-file-name)))
+ (reftex-index-phrases-restrict-file (buffer-file-name)))
(save-excursion
(save-restriction
(narrow-to-region beg end)
(unwind-protect
- (progn
- ;; Hide the region highlighting
- (cond ((fboundp 'zmacs-deactivate-region) (zmacs-deactivate-region))
- ((fboundp 'deactivate-mark) (deactivate-mark)))
- (delete-other-windows)
- (reftex-index-visit-phrases-buffer)
- (reftex-index-all-phrases))
- (set-window-configuration win-conf))))))
+ (progn
+ ;; Hide the region highlighting
+ (cond ((fboundp 'zmacs-deactivate-region) (zmacs-deactivate-region))
+ ((fboundp 'deactivate-mark) (deactivate-mark)))
+ (delete-other-windows)
+ (reftex-index-visit-phrases-buffer)
+ (reftex-index-all-phrases))
+ (set-window-configuration win-conf))))))
(defun reftex-index-new-phrase (&optional text)
"Open a new line in the phrases buffer, insert TEXT."
(interactive)
(if (and text (stringp text))
(progn
- ;; Check if the phrase is already in the buffer
- (setq text (reftex-index-simplify-phrase text))
- (goto-char (point-min))
- (if (re-search-forward
- (concat "^\\(\\S-*\\)\t\\(" (regexp-quote text)
- "\\) *[\t\n]") nil t)
- (progn
- (goto-char (match-end 2))
- (error "Phrase is already in phrases buffer")))))
+ ;; Check if the phrase is already in the buffer
+ (setq text (reftex-index-simplify-phrase text))
+ (goto-char (point-min))
+ (if (re-search-forward
+ (concat "^\\(\\S-*\\)\t\\(" (regexp-quote text)
+ "\\) *[\t\n]") nil t)
+ (progn
+ (goto-char (match-end 2))
+ (error "Phrase is already in phrases buffer")))))
;; Add the new phrase line after the last in the buffer
(goto-char (point-max))
(if (re-search-backward reftex-index-phrases-phrase-regexp12 nil t)
this function repeatedly."
(interactive "P")
(if (catch 'exit
- (while (re-search-forward reftex-index-phrases-phrase-regexp12 nil t)
- (goto-char (match-beginning 3))
- (let* ((phrase (match-string 3))
- (case-fold-search reftex-index-phrases-case-fold-search)
- (re (reftex-index-phrases-find-dup-re phrase t)))
- (if (save-excursion
- (goto-char (point-min))
- (and (re-search-forward re nil t)
- (re-search-forward re nil t)))
- (throw 'exit t)))))
+ (while (re-search-forward reftex-index-phrases-phrase-regexp12 nil t)
+ (goto-char (match-beginning 3))
+ (let* ((phrase (match-string 3))
+ (case-fold-search reftex-index-phrases-case-fold-search)
+ (re (reftex-index-phrases-find-dup-re phrase t)))
+ (if (save-excursion
+ (goto-char (point-min))
+ (and (re-search-forward re nil t)
+ (re-search-forward re nil t)))
+ (throw 'exit t)))))
(progn
- (reftex-index-phrases-info)
- (message "Phrase with match conflict discovered"))
+ (reftex-index-phrases-info)
+ (message "Phrase with match conflict discovered"))
(goto-char (point-max))
(error "No further problematic phrases found")))
(error "Not a phrase line"))
(save-match-data (reftex-index-phrases-parse-header t))
(let* ((char (if (not (equal (match-string 1) ""))
- (string-to-char (match-string 1))))
- (phrase (match-string 3))
- (index-key (match-string 6))
- (index-keys (split-string
- (or index-key phrase)
- reftex-index-phrases-logical-or-regexp))
- (macro-data (cdr (if (null char)
- (car reftex-index-phrases-macro-data)
- (assoc char reftex-index-phrases-macro-data))))
- (macro-fmt (car macro-data))
- (repeat (nth 1 macro-data))
- (as-words reftex-index-phrases-search-whole-words)
- (example (reftex-index-make-replace-string
- macro-fmt (downcase phrase) (car index-keys) repeat))
- (re (reftex-index-make-phrase-regexp phrase as-words t))
- (re1 (reftex-index-phrases-find-dup-re phrase))
- (re2 (reftex-index-phrases-find-dup-re phrase 'sub))
- superphrases
- (nmatches 0)
- (ntimes1 0)
- (ntimes2 0)
- (case-fold-search reftex-index-phrases-case-fold-search)
- file files buf)
+ (string-to-char (match-string 1))))
+ (phrase (match-string 3))
+ (index-key (match-string 6))
+ (index-keys (split-string
+ (or index-key phrase)
+ reftex-index-phrases-logical-or-regexp))
+ (macro-data (cdr (if (null char)
+ (car reftex-index-phrases-macro-data)
+ (assoc char reftex-index-phrases-macro-data))))
+ (macro-fmt (car macro-data))
+ (repeat (nth 1 macro-data))
+ (as-words reftex-index-phrases-search-whole-words)
+ (example (reftex-index-make-replace-string
+ macro-fmt (downcase phrase) (car index-keys) repeat))
+ (re (reftex-index-make-phrase-regexp phrase as-words t))
+ (re1 (reftex-index-phrases-find-dup-re phrase))
+ (re2 (reftex-index-phrases-find-dup-re phrase 'sub))
+ superphrases
+ (nmatches 0)
+ (ntimes1 0)
+ (ntimes2 0)
+ (case-fold-search reftex-index-phrases-case-fold-search)
+ file files buf)
(setq files reftex-index-phrases-files)
(save-excursion
- (save-restriction
- (widen)
- (goto-char (point-min))
- (while (re-search-forward re1 nil t)
- (incf ntimes1))
- (goto-char (point-min))
- (while (re-search-forward re2 nil t)
- (push (cons (count-lines 1 (point)) (match-string 1)) superphrases)
- (incf ntimes2))))
+ (save-restriction
+ (widen)
+ (goto-char (point-min))
+ (while (re-search-forward re1 nil t)
+ (incf ntimes1))
+ (goto-char (point-min))
+ (while (re-search-forward re2 nil t)
+ (push (cons (count-lines 1 (point)) (match-string 1)) superphrases)
+ (incf ntimes2))))
(save-excursion
- (while (setq file (pop files))
- (setq buf (reftex-get-file-buffer-force file))
- (when buf
- (set-buffer buf)
- (save-excursion
- (save-restriction
- (widen)
- (goto-char (point-min))
- (let ((case-fold-search reftex-index-phrases-case-fold-search))
- (while (re-search-forward re nil t)
- (or (reftex-in-comment)
- (incf nmatches)))))))))
+ (while (setq file (pop files))
+ (setq buf (reftex-get-file-buffer-force file))
+ (when buf
+ (set-buffer buf)
+ (save-excursion
+ (save-restriction
+ (widen)
+ (goto-char (point-min))
+ (let ((case-fold-search reftex-index-phrases-case-fold-search))
+ (while (re-search-forward re nil t)
+ (or (reftex-in-comment)
+ (incf nmatches)))))))))
(with-output-to-temp-buffer "*Help*"
- (princ (format " Phrase: %s\n" phrase))
- (princ (format " Macro key: %s\n" char))
- (princ (format " Macro format: %s\n" macro-fmt))
- (princ (format " Repeat: %s\n" repeat))
- (cond
- (index-key
- (let ((iks index-keys) (cnt 0) ik)
- (while (setq ik (pop iks))
- (princ (format "Index entry %d: %s\n" (incf cnt) ik)))))
- (repeat
- (princ (format " Index entry: %s\n" phrase)))
- (t
- (princ (format " Index key: <<Given by the match>>\n"))))
- (princ (format " Example: %s\n" example))
- (terpri)
- (princ (format "Total matches: %s in %s\n"
- (reftex-number nmatches "match" "es")
- (reftex-number (length reftex-index-phrases-files)
- "LaTeX file")))
- (princ (format " Uniqueness: Phrase occurs %s in phrase buffer\n"
- (reftex-number ntimes1 "time")))
- (if (> ntimes2 1)
- (progn
- (princ (format " Superphrases: Phrase matches the following %s in the phrase buffer:\n"
- (reftex-number ntimes2 "line")))
- (mapcar (lambda(x)
- (princ (format " Line %4d: %s\n" (car x) (cdr x))))
- (nreverse superphrases))))))))
+ (princ (format " Phrase: %s\n" phrase))
+ (princ (format " Macro key: %s\n" char))
+ (princ (format " Macro format: %s\n" macro-fmt))
+ (princ (format " Repeat: %s\n" repeat))
+ (cond
+ (index-key
+ (let ((iks index-keys) (cnt 0) ik)
+ (while (setq ik (pop iks))
+ (princ (format "Index entry %d: %s\n" (incf cnt) ik)))))
+ (repeat
+ (princ (format " Index entry: %s\n" phrase)))
+ (t
+ (princ (format " Index key: <<Given by the match>>\n"))))
+ (princ (format " Example: %s\n" example))
+ (terpri)
+ (princ (format "Total matches: %s in %s\n"
+ (reftex-number nmatches "match" "es")
+ (reftex-number (length reftex-index-phrases-files)
+ "LaTeX file")))
+ (princ (format " Uniqueness: Phrase occurs %s in phrase buffer\n"
+ (reftex-number ntimes1 "time")))
+ (if (> ntimes2 1)
+ (progn
+ (princ (format " Superphrases: Phrase matches the following %s in the phrase buffer:\n"
+ (reftex-number ntimes2 "line")))
+ (mapcar (lambda(x)
+ (princ (format " Line %4d: %s\n" (car x) (cdr x))))
+ (nreverse superphrases))))))))
(defun reftex-index-phrases-set-macro-key ()
"Change the macro key for the current line.
(save-excursion
(beginning-of-line)
(unless (or (looking-at reftex-index-phrases-phrase-regexp12)
- (looking-at "\t"))
+ (looking-at "\t"))
(error "This is not a phrase line"))
(let* ((nc (reftex-index-select-phrases-macro 0))
- (macro-data (assoc nc reftex-index-phrases-macro-data))
- macro-fmt repeat)
+ (macro-data (assoc nc reftex-index-phrases-macro-data))
+ macro-fmt repeat)
(cond (macro-data)
- ((equal nc ?\ )
- (setq nc ""
- macro-data (car reftex-index-phrases-macro-data)))
- ((equal nc ?\C-m)
- (setq nc (char-after (point)))
- (if (equal nc ?\t)
- (setq nc ""
- macro-data (car reftex-index-phrases-macro-data))
- (setq macro-data (assoc nc reftex-index-phrases-macro-data))))
- (t (error "No macro associated with %c" nc)))
+ ((equal nc ?\ )
+ (setq nc ""
+ macro-data (car reftex-index-phrases-macro-data)))
+ ((equal nc ?\C-m)
+ (setq nc (char-after (point)))
+ (if (equal nc ?\t)
+ (setq nc ""
+ macro-data (car reftex-index-phrases-macro-data))
+ (setq macro-data (assoc nc reftex-index-phrases-macro-data))))
+ (t (error "No macro associated with %c" nc)))
(setq macro-fmt (nth 1 macro-data)
- repeat (nth 2 macro-data))
+ repeat (nth 2 macro-data))
(if macro-data
- (progn
- (if (looking-at "[^\t]") (delete-char 1))
- (insert nc)
- (message "Line will use %s %s repeat" macro-fmt
- (if repeat "with" "without")))
- (error "Abort")))))
+ (progn
+ (if (looking-at "[^\t]") (delete-char 1))
+ (insert nc)
+ (message "Line will use %s %s repeat" macro-fmt
+ (if repeat "with" "without")))
+ (error "Abort")))))
(defun reftex-index-sort-phrases (&optional chars-first)
"Sort the phrases lines in the buffer alphabetically.
(interactive "P")
;; Remember the current line, so that we can return
(let ((line (buffer-substring (progn (beginning-of-line) (point))
- (progn (end-of-line) (point))))
- beg end)
+ (progn (end-of-line) (point))))
+ beg end)
(goto-char (point-min))
;; Find first and last phrase line in buffer
- (setq beg
- (and (re-search-forward reftex-index-phrases-phrase-regexp12 nil t)
- (match-beginning 0)))
+ (setq beg
+ (and (re-search-forward reftex-index-phrases-phrase-regexp12 nil t)
+ (match-beginning 0)))
(goto-char (point-max))
(setq end (re-search-backward reftex-index-phrases-phrase-regexp12 nil t))
(if end (setq end (progn (goto-char end) (end-of-line) (point))))
;; Take the lines, sort them and re-insert.
(if (and beg end)
- (progn
- (message "Sorting lines...")
- (let* ((lines (split-string (buffer-substring beg end) "\n"))
- (lines1 (sort lines 'reftex-compare-phrase-lines)))
- (message "Sorting lines...done")
- (let ((inhibit-quit t)) ;; make sure we do not loose lines
- (delete-region beg end)
- (insert (mapconcat 'identity lines1 "\n"))))
- (goto-char (point-max))
- (re-search-backward (concat "^" (regexp-quote line) "$") nil t))
+ (progn
+ (message "Sorting lines...")
+ (let* ((lines (split-string (buffer-substring beg end) "\n"))
+ (lines1 (sort lines 'reftex-compare-phrase-lines)))
+ (message "Sorting lines...done")
+ (let ((inhibit-quit t)) ;; make sure we do not loose lines
+ (delete-region beg end)
+ (insert (mapconcat 'identity lines1 "\n"))))
+ (goto-char (point-max))
+ (re-search-backward (concat "^" (regexp-quote line) "$") nil t))
(error "Cannot find phrases lines to sort"))))
(defvar chars-first)
"The comparison function used for sorting."
(let (ca cb pa pb c-p p-p)
(if (string-match reftex-index-phrases-phrase-regexp12 a)
- (progn
- ;; Extract macro char and phrase-or-key for a
- (setq ca (match-string 1 a)
- pa (downcase
- (or (and reftex-index-phrases-sort-prefers-entry
- (match-string 6 a))
- (match-string 3 a))))
- (if (string-match reftex-index-phrases-phrase-regexp12 b)
- (progn
- ;; Extract macro char and phrase-or-key for b
- (setq cb (match-string 1 b)
- pb (downcase
- (or (and reftex-index-phrases-sort-prefers-entry
- (match-string 6 b))
- (match-string 3 b))))
- (setq c-p (string< ca cb)
- p-p (string< pa pb))
- ;; Do the right comparison, based on the value of `chars-first'
- ;; `chars-first' is bound locally in the calling function
- (if chars-first
- (if (string= ca cb) p-p c-p)
- (if (string= pa pb) c-p p-p)))))
+ (progn
+ ;; Extract macro char and phrase-or-key for a
+ (setq ca (match-string 1 a)
+ pa (downcase
+ (or (and reftex-index-phrases-sort-prefers-entry
+ (match-string 6 a))
+ (match-string 3 a))))
+ (if (string-match reftex-index-phrases-phrase-regexp12 b)
+ (progn
+ ;; Extract macro char and phrase-or-key for b
+ (setq cb (match-string 1 b)
+ pb (downcase
+ (or (and reftex-index-phrases-sort-prefers-entry
+ (match-string 6 b))
+ (match-string 3 b))))
+ (setq c-p (string< ca cb)
+ p-p (string< pa pb))
+ ;; Do the right comparison, based on the value of `chars-first'
+ ;; `chars-first' is bound locally in the calling function
+ (if chars-first
+ (if (string= ca cb) p-p c-p)
+ (if (string= pa pb) c-p p-p)))))
;; If line a does not match, the answer we return determines
;; if non-matching lines are collected at the beginning.
;; When we return t here, non-matching lines form
(not reftex-index-phrases-sort-in-blocks))))
(defvar reftex-index-phrases-menu)
-(defun reftex-index-make-phrase-regexp (phrase &optional
- as-words allow-newline)
+(defun reftex-index-make-phrase-regexp (phrase &optional
+ as-words allow-newline)
"Return a regexp matching PHRASE, even if distributed over lines.
With optional arg AS-WORDS, require word boundary at beginning and end.
With optional arg ALLOW-NEWLINE, allow single newline between words."
(let* ((words (split-string phrase))
- (space-re (if allow-newline
- "\\([ \t]*\\(\n[ \t]*\\)?\\|[ \t]\\)"
- "\\([ \t]+\\)")))
+ (space-re (if allow-newline
+ "\\([ \t]*\\(\n[ \t]*\\)?\\|[ \t]\\)"
+ "\\([ \t]+\\)")))
(concat (if (and as-words (string-match "\\`\\w" (car words)))
- "\\<" "")
- (mapconcat (lambda (w) (regexp-quote (downcase w)))
- words space-re)
- (if (and as-words
- (string-match "\\w\\'" (nth (1- (length words)) words)))
- "\\>" ""))))
+ "\\<" "")
+ (mapconcat (lambda (w) (regexp-quote (downcase w)))
+ words space-re)
+ (if (and as-words
+ (string-match "\\w\\'" (nth (1- (length words)) words)))
+ "\\>" ""))))
(defun reftex-index-simplify-phrase (phrase)
"Make phrase single spaces and single line."
When SUB ins non-nil, the regexp will also match when PHRASE is a subphrase
of another phrase. The regexp works lonly in the phrase buffer."
(concat (if sub "^\\S-?\t\\([^\t\n]*" "^\\S-?\t")
- (mapconcat 'regexp-quote (split-string phrase) " +")
- (if sub "[^\t\n]*\\)\\([\t\n]\\|$\\)" " *\\([\t\n]\\|$\\)")))
+ (mapconcat 'regexp-quote (split-string phrase) " +")
+ (if sub "[^\t\n]*\\)\\([\t\n]\\|$\\)" " *\\([\t\n]\\|$\\)")))
(defun reftex-index-make-replace-string (macro-fmt match index-key
- &optional repeat mathp)
+ &optional repeat mathp)
"Return the string which can be used as replacement.
Treats the logical `and' for index phrases."
(let ((index-keys (split-string (or index-key match)
- reftex-index-phrases-logical-and-regexp)))
+ reftex-index-phrases-logical-and-regexp)))
(concat
- (mapconcat (lambda (x)
- (format macro-fmt
- (format (if mathp reftex-index-math-format "%s") x)))
- index-keys "")
+ (mapconcat (lambda (x)
+ (format macro-fmt
+ (format (if mathp reftex-index-math-format "%s") x)))
+ index-keys "")
(if repeat (reftex-index-simplify-phrase match) ""))))
(defun reftex-query-index-phrase-globally (files &rest args)
"Call `reftex-query-index-phrase' for all files in FILES."
(let ((win-conf (current-window-configuration))
- (file))
+ (file))
(unless files (error "No files"))
(unwind-protect
- (progn
- (switch-to-buffer-other-window (reftex-get-file-buffer-force
- (car files)))
- (catch 'no-more-files
- (while (setq file (pop files))
- (switch-to-buffer (reftex-get-file-buffer-force file))
- (save-excursion
- (save-restriction
- (unless (stringp reftex-index-phrases-restrict-file)
- (widen))
- (goto-char (point-min))
- (apply 'reftex-query-index-phrase args))))))
+ (progn
+ (switch-to-buffer-other-window (reftex-get-file-buffer-force
+ (car files)))
+ (catch 'no-more-files
+ (while (setq file (pop files))
+ (switch-to-buffer (reftex-get-file-buffer-force file))
+ (save-excursion
+ (save-restriction
+ (unless (stringp reftex-index-phrases-restrict-file)
+ (widen))
+ (goto-char (point-min))
+ (apply 'reftex-query-index-phrase args))))))
(reftex-unhighlight 0)
(set-window-configuration win-conf))))
(defvar replace-count)
(defun reftex-query-index-phrase (phrase macro-fmt &optional
- index-key repeat as-words)
+ index-key repeat as-words)
"Search through buffer for PHRASE, and offer to replace it with an indexed
version. The index version is derived by applying `format' with MACRO-FMT
to INDEX-KEY or PHRASE. When REPEAT is non-nil, the PHRASE is inserted
AS-WORDS means, the search for PHRASE should require word boundaries at
both ends."
(let* ((re (reftex-index-make-phrase-regexp phrase as-words 'allow-newline))
- (case-fold-search reftex-index-phrases-case-fold-search)
- (index-keys (split-string
- (or index-key phrase)
- reftex-index-phrases-logical-or-regexp))
- (nkeys (length index-keys))
- (ckey (nth 0 index-keys))
- (all-yes nil)
- match rpl char beg end mathp)
+ (case-fold-search reftex-index-phrases-case-fold-search)
+ (index-keys (split-string
+ (or index-key phrase)
+ reftex-index-phrases-logical-or-regexp))
+ (nkeys (length index-keys))
+ (ckey (nth 0 index-keys))
+ (all-yes nil)
+ match rpl char beg end mathp)
(unwind-protect
- (while (re-search-forward re nil t)
- (catch 'next-match
- (if (and (fboundp reftex-index-verify-function)
- (not (funcall reftex-index-verify-function)))
- (throw 'next-match nil))
- (setq match (match-string 0))
- (setq mathp
- (save-match-data
- (condition-case nil (texmathp) (error nil))))
- (setq beg (car (match-data))
- end (nth 1 (match-data)))
- (if (and reftex-index-phrases-skip-indexed-matches
- (save-match-data
- (reftex-index-phrase-match-is-indexed beg
- end)))
- (throw 'next-match nil))
- (reftex-highlight 0 (match-beginning 0) (match-end 0))
- (setq rpl
- (save-match-data
- (reftex-index-make-replace-string
- macro-fmt (match-string 0) ckey repeat mathp)))
- (while
- (not
- (catch 'loop
- (message "REPLACE: %s? (yn!qoe%s?)"
- rpl
- (if (> nkeys 1)
- (concat "1-" (int-to-string nkeys))
- ""))
- (setq char (if all-yes ?y (read-char-exclusive)))
- (cond ((member char '(?y ?Y ?\ ))
- ;; Yes!
- (replace-match rpl t t)
- (incf replace-count)
- ;; See if we should insert newlines to shorten lines
- (and reftex-index-phrases-wrap-long-lines
- (reftex-index-phrases-fixup-line beg end))
- (throw 'loop t))
- ((member char '(?n ?N ?\C-h ?\C-?));; FIXME: DEL
- ;; No
- (throw 'loop t))
- ((equal char ?!)
- ;; Yes for all in this buffer
- (setq all-yes t))
- ((equal char ?q)
- ;; Stop this one in this file
- (goto-char (point-max))
- (throw 'loop t))
- ((equal char ?Q)
- ;; Stop this one
- (throw 'no-more-files t))
- ((equal char ?s)
- (save-buffer))
- ((equal char ?S)
- (reftex-save-all-document-buffers))
- ((equal char ?\C-g)
- (keyboard-quit))
- ((member char '(?o ?O))
- ;; Select a differnt macro
- (let* ((nc (reftex-index-select-phrases-macro 2))
- (macro-data
- (cdr (assoc nc reftex-index-phrases-macro-data)))
- (macro-fmt (car macro-data))
- (repeat (nth 1 macro-data)))
- (if macro-data
- (setq rpl (save-match-data
- (reftex-index-make-replace-string
- macro-fmt match
- ckey repeat mathp)))
- (ding))))
- ((equal char ?\?)
- ;; Help
- (with-output-to-temp-buffer "*Help*"
- (princ reftex-index-phrases-help)))
- ((equal char ?\C-r)
- ;; Recursive edit
- (save-match-data
- (save-excursion
- (message
- (substitute-command-keys
- "Recursive edit. Resume with \\[exit-recursive-edit]"))
- (recursive-edit))))
- ((equal char ?e)
- (setq rpl (read-string "Edit: " rpl)))
- ((equal char ?0)
- (setq ckey (or index-key phrase)
- rpl (save-match-data
- (reftex-index-make-replace-string
- macro-fmt match ckey repeat mathp))))
- ((and (> char ?0)
- (<= char (+ ?0 nkeys)))
- (setq ckey (nth (1- (- char ?0)) index-keys)
- rpl (save-match-data
- (reftex-index-make-replace-string
- macro-fmt match ckey repeat mathp))))
- (t (ding)))
- nil)))))
+ (while (re-search-forward re nil t)
+ (catch 'next-match
+ (if (and (fboundp reftex-index-verify-function)
+ (not (funcall reftex-index-verify-function)))
+ (throw 'next-match nil))
+ (setq match (match-string 0))
+ (setq mathp
+ (save-match-data
+ (condition-case nil (texmathp) (error nil))))
+ (setq beg (car (match-data))
+ end (nth 1 (match-data)))
+ (if (and reftex-index-phrases-skip-indexed-matches
+ (save-match-data
+ (reftex-index-phrase-match-is-indexed beg
+ end)))
+ (throw 'next-match nil))
+ (reftex-highlight 0 (match-beginning 0) (match-end 0))
+ (setq rpl
+ (save-match-data
+ (reftex-index-make-replace-string
+ macro-fmt (match-string 0) ckey repeat mathp)))
+ (while
+ (not
+ (catch 'loop
+ (message "REPLACE: %s? (yn!qoe%s?)"
+ rpl
+ (if (> nkeys 1)
+ (concat "1-" (int-to-string nkeys))
+ ""))
+ (setq char (if all-yes ?y (read-char-exclusive)))
+ (cond ((member char '(?y ?Y ?\ ))
+ ;; Yes!
+ (replace-match rpl t t)
+ (incf replace-count)
+ ;; See if we should insert newlines to shorten lines
+ (and reftex-index-phrases-wrap-long-lines
+ (reftex-index-phrases-fixup-line beg end))
+ (throw 'loop t))
+ ((member char '(?n ?N ?\C-h ?\C-?));; FIXME: DEL
+ ;; No
+ (throw 'loop t))
+ ((equal char ?!)
+ ;; Yes for all in this buffer
+ (setq all-yes t))
+ ((equal char ?q)
+ ;; Stop this one in this file
+ (goto-char (point-max))
+ (throw 'loop t))
+ ((equal char ?Q)
+ ;; Stop this one
+ (throw 'no-more-files t))
+ ((equal char ?s)
+ (save-buffer))
+ ((equal char ?S)
+ (reftex-save-all-document-buffers))
+ ((equal char ?\C-g)
+ (keyboard-quit))
+ ((member char '(?o ?O))
+ ;; Select a differnt macro
+ (let* ((nc (reftex-index-select-phrases-macro 2))
+ (macro-data
+ (cdr (assoc nc reftex-index-phrases-macro-data)))
+ (macro-fmt (car macro-data))
+ (repeat (nth 1 macro-data)))
+ (if macro-data
+ (setq rpl (save-match-data
+ (reftex-index-make-replace-string
+ macro-fmt match
+ ckey repeat mathp)))
+ (ding))))
+ ((equal char ?\?)
+ ;; Help
+ (with-output-to-temp-buffer "*Help*"
+ (princ reftex-index-phrases-help)))
+ ((equal char ?\C-r)
+ ;; Recursive edit
+ (save-match-data
+ (save-excursion
+ (message
+ (substitute-command-keys
+ "Recursive edit. Resume with \\[exit-recursive-edit]"))
+ (recursive-edit))))
+ ((equal char ?e)
+ (setq rpl (read-string "Edit: " rpl)))
+ ((equal char ?0)
+ (setq ckey (or index-key phrase)
+ rpl (save-match-data
+ (reftex-index-make-replace-string
+ macro-fmt match ckey repeat mathp))))
+ ((and (> char ?0)
+ (<= char (+ ?0 nkeys)))
+ (setq ckey (nth (1- (- char ?0)) index-keys)
+ rpl (save-match-data
+ (reftex-index-make-replace-string
+ macro-fmt match ckey repeat mathp))))
+ (t (ding)))
+ nil)))))
(message "")
(setq all-yes nil)
(reftex-unhighlight 0))))
(defun reftex-index-phrase-match-is-indexed (beg end)
- ;; CHeck if match is in an argument of an index macro, or if an
- ;; index macro is directly attached to the match.
(save-excursion
(goto-char end)
- (let* ((all-macros (reftex-what-macro t))
- (this-macro (car (car all-macros)))
- (before-macro
- (and (> beg 2)
- (goto-char (1- beg))
- (memq (char-after (point)) '(?\] ?\}))
- (car (reftex-what-macro 1))))
- (after-macro
- (and (goto-char end)
- (looking-at "\\(\\\\[a-zA-Z]+\\*?\\)[[{]")
- (match-string 1)))
- macro)
- (or (catch 'matched
- (while (setq macro (pop all-macros))
- (if (member (car macro) reftex-macros-with-index)
- (throw 'matched t)))
- nil)
- (and before-macro
- (member before-macro reftex-macros-with-index))
- (and after-macro
- (member after-macro reftex-macros-with-index))))))
+ (let* ((this-macro (car (reftex-what-macro 1)))
+ (before-char (char-before beg))
+ (after-char (char-after end))
+ (before-macro
+ (and (> beg 2)
+ (goto-char (1- beg))
+ (memq (char-after (point)) '(?\] ?\}))
+ (car (reftex-what-macro 1))))
+ (after-macro
+ (and (goto-char end)
+ (looking-at "\\(\\\\[a-zA-Z]+\\*?\\)[[{]")
+ (match-string 1))))
+ (or (and this-macro
+ (member before-char '(?\{ ?\[))
+ (member after-char '(?\} ?\]))
+ (member this-macro reftex-macros-with-index))
+ (and before-macro
+ (member before-macro reftex-macros-with-index))
+ (and after-macro
+ (member after-macro reftex-macros-with-index))))))
+
(defun reftex-index-phrases-fixup-line (beg end)
"Insert newlines before BEG and/or after END to shorten line."
(goto-char beg)
(skip-chars-backward "^ \n")
(if (and (equal (preceding-char) ?\ )
- (string-match "\\S-" (buffer-substring bol (point))))
- (setq space1 (1- (point))))
+ (string-match "\\S-" (buffer-substring bol (point))))
+ (setq space1 (1- (point))))
(goto-char end)
(skip-chars-forward "^ \n")
(if (and (equal (following-char) ?\ )
- (string-match "\\S-" (buffer-substring (point) eol)))
- (setq space2 (point)))
+ (string-match "\\S-" (buffer-substring (point) eol)))
+ (setq space2 (point)))
;; Now check what we have and insert the newlines
(if (<= (- eol bol) fill-column)
- ;; Line is already short
- nil
- (cond
- ((and (not space1) (not space2))) ; No spaces available
- ((not space2) ; Do space1
- (reftex-index-phrases-replace-space space1))
- ((not space1) ; Do space2
- (reftex-index-phrases-replace-space space2))
- (t ; We have both spaces
- (let ((l1 (- space1 bol))
- (l2 (- space2 space1))
- (l3 (- eol space2)))
- (if (> l2 fill-column)
- ;; The central part alone is more than one line
- (progn
- (reftex-index-phrases-replace-space space1)
- (reftex-index-phrases-replace-space space2))
- (if (> (+ l1 l2) fill-column)
- ;; Need to split beginning
- (reftex-index-phrases-replace-space space1))
- (if (> (+ l2 l3) fill-column)
- ;; Need to split end
- (reftex-index-phrases-replace-space space2))))))))))
+ ;; Line is already short
+ nil
+ (cond
+ ((and (not space1) (not space2))) ; No spaces available
+ ((not space2) ; Do space1
+ (reftex-index-phrases-replace-space space1))
+ ((not space1) ; Do space2
+ (reftex-index-phrases-replace-space space2))
+ (t ; We have both spaces
+ (let ((l1 (- space1 bol))
+ (l2 (- space2 space1))
+ (l3 (- eol space2)))
+ (if (> l2 fill-column)
+ ;; The central part alone is more than one line
+ (progn
+ (reftex-index-phrases-replace-space space1)
+ (reftex-index-phrases-replace-space space2))
+ (if (> (+ l1 l2) fill-column)
+ ;; Need to split beginning
+ (reftex-index-phrases-replace-space space1))
+ (if (> (+ l2 l3) fill-column)
+ ;; Need to split end
+ (reftex-index-phrases-replace-space space2))))))))))
(defun reftex-index-phrases-replace-space (pos)
"If there is a space at POS, replace it with a newline char.
(defun reftex-index-select-phrases-macro (&optional delay)
"Offer a list of possible index macros and have the user select one."
(let* ((prompt (concat "Select macro: ["
- (mapconcat (lambda (x) (char-to-string (car x)))
- reftex-index-phrases-macro-data "")
- "] "))
- (help (concat "Select an indexing macro\n========================\n"
- (mapconcat (lambda (x)
- (format " [%c] %s"
- (car x) (nth 1 x)))
- reftex-index-phrases-macro-data "\n"))))
+ (mapconcat (lambda (x) (char-to-string (car x)))
+ reftex-index-phrases-macro-data "")
+ "] "))
+ (help (concat "Select an indexing macro\n========================\n"
+ (mapconcat (lambda (x)
+ (format " [%c] %s"
+ (car x) (nth 1 x)))
+ reftex-index-phrases-macro-data "\n"))))
(reftex-select-with-char prompt help delay)))
;; Keybindings and Menu for phrases buffer
(loop for x in
'(("\C-c\C-c" . reftex-index-phrases-save-and-return)
- ("\C-c\C-x" . reftex-index-this-phrase)
- ("\C-c\C-f" . reftex-index-next-phrase)
- ("\C-c\C-r" . reftex-index-region-phrases)
- ("\C-c\C-a" . reftex-index-all-phrases)
- ("\C-c\C-d" . reftex-index-remaining-phrases)
- ("\C-c\C-s" . reftex-index-sort-phrases)
- ("\C-c\C-n" . reftex-index-new-phrase)
- ("\C-c\C-m" . reftex-index-phrases-set-macro-key)
- ("\C-c\C-i" . reftex-index-phrases-info)
- ("\C-c\C-t" . reftex-index-find-next-conflict-phrase)
- ("\C-i" . self-insert-command))
+ ("\C-c\C-x" . reftex-index-this-phrase)
+ ("\C-c\C-f" . reftex-index-next-phrase)
+ ("\C-c\C-r" . reftex-index-region-phrases)
+ ("\C-c\C-a" . reftex-index-all-phrases)
+ ("\C-c\C-d" . reftex-index-remaining-phrases)
+ ("\C-c\C-s" . reftex-index-sort-phrases)
+ ("\C-c\C-n" . reftex-index-new-phrase)
+ ("\C-c\C-m" . reftex-index-phrases-set-macro-key)
+ ("\C-c\C-i" . reftex-index-phrases-info)
+ ("\C-c\C-t" . reftex-index-find-next-conflict-phrase)
+ ("\C-i" . self-insert-command))
do (define-key reftex-index-phrases-map (car x) (cdr x)))
-(easy-menu-define
+(easy-menu-define
reftex-index-phrases-menu reftex-index-phrases-map
"Menu for Phrases buffer"
'("Phrases"
["by Index Entry" (setq reftex-index-phrases-sort-prefers-entry t)
:style radio :selected reftex-index-phrases-sort-prefers-entry]
["in Blocks" (setq reftex-index-phrases-sort-in-blocks
- (not reftex-index-phrases-sort-in-blocks))
+ (not reftex-index-phrases-sort-in-blocks))
:style toggle :selected reftex-index-phrases-sort-in-blocks])
["Describe Phrase" reftex-index-phrases-info t]
["Next Phrase Conflict" reftex-index-find-next-conflict-phrase t]
"--"
"Options"
["Match Whole Words" (setq reftex-index-phrases-search-whole-words
- (not reftex-index-phrases-search-whole-words))
+ (not reftex-index-phrases-search-whole-words))
:style toggle :selected reftex-index-phrases-search-whole-words]
["Case Sensitive Search" (setq reftex-index-phrases-case-fold-search
- (not reftex-index-phrases-case-fold-search))
+ (not reftex-index-phrases-case-fold-search))
:style toggle :selected (not
- reftex-index-phrases-case-fold-search)]
+ reftex-index-phrases-case-fold-search)]
["Wrap Long Lines" (setq reftex-index-phrases-wrap-long-lines
- (not reftex-index-phrases-wrap-long-lines))
+ (not reftex-index-phrases-wrap-long-lines))
:style toggle :selected reftex-index-phrases-wrap-long-lines]
["Skip Indexed Matches" (setq reftex-index-phrases-skip-indexed-matches
- (not reftex-index-phrases-skip-indexed-matches))
+ (not reftex-index-phrases-skip-indexed-matches))
:style toggle :selected reftex-index-phrases-skip-indexed-matches])
"--"
["Save and Return" reftex-index-phrases-save-and-return t]))
-;;; arch-tag: 4b2362af-c156-42c1-8932-ea2823e205c1
;;; reftex-index.el ends here
;;; reftex-parse.el --- parser functions for RefTeX
-;; Copyright (c) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
+;; Copyright (c) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
-;; Version: 4.21
+;; Version: 4.18
;;
;; This file is part of GNU Emacs.
(defmacro reftex-with-special-syntax (&rest body)
`(let ((saved-syntax (syntax-table)))
(unwind-protect
- (progn
- (set-syntax-table reftex-syntax-table)
- (let ((case-fold-search nil))
- ,@body))
+ (progn
+ (set-syntax-table reftex-syntax-table)
+ (let ((case-fold-search nil))
+ ,@body))
(set-syntax-table saved-syntax))))
(defun reftex-parse-one ()
(let* ((old-list (symbol-value reftex-docstruct-symbol))
(master (reftex-TeX-master-file))
- (true-master (file-truename master))
- (master-dir (file-name-as-directory (file-name-directory master)))
+ (true-master (file-truename master))
+ (master-dir (file-name-as-directory (file-name-directory master)))
(file (or file (buffer-file-name)))
- (true-file (file-truename file))
- (bibview-cache (assq 'bibview-cache old-list))
- (index-tags (cdr (assq 'index-tags old-list)))
+ (true-file (file-truename file))
+ (bibview-cache (assq 'bibview-cache old-list))
+ (index-tags (cdr (assq 'index-tags old-list)))
from-file appendix docstruct tmp)
;; Make sure replacement is really an option here
;; Find active toc entry and initialize section-numbers
(setq reftex-active-toc (reftex-last-assoc-before-elt
- 'toc (list 'bof from-file) old-list)
- appendix (reftex-last-assoc-before-elt
- 'appendix (list 'bof from-file) old-list))
+ 'toc (list 'bof from-file) old-list)
+ appendix (reftex-last-assoc-before-elt
+ 'appendix (list 'bof from-file) old-list))
(reftex-init-section-numbers reftex-active-toc appendix)
(reftex-with-special-syntax
(save-window-excursion
(save-excursion
- (unwind-protect
- (setq docstruct
- (reftex-parse-from-file
- from-file docstruct master-dir))
- (reftex-kill-temporary-buffers)))))
+ (unwind-protect
+ (setq docstruct
+ (reftex-parse-from-file
+ from-file docstruct master-dir))
+ (reftex-kill-temporary-buffers)))))
(message "Scanning document... done")
(and index-tags (setq index-tags (sort index-tags 'string<)))
(let ((index-tag-cell (assq 'index-tags docstruct)))
(if index-tag-cell
- (setcdr index-tag-cell index-tags)
- (push (cons 'index-tags index-tags) docstruct)))
+ (setcdr index-tag-cell index-tags)
+ (push (cons 'index-tags index-tags) docstruct)))
(unless (assq 'xr docstruct)
(let* ((allxr (reftex-all-assq 'xr-doc docstruct))
- (alist (mapcar
- (lambda (x)
- (if (setq tmp (reftex-locate-file (nth 2 x) "tex"
- master-dir))
- (cons (nth 1 x) tmp)
- (message "Can't find external document %s"
- (nth 2 x))
- nil))
- allxr))
- (alist (delq nil alist))
- (allprefix (delq nil (mapcar 'car alist)))
- (regexp (if allprefix
- (concat "\\`\\("
- (mapconcat 'identity allprefix "\\|")
- "\\)")
- "\\\\\\\\\\\\"))) ; this will never match
- (push (list 'xr alist regexp) docstruct)))
+ (alist (mapcar
+ (lambda (x)
+ (if (setq tmp (reftex-locate-file (nth 2 x) "tex"
+ master-dir))
+ (cons (nth 1 x) tmp)
+ (message "Can't find external document %s"
+ (nth 2 x))
+ nil))
+ allxr))
+ (alist (delq nil alist))
+ (allprefix (delq nil (mapcar 'car alist)))
+ (regexp (if allprefix
+ (concat "\\`\\("
+ (mapconcat 'identity allprefix "\\|")
+ "\\)")
+ "\\\\\\\\\\\\"))) ; this will never match
+ (push (list 'xr alist regexp) docstruct)))
(set reftex-docstruct-symbol docstruct)
(put reftex-docstruct-symbol 'modified t)))
(catch 'exit
(setq file-found (reftex-locate-file file "tex" master-dir))
(if (and (not file-found)
- (setq buf (reftex-get-buffer-visiting file)))
- (setq file-found (buffer-file-name buf)))
+ (setq buf (reftex-get-buffer-visiting file)))
+ (setq file-found (buffer-file-name buf)))
(unless file-found
(push (list 'file-error file) docstruct)
(setq file (buffer-file-name))
(push (list 'bof file) docstruct)
- (reftex-with-special-syntax
- (save-excursion
- (save-restriction
- (widen)
- (goto-char 1)
-
- (while (re-search-forward regexp nil t)
-
- (cond
-
- ((match-end 1)
- ;; It is a label
- (push (reftex-label-info (reftex-match-string 1) file bound)
- docstruct))
-
- ((match-end 3)
- ;; It is a section
- (setq bound (point))
-
- ;; Insert in List
- (setq toc-entry (reftex-section-info file))
- (when toc-entry
- ;; It can happen that section info returns nil
- (setq level (nth 5 toc-entry))
- (setq highest-level (min highest-level level))
- (if (= level highest-level)
- (message
- "Scanning %s %s ..."
- (car (rassoc level reftex-section-levels-all))
- (nth 6 toc-entry)))
-
- (push toc-entry docstruct)
- (setq reftex-active-toc toc-entry)))
-
- ((match-end 7)
- ;; It's an include or input
- (setq include-file (reftex-match-string 7))
- ;; Test if this file should be ignored
- (unless (delq nil (mapcar
- (lambda (x) (string-match x include-file))
- reftex-no-include-regexps))
- ;; Parse it
- (setq docstruct
- (reftex-parse-from-file
- include-file
- docstruct master-dir))))
-
- ((match-end 9)
- ;; Appendix starts here
- (reftex-init-section-numbers nil t)
- (push (cons 'appendix t) docstruct))
-
- ((match-end 10)
- ;; Index entry
- (when reftex-support-index
- (setq index-entry (reftex-index-info file))
- (when index-entry
- (add-to-list 'index-tags (nth 1 index-entry))
- (push index-entry docstruct))))
-
- ((match-end 11)
- ;; A macro with label
- (save-excursion
- (let* ((mac (reftex-match-string 11))
- (label (progn (goto-char (match-end 11))
- (save-match-data
- (reftex-no-props
- (reftex-nth-arg-wrapper
- mac)))))
- (typekey (nth 1 (assoc mac reftex-env-or-mac-alist)))
- (entry (progn (if typekey
- ;; A typing macro
- (goto-char (match-end 0))
- ;; A neutral macro
- (goto-char (match-end 11))
- (reftex-move-over-touching-args))
- (reftex-label-info
- label file bound nil nil))))
- (push entry docstruct))))
- (t (error "This should not happen (reftex-parse-from-file)")))
- )
-
- ;; Find bibliography statement
- (when (setq tmp (reftex-locate-bibliography-files master-dir))
- (push (cons 'bib tmp) docstruct))
-
- (goto-char 1)
- (when (re-search-forward
- "\\(\\`\\|[\n\r]\\)[ \t]*\\\\begin{thebibliography}" nil t)
- (push (cons 'thebib file) docstruct))
-
- ;; Find external document specifications
- (goto-char 1)
- (while (re-search-forward "[\n\r][ \t]*\\\\externaldocument\\(\\[\\([^]]*\\)\\]\\)?{\\([^}]+\\)}" nil t)
- (push (list 'xr-doc (reftex-match-string 2)
- (reftex-match-string 3))
- docstruct))
-
- ;; End of file mark
- (push (list 'eof file) docstruct)))))
+ (reftex-with-special-syntax
+ (save-excursion
+ (save-restriction
+ (widen)
+ (goto-char 1)
+
+ (while (re-search-forward regexp nil t)
+
+ (cond
+
+ ((match-end 1)
+ ;; It is a label
+ (push (reftex-label-info (reftex-match-string 1) file bound)
+ docstruct))
+
+ ((match-end 3)
+ ;; It is a section
+ (setq bound (point))
+
+ ;; Insert in List
+ (setq toc-entry (reftex-section-info file))
+ (when toc-entry
+ ;; It can happen that section info returns nil
+ (setq level (nth 5 toc-entry))
+ (setq highest-level (min highest-level level))
+ (if (= level highest-level)
+ (message
+ "Scanning %s %s ..."
+ (car (rassoc level reftex-section-levels-all))
+ (nth 6 toc-entry)))
+
+ (push toc-entry docstruct)
+ (setq reftex-active-toc toc-entry)))
+
+ ((match-end 7)
+ ;; It's an include or input
+ (setq include-file (reftex-match-string 7))
+ ;; Test if this file should be ignored
+ (unless (delq nil (mapcar
+ (lambda (x) (string-match x include-file))
+ reftex-no-include-regexps))
+ ;; Parse it
+ (setq docstruct
+ (reftex-parse-from-file
+ include-file
+ docstruct master-dir))))
+
+ ((match-end 9)
+ ;; Appendix starts here
+ (reftex-init-section-numbers nil t)
+ (push (cons 'appendix t) docstruct))
+
+ ((match-end 10)
+ ;; Index entry
+ (when reftex-support-index
+ (setq index-entry (reftex-index-info file))
+ (when index-entry
+ (add-to-list 'index-tags (nth 1 index-entry))
+ (push index-entry docstruct))))
+
+ ((match-end 11)
+ ;; A macro with label
+ (save-excursion
+ (let* ((mac (reftex-match-string 11))
+ (label (progn (goto-char (match-end 11))
+ (save-match-data
+ (reftex-no-props
+ (reftex-nth-arg-wrapper
+ mac)))))
+ (typekey (nth 1 (assoc mac reftex-env-or-mac-alist)))
+ (entry (progn (if typekey
+ ;; A typing macro
+ (goto-char (match-end 0))
+ ;; A neutral macro
+ (goto-char (match-end 11))
+ (reftex-move-over-touching-args))
+ (reftex-label-info
+ label file bound nil nil))))
+ (push entry docstruct))))
+ (t (error "This should not happen (reftex-parse-from-file)")))
+ )
+
+ ;; Find bibliography statement
+ (when (setq tmp (reftex-locate-bibliography-files master-dir))
+ (push (cons 'bib tmp) docstruct))
+
+ (goto-char 1)
+ (when (re-search-forward
+ "\\(\\`\\|[\n\r]\\)[ \t]*\\\\begin{thebibliography}" nil t)
+ (push (cons 'thebib file) docstruct))
+
+ ;; Find external document specifications
+ (goto-char 1)
+ (while (re-search-forward "[\n\r][ \t]*\\\\externaldocument\\(\\[\\([^]]*\\)\\]\\)?{\\([^}]+\\)}" nil t)
+ (push (list 'xr-doc (reftex-match-string 2)
+ (reftex-match-string 3))
+ docstruct))
+
+ ;; End of file mark
+ (push (list 'eof file) docstruct)))))
;; Kill the scanned buffer
(reftex-kill-temporary-buffers next-buf))
(defun reftex-locate-bibliography-files (master-dir &optional files)
;; Scan buffer for bibliography macro and return file list.
-
+
(unless files
(save-excursion
(goto-char (point-min))
(if (re-search-forward
- (concat
-; "\\(\\`\\|[\n\r]\\)[^%]*\\\\\\("
- "\\(^\\)[^%\n\r]*\\\\\\("
- (mapconcat 'identity reftex-bibliography-commands "\\|")
- "\\){[ \t]*\\([^}]+\\)") nil t)
- (setq files
- (split-string (reftex-match-string 3)
- "[ \t\n\r]*,[ \t\n\r]*")))))
+ (concat
+; "\\(\\`\\|[\n\r]\\)[^%]*\\\\\\("
+ "\\(^\\)[^%]*\\\\\\("
+ (mapconcat 'identity reftex-bibliography-commands "\\|")
+ "\\){[ \t]*\\([^}]+\\)") nil t)
+ (setq files
+ (split-string (reftex-match-string 3)
+ "[ \t\n\r]*,[ \t\n\r]*")))))
(when files
- (setq files
- (mapcar
- (lambda (x)
- (if (or (member x reftex-bibfile-ignore-list)
- (delq nil (mapcar (lambda (re) (string-match re x))
- reftex-bibfile-ignore-regexps)))
- ;; excluded file
- nil
- ;; find the file
- (reftex-locate-file x "bib" master-dir)))
- files))
+ (setq files
+ (mapcar
+ (lambda (x)
+ (if (or (member x reftex-bibfile-ignore-list)
+ (delq nil (mapcar (lambda (re) (string-match re x))
+ reftex-bibfile-ignore-regexps)))
+ ;; excluded file
+ nil
+ ;; find the file
+ (reftex-locate-file x "bib" master-dir)))
+ files))
(delq nil files)))
(defun reftex-replace-label-list-segment (old insert &optional entirely)
;; Carefull: This function expects the match-data to be still in place!
(let* ((marker (set-marker (make-marker) (1- (match-beginning 3))))
(macro (reftex-match-string 3))
- (prefix (save-match-data
- (if (string-match "begin{\\([^}]+\\)}" macro)
- (match-string 1 macro))))
- (level-exp (cdr (assoc macro reftex-section-levels-all)))
+ (prefix (save-match-data
+ (if (string-match "begin{\\([^}]+\\)}" macro)
+ (match-string 1 macro))))
+ (level-exp (cdr (assoc macro reftex-section-levels-all)))
(level (if (symbolp level-exp)
- (save-match-data (funcall level-exp))
- level-exp))
- (star (= ?* (char-after (match-end 3))))
- (unnumbered (or star (< level 0)))
- (level (abs level))
+ (save-match-data (funcall level-exp))
+ level-exp))
+ (star (= ?* (char-after (match-end 3))))
+ (unnumbered (or star (< level 0)))
+ (level (abs level))
(section-number (reftex-section-number level unnumbered))
- (text1 (save-match-data
- (save-excursion
- (reftex-context-substring prefix))))
+ (text1 (save-match-data
+ (save-excursion
+ (reftex-context-substring prefix))))
(literal (buffer-substring-no-properties
(1- (match-beginning 3))
(min (point-max) (+ (match-end 0) (length text1) 1))))
- ;; Literal can be too short since text1 too short. No big problem.
+ ;; Literal can be too short since text1 too short. No big problem.
(text (reftex-nicify-text text1)))
;; Add section number and indentation
(make-string (* reftex-level-indent level) ?\ )
(if (nth 1 reftex-label-menu-flags) ; section number flag
(concat section-number " "))
- (if prefix (concat (capitalize prefix) ": ") "")
+ (if prefix (concat (capitalize prefix) ": ") "")
text))
(list 'toc "toc" text file marker level section-number
literal (marker-position marker))))
(reftex-support-index t)
((y-or-n-p "Turn on index support and rescan entire document? ")
(setq reftex-support-index 'demanded
- current-prefix-arg '(16)))
+ current-prefix-arg '(16)))
(t (if abort
- (error "No index support")
- (message "No index support")
- (ding)
- (sit-for 1)))))
+ (error "No index support")
+ (message "No index support")
+ (ding)
+ (sit-for 1)))))
(defun reftex-index-info-safe (file)
(reftex-with-special-syntax
;; Carefull: This function expects the match-data to be still in place!
(catch 'exit
(let* ((macro (reftex-match-string 10))
- (bom (match-beginning 10))
- (boa (match-end 10))
- (entry (or (assoc macro reftex-index-macro-alist)
- (throw 'exit nil)))
- (exclude (nth 3 entry))
- ;; The following is a test if this match should be excluded
- (test-dummy (and (fboundp exclude)
- (funcall exclude)
- (throw 'exit nil)))
- (itag (nth 1 entry))
- (prefix (nth 2 entry))
- (index-tag
- (cond ((stringp itag) itag)
- ((integerp itag)
- (progn (goto-char boa)
- (or (reftex-nth-arg itag (nth 6 entry)) "idx")))
- (t "idx")))
- (arg (or (progn (goto-char boa)
- (reftex-nth-arg (nth 5 entry) (nth 6 entry)))
- ""))
- (end-of-args (progn (goto-char boa)
- (reftex-move-over-touching-args)
- (point)))
- (end-of-context (progn (skip-chars-forward "^ \t\n\r") (point)))
- (begin-of-context
- (progn (goto-char bom)
- (skip-chars-backward "^ \t\r\n")
- (point)))
- (context (buffer-substring-no-properties
- begin-of-context end-of-context))
- (key-end (if (string-match reftex-index-key-end-re arg)
- (1+ (match-beginning 0))))
- (rawkey (substring arg 0 key-end))
-
- (key (if prefix (concat prefix rawkey) rawkey))
- (sortkey (downcase key))
- (showkey (mapconcat 'identity
- (split-string key reftex-index-level-re)
- " ! ")))
+ (bom (match-beginning 10))
+ (boa (match-end 10))
+ (entry (or (assoc macro reftex-index-macro-alist)
+ (throw 'exit nil)))
+ (exclude (nth 3 entry))
+ ;; The following is a test if this match should be excluded
+ (test-dummy (and (fboundp exclude)
+ (funcall exclude)
+ (throw 'exit nil)))
+ (itag (nth 1 entry))
+ (prefix (nth 2 entry))
+ (index-tag
+ (cond ((stringp itag) itag)
+ ((integerp itag)
+ (progn (goto-char boa)
+ (or (reftex-nth-arg itag (nth 6 entry)) "idx")))
+ (t "idx")))
+ (arg (or (progn (goto-char boa)
+ (reftex-nth-arg (nth 5 entry) (nth 6 entry)))
+ ""))
+ (end-of-args (progn (goto-char boa)
+ (reftex-move-over-touching-args)
+ (point)))
+ (end-of-context (progn (skip-chars-forward "^ \t\n\r") (point)))
+ (begin-of-context
+ (progn (goto-char bom)
+ (skip-chars-backward "^ \t\r\n")
+ (point)))
+ (context (buffer-substring-no-properties
+ begin-of-context end-of-context))
+ (key-end (if (string-match reftex-index-key-end-re arg)
+ (1+ (match-beginning 0))))
+ (rawkey (substring arg 0 key-end))
+
+ (key (if prefix (concat prefix rawkey) rawkey))
+ (sortkey (downcase key))
+ (showkey (mapconcat 'identity
+ (split-string key reftex-index-level-re)
+ " ! ")))
(goto-char end-of-args)
;; 0 1 2 3 4 5 6 7 8 9
(list 'index index-tag context file bom arg key showkey sortkey key-end))))
-
+
(defun reftex-short-context (env parse &optional bound derive)
;; Get about one line of useful context for the label definition at point.
(match-string 1 (nth 7 reftex-active-toc)))
"SECTION HEADING NOT FOUND")))
(save-excursion
- (goto-char reftex-default-context-position)
- (unless (eq (string-to-char env) ?\\)
- (reftex-move-over-touching-args))
+ (goto-char reftex-default-context-position)
+ (unless (eq (string-to-char env) ?\\)
+ (reftex-move-over-touching-args))
(reftex-context-substring))))
((stringp parse)
((looking-at (reftex-make-regexp-allow-for-ctrl-m
(nth 7 (car list))))
;; Same title: remember, but keep looking
- (setq rtn-if-no-other (car list)))))
+ (setq rtn-if-no-other (car list)))))
(pop list))
rtn1))
((match-end 7)
(car
(member (list 'eof (reftex-locate-file
(reftex-match-string 7) "tex"
- (cdr (assq 'master-dir docstruct))))
+ (cdr (assq 'master-dir docstruct))))
docstruct)))
- ((match-end 9)
- (assq 'appendix (symbol-value reftex-docstruct-symbol)))
- ((match-end 10)
- ;; Index entry
- (when reftex-support-index
- (let* ((index-info (save-excursion
- (reftex-index-info-safe nil)))
- (list (member (list 'bof (buffer-file-name))
- docstruct))
- (endelt (car (member (list 'eof (buffer-file-name))
- list)))
- dist last-dist last (n 0))
- ;; Check all index entries with equal text
- (while (and list (not (eq endelt (car list))))
- (when (and (eq (car (car list)) 'index)
- (string= (nth 2 index-info)
- (nth 2 (car list))))
- (incf n)
- (setq dist (abs (- (point) (nth 4 (car list)))))
- (if (or (not last-dist) (< dist last-dist))
- (setq last-dist dist last (car list))))
- (setq list (cdr list)))
- ;; We are sure if we have only one, or a zero distance
- (cond ((or (= n 1) (equal dist 0)) last)
- ((> n 1) (setq cnt 2) last)
- (t nil)))))
- ((match-end 11)
+ ((match-end 9)
+ (assq 'appendix (symbol-value reftex-docstruct-symbol)))
+ ((match-end 10)
+ ;; Index entry
+ (when reftex-support-index
+ (let* ((index-info (save-excursion
+ (reftex-index-info-safe nil)))
+ (list (member (list 'bof (buffer-file-name))
+ docstruct))
+ (endelt (car (member (list 'eof (buffer-file-name))
+ list)))
+ dist last-dist last (n 0))
+ ;; Check all index entries with equal text
+ (while (and list (not (eq endelt (car list))))
+ (when (and (eq (car (car list)) 'index)
+ (string= (nth 2 index-info)
+ (nth 2 (car list))))
+ (incf n)
+ (setq dist (abs (- (point) (nth 4 (car list)))))
+ (if (or (not last-dist) (< dist last-dist))
+ (setq last-dist dist last (car list))))
+ (setq list (cdr list)))
+ ;; We are sure if we have only one, or a zero distance
+ (cond ((or (= n 1) (= dist 0)) last)
+ ((> n 1) (setq cnt 2) last)
+ (t nil)))))
+ ((match-end 11)
(save-excursion
(goto-char (match-end 11))
(assoc (reftex-no-props
;; Check if there was only a by-name match for the section.
(when (and (not rtn) rtn-if-no-other)
(setq rtn rtn-if-no-other
- cnt 2))
+ cnt 2))
(cons rtn (eq cnt 1))))
(defun reftex-notice-new (&optional n force)
"Hook to handshake with RefTeX after something new has been inserted."
;; Add a new entry to the docstruct list. If it is a section, renumber
;; the following sections.
- ;; FIXME: Put in a WHAT parameter and search backward until one is found.
+ ;; FIXME: Put in a WHAT parameter
;; When N is given, go back that many matches of reftex-everything-regexp
;; When FORCE is non-nil, also insert if `reftex-where-am-I' was uncertain.
(condition-case nil
(catch 'exit
- (unless reftex-mode (throw 'exit nil))
- (reftex-access-scan-info)
- (let* ((docstruct (symbol-value reftex-docstruct-symbol))
- here-I-am appendix tail entry star level
- section-number context)
+ (unless reftex-mode (throw 'exit nil))
+ (reftex-access-scan-info)
+ (let* ((docstruct (symbol-value reftex-docstruct-symbol))
+ here-I-am appendix tail entry star level
+ section-number context)
(save-excursion
(when (re-search-backward (reftex-everything-regexp) nil t (or n 1))
- ;; Find where we are
- (setq here-I-am (reftex-where-am-I))
- (or here-I-am (throw 'exit nil))
- (unless (or force (cdr here-I-am)) (throw 'exit nil))
- (setq tail (memq (car here-I-am) docstruct))
- (or tail (throw 'exit nil))
- (setq reftex-active-toc (reftex-last-assoc-before-elt
- 'toc (car here-I-am) docstruct)
- appendix (reftex-last-assoc-before-elt
- 'appendix (car here-I-am) docstruct))
-
- ;; Initialize section numbers
- (if (eq (car (car here-I-am)) 'appendix)
- (reftex-init-section-numbers nil t)
- (reftex-init-section-numbers reftex-active-toc appendix))
-
- ;; Match the section command
- (when (re-search-forward (reftex-everything-regexp) nil t)
- (cond
- ((match-end 1)
- (push (reftex-label-info (reftex-match-string 1) buffer-file-name)
- (cdr tail)))
-
- ((match-end 3)
- (setq star (= ?* (char-after (match-end 3)))
- entry (reftex-section-info (buffer-file-name))
- level (nth 5 entry))
- ;; Insert the section info
- (push entry (cdr tail))
-
- ;; We are done unless we use section numbers
- (unless (nth 1 reftex-label-menu-flags) (throw 'exit nil))
-
- ;; Update the remaining toc items
- (setq tail (cdr tail))
- (while (and (setq tail (memq (assq 'toc (cdr tail)) tail))
- (setq entry (car tail))
- (>= (nth 5 entry) level))
- (setq star (string-match "\\*" (nth 6 entry))
- context (nth 2 entry)
- section-number
- (reftex-section-number (nth 5 entry) star))
- (when (string-match "\\`\\([ \t]*\\)\\([.0-9A-Z]+\\)\\(.*\\)"
- context)
- (when (and (not appendix)
- (>= (string-to-char (match-string 2)) ?A))
- ;; Just entered the appendex. Get out.
- (throw 'exit nil))
-
- ;; Change the section number.
- (setf (nth 2 entry)
- (concat (match-string 1 context)
- section-number
- (match-string 3 context))))))
- ((match-end 10)
- ;; Index entry
- (and reftex-support-index
- (setq entry (reftex-index-info-safe buffer-file-name))
- ;; FIXME: (add-to-list 'index-tags (nth 1 index-entry))
- (push entry (cdr tail))))))))))
-
+ ;; Find where we are
+ (setq here-I-am (reftex-where-am-I))
+ (or here-I-am (throw 'exit nil))
+ (unless (or force (cdr here-I-am)) (throw 'exit nil))
+ (setq tail (memq (car here-I-am) docstruct))
+ (or tail (throw 'exit nil))
+ (setq reftex-active-toc (reftex-last-assoc-before-elt
+ 'toc (car here-I-am) docstruct)
+ appendix (reftex-last-assoc-before-elt
+ 'appendix (car here-I-am) docstruct))
+
+ ;; Initialize section numbers
+ (if (eq (car (car here-I-am)) 'appendix)
+ (reftex-init-section-numbers nil t)
+ (reftex-init-section-numbers reftex-active-toc appendix))
+
+ ;; Match the section command
+ (when (re-search-forward (reftex-everything-regexp) nil t)
+ (cond
+ ((match-end 1)
+ (push (reftex-label-info (reftex-match-string 1) buffer-file-name)
+ (cdr tail)))
+
+ ((match-end 3)
+ (setq star (= ?* (char-after (match-end 3)))
+ entry (reftex-section-info (buffer-file-name))
+ level (nth 5 entry))
+ ;; Insert the section info
+ (push entry (cdr tail))
+
+ ;; We are done unless we use section numbers
+ (unless (nth 1 reftex-label-menu-flags) (throw 'exit nil))
+
+ ;; Update the remaining toc items
+ (setq tail (cdr tail))
+ (while (and (setq tail (memq (assq 'toc (cdr tail)) tail))
+ (setq entry (car tail))
+ (>= (nth 5 entry) level))
+ (setq star (string-match "\\*" (nth 6 entry))
+ context (nth 2 entry)
+ section-number
+ (reftex-section-number (nth 5 entry) star))
+ (when (string-match "\\`\\([ \t]*\\)\\([.0-9A-Z]+\\)\\(.*\\)"
+ context)
+ (when (and (not appendix)
+ (>= (string-to-char (match-string 2)) ?A))
+ ;; Just entered the appendex. Get out.
+ (throw 'exit nil))
+
+ ;; Change the section number.
+ (setf (nth 2 entry)
+ (concat (match-string 1 context)
+ section-number
+ (match-string 3 context))))))
+ ((match-end 10)
+ ;; Index entry
+ (and reftex-support-index
+ (setq entry (reftex-index-info-safe buffer-file-name))
+ ;; FIXME: (add-to-list 'index-tags (nth 1 index-entry))
+ (push entry (cdr tail))))))))))
+
(error nil))
)
((memq (preceding-char) '(?\] ?\})))
;; Do a search
((and reftex-allow-detached-macro-args
- (re-search-backward
- "[]}][ \t]*[\n\r]?\\([ \t]*%[^\n\r]*[\n\r]\\)*[ \t]*\\=" bound t))
+ (re-search-backward
+ "[]}][ \t]*[\n\r]?\\([ \t]*%[^\n\r]*[\n\r]\\)*[ \t]*\\=" bound t))
(goto-char (1+ (match-beginning 0)))
t)
(t nil)))
pos cmd-list cmd cnt cnt-opt entry)
(save-restriction
(save-excursion
- (narrow-to-region (max 1 bound) (point-max))
+ (narrow-to-region (max (point-min) bound) (point-max))
;; move back out of the current parenthesis
(while (condition-case nil
(progn (up-list -1) t)
(setq cnt 1 cnt-opt 0)
;; move back over any touching sexps
(while (and (reftex-move-to-previous-arg bound)
- (condition-case nil
- (progn (backward-sexp) t)
- (error nil)))
- (if (eq (following-char) ?\[) (incf cnt-opt))
+ (condition-case nil
+ (progn (backward-sexp) t)
+ (error nil)))
+ (if (eq (following-char) ?\[) (incf cnt-opt))
(incf cnt))
(setq pos (point))
(when (and (or (= (following-char) ?\[)
(= (following-char) ?\{))
(re-search-backward "\\\\[*a-zA-Z]+\\=" nil t))
(setq cmd (reftex-match-string 0))
- (when (looking-at "\\\\begin{[^}]*}")
- (setq cmd (reftex-match-string 0)
- cnt (1- cnt)))
- ;; This does ignore optional arguments. Very hard to fix.
- (when (setq entry (assoc cmd reftex-env-or-mac-alist))
- (if (> cnt (or (nth 4 entry) 100))
- (setq cmd nil)))
+ (when (looking-at "\\\\begin{[^}]*}")
+ (setq cmd (reftex-match-string 0)
+ cnt (1- cnt)))
+ ;; This does ignore optional arguments. Very hard to fix.
+ (when (setq entry (assoc cmd reftex-env-or-mac-alist))
+ (if (> cnt (or (nth 4 entry) 100))
+ (setq cmd nil)))
(cond
- ((null cmd))
- ((eq t which)
- (push (cons cmd (point)) cmd-list))
- ((or (eq 1 which) (member cmd which))
- (throw 'exit (cons cmd (point))))))
+ ((null cmd))
+ ((eq t which)
+ (push (cons cmd (point)) cmd-list))
+ ((or (eq 1 which) (member cmd which))
+ (throw 'exit (cons cmd (point))))))
(goto-char pos)))
(nreverse cmd-list)))))
(match-beginning 2) (match-end 2)))
(cond
((string= (match-string 1) "end")
- (push env end-list))
+ (push env end-list))
((equal env (car end-list))
(setq end-list (cdr end-list)))
((eq t which)
(let ((bound (or bound (save-excursion (re-search-backward
reftex-section-regexp nil 1)
(point))))
- (fun-list (if (listp which)
- (mapcar (lambda (x) (if (memq x which) x nil))
- reftex-special-env-parsers)
- reftex-special-env-parsers))
+ (fun-list (if (listp which)
+ (mapcar (lambda (x) (if (memq x which) x nil))
+ reftex-special-env-parsers)
+ reftex-special-env-parsers))
specials rtn)
- ;; Call all functions
- (setq specials (mapcar
- (lambda (fun)
- (save-excursion
- (setq rtn (and fun (funcall fun bound)))
- (if rtn (cons (symbol-name fun) rtn) nil)))
- fun-list))
- ;; Delete the non-matches
- (setq specials (delq nil specials))
- ;; Sort
- (setq specials (sort specials (lambda (a b) (> (cdr a) (cdr b)))))
- (if (eq which t)
- specials
- (car specials))))))
+ ;; Call all functions
+ (setq specials (mapcar
+ (lambda (fun)
+ (save-excursion
+ (setq rtn (and fun (funcall fun bound)))
+ (if rtn (cons (symbol-name fun) rtn) nil)))
+ fun-list))
+ ;; Delete the non-matches
+ (setq specials (delq nil specials))
+ ;; Sort
+ (setq specials (sort specials (lambda (a b) (> (cdr a) (cdr b)))))
+ (if (eq which t)
+ specials
+ (car specials))))))
(defsubst reftex-move-to-next-arg (&optional ignore)
;; Assuming that we are at the end of a macro name or a macro argument,
((memq (following-char) '(?\[ ?\{)))
;; Do a search
((and reftex-allow-detached-macro-args
- (looking-at "[ \t]*[\n\r]?\\([ \t]*%[^\n\r]*[\n\r]\\)*[ \t]*[[{]"))
+ (looking-at "[ \t]*[\n\r]?\\([ \t]*%[^\n\r]*[\n\r]\\)*[ \t]*[[{]"))
(goto-char (1- (match-end 0)))
t)
(t nil)))
(if (= n 1000)
;; Special case: Skip all touching arguments
(progn
- (reftex-move-over-touching-args)
- (reftex-context-substring))
+ (reftex-move-over-touching-args)
+ (reftex-context-substring))
;; Do the real thing.
(let ((cnt 1))
-
+
(when (reftex-move-to-next-arg)
-
- (while (< cnt n)
- (while (and (member cnt opt-args)
- (eq (following-char) ?\{))
- (incf cnt))
- (when (< cnt n)
- (unless (and (condition-case nil
- (or (forward-list 1) t)
- (error nil))
- (reftex-move-to-next-arg)
- (incf cnt))
- (setq cnt 1000))))
-
- (while (and (memq cnt opt-args)
- (eq (following-char) ?\{))
- (incf cnt)))
+
+ (while (< cnt n)
+ (while (and (member cnt opt-args)
+ (eq (following-char) ?\{))
+ (incf cnt))
+ (when (< cnt n)
+ (unless (and (condition-case nil
+ (or (forward-list 1) t)
+ (error nil))
+ (reftex-move-to-next-arg)
+ (incf cnt))
+ (setq cnt 1000))))
+
+ (while (and (memq cnt opt-args)
+ (eq (following-char) ?\{))
+ (incf cnt)))
(if (and (= n cnt)
- (> (skip-chars-forward "{\\[") 0))
- (reftex-context-substring)
- nil))))
+ (> (skip-chars-forward "{\\[") 0))
+ (reftex-context-substring)
+ nil))))
(defun reftex-move-over-touching-args ()
(condition-case nil
(while (memq (following-char) '(?\[ ?\{))
- (forward-list 1))
- (error nil)))
+ (forward-list 1))
+ (error nil)))
(defun reftex-context-substring (&optional to-end)
;; Return up to 150 chars from point
(buffer-substring-no-properties
(point)
(min (+ (point) 150)
- (save-match-data
- ;; FIXME: This is not perfect
- (if (re-search-forward "\\\\end{" nil t)
- (match-beginning 0)
- (point-max))))))
+ (save-match-data
+ ;; FIXME: THis is not perfect
+ (if (re-search-forward "\\\\end{" nil t)
+ (match-beginning 0)
+ (point-max))))))
((or (= (preceding-char) ?\{)
(= (preceding-char) ?\[))
;; Inside a list - get only the list.
(error (point-max))))))
(t
;; no list - just grab 150 characters
- (buffer-substring-no-properties (point)
- (min (+ (point) 150) (point-max))))))
+ (buffer-substring-no-properties (point)
+ (min (+ (point) 150) (point-max))))))
;; Variable holding the vector with section numbers
(defvar reftex-section-numbers (make-vector reftex-max-section-depth 0))
(while (>= i 0)
(if (> i level)
(aset reftex-section-numbers i 0)
- (setq number-string (or (car numbers) "0"))
- (if (string-match "\\`[A-Z]\\'" number-string)
- (aset reftex-section-numbers i
- (- (string-to-char number-string) ?A -1))
- (aset reftex-section-numbers i (string-to-int number-string)))
+ (setq number-string (or (car numbers) "0"))
+ (if (string-match "\\`[A-Z]\\'" number-string)
+ (aset reftex-section-numbers i
+ (- (string-to-char number-string) ?A -1))
+ (aset reftex-section-numbers i (string-to-int number-string)))
(pop numbers))
(decf i)))
(put 'reftex-section-numbers 'appendix appendix))
;; Return a string with the current section number.
;; When LEVEL is non-nil, increase section numbers on that level.
(let* ((depth (1- (length reftex-section-numbers))) idx n (string "")
- (appendix (get 'reftex-section-numbers 'appendix))
- (partspecial (and (not reftex-part-resets-chapter)
- (equal level 0))))
+ (appendix (get 'reftex-section-numbers 'appendix))
+ (partspecial (and (not reftex-part-resets-chapter)
+ (equal level 0))))
;; partspecial means, this is a part statement.
;; Parts do not reset the chapter counter, and the part number is
;; not included in the numbering of other sectioning levels.
(when level
(when (and (> level -1) (not star))
- (aset reftex-section-numbers
- level (1+ (aref reftex-section-numbers level))))
+ (aset reftex-section-numbers
+ level (1+ (aref reftex-section-numbers level))))
(setq idx (1+ level))
(when (not star)
- (while (<= idx depth)
- (if (or (not partspecial)
- (not (= idx 1)))
- (aset reftex-section-numbers idx 0))
- (incf idx))))
+ (while (<= idx depth)
+ (if (or (not partspecial)
+ (not (= idx 1)))
+ (aset reftex-section-numbers idx 0))
+ (incf idx))))
(if partspecial
- (setq string (concat "Part " (reftex-roman-number
- (aref reftex-section-numbers 0))))
+ (setq string (concat "Part " (reftex-roman-number
+ (aref reftex-section-numbers 0))))
(setq idx (if reftex-part-resets-chapter 0 1))
(while (<= idx depth)
- (setq n (aref reftex-section-numbers idx))
- (if (not (and partspecial (not (equal string ""))))
- (setq string (concat string (if (not (string= string "")) "." "")
- (int-to-string n))))
- (incf idx))
+ (setq n (aref reftex-section-numbers idx))
+ (if (not (and partspecial (not (equal string ""))))
+ (setq string (concat string (if (not (string= string "")) "." "")
+ (int-to-string n))))
+ (incf idx))
(save-match-data
- (if (string-match "\\`\\([@0]\\.\\)+" string)
- (setq string (replace-match "" nil nil string)))
- (if (string-match "\\(\\.0\\)+\\'" string)
- (setq string (replace-match "" nil nil string)))
- (if (and appendix
- (string-match "\\`[0-9]+" string))
- (setq string
- (concat
- (char-to-string
- (1- (+ ?A (string-to-int (match-string 0 string)))))
- (substring string (match-end 0))))))
+ (if (string-match "\\`\\([@0]\\.\\)+" string)
+ (setq string (replace-match "" nil nil string)))
+ (if (string-match "\\(\\.0\\)+\\'" string)
+ (setq string (replace-match "" nil nil string)))
+ (if (and appendix
+ (string-match "\\`[0-9]+" string))
+ (setq string
+ (concat
+ (char-to-string
+ (1- (+ ?A (string-to-int (match-string 0 string)))))
+ (substring string (match-end 0))))))
(if star
- (concat (make-string (1- (length string)) ?\ ) "*")
- string))))
+ (concat (make-string (1- (length string)) ?\ ) "*")
+ string))))
(defun reftex-roman-number (n)
;; Return as a string the roman number equal to N.
(let ((nrest n)
- (string "")
- (list '((1000 . "M") ( 900 . "CM") ( 500 . "D") ( 400 . "CD")
- ( 100 . "C") ( 90 . "XC") ( 50 . "L") ( 40 . "XL")
- ( 10 . "X") ( 9 . "IX") ( 5 . "V") ( 4 . "IV")
- ( 1 . "I")))
- listel i s)
+ (string "")
+ (list '((1000 . "M") ( 900 . "CM") ( 500 . "D") ( 400 . "CD")
+ ( 100 . "C") ( 90 . "XC") ( 50 . "L") ( 40 . "XL")
+ ( 10 . "X") ( 9 . "IX") ( 5 . "V") ( 4 . "IV")
+ ( 1 . "I")))
+ listel i s)
(while (>= nrest 1)
(setq listel (pop list)
- i (car listel)
- s (cdr listel))
+ i (car listel)
+ s (cdr listel))
(while (>= nrest i)
- (setq string (concat string s)
- nrest (- nrest i))))
+ (setq string (concat string s)
+ nrest (- nrest i))))
string))
-;;; arch-tag: 6a8168f7-abb9-4576-99dc-fcbc7ba901a3
;;; reftex-parse.el ends here
;;; reftex-ref.el --- code to create labels and references with RefTeX
-;; Copyright (c) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
+;; Copyright (c) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
-;; Version: 4.21
+;; Version: 4.18
;; This file is part of GNU Emacs.
(let* ((loc1 (reftex-what-macro reftex-label-mac-list bound))
(loc2 (reftex-what-environment reftex-label-env-list bound))
- (loc3 (reftex-what-special-env 1 bound))
+ (loc3 (reftex-what-special-env 1 bound))
(p1 (or (cdr loc1) 0))
(p2 (or (cdr loc2) 0))
- (p3 (or (cdr loc3) 0))
- (pmax (max p1 p2 p3)))
+ (p3 (or (cdr loc3) 0))
+ (pmax (max p1 p2 p3)))
(setq reftex-location-start pmax)
(cond
(setq reftex-default-context-position p3)
(setq loc3 (car loc3))
(cond ((null loc3) "section")
- ((symbolp loc3) (symbol-name loc3))
- ((stringp loc3) loc3)
- (t "section")))
+ ((symbolp loc3) (symbol-name loc3))
+ ((stringp loc3) loc3)
+ (t "section")))
(t ;; This should not happen, I think?
"section"))))
(goto-char 1)
(if (or (re-search-forward
- (format reftex-find-label-regexp-format
- (regexp-quote label)) nil t)
- (re-search-forward
- (format reftex-find-label-regexp-format2
- (regexp-quote label)) nil t))
+ (format reftex-find-label-regexp-format
+ (regexp-quote label)) nil t)
+ (re-search-forward
+ (format reftex-find-label-regexp-format2
+ (regexp-quote label)) nil t))
(progn
(backward-char 1)
(parse (nth 2 (assoc env-or-mac reftex-env-or-mac-alist)))
(text (reftex-short-context env-or-mac parse reftex-location-start
derive))
- (in-comment (reftex-in-comment)))
+ (in-comment (reftex-in-comment)))
(list label typekey text file in-comment)))
;;; Creating labels ---------------------------------------------------------
;; Ok, go ahead.
(catch 'exit
(let* ((entry (assoc environment reftex-env-or-mac-alist))
- (typekey (nth 1 entry))
- (format (nth 3 entry))
- (macro-cell (reftex-what-macro 1))
- (entry1 (assoc (car macro-cell) reftex-env-or-mac-alist))
- label naked prefix valid default force-prompt rescan-is-useful)
+ (typekey (nth 1 entry))
+ (format (nth 3 entry))
+ (macro-cell (reftex-what-macro 1))
+ (entry1 (assoc (car macro-cell) reftex-env-or-mac-alist))
+ label naked prefix valid default force-prompt rescan-is-useful)
(when (and (or (nth 5 entry) (nth 5 entry1))
- (memq (preceding-char) '(?\[ ?\{)))
- ;; This is an argument of a label macro. Insert naked label.
- (setq naked t format "%s"))
+ (memq (preceding-char) '(?\[ ?\{)))
+ ;; This is an argument of a label macro. Insert naked label.
+ (setq naked t format "%s"))
(setq prefix (or (cdr (assoc typekey reftex-typekey-to-prefix-alist))
- (concat typekey "-")))
+ (concat typekey "-")))
;; Replace any escapes in the prefix
(setq prefix (reftex-replace-prefix-escapes prefix))
(cond
((reftex-typekey-check typekey (nth 0 reftex-insert-label-flags))
- ;; Derive a label from context.
- (setq reftex-active-toc (reftex-last-assoc-before-elt
- 'toc (car (reftex-where-am-I))
- (symbol-value reftex-docstruct-symbol)))
- (setq default (reftex-no-props
- (nth 2 (reftex-label-info " " nil nil t))))
- ;; Catch the cases where the is actually no context available.
- (if (or (string-match "NO MATCH FOR CONTEXT REGEXP" default)
- (string-match "ILLEGAL VALUE OF PARSE" default)
- (string-match "SECTION HEADING NOT FOUND" default)
- (string-match "HOOK ERROR" default)
- (string-match "^[ \t]*$" default))
- (setq default prefix
- force-prompt t) ; need to prompt
- (setq default
- (concat prefix
- (funcall reftex-string-to-label-function default)))
-
- ;; Make it unique.
- (setq default (reftex-uniquify-label default nil "-"))))
+ ;; Derive a label from context.
+ (setq reftex-active-toc (reftex-last-assoc-before-elt
+ 'toc (car (reftex-where-am-I))
+ (symbol-value reftex-docstruct-symbol)))
+ (setq default (reftex-no-props
+ (nth 2 (reftex-label-info " " nil nil t))))
+ ;; Catch the cases where the is actually no context available.
+ (if (or (string-match "NO MATCH FOR CONTEXT REGEXP" default)
+ (string-match "ILLEGAL VALUE OF PARSE" default)
+ (string-match "SECTION HEADING NOT FOUND" default)
+ (string-match "HOOK ERROR" default)
+ (string-match "^[ \t]*$" default))
+ (setq default prefix
+ force-prompt t) ; need to prompt
+ (setq default
+ (concat prefix
+ (funcall reftex-string-to-label-function default)))
+
+ ;; Make it unique.
+ (setq default (reftex-uniquify-label default nil "-"))))
((reftex-typekey-check typekey (nth 1 reftex-insert-label-flags))
- ;; Minimal default: the user will be prompted.
- (setq default prefix))
+ ;; Minimal default: the user will be prompted.
+ (setq default prefix))
(t
- ;; Make an automatic label.
- (setq default (reftex-uniquify-label prefix t))))
+ ;; Make an automatic label.
+ (setq default (reftex-uniquify-label prefix t))))
;; Should we ask the user?
(if (or (reftex-typekey-check typekey
- (nth 1 reftex-insert-label-flags)) ; prompt
- force-prompt)
-
- (while (not valid)
- ;; iterate until we get a legal label
-
- (setq label (read-string
- (if naked "Naked Label: " "Label: ")
- default))
-
- ;; Lets make sure that this is a legal label
- (cond
-
- ((string-match (concat "\\`\\(" (regexp-quote prefix)
- "\\)?[ \t]*\\'")
- label)
- ;; No label at all, please
- (message "No label inserted.")
- (throw 'exit nil))
-
- ;; Test if label contains strange characters
- ((string-match reftex-label-illegal-re label)
- (message "Label \"%s\" contains illegal characters" label)
- (ding)
- (sit-for 2))
-
- ;; Look it up in the label list
- ((setq entry (assoc label
- (symbol-value reftex-docstruct-symbol)))
- (ding)
- (if (y-or-n-p
- (format "Label '%s' exists. Use anyway? " label))
- (setq valid t)))
-
- ;; Label is ok
- (t
- (setq valid t))))
- (setq label default))
+ (nth 1 reftex-insert-label-flags)) ; prompt
+ force-prompt)
+
+ (while (not valid)
+ ;; iterate until we get a legal label
+
+ (setq label (read-string
+ (if naked "Naked Label: " "Label: ")
+ default))
+
+ ;; Lets make sure that this is a legal label
+ (cond
+
+ ((string-match (concat "\\`\\(" (regexp-quote prefix)
+ "\\)?[ \t]*\\'")
+ label)
+ ;; No label at all, please
+ (message "No label inserted.")
+ (throw 'exit nil))
+
+ ;; Test if label contains strange characters
+ ((string-match reftex-label-illegal-re label)
+ (message "Label \"%s\" contains illegal characters" label)
+ (ding)
+ (sit-for 2))
+
+ ;; Look it up in the label list
+ ((setq entry (assoc label
+ (symbol-value reftex-docstruct-symbol)))
+ (ding)
+ (if (y-or-n-p
+ (format "Label '%s' exists. Use anyway? " label))
+ (setq valid t)))
+
+ ;; Label is ok
+ (t
+ (setq valid t))))
+ (setq label default))
;; Insert the label into the label list
- (let* ((here-I-am-info
- (save-excursion
- (if (and (or naked no-insert)
- (integerp (cdr macro-cell)))
- (goto-char (cdr macro-cell)))
- (reftex-where-am-I)))
- (here-I-am (car here-I-am-info))
- (note (if (cdr here-I-am-info)
- ""
- "POSITION UNCERTAIN. RESCAN TO FIX."))
- (file (buffer-file-name))
- (text nil)
- (tail (memq here-I-am (symbol-value reftex-docstruct-symbol))))
-
- (or (cdr here-I-am-info) (setq rescan-is-useful t))
-
- (when tail
- (push (list label typekey text file nil note) (cdr tail))
- (put reftex-docstruct-symbol 'modified t)))
+ (let* ((here-I-am-info
+ (save-excursion
+ (if (and (or naked no-insert)
+ (integerp (cdr macro-cell)))
+ (goto-char (cdr macro-cell)))
+ (reftex-where-am-I)))
+ (here-I-am (car here-I-am-info))
+ (note (if (cdr here-I-am-info)
+ ""
+ "POSITION UNCERTAIN. RESCAN TO FIX."))
+ (file (buffer-file-name))
+ (text nil)
+ (tail (memq here-I-am (symbol-value reftex-docstruct-symbol))))
+
+ (or (cdr here-I-am-info) (setq rescan-is-useful t))
+
+ (when tail
+ (push (list label typekey text file nil note) (cdr tail))
+ (put reftex-docstruct-symbol 'modified t)))
;; Insert the label into the buffer
(unless no-insert
- (insert
- (if reftex-format-label-function
- (funcall reftex-format-label-function label format)
- (format format label)))
- (if (and reftex-plug-into-AUCTeX
- (fboundp 'LaTeX-add-labels))
- ;; Tell AUCTeX about this
- (LaTeX-add-labels label)))
+ (insert
+ (if reftex-format-label-function
+ (funcall reftex-format-label-function label format)
+ (format format label)))
+ (if (and reftex-plug-into-AUCTeX
+ (fboundp 'LaTeX-add-labels))
+ ;; Tell AUCTeX about this
+ (LaTeX-add-labels label)))
;; Delete the corresponding selection buffers to force update on next use.
(when reftex-auto-update-selection-buffers
- (reftex-erase-buffer (reftex-make-selection-buffer-name typekey))
- (reftex-erase-buffer (reftex-make-selection-buffer-name " ")))
+ (reftex-erase-buffer (reftex-make-selection-buffer-name typekey))
+ (reftex-erase-buffer (reftex-make-selection-buffer-name " ")))
(when (and rescan-is-useful reftex-allow-automatic-rescan)
- (reftex-parse-one))
+ (reftex-parse-one))
;; return value of the function is the label
label)))
Uses `reftex-derive-label-parameters' and `reftex-label-illegal-re'. It
also applies `reftex-translate-to-ascii-function' to the string."
(when (and reftex-translate-to-ascii-function
- (fboundp reftex-translate-to-ascii-function))
+ (fboundp reftex-translate-to-ascii-function))
(setq string (funcall reftex-translate-to-ascii-function string)))
(apply 'reftex-convert-string string
- "[-~ \t\n\r,;]+" reftex-label-illegal-re nil nil
- reftex-derive-label-parameters))
+ "[-~ \t\n\r,;]+" reftex-label-illegal-re nil nil
+ reftex-derive-label-parameters))
(defun reftex-latin1-to-ascii (string)
;; Translate the upper 128 chars in the Latin-1 charset to ASCII equivalents
(let ((tab "@@@@@@@@@@@@@@@@@@'@@@@@@@@@@@@@ icLxY|S\"ca<--R-o|23'uq..1o>423?AAAAAAACEEEEIIIIDNOOOOOXOUUUUYP3aaaaaaaceeeeiiiidnooooo:ouuuuypy")
- (emacsp (not (featurep 'xemacs))))
- (mapconcat
+ (emacsp (not (featurep 'xemacs))))
+ (mapconcat
(lambda (c)
(cond ((and (> c 127) (< c 256)) ; 8 bit Latin-1
- (char-to-string (aref tab (- c 128))))
- ((and emacsp ; Not for XEmacs
- (> c 2175) (< c 2304)) ; Mule Latin-1
- (char-to-string (aref tab (- c 2176))))
- (t (char-to-string c))))
+ (char-to-string (aref tab (- c 128))))
+ ((and emacsp ; Not for XEmacs
+ (> c 2175) (< c 2304)) ; Mule Latin-1
+ (char-to-string (aref tab (- c 2176))))
+ (t (char-to-string c))))
string "")))
(defun reftex-replace-prefix-escapes (prefix)
file)))
((equal letter "u")
(or (user-login-name) ""))
- ((equal letter "S")
- (let* (macro level-exp level)
- (save-excursion
- (save-match-data
- (when (re-search-backward reftex-section-regexp nil t)
- (setq macro (reftex-match-string 2)
- level-exp (cdr (assoc macro reftex-section-levels-all))
- level (if (symbolp level-exp)
- (abs (save-match-data
- (funcall level-exp)))
- (abs level-exp))))
- (cdr (or (assoc macro reftex-section-prefixes)
- (assoc level reftex-section-prefixes)
- (assq t reftex-section-prefixes)
- (list t "sec:")))))))
+ ((equal letter "S")
+ (let* (macro level-exp level)
+ (save-excursion
+ (save-match-data
+ (when (re-search-backward reftex-section-regexp nil t)
+ (setq macro (reftex-match-string 2)
+ level-exp (cdr (assoc macro reftex-section-levels-all))
+ level (if (symbolp level-exp)
+ (abs (save-match-data
+ (funcall level-exp)))
+ (abs level-exp))))
+ (cdr (or (assoc macro reftex-section-prefixes)
+ (assoc level reftex-section-prefixes)
+ (assq t reftex-section-prefixes)
+ (list t "sec:")))))))
(t "")))
(setq num (1- (+ (match-beginning 1) (length replace)))
prefix (replace-match replace nil nil prefix)))
;; check for active recursive edits
(reftex-check-recursive-edit)
- ;; Ensure access to scanning info and rescan buffer if prefix are is '(4)
+ ;; Ensure access to scanning info and rescan buffer if prefix arg is '(4)
(reftex-access-scan-info current-prefix-arg)
(unless type
;; guess type from context
(if (and reftex-guess-label-type
(setq type (reftex-guess-label-type)))
- (setq cut (cdr type)
- type (car type))
+ (setq cut (cdr type)
+ type (car type))
(setq type (reftex-query-label-type))))
- (let* ((refstyle
- (cond ((reftex-typekey-check type reftex-vref-is-default) "\\vref")
- ((reftex-typekey-check type reftex-fref-is-default) "\\fref")
- (t "\\ref")))
- (reftex-format-ref-function reftex-format-ref-function)
- (form "\\ref{%s}")
- label labels sep sep1)
+ (let* ((refstyle
+ (cond ((reftex-typekey-check type reftex-vref-is-default) "\\vref")
+ ((reftex-typekey-check type reftex-fref-is-default) "\\fref")
+ (t "\\ref")))
+ (reftex-format-ref-function reftex-format-ref-function)
+ (form "\\ref{%s}")
+ label labels sep sep1)
;; Have the user select a label
(set-marker reftex-select-return-marker (point))
(setq labels (save-excursion
- (reftex-offer-label-menu type)))
+ (reftex-offer-label-menu type)))
(reftex-ensure-compiled-variables)
(set-marker reftex-select-return-marker nil)
;; If the first entry is the symbol 'concat, concat all labels.
;; We keep the cdr of the first label for typekey etc information.
(if (eq (car labels) 'concat)
- (setq labels (list (list (mapconcat 'car (cdr labels) ",")
- (cdr (nth 1 labels))))))
+ (setq labels (list (list (mapconcat 'car (cdr labels) ",")
+ (cdr (nth 1 labels))))))
(setq type (nth 1 (car labels))
- form (or (cdr (assoc type reftex-typekey-to-format-alist))
- form))
-
+ form (or (cdr (assoc type reftex-typekey-to-format-alist))
+ form))
+
(cond
(no-insert
;; Just return the first label
nil)
(t
(while labels
- (setq label (car (car labels))
- sep (nth 2 (car labels))
- sep1 (cdr (assoc sep reftex-multiref-punctuation))
- labels (cdr labels))
- (when cut
- (backward-delete-char cut)
- (setq cut nil))
-
- ;; remove ~ if we do already have a space
- (when (and (= ?~ (string-to-char form))
- (member (preceding-char) '(?\ ?\t ?\n ?. ?~)))
- (setq form (substring form 1)))
- ;; do we have a special format?
- (setq reftex-format-ref-function
- (cond
- ((string= refstyle "\\vref") 'reftex-format-vref)
- ((string= refstyle "\\fref") 'reftex-format-fref)
- ((string= refstyle "\\Fref") 'reftex-format-Fref)
- (t reftex-format-ref-function)))
- ;; ok, insert the reference
- (if sep1 (insert sep1))
- (insert
- (if reftex-format-ref-function
- (funcall reftex-format-ref-function label form)
- (format form label label)))
- ;; take out the initial ~ for good
- (and (= ?~ (string-to-char form))
- (setq form (substring form 1))))
+ (setq label (car (car labels))
+ sep (nth 2 (car labels))
+ sep1 (cdr (assoc sep reftex-multiref-punctuation))
+ labels (cdr labels))
+ (when cut
+ (backward-delete-char cut)
+ (setq cut nil))
+
+ ;; remove ~ if we do already have a space
+ (when (and (= ?~ (string-to-char form))
+ (member (preceding-char) '(?\ ?\t ?\n)))
+ (setq form (substring form 1)))
+ ;; do we have a special format?
+ (setq reftex-format-ref-function
+ (cond
+ ((string= refstyle "\\vref") 'reftex-format-vref)
+ ((string= refstyle "\\fref") 'reftex-format-fref)
+ ((string= refstyle "\\Fref") 'reftex-format-Fref)
+ (t reftex-format-ref-function)))
+ ;; ok, insert the reference
+ (if sep1 (insert sep1))
+ (insert
+ (if reftex-format-ref-function
+ (funcall reftex-format-ref-function label form)
+ (format form label label)))
+ ;; take out the initial ~ for good
+ (and (= ?~ (string-to-char form))
+ (setq form (substring form 1))))
(message "")
label))))
(defun reftex-guess-label-type ()
;; Examine context to guess what a \ref might want to reference.
(let ((words reftex-words-to-typekey-alist)
- (case-fold-search t)
- (bound (max (point-min) (- (point) 35)))
- matched cell)
+ (case-fold-search t)
+ (bound (max (point-min) (- (point) 35)))
+ matched cell)
(save-excursion
(while (and (setq cell (pop words))
- (not (setq matched
- (re-search-backward (car cell) bound t))))))
+ (not (setq matched
+ (re-search-backward (car cell) bound t))))))
(if matched
- (cons (cdr cell) (- (match-end 0) (match-end 1)))
+ (cons (cdr cell) (- (match-end 0) (match-end 1)))
nil)))
(defvar reftex-select-label-map)
(defun reftex-offer-label-menu (typekey)
;; Offer a menu with the appropriate labels.
(let* ((buf (current-buffer))
- (xr-data (assq 'xr (symbol-value reftex-docstruct-symbol)))
- (xr-alist (cons (cons "" (buffer-file-name)) (nth 1 xr-data)))
- (xr-index 0)
+ (xr-data (assq 'xr (symbol-value reftex-docstruct-symbol)))
+ (xr-alist (cons (cons "" (buffer-file-name)) (nth 1 xr-data)))
+ (xr-index 0)
(here-I-am (car (reftex-where-am-I)))
- (here-I-am1 here-I-am)
+ (here-I-am1 here-I-am)
(toc (reftex-typekey-check typekey reftex-label-menu-flags 0))
(files (reftex-typekey-check typekey reftex-label-menu-flags 7))
(context (not (reftex-typekey-check
(follow (reftex-typekey-check
typekey reftex-label-menu-flags 4))
(commented (nth 5 reftex-label-menu-flags))
- (prefix "")
- selection-buffers
+ (prefix "")
+ selection-buffers
offset rtn key data last-data entries)
(unwind-protect
(catch 'exit
(while t
(save-window-excursion
- (delete-other-windows)
- (setq reftex-call-back-to-this-buffer buf
- reftex-latex-syntax-table (syntax-table))
- (let ((default-major-mode 'reftex-select-label-mode))
- (if reftex-use-multiple-selection-buffers
- (switch-to-buffer-other-window
- (save-excursion
- (set-buffer buf)
- (reftex-make-selection-buffer-name typekey)))
- (switch-to-buffer-other-window "*RefTeX Select*")
- (reftex-erase-buffer)))
- (unless (eq major-mode 'reftex-select-label-mode)
- (reftex-select-label-mode))
- (add-to-list 'selection-buffers (current-buffer))
+ (delete-other-windows)
+ (setq reftex-call-back-to-this-buffer buf
+ reftex-latex-syntax-table (syntax-table))
+ (let ((default-major-mode 'reftex-select-label-mode))
+ (if reftex-use-multiple-selection-buffers
+ (switch-to-buffer-other-window
+ (save-excursion
+ (set-buffer buf)
+ (reftex-make-selection-buffer-name typekey)))
+ (switch-to-buffer-other-window "*RefTeX Select*")
+ (reftex-erase-buffer)))
+ (unless (eq major-mode 'reftex-select-label-mode)
+ (reftex-select-label-mode))
+ (add-to-list 'selection-buffers (current-buffer))
(setq truncate-lines t)
- (setq mode-line-format
- (list "---- " 'mode-line-buffer-identification
- " " 'global-mode-string " (" mode-name ")"
- " S<" 'refstyle ">"
- " -%-"))
- (cond
- ((= 0 (buffer-size))
- (let ((buffer-read-only nil))
- (message "Creating Selection Buffer...")
- (setq offset (reftex-insert-docstruct
- buf
- toc
- typekey
- nil ; index
- files
- context
- counter
- commented
- (or here-I-am offset)
- prefix
- nil ; no a toc buffer
- ))))
- (here-I-am
- (setq offset (reftex-get-offset buf here-I-am typekey)))
- (t (setq offset t)))
- (setq buffer-read-only t)
- (setq offset (or offset t))
+ (setq mode-line-format
+ (list "---- " 'mode-line-buffer-identification
+ " " 'global-mode-string " (" mode-name ")"
+ " S<" 'refstyle ">"
+ " -%-"))
+ (cond
+ ((= 0 (buffer-size))
+ (let ((buffer-read-only nil))
+ (message "Creating Selection Buffer...")
+ (setq offset (reftex-insert-docstruct
+ buf
+ toc
+ typekey
+ nil ; index
+ files
+ context
+ counter
+ commented
+ (or here-I-am offset)
+ prefix
+ nil ; no a toc buffer
+ ))))
+ (here-I-am
+ (setq offset (reftex-get-offset buf here-I-am typekey)))
+ (t (setq offset t)))
+ (setq buffer-read-only t)
+ (setq offset (or offset t))
(setq here-I-am nil) ; turn off determination of offset
(setq rtn
(reftex-select-item
reftex-select-label-prompt
reftex-select-label-help
- reftex-select-label-map
+ reftex-select-label-map
offset
'reftex-show-label-location follow))
(setq key (car rtn)
data (nth 1 rtn)
last-data (nth 2 rtn)
- offset t)
+ offset t)
(unless key (throw 'exit nil))
(cond
- ((eq key ?g)
- ;; update buffer
- (reftex-erase-buffer))
+ ((eq key ?g)
+ ;; update buffer
+ (reftex-erase-buffer))
((or (eq key ?r)
(eq key ?R))
;; rescan buffer
- (and current-prefix-arg (setq key ?R))
- (reftex-erase-buffer)
+ (and current-prefix-arg (setq key ?R))
+ (reftex-erase-buffer)
(reftex-reparse-document buf last-data key))
((eq key ?c)
;; toggle context mode
- (reftex-erase-buffer)
+ (reftex-erase-buffer)
(setq context (not context)))
((eq key ?s)
;; switch type
- (setq here-I-am here-I-am1)
+ (setq here-I-am here-I-am1)
(setq typekey (reftex-query-label-type)))
((eq key ?t)
;; toggle table of contents display, or change depth
- (reftex-erase-buffer)
- (if current-prefix-arg
- (setq reftex-toc-max-level (prefix-numeric-value
- current-prefix-arg))
- (setq toc (not toc))))
+ (reftex-erase-buffer)
+ (if current-prefix-arg
+ (setq reftex-toc-max-level (prefix-numeric-value
+ current-prefix-arg))
+ (setq toc (not toc))))
((eq key ?F)
;; toggle display of included file borders
- (reftex-erase-buffer)
+ (reftex-erase-buffer)
(setq files (not files)))
((eq key ?#)
;; toggle counter display
- (reftex-erase-buffer)
+ (reftex-erase-buffer)
(setq counter (not counter)))
((eq key ?%)
;; toggle display of commented labels
- (reftex-erase-buffer)
+ (reftex-erase-buffer)
(setq commented (not commented)))
((eq key ?l)
;; reuse the last referenced label again
(setq entries reftex-last-used-reference)
(throw 'exit t))
- ((eq key ?x)
- ;; select an external document
- (setq xr-index (reftex-select-external-document
- xr-alist xr-index))
- (setq buf (or (reftex-get-file-buffer-force
- (cdr (nth xr-index xr-alist)))
- (error "Cannot switch document"))
- prefix (or (car (nth xr-index xr-alist)) ""))
+ ((eq key ?x)
+ ;; select an external document
+ (setq xr-index (reftex-select-external-document
+ xr-alist xr-index))
+ (setq buf (or (reftex-get-file-buffer-force
+ (cdr (nth xr-index xr-alist)))
+ (error "Cannot switch document"))
+ prefix (or (car (nth xr-index xr-alist)) ""))
+ (set-buffer buf)
+ (reftex-access-scan-info))
+ ((stringp key)
+ (setq entries
+ (list
+ (list
+ (or (assoc key (symbol-value reftex-docstruct-symbol))
+ (list key typekey)))))
+ (throw 'exit t))
+ ((memq key '(?a ?A return))
+ (cond
+ (reftex-select-marked
+ (setq entries (nreverse reftex-select-marked)))
+ (data
+ (setq entries (list (list data))))
+ (t (setq entries nil)))
+ (when entries
+ (if (equal key ?a) (push 'concat entries))
+ (setq reftex-last-used-reference entries))
(set-buffer buf)
- (reftex-access-scan-info))
- ((stringp key)
- (setq entries
- (list
- (list
- (or (assoc key (symbol-value reftex-docstruct-symbol))
- (list key typekey)))))
(throw 'exit t))
- ((memq key '(?a ?A return))
- (cond
- (reftex-select-marked
- (setq entries (nreverse reftex-select-marked)))
- (data
- (setq entries (list (list data))))
- (t (setq entries nil)))
- (when entries
- (if (equal key ?a) (push 'concat entries))
- (setq reftex-last-used-reference entries))
- (set-buffer buf)
- (throw 'exit t))
- (t (error "This should not happen (reftex-offer-label-menu)"))))))
+ (t (error "This should not happen (reftex-offer-label-menu)"))))))
(save-excursion
- (while reftex-buffers-with-changed-invisibility
- (set-buffer (car (car reftex-buffers-with-changed-invisibility)))
- (setq buffer-invisibility-spec
- (cdr (pop reftex-buffers-with-changed-invisibility)))))
+ (while reftex-buffers-with-changed-invisibility
+ (set-buffer (car (car reftex-buffers-with-changed-invisibility)))
+ (setq buffer-invisibility-spec
+ (cdr (pop reftex-buffers-with-changed-invisibility)))))
(mapcar (lambda (buf) (and (buffer-live-p buf) (bury-buffer buf)))
- selection-buffers)
+ selection-buffers)
(reftex-kill-temporary-buffers))
;; Add the prefixes, put together the relevant information in the form
;; (LABEL TYPEKEY SEPARATOR) and return a list of those.
(mapcar (lambda (x)
- (if (listp x)
- (list (concat prefix (car (car x)))
- (nth 1 (car x))
- (nth 2 x))
- x))
- entries)))
+ (if (listp x)
+ (list (concat prefix (car (car x)))
+ (nth 1 (car x))
+ (nth 2 x))
+ x))
+ entries)))
(defun reftex-reparse-document (&optional buffer data key)
;; Rescan the document.
(defun reftex-query-label-type ()
;; Ask for label type
- (let ((key (reftex-select-with-char
- reftex-type-query-prompt reftex-type-query-help 3)))
+ (let ((key (reftex-select-with-char
+ reftex-type-query-prompt reftex-type-query-help 3)))
(unless (member (char-to-string key) reftex-typekey-list)
(error "No such label type: %s" (char-to-string key)))
(char-to-string key)))
-(defun reftex-show-label-location (data forward no-revisit
- &optional stay error)
+(defun reftex-show-label-location (data forward no-revisit
+ &optional stay error)
;; View the definition site of a label in another window.
;; DATA is an entry from the docstruct list.
;; FORWARD indicates if the label is likely forward from current point.
;; ERROR means throw an error exception when the label cannot be found.
;; If ERROR is nil, the return value of this function indicates success.
(let* ((this-window (selected-window))
- (errorf (if error 'error 'message))
+ (errorf (if error 'error 'message))
label file buffer re found)
(catch 'exit
(setq label (nth 0 data)
- file (nth 3 data))
+ file (nth 3 data))
(unless file
- (funcall errorf "Unknown label - reparse might help")
- (throw 'exit nil))
+ (funcall errorf "Unknown label - reparse might help")
+ (throw 'exit nil))
;; Goto the file in another window
- (setq buffer
- (if no-revisit
- (reftex-get-buffer-visiting file)
- (reftex-get-file-buffer-force
- file (not reftex-keep-temporary-buffers))))
+ (setq buffer
+ (if no-revisit
+ (reftex-get-buffer-visiting file)
+ (reftex-get-file-buffer-force
+ file (not reftex-keep-temporary-buffers))))
(if buffer
;; good - the file is available
(switch-to-buffer-other-window buffer)
;; we have got a problem here. The file does not exist.
;; Let' get out of here..
- (funcall errorf "Label %s not found" label)
- (throw 'exit nil))
+ (funcall errorf "Label %s not found" label)
+ (throw 'exit nil))
;; search for that label
(setq re (format reftex-find-label-regexp-format (regexp-quote label)))
(setq found
- (if forward
- (re-search-forward re nil t)
- (re-search-backward re nil t)))
+ (if forward
+ (re-search-forward re nil t)
+ (re-search-backward re nil t)))
(unless found
(goto-char (point-min))
- (unless (setq found (re-search-forward re nil t))
- ;; Ooops. Must be in a macro with distributed args.
- (setq found
- (re-search-forward
- (format reftex-find-label-regexp-format2
- (regexp-quote label)) nil t))))
+ (unless (setq found (re-search-forward re nil t))
+ ;; Ooops. Must be in a macro with distributed args.
+ (setq found
+ (re-search-forward
+ (format reftex-find-label-regexp-format2
+ (regexp-quote label)) nil t))))
(if (match-end 3)
- (progn
- (reftex-highlight 0 (match-beginning 3) (match-end 3))
- (reftex-show-entry (match-beginning 3) (match-end 3))
- (recenter '(4))
- (unless stay (select-window this-window)))
- (select-window this-window)
- (funcall errorf "Label %s not found" label))
+ (progn
+ (reftex-highlight 0 (match-beginning 3) (match-end 3))
+ (reftex-show-entry (match-beginning 3) (match-end 3))
+ (recenter '(4))
+ (unless stay (select-window this-window)))
+ (select-window this-window)
+ (funcall errorf "Label %s not found" label))
found)))
(defvar font-lock-mode)
(re-search-forward "[\n\r]" nil 1 n) (point))))
(cond
((and (boundp 'buffer-invisibility-spec) buffer-invisibility-spec
- (get-char-property (1+ beg-hlt) 'invisible))
+ (get-char-property (1+ beg-hlt) 'invisible))
;; Invisible with text properties. That is easy to change.
(push (cons (current-buffer) buffer-invisibility-spec)
- reftex-buffers-with-changed-invisibility)
+ reftex-buffers-with-changed-invisibility)
(setq buffer-invisibility-spec nil))
((string-match "\r" (buffer-substring beg end))
;; Invisible with selective display. We need to copy it.
(let ((string (buffer-substring-no-properties beg end)))
- (switch-to-buffer "*RefTeX Context Copy*")
- (setq buffer-read-only nil)
- (erase-buffer)
- (insert string)
- (subst-char-in-region (point-min) (point-max) ?\r ?\n t)
- (goto-char (- beg-hlt beg))
- (reftex-highlight 0 (1+ (- beg-hlt beg)) (1+ (- end-hlt beg)))
- (if (reftex-refontify)
- (when (or (not (eq major-mode 'latex-mode))
- (not font-lock-mode))
- (latex-mode)
- (run-hook-with-args
- 'reftex-pre-refontification-functions
- reftex-call-back-to-this-buffer 'reftex-hidden)
- (turn-on-font-lock))
- (when (or (not (eq major-mode 'fundamental-mode))
- font-lock-mode)
- (fundamental-mode)))
- (run-hooks 'reftex-display-copied-context-hook)
- (setq buffer-read-only t))))))
+ (switch-to-buffer "*RefTeX Context Copy*")
+ (setq buffer-read-only nil)
+ (erase-buffer)
+ (insert string)
+ (subst-char-in-region (point-min) (point-max) ?\r ?\n t)
+ (goto-char (- beg-hlt beg))
+ (reftex-highlight 0 (1+ (- beg-hlt beg)) (1+ (- end-hlt beg)))
+ (if (reftex-refontify)
+ (when (or (not (eq major-mode 'latex-mode))
+ (not font-lock-mode))
+ (latex-mode)
+ (run-hook-with-args
+ 'reftex-pre-refontification-functions
+ reftex-call-back-to-this-buffer 'reftex-hidden)
+ (turn-on-font-lock))
+ (when (or (not (eq major-mode 'fundamental-mode))
+ font-lock-mode)
+ (fundamental-mode)))
+ (run-hooks 'reftex-display-copied-context-hook)
+ (setq buffer-read-only t))))))
(defun reftex-varioref-vref ()
"Insert a reference using the `\\vref' macro from the varioref package."
"Insert a reference using the `\\fref' macro from the fancyref package."
(interactive)
(let ((reftex-format-ref-function 'reftex-format-fref)
- ;;(reftex-guess-label-type nil) ;FIXME do we want this????
- )
+ ;;(reftex-guess-label-type nil) ;FIXME do we want this????
+ )
(reftex-reference)))
(defun reftex-fancyref-Fref ()
"Insert a reference using the `\\Fref' macro from the fancyref package."
(interactive)
(let ((reftex-format-ref-function 'reftex-format-Fref)
- ;;(reftex-guess-label-type nil) ;FIXME do we want this????
- )
+ ;;(reftex-guess-label-type nil) ;FIXME do we want this????
+ )
(reftex-reference)))
(defun reftex-format-vref (label fmt)
(defun reftex-format-fref (label def-fmt)
(format "\\fref{%s}" label))
+
+;(defun reftex-goto-label ()
+; (interactive)
+; (reftex-access-scan-info)
+; (let* ((docstruct (symbol-value reftex-docstruct-symbol))
+; (label (completing-read "Label: " docstruct
+; (lambda (x) (stringp (car x))) t))
+; (selection (assoc label docstruct)))
+; (reftex-show-label-location selection t nil 'stay)
+; (reftex-unhighlight 0)))
+
(defun reftex-goto-label (&optional other-window)
"Prompt for a label (with completion) and jump to the location of this label.
Optional prefix argument OTHER-WINDOW goes to the label in another window."
(interactive "P")
(reftex-access-scan-info)
(let* ((wcfg (current-window-configuration))
- (docstruct (symbol-value reftex-docstruct-symbol))
- (label (completing-read "Label: " docstruct
- (lambda (x) (stringp (car x))) t))
- (selection (assoc label docstruct))
- (where (progn
- (reftex-show-label-location selection t nil 'stay)
- (point-marker))))
+ (docstruct (symbol-value reftex-docstruct-symbol))
+ (label (completing-read "Label: " docstruct
+ (lambda (x) (stringp (car x))) t))
+ (selection (assoc label docstruct))
+ (where (progn
+ (reftex-show-label-location selection t nil 'stay)
+ (point-marker))))
(unless other-window
(set-window-configuration wcfg)
(switch-to-buffer (marker-buffer where))
- (goto-char where))
+ (goto-char where))
(reftex-unhighlight 0)))
-;;; arch-tag: 52f14032-fb76-4d31-954f-750c72415675
;;; reftex-ref.el ends here
;;; reftex-sel.el --- the selection modes for RefTeX
-;; Copyright (c) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
+;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
-;; Version: 4.21
+;; Version: 4.18
;; This file is part of GNU Emacs.
(defun reftex-select-label-mode ()
"Major mode for selecting a label in a LaTeX document.
This buffer was created with RefTeX.
-It only has a meaningful keymap when you are in the middle of a
+It only has a meaningful keymap when you are in the middle of a
selection process.
To select a label, move the cursor to it and press RET.
Press `?' for a summary of important key bindings.
(make-local-hook 'pre-command-hook)
(make-local-hook 'post-command-hook))
(setq major-mode 'reftex-select-label-mode
- mode-name "LSelect")
+ mode-name "LSelect")
(set (make-local-variable 'reftex-select-marked) nil)
(when (syntax-table-p reftex-latex-syntax-table)
(set-syntax-table reftex-latex-syntax-table))
(defun reftex-select-bib-mode ()
"Major mode for selecting a citation key in a LaTeX document.
This buffer was created with RefTeX.
-It only has a meaningful keymap when you are in the middle of a
+It only has a meaningful keymap when you are in the middle of a
selection process.
In order to select a citation, move the cursor to it and press RET.
Press `?' for a summary of important key bindings.
(make-local-hook 'pre-command-hook)
(make-local-hook 'post-command-hook))
(setq major-mode 'reftex-select-bib-mode
- mode-name "BSelect")
+ mode-name "BSelect")
(set (make-local-variable 'reftex-select-marked) nil)
;; We do not set a local map - reftex-select-item does this.
(run-hooks 'reftex-select-bib-mode-hook))
;;; (set-buffer buf)
;;; (reftex-access-scan-info)
;;; (let* ((rest (memq here-am-I (symbol-value reftex-docstruct-symbol)))
-;;; entry)
-;;; (while (setq entry (pop rest))
-;;; (if (or (and typekey
-;;; (stringp (car entry))
-;;; (or (equal typekey " ")
-;;; (equal typekey (nth 1 entry))))
-;;; (and toc (eq (car entry) 'toc))
-;;; (and index (eq (car entry) 'index))
-;;; (and file
-;;; (memq (car entry) '(bof eof file-error))))
-;;; (throw 'exit entry)))
-;;; nil))))
+;;; entry)
+;;; (while (setq entry (pop rest))
+;;; (if (or (and typekey
+;;; (stringp (car entry))
+;;; (or (equal typekey " ")
+;;; (equal typekey (nth 1 entry))))
+;;; (and toc (eq (car entry) 'toc))
+;;; (and index (eq (car entry) 'index))
+;;; (and file
+;;; (memq (car entry) '(bof eof file-error))))
+;;; (throw 'exit entry)))
+;;; nil))))
(defun reftex-get-offset (buf here-am-I &optional typekey toc index file)
;; Find the correct offset data, like insert-docstruct would, but faster.
(set-buffer buf)
(reftex-access-scan-info)
(let* ((rest (symbol-value reftex-docstruct-symbol))
- lastentry entry)
- (while (setq entry (pop rest))
- (if (or (and typekey
- (stringp (car entry))
- (or (equal typekey " ")
- (equal typekey (nth 1 entry))))
- (and toc (eq (car entry) 'toc))
- (and index (eq (car entry) 'index))
- (and file
- (memq (car entry) '(bof eof file-error))))
- (setq lastentry entry))
- (if (eq entry here-am-I)
- (throw 'exit (or lastentry entry))))
- nil))))
+ lastentry entry)
+ (while (setq entry (pop rest))
+ (if (or (and typekey
+ (stringp (car entry))
+ (or (equal typekey " ")
+ (equal typekey (nth 1 entry))))
+ (and toc (eq (car entry) 'toc))
+ (and index (eq (car entry) 'index))
+ (and file
+ (memq (car entry) '(bof eof file-error))))
+ (setq lastentry entry))
+ (if (eq entry here-am-I)
+ (throw 'exit (or lastentry entry))))
+ nil))))
(defun reftex-insert-docstruct
(buf toc labels index-entries files context counter show-commented
- here-I-am xr-prefix toc-buffer)
+ here-I-am xr-prefix toc-buffer)
;; Insert an excerpt of the docstruct list.
;; Return the data property of the entry corresponding to HERE-I-AM.
;; BUF is the buffer which has the correct docstruct-symbol.
(context-indent
(concat ". "
(if toc (make-string (* 7 reftex-level-indent) ?\ ) "")))
- (mouse-face
- (if (memq reftex-highlight-selection '(mouse both))
- reftex-mouse-selected-face
- nil))
- (label-face (reftex-verified-face reftex-label-face
- 'font-lock-constant-face
- 'font-lock-reference-face))
- (index-face (reftex-verified-face reftex-index-face
- 'font-lock-constant-face
- 'font-lock-reference-face))
+ (mouse-face
+ (if (memq reftex-highlight-selection '(mouse both))
+ reftex-mouse-selected-face
+ nil))
+ (label-face (reftex-verified-face reftex-label-face
+ 'font-lock-constant-face
+ 'font-lock-reference-face))
+ (index-face (reftex-verified-face reftex-index-face
+ 'font-lock-constant-face
+ 'font-lock-reference-face))
all cell text label typekey note comment master-dir-re
- prev-inserted offset from to index-tag docstruct-symbol)
+ prev-inserted offset from to index-tag docstruct-symbol)
;; Pop to buffer buf to get the correct buffer-local variables
(save-excursion
(reftex-access-scan-info)
(setq docstruct-symbol reftex-docstruct-symbol
- all (symbol-value reftex-docstruct-symbol)
+ all (symbol-value reftex-docstruct-symbol)
reftex-active-toc nil
master-dir-re
(concat "\\`" (regexp-quote
(set (make-local-variable 'reftex-docstruct-symbol) docstruct-symbol)
(set (make-local-variable 'reftex-prefix)
- (cdr (assoc labels reftex-typekey-to-prefix-alist)))
+ (cdr (assoc labels reftex-typekey-to-prefix-alist)))
(if (equal reftex-prefix " ") (setq reftex-prefix nil))
;; Walk the docstruct and insert the appropriate stuff
(cond
((memq (car cell) '(bib thebib label-numbers appendix
- master-dir bibview-cache is-multi xr xr-doc)))
+ master-dir bibview-cache is-multi xr xr-doc)))
;; These are currently ignored
((memq (car cell) '(bof eof file-error))
;; Beginning or end of a file
(when files
- (setq prev-inserted cell)
-; (if (eq offset 'attention) (setq offset cell))
+ (setq prev-inserted cell)
+; (if (eq offset 'attention) (setq offset cell))
(insert
" File " (if (string-match master-dir-re (nth 1 cell))
(substring (nth 1 cell) (match-end 0))
(cond ((eq (car cell) 'bof) " starts here\n")
((eq (car cell) 'eof) " ends here\n")
((eq (car cell) 'file-error) " was not found\n")))
- (setq to (point))
+ (setq to (point))
(when font
(put-text-property from to
'face reftex-file-boundary-face))
- (when toc-buffer
- (if mouse-face
- (put-text-property from (1- to)
- 'mouse-face mouse-face))
- (put-text-property from to :data cell))))
+ (when toc-buffer
+ (if mouse-face
+ (put-text-property from (1- to)
+ 'mouse-face mouse-face))
+ (put-text-property from to :data cell))))
((eq (car cell) 'toc)
;; a table of contents entry
(when (and toc
- (<= (nth 5 cell) reftex-toc-max-level))
- (setq prev-inserted cell)
-; (if (eq offset 'attention) (setq offset cell))
+ (<= (nth 5 cell) reftex-toc-max-level))
+ (setq prev-inserted cell)
+; (if (eq offset 'attention) (setq offset cell))
(setq reftex-active-toc cell)
(insert (concat toc-indent (nth 2 cell) "\n"))
- (setq to (point))
- (when font
- (put-text-property from to
- 'face reftex-section-heading-face))
- (when toc-buffer
- (if mouse-face
- (put-text-property from (1- to)
- 'mouse-face mouse-face))
- (put-text-property from to :data cell))
- (goto-char to)))
+ (setq to (point))
+ (when font
+ (put-text-property from to
+ 'face reftex-section-heading-face))
+ (when toc-buffer
+ (if mouse-face
+ (put-text-property from (1- to)
+ 'mouse-face mouse-face))
+ (put-text-property from to :data cell))
+ (goto-char to)))
((stringp (car cell))
;; a label
(when (null (nth 2 cell))
;; No context yet. Quick update.
- (setcdr cell (cdr (reftex-label-info-update cell)))
- (put docstruct-symbol 'modified t))
+ (setcdr cell (cdr (reftex-label-info-update cell)))
+ (put docstruct-symbol 'modified t))
(setq label (car cell)
typekey (nth 1 cell)
note (nth 5 cell))
(when (and labels
- (or (eq labels t)
- (string= typekey labels)
- (string= labels " "))
+ (or (eq labels t)
+ (string= typekey labels)
+ (string= labels " "))
(or show-commented (null comment)))
;; Yes we want this one
(incf cnt)
- (setq prev-inserted cell)
-; (if (eq offset 'attention) (setq offset cell))
+ (setq prev-inserted cell)
+; (if (eq offset 'attention) (setq offset cell))
- (setq label (concat xr-prefix label))
+ (setq label (concat xr-prefix label))
(when comment (setq label (concat "% " label)))
(insert label-indent label)
(when font
- (setq to (point))
+ (setq to (point))
(put-text-property
(- (point) (length label)) to
'face (if comment
'font-lock-comment-face
label-face))
- (goto-char to))
+ (goto-char to))
(insert (if counter (format " (%d) " cnt) "")
(if comment " LABEL IS COMMENTED OUT " "")
(insert context-indent text "\n")
(setq to (point)))
(put-text-property from to :data cell)
- (when mouse-face
- (put-text-property from (1- to)
- 'mouse-face mouse-face))
+ (when mouse-face
+ (put-text-property from (1- to)
+ 'mouse-face mouse-face))
(goto-char to)))
((eq (car cell) 'index)
- ;; index entry
- (when (and index-entries
- (or (eq t index-entries)
- (string= index-entries (nth 1 cell))))
- (setq prev-inserted cell)
-; (if (eq offset 'attention) (setq offset cell))
- (setq index-tag (format "<%s>" (nth 1 cell)))
- (and font
- (put-text-property 0 (length index-tag)
- 'face reftex-index-tag-face index-tag))
- (insert label-indent index-tag " " (nth 7 cell))
-
- (when font
- (setq to (point))
- (put-text-property
- (- (point) (length (nth 7 cell))) to
- 'face index-face)
- (goto-char to))
- (insert "\n")
- (setq to (point))
-
- (when context
- (insert context-indent (nth 2 cell) "\n")
- (setq to (point)))
- (put-text-property from to :data cell)
- (when mouse-face
- (put-text-property from (1- to)
- 'mouse-face mouse-face))
+ ;; index entry
+ (when (and index-entries
+ (or (eq t index-entries)
+ (string= index-entries (nth 1 cell))))
+ (setq prev-inserted cell)
+; (if (eq offset 'attention) (setq offset cell))
+ (setq index-tag (format "<%s>" (nth 1 cell)))
+ (and font
+ (put-text-property 0 (length index-tag)
+ 'face reftex-index-tag-face index-tag))
+ (insert label-indent index-tag " " (nth 7 cell))
+
+ (when font
+ (setq to (point))
+ (put-text-property
+ (- (point) (length (nth 7 cell))) to
+ 'face index-face)
+ (goto-char to))
+ (insert "\n")
+ (setq to (point))
+
+ (when context
+ (insert context-indent (nth 2 cell) "\n")
+ (setq to (point)))
+ (put-text-property from to :data cell)
+ (when mouse-face
+ (put-text-property from (1- to)
+ 'mouse-face mouse-face))
(goto-char to))))
- (if (eq cell here-I-am)
- (setq offset 'attention))
+ (if (eq cell here-I-am)
+ (setq offset 'attention))
(if (and prev-inserted (eq offset 'attention))
- (setq offset prev-inserted))
+ (setq offset prev-inserted))
)
(when (reftex-refontify)
(goto-char (point-min))
(let (loc pos)
(while locations
- (setq loc (pop locations))
- (cond
- ((null loc))
- ((listp loc)
- (setq pos (text-property-any (point-min) (point-max) :data loc))
- (when pos
- (goto-char pos)
- (throw 'exit t)))
- ((integerp loc)
- (when (<= loc (count-lines (point-min) (point-max)))
- (goto-line loc)
- (throw 'exit t)))))
+ (setq loc (pop locations))
+ (cond
+ ((null loc))
+ ((listp loc)
+ (setq pos (text-property-any (point-min) (point-max) :data loc))
+ (when pos
+ (goto-char pos)
+ (throw 'exit t)))
+ ((integerp loc)
+ (when (<= loc (count-lines (point-min) (point-max)))
+ (goto-line loc)
+ (throw 'exit t)))))
(goto-char fallback))))
(defvar reftex-last-data nil)
(defvar reftex-select-marked nil)
(defun reftex-select-item (prompt help-string keymap
- &optional offset
- call-back cb-flag)
+ &optional offset
+ call-back cb-flag)
;; Select an item, using PROMPT. The function returns a key indicating
;; an exit status, along with a data structure indicating which item was
;; selected.
(save-window-excursion
(setq truncate-lines t)
- ;; Find a good starting point
- (reftex-find-start-point
- (point-min) offset reftex-last-data reftex-last-line)
+ ;; Find a good starting point
+ (reftex-find-start-point
+ (point-min) offset reftex-last-data reftex-last-line)
(beginning-of-line 1)
- (set (make-local-variable 'reftex-last-follow-point) (point))
+ (set (make-local-variable 'reftex-last-follow-point) (point))
(unwind-protect
- (progn
- (use-local-map keymap)
- (add-hook 'pre-command-hook 'reftex-select-pre-command-hook nil t)
- (add-hook 'post-command-hook 'reftex-select-post-command-hook nil t)
- (princ prompt)
- (set-marker reftex-recursive-edit-marker (point))
- ;; XEmacs does not run post-command-hook here
- (and (featurep 'xemacs) (run-hooks 'post-command-hook))
- (recursive-edit))
-
- (set-marker reftex-recursive-edit-marker nil)
- (save-excursion
- (set-buffer selection-buffer)
- (use-local-map nil)
- (remove-hook 'pre-command-hook 'reftex-select-pre-command-hook t)
- (remove-hook 'post-command-hook
- 'reftex-select-post-command-hook t))
- ;; Kill the mark overlays
- (mapcar (lambda (c) (delete-overlay (nth 1 c)))
- reftex-select-marked)))))
+ (progn
+ (use-local-map keymap)
+ (add-hook 'pre-command-hook 'reftex-select-pre-command-hook nil t)
+ (add-hook 'post-command-hook 'reftex-select-post-command-hook nil t)
+ (princ prompt)
+ (set-marker reftex-recursive-edit-marker (point))
+ ;; XEmacs does not run post-command-hook here
+ (and (featurep 'xemacs) (run-hooks 'post-command-hook))
+ (recursive-edit))
+
+ (set-marker reftex-recursive-edit-marker nil)
+ (save-excursion
+ (set-buffer selection-buffer)
+ (use-local-map nil)
+ (remove-hook 'pre-command-hook 'reftex-select-pre-command-hook t)
+ (remove-hook 'post-command-hook
+ 'reftex-select-post-command-hook t))
+ ;; Kill the mark overlays
+ (mapcar (lambda (c) (delete-overlay (nth 1 c)))
+ reftex-select-marked)))))
(set (make-local-variable 'reftex-last-line)
- (+ (count-lines (point-min) (point)) (if (bolp) 1 0)))
+ (+ (count-lines (point-min) (point)) (if (bolp) 1 0)))
(set (make-local-variable 'reftex-last-data) last-data)
(reftex-kill-buffer "*RefTeX Help*")
(setq reftex-callback-fwd (not reftex-callback-fwd)) ;; ;-)))
(let (b e)
(setq data (get-text-property (point) :data))
(setq last-data (or data last-data))
-
+
(when (and data cb-flag
- (not (equal reftex-last-follow-point (point))))
+ (not (equal reftex-last-follow-point (point))))
(setq reftex-last-follow-point (point))
- (funcall call-back data reftex-callback-fwd
- (not reftex-revisit-to-follow)))
+ (funcall call-back data reftex-callback-fwd
+ (not reftex-revisit-to-follow)))
(if data
- (setq b (or (previous-single-property-change
- (1+ (point)) :data)
- (point-min))
- e (or (next-single-property-change
- (point) :data)
- (point-max)))
+ (setq b (or (previous-single-property-change
+ (1+ (point)) :data)
+ (point-min))
+ e (or (next-single-property-change
+ (point) :data)
+ (point-max)))
(setq b (point) e (point)))
(and (memq reftex-highlight-selection '(cursor both))
- (reftex-highlight 1 b e))
+ (reftex-highlight 1 b e))
(if (or (not (pos-visible-in-window-p b))
- (not (pos-visible-in-window-p e)))
- (recenter '(4)))
+ (not (pos-visible-in-window-p e)))
+ (recenter '(4)))
(unless (current-message)
(princ prompt))))
(let (pos)
(cond
((and (local-variable-p 'reftex-last-data (current-buffer))
- reftex-last-data
- (setq pos (text-property-any (point-min) (point-max)
- :data reftex-last-data)))
+ reftex-last-data
+ (setq pos (text-property-any (point-min) (point-max)
+ :data reftex-last-data)))
(goto-char pos))
((and (local-variable-p 'reftex-last-line (current-buffer))
- (integerp reftex-last-line))
+ (integerp reftex-last-line))
(goto-line reftex-last-line))
(t (ding)))))
(defun reftex-select-toggle-follow ()
"Toggle the macro used for referencing the label between \\ref and \\vref."
(interactive)
(setq refstyle
- (cond ((string= refstyle "\\ref") "\\fref")
- ((string= refstyle "\\fref") "\\Fref")
- (t "\\ref")))
+ (cond ((string= refstyle "\\ref") "\\fref")
+ ((string= refstyle "\\fref") "\\Fref")
+ (t "\\ref")))
(force-mode-line-update))
(defun reftex-select-show-insertion-point ()
"Show the point from where selection was started in another window."
(interactive)
(let ((this-window (selected-window)))
(unwind-protect
- (progn
- (switch-to-buffer-other-window
- (marker-buffer reftex-select-return-marker))
- (goto-char (marker-position reftex-select-return-marker))
- (recenter '(4)))
+ (progn
+ (switch-to-buffer-other-window
+ (marker-buffer reftex-select-return-marker))
+ (goto-char (marker-position reftex-select-return-marker))
+ (recenter '(4)))
(select-window this-window))))
(defun reftex-select-callback ()
"Show full context in another window."
(defun reftex-select-read-label ()
"Use minibuffer to read a label to reference, with completion."
(interactive)
- (let ((label (completing-read
- "Label: " (symbol-value reftex-docstruct-symbol)
- nil nil reftex-prefix)))
+ (let ((label (completing-read
+ "Label: " (symbol-value reftex-docstruct-symbol)
+ nil nil reftex-prefix)))
(unless (or (equal label "") (equal label reftex-prefix))
(throw 'myexit label))))
(defun reftex-select-read-cite ()
"Use minibuffer to read a citation key with completion."
(interactive)
(let* ((key (completing-read "Citation key: " found-list))
- (entry (assoc key found-list)))
+ (entry (assoc key found-list)))
(cond
((or (null key) (equal key "")))
(entry
"Mark the entry."
(interactive)
(let* ((data (get-text-property (point) :data))
- boe eoe ovl)
+ boe eoe ovl)
(or data (error "No entry to mark at point"))
(if (assq data reftex-select-marked)
- (error "Entry is already marked"))
+ (error "Entry is already marked"))
(setq boe (or (previous-single-property-change (1+ (point)) :data)
- (point-min))
- eoe (or (next-single-property-change (point) :data) (point-max)))
+ (point-min))
+ eoe (or (next-single-property-change (point) :data) (point-max)))
(setq ovl (make-overlay boe eoe))
(push (list data ovl separator) reftex-select-marked)
(overlay-put ovl 'face reftex-select-mark-face)
(if (featurep 'xemacs)
- ;; before-string property is broken in Emacs
- (overlay-put ovl 'before-string
- (if separator
- (format "*%c%d* " separator
- (length reftex-select-marked))
- (format "*%d* " (length reftex-select-marked)))))
+ ;; before-string property is broken in Emacs
+ (overlay-put ovl 'before-string
+ (if separator
+ (format "*%c%d* " separator
+ (length reftex-select-marked))
+ (format "*%d* " (length reftex-select-marked)))))
(message "Entry has mark no. %d" (length reftex-select-marked))))
(defun reftex-select-mark-comma ()
"Unmark the entry."
(interactive)
(let* ((data (get-text-property (point) :data))
- (cell (assq data reftex-select-marked))
- (ovl (nth 1 cell))
- (cnt 0)
- sep)
+ (cell (assq data reftex-select-marked))
+ (ovl (nth 1 cell))
+ (cnt 0)
+ sep)
(unless cell
(error "No marked entry at point"))
(and ovl (delete-overlay ovl))
(setq reftex-select-marked (delq cell reftex-select-marked))
(if (featurep 'xemacs)
- ;; before-string property is broken in Emacs
- (progn
- (setq cnt (1+ (length reftex-select-marked)))
- (mapcar (lambda (c)
- (setq sep (nth 2 c))
- (overlay-put (nth 1 c) 'before-string
- (if sep
- (format "*%c%d* " sep (decf cnt))
- (format "*%d* " (decf cnt)))))
- reftex-select-marked)))
+ ;; before-string property is broken in Emacs
+ (progn
+ (setq cnt (1+ (length reftex-select-marked)))
+ (mapcar (lambda (c)
+ (setq sep (nth 2 c))
+ (overlay-put (nth 1 c) 'before-string
+ (if sep
+ (format "*%c%d* " sep (decf cnt))
+ (format "*%d* " (decf cnt)))))
+ reftex-select-marked)))
(message "Entry no longer marked")))
(defun reftex-select-help ()
;; Common bindings in reftex-select-label-map and reftex-select-bib-map
(let ((map (make-sparse-keymap)))
(substitute-key-definition
- 'next-line 'reftex-select-next map global-map)
+ 'next-line 'reftex-select-next map global-map)
(substitute-key-definition
- 'previous-line 'reftex-select-previous map global-map)
+ 'previous-line 'reftex-select-previous map global-map)
(substitute-key-definition
'keyboard-quit 'reftex-select-keyboard-quit map global-map)
(substitute-key-definition
- 'newline 'reftex-select-accept map global-map)
+ 'newline 'reftex-select-accept map global-map)
(loop for x in
- '((" " . reftex-select-callback)
- ("n" . reftex-select-next)
- ([(down)] . reftex-select-next)
- ("p" . reftex-select-previous)
- ([(up)] . reftex-select-previous)
- ("f" . reftex-select-toggle-follow)
- ("\C-m" . reftex-select-accept)
- ([(return)] . reftex-select-accept)
- ("q" . reftex-select-quit)
- ("." . reftex-select-show-insertion-point)
- ("?" . reftex-select-help))
- do (define-key map (car x) (cdr x)))
+ '((" " . reftex-select-callback)
+ ("n" . reftex-select-next)
+ ([(down)] . reftex-select-next)
+ ("p" . reftex-select-previous)
+ ([(up)] . reftex-select-previous)
+ ("f" . reftex-select-toggle-follow)
+ ("\C-m" . reftex-select-accept)
+ ([(return)] . reftex-select-accept)
+ ("q" . reftex-select-quit)
+ ("." . reftex-select-show-insertion-point)
+ ("?" . reftex-select-help))
+ do (define-key map (car x) (cdr x)))
;; The mouse-2 binding
(if (featurep 'xemacs)
;; Digit arguments
(loop for key across "0123456789" do
- (define-key map (vector (list key)) 'digit-argument))
+ (define-key map (vector (list key)) 'digit-argument))
(define-key map "-" 'negative-argument)
;; Make two maps
;; Specific bindings in reftex-select-label-map
(loop for key across "aAcgFlrRstx#%" do
(define-key reftex-select-label-map (vector (list key))
- (list 'lambda '()
- "Press `?' during selection to find out about this key."
- '(interactive) (list 'throw '(quote myexit) key))))
+ (list 'lambda '()
+ "Press `?' during selection to find out about this key."
+ '(interactive) (list 'throw '(quote myexit) key))))
(loop for x in
'(("b" . reftex-select-jump-to-previous)
- ("z" . reftex-select-jump)
- ("v" . reftex-select-toggle-varioref)
- ("V" . reftex-select-toggle-fancyref)
- ("m" . reftex-select-mark)
- ("u" . reftex-select-unmark)
- ("," . reftex-select-mark-comma)
- ("-" . reftex-select-mark-to)
- ("+" . reftex-select-mark-and)
- ([(tab)] . reftex-select-read-label)
- ("\C-i" . reftex-select-read-label)
- ("\C-c\C-n" . reftex-select-next-heading)
- ("\C-c\C-p" . reftex-select-previous-heading))
+ ("z" . reftex-select-jump)
+ ("v" . reftex-select-toggle-varioref)
+ ("V" . reftex-select-toggle-fancyref)
+ ("m" . reftex-select-mark)
+ ("u" . reftex-select-unmark)
+ ("," . reftex-select-mark-comma)
+ ("-" . reftex-select-mark-to)
+ ("+" . reftex-select-mark-and)
+ ([(tab)] . reftex-select-read-label)
+ ("\C-i" . reftex-select-read-label)
+ ("\C-c\C-n" . reftex-select-next-heading)
+ ("\C-c\C-p" . reftex-select-previous-heading))
do
(define-key reftex-select-label-map (car x) (cdr x)))
;; Specific bindings in reftex-select-bib-map
(loop for key across "grRaA" do
(define-key reftex-select-bib-map (vector (list key))
- (list 'lambda '()
- "Press `?' during selection to find out about this key."
- '(interactive) (list 'throw '(quote myexit) key))))
+ (list 'lambda '()
+ "Press `?' during selection to find out about this key."
+ '(interactive) (list 'throw '(quote myexit) key))))
(loop for x in
'(("\C-i" . reftex-select-read-cite)
- ([(tab)] . reftex-select-read-cite)
- ("m" . reftex-select-mark)
- ("u" . reftex-select-unmark))
+ ([(tab)] . reftex-select-read-cite)
+ ("m" . reftex-select-mark)
+ ("u" . reftex-select-unmark))
do (define-key reftex-select-bib-map (car x) (cdr x)))
-
-;;; arch-tag: 842078ff-0586-4e0b-957e-536e08218464
+
;;; reftex-sel.el ends here
;;; reftex-toc.el --- RefTeX's table of contents mode
-;; Copyright (c) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
+;; Copyright (c) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
-;; Version: 4.21
+;; Version: 4.18
;; This file is part of GNU Emacs.
(interactive)
(kill-all-local-variables)
(setq major-mode 'reftex-toc-mode
- mode-name "TOC")
+ mode-name "TOC")
(use-local-map reftex-toc-map)
- (set (make-local-variable 'transient-mark-mode) t)
- (set (make-local-variable 'zmacs-regions) t)
(set (make-local-variable 'revert-buffer-function) 'reftex-toc-revert)
(set (make-local-variable 'reftex-toc-include-labels-indicator) "")
(set (make-local-variable 'reftex-toc-max-level-indicator)
(if (= reftex-toc-max-level 100)
- "ALL"
- (int-to-string reftex-toc-max-level)))
+ "ALL"
+ (int-to-string reftex-toc-max-level)))
(setq mode-line-format
- (list "---- " 'mode-line-buffer-identification
- " " 'global-mode-string " (" mode-name ")"
- " L<" 'reftex-toc-include-labels-indicator ">"
- " I<" 'reftex-toc-include-index-indicator ">"
- " T<" 'reftex-toc-max-level-indicator ">"
- " -%-"))
+ (list "---- " 'mode-line-buffer-identification
+ " " 'global-mode-string " (" mode-name ")"
+ " L<" 'reftex-toc-include-labels-indicator ">"
+ " I<" 'reftex-toc-include-index-indicator ">"
+ " T<" 'reftex-toc-max-level-indicator ">"
+ " -%-"))
(setq truncate-lines t)
(when (featurep 'xemacs)
;; XEmacs needs the call to make-local-hook
SPC Show the corresponding location of the LaTeX document.
TAB Goto the location and keep the *toc* window.
RET Goto the location and hide the *toc* window (also on mouse-2).
-< / > Promote / Demote section, or all sections in region.
C-c > Display Index. With prefix arg, restrict index to current section.
q / k Hide/Kill *toc* buffer, return to position of reftex-toc command.
l i c F Toggle display of [l]abels, [i]ndex, [c]ontext, [F]ile borders.
t Change maximum toc depth (e.g. `3 t' hides levels greater than 3).
-f / g Toggle follow mode / Refresh *toc* buffer.
-a / d Toggle auto recenter / Toggle dedicated frame
+f / a / g Toggle follow mode / toggle auto recenter / Refresh *toc* buffer.
r / C-u r Reparse the LaTeX document / Reparse entire LaTeX document.
. In other window, show position from where `reftex-toc' was called.
-M-% Global search and replace to rename label at point.
x Switch to TOC of external document (with LaTeX package `xr').
-z Jump to a specific section (e.g. '3 z' goes to section 3).")
+z Jump to a specific section (e.g. '3 z' goes to section 3")
-(defun reftex-toc (&optional rebuild reuse)
+(defun reftex-toc (&optional rebuild)
"Show the table of contents for the current document.
When called with a raw C-u prefix, rescan the document first."
-;; The REUSE argument means, search all visible frames for a window
-;; displaying the toc window. If yes, reuse this window.
-
(interactive)
(if (or (not (string= reftex-last-toc-master (reftex-TeX-master-file)))
(reftex-access-scan-info current-prefix-arg)
(let* ((this-buf (current-buffer))
- (docstruct-symbol reftex-docstruct-symbol)
- (xr-data (assq 'xr (symbol-value reftex-docstruct-symbol)))
- (xr-alist (cons (cons "" (buffer-file-name)) (nth 1 xr-data)))
- (here-I-am (if (boundp 'reftex-rebuilding-toc)
- (get 'reftex-toc :reftex-data)
- (car (reftex-where-am-I))))
- (unsplittable (if (fboundp 'frame-property)
- (frame-property (selected-frame) 'unsplittable)
- (frame-parameter (selected-frame) 'unsplittable)))
- offset toc-window)
-
- (if (setq toc-window (get-buffer-window
- "*toc*"
- (if reuse 'visible)))
- (select-window toc-window)
+ (docstruct-symbol reftex-docstruct-symbol)
+ (xr-data (assq 'xr (symbol-value reftex-docstruct-symbol)))
+ (xr-alist (cons (cons "" (buffer-file-name)) (nth 1 xr-data)))
+ (here-I-am (if (boundp 'reftex-rebuilding-toc)
+ (get 'reftex-toc :reftex-data)
+ (car (reftex-where-am-I))))
+ offset)
+
+ (if (get-buffer-window "*toc*")
+ (select-window (get-buffer-window "*toc*"))
(when (or (not reftex-toc-keep-other-windows)
- (< (window-height) (* 2 window-min-height)))
- (delete-other-windows))
+ (< (window-height) (* 2 window-min-height)))
+ (delete-other-windows))
(setq reftex-last-window-width (window-width)
- reftex-last-window-height (window-height)) ; remember
-
- (unless unsplittable
- (if reftex-toc-split-windows-horizontally
- (split-window-horizontally
- (floor (* (window-width)
- reftex-toc-split-windows-fraction)))
- (split-window-vertically
- (floor (* (window-height)
- reftex-toc-split-windows-fraction)))))
+ reftex-last-window-height (window-height)) ; remember
+ (if reftex-toc-split-windows-horizontally
+ (split-window-horizontally
+ (floor (* (frame-width) reftex-toc-split-windows-horizontally-fraction)))
+ (split-window))
(let ((default-major-mode 'reftex-toc-mode))
- (switch-to-buffer "*toc*")))
+ (switch-to-buffer "*toc*")))
(or (eq major-mode 'reftex-toc-mode) (reftex-toc-mode))
(set (make-local-variable 'reftex-docstruct-symbol) docstruct-symbol)
(setq reftex-toc-include-labels-indicator
- (if (eq reftex-toc-include-labels t)
- "ALL"
- reftex-toc-include-labels))
+ (if (eq reftex-toc-include-labels t)
+ "ALL"
+ reftex-toc-include-labels))
(setq reftex-toc-include-index-indicator
- (if (eq reftex-toc-include-index-entries t)
- "ALL"
- reftex-toc-include-index-entries))
+ (if (eq reftex-toc-include-index-entries t)
+ "ALL"
+ reftex-toc-include-index-entries))
(cond
((= (buffer-size) 0)
(put-text-property (point-min) (1+ (point-min)) 'xr-alist xr-alist)
(setq offset
- (reftex-insert-docstruct
- this-buf
- t ; include toc
- reftex-toc-include-labels
- reftex-toc-include-index-entries
- reftex-toc-include-file-boundaries
- reftex-toc-include-context
- nil ; counter
- nil ; commented
- here-I-am
- "" ; xr-prefix
- t ; a toc buffer
- ))
-
+ (reftex-insert-docstruct
+ this-buf
+ t ; include toc
+ reftex-toc-include-labels
+ reftex-toc-include-index-entries
+ reftex-toc-include-file-boundaries
+ reftex-toc-include-context
+ nil ; counter
+ nil ; commented
+ here-I-am
+ "" ; xr-prefix
+ t ; a toc buffer
+ ))
+
(run-hooks 'reftex-display-copied-context-hook)
(message "Building *toc* buffer...done.")
(setq buffer-read-only t))
(t
;; Only compute the offset
(setq offset
- (or (reftex-get-offset this-buf here-I-am
- (if reftex-toc-include-labels " " nil)
- t
- reftex-toc-include-index-entries
- reftex-toc-include-file-boundaries)
- (reftex-last-assoc-before-elt
- 'toc here-I-am
- (symbol-value reftex-docstruct-symbol))))
+ (or (reftex-get-offset this-buf here-I-am
+ (if reftex-toc-include-labels " " nil)
+ t
+ reftex-toc-include-index-entries
+ reftex-toc-include-file-boundaries)
+ (reftex-last-assoc-before-elt
+ 'toc here-I-am
+ (symbol-value reftex-docstruct-symbol))))
(put 'reftex-toc :reftex-line 3)
(goto-line 3)
(beginning-of-line)))
(defun reftex-toc-recenter (&optional arg)
"Display the TOC window and highlight line corresponding to current position."
(interactive "P")
- (let ((buf (current-buffer))
- (frame (selected-frame)))
- (reftex-toc arg t)
+ (let ((buf (current-buffer)))
+ (reftex-toc arg)
(if (= (count-lines 1 (point)) 2)
- (let ((current-prefix-arg nil))
- (select-window (get-buffer-window buf frame))
- (reftex-toc nil t)))
+ (let ((current-prefix-arg nil))
+ (select-window (get-buffer-window buf))
+ (reftex-toc nil)))
(and (> (point) 1)
- (not (get-text-property (point) 'intangible))
- (memq reftex-highlight-selection '(cursor both))
- (reftex-highlight 2
- (or (previous-single-property-change
- (min (point-max) (1+ (point))) :data)
- (point-min))
- (or (next-single-property-change (point) :data)
- (point-max))))
- (select-window (get-buffer-window buf frame))))
+ (not (get-text-property (point) 'intangible))
+ (memq reftex-highlight-selection '(cursor both))
+ (reftex-highlight 2
+ (or (previous-single-property-change
+ (min (point-max) (1+ (point))) :data)
+ (point-min))
+ (or (next-single-property-change (point) :data)
+ (point-max))))
+ (select-window (get-buffer-window buf))))
(defun reftex-toc-pre-command-hook ()
;; used as pre command hook in *toc* buffer
(reftex-unhighlight 0)
+;; (reftex-unhighlight 1) ;; remove highlight on leaving buffer.
)
(defun reftex-toc-post-command-hook ()
(when (get-text-property (point) :data)
(put 'reftex-toc :reftex-data (get-text-property (point) :data))
(and (> (point) 1)
- (not (get-text-property (point) 'intangible))
- (memq reftex-highlight-selection '(cursor both))
- (reftex-highlight 2
- (or (previous-single-property-change (1+ (point)) :data)
- (point-min))
- (or (next-single-property-change (point) :data)
- (point-max)))))
+ (not (get-text-property (point) 'intangible))
+ (memq reftex-highlight-selection '(cursor both))
+ (reftex-highlight 2
+ (or (previous-single-property-change (1+ (point)) :data)
+ (point-min))
+ (or (next-single-property-change (point) :data)
+ (point-max)))))
(if (integerp reftex-toc-follow-mode)
;; remove delayed action
(setq reftex-toc-follow-mode t)
- (and (not (reftex-toc-dframe-p))
- reftex-toc-follow-mode
- (not (equal reftex-last-follow-point (point)))
- ;; show context in other window
- (setq reftex-last-follow-point (point))
- (condition-case nil
- (reftex-toc-visit-location nil (not reftex-revisit-to-follow))
- (error t)))))
+ (and reftex-toc-follow-mode
+ (not (equal reftex-last-follow-point (point)))
+ ;; show context in other window
+ (setq reftex-last-follow-point (point))
+ (condition-case nil
+ (reftex-toc-visit-location nil (not reftex-revisit-to-follow))
+ (error t)))))
(defun reftex-re-enlarge ()
;; Enlarge window to a remembered size.
(if reftex-toc-split-windows-horizontally
(enlarge-window-horizontally
(max 0 (- (or reftex-last-window-width (window-width))
- (window-width))))
+ (window-width))))
(enlarge-window
(max 0 (- (or reftex-last-window-height (window-height))
- (window-height))))))
-
-(defun reftex-toc-dframe-p (&optional frame error)
- ;; Check if FRAME is the dedicated TOC frame.
- ;; If yes, and ERROR is non-nil, throw an error.
- (setq frame (or frame (selected-frame)))
- (let ((res (equal
- (if (fboundp 'frame-property)
- (frame-property frame 'name)
- (frame-parameter frame 'name))
- "RefTeX TOC Frame")))
- (if (and res error)
- (error "This frame is view-only. Use `C-c =' to create toc window for commands."))
- res))
+ (window-height))))))
(defun reftex-toc-show-help ()
"Show a summary of special key bindings."
(interactive)
- (reftex-toc-dframe-p nil 'error)
(with-output-to-temp-buffer "*RefTeX Help*"
(princ reftex-toc-help))
(reftex-enlarge-to-fit "*RefTeX Help*" t)
(defun reftex-toc-next (&optional arg)
"Move to next selectable item."
(interactive "p")
- (if (boundp 'zmacs-region-stays) (setq zmacs-region-stays t))
(setq reftex-callback-fwd t)
(or (eobp) (forward-char 1))
- (goto-char (or (next-single-property-change (point) :data)
- (point))))
+ (goto-char (or (next-single-property-change (point) :data)
+ (point))))
(defun reftex-toc-previous (&optional arg)
"Move to previous selectable item."
(interactive "p")
- (if (boundp 'zmacs-region-stays) (setq zmacs-region-stays t))
(setq reftex-callback-fwd nil)
(goto-char (or (previous-single-property-change (point) :data)
- (point))))
+ (point))))
(defun reftex-toc-next-heading (&optional arg)
"Move to next table of contentes line."
(interactive "p")
- (if (boundp 'zmacs-region-stays) (setq zmacs-region-stays t))
(end-of-line)
(re-search-forward "^ " nil t arg)
(beginning-of-line))
(defun reftex-toc-previous-heading (&optional arg)
"Move to previous table of contentes line."
(interactive "p")
- (if (boundp 'zmacs-region-stays) (setq zmacs-region-stays t))
(re-search-backward "^ " nil t arg))
(defun reftex-toc-toggle-follow ()
"Toggle follow (other window follows with context)."
"Toggle inclusion of file boundaries in *toc* buffer."
(interactive)
(setq reftex-toc-include-file-boundaries
- (not reftex-toc-include-file-boundaries))
+ (not reftex-toc-include-file-boundaries))
(reftex-toc-revert))
(defun reftex-toc-toggle-labels (arg)
"Toggle inclusion of labels in *toc* buffer.
With prefix ARG, prompt for a label type and include only labels of
that specific type."
(interactive "P")
- (setq reftex-toc-include-labels
- (if arg (reftex-query-label-type)
- (not reftex-toc-include-labels)))
+ (setq reftex-toc-include-labels
+ (if arg (reftex-query-label-type)
+ (not reftex-toc-include-labels)))
(reftex-toc-revert))
(defun reftex-toc-toggle-index (arg)
"Toggle inclusion of index in *toc* buffer.
specific index."
(interactive "P")
(setq reftex-toc-include-index-entries
- (if arg (reftex-index-select-tag)
- (not reftex-toc-include-index-entries)))
+ (if arg (reftex-index-select-tag)
+ (not reftex-toc-include-index-entries)))
(reftex-toc-revert))
(defun reftex-toc-toggle-context ()
"Toggle inclusion of label context in *toc* buffer.
levels are shown. For eaxample, to set the level to 3, type `3 m'."
(interactive "P")
(setq reftex-toc-max-level (if arg
- (prefix-numeric-value arg)
- 100))
+ (prefix-numeric-value arg)
+ 100))
(setq reftex-toc-max-level-indicator
- (if arg (int-to-string reftex-toc-max-level) "ALL"))
+ (if arg (int-to-string reftex-toc-max-level) "ALL"))
(reftex-toc-revert))
(defun reftex-toc-view-line ()
"View document location in other window."
(interactive)
- (reftex-toc-dframe-p nil 'error)
(reftex-toc-visit-location))
(defun reftex-toc-goto-line-and-hide ()
"Go to document location in other window. Hide the *toc* window."
(interactive)
- (reftex-toc-dframe-p nil 'error)
(reftex-toc-visit-location 'hide))
(defun reftex-toc-goto-line ()
"Go to document location in other window. *toc* window stays."
(interactive)
- (reftex-toc-dframe-p nil 'error)
(reftex-toc-visit-location t))
(defun reftex-toc-mouse-goto-line-and-hide (ev)
"Go to document location in other window. Hide the *toc* window."
(interactive "e")
(mouse-set-point ev)
- (reftex-toc-dframe-p nil 'error)
(reftex-toc-visit-location 'hide))
(defun reftex-toc-show-calling-point ()
"Show point where reftex-toc was called from."
(interactive)
- (reftex-toc-dframe-p nil 'error)
(let ((this-window (selected-window)))
(unwind-protect
- (progn
- (switch-to-buffer-other-window
- (marker-buffer reftex-toc-return-marker))
- (goto-char (marker-position reftex-toc-return-marker))
- (recenter '(4)))
+ (progn
+ (switch-to-buffer-other-window
+ (marker-buffer reftex-toc-return-marker))
+ (goto-char (marker-position reftex-toc-return-marker))
+ (recenter '(4)))
(select-window this-window))))
(defun reftex-toc-quit ()
- "Hide the *toc* window and do not move point.
-If the toc window is the only window on the dedicated TOC frame, the frame
-is destroyed."
+ "Hide the *toc* window and do not move point."
(interactive)
- (if (and (one-window-p)
- (reftex-toc-dframe-p)
- (> (length (frame-list)) 1))
- (delete-frame)
- (or (one-window-p) (delete-window))
- (switch-to-buffer (marker-buffer reftex-toc-return-marker))
- (reftex-re-enlarge)
- (goto-char (or (marker-position reftex-toc-return-marker) (point)))))
+ (or (one-window-p) (delete-window))
+ (switch-to-buffer (marker-buffer reftex-toc-return-marker))
+ (reftex-re-enlarge)
+ (goto-char (or (marker-position reftex-toc-return-marker) (point))))
(defun reftex-toc-quit-and-kill ()
"Kill the *toc* buffer."
(interactive)
This works just like `reftex-display-index' from a LaTeX buffer.
With prefix arg 1, restrict index to the section at point."
(interactive "P")
- (reftex-toc-dframe-p nil 'error)
(let ((data (get-text-property (point) :data))
- (docstruct (symbol-value reftex-docstruct-symbol))
- bor eor restr)
+ (docstruct (symbol-value reftex-docstruct-symbol))
+ bor eor restr)
(when (equal arg 2)
(setq bor (reftex-last-assoc-before-elt 'toc data docstruct)
- eor (assoc 'toc (cdr (memq bor docstruct)))
- restr (list (nth 6 bor) bor eor)))
+ eor (assoc 'toc (cdr (memq bor docstruct)))
+ restr (list (nth 6 bor) bor eor)))
(reftex-toc-goto-line)
(reftex-display-index (if restr nil arg) restr)))
-
-;; Rescanning the document and rebuilding the TOC buffer.
(defun reftex-toc-rescan (&rest ignore)
"Regenerate the *toc* buffer by reparsing file of section at point."
(interactive)
- (if (and reftex-enable-partial-scans
- (null current-prefix-arg))
+ (if (and reftex-enable-partial-scans
+ (null current-prefix-arg))
(let* ((data (get-text-property (point) :data))
- (what (car data))
- (file (cond ((eq what 'toc) (nth 3 data))
- ((memq what '(eof bof file-error)) (nth 1 data))
- ((stringp what) (nth 3 data))
- ((eq what 'index) (nth 3 data))))
- (line (+ (count-lines (point-min) (point)) (if (bolp) 1 0))))
+ (what (car data))
+ (file (cond ((eq what 'toc) (nth 3 data))
+ ((memq what '(eof bof file-error)) (nth 1 data))
+ ((stringp what) (nth 3 data))
+ ((eq what 'index) (nth 3 data))))
+ (line (+ (count-lines (point-min) (point)) (if (bolp) 1 0))))
(if (not file)
(error "Don't know which file to rescan. Try `C-u r'")
- (put 'reftex-toc :reftex-line line)
+ (put 'reftex-toc :reftex-line line)
(switch-to-buffer-other-window
(reftex-get-file-buffer-force file))
- (setq current-prefix-arg '(4))
- (let ((reftex-rebuilding-toc t))
- (reftex-toc))))
+ (setq current-prefix-arg '(4))
+ (let ((reftex-rebuilding-toc t))
+ (reftex-toc))))
(reftex-toc-Rescan))
(reftex-kill-temporary-buffers))
-
(defun reftex-toc-Rescan (&rest ignore)
"Regenerate the *toc* buffer by reparsing the entire document."
(interactive)
(setq current-prefix-arg '(16))
(let ((reftex-rebuilding-toc t))
(reftex-toc)))
-
(defun reftex-toc-revert (&rest ignore)
"Regenerate the *toc* from the internal lists."
(interactive)
- (let ((unsplittable
- (if (fboundp 'frame-property)
- (frame-property (selected-frame) 'unsplittable)
- (frame-parameter (selected-frame) 'unsplittable)))
- (reftex-rebuilding-toc t))
- (if unsplittable
- (switch-to-buffer
- (reftex-get-file-buffer-force reftex-last-toc-file))
- (switch-to-buffer-other-window
- (reftex-get-file-buffer-force reftex-last-toc-file))))
+ (switch-to-buffer-other-window
+ (reftex-get-file-buffer-force reftex-last-toc-file))
(reftex-erase-buffer "*toc*")
(setq current-prefix-arg nil)
- (reftex-toc t))
-
+ (let ((reftex-rebuilding-toc t))
+ (reftex-toc t)))
(defun reftex-toc-external (&rest ignore)
"Switch to table of contents of an external document."
(interactive)
- (reftex-toc-dframe-p nil 'error)
(let* ((old-buf (current-buffer))
- (xr-alist (get-text-property 1 'xr-alist))
- (xr-index (reftex-select-external-document
- xr-alist 0)))
+ (xr-alist (get-text-property 1 'xr-alist))
+ (xr-index (reftex-select-external-document
+ xr-alist 0)))
(switch-to-buffer-other-window (or (reftex-get-file-buffer-force
- (cdr (nth xr-index xr-alist)))
- (error "Cannot switch document")))
+ (cdr (nth xr-index xr-alist)))
+ (error "Cannot switch document")))
(reftex-toc)
(if (equal old-buf (current-buffer))
- (message "")
+ (message "")
(message "Switched document"))))
(defun reftex-toc-jump (arg)
nil t)
(beginning-of-line))
-;; Promotion/Demotion stuff
-
-(defun reftex-toc-demote (&optional arg)
- "Demote section at point. If region is active, apply to all in region."
- (interactive "p")
- (reftex-toc-do-promote 1))
-(defun reftex-toc-promote (&optional arg)
- "Promote section at point. If region is active, apply to all in region."
- (interactive "p")
- (reftex-toc-do-promote -1))
-(defun reftex-toc-do-promote (delta)
- "Workhorse for reftex-toc-promote and reftex-to-demote.
-Changes the level of sections in the current region, or just the section at
-point."
- ;; We should not do anything unless we are sure this is going to work for
- ;; each section in the region. Therefore we first collect information and
- ;; test.
- (let* ((start-line (+ (count-lines (point-min) (point))
- (if (bolp) 1 0)))
- (mark-line (if (reftex-region-active-p)
- (save-excursion (goto-char (mark))
- (+ (count-lines (point-min) (point))
- (if (bolp) 1 0)))))
- (start-pos (point))
- (pro-or-de (if (> delta 0) "de" "pro"))
- beg end entries data sections nsec mpos msg)
- (setq msg
- (catch 'exit
- (if (reftex-region-active-p)
- ;; A region is dangerous, check if we have a brandnew scan,
- ;; to make sure we are not missing any section statements.
- (if (not (reftex-toc-check-docstruct))
- (reftex-toc-load-all-files-for-promotion) ;; exits
- (setq beg (min (point) (mark))
- end (max (point) (mark))))
- (setq beg (point) end (point)))
- (goto-char beg)
- (while (and (setq data (get-text-property (point) :data))
- (<= (point) end))
- (if (eq (car data) 'toc) (push (cons data (point)) entries))
- (goto-char (or (next-single-property-change (point) :data)
- (point-max))))
- (setq entries (nreverse entries))
- ;; Get the relevant section numbers, for an informative message
- (goto-char start-pos)
- (setq sections (reftex-toc-extract-section-number (car entries)))
- (if (> (setq nsec (length entries)) 1)
- (setq sections
- (concat sections "-"
- (reftex-toc-extract-section-number
- (nth (1- nsec) entries)))))
- ;; Run through the list and prepare the changes.
- (setq entries (mapcar 'reftex-toc-promote-prepare entries))
- ;; Ask for permission
- (if (or (not reftex-toc-confirm-promotion) ; never confirm
- (and (integerp reftex-toc-confirm-promotion) ; confirm if many
- (< nsec reftex-toc-confirm-promotion))
- (yes-or-no-p ; ask
- (format "%s %d toc-entr%s (section%s %s)? "
- (if (< delta 0) "Promote" "Demote")
- nsec
- (if (= 1 nsec) "y" "ies")
- (if (= 1 nsec) "" "s")
- sections)))
- nil ; we have permission, do nothing
- (error "Abort")) ; abort, we don't have permission
- ;; Do the changes
- (mapcar 'reftex-toc-promote-action entries)
- ;; Rescan the document and rebuilt the toc buffer
- (save-window-excursion
- (reftex-toc-Rescan))
- (reftex-toc-restore-region start-line mark-line)
- (message "%d section%s %smoted"
- nsec (if (= 1 nsec) "" "s") pro-or-de)
- nil))
- (if msg (progn (ding) (message msg)))))
-
-(defvar delta)
-(defvar mpos)
-(defvar pro-or-de)
-(defvar start-pos)
-(defvar start-line)
-(defvar mark-line)
-
-(defun reftex-toc-restore-region (point-line &optional mark-line)
- (if mark-line
- (progn (goto-line mark-line)
- (setq mpos (point))))
- (if point-line (goto-line point-line))
- (if mark-line
- (progn
- (set-mark mpos)
- (if (fboundp 'zmacs-activate-region)
- (zmacs-activate-region)
- (setq mark-active t
- deactivate-mark nil)))))
-
-(defun reftex-toc-promote-prepare (x)
- "Look at a toc entry and see if we could pro/demote it.
-Expects the level change DELTA to be dynamically scoped into this function.
-This function prepares everything for the changes, but does not do it.
-The return value is a list with information needed when doing the
-promotion/demotion later."
- (let* ((data (car x))
- (toc-point (cdr x))
- (marker (nth 4 data))
- (literal (nth 7 data))
- (load nil)
- (name nil)
- ;; Here follows some paranoid code to make very sure we are not
- ;; going to break anything
- (name1 ; dummy
- (if (and (markerp marker) (marker-buffer marker))
- ;; Buffer is still live and we have the marker.
- (progn
- (save-excursion
- ;; Goto the buffer and check of section is unchanged
- (set-buffer (marker-buffer marker))
- (goto-char (marker-position marker))
- (if (looking-at (regexp-quote literal))
- ;; OK, get the makro name
- (progn
- (beginning-of-line 1)
- (if (looking-at reftex-section-regexp)
- (setq name (reftex-match-string 2))
- (error "Something is wrong! Contact maintainer!")))
- ;; Section has changed, request scan and loading
- ;; We use a variable to delay until after the safe-exc.
- ;; because otherwise we loose the region.
- (setq load t)))
- ;; Scan document and load all files, this exits command
- (if load (reftex-toc-load-all-files-for-promotion))) ; exits
- ;; We don't have a live marker: scan and load files.
- (reftex-toc-load-all-files-for-promotion)))
- (level (cdr (assoc name reftex-section-levels-all)))
- (dummy (if (not (integerp level))
- (progn
- (goto-char toc-point)
- (error "Cannot %smote special sections" pro-or-de))))
- ;; Delta is dynamically scoped into here...
- (newlevel (if (>= level 0) (+ delta level) (- level delta)))
- (dummy2 (if (or (and (>= level 0) (= newlevel -1))
- (and (< level 0) (= newlevel 0)))
- (error "Cannot %smote \\%s" pro-or-de name)))
- (newname (reftex-toc-newhead-from-alist newlevel name
- reftex-section-levels-all)))
- (if (and name newname)
- (list data name newname toc-point)
- (goto-char toc-point)
- (error "Cannot %smote \\%s" pro-or-de name))))
-
-(defun reftex-toc-promote-action (x)
- "Change the level of a toc entry.
-DELTA and PRO-OR-DE are assumed to be dynamically scoped into this function."
- (let* ((data (car x))
- (name (nth 1 x))
- (newname (nth 2 x))
- (marker (nth 4 data)))
- (save-excursion
- (set-buffer (marker-buffer marker))
- (goto-char (marker-position marker))
- (if (looking-at (concat "\\([ \t]*\\\\\\)" (regexp-quote name)))
- (replace-match (concat "\\1" newname))
- (error "Fatal error during %smotion" pro-or-de)))))
-
-(defun reftex-toc-extract-section-number (entry)
- "Get the numbering of a toc entry, for message purposes."
- (if (string-match "\\s-*\\(\\S-+\\)" (nth 2 (car entry)))
- (match-string 1 (nth 2 (car entry)))
- "?"))
-
-(defun reftex-toc-newhead-from-alist (nlevel head alist)
- "Get new heading with level NLEVEL from ALIST.
-If there are no such entries, return nil.
-If there are several different entries with same new level, choose
-the one with the smallest distance to the assocation of HEAD in the alist.
-This makes it possible for promotion to work several sets of headings,
-if these sets are sorted blocks in the alist."
- (let* ((al alist)
- (ass (assoc head al))
- (pos (length (memq ass al)))
- dist (mindist 1000) newhead)
- (while al
- (if (equal (cdar al) nlevel)
- (progn
- (setq dist (abs (- (length al) pos)))
- (if (< dist mindist)
- (setq newhead (car (car al))
- mindist dist))))
- (setq al (cdr al)))
- newhead))
-
-(defun reftex-toc-check-docstruct ()
- "Check if the current docstruct is fully up to date and all files visited."
- ;; We do this by checking if all sections are on the right position
- (let ((docstruct (symbol-value reftex-docstruct-symbol))
- entry marker empoint)
- (catch 'exit
- (while (setq entry (pop docstruct))
- (if (eq (car entry) 'toc)
- (progn
- (setq marker (nth 4 entry)
- empoint (nth 8 entry))
- (if (not (and (markerp marker)
- (marker-buffer marker)
- (= (marker-position marker) empoint)))
- (throw 'exit nil)))))
- t)))
-
-(defun reftex-toc-load-all-files-for-promotion ()
- "Make sure all files of the document are being visited by buffers,
-and that the scanning info is absolutely up to date.
-We do this by rescanning with reftex-keep-temporary-buffers bound to t.
-The variable PRO-OR-DE is assumed to be dynamically scoped into thes function.
-When finished, we exit with an error message."
- (let ((reftex-keep-temporary-buffers t))
- (reftex-toc-Rescan)
- (reftex-toc-restore-region start-line mark-line)
- (throw 'exit
- (format "TOC had to be updated first. Please check selection and repeat the command." pro-or-de))))
-
-(defun reftex-toc-rename-label ()
- "Rename the currently selected label in the *TOC* buffer.
-This launches a global search and replace in order to rename a label.
-Renaming a label is hardly ever necessary - the only exeption is after
-promotion/demotion in connection with a package like fancyref, where the
-label prefix determines the wording of a reference."
- (interactive)
- (let* ((toc (get-text-property (point) :data))
- (label (car toc)) newlabel)
- (if (not (stringp label))
- (error "This is not a label entry."))
- (setq newlabel (read-string (format "Rename label \"%s\" to:" label)))
- (if (assoc newlabel (symbol-value reftex-docstruct-symbol))
- (if (not (y-or-n-p
- (format "Label '%s' exists. Use anyway? " label)))
- (error "Abort")))
- (save-excursion
- (save-window-excursion
- (reftex-toc-visit-location t)
- (condition-case nil
- (reftex-query-replace-document
- (concat "{" (regexp-quote label) "}")
- (format "{%s}" newlabel))
- (error t))))
- (reftex-toc-rescan)))
-
-
(defun reftex-toc-visit-location (&optional final no-revisit)
;; Visit the tex file corresponding to the toc entry on the current line.
;; If FINAL is t, stay there
show-window show-buffer match)
(unless toc (error "Don't know which toc line to visit"))
-
+
(cond
-
+
((eq (car toc) 'toc)
;; a toc entry
(setq match (reftex-toc-find-section toc no-revisit)))
((memq (car toc) '(bof eof))
;; A file entry
(setq match
- (let ((where (car toc))
- (file (nth 1 toc)))
- (if (or (not no-revisit) (reftex-get-buffer-visiting file))
- (progn
- (switch-to-buffer-other-window
- (reftex-get-file-buffer-force file nil))
- (goto-char (if (eq where 'bof) (point-min) (point-max))))
- (message reftex-no-follow-message) nil))))
+ (let ((where (car toc))
+ (file (nth 1 toc)))
+ (if (or (not no-revisit) (reftex-get-buffer-visiting file))
+ (progn
+ (switch-to-buffer-other-window
+ (reftex-get-file-buffer-force file nil))
+ (goto-char (if (eq where 'bof) (point-min) (point-max))))
+ (message reftex-no-follow-message) nil))))
((stringp (car toc))
;; a label
(setq match (reftex-show-label-location toc reftex-callback-fwd
- no-revisit t))))
+ no-revisit t))))
(setq show-window (selected-window)
show-buffer (current-buffer))
;; If `show-window' is still live, show-buffer is already visible
;; so let's not make it visible in yet-another-window.
(if (window-live-p show-window)
- (set-buffer show-buffer)
+ (select-window show-window)
(switch-to-buffer show-buffer))
(reftex-re-enlarge))
(t nil))))
(defun reftex-toc-find-section (toc &optional no-revisit)
(let* ((file (nth 3 toc))
- (marker (nth 4 toc))
- (level (nth 5 toc))
- (literal (nth 7 toc))
- (emergency-point (nth 8 toc))
- (match
- (cond
- ((and (markerp marker) (marker-buffer marker))
- ;; Buffer is still live and we have the marker. Should be easy.
- (switch-to-buffer-other-window (marker-buffer marker))
- (goto-char (marker-position marker))
- (or (looking-at (regexp-quote literal))
- (looking-at (reftex-make-regexp-allow-for-ctrl-m literal))
- (looking-at (reftex-make-desperate-section-regexp literal))
- (looking-at (concat "\\\\"
- (regexp-quote
- (car
- (rassq level
- reftex-section-levels-all)))
- "[[{]?"))))
- ((or (not no-revisit)
- (reftex-get-buffer-visiting file))
- ;; Marker is lost. Use the backup method.
- (switch-to-buffer-other-window
- (reftex-get-file-buffer-force file nil))
- (goto-char (or emergency-point (point-min)))
- (or (looking-at (regexp-quote literal))
- (let ((len (length literal)))
- (or (reftex-nearest-match (regexp-quote literal) len)
- (reftex-nearest-match
- (reftex-make-regexp-allow-for-ctrl-m literal) len)
- (reftex-nearest-match
- (reftex-make-desperate-section-regexp literal) len)))))
- (t (message reftex-no-follow-message) nil))))
+ (marker (nth 4 toc))
+ (level (nth 5 toc))
+ (literal (nth 7 toc))
+ (emergency-point (nth 8 toc))
+ (match
+ (cond
+ ((and (markerp marker) (marker-buffer marker))
+ ;; Buffer is still live and we have the marker. Should be easy.
+ (switch-to-buffer-other-window (marker-buffer marker))
+ (goto-char (marker-position marker))
+ (or (looking-at (regexp-quote literal))
+ (looking-at (reftex-make-regexp-allow-for-ctrl-m literal))
+ (looking-at (reftex-make-desperate-section-regexp literal))
+ (looking-at (concat "\\\\"
+ (regexp-quote
+ (car
+ (rassq level
+ reftex-section-levels-all)))
+ "[[{]?"))))
+ ((or (not no-revisit)
+ (reftex-get-buffer-visiting file))
+ ;; Marker is lost. Use the backup method.
+ (switch-to-buffer-other-window
+ (reftex-get-file-buffer-force file nil))
+ (goto-char (or emergency-point (point-min)))
+ (or (looking-at (regexp-quote literal))
+ (let ((len (length literal)))
+ (or (reftex-nearest-match (regexp-quote literal) len)
+ (reftex-nearest-match
+ (reftex-make-regexp-allow-for-ctrl-m literal) len)
+ (reftex-nearest-match
+ (reftex-make-desperate-section-regexp literal) len)))))
+ (t (message reftex-no-follow-message) nil))))
(when match
(goto-char (match-beginning 0))
(if (not (= (point) (point-max))) (recenter 1))
(setq old (substring old (match-end 0))))
new))
-;; Auto recentering of TOC window
(defun reftex-recenter-toc-when-idle ()
(and (> (buffer-size) 5)
reftex-mode
(not (active-minibuffer-window))
(fboundp 'reftex-toc-mode)
- (get-buffer-window "*toc*" 'visible)
+ (get-buffer-window "*toc*")
(string= reftex-last-toc-master (reftex-TeX-master-file))
- (let (current-prefix-arg)
- (reftex-toc-recenter))))
+ (reftex-toc-recenter)))
(defun reftex-toggle-auto-toc-recenter ()
"Toggle the automatic recentering of the toc window.
(interactive)
(if reftex-toc-auto-recenter-timer
(progn
- (if (featurep 'xemacs)
- (delete-itimer reftex-toc-auto-recenter-timer)
- (cancel-timer reftex-toc-auto-recenter-timer))
- (setq reftex-toc-auto-recenter-timer nil)
- (message "Automatic recentering of toc windwo was turned off"))
+ (if (featurep 'xemacs)
+ (delete-itimer reftex-toc-auto-recenter-timer)
+ (cancel-timer reftex-toc-auto-recenter-timer))
+ (setq reftex-toc-auto-recenter-timer nil)
+ (message "Automatic recentering of toc buffer was turned off"))
(setq reftex-toc-auto-recenter-timer
- (if (featurep 'xemacs)
- (start-itimer "RefTeX Idle Timer for recenter"
- 'reftex-recenter-toc-when-idle
- reftex-idle-time reftex-idle-time t)
- (run-with-idle-timer
- reftex-idle-time t 'reftex-recenter-toc-when-idle)))
+ (if (featurep 'xemacs)
+ (start-itimer "RefTeX Idle Timer for recenter"
+ 'reftex-recenter-toc-when-idle
+ reftex-idle-time reftex-idle-time t)
+ (run-with-idle-timer
+ reftex-idle-time t 'reftex-recenter-toc-when-idle)))
(message "Automatic recentering of toc window was turned on")))
-(defun reftex-toc-toggle-dedicated-frame ()
- "Toggle the display of a separate frame for the TOC.
-This frame is not used by the `reftex-toc' commands, but it is useful to
-always show the current section in connection with the option
-`reftex-auto-recenter-toc'."
- (interactive)
- (catch 'exit
- (let* ((frames (frame-list)) frame
- (get-frame-prop-func (if (fboundp 'frame-property)
- 'frame-property
- 'frame-parameter)))
- (while (setq frame (pop frames))
- (if (equal (funcall get-frame-prop-func frame 'name)
- "RefTeX TOC Frame")
- (progn
- (delete-frame frame)
- (throw 'exit nil))))
- (reftex-make-separate-toc-frame))))
-
-(defun reftex-make-separate-toc-frame ()
- ;; Create a new fame showing only the toc buffer.
- (let ((current-frame (selected-frame))
- (current-window (selected-window))
- (current-toc-window (get-buffer-window "*toc*" 'visible))
- current-toc-frame)
- (if (and current-toc-window
- (not (equal (selected-frame) (window-frame current-toc-window))))
- nil
- (setq current-toc-frame
- (make-frame
- '((name . "RefTeX TOC Frame")
- (height . 20) (width . 60)
- (unsplittable . t)
- (minibuffer . nil)
- (default-toolbar-visible-p . nil)
- (menubar-visible-p . nil)
- (horizontal-scrollbar-visible-p . nil))))
- (select-frame current-toc-frame)
- (switch-to-buffer "*toc*")
- (select-frame current-frame)
- (if (fboundp 'focus-frame) (focus-frame current-frame)
- (if (fboundp 'x-focus-frame) (x-focus-frame current-frame)))
- (select-window current-window)
- (when (eq reftex-auto-recenter-toc 'frame)
- (unless reftex-toc-auto-recenter-timer
- (reftex-toggle-auto-toc-recenter))
- (add-hook 'delete-frame-hook 'reftex-toc-delete-frame-hook)))))
-
-(defun reftex-toc-delete-frame-hook (frame)
- (if (and reftex-toc-auto-recenter-timer
- (reftex-toc-dframe-p frame))
- (progn
- (reftex-toggle-auto-toc-recenter))))
;; Table of Contents map
(define-key reftex-toc-map (if (featurep 'xemacs) [(button2)] [(mouse-2)])
'previous-line 'reftex-toc-previous reftex-toc-map global-map)
(loop for x in
- '(("n" . reftex-toc-next)
- ("p" . reftex-toc-previous)
- ("?" . reftex-toc-show-help)
- (" " . reftex-toc-view-line)
- ("\C-m" . reftex-toc-goto-line-and-hide)
- ("\C-i" . reftex-toc-goto-line)
- ("\C-c>" . reftex-toc-display-index)
- ("r" . reftex-toc-rescan)
- ("R" . reftex-toc-Rescan)
- ("g" . revert-buffer)
- ("q" . reftex-toc-quit);
- ("k" . reftex-toc-quit-and-kill)
- ("f" . reftex-toc-toggle-follow);
- ("a" . reftex-toggle-auto-toc-recenter)
- ("d" . reftex-toc-toggle-dedicated-frame)
- ("F" . reftex-toc-toggle-file-boundary)
- ("i" . reftex-toc-toggle-index)
- ("l" . reftex-toc-toggle-labels)
- ("t" . reftex-toc-max-level)
- ("c" . reftex-toc-toggle-context)
-; ("%" . reftex-toc-toggle-commented)
- ("\M-%" . reftex-toc-rename-label)
- ("x" . reftex-toc-external)
- ("z" . reftex-toc-jump)
- ("." . reftex-toc-show-calling-point)
- ("\C-c\C-n" . reftex-toc-next-heading)
- ("\C-c\C-p" . reftex-toc-previous-heading)
- (">" . reftex-toc-demote)
- ("<" . reftex-toc-promote))
+ '(("n" . reftex-toc-next)
+ ("p" . reftex-toc-previous)
+ ("?" . reftex-toc-show-help)
+ (" " . reftex-toc-view-line)
+ ("\C-m" . reftex-toc-goto-line-and-hide)
+ ("\C-i" . reftex-toc-goto-line)
+ ("\C-c>". reftex-toc-display-index)
+ ("r" . reftex-toc-rescan)
+ ("R" . reftex-toc-Rescan)
+ ("g" . revert-buffer)
+ ("q" . reftex-toc-quit)
+ ("k" . reftex-toc-quit-and-kill)
+ ("f" . reftex-toc-toggle-follow)
+ ("a" . reftex-toggle-auto-toc-recenter)
+ ("F" . reftex-toc-toggle-file-boundary)
+ ("i" . reftex-toc-toggle-index)
+ ("l" . reftex-toc-toggle-labels)
+ ("t" . reftex-toc-max-level)
+ ("c" . reftex-toc-toggle-context)
+ ("%" . reftex-toc-toggle-commented)
+ ("x" . reftex-toc-external)
+ ("z" . reftex-toc-jump)
+ ("." . reftex-toc-show-calling-point)
+ ("\C-c\C-n" . reftex-toc-next-heading)
+ ("\C-c\C-p" . reftex-toc-previous-heading))
do (define-key reftex-toc-map (car x) (cdr x)))
(loop for key across "0123456789" do
(define-key reftex-toc-map (vector (list key)) 'digit-argument))
(define-key reftex-toc-map "-" 'negative-argument)
-(easy-menu-define
+(easy-menu-define
reftex-toc-menu reftex-toc-map
"Menu for Table of Contents buffer"
'("TOC"
["Show Location" reftex-toc-view-line t]
["Go To Location" reftex-toc-goto-line t]
["Exit & Go To Location" reftex-toc-goto-line-and-hide t]
- ["Show Calling Point" reftex-toc-show-calling-point t]
+ ["Index" reftex-toc-display-index t]
["Quit" reftex-toc-quit t]
"--"
- ("Edit"
- ["Promote" reftex-toc-promote t]
- ["Demote" reftex-toc-demote t]
- ["Rename Label" reftex-toc-rename-label t])
- "--"
- ["Index" reftex-toc-display-index t]
["External Document TOC " reftex-toc-external t]
"--"
("Update"
["Context" reftex-toc-toggle-context :style toggle
:selected reftex-toc-include-context]
"--"
- ["Follow Mode" reftex-toc-toggle-follow :style toggle
- :selected reftex-toc-follow-mode]
- ["Auto Recenter" reftex-toggle-auto-toc-recenter :style toggle
- :selected reftex-toc-auto-recenter-timer]
- ["Dedicated Frame" reftex-toc-toggle-dedicated-frame t])
+ ["Follow Mode" reftex-toc-toggle-follow :style toggle
+ :selected reftex-toc-follow-mode])
"--"
["Help" reftex-toc-show-help t]))
-;;; arch-tag: 92400ce2-0b86-4c89-a606-4ed71acea17e
-;;; reftex-toc.el ends here
\ No newline at end of file
+;;; reftex-toc.el ends here
;;; reftex-vars.el --- configuration variables for RefTeX
-;; Copyright (c) 1997, 1998, 1999, 2003 Free Software Foundation, Inc.
+;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
-;; Version: 4.21
+;; Version: 4.18
;; This file is part of GNU Emacs.
;; 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
+;; 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
+;; 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.
(LaTeX "LaTeX default environments"
(("section" ?s "%S" "~\\ref{%s}" (nil . t)
(regexp "parts?" "chapters?" "chap\\." "sections?" "sect?\\."
- "paragraphs?" "par\\."
- "\\\\S" "\247" "Teile?" "Kapitel" "Kap\\." "Abschnitte?"
- "appendi\\(x\\|ces\\)" "App\\." "Anh\"?ange?" "Anh\\."))
+ "paragraphs?" "par\\."
+ "\\\\S" "\247" "Teile?" "Kapitel" "Kap\\." "Abschnitte?"
+ "appendi\\(x\\|ces\\)" "App\\." "Anh\"?ange?" "Anh\\."))
("enumerate" ?i "item:" "~\\ref{%s}" item
(regexp "items?" "Punkte?"))
-
+
("equation" ?e "eq:" "~(\\ref{%s})" t
(regexp "equations?" "eqs?\\." "eqn\\." "Gleichung\\(en\\)?" "Gl\\."))
("eqnarray" ?e "eq:" nil eqnarray-like)
-
+
("figure" ?f "fig:" "~\\ref{%s}" caption
(regexp "figure?[sn]?" "figs?\\." "Abbildung\\(en\\)?" "Abb\\."))
("figure*" ?f nil nil caption)
-
+
("table" ?t "tab:" "~\\ref{%s}" caption
(regexp "tables?" "tab\\." "Tabellen?"))
("table*" ?t nil nil caption)
-
+
("\\footnote[]{}" ?n "fn:" "~\\ref{%s}" 2
(regexp "footnotes?" "Fussnoten?"))
-
+
("any" ?\ " " "~\\ref{%s}" nil)
;; The label macro is hard coded, but it *could* be defined like this:
(?A . "\\citeauthor*{%l}")
(?y . "\\citeyear{%l}")
(?n . "\\nocite{%l}")))
- (amsrefs "The AMSRefs package"
- ((?\C-m . "\\cite{%l}")
- (?p . "\\cite{%l}")
- (?P . "\\cites{%l}")
- (?t . "\\ocite{%l}")
- (?T . "\\ocites{%l}")
- (?y . "\\ycite{%l}")
- (?Y . "\\ycites{%l}")
- (?a . "\\citeauthor{%l}")
- (?A . "\\citeauthory{%l}")
- (?f . "\\fullcite{%l}")
- (?F . "\\fullocite{%l}")
- (?n . "\\nocite{%l}")))
(bibentry "The Bibentry package"
"\\bibentry{%l}")
(harvard "The Harvard package"
`?t' should point to a textual citation (citation as a noun).
`?p' should point to a parenthetical citation.")
-(defconst reftex-index-macros-builtin
+(defconst reftex-index-macros-builtin
'((default "Default \\index and \\glossary macros"
(("\\index{*}" "idx" ?i "" nil t)
("\\glossary{*}" "glo" ?g "" nil t)))
(multind "The multind.sty package"
(("\\index{}{*}" 1 ?i "" nil t)))
(index "The index.sty package"
- (("\\index[]{*}" 1 ?i "" nil t)
- ("\\index*[]{*}" 1 ?I "" nil nil)))
+ (("\\index[]{*}" 1 ?i "" nil t)
+ ("\\index*[]{*}" 1 ?I "" nil nil)))
(Index-Shortcut "index.sty with \\shortindexingon"
(("\\index[]{*}" 1 ?i "" nil t)
- ("\\index*[]{*}" 1 ?I "" nil nil)
- ("^[]{*}" 1 ?^ "" texmathp t)
- ("_[]{*}" 1 ?_ "" texmathp nil))))
+ ("\\index*[]{*}" 1 ?I "" nil nil)
+ ("^[]{*}" 1 ?^ "" texmathp t)
+ ("_[]{*}" 1 ?_ "" texmathp nil))))
"Builtin stuff for reftex-index-macros.
Lower-case symbols correspond to a style file of the same name in the LaTeX
distribution. Mixed-case symbols are convenience aliases.")
(defgroup reftex nil
"LaTeX label and citation support."
:tag "RefTeX"
- :link '(url-link :tag "Home Page"
- "http://zon.astro.uva.nl/~dominik/Tools/")
+ :link '(url-link :tag "Home Page"
+ "http://strw.leidenuniv.nl/~dominik/Tools/")
:link '(emacs-commentary-link :tag "Commentary in reftex.el" "reftex.el")
:link '(custom-manual "(reftex)Top")
:prefix "reftex-"
("subsubsection" . 4)
("paragraph" . 5)
("subparagraph" . 6)
+ ("subsubparagraph" . 7)
("addchap" . -1) ; KOMA-Script
("addsec" . -2) ; KOMA-Script
;;; ("minisec" . -7) ; KOMA-Script
the backslash). The cdr is a number indicating its level. A negative
level means the same level as the positive value, but the section will
never get a number. The cdr may also be a function which will be called
-to after the section-re matched to determine the level.
-This list is also used for promotion and demption of sectioning commands.
-If you are using a document class which has several sets of sectioning
-commands, promotion only works correctly if this list is sorted first
-by set, then within each set by level. The promotion commands always
-select the nearest entry with the correct new level."
+to after the section-re matched to determine the level."
:group 'reftex-table-of-contents-browser
:set 'reftex-set-dirty
:type '(repeat
(cons (string :tag "sectioning macro" "")
- (choice
- (number :tag "level " 0)
- (symbol :tag "function " my-level-func)))))
+ (choice
+ (number :tag "level " 0)
+ (symbol :tag "function " my-level-func)))))
(defcustom reftex-toc-max-level 100
"*The maximum level of toc entries which will be included in the TOC.
:type 'boolean)
-(defcustom reftex-auto-recenter-toc 'frame
- "*Non-nil means, turn automatic recentering of *TOC* window on.
-When active, the *TOC* window will always show the section you
+(defcustom reftex-auto-recenter-toc nil
+ "*Non-nil means, initially turn automatic recentering of toc on.
+When active, the *TOC* buffer will always show the section you
are currently working in. Recentering happens whenever Emacs is idle for
more than `reftex-idle-time' seconds.
-
-Value t means, turn on immediately when RefTeX gets started. Then,
-recentering will work for any toc window created during the session.
-
-Value 'frame (the default) means, turn automatic recentering on only while the
-dedicated TOC frame does exist, and do the recentering only in that frame. So
-when creating that frame (with \"d\" key in an ordinary TOC window), the
-automatic recentering is turned on. When the frame gets destroyed, automatic
-recentering is turned off again.
-
-This feature can be turned on and off from the menu
-\(Ref->Options)."
+This feature can be turned on and off from the menu
+(Ref->Options)."
:group 'reftex-table-of-contents-browser
- :type '(choice
- (const :tag "never" nil)
- (const :tag "always" t)
- (const :tag "in dedicated frame only" frame)))
-
+ :type 'boolean)
+
(defcustom reftex-toc-split-windows-horizontally nil
"*Non-nil means, create TOC window by splitting window horizontally."
:group 'reftex-table-of-contents-browser
:type 'boolean)
-(defcustom reftex-toc-split-windows-fraction .3
- "*Fraction of the width or height of the frame to be used for TOC window.
-See also `reftex-toc-split-windows-horizontally'."
+(defcustom reftex-toc-split-windows-horizontally-fraction .5
+ "*Fraction of the horizontal width of the frame to be used for TOC window.
+Only relevant when `reftex-toc-split-windows-horizontally' is non-nil."
:group 'reftex-table-of-contents-browser
:type 'number)
-(defvar reftex-toc-split-windows-horizontally-fraction 0.5
- "This variable is obsolete, use `reftex-toc-split-windows-fraction' instead.")
-
(defcustom reftex-toc-keep-other-windows t
"*Non-nil means, split the selected window to display the *toc* buffer.
This helps to keep the window configuration, but makes the *toc* small.
:group 'reftex-table-of-contents-browser
:type 'boolean)
-(defcustom reftex-toc-confirm-promotion 2
- "*Non-nil means, promotion/demotion commands first prompt for confirmation.
-When nil, the command is executed immediately. When this is an integer
-N, ask for confirmation only if N or more section commands are going to be
-changed."
- :group 'reftex-table-of-contents-browser
- :type '(choice
- (const :tag "Never" nil)
- (const :tag "Always" t)
- (number :tag "When more than N sections" :value 2)))
-
(defcustom reftex-toc-include-context nil
"*Non-nil means, include context with labels in the *toc* buffer.
Context will only be shown when labels are visible as well.
(defcustom reftex-default-label-alist-entries
'(amsmath endnotes fancybox floatfig longtable picinpar
- rotating sidecap subfigure supertab wrapfig LaTeX)
+ rotating sidecap subfigure supertab wrapfig LaTeX)
"Default label alist specifications. LaTeX should always be the last entry.
-The value of this variable is a list of symbols with associations in the
+The value of this variable is a list of symbols with associations in the
constant `reftex-label-alist-builtin'. Check that constant for a full list
of options."
:group 'reftex-defining-label-environments
:set 'reftex-set-dirty
:type `(set
- :indent 4
+ :indent 4
:inline t
:greedy t
,@(mapcar
- (lambda (x)
- (list 'const :tag (concat (symbol-name (nth 0 x))
- ": " (nth 1 x))
- (nth 0 x)))
+ (lambda (x)
+ (list 'const :tag (concat (symbol-name (nth 0 x))
+ ": " (nth 1 x))
+ (nth 0 x)))
reftex-label-alist-builtin)))
(defcustom reftex-label-alist nil
(choice :tag "Environment or \\macro "
(const :tag "Ignore, just use typekey" nil)
(string "")
- (symbol :tag "Special parser" my-parser))
- (choice :tag "Type specification "
- (const :tag "unspecified, like in \\label" nil)
- (character :tag "Char " ?a))
+ (symbol :tag "Special parser" my-parser))
+ (choice :tag "Type specification "
+ (const :tag "unspecified, like in \\label" nil)
+ (character :tag "Char " ?a))
(choice :tag "Label prefix string "
(const :tag "Default" nil)
(string :tag "String" "lab:"))
(const :tag "Default" nil)
(string :tag "String" "~\\ref{%s}"))
(choice :tag "Context method "
- (const :tag "Default position" t)
- (const :tag "After label" nil)
- (number :tag "Macro arg nr" 1)
- (regexp :tag "Regexp" "")
- (const :tag "Caption in float" caption)
- (const :tag "Item in list" item)
- (const :tag "Eqnarray-like" eqnarray-like)
- (const :tag "Alignat-like" alignat-like)
- (symbol :tag "Function" my-func))
- (repeat :tag "Magic words" :extra-offset 2 (string))
- (option (choice :tag "Make TOC entry "
- (const :tag "No entry" nil)
- (integer :tag "Level" :value -3))))
+ (const :tag "Default position" t)
+ (const :tag "After label" nil)
+ (number :tag "Macro arg nr" 1)
+ (regexp :tag "Regexp" "")
+ (const :tag "Caption in float" caption)
+ (const :tag "Item in list" item)
+ (const :tag "Eqnarray-like" eqnarray-like)
+ (const :tag "Alignat-like" alignat-like)
+ (symbol :tag "Function" my-func))
+ (repeat :tag "Magic words" :extra-offset 2 (string))
+ (option (choice :tag "Make TOC entry "
+ (const :tag "No entry" nil)
+ (integer :tag "Level" :value -3))))
(choice
:tag "Package"
:value AMSTeX
,@(mapcar
- (lambda (x)
- (list 'const :tag (concat (symbol-name (nth 0 x)))
- (nth 0 x)))
- reftex-label-alist-builtin)))))
+ (lambda (x)
+ (list 'const :tag (concat (symbol-name (nth 0 x)))
+ (nth 0 x)))
+ reftex-label-alist-builtin)))))
(defcustom reftex-section-prefixes '((0 . "part:") (1 . "cha:") (t . "sec:"))
"Prefixes for section labels.
When the label prefix given in an entry in `reftex-label-alist' contains `%S',
-this list is used to determine the correct prefix string depending on the
+this list is used to determine the correct prefix string depending on the
current section level.
The list is an alist, with each entry of the form (KEY . PREFIX)
Possible keys are sectioning macro names like `chapter', section levels
-\(as given in `reftex-section-levels'), and t for the default."
+(as given in `reftex-section-levels'), and t for the default."
:group 'reftex-defining-label-environments
:type '(repeat
- (cons :value (0 . "")
- (choice
- (string :tag "macro name")
- (integer :tag "section level")
- (const :tag "default" t))
- (string :tag "Prefix"))))
+ (cons :value (0 . "")
+ (choice
+ (string :tag "macro name")
+ (integer :tag "section level")
+ (const :tag "default" t))
+ (string :tag "Prefix"))))
(defcustom reftex-default-context-regexps
'((caption . "\\\\\\(rot\\)?caption\\*?[[{]")
or macro."
:group 'reftex-defining-label-environments
:type '(repeat (cons (symbol) (regexp))))
-
+
(defcustom reftex-special-environment-functions nil
"List of functions to be called when trying to figure out current environment.
These are special functions to detect \"environments\" which do not
(let ((pos (point)) p1)
(save-excursion
;; Search for any of the linguex item macros at the beginning of a line
- (if (re-search-backward
+ (if (re-search-backward
\"^[ \\t]*\\\\(\\\\\\\\\\\\(ex\\\\|a\\\\|b\\\\|c\\\\|d\\\\|e\\\\|f\\\\)g?\\\\.\\\\)\" bound t)
(progn
(setq p1 (match-beginning 1))
nil
;; OK, we got it
(cons \"linguex\" p1)))
- ;; Return nil for not found
+ ;; Return nil for not found
nil))))
3. Tell RefTeX to use this function
like character classes.
Thus, the combination may be set differently for each label type. The
default settings \"s\" and \"sft\" mean: Derive section labels from headings
-\(with confirmation). Prompt for figure and table labels. Use simple labels
+(with confirmation). Prompt for figure and table labels. Use simple labels
without confirmation for everything else.
The available label types are: s (section), f (figure), t (table), i (item),
e (equation), n (footnote), N (endnote), plus any definitions in
(repeat :tag "Ignore words"
:entry-format " %i %d %v"
(string :tag ""))
- (option (boolean :tag "Downcase words "))))
+ (option (boolean :tag "Downcase words "))))
(defcustom reftex-label-illegal-re "[^-a-zA-Z0-9_+=:;,.]"
"Regexp matching characters not legal in labels."
(choice :tag "Hide short context " ,@reftex-tmp)
(choice :tag "Follow context in other window " ,@reftex-tmp)
(choice :tag "Show commented labels " ,@reftex-tmp)
- (choice :tag "Obsolete flag, Don't use. " ,@reftex-tmp)
+ (choice :tag "Obsolete flag. Don't use. " ,@reftex-tmp)
(choice :tag "Show begin/end of included files" ,@reftex-tmp)))
(defcustom reftex-multiref-punctuation '((?, . ", ") (?- . "--") (?+ . " and "))
(defcustom reftex-vref-is-default nil
"*Non-nil means, the varioref macro \\vref is used as default.
-In the selection buffer, the `v' key toggles the reference macro between
+In the selection buffer, the `v' key toggles the reference macro between
`\\ref' and `\\vref'. The value of this variable determines the default
which is active when entering the selection process.
Instead of nil or t, this may also be a string of type letters indicating
(defcustom reftex-fref-is-default nil
"*Non-nil means, the fancyref macro \\fref is used as default.
-In the selection buffer, the `V' key toggles the reference macro between
+In the selection buffer, the `V' key toggles the reference macro between
`\\ref', `\\fref' and `\\Fref'. The value of this variable determines
the default which is active when entering the selection process.
Instead of nil or t, this may also be a string of type letters indicating
(defcustom reftex-format-ref-function nil
"Function which produces the string to insert as a reference.
-Normally should be nil, because the format to insert a reference can
+Normally should be nil, because the format to insert a reference can
already be specified in `reftex-label-alist'.
This hook also is used by the special commands to insert `\\vref' and `\\fref'
references, so even if you set this, your setting will be ignored by
%i institution %j journal %k key %m month
%n number %o organization %p pages %P first page
%r address %s school %u publisher %t title
-%v volume %y year
+%v volume %y year
%B booktitle, abbreviated %T title, abbreviated
Usually, only %l is needed. The other stuff is mainly for the echo area
display, and for (setq reftex-comment-citations t).
-%< as a special operator kills punctuation and space around it after the
+%< as a special operator kills punctuation and space around it after the
string has been formatted.
Beware that all this only works with BibTeX database files. When
strings.
In order to configure this variable, you can either set
`reftex-cite-format' directly yourself or set it to the SYMBOL of one of
-the predefined styles. The predefined symbols are those which have an
+the predefined styles. The predefined symbols are those which have an
association in the constant `reftex-cite-format-builtin'.
E.g.: (setq reftex-cite-format 'natbib)"
:group 'reftex-citation-support
(defcustom reftex-format-cite-function nil
"Function which produces the string to insert as a citation.
-Normally should be nil, because the format to insert a reference can
+Normally should be nil, because the format to insert a reference can
already be specified in `reftex-cite-format'.
The function will be called with two arguments, the CITATION KEY and the
DEFAULT FORMAT, which is taken from `reftex-cite-format'. The function
These correspond to the makeindex keywords LEVEL ENCAP ACTUAL QUOTE ESCAPE."
:group 'reftex-index-support
:type '(list
- (string :tag "LEVEL separator")
- (string :tag "ENCAP char ")
- (string :tag "ACTUAL char ")
- (string :tag "QUOTE char ")
- (string :tag "ESCAPE char ")))
+ (string :tag "LEVEL separator")
+ (string :tag "ENCAP char ")
+ (string :tag "ACTUAL char ")
+ (string :tag "QUOTE char ")
+ (string :tag "ESCAPE char ")))
(defcustom reftex-index-macros nil
"Macros which define index entries. The structure is
-\(MACRO INDEX-TAG KEY PREFIX EXCLUDE REPEAT)
+(MACRO INDEX-TAG KEY PREFIX EXCLUDE REPEAT)
MACRO is the macro. Arguments should be denoted by empty braces like
\\index[]{*}. Use square brackets to denote optional arguments. The star
:group 'reftex-index-support
:set 'reftex-set-dirty
:type `(list
- (repeat
- :inline t
- (list :value ("" "idx" ?a "" nil)
- (string :tag "Macro with args")
- (choice :tag "Index Tag "
- (string)
- (integer :tag "Macro arg Nr" :value 1))
- (character :tag "Access Key ")
- (string :tag "Key Prefix ")
- (symbol :tag "Exclusion hook ")
+ (repeat
+ :inline t
+ (list :value ("" "idx" ?a "" nil)
+ (string :tag "Macro with args")
+ (choice :tag "Index Tag "
+ (string)
+ (integer :tag "Macro arg Nr" :value 1))
+ (character :tag "Access Key ")
+ (string :tag "Key Prefix ")
+ (symbol :tag "Exclusion hook ")
(boolean :tag "Repeat Outside ")))
- (option
- :tag "Package:"
- (choice :tag "Package"
- :value index
- ,@(mapcar
- (lambda (x)
- (list 'const :tag (concat (symbol-name (nth 0 x))
- ": " (nth 1 x))
- (nth 0 x)))
- reftex-index-macros-builtin)))))
+ (option
+ :tag "Package:"
+ (choice :tag "Package"
+ :value index
+ ,@(mapcar
+ (lambda (x)
+ (list 'const :tag (concat (symbol-name (nth 0 x))
+ ": " (nth 1 x))
+ (nth 0 x)))
+ reftex-index-macros-builtin)))))
(defcustom reftex-index-default-macro '(?i "idx")
"The default index macro for \\[reftex-index-selection-or-word].
This is a list with (MACRO-KEY DEFAULT-TAG).
MACRO-KEY: Character identifying an index macro - see `reftex-index-macros'.
-DEFAULT-TAG: This is the tag to be used if the macro requires a TAG argument.
+DEFAULT-TAG: This is the tag to be used if the macro requires a TAG argument.
When this is nil and a TAG is needed, RefTeX will ask for it.
When this is the empty string and the TAG argument of the index
macro is optional, the TAG argument will be omitted."
:group 'reftex-index-support
:type '(list
- (character :tag "Character identifying default macro")
- (choice :tag "Default index tag "
- (const nil)
- (string))))
+ (character :tag "Character identifying default macro")
+ (choice :tag "Default index tag "
+ (const nil)
+ (string))))
(defcustom reftex-index-default-tag "idx"
"Default index tag.
last The last used index tag will be offered as default."
:group 'reftex-index-support
:type '(choice
- (const :tag "no default" nil)
- (const :tag "last used " 'last)
- (string :tag "index tag " "idx")))
+ (const :tag "no default" nil)
+ (const :tag "last used " 'last)
+ (string :tag "index tag " "idx")))
(defcustom reftex-index-math-format "$%s$"
"Format of index entries when copied from inside math mode.
When `reftex-index-selection-or-word' is executed inside TeX math mode,
the index key copied from the buffer is processed with this format string
through the `format' function. This can be used to add the math delimiters
-\(e.g. `$') to the string.
+(e.g. `$') to the string.
Requires the `texmathp.el' library which is part of AUCTeX."
:group 'reftex-index-support
:type 'string)
If the function returns nil, the current match is skipped."
:group 'reftex-index-support
:type '(choice
- (const :tag "No verification" nil)
- (function)))
+ (const :tag "No verification" nil)
+ (function)))
(defcustom reftex-index-phrases-skip-indexed-matches nil
"*Non-nil means, skip matches which appear to be indexed already.
phrases may match at places where that phrase was already indexed. In
particular when indexing an already processed document again, this
will even be the norm. When this variable is non-nil, RefTeX checks if
-the match is inside an index macro argument, or if an index macro is directly
+the match is an index macro argument, or if an index macro is directly
before or after the phrase. If that is the case, that match will
be ignored."
:group 'reftex-index-support
(defcustom reftex-index-include-context nil
"*Non-nil means, display the index definition context in the index buffer.
-This flag may also be toggled from the index buffer with the `c' key."
+This flag may also be toggled from the index buffer with the `c' key."
:group 'reftex-index-support
:type 'boolean)
argument of a macro. Note that crossref viewing for citations,
references (both ways) and index entries is hard-coded. This variable
is only to configure additional structures for which crossreference
-viewing can be useful. Each entry has the structure
+viewing can be useful. Each entry has the structure
-\(MACRO-RE SEARCH-RE HIGHLIGHT).
+(MACRO-RE SEARCH-RE HIGHLIGHT).
MACRO-RE is matched against the macro. SEARCH-RE is the regexp used
to search for cross references. `%s' in this regexp is replaced with
which subgroup of the match should be highlighted."
:group 'reftex-viewing-cross-references
:type '(repeat (group (regexp :tag "Macro Regexp ")
- (string :tag "Search Regexp ")
- (integer :tag "Highlight Group"))))
+ (string :tag "Search Regexp ")
+ (integer :tag "Highlight Group"))))
(defcustom reftex-auto-view-crossref t
"*Non-nil means, initially turn automatic viewing of crossref info on.
displayed, the echo area will display information about that cross
reference. You can also set the variable to the symbol `window'. In
this case a small temporary window is used for the display.
-This feature can be turned on and off from the menu
-\(Ref->Options)."
+This feature can be turned on and off from the menu
+(Ref->Options)."
:group 'reftex-viewing-cross-references
:type '(choice (const :tag "off" nil)
- (const :tag "in Echo Area" t)
- (const :tag "in Other Window" window)))
+ (const :tag "in Echo Area" t)
+ (const :tag "in Other Window" window)))
(defcustom reftex-idle-time 1.2
"*Time (secs) Emacs has to be idle before automatic crossref display is done.
- If an element is the name of an environment variable, its content is used.
- If an element starts with an exclamation mark, it is used as a command
to retrieve the path. A typical command with the kpathsearch library would
- be `!kpsewhich -show-path=.tex'.
+ be `!kpsewhich -show-path=.tex'.
- Otherwise the element itself is interpreted as a path.
Multiple directories can be separated by the system dependent `path-separator'.
Directories ending in `//' or `!!' will be expanded recursively.
- If an element is the name of an environment variable, its content is used.
- If an element starts with an exclamation mark, it is used as a command
to retrieve the path. A typical command with the kpathsearch library would
- be `!kpsewhich -show-path=.bib'.
+ be `!kpsewhich -show-path=.bib'.
- Otherwise the element itself is interpreted as a path.
Multiple directories can be separated by the system dependent `path-separator'.
Directories ending in `//' or `!!' will be expanded recursively.
:type '(repeat (string :tag "Specification")))
(defcustom reftex-file-extensions '(("tex" . (".tex" ".ltx"))
- ("bib" . (".bib")))
+ ("bib" . (".bib")))
"*Association list with file extensions for different file types.
This is a list of items, each item is like: (TYPE . (DEF-EXT OTHER-EXT ...))
TeX-file-extensions."
:group 'reftex-finding-files
:type '(repeat (cons (string :tag "File type")
- (repeat (string :tag "Extension")))))
+ (repeat (string :tag "Extension")))))
(defcustom reftex-search-unrecursed-path-first t
"*Non-nil means, search all specified directories before trying recursion.
TEXINPUTS and BIBINPUTS to find TeX files and BibTeX database files.
With this option turned on, it calls an external program specified in the
option `reftex-external-file-finders' instead. As a side effect,
-the variables `reftex-texpath-environment-variables' and
+the variables `reftex-texpath-environment-variables' and
`reftex-bibpath-environment-variables' will be ignored."
:group 'reftex-finding-files
:type 'boolean)
(defcustom reftex-external-file-finders '(("tex" . "kpsewhich -format=.tex %f")
- ("bib" . "kpsewhich -format=.bib %f"))
+ ("bib" . "kpsewhich -format=.bib %f"))
"*Association list with external programs to call for finding files.
Each entry is a cons cell (TYPE . PROGRAM).
TYPE is either \"tex\" or \"bib\". PROGRAM is the external program to use with
Only relevant when `reftex-use-external-file-finders' is non-nil."
:group 'reftex-finding-files
:type '(repeat (cons (string :tag "File type")
- (string :tag "Program "))))
+ (string :tag "Program "))))
;; Tuning the parser ----------------------------------------------------
(defcustom reftex-save-parse-info nil
"*Non-nil means, save information gathered with parsing in a file.
The file MASTER.rel in the same directory as MASTER.tex is used to save the
-information. When this variable is t,
+information. When this variable is t,
- accessing the parsing information for the first time in an editing session
will read that file (if available) instead of parsing the document.
- exiting Emacs or killing a buffer in reftex-mode will cause a new version
to become effective (keys `g' or `r')."
:group 'reftex-fontification-configurations
:type '(choice
- (const :tag "Never" nil)
- (const :tag "Cursor driven" cursor)
- (const :tag "Mouse driven" mouse)
- (const :tag "Mouse and Cursor driven." both)))
+ (const :tag "Never" nil)
+ (const :tag "Cursor driven" cursor)
+ (const :tag "Mouse driven" mouse)
+ (const :tag "Mouse and Cursor driven." both)))
(defcustom reftex-cursor-selected-face 'highlight
"Face name to highlight cursor selected item in toc and selection buffers.
may require a restart of Emacs in order to become effective."
:group 'reftex-miscellaneous-configurations
:group 'LaTeX
- :type '(choice
- (const :tag "No plug-ins" nil)
- (const :tag "All possible plug-ins" t)
- (list
- :tag "Individual choice"
- :value (t t t t t)
- (boolean :tag "supply label in new sections and environments")
- (boolean :tag "supply argument for macros like `\\label' ")
- (boolean :tag "supply argument for macros like `\\ref' ")
- (boolean :tag "supply argument for macros like `\\cite' ")
- (boolean :tag "supply argument for macros like `\\index' ")
- )))
+ :type '(choice
+ (const :tag "No plug-ins" nil)
+ (const :tag "All possible plug-ins" t)
+ (list
+ :tag "Individual choice"
+ :value (t t t t t)
+ (boolean :tag "supply label in new sections and environments")
+ (boolean :tag "supply argument for macros like `\\label' ")
+ (boolean :tag "supply argument for macros like `\\ref' ")
+ (boolean :tag "supply argument for macros like `\\cite' ")
+ (boolean :tag "supply argument for macros like `\\index' ")
+ )))
(defcustom reftex-allow-detached-macro-args nil
"*Non-nil means, allow arguments of macros to be detached by whitespace.
:group 'reftex-miscellaneous-configurations
:type 'hook)
-
(provide 'reftex-vars)
-;;; arch-tag: 9591ea34-ef39-4431-90b7-c115eaf5e16f
;;; reftex-vars.el ends here
;;; reftex.el --- minor mode for doing \label, \ref, \cite, \index in LaTeX
-;; Copyright (c) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
+;; Copyright (c) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
-;; Version: 4.21
+;; Version: 4.18
;; Keywords: tex
;; This file is part of GNU Emacs.
;;---------------------------------------------------------------------------
;;
;;; Commentary:
-;;
+;;
;; RefTeX is a minor mode with distinct support for \ref, \label, \cite,
;; and \index commands in (multi-file) LaTeX documents.
;; - A table of contents provides easy access to any part of a document.
;;
;; The documentation in various formats is also available at
;;
-;; http://zon.astro.uva.nl/~dominik/Tools/
+;; http://www.strw.leidenuniv.nl/~dominik/Tools/
;;
;;---------------------------------------------------------------------------
;;
;; Introduction
;; ************
-;;
+;;
;; RefTeX is a specialized package for support of labels, references,
;; citations, and the index in LaTeX. RefTeX wraps itself round 4 LaTeX
;; macros: `\label', `\ref', `\cite', and `\index'. Using these macros
;; time-consuming tasks almost entirely. It also provides functions to
;; display the structure of a document and to move around in this
;; structure quickly.
-;;
+;;
;; *Note Imprint::, for information about who to contact for help, bug
;; reports or suggestions.
-;;
+;;
;; Environment
;; ===========
-;;
+;;
;; RefTeX needs to access all files which are part of a multifile
;; document, and the BibTeX database files requested by the
;; `\bibliography' command. To find these files, RefTeX will require a
;; which are also used by RefTeX. However, on some systems these
;; variables do not contain the full search path. If RefTeX does not work
;; for you because it cannot find some files, read *Note Finding Files::.
-;;
+;;
;; Entering RefTeX Mode
;; ====================
-;;
+;;
;; To turn RefTeX Mode on and off in a particular buffer, use `M-x
;; reftex-mode'. To turn on RefTeX Mode for all LaTeX files, add the
;; following lines to your `.emacs' file:
-;;
+;;
;; (add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode
;; (add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode
-;;
+;;
;; RefTeX in a Nutshell
;; ====================
-;;
+;;
;; 1. Table of Contents
;; Typing `C-c =' (`reftex-toc') will show a table of contents of the
;; document. This buffer can display sections, labels and index
;; entries defined in the document. From the buffer, you can jump
;; quickly to every part of your document. Press `?' to get help.
-;;
+;;
;; 2. Labels and References
;; RefTeX helps to create unique labels and to find the correct key
;; for references quickly. It distinguishes labels for different
;; others), and can be configured to recognize any additional labeled
;; environments you have defined yourself (variable
;; `reftex-label-alist').
-;;
+;;
;; * Creating Labels
;; Type `C-c (' (`reftex-label') to insert a label at point.
;; RefTeX will either
;; tables) or
;; - insert a simple label made of a prefix and a number (all
;; other environments)
-;;
+;;
;; Which labels are created how is configurable with the variable
;; `reftex-insert-label-flags'.
-;;
+;;
;; * Referencing Labels
;; To make a reference, type `C-c )' (`reftex-reference'). This
;; shows an outline of the document with all labels of a certain
;; type (figure, equation,...) and some label context.
;; Selecting a label inserts a `\ref{LABEL}' macro into the
;; original buffer.
-;;
+;;
;; 3. Citations
;; Typing `C-c [' (`reftex-citation') will let you specify a regular
;; expression to search in current BibTeX database files (as
;; sorted. The selected article is referenced as `\cite{KEY}' (see
;; the variable `reftex-cite-format' if you want to insert different
;; macros).
-;;
+;;
;; 4. Index Support
;; RefTeX helps to enter index entries. It also compiles all entries
;; into an alphabetically sorted `*Index*' buffer which you can use
;; index macros and can be configured to recognize any additional
;; macros you have defined (`reftex-index-macros'). Multiple indices
;; are supported.
-;;
+;;
;; * Creating Index Entries
;; To index the current selection or the word at point, type
;; `C-c /' (`reftex-index-selection-or-word'). The default macro
;; `reftex-index-default-macro' will be used. For a more
;; complex entry type `C-c <' (`reftex-index'), select any of
;; the index macros and enter the arguments with completion.
-;;
+;;
;; * The Index Phrases File (Delayed Indexing)
;; Type `C-c \' (`reftex-index-phrase-selection-or-word') to add
;; the current word or selection to a special _index phrase
;; file_. RefTeX can later search the document for occurrences
;; of these phrases and let you interactively index the matches.
-;;
+;;
;; * Displaying and Editing the Index
;; To display the compiled index in a special buffer, type `C-c
;; >' (`reftex-display-index'). From that buffer you can check
;; and edit all entries.
-;;
+;;
;; 5. Viewing Cross-References
;; When point is on the KEY argument of a cross-referencing macro
;; (`\label', `\ref', `\cite', `\bibitem', `\index', and variations)
;; When the enclosing macro is `\cite' or `\ref' and no other message
;; occupies the echo area, information about the citation or label
;; will automatically be displayed in the echo area.
-;;
+;;
;; 6. Multifile Documents
;; Multifile Documents are fully supported. The included files must
;; have a file variable `TeX-master' or `tex-main-file' pointing to
;; the master file. RefTeX provides cross-referencing information
;; from all parts of the document, and across document borders
;; (`xr.sty').
-;;
+;;
;; 7. Document Parsing
;; RefTeX needs to parse the document in order to find labels and
;; other information. It does it automatically once and updates its
;; with a raw `C-u' prefix, or press the `r' key in the label
;; selection buffer, the table of contents buffer, or the index
;; buffer.
-;;
+;;
;; 8. AUCTeX
;; If your major LaTeX mode is AUCTeX, RefTeX can cooperate with it
;; (see variable `reftex-plug-into-AUCTeX'). AUCTeX contains style
;; files which trigger appropriate settings in RefTeX, so that for
;; many of the popular LaTeX packages no additional customizations
;; will be necessary.
-;;
+;;
;; 9. Useful Settings
;; To make RefTeX faster for large documents, try these:
;; (setq reftex-enable-partial-scans t)
;; (setq reftex-save-parse-info t)
;; (setq reftex-use-multiple-selection-buffers t)
-;;
+;;
;; To integrate with AUCTeX, use
;; (setq reftex-plug-into-AUCTeX t)
-;;
+;;
;; To make your own LaTeX macro definitions known to RefTeX,
;; customize the variables
;; `reftex-label-alist' (for label macros/environments)
;; `reftex-index-default-macro' (to set the default macro)
;; If you have a large number of macros defined, you may want to write
;; an AUCTeX style file to support them with both AUCTeX and RefTeX.
-;;
+;;
;; 10. Where Next?
;; Go ahead and use RefTeX. Use its menus until you have picked up
;; the key bindings. For an overview of what you can do in each of
;; The first part of the manual explains in a tutorial way how to use
;; and customize RefTeX. The second part is a command and variable
;; reference.
-;;
+;;
;;---------------------------------------------------------------------------
;;
;; AUTHOR
;; ======
;;
-;; Carsten Dominik <dominik@science.uva.nl>
+;; Carsten Dominik <dominik@strw.LeidenUniv.nl>
;;
;; with contributions from Stephen Eglen
;;
;; XEmacs 21.x. If you need to install it yourself, you can find a
;; distribution at
;;
-;; http://zon.astro.uva.nl/~dominik/Tools/
+;; http://www.strw.leidenuniv.nl/~dominik/Tools/
;;
;; THANKS TO:
;; ---------
(defvar reftex-tables-dirty t
"Flag showing if tables need to be re-computed.")
-(eval-and-compile
- (defun reftex-set-dirty (symbol value)
- (setq reftex-tables-dirty t)
- (set symbol value)))
-
-
;;; =========================================================================
;;;
;;; Configuration variables
;;; Define the formal stuff for a minor mode named RefTeX.
;;;
-(defconst reftex-version "RefTeX version 4.21"
+(defconst reftex-version "RefTeX version 4.18"
"Version string for RefTeX.")
(defvar reftex-mode nil
(setq reftex-syntax-table (copy-syntax-table))
(modify-syntax-entry ?\( "." reftex-syntax-table)
(modify-syntax-entry ?\) "." reftex-syntax-table))
-
+
(unless reftex-syntax-table-for-bib
(setq reftex-syntax-table-for-bib
- (copy-syntax-table reftex-syntax-table))
+ (copy-syntax-table reftex-syntax-table))
(modify-syntax-entry ?\' "." reftex-syntax-table-for-bib)
(modify-syntax-entry ?\" "." reftex-syntax-table-for-bib)
(modify-syntax-entry ?\[ "." reftex-syntax-table-for-bib)
(if reftex-mode
(progn
- ;; Mode was turned on
+ ;; Mode was turned on
(easy-menu-add reftex-mode-menu)
- (and reftex-plug-into-AUCTeX
- (reftex-plug-into-AUCTeX))
- (unless (get 'reftex-auto-view-crossref 'initialized)
- (and reftex-auto-view-crossref
- (reftex-toggle-auto-view-crossref))
- (put 'reftex-auto-view-crossref 'initialized t))
- (unless (get 'reftex-auto-recenter-toc 'initialized)
- (and (eq reftex-auto-recenter-toc t)
- (reftex-toggle-auto-toc-recenter))
- (put 'reftex-auto-recenter-toc 'initialized t))
-
- ;; Prepare the special syntax tables.
- (setq reftex-syntax-table (copy-syntax-table (syntax-table)))
- (modify-syntax-entry ?\( "." reftex-syntax-table)
- (modify-syntax-entry ?\) "." reftex-syntax-table)
-
- (setq reftex-syntax-table-for-bib
- (copy-syntax-table reftex-syntax-table))
- (modify-syntax-entry ?\' "." reftex-syntax-table-for-bib)
- (modify-syntax-entry ?\" "." reftex-syntax-table-for-bib)
- (modify-syntax-entry ?\[ "." reftex-syntax-table-for-bib)
- (modify-syntax-entry ?\] "." reftex-syntax-table-for-bib)
+ (and reftex-plug-into-AUCTeX
+ (reftex-plug-into-AUCTeX))
+ (unless (get 'reftex-auto-view-crossref 'initialized)
+ (and reftex-auto-view-crossref
+ (reftex-toggle-auto-view-crossref))
+ (put 'reftex-auto-view-crossref 'initialized t))
+ (unless (get 'reftex-auto-recenter-toc 'initialized)
+ (and reftex-auto-recenter-toc
+ (reftex-toggle-auto-toc-recenter))
+ (put 'reftex-auto-recenter-toc 'initialized t))
+
+ ;; Prepare the special syntax tables.
+ (setq reftex-syntax-table (copy-syntax-table (syntax-table)))
+ (modify-syntax-entry ?\( "." reftex-syntax-table)
+ (modify-syntax-entry ?\) "." reftex-syntax-table)
+
+ (setq reftex-syntax-table-for-bib
+ (copy-syntax-table reftex-syntax-table))
+ (modify-syntax-entry ?\' "." reftex-syntax-table-for-bib)
+ (modify-syntax-entry ?\" "." reftex-syntax-table-for-bib)
+ (modify-syntax-entry ?\[ "." reftex-syntax-table-for-bib)
+ (modify-syntax-entry ?\] "." reftex-syntax-table-for-bib)
(run-hooks 'reftex-mode-hook))
;; Mode was turned off
;; This function should be installed in `kill-buffer-hook'.
;; We are careful to make sure nothing goes wring in this function.
(when (and (boundp 'reftex-mode) reftex-mode
- (boundp 'reftex-save-parse-info) reftex-save-parse-info
- (boundp 'reftex-docstruct-symbol) reftex-docstruct-symbol
- (symbol-value reftex-docstruct-symbol)
- (get reftex-docstruct-symbol 'modified))
+ (boundp 'reftex-save-parse-info) reftex-save-parse-info
+ (boundp 'reftex-docstruct-symbol) reftex-docstruct-symbol
+ (symbol-value reftex-docstruct-symbol)
+ (get reftex-docstruct-symbol 'modified))
;; Write the file.
(condition-case nil
- (reftex-access-parse-file 'write)
+ (reftex-access-parse-file 'write)
(error nil))))
(defun reftex-kill-emacs-hook ()
;; This function should be installed in `kill-emacs-hook'.
(save-excursion
(mapcar (lambda (buf)
- (set-buffer buf)
- (reftex-kill-buffer-hook))
- (buffer-list))))
+ (set-buffer buf)
+ (reftex-kill-buffer-hook))
+ (buffer-list))))
;;; =========================================================================
;;;
(put (symbol-value symbol) :master-index index)
;; Initialize if new symbols.
(when newflag
- (set (symbol-value symbol) nil)
- (put (symbol-value symbol) 'reftex-index-macros-style '(default))))
+ (set (symbol-value symbol) nil)
+ (put (symbol-value symbol) 'reftex-index-macros-style '(default))))
;; Return t if the symbols did already exist, nil when we've made them.
(not newflag)))
((master
(cond
((fboundp 'TeX-master-file) ; AUCTeX is loaded. Use its mechanism.
- (condition-case nil
- (TeX-master-file t)
- (error (buffer-file-name))))
- ((fboundp 'tex-main-file) (tex-main-file)) ; Emacs LaTeX mode
+ (condition-case nil
+ (TeX-master-file t)
+ (error (buffer-file-name))))
+ ((fboundp 'tex-main-file) (tex-main-file)) ; Emacs LaTeX mode
((boundp 'TeX-master) ; The variable is defined - lets use it.
(cond
((eq TeX-master t)
(buffer-file-name)))))
(cond
((null master)
- (error "Need a filename for this buffer, please save it first"))
+ (error "Need a filename for this buffer, please save it first"))
((or (file-exists-p (concat master ".tex"))
(reftex-get-buffer-visiting (concat master ".tex")))
;; Ahh, an extra .tex was missing...
)
(t
;; Use buffer file name.
- (buffer-file-name)))
+ (setq master (buffer-file-name))))
(expand-file-name master)))
(defun reftex-is-multi ()
(unless reftex-docstruct-symbol
(reftex-tie-multifile-symbols))
(when (and reftex-docstruct-symbol
- (symbolp reftex-docstruct-symbol))
+ (symbolp reftex-docstruct-symbol))
(put reftex-docstruct-symbol 'reftex-cite-format value)))
(defun reftex-get-cite-format ()
;; Return the current citation format. Either the document-local value in
;; reftex-cite-format-symbol, or the global value in reftex-cite-format.
(if (and reftex-docstruct-symbol
- (symbolp reftex-docstruct-symbol)
- (get reftex-docstruct-symbol 'reftex-cite-format))
+ (symbolp reftex-docstruct-symbol)
+ (get reftex-docstruct-symbol 'reftex-cite-format))
(get reftex-docstruct-symbol 'reftex-cite-format)
reftex-cite-format))
(unless reftex-docstruct-symbol
(reftex-tie-multifile-symbols))
(when (and reftex-docstruct-symbol
- (symbolp reftex-docstruct-symbol))
+ (symbolp reftex-docstruct-symbol))
(let ((list (get reftex-docstruct-symbol 'reftex-index-macros-style))
- entry changed)
+ entry changed)
(while entry-list
- (setq entry (pop entry-list))
- ;; When it is a symbol, remove all other symbols
- (and (symbolp entry)
- (not (memq entry list))
- (setq list (reftex-remove-symbols-from-list list)))
- ;; Add to list unless already member
- (unless (member entry list)
- (setq reftex-tables-dirty t
- changed t)
- (push entry list)))
+ (setq entry (pop entry-list))
+ ;; When it is a symbol, remove all other symbols
+ (and (symbolp entry)
+ (not (memq entry list))
+ (setq list (reftex-remove-symbols-from-list list)))
+ ;; Add to list unless already member
+ (unless (member entry list)
+ (setq reftex-tables-dirty t
+ changed t)
+ (push entry list)))
(when changed
- (put reftex-docstruct-symbol 'reftex-index-macros-style list)))))
+ (put reftex-docstruct-symbol 'reftex-index-macros-style list)))))
;;; =========================================================================
;;;
;; A list of all variables in the cache.
;; The cache is used to save the compiled versions of some variables.
-(defconst reftex-cache-variables
+(defconst reftex-cache-variables
'(reftex-memory ;; This MUST ALWAYS be the first!
-
+
;; Outline
reftex-section-levels-all
;; Labels
- reftex-env-or-mac-alist
+ reftex-env-or-mac-alist
reftex-special-env-parsers
reftex-macros-with-labels
reftex-label-mac-list
reftex-index-macro-alist
reftex-macros-with-index
reftex-query-index-macro-prompt
- reftex-query-index-macro-help
+ reftex-query-index-macro-help
reftex-key-to-index-macro-alist
;; Regular expressions
(defun reftex-ensure-compiled-variables ()
;; Recompile the label alist when necessary
(let* ((mem reftex-memory)
- (cache (get reftex-docstruct-symbol 'reftex-cache))
- (cmem (car cache))
- (alist reftex-label-alist)
- (levels (get reftex-docstruct-symbol 'reftex-section-levels))
- (style (get reftex-docstruct-symbol 'reftex-label-alist-style))
- (default reftex-default-label-alist-entries)
- (index reftex-index-macros)
- (istyle (get reftex-docstruct-symbol 'reftex-index-macros-style)))
+ (cache (get reftex-docstruct-symbol 'reftex-cache))
+ (cmem (car cache))
+ (alist reftex-label-alist)
+ (levels (get reftex-docstruct-symbol 'reftex-section-levels))
+ (style (get reftex-docstruct-symbol 'reftex-label-alist-style))
+ (default reftex-default-label-alist-entries)
+ (index reftex-index-macros)
+ (istyle (get reftex-docstruct-symbol 'reftex-index-macros-style)))
(cond
(reftex-tables-dirty (reftex-compile-variables))
((and (eq alist (nth 0 mem))
- (eq levels (nth 1 mem))
- (eq style (nth 2 mem))
- (eq default (nth 3 mem))
- (eq index (nth 4 mem))
- (eq istyle (nth 5 mem)))) ;; everything is OK
+ (eq levels (nth 1 mem))
+ (eq style (nth 2 mem))
+ (eq default (nth 3 mem))
+ (eq index (nth 4 mem))
+ (eq istyle (nth 5 mem)))) ;; everything is OK
((and (eq alist (nth 0 cmem))
- (eq levels (nth 1 cmem))
- (eq style (nth 2 cmem))
- (eq default (nth 2 cmem))
- (eq index (nth 4 cmem))
- (eq istyle (nth 5 cmem)))
+ (eq levels (nth 1 cmem))
+ (eq style (nth 2 cmem))
+ (eq default (nth 2 cmem))
+ (eq index (nth 4 cmem))
+ (eq istyle (nth 5 cmem)))
;; restore the cache
(message "Restoring cache")
(mapcar (lambda (sym) (set sym (pop cache))) reftex-cache-variables))
(t (reftex-compile-variables)))))
(defun reftex-reset-mode ()
- "Reset RefTeX Mode.
+ "Reset RefTeX Mode.
This will re-compile the configuration information and remove all
current scanning information and the parse file to enforce a rescan
on next use."
;; Reset the file search path variables
(loop for prop in '(status master-dir recursive-path rec-type) do
- (put 'reftex-tex-path prop nil)
- (put 'reftex-bib-path prop nil))
+ (put 'reftex-tex-path prop nil)
+ (put 'reftex-bib-path prop nil))
;; Kill temporary buffers associated with RefTeX - just in case they
;; were not cleaned up properly
(save-excursion
(let ((buffer-list '("*RefTeX Help*" "*RefTeX Select*"
- "*Duplicate Labels*" "*toc*" " *RefTeX-scratch*"))
- buf)
+ "*Duplicate Labels*" "*toc*" " *RefTeX-scratch*"))
+ buf)
(while (setq buf (pop buffer-list))
- (if (get-buffer buf)
- (kill-buffer buf))))
+ (if (get-buffer buf)
+ (kill-buffer buf))))
(reftex-erase-all-selection-and-index-buffers))
;; Make sure the current document will be rescanned soon.
(reftex-compile-variables))
-;;;###autoload
(defun reftex-reset-scanning-information ()
"Reset the symbols containing information from buffer scanning.
This enforces rescanning the buffer on next use."
(defun reftex-erase-all-selection-and-index-buffers ()
;; Remove all selection buffers associated with current document.
- (mapcar
+ (mapcar
(lambda (type)
(reftex-erase-buffer (reftex-make-selection-buffer-name type)))
reftex-typekey-list)
;; Kill all index buffers
- (mapcar
+ (mapcar
(lambda (tag)
(reftex-kill-buffer (reftex-make-index-buffer-name tag)))
(cdr (assoc 'index-tags (symbol-value reftex-docstruct-symbol)))))
;; Record that we have done this, and what we have used.
(setq reftex-tables-dirty nil)
- (setq reftex-memory
- (list reftex-label-alist
- (get reftex-docstruct-symbol 'reftex-section-levels)
- (get reftex-docstruct-symbol 'reftex-label-alist-style)
- reftex-default-label-alist-entries
- reftex-index-macros
- (get reftex-docstruct-symbol 'reftex-index-macros-style)))
+ (setq reftex-memory
+ (list reftex-label-alist
+ (get reftex-docstruct-symbol 'reftex-section-levels)
+ (get reftex-docstruct-symbol 'reftex-label-alist-style)
+ reftex-default-label-alist-entries
+ reftex-index-macros
+ (get reftex-docstruct-symbol 'reftex-index-macros-style)))
;; Compile information in reftex-label-alist
(let ((all (reftex-uniquify-by-car
- (reftex-splice-symbols-into-list
- (append reftex-label-alist
- (get reftex-docstruct-symbol
- 'reftex-label-alist-style)
- reftex-default-label-alist-entries)
- reftex-label-alist-builtin)
- '(nil)))
- (all-index (reftex-uniquify-by-car
- (reftex-splice-symbols-into-list
- (append reftex-index-macros
- (get reftex-docstruct-symbol
- 'reftex-index-macros-style)
- '(default))
- reftex-index-macros-builtin)))
+ (reftex-splice-symbols-into-list
+ (append reftex-label-alist
+ (get reftex-docstruct-symbol
+ 'reftex-label-alist-style)
+ reftex-default-label-alist-entries)
+ reftex-label-alist-builtin)
+ '(nil)))
+ (all-index (reftex-uniquify-by-car
+ (reftex-splice-symbols-into-list
+ (append reftex-index-macros
+ (get reftex-docstruct-symbol
+ 'reftex-index-macros-style)
+ '(default))
+ reftex-index-macros-builtin)))
entry env-or-mac typekeychar typekey prefix context word
fmt reffmt labelfmt wordlist qh-list macros-with-labels
nargs nlabel opt-args cell sum i
- macro verify repeat nindex tag key toc-level toc-levels)
+ macro verify repeat nindex tag key toc-level toc-levels)
(setq reftex-words-to-typekey-alist nil
reftex-typekey-list nil
fmt (nth 2 entry)
context (nth 3 entry)
wordlist (nth 4 entry)
- toc-level (nth 5 entry))
+ toc-level (nth 5 entry))
(if (stringp wordlist)
;; This is before version 2.04 - convert to new format
(setq wordlist (nthcdr 4 entry)))
(setq fmt (list "\\label{%s}" fmt)))
(setq labelfmt (car fmt)
reffmt (nth 1 fmt))
- ;; Note a new typekey
+ ;; Note a new typekey
(if typekey
(add-to-list 'reftex-typekey-list typekey))
(if (and typekey prefix
(not (assoc typekey reftex-typekey-to-prefix-alist)))
(add-to-list 'reftex-typekey-to-prefix-alist
(cons typekey prefix)))
- ;; Check if this is a macro or environment
+ ;; Check if this is a macro or environment
(cond
- ((symbolp env-or-mac)
- ;; A special parser function
- (unless (fboundp env-or-mac)
- (message "Warning: %s does not seem to be a valid function"
- env-or-mac))
+ ((symbolp env-or-mac)
+ ;; A special parser function
+ (unless (fboundp env-or-mac)
+ (message "Warning: %s does not seem to be a valid function"
+ env-or-mac))
(setq nargs nil nlabel nil opt-args nil)
- (add-to-list 'reftex-special-env-parsers env-or-mac)
- (setq env-or-mac (symbol-name env-or-mac)))
+ (add-to-list 'reftex-special-env-parsers env-or-mac)
+ (setq env-or-mac (symbol-name env-or-mac)))
((string-match "\\`\\\\" env-or-mac)
;; It's a macro
(let ((result (reftex-parse-args env-or-mac)))
(setq env-or-mac (or (first result) env-or-mac)
- nargs (second result)
+ nargs (second result)
nlabel (third result)
opt-args (fourth result))
(if nlabel (add-to-list 'macros-with-labels env-or-mac)))
- (if typekey (add-to-list 'reftex-label-mac-list env-or-mac)))
+ (if typekey (add-to-list 'reftex-label-mac-list env-or-mac)))
(t
- ;; It's an environment
+ ;; It's an environment
(setq nargs nil nlabel nil opt-args nil)
(cond ((string= env-or-mac "any"))
((string= env-or-mac ""))
((string= env-or-mac "section"))
(t
(add-to-list 'reftex-label-env-list env-or-mac)
- (if toc-level
- (let ((string (format "begin{%s}" env-or-mac)))
- (or (assoc string toc-levels)
- (push (cons string toc-level) toc-levels))))))))
- ;; Translate some special context cases
- (when (assq context reftex-default-context-regexps)
- (setq context
- (format
- (cdr (assq context reftex-default-context-regexps))
- (regexp-quote env-or-mac))))
- ;; See if this is the first format for this typekey
+ (if toc-level
+ (let ((string (format "begin{%s}" env-or-mac)))
+ (or (assoc string toc-levels)
+ (push (cons string toc-level) toc-levels))))))))
+ ;; Translate some special context cases
+ (when (assq context reftex-default-context-regexps)
+ (setq context
+ (format
+ (cdr (assq context reftex-default-context-regexps))
+ (regexp-quote env-or-mac))))
+ ;; See if this is the first format for this typekey
(and reffmt
(not (assoc typekey reftex-typekey-to-format-alist))
(push (cons typekey reffmt) reftex-typekey-to-format-alist))
- ;; See if this is the first definition for this env-or-mac
+ ;; See if this is the first definition for this env-or-mac
(and (not (string= env-or-mac "any"))
(not (string= env-or-mac ""))
(not (assoc env-or-mac reftex-env-or-mac-alist))
(push (list env-or-mac typekey context labelfmt
- nargs nlabel opt-args)
+ nargs nlabel opt-args)
reftex-env-or-mac-alist))
- ;; Are the magic words regular expressions? Quote normal words.
- (if (eq (car wordlist) 'regexp)
- (setq wordlist (cdr wordlist))
- (setq wordlist (mapcar 'regexp-quote wordlist)))
- ;; Remember the first association of each word.
+ ;; Are the magic words regular expressions? Quote normal words.
+ (if (eq (car wordlist) 'regexp)
+ (setq wordlist (cdr wordlist))
+ (setq wordlist (mapcar 'regexp-quote wordlist)))
+ ;; Remember the first association of each word.
(while (stringp (setq word (pop wordlist)))
(or (assoc word reftex-words-to-typekey-alist)
(push (cons word typekey) reftex-words-to-typekey-alist)))
(nreverse reftex-typekey-to-prefix-alist))
;; Prepare the typekey query prompt and help string.
- (setq qh-list
- (sort qh-list
- (lambda (x1 x2)
- (string< (downcase (car x1)) (downcase (car x2))))))
+ (setq qh-list
+ (sort qh-list
+ (lambda (x1 x2)
+ (string< (downcase (car x1)) (downcase (car x2))))))
(setq reftex-type-query-prompt
(concat "Label type: ["
(mapconcat (lambda(x) (format "%s" (car x)))
"]"))
;; In the help string, we need to wrap lines...
(setq reftex-type-query-help
- (concat
- "SELECT A LABEL TYPE:\n--------------------\n"
- (mapconcat
- (lambda(x)
- (setq sum 0)
- (format " [%s] %s"
- (car x)
- (mapconcat (lambda(env)
- (setq sum (+ sum (length env)))
- (if (< sum 60)
- env
- (setq sum 0)
- (concat "\n " env)))
- (cdr x) " ")))
- qh-list "\n")))
+ (concat
+ "SELECT A LABEL TYPE:\n--------------------\n"
+ (mapconcat
+ (lambda(x)
+ (setq sum 0)
+ (format " [%s] %s"
+ (car x)
+ (mapconcat (lambda(env)
+ (setq sum (+ sum (length env)))
+ (if (< sum 60)
+ env
+ (setq sum 0)
+ (concat "\n " env)))
+ (cdr x) " ")))
+ qh-list "\n")))
;; Convert magic words to regular expressions. We make regular expressions
;; which allow for some chars from the ref format to be in the buffer.
;; These characters will be seen and removed.
(setq reftex-words-to-typekey-alist
- (mapcar
- (lambda (x)
- (setq word (car x)
- typekey (cdr x)
- fmt (cdr (assoc typekey reftex-typekey-to-format-alist)))
- (setq word (concat "\\W\\(" word "[ \t\n\r]*\\)\\("))
- (setq i 0)
- (while (and (< i 10) ; maximum number of format chars allowed
- (< i (length fmt))
- (not (member (aref fmt i) '(?%))))
- (setq word (concat word "\\|" (regexp-quote
- (substring fmt 0 (1+ i)))))
- (incf i))
- (cons (concat word "\\)\\=") typekey))
- (nreverse reftex-words-to-typekey-alist)))
+ (mapcar
+ (lambda (x)
+ (setq word (car x)
+ typekey (cdr x)
+ fmt (cdr (assoc typekey reftex-typekey-to-format-alist)))
+ (setq word (concat "\\W\\(" word "[ \t\n\r]*\\)\\("))
+ (setq i 0)
+ (while (and (< i 10) ; maximum number of format chars allowed
+ (< i (length fmt))
+ (not (member (aref fmt i) '(?%))))
+ (setq word (concat word "\\|" (regexp-quote
+ (substring fmt 0 (1+ i)))))
+ (incf i))
+ (cons (concat word "\\)\\=") typekey))
+ (nreverse reftex-words-to-typekey-alist)))
;; Parse the index macros
(setq reftex-index-macro-alist nil
- reftex-key-to-index-macro-alist nil
- reftex-macros-with-index nil)
+ reftex-key-to-index-macro-alist nil
+ reftex-macros-with-index nil)
(while all-index
(setq entry (car all-index)
- macro (car entry)
- tag (nth 1 entry)
- key (nth 2 entry)
- prefix (or (nth 3 entry) "")
- verify (nth 4 entry)
- ;; For repeat, we need to be compatible with older code
- ;; This information used to be given only for the default macro,
- ;; but later we required to have it for *every* index macro
- repeat (cond ((> (length entry) 5) (nth 5 entry))
- ((and (eq key (car reftex-index-default-macro))
- (> (length reftex-index-default-macro) 2))
- ;; User has old setting - respect it
- (nth 2 reftex-index-default-macro))
- (t t))
- all-index (cdr all-index))
+ macro (car entry)
+ tag (nth 1 entry)
+ key (nth 2 entry)
+ prefix (or (nth 3 entry) "")
+ verify (nth 4 entry)
+ ;; For repeat, we need to be compatible with older code
+ ;; This information used to be given only for the default macro,
+ ;; but later we required to have it for *every* index macro
+ repeat (cond ((> (length entry) 5) (nth 5 entry))
+ ((and (eq key (car reftex-index-default-macro))
+ (> (length reftex-index-default-macro) 2))
+ ;; User has old setting - respect it
+ (nth 2 reftex-index-default-macro))
+ (t t))
+ all-index (cdr all-index))
(let ((result (reftex-parse-args macro)))
- (setq macro (or (first result) macro)
- nargs (second result)
- nindex (third result)
- opt-args (fourth result))
- (unless (member macro reftex-macros-with-index)
- ;; 0 1 2 3 4 5 6 7
- (push (list macro tag prefix verify nargs nindex opt-args repeat)
- reftex-index-macro-alist)
- (or (assoc key reftex-key-to-index-macro-alist)
- (push (list key macro) reftex-key-to-index-macro-alist))
- (push macro reftex-macros-with-index))))
+ (setq macro (or (first result) macro)
+ nargs (second result)
+ nindex (third result)
+ opt-args (fourth result))
+ (unless (member macro reftex-macros-with-index)
+ ;; 0 1 2 3 4 5 6 7
+ (push (list macro tag prefix verify nargs nindex opt-args repeat)
+ reftex-index-macro-alist)
+ (or (assoc key reftex-key-to-index-macro-alist)
+ (push (list key macro) reftex-key-to-index-macro-alist))
+ (push macro reftex-macros-with-index))))
;; Make the prompt and help string for index macros query
(setq reftex-key-to-index-macro-alist
- (sort reftex-key-to-index-macro-alist
- (lambda (a b) (< (downcase (car a)) (downcase (car b))))))
- (setq reftex-query-index-macro-prompt
- (concat "Index macro: ["
- (mapconcat (lambda (x) (char-to-string (car x)))
- reftex-key-to-index-macro-alist "")
- "]"))
+ (sort reftex-key-to-index-macro-alist
+ (lambda (a b) (< (downcase (car a)) (downcase (car b))))))
+ (setq reftex-query-index-macro-prompt
+ (concat "Index macro: ["
+ (mapconcat (lambda (x) (char-to-string (car x)))
+ reftex-key-to-index-macro-alist "")
+ "]"))
(setq i 0
- reftex-query-index-macro-help
- (concat
- "SELECT A MACRO:\n---------------\n"
- (mapconcat
- (lambda(x)
- (format "[%c] %-20.20s%s" (car x) (nth 1 x)
- (if (= 0 (mod (incf i) 3)) "\n" "")))
- reftex-key-to-index-macro-alist "")))
+ reftex-query-index-macro-help
+ (concat
+ "SELECT A MACRO:\n---------------\n"
+ (mapconcat
+ (lambda(x)
+ (format "[%c] %-20.20s%s" (car x) (nth 1 x)
+ (if (= 0 (mod (incf i) 3)) "\n" "")))
+ reftex-key-to-index-macro-alist "")))
;; Make the full list of section levels
(setq reftex-section-levels-all
- (append toc-levels
- (get reftex-docstruct-symbol 'reftex-section-levels)
- reftex-section-levels))
+ (append toc-levels
+ (get reftex-docstruct-symbol 'reftex-section-levels)
+ reftex-section-levels))
;; Calculate the regular expressions
(let* (
-; (wbol "\\(\\`\\|[\n\r]\\)[ \t]*")
- (wbol "\\(^\\)[ \t]*") ; Need to keep the empty group because
- ;;; because match number are hard coded
- (label-re "\\\\label{\\([^}]*\\)}")
- (include-re (concat wbol
- "\\\\\\("
- (mapconcat 'identity
- reftex-include-file-commands "\\|")
- "\\)[{ \t]+\\([^} \t\n\r]+\\)"))
- (section-re
- (concat wbol "\\\\\\("
- (mapconcat (lambda (x) (regexp-quote (car x)))
- reftex-section-levels-all "\\|")
- "\\)\\*?\\(\\[[^]]*\\]\\)?[[{ \t\r\n]"))
- (appendix-re (concat wbol "\\(\\\\appendix\\)"))
- (macro-re
- (if macros-with-labels
- (concat "\\("
- (mapconcat 'regexp-quote macros-with-labels "\\|")
- "\\)[[{]")
- ""))
- (index-re
- (concat "\\("
- (mapconcat 'regexp-quote reftex-macros-with-index "\\|")
- "\\)[[{]"))
- (find-index-re-format
- (concat "\\("
- (mapconcat 'regexp-quote reftex-macros-with-index "\\|")
- "\\)\\([[{][^]}]*[]}]\\)*[[{]\\(%s\\)[]}]"))
- (find-label-re-format
- (concat "\\("
- (mapconcat 'regexp-quote (append '("\\label")
- macros-with-labels) "\\|")
- "\\)\\([[{][^]}]*[]}]\\)*[[{]\\(%s\\)[]}]"))
- (index-level-re
- (regexp-quote (nth 0 reftex-index-special-chars)))
- (index-key-end-re ;; ^]- not allowed
- (concat "[^" (nth 3 reftex-index-special-chars) "]"
- "[" (nth 1 reftex-index-special-chars)
- (nth 2 reftex-index-special-chars) "]"))
- )
+; (wbol "\\(\\`\\|[\n\r]\\)[ \t]*")
+ (wbol "\\(^\\)[ \t]*") ; Need to keep the empty group because
+ ;;; because match number are hard coded
+ (label-re "\\\\label{\\([^}]*\\)}")
+ (include-re (concat wbol
+ "\\\\\\("
+ (mapconcat 'identity
+ reftex-include-file-commands "\\|")
+ "\\)[{ \t]+\\([^} \t\n\r]+\\)"))
+ (section-re
+ (concat wbol "\\\\\\("
+ (mapconcat (lambda (x) (regexp-quote (car x)))
+ reftex-section-levels-all "\\|")
+ "\\)\\*?\\(\\[[^]]*\\]\\)?[[{ \t\r\n]"))
+ (appendix-re (concat wbol "\\(\\\\appendix\\)"))
+ (macro-re
+ (if macros-with-labels
+ (concat "\\("
+ (mapconcat 'regexp-quote macros-with-labels "\\|")
+ "\\)[[{]")
+ ""))
+ (index-re
+ (concat "\\("
+ (mapconcat 'regexp-quote reftex-macros-with-index "\\|")
+ "\\)[[{]"))
+ (find-index-re-format
+ (concat "\\("
+ (mapconcat 'regexp-quote reftex-macros-with-index "\\|")
+ "\\)\\([[{][^]}]*[]}]\\)*[[{]\\(%s\\)[]}]"))
+ (find-label-re-format
+ (concat "\\("
+ (mapconcat 'regexp-quote (append '("\\label")
+ macros-with-labels) "\\|")
+ "\\)\\([[{][^]}]*[]}]\\)*[[{]\\(%s\\)[]}]"))
+ (index-level-re
+ (regexp-quote (nth 0 reftex-index-special-chars)))
+ (index-key-end-re ;; ^]- not allowed
+ (concat "[^" (nth 3 reftex-index-special-chars) "]"
+ "[" (nth 1 reftex-index-special-chars)
+ (nth 2 reftex-index-special-chars) "]"))
+ )
(setq reftex-section-regexp section-re
reftex-section-or-include-regexp
(concat section-re "\\|" include-re)
reftex-everything-regexp
(concat label-re "\\|" section-re "\\|" include-re
- "\\|" appendix-re
- "\\|" index-re
+ "\\|" appendix-re
+ "\\|" index-re
(if macros-with-labels "\\|" "") macro-re)
reftex-everything-regexp-no-index
(concat label-re "\\|" section-re "\\|" include-re
- "\\|" appendix-re
- "\\|" "\\(\\\\6\\\\3\\\\1\\)" ; This is unlikely to match
+ "\\|" appendix-re
+ "\\|" "\\(\\\\6\\\\3\\\\1\\)" ; This is unlikely to match
(if macros-with-labels "\\|" "") macro-re)
- reftex-index-re index-re
- reftex-index-level-re index-level-re
- reftex-index-key-end-re index-key-end-re
- reftex-macros-with-labels macros-with-labels
- reftex-find-index-entry-regexp-format find-index-re-format
+ reftex-index-re index-re
+ reftex-index-level-re index-level-re
+ reftex-index-key-end-re index-key-end-re
+ reftex-macros-with-labels macros-with-labels
+ reftex-find-index-entry-regexp-format find-index-re-format
reftex-find-label-regexp-format find-label-re-format
- reftex-find-label-regexp-format2
- "\\([]} \t\n\r]\\)\\([[{]\\)\\(%s\\)[]}]")
+ reftex-find-label-regexp-format2
+ "\\([]} \t\n\r]\\)\\([[{]\\)\\(%s\\)[]}]")
(message "Compiling label environment definitions...done")))
(put reftex-docstruct-symbol 'reftex-cache
(mapcar 'symbol-value reftex-cache-variables)))
(when (eq ?\[ (string-to-char args))
(push cnt opt-list))
(when (and (match-end 1)
- (not nlabel))
- (setq nlabel cnt))
+ (not nlabel))
+ (setq nlabel cnt))
(setq args (substring args (match-end 0))))
(list must-match cnt nlabel opt-list)))
nil))
(reftex-ensure-compiled-variables)
(when (or (null (symbol-value reftex-docstruct-symbol))
- (member rescan '(t 1 (4) (16))))
+ (member rescan '(t 1 (4) (16))))
;; The docstruct will change: Remove selection buffers.
(save-excursion
(reftex-erase-buffer "*toc*")
(reftex-erase-all-selection-and-index-buffers)))
(if (and (null (symbol-value reftex-docstruct-symbol))
- (not (member rescan '(t 1 (4) (16))))
+ (not (member rescan '(t 1 (4) (16))))
reftex-save-parse-info)
;; Try to read the stuff from a file
(reftex-access-parse-file 'read))
;; Scan whatever was required by the caller.
(reftex-do-parse rescan file))))
+;;;###autoload
(defun reftex-scanning-info-available-p ()
"Is the scanning info about the current document available?"
(unless reftex-docstruct-symbol
(and (symbolp reftex-docstruct-symbol)
(symbol-value reftex-docstruct-symbol)
t))
-
+
(defun reftex-silence-toc-markers (list n)
;; Set all toc markers in the first N entries in list to nil
(while (and list (> (decf n) -1))
"Perform ACTION on the parse file (the .rel file).
Valid actions are: readable, restore, read, kill, write."
(let* ((list (symbol-value reftex-docstruct-symbol))
- (docstruct-symbol reftex-docstruct-symbol)
+ (docstruct-symbol reftex-docstruct-symbol)
(master (reftex-TeX-master-file))
- (enable-local-variables nil)
+ (enable-local-variables nil)
(file (if (string-match "\\.[a-zA-Z]+\\'" master)
- (concat (substring master 0 (match-beginning 0))
- reftex-parse-file-extension)
+ (concat (substring master 0 (match-beginning 0))
+ reftex-parse-file-extension)
(concat master reftex-parse-file-extension))))
(cond
((eq action 'readable)
(reftex-tie-multifile-symbols))
(if (file-exists-p file)
;; load the file and return t for success
- (condition-case nil
- (progn (load-file file) t)
- (error (set reftex-docstruct-symbol nil)
- (error "Error while loading file %s" file)))
+ (condition-case nil
+ (progn (load-file file) t)
+ (error (set reftex-docstruct-symbol nil)
+ (error "Error while loading file %s" file)))
;; Throw an exception if the file does not exist
(error "No restore file %s" file)))
((eq action 'read)
(put reftex-docstruct-symbol 'modified nil)
(if (file-exists-p file)
;; load the file and return t for success
- (condition-case nil
- (progn
- (load-file file)
- (reftex-check-parse-consistency)
- t)
- (error (message "Error while restoring file %s" file)
- (set reftex-docstruct-symbol nil)
- nil))
+ (condition-case nil
+ (progn
+ (load-file file)
+ (reftex-check-parse-consistency)
+ t)
+ (error (message "Error while restoring file %s" file)
+ (set reftex-docstruct-symbol nil)
+ nil))
;; return nil for failure, but no exception
nil))
((eq action 'kill)
;; Remove the file
(when (and (file-exists-p file) (file-writable-p file))
- (message "Unlinking file %s" file)
- (delete-file file)))
+ (message "Unlinking file %s" file)
+ (delete-file file)))
(t
(put docstruct-symbol 'modified nil)
(save-excursion
(insert "(set reftex-docstruct-symbol '(\n\n")
(let ((standard-output (current-buffer)))
(mapcar
- (lambda (x)
- (cond ((eq (car x) 'toc)
- ;; A toc entry. Do not save the marker.
- ;; Save the markers position at position 8
- (print (list 'toc "toc" (nth 2 x) (nth 3 x)
- nil (nth 5 x) (nth 6 x) (nth 7 x)
- (or (and (markerp (nth 4 x))
- (marker-position (nth 4 x)))
- (nth 8 x)))))
- ((and (not (eq t reftex-support-index))
- (eq (car x) 'index))
- ;; Don't save index entries
- )
- (t (print x))))
+ (lambda (x)
+ (cond ((eq (car x) 'toc)
+ ;; A toc entry. Do not save the marker.
+ ;; Save the markers position at position 8
+ (print (list 'toc "toc" (nth 2 x) (nth 3 x)
+ nil (nth 5 x) (nth 6 x) (nth 7 x)
+ (or (and (markerp (nth 4 x))
+ (marker-position (nth 4 x)))
+ (nth 8 x)))))
+ ((and (not (eq t reftex-support-index))
+ (eq (car x) 'index))
+ ;; Don't save index entries
+ )
+ (t (print x))))
list))
(insert "))\n\n")
(save-buffer 0)
;; Check if the master is the same: when moving a document, this will see it.
(let* ((real-master (reftex-TeX-master-file))
- (parsed-master
- (nth 1 (assq 'bof (symbol-value reftex-docstruct-symbol)))))
+ (parsed-master
+ (nth 1 (assq 'bof (symbol-value reftex-docstruct-symbol)))))
(unless (string= (file-truename real-master) (file-truename parsed-master))
(message "Master file name in load file is different: %s versus %s"
- parsed-master real-master)
+ parsed-master real-master)
(error "Master file name error")))
;; Check for the existence of all document files
;;; (let* ((all (symbol-value reftex-docstruct-symbol)))
;;; (while all
;;; (when (and (eq (car (car all)) 'bof)
-;;; (not (file-regular-p (nth 1 (car all)))))
-;;; (message "File %s in saved parse info not avalable" (cdr (car all)))
-;;; (error "File not found"))
+;;; (not (file-regular-p (nth 1 (car all)))))
+;;; (message "File %s in saved parse info not avalable" (cdr (car all)))
+;;; (error "File not found"))
;;; (setq all (cdr all))))
)
(defun reftex-select-external-document (xr-alist xr-index)
;; Return index of an external document.
(let* ((len (length xr-alist)) (highest (1- (+ ?0 len)))
- (prompt (format "[%c-%c] Select TAB: Read prefix with completion"
- ?0 highest))
- key prefix)
+ (prompt (format "[%c-%c] Select TAB: Read prefix with completion"
+ ?0 highest))
+ key prefix)
(cond
((= len 1)
(message "No external documents available")
(- 1 xr-index))
(t
(save-excursion
- (let* ((length (apply 'max (mapcar
- (lambda(x) (length (car x))) xr-alist)))
- (fmt (format " [%%c] %%-%ds %%s\n" length))
- (n (1- ?0)))
- (setq key
- (reftex-select-with-char
- prompt
- (concat
- "SELECT EXTERNAL DOCUMENT\n------------------------\n"
- (mapconcat
- (lambda (x)
- (format fmt (incf n) (or (car x) "")
- (abbreviate-file-name (cdr x))))
- xr-alist ""))
- nil t))
- (cond
- ((and (>= key ?0) (<= key highest)) (- key ?0))
- ((= key ?\C-i)
- (setq prefix (completing-read "Prefix: " xr-alist nil t))
- (- len (length (memq (assoc prefix xr-alist) xr-alist))))
- (t (error "Illegal document selection [%c]" key)))))))))
+ (let* ((length (apply 'max (mapcar
+ (lambda(x) (length (car x))) xr-alist)))
+ (fmt (format " [%%c] %%-%ds %%s\n" length))
+ (n (1- ?0)))
+ (setq key
+ (reftex-select-with-char
+ prompt
+ (concat
+ "SELECT EXTERNAL DOCUMENT\n------------------------\n"
+ (mapconcat
+ (lambda (x)
+ (format fmt (incf n) (or (car x) "")
+ (abbreviate-file-name (cdr x))))
+ xr-alist ""))
+ nil t))
+ (cond
+ ((and (>= key ?0) (<= key highest)) (- key ?0))
+ ((= key ?\C-i)
+ (setq prefix (completing-read "Prefix: " xr-alist nil t))
+ (- len (length (memq (assoc prefix xr-alist) xr-alist))))
+ (t (error "Illegal document selection [%c]" key)))))))))
;;; =========================================================================
;;;
try first the default extension and only then the naked file name.
When DIE is non-nil, throw an error if file not found."
(let* ((rec-values (if reftex-search-unrecursed-path-first '(nil t) '(t)))
- (extensions (cdr (assoc type reftex-file-extensions)))
- (def-ext (car extensions))
- (ext-re (concat "\\("
- (mapconcat 'regexp-quote extensions "\\|")
- "\\)\\'"))
- (files (if (string-match ext-re file)
- (cons file nil)
- (cons (concat file def-ext) file)))
- path old-path file1)
+ (extensions (cdr (assoc type reftex-file-extensions)))
+ (def-ext (car extensions))
+ (ext-re (concat "\\("
+ (mapconcat 'regexp-quote extensions "\\|")
+ "\\)\\'"))
+ (files (if (string-match ext-re file)
+ (cons file nil)
+ (cons (concat file def-ext) file)))
+ path old-path file1)
(cond
((file-name-absolute-p file)
- (setq file1
- (or
- (and (car files) (file-regular-p (car files)) (car files))
- (and (cdr files) (file-regular-p (cdr files)) (cdr files)))))
+ (setq file1
+ (or
+ (and (car files) (file-regular-p (car files)) (car files))
+ (and (cdr files) (file-regular-p (cdr files)) (cdr files)))))
((and reftex-use-external-file-finders
- (assoc type reftex-external-file-finders))
+ (assoc type reftex-external-file-finders))
(setq file1 (reftex-find-file-externally file type master-dir)))
(t
(while (and (null file1) rec-values)
- (setq path (reftex-access-search-path
- type (pop rec-values) master-dir file))
- (if (or (null old-path)
- (not (eq old-path path)))
- (setq old-path path
- path (cons master-dir path)
- file1 (or (and (car files)
- (reftex-find-file-on-path
- (car files) path master-dir))
- (and (cdr files)
- (reftex-find-file-on-path
- (cdr files) path master-dir))))))))
+ (setq path (reftex-access-search-path
+ type (pop rec-values) master-dir file))
+ (if (or (null old-path)
+ (not (eq old-path path)))
+ (setq old-path path
+ path (cons master-dir path)
+ file1 (or (and (car files)
+ (reftex-find-file-on-path
+ (car files) path master-dir))
+ (and (cdr files)
+ (reftex-find-file-on-path
+ (cdr files) path master-dir))))))))
(cond (file1 file1)
- (die (error "No such file: %s" file) nil)
- (t (message "No such file: %s (ignored)" file) nil))))
+ (die (error "No such file: %s" file) nil)
+ (t (message "No such file: %s (ignored)" file) nil))))
(defun reftex-find-file-externally (file type &optional master-dir)
;; Use external program to find FILE.
;; The program is taken from `reftex-external-file-finders'.
;; Interprete relative path definitions starting from MASTER-DIR.
(let ((default-directory (or master-dir default-directory))
- (prg (cdr (assoc type reftex-external-file-finders)))
- out)
+ (prg (cdr (assoc type reftex-external-file-finders)))
+ out)
(if (string-match "%f" prg)
- (setq prg (replace-match file t t prg)))
+ (setq prg (replace-match file t t prg)))
(setq out (apply 'reftex-process-string (split-string prg)))
(if (string-match "[ \t\n]+\\'" out) ; chomp
- (setq out (replace-match "" nil nil out)))
+ (setq out (replace-match "" nil nil out)))
(cond ((equal out "") nil)
- ((file-regular-p out) (expand-file-name out master-dir))
- (t nil))))
+ ((file-regular-p out) (expand-file-name out master-dir))
+ (t nil))))
(defun reftex-process-string (program &rest args)
"Execute PROGRAM with arguments ARGS and return its STDOUT as a string."
(let ((calling-dir default-directory)) ; remember default directory
(with-output-to-string
(with-current-buffer standard-output
- (let ((default-directory calling-dir)) ; set default directory
- (apply 'call-process program nil '(t nil) nil args))))))
+ (let ((default-directory calling-dir)) ; set default directory
+ (apply 'call-process program nil '(t nil) nil args))))))
(defun reftex-access-search-path (type &optional recurse master-dir file)
;; Access path from environment variables. TYPE is either "tex" or "bib".
(when (null (get pathvar 'status))
;; Get basic path
(set pathvar
- (reftex-uniq
- (reftex-parse-colon-path
- (mapconcat
- (lambda(x)
- (if (string-match "^!" x)
- (apply 'reftex-process-string
- (split-string (substring x 1)))
- (or (getenv x) x)))
- ;; For consistency, the next line should look like this:
- ;; (cdr (assoc type reftex-path-environment))
- ;; However, historically we have separate options for the
- ;; environment variables, so we have to do this:
- (symbol-value (intern (concat "reftex-" type
- "path-environment-variables")))
- path-separator))))
+ (reftex-uniq
+ (reftex-parse-colon-path
+ (mapconcat
+ (lambda(x)
+ (if (string-match "^!" x)
+ (apply 'reftex-process-string
+ (split-string (substring x 1)))
+ (or (getenv x) x)))
+ ;; For consistency, the next line should look like this:
+ ;; (cdr (assoc type reftex-path-environment))
+ ;; However, historically we have separate options for the
+ ;; environment variables, so we have to do this:
+ (symbol-value (intern (concat "reftex-" type
+ "path-environment-variables")))
+ path-separator))))
(put pathvar 'status 'split)
;; Check if we have recursive elements
(let ((path (symbol-value pathvar)) dir rec)
- (while (setq dir (pop path))
- (when (string= (substring dir -2) "//")
- (if (file-name-absolute-p dir)
- (setq rec (or rec 'absolute))
- (setq rec 'relative))))
- (put pathvar 'rec-type rec)))
+ (while (setq dir (pop path))
+ (when (string= (substring dir -2) "//")
+ (if (file-name-absolute-p dir)
+ (setq rec (or rec 'absolute))
+ (setq rec 'relative))))
+ (put pathvar 'rec-type rec)))
(if recurse
- ;; Return the recursive expansion of the path
- (cond
- ((not (get pathvar 'rec-type))
- ;; Path does not contain recursive elements - use simple path
- (symbol-value pathvar))
- ((or (not (get pathvar 'recursive-path))
- (and (eq (get pathvar 'rec-type) 'relative)
- (not (equal master-dir (get pathvar 'master-dir)))))
- ;; Either: We don't have a recursive expansion yet.
- ;; or: Relative recursive path elements need to be expanded
- ;; relative to new default directory
- (message "Expanding search path to find %s file: %s ..." type file)
- (put pathvar 'recursive-path
- (reftex-expand-path (symbol-value pathvar) master-dir))
- (put pathvar 'master-dir master-dir)
- (get pathvar 'recursive-path))
- (t
- ;; Recursive path computed earlier is still OK.
- (get pathvar 'recursive-path)))
+ ;; Return the recursive expansion of the path
+ (cond
+ ((not (get pathvar 'rec-type))
+ ;; Path does not contain recursive elements - use simple path
+ (symbol-value pathvar))
+ ((or (not (get pathvar 'recursive-path))
+ (and (eq (get pathvar 'rec-type) 'relative)
+ (not (equal master-dir (get pathvar 'master-dir)))))
+ ;; Either: We don't have a recursive expansion yet.
+ ;; or: Relative recursive path elements need to be expanded
+ ;; relative to new default directory
+ (message "Expanding search path to find %s file: %s ..." type file)
+ (put pathvar 'recursive-path
+ (reftex-expand-path (symbol-value pathvar) master-dir))
+ (put pathvar 'master-dir master-dir)
+ (get pathvar 'recursive-path))
+ (t
+ ;; Recursive path computed earlier is still OK.
+ (get pathvar 'recursive-path)))
;; The simple path was requested
(symbol-value pathvar))))
(catch 'exit
(when (file-name-absolute-p file)
(if (file-regular-p file)
- (throw 'exit file)
- (throw 'exit nil)))
+ (throw 'exit file)
+ (throw 'exit nil)))
(let* ((thepath path) file1 dir)
(while (setq dir (pop thepath))
- (when (string= (substring dir -2) "//")
- (setq dir (substring dir 0 -1)))
- (setq file1 (expand-file-name file (expand-file-name dir def-dir)))
- (if (file-regular-p file1)
- (throw 'exit file1)))
+ (when (string= (substring dir -2) "//")
+ (setq dir (substring dir 0 -1)))
+ (setq file1 (expand-file-name file (expand-file-name dir def-dir)))
+ (if (file-regular-p file1)
+ (throw 'exit file1)))
;; No such file
nil)))
;; Trailing ! or !! will be converted into `//' (emTeX convention)
(mapcar
(lambda (dir)
- (if (string-match "\\(//+\\|/*!+\\)\\'" dir)
- (setq dir (replace-match "//" t t dir)))
+ (if (string-match "\\(//+\\|/*!+\\)\\'" dir)
+ (setq dir (replace-match "//" t t dir)))
(file-name-as-directory dir))
(delete "" (split-string path (concat path-separator "+")))))
(let (path1 dir recursive)
(while (setq dir (pop path))
(if (setq recursive (string= (substring dir -2) "//"))
- (setq dir (substring dir 0 -1)))
+ (setq dir (substring dir 0 -1)))
(if (and recursive
- (not (file-name-absolute-p dir)))
- (setq dir (expand-file-name dir default-dir)))
+ (not (file-name-absolute-p dir)))
+ (setq dir (expand-file-name dir default-dir)))
(if recursive
- ;; Expand recursively
- (setq path1 (append (reftex-recursive-directory-list dir) path1))
- ;; Keep unchanged
- (push dir path1)))
+ ;; Expand recursively
+ (setq path1 (append (reftex-recursive-directory-list dir) path1))
+ ;; Keep unchanged
+ (push dir path1)))
(nreverse path1)))
(defun reftex-recursive-directory-list (dir)
(let ((path (list dir)) path1 file files)
(while (setq dir (pop path))
(when (file-directory-p dir)
- (setq files (nreverse (directory-files dir t "[^.]")))
- (while (setq file (pop files))
- (if (file-directory-p file)
- (push (file-name-as-directory file) path)))
- (push dir path1)))
+ (setq files (nreverse (directory-files dir t "[^.]")))
+ (while (setq file (pop files))
+ (if (file-directory-p file)
+ (push (file-name-as-directory file) path)))
+ (push dir path1)))
path1))
(defun reftex-uniq (list)
(let (new)
(while list
(or (member (car list) new)
- (push (car list) new))
+ (push (car list) new))
(pop list))
(nreverse new)))
"Show the table of contents for the current document." t)
(autoload 'reftex-toc-recenter "reftex-toc"
"Display the TOC window and highlight line corresponding to current position." t)
-(autoload 'reftex-toggle-auto-toc-recenter "reftex-toc"
- "Toggle automatic recentering of TOC window." t)
+(autoload 'reftex-toggle-auto-toc-recenter "reftex-toc" t)
+
;;; =========================================================================
;;;
(when (match-beginning n)
(buffer-substring-no-properties (match-beginning n) (match-end n))))
-(defun reftex-region-active-p ()
- "Is transient-mark-mode on and the region active?
-Works on both Emacs and XEmacs."
- (if (featurep 'xemacs)
- (and zmacs-regions (region-active-p))
- (and transient-mark-mode mark-active)))
-
(defun reftex-kill-buffer (buffer)
;; Kill buffer if it exists.
(and (setq buffer (get-buffer buffer))
(let* ((elt (car (member elt list))) (ex (not exclusive)) ass last-ass)
(while (and (setq ass (assoc key list))
(setq list (memq ass list))
- (or ex (not (eq elt (car list))))
+ (or ex (not (eq elt (car list))))
(memq elt list))
(setq last-ass ass
list (cdr list)))
(let (rtn)
(while list
(if (funcall predicate (car list))
- (push (if completion
- (list (nth nth (car list)))
- (nth nth (car list)))
- rtn))
+ (push (if completion
+ (list (nth nth (car list)))
+ (nth nth (car list)))
+ rtn))
(setq list (cdr list)))
(nreverse rtn)))
(defun reftex-make-selection-buffer-name (type &optional index)
;; Make unique name for a selection buffer.
(format " *RefTeX[%s][%d]*"
- type (or index (get reftex-docstruct-symbol :master-index) 0)))
+ type (or index (get reftex-docstruct-symbol :master-index) 0)))
(defun reftex-make-index-buffer-name (tag &optional cnt)
;; Make unique name for an index buffer.
(format "*Index[%s][%d]*"
- tag (or cnt (get reftex-docstruct-symbol :master-index) 0)))
+ tag (or cnt (get reftex-docstruct-symbol :master-index) 0)))
(defun reftex-truncate (string ncols &optional ellipses padding)
;; Truncate STRING to NCOLS characters.
;; white space to NCOLS characters. When ELLIPSES is non-nil and the
;; string needs to be truncated, replace last 3 characters by dots.
(setq string
- (if (<= (length string) ncols)
- string
- (if ellipses
- (concat (substring string 0 (- ncols 3)) "...")
- (substring string 0 ncols))))
+ (if (<= (length string) ncols)
+ string
+ (if ellipses
+ (concat (substring string 0 (- ncols 3)) "...")
+ (substring string 0 ncols))))
(if padding
(format (format "%%-%ds" ncols) string)
string))
;; If POS is given, calculate distances relative to it.
;; Return nil if there is no match.
(let ((pos (point))
- (dist (or max-length (length regexp)))
- match1 match2 match)
+ (dist (or max-length (length regexp)))
+ match1 match2 match)
(goto-char (min (+ pos dist) (point-max)))
(when (re-search-backward regexp nil t)
(setq match1 (match-data)))
;; Enlarge other window displaying buffer to show whole buffer if possible.
;; If KEEP-CURRENT in non-nil, current buffer must remain visible.
(let* ((win1 (selected-window))
- (buf1 (current-buffer))
- (win2 (get-buffer-window buf2))) ;; Only on current frame.
+ (buf1 (current-buffer))
+ (win2 (get-buffer-window buf2))) ;; Only on current frame.
(when win2
(select-window win2)
- (unless (and (pos-visible-in-window-p (point-min))
- (pos-visible-in-window-p (point-max)))
- (enlarge-window (1+ (- (count-lines (point-min) (point-max))
- (reftex-window-height))))))
+ (unless (and (pos-visible-in-window-p 1)
+ (pos-visible-in-window-p (point-max)))
+ (enlarge-window (1+ (- (count-lines 1 (point-max))
+ (reftex-window-height))))))
(cond
((window-live-p win1) (select-window win1))
(keep-current
(let ((char ?\?))
(save-window-excursion
(catch 'exit
- (message (concat prompt " (?=Help)"))
- (when (or (sit-for (or delay-time 0))
- (= ?\? (setq char (read-char-exclusive))))
- (reftex-kill-buffer "*RefTeX Select*")
- (switch-to-buffer-other-window "*RefTeX Select*")
- (insert help-string)
- (goto-char 1)
- (unless (and (pos-visible-in-window-p (point-min))
- (pos-visible-in-window-p (point-max)))
- (enlarge-window (1+ (- (count-lines (point-min) (point-max))
- (reftex-window-height)))))
- (setq truncate-lines t))
- (if (and (pos-visible-in-window-p (point-min))
- (pos-visible-in-window-p (point-max)))
- nil
- (setq prompt (concat prompt (if scroll " (SPC/DEL=Scroll)" ""))))
- (message prompt)
- (and (equal char ?\?) (setq char (read-char-exclusive)))
- (while t
- (cond ((equal char ?\C-g) (keyboard-quit))
- ((equal char ?\?))
- ((and scroll (equal char ?\ ))
- (condition-case nil (scroll-up) (error nil))
- (message prompt))
- ((and scroll (equal char ?\C-? ))
- (condition-case nil (scroll-down) (error nil))
- (message prompt))
- (t (message "")
- (throw 'exit char)))
- (setq char (read-char-exclusive)))))))
-
+ (message (concat prompt " (?=Help)"))
+ (when (or (sit-for (or delay-time 0))
+ (= ?\? (setq char (read-char-exclusive))))
+ (reftex-kill-buffer "*RefTeX Select*")
+ (switch-to-buffer-other-window "*RefTeX Select*")
+ (insert help-string)
+ (goto-char 1)
+ (unless (and (pos-visible-in-window-p (point-min))
+ (pos-visible-in-window-p (point-max)))
+ (enlarge-window (1+ (- (count-lines (point-min) (point-max))
+ (reftex-window-height)))))
+ (setq truncate-lines t))
+ (if (and (pos-visible-in-window-p (point-min))
+ (pos-visible-in-window-p (point-max)))
+ nil
+ (setq prompt (concat prompt (if scroll " (SPC/DEL=Scroll)" ""))))
+ (message prompt)
+ (and (equal char ?\?) (setq char (read-char-exclusive)))
+ (while t
+ (cond ((equal char ?\C-g) (keyboard-quit))
+ ((equal char ?\?))
+ ((and scroll (equal char ?\ ))
+ (condition-case nil (scroll-up) (error nil))
+ (message prompt))
+ ((and scroll (equal char ?\C-? ))
+ (condition-case nil (scroll-down) (error nil))
+ (message prompt))
+ (t (message "")
+ (throw 'exit char)))
+ (setq char (read-char-exclusive)))))))
+
(defun reftex-make-regexp-allow-for-ctrl-m (string)
;; convert STRING into a regexp, allowing ^M for \n and vice versa
;; Define `current-message' for compatibility with XEmacs prior to 20.4
(defvar message-stack)
(if (and (featurep 'xemacs)
- (not (fboundp 'current-message)))
+ (not (fboundp 'current-message)))
(defun current-message (&optional frame)
(cdr (car message-stack))))
(defun reftex-visited-files (list)
;; Takes a list of filenames and returns the buffers of those already visited
(delq nil (mapcar (lambda (x) (if (reftex-get-buffer-visiting x) x nil))
- list)))
+ list)))
(defun reftex-get-file-buffer-force (file &optional mark-to-kill)
;; Return a buffer visiting file. Make one, if necessary.
(let ((format-alist nil)
(auto-mode-alist (reftex-auto-mode-alist))
(default-major-mode 'fundamental-mode)
- (enable-local-variables nil)
+ (enable-local-variables nil)
(after-insert-file-functions nil))
(setq buf (find-file-noselect file)))
(set-buffer buf)
(run-hooks 'reftex-initialize-temporary-buffers))))
- ;; Lets see if we got a license to kill :-|
- (and mark-to-kill
- (add-to-list 'reftex-buffers-to-kill buf))
+ ;; Lets see if we got a license to kill :-|
+ (and mark-to-kill
+ (add-to-list 'reftex-buffers-to-kill buf))
;; Return the new buffer
buf)
(let (rtn)
(while list
(unless (symbolp (car list))
- (push (car list) rtn))
+ (push (car list) rtn))
(setq list (cdr list)))
(nreverse rtn)))
(while list
(setq elm (pop list))
(unless (member elm new)
- (push elm new)))
+ (push elm new)))
(nreverse new)))
(defun reftex-uniquify-by-car (alist &optional keep-list)
(defun reftex-abbreviate-title (string)
(reftex-convert-string string "[-~ \t\n\r,;]" nil t t
- 5 40 nil 1 " " (nth 5 reftex-derive-label-parameters)))
+ 5 40 nil 1 " " (nth 5 reftex-derive-label-parameters)))
(defun reftex-convert-string (string split-re illegal-re dot keep-fp
- nwords maxchar illegal abbrev sep
- ignore-words &optional downcase)
+ nwords maxchar illegal abbrev sep
+ ignore-words &optional downcase)
"Convert a string (a sentence) to something shorter.
SPLIT-RE is the regular expression used to split the string into words.
ILLEGAL-RE matches characters which are illegal in the final string.
IGNORE-WORDS List of words which should be removed from the string."
(let* ((words0 (split-string string (or split-re "[ \t\n\r]")))
- (reftex-label-illegal-re (or illegal-re "\000"))
- (abbrev-re (concat
- "\\`\\("
- (make-string (nth 0 reftex-abbrev-parameters) ?.)
- "[" (nth 2 reftex-abbrev-parameters) "]*"
- "\\)"
- "[" (nth 3 reftex-abbrev-parameters) "]"
- (make-string (1- (nth 1 reftex-abbrev-parameters)) ?.)))
+ (reftex-label-illegal-re (or illegal-re "\000"))
+ (abbrev-re (concat
+ "\\`\\("
+ (make-string (nth 0 reftex-abbrev-parameters) ?.)
+ "[" (nth 2 reftex-abbrev-parameters) "]*"
+ "\\)"
+ "[" (nth 3 reftex-abbrev-parameters) "]"
+ (make-string (1- (nth 1 reftex-abbrev-parameters)) ?.)))
words word)
;; Remove words from the ignore list or with funny characters
;; Restrict number of words
(if (> (length words) nwords)
(setcdr (nthcdr (1- nwords) words) nil))
-
+
;; First, try to use all words
(setq string (mapconcat 'identity words sep))
-
+
;; Abbreviate words if enforced by user settings or string length
(if (or (eq t abbrev)
(and abbrev
(> (length string) maxchar)))
(setq words
(mapcar
- (lambda (w) (if (string-match abbrev-re w)
- (if dot
- (concat (match-string 1 w) ".")
- (match-string 1 w))
- w))
+ (lambda (w) (if (string-match abbrev-re w)
+ (if dot
+ (concat (match-string 1 w) ".")
+ (match-string 1 w))
+ w))
words)
string (mapconcat 'identity words sep)))
(and (reftex-use-fonts)
(or (eq t reftex-refontify-context)
(and (eq 1 reftex-refontify-context)
- ;; Test of we use the font-lock version of x-symbol
- (and (featurep 'x-symbol-tex) (not (boundp 'x-symbol-mode)))))))
+ ;; Test of we use the font-lock version of x-symbol
+ (and (featurep 'x-symbol-tex) (not (boundp 'x-symbol-mode)))))))
(defvar font-lock-defaults-computed)
(defun reftex-fontify-select-label-buffer (parent-buffer)
;; Fontify the `*RefTeX Select*' buffer. Buffer is temporarily renamed to
;; start with none-SPC char, beacuse Font-Lock otherwise refuses operation.
(run-hook-with-args 'reftex-pre-refontification-functions
- parent-buffer 'reftex-ref)
+ parent-buffer 'reftex-ref)
(let* ((oldname (buffer-name))
- (newname (concat "Fontify-me-" oldname)))
+ (newname (concat "Fontify-me-" oldname)))
(unwind-protect
- (progn
- ;; Rename buffer temporarily to start w/o space (because of font-lock)
- (rename-buffer newname t)
- (cond
- ((fboundp 'font-lock-default-fontify-region)
- ;; Good: we have the indirection functions
- (set (make-local-variable 'font-lock-fontify-region-function)
- 'reftex-select-font-lock-fontify-region)
- (let ((major-mode 'latex-mode))
- (font-lock-mode 1)))
- ((fboundp 'font-lock-set-defaults-1)
- ;; Looks like the XEmacs font-lock stuff.
- ;; FIXME: this is still kind of a hack, but it works.
- (set (make-local-variable 'font-lock-keywords) nil)
- (let ((major-mode 'latex-mode)
- (font-lock-defaults-computed nil))
- (font-lock-set-defaults-1)
- (reftex-select-font-lock-fontify-region (point-min) (point-max))))
- (t
- ;; Oops?
- (message "Sorry: cannot refontify RefTeX Select buffer."))))
+ (progn
+ ;; Rename buffer temporarily to start w/o space (because of font-lock)
+ (rename-buffer newname t)
+ (cond
+ ((fboundp 'font-lock-default-fontify-region)
+ ;; Good: we have the indirection functions
+ (set (make-local-variable 'font-lock-fontify-region-function)
+ 'reftex-select-font-lock-fontify-region)
+ (let ((major-mode 'latex-mode))
+ (font-lock-mode 1)))
+ ((fboundp 'font-lock-set-defaults-1)
+ ;; Looks like the XEmacs font-lock stuff.
+ ;; FIXME: this is still kind of a hack, but it works.
+ (set (make-local-variable 'font-lock-keywords) nil)
+ (let ((major-mode 'latex-mode)
+ (font-lock-defaults-computed nil))
+ (font-lock-set-defaults-1)
+ (reftex-select-font-lock-fontify-region (point-min) (point-max))))
+ (t
+ ;; Oops?
+ (message "Sorry: cannot refontify RefTeX Select buffer."))))
(rename-buffer oldname))))
(defun reftex-select-font-lock-fontify-region (beg end &optional loudly)
;; Fontify a region, but only lines starting with a dot.
(let ((func (if (fboundp 'font-lock-default-fontify-region)
- 'font-lock-default-fontify-region
- 'font-lock-fontify-region))
- beg1 end1)
+ 'font-lock-default-fontify-region
+ 'font-lock-fontify-region))
+ beg1 end1)
(goto-char beg)
(while (re-search-forward "^\\." end t)
(setq beg1 (point) end1 (progn (skip-chars-forward "^\n") (point)))
(let (face)
(catch 'exit
(while (setq face (pop faces))
- (if (featurep 'xemacs)
- (if (find-face face) (throw 'exit face))
- (if (facep face) (throw 'exit face)))))))
+ (if (featurep 'xemacs)
+ (if (find-face face) (throw 'exit face))
+ (if (facep face) (throw 'exit face)))))))
;; Highlighting uses overlays. For XEmacs, we need the emulation.
(if (featurep 'xemacs) (require 'overlay))
;; Initialize the overlays
(aset reftex-highlight-overlays 0 (make-overlay 1 1))
-(overlay-put (aref reftex-highlight-overlays 0)
- 'face 'highlight)
+(overlay-put (aref reftex-highlight-overlays 0)
+ 'face 'highlight)
(aset reftex-highlight-overlays 1 (make-overlay 1 1))
(overlay-put (aref reftex-highlight-overlays 1)
- 'face reftex-cursor-selected-face)
+ 'face reftex-cursor-selected-face)
(aset reftex-highlight-overlays 2 (make-overlay 1 1))
(overlay-put (aref reftex-highlight-overlays 2)
- 'face reftex-cursor-selected-face)
+ 'face reftex-cursor-selected-face)
;; Two functions for activating and deactivation highlight overlays
(defun reftex-highlight (index begin end &optional buffer)
;;; =========================================================================
;;;
-;;; Keybindings
+;;; Keybindings
;; The default bindings in the mode map.
(loop for x in
'(("\C-c=" . reftex-toc)
- ("\C-c-" . reftex-toc-recenter)
- ("\C-c(" . reftex-label)
- ("\C-c)" . reftex-reference)
- ("\C-c[" . reftex-citation)
- ("\C-c<" . reftex-index)
- ("\C-c>" . reftex-display-index)
- ("\C-c/" . reftex-index-selection-or-word)
- ("\C-c\\" . reftex-index-phrase-selection-or-word)
- ("\C-c|" . reftex-index-visit-phrases-buffer)
- ("\C-c&" . reftex-view-crossref))
+ ("\C-c-" . reftex-toc-recenter)
+ ("\C-c(" . reftex-label)
+ ("\C-c)" . reftex-reference)
+ ("\C-c[" . reftex-citation)
+ ("\C-c<" . reftex-index)
+ ("\C-c>" . reftex-display-index)
+ ("\C-c/" . reftex-index-selection-or-word)
+ ("\C-c\\" . reftex-index-phrase-selection-or-word)
+ ("\C-c|" . reftex-index-visit-phrases-buffer)
+ ("\C-c&" . reftex-view-crossref))
do (define-key reftex-mode-map (car x) (cdr x)))
;; Bind `reftex-mouse-view-crossref' only when the key is still free
(if (featurep 'xemacs)
(unless (key-binding [(shift button2)])
- (define-key reftex-mode-map [(shift button2)]
- 'reftex-mouse-view-crossref))
+ (define-key reftex-mode-map [(shift button2)]
+ 'reftex-mouse-view-crossref))
(unless (key-binding [(shift mouse-2)])
- (define-key reftex-mode-map [(shift mouse-2)]
+ (define-key reftex-mode-map [(shift mouse-2)]
'reftex-mouse-view-crossref)))
;; Bind `reftex-view-crossref-from-bibtex' in BibTeX mode map
;; If the user requests so, she can have a few more bindings:
(when reftex-extra-bindings
(loop for x in
- '(("\C-ct" . reftex-toc)
- ("\C-cl" . reftex-label)
- ("\C-cr" . reftex-reference)
- ("\C-cc" . reftex-citation)
- ("\C-cv" . reftex-view-crossref)
- ("\C-cg" . reftex-grep-document)
- ("\C-cs" . reftex-search-document))
- do (define-key reftex-mode-map (car x) (cdr x))))
+ '(("\C-ct" . reftex-toc)
+ ("\C-cl" . reftex-label)
+ ("\C-cr" . reftex-reference)
+ ("\C-cc" . reftex-citation)
+ ("\C-cv" . reftex-view-crossref)
+ ("\C-cg" . reftex-grep-document)
+ ("\C-cs" . reftex-search-document))
+ do (define-key reftex-mode-map (car x) (cdr x))))
;;; =========================================================================
;;;
:style toggle :selected reftex-plug-into-AUCTeX])
("Reference Style"
["Default" (setq reftex-vref-is-default nil
- reftex-fref-is-default nil)
- :style radio :selected (not (or reftex-vref-is-default
- reftex-fref-is-default))]
+ reftex-fref-is-default nil)
+ :style radio :selected (not (or reftex-vref-is-default
+ reftex-fref-is-default))]
["Varioref" (setq reftex-vref-is-default t
- reftex-fref-is-default nil)
+ reftex-fref-is-default nil)
:style radio :selected reftex-vref-is-default]
["Fancyref" (setq reftex-fref-is-default t
- reftex-vref-is-default nil)
+ reftex-vref-is-default nil)
:style radio :selected reftex-fref-is-default])
("Citation Style"
,@(mapcar
(lambda (x)
- (vector
- (capitalize (symbol-name (car x)))
- (list 'reftex-set-cite-format (list 'quote (car x)))
- :style 'radio :selected
- (list 'eq (list 'reftex-get-cite-format) (list 'quote (car x)))))
+ (vector
+ (capitalize (symbol-name (car x)))
+ (list 'reftex-set-cite-format (list 'quote (car x)))
+ :style 'radio :selected
+ (list 'eq (list 'reftex-get-cite-format) (list 'quote (car x)))))
reftex-cite-format-builtin)
"--"
"Sort Database Matches"
("Index Style"
,@(mapcar
(lambda (x)
- (vector
- (capitalize (symbol-name (car x)))
- (list 'reftex-add-index-macros (list 'list (list 'quote (car x))))
- :style 'radio :selected
- (list 'memq (list 'quote (car x))
- (list 'get 'reftex-docstruct-symbol
- (list 'quote 'reftex-index-macros-style)))))
+ (vector
+ (capitalize (symbol-name (car x)))
+ (list 'reftex-add-index-macros (list 'list (list 'quote (car x))))
+ :style 'radio :selected
+ (list 'memq (list 'quote (car x))
+ (list 'get 'reftex-docstruct-symbol
+ (list 'quote 'reftex-index-macros-style)))))
reftex-index-macros-builtin))
"--"
["Reset RefTeX Mode" reftex-reset-mode t]
("Customize"
["Browse RefTeX Group" reftex-customize t]
"--"
- ["Build Full Customize Menu" reftex-create-customize-menu
+ ["Build Full Customize Menu" reftex-create-customize-menu
(fboundp 'customize-menu-create)])
("Documentation"
["Info" reftex-info t]
(interactive)
(if (fboundp 'customize-menu-create)
(progn
- (easy-menu-change
- '("Ref") "Customize"
- `(["Browse RefTeX group" reftex-customize t]
- "--"
- ,(customize-menu-create 'reftex)
- ["Set" Custom-set t]
- ["Save" Custom-save t]
- ["Reset to Current" Custom-reset-current t]
- ["Reset to Saved" Custom-reset-saved t]
- ["Reset to Standard Settings" Custom-reset-standard t]))
- (message "\"Ref\"-menu now contains full customization menu"))
+ (easy-menu-change
+ '("Ref") "Customize"
+ `(["Browse RefTeX group" reftex-customize t]
+ "--"
+ ,(customize-menu-create 'reftex)
+ ["Set" Custom-set t]
+ ["Save" Custom-save t]
+ ["Reset to Current" Custom-reset-current t]
+ ["Reset to Saved" Custom-reset-saved t]
+ ["Reset to Standard Settings" Custom-reset-standard t]))
+ (message "\"Ref\"-menu now contains full customization menu"))
(error "Cannot expand menu (outdated version of cus-edit.el)")))
(defun reftex-show-commentary ()
;;; That's it! ----------------------------------------------------------------
(setq reftex-tables-dirty t) ; in case this file is evaluated by hand
-(provide 'reftex)
+(provide 'reftex)
;;;============================================================================
-;;; arch-tag: 49e0da4e-bd5e-4cfc-a717-fb444fccb9e6
;;; reftex.el ends here
(provide 'sgml-mode)
-;;; arch-tag: 9675da94-b7f9-4bda-ad19-73ed7b4fb401
;;; sgml-mode.el ends here
(provide 'spell)
-;;; arch-tag: 7eabb848-9c76-431a-bcdb-0e0592d2db04
;;; spell.el ends here
;; End: ***
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; arch-tag: 0d69b03e-aa5f-4e72-8806-5727217617e0
;;; table.el ends here
:group 'tex-view)
;;;###autoload
-(defcustom tex-dvi-view-command '(if (eq window-system 'x) "xdvi" "dvi2tty * | cat -s")
+(defcustom tex-dvi-view-command '(if (eq window-system 'x) \"xdvi\" \"dvi2tty * | cat -s\")
"*Command used by \\[tex-view] to display a `.dvi' file.
If it is a string, that specifies the command directly.
If this string contains an asterisk (`*'), that is replaced by the file name;
(provide 'tex-mode)
-;;; arch-tag: c0a680b1-63aa-4547-84b9-4193c29c0080
;;; tex-mode.el ends here
;;; Place `provide' at end of file.
(provide 'texinfmt)
-;;; arch-tag: 1e8d9a2d-bca0-40a0-ac6c-dab01bc6f725
;;; texinfmt.el ends here
(provide 'texinfo)
-;;; arch-tag: 005d7c38-43b9-4b7d-aa1d-aea69bae73e1
;;; texinfo.el ends here
;; Place `provide' at end of file.
(provide 'texnfo-upd)
-;;; arch-tag: d21613a5-c32f-43f4-8af4-bfb1e7455842
;;; texnfo-upd.el ends here
(setq nlines (1+ nlines))
(forward-line -1)))))
-;;; arch-tag: a07ccaad-da13-4d7b-9c61-cd04f5926aab
;;; text-mode.el ends here
;; coding: iso-latin-2
;; End:
-;;; arch-tag: fc9b05a6-7355-4639-8170-dcf57853ba22
;;; tildify.el ends here
(provide 'two-column)
-;;; arch-tag: 2021b5ab-d3a4-4a8c-a21c-1936b0f9e6b1
;;; two-column.el ends here
(provide 'underline)
-;;; arch-tag: e7b48582-c3ea-4386-987a-87415f3c372a
;;; underline.el ends here
;;;###autoload
(defun list-at-point () (form-at-point 'list 'listp))
-;;; arch-tag: bb65a163-dae2-4055-aedc-fe11f497f698
;;; thingatpt.el ends here
(provide 'time-stamp)
-;;; arch-tag: 8a12c5c3-25d6-4a71-adc5-24b0e025a1e7
;;; time-stamp.el ends here
(provide 'time)
-;;; arch-tag: b9c1623f-b5cb-48e4-b650-482a4d23c5a6
;;; time.el ends here
(provide 'timezone)
-;;; arch-tag: e23d5bc6-f32d-48ba-8996-323e9d654b3f
;;; timezone.el ends here
(provide 'tmm)
-;;; arch-tag: e7ddbdb6-4b95-4da3-afbe-ad6063d112f4
;;; tmm.el ends here
+++ /dev/null
-/* XPM */
-static char * display_xpm[] = {
-"24 24 2 1",
-" c #C0C0C0C0C0C0",
-". c #000000000000",
-" ",
-" ",
-" ",
-" ",
-" ... ",
-" .. ",
-" .. ",
-" .. ",
-" ..... ",
-" .. .. ",
-" .. .. ",
-" .. .. ",
-" .. .. ",
-" .. .. ",
-" .. .. ",
-" .. .. ",
-" ...... ",
-" ",
-" ",
-" ",
-" ",
-" ",
-" ",
-" "};
+++ /dev/null
-/* XPM */
-static char * next_xpm[] = {
-"24 24 7 1",
-" c #c0c0c0",
-". c #cc0033",
-"X c #616161",
-"o c #2a1f55",
-"O c #adadad",
-"+ c #d40000",
-"@ c #cc9999",
-" ",
-" ",
-" ",
-" ",
-" .......... ",
-" . . ",
-" . . ",
-" . Xo oX . ",
-" . XoO OoX . ",
-" . oo oo +@.@+ ",
-" oo oo @...@ ",
-" oo oo ... ",
-" oX Xo @.@ ",
-" oo oo . ",
-" oX Xo ",
-" oo oo ",
-" oo oo ",
-" oo oo ",
-" XoO OoX ",
-" Xo oX ",
-" ",
-" ",
-" ",
-" "};
+++ /dev/null
-/* XPM */
-static char * gud_nexti_xpm[] = {
-"24 24 6 1",
-" c #C0C0C0C0C0C0",
-". c #CCCC00003333",
-"X c #616161616161",
-"o c #D4D400000000",
-"O c #CCCC99999999",
-"+ c #2A2A1F1F5555",
-" ",
-" ",
-" ",
-" ",
-" .......... ",
-" . . ",
-" . . ",
-" . . ",
-" . . ",
-" . X X oO.Oo ",
-" X+ +X O...O ",
-" X+ +X ... ",
-" X+ +X O.O ",
-" X+ +X . ",
-" +X X+ ",
-" +X X+ ",
-" +X X+ ",
-" +X X+ ",
-" + + ",
-" ",
-" ",
-" ",
-" ",
-" "};
+++ /dev/null
-/* XPM */
-static char * step_xpm[] = {
-"24 24 6 1",
-" c #c0c0c0",
-". c #d40000",
-"X c #616161",
-"o c #2a1f55",
-"O c #adadad",
-"+ c #cc9999",
-" ",
-" ",
-" ",
-" ",
-" ..... ",
-" . . ",
-" . . ",
-" . Xo . oX ",
-" . XoO . OoX ",
-" . oo .+.+. oo ",
-" oo +...+ oo ",
-" oo ... oo ",
-" oX +.+ Xo ",
-" oo . oo ",
-" oX Xo ",
-" oo oo ",
-" oo oo ",
-" oo oo ",
-" XoO OoX ",
-" Xo oX ",
-" ",
-" ",
-" ",
-" "};
+++ /dev/null
-/* XPM */
-static char * gud_stepi_xpm[] = {
-"24 24 5 1",
-" c #C0C0C0C0C0C0",
-". c #D4D400000000",
-"X c #616161616161",
-"o c #2A2A1F1F5555",
-"O c #CCCC99999999",
-" ",
-" ",
-" ",
-" ",
-" ..... ",
-" . . ",
-" . . ",
-" . . ",
-" . X . X ",
-" . Xo .O.O. oX ",
-" Xo O...O oX ",
-" Xo ... oX ",
-" Xo O.O oX ",
-" oX . Xo ",
-" oX Xo ",
-" oX Xo ",
-" oX Xo ",
-" o o ",
-" ",
-" ",
-" ",
-" ",
-" ",
-" "};
(provide 'tool-bar)
-;;; arch-tag: 15f30f0a-d0d7-4d50-bbb7-f48fd0c8582f
;;; tool-bar.el ends here
(provide 'tooltip)
-;;; arch-tag: 3d61135e-4618-4a78-af28-183f6df5636f
;;; tooltip.el ends here
;; Status: Works in GNU Emacs 19.25 or later, some versions of XEmacs
;; Created: 1994-07-13
-;; $Id: type-break.el,v 1.28 2003/05/28 11:25:44 rms Exp $
+;; $Id: type-break.el,v 1.27 2003/05/06 17:50:17 lektu Exp $
;; This file is part of GNU Emacs.
(if type-break-mode
(type-break-mode 1))
-;;; arch-tag: 943a2eb3-07e6-420b-993f-96e4796f5fd0
;;; type-break.el ends here
(add-hook 'kill-buffer-hook 'uniquify-maybe-rerationalize-w/o-cb)
(provide 'uniquify)
-
-;;; arch-tag: e763faa3-56c9-4903-8eb8-26e1c45a0065
;;; uniquify.el ends here
(set-buffer standard-output)
(help-mode))))
-;;; arch-tag: a61c5b60-e1c8-44fd-894a-c617f4dfc639
;;; userlock.el ends here
;; Author: FSF (see vc.el for full credits)
;; Maintainer: Andre Spiegel <spiegel@gnu.org>
-;; $Id: vc-cvs.el,v 1.62 2003/07/04 22:40:26 monnier Exp $
+;; $Id: vc-cvs.el,v 1.61 2003/05/23 17:57:29 spiegel Exp $
;; This file is part of GNU Emacs.
(provide 'vc-cvs)
-;;; arch-tag: 60e1402a-aa53-4607-927a-cf74f144b432
;;; vc-cvs.el ends here
;; Author: FSF (see vc.el for full credits)
;; Maintainer: Andre Spiegel <spiegel@gnu.org>
-;; $Id: vc-hooks.el,v 1.159 2003/08/30 10:56:38 eliz Exp $
+;; $Id: vc-hooks.el,v 1.155 2003/07/26 15:54:53 rost Exp $
;; This file is part of GNU Emacs.
;; Customization Variables (the rest is in vc.el)
(defvar vc-ignore-vc-files nil)
-(make-obsolete-variable 'vc-ignore-vc-files
- "set `vc-handled-backends' to nil to disable VC.")
-
+(make-obsolete-variable 'vc-ignore-vc-files 'vc-handled-backends)
(defvar vc-master-templates ())
-(make-obsolete-variable 'vc-master-templates
- "to define master templates for a given BACKEND, use
-vc-BACKEND-master-templates. To enable or disable VC for a given
-BACKEND, use `vc-handled-backends'.")
-
+(make-obsolete-variable 'vc-master-templates 'vc-BACKEND-master-templates)
(defvar vc-header-alist ())
(make-obsolete-variable 'vc-header-alist 'vc-BACKEND-header)
"Make a backup copy of FILE, which is assumed in sync with the repository.
Before doing that, check if there are any old backups and get rid of them."
(unless (and (fboundp 'msdos-long-file-names)
- (not (with-no-warnings (msdos-long-file-names))))
+ (not (with-no-warnings msdos-long-file-names)))
(vc-delete-automatic-version-backups file)
(copy-file file (vc-version-backup-file-name file)
nil 'keep-date)))
(provide 'vc-hooks)
-;;; arch-tag: 2e5a6fa7-1d30-48e2-8bd0-e3d335f04f32
;;; vc-hooks.el ends here
(defalias 'vc-mcvs-valid-version-number-p 'vc-cvs-valid-version-number-p)
(provide 'vc-mcvs)
-
-;;; arch-tag: a39c7c1c-5247-429d-88df-dd7187d2e704
;;; vc-mcvs.el ends here
;; Author: FSF (see vc.el for full credits)
;; Maintainer: Andre Spiegel <spiegel@gnu.org>
-;; $Id: vc-rcs.el,v 1.37 2003/05/08 19:24:56 monnier Exp $
+;; $Id: vc-rcs.el,v 1.36 2003/02/04 12:11:40 lektu Exp $
;; This file is part of GNU Emacs.
(provide 'vc-rcs)
-;;; arch-tag: 759b4916-5b0d-431d-b647-b185b8c652cf
;;; vc-rcs.el ends here
;; Author: FSF (see vc.el for full credits)
;; Maintainer: Andre Spiegel <spiegel@gnu.org>
-;; $Id: vc-sccs.el,v 1.23 2003/08/12 18:01:21 spiegel Exp $
+;; $Id: vc-sccs.el,v 1.21 2003/02/04 12:11:54 lektu Exp $
;; This file is part of GNU Emacs.
(if (file-ownership-preserved-p file)
'edited
(vc-user-login-name owner-uid))
- ;; Strange permissions.
- ;; Fall through to real state computation.
- (vc-sccs-state file))))
- (vc-sccs-state file)))
+ ;; Strange permissions.
+ ;; Fall through to real state computation.
+ (vc-sccs-state file)))
+ (vc-sccs-state file))))
(defun vc-sccs-workfile-version (file)
"SCCS-specific version of `vc-workfile-version'."
(with-temp-buffer
- ;; The workfile version is always the latest version number.
- ;; To find this number, search the entire delta table,
- ;; rather than just the first entry, because the
- ;; first entry might be a deleted ("R") version.
- (vc-insert-file (vc-name file) "^\001e\n\001[^s]")
+ (vc-insert-file (vc-name file) "^\001e")
(vc-parse-buffer "^\001d D \\([^ ]+\\)" 1)))
(defun vc-sccs-checkout-model (file)
(provide 'vc-sccs)
-;;; arch-tag: d751dee3-d7b3-47e1-95e3-7ae98c052041
;;; vc-sccs.el ends here
(provide 'vc-svn)
-;;; arch-tag: 02f10c68-2b4d-453a-90fc-1eee6cfb268d
;;; vc-svn.el ends here
;; Maintainer: Andre Spiegel <spiegel@gnu.org>
;; Keywords: tools
-;; $Id: vc.el,v 1.359 2003/07/06 19:08:13 jpw Exp $
+;; $Id: vc.el,v 1.358 2003/07/06 17:28:12 monnier Exp $
;; This file is part of GNU Emacs.
;;
;; Thus, there is no explicit recovery code.
-;;; arch-tag: ca82c1de-3091-4e26-af92-460abc6213a6
;;; vc.el ends here
(provide 'vcursor)
-;;; arch-tag: cdfe1cdc-2c46-4046-88e4-ed57d20f7aca
;;; vcursor.el ends here
(cond ((featurep 'motif)
(concat ", " (substring motif-version-string 4)))
((featurep 'x-toolkit) ", X toolkit")
- ((featurep 'gtk)
- (concat ", GTK+ Version " gtk-version-string))
(t ""))
(if (and (boundp 'x-toolkit-scroll-bars)
(memq x-toolkit-scroll-bars '(xaw xaw3d)))
;;version-control: never
;;End:
-;;; arch-tag: e60dc445-6218-4a4c-a7df-f15a818642a0
;;; version.el ends here
(provide 'view)
-;;; arch-tag: 6d0ace36-1d12-4de3-8de3-1fa3231636d7
;;; view.el ends here
All other Emacs commands are still available."
t)
-;;; arch-tag: c178494e-2c37-4d02-99b7-e47e615656cf
;;; vms-patch.el ends here
(define-key esc-map "$" 'subprocess-command)
-;;; arch-tag: 600b2512-f903-4887-bcd2-e76b306f5b66
;;; vmsproc.el ends here
(provide 'vt-control)
-;;; arch-tag: d4fed1bf-2524-4ba1-a4fe-86bca3d928a2
;;; vt-control.el ends here
(provide 'vt100-led)
-;;; arch-tag: 346e6480-5e31-4234-aafe-257cea4a36d1
;;; vt100-led.el ends here
(setq interprogram-paste-function 'x-get-selection-value)
-;;; arch-tag: c49b48cc-0f4f-454f-a274-c2dc34815e14
;;; w32-fns.el ends here
:group 'killing)
-;;; arch-tag: ee2394fb-9db7-4c15-a8f0-66b47f4a2bb1
;;; w32-vars.el ends here
;; Author: Rajesh Vaidheeswarran <rv@gnu.org>
;; Keywords: convenience
-;; $Id: whitespace.el,v 1.25 2003/06/11 04:00:33 rv Exp $
+;; $Id: whitespace.el,v 1.24 2003/06/11 03:50:45 rv Exp $
;; This file is part of GNU Emacs.
;; GNU Emacs is free software; you can redistribute it and/or modify
(remove-hook 'kill-buffer-hook 'whitespace-buffer))
(provide 'whitespace)
-
-;;; arch-tag: 4ff44e87-b63c-402d-95a6-15e51e58bd0c
;;; whitespace.el ends here
(provide 'wid-browse)
-;;; arch-tag: d5ffb18f-8984-4735-8502-edf70456db21
;;; wid-browse.el ends here
(help-echo (and widget (widget-get widget :help-echo))))
(if (functionp help-echo)
(setq help-echo (funcall help-echo widget)))
- (if help-echo (message "%s" (eval help-echo)))))
+ (if (stringp help-echo)
+ (message "%s" help-echo))))
;;; The End:
(provide 'wid-edit)
-;;; arch-tag: a076e75e-18a1-4b46-8be5-3f317bcbc707
;;; wid-edit.el ends here
(provide 'widget)
-;;; arch-tag: 932c71a3-9aeb-4827-a293-8b88b26d5c58
;;; widget.el ends here
(provide 'windmove)
-;;; arch-tag: 56267432-bf1a-4296-a9a0-85c6bd9f2375
;;; windmove.el ends here
(define-key ctl-x-map "+" 'balance-windows)
(define-key ctl-x-4-map "0" 'kill-buffer-and-window)
-;;; arch-tag: b508dfcc-c353-4c37-89fa-e773fe10cea9
;;; window.el ends here
(provide 'winner)
-;;; arch-tag: 686d1c1b-010e-42ca-a192-b5685112418f
;;; winner.el ends here
(provide 'woman)
-;;; arch-tag: eea35e90-552f-4712-a94b-d9ffd3db7651
;;; woman.el ends here
(provide 'xml)
-;;; arch-tag: 5864b283-5a68-4b59-a20d-36a72b353b9b
;;; xml.el ends here
(provide 'xt-mouse)
-;;; arch-tag: 84962d4e-fae9-4c13-a9d7-ef4925a4ac03
;;; xt-mouse.el ends here
-2003-09-03 Peter Runestig <peter@runestig.com>
-
- * makefile.w32-in: New file.
-
2001-11-29 Eli Zaretskii <eliz@is.elta.co.il>
* emacs-lisp-intro.texi (Index): @ignore extraneous text.
* *.eps: Rename to avoid clashes in DOS 8+3 namespace.
;; Local Variables:
-;; coding: iso-2022-7bit
+;; coding: iso-2022-7bit-unix
;; End:
Copyright (C) 2001
Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted provided the copyright notice and this notice are preserved.
-
-;;; arch-tag: ee4f8e1f-e14c-4d2e-86de-4dd697e6f1c3
EXTRA_DIST = INSTALL MANIFEST README drawers.eps \
cons-1.eps cons-2.eps cons-2a.eps cons-3.eps \
cons-4.eps cons-5.eps lambda-1.eps lambda-2.eps lambda-3.eps
-
-# arch-tag: 6a3e6d99-7aa2-479f-939c-5531165c5747
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
-
-# arch-tag: eb660994-cd29-4ab8-8043-5042e2dbde84
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
-
-# arch-tag: f1a44ea0-b792-4ac7-be28-9626b972c216
AC_INIT(emacs-lisp-intro.texi)
AM_INIT_AUTOMAKE(emacs-lisp-intro, 2.00)
AC_OUTPUT(Makefile)
-
-m4_if(dnl Do not change this comment
- arch-tag: 8d676bd8-8677-4ae0-8aa0-99bfd595b373
-)dnl
@end iftex
@bye
-
-@ignore
- arch-tag: da1a2154-531f-43a8-8e33-fc7faad10acf
-@end ignore
+++ /dev/null
-#### Makefile for the Emacs Lisp Introduction manual
-
-# Copyright (C) 2003 Free Software Foundation, Inc.
-
-# This file is part of GNU Emacs.
-
-# GNU Emacs is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# GNU Emacs is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with GNU Emacs; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
-srcdir = .
-
-infodir = $(srcdir)/../info
-
-INFO_SOURCES = $(srcdir)/emacs-lisp-intro.texi
-# The file name eintr must fit within 5 characters, to allow for
-# -NN extensions to fit into DOS 8+3 limits without clashing
-INFO_TARGETS = $(infodir)/eintr
-DVI_TARGETS = emacs-lisp-intro.dvi
-
-MAKEINFO = makeinfo
-INSTALL_INFO = install-info
-TEXI2DVI = texi2dvi
-DVIPS = dvips
-ENVADD = $(srcdir)\..\nt\envadd.bat "TEXINPUTS=$(srcdir);$(TEXINPUTS)" \
- "MAKEINFO=$(MAKEINFO) -I$(srcdir)" /C
-
-.SUFFIXES: .dvi .ps .texi
-
-info: $(INFO_TARGETS)
- $(INSTALL_INFO) --info-dir=$(infodir) $(INFO_TARGETS)
-
-dvi: $(DVI_TARGETS)
-
-$(infodir)/eintr: $(INFO_SOURCES)
- $(MAKEINFO) -o $@ $(srcdir)/emacs-lisp-intro.texi
-
-emacs-lisp-intro.dvi: $(INFO_SOURCES)
- $(ENVADD) $(TEXI2DVI) $(srcdir)/emacs-lisp-intro.texi
-
-emacs-lisp-intro.html: $(INFO_SOURCES)
- $(MAKEINFO) --html -o $@ $(srcdir)/emacs-lisp-intro.texi
-
-.dvi.ps:
- $(DVIPS) $< -o $@
-
-mostlyclean:
- rm -f *.log *.cp *.fn *.ky *.pg *.vr *.tp
-
-clean: mostlyclean
- rm -f *.dvi $(infodir)/eintr*
-
-distclean: clean
-
-maintainer-clean: distclean
- rm -f *.aux *.cps *.fns *.kys *.pgs *.vrs *.toc
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
-
-# arch-tag: d713164a-e683-4ce3-a39e-3bf82f2f82f4
@c time-stamp-format: "%:y-%02m-%02d.%02H"
@c time-stamp-end: "}"
@c End:
-
-% arch-tag: 53261dd3-7df7-4ec3-9d90-af7a955d3c87
-2003-09-03 Peter Runestig <peter@runestig.com>
-
- * makefile.w32-in: New file.
-
-2003-08-29 Richard M. Stallman <rms@gnu.org>
-
- * display.texi (Overlay Properties): Clarify how priorities
- affect use of the properties.
-
-2003-08-19 Luc Teirlinck <teirllm@mail.auburn.edu>
-
- * customize.texi (Type Keywords): Correct the description of
- `:help-echo' in the case where `motion-doc' is a function.
-
-2003-08-14 John Paul Wallington <jpw@gnu.org>
-
- * modes.texi (Emulating Mode Line): Subsection, not section.
-
-2003-08-13 Richard M. Stallman <rms@gnu.org>
-
- * elisp.texi (Top): Update subnode lists in menu.
-
- * text.texi (Insertion): Add insert-buffer-substring-no-properties.
- (Kill Functions): kill-region has new arg yank-handler.
- (Yanking): New node.
- (Yank Commands): Add yank-undo-function.
- (Low-Level Kill Ring):
- kill-new and kill-append have new arg yank-handler.
- (Changing Properties): Add remove-list-of-text-properties.
- (Atomic Changes): New node.
-
- * symbols.texi (Other Plists): Add lax-plist-get, lax-plist-put.
-
- * streams.texi (Output Variables): Add eval-expression-print-length
- and eval-expression-print-level.
-
- * os.texi (Time Conversion): For encode-time, explain limits on year.
-
- * objects.texi (Character Type): Define anchor "modifier bits".
-
- * modes.texi (Emulating Mode Line): New node.
- (Search-based Fontification): Font Lock uses font-lock-face property.
- (Other Font Lock Variables): Likewise.
-
- * keymaps.texi (Format of Keymaps): Keymaps contain char tables,
- not vectors.
- (Active Keymaps): Add emulation-mode-map-alists.
- (Functions for Key Lookup): key-binding has new arg no-remap.
- (Remapping Commands): New node.
- (Scanning Keymaps): where-is-internal has new arg no-remap.
- (Tool Bar): Add tool-bar-local-item-from-menu.
- Clarify when to use tool-bar-add-item-from-menu.
-
- * commands.texi (Interactive Call): commandp has new arg.
- (Command Loop Info): Add this-original-command.
-
-2003-08-06 John Paul Wallington <jpw@gnu.org>
-
- * compile.texi (Compiler Errors): Say `@end defmac' after `@defmac'.
-
- * display.texi (Warning Basics): Fix typo.
- (Fringes): Add closing curly bracket and fix typo.
-
- * elisp.texi (Top): Fix typo.
-
-2003-08-05 Richard M. Stallman <rms@gnu.org>
-
- * elisp.texi: Update lists of subnodes.
-
- * windows.texi (Buffers and Windows): set-window-buffer has new arg.
-
- * variables.texi (Local Variables): Use lc for example variable names.
-
- * tips.texi (Library Headers): Explain where to put -*-.
-
- * strings.texi (Creating Strings): Fix xref for vconcat.
-
- * sequences.texi (Vector Functions):
- vconcat no longer allows integer args.
-
- * minibuf.texi (Reading File Names): read-file-name has new
- arg PREDICATE. New function read-directory-name.
-
- * macros.texi (Defining Macros): Give definition of `declare'
- (Indenting Macros): New node.
-
- * frames.texi (Parameter Access): Add modify-all-frames-parameters.
- (Window Frame Parameters): Make separate table of parameters
- that are coupled with specific face attributes.
- (Deleting Frames): delete-frame-hooks renamed to
- delete-frame-functions.
-
- * files.texi (Magic File Names): Add file-remote-p.
- Clarify file-local-copy.
-
- * edebug.texi (Instrumenting Macro Calls): Don't define `declare'
- here; instead xref Defining Macros.
-
- * display.texi (Warnings): New node, and subnodes.
- (Fringes): New node.
-
- * debugging.texi (Test Coverage): New node.
-
- * compile.texi (Compiler Errors): Explain with-no-warnings
- and other ways to suppress warnings.
-
- * commands.texi (Interactive Call): Minor clarification.
-
- * buffers.texi (Buffer File Name): set-visited-file-name
- renames the buffer too.
-
- * abbrevs.texi (Abbrev Tables): Add copy-abbrev-table.
-
2003-07-24 Markus Rost <rost@math.ohio-state.edu>
* abbrevs.texi (Abbrev Expansion): Use \s syntax in example.
for the Project GNU development environment.
;; Local Variables:
-;; coding: iso-2022-7bit
+;; coding: iso-2022-7bit-unix
;; End:
Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted provided the copyright notice and this notice are preserved.
-
-;;; arch-tag: 985ae0ce-df29-475b-b3f8-4bbcbf6f7fda
(cd temp/$(manual); rm -f *~)
(cd temp; tar chf - $(manual)) | gzip > $(manual).tar.gz
-rm -rf temp
-
-# arch-tag: f5a1a94d-62e1-4460-a2d1-f02e538ab554
leaving it empty. It always returns @code{nil}.
@end defun
-@defun copy-abbrev-table table
-This function returns a copy of abbrev table @var{table}---a new
-abbrev table that contains the same abbrev definitions.
-@end defun
-
@defun define-abbrev-table tabname definitions
This function defines @var{tabname} (a symbol) as an abbrev table
name, i.e., as a variable whose value is an abbrev table. It defines
This is the local abbrev table used in Lisp mode and Emacs Lisp mode.
@end defvar
-@ignore
- arch-tag: 5ffdbe08-2cd4-48ec-a5a8-080f95756eec
-@end ignore
executed even if some previous piece of advice had an error or a
non-local exit. If any around-advice is protected, then the whole
around-advice onion is protected as a result.
-
-@ignore
- arch-tag: 80c135c2-f1c3-4f8d-aa85-f8d8770d307f
-@end ignore
@code{file-attributes} returns the file size and the file inode number
only as a simple integer.
@end itemize
-
-@ignore
- arch-tag: 1d0ef137-2bad-430e-ae8e-d820d569b5a6
-@end ignore
@hfil
@bye
-
-@ignore
- arch-tag: ac7694c8-1f02-4b42-9531-33ba13b179e1
-@end ignore
the modified contents---but only if @code{revert-buffer-function} is
@code{nil}.
@end defvar
-
-@ignore
- arch-tag: 295a6321-e5ab-46d5-aef5-0bb4f447a67f
-@end ignore
@sp 5
@center Free Software Foundation
@bye
-
-@ignore
- arch-tag: 4466c7ca-e549-4119-948c-6eed34e1ff87
-@end ignore
If @var{filename} is a non-empty string, this function changes the
name of the file visited in the current buffer to @var{filename}. (If the
buffer had no visited file, this gives it one.) The @emph{next time}
-the buffer is saved it will go in the newly-specified file.
-
-This command marks the buffer as modified, since it does not (as far
-as Emacs knows) match the contents of @var{filename}, even if it
-matched the former visited file. It also renames the buffer to
-correspond to the new file name, unless the new name is already in
-use.
+the buffer is saved it will go in the newly-specified file. This
+command marks the buffer as modified, since it does not (as far as Emacs
+knows) match the contents of @var{filename}, even if it matched the
+former visited file.
If @var{filename} is @code{nil} or the empty string, that stands for
``no visited file''. In this case, @code{set-visited-file-name} marks
@defun gap-size
This function returns the current gap size of the current buffer.
@end defun
-
-@ignore
- arch-tag: 2e53cfab-5691-41f6-b5a8-9c6a3462399c
-@end ignore
The number of seconds to display an appointment message. The default
is 5 seconds.
@end table
-
-@ignore
- arch-tag: 8e50c766-4703-4888-a421-af15244cca7e
-@end ignore
@code{call-interactively}, which reads the arguments and calls the
command. You can also call these functions yourself.
-@defun commandp object &optional for-call-interactively
+@defun commandp object
Returns @code{t} if @var{object} is suitable for calling interactively;
that is, if @var{object} is a command. Otherwise, returns @code{nil}.
(non-@code{nil} fourth argument to @code{autoload}), and some of the
primitive functions.
-A symbol satisfies @code{commandp} if its function definition
-satisfies @code{commandp}. Keys and keymaps are not commands.
-Rather, they are used to look up commands (@pxref{Keymaps}).
+A symbol satisfies @code{commandp} if its function definition satisfies
+@code{commandp}.
-If @var{for-call-interactively} is non-@code{nil}, then
-@code{commandp} returns @code{t} only for objects that
-@code{call-interactively} could call---thus, not for keyboard macros.
+Keys and keymaps are not commands. Rather, they are used to look up
+commands (@pxref{Keymaps}).
See @code{documentation} in @ref{Accessing Documentation}, for a
realistic example of using @code{commandp}.
(message "foo")))
@end example
-@noindent
-Defined in this way, the function does display the message when
-called from a keyboard macro.
-
The numeric prefix argument, provided by @samp{p}, is never @code{nil}.
@node Command Loop Info
restore the old value in case of error---a feature of @code{let} which
in this case does precisely what we want to avoid.
-@defvar this-original-command
-This has the same value as @code{this-command} except when command
-remapping occurs (@pxref{Remapping Commands}). In that case,
-@code{this-command} gives the command actually run (the result of
-remapping), and @code{this-original-command} gives the command that
-was specified to run but remapped into another command.
-@end defvar
-
@defun this-command-keys
This function returns a string or vector containing the key sequence
that invoked the present command, plus any previous commands that
macro terminates, regardless of what caused it to terminate (reaching
the macro end or an error which ended the macro prematurely).
@end defvar
-
-@ignore
- arch-tag: e34944ad-7d5c-4980-be00-36a5fe54d4b1
-@end ignore
commands won't find the places they are really used. To do that,
you must search for the function names.
- You can suppress the compiler warning for calling an undefined
-function @var{func} by conditionalizing the function call on a
-@code{fboundp} test, like this:
-
-@example
-(if (fboundp '@var{func}) ...(@var{func} ...)...)
-@end example
-
-@noindent
-The call to @var{func} must be in the @var{then-form} of the @code{if},
-and @var{func} must appear quoted in the call to @code{fboundp}.
-Likewise, you can suppress a compiler warning for an unbound variable
-@var{variable} by conditionalizing its use on a @code{boundp} test,
-like this:
-
-@example
-(if (boundp '@var{variable}) ...@var{variable}...)
-@end example
-
-@noindent
-The reference to @var{variable} must be in the @var{then-form} of the
-@code{if}, and @var{variable} must appear quoted in the call to
-@code{boundp}.
-
- You can suppress any compiler warnings using the construct
-@code{with-no-warnings}:
-
-@defmac with-no-warnings body...
-In execution, this is equivalent to @code{(progn @var{body}...)},
-but the compiler does not issue warnings for anything that occurs
-inside @var{body}.
-
-We recommend that you use this construct around the smallest
-possible piece of code.
-@end defmac
-
@node Byte-Code Objects
@section Byte-Code Function Objects
@cindex compiled function
@end example
-@ignore
- arch-tag: f78e3050-2f0a-4dee-be27-d9979a0a2289
-@end ignore
dnl Process this file with autoconf to produce a configure script.
AC_INIT(elisp.texi)
AC_OUTPUT(Makefile)
-
-m4_if(dnl Do not change this comment
- arch-tag: 61db4227-0d2b-4c4d-ad54-ca9a1ee518ea
-)dnl
@code{ftp-setup-buffer} returns but before the variable @code{process} is
set, the process will not be killed. There is no easy way to fix this bug,
but at least it is very unlikely.
-
-@ignore
- arch-tag: 8abc30d4-4d3a-47f9-b908-e9e971c18c6d
-@end ignore
@code{widget-backward}, it will display the string @var{motion-doc} in
the echo area. In addition, @var{motion-doc} is used as the mouse
@code{help-echo} string and may actually be a function or form evaluated
-to yield a help string. If it is a function, it is called with one
-argument, the widget.
+to yield a help string as for @code{help-echo} text properties.
@c @xref{Text help-echo}.
@item :match @var{function}
@code{checkbox} associated with this item.
@end ignore
@end table
-
-@ignore
- arch-tag: d1b8fad3-f48c-4ce4-a402-f73b5ef19bd2
-@end ignore
* Debugger:: How the Emacs Lisp debugger is implemented.
* Edebug:: A source-level Emacs Lisp debugger.
* Syntax Errors:: How to find syntax errors.
-* Test Coverage:: Ensuring you have tested all branches in your code.
* Compilation Errors:: How to find errors that show up in byte compilation.
@end menu
and you have put back those parentheses, @kbd{C-M-q} should not change
anything.
-@node Test Coverage
-@section Test Coverage
-@cindex coverage testing
-
-@findex testcover-start
-@findex testcover-mark-all
-@findex testcover-next-mark
- You can do coverage testing for a file of Lisp code by first using
-the command @kbd{M-x testcover-start @key{RET} @var{file} @key{RET}}
-to instrument it. Then test your code by calling it one or more
-times. Then use the command @kbd{M-x testcover-mark-all} to display
-``splotches'' on the code to show where coverage is insufficient. The
-command @kbd{M-x testcover-next-mark} will move point forward to the
-next spot that has a splotch.
-
- Normally, a red splotch indicates the form was never completely
-evaluated; a brown splotch means it always evaluated to the same value
-(meaning there has been little testing of what is done with the
-result). However, the red splotch is skipped for forms that can't
-possibly complete their evaluation, such as @code{error}. The brown
-splotch is skipped for forms that are expected to always evaluate to
-the same value, such as @code{(setq x 14)}.
-
- For difficult cases, you can add do-nothing macros to your code to
-give advice to the test coverage tool.
-
-@defmac 1value form
-Evaluate @var{form} and return its value, but inform coverage testing
-that @var{form}'s value should always be the same.
-@end defmac
-
-@defmac noreturn form
-Evaluate @var{form}, informing coverage testing that @var{form} should
-never return. If it ever does return, you get a run-time error.
-@end defmac
-
@node Compilation Errors
@section Debugging Problems in Compilation
successfully, then point is located at the end of the form. In this
case, this technique can't localize the error precisely, but can still
show you which function to check.
-
-@ignore
- arch-tag: ddc57378-b0e6-4195-b7b6-43f8777395a7
-@end ignore
* Forcing Redisplay:: Forcing redisplay.
* Truncation:: Folding or wrapping long text lines.
* The Echo Area:: Where messages are displayed.
-* Warnings:: Displaying warning messages for the user.
* Invisible Text:: Hiding part of the buffer text.
* Selective Display:: Hiding part of the buffer text (the old way).
* Overlay Arrow:: Display of an arrow to indicate position.
* Width:: How wide a character or string is on the screen.
* Faces:: A face defines a graphics style for text characters:
font, colors, etc.
-* Fringes:: Controlling window fringes.
* Display Property:: Enabling special display features.
* Images:: Displaying images in Emacs buffers.
* Blinking:: How Emacs shows the matching open parenthesis.
which is also called @dfn{continuing} the line. (The display table can
specify alternative indicators; see @ref{Display Tables}.)
+@cindex fringes, and line continuation/truncation indicators
On a windowed display, the @samp{$} and @samp{\} indicators are
-replaced with graphics bitmaps displayed in the window fringes
-(@pxref{Fringes}).
+replaced with graphics bitmaps displayed on the thin areas right near
+the window edges, called the @dfn{fringes}.
Note that continuation is different from filling; continuation happens
on the screen only, not in the buffer contents, and it breaks a line
If the value is zero, then command input is not echoed.
@end defvar
-@node Warnings
-@section Reporting Warnings
-@cindex warnings
-
- @dfn{Warnings} are a facility for a program to inform the user of a
-possible problem, but continue running.
-
-@menu
-* Warning Basics:: Warnings concepts and functions to report them.
-* Warning Variables:: Variables programs bind to customize their warnings.
-* Warning Options:: Variables users set to control display of warnings.
-@end menu
-
-@node Warning Basics
-@subsection Warning Basics
-@cindex severity level
-
- Every warning has a textual message, which explains the problem for
-the user, and a @dfn{severity level} which is a symbol. Here are the
-possible severity levels, in order of decreasing severity, and their
-meanings:
-
-@table @code
-@item :emergency
-A problem that will seriously impair Emacs operation soon
-if you do not attend to it promptly.
-@item :error
-A report of data or circumstances that are inherently wrong.
-@item :warning
-A report of data or circumstances that are not inherently wrong, but
-raise suspicion of a possible problem.
-@item :debug
-A report of information that may be useful if you are debugging.
-@end table
-
- When your program encounters invalid input data, it can either
-signal a Lisp error by calling @code{error} or @code{signal} or report
-a warning with severity @code{:error}. Signaling a Lisp error is the
-easiest thing to do, but it means the program cannot continue
-processing. If you want to take the trouble to implement a way to
-continue processing despite the bad data, then reporting a warning of
-severity @code{:error} is the right way to inform the user of the
-problem. For instance, the Emacs Lisp byte compiler can report an
-error that way and continue compiling other functions. (If the
-program signals a Lisp error and then handles it with
-@code{condition-case}, the user won't see the error message; it could
-show the message to the user by reporting it as a warning.)
-
-@cindex warning type
- Each warning has a @dfn{warning type} to classify it. The type is a
-list of symbols. The first symbol should be the custom group that you
-use for the program's user options. For example, byte compiler
-warnings use the warning type @code{(bytecomp)}. You can also
-subcategorize the warnings, if you wish, by using more symbols in the
-list.
-
-@defun display-warning type message &optional level buffer-name
-This function reports a warning, using @var{message} as the message
-and @var{type} as the warning type. @var{level} should be the
-severity level, with @code{:warning} being the default.
-
-@var{buffer-name}, if non-@code{nil}, specifies the name of the buffer
-for logging the warning. By default, it is @samp{*Warnings*}.
-@end defun
-
-@defun lwarn type level message &rest args
-This function reports a warning using the value of @code{(format
-@var{message} @var{args}...)} as the message. In other respects it is
-equivalent to @code{display-warning}.
-@end defun
-
-@defun warn message &rest args
-This function reports a warning using the value of @code{(format
-@var{message} @var{args}...)} as the message, @code{(emacs)} as the
-type, and @code{:warning} as the severity level. It exists for
-compatibility only; we recommend not using it, because you should
-specify a specific warning type.
-@end defun
-
-@node Warning Variables
-@subsection Warning Variables
-
- Programs can customize how their warnings appear by binding
-the variables described in this section.
-
-@defvar warning-levels
-This list defines the meaning and severity order of the warning
-severity levels. Each element defines one severity level,
-and they are arranged in order of decreasing severity.
-
-Each element has the form @code{(@var{level} @var{string}
-@var{function})}, where @var{level} is the severity level it defines.
-@var{string} specifies the textual description of this level.
-@var{string} should use @samp{%s} to specify where to put the warning
-type information, or it can omit the @samp{%s} so as not to include
-that information.
-
-The optional @var{function}, if non-@code{nil}, is a function to call
-with no arguments, to get the user's attention.
-
-Normally you should not change the value of this variable.
-@end defvar
-
-@defvar warning-prefix-function
-If non-@code{nil}, te value is a function to generate prefix text for
-warnings. Programs can bind the variable to a suitable function.
-@code{display-warning} calls this function with the warnings buffer
-current, and the function can insert text in it. That text becomes
-the beginning of the warning message.
-
-The function is called with two arguments, the severity level and its
-entry in @code{warning-levels}. It should return a list to use as the
-entry (this value need not be an actual member of
-@code{warning-levels}). By constructing this value, the function to
-change the severity of the warning, or specify different handling for
-a given severity level.
-
-If the variable's value is @code{nil} then there is no function
-to call.
-@end defvar
-
-@defvar warning-series
-Programs can bind this variable to @code{t} to say that the next
-warning should begin a series. When several warnings form a series,
-that means to leave point on the first warning of the series, rather
-than keep move it for each warning so that it appears on the last one.
-The series ends when the local binding is unbound and
-@code{warning-series} becomes @code{nil} again.
-
-The value can also be a symbol with a function definition. That is
-equivalent to @code{t}, except that the next warning will also call
-the function with no arguments with the warnings buffer current. The
-function can insert text which will serve as a header for the series
-of warnings.
-
-Once a series has begun, the value is a marker which points to the
-buffer position in the warnings buffer of the start of the series.
-
-The variable's normal value is @code{nil}, which means to handle
-each warning separately.
-@end defvar
-
-@defvar warning-fill-prefix
-When this variable is non-@code{nil}, it specifies a fill prefix to
-use for filling each warning's text.
-@end defvar
-
-@defvar warning-type-format
-This variable specifies the format for displaying the warning type
-in the warning message. The result of formatting the type this way
-gets included in the message under the control of the string in the
-entry in @code{warning-levels}. The default value is @code{" (%s)"}.
-If you bind it to @code{""} then the warning type won't appear at
-all.
-@end defvar
-
-@node Warning Options
-@subsection Warning Options
-
- These variables are used by users to control what happens
-when a Lisp program reports a warning.
-
-@defopt warning-minimum-level
-This user option specifies the minimum severity level that should be
-shown immediately to the user. The default is @code{:warning}, which
-means to immediately display all warnings except @code{:debug}
-warnings.
-@end defopt
-
-@defopt warning-minimum-log-level
-This user option specifies the minimum severity level that should be
-logged in the warnings buffer. The default is @code{:warning}, which
-means to log all warnings except @code{:debug} warnings.
-@end defopt
-
-@defopt warning-suppress-types
-This list specifies which warning types should not be displayed
-immediately for the user. Each element of the list should be a list
-of symbols. If its elements match the first elements in a warning
-type, then that warning is not displayed immediately.
-@end defopt
-
-@defopt warning-suppress-log-types
-This list specifies which warning types should not be logged in the
-warnings buffer. Each element of the list should be a list of
-symbols. If it matches the first few elements in a warning type, then
-that warning is not logged.
-@end defopt
@node Invisible Text
@section Invisible Text
about to be executed.
@defvar overlay-arrow-string
+@cindex fringe, and overlay arrow display
This variable holds the string to display to call attention to a
particular line, or @code{nil} if the arrow feature is not in use.
On a graphical display the contents of the string are ignored; instead a
@table @code
@item priority
@kindex priority @r{(overlay property)}
-This property's value (which should be a nonnegative integer number)
-determines the priority of the overlay. The priority matters when two
-or more overlays cover the same character and both specify the same
-property; the one whose @code{priority} value is larger takes priority
-over the other. For the @code{face} property, the higher priority
-value does not completely replace the other; instead, its face
-attributes override the face attributes of the lower priority
-@code{face} property.
+This property's value (which should be a nonnegative number) determines
+the priority of the overlay. The priority matters when two or more
+overlays cover the same character and both specify a face for display;
+the one whose @code{priority} value is larger takes priority over the
+other, and its face attributes override the face attributes of the lower
+priority overlay.
Currently, all overlays take priority over text properties. Please
avoid using negative priority values, as we have not yet decided just
Chinese GB2312 characters has a wild card @samp{*} in the @var{family}
field.
-@node Fringes
-@section Fringes
-@cindex Fringes
-
- The @dfn{fringes} of a window are thin vertical strips down the
-sides that are used for displaying bitmaps that indicate truncation,
-continuation, and horizontal scrolling, the overlay arrow. The
-fringes normally appear between the display margins and the window
-text, but you can put them outside the display margins for a specific
-buffer by setting @code{fringes-outside-margins} buffer-locally to a
-non-@code{nil} value.
-
-@defvar fringes-outside-margins
-If the value is non-@code{nil}, the frames appear outside
-the display margins.
-@end defvar
-
-@defvar left-fringe-width
-This variable, if non-@code{nil}, specifies the width of the left
-fringe in pixels.
-@end defvar
-
-@defvar right-fringe-width
-This variable, if non-@code{nil}, specifies the width of the right
-fringe in pixels.
-@end defvar
-
- The values of these variables take effect when you display the
-buffer in a window. If you change them while the buffer is visible,
-you can call @code{set-buffer-window} to display it in a window again.
-
-@defun set-window-fringes window left &optional right outside-margins
-This function sets the fringe widthes of window @var{window}.
-If window is @code{nil}, that stands for the selected window.
-
-The argument @var{left} specifies the width in pixels of the left
-fringe, and likewise @var{right} for the right fringe. A value of
-@code{nil} for either one stands for the default width. If
-@var{outside-margins} is non-@code{nil}, that specifies that fringes
-should appear outside of the display margins.
-@end defun
-
-@defun window-fringes window
-This function returns information about the fringes of a window
-@var{window}. The value has the form @code{(@var{left-width}
-@var{right-width} @var{frames-outside-margins})}.
-@end defun
-
@node Display Property
@section The @code{display} Property
@cindex display specification
@defopt indicate-empty-lines
@tindex indicate-empty-lines
@cindex fringes, and empty line indication
-When this is non-@code{nil}, Emacs displays a special glyph in the
-fringe of each empty line at the end of the buffer, on terminals that
-support it (window systems). @xref{Fringes}.
+When this is non-@code{nil}, Emacs displays a special glyph in
+each empty line at the end of the buffer, on terminals that
+support it (window systems).
@end defopt
@defopt tab-width
the window system, and creating the initial window. Users should not
interfere with it.
@end defvar
-
-@ignore
- arch-tag: ffdf5714-7ecf-415b-9023-fbc6b409c2c6
-@end ignore
recommend releasing these examples in parallel under your choice of
free software license, such as the GNU General Public License,
to permit their use in free software.
-
-@ignore
- arch-tag: 9014cf6e-f3c4-401d-b8da-4fe52723984c
-@end ignore
...)
@end example
- The Edebug specifation says which parts of a call to the macro are
-forms to be evaluated. For simple macros, the @var{specification}
-often looks very similar to the formal argument list of the macro
-definition, but specifications are much more general than macro
-arguments. @xref{Defining Macros}, for more explanation of
-the @code{declare} special form.
-
- You can also define an edebug specification for a macro separately
+@defspec declare (edebug @var{specification})
+Specify which expressions of a call to the macro in which the
+declaration appears are forms to be evaluated. For simple macros, the
+@var{specification} often looks very similar to the formal argument list
+of the macro definition, but specifications are much more general than
+macro arguments.
+@end defspec
+
+You can also define an edebug specification for a macro separately
from the macro definition with @code{def-edebug-spec}. Adding
@code{edebug} declarations is preferred, and more convenient, for
macro definitions in Lisp, but @code{def-edebug-spec} makes it
the result is non-@code{nil}, then break. Errors are ignored.
@xref{Global Break Condition}.
@end defopt
-
-@ignore
- arch-tag: 74842db8-019f-4818-b5a4-b2de878e57fd
-@end ignore
@end titlepage
@bye
-
-@ignore
- arch-tag: 02d65d63-3b64-49bc-a5c0-bfd5eabb6c98
-@end ignore
* Backquote:: Easier construction of list structure.
* Problems with Macros:: Don't evaluate the macro arguments too many times.
Don't hide the user's variables.
-* Indenting Macros:: Specifying how to indent macro calls.
Loading
* Key Lookup:: How extracting elements from keymaps works.
* Functions for Key Lookup:: How to request key lookup.
* Changing Key Bindings:: Redefining a key in a keymap.
-* Remapping Commands:: Bindings that translate one command to another.
* Key Binding Commands:: Interactive interfaces for redefining keys.
* Scanning Keymaps:: Looking through all keymaps, for printing help.
* Transposition:: Swapping two portions of a buffer.
* Registers:: How registers are implemented. Accessing
the text or position stored in a register.
-* Atomic Changes:: Installing several buffer changs ``atomically''.
-* Base 64:: Conversion to or from base 64 encoding.
-* MD5 Checksum:: Compute the MD5 ``message digest''/``checksum''.
* Change Hooks:: Supplying functions to be run when text is changed.
The Kill Ring
* Kill Ring Concepts:: What text looks like in the kill ring.
* Kill Functions:: Functions that kill text.
-* Yanking:: How yanking is done.
* Yank Commands:: Commands that access the kill ring.
* Low-Level Kill Ring:: Functions and variables for kill ring access.
* Internals of Kill Ring:: Variables that hold kill-ring data.
* Process Buffers:: If no filter, output is put in a buffer.
* Filter Functions:: Filter functions accept output from the process.
-* Decoding Output:: Filters can get unibyte or multibyte strings.
* Accepting Output:: How to wait until process output arrives.
Operating System Interface
* Refresh Screen:: Clearing the screen and redrawing everything on it.
* Truncation:: Folding or wrapping long text lines.
* The Echo Area:: Where messages are displayed.
-* Warnings:: Displaying warning messages for the user.
* Selective Display:: Hiding part of the buffer text.
* Overlay Arrow:: Display of an arrow to indicate position.
* Temporary Displays:: Displays that go away automatically.
-* Overlays:: Use overlays to highlight parts of the buffer.
-* Width:: How wide a character or string is on the screen.
-* Faces:: A face defines a graphics style
- for text characters: font, colors, etc.
-* Fringes:: Controlling window fringes.
-* Display Property:: Enabling special display features.
-* Images:: Displaying images in Emacs buffers.
+* Waiting:: Forcing display update and waiting for user.
* Blinking:: How Emacs shows the matching open parenthesis.
-* Inverse Video:: Specifying how the screen looks.
-* Usual Display:: The usual conventions for displaying nonprinting chars.
-* Display Tables:: How to specify other conventions.
+* Usual Display:: How control characters are displayed.
* Beeping:: Audible signal to the user.
* Window Systems:: Which window system is being used.
\f
These words prevent "local variables" above from confusing Emacs.
-
-@ignore
- arch-tag: f7e9a219-a0e1-4776-b631-08eaa1d49b34
-@end ignore
@code{"Arithmetic underflow error"}@*
@xref{Math Functions}.
@end table
-
-@ignore
- arch-tag: 717c6048-5d9d-4c7d-9a62-df57390b6f19
-@end ignore
@end group
@end example
@end defvar
-
-@ignore
- arch-tag: f723a4e0-31b3-453f-8afc-0bf8fd276d57
-@end ignore
@end defun
@defun file-local-copy filename
-This function copies file @var{filename} to an ordinary non-magic file
-on the local machine, if it isn't on the local machine already. Magic
-file names should handle the @code{file-local-copy} operation if they
-refer to files on other machines. A magic file name that is used for
-other purposes than remote file access should not handle
-@code{file-local-copy}; then this function will treat the file as
-local.
-
-If @var{filename} is local, whether magic or not, this function does
-nothing and returns @code{nil}. Otherwise it returns the file name
-of the local copy file.
-@end defun
+This function copies file @var{filename} to an ordinary non-magic file,
+if it isn't one already.
+
+If @var{filename} specifies a magic file name, which programs
+outside Emacs cannot directly read or write, this copies the contents to
+an ordinary file and returns that file's name.
-@defun file-remote-p filename
-This functions return @code{t} if @var{filename} is a remote file---that is,
-a magic file name that handles @code{file-local-copy}.
+If @var{filename} is an ordinary file name, not magic, then this function
+does nothing and returns @code{nil}.
@end defun
@defun unhandled-file-name-directory filename
@code{buffer-file-format} for writing auto-save files. This variable is
always buffer-local in all buffers.
@end defvar
-
-@ignore
- arch-tag: 141f74ce-6ae3-40dc-a6c4-ef83fc4ec35c
-@end ignore
doesn't change.
@end defun
-@defun modify-all-frames-parameters alist
-This function alters the frame parameters of all existing frames
-according to @var{alist}, then modifies @code{default-frame-alist}
-to apply the same parameter values to frames that will be created
-henceforth.
-@end defun
-
@node Initial Parameters
@subsection Initial Frame Parameters
A list of buffers that have been selected in this frame,
ordered most-recently-selected first.
+@item font
+The name of the font for displaying text in the frame. This is a
+string, either a valid font name for your system or the name of an Emacs
+fontset (@pxref{Fontsets}). Changing this frame parameter on a frame
+also changes the font-related attributes of the default face on that
+frame.
+
@item auto-raise
Whether selecting the frame raises it (non-@code{nil} means yes).
implemented.)
@item scroll-bar-width
-The width of the vertical scroll bar, in pixels,
-or @code{nil} meaning to use the default width.
+The width of the vertical scroll bar, in pixels.
@item icon-type
The type of icon to use for this frame when it is iconified. If the
The name to use in the icon for this frame, when and if the icon
appears. If this is @code{nil}, the frame's title is used.
+@item foreground-color
+The color to use for the image of a character. This is a string; the
+window system defines the meaningful color names. Changing this
+parameter is equivalent to changing the foreground color of the face
+@code{default} on the frame in question.
+
+@item background-color
+The color to use for the background of characters. Changing this
+parameter is equivalent to changing the foreground color of the face
+@code{default} on the frame in question.
+
@item background-mode
This parameter is either @code{dark} or @code{light}, according
to whether the background color is a light one or a dark one.
+@item mouse-color
+The color for the mouse pointer. Changing this parameter is equivalent
+to changing the background color of face @code{mouse}.
+
+@item cursor-color
+The color for the cursor that shows point. Changing this parameter is
+equivalent to changing the background color of face @code{cursor}.
+
+@item border-color
+The color for the border of the frame. Changing this parameter is
+equivalent to changing the background color of face @code{border}.
+
@item tty-color-mode
@cindex standard colors for character terminals
This parameter overrides the terminal's color support as given by the
@code{tty-color-mode-alist}, and if found, the associated number is
used as the color support mode.
+@item scroll-bar-foreground
+If non-@code{nil}, the color for the foreground of scroll bars.
+Changing this parameter is equivalent to setting the foreground color of
+face @code{scroll-bar}.
+
+@item scroll-bar-background
+If non-@code{nil}, the color for the background of scroll bars.
+Changing this parameter is equivalent to setting the background color of
+face @code{scroll-bar}.
+
@item display-type
This parameter describes the range of possible colors that can be used
in this frame. Its value is @code{color}, @code{grayscale} or
@item internal-border-width
The distance in pixels between text and border.
-@item left-fringe
-@itemx right-fringe
-The default width of the left and right fringes of windows in this
-frame (@pxref{Fringes}). If either of these is zero, that effectively
-removes the corresponding fringe. A value of @code{nil} stands for
-the standard fringe width, which is the width needed to display the
-fringe bitmaps.
-
-The combined fringe widths must add up to an integral number of
-columns, so the actual default fringe widths for the frame may be
-larger than the specified values. The extra width needed to reach an
-acceptable total is distributed evenly between the left and right
-fringe. However, you can force one frame or the other to a precise
-width by specifying that width a negative integer. If both widths are
-negative, only the left fringe gets the specified width.
-
@item unsplittable
If non-@code{nil}, this frame's window is never split automatically.
is examined only when you specify a cursor type for a frame.
@end defvar
-These frame parameters are semi-obsolete in that they are automatically
-equivalent to particular face attributes of particular faces.
-
-@table @code
-@item font
-The name of the font for displaying text in the frame. This is a
-string, either a valid font name for your system or the name of an Emacs
-fontset (@pxref{Fontsets}). It is equivalent to the @code{font}
-attribute of the @code{default} face.
-
-@item foreground-color
-The color to use for the image of a character. It is equivalent to
-the @code{:foreground} attribute of the @code{default} face.
-
-@item background-color
-The color to use for the background of characters. It is equivalent to
-the @code{:background} attribute of the @code{default} face.
-
-@item mouse-color
-The color for the mouse pointer. It is equivalent to the @code{:background}
-attribute of the @code{mouse} face.
-
-@item cursor-color
-The color for the cursor that shows point. It is equivalent to the
-@code{:background} attribute of the @code{cursor} face.
-
-@item border-color
-The color for the border of the frame. It is equivalent to the
-@code{:background} attribute of the @code{border} face.
-
-@item scroll-bar-foreground
-If non-@code{nil}, the color for the foreground of scroll bars. It is
-equivalent to the @code{:foreground} attribute of the
-@code{scroll-bar} face.
-
-@item scroll-bar-background
-If non-@code{nil}, the color for the background of scroll bars. It is
-equivalent to the @code{:background} attribute of the
-@code{scroll-bar} face.
-@end table
-
@node Size and Position
@subsection Frame Size And Position
@cindex size of frame
way windows behave.
@deffn Command delete-frame &optional frame force
-@vindex delete-frame-functions
+@vindex delete-frame-hook
This function deletes the frame @var{frame} after running the hook
-@code{delete-frame-functions} (each function gets one argument,
-@var{frame}). By default, @var{frame} is the selected frame.
+@code{delete-frame-hook}. By default, @var{frame} is the selected
+frame.
A frame cannot be deleted if its minibuffer is used by other frames.
Normally, you cannot delete a frame if all other frames are invisible,
The functions @code{x-pixel-width} and @code{x-pixel-height} return the
width and height of an X Window frame, measured in pixels.
@end ignore
-
-@ignore
- arch-tag: 94977df6-3dca-4730-b57b-c6329e9282ba
-@end ignore
@end titlepage
@bye
-
-@ignore
- arch-tag: 5182b306-c403-4e4f-ba24-e1911bc6da9d
-@end ignore
See @ref{Key Lookup}.
@end table
-@ignore
- arch-tag: 39100cdf-8a55-4898-acba-595db619e8e2
-@end ignore
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
-@ignore
- arch-tag: d00ac830-e120-41fb-bbc5-7ca3eeaa227f
-@end ignore
@defun hash-table-size table
This returns the current nominal size of @var{table}.
@end defun
-
-@ignore
- arch-tag: 3b5107f9-d2f0-47d5-ad61-3498496bea0e
-@end ignore
echo area at first, and display the longer @var{help-text} strings only
if the user types the help character again.
@end defopt
-
-@ignore
- arch-tag: ba36b4c2-e60f-49e2-bc25-61158fdcd815
-@end ignore
@item write-file-functions
@item write-region-annotate-functions
@end table
-
-@ignore
- arch-tag: 55fd0296-d906-4551-b300-979d3846aa88
-@end ignore
+++ /dev/null
-@setfilename ../info/index
-
-@c Indexing guidelines
-
-@c I assume that all indexes will be combinded.
-@c Therefore, if a generated findex and permutations
-@c cover the ways an index user would look up the entry,
-@c then no cindex is added.
-@c Concept index (cindex) entries will also be permuted. Therefore, they
-@c have no commas and few irrelevant connectives in them.
-
-@c I tried to include words in a cindex that give the context of the entry,
-@c particularly if there is more than one entry for the same concept.
-@c For example, "nil in keymap"
-@c Similarly for explicit findex and vindex entries, e.g., "print example".
-
-@c Error codes are given cindex entries, e.g., "end-of-file error".
-
-@c pindex is used for .el files and Unix programs
-
-@node Index, New Symbols, Standard Hooks, Top
-@unnumbered Index
-
-
-All variables, functions, keys, programs, files, and concepts are
-in this one index.
-
-All names and concepts are permuted, so they appear several times, one
-for each permutation of the parts of the name. For example,
-@code{function-name} would appear as @b{function-name} and @b{name,
-function-}.
-
-
-@c Print the indices
-
-@printindex fn
-
-
+++ /dev/null
-@c -*-texinfo-*-
-@setfilename ../info/index
-
-@c Indexing guidelines
-
-@c I assume that all indexes will be combinded.
-@c Therefore, if a generated findex and permutations
-@c cover the ways an index user would look up the entry,
-@c then no cindex is added.
-@c Concept index (cindex) entries will also be permuted. Therefore, they
-@c have no commas and few irrelevant connectives in them.
-
-@c I tried to include words in a cindex that give the context of the entry,
-@c particularly if there is more than one entry for the same concept.
-@c For example, "nil in keymap"
-@c Similarly for explicit findex and vindex entries, e.g. "print example".
-
-@c Error codes are given cindex entries, e.g. "end-of-file error".
-
-@c pindex is used for .el files and Unix programs
-
-@node Index, New Symbols, Standard Hooks, Top
-@unnumbered Index
-
-@c Print the indices
-
-@printindex fn
-
-
Flag to set @code{coding-system} of the process buffer from the
coding system used to decode process output.
@end table
-
-@ignore
- arch-tag: 4b2c33bc-d7e4-43f5-bc20-27c0db52a53e
-@end ignore
Rockwell, Per Starb@"ack, Shinichirou Sugou, Kimmo Suominen, Edward Tharp,
Bill Trost, Rickard Westman, Jean White, Matthew Wilding, Carl Witty,
Dale Worley, Rusty Wright, and David D. Zuhn.
-
-@ignore
- arch-tag: d156593f-82f8-4708-a844-204e48f7f2aa
-@end ignore
* Key Lookup:: How extracting elements from keymaps works.
* Functions for Key Lookup:: How to request key lookup.
* Changing Key Bindings:: Redefining a key in a keymap.
-* Remapping Commands:: Bindings that translate one command to another.
* Key Binding Commands:: Interactive interfaces for redefining keys.
* Scanning Keymaps:: Looking through all keymaps, for printing help.
* Menu Keymaps:: Defining a menu as a keymap.
to enumerate all of them. A keymap that has a default binding
completely masks any lower-precedence keymap.
-@item @var{char-table}
-If an element of a keymap is a char-table, it counts as holding
-bindings for all character events with no modifier bits
-(@pxref{modifier bits}): element @var{n} is the binding for the
-character with code @var{n}. This is a compact way to record lots of
-bindings. A keymap with such a char-table is called a @dfn{full
-keymap}. Other keymaps are called @dfn{sparse keymaps}.
-
-When a keymap contains a char-table vector, it always defines a
-binding for each character without modifiers. However, if the binding
-is @code{nil}, it doesn't constitute a definition. @code{nil} takes
-precedence over a default binding or a binding in the parent keymap.
-So in a full keymap, default bindings are not meaningful for
-characters without modifiers. They can still apply to characters with
-modifier bits and to non-character events. A binding of @code{nil}
-does @emph{not} override lower-precedence keymaps; thus, if the local
-map gives a binding of @code{nil}, Emacs uses the binding from the
-global map.
+@item @var{vector}
+If an element of a keymap is a vector, the vector counts as bindings for
+all the @sc{ascii} characters, codes 0 through 127; vector element
+@var{n} is the binding for the character with code @var{n}. This is a
+compact way to record lots of bindings. A keymap with such a vector is
+called a @dfn{full keymap}. Other keymaps are called @dfn{sparse
+keymaps}.
+
+A @code{nil} binding is used to mean that a key is explicitly not bound.
+Just like any other binding, it takes precedence over a default binding
+or a binding in the parent keymap, but on the other hand, it does not
+take precedence over keymaps of lower priority.
+
+When a keymap contains a vector, it always defines a binding for each
+@sc{ascii} character, even if the vector contains @code{nil} for that
+character. Such a binding of @code{nil} overrides any default key
+binding in the keymap, for @sc{ascii} characters. However, default
+bindings are still meaningful for events other than @sc{ascii}
+characters. A binding of @code{nil} does @emph{not} override
+lower-precedence keymaps; thus, if the local map gives a binding of
+@code{nil}, Emacs uses the binding from the global map.
@item @var{string}
@cindex keymap prompt string
The variable @code{overriding-local-map}, if non-@code{nil}, specifies
another local keymap that overrides the buffer's local map and all the
-minor mode keymaps. Modes for emulation can specify additional
-active keymaps through the variable @code{emulation-mode-map-alists}.
+minor mode keymaps.
All the active keymaps are used together to determine what command to
execute when a key is entered. Emacs searches these maps one by one, in
event is run directly by @code{read-event}. @xref{Special Events}.
@end defvar
-@defvar emulation-mode-map-alists
-This variable holds a list of keymap alists to use for emulations
-modes. It is intended for modes or packages using multiple minor-mode
-keymaps. Each element is a keymap alist which has the same format and
-meaning as @code{minor-mode-map-alist}, or a symbol with a variable
-binding which is such an alist. The ``active'' keymaps in each alist
-are used before @code{minor-mode-map-alist} and
-@code{minor-mode-overriding-map-alist}.
-@end defvar
-
@node Key Lookup
@section Key Lookup
@cindex key lookup
not cause an error.
@end deffn
-@defun key-binding key &optional accept-defaults no-remap
+@defun key-binding key &optional accept-defaults
This function returns the binding for @var{key} in the current
keymaps, trying all the active keymaps. The result is @code{nil} if
@var{key} is undefined in the keymaps.
The argument @var{accept-defaults} controls checking for default
bindings, as in @code{lookup-key} (above).
-When commands are remapped (@pxref{Remapping Commands}),
-@code{key-binding} normally processes command remappings so as to
-returns the remapped command that will actually be executed. However,
-if @var{no-remap} is non-@code{nil}, @code{key-binding} ignores
-remappings and returns the binding directly specified for @var{key}.
-
An error is signaled if @var{key} is not a string or a vector.
@example
changing the bindings of both @kbd{C-p C-f} and @kbd{C-x C-f} in the
default global map.
- The function @code{substitute-key-definition} scans a keymap for
-keys that have a certain binding and rebind them with a different
-binding. Another feature you can use for similar effects, but which
-is often cleaner, is to add a binding that remaps a command
-(@pxref{Remapping Commands}).
-
@defun substitute-key-definition olddef newdef keymap &optional oldmap
@cindex replace bindings
This function replaces @var{olddef} with @var{newdef} for any keys in
puts the special deletion command in @code{my-map} for whichever keys
are globally bound to the standard deletion command.
+@ignore
+@c Emacs 18 only
+Prefix keymaps that appear within @var{keymap} are not checked
+recursively for keys bound to @var{olddef}; they are not changed at all.
+Perhaps it would be better to check nested keymaps recursively.
+@end ignore
+
Here is an example showing a keymap before and after substitution:
@smallexample
@end smallexample
@end defun
-@node Remapping Commands
-@section Remapping Commands
-@cindex remapping commands
-
- A special kind of key binding, using a special ``key sequence''
-which includes a command name, has the effect of @dfn{remapping} that
-command into another. Here's how it works. You make a key binding
-for a key sequence tha starts with the dummy event @code{remap},
-followed by the command name you want to remap. Specify the remapped
-definition as the definition in this binding. The remapped definition
-is usually a command name, but it can be any valid definition for
-a key binding.
-
- Here's an example. Suppose that My mode uses special commands
-@code{my-kill-line} and @code{my-kill-word}, which should be invoked
-instead of @code{kill-line} and @code{kill-word}. It can establish
-this by making these two command-remapping bindings in its keymap:
-
-@example
-(define-key my-mode-map [remap kill-line] 'my-kill-line)
-(define-key my-mode-map [remap kill-word] 'my-kill-word)
-@end example
-
-Whenever @code{my-mode-map} is an active keymap, if the user types
-@kbd{C-k}, Emacs will find the standard global binding of
-@code{kill-line} (assuming nobody has changed it). But
-@code{my-mode-map} remaps @code{kill-line} to @code{my-mode-map},
-so instead of running @code{kill-line}, Emacs runs
-@code{my-kill-line}.
-
-Remapping only works through a single level. In other words,
-
-@example
-(define-key my-mode-map [remap kill-line] 'my-kill-line)
-(define-key my-mode-map [remap my-kill-line] 'my-other-kill-line)
-@end example
-
-@noindent
-does not have the effect of remapping @code{kill-line} into
-@code{my-other-kill-line}. If an ordinary key binding specifies
-@code{kill-line}, this keymap will remap it to @code{my-kill-line};
-if an ordinary binding specifies @code{my-kill-line}, this keymap will
-remap it to @code{my-other-kill-line}.
-
-@defun command-remapping command
-This function returns the remapping for @var{command}, given the
-current active keymaps. If @var{command} is not remapped (which is
-the usual situation), the function returns @code{nil}.
-@end defun
-
@node Key Binding Commands
@section Commands for Binding Keys
in a keymap.
@end defun
-@defun where-is-internal command &optional keymap firstonly noindirect no-remap
+@defun where-is-internal command &optional keymap firstonly noindirect
This function is a subroutine used by the @code{where-is} command
(@pxref{Help, , Help, emacs,The GNU Emacs Manual}). It returns a list
of key sequences (of any length) that are bound to @var{command} in a
follow indirect keymap bindings. This makes it possible to search for
an indirect definition itself.
-When command remapping is in effect (@pxref{Remapping Commands}),
-@code{where-is-internal} figures out when a command will be run due to
-remapping and reports keys accordingly. It also returns @code{nil} if
-@var{command} won't really be run because it has been remapped to some
-other command. However, if @var{no-remap} is non-@code{nil}.
-@code{where-is-internal} ignores remappings.
-
@smallexample
@group
(where-is-internal 'describe-function)
@defun tool-bar-add-item-from-menu command icon &optional map &rest props
@tindex tool-bar-add-item-from-menu
-This function is a convenience for defining tool bar items which are
+This command is a convenience for defining tool bar items which are
consistent with existing menu bar bindings. The binding of
@var{command} is looked up in the menu bar in @var{map} (default
@code{global-map}) and modified to add an image specification for
-@var{icon}, which is found in the same way as by
+@var{icon}, which is looked for in the same way as by
@code{tool-bar-add-item}. The resulting binding is then placed in
-@code{tool-bar-map}, so use this function only for global tool bar
-items.
-
-@var{map} must contain an appropriate keymap bound to
-@code{[menu-bar]}. The remaining arguments @var{props} are additional
-property list elements to add to the menu item specification.
-@end defun
-
-@defun tool-bar-local-item-from-menu command icon in-map &optional from-map &rest props
-This function is used for making non-global tool bar items. Use it
-like @code{tool-bar-add-item-from-menu} except that @var{in-map}
-specifies the local map to make the definition in. The argument
-@var{from-map} si like the @var{map} argument of
-@code{tool-bar-add-item-from-menu}.
+@code{tool-bar-map}. @var{map} must contain an appropriate keymap bound
+to @code{[menu-bar]}. The remaining arguments @var{props} are
+additional property list elements to add to the menu item specification.
@end defun
@tindex auto-resize-tool-bar
[work] '("Work" . work-command) 'break)
@end example
@end defun
-
-@ignore
- arch-tag: cfb87287-9364-4e46-9e93-6c2f7f6ae794
-@end ignore
@end tex
@bye
-
-@ignore
- arch-tag: 9e03a1c7-6f62-4346-85d9-ed5b79386e07
-@end ignore
@result{} ((bar 2) (lose 4))
@end example
@end defun
-
-@ignore
- arch-tag: 31fb8a4e-4aa8-4a74-a206-aa00451394d4
-@end ignore
@end defvar
@c Emacs 19 feature
-
-@ignore
- arch-tag: df731f89-0900-4389-a436-9105241b6f7a
-@end ignore
@item vc-mode
@xref{Mode Line Variables}.
@end table
-
-@ignore
- arch-tag: 6baae835-b667-4447-91e2-9829ae1cf543
-@end ignore
* Backquote:: Easier construction of list structure.
* Problems with Macros:: Don't evaluate the macro arguments too many times.
Don't hide the user's variables.
-* Indenting Macros:: Specifying how to indent macro calls.
@end menu
@node Simple Macro
called interactively.
@end defspec
- The body of the macro definition can include a @code{declare} form,
-which can specify how @key{TAB} should indent macro calls, and how to
-step through them for Edebug.
-
-@defspec declare @var{specs}...
-This special form is used at top level in a macro definition to
-specify various additional information about it. Two kinds of
-specification are currently supported:
-
-@table @code
-@item (edebug @var{edebug-form-spec})
-Specify how to step through macro calls for Edebug.
-@xref{Instrumenting Macro Calls}, for more details.
-
-@item (indent @var{indent-spec})
-Specify how to indent calls to this macro. @xref{Indenting Macros},
-for more details.
-@end table
-@end defspec
-
- No macro absolutely needs a @code{declare} form, because that form
-has no effect on how the macro expands, on what the macro means in the
-program. It only affects secondary features: indentation and Edebug.
-
@node Backquote
@section Backquote
@cindex backquote (list substitution)
allocation construct. You wouldn't use @code{setcar} on a constant such
as @code{'(nil)}, so naturally you won't use it on @code{(empty-object)}
either.
-
-@node Indenting Macros
-@section Indenting Macros
-
- You can use the @code{declare} form in the macro definition to
-specify how to @key{TAB} should indent indent calls to the macro. You
-write it like this:
-
-@example
-(declare (indent @var{indent-spec}))
-@end example
-
-@noindent
-Here are the possibilities for @var{indent-spec}:
-
-@table @asis
-@item @code{nil}
-This is the same as no property---use the standard indentation pattern.
-@item @code{defun}
-Handle this function like a @samp{def} construct: treat the second
-line as the start of a @dfn{body}.
-@item a number, @var{number}
-The first @var{number} arguments of the function are
-@dfn{distinguished} arguments; the rest are considered the body
-of the expression. A line in the expression is indented according to
-whether the first argument on it is distinguished or not. If the
-argument is part of the body, the line is indented @code{lisp-body-indent}
-more columns than the open-parenthesis starting the containing
-expression. If the argument is distinguished and is either the first
-or second argument, it is indented @emph{twice} that many extra columns.
-If the argument is distinguished and not the first or second argument,
-the line uses the standard pattern.
-@item a symbol, @var{symbol}
-@var{symbol} should be a function name; that function is called to
-calculate the indentation of a line within this expression. The
-function receives two arguments:
-@table @asis
-@item @var{state}
-The value returned by @code{parse-partial-sexp} (a Lisp primitive for
-indentation and nesting computation) when it parses up to the
-beginning of this line.
-@item @var{pos}
-The position at which the line being indented begins.
-@end table
-@noindent
-It should return either a number, which is the number of columns of
-indentation for that line, or a list whose car is such a number. The
-difference between returning a number and returning a list is that a
-number says that all following lines at the same nesting level should
-be indented just like this one; a list says that following lines might
-call for different indentations. This makes a difference when the
-indentation is being computed by @kbd{C-M-q}; if the value is a
-number, @kbd{C-M-q} need not recalculate indentation for the following
-lines until the end of the list.
-@end table
-
-@ignore
- arch-tag: d4cce66d-1047-45c3-bfde-db6719d6e82b
-@end ignore
+++ /dev/null
-# Makefile for the GNU Emacs Lisp Reference Manual.
-
-# Copyright (C) 2003
-# Free Software Foundation, Inc.
-
-# This file is part of GNU Emacs.
-
-# GNU Emacs is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# GNU Emacs is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with GNU Emacs; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
-# Standard configure variables.
-srcdir = .
-
-infodir = $(srcdir)/../info
-
-# Redefine `TEX' if `tex' does not invoke plain TeX. For example:
-# TEX=platex
-TEX=tex
-INSTALL_INFO = install-info
-MAKEINFO = makeinfo
-
-# The environment variable and its value to add $(srcdir) to the path
-# searched for TeX input files.
-texinputdir = $(srcdir)\..\nt\envadd.bat "TEXINPUTS=$(srcdir);$(TEXINPUTS)" /C
-
-# The name of the manual:
-VERSION=2.9
-manual = elisp-manual-21-$(VERSION)
-
-# Uncomment this line for permuted index.
-# permuted_index = 1
-
-# List of all the texinfo files in the manual:
-
-srcs = \
- $(srcdir)/abbrevs.texi \
- $(srcdir)/advice.texi \
- $(srcdir)/anti.texi \
- $(srcdir)/back.texi \
- $(srcdir)/backups.texi \
- $(srcdir)/buffers.texi \
- $(srcdir)/calendar.texi \
- $(srcdir)/commands.texi \
- $(srcdir)/compile.texi \
- $(srcdir)/control.texi \
- $(srcdir)/customize.texi \
- $(srcdir)/debugging.texi \
- $(srcdir)/display.texi \
- $(srcdir)/edebug.texi \
- $(srcdir)/elisp.texi \
- $(srcdir)/errors.texi \
- $(srcdir)/eval.texi \
- $(srcdir)/files.texi \
- $(srcdir)/frames.texi \
- $(srcdir)/functions.texi \
- $(srcdir)/hash.texi \
- $(srcdir)/help.texi \
- $(srcdir)/hooks.texi \
- $(srcdir)/internals.texi \
- $(srcdir)/intro.texi \
- $(srcdir)/keymaps.texi \
- $(srcdir)/lists.texi \
- $(srcdir)/loading.texi \
- $(srcdir)/locals.texi \
- $(srcdir)/macros.texi \
- $(srcdir)/maps.texi \
- $(srcdir)/markers.texi \
- $(srcdir)/minibuf.texi \
- $(srcdir)/modes.texi \
- $(srcdir)/nonascii.texi \
- $(srcdir)/numbers.texi \
- $(srcdir)/objects.texi \
- $(srcdir)/os.texi \
- $(srcdir)/positions.texi \
- $(srcdir)/processes.texi \
- $(srcdir)/searching.texi \
- $(srcdir)/sequences.texi \
- $(srcdir)/streams.texi \
- $(srcdir)/strings.texi \
- $(srcdir)/symbols.texi \
- $(srcdir)/syntax.texi \
- $(srcdir)/text.texi \
- $(srcdir)/tips.texi \
- $(srcdir)/variables.texi \
- $(srcdir)/windows.texi \
- $(srcdir)/index.unperm \
- $(srcdir)/index.perm \
- $(srcdir)/gpl.texi \
- $(srcdir)/doclicense.texi
-
-
-.PHONY: clean
-
-# The info file is named `elisp'.
-info: $(infodir)/elisp
- $(INSTALL_INFO) --info-dir=$(infodir) $(infodir)/elisp
-
-$(infodir)/elisp: $(srcs) index.texi
- $(MAKEINFO) -I. -I$(srcdir) $(srcdir)/elisp.texi -o $(infodir)/elisp
-
-elisp.dvi: $(srcs) index.texi
-# Avoid losing old contents of aux file entirely.
- -ren elisp.aux elisp.oaux
-# First shot to define xrefs.
- $(texinputdir) $(TEX) $(srcdir)/elisp.texi
- if not a$(permuted_index) == a sh $(srcdir)/permute-index
- if not a$(permuted_index) == a ren permuted.fns elisp.fns
- if not a$(permuted_index) == a texindex elisp.tp
- if a$(permuted_index) == a texindex elisp.??
- $(texinputdir) $(TEX) $(srcdir)/elisp.texi
-
-index.texi:
- if a$(permuted_index) == a cp $(srcdir)/index.unperm index.texi
- if not a$(permuted_index) == a cp $(srcdir)/index.perm index.texi
-
-clean:
- rm -f *.toc *.aux *.log *.cp *.cps *.fn *.fns *.tp *.tps \
- *.vr *.vrs *.pg *.pgs *.ky *.kys
- rm -f make.out core
- rm -f index.texi
- rm -f $(infodir)/elisp*
-
-distclean: clean
-
-maintainer-clean: clean
- rm -f elisp elisp-* elisp.dvi elisp.oaux
-
-# arch-tag: da68f1c2-536d-4d41-9150-7b01434eda3f
@vindex view-mode-map
A full keymap used by View mode.
@end table
-
-@ignore
- arch-tag: b741253c-7e23-4a02-b3fa-cffd9e4d72b9
-@end ignore
to find the beginning and end of the region. This lets other Lisp
programs specify the bounds explicitly as arguments. (@xref{Interactive
Codes}.)
-
-@ignore
- arch-tag: b1ba2e7a-a0f3-4c5e-875c-7d8e22d73299
-@end ignore
file name. It provides special features including automatic insertion
of the default directory.
-@defun read-file-name prompt &optional directory default existing initial predicate
+@defun read-file-name prompt &optional directory default existing initial
This function reads a file name in the minibuffer, prompting with
@var{prompt} and providing completion. If @var{default} is
non-@code{nil}, then the function returns @var{default} if the user just
@var{initial} does, try the command @kbd{C-x C-v}. @strong{Note:} we
recommend using @var{default} rather than @var{initial} in most cases.
-If @var{predicate} is non-@code{nil}, it specifies a function of one
-argument that decides which file names are acceptable completion
-possibilities. A file name is an acceptable value if @var{predicate}
-returns non-@code{nil} for it.
-
Here is an example:
@example
as the string @code{"/gp/gnu/elisp/manual.texi"}.
@end defun
-@defun read-directory-name prompt &optional directory default existing initial
-This function is like @code{read-file-name} but allows only directory
-names as completion possibilities.
-@end defun
-
@defopt insert-default-directory
This variable is used by @code{read-file-name}. Its value controls
whether @code{read-file-name} starts by placing the name of the default
minibuffer text, for @var{timeout} seconds. (The default is 2
seconds.)
@end defun
-
-@ignore
- arch-tag: bba7f945-9078-477f-a2ce-18818a6e1218
-@end ignore
@c Free Software Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@setfilename ../info/modes
-@node Modes, Documentation, Keymaps, Top
+@node Modes, Documentation, Keymaps, Top
@chapter Major and Minor Modes
@cindex mode
* %-Constructs:: Putting information into a mode line.
* Properties in Mode:: Using text properties in the mode line.
* Header Lines:: Like a mode line, but at the top.
-* Emulating Mode Line:: Formatting text as the mode line would.
@end menu
@node Mode Line Data
It is normally @code{nil}, so that ordinary buffers have no header line.
@end defvar
-@node Emulating Mode Line
-@subsection Emulating Mode Line Formatting
-
- You can use the function @code{format-mode-line} to compute
-the text that would appear in a mode line or header line
-based on certain mode line specification.
-
-@defun format-mode-line &optional format window no-props
-This function formats a line of text according to @var{format} as if
-it were generating the mode line for @var{window}, but instead of
-displaying the text in the mode line or the header line, it returns
-the text as a string.
-
-If @var{format} is @code{nil}, that means to use
-@code{mode-line-format} and return the text that would appear in the
-mode line. If @var{format} is @code{t}, that means to use
-@code{header-line-format} so as to return the text that would appear
-in the header line (@code{""} if the window has no header line).
-The argument @var{window} defaults to the selected window.
-
-The value string normally has text properties that correspond to the
-faces, keymaps, etc., that the mode line would have. If
-@var{no-props} is non-@code{nil}, the value has no text properties.
-@end defun
-
@node Imenu
@section Imenu
subelement, @var{facename}, specifies the face, as described above.
The last two values in @var{highlighter}, @var{override} and
-@var{laxmatch}, are flags. If @var{override} is @code{t}, this
-element can override existing fontification made by previous elements
-of @code{font-lock-keywords}. If it is @code{keep}, then each
-character is fontified if it has not been fontified already by some
-other element. If it is @code{prepend}, the face @var{facename} is
-added to the beginning of the @code{font-lock-face} property. If it
-is @code{append}, the face @var{facename} is added to the end of the
-@code{font-lock-face} property.
+@var{laxmatch}, are flags. If @var{override} is @code{t}, this element
+can override existing fontification made by previous elements of
+@code{font-lock-keywords}. If it is @code{keep}, then each character is
+fontified if it has not been fontified already by some other element.
+If it is @code{prepend}, the face @var{facename} is added to the
+beginning of the @code{face} property. If it is @code{append}, the face
+@var{facename} is added to the end of the @code{face} property.
If @var{laxmatch} is non-@code{nil}, it means there should be no error
if there is no subexpression numbered @var{subexp} in @var{matcher}.
@end defvar
@defvar font-lock-extra-managed-props
-Additional properties (other than @code{font-lock-face}) that are
-being managed by Font Lock mode. Font Lock mode normally manages only
-the @code{font-lock-face} property; if you want it to manage others as
-well, you must specify them in a @var{facename} in
-@code{font-lock-keywords} as well as adding them to this list.
+Additional properties (other than @code{face}) that are being managed
+by Font Lock mode. Font Lock mode normally manages only the @code{face}
+property; if you want it to manage others as well, you must specify
+them in a @var{facename} in @code{font-lock-keywords} as well as adding
+them to this list.
@end defvar
@node Levels of Font Lock
If @var{local} is non-@code{nil}, that says to remove @var{function}
from the buffer-local hook list instead of from the global hook list.
@end defun
-
-@ignore
- arch-tag: 4c7bff41-36e6-4da6-9e7f-9b9289e27c8e
-@end ignore
@code{locale-coding-system}. @xref{Locales,,, libc, GNU Libc Manual},
for more information about locales and locale items.
@end defun
-
-@ignore
- arch-tag: be705bf8-941b-4c35-84fc-ad7d20ddb7cb
-@end ignore
of @code{random}. On other machines, the result can never be larger
than a certain maximum or less than a certain (negative) minimum.
@end defun
-
-@ignore
- arch-tag: 574e8dd2-d513-4616-9844-c9a27869782e
-@end ignore
@cindex hyper characters
@cindex super characters
@cindex alt characters
- The X Window System defines three other @anchor{modifier bits}
-modifier bits that can be set
+ The X Window System defines three other modifier bits that can be set
in a character: @dfn{hyper}, @dfn{super} and @dfn{alt}. The syntaxes
for these bits are @samp{\H-}, @samp{\s-} and @samp{\A-}. (Case is
significant in these prefixes.) Thus, @samp{?\H-\M-\A-x} represents
Because of this recursive method, circular lists may therefore cause
infinite recursion (leading to an error).
-
-@ignore
- arch-tag: 9711a66e-4749-4265-9e8c-972d55b67096
-@end ignore
The operating system puts limits on the range of possible time values;
if you try to encode a time that is out of range, an error results.
-For instance, years before 1970 do not work on some systems;
-on others, years as early as 1901 do work.
@end defun
@node Time Calculations
nil)
@end group
@end example
-
-@ignore
- arch-tag: 8378814a-30d7-467c-9615-74a80b9988a7
-@end ignore
+++ /dev/null
-#!/bin/sh
-# Generate a permuted index of all names.
-# The result is a file called index.fns.
-
-# Copyright (C) 2001 Free Software Foundation, Inc.
-#
-# This file is part of GNU Emacs.
-#
-# GNU Emacs is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# GNU Emacs is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Emacs; see the file COPYING. If not, write to the
-# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
-# You will need to modify this for your needs.
-
-
-set TEXINDEX=texindex # path to texindex command
-#set EMACS=gnuemacs # your emacs command
-#set TEX=tex # your tex command
-
-set MANUAL=elisp # the base name of the manual
-
-# goto 3
-
-1:
-echo "Extract raw index from texinfo fn index."
-# Let texindex combine duplicate entries, later.
-# But it wants to protect non-alphanumerics thus confusing ptx.
-# Also change `\ ' to just a ` ', since texindex will fail. This is produced
-# by `@findex two words' in an example environment (no doubt among others).
-# delete wrapper parens
-# change dots {} to dots{}
-# change {-} to char form, so ptx wont ignore it.
-# delete leading \entry {
-# change '\ ' to ' '
-# change lines with = < > since they mess up field extraction.
-# separate into fields delimited by "
-rm -f permuted.raw
-cat ${MANUAL}.fn | \
- sed \
- -e 's/(\([^)]*\))/\1/' \
- -e 's/\\dots {}/(\\dots{})/' \
- -e "s/{-}/{{\\tt\\char'055}}/" \
- -e 's,^[^ ]* {,,' \
- -e 's, },},' \
- -e 's,\\ , ,g' \
- -e 's/{\\tt\\char61}/=/' \
- -e 's/{\\tt\\gtr}/>/' \
- -e 's/{\\tt\\less}/</' \
- -e 's/}{/"/g' \
- | awk -F\" '{print $2, $1}' > permuted.raw
-
-2:
-# Build break file for ptx.
-cat <<EOF > permuted.break
--
-:
-EOF
-# Build the ignore file for ptx.
-# We would like to ignore "and", "or", and "for",
-# but ptx ignores ignore words even if they stand alone.
-cat <<EOF > permuted.ignore
-the
-in
-to
-as
-a
-an
-of
-on
-them
-how
-from
-by
-EOF
-
-echo "Make troff permuted index."
-rm -f permuted.t
-ptx -i permuted.ignore -b permuted.break -f -r -w 144 \
- < permuted.raw > permuted.t
-
-3:
-echo "Extract the desired fields."
-rm -f permuted.fields
-awk -F\" '{printf "%s\"%s\"%s\n", $4,$6,$9}' permuted.t > permuted.fields
-
-4:
-echo "Format for texindex."
-# delete lines that start with "and ", "for "
-sed < permuted.fields \
- -e 's/=/{\\tt\\char61}/' \
- -e 's/>/{\\tt\\gtr}/' \
- -e 's/</{\\tt\\less}/' \
- -e '/"and /d' \
- -e '/"for /d' \
- | awk -F\" 'NF>0 {if ($1=="") {\
- print "\entry {" $2 "}{" 0+$3 "}{" $2 "}" }\
- else {\
- print "\entry {" $2 ", " $1 "}{" 0+$3 "}{" $2 ", " $1 "}"} }'\
- > permuted.fn
-
-5:
-echo "Sort with texindex."
-${TEXINDEX} permuted.fn
-#mv permuted.fns ${MANUAL}.fns
-
-# The resulting permuted.fns will be read when we run TeX
-# on the manual the second time. Or you can use permuted.texinfo here.
-#${TEX} permuted.texinfo
-
-6:
-echo "Clean up."
-rm -f permuted.fields permuted.t permuted.raw
-rm -f permuted.break permuted.ignore permuted.fn
@end group
@end example
@end defspec
-
-@ignore
- arch-tag: 56e8ff26-4ffe-4832-a141-7e991a2d0f87
-@end ignore
@var{host} is the host name (a string), and @var{service} is the name of
a defined network service (a string) or a port number (an integer).
@end defun
-
-@ignore
- arch-tag: ba9da253-e65f-4e7f-b727-08fba0a1df7a
-@end ignore
For a detailed explanation of this regular expression, see @ref{Regexp
Example}.
@end defvar
-
-@ignore
- arch-tag: c2573ca2-18aa-4839-93b8-924043ef831f
-@end ignore
arguments. This is a special feature to make it easy to access the entire
contents of a byte-code function object. @xref{Byte-Code Objects}.
-In Emacs versions before 21, the @code{vconcat} function allowed
-integers as arguments, converting them to strings of digits, but that
-feature has been eliminated. The proper way to convert an integer to
-a decimal number in this way is with @code{format} (@pxref{Formatting
-Strings}) or @code{number-to-string} (@pxref{String Conversion}).
+The @code{vconcat} function also allows integers as arguments. It
+converts them to strings of digits, making up the decimal print
+representation of the integer, and then uses the strings instead of the
+original integers. @strong{Don't use this feature; we plan to eliminate
+it. If you already use this feature, change your programs now!} The
+proper way to convert an integer to a decimal number in this way is with
+@code{format} (@pxref{Formatting Strings}) or @code{number-to-string}
+(@pxref{String Conversion}).
For other concatenation functions, see @code{mapconcat} in @ref{Mapping
Functions}, @code{concat} in @ref{Creating Strings}, and @code{append}
These results make sense because the binary codes for control-_ and
control-W are 11111 and 10111, respectively.
-@ignore
- arch-tag: fcf1084a-cd29-4adc-9f16-68586935b386
-@end ignore
@code{nil} (which is the default) means no limit.
@end defvar
-@defopt eval-expression-print-length
-@defoptx eval-expression-print-level
-These are the values for @code{print-length} and @code{print-level}
-used by @code{eval-expression}, and thus, indirectly, by many
-interactive evaluation commands (@pxref{Lisp Eval,, Evaluating
-Emacs-Lisp Expressions, emacs, The GNU Emacs Manual}).
-@end defopt
-
These variables are used for detecting and reporting circular
and shared structure---but they are only defined in Emacs 21.
the @code{print-circle} feature. You should not use it except
to bind it to @code{nil} when you bind @code{print-continuous-numbering}.
@end defvar
-
-@ignore
- arch-tag: 07636b8c-c4e3-4735-9e06-2e864320b434
-@end ignore
For information about other concatenation functions, see the
description of @code{mapconcat} in @ref{Mapping Functions},
-@code{vconcat} in @ref{Vector Functions}, and @code{append} in @ref{Building
+@code{vconcat} in @ref{Vectors}, and @code{append} in @ref{Building
Lists}.
@end defun
This command displays a description of the contents of the current
buffer's case table.
@end deffn
-
-@ignore
- arch-tag: 700b8e95-7aa5-4b52-9eb3-8f2e1ea152b4
-@end ignore
(plist-put (symbol-plist symbol) prop value)))
@end example
-@defun lax-plist-get plist property
-Like @code{plist-get} except that it compares properties
-using @code{equal} instead of @code{eq}.
-@end defun
-
-@defun lax-plist-put plist property value
-Like @code{plist-put} except that it compares properties
-using @code{equal} instead of @code{eq}.
-@end defun
-
@defun plist-member plist property
@tindex plist-member
This returns non-@code{nil} if @var{plist} contains the given
The value is actually the tail of @var{plist} whose @code{car} is
@var{property}.
@end defun
-
-@ignore
- arch-tag: 8750b7d2-de4c-4923-809a-d35fc39fd8ce
-@end ignore
category table. The descriptions are inserted in a buffer, which is
then displayed.
@end deffn
-
-@ignore
- arch-tag: 4d914e96-0283-445c-9233-75d33662908c
-@end ignore
position stored in a register.
* Base 64:: Conversion to or from base 64 encoding.
* MD5 Checksum:: Compute the MD5 ``message digest''/``checksum''.
-* Atomic Changes:: Installing several buffer changs ``atomically''.
* Change Hooks:: Supplying functions to be run when text is changed.
@end menu
---------- Buffer: bar ----------
@end group
@end example
-@end defun
-
-@defun insert-buffer-substring-no-properties from-buffer-or-name &optional start end
-This is like @code{insert-buffer-substring} except that it does not
-copy any text properties.
@end defun
@xref{Sticky Properties}, for other insertion functions that inherit
@menu
* Kill Ring Concepts:: What text looks like in the kill ring.
* Kill Functions:: Functions that kill text.
-* Yanking:: How yanking is done.
* Yank Commands:: Commands that access the kill ring.
* Low-Level Kill Ring:: Functions and variables for kill ring access.
* Internals of Kill Ring:: Variables that hold kill-ring data.
@code{last-command}) whether the previous command was a kill command,
and if so appends the killed text to the most recent entry.
-@deffn Command kill-region start end &optional yank-handler
+@deffn Command kill-region start end
This function kills the text in the region defined by @var{start} and
@var{end}. The text is deleted but saved in the kill ring, along with
its text properties. The value is always @code{nil}.
ring just the same, then signals an error without modifying the buffer.
This is convenient because it lets the user use a series of kill
commands to copy text from a read-only buffer into the kill ring.
-
-If @var{yank-handler} is non-@code{nil}, this puts that value onto
-the string of killed text, as a @code{yank-handler} property.
-@xref{Yanking}.
@end deffn
@defopt kill-read-only-ok
Ring}.
@end deffn
-@node Yanking
-@subsection Yanking
-
- Yanking means inserting text from the kill ring, but it does
-not insert the text blindly. Yank commands and some other commands
-use @code{insert-for-yank} to perform special processing on the
-text that they copy into the buffer.
-
-@defun insert-for-yank string
-This function normally works like @code{insert} except that it doesn't
-insert the text properties in the @code{yank-excluded-properties}
-list. However, if the first character of @var{string} has a
-non-@code{nil}@code{yank-handler} text property, that property
-can do various special processing on the text being inserted.
-@end defun
-
-@defun insert-buffer-substring-as-yank buf &optional start end
-This function resembles @code{insert-buffer-substring} except that it
-doesn't insert the text properties in the
-@code{yank-excluded-properties} list.
-@end defun
-
- You can put a @code{yank-handler} text property on the text to
-control how it will be inserted if it is yanked. The
-@code{insert-for-yank} function looks for a @code{yank-handler}
-property on the first character in its @var{string} argument. The
-property value must be a list of one to four elements, with the
-following format (where elements after the first may be omitted):
-
-@example
-(@var{function} @var{param} @var{noexclude} @var{undo})
-@end example
-
- Here is what the elements do:
-
-@table @var
-@item function
-When @var{function} is present and non-nil, it is called instead of
-@code{insert} to insert the string. @var{function} takes one
-argument---the string to insert.
-
-@item param
-If @var{param} is present and non-@code{nil}, it replaces @var{string}
-as the object passed to @var{function} (or @code{insert}); for
-example, if @var{function} is @code{yank-rectangle}, @var{param}
-should be a list of strings to insert as a rectangle.
-
-@item noexclude
-If @var{noexclude} is present and non-@code{nil}, the normal removal of the
-yank-excluded-properties is not performed; instead @var{function} is
-responsible for removing those properties. This may be necessary
-if @var{function} adjusts point before or after inserting the object.
-
-@item undo
-If @var{undo} is present and non-nil, it is a function that will be
-called by @code{yank-pop} to undo the insertion of the current object.
-It is called with two arguments, the start and end of the current
-region. @var{function} can set @code{yank-undo-function} to override
-the @var{undo} value.
-@end table
-
@node Yank Commands
@comment node-name, next, previous, up
@subsection Functions for Yanking
The return value is always @code{nil}.
@end deffn
-@defvar yank-undo-function
-If this variable is non-@code{nil}, the function @code{yank-pop} uses
-its value instead of @code{delete-region} to delete the text
-inserted by the previous @code{yank} or
-@code{yank-pop} command.
-
-The function @code{insert-for-yank} automatically sets this variable
-according to the @var{undo} element of the @code{yank-handler}
-text property, if there is one.
-@end defvar
-
@node Low-Level Kill Ring
@subsection Low-Level Kill Ring
the kill ring.
@end defun
-@defun kill-new string &optional yank-handler
+@defun kill-new string
This function puts the text @var{string} into the kill ring as a new
entry at the front of the ring. It discards the oldest entry if
appropriate. It also invokes the value of
@code{interprogram-cut-function} (see below).
-
-If @var{yank-handler} is non-@code{nil}, this puts that value onto
-the string of killed text, as a @code{yank-handler} property.
-@xref{Yanking}.
@end defun
-@defun kill-append string before-p &optional yank-handler
+@defun kill-append string before-p
This function appends the text @var{string} to the first entry in the
kill ring. Normally @var{string} goes at the end of the entry, but if
@var{before-p} is non-@code{nil}, it goes at the beginning. This
function also invokes the value of @code{interprogram-cut-function} (see
-below). This handles @var{yank-handler} just like @code{kill-new}.
+below).
@end defun
@defvar interprogram-paste-function
list.
@end defun
-@defun remove-list-of-text-properties start end list-of-properties &optional object
-Like @code{remove-list-properties} except that
-@var{list-of-properties} is a list property names only, not an
-alternating list of property values.
-@end defun
-
@defun set-text-properties start end props &optional object
This function completely replaces the text property list for the text
between @var{start} and @var{end} in the string or buffer @var{object}.
coding instead.
@end defun
-@node Atomic Changes
-@section Atomic Change Groups
-@cindex atomic changes
-
- In data base terminology, an @dfn{atomic} change is an indivisible
-change---it can succeed entirely or it can fail entirely, but it
-cannot partly succeed. A Lisp program can make a series of changes to
-one or several buffers as an @dfn{atomic change group}, meaning that
-either the entire series of changes will be installed in their buffers
-or, in case of an error, none of them will be.
-
- To do this for one buffer, the one already current, simply write a
-call to @code{atomic-change-group} around the code that makes the
-changes, like this:
-
-@example
-(atomic-change-group
- (insert foo)
- (delete-region x y))
-@end example
-
-@noindent
-If an error (or other nonlocal exit) occurs inside the body of
-@code{atomic-change-group}, it unmakes all the changes in that buffer
-that were during the execution of the body. This kind of change group
-has no effect on any other buffers--any such changes remain.
-
- If you need something more sophisticated, such as to make changes in
-various buffers constitute one atomic group, you must directly call
-lower-level functions that @code{atomic-change-group} uses.
-
-@defun prepare-change-group &optional buffer
-This function sets up a change group for buffer @var{buffer}, which
-defaults to the current buffer. It returns a ``handle'' that
-represents the change group. You must use this handle to activate the
-change group and subsequently to finish it.
-@end defun
-
- To use the change group, you must @dfn{activate} it. You must do
-this before making any changes in the text of @var{buffer}.
-
-@defun activate-change-group handle
-This function activates the change group that @var{handle} designates.
-@end defun
-
- After you activate the change group, any changes you make in that
-buffer become part of it. Once you have made all the desired changes
-in the buffer, you must @dfn{finish} the change group. There are two
-ways to do this: you can either accept (and finalize) all the changes,
-or cancel them all.
-
-@defun accept-change-group handle
-This function accepts all the changes in the change group specified by
-@var{handle}, making them final.
-@end defun
-
-@defun cancel-change-group handle
-This function cancels and undoes all the changes in the change group
-specified by @var{handle}.
-@end defun
-
- Your code should use @code{unwind-protect} to make sure the group is
-always finished. The call to @code{activate-change-group} should be
-inside the @code{unwind-protect}, in case the user types @kbd{C-g}
-just after it runs. (This is one reason why
-@code{prepare-change-group} and @code{activate-change-group} are
-separate functions, because normally you would call
-@code{prepare-change-group} before the start of that
-@code{unwind-protect}.) Once you finish the group, don't use the
-handle again---in particular, don't try to finish the same group
-twice.
-
- To make a multibuffer change group, call @code{prepare-change-group}
-once for each buffer you want to cover, then use @code{nconc} to
-combine the returned values, like this:
-
-@example
-(nconc (prepare-change-group buffer-1)
- (prepare-change-group buffer-2))
-@end example
-
-You can then activate the multibuffer change group with a single call
-to @code{activate-change-group}, and finish it with a single call to
-@code{accept-change-group} or @code{cancel-change-group}.
-
- Nested use of several change groups for the same buffer works as you
-would expect. Non-nested use of change groups for the same buffer
-will get Emacs confused, so don't let it happen; the first change
-group you start for any given buffer should be the last one finished.
-
@node Change Hooks
@section Change Hooks
@cindex change hooks
This variable is available starting in Emacs 21.
@end defvar
-
-@ignore
- arch-tag: 3721e738-a1cb-4085-bc1a-6cb8d8e1d32b
-@end ignore
print " $key\n";
}
-# arch-tag: f8460df6-6bef-4c98-8555-e2c63a88b0fa
@end example
@noindent
-The description should be complete in one line. If the file
-needs a @samp{-*-} specification, put it after @var{description}.
+The description should be complete in one line.
After the copyright notice come several @dfn{header comment} lines,
each beginning with @samp{;; @var{header-name}:}. Here is a table of
Its purpose is to enable people to detect truncated versions of the file
from the lack of a footer line.
@end table
-
-@ignore
- arch-tag: 9ea911c2-6b1d-47dd-88b7-0a94e8b27c2e
-@end ignore
(defun volume-numbers-toc-markup-I () (volume-numbers-toc-markup "I"))
(defun volume-numbers-toc-markup-II () (volume-numbers-toc-markup "II"))
-
-;;; arch-tag: 848955fe-e9cf-45e7-a2f1-570ef156d6a5
All of the @var{value-form}s in @var{bindings} are evaluated in the
order they appear and @emph{before} binding any of the symbols to them.
-Here is an example of this: @code{z} is bound to the old value of
-@code{y}, which is 2, not the new value of @code{y}, which is 1.
+Here is an example of this: @code{Z} is bound to the old value of
+@code{Y}, which is 2, not the new value of @code{Y}, which is 1.
@example
@group
-(setq y 2)
+(setq Y 2)
@result{} 2
@end group
@group
-(let ((y 1)
- (z y))
- (list y z))
+(let ((Y 1)
+ (Z Y))
+ (list Y Z))
@result{} (1 2)
@end group
@end example
@example
@group
-(setq y 2)
+(setq Y 2)
@result{} 2
@end group
@group
-(let* ((y 1)
- (z y)) ; @r{Use the just-established value of @code{y}.}
- (list y z))
+(let* ((Y 1)
+ (Z Y)) ; @r{Use the just-established value of @code{Y}.}
+ (list Y Z))
@result{} (1 1)
@end group
@end example
unconditionally; @code{nil} means ignore them; anything else means ask
the user what to do for each file. The default value is @code{maybe}.
@end defopt
-
-@ignore
- arch-tag: 5ff62c44-2b51-47bb-99d4-fea5aeec5d3e
-@end ignore
\f
These words prevent "local variables" above from confusing Emacs.
-
-@ignore
- arch-tag: 9594760d-8801-4d1b-aeb9-f3b3166b5be2
-@end ignore
\f
These words prevent "local variables" above from confusing Emacs.
-
-@ignore
- arch-tag: dfdbecf8-fec2-49c1-8427-3e8ac8b0b849
-@end ignore
employ heuristics in choosing or creating a window; use these functions
when you need complete control.
-@defun set-window-buffer window buffer-or-name &optional keep-margins
+@defun set-window-buffer window buffer-or-name
This function makes @var{window} display @var{buffer-or-name} as its
contents. It returns @code{nil}. This is the fundamental primitive
for changing which buffer is displayed in a window, and all ways
@result{} nil
@end group
@end example
-
-Normally, displaying @var{buffer} in @var{window} resets the window's
-fringe widths and position based on the local variables of @var{buffer}.
-However, if @var{keep-margins} is non-@code{nil}, the fringe widths and
-position of @var{window} remain unchanged. @xref{Fringes}.
@end defun
@defun window-buffer &optional window
window. The frame whose window configuration has changed is the
selected frame when this hook runs.
@end defvar
-
-@ignore
- arch-tag: 3f6c36e8-df49-4986-b757-417feed88be3
-@end ignore
Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted provided the copyright notice and this notice are preserved.
-
-;;; arch-tag: 0cd8ab87-d764-40d9-b86d-d00c71887a9e
../lib-src/etags $(srcdir)/*.[ch]
tags: TAGS
.PHONY: tags
-
-# arch-tag: a881fa74-b56a-44c6-80b4-28a4c65d88ff
{"main", xaw_create_main},
{NULL, NULL}
};
-
-/* arch-tag: fbbd3589-ae1c-41a0-9142-f628cfee6564
- (do not change this comment) */
xaw_pop_instance __P ((widget_instance *, Boolean));
#endif /* LWLIB_XAW_H */
-
-/* arch-tag: 7c0fb4de-afd9-4112-9214-24b663cc1870
- (do not change this comment) */
XtDestroyWidget (instance->widget);
}
-/* arch-tag: 541e3912-477d-406e-9bf2-dbf2b7ff8c3b
- (do not change this comment) */
xlw_popup_menu __P ((Widget widget, XEvent * event));
#endif /* LWLIB_XLW_H */
-
-/* arch-tag: e5b1511d-8992-4dad-b947-a2440d8f10a2
- (do not change this comment) */
{
XtVaSetValues (w, XtNallowShellResize, flag, NULL);
}
-
-/* arch-tag: 73976f64-73b2-4600-aa13-d9ede20ee965
- (do not change this comment) */
xm_manage_resizing __P ((Widget w, Boolean flag));
#endif /* LWLIB_XM_H */
-
-/* arch-tag: 61561304-c146-437b-8ed3-dc33818703c6
- (do not change this comment) */
widget_instance * lw_get_widget_instance __P ((Widget));
#endif /* LWLIB_INTERNAL_H */
-
-/* arch-tag: ae02f67d-ef25-421c-b956-b01a4b0aac76
- (do not change this comment) */
abort ();
#endif
}
-
-/* arch-tag: f21f0a1f-2a4e-44e1-8715-7f234fe2d159
- (do not change this comment) */
void XtSafelyDestroyWidget __P ((Widget));
#endif /* _LWLIB_UTILS_H_ */
-
-/* arch-tag: 705efd86-9319-4447-80f6-16aa5b349809
- (do not change this comment) */
return separator_p;
}
-/* arch-tag: 3d730f36-a441-4a71-9971-48ef3b5a4d9f
- (do not change this comment) */
void lwlib_bcopy __P ((char*, char*, int));
#endif /* LWLIB_H */
-
-/* arch-tag: 44d818d5-7eb2-4d87-acd7-b992bb0d5d20
- (do not change this comment) */
handle_motion_event (mw, (XMotionEvent*)event);
}
-
-/* arch-tag: 657f43dd-dfd0-4cc9-910c-52935f01176e
- (do not change this comment) */
pop_up_menu __P ((XlwMenuWidget, XButtonPressedEvent*));
#endif /* _XlwMenu_h */
-
-/* arch-tag: 0c019735-d61b-4080-be85-4fdd6e50ae07
- (do not change this comment) */
extern XlwMenuClassRec xlwMenuClassRec;
#endif /* _XlwMenuP_h */
-
-/* arch-tag: 18d7fc41-ffa0-47a3-a49f-3469900c7a25
- (do not change this comment) */
Copyright (C) 2001 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted provided the copyright notice and this notice are preserved.
-
-;;; arch-tag: c6fd43f7-0e50-4c0a-ac82-1c8a9e45a9bf
#endif
#endif
-
-/* arch-tag: 8d4114d1-633e-49e7-8f18-b5648f9c4511
- (do not change this comment) */
/* #define GLYPH_DEBUG 1 */
#define NO_RETURN /* nothing */
-
-/* arch-tag: 2596b649-b569-448e-8880-373d2a9909b7
- (do not change this comment) */
#define MAC_OS8 1
#define MAC_OS 1
-
-/* arch-tag: 4aa4fcea-3a95-433d-a7d6-b029afca17f1
- (do not change this comment) */
extern struct dirent *readdir(DIR *);
#endif /* _DIRENT_H */
-
-/* arch-tag: ec3116df-70f9-4a4a-b6d0-1858aaa9ea22
- (do not change this comment) */
/* Where Emacs should look for the application default file. */
/* #define PATH_X_DEFAULTS "/usr/lib/X11/%L/%T/%N%C%S:/usr/lib/X11/%l/%T/%N%C%S:/usr/lib/X11/%T/%N%C%S:/usr/lib/X11/%L/%T/%N%S:/usr/lib/X11/%l/%T/%N%S:/usr/lib/X11/%T/%N%S" */
-
-/* arch-tag: 32e95134-dfe4-47be-be28-e8cbf78505b6
- (do not change this comment) */
extern int sign_extend_temp;
#endif
#endif
-
-/* arch-tag: 9e759031-ab7b-4c76-99d7-3ae94a98de38
- (do not change this comment) */
struct passwd *getpwnam(const char *);
#endif /* _PWD_H */
-
-/* arch-tag: e169cad7-12ca-4660-a35e-36f80d5d345f
- (do not change this comment) */
#define volatile
#define SYMS_SYSTEM syms_of_mac()
-
-/* arch-tag: 6a941c4b-a419-4d25-80ac-9335053e58b2
- (do not change this comment) */
char *getwd(char *);
#endif /* _SYS_FILE_H */
-
-/* arch-tag: c3a653d5-f228-4d62-a47c-0398015195de
- (do not change this comment) */
#define TCGETA 2
#endif /* _SYS_IOCTL_H */
-
-/* arch-tag: fa0c3dda-dbe0-4a49-86c4-7516c83c3c8c
- (do not change this comment) */
#define MAXPATHLEN 255
#endif /* _SYS_PARAM_H */
-
-/* arch-tag: dceae288-b9cf-4a8f-a780-bca2cadf0c47
- (do not change this comment) */
#endif /* __MRC__ */
#endif /* _SYS_STAT_H */
-
-/* arch-tag: b7da83f5-3d3f-4b19-9cd2-790dd87145e4
- (do not change this comment) */
};
#endif /* _SYS_TYPES_H */
-
-/* arch-tag: f85ed04d-0e99-4f97-892b-fe029d0e92f9
- (do not change this comment) */
#endif /* __MRC__ */
#endif /* _SYS_TYPES_H */
-
-/* arch-tag: d4b69a6a-b2ff-4be2-a152-a162af81d823
- (do not change this comment) */
#define TCSETAF 5
#endif /* _SYS_TERMIO_H */
-
-/* arch-tag: 0e7a100d-2ac0-412e-9dc4-52e39ef43e14
- (do not change this comment) */
int utime(const char *path, const struct utimbuf *buf);
#endif
-
-/* arch-tag: 52dc3f6b-6122-4568-8f09-a5a56de6a324
- (do not change this comment) */
int uname(struct utsname *name);
#endif
-
-/* arch-tag: 8a013744-4d43-4084-8e2f-d3fb66c83160
- (do not change this comment) */
echo "Cleaning up the staging directory"
rm -rf ${builddir}/mac/Emacs.pkg ${removable_build_dir}
-# arch-tag: 1b631d0d-9fde-4f71-80c0-33e0e5815515
### make-package ends here
"{Source}chdir.c.x" Ä {Makefile} "{Source}chdir.c"
{PPCC} "{Source}chdir.c" -o "{Source}chdir.c.x" {Make-DocFile-PPCCOptions}
-# arch-tag: c9d9bc1a-142f-41da-b75e-79e0c44ffbb4
return error == noErr ? 0 : -1;
}
-
-/* arch-tag: f567b034-fd9e-43d1-94cb-9012375237d1
- (do not change this comment) */
rm -rf ${tempparent}
fi
-# arch-tag: 26e3eb50-a394-4ab2-82b2-d8e5af500de7
### make-dist ends here
-2003-09-03 Peter Runestig <peter@runestig.com>
-
- * makefile.w32-in: New file.
-
-2003-08-29 Richard M. Stallman <rms@gnu.org>
-
- * misc.texi (Saving Emacs Sessions): Correct previous change.
-
-2003-08-26 Per Abrahamsen <abraham@dina.kvl.dk>
-
- * widget.texi (User Interface): Explain the need of static text
- around an editable field.
-
-2003-08-19 Luc Teirlinck <teirllm@mail.auburn.edu>
-
- * widget.texi (Basic Types): The argument to `:help-echo' can now
- be a form that evaluates to a string.
-
- * emacs.texi (Top): Update menu to reflect new Keyboard Macros
- chapter.
- (Intro): Include kmacro.texi after fixit.texi instead of after
- custom.texi. (As suggested by Kim Storm.)
-
-2003-08-18 Luc Teirlinck <teirllm@mail.auburn.edu>
-
- * fixit.texi (Fixit): Update `Next' pointer.
- * files.texi (Files): Update `Previous' pointer.
- * kmacro.texi (Keyboard Macros): Remove redundant node and
- section.
- * emacs.texi (Intro): Include kmacro.texi after custom.texi.
- (Suggested by Kim Storm.)
- * Makefile (EMACSSOURCES): Add kmacro.texi. (Suggested by Kim
- Storm.)
-
-2003-08-18 Kim F. Storm <storm@cua.dk>
-
- * kmacro.texi: New file describing enhanced keyboard macro
- functionality. Replaces old description in custom.texi.
-
- * custom.texi (Customization): Add xref to Keyboard Macros chapter.
- (Keyboard Macros): Move to new kmacro.texi file.
-
- * emacs.texi (Keyboard Macros): Reference new keyboard macro topics.
-
- * calc.texi (Queries in Macros): Update xref to keyboard macro query.
-
-2003-08-17 Edward M. Reingold <reingold@emr.cs.iit.edu>
-
- * calendar.texi (Specified Dates): Add `calendar-goto-day-of-year'.
-
-2003-08-17 Alex Schroeder <alex@gnu.org>
-
- * misc.texi (Saving Emacs Sessions): Manual M-x desktop-save not
- required.
-
-2003-08-16 Richard M. Stallman <rms@gnu.org>
-
- * dired-x.texi (Shell Command Guessing): Explain *.
-
-2003-08-16 Chunyu Wang <spr@db.cs.hit.edu.cn> (tiny change)
-
- * pcl-cvs.texi (Log Edit Mode): Fix key binding for
- log-edit-insert-changelog.
-
-2003-08-05 Richard M. Stallman <rms@gnu.org>
-
- * programs.texi (Lisp Indent): Don't describe
- lisp-indent-function property here. Use xref to Lisp Manual.
-
2003-08-03 Karl Berry <karl@gnu.org>
* info.texi: need @contents.
University of Washington.
;; Local Variables:
-;; coding: iso-2022-7bit
+;; coding: iso-2022-7bit-unix
;; End:
Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001
Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted provided the copyright notice and this notice are preserved.
-
-;;; arch-tag: f1d62776-3ed5-4811-9d96-267252577dbd
${srcdir}/msdog.texi \
${srcdir}/gnu.texi \
${srcdir}/glossary.texi \
- ${srcdir}/ack.texi \
- ${srcdir}/kmacro.texi
+ ${srcdir}/ack.texi
info: $(INFO_TARGETS)
# That caused trouble because this is run entirely in the source directory.
# Since we expect to get texi2dvi from elsewhere,
# it is ok to expect texindex from elsewhere also.
-
-# arch-tag: 19cdb89e-4acb-448e-b0cc-2ddc05948ee2
the variable @code{dabbrev-abbrev-skip-leading-regexp}. Its value
should be a regular expression that matches the optional prefix that
dynamic abbreviation should ignore.
-
-@ignore
- arch-tag: 638e0079-9540-48ec-9166-414083e16445
-@end ignore
This list intended to mention every contributor of a major package or
feature we currently distribute; if you know of someone we have omitted,
please report that as a manual bug.
-
-@ignore
- arch-tag: bb1d0fa4-0240-4992-b5d4-8602d1e3d4ba
-@end ignore
@contents
@bye
-
-@ignore
- arch-tag: 68cf0d8a-55cc-4190-a28d-4984fa56ed1e
-@end ignore
To keep up with decreasing computer memory capacity and disk space, many
other functions and files have been eliminated in Emacs 21.3.
@end itemize
-
-@ignore
- arch-tag: 32932bd9-46f5-41b2-8a0e-fb0cc4caeb29
-@end ignore
@setchapternewpage odd
@contents
@bye
-
-@ignore
- arch-tag: 54001b27-5ef8-4a9d-a199-905d650fafba
-@end ignore
}
\eject\bye
-
-@ignore
- arch-tag: e1830f4c-dc4a-4314-b706-a03c7e93f022
-@end ignore
z z z}. The first @kbd{C-x z} repeats the command once, and each
subsequent @kbd{z} repeats it once again.
-@ignore
- arch-tag: cda8952a-c439-41c1-aecf-4bc0d6482956
-@end ignore
prefer. It replaces the bindings of @code{mouse-buffer-menu},
normally on @kbd{C-Down-Mouse-1}, and the menu bar buffer menu. You
can customize the menu in the @code{msb} Custom group.
-
-@ignore
- arch-tag: 08c43460-f4f4-4b43-9cb5-1ea9ad991695
-@end ignore
the function definition that point is in, but the way of doing so is
different according to where the relevant Lisp environment is found.
@xref{Executing Lisp}.
-
-@ignore
- arch-tag: 9c3c2f71-b332-4144-8500-3ff9945a50ed
-@end ignore
as interactive input. All the normal conventions of algebraic input,
including the use of @kbd{$} characters, are supported.
-@xref{Keyboard Macro Query, , , emacs, the Emacs Manual}, for a description of
+@xref{Kbd Macro Query, , , emacs, the Emacs Manual}, for a description of
@kbd{C-x q} (@code{kbd-macro-query}), the standard Emacs way to accept
keyboard input during a keyboard macro. In particular, you can use
@kbd{C-x q} to enter a recursive edit, which allows the user to perform
@bye
-@ignore
- arch-tag: 77a71809-fa4d-40be-b2cc-da3e8fb137c0
-@end ignore
@table @kbd
@item g d
Move point to specified date (@code{calendar-goto-date}).
-@item g D
-Move point to specified day of year (@code{calendar-goto-day-of-year}).
@item o
Center calendar around specified month (@code{calendar-other-month}).
@item .
dates from the beginning of the current era, you must type the year in its
entirety; that is, type @samp{1990}, not @samp{90}.
-@kindex g D @r{(Calendar mode)}
-@findex calendar-goto-day-of-year
- @kbd{g D} (@code{calendar-goto-day-of-year}) prompts for a year and
-day number, and moves to that date. Negative day numbers count backward
-from the end of the year.
-
@kindex o @r{(Calendar mode)}
@findex calendar-other-month
@kbd{o} (@code{calendar-other-month}) prompts for a month and year,
timeclock's customizable variables, you should run the command
@kbd{M-x timeclock-reread-log} to update the data in Emacs from the
file.
-
-@ignore
- arch-tag: 4531ef09-9df3-449d-9c52-2b5a4a337f92
-@end ignore
@end iftex
@bye
-
-@ignore
- arch-tag: c4cab162-5e57-4366-bdce-4a9db2fc97f0
-@end ignore
@setchapternewpage odd
@contents
@bye
-
-@ignore
- arch-tag: b61e7200-3bfa-4a70-a9d3-095e152696f8
-@end ignore
rather than showing a frame right away. In this situation, the icon
is the only indication that Emacs has started; the text frame doesn't
appear until you deiconify it.
-
-@ignore
- arch-tag: fffecd9e-7329-4a51-a3cc-dd4a9889340e
-@end ignore
If you disable multibyte characters, then you can use only one
alphabet of non-ASCII characters, but they all fit in one byte. They
use codes 0200 through 0377. @xref{Single-Byte Character Support}.
-
-@ignore
- arch-tag: 9be43eef-d1f4-4d03-a916-c741ea713a45
-@end ignore
customizations for future sessions, this actually works by editing
@file{.emacs} for you.
- Another means of customization is the keyboard macro, which is a
-sequence of keystrokes to be replayed with a single command.
-@xref{Keyboard Macros}, for full instruction how to record, manage, and
-replay sequences of keys.
-
@menu
* Minor Modes:: Each minor mode is one feature you can turn on
independently of any others.
* Variables:: Many Emacs commands examine Emacs variables
to decide what to do; by setting variables,
you can control their functioning.
+* Keyboard Macros:: A keyboard macro records a sequence of
+ keystrokes to be replayed with a single
+ command.
* Key Bindings:: The keymaps say what command each key runs.
By changing them, you can "redefine keys".
* Keyboard Translations::
neither @code{t} nor @code{nil}, so normally Emacs does ask for
confirmation about file settings for these variables.
+@node Keyboard Macros
+@section Keyboard Macros
+
+@cindex defining keyboard macros
+@cindex keyboard macro
+ A @dfn{keyboard macro} is a command defined by the user to stand for
+another sequence of keys. For example, if you discover that you are
+about to type @kbd{C-n C-d} forty times, you can speed your work by
+defining a keyboard macro to do @kbd{C-n C-d} and calling it with a
+repeat count of forty.
+
+@table @kbd
+@item C-x (
+Start defining a keyboard macro (@code{start-kbd-macro}).
+@item C-x )
+End the definition of a keyboard macro (@code{end-kbd-macro}).
+@item C-x e
+Execute the most recent keyboard macro (@code{call-last-kbd-macro}).
+@item C-u C-x (
+Re-execute last keyboard macro, then add more keys to its definition.
+@item C-x q
+When this point is reached during macro execution, ask for confirmation
+(@code{kbd-macro-query}).
+@item M-x name-last-kbd-macro
+Give a command name (for the duration of the session) to the most
+recently defined keyboard macro.
+@item M-x insert-kbd-macro
+Insert in the buffer a keyboard macro's definition, as Lisp code.
+@item C-x C-k
+Edit a previously defined keyboard macro (@code{edit-kbd-macro}).
+@item M-x apply-macro-to-region-lines
+Run the last keyboard macro on each complete line in the region.
+@end table
+
+ Keyboard macros differ from ordinary Emacs commands in that they are
+written in the Emacs command language rather than in Lisp. This makes it
+easier for the novice to write them, and makes them more convenient as
+temporary hacks. However, the Emacs command language is not powerful
+enough as a programming language to be useful for writing anything
+intelligent or general. For such things, Lisp must be used.
+
+ You define a keyboard macro while executing the commands which are the
+definition. Put differently, as you define a keyboard macro, the
+definition is being executed for the first time. This way, you can see
+what the effects of your commands are, so that you don't have to figure
+them out in your head. When you are finished, the keyboard macro is
+defined and also has been, in effect, executed once. You can then do the
+whole thing over again by invoking the macro.
+
+@menu
+* Basic Kbd Macro:: Defining and running keyboard macros.
+* Save Kbd Macro:: Giving keyboard macros names; saving them in files.
+* Kbd Macro Query:: Making keyboard macros do different things each time.
+@end menu
+
+@node Basic Kbd Macro
+@subsection Basic Use
+
+@kindex C-x (
+@kindex C-x )
+@kindex C-x e
+@findex start-kbd-macro
+@findex end-kbd-macro
+@findex call-last-kbd-macro
+ To start defining a keyboard macro, type the @kbd{C-x (} command
+(@code{start-kbd-macro}). From then on, your keys continue to be
+executed, but also become part of the definition of the macro. @samp{Def}
+appears in the mode line to remind you of what is going on. When you are
+finished, the @kbd{C-x )} command (@code{end-kbd-macro}) terminates the
+definition (without becoming part of it!). For example,
+
+@example
+C-x ( M-f foo C-x )
+@end example
+
+@noindent
+defines a macro to move forward a word and then insert @samp{foo}.
+
+ The macro thus defined can be invoked again with the @kbd{C-x e}
+command (@code{call-last-kbd-macro}), which may be given a repeat count
+as a numeric argument to execute the macro many times. @kbd{C-x )} can
+also be given a repeat count as an argument, in which case it repeats
+the macro that many times right after defining it, but defining the
+macro counts as the first repetition (since it is executed as you define
+it). Therefore, giving @kbd{C-x )} an argument of 4 executes the macro
+immediately 3 additional times. An argument of zero to @kbd{C-x e} or
+@kbd{C-x )} means repeat the macro indefinitely (until it gets an error
+or you type @kbd{C-g} or, on MS-DOS, @kbd{C-@key{BREAK}}).
+
+ If you wish to repeat an operation at regularly spaced places in the
+text, define a macro and include as part of the macro the commands to move
+to the next place you want to use it. For example, if you want to change
+each line, you should position point at the start of a line, and define a
+macro to change that line and leave point at the start of the next line.
+Then repeating the macro will operate on successive lines.
+
+ When a command reads an argument with the minibuffer, your
+minibuffer input becomes part of the macro along with the command. So
+when you replay the macro, the command gets the same argument as
+when you entered the macro. For example,
+
+@example
+C-x ( C-a C-@key{SPC} C-n M-w C-x b f o o @key{RET} C-y C-x b @key{RET} C-x )
+@end example
+
+@noindent
+defines a macro that copies the current line into the buffer
+@samp{foo}, then returns to the original buffer.
+
+ You can use function keys in a keyboard macro, just like keyboard
+keys. You can even use mouse events, but be careful about that: when
+the macro replays the mouse event, it uses the original mouse position
+of that event, the position that the mouse had while you were defining
+the macro. The effect of this may be hard to predict. (Using the
+current mouse position would be even less predictable.)
+
+ One thing that doesn't always work well in a keyboard macro is the
+command @kbd{C-M-c} (@code{exit-recursive-edit}). When this command
+exits a recursive edit that started within the macro, it works as you'd
+expect. But if it exits a recursive edit that started before you
+invoked the keyboard macro, it also necessarily exits the keyboard macro
+as part of the process.
+
+ After you have terminated the definition of a keyboard macro, you can add
+to the end of its definition by typing @kbd{C-u C-x (}. This is equivalent
+to plain @kbd{C-x (} followed by retyping the whole definition so far. As
+a consequence it re-executes the macro as previously defined.
+
+@findex edit-kbd-macro
+@kindex C-x C-k
+ You can edit a keyboard macro already defined by typing @kbd{C-x C-k}
+(@code{edit-kbd-macro}). Follow that with the keyboard input that you
+would use to invoke the macro---@kbd{C-x e} or @kbd{M-x @var{name}} or
+some other key sequence. This formats the macro definition in a buffer
+and enters a specialized major mode for editing it. Type @kbd{C-h m}
+once in that buffer to display details of how to edit the macro. When
+you are finished editing, type @kbd{C-c C-c}.
+
+@findex apply-macro-to-region-lines
+ The command @kbd{M-x apply-macro-to-region-lines} repeats the last
+defined keyboard macro on each complete line within the current region.
+It does this line by line, by moving point to the beginning of the line
+and then executing the macro.
+
+@node Save Kbd Macro
+@subsection Naming and Saving Keyboard Macros
+
+@cindex saving keyboard macros
+@findex name-last-kbd-macro
+ If you wish to save a keyboard macro for longer than until you define the
+next one, you must give it a name using @kbd{M-x name-last-kbd-macro}.
+This reads a name as an argument using the minibuffer and defines that name
+to execute the macro. The macro name is a Lisp symbol, and defining it in
+this way makes it a valid command name for calling with @kbd{M-x} or for
+binding a key to with @code{global-set-key} (@pxref{Keymaps}). If you
+specify a name that has a prior definition other than another keyboard
+macro, an error message is shown and nothing is changed.
+
+@findex insert-kbd-macro
+ Once a macro has a command name, you can save its definition in a file.
+Then it can be used in another editing session. First, visit the file
+you want to save the definition in. Then use this command:
+
+@example
+M-x insert-kbd-macro @key{RET} @var{macroname} @key{RET}
+@end example
+
+@noindent
+This inserts some Lisp code that, when executed later, will define the
+same macro with the same definition it has now. (You need not
+understand Lisp code to do this, because @code{insert-kbd-macro} writes
+the Lisp code for you.) Then save the file. You can load the file
+later with @code{load-file} (@pxref{Lisp Libraries}). If the file you
+save in is your init file @file{~/.emacs} (@pxref{Init File}) then the
+macro will be defined each time you run Emacs.
+
+ If you give @code{insert-kbd-macro} a numeric argument, it makes
+additional Lisp code to record the keys (if any) that you have bound to the
+keyboard macro, so that the macro will be reassigned the same keys when you
+load the file.
+
+@node Kbd Macro Query
+@subsection Executing Macros with Variations
+
+@kindex C-x q
+@findex kbd-macro-query
+ Using @kbd{C-x q} (@code{kbd-macro-query}), you can get an effect
+similar to that of @code{query-replace}, where the macro asks you each
+time around whether to make a change. While defining the macro,
+type @kbd{C-x q} at the point where you want the query to occur. During
+macro definition, the @kbd{C-x q} does nothing, but when you run the
+macro later, @kbd{C-x q} asks you interactively whether to continue.
+
+ The valid responses when @kbd{C-x q} asks are @key{SPC} (or @kbd{y}),
+@key{DEL} (or @kbd{n}), @key{RET} (or @kbd{q}), @kbd{C-l} and @kbd{C-r}.
+The answers are the same as in @code{query-replace}, though not all of
+the @code{query-replace} options are meaningful.
+
+ These responses include @key{SPC} to continue, and @key{DEL} to skip
+the remainder of this repetition of the macro and start right away with
+the next repetition. @key{RET} means to skip the remainder of this
+repetition and cancel further repetitions. @kbd{C-l} redraws the screen
+and asks you again for a character to say what to do.
+
+ @kbd{C-r} enters a recursive editing level, in which you can perform
+editing which is not part of the macro. When you exit the recursive
+edit using @kbd{C-M-c}, you are asked again how to continue with the
+keyboard macro. If you type a @key{SPC} at this time, the rest of the
+macro definition is executed. It is up to you to leave point and the
+text in a state such that the rest of the macro will do what you
+want.@refill
+
+ @kbd{C-u C-x q}, which is @kbd{C-x q} with a numeric argument,
+performs a completely different function. It enters a recursive edit
+reading input from the keyboard, both when you type it during the
+definition of the macro, and when it is executed from the macro. During
+definition, the editing you do inside the recursive edit does not become
+part of the macro. During macro execution, the recursive edit gives you
+a chance to do some particularized editing on each repetition.
+@xref{Recursive Edit}.
+
+ Another way to vary the behavior of a keyboard macro is to use a
+register as a counter, incrementing it on each repetition of the macro.
+@xref{RegNumbers}.
+
@node Key Bindings
@section Customizing Key Bindings
@cindex key bindings
otherwise, it looks up the home directory corresponding to that user
name in the system's data base of users.
@c LocalWords: backtab
-
-@ignore
- arch-tag: c68abddb-4410-4fb5-925f-63394e971d93
-@end ignore
that evaluates to a string. If several commands are given, all of
them will temporarily be pushed onto the history.
-If @samp{*} in the shell command, that means to substitute the file
-name.
-
You can set this variable in your @file{~/.emacs}. For example,
to add rules for @samp{.foo} and @samp{.bar} file extensions, write
@bye
@c dired-x.texi ends here.
-
-@ignore
- arch-tag: 201727aa-9318-4c74-a0d7-4f51c550c4de
-@end ignore
variable @code{find-ls-option}, whose default value specifies using
options @samp{-ld} for @code{ls}. If your listings are corrupted, you
may need to change the value of this variable.
-
-@ignore
- arch-tag: d105f9b9-fc1b-4c5f-a949-9b2cf3ca2fc1
-@end ignore
a minor mode that highlights the line containing point. Use @kbd{M-x
hl-line-mode} to enable or disable it in the current buffer. @kbd{M-x
global-hl-line-mode} enables or disables the same mode globally.
-
-@ignore
- arch-tag: 2219f910-2ff0-4521-b059-1bd231a536c4
-@end ignore
recommend releasing these examples in parallel under your choice of
free software license, such as the GNU General Public License,
to permit their use in free software.
-
-@ignore
- arch-tag: c1679162-1d8a-4f02-bc52-2e71765f0165
-@end ignore
@contents
@bye
-
-@ignore
- arch-tag: 52fe78ac-a1c4-48e7-815e-0a31acfad4bf
-@end ignore
@setchapternewpage odd
@contents
@bye
-
-@ignore
- arch-tag: 165ecb88-d03c-44b1-a921-b93f50b05b46
-@end ignore
@bye
@c End:
-
-@ignore
- arch-tag: c7ef2fd0-a91c-4e10-aa52-c1a2b11b1a8d
-@end ignore
* Display:: Controlling what text is displayed.
* Search:: Finding or replacing occurrences of a string.
* Fixit:: Commands especially useful for fixing typos.
-* Keyboard Macros:: A keyboard macro records a sequence of
- keystrokes to be replayed with a single command.
Major Structures of Emacs
* Files:: All about handling files.
* Fixing Case:: Correcting case of last word entered.
* Spelling:: Apply spelling checker to a word or a whole buffer.
-Keyboard Macros
-
-* Basic Keyboard Macro:: Defining and running keyboard macros.
-* Keyboard Macro Ring:: Where previous keyboard macros are saved.
-* Keyboard Macro Counter:: Inserting incrementing numbers in macros.
-* Keyboard Macro Query:: Making keyboard macros do different things each time.
-* Save Keyboard Macro:: Giving keyboard macros names; saving them in files.
-* Edit Keyboard Macro:: Editing keyboard macros.
-* Keyboard Macro Step-Edit:: Interactively executing and editing a keyboard macro.
-
File Handling
* File Names:: How to type and edit file-name arguments.
* Variables:: Many Emacs commands examine Emacs variables
to decide what to do; by setting variables,
you can control their functioning.
+* Keyboard Macros:: A keyboard macro records a sequence of
+ keystrokes to be replayed with a single command.
* Key Bindings:: The keymaps say what command each key runs.
By changing them, you can "redefine keys".
* Keyboard Translations::
* Locals:: Per-buffer values of variables.
* File Variables:: How files can specify variable values.
+Keyboard Macros
+
+* Basic Kbd Macro:: Defining and running keyboard macros.
+* Save Kbd Macro:: Giving keyboard macros names; saving them in files.
+* Kbd Macro Query:: Making keyboard macros do different things each time.
+
Customizing Key Bindings
* Keymaps:: Generalities. The global keymap.
@include display.texi
@include search.texi
@include fixit.texi
-@include kmacro.texi
@include files.texi
@include buffers.texi
@include windows.texi
@contents
@bye
-@ignore
- arch-tag: ed48740a-410b-46ea-9387-c9a9252a3392
-@end ignore
systems as the characters for stopping or killing a program, but that is
their only relationship with the operating system. You can customize
these keys to run any commands of your choice (@pxref{Keymaps}).
-
-@ignore
- arch-tag: df798d8b-f253-4113-b585-f528f078a944
-@end ignore
\input texinfo @c -*-texinfo-*-
-@c "@(#)$Name: $:$Id: eshell.texi,v 1.18 2003/02/04 14:53:27 lektu Exp $"
+@c "@(#)$Name: $:$Id: eshell.texi,v 1.17 2002/12/10 13:16:31 pj Exp $"
@c %**start of header
@setfilename ../info/eshell
@settitle Eshell: The Emacs Shell
@printindex ky
@bye
-
-@ignore
- arch-tag: 776409ba-cb15-42b9-b2b6-d2bdc7ebad01
-@end ignore
@setchapternewpage odd
@contents
@bye
-
-@ignore
- arch-tag: 1b79460b-4ea1-441d-ab45-05ddd16ef241
-@end ignore
@contents
@bye
-
-@ignore
- arch-tag: fee0d62d-06cf-43d8-ac21-123408eaf10f
-@end ignore
@c Copyright (C) 1985,86,87,93,94,95,97,99, 2000, 2001
@c Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
-@node Files, Buffers, Keyboard Macros, Top
+@node Files, Buffers, Fixit, Top
@chapter File Handling
@cindex files
point. Partial Completion mode offers other features extending
@code{find-file}, which can be used with @code{ffap}.
@xref{Completion Options}.
-
-@ignore
- arch-tag: 768d32cb-e15a-4cc1-b7bf-62c00ee12250
-@end ignore
@c This is part of the Emacs manual.
@c Copyright (C) 1985, 86, 87, 93, 94, 95, 1997 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
-@node Fixit, Keyboard Macros, Search, Top
+@node Fixit, Files, Search, Top
@chapter Commands for Fixing Typos
@cindex typos, fixing
@cindex mistakes, correcting
cannot use employ root and affix information. For some languages
there is a spell checking dictionary but no word completion
dictionary.
-
-@ignore
- arch-tag: 3359a443-96ed-448f-9f05-c8111ba8eac0
-@end ignore
@contents
@bye
-
-@ignore
- arch-tag: 2ac9810b-aa49-4ea6-8030-d7f1ecd467ed
-@end ignore
when you press the mouse button. The Linux console supports this
mode if it has support for the mouse enabled, e.g.@: using the
@command{gpm} daemon.
-
-@ignore
- arch-tag: 7dcf3a31-a43b-45d4-a900-445b10d77e49
-@end ignore
systems call this ``pasting.'' @xref{Yanking}.
@end table
-@ignore
- arch-tag: 0dd53ce1-5f09-4ac2-b13b-cf22b0f28d23
-@end ignore
software will greatly reduce these drains in the area of software
production. We must do this, in order for technical gains in productivity
to translate into less work for us.
-
-@ignore
- arch-tag: 21eb38f8-6fa0-480a-91cd-f3dab7148542
-@end ignore
@end itemize
-@ignore
- arch-tag: 64dc5692-edb4-4848-a965-7aa0181acbb8
-@end ignore
@end iftex
@c End:
-
-@ignore
- arch-tag: c9fa47e7-78ca-4681-bda9-9fef45d1c819
-@end ignore
shown in the echo area when you move point into the active text. In
a window system you can display the help text as a ``tooltip''
(sometimes known as ``balloon help''). @xref{Tooltips}.
-
-@ignore
- arch-tag: 6f33ab62-bc75-4367-8057-fd67cc15c3a1
-@end ignore
@printindex cp
@bye
-
-@ignore
- arch-tag: f1d73958-1423-4127-b8aa-f7b953d64492
-@end ignore
region for sequences of spaces, and converts sequences of at least three
spaces to tabs if that can be done without changing indentation. @kbd{M-x
untabify} changes all tabs in the region to appropriate numbers of spaces.
-
-@ignore
- arch-tag: acc07de7-ae11-4ee8-a159-cb59c473f0fb
-@end ignore
@syncodeindex vr cp
@syncodeindex ky cp
@comment %**end of header
-@comment $Id: info.texi,v 1.34 2003/08/03 18:29:52 karl Exp $
+@comment $Id: info.texi,v 1.33 2003/07/16 22:17:40 karl Exp $
@copying
This file describes how to use Info, the on-line, menu-driven GNU
@printindex cp
@bye
-
-@ignore
- arch-tag: 965c1638-01d6-4156-9227-b10418b9d8e8
-@end ignore
The command @kbd{M-x string-insert-rectangle} is similar to
@code{string-rectangle}, but inserts the string on each line,
shifting the original text to the right.
-
-@ignore
- arch-tag: d8da8f96-0928-449a-816e-ff2d3497866c
-@end ignore
@kbd{M-x} works by running the command
@code{execute-extended-command}, which is responsible for reading the
name of another command and invoking it.
-
-@ignore
- arch-tag: b67bff53-9628-4666-b94e-eda972a7ba56
-@end ignore
@code{posix-file-name-to-mac} performs the opposite conversion. They
are useful for constructing AppleScript commands to be passed to
@code{do-applescript}.
-
-@ignore
- arch-tag: a822c2ab-4273-4997-927e-c153bb71dcf6
-@end ignore
@vindex emerge-startup-hook
After setting up the merge, Emerge runs the hook
@code{emerge-startup-hook} (@pxref{Hooks}).
-
-@ignore
- arch-tag: b9d83dfb-82ea-4ff6-bab5-05a3617091fb
-@end ignore
mode, and certain ``special'' major modes do not allow the mode to
change. You can turn off this mode-changing feature by setting
@code{change-major-mode-with-file-name} to @code{nil}.
-
-@ignore
- arch-tag: f2558800-cf32-4839-8acb-7d3b4df2a155
-@end ignore
+++ /dev/null
-#### Makefile for the Emacs Manual and other documentation.
-
-# Copyright (C) 2003
-# Free Software Foundation, Inc.
-
-# This file is part of GNU Emacs.
-
-# GNU Emacs is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# GNU Emacs is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with GNU Emacs; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
-# Where to find the source code. The source code for Emacs's C kernel is
-# expected to be in $(srcdir)/src, and the source code for Emacs's
-# utility programs is expected to be in $(srcdir)/lib-src. This is
-# set by the configure script's `--srcdir' option.
-srcdir=.
-
-infodir = $(srcdir)/../info
-
-# The makeinfo program is part of the Texinfo distribution.
-MAKEINFO = makeinfo
-MULTI_INSTALL_INFO = $(srcdir)\..\nt\multi-install-info.bat
-INFO_TARGETS = $(infodir)/emacs $(infodir)/ccmode \
- $(infodir)/cl $(infodir)/dired-x \
- $(infodir)/ediff $(infodir)/forms \
- $(infodir)/gnus $(infodir)/info \
- $(infodir)/message $(infodir)/mh-e \
- $(infodir)/reftex $(infodir)/sc \
- $(infodir)/vip $(infodir)/viper \
- $(infodir)/widget $(infodir)/efaq \
- $(infodir)/ada-mode $(infodir)/autotype \
- $(infodir)/calc $(infodir)/idlwave \
- $(infodir)/eudc $(infodir)/ebrowse \
- $(infodir)/pcl-cvs $(infodir)/woman \
- $(infodir)/emacs-mime $(infodir)/eshell \
- $(infodir)/speedbar $(infodir)/tramp \
- $(infodir)/ses $(infodir)/smtpmail
-DVI_TARGETS = emacs.dvi calc.dvi cc-mode.dvi cl.dvi dired-x.dvi \
- ediff.dvi forms.dvi gnus.dvi message.dvi mh-e.dvi \
- reftex.dvi sc.dvi vip.dvi viper.dvi widget.dvi faq.dvi \
- ada-mode.dvi autotype.dvi idlwave.dvi eudc.dvi ebrowse.dvi \
- pcl-cvs.dvi woman.dvi emacs-mime.dvi eshell.dvi \
- speedbar.dvi tramp.dvi ses.dvi smtpmail.dvi
-INFOSOURCES = info.texi
-
-# The following rule does not work with all versions of `make'.
-.SUFFIXES: .texi .dvi
-.texi.dvi:
- texi2dvi $<
-
-TEXI2DVI = texi2dvi
-ENVADD = $(srcdir)\..\nt\envadd.bat "TEXINPUTS=$(srcdir);$(TEXINPUTS)" \
- "MAKEINFO=$(MAKEINFO) -I$(srcdir)" /C
-
-EMACSSOURCES= \
- $(srcdir)/emacs.texi \
- $(srcdir)/doclicense.texi \
- $(srcdir)/screen.texi \
- $(srcdir)/commands.texi \
- $(srcdir)/entering.texi \
- $(srcdir)/basic.texi \
- $(srcdir)/mini.texi \
- $(srcdir)/m-x.texi \
- $(srcdir)/help.texi \
- $(srcdir)/mark.texi \
- $(srcdir)/killing.texi \
- $(srcdir)/regs.texi \
- $(srcdir)/display.texi \
- $(srcdir)/search.texi \
- $(srcdir)/fixit.texi \
- $(srcdir)/files.texi \
- $(srcdir)/buffers.texi \
- $(srcdir)/windows.texi \
- $(srcdir)/frames.texi \
- $(srcdir)/mule.texi \
- $(srcdir)/major.texi \
- $(srcdir)/indent.texi \
- $(srcdir)/text.texi \
- $(srcdir)/programs.texi \
- $(srcdir)/building.texi \
- $(srcdir)/maintaining.texi \
- $(srcdir)/abbrevs.texi \
- $(srcdir)/picture.texi \
- $(srcdir)/sending.texi \
- $(srcdir)/rmail.texi \
- $(srcdir)/dired.texi \
- $(srcdir)/calendar.texi \
- $(srcdir)/misc.texi \
- $(srcdir)/custom.texi \
- $(srcdir)/trouble.texi \
- $(srcdir)/cmdargs.texi \
- $(srcdir)/xresources.texi \
- $(srcdir)/anti.texi \
- $(srcdir)/macos.texi \
- $(srcdir)/msdog.texi \
- $(srcdir)/gnu.texi \
- $(srcdir)/glossary.texi \
- $(srcdir)/ack.texi \
- $(srcdir)/kmacro.texi
-
-info: $(INFO_TARGETS)
- $(MULTI_INSTALL_INFO) --info-dir=$(infodir) $(INFO_TARGETS)
-
-dvi: $(DVI_TARGETS)
-
-# Note that all the Info targets build the Info files
-# in srcdir. There is no provision for Info files
-# to exist in the build directory.
-# In a distribution of Emacs, the Info files should be up to date.
-
-# The following target uses an explicit -o switch to work around
-# the @setfilename directive in info.texi, which is required for
-# the Texinfo distribution.
-
-$(infodir)/info: $(INFOSOURCES)
- $(MAKEINFO) --no-split info.texi -o $@
-
-info.dvi: $(INFOSOURCES)
- $(ENVADD) $(TEXI2DVI) $(srcdir)/info.texi
-
-$(infodir)/emacs: $(EMACSSOURCES)
- $(MAKEINFO) emacs.texi
-
-emacs.dvi: $(EMACSSOURCES)
- $(ENVADD) $(TEXI2DVI) $(srcdir)/emacs.texi
-
-# This target is here so you could easily get the list of the *.texi
-# files which belong to the Emacs manual (as opposed to the separate
-# manuals for CL, CC Mode, Ebrowse, etc.). With this target, you can
-# say things like "grep foo `make emacsman`".
-emacsman:
- @echo $(EMACSSOURCES)
-
-$(infodir)/ccmode: cc-mode.texi
- $(MAKEINFO) cc-mode.texi
-cc-mode.dvi: cc-mode.texi
- $(ENVADD) $(TEXI2DVI) $(srcdir)/cc-mode.texi
-
-$(infodir)/ada-mode: ada-mode.texi
- $(MAKEINFO) ada-mode.texi
-ada-mode.dvi: ada-mode.texi
- $(ENVADD) $(TEXI2DVI) $(srcdir)/ada-mode.texi
-
-$(infodir)/pcl-cvs: pcl-cvs.texi
- $(MAKEINFO) pcl-cvs.texi
-pcl-cvs.dvi: pcl-cvs.texi
- $(ENVADD) $(TEXI2DVI) $(srcdir)/pcl-cvs.texi
-
-$(infodir)/eshell: eshell.texi
- $(MAKEINFO) eshell.texi
-eshell.dvi: eshell.texi
- $(ENVADD) $(TEXI2DVI) $(srcdir)/eshell.texi
-
-$(infodir)/cl: cl.texi
- $(MAKEINFO) cl.texi
-cl.dvi: cl.texi
- $(ENVADD) $(TEXI2DVI) $(srcdir)/cl.texi
-
-$(infodir)/dired-x: dired-x.texi
- $(MAKEINFO) dired-x.texi
-dired-x.dvi: dired-x.texi
- $(ENVADD) $(TEXI2DVI) $(srcdir)/dired-x.texi
-
-$(infodir)/ediff: ediff.texi
- $(MAKEINFO) ediff.texi
-ediff.dvi: ediff.texi
- $(ENVADD) $(TEXI2DVI) $(srcdir)/ediff.texi
-
-$(infodir)/forms: forms.texi
- $(MAKEINFO) forms.texi
-forms.dvi: forms.texi
- $(ENVADD) $(TEXI2DVI) $(srcdir)/forms.texi
-
-$(infodir)/gnus: gnus.texi
- $(MAKEINFO) gnus.texi
-gnus.dvi: gnus.texi
- sed -e '/@iflatex/,/@end iflatex/d' $(srcdir)/gnus.texi > gnustmp.texi
- $(ENVADD) $(TEXI2DVI) gnustmp.texi
- cp gnustmp.dvi $*.dvi
- rm gnustmp.*
-
-$(infodir)/message: message.texi
- $(MAKEINFO) message.texi
-message.dvi: message.texi
- $(ENVADD) $(TEXI2DVI) $(srcdir)/message.texi
-
-$(infodir)/mh-e: mh-e.texi
- $(MAKEINFO) mh-e.texi
-mh-e.dvi: mh-e.texi
- $(ENVADD) $(TEXI2DVI) $(srcdir)/mh-e.texi
-
-$(infodir)/reftex: reftex.texi
- $(MAKEINFO) reftex.texi
-reftex.dvi: reftex.texi
- $(ENVADD) $(TEXI2DVI) $(srcdir)/reftex.texi
-
-$(infodir)/sc: sc.texi
- $(MAKEINFO) sc.texi
-sc.dvi: sc.texi
- $(ENVADD) $(TEXI2DVI) $(srcdir)/sc.texi
-
-$(infodir)/vip: vip.texi
- $(MAKEINFO) vip.texi
-vip.dvi: vip.texi
- $(ENVADD) $(TEXI2DVI) $(srcdir)/vip.texi
-
-$(infodir)/viper: viper.texi
- $(MAKEINFO) viper.texi
-viper.dvi: viper.texi
- $(ENVADD) $(TEXI2DVI) $(srcdir)/viper.texi
-
-$(infodir)/widget: widget.texi
- $(MAKEINFO) widget.texi
-widget.dvi: widget.texi
- $(ENVADD) $(TEXI2DVI) $(srcdir)/widget.texi
-
-$(infodir)/efaq: faq.texi
- $(MAKEINFO) faq.texi
-faq.dvi: faq.texi
- $(ENVADD) $(TEXI2DVI) $(srcdir)/faq.texi
-
-../etc/GNU: gnu1.texi gnu.texi
- $(MAKEINFO) --no-headers -o ../etc/GNU gnu1.texi
-
-$(infodir)/autotype: autotype.texi
- $(MAKEINFO) autotype.texi
-autotype.dvi: autotype.texi
- $(ENVADD) $(TEXI2DVI) $(srcdir)/autotype.texi
-
-$(infodir)/calc: calc.texi
- $(MAKEINFO) calc.texi
-
-calc.dvi: calc.texi
- $(ENVADD) $(TEXI2DVI) $(srcdir)/calc.texi
-
-# This is produced with --no-split to avoid making files whose
-# names clash on DOS 8+3 filesystems
-$(infodir)/idlwave: idlwave.texi
- $(MAKEINFO) --no-split idlwave.texi
-idlwave.dvi: idlwave.texi
- $(ENVADD) $(TEXI2DVI) $(srcdir)/idlwave.texi
-
-$(infodir)/eudc: eudc.texi
- $(MAKEINFO) eudc.texi
-eudc.dvi: eudc.texi
- $(ENVADD) $(TEXI2DVI) $(srcdir)/eudc.texi
-
-$(infodir)/ebrowse: ebrowse.texi
- $(MAKEINFO) ebrowse.texi
-ebrowse.dvi: ebrowse.texi
- $(ENVADD) $(TEXI2DVI) $(srcdir)/ebrowse.texi
-
-$(infodir)/woman: woman.texi
- $(MAKEINFO) woman.texi
-woman.dvi: woman.texi
- $(ENVADD) $(TEXI2DVI) $(srcdir)/woman.texi
-
-$(infodir)/speedbar: speedbar.texi
- $(MAKEINFO) speedbar.texi
-speedbar.dvi: speedbar.texi
- $(ENVADD) $(TEXI2DVI) $(srcdir)/speedbar.texi
-
-$(infodir)/emacs-mime: emacs-mime.texi
- $(MAKEINFO) emacs-mime.texi
-emacs-mime.dvi: emacs-mime.texi
- $(ENVADD) $(TEXI2DVI) $(srcdir)/emacs-mime.texi
-
-$(infodir)/tramp: tramp.texi
- $(MAKEINFO) tramp.texi
-tramp.dvi: tramp.texi
- $(ENVADD) $(TEXI2DVI) $(srcdir)/tramp.texi
-
-$(infodir)/ses: ses.texi
- $(MAKEINFO) ses.texi
-ses.dvi: ses.texi
- $(ENVADD) $(TEXI2DVI) $(srcdir)/ses.texi
-
-$(infodir)/smtpmail: smtpmail.texi
- $(MAKEINFO) smtpmail.texi
-smtpmail.dvi: smtpmail.texi
- $(ENVADD) $(TEXI2DVI) $(srcdir)/smtpmail.texi
-
-mostlyclean:
- rm -f *.log *.cp *.fn *.ky *.pg *.vr core *.tp *.core gnustmp.*
-
-clean: mostlyclean
- rm -f *.dvi
- rm -f $(infodir)/emacs* $(infodir)/ccmode* \
- $(infodir)/cl* $(infodir)/dired-x* \
- $(infodir)/ediff* $(infodir)/forms* \
- $(infodir)/gnus* $(infodir)/info* \
- $(infodir)/message* $(infodir)/mh-e* \
- $(infodir)/reftex* $(infodir)/sc* \
- $(infodir)/vip* $(infodir)/viper* \
- $(infodir)/widget* $(infodir)/efaq* \
- $(infodir)/ada-mode* $(infodir)/autotype* \
- $(infodir)/calc* $(infodir)/idlwave* \
- $(infodir)/eudc* $(infodir)/ebrowse* \
- $(infodir)/pcl-cvs* $(infodir)/woman* \
- $(infodir)/emacs-mime* $(infodir)/eshell* \
- $(infodir)/speedbar* $(infodir)/tramp* \
- $(infodir)/ses* $(infodir)/smtpmail*
-
-distclean: clean
-
-maintainer-clean: distclean
- rm -f *.aux *.cps *.fns *.kys *.pgs *.vrs *.toc
-# Don't delete these, because they are outside the current directory.
-# for file in $(INFO_TARGETS); do rm -f $${file}*; done
-
-
-# Formerly this directory had texindex.c and getopt.c in it
-# and this makefile built them to make texindex.
-# That caused trouble because this is run entirely in the source directory.
-# Since we expect to get texi2dvi from elsewhere,
-# it is ok to expect texindex from elsewhere also.
-
-# arch-tag: 6e99da59-ad27-4816-82a0-cde9a101efae
rotates the ring, so that successive uses of @kbd{C-x C-@key{SPC}} take
you to earlier and earlier buffers.
-@ignore
- arch-tag: f35e4d82-911b-4cfc-a3d7-3c87b2abba20
-@end ignore
@bye
@c End:
-
-@ignore
- arch-tag: 16ab76af-a281-4e34-aed6-5624569f7601
-@end ignore
\input texinfo @c -*-texinfo-*-
-@c $Id: mh-e.texi,v 1.14 2003/02/04 14:53:28 lektu Exp $
+@c $Id: mh-e.texi,v 1.13 2002/10/02 23:24:31 karl Exp $
@c %**start of header
@setfilename ../info/mh-e
@settitle mh-e
@c XXX In the sections on customizing mh-e, you can add cross-references
@c to the Emacs manual and the Emacs Lisp manual wherever they are
@c useful. @pxref{node, , section, emacs, The GNU Emacs Manual}
-
-@ignore
- arch-tag: b778477d-1a10-4a99-84de-f877a2ea6bef
-@end ignore
expression which describes one command and its arguments. Lisp programs
can re-execute a command by calling @code{eval} with the
@code{command-history} element.
-
-@ignore
- arch-tag: ba913cfd-b70e-400f-b663-22b2c309227f
-@end ignore
or add these lines at the end of your @file{.emacs} file:
@example
-(require 'desktop)
-(setq desktop-enable t)
+(desktop-load-default)
+(desktop-read)
@end example
@noindent
@findex desktop-save
-The first time you exit Emacs, you will be asked whether you want to
-save your session. Once you have done that, exiting Emacs will save
-the state again in subsequent sessions. You can also save the state
-at any time, without exiting Emacs, by typing @kbd{M-x desktop-save}.
+The first time you save the state of the Emacs session, you must do it
+manually, with the command @kbd{M-x desktop-save}. Once you have done
+that, exiting Emacs will save the state again---not only the present
+Emacs session, but also subsequent sessions. You can also save the
+state at any time, without exiting Emacs, by typing @kbd{M-x
+desktop-save} again.
In order for Emacs to recover the state from a previous session, you
must start it with the same current directory as you used when you
@findex zone
The command @kbd{M-x zone} plays games with the display when Emacs is
idle.
-
-@ignore
- arch-tag: 8f094220-c0d5-4e9e-af7d-3e0da8187474
-@end ignore
You can reenable Windows's default handling of tapping the @key{ALT} key
by setting @code{w32-pass-alt-to-system} to a non-@code{nil} value.
-@ignore
- arch-tag: f39d2590-5dcc-4318-88d9-0eb73ca10fa2
-@end ignore
To find out which charset a character in the buffer belongs to,
put point before it and type @kbd{C-u C-x =}.
-
-@ignore
- arch-tag: 310ba60d-31ef-4ce7-91f1-f282dd57b6b3
-@end ignore
\input texinfo @c -*-texinfo-*-
-@c "@(#)$Name: $:$Id: pcl-cvs.texi,v 1.20 2003/08/14 04:53:30 kfogel Exp $"
+@c "@(#)$Name: $:$Id: pcl-cvs.texi,v 1.18 2002/12/07 13:38:26 pj Exp $"
@c %**start of header
@setfilename ../info/pcl-cvs
@settitle PCL-CVS --- Emacs Front-End to CVS
If you work by writing entries in the @file{ChangeLog}
(@pxref{(emacs)Change Log}) and then commit the change under revision
control, you can generate the Log Edit text from the ChangeLog using
-@kbd{C-c C-a} (@kbd{log-edit-insert-changelog}). This looks for
+@kbd{C-a C-a} (@kbd{log-edit-insert-changelog}). This looks for
entries for the file(s) concerned in the top entry in the ChangeLog
and uses those paragraphs as the log text. This text is only inserted
if the top entry was made under your user name on the current date.
@summarycontents
@contents
@bye
-
-@ignore
- arch-tag: 5c7178ce-56fa-40b0-abd7-f4a09758b235
-@end ignore
(by overwriting) the rectangle that was most recently killed, while
@kbd{C-c C-x} (@code{picture-yank-rectangle-from-register}) does
likewise for the rectangle found in a specified register.
-
-@ignore
- arch-tag: b7589747-683c-4f40-aed8-1b10403cb666
-@end ignore
@cindex @code{lisp-indent-function} property
You can override the standard pattern in various ways for individual
-functions, according to the @code{lisp-indent-function} property of
-the function name. Normally you would use this for macro definitions
-and specify it using the @code{declare} construct (@pxref{Defining
-Macros,,, elisp, the Emacs Lisp Reference Manual}).
+functions, according to the @code{lisp-indent-function} property of the
+function name. There are four possibilities for this property:
+
+@table @asis
+@item @code{nil}
+This is the same as no property---use the standard indentation pattern.
+@item @code{defun}
+Handle this function like a @samp{def} construct: treat the second
+line as the start of a @dfn{body}.
+@item a number, @var{number}
+The first @var{number} arguments of the function are
+@dfn{distinguished} arguments; the rest are considered the body
+of the expression. A line in the expression is indented according to
+whether the first argument on it is distinguished or not. If the
+argument is part of the body, the line is indented @code{lisp-body-indent}
+more columns than the open-parenthesis starting the containing
+expression. If the argument is distinguished and is either the first
+or second argument, it is indented @emph{twice} that many extra columns.
+If the argument is distinguished and not the first or second argument,
+the line uses the standard pattern.
+@item a symbol, @var{symbol}
+@var{symbol} should be a function name; that function is called to
+calculate the indentation of a line within this expression. The
+function receives two arguments:
+@table @asis
+@item @var{state}
+The value returned by @code{parse-partial-sexp} (a Lisp primitive for
+indentation and nesting computation) when it parses up to the
+beginning of this line.
+@item @var{pos}
+The position at which the line being indented begins.
+@end table
+@noindent
+It should return either a number, which is the number of columns of
+indentation for that line, or a list whose car is such a number. The
+difference between returning a number and returning a list is that a
+number says that all following lines at the same nesting level should
+be indented just like this one; a list says that following lines might
+call for different indentations. This makes a difference when the
+indentation is being computed by @kbd{C-M-q}; if the value is a
+number, @kbd{C-M-q} need not recalculate indentation for the following
+lines until the end of the list.
+@end table
@node C Indent
@subsection Commands for C Indentation
The variable @code{asm-comment-char} specifies which character
starts comments in assembler syntax.
-
-@ignore
- arch-tag: c7ee7409-40a4-45c7-bfb7-ae7f2c74d0c0
-@end ignore
@contents
@bye
-@ignore
- arch-tag: 1e055774-0576-4b1b-b47f-550d0961fd43
-@end ignore
Insert in the buffer the @emph{contents} of the file that bookmark
@var{bookmark} points to.
@end table
-
-@ignore
- arch-tag: b00af991-ebc3-4b3a-8e82-a3ac81ff2e64
-@end ignore
received, you can tell @code{movemail} to reverse the order of
downloaded messages by adding the @samp{-r} flag to
@code{rmail-movemail-flags}.
-
-@ignore
- arch-tag: 034965f6-38df-47a2-a9f1-b8bc8ab37e23
-@end ignore
@summarycontents
@contents
@bye
-
-@ignore
- arch-tag: 0521847a-4680-44b6-ae6e-13ce20e18436
-@end ignore
Some of the commands in the menu bar have ordinary key bindings as
well; if so, the menu lists one equivalent key binding in parentheses
after the item itself.
-
-@ignore
- arch-tag: 104ba40e-d972-4866-a542-a98be94bdf2f
-@end ignore
(@pxref{Tags Search}) or through Dired @kbd{A} command
(@pxref{Operating on Files}), or ask the @code{grep} program to do it
(@pxref{Grep Searching}).
-
-@ignore
- arch-tag: fd9d8e77-66af-491c-b212-d80999613e3e
-@end ignore
in this chapter about the @samp{*mail*} buffer and Mail mode does not
apply; the other methods use a different format of text in a different
buffer, and their commands are different as well.
-
-@ignore
- arch-tag: d8a3dfc3-5d87-45c5-a7f2-69871b8e4fd6
-@end ignore
@c ===================================================================
@bye
-
-@ignore
- arch-tag: 10a4ee1c-7ef4-4c06-8b7a-f975e39f0dec
-@end ignore
@contents
@bye
-
-@ignore
- arch-tag: 6316abdf-b366-4562-87a2-f37e8f894b6f
-@end ignore
\input texinfo @c -*-texinfo-*-
-@c $Id: speedbar.texi,v 1.11 2002/10/02 23:24:31 karl Exp $
+@c $Id: speedbar.texi,v 1.10 2002/03/16 19:33:21 eliz Exp $
@setfilename ../info/speedbar
@settitle Speedbar: File/Tag summarizing utility
@bye
@c LocalWords: speedbar's xref slowbar kbd subsubsection
@c LocalWords: keybindings
-
-@ignore
- arch-tag: e1fc85f0-1eeb-489f-a8d4-a2bfe711fa02
-@end ignore
@c time-stamp-format: "%:y-%02m-%02d.%02H"
@c time-stamp-end: "}"
@c End:
-
-% arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115
but allow character code conversion and/or automatic uncompression if
appropriate, use @code{format-find-file} with suitable arguments.
-@ignore
- arch-tag: 8db54ed8-2036-49ca-b0df-23811d03dc70
-@end ignore
@c ** Use `filename' resp. `file name' consistently.
@c ** Use `host' resp. `machine' consistently.
@c ** Consistent small or capitalized words especially in menues.
-
-@ignore
- arch-tag: f96dd66e-6dd3-4c92-8d77-9c56205ba808
-@end ignore
@c Otherwise, '/dev/null/' is tken, which leaves this part empty.
-@ignore
- arch-tag: e0fe322c-e06b-46eb-bb5b-d091b521f41c
-@end ignore
The service directory is found in the file named @file{etc/SERVICE} in the
Emacs distribution.
@end itemize
-
-@ignore
- arch-tag: c9cba76d-b2cb-4e0c-ae3f-19d5ef35817c
-@end ignore
@setchapternewpage odd
@contents
@bye
-
-@ignore
- arch-tag: 7c5d17b9-1d21-4261-a88a-b9fdbbf1020b
-@end ignore
@setchapternewpage odd
@contents
@bye
-
-@ignore
- arch-tag: f53e866a-15cf-4b1e-aead-77da9da1e864
-@end ignore
@c %**end of header
@copying
-Copyright @copyright{} 2000, 2002, 2003 Free Software Foundation, Inc.
+Copyright @copyright{} 2000, 2002 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
For example, capitalizing all text from the middle of one field to the
middle of another field is prohibited.
-Editable text fields are created by the @code{editable-field} widget.
-
-An editable fields must be surrounded by static text on both sides, that
-is, text that does not change in the lifetime of the widget. If the
-field extend to the end of the line, the terminating line-feed character
-will count as the necessary static text on that end, but you will have
-to provide the static text before the field yourself. The
-@code{:format} keyword is useful for generating the static text; for
-instance, if you give it a value of @code{"Name: %v"}, the "Name: " part
-will count as the static text.
+Editing text fields are created by the @code{editable-field} widget.
The editing text fields are highlighted with the
@code{widget-field-face} face, making them easy to find.
Specifies how to display a message whenever you move to the widget with
either @code{widget-forward} or @code{widget-backward} or move the mouse
over it (using the standard @code{help-echo} mechanism). The argument
-is either a string to display, a function of one argument, the widget,
-which should return a string to display, or a form that evaluates to
-such a string.
+is either a string to display or a function of one argument, the widget,
+which should return a string to display.
@vindex indent@r{ keyword}
@item :indent
@setchapternewpage odd
@contents
@bye
-
-@ignore
- arch-tag: 2b427731-4c61-4e72-85de-5ccec9c623f0
-@end ignore
scroll-all-scroll-down-all}, @kbd{M-x scroll-all-page-down-all} and
their corresponding ``up'' equivalents. To make this mode useful,
you should bind these commands to appropriate keys.
-
-@ignore
- arch-tag: 8bea7453-d4b1-49b1-9bf4-cfe4383e1113
-@end ignore
\input texinfo @c -*-texinfo-*-
-@c $Id: woman.texi,v 1.13 2002/12/10 13:20:09 pj Exp $
+@c $Id: woman.texi,v 1.12 2002/10/02 23:24:31 karl Exp $
@c %**start of header
@setfilename ../info/woman
@settitle WoMan: Browse Unix Manual Pages ``W.O. (without) Man''
@printindex cp
@bye
-
-@ignore
- arch-tag: a1a6b715-396f-4378-9b94-0b2ca0aa5028
-@end ignore
@noindent
@var{size} is a decimal number that describes the font size in points.
-
-@ignore
- arch-tag: 9b6ff773-48b6-41f6-b2f9-f114b8bdd97f
-@end ignore
-2003-08-31 Eli Zaretskii <eliz@elta.co.il>
-
- * sed3v2.inp (srcdir): Use "command.com /c cd" to produce an
- absolute file name of the current working directory. This avoids
- the warning from Make about circular dependencies.
-
-2003-08-30 Eli Zaretskii <eliz@elta.co.il>
-
- * sedlisp.inp: Set FNCASE=y for all targets in the lisp directory,
- so that CVS etc. file names are filtered out of the list of
- subdirectories.
-
-2003-08-28 Eli Zaretskii <eliz@elta.co.il>
-
- * sed6.inp (elisp.dvi, index.texi): Replace Unix shell commands
- with equivalent COMMAND.COM commands.
-
-2003-08-24 Eli Zaretskii <eliz@elta.co.il>
-
- * sed3v2.inp (EXEEXT): Define to an empty string.
-
- * sed1v2.inp (EXEEXT): Define to an empty string.
- Remove src/emacs after producing b-emacs.exe.
-
- * sed2v2.inp (HAVE_DIFFTIME, HAVE_MEMCMP, HAVE_MEMMOVE)
- (HAVE_SIZE_T): Define.
-
2002-04-16 Eli Zaretskii <eliz@is.elta.co.il>
* sed2v2.inp: New file.
Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted provided the copyright notice and this notice are preserved.
-
-;;; arch-tag: b602fbb5-3776-4053-8de2-03da33c29d44
return 0;
}
-
-/* arch-tag: b0965811-8c3e-4bc4-8d81-4447a3594785
- (do not change this comment) */
cd oldxmenu
-$(MAKE) clean
cd ..
-
-# arch-tag: d5a489bc-818e-4c3c-8040-b5205ed0602f
bootstrap-clean-after:
cd src; $(MAKE) $(MFLAGS) mostlyclean; cd ..
-
-# arch-tag: 6fee5130-4c53-46c6-93d3-d0ea852298b9
/^temacs:/s/prefix-args//
/^temacs:/s/stamp-oldxmenu//
/^ #/d
-
-# arch-tag: 246725c1-79de-4d03-a080-8f19329fa35e
/^LIBOBJS *=/s/@[^@\n]*@/getloadavg.o/
/^GETLOADAVG_LIBS *=/s/@[^@\n]*@//
/^LIBSOUND *=/s/@LIBSOUND@//
-/^EXEEXT *=/s/@EXEEXT@//
/^LN_S *=/s/@[^@\n]*@/ln -s/
/^M_FILE *=/s!@[^@\n]*@!m/intel386.h!
/^S_FILE *=/s!@[^@\n]*@!s/msdos.h!
/^ mv -f emacs/a\
stubify b-emacs\
stubedit b-emacs.exe minstack=1024k\
- rm -f emacs.exe temacs.exe emacs
+ rm -f emacs.exe temacs.exe
/^ rm -f/s/\\#/#/
-
-# arch-tag: c7e3aacb-4162-460e-99f9-4252bca68d2c
s/DOC/DOC-X/g
#/^LIBXMENU *=/s!= *!= ../oldxmenu/!
/^temacs *:/s!OLDXMENU!LIBXMENU!
-
-# arch-tag: 3e8a78f2-3dec-44f3-81f6-3785a562da19
s!^#undef config_machfile *$!#define config_machfile "m/intel386.h"!
s/^#undef PROTOTYPES *$/#define PROTOTYPES 1/
s/^#undef POINTER_TYPE *$/#define POINTER_TYPE void/
-
-# arch-tag: 31840234-109a-41ab-a675-7a3844978299
/^#undef HAVE_FMOD *$/s/^.*$/#define HAVE_FMOD 1/
/^#undef HAVE_RINT *$/s/^.*$/#define HAVE_RINT 1/
/^#undef HAVE_CBRT *$/s/^.*$/#define HAVE_CBRT 1/
-/^#undef HAVE_DIFFTIME *$/s/^.*$/#define HAVE_DIFFTIME 1/
/^#undef HAVE_FPATHCONF *$/s/^.*$/#define HAVE_FPATHCONF 1/
-/^#undef HAVE_MEMCMP *$/s/^.*$/#define HAVE_MEMCMP 1/
-/^#undef HAVE_MEMMOVE *$/s/^.*$/#define HAVE_MEMMOVE 1/
/^#undef HAVE_SETRLIMIT *$/s/^.*$/#define HAVE_SETRLIMIT 1/
/^#undef HAVE_TM_GMTOFF *$/s/^.*$/#define HAVE_TM_GMTOFF 1/
/^#undef HAVE_MBLEN *$/s/^.*$/#define HAVE_MBLEN 1/
/^#undef HAVE_STRUCT_TIMEZONE *$/s/^.*$/#define HAVE_STRUCT_TIMEZONE 1/
/^#undef HAVE_INDEX *$/s/^.*$/#define HAVE_INDEX 1/
-/^#undef HAVE_SIZE_T *$/s/^.*$/#define HAVE_SIZE_T 1/
/^#undef HAVE_RINDEX *$/s/^.*$/#define HAVE_RINDEX 1/
/^#undef HAVE_MKSTEMP *$/s/^.*$/#define HAVE_MKSTEMP 1/
/^#undef HAVE_STRUCT_TM_TM_ZONE *$/s/^.*$/#define HAVE_STRUCT_TM_TM_ZONE 1/
# might be defined in sys/config.h we include at the top of config.h.
/^#undef BSTRING/s|#undef|# undef|
/^#undef .*$/s|^.*$|/* & */|
-
-# arch-tag: 2acb5571-ff53-4822-9175-95b864b59f7c
/^#undef HAVE_XSCREENNUMBEROFSCREEN *$/s/undef/define/
/^#undef HAVE_XSETWMPROTOCOLS *$/s/undef/define/
/^#undef HAVE_SELECT *$/s/undef/define/
-
-# arch-tag: 4a41c3ea-eb6c-4e17-8432-307516498e5a
s!^ go32 ./test-distrib! go32 ./test-dis!
/-o make-docfile/a\
coff2exe make-docfile
-
-# arch-tag: cac6f5c7-3dbf-4e84-9d0c-44f0126f0ea8
/^archlibdir *=/s!=.*$!=/emacs/bin!
/^bindir *=/s!=.*$!=/emacs/bin!
/^libdir *=/s!=.*$!=/emacs/bin!
-/^srcdir=/s!srcdir=@srcdir@!srcdir := $(subst \\,/,$(shell command.com /c cd))!
+/^srcdir *=/s!=.*$!=.!
/^VPATH *=/s!=.*$!=.!
/^CFLAGS *=/s!=.*$!=-O2 -g!
/^C_SWITCH_SYSTEM *=/s!=.*$!=-DMSDOS!
/^LOADLIBES *=/s!=.*$!=!
/^ALLOCA *=/s!@ALLOCA@!!
-/^EXEEXT *=/s!@EXEEXT@!!
/^INSTALLABLES/s/emacsclient *//
s!^ \./! !
/^UTILITIES=/s/ wakeup//
/^UTILITIES=/s/ movemail//
/^UTILITIES=/s/ emacsserver//
/^UTILITIES=/s/ timer//
-
-# arch-tag: 16f3be18-a45b-496c-b19c-e43840359de8
/^#define *PATH_DATA/s/".*"/rootrelativepath ("etc")/
/^#define *PATH_DOC/s/".*"/rootrelativepath ("etc")/
/^#define *PATH_INFO/s/".*"/rootrelativepath ("info")/
-
-# arch-tag: c84fa640-e434-4408-9e89-16d9e4ebe74e
/^CFLAGS *=/s/@[^@\n]*@/-O2 -g/
/^LN_S *=/s/@[^@\n]*@/ln -s/
s/|| true//
-
-# arch-tag: 612a79be-2a02-4cb0-8dec-779aac0a2f4f
texinputdir =\
export texinputdir := $(srcdir)";"$(TEXINPUTS)
/^SHELL *=/s/^/# /
-/^elisp.dvi:/,/^$/ {
- /^ *if \[ *\a${permuted_index}/,/^ *fi *$/c\
- command.com /c 'if not a${permuted_index}==a sh ./permute-index' \
- command.com /c 'if not a${permuted_index}==a mv permuted.fns elisp.fns' \
- command.com /c 'if not a${permuted_index}==a texindex elisp.tp' \
- command.com /c 'if a${permuted_index}==a texindex elisp.??'
-}
-/^index.texi:/,/^$/ {
- /^ *if \[ *\a${permuted_index}/,/^ *fi *$/c\
- command.com /c 'if not a${permuted_index}==a cp -p ./index.perm index.texi' \
- command.com /c 'if a${permuted_index}==a cp -p ./index.unperm index.texi'
-}
-
-# arch-tag: defe1001-f35a-47f7-9635-3f5d33ee5e97
install: all\
/^ if test -f/d
-
-# arch-tag: 33c5eed1-78bc-4a6e-9d11-cbc7c541b763
#
# ----------------------------------------------------------------------
-/^SHELL *=/i\
-export FNCASE=y
-
/^lisp=/s|@srcdir@|.|
/^VPATH=/s|@srcdir@|.|
/^srcdir=/s|@srcdir@|.|
/^bootstrap-clean:/a\
command.com /c dtou .../*.el
-
-# arch-tag: da7a3cff-4839-4ad7-bbe3-e2b61c84c38e
-/* arch-tag: 39526405-3d3a-44fe-af28-82a515e0c8e8
- (do not change this comment) */
-2003-09-03 Peter Runestig <peter@runestig.com>
-
- * configure.bat: Create ``makefile'' in directories man, lispref
- and lispintro.
-
- * makefile.w32-in (force-info, info): New targets.
-
- * envadd.bat: New file.
-
- * multi-install-info.bat: New file.
-
2003-06-27 Jan D. <jan.h.d@swipnet.se>
* config.nt (my_strftime): New define.
Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted provided the copyright notice and this notice are preserved.
-
-;;; arch-tag: b3d2c29c-04a0-45d0-b52d-57354711c414
directories, etc. We suggest to use djtarnt.exe from the GNU FTP
site.
- If you are building out of CVS, then some files in this directory
- (.bat files, nmake.defs and makefile.w32-in) may need the line-ends
- fixing first. The easiest way to do this and avoid future conflicts
- is to run the following command in this (emacs/nt) directory:
- cvs update -kb
-
To compile Emacs, you will need either Microsoft Visual C++ 2.0 or
later and nmake, or a Windows port of GCC 2.95 or later with Mingw
and W32 API support and a port of GNU make. You can use the Cygwin
return (0);
}
-
-/* arch-tag: f923609d-b781-4ef4-abce-ca0da29cbbf0
- (do not change this comment) */
}
/* eof */
-
-/* arch-tag: 17e2b0aa-8c17-4bd1-b24b-1cda689245fa
- (do not change this comment) */
return 0;
}
-
-/* arch-tag: 88678d93-07ac-4e2f-ad63-d4a740ca69ac
- (do not change this comment) */
#define NO_RETURN /* nothing */
#endif
#endif
-
-/* arch-tag: df720992-aa5a-499a-882d-958dc5eeb5e9
- (do not change this comment) */
copy /b config.settings+%MAKECMD%.defs+..\nt\makefile.w32-in ..\nt\makefile\r
copy /b config.settings+%MAKECMD%.defs+..\lib-src\makefile.w32-in ..\lib-src\makefile\r
copy /b config.settings+%MAKECMD%.defs+..\src\makefile.w32-in ..\src\makefile\r
-copy /b config.settings+%MAKECMD%.defs+..\man\makefile.w32-in ..\man\makefile\r
-copy /b config.settings+%MAKECMD%.defs+..\lispref\makefile.w32-in ..\lispref\makefile\r
-copy /b config.settings+%MAKECMD%.defs+..\lispintro\makefile.w32-in ..\lispintro\makefile\r
if not exist ..\lisp\Makefile.unix rename ..\lisp\Makefile.in Makefile.unix\r
if exist ..\lisp\makefile rm -f ../lisp/[Mm]akefile\r
copy /b config.settings+%MAKECMD%.defs+..\lisp\makefile.w32-in ..\lisp\makefile\r
set MAKECMD=\r
set usercflags=\r
set userldflags=\r
-\r
-goto skipArchTag\r
- arch-tag: 300d20a4-1675-4e75-b615-7ce1a8c5376c\r
-:skipArchTag\r
return (0);
}
-
-/* arch-tag: 360d7a99-2cae-447e-8d06-41ca41987e30
- (do not change this comment) */
@echo off
if (%1) == () nmake -f makefile.nt all
if not (%1) == () nmake -f makefile.nt %1 %2 %3 %4 %5 %6 %7 %8 %9
-
-goto skipArchTag
- arch-tag: f01be12a-fd17-448d-8275-c7f527c50a1f
-:skipArchTag
nmake -f makefile.nt fast_install\r
-\r
-goto skipArchTag\r
- arch-tag: 13c64379-e658-452f-92d3-90d0f230ca70\r
-:skipArchTag\r
if errorlevel 1 goto done\r
plist ..\src\obj\i386\pemacs > %1\r
:done\r
-\r
-goto skipArchTag\r
- arch-tag: 927c5199-a8a3-4cf0-ab56-62b66fc6520d\r
-:skipArchTag\r
if errorlevel 1 goto done\r
plist ..\src\obj\i386\pemacs > %1\r
:done\r
-\r
-goto skipArchTag\r
- arch-tag: d1c629de-9172-4d72-ab68-9d45ab9903cc\r
-:skipArchTag\r
$(BLD)/%.o: %.c
$(CC) $(CFLAGS) $(CC_OUT)$@ $<
-
-# arch-tag: 35eb9662-8534-4bcf-b891-0730a09d657f
/* null version of <arpa/inet.h> - <sys/socket.h> has everything */
-
-/* arch-tag: 13c7a7f7-40d0-49e8-bdfb-6dcf2f3a7340
- (do not change this comment) */
#define gettext_noop(String) String
#endif /* _LIBGETTEXT_H */
-
-/* arch-tag: 07b35a70-3531-4cda-9674-2968467143ec
- (do not change this comment) */
/* null version of <netdb.h> - <sys/socket.h> has everything */
-
-/* arch-tag: 237ba543-97e2-4bd5-9c9c-32271d955eb1
- (do not change this comment) */
/* null version of <netinet/in.h> - <sys/socket.h> has everything */
-
-/* arch-tag: 49ff589e-100e-4f8f-8b2a-1c3b542590df
- (do not change this comment) */
typedef uid_t gid_t;
#endif /* _PWD_H_ */
-
-/* arch-tag: 68308424-cb2b-49ed-bb52-b347fee416bf
- (do not change this comment) */
*/
#include "..\..\..\src\ndir.h"
-
-/* arch-tag: 090c9091-3b16-429b-9c40-8aecce1162be
- (do not change this comment) */
#define R_OK 4
#define D_OK 8
#endif
-
-/* arch-tag: 7df3e73e-56bc-4ad9-b699-33149ea47959
- (do not change this comment) */
* in many of the source files, we just extend the include path so that the
* compiler will pick this up empty header instead.
*/
-
-/* arch-tag: c6e9015a-930a-4ad3-b368-ac32f84475d7
- (do not change this comment) */
#define NBPG 4096
#endif /* _PARAM_H_ */
-
-/* arch-tag: b1d90296-ec38-4839-83bd-0ddfd2528435
- (do not change this comment) */
#endif /* _SOCKET_H_ */
/* end of socket.h */
-
-/* arch-tag: e3b8b91c-aaa0-4bc4-be57-a85a1dd247b4
- (do not change this comment) */
#endif /* SYS_TIME_H_INCLUDED */
/* end of sys/time.h */
-
-/* arch-tag: bc525883-0c81-4bea-b83d-3325461f38b5
- (do not change this comment) */
/* Fake unistd.h: config.h already provides most of the relevant things. */
-
-/* arch-tag: 68600bcd-3097-4501-a559-551db3cdb9fd
- (do not change this comment) */
nmake -f makefile.nt install %1 %2 %3 %4 %5 %6 %7 %8 %9\r
set INSTALL_DIR=\r
set BUILD_TYPE=\r
-\r
-goto skipArchTag\r
- arch-tag: 1db5223b-8fc9-4bdb-8ad1-9e3962bf034a\r
-:skipArchTag\r
.c{$(BLD)}.obj::
$(CC) $(CFLAGS) -Fo$(BLD)\ $<
!ENDIF
-
-# arch-tag: a8aa26d5-5f28-4263-b42a-6f91acb7d824
realclean: clean
- $(DEL_TREE) ..\bin
-
-# arch-tag: b01debf7-6859-439e-b08e-f041aa03c32f
$(MAKE) $(MFLAGS) -C ../lisp install\r
$(MAKE) $(MFLAGS) -C ../leim install\r
\r
-force-info:\r
-# Note that man/makefile knows how to\r
-# put the info files in $(infodir),\r
-# so we can do ok running make in the build dir.\r
-info: force-info\r
- (cd ..\man && $(MAKE) $(MFLAGS) info)\r
- (cd ..\lispref && $(MAKE) $(MFLAGS) info)\r
- (cd ..\lispintro && $(MAKE) $(MFLAGS) info)\r
-\r
#\r
# Maintenance\r
#\r
$(MAKE) $(MFLAGS) clean\r
cd ..\lisp\r
$(MAKE) $(MFLAGS) clean\r
- cd ..\lispintro\r
- $(MAKE) $(MFLAGS) clean\r
- cd ..\lispref\r
- $(MAKE) $(MFLAGS) clean\r
cd ..\leim\r
$(MAKE) $(MFLAGS) clean\r
- cd ..\man\r
- $(MAKE) $(MFLAGS) clean\r
cd ..\nt\r
\r
clean-other-dirs-gmake:\r
\r
realclean: cleanall\r
- $(DEL_TREE) ../bin\r
-\r
-# arch-tag: 6f5b23a6-774b-4598-9c29-58235b2b4219\r
.c{$(BLD)}.obj::\r
$(CC) $(CFLAGS) -Fo$(BLD)\ $<\r
!ENDIF\r
-\r
-# arch-tag: fefa49b0-c23c-46c7-9094-cab2a405058e\r
macro, and is then used to set the Info-default-directory-list. */
/* #define PATH_INFO "/usr/local/info" */
#define PATH_INFO "C:/emacs/info"
-
-/* arch-tag: f6d46f3c-e1e9-436b-8629-edcaf6597973
- (do not change this comment) */
}
/* eof */
-
-/* arch-tag: 144ca747-168e-43a0-9736-3f4c0ba1657f
- (do not change this comment) */
MessageBox (NULL, "Could not start Emacs.", "Error", MB_ICONSTOP);
return 1;
}
-
-/* arch-tag: 7e02df73-4df7-4aa0-baea-99c6d047a384
- (do not change this comment) */
-/* $Header: /cvsroot/emacs/emacs/oldXMenu/Activate.c,v 1.5 2003/02/04 14:19:01 lektu Exp $ */
+/* $Header: /cvs/emacs/oldXMenu/Activate.c,v 1.4 2002/04/22 18:27:03 jhd Exp $ */
/* Copyright Massachusetts Institute of Technology 1985 */
#include "copyright.h"
return(ret_val);
}
-
-/* arch-tag: 6b90b578-ecea-4328-b460-a0c96963f872
- (do not change this comment) */
#include "copyright.h"
-/* $Header: /cvsroot/emacs/emacs/oldXMenu/AddPane.c,v 1.2 2003/02/04 14:19:01 lektu Exp $ */
+/* $Header: /cvs/emacs/oldXMenu/AddPane.c,v 1.1 1999/10/03 19:34:51 fx Exp $ */
/* Copyright Massachusetts Institute of Technology 1985 */
/*
_XMErrorCode = XME_NO_ERROR;
return((menu->p_count - 1));
}
-
-/* arch-tag: 62a26021-f29d-48ba-96ef-3b6c4ebd6547
- (do not change this comment) */
#include "copyright.h"
-/* $Header: /cvsroot/emacs/emacs/oldXMenu/AddSel.c,v 1.3 2003/02/04 14:19:01 lektu Exp $ */
+/* $Header: /cvs/emacs/oldXMenu/AddSel.c,v 1.2 2000/01/27 15:30:18 gerd Exp $ */
/* Copyright Massachusetts Institute of Technology 1985 */
/*
_XMErrorCode = XME_NO_ERROR;
return((pane->s_count - 1));
}
-
-/* arch-tag: 0161f024-c739-440d-9498-050280c6c355
- (do not change this comment) */
Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted provided the copyright notice and this notice are preserved.
-
-;;; arch-tag: 8b17c869-6677-40ce-be86-e62cf34061cf
#include "copyright.h"
-/* $Header: /cvsroot/emacs/emacs/oldXMenu/ChgPane.c,v 1.1 1999/10/03 19:34:53 fx Exp $ */
+/* $Header: /u/src/emacs/19.0/oldXMenu/RCS/ChgPane.c,v 1.1 1992/04/11 22:10:17 jimb Exp $ */
/* Copyright Massachusetts Institute of Technology 1985 */
/*
_XMErrorCode = XME_NO_ERROR;
return(p_num);
}
-
-/* arch-tag: e267e9de-a3f0-4a0d-8c45-413afa176fd8
- (do not change this comment) */
#include "copyright.h"
-/* $Header: /cvsroot/emacs/emacs/oldXMenu/ChgSel.c,v 1.2 2003/02/04 14:19:01 lektu Exp $ */
+/* $Header: /cvs/emacs/oldXMenu/ChgSel.c,v 1.1 1999/10/03 19:34:54 fx Exp $ */
/* Copyright Massachusetts Institute of Technology 1985 */
/*
_XMErrorCode = XME_NO_ERROR;
return(s_num);
}
-
-/* arch-tag: 229732a6-46bf-4a3a-ad90-3d8ed65c0841
- (do not change this comment) */
-/* $Header: /cvsroot/emacs/emacs/oldXMenu/Create.c,v 1.2 2003/02/04 14:19:01 lektu Exp $ */
+/* $Header: /cvs/emacs/oldXMenu/Create.c,v 1.1 1999/10/03 19:34:56 fx Exp $ */
/* Copyright Massachusetts Institute of Technology 1985 */
#include "copyright.h"
_XMErrorCode = XME_NO_ERROR;
return(menu);
}
-
-/* arch-tag: 6945b7d2-3b13-40b9-8b6e-56b1b20f3463
- (do not change this comment) */
#include "copyright.h"
-/* $Header: /cvsroot/emacs/emacs/oldXMenu/DelPane.c,v 1.2 2003/02/04 14:19:01 lektu Exp $ */
+/* $Header: /cvs/emacs/oldXMenu/DelPane.c,v 1.1 1999/10/03 19:34:57 fx Exp $ */
/* Copyright Massachusetts Institute of Technology 1985 */
/*
_XMErrorCode = XME_NO_ERROR;
return(p_num);
}
-
-/* arch-tag: 32a5bfd4-4bac-4090-bb53-844110f4908e
- (do not change this comment) */
#include "copyright.h"
-/* $Header: /cvsroot/emacs/emacs/oldXMenu/DelSel.c,v 1.2 2003/02/04 14:19:01 lektu Exp $ */
+/* $Header: /cvs/emacs/oldXMenu/DelSel.c,v 1.1 1999/10/03 19:34:58 fx Exp $ */
/* Copyright Massachusetts Institute of Technology 1985 */
/*
_XMErrorCode = XME_NO_ERROR;
return(s_num);
}
-
-/* arch-tag: 24ca2bc7-8a37-471a-8095-e6363fc1ed10
- (do not change this comment) */
#include "copyright.h"
-/* $Header: /cvsroot/emacs/emacs/oldXMenu/Destroy.c,v 1.2 2003/02/04 14:19:01 lektu Exp $ */
+/* $Header: /cvs/emacs/oldXMenu/Destroy.c,v 1.1 1999/10/03 19:34:59 fx Exp $ */
/* Copyright Massachusetts Institute of Technology 1985 */
/*
*/
free(menu);
}
-
-/* arch-tag: 44c9589f-5893-46fc-bc23-1b03a7f9c015
- (do not change this comment) */
#include "copyright.h"
-/* $Header: /cvsroot/emacs/emacs/oldXMenu/Error.c,v 1.1 1999/10/03 19:35:00 fx Exp $ */
+/* $Header: /u/src/emacs/19.0/oldXMenu/RCS/Error.c,v 1.1 1992/04/11 22:10:18 jimb Exp $ */
/* Copyright Massachusetts Institute of Technology 1985 */
/*
return(message);
}
-/* arch-tag: 5fff4a23-40ca-40d0-8887-c50fc73dea9d
- (do not change this comment) */
#include "copyright.h"
-/* $Header: /cvsroot/emacs/emacs/oldXMenu/EvHand.c,v 1.1 1999/10/03 19:35:01 fx Exp $ */
+/* $Header: /u/src/emacs/19.0/oldXMenu/RCS/EvHand.c,v 1.1 1992/04/11 22:10:19 jimb Exp $ */
/* Copyright Massachusetts Institute of Technology 1985 */
/*
_XMEventHandler = handler;
}
-/* arch-tag: 8d614c8c-94d9-43c8-8e32-c438a3c8a8a3
- (do not change this comment) */
#include "copyright.h"
-/* $Header: /cvsroot/emacs/emacs/oldXMenu/FindPane.c,v 1.2 2003/02/04 14:19:01 lektu Exp $ */
+/* $Header: /cvs/emacs/oldXMenu/FindPane.c,v 1.1 1999/10/03 19:35:02 fx Exp $ */
/* Copyright Massachusetts Institute of Technology 1985 */
/*
_XMErrorCode = XME_P_NOT_FOUND;
return (XM_FAILURE);
}
-
-/* arch-tag: b6c94285-0d1d-4569-a071-b34b63c67a54
- (do not change this comment) */
#include "copyright.h"
-/* $Header: /cvsroot/emacs/emacs/oldXMenu/FindSel.c,v 1.1 1999/10/03 19:35:03 fx Exp $ */
+/* $Header: /u/src/emacs/19.0/oldXMenu/RCS/FindSel.c,v 1.1 1992/04/11 22:10:19 jimb Exp $ */
/* Copyright Massachusetts Institute of Technology 1985 */
/*
_XMErrorCode = XME_S_NOT_FOUND;
return (XM_FAILURE);
}
-
-/* arch-tag: 564a4a95-9ab0-4580-b05f-6970c4b25dd4
- (do not change this comment) */
DependTarget()
NormalLintTarget($(SRCS))
-
-/* arch-tag: bc7d2799-8343-4700-a415-847e7fa12540
- (do not change this comment) */
#include "copyright.h"
-/* $Header: /cvsroot/emacs/emacs/oldXMenu/InsPane.c,v 1.2 2003/02/04 14:19:01 lektu Exp $ */
+/* $Header: /cvs/emacs/oldXMenu/InsPane.c,v 1.1 1999/10/03 19:35:04 fx Exp $ */
/* Copyright Massachusetts Institute of Technology 1985 */
/*
_XMErrorCode = XME_NO_ERROR;
return(p_num);
}
-
-/* arch-tag: ab94d53d-f05b-4273-82d3-f1b01eb9dc9e
- (do not change this comment) */
#include "copyright.h"
-/* $Header: /cvsroot/emacs/emacs/oldXMenu/InsSel.c,v 1.2 2003/02/04 14:19:01 lektu Exp $ */
+/* $Header: /cvs/emacs/oldXMenu/InsSel.c,v 1.1 1999/10/03 19:35:05 fx Exp $ */
/* Copyright Massachusetts Institute of Technology 1985 */
/*
_XMErrorCode = XME_NO_ERROR;
return(s_num);
}
-
-/* arch-tag: 8398626f-81cb-4e13-8ebc-aac1b9237663
- (do not change this comment) */
#include "copyright.h"
-/* $Header: /cvsroot/emacs/emacs/oldXMenu/Internal.c,v 1.2 2003/02/04 14:19:01 lektu Exp $ */
+/* $Header: /cvs/emacs/oldXMenu/Internal.c,v 1.1 1999/10/03 19:35:07 fx Exp $ */
/* Copyright Massachusetts Institute of Technology 1985 */
/*
}
}
-/* arch-tag: 3ac61957-0852-4e72-8b88-7dfab1a5dee9
- (do not change this comment) */
#include "copyright.h"
-/* $Header: /cvsroot/emacs/emacs/oldXMenu/Locate.c,v 1.2 2003/02/04 14:19:01 lektu Exp $ */
+/* $Header: /cvs/emacs/oldXMenu/Locate.c,v 1.1 1999/10/03 19:35:09 fx Exp $ */
/* Copyright Massachusetts Institute of Technology 1985 */
/*
_XMErrorCode = XME_NO_ERROR;
return(XM_SUCCESS);
}
-
-/* arch-tag: 1ff94bab-cf67-4c92-bff4-dc0130153173
- (do not change this comment) */
tags::
$(TAGS) -t *.[ch]
-
-# arch-tag: dbfc0b16-4e0c-4acb-a9c1-fc12ee76db06
#include "copyright.h"
-/* $Header: /cvsroot/emacs/emacs/oldXMenu/Post.c,v 1.3 2003/02/04 14:19:01 lektu Exp $ */
+/* $Header: /cvs/emacs/oldXMenu/Post.c,v 1.2 2000/01/27 15:30:47 gerd Exp $ */
/* Copyright Massachusetts Institute of Technology 1985 */
/*
return(data);
}
}
-
-/* arch-tag: 7b6104e5-fa32-4342-aa17-05296a30dd70
- (do not change this comment) */
#include "copyright.h"
-/* $Header: /cvsroot/emacs/emacs/oldXMenu/Recomp.c,v 1.2 2003/02/04 14:19:01 lektu Exp $ */
+/* $Header: /cvs/emacs/oldXMenu/Recomp.c,v 1.1 1999/10/03 19:35:11 fx Exp $ */
/* Copyright Massachusetts Institute of Technology 1985 */
/*
_XMErrorCode = XME_NO_ERROR;
return(XM_SUCCESS);
}
-
-/* arch-tag: 1fe99b82-3873-4aab-b2b3-f277c93e00d9
- (do not change this comment) */
#include "copyright.h"
-/* $Header: /cvsroot/emacs/emacs/oldXMenu/SetAEQ.c,v 1.1 1999/10/03 19:35:12 fx Exp $ */
+/* $Header: /u/src/emacs/19.0/oldXMenu/RCS/SetAEQ.c,v 1.1 1992/04/11 22:10:20 jimb Exp $ */
/* Copyright Massachusetts Institute of Technology 1985 */
/*
*/
menu->aeq = aeq;
}
-
-/* arch-tag: 48fc22b4-0722-4852-a044-788444e4a9dc
- (do not change this comment) */
#include "copyright.h"
-/* $Header: /cvsroot/emacs/emacs/oldXMenu/SetFrz.c,v 1.1 1999/10/03 19:35:13 fx Exp $ */
+/* $Header: /u/src/emacs/19.0/oldXMenu/RCS/SetFrz.c,v 1.1 1992/04/11 22:10:21 jimb Exp $ */
/* Copyright Massachusetts Institute of Technology 1985 */
/*
*/
menu->freeze = freeze;
}
-
-/* arch-tag: 69c5670b-3a46-4c78-8fdb-305936d79772
- (do not change this comment) */
#include "copyright.h"
-/* $Header: /cvsroot/emacs/emacs/oldXMenu/SetPane.c,v 1.1 1999/10/03 19:35:14 fx Exp $ */
+/* $Header: /u/src/emacs/19.0/oldXMenu/RCS/SetPane.c,v 1.1 1992/04/11 22:10:21 jimb Exp $ */
/* Copyright Massachusetts Institute of Technology 1985 */
/*
_XMErrorCode = XME_NO_ERROR;
return(p_num);
}
-
-/* arch-tag: 90bc8d90-031d-41a2-a2c6-04bf94efbc90
- (do not change this comment) */
#include "copyright.h"
-/* $Header: /cvsroot/emacs/emacs/oldXMenu/SetSel.c,v 1.2 2003/02/04 14:19:01 lektu Exp $ */
+/* $Header: /cvs/emacs/oldXMenu/SetSel.c,v 1.1 1999/10/03 19:35:15 fx Exp $ */
/* Copyright Massachusetts Institute of Technology 1985 */
/*
_XMErrorCode = XME_NO_ERROR;
return(s_num);
}
-
-/* arch-tag: 79198ae0-c5a4-4d31-adb0-5747f833f56a
- (do not change this comment) */
-/* $Header: /cvsroot/emacs/emacs/oldXMenu/X10.h,v 1.2 2003/02/04 14:19:01 lektu Exp $ */
+/* $Header: /cvs/emacs/oldXMenu/X10.h,v 1.1 1999/10/03 19:35:16 fx Exp $ */
/*
* Copyright 1985, 1986, 1987 by the Massachusetts Institute of Technology
*
char *XLookUpAssoc();
#endif /* _X10_H_ */
-
-/* arch-tag: b0b749fb-757b-470b-b405-af7d033a5aad
- (do not change this comment) */
return(table);
}
-
-/* arch-tag: 5df3237d-ada0-4345-a3ab-282cafb397aa
- (do not change this comment) */
return;
}
-/* arch-tag: 90981a7e-601c-487a-b364-cdf55d6c475b
- (do not change this comment) */
free((char *)table);
}
-/* arch-tag: a536bf02-8d63-45f2-8c1a-c7f9fd4da2cf
- (do not change this comment) */
return(NULL);
}
-/* arch-tag: d5075d0c-4b71-467d-b33c-3f5c4c4afcf2
- (do not change this comment) */
emacs_insque((struct qelem *)new_entry, (struct qelem *)Entry->prev);
}
-/* arch-tag: d7e3fb8a-f3b3-4c5d-a307-75ca67ec1b49
- (do not change this comment) */
#include "copyright.h"
-/* $Header: /cvsroot/emacs/emacs/oldXMenu/XMenu.h,v 1.3 2003/02/04 14:19:01 lektu Exp $ */
+/* $Header: /cvs/emacs/oldXMenu/XMenu.h,v 1.2 2000/01/27 15:29:38 gerd Exp $ */
/* Copyright Massachusetts Institute of Technology 1985 */
/*
#endif
/* Don't add after this point. */
-
-/* arch-tag: 7e57b5ac-9355-4057-9385-afbe6912d60f
- (do not change this comment) */
-/* $Header: /cvsroot/emacs/emacs/oldXMenu/XMenuInt.h,v 1.2 2003/02/04 14:19:01 lektu Exp $ */
+/* $Header: /cvs/emacs/oldXMenu/XMenuInt.h,v 1.1 1999/10/03 19:35:24 fx Exp $ */
/* Copyright Massachusetts Institute of Technology 1985 */
/*
#endif
/* Don't add stuff after this #endif */
-
-/* arch-tag: 00640af1-9386-48b5-a4be-35620b8cd3aa
- (do not change this comment) */
-/* $Header: /cvsroot/emacs/emacs/oldXMenu/copyright.h,v 1.1 1999/10/03 19:35:25 fx Exp $ */
+/* $Header: /u/src/emacs/19.0/oldXMenu/RCS/copyright.h,v 1.1 1992/04/11 22:10:22 jimb Exp $ */
/*
Copyright 1985, 1986, 1987 by the Massachusetts Institute of Technology
*/
-/* arch-tag: c689b1bc-a3ba-41a1-baa0-a3622b5445b2
- (do not change this comment) */
if (prev)
prev->q_forw = next;
}
-
-/* arch-tag: a8719d1a-5c3f-4bce-b36b-173106d36165
- (do not change this comment) */
# before Emacs exits. Perhaps we should put the break somewhere else
# instead...
break x_error_quitter
-
-# arch-tag: 12f34321-7bfa-4240-b77a-3cd3a1696dfe
+++ /dev/null
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001
-# Free Software Foundation, Inc.
-#
-# This file is part of GNU Emacs.
-#
-# GNU Emacs is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# GNU Emacs is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Emacs; see the file COPYING. If not, write to the
-# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
-# Force loading of symbols, enough to give us gdb_valbits etc.
-set main
-
-# Find lwlib source files too.
-dir ../lwlib
-#dir /gd/gnu/lesstif-0.89.9/lib/Xm
-
-# Don't enter GDB when user types C-g to quit.
-# This has one unfortunate effect: you can't type C-c
-# at the GDB to stop Emacs, when using X.
-# However, C-z works just as well in that case.
-handle 2 noprint pass
-
-# Don't pass SIGALRM to Emacs. This makes problems when
-# debugging.
-handle SIGALRM ignore
-
-# Set up a mask to use.
-# This should be EMACS_INT, but in some cases that is a macro.
-# long ought to work in all cases right now.
-set $valmask = ((long)1 << gdb_valbits) - 1
-set $nonvalbits = gdb_emacs_intbits - gdb_valbits
-
-# Set up something to print out s-expressions.
-define pr
-set debug_print ($)
-end
-document pr
-Print the emacs s-expression which is $.
-Works only when an inferior emacs is executing.
-end
-
-define xtype
-output (enum Lisp_Type) (($.i >> gdb_valbits) & 0x7)
-echo \n
-output ((($.i >> gdb_valbits) & 0x7) == Lisp_Misc ? (enum Lisp_Misc_Type) (((struct Lisp_Free *) (($.i & $valmask) | gdb_data_seg_bits))->type) : (($.i >> gdb_valbits) & 0x7) == Lisp_Vectorlike ? ($size = ((struct Lisp_Vector *) (($.i & $valmask) | gdb_data_seg_bits))->size, (enum pvec_type) (($size & PVEC_FLAG) ? $size & PVEC_TYPE_MASK : 0)) : 0)
-echo \n
-end
-document xtype
-Print the type of $, assuming it is an Emacs Lisp value.
-If the first type printed is Lisp_Vector or Lisp_Misc,
-the second line gives the more precise type.
-Otherwise the second line doesn't mean anything.
-end
-
-define xvectype
- set $size = ((struct Lisp_Vector *) (($.i & $valmask) | gdb_data_seg_bits))->size
- output (enum pvec_type) (($size & PVEC_FLAG) ? $size & PVEC_TYPE_MASK : 0)
- echo \n
-end
-document xvectype
- Print the vector subtype of $, assuming it is a vector or pseudovector.
-end
-
-define xmisctype
- output (enum Lisp_Misc_Type) (((struct Lisp_Free *) (($.i & $valmask) | gdb_data_seg_bits))->type)
- echo \n
-end
-document xmisctype
- Print the specific type of $, assuming it is some misc type.
-end
-
-define xint
- print (($.i & $valmask) << $nonvalbits) >> $nonvalbits
-end
-document xint
- Print $, assuming it is an Emacs Lisp integer. This gets the sign right.
-end
-
-define xptr
- print (void *) (($.i & $valmask) | gdb_data_seg_bits)
-end
-document xptr
- Print the pointer portion of $, assuming it is an Emacs Lisp value.
-end
-
-define xmarker
- print (struct Lisp_Marker *) (($.i & $valmask) | gdb_data_seg_bits)
-end
-document xmarker
- Print $ as a marker pointer, assuming it is an Emacs Lisp marker value.
-end
-
-define xoverlay
- print (struct Lisp_Overlay *) (($.i & $valmask) | gdb_data_seg_bits)
-end
-document xoverlay
- Print $ as a overlay pointer, assuming it is an Emacs Lisp overlay value.
-end
-
-define xmiscfree
- print (struct Lisp_Free *) (($.i & $valmask) | gdb_data_seg_bits)
-end
-document xmiscfree
- Print $ as a misc free-cell pointer, assuming it is an Emacs Lisp Misc value.
-end
-
-define xintfwd
- print (struct Lisp_Intfwd *) (($.i & $valmask) | gdb_data_seg_bits)
-end
-document xintfwd
- Print $ as an integer forwarding pointer, assuming it is an Emacs Lisp Misc value.
-end
-
-define xboolfwd
- print (struct Lisp_Boolfwd *) (($.i & $valmask) | gdb_data_seg_bits)
-end
-document xboolfwd
- Print $ as a boolean forwarding pointer, assuming it is an Emacs Lisp Misc value.
-end
-
-define xobjfwd
- print (struct Lisp_Objfwd *) (($.i & $valmask) | gdb_data_seg_bits)
-end
-document xobjfwd
- Print $ as an object forwarding pointer, assuming it is an Emacs Lisp Misc value.
-end
-
-define xbufobjfwd
- print (struct Lisp_Buffer_Objfwd *) (($.i & $valmask) | gdb_data_seg_bits)
-end
-document xbufobjfwd
- Print $ as a buffer-local object forwarding pointer, assuming it is an Emacs Lisp Misc value.
-end
-
-define xkbobjfwd
- print (struct Lisp_Kboard_Objfwd *) (($.i & $valmask) | gdb_data_seg_bits)
-end
-document xkbobjfwd
- Print $ as a kboard-local object forwarding pointer, assuming it is an Emacs Lisp Misc value.
-end
-
-define xbuflocal
- print (struct Lisp_Buffer_Local_Value *) (($.i & $valmask) | gdb_data_seg_bits)
-end
-document xbuflocal
- Print $ as a buffer-local-value pointer, assuming it is an Emacs Lisp Misc value.
-end
-
-define xsymbol
- print (struct Lisp_Symbol *) (($.i & $valmask) | gdb_data_seg_bits)
- xprintsymptr $
-end
-document xsymbol
- Print the name and address of the symbol $.
- This command assumes that $ is an Emacs Lisp symbol value.
-end
-
-define xstring
- print (struct Lisp_String *) (($.i & $valmask) | gdb_data_seg_bits)
- output ($->size > 1000) ? 0 : ($->data[0])@($->size_byte < 0 ? $->size : $->size_byte)
- echo \n
-end
-document xstring
- Print the contents and address of the string $.
- This command assumes that $ is an Emacs Lisp string value.
-end
-
-define xvector
- print (struct Lisp_Vector *) (($.i & $valmask) | gdb_data_seg_bits)
- output ($->size > 50) ? 0 : ($->contents[0])@($->size)
- echo \n
-end
-document xvector
- Print the contents and address of the vector $.
- This command assumes that $ is an Emacs Lisp vector value.
-end
-
-define xprocess
- print (struct Lisp_Process *) (($.i & $valmask) | gdb_data_seg_bits)
- output *$
- echo \n
-end
-document xprocess
- Print the address of the struct Lisp_process which the Lisp_Object $ points to.
-end
-
-define xframe
- print (struct frame *) (($.i & $valmask) | gdb_data_seg_bits)
-end
-document xframe
- Print $ as a frame pointer, assuming it is an Emacs Lisp frame value.
-end
-
-define xcompiled
- print (struct Lisp_Vector *) (($.i & $valmask) | gdb_data_seg_bits)
- output ($->contents[0])@($->size & 0xff)
-end
-document xcompiled
- Print $ as a compiled function pointer, assuming it is an Emacs Lisp compiled value.
-end
-
-define xwindow
- print (struct window *) (($.i & $valmask) | gdb_data_seg_bits)
- printf "%dx%d+%d+%d\n", $->width, $->height, $->left, $->top
-end
-document xwindow
- Print $ as a window pointer, assuming it is an Emacs Lisp window value.
- Print the window's position as "WIDTHxHEIGHT+LEFT+TOP".
-end
-
-define xwinconfig
- print (struct save_window_data *) (($.i & $valmask) | gdb_data_seg_bits)
-end
-document xwinconfig
- Print $ as a window configuration pointer, assuming it is an Emacs Lisp window configuration value.
-end
-
-define xsubr
- print (struct Lisp_Subr *) (($.i & $valmask) | gdb_data_seg_bits)
- output *$
- echo \n
-end
-document xsubr
- Print the address of the subr which the Lisp_Object $ points to.
-end
-
-define xchartable
- print (struct Lisp_Char_Table *) (($.i & $valmask) | gdb_data_seg_bits)
- printf "Purpose: "
- output (char*)&((struct Lisp_Symbol *) (($->purpose.i & $valmask) | gdb_data_seg_bits))->name->data
- printf " %d extra slots", ($->size & 0x1ff) - 388
- echo \n
-end
-document xchartable
- Print the address of the char-table $, and its purpose.
- This command assumes that $ is an Emacs Lisp char-table value.
-end
-
-define xboolvector
- print (struct Lisp_Bool_Vector *) (($.i & $valmask) | gdb_data_seg_bits)
- output ($->size > 256) ? 0 : ($->data[0])@(($->size + 7)/ 8)
- echo \n
-end
-document xboolvector
- Print the contents and address of the bool-vector $.
- This command assumes that $ is an Emacs Lisp bool-vector value.
-end
-
-define xbuffer
- print (struct buffer *) (($.i & $valmask) | gdb_data_seg_bits)
- output ((struct Lisp_String *) (($->name.i & $valmask) | gdb_data_seg_bits))->data
- echo \n
-end
-document xbuffer
- Set $ as a buffer pointer, assuming it is an Emacs Lisp buffer value.
- Print the name of the buffer.
-end
-
-define xhashtable
- print (struct Lisp_Hash_Table *) (($.i & $valmask) | gdb_data_seg_bits)
-end
-document xhashtable
- Set $ as a hash table pointer, assuming it is an Emacs Lisp hash table value.
-end
-
-define xcons
- print (struct Lisp_Cons *) (($.i & $valmask) | gdb_data_seg_bits)
- output/x *$
- echo \n
-end
-document xcons
- Print the contents of $, assuming it is an Emacs Lisp cons.
-end
-
-define nextcons
- p $.cdr
- xcons
-end
-document nextcons
- Print the contents of the next cell in a list.
- This assumes that the last thing you printed was a cons cell contents
- (type struct Lisp_Cons) or a pointer to one.
-end
-
-define xcar
- print/x ((($.i >> gdb_valbits) & 0xf) == Lisp_Cons ? ((struct Lisp_Cons *) (($.i & $valmask) | gdb_data_seg_bits))->car : 0)
-end
-document xcar
- Print the car of $, assuming it is an Emacs Lisp pair.
-end
-
-define xcdr
- print/x ((($.i >> gdb_valbits) & 0xf) == Lisp_Cons ? ((struct Lisp_Cons *) (($.i & $valmask) | gdb_data_seg_bits))->cdr : 0)
-end
-document xcdr
- Print the cdr of $, assuming it is an Emacs Lisp pair.
-end
-
-define xfloat
- print ((struct Lisp_Float *) (($.i & $valmask) | gdb_data_seg_bits))->data
-end
-document xfloat
- Print $ assuming it is a lisp floating-point number.
-end
-
-define xscrollbar
- print (struct scrollbar *) (($.i & $valmask) | gdb_data_seg_bits)
- output *$
- echo \n
-end
-document xscrollbar
- Print $ as a scrollbar pointer.
-end
-
-define xprintsym
- set $sym = ((struct Lisp_Symbol *) (($arg0.i & $valmask) | gdb_data_seg_bits))
- xprintsymptr $sym
-end
-document xprintsym
- Print argument as a symbol.
-end
-define xprintsymptr
- set $sym = $arg0
- set $sym_name = ((struct Lisp_String *)(($sym->xname.i & $valmask) | gdb_data_seg_bits))
- output ($sym_name->data[0])@($sym_name->size_byte < 0 ? $sym_name->size : $sym_name->size_byte)
- echo \n
-end
-
-define xbacktrace
- set $bt = backtrace_list
- while $bt
- set $type = (enum Lisp_Type) (((*$bt->function).i >> gdb_valbits) & 0x7)
- if $type == Lisp_Symbol
- xprintsym (*$bt->function)
- else
- printf "0x%x ", (*$bt->function).i
- if $type == Lisp_Vectorlike
- set $size = ((struct Lisp_Vector *) (((*$bt->function).i & $valmask) | gdb_data_seg_bits))->size
- output (enum pvec_type) (($size & PVEC_FLAG) ? $size & PVEC_TYPE_MASK : 0)
- else
- printf "Lisp type %d", $type
- end
- echo \n
- end
- set $bt = $bt->next
- end
-end
-document xbacktrace
- Print a backtrace of Lisp function calls from backtrace_list.
- Set a breakpoint at Fsignal and call this to see from where
- an error was signaled.
-end
-
-define xreload
- set $valmask = ((long)1 << gdb_valbits) - 1
- set $nonvalbits = gdb_emacs_intbits - gdb_valbits
-end
-document xreload
- When starting Emacs a second time in the same gdb session under
- FreeBSD 2.2.5, gdb 4.13, $valmask and $nonvalbits have lost
- their values. (The same happens on current (2000) versions of GNU/Linux
- with gdb 5.0.)
- This function reloads them.
-end
-
-define hook-run
- xreload
-end
-
-# Call xreload if a new Emacs executable is loaded.
-define hookpost-run
- xreload
-end
-
-set print pretty on
-set print sevenbit-strings
-
-# show environment DISPLAY
-# show environment TERM
-# set args -geometry 80x40+0+0
-
-# Don't let abort actually run, as it will make
-# stdio stop working and therefore the `pr' command above as well.
-# break abort
-
-# If we are running in synchronous mode, we want a chance to look around
-# before Emacs exits. Perhaps we should put the break somewhere else
-# instead...
-# break x_error_quitter
-
-# arch-tag: 08f4d20d-0254-4374-a80c-179d5a517915
-2003-09-03 Kim F. Storm <storm@cua.dk>
-
- * xdisp.c (get_window_cursor_type): Partially undo 2002-03-01
- change (superseded by 2002-08-30 change); the default blink-off
- cursor is now again "no cursor".
-
-2003-09-01 Jason Rumney <jasonr@gnu.org>
-
- * makefile.w32-in (alloca.o): Remove.
- (coding.o): Depend on intervals.h
- (emacs.o, bytecode.o): Depend on window.h
-
-2003-09-01 Dave Love <fx@gnu.org>
-
- * Makefile.in (alloca.o): Remove commands.
- (coding.o): Depend on intervals.h composite.h window.h.
- (emacs.o): Depend on window.h keyboard.h keymap.h.
- (gtkutil.o): Depend on keyboard.h charset.h coding.h.
- (bytecode.o): Depend on window.h.
-
-2003-08-31 Jason Rumney <jasonr@gnu.org>
-
- * w32term.c (w32_per_char_metric): Allow cached metrics to be
- returned even when font_type is unknown.
-
- * xdisp.c (init_iterator): Remove old WINDOWSNT conditional.
-
-2003-08-30 Jan Dj\e,Ad\e(Brv <jan.h.d@swipnet.se>
-
- * xterm.c (x_term_init): Initialize new fields in x_display_info.
-
- * xterm.h (struct x_display_info): Add red/green/blue_bits and
- *_offset.
-
- * xfns.c (lookup_rgb_color): Use new fields in x_display_info to
- calculate pixel value.
-
-2003-08-29 Gerd Moellmann <gerd.moellmann@t-online.de>
-
- * xdisp.c (redisplay_internal): Fix change of 2003-04-30. Don't
- tell redisplay display is accurate when it's actually been paused
- for pending input.
-
-2003-08-29 Richard M. Stallman <rms@gnu.org>
-
- * dispnew.c (adjust_glyph_matrix): Call window_box
- whenever W is nonzero.
-
- * data.c (Fmake_variable_buffer_local, Fmake_local_variable)
- (Fkill_local_variable, Fmake_variable_frame_local)
- (Flocal_variable_p, Flocal_variable_if_set_p):
- Use indirect_variable to trace thru variable aliases.
-
- * config.in: Updated.
-
- * callint.c (Fcall_interactively): Save and restore
- Vthis_command, Vthis_original_command, real_this_command,
- and current_kboard->Vlast_command.
-
- * abbrev.c (Fexpand_abbrev): Insert before deleting.
-
-2003-08-29 Gerd Moellmann <gerd@gnu.org>
-
- * xfns.c (lookup_rgb_color): Handle TrueColor visuals specially.
-
-2003-08-28 David Abrahams <dave@boost-consulting.com> (tiny change)
-
- * coding.c (decode_coding_iso2022): Initialized local variable c2.
- (decode_coding_sjis_big5): Likewise.
-
-2003-08-27 Jason Rumney <jasonr@gnu.org>
-
- * w32.c (sys_pipe): Protect against file descriptor overflow.
-
- * w32fns.c (syms_of_w32fns): Remove non-existent functions.
-
- * w32term.c (w32_read_socket): Fix WM_MOUSEWHEEL assignment.
-
-2003-08-26 Terje Rosten <terjeros@phys.ntnu.no>
-
- * xfns.c (Vgtk_version_string): New variable.
- (syms_of_xfns): DEFVAR_LISP it. Provide gtk.
-
-2003-08-24 Eli Zaretskii <eliz@elta.co.il>
-
- * term.c (term_init): Remove `const' from buffer_size's
- declaration.
-
- * Makefile.in (msdos.o): Depend on intervals.h.
-
- * msdos.c: Include intervals.h, since STRING_INTERVALS requires
- that.
-
-2003-08-21 Jan Dj\e,Ad\e(Brv <jan.h.d@swipnet.se>
-
- * xterm.h (struct x_display_info): New fields: client_leader_window
- and Xatom_wm_client_leader.
-
- * xterm.c (x_initialize): Move call to x_session_initialize to ...
- (x_term_init): ... here. Initialize client_leader fields in dpyinfo.
-
- * xsmfns.c (create_client_leader_window): New function.
- (x_session_initialize): Call create_client_leader_window, take
- dpyinfo as argument.
-
- * xfns.c (Fx_create_frame): Set property WM_CLIENT_LEADER.
-
- * Makefile.in (xsmfns.o): Add more depenedencies.
-
-2003-08-21 Dave Love <fx@gnu.org>
-
- * m/iris4d.h: Use _MIPS_SZLONG, not _LP64.
-
-2003-08-21 Kenichi Handa <handa@m17n.org>
-
- * term.c (term_init): Fix previous change; don't rely on the
- length of `buffer' if TERMINFO is defined.
-
-2003-08-20 Dave Love <fx@gnu.org>
-
- * atimer.h: Include lisp.h.
-
- * lisp.h (EMACS_LISP_H): New.
- (popup_activated_flag): Don't declare.
-
- * alloca.c: Some merging with gnulib. Change logic and doc
- concerning (x)malloc/(x)free -- no longer Emacs-specific.
- [DO_BLOCK_INPUT]: Don't include lisp.h.
- (xmalloc, xfree): Declare.
- (malloc): Don't declare.
-
- * Makefile.in (LWLIB_OPTIONS): Removed (unused).
- (alloca.o): Remove obsolete stuff concerning alloca.s. Depend on
- atimer.h, blockinput.h.
-
- * alloc.c (lisp_align_malloc): Change type of `aligned'.
-
- * alloca.s: Removed.
-
-2003-08-19 Gerd Moellmann <gerd@gnu.org>
-
- * s/freebsd.h [__FreeBSD_version >= 400000]: Define TERMINFO,
- use -lncurses.
-
- * term.c (term_init): Use a buffer of size 4096 for tgetent since
- FreeBSD returns something longer than 2044. Abort if the end of
- the buffer is overwritten.
-
-2003-08-19 Miles Bader <miles@gnu.org>
-
- * xterm.c (x_term_init): Correctly use result of Ffile_readable_p.
-
-2003-08-19 Gerd Moellmann <gerd@gnu.org>
-
- * alloc.c (lisp_align_malloc): Check for memory full when
- allocating ablocks, which also avoids freeing a pointer into an
- ablocks structure.
-
- * puresize.h (BASE_PURESIZE): Increase to 1100000.
-
- * buffer.c (Fmove_overlay): Set overlay's next pointer
- unconditionally.
-
-2003-08-16 Richard M. Stallman <rms@gnu.org>
-
- * editfns.c (Fencode_time): Doc fix.
-
-2003-08-16 David Ponce <david@dponce.com>
-
- * fileio.c (Fwrite_region): Fix conditional expression to issue
- the right message.
-
-2003-08-16 Juri Linkov <juri@jurta.org> (tiny change)
-
- * syntax.c (Fforward_word): Argument changed to optional.
- Set default value to 1.
-
-2003-08-15 Kenichi Handa <handa@m17n.org>
-
- * xfaces.c (better_font_p): Prefer a real scalable font; i.e. not
- what autoscaled.
- (best_matching_font): Once we find a better scalable font, set
- non_scalable_has_exact_height_p to 1.
- (try_font_list): Call try_alternative_families to try any family
- with the given registry.
-
-2003-08-09 Andreas Schwab <schwab@suse.de>
-
- * alloc.c (mark_object): Handle Lisp_Misc_Save_Value.
-
- * print.c (print_string): Fix printing of multibyte string with
- nontrivial printcharfun.
-
2003-07-31 Jan Dj\e,Ad\e(Brv <jan.h.d@swipnet.se>
* xfns.c (xg_set_icon): Rewrite to compile with GTK 2.0 and 2.2.
Copyright (C) 2001, 2002 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted provided the copyright notice and this notice are preserved.
-
-;;; arch-tag: 5dcc435f-4038-4141-b3bf-5be51cd76bd4
Copyright (C) 1985, 1986 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted provided the copyright notice and this notice are preserved.
-
-;;; arch-tag: 2d2c1086-b0a5-437c-bc58-fb38ce2e0f9b
Copyright (C) 1986, 1987, 1988 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted provided the copyright notice and this notice are preserved.
-
-;;; arch-tag: 3334fc8a-ec24-4601-99fc-4c8adc2b31bb
Copyright (C) 1993 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted provided the copyright notice and this notice are preserved.
-
-;;; arch-tag: 136a8e5c-4f83-403b-9132-874f1c47f8a9
Copyright (C) 1993, 1994 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted provided the copyright notice and this notice are preserved.
-
-;;; arch-tag: 2e44924a-e45a-4129-ad93-1f7bb410b609
Copyright (C) 1994, 1995 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted provided the copyright notice and this notice are preserved.
-
-;;; arch-tag: aea244d6-d513-4b51-8dba-5ecdf1aa5875
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted provided the copyright notice and this notice are preserved.
-
-;;; arch-tag: 66a98e1c-2268-45e8-8a57-286b9c85a4e9
Copyright (C) 1997, 1998 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted provided the copyright notice and this notice are preserved.
-
-;;; arch-tag: 3b03e091-1123-4031-b67d-41683932cc48
Copyright (C) 1999 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted provided the copyright notice and this notice are preserved.
-
-;;; arch-tag: 4d73444a-8f6e-4255-92a6-d3abc438b8d3
Copyright (C) 2001, 2002 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted provided the copyright notice and this notice are preserved.
-
-;;; arch-tag: 38875948-6e89-4f08-b0ca-ff328f1e8b72
#define OLDXMENU_OPTIONS
#endif
+/* Don't lose if this was not defined. */
+#ifndef LWLIB_OPTIONS
+#define LWLIB_OPTIONS
+#endif
+
#if defined (HAVE_X_WINDOWS) && defined (HAVE_X11) && defined (HAVE_MENUS)
/* We use stamp-xmenu with these two deps
C_SWITCH_X_MACHINE_1 = C_SWITCH_X_MACHINE
C_SWITCH_X_SYSTEM_1 = C_SWITCH_X_SYSTEM
really-lwlib:
- cd ${lwlibdir}; ${MAKE} ${MFLAGS} \
+ cd ${lwlibdir}; ${MAKE} ${MFLAGS} LWLIB_OPTIONS \
CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' \
"C_SWITCH_X_SITE=$(C_SWITCH_X_SITE_1)" \
"C_SWITCH_X_MACHINE=$(C_SWITCH_X_MACHINE_1)" \
exit 1
/* Some machines have alloca built-in.
- They should define HAVE_ALLOCA.
+ 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).
*/
-alloca.o: alloca.c blockinput.h atimer.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 : alloca.c
+ $(CC) -c $(CPPFLAGS) -DEMACS_FREE=xfree -DDO_BLOCK_INPUT \
+ $(ALL_CFLAGS) ${srcdir}/alloca.c
+#else
+#ifndef HAVE_ALLOCA
+alloca.o : 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. */
+ -rm -f allocatem.c
+ 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/\f//' -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) */
/* Nearly all the following files depend on lisp.h,
but it is not included as a dependency because
ccl.o: ccl.c ccl.h charset.h coding.h $(config_h)
charset.o: charset.c charset.h buffer.h coding.h composite.h disptab.h \
$(config_h)
-coding.o: coding.c coding.h ccl.h buffer.h charset.h intervals.h composite.h window.h $(config_h)
+coding.o: coding.c coding.h ccl.h buffer.h charset.h $(config_h)
cm.o: cm.c cm.h termhooks.h $(config_h)
cmds.o: cmds.c syntax.h buffer.h charset.h commands.h window.h $(config_h) \
msdos.h dispextern.h
editfns.o: editfns.c window.h buffer.h systime.h $(INTERVAL_SRC) charset.h \
coding.h dispextern.h $(config_h)
emacs.o: emacs.c commands.h systty.h syssignal.h blockinput.h process.h \
- termhooks.h buffer.h atimer.h systime.h $(INTERVAL_SRC) $(config_h) \
- window.h keyboard.h keymap.h
+ termhooks.h buffer.h atimer.h systime.h $(INTERVAL_SRC) $(config_h)
fileio.o: fileio.c window.h buffer.h systime.h $(INTERVAL_SRC) charset.h \
coding.h ccl.h msdos.h dispextern.h $(config_h)
filelock.o: filelock.c buffer.h systime.h epaths.h $(config_h)
mktime.o: mktime.c $(config_h)
msdos.o: msdos.c msdos.h dosfns.h systime.h termhooks.h dispextern.h frame.h \
termopts.h termchar.h charset.h coding.h ccl.h disptab.h window.h \
- keyboard.h intervals.h $(config_h)
+ keyboard.h $(config_h)
process.o: process.c process.h buffer.h window.h termhooks.h termopts.h \
commands.h syssignal.h systime.h systty.h syswait.h frame.h dispextern.h \
blockinput.h atimer.h charset.h coding.h ccl.h msdos.h composite.h \
xselect.o: xselect.c process.h dispextern.h frame.h xterm.h blockinput.h \
buffer.h atimer.h systime.h $(config_h)
xrdb.o: xrdb.c $(config_h) epaths.h
-xsmfns.o: xsmfns.c $(config_h) systime.h sysselect.h termhooks.h xterm.h \
- lisp.h termopts.h
+xsmfns.o: xsmfns.c $(config_h) systime.h sysselect.h termhooks.h
gtkutil.o: gtkutil.c gtkutil.h xterm.h lisp.h frame.h $(config_h) \
- blockinput.h window.h atimer.h termhooks.h keyboard.h charset.h coding.h
+ blockinput.h window.h atimer.h termhooks.h
hftctl.o: hftctl.c $(config_h)
sound.o: sound.c dispextern.h $(config_h)
alloc.o: alloc.c process.h frame.h window.h buffer.h puresize.h syssignal.h keyboard.h \
blockinput.h atimer.h systime.h charset.h dispextern.h $(config_h) $(INTERVAL_SRC)
-bytecode.o: bytecode.c buffer.h syntax.h charset.h window.h $(config_h)
+bytecode.o: bytecode.c buffer.h syntax.h charset.h $(config_h)
data.o: data.c buffer.h puresize.h charset.h syssignal.h keyboard.h $(config_h)
eval.o: eval.c commands.h keyboard.h blockinput.h atimer.h systime.h \
$(config_h)
mv -f emacs${EXEEXT} bootstrap-emacs${EXEEXT}
#endif /* ! defined (CANNOT_DUMP) */
-/* arch-tag: 8e915ae5-d15d-4617-8c41-c5c267a23b00
- (do not change this comment) */
{
SET_PT (wordstart);
+ del_range_both (wordstart, wordstart_byte, wordend, wordend_byte, 1);
+
insert_from_string (expansion, 0, 0, SCHARS (expansion),
SBYTES (expansion), 1);
- del_range_both (PT, PT_BYTE,
- wordend + (PT - wordstart),
- wordend_byte + (PT_BYTE - wordstart_byte),
- 1);
-
SET_PT (PT + whitecnt);
if (uccount && !lccount)
defsubr (&Sinsert_abbrev_table_description);
defsubr (&Sdefine_abbrev_table);
}
-
-/* arch-tag: b721db69-f633-44a8-a361-c275acbdad7d
- (do not change this comment) */
#define ACL$W_SIZE 8
#define ACL$B_TYPE 10
#define ACL$L_LIST 12
-
-/* arch-tag: 7c11e99d-34df-41e8-98e2-20f152c4ad73
- (do not change this comment) */
}
-/* Like free but block interrupt input. */
+/* Like free but block interrupt input.. */
void
xfree (block)
if (!free_ablock)
{
- int i;
- EMACS_INT aligned; /* int gets warning casting to 64-bit pointer. */
+ int i, aligned;
#ifdef DOUG_LEA_MALLOC
/* Prevent mmap'ing the chunk. Lisp data may not be mmap'ed
mallopt (M_MMAP_MAX, MMAP_MAX_AREAS);
#endif
- /* If the memory just allocated cannot be addressed thru a Lisp
- object's pointer, and it needs to be, that's equivalent to
- running out of memory. */
- if (type != MEM_TYPE_NON_LISP)
- {
- Lisp_Object tem;
- char *end = (char *) base + ABLOCKS_BYTES - 1;
- XSETCONS (tem, end);
- if ((char *) XCONS (tem) != end)
- {
- lisp_malloc_loser = base;
- free (base);
- UNBLOCK_INPUT;
- memory_full ();
- }
- }
-
/* Initialize the blocks and put them on the free list.
Is `base' was not properly aligned, we can't use the last block. */
for (i = 0; i < (aligned ? ABLOCKS_SIZE : ABLOCKS_SIZE - 1); i++)
val = free_ablock;
free_ablock = free_ablock->x.next_free;
+ /* If the memory just allocated cannot be addressed thru a Lisp
+ object's pointer, and it needs to be,
+ that's equivalent to running out of memory. */
+ if (val && type != MEM_TYPE_NON_LISP)
+ {
+ Lisp_Object tem;
+ XSETCONS (tem, (char *) val + nbytes - 1);
+ if ((char *) XCONS (tem) != (char *) val + nbytes - 1)
+ {
+ lisp_malloc_loser = val;
+ free (val);
+ val = 0;
+ }
+ }
+
#if GC_MARK_STACK && !defined GC_MALLOC_CHECK
if (val && type != MEM_TYPE_NON_LISP)
mem_insert (val, (char *) val + nbytes, type);
since all markable slots in current buffer marked anyway. */
/* Don't need to do Lisp_Objfwd, since the places they point
are protected with staticpro. */
- case Lisp_Misc_Save_Value:
break;
case Lisp_Misc_Overlay:
defsubr (&Sgc_status);
#endif
}
-
-/* arch-tag: 6695ca10-e3c5-4c2c-8bc3-ed26a7dda857
- (do not change this comment) */
#endif
#ifdef DO_BLOCK_INPUT
+# include "lisp.h"
# include "blockinput.h"
#endif
lose
-- must know STACK_DIRECTION at compile-time
/* Using #error here is not wise since this file should work for
- old and obscure compilers.
-
- As far as I know, using it is OK if it's indented -- at least for
- pcc-based processors. -- fx */
+ old and obscure compilers. */
# endif /* STACK_DIRECTION undefined */
# endif /* static */
# endif /* emacs */
# define ADDRESS_FUNCTION(arg) &(arg)
# endif
-# ifndef POINTER_TYPE
-# ifdef __STDC__
-# define POINTER_TYPE void
-# else
-# define POINTER_TYPE char
-# endif
-# endif
+# ifdef POINTER_TYPE
typedef POINTER_TYPE *pointer;
+# else /* not POINTER_TYPE */
+# if __STDC__
+typedef void *pointer;
+# else /* not __STDC__ */
+typedef char *pointer;
+# endif /* not __STDC__ */
+# endif /* not POINTER_TYPE */
# ifndef NULL
# define NULL 0
# endif
-/* The Emacs executable needs alloca to call xmalloc, because ordinary
- malloc isn't protected from input signals. xmalloc also checks for
- out-of-memory errors, so we should use it generally.
+/* Different portions of Emacs need to call different versions of
+ malloc. The Emacs executable needs alloca to call xmalloc, because
+ ordinary malloc isn't protected from input signals. On the other
+ hand, the utilities in lib-src need alloca to call malloc; some of
+ them are very simple, and don't have an xmalloc routine.
- Callers below should use malloc. */
+ Non-Emacs programs expect this to call xmalloc.
-# undef malloc
-# define malloc xmalloc
-# undef free
-# define free xfree
+ Callers below should use malloc. */
-void *xmalloc _P ((size_t));
-void xfree _P ((void *))
+# ifdef emacs
+# undef malloc
+# define malloc xmalloc
+# ifdef EMACS_FREE
+# define free EMACS_FREE
+# endif
+# endif
+extern pointer malloc ();
/* Define STACK_DIRECTION if you know the direction of stack
growth for your system; otherwise it will be automatically
/* Allocate combined header + user data storage. */
{
- /* Address of header. */
register pointer new = malloc (sizeof (header) + size);
+ /* Address of header. */
if (new == 0)
abort();
# endif /* no alloca */
#endif /* not GCC version 2 */
-
-/* arch-tag: 5c9901c8-3cd4-453e-bd66-d9035a175ee3
- (do not change this comment) */
pending_atimers = 0;
signal (SIGALRM, alarm_signal_handler);
}
-
-/* arch-tag: e6308261-eec6-404b-89fb-6e5909518d70
- (do not change this comment) */
#ifndef EMACS_ATIMER_H
#define EMACS_ATIMER_H
-/* Building alloca.o includes us, and we need lisp.h for the P_ macro
- in that case. */
-#include "lisp.h"
#include "systime.h" /* for EMACS_TIME */
/* Forward declaration. */
Lisp_Object unwind_stop_other_atimers P_ ((Lisp_Object));
#endif /* EMACS_ATIMER_H */
-
-/* arch-tag: 02c7c1c8-45bd-4222-b874-4ca44662f60b
- (do not change this comment) */
extern void reinvoke_input_signal ();
#endif /* EMACS_BLOCKINPUT_H */
-
-/* arch-tag: 51a9ec86-945a-4966-8f04-2d1341250e03
- (do not change this comment) */
end = OVERLAY_END (overlay);
if (OVERLAY_POSITION (end) < b->overlay_center)
{
- XOVERLAY (overlay)->next = b->overlays_after;
- b->overlays_after = XOVERLAY (overlay);
+ if (b->overlays_after)
+ XOVERLAY (overlay)->next = b->overlays_after;
+ b->overlays_after = XOVERLAY (overlay);
}
else
{
- XOVERLAY (overlay)->next = b->overlays_before;
- b->overlays_before = XOVERLAY (overlay);
+ if (b->overlays_before)
+ XOVERLAY (overlay)->next = b->overlays_before;
+ b->overlays_before = XOVERLAY (overlay);
}
/* This puts it in the right list, and in the right order. */
initialized when that function gets called. */
Fput (intern ("erase-buffer"), Qdisabled, Qt);
}
-
-/* arch-tag: e48569bf-69a9-4b65-a23b-8e68769436e1
- (do not change this comment) */
#define PER_BUFFER_TYPE(OFFSET) \
(*(Lisp_Object *)((OFFSET) + (char *) &buffer_local_types))
-
-/* arch-tag: 679305dd-d41c-4a50-b170-3caf5c97b2d1
- (do not change this comment) */
}
#endif
}
-
-/* arch-tag: b9803b6f-1ed6-4190-8adf-33fd3a9d10e9
- (do not change this comment) */
Lisp_Object Vcommand_history;
extern Lisp_Object Vhistory_length;
-extern Lisp_Object Vthis_original_command, real_this_command;
Lisp_Object Vcommand_debug_status, Qcommand_debug_status;
Lisp_Object Qenable_recursive_minibuffers;
int key_count;
int record_then_fail = 0;
- Lisp_Object save_this_command, save_last_command;
- Lisp_Object save_this_original_command, save_real_this_command;
-
- save_this_command = Vthis_command;
- save_this_original_command = Vthis_original_command;
- save_real_this_command = real_this_command;
- save_last_command = current_kboard->Vlast_command;
-
if (NILP (keys))
keys = this_command_keys, key_count = this_command_key_count;
else
XSETCDR (teml, Qnil);
}
}
-
- Vthis_command = save_this_command;
- Vthis_original_command = save_this_original_command;
- real_this_command= save_real_this_command;
- current_kboard->Vlast_command = save_last_command;
-
single_kboard_state ();
return apply1 (function, specs);
}
if (record_then_fail)
Fbarf_if_buffer_read_only ();
- Vthis_command = save_this_command;
- Vthis_original_command = save_this_original_command;
- real_this_command= save_real_this_command;
- current_kboard->Vlast_command = save_last_command;
-
single_kboard_state ();
{
defsubr (&Scall_interactively);
defsubr (&Sprefix_numeric_value);
}
-
-/* arch-tag: a3a7cad7-bcac-42ce-916e-1bd2546ebf37
- (do not change this comment) */
#endif
defsubr (&Scall_process_region);
}
-
-/* arch-tag: 769b8045-1df7-4d2b-8968-e3fb49017f95
- (do not change this comment) */
initial_define_key (meta_map, 'l', "downcase-word");
initial_define_key (meta_map, 'c', "capitalize-word");
}
-
-/* arch-tag: 60a73c66-5489-47e7-a81f-cead4057c526
- (do not change this comment) */
defsubr (&Sset_case_table);
defsubr (&Sset_standard_case_table);
}
-
-/* arch-tag: e06388ad-99fe-40ec-ba67-9d010fcc4916
- (do not change this comment) */
category_table_version = 0;
}
-
-/* arch-tag: 74ebf524-121b-4d9c-bd68-07f8d708b211
- (do not change this comment) */
&& word_boundary_p (c1, c2))
extern int word_boundary_p P_ ((int, int));
-
-/* arch-tag: 309dfe83-c3e2-4d22-8e81-faae5aece0ff
- (do not change this comment) */
defsubr (&Sregister_ccl_program);
defsubr (&Sregister_code_conversion_map);
}
-
-/* arch-tag: bb9a37be-68ce-4576-8d3d-15d750e4a860
- (do not change this comment) */
extern Lisp_Object Qccl_program_idx;
#endif /* EMACS_CCL_H */
-
-/* arch-tag: 14681df7-876d-43de-bc71-6b78e23a4e3c
- (do not change this comment) */
}
#endif /* emacs */
-
-/* arch-tag: 66a89b8d-4c28-47d3-9ca1-56f78440d69f
- (do not change this comment) */
} while (0)
#endif /* EMACS_CHARSET_H */
-
-/* arch-tag: 3b96db55-4961-481d-ac3e-219f46a2b3aa
- (do not change this comment) */
#define CHP$V_READ 0
#define CHP$V_WRITE 1
#define CHP$V_USEREADALL 2
-
-/* arch-tag: a7117984-e927-4f8e-932e-35d5fd524f12
- (do not change this comment) */
return - 2;
return 0;
}
-
-/* arch-tag: bcf64c02-00f6-44ef-94b6-c56eab5b3dc4
- (do not change this comment) */
extern void cmgoto ();
extern void Wcm_clear ();
extern int Wcm_init ();
-
-/* arch-tag: acc1535a-7136-49d6-b22d-9bc85702251b
- (do not change this comment) */
initial_define_key (global_map, Ctl ('F'), "forward-char");
initial_define_key (global_map, 0177, "delete-backward-char");
}
-
-/* arch-tag: 022ba3cd-67f9-4978-9c5d-7d2b18d8644e
- (do not change this comment) */
while (1)
{
- int c1, c2 = 0;
+ int c1, c2;
src_base = src;
ONE_MORE_BYTE (c1);
coding->produced_char = 0;
while (1)
{
- int c, charset, c1, c2 = 0;
+ int c, charset, c1, c2;
src_base = src;
ONE_MORE_BYTE (c1);
#endif /* emacs */
-/* arch-tag: 3a3a2b01-5ff6-4071-9afe-f5b808d9229d
- (do not change this comment) */
extern Lisp_Object Qcoding_system_error;
#endif /* EMACS_CODING_H */
-
-/* arch-tag: 2bc3b4fa-6870-4f64-8135-b962b2d290e4
- (do not change this comment) */
so put cursor on minibuffer after the prompt. */
extern int cursor_in_echo_area;
-
-/* arch-tag: 4f7ca0b7-6a56-4b20-8bf5-b67a99921d1d
- (do not change this comment) */
defsubr (&Scompose_string_internal);
defsubr (&Sfind_composition_internal);
}
-
-/* arch-tag: 79cefaf8-ca48-4eed-97e5-d5afb290d272
- (do not change this comment) */
extern void compose_chars_in_text P_ ((int, int, Lisp_Object));
#endif /* not EMACS_COMPOSITE_H */
-
-/* arch-tag: 59524d89-c645-47bd-b5e6-65e861690118
- (do not change this comment) */
/* Define to 1 if you're using XFree386. */
#undef HAVE_XFREE386
-/* Define to 1 if XIM is available */
-#undef HAVE_XIM
-
/* Define to 1 if you have the XkbGetKeyboard function. */
#undef HAVE_XKBGETKEYBOARD
.data
.globl _data_start
_data_start: .space 4
-
-/* arch-tag: ba84e4dc-615d-4a81-898c-f5b98ec71c9d
- (do not change this comment) */
register Lisp_Object tem, valcontents, newval;
CHECK_SYMBOL (variable);
- variable = indirect_variable (variable);
valcontents = SYMBOL_VALUE (variable);
if (EQ (variable, Qnil) || EQ (variable, Qt) || KBOARD_OBJFWDP (valcontents))
register Lisp_Object tem, valcontents;
CHECK_SYMBOL (variable);
- variable = indirect_variable (variable);
valcontents = SYMBOL_VALUE (variable);
if (EQ (variable, Qnil) || EQ (variable, Qt) || KBOARD_OBJFWDP (valcontents))
register Lisp_Object tem, valcontents;
CHECK_SYMBOL (variable);
- variable = indirect_variable (variable);
valcontents = SYMBOL_VALUE (variable);
register Lisp_Object tem, valcontents, newval;
CHECK_SYMBOL (variable);
- variable = indirect_variable (variable);
valcontents = SYMBOL_VALUE (variable);
if (EQ (variable, Qnil) || EQ (variable, Qt) || KBOARD_OBJFWDP (valcontents)
}
CHECK_SYMBOL (variable);
- variable = indirect_variable (variable);
valcontents = SYMBOL_VALUE (variable);
if (BUFFER_LOCAL_VALUEP (valcontents)
}
CHECK_SYMBOL (variable);
- variable = indirect_variable (variable);
valcontents = SYMBOL_VALUE (variable);
signal (SIGEMT, arith_error);
#endif /* uts */
}
-
-/* arch-tag: 25879798-b84d-479a-9c89-7d148e2109f7
- (do not change this comment) */
but does affect the commands that actually do completions. */);
Vcompletion_ignored_extensions = Qnil;
}
-
-/* arch-tag: 1ac8deca-4d8f-4d41-ade9-089154d98c03
- (do not change this comment) */
#endif /* HAVE_WINDOW_SYSTEM */
#endif /* not DISPEXTERN_H_INCLUDED */
-
-/* arch-tag: c65c475f-1c1e-4534-8795-990b8509fd65
- (do not change this comment) */
int left = -1, right = -1;
int window_width = -1, window_height;
- /* See if W had a header line that has disappeared now, or vice versa.
- Get W's size. */
+ /* See if W had a header line that has disappeared now, or vice versa. */
if (w)
{
- window_box (w, -1, 0, 0, &window_width, &window_height);
-
header_line_p = WINDOW_WANTS_HEADER_LINE_P (w);
header_line_changed_p = header_line_p != matrix->header_line_p;
}
matrix->header_line_p = header_line_p;
- /* If POOL is null, MATRIX is a window matrix for window-based redisplay.
- Do nothing if MATRIX' size, position, vscroll, and marginal areas
+ /* Do nothing if MATRIX' size, position, vscroll, and marginal areas
haven't changed. This optimization is important because preserving
the matrix means preventing redisplay. */
if (matrix->pool == NULL)
{
+ window_box (w, -1, 0, 0, &window_width, &window_height);
left = margin_glyphs_to_reserve (w, dim.width, w->left_margin_cols);
right = margin_glyphs_to_reserve (w, dim.width, w->right_margin_cols);
xassert (left >= 0 && right >= 0);
else
{
/* If MATRIX->pool is null, MATRIX is responsible for managing
- its own memory. It is a window matrix for window-based redisplay.
- Allocate glyph memory from the heap. */
+ its own memory. Allocate glyph memory from the heap. */
if (dim.width > matrix->matrix_w
|| new_rows
|| header_line_changed_p
Vwindow_system_version = Qnil;
}
}
-
-/* arch-tag: 8d812b1f-04a2-4195-a9c4-381f8457a413
- (do not change this comment) */
#define NULL_GLYPH 00
#define GLYPH_FROM_CHAR(c) (c)
-
-/* arch-tag: d7f792d2-f59c-4904-a91e-91522e3ab349
- (do not change this comment) */
defsubr (&Ssnarf_documentation);
defsubr (&Ssubstitute_command_keys);
}
-
-/* arch-tag: 56281d4d-6949-43e2-be2e-f6517de744ba
- (do not change this comment) */
*bufptr = 0; /* Make sure our string end with a '\0' */
return bufptr - buffer;
}
-
-/* arch-tag: aa0ab528-7c5f-4c73-894c-aa2526a1efb3
- (do not change this comment) */
dos_decimal_point = 0;
}
#endif /* MSDOS */
-
-/* arch-tag: f5ea8847-a014-42c9-83f5-7738ad640b17
- (do not change this comment) */
extern int msdos_stdcolor_idx P_ ((const char *));
extern Lisp_Object msdos_stdcolor_name P_ ((int));
#endif
-
-/* arch-tag: a83b8c4c-63c8-451e-9e94-bc72e3e2f8bc
- (do not change this comment) */
char *__progname;
#endif
#endif /* __bsdi__ */
-
-/* arch-tag: 4025c2fb-d6b1-4d29-b1b6-8100b6bd1e74
- (do not change this comment) */
Year numbers less than 100 are treated just like other year numbers.
If you want them to stand for years in this century, you must do that yourself.
-Years before 1970 are not guaranteed to work. On some systems,
-year values as low as 1901 do work.
-
usage: (encode-time SECOND MINUTE HOUR DAY MONTH YEAR &optional ZONE) */)
(nargs, args)
int nargs;
defsubr (&Ssave_restriction);
defsubr (&Stranspose_regions);
}
-
-/* arch-tag: fc3827d8-6f60-4067-b11e-c3218031b018
- (do not change this comment) */
doc: /* Most recently used system locale for time. */);
Vprevious_system_time_locale = Qnil;
}
-
-/* arch-tag: 7bfd356a-c720-4612-8ab6-aa4222931c2e
- (do not change this comment) */
/* Where Emacs should look for the application default file. */
#define PATH_X_DEFAULTS "/usr/lib/X11/%L/%T/%N%C%S:/usr/lib/X11/%l/%T/%N%C%S:/usr/lib/X11/%T/%N%C%S:/usr/lib/X11/%L/%T/%N%S:/usr/lib/X11/%l/%T/%N%S:/usr/lib/X11/%T/%N%S"
-
-/* arch-tag: d30686c4-629c-4666-9499-beaa69f1641e
- (do not change this comment) */
defsubr (&Sbacktrace);
defsubr (&Sbacktrace_frame);
}
-
-/* arch-tag: 014a07aa-33ab-4a8f-a3d2-ee8a4a9ff7fb
- (do not change this comment) */
return Qnil;
if (!auto_saving)
- message_with_string ((INTEGERP (append)
+ message_with_string ((! INTEGERP (append)
? "Updated %s"
: ! NILP (append)
? "Added to %s"
defsubr (&Sunix_sync);
#endif
}
-
-/* arch-tag: 64ba3fd7-f844-4fb2-ba4b-427eb928786c
- (do not change this comment) */
}
#endif /* CLASH_DETECTION */
-
-/* arch-tag: e062676d-50b2-4be0-ab96-197c81b181a1
- (do not change this comment) */
}
#endif
}
-
-/* arch-tag: 4340830c-15a5-47d2-b45f-1d43c45a91bb
- (do not change this comment) */
static int * dummy = &initialized;
#endif
-/* arch-tag: a6c0d2dd-00c3-4ba5-95a5-9c8ab82f39b2
- (do not change this comment) */
defsubr (&Sround);
defsubr (&Struncate);
}
-
-/* arch-tag: be05bf9d-049e-4e31-91b9-e6153d483ae7
- (do not change this comment) */
{
Vweak_hash_tables = Qnil;
}
-
-/* arch-tag: 787f8219-5b74-46bd-8469-7e1cc475fa31
- (do not change this comment) */
defsubr (&Sfontset_font);
defsubr (&Sfontset_list);
}
-
-/* arch-tag: ea861585-2f5f-4e5b-9849-d04a9c3a3537
- (do not change this comment) */
extern int fontset_height P_ ((int));
#endif /* EMACS_FONTSET_H */
-
-/* arch-tag: c27cef7b-3cab-488a-8398-7a4daa96bb77
- (do not change this comment) */
#endif
}
-
-/* arch-tag: 7dbf2c69-9aad-45f8-8296-db893d6dd039
- (do not change this comment) */
#endif /* HAVE_WINDOW_SYSTEM */
#endif /* not EMACS_FRAME_H */
-
-/* arch-tag: 0df048ee-e6bf-4f48-bd56-e3cd055dd8c4
- (do not change this comment) */
exit (0);
}
#endif /* TEST */
-
-/* arch-tag: 2b37a242-6289-41f4-8cd5-0e73fd615db1
- (do not change this comment) */
# endif /* no _SC_PAGESIZE */
#endif /* no HAVE_GETPAGESIZE */
-
-/* arch-tag: ff6206e3-97e2-4763-923a-e84bf28eabbc
- (do not change this comment) */
}
#endif /* GC_MCHECK */
-
-/* arch-tag: 93dce5c0-f49a-41b5-86b1-f91c4169c02e
- (do not change this comment) */
0xf8, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00};
-
-/* arch-tag: b57020c7-c937-4d77-8ca6-3875178d9828
- (do not change this comment) */
}
#endif /* USE_GTK */
-
-/* arch-tag: fe7104da-bc1e-4aba-9bd1-f349c528f7e3
- (do not change this comment) */
#endif /* USE_GTK */
#endif /* GTKUTIL_H */
-
-/* arch-tag: 0757f3dc-00c7-4cee-9e4c-282cf1d34c72
- (do not change this comment) */
return (0);
}
-
-/* arch-tag: cfd4f3bd-fd49-44e6-9f69-c8abdf367650
- (do not change this comment) */
defsubr (&Svertical_motion);
defsubr (&Scompute_motion);
}
-
-/* arch-tag: 9adfea44-71f7-4988-8ee3-96da15c502cc
- (do not change this comment) */
struct Lisp_Char_Table *disptab));
-/* arch-tag: f9feb373-5bff-4f4f-9198-94805d00cfd7
- (do not change this comment) */
defsubr (&Scombine_after_change_execute);
}
-
-/* arch-tag: 9b34b886-47d7-465e-a234-299af411b23d
- (do not change this comment) */
set_intervals_multibyte_1 (BUF_INTERVALS (current_buffer), multi_flag,
BEG, BEG_BYTE, Z, Z_BYTE);
}
-
-/* arch-tag: 3d402b60-083c-4271-b4a3-ebd9a74bfe27
- (do not change this comment) */
extern void syms_of_textprop P_ ((void));
#include "composite.h"
-
-/* arch-tag: f0bc16c0-b084-498d-9de4-21cc8f077795
- (do not change this comment) */
/* Emacs ioctl emulation for VMS */
-
-/* arch-tag: 48595931-af6e-407d-95c7-484059087767
- (do not change this comment) */
}
}
}
-
-/* arch-tag: 774e34d7-6d31-42f3-8397-e079a4e4c9ca
- (do not change this comment) */
extern void kbd_buffer_store_help_event P_ ((Lisp_Object, Lisp_Object));
extern Lisp_Object menu_item_eval_property P_ ((Lisp_Object));
extern int kbd_buffer_events_waiting P_ ((int));
-
-/* arch-tag: 769cbade-1ba9-4950-b886-db265b061aa3
- (do not change this comment) */
initial_define_key (global_map, 033, "ESC-prefix");
initial_define_key (global_map, Ctl('X'), "Control-X-prefix");
}
-
-/* arch-tag: 6dd15c26-7cf1-41c4-b904-f42f7ddda463
- (do not change this comment) */
extern void map_keymap P_ ((Lisp_Object map, map_keymap_function_t fun, Lisp_Object largs, void* cargs, int autoload));
#endif
-
-/* arch-tag: 7400d5a1-ef0b-43d0-b366-f4d678bf3ba2
- (do not change this comment) */
static char _my_endbss[1];
char * my_endbss_static = _my_endbss;
#endif
-
-/* arch-tag: 67e81ab4-e14f-44b2-8875-c0c12252223e
- (do not change this comment) */
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef EMACS_LISP_H
-#define EMACS_LISP_H
-
/* Declare the prototype for a general external function. */
#if defined (PROTOTYPES) || defined (WINDOWSNT)
#define P_(proto) proto
EXFUN (Fx_popup_menu, 2);
EXFUN (Fx_popup_dialog, 2);
extern void syms_of_xmenu P_ ((void));
+extern int popup_activated_flag;
/* defined in sysdep.c */
extern void stuff_char P_ ((char c));
(FIXNUM_OVERFLOW_P (val) \
? make_float (val) \
: make_number ((EMACS_INT)(val)))
-
-#endif /* EMACS_LISP_H */
-
-/* arch-tag: 9b2ed020-70eb-47ac-94ee-e1c2a5107d5e
- (do not change this comment) */
Vloads_in_progress = Qnil;
staticpro (&Vloads_in_progress);
}
-
-/* arch-tag: a0d02733-0f96-4844-a659-9fd53c4f414d
- (do not change this comment) */
/* Insist on using cc when compiling this. GCC may have been
configured to use GAS syntax, which causes problems. */
#define CRT0_COMPILE cc -c -O -Demacs
-
-/* arch-tag: 66219dc7-ef45-4f0c-bb98-f35421f39c8d
- (do not change this comment) */
this
yet
#endif
-
-/* arch-tag: acee2955-8c49-4b40-813c-579f76f4c0c3
- (do not change this comment) */
/* Use the K&R version of the DEFUN macro. */
#define USE_NONANSI_DEFUN
-
-/* arch-tag: 8ba70b15-d082-40f6-931d-14adfd7f9dbd
- (do not change this comment) */
a variable name causes errors when compiling under ANSI C. */
#define vector xxvector
-
-/* arch-tag: 0ad5f932-f29a-4458-a24c-496cafdfd50d
- (do not change this comment) */
#define ALLIANT_1
#include "alliant.h"
-
-/* arch-tag: 516688f9-4b94-4356-9bf0-92b2d72e664e
- (do not change this comment) */
/* include <sys/param.h> for the definition of LOADAVG_SCALE, and also
LOADAVG_SIZE, the number of items in the Loadavg array. */
-
-/* arch-tag: cf917b55-c95e-4079-a4d1-d31e00c61b66
- (do not change this comment) */
Define DBL_MIN_REPLACEMENT to be the next value larger than DBL_MIN:
this avoids the assembler bug. */
#define DBL_MIN_REPLACEMENT 2.2250738585072019e-308
-
-/* arch-tag: 978cb578-1e25-4a60-819b-adae0972aa78
- (do not change this comment) */
#ifdef __GNUC__
#define COFF_ENCAPSULATE
#endif
-
-/* arch-tag: 4572d0ff-70bb-445f-80f1-2bbac3cf47cb
- (do not change this comment) */
/* Compensate for error in signal.h. */
#define NSIG_MINIMUM 20
-
-/* arch-tag: cf665976-ddb1-49b0-b383-371e17f36acf
- (do not change this comment) */
#undef LIB_STANDARD
#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib64/crtn.o
-
-/* arch-tag: 8a5e001d-e12e-4692-a3a6-0b15ba271c6e
- (do not change this comment) */
/* In SR10.4, unistd.h has bad prototype for getpgrp, so we don't include it. */
#undef HAVE_UNISTD_H
-
-/* arch-tag: 33336588-6242-4e2e-a194-e38848b12813
- (do not change this comment) */
#define NO_UNION_TYPE
#define NO_REMAP
-
-/* arch-tag: 07856f0c-f0c8-4bd8-99af-0b7fa1e5ee42
- (do not change this comment) */
/* This affects filemode.c. */
#define NO_MODE_T
-
-/* arch-tag: 07441a37-d630-447f-94fa-7da19645c97a
- (do not change this comment) */
#endif
#undef m88k /* It sure is NOT a Motorola machine */
-
-/* arch-tag: 7cbf89ef-237c-4da5-bdd0-8d569ae5f3ce
- (do not change this comment) */
#define SECTION_ALIGNMENT 0x7
-/* arch-tag: 9de8e6ed-ddd8-4480-8308-17ddd7c86559
- (do not change this comment) */
/* (short) negative-int doesn't sign-extend correctly */
#define SHORT_CAST_BUG
-
-/* arch-tag: b4df1828-fab6-48f8-97bc-b8998c200eea
- (do not change this comment) */
#endif /* USG */
#define LD_TEXT_START_ADDR 8000
-
-/* arch-tag: 2f7981c1-7018-4a1e-b7b6-b2900de36a04
- (do not change this comment) */
Cause crt0.c to define errno. */
#define NEED_ERRNO
-
-/* arch-tag: 1a227f79-37e4-43af-a186-53c61296b0be
- (do not change this comment) */
/* There is some indication that the convex has sys/wait.h
but it does not work right. */
#undef HAVE_SYS_WAIT_H
-
-/* arch-tag: 127e5ae1-4f03-40c0-a87e-d2cb02c59de8
- (do not change this comment) */
/* We can't do interrupt-driven input, so don't let user try. */
#define BROKEN_SIGIO
-
-/* arch-tag: ad70aae4-1f54-4e67-8677-6eeafb9bcbd9
- (do not change this comment) */
#define NO_PTY_H
#define USE_GETOBAUD
-
-/* arch-tag: c8ea1965-99d7-43df-ba32-29b66fc069be
- (do not change this comment) */
/* end of dpx2.h */
-/* arch-tag: 8cfdf817-aec7-4d99-a00d-0e77615e8e1b
- (do not change this comment) */
/* Change some things to avoid bugs in compiler */
#define SWITCH_ENUM_BUG 1
-
-/* arch-tag: 7208d63c-9a23-469e-a9b1-908ac912c743
- (do not change this comment) */
extern int _init_brk;\
_init_brk = bss_start;\
}
-
-/* arch-tag: 73bf1120-a994-4c29-8d60-af425d8bf10c
- (do not change this comment) */
#undef C_DEBUG_SWITCH
#define C_DEBUG_SWITCH -O -KOlimit=3000 -ZXNd=5000
#endif /* !__GNUC__ */
-
-/* arch-tag: 27f72f54-45cd-40a3-b182-345127f04955
- (do not change this comment) */
USUAL-OPSYS="uxpv" */
#include "delta88k.h"
-
-/* arch-tag: a0ed4f18-ecf2-4d9a-853b-36e0f6b45945
- (do not change this comment) */
#endif
-/* arch-tag: cdfd3dbf-a5e4-464d-8cef-985fb7872873
- (do not change this comment) */
with `environ' the way most standard crt0.o's do. */
#define START_FILES pre-crt0.o /lib/crt0.o
-
-/* arch-tag: 930cb9ef-f56f-4c06-aea0-5e81103bbf58
- (do not change this comment) */
#define rindex strrchr
#endif /* __hpux */
-
-/* arch-tag: 809436e6-1645-4b92-b40d-2de5d6e7227c
- (do not change this comment) */
#endif
#endif /* not BSD4_3 */
-
-/* arch-tag: 6e0001a5-ed62-4258-9235-204348f6bdb9
- (do not change this comment) */
#define SVR4
#endif
#endif
-
-/* arch-tag: 99f3a078-95e1-49d6-8666-04726eb25647
- (do not change this comment) */
#define DATA_SEG_BITS 0x6000000000000000
#define HAVE_TEXT_START
-
-/* arch-tag: 9b8e9fb2-2e49-4c22-b68f-11a488e77c66
- (do not change this comment) */
#undef LD_SWITCH_MACHINE
#define LD_SWITCH_MACHINE -xa
-
-/* arch-tag: 8605b600-0580-4e49-9ba9-8b4a977f860a
- (do not change this comment) */
#define LD_SWITCH_MACHINE -shlib
#endif
#endif
-
-/* arch-tag: 2e7f44df-6a61-4a47-aa53-f7961bfeff11
- (do not change this comment) */
#define NLIST_STRUCT
#endif
#endif /* USG5_4 */
-
-/* arch-tag: 028318ee-a7ae-4a08-804d-cc1e6588d003
- (do not change this comment) */
#!
pthread_yield
-
-# arch-tag: fc6d01ea-c488-4862-bbdb-e8d3e0f6fdb3
/* rocky@watson.ibm.com says this is needed. */
#define HAVE_FTIME
-
-/* arch-tag: eea85307-0ca9-4a9c-a4f6-89fad7591d28
- (do not change this comment) */
/* Use the bitmap files that come with Emacs. */
#define EMACS_BITMAP_FILES
-
-/* arch-tag: 89aa7e7d-593e-432c-966a-3db6aa2ad665
- (do not change this comment) */
If you've just fixed a problem in an existing configuration file,
you should also check `etc/MACHINES' to make sure its descriptions
of known problems in that configuration should be updated. */
-
-/* arch-tag: d8a0ffa4-a8f0-4736-90d3-7fd7b21b8314
- (do not change this comment) */
#define SEGMENT_MASK ((SEGMENT_SIZE)-1)
#endif
-
-/* arch-tag: 746338f0-cb7b-4f49-a98c-cb50817cf2ec
- (do not change this comment) */
#undef FIRST_PTY_LETTER
#define FIRST_PTY_LETTER 'q'
\f
-#if _MIPS_SZLONG != 64
-/* fixme: should there be 64-bit defiitions? (The ones below aren't
- OK.) */
-
+#ifndef _LP64
/* The standard definitions of these macros would work ok,
but these are faster because the constants are short. */
#endif
#endif /* not __GNUC__ */
-
-/* arch-tag: fff5e139-9ae0-465d-afec-837c41ea0aa6
- (do not change this comment) */
#define internal_with_output_to_temp_buffer stupid_long_name1
#define Finsert_abbrev_table_description stupid_long_name2
-
-/* arch-tag: 4076b26c-1fe6-4c28-94f3-3c863f074767
- (do not change this comment) */
#define LIBX11_MACHINE -lnsl_s
#define LIBS_DEBUG -lg
-
-/* arch-tag: b6b7e6ec-8b6c-440b-b9c8-961e4bebf0cf
- (do not change this comment) */
#define LIB_STANDARD -lmc -lc
#define C_DEBUG_SWITCH -20 -O -X23
#endif
-
-/* arch-tag: 3bfb5a11-d94e-4372-923b-9f47d0851f42
- (do not change this comment) */
#define NO_REMAP
#define TEXT_START 0
#endif
-
-/* arch-tag: 4eadd161-b4e8-4b82-82a1-e4ce7f42969d
- (do not change this comment) */
#endif
#endif
#endif /* 0 */
-
-/* arch-tag: 41913e4e-e7d1-4023-aadb-210cc31712ed
- (do not change this comment) */
#define ADJUST_EXEC_HEADER \
hdr.a_stamp = STAMP13; /* really want the latest stamp, whatever it is */
-
-/* arch-tag: 572bf8d1-7a94-48c6-b188-bf69754e0cd2
- (do not change this comment) */
/* Convert that into an integer that is 100 for a load average of 1.0 */
#define LOAD_AVE_CVT(x) ((int) ((x) * 100.0))
-
-/* arch-tag: 61e6deb4-a93e-444b-bbd5-9887a83f1bbc
- (do not change this comment) */
/* Avoids a compiler bug */
/* borrowed from sequent.h */
-
-/* arch-tag: e15d9072-9e1a-44bf-8add-966be535967b
- (do not change this comment) */
(((unsigned)(a) << (BITS_PER_INT-GCTYPEBITS-VALBITS)) \
>> (BITS_PER_INT-GCTYPEBITS-VALBITS)))
-/* arch-tag: a4f5c090-0bd5-48f0-9724-b7d531f9b6c8
- (do not change this comment) */
#endif /* BSD_SYSTEM */
#endif /* not NEWSOS5 && not __linux__ */
-
-/* arch-tag: 8fd020ee-78a7-4d87-96ce-6129f52f7bee
- (do not change this comment) */
#undef HAVE_XSCREENRESOURCESTRING
#undef HAVE_SETSID
#endif
-
-/* arch-tag: 56050454-0df5-4de9-b1b7-0c6ab400313c
- (do not change this comment) */
#define LD_SWITCH_X_DEFAULT -Xlinker LD_SWITCH_X_SITE_AUX
#endif /* __GNUC__ */
-
-/* arch-tag: 79c76283-7d50-499b-b910-8ef980357758
- (do not change this comment) */
((a) = \
(((unsigned)(a) << (BITS_PER_INT-GCTYPEBITS-VALBITS)) \
>> (BITS_PER_INT-GCTYPEBITS-VALBITS)))
-
-/* arch-tag: b9fd7b75-ba3c-46d4-8966-24381b13001b
- (do not change this comment) */
#define BROKEN_PROTOTYPES
#endif /* not NEWSOS5 */
-
-/* arch-tag: cf17300c-dd34-4b9d-a657-2de718469662
- (do not change this comment) */
#define LIBS_TERMCAP -ltermcap
-/* arch-tag: 79bfd831-874a-4339-85fa-b8cbdc29bdab
- (do not change this comment) */
/* This should be true for recent NeXT systems. At least since 3.2. */
#define HAVE_MACH_MACH_H
-
-/* arch-tag: 1155cdcb-1f6c-4208-a2da-22c7473060a1
- (do not change this comment) */
*/
/* #define NO_SOCK_SIGIO */
-
-/* arch-tag: 1529f2bc-50d9-42e7-ae72-6f40afadf09e
- (do not change this comment) */
*/
/* #define NO_SOCK_SIGIO */
-
-/* arch-tag: d9e12769-ae79-4c25-953f-70db5b7ef5dd
- (do not change this comment) */
#define static
#endif /* USG */
-
-/* arch-tag: 4210db3c-e35c-4b96-9399-1dbde3e00a57
- (do not change this comment) */
#define START_FILES pre-crt0.o /lib/crt0.o
#endif
-
-/* arch-tag: 13dde0e0-8ed5-4bc3-a0dc-5456c9db5f94
- (do not change this comment) */
in the executable file. */
#define SECTION_ALIGNMENT pagemask
-
-/* arch-tag: 7d2d9b6d-75d4-4c0d-96a9-a41f06212f35
- (do not change this comment) */
#define FSCALE 1.0
#endif
#define LOAD_AVE_CVT(x) (int) (((double) (x)) * 100.0 / FSCALE)
-
-/* arch-tag: 4fcf38ad-d6b0-434b-bc10-16647d5a7fb6
- (do not change this comment) */
/* Arguments to ignore before argc in crt0.c. */
#define DUMMIES dummy1, dummy2,
-
-/* arch-tag: 32fed6e3-8cae-4882-b327-a68c2af6db7a
- (do not change this comment) */
#define KEEP_OLD_TEXT_SCNPTR
#define KEEP_OLD_PADDR
#define drem fmod
-
-/* arch-tag: c1bc280c-25e5-4993-9b91-333c52ab3674
- (do not change this comment) */
#define NO_SIOCTL_H
#define BROKEN_SIGIO
-
-/* arch-tag: f3a127d5-790b-4c78-b6be-837139fb12c4
- (do not change this comment) */
/* This triggers some stuff to avoid a compiler bug */
#define TAHOE_REGISTER_BUG
-
-/* arch-tag: 78c607eb-b4f8-4750-b575-39670d979448
- (do not change this comment) */
/* Enable a fix in process.c. */
#define SET_CHILD_PTY_PGRP
-
-/* arch-tag: 45d5070e-d2b7-479f-b336-3fd497c36e15
- (do not change this comment) */
If you've just fixed a problem in an existing configuration file,
you should also check `etc/MACHINES' to make sure its descriptions
of known problems in that configuration should be updated. */
-
-/* arch-tag: d8af08a6-48b3-4c8a-94a0-0b4acae5e1f0
- (do not change this comment) */
/* Control a conditional in unexelf.c. */
#define SOLARIS_POWERPC
-
-/* arch-tag: dc2c3cb6-4683-45ae-961f-0a4f2bda3c61
- (do not change this comment) */
/* Reenable this #define for old versions of the Pyramid system. */
/* #define PYRAMID_OLD */
-
-/* arch-tag: b9097bc9-92be-46d4-acb1-13c2b966d581
- (do not change this comment) */
#define SYSTEM_MALLOC
#define CANNOT_DUMP
-/* arch-tag: 82559148-25a8-466d-bbb3-f903f7666b7a
- (do not change this comment) */
/* Use terminfo library. */
#define LIBS_TERMCAP -ltermlib
-/* arch-tag: 0494629b-7e11-4f6f-865f-62254ac46099
- (do not change this comment) */
sprintf (ptyname, "/dev/pty%c%c", PTY_MAJOR[ma], PTY_MINOR[mi]);
#define PTY_TTY_NAME_SPRINTF \
sprintf (ptyname, "/dev/tty%c%c", PTY_MAJOR[ma], PTY_MINOR[mi]);
-
-/* arch-tag: 81caea48-aa64-4021-9544-e969dea71ee8
- (do not change this comment) */
should be here. -- fx */
#endif
#endif
-
-/* arch-tag: 0a6f7882-33fd-4811-9832-7466c51e50f7
- (do not change this comment) */
#define ADJUST_EXEC_HEADER f_hdr.f_magic = SMROMAGIC;\
f_ohdr.stsize = 0;
#endif
-
-/* arch-tag: 2240f71c-6f3b-4a82-80fc-4d56c682d7ad
- (do not change this comment) */
#define rindex strrchr
/* #endif */
-
-/* arch-tag: 4ced5b51-ffe6-4be1-9954-eb40657023a5
- (do not change this comment) */
/* Define this macro if system defines a type `union wait'. */
#define HAVE_UNION_WAIT
-
-/* arch-tag: 65c635ed-5bc7-4ace-ab20-f3442429c8ba
- (do not change this comment) */
/* Mask for address bits within a memory segment */
#define SEGMENT_MASK (SEGSIZ - 1)
-
-/* arch-tag: 58ec9c79-48bd-4d1b-aad1-65a09a6b0d10
- (do not change this comment) */
#define SYMS_MACHINE syms_of_sunfns ()
#define PURESIZE 132000
#endif
-
-/* arch-tag: 543c3570-74ca-4099-aa47-db7c7b691c8e
- (do not change this comment) */
#define sun_68881
#define START_FILES crt0.o /usr/lib/Mcrt1.o
-
-/* arch-tag: f8659e89-5f5e-4921-940c-814a5786b901
- (do not change this comment) */
#define sun_fpa
#define START_FILES crt0.o /usr/lib/Wcrt1.o
-
-/* arch-tag: db287fbb-966f-4a70-a3f4-a6768c09326b
- (do not change this comment) */
#define sun_soft
#define START_FILES crt0.o /usr/lib/Fcrt1.o
-
-/* arch-tag: 76e9d7e6-66a8-4c4f-b0a5-335d082e5720
- (do not change this comment) */
For maximum cleanliness, don't edit this file;
instead, insert this line in config.h. */
/* #define START_FILES crt0.o /usr/lib/Mcrt1.o */
-
-/* arch-tag: d0559a79-2285-4a78-ad68-9694264d0d8a
- (do not change this comment) */
on the 386 needs this. */
#define LIBS_MACHINE -lkvm
#endif
-
-/* arch-tag: 861af4b4-ce5f-475e-876e-ebff6436a1fe
- (do not change this comment) */
sprintf (pty_name, "/dev/pty%c%c", PTY_MAJOR[ma], PTY_MINOR[mi]);
#define PTY_TTY_NAME_SPRINTF \
sprintf (pty_name, "/dev/tty%c%c", PTY_MAJOR[ma], PTY_MINOR[mi]);
-
-/* arch-tag: 4169a89e-3764-4147-98df-1ba3bdd45a5b
- (do not change this comment) */
#define HAVE_PTYS /* we do have PTYs if we have TCP */
#define HAVE_SOCKETS /* we do have sockets if we have TCP */
#define LIBS_SYSTEM -lsocket /* get TCP networking functions */
-
-/* arch-tag: e0c09754-b0f2-48da-a8a5-aee3c94838f4
- (do not change this comment) */
/* This triggers some stuff to avoid a compiler bug */
#define TAHOE_REGISTER_BUG
-
-/* arch-tag: dd452693-80e1-413f-a164-0141eb68d831
- (do not change this comment) */
/* Correct some library file names. */
#define START_FILES pre-crt0.o /usr/lib/crt1.o1.31
#define LIB_STANDARD -lbsd -lc /usr/lib/crtn.o1.31
-
-/* arch-tag: ae34a1a6-6408-4b23-a6d3-ce4e8f124916
- (do not change this comment) */
#define SEGMENT_MASK 0xffff
#define SWITCH_ENUM_BUG 1
-
-/* arch-tag: f2438018-7d4e-4be5-b368-4bf342b7785b
- (do not change this comment) */
/* Process groups work in the traditional BSD manner. */
#define BSD_PGRPS
-
-/* arch-tag: afa06e53-094c-4a19-9219-155f8ba4bbcc
- (do not change this comment) */
/* We need this to get dumping to work */
#define KEEP_OLD_TEXT_SCNPTR
-
-/* arch-tag: fd3cebc3-2aed-4f8c-be9b-f37331c6e0ff
- (do not change this comment) */
If you've just fixed a problem in an existing configuration file,
you should also check `etc/MACHINES' to make sure its descriptions
of known problems in that configuration should be updated. */
-
-/* arch-tag: d7dae0a9-4f99-4939-bef9-5738e1f33955
- (do not change this comment) */
#include <asld.h>
#define EXEC_MAGIC AOUT1MAGIC
#define EXEC_PAGESIZE DATACLICK
-
-/* arch-tag: a08e7dea-d48e-44cc-b60d-c7f2e5187ff5
- (do not change this comment) */
/* The OS needs stream.h+ptem.h included in sysdep.c. */
#define NO_SIOCTL_H
#define NEED_PTEM_H
-
-/* arch-tag: 3dff1355-7cb6-49e3-8834-85a369e4ea8f
- (do not change this comment) */
#define BROKEN_SIGIO
#define BROKEN_SIGTSTP
-
-/* arch-tag: 797f1d3e-3077-4eee-a81b-03fcf3a988fe
- (do not change this comment) */
#ifdef BSD4_2
#define HAVE_FTIME
#endif
-
-/* arch-tag: 508bdf7a-01a0-4ce0-8eba-0704d0df55a0
- (do not change this comment) */
#undef TERMINFO
#define LIBS_TERMCAP select.o -ltermlib
#endif
-
-/* arch-tag: b181c512-0275-4d25-9bbc-be0c8ca7bcad
- (do not change this comment) */
If you've just fixed a problem in an existing configuration file,
you should also check `etc/MACHINES' to make sure its descriptions
of known problems in that configuration should be updated. */
-
-/* arch-tag: ed6dc0c1-5c01-49df-befd-c25dfadfb8cf
- (do not change this comment) */
#define LIB_STANDARD -lc
#define LD_SWITCH_MACHINE -X
#define SECTION_ALIGNMENT (0x3ff)
-
-/* arch-tag: 42316eb5-74b2-4762-970a-e372c6a2783d
- (do not change this comment) */
defsubr (&Smac_file_name_to_posix);
defsubr (&Sposix_file_name_to_mac);
}
-
-/* arch-tag: 29d30c1f-0c6b-4f88-8a6d-0558d7f9dbff
- (do not change this comment) */
#endif
#endif /* NTEMACS_TODO */
}
-
-/* arch-tag: d7591289-f374-4377-b245-12f5dbbb8edc
- (do not change this comment) */
#endif /* EMACS_MACGUI_H */
-/* arch-tag: 5a0da49a-35e2-418b-a58c-8a55778ae849
- (do not change this comment) */
defsubr (&Sx_popup_dialog);
#endif
}
-
-/* arch-tag: 40b2c6c7-b8a9-4a49-b930-1b2707184cce
- (do not change this comment) */
DEFVAR_KBOARD ("last-kbd-macro", Vlast_kbd_macro,
doc: /* Last kbd macro defined, as a string or vector; nil if none defined. */);
}
-
-/* arch-tag: d293fcc9-2266-4163-9198-7fa0de12ec9e
- (do not change this comment) */
/* Store a character into kbd macro being defined */
extern void store_kbd_macro_char P_ ((Lisp_Object));
-
-/* arch-tag: 8edb7088-682f-4d1f-a4d9-0fbb7284234e
- (do not change this comment) */
characters directly. */);
mac_keyboard_text_encoding = kTextEncodingMacRoman;
}
-
-/* arch-tag: f2259165-4454-4c04-a029-a133c8af7b5b
- (do not change this comment) */
#define FONT_TYPE_FOR_UNIBYTE(font, ch) 0
#define FONT_TYPE_FOR_MULTIBYTE(font, ch) 0
-/* arch-tag: 6b4ca125-5bef-476d-8ee8-31ed808b7e79
- (do not change this comment) */
$(SRC)\w32.h \
$(SRC)\frame.h \
$(SRC)\blockinput.h
-
-# arch-tag: ee9a97ba-19b7-4b50-a127-aaf4efe494dc
$(SRC)/w32bdf.h \
$(SRC)/w32gui.h \
$(SRC)/w32term.h
-
-# arch-tag: 9fd7aba8-f826-4111-b3c0-497a8e7db9a0
doc: /* Non-nil enables debugging checks in byte/char position conversions. */);
byte_debug_flag = 0;
}
-
-/* arch-tag: 50aa418f-cdd0-4838-b64b-94aa4b2a3b74
- (do not change this comment) */
ctx->C = C;
ctx->D = D;
}
-
-/* arch-tag: 60084f04-b434-42cb-9d2b-e91df01f4325
- (do not change this comment) */
void *resblock));
#endif /* md5.h */
-
-/* arch-tag: 7cd389f3-6c40-4950-999d-0b2ebd1d20d7
- (do not change this comment) */
#endif /* not WINDOWSNT */
#endif /* not USG */
#endif /* not NO_LIM_DATA */
-
-/* arch-tag: fe39244e-e54f-4208-b7aa-02556f7841c5
- (do not change this comment) */
initial_define_key (Vminibuffer_local_must_match_map, Ctl ('j'),
"minibuffer-complete-and-exit");
}
-
-/* arch-tag: 8f69b601-fba3-484c-a6dd-ceaee54a7a73
- (do not change this comment) */
compile-command: "gcc -DDEBUG -DHAVE_LIMITS_H -DSTDC_HEADERS -Wall -W -O -g mktime.c -o mktime"
End:
*/
-
-/* arch-tag: 9456752f-7ddd-47cb-8286-fa807b1355ae
- (do not change this comment) */
#include "commands.h"
#include "blockinput.h"
#include "keyboard.h"
-#include "intervals.h"
#include <go32.h>
#include <pc.h>
#include <ctype.h>
/* Find the glyph under X. */
glyph = (row->glyphs[TEXT_AREA]
+ x
- /* in case someone implements scroll bars some day... */
+ /* Does MS-DOG really support scroll-bars?? ++KFS */
- WINDOW_LEFT_SCROLL_BAR_AREA_WIDTH (w));
end = glyph + row->used[TEXT_AREA];
if (glyph < end
}
#endif /* MSDOS */
-
-/* arch-tag: db404e92-52a5-475f-9eb2-1cb78dd05f30
- (do not change this comment) */
#endif /* not HAVE_X_WINDOWS */
#endif /* not EMACS_MSDOS_H */
-
-/* arch-tag: ad21eeed-8fdb-4357-8007-36368a6bdbf3
- (do not change this comment) */
extern void closedir();
#define rewinddir( dirp ) seekdir( dirp, 0L )
-
-/* arch-tag: aea50570-ffb7-43fd-b423-7743b10fbe6e
- (do not change this comment) */
/* This is so that Emacs can run on VMS... */
#define EXEC_PAGESIZE 512
-
-/* arch-tag: a6daea28-33a6-4dd3-97d8-5ee1a12f09d3
- (do not change this comment) */
static char point_bits[] = {
0x1f, 0x0e, 0x0e, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x04, 0x04, 0x0e, 0x0e, 0x1f};
-
-/* arch-tag: a8dad510-7254-4964-b71e-bb6f81cce572
- (do not change this comment) */
/* Create a label to appear at the beginning of data space. */
int data_start = 0;
-
-/* arch-tag: 2e260272-0790-495f-9362-55abd56b5c5a
- (do not change this comment) */
exit (0);
}
-
-/* arch-tag: 08136d70-e5c0-49c7-bcd8-b4850233977a
- (do not change this comment) */
for (i = 0; i < size; i++)
PRINTCHAR (SREF (string, i));
else
- for (i = 0; i < size_byte; )
+ for (i = 0; i < size_byte; i++)
{
/* Here, we must convert each multi-byte form to the
corresponding character code before handing it to PRINTCHAR. */
defsubr (&Swith_output_to_temp_buffer);
}
-
-/* arch-tag: bc797170-94ae-41de-86e3-75e20f8f7a39
- (do not change this comment) */
\f
#endif /* not subprocesses */
-
-/* arch-tag: 3706c011-7b9a-4117-bd4f-59e7f701a4c4
- (do not change this comment) */
#ifndef NULL_DEVICE
#define NULL_DEVICE "/dev/null"
#endif
-
-/* arch-tag: dffedfc4-d7bc-4b58-a26f-c16155449c72
- (do not change this comment) */
#endif
#ifndef BASE_PURESIZE
-#define BASE_PURESIZE (1100000 + SYSTEM_PURESIZE_EXTRA + SITELOAD_PURESIZE_EXTRA)
+#define BASE_PURESIZE (920000 + SYSTEM_PURESIZE_EXTRA + SITELOAD_PURESIZE_EXTRA)
#endif
/* Increase BASE_PURESIZE by a ratio depending on the machine's word size. */
#endif /* PNTR_COMPARISON_TYPE */
#endif /* VIRT_ADDRESS_VARIES */
-
-/* arch-tag: fd9b0a91-a70e-4729-a75a-6bb4ca1ce14f
- (do not change this comment) */
use_relocatable_buffers = 1;
}
-
-/* arch-tag: 6a524a15-faff-44c8-95d4-a5da6f55110f
- (do not change this comment) */
WEAK_ALIAS (__regfree, regfree)
#endif /* not emacs */
-
-/* arch-tag: 4ffd68ba-2a9e-435b-a21a-018990f9eeb2
- (do not change this comment) */
trim-versions-without-asking: nil
End:
*/
-
-/* arch-tag: bda6e3ec-3c02-4237-a55a-01ad2e120083
- (do not change this comment) */
fprintf (stderr, "%d : %d\n", pos, BOUNDARY_VALUE (c, i));
}
}
-
-/* arch-tag: 98c29f3f-2ca2-4e3a-92f0-f2249200a17d
- (do not change this comment) */
struct region_cache *CACHE,
int POS,
int *NEXT));
-
-/* arch-tag: 70f79125-ef22-4f58-9aec-a48ca2791435
- (do not change this comment) */
/* This is said to be needed as a result of having _insque rather
than insque in -loldX. This may not always be the right thing. */
#define WRONG_NAME_INSQUE
-
-/* arch-tag: c2fc2d64-46fd-4a87-933b-85eff622829c
- (do not change this comment) */
/* This affects a declaration in xrdb.c. */
#define DECLARE_GETPWUID_WITH_UID_T
-
-/* arch-tag: 8a114892-0863-4285-a4cb-3d66ba2d8e7b
- (do not change this comment) */
/* For unexaix.c. */
#define ALIGN_DATA_RELOC
-/* arch-tag: bfff798c-542d-4290-91f2-267394c85b7b
- (do not change this comment) */
/* Bill Woodward <wpwood@austin.ibm.com> says:
libIM *must* precede libXm, to avoid getting aixLoadIM error messages. */
#define LIB_MOTIF -lIM -lXm
-
-/* arch-tag: 692b3acb-5383-4cfb-93f6-378b5c48c75e
- (do not change this comment) */
lose declaring char * rindex without this.
It is just a guess which versions of AIX need this definition. */
#undef HAVE_STRING_H
-
-/* arch-tag: 0935754d-67e1-4697-978a-3e9976da05c3
- (do not change this comment) */
/* Unfortunately without libXmu we cannot support EditRes. */
#define NO_EDITRES
#endif
-
-/* arch-tag: 72d598e1-bc3e-48e0-bfd2-693917c3738e
- (do not change this comment) */
#include "aix4-1.h"
#undef ALIGN_DATA_RELOC
-
-/* arch-tag: 38fe75ea-6aef-42bd-8449-bc34d921a562
- (do not change this comment) */
/* Specify the type that the 3rd arg of `accept' points to.
It is just a guess which versions of AIX need this definition. */
#define SOCKLEN_TYPE int
-
-/* arch-tag: b9471dfc-ccdc-4980-a8a1-80c7627ec6b2
- (do not change this comment) */
#endif
#define GETPGRP_NO_ARG 1
-
-/* arch-tag: 867e3bb8-e9df-4763-9c82-8f4accb8209e
- (do not change this comment) */
/* Special library needed for linking for 4.1. */
#define LIBS_SYSTEM -ljobs
-
-/* arch-tag: de56716a-ed9b-4851-a5c5-c882efaf9931
- (do not change this comment) */
/* Process groups work in the traditional BSD manner. */
#define BSD_PGRPS
-
-/* arch-tag: 38ca640f-549e-4726-a257-71048ab4c480
- (do not change this comment) */
#define SIGNALS_VIA_CHARACTERS
-/* arch-tag: 0c367245-bde3-492e-9029-3ff6898beb95
- (do not change this comment) */
#undef LIB_X11_LIB
#define LIB_X11_LIB -L/usr/X11/lib -lX11 -lipc
-
-/* arch-tag: cf1ada4a-cdbf-452b-a264-ff84dd523e97
- (do not change this comment) */
#undef KERNEL_FILE
#define KERNEL_FILE "/bsd"
-
-/* arch-tag: 25ce1827-1511-4305-9058-24dd2118b5b4
- (do not change this comment) */
#undef LIBS_SYSTEM
#define LIBS_SYSTEM -lkvm
-
-/* arch-tag: 726766f3-5a62-48bf-8e21-3b21ec6abe6f
- (do not change this comment) */
#define LIB_GCC
#endif /* not __ELF__ */
-
-/* arch-tag: 7659632a-a879-4153-bb8b-3765a1463ca1
- (do not change this comment) */
Note that emacs carefully avoids static vars inside functions. */
/* #define static */
-
-/* arch-tag: 5febe5fe-f0b0-49cb-9280-9d5a9fa43710
- (do not change this comment) */
#define USING_CX_UX_7
#include "cxux.h"
-
-/* arch-tag: 520cfbad-fd5c-4b3b-ace4-66e9bcd31a60
- (do not change this comment) */
#define vfork fork
/* the end */
-
-/* arch-tag: 5ae7ba00-83b0-4ab3-806a-3e845779191b
- (do not change this comment) */
#if defined (HAVE_CARBON) && (defined (emacs) || defined (temacs))
#define select sys_select
#endif
-
-/* arch-tag: 481d443d-4f89-43ea-b5fb-49706d95fa41
- (do not change this comment) */
/* Process groups work in the traditional BSD manner. */
#define BSD_PGRPS
-
-/* arch-tag: 1b6d117d-82d2-4480-a6d0-3f7a8360f658
- (do not change this comment) */
#define PENDING_OUTPUT_COUNT(FILE) (1)
#endif /* NOT_C_CODE */
-
-/* arch-tag: c7013e7b-6e2e-44f2-ba61-90b6d5e2ea45
- (do not change this comment) */
/* This is needed according to Ehud Karni <ehud@unix.simonwiesel.co.il>
for m88k-dg-dgux5.4R3.10. */
#undef BSD_PGRPS
-
-/* arch-tag: c11938c9-0cb0-4652-88aa-7eb80bf1cda9
- (do not change this comment) */
caused trouble on DGUX 5.4.2. */
#define LIBS_SYSTEM -ldgc
#endif
-
-/* arch-tag: a14f4043-6caa-4f01-a9b9-ae0fb0d2c96e
- (do not change this comment) */
/* Inhibit using -X, which is the default. */
#define LD_SWITCH_SYSTEM
-
-/* arch-tag: 08941c4f-d0b6-4ad6-b7e3-7e7fe76c0e94
- (do not change this comment) */
#define NO_SIOCTL_H
#define NEED_PTEM_H
#define BROKEN_FIONREAD
-
-/* arch-tag: d66e6a70-0812-437d-aa35-9b01bd474941
- (do not change this comment) */
/* zircon!joe says this makes X windows work. */
# define BROKEN_FIONREAD
#endif
-
-/* arch-tag: 2d314ae9-0357-4ddf-96e5-cf821071ba4b
- (do not change this comment) */
#define LIBS_SYSTEM -lutil
#if __FreeBSD_version < 400000
#define LIBS_TERMCAP -ltermcap
-#else
-#define TERMINFO
-#define LIBS_TERMCAP -lncurses
#endif
#define SYSV_SYSTEM_DIR
of sigblock says it is obsolete. */
#define POSIX_SIGNALS 1
-
-/* arch-tag: 426529ca-b7c4-448f-b10a-d4dcdc9c78eb
- (do not change this comment) */
#define GC_LISP_OBJECT_ALIGNMENT 2
#endif
#endif
-
-/* arch-tag: 6244ea2a-abd0-44ec-abec-ff3dcc9afea9
- (do not change this comment) */
((FILE)->_IO_write_ptr - (FILE)->_IO_write_base)
#endif /* !_IO_STDIO_H */
#endif /* emacs */
-
-/* arch-tag: 577983d9-87a6-4922-b8f8-ff2b563714a4
- (do not change this comment) */
#undef LDAV_SYMBOL
#define LDAV_SYMBOL "avenrun"
-/* arch-tag: c5422584-cd86-4e10-8089-9f604523dab7
- (do not change this comment) */
#undef LDAV_SYMBOL
#define LDAV_SYMBOL "avenrun"
-/* arch-tag: c56449e1-6d1b-4537-a596-0b08b8e4ec73
- (do not change this comment) */
/* It's possible that HPUX 7 has sys/wait.h but it does not work right. */
#undef HAVE_SYS_WAIT_H
#endif
-
-/* arch-tag: 75c1239f-fedb-4f64-8f86-7893e75699e8
- (do not change this comment) */
don't exist from 10.20 on (see process.c) */
#undef POLL_INTERRUPTED_SYS_CALL
-/* arch-tag: 8d8dcbf1-ca9b-48a1-94be-b750de18a5c6
- (do not change this comment) */
Causes "poll: interrupted system call" messages when Emacs is run
in an X window (see process.c) */
#define POLL_INTERRUPTED_SYS_CALL
-
-/* arch-tag: 1b95d569-a3c1-4fb0-8f69-fef264c17c24
- (do not change this comment) */
/* It does work on HPUX to open the pty's tty in the parent (Emacs),
then close and reopen it in the child. */
#define USG_SUBTTY_WORKS
-
-/* arch-tag: f5a3d780-82cd-4a9a-832e-a4031aab788b
- (do not change this comment) */
/* Enable a special hack in XTread_socket. */
#define X_IO_BUG
-
-/* arch-tag: 25fafe5c-b26c-43ab-8144-1629d59207ee
- (do not change this comment) */
#undef LD_SWITCH_X_DEFAULT
#define LD_SWITCH_X_DEFAULT -L/usr/lib/Motif1.1
-/* arch-tag: 47664d7b-23ce-43e6-acdd-044a4be08da3
- (do not change this comment) */
#undef HAVE_RINT
-/* arch-tag: 0a5e9f05-012c-4962-a222-a7a3a7fe0ab7
- (do not change this comment) */
#define C_DEBUG_SWITCH
#endif
#endif
-
-/* arch-tag: 1b259627-c5f6-4260-866f-781b06d72f6b
- (do not change this comment) */
#undef LD_SWITCH_X_DEFAULT
#define LD_SWITCH_X_DEFAULT -L/usr/lib/Motif1.1
-/* arch-tag: 7f68b8b6-c733-4e6c-81df-39d8d13fb656
- (do not change this comment) */
/* This is how to get the device name of the tty end of a pty. */
#define PTY_TTY_NAME_SPRINTF \
sprintf (ptyname, "/dev/ttyq%d", minor (stb.st_rdev));
-
-/* arch-tag: 41161051-477f-44be-bb2a-0eead3142157
- (do not change this comment) */
/* This is how to get the device name of the tty end of a pty. */
#define PTY_TTY_NAME_SPRINTF \
sprintf (ptyname, "/dev/ttyq%d", minor (stb.st_rdev));
-
-/* arch-tag: cdf2033e-a2d5-43e1-a1a2-a7243cf41a11
- (do not change this comment) */
/* This was formerly in LIBS_MACHINE in iris4d.h,
but it is not needed for newer system versions. */
#define LIBS_SYSTEM -lsun
-
-/* arch-tag: cccdd761-2ae9-4e71-a33e-749681c01889
- (do not change this comment) */
return -1; \
strcpy (pty_name, name); \
}
-
-/* arch-tag: cfd7e200-a4dc-4f67-9a32-4184c10b0c57
- (do not change this comment) */
#define NARROWPROTO 1
#define USE_MMAP_FOR_BUFFERS 1
-
-/* arch-tag: ad0660e0-acf8-46ae-b866-4f3df5b1101b
- (do not change this comment) */
for jpff@maths.bath.ac.uk.
Note that irix6-0.h does not include this file, only irix5-0.h. */
#define NO_WTMP_FILE
-
-/* arch-tag: e2f820c1-2a3e-4cee-b5f1-6ce8ab21f439
- (do not change this comment) */
/* Tested on Irix 6.5. SCM worked on earlier versions. */
#define GC_SETJMP_WORKS 1
#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
-
-/* arch-tag: a775e465-a619-4655-a58f-5982aad0c624
- (do not change this comment) */
#undef ospeed
#undef TIOCSIGSEND /* defined in usg5-4.h */
-
-/* arch-tag: d7ad9ec2-54ad-4b2f-adf2-0070c5c63e83
- (do not change this comment) */
/* Some versions of ISC are said to define S_IFLNK even tho
they don't really support symlinks. */
#undef S_IFLNK
-
-/* arch-tag: 4de02713-eac5-4360-9d36-fd82c7a3ae44
- (do not change this comment) */
It won't be needed for 4.1. */
#define EXTRA_INITIALIZE __setostype (0)
#endif
-
-/* arch-tag: c1aca3f2-813d-4c1c-ad64-ca6c20ec9bfb
- (do not change this comment) */
sigprocmask (SIG_SETMASK, &sigprocmask_set, NULL))
#endif
#endif /* not POSIX_SIGNALS */
-
-/* arch-tag: 1278f86f-17f2-462d-88c9-85e4b5faa5c3
- (do not change this comment) */
/* ISC 4.1 has sys/wait.h but it does not work right. */
#undef HAVE_SYS_WAIT_H
-
-/* arch-tag: ec5c77d9-a330-4d93-8117-d2b374531c67
- (do not change this comment) */
/* warning messages */
#define C_SWITCH_SYSTEM -D__NO_INCLUDE_WARN__
#define LIBS_SYSTEM -lbsd
-
-/* arch-tag: fbc81ec9-1c45-416b-a368-799ae7c094a1
- (do not change this comment) */
you're in deep shit. */
#include "bsd4-3.h"
-
-/* arch-tag: 7f7f00f6-ae34-413e-9e6a-1d3b3e3d07e8
- (do not change this comment) */
/* ============================================================ */
-
-/* arch-tag: 5d4a3a1c-40dc-4dea-9c7c-38fed9ae0eae
- (do not change this comment) */
#define GC_SETJMP_WORKS 1
#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
-
-/* arch-tag: d184f860-815d-4ff4-8187-d05c0f3c37d0
- (do not change this comment) */
#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
-/* arch-tag: e80f364a-04e9-4faf-93cb-f36a0fe95c81
- (do not change this comment) */
#ifndef HAVE_SOCKETS
#define HAVE_SOCKETS
#endif
-
-/* arch-tag: 2bb78fcd-fbc4-46dd-a14b-e4a9be957fe0
- (do not change this comment) */
#define NEWSOS6
#define HAVE_TEXT_START
-
-/* arch-tag: a0db9cb0-43bb-4f9e-85fa-384e30f02d74
- (do not change this comment) */
/* Tell emacs.c not to define abort. */
#define NO_ABORT
-
-/* arch-tag: 5cd6fed4-a0be-4402-9349-85a80bc01d57
- (do not change this comment) */
#define LD_SWITCH_SYSTEM LD_SWITCH_SYSTEM_tmp
#endif
-
-/* arch-tag: 7e3f65ca-3f48-4237-933f-2b208b21e8e2
- (do not change this comment) */
emacs_close (dummy); \
} \
while (0)
-
-/* arch-tag: 65eaea67-fcc3-4de7-8574-d46beb82d4ed
- (do not change this comment) */
#define GC_SETJMP_WORKS 1
#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
-
-/* arch-tag: 89580064-dd8c-4533-a47c-0f92d8090945
- (do not change this comment) */
/* Kenneth Stailey <kstailey@eagle.dol-esa.gov> says this is needed. */
#define POSIX_SIGNALS
-
-/* arch-tag: 4f5e3abc-643b-413a-bae6-ed212d3af997
- (do not change this comment) */
#ifdef _MALLOC_INTERNAL
#define _POSIX_SOURCE
#endif
-
-/* arch-tag: 10a9fab3-9e84-4e9e-9535-6ff42baf9e77
- (do not change this comment) */
fatal ("ioctl I_PUSH ldterm", errno); \
if (ioctl (xforkin, I_PUSH, "ttcompat") == -1 && errno != EINVAL) \
fatal ("ioctl I_PUSH ttcompat", errno);
-
-/* arch-tag: 14621824-8dca-432b-a97a-049fc4ce0e9f
- (do not change this comment) */
#define RISCiX 11
#define CRT0_O /lib/crt0.o
#include "bsd4-3.h"
-
-/* arch-tag: 382df034-9843-4a82-8a3a-2e50a4dd532c
- (do not change this comment) */
#define RISCiX 12
#define CRT0_O /usr/lib/crt0.o
#include "bsd4-3.h"
-
-/* arch-tag: f6b21e0a-f676-418a-9c8a-10fa8cd9dba7
- (do not change this comment) */
#define LD_SWITCH_SYSTEM -non_shared
#define GETPGRP_NO_ARG
-
-/* arch-tag: e8ddf21d-72a0-476d-b33e-364f8b20e3b7
- (do not change this comment) */
/* Process groups work in the traditional BSD manner. */
#define BSD_PGRPS
-
-/* arch-tag: 0908970b-1cc0-4d57-b866-61b9bd029a0d
- (do not change this comment) */
#define NO_SOCKETS_IN_FILE_SYSTEM
#define NARROWPROTO 1
-
-/* arch-tag: 4dd6fe94-bcb7-4be0-942a-ff4bc3cd914e
- (do not change this comment) */
#define LIB_STANDARD -lc /usr/ccs/lib/crtn.o
#define NARROWPROTO 1
-
-/* arch-tag: 930541b5-52d9-4cbe-b73c-f4c72091f5df
- (do not change this comment) */
strncpy (pty_name, ptyname, sizeof (pty_name)); \
pty_name[sizeof (pty_name) - 1] = 0; \
}
-
-/* arch-tag: a8fe2e15-e517-49cb-a863-f346b80885fe
- (do not change this comment) */
are in this directory on Solaris 2.4. */
#define C_SWITCH_X_SYSTEM -I/usr/dt/include
-/* arch-tag: 6f0de37b-cfda-427a-a5ae-b83ed54aaae7
- (do not change this comment) */
/* Probably OK also on earlier versions. */
#define GC_SETJMP_WORKS 1
#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
-
-/* arch-tag: 96d65526-21c9-4547-a797-2bd575c05be7
- (do not change this comment) */
#undef UNEXEC
#define UNEXEC unexsol.o
#endif
-
-/* arch-tag: 71ea3857-89dc-4395-9623-77964e6ed3ca
- (do not change this comment) */
#endif
#define USE_MMAP_FOR_BUFFERS 1
-
-/* arch-tag: b0640f78-5ad5-4093-97c3-5b3abbf5a2be
- (do not change this comment) */
#define GC_SETJMP_WORKS 1
#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
-
-/* arch-tag: 362f3bfc-810d-4f6e-9b83-5a32f8f1a926
- (do not change this comment) */
/* Define dlopen, dlclose, dlsym. */
#define USE_DL_STUBS
-
-/* arch-tag: 154e2eb2-2180-4d66-90b9-7e56a22004f2
- (do not change this comment) */
#endif
#define USE_MMAP_FOR_BUFFERS 1
-
-/* arch-tag: ebd184b0-9084-4306-8e71-c0437330e1e1
- (do not change this comment) */
#endif
#endif /* not HAVE_X11R6 */
-
-/* arch-tag: cb54321a-ed45-4c17-a23e-1c157758da78
- (do not change this comment) */
If you've just fixed a problem in an existing configuration file,
you should also check `etc/MACHINES' to make sure its descriptions
of known problems in that configuration should be updated. */
-
-/* arch-tag: 4b426b11-cb2e-4c0e-a488-e663f76a0515
- (do not change this comment) */
/* The address of this is used, but Ultrix header files don't declare it. */
extern double rint ();
#endif
-
-/* arch-tag: 927a396a-d50f-494b-960b-533671184ce1
- (do not change this comment) */
/* Process groups work in the traditional BSD manner. */
#define BSD_PGRPS
-
-/* arch-tag: 2860edda-ce9e-4cfa-943d-3a06c7045854
- (do not change this comment) */
/* High order bit must be stripped off nlist return values */
#define FIXUP_KERNEL_SYMBOL_ADDR(NL) (NL)[0].n_value &= 0x7fffffff;
-
-/* arch-tag: 9b816c7d-6ee2-40d9-b6dc-42c0aeccfbec
- (do not change this comment) */
/* A system-specific loader switch is needed. */
#define LD_SWITCH_SYSTEM -N -L/lib/libg /usr/lib/unshared.ld
-
-/* arch-tag: d3f952a9-fef5-45d5-9c1e-c1c32bfef86c
- (do not change this comment) */
#include "usg5-4-2.h"
#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->__ptr - (FILE)->__base)
-
-/* arch-tag: d82e92e7-9443-4a60-a581-7f293cbae8a3
- (do not change this comment) */
/* Prevent -lg from being used for debugging. Not implemented? */
#define LIBS_DEBUG
-
-/* arch-tag: a18bdba9-506d-40ed-9877-49fc27ce8cac
- (do not change this comment) */
/* Use terminfo instead of termcap. */
#define TERMINFO
-
-/* arch-tag: 56923f22-9e2b-4814-b922-88c87657ff6b
- (do not change this comment) */
/* Use terminfo instead of termcap. */
#define TERMINFO
-
-/* arch-tag: cfd9500f-0284-4a88-8f07-3f56b42db13b
- (do not change this comment) */
/* On USG systems signal handlers return void */
#define SIGTYPE void
-
-/* arch-tag: 2bca65fd-f015-44b9-a2aa-9f8170ce89ca
- (do not change this comment) */
/* ryanr@ellingtn.ftc.nrcs.usda.gov (Richard Anthony Ryan) says -lXimp
is needed in UNIX_SV ... 4.2 1.1.2. */
#define LIB_MOTIF -lXm -lXimp
-
-/* arch-tag: 9bbfcfc1-19be-45a1-9699-af57b87da2c6
- (do not change this comment) */
on start up for an i486-ncr-sysv4.3 (running the X toolkit):
_XipOpenIM() Unable to find Atom _XIM_INPUTMETHOD */
#define X11R5_INHIBIT_I18N
-
-/* arch-tag: 03ac8b3a-c3d4-4441-a773-1c1d9f111f1a
- (do not change this comment) */
SINIX. */
#undef LIBS_SYSTEM
#define LIBS_SYSTEM -lgen
-
-/* arch-tag: 1a0ed909-5faa-434b-b7c3-9d86c63d53a6
- (do not change this comment) */
#ifndef __GNUC__
#define C_DEBUG_SWITCH -O -KOlimit=3000 -ZXNd=5000
#endif
-
-/* arch-tag: e42eeb13-028a-490b-8427-0b57010f2ab9
- (do not change this comment) */
#define XOS_NEEDS_TIME_H
#define FSCALE 256
-
-/* arch-tag: c02db2a6-c725-4a6b-adee-66e0303df2a8
- (do not change this comment) */
#undef SYSTEM_TYPE
#define SYSTEM_TYPE "uxpv"
-
-/* arch-tag: 3f00cfe7-f44c-45ce-a2fe-2b17fc411a1e
- (do not change this comment) */
/* What separator do we use in paths? */
#define SEPCHAR ','
-
-/* arch-tag: 76bc2b70-46d1-4334-8f12-955c0d0ca6d4
- (do not change this comment) */
#include "vms.h"
#define VMS4_0
-
-/* arch-tag: 734e1c69-d514-4441-bbcd-8b5db8ab1892
- (do not change this comment) */
#include "vms.h"
#define VMS4_2
-/* arch-tag: d9ff67bc-a899-44b2-a618-a73c821bb559
- (do not change this comment) */
#include "vms.h"
#define VMS4_4
-/* arch-tag: 2e65c7ad-0d17-45a0-b4cb-3e76c72ea9d5
- (do not change this comment) */
And defining it causes lossage because sys_errlist has a different
number of elements. */
#undef SHARABLE_LIB_BUG
-
-/* arch-tag: 92acc416-61fe-44ae-b0e0-710cb9e38ec6
- (do not change this comment) */
#include "windowsnt.h"
#define WINDOWS95
-
-/* arch-tag: 8a37be6f-312c-4b2a-919e-58a71a0fb4b3
- (do not change this comment) */
are not declared. */
#define BROKEN_TIOCGETC
-
-/* arch-tag: 71d3985d-4e53-4572-8276-5dce26bbd076
- (do not change this comment) */
FRAME_DELETE_COST (frame), FRAME_DELETEN_COST (frame),
coefficient);
}
-
-/* arch-tag: cdb7149c-48e7-4793-a948-2786c8e45485
- (do not change this comment) */
defsubr (&Sset_match_data);
defsubr (&Sregexp_quote);
}
-
-/* arch-tag: a6059d79-0552-4f14-a2cb-d379a4e3c78f
- (do not change this comment) */
}
#endif /* HAVE_SOUND */
-
-/* arch-tag: dd850ad8-0433-4e2c-9cba-b7aeeccc0dbd
- (do not change this comment) */
return my_strftime (s, maxsize, format, tp, ut, 0);
}
#endif
-
-/* arch-tag: 662bc9c4-f8e2-41b6-bf96-b8346d0ce0d8
- (do not change this comment) */
defsubr(&Ssun_get_selection);
defsubr(&Ssun_menu_internal);
}
-
-/* arch-tag: 2d7decb7-58f6-41aa-b45b-077ccfab7158
- (do not change this comment) */
return from;
}
-DEFUN ("forward-word", Fforward_word, Sforward_word, 0, 1, "p",
+DEFUN ("forward-word", Fforward_word, Sforward_word, 1, 1, "p",
doc: /* Move point forward ARG words (backward if ARG is negative).
Normally returns t.
If an edge of the buffer or a field boundary is reached, point is left there
and the function returns nil. Field boundaries are not noticed if
`inhibit-field-text-motion' is non-nil. */)
- (arg)
- Lisp_Object arg;
+ (count)
+ Lisp_Object count;
{
int orig_val, val;
+ CHECK_NUMBER (count);
- if (NILP (arg))
- XSETFASTINT (arg, 1);
- else
- CHECK_NUMBER (arg);
-
- val = orig_val = scan_words (PT, XINT (arg));
+ val = orig_val = scan_words (PT, XINT (count));
if (! orig_val)
- val = XINT (arg) > 0 ? ZV : BEGV;
+ val = XINT (count) > 0 ? ZV : BEGV;
/* Avoid jumping out of an input field. */
val = XFASTINT (Fconstrain_to_field (make_number (val), make_number (PT),
defsubr (&Sbackward_prefix_chars);
defsubr (&Sparse_partial_sexp);
}
-
-/* arch-tag: 3e297b9f-088e-4b64-8f4c-fb0b3443e412
- (do not change this comment) */
extern INTERVAL interval_of P_ ((int, Lisp_Object));
extern int scan_words P_ ((int, int));
-
-/* arch-tag: 28833cca-cd73-4741-8c85-a3111166a0e0
- (do not change this comment) */
}
#endif /* HAVE_STRSIGNAL */
-/* arch-tag: edb43589-4e09-4544-b325-978b5b121dcf
- (do not change this comment) */
#if !defined (HAVE_SELECT) || defined (BROKEN_SELECT_NON_X)
#define select sys_select
#endif
-
-/* arch-tag: 36d05500-8cf6-4847-8e78-6721f18c06ef
- (do not change this comment) */
/* strsignal is in sysdep.c */
char *strsignal ();
#endif
-
-/* arch-tag: 4580e86a-340d-4574-9e11-a742b6e1a152
- (do not change this comment) */
#define EMACS_TIME_LE(T1, T2) (EMACS_TIME_CMP (T1, T2) <= 0)
#endif /* EMACS_SYSTIME_H */
-
-/* arch-tag: dcb79915-cf99-4bce-9778-aade71d07651
- (do not change this comment) */
#endif /* not def VMS */
#endif /* not def HAVE_TERMIO */
#endif /* not def HAVE_TERMIOS */
-
-/* arch-tag: cf4b90bc-be41-401c-be98-40619178a712
- (do not change this comment) */
#endif /* VMS */
#endif /* EMACS_SYSWAIT_H */
-
-/* arch-tag: 7e5d9719-ec66-4b6f-89bb-563eea16a899
- (do not change this comment) */
{
char *area;
char **address = &area;
- char *buffer = NULL;
- int buffer_size = 4096;
+ char buffer[2044];
register char *p;
int status;
struct frame *sf = XFRAME (selected_frame);
area = (char *) xmalloc (2044);
+ if (area == 0)
+ abort ();
+
FrameRows = FRAME_LINES (sf);
FrameCols = FRAME_COLS (sf);
specified_window = FRAME_LINES (sf);
Wcm_clear ();
- buffer = (char *) xmalloc (buffer_size);
status = tgetent (buffer, terminal_type);
if (status < 0)
{
terminal_type);
#endif
}
-
-#ifndef TERMINFO
- if (strlen (buffer) >= buffer_size)
+#ifdef TERMINFO
+ area = (char *) xmalloc (2044);
+#else
+ area = (char *) xmalloc (strlen (buffer));
+#endif /* not TERMINFO */
+ if (area == 0)
abort ();
- buffer_size = strlen (buffer);
-#endif
- area = (char *) xmalloc (buffer_size);
TS_ins_line = tgetstr ("al", address);
TS_ins_multi_lines = tgetstr ("AL", address);
FRAME_CAN_HAVE_SCROLL_BARS (sf) = 0;
FRAME_VERTICAL_SCROLL_BAR_TYPE (sf) = vertical_scroll_bar_none;
#endif /* WINDOWSNT */
-
- xfree (buffer);
}
/* VARARGS 1 */
defsubr (&Stty_display_color_cells);
}
-/* arch-tag: 498e7449-6f2e-45e2-91dd-b7d4ca488193
- (do not change this comment) */
}
#endif /* TEST */
-
-/* arch-tag: c2e8d427-2271-4fac-95fe-411857238b80
- (do not change this comment) */
a suspended Emacs. This is useful on terminals with multiple pages,
where one page is used for Emacs and another for all else. */
extern int no_redraw_on_reenter;
-
-/* arch-tag: bf9f0d49-842b-42fb-9348-ec8759b27193
- (do not change this comment) */
};
#endif
-
-/* arch-tag: 33a00ecc-52b5-4186-a410-8801ac9f087d
- (do not change this comment) */
strcpy (outstring, temp);
return outstring;
}
-
-/* arch-tag: a6f96a69-e68f-4e9d-a223-f0b0da26ead5
- (do not change this comment) */
/* Nonzero means truncate lines in all windows less wide than the frame */
extern int truncate_partial_width_windows;
-
-/* arch-tag: 35d4d284-dc1a-4fff-97fa-0154a21aebdb
- (do not change this comment) */
/* defsubr (&Serase_text_properties); */
/* defsubr (&Scopy_text_properties); */
}
-
-/* arch-tag: 454cdde8-5f86-4faa-a078-101e3625d479
- (do not change this comment) */
}
#endif /* DEBUG */
-
-/* arch-tag: 83f7b5ac-a808-4f75-b87a-123de009b402
- (do not change this comment) */
};
#endif /* not UAF$K_LENGTH */
-
-/* arch-tag: f95d73be-b0bf-46b7-adf7-89ce8846b062
- (do not change this comment) */
defsubr (&Sprimitive_undo);
defsubr (&Sundo_boundary);
}
-
-/* arch-tag: d546ee01-4aed-4ffb-bb8b-eefaae50d38a
- (do not change this comment) */
}
return 0;
}
-
-/* arch-tag: 0783857a-7c2d-456f-a426-58b722d69fd0
- (do not change this comment) */
fputs (".\n", stderr);
exit (1);
}
-
-/* arch-tag: 46316c49-ee08-4aa3-942b-00798902f5bd
- (do not change this comment) */
total_byte_count -= byte_count;
}
}
-
-/* arch-tag: 783ebbdf-7d26-4df8-9469-17a1747dce96
- (do not change this comment) */
return 'a';
}
-/* arch-tag: 8199e06d-69b5-4f79-84d8-00f6ea929af9
- (do not change this comment) */
#endif /* COFF */
#endif /* not CANNOT_DUMP */
-
-/* arch-tag: 62409b69-e27a-4a7c-9413-0210d6b54e7f
- (do not change this comment) */
if (chmod (new_name, stat_buf.st_mode) == -1)
fatal ("Can't chmod (%s): errno %d\n", new_name, errno);
}
-
-/* arch-tag: e02e1512-95e2-4ef0-bba7-b6bce658f1e3
- (do not change this comment) */
fputs (".\n", stderr);
exit (1);
}
-
-/* arch-tag: ce26be27-370a-438d-83b4-766059749a02
- (do not change this comment) */
hdr->unloadable_sp_location, hdr->unloadable_sp_size);
}
#endif /* DEBUG */
-
-/* arch-tag: d55a09ac-9427-4ec4-8496-cb9d7710774f
- (do not change this comment) */
else
malloc_zone_free (emacs_zone, ptr);
}
-
-/* arch-tag: 1a784f7b-a184-4c4f-9544-da8619593d72
- (do not change this comment) */
fputs (".\n", stderr);
exit (1);
}
-
-/* arch-tag: ebdd2058-3bbc-4de4-b5c7-5760379ab153
- (do not change this comment) */
exit(1);
}
}
-
-/* arch-tag: 9796bdc3-c050-417a-b2f5-4cfd31032634
- (do not change this comment) */
if (chmod (new_name, stat_buf.st_mode) == -1)
fatal ("Can't chmod(%s): errno %d\n", new_name, errno);
}
-
-/* arch-tag: c784ead3-7a27-442b-83fe-7af8d08654d3
- (do not change this comment) */
Fsignal (Qfile_error,
Fcons (build_string ("Cannot unexec"), Fcons (errstring, data)));
}
-
-/* arch-tag: d8ff72b3-8198-4011-8ef5-011b12027f59
- (do not change this comment) */
}
return 0;
}
-
-/* arch-tag: 30227420-2c6f-4700-a4f8-9e45e52f53b1
- (do not change this comment) */
}
/* eof */
-
-/* arch-tag: fe1d3d1c-ef88-4917-ab22-f12ab16b3254
- (do not change this comment) */
/* Dummy for Emacs so that we can run on VMS... */
#define LIM_DATA 0
-
-/* arch-tag: 0c3436cb-5edc-447a-87af-acec402a65b9
- (do not change this comment) */
lim_data = 0;
#endif
}
-
-/* arch-tag: eab04eda-1f69-447a-8d9f-95f0a3983ca5
- (do not change this comment) */
}
#endif /* MSDOS */
-
-/* arch-tag: 085a22c8-7324-436e-a6da-102464ce95d8
- (do not change this comment) */
if (rc == 0)
{
- /* Protect against overflow, since Windows can open more handles than
- our fd_info array has room for. */
- if (phandles[0] >= MAXDESC || phandles[1] >= MAXDESC)
- {
- _close (phandles[0]);
- _close (phandles[1]);
- rc = -1;
- }
- else
- {
- flags = FILE_PIPE | FILE_READ | FILE_BINARY;
- fd_info[phandles[0]].flags = flags;
+ flags = FILE_PIPE | FILE_READ | FILE_BINARY;
+ fd_info[phandles[0]].flags = flags;
- flags = FILE_PIPE | FILE_WRITE | FILE_BINARY;
- fd_info[phandles[1]].flags = flags;
- }
+ flags = FILE_PIPE | FILE_WRITE | FILE_BINARY;
+ fd_info[phandles[1]].flags = flags;
}
return rc;
}
/* end of nt.c */
-
-/* arch-tag: 90442dd3-37be-482b-b272-ac752e3049f1
- (do not change this comment) */
extern void syms_of_fontset ();
#endif /* EMACS_W32_H */
-
-/* arch-tag: 02c36b00-312b-4c4d-a1d9-f905c5e968f0
- (do not change this comment) */
CloseHandle (hfilemap);
return retval;
}
-
-/* arch-tag: 2e9a45de-0c54-4a0e-95c8-2d67b2b1fa32
- (do not change this comment) */
int w32_BDF_to_x_font (char *file, char* xstr, int len);
#endif /* EMACS_W32BDF_H */
-
-/* arch-tag: 7499e9f2-197e-44cc-9274-373f00b51eec
- (do not change this comment) */
defsubr (&Sset_cursor_size);
defsubr (&Sset_message_beep);
}
-
-/* arch-tag: a390a07f-f661-42bc-aeb4-e6d8bf860337
- (do not change this comment) */
defsubr (&Simage_size);
defsubr (&Simage_mask_p);
+#if GLYPH_DEBUG
+ defsubr (&Simagep);
+ defsubr (&Slookup_image);
+#endif
+
hourglass_atimer = NULL;
hourglass_shown_p = 0;
defsubr (&Sx_show_tip);
{
return GetLastError ();
}
-
-/* arch-tag: 707589ab-b9be-4638-8cdd-74629cc9b446
- (do not change this comment) */
#endif /* EMACS_W32GUI_H */
-
-/* arch-tag: 9172e5fb-45a5-4684-afd9-ca0e81324604
- (do not change this comment) */
}
#endif
-
-/* arch-tag: 9a6a9860-040d-422d-8905-450dd535cd9c
- (do not change this comment) */
IMAGE_SECTION_HEADER * rva_to_section (DWORD rva, IMAGE_NT_HEADERS * nt_header);
#endif /* NTHEAP_H_ */
-
-/* arch-tag: 3ba4cbe1-8a09-4a41-8f37-fd31f7426b3c
- (do not change this comment) */
UNBLOCK_INPUT;
return ret;
}
-
-/* arch-tag: 0bcb39b7-d085-4b85-9070-6750e8c03047
- (do not change this comment) */
unsigned long *time);
#endif /* EMACS_W32INEVT_H */
-
-/* arch-tag: 7641bd54-199f-4552-8e8a-6a2f5340ef13
- (do not change this comment) */
get_menu_item_info = (GetMenuItemInfoA_Proc) GetProcAddress (user32, "GetMenuItemInfoA");
set_menu_item_info = (SetMenuItemInfoA_Proc) GetProcAddress (user32, "SetMenuItemInfoA");
}
-
-/* arch-tag: 0eaed431-bb4e-4aac-a527-95a1b4f1fed0
- (do not change this comment) */
Vw32_get_true_file_attributes = Qt;
}
/* end of ntproc.c */
-
-/* arch-tag: 23d3a34c-06d2-48a1-833b-ac7609aa5250
- (do not change this comment) */
return (w32_get_string_resource (name, class, REG_SZ));
}
-
-/* arch-tag: 755fce25-42d7-4acb-874f-2fb42336823d
- (do not change this comment) */
QCLIPBOARD = intern ("CLIPBOARD"); staticpro (&QCLIPBOARD);
}
-
-/* arch-tag: c96e9724-5eb1-4dad-be07-289f092fd2af
- (do not change this comment) */
BOOL retval;
xassert (font && char2b);
-
- /* TODO: This function is currently called through the RIF, and in
- some cases font_type is UNKNOWN_FONT. We currently allow the
- cached metrics to be used, which seems to work, but in cases
- where font_type is UNKNOWN_FONT, we probably haven't encoded
- char2b appropriately. All callers need checking to see what they
- are passing. This is most likely to affect variable width fonts
- outside the Latin-1 range, particularly in languages like Thai
- that rely on rbearing and lbearing to provide composition. I
- don't think that is working currently anyway, but we don't seem
- to have anyone testing such languages on Windows. */
+ xassert (font_type != UNKNOWN_FONT);
/* Handle the common cases quickly. */
if (!font->bdf && font->per_char == NULL)
else if (!font->bdf && *char2b < 128)
return &font->per_char[*char2b];
- xassert (font_type != UNKNOWN_FONT);
-
pcm = &font->scratch;
if (font_type == BDF_1D_FONT)
if (msg.msg.message == msh_mousewheel)
{
/* Forward MSH_MOUSEWHEEL as WM_MOUSEWHEEL. */
- msg.msg.message = WM_MOUSEWHEEL;
+ msg.msg.message == WM_MOUSEWHEEL;
prepend_msg (&msg);
}
break;
staticpro (&last_mouse_motion_frame);
last_mouse_motion_frame = Qnil;
}
-
-/* arch-tag: 5fa70624-ab86-499c-8a85-473958ee4646
- (do not change this comment) */
? BDF_1D_FONT : BDF_2D_FONT))
typedef DWORD (WINAPI * ClipboardSequence_Proc) ();
-
-/* arch-tag: f201d05a-1240-4fc5-8ea4-ca24d4ee5671
- (do not change this comment) */
void *f;
{
}
-
-/* arch-tag: 4fab3695-4ad3-4cc6-a2b1-fd2c67dc46be
- (do not change this comment) */
ew->emacs_frame.internal_border_width = f->internal_border_width;
}
-
-/* arch-tag: 931d28e5-0d59-405a-8325-7d475d0a13d9
- (do not change this comment) */
void widget_store_internal_border P_ ((Widget widget));
#endif /* _EmacsFrame_h */
-
-/* arch-tag: 98be17cc-8878-4701-abfa-66f1c04e9cb7
- (do not change this comment) */
#endif /* _EmacsFrameP_h */
-
-/* arch-tag: 2b579b4c-f697-4f86-b27a-35b7cb1a4a1c
- (do not change this comment) */
initial_define_key (global_map, Ctl('L'), "recenter");
initial_define_key (meta_map, 'r', "move-to-window-line");
}
-
-/* arch-tag: 90a9c576-0590-48f1-a5f1-6c96a0452d9f
- (do not change this comment) */
extern int window_box_text_cols P_ ((struct window *w));
#endif /* not WINDOW_H_INCLUDED */
-
-/* arch-tag: d4a6942f-e433-4ffe-ac10-2c3574f28577
- (do not change this comment) */
attribute changes of named faces, recompute them. When running
in batch mode, the face cache of Vterminal_frame is null. If
we happen to get called, make a dummy face cache. */
- if (noninteractive && FRAME_FACE_CACHE (it->f) == NULL)
+ if (
+#ifndef WINDOWSNT
+ noninteractive &&
+#endif
+ FRAME_FACE_CACHE (it->f) == NULL)
init_frame_faces (it->f);
if (FRAME_FACE_CACHE (it->f)->used == 0)
recompute_basic_faces (it->f);
}
}
- if (!pause)
+ /* Do the mark_window_display_accurate after all windows have
+ been redisplayed because this call resets flags in buffers
+ which are needed for proper redisplay. */
+ for (i = 0; i < n; ++i)
{
- /* Do the mark_window_display_accurate after all windows have
- been redisplayed because this call resets flags in buffers
- which are needed for proper redisplay. */
- for (i = 0; i < n; ++i)
- {
- struct frame *f = updated[i];
- mark_window_display_accurate (f->root_window, 1);
- if (frame_up_to_date_hook)
- frame_up_to_date_hook (f);
- }
+ struct frame *f = updated[i];
+ mark_window_display_accurate (f->root_window, 1);
+ if (frame_up_to_date_hook)
+ frame_up_to_date_hook (f);
}
}
else if (FRAME_VISIBLE_P (sf) && !FRAME_OBSCURED_P (sf))
return FRAME_BLINK_OFF_CURSOR (f);
}
-#if 0
- /* Some people liked having a permanently visible blinking cursor,
- while others had very strong opinions against it. So it was
- decided to remove it. KFS 2003-09-03 */
-
/* Finally perform built-in cursor blinking:
filled box <-> hollow box
wide [h]bar <-> narrow [h]bar
*width = 1;
return cursor_type;
}
-#endif
return NO_CURSOR;
}
}
-/* arch-tag: eacc864d-bb6a-4b74-894a-1a4399a1358b
- (do not change this comment) */
return 1;
}
- if (! compare_pt_p)
- {
- /* We prefer a real scalable font; i.e. not what autoscaled. */
- int auto_scaled_1 = (font1->numeric[XLFD_POINT_SIZE] == 0
- && font1->numeric[XLFD_RESY] > 0);
- int auto_scaled_2 = (font2->numeric[XLFD_POINT_SIZE] == 0
- && font2->numeric[XLFD_RESY] > 0);
-
- if (auto_scaled_1 != auto_scaled_2)
- return auto_scaled_2;
- }
-
return font1->registry_priority < font2->registry_priority;
}
|| better_font_p (specified, fonts + i, best, 0, 0)
|| (!non_scalable_has_exact_height_p
&& !better_font_p (specified, best, fonts + i, 0, 0)))
- {
- non_scalable_has_exact_height_p = 1;
- best = fonts + i;
- }
+ best = fonts + i;
}
if (needs_overstrike)
/* Try any family with the given registry. */
if (nfonts == 0)
- nfonts = try_alternative_families (f, Qnil, registry, fonts);
+ nfonts = font_list (f, Qnil, Qnil, registry, fonts);
return nfonts;
}
defsubr (&Sx_font_family_list);
#endif /* HAVE_WINDOW_SYSTEM */
}
-
-/* arch-tag: 8a0f7598-5517-408d-9ab3-1da6fcd4c749
- (do not change this comment) */
#endif /* USE_X_TOOLKIT */
-#ifdef USE_GTK
-
-/* GTK+ version info */
-
-static Lisp_Object Vgtk_version_string;
-
-#endif /* USE_GTK */
-
#ifdef HAVE_X11R4
#define MAXREQUEST(dpy) (XMaxRequestSize (dpy))
#else
;
}
- /* Set the WM leader property. GTK does this itself, so this is not
- needed when using GTK. */
- if (dpyinfo->client_leader_window != 0)
- {
- BLOCK_INPUT;
- XChangeProperty (FRAME_X_DISPLAY (f),
- FRAME_OUTER_WINDOW (f),
- dpyinfo->Xatom_wm_client_leader,
- XA_WINDOW, 32, PropModeReplace,
- (char *) &dpyinfo->client_leader_window, 1);
- UNBLOCK_INPUT;
- }
-
UNGCPRO;
/* Make sure windows on this frame appear in calls to next-window
unsigned hash = CT_HASH_RGB (r, g, b);
int i = hash % CT_SIZE;
struct ct_color *p;
- struct x_display_info *dpyinfo;
-
- /* Handle TrueColor visuals specially, which improves performance by
- two orders of magnitude. Freeing colors on TrueColor visuals is
- a nop, and pixel colors specify RGB values directly. See also
- the Xlib spec, chapter 3.1. */
- dpyinfo = FRAME_X_DISPLAY_INFO (f);
- if (dpyinfo->red_bits > 0)
- {
- unsigned long pr, pg, pb;
- /* Apply gamma-correction like normal color allocation does. */
- if (f->gamma)
- {
- XColor color;
- color.red = r, color.green = g, color.blue = b;
- gamma_correct (f, &color);
- r = color.red, g = color.green, b = color.blue;
- }
-
- /* Scale down RGB values to the visual's bits per RGB, and shift
- them to the right position in the pixel color. Note that the
- original RGB values are 16-bit values, as usual in X. */
- pr = (r >> (16 - dpyinfo->red_bits)) << dpyinfo->red_offset;
- pg = (g >> (16 - dpyinfo->green_bits)) << dpyinfo->green_offset;
- pb = (b >> (16 - dpyinfo->blue_bits)) << dpyinfo->blue_offset;
-
- /* Assemble the pixel color. */
- return pr | pg | pb;
- }
-
for (p = ct_table[i]; p; p = p->next)
if (p->r == r && p->g == g && p->b == b)
break;
#endif /* USE_MOTIF */
#endif /* USE_X_TOOLKIT */
-#ifdef USE_GTK
- Fprovide (intern ("gtk"), Qnil);
-
- DEFVAR_LISP ("gtk-version-string", &Vgtk_version_string,
- doc: /* Version info for GTK+. */);
- {
- char gtk_version[40];
- g_snprintf (gtk_version, sizeof (gtk_version), "%u.%u.%u",
- GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
- Vgtk_version_string = build_string (gtk_version);
- }
-#endif /* USE_GTK */
-
/* X window properties. */
defsubr (&Sx_change_window_property);
defsubr (&Sx_delete_window_property);
}
#endif /* HAVE_X_WINDOWS */
-
-/* arch-tag: 55040d02-5485-4d58-8b22-95a7a05f3288
- (do not change this comment) */
defsubr (&Sx_popup_dialog);
#endif
}
-
-/* arch-tag: 92ea573c-398e-496e-ac73-2436f7d63242
- (do not change this comment) */
XCloseDisplay (display);
}
#endif /* TESTRM */
-
-/* arch-tag: 37e6fbab-ed05-4363-9e76-6c4109ed511f
- (do not change this comment) */
Qforeign_selection = intern ("foreign-selection");
staticpro (&Qforeign_selection);
}
-
-/* arch-tag: 7c293b0f-9918-4f69-8ac7-03e142307236
- (do not change this comment) */
#ifdef HAVE_X_SM
#include <X11/SM/SMlib.h>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-
#ifdef HAVE_STRING_H
#include <string.h>
#else
#include "lisp.h"
#include "termhooks.h"
#include "termopts.h"
-#include "xterm.h"
#ifndef MAXPATHLEN
#define MAXPATHLEN 1024
#endif /* ! defined (SIGIO) */
}
-/* Create the client leader window. */
-static void
-create_client_leader_window (dpyinfo, client_id)
- struct x_display_info *dpyinfo;
- char *client_id;
-{
- Window w;
- XClassHint class_hints;
- Atom sm_id;
-
- w = XCreateSimpleWindow (dpyinfo->display,
- dpyinfo->root_window,
- -1, -1, 1, 1,
- CopyFromParent, CopyFromParent, CopyFromParent);
-
- class_hints.res_name = (char *) SDATA (Vx_resource_name);
- class_hints.res_class = (char *) SDATA (Vx_resource_class);
- XSetClassHint (dpyinfo->display, w, &class_hints);
- XStoreName (dpyinfo->display, w, class_hints.res_name);
-
- sm_id = XInternAtom (dpyinfo->display, "SM_CLIENT_ID", False);
- XChangeProperty (dpyinfo->display, w, sm_id, XA_STRING, 8, PropModeReplace,
- client_id, strlen (client_id));
-
- dpyinfo->client_leader_window = w;
-}
-
/* Try to open a connection to the session manager. */
void
-x_session_initialize (dpyinfo)
- struct x_display_info *dpyinfo;
+x_session_initialize ()
{
#define SM_ERRORSTRING_LEN 512
char errorstring[SM_ERRORSTRING_LEN];
errorstring);
if (smc_conn != 0)
- {
- Vx_session_id = make_string (client_id, strlen (client_id));
-
-#ifdef USE_GTK
- /* GTK creats a leader window by itself, but we need to tell
- it about our client_id. */
- gdk_set_sm_client_id (client_id);
-#else
- create_client_leader_window (dpyinfo, client_id);
-#endif
- }
+ Vx_session_id = make_string (client_id, strlen (client_id));
}
}
#endif /* HAVE_X_SM */
-
-/* arch-tag: 56a2c58c-adfa-430a-b772-130abd29fd2e
- (do not change this comment) */
}
#endif
-/* Count number of set bits in mask and number of bits to shift to
- get to the first bit. With MASK 0x7e0, *BITS is set to 6, and *OFFSET
- to 5. */
-static void
-get_bits_and_offset (mask, bits, offset)
- unsigned long mask;
- int *bits;
- int *offset;
-{
- int nr = 0;
- int off = 0;
-
- while (!(mask & 1))
- {
- off++;
- mask >>= 1;
- }
-
- while (mask & 1)
- {
- nr++;
- mask >>= 1;
- }
-
- *offset = off;
- *bits = nr;
-}
-
struct x_display_info *
x_term_init (display_name, xrm_option, resource_name)
Lisp_Object display_name;
if (!x_initialized)
{
x_initialize ();
- ++x_initialized;
+ x_initialized = 1;
}
#ifdef USE_GTK
if (x_initialized > 1)
return 0;
+ x_initialized++;
+
for (argc = 0; argc < NUM_ARGV; ++argc)
argv[argc] = 0;
s = make_string (file, strlen (file));
abs_file = Fexpand_file_name(s, Qnil);
- if (! NILP (abs_file) && !NILP (Ffile_readable_p (abs_file)))
+ if (! NILP (abs_file) && Ffile_readable_p (abs_file))
gtk_rc_parse (SDATA (abs_file));
UNGCPRO;
dpyinfo->height = HeightOfScreen (dpyinfo->screen);
dpyinfo->width = WidthOfScreen (dpyinfo->screen);
dpyinfo->root_window = RootWindowOfScreen (dpyinfo->screen);
- dpyinfo->client_leader_window = 0;
dpyinfo->grabbed = 0;
dpyinfo->reference_count = 0;
dpyinfo->icon_bitmap_id = -1;
dpyinfo->x_highlight_frame = 0;
dpyinfo->image_cache = make_image_cache ();
- /* See if we can construct pixel values from RGB values. */
- dpyinfo->red_bits = dpyinfo->blue_bits = dpyinfo->green_bits = 0;
- dpyinfo->red_offset = dpyinfo->blue_offset = dpyinfo->green_offset = 0;
-
- if (dpyinfo->visual->class == TrueColor)
- {
- get_bits_and_offset (dpyinfo->visual->red_mask,
- &dpyinfo->red_bits, &dpyinfo->red_offset);
- get_bits_and_offset (dpyinfo->visual->blue_mask,
- &dpyinfo->blue_bits, &dpyinfo->blue_offset);
- get_bits_and_offset (dpyinfo->visual->green_mask,
- &dpyinfo->green_bits, &dpyinfo->green_offset);
- }
-
/* See if a private colormap is requested. */
if (dpyinfo->visual == DefaultVisualOfScreen (dpyinfo->screen))
{
= XInternAtom (dpyinfo->display, "WM_CONFIGURE_DENIED", False);
dpyinfo->Xatom_wm_window_moved
= XInternAtom (dpyinfo->display, "WM_MOVED", False);
- dpyinfo->Xatom_wm_client_leader
- = XInternAtom (dpyinfo->display, "WM_CLIENT_LEADER", False);
dpyinfo->Xatom_editres
= XInternAtom (dpyinfo->display, "Editres", False);
dpyinfo->Xatom_CLIPBOARD
#endif
}
-#ifdef HAVE_X_SM
- /* Only do this for the first display. */
- if (x_initialized == 1)
- x_session_initialize (dpyinfo);
-#endif
-
UNBLOCK_INPUT;
return dpyinfo;
#endif /* SIGWINCH */
signal (SIGPIPE, x_connection_signal);
+
+#ifdef HAVE_X_SM
+ x_session_initialize ();
+#endif
}
}
#endif /* HAVE_X_WINDOWS */
-
-/* arch-tag: 6d4e4cb7-abc1-4302-9585-d84dcfb09d0f
- (do not change this comment) */
/* The root window of this screen. */
Window root_window;
- /* Client leader window. */
- Window client_leader_window;
-
/* The cursor to use for vertical scroll bars. */
Cursor vertical_scroll_bar_cursor;
/* Other WM communication */
Atom Xatom_wm_configure_denied; /* When our config request is denied */
Atom Xatom_wm_window_moved; /* When the WM moves us. */
- Atom Xatom_wm_client_leader; /* Id of client leader window. */
/* EditRes protocol */
Atom Xatom_editres;
use this directly, call x_color_cells instead. */
XColor *color_cells;
int ncolor_cells;
-
- /* Bits and shifts to use to compose pixel values on Direct and TrueColor
- visuals. */
- int red_bits, blue_bits, green_bits;
- int red_offset, blue_offset, green_offset;
};
#ifdef HAVE_X_I18N
/* Defined in xsmfns.c */
#ifdef HAVE_X_SM
-extern void x_session_initialize P_ ((struct x_display_info *dpyinfo));
+extern void x_session_initialize P_ ((void));
extern int x_session_check_input P_ ((struct input_event *bufp,
int *numchars));
extern int x_session_have_connection P_ ((void));
(nr).y = (ry), \
(nr).width = (rwidth), \
(nr).height = (rheight))
-
-/* arch-tag: 78a7972a-b18f-4694-861a-0780c4b3090e
- (do not change this comment) */
echo "(normal-top-level-add-to-load-path '($subdirs))" >> subdirs.el
fi
-
-# arch-tag: 56ebcf1b-5c30-4934-b0b4-72d374064704
vpath %.c $(srcdir)\
vpath %.h $(srcdir)\
\
-
-# arch-tag: 56a64b50-e4e8-443a-960f-f13af0f1a545