Merge from trunk.
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 31 May 2011 05:15:34 +0000 (22:15 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 31 May 2011 05:15:34 +0000 (22:15 -0700)
27 files changed:
autogen/Makefile.in
autogen/configure
etc/NEWS
leim/ChangeLog
leim/quail/ipa-praat.el [new file with mode: 0644]
lisp/ChangeLog
lisp/emacs-lisp/bytecomp.el
lisp/gnus/ChangeLog
lisp/gnus/gnus-group.el
lisp/gnus/gnus-sum.el
lisp/gnus/message.el
lisp/gnus/mml1991.el
lisp/gnus/nnimap.el
lisp/gnus/nnvirtual.el
lisp/gnus/pop3.el
lisp/icomplete.el
lisp/mail/smtpmail.el
lisp/minibuffer.el
lisp/net/rcirc.el
lisp/simple.el
src/ChangeLog
src/alloc.c
src/ccl.c
src/data.c
src/eval.c
src/lisp.h
src/minibuf.c

index a2d8370..b117c64 100644 (file)
@@ -24,7 +24,7 @@
 # the same distribution terms as the rest of that program.
 #
 # Generated by gnulib-tool.
-# 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
+# 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
 
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
@@ -1070,7 +1070,8 @@ c++defs.h: $(top_srcdir)/./c++defs.h
 getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H)
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-         sed -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \
              -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -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
 @GL_GENERATE_STDARG_H_TRUE@stdarg.h: stdarg.in.h $(top_builddir)/config.status
 @GL_GENERATE_STDARG_H_TRUE@    $(AM_V_GEN)rm -f $@-t $@ && \
 @GL_GENERATE_STDARG_H_TRUE@    { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
-@GL_GENERATE_STDARG_H_TRUE@      sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+@GL_GENERATE_STDARG_H_TRUE@      sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+@GL_GENERATE_STDARG_H_TRUE@          -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
 @GL_GENERATE_STDARG_H_TRUE@          -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
 @GL_GENERATE_STDARG_H_TRUE@          -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
 @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
 @GL_GENERATE_STDDEF_H_TRUE@stddef.h: stddef.in.h $(top_builddir)/config.status
 @GL_GENERATE_STDDEF_H_TRUE@    $(AM_V_GEN)rm -f $@-t $@ && \
 @GL_GENERATE_STDDEF_H_TRUE@    { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
-@GL_GENERATE_STDDEF_H_TRUE@      sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+@GL_GENERATE_STDDEF_H_TRUE@      sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+@GL_GENERATE_STDDEF_H_TRUE@          -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
 @GL_GENERATE_STDDEF_H_TRUE@          -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
 @GL_GENERATE_STDDEF_H_TRUE@          -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
 @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
 @GL_GENERATE_STDINT_H_TRUE@stdint.h: stdint.in.h $(top_builddir)/config.status
 @GL_GENERATE_STDINT_H_TRUE@    $(AM_V_GEN)rm -f $@-t $@ && \
 @GL_GENERATE_STDINT_H_TRUE@    { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-@GL_GENERATE_STDINT_H_TRUE@      sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
+@GL_GENERATE_STDINT_H_TRUE@      sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+@GL_GENERATE_STDINT_H_TRUE@          -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
 @GL_GENERATE_STDINT_H_TRUE@          -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
 @GL_GENERATE_STDINT_H_TRUE@          -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
 @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
 stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
-         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -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)
 stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
-         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -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
        $(AM_V_at)$(MKDIR_P) sys
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -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
 time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
-         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -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) $(
 unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-         sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
              -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
index 23b0b10..5345663 100755 (executable)
 # Persuade glibc <stdlib.h> to declare getloadavg().
 
 
-# Make sure getloadavg.c is where it belongs, at configure-time.
-test -f "$srcdir/$gl_source_base/getloadavg.c" ||
-  as_fn_error "$srcdir/$gl_source_base/getloadavg.c is missing" "$LINENO" 5
-
 gl_save_LIBS=$LIBS
 
 # getloadvg is present in libc on glibc >= 2.2, MacOS X, FreeBSD >= 2.0,
index dc1f25d..509b304 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -91,6 +91,10 @@ and pops down the *Completions* buffer accordingly.
 
 *** New completion style `substring'.
 
+*** Completion style can be set per-category `completion-category-overrides'.
+
+*** Completion of buffers now uses substring completion by default.
+
 *** `completing-read' can be customized using the new variable
 `completing-read-function'.
 
@@ -861,6 +865,14 @@ valid for completion-extra-properties.
 
 *** completion-annotate-function is obsolete.
 
+*** New `metadata' method for completion tables.  The metadata thus returned
+can specify various details of the data returned by `all-completions':
+- `category' is the kind of objects returned (e.g., `buffer', `file', ...),
+  used to select a style in completion-category-overrides.
+- `annotation-function' to add annotations in *Completions*.
+- `display-sort-function' to specify how to sort entries in *Completions*.
+- `cycle-sort-function' to specify how to sort entries when cycling.
+
 ** `glyphless-char-display' can now distinguish between graphical and
 text terminal display, via a char-table entry that is a cons cell.
 
index 98af78d..871455d 100644 (file)
@@ -1,3 +1,7 @@
+2011-05-30  Oliver Scholz  <epameinondas@gmx.de>
+
+       * quail/ipa-praat.el: New input method.
+
 2011-05-16  Eli Zaretskii  <eliz@gnu.org>
 
        * 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 (file)
index 0000000..25eb6d4
--- /dev/null
@@ -0,0 +1,346 @@
+;;; ipa-praat.el --- Inputting IPA characters with the conventions of Praat
+
+;; Copyright (C) 2011  Free Software Foundation, Inc.
+
+;; Author: Oliver Scholz <epameinondas@gmx.de>
+;; Keywords: multilingual, input method, IPA
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; This is a new input method for IPA characters and diacritics, which follows
+;; the conventions of Praat, a GPLed program for phonetical analysis.
+;; 
+;; This input method is much more complete than the current ipa.el.
+
+;;; Code:
+
+(require 'quail)
+
+(quail-define-package
+ "ipa-praat" "IPA" "IPAP" t
+ "International Phonetic Alphabet input method.
+This follows the input method of the phonetical analysis program
+Praat (http://www.fon.hum.uva.nl/praat/).
+
+
+* Vowels
+
+- Unrounded
+             | front | centr. | back
+-------------+-------+--------+------
+close        | i i   | ɨ \\i-  | ɯ \\mt
+close centr. | ɪ \\ic |        |
+close-mid    | e e   | ɘ \\e-  | ɤ \\rh
+             |       | ə \\sw  |
+open-mid     | ɛ \\ef | ɜ \\er  | ʌ \\vt
+             | æ \\ae | ɐ \\at  |
+open         | a a   |        | ɑ \\as
+
+
+
+- Rounded
+             | front | centr. | back
+-------------+-------+--------+-------
+close        | y y   | ʉ \\u-  | u u
+close centr. | ʏ \\yc |        | ʊ \\hs
+close-mid    | ø \\o/ | ɵ \\o-  | o o
+open-mid     | œ \\oe | ɞ \\kb  | ɔ \\ct
+open         | ɶ \\Oe |        | ɒ  \\ab
+
+
+
+For most of the codes, the first letter tells you the most
+similar letter of the English alphabet. The second letter can be
+t (turned), c (capital), s (script), r (reversed), - (barred or
+retracted), or / (slashed). One symbol (ɛ) is a phonetic version
+of a Greek letter. The codes for ə, ɤ, ʊ and ɞ are abbreviations
+for schwa, ram's horn, horseshoe, and kidney bean.
+
+
+* Consonants
+
+- Pulmonic
+
+           | plos. | nasal | fric. | approx. | trill | tap/flap | l. appr.
+-----------+-------+-------+-------+---------+-------+----------+---------
+bilabial   | p p   | m m   | ɸ \\ff |         |       |          |
+           | b b   |       | β \\bf | ʋ \\vs   | ʙ \\bc |          |
+labiodent. |       | ɱ \\mj | f f   |         |       |          |
+           |       |       | v v   |         |       |          |
+dental     |       |       | θ \\tf |         |       |          |
+           |       |       | ð \\dh |         |       |          |
+alveolar   | t t   | n n   | s s   |         |       | ɾ \\fh    |
+           | d d   |       | z z   | ɹ \\rt   | r r   |          | l l
+alv. lat.  |       |       | ɬ \\l- |         |       | ɺ \\rl    |
+           |       |       | ɮ \\lz | l l     |       |          | l l
+postalv.   |       |       | ʃ \\sh |         |       |          |
+           |       |       | ʒ \\zh |         |       |          |
+retroflex  | ʈ \\t. | ɳ \\n. | ʂ \\s. |         |       | ɽ \\f.    |
+           | ɖ \\d. |       | ʐ \\z. | ɻ \\r.   |       |          | ɭ \\l.
+alv.-pala. |       |       | ɕ \\cc |         |       |          |
+           |       |       | ʑ \\zc |         |       |          |
+palatal    | c c   | ɲ \\nj | ç \\c, |         |       |          |
+           | ɟ \\j. |       | ʝ \\jc | j j     |       |          | ʎ \\yt
+lab-pal.   |       |       |       |         |       |          |
+           |       |       |       | ɥ \\ht   |       |          |
+lab.-vela. |       |       | ʍ \\wt |         |       |          |
+           |       |       |       | w w     |       |          |
+velar      | k k   | ŋ \\ng | x x   |         |       |          | ʟ \\lc
+           | ɡ \\gs |       | ɣ \\gf | ɰ \\ml   |       |          |
+uvular     | q q   | ɴ \\nc | χ \\cf |         |       |          |
+           | ɢ \\gc |       | ʁ \\ri |         | ʀ \\rc |          |
+pharyngeal |       |       | ħ \\h- |         |       |          |
+           |       |       | ʕ \\9e |         |       |          |
+epiglottal | ʡ \\?- |       | ʜ \\hc |         |       |          |
+           |       |       | ʢ \\9- |         |       |          |
+glottal    | ʔ     |       | h h   |         |       |          |
+           |       |       | ɦ \\h^ |         |       |          |
+
+- Nonpulmonic
+
+          | implosive | click
+----------+-----------+------
+bilabial  | ɓ \\b^     | ʘ \\O.
+dental    |           | ǀ \\|1
+alveolar  | ɗ \\d^     |
+alv.-lat. |           | ǁ \\|2
+postalv.  |           | ǂ \\|-
+retrofl.  |           | ! !
+palatal   | ʄ \\j^     |
+velar     | ɠ \\g^     |
+uvular    | ʛ \\G^     |
+
+For most of the codes, the first letter tells you the most
+similar letter of the English alphabet. The second letter can be
+t (turned), c (capital or curled), s (script), - (barred),
+l (with leg), i (inverted), or j (left tail). Some phonetic
+symbols are similar to Greek letters but have special
+phonetic (f) versions with serifs (ɸ, β, ɣ) or are otherwise
+slightly different (θ, χ). The codes for ŋ (engma), ð (eth),
+ʃ (esh), and ʒ (yogh) are traditional alternative spellings. The
+retroflexes have a period in the second place, because an
+alternative traditional spelling is to write a dot under
+them. The code for ɾ is an abbreviation for fishhook.
+
+
+* Diacritics
+
+- In line
+
+input | example | description
+------+---------+---------------------
+\\:f   | ː       | phonetic length sign
+\\'1   | ˈ       | primary stress
+\\'2   | ˌ       | secondary stress
+\\cn   | t̚       | unreleased plosive
+\\rh   | ɜ˞      | rhotacized vowel
+
+- Understrikes
+
+input | example | description
+------+---------+--------------------------------
+\\|v   | n̩       | syllabic consonant
+\\0v   | b̥       | voiceless
+\\Tv   | o̞       | lowered
+\\T^   | o̝       | raised
+\\T(   | o̘       | advanced tongue root
+\\T)   | o̙       | retracted tongue root
+\\-v   | e̱       | backed
+\\+v   | o̟       | fronted
+\\:v   | o̤       | breathy voice
+\\~v   | o̰       | creaky voice
+\\Nv   | d̪       | dental (as opposed to alveolar)
+\\Uv   | d̺       | apical
+\\Dv   | d̻       | laminal
+\\nv   | u̯       | nonsyllabic
+\\e3v  | e̹       | slightly rounded
+\\cv   | u̜       | slightly unrounded
+
+- Overstrikes
+
+input | example | description
+------+---------+--------------------------------------------
+\\0^   | ɣ̊       | voiceless
+\\'^   |         | high tone
+\\`^   |         | low tone
+\\-^   |         | mid tone
+\\~^   |         | nasalized
+\\v^   |         | rising tone
+\\^^   |         | falling tone
+\\:^   |         | centralized
+\\N^   |         | short
+\\li   | k͡p      | simultaneous articulation or single segment
+"
+ nil t nil nil nil nil nil nil nil nil t)
+
+(quail-define-rules
+ ;; plosives
+ ("\\t." ?ʈ) ; retroflex
+ ("\\d." ?ɖ) ; voiced retroflex
+ ("\\j-" ?ɟ) ; voiced palatal
+ ("\\gs" ?ɡ) ; voiced velar
+ ("\\gc" ?ɢ) ; voiced uvular
+ ("\\?-" ?ʡ) ; epiglottal
+ ("\\?g" ?ʔ) ; glottal
+ ;; nasals
+ ("\\mj" ?ɱ) ; labiodental
+ ("\\n." ?ɳ) ; retroflex
+ ("\\nj" ?ɲ) ; palatal
+ ("\\ng" ?ŋ) ; velar
+ ("\\nc" ?ɴ) ; uvular
+
+ ;; fricatives
+ ("\\ff" ?ɸ) ; bilabial
+ ("\\bf" ?β) ; voiced bilabial
+ ("\\tf" ?θ) ; labiodental
+ ("\\dh" ?ð) ; voiced labiodental
+ ("\\sh" ?ʃ) ; postalveolar
+ ("\\l-" ?ɬ) ; alv. lateral
+ ("\\lz" ?ɮ) ; voiced alv. lateral
+ ("\\zh" ?ʒ) ; voiced postalveolar
+ ("\\s." ?ʂ) ; retroflex
+ ("\\z." ?ʐ) ; voiced retroflex
+ ("\\cc" ?ɕ) ; alveolo-palatal
+ ("\\zc" ?ʑ) ; voiced alveolo-palatal
+ ("\\c," ?ç) ; palatal
+ ("\\jc" ?ʝ) ; voiced palatal
+ ("\\wt" ?ʍ) ; labial-velar
+ ("\\gf" ?ɣ) ; voiced velar
+ ("\\cf" ?χ) ; uvular
+ ("\\ri" ?ʁ) ; voiced uvular
+ ("\\h-" ?ħ) ; pharyngeal
+ ("\\9e" ?ʕ) ; voiced pharyngeal
+ ("\\hc" ?ʜ) ; epiglottal
+ ("\\9-" ?ʢ) ; voiced epiglottal
+ ("\\h^" ?ɦ) ; voiced glottal
+
+ ;; approximants
+ ("\\vs" ?ʋ) ; labiodental
+ ("\\rt" ?ɹ) ; alveolar
+ ("\\r." ?ɻ) ; retroflex
+ ("\\ht" ?ɥ) ; labial-palatal
+ ("\\ml" ?ɰ) ; velar
+ ;; trills
+ ("\\bc" ?ʙ) ; bilabial
+ ("\\rc" ?ʀ) ; uvular
+
+ ;; taps or flaps
+ ; ⱱ -- labiodental
+ ("\\fh" ?ɾ) ; alveolar
+ ("\\rl" ?ɺ) ; alv.-lateral
+ ("\\f." ?ɽ) ; retroflex
+ ;; lateral approx.
+ ("\\l." ?ɭ) ; retroflex
+ ("\\yt" ?ʎ) ; palatal
+ ("\\lc" ?ʟ) ; velar
+
+ ;; implosives
+ ("\\b^" ?ɓ) ; bilabial
+ ("\\d^" ?ɗ) ; alveolar
+ ("\\j^" ?ʄ) ; palatal
+ ("\\g^" ?ɠ) ; velar
+ ("\\G^" ?ʛ) ; uvular
+
+ ;; clicks
+ ("\\O." ?ʘ) ; bilabial
+ ("\\|1" ?ǀ) ; dental
+ ("\\|2" ?ǁ) ; alv. lateral
+ ("\\|-" ?ǂ) ; postalveolar
+
+ ;; other
+ ("\\l~" ?ɫ) ; velarized l
+ ("\\hj" ?ɧ) ; post-alveolar & velar fricative
+
+ ;; vowels
+ ("\\i-" ?ɨ)
+ ("\\u-" ?ʉ)
+ ("\\mt" ?ɯ)
+
+ ("\\ic" ?ɪ)
+ ("\\yc" ?ʏ)
+ ("\\hs" ?ʊ)
+
+ ("\\o/" ?ø)
+ ("\\e-" ?ɘ)
+ ("\\o-" ?ɵ)
+ ("\\rh" ?ɤ)
+
+ ("\\sw" ?ə)
+
+ ("\\ef" ?ɛ)
+ ("\\oe" ?œ)
+ ("\\er" ?ɜ)
+ ("\\kb" ?ɞ)
+ ("\\vt" ?ʌ)
+ ("\\ct" ?ɔ)
+
+ ("\\ae" ?æ)
+ ("\\at" ?ɐ)
+
+ ("\\Oe" ?ɶ)
+ ("\\as" ?ɑ)
+ ("\\ab" ?ɒ)
+
+ ("\\sr" ?ɚ)
+
+ ;; diacritics
+ ("\\:f" ?ː) ; phonetic length sign
+ ("\\'1" ?ˈ) ; primary stress
+ ("\\'2" ?ˌ) ; secondary stress
+ ("\\cn" #x031A) ; t̚ unreleased plosive
+ ("\\rh" #x02DE) ; ɜ˞ rhotacized vowel
+
+ ("\\|v" #x0329) ; n̩ syllabic consonant
+ ("\\0v" #x0325) ; b̥ voiceless
+ ("\\Tv" #x031E) ; o̞ lowered
+ ("\\T^" #x031D ) ; o̝ raised
+ ("\\T(" #x0318) ;  o̘ advanced tongue root
+ ("\\T)" #x0319) ; o̙ retracted tongue root
+ ("\\-v" #x0331) ; e̱ backed
+ ("\\+v" #x031F) ; o̟ fronted
+ ("\\:v" #x0324) ; o̤ breathy voice
+ ("\\~v" #x0330) ; o̰ creaky voice
+ ("\\Nv" #x032A) ; d̪ dental (as opposed to alveolar)
+ ("\\Uv" #x033A) ; d̺ apical
+ ("\\Dv" #x033B) ; d̻ laminal
+ ("\\nv" #x032F) ; u̯ nonsyllabic
+ ("\\e3v" #x0339) ; e̹ slightly rounded
+ ("\\cv" #x031C) ; u̜ slightly unrounded
+
+ ("\\0^" #x030A) ; ɣ̊ voiceless
+ ("\\'^" #x0301) ; high tone
+ ("\\`^" #x0300) ; low tone
+ ("\\-^" #x0304) ; mid tone
+ ("\\~^" #x0303) ; nasalized
+ ("\\v^" #x030C) ; rising tone
+ ("\\^^" #x0302) ; falling tone
+ ("\\:^" #x0308) ; centralized
+ ("\\N^" #x0306) ; short
+ ("\\li" #x0361) ; k͡p simultaneous articulation or single segment
+ )
+
+;; Local Variables:
+;; coding: utf-8
+;; End:
+
+;;; ipa-praat.el ends here
index 6d4752e..07f700f 100644 (file)
@@ -1,3 +1,35 @@
+2011-05-31  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * minibuffer.el: Add metadata method to completion tables.
+       (completion-category-overrides): New defcustom.
+       (completion-metadata, completion--field-metadata)
+       (completion-metadata-get, completion--styles)
+       (completion--cycle-threshold): New functions.
+       (completion-try-completion, completion-all-completions):
+       Add `metadata' argument to choose completion-styles.
+       (completion--do-completion): Use metadata to choose cycling.
+       (completion-all-sorted-completions): Use metadata for sorting.
+       Remove :completion-cycle-penalty which is not needed any more.
+       (completion--try-word-completion): Add `metadata' argument.
+       (minibuffer-completion-help): Check metadata for annotation function
+       and sorting.
+       (completion-file-name-table): Return `category' metadata.
+       (minibuffer-completing-file-name): Make obsolete.
+       * simple.el (minibuffer-completing-symbol): Make obsolete.
+       * icomplete.el (icomplete-completions): Pass new `metadata' param to
+       completion-try-completion.
+
+2011-05-30  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * mail/smtpmail.el (smtpmail-send-data): Add progress reporter.
+
+2011-05-30  Leo Liu  <sdl.web@gmail.com>
+
+       * net/rcirc.el (rcirc-debug-buffer): Use visible buffer name.
+       (rcirc-print): Decode all incoming messages (bug#8744).
+       (rcirc-decode-coding-system): Allow value nil for automatic coding
+       system detection.
+
 2011-05-29  Chong Yidong  <cyd@stupidchicken.com>
 
        * image.el (image-animate-max-time): Allow nil and t values.
index f0f5912..0dae674 100644 (file)
@@ -4155,6 +4155,8 @@ binding slots have been popped."
            (if (eq fun 'defconst)
                ;; `defconst' sets `var' unconditionally.
                (let ((tmp (make-symbol "defconst-tmp-var")))
+                  ;; Quote with `quote' to prevent byte-compiling the body,
+                  ;; which would lead to an inf-loop.
                  `(funcall '(lambda (,tmp) (defconst ,var ,tmp))
                            ,value))
              ;; `defvar' sets `var' only when unbound.
index 4aba3a2..dcbc647 100644 (file)
@@ -1,3 +1,34 @@
+2011-05-30  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * gnus-group.el (gnus-group-mark-article-read): It's possible that we
+       want to have `gnus-newsgroup-unselected' kept sorted.  If this isn't
+       done, then unselected articles may be marked as read.
+
+       * pop3.el (pop3-open-server): Erase the buffer after the greeting,
+       since not doing this seems to lead to a race condition in pop3-logon.
+
+       * nnvirtual.el (nnvirtual-request-article): Bind `gnus-command-method'
+       so that the call chain it correct when we call "upwards".
+
+       * gnus-sum.el (gnus-select-newsgroup): Auto-expiry doesn't make sense
+       in read-only groups.
+
+       * gnus-group.el (gnus-group-mark-article-read): Ditto.
+
+       * message.el (message-cite-reply-position): Doc string fix.
+
+       * nnimap.el (nnimap-transform-headers): Simplify regexp to hopefully
+       avoid regexp overflow.
+       (nnimap-transform-split-mail): Ditto.
+
+       * pop3.el (pop3-retr): Error out if the server closes the connection.
+
+2011-05-30  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * mml1991.el (mml1991-mailcrypt-encrypt): Remove use of ill-designed
+       mm-with-unibyte-current-buffer.  The buffer should not contain any
+       multibyte chars anyway at this stage.
+
 2011-05-29  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * shr.el (shr-urlify): Use shr-add-font to make underlines be less ugly
index 65192bf..4c474b0 100644 (file)
@@ -3567,7 +3567,8 @@ or nil if no action could be taken."
        (gnus-add-marked-articles group 'tick nil nil 'force)
        (gnus-add-marked-articles group 'dormant nil nil 'force))
       ;; Do auto-expirable marks if that's required.
-      (when (gnus-group-auto-expirable-p group)
+      (when (and (gnus-group-auto-expirable-p group)
+                (not (gnus-group-read-only-p group)))
         (gnus-range-map
         (lambda (article)
           (gnus-add-marked-articles group 'expire (list article))
@@ -4630,10 +4631,11 @@ This command may read the active file."
                  (push n gnus-newsgroup-unselected))
                (setq n (1+ n)))
              (setq gnus-newsgroup-unselected
-                   (nreverse gnus-newsgroup-unselected)))))
+                   (sort gnus-newsgroup-unselected '<)))))
       (gnus-activate-group group)
       (gnus-group-make-articles-read group (list article))
-      (when (gnus-group-auto-expirable-p group)
+      (when (and (gnus-group-auto-expirable-p group)
+                (not (gnus-group-read-only-p group)))
        (gnus-add-marked-articles
         group 'expire (list article))))))
 
index 3ec4437..2d75c35 100644 (file)
@@ -5715,7 +5715,8 @@ If SELECT-ARTICLES, only select those articles from GROUP."
       (gnus-summary-remove-list-identifiers)
       ;; Check whether auto-expire is to be done in this group.
       (setq gnus-newsgroup-auto-expire
-           (gnus-group-auto-expirable-p group))
+           (and (gnus-group-auto-expirable-p group)
+                (not (gnus-group-read-only-p group))))
       ;; Set up the article buffer now, if necessary.
       (unless (and gnus-single-article-buffer
                   (equal gnus-article-buffer "*Article*"))
index 4d08baa..58740c3 100644 (file)
@@ -1091,7 +1091,7 @@ Note: Many newsgroups frown upon nontraditional reply styles. You
 probably want to set this variable only for specific groups,
 e.g. using `gnus-posting-styles':
 
-  (eval (set (make-local-variable 'message-cite-reply-above) 'above))"
+  (eval (set (make-local-variable 'message-cite-reply-position) 'above))"
   :type '(choice (const :tag "Reply inline" 'traditional)
                 (const :tag "Reply above" 'above)
                 (const :tag "Reply below" 'below))
index 0ce74b1..a5d7788 100644 (file)
@@ -137,33 +137,32 @@ Whether the passphrase is cached at all is controlled by
     (while (looking-at "^Content[^ ]+:") (forward-line))
     (unless (bobp)
       (delete-region (point-min) (point)))
-    (mm-with-unibyte-current-buffer
-      (with-temp-buffer
-       (inline (mm-disable-multibyte))
-       (setq cipher (current-buffer))
-       (insert-buffer-substring text)
-       (unless (mc-encrypt-generic
-                (or
-                 (message-options-get 'message-recipients)
-                 (message-options-set 'message-recipients
-                                      (read-string "Recipients: ")))
-                nil
-                (point-min) (point-max)
-                (message-options-get 'message-sender)
-                'sign)
-         (unless (> (point-max) (point-min))
-           (pop-to-buffer result-buffer)
-           (error "Encrypt error")))
-       (goto-char (point-min))
-       (while (re-search-forward "\r+$" nil t)
-         (replace-match "" t t))
-       (set-buffer text)
-       (delete-region (point-min) (point-max))
-       ;;(insert "Content-Type: application/pgp-encrypted\n\n")
-       ;;(insert "Version: 1\n\n")
-       (insert "\n")
-       (insert-buffer-substring cipher)
-       (goto-char (point-max))))))
+    (with-temp-buffer
+      (inline (mm-disable-multibyte))
+      (setq cipher (current-buffer))
+      (insert-buffer-substring text)
+      (unless (mc-encrypt-generic
+               (or
+                (message-options-get 'message-recipients)
+                (message-options-set 'message-recipients
+                                     (read-string "Recipients: ")))
+               nil
+               (point-min) (point-max)
+               (message-options-get 'message-sender)
+               'sign)
+        (unless (> (point-max) (point-min))
+          (pop-to-buffer result-buffer)
+          (error "Encrypt error")))
+      (goto-char (point-min))
+      (while (re-search-forward "\r+$" nil t)
+        (replace-match "" t t))
+      (set-buffer text)
+      (delete-region (point-min) (point-max))
+      ;;(insert "Content-Type: application/pgp-encrypted\n\n")
+      ;;(insert "Version: 1\n\n")
+      (insert "\n")
+      (insert-buffer-substring cipher)
+      (goto-char (point-max)))))
 
 ;; pgg wrapper
 
index 6882ed6..dc8b38b 100644 (file)
@@ -190,7 +190,7 @@ textual parts.")
   (let (article bytes lines size string)
     (block nil
       (while (not (eobp))
-       (while (not (looking-at "^\\* [0-9]+ FETCH.*UID \\([0-9]+\\)"))
+       (while (not (looking-at "\\* [0-9]+ FETCH.+UID \\([0-9]+\\)"))
          (delete-region (point) (progn (forward-line 1) (point)))
          (when (eobp)
            (return)))
@@ -1904,7 +1904,7 @@ textual parts.")
   (let (article bytes)
     (block nil
       (while (not (eobp))
-       (while (not (looking-at "^\\* [0-9]+ FETCH.*UID \\([0-9]+\\)"))
+       (while (not (looking-at "\\* [0-9]+ FETCH.+UID \\([0-9]+\\)"))
          (delete-region (point) (progn (forward-line 1) (point)))
          (when (eobp)
            (return)))
index 0cc53ad..ea64c24 100644 (file)
@@ -194,10 +194,11 @@ component group will show up when you enter the virtual group.")
            (when buffer
              (set-buffer buffer))
            (let* ((gnus-override-method nil)
-                  (method (gnus-find-method-for-group
-                           nnvirtual-last-accessed-component-group)))
-             (funcall (gnus-get-function method 'request-article)
-                      article nil (nth 1 method) buffer)))))
+                  (gnus-command-method
+                   (gnus-find-method-for-group
+                    nnvirtual-last-accessed-component-group)))
+             (funcall (gnus-get-function gnus-command-method 'request-article)
+                      article nil (nth 1 gnus-command-method) buffer)))))
       ;; This is a fetch by number.
       (let* ((amap (nnvirtual-map-article article))
             (cgroup (car amap)))
index 6f12d3d..90e11b3 100644 (file)
@@ -319,6 +319,7 @@ Returns the process associated with the connection."
                (substring response (or (string-match "<" response) 0)
                           (+ 1 (or (string-match ">" response) -1)))))
        (pop3-set-process-query-on-exit-flag (car result) nil)
+       (erase-buffer)
        (car result)))))
 
 ;; Support functions
@@ -514,6 +515,8 @@ Otherwise, return the size of the message-id MSG"
   (let ((start pop3-read-point) end)
     (with-current-buffer (process-buffer process)
       (while (not (re-search-forward "^\\.\r\n" nil t))
+       (unless (memq (process-status process) '(open run))
+         (error "pop3 server closed the connection"))
        (pop3-accept-process-output process)
        (goto-char start))
       (setq pop3-read-point (point-marker))
index ab67fcf..5f36806 100644 (file)
@@ -287,6 +287,7 @@ matches exist.  \(Keybindings for uniquely matched commands
 are exhibited within the square braces.)"
 
   (let* ((non-essential t)
+         (md (completion--field-metadata (field-beginning)))
         (comps (completion-all-sorted-completions))
          (last (if (consp comps) (last comps)))
          (base-size (cdr last))
@@ -299,11 +300,11 @@ are exhibited within the square braces.)"
       (let* ((most-try
               (if (and base-size (> base-size 0))
                   (completion-try-completion
-                   name candidates predicate (length name))
+                   name candidates predicate (length name) md)
                 ;; If the `comps' are 0-based, the result should be
                 ;; the same with `comps'.
                 (completion-try-completion
-                 name comps nil (length name))))
+                 name comps nil (length name) md)))
             (most (if (consp most-try) (car most-try)
                      (if most-try (car comps) "")))
              ;; Compare name and most, so we can determine if name is
index 3eda350..bc1ca77 100644 (file)
@@ -943,15 +943,20 @@ The list is in preference order.")
   (process-send-string process "\r\n"))
 
 (defun smtpmail-send-data (process buffer)
-  (let ((data-continue t) sending-data)
+  (let ((data-continue t) sending-data
+        (pr (with-current-buffer buffer
+              (make-progress-reporter "Sending email"
+                                      (point-min) (point-max)))))
     (with-current-buffer buffer
       (goto-char (point-min)))
     (while data-continue
       (with-current-buffer buffer
+        (progress-reporter-update pr (point))
         (setq sending-data (buffer-substring (point-at-bol) (point-at-eol)))
        (end-of-line 2)
         (setq data-continue (not (eobp))))
-      (smtpmail-send-data-1 process sending-data))))
+      (smtpmail-send-data-1 process sending-data))
+    (progress-reporter-done pr)))
 
 (defun smtpmail-deduce-address-list (smtpmail-text-buffer header-start header-end)
   "Get address list suitable for smtp RCPT TO: <address>."
index 7af602c..0f96f79 100644 (file)
 ;; - for M-x, cycle-sort commands that have no key binding first.
 ;; - Make things like icomplete-mode or lightning-completion work with
 ;;   completion-in-region-mode.
-;; - extend `boundaries' to provide various other meta-data about the
-;;   output of `all-completions':
-;;   - preferred sorting order when displayed in *Completions*.
-;;   - annotations/text-properties to add when displayed in *Completions*.
+;; - extend `metadata':
 ;;   - quoting/unquoting (so we can complete files names with envvars
 ;;     and backslashes, and all-completion can list names without
 ;;     quoting backslashes and dollars).
@@ -116,6 +113,32 @@ the closest directory separators."
     (cons (or (cadr boundaries) 0)
           (or (cddr boundaries) (length suffix)))))
 
+(defun completion-metadata (string table pred)
+  "Return the metadata of elements to complete at the end of STRING.
+This metadata is an alist.  Currently understood keys are:
+- `category': the kind of objects returned by `all-completions'.
+   Used by `completion-category-overrides'.
+- `annotation-function': function to add annotations in *Completions*.
+   Takes one argument (STRING), which is a possible completion and
+   returns a string to append to STRING.
+- `display-sort-function': function to sort entries in *Completions*.
+   Takes one argument (COMPLETIONS) and should return a new list
+   of completions.  Can operate destructively.
+- `cycle-sort-function': function to sort entries when cycling.
+   Works like `display-sort-function'."
+  (let ((metadata (if (functionp table)
+                      (funcall table string pred 'metadata))))
+    (if (eq (car-safe metadata) 'metadata)
+        (cdr metadata))))
+
+(defun completion--field-metadata (field-start)
+  (completion-metadata (buffer-substring-no-properties field-start (point))
+                       minibuffer-completion-table
+                       minibuffer-completion-predicate))
+
+(defun completion-metadata-get (metadata prop)
+  (cdr (assq prop metadata)))
+
 (defun completion--some (fun xs)
   "Apply FUN to each element of XS in turn.
 Return the first non-nil returned value.
@@ -457,7 +480,34 @@ The available styles are listed in `completion-styles-alist'."
   :group 'minibuffer
   :version "23.1")
 
-(defun completion-try-completion (string table pred point)
+(defcustom completion-category-overrides
+  '((buffer (styles . (basic substring))))
+  "List of overrides for specific categories.
+Each override has the shape (CATEGORY . ALIST) where ALIST is
+an association list that can specify properties such as:
+- `styles': the list of `completion-styles' to use for that category.
+- `cycle': the `completion-cycle-threshold' to use for that category."
+  :type `(alist :key-type (choice (const buffer)
+                                  (const file)
+                                  symbol)
+          :value-type
+          (set
+           (cons (const style)
+                 (repeat ,@(mapcar (lambda (x) (list 'const (car x)))
+                                   completion-styles-alist)))
+           (cons (const cycle)
+                 (choice (const :tag "No cycling" nil)
+                         (const :tag "Always cycle" t)
+                         (integer :tag "Threshold"))))))
+
+(defun completion--styles (metadata)
+  (let* ((cat (completion-metadata-get metadata 'category))
+         (over (assq 'styles (cdr (assq cat completion-category-overrides)))))
+    (if over
+        (delete-dups (append (cdr over) (copy-sequence completion-styles)))
+       completion-styles)))
+
+(defun completion-try-completion (string table pred point metadata)
   "Try to complete STRING using completion table TABLE.
 Only the elements of table that satisfy predicate PRED are considered.
 POINT is the position of point within STRING.
@@ -468,9 +518,9 @@ a new position for point."
   (completion--some (lambda (style)
                       (funcall (nth 1 (assq style completion-styles-alist))
                                string table pred point))
-                    completion-styles))
+                    (completion--styles metadata)))
 
-(defun completion-all-completions (string table pred point)
+(defun completion-all-completions (string table pred point metadata)
   "List the possible completions of STRING in completion table TABLE.
 Only the elements of table that satisfy predicate PRED are considered.
 POINT is the position of point within STRING.
@@ -481,7 +531,7 @@ in the last `cdr'."
   (completion--some (lambda (style)
                       (funcall (nth 2 (assq style completion-styles-alist))
                                string table pred point))
-                    completion-styles))
+                    (completion--styles metadata)))
 
 (defun minibuffer--bitset (modified completions exact)
   (logior (if modified    4 0)
@@ -532,6 +582,11 @@ candidates than this number."
           (const :tag "Always cycle" t)
           (integer :tag "Threshold")))
 
+(defun completion--cycle-threshold (metadata)
+  (let* ((cat (completion-metadata-get metadata 'category))
+         (over (assq 'cycle (cdr (assq cat completion-category-overrides)))))
+    (if over (cdr over) completion-cycle-threshold)))
+
 (defvar completion-all-sorted-completions nil)
 (make-variable-buffer-local 'completion-all-sorted-completions)
 (defvar completion-cycling nil)
@@ -566,12 +621,14 @@ when the buffer's text is already an exact match."
   (let* ((beg (field-beginning))
          (end (field-end))
          (string (buffer-substring beg end))
+         (md (completion--field-metadata beg))
          (comp (funcall (or try-completion-function
                             'completion-try-completion)
                         string
                         minibuffer-completion-table
                         minibuffer-completion-predicate
-                        (- (point) beg))))
+                        (- (point) beg)
+                        md)))
     (cond
      ((null comp)
       (minibuffer-hide-completions)
@@ -610,16 +667,17 @@ when the buffer's text is already an exact match."
             (completion--do-completion try-completion-function expect-exact)
 
           ;; It did find a match.  Do we match some possibility exactly now?
-          (let ((exact (test-completion completion
+          (let* ((exact (test-completion completion
                                         minibuffer-completion-table
                                         minibuffer-completion-predicate))
+                 (threshold (completion--cycle-threshold md))
                 (comps
                  ;; Check to see if we want to do cycling.  We do it
                  ;; here, after having performed the normal completion,
                  ;; so as to take advantage of the difference between
                  ;; try-completion and all-completions, for things
                  ;; like completion-ignored-extensions.
-                 (when (and completion-cycle-threshold
+                  (when (and threshold
                             ;; Check that the completion didn't make
                             ;; us jump to a different boundary.
                             (or (not completed)
@@ -636,7 +694,7 @@ when the buffer's text is already an exact match."
                    (not (ignore-errors
                           ;; This signal an (intended) error if comps is too
                           ;; short or if completion-cycle-threshold is t.
-                          (consp (nthcdr completion-cycle-threshold comps)))))
+                          (consp (nthcdr threshold comps)))))
               ;; Fewer than completion-cycle-threshold remaining
               ;; completions: let's cycle.
               (setq completed t exact t)
@@ -715,27 +773,25 @@ scroll the window of possible completions."
   (or completion-all-sorted-completions
       (let* ((start (field-beginning))
              (end (field-end))
-             (all (completion-all-completions (buffer-substring start end)
-                                              minibuffer-completion-table
-                                              minibuffer-completion-predicate
-                                              (- (point) start)))
+             (string (buffer-substring start end))
+             (all (completion-all-completions
+                   string
+                   minibuffer-completion-table
+                   minibuffer-completion-predicate
+                   (- (point) start)
+                   (completion--field-metadata start)))
              (last (last all))
-             (base-size (or (cdr last) 0)))
+             (base-size (or (cdr last) 0))
+             (all-md (completion-metadata (substring string 0 base-size)
+                                          minibuffer-completion-table
+                                          minibuffer-completion-predicate))
+             (sort-fun (completion-metadata-get all-md 'cycle-sort-function)))
         (when last
           (setcdr last nil)
-          ;; Prefer shorter completions.
-          (setq all (sort all (lambda (c1 c2)
-                                (let ((s1 (get-text-property
-                                           0 :completion-cycle-penalty c1))
-                                      (s2 (get-text-property
-                                           0 :completion-cycle-penalty c2)))
-                                  (if (eq s1 s2)
-                                      (< (length c1) (length c2))
-                                    (< (or s1 (length c1))
-                                       (or s2 (length c2))))))))
+          (setq all (if sort-fun (funcall sort-fun all)
+                      ;; Prefer shorter completions, by default.
+                      (sort all (lambda (c1 c2) (< (length c1) (length c2))))))
           ;; Prefer recently used completions.
-          ;; FIXME: Additional sorting ideas:
-          ;; - for M-x, prefer commands that have no key binding.
           (when (minibufferp)
             (let ((hist (symbol-value minibuffer-history-variable)))
               (setq all (sort all (lambda (c1 c2)
@@ -758,6 +814,7 @@ Repeated uses step through the possible completions."
   ;; ~/src/emacs/trunk/ and throws away lisp/minibuffer.el.
   (let* ((start (field-beginning))
          (end (field-end))
+         ;; (md (completion--field-metadata start))
          (all (completion-all-sorted-completions))
          (base (+ start (or (cdr (last all)) 0))))
     (cond
@@ -861,8 +918,8 @@ If `minibuffer-completion-confirm' is `confirm-after-completion',
                  nil))
         (t nil))))))
 
-(defun completion--try-word-completion (string table predicate point)
-  (let ((comp (completion-try-completion string table predicate point)))
+(defun completion--try-word-completion (string table predicate point md)
+  (let ((comp (completion-try-completion string table predicate point md)))
     (if (not (consp comp))
         comp
 
@@ -884,7 +941,7 @@ If `minibuffer-completion-confirm' is `confirm-after-completion',
          (while (and exts (not (consp tem)))
             (setq tem (completion-try-completion
                       (concat before (pop exts) after)
-                      table predicate (1+ point))))
+                      table predicate (1+ point) md)))
          (if (consp tem) (setq comp tem))))
 
       ;; Completing a single word is actually more difficult than completing
@@ -1219,7 +1276,8 @@ variables.")
                        string
                        minibuffer-completion-table
                        minibuffer-completion-predicate
-                       (- (point) (field-beginning)))))
+                       (- (point) (field-beginning))
+                       (completion--field-metadata start))))
     (message nil)
     (if (or (null completions)
             (and (not (consp (cdr completions)))
@@ -1235,9 +1293,16 @@ variables.")
       (let* ((last (last completions))
              (base-size (cdr last))
              (prefix (unless (zerop base-size) (substring string 0 base-size)))
-             (global-af (or (plist-get completion-extra-properties
-                                       :annotation-function)
-                            completion-annotate-function))
+             ;; FIXME: This function is for the output of all-completions,
+             ;; not completion-all-completions.  Often it's the same, but
+             ;; not always.
+             (all-md (completion-metadata (substring string 0 base-size)
+                                          minibuffer-completion-table
+                                          minibuffer-completion-predicate))
+             (afun (or (completion-metadata-get all-md 'annotation-function)
+                       (plist-get completion-extra-properties
+                                  :annotation-function)
+                       completion-annotate-function))
              ;; If the *Completions* buffer is shown in a new
              ;; window, mark it as softly-dedicated, so bury-buffer in
              ;; minibuffer-hide-completions will know whether to
@@ -1247,15 +1312,21 @@ variables.")
           ;; Remove the base-size tail because `sort' requires a properly
           ;; nil-terminated list.
           (when last (setcdr last nil))
-          (setq completions (sort completions 'string-lessp))
           (setq completions
-                (cond
-                 (global-af
+                ;; FIXME: This function is for the output of all-completions,
+                ;; not completion-all-completions.  Often it's the same, but
+                ;; not always.
+                (let ((sort-fun (completion-metadata-get
+                                 all-md 'display-sort-function)))
+                  (if sort-fun
+                      (funcall sort-fun completions)
+                    (sort completions 'string-lessp))))
+          (when afun
+            (setq completions
                   (mapcar (lambda (s)
-                            (let ((ann (funcall global-af s)))
+                            (let ((ann (funcall afun s)))
                               (if ann (list s ann) s)))
-                          completions))
-                 (t completions)))
+                          completions)))
 
           (with-current-buffer standard-output
             (set (make-local-variable 'completion-base-position)
@@ -1270,12 +1341,12 @@ variables.")
                        (cpred minibuffer-completion-predicate)
                        (cprops completion-extra-properties))
                    (lambda (start end choice)
-                     (unless
-                        (or (zerop (length prefix))
-                            (equal prefix
-                                   (buffer-substring-no-properties
-                                    (max (point-min) (- start (length prefix)))
-                                    start)))
+                     (unless (or (zerop (length prefix))
+                                 (equal prefix
+                                        (buffer-substring-no-properties
+                                         (max (point-min)
+                                              (- start (length prefix)))
+                                         start)))
                        (message "*Completions* out of date"))
                      ;; FIXME: Use `md' to do quoting&terminator here.
                      (completion--replace start end choice)
@@ -1632,6 +1703,7 @@ same as `substitute-in-file-name'."
   "Completion table for file names."
   (ignore-errors
     (cond
+     ((eq action 'metadata) '(metadata (category . file)))
      ((eq (car-safe action) 'boundaries)
       (let ((start (length (file-name-directory string)))
             (end (string-match-p "/" (cdr action))))
@@ -1852,6 +1924,11 @@ and `read-file-name-function'."
   (funcall (or read-file-name-function #'read-file-name-default)
            prompt dir default-filename mustmatch initial predicate))
 
+;; minibuffer-completing-file-name is a variable used internally in minibuf.c
+;; to determine whether to use minibuffer-local-filename-completion-map or
+;; minibuffer-local-completion-map.  It shouldn't be exported to Elisp.
+(make-obsolete-variable 'minibuffer-completing-file-name nil "24.1")
+
 (defun read-file-name-default (prompt &optional dir default-filename mustmatch initial predicate)
   "Default method for reading file names.
 See `read-file-name' for the meaning of the arguments."
index 47085af..b1ee4c4 100644 (file)
@@ -314,9 +314,11 @@ Called with 5 arguments, PROCESS, SENDER, RESPONSE, TARGET and TEXT."
   :type 'boolean
   :group 'rcirc)
 
-(defcustom rcirc-decode-coding-system 'utf-8
-  "Coding system used to decode incoming irc messages."
+(defcustom rcirc-decode-coding-system nil
+  "Coding system used to decode incoming irc messages.
+If nil automatically detect the coding system."
   :type 'coding-system
+  :version "24.1"
   :group 'rcirc)
 
 (defcustom rcirc-encode-coding-system 'utf-8
@@ -616,7 +618,7 @@ last ping."
     (setq header-line-format (format "%f" (- (rcirc-float-time)
                                             (string-to-number message))))))
 
-(defvar rcirc-debug-buffer " *rcirc debug*")
+(defvar rcirc-debug-buffer "*rcirc debug*")
 (defvar rcirc-debug-flag nil
   "If non-nil, write information to `rcirc-debug-buffer'.")
 (defun rcirc-debug (process text)
@@ -1480,9 +1482,9 @@ record activity."
              (old-point (point-marker))
              (fill-start (marker-position rcirc-prompt-start-marker)))
 
+         (setq text (decode-coding-string text (or rcirc-decode-coding-system
+                                                   (detect-coding-string text t))))
          (unless (string= sender (rcirc-nick process))
-           ;; only decode text from other senders, not ours
-           (setq text (decode-coding-string text rcirc-decode-coding-system))
            ;; mark the line with overlay arrow
            (unless (or (marker-position overlay-arrow-position)
                        (get-buffer-window (current-buffer))
index 4cf3817..18ae136 100644 (file)
@@ -1158,6 +1158,7 @@ in *Help* buffer.  See also the command `describe-char'."
 
 (defvar minibuffer-completing-symbol nil
   "Non-nil means completing a Lisp symbol in the minibuffer.")
+(make-obsolete-variable 'minibuffer-completing-symbol nil "24.1")
 
 (defvar minibuffer-default nil
   "The current default value or list of default values in the minibuffer.
index bada9f1..880cafc 100644 (file)
@@ -1,6 +1,7 @@
-2011-05-30  Paul Eggert  <eggert@cs.ucla.edu>
+2011-05-31  Paul Eggert  <eggert@cs.ucla.edu>
 
        Use 'inline', not 'INLINE'.
+       <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00914.html>
        * alloc.c, fontset.c (INLINE): Remove.
        * alloc.c, bidi.c, charset.c, coding.c, dispnew.c, fns.c, image.c:
        * intervals.c, keyboard.c, process.c, syntax.c, textprop.c, w32term.c:
@@ -8,6 +9,29 @@
        * gmalloc.c (register_heapinfo): Use inline unconditionally.
        * lisp.h (LISP_MAKE_RVALUE): Use inline, not __inline__.
 
+2011-05-31  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * minibuf.c (Finternal_complete_buffer): Return `category' metadata.
+       (read_minibuf): Use get_minibuffer.
+       (syms_of_minibuf): Use DEFSYM.
+       (Qmetadata): New var.
+       * data.c (Qbuffer): Don't make it static.
+       (syms_of_data): Use DEFSYM.
+
+2011-05-31  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * ccl.c (CCL_CODE_RANGE): Allow negative numbers.  (Bug#8751)
+       (CCL_CODE_MIN): New macro.
+
+2011-05-30  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * alloc.c (lisp_align_malloc): Omit unnecessary val==NULL tests.
+
+       * eval.c (Qdebug): Now static.
+       * lisp.h (Qdebug): Remove decl.  This reverts a part of the
+       2011-04-26T11:26:05Z!dan.colascione@gmail.com that inadvertently undid part of
+       2011-04-14T06:48:41Z!eggert@cs.ucla.edu.
+
 2011-05-29  Chong Yidong  <cyd@stupidchicken.com>
 
        * image.c: Various fixes to ImageMagick code comments.
        (symbol_to_x_atom): Remove gratuitous arg.
        (x_handle_selection_request, lisp_data_to_selection_data)
        (x_get_foreign_selection, Fx_register_dnd_atom): Callers changed.
-       (x_own_selection, x_get_local_selection, x_convert_selection): New
-       arg, specifying work frame.  Use terminal-local Vselection_alist.
+       (x_own_selection, x_get_local_selection, x_convert_selection):
+       New arg, specifying work frame.  Use terminal-local Vselection_alist.
        (some_frame_on_display): Delete unused function.
        (Fx_own_selection_internal, Fx_get_selection_internal)
        (Fx_disown_selection_internal, Fx_selection_owner_p)
        (x_selection_request_lisp_error): Free the above.
        (x_get_local_selection): Remove unnecessary code.
        (x_reply_selection_request): Args changed; handle arbitrary array
-       of converted selections stored in converted_selections.  Separate
-       the XChangeProperty and SelectionNotify steps.
+       of converted selections stored in converted_selections.
+       Separate the XChangeProperty and SelectionNotify steps.
        (x_handle_selection_request): Rewrite to handle MULTIPLE target.
        (x_convert_selection): New function.
        (x_handle_selection_event): Simplify.
 
        Be more systematic about user-interface timestamps.
        Before, the code sometimes used 'Time', sometimes 'unsigned long',
-       and sometimes 'EMACS_UINT', to represent these timestamps.  This
-       change causes it to use 'Time' uniformly, as that's what X uses.
+       and sometimes 'EMACS_UINT', to represent these timestamps.
+       This change causes it to use 'Time' uniformly, as that's what X uses.
        This makes the code easier to follow, and makes it easier to catch
        integer overflow bugs such as Bug#8664.
        * frame.c (Fmouse_position, Fmouse_pixel_position):
index f62ae12..e627af6 100644 (file)
@@ -989,13 +989,11 @@ lisp_align_malloc (size_t nbytes, enum mem_type type)
   free_ablock = free_ablock->x.next_free;
 
 #if GC_MARK_STACK && !defined GC_MALLOC_CHECK
-  if (val && type != MEM_TYPE_NON_LISP)
+  if (type != MEM_TYPE_NON_LISP)
     mem_insert (val, (char *) val + nbytes, type);
 #endif
 
   MALLOC_UNBLOCK_INPUT;
-  if (!val && nbytes)
-    memory_full ();
 
   eassert (0 == ((uintptr_t) val) % BLOCK_ALIGN);
   return val;
index 630c6b3..a58ad90 100644 (file)
--- a/src/ccl.c
+++ b/src/ccl.c
@@ -79,9 +79,8 @@ static Lisp_Object Vccl_program_table;
 #define CCL_HEADER_EOF         1
 #define CCL_HEADER_MAIN                2
 
-/* CCL code is a sequence of 28-bit non-negative integers (i.e. the
-   MSB is always 0), each contains CCL command and/or arguments in the
-   following format:
+/* CCL code is a sequence of 28-bit integers.  Each contains a CCL
+   command and/or arguments in the following format:
 
        |----------------- integer (28-bit) ------------------|
        |------- 17-bit ------|- 3-bit --|- 3-bit --|- 5-bit -|
@@ -94,12 +93,14 @@ static Lisp_Object Vccl_program_table;
        |------------- constant or other args ----------------|
                      cccccccccccccccccccccccccccc
 
-   where, `cc...c' is a non-negative integer indicating constant value
-   (the left most `c' is always 0) or an absolute jump address, `RRR'
+   where `cc...c' is an integer indicating a constant value or an
+   absolute jump address.  The context determines whether `cc...c' is
+   considered to be unsigned, or a signed two's complement number.  `RRR'
    and `rrr' are CCL register number, `XXXXX' is one of the following
    CCL commands.  */
 
 #define CCL_CODE_MAX ((1 << (28 - 1)) - 1)
+#define CCL_CODE_MIN (-1 - CCL_CODE_MAX)
 
 /* CCL commands
 
@@ -756,7 +757,7 @@ while(0)
   while (0)
 
 #define GET_CCL_CODE(code, ccl_prog, ic)                       \
-  GET_CCL_RANGE (code, ccl_prog, ic, 0, CCL_CODE_MAX)
+  GET_CCL_RANGE (code, ccl_prog, ic, CCL_CODE_MIN, CCL_CODE_MAX)
 
 #define GET_CCL_INT(var, ccl_prog, ic)                         \
   GET_CCL_RANGE (var, ccl_prog, ic, INT_MIN, INT_MAX)
index a266278..443d783 100644 (file)
@@ -32,14 +32,14 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "keyboard.h"
 #include "frame.h"
 #include "syssignal.h"
-#include "termhooks.h"  /* For FRAME_KBOARD reference in y-or-n-p. */
+#include "termhooks.h"  /* For FRAME_KBOARD reference in y-or-n-p.  */
 #include "font.h"
 
 #ifdef STDC_HEADERS
 #include <float.h>
 #endif
 
-/* If IEEE_FLOATING_POINT isn't defined, default it from FLT_*. */
+/* If IEEE_FLOATING_POINT isn't defined, default it from FLT_*.  */
 #ifndef IEEE_FLOATING_POINT
 #if (FLT_RADIX == 2 && FLT_MANT_DIG == 24 \
      && FLT_MIN_EXP == -125 && FLT_MAX_EXP == 128)
@@ -90,7 +90,7 @@ static Lisp_Object Qsymbol, Qstring, Qcons, Qmarker, Qoverlay;
 Lisp_Object Qwindow;
 static Lisp_Object Qfloat, Qwindow_configuration;
 static Lisp_Object Qprocess;
-static Lisp_Object Qcompiled_function, Qbuffer, Qframe, Qvector;
+Lisp_Object Qcompiled_function, Qbuffer, Qframe, Qvector;
 static Lisp_Object Qchar_table, Qbool_vector, Qhash_table;
 static Lisp_Object Qsubrp, Qmany, Qunevalled;
 Lisp_Object Qfont_spec, Qfont_entity, Qfont_object;
@@ -2854,74 +2854,75 @@ syms_of_data (void)
 {
   Lisp_Object error_tail, arith_tail;
 
-  Qquote = intern_c_string ("quote");
-  Qlambda = intern_c_string ("lambda");
-  Qsubr = intern_c_string ("subr");
-  Qerror_conditions = intern_c_string ("error-conditions");
-  Qerror_message = intern_c_string ("error-message");
-  Qtop_level = intern_c_string ("top-level");
-
-  Qerror = intern_c_string ("error");
-  Qquit = intern_c_string ("quit");
-  Qwrong_type_argument = intern_c_string ("wrong-type-argument");
-  Qargs_out_of_range = intern_c_string ("args-out-of-range");
-  Qvoid_function = intern_c_string ("void-function");
-  Qcyclic_function_indirection = intern_c_string ("cyclic-function-indirection");
-  Qcyclic_variable_indirection = intern_c_string ("cyclic-variable-indirection");
-  Qvoid_variable = intern_c_string ("void-variable");
-  Qsetting_constant = intern_c_string ("setting-constant");
-  Qinvalid_read_syntax = intern_c_string ("invalid-read-syntax");
-
-  Qinvalid_function = intern_c_string ("invalid-function");
-  Qwrong_number_of_arguments = intern_c_string ("wrong-number-of-arguments");
-  Qno_catch = intern_c_string ("no-catch");
-  Qend_of_file = intern_c_string ("end-of-file");
-  Qarith_error = intern_c_string ("arith-error");
-  Qbeginning_of_buffer = intern_c_string ("beginning-of-buffer");
-  Qend_of_buffer = intern_c_string ("end-of-buffer");
-  Qbuffer_read_only = intern_c_string ("buffer-read-only");
-  Qtext_read_only = intern_c_string ("text-read-only");
-  Qmark_inactive = intern_c_string ("mark-inactive");
-
-  Qlistp = intern_c_string ("listp");
-  Qconsp = intern_c_string ("consp");
-  Qsymbolp = intern_c_string ("symbolp");
-  Qkeywordp = intern_c_string ("keywordp");
-  Qintegerp = intern_c_string ("integerp");
-  Qnatnump = intern_c_string ("natnump");
-  Qwholenump = intern_c_string ("wholenump");
-  Qstringp = intern_c_string ("stringp");
-  Qarrayp = intern_c_string ("arrayp");
-  Qsequencep = intern_c_string ("sequencep");
-  Qbufferp = intern_c_string ("bufferp");
-  Qvectorp = intern_c_string ("vectorp");
-  Qchar_or_string_p = intern_c_string ("char-or-string-p");
-  Qmarkerp = intern_c_string ("markerp");
-  Qbuffer_or_string_p = intern_c_string ("buffer-or-string-p");
-  Qinteger_or_marker_p = intern_c_string ("integer-or-marker-p");
-  Qboundp = intern_c_string ("boundp");
-  Qfboundp = intern_c_string ("fboundp");
-
-  Qfloatp = intern_c_string ("floatp");
-  Qnumberp = intern_c_string ("numberp");
-  Qnumber_or_marker_p = intern_c_string ("number-or-marker-p");
-
-  Qchar_table_p = intern_c_string ("char-table-p");
-  Qvector_or_char_table_p = intern_c_string ("vector-or-char-table-p");
-
-  Qsubrp = intern_c_string ("subrp");
-  Qunevalled = intern_c_string ("unevalled");
-  Qmany = intern_c_string ("many");
-
-  Qcdr = intern_c_string ("cdr");
-
-  /* Handle automatic advice activation */
-  Qad_advice_info = intern_c_string ("ad-advice-info");
-  Qad_activate_internal = intern_c_string ("ad-activate-internal");
+  DEFSYM (Qquote, "quote");
+  DEFSYM (Qlambda, "lambda");
+  DEFSYM (Qsubr, "subr");
+  DEFSYM (Qerror_conditions, "error-conditions");
+  DEFSYM (Qerror_message, "error-message");
+  DEFSYM (Qtop_level, "top-level");
+
+  DEFSYM (Qerror, "error");
+  DEFSYM (Qquit, "quit");
+  DEFSYM (Qwrong_type_argument, "wrong-type-argument");
+  DEFSYM (Qargs_out_of_range, "args-out-of-range");
+  DEFSYM (Qvoid_function, "void-function");
+  DEFSYM (Qcyclic_function_indirection, "cyclic-function-indirection");
+  DEFSYM (Qcyclic_variable_indirection, "cyclic-variable-indirection");
+  DEFSYM (Qvoid_variable, "void-variable");
+  DEFSYM (Qsetting_constant, "setting-constant");
+  DEFSYM (Qinvalid_read_syntax, "invalid-read-syntax");
+
+  DEFSYM (Qinvalid_function, "invalid-function");
+  DEFSYM (Qwrong_number_of_arguments, "wrong-number-of-arguments");
+  DEFSYM (Qno_catch, "no-catch");
+  DEFSYM (Qend_of_file, "end-of-file");
+  DEFSYM (Qarith_error, "arith-error");
+  DEFSYM (Qbeginning_of_buffer, "beginning-of-buffer");
+  DEFSYM (Qend_of_buffer, "end-of-buffer");
+  DEFSYM (Qbuffer_read_only, "buffer-read-only");
+  DEFSYM (Qtext_read_only, "text-read-only");
+  DEFSYM (Qmark_inactive, "mark-inactive");
+
+  DEFSYM (Qlistp, "listp");
+  DEFSYM (Qconsp, "consp");
+  DEFSYM (Qsymbolp, "symbolp");
+  DEFSYM (Qkeywordp, "keywordp");
+  DEFSYM (Qintegerp, "integerp");
+  DEFSYM (Qnatnump, "natnump");
+  DEFSYM (Qwholenump, "wholenump");
+  DEFSYM (Qstringp, "stringp");
+  DEFSYM (Qarrayp, "arrayp");
+  DEFSYM (Qsequencep, "sequencep");
+  DEFSYM (Qbufferp, "bufferp");
+  DEFSYM (Qvectorp, "vectorp");
+  DEFSYM (Qchar_or_string_p, "char-or-string-p");
+  DEFSYM (Qmarkerp, "markerp");
+  DEFSYM (Qbuffer_or_string_p, "buffer-or-string-p");
+  DEFSYM (Qinteger_or_marker_p, "integer-or-marker-p");
+  DEFSYM (Qboundp, "boundp");
+  DEFSYM (Qfboundp, "fboundp");
+
+  DEFSYM (Qfloatp, "floatp");
+  DEFSYM (Qnumberp, "numberp");
+  DEFSYM (Qnumber_or_marker_p, "number-or-marker-p");
+
+  DEFSYM (Qchar_table_p, "char-table-p");
+  DEFSYM (Qvector_or_char_table_p, "vector-or-char-table-p");
+
+  DEFSYM (Qsubrp, "subrp");
+  DEFSYM (Qunevalled, "unevalled");
+  DEFSYM (Qmany, "many");
+
+  DEFSYM (Qcdr, "cdr");
+
+  /* Handle automatic advice activation */
+  DEFSYM (Qad_advice_info, "ad-advice-info");
+  DEFSYM (Qad_activate_internal, "ad-activate-internal");
 
   error_tail = pure_cons (Qerror, Qnil);
 
-  /* ERROR is used as a signaler for random errors for which nothing else is right */
+  /* ERROR is used as a signaler for random errors for which nothing else is
+     right.  */
 
   Fput (Qerror, Qerror_conditions,
        error_tail);
@@ -2958,8 +2959,7 @@ syms_of_data (void)
   Fput (Qcyclic_variable_indirection, Qerror_message,
        make_pure_c_string ("Symbol's chain of variable indirections contains a loop"));
 
-  Qcircular_list = intern_c_string ("circular-list");
-  staticpro (&Qcircular_list);
+  DEFSYM (Qcircular_list, "circular-list");
   Fput (Qcircular_list, Qerror_conditions,
        pure_cons (Qcircular_list, error_tail));
   Fput (Qcircular_list, Qerror_message,
@@ -3026,11 +3026,11 @@ syms_of_data (void)
   Fput (Qtext_read_only, Qerror_message,
        make_pure_c_string ("Text is read-only"));
 
-  Qrange_error = intern_c_string ("range-error");
-  Qdomain_error = intern_c_string ("domain-error");
-  Qsingularity_error = intern_c_string ("singularity-error");
-  Qoverflow_error = intern_c_string ("overflow-error");
-  Qunderflow_error = intern_c_string ("underflow-error");
+  DEFSYM (Qrange_error, "range-error");
+  DEFSYM (Qdomain_error, "domain-error");
+  DEFSYM (Qsingularity_error, "singularity-error");
+  DEFSYM (Qoverflow_error, "overflow-error");
+  DEFSYM (Qunderflow_error, "underflow-error");
 
   Fput (Qdomain_error, Qerror_conditions,
        pure_cons (Qdomain_error, arith_tail));
@@ -3057,93 +3057,29 @@ syms_of_data (void)
   Fput (Qunderflow_error, Qerror_message,
        make_pure_c_string ("Arithmetic underflow error"));
 
-  staticpro (&Qrange_error);
-  staticpro (&Qdomain_error);
-  staticpro (&Qsingularity_error);
-  staticpro (&Qoverflow_error);
-  staticpro (&Qunderflow_error);
-
   staticpro (&Qnil);
   staticpro (&Qt);
-  staticpro (&Qquote);
-  staticpro (&Qlambda);
-  staticpro (&Qsubr);
   staticpro (&Qunbound);
-  staticpro (&Qerror_conditions);
-  staticpro (&Qerror_message);
-  staticpro (&Qtop_level);
-
-  staticpro (&Qerror);
-  staticpro (&Qquit);
-  staticpro (&Qwrong_type_argument);
-  staticpro (&Qargs_out_of_range);
-  staticpro (&Qvoid_function);
-  staticpro (&Qcyclic_function_indirection);
-  staticpro (&Qcyclic_variable_indirection);
-  staticpro (&Qvoid_variable);
-  staticpro (&Qsetting_constant);
-  staticpro (&Qinvalid_read_syntax);
-  staticpro (&Qwrong_number_of_arguments);
-  staticpro (&Qinvalid_function);
-  staticpro (&Qno_catch);
-  staticpro (&Qend_of_file);
-  staticpro (&Qarith_error);
-  staticpro (&Qbeginning_of_buffer);
-  staticpro (&Qend_of_buffer);
-  staticpro (&Qbuffer_read_only);
-  staticpro (&Qtext_read_only);
-  staticpro (&Qmark_inactive);
-
-  staticpro (&Qlistp);
-  staticpro (&Qconsp);
-  staticpro (&Qsymbolp);
-  staticpro (&Qkeywordp);
-  staticpro (&Qintegerp);
-  staticpro (&Qnatnump);
-  staticpro (&Qwholenump);
-  staticpro (&Qstringp);
-  staticpro (&Qarrayp);
-  staticpro (&Qsequencep);
-  staticpro (&Qbufferp);
-  staticpro (&Qvectorp);
-  staticpro (&Qchar_or_string_p);
-  staticpro (&Qmarkerp);
-  staticpro (&Qbuffer_or_string_p);
-  staticpro (&Qinteger_or_marker_p);
-  staticpro (&Qfloatp);
-  staticpro (&Qnumberp);
-  staticpro (&Qnumber_or_marker_p);
-  staticpro (&Qchar_table_p);
-  staticpro (&Qvector_or_char_table_p);
-  staticpro (&Qsubrp);
-  staticpro (&Qmany);
-  staticpro (&Qunevalled);
-
-  staticpro (&Qboundp);
-  staticpro (&Qfboundp);
-  staticpro (&Qcdr);
-  staticpro (&Qad_advice_info);
-  staticpro (&Qad_activate_internal);
 
   /* Types that type-of returns.  */
-  Qinteger = intern_c_string ("integer");
-  Qsymbol = intern_c_string ("symbol");
-  Qstring = intern_c_string ("string");
-  Qcons = intern_c_string ("cons");
-  Qmarker = intern_c_string ("marker");
-  Qoverlay = intern_c_string ("overlay");
-  Qfloat = intern_c_string ("float");
-  Qwindow_configuration = intern_c_string ("window-configuration");
-  Qprocess = intern_c_string ("process");
-  Qwindow = intern_c_string ("window");
-  /* Qsubr = intern_c_string ("subr"); */
-  Qcompiled_function = intern_c_string ("compiled-function");
-  Qbuffer = intern_c_string ("buffer");
-  Qframe = intern_c_string ("frame");
-  Qvector = intern_c_string ("vector");
-  Qchar_table = intern_c_string ("char-table");
-  Qbool_vector = intern_c_string ("bool-vector");
-  Qhash_table = intern_c_string ("hash-table");
+  DEFSYM (Qinteger, "integer");
+  DEFSYM (Qsymbol, "symbol");
+  DEFSYM (Qstring, "string");
+  DEFSYM (Qcons, "cons");
+  DEFSYM (Qmarker, "marker");
+  DEFSYM (Qoverlay, "overlay");
+  DEFSYM (Qfloat, "float");
+  DEFSYM (Qwindow_configuration, "window-configuration");
+  DEFSYM (Qprocess, "process");
+  DEFSYM (Qwindow, "window");
+  /* DEFSYM (Qsubr, "subr"); */
+  DEFSYM (Qcompiled_function, "compiled-function");
+  DEFSYM (Qbuffer, "buffer");
+  DEFSYM (Qframe, "frame");
+  DEFSYM (Qvector, "vector");
+  DEFSYM (Qchar_table, "char-table");
+  DEFSYM (Qbool_vector, "bool-vector");
+  DEFSYM (Qhash_table, "hash-table");
 
   DEFSYM (Qfont_spec, "font-spec");
   DEFSYM (Qfont_entity, "font-entity");
@@ -3151,25 +3087,6 @@ syms_of_data (void)
 
   DEFSYM (Qinteractive_form, "interactive-form");
 
-  staticpro (&Qinteger);
-  staticpro (&Qsymbol);
-  staticpro (&Qstring);
-  staticpro (&Qcons);
-  staticpro (&Qmarker);
-  staticpro (&Qoverlay);
-  staticpro (&Qfloat);
-  staticpro (&Qwindow_configuration);
-  staticpro (&Qprocess);
-  staticpro (&Qwindow);
-  /* staticpro (&Qsubr); */
-  staticpro (&Qcompiled_function);
-  staticpro (&Qbuffer);
-  staticpro (&Qframe);
-  staticpro (&Qvector);
-  staticpro (&Qchar_table);
-  staticpro (&Qbool_vector);
-  staticpro (&Qhash_table);
-
   defsubr (&Sindirect_variable);
   defsubr (&Sinteractive_form);
   defsubr (&Seq);
index 6b4182c..f8bc0a9 100644 (file)
@@ -88,7 +88,7 @@ static Lisp_Object Qdebug_on_error;
 static Lisp_Object Qdeclare;
 Lisp_Object Qinternal_interpreter_environment, Qclosure;
 
-Lisp_Object Qdebug;
+static Lisp_Object Qdebug;
 
 /* This holds either the symbol `run-hooks' or nil.
    It is nil at an early stage of startup, and when Emacs
index 32d6b44..8a504e8 100644 (file)
@@ -2836,7 +2836,7 @@ extern void syms_of_lread (void);
 
 /* Defined in eval.c.  */
 extern Lisp_Object Qautoload, Qexit, Qinteractive, Qcommandp, Qdefun, Qmacro;
-extern Lisp_Object Qinhibit_quit, Qclosure, Qdebug;
+extern Lisp_Object Qinhibit_quit, Qclosure;
 extern Lisp_Object Qand_rest;
 extern Lisp_Object Vautoload_queue;
 extern Lisp_Object Vsignaling_function;
index 3f8bd83..4658b05 100644 (file)
@@ -43,7 +43,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 Lisp_Object Vminibuffer_list;
 
-/* Data to remember during recursive minibuffer invocations  */
+/* Data to remember during recursive minibuffer invocations.  */
 
 static Lisp_Object minibuf_save_list;
 
@@ -55,7 +55,7 @@ int minibuf_level;
 
 static Lisp_Object Qhistory_length;
 
-/* Fread_minibuffer leaves the input here as a string. */
+/* Fread_minibuffer leaves the input here as a string.  */
 
 Lisp_Object last_minibuf_string;
 
@@ -588,7 +588,7 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt,
   /* Empty out the minibuffers of all frames other than the one
      where we are going to display one now.
      Set them to point to ` *Minibuf-0*', which is always empty.  */
-  empty_minibuf = Fget_buffer (build_string (" *Minibuf-0*"));
+  empty_minibuf = get_minibuffer (0);
 
   FOR_EACH_FRAME (dummy, frame)
     {
@@ -1137,8 +1137,8 @@ function, instead of the usual behavior.  */)
        }
 
       result = Fcompleting_read (prompt, intern ("internal-complete-buffer"),
-                                Qnil, require_match, Qnil, Qbuffer_name_history,
-                                def, Qnil);
+                                Qnil, require_match, Qnil,
+                                Qbuffer_name_history, def, Qnil);
     }
   else
     {
@@ -1878,6 +1878,9 @@ the values STRING, PREDICATE and `lambda'.  */)
     return Qt;
 }
 
+Lisp_Object Qmetadata;
+extern Lisp_Object Qbuffer;
+
 DEFUN ("internal-complete-buffer", Finternal_complete_buffer, Sinternal_complete_buffer, 3, 3, 0,
        doc: /* Perform completion on buffer names.
 If 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',
          return res;
        }
     }
-  else                         /* assume `lambda' */
+  else if (EQ (flag, Qlambda))
     return Ftest_completion (string, Vbuffer_alist, predicate);
+  else if (EQ (flag, Qmetadata))
+    return Fcons (Qmetadata, Fcons (Fcons (Qcategory, Qbuffer), Qnil));
+  else
+    return Qnil;
 }
 
 /* Like assoc but assumes KEY is a string, and ignores case if appropriate.  */
@@ -1989,66 +1996,38 @@ syms_of_minibuf (void)
   minibuf_save_list = Qnil;
   staticpro (&minibuf_save_list);
 
-  Qcompleting_read_default = intern_c_string ("completing-read-default");
-  staticpro (&Qcompleting_read_default);
-
-  Qcompletion_ignore_case = intern_c_string ("completion-ignore-case");
-  staticpro (&Qcompletion_ignore_case);
-
-  Qread_file_name_internal = intern_c_string ("read-file-name-internal");
-  staticpro (&Qread_file_name_internal);
-
-  Qminibuffer_default = intern_c_string ("minibuffer-default");
-  staticpro (&Qminibuffer_default);
+  DEFSYM (Qcompleting_read_default, "completing-read-default");
+  DEFSYM (Qcompletion_ignore_case, "completion-ignore-case");
+  DEFSYM (Qread_file_name_internal, "read-file-name-internal");
+  DEFSYM (Qminibuffer_default, "minibuffer-default");
   Fset (Qminibuffer_default, Qnil);
 
-  Qminibuffer_completion_table = intern_c_string ("minibuffer-completion-table");
-  staticpro (&Qminibuffer_completion_table);
-
-  Qminibuffer_completion_confirm = intern_c_string ("minibuffer-completion-confirm");
-  staticpro (&Qminibuffer_completion_confirm);
-
-  Qminibuffer_completion_predicate = intern_c_string ("minibuffer-completion-predicate");
-  staticpro (&Qminibuffer_completion_predicate);
+  DEFSYM (Qminibuffer_completion_table, "minibuffer-completion-table");
+  DEFSYM (Qminibuffer_completion_confirm, "minibuffer-completion-confirm");
+  DEFSYM (Qminibuffer_completion_predicate, "minibuffer-completion-predicate");
 
   staticpro (&last_minibuf_string);
   last_minibuf_string = Qnil;
 
-  Quser_variable_p = intern_c_string ("user-variable-p");
-  staticpro (&Quser_variable_p);
-
-  Qminibuffer_history = intern_c_string ("minibuffer-history");
-  staticpro (&Qminibuffer_history);
-
-  Qbuffer_name_history = intern_c_string ("buffer-name-history");
-  staticpro (&Qbuffer_name_history);
+  DEFSYM (Quser_variable_p, "user-variable-p");
+  DEFSYM (Qminibuffer_history, "minibuffer-history");
+  DEFSYM (Qbuffer_name_history, "buffer-name-history");
   Fset (Qbuffer_name_history, Qnil);
 
-  Qminibuffer_setup_hook = intern_c_string ("minibuffer-setup-hook");
-  staticpro (&Qminibuffer_setup_hook);
-
-  Qminibuffer_exit_hook = intern_c_string ("minibuffer-exit-hook");
-  staticpro (&Qminibuffer_exit_hook);
-
-  Qhistory_length = intern_c_string ("history-length");
-  staticpro (&Qhistory_length);
-
-  Qcurrent_input_method = intern_c_string ("current-input-method");
-  staticpro (&Qcurrent_input_method);
-
-  Qactivate_input_method = intern_c_string ("activate-input-method");
-  staticpro (&Qactivate_input_method);
-
-  Qcase_fold_search = intern_c_string ("case-fold-search");
-  staticpro (&Qcase_fold_search);
+  DEFSYM (Qminibuffer_setup_hook, "minibuffer-setup-hook");
+  DEFSYM (Qminibuffer_exit_hook, "minibuffer-exit-hook");
+  DEFSYM (Qhistory_length, "history-length");
+  DEFSYM (Qcurrent_input_method, "current-input-method");
+  DEFSYM (Qactivate_input_method, "activate-input-method");
+  DEFSYM (Qcase_fold_search, "case-fold-search");
+  DEFSYM (Qmetadata, "metadata");
 
   DEFVAR_LISP ("read-expression-history", Vread_expression_history,
               doc: /* A history list for arguments that are Lisp expressions to evaluate.
 For example, `eval-expression' uses this.  */);
   Vread_expression_history = Qnil;
 
-  Qread_expression_history = intern_c_string ("read-expression-history");
-  staticpro (&Qread_expression_history);
+  DEFSYM (Qread_expression_history, "read-expression-history");
 
   DEFVAR_LISP ("read-buffer-function", Vread_buffer_function,
               doc: /* If this is non-nil, `read-buffer' does its work by calling this function.