diff options
| author | Karoly Lorentey | 2006-01-03 02:15:28 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2006-01-03 02:15:28 +0000 |
| commit | b58cb6144c59dfa3a44b9b383cf354bc2c9bebdf (patch) | |
| tree | 87bc562249d9e597e12406e1d9b1c7dfb0f937e5 | |
| parent | b3e6f69c10973ff7b040ced07a3a084960619681 (diff) | |
| parent | 55262b16df717fe533ea4ad23dac3f02398c9055 (diff) | |
| download | emacs-b58cb6144c59dfa3a44b9b383cf354bc2c9bebdf.tar.gz emacs-b58cb6144c59dfa3a44b9b383cf354bc2c9bebdf.zip | |
Merged from miles@gnu.org--gnu-2005 (patch 682)
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-682
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-490
57 files changed, 2186 insertions, 1467 deletions
| @@ -1,4 +1,8 @@ | |||
| 1 | 2005-12-25 Giorgos Keramidas <keramida@ceid.upatras.gr> (tiny change) | 1 | 2005-12-29 Andreas Schwab <schwab@suse.de> |
| 2 | |||
| 3 | * config.guess, config.sub: Updated from master source. | ||
| 4 | |||
| 5 | 2005-12-25 Giorgos Keramidas <keramida@ceid.upatras.gr> (tiny change) | ||
| 2 | 6 | ||
| 3 | * configure.in: use amdx86-64 for freebsd on x86_64. | 7 | * configure.in: use amdx86-64 for freebsd on x86_64. |
| 4 | 8 | ||
diff --git a/config.guess b/config.guess index ad5281e66e9..10a8260177a 100755 --- a/config.guess +++ b/config.guess | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, | 3 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
| 4 | # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. | 4 | # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | timestamp='2005-08-03' | 6 | timestamp='2005-12-23' |
| 7 | 7 | ||
| 8 | # This file is free software; you can redistribute it and/or modify it | 8 | # This file is free software; you can redistribute it and/or modify it |
| 9 | # under the terms of the GNU General Public License as published by | 9 | # under the terms of the GNU General Public License as published by |
| @@ -764,7 +764,12 @@ EOF | |||
| 764 | echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} | 764 | echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} |
| 765 | exit ;; | 765 | exit ;; |
| 766 | *:FreeBSD:*:*) | 766 | *:FreeBSD:*:*) |
| 767 | echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` | 767 | case ${UNAME_MACHINE} in |
| 768 | pc98) | ||
| 769 | echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; | ||
| 770 | *) | ||
| 771 | echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; | ||
| 772 | esac | ||
| 768 | exit ;; | 773 | exit ;; |
| 769 | i*:CYGWIN*:*) | 774 | i*:CYGWIN*:*) |
| 770 | echo ${UNAME_MACHINE}-pc-cygwin | 775 | echo ${UNAME_MACHINE}-pc-cygwin |
| @@ -779,7 +784,7 @@ EOF | |||
| 779 | i*:PW*:*) | 784 | i*:PW*:*) |
| 780 | echo ${UNAME_MACHINE}-pc-pw32 | 785 | echo ${UNAME_MACHINE}-pc-pw32 |
| 781 | exit ;; | 786 | exit ;; |
| 782 | x86:Interix*:[34]*) | 787 | x86:Interix*:[345]*) |
| 783 | echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' | 788 | echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' |
| 784 | exit ;; | 789 | exit ;; |
| 785 | [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) | 790 | [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) |
| @@ -851,7 +856,7 @@ EOF | |||
| 851 | #endif | 856 | #endif |
| 852 | #endif | 857 | #endif |
| 853 | EOF | 858 | EOF |
| 854 | eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` | 859 | eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`" |
| 855 | test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } | 860 | test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } |
| 856 | ;; | 861 | ;; |
| 857 | mips64:Linux:*:*) | 862 | mips64:Linux:*:*) |
| @@ -870,7 +875,7 @@ EOF | |||
| 870 | #endif | 875 | #endif |
| 871 | #endif | 876 | #endif |
| 872 | EOF | 877 | EOF |
| 873 | eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` | 878 | eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`" |
| 874 | test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } | 879 | test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } |
| 875 | ;; | 880 | ;; |
| 876 | or32:Linux:*:*) | 881 | or32:Linux:*:*) |
| @@ -919,6 +924,9 @@ EOF | |||
| 919 | sparc:Linux:*:* | sparc64:Linux:*:*) | 924 | sparc:Linux:*:* | sparc64:Linux:*:*) |
| 920 | echo ${UNAME_MACHINE}-unknown-linux-gnu | 925 | echo ${UNAME_MACHINE}-unknown-linux-gnu |
| 921 | exit ;; | 926 | exit ;; |
| 927 | vax:Linux:*:*) | ||
| 928 | echo ${UNAME_MACHINE}-dec-linux-gnu | ||
| 929 | exit ;; | ||
| 922 | x86_64:Linux:*:*) | 930 | x86_64:Linux:*:*) |
| 923 | echo x86_64-unknown-linux-gnu | 931 | echo x86_64-unknown-linux-gnu |
| 924 | exit ;; | 932 | exit ;; |
| @@ -964,7 +972,7 @@ EOF | |||
| 964 | LIBC=gnulibc1 | 972 | LIBC=gnulibc1 |
| 965 | # endif | 973 | # endif |
| 966 | #else | 974 | #else |
| 967 | #ifdef __INTEL_COMPILER | 975 | #if defined(__INTEL_COMPILER) || defined(__PGI) |
| 968 | LIBC=gnu | 976 | LIBC=gnu |
| 969 | #else | 977 | #else |
| 970 | LIBC=gnuaout | 978 | LIBC=gnuaout |
| @@ -974,7 +982,7 @@ EOF | |||
| 974 | LIBC=dietlibc | 982 | LIBC=dietlibc |
| 975 | #endif | 983 | #endif |
| 976 | EOF | 984 | EOF |
| 977 | eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` | 985 | eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^LIBC/{s: ::g;p;}'`" |
| 978 | test x"${LIBC}" != x && { | 986 | test x"${LIBC}" != x && { |
| 979 | echo "${UNAME_MACHINE}-pc-linux-${LIBC}" | 987 | echo "${UNAME_MACHINE}-pc-linux-${LIBC}" |
| 980 | exit | 988 | exit |
| @@ -1185,7 +1193,6 @@ EOF | |||
| 1185 | *:Darwin:*:*) | 1193 | *:Darwin:*:*) |
| 1186 | UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown | 1194 | UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown |
| 1187 | case $UNAME_PROCESSOR in | 1195 | case $UNAME_PROCESSOR in |
| 1188 | *86) UNAME_PROCESSOR=i686 ;; | ||
| 1189 | unknown) UNAME_PROCESSOR=powerpc ;; | 1196 | unknown) UNAME_PROCESSOR=powerpc ;; |
| 1190 | esac | 1197 | esac |
| 1191 | echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} | 1198 | echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} |
| @@ -1264,6 +1271,9 @@ EOF | |||
| 1264 | i*86:skyos:*:*) | 1271 | i*86:skyos:*:*) |
| 1265 | echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' | 1272 | echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' |
| 1266 | exit ;; | 1273 | exit ;; |
| 1274 | i*86:rdos:*:*) | ||
| 1275 | echo ${UNAME_MACHINE}-pc-rdos | ||
| 1276 | exit ;; | ||
| 1267 | esac | 1277 | esac |
| 1268 | 1278 | ||
| 1269 | #echo '(No uname command or uname output not recognized.)' 1>&2 | 1279 | #echo '(No uname command or uname output not recognized.)' 1>&2 |
diff --git a/config.sub b/config.sub index 1c366dfde9a..8f7b7381c47 100755 --- a/config.sub +++ b/config.sub | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, | 3 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
| 4 | # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. | 4 | # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | timestamp='2005-07-08' | 6 | timestamp='2005-12-23' |
| 7 | 7 | ||
| 8 | # This file is (in principle) common to ALL GNU software. | 8 | # This file is (in principle) common to ALL GNU software. |
| 9 | # The presence of a machine in this file suggests that SOME GNU software | 9 | # The presence of a machine in this file suggests that SOME GNU software |
| @@ -119,8 +119,9 @@ esac | |||
| 119 | # Here we must recognize all the valid KERNEL-OS combinations. | 119 | # Here we must recognize all the valid KERNEL-OS combinations. |
| 120 | maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` | 120 | maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` |
| 121 | case $maybe_os in | 121 | case $maybe_os in |
| 122 | nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ | 122 | nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ |
| 123 | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) | 123 | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ |
| 124 | storm-chaos* | os2-emx* | rtmk-nova*) | ||
| 124 | os=-$maybe_os | 125 | os=-$maybe_os |
| 125 | basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` | 126 | basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` |
| 126 | ;; | 127 | ;; |
| @@ -171,6 +172,10 @@ case $os in | |||
| 171 | -hiux*) | 172 | -hiux*) |
| 172 | os=-hiuxwe2 | 173 | os=-hiuxwe2 |
| 173 | ;; | 174 | ;; |
| 175 | -sco6) | ||
| 176 | os=-sco5v6 | ||
| 177 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | ||
| 178 | ;; | ||
| 174 | -sco5) | 179 | -sco5) |
| 175 | os=-sco3.2v5 | 180 | os=-sco3.2v5 |
| 176 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | 181 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
| @@ -187,6 +192,10 @@ case $os in | |||
| 187 | # Don't forget version if it is 3.2v4 or newer. | 192 | # Don't forget version if it is 3.2v4 or newer. |
| 188 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | 193 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
| 189 | ;; | 194 | ;; |
| 195 | -sco5v6*) | ||
| 196 | # Don't forget version if it is 3.2v4 or newer. | ||
| 197 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | ||
| 198 | ;; | ||
| 190 | -sco*) | 199 | -sco*) |
| 191 | os=-sco3.2v2 | 200 | os=-sco3.2v2 |
| 192 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | 201 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
| @@ -239,7 +248,7 @@ case $basic_machine in | |||
| 239 | | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | 248 | | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ |
| 240 | | i370 | i860 | i960 | ia64 \ | 249 | | i370 | i860 | i960 | ia64 \ |
| 241 | | ip2k | iq2000 \ | 250 | | ip2k | iq2000 \ |
| 242 | | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ | 251 | | m32r | m32rle | m68000 | m68k | m88k | maxq | mb | microblaze | mcore \ |
| 243 | | mips | mipsbe | mipseb | mipsel | mipsle \ | 252 | | mips | mipsbe | mipseb | mipsel | mipsle \ |
| 244 | | mips16 \ | 253 | | mips16 \ |
| 245 | | mips64 | mips64el \ | 254 | | mips64 | mips64el \ |
| @@ -257,7 +266,7 @@ case $basic_machine in | |||
| 257 | | mipsisa64sr71k | mipsisa64sr71kel \ | 266 | | mipsisa64sr71k | mipsisa64sr71kel \ |
| 258 | | mipstx39 | mipstx39el \ | 267 | | mipstx39 | mipstx39el \ |
| 259 | | mn10200 | mn10300 \ | 268 | | mn10200 | mn10300 \ |
| 260 | | ms1 \ | 269 | | mt \ |
| 261 | | msp430 \ | 270 | | msp430 \ |
| 262 | | ns16k | ns32k \ | 271 | | ns16k | ns32k \ |
| 263 | | or32 \ | 272 | | or32 \ |
| @@ -286,6 +295,9 @@ case $basic_machine in | |||
| 286 | ;; | 295 | ;; |
| 287 | m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) | 296 | m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) |
| 288 | ;; | 297 | ;; |
| 298 | ms1) | ||
| 299 | basic_machine=mt-unknown | ||
| 300 | ;; | ||
| 289 | 301 | ||
| 290 | # We use `pc' rather than `unknown' | 302 | # We use `pc' rather than `unknown' |
| 291 | # because (1) that's what they normally are, and | 303 | # because (1) that's what they normally are, and |
| @@ -336,7 +348,7 @@ case $basic_machine in | |||
| 336 | | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | 348 | | mipsisa64sr71k-* | mipsisa64sr71kel-* \ |
| 337 | | mipstx39-* | mipstx39el-* \ | 349 | | mipstx39-* | mipstx39el-* \ |
| 338 | | mmix-* \ | 350 | | mmix-* \ |
| 339 | | ms1-* \ | 351 | | mt-* \ |
| 340 | | msp430-* \ | 352 | | msp430-* \ |
| 341 | | none-* | np1-* | ns16k-* | ns32k-* \ | 353 | | none-* | np1-* | ns16k-* | ns32k-* \ |
| 342 | | orion-* \ | 354 | | orion-* \ |
| @@ -696,6 +708,9 @@ case $basic_machine in | |||
| 696 | basic_machine=i386-pc | 708 | basic_machine=i386-pc |
| 697 | os=-msdos | 709 | os=-msdos |
| 698 | ;; | 710 | ;; |
| 711 | ms1-*) | ||
| 712 | basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` | ||
| 713 | ;; | ||
| 699 | mvs) | 714 | mvs) |
| 700 | basic_machine=i370-ibm | 715 | basic_machine=i370-ibm |
| 701 | os=-mvs | 716 | os=-mvs |
| @@ -803,6 +818,12 @@ case $basic_machine in | |||
| 803 | pc532 | pc532-*) | 818 | pc532 | pc532-*) |
| 804 | basic_machine=ns32k-pc532 | 819 | basic_machine=ns32k-pc532 |
| 805 | ;; | 820 | ;; |
| 821 | pc98) | ||
| 822 | basic_machine=i386-pc | ||
| 823 | ;; | ||
| 824 | pc98-*) | ||
| 825 | basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` | ||
| 826 | ;; | ||
| 806 | pentium | p5 | k5 | k6 | nexgen | viac3) | 827 | pentium | p5 | k5 | k6 | nexgen | viac3) |
| 807 | basic_machine=i586-pc | 828 | basic_machine=i586-pc |
| 808 | ;; | 829 | ;; |
| @@ -859,6 +880,10 @@ case $basic_machine in | |||
| 859 | basic_machine=i586-unknown | 880 | basic_machine=i586-unknown |
| 860 | os=-pw32 | 881 | os=-pw32 |
| 861 | ;; | 882 | ;; |
| 883 | rdos) | ||
| 884 | basic_machine=i386-pc | ||
| 885 | os=-rdos | ||
| 886 | ;; | ||
| 862 | rom68k) | 887 | rom68k) |
| 863 | basic_machine=m68k-rom68k | 888 | basic_machine=m68k-rom68k |
| 864 | os=-coff | 889 | os=-coff |
| @@ -1181,14 +1206,15 @@ case $os in | |||
| 1181 | | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | 1206 | | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ |
| 1182 | | -chorusos* | -chorusrdb* \ | 1207 | | -chorusos* | -chorusrdb* \ |
| 1183 | | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | 1208 | | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ |
| 1184 | | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ | 1209 | | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ |
| 1210 | | -uxpv* | -beos* | -mpeix* | -udk* \ | ||
| 1185 | | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | 1211 | | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ |
| 1186 | | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | 1212 | | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ |
| 1187 | | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | 1213 | | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ |
| 1188 | | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | 1214 | | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ |
| 1189 | | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | 1215 | | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ |
| 1190 | | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | 1216 | | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ |
| 1191 | | -skyos* | -haiku*) | 1217 | | -skyos* | -haiku* | -rdos*) |
| 1192 | # Remember, each alternative MUST END IN *, to match a version number. | 1218 | # Remember, each alternative MUST END IN *, to match a version number. |
| 1193 | ;; | 1219 | ;; |
| 1194 | -qnx*) | 1220 | -qnx*) |
diff --git a/etc/ChangeLog b/etc/ChangeLog index 4fcfeaf3842..56c72c22d3b 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | * e/eterm-color.ti: Temporarily disable the ri entry. | 3 | * e/eterm-color.ti: Temporarily disable the ri entry. |
| 4 | * e/eterm-color: Regenerate. | 4 | * e/eterm-color: Regenerate. |
| 5 | 5 | ||
| 6 | 2005-12-21 L$,1 q(Brentey K,Aa(Broly <lorentey@elte.hu> | 6 | 2005-12-21 L$,1 q(Brentey K,Aa(Broly <lorentey@elte.hu> |
| 7 | 7 | ||
| 8 | * TODO: Add note on the multi-tty branch. | 8 | * TODO: Add note on the multi-tty branch. |
| @@ -35,7 +35,7 @@ | |||
| 35 | 35 | ||
| 36 | * orgcard.tex: Version 3.20 | 36 | * orgcard.tex: Version 3.20 |
| 37 | 37 | ||
| 38 | 2005-11-16 Nick Roberts <nickrob@snap.net.nz> | 38 | 2005-11-16 Nick Roberts <nickrob@snap.net.nz> |
| 39 | 39 | ||
| 40 | * images/gud/go.xpm, images/gud/go.pbm: Old gud-remove icons. | 40 | * images/gud/go.xpm, images/gud/go.pbm: Old gud-remove icons. |
| 41 | Use for run/continue. | 41 | Use for run/continue. |
| @@ -45,7 +45,7 @@ | |||
| 45 | Use a more appropriate variable name. | 45 | Use a more appropriate variable name. |
| 46 | * images/gud/remove.xpm, images/gud/remove.pbm | 46 | * images/gud/remove.xpm, images/gud/remove.pbm |
| 47 | * images/gud/break.xpm, images/gud/break.pbm: Make more intuitive. | 47 | * images/gud/break.xpm, images/gud/break.pbm: Make more intuitive. |
| 48 | 48 | ||
| 49 | 2005-11-09 Nick Roberts <nickrob@snap.net.nz> | 49 | 2005-11-09 Nick Roberts <nickrob@snap.net.nz> |
| 50 | 50 | ||
| 51 | * images/gud/pp.xpm, images/gud/pp.pbm: New icons. | 51 | * images/gud/pp.xpm, images/gud/pp.pbm: New icons. |
| @@ -55,7 +55,7 @@ | |||
| 55 | * images/copy.xpm, images/copy.pbm, images/low-color/copy.xpm | 55 | * images/copy.xpm, images/copy.pbm, images/low-color/copy.xpm |
| 56 | * images/save.xpm, images/save.pbm, images/low-color/save.xpm: | 56 | * images/save.xpm, images/save.pbm, images/low-color/save.xpm: |
| 57 | Adjust baseline. | 57 | Adjust baseline. |
| 58 | 58 | ||
| 59 | 2005-11-06 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 59 | 2005-11-06 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 60 | 60 | ||
| 61 | * images/up-node.xpm, images/prev-node.xpm, images/next-node.xpm | 61 | * images/up-node.xpm, images/prev-node.xpm, images/next-node.xpm |
| @@ -165,18 +165,18 @@ | |||
| 165 | * images/right-arrow.*: Moved here from lisp/toolbar/right_arrow.*. | 165 | * images/right-arrow.*: Moved here from lisp/toolbar/right_arrow.*. |
| 166 | * images/up-arrow.*: Moved here from lisp/toolbar/up_arrow.*. | 166 | * images/up-arrow.*: Moved here from lisp/toolbar/up_arrow.*. |
| 167 | * images/low-color/back-arrow.*: Moved here from | 167 | * images/low-color/back-arrow.*: Moved here from |
| 168 | lisp/toolbar/lc-back_arrow.*. | 168 | lisp/toolbar/lc-back_arrow.*. |
| 169 | * images/low-color/fwd-arrow.*: Moved here from | 169 | * images/low-color/fwd-arrow.*: Moved here from |
| 170 | lisp/toolbar/lc-fwd_arrow.*. | 170 | lisp/toolbar/lc-fwd_arrow.*. |
| 171 | * images/low-color/jump-to.*: Moved here from | 171 | * images/low-color/jump-to.*: Moved here from |
| 172 | lisp/toolbar/lc-jump_to.*. | 172 | lisp/toolbar/lc-jump_to.*. |
| 173 | * images/low-color/left-arrow.*: Moved here from | 173 | * images/low-color/left-arrow.*: Moved here from |
| 174 | lisp/toolbar/lc-left_arrow.*. | 174 | lisp/toolbar/lc-left_arrow.*. |
| 175 | * images/low-color/right-arrow.*: Moved here from | 175 | * images/low-color/right-arrow.*: Moved here from |
| 176 | lisp/toolbar/lc-right_arrow.*. | 176 | lisp/toolbar/lc-right_arrow.*. |
| 177 | * images/low-color/up-arrow.*: Moved here from | 177 | * images/low-color/up-arrow.*: Moved here from |
| 178 | lisp/toolbar/lc-up_arrow.*. | 178 | lisp/toolbar/lc-up_arrow.*. |
| 179 | * images/mail/compose.*: Moved here from lisp/toolbar/mail_compose.*. | 179 | * images/mail/compose.*: Moved here from lisp/toolbar/mail_compose.*. |
| 180 | * images/mail/send.*: Moved here from lisp/toolbar/mail_send.*. | 180 | * images/mail/send.*: Moved here from lisp/toolbar/mail_send.*. |
| 181 | 181 | ||
| 182 | * images/README: Incorporated the content of lisp/toolbar/README | 182 | * images/README: Incorporated the content of lisp/toolbar/README |
| @@ -191,7 +191,7 @@ | |||
| 191 | next.*, nexti.*, step.*, and stepi.* , respectively, as the | 191 | next.*, nexti.*, step.*, and stepi.* , respectively, as the |
| 192 | file-name no longer clashes on 8+3 filesystems. | 192 | file-name no longer clashes on 8+3 filesystems. |
| 193 | 193 | ||
| 194 | 2005-10-14 Bill Wohler <wohler@newt.com> | 194 | 2005-10-14 Bill Wohler <wohler@newt.com> |
| 195 | 195 | ||
| 196 | * images/gud/break.*: Moved here from toolbar/gud-break.*. | 196 | * images/gud/break.*: Moved here from toolbar/gud-break.*. |
| 197 | * images/gud/cont.*: Moved here from toolbar/gud-cont.*. | 197 | * images/gud/cont.*: Moved here from toolbar/gud-cont.*. |
| @@ -209,10 +209,10 @@ | |||
| 209 | * images/gud/up.*: Moved here from toolbar/gud-up.*. | 209 | * images/gud/up.*: Moved here from toolbar/gud-up.*. |
| 210 | * images/gud/watch.*: Moved here from toolbar/gud-watch.*. | 210 | * images/gud/watch.*: Moved here from toolbar/gud-watch.*. |
| 211 | 211 | ||
| 212 | 2005-10-14 Bill Wohler <wohler@newt.com> | 212 | 2005-10-14 Bill Wohler <wohler@newt.com> |
| 213 | 213 | ||
| 214 | Released MH-E version 7.85. | 214 | Released MH-E version 7.85. |
| 215 | 215 | ||
| 216 | * NEWS, MH-E-NEWS: Updated for release 7.85. | 216 | * NEWS, MH-E-NEWS: Updated for release 7.85. |
| 217 | 217 | ||
| 218 | 2005-10-10 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 218 | 2005-10-10 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| @@ -817,6 +817,10 @@ appears in. | |||
| 817 | *** The variable `cursor-in-non-selected-windows' can now be set to any | 817 | *** The variable `cursor-in-non-selected-windows' can now be set to any |
| 818 | of the recognized cursor types. | 818 | of the recognized cursor types. |
| 819 | 819 | ||
| 820 | +++ | ||
| 821 | *** On text terminals, the variable `visible-cursor' controls whether Emacs | ||
| 822 | uses the "very visible" cursor (the default) or the normal cursor. | ||
| 823 | |||
| 820 | ** New faces: | 824 | ** New faces: |
| 821 | 825 | ||
| 822 | +++ | 826 | +++ |
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 223470d2e3d..c8d1cb41dea 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog | |||
| @@ -1,3 +1,15 @@ | |||
| 1 | 2005-12-30 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * makefile.w32-in (MOUSE_SUPPORT): Add tooltip.elc. | ||
| 4 | (lisp1): Add rfn-eshadow.elc, international/utf-16.elc, image.elc, | ||
| 5 | international/fontset.elc, dnd.elc, mwheel.elc, and tool-bar.elc. | ||
| 6 | Rearrange the list to be similar to $(shortlisp) in | ||
| 7 | src/Makefile.in. | ||
| 8 | (lisp2): Add language/kannada.el, emacs-lisp/syntax.elc, | ||
| 9 | emacs-lisp/timer.elc, jka-cmpr-hook.elc, font-lock.elc, | ||
| 10 | jit-lock.elc. Rearrange the list to be similar to $(shortlisp) in | ||
| 11 | src/Makefile.in. | ||
| 12 | |||
| 1 | 2005-12-22 Richard M. Stallman <rms@gnu.org> | 13 | 2005-12-22 Richard M. Stallman <rms@gnu.org> |
| 2 | 14 | ||
| 3 | * Makefile.in (update-game-score.o): Delete spurious final `\'. | 15 | * Makefile.in (update-game-score.o): Delete spurious final `\'. |
diff --git a/lib-src/makefile.w32-in b/lib-src/makefile.w32-in index a1a96098bd8..bf7a293adc6 100644 --- a/lib-src/makefile.w32-in +++ b/lib-src/makefile.w32-in | |||
| @@ -154,7 +154,7 @@ obj= sunfns.o dosfns.o msdos.o \ | |||
| 154 | # | 154 | # |
| 155 | lispsource = ../lisp/ | 155 | lispsource = ../lisp/ |
| 156 | 156 | ||
| 157 | MOUSE_SUPPORT = $(lispsource)select.elc $(lispsource)scroll-bar.elc $(lispsource)mouse.elc | 157 | MOUSE_SUPPORT = $(lispsource)select.elc $(lispsource)scroll-bar.elc $(lispsource)mouse.elc $(lispsource)tooltip.elc |
| 158 | WINNT_SUPPORT = $(lispsource)ls-lisp.elc $(lispsource)disp-table.elc $(lispsource)w32-fns.elc $(lispsource)dos-w32.elc $(lispsource)w32-vars.elc | 158 | WINNT_SUPPORT = $(lispsource)ls-lisp.elc $(lispsource)disp-table.elc $(lispsource)w32-fns.elc $(lispsource)dos-w32.elc $(lispsource)w32-vars.elc |
| 159 | 159 | ||
| 160 | # lisp files that are loaded up on other platforms | 160 | # lisp files that are loaded up on other platforms |
| @@ -166,33 +166,35 @@ lisp1= \ | |||
| 166 | $(lispsource)buff-menu.elc \ | 166 | $(lispsource)buff-menu.elc \ |
| 167 | $(lispsource)button.elc \ | 167 | $(lispsource)button.elc \ |
| 168 | $(lispsource)emacs-lisp/byte-run.elc \ | 168 | $(lispsource)emacs-lisp/byte-run.elc \ |
| 169 | $(lispsource)cus-face.elc \ | ||
| 169 | $(lispsource)cus-start.elc \ | 170 | $(lispsource)cus-start.elc \ |
| 170 | $(lispsource)custom.elc \ | 171 | $(lispsource)custom.elc \ |
| 171 | $(lispsource)emacs-lisp/backquote.elc \ | 172 | $(lispsource)emacs-lisp/backquote.elc \ |
| 172 | $(lispsource)emacs-lisp/lisp-mode.elc \ | 173 | $(lispsource)emacs-lisp/lisp-mode.elc \ |
| 173 | $(lispsource)emacs-lisp/lisp.elc \ | 174 | $(lispsource)emacs-lisp/lisp.elc \ |
| 174 | $(lispsource)env.elc \ | ||
| 175 | $(lispsource)faces.elc \ | ||
| 176 | $(lispsource)files.elc \ | ||
| 177 | $(lispsource)format.elc \ | ||
| 178 | $(lispsource)facemenu.elc \ | 175 | $(lispsource)facemenu.elc \ |
| 179 | $(MOUSE_SUPPORT) \ | 176 | $(MOUSE_SUPPORT) \ |
| 177 | $(lispsource)faces.elc \ | ||
| 178 | $(lispsource)files.elc \ | ||
| 180 | $(lispsource)emacs-lisp/float-sup.elc \ | 179 | $(lispsource)emacs-lisp/float-sup.elc \ |
| 180 | $(lispsource)format.elc \ | ||
| 181 | $(lispsource)frame.elc \ | 181 | $(lispsource)frame.elc \ |
| 182 | $(lispsource)help.elc \ | 182 | $(lispsource)help.elc \ |
| 183 | $(lispsource)indent.elc \ | 183 | $(lispsource)indent.elc \ |
| 184 | $(lispsource)isearch.elc \ | 184 | $(lispsource)isearch.elc \ |
| 185 | $(lispsource)rfn-eshadow.elc \ | ||
| 185 | $(lispsource)loadup.el \ | 186 | $(lispsource)loadup.el \ |
| 186 | $(lispsource)loaddefs.el \ | 187 | $(lispsource)loaddefs.el \ |
| 187 | $(lispsource)bindings.elc \ | 188 | $(lispsource)bindings.elc \ |
| 188 | $(lispsource)emacs-lisp/map-ynp.elc \ | 189 | $(lispsource)emacs-lisp/map-ynp.elc \ |
| 189 | $(lispsource)menu-bar.elc \ | 190 | $(lispsource)env.elc \ |
| 190 | $(lispsource)international/mule.elc \ | 191 | $(lispsource)international/mule.elc \ |
| 191 | $(lispsource)international/mule-conf.el \ | 192 | $(lispsource)international/mule-conf.el \ |
| 192 | $(lispsource)international/mule-cmds.elc \ | 193 | $(lispsource)international/mule-cmds.elc \ |
| 193 | $(lispsource)international/characters.elc \ | 194 | $(lispsource)international/characters.elc \ |
| 194 | $(lispsource)international/ucs-tables.elc \ | 195 | $(lispsource)international/ucs-tables.elc \ |
| 195 | $(lispsource)international/utf-8.elc \ | 196 | $(lispsource)international/utf-8.elc \ |
| 197 | $(lispsource)international/utf-16.elc \ | ||
| 196 | $(lispsource)international/latin-1.el \ | 198 | $(lispsource)international/latin-1.el \ |
| 197 | $(lispsource)international/latin-2.el \ | 199 | $(lispsource)international/latin-2.el \ |
| 198 | $(lispsource)international/latin-3.el \ | 200 | $(lispsource)international/latin-3.el \ |
| @@ -200,6 +202,11 @@ lisp1= \ | |||
| 200 | $(lispsource)international/latin-5.el \ | 202 | $(lispsource)international/latin-5.el \ |
| 201 | $(lispsource)international/latin-8.el \ | 203 | $(lispsource)international/latin-8.el \ |
| 202 | $(lispsource)international/latin-9.el \ | 204 | $(lispsource)international/latin-9.el \ |
| 205 | $(lispsource)image.elc \ | ||
| 206 | $(lispsource)international/fontset.elc \ | ||
| 207 | $(lispsource)dnd.elc \ | ||
| 208 | $(lispsource)mwheel.elc \ | ||
| 209 | $(lispsource)tool-bar.elc \ | ||
| 203 | $(lispsource)case-table.elc | 210 | $(lispsource)case-table.elc |
| 204 | 211 | ||
| 205 | lisp2 = \ | 212 | lisp2 = \ |
| @@ -207,6 +214,7 @@ lisp2 = \ | |||
| 207 | $(lispsource)language/cyrillic.elc \ | 214 | $(lispsource)language/cyrillic.elc \ |
| 208 | $(lispsource)language/indian.elc \ | 215 | $(lispsource)language/indian.elc \ |
| 209 | $(lispsource)language/devanagari.el \ | 216 | $(lispsource)language/devanagari.el \ |
| 217 | $(lispsource)language/kannada.el \ | ||
| 210 | $(lispsource)language/malayalam.el \ | 218 | $(lispsource)language/malayalam.el \ |
| 211 | $(lispsource)language/tamil.el \ | 219 | $(lispsource)language/tamil.el \ |
| 212 | $(lispsource)language/english.el \ | 220 | $(lispsource)language/english.el \ |
| @@ -226,6 +234,7 @@ lisp2 = \ | |||
| 226 | $(lispsource)language/misc-lang.el \ | 234 | $(lispsource)language/misc-lang.el \ |
| 227 | $(lispsource)language/utf-8-lang.el \ | 235 | $(lispsource)language/utf-8-lang.el \ |
| 228 | $(lispsource)language/georgian.el \ | 236 | $(lispsource)language/georgian.el \ |
| 237 | $(lispsource)menu-bar.elc \ | ||
| 229 | $(lispsource)paths.el \ | 238 | $(lispsource)paths.el \ |
| 230 | $(lispsource)register.elc \ | 239 | $(lispsource)register.elc \ |
| 231 | $(lispsource)replace.elc \ | 240 | $(lispsource)replace.elc \ |
| @@ -234,11 +243,16 @@ lisp2 = \ | |||
| 234 | $(lispsource)subr.elc \ | 243 | $(lispsource)subr.elc \ |
| 235 | $(lispsource)term/tty-colors.elc \ | 244 | $(lispsource)term/tty-colors.elc \ |
| 236 | $(lispsource)font-core.elc \ | 245 | $(lispsource)font-core.elc \ |
| 246 | $(lispsource)emacs-lisp/syntax.elc \ | ||
| 247 | $(lispsource)font-lock.elc \ | ||
| 248 | $(lispsource)jit-lock.elc \ | ||
| 237 | $(lispsource)textmodes/fill.elc \ | 249 | $(lispsource)textmodes/fill.elc \ |
| 238 | $(lispsource)textmodes/page.elc \ | 250 | $(lispsource)textmodes/page.elc \ |
| 239 | $(lispsource)textmodes/paragraphs.elc \ | 251 | $(lispsource)textmodes/paragraphs.elc \ |
| 240 | $(lispsource)textmodes/text-mode.elc \ | 252 | $(lispsource)textmodes/text-mode.elc \ |
| 253 | $(lispsource)emacs-lisp/timer.elc \ | ||
| 241 | $(lispsource)vc-hooks.elc \ | 254 | $(lispsource)vc-hooks.elc \ |
| 255 | $(lispsource)jka-cmpr-hook.elc \ | ||
| 242 | $(lispsource)ediff-hook.elc \ | 256 | $(lispsource)ediff-hook.elc \ |
| 243 | $(VMS_SUPPORT) \ | 257 | $(VMS_SUPPORT) \ |
| 244 | $(MSDOS_SUPPORT) \ | 258 | $(MSDOS_SUPPORT) \ |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 288e4d7ed44..1050d3deb84 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,171 @@ | |||
| 1 | 2006-01-01 Richard M. Stallman <rms@gnu.org> | ||
| 2 | |||
| 3 | * cus-edit.el (Custom-set, Custom-save): Ask for confirmation. | ||
| 4 | (Custom-reset-current, Custom-reset-saved): Likewise. | ||
| 5 | (Custom-reset-standard): Show message if aborted. | ||
| 6 | (custom-mode): Doc fix, describing those commands. | ||
| 7 | |||
| 8 | * mouse.el (mouse-drag-region-1): When following link via mouse-2, | ||
| 9 | put on event-kind property. | ||
| 10 | |||
| 11 | 2005-12-31 Chong Yidong <cyd@stupidchicken.com> | ||
| 12 | |||
| 13 | * custom.el (provide-theme): Ban `user' theme name. | ||
| 14 | (custom-enabling-themes): New variable. | ||
| 15 | (enable-theme): Don't enable user if custom-enabling-themes is t. | ||
| 16 | (custom-enabled-themes): Make it a defcustom. | ||
| 17 | (custom-theme-recalc-face): No-op if face is undefined. | ||
| 18 | |||
| 19 | * cus-edit.el (custom-button-mouse): New variable. | ||
| 20 | (custom-button-mouse): New face. | ||
| 21 | (custom-raised-buttons, custom-mode): Use it. | ||
| 22 | |||
| 23 | * cus-theme.el (custom-new-theme-mode): Use custom-button-mouse. | ||
| 24 | |||
| 25 | 2005-12-31 Eli Zaretskii <eliz@gnu.org> | ||
| 26 | |||
| 27 | * progmodes/gud.el (gud-display-line): Support hl-line in the | ||
| 28 | source buffer. | ||
| 29 | |||
| 30 | 2005-12-31 Lennart Borgman <lennart.borgman.073@student.lu.se> (tiny change) | ||
| 31 | |||
| 32 | * mouse.el (mouse-drag-window-above): Verify that the found window | ||
| 33 | overlaps with the given window in the horizontal dimension. | ||
| 34 | |||
| 35 | 2005-12-31 Eli Zaretskii <eliz@gnu.org> | ||
| 36 | |||
| 37 | * Makefile.in (cvs-update): New target. | ||
| 38 | |||
| 39 | * makefile.w32-in (cvs-update): Ditto. | ||
| 40 | |||
| 41 | 2005-12-30 Chong Yidong <cyd@stupidchicken.com> | ||
| 42 | |||
| 43 | * cus-theme.el (custom-new-theme-mode): Use cus-edit faces. | ||
| 44 | (custom-new-theme-mode-map): New variable. | ||
| 45 | |||
| 46 | 2005-12-30 Richard M. Stallman <rms@gnu.org> | ||
| 47 | |||
| 48 | * custom.el (custom-load-themes): Function deleted. | ||
| 49 | |||
| 50 | * cus-edit.el (custom-save-loaded-themes): Function deleted. | ||
| 51 | (custom-save-variables): Don't delete or add custom-load-themes call. | ||
| 52 | |||
| 53 | 2005-12-30 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 54 | |||
| 55 | * cus-start.el: Add `visible-cursor'. | ||
| 56 | |||
| 57 | * progmodes/flymake.el (flymake-copy-buffer-to-temp-buffer): Simplify. | ||
| 58 | (flymake-parse-output-and-residual): Remove `source-buffer' argument. | ||
| 59 | (flymake-process-filter): Switch to buffer before calling it instead. | ||
| 60 | (flymake-post-syntax-check, flymake-highlight-err-lines) | ||
| 61 | (flymake-delete-own-overlays, flymake-parse-err-lines) | ||
| 62 | (flymake-start-syntax-check, flymake-start-syntax-check-process) | ||
| 63 | (flymake-count-lines, flymake-parse-residual): | ||
| 64 | Remove constant buffer argument. | ||
| 65 | (flymake-start-syntax-check-for-current-buffer): Remove. | ||
| 66 | Update callers to use flymake-start-syntax-check instead. | ||
| 67 | (flymake-display-err-menu-for-current-line): | ||
| 68 | Remove unused var `mouse-pos'. | ||
| 69 | (flymake-restore-formatting): Comment out unused function. | ||
| 70 | (flymake-report-status, flymake-report-fatal-status): Remove buffer | ||
| 71 | argument, use current-buffer instead. Update callers. | ||
| 72 | |||
| 73 | 2005-12-30 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de> | ||
| 74 | |||
| 75 | * textmodes/bibtex.el (bibtex-mode): Make completion-ignore-case | ||
| 76 | buffer-local because choose-completion-delete-max-match requires | ||
| 77 | that we set completion-ignore-case (i.e., binding via let is not | ||
| 78 | sufficient). | ||
| 79 | (bibtex-complete): Always set completion-ignore-case and | ||
| 80 | choose-completion-string-functions. The latter is needed because | ||
| 81 | choose-completion-string-functions keeps its value if we quit the | ||
| 82 | *Completions* buffer without requesting a completion. | ||
| 83 | |||
| 84 | 2005-12-30 Andreas Schwab <schwab@suse.de> | ||
| 85 | |||
| 86 | * progmodes/cc-defs.el: Ignore errors from font-lock-compile-keywords. | ||
| 87 | |||
| 88 | 2005-12-30 Eli Zaretskii <eliz@gnu.org> | ||
| 89 | |||
| 90 | * jit-lock.el (jit-lock-chunk-size): Doc fix. | ||
| 91 | |||
| 92 | 2005-12-30 Juri Linkov <juri@jurta.org> | ||
| 93 | |||
| 94 | * locate.el (locate-fcodes-file, locate-header-face) | ||
| 95 | * progmodes/delphi.el (delphi-other-face) | ||
| 96 | * progmodes/glasses.el (glasses-face): Add tag "None" to const nil. | ||
| 97 | |||
| 98 | * paren.el (show-paren-match, show-paren-mismatch): Use existing | ||
| 99 | group `paren-showing-faces'. | ||
| 100 | |||
| 101 | * net/goto-addr.el (goto-address-highlight-keymap): Fix docstring. | ||
| 102 | (goto-address): Fix docstring. | ||
| 103 | |||
| 104 | * net/webjump.el (webjump-sample-sites): Update URLs. | ||
| 105 | |||
| 106 | * textmodes/fill.el (fill-single-word-nobreak-p): Use `sentence-end'. | ||
| 107 | |||
| 108 | * subr.el (cancel-change-group): Add listp around pending-undo-list. | ||
| 109 | |||
| 110 | 2005-12-29 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 111 | |||
| 112 | * font-lock.el (font-lock-compile-keywords): Signal an error when | ||
| 113 | font-lock-set-defaults hasn't been called. | ||
| 114 | |||
| 115 | 2005-12-29 Luc Teirlinck <teirllm@auburn.edu> | ||
| 116 | |||
| 117 | * subr.el (noreturn, 1value): Doc fixes. | ||
| 118 | |||
| 119 | 2005-12-29 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de> | ||
| 120 | |||
| 121 | * textmodes/bibtex.el (bibtex-text-in-field-bounds): Handle case | ||
| 122 | that assoc-string returns nil. | ||
| 123 | |||
| 124 | 2005-12-29 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de> | ||
| 125 | |||
| 126 | * textmodes/bibtex.el (bibtex-entry-type-whitespace) | ||
| 127 | (bibtex-entry-type-str, bibtex-empty-field-re) | ||
| 128 | (bibtex-search-backward-string, bibtex-preamble-prefix) | ||
| 129 | (bibtex-search-entry, bibtex-enclosing-entry-maybe-empty-head): Remove. | ||
| 130 | (bibtex-any-valid-entry-type): New variable. | ||
| 131 | (bibtex-parse-field-name): Simplify. | ||
| 132 | (bibtex-parse-string, bibtex-search-forward-string): New arg empty-key. | ||
| 133 | (bibtex-preamble-prefix): Include left delimiter. | ||
| 134 | (bibtex-search-forward-field, bibtex-search-backward-field): | ||
| 135 | Allow unbounded search past entry boundaries (required by bibtex-pop). | ||
| 136 | (bibtex-text-in-field-bounds): Use push. | ||
| 137 | (bibtex-text-in-field): Do not use bibtex-narrow-to-entry. | ||
| 138 | (bibtex-parse-preamble, bibtex-valid-entry) | ||
| 139 | (bibtex-beginning-first-field): New functions. | ||
| 140 | (bibtex-skip-to-valid-entry): Use bibtex-valid-entry. Fix regexp. | ||
| 141 | (bibtex-map-entries): Fix docstring. | ||
| 142 | (bibtex-flash-head): New arg prompt. Simplify. | ||
| 143 | (bibtex-enclosing-field): Include code of bibtex-inside-field. | ||
| 144 | (bibtex-insert-kill): Simplify. Always insert text past the | ||
| 145 | current field or entry. | ||
| 146 | (bibtex-format-entry): Use bibtex-parse-field. | ||
| 147 | (bibtex-pop): Use bibtex-beginning-of-entry and | ||
| 148 | bibtex-end-of-entry to initiate the search. Insert empty field if | ||
| 149 | we found ourselves. | ||
| 150 | (bibtex-print-help-message): New args field and comma. | ||
| 151 | Handle entry keys. | ||
| 152 | (bibtex-make-field): Use bibtex-beginning-of-entry. | ||
| 153 | (bibtex-end-of-entry): Use bibtex-valid-entry. Recognize any | ||
| 154 | invalid entry. | ||
| 155 | (bibtex-validate): Use bibtex-valid-entry and bibtex-parse-string. | ||
| 156 | Handle preambles. Simplify code for thorough test. | ||
| 157 | (bibtex-next-field, bibtex-find-text, bibtex-find-text-internal): | ||
| 158 | New arg comma. Handle entry heads. | ||
| 159 | (bibtex-remove-OPT-or-ALT, bibtex-remove-delimiters) | ||
| 160 | (bibtex-kill-field, bibtex-copy-field-as-kil, bibtex-empty-field): | ||
| 161 | New arg comma. | ||
| 162 | (bibtex-kill-entry): Use bibtex-any-entry-maybe-empty-head. | ||
| 163 | (bibtex-fill-field): Simplify. | ||
| 164 | (bibtex-fill-entry): Use bibtex-beginning-first-field and | ||
| 165 | bibtex-parse-field. | ||
| 166 | (bibtex-convert-alien): Do not wait before calling bibtex-validate. | ||
| 167 | (bibtex-complete): Use bibtex-parse-preamble. | ||
| 168 | |||
| 1 | 2005-12-29 Nick Roberts <nickrob@snap.net.nz> | 169 | 2005-12-29 Nick Roberts <nickrob@snap.net.nz> |
| 2 | 170 | ||
| 3 | * progmodes/gdb-ui.el (gdb-tooltip-print, gdb-tooltip-print-1): | 171 | * progmodes/gdb-ui.el (gdb-tooltip-print, gdb-tooltip-print-1): |
| @@ -11,8 +179,7 @@ | |||
| 11 | 179 | ||
| 12 | 2005-12-28 Bill Wohler <wohler@newt.com> | 180 | 2005-12-28 Bill Wohler <wohler@newt.com> |
| 13 | 181 | ||
| 14 | * simple.el (mh-e-user-agent): Move to mh-e/mh-comp.el and | 182 | * simple.el (mh-e-user-agent): Move to mh-e/mh-comp.el and autoload. |
| 15 | autoload. | ||
| 16 | 183 | ||
| 17 | 2005-12-28 Stefan Monnier <monnier@iro.umontreal.ca> | 184 | 2005-12-28 Stefan Monnier <monnier@iro.umontreal.ca> |
| 18 | 185 | ||
diff --git a/lisp/Makefile.in b/lisp/Makefile.in index eaac8d08324..9a4497679ef 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in | |||
| @@ -119,6 +119,9 @@ update-subdirs: doit | |||
| 119 | 119 | ||
| 120 | updates: update-subdirs autoloads mh-autoloads finder-data custom-deps | 120 | updates: update-subdirs autoloads mh-autoloads finder-data custom-deps |
| 121 | 121 | ||
| 122 | # This is useful after "cvs up". | ||
| 123 | cvs-update: recompile autoloads finder-data custom-deps | ||
| 124 | |||
| 122 | # Update the AUTHORS file. | 125 | # Update the AUTHORS file. |
| 123 | 126 | ||
| 124 | update-authors: | 127 | update-authors: |
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 54d0fa23e52..4c92034eaad 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el | |||
| @@ -746,22 +746,26 @@ groups after non-groups, if nil do not order groups at all." | |||
| 746 | (defun Custom-set () | 746 | (defun Custom-set () |
| 747 | "Set changes in all modified options." | 747 | "Set changes in all modified options." |
| 748 | (interactive) | 748 | (interactive) |
| 749 | (let ((children custom-options)) | 749 | (if (y-or-n-p "Set all values according to this buffer? ") |
| 750 | (mapc (lambda (child) | 750 | (let ((children custom-options)) |
| 751 | (when (eq (widget-get child :custom-state) 'modified) | 751 | (mapc (lambda (child) |
| 752 | (widget-apply child :custom-set))) | 752 | (when (eq (widget-get child :custom-state) 'modified) |
| 753 | children))) | 753 | (widget-apply child :custom-set))) |
| 754 | children)) | ||
| 755 | (message "Aborted"))) | ||
| 754 | 756 | ||
| 755 | (defun Custom-save () | 757 | (defun Custom-save () |
| 756 | "Set all modified group members and save them." | 758 | "Set all modified group members and save them." |
| 757 | (interactive) | 759 | (interactive) |
| 758 | (let ((children custom-options)) | 760 | (if (yes-or-no-p "Save all settings in this buffer? ") |
| 759 | (mapc (lambda (child) | 761 | (let ((children custom-options)) |
| 760 | (when (memq (widget-get child :custom-state) | 762 | (mapc (lambda (child) |
| 761 | '(modified set changed rogue)) | 763 | (when (memq (widget-get child :custom-state) |
| 762 | (widget-apply child :custom-save))) | 764 | '(modified set changed rogue)) |
| 763 | children)) | 765 | (widget-apply child :custom-save))) |
| 764 | (custom-save-all)) | 766 | children) |
| 767 | (custom-save-all)) | ||
| 768 | (message "Aborted"))) | ||
| 765 | 769 | ||
| 766 | (defvar custom-reset-menu | 770 | (defvar custom-reset-menu |
| 767 | '(("Current" . Custom-reset-current) | 771 | '(("Current" . Custom-reset-current) |
| @@ -784,22 +788,26 @@ when the action is chosen.") | |||
| 784 | (defun Custom-reset-current (&rest ignore) | 788 | (defun Custom-reset-current (&rest ignore) |
| 785 | "Reset all modified group members to their current value." | 789 | "Reset all modified group members to their current value." |
| 786 | (interactive) | 790 | (interactive) |
| 787 | (let ((children custom-options)) | 791 | (if (y-or-n-p "Update buffer text to show all current settings? ") |
| 788 | (mapc (lambda (widget) | 792 | (let ((children custom-options)) |
| 789 | (if (memq (widget-get widget :custom-state) | 793 | (mapc (lambda (widget) |
| 790 | '(modified changed)) | 794 | (if (memq (widget-get widget :custom-state) |
| 791 | (widget-apply widget :custom-reset-current))) | 795 | '(modified changed)) |
| 792 | children))) | 796 | (widget-apply widget :custom-reset-current))) |
| 797 | children)) | ||
| 798 | (message "Aborted"))) | ||
| 793 | 799 | ||
| 794 | (defun Custom-reset-saved (&rest ignore) | 800 | (defun Custom-reset-saved (&rest ignore) |
| 795 | "Reset all modified or set group members to their saved value." | 801 | "Reset all modified or set group members to their saved value." |
| 796 | (interactive) | 802 | (interactive) |
| 797 | (let ((children custom-options)) | 803 | (if (y-or-n-p "Update buffer text to show all saved settings? ") |
| 798 | (mapc (lambda (widget) | 804 | (let ((children custom-options)) |
| 799 | (if (memq (widget-get widget :custom-state) | 805 | (mapc (lambda (widget) |
| 800 | '(modified set changed rogue)) | 806 | (if (memq (widget-get widget :custom-state) |
| 801 | (widget-apply widget :custom-reset-saved))) | 807 | '(modified set changed rogue)) |
| 802 | children))) | 808 | (widget-apply widget :custom-reset-saved))) |
| 809 | children)) | ||
| 810 | (message "Aborted"))) | ||
| 803 | 811 | ||
| 804 | (defun Custom-reset-standard (&rest ignore) | 812 | (defun Custom-reset-standard (&rest ignore) |
| 805 | "Erase all customization (either current or saved) for the group members. | 813 | "Erase all customization (either current or saved) for the group members. |
| @@ -808,18 +816,19 @@ This operation eliminates any saved values for the group members, | |||
| 808 | making them as if they had never been customized at all." | 816 | making them as if they had never been customized at all." |
| 809 | (interactive) | 817 | (interactive) |
| 810 | (let ((children custom-options)) | 818 | (let ((children custom-options)) |
| 811 | (when (or (and (= 1 (length children)) | 819 | (if (or (and (= 1 (length children)) |
| 812 | (memq (widget-type (car children)) | 820 | (memq (widget-type (car children)) |
| 813 | '(custom-variable custom-face))) | 821 | '(custom-variable custom-face))) |
| 814 | (yes-or-no-p "Really erase all customizations in this buffer? ")) | 822 | (yes-or-no-p "Really erase all customizations in this buffer? ")) |
| 815 | (mapc (lambda (widget) | 823 | (mapc (lambda (widget) |
| 816 | (and (if (widget-get widget :custom-standard-value) | 824 | (and (if (widget-get widget :custom-standard-value) |
| 817 | (widget-apply widget :custom-standard-value) | 825 | (widget-apply widget :custom-standard-value) |
| 818 | t) | 826 | t) |
| 819 | (memq (widget-get widget :custom-state) | 827 | (memq (widget-get widget :custom-state) |
| 820 | '(modified set changed saved rogue)) | 828 | '(modified set changed saved rogue)) |
| 821 | (widget-apply widget :custom-reset-standard))) | 829 | (widget-apply widget :custom-reset-standard))) |
| 822 | children)))) | 830 | children) |
| 831 | (message "Aborted")))) | ||
| 823 | 832 | ||
| 824 | ;;; The Customize Commands | 833 | ;;; The Customize Commands |
| 825 | 834 | ||
| @@ -1405,6 +1414,9 @@ This button will have a menu with all three reset operations." | |||
| 1405 | (defvar custom-button nil | 1414 | (defvar custom-button nil |
| 1406 | "Face used for buttons in customization buffers.") | 1415 | "Face used for buttons in customization buffers.") |
| 1407 | 1416 | ||
| 1417 | (defvar custom-button-mouse nil | ||
| 1418 | "Mouse face used for buttons in customization buffers.") | ||
| 1419 | |||
| 1408 | (defvar custom-button-pressed nil | 1420 | (defvar custom-button-pressed nil |
| 1409 | "Face used for pressed buttons in customization buffers.") | 1421 | "Face used for pressed buttons in customization buffers.") |
| 1410 | 1422 | ||
| @@ -1419,6 +1431,8 @@ Otherwise use brackets." | |||
| 1419 | (custom-set-default variable value) | 1431 | (custom-set-default variable value) |
| 1420 | (setq custom-button | 1432 | (setq custom-button |
| 1421 | (if value 'custom-button 'custom-button-unraised)) | 1433 | (if value 'custom-button 'custom-button-unraised)) |
| 1434 | (setq custom-button-mouse | ||
| 1435 | (if value 'custom-button-mouse 'highlight)) | ||
| 1422 | (setq custom-button-pressed | 1436 | (setq custom-button-pressed |
| 1423 | (if value | 1437 | (if value |
| 1424 | 'custom-button-pressed | 1438 | 'custom-button-pressed |
| @@ -1960,6 +1974,16 @@ and `face'." | |||
| 1960 | ;; backward-compatibility alias | 1974 | ;; backward-compatibility alias |
| 1961 | (put 'custom-button-face 'face-alias 'custom-button) | 1975 | (put 'custom-button-face 'face-alias 'custom-button) |
| 1962 | 1976 | ||
| 1977 | (defface custom-button-mouse | ||
| 1978 | '((((type x w32 mac) (class color)) | ||
| 1979 | (:box (:line-width 2 :style released-button) | ||
| 1980 | :background "grey90" :foreground "black")) | ||
| 1981 | (t | ||
| 1982 | nil)) | ||
| 1983 | "Mouse face for custom buffer buttons if `custom-raised-buttons' is non-nil." | ||
| 1984 | :version "22.1" | ||
| 1985 | :group 'custom-faces) | ||
| 1986 | |||
| 1963 | (defface custom-button-unraised | 1987 | (defface custom-button-unraised |
| 1964 | '((((min-colors 88) | 1988 | '((((min-colors 88) |
| 1965 | (class color) (background light)) :foreground "blue1" :underline t) | 1989 | (class color) (background light)) :foreground "blue1" :underline t) |
| @@ -1975,6 +1999,9 @@ and `face'." | |||
| 1975 | (setq custom-button | 1999 | (setq custom-button |
| 1976 | (if custom-raised-buttons 'custom-button 'custom-button-unraised)) | 2000 | (if custom-raised-buttons 'custom-button 'custom-button-unraised)) |
| 1977 | 2001 | ||
| 2002 | (setq custom-button-mouse | ||
| 2003 | (if custom-raised-buttons 'custom-button-mouse 'highlight)) | ||
| 2004 | |||
| 1978 | (defface custom-button-pressed | 2005 | (defface custom-button-pressed |
| 1979 | '((((type x w32 mac) (class color)) | 2006 | '((((type x w32 mac) (class color)) |
| 1980 | (:box (:line-width 2 :style pressed-button) | 2007 | (:box (:line-width 2 :style pressed-button) |
| @@ -4024,6 +4051,33 @@ if only the first line of the docstring is shown.")) | |||
| 4024 | (save-buffer)) | 4051 | (save-buffer)) |
| 4025 | (unless old-buffer | 4052 | (unless old-buffer |
| 4026 | (kill-buffer (current-buffer)))))) | 4053 | (kill-buffer (current-buffer)))))) |
| 4054 | |||
| 4055 | ;;;###autoload | ||
| 4056 | (defun customize-save-customized () | ||
| 4057 | "Save all user options which have been set in this session." | ||
| 4058 | (interactive) | ||
| 4059 | (mapatoms (lambda (symbol) | ||
| 4060 | (let ((face (get symbol 'customized-face)) | ||
| 4061 | (value (get symbol 'customized-value)) | ||
| 4062 | (face-comment (get symbol 'customized-face-comment)) | ||
| 4063 | (variable-comment | ||
| 4064 | (get symbol 'customized-variable-comment))) | ||
| 4065 | (when face | ||
| 4066 | (put symbol 'saved-face face) | ||
| 4067 | (custom-push-theme 'theme-face symbol 'user 'set value) | ||
| 4068 | (put symbol 'customized-face nil)) | ||
| 4069 | (when value | ||
| 4070 | (put symbol 'saved-value value) | ||
| 4071 | (custom-push-theme 'theme-value symbol 'user 'set value) | ||
| 4072 | (put symbol 'customized-value nil)) | ||
| 4073 | (when variable-comment | ||
| 4074 | (put symbol 'saved-variable-comment variable-comment) | ||
| 4075 | (put symbol 'customized-variable-comment nil)) | ||
| 4076 | (when face-comment | ||
| 4077 | (put symbol 'saved-face-comment face-comment) | ||
| 4078 | (put symbol 'customized-face-comment nil))))) | ||
| 4079 | ;; We really should update all custom buffers here. | ||
| 4080 | (custom-save-all)) | ||
| 4027 | 4081 | ||
| 4028 | ;; Editing the custom file contents in a buffer. | 4082 | ;; Editing the custom file contents in a buffer. |
| 4029 | 4083 | ||
| @@ -4069,10 +4123,8 @@ This function does not save the buffer." | |||
| 4069 | (defun custom-save-variables () | 4123 | (defun custom-save-variables () |
| 4070 | "Save all customized variables in `custom-file'." | 4124 | "Save all customized variables in `custom-file'." |
| 4071 | (save-excursion | 4125 | (save-excursion |
| 4072 | (custom-save-delete 'custom-load-themes) | ||
| 4073 | (custom-save-delete 'custom-reset-variables) | 4126 | (custom-save-delete 'custom-reset-variables) |
| 4074 | (custom-save-delete 'custom-set-variables) | 4127 | (custom-save-delete 'custom-set-variables) |
| 4075 | (custom-save-loaded-themes) | ||
| 4076 | (custom-save-resets 'theme-value 'custom-reset-variables nil) | 4128 | (custom-save-resets 'theme-value 'custom-reset-variables nil) |
| 4077 | (let ((standard-output (current-buffer)) | 4129 | (let ((standard-output (current-buffer)) |
| 4078 | (saved-list (make-list 1 0)) | 4130 | (saved-list (make-list 1 0)) |
| @@ -4131,6 +4183,33 @@ This function does not save the buffer." | |||
| 4131 | (unless (looking-at "\n") | 4183 | (unless (looking-at "\n") |
| 4132 | (princ "\n"))))) | 4184 | (princ "\n"))))) |
| 4133 | 4185 | ||
| 4186 | (defun custom-save-resets (property setter special) | ||
| 4187 | (let (started-writing ignored-special) | ||
| 4188 | ;; (custom-save-delete setter) Done by caller | ||
| 4189 | (let ((standard-output (current-buffer)) | ||
| 4190 | (mapper `(lambda (object) | ||
| 4191 | (let ((spec (car-safe (get object (quote ,property))))) | ||
| 4192 | (when (and (not (memq object ignored-special)) | ||
| 4193 | (eq (nth 0 spec) 'user) | ||
| 4194 | (eq (nth 1 spec) 'reset)) | ||
| 4195 | ;; Do not write reset statements unless necessary. | ||
| 4196 | (unless started-writing | ||
| 4197 | (setq started-writing t) | ||
| 4198 | (unless (bolp) | ||
| 4199 | (princ "\n")) | ||
| 4200 | (princ "(") | ||
| 4201 | (princ (quote ,setter)) | ||
| 4202 | (princ "\n '(") | ||
| 4203 | (prin1 object) | ||
| 4204 | (princ " ") | ||
| 4205 | (prin1 (nth 3 spec)) | ||
| 4206 | (princ ")"))))))) | ||
| 4207 | (mapc mapper special) | ||
| 4208 | (setq ignored-special special) | ||
| 4209 | (mapatoms mapper) | ||
| 4210 | (when started-writing | ||
| 4211 | (princ ")\n"))))) | ||
| 4212 | |||
| 4134 | (defun custom-save-faces () | 4213 | (defun custom-save-faces () |
| 4135 | "Save all customized faces in `custom-file'." | 4214 | "Save all customized faces in `custom-file'." |
| 4136 | (save-excursion | 4215 | (save-excursion |
| @@ -4187,71 +4266,6 @@ This function does not save the buffer." | |||
| 4187 | (princ ")") | 4266 | (princ ")") |
| 4188 | (unless (looking-at "\n") | 4267 | (unless (looking-at "\n") |
| 4189 | (princ "\n"))))) | 4268 | (princ "\n"))))) |
| 4190 | |||
| 4191 | (defun custom-save-resets (property setter special) | ||
| 4192 | (let (started-writing ignored-special) | ||
| 4193 | ;; (custom-save-delete setter) Done by caller | ||
| 4194 | (let ((standard-output (current-buffer)) | ||
| 4195 | (mapper `(lambda (object) | ||
| 4196 | (let ((spec (car-safe (get object (quote ,property))))) | ||
| 4197 | (when (and (not (memq object ignored-special)) | ||
| 4198 | (eq (nth 0 spec) 'user) | ||
| 4199 | (eq (nth 1 spec) 'reset)) | ||
| 4200 | ;; Do not write reset statements unless necessary. | ||
| 4201 | (unless started-writing | ||
| 4202 | (setq started-writing t) | ||
| 4203 | (unless (bolp) | ||
| 4204 | (princ "\n")) | ||
| 4205 | (princ "(") | ||
| 4206 | (princ (quote ,setter)) | ||
| 4207 | (princ "\n '(") | ||
| 4208 | (prin1 object) | ||
| 4209 | (princ " ") | ||
| 4210 | (prin1 (nth 3 spec)) | ||
| 4211 | (princ ")"))))))) | ||
| 4212 | (mapc mapper special) | ||
| 4213 | (setq ignored-special special) | ||
| 4214 | (mapatoms mapper) | ||
| 4215 | (when started-writing | ||
| 4216 | (princ ")\n"))))) | ||
| 4217 | |||
| 4218 | (defun custom-save-loaded-themes () | ||
| 4219 | (let ((themes (reverse (get 'user 'theme-loads-themes))) | ||
| 4220 | (standard-output (current-buffer))) | ||
| 4221 | (when themes | ||
| 4222 | (unless (bolp) (princ "\n")) | ||
| 4223 | (princ "(custom-load-themes") | ||
| 4224 | (mapc (lambda (theme) | ||
| 4225 | (princ "\n '") | ||
| 4226 | (prin1 theme)) themes) | ||
| 4227 | (princ " )\n")))) | ||
| 4228 | |||
| 4229 | ;;;###autoload | ||
| 4230 | (defun customize-save-customized () | ||
| 4231 | "Save all user options which have been set in this session." | ||
| 4232 | (interactive) | ||
| 4233 | (mapatoms (lambda (symbol) | ||
| 4234 | (let ((face (get symbol 'customized-face)) | ||
| 4235 | (value (get symbol 'customized-value)) | ||
| 4236 | (face-comment (get symbol 'customized-face-comment)) | ||
| 4237 | (variable-comment | ||
| 4238 | (get symbol 'customized-variable-comment))) | ||
| 4239 | (when face | ||
| 4240 | (put symbol 'saved-face face) | ||
| 4241 | (custom-push-theme 'theme-face symbol 'user 'set value) | ||
| 4242 | (put symbol 'customized-face nil)) | ||
| 4243 | (when value | ||
| 4244 | (put symbol 'saved-value value) | ||
| 4245 | (custom-push-theme 'theme-value symbol 'user 'set value) | ||
| 4246 | (put symbol 'customized-value nil)) | ||
| 4247 | (when variable-comment | ||
| 4248 | (put symbol 'saved-variable-comment variable-comment) | ||
| 4249 | (put symbol 'customized-variable-comment nil)) | ||
| 4250 | (when face-comment | ||
| 4251 | (put symbol 'saved-face-comment face-comment) | ||
| 4252 | (put symbol 'customized-face-comment nil))))) | ||
| 4253 | ;; We really should update all custom buffers here. | ||
| 4254 | (custom-save-all)) | ||
| 4255 | 4269 | ||
| 4256 | ;;; The Customize Menu. | 4270 | ;;; The Customize Menu. |
| 4257 | 4271 | ||
| @@ -4400,11 +4414,12 @@ Complete content of editable text field. \\[widget-complete] | |||
| 4400 | \\<custom-mode-map>\ | 4414 | \\<custom-mode-map>\ |
| 4401 | Invoke button under the mouse pointer. \\[Custom-move-and-invoke] | 4415 | Invoke button under the mouse pointer. \\[Custom-move-and-invoke] |
| 4402 | Invoke button under point. \\[widget-button-press] | 4416 | Invoke button under point. \\[widget-button-press] |
| 4403 | Set all modifications. \\[Custom-set] | 4417 | Set all options from current text. \\[Custom-set] |
| 4404 | Make all modifications default. \\[Custom-save] | 4418 | Make values in current text permanent. \\[Custom-save] |
| 4405 | Reset all modified options. \\[Custom-reset-current] | 4419 | Make text match actual option values. \\[Custom-reset-current] |
| 4406 | Reset all modified or set options. \\[Custom-reset-saved] | 4420 | Reset options to permanent settings. \\[Custom-reset-saved] |
| 4407 | Reset all options. \\[Custom-reset-standard] | 4421 | Erase customizations; set options |
| 4422 | and buffer text to the standard values. \\[Custom-reset-standard] | ||
| 4408 | 4423 | ||
| 4409 | Entry to this mode calls the value of `custom-mode-hook' | 4424 | Entry to this mode calls the value of `custom-mode-hook' |
| 4410 | if that value is non-nil." | 4425 | if that value is non-nil." |
| @@ -4420,8 +4435,7 @@ if that value is non-nil." | |||
| 4420 | (make-local-variable 'widget-button-face) | 4435 | (make-local-variable 'widget-button-face) |
| 4421 | (setq widget-button-face custom-button) | 4436 | (setq widget-button-face custom-button) |
| 4422 | (set (make-local-variable 'widget-button-pressed-face) custom-button-pressed) | 4437 | (set (make-local-variable 'widget-button-pressed-face) custom-button-pressed) |
| 4423 | (if custom-raised-buttons | 4438 | (set (make-local-variable 'widget-mouse-face) custom-button-mouse) |
| 4424 | (set (make-local-variable 'widget-mouse-face) custom-button)) | ||
| 4425 | 4439 | ||
| 4426 | ;; When possible, use relief for buttons, not bracketing. This test | 4440 | ;; When possible, use relief for buttons, not bracketing. This test |
| 4427 | ;; may not be optimal. | 4441 | ;; may not be optimal. |
diff --git a/lisp/cus-start.el b/lisp/cus-start.el index a851d32d296..30af30045f8 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el | |||
| @@ -274,6 +274,8 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of | |||
| 274 | (words-include-escapes editing-basics boolean) | 274 | (words-include-escapes editing-basics boolean) |
| 275 | (open-paren-in-column-0-is-defun-start editing-basics boolean | 275 | (open-paren-in-column-0-is-defun-start editing-basics boolean |
| 276 | "21.1") | 276 | "21.1") |
| 277 | ;; term.c | ||
| 278 | (visible-cursor cursor boolean "22.1") | ||
| 277 | ;; undo.c | 279 | ;; undo.c |
| 278 | (undo-limit undo integer) | 280 | (undo-limit undo integer) |
| 279 | (undo-strong-limit undo integer) | 281 | (undo-strong-limit undo integer) |
diff --git a/lisp/cus-theme.el b/lisp/cus-theme.el index 43cf96e34fa..d7102fc11f7 100644 --- a/lisp/cus-theme.el +++ b/lisp/cus-theme.el | |||
| @@ -31,11 +31,31 @@ | |||
| 31 | (eval-when-compile | 31 | (eval-when-compile |
| 32 | (require 'wid-edit)) | 32 | (require 'wid-edit)) |
| 33 | 33 | ||
| 34 | (defvar custom-new-theme-mode-map | ||
| 35 | (let ((map (make-keymap))) | ||
| 36 | (set-keymap-parent map widget-keymap) | ||
| 37 | (suppress-keymap map) | ||
| 38 | (define-key map "n" 'widget-forward) | ||
| 39 | (define-key map "p" 'widget-backward) | ||
| 40 | (define-key map [mouse-1] 'widget-move-and-invoke) | ||
| 41 | map) | ||
| 42 | "Keymap for `custom-new-theme-mode'.") | ||
| 43 | |||
| 34 | (define-derived-mode custom-new-theme-mode nil "New-Theme" | 44 | (define-derived-mode custom-new-theme-mode nil "New-Theme" |
| 35 | "Major mode for the buffer created by `customize-create-theme'. | 45 | "Major mode for the buffer created by `customize-create-theme'. |
| 36 | Do not call this mode function yourself. It is only meant for internal | 46 | Do not call this mode function yourself. It is only meant for internal |
| 37 | use by `customize-create-theme'." | 47 | use by `customize-create-theme'." |
| 38 | (set-keymap-parent custom-new-theme-mode-map widget-keymap)) | 48 | (use-local-map custom-new-theme-mode-map) |
| 49 | (define-key custom-new-theme-mode-map [mouse-1] 'widget-move-and-invoke) | ||
| 50 | (set (make-local-variable 'widget-documentation-face) 'custom-documentation) | ||
| 51 | (set (make-local-variable 'widget-button-face) custom-button) | ||
| 52 | (set (make-local-variable 'widget-button-pressed-face) custom-button-pressed) | ||
| 53 | (set (make-local-variable 'widget-mouse-face) custom-button-mouse) | ||
| 54 | (when custom-raised-buttons | ||
| 55 | (set (make-local-variable 'widget-push-button-prefix) "") | ||
| 56 | (set (make-local-variable 'widget-push-button-suffix) "") | ||
| 57 | (set (make-local-variable 'widget-link-prefix) "") | ||
| 58 | (set (make-local-variable 'widget-link-suffix) ""))) | ||
| 39 | (put 'custom-new-theme-mode 'mode-class 'special) | 59 | (put 'custom-new-theme-mode 'mode-class 'special) |
| 40 | 60 | ||
| 41 | (defvar custom-theme-name) | 61 | (defvar custom-theme-name) |
diff --git a/lisp/custom.el b/lisp/custom.el index df2488bda40..18d79a6af23 100644 --- a/lisp/custom.el +++ b/lisp/custom.el | |||
| @@ -648,8 +648,7 @@ The user has not customized the variable; had he done that, the | |||
| 648 | list would contain an entry for the `user' theme, too. | 648 | list would contain an entry for the `user' theme, too. |
| 649 | 649 | ||
| 650 | See `custom-known-themes' for a list of known themes." | 650 | See `custom-known-themes' for a list of known themes." |
| 651 | (unless (or (eq prop 'theme-value) | 651 | (unless (memq prop '(theme-value theme-face)) |
| 652 | (eq prop 'theme-face)) | ||
| 653 | (error "Unknown theme property")) | 652 | (error "Unknown theme property")) |
| 654 | (let* ((old (get symbol prop)) | 653 | (let* ((old (get symbol prop)) |
| 655 | (setting (assq theme old)) | 654 | (setting (assq theme old)) |
| @@ -1048,21 +1047,15 @@ into this directory." | |||
| 1048 | "Return non-nil if THEME has been loaded." | 1047 | "Return non-nil if THEME has been loaded." |
| 1049 | (memq theme custom-loaded-themes)) | 1048 | (memq theme custom-loaded-themes)) |
| 1050 | 1049 | ||
| 1051 | (defvar custom-enabled-themes '(user) | ||
| 1052 | "Custom themes currently enabled, highest precedence first. | ||
| 1053 | The first one is always `user'.") | ||
| 1054 | |||
| 1055 | (defun custom-theme-enabled-p (theme) | ||
| 1056 | "Return non-nil if THEME is enabled." | ||
| 1057 | (memq theme custom-enabled-themes)) | ||
| 1058 | |||
| 1059 | (defun provide-theme (theme) | 1050 | (defun provide-theme (theme) |
| 1060 | "Indicate that this file provides THEME. | 1051 | "Indicate that this file provides THEME, and mark it as enabled. |
| 1061 | Add THEME to `custom-loaded-themes', and `provide' whatever | 1052 | Add THEME to `custom-loaded-themes' and `custom-enabled-themes', |
| 1062 | feature name is stored in THEME's property `theme-feature'. | 1053 | and `provide' the feature name stored in THEME's property `theme-feature'. |
| 1063 | 1054 | ||
| 1064 | Usually the `theme-feature' property contains a symbol created | 1055 | Usually the `theme-feature' property contains a symbol created |
| 1065 | by `custom-make-theme-feature'." | 1056 | by `custom-make-theme-feature'." |
| 1057 | (if (eq theme 'user) | ||
| 1058 | (error "Custom theme cannot be named `user'")) | ||
| 1066 | (custom-check-theme theme) | 1059 | (custom-check-theme theme) |
| 1067 | (provide (get theme 'theme-feature)) | 1060 | (provide (get theme 'theme-feature)) |
| 1068 | (push theme custom-loaded-themes) | 1061 | (push theme custom-loaded-themes) |
| @@ -1120,15 +1113,11 @@ All the themes loaded for BY-THEME are recorded in BY-THEME's property | |||
| 1120 | (load-theme theme))) | 1113 | (load-theme theme))) |
| 1121 | (push theme themes-loaded)) | 1114 | (push theme themes-loaded)) |
| 1122 | (put by-theme 'theme-loads-themes themes-loaded))) | 1115 | (put by-theme 'theme-loads-themes themes-loaded))) |
| 1123 | |||
| 1124 | (defun custom-load-themes (&rest body) | ||
| 1125 | "Load themes for the USER theme as specified by BODY. | ||
| 1126 | |||
| 1127 | See `custom-theme-load-themes' for more information on BODY." | ||
| 1128 | (apply 'custom-theme-load-themes 'user body)) | ||
| 1129 | 1116 | ||
| 1130 | ;;; Enabling and disabling loaded themes. | 1117 | ;;; Enabling and disabling loaded themes. |
| 1131 | 1118 | ||
| 1119 | (defvar custom-enabling-themes nil) | ||
| 1120 | |||
| 1132 | (defun enable-theme (theme) | 1121 | (defun enable-theme (theme) |
| 1133 | "Reenable all variable and face settings defined by THEME. | 1122 | "Reenable all variable and face settings defined by THEME. |
| 1134 | The newly enabled theme gets the highest precedence (after `user'). | 1123 | The newly enabled theme gets the highest precedence (after `user'). |
| @@ -1137,9 +1126,9 @@ If it is already enabled, just give it highest precedence (after `user'). | |||
| 1137 | This signals an error if THEME does not specify any theme | 1126 | This signals an error if THEME does not specify any theme |
| 1138 | settings. Theme settings are set using `load-theme'." | 1127 | settings. Theme settings are set using `load-theme'." |
| 1139 | (interactive "SEnable Custom theme: ") | 1128 | (interactive "SEnable Custom theme: ") |
| 1129 | (unless (or (eq theme 'user) (memq theme custom-loaded-themes)) | ||
| 1130 | (error "Theme %s not defined" (symbol-name theme))) | ||
| 1140 | (let ((settings (get theme 'theme-settings))) | 1131 | (let ((settings (get theme 'theme-settings))) |
| 1141 | (if (and (not (eq theme 'user)) (null settings)) | ||
| 1142 | (error "No theme settings defined in %s." (symbol-name theme))) | ||
| 1143 | (dolist (s settings) | 1132 | (dolist (s settings) |
| 1144 | (let* ((prop (car s)) | 1133 | (let* ((prop (car s)) |
| 1145 | (symbol (cadr s)) | 1134 | (symbol (cadr s)) |
| @@ -1147,29 +1136,58 @@ settings. Theme settings are set using `load-theme'." | |||
| 1147 | (put symbol prop (cons (cddr s) (assq-delete-all theme spec-list))) | 1136 | (put symbol prop (cons (cddr s) (assq-delete-all theme spec-list))) |
| 1148 | (if (eq prop 'theme-value) | 1137 | (if (eq prop 'theme-value) |
| 1149 | (custom-theme-recalc-variable symbol) | 1138 | (custom-theme-recalc-variable symbol) |
| 1150 | (if (facep symbol) | 1139 | (custom-theme-recalc-face symbol))))) |
| 1151 | (custom-theme-recalc-face symbol)))))) | ||
| 1152 | (setq custom-enabled-themes | ||
| 1153 | (cons theme (delq theme custom-enabled-themes))) | ||
| 1154 | ;; `user' must always be the highest-precedence enabled theme. | ||
| 1155 | (unless (eq theme 'user) | 1140 | (unless (eq theme 'user) |
| 1156 | (enable-theme 'user))) | 1141 | (setq custom-enabled-themes |
| 1142 | (cons theme (delq theme custom-enabled-themes))) | ||
| 1143 | (unless custom-enabling-themes | ||
| 1144 | (enable-theme 'user)))) | ||
| 1145 | |||
| 1146 | (defcustom custom-enabled-themes nil | ||
| 1147 | "List of enabled Custom Themes, highest precedence first. | ||
| 1148 | |||
| 1149 | This does not include the `user' theme, which is set by Customize, | ||
| 1150 | and always takes precedence over other Custom Themes." | ||
| 1151 | :group 'customize | ||
| 1152 | :type '(repeat symbol) | ||
| 1153 | :set (lambda (symbol themes) | ||
| 1154 | ;; Avoid an infinite loop when custom-enabled-themes is | ||
| 1155 | ;; defined in a theme (e.g. `user'). Enabling the theme sets | ||
| 1156 | ;; custom-enabled-themes, which enables the theme... | ||
| 1157 | (unless custom-enabling-themes | ||
| 1158 | (let ((custom-enabling-themes t)) | ||
| 1159 | (setq themes (delq 'user (delete-dups themes))) | ||
| 1160 | (if (boundp symbol) | ||
| 1161 | (dolist (theme (symbol-value symbol)) | ||
| 1162 | (if (not (memq theme themes)) | ||
| 1163 | (disable-theme theme)))) | ||
| 1164 | (dolist (theme (reverse themes)) | ||
| 1165 | (if (or (custom-theme-loaded-p theme) (eq theme 'user)) | ||
| 1166 | (enable-theme theme) | ||
| 1167 | (load-theme theme))) | ||
| 1168 | (enable-theme 'user) | ||
| 1169 | (custom-set-default symbol themes))))) | ||
| 1170 | |||
| 1171 | (defun custom-theme-enabled-p (theme) | ||
| 1172 | "Return non-nil if THEME is enabled." | ||
| 1173 | (memq theme custom-enabled-themes)) | ||
| 1157 | 1174 | ||
| 1158 | (defun disable-theme (theme) | 1175 | (defun disable-theme (theme) |
| 1159 | "Disable all variable and face settings defined by THEME. | 1176 | "Disable all variable and face settings defined by THEME. |
| 1160 | See `custom-known-themes' for a list of known themes." | 1177 | See `custom-enabled-themes' for a list of enabled themes." |
| 1161 | (interactive "SDisable Custom theme: ") | 1178 | (interactive "SDisable Custom theme: ") |
| 1162 | (let ((settings (get theme 'theme-settings))) | 1179 | (when (memq theme custom-enabled-themes) |
| 1163 | (dolist (s settings) | 1180 | (let ((settings (get theme 'theme-settings))) |
| 1164 | (let* ((prop (car s)) | 1181 | (dolist (s settings) |
| 1165 | (symbol (cadr s)) | 1182 | (let* ((prop (car s)) |
| 1166 | (spec-list (get symbol prop))) | 1183 | (symbol (cadr s)) |
| 1167 | (put symbol prop (assq-delete-all theme spec-list)) | 1184 | (spec-list (get symbol prop))) |
| 1168 | (if (eq prop 'theme-value) | 1185 | (put symbol prop (assq-delete-all theme spec-list)) |
| 1169 | (custom-theme-recalc-variable symbol) | 1186 | (if (eq prop 'theme-value) |
| 1170 | (custom-theme-recalc-face symbol))))) | 1187 | (custom-theme-recalc-variable symbol) |
| 1171 | (setq custom-enabled-themes | 1188 | (custom-theme-recalc-face symbol))))) |
| 1172 | (delq theme custom-enabled-themes))) | 1189 | (setq custom-enabled-themes |
| 1190 | (delq theme custom-enabled-themes)))) | ||
| 1173 | 1191 | ||
| 1174 | (defun custom-theme-value (theme setting-list) | 1192 | (defun custom-theme-value (theme setting-list) |
| 1175 | "Determine the value specified for THEME according to SETTING-LIST. | 1193 | "Determine the value specified for THEME according to SETTING-LIST. |
| @@ -1217,9 +1235,10 @@ This function returns nil if no custom theme specifies a value for VARIABLE." | |||
| 1217 | 1235 | ||
| 1218 | (defun custom-theme-recalc-face (face) | 1236 | (defun custom-theme-recalc-face (face) |
| 1219 | "Set FACE according to currently enabled custom themes." | 1237 | "Set FACE according to currently enabled custom themes." |
| 1220 | (let ((theme-faces (reverse (get face 'theme-face)))) | 1238 | (if (facep face) |
| 1221 | (dolist (spec theme-faces) | 1239 | (let ((theme-faces (reverse (get face 'theme-face)))) |
| 1222 | (face-spec-set face (car (cddr spec)))))) | 1240 | (dolist (spec theme-faces) |
| 1241 | (face-spec-set face (car (cddr spec))))))) | ||
| 1223 | 1242 | ||
| 1224 | (defun custom-theme-reset-variables (theme &rest args) | 1243 | (defun custom-theme-reset-variables (theme &rest args) |
| 1225 | "Reset the specs in THEME of some variables to their values in other themes. | 1244 | "Reset the specs in THEME of some variables to their values in other themes. |
diff --git a/lisp/font-lock.el b/lisp/font-lock.el index de366997a93..7819a0e81cc 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el | |||
| @@ -1507,6 +1507,13 @@ Here each COMPILED is of the form (MATCHER HIGHLIGHT ...) as shown in the | |||
| 1507 | `font-lock-keywords' doc string. | 1507 | `font-lock-keywords' doc string. |
| 1508 | If REGEXP is non-nil, it means these keywords are used for | 1508 | If REGEXP is non-nil, it means these keywords are used for |
| 1509 | `font-lock-keywords' rather than for `font-lock-syntactic-keywords'." | 1509 | `font-lock-keywords' rather than for `font-lock-syntactic-keywords'." |
| 1510 | (if (not font-lock-set-defaults) | ||
| 1511 | ;; This should never happen. But some external packages sometimes | ||
| 1512 | ;; call font-lock in unexpected and incorrect ways. It's important to | ||
| 1513 | ;; stop processing at this point, otherwise we may end up changing the | ||
| 1514 | ;; global value of font-lock-keywords and break highlighting in many | ||
| 1515 | ;; other buffers. | ||
| 1516 | (error "Font-lock trying to use keywords before setting them up")) | ||
| 1510 | (if (eq (car-safe keywords) t) | 1517 | (if (eq (car-safe keywords) t) |
| 1511 | keywords | 1518 | keywords |
| 1512 | (setq keywords | 1519 | (setq keywords |
diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el index eb5ace956eb..16db1e25a9a 100644 --- a/lisp/jit-lock.el +++ b/lisp/jit-lock.el | |||
| @@ -65,7 +65,9 @@ Preserves the `buffer-modified-p' state of the current buffer." | |||
| 65 | :group 'font-lock) | 65 | :group 'font-lock) |
| 66 | 66 | ||
| 67 | (defcustom jit-lock-chunk-size 500 | 67 | (defcustom jit-lock-chunk-size 500 |
| 68 | "*Jit-lock chunks of this many characters, or smaller." | 68 | "*Jit-lock fontifies chunks of at most this many characters at a time. |
| 69 | |||
| 70 | This variable controls both display-time and stealth fontification." | ||
| 69 | :type 'integer | 71 | :type 'integer |
| 70 | :group 'jit-lock) | 72 | :group 'jit-lock) |
| 71 | 73 | ||
diff --git a/lisp/locate.el b/lisp/locate.el index 563300f6c03..9676c84f80c 100644 --- a/lisp/locate.el +++ b/lisp/locate.el | |||
| @@ -144,12 +144,12 @@ | |||
| 144 | 144 | ||
| 145 | (defcustom locate-fcodes-file nil | 145 | (defcustom locate-fcodes-file nil |
| 146 | "*File name for the database of file names." | 146 | "*File name for the database of file names." |
| 147 | :type '(choice file (const nil)) | 147 | :type '(choice (const :tag "None" nil) file) |
| 148 | :group 'locate) | 148 | :group 'locate) |
| 149 | 149 | ||
| 150 | (defcustom locate-header-face nil | 150 | (defcustom locate-header-face nil |
| 151 | "*Face used to highlight the locate header." | 151 | "*Face used to highlight the locate header." |
| 152 | :type '(choice face (const nil)) | 152 | :type '(choice (const :tag "None" nil) face) |
| 153 | :group 'locate) | 153 | :group 'locate) |
| 154 | 154 | ||
| 155 | ;;;###autoload | 155 | ;;;###autoload |
diff --git a/lisp/makefile.w32-in b/lisp/makefile.w32-in index 24acf0009c4..f9c33dbed79 100644 --- a/lisp/makefile.w32-in +++ b/lisp/makefile.w32-in | |||
| @@ -183,6 +183,9 @@ update-subdirs-SH: doit | |||
| 183 | 183 | ||
| 184 | updates: update-subdirs autoloads mh-autoloads finder-data custom-deps | 184 | updates: update-subdirs autoloads mh-autoloads finder-data custom-deps |
| 185 | 185 | ||
| 186 | # This is useful after "cvs up". | ||
| 187 | cvs-update: recompile autoloads finder-data custom-deps | ||
| 188 | |||
| 186 | # Update the AUTHORS file. | 189 | # Update the AUTHORS file. |
| 187 | 190 | ||
| 188 | update-authors: | 191 | update-authors: |
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index 74fd15a2c19..4f3d56f98c9 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog | |||
| @@ -1,3 +1,66 @@ | |||
| 1 | 2006-01-01 Bill Wohler <wohler@newt.com> | ||
| 2 | |||
| 3 | * mh-customize.el: Sync docstrings with manual for faces and sort | ||
| 4 | them alphabetically. | ||
| 5 | (mh-faces): Move below mh-hooks. | ||
| 6 | (mh-folder-faces, mh-index-faces, mh-letter-faces) | ||
| 7 | (mh-show-faces, mh-speed-faces): Delete. Organize faces like | ||
| 8 | hooks. | ||
| 9 | (mh-speed-update-interval): Fix group (mh-speedbar, not mh-speed). | ||
| 10 | (facemenu-unlisted-faces): Might as well ignore all MH-E faces. | ||
| 11 | (mh-folder-body-face, mh-folder-cur-msg-face) | ||
| 12 | (mh-folder-cur-msg-number-face, mh-folder-date-face) | ||
| 13 | (mh-folder-followup-face, mh-folder-msg-number-face) | ||
| 14 | (mh-folder-deleted-face, mh-folder-refiled-face) | ||
| 15 | (mh-folder-subject-face, mh-folder-address-face) | ||
| 16 | (mh-folder-scan-format-face, mh-folder-to-face) | ||
| 17 | (mh-index-folder-face, mh-show-cc-face, mh-show-date-face) | ||
| 18 | (mh-show-header-face, mh-show-pgg-good-face) | ||
| 19 | (mh-show-pgg-unknown-face, mh-show-pgg-bad-face) | ||
| 20 | (mh-show-to-face, mh-show-from-face, mh-show-subject-face): | ||
| 21 | Delete. | ||
| 22 | (mh-folder-cur-msg): Unused. Delete. | ||
| 23 | (mh-folder-address): Use defface; inherit from mh-folder-subject. | ||
| 24 | (mh-folder-body, mh-folder-cur-msg-number, mh-folder-date): | ||
| 25 | Inherit from mh-folder-msg-number. | ||
| 26 | (mh-folder-deleted): Use defface. Inherit from | ||
| 27 | mh-folder-msg-number. | ||
| 28 | (mh-folder-sent-to-me-hint): New face. Inherit from | ||
| 29 | mh-folder-date. | ||
| 30 | (mh-folder-sent-to-me-sender): Rename from mh-folder-scan-format. | ||
| 31 | Use defface. Inherit from mh-folder-followup. | ||
| 32 | (mh-show-xface): Inherit from mh-show-from and highlight. | ||
| 33 | (bw-face-generation, bw-toggle-faces) | ||
| 34 | (bw-new-face-to-old, bw-old-face-to-new): New (tempoarary) | ||
| 35 | variables, functions for toggling between old and new faces. | ||
| 36 | |||
| 37 | * mh-e.el (font-lock-auto-fontify, font-lock-defaults): Hide in | ||
| 38 | eval-when-compile. We should probably do this throughout. | ||
| 39 | (mh-scan-good-msg-regexp, mh-scan-deleted-msg-regexp) | ||
| 40 | (mh-scan-refiled-msg-regexp, mh-scan-cur-msg-number-regexp) | ||
| 41 | (mh-scan-date-regexp, mh-scan-rcpt-regexp, mh-scan-body-regexp) | ||
| 42 | (mh-scan-subject-regexp): Sync docstrings with manual | ||
| 43 | (mh-scan-format-regexp): Rename to | ||
| 44 | mh-scan-sent-to-me-sender-regexp. Drop date parenthesized | ||
| 45 | expression. Make expression more like the others (anchored at the | ||
| 46 | beginning of line). Sync docstrings with manual. | ||
| 47 | (mh-folder-font-lock-keywords): Use faces directly rather than | ||
| 48 | -face variables. Use mh-scan-sent-to-me-sender-regexp instead of | ||
| 49 | mh-scan-format-regexp, and within that expression, use faces | ||
| 50 | mh-folder-sent-to-me-hint and mh-folder-sent-to-me-sender instead | ||
| 51 | of mh-folder-date-face and mh-folder-scan-format-face which were | ||
| 52 | misleading. | ||
| 53 | |||
| 54 | * mh-mime.el (mh-mime-security-button-face): Use faces directly | ||
| 55 | rather than -face variables. | ||
| 56 | |||
| 57 | * mh-utils.el (mh-show-font-lock-keywords): Use faces directly | ||
| 58 | rather than -face variables. | ||
| 59 | (mh-face-foreground-compat, mh-face-background-compat): New macros. | ||
| 60 | (mh-face-display-function): Use mh-face-foreground-compat and | ||
| 61 | mh-face-background-compat to use inherited attributes of | ||
| 62 | mh-show-xface on Emacs 22 while still working on Emacs 21. | ||
| 63 | |||
| 1 | 2005-12-28 Bill Wohler <wohler@newt.com> | 64 | 2005-12-28 Bill Wohler <wohler@newt.com> |
| 2 | 65 | ||
| 3 | * mh-comp.el (mh-e-user-agent): Move here from simple.el. Use | 66 | * mh-comp.el (mh-e-user-agent): Move here from simple.el. Use |
diff --git a/lisp/mh-e/mh-customize.el b/lisp/mh-e/mh-customize.el index f5556bda2ba..edd6ee41b01 100644 --- a/lisp/mh-e/mh-customize.el +++ b/lisp/mh-e/mh-customize.el | |||
| @@ -204,57 +204,18 @@ and GNU mailutils." | |||
| 204 | :prefix "mh-" | 204 | :prefix "mh-" |
| 205 | :group 'mh-e) | 205 | :group 'mh-e) |
| 206 | 206 | ||
| 207 | (defgroup mh-faces nil | ||
| 208 | "Faces used in MH-E." | ||
| 209 | :link '(custom-manual "(mh-e)Top") | ||
| 210 | :prefix "mh-" | ||
| 211 | :group 'faces | ||
| 212 | :group 'mh-e) | ||
| 213 | |||
| 214 | (defgroup mh-hooks nil | 207 | (defgroup mh-hooks nil |
| 215 | "MH-E hooks." | 208 | "MH-E hooks." |
| 216 | :link '(custom-manual "(mh-e)Top") | 209 | :link '(custom-manual "(mh-e)Top") |
| 217 | :prefix "mh-" | 210 | :prefix "mh-" |
| 218 | :group 'mh-e) | 211 | :group 'mh-e) |
| 219 | 212 | ||
| 220 | 213 | (defgroup mh-faces nil | |
| 221 | 214 | "Faces used in MH-E." | |
| 222 | ;;; Faces | 215 | :link '(custom-manual "(mh-e)Top") |
| 223 | |||
| 224 | (defgroup mh-folder-faces nil | ||
| 225 | "Faces used in scan listing." | ||
| 226 | :link '(custom-manual "(mh-e)Folders") | ||
| 227 | :prefix "mh-" | ||
| 228 | :group 'mh-faces | ||
| 229 | :group 'mh-folder) | ||
| 230 | |||
| 231 | (defgroup mh-index-faces nil | ||
| 232 | "Faces used in searching." | ||
| 233 | :link '(custom-manual "(mh-e)Searching") | ||
| 234 | :prefix "mh-" | ||
| 235 | :group 'mh-faces | ||
| 236 | :group 'mh-index) | ||
| 237 | |||
| 238 | (defgroup mh-letter-faces nil | ||
| 239 | "Faces used in message drafts." | ||
| 240 | :link '(custom-manual "(mh-e)Editing Drafts") | ||
| 241 | :prefix "mh-" | ||
| 242 | :group 'mh-faces | ||
| 243 | :group 'mh-letter) | ||
| 244 | |||
| 245 | (defgroup mh-show-faces nil | ||
| 246 | "Faces used in message display." | ||
| 247 | :link '(custom-manual "(mh-e)Reading Mail") | ||
| 248 | :prefix "mh-" | ||
| 249 | :group 'mh-faces | ||
| 250 | :group 'mh-show) | ||
| 251 | |||
| 252 | (defgroup mh-speed-faces nil | ||
| 253 | "Faces used in speedbar." | ||
| 254 | :link '(custom-manual "(mh-e)Speedbar") | ||
| 255 | :prefix "mh-" | 216 | :prefix "mh-" |
| 256 | :group 'mh-faces | 217 | :group 'faces |
| 257 | :group 'mh-speed) | 218 | :group 'mh-e) |
| 258 | 219 | ||
| 259 | 220 | ||
| 260 | 221 | ||
| @@ -1883,13 +1844,13 @@ lines you'd like to see." | |||
| 1883 | 1844 | ||
| 1884 | 1845 | ||
| 1885 | 1846 | ||
| 1886 | ;;; The Speedbar (:group 'mh-speed) | 1847 | ;;; The Speedbar (:group 'mh-speedbar) |
| 1887 | 1848 | ||
| 1888 | (defcustom mh-speed-update-interval 60 | 1849 | (defcustom mh-speed-update-interval 60 |
| 1889 | "Time between speedbar updates in seconds. | 1850 | "Time between speedbar updates in seconds. |
| 1890 | Set to 0 to disable automatic update." | 1851 | Set to 0 to disable automatic update." |
| 1891 | :type 'integer | 1852 | :type 'integer |
| 1892 | :group 'mh-speed) | 1853 | :group 'mh-speedbar) |
| 1893 | 1854 | ||
| 1894 | 1855 | ||
| 1895 | 1856 | ||
| @@ -2526,81 +2487,42 @@ sequence." | |||
| 2526 | 2487 | ||
| 2527 | 2488 | ||
| 2528 | 2489 | ||
| 2529 | ;;; Faces (:group 'mh-*-faces + group where faces described) | 2490 | ;;; Faces (:group 'mh-faces + group where faces described) |
| 2530 | 2491 | ||
| 2531 | 2492 | (if (boundp 'facemenu-unlisted-faces) | |
| 2493 | (add-to-list 'facemenu-unlisted-faces "^mh-")) | ||
| 2532 | 2494 | ||
| 2533 | ;;; Faces Used in Scan Listing (:group 'mh-folder-faces) | 2495 | (defface mh-folder-address '((t (:inherit mh-folder-subject))) |
| 2496 | "Recipient face." | ||
| 2497 | :group 'mh-faces | ||
| 2498 | :group 'mh-folder) | ||
| 2534 | 2499 | ||
| 2535 | (defvar mh-folder-body-face 'mh-folder-body | ||
| 2536 | "Face used to highlight body text in MH-Folder buffers.") | ||
| 2537 | (defface mh-folder-body | 2500 | (defface mh-folder-body |
| 2538 | (mh-defface-compat | 2501 | '((((class color)) |
| 2539 | '((((class color) (min-colors 88) (background light)) | 2502 | (:inherit mh-folder-msg-number)) |
| 2540 | (:foreground "RosyBrown")) | 2503 | (t |
| 2541 | (((class color) (min-colors 88) (background dark)) | 2504 | (:inherit mh-folder-msg-number :italic t))) |
| 2542 | (:foreground "LightSalmon")) | 2505 | "Body text face." |
| 2543 | (((class color)) | 2506 | :group 'mh-faces |
| 2544 | (:foreground "green")) | 2507 | :group 'mh-folder) |
| 2545 | (((class grayscale) (background light)) | ||
| 2546 | (:foreground "DimGray" :italic t)) | ||
| 2547 | (((class grayscale) (background dark)) | ||
| 2548 | (:foreground "LightGray" :italic t)) | ||
| 2549 | (t | ||
| 2550 | (:italic t)))) | ||
| 2551 | "Face used to highlight body text in MH-Folder buffers." | ||
| 2552 | :group 'mh-folder-faces) | ||
| 2553 | |||
| 2554 | (defvar mh-folder-cur-msg-face 'mh-folder-cur-msg | ||
| 2555 | "Face used for the current message line in MH-Folder buffers.") | ||
| 2556 | (defface mh-folder-cur-msg | ||
| 2557 | (mh-defface-compat | ||
| 2558 | '((((class color) (min-colors 88) (background light)) | ||
| 2559 | (:background "LightGreen") ;Use this for solid background colour | ||
| 2560 | ;; (:underline t) ;Use this for underlining | ||
| 2561 | ) | ||
| 2562 | (((class color) (min-colors 88) (background dark)) | ||
| 2563 | (:background "DarkOliveGreen4")) | ||
| 2564 | (((class color)) | ||
| 2565 | (:background "LightGreen")) | ||
| 2566 | (t | ||
| 2567 | (:underline t)))) | ||
| 2568 | "Face used for the current message line in MH-Folder buffers." | ||
| 2569 | :group 'mh-folder-faces) | ||
| 2570 | 2508 | ||
| 2571 | (defvar mh-folder-cur-msg-number-face 'mh-folder-cur-msg-number | ||
| 2572 | "Face used to highlight the current message in MH-Folder buffers.") | ||
| 2573 | (defface mh-folder-cur-msg-number | 2509 | (defface mh-folder-cur-msg-number |
| 2574 | (mh-defface-compat | 2510 | '((t |
| 2575 | '((((class color) (min-colors 88) (background light)) | 2511 | (:inherit mh-folder-msg-number :bold t))) |
| 2576 | (:foreground "Purple")) | 2512 | "Current message number face." |
| 2577 | (((class color) (min-colors 88) (background dark)) | 2513 | :group 'mh-faces |
| 2578 | (:foreground "Cyan")) | 2514 | :group 'mh-folder) |
| 2579 | (((class color)) | ||
| 2580 | (:foreground "cyan" :weight bold)) | ||
| 2581 | (((class grayscale) (background light)) | ||
| 2582 | (:foreground "LightGray" :bold t)) | ||
| 2583 | (((class grayscale) (background dark)) | ||
| 2584 | (:foreground "DimGray" :bold t)) | ||
| 2585 | (t | ||
| 2586 | (:bold t)))) | ||
| 2587 | "Face used to highlight the current message in MH-Folder buffers." | ||
| 2588 | :group 'mh-folder-faces) | ||
| 2589 | 2515 | ||
| 2590 | (defvar mh-folder-date-face 'mh-folder-date | 2516 | (defface mh-folder-date '((t (:inherit mh-folder-msg-number))) |
| 2591 | "Face used to highlight the date in MH-Folder buffers.") | 2517 | "Date face." |
| 2592 | (defface mh-folder-date | 2518 | :group 'mh-faces |
| 2593 | '((((class color) (background light)) | 2519 | :group 'mh-folder) |
| 2594 | (:foreground "snow4")) | 2520 | |
| 2595 | (((class color) (background dark)) | 2521 | (defface mh-folder-deleted '((t (:inherit mh-folder-msg-number))) |
| 2596 | (:foreground "snow3")) | 2522 | "Deleted message face." |
| 2597 | (t | 2523 | :group 'mh-faces |
| 2598 | (:bold t))) | 2524 | :group 'mh-folder) |
| 2599 | "Face used to highlight the date in MH-Folder buffers." | ||
| 2600 | :group 'mh-folder-faces) | ||
| 2601 | 2525 | ||
| 2602 | (defvar mh-folder-followup-face 'mh-folder-followup | ||
| 2603 | "Face used to highlight Re: subject text in MH-Folder buffers.") | ||
| 2604 | (defface mh-folder-followup | 2526 | (defface mh-folder-followup |
| 2605 | '((((class color) (background light)) | 2527 | '((((class color) (background light)) |
| 2606 | (:foreground "blue3")) | 2528 | (:foreground "blue3")) |
| @@ -2608,27 +2530,19 @@ sequence." | |||
| 2608 | (:foreground "LightGoldenRod")) | 2530 | (:foreground "LightGoldenRod")) |
| 2609 | (t | 2531 | (t |
| 2610 | (:bold t))) | 2532 | (:bold t))) |
| 2611 | "Face used to highlight Re: subject text in MH-Folder buffers." | 2533 | "\"Re:\" face." |
| 2612 | :group 'mh-folder-faces) | 2534 | :group 'mh-faces |
| 2535 | :group 'mh-folder) | ||
| 2613 | 2536 | ||
| 2614 | (defvar mh-folder-msg-number-face 'mh-folder-msg-number | ||
| 2615 | "Face used to highlight the message number in MH-Folder buffers.") | ||
| 2616 | (defface mh-folder-msg-number | 2537 | (defface mh-folder-msg-number |
| 2617 | '((((class color) (background light)) | 2538 | '((((class color) (background light)) |
| 2618 | (:foreground "snow4")) | 2539 | (:foreground "snow4")) |
| 2619 | (((class color) (background dark)) | 2540 | (((class color) (background dark)) |
| 2620 | (:foreground "snow3")) | 2541 | (:foreground "snow3"))) |
| 2621 | (t | 2542 | "Message number face." |
| 2622 | (:bold t))) | 2543 | :group 'mh-faces |
| 2623 | "Face used to highlight the message number in MH-Folder buffers." | 2544 | :group 'mh-folder) |
| 2624 | :group 'mh-folder-faces) | ||
| 2625 | |||
| 2626 | (defvar mh-folder-deleted-face 'mh-folder-deleted | ||
| 2627 | "Face used to highlight deleted messages in MH-Folder buffers.") | ||
| 2628 | (copy-face 'mh-folder-msg-number 'mh-folder-deleted) | ||
| 2629 | 2545 | ||
| 2630 | (defvar mh-folder-refiled-face 'mh-folder-refiled | ||
| 2631 | "Face used to highlight refiled messages in MH-Folder buffers.") | ||
| 2632 | (defface mh-folder-refiled | 2546 | (defface mh-folder-refiled |
| 2633 | (mh-defface-compat | 2547 | (mh-defface-compat |
| 2634 | '((((class color) (min-colors 88) (background light)) | 2548 | '((((class color) (min-colors 88) (background light)) |
| @@ -2643,13 +2557,26 @@ sequence." | |||
| 2643 | (:foreground "DimGray" :bold t :italic t)) | 2557 | (:foreground "DimGray" :bold t :italic t)) |
| 2644 | (t | 2558 | (t |
| 2645 | (:bold t :italic t)))) | 2559 | (:bold t :italic t)))) |
| 2646 | "Face used to highlight refiled messages in MH-Folder buffers." | 2560 | "Refiled message face." |
| 2647 | :group 'mh-folder-faces) | 2561 | :group 'mh-faces |
| 2562 | :group 'mh-folder) | ||
| 2563 | |||
| 2564 | (defface mh-folder-sent-to-me-hint '((t (:inherit mh-folder-date))) | ||
| 2565 | "Fontification hint face in messages sent directly to us. | ||
| 2566 | The detection of messages sent to us is governed by the scan | ||
| 2567 | format `mh-scan-format-nmh' and the regular expression | ||
| 2568 | `mh-scan-sent-to-me-sender-regexp'." | ||
| 2569 | :group 'mh-faces | ||
| 2570 | :group 'mh-folder) | ||
| 2571 | |||
| 2572 | (defface mh-folder-sent-to-me-sender '((t (:inherit mh-folder-followup))) | ||
| 2573 | "Sender face in messages sent directly to us. | ||
| 2574 | The detection of messages sent to us is governed by the scan | ||
| 2575 | format `mh-scan-format-nmh' and the regular expression | ||
| 2576 | `mh-scan-sent-to-me-sender-regexp'." | ||
| 2577 | :group 'mh-faces | ||
| 2578 | :group 'mh-folder) | ||
| 2648 | 2579 | ||
| 2649 | (defvar mh-folder-subject-face 'mh-folder-subject | ||
| 2650 | "Face used to highlight subject text in MH-Folder buffers.") | ||
| 2651 | (if (boundp 'facemenu-unlisted-faces) | ||
| 2652 | (add-to-list 'facemenu-unlisted-faces "^mh-folder")) | ||
| 2653 | (defface mh-folder-subject | 2580 | (defface mh-folder-subject |
| 2654 | '((((class color) (background light)) | 2581 | '((((class color) (background light)) |
| 2655 | (:foreground "blue4")) | 2582 | (:foreground "blue4")) |
| @@ -2657,8 +2584,9 @@ sequence." | |||
| 2657 | (:foreground "yellow")) | 2584 | (:foreground "yellow")) |
| 2658 | (t | 2585 | (t |
| 2659 | (:bold t))) | 2586 | (:bold t))) |
| 2660 | "Face used to highlight subject text in MH-Folder buffers." | 2587 | "Subject face." |
| 2661 | :group 'mh-folder-faces) | 2588 | :group 'mh-faces |
| 2589 | :group 'mh-folder) | ||
| 2662 | 2590 | ||
| 2663 | (defface mh-folder-tick | 2591 | (defface mh-folder-tick |
| 2664 | '((((class color) (background dark)) | 2592 | '((((class color) (background dark)) |
| @@ -2667,19 +2595,10 @@ sequence." | |||
| 2667 | (:background "#dddf7e")) | 2595 | (:background "#dddf7e")) |
| 2668 | (t | 2596 | (t |
| 2669 | (:underline t))) | 2597 | (:underline t))) |
| 2670 | "Face used to show ticked messages." | 2598 | "Ticked message face." |
| 2671 | :group 'mh-folder-faces) | 2599 | :group 'mh-faces |
| 2672 | 2600 | :group 'mh-folder) | |
| 2673 | (defvar mh-folder-address-face 'mh-folder-address | ||
| 2674 | "Face used to highlight the address in MH-Folder buffers.") | ||
| 2675 | (copy-face 'mh-folder-subject 'mh-folder-address) | ||
| 2676 | |||
| 2677 | (defvar mh-folder-scan-format-face 'mh-folder-scan-format | ||
| 2678 | "Face used to highlight `mh-scan-format-regexp' matches in MH-Folder buffers.") | ||
| 2679 | (copy-face 'mh-folder-followup 'mh-folder-scan-format) | ||
| 2680 | 2601 | ||
| 2681 | (defvar mh-folder-to-face 'mh-folder-to | ||
| 2682 | "Face used to highlight the To: string in MH-Folder buffers.") | ||
| 2683 | (defface mh-folder-to | 2602 | (defface mh-folder-to |
| 2684 | (mh-defface-compat | 2603 | (mh-defface-compat |
| 2685 | '((((class color) (min-colors 88) (background light)) | 2604 | '((((class color) (min-colors 88) (background light)) |
| @@ -2694,15 +2613,10 @@ sequence." | |||
| 2694 | (:foreground "LightGray" :italic t)) | 2613 | (:foreground "LightGray" :italic t)) |
| 2695 | (t | 2614 | (t |
| 2696 | (:italic t)))) | 2615 | (:italic t)))) |
| 2697 | "Face used to highlight the To: string in MH-Folder buffers." | 2616 | "\"To:\" face." |
| 2698 | :group 'mh-folder-faces) | 2617 | :group 'mh-faces |
| 2699 | 2618 | :group 'mh-folder) | |
| 2700 | |||
| 2701 | |||
| 2702 | ;;; Faces Used in Searching (:group 'mh-index-faces) | ||
| 2703 | 2619 | ||
| 2704 | (defvar mh-index-folder-face 'mh-index-folder | ||
| 2705 | "Face used to highlight folders in MH-Index buffers.") | ||
| 2706 | (defface mh-index-folder | 2620 | (defface mh-index-folder |
| 2707 | '((((class color) (background light)) | 2621 | '((((class color) (background light)) |
| 2708 | (:foreground "dark green" :bold t)) | 2622 | (:foreground "dark green" :bold t)) |
| @@ -2710,12 +2624,9 @@ sequence." | |||
| 2710 | (:foreground "indian red" :bold t)) | 2624 | (:foreground "indian red" :bold t)) |
| 2711 | (t | 2625 | (t |
| 2712 | (:bold t))) | 2626 | (:bold t))) |
| 2713 | "Face used to highlight folders in MH-Index buffers." | 2627 | "Folder heading face in MH-Folder buffers created by searches." |
| 2714 | :group 'mh-index-faces) | 2628 | :group 'mh-faces |
| 2715 | 2629 | :group 'mh-index) | |
| 2716 | |||
| 2717 | |||
| 2718 | ;;; Faces Used in Message Drafts (:group 'mh-letter-faces) | ||
| 2719 | 2630 | ||
| 2720 | (defface mh-letter-header-field | 2631 | (defface mh-letter-header-field |
| 2721 | '((((class color) (background light)) | 2632 | '((((class color) (background light)) |
| @@ -2724,15 +2635,10 @@ sequence." | |||
| 2724 | (:background "gray10")) | 2635 | (:background "gray10")) |
| 2725 | (t | 2636 | (t |
| 2726 | (:bold t))) | 2637 | (:bold t))) |
| 2727 | "Face used to display header fields in draft buffers." | 2638 | "Editable header field value face in draft buffers." |
| 2728 | :group 'mh-letter-faces) | 2639 | :group 'mh-faces |
| 2729 | 2640 | :group 'mh-letter) | |
| 2730 | |||
| 2731 | |||
| 2732 | ;;; Faces Used in Message Display (:group 'mh-show-faces) | ||
| 2733 | 2641 | ||
| 2734 | (defvar mh-show-cc-face 'mh-show-cc | ||
| 2735 | "Face used to highlight cc: header fields.") | ||
| 2736 | (defface mh-show-cc | 2642 | (defface mh-show-cc |
| 2737 | (mh-defface-compat | 2643 | (mh-defface-compat |
| 2738 | '((((class color) (min-colors 88) (background light)) | 2644 | '((((class color) (min-colors 88) (background light)) |
| @@ -2747,11 +2653,10 @@ sequence." | |||
| 2747 | (:foreground "DimGray" :bold t :italic t)) | 2653 | (:foreground "DimGray" :bold t :italic t)) |
| 2748 | (t | 2654 | (t |
| 2749 | (:bold t :italic t)))) | 2655 | (:bold t :italic t)))) |
| 2750 | "Face used to highlight cc: header fields." | 2656 | "Face used to highlight \"cc:\" header fields." |
| 2751 | :group 'mh-show-faces) | 2657 | :group 'mh-faces |
| 2658 | :group 'mh-show) | ||
| 2752 | 2659 | ||
| 2753 | (defvar mh-show-date-face 'mh-show-date | ||
| 2754 | "Face used to highlight the Date: header field.") | ||
| 2755 | (defface mh-show-date | 2660 | (defface mh-show-date |
| 2756 | (mh-defface-compat | 2661 | (mh-defface-compat |
| 2757 | '((((class color) (min-colors 88) (background light)) | 2662 | '((((class color) (min-colors 88) (background light)) |
| @@ -2766,11 +2671,21 @@ sequence." | |||
| 2766 | (:foreground "DimGray" :bold t)) | 2671 | (:foreground "DimGray" :bold t)) |
| 2767 | (t | 2672 | (t |
| 2768 | (:bold t :underline t)))) | 2673 | (:bold t :underline t)))) |
| 2769 | "Face used to highlight the Date: header field." | 2674 | "Face used to highlight \"Date:\" header fields." |
| 2770 | :group 'mh-show-faces) | 2675 | :group 'mh-faces |
| 2676 | :group 'mh-show) | ||
| 2677 | |||
| 2678 | (defface mh-show-from | ||
| 2679 | '((((class color) (background light)) | ||
| 2680 | (:foreground "red3")) | ||
| 2681 | (((class color) (background dark)) | ||
| 2682 | (:foreground "cyan")) | ||
| 2683 | (t | ||
| 2684 | (:bold t))) | ||
| 2685 | "Face used to highlight \"From:\" header fields." | ||
| 2686 | :group 'mh-faces | ||
| 2687 | :group 'mh-show) | ||
| 2771 | 2688 | ||
| 2772 | (defvar mh-show-header-face 'mh-show-header | ||
| 2773 | "Face used to deemphasize unspecified header fields.") | ||
| 2774 | (defface mh-show-header | 2689 | (defface mh-show-header |
| 2775 | (mh-defface-compat | 2690 | (mh-defface-compat |
| 2776 | '((((class color) (min-colors 88) (background light)) | 2691 | '((((class color) (min-colors 88) (background light)) |
| @@ -2785,46 +2700,35 @@ sequence." | |||
| 2785 | (:foreground "LightGray" :italic t)) | 2700 | (:foreground "LightGray" :italic t)) |
| 2786 | (t | 2701 | (t |
| 2787 | (:italic t)))) | 2702 | (:italic t)))) |
| 2788 | "Face used to deemphasize unspecified header fields." | 2703 | "Face used to deemphasize less interesting header fields." |
| 2789 | :group 'mh-show-faces) | 2704 | :group 'mh-faces |
| 2705 | :group 'mh-show) | ||
| 2790 | 2706 | ||
| 2791 | (defvar mh-show-pgg-good-face 'mh-show-pgg-good | 2707 | (defface mh-show-pgg-bad '((t (:bold t :foreground "DeepPink1"))) |
| 2792 | "Face used to highlight a good PGG signature.") | 2708 | "Bad PGG signature face." |
| 2793 | (defface mh-show-pgg-good | 2709 | :group 'mh-faces |
| 2794 | '((t | 2710 | :group 'mh-show) |
| 2795 | (:bold t :foreground "LimeGreen"))) | ||
| 2796 | "Face used to highlight a good PGG signature." | ||
| 2797 | :group 'mh-show-faces) | ||
| 2798 | |||
| 2799 | (defvar mh-show-pgg-unknown-face 'mh-show-pgg-unknown | ||
| 2800 | "Face used to highlight a PGG signature whose status is unknown. | ||
| 2801 | This face is also used for a signature when the signer is | ||
| 2802 | untrusted.") | ||
| 2803 | (defface mh-show-pgg-unknown | ||
| 2804 | '((t | ||
| 2805 | (:bold t :foreground "DarkGoldenrod2"))) | ||
| 2806 | "Face used to highlight a PGG signature whose status is unknown. | ||
| 2807 | This face is also used for a signature when the signer is untrusted." | ||
| 2808 | :group 'mh-show-faces) | ||
| 2809 | |||
| 2810 | (defvar mh-show-pgg-bad-face 'mh-show-pgg-bad | ||
| 2811 | "Face used to highlight a bad PGG signature.") | ||
| 2812 | (defface mh-show-pgg-bad | ||
| 2813 | '((t | ||
| 2814 | (:bold t :foreground "DeepPink1"))) | ||
| 2815 | "Face used to highlight a bad PGG signature." | ||
| 2816 | :group 'mh-show-faces) | ||
| 2817 | 2711 | ||
| 2818 | (defface mh-show-signature | 2712 | (defface mh-show-pgg-good '((t (:bold t :foreground "LimeGreen"))) |
| 2819 | '((t | 2713 | "Good PGG signature face." |
| 2820 | (:italic t))) | 2714 | :group 'mh-faces |
| 2821 | "Face used to highlight the message signature." | 2715 | :group 'mh-show) |
| 2822 | :group 'mh-show-faces) | 2716 | |
| 2717 | (defface mh-show-pgg-unknown '((t (:bold t :foreground "DarkGoldenrod2"))) | ||
| 2718 | "Unknown or untrusted PGG signature face." | ||
| 2719 | :group 'mh-faces | ||
| 2720 | :group 'mh-show) | ||
| 2721 | |||
| 2722 | (defface mh-show-signature '((t (:italic t))) | ||
| 2723 | "Signature face." | ||
| 2724 | :group 'mh-faces | ||
| 2725 | :group 'mh-show) | ||
| 2726 | |||
| 2727 | (defface mh-show-subject '((t (:inherit mh-folder-subject))) | ||
| 2728 | "Face used to highlight \"Subject:\" header fields." | ||
| 2729 | :group 'mh-faces | ||
| 2730 | :group 'mh-show) | ||
| 2823 | 2731 | ||
| 2824 | (defvar mh-show-to-face 'mh-show-to | ||
| 2825 | "Face used to highlight the To: header field.") | ||
| 2826 | (if (boundp 'facemenu-unlisted-faces) | ||
| 2827 | (add-to-list 'facemenu-unlisted-faces "^mh-show")) | ||
| 2828 | (defface mh-show-to | 2732 | (defface mh-show-to |
| 2829 | '((((class color) (background light)) | 2733 | '((((class color) (background light)) |
| 2830 | (:foreground "SaddleBrown")) | 2734 | (:foreground "SaddleBrown")) |
| @@ -2835,43 +2739,31 @@ This face is also used for a signature when the signer is untrusted." | |||
| 2835 | (((class grayscale) (background dark)) | 2739 | (((class grayscale) (background dark)) |
| 2836 | (:foreground "LightGray" :underline t)) | 2740 | (:foreground "LightGray" :underline t)) |
| 2837 | (t (:underline t))) | 2741 | (t (:underline t))) |
| 2838 | "Face used to highlight the To: header field." | 2742 | "Face used to highlight \"To:\" header fields." |
| 2839 | :group 'mh-show-faces) | 2743 | :group 'mh-faces |
| 2840 | 2744 | :group 'mh-show) | |
| 2841 | (defvar mh-show-from-face 'mh-show-from | ||
| 2842 | "Face used to highlight the From: header field.") | ||
| 2843 | (defface mh-show-from | ||
| 2844 | '((((class color) (background light)) | ||
| 2845 | (:foreground "red3")) | ||
| 2846 | (((class color) (background dark)) | ||
| 2847 | (:foreground "cyan")) | ||
| 2848 | (t | ||
| 2849 | (:bold t))) | ||
| 2850 | "Face used to highlight the From: header field." | ||
| 2851 | :group 'mh-show-faces) | ||
| 2852 | |||
| 2853 | (defface mh-show-xface | ||
| 2854 | '((t | ||
| 2855 | (:foreground "black" :background "white"))) | ||
| 2856 | "Face used to display the X-Face image. | ||
| 2857 | The background and foreground is used in the image." | ||
| 2858 | :group 'mh-show-faces) | ||
| 2859 | |||
| 2860 | (defvar mh-show-subject-face 'mh-show-subject | ||
| 2861 | "Face used to highlight the Subject: header field.") | ||
| 2862 | (copy-face 'mh-folder-subject 'mh-show-subject) | ||
| 2863 | |||
| 2864 | |||
| 2865 | 2745 | ||
| 2866 | ;;; Faces Used in Speedbar (:group 'mh-speed-faces) | 2746 | (defface mh-show-xface '((t (:inherit (mh-show-from highlight)))) |
| 2747 | "X-Face image face. | ||
| 2748 | The background and foreground are used in the image." | ||
| 2749 | :group 'mh-faces | ||
| 2750 | :group 'mh-show) | ||
| 2867 | 2751 | ||
| 2868 | (defface mh-speedbar-folder | 2752 | (defface mh-speedbar-folder |
| 2869 | '((((class color) (background light)) | 2753 | '((((class color) (background light)) |
| 2870 | (:foreground "blue4")) | 2754 | (:foreground "blue4")) |
| 2871 | (((class color) (background dark)) | 2755 | (((class color) (background dark)) |
| 2872 | (:foreground "light blue"))) | 2756 | (:foreground "light blue"))) |
| 2873 | "Face used for folders in the speedbar buffer." | 2757 | "Basic folder face." |
| 2874 | :group 'mh-speed-faces) | 2758 | :group 'mh-faces |
| 2759 | :group 'mh-speedbar) | ||
| 2760 | |||
| 2761 | (defface mh-speedbar-folder-with-unseen-messages | ||
| 2762 | '((t | ||
| 2763 | (:inherit mh-speedbar-folder :bold t))) | ||
| 2764 | "Folder face when folder contains unread messages." | ||
| 2765 | :group 'mh-faces | ||
| 2766 | :group 'mh-speedbar) | ||
| 2875 | 2767 | ||
| 2876 | (defface mh-speedbar-selected-folder | 2768 | (defface mh-speedbar-selected-folder |
| 2877 | '((((class color) (background light)) | 2769 | '((((class color) (background light)) |
| @@ -2880,20 +2772,111 @@ The background and foreground is used in the image." | |||
| 2880 | (:foreground "red1" :underline t)) | 2772 | (:foreground "red1" :underline t)) |
| 2881 | (t | 2773 | (t |
| 2882 | (:underline t))) | 2774 | (:underline t))) |
| 2883 | "Face used for the current folder." | 2775 | "Selected folder face." |
| 2884 | :group 'mh-speed-faces) | 2776 | :group 'mh-faces |
| 2885 | 2777 | :group 'mh-speedbar) | |
| 2886 | (defface mh-speedbar-folder-with-unseen-messages | ||
| 2887 | '((t | ||
| 2888 | (:inherit mh-speedbar-folder :bold t))) | ||
| 2889 | "Face used for folders in the speedbar buffer which have unread messages." | ||
| 2890 | :group 'mh-speed-faces) | ||
| 2891 | 2778 | ||
| 2892 | (defface mh-speedbar-selected-folder-with-unseen-messages | 2779 | (defface mh-speedbar-selected-folder-with-unseen-messages |
| 2893 | '((t | 2780 | '((t |
| 2894 | (:inherit mh-speedbar-selected-folder :bold t))) | 2781 | (:inherit mh-speedbar-selected-folder :bold t))) |
| 2895 | "Face used for the current folder when it has unread messages." | 2782 | "Selected folder face when folder contains unread messages." |
| 2896 | :group 'mh-speed-faces) | 2783 | :group 'mh-faces |
| 2784 | :group 'mh-speedbar) | ||
| 2785 | |||
| 2786 | ;;; XXX Temporary function for comparing old and new faces. Delete | ||
| 2787 | ;;; when everybody is happy. | ||
| 2788 | (defvar bw-face-generation 'new) | ||
| 2789 | |||
| 2790 | (defun bw-toggle-faces () | ||
| 2791 | "Toggle between old and new faces." | ||
| 2792 | (interactive) | ||
| 2793 | (cond ((eq bw-face-generation 'new) | ||
| 2794 | (message "Going from new to old...") | ||
| 2795 | (bw-new-face-to-old) | ||
| 2796 | (message "Going from new to old...done") | ||
| 2797 | (setq bw-face-generation 'old)) | ||
| 2798 | ((eq bw-face-generation 'old) | ||
| 2799 | (message "Going from old to new...") | ||
| 2800 | (bw-old-face-to-new) | ||
| 2801 | (message "Going from old to new...done") | ||
| 2802 | (setq bw-face-generation 'new)))) | ||
| 2803 | |||
| 2804 | (defun bw-new-face-to-old () | ||
| 2805 | "Sets old faces." | ||
| 2806 | (face-spec-set 'mh-folder-body | ||
| 2807 | (mh-defface-compat | ||
| 2808 | '((((class color) (min-colors 88) (background light)) | ||
| 2809 | (:foreground "RosyBrown")) | ||
| 2810 | (((class color) (min-colors 88) (background dark)) | ||
| 2811 | (:foreground "LightSalmon")) | ||
| 2812 | (((class color)) | ||
| 2813 | (:foreground "green")) | ||
| 2814 | (((class grayscale) (background light)) | ||
| 2815 | (:foreground "DimGray" :italic t)) | ||
| 2816 | (((class grayscale) (background dark)) | ||
| 2817 | (:foreground "LightGray" :italic t)) | ||
| 2818 | (t | ||
| 2819 | (:italic t))))) | ||
| 2820 | |||
| 2821 | (face-spec-set 'mh-folder-msg-number | ||
| 2822 | '((((class color) (background light)) | ||
| 2823 | (:foreground "snow4")) | ||
| 2824 | (((class color) (background dark)) | ||
| 2825 | (:foreground "snow3")) | ||
| 2826 | (t | ||
| 2827 | (:bold t)))) | ||
| 2828 | |||
| 2829 | (face-spec-set 'mh-folder-cur-msg-number | ||
| 2830 | (mh-defface-compat | ||
| 2831 | '((((class color) (min-colors 88) (background light)) | ||
| 2832 | (:foreground "Purple")) | ||
| 2833 | (((class color) (min-colors 88) (background dark)) | ||
| 2834 | (:foreground "Cyan")) | ||
| 2835 | (((class color)) | ||
| 2836 | (:foreground "cyan" :weight bold)) | ||
| 2837 | (((class grayscale) (background light)) | ||
| 2838 | (:foreground "LightGray" :bold t)) | ||
| 2839 | (((class grayscale) (background dark)) | ||
| 2840 | (:foreground "DimGray" :bold t)) | ||
| 2841 | (t | ||
| 2842 | (:bold t))))) | ||
| 2843 | |||
| 2844 | (face-spec-set 'mh-folder-date | ||
| 2845 | '((((class color) (background light)) | ||
| 2846 | (:foreground "snow4")) | ||
| 2847 | (((class color) (background dark)) | ||
| 2848 | (:foreground "snow3")) | ||
| 2849 | (t | ||
| 2850 | (:bold t)))) | ||
| 2851 | |||
| 2852 | (face-spec-set 'mh-folder-msg-number | ||
| 2853 | '((((class color) (background light)) | ||
| 2854 | (:foreground "snow4")) | ||
| 2855 | (((class color) (background dark)) | ||
| 2856 | (:foreground "snow3")) | ||
| 2857 | (t | ||
| 2858 | (:bold t))))) | ||
| 2859 | |||
| 2860 | (defun bw-old-face-to-new () | ||
| 2861 | "Sets new faces." | ||
| 2862 | (face-spec-set 'mh-folder-body | ||
| 2863 | '((((class color)) | ||
| 2864 | (:inherit mh-folder-msg-number)) | ||
| 2865 | (t | ||
| 2866 | (:inherit mh-folder-msg-number :italic t)))) | ||
| 2867 | |||
| 2868 | (face-spec-set 'mh-folder-cur-msg-number | ||
| 2869 | '((t | ||
| 2870 | (:inherit mh-folder-msg-number :bold t)))) | ||
| 2871 | |||
| 2872 | (face-spec-set 'mh-folder-date '((t (:inherit mh-folder-msg-number)))) | ||
| 2873 | |||
| 2874 | (face-spec-set 'mh-folder-msg-number | ||
| 2875 | '((((class color) (background light)) | ||
| 2876 | (:foreground "snow4")) | ||
| 2877 | (((class color) (background dark)) | ||
| 2878 | (:foreground "snow3"))))) | ||
| 2879 | |||
| 2897 | 2880 | ||
| 2898 | ;; Local Variables: | 2881 | ;; Local Variables: |
| 2899 | ;; indent-tabs-mode: nil | 2882 | ;; indent-tabs-mode: nil |
diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el index 30034008cec..1deb465c1fe 100644 --- a/lisp/mh-e/mh-e.el +++ b/lisp/mh-e/mh-e.el | |||
| @@ -95,8 +95,9 @@ | |||
| 95 | (require 'easymenu) | 95 | (require 'easymenu) |
| 96 | 96 | ||
| 97 | ;; Shush the byte-compiler | 97 | ;; Shush the byte-compiler |
| 98 | (defvar font-lock-auto-fontify) | 98 | (eval-when-compile |
| 99 | (defvar font-lock-defaults) | 99 | (defvar font-lock-auto-fontify) |
| 100 | (defvar font-lock-defaults)) | ||
| 100 | 101 | ||
| 101 | (defconst mh-version "7.85+cvs" "Version number of MH-E.") | 102 | (defconst mh-version "7.85+cvs" "Version number of MH-E.") |
| 102 | 103 | ||
| @@ -194,7 +195,8 @@ matches the message number as in the default of | |||
| 194 | \"^\\\\( *[0-9]+\\\\)[^D^0-9]\". | 195 | \"^\\\\( *[0-9]+\\\\)[^D^0-9]\". |
| 195 | 196 | ||
| 196 | This expression includes the leading space within the parenthesis | 197 | This expression includes the leading space within the parenthesis |
| 197 | since it looks better to highlight it as well. This regular | 198 | since it looks better to highlight it as well. The highlighting |
| 199 | is done with the face `mh-folder-msg-number'. This regular | ||
| 198 | expression should be correct as it is needed by non-fontification | 200 | expression should be correct as it is needed by non-fontification |
| 199 | functions.") | 201 | functions.") |
| 200 | 202 | ||
| @@ -209,7 +211,8 @@ matches the message number as in the default of | |||
| 209 | \"^\\\\( *[0-9]+\\\\)D\". | 211 | \"^\\\\( *[0-9]+\\\\)D\". |
| 210 | 212 | ||
| 211 | This expression includes the leading space within the parenthesis | 213 | This expression includes the leading space within the parenthesis |
| 212 | since it looks better to highlight it as well. This regular | 214 | since it looks better to highlight it as well. The highlighting |
| 215 | is done with the face `mh-folder-deleted'. This regular | ||
| 213 | expression should be correct as it is needed by non-fontification | 216 | expression should be correct as it is needed by non-fontification |
| 214 | functions. See also `mh-note-deleted'.") | 217 | functions. See also `mh-note-deleted'.") |
| 215 | 218 | ||
| @@ -224,7 +227,8 @@ matches the message number as in the default of | |||
| 224 | \"^\\\\( *[0-9]+\\\\)\\\\^\". | 227 | \"^\\\\( *[0-9]+\\\\)\\\\^\". |
| 225 | 228 | ||
| 226 | This expression includes the leading space within the parenthesis | 229 | This expression includes the leading space within the parenthesis |
| 227 | since it looks better to highlight it as well. This regular | 230 | since it looks better to highlight it as well. The highlighting |
| 231 | is done with the face `mh-folder-refiled'. This regular | ||
| 228 | expression should be correct as it is needed by non-fontification | 232 | expression should be correct as it is needed by non-fontification |
| 229 | functions. See also `mh-note-refiled'.") | 233 | functions. See also `mh-note-refiled'.") |
| 230 | 234 | ||
| @@ -246,9 +250,10 @@ matches the message number as in the default of | |||
| 246 | 250 | ||
| 247 | This expression includes the leading space and current message | 251 | This expression includes the leading space and current message |
| 248 | marker \"+\" within the parenthesis since it looks better to | 252 | marker \"+\" within the parenthesis since it looks better to |
| 249 | highlight these items as well. This regular expression should be | 253 | highlight these items as well. The highlighting is done with the |
| 250 | correct as it is needed by non-fontification functions. See also | 254 | face `mh-folder-cur-msg-number'. This regular expression should |
| 251 | `mh-note-cur'.") | 255 | be correct as it is needed by non-fontification functions. See |
| 256 | also `mh-note-cur'.") | ||
| 252 | 257 | ||
| 253 | (defvar mh-scan-date-regexp "\\([0-9][0-9]/[0-9][0-9]\\)" | 258 | (defvar mh-scan-date-regexp "\\([0-9][0-9]/[0-9][0-9]\\)" |
| 254 | "This regular expression matches a valid date. | 259 | "This regular expression matches a valid date. |
| @@ -258,8 +263,8 @@ Note that the default setting of `mh-folder-font-lock-keywords' | |||
| 258 | expects this expression to contain only one parenthesized | 263 | expects this expression to contain only one parenthesized |
| 259 | expression which matches the date field as in the default of | 264 | expression which matches the date field as in the default of |
| 260 | \"\\\\([0-9][0-9]/[0-9][0-9]\\\\)\"}. If this regular expression | 265 | \"\\\\([0-9][0-9]/[0-9][0-9]\\\\)\"}. If this regular expression |
| 261 | is not correct, the date will not be highlighted. See also | 266 | is not correct, the date will not be highlighted with the face |
| 262 | `mh-scan-format-regexp'.") | 267 | `mh-folder-date'.") |
| 263 | 268 | ||
| 264 | (defvar mh-scan-rcpt-regexp "\\(To:\\)\\(..............\\)" | 269 | (defvar mh-scan-rcpt-regexp "\\(To:\\)\\(..............\\)" |
| 265 | "This regular expression specifies the recipient in messages you sent. | 270 | "This regular expression specifies the recipient in messages you sent. |
| @@ -270,8 +275,9 @@ The first is expected to match the \"To:\" that the default scan | |||
| 270 | format file generates. The second is expected to match the | 275 | format file generates. The second is expected to match the |
| 271 | recipient's name as in the default of | 276 | recipient's name as in the default of |
| 272 | \"\\\\(To:\\\\)\\\\(..............\\\\)\". If this regular | 277 | \"\\\\(To:\\\\)\\\\(..............\\\\)\". If this regular |
| 273 | expression is not correct, the recipient will not be | 278 | expression is not correct, the \"To:\" string will not be |
| 274 | highlighted.") | 279 | highlighted with the face `mh-folder-to' and the recipient will |
| 280 | not be highlighted with the face `mh-folder-address'") | ||
| 275 | 281 | ||
| 276 | (defvar mh-scan-body-regexp "\\(<<\\([^\n]+\\)?\\)" | 282 | (defvar mh-scan-body-regexp "\\(<<\\([^\n]+\\)?\\)" |
| 277 | "This regular expression matches the message body fragment. | 283 | "This regular expression matches the message body fragment. |
| @@ -280,7 +286,8 @@ Note that the default setting of `mh-folder-font-lock-keywords' | |||
| 280 | expects this expression to contain at least one parenthesized | 286 | expects this expression to contain at least one parenthesized |
| 281 | expression which matches the body text as in the default of | 287 | expression which matches the body text as in the default of |
| 282 | \"\\\\(<<\\\\([^\\n]+\\\\)?\\\\)\". If this regular expression is | 288 | \"\\\\(<<\\\\([^\\n]+\\\\)?\\\\)\". If this regular expression is |
| 283 | not correct, the body fragment will not be highlighted.") | 289 | not correct, the body fragment will not be highlighted with the |
| 290 | face `mh-folder-body'.") | ||
| 284 | 291 | ||
| 285 | (defvar mh-scan-subject-regexp | 292 | (defvar mh-scan-subject-regexp |
| 286 | "^ *[0-9]+........[ ]*...................\\([Rr][Ee]\\(\\[[0-9]+\\]\\)?:\\s-*\\)*\\([^<\n]*\\)" | 293 | "^ *[0-9]+........[ ]*...................\\([Rr][Ee]\\(\\[[0-9]+\\]\\)?:\\s-*\\)*\\([^<\n]*\\)" |
| @@ -289,12 +296,13 @@ not correct, the body fragment will not be highlighted.") | |||
| 289 | It must match from the beginning of the line. Note that the | 296 | It must match from the beginning of the line. Note that the |
| 290 | default setting of `mh-folder-font-lock-keywords' expects this | 297 | default setting of `mh-folder-font-lock-keywords' expects this |
| 291 | expression to contain at least three parenthesized expressions. | 298 | expression to contain at least three parenthesized expressions. |
| 292 | The first is expected to match the \"Re:\" string, if any. The | 299 | The first is expected to match the \"Re:\" string, if any, and is |
| 293 | second matches an optional bracketed number after \"Re:\", such as | 300 | highlighted with the face `mh-folder-followup'. The second |
| 294 | in \"Re[2]:\" (and is thus a sub-expression of the first | 301 | matches an optional bracketed number after \"Re:\", such as in |
| 295 | expression) and the third is expected to match the subject line | 302 | \"Re[2]:\" (and is thus a sub-expression of the first expression) |
| 296 | itself as in the default of (broken on multiple lines for | 303 | and the third is expected to match the subject line itself which |
| 297 | readability): | 304 | is highlighted with the face `mh-folder-subject'. For example, |
| 305 | the default (broken on multiple lines for readability) is | ||
| 298 | 306 | ||
| 299 | ^ *[0-9]+........[ ]*................... | 307 | ^ *[0-9]+........[ ]*................... |
| 300 | \\\\([Rr][Ee]\\\\(\\\\\\=[[0-9]+\\\\]\\\\)?:\\\\s-*\\\\)* | 308 | \\\\([Rr][Ee]\\\\(\\\\\\=[[0-9]+\\\\]\\\\)?:\\\\s-*\\\\)* |
| @@ -303,22 +311,22 @@ readability): | |||
| 303 | This regular expression should be correct as it is needed by | 311 | This regular expression should be correct as it is needed by |
| 304 | non-fontification functions.") | 312 | non-fontification functions.") |
| 305 | 313 | ||
| 306 | (defvar mh-scan-format-regexp | 314 | (defvar mh-scan-sent-to-me-sender-regexp |
| 307 | (concat "\\([bct]\\)" mh-scan-date-regexp " *\\(..................\\)") | 315 | "^ *[0-9]+.\\([bct]\\).....[ ]*\\(..................\\)" |
| 308 | "This regular expression matches the output of scan. | 316 | "This regular expression matches messages sent to us. |
| 309 | 317 | ||
| 310 | Note that the default setting of `mh-folder-font-lock-keywords' | 318 | Note that the default setting of `mh-folder-font-lock-keywords' |
| 311 | expects this expression to contain at least three parenthesized | 319 | expects this expression to contain at least two parenthesized |
| 312 | expressions. The first should match the fontification hint (see | 320 | expressions. The first should match the fontification hint (see |
| 313 | `mh-scan-format-nmh'), the second is found in | 321 | `mh-scan-format-nmh') and the second should match the user name |
| 314 | `mh-scan-date-regexp', and the third should match the user name | ||
| 315 | as in the default of | 322 | as in the default of |
| 316 | 323 | ||
| 317 | \"(concat \"\\\\([bct]\\\\)\" mh-scan-date-regexp | 324 | ^ *[0-9]+.\\\\([bct]\\\\).....[ ]*\\\\(..................\\\\) |
| 318 | \"*\\\\(..................\\\\)\")\". | ||
| 319 | 325 | ||
| 320 | If this regular expression is not correct, the notation hints and | 326 | If this regular expression is not correct, the notation hints |
| 321 | the sender will not be highlighted.") | 327 | will not be highlighted with the face |
| 328 | `mh-mh-folder-sent-to-me-hint' and the sender will not be | ||
| 329 | highlighted with the face `mh-folder-sent-to-me-sender'.") | ||
| 322 | 330 | ||
| 323 | 331 | ||
| 324 | 332 | ||
| @@ -326,31 +334,37 @@ the sender will not be highlighted.") | |||
| 326 | (list | 334 | (list |
| 327 | ;; Folders when displaying index buffer | 335 | ;; Folders when displaying index buffer |
| 328 | (list "^\\+.*" | 336 | (list "^\\+.*" |
| 329 | '(0 mh-index-folder-face)) | 337 | '(0 'mh-index-folder)) |
| 330 | ;; Marked for deletion | 338 | ;; Marked for deletion |
| 331 | (list (concat mh-scan-deleted-msg-regexp ".*") | 339 | (list (concat mh-scan-deleted-msg-regexp ".*") |
| 332 | '(0 mh-folder-deleted-face)) | 340 | '(0 'mh-folder-deleted)) |
| 333 | ;; Marked for refile | 341 | ;; Marked for refile |
| 334 | (list (concat mh-scan-refiled-msg-regexp ".*") | 342 | (list (concat mh-scan-refiled-msg-regexp ".*") |
| 335 | '(0 mh-folder-refiled-face)) | 343 | '(0 'mh-folder-refiled)) |
| 336 | ;;after subj | 344 | ;; After subject |
| 337 | (list mh-scan-body-regexp '(1 mh-folder-body-face nil t)) | 345 | (list mh-scan-body-regexp |
| 346 | '(1 'mh-folder-body nil t)) | ||
| 347 | ;; Subject | ||
| 338 | '(mh-folder-font-lock-subject | 348 | '(mh-folder-font-lock-subject |
| 339 | (1 mh-folder-followup-face append t) | 349 | (1 'mh-folder-followup append t) |
| 340 | (2 mh-folder-subject-face append t)) | 350 | (2 'mh-folder-subject append t)) |
| 341 | ;;current msg | 351 | ;; Current message number |
| 342 | (list mh-scan-cur-msg-number-regexp | 352 | (list mh-scan-cur-msg-number-regexp |
| 343 | '(1 mh-folder-cur-msg-number-face)) | 353 | '(1 'mh-folder-cur-msg-number)) |
| 354 | ;; Message number | ||
| 344 | (list mh-scan-good-msg-regexp | 355 | (list mh-scan-good-msg-regexp |
| 345 | '(1 mh-folder-msg-number-face)) ;; Msg number | 356 | '(1 'mh-folder-msg-number)) |
| 346 | (list mh-scan-date-regexp '(1 mh-folder-date-face)) ;; Date | 357 | ;; Date |
| 358 | (list mh-scan-date-regexp | ||
| 359 | '(1 'mh-folder-date)) | ||
| 360 | ;; Messages from me (To:) | ||
| 347 | (list mh-scan-rcpt-regexp | 361 | (list mh-scan-rcpt-regexp |
| 348 | '(1 mh-folder-to-face) ;; To: | 362 | '(1 'mh-folder-to) |
| 349 | '(2 mh-folder-address-face)) ;; address | 363 | '(2 'mh-folder-address)) |
| 350 | ;; scan font-lock name | 364 | ;; Messages to me |
| 351 | (list mh-scan-format-regexp | 365 | (list mh-scan-sent-to-me-sender-regexp |
| 352 | '(1 mh-folder-date-face) | 366 | '(1 'mh-folder-sent-to-me-hint) |
| 353 | '(3 mh-folder-scan-format-face))) | 367 | '(2 'mh-folder-sent-to-me-sender))) |
| 354 | "Keywords (regular expressions) used to fontify the MH-Folder buffer.") | 368 | "Keywords (regular expressions) used to fontify the MH-Folder buffer.") |
| 355 | 369 | ||
| 356 | (defvar mh-scan-cmd-note-width 1 | 370 | (defvar mh-scan-cmd-note-width 1 |
diff --git a/lisp/mh-e/mh-init.el b/lisp/mh-e/mh-init.el index 6b8feda8ccc..2818674afae 100644 --- a/lisp/mh-e/mh-init.el +++ b/lisp/mh-e/mh-init.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; mh-init.el --- MH-E initialization | 1 | ;;; mh-init.el --- MH-E initialization |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Peter S. Galbraith <psg@debian.org> | 5 | ;; Author: Peter S. Galbraith <psg@debian.org> |
| 6 | ;; Maintainer: Bill Wohler <wohler@newt.com> | 6 | ;; Maintainer: Bill Wohler <wohler@newt.com> |
| @@ -334,7 +334,7 @@ there. Otherwise, the images directory is added to the | |||
| 334 | 334 | ||
| 335 | (defun mh-defface-compat (spec) | 335 | (defun mh-defface-compat (spec) |
| 336 | "Convert SPEC for defface if necessary to run on older platforms. | 336 | "Convert SPEC for defface if necessary to run on older platforms. |
| 337 | See `defface' for the spec definition. | 337 | Modifies SPEC in place and returns it. See `defface' for the spec definition. |
| 338 | 338 | ||
| 339 | When `mh-min-colors-defined-flag' is nil, this function finds a | 339 | When `mh-min-colors-defined-flag' is nil, this function finds a |
| 340 | display with a single \"class\" requirement with a \"color\" | 340 | display with a single \"class\" requirement with a \"color\" |
| @@ -351,7 +351,8 @@ requirements." | |||
| 351 | (loop for entry in spec do | 351 | (loop for entry in spec do |
| 352 | (when (not (eq (car entry) t)) | 352 | (when (not (eq (car entry) t)) |
| 353 | (if (assoc 'min-colors (car entry)) | 353 | (if (assoc 'min-colors (car entry)) |
| 354 | (delq (assoc 'min-colors (car entry)) (car entry))))))) | 354 | (delq (assoc 'min-colors (car entry)) (car entry)))))) |
| 355 | spec) | ||
| 355 | 356 | ||
| 356 | (provide 'mh-init) | 357 | (provide 'mh-init) |
| 357 | 358 | ||
diff --git a/lisp/mh-e/mh-mime.el b/lisp/mh-e/mh-mime.el index 4338a94381b..c028890f6a1 100644 --- a/lisp/mh-e/mh-mime.el +++ b/lisp/mh-e/mh-mime.el | |||
| @@ -1407,14 +1407,15 @@ Parameter EL is unused." | |||
| 1407 | (defun mh-mime-security-button-face (info) | 1407 | (defun mh-mime-security-button-face (info) |
| 1408 | "Return the button face to use for encrypted/signed mail based on INFO." | 1408 | "Return the button face to use for encrypted/signed mail based on INFO." |
| 1409 | (cond ((string-match "OK" info) ;Decrypted mail | 1409 | (cond ((string-match "OK" info) ;Decrypted mail |
| 1410 | mh-show-pgg-good-face) | 1410 | 'mh-show-pgg-good) |
| 1411 | ((string-match "Failed" info) ;Decryption failed or signature invalid | 1411 | ((string-match "Failed" info) ;Decryption failed or signature invalid |
| 1412 | mh-show-pgg-bad-face) | 1412 | 'mh-show-pgg-bad) |
| 1413 | ((string-match "Undecided" info);Unprocessed mail | 1413 | ((string-match "Undecided" info);Unprocessed mail |
| 1414 | mh-show-pgg-unknown-face) | 1414 | 'mh-show-pgg-unknown) |
| 1415 | ((string-match "Untrusted" info);Key not trusted | 1415 | ((string-match "Untrusted" info);Key not trusted |
| 1416 | mh-show-pgg-unknown-face) | 1416 | 'mh-show-pgg-unknown) |
| 1417 | (t mh-show-pgg-good-face))) | 1417 | (t |
| 1418 | 'mh-show-pgg-good))) | ||
| 1418 | 1419 | ||
| 1419 | (defun mh-mime-security-press-button (handle) | 1420 | (defun mh-mime-security-press-button (handle) |
| 1420 | "Callback from security button for part HANDLE." | 1421 | "Callback from security button for part HANDLE." |
diff --git a/lisp/mh-e/mh-utils.el b/lisp/mh-e/mh-utils.el index b5d97a2be05..e008c93916e 100644 --- a/lisp/mh-e/mh-utils.el +++ b/lisp/mh-e/mh-utils.el | |||
| @@ -402,18 +402,30 @@ Argument LIMIT limits search." | |||
| 402 | (eval-and-compile | 402 | (eval-and-compile |
| 403 | ;; Otherwise byte-compilation fails on `mh-show-font-lock-keywords-with-cite' | 403 | ;; Otherwise byte-compilation fails on `mh-show-font-lock-keywords-with-cite' |
| 404 | (defvar mh-show-font-lock-keywords | 404 | (defvar mh-show-font-lock-keywords |
| 405 | '(("^\\(From:\\|Sender:\\)\\(.*\\)" (1 'default) (2 mh-show-from-face)) | 405 | '(("^\\(From:\\|Sender:\\)\\(.*\\)" |
| 406 | (mh-header-to-font-lock (0 'default) (1 mh-show-to-face)) | 406 | (1 'default) |
| 407 | (mh-header-cc-font-lock (0 'default) (1 mh-show-cc-face)) | 407 | (2 'mh-show-from)) |
| 408 | (mh-header-to-font-lock | ||
| 409 | (0 'default) | ||
| 410 | (1 'mh-show-to)) | ||
| 411 | (mh-header-cc-font-lock | ||
| 412 | (0 'default) | ||
| 413 | (1 'mh-show-cc)) | ||
| 408 | ("^\\(Reply-To:\\|Return-Path:\\)\\(.*\\)$" | 414 | ("^\\(Reply-To:\\|Return-Path:\\)\\(.*\\)$" |
| 409 | (1 'default) (2 mh-show-from-face)) | 415 | (1 'default) |
| 410 | (mh-header-subject-font-lock (0 'default) (1 mh-show-subject-face)) | 416 | (2 'mh-show-from)) |
| 417 | (mh-header-subject-font-lock | ||
| 418 | (0 'default) | ||
| 419 | (1 'mh-show-subject)) | ||
| 411 | ("^\\(Apparently-To:\\|Newsgroups:\\)\\(.*\\)" | 420 | ("^\\(Apparently-To:\\|Newsgroups:\\)\\(.*\\)" |
| 412 | (1 'default) (2 mh-show-cc-face)) | 421 | (1 'default) |
| 422 | (2 'mh-show-cc)) | ||
| 413 | ("^\\(In-reply-to\\|Date\\):\\(.*\\)$" | 423 | ("^\\(In-reply-to\\|Date\\):\\(.*\\)$" |
| 414 | (1 'default) (2 mh-show-date-face)) | 424 | (1 'default) |
| 415 | (mh-letter-header-font-lock (0 mh-show-header-face append t))) | 425 | (2 'mh-show-date)) |
| 416 | "Additional expressions to highlight in MH-show mode.")) | 426 | (mh-letter-header-font-lock |
| 427 | (0 'mh-show-header append t))) | ||
| 428 | "Additional expressions to highlight in MH-Show buffers.")) | ||
| 417 | 429 | ||
| 418 | (defvar mh-show-font-lock-keywords-with-cite | 430 | (defvar mh-show-font-lock-keywords-with-cite |
| 419 | (eval-when-compile | 431 | (eval-when-compile |
| @@ -432,11 +444,13 @@ Argument LIMIT limits search." | |||
| 432 | (beginning-of-line) (end-of-line) | 444 | (beginning-of-line) (end-of-line) |
| 433 | (2 font-lock-constant-face nil t) | 445 | (2 font-lock-constant-face nil t) |
| 434 | (4 font-lock-comment-face nil t))))))) | 446 | (4 font-lock-comment-face nil t))))))) |
| 435 | "Additional expressions to highlight in MH-show mode.") | 447 | "Additional expressions to highlight in MH-Show buffers.") |
| 436 | 448 | ||
| 437 | (defvar mh-letter-font-lock-keywords | 449 | (defvar mh-letter-font-lock-keywords |
| 438 | `(,@mh-show-font-lock-keywords-with-cite | 450 | `(,@mh-show-font-lock-keywords-with-cite |
| 439 | (mh-font-lock-field-data (1 'mh-letter-header-field prepend t)))) | 451 | (mh-font-lock-field-data |
| 452 | (1 'mh-letter-header-field prepend t))) | ||
| 453 | "Additional expressions to highlight in MH-Letter buffers.") | ||
| 440 | 454 | ||
| 441 | (defun mh-show-font-lock-fontify-region (beg end loudly) | 455 | (defun mh-show-font-lock-fontify-region (beg end loudly) |
| 442 | "Limit font-lock in `mh-show-mode' to the header. | 456 | "Limit font-lock in `mh-show-mode' to the header. |
| @@ -1229,6 +1243,32 @@ See also `mh-folder-mode'. | |||
| 1229 | 1243 | ||
| 1230 | (mh-do-in-xemacs (defvar default-enable-multibyte-characters)) | 1244 | (mh-do-in-xemacs (defvar default-enable-multibyte-characters)) |
| 1231 | 1245 | ||
| 1246 | (defmacro mh-face-foreground-compat (face &optional frame inherit) | ||
| 1247 | "Return the foreground color name of FACE, or nil if unspecified. | ||
| 1248 | See documentation for `face-foreground' for a description of the | ||
| 1249 | arguments FACE, FRAME, and INHERIT. | ||
| 1250 | |||
| 1251 | Calls `face-foreground' correctly in older environments. Versions | ||
| 1252 | of Emacs prior to version 22 lacked an INHERIT argument which | ||
| 1253 | when t tells `face-foreground' to consider an inherited value for | ||
| 1254 | the foreground if the face does not define one itself." | ||
| 1255 | (if (>= emacs-major-version 22) | ||
| 1256 | `(face-foreground ,face ,frame ,inherit) | ||
| 1257 | `(face-foreground ,face ,frame))) | ||
| 1258 | |||
| 1259 | (defmacro mh-face-background-compat (face &optional frame inherit) | ||
| 1260 | "Return the background color name of face, or nil if unspecified. | ||
| 1261 | See documentation for `back-foreground' for a description of the | ||
| 1262 | arguments FACE, FRAME, and INHERIT. | ||
| 1263 | |||
| 1264 | Calls `face-background' correctly in older environments. Versions | ||
| 1265 | of Emacs prior to version 22 lacked an INHERIT argument which | ||
| 1266 | when t tells `face-background' to consider an inherited value for | ||
| 1267 | the background if the face does not define one itself." | ||
| 1268 | (if (>= emacs-major-version 22) | ||
| 1269 | `(face-background ,face ,frame ,inherit) | ||
| 1270 | `(face-background ,face ,frame))) | ||
| 1271 | |||
| 1232 | (defun mh-face-display-function () | 1272 | (defun mh-face-display-function () |
| 1233 | "Display a Face, X-Face, or X-Image-URL header field. | 1273 | "Display a Face, X-Face, or X-Image-URL header field. |
| 1234 | If more than one of these are present, then the first one found | 1274 | If more than one of these are present, then the first one found |
| @@ -1259,9 +1299,11 @@ in this order is used." | |||
| 1259 | (mh-funcall-if-exists | 1299 | (mh-funcall-if-exists |
| 1260 | insert-image (create-image | 1300 | insert-image (create-image |
| 1261 | raw type t | 1301 | raw type t |
| 1262 | :foreground (face-foreground 'mh-show-xface) | 1302 | :foreground |
| 1263 | :background (face-background 'mh-show-xface)) | 1303 | (mh-face-foreground-compat 'mh-show-xface nil t) |
| 1264 | " "))) | 1304 | :background |
| 1305 | (mh-face-background-compat 'mh-show-xface nil t)) | ||
| 1306 | " "))) | ||
| 1265 | ;; XEmacs | 1307 | ;; XEmacs |
| 1266 | (mh-do-in-xemacs | 1308 | (mh-do-in-xemacs |
| 1267 | (cond | 1309 | (cond |
diff --git a/lisp/mouse.el b/lisp/mouse.el index 186fa438b35..ef655ba836f 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -355,14 +355,21 @@ This command must be bound to a mouse click." | |||
| 355 | (defun mouse-drag-window-above (window) | 355 | (defun mouse-drag-window-above (window) |
| 356 | "Return the (or a) window directly above WINDOW. | 356 | "Return the (or a) window directly above WINDOW. |
| 357 | That means one whose bottom edge is at the same height as WINDOW's top edge." | 357 | That means one whose bottom edge is at the same height as WINDOW's top edge." |
| 358 | (let ((top (nth 1 (window-edges window))) | 358 | (let ((start-top (nth 1 (window-edges window))) |
| 359 | (start-left (nth 0 (window-edges window))) | ||
| 360 | (start-right (nth 2 (window-edges window))) | ||
| 359 | (start-window window) | 361 | (start-window window) |
| 360 | above-window) | 362 | above-window) |
| 361 | (setq window (previous-window window 0)) | 363 | (setq window (previous-window window 0)) |
| 362 | (while (and (not above-window) (not (eq window start-window))) | 364 | (while (and (not above-window) (not (eq window start-window))) |
| 363 | (if (= (+ (window-height window) (nth 1 (window-edges window))) | 365 | (let ((left (nth 0 (window-edges window))) |
| 364 | top) | 366 | (right (nth 2 (window-edges window)))) |
| 365 | (setq above-window window)) | 367 | (when (and (= (+ (window-height window) (nth 1 (window-edges window))) |
| 368 | start-top) | ||
| 369 | (or (and (<= left start-left) (<= start-right right)) | ||
| 370 | (and (<= start-left left) (<= left start-right)) | ||
| 371 | (and (<= start-left right) (<= right start-right)))) | ||
| 372 | (setq above-window window))) | ||
| 366 | (setq window (previous-window window))) | 373 | (setq window (previous-window window))) |
| 367 | above-window)) | 374 | above-window)) |
| 368 | 375 | ||
| @@ -1025,7 +1032,11 @@ at the same position." | |||
| 1025 | (select-window original-window) | 1032 | (select-window original-window) |
| 1026 | (if (or (vectorp on-link) (stringp on-link)) | 1033 | (if (or (vectorp on-link) (stringp on-link)) |
| 1027 | (setq event (aref on-link 0)) | 1034 | (setq event (aref on-link 0)) |
| 1028 | (setcar event 'mouse-2))) | 1035 | (setcar event 'mouse-2) |
| 1036 | ;; If this mouse click has never been done by | ||
| 1037 | ;; the user, it doesn't have the necessary | ||
| 1038 | ;; property to be interpreted correctly. | ||
| 1039 | (put 'mouse-2 'event-kind 'mouse-click))) | ||
| 1029 | (push event unread-command-events)))) | 1040 | (push event unread-command-events)))) |
| 1030 | 1041 | ||
| 1031 | ;; Case where the end-event is not a cons cell (it's just a boring | 1042 | ;; Case where the end-event is not a cons cell (it's just a boring |
diff --git a/lisp/net/goto-addr.el b/lisp/net/goto-addr.el index 9925227619f..e1ae498923b 100644 --- a/lisp/net/goto-addr.el +++ b/lisp/net/goto-addr.el | |||
| @@ -129,7 +129,7 @@ A value of t means there is no limit--fontify regardless of the size." | |||
| 129 | 'goto-address-at-point) | 129 | 'goto-address-at-point) |
| 130 | (define-key m (kbd "C-c RET") 'goto-address-at-point) | 130 | (define-key m (kbd "C-c RET") 'goto-address-at-point) |
| 131 | m) | 131 | m) |
| 132 | "keymap to hold goto-addr's mouse key defs under highlighted URLs.") | 132 | "Keymap to hold goto-addr's mouse key defs under highlighted URLs.") |
| 133 | 133 | ||
| 134 | (defcustom goto-address-url-face 'bold | 134 | (defcustom goto-address-url-face 'bold |
| 135 | "Face to use for URLs." | 135 | "Face to use for URLs." |
| @@ -242,7 +242,8 @@ address. If no e-mail address found, return nil." | |||
| 242 | "Sets up goto-address functionality in the current buffer. | 242 | "Sets up goto-address functionality in the current buffer. |
| 243 | Allows user to use mouse/keyboard command to click to go to a URL | 243 | Allows user to use mouse/keyboard command to click to go to a URL |
| 244 | or to send e-mail. | 244 | or to send e-mail. |
| 245 | By default, goto-address binds to mouse-2 and C-c RET. | 245 | By default, goto-address binds `goto-address-at-point' to mouse-2 and C-c RET |
| 246 | only on URLs and e-mail addresses. | ||
| 246 | 247 | ||
| 247 | Also fontifies the buffer appropriately (see `goto-address-fontify-p' and | 248 | Also fontifies the buffer appropriately (see `goto-address-fontify-p' and |
| 248 | `goto-address-highlight-p' for more information)." | 249 | `goto-address-highlight-p' for more information)." |
diff --git a/lisp/net/webjump.el b/lisp/net/webjump.el index fc7b23ae1ba..4a3baea4f41 100644 --- a/lisp/net/webjump.el +++ b/lisp/net/webjump.el | |||
| @@ -72,104 +72,184 @@ | |||
| 72 | 72 | ||
| 73 | (defvar webjump-sample-sites | 73 | (defvar webjump-sample-sites |
| 74 | '( | 74 | '( |
| 75 | |||
| 76 | ;; FSF, not including Emacs-specific. | 75 | ;; FSF, not including Emacs-specific. |
| 77 | ("GNU Project FTP Archive" . | 76 | ("GNU Project FTP Archive" . |
| 77 | ;; GNU FTP Mirror List from http://www.gnu.org/order/ftp.html | ||
| 78 | [mirrors "ftp://ftp.gnu.org/pub/gnu/" | 78 | [mirrors "ftp://ftp.gnu.org/pub/gnu/" |
| 79 | ;; ASIA: | 79 | ;; United States |
| 80 | "ftp://ftp.cs.titech.ac.jp" | 80 | "ftp://mirrors.kernel.org/gnu" |
| 81 | "ftp://tron.um.u-tokyo.ac.jp/pub/GNU/prep" | 81 | "ftp://gatekeeper.dec.com/pub/GNU/" |
| 82 | "ftp://cair-archive.kaist.ac.kr/pub/gnu" | 82 | "ftp://ftp.keystealth.org/pub/gnu/" |
| 83 | "ftp://ftp.nectec.or.th/pub/mirrors/gnu" | 83 | "ftp://mirrors.usc.edu/pub/gnu/" |
| 84 | ;; AUSTRALIA: | 84 | "ftp://cudlug.cudenver.edu/pub/mirrors/ftp.gnu.org/" |
| 85 | "ftp://archie.au/gnu" | 85 | "ftp://ftp.cise.ufl.edu/pub/mirrors/GNU/" |
| 86 | "ftp://archie.oz/gnu" | 86 | "ftp://uiarchive.cso.uiuc.edu/pub/ftp/ftp.gnu.org/gnu/" |
| 87 | "ftp://archie.oz.au/gnu" | 87 | "ftp://gnu.cs.lewisu.edu/gnu/" |
| 88 | ;; AFRICA: | 88 | "ftp://ftp.in-span.net/pub/mirrors/ftp.gnu.org/" |
| 89 | "ftp://ftp.sun.ac.za/pub/gnu" | 89 | "ftp://gnu.ms.uky.edu/pub/mirrors/gnu/" |
| 90 | ;; MIDDLE-EAST: | 90 | "ftp://ftp.algx.net/pub/gnu/" |
| 91 | "ftp://ftp.technion.ac.il/pub/unsupported/gnu" | 91 | "ftp://aeneas.mit.edu/pub/gnu/" |
| 92 | ;; EUROPE: | 92 | "ftp://ftp.egr.msu.edu/pub/gnu/" |
| 93 | "ftp://irisa.irisa.fr/pub/gnu" | 93 | "ftp://ftp.wayne.edu/pub/gnu/" |
| 94 | "ftp://ftp.univ-lyon1.fr/pub/gnu" | 94 | "ftp://wuarchive.wustl.edu/mirrors/gnu/" |
| 95 | "ftp://ftp.mcc.ac.uk" | 95 | "ftp://gnu.teleglobe.net/ftp.gnu.org/" |
| 96 | "ftp://unix.hensa.ac.uk/mirrors/uunet/systems/gnu" | 96 | "ftp://ftp.cs.columbia.edu/archives/gnu/prep/" |
| 97 | "ftp://src.doc.ic.ac.uk/gnu" | 97 | "ftp://ftp.ece.cornell.edu/pub/mirrors/gnu/" |
| 98 | "ftp://ftp.ieunet.ie/pub/gnu" | 98 | "ftp://ftp.ibiblio.org/pub/mirrors/gnu/" |
| 99 | "ftp://ftp.eunet.ch" | 99 | "ftp://ftp.cis.ohio-state.edu/mirror/gnu/" |
| 100 | "ftp://nic.switch.ch/mirror/gnu" | 100 | "ftp://ftp.club.cc.cmu.edu/gnu/" |
| 101 | "ftp://ftp.informatik.rwth-aachen.de/pub/gnu" | 101 | "ftp://ftp.sunsite.utk.edu/pub/gnu/ftp/" |
| 102 | "ftp://ftp.informatik.tu-muenchen.de" | 102 | "ftp://thales.memphis.edu/pub/gnu/" |
| 103 | "ftp://gnu.wwc.edu" | ||
| 104 | "ftp://ftp.twtelecom.net/pub/GNU/" | ||
| 105 | ;; Africa | ||
| 106 | "ftp://ftp.sun.ac.za/mirrorsites/ftp.gnu.org" | ||
| 107 | ;; The Americas | ||
| 108 | "ftp://ftp.unicamp.br/pub/gnu/" | ||
| 109 | "ftp://master.softaplic.com.br/pub/gnu/" | ||
| 110 | "ftp://ftp.matrix.com.br/pub/gnu/" | ||
| 111 | "ftp://ftp.pucpr.br/gnu" | ||
| 112 | "ftp://ftp.linorg.usp.br/gnu" | ||
| 113 | "ftp://ftp.cs.ubc.ca/mirror2/gnu/" | ||
| 114 | "ftp://cs.ubishops.ca/pub/ftp.gnu.org/" | ||
| 115 | "ftp://ftp.inf.utfsm.cl/pub/gnu/" | ||
| 116 | "ftp://sunsite.ulatina.ac.cr/Mirrors/GNU/" | ||
| 117 | "ftp://www.gnu.unam.mx/pub/gnu/software/" | ||
| 118 | "ftp://gnu.cem.itesm.mx/pub/mirrors/gnu.org/" | ||
| 119 | "ftp://ftp.azc.uam.mx/mirrors/gnu/" | ||
| 120 | ;; Australia | ||
| 121 | "ftp://mirror.aarnet.edu.au/pub/gnu/" | ||
| 122 | "ftp://gnu.mirror.pacific.net.au/gnu/" | ||
| 123 | ;; Asia | ||
| 124 | "ftp://ftp.cs.cuhk.edu.hk/pub/gnu/gnu/" | ||
| 125 | "ftp://sunsite.ust.hk/pub/gnu/" | ||
| 126 | "ftp://ftp.gnupilgrims.org/pub/gnu" | ||
| 127 | "ftp://www.imtech.res.in/mirror/gnuftp/" | ||
| 128 | "ftp://kambing.vlsm.org/gnu" | ||
| 129 | "ftp://ftp.cs.huji.ac.il/mirror/GNU/" | ||
| 130 | "ftp://tron.um.u-tokyo.ac.jp/pub/GNU/" | ||
| 131 | "ftp://core.ring.gr.jp/pub/GNU/" | ||
| 132 | "ftp://ftp.ring.gr.jp/pub/GNU/" | ||
| 133 | "ftp://mirrors.hbi.co.jp/gnu/" | ||
| 134 | "ftp://ftp.cs.titech.ac.jp/pub/gnu/" | ||
| 135 | "ftp://ftpmirror.hanyang.ac.kr/GNU/" | ||
| 136 | "ftp://ftp.linux.sarang.net/mirror/gnu/gnu/" | ||
| 137 | "ftp://ftp.xgate.co.kr/pub/mirror/gnu/" | ||
| 138 | "ftp://ftp://gnu.xinicks.com/" | ||
| 139 | "ftp://ftp.isu.net.sa/pub/gnu/" | ||
| 140 | "ftp://ftp.nctu.edu.tw/UNIX/gnu/" | ||
| 141 | "ftp://coda.nctu.edu.tw/UNIX/gnu/" | ||
| 142 | "ftp://ftp1.sinica.edu.tw/pub3/GNU/gnu/" | ||
| 143 | "ftp://gnu.cdpa.nsysu.edu.tw/gnu" | ||
| 144 | "ftp://ftp.nectec.or.th/pub/mirrors/gnu/" | ||
| 145 | ;; Europe | ||
| 146 | "ftp://ftp.gnu.vbs.at/" | ||
| 147 | "ftp://ftp.univie.ac.at/packages/gnu/" | ||
| 148 | "ftp://gd.tuwien.ac.at/gnu/gnusrc/" | ||
| 149 | "ftp://ftp.belnet.be/mirror/ftp.gnu.org/" | ||
| 150 | "ftp://gnu.blic.net/pub/gnu/" | ||
| 151 | "ftp://ftp.fi.muni.cz/pub/gnu/" | ||
| 152 | "ftp://ftp.dkuug.dk/pub/gnu/" | ||
| 153 | "ftp://sunsite.dk/mirrors/gnu" | ||
| 154 | "ftp://ftp.funet.fi/pub/gnu/prep/" | ||
| 155 | "ftp://ftp.irisa.fr/pub/gnu/" | ||
| 156 | "ftp://ftp.cs.univ-paris8.fr/mirrors/ftp.gnu.org/" | ||
| 157 | "ftp://ftp.cs.tu-berlin.de/pub/gnu/" | ||
| 158 | "ftp://ftp.leo.org/pub/comp/os/unix/gnu/" | ||
| 159 | "ftp://ftp.informatik.rwth-aachen.de/pub/gnu/" | ||
| 160 | "ftp://ftp.de.uu.net/pub/gnu/" | ||
| 161 | "ftp://ftp.freenet.de/pub/ftp.gnu.org/gnu/" | ||
| 162 | "ftp://ftp.cs.uni-bonn.de/pub/gnu/" | ||
| 163 | "ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/ftp.gnu.org/" | ||
| 164 | "ftp://ftp.stw-bonn.de/pub/mirror/ftp.gnu.org/" | ||
| 165 | "ftp://ftp.math.uni-bremen.de/pub/gnu" | ||
| 166 | "ftp://ftp.forthnet.gr/pub/gnu/" | ||
| 167 | "ftp://ftp.ntua.gr/pub/gnu/" | ||
| 168 | "ftp://ftp.duth.gr/pub/gnu/" | ||
| 169 | "ftp://ftp.physics.auth.gr/pub/gnu/" | ||
| 170 | "ftp://ftp.esat.net/pub/gnu/" | ||
| 171 | "ftp://ftp.heanet.ie/mirrors/ftp.gnu.org" | ||
| 172 | "ftp://ftp.lugroma2.org/pub/gnu/" | ||
| 173 | "ftp://ftp.gnu.inetcosmos.org/pub/gnu/" | ||
| 174 | "ftp://ftp.digitaltrust.it/pub/gnu" | ||
| 175 | "ftp://ftp://rm.mirror.garr.it/mirrors/gnuftp" | ||
| 176 | "ftp://ftp.nluug.nl/pub/gnu/" | ||
| 177 | "ftp://ftp.mirror.nl/pub/mirror/gnu/" | ||
| 178 | "ftp://ftp.nl.uu.net/pub/gnu/" | ||
| 179 | "ftp://mirror.widexs.nl/pub/gnu/" | ||
| 180 | "ftp://ftp.easynet.nl/mirror/GNU/" | ||
| 103 | "ftp://ftp.win.tue.nl/pub/gnu" | 181 | "ftp://ftp.win.tue.nl/pub/gnu" |
| 104 | "ftp://ftp.nl.net" | 182 | "ftp://gnu.mirror.vuurwerk.net/pub/GNU/" |
| 105 | "ftp://ftp.etsimo.uniovi.es/pub/gnu" | 183 | "ftp://gnu.kookel.org/pub/ftp.gnu.org/" |
| 106 | "ftp://ftp.funet.fi/pub/gnu" | 184 | "ftp://ftp.uninett.no/pub/gnu/" |
| 107 | "ftp://ftp.denet.dk" | 185 | "ftp://ftp.task.gda.pl/pub/gnu/" |
| 108 | "ftp://ftp.stacken.kth.se" | 186 | "ftp://sunsite.icm.edu.pl/pub/gnu/" |
| 109 | "ftp://isy.liu.se" | 187 | "ftp://ftp.man.poznan.pl/pub/gnu" |
| 110 | "ftp://ftp.luth.se/pub/unix/gnu" | 188 | "ftp://ftp.ist.utl.pt/pub/GNU/gnu/" |
| 111 | "ftp://ftp.sunet.se/pub/gnu" | 189 | "ftp://ftp.telepac.pt/pub/gnu/" |
| 112 | "ftp://archive.eu.net" | 190 | "ftp://ftp.timisoara.roedu.net/mirrors/ftp.gnu.org/pub/gnu" |
| 113 | ;; SOUTH AMERICA: | 191 | "ftp://ftp.chg.ru/pub/gnu/" |
| 114 | "ftp://ftp.inf.utfsm.cl/pub/gnu" | 192 | "ftp://gnuftp.axitel.ru/" |
| 115 | "ftp://ftp.unicamp.br/pub/gnu" | 193 | "ftp://ftp.arnes.si/software/gnu/" |
| 116 | ;; WESTERN CANADA: | 194 | "ftp://ftp.etsimo.uniovi.es/pub/gnu/" |
| 117 | "ftp://ftp.cs.ubc.ca/mirror2/gnu" | 195 | "ftp://ftp.rediris.es/pub/gnu/" |
| 118 | ;; USA: | 196 | "ftp://ftp.chl.chalmers.se/pub/gnu/" |
| 119 | "ftp://wuarchive.wustl.edu/systems/gnu" | 197 | "ftp://ftp.isy.liu.se/pub/gnu/" |
| 120 | "ftp://labrea.stanford.edu" | 198 | "ftp://ftp.luth.se/pub/unix/gnu/" |
| 121 | "ftp://ftp.digex.net/pub/gnu" | 199 | "ftp://ftp.stacken.kth.se/pub/gnu/" |
| 122 | "ftp://ftp.kpc.com/pub/mirror/gnu" | 200 | "ftp://ftp.sunet.se/pub/gnu/" |
| 123 | "ftp://f.ms.uky.edu/pub3/gnu" | 201 | "ftp://sunsite.cnlab-switch.ch/mirror/gnu/" |
| 124 | "ftp://jaguar.utah.edu/gnustuff" | 202 | "ftp://ftp.ulak.net.tr/gnu/" |
| 125 | "ftp://ftp.hawaii.edu/mirrors/gnu" | 203 | "ftp://ftp.gnu.org.ua" |
| 126 | "ftp://uiarchive.cso.uiuc.edu/pub/gnu" | 204 | "ftp://ftp.mcc.ac.uk/pub/gnu/" |
| 127 | "ftp://ftp.cs.columbia.edu/archives/gnu/prep" | 205 | "ftp://ftp.mirror.ac.uk/sites/ftp.gnu.org/gnu/" |
| 128 | "ftp://gatekeeper.dec.com/pub/GNU" | 206 | "ftp://ftp.warwick.ac.uk/pub/gnu/" |
| 129 | "ftp://ftp.uu.net/systems/gnu"]) | 207 | "ftp://ftp.hands.com/ftp.gnu.org/" |
| 208 | "ftp://gnu.teleglobe.net/ftp.gnu.org/"]) | ||
| 130 | ("GNU Project Home Page" . "www.gnu.org") | 209 | ("GNU Project Home Page" . "www.gnu.org") |
| 131 | 210 | ||
| 132 | ;; Emacs. | 211 | ;; Emacs. |
| 133 | ("Emacs Lisp Archive" . | 212 | ("Emacs Home Page" . |
| 134 | "ftp://ftp.emacs.org/pub/") | 213 | "www.gnu.org/software/emacs/emacs.html") |
| 214 | ("Savannah Emacs page" . | ||
| 215 | "savannah.gnu.org/projects/emacs") | ||
| 216 | ("Emacs Lisp List" . | ||
| 217 | "www.damtp.cam.ac.uk/user/eglen/emacs/ell.html") | ||
| 218 | ("Emacs Wiki" . | ||
| 219 | [simple-query "www.emacswiki.org" | ||
| 220 | "www.emacswiki.org/cgi-bin/wiki/" ""]) | ||
| 135 | 221 | ||
| 136 | ;; Internet search engines. | 222 | ;; Internet search engines. |
| 137 | ("AltaVista" . | 223 | ("Google" . |
| 138 | [simple-query | 224 | [simple-query "www.google.com" |
| 139 | "www.altavista.digital.com" | 225 | "www.google.com/search?q=" ""]) |
| 140 | "www.altavista.digital.com/cgi-bin/query?pg=aq&what=web&fmt=.&q=" | 226 | ("Google Groups" . |
| 141 | "&r=&d0=&d1="]) | 227 | [simple-query "groups.google.com" |
| 142 | ("Archie" . | 228 | "groups.google.com/groups?q=" ""]) |
| 143 | [simple-query "hoohoo.ncsa.uiuc.edu/cgi-bin/AA.pl" | ||
| 144 | "hoohoo.ncsa.uiuc.edu/cgi-bin/AA.pl?query=" ""]) | ||
| 145 | ("Lycos" . | ||
| 146 | [simple-query "www.lycos.com" | ||
| 147 | "www.lycos.com/cgi-bin/pursuit?cat=lycos&query=" ""]) | ||
| 148 | ("Yahoo" . | 229 | ("Yahoo" . |
| 149 | [simple-query "www.yahoo.com" "search.yahoo.com/bin/search?p=" ""]) | 230 | [simple-query "www.yahoo.com" "search.yahoo.com/search?p=" ""]) |
| 231 | ("Yahoo: Reference" . "www.yahoo.com/Reference/") | ||
| 150 | 232 | ||
| 151 | ;; Misc. general interest. | 233 | ;; Misc. general interest. |
| 152 | ("Interactive Weather Information Network" . webjump-to-iwin) | 234 | ("Interactive Weather Information Network" . webjump-to-iwin) |
| 153 | ("Usenet FAQs" . | 235 | ("Usenet FAQs" . |
| 154 | [simple-query "www.cis.ohio-state.edu/hypertext/faq/usenet/FAQ-List.html" | 236 | "www.faqs.org/faqs/") |
| 155 | "www.cis.ohio-state.edu/htbin/search-usenet-faqs/form?find=" | ||
| 156 | ""]) | ||
| 157 | ("RTFM Usenet FAQs by Group" . | 237 | ("RTFM Usenet FAQs by Group" . |
| 158 | "ftp://rtfm.mit.edu/pub/usenet-by-group/") | 238 | "ftp://rtfm.mit.edu/pub/usenet-by-group/") |
| 159 | ("RTFM Usenet FAQs by Hierachy" . | 239 | ("RTFM Usenet FAQs by Hierachy" . |
| 160 | "ftp://rtfm.mit.edu/pub/usenet-by-hierarchy/") | 240 | "ftp://rtfm.mit.edu/pub/usenet-by-hierarchy/") |
| 161 | ("X Consortium Archive" . "ftp.x.org") | 241 | ("X Consortium Archive" . "ftp.x.org") |
| 162 | ("Yahoo: Reference" . "www.yahoo.com/Reference/") | ||
| 163 | 242 | ||
| 164 | ;; Computer social issues, privacy, professionalism. | 243 | ;; Computer social issues, privacy, professionalism. |
| 165 | ("Association for Computing Machinery" . "www.acm.org") | 244 | ("Association for Computing Machinery" . "www.acm.org") |
| 166 | ("Computer Professionals for Social Responsibility" . "www.cpsr.org/dox/") | 245 | ("Computer Professionals for Social Responsibility" . "www.cpsr.org") |
| 167 | ("Electronic Frontier Foundation" . "www.eff.org") | 246 | ("Electronic Frontier Foundation" . "www.eff.org") |
| 168 | ("IEEE Computer Society" . "www.computer.org") | 247 | ("IEEE Computer Society" . "www.computer.org") |
| 169 | ("Risks Digest" . webjump-to-risks) | 248 | ("Risks Digest" . webjump-to-risks) |
| 170 | 249 | ||
| 171 | ;; Fun. | 250 | ;; More. |
| 172 | ("Bastard Operator from Hell" . "www.replay.com/bofh/") | 251 | ("Supplemental Web site list for webjump" . |
| 252 | "www.neilvandyke.org/webjump/") | ||
| 173 | 253 | ||
| 174 | ) | 254 | ) |
| 175 | "Sample hotlist for WebJump. See the documentation for the `webjump' | 255 | "Sample hotlist for WebJump. See the documentation for the `webjump' |
diff --git a/lisp/paren.el b/lisp/paren.el index f5327c3b344..8b5a134d2d4 100644 --- a/lisp/paren.el +++ b/lisp/paren.el | |||
| @@ -72,8 +72,8 @@ otherwise)." | |||
| 72 | :group 'paren-showing | 72 | :group 'paren-showing |
| 73 | :version "20.3") | 73 | :version "20.3") |
| 74 | 74 | ||
| 75 | (defgroup paren-showing-faces () | 75 | (defgroup paren-showing-faces nil |
| 76 | "Group for faces of Show Paren mode" | 76 | "Group for faces of Show Paren mode." |
| 77 | :group 'paren-showing | 77 | :group 'paren-showing |
| 78 | :group 'faces | 78 | :group 'faces |
| 79 | :version "22.1") | 79 | :version "22.1") |
| @@ -88,7 +88,7 @@ otherwise)." | |||
| 88 | (t | 88 | (t |
| 89 | :background "gray")) | 89 | :background "gray")) |
| 90 | "Show Paren mode face used for a matching paren." | 90 | "Show Paren mode face used for a matching paren." |
| 91 | :group 'show-paren-faces) | 91 | :group 'paren-showing-faces) |
| 92 | ;; backward-compatibility alias | 92 | ;; backward-compatibility alias |
| 93 | (put 'show-paren-match-face 'face-alias 'show-paren-match) | 93 | (put 'show-paren-match-face 'face-alias 'show-paren-match) |
| 94 | 94 | ||
| @@ -96,7 +96,7 @@ otherwise)." | |||
| 96 | '((((class color)) (:foreground "white" :background "purple")) | 96 | '((((class color)) (:foreground "white" :background "purple")) |
| 97 | (t (:inverse-video t))) | 97 | (t (:inverse-video t))) |
| 98 | "Show Paren mode face used for a mismatching paren." | 98 | "Show Paren mode face used for a mismatching paren." |
| 99 | :group 'show-paren-faces) | 99 | :group 'paren-showing-faces) |
| 100 | ;; backward-compatibility alias | 100 | ;; backward-compatibility alias |
| 101 | (put 'show-paren-mismatch-face 'face-alias 'show-paren-mismatch) | 101 | (put 'show-paren-mismatch-face 'face-alias 'show-paren-mismatch) |
| 102 | 102 | ||
diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el index b237dd9a598..9de0a24f09e 100644 --- a/lisp/progmodes/cc-defs.el +++ b/lisp/progmodes/cc-defs.el | |||
| @@ -72,7 +72,9 @@ | |||
| 72 | (eval-after-load "font-lock" | 72 | (eval-after-load "font-lock" |
| 73 | '(if (and (not (featurep 'cc-fix)) ; only load the file once. | 73 | '(if (and (not (featurep 'cc-fix)) ; only load the file once. |
| 74 | (let (font-lock-keywords) | 74 | (let (font-lock-keywords) |
| 75 | (font-lock-compile-keywords '("\\<\\>")) | 75 | (condition-case nil |
| 76 | (font-lock-compile-keywords '("\\<\\>")) | ||
| 77 | (error nil)) | ||
| 76 | font-lock-keywords)) ; did the previous call foul this up? | 78 | font-lock-keywords)) ; did the previous call foul this up? |
| 77 | (load "cc-fix"))) | 79 | (load "cc-fix"))) |
| 78 | 80 | ||
| @@ -83,7 +85,9 @@ | |||
| 83 | (progn | 85 | (progn |
| 84 | (require 'font-lock) | 86 | (require 'font-lock) |
| 85 | (let (font-lock-keywords) | 87 | (let (font-lock-keywords) |
| 86 | (font-lock-compile-keywords '("\\<\\>")) | 88 | (condition-case nil |
| 89 | (font-lock-compile-keywords '("\\<\\>")) | ||
| 90 | (error nil)) | ||
| 87 | font-lock-keywords))) | 91 | font-lock-keywords))) |
| 88 | (cc-load "cc-fix"))) | 92 | (cc-load "cc-fix"))) |
| 89 | 93 | ||
diff --git a/lisp/progmodes/delphi.el b/lisp/progmodes/delphi.el index cdc557c7274..4c271113b72 100644 --- a/lisp/progmodes/delphi.el +++ b/lisp/progmodes/delphi.el | |||
| @@ -177,7 +177,7 @@ differs from the default." | |||
| 177 | 177 | ||
| 178 | (defcustom delphi-other-face nil | 178 | (defcustom delphi-other-face nil |
| 179 | "*Face used to color everything else." | 179 | "*Face used to color everything else." |
| 180 | :type '(choice face (const nil)) | 180 | :type '(choice (const :tag "None" nil) face) |
| 181 | :group 'delphi) | 181 | :group 'delphi) |
| 182 | 182 | ||
| 183 | (defconst delphi-directives | 183 | (defconst delphi-directives |
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 9ceee6f6920..6f5d0855e19 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el | |||
| @@ -516,15 +516,11 @@ instead of reading master file from disk." | |||
| 516 | 516 | ||
| 517 | (defun flymake-copy-buffer-to-temp-buffer (buffer) | 517 | (defun flymake-copy-buffer-to-temp-buffer (buffer) |
| 518 | "Copy contents of BUFFER into newly created temp buffer." | 518 | "Copy contents of BUFFER into newly created temp buffer." |
| 519 | (let ((contents nil) | 519 | (with-current-buffer |
| 520 | (temp-buffer nil)) | 520 | (get-buffer-create (generate-new-buffer-name |
| 521 | (with-current-buffer buffer | 521 | (concat "flymake:" (buffer-name buffer)))) |
| 522 | (setq contents (buffer-string)) | 522 | (insert-buffer-substring buffer) |
| 523 | 523 | (current-buffer))) | |
| 524 | (setq temp-buffer (get-buffer-create (generate-new-buffer-name (concat "flymake:" (buffer-name buffer))))) | ||
| 525 | (set-buffer temp-buffer) | ||
| 526 | (insert contents)) | ||
| 527 | temp-buffer)) | ||
| 528 | 524 | ||
| 529 | (defun flymake-check-include (source-file-name inc-path inc-name include-dirs) | 525 | (defun flymake-check-include (source-file-name inc-path inc-name include-dirs) |
| 530 | "Check if SOURCE-FILE-NAME can be found in include path. | 526 | "Check if SOURCE-FILE-NAME can be found in include path. |
| @@ -613,7 +609,8 @@ It's flymake process filter." | |||
| 613 | 609 | ||
| 614 | (flymake-log 3 "received %d byte(s) of output from process %d" (length output) pid) | 610 | (flymake-log 3 "received %d byte(s) of output from process %d" (length output) pid) |
| 615 | (when source-buffer | 611 | (when source-buffer |
| 616 | (flymake-parse-output-and-residual source-buffer output)))) | 612 | (with-current-buffer source-buffer |
| 613 | (flymake-parse-output-and-residual output))))) | ||
| 617 | 614 | ||
| 618 | (defun flymake-process-sentinel (process event) | 615 | (defun flymake-process-sentinel (process event) |
| 619 | "Sentinel for syntax check buffers." | 616 | "Sentinel for syntax check buffers." |
| @@ -636,8 +633,8 @@ It's flymake process filter." | |||
| 636 | (when source-buffer | 633 | (when source-buffer |
| 637 | (with-current-buffer source-buffer | 634 | (with-current-buffer source-buffer |
| 638 | 635 | ||
| 639 | (flymake-parse-residual source-buffer) | 636 | (flymake-parse-residual) |
| 640 | (flymake-post-syntax-check source-buffer exit-status command) | 637 | (flymake-post-syntax-check exit-status command) |
| 641 | (setq flymake-is-running nil)))) | 638 | (setq flymake-is-running nil)))) |
| 642 | (error | 639 | (error |
| 643 | (let ((err-str (format "Error in process sentinel for buffer %s: %s" | 640 | (let ((err-str (format "Error in process sentinel for buffer %s: %s" |
| @@ -646,60 +643,51 @@ It's flymake process filter." | |||
| 646 | (with-current-buffer source-buffer | 643 | (with-current-buffer source-buffer |
| 647 | (setq flymake-is-running nil)))))))) | 644 | (setq flymake-is-running nil)))))))) |
| 648 | 645 | ||
| 649 | (defun flymake-post-syntax-check (source-buffer exit-status command) | 646 | (defun flymake-post-syntax-check (exit-status command) |
| 650 | (with-current-buffer source-buffer | 647 | (setq flymake-err-info flymake-new-err-info) |
| 651 | (setq flymake-err-info flymake-new-err-info) | 648 | (setq flymake-new-err-info nil) |
| 652 | (setq flymake-new-err-info nil) | 649 | (setq flymake-err-info |
| 653 | (setq flymake-err-info | 650 | (flymake-fix-line-numbers |
| 654 | (flymake-fix-line-numbers | 651 | flymake-err-info 1 (flymake-count-lines))) |
| 655 | flymake-err-info 1 (flymake-count-lines source-buffer)))) | 652 | (flymake-delete-own-overlays) |
| 656 | (flymake-delete-own-overlays source-buffer) | 653 | (flymake-highlight-err-lines flymake-err-info) |
| 657 | (flymake-highlight-err-lines | ||
| 658 | source-buffer (with-current-buffer source-buffer flymake-err-info)) | ||
| 659 | (let (err-count warn-count) | 654 | (let (err-count warn-count) |
| 660 | (with-current-buffer source-buffer | 655 | (setq err-count (flymake-get-err-count flymake-err-info "e")) |
| 661 | (setq err-count (flymake-get-err-count flymake-err-info "e")) | 656 | (setq warn-count (flymake-get-err-count flymake-err-info "w")) |
| 662 | (setq warn-count (flymake-get-err-count flymake-err-info "w")) | 657 | (flymake-log 2 "%s: %d error(s), %d warning(s) in %.2f second(s)" |
| 663 | (flymake-log 2 "%s: %d error(s), %d warning(s) in %.2f second(s)" | 658 | (buffer-name) err-count warn-count |
| 664 | (buffer-name source-buffer) err-count warn-count | ||
| 665 | (- (flymake-float-time) flymake-check-start-time)) | 659 | (- (flymake-float-time) flymake-check-start-time)) |
| 666 | (setq flymake-check-start-time nil)) | 660 | (setq flymake-check-start-time nil) |
| 667 | 661 | ||
| 668 | (if (and (equal 0 err-count) (equal 0 warn-count)) | 662 | (if (and (equal 0 err-count) (equal 0 warn-count)) |
| 669 | (if (equal 0 exit-status) | 663 | (if (equal 0 exit-status) |
| 670 | (flymake-report-status source-buffer "" "") ; PASSED | 664 | (flymake-report-status "" "") ; PASSED |
| 671 | (if (not (with-current-buffer source-buffer | 665 | (if (not flymake-check-was-interrupted) |
| 672 | flymake-check-was-interrupted)) | 666 | (flymake-report-fatal-status "CFGERR" |
| 673 | (flymake-report-fatal-status (current-buffer) "CFGERR" | ||
| 674 | (format "Configuration error has occured while running %s" command)) | 667 | (format "Configuration error has occured while running %s" command)) |
| 675 | (flymake-report-status source-buffer nil ""))) ; "STOPPED" | 668 | (flymake-report-status nil ""))) ; "STOPPED" |
| 676 | (flymake-report-status source-buffer (format "%d/%d" err-count warn-count) "")))) | 669 | (flymake-report-status (format "%d/%d" err-count warn-count) "")))) |
| 677 | 670 | ||
| 678 | (defun flymake-parse-output-and-residual (source-buffer output) | 671 | (defun flymake-parse-output-and-residual (output) |
| 679 | "Split OUTPUT into lines, merge in residual if necessary." | 672 | "Split OUTPUT into lines, merge in residual if necessary." |
| 680 | (with-current-buffer source-buffer | 673 | (let* ((buffer-residual flymake-output-residual) |
| 681 | (let* ((buffer-residual flymake-output-residual) | 674 | (total-output (if buffer-residual (concat buffer-residual output) output)) |
| 682 | (total-output (if buffer-residual (concat buffer-residual output) output)) | 675 | (lines-and-residual (flymake-split-output total-output)) |
| 683 | (lines-and-residual (flymake-split-output total-output)) | 676 | (lines (nth 0 lines-and-residual)) |
| 684 | (lines (nth 0 lines-and-residual)) | 677 | (new-residual (nth 1 lines-and-residual))) |
| 685 | (new-residual (nth 1 lines-and-residual))) | 678 | (setq flymake-output-residual new-residual) |
| 686 | (with-current-buffer source-buffer | 679 | (setq flymake-new-err-info |
| 687 | (setq flymake-output-residual new-residual) | 680 | (flymake-parse-err-lines |
| 688 | (setq flymake-new-err-info | 681 | flymake-new-err-info lines)))) |
| 689 | (flymake-parse-err-lines | 682 | |
| 690 | flymake-new-err-info | 683 | (defun flymake-parse-residual () |
| 691 | source-buffer lines)))))) | ||
| 692 | |||
| 693 | (defun flymake-parse-residual (source-buffer) | ||
| 694 | "Parse residual if it's non empty." | 684 | "Parse residual if it's non empty." |
| 695 | (with-current-buffer source-buffer | 685 | (when flymake-output-residual |
| 696 | (when flymake-output-residual | 686 | (setq flymake-new-err-info |
| 697 | (setq flymake-new-err-info | 687 | (flymake-parse-err-lines |
| 698 | (flymake-parse-err-lines | 688 | flymake-new-err-info |
| 699 | flymake-new-err-info | 689 | (list flymake-output-residual))) |
| 700 | source-buffer | 690 | (setq flymake-output-residual nil))) |
| 701 | (list flymake-output-residual))) | ||
| 702 | (setq flymake-output-residual nil)))) | ||
| 703 | 691 | ||
| 704 | (defvar flymake-err-info nil | 692 | (defvar flymake-err-info nil |
| 705 | "Sorted list of line numbers and lists of err info in the form (file, err-text).") | 693 | "Sorted list of line numbers and lists of err info in the form (file, err-text).") |
| @@ -803,16 +791,11 @@ line number outside the file being compiled." | |||
| 803 | (setq count (1- count)))) | 791 | (setq count (1- count)))) |
| 804 | err-info-list) | 792 | err-info-list) |
| 805 | 793 | ||
| 806 | (defun flymake-highlight-err-lines (buffer err-info-list) | 794 | (defun flymake-highlight-err-lines (err-info-list) |
| 807 | "Highlight error lines in BUFFER using info from ERR-INFO-LIST." | 795 | "Highlight error lines in BUFFER using info from ERR-INFO-LIST." |
| 808 | (with-current-buffer buffer | 796 | (save-excursion |
| 809 | (save-excursion | 797 | (dolist (err err-info-list) |
| 810 | (let* ((idx 0) | 798 | (flymake-highlight-line (car err) (nth 1 err))))) |
| 811 | (count (length err-info-list))) | ||
| 812 | (while (< idx count) | ||
| 813 | (flymake-highlight-line (car (nth idx err-info-list)) | ||
| 814 | (nth 1 (nth idx err-info-list))) | ||
| 815 | (setq idx (1+ idx))))))) | ||
| 816 | 799 | ||
| 817 | (defun flymake-overlay-p (ov) | 800 | (defun flymake-overlay-p (ov) |
| 818 | "Determine whether overlay OV was created by flymake." | 801 | "Determine whether overlay OV was created by flymake." |
| @@ -831,16 +814,13 @@ line number outside the file being compiled." | |||
| 831 | ov) | 814 | ov) |
| 832 | (flymake-log 3 "created an overlay at (%d-%d)" beg end))) | 815 | (flymake-log 3 "created an overlay at (%d-%d)" beg end))) |
| 833 | 816 | ||
| 834 | (defun flymake-delete-own-overlays (buffer) | 817 | (defun flymake-delete-own-overlays () |
| 835 | "Delete all flymake overlays in BUFFER." | 818 | "Delete all flymake overlays in BUFFER." |
| 836 | (with-current-buffer buffer | 819 | (dolist (ol (overlays-in (point-min) (point-max))) |
| 837 | (let ((ov (overlays-in (point-min) (point-max)))) | 820 | (when (flymake-overlay-p ol) |
| 838 | (while (consp ov) | 821 | (delete-overlay ol) |
| 839 | (when (flymake-overlay-p (car ov)) | 822 | ;;+(flymake-log 3 "deleted overlay %s" ol) |
| 840 | (delete-overlay (car ov)) | 823 | ))) |
| 841 | ;;+(flymake-log 3 "deleted overlay %s" ov) | ||
| 842 | ) | ||
| 843 | (setq ov (cdr ov)))))) | ||
| 844 | 824 | ||
| 845 | (defun flymake-region-has-flymake-overlays (beg end) | 825 | (defun flymake-region-has-flymake-overlays (beg end) |
| 846 | "Check if region specified by BEG and END has overlay. | 826 | "Check if region specified by BEG and END has overlay. |
| @@ -905,19 +885,19 @@ Perhaps use text from LINE-ERR-INFO-LIST to enhance highlighting." | |||
| 905 | 885 | ||
| 906 | (flymake-make-overlay beg end tooltip-text face nil))) | 886 | (flymake-make-overlay beg end tooltip-text face nil))) |
| 907 | 887 | ||
| 908 | (defun flymake-parse-err-lines (err-info-list source-buffer lines) | 888 | (defun flymake-parse-err-lines (err-info-list lines) |
| 909 | "Parse err LINES, store info in ERR-INFO-LIST." | 889 | "Parse err LINES, store info in ERR-INFO-LIST." |
| 910 | (let* ((count (length lines)) | 890 | (let* ((count (length lines)) |
| 911 | (idx 0) | 891 | (idx 0) |
| 912 | (line-err-info nil) | 892 | (line-err-info nil) |
| 913 | (real-file-name nil) | 893 | (real-file-name nil) |
| 914 | (source-file-name (buffer-file-name source-buffer)) | 894 | (source-file-name buffer-file-name) |
| 915 | (get-real-file-name-f (flymake-get-real-file-name-function source-file-name))) | 895 | (get-real-file-name-f (flymake-get-real-file-name-function source-file-name))) |
| 916 | 896 | ||
| 917 | (while (< idx count) | 897 | (while (< idx count) |
| 918 | (setq line-err-info (flymake-parse-line (nth idx lines))) | 898 | (setq line-err-info (flymake-parse-line (nth idx lines))) |
| 919 | (when line-err-info | 899 | (when line-err-info |
| 920 | (setq real-file-name (funcall get-real-file-name-f source-buffer (flymake-ler-get-file line-err-info))) | 900 | (setq real-file-name (funcall get-real-file-name-f (current-buffer) (flymake-ler-get-file line-err-info))) |
| 921 | (setq line-err-info (flymake-ler-set-full-file line-err-info real-file-name)) | 901 | (setq line-err-info (flymake-ler-set-full-file line-err-info real-file-name)) |
| 922 | 902 | ||
| 923 | (if (flymake-same-files real-file-name source-file-name) | 903 | (if (flymake-same-files real-file-name source-file-name) |
| @@ -1147,9 +1127,9 @@ For the format of LINE-ERR-INFO, see `flymake-ler-make-ler'." | |||
| 1147 | (let* ((include-dirs (append '(".") (flymake-get-project-include-dirs base-dir) (flymake-get-system-include-dirs)))) | 1127 | (let* ((include-dirs (append '(".") (flymake-get-project-include-dirs base-dir) (flymake-get-system-include-dirs)))) |
| 1148 | include-dirs)) | 1128 | include-dirs)) |
| 1149 | 1129 | ||
| 1150 | (defun flymake-restore-formatting (source-buffer) | 1130 | ;; (defun flymake-restore-formatting () |
| 1151 | "Remove any formatting made by flymake." | 1131 | ;; "Remove any formatting made by flymake." |
| 1152 | ) | 1132 | ;; ) |
| 1153 | 1133 | ||
| 1154 | (defun flymake-get-program-dir (buffer) | 1134 | (defun flymake-get-program-dir (buffer) |
| 1155 | "Get dir to start program in." | 1135 | "Get dir to start program in." |
| @@ -1176,38 +1156,36 @@ For the format of LINE-ERR-INFO, see `flymake-ler-make-ler'." | |||
| 1176 | :group 'flymake | 1156 | :group 'flymake |
| 1177 | :type 'boolean) | 1157 | :type 'boolean) |
| 1178 | 1158 | ||
| 1179 | (defun flymake-start-syntax-check (buffer) | 1159 | (defun flymake-start-syntax-check () |
| 1180 | "Start syntax checking for buffer BUFFER." | 1160 | "Start syntax checking for current buffer." |
| 1181 | (unless (bufferp buffer) | 1161 | (interactive) |
| 1182 | (error "Expected a buffer")) | 1162 | (flymake-log 3 "flymake is running: %s" flymake-is-running) |
| 1183 | (with-current-buffer buffer | 1163 | (when (and (not flymake-is-running) |
| 1184 | (flymake-log 3 "flymake is running: %s" flymake-is-running) | 1164 | (flymake-can-syntax-check-file buffer-file-name)) |
| 1185 | (when (and (not flymake-is-running) | 1165 | (when (or (not flymake-compilation-prevents-syntax-check) |
| 1186 | (flymake-can-syntax-check-file (buffer-file-name buffer))) | 1166 | (not (flymake-compilation-is-running))) ;+ (flymake-rep-ort-status buffer "COMP") |
| 1187 | (when (or (not flymake-compilation-prevents-syntax-check) | 1167 | (flymake-clear-buildfile-cache) |
| 1188 | (not (flymake-compilation-is-running))) ;+ (flymake-rep-ort-status buffer "COMP") | 1168 | (flymake-clear-project-include-dirs-cache) |
| 1189 | (flymake-clear-buildfile-cache) | 1169 | |
| 1190 | (flymake-clear-project-include-dirs-cache) | 1170 | (setq flymake-check-was-interrupted nil) |
| 1191 | 1171 | (setq flymake-buffer-data (flymake-makehash 'equal)) | |
| 1192 | (setq flymake-check-was-interrupted nil) | 1172 | |
| 1193 | (setq flymake-buffer-data (flymake-makehash 'equal)) | 1173 | (let* ((source-file-name buffer-file-name) |
| 1194 | 1174 | (init-f (flymake-get-init-function source-file-name)) | |
| 1195 | (let* ((source-file-name (buffer-file-name buffer)) | 1175 | (cleanup-f (flymake-get-cleanup-function source-file-name)) |
| 1196 | (init-f (flymake-get-init-function source-file-name)) | 1176 | (cmd-and-args (funcall init-f (current-buffer))) |
| 1197 | (cleanup-f (flymake-get-cleanup-function source-file-name)) | 1177 | (cmd (nth 0 cmd-and-args)) |
| 1198 | (cmd-and-args (funcall init-f buffer)) | 1178 | (args (nth 1 cmd-and-args)) |
| 1199 | (cmd (nth 0 cmd-and-args)) | 1179 | (dir (nth 2 cmd-and-args))) |
| 1200 | (args (nth 1 cmd-and-args)) | 1180 | (if (not cmd-and-args) |
| 1201 | (dir (nth 2 cmd-and-args))) | 1181 | (progn |
| 1202 | (if (not cmd-and-args) | 1182 | (flymake-log 0 "init function %s for %s failed, cleaning up" init-f source-file-name) |
| 1203 | (progn | 1183 | (funcall cleanup-f (current-buffer))) |
| 1204 | (flymake-log 0 "init function %s for %s failed, cleaning up" init-f source-file-name) | 1184 | (progn |
| 1205 | (funcall cleanup-f buffer)) | 1185 | (setq flymake-last-change-time nil) |
| 1206 | (progn | 1186 | (flymake-start-syntax-check-process cmd args dir))))))) |
| 1207 | (setq flymake-last-change-time nil) | 1187 | |
| 1208 | (flymake-start-syntax-check-process buffer cmd args dir)))))))) | 1188 | (defun flymake-start-syntax-check-process (cmd args dir) |
| 1209 | |||
| 1210 | (defun flymake-start-syntax-check-process (buffer cmd args dir) | ||
| 1211 | "Start syntax check process." | 1189 | "Start syntax check process." |
| 1212 | (let* ((process nil)) | 1190 | (let* ((process nil)) |
| 1213 | (condition-case err | 1191 | (condition-case err |
| @@ -1219,25 +1197,24 @@ For the format of LINE-ERR-INFO, see `flymake-ler-make-ler'." | |||
| 1219 | (set-process-sentinel process 'flymake-process-sentinel) | 1197 | (set-process-sentinel process 'flymake-process-sentinel) |
| 1220 | (set-process-filter process 'flymake-process-filter) | 1198 | (set-process-filter process 'flymake-process-filter) |
| 1221 | 1199 | ||
| 1222 | (flymake-reg-names (process-id process) (buffer-name buffer)) | 1200 | (flymake-reg-names (process-id process) (buffer-name)) |
| 1223 | 1201 | ||
| 1224 | (with-current-buffer buffer | 1202 | (setq flymake-is-running t) |
| 1225 | (setq flymake-is-running t) | 1203 | (setq flymake-last-change-time nil) |
| 1226 | (setq flymake-last-change-time nil) | 1204 | (setq flymake-check-start-time (flymake-float-time)) |
| 1227 | (setq flymake-check-start-time (flymake-float-time))) | ||
| 1228 | 1205 | ||
| 1229 | (flymake-report-status buffer nil "*") | 1206 | (flymake-report-status nil "*") |
| 1230 | (flymake-log 2 "started process %d, command=%s, dir=%s" | 1207 | (flymake-log 2 "started process %d, command=%s, dir=%s" |
| 1231 | (process-id process) (process-command process) default-directory) | 1208 | (process-id process) (process-command process) default-directory) |
| 1232 | process) | 1209 | process) |
| 1233 | (error | 1210 | (error |
| 1234 | (let* ((err-str (format "Failed to launch syntax check process '%s' with args %s: %s" | 1211 | (let* ((err-str (format "Failed to launch syntax check process '%s' with args %s: %s" |
| 1235 | cmd args (error-message-string err))) | 1212 | cmd args (error-message-string err))) |
| 1236 | (source-file-name (buffer-file-name buffer)) | 1213 | (source-file-name buffer-file-name) |
| 1237 | (cleanup-f (flymake-get-cleanup-function source-file-name))) | 1214 | (cleanup-f (flymake-get-cleanup-function source-file-name))) |
| 1238 | (flymake-log 0 err-str) | 1215 | (flymake-log 0 err-str) |
| 1239 | (funcall cleanup-f buffer) | 1216 | (funcall cleanup-f (current-buffer)) |
| 1240 | (flymake-report-fatal-status buffer "PROCERR" err-str)))))) | 1217 | (flymake-report-fatal-status "PROCERR" err-str)))))) |
| 1241 | 1218 | ||
| 1242 | (defun flymake-kill-process (pid &optional rest) | 1219 | (defun flymake-kill-process (pid &optional rest) |
| 1243 | "Kill process PID." | 1220 | "Kill process PID." |
| @@ -1304,12 +1281,7 @@ For the format of LINE-ERR-INFO, see `flymake-ler-make-ler'." | |||
| 1304 | 1281 | ||
| 1305 | (setq flymake-last-change-time nil) | 1282 | (setq flymake-last-change-time nil) |
| 1306 | (flymake-log 3 "starting syntax check as more than 1 second passed since last change") | 1283 | (flymake-log 3 "starting syntax check as more than 1 second passed since last change") |
| 1307 | (flymake-start-syntax-check buffer))))) | 1284 | (flymake-start-syntax-check))))) |
| 1308 | |||
| 1309 | (defun flymake-start-syntax-check-for-current-buffer () | ||
| 1310 | "Run `flymake-start-syntax-check' for current buffer if it isn't already running." | ||
| 1311 | (interactive) | ||
| 1312 | (flymake-start-syntax-check (current-buffer))) | ||
| 1313 | 1285 | ||
| 1314 | (defun flymake-current-line-no () | 1286 | (defun flymake-current-line-no () |
| 1315 | "Return number of current line in current buffer." | 1287 | "Return number of current line in current buffer." |
| @@ -1318,10 +1290,9 @@ For the format of LINE-ERR-INFO, see `flymake-ler-make-ler'." | |||
| 1318 | (end (if (= (point) (point-max)) (point) (1+ (point))))) | 1290 | (end (if (= (point) (point-max)) (point) (1+ (point))))) |
| 1319 | (count-lines beg end))) | 1291 | (count-lines beg end))) |
| 1320 | 1292 | ||
| 1321 | (defun flymake-count-lines (buffer) | 1293 | (defun flymake-count-lines () |
| 1322 | "Return number of lines in buffer BUFFER." | 1294 | "Return number of lines in buffer BUFFER." |
| 1323 | (with-current-buffer buffer | 1295 | (count-lines (point-min) (point-max))) |
| 1324 | (count-lines (point-min) (point-max)))) | ||
| 1325 | 1296 | ||
| 1326 | (defun flymake-get-point-pixel-pos () | 1297 | (defun flymake-get-point-pixel-pos () |
| 1327 | "Return point position in pixels: (x, y)." | 1298 | "Return point position in pixels: (x, y)." |
| @@ -1346,7 +1317,6 @@ For the format of LINE-ERR-INFO, see `flymake-ler-make-ler'." | |||
| 1346 | (line-err-info-list (nth 0 (flymake-find-err-info flymake-err-info line-no))) | 1317 | (line-err-info-list (nth 0 (flymake-find-err-info flymake-err-info line-no))) |
| 1347 | (menu-data (flymake-make-err-menu-data line-no line-err-info-list)) | 1318 | (menu-data (flymake-make-err-menu-data line-no line-err-info-list)) |
| 1348 | (choice nil) | 1319 | (choice nil) |
| 1349 | (mouse-pos (flymake-get-point-pixel-pos)) | ||
| 1350 | (menu-pos (list (flymake-get-point-pixel-pos) (selected-window)))) | 1320 | (menu-pos (list (flymake-get-point-pixel-pos) (selected-window)))) |
| 1351 | (if menu-data | 1321 | (if menu-data |
| 1352 | (progn | 1322 | (progn |
| @@ -1402,20 +1372,18 @@ For the format of LINE-ERR-INFO, see `flymake-ler-make-ler'." | |||
| 1402 | 1372 | ||
| 1403 | (make-variable-buffer-local 'flymake-mode-line-status) | 1373 | (make-variable-buffer-local 'flymake-mode-line-status) |
| 1404 | 1374 | ||
| 1405 | (defun flymake-report-status (buffer e-w &optional status) | 1375 | (defun flymake-report-status (e-w &optional status) |
| 1406 | "Show status in mode line." | 1376 | "Show status in mode line." |
| 1407 | (when (bufferp buffer) | 1377 | (when e-w |
| 1408 | (with-current-buffer buffer | 1378 | (setq flymake-mode-line-e-w e-w)) |
| 1409 | (when e-w | 1379 | (when status |
| 1410 | (setq flymake-mode-line-e-w e-w)) | 1380 | (setq flymake-mode-line-status status)) |
| 1411 | (when status | 1381 | (let* ((mode-line " Flymake")) |
| 1412 | (setq flymake-mode-line-status status)) | 1382 | (when (> (length flymake-mode-line-e-w) 0) |
| 1413 | (let* ((mode-line " Flymake")) | 1383 | (setq mode-line (concat mode-line ":" flymake-mode-line-e-w))) |
| 1414 | (when (> (length flymake-mode-line-e-w) 0) | 1384 | (setq mode-line (concat mode-line flymake-mode-line-status)) |
| 1415 | (setq mode-line (concat mode-line ":" flymake-mode-line-e-w))) | 1385 | (setq flymake-mode-line mode-line) |
| 1416 | (setq mode-line (concat mode-line flymake-mode-line-status)) | 1386 | (force-mode-line-update))) |
| 1417 | (setq flymake-mode-line mode-line) | ||
| 1418 | (force-mode-line-update))))) | ||
| 1419 | 1387 | ||
| 1420 | (defun flymake-display-warning (warning) | 1388 | (defun flymake-display-warning (warning) |
| 1421 | "Display a warning to user." | 1389 | "Display a warning to user." |
| @@ -1426,15 +1394,14 @@ For the format of LINE-ERR-INFO, see `flymake-ler-make-ler'." | |||
| 1426 | :group 'flymake | 1394 | :group 'flymake |
| 1427 | :type 'boolean) | 1395 | :type 'boolean) |
| 1428 | 1396 | ||
| 1429 | (defun flymake-report-fatal-status (buffer status warning) | 1397 | (defun flymake-report-fatal-status (status warning) |
| 1430 | "Display a warning and switch flymake mode off." | 1398 | "Display a warning and switch flymake mode off." |
| 1431 | (when flymake-gui-warnings-enabled | 1399 | (when flymake-gui-warnings-enabled |
| 1432 | (flymake-display-warning (format "Flymake: %s. Flymake will be switched OFF" warning)) | 1400 | (flymake-display-warning (format "Flymake: %s. Flymake will be switched OFF" warning)) |
| 1433 | ) | 1401 | ) |
| 1434 | (with-current-buffer buffer | 1402 | (flymake-mode 0) |
| 1435 | (flymake-mode 0) | 1403 | (flymake-log 0 "switched OFF Flymake mode for buffer %s due to fatal status %s, warning %s" |
| 1436 | (flymake-log 0 "switched OFF Flymake mode for buffer %s due to fatal status %s, warning %s" | 1404 | (buffer-name) status warning)) |
| 1437 | (buffer-name buffer) status warning))) | ||
| 1438 | 1405 | ||
| 1439 | (defcustom flymake-start-syntax-check-on-find-file t | 1406 | (defcustom flymake-start-syntax-check-on-find-file t |
| 1440 | "Start syntax check on find file." | 1407 | "Start syntax check on find file." |
| @@ -1458,13 +1425,13 @@ With arg, turn Flymake mode on if and only if arg is positive." | |||
| 1458 | (add-hook 'kill-buffer-hook 'flymake-kill-buffer-hook nil t) | 1425 | (add-hook 'kill-buffer-hook 'flymake-kill-buffer-hook nil t) |
| 1459 | ;;+(add-hook 'find-file-hook 'flymake-find-file-hook) | 1426 | ;;+(add-hook 'find-file-hook 'flymake-find-file-hook) |
| 1460 | 1427 | ||
| 1461 | (flymake-report-status (current-buffer) "" "") | 1428 | (flymake-report-status "" "") |
| 1462 | 1429 | ||
| 1463 | (setq flymake-timer | 1430 | (setq flymake-timer |
| 1464 | (run-at-time nil 1 'flymake-on-timer-event (current-buffer))) | 1431 | (run-at-time nil 1 'flymake-on-timer-event (current-buffer))) |
| 1465 | 1432 | ||
| 1466 | (when flymake-start-syntax-check-on-find-file | 1433 | (when flymake-start-syntax-check-on-find-file |
| 1467 | (flymake-start-syntax-check-for-current-buffer)))) | 1434 | (flymake-start-syntax-check)))) |
| 1468 | 1435 | ||
| 1469 | ;; Turning the mode OFF. | 1436 | ;; Turning the mode OFF. |
| 1470 | (t | 1437 | (t |
| @@ -1473,7 +1440,7 @@ With arg, turn Flymake mode on if and only if arg is positive." | |||
| 1473 | (remove-hook 'kill-buffer-hook 'flymake-kill-buffer-hook t) | 1440 | (remove-hook 'kill-buffer-hook 'flymake-kill-buffer-hook t) |
| 1474 | ;;+(remove-hook 'find-file-hook (function flymake-find-file-hook) t) | 1441 | ;;+(remove-hook 'find-file-hook (function flymake-find-file-hook) t) |
| 1475 | 1442 | ||
| 1476 | (flymake-delete-own-overlays (current-buffer)) | 1443 | (flymake-delete-own-overlays) |
| 1477 | 1444 | ||
| 1478 | (when flymake-timer | 1445 | (when flymake-timer |
| 1479 | (cancel-timer flymake-timer) | 1446 | (cancel-timer flymake-timer) |
| @@ -1504,14 +1471,14 @@ With arg, turn Flymake mode on if and only if arg is positive." | |||
| 1504 | (let((new-text (buffer-substring start stop))) | 1471 | (let((new-text (buffer-substring start stop))) |
| 1505 | (when (and flymake-start-syntax-check-on-newline (equal new-text "\n")) | 1472 | (when (and flymake-start-syntax-check-on-newline (equal new-text "\n")) |
| 1506 | (flymake-log 3 "starting syntax check as new-line has been seen") | 1473 | (flymake-log 3 "starting syntax check as new-line has been seen") |
| 1507 | (flymake-start-syntax-check-for-current-buffer)) | 1474 | (flymake-start-syntax-check)) |
| 1508 | (setq flymake-last-change-time (flymake-float-time)))) | 1475 | (setq flymake-last-change-time (flymake-float-time)))) |
| 1509 | 1476 | ||
| 1510 | (defun flymake-after-save-hook () | 1477 | (defun flymake-after-save-hook () |
| 1511 | (if (local-variable-p 'flymake-mode (current-buffer)) ; (???) other way to determine whether flymake is active in buffer being saved? | 1478 | (if (local-variable-p 'flymake-mode (current-buffer)) ; (???) other way to determine whether flymake is active in buffer being saved? |
| 1512 | (progn | 1479 | (progn |
| 1513 | (flymake-log 3 "starting syntax check as buffer was saved") | 1480 | (flymake-log 3 "starting syntax check as buffer was saved") |
| 1514 | (flymake-start-syntax-check-for-current-buffer)))) ; no more mode 3. cannot start check if mode 3 (to temp copies) is active - (???) | 1481 | (flymake-start-syntax-check)))) ; no more mode 3. cannot start check if mode 3 (to temp copies) is active - (???) |
| 1515 | 1482 | ||
| 1516 | (defun flymake-kill-buffer-hook () | 1483 | (defun flymake-kill-buffer-hook () |
| 1517 | (when flymake-timer | 1484 | (when flymake-timer |
| @@ -1521,7 +1488,7 @@ With arg, turn Flymake mode on if and only if arg is positive." | |||
| 1521 | (defun flymake-find-file-hook () | 1488 | (defun flymake-find-file-hook () |
| 1522 | ;;+(when flymake-start-syntax-check-on-find-file | 1489 | ;;+(when flymake-start-syntax-check-on-find-file |
| 1523 | ;;+ (flymake-log 3 "starting syntax check on file open") | 1490 | ;;+ (flymake-log 3 "starting syntax check on file open") |
| 1524 | ;;+ (flymake-start-syntax-check-for-current-buffer) | 1491 | ;;+ (flymake-start-syntax-check) |
| 1525 | ;;+) | 1492 | ;;+) |
| 1526 | (when (and (not (local-variable-p 'flymake-mode (current-buffer))) | 1493 | (when (and (not (local-variable-p 'flymake-mode (current-buffer))) |
| 1527 | (flymake-can-syntax-check-file buffer-file-name)) | 1494 | (flymake-can-syntax-check-file buffer-file-name)) |
| @@ -1728,7 +1695,8 @@ Return full-name. Names are real, not patched." | |||
| 1728 | (if (not buildfile-dir) | 1695 | (if (not buildfile-dir) |
| 1729 | (progn | 1696 | (progn |
| 1730 | (flymake-log 1 "no buildfile (%s) for %s" buildfile-name source-file-name) | 1697 | (flymake-log 1 "no buildfile (%s) for %s" buildfile-name source-file-name) |
| 1731 | (flymake-report-fatal-status buffer "NOMK" (format "No buildfile (%s) found for %s" buildfile-name source-file-name)) | 1698 | (with-current-buffer buffer |
| 1699 | (flymake-report-fatal-status "NOMK" (format "No buildfile (%s) found for %s" buildfile-name source-file-name))) | ||
| 1732 | ) | 1700 | ) |
| 1733 | (progn | 1701 | (progn |
| 1734 | (flymake-set-buffer-value buffer "base-dir" buildfile-dir))) | 1702 | (flymake-set-buffer-value buffer "base-dir" buildfile-dir))) |
| @@ -1748,7 +1716,9 @@ Return full-name. Names are real, not patched." | |||
| 1748 | (if (not master-and-temp-master) | 1716 | (if (not master-and-temp-master) |
| 1749 | (progn | 1717 | (progn |
| 1750 | (flymake-log 1 "cannot find master file for %s" source-file-name) | 1718 | (flymake-log 1 "cannot find master file for %s" source-file-name) |
| 1751 | (flymake-report-status buffer "!" "") ; NOMASTER | 1719 | (when (bufferp buffer) |
| 1720 | (with-current-buffer buffer | ||
| 1721 | (flymake-report-status "!" ""))) ; NOMASTER | ||
| 1752 | ) | 1722 | ) |
| 1753 | (progn | 1723 | (progn |
| 1754 | (setq master-file-name (nth 0 master-and-temp-master)) | 1724 | (setq master-file-name (nth 0 master-and-temp-master)) |
diff --git a/lisp/progmodes/glasses.el b/lisp/progmodes/glasses.el index 18f744e81c8..d19f636ff93 100644 --- a/lisp/progmodes/glasses.el +++ b/lisp/progmodes/glasses.el | |||
| @@ -82,7 +82,7 @@ For example, you can set `glasses-separator' to an empty string and | |||
| 82 | `glasses-face' to `bold'. Then unreadable identifiers will have no separators, | 82 | `glasses-face' to `bold'. Then unreadable identifiers will have no separators, |
| 83 | but will have their capitals in bold." | 83 | but will have their capitals in bold." |
| 84 | :group 'glasses | 84 | :group 'glasses |
| 85 | :type '(choice face (const nil)) | 85 | :type '(choice (const :tag "None" nil) face) |
| 86 | :set 'glasses-custom-set | 86 | :set 'glasses-custom-set |
| 87 | :initialize 'custom-initialize-default) | 87 | :initialize 'custom-initialize-default) |
| 88 | 88 | ||
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index a9ccdf38442..e99262dd670 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el | |||
| @@ -2735,6 +2735,7 @@ Obeying it means displaying in another window the specified file and line." | |||
| 2735 | (window (and buffer (or (get-buffer-window buffer) | 2735 | (window (and buffer (or (get-buffer-window buffer) |
| 2736 | (display-buffer buffer)))) | 2736 | (display-buffer buffer)))) |
| 2737 | (pos)) | 2737 | (pos)) |
| 2738 | (message "%s %s" (current-buffer) buffer) | ||
| 2738 | (if buffer | 2739 | (if buffer |
| 2739 | (progn | 2740 | (progn |
| 2740 | (with-current-buffer buffer | 2741 | (with-current-buffer buffer |
| @@ -2750,7 +2751,15 @@ Obeying it means displaying in another window the specified file and line." | |||
| 2750 | (setq pos (point)) | 2751 | (setq pos (point)) |
| 2751 | (or gud-overlay-arrow-position | 2752 | (or gud-overlay-arrow-position |
| 2752 | (setq gud-overlay-arrow-position (make-marker))) | 2753 | (setq gud-overlay-arrow-position (make-marker))) |
| 2753 | (set-marker gud-overlay-arrow-position (point) (current-buffer))) | 2754 | (set-marker gud-overlay-arrow-position (point) (current-buffer)) |
| 2755 | ;; If they turned on hl-line, move the hl-line highlight to | ||
| 2756 | ;; the arrow's line. | ||
| 2757 | (when (featurep 'hl-line) | ||
| 2758 | (cond | ||
| 2759 | (global-hl-line-mode | ||
| 2760 | (global-hl-line-highlight)) | ||
| 2761 | ((and hl-line-mode hl-line-sticky-flag) | ||
| 2762 | (hl-line-highlight))))) | ||
| 2754 | (cond ((or (< pos (point-min)) (> pos (point-max))) | 2763 | (cond ((or (< pos (point-min)) (> pos (point-max))) |
| 2755 | (widen) | 2764 | (widen) |
| 2756 | (goto-char pos)))) | 2765 | (goto-char pos)))) |
diff --git a/lisp/subr.el b/lisp/subr.el index c03fa3be5a0..a3e696d0e95 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -42,17 +42,15 @@ Each element of this list holds the arguments to one call to `defcustom'.") | |||
| 42 | (defalias 'not 'null) | 42 | (defalias 'not 'null) |
| 43 | 43 | ||
| 44 | (defmacro noreturn (form) | 44 | (defmacro noreturn (form) |
| 45 | "Evaluates FORM, with the expectation that the evaluation will signal an error | 45 | "Evaluate FORM, expecting it not to return. |
| 46 | instead of returning to its caller. If FORM does return, an error is | 46 | If FORM does return, signal an error." |
| 47 | signaled." | ||
| 48 | `(prog1 ,form | 47 | `(prog1 ,form |
| 49 | (error "Form marked with `noreturn' did return"))) | 48 | (error "Form marked with `noreturn' did return"))) |
| 50 | 49 | ||
| 51 | (defmacro 1value (form) | 50 | (defmacro 1value (form) |
| 52 | "Evaluates FORM, with the expectation that the same value will be returned | 51 | "Evaluate FORM, expecting a constant return value. |
| 53 | from all evaluations of FORM. This is the global do-nothing | 52 | This is the global do-nothing version. There is also `testcover-1value' |
| 54 | version of `1value'. There is also `testcover-1value' that | 53 | that complains if FORM ever does return differing values." |
| 55 | complains if FORM ever does return differing values." | ||
| 56 | form) | 54 | form) |
| 57 | 55 | ||
| 58 | (defmacro lambda (&rest cdr) | 56 | (defmacro lambda (&rest cdr) |
| @@ -1686,7 +1684,7 @@ This finishes the change group by reverting all of its changes." | |||
| 1686 | (when (and (consp elt) (not (eq elt (last pending-undo-list)))) | 1684 | (when (and (consp elt) (not (eq elt (last pending-undo-list)))) |
| 1687 | (error "Undoing to some unrelated state")) | 1685 | (error "Undoing to some unrelated state")) |
| 1688 | ;; Undo it all. | 1686 | ;; Undo it all. |
| 1689 | (while pending-undo-list (undo-more 1)) | 1687 | (while (listp pending-undo-list) (undo-more 1)) |
| 1690 | ;; Reset the modified cons cell ELT to its original content. | 1688 | ;; Reset the modified cons cell ELT to its original content. |
| 1691 | (when (consp elt) | 1689 | (when (consp elt) |
| 1692 | (setcar elt old-car) | 1690 | (setcar elt old-car) |
diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index 161b5fbc126..10b2ca206e9 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el | |||
| @@ -853,7 +853,7 @@ The following is a complex example, see http://link.aps.org/linkfaq.html. | |||
| 853 | :group 'bibtex | 853 | :group 'bibtex |
| 854 | :type 'boolean) | 854 | :type 'boolean) |
| 855 | 855 | ||
| 856 | ;; `bibtex-font-lock-keywords' is a user option as well, but since the | 856 | ;; `bibtex-font-lock-keywords' is a user option, too. But since the |
| 857 | ;; patterns used to define this variable are defined in a later | 857 | ;; patterns used to define this variable are defined in a later |
| 858 | ;; section of this file, it is defined later. | 858 | ;; section of this file, it is defined later. |
| 859 | 859 | ||
| @@ -1091,7 +1091,7 @@ The CDRs of the elements are t for header keys and nil for crossref keys.") | |||
| 1091 | "Regexp matching the name of a BibTeX field.") | 1091 | "Regexp matching the name of a BibTeX field.") |
| 1092 | 1092 | ||
| 1093 | (defconst bibtex-name-part | 1093 | (defconst bibtex-name-part |
| 1094 | (concat ",[ \t\n]*\\(" bibtex-field-name "\\)[ \t\n]*=") | 1094 | (concat ",[ \t\n]*\\(" bibtex-field-name "\\)") |
| 1095 | "Regexp matching the name part of a BibTeX field.") | 1095 | "Regexp matching the name part of a BibTeX field.") |
| 1096 | 1096 | ||
| 1097 | (defconst bibtex-reference-key "[][[:alnum:].:;?!`'/*@+|()<>&_^$-]+" | 1097 | (defconst bibtex-reference-key "[][[:alnum:].:;?!`'/*@+|()<>&_^$-]+" |
| @@ -1105,16 +1105,6 @@ The CDRs of the elements are t for header keys and nil for crossref keys.") | |||
| 1105 | (regexp-opt (mapcar 'car bibtex-entry-field-alist)) "\\)") | 1105 | (regexp-opt (mapcar 'car bibtex-entry-field-alist)) "\\)") |
| 1106 | "Regexp matching the name of a BibTeX entry.") | 1106 | "Regexp matching the name of a BibTeX entry.") |
| 1107 | 1107 | ||
| 1108 | (defvar bibtex-entry-type-whitespace | ||
| 1109 | (concat "[ \t]*" bibtex-entry-type) | ||
| 1110 | "Regexp matching the name of a BibTeX entry preceded by whitespace.") | ||
| 1111 | |||
| 1112 | (defvar bibtex-entry-type-str | ||
| 1113 | (concat "@[ \t]*\\(?:" | ||
| 1114 | (regexp-opt (append '("String") | ||
| 1115 | (mapcar 'car bibtex-entry-field-alist))) "\\)") | ||
| 1116 | "Regexp matching the name of a BibTeX entry (including @String).") | ||
| 1117 | |||
| 1118 | (defvar bibtex-entry-head | 1108 | (defvar bibtex-entry-head |
| 1119 | (concat "^[ \t]*\\(" | 1109 | (concat "^[ \t]*\\(" |
| 1120 | bibtex-entry-type | 1110 | bibtex-entry-type |
| @@ -1132,15 +1122,18 @@ The CDRs of the elements are t for header keys and nil for crossref keys.") | |||
| 1132 | bibtex-reference-key "\\)?") | 1122 | bibtex-reference-key "\\)?") |
| 1133 | "Regexp matching the header line of any BibTeX entry (possibly without key).") | 1123 | "Regexp matching the header line of any BibTeX entry (possibly without key).") |
| 1134 | 1124 | ||
| 1125 | (defvar bibtex-any-valid-entry-type | ||
| 1126 | (concat "^[ \t]*@[ \t]*\\(?:" | ||
| 1127 | (regexp-opt (append '("String" "Preamble") | ||
| 1128 | (mapcar 'car bibtex-entry-field-alist))) "\\)") | ||
| 1129 | "Regexp matching any valid BibTeX entry (including String and Preamble).") | ||
| 1130 | |||
| 1135 | (defconst bibtex-type-in-head 1 | 1131 | (defconst bibtex-type-in-head 1 |
| 1136 | "Regexp subexpression number of the type part in `bibtex-entry-head'.") | 1132 | "Regexp subexpression number of the type part in `bibtex-entry-head'.") |
| 1137 | 1133 | ||
| 1138 | (defconst bibtex-key-in-head 2 | 1134 | (defconst bibtex-key-in-head 2 |
| 1139 | "Regexp subexpression number of the key part in `bibtex-entry-head'.") | 1135 | "Regexp subexpression number of the key part in `bibtex-entry-head'.") |
| 1140 | 1136 | ||
| 1141 | (defconst bibtex-empty-field-re "\\`\\(\"\"\\|{}\\)\\'" | ||
| 1142 | "Regexp matching the text part (as a string) of an empty field.") | ||
| 1143 | |||
| 1144 | (defconst bibtex-string-type "^[ \t]*\\(@[ \t]*String\\)[ \t]*[({][ \t\n]*" | 1137 | (defconst bibtex-string-type "^[ \t]*\\(@[ \t]*String\\)[ \t]*[({][ \t\n]*" |
| 1145 | "Regexp matching the name of a BibTeX String entry.") | 1138 | "Regexp matching the name of a BibTeX String entry.") |
| 1146 | 1139 | ||
| @@ -1148,8 +1141,9 @@ The CDRs of the elements are t for header keys and nil for crossref keys.") | |||
| 1148 | (concat bibtex-string-type "\\(" bibtex-reference-key "\\)?") | 1141 | (concat bibtex-string-type "\\(" bibtex-reference-key "\\)?") |
| 1149 | "Regexp matching the header line of a BibTeX String entry.") | 1142 | "Regexp matching the header line of a BibTeX String entry.") |
| 1150 | 1143 | ||
| 1151 | (defconst bibtex-preamble-prefix "[ \t]*@[ \t]*Preamble[ \t]*" | 1144 | (defconst bibtex-preamble-prefix |
| 1152 | "Regexp matching the prefix part of a preamble.") | 1145 | "[ \t]*\\(@[ \t]*Preamble\\)[ \t]*[({][ \t\n]*" |
| 1146 | "Regexp matching the prefix part of a BibTeX Preamble entry.") | ||
| 1153 | 1147 | ||
| 1154 | (defconst bibtex-font-lock-syntactic-keywords | 1148 | (defconst bibtex-font-lock-syntactic-keywords |
| 1155 | `((,(concat "^[ \t]*\\(" (substring bibtex-comment-start 0 1) "\\)" | 1149 | `((,(concat "^[ \t]*\\(" (substring bibtex-comment-start 0 1) "\\)" |
| @@ -1229,12 +1223,9 @@ very first character of the match, the actual starting position of the name | |||
| 1229 | part and end position of the match. Move point to end of field name. | 1223 | part and end position of the match. Move point to end of field name. |
| 1230 | If `bibtex-autoadd-commas' is non-nil add missing comma at end of preceding | 1224 | If `bibtex-autoadd-commas' is non-nil add missing comma at end of preceding |
| 1231 | BibTeX field as necessary." | 1225 | BibTeX field as necessary." |
| 1232 | (cond ((looking-at ",[ \t\n]*") | 1226 | (cond ((looking-at bibtex-name-part) |
| 1233 | (let ((start (point))) | 1227 | (goto-char (match-end 0)) |
| 1234 | (goto-char (match-end 0)) | 1228 | (list (match-beginning 0) (match-beginning 1) (match-end 0))) |
| 1235 | (when (looking-at bibtex-field-name) | ||
| 1236 | (goto-char (match-end 0)) | ||
| 1237 | (list start (match-beginning 0) (match-end 0))))) | ||
| 1238 | ;; Maybe add a missing comma. | 1229 | ;; Maybe add a missing comma. |
| 1239 | ((and bibtex-autoadd-commas | 1230 | ((and bibtex-autoadd-commas |
| 1240 | (looking-at (concat "[ \t\n]*\\(?:" bibtex-field-name | 1231 | (looking-at (concat "[ \t\n]*\\(?:" bibtex-field-name |
| @@ -1334,60 +1325,71 @@ the boundaries of the name and text parts of the field. Do not move point." | |||
| 1334 | "Search forward to find a BibTeX field of name NAME. | 1325 | "Search forward to find a BibTeX field of name NAME. |
| 1335 | If a syntactically correct field is found, return a pair containing | 1326 | If a syntactically correct field is found, return a pair containing |
| 1336 | the boundaries of the name and text parts of the field. The search | 1327 | the boundaries of the name and text parts of the field. The search |
| 1337 | is limited by optional arg BOUND or if nil by the end of the current | 1328 | is limited by optional arg BOUND. If BOUND is t the search is limited |
| 1338 | entry. Do not move point." | 1329 | by the end of the current entry. Do not move point." |
| 1339 | (save-match-data | 1330 | (save-match-data |
| 1340 | (save-excursion | 1331 | (save-excursion |
| 1341 | (if bound | 1332 | (if (eq bound t) |
| 1342 | ;; If the search is bounded we need not worry we could overshoot. | 1333 | (let ((regexp (concat bibtex-name-part "[ \t\n]*=\\|" |
| 1343 | ;; This is indeed the case when `bibtex-search-forward-field' is | 1334 | bibtex-any-entry-maybe-empty-head)) |
| 1344 | ;; called many times. So we optimize this part of this function. | 1335 | (case-fold-search t) bounds) |
| 1345 | (let ((name-part (concat ",[ \t\n]*\\(" name "\\)[ \t\n]*=[ \t\n]*")) | 1336 | (catch 'done |
| 1346 | (case-fold-search t) left right) | 1337 | (if (looking-at "[ \t]*@") (goto-char (match-end 0))) |
| 1347 | (while (and (not right) | 1338 | (while (and (not bounds) |
| 1348 | (re-search-forward name-part bound t)) | 1339 | (re-search-forward regexp nil t)) |
| 1349 | (setq left (list (match-beginning 0) (match-beginning 1) | 1340 | (if (match-beginning 2) |
| 1350 | (match-end 1)) | 1341 | ;; We found a new entry |
| 1351 | ;; Don't worry that the field text could be past bound. | 1342 | (throw 'done nil) |
| 1352 | right (bibtex-parse-field-text))) | 1343 | ;; We found a field |
| 1353 | (if right (cons left right))) | 1344 | (goto-char (match-beginning 0)) |
| 1354 | (let ((regexp (concat bibtex-name-part "\\|" | 1345 | (setq bounds (bibtex-parse-field)))) |
| 1355 | bibtex-any-entry-maybe-empty-head)) | 1346 | ;; Step through all fields so that we cannot overshoot. |
| 1356 | (case-fold-search t) bounds) | 1347 | (while bounds |
| 1357 | (catch 'done | 1348 | (goto-char (bibtex-start-of-name-in-field bounds)) |
| 1358 | (if (looking-at "[ \t]*@") (goto-char (match-end 0))) | 1349 | (if (looking-at name) (throw 'done bounds)) |
| 1359 | (while (and (not bounds) | 1350 | (goto-char (bibtex-end-of-field bounds)) |
| 1360 | (re-search-forward regexp nil t)) | 1351 | (setq bounds (bibtex-parse-field))))) |
| 1361 | (if (match-beginning 2) | 1352 | ;; Bounded search or bound is nil (i.e. we cannot overshoot). |
| 1362 | ;; We found a new entry | 1353 | ;; Indeed, the search is bounded when `bibtex-search-forward-field' |
| 1363 | (throw 'done nil) | 1354 | ;; is called many times. So we optimize this part of this function. |
| 1364 | ;; We found a field | 1355 | (let ((name-part (concat ",[ \t\n]*\\(" name "\\)[ \t\n]*=[ \t\n]*")) |
| 1365 | (goto-char (match-beginning 0)) | 1356 | (case-fold-search t) left right) |
| 1366 | (setq bounds (bibtex-parse-field)))) | 1357 | (while (and (not right) |
| 1367 | ;; Step through all fields so that we cannot overshoot. | 1358 | (re-search-forward name-part bound t)) |
| 1368 | (while bounds | 1359 | (setq left (list (match-beginning 0) (match-beginning 1) |
| 1369 | (goto-char (bibtex-start-of-name-in-field bounds)) | 1360 | (match-end 1)) |
| 1370 | (if (looking-at name) (throw 'done bounds)) | 1361 | ;; Don't worry that the field text could be past bound. |
| 1371 | (goto-char (bibtex-end-of-field bounds)) | 1362 | right (bibtex-parse-field-text))) |
| 1372 | (setq bounds (bibtex-parse-field))))))))) | 1363 | (if right (cons left right))))))) |
| 1373 | 1364 | ||
| 1374 | (defun bibtex-search-backward-field (name &optional bound) | 1365 | (defun bibtex-search-backward-field (name &optional bound) |
| 1375 | "Search backward to find a BibTeX field of name NAME. | 1366 | "Search backward to find a BibTeX field of name NAME. |
| 1376 | If a syntactically correct field is found, return a pair containing | 1367 | If a syntactically correct field is found, return a pair containing |
| 1377 | the boundaries of the name and text parts of the field. The search | 1368 | the boundaries of the name and text parts of the field. The search |
| 1378 | is limited by the optional arg BOUND. If BOUND is nil the search is | 1369 | is limited by the optional arg BOUND. If BOUND is t the search is |
| 1379 | limited by the beginning of the current entry. Do not move point." | 1370 | limited by the beginning of the current entry. Do not move point." |
| 1380 | (save-match-data | 1371 | (save-match-data |
| 1381 | (save-excursion | 1372 | (if (eq bound t) |
| 1382 | (let ((name-part (concat ",[ \t\n]*\\(?:" name "\\)[ \t\n]*=")) | 1373 | (setq bound (save-excursion (bibtex-beginning-of-entry)))) |
| 1383 | (case-fold-search t) | 1374 | (let ((name-part (concat ",[ \t\n]*\\(" name "\\)[ \t\n]*=[ \t\n]*")) |
| 1384 | bounds) | 1375 | (case-fold-search t) left right) |
| 1385 | (unless bound (setq bound (save-excursion (bibtex-beginning-of-entry)))) | 1376 | (save-excursion |
| 1386 | (while (and (not bounds) | 1377 | ;; the parsing functions are not designed for parsing backwards :-( |
| 1387 | (search-backward "," bound t) | 1378 | (when (search-backward "," bound t) |
| 1388 | (looking-at name-part)) | 1379 | (or (save-excursion |
| 1389 | (setq bounds (bibtex-parse-field))) | 1380 | (when (looking-at name-part) |
| 1390 | bounds)))) | 1381 | (setq left (list (match-beginning 0) (match-beginning 1) |
| 1382 | (match-end 1))) | ||
| 1383 | (goto-char (match-end 0)) | ||
| 1384 | (setq right (bibtex-parse-field-text)))) | ||
| 1385 | (while (and (not right) | ||
| 1386 | (re-search-backward name-part bound t)) | ||
| 1387 | (setq left (list (match-beginning 0) (match-beginning 1) | ||
| 1388 | (match-end 1))) | ||
| 1389 | (save-excursion | ||
| 1390 | (goto-char (match-end 0)) | ||
| 1391 | (setq right (bibtex-parse-field-text))))) | ||
| 1392 | (if right (cons left right))))))) | ||
| 1391 | 1393 | ||
| 1392 | (defun bibtex-name-in-field (bounds &optional remove-opt-alt) | 1394 | (defun bibtex-name-in-field (bounds &optional remove-opt-alt) |
| 1393 | "Get content of name in BibTeX field defined via BOUNDS. | 1395 | "Get content of name in BibTeX field defined via BOUNDS. |
| @@ -1407,25 +1409,22 @@ by removing field delimiters and concatenating the resulting string. | |||
| 1407 | If `bibtex-expand-strings' is non-nil, also expand BibTeX strings." | 1409 | If `bibtex-expand-strings' is non-nil, also expand BibTeX strings." |
| 1408 | (if content | 1410 | (if content |
| 1409 | (save-excursion | 1411 | (save-excursion |
| 1412 | (goto-char (bibtex-start-of-text-in-field bounds)) | ||
| 1410 | (let ((epoint (bibtex-end-of-text-in-field bounds)) | 1413 | (let ((epoint (bibtex-end-of-text-in-field bounds)) |
| 1411 | content opoint temp) | 1414 | content opoint) |
| 1412 | (goto-char (bibtex-start-of-text-in-field bounds)) | ||
| 1413 | (while (< (setq opoint (point)) epoint) | 1415 | (while (< (setq opoint (point)) epoint) |
| 1414 | (cond ((looking-at bibtex-field-const) | 1416 | (if (looking-at bibtex-field-const) |
| 1415 | (let ((mtch (match-string-no-properties 0))) | 1417 | (let ((mtch (match-string-no-properties 0))) |
| 1416 | (goto-char (match-end 0)) | 1418 | (push (or (if bibtex-expand-strings |
| 1417 | (setq temp (if bibtex-expand-strings | 1419 | (cdr (assoc-string mtch (bibtex-strings) t))) |
| 1418 | (cdr (assoc-string mtch (bibtex-strings) t))) | 1420 | mtch) content) |
| 1419 | content (concat content (or temp mtch))))) | 1421 | (goto-char (match-end 0))) |
| 1420 | 1422 | (let ((bounds (bibtex-parse-field-string))) | |
| 1421 | ((setq temp (bibtex-parse-field-string)) | 1423 | (push (buffer-substring-no-properties |
| 1422 | (setq content (concat content (buffer-substring-no-properties | 1424 | (1+ (car bounds)) (1- (cdr bounds))) content) |
| 1423 | (1+ (car temp)) | 1425 | (goto-char (cdr bounds)))) |
| 1424 | (1- (cdr temp))))) | ||
| 1425 | (goto-char (cdr temp))) | ||
| 1426 | (t (error "Malformed text field"))) | ||
| 1427 | (re-search-forward "\\=[ \t\n]*#[ \t\n]*" nil t)) | 1426 | (re-search-forward "\\=[ \t\n]*#[ \t\n]*" nil t)) |
| 1428 | content)) | 1427 | (apply 'concat (nreverse content)))) |
| 1429 | (buffer-substring-no-properties (bibtex-start-of-text-in-field bounds) | 1428 | (buffer-substring-no-properties (bibtex-start-of-text-in-field bounds) |
| 1430 | (bibtex-end-of-text-in-field bounds)))) | 1429 | (bibtex-end-of-text-in-field bounds)))) |
| 1431 | 1430 | ||
| @@ -1434,19 +1433,15 @@ If `bibtex-expand-strings' is non-nil, also expand BibTeX strings." | |||
| 1434 | Return nil if not found. | 1433 | Return nil if not found. |
| 1435 | If optional arg FOLLOW-CROSSREF is non-nil, follow crossref." | 1434 | If optional arg FOLLOW-CROSSREF is non-nil, follow crossref." |
| 1436 | (save-excursion | 1435 | (save-excursion |
| 1437 | (save-restriction | 1436 | (let* ((end (if follow-crossref (bibtex-end-of-entry) t)) |
| 1438 | ;; We want to jump back and forth while searching FIELD | 1437 | (beg (bibtex-beginning-of-entry)) ; move point |
| 1439 | (bibtex-narrow-to-entry) | 1438 | (bounds (bibtex-search-forward-field field end))) |
| 1440 | (goto-char (point-min)) | 1439 | (cond (bounds (bibtex-text-in-field-bounds bounds t)) |
| 1441 | (let ((bounds (bibtex-search-forward-field field (point-max))) | 1440 | ((and follow-crossref |
| 1442 | crossref-field) | 1441 | (progn (goto-char beg) |
| 1443 | (cond (bounds (bibtex-text-in-field-bounds bounds t)) | 1442 | (setq bounds (bibtex-search-forward-field |
| 1444 | ((and follow-crossref | 1443 | "\\(OPT\\)?crossref" end)))) |
| 1445 | (progn (goto-char (point-min)) | 1444 | (let ((crossref-field (bibtex-text-in-field-bounds bounds t))) |
| 1446 | (setq bounds (bibtex-search-forward-field | ||
| 1447 | "\\(OPT\\)?crossref" (point-max))))) | ||
| 1448 | (setq crossref-field (bibtex-text-in-field-bounds bounds t)) | ||
| 1449 | (widen) | ||
| 1450 | (if (bibtex-find-crossref crossref-field) | 1445 | (if (bibtex-find-crossref crossref-field) |
| 1451 | ;; Do not pass FOLLOW-CROSSREF because we want | 1446 | ;; Do not pass FOLLOW-CROSSREF because we want |
| 1452 | ;; to follow crossrefs only one level of recursion. | 1447 | ;; to follow crossrefs only one level of recursion. |
| @@ -1487,42 +1482,28 @@ character of the string entry. Move point past BibTeX string entry." | |||
| 1487 | (nth 1 bounds) | 1482 | (nth 1 bounds) |
| 1488 | (match-end 0)))))) | 1483 | (match-end 0)))))) |
| 1489 | 1484 | ||
| 1490 | (defun bibtex-parse-string () | 1485 | (defun bibtex-parse-string (&optional empty-key) |
| 1491 | "Parse a BibTeX string entry beginning at the position of point. | 1486 | "Parse a BibTeX string entry beginning at the position of point. |
| 1492 | If a syntactically correct entry is found, return a cons pair containing | 1487 | If a syntactically correct entry is found, return a cons pair containing |
| 1493 | the boundaries of the reference key and text parts of the entry. | 1488 | the boundaries of the reference key and text parts of the entry. |
| 1494 | Do not move point." | 1489 | If EMPTY-KEY is non-nil, key may be empty. Do not move point." |
| 1495 | (bibtex-parse-association 'bibtex-parse-string-prefix | 1490 | (let ((bibtex-string-empty-key empty-key)) |
| 1496 | 'bibtex-parse-string-postfix)) | 1491 | (bibtex-parse-association 'bibtex-parse-string-prefix |
| 1492 | 'bibtex-parse-string-postfix))) | ||
| 1497 | 1493 | ||
| 1498 | (defun bibtex-search-forward-string () | 1494 | (defun bibtex-search-forward-string (&optional empty-key) |
| 1499 | "Search forward to find a BibTeX string entry. | 1495 | "Search forward to find a BibTeX string entry. |
| 1500 | If a syntactically correct entry is found, a pair containing the boundaries of | 1496 | If a syntactically correct entry is found, a pair containing the boundaries of |
| 1501 | the reference key and text parts of the string is returned. Do not move point." | 1497 | the reference key and text parts of the string is returned. |
| 1498 | If EMPTY-KEY is non-nil, key may be empty. Do not move point." | ||
| 1502 | (save-excursion | 1499 | (save-excursion |
| 1503 | (save-match-data | 1500 | (save-match-data |
| 1504 | (let ((case-fold-search t) | 1501 | (let ((case-fold-search t) bounds) |
| 1505 | boundaries) | 1502 | (while (and (not bounds) |
| 1506 | (while (and (not boundaries) | ||
| 1507 | (search-forward-regexp bibtex-string-type nil t)) | 1503 | (search-forward-regexp bibtex-string-type nil t)) |
| 1508 | (goto-char (match-beginning 0)) | 1504 | (save-excursion (goto-char (match-beginning 0)) |
| 1509 | (unless (setq boundaries (bibtex-parse-string)) | 1505 | (setq bounds (bibtex-parse-string empty-key)))) |
| 1510 | (forward-char 1))) | 1506 | bounds)))) |
| 1511 | boundaries)))) | ||
| 1512 | |||
| 1513 | (defun bibtex-search-backward-string () | ||
| 1514 | "Search backward to find a BibTeX string entry. | ||
| 1515 | If a syntactically correct entry is found, a pair containing the boundaries of | ||
| 1516 | the reference key and text parts of the field is returned. Do not move point." | ||
| 1517 | (save-excursion | ||
| 1518 | (save-match-data | ||
| 1519 | (let ((case-fold-search t) | ||
| 1520 | boundaries) | ||
| 1521 | (while (and (not boundaries) | ||
| 1522 | (search-backward-regexp bibtex-string-type nil t)) | ||
| 1523 | (goto-char (match-beginning 0)) | ||
| 1524 | (setq boundaries (bibtex-parse-string))) | ||
| 1525 | boundaries)))) | ||
| 1526 | 1507 | ||
| 1527 | (defun bibtex-reference-key-in-string (bounds) | 1508 | (defun bibtex-reference-key-in-string (bounds) |
| 1528 | "Return the key part of a BibTeX string defined via BOUNDS" | 1509 | "Return the key part of a BibTeX string defined via BOUNDS" |
| @@ -1554,14 +1535,15 @@ If `bibtex-expand-strings' is non-nil, also expand BibTeX strings." | |||
| 1554 | (or (match-string-no-properties bibtex-key-in-head) | 1535 | (or (match-string-no-properties bibtex-key-in-head) |
| 1555 | empty)) | 1536 | empty)) |
| 1556 | 1537 | ||
| 1557 | (defun bibtex-preamble-prefix (&optional delim) | 1538 | (defun bibtex-parse-preamble () |
| 1558 | "Parse the prefix part of a BibTeX Preamble. | 1539 | "Parse BibTeX preamble. |
| 1559 | Point must be at beginning of prefix part. If prefix is found move point | 1540 | Point must be at beginning of preamble. Do not move point." |
| 1560 | to its end and return position of point. If optional arg DELIM is non-nil, | ||
| 1561 | move past the opening delimiter. If no preamble is found return nil." | ||
| 1562 | (let ((case-fold-search t)) | 1541 | (let ((case-fold-search t)) |
| 1563 | (re-search-forward (concat "\\=" bibtex-preamble-prefix | 1542 | (when (looking-at bibtex-preamble-prefix) |
| 1564 | (if delim "[({][ \t\n]*")) nil t))) | 1543 | (let ((start (match-beginning 0)) (pref-start (match-beginning 1)) |
| 1544 | (bounds (save-excursion (goto-char (match-end 0)) | ||
| 1545 | (bibtex-parse-string-postfix)))) | ||
| 1546 | (if bounds (cons (list start pref-start) bounds)))))) | ||
| 1565 | 1547 | ||
| 1566 | ;; Helper Functions | 1548 | ;; Helper Functions |
| 1567 | 1549 | ||
| @@ -1579,6 +1561,35 @@ move past the opening delimiter. If no preamble is found return nil." | |||
| 1579 | (+ (count-lines 1 (point)) | 1561 | (+ (count-lines 1 (point)) |
| 1580 | (if (bolp) 1 0))) | 1562 | (if (bolp) 1 0))) |
| 1581 | 1563 | ||
| 1564 | (defun bibtex-valid-entry (&optional empty-key) | ||
| 1565 | "Parse a valid BibTeX entry (maybe without key if EMPTY-KEY is t). | ||
| 1566 | A valid entry is a syntactical correct one with type contained in | ||
| 1567 | `bibtex-entry-field-alist'. Ignore @String and @Preamble entries. | ||
| 1568 | Return a cons pair with buffer positions of beginning and end of entry | ||
| 1569 | if a valid entry is found, nil otherwise. Do not move point. | ||
| 1570 | After a call to this function `match-data' corresponds to the header | ||
| 1571 | of the entry, see regexp `bibtex-entry-head'." | ||
| 1572 | (let ((case-fold-search t) end) | ||
| 1573 | (if (looking-at (if empty-key bibtex-entry-maybe-empty-head | ||
| 1574 | bibtex-entry-head)) | ||
| 1575 | (save-excursion | ||
| 1576 | (save-match-data | ||
| 1577 | (goto-char (match-end 0)) | ||
| 1578 | (let ((entry-closer | ||
| 1579 | (if (save-excursion | ||
| 1580 | (goto-char (match-end bibtex-type-in-head)) | ||
| 1581 | (looking-at "[ \t]*(")) | ||
| 1582 | ",?[ \t\n]*)" ;; entry opened with `(' | ||
| 1583 | ",?[ \t\n]*}")) ;; entry opened with `{' | ||
| 1584 | bounds) | ||
| 1585 | (skip-chars-forward " \t\n") | ||
| 1586 | ;; loop over all BibTeX fields | ||
| 1587 | (while (setq bounds (bibtex-parse-field)) | ||
| 1588 | (goto-char (bibtex-end-of-field bounds))) | ||
| 1589 | ;; This matches the infix* part. | ||
| 1590 | (if (looking-at entry-closer) (setq end (match-end 0))))) | ||
| 1591 | (if end (cons (match-beginning 0) end)))))) | ||
| 1592 | |||
| 1582 | (defun bibtex-skip-to-valid-entry (&optional backward) | 1593 | (defun bibtex-skip-to-valid-entry (&optional backward) |
| 1583 | "Move point to beginning of the next valid BibTeX entry. | 1594 | "Move point to beginning of the next valid BibTeX entry. |
| 1584 | Do not move if we are already at beginning of a valid BibTeX entry. | 1595 | Do not move if we are already at beginning of a valid BibTeX entry. |
| @@ -1590,32 +1601,27 @@ entry. Return buffer position of beginning and end of entry if a valid | |||
| 1590 | entry is found, nil otherwise." | 1601 | entry is found, nil otherwise." |
| 1591 | (interactive "P") | 1602 | (interactive "P") |
| 1592 | (let ((case-fold-search t) | 1603 | (let ((case-fold-search t) |
| 1593 | found) | 1604 | found bounds) |
| 1594 | (beginning-of-line) | 1605 | (beginning-of-line) |
| 1595 | ;; Loop till we look at a valid entry. | 1606 | ;; Loop till we look at a valid entry. |
| 1596 | (while (not (or found (if backward (bobp) (eobp)))) | 1607 | (while (not (or found (if backward (bobp) (eobp)))) |
| 1597 | (let ((pnt (point)) | 1608 | (cond ((setq found (or (bibtex-valid-entry) |
| 1598 | bounds) | 1609 | (and (not bibtex-sort-ignore-string-entries) |
| 1599 | (cond ((or (and (looking-at bibtex-entry-type-whitespace) | 1610 | (setq bounds (bibtex-parse-string)) |
| 1600 | (setq found (bibtex-search-entry nil nil t)) | 1611 | (cons (bibtex-start-of-field bounds) |
| 1601 | (equal (match-beginning 0) pnt)) | 1612 | (bibtex-end-of-string bounds)))))) |
| 1602 | (and (not bibtex-sort-ignore-string-entries) | 1613 | (backward (re-search-backward "^[ \t]*@" nil 'move)) |
| 1603 | (setq bounds (bibtex-parse-string)) | 1614 | (t (if (re-search-forward "\n\\([ \t]*@\\)" nil 'move) |
| 1604 | (setq found (cons (bibtex-start-of-field bounds) | 1615 | (goto-char (match-beginning 1)))))) |
| 1605 | (bibtex-end-of-string bounds))))) | ||
| 1606 | (goto-char pnt)) | ||
| 1607 | (backward (re-search-backward "^[ \t]*@" nil 'move)) | ||
| 1608 | (t (re-search-forward "\\=[ \t]*@" nil t) ;; don't be stuck | ||
| 1609 | (if (re-search-forward "^[ \t]*@" nil 'move) | ||
| 1610 | (goto-char (match-beginning 0))))))) | ||
| 1611 | found)) | 1616 | found)) |
| 1612 | 1617 | ||
| 1613 | (defun bibtex-map-entries (fun) | 1618 | (defun bibtex-map-entries (fun) |
| 1614 | "Call FUN for each BibTeX entry in buffer (possibly narrowed). | 1619 | "Call FUN for each BibTeX entry in buffer (possibly narrowed). |
| 1615 | FUN is called with three arguments, the key of the entry and the buffer | 1620 | FUN is called with three arguments, the key of the entry and the buffer |
| 1616 | positions (marker) of beginning and end of entry. Point is inside the entry. | 1621 | positions of beginning and end of entry. Also, point is at beginning of |
| 1617 | If `bibtex-sort-ignore-string-entries' is non-nil, FUN is not called for | 1622 | entry and `match-data' corresponds to the header of the entry, |
| 1618 | @String entries." | 1623 | see regexp `bibtex-entry-head'. If `bibtex-sort-ignore-string-entries' |
| 1624 | is non-nil, FUN is not called for @String entries." | ||
| 1619 | (let ((case-fold-search t) | 1625 | (let ((case-fold-search t) |
| 1620 | found) | 1626 | found) |
| 1621 | (save-excursion | 1627 | (save-excursion |
| @@ -1673,75 +1679,19 @@ If FLAG is nil, a message is echoed if point was incremented at least | |||
| 1673 | "}" | 1679 | "}" |
| 1674 | ")")) | 1680 | ")")) |
| 1675 | 1681 | ||
| 1676 | (defun bibtex-search-entry (empty-head &optional bound noerror backward) | 1682 | (defun bibtex-flash-head (prompt) |
| 1677 | "Search for a BibTeX entry (maybe without reference key if EMPTY-HEAD is t). | ||
| 1678 | BOUND and NOERROR are exactly as in `re-search-forward'. If BACKWARD | ||
| 1679 | is non-nil, search in reverse direction. Move point past the closing | ||
| 1680 | delimiter (at the beginning of entry if BACKWARD is non-nil). | ||
| 1681 | Return a cons pair with buffer positions of beginning and end of entry. | ||
| 1682 | After a call to this function `match-data' corresponds to the head part | ||
| 1683 | of the entry, see regexp `bibtex-entry-head'. | ||
| 1684 | Ignore @String and @Preamble entries." | ||
| 1685 | (let ((pnt (point)) | ||
| 1686 | (entry-head-re (if empty-head | ||
| 1687 | bibtex-entry-maybe-empty-head | ||
| 1688 | bibtex-entry-head))) | ||
| 1689 | (if backward | ||
| 1690 | (let (found) | ||
| 1691 | (while (and (not found) | ||
| 1692 | (re-search-backward entry-head-re bound noerror)) | ||
| 1693 | (setq found (bibtex-search-entry empty-head pnt t))) | ||
| 1694 | (cond (found | ||
| 1695 | (goto-char (match-beginning 0)) | ||
| 1696 | found) | ||
| 1697 | ((not noerror) ;; yell | ||
| 1698 | (error "Backward search of BibTeX entry failed")) | ||
| 1699 | (t (if (eq noerror t) (goto-char pnt)) ;; don't move | ||
| 1700 | nil))) | ||
| 1701 | (let (found) | ||
| 1702 | (unless bound (setq bound (point-max))) | ||
| 1703 | (while (and (not found) | ||
| 1704 | (re-search-forward entry-head-re bound noerror)) | ||
| 1705 | (save-match-data | ||
| 1706 | (let ((entry-closer | ||
| 1707 | (if (save-excursion | ||
| 1708 | (goto-char (match-end bibtex-type-in-head)) | ||
| 1709 | (looking-at "[ \t]*(")) | ||
| 1710 | ",?[ \t\n]*)" ;; entry opened with `(' | ||
| 1711 | ",?[ \t\n]*}")) ;; entry opened with `{' | ||
| 1712 | bounds) | ||
| 1713 | (skip-chars-forward " \t\n" bound) | ||
| 1714 | ;; loop over all BibTeX fields | ||
| 1715 | (while (and (setq bounds (bibtex-parse-field)) | ||
| 1716 | (<= (bibtex-end-of-field bounds) bound)) | ||
| 1717 | (goto-char (bibtex-end-of-field bounds))) | ||
| 1718 | ;; This matches the infix* part. | ||
| 1719 | (when (and (looking-at entry-closer) | ||
| 1720 | (<= (match-end 0) bound)) | ||
| 1721 | (goto-char (match-end 0)) | ||
| 1722 | (setq found t))))) | ||
| 1723 | (cond (found | ||
| 1724 | (cons (match-beginning 0) (point))) | ||
| 1725 | ((not noerror) ;; yell | ||
| 1726 | (error "Search of BibTeX entry failed")) | ||
| 1727 | (t (if (eq noerror t) (goto-char pnt)) ;; don't move | ||
| 1728 | nil)))))) | ||
| 1729 | |||
| 1730 | (defun bibtex-flash-head () | ||
| 1731 | "Flash at BibTeX entry head before point, if exists." | 1683 | "Flash at BibTeX entry head before point, if exists." |
| 1732 | (let ((case-fold-search t) | 1684 | (let ((case-fold-search t) |
| 1733 | (pnt (point)) | 1685 | (pnt (point))) |
| 1734 | flash) | ||
| 1735 | (save-excursion | 1686 | (save-excursion |
| 1736 | (bibtex-beginning-of-entry) | 1687 | (bibtex-beginning-of-entry) |
| 1737 | (when (and (looking-at bibtex-any-entry-maybe-empty-head) | 1688 | (when (and (looking-at bibtex-any-entry-maybe-empty-head) |
| 1738 | (< (point) pnt)) | 1689 | (< (point) pnt)) |
| 1739 | (goto-char (match-beginning bibtex-type-in-head)) | 1690 | (goto-char (match-beginning bibtex-type-in-head)) |
| 1740 | (setq flash (match-end bibtex-key-in-head)) | ||
| 1741 | (if (pos-visible-in-window-p (point)) | 1691 | (if (pos-visible-in-window-p (point)) |
| 1742 | (sit-for 1) | 1692 | (sit-for 1) |
| 1743 | (message "From: %s" | 1693 | (message "%s%s" prompt (buffer-substring-no-properties |
| 1744 | (buffer-substring (point) flash))))))) | 1694 | (point) (match-end bibtex-key-in-head)))))))) |
| 1745 | 1695 | ||
| 1746 | (defun bibtex-make-optional-field (field) | 1696 | (defun bibtex-make-optional-field (field) |
| 1747 | "Make an optional field named FIELD in current BibTeX entry." | 1697 | "Make an optional field named FIELD in current BibTeX entry." |
| @@ -1772,66 +1722,55 @@ are ignored. Return point" | |||
| 1772 | (bibtex-skip-to-valid-entry) | 1722 | (bibtex-skip-to-valid-entry) |
| 1773 | (point)) | 1723 | (point)) |
| 1774 | 1724 | ||
| 1775 | (defun bibtex-inside-field () | 1725 | (defun bibtex-enclosing-field (&optional comma noerr) |
| 1776 | "Try to avoid point being at end of a BibTeX field." | ||
| 1777 | (end-of-line) | ||
| 1778 | (skip-chars-backward " \t") | ||
| 1779 | (if (= (preceding-char) ?,) | ||
| 1780 | (forward-char -2)) | ||
| 1781 | (if (or (= (preceding-char) ?}) | ||
| 1782 | (= (preceding-char) ?\")) | ||
| 1783 | (forward-char -1))) | ||
| 1784 | |||
| 1785 | (defun bibtex-enclosing-field (&optional noerr) | ||
| 1786 | "Search for BibTeX field enclosing point. | 1726 | "Search for BibTeX field enclosing point. |
| 1727 | For `bibtex-mode''s internal algorithms, a field begins at the comma | ||
| 1728 | following the preceding field. Usually, this is not what the user expects. | ||
| 1729 | Thus if COMMA is non-nil, the \"current field\" includes the terminating comma. | ||
| 1787 | Unless NOERR is non-nil, signal an error if no enclosing field is found. | 1730 | Unless NOERR is non-nil, signal an error if no enclosing field is found. |
| 1788 | On success return bounds, nil otherwise. Do not move point." | 1731 | On success return bounds, nil otherwise. Do not move point." |
| 1789 | (let ((bounds (bibtex-search-backward-field bibtex-field-name))) | 1732 | (save-excursion |
| 1790 | (if (and bounds | 1733 | (when comma |
| 1791 | (<= (bibtex-start-of-field bounds) (point)) | 1734 | (end-of-line) |
| 1792 | (>= (bibtex-end-of-field bounds) (point))) | 1735 | (skip-chars-backward " \t") |
| 1793 | bounds | 1736 | (if (= (preceding-char) ?,) (forward-char -1))) |
| 1794 | (unless noerr | 1737 | |
| 1795 | (error "Can't find enclosing BibTeX field"))))) | 1738 | (let ((bounds (bibtex-search-backward-field bibtex-field-name t))) |
| 1796 | 1739 | (cond ((and bounds | |
| 1797 | (defun bibtex-enclosing-entry-maybe-empty-head () | 1740 | (<= (bibtex-start-of-field bounds) (point)) |
| 1798 | "Search for BibTeX entry enclosing point. Move point to end of entry. | 1741 | (>= (bibtex-end-of-field bounds) (point))) |
| 1799 | Beginning (but not end) of entry is given by (`match-beginning' 0)." | 1742 | bounds) |
| 1800 | (let ((case-fold-search t) | 1743 | ((not noerr) |
| 1801 | (old-point (point))) | 1744 | (error "Can't find enclosing BibTeX field")))))) |
| 1802 | (unless (re-search-backward bibtex-entry-maybe-empty-head nil t) | 1745 | |
| 1803 | (goto-char old-point) | 1746 | (defun bibtex-beginning-first-field (&optional beg) |
| 1804 | (error "Can't find beginning of enclosing BibTeX entry")) | 1747 | "Move point to beginning of first field. |
| 1805 | (goto-char (match-beginning bibtex-type-in-head)) | 1748 | Optional arg BEG is beginning of entry." |
| 1806 | (unless (bibtex-search-entry t nil t) | 1749 | (if beg (goto-char beg) (bibtex-beginning-of-entry)) |
| 1807 | (goto-char old-point) | 1750 | (looking-at bibtex-any-entry-maybe-empty-head) |
| 1808 | (error "Can't find end of enclosing BibTeX entry")))) | 1751 | (goto-char (match-end 0))) |
| 1809 | 1752 | ||
| 1810 | (defun bibtex-insert-kill (n) | 1753 | (defun bibtex-insert-kill (n &optional comma) |
| 1811 | "Reinsert the Nth stretch of killed BibTeX text." | 1754 | "Reinsert the Nth stretch of killed BibTeX text (field or entry). |
| 1812 | (if (not bibtex-last-kill-command) | 1755 | Optional arg COMMA is as in `bibtex-enclosing-field'." |
| 1813 | (error "BibTeX kill ring is empty") | 1756 | (unless bibtex-last-kill-command (error "BibTeX kill ring is empty")) |
| 1814 | (let* ((kr (if (eq bibtex-last-kill-command 'field) | 1757 | (let ((fun (lambda (kryp kr) ;; adapted from `current-kill' |
| 1815 | 'bibtex-field-kill-ring | 1758 | (car (set kryp (nthcdr (mod (- n (length (eval kryp))) |
| 1816 | 'bibtex-entry-kill-ring)) | 1759 | (length kr)) kr)))))) |
| 1817 | (kryp (if (eq bibtex-last-kill-command 'field) | 1760 | (if (eq bibtex-last-kill-command 'field) |
| 1818 | 'bibtex-field-kill-ring-yank-pointer | 1761 | (progn |
| 1819 | 'bibtex-entry-kill-ring-yank-pointer)) | 1762 | ;; insert past the current field |
| 1820 | (current (car (set kryp (nthcdr (mod (- n (length (eval kryp))) | 1763 | (goto-char (bibtex-end-of-field (bibtex-enclosing-field comma))) |
| 1821 | (length (eval kr))) | 1764 | (set-mark (point)) |
| 1822 | (eval kr)))))) | 1765 | (message "Mark set") |
| 1823 | (if (eq bibtex-last-kill-command 'field) | 1766 | (bibtex-make-field (funcall fun 'bibtex-field-kill-ring-yank-pointer |
| 1824 | (progn | 1767 | bibtex-field-kill-ring) t)) |
| 1825 | (bibtex-find-text) | 1768 | ;; insert past the current entry |
| 1826 | (if (looking-at "[}\"]") | 1769 | (bibtex-skip-to-valid-entry) |
| 1827 | (forward-char)) | 1770 | (set-mark (point)) |
| 1828 | (set-mark (point)) | 1771 | (message "Mark set") |
| 1829 | (message "Mark set") | 1772 | (insert (funcall fun 'bibtex-entry-kill-ring-yank-pointer |
| 1830 | (bibtex-make-field current t)) | 1773 | bibtex-entry-kill-ring))))) |
| 1831 | (unless (eobp) (bibtex-beginning-of-entry)) | ||
| 1832 | (set-mark (point)) | ||
| 1833 | (message "Mark set") | ||
| 1834 | (insert current))))) | ||
| 1835 | 1774 | ||
| 1836 | (defun bibtex-format-entry () | 1775 | (defun bibtex-format-entry () |
| 1837 | "Helper function for `bibtex-clean-entry'. | 1776 | "Helper function for `bibtex-clean-entry'. |
| @@ -1900,9 +1839,8 @@ Formats current entry according to variable `bibtex-entry-format'." | |||
| 1900 | (error "All alternatives are empty")) | 1839 | (error "All alternatives are empty")) |
| 1901 | 1840 | ||
| 1902 | ;; process all fields | 1841 | ;; process all fields |
| 1903 | (goto-char (point-min)) | 1842 | (bibtex-beginning-first-field (point-min)) |
| 1904 | (while (setq bounds (bibtex-search-forward-field | 1843 | (while (setq bounds (bibtex-parse-field)) |
| 1905 | bibtex-field-name (point-max))) | ||
| 1906 | (let* ((beg-field (copy-marker (bibtex-start-of-field bounds))) | 1844 | (let* ((beg-field (copy-marker (bibtex-start-of-field bounds))) |
| 1907 | (end-field (copy-marker (bibtex-end-of-field bounds) t)) | 1845 | (end-field (copy-marker (bibtex-end-of-field bounds) t)) |
| 1908 | (beg-name (copy-marker (bibtex-start-of-name-in-field bounds))) | 1846 | (beg-name (copy-marker (bibtex-start-of-name-in-field bounds))) |
| @@ -2040,10 +1978,6 @@ Formats current entry according to variable `bibtex-entry-format'." | |||
| 2040 | (error "Alternative fields `%s' are defined %s times" | 1978 | (error "Alternative fields `%s' are defined %s times" |
| 2041 | altlist found)))))) | 1979 | altlist found)))))) |
| 2042 | 1980 | ||
| 2043 | ;; update point | ||
| 2044 | (if (looking-at (bibtex-field-right-delimiter)) | ||
| 2045 | (forward-char)) | ||
| 2046 | |||
| 2047 | ;; update comma after last field | 1981 | ;; update comma after last field |
| 2048 | (if (memq 'last-comma format) | 1982 | (if (memq 'last-comma format) |
| 2049 | (cond ((and bibtex-comma-after-last-field | 1983 | (cond ((and bibtex-comma-after-last-field |
| @@ -2536,6 +2470,7 @@ already set." | |||
| 2536 | "Complete word fragment before point to longest prefix of COMPLETIONS. | 2470 | "Complete word fragment before point to longest prefix of COMPLETIONS. |
| 2537 | COMPLETIONS is an alist of strings. If point is not after the part | 2471 | COMPLETIONS is an alist of strings. If point is not after the part |
| 2538 | of a word, all strings are listed. Return completion." | 2472 | of a word, all strings are listed. Return completion." |
| 2473 | ;; Return value is used by cleanup functions. | ||
| 2539 | (let* ((case-fold-search t) | 2474 | (let* ((case-fold-search t) |
| 2540 | (beg (save-excursion | 2475 | (beg (save-excursion |
| 2541 | (re-search-backward "[ \t{\"]") | 2476 | (re-search-backward "[ \t{\"]") |
| @@ -2558,13 +2493,13 @@ of a word, all strings are listed. Return completion." | |||
| 2558 | (display-completion-list (all-completions part-of-word completions) | 2493 | (display-completion-list (all-completions part-of-word completions) |
| 2559 | part-of-word)) | 2494 | part-of-word)) |
| 2560 | (message "Making completion list...done") | 2495 | (message "Making completion list...done") |
| 2561 | ;; return value is handled by choose-completion-string-functions | ||
| 2562 | nil)))) | 2496 | nil)))) |
| 2563 | 2497 | ||
| 2564 | (defun bibtex-complete-string-cleanup (str compl) | 2498 | (defun bibtex-complete-string-cleanup (str compl) |
| 2565 | "Cleanup after inserting string STR. | 2499 | "Cleanup after inserting string STR. |
| 2566 | Remove enclosing field delimiters for STR. Display message with | 2500 | Remove enclosing field delimiters for STR. Display message with |
| 2567 | expansion of STR using expansion list COMPL." | 2501 | expansion of STR using expansion list COMPL." |
| 2502 | ;; point is at position inside field where completion was requested | ||
| 2568 | (save-excursion | 2503 | (save-excursion |
| 2569 | (let ((abbr (cdr (if (stringp str) | 2504 | (let ((abbr (cdr (if (stringp str) |
| 2570 | (assoc-string str compl t))))) | 2505 | (assoc-string str compl t))))) |
| @@ -2624,50 +2559,52 @@ Used as default value of `bibtex-summary-function'." | |||
| 2624 | (defun bibtex-pop (arg direction) | 2559 | (defun bibtex-pop (arg direction) |
| 2625 | "Fill current field from the ARGth same field's text in DIRECTION. | 2560 | "Fill current field from the ARGth same field's text in DIRECTION. |
| 2626 | Generic function used by `bibtex-pop-previous' and `bibtex-pop-next'." | 2561 | Generic function used by `bibtex-pop-previous' and `bibtex-pop-next'." |
| 2627 | (bibtex-find-text) | 2562 | ;; parse current field |
| 2628 | (save-excursion | 2563 | (let* ((bounds (bibtex-enclosing-field t)) |
| 2629 | ;; parse current field | 2564 | (start-old-field (bibtex-start-of-field bounds)) |
| 2630 | (bibtex-inside-field) | 2565 | (start-old-text (bibtex-start-of-text-in-field bounds)) |
| 2631 | (let* ((case-fold-search t) | 2566 | (end-old-text (bibtex-end-of-text-in-field bounds)) |
| 2632 | (bounds (bibtex-enclosing-field)) | 2567 | (field-name (bibtex-name-in-field bounds t)) |
| 2633 | (start-old-text (bibtex-start-of-text-in-field bounds)) | 2568 | failure) |
| 2634 | (stop-old-text (bibtex-end-of-text-in-field bounds)) | 2569 | (save-excursion |
| 2635 | (field-name (bibtex-name-in-field bounds t))) | ||
| 2636 | ;; if executed several times in a row, start each search where | 2570 | ;; if executed several times in a row, start each search where |
| 2637 | ;; the last one was finished | 2571 | ;; the last one was finished |
| 2638 | (unless (eq last-command 'bibtex-pop) | 2572 | (cond ((eq last-command 'bibtex-pop) |
| 2639 | (bibtex-enclosing-entry-maybe-empty-head) | 2573 | (goto-char (if (eq direction 'previous) |
| 2640 | (setq bibtex-pop-previous-search-point (match-beginning 0) | 2574 | bibtex-pop-previous-search-point |
| 2641 | bibtex-pop-next-search-point (point))) | 2575 | bibtex-pop-next-search-point))) |
| 2642 | (if (eq direction 'previous) | 2576 | ((eq direction 'previous) |
| 2643 | (goto-char bibtex-pop-previous-search-point) | 2577 | (bibtex-beginning-of-entry)) |
| 2644 | (goto-char bibtex-pop-next-search-point)) | 2578 | (t (bibtex-end-of-entry))) |
| 2645 | ;; Now search for arg'th previous/next similar field | 2579 | ;; Search for arg'th previous/next similar field |
| 2646 | (let (bounds failure new-text) | 2580 | (while (and (not failure) |
| 2647 | (while (and (not failure) | 2581 | (>= (setq arg (1- arg)) 0)) |
| 2648 | (> arg 0)) | 2582 | ;; The search of BibTeX fields is not bounded by entry boundaries |
| 2649 | (cond ((eq direction 'previous) | 2583 | (if (eq direction 'previous) |
| 2650 | (if (setq bounds (bibtex-search-backward-field field-name)) | 2584 | (if (setq bounds (bibtex-search-backward-field field-name)) |
| 2651 | (goto-char (bibtex-start-of-field bounds)) | 2585 | (goto-char (bibtex-start-of-field bounds)) |
| 2652 | (setq failure t))) | 2586 | (setq failure t)) |
| 2653 | ((eq direction 'next) | 2587 | (if (setq bounds (bibtex-search-forward-field field-name)) |
| 2654 | (if (setq bounds (bibtex-search-forward-field field-name)) | 2588 | (goto-char (bibtex-end-of-field bounds)) |
| 2655 | (goto-char (bibtex-end-of-field bounds)) | 2589 | (setq failure t)))) |
| 2656 | (setq failure t)))) | 2590 | (if failure |
| 2657 | (setq arg (- arg 1))) | 2591 | (error "No %s matching BibTeX field" |
| 2658 | (if failure | 2592 | (if (eq direction 'previous) "previous" "next")) |
| 2659 | (error "No %s matching BibTeX field" | 2593 | ;; Found a matching field. Remember boundaries. |
| 2660 | (if (eq direction 'previous) "previous" "next")) | 2594 | (let ((new-text (bibtex-text-in-field-bounds bounds)) |
| 2661 | ;; Found a matching field. Remember boundaries. | 2595 | (nbeg (copy-marker (bibtex-start-of-field bounds))) |
| 2662 | (setq bibtex-pop-previous-search-point (bibtex-start-of-field bounds) | 2596 | (nend (copy-marker (bibtex-end-of-field bounds)))) |
| 2663 | bibtex-pop-next-search-point (bibtex-end-of-field bounds) | 2597 | (bibtex-flash-head "From: ") |
| 2664 | new-text (bibtex-text-in-field-bounds bounds)) | ||
| 2665 | (bibtex-flash-head) | ||
| 2666 | ;; Go back to where we started, delete old text, and pop new. | 2598 | ;; Go back to where we started, delete old text, and pop new. |
| 2667 | (goto-char stop-old-text) | 2599 | (goto-char end-old-text) |
| 2668 | (delete-region start-old-text stop-old-text) | 2600 | (delete-region start-old-text end-old-text) |
| 2669 | (insert new-text))))) | 2601 | (if (= nbeg start-old-field) |
| 2670 | (bibtex-find-text) | 2602 | (insert (bibtex-field-left-delimiter) |
| 2603 | (bibtex-field-right-delimiter)) | ||
| 2604 | (insert new-text)) | ||
| 2605 | (setq bibtex-pop-previous-search-point (marker-position nbeg) | ||
| 2606 | bibtex-pop-next-search-point (marker-position nend)))))) | ||
| 2607 | (bibtex-find-text nil nil nil t) | ||
| 2671 | (setq this-command 'bibtex-pop)) | 2608 | (setq this-command 'bibtex-pop)) |
| 2672 | 2609 | ||
| 2673 | (defun bibtex-beginning-of-field () | 2610 | (defun bibtex-beginning-of-field () |
| @@ -2846,6 +2783,7 @@ if that value is non-nil. | |||
| 2846 | (list (list nil bibtex-entry-head bibtex-key-in-head)) | 2783 | (list (list nil bibtex-entry-head bibtex-key-in-head)) |
| 2847 | imenu-case-fold-search t) | 2784 | imenu-case-fold-search t) |
| 2848 | (make-local-variable 'choose-completion-string-functions) | 2785 | (make-local-variable 'choose-completion-string-functions) |
| 2786 | (make-local-variable 'completion-ignore-case) | ||
| 2849 | ;; XEmacs needs easy-menu-add, Emacs does not care | 2787 | ;; XEmacs needs easy-menu-add, Emacs does not care |
| 2850 | (easy-menu-add bibtex-edit-menu) | 2788 | (easy-menu-add bibtex-edit-menu) |
| 2851 | (easy-menu-add bibtex-entry-menu) | 2789 | (easy-menu-add bibtex-entry-menu) |
| @@ -2861,7 +2799,7 @@ and `bibtex-user-optional-fields'." | |||
| 2861 | (let ((e (assoc-string entry-type bibtex-entry-field-alist t)) | 2799 | (let ((e (assoc-string entry-type bibtex-entry-field-alist t)) |
| 2862 | required optional) | 2800 | required optional) |
| 2863 | (unless e | 2801 | (unless e |
| 2864 | (error "BibTeX entry type %s not defined" entry-type)) | 2802 | (error "Fields for BibTeX entry type %s not defined" entry-type)) |
| 2865 | (if (and (member-ignore-case entry-type bibtex-include-OPTcrossref) | 2803 | (if (and (member-ignore-case entry-type bibtex-include-OPTcrossref) |
| 2866 | (nth 2 e)) | 2804 | (nth 2 e)) |
| 2867 | (setq required (nth 0 (nth 2 e)) | 2805 | (setq required (nth 0 (nth 2 e)) |
| @@ -2918,10 +2856,11 @@ according to `bibtex-field-list', but are not yet present." | |||
| 2918 | (save-excursion | 2856 | (save-excursion |
| 2919 | (bibtex-beginning-of-entry) | 2857 | (bibtex-beginning-of-entry) |
| 2920 | ;; For inserting new fields, we use the fact that | 2858 | ;; For inserting new fields, we use the fact that |
| 2921 | ;; bibtex-parse-entry moves point to the end of the last field. | 2859 | ;; `bibtex-parse-entry' moves point to the end of the last field. |
| 2922 | (let* ((fields-alist (bibtex-parse-entry)) | 2860 | (let* ((fields-alist (bibtex-parse-entry)) |
| 2923 | (field-list (bibtex-field-list | 2861 | (field-list (bibtex-field-list |
| 2924 | (cdr (assoc "=type=" fields-alist))))) | 2862 | (cdr (assoc "=type=" fields-alist))))) |
| 2863 | (skip-chars-backward " \t\n") | ||
| 2925 | (dolist (field (car field-list)) | 2864 | (dolist (field (car field-list)) |
| 2926 | (unless (assoc-string (car field) fields-alist t) | 2865 | (unless (assoc-string (car field) fields-alist t) |
| 2927 | (bibtex-make-field field))) | 2866 | (bibtex-make-field field))) |
| @@ -2964,6 +2903,7 @@ entry (for example, the year parts of the keys)." | |||
| 2964 | (key (bibtex-key-in-head)) | 2903 | (key (bibtex-key-in-head)) |
| 2965 | (key-end (match-end bibtex-key-in-head)) | 2904 | (key-end (match-end bibtex-key-in-head)) |
| 2966 | (case-fold-search t) | 2905 | (case-fold-search t) |
| 2906 | (bibtex-sort-ignore-string-entries t) | ||
| 2967 | tmp other-key other bounds) | 2907 | tmp other-key other bounds) |
| 2968 | ;; The fields we want to change start right after the key. | 2908 | ;; The fields we want to change start right after the key. |
| 2969 | (goto-char key-end) | 2909 | (goto-char key-end) |
| @@ -3016,28 +2956,28 @@ entry (for example, the year parts of the keys)." | |||
| 3016 | (while (re-search-backward (regexp-quote other-suffix) key-end 'move) | 2956 | (while (re-search-backward (regexp-quote other-suffix) key-end 'move) |
| 3017 | (replace-match suffix))))))) | 2957 | (replace-match suffix))))))) |
| 3018 | 2958 | ||
| 3019 | (defun bibtex-print-help-message () | 2959 | (defun bibtex-print-help-message (&optional field comma) |
| 3020 | "Print helpful information about current field in current BibTeX entry." | 2960 | "Print helpful information about current FIELD in current BibTeX entry. |
| 3021 | (interactive) | 2961 | Optional arg COMMA is as in `bibtex-enclosing-field'. It is t for |
| 3022 | (let* ((case-fold-search t) | 2962 | interactive calls." |
| 3023 | (type (save-excursion | 2963 | (interactive (list nil t)) |
| 3024 | (bibtex-beginning-of-entry) | 2964 | (unless field (setq field (car (bibtex-find-text-internal nil nil comma)))) |
| 3025 | (looking-at bibtex-any-entry-maybe-empty-head) | 2965 | (if (string-match "@" field) |
| 3026 | (bibtex-type-in-head))) | 2966 | (cond ((bibtex-string= field "@string") |
| 3027 | comment field-list) | 2967 | (message "String definition")) |
| 3028 | (cond ((bibtex-string= type "string") | 2968 | ((bibtex-string= field "@preamble") |
| 3029 | (message "String definition")) | 2969 | (message "Preamble definition")) |
| 3030 | ((bibtex-string= type "preamble") | 2970 | (t (message "Entry key"))) |
| 3031 | (message "Preamble definition")) | 2971 | (let* ((case-fold-search t) |
| 3032 | (t | 2972 | (type (save-excursion |
| 3033 | (setq field-list (bibtex-field-list type) | 2973 | (bibtex-beginning-of-entry) |
| 3034 | comment | 2974 | (looking-at bibtex-entry-maybe-empty-head) |
| 3035 | (assoc-string (bibtex-name-in-field (bibtex-enclosing-field) t) | 2975 | (bibtex-type-in-head))) |
| 3036 | (append (car field-list) (cdr field-list)) | 2976 | (field-list (bibtex-field-list type)) |
| 3037 | t)) | 2977 | (comment (assoc-string field (append (car field-list) |
| 3038 | (if comment | 2978 | (cdr field-list)) t))) |
| 3039 | (message "%s" (nth 1 comment)) | 2979 | (if comment (message "%s" (nth 1 comment)) |
| 3040 | (message "No comment available")))))) | 2980 | (message "No comment available"))))) |
| 3041 | 2981 | ||
| 3042 | (defun bibtex-make-field (field &optional move interactive) | 2982 | (defun bibtex-make-field (field &optional move interactive) |
| 3043 | "Make a field named FIELD in current BibTeX entry. | 2983 | "Make a field named FIELD in current BibTeX entry. |
| @@ -3052,7 +2992,8 @@ MOVE and INTERACTIVE are t when called interactively." | |||
| 3052 | (list (let ((completion-ignore-case t) | 2992 | (list (let ((completion-ignore-case t) |
| 3053 | (field-list (bibtex-field-list | 2993 | (field-list (bibtex-field-list |
| 3054 | (save-excursion | 2994 | (save-excursion |
| 3055 | (bibtex-enclosing-entry-maybe-empty-head) | 2995 | (bibtex-beginning-of-entry) |
| 2996 | (looking-at bibtex-any-entry-maybe-empty-head) | ||
| 3056 | (bibtex-type-in-head))))) | 2997 | (bibtex-type-in-head))))) |
| 3057 | (completing-read "BibTeX field name: " | 2998 | (completing-read "BibTeX field name: " |
| 3058 | (append (car field-list) (cdr field-list)) | 2999 | (append (car field-list) (cdr field-list)) |
| @@ -3081,8 +3022,9 @@ MOVE and INTERACTIVE are t when called interactively." | |||
| 3081 | (t (concat (bibtex-field-left-delimiter) | 3022 | (t (concat (bibtex-field-left-delimiter) |
| 3082 | (bibtex-field-right-delimiter)))))) | 3023 | (bibtex-field-right-delimiter)))))) |
| 3083 | (when interactive | 3024 | (when interactive |
| 3084 | (forward-char -1) | 3025 | ;; (bibtex-find-text nil nil bibtex-help-message) |
| 3085 | (bibtex-print-help-message))) | 3026 | (if (memq (preceding-char) '(?} ?\")) (forward-char -1)) |
| 3027 | (if bibtex-help-message (bibtex-print-help-message (car field))))) | ||
| 3086 | 3028 | ||
| 3087 | (defun bibtex-beginning-of-entry () | 3029 | (defun bibtex-beginning-of-entry () |
| 3088 | "Move to beginning of BibTeX entry (beginning of line). | 3030 | "Move to beginning of BibTeX entry (beginning of line). |
| @@ -3103,28 +3045,19 @@ of the previous entry. Do not move if ahead of first entry. | |||
| 3103 | Return the new location of point." | 3045 | Return the new location of point." |
| 3104 | (interactive) | 3046 | (interactive) |
| 3105 | (let ((case-fold-search t) | 3047 | (let ((case-fold-search t) |
| 3106 | (org (point)) | 3048 | (pnt (point)) |
| 3107 | (pnt (bibtex-beginning-of-entry)) | 3049 | (_ (bibtex-beginning-of-entry)) |
| 3108 | err bounds) | 3050 | (bounds (bibtex-valid-entry t))) |
| 3109 | (cond ((looking-at bibtex-entry-type-whitespace) | 3051 | (cond (bounds (goto-char (cdr bounds))) ; regular entry |
| 3110 | (bibtex-search-entry t nil t) | 3052 | ;; @String or @Preamble |
| 3111 | (unless (equal (match-beginning 0) pnt) | 3053 | ((setq bounds (or (bibtex-parse-string t) (bibtex-parse-preamble))) |
| 3112 | (setq err t))) | ||
| 3113 | ;; @String | ||
| 3114 | ((setq bounds (bibtex-parse-string)) | ||
| 3115 | (goto-char (bibtex-end-of-string bounds))) | 3054 | (goto-char (bibtex-end-of-string bounds))) |
| 3116 | ;; @Preamble | 3055 | ((looking-at bibtex-any-valid-entry-type) |
| 3117 | ((bibtex-preamble-prefix t) | 3056 | ;; Parsing of entry failed |
| 3118 | (unless (bibtex-parse-string-postfix) ;; @String postfix OK | 3057 | (error "Syntactically incorrect BibTeX entry starts here.")) |
| 3119 | (setq err t))) | 3058 | (t (if (interactive-p) (message "Not on a known BibTeX entry.")) |
| 3120 | (t | 3059 | (goto-char pnt))) |
| 3121 | (if (interactive-p) | 3060 | (point))) |
| 3122 | (message "Not on a known BibTeX entry.")) | ||
| 3123 | (goto-char org))) | ||
| 3124 | (when err | ||
| 3125 | (goto-char pnt) | ||
| 3126 | (error "Syntactically incorrect BibTeX entry starts here"))) | ||
| 3127 | (point)) | ||
| 3128 | 3061 | ||
| 3129 | (defun bibtex-goto-line (arg) | 3062 | (defun bibtex-goto-line (arg) |
| 3130 | "Goto line ARG, counting from beginning of (narrowed) buffer." | 3063 | "Goto line ARG, counting from beginning of (narrowed) buffer." |
| @@ -3188,7 +3121,7 @@ If mark is active count entries in region, if not in whole buffer." | |||
| 3188 | (interactive) | 3121 | (interactive) |
| 3189 | (let ((bounds (save-excursion | 3122 | (let ((bounds (save-excursion |
| 3190 | (bibtex-beginning-of-entry) | 3123 | (bibtex-beginning-of-entry) |
| 3191 | (bibtex-search-forward-field "abstract")))) | 3124 | (bibtex-search-forward-field "abstract" t)))) |
| 3192 | (if bounds | 3125 | (if bounds |
| 3193 | (ispell-region (bibtex-start-of-text-in-field bounds) | 3126 | (ispell-region (bibtex-start-of-text-in-field bounds) |
| 3194 | (bibtex-end-of-text-in-field bounds)) | 3127 | (bibtex-end-of-text-in-field bounds)) |
| @@ -3216,7 +3149,7 @@ of the head of the entry found. Return nil if no entry found." | |||
| 3216 | ;; Don't search CROSSREF-KEY if we don't need it. | 3149 | ;; Don't search CROSSREF-KEY if we don't need it. |
| 3217 | (if (eq bibtex-maintain-sorted-entries 'crossref) | 3150 | (if (eq bibtex-maintain-sorted-entries 'crossref) |
| 3218 | (let ((bounds (bibtex-search-forward-field | 3151 | (let ((bounds (bibtex-search-forward-field |
| 3219 | "\\(OPT\\)?crossref"))) | 3152 | "\\(OPT\\)?crossref" t))) |
| 3220 | (list key | 3153 | (list key |
| 3221 | (if bounds (bibtex-text-in-field-bounds bounds t)) | 3154 | (if bounds (bibtex-text-in-field-bounds bounds t)) |
| 3222 | entry-name)) | 3155 | entry-name)) |
| @@ -3283,7 +3216,7 @@ entry and SPLIT is t." | |||
| 3283 | (let ((crossref-key | 3216 | (let ((crossref-key |
| 3284 | (save-excursion | 3217 | (save-excursion |
| 3285 | (bibtex-beginning-of-entry) | 3218 | (bibtex-beginning-of-entry) |
| 3286 | (let ((bounds (bibtex-search-forward-field "crossref"))) | 3219 | (let ((bounds (bibtex-search-forward-field "crossref" t))) |
| 3287 | (if bounds | 3220 | (if bounds |
| 3288 | (bibtex-text-in-field-bounds bounds t)))))) | 3221 | (bibtex-text-in-field-bounds bounds t)))))) |
| 3289 | (list (bibtex-read-key "Find crossref key: " crossref-key t) | 3222 | (list (bibtex-read-key "Find crossref key: " crossref-key t) |
| @@ -3429,40 +3362,38 @@ Return t if test was successful, nil otherwise." | |||
| 3429 | error-list syntax-error) | 3362 | error-list syntax-error) |
| 3430 | (save-excursion | 3363 | (save-excursion |
| 3431 | (save-restriction | 3364 | (save-restriction |
| 3432 | (if mark-active | 3365 | (if mark-active (narrow-to-region (region-beginning) (region-end))) |
| 3433 | (narrow-to-region (region-beginning) (region-end))) | ||
| 3434 | 3366 | ||
| 3435 | ;; looking if entries fit syntactical structure | 3367 | ;; Check syntactical structure of entries |
| 3436 | (goto-char (point-min)) | 3368 | (goto-char (point-min)) |
| 3437 | (bibtex-progress-message "Checking syntactical structure") | 3369 | (bibtex-progress-message "Checking syntactical structure") |
| 3438 | (let (bibtex-sort-ignore-string-entries) | 3370 | (let (bounds end) |
| 3439 | (while (re-search-forward "^[ \t]*@" nil t) | 3371 | (while (setq end (re-search-forward "^[ \t]*@" nil t)) |
| 3440 | (bibtex-progress-message) | 3372 | (bibtex-progress-message) |
| 3441 | (forward-char -1) | 3373 | (goto-char (match-beginning 0)) |
| 3442 | (let ((pnt (point))) | 3374 | (cond ((setq bounds (bibtex-valid-entry)) |
| 3443 | (if (not (looking-at bibtex-entry-type-str)) | 3375 | (goto-char (cdr bounds))) |
| 3444 | (forward-char) | 3376 | ((setq bounds (or (bibtex-parse-string) |
| 3445 | (bibtex-skip-to-valid-entry) | 3377 | (bibtex-parse-preamble))) |
| 3446 | (if (equal (point) pnt) | 3378 | (goto-char (bibtex-end-of-string bounds))) |
| 3447 | (forward-char) | 3379 | ((looking-at bibtex-any-valid-entry-type) |
| 3448 | (goto-char pnt) | 3380 | (push (cons (bibtex-current-line) |
| 3449 | (push (cons (bibtex-current-line) | 3381 | "Syntax error (check esp. commas, braces, and quotes)") |
| 3450 | "Syntax error (check esp. commas, braces, and quotes)") | 3382 | error-list) |
| 3451 | error-list) | 3383 | (goto-char (match-end 0))) |
| 3452 | (forward-char)))))) | 3384 | (t (goto-char end))))) |
| 3453 | (bibtex-progress-message 'done) | 3385 | (bibtex-progress-message 'done) |
| 3454 | 3386 | ||
| 3455 | (if error-list | 3387 | (if error-list |
| 3456 | ;; proceed only if there were no syntax errors. | 3388 | ;; Continue only if there were no syntax errors. |
| 3457 | (setq syntax-error t) | 3389 | (setq syntax-error t) |
| 3458 | 3390 | ||
| 3459 | ;; looking for duplicate keys and correct sort order | 3391 | ;; Check for duplicate keys and correct sort order |
| 3460 | (let (previous current key-list) | 3392 | (let (previous current key-list) |
| 3461 | (bibtex-progress-message "Checking for duplicate keys") | 3393 | (bibtex-progress-message "Checking for duplicate keys") |
| 3462 | (bibtex-map-entries | 3394 | (bibtex-map-entries |
| 3463 | (lambda (key beg end) | 3395 | (lambda (key beg end) |
| 3464 | (bibtex-progress-message) | 3396 | (bibtex-progress-message) |
| 3465 | (goto-char beg) | ||
| 3466 | (setq current (bibtex-entry-index)) | 3397 | (setq current (bibtex-entry-index)) |
| 3467 | (cond ((not previous)) | 3398 | (cond ((not previous)) |
| 3468 | ((member key key-list) | 3399 | ((member key key-list) |
| @@ -3498,18 +3429,13 @@ Return t if test was successful, nil otherwise." | |||
| 3498 | (bibtex-map-entries | 3429 | (bibtex-map-entries |
| 3499 | (lambda (key beg end) | 3430 | (lambda (key beg end) |
| 3500 | (bibtex-progress-message) | 3431 | (bibtex-progress-message) |
| 3501 | (let* ((entry-list (progn | 3432 | (let* ((entry-list (assoc-string (bibtex-type-in-head) |
| 3502 | (goto-char beg) | 3433 | bibtex-entry-field-alist t)) |
| 3503 | (bibtex-search-entry nil end) | ||
| 3504 | (assoc-string (bibtex-type-in-head) | ||
| 3505 | bibtex-entry-field-alist t))) | ||
| 3506 | (req (copy-sequence (elt (elt entry-list 1) 0))) | 3434 | (req (copy-sequence (elt (elt entry-list 1) 0))) |
| 3507 | (creq (copy-sequence (elt (elt entry-list 2) 0))) | 3435 | (creq (copy-sequence (elt (elt entry-list 2) 0))) |
| 3508 | crossref-there bounds alt-there field) | 3436 | crossref-there bounds alt-there field) |
| 3509 | (goto-char beg) | 3437 | (bibtex-beginning-first-field beg) |
| 3510 | (while (setq bounds (bibtex-search-forward-field | 3438 | (while (setq bounds (bibtex-parse-field)) |
| 3511 | bibtex-field-name end)) | ||
| 3512 | (goto-char (bibtex-start-of-text-in-field bounds)) | ||
| 3513 | (let ((field-name (bibtex-name-in-field bounds))) | 3439 | (let ((field-name (bibtex-name-in-field bounds))) |
| 3514 | (if (and (bibtex-string= field-name "month") | 3440 | (if (and (bibtex-string= field-name "month") |
| 3515 | ;; Check only abbreviated month fields. | 3441 | ;; Check only abbreviated month fields. |
| @@ -3521,18 +3447,19 @@ Return t if test was successful, nil otherwise." | |||
| 3521 | (push (cons (bibtex-current-line) | 3447 | (push (cons (bibtex-current-line) |
| 3522 | "Questionable month field") | 3448 | "Questionable month field") |
| 3523 | error-list)) | 3449 | error-list)) |
| 3524 | (setq field (assoc-string field-name req t)) | 3450 | (setq field (assoc-string field-name req t) |
| 3451 | req (delete field req) | ||
| 3452 | creq (delete (assoc-string field-name creq t) creq)) | ||
| 3525 | (if (nth 3 field) | 3453 | (if (nth 3 field) |
| 3526 | (if alt-there (push (cons (bibtex-current-line) | 3454 | (if alt-there |
| 3527 | "More than one non-empty alternative") | 3455 | (push (cons (bibtex-current-line) |
| 3528 | error-list) | 3456 | "More than one non-empty alternative") |
| 3457 | error-list) | ||
| 3529 | (setq alt-there t))) | 3458 | (setq alt-there t))) |
| 3530 | (setq req (delete field req) | ||
| 3531 | creq (delete (assoc-string field-name creq t) creq)) | ||
| 3532 | (if (bibtex-string= field-name "crossref") | 3459 | (if (bibtex-string= field-name "crossref") |
| 3533 | (setq crossref-there t)))) | 3460 | (setq crossref-there t))) |
| 3534 | (if crossref-there | 3461 | (goto-char (bibtex-end-of-field bounds))) |
| 3535 | (setq req creq)) | 3462 | (if crossref-there (setq req creq)) |
| 3536 | (let (alt) | 3463 | (let (alt) |
| 3537 | (dolist (field req) | 3464 | (dolist (field req) |
| 3538 | (if (nth 3 field) | 3465 | (if (nth 3 field) |
| @@ -3573,11 +3500,10 @@ Return t if test was successful, nil otherwise." | |||
| 3573 | (toggle-read-only 1) | 3500 | (toggle-read-only 1) |
| 3574 | (goto-line 3)) ; first error message | 3501 | (goto-line 3)) ; first error message |
| 3575 | (display-buffer err-buf) | 3502 | (display-buffer err-buf) |
| 3576 | ;; return nil | 3503 | nil) ; return `nil' (i.e., buffer is invalid) |
| 3577 | nil) | ||
| 3578 | (message "%s is syntactically correct" | 3504 | (message "%s is syntactically correct" |
| 3579 | (if mark-active "Region" "Buffer")) | 3505 | (if mark-active "Region" "Buffer")) |
| 3580 | t))) | 3506 | t))) ; return `t' (i.e., buffer is valid) |
| 3581 | 3507 | ||
| 3582 | (defun bibtex-validate-globally (&optional strings) | 3508 | (defun bibtex-validate-globally (&optional strings) |
| 3583 | "Check for duplicate keys in `bibtex-files'. | 3509 | "Check for duplicate keys in `bibtex-files'. |
| @@ -3631,37 +3557,41 @@ Return t if test was successful, nil otherwise." | |||
| 3631 | (toggle-read-only 1) | 3557 | (toggle-read-only 1) |
| 3632 | (goto-line 3)) ; first error message | 3558 | (goto-line 3)) ; first error message |
| 3633 | (display-buffer err-buf) | 3559 | (display-buffer err-buf) |
| 3634 | ;; return nil | 3560 | nil) ; return `nil' (i.e., buffer is invalid) |
| 3635 | nil) | ||
| 3636 | (message "No duplicate keys.") | 3561 | (message "No duplicate keys.") |
| 3637 | t))) | 3562 | t))) ; return `t' (i.e., buffer is valid) |
| 3638 | 3563 | ||
| 3639 | (defun bibtex-next-field (begin) | 3564 | (defun bibtex-next-field (begin &optional comma) |
| 3640 | "Move point to end of text of next BibTeX field. | 3565 | "Move point to end of text of next BibTeX field or entry head. |
| 3641 | With prefix BEGIN non-nil, move point to its beginning." | 3566 | With prefix BEGIN non-nil, move point to its beginning. Optional arg COMMA |
| 3642 | (interactive "P") | 3567 | is as in `bibtex-enclosing-field'. It is t for interactive calls." |
| 3643 | (bibtex-inside-field) | 3568 | (interactive (list current-prefix-arg t)) |
| 3644 | (let ((start (point))) | 3569 | (let ((bounds (bibtex-find-text-internal t nil comma)) |
| 3645 | (condition-case () | 3570 | end-of-entry) |
| 3646 | (let ((bounds (bibtex-enclosing-field))) | 3571 | (if (not bounds) |
| 3647 | (goto-char (bibtex-end-of-field bounds)) | 3572 | (setq end-of-entry t) |
| 3648 | (forward-char 2)) | 3573 | (goto-char (nth 3 bounds)) |
| 3649 | (error | 3574 | (if (assoc-string (car bounds) '("@String" "@Preamble") t) |
| 3650 | (goto-char start) | 3575 | (setq end-of-entry t) |
| 3651 | (end-of-line) | 3576 | ;; BibTeX key or field |
| 3652 | (forward-char)))) | 3577 | (if (looking-at ",[ \t\n]*") (goto-char (match-end 0))) |
| 3653 | (bibtex-find-text begin nil bibtex-help-message)) | 3578 | ;; end of entry |
| 3654 | 3579 | (if (looking-at "[)}][ \t\n]*") (setq end-of-entry t)))) | |
| 3655 | (defun bibtex-find-text (&optional begin noerror help) | 3580 | (if (and end-of-entry |
| 3656 | "Move point to end of text of current BibTeX field. | 3581 | (re-search-forward bibtex-any-entry-maybe-empty-head nil t)) |
| 3582 | (goto-char (match-beginning 0))) | ||
| 3583 | (bibtex-find-text begin nil bibtex-help-message))) | ||
| 3584 | |||
| 3585 | (defun bibtex-find-text (&optional begin noerror help comma) | ||
| 3586 | "Move point to end of text of current BibTeX field or entry head. | ||
| 3657 | With optional prefix BEGIN non-nil, move point to its beginning. | 3587 | With optional prefix BEGIN non-nil, move point to its beginning. |
| 3658 | Unless NOERROR is non-nil, an error is signaled if point is not | 3588 | Unless NOERROR is non-nil, an error is signaled if point is not |
| 3659 | on a BibTeX field. If optional arg HELP is non-nil print help message. | 3589 | on a BibTeX field. If optional arg HELP is non-nil print help message. |
| 3660 | When called interactively, the value of HELP is `bibtex-help-message'." | 3590 | When called interactively, the value of HELP is `bibtex-help-message'. |
| 3661 | (interactive (list current-prefix-arg nil bibtex-help-message)) | 3591 | Optional arg COMMA is as in `bibtex-enclosing-field'. It is t for |
| 3662 | (let ((pnt (point)) | 3592 | interactive calls." |
| 3663 | (bounds (bibtex-find-text-internal))) | 3593 | (interactive (list current-prefix-arg nil bibtex-help-message t)) |
| 3664 | (beginning-of-line) | 3594 | (let ((bounds (bibtex-find-text-internal t nil comma))) |
| 3665 | (cond (bounds | 3595 | (cond (bounds |
| 3666 | (if begin | 3596 | (if begin |
| 3667 | (progn (goto-char (nth 1 bounds)) | 3597 | (progn (goto-char (nth 1 bounds)) |
| @@ -3670,72 +3600,88 @@ When called interactively, the value of HELP is `bibtex-help-message'." | |||
| 3670 | (goto-char (nth 2 bounds)) | 3600 | (goto-char (nth 2 bounds)) |
| 3671 | (if (memq (preceding-char) '(?} ?\")) | 3601 | (if (memq (preceding-char) '(?} ?\")) |
| 3672 | (forward-char -1))) | 3602 | (forward-char -1))) |
| 3673 | (if help (bibtex-print-help-message))) | 3603 | (if help (bibtex-print-help-message (car bounds)))) |
| 3674 | ((looking-at bibtex-entry-maybe-empty-head) | 3604 | ((not noerror) (error "Not on BibTeX field"))))) |
| 3675 | (goto-char (if begin | ||
| 3676 | (match-beginning bibtex-key-in-head) | ||
| 3677 | (match-end 0)))) | ||
| 3678 | (t | ||
| 3679 | (goto-char pnt) | ||
| 3680 | (unless noerror (error "Not on BibTeX field")))))) | ||
| 3681 | 3605 | ||
| 3682 | (defun bibtex-find-text-internal (&optional noerror subfield) | 3606 | (defun bibtex-find-text-internal (&optional noerror subfield comma) |
| 3683 | "Find text part of current BibTeX field, @String or @Preamble. | 3607 | "Find text part of current BibTeX field or entry head. |
| 3684 | Return list (NAME START END) with field name, start and end of text | 3608 | Return list (NAME START-TEXT END-TEXT END) with field or entry name, |
| 3685 | or nil if not found. | 3609 | start and end of text and end of field or entry head, or nil if not found. |
| 3686 | If optional arg NOERROR is non-nil, an error message is suppressed if text | 3610 | If optional arg NOERROR is non-nil, an error message is suppressed if text |
| 3687 | is not found. If optional arg SUBFIELD is non-nil START and END correspond | 3611 | is not found. If optional arg SUBFIELD is non-nil START-TEXT and END-TEXT |
| 3688 | to the current subfield delimited by #." | 3612 | correspond to the current subfield delimited by #. |
| 3613 | Optional arg COMMA is as in `bibtex-enclosing-field'." | ||
| 3689 | (save-excursion | 3614 | (save-excursion |
| 3690 | (let ((pnt (point)) | 3615 | (let ((pnt (point)) |
| 3691 | (_ (bibtex-inside-field)) | 3616 | (bounds (bibtex-enclosing-field comma t)) |
| 3692 | (bounds (bibtex-enclosing-field t)) | ||
| 3693 | (case-fold-search t) | 3617 | (case-fold-search t) |
| 3694 | (bibtex-string-empty-key t) | 3618 | name start-text end-text end failure done no-sub) |
| 3695 | name start end) | ||
| 3696 | (bibtex-beginning-of-entry) | 3619 | (bibtex-beginning-of-entry) |
| 3697 | (cond (bounds | 3620 | (cond (bounds |
| 3698 | (setq name (bibtex-name-in-field bounds t) | 3621 | (setq name (bibtex-name-in-field bounds t) |
| 3699 | start (bibtex-start-of-text-in-field bounds) | 3622 | start-text (bibtex-start-of-text-in-field bounds) |
| 3700 | end (bibtex-end-of-text-in-field bounds))) | 3623 | end-text (bibtex-end-of-text-in-field bounds) |
| 3624 | end (bibtex-end-of-field bounds))) | ||
| 3701 | ;; @String | 3625 | ;; @String |
| 3702 | ((setq bounds (bibtex-parse-string)) | 3626 | ((setq bounds (bibtex-parse-string t)) |
| 3703 | (setq name "@String" ;; not a field name! | 3627 | (if (<= pnt (bibtex-end-of-string bounds)) |
| 3704 | start (bibtex-start-of-text-in-string bounds) | 3628 | (setq name "@String" ;; not a field name! |
| 3705 | end (bibtex-end-of-text-in-string bounds))) | 3629 | start-text (bibtex-start-of-text-in-string bounds) |
| 3630 | end-text (bibtex-end-of-text-in-string bounds) | ||
| 3631 | end (bibtex-end-of-string bounds)) | ||
| 3632 | (setq failure t))) | ||
| 3706 | ;; @Preamble | 3633 | ;; @Preamble |
| 3707 | ((and (bibtex-preamble-prefix t) | 3634 | ((setq bounds (bibtex-parse-preamble)) |
| 3708 | (setq bounds (bibtex-parse-field-text))) | 3635 | (if (<= pnt (bibtex-end-of-string bounds)) |
| 3709 | (setq name "@Preamble" ;; not a field name! | 3636 | (setq name "@Preamble" ;; not a field name! |
| 3710 | start (car bounds) | 3637 | start-text (bibtex-start-of-text-in-string bounds) |
| 3711 | end (nth 1 bounds))) | 3638 | end-text (bibtex-end-of-text-in-string bounds) |
| 3712 | (t (unless noerror (error "Not on BibTeX field")))) | 3639 | end (bibtex-end-of-string bounds)) |
| 3713 | (when (and start end subfield) | 3640 | (setq failure t))) |
| 3714 | (goto-char start) | 3641 | ;; BibTeX head |
| 3715 | (let (done) | 3642 | ((looking-at bibtex-entry-maybe-empty-head) |
| 3643 | (goto-char (match-end 0)) | ||
| 3644 | (if comma (save-match-data | ||
| 3645 | (re-search-forward "\\=[ \t\n]*," nil t))) | ||
| 3646 | (if (<= pnt (point)) | ||
| 3647 | (setq name (match-string-no-properties bibtex-type-in-head) | ||
| 3648 | start-text (or (match-beginning bibtex-key-in-head) | ||
| 3649 | (match-end 0)) | ||
| 3650 | end-text (or (match-end bibtex-key-in-head) | ||
| 3651 | (match-end 0)) | ||
| 3652 | end end-text | ||
| 3653 | no-sub t) ;; subfields do not make sense | ||
| 3654 | (setq failure t))) | ||
| 3655 | (t (setq failure t))) | ||
| 3656 | (when (and subfield (not failure)) | ||
| 3657 | (setq failure no-sub) | ||
| 3658 | (unless failure | ||
| 3659 | (goto-char start-text) | ||
| 3716 | (while (not done) | 3660 | (while (not done) |
| 3717 | (if (or (prog1 (looking-at bibtex-field-const) | 3661 | (if (or (prog1 (looking-at bibtex-field-const) |
| 3718 | (setq end (match-end 0))) | 3662 | (setq end-text (match-end 0))) |
| 3719 | (prog1 (setq bounds (bibtex-parse-field-string)) | 3663 | (prog1 (setq bounds (bibtex-parse-field-string)) |
| 3720 | (setq end (cdr bounds)))) | 3664 | (setq end-text (cdr bounds)))) |
| 3721 | (progn | 3665 | (progn |
| 3722 | (if (and (<= start pnt) (<= pnt end)) | 3666 | (if (and (<= start-text pnt) (<= pnt end-text)) |
| 3723 | (setq done t) | 3667 | (setq done t) |
| 3724 | (goto-char end)) | 3668 | (goto-char end-text)) |
| 3725 | (if (looking-at "[ \t\n]*#[ \t\n]*") | 3669 | (if (looking-at "[ \t\n]*#[ \t\n]*") |
| 3726 | (setq start (goto-char (match-end 0))))) | 3670 | (setq start-text (goto-char (match-end 0))))) |
| 3727 | (unless noerror (error "Not on text part of BibTeX field")) | 3671 | (setq done t failure t))))) |
| 3728 | (setq done t start nil end nil))))) | 3672 | (cond ((not failure) |
| 3729 | (if (and start end) | 3673 | (list name start-text end-text end)) |
| 3730 | (list name start end))))) | 3674 | ((and no-sub (not noerror)) |
| 3731 | 3675 | (error "Not on text part of BibTeX field")) | |
| 3732 | (defun bibtex-remove-OPT-or-ALT () | 3676 | ((not noerror) (error "Not on BibTeX field")))))) |
| 3677 | |||
| 3678 | (defun bibtex-remove-OPT-or-ALT (&optional comma) | ||
| 3733 | "Remove the string starting optional/alternative fields. | 3679 | "Remove the string starting optional/alternative fields. |
| 3734 | Align text and go thereafter to end of text." | 3680 | Align text and go thereafter to end of text. Optional arg COMMA |
| 3735 | (interactive) | 3681 | is as in `bibtex-enclosing-field'. It is t for interactive calls." |
| 3736 | (bibtex-inside-field) | 3682 | (interactive (list t)) |
| 3737 | (let ((case-fold-search t) | 3683 | (let ((case-fold-search t) |
| 3738 | (bounds (bibtex-enclosing-field))) | 3684 | (bounds (bibtex-enclosing-field comma))) |
| 3739 | (save-excursion | 3685 | (save-excursion |
| 3740 | (goto-char (bibtex-start-of-name-in-field bounds)) | 3686 | (goto-char (bibtex-start-of-name-in-field bounds)) |
| 3741 | (when (looking-at "OPT\\|ALT") | 3687 | (when (looking-at "OPT\\|ALT") |
| @@ -3751,14 +3697,14 @@ Align text and go thereafter to end of text." | |||
| 3751 | (delete-horizontal-space) | 3697 | (delete-horizontal-space) |
| 3752 | (if bibtex-align-at-equal-sign | 3698 | (if bibtex-align-at-equal-sign |
| 3753 | (insert " ") | 3699 | (insert " ") |
| 3754 | (indent-to-column bibtex-text-indentation)))) | 3700 | (indent-to-column bibtex-text-indentation)))))) |
| 3755 | (bibtex-inside-field))) | 3701 | |
| 3756 | 3702 | (defun bibtex-remove-delimiters (&optional comma) | |
| 3757 | (defun bibtex-remove-delimiters () | 3703 | "Remove \"\" or {} around current BibTeX field text. |
| 3758 | "Remove \"\" or {} around current BibTeX field text." | 3704 | Optional arg COMMA is as in `bibtex-enclosing-field'. It is t for |
| 3759 | (interactive) | 3705 | interactive calls." |
| 3760 | ;; `bibtex-find-text-internal' issues an error message if bounds is nil. | 3706 | (interactive (list t)) |
| 3761 | (let* ((bounds (bibtex-find-text-internal nil t)) | 3707 | (let* ((bounds (bibtex-find-text-internal nil t comma)) |
| 3762 | (start (nth 1 bounds)) | 3708 | (start (nth 1 bounds)) |
| 3763 | (end (nth 2 bounds))) | 3709 | (end (nth 2 bounds))) |
| 3764 | (if (memq (char-before end) '(?\} ?\")) | 3710 | (if (memq (char-before end) '(?\} ?\")) |
| @@ -3766,15 +3712,15 @@ Align text and go thereafter to end of text." | |||
| 3766 | (if (memq (char-after start) '(?\{ ?\")) | 3712 | (if (memq (char-after start) '(?\{ ?\")) |
| 3767 | (delete-region start (1+ start))))) | 3713 | (delete-region start (1+ start))))) |
| 3768 | 3714 | ||
| 3769 | (defun bibtex-kill-field (&optional copy-only) | 3715 | (defun bibtex-kill-field (&optional copy-only comma) |
| 3770 | "Kill the entire enclosing BibTeX field. | 3716 | "Kill the entire enclosing BibTeX field. |
| 3771 | With prefix arg COPY-ONLY, copy the current field to `bibtex-field-kill-ring', | 3717 | With prefix arg COPY-ONLY, copy the current field to `bibtex-field-kill-ring', |
| 3772 | but do not actually kill it." | 3718 | but do not actually kill it. Optional arg COMMA is as in |
| 3773 | (interactive "P") | 3719 | `bibtex-enclosing-field'. It is t for interactive calls." |
| 3720 | (interactive (list current-prefix-arg t)) | ||
| 3774 | (save-excursion | 3721 | (save-excursion |
| 3775 | (bibtex-inside-field) | ||
| 3776 | (let* ((case-fold-search t) | 3722 | (let* ((case-fold-search t) |
| 3777 | (bounds (bibtex-enclosing-field)) | 3723 | (bounds (bibtex-enclosing-field comma)) |
| 3778 | (end (bibtex-end-of-field bounds)) | 3724 | (end (bibtex-end-of-field bounds)) |
| 3779 | (beg (bibtex-start-of-field bounds))) | 3725 | (beg (bibtex-start-of-field bounds))) |
| 3780 | (goto-char end) | 3726 | (goto-char end) |
| @@ -3791,10 +3737,12 @@ but do not actually kill it." | |||
| 3791 | (delete-region beg end)))) | 3737 | (delete-region beg end)))) |
| 3792 | (setq bibtex-last-kill-command 'field)) | 3738 | (setq bibtex-last-kill-command 'field)) |
| 3793 | 3739 | ||
| 3794 | (defun bibtex-copy-field-as-kill () | 3740 | (defun bibtex-copy-field-as-kill (&optional comma) |
| 3795 | "Copy the BibTeX field at point to the kill ring." | 3741 | "Copy the BibTeX field at point to the kill ring. |
| 3796 | (interactive) | 3742 | Optional arg COMMA is as in `bibtex-enclosing-field'. It is t for |
| 3797 | (bibtex-kill-field t)) | 3743 | interactive calls." |
| 3744 | (interactive (list t)) | ||
| 3745 | (bibtex-kill-field t comma)) | ||
| 3798 | 3746 | ||
| 3799 | (defun bibtex-kill-entry (&optional copy-only) | 3747 | (defun bibtex-kill-entry (&optional copy-only) |
| 3800 | "Kill the entire enclosing BibTeX entry. | 3748 | "Kill the entire enclosing BibTeX entry. |
| @@ -3806,7 +3754,7 @@ but do not actually kill it." | |||
| 3806 | (beg (bibtex-beginning-of-entry)) | 3754 | (beg (bibtex-beginning-of-entry)) |
| 3807 | (end (progn (bibtex-end-of-entry) | 3755 | (end (progn (bibtex-end-of-entry) |
| 3808 | (if (re-search-forward | 3756 | (if (re-search-forward |
| 3809 | bibtex-entry-maybe-empty-head nil 'move) | 3757 | bibtex-any-entry-maybe-empty-head nil 'move) |
| 3810 | (goto-char (match-beginning 0))) | 3758 | (goto-char (match-beginning 0))) |
| 3811 | (point)))) | 3759 | (point)))) |
| 3812 | (push (buffer-substring-no-properties beg end) | 3760 | (push (buffer-substring-no-properties beg end) |
| @@ -3831,13 +3779,13 @@ More precisely, reinsert the field or entry killed or yanked most recently. | |||
| 3831 | With argument N, reinsert the Nth most recently killed BibTeX item. | 3779 | With argument N, reinsert the Nth most recently killed BibTeX item. |
| 3832 | See also the command \\[bibtex-yank-pop]." | 3780 | See also the command \\[bibtex-yank-pop]." |
| 3833 | (interactive "*p") | 3781 | (interactive "*p") |
| 3834 | (bibtex-insert-kill (1- n)) | 3782 | (bibtex-insert-kill (1- n) t) |
| 3835 | (setq this-command 'bibtex-yank)) | 3783 | (setq this-command 'bibtex-yank)) |
| 3836 | 3784 | ||
| 3837 | (defun bibtex-yank-pop (n) | 3785 | (defun bibtex-yank-pop (n) |
| 3838 | "Replace just-yanked killed BibTeX item with a different item. | 3786 | "Replace just-yanked killed BibTeX item with a different item. |
| 3839 | This command is allowed only immediately after a `bibtex-yank' or a | 3787 | This command is allowed only immediately after a `bibtex-yank' or a |
| 3840 | `bibtex-yank-pop'. At such a time, the region contains a reinserted | 3788 | `bibtex-yank-pop'. In this case, the region contains a reinserted |
| 3841 | previously killed BibTeX item. `bibtex-yank-pop' deletes that item | 3789 | previously killed BibTeX item. `bibtex-yank-pop' deletes that item |
| 3842 | and inserts in its place a different killed BibTeX item. | 3790 | and inserts in its place a different killed BibTeX item. |
| 3843 | 3791 | ||
| @@ -3853,13 +3801,14 @@ comes the newest one." | |||
| 3853 | (setq this-command 'bibtex-yank) | 3801 | (setq this-command 'bibtex-yank) |
| 3854 | (let ((inhibit-read-only t)) | 3802 | (let ((inhibit-read-only t)) |
| 3855 | (delete-region (point) (mark t)) | 3803 | (delete-region (point) (mark t)) |
| 3856 | (bibtex-insert-kill n))) | 3804 | (bibtex-insert-kill n t))) |
| 3857 | 3805 | ||
| 3858 | (defun bibtex-empty-field () | 3806 | (defun bibtex-empty-field (&optional comma) |
| 3859 | "Delete the text part of the current field, replace with empty text." | 3807 | "Delete the text part of the current field, replace with empty text. |
| 3860 | (interactive) | 3808 | Optional arg COMMA is as in `bibtex-enclosing-field'. It is t for |
| 3861 | (bibtex-inside-field) | 3809 | interactive calls." |
| 3862 | (let ((bounds (bibtex-enclosing-field))) | 3810 | (interactive (list t)) |
| 3811 | (let ((bounds (bibtex-enclosing-field comma))) | ||
| 3863 | (goto-char (bibtex-start-of-text-in-field bounds)) | 3812 | (goto-char (bibtex-start-of-text-in-field bounds)) |
| 3864 | (delete-region (point) (bibtex-end-of-text-in-field bounds)) | 3813 | (delete-region (point) (bibtex-end-of-text-in-field bounds)) |
| 3865 | (insert (bibtex-field-left-delimiter) | 3814 | (insert (bibtex-field-left-delimiter) |
| @@ -3960,7 +3909,7 @@ At end of the cleaning process, the functions in | |||
| 3960 | (if (and (listp bibtex-strings) | 3909 | (if (and (listp bibtex-strings) |
| 3961 | (not (assoc key bibtex-strings))) | 3910 | (not (assoc key bibtex-strings))) |
| 3962 | (push (cons key (bibtex-text-in-string | 3911 | (push (cons key (bibtex-text-in-string |
| 3963 | (save-excursion (bibtex-parse-string)) t)) | 3912 | (bibtex-parse-string) t)) |
| 3964 | bibtex-strings))) | 3913 | bibtex-strings))) |
| 3965 | ;; We have a normal entry. | 3914 | ;; We have a normal entry. |
| 3966 | ((listp bibtex-reference-keys) | 3915 | ((listp bibtex-reference-keys) |
| @@ -3988,28 +3937,27 @@ At end of the cleaning process, the functions in | |||
| 3988 | If JUSTIFY is non-nil justify as well. | 3937 | If JUSTIFY is non-nil justify as well. |
| 3989 | If optional arg MOVE is non-nil move point to end of field." | 3938 | If optional arg MOVE is non-nil move point to end of field." |
| 3990 | (let ((end-field (copy-marker (bibtex-end-of-field bounds)))) | 3939 | (let ((end-field (copy-marker (bibtex-end-of-field bounds)))) |
| 3991 | (goto-char (bibtex-start-of-field bounds)) | 3940 | (if (not justify) |
| 3992 | (if justify | 3941 | (goto-char (bibtex-start-of-text-in-field bounds)) |
| 3993 | (progn | 3942 | (goto-char (bibtex-start-of-field bounds)) |
| 3994 | (forward-char) | 3943 | (forward-char) ;; leading comma |
| 3995 | (bibtex-delete-whitespace) | 3944 | (bibtex-delete-whitespace) |
| 3996 | (open-line 1) | 3945 | (open-line 1) |
| 3997 | (forward-char) | 3946 | (forward-char) |
| 3998 | (indent-to-column (+ bibtex-entry-offset | 3947 | (indent-to-column (+ bibtex-entry-offset |
| 3999 | bibtex-field-indentation)) | 3948 | bibtex-field-indentation)) |
| 4000 | (re-search-forward "[ \t\n]*=" end-field) | 3949 | (re-search-forward "[ \t\n]*=" end-field) |
| 4001 | (replace-match "=") | 3950 | (replace-match "=") |
| 4002 | (forward-char -1) | 3951 | (forward-char -1) |
| 4003 | (if bibtex-align-at-equal-sign | 3952 | (if bibtex-align-at-equal-sign |
| 4004 | (indent-to-column | 3953 | (indent-to-column |
| 4005 | (+ bibtex-entry-offset (- bibtex-text-indentation 2))) | 3954 | (+ bibtex-entry-offset (- bibtex-text-indentation 2))) |
| 4006 | (insert " ")) | 3955 | (insert " ")) |
| 4007 | (forward-char) | 3956 | (forward-char) |
| 4008 | (bibtex-delete-whitespace) | 3957 | (bibtex-delete-whitespace) |
| 4009 | (if bibtex-align-at-equal-sign | 3958 | (if bibtex-align-at-equal-sign |
| 4010 | (insert " ") | 3959 | (insert " ") |
| 4011 | (indent-to-column bibtex-text-indentation))) | 3960 | (indent-to-column bibtex-text-indentation))) |
| 4012 | (re-search-forward "[ \t\n]*=[ \t\n]*" end-field)) | ||
| 4013 | ;; Paragraphs within fields are not preserved. Bother? | 3961 | ;; Paragraphs within fields are not preserved. Bother? |
| 4014 | (fill-region-as-paragraph (line-beginning-position) end-field | 3962 | (fill-region-as-paragraph (line-beginning-position) end-field |
| 4015 | default-justification nil (point)) | 3963 | default-justification nil (point)) |
| @@ -4017,14 +3965,13 @@ If optional arg MOVE is non-nil move point to end of field." | |||
| 4017 | 3965 | ||
| 4018 | (defun bibtex-fill-field (&optional justify) | 3966 | (defun bibtex-fill-field (&optional justify) |
| 4019 | "Like \\[fill-paragraph], but fill current BibTeX field. | 3967 | "Like \\[fill-paragraph], but fill current BibTeX field. |
| 4020 | Optional prefix arg JUSTIFY non-nil means justify as well. | 3968 | If optional prefix JUSTIFY is non-nil justify as well. |
| 4021 | In BibTeX mode this function is bound to `fill-paragraph-function'." | 3969 | In BibTeX mode this function is bound to `fill-paragraph-function'." |
| 4022 | (interactive "*P") | 3970 | (interactive "*P") |
| 4023 | (let ((pnt (copy-marker (point))) | 3971 | (let ((pnt (copy-marker (point))) |
| 4024 | (bounds (bibtex-enclosing-field))) | 3972 | (bounds (bibtex-enclosing-field t))) |
| 4025 | (when bounds | 3973 | (bibtex-fill-field-bounds bounds justify) |
| 4026 | (bibtex-fill-field-bounds bounds justify) | 3974 | (goto-char pnt))) |
| 4027 | (goto-char pnt)))) | ||
| 4028 | 3975 | ||
| 4029 | (defun bibtex-fill-entry () | 3976 | (defun bibtex-fill-entry () |
| 4030 | "Fill current BibTeX entry. | 3977 | "Fill current BibTeX entry. |
| @@ -4035,14 +3982,16 @@ If `bibtex-align-at-equal-sign' is non-nil, align equal signs, too." | |||
| 4035 | (interactive "*") | 3982 | (interactive "*") |
| 4036 | (let ((pnt (copy-marker (point))) | 3983 | (let ((pnt (copy-marker (point))) |
| 4037 | (end (copy-marker (bibtex-end-of-entry))) | 3984 | (end (copy-marker (bibtex-end-of-entry))) |
| 3985 | (beg (bibtex-beginning-of-entry)) ; move point | ||
| 4038 | bounds) | 3986 | bounds) |
| 4039 | (bibtex-beginning-of-entry) | ||
| 4040 | (bibtex-delete-whitespace) | 3987 | (bibtex-delete-whitespace) |
| 4041 | (indent-to-column bibtex-entry-offset) | 3988 | (indent-to-column bibtex-entry-offset) |
| 4042 | (while (setq bounds (bibtex-search-forward-field bibtex-field-name end)) | 3989 | (bibtex-beginning-first-field beg) |
| 3990 | (while (setq bounds (bibtex-parse-field)) | ||
| 4043 | (bibtex-fill-field-bounds bounds t t)) | 3991 | (bibtex-fill-field-bounds bounds t t)) |
| 4044 | (if (looking-at ",") | 3992 | (if (looking-at ",") |
| 4045 | (forward-char)) | 3993 | (forward-char)) |
| 3994 | (skip-chars-backward " \t\n") | ||
| 4046 | (bibtex-delete-whitespace) | 3995 | (bibtex-delete-whitespace) |
| 4047 | (open-line 1) | 3996 | (open-line 1) |
| 4048 | (forward-char) | 3997 | (forward-char) |
| @@ -4115,8 +4064,7 @@ If mark is active reformat entries in region, if not in whole buffer." | |||
| 4115 | bibtex-autokey-edit-before-use) | 4064 | bibtex-autokey-edit-before-use) |
| 4116 | 4065 | ||
| 4117 | (save-restriction | 4066 | (save-restriction |
| 4118 | (narrow-to-region (if mark-active (region-beginning) (point-min)) | 4067 | (if mark-active (narrow-to-region (region-beginning) (region-end))) |
| 4119 | (if mark-active (region-end) (point-max))) | ||
| 4120 | (if (memq 'realign bibtex-entry-format) | 4068 | (if (memq 'realign bibtex-entry-format) |
| 4121 | (bibtex-realign)) | 4069 | (bibtex-realign)) |
| 4122 | (bibtex-progress-message "Formatting" 1) | 4070 | (bibtex-progress-message "Formatting" 1) |
| @@ -4143,12 +4091,10 @@ entries from minibuffer." | |||
| 4143 | (message "Starting to validate buffer...") | 4091 | (message "Starting to validate buffer...") |
| 4144 | (sit-for 1 nil t) | 4092 | (sit-for 1 nil t) |
| 4145 | (bibtex-realign) | 4093 | (bibtex-realign) |
| 4146 | (message | ||
| 4147 | "If errors occur, correct them and call `bibtex-convert-alien' again") | ||
| 4148 | (sit-for 5 nil t) | ||
| 4149 | (deactivate-mark) ; So bibtex-validate works on the whole buffer. | 4094 | (deactivate-mark) ; So bibtex-validate works on the whole buffer. |
| 4150 | (when (let (bibtex-maintain-sorted-entries) | 4095 | (if (not (let (bibtex-maintain-sorted-entries) |
| 4151 | (bibtex-validate)) | 4096 | (bibtex-validate))) |
| 4097 | (message "Correct errors and call `bibtex-convert-alien' again") | ||
| 4152 | (message "Starting to reformat entries...") | 4098 | (message "Starting to reformat entries...") |
| 4153 | (sit-for 2 nil t) | 4099 | (sit-for 2 nil t) |
| 4154 | (bibtex-reformat read-options) | 4100 | (bibtex-reformat read-options) |
| @@ -4166,10 +4112,9 @@ An error is signaled if point is outside key or BibTeX field." | |||
| 4166 | (interactive) | 4112 | (interactive) |
| 4167 | (let ((pnt (point)) | 4113 | (let ((pnt (point)) |
| 4168 | (case-fold-search t) | 4114 | (case-fold-search t) |
| 4169 | (bibtex-string-empty-key t) | ||
| 4170 | bounds name compl) | 4115 | bounds name compl) |
| 4171 | (save-excursion | 4116 | (save-excursion |
| 4172 | (if (and (setq bounds (bibtex-enclosing-field t)) | 4117 | (if (and (setq bounds (bibtex-enclosing-field nil t)) |
| 4173 | (>= pnt (bibtex-start-of-text-in-field bounds)) | 4118 | (>= pnt (bibtex-start-of-text-in-field bounds)) |
| 4174 | (<= pnt (bibtex-end-of-text-in-field bounds))) | 4119 | (<= pnt (bibtex-end-of-text-in-field bounds))) |
| 4175 | (setq name (bibtex-name-in-field bounds t) | 4120 | (setq name (bibtex-name-in-field bounds t) |
| @@ -4182,7 +4127,7 @@ An error is signaled if point is outside key or BibTeX field." | |||
| 4182 | ;; point is in other field | 4127 | ;; point is in other field |
| 4183 | (t (bibtex-strings)))) | 4128 | (t (bibtex-strings)))) |
| 4184 | (bibtex-beginning-of-entry) | 4129 | (bibtex-beginning-of-entry) |
| 4185 | (cond ((setq bounds (bibtex-parse-string)) | 4130 | (cond ((setq bounds (bibtex-parse-string t)) |
| 4186 | ;; point is inside a @String key | 4131 | ;; point is inside a @String key |
| 4187 | (cond ((and (>= pnt (nth 1 (car bounds))) | 4132 | (cond ((and (>= pnt (nth 1 (car bounds))) |
| 4188 | (<= pnt (nth 2 (car bounds)))) | 4133 | (<= pnt (nth 2 (car bounds)))) |
| @@ -4192,11 +4137,10 @@ An error is signaled if point is outside key or BibTeX field." | |||
| 4192 | (<= pnt (bibtex-end-of-text-in-string bounds))) | 4137 | (<= pnt (bibtex-end-of-text-in-string bounds))) |
| 4193 | (setq compl (bibtex-strings))))) | 4138 | (setq compl (bibtex-strings))))) |
| 4194 | ;; point is inside a @Preamble field | 4139 | ;; point is inside a @Preamble field |
| 4195 | ((and (bibtex-preamble-prefix t) | 4140 | ((setq bounds (bibtex-parse-preamble)) |
| 4196 | (setq bounds (bibtex-parse-field-text)) | 4141 | (if (and (>= pnt (bibtex-start-of-text-in-string bounds)) |
| 4197 | (>= pnt (car bounds)) | 4142 | (<= pnt (bibtex-end-of-text-in-string bounds))) |
| 4198 | (<= pnt (nth 1 bounds))) | 4143 | (setq compl (bibtex-strings)))) |
| 4199 | (setq compl (bibtex-strings))) | ||
| 4200 | ((and (looking-at bibtex-entry-maybe-empty-head) | 4144 | ((and (looking-at bibtex-entry-maybe-empty-head) |
| 4201 | ;; point is inside a key | 4145 | ;; point is inside a key |
| 4202 | (or (and (match-beginning bibtex-key-in-head) | 4146 | (or (and (match-beginning bibtex-key-in-head) |
| @@ -4209,41 +4153,53 @@ An error is signaled if point is outside key or BibTeX field." | |||
| 4209 | 4153 | ||
| 4210 | (cond ((eq compl 'key) | 4154 | (cond ((eq compl 'key) |
| 4211 | ;; key completion: no cleanup needed | 4155 | ;; key completion: no cleanup needed |
| 4212 | (let (completion-ignore-case) | 4156 | (setq choose-completion-string-functions nil |
| 4213 | (bibtex-complete-internal (bibtex-global-key-alist)))) | 4157 | completion-ignore-case nil) |
| 4158 | (bibtex-complete-internal (bibtex-global-key-alist))) | ||
| 4214 | 4159 | ||
| 4215 | ((eq compl 'crossref-key) | 4160 | ((eq compl 'crossref-key) |
| 4216 | ;; crossref key completion | 4161 | ;; crossref key completion |
| 4217 | (let (completion-ignore-case) | 4162 | ;; |
| 4218 | (setq choose-completion-string-functions | 4163 | ;; If we quit the *Completions* buffer without requesting |
| 4219 | (lambda (choice buffer mini-p base-size) | 4164 | ;; a completion, `choose-completion-string-functions' is still |
| 4220 | (let ((choose-completion-string-functions nil)) | 4165 | ;; non-nil. Therefore, `choose-completion-string-functions' is |
| 4221 | (choose-completion-string choice buffer base-size)) | 4166 | ;; always set (either to non-nil or nil) when a new completion |
| 4222 | (bibtex-complete-crossref-cleanup choice) | 4167 | ;; is requested. |
| 4223 | ;; return t (needed by choose-completion-string-functions) | 4168 | ;; Also, `choose-completion-delete-max-match' requires |
| 4224 | t)) | 4169 | ;; that we set `completion-ignore-case' (i.e., binding via `let' |
| 4225 | (bibtex-complete-crossref-cleanup (bibtex-complete-internal | 4170 | ;; is not sufficient). |
| 4226 | (bibtex-global-key-alist))))) | 4171 | (setq completion-ignore-case nil |
| 4172 | choose-completion-string-functions | ||
| 4173 | (lambda (choice buffer mini-p base-size) | ||
| 4174 | (setq choose-completion-string-functions nil) | ||
| 4175 | (choose-completion-string choice buffer base-size) | ||
| 4176 | (bibtex-complete-crossref-cleanup choice) | ||
| 4177 | t)) ; needed by choose-completion-string-functions | ||
| 4178 | |||
| 4179 | (bibtex-complete-crossref-cleanup (bibtex-complete-internal | ||
| 4180 | (bibtex-global-key-alist)))) | ||
| 4227 | 4181 | ||
| 4228 | ((eq compl 'string) | 4182 | ((eq compl 'string) |
| 4229 | ;; string key completion: no cleanup needed | 4183 | ;; string key completion: no cleanup needed |
| 4230 | (let ((completion-ignore-case t)) | 4184 | (setq choose-completion-string-functions nil |
| 4231 | (bibtex-complete-internal bibtex-strings))) | 4185 | completion-ignore-case t) |
| 4186 | (bibtex-complete-internal bibtex-strings)) | ||
| 4232 | 4187 | ||
| 4233 | (compl | 4188 | (compl |
| 4234 | ;; string completion | 4189 | ;; string completion |
| 4235 | (let ((completion-ignore-case t)) | 4190 | (setq completion-ignore-case t |
| 4236 | (setq choose-completion-string-functions | 4191 | choose-completion-string-functions |
| 4237 | `(lambda (choice buffer mini-p base-size) | 4192 | `(lambda (choice buffer mini-p base-size) |
| 4238 | (let ((choose-completion-string-functions nil)) | 4193 | (setq choose-completion-string-functions nil) |
| 4239 | (choose-completion-string choice buffer base-size)) | 4194 | (choose-completion-string choice buffer base-size) |
| 4240 | (bibtex-complete-string-cleanup choice ',compl) | 4195 | (bibtex-complete-string-cleanup choice ',compl) |
| 4241 | ;; return t (needed by choose-completion-string-functions) | 4196 | t)) ; needed by choose-completion-string-functions |
| 4242 | t)) | 4197 | (bibtex-complete-string-cleanup (bibtex-complete-internal compl) |
| 4243 | (bibtex-complete-string-cleanup (bibtex-complete-internal compl) | 4198 | compl)) |
| 4244 | compl))) | 4199 | |
| 4245 | 4200 | (t (setq choose-completion-string-functions nil | |
| 4246 | (t (error "Point outside key or BibTeX field"))))) | 4201 | completion-ignore-case nil) ; default |
| 4202 | (error "Point outside key or BibTeX field"))))) | ||
| 4247 | 4203 | ||
| 4248 | (defun bibtex-Article () | 4204 | (defun bibtex-Article () |
| 4249 | "Insert a new BibTeX @Article entry; see also `bibtex-entry'." | 4205 | "Insert a new BibTeX @Article entry; see also `bibtex-entry'." |
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index ce95c6f026f..48defb7d786 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el | |||
| @@ -291,12 +291,13 @@ act as a paragraph-separator." | |||
| 291 | 291 | ||
| 292 | (defun fill-single-word-nobreak-p () | 292 | (defun fill-single-word-nobreak-p () |
| 293 | "Don't break a line after the first or before the last word of a sentence." | 293 | "Don't break a line after the first or before the last word of a sentence." |
| 294 | (or (looking-at "[ \t]*\\sw+[ \t]*[.?!:][ \t]*$") | 294 | (or (looking-at (concat "[ \t]*\\sw+" "\\(?:" (sentence-end) "\\)")) |
| 295 | (save-excursion | 295 | (save-excursion |
| 296 | (skip-chars-backward " \t") | 296 | (skip-chars-backward " \t") |
| 297 | (and (/= (skip-syntax-backward "w") 0) | 297 | (and (/= (skip-syntax-backward "w") 0) |
| 298 | (/= (skip-chars-backward " \t") 0) | 298 | (/= (skip-chars-backward " \t") 0) |
| 299 | (/= (skip-chars-backward ".?!:") 0))))) | 299 | (/= (skip-chars-backward ".?!:") 0) |
| 300 | (looking-at (sentence-end)))))) | ||
| 300 | 301 | ||
| 301 | (defun fill-french-nobreak-p () | 302 | (defun fill-french-nobreak-p () |
| 302 | "Return nil if French style allows breaking the line at point. | 303 | "Return nil if French style allows breaking the line at point. |
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index ac6afe45608..cc2d1eace59 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2006-01-02 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * url-handlers.el (url-retrieve-synchronously): Don't autoload. | ||
| 4 | |||
| 5 | * url.el (url-retrieve, url-retrieve-synchronously): Autoload. | ||
| 6 | |||
| 7 | * url-cache.el: Require `url'. | ||
| 8 | |||
| 1 | 2005-12-27 Stefan Monnier <monnier@iro.umontreal.ca> | 9 | 2005-12-27 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 10 | ||
| 3 | * url-cache.el (url-store-in-cache): Use save-current-buffer. | 11 | * url-cache.el (url-store-in-cache): Use save-current-buffer. |
diff --git a/lisp/url/url-cache.el b/lisp/url/url-cache.el index b8c2b063adc..5113ad0d7d9 100644 --- a/lisp/url/url-cache.el +++ b/lisp/url/url-cache.el | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | ;;; url-cache.el --- Uniform Resource Locator retrieval tool | 1 | ;;; url-cache.el --- Uniform Resource Locator retrieval tool |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1996, 1997, 1998, 1999, 2004, | 3 | ;; Copyright (C) 1996, 1997, 1998, 1999, 2004, |
| 4 | ;; 2005 Free Software Foundation, Inc. | 4 | ;; 2005, 2006 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Keywords: comm, data, processes, hypermedia | 6 | ;; Keywords: comm, data, processes, hypermedia |
| 7 | 7 | ||
| @@ -26,6 +26,7 @@ | |||
| 26 | 26 | ||
| 27 | (require 'url-parse) | 27 | (require 'url-parse) |
| 28 | (require 'url-util) | 28 | (require 'url-util) |
| 29 | (require 'url) ;E.g. for url-configuration-directory. | ||
| 29 | 30 | ||
| 30 | (defcustom url-cache-directory | 31 | (defcustom url-cache-directory |
| 31 | (expand-file-name "cache" url-configuration-directory) | 32 | (expand-file-name "cache" url-configuration-directory) |
diff --git a/lisp/url/url-handlers.el b/lisp/url/url-handlers.el index 1c9d1d9c0b1..0338eefd268 100644 --- a/lisp/url/url-handlers.el +++ b/lisp/url/url-handlers.el | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | ;;; url-handlers.el --- file-name-handler stuff for URL loading | 1 | ;;; url-handlers.el --- file-name-handler stuff for URL loading |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1996, 1997, 1998, 1999, 2004, | 3 | ;; Copyright (C) 1996, 1997, 1998, 1999, 2004, |
| 4 | ;; 2005 Free Software Foundation, Inc. | 4 | ;; 2005, 2006 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Keywords: comm, data, processes, hypermedia | 6 | ;; Keywords: comm, data, processes, hypermedia |
| 7 | 7 | ||
| @@ -37,7 +37,6 @@ | |||
| 37 | ;; after mm-dissect-buffer and defined in the same file. | 37 | ;; after mm-dissect-buffer and defined in the same file. |
| 38 | ;; The following are autoloaded instead of `require'd to avoid eagerly | 38 | ;; The following are autoloaded instead of `require'd to avoid eagerly |
| 39 | ;; loading all of URL when turning on url-handler-mode in the .emacs. | 39 | ;; loading all of URL when turning on url-handler-mode in the .emacs. |
| 40 | (autoload 'url-retrieve-synchronously "url" "Retrieve url synchronously.") | ||
| 41 | (autoload 'url-expand-file-name "url-expand" "Convert url to a fully specified url, and canonicalize it.") | 40 | (autoload 'url-expand-file-name "url-expand" "Convert url to a fully specified url, and canonicalize it.") |
| 42 | (autoload 'mm-dissect-buffer "mm-decode" "Dissect the current buffer and return a list of MIME handles.") | 41 | (autoload 'mm-dissect-buffer "mm-decode" "Dissect the current buffer and return a list of MIME handles.") |
| 43 | (autoload 'url-scheme-get-property "url-methods" "Get property of a URL SCHEME.") | 42 | (autoload 'url-scheme-get-property "url-methods" "Get property of a URL SCHEME.") |
diff --git a/lisp/url/url.el b/lisp/url/url.el index 6d6540ac82a..f9d06010171 100644 --- a/lisp/url/url.el +++ b/lisp/url/url.el | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | ;;; url.el --- Uniform Resource Locator retrieval tool | 1 | ;;; url.el --- Uniform Resource Locator retrieval tool |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1996, 1997, 1998, 1999, 2001, 2004, | 3 | ;; Copyright (C) 1996, 1997, 1998, 1999, 2001, 2004, |
| 4 | ;; 2005 Free Software Foundation, Inc. | 4 | ;; 2005, 2006 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Bill Perry <wmperry@gnu.org> | 6 | ;; Author: Bill Perry <wmperry@gnu.org> |
| 7 | ;; Keywords: comm, data, processes, hypermedia | 7 | ;; Keywords: comm, data, processes, hypermedia |
| @@ -114,6 +114,7 @@ Emacs." | |||
| 114 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 114 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 115 | ;;; Retrieval functions | 115 | ;;; Retrieval functions |
| 116 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 116 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 117 | ;;;###autoload | ||
| 117 | (defun url-retrieve (url callback &optional cbargs) | 118 | (defun url-retrieve (url callback &optional cbargs) |
| 118 | "Retrieve URL asynchronously and call CALLBACK with CBARGS when finished. | 119 | "Retrieve URL asynchronously and call CALLBACK with CBARGS when finished. |
| 119 | URL is either a string or a parsed URL. | 120 | URL is either a string or a parsed URL. |
| @@ -155,6 +156,7 @@ already completed." | |||
| 155 | (url-history-update-url url (current-time))) | 156 | (url-history-update-url url (current-time))) |
| 156 | buffer)) | 157 | buffer)) |
| 157 | 158 | ||
| 159 | ;;;###autoload | ||
| 158 | (defun url-retrieve-synchronously (url) | 160 | (defun url-retrieve-synchronously (url) |
| 159 | "Retrieve URL synchronously. | 161 | "Retrieve URL synchronously. |
| 160 | Return the buffer containing the data, or nil if there are no data | 162 | Return the buffer containing the data, or nil if there are no data |
diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el index 075ea879270..0036712fec4 100644 --- a/lisp/xt-mouse.el +++ b/lisp/xt-mouse.el | |||
| @@ -39,9 +39,6 @@ | |||
| 39 | 39 | ||
| 40 | ;;; Todo: | 40 | ;;; Todo: |
| 41 | 41 | ||
| 42 | ;; The xterm mouse escape codes are supposedly also supported by the | ||
| 43 | ;; Linux console, but I have not been able to verify this. | ||
| 44 | |||
| 45 | ;; Support multi-click -- somehow. | 42 | ;; Support multi-click -- somehow. |
| 46 | 43 | ||
| 47 | ;;; Code: | 44 | ;;; Code: |
diff --git a/lispref/ChangeLog b/lispref/ChangeLog index e812c834c01..f3b812390a1 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog | |||
| @@ -1,3 +1,22 @@ | |||
| 1 | 2005-12-30 Richard M. Stallman <rms@gnu.org> | ||
| 2 | |||
| 3 | * text.texi (Changing Properties): | ||
| 4 | Don't use return value of set-text-properties. | ||
| 5 | |||
| 6 | 2005-12-29 Luc Teirlinck <teirllm@auburn.edu> | ||
| 7 | |||
| 8 | * modes.texi (Mode Line Format): Correct typo in menu. | ||
| 9 | |||
| 10 | 2005-12-29 Richard M. Stallman <rms@gnu.org> | ||
| 11 | |||
| 12 | * modes.texi (Mode Line Top): New node. | ||
| 13 | (Mode Line Data): Some text moved to new node. | ||
| 14 | Explain the data structure more concretely. | ||
| 15 | (Mode Line Basics): Clarifications. | ||
| 16 | (Mode Line Variables): Clarify intro paragraph. | ||
| 17 | (%-Constructs): Clarify intro paragraph. | ||
| 18 | (Mode Line Format): Update menu. | ||
| 19 | |||
| 1 | 2005-12-28 Luc Teirlinck <teirllm@auburn.edu> | 20 | 2005-12-28 Luc Teirlinck <teirllm@auburn.edu> |
| 2 | 21 | ||
| 3 | * minibuf.texi (Basic Completion): Update lazy-completion-table | 22 | * minibuf.texi (Basic Completion): Update lazy-completion-table |
diff --git a/lispref/modes.texi b/lispref/modes.texi index 6fd23114044..15954ed1d1d 100644 --- a/lispref/modes.texi +++ b/lispref/modes.texi | |||
| @@ -1520,8 +1520,9 @@ information displayed in the mode line relates to the enabled major and | |||
| 1520 | minor modes. | 1520 | minor modes. |
| 1521 | 1521 | ||
| 1522 | @menu | 1522 | @menu |
| 1523 | * Mode Line Basics:: | 1523 | * Base: Mode Line Basics. Basic ideas of mode line control. |
| 1524 | * Mode Line Data:: The data structure that controls the mode line. | 1524 | * Data: Mode Line Data. The data structure that controls the mode line. |
| 1525 | * Top: Mode Line Top. The top level variable, mode-line-format. | ||
| 1525 | * Mode Line Variables:: Variables used in that data structure. | 1526 | * Mode Line Variables:: Variables used in that data structure. |
| 1526 | * %-Constructs:: Putting information into a mode line. | 1527 | * %-Constructs:: Putting information into a mode line. |
| 1527 | * Properties in Mode:: Using text properties in the mode line. | 1528 | * Properties in Mode:: Using text properties in the mode line. |
| @@ -1533,12 +1534,13 @@ minor modes. | |||
| 1533 | @subsection Mode Line Basics | 1534 | @subsection Mode Line Basics |
| 1534 | 1535 | ||
| 1535 | @code{mode-line-format} is a buffer-local variable that holds a | 1536 | @code{mode-line-format} is a buffer-local variable that holds a |
| 1536 | template used to display the mode line of the current buffer. All | 1537 | @dfn{mode line construct}, a kind of template, which controls the |
| 1537 | windows for the same buffer use the same @code{mode-line-format}, so | 1538 | display the mode line of the current buffer. All windows for the same |
| 1538 | their mode lines appear the same---except for scrolling percentages, and | 1539 | buffer use the same @code{mode-line-format}, so their mode lines |
| 1539 | line and column numbers, since those depend on point and on how the | 1540 | appear the same---except for scrolling percentages, and line and |
| 1540 | window is scrolled. @code{header-line-format} is used likewise for | 1541 | column numbers, since those depend on point and on how the window is |
| 1541 | header lines. | 1542 | scrolled. The value of @code{header-line-format} specifies the |
| 1543 | buffer's header line in the same way, with a mode line construct. | ||
| 1542 | 1544 | ||
| 1543 | For efficiency, Emacs does not recompute the mode line and header | 1545 | For efficiency, Emacs does not recompute the mode line and header |
| 1544 | line of a window in every redisplay. It does so when circumstances | 1546 | line of a window in every redisplay. It does so when circumstances |
| @@ -1567,61 +1569,36 @@ and the frame title. | |||
| 1567 | color using the face @code{mode-line}. Other windows' mode lines | 1569 | color using the face @code{mode-line}. Other windows' mode lines |
| 1568 | appear in the face @code{mode-line-inactive} instead. @xref{Faces}. | 1570 | appear in the face @code{mode-line-inactive} instead. @xref{Faces}. |
| 1569 | 1571 | ||
| 1570 | A window that is just one line tall does not display either a mode | ||
| 1571 | line or a header line, even if the variables call for one. A window | ||
| 1572 | that is two lines tall cannot display both a mode line and a header | ||
| 1573 | line at once; if the variables call for both, only the mode line | ||
| 1574 | actually appears. | ||
| 1575 | |||
| 1576 | @node Mode Line Data | 1572 | @node Mode Line Data |
| 1577 | @subsection The Data Structure of the Mode Line | 1573 | @subsection The Data Structure of the Mode Line |
| 1578 | @cindex mode-line construct | 1574 | @cindex mode-line construct |
| 1579 | 1575 | ||
| 1580 | The mode-line contents are controlled by a data structure of lists, | 1576 | The mode-line contents are controlled by a data structure called a |
| 1581 | strings, symbols, and numbers kept in buffer-local variables. The data | 1577 | @dfn{mode-line construct}, made up of lists, strings, symbols, and |
| 1582 | structure is called a @dfn{mode-line construct}, and it is built in | 1578 | numbers kept in buffer-local variables. Each data type has a specific |
| 1583 | recursive fashion out of simpler mode-line constructs. The same data | 1579 | meaning for the mode-line appearance, as described below. The same |
| 1584 | structure is used for constructing frame titles (@pxref{Frame Titles}) | 1580 | data structure is used for constructing frame titles (@pxref{Frame |
| 1585 | and header lines (@pxref{Header Lines}). | 1581 | Titles}) and header lines (@pxref{Header Lines}). |
| 1586 | |||
| 1587 | @defvar mode-line-format | ||
| 1588 | The value of this variable is a mode-line construct with overall | ||
| 1589 | responsibility for the mode-line format. The value of this variable | ||
| 1590 | controls which other variables are used to form the mode-line text, and | ||
| 1591 | where they appear. | ||
| 1592 | |||
| 1593 | If you set this variable to @code{nil} in a buffer, that buffer does not | ||
| 1594 | have a mode line. | ||
| 1595 | @end defvar | ||
| 1596 | |||
| 1597 | A mode-line construct may be as simple as a fixed string of text, but | ||
| 1598 | it usually specifies how to use other variables to construct the text. | ||
| 1599 | Many of these variables are themselves defined to have mode-line | ||
| 1600 | constructs as their values. | ||
| 1601 | 1582 | ||
| 1602 | The default value of @code{mode-line-format} incorporates the values | 1583 | A mode-line construct may be as simple as a fixed string of text, |
| 1603 | of variables such as @code{mode-line-position} and | 1584 | but it usually specifies how to combine fixed strings with variables' |
| 1604 | @code{mode-line-modes} (which in turn incorporates the values of the | 1585 | values to construct the text. Many of these variables are themselves |
| 1605 | variables @code{mode-name} and @code{minor-mode-alist}). Because of | 1586 | defined to have mode-line constructs as their values. |
| 1606 | this, very few modes need to alter @code{mode-line-format} itself. For | ||
| 1607 | most purposes, it is sufficient to alter some of the variables that | ||
| 1608 | @code{mode-line-format} either directly or indirectly refers to. | ||
| 1609 | 1587 | ||
| 1610 | A mode-line construct may be a list, a symbol, or a string. If the | 1588 | Here are the meanings of various data types as mode-line constructs: |
| 1611 | value is a list, each element may be a list, a symbol, or a string. | ||
| 1612 | |||
| 1613 | The mode line can display various faces, if the strings that control | ||
| 1614 | it have the @code{face} property. @xref{Properties in Mode}. In | ||
| 1615 | addition, the face @code{mode-line} is used as a default for the whole | ||
| 1616 | mode line (@pxref{Standard Faces,,, emacs, The GNU Emacs Manual}). | ||
| 1617 | 1589 | ||
| 1618 | @table @code | 1590 | @table @code |
| 1619 | @cindex percent symbol in mode line | 1591 | @cindex percent symbol in mode line |
| 1620 | @item @var{string} | 1592 | @item @var{string} |
| 1621 | A string as a mode-line construct is displayed verbatim in the mode line | 1593 | A string as a mode-line construct appears verbatim in the mode line |
| 1622 | except for @dfn{@code{%}-constructs}. Decimal digits after the @samp{%} | 1594 | except for @dfn{@code{%}-constructs} in it. These stand for |
| 1623 | specify the field width for space filling on the right (i.e., the data | 1595 | substitution of other data; see @ref{%-Constructs}. |
| 1624 | is left justified). @xref{%-Constructs}. | 1596 | |
| 1597 | If the string has @code{face} properties, they are copied into the | ||
| 1598 | mode line contents too (@pxref{Properties in Mode}). Any characters | ||
| 1599 | in the mode line which have no @code{face} properties are displayed, | ||
| 1600 | by default, in the face @code{mode-line} or @code{mode-line-inactive} | ||
| 1601 | (@pxref{Standard Faces,,, emacs, The GNU Emacs Manual}). | ||
| 1625 | 1602 | ||
| 1626 | @item @var{symbol} | 1603 | @item @var{symbol} |
| 1627 | A symbol as a mode-line construct stands for its value. The value of | 1604 | A symbol as a mode-line construct stands for its value. The value of |
| @@ -1633,11 +1610,13 @@ There is one exception: if the value of @var{symbol} is a string, it is | |||
| 1633 | displayed verbatim: the @code{%}-constructs are not recognized. | 1610 | displayed verbatim: the @code{%}-constructs are not recognized. |
| 1634 | 1611 | ||
| 1635 | Unless @var{symbol} is marked as ``risky'' (i.e., it has a | 1612 | Unless @var{symbol} is marked as ``risky'' (i.e., it has a |
| 1636 | non-@code{nil} @code{risky-local-variable} property), all properties in | 1613 | non-@code{nil} @code{risky-local-variable} property), all text |
| 1637 | any strings, as well as all @code{:eval} and @code{:propertize} forms in | 1614 | properties specified in @var{symbol}'s value are ignored. This |
| 1638 | the value of that symbol will be ignored. | 1615 | includes the text properties of strings in @var{symbol}'s value, as |
| 1616 | well as all @code{:eval} and @code{:propertize} forms in it. | ||
| 1639 | 1617 | ||
| 1640 | @item (@var{string} @var{rest}@dots{}) @r{or} (@var{list} @var{rest}@dots{}) | 1618 | @item (@var{string} @var{rest}@dots{}) |
| 1619 | @itemx (@var{list} @var{rest}@dots{}) | ||
| 1641 | A list whose first element is a string or list means to process all the | 1620 | A list whose first element is a string or list means to process all the |
| 1642 | elements recursively and concatenate the results. This is the most | 1621 | elements recursively and concatenate the results. This is the most |
| 1643 | common form of mode-line construct. | 1622 | common form of mode-line construct. |
| @@ -1650,7 +1629,7 @@ recursion. | |||
| 1650 | 1629 | ||
| 1651 | @item (:propertize @var{elt} @var{props}@dots{}) | 1630 | @item (:propertize @var{elt} @var{props}@dots{}) |
| 1652 | A list whose first element is the symbol @code{:propertize} says to | 1631 | A list whose first element is the symbol @code{:propertize} says to |
| 1653 | process the mode-line construct @var{elt} recursively and add the text | 1632 | process the mode-line construct @var{elt} recursively, then add the text |
| 1654 | properties specified by @var{props} to the result. The argument | 1633 | properties specified by @var{props} to the result. The argument |
| 1655 | @var{props} should consist of zero or more pairs @var{text-property} | 1634 | @var{props} should consist of zero or more pairs @var{text-property} |
| 1656 | @var{value}. (This feature is new as of Emacs 22.1.) | 1635 | @var{value}. (This feature is new as of Emacs 22.1.) |
| @@ -1677,6 +1656,29 @@ For example, the usual way to show what percentage of a buffer is above | |||
| 1677 | the top of the window is to use a list like this: @code{(-3 "%p")}. | 1656 | the top of the window is to use a list like this: @code{(-3 "%p")}. |
| 1678 | @end table | 1657 | @end table |
| 1679 | 1658 | ||
| 1659 | @node Mode Line Top | ||
| 1660 | @subsection The Top Level of Mode Line Control | ||
| 1661 | |||
| 1662 | The variable in overall control of the mode line is | ||
| 1663 | @code{mode-line-format}. | ||
| 1664 | |||
| 1665 | @defvar mode-line-format | ||
| 1666 | The value of this variable is a mode-line construct that controls the | ||
| 1667 | contents of the mode-line. It is always buffer-local in all buffers. | ||
| 1668 | |||
| 1669 | If you set this variable to @code{nil} in a buffer, that buffer does | ||
| 1670 | not have a mode line. (A window that is just one line tall never | ||
| 1671 | displays a mode line.) | ||
| 1672 | @end defvar | ||
| 1673 | |||
| 1674 | The default value of @code{mode-line-format} is designed to use the | ||
| 1675 | values of other variables such as @code{mode-line-position} and | ||
| 1676 | @code{mode-line-modes} (which in turn incorporates the values of the | ||
| 1677 | variables @code{mode-name} and @code{minor-mode-alist}). Very few | ||
| 1678 | modes need to alter @code{mode-line-format} itself. For most | ||
| 1679 | purposes, it is sufficient to alter some of the variables that | ||
| 1680 | @code{mode-line-format} either directly or indirectly refers to. | ||
| 1681 | |||
| 1680 | If you do alter @code{mode-line-format} itself, the new value should | 1682 | If you do alter @code{mode-line-format} itself, the new value should |
| 1681 | use the same variables that appear in the default value (@pxref{Mode | 1683 | use the same variables that appear in the default value (@pxref{Mode |
| 1682 | Line Variables}), rather than duplicating their contents or displaying | 1684 | Line Variables}), rather than duplicating their contents or displaying |
| @@ -1730,11 +1732,14 @@ these variable names are also the minor mode command names.) | |||
| 1730 | @node Mode Line Variables | 1732 | @node Mode Line Variables |
| 1731 | @subsection Variables Used in the Mode Line | 1733 | @subsection Variables Used in the Mode Line |
| 1732 | 1734 | ||
| 1733 | This section describes variables incorporated by the | 1735 | This section describes variables incorporated by the standard value |
| 1734 | standard value of @code{mode-line-format} into the text of the mode | 1736 | of @code{mode-line-format} into the text of the mode line. There is |
| 1735 | line. There is nothing inherently special about these variables; any | 1737 | nothing inherently special about these variables; any other variables |
| 1736 | other variables could have the same effects on the mode line if | 1738 | could have the same effects on the mode line if |
| 1737 | @code{mode-line-format} were changed to use them. | 1739 | @code{mode-line-format}'s value were changed to use them. However, |
| 1740 | various parts of Emacs set these variables on the understanding that | ||
| 1741 | they will control parts of the mode line; therefore, practically | ||
| 1742 | speaking, it is essential for the mode line to use them. | ||
| 1738 | 1743 | ||
| 1739 | @defvar mode-line-mule-info | 1744 | @defvar mode-line-mule-info |
| 1740 | This variable holds the value of the mode-line construct that displays | 1745 | This variable holds the value of the mode-line construct that displays |
| @@ -1907,10 +1912,12 @@ specifies addition of text properties. | |||
| 1907 | @node %-Constructs | 1912 | @node %-Constructs |
| 1908 | @subsection @code{%}-Constructs in the Mode Line | 1913 | @subsection @code{%}-Constructs in the Mode Line |
| 1909 | 1914 | ||
| 1910 | The following table lists the recognized @code{%}-constructs and what | 1915 | Strings used as mode-line constructs can use certain |
| 1911 | they mean. In any construct except @samp{%%}, you can add a decimal | 1916 | @code{%}-constructs to substitute various kinds of data. Here is a |
| 1912 | integer after the @samp{%} to specify a minimum field width. If the | 1917 | list of the defined @code{%}-constructs, and what they mean. In any |
| 1913 | width is less, the field is padded with spaces to the right. | 1918 | construct except @samp{%%}, you can add a decimal integer after the |
| 1919 | @samp{%} to specify a minimum field width. If the width is less, the | ||
| 1920 | field is padded with spaces to the right. | ||
| 1914 | 1921 | ||
| 1915 | @table @code | 1922 | @table @code |
| 1916 | @item %b | 1923 | @item %b |
| @@ -2078,6 +2085,11 @@ that do not override it. This is the same as @code{(default-value | |||
| 2078 | It is normally @code{nil}, so that ordinary buffers have no header line. | 2085 | It is normally @code{nil}, so that ordinary buffers have no header line. |
| 2079 | @end defvar | 2086 | @end defvar |
| 2080 | 2087 | ||
| 2088 | A window that is just one line tall never displays a header line. A | ||
| 2089 | window that is two lines tall cannot display both a mode line and a | ||
| 2090 | header line at once; if it has a mode line, then it does not display a | ||
| 2091 | header line. | ||
| 2092 | |||
| 2081 | @node Emulating Mode Line | 2093 | @node Emulating Mode Line |
| 2082 | @subsection Emulating Mode-Line Formatting | 2094 | @subsection Emulating Mode-Line Formatting |
| 2083 | 2095 | ||
diff --git a/lispref/text.texi b/lispref/text.texi index b8d727efca4..b37715be5a0 100644 --- a/lispref/text.texi +++ b/lispref/text.texi | |||
| @@ -2735,6 +2735,8 @@ from the specified range of text. Here's an example: | |||
| 2735 | @example | 2735 | @example |
| 2736 | (set-text-properties @var{start} @var{end} nil) | 2736 | (set-text-properties @var{start} @var{end} nil) |
| 2737 | @end example | 2737 | @end example |
| 2738 | |||
| 2739 | Do not rely on the return value of this function. | ||
| 2738 | @end defun | 2740 | @end defun |
| 2739 | 2741 | ||
| 2740 | The easiest way to make a string with text properties | 2742 | The easiest way to make a string with text properties |
diff --git a/man/ChangeLog b/man/ChangeLog index 3c4b718c796..168753ae7a7 100644 --- a/man/ChangeLog +++ b/man/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2005-12-30 Juri Linkov <juri@jurta.org> | ||
| 2 | |||
| 3 | * basic.texi (Position Info): Update example. | ||
| 4 | |||
| 5 | 2005-12-29 Romain Francoise <romain@orebokech.com> | ||
| 6 | |||
| 7 | * faq.texi (Using Customize): New node. | ||
| 8 | |||
| 1 | 2005-12-28 Luc Teirlinck <teirllm@auburn.edu> | 9 | 2005-12-28 Luc Teirlinck <teirllm@auburn.edu> |
| 2 | 10 | ||
| 3 | * org.texi: Remove blank line in @direntry. It is non-standard | 11 | * org.texi: Remove blank line in @direntry. It is non-standard |
diff --git a/man/basic.texi b/man/basic.texi index e8c36d405c1..c2e48263c20 100644 --- a/man/basic.texi +++ b/man/basic.texi | |||
| @@ -717,14 +717,14 @@ displays the character as @samp{@`A}), and which has font-lock-mode | |||
| 717 | 717 | ||
| 718 | @smallexample | 718 | @smallexample |
| 719 | character: @`A (2240, #o4300, #x8c0, U+00C0) | 719 | character: @`A (2240, #o4300, #x8c0, U+00C0) |
| 720 | charset: [latin-iso8859-1] | 720 | charset: latin-iso8859-1 |
| 721 | (Right-Hand Part of Latin Alphabet 1@dots{} | 721 | (Right-Hand Part of Latin Alphabet 1@dots{} |
| 722 | code point: [64] | 722 | code point: #x40 |
| 723 | syntax: w which means: word | 723 | syntax: w which means: word |
| 724 | category: l:Latin | 724 | category: l:Latin |
| 725 | to input: type "`A" with [latin-1-prefix] | 725 | to input: type "`A" with latin-1-prefix |
| 726 | buffer code: #x81 #xC0 | 726 | buffer code: #x81 #xC0 |
| 727 | file code: ESC #x2C #x41 #x40 (encoded by coding system iso-2022-7bit) | 727 | file code: #xC0 (encoded by coding system iso-latin-1) |
| 728 | display: terminal code #xC0 | 728 | display: terminal code #xC0 |
| 729 | 729 | ||
| 730 | There are text properties here: | 730 | There are text properties here: |
diff --git a/man/display.texi b/man/display.texi index 2f813c4b7c0..2a3fc30ad82 100644 --- a/man/display.texi +++ b/man/display.texi | |||
| @@ -1014,6 +1014,13 @@ terminal itself blinks the cursor, and Emacs has no control over it.) | |||
| 1014 | You can control how the cursor appears when it blinks off by setting | 1014 | You can control how the cursor appears when it blinks off by setting |
| 1015 | the variable @code{blink-cursor-alist}. | 1015 | the variable @code{blink-cursor-alist}. |
| 1016 | 1016 | ||
| 1017 | @vindex visible-cursor | ||
| 1018 | Some text terminals offer two different cursors: the normal cursor | ||
| 1019 | and the very visible cursor, where the latter may be e.g. bigger or | ||
| 1020 | blinking. By default Emacs uses the very visible cursor. Setting the | ||
| 1021 | variable @code{visible-cursor} to @code{nil} makes it use the | ||
| 1022 | normal cursor. | ||
| 1023 | |||
| 1017 | @cindex cursor in non-selected windows | 1024 | @cindex cursor in non-selected windows |
| 1018 | @vindex cursor-in-non-selected-windows | 1025 | @vindex cursor-in-non-selected-windows |
| 1019 | Normally, the cursor appears in non-selected windows in the ``off'' | 1026 | Normally, the cursor appears in non-selected windows in the ``off'' |
diff --git a/man/faq.texi b/man/faq.texi index 36564482cc7..b34a4d4ae12 100644 --- a/man/faq.texi +++ b/man/faq.texi | |||
| @@ -1161,6 +1161,7 @@ In addition, Emacs 22 now includes the Emacs Lisp Reference Manual | |||
| 1161 | 1161 | ||
| 1162 | @menu | 1162 | @menu |
| 1163 | * Setting up a customization file:: | 1163 | * Setting up a customization file:: |
| 1164 | * Using Customize:: | ||
| 1164 | * Debugging a customization file:: | 1165 | * Debugging a customization file:: |
| 1165 | * Colors on a TTY:: | 1166 | * Colors on a TTY:: |
| 1166 | * Displaying the current line or column:: | 1167 | * Displaying the current line or column:: |
| @@ -1211,7 +1212,7 @@ In addition, Emacs 22 now includes the Emacs Lisp Reference Manual | |||
| 1211 | * Escape sequences in shell output:: | 1212 | * Escape sequences in shell output:: |
| 1212 | @end menu | 1213 | @end menu |
| 1213 | 1214 | ||
| 1214 | @node Setting up a customization file, Colors on a TTY, Common requests, Common requests | 1215 | @node Setting up a customization file, Using Customize, Common requests, Common requests |
| 1215 | @section How do I set up a @file{.emacs} file properly? | 1216 | @section How do I set up a @file{.emacs} file properly? |
| 1216 | @cindex @file{.emacs} file, setting up | 1217 | @cindex @file{.emacs} file, setting up |
| 1217 | @cindex @file{.emacs} file, locating | 1218 | @cindex @file{.emacs} file, locating |
| @@ -1225,11 +1226,11 @@ it causes confusing non-standard behavior. Then they send questions to | |||
| 1225 | @email{help-gnu-emacs@@gnu.org} asking why Emacs isn't behaving as | 1226 | @email{help-gnu-emacs@@gnu.org} asking why Emacs isn't behaving as |
| 1226 | documented. | 1227 | documented. |
| 1227 | 1228 | ||
| 1228 | Beginning with version 20.1, Emacs includes the new Customize facility, | 1229 | Beginning with version 20.1, Emacs includes the new Customize facility |
| 1229 | which can be invoked using @kbd{M-x customize @key{RET}}. This allows | 1230 | (@pxref{Using Customize}). This allows users who are unfamiliar with |
| 1230 | users who are unfamiliar with Emacs Lisp to modify their @file{.emacs} | 1231 | Emacs Lisp to modify their @file{.emacs} files in a relatively |
| 1231 | files in a relatively straightforward way, using menus rather than Lisp | 1232 | straightforward way, using menus rather than Lisp code. Most packages |
| 1232 | code. Most packages support Customize as of this writing. | 1233 | support Customize as of this writing. |
| 1233 | 1234 | ||
| 1234 | While Customize might indeed make it easier to configure Emacs, | 1235 | While Customize might indeed make it easier to configure Emacs, |
| 1235 | consider taking a bit of time to learn Emacs Lisp and modifying your | 1236 | consider taking a bit of time to learn Emacs Lisp and modifying your |
| @@ -1241,7 +1242,26 @@ Sometimes users are unsure as to where their @file{.emacs} file should | |||
| 1241 | be found. Visiting the file as @file{~/.emacs} from Emacs will find | 1242 | be found. Visiting the file as @file{~/.emacs} from Emacs will find |
| 1242 | the correct file. | 1243 | the correct file. |
| 1243 | 1244 | ||
| 1244 | @node Colors on a TTY, Debugging a customization file, Setting up a customization file, Common requests | 1245 | @node Using Customize, Colors on a TTY, Setting up a customization file, Common requests |
| 1246 | @section How do I start using Customize? | ||
| 1247 | @cindex Customize groups | ||
| 1248 | @cindex Customizing variables | ||
| 1249 | @cindex Customizing faces | ||
| 1250 | |||
| 1251 | The main Customize entry point is @kbd{M-x customize @key{RET}}. This | ||
| 1252 | command takes you to a buffer listing all the available Customize | ||
| 1253 | groups. From there, you can access all customizable options and faces, | ||
| 1254 | change their values, and save your changes to your init file. | ||
| 1255 | @inforef{Easy Customization, Easy Customization, emacs}. | ||
| 1256 | |||
| 1257 | If you know the name of the group in advance (e.g. ``shell''), use | ||
| 1258 | @kbd{M-x customize-group @key{RET}}. | ||
| 1259 | |||
| 1260 | If you wish to customize a single option, use @kbd{M-x customize-option | ||
| 1261 | @key{RET}}. This command prompts you for the name of the option to | ||
| 1262 | customize, with completion. | ||
| 1263 | |||
| 1264 | @node Colors on a TTY, Debugging a customization file, Using Customize, Common requests | ||
| 1245 | @section How do I get colors and syntax highlighting on a TTY? | 1265 | @section How do I get colors and syntax highlighting on a TTY? |
| 1246 | @cindex Colors on a TTY | 1266 | @cindex Colors on a TTY |
| 1247 | @cindex Syntax highlighting on a TTY | 1267 | @cindex Syntax highlighting on a TTY |
diff --git a/src/.gdbinit b/src/.gdbinit index 10f993fdd9f..4120b1e10bf 100644 --- a/src/.gdbinit +++ b/src/.gdbinit | |||
| @@ -764,6 +764,12 @@ show environment DISPLAY | |||
| 764 | show environment TERM | 764 | show environment TERM |
| 765 | #set args -geometry 80x40+0+0 | 765 | #set args -geometry 80x40+0+0 |
| 766 | 766 | ||
| 767 | # People get bothered when they see messages about non-existent functions... | ||
| 768 | echo \n | ||
| 769 | echo If you see messages below about functions not being defined,\n | ||
| 770 | echo don\'t worry about them. Nothing is wrong.\n | ||
| 771 | echo \n | ||
| 772 | |||
| 767 | # Don't let abort actually run, as it will make | 773 | # Don't let abort actually run, as it will make |
| 768 | # stdio stop working and therefore the `pr' command above as well. | 774 | # stdio stop working and therefore the `pr' command above as well. |
| 769 | break abort | 775 | break abort |
diff --git a/src/ChangeLog b/src/ChangeLog index 4f6cb895004..6ad7c939bce 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,51 @@ | |||
| 1 | 2006-01-01 Ken Raeburn <raeburn@gnu.org> | ||
| 2 | |||
| 3 | * callproc.c (Fcall_process_region): Bind file-name-handler-alist | ||
| 4 | to nil for the call to Fwrite_region. | ||
| 5 | |||
| 6 | 2005-12-31 Richard M. Stallman <rms@gnu.org> | ||
| 7 | |||
| 8 | * minibuf.c (read_minibuf): Clear out all other minibuffer windows. | ||
| 9 | |||
| 10 | 2005-12-31 Eli Zaretskii <eliz@gnu.org> | ||
| 11 | |||
| 12 | * emacs.c (gdb_pvec_type): A dummy variable for GDB's sake. | ||
| 13 | |||
| 14 | 2005-12-30 Luc Teirlinck <teirllm@auburn.edu> | ||
| 15 | |||
| 16 | * textprop.c (set_text_properties): Reword description of return value. | ||
| 17 | Return Qnil if caller wants to remove all text properties from a | ||
| 18 | string and the string already has no intervals. | ||
| 19 | |||
| 20 | 2005-12-30 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 21 | |||
| 22 | * term.c (visible_cursor): New boolean var. | ||
| 23 | (set_terminal_modes, tty_show_cursor): Use "vs" or "ve" depending on | ||
| 24 | visible_cursor. | ||
| 25 | (syms_of_term): Export the new var as "visible-cursor". | ||
| 26 | |||
| 27 | 2005-12-30 Eli Zaretskii <eliz@gnu.org> | ||
| 28 | |||
| 29 | * .gdbinit: Tell users not to worry about GDB warnings that some | ||
| 30 | functions do not exist in the binary. | ||
| 31 | |||
| 32 | 2005-12-30 Andreas Schwab <schwab@suse.de> | ||
| 33 | |||
| 34 | * process.c (Fnetwork_interface_info): Correctly terminate the | ||
| 35 | loop over ifflag_table. | ||
| 36 | |||
| 37 | 2005-12-29 Richard M. Stallman <rms@gnu.org> | ||
| 38 | |||
| 39 | * lread.c (readevalloop): Test for reading a whole buffer | ||
| 40 | before actually reading anything. Handle all cases, including | ||
| 41 | START = END = nil and an already-narrowed buffer. | ||
| 42 | Convert END to a marker if it is a number. | ||
| 43 | |||
| 44 | * keymap.c (describe_map): Put sparse map elements into an array, | ||
| 45 | sort them, then output a sequence of identical bindings on one line. | ||
| 46 | (struct describe_map_elt): New data type. | ||
| 47 | (describe_map_compare): New function. | ||
| 48 | |||
| 1 | 2005-12-28 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 49 | 2005-12-28 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 2 | 50 | ||
| 3 | * gtkutil.c (xg_get_file_with_chooser): Changed message shown | 51 | * gtkutil.c (xg_get_file_with_chooser): Changed message shown |
diff --git a/src/callproc.c b/src/callproc.c index f38b7c03ab3..c7804b485c7 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -1133,6 +1133,9 @@ usage: (call-process-region START END PROGRAM &optional DELETE BUFFER DISPLAY &r | |||
| 1133 | int count1 = SPECPDL_INDEX (); | 1133 | int count1 = SPECPDL_INDEX (); |
| 1134 | 1134 | ||
| 1135 | specbind (intern ("coding-system-for-write"), val); | 1135 | specbind (intern ("coding-system-for-write"), val); |
| 1136 | /* POSIX lets mk[s]temp use "."; don't invoke jka-compr if we | ||
| 1137 | happen to get a ".Z" suffix. */ | ||
| 1138 | specbind (intern ("file-name-handler-alist"), Qnil); | ||
| 1136 | Fwrite_region (start, end, filename_string, Qnil, Qlambda, Qnil, Qnil); | 1139 | Fwrite_region (start, end, filename_string, Qnil, Qlambda, Qnil, Qnil); |
| 1137 | 1140 | ||
| 1138 | unbind_to (count1, Qnil); | 1141 | unbind_to (count1, Qnil); |
diff --git a/src/emacs.c b/src/emacs.c index 142da86df95..d38cf4379bf 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -113,6 +113,9 @@ EMACS_INT gdb_data_seg_bits = 0; | |||
| 113 | #endif | 113 | #endif |
| 114 | EMACS_INT PVEC_FLAG = PSEUDOVECTOR_FLAG; | 114 | EMACS_INT PVEC_FLAG = PSEUDOVECTOR_FLAG; |
| 115 | EMACS_INT gdb_array_mark_flag = ARRAY_MARK_FLAG; | 115 | EMACS_INT gdb_array_mark_flag = ARRAY_MARK_FLAG; |
| 116 | /* GDB might say "No enum type named pvec_type" if we don't have at | ||
| 117 | least one symbol with that type, and then xbacktrace could fail. */ | ||
| 118 | enum pvec_type gdb_pvec_type = PVEC_TYPE_MASK; | ||
| 116 | 119 | ||
| 117 | /* Command line args from shell, as list of strings. */ | 120 | /* Command line args from shell, as list of strings. */ |
| 118 | Lisp_Object Vcommand_line_args; | 121 | Lisp_Object Vcommand_line_args; |
diff --git a/src/keymap.c b/src/keymap.c index 97789a75f1d..64069ca4deb 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -3167,6 +3167,34 @@ describe_translation (definition, args) | |||
| 3167 | insert_string ("??\n"); | 3167 | insert_string ("??\n"); |
| 3168 | } | 3168 | } |
| 3169 | 3169 | ||
| 3170 | /* describe_map puts all the usable elements of a sparse keymap | ||
| 3171 | into an array of `struct describe_map_elt', | ||
| 3172 | then sorts them by the events. */ | ||
| 3173 | |||
| 3174 | struct describe_map_elt { Lisp_Object event; Lisp_Object definition; int shadowed; }; | ||
| 3175 | |||
| 3176 | /* qsort comparison function for sorting `struct describe_map_elt' by | ||
| 3177 | the event field. */ | ||
| 3178 | |||
| 3179 | static int | ||
| 3180 | describe_map_compare (aa, bb) | ||
| 3181 | const void *aa, *bb; | ||
| 3182 | { | ||
| 3183 | const struct describe_map_elt *a = aa, *b = bb; | ||
| 3184 | if (INTEGERP (a->event) && INTEGERP (b->event)) | ||
| 3185 | return ((XINT (a->event) > XINT (b->event)) | ||
| 3186 | - (XINT (a->event) < XINT (b->event))); | ||
| 3187 | if (!INTEGERP (a->event) && INTEGERP (b->event)) | ||
| 3188 | return 1; | ||
| 3189 | if (INTEGERP (a->event) && !INTEGERP (b->event)) | ||
| 3190 | return -1; | ||
| 3191 | if (SYMBOLP (a->event) && SYMBOLP (b->event)) | ||
| 3192 | return (Fstring_lessp (a->event, b->event) ? -1 | ||
| 3193 | : Fstring_lessp (b->event, a->event) ? 1 | ||
| 3194 | : 0); | ||
| 3195 | return 0; | ||
| 3196 | } | ||
| 3197 | |||
| 3170 | /* Describe the contents of map MAP, assuming that this map itself is | 3198 | /* Describe the contents of map MAP, assuming that this map itself is |
| 3171 | reached by the sequence of prefix keys PREFIX (a string or vector). | 3199 | reached by the sequence of prefix keys PREFIX (a string or vector). |
| 3172 | PARTIAL, SHADOW, NOMENU are as in `describe_map_tree' above. */ | 3200 | PARTIAL, SHADOW, NOMENU are as in `describe_map_tree' above. */ |
| @@ -3190,6 +3218,13 @@ describe_map (map, prefix, elt_describer, partial, shadow, | |||
| 3190 | int first = 1; | 3218 | int first = 1; |
| 3191 | struct gcpro gcpro1, gcpro2, gcpro3; | 3219 | struct gcpro gcpro1, gcpro2, gcpro3; |
| 3192 | 3220 | ||
| 3221 | /* These accumulate the values from sparse keymap bindings, | ||
| 3222 | so we can sort them and handle them in order. */ | ||
| 3223 | int length_needed = 0; | ||
| 3224 | struct describe_map_elt *vect; | ||
| 3225 | int slots_used = 0; | ||
| 3226 | int i; | ||
| 3227 | |||
| 3193 | suppress = Qnil; | 3228 | suppress = Qnil; |
| 3194 | 3229 | ||
| 3195 | if (partial) | 3230 | if (partial) |
| @@ -3201,6 +3236,12 @@ describe_map (map, prefix, elt_describer, partial, shadow, | |||
| 3201 | kludge = Fmake_vector (make_number (1), Qnil); | 3236 | kludge = Fmake_vector (make_number (1), Qnil); |
| 3202 | definition = Qnil; | 3237 | definition = Qnil; |
| 3203 | 3238 | ||
| 3239 | for (tail = map; CONSP (tail); tail = XCDR (tail)) | ||
| 3240 | length_needed++; | ||
| 3241 | |||
| 3242 | vect = ((struct describe_map_elt *) | ||
| 3243 | alloca (sizeof (struct describe_map_elt) * length_needed)); | ||
| 3244 | |||
| 3204 | GCPRO3 (prefix, definition, kludge); | 3245 | GCPRO3 (prefix, definition, kludge); |
| 3205 | 3246 | ||
| 3206 | for (tail = map; CONSP (tail); tail = XCDR (tail)) | 3247 | for (tail = map; CONSP (tail); tail = XCDR (tail)) |
| @@ -3215,6 +3256,7 @@ describe_map (map, prefix, elt_describer, partial, shadow, | |||
| 3215 | else if (CONSP (XCAR (tail))) | 3256 | else if (CONSP (XCAR (tail))) |
| 3216 | { | 3257 | { |
| 3217 | int this_shadowed = 0; | 3258 | int this_shadowed = 0; |
| 3259 | |||
| 3218 | event = XCAR (XCAR (tail)); | 3260 | event = XCAR (XCAR (tail)); |
| 3219 | 3261 | ||
| 3220 | /* Ignore bindings whose "prefix" are not really valid events. | 3262 | /* Ignore bindings whose "prefix" are not really valid events. |
| @@ -3255,27 +3297,10 @@ describe_map (map, prefix, elt_describer, partial, shadow, | |||
| 3255 | tem = Flookup_key (map, kludge, Qt); | 3297 | tem = Flookup_key (map, kludge, Qt); |
| 3256 | if (!EQ (tem, definition)) continue; | 3298 | if (!EQ (tem, definition)) continue; |
| 3257 | 3299 | ||
| 3258 | if (first) | 3300 | vect[slots_used].event = event; |
| 3259 | { | 3301 | vect[slots_used].definition = definition; |
| 3260 | previous_description_column = 0; | 3302 | vect[slots_used].shadowed = this_shadowed; |
| 3261 | insert ("\n", 1); | 3303 | slots_used++; |
| 3262 | first = 0; | ||
| 3263 | } | ||
| 3264 | |||
| 3265 | /* THIS gets the string to describe the character EVENT. */ | ||
| 3266 | insert1 (Fkey_description (kludge, prefix)); | ||
| 3267 | |||
| 3268 | /* Print a description of the definition of this character. | ||
| 3269 | elt_describer will take care of spacing out far enough | ||
| 3270 | for alignment purposes. */ | ||
| 3271 | (*elt_describer) (definition, Qnil); | ||
| 3272 | |||
| 3273 | if (this_shadowed) | ||
| 3274 | { | ||
| 3275 | SET_PT (PT - 1); | ||
| 3276 | insert_string (" (binding currently shadowed)"); | ||
| 3277 | SET_PT (PT + 1); | ||
| 3278 | } | ||
| 3279 | } | 3304 | } |
| 3280 | else if (EQ (XCAR (tail), Qkeymap)) | 3305 | else if (EQ (XCAR (tail), Qkeymap)) |
| 3281 | { | 3306 | { |
| @@ -3289,6 +3314,68 @@ describe_map (map, prefix, elt_describer, partial, shadow, | |||
| 3289 | } | 3314 | } |
| 3290 | } | 3315 | } |
| 3291 | 3316 | ||
| 3317 | /* If we found some sparse map events, sort them. */ | ||
| 3318 | |||
| 3319 | qsort (vect, slots_used, sizeof (struct describe_map_elt), | ||
| 3320 | describe_map_compare); | ||
| 3321 | |||
| 3322 | /* Now output them in sorted order. */ | ||
| 3323 | |||
| 3324 | for (i = 0; i < slots_used; i++) | ||
| 3325 | { | ||
| 3326 | Lisp_Object start, end; | ||
| 3327 | |||
| 3328 | if (first) | ||
| 3329 | { | ||
| 3330 | previous_description_column = 0; | ||
| 3331 | insert ("\n", 1); | ||
| 3332 | first = 0; | ||
| 3333 | } | ||
| 3334 | |||
| 3335 | ASET (kludge, 0, vect[i].event); | ||
| 3336 | start = vect[i].event; | ||
| 3337 | end = start; | ||
| 3338 | |||
| 3339 | definition = vect[i].definition; | ||
| 3340 | |||
| 3341 | /* Find consecutive chars that are identically defined. */ | ||
| 3342 | if (INTEGERP (vect[i].event)) | ||
| 3343 | { | ||
| 3344 | while (i + 1 < slots_used | ||
| 3345 | && XINT (vect[i + 1].event) == XINT (vect[i].event) + 1 | ||
| 3346 | && !NILP (Fequal (vect[i + 1].definition, definition)) | ||
| 3347 | && vect[i].shadowed == vect[i + 1].shadowed) | ||
| 3348 | i++; | ||
| 3349 | end = vect[i].event; | ||
| 3350 | } | ||
| 3351 | |||
| 3352 | /* Now START .. END is the range to describe next. */ | ||
| 3353 | |||
| 3354 | /* Insert the string to describe the event START. */ | ||
| 3355 | insert1 (Fkey_description (kludge, prefix)); | ||
| 3356 | |||
| 3357 | if (!EQ (start, end)) | ||
| 3358 | { | ||
| 3359 | insert (" .. ", 4); | ||
| 3360 | |||
| 3361 | ASET (kludge, 0, end); | ||
| 3362 | /* Insert the string to describe the character END. */ | ||
| 3363 | insert1 (Fkey_description (kludge, prefix)); | ||
| 3364 | } | ||
| 3365 | |||
| 3366 | /* Print a description of the definition of this character. | ||
| 3367 | elt_describer will take care of spacing out far enough | ||
| 3368 | for alignment purposes. */ | ||
| 3369 | (*elt_describer) (vect[i].definition, Qnil); | ||
| 3370 | |||
| 3371 | if (vect[i].shadowed) | ||
| 3372 | { | ||
| 3373 | SET_PT (PT - 1); | ||
| 3374 | insert_string (" (binding currently shadowed)"); | ||
| 3375 | SET_PT (PT + 1); | ||
| 3376 | } | ||
| 3377 | } | ||
| 3378 | |||
| 3292 | UNGCPRO; | 3379 | UNGCPRO; |
| 3293 | } | 3380 | } |
| 3294 | 3381 | ||
diff --git a/src/lread.c b/src/lread.c index 236ebebda13..0eb54393482 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -1323,7 +1323,18 @@ readevalloop (readcharfun, stream, sourcename, evalfun, | |||
| 1323 | int count = SPECPDL_INDEX (); | 1323 | int count = SPECPDL_INDEX (); |
| 1324 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; | 1324 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; |
| 1325 | struct buffer *b = 0; | 1325 | struct buffer *b = 0; |
| 1326 | int bpos; | ||
| 1326 | int continue_reading_p; | 1327 | int continue_reading_p; |
| 1328 | /* Nonzero if reading an entire buffer. */ | ||
| 1329 | int whole_buffer = 0; | ||
| 1330 | /* 1 on the first time around. */ | ||
| 1331 | int first_sexp = 1; | ||
| 1332 | |||
| 1333 | if (MARKERP (readcharfun)) | ||
| 1334 | { | ||
| 1335 | if (NILP (start)) | ||
| 1336 | start = readcharfun; | ||
| 1337 | } | ||
| 1327 | 1338 | ||
| 1328 | if (BUFFERP (readcharfun)) | 1339 | if (BUFFERP (readcharfun)) |
| 1329 | b = XBUFFER (readcharfun); | 1340 | b = XBUFFER (readcharfun); |
| @@ -1349,7 +1360,6 @@ readevalloop (readcharfun, stream, sourcename, evalfun, | |||
| 1349 | if (b != 0 && NILP (b->name)) | 1360 | if (b != 0 && NILP (b->name)) |
| 1350 | error ("Reading from killed buffer"); | 1361 | error ("Reading from killed buffer"); |
| 1351 | 1362 | ||
| 1352 | |||
| 1353 | if (!NILP (start)) | 1363 | if (!NILP (start)) |
| 1354 | { | 1364 | { |
| 1355 | /* Switch to the buffer we are reading from. */ | 1365 | /* Switch to the buffer we are reading from. */ |
| @@ -1364,9 +1374,20 @@ readevalloop (readcharfun, stream, sourcename, evalfun, | |||
| 1364 | 1374 | ||
| 1365 | /* Set point and ZV around stuff to be read. */ | 1375 | /* Set point and ZV around stuff to be read. */ |
| 1366 | Fgoto_char (start); | 1376 | Fgoto_char (start); |
| 1367 | Fnarrow_to_region (make_number (BEGV), end); | 1377 | if (!NILP (end)) |
| 1378 | Fnarrow_to_region (make_number (BEGV), end); | ||
| 1379 | |||
| 1380 | /* Just for cleanliness, convert END to a marker | ||
| 1381 | if it is an integer. */ | ||
| 1382 | if (INTEGERP (end)) | ||
| 1383 | end = Fpoint_max_marker (); | ||
| 1368 | } | 1384 | } |
| 1369 | 1385 | ||
| 1386 | /* On the first cycle, we can easily test here | ||
| 1387 | whether we are reading the whole buffer. */ | ||
| 1388 | if (b && first_sexp) | ||
| 1389 | whole_buffer = (PT == BEG && ZV == Z); | ||
| 1390 | |||
| 1370 | instream = stream; | 1391 | instream = stream; |
| 1371 | read_next: | 1392 | read_next: |
| 1372 | c = READCHAR; | 1393 | c = READCHAR; |
| @@ -1416,8 +1437,11 @@ readevalloop (readcharfun, stream, sourcename, evalfun, | |||
| 1416 | 1437 | ||
| 1417 | if (!NILP (start) && continue_reading_p) | 1438 | if (!NILP (start) && continue_reading_p) |
| 1418 | start = Fpoint_marker (); | 1439 | start = Fpoint_marker (); |
| 1440 | |||
| 1441 | /* Restore saved point and BEGV. */ | ||
| 1419 | unbind_to (count1, Qnil); | 1442 | unbind_to (count1, Qnil); |
| 1420 | 1443 | ||
| 1444 | /* Now eval what we just read. */ | ||
| 1421 | val = (*evalfun) (val); | 1445 | val = (*evalfun) (val); |
| 1422 | 1446 | ||
| 1423 | if (printflag) | 1447 | if (printflag) |
| @@ -1428,11 +1452,12 @@ readevalloop (readcharfun, stream, sourcename, evalfun, | |||
| 1428 | else | 1452 | else |
| 1429 | Fprint (val, Qnil); | 1453 | Fprint (val, Qnil); |
| 1430 | } | 1454 | } |
| 1455 | |||
| 1456 | first_sexp = 0; | ||
| 1431 | } | 1457 | } |
| 1432 | 1458 | ||
| 1433 | build_load_history (sourcename, | 1459 | build_load_history (sourcename, |
| 1434 | stream || (INTEGERP (start) && INTEGERP (end) | 1460 | stream || whole_buffer); |
| 1435 | && XINT (start) == BEG && XINT (end) == Z)); | ||
| 1436 | 1461 | ||
| 1437 | UNGCPRO; | 1462 | UNGCPRO; |
| 1438 | 1463 | ||
diff --git a/src/minibuf.c b/src/minibuf.c index 7f3f7fe87ea..b327f2d040a 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -464,6 +464,9 @@ read_minibuf (map, initial, prompt, backup_n, expflag, | |||
| 464 | /* String to add to the history. */ | 464 | /* String to add to the history. */ |
| 465 | Lisp_Object histstring; | 465 | Lisp_Object histstring; |
| 466 | 466 | ||
| 467 | Lisp_Object empty_minibuf; | ||
| 468 | Lisp_Object dummy, frame; | ||
| 469 | |||
| 467 | extern Lisp_Object Qfront_sticky; | 470 | extern Lisp_Object Qfront_sticky; |
| 468 | extern Lisp_Object Qrear_nonsticky; | 471 | extern Lisp_Object Qrear_nonsticky; |
| 469 | 472 | ||
| @@ -641,6 +644,22 @@ read_minibuf (map, initial, prompt, backup_n, expflag, | |||
| 641 | Vminibuf_scroll_window = selected_window; | 644 | Vminibuf_scroll_window = selected_window; |
| 642 | if (minibuf_level == 1 || !EQ (minibuf_window, selected_window)) | 645 | if (minibuf_level == 1 || !EQ (minibuf_window, selected_window)) |
| 643 | minibuf_selected_window = selected_window; | 646 | minibuf_selected_window = selected_window; |
| 647 | |||
| 648 | /* Empty out the minibuffers of all frames other than the one | ||
| 649 | where we are going to display one now. | ||
| 650 | Set them to point to ` *Minibuf-0*', which is always empty. */ | ||
| 651 | empty_minibuf = Fget_buffer (build_string (" *Minibuf-0*")); | ||
| 652 | |||
| 653 | FOR_EACH_FRAME (dummy, frame) | ||
| 654 | { | ||
| 655 | Lisp_Object root_window = Fframe_root_window (frame); | ||
| 656 | Lisp_Object mini_window = XWINDOW (root_window)->next; | ||
| 657 | |||
| 658 | if (! NILP (mini_window) && !NILP (Fwindow_minibuffer_p (mini_window))) | ||
| 659 | Fset_window_buffer (mini_window, empty_minibuf, Qnil); | ||
| 660 | } | ||
| 661 | |||
| 662 | /* Display this minibuffer in the proper window. */ | ||
| 644 | Fset_window_buffer (minibuf_window, Fcurrent_buffer (), Qnil); | 663 | Fset_window_buffer (minibuf_window, Fcurrent_buffer (), Qnil); |
| 645 | Fselect_window (minibuf_window, Qnil); | 664 | Fselect_window (minibuf_window, Qnil); |
| 646 | XSETFASTINT (XWINDOW (minibuf_window)->hscroll, 0); | 665 | XSETFASTINT (XWINDOW (minibuf_window)->hscroll, 0); |
diff --git a/src/process.c b/src/process.c index 752768a7bad..e869456e5c8 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -3558,7 +3558,7 @@ FLAGS is the current flags of the interface. */) | |||
| 3558 | int fnum; | 3558 | int fnum; |
| 3559 | 3559 | ||
| 3560 | any++; | 3560 | any++; |
| 3561 | for (fp = ifflag_table; flags != 0 && fp; fp++) | 3561 | for (fp = ifflag_table; flags != 0 && fp->flag_sym; fp++) |
| 3562 | { | 3562 | { |
| 3563 | if (flags & fp->flag_bit) | 3563 | if (flags & fp->flag_bit) |
| 3564 | { | 3564 | { |
diff --git a/src/term.c b/src/term.c index 49356348545..899739de6ae 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -109,6 +109,10 @@ static void delete_tty P_ ((struct terminal *)); | |||
| 109 | 109 | ||
| 110 | #define OUTPUT1_IF(tty, a) do { if (a) emacs_tputs ((tty), a, 1, cmputc); } while (0) | 110 | #define OUTPUT1_IF(tty, a) do { if (a) emacs_tputs ((tty), a, 1, cmputc); } while (0) |
| 111 | 111 | ||
| 112 | /* If true, use "vs", otherwise use "ve" to make the cursor visible. */ | ||
| 113 | |||
| 114 | static int visible_cursor; | ||
| 115 | |||
| 112 | /* Display space properties */ | 116 | /* Display space properties */ |
| 113 | 117 | ||
| 114 | extern Lisp_Object Qspace, QCalign_to, QCwidth; | 118 | extern Lisp_Object Qspace, QCalign_to, QCwidth; |
| @@ -217,7 +221,7 @@ tty_set_terminal_modes (struct terminal *terminal) | |||
| 217 | } | 221 | } |
| 218 | 222 | ||
| 219 | OUTPUT_IF (tty, tty->TS_termcap_modes); | 223 | OUTPUT_IF (tty, tty->TS_termcap_modes); |
| 220 | OUTPUT_IF (tty, tty->TS_cursor_visible); | 224 | OUTPUT_IF (tty, visible_cursor ? tty->TS_cursor_visible : tty->TS_cursor_normal); |
| 221 | OUTPUT_IF (tty, tty->TS_keypad_mode); | 225 | OUTPUT_IF (tty, tty->TS_keypad_mode); |
| 222 | losecursor (tty); | 226 | losecursor (tty); |
| 223 | fflush (tty->output); | 227 | fflush (tty->output); |
| @@ -359,7 +363,8 @@ tty_show_cursor (struct tty_display_info *tty) | |||
| 359 | { | 363 | { |
| 360 | tty->cursor_hidden = 0; | 364 | tty->cursor_hidden = 0; |
| 361 | OUTPUT_IF (tty, tty->TS_cursor_normal); | 365 | OUTPUT_IF (tty, tty->TS_cursor_normal); |
| 362 | OUTPUT_IF (tty, tty->TS_cursor_visible); | 366 | if (visible_cursor) |
| 367 | OUTPUT_IF (tty, tty->TS_cursor_visible); | ||
| 363 | } | 368 | } |
| 364 | } | 369 | } |
| 365 | 370 | ||
| @@ -3031,6 +3036,13 @@ The functions are run with one argument, the name of the tty that was revived. | |||
| 3031 | See `resume-tty'. */); | 3036 | See `resume-tty'. */); |
| 3032 | Vresume_tty_functions = Qnil; | 3037 | Vresume_tty_functions = Qnil; |
| 3033 | 3038 | ||
| 3039 | DEFVAR_BOOL ("visible-cursor", &visible_cursor, | ||
| 3040 | doc: /* Non-nil means to make the cursor very visible. | ||
| 3041 | This only has an effect when running in a text terminal. | ||
| 3042 | What means \"very visible\" is up to your terminal. It may make the cursor | ||
| 3043 | bigger, or it may make it blink, or it may do nothing at all. */); | ||
| 3044 | visible_cursor = 1; | ||
| 3045 | |||
| 3034 | defsubr (&Stty_display_color_p); | 3046 | defsubr (&Stty_display_color_p); |
| 3035 | defsubr (&Stty_display_color_cells); | 3047 | defsubr (&Stty_display_color_cells); |
| 3036 | defsubr (&Stty_no_underline); | 3048 | defsubr (&Stty_no_underline); |
diff --git a/src/textprop.c b/src/textprop.c index fa9b0e498c5..029f2f41031 100644 --- a/src/textprop.c +++ b/src/textprop.c | |||
| @@ -1316,8 +1316,8 @@ the designated part of OBJECT. */) | |||
| 1316 | properties PROPERTIES. OBJECT is the buffer or string containing | 1316 | properties PROPERTIES. OBJECT is the buffer or string containing |
| 1317 | the text. OBJECT nil means use the current buffer. | 1317 | the text. OBJECT nil means use the current buffer. |
| 1318 | SIGNAL_AFTER_CHANGE_P nil means don't signal after changes. Value | 1318 | SIGNAL_AFTER_CHANGE_P nil means don't signal after changes. Value |
| 1319 | is non-nil if properties were replaced; it is nil if there weren't | 1319 | is nil if the function _detected_ that it did not replace any |
| 1320 | any properties to replace. */ | 1320 | properties, non-nil otherwise. */ |
| 1321 | 1321 | ||
| 1322 | Lisp_Object | 1322 | Lisp_Object |
| 1323 | set_text_properties (start, end, properties, object, signal_after_change_p) | 1323 | set_text_properties (start, end, properties, object, signal_after_change_p) |
| @@ -1341,7 +1341,7 @@ set_text_properties (start, end, properties, object, signal_after_change_p) | |||
| 1341 | && XFASTINT (end) == SCHARS (object)) | 1341 | && XFASTINT (end) == SCHARS (object)) |
| 1342 | { | 1342 | { |
| 1343 | if (! STRING_INTERVALS (object)) | 1343 | if (! STRING_INTERVALS (object)) |
| 1344 | return Qt; | 1344 | return Qnil; |
| 1345 | 1345 | ||
| 1346 | STRING_SET_INTERVALS (object, NULL_INTERVAL); | 1346 | STRING_SET_INTERVALS (object, NULL_INTERVAL); |
| 1347 | return Qt; | 1347 | return Qt; |