aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2011-05-30 22:15:34 -0700
committerPaul Eggert2011-05-30 22:15:34 -0700
commit333d54dade1e7005d5a97612907158fe5ec3d310 (patch)
treea5b18c9c6a68d71fddae98aba0d81079068a8c46
parent90856fe0b82ba19d1c3d73a4ba48007380201e66 (diff)
parent620c53a664e41788f6d4f8e3f687e1a0d448b857 (diff)
downloademacs-333d54dade1e7005d5a97612907158fe5ec3d310.tar.gz
emacs-333d54dade1e7005d5a97612907158fe5ec3d310.zip
Merge from trunk.
-rw-r--r--autogen/Makefile.in29
-rwxr-xr-xautogen/configure4
-rw-r--r--etc/NEWS12
-rw-r--r--leim/ChangeLog4
-rw-r--r--leim/quail/ipa-praat.el346
-rw-r--r--lisp/ChangeLog32
-rw-r--r--lisp/emacs-lisp/bytecomp.el2
-rw-r--r--lisp/gnus/ChangeLog31
-rw-r--r--lisp/gnus/gnus-group.el8
-rw-r--r--lisp/gnus/gnus-sum.el3
-rw-r--r--lisp/gnus/message.el2
-rw-r--r--lisp/gnus/mml1991.el53
-rw-r--r--lisp/gnus/nnimap.el4
-rw-r--r--lisp/gnus/nnvirtual.el9
-rw-r--r--lisp/gnus/pop3.el3
-rw-r--r--lisp/icomplete.el5
-rw-r--r--lisp/mail/smtpmail.el9
-rw-r--r--lisp/minibuffer.el173
-rw-r--r--lisp/net/rcirc.el12
-rw-r--r--lisp/simple.el1
-rw-r--r--src/ChangeLog38
-rw-r--r--src/alloc.c4
-rw-r--r--src/ccl.c13
-rw-r--r--src/data.c269
-rw-r--r--src/eval.c2
-rw-r--r--src/lisp.h2
-rw-r--r--src/minibuf.c83
27 files changed, 798 insertions, 355 deletions
diff --git a/autogen/Makefile.in b/autogen/Makefile.in
index a2d83700d6c..b117c64655c 100644
--- a/autogen/Makefile.in
+++ b/autogen/Makefile.in
@@ -24,7 +24,7 @@
24# the same distribution terms as the rest of that program. 24# the same distribution terms as the rest of that program.
25# 25#
26# Generated by gnulib-tool. 26# Generated by gnulib-tool.
27# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files careadlinkat crypto/md5 crypto/sha1 dtoastr filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink socklen stdarg stdio strftime strtoumax symlink sys_stat 27# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files careadlinkat crypto/md5 crypto/sha1 dtoastr filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink socklen stdarg stdio strftime strtoumax symlink sys_stat
28 28
29VPATH = @srcdir@ 29VPATH = @srcdir@
30pkgdatadir = $(datadir)/@PACKAGE@ 30pkgdatadir = $(datadir)/@PACKAGE@
@@ -1070,7 +1070,8 @@ c++defs.h: $(top_srcdir)/./c++defs.h
1070getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H) 1070getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H)
1071 $(AM_V_GEN)rm -f $@-t $@ && \ 1071 $(AM_V_GEN)rm -f $@-t $@ && \
1072 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ 1072 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
1073 sed -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \ 1073 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
1074 -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \
1074 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ 1075 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
1075 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ 1076 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
1076 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ 1077 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
@@ -1118,7 +1119,8 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.status $(WARN_ON_USE_H) $(ARG_N
1118@GL_GENERATE_STDARG_H_TRUE@stdarg.h: stdarg.in.h $(top_builddir)/config.status 1119@GL_GENERATE_STDARG_H_TRUE@stdarg.h: stdarg.in.h $(top_builddir)/config.status
1119@GL_GENERATE_STDARG_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ 1120@GL_GENERATE_STDARG_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
1120@GL_GENERATE_STDARG_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ 1121@GL_GENERATE_STDARG_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
1121@GL_GENERATE_STDARG_H_TRUE@ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ 1122@GL_GENERATE_STDARG_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \
1123@GL_GENERATE_STDARG_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
1122@GL_GENERATE_STDARG_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ 1124@GL_GENERATE_STDARG_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
1123@GL_GENERATE_STDARG_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ 1125@GL_GENERATE_STDARG_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
1124@GL_GENERATE_STDARG_H_TRUE@ -e 's|@''NEXT_STDARG_H''@|$(NEXT_STDARG_H)|g' \ 1126@GL_GENERATE_STDARG_H_TRUE@ -e 's|@''NEXT_STDARG_H''@|$(NEXT_STDARG_H)|g' \
@@ -1144,7 +1146,8 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.status $(WARN_ON_USE_H) $(ARG_N
1144@GL_GENERATE_STDDEF_H_TRUE@stddef.h: stddef.in.h $(top_builddir)/config.status 1146@GL_GENERATE_STDDEF_H_TRUE@stddef.h: stddef.in.h $(top_builddir)/config.status
1145@GL_GENERATE_STDDEF_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ 1147@GL_GENERATE_STDDEF_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
1146@GL_GENERATE_STDDEF_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ 1148@GL_GENERATE_STDDEF_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
1147@GL_GENERATE_STDDEF_H_TRUE@ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ 1149@GL_GENERATE_STDDEF_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \
1150@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
1148@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ 1151@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
1149@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ 1152@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
1150@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \ 1153@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \
@@ -1161,7 +1164,8 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.status $(WARN_ON_USE_H) $(ARG_N
1161@GL_GENERATE_STDINT_H_TRUE@stdint.h: stdint.in.h $(top_builddir)/config.status 1164@GL_GENERATE_STDINT_H_TRUE@stdint.h: stdint.in.h $(top_builddir)/config.status
1162@GL_GENERATE_STDINT_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ 1165@GL_GENERATE_STDINT_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
1163@GL_GENERATE_STDINT_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ 1166@GL_GENERATE_STDINT_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
1164@GL_GENERATE_STDINT_H_TRUE@ sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ 1167@GL_GENERATE_STDINT_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \
1168@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
1165@GL_GENERATE_STDINT_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ 1169@GL_GENERATE_STDINT_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
1166@GL_GENERATE_STDINT_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ 1170@GL_GENERATE_STDINT_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
1167@GL_GENERATE_STDINT_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ 1171@GL_GENERATE_STDINT_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
@@ -1198,7 +1202,8 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.status $(WARN_ON_USE_H) $(ARG_N
1198stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) 1202stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
1199 $(AM_V_GEN)rm -f $@-t $@ && \ 1203 $(AM_V_GEN)rm -f $@-t $@ && \
1200 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ 1204 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
1201 sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ 1205 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
1206 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
1202 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ 1207 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
1203 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ 1208 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
1204 -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \ 1209 -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \
@@ -1312,7 +1317,8 @@ stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
1312stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) 1317stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
1313 $(AM_V_GEN)rm -f $@-t $@ && \ 1318 $(AM_V_GEN)rm -f $@-t $@ && \
1314 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ 1319 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
1315 sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ 1320 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
1321 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
1316 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ 1322 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
1317 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ 1323 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
1318 -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \ 1324 -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \
@@ -1393,7 +1399,8 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU
1393 $(AM_V_at)$(MKDIR_P) sys 1399 $(AM_V_at)$(MKDIR_P) sys
1394 $(AM_V_GEN)rm -f $@-t $@ && \ 1400 $(AM_V_GEN)rm -f $@-t $@ && \
1395 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ 1401 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
1396 sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ 1402 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
1403 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
1397 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ 1404 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
1398 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ 1405 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
1399 -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \ 1406 -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \
@@ -1441,7 +1448,8 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU
1441time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) 1448time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
1442 $(AM_V_GEN)rm -f $@-t $@ && \ 1449 $(AM_V_GEN)rm -f $@-t $@ && \
1443 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ 1450 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
1444 sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ 1451 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
1452 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
1445 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ 1453 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
1446 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ 1454 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
1447 -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \ 1455 -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \
@@ -1473,7 +1481,8 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
1473unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) 1481unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
1474 $(AM_V_GEN)rm -f $@-t $@ && \ 1482 $(AM_V_GEN)rm -f $@-t $@ && \
1475 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ 1483 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
1476 sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \ 1484 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
1485 -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
1477 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ 1486 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
1478 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ 1487 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
1479 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ 1488 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
diff --git a/autogen/configure b/autogen/configure
index 23b0b104a0d..534566359ee 100755
--- a/autogen/configure
+++ b/autogen/configure
@@ -16710,10 +16710,6 @@ fi
16710# Persuade glibc <stdlib.h> to declare getloadavg(). 16710# Persuade glibc <stdlib.h> to declare getloadavg().
16711 16711
16712 16712
16713# Make sure getloadavg.c is where it belongs, at configure-time.
16714test -f "$srcdir/$gl_source_base/getloadavg.c" ||
16715 as_fn_error "$srcdir/$gl_source_base/getloadavg.c is missing" "$LINENO" 5
16716
16717gl_save_LIBS=$LIBS 16713gl_save_LIBS=$LIBS
16718 16714
16719# getloadvg is present in libc on glibc >= 2.2, MacOS X, FreeBSD >= 2.0, 16715# getloadvg is present in libc on glibc >= 2.2, MacOS X, FreeBSD >= 2.0,
diff --git a/etc/NEWS b/etc/NEWS
index dc1f25ddd3b..509b304d369 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -91,6 +91,10 @@ and pops down the *Completions* buffer accordingly.
91 91
92*** New completion style `substring'. 92*** New completion style `substring'.
93 93
94*** Completion style can be set per-category `completion-category-overrides'.
95
96*** Completion of buffers now uses substring completion by default.
97
94*** `completing-read' can be customized using the new variable 98*** `completing-read' can be customized using the new variable
95`completing-read-function'. 99`completing-read-function'.
96 100
@@ -861,6 +865,14 @@ valid for completion-extra-properties.
861 865
862*** completion-annotate-function is obsolete. 866*** completion-annotate-function is obsolete.
863 867
868*** New `metadata' method for completion tables. The metadata thus returned
869can specify various details of the data returned by `all-completions':
870- `category' is the kind of objects returned (e.g., `buffer', `file', ...),
871 used to select a style in completion-category-overrides.
872- `annotation-function' to add annotations in *Completions*.
873- `display-sort-function' to specify how to sort entries in *Completions*.
874- `cycle-sort-function' to specify how to sort entries when cycling.
875
864** `glyphless-char-display' can now distinguish between graphical and 876** `glyphless-char-display' can now distinguish between graphical and
865text terminal display, via a char-table entry that is a cons cell. 877text terminal display, via a char-table entry that is a cons cell.
866 878
diff --git a/leim/ChangeLog b/leim/ChangeLog
index 98af78d2089..871455dad97 100644
--- a/leim/ChangeLog
+++ b/leim/ChangeLog
@@ -1,3 +1,7 @@
12011-05-30 Oliver Scholz <epameinondas@gmx.de>
2
3 * quail/ipa-praat.el: New input method.
4
12011-05-16 Eli Zaretskii <eliz@gnu.org> 52011-05-16 Eli Zaretskii <eliz@gnu.org>
2 6
3 * Makefile.in (OTHERS): Add $(srcdir)/quail/persian.elc. 7 * Makefile.in (OTHERS): Add $(srcdir)/quail/persian.elc.
diff --git a/leim/quail/ipa-praat.el b/leim/quail/ipa-praat.el
new file mode 100644
index 00000000000..25eb6d4b995
--- /dev/null
+++ b/leim/quail/ipa-praat.el
@@ -0,0 +1,346 @@
1;;; ipa-praat.el --- Inputting IPA characters with the conventions of Praat
2
3;; Copyright (C) 2011 Free Software Foundation, Inc.
4
5;; Author: Oliver Scholz <epameinondas@gmx.de>
6;; Keywords: multilingual, input method, IPA
7
8;; This file is part of GNU Emacs.
9
10;; GNU Emacs is free software: you can redistribute it and/or modify
11;; it under the terms of the GNU General Public License as published by
12;; the Free Software Foundation, either version 3 of the License, or
13;; (at your option) any later version.
14
15;; GNU Emacs is distributed in the hope that it will be useful,
16;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18;; GNU General Public License for more details.
19
20;; You should have received a copy of the GNU General Public License
21;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
22
23;;; Commentary:
24
25;; This is a new input method for IPA characters and diacritics, which follows
26;; the conventions of Praat, a GPLed program for phonetical analysis.
27;;
28;; This input method is much more complete than the current ipa.el.
29
30;;; Code:
31
32(require 'quail)
33
34(quail-define-package
35 "ipa-praat" "IPA" "IPAP" t
36 "International Phonetic Alphabet input method.
37This follows the input method of the phonetical analysis program
38Praat (http://www.fon.hum.uva.nl/praat/).
39
40
41* Vowels
42
43- Unrounded
44 | front | centr. | back
45-------------+-------+--------+------
46close | i i | ɨ \\i- | ɯ \\mt
47close centr. | ɪ \\ic | |
48close-mid | e e | ɘ \\e- | ɤ \\rh
49 | | ə \\sw |
50open-mid | ɛ \\ef | ɜ \\er | ʌ \\vt
51 | æ \\ae | ɐ \\at |
52open | a a | | ɑ \\as
53
54
55
56- Rounded
57 | front | centr. | back
58-------------+-------+--------+-------
59close | y y | ʉ \\u- | u u
60close centr. | ʏ \\yc | | ʊ \\hs
61close-mid | ø \\o/ | ɵ \\o- | o o
62open-mid | œ \\oe | ɞ \\kb | ɔ \\ct
63open | ɶ \\Oe | | ɒ \\ab
64
65
66
67For most of the codes, the first letter tells you the most
68similar letter of the English alphabet. The second letter can be
69t (turned), c (capital), s (script), r (reversed), - (barred or
70retracted), or / (slashed). One symbol (ɛ) is a phonetic version
71of a Greek letter. The codes for ə, ɤ, ʊ and ɞ are abbreviations
72for schwa, ram's horn, horseshoe, and kidney bean.
73
74
75* Consonants
76
77- Pulmonic
78
79 | plos. | nasal | fric. | approx. | trill | tap/flap | l. appr.
80-----------+-------+-------+-------+---------+-------+----------+---------
81bilabial | p p | m m | ɸ \\ff | | | |
82 | b b | | β \\bf | ʋ \\vs | ʙ \\bc | |
83labiodent. | | ɱ \\mj | f f | | | |
84 | | | v v | | | |
85dental | | | θ \\tf | | | |
86 | | | ð \\dh | | | |
87alveolar | t t | n n | s s | | | ɾ \\fh |
88 | d d | | z z | ɹ \\rt | r r | | l l
89alv. lat. | | | ɬ \\l- | | | ɺ \\rl |
90 | | | ɮ \\lz | l l | | | l l
91postalv. | | | ʃ \\sh | | | |
92 | | | ʒ \\zh | | | |
93retroflex | ʈ \\t. | ɳ \\n. | ʂ \\s. | | | ɽ \\f. |
94 | ɖ \\d. | | ʐ \\z. | ɻ \\r. | | | ɭ \\l.
95alv.-pala. | | | ɕ \\cc | | | |
96 | | | ʑ \\zc | | | |
97palatal | c c | ɲ \\nj | ç \\c, | | | |
98 | ɟ \\j. | | ʝ \\jc | j j | | | ʎ \\yt
99lab-pal. | | | | | | |
100 | | | | ɥ \\ht | | |
101lab.-vela. | | | ʍ \\wt | | | |
102 | | | | w w | | |
103velar | k k | ŋ \\ng | x x | | | | ʟ \\lc
104 | ɡ \\gs | | ɣ \\gf | ɰ \\ml | | |
105uvular | q q | ɴ \\nc | χ \\cf | | | |
106 | ɢ \\gc | | ʁ \\ri | | ʀ \\rc | |
107pharyngeal | | | ħ \\h- | | | |
108 | | | ʕ \\9e | | | |
109epiglottal | ʡ \\?- | | ʜ \\hc | | | |
110 | | | ʢ \\9- | | | |
111glottal | ʔ | | h h | | | |
112 | | | ɦ \\h^ | | | |
113
114- Nonpulmonic
115
116 | implosive | click
117----------+-----------+------
118bilabial | ɓ \\b^ | ʘ \\O.
119dental | | ǀ \\|1
120alveolar | ɗ \\d^ |
121alv.-lat. | | ǁ \\|2
122postalv. | | ǂ \\|-
123retrofl. | | ! !
124palatal | ʄ \\j^ |
125velar | ɠ \\g^ |
126uvular | ʛ \\G^ |
127
128For most of the codes, the first letter tells you the most
129similar letter of the English alphabet. The second letter can be
130t (turned), c (capital or curled), s (script), - (barred),
131l (with leg), i (inverted), or j (left tail). Some phonetic
132symbols are similar to Greek letters but have special
133phonetic (f) versions with serifs (ɸ, β, ɣ) or are otherwise
134slightly different (θ, χ). The codes for ŋ (engma), ð (eth),
135ʃ (esh), and ʒ (yogh) are traditional alternative spellings. The
136retroflexes have a period in the second place, because an
137alternative traditional spelling is to write a dot under
138them. The code for ɾ is an abbreviation for fishhook.
139
140
141* Diacritics
142
143- In line
144
145input | example | description
146------+---------+---------------------
147\\:f | ː | phonetic length sign
148\\'1 | ˈ | primary stress
149\\'2 | ˌ | secondary stress
150\\cn | t̚ | unreleased plosive
151\\rh | ɜ˞ | rhotacized vowel
152
153- Understrikes
154
155input | example | description
156------+---------+--------------------------------
157\\|v | n̩ | syllabic consonant
158\\0v | b̥ | voiceless
159\\Tv | o̞ | lowered
160\\T^ | o̝ | raised
161\\T( | o̘ | advanced tongue root
162\\T) | o̙ | retracted tongue root
163\\-v | e̱ | backed
164\\+v | o̟ | fronted
165\\:v | o̤ | breathy voice
166\\~v | o̰ | creaky voice
167\\Nv | d̪ | dental (as opposed to alveolar)
168\\Uv | d̺ | apical
169\\Dv | d̻ | laminal
170\\nv | u̯ | nonsyllabic
171\\e3v | e̹ | slightly rounded
172\\cv | u̜ | slightly unrounded
173
174- Overstrikes
175
176input | example | description
177------+---------+--------------------------------------------
178\\0^ | ɣ̊ | voiceless
179\\'^ | | high tone
180\\`^ | | low tone
181\\-^ | | mid tone
182\\~^ | | nasalized
183\\v^ | | rising tone
184\\^^ | | falling tone
185\\:^ | | centralized
186\\N^ | | short
187\\li | k͡p | simultaneous articulation or single segment
188"
189 nil t nil nil nil nil nil nil nil nil t)
190
191(quail-define-rules
192 ;; plosives
193 ("\\t." ?ʈ) ; retroflex
194 ("\\d." ?ɖ) ; voiced retroflex
195 ("\\j-" ?ɟ) ; voiced palatal
196 ("\\gs" ?ɡ) ; voiced velar
197 ("\\gc" ?ɢ) ; voiced uvular
198 ("\\?-" ?ʡ) ; epiglottal
199 ("\\?g" ?ʔ) ; glottal
200
201 ;; nasals
202 ("\\mj" ?ɱ) ; labiodental
203 ("\\n." ?ɳ) ; retroflex
204 ("\\nj" ?ɲ) ; palatal
205 ("\\ng" ?ŋ) ; velar
206 ("\\nc" ?ɴ) ; uvular
207
208 ;; fricatives
209 ("\\ff" ?ɸ) ; bilabial
210 ("\\bf" ?β) ; voiced bilabial
211 ("\\tf" ?θ) ; labiodental
212 ("\\dh" ?ð) ; voiced labiodental
213 ("\\sh" ?ʃ) ; postalveolar
214 ("\\l-" ?ɬ) ; alv. lateral
215 ("\\lz" ?ɮ) ; voiced alv. lateral
216 ("\\zh" ?ʒ) ; voiced postalveolar
217 ("\\s." ?ʂ) ; retroflex
218 ("\\z." ?ʐ) ; voiced retroflex
219 ("\\cc" ?ɕ) ; alveolo-palatal
220 ("\\zc" ?ʑ) ; voiced alveolo-palatal
221 ("\\c," ?ç) ; palatal
222 ("\\jc" ?ʝ) ; voiced palatal
223 ("\\wt" ?ʍ) ; labial-velar
224 ("\\gf" ?ɣ) ; voiced velar
225 ("\\cf" ?χ) ; uvular
226 ("\\ri" ?ʁ) ; voiced uvular
227 ("\\h-" ?ħ) ; pharyngeal
228 ("\\9e" ?ʕ) ; voiced pharyngeal
229 ("\\hc" ?ʜ) ; epiglottal
230 ("\\9-" ?ʢ) ; voiced epiglottal
231 ("\\h^" ?ɦ) ; voiced glottal
232
233 ;; approximants
234 ("\\vs" ?ʋ) ; labiodental
235 ("\\rt" ?ɹ) ; alveolar
236 ("\\r." ?ɻ) ; retroflex
237 ("\\ht" ?ɥ) ; labial-palatal
238 ("\\ml" ?ɰ) ; velar
239
240 ;; trills
241 ("\\bc" ?ʙ) ; bilabial
242 ("\\rc" ?ʀ) ; uvular
243
244 ;; taps or flaps
245 ; ⱱ -- labiodental
246 ("\\fh" ?ɾ) ; alveolar
247 ("\\rl" ?ɺ) ; alv.-lateral
248 ("\\f." ?ɽ) ; retroflex
249
250 ;; lateral approx.
251 ("\\l." ?ɭ) ; retroflex
252 ("\\yt" ?ʎ) ; palatal
253 ("\\lc" ?ʟ) ; velar
254
255 ;; implosives
256 ("\\b^" ?ɓ) ; bilabial
257 ("\\d^" ?ɗ) ; alveolar
258 ("\\j^" ?ʄ) ; palatal
259 ("\\g^" ?ɠ) ; velar
260 ("\\G^" ?ʛ) ; uvular
261
262 ;; clicks
263 ("\\O." ?ʘ) ; bilabial
264 ("\\|1" ?ǀ) ; dental
265 ("\\|2" ?ǁ) ; alv. lateral
266 ("\\|-" ?ǂ) ; postalveolar
267
268 ;; other
269 ("\\l~" ?ɫ) ; velarized l
270 ("\\hj" ?ɧ) ; post-alveolar & velar fricative
271
272 ;; vowels
273 ("\\i-" ?ɨ)
274 ("\\u-" ?ʉ)
275
276 ("\\mt" ?ɯ)
277
278 ("\\ic" ?ɪ)
279 ("\\yc" ?ʏ)
280
281 ("\\hs" ?ʊ)
282
283 ("\\o/" ?ø)
284 ("\\e-" ?ɘ)
285 ("\\o-" ?ɵ)
286 ("\\rh" ?ɤ)
287
288 ("\\sw" ?ə)
289
290 ("\\ef" ?ɛ)
291 ("\\oe" ?œ)
292 ("\\er" ?ɜ)
293 ("\\kb" ?ɞ)
294 ("\\vt" ?ʌ)
295 ("\\ct" ?ɔ)
296
297 ("\\ae" ?æ)
298 ("\\at" ?ɐ)
299
300 ("\\Oe" ?ɶ)
301 ("\\as" ?ɑ)
302 ("\\ab" ?ɒ)
303
304 ("\\sr" ?ɚ)
305
306 ;; diacritics
307 ("\\:f" ?ː) ; phonetic length sign
308 ("\\'1" ?ˈ) ; primary stress
309 ("\\'2" ?ˌ) ; secondary stress
310 ("\\cn" #x031A) ; t̚ unreleased plosive
311 ("\\rh" #x02DE) ; ɜ˞ rhotacized vowel
312
313 ("\\|v" #x0329) ; n̩ syllabic consonant
314 ("\\0v" #x0325) ; b̥ voiceless
315 ("\\Tv" #x031E) ; o̞ lowered
316 ("\\T^" #x031D ) ; o̝ raised
317 ("\\T(" #x0318) ; o̘ advanced tongue root
318 ("\\T)" #x0319) ; o̙ retracted tongue root
319 ("\\-v" #x0331) ; e̱ backed
320 ("\\+v" #x031F) ; o̟ fronted
321 ("\\:v" #x0324) ; o̤ breathy voice
322 ("\\~v" #x0330) ; o̰ creaky voice
323 ("\\Nv" #x032A) ; d̪ dental (as opposed to alveolar)
324 ("\\Uv" #x033A) ; d̺ apical
325 ("\\Dv" #x033B) ; d̻ laminal
326 ("\\nv" #x032F) ; u̯ nonsyllabic
327 ("\\e3v" #x0339) ; e̹ slightly rounded
328 ("\\cv" #x031C) ; u̜ slightly unrounded
329
330 ("\\0^" #x030A) ; ɣ̊ voiceless
331 ("\\'^" #x0301) ; high tone
332 ("\\`^" #x0300) ; low tone
333 ("\\-^" #x0304) ; mid tone
334 ("\\~^" #x0303) ; nasalized
335 ("\\v^" #x030C) ; rising tone
336 ("\\^^" #x0302) ; falling tone
337 ("\\:^" #x0308) ; centralized
338 ("\\N^" #x0306) ; short
339 ("\\li" #x0361) ; k͡p simultaneous articulation or single segment
340 )
341
342;; Local Variables:
343;; coding: utf-8
344;; End:
345
346;;; ipa-praat.el ends here
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 6d4752efec0..07f700f6987 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,35 @@
12011-05-31 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * minibuffer.el: Add metadata method to completion tables.
4 (completion-category-overrides): New defcustom.
5 (completion-metadata, completion--field-metadata)
6 (completion-metadata-get, completion--styles)
7 (completion--cycle-threshold): New functions.
8 (completion-try-completion, completion-all-completions):
9 Add `metadata' argument to choose completion-styles.
10 (completion--do-completion): Use metadata to choose cycling.
11 (completion-all-sorted-completions): Use metadata for sorting.
12 Remove :completion-cycle-penalty which is not needed any more.
13 (completion--try-word-completion): Add `metadata' argument.
14 (minibuffer-completion-help): Check metadata for annotation function
15 and sorting.
16 (completion-file-name-table): Return `category' metadata.
17 (minibuffer-completing-file-name): Make obsolete.
18 * simple.el (minibuffer-completing-symbol): Make obsolete.
19 * icomplete.el (icomplete-completions): Pass new `metadata' param to
20 completion-try-completion.
21
222011-05-30 Stefan Monnier <monnier@iro.umontreal.ca>
23
24 * mail/smtpmail.el (smtpmail-send-data): Add progress reporter.
25
262011-05-30 Leo Liu <sdl.web@gmail.com>
27
28 * net/rcirc.el (rcirc-debug-buffer): Use visible buffer name.
29 (rcirc-print): Decode all incoming messages (bug#8744).
30 (rcirc-decode-coding-system): Allow value nil for automatic coding
31 system detection.
32
12011-05-29 Chong Yidong <cyd@stupidchicken.com> 332011-05-29 Chong Yidong <cyd@stupidchicken.com>
2 34
3 * image.el (image-animate-max-time): Allow nil and t values. 35 * image.el (image-animate-max-time): Allow nil and t values.
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index f0f59123aa9..0dae6748c24 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -4155,6 +4155,8 @@ binding slots have been popped."
4155 (if (eq fun 'defconst) 4155 (if (eq fun 'defconst)
4156 ;; `defconst' sets `var' unconditionally. 4156 ;; `defconst' sets `var' unconditionally.
4157 (let ((tmp (make-symbol "defconst-tmp-var"))) 4157 (let ((tmp (make-symbol "defconst-tmp-var")))
4158 ;; Quote with `quote' to prevent byte-compiling the body,
4159 ;; which would lead to an inf-loop.
4158 `(funcall '(lambda (,tmp) (defconst ,var ,tmp)) 4160 `(funcall '(lambda (,tmp) (defconst ,var ,tmp))
4159 ,value)) 4161 ,value))
4160 ;; `defvar' sets `var' only when unbound. 4162 ;; `defvar' sets `var' only when unbound.
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 4aba3a27900..dcbc647950f 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,34 @@
12011-05-30 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * gnus-group.el (gnus-group-mark-article-read): It's possible that we
4 want to have `gnus-newsgroup-unselected' kept sorted. If this isn't
5 done, then unselected articles may be marked as read.
6
7 * pop3.el (pop3-open-server): Erase the buffer after the greeting,
8 since not doing this seems to lead to a race condition in pop3-logon.
9
10 * nnvirtual.el (nnvirtual-request-article): Bind `gnus-command-method'
11 so that the call chain it correct when we call "upwards".
12
13 * gnus-sum.el (gnus-select-newsgroup): Auto-expiry doesn't make sense
14 in read-only groups.
15
16 * gnus-group.el (gnus-group-mark-article-read): Ditto.
17
18 * message.el (message-cite-reply-position): Doc string fix.
19
20 * nnimap.el (nnimap-transform-headers): Simplify regexp to hopefully
21 avoid regexp overflow.
22 (nnimap-transform-split-mail): Ditto.
23
24 * pop3.el (pop3-retr): Error out if the server closes the connection.
25
262011-05-30 Stefan Monnier <monnier@iro.umontreal.ca>
27
28 * mml1991.el (mml1991-mailcrypt-encrypt): Remove use of ill-designed
29 mm-with-unibyte-current-buffer. The buffer should not contain any
30 multibyte chars anyway at this stage.
31
12011-05-29 Lars Magne Ingebrigtsen <larsi@gnus.org> 322011-05-29 Lars Magne Ingebrigtsen <larsi@gnus.org>
2 33
3 * shr.el (shr-urlify): Use shr-add-font to make underlines be less ugly 34 * shr.el (shr-urlify): Use shr-add-font to make underlines be less ugly
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index 65192bf173e..4c474b0aa23 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -3567,7 +3567,8 @@ or nil if no action could be taken."
3567 (gnus-add-marked-articles group 'tick nil nil 'force) 3567 (gnus-add-marked-articles group 'tick nil nil 'force)
3568 (gnus-add-marked-articles group 'dormant nil nil 'force)) 3568 (gnus-add-marked-articles group 'dormant nil nil 'force))
3569 ;; Do auto-expirable marks if that's required. 3569 ;; Do auto-expirable marks if that's required.
3570 (when (gnus-group-auto-expirable-p group) 3570 (when (and (gnus-group-auto-expirable-p group)
3571 (not (gnus-group-read-only-p group)))
3571 (gnus-range-map 3572 (gnus-range-map
3572 (lambda (article) 3573 (lambda (article)
3573 (gnus-add-marked-articles group 'expire (list article)) 3574 (gnus-add-marked-articles group 'expire (list article))
@@ -4630,10 +4631,11 @@ This command may read the active file."
4630 (push n gnus-newsgroup-unselected)) 4631 (push n gnus-newsgroup-unselected))
4631 (setq n (1+ n))) 4632 (setq n (1+ n)))
4632 (setq gnus-newsgroup-unselected 4633 (setq gnus-newsgroup-unselected
4633 (nreverse gnus-newsgroup-unselected))))) 4634 (sort gnus-newsgroup-unselected '<)))))
4634 (gnus-activate-group group) 4635 (gnus-activate-group group)
4635 (gnus-group-make-articles-read group (list article)) 4636 (gnus-group-make-articles-read group (list article))
4636 (when (gnus-group-auto-expirable-p group) 4637 (when (and (gnus-group-auto-expirable-p group)
4638 (not (gnus-group-read-only-p group)))
4637 (gnus-add-marked-articles 4639 (gnus-add-marked-articles
4638 group 'expire (list article)))))) 4640 group 'expire (list article))))))
4639 4641
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 3ec443743df..2d75c35158a 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -5715,7 +5715,8 @@ If SELECT-ARTICLES, only select those articles from GROUP."
5715 (gnus-summary-remove-list-identifiers) 5715 (gnus-summary-remove-list-identifiers)
5716 ;; Check whether auto-expire is to be done in this group. 5716 ;; Check whether auto-expire is to be done in this group.
5717 (setq gnus-newsgroup-auto-expire 5717 (setq gnus-newsgroup-auto-expire
5718 (gnus-group-auto-expirable-p group)) 5718 (and (gnus-group-auto-expirable-p group)
5719 (not (gnus-group-read-only-p group))))
5719 ;; Set up the article buffer now, if necessary. 5720 ;; Set up the article buffer now, if necessary.
5720 (unless (and gnus-single-article-buffer 5721 (unless (and gnus-single-article-buffer
5721 (equal gnus-article-buffer "*Article*")) 5722 (equal gnus-article-buffer "*Article*"))
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 4d08baa674c..58740c32e9c 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -1091,7 +1091,7 @@ Note: Many newsgroups frown upon nontraditional reply styles. You
1091probably want to set this variable only for specific groups, 1091probably want to set this variable only for specific groups,
1092e.g. using `gnus-posting-styles': 1092e.g. using `gnus-posting-styles':
1093 1093
1094 (eval (set (make-local-variable 'message-cite-reply-above) 'above))" 1094 (eval (set (make-local-variable 'message-cite-reply-position) 'above))"
1095 :type '(choice (const :tag "Reply inline" 'traditional) 1095 :type '(choice (const :tag "Reply inline" 'traditional)
1096 (const :tag "Reply above" 'above) 1096 (const :tag "Reply above" 'above)
1097 (const :tag "Reply below" 'below)) 1097 (const :tag "Reply below" 'below))
diff --git a/lisp/gnus/mml1991.el b/lisp/gnus/mml1991.el
index 0ce74b1d765..a5d778845c1 100644
--- a/lisp/gnus/mml1991.el
+++ b/lisp/gnus/mml1991.el
@@ -137,33 +137,32 @@ Whether the passphrase is cached at all is controlled by
137 (while (looking-at "^Content[^ ]+:") (forward-line)) 137 (while (looking-at "^Content[^ ]+:") (forward-line))
138 (unless (bobp) 138 (unless (bobp)
139 (delete-region (point-min) (point))) 139 (delete-region (point-min) (point)))
140 (mm-with-unibyte-current-buffer 140 (with-temp-buffer
141 (with-temp-buffer 141 (inline (mm-disable-multibyte))
142 (inline (mm-disable-multibyte)) 142 (setq cipher (current-buffer))
143 (setq cipher (current-buffer)) 143 (insert-buffer-substring text)
144 (insert-buffer-substring text) 144 (unless (mc-encrypt-generic
145 (unless (mc-encrypt-generic 145 (or
146 (or 146 (message-options-get 'message-recipients)
147 (message-options-get 'message-recipients) 147 (message-options-set 'message-recipients
148 (message-options-set 'message-recipients 148 (read-string "Recipients: ")))
149 (read-string "Recipients: "))) 149 nil
150 nil 150 (point-min) (point-max)
151 (point-min) (point-max) 151 (message-options-get 'message-sender)
152 (message-options-get 'message-sender) 152 'sign)
153 'sign) 153 (unless (> (point-max) (point-min))
154 (unless (> (point-max) (point-min)) 154 (pop-to-buffer result-buffer)
155 (pop-to-buffer result-buffer) 155 (error "Encrypt error")))
156 (error "Encrypt error"))) 156 (goto-char (point-min))
157 (goto-char (point-min)) 157 (while (re-search-forward "\r+$" nil t)
158 (while (re-search-forward "\r+$" nil t) 158 (replace-match "" t t))
159 (replace-match "" t t)) 159 (set-buffer text)
160 (set-buffer text) 160 (delete-region (point-min) (point-max))
161 (delete-region (point-min) (point-max)) 161 ;;(insert "Content-Type: application/pgp-encrypted\n\n")
162 ;;(insert "Content-Type: application/pgp-encrypted\n\n") 162 ;;(insert "Version: 1\n\n")
163 ;;(insert "Version: 1\n\n") 163 (insert "\n")
164 (insert "\n") 164 (insert-buffer-substring cipher)
165 (insert-buffer-substring cipher) 165 (goto-char (point-max)))))
166 (goto-char (point-max))))))
167 166
168;; pgg wrapper 167;; pgg wrapper
169 168
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
index 6882ed63135..dc8b38b8f9a 100644
--- a/lisp/gnus/nnimap.el
+++ b/lisp/gnus/nnimap.el
@@ -190,7 +190,7 @@ textual parts.")
190 (let (article bytes lines size string) 190 (let (article bytes lines size string)
191 (block nil 191 (block nil
192 (while (not (eobp)) 192 (while (not (eobp))
193 (while (not (looking-at "^\\* [0-9]+ FETCH.*UID \\([0-9]+\\)")) 193 (while (not (looking-at "\\* [0-9]+ FETCH.+UID \\([0-9]+\\)"))
194 (delete-region (point) (progn (forward-line 1) (point))) 194 (delete-region (point) (progn (forward-line 1) (point)))
195 (when (eobp) 195 (when (eobp)
196 (return))) 196 (return)))
@@ -1904,7 +1904,7 @@ textual parts.")
1904 (let (article bytes) 1904 (let (article bytes)
1905 (block nil 1905 (block nil
1906 (while (not (eobp)) 1906 (while (not (eobp))
1907 (while (not (looking-at "^\\* [0-9]+ FETCH.*UID \\([0-9]+\\)")) 1907 (while (not (looking-at "\\* [0-9]+ FETCH.+UID \\([0-9]+\\)"))
1908 (delete-region (point) (progn (forward-line 1) (point))) 1908 (delete-region (point) (progn (forward-line 1) (point)))
1909 (when (eobp) 1909 (when (eobp)
1910 (return))) 1910 (return)))
diff --git a/lisp/gnus/nnvirtual.el b/lisp/gnus/nnvirtual.el
index 0cc53ad2332..ea64c247d99 100644
--- a/lisp/gnus/nnvirtual.el
+++ b/lisp/gnus/nnvirtual.el
@@ -194,10 +194,11 @@ component group will show up when you enter the virtual group.")
194 (when buffer 194 (when buffer
195 (set-buffer buffer)) 195 (set-buffer buffer))
196 (let* ((gnus-override-method nil) 196 (let* ((gnus-override-method nil)
197 (method (gnus-find-method-for-group 197 (gnus-command-method
198 nnvirtual-last-accessed-component-group))) 198 (gnus-find-method-for-group
199 (funcall (gnus-get-function method 'request-article) 199 nnvirtual-last-accessed-component-group)))
200 article nil (nth 1 method) buffer))))) 200 (funcall (gnus-get-function gnus-command-method 'request-article)
201 article nil (nth 1 gnus-command-method) buffer)))))
201 ;; This is a fetch by number. 202 ;; This is a fetch by number.
202 (let* ((amap (nnvirtual-map-article article)) 203 (let* ((amap (nnvirtual-map-article article))
203 (cgroup (car amap))) 204 (cgroup (car amap)))
diff --git a/lisp/gnus/pop3.el b/lisp/gnus/pop3.el
index 6f12d3d63e1..90e11b3ca8f 100644
--- a/lisp/gnus/pop3.el
+++ b/lisp/gnus/pop3.el
@@ -319,6 +319,7 @@ Returns the process associated with the connection."
319 (substring response (or (string-match "<" response) 0) 319 (substring response (or (string-match "<" response) 0)
320 (+ 1 (or (string-match ">" response) -1))))) 320 (+ 1 (or (string-match ">" response) -1)))))
321 (pop3-set-process-query-on-exit-flag (car result) nil) 321 (pop3-set-process-query-on-exit-flag (car result) nil)
322 (erase-buffer)
322 (car result))))) 323 (car result)))))
323 324
324;; Support functions 325;; Support functions
@@ -514,6 +515,8 @@ Otherwise, return the size of the message-id MSG"
514 (let ((start pop3-read-point) end) 515 (let ((start pop3-read-point) end)
515 (with-current-buffer (process-buffer process) 516 (with-current-buffer (process-buffer process)
516 (while (not (re-search-forward "^\\.\r\n" nil t)) 517 (while (not (re-search-forward "^\\.\r\n" nil t))
518 (unless (memq (process-status process) '(open run))
519 (error "pop3 server closed the connection"))
517 (pop3-accept-process-output process) 520 (pop3-accept-process-output process)
518 (goto-char start)) 521 (goto-char start))
519 (setq pop3-read-point (point-marker)) 522 (setq pop3-read-point (point-marker))
diff --git a/lisp/icomplete.el b/lisp/icomplete.el
index ab67fcfcdfd..5f3680630f4 100644
--- a/lisp/icomplete.el
+++ b/lisp/icomplete.el
@@ -287,6 +287,7 @@ matches exist. \(Keybindings for uniquely matched commands
287are exhibited within the square braces.)" 287are exhibited within the square braces.)"
288 288
289 (let* ((non-essential t) 289 (let* ((non-essential t)
290 (md (completion--field-metadata (field-beginning)))
290 (comps (completion-all-sorted-completions)) 291 (comps (completion-all-sorted-completions))
291 (last (if (consp comps) (last comps))) 292 (last (if (consp comps) (last comps)))
292 (base-size (cdr last)) 293 (base-size (cdr last))
@@ -299,11 +300,11 @@ are exhibited within the square braces.)"
299 (let* ((most-try 300 (let* ((most-try
300 (if (and base-size (> base-size 0)) 301 (if (and base-size (> base-size 0))
301 (completion-try-completion 302 (completion-try-completion
302 name candidates predicate (length name)) 303 name candidates predicate (length name) md)
303 ;; If the `comps' are 0-based, the result should be 304 ;; If the `comps' are 0-based, the result should be
304 ;; the same with `comps'. 305 ;; the same with `comps'.
305 (completion-try-completion 306 (completion-try-completion
306 name comps nil (length name)))) 307 name comps nil (length name) md)))
307 (most (if (consp most-try) (car most-try) 308 (most (if (consp most-try) (car most-try)
308 (if most-try (car comps) ""))) 309 (if most-try (car comps) "")))
309 ;; Compare name and most, so we can determine if name is 310 ;; Compare name and most, so we can determine if name is
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el
index 3eda3503adc..bc1ca77d24a 100644
--- a/lisp/mail/smtpmail.el
+++ b/lisp/mail/smtpmail.el
@@ -943,15 +943,20 @@ The list is in preference order.")
943 (process-send-string process "\r\n")) 943 (process-send-string process "\r\n"))
944 944
945(defun smtpmail-send-data (process buffer) 945(defun smtpmail-send-data (process buffer)
946 (let ((data-continue t) sending-data) 946 (let ((data-continue t) sending-data
947 (pr (with-current-buffer buffer
948 (make-progress-reporter "Sending email"
949 (point-min) (point-max)))))
947 (with-current-buffer buffer 950 (with-current-buffer buffer
948 (goto-char (point-min))) 951 (goto-char (point-min)))
949 (while data-continue 952 (while data-continue
950 (with-current-buffer buffer 953 (with-current-buffer buffer
954 (progress-reporter-update pr (point))
951 (setq sending-data (buffer-substring (point-at-bol) (point-at-eol))) 955 (setq sending-data (buffer-substring (point-at-bol) (point-at-eol)))
952 (end-of-line 2) 956 (end-of-line 2)
953 (setq data-continue (not (eobp)))) 957 (setq data-continue (not (eobp))))
954 (smtpmail-send-data-1 process sending-data)))) 958 (smtpmail-send-data-1 process sending-data))
959 (progress-reporter-done pr)))
955 960
956(defun smtpmail-deduce-address-list (smtpmail-text-buffer header-start header-end) 961(defun smtpmail-deduce-address-list (smtpmail-text-buffer header-start header-end)
957 "Get address list suitable for smtp RCPT TO: <address>." 962 "Get address list suitable for smtp RCPT TO: <address>."
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 7af602c629b..0f96f7905eb 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -61,10 +61,7 @@
61;; - for M-x, cycle-sort commands that have no key binding first. 61;; - for M-x, cycle-sort commands that have no key binding first.
62;; - Make things like icomplete-mode or lightning-completion work with 62;; - Make things like icomplete-mode or lightning-completion work with
63;; completion-in-region-mode. 63;; completion-in-region-mode.
64;; - extend `boundaries' to provide various other meta-data about the 64;; - extend `metadata':
65;; output of `all-completions':
66;; - preferred sorting order when displayed in *Completions*.
67;; - annotations/text-properties to add when displayed in *Completions*.
68;; - quoting/unquoting (so we can complete files names with envvars 65;; - quoting/unquoting (so we can complete files names with envvars
69;; and backslashes, and all-completion can list names without 66;; and backslashes, and all-completion can list names without
70;; quoting backslashes and dollars). 67;; quoting backslashes and dollars).
@@ -116,6 +113,32 @@ the closest directory separators."
116 (cons (or (cadr boundaries) 0) 113 (cons (or (cadr boundaries) 0)
117 (or (cddr boundaries) (length suffix))))) 114 (or (cddr boundaries) (length suffix)))))
118 115
116(defun completion-metadata (string table pred)
117 "Return the metadata of elements to complete at the end of STRING.
118This metadata is an alist. Currently understood keys are:
119- `category': the kind of objects returned by `all-completions'.
120 Used by `completion-category-overrides'.
121- `annotation-function': function to add annotations in *Completions*.
122 Takes one argument (STRING), which is a possible completion and
123 returns a string to append to STRING.
124- `display-sort-function': function to sort entries in *Completions*.
125 Takes one argument (COMPLETIONS) and should return a new list
126 of completions. Can operate destructively.
127- `cycle-sort-function': function to sort entries when cycling.
128 Works like `display-sort-function'."
129 (let ((metadata (if (functionp table)
130 (funcall table string pred 'metadata))))
131 (if (eq (car-safe metadata) 'metadata)
132 (cdr metadata))))
133
134(defun completion--field-metadata (field-start)
135 (completion-metadata (buffer-substring-no-properties field-start (point))
136 minibuffer-completion-table
137 minibuffer-completion-predicate))
138
139(defun completion-metadata-get (metadata prop)
140 (cdr (assq prop metadata)))
141
119(defun completion--some (fun xs) 142(defun completion--some (fun xs)
120 "Apply FUN to each element of XS in turn. 143 "Apply FUN to each element of XS in turn.
121Return the first non-nil returned value. 144Return the first non-nil returned value.
@@ -457,7 +480,34 @@ The available styles are listed in `completion-styles-alist'."
457 :group 'minibuffer 480 :group 'minibuffer
458 :version "23.1") 481 :version "23.1")
459 482
460(defun completion-try-completion (string table pred point) 483(defcustom completion-category-overrides
484 '((buffer (styles . (basic substring))))
485 "List of overrides for specific categories.
486Each override has the shape (CATEGORY . ALIST) where ALIST is
487an association list that can specify properties such as:
488- `styles': the list of `completion-styles' to use for that category.
489- `cycle': the `completion-cycle-threshold' to use for that category."
490 :type `(alist :key-type (choice (const buffer)
491 (const file)
492 symbol)
493 :value-type
494 (set
495 (cons (const style)
496 (repeat ,@(mapcar (lambda (x) (list 'const (car x)))
497 completion-styles-alist)))
498 (cons (const cycle)
499 (choice (const :tag "No cycling" nil)
500 (const :tag "Always cycle" t)
501 (integer :tag "Threshold"))))))
502
503(defun completion--styles (metadata)
504 (let* ((cat (completion-metadata-get metadata 'category))
505 (over (assq 'styles (cdr (assq cat completion-category-overrides)))))
506 (if over
507 (delete-dups (append (cdr over) (copy-sequence completion-styles)))
508 completion-styles)))
509
510(defun completion-try-completion (string table pred point metadata)
461 "Try to complete STRING using completion table TABLE. 511 "Try to complete STRING using completion table TABLE.
462Only the elements of table that satisfy predicate PRED are considered. 512Only the elements of table that satisfy predicate PRED are considered.
463POINT is the position of point within STRING. 513POINT is the position of point within STRING.
@@ -468,9 +518,9 @@ a new position for point."
468 (completion--some (lambda (style) 518 (completion--some (lambda (style)
469 (funcall (nth 1 (assq style completion-styles-alist)) 519 (funcall (nth 1 (assq style completion-styles-alist))
470 string table pred point)) 520 string table pred point))
471 completion-styles)) 521 (completion--styles metadata)))
472 522
473(defun completion-all-completions (string table pred point) 523(defun completion-all-completions (string table pred point metadata)
474 "List the possible completions of STRING in completion table TABLE. 524 "List the possible completions of STRING in completion table TABLE.
475Only the elements of table that satisfy predicate PRED are considered. 525Only the elements of table that satisfy predicate PRED are considered.
476POINT is the position of point within STRING. 526POINT is the position of point within STRING.
@@ -481,7 +531,7 @@ in the last `cdr'."
481 (completion--some (lambda (style) 531 (completion--some (lambda (style)
482 (funcall (nth 2 (assq style completion-styles-alist)) 532 (funcall (nth 2 (assq style completion-styles-alist))
483 string table pred point)) 533 string table pred point))
484 completion-styles)) 534 (completion--styles metadata)))
485 535
486(defun minibuffer--bitset (modified completions exact) 536(defun minibuffer--bitset (modified completions exact)
487 (logior (if modified 4 0) 537 (logior (if modified 4 0)
@@ -532,6 +582,11 @@ candidates than this number."
532 (const :tag "Always cycle" t) 582 (const :tag "Always cycle" t)
533 (integer :tag "Threshold"))) 583 (integer :tag "Threshold")))
534 584
585(defun completion--cycle-threshold (metadata)
586 (let* ((cat (completion-metadata-get metadata 'category))
587 (over (assq 'cycle (cdr (assq cat completion-category-overrides)))))
588 (if over (cdr over) completion-cycle-threshold)))
589
535(defvar completion-all-sorted-completions nil) 590(defvar completion-all-sorted-completions nil)
536(make-variable-buffer-local 'completion-all-sorted-completions) 591(make-variable-buffer-local 'completion-all-sorted-completions)
537(defvar completion-cycling nil) 592(defvar completion-cycling nil)
@@ -566,12 +621,14 @@ when the buffer's text is already an exact match."
566 (let* ((beg (field-beginning)) 621 (let* ((beg (field-beginning))
567 (end (field-end)) 622 (end (field-end))
568 (string (buffer-substring beg end)) 623 (string (buffer-substring beg end))
624 (md (completion--field-metadata beg))
569 (comp (funcall (or try-completion-function 625 (comp (funcall (or try-completion-function
570 'completion-try-completion) 626 'completion-try-completion)
571 string 627 string
572 minibuffer-completion-table 628 minibuffer-completion-table
573 minibuffer-completion-predicate 629 minibuffer-completion-predicate
574 (- (point) beg)))) 630 (- (point) beg)
631 md)))
575 (cond 632 (cond
576 ((null comp) 633 ((null comp)
577 (minibuffer-hide-completions) 634 (minibuffer-hide-completions)
@@ -610,16 +667,17 @@ when the buffer's text is already an exact match."
610 (completion--do-completion try-completion-function expect-exact) 667 (completion--do-completion try-completion-function expect-exact)
611 668
612 ;; It did find a match. Do we match some possibility exactly now? 669 ;; It did find a match. Do we match some possibility exactly now?
613 (let ((exact (test-completion completion 670 (let* ((exact (test-completion completion
614 minibuffer-completion-table 671 minibuffer-completion-table
615 minibuffer-completion-predicate)) 672 minibuffer-completion-predicate))
673 (threshold (completion--cycle-threshold md))
616 (comps 674 (comps
617 ;; Check to see if we want to do cycling. We do it 675 ;; Check to see if we want to do cycling. We do it
618 ;; here, after having performed the normal completion, 676 ;; here, after having performed the normal completion,
619 ;; so as to take advantage of the difference between 677 ;; so as to take advantage of the difference between
620 ;; try-completion and all-completions, for things 678 ;; try-completion and all-completions, for things
621 ;; like completion-ignored-extensions. 679 ;; like completion-ignored-extensions.
622 (when (and completion-cycle-threshold 680 (when (and threshold
623 ;; Check that the completion didn't make 681 ;; Check that the completion didn't make
624 ;; us jump to a different boundary. 682 ;; us jump to a different boundary.
625 (or (not completed) 683 (or (not completed)
@@ -636,7 +694,7 @@ when the buffer's text is already an exact match."
636 (not (ignore-errors 694 (not (ignore-errors
637 ;; This signal an (intended) error if comps is too 695 ;; This signal an (intended) error if comps is too
638 ;; short or if completion-cycle-threshold is t. 696 ;; short or if completion-cycle-threshold is t.
639 (consp (nthcdr completion-cycle-threshold comps))))) 697 (consp (nthcdr threshold comps)))))
640 ;; Fewer than completion-cycle-threshold remaining 698 ;; Fewer than completion-cycle-threshold remaining
641 ;; completions: let's cycle. 699 ;; completions: let's cycle.
642 (setq completed t exact t) 700 (setq completed t exact t)
@@ -715,27 +773,25 @@ scroll the window of possible completions."
715 (or completion-all-sorted-completions 773 (or completion-all-sorted-completions
716 (let* ((start (field-beginning)) 774 (let* ((start (field-beginning))
717 (end (field-end)) 775 (end (field-end))
718 (all (completion-all-completions (buffer-substring start end) 776 (string (buffer-substring start end))
719 minibuffer-completion-table 777 (all (completion-all-completions
720 minibuffer-completion-predicate 778 string
721 (- (point) start))) 779 minibuffer-completion-table
780 minibuffer-completion-predicate
781 (- (point) start)
782 (completion--field-metadata start)))
722 (last (last all)) 783 (last (last all))
723 (base-size (or (cdr last) 0))) 784 (base-size (or (cdr last) 0))
785 (all-md (completion-metadata (substring string 0 base-size)
786 minibuffer-completion-table
787 minibuffer-completion-predicate))
788 (sort-fun (completion-metadata-get all-md 'cycle-sort-function)))
724 (when last 789 (when last
725 (setcdr last nil) 790 (setcdr last nil)
726 ;; Prefer shorter completions. 791 (setq all (if sort-fun (funcall sort-fun all)
727 (setq all (sort all (lambda (c1 c2) 792 ;; Prefer shorter completions, by default.
728 (let ((s1 (get-text-property 793 (sort all (lambda (c1 c2) (< (length c1) (length c2))))))
729 0 :completion-cycle-penalty c1))
730 (s2 (get-text-property
731 0 :completion-cycle-penalty c2)))
732 (if (eq s1 s2)
733 (< (length c1) (length c2))
734 (< (or s1 (length c1))
735 (or s2 (length c2))))))))
736 ;; Prefer recently used completions. 794 ;; Prefer recently used completions.
737 ;; FIXME: Additional sorting ideas:
738 ;; - for M-x, prefer commands that have no key binding.
739 (when (minibufferp) 795 (when (minibufferp)
740 (let ((hist (symbol-value minibuffer-history-variable))) 796 (let ((hist (symbol-value minibuffer-history-variable)))
741 (setq all (sort all (lambda (c1 c2) 797 (setq all (sort all (lambda (c1 c2)
@@ -758,6 +814,7 @@ Repeated uses step through the possible completions."
758 ;; ~/src/emacs/trunk/ and throws away lisp/minibuffer.el. 814 ;; ~/src/emacs/trunk/ and throws away lisp/minibuffer.el.
759 (let* ((start (field-beginning)) 815 (let* ((start (field-beginning))
760 (end (field-end)) 816 (end (field-end))
817 ;; (md (completion--field-metadata start))
761 (all (completion-all-sorted-completions)) 818 (all (completion-all-sorted-completions))
762 (base (+ start (or (cdr (last all)) 0)))) 819 (base (+ start (or (cdr (last all)) 0))))
763 (cond 820 (cond
@@ -861,8 +918,8 @@ If `minibuffer-completion-confirm' is `confirm-after-completion',
861 nil)) 918 nil))
862 (t nil)))))) 919 (t nil))))))
863 920
864(defun completion--try-word-completion (string table predicate point) 921(defun completion--try-word-completion (string table predicate point md)
865 (let ((comp (completion-try-completion string table predicate point))) 922 (let ((comp (completion-try-completion string table predicate point md)))
866 (if (not (consp comp)) 923 (if (not (consp comp))
867 comp 924 comp
868 925
@@ -884,7 +941,7 @@ If `minibuffer-completion-confirm' is `confirm-after-completion',
884 (while (and exts (not (consp tem))) 941 (while (and exts (not (consp tem)))
885 (setq tem (completion-try-completion 942 (setq tem (completion-try-completion
886 (concat before (pop exts) after) 943 (concat before (pop exts) after)
887 table predicate (1+ point)))) 944 table predicate (1+ point) md)))
888 (if (consp tem) (setq comp tem)))) 945 (if (consp tem) (setq comp tem))))
889 946
890 ;; Completing a single word is actually more difficult than completing 947 ;; Completing a single word is actually more difficult than completing
@@ -1219,7 +1276,8 @@ variables.")
1219 string 1276 string
1220 minibuffer-completion-table 1277 minibuffer-completion-table
1221 minibuffer-completion-predicate 1278 minibuffer-completion-predicate
1222 (- (point) (field-beginning))))) 1279 (- (point) (field-beginning))
1280 (completion--field-metadata start))))
1223 (message nil) 1281 (message nil)
1224 (if (or (null completions) 1282 (if (or (null completions)
1225 (and (not (consp (cdr completions))) 1283 (and (not (consp (cdr completions)))
@@ -1235,9 +1293,16 @@ variables.")
1235 (let* ((last (last completions)) 1293 (let* ((last (last completions))
1236 (base-size (cdr last)) 1294 (base-size (cdr last))
1237 (prefix (unless (zerop base-size) (substring string 0 base-size))) 1295 (prefix (unless (zerop base-size) (substring string 0 base-size)))
1238 (global-af (or (plist-get completion-extra-properties 1296 ;; FIXME: This function is for the output of all-completions,
1239 :annotation-function) 1297 ;; not completion-all-completions. Often it's the same, but
1240 completion-annotate-function)) 1298 ;; not always.
1299 (all-md (completion-metadata (substring string 0 base-size)
1300 minibuffer-completion-table
1301 minibuffer-completion-predicate))
1302 (afun (or (completion-metadata-get all-md 'annotation-function)
1303 (plist-get completion-extra-properties
1304 :annotation-function)
1305 completion-annotate-function))
1241 ;; If the *Completions* buffer is shown in a new 1306 ;; If the *Completions* buffer is shown in a new
1242 ;; window, mark it as softly-dedicated, so bury-buffer in 1307 ;; window, mark it as softly-dedicated, so bury-buffer in
1243 ;; minibuffer-hide-completions will know whether to 1308 ;; minibuffer-hide-completions will know whether to
@@ -1247,15 +1312,21 @@ variables.")
1247 ;; Remove the base-size tail because `sort' requires a properly 1312 ;; Remove the base-size tail because `sort' requires a properly
1248 ;; nil-terminated list. 1313 ;; nil-terminated list.
1249 (when last (setcdr last nil)) 1314 (when last (setcdr last nil))
1250 (setq completions (sort completions 'string-lessp))
1251 (setq completions 1315 (setq completions
1252 (cond 1316 ;; FIXME: This function is for the output of all-completions,
1253 (global-af 1317 ;; not completion-all-completions. Often it's the same, but
1318 ;; not always.
1319 (let ((sort-fun (completion-metadata-get
1320 all-md 'display-sort-function)))
1321 (if sort-fun
1322 (funcall sort-fun completions)
1323 (sort completions 'string-lessp))))
1324 (when afun
1325 (setq completions
1254 (mapcar (lambda (s) 1326 (mapcar (lambda (s)
1255 (let ((ann (funcall global-af s))) 1327 (let ((ann (funcall afun s)))
1256 (if ann (list s ann) s))) 1328 (if ann (list s ann) s)))
1257 completions)) 1329 completions)))
1258 (t completions)))
1259 1330
1260 (with-current-buffer standard-output 1331 (with-current-buffer standard-output
1261 (set (make-local-variable 'completion-base-position) 1332 (set (make-local-variable 'completion-base-position)
@@ -1270,12 +1341,12 @@ variables.")
1270 (cpred minibuffer-completion-predicate) 1341 (cpred minibuffer-completion-predicate)
1271 (cprops completion-extra-properties)) 1342 (cprops completion-extra-properties))
1272 (lambda (start end choice) 1343 (lambda (start end choice)
1273 (unless 1344 (unless (or (zerop (length prefix))
1274 (or (zerop (length prefix)) 1345 (equal prefix
1275 (equal prefix 1346 (buffer-substring-no-properties
1276 (buffer-substring-no-properties 1347 (max (point-min)
1277 (max (point-min) (- start (length prefix))) 1348 (- start (length prefix)))
1278 start))) 1349 start)))
1279 (message "*Completions* out of date")) 1350 (message "*Completions* out of date"))
1280 ;; FIXME: Use `md' to do quoting&terminator here. 1351 ;; FIXME: Use `md' to do quoting&terminator here.
1281 (completion--replace start end choice) 1352 (completion--replace start end choice)
@@ -1632,6 +1703,7 @@ same as `substitute-in-file-name'."
1632 "Completion table for file names." 1703 "Completion table for file names."
1633 (ignore-errors 1704 (ignore-errors
1634 (cond 1705 (cond
1706 ((eq action 'metadata) '(metadata (category . file)))
1635 ((eq (car-safe action) 'boundaries) 1707 ((eq (car-safe action) 'boundaries)
1636 (let ((start (length (file-name-directory string))) 1708 (let ((start (length (file-name-directory string)))
1637 (end (string-match-p "/" (cdr action)))) 1709 (end (string-match-p "/" (cdr action))))
@@ -1852,6 +1924,11 @@ and `read-file-name-function'."
1852 (funcall (or read-file-name-function #'read-file-name-default) 1924 (funcall (or read-file-name-function #'read-file-name-default)
1853 prompt dir default-filename mustmatch initial predicate)) 1925 prompt dir default-filename mustmatch initial predicate))
1854 1926
1927;; minibuffer-completing-file-name is a variable used internally in minibuf.c
1928;; to determine whether to use minibuffer-local-filename-completion-map or
1929;; minibuffer-local-completion-map. It shouldn't be exported to Elisp.
1930(make-obsolete-variable 'minibuffer-completing-file-name nil "24.1")
1931
1855(defun read-file-name-default (prompt &optional dir default-filename mustmatch initial predicate) 1932(defun read-file-name-default (prompt &optional dir default-filename mustmatch initial predicate)
1856 "Default method for reading file names. 1933 "Default method for reading file names.
1857See `read-file-name' for the meaning of the arguments." 1934See `read-file-name' for the meaning of the arguments."
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index 47085af85f0..b1ee4c45373 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -314,9 +314,11 @@ Called with 5 arguments, PROCESS, SENDER, RESPONSE, TARGET and TEXT."
314 :type 'boolean 314 :type 'boolean
315 :group 'rcirc) 315 :group 'rcirc)
316 316
317(defcustom rcirc-decode-coding-system 'utf-8 317(defcustom rcirc-decode-coding-system nil
318 "Coding system used to decode incoming irc messages." 318 "Coding system used to decode incoming irc messages.
319If nil automatically detect the coding system."
319 :type 'coding-system 320 :type 'coding-system
321 :version "24.1"
320 :group 'rcirc) 322 :group 'rcirc)
321 323
322(defcustom rcirc-encode-coding-system 'utf-8 324(defcustom rcirc-encode-coding-system 'utf-8
@@ -616,7 +618,7 @@ last ping."
616 (setq header-line-format (format "%f" (- (rcirc-float-time) 618 (setq header-line-format (format "%f" (- (rcirc-float-time)
617 (string-to-number message)))))) 619 (string-to-number message))))))
618 620
619(defvar rcirc-debug-buffer " *rcirc debug*") 621(defvar rcirc-debug-buffer "*rcirc debug*")
620(defvar rcirc-debug-flag nil 622(defvar rcirc-debug-flag nil
621 "If non-nil, write information to `rcirc-debug-buffer'.") 623 "If non-nil, write information to `rcirc-debug-buffer'.")
622(defun rcirc-debug (process text) 624(defun rcirc-debug (process text)
@@ -1480,9 +1482,9 @@ record activity."
1480 (old-point (point-marker)) 1482 (old-point (point-marker))
1481 (fill-start (marker-position rcirc-prompt-start-marker))) 1483 (fill-start (marker-position rcirc-prompt-start-marker)))
1482 1484
1485 (setq text (decode-coding-string text (or rcirc-decode-coding-system
1486 (detect-coding-string text t))))
1483 (unless (string= sender (rcirc-nick process)) 1487 (unless (string= sender (rcirc-nick process))
1484 ;; only decode text from other senders, not ours
1485 (setq text (decode-coding-string text rcirc-decode-coding-system))
1486 ;; mark the line with overlay arrow 1488 ;; mark the line with overlay arrow
1487 (unless (or (marker-position overlay-arrow-position) 1489 (unless (or (marker-position overlay-arrow-position)
1488 (get-buffer-window (current-buffer)) 1490 (get-buffer-window (current-buffer))
diff --git a/lisp/simple.el b/lisp/simple.el
index 4cf38178357..18ae1367d74 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1158,6 +1158,7 @@ in *Help* buffer. See also the command `describe-char'."
1158 1158
1159(defvar minibuffer-completing-symbol nil 1159(defvar minibuffer-completing-symbol nil
1160 "Non-nil means completing a Lisp symbol in the minibuffer.") 1160 "Non-nil means completing a Lisp symbol in the minibuffer.")
1161(make-obsolete-variable 'minibuffer-completing-symbol nil "24.1")
1161 1162
1162(defvar minibuffer-default nil 1163(defvar minibuffer-default nil
1163 "The current default value or list of default values in the minibuffer. 1164 "The current default value or list of default values in the minibuffer.
diff --git a/src/ChangeLog b/src/ChangeLog
index bada9f108f7..880cafc05a4 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,6 +1,7 @@
12011-05-30 Paul Eggert <eggert@cs.ucla.edu> 12011-05-31 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 Use 'inline', not 'INLINE'. 3 Use 'inline', not 'INLINE'.
4 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00914.html>
4 * alloc.c, fontset.c (INLINE): Remove. 5 * alloc.c, fontset.c (INLINE): Remove.
5 * alloc.c, bidi.c, charset.c, coding.c, dispnew.c, fns.c, image.c: 6 * alloc.c, bidi.c, charset.c, coding.c, dispnew.c, fns.c, image.c:
6 * intervals.c, keyboard.c, process.c, syntax.c, textprop.c, w32term.c: 7 * intervals.c, keyboard.c, process.c, syntax.c, textprop.c, w32term.c:
@@ -8,6 +9,29 @@
8 * gmalloc.c (register_heapinfo): Use inline unconditionally. 9 * gmalloc.c (register_heapinfo): Use inline unconditionally.
9 * lisp.h (LISP_MAKE_RVALUE): Use inline, not __inline__. 10 * lisp.h (LISP_MAKE_RVALUE): Use inline, not __inline__.
10 11
122011-05-31 Stefan Monnier <monnier@iro.umontreal.ca>
13
14 * minibuf.c (Finternal_complete_buffer): Return `category' metadata.
15 (read_minibuf): Use get_minibuffer.
16 (syms_of_minibuf): Use DEFSYM.
17 (Qmetadata): New var.
18 * data.c (Qbuffer): Don't make it static.
19 (syms_of_data): Use DEFSYM.
20
212011-05-31 Paul Eggert <eggert@cs.ucla.edu>
22
23 * ccl.c (CCL_CODE_RANGE): Allow negative numbers. (Bug#8751)
24 (CCL_CODE_MIN): New macro.
25
262011-05-30 Paul Eggert <eggert@cs.ucla.edu>
27
28 * alloc.c (lisp_align_malloc): Omit unnecessary val==NULL tests.
29
30 * eval.c (Qdebug): Now static.
31 * lisp.h (Qdebug): Remove decl. This reverts a part of the
32 2011-04-26T11:26:05Z!dan.colascione@gmail.com that inadvertently undid part of
33 2011-04-14T06:48:41Z!eggert@cs.ucla.edu.
34
112011-05-29 Chong Yidong <cyd@stupidchicken.com> 352011-05-29 Chong Yidong <cyd@stupidchicken.com>
12 36
13 * image.c: Various fixes to ImageMagick code comments. 37 * image.c: Various fixes to ImageMagick code comments.
@@ -160,8 +184,8 @@
160 (symbol_to_x_atom): Remove gratuitous arg. 184 (symbol_to_x_atom): Remove gratuitous arg.
161 (x_handle_selection_request, lisp_data_to_selection_data) 185 (x_handle_selection_request, lisp_data_to_selection_data)
162 (x_get_foreign_selection, Fx_register_dnd_atom): Callers changed. 186 (x_get_foreign_selection, Fx_register_dnd_atom): Callers changed.
163 (x_own_selection, x_get_local_selection, x_convert_selection): New 187 (x_own_selection, x_get_local_selection, x_convert_selection):
164 arg, specifying work frame. Use terminal-local Vselection_alist. 188 New arg, specifying work frame. Use terminal-local Vselection_alist.
165 (some_frame_on_display): Delete unused function. 189 (some_frame_on_display): Delete unused function.
166 (Fx_own_selection_internal, Fx_get_selection_internal) 190 (Fx_own_selection_internal, Fx_get_selection_internal)
167 (Fx_disown_selection_internal, Fx_selection_owner_p) 191 (Fx_disown_selection_internal, Fx_selection_owner_p)
@@ -182,8 +206,8 @@
182 (x_selection_request_lisp_error): Free the above. 206 (x_selection_request_lisp_error): Free the above.
183 (x_get_local_selection): Remove unnecessary code. 207 (x_get_local_selection): Remove unnecessary code.
184 (x_reply_selection_request): Args changed; handle arbitrary array 208 (x_reply_selection_request): Args changed; handle arbitrary array
185 of converted selections stored in converted_selections. Separate 209 of converted selections stored in converted_selections.
186 the XChangeProperty and SelectionNotify steps. 210 Separate the XChangeProperty and SelectionNotify steps.
187 (x_handle_selection_request): Rewrite to handle MULTIPLE target. 211 (x_handle_selection_request): Rewrite to handle MULTIPLE target.
188 (x_convert_selection): New function. 212 (x_convert_selection): New function.
189 (x_handle_selection_event): Simplify. 213 (x_handle_selection_event): Simplify.
@@ -347,8 +371,8 @@
347 371
348 Be more systematic about user-interface timestamps. 372 Be more systematic about user-interface timestamps.
349 Before, the code sometimes used 'Time', sometimes 'unsigned long', 373 Before, the code sometimes used 'Time', sometimes 'unsigned long',
350 and sometimes 'EMACS_UINT', to represent these timestamps. This 374 and sometimes 'EMACS_UINT', to represent these timestamps.
351 change causes it to use 'Time' uniformly, as that's what X uses. 375 This change causes it to use 'Time' uniformly, as that's what X uses.
352 This makes the code easier to follow, and makes it easier to catch 376 This makes the code easier to follow, and makes it easier to catch
353 integer overflow bugs such as Bug#8664. 377 integer overflow bugs such as Bug#8664.
354 * frame.c (Fmouse_position, Fmouse_pixel_position): 378 * frame.c (Fmouse_position, Fmouse_pixel_position):
diff --git a/src/alloc.c b/src/alloc.c
index f62ae125408..e627af6c071 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -989,13 +989,11 @@ lisp_align_malloc (size_t nbytes, enum mem_type type)
989 free_ablock = free_ablock->x.next_free; 989 free_ablock = free_ablock->x.next_free;
990 990
991#if GC_MARK_STACK && !defined GC_MALLOC_CHECK 991#if GC_MARK_STACK && !defined GC_MALLOC_CHECK
992 if (val && type != MEM_TYPE_NON_LISP) 992 if (type != MEM_TYPE_NON_LISP)
993 mem_insert (val, (char *) val + nbytes, type); 993 mem_insert (val, (char *) val + nbytes, type);
994#endif 994#endif
995 995
996 MALLOC_UNBLOCK_INPUT; 996 MALLOC_UNBLOCK_INPUT;
997 if (!val && nbytes)
998 memory_full ();
999 997
1000 eassert (0 == ((uintptr_t) val) % BLOCK_ALIGN); 998 eassert (0 == ((uintptr_t) val) % BLOCK_ALIGN);
1001 return val; 999 return val;
diff --git a/src/ccl.c b/src/ccl.c
index 630c6b3de9e..a58ad90beaf 100644
--- a/src/ccl.c
+++ b/src/ccl.c
@@ -79,9 +79,8 @@ static Lisp_Object Vccl_program_table;
79#define CCL_HEADER_EOF 1 79#define CCL_HEADER_EOF 1
80#define CCL_HEADER_MAIN 2 80#define CCL_HEADER_MAIN 2
81 81
82/* CCL code is a sequence of 28-bit non-negative integers (i.e. the 82/* CCL code is a sequence of 28-bit integers. Each contains a CCL
83 MSB is always 0), each contains CCL command and/or arguments in the 83 command and/or arguments in the following format:
84 following format:
85 84
86 |----------------- integer (28-bit) ------------------| 85 |----------------- integer (28-bit) ------------------|
87 |------- 17-bit ------|- 3-bit --|- 3-bit --|- 5-bit -| 86 |------- 17-bit ------|- 3-bit --|- 3-bit --|- 5-bit -|
@@ -94,12 +93,14 @@ static Lisp_Object Vccl_program_table;
94 |------------- constant or other args ----------------| 93 |------------- constant or other args ----------------|
95 cccccccccccccccccccccccccccc 94 cccccccccccccccccccccccccccc
96 95
97 where, `cc...c' is a non-negative integer indicating constant value 96 where `cc...c' is an integer indicating a constant value or an
98 (the left most `c' is always 0) or an absolute jump address, `RRR' 97 absolute jump address. The context determines whether `cc...c' is
98 considered to be unsigned, or a signed two's complement number. `RRR'
99 and `rrr' are CCL register number, `XXXXX' is one of the following 99 and `rrr' are CCL register number, `XXXXX' is one of the following
100 CCL commands. */ 100 CCL commands. */
101 101
102#define CCL_CODE_MAX ((1 << (28 - 1)) - 1) 102#define CCL_CODE_MAX ((1 << (28 - 1)) - 1)
103#define CCL_CODE_MIN (-1 - CCL_CODE_MAX)
103 104
104/* CCL commands 105/* CCL commands
105 106
@@ -756,7 +757,7 @@ while(0)
756 while (0) 757 while (0)
757 758
758#define GET_CCL_CODE(code, ccl_prog, ic) \ 759#define GET_CCL_CODE(code, ccl_prog, ic) \
759 GET_CCL_RANGE (code, ccl_prog, ic, 0, CCL_CODE_MAX) 760 GET_CCL_RANGE (code, ccl_prog, ic, CCL_CODE_MIN, CCL_CODE_MAX)
760 761
761#define GET_CCL_INT(var, ccl_prog, ic) \ 762#define GET_CCL_INT(var, ccl_prog, ic) \
762 GET_CCL_RANGE (var, ccl_prog, ic, INT_MIN, INT_MAX) 763 GET_CCL_RANGE (var, ccl_prog, ic, INT_MIN, INT_MAX)
diff --git a/src/data.c b/src/data.c
index a26627875ab..443d78376d9 100644
--- a/src/data.c
+++ b/src/data.c
@@ -32,14 +32,14 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
32#include "keyboard.h" 32#include "keyboard.h"
33#include "frame.h" 33#include "frame.h"
34#include "syssignal.h" 34#include "syssignal.h"
35#include "termhooks.h" /* For FRAME_KBOARD reference in y-or-n-p. */ 35#include "termhooks.h" /* For FRAME_KBOARD reference in y-or-n-p. */
36#include "font.h" 36#include "font.h"
37 37
38#ifdef STDC_HEADERS 38#ifdef STDC_HEADERS
39#include <float.h> 39#include <float.h>
40#endif 40#endif
41 41
42/* If IEEE_FLOATING_POINT isn't defined, default it from FLT_*. */ 42/* If IEEE_FLOATING_POINT isn't defined, default it from FLT_*. */
43#ifndef IEEE_FLOATING_POINT 43#ifndef IEEE_FLOATING_POINT
44#if (FLT_RADIX == 2 && FLT_MANT_DIG == 24 \ 44#if (FLT_RADIX == 2 && FLT_MANT_DIG == 24 \
45 && FLT_MIN_EXP == -125 && FLT_MAX_EXP == 128) 45 && FLT_MIN_EXP == -125 && FLT_MAX_EXP == 128)
@@ -90,7 +90,7 @@ static Lisp_Object Qsymbol, Qstring, Qcons, Qmarker, Qoverlay;
90Lisp_Object Qwindow; 90Lisp_Object Qwindow;
91static Lisp_Object Qfloat, Qwindow_configuration; 91static Lisp_Object Qfloat, Qwindow_configuration;
92static Lisp_Object Qprocess; 92static Lisp_Object Qprocess;
93static Lisp_Object Qcompiled_function, Qbuffer, Qframe, Qvector; 93Lisp_Object Qcompiled_function, Qbuffer, Qframe, Qvector;
94static Lisp_Object Qchar_table, Qbool_vector, Qhash_table; 94static Lisp_Object Qchar_table, Qbool_vector, Qhash_table;
95static Lisp_Object Qsubrp, Qmany, Qunevalled; 95static Lisp_Object Qsubrp, Qmany, Qunevalled;
96Lisp_Object Qfont_spec, Qfont_entity, Qfont_object; 96Lisp_Object Qfont_spec, Qfont_entity, Qfont_object;
@@ -2854,74 +2854,75 @@ syms_of_data (void)
2854{ 2854{
2855 Lisp_Object error_tail, arith_tail; 2855 Lisp_Object error_tail, arith_tail;
2856 2856
2857 Qquote = intern_c_string ("quote"); 2857 DEFSYM (Qquote, "quote");
2858 Qlambda = intern_c_string ("lambda"); 2858 DEFSYM (Qlambda, "lambda");
2859 Qsubr = intern_c_string ("subr"); 2859 DEFSYM (Qsubr, "subr");
2860 Qerror_conditions = intern_c_string ("error-conditions"); 2860 DEFSYM (Qerror_conditions, "error-conditions");
2861 Qerror_message = intern_c_string ("error-message"); 2861 DEFSYM (Qerror_message, "error-message");
2862 Qtop_level = intern_c_string ("top-level"); 2862 DEFSYM (Qtop_level, "top-level");
2863 2863
2864 Qerror = intern_c_string ("error"); 2864 DEFSYM (Qerror, "error");
2865 Qquit = intern_c_string ("quit"); 2865 DEFSYM (Qquit, "quit");
2866 Qwrong_type_argument = intern_c_string ("wrong-type-argument"); 2866 DEFSYM (Qwrong_type_argument, "wrong-type-argument");
2867 Qargs_out_of_range = intern_c_string ("args-out-of-range"); 2867 DEFSYM (Qargs_out_of_range, "args-out-of-range");
2868 Qvoid_function = intern_c_string ("void-function"); 2868 DEFSYM (Qvoid_function, "void-function");
2869 Qcyclic_function_indirection = intern_c_string ("cyclic-function-indirection"); 2869 DEFSYM (Qcyclic_function_indirection, "cyclic-function-indirection");
2870 Qcyclic_variable_indirection = intern_c_string ("cyclic-variable-indirection"); 2870 DEFSYM (Qcyclic_variable_indirection, "cyclic-variable-indirection");
2871 Qvoid_variable = intern_c_string ("void-variable"); 2871 DEFSYM (Qvoid_variable, "void-variable");
2872 Qsetting_constant = intern_c_string ("setting-constant"); 2872 DEFSYM (Qsetting_constant, "setting-constant");
2873 Qinvalid_read_syntax = intern_c_string ("invalid-read-syntax"); 2873 DEFSYM (Qinvalid_read_syntax, "invalid-read-syntax");
2874 2874
2875 Qinvalid_function = intern_c_string ("invalid-function"); 2875 DEFSYM (Qinvalid_function, "invalid-function");
2876 Qwrong_number_of_arguments = intern_c_string ("wrong-number-of-arguments"); 2876 DEFSYM (Qwrong_number_of_arguments, "wrong-number-of-arguments");
2877 Qno_catch = intern_c_string ("no-catch"); 2877 DEFSYM (Qno_catch, "no-catch");
2878 Qend_of_file = intern_c_string ("end-of-file"); 2878 DEFSYM (Qend_of_file, "end-of-file");
2879 Qarith_error = intern_c_string ("arith-error"); 2879 DEFSYM (Qarith_error, "arith-error");
2880 Qbeginning_of_buffer = intern_c_string ("beginning-of-buffer"); 2880 DEFSYM (Qbeginning_of_buffer, "beginning-of-buffer");
2881 Qend_of_buffer = intern_c_string ("end-of-buffer"); 2881 DEFSYM (Qend_of_buffer, "end-of-buffer");
2882 Qbuffer_read_only = intern_c_string ("buffer-read-only"); 2882 DEFSYM (Qbuffer_read_only, "buffer-read-only");
2883 Qtext_read_only = intern_c_string ("text-read-only"); 2883 DEFSYM (Qtext_read_only, "text-read-only");
2884 Qmark_inactive = intern_c_string ("mark-inactive"); 2884 DEFSYM (Qmark_inactive, "mark-inactive");
2885 2885
2886 Qlistp = intern_c_string ("listp"); 2886 DEFSYM (Qlistp, "listp");
2887 Qconsp = intern_c_string ("consp"); 2887 DEFSYM (Qconsp, "consp");
2888 Qsymbolp = intern_c_string ("symbolp"); 2888 DEFSYM (Qsymbolp, "symbolp");
2889 Qkeywordp = intern_c_string ("keywordp"); 2889 DEFSYM (Qkeywordp, "keywordp");
2890 Qintegerp = intern_c_string ("integerp"); 2890 DEFSYM (Qintegerp, "integerp");
2891 Qnatnump = intern_c_string ("natnump"); 2891 DEFSYM (Qnatnump, "natnump");
2892 Qwholenump = intern_c_string ("wholenump"); 2892 DEFSYM (Qwholenump, "wholenump");
2893 Qstringp = intern_c_string ("stringp"); 2893 DEFSYM (Qstringp, "stringp");
2894 Qarrayp = intern_c_string ("arrayp"); 2894 DEFSYM (Qarrayp, "arrayp");
2895 Qsequencep = intern_c_string ("sequencep"); 2895 DEFSYM (Qsequencep, "sequencep");
2896 Qbufferp = intern_c_string ("bufferp"); 2896 DEFSYM (Qbufferp, "bufferp");
2897 Qvectorp = intern_c_string ("vectorp"); 2897 DEFSYM (Qvectorp, "vectorp");
2898 Qchar_or_string_p = intern_c_string ("char-or-string-p"); 2898 DEFSYM (Qchar_or_string_p, "char-or-string-p");
2899 Qmarkerp = intern_c_string ("markerp"); 2899 DEFSYM (Qmarkerp, "markerp");
2900 Qbuffer_or_string_p = intern_c_string ("buffer-or-string-p"); 2900 DEFSYM (Qbuffer_or_string_p, "buffer-or-string-p");
2901 Qinteger_or_marker_p = intern_c_string ("integer-or-marker-p"); 2901 DEFSYM (Qinteger_or_marker_p, "integer-or-marker-p");
2902 Qboundp = intern_c_string ("boundp"); 2902 DEFSYM (Qboundp, "boundp");
2903 Qfboundp = intern_c_string ("fboundp"); 2903 DEFSYM (Qfboundp, "fboundp");
2904 2904
2905 Qfloatp = intern_c_string ("floatp"); 2905 DEFSYM (Qfloatp, "floatp");
2906 Qnumberp = intern_c_string ("numberp"); 2906 DEFSYM (Qnumberp, "numberp");
2907 Qnumber_or_marker_p = intern_c_string ("number-or-marker-p"); 2907 DEFSYM (Qnumber_or_marker_p, "number-or-marker-p");
2908 2908
2909 Qchar_table_p = intern_c_string ("char-table-p"); 2909 DEFSYM (Qchar_table_p, "char-table-p");
2910 Qvector_or_char_table_p = intern_c_string ("vector-or-char-table-p"); 2910 DEFSYM (Qvector_or_char_table_p, "vector-or-char-table-p");
2911 2911
2912 Qsubrp = intern_c_string ("subrp"); 2912 DEFSYM (Qsubrp, "subrp");
2913 Qunevalled = intern_c_string ("unevalled"); 2913 DEFSYM (Qunevalled, "unevalled");
2914 Qmany = intern_c_string ("many"); 2914 DEFSYM (Qmany, "many");
2915 2915
2916 Qcdr = intern_c_string ("cdr"); 2916 DEFSYM (Qcdr, "cdr");
2917 2917
2918 /* Handle automatic advice activation */ 2918 /* Handle automatic advice activation. */
2919 Qad_advice_info = intern_c_string ("ad-advice-info"); 2919 DEFSYM (Qad_advice_info, "ad-advice-info");
2920 Qad_activate_internal = intern_c_string ("ad-activate-internal"); 2920 DEFSYM (Qad_activate_internal, "ad-activate-internal");
2921 2921
2922 error_tail = pure_cons (Qerror, Qnil); 2922 error_tail = pure_cons (Qerror, Qnil);
2923 2923
2924 /* ERROR is used as a signaler for random errors for which nothing else is right */ 2924 /* ERROR is used as a signaler for random errors for which nothing else is
2925 right. */
2925 2926
2926 Fput (Qerror, Qerror_conditions, 2927 Fput (Qerror, Qerror_conditions,
2927 error_tail); 2928 error_tail);
@@ -2958,8 +2959,7 @@ syms_of_data (void)
2958 Fput (Qcyclic_variable_indirection, Qerror_message, 2959 Fput (Qcyclic_variable_indirection, Qerror_message,
2959 make_pure_c_string ("Symbol's chain of variable indirections contains a loop")); 2960 make_pure_c_string ("Symbol's chain of variable indirections contains a loop"));
2960 2961
2961 Qcircular_list = intern_c_string ("circular-list"); 2962 DEFSYM (Qcircular_list, "circular-list");
2962 staticpro (&Qcircular_list);
2963 Fput (Qcircular_list, Qerror_conditions, 2963 Fput (Qcircular_list, Qerror_conditions,
2964 pure_cons (Qcircular_list, error_tail)); 2964 pure_cons (Qcircular_list, error_tail));
2965 Fput (Qcircular_list, Qerror_message, 2965 Fput (Qcircular_list, Qerror_message,
@@ -3026,11 +3026,11 @@ syms_of_data (void)
3026 Fput (Qtext_read_only, Qerror_message, 3026 Fput (Qtext_read_only, Qerror_message,
3027 make_pure_c_string ("Text is read-only")); 3027 make_pure_c_string ("Text is read-only"));
3028 3028
3029 Qrange_error = intern_c_string ("range-error"); 3029 DEFSYM (Qrange_error, "range-error");
3030 Qdomain_error = intern_c_string ("domain-error"); 3030 DEFSYM (Qdomain_error, "domain-error");
3031 Qsingularity_error = intern_c_string ("singularity-error"); 3031 DEFSYM (Qsingularity_error, "singularity-error");
3032 Qoverflow_error = intern_c_string ("overflow-error"); 3032 DEFSYM (Qoverflow_error, "overflow-error");
3033 Qunderflow_error = intern_c_string ("underflow-error"); 3033 DEFSYM (Qunderflow_error, "underflow-error");
3034 3034
3035 Fput (Qdomain_error, Qerror_conditions, 3035 Fput (Qdomain_error, Qerror_conditions,
3036 pure_cons (Qdomain_error, arith_tail)); 3036 pure_cons (Qdomain_error, arith_tail));
@@ -3057,93 +3057,29 @@ syms_of_data (void)
3057 Fput (Qunderflow_error, Qerror_message, 3057 Fput (Qunderflow_error, Qerror_message,
3058 make_pure_c_string ("Arithmetic underflow error")); 3058 make_pure_c_string ("Arithmetic underflow error"));
3059 3059
3060 staticpro (&Qrange_error);
3061 staticpro (&Qdomain_error);
3062 staticpro (&Qsingularity_error);
3063 staticpro (&Qoverflow_error);
3064 staticpro (&Qunderflow_error);
3065
3066 staticpro (&Qnil); 3060 staticpro (&Qnil);
3067 staticpro (&Qt); 3061 staticpro (&Qt);
3068 staticpro (&Qquote);
3069 staticpro (&Qlambda);
3070 staticpro (&Qsubr);
3071 staticpro (&Qunbound); 3062 staticpro (&Qunbound);
3072 staticpro (&Qerror_conditions);
3073 staticpro (&Qerror_message);
3074 staticpro (&Qtop_level);
3075
3076 staticpro (&Qerror);
3077 staticpro (&Qquit);
3078 staticpro (&Qwrong_type_argument);
3079 staticpro (&Qargs_out_of_range);
3080 staticpro (&Qvoid_function);
3081 staticpro (&Qcyclic_function_indirection);
3082 staticpro (&Qcyclic_variable_indirection);
3083 staticpro (&Qvoid_variable);
3084 staticpro (&Qsetting_constant);
3085 staticpro (&Qinvalid_read_syntax);
3086 staticpro (&Qwrong_number_of_arguments);
3087 staticpro (&Qinvalid_function);
3088 staticpro (&Qno_catch);
3089 staticpro (&Qend_of_file);
3090 staticpro (&Qarith_error);
3091 staticpro (&Qbeginning_of_buffer);
3092 staticpro (&Qend_of_buffer);
3093 staticpro (&Qbuffer_read_only);
3094 staticpro (&Qtext_read_only);
3095 staticpro (&Qmark_inactive);
3096
3097 staticpro (&Qlistp);
3098 staticpro (&Qconsp);
3099 staticpro (&Qsymbolp);
3100 staticpro (&Qkeywordp);
3101 staticpro (&Qintegerp);
3102 staticpro (&Qnatnump);
3103 staticpro (&Qwholenump);
3104 staticpro (&Qstringp);
3105 staticpro (&Qarrayp);
3106 staticpro (&Qsequencep);
3107 staticpro (&Qbufferp);
3108 staticpro (&Qvectorp);
3109 staticpro (&Qchar_or_string_p);
3110 staticpro (&Qmarkerp);
3111 staticpro (&Qbuffer_or_string_p);
3112 staticpro (&Qinteger_or_marker_p);
3113 staticpro (&Qfloatp);
3114 staticpro (&Qnumberp);
3115 staticpro (&Qnumber_or_marker_p);
3116 staticpro (&Qchar_table_p);
3117 staticpro (&Qvector_or_char_table_p);
3118 staticpro (&Qsubrp);
3119 staticpro (&Qmany);
3120 staticpro (&Qunevalled);
3121
3122 staticpro (&Qboundp);
3123 staticpro (&Qfboundp);
3124 staticpro (&Qcdr);
3125 staticpro (&Qad_advice_info);
3126 staticpro (&Qad_activate_internal);
3127 3063
3128 /* Types that type-of returns. */ 3064 /* Types that type-of returns. */
3129 Qinteger = intern_c_string ("integer"); 3065 DEFSYM (Qinteger, "integer");
3130 Qsymbol = intern_c_string ("symbol"); 3066 DEFSYM (Qsymbol, "symbol");
3131 Qstring = intern_c_string ("string"); 3067 DEFSYM (Qstring, "string");
3132 Qcons = intern_c_string ("cons"); 3068 DEFSYM (Qcons, "cons");
3133 Qmarker = intern_c_string ("marker"); 3069 DEFSYM (Qmarker, "marker");
3134 Qoverlay = intern_c_string ("overlay"); 3070 DEFSYM (Qoverlay, "overlay");
3135 Qfloat = intern_c_string ("float"); 3071 DEFSYM (Qfloat, "float");
3136 Qwindow_configuration = intern_c_string ("window-configuration"); 3072 DEFSYM (Qwindow_configuration, "window-configuration");
3137 Qprocess = intern_c_string ("process"); 3073 DEFSYM (Qprocess, "process");
3138 Qwindow = intern_c_string ("window"); 3074 DEFSYM (Qwindow, "window");
3139 /* Qsubr = intern_c_string ("subr"); */ 3075 /* DEFSYM (Qsubr, "subr"); */
3140 Qcompiled_function = intern_c_string ("compiled-function"); 3076 DEFSYM (Qcompiled_function, "compiled-function");
3141 Qbuffer = intern_c_string ("buffer"); 3077 DEFSYM (Qbuffer, "buffer");
3142 Qframe = intern_c_string ("frame"); 3078 DEFSYM (Qframe, "frame");
3143 Qvector = intern_c_string ("vector"); 3079 DEFSYM (Qvector, "vector");
3144 Qchar_table = intern_c_string ("char-table"); 3080 DEFSYM (Qchar_table, "char-table");
3145 Qbool_vector = intern_c_string ("bool-vector"); 3081 DEFSYM (Qbool_vector, "bool-vector");
3146 Qhash_table = intern_c_string ("hash-table"); 3082 DEFSYM (Qhash_table, "hash-table");
3147 3083
3148 DEFSYM (Qfont_spec, "font-spec"); 3084 DEFSYM (Qfont_spec, "font-spec");
3149 DEFSYM (Qfont_entity, "font-entity"); 3085 DEFSYM (Qfont_entity, "font-entity");
@@ -3151,25 +3087,6 @@ syms_of_data (void)
3151 3087
3152 DEFSYM (Qinteractive_form, "interactive-form"); 3088 DEFSYM (Qinteractive_form, "interactive-form");
3153 3089
3154 staticpro (&Qinteger);
3155 staticpro (&Qsymbol);
3156 staticpro (&Qstring);
3157 staticpro (&Qcons);
3158 staticpro (&Qmarker);
3159 staticpro (&Qoverlay);
3160 staticpro (&Qfloat);
3161 staticpro (&Qwindow_configuration);
3162 staticpro (&Qprocess);
3163 staticpro (&Qwindow);
3164 /* staticpro (&Qsubr); */
3165 staticpro (&Qcompiled_function);
3166 staticpro (&Qbuffer);
3167 staticpro (&Qframe);
3168 staticpro (&Qvector);
3169 staticpro (&Qchar_table);
3170 staticpro (&Qbool_vector);
3171 staticpro (&Qhash_table);
3172
3173 defsubr (&Sindirect_variable); 3090 defsubr (&Sindirect_variable);
3174 defsubr (&Sinteractive_form); 3091 defsubr (&Sinteractive_form);
3175 defsubr (&Seq); 3092 defsubr (&Seq);
diff --git a/src/eval.c b/src/eval.c
index 6b4182cb319..f8bc0a9f6aa 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -88,7 +88,7 @@ static Lisp_Object Qdebug_on_error;
88static Lisp_Object Qdeclare; 88static Lisp_Object Qdeclare;
89Lisp_Object Qinternal_interpreter_environment, Qclosure; 89Lisp_Object Qinternal_interpreter_environment, Qclosure;
90 90
91Lisp_Object Qdebug; 91static Lisp_Object Qdebug;
92 92
93/* This holds either the symbol `run-hooks' or nil. 93/* This holds either the symbol `run-hooks' or nil.
94 It is nil at an early stage of startup, and when Emacs 94 It is nil at an early stage of startup, and when Emacs
diff --git a/src/lisp.h b/src/lisp.h
index 32d6b44d76a..8a504e8eb86 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -2836,7 +2836,7 @@ extern void syms_of_lread (void);
2836 2836
2837/* Defined in eval.c. */ 2837/* Defined in eval.c. */
2838extern Lisp_Object Qautoload, Qexit, Qinteractive, Qcommandp, Qdefun, Qmacro; 2838extern Lisp_Object Qautoload, Qexit, Qinteractive, Qcommandp, Qdefun, Qmacro;
2839extern Lisp_Object Qinhibit_quit, Qclosure, Qdebug; 2839extern Lisp_Object Qinhibit_quit, Qclosure;
2840extern Lisp_Object Qand_rest; 2840extern Lisp_Object Qand_rest;
2841extern Lisp_Object Vautoload_queue; 2841extern Lisp_Object Vautoload_queue;
2842extern Lisp_Object Vsignaling_function; 2842extern Lisp_Object Vsignaling_function;
diff --git a/src/minibuf.c b/src/minibuf.c
index 3f8bd835211..4658b05e91d 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -43,7 +43,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
43 43
44Lisp_Object Vminibuffer_list; 44Lisp_Object Vminibuffer_list;
45 45
46/* Data to remember during recursive minibuffer invocations */ 46/* Data to remember during recursive minibuffer invocations. */
47 47
48static Lisp_Object minibuf_save_list; 48static Lisp_Object minibuf_save_list;
49 49
@@ -55,7 +55,7 @@ int minibuf_level;
55 55
56static Lisp_Object Qhistory_length; 56static Lisp_Object Qhistory_length;
57 57
58/* Fread_minibuffer leaves the input here as a string. */ 58/* Fread_minibuffer leaves the input here as a string. */
59 59
60Lisp_Object last_minibuf_string; 60Lisp_Object last_minibuf_string;
61 61
@@ -588,7 +588,7 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt,
588 /* Empty out the minibuffers of all frames other than the one 588 /* Empty out the minibuffers of all frames other than the one
589 where we are going to display one now. 589 where we are going to display one now.
590 Set them to point to ` *Minibuf-0*', which is always empty. */ 590 Set them to point to ` *Minibuf-0*', which is always empty. */
591 empty_minibuf = Fget_buffer (build_string (" *Minibuf-0*")); 591 empty_minibuf = get_minibuffer (0);
592 592
593 FOR_EACH_FRAME (dummy, frame) 593 FOR_EACH_FRAME (dummy, frame)
594 { 594 {
@@ -1137,8 +1137,8 @@ function, instead of the usual behavior. */)
1137 } 1137 }
1138 1138
1139 result = Fcompleting_read (prompt, intern ("internal-complete-buffer"), 1139 result = Fcompleting_read (prompt, intern ("internal-complete-buffer"),
1140 Qnil, require_match, Qnil, Qbuffer_name_history, 1140 Qnil, require_match, Qnil,
1141 def, Qnil); 1141 Qbuffer_name_history, def, Qnil);
1142 } 1142 }
1143 else 1143 else
1144 { 1144 {
@@ -1878,6 +1878,9 @@ the values STRING, PREDICATE and `lambda'. */)
1878 return Qt; 1878 return Qt;
1879} 1879}
1880 1880
1881Lisp_Object Qmetadata;
1882extern Lisp_Object Qbuffer;
1883
1881DEFUN ("internal-complete-buffer", Finternal_complete_buffer, Sinternal_complete_buffer, 3, 3, 0, 1884DEFUN ("internal-complete-buffer", Finternal_complete_buffer, Sinternal_complete_buffer, 3, 3, 0,
1882 doc: /* Perform completion on buffer names. 1885 doc: /* Perform completion on buffer names.
1883If the argument FLAG is nil, invoke `try-completion', if it's t, invoke 1886If the argument FLAG is nil, invoke `try-completion', if it's t, invoke
@@ -1912,8 +1915,12 @@ The arguments STRING and PREDICATE are as in `try-completion',
1912 return res; 1915 return res;
1913 } 1916 }
1914 } 1917 }
1915 else /* assume `lambda' */ 1918 else if (EQ (flag, Qlambda))
1916 return Ftest_completion (string, Vbuffer_alist, predicate); 1919 return Ftest_completion (string, Vbuffer_alist, predicate);
1920 else if (EQ (flag, Qmetadata))
1921 return Fcons (Qmetadata, Fcons (Fcons (Qcategory, Qbuffer), Qnil));
1922 else
1923 return Qnil;
1917} 1924}
1918 1925
1919/* Like assoc but assumes KEY is a string, and ignores case if appropriate. */ 1926/* Like assoc but assumes KEY is a string, and ignores case if appropriate. */
@@ -1989,66 +1996,38 @@ syms_of_minibuf (void)
1989 minibuf_save_list = Qnil; 1996 minibuf_save_list = Qnil;
1990 staticpro (&minibuf_save_list); 1997 staticpro (&minibuf_save_list);
1991 1998
1992 Qcompleting_read_default = intern_c_string ("completing-read-default"); 1999 DEFSYM (Qcompleting_read_default, "completing-read-default");
1993 staticpro (&Qcompleting_read_default); 2000 DEFSYM (Qcompletion_ignore_case, "completion-ignore-case");
1994 2001 DEFSYM (Qread_file_name_internal, "read-file-name-internal");
1995 Qcompletion_ignore_case = intern_c_string ("completion-ignore-case"); 2002 DEFSYM (Qminibuffer_default, "minibuffer-default");
1996 staticpro (&Qcompletion_ignore_case);
1997
1998 Qread_file_name_internal = intern_c_string ("read-file-name-internal");
1999 staticpro (&Qread_file_name_internal);
2000
2001 Qminibuffer_default = intern_c_string ("minibuffer-default");
2002 staticpro (&Qminibuffer_default);
2003 Fset (Qminibuffer_default, Qnil); 2003 Fset (Qminibuffer_default, Qnil);
2004 2004
2005 Qminibuffer_completion_table = intern_c_string ("minibuffer-completion-table"); 2005 DEFSYM (Qminibuffer_completion_table, "minibuffer-completion-table");
2006 staticpro (&Qminibuffer_completion_table); 2006 DEFSYM (Qminibuffer_completion_confirm, "minibuffer-completion-confirm");
2007 2007 DEFSYM (Qminibuffer_completion_predicate, "minibuffer-completion-predicate");
2008 Qminibuffer_completion_confirm = intern_c_string ("minibuffer-completion-confirm");
2009 staticpro (&Qminibuffer_completion_confirm);
2010
2011 Qminibuffer_completion_predicate = intern_c_string ("minibuffer-completion-predicate");
2012 staticpro (&Qminibuffer_completion_predicate);
2013 2008
2014 staticpro (&last_minibuf_string); 2009 staticpro (&last_minibuf_string);
2015 last_minibuf_string = Qnil; 2010 last_minibuf_string = Qnil;
2016 2011
2017 Quser_variable_p = intern_c_string ("user-variable-p"); 2012 DEFSYM (Quser_variable_p, "user-variable-p");
2018 staticpro (&Quser_variable_p); 2013 DEFSYM (Qminibuffer_history, "minibuffer-history");
2019 2014 DEFSYM (Qbuffer_name_history, "buffer-name-history");
2020 Qminibuffer_history = intern_c_string ("minibuffer-history");
2021 staticpro (&Qminibuffer_history);
2022
2023 Qbuffer_name_history = intern_c_string ("buffer-name-history");
2024 staticpro (&Qbuffer_name_history);
2025 Fset (Qbuffer_name_history, Qnil); 2015 Fset (Qbuffer_name_history, Qnil);
2026 2016
2027 Qminibuffer_setup_hook = intern_c_string ("minibuffer-setup-hook"); 2017 DEFSYM (Qminibuffer_setup_hook, "minibuffer-setup-hook");
2028 staticpro (&Qminibuffer_setup_hook); 2018 DEFSYM (Qminibuffer_exit_hook, "minibuffer-exit-hook");
2029 2019 DEFSYM (Qhistory_length, "history-length");
2030 Qminibuffer_exit_hook = intern_c_string ("minibuffer-exit-hook"); 2020 DEFSYM (Qcurrent_input_method, "current-input-method");
2031 staticpro (&Qminibuffer_exit_hook); 2021 DEFSYM (Qactivate_input_method, "activate-input-method");
2032 2022 DEFSYM (Qcase_fold_search, "case-fold-search");
2033 Qhistory_length = intern_c_string ("history-length"); 2023 DEFSYM (Qmetadata, "metadata");
2034 staticpro (&Qhistory_length);
2035
2036 Qcurrent_input_method = intern_c_string ("current-input-method");
2037 staticpro (&Qcurrent_input_method);
2038
2039 Qactivate_input_method = intern_c_string ("activate-input-method");
2040 staticpro (&Qactivate_input_method);
2041
2042 Qcase_fold_search = intern_c_string ("case-fold-search");
2043 staticpro (&Qcase_fold_search);
2044 2024
2045 DEFVAR_LISP ("read-expression-history", Vread_expression_history, 2025 DEFVAR_LISP ("read-expression-history", Vread_expression_history,
2046 doc: /* A history list for arguments that are Lisp expressions to evaluate. 2026 doc: /* A history list for arguments that are Lisp expressions to evaluate.
2047For example, `eval-expression' uses this. */); 2027For example, `eval-expression' uses this. */);
2048 Vread_expression_history = Qnil; 2028 Vread_expression_history = Qnil;
2049 2029
2050 Qread_expression_history = intern_c_string ("read-expression-history"); 2030 DEFSYM (Qread_expression_history, "read-expression-history");
2051 staticpro (&Qread_expression_history);
2052 2031
2053 DEFVAR_LISP ("read-buffer-function", Vread_buffer_function, 2032 DEFVAR_LISP ("read-buffer-function", Vread_buffer_function,
2054 doc: /* If this is non-nil, `read-buffer' does its work by calling this function. 2033 doc: /* If this is non-nil, `read-buffer' does its work by calling this function.