aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2012-04-21 17:53:32 -0700
committerPaul Eggert2012-04-21 17:53:32 -0700
commitbbd347f5f7e99da1a559dad818b5fa8f59c0901e (patch)
tree77c1fc54c2240b08d2859109d18cac8812a8ffb1
parente4ecdc9c71af4199129d5dd2db1a32ff6b725fe4 (diff)
parent9ee7d8b93cb143b473e6dffb708e777bc6fe5bd0 (diff)
downloademacs-bbd347f5f7e99da1a559dad818b5fa8f59c0901e.tar.gz
emacs-bbd347f5f7e99da1a559dad818b5fa8f59c0901e.zip
Merge from trunk.
-rw-r--r--ChangeLog64
-rw-r--r--INSTALL6
-rw-r--r--Makefile.in5
-rw-r--r--admin/ChangeLog7
-rw-r--r--admin/FOR-RELEASE18
-rw-r--r--admin/bzrmerge.el6
-rw-r--r--admin/unidata/Makefile.in42
-rw-r--r--autogen/Makefile.in17
-rw-r--r--autogen/aclocal.m42
-rw-r--r--autogen/config.in21
-rwxr-xr-xautogen/configure880
-rw-r--r--configure.in212
-rw-r--r--doc/emacs/ChangeLog82
-rw-r--r--doc/emacs/Makefile.in20
-rw-r--r--doc/emacs/abbrevs.texi4
-rw-r--r--doc/emacs/ack.texi8
-rw-r--r--doc/emacs/arevert-xtra.texi4
-rw-r--r--doc/emacs/basic.texi10
-rw-r--r--doc/emacs/buffers.texi28
-rw-r--r--doc/emacs/building.texi100
-rw-r--r--doc/emacs/cmdargs.texi6
-rw-r--r--doc/emacs/commands.texi2
-rw-r--r--doc/emacs/custom.texi29
-rw-r--r--doc/emacs/display.texi44
-rw-r--r--doc/emacs/emacs.texi4
-rw-r--r--doc/emacs/entering.texi28
-rw-r--r--doc/emacs/files.texi6
-rw-r--r--doc/emacs/fixit.texi6
-rw-r--r--doc/emacs/frames.texi35
-rw-r--r--doc/emacs/glossary.texi20
-rw-r--r--doc/emacs/help.texi6
-rw-r--r--doc/emacs/macos.texi2
-rw-r--r--doc/emacs/maintaining.texi32
-rw-r--r--doc/emacs/mini.texi2
-rw-r--r--doc/emacs/misc.texi114
-rw-r--r--doc/emacs/msdog-xtra.texi2
-rw-r--r--doc/emacs/msdog.texi10
-rw-r--r--doc/emacs/mule.texi398
-rw-r--r--doc/emacs/package.texi2
-rw-r--r--doc/emacs/programs.texi6
-rw-r--r--doc/emacs/screen.texi43
-rw-r--r--doc/emacs/search.texi4
-rw-r--r--doc/emacs/sending.texi4
-rw-r--r--doc/emacs/text.texi4
-rw-r--r--doc/emacs/trouble.texi29
-rw-r--r--doc/emacs/windows.texi4
-rw-r--r--doc/lispintro/ChangeLog4
-rw-r--r--doc/lispintro/Makefile.in13
-rw-r--r--doc/lispref/ChangeLog130
-rw-r--r--doc/lispref/Makefile.in11
-rw-r--r--doc/lispref/abbrevs.texi1
-rw-r--r--doc/lispref/advice.texi1
-rw-r--r--doc/lispref/anti.texi18
-rw-r--r--doc/lispref/backups.texi3
-rw-r--r--doc/lispref/buffers.texi5
-rw-r--r--doc/lispref/commands.texi1
-rw-r--r--doc/lispref/compile.texi11
-rw-r--r--doc/lispref/control.texi3
-rw-r--r--doc/lispref/customize.texi199
-rw-r--r--doc/lispref/debugging.texi11
-rw-r--r--doc/lispref/display.texi76
-rw-r--r--doc/lispref/edebug.texi18
-rw-r--r--doc/lispref/elisp.texi10
-rw-r--r--doc/lispref/errors.texi1
-rw-r--r--doc/lispref/eval.texi5
-rw-r--r--doc/lispref/files.texi23
-rw-r--r--doc/lispref/frames.texi3
-rw-r--r--doc/lispref/functions.texi1
-rw-r--r--doc/lispref/gpl.texi1
-rw-r--r--doc/lispref/hash.texi3
-rw-r--r--doc/lispref/help.texi28
-rw-r--r--doc/lispref/hooks.texi1
-rw-r--r--doc/lispref/index.texi1
-rw-r--r--doc/lispref/internals.texi1
-rw-r--r--doc/lispref/intro.texi5
-rw-r--r--doc/lispref/keymaps.texi20
-rw-r--r--doc/lispref/lists.texi3
-rw-r--r--doc/lispref/loading.texi5
-rw-r--r--doc/lispref/macros.texi3
-rw-r--r--doc/lispref/maps.texi1
-rw-r--r--doc/lispref/markers.texi1
-rw-r--r--doc/lispref/minibuf.texi383
-rw-r--r--doc/lispref/modes.texi17
-rw-r--r--doc/lispref/nonascii.texi3
-rw-r--r--doc/lispref/numbers.texi1
-rw-r--r--doc/lispref/objects.texi3
-rw-r--r--doc/lispref/os.texi47
-rw-r--r--doc/lispref/package.texi3
-rw-r--r--doc/lispref/positions.texi3
-rw-r--r--doc/lispref/processes.texi675
-rw-r--r--doc/lispref/searching.texi1
-rw-r--r--doc/lispref/sequences.texi1
-rw-r--r--doc/lispref/streams.texi3
-rw-r--r--doc/lispref/strings.texi3
-rw-r--r--doc/lispref/symbols.texi3
-rw-r--r--doc/lispref/syntax.texi1
-rw-r--r--doc/lispref/text.texi5
-rw-r--r--doc/lispref/tips.texi1
-rw-r--r--doc/lispref/variables.texi1
-rw-r--r--doc/lispref/vol1.texi10
-rw-r--r--doc/lispref/vol2.texi10
-rw-r--r--doc/lispref/windows.texi1
-rw-r--r--doc/misc/ChangeLog26
-rw-r--r--doc/misc/Makefile.in308
-rw-r--r--doc/misc/cc-mode.texi2
-rw-r--r--doc/misc/faq.texi88
-rw-r--r--doc/misc/org.texi33
-rw-r--r--etc/CONTRIBUTE25
-rw-r--r--etc/ChangeLog10
-rw-r--r--etc/MORE.STUFF137
-rw-r--r--etc/NEWS54
-rw-r--r--etc/TODO28
-rw-r--r--etc/publicsuffix.txt5189
-rw-r--r--etc/refcards/orgcard.pdfbin118613 -> 118982 bytes
-rw-r--r--etc/refcards/orgcard.tex2
-rw-r--r--lib-src/ChangeLog31
-rw-r--r--lib-src/Makefile.in6
-rw-r--r--lib-src/emacsclient.c41
-rw-r--r--lib-src/update-game-score.c5
-rw-r--r--lib/Makefile.am1
-rw-r--r--lib/gnulib.mk2
-rw-r--r--lisp/ChangeLog730
-rw-r--r--lisp/ChangeLog.112
-rw-r--r--lisp/ChangeLog.122
-rw-r--r--lisp/ChangeLog.62
-rw-r--r--lisp/abbrev.el17
-rw-r--r--lisp/avoid.el66
-rw-r--r--lisp/battery.el111
-rw-r--r--lisp/bindings.el1
-rw-r--r--lisp/bs.el2
-rw-r--r--lisp/calendar/cal-tex.el5
-rw-r--r--lisp/calendar/holidays.el2
-rw-r--r--lisp/comint.el34
-rw-r--r--lisp/cus-start.el15
-rw-r--r--lisp/custom.el21
-rw-r--r--lisp/descr-text.el2
-rw-r--r--lisp/dired-aux.el17
-rw-r--r--lisp/dired.el2
-rw-r--r--lisp/electric.el1
-rw-r--r--lisp/emacs-lisp/authors.el7
-rw-r--r--lisp/emacs-lisp/autoload.el3
-rw-r--r--lisp/emacs-lisp/avl-tree.el2
-rw-r--r--lisp/emacs-lisp/cl-extra.el3
-rw-r--r--lisp/emacs-lisp/cl-loaddefs.el2
-rw-r--r--lisp/emacs-lisp/easy-mmode.el2
-rw-r--r--lisp/emacs-lisp/eieio-opt.el6
-rw-r--r--lisp/emacs-lisp/eieio.el4
-rw-r--r--lisp/emacs-lisp/ert-x.el2
-rw-r--r--lisp/emacs-lisp/lisp.el16
-rw-r--r--lisp/emacs-lisp/package.el15
-rw-r--r--lisp/emacs-lisp/regexp-opt.el27
-rw-r--r--lisp/emacs-lisp/smie.el31
-rw-r--r--lisp/emacs-lisp/tabulated-list.el4
-rw-r--r--lisp/emacs-lock.el40
-rw-r--r--lisp/emulation/cua-base.el39
-rw-r--r--lisp/emulation/cua-rect.el77
-rw-r--r--lisp/erc/ChangeLog20
-rw-r--r--lisp/erc/erc-join.el27
-rw-r--r--lisp/erc/erc-services.el3
-rw-r--r--lisp/erc/erc.el1
-rw-r--r--lisp/files.el3
-rw-r--r--lisp/font-lock.el8
-rw-r--r--lisp/frame.el23
-rw-r--r--lisp/gnus/ChangeLog20
-rw-r--r--lisp/gnus/gnus-art.el4
-rw-r--r--lisp/gnus/gnus-msg.el8
-rw-r--r--lisp/gnus/gnus-start.el4
-rw-r--r--lisp/gnus/nndraft.el3
-rw-r--r--lisp/hexl.el110
-rw-r--r--lisp/image.el72
-rw-r--r--lisp/imenu.el51
-rw-r--r--lisp/international/characters.el10
-rw-r--r--lisp/international/mule-cmds.el6
-rw-r--r--lisp/international/mule.el5
-rw-r--r--lisp/international/quail.el58
-rw-r--r--lisp/language/european.el8
-rw-r--r--lisp/loadup.el2
-rw-r--r--lisp/mail/feedmail.el2
-rw-r--r--lisp/mail/rmail.el26
-rw-r--r--lisp/mail/sendmail.el10
-rw-r--r--lisp/mail/unrmail.el3
-rw-r--r--lisp/mh-e/ChangeLog5
-rw-r--r--lisp/mh-e/mh-folder.el2
-rw-r--r--lisp/minibuffer.el26
-rw-r--r--lisp/misc.el15
-rw-r--r--lisp/mouse.el11
-rw-r--r--lisp/mpc.el9
-rw-r--r--lisp/net/browse-url.el8
-rw-r--r--lisp/net/dbus.el4
-rw-r--r--lisp/net/network-stream.el5
-rw-r--r--lisp/net/rcirc.el50
-rw-r--r--lisp/net/tls.el3
-rw-r--r--lisp/net/tramp.el11
-rw-r--r--lisp/newcomment.el18
-rw-r--r--lisp/nxml/nxml-mode.el13
-rw-r--r--lisp/obsolete/mailpost.el (renamed from lisp/mail/mailpost.el)1
-rw-r--r--lisp/obsolete/mouse-sel.el (renamed from lisp/mouse-sel.el)3
-rw-r--r--lisp/org/ChangeLog46
-rw-r--r--lisp/org/ob-C.el2
-rw-r--r--lisp/org/org-agenda.el14
-rw-r--r--lisp/org/org-clock.el15
-rw-r--r--lisp/org/org-footnote.el2
-rw-r--r--lisp/org/org-pcomplete.el4
-rw-r--r--lisp/org/org-special-blocks.el12
-rw-r--r--lisp/org/org-table.el13
-rw-r--r--lisp/org/org.el40
-rw-r--r--lisp/pcmpl-rpm.el16
-rw-r--r--lisp/play/cookie1.el2
-rw-r--r--lisp/play/yow.el8
-rw-r--r--lisp/progmodes/cc-cmds.el39
-rw-r--r--lisp/progmodes/cc-engine.el5
-rw-r--r--lisp/progmodes/cc-menus.el41
-rw-r--r--lisp/progmodes/cc-mode.el4
-rw-r--r--lisp/progmodes/flymake.el8
-rw-r--r--lisp/progmodes/gdb-mi.el123
-rw-r--r--lisp/progmodes/grep.el16
-rw-r--r--lisp/progmodes/gud.el4
-rw-r--r--lisp/progmodes/hideshow.el11
-rw-r--r--lisp/progmodes/perl-mode.el22
-rw-r--r--lisp/progmodes/python.el14
-rw-r--r--lisp/progmodes/verilog-mode.el2
-rw-r--r--lisp/progmodes/which-func.el11
-rw-r--r--lisp/recentf.el2
-rw-r--r--lisp/scroll-all.el1
-rw-r--r--lisp/server.el144
-rw-r--r--lisp/ses.el124
-rw-r--r--lisp/simple.el56
-rw-r--r--lisp/speedbar.el4
-rw-r--r--lisp/startup.el37
-rw-r--r--lisp/subr.el120
-rw-r--r--lisp/tar-mode.el5
-rw-r--r--lisp/textmodes/artist.el42
-rw-r--r--lisp/textmodes/fill.el5
-rw-r--r--lisp/textmodes/flyspell.el9
-rw-r--r--lisp/textmodes/ispell.el41
-rw-r--r--lisp/textmodes/picture.el134
-rw-r--r--lisp/textmodes/tex-mode.el15
-rw-r--r--lisp/textmodes/two-column.el204
-rw-r--r--lisp/tmm.el64
-rw-r--r--lisp/tutorial.el3
-rw-r--r--lisp/url/ChangeLog18
-rw-r--r--lisp/url/url-cookie.el45
-rw-r--r--lisp/url/url-domsuf.el98
-rw-r--r--lisp/url/url-util.el3
-rw-r--r--lisp/url/url.el11
-rw-r--r--lisp/vc/diff-mode.el2
-rw-r--r--lisp/vc/pcvs-util.el4
-rw-r--r--lisp/vc/pcvs.el14
-rw-r--r--lisp/vc/vc-annotate.el28
-rw-r--r--lisp/vc/vc-bzr.el122
-rw-r--r--lisp/vc/vc-dir.el14
-rw-r--r--lisp/vc/vc-dispatcher.el3
-rw-r--r--lisp/vc/vc-hg.el1
-rw-r--r--lisp/vc/vc.el12
-rw-r--r--lisp/vcursor.el7
-rw-r--r--lisp/version.el49
-rw-r--r--lisp/window.el145
-rw-r--r--lisp/woman.el107
-rw-r--r--lwlib/ChangeLog14
-rw-r--r--lwlib/Makefile.in10
-rw-r--r--m4/gl-comp.m45
-rw-r--r--m4/manywarnings.m4184
-rw-r--r--m4/warnings.m442
-rw-r--r--msdos/ChangeLog24
-rw-r--r--msdos/sed1v2.inp11
-rw-r--r--msdos/sed3v2.inp4
-rw-r--r--msdos/sedleim.inp19
-rw-r--r--msdos/sedlibmk.inp10
-rw-r--r--nt/ChangeLog12
-rw-r--r--nt/makefile.w32-in14
-rw-r--r--oldXMenu/ChangeLog14
-rw-r--r--oldXMenu/Makefile.in12
-rw-r--r--src/ChangeLog197
-rw-r--r--src/ChangeLog.102
-rw-r--r--src/ChangeLog.112
-rw-r--r--src/ChangeLog.62
-rw-r--r--src/Makefile.in15
-rw-r--r--src/alloc.c114
-rw-r--r--src/buffer.c11
-rw-r--r--src/character.h2
-rw-r--r--src/dired.c41
-rw-r--r--src/indent.c3
-rw-r--r--src/keyboard.c23
-rw-r--r--src/lisp.h39
-rw-r--r--src/lisp.mk1
-rw-r--r--src/lread.c5
-rw-r--r--src/m/ia64.h10
-rw-r--r--src/nsterm.m8
-rw-r--r--src/print.c90
-rw-r--r--src/process.c50
-rw-r--r--src/ralloc.c60
-rw-r--r--src/regex.c17
-rw-r--r--src/s/aix4-2.h4
-rw-r--r--src/s/cygwin.h13
-rw-r--r--src/s/darwin.h3
-rw-r--r--src/s/freebsd.h3
-rw-r--r--src/s/gnu-linux.h3
-rw-r--r--src/s/gnu.h3
-rw-r--r--src/s/hpux10-20.h4
-rw-r--r--src/s/irix6-5.h1
-rw-r--r--src/s/msdos.h1
-rw-r--r--src/s/netbsd.h3
-rw-r--r--src/s/sol2-6.h1
-rw-r--r--src/s/unixware.h4
-rw-r--r--src/sysdep.c211
-rw-r--r--src/w32.c10
-rw-r--r--src/window.c2
-rw-r--r--src/xdisp.c31
-rw-r--r--test/ChangeLog4
-rw-r--r--test/automated/vc-bzr.el29
310 files changed, 12248 insertions, 3461 deletions
diff --git a/ChangeLog b/ChangeLog
index a1b9a9ca7df..ca3bcff5a8c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,64 @@
12012-04-21 Paul Eggert <eggert@cs.ucla.edu>
2
3 Sync from gnulib version 4f11d6bebc3098c64ffde27079ab0d0cecfd0cdc
4 dated 2011-10-07. Regenerating from current gnulib would be a
5 pervasive change, and currently the trunk isn't open to such changes.
6 * configure.in (WARN_CFLAGS): Remove; no longer needed now
7 that gnulib does it.
8 * lib/gnulib.mk, m4/gl-comp.m4: Regenerate.
9
102012-04-21 Andreas Schwab <schwab@linux-m68k.org>
11
12 * m4/gl-comp.m4: Update. (Bug#11285)
13
142012-04-20 Ludovic Courtès <ludo@gnu.org>
15
16 * configure.in: Don't use the -R option (Bug#11251).
17
182012-04-18 Paul Eggert <eggert@cs.ucla.edu>
19
20 configure: new option --enable-gcc-warnings (Bug#11207)
21 I have been using this change for many months in my private copy
22 of Emacs, and have used it to find several bugs. It's mature
23 enough to publish now.
24 * Makefile.in (GNULIB_MODULES): Add warnings, manywarnings.
25 * configure.in: Support --enable-gcc-warnings, in the style of
26 other GNU packages such as coreutils.
27 (C_WARNINGS_SWITCH): Remove, replacing with...
28 (WARN_CFLAGS, GNULIB_WARN_CFLAGS): New variable.
29 (PKG_CHECK_MODULES, C_SWITCH_X_SITE): Use -isystem rather than -I,
30 when including system files with GCC.
31 * etc/NEWS: Mention --enable-gcc-warnings.
32 * INSTALL (DETAILED BUILDING AND INSTALLATION): Likewise.
33 * lib/Makefile.am (AM_CFLAGS): New macro.
34 * m4/manywarnings.m4, m4/warnings.m4: New files, from gnulib.
35
362012-04-17 Dmitry Antipov <dmantipov@yandex.ru>
37
38 * configure.in (AC_CHECK_FUNCS):
39 Add getpwent, endpwent, getgrent, endgrent. (Bug#7900)
40
412012-04-16 Glenn Morris <rgm@gnu.org>
42
43 * configure.in (NS_HAVE_NSINTEGER): Remove unnecessary variable.
44
45 * configure.in: Remove X libs workaround for old autoconf.
46
472012-04-12 Ken Brown <kbrown@cornell.edu>
48
49 * configure.in: Warn that Cygwin 1.5 is unsupported. (Bug#10398)
50
512012-04-11 Glenn Morris <rgm@gnu.org>
52
53 * configure.in (GNUSTEP_CFLAGS): Rename from C_SWITCH_X_SYSTEM.
54
552012-04-10 Glenn Morris <rgm@gnu.org>
56
57 * configure.in: Conditionally generate admin/unidata/Makefile.
58
12012-04-09 Teodor Zlatanov <tzz@lifelogs.com> 592012-04-09 Teodor Zlatanov <tzz@lifelogs.com>
2 60
3 * info/dir (File): 61 * info/dir, Makefile.in (INFO_FILES): Add emacs-gnutls manual.
4 * Makefile.in: Add emacs-gnutls to the info directory and the
5 INFO_FILES target.
6 62
72012-04-09 Glenn Morris <rgm@gnu.org> 632012-04-09 Glenn Morris <rgm@gnu.org>
8 64
@@ -2298,7 +2354,7 @@
2298 2354
22992010-03-12 Eli Zaretskii <eliz@gnu.org> 23552010-03-12 Eli Zaretskii <eliz@gnu.org>
2300 2356
2301 These changes remove termcap.c from the build on Posix platforms. 2357 These changes remove termcap.c from the build on POSIX platforms.
2302 * configure.in <AC_CHECK_HEADERS>: Remove termcap.h. 2358 * configure.in <AC_CHECK_HEADERS>: Remove termcap.h.
2303 2359
2304 * configure: Regenerated. 2360 * configure: Regenerated.
diff --git a/INSTALL b/INSTALL
index 1e0844879cb..1df686ae636 100644
--- a/INSTALL
+++ b/INSTALL
@@ -317,6 +317,12 @@ Use --with-wide-int to implement Emacs values with the type 'long long',
317even on hosts where a narrower type would do. With this option, on a 317even on hosts where a narrower type would do. With this option, on a
318typical 32-bit host, Emacs integers have 62 bits instead of 30. 318typical 32-bit host, Emacs integers have 62 bits instead of 30.
319 319
320Use --enable-gcc-warnings to enable compile-time checks that warn
321about possibly-questionable C code. This is intended for developers
322and is useful with GNU-compatible compilers. On a recent GNU system
323there should be no warnings; on older and on non-GNU systems the
324generated warnings may still be useful.
325
320The `--prefix=PREFIXDIR' option specifies where the installation process 326The `--prefix=PREFIXDIR' option specifies where the installation process
321should put emacs and its data files. This defaults to `/usr/local'. 327should put emacs and its data files. This defaults to `/usr/local'.
322- Emacs (and the other utilities users run) go in PREFIXDIR/bin 328- Emacs (and the other utilities users run) go in PREFIXDIR/bin
diff --git a/Makefile.in b/Makefile.in
index 8851384162b..1746412dfa5 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -336,8 +336,9 @@ GNULIB_MODULES = \
336 careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr \ 336 careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr \
337 dup2 \ 337 dup2 \
338 filemode getloadavg getopt-gnu ignore-value intprops lstat \ 338 filemode getloadavg getopt-gnu ignore-value intprops lstat \
339 mktime pthread_sigmask readlink \ 339 manywarnings mktime pthread_sigmask readlink \
340 socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat 340 socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat \
341 warnings
341GNULIB_TOOL_FLAGS = \ 342GNULIB_TOOL_FLAGS = \
342 --avoid=msvc-inval --avoid=msvc-nothrow \ 343 --avoid=msvc-inval --avoid=msvc-nothrow \
343 --avoid=raise --avoid=threadlib \ 344 --avoid=raise --avoid=threadlib \
diff --git a/admin/ChangeLog b/admin/ChangeLog
index ac2323c77d0..a3a756bde64 100644
--- a/admin/ChangeLog
+++ b/admin/ChangeLog
@@ -1,3 +1,10 @@
12012-04-10 Glenn Morris <rgm@gnu.org>
2
3 * bzrmerge.el (bzrmerge-skip-regexp): Add "from trunk".
4
5 * unidata/Makefile.in: Add FSF copyright.
6 Make it use autoconf features, and work for out-of-tree builds.
7
12012-04-07 Eli Zaretskii <eliz@gnu.org> 82012-04-07 Eli Zaretskii <eliz@gnu.org>
2 9
3 * unidata/README: 10 * unidata/README:
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE
index f1bfa35a2b8..ad427397524 100644
--- a/admin/FOR-RELEASE
+++ b/admin/FOR-RELEASE
@@ -53,12 +53,17 @@ pt-br Rodrigo Real
53ru Alex Ott 53ru Alex Ott
54sk Miroslav Vaško 54sk Miroslav Vaško
55 55
56** For a major release, add a "New in Emacs XX" section to faq.texi.
57
56** Remove temporary +++/--- lines in NEWS. 58** Remove temporary +++/--- lines in NEWS.
57 59
58** Try to reorder NEWS: most important things first, related items together. 60** Try to reorder NEWS: most important things first, related items together.
59 61
60** Consider bumping customize-changed-options-previous-release. 62** Consider bumping customize-changed-options-previous-release.
61 63
64** cusver-check from admin.el cam help find new defcustoms missing
65:version tags.
66
62* BUGS 67* BUGS
63 68
64** Check for modes which bind M-s that conflicts with a new global binding M-s 69** Check for modes which bind M-s that conflicts with a new global binding M-s
@@ -155,13 +160,8 @@ mini.texi rgm
155misc.texi cyd 160misc.texi cyd
156modes.texi cyd 161modes.texi cyd
157msdog.texi rgm (can't actually test any of it though) 162msdog.texi rgm (can't actually test any of it though)
158 It was not obvious to me that the following is true (it could well be though):
159
160 Emacs on Windows automatically determines your default printer and
161 sets the variable `printer-name' to that printer's name.
162
163msdog-xtra.texi rgm (can't actually test any of it though) 163msdog-xtra.texi rgm (can't actually test any of it though)
164mule.texi 164mule.texi rgm (not 100% sure about "Fontsets")
165m-x.texi cyd 165m-x.texi cyd
166package.texi cyd 166package.texi cyd
167picture-xtra.texi rgm 167picture-xtra.texi rgm
@@ -182,7 +182,7 @@ xresources.texi cyd
182 182
183abbrevs.texi rgm 183abbrevs.texi rgm
184advice.texi cyd 184advice.texi cyd
185anti.texi 185anti.texi rgm
186back.texi rgm 186back.texi rgm
187backups.texi cyd 187backups.texi cyd
188buffers.texi cyd 188buffers.texi cyd
@@ -211,7 +211,7 @@ loading.texi cyd
211macros.texi cyd 211macros.texi cyd
212maps.texi rgm 212maps.texi rgm
213markers.texi rgm 213markers.texi rgm
214minibuf.texi 214minibuf.texi rgm
215modes.texi cyd 215modes.texi cyd
216nonascii.texi cyd 216nonascii.texi cyd
217numbers.texi cyd 217numbers.texi cyd
@@ -219,7 +219,7 @@ objects.texi cyd
219os.texi cyd 219os.texi cyd
220package.texi rgm 220package.texi rgm
221positions.texi cyd 221positions.texi cyd
222processes.texi 222processes.texi rgm
223searching.texi rgm 223searching.texi rgm
224sequences.texi cyd 224sequences.texi cyd
225streams.texi cyd 225streams.texi cyd
diff --git a/admin/bzrmerge.el b/admin/bzrmerge.el
index cb63d5b16ba..0c72c8b5c93 100644
--- a/admin/bzrmerge.el
+++ b/admin/bzrmerge.el
@@ -1,9 +1,9 @@
1;;; bzrmerge.el --- help merge one Emacs bzr branch to another 1;;; bzrmerge.el --- help merge one Emacs bzr branch to another
2 2
3;; Copyright (C) 2010-2012 Free Software Foundation, Inc. 3;; Copyright (C) 2010-2012 Free Software Foundation, Inc.
4 4
5;; Author: Stefan Monnier <monnier@iro.umontreal.ca> 5;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
6;; Keywords: 6;; Keywords: maint
7 7
8;; GNU Emacs is free software: you can redistribute it and/or modify 8;; GNU Emacs is free software: you can redistribute it and/or modify
9;; it under the terms of the GNU General Public License as published by 9;; it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@
28 (require 'cl)) ; assert 28 (require 'cl)) ; assert
29 29
30(defvar bzrmerge-skip-regexp 30(defvar bzrmerge-skip-regexp
31 "back[- ]?port\\|merge\\|sync\\|re-?generate\\|bump version" 31 "back[- ]?port\\|merge\\|sync\\|re-?generate\\|bump version\\|from trunk"
32 "Regexp matching logs of revisions that might be skipped. 32 "Regexp matching logs of revisions that might be skipped.
33`bzrmerge-missing' will ask you if it should skip any matches.") 33`bzrmerge-missing' will ask you if it should skip any matches.")
34 34
diff --git a/admin/unidata/Makefile.in b/admin/unidata/Makefile.in
index c890dad8903..ecbd0490246 100644
--- a/admin/unidata/Makefile.in
+++ b/admin/unidata/Makefile.in
@@ -1,4 +1,7 @@
1# Makefile -- Makefile to generate character property tables. 1# Makefile -- Makefile to generate character property tables.
2
3# Copyright (C) 2012 Free Software Foundation, Inc.
4
2# Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 5# Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011
3# National Institute of Advanced Industrial Science and Technology (AIST) 6# National Institute of Advanced Industrial Science and Technology (AIST)
4# Registration Number H13PRO009 7# Registration Number H13PRO009
@@ -18,25 +21,33 @@
18# You should have received a copy of the GNU General Public License 21# You should have received a copy of the GNU General Public License
19# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. 22# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
20 23
24SHELL = /bin/sh
25
26srcdir = @srcdir@
27abs_builddir = @abs_builddir@
28top_srcdir = @top_srcdir@
29abs_top_builddir = @abs_top_builddir@
21 30
22EMACS = ../../src/emacs 31EMACS = ${abs_top_builddir}/src/emacs
23DSTDIR = ../../lisp/international 32DSTDIR = ${top_srcdir}/lisp/international
24RUNEMACS = ${EMACS} -Q -batch 33emacs = ${EMACS} -batch --no-site-file --no-site-lisp
25 34
26all: ${DSTDIR}/charprop.el 35all: ${DSTDIR}/charprop.el
27 36
28.el.elc: 37.el.elc:
29 ${RUNEMACS} -batch -f batch-byte-compile $< 38 ${emacs} -f batch-byte-compile $<
30 39
31unidata.txt: UnicodeData.txt 40unidata.txt: ${srcdir}/UnicodeData.txt
32 sed -e 's/\([^;]*\);\(.*\)/(#x\1 "\2")/' -e 's/;/" "/g' < UnicodeData.txt > $@ 41 sed -e 's/\([^;]*\);\(.*\)/(#x\1 "\2")/' -e 's/;/" "/g' < ${srcdir}/UnicodeData.txt > $@
33 42
34${DSTDIR}/charprop.el: unidata-gen.elc unidata.txt 43${DSTDIR}/charprop.el: ${srcdir}/unidata-gen.elc unidata.txt
35 ELC=`/bin/pwd`/unidata-gen.elc; \ 44 cd ${DSTDIR} && ${emacs} -l ${srcdir}/unidata-gen \
36 DATADIR=`/bin/pwd`; \ 45 -f unidata-gen-files ${srcdir} ${abs_builddir}/unidata.txt
37 DATA=unidata.txt; \ 46
38 cd ${DSTDIR}; \ 47## Like the above, but generate in PWD rather than lisp/international.
39 ${RUNEMACS} -batch --load $${ELC} -f unidata-gen-files $${DATADIR} $${DATA} 48charprop.el: ${srcdir}/unidata-gen.elc unidata.txt
49 ${emacs} -l ${srcdir}/unidata-gen \
50 -f unidata-gen-files ${srcdir} unidata.txt
40 51
41install: charprop.el 52install: charprop.el
42 cp charprop.el ${DSTDIR} 53 cp charprop.el ${DSTDIR}
@@ -46,4 +57,9 @@ clean:
46 if test -f charprop.el; then \ 57 if test -f charprop.el; then \
47 rm -f `sed -n 's/^;; FILE: //p' < charprop.el`; \ 58 rm -f `sed -n 's/^;; FILE: //p' < charprop.el`; \
48 fi 59 fi
49 rm -f charprop.el unidata-gen.elc unidata.txt 60 rm -f charprop.el ${srcdir}/unidata-gen.elc unidata.txt
61
62distclean: clean
63 -rm -f ./Makefile
64
65maintainer-clean: distclean
diff --git a/autogen/Makefile.in b/autogen/Makefile.in
index 4ade989d095..d395a17bef9 100644
--- a/autogen/Makefile.in
+++ b/autogen/Makefile.in
@@ -70,9 +70,10 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
70 $(top_srcdir)/m4/gnulib-common.m4 \ 70 $(top_srcdir)/m4/gnulib-common.m4 \
71 $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inttypes.m4 \ 71 $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inttypes.m4 \
72 $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/longlong.m4 \ 72 $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/longlong.m4 \
73 $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/md5.m4 \ 73 $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/manywarnings.m4 \
74 $(top_srcdir)/m4/mktime.m4 $(top_srcdir)/m4/multiarch.m4 \ 74 $(top_srcdir)/m4/md5.m4 $(top_srcdir)/m4/mktime.m4 \
75 $(top_srcdir)/m4/nocrash.m4 $(top_srcdir)/m4/pathmax.m4 \ 75 $(top_srcdir)/m4/multiarch.m4 $(top_srcdir)/m4/nocrash.m4 \
76 $(top_srcdir)/m4/pathmax.m4 \
76 $(top_srcdir)/m4/pthread_sigmask.m4 \ 77 $(top_srcdir)/m4/pthread_sigmask.m4 \
77 $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/sha1.m4 \ 78 $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/sha1.m4 \
78 $(top_srcdir)/m4/sha256.m4 $(top_srcdir)/m4/sha512.m4 \ 79 $(top_srcdir)/m4/sha256.m4 $(top_srcdir)/m4/sha512.m4 \
@@ -88,7 +89,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
88 $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_stat_h.m4 \ 89 $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_stat_h.m4 \
89 $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/time_r.m4 \ 90 $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/time_r.m4 \
90 $(top_srcdir)/m4/tm_gmtoff.m4 $(top_srcdir)/m4/unistd_h.m4 \ 91 $(top_srcdir)/m4/tm_gmtoff.m4 $(top_srcdir)/m4/unistd_h.m4 \
91 $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/configure.in 92 $(top_srcdir)/m4/warnings.m4 $(top_srcdir)/m4/wchar_t.m4 \
93 $(top_srcdir)/configure.in
92am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 94am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
93 $(ACLOCAL_M4) 95 $(ACLOCAL_M4)
94mkinstalldirs = $(install_sh) -d 96mkinstalldirs = $(install_sh) -d
@@ -152,8 +154,6 @@ CYGWIN_OBJ = @CYGWIN_OBJ@
152C_SWITCH_MACHINE = @C_SWITCH_MACHINE@ 154C_SWITCH_MACHINE = @C_SWITCH_MACHINE@
153C_SWITCH_SYSTEM = @C_SWITCH_SYSTEM@ 155C_SWITCH_SYSTEM = @C_SWITCH_SYSTEM@
154C_SWITCH_X_SITE = @C_SWITCH_X_SITE@ 156C_SWITCH_X_SITE = @C_SWITCH_X_SITE@
155C_SWITCH_X_SYSTEM = @C_SWITCH_X_SYSTEM@
156C_WARNINGS_SWITCH = @C_WARNINGS_SWITCH@
157DBUS_CFLAGS = @DBUS_CFLAGS@ 157DBUS_CFLAGS = @DBUS_CFLAGS@
158DBUS_LIBS = @DBUS_LIBS@ 158DBUS_LIBS = @DBUS_LIBS@
159DBUS_OBJ = @DBUS_OBJ@ 159DBUS_OBJ = @DBUS_OBJ@
@@ -329,9 +329,11 @@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
329GNULIB_VSCANF = @GNULIB_VSCANF@ 329GNULIB_VSCANF = @GNULIB_VSCANF@
330GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ 330GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
331GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ 331GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
332GNULIB_WARN_CFLAGS = @GNULIB_WARN_CFLAGS@
332GNULIB_WCTOMB = @GNULIB_WCTOMB@ 333GNULIB_WCTOMB = @GNULIB_WCTOMB@
333GNULIB_WRITE = @GNULIB_WRITE@ 334GNULIB_WRITE = @GNULIB_WRITE@
334GNULIB__EXIT = @GNULIB__EXIT@ 335GNULIB__EXIT = @GNULIB__EXIT@
336GNUSTEP_CFLAGS = @GNUSTEP_CFLAGS@
335GNU_OBJC_CFLAGS = @GNU_OBJC_CFLAGS@ 337GNU_OBJC_CFLAGS = @GNU_OBJC_CFLAGS@
336GREP = @GREP@ 338GREP = @GREP@
337GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@ 339GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
@@ -695,7 +697,9 @@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
695UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ 697UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
696VERSION = @VERSION@ 698VERSION = @VERSION@
697VMLIMIT_OBJ = @VMLIMIT_OBJ@ 699VMLIMIT_OBJ = @VMLIMIT_OBJ@
700WARN_CFLAGS = @WARN_CFLAGS@
698WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ 701WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
702WERROR_CFLAGS = @WERROR_CFLAGS@
699WIDGET_OBJ = @WIDGET_OBJ@ 703WIDGET_OBJ = @WIDGET_OBJ@
700WINT_T_SUFFIX = @WINT_T_SUFFIX@ 704WINT_T_SUFFIX = @WINT_T_SUFFIX@
701XFT_CFLAGS = @XFT_CFLAGS@ 705XFT_CFLAGS = @XFT_CFLAGS@
@@ -814,6 +818,7 @@ MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t getopt.h \
814 stdio.h-t stdlib.h stdlib.h-t sys/stat.h sys/stat.h-t time.h \ 818 stdio.h-t stdlib.h stdlib.h-t sys/stat.h sys/stat.h-t time.h \
815 time.h-t unistd.h unistd.h-t 819 time.h-t unistd.h unistd.h-t
816noinst_LIBRARIES = libgnu.a 820noinst_LIBRARIES = libgnu.a
821AM_CFLAGS = $(GNULIB_WARN_CFLAGS) $(WERROR_CFLAGS)
817DEFAULT_INCLUDES = -I. -I../src -I$(top_srcdir)/src 822DEFAULT_INCLUDES = -I. -I../src -I$(top_srcdir)/src
818libgnu_a_SOURCES = allocator.c careadlinkat.c md5.c sha1.c sha256.c \ 823libgnu_a_SOURCES = allocator.c careadlinkat.c md5.c sha1.c sha256.c \
819 sha512.c dtoastr.c filemode.c $(am__append_1) strftime.c 824 sha512.c dtoastr.c filemode.c $(am__append_1) strftime.c
diff --git a/autogen/aclocal.m4 b/autogen/aclocal.m4
index 5fd9650b86b..f74fb730dc9 100644
--- a/autogen/aclocal.m4
+++ b/autogen/aclocal.m4
@@ -999,6 +999,7 @@ m4_include([m4/inttypes.m4])
999m4_include([m4/largefile.m4]) 999m4_include([m4/largefile.m4])
1000m4_include([m4/longlong.m4]) 1000m4_include([m4/longlong.m4])
1001m4_include([m4/lstat.m4]) 1001m4_include([m4/lstat.m4])
1002m4_include([m4/manywarnings.m4])
1002m4_include([m4/md5.m4]) 1003m4_include([m4/md5.m4])
1003m4_include([m4/mktime.m4]) 1004m4_include([m4/mktime.m4])
1004m4_include([m4/multiarch.m4]) 1005m4_include([m4/multiarch.m4])
@@ -1032,4 +1033,5 @@ m4_include([m4/time_h.m4])
1032m4_include([m4/time_r.m4]) 1033m4_include([m4/time_r.m4])
1033m4_include([m4/tm_gmtoff.m4]) 1034m4_include([m4/tm_gmtoff.m4])
1034m4_include([m4/unistd_h.m4]) 1035m4_include([m4/unistd_h.m4])
1036m4_include([m4/warnings.m4])
1035m4_include([m4/wchar_t.m4]) 1037m4_include([m4/wchar_t.m4])
diff --git a/autogen/config.in b/autogen/config.in
index e93bd7f325c..1082e150fc6 100644
--- a/autogen/config.in
+++ b/autogen/config.in
@@ -95,6 +95,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
95/* Define to make the limit macros in <stdint.h> visible. */ 95/* Define to make the limit macros in <stdint.h> visible. */
96#undef GL_TRIGGER_STDC_LIMIT_MACROS 96#undef GL_TRIGGER_STDC_LIMIT_MACROS
97 97
98/* enable some gnulib portability checks */
99#undef GNULIB_PORTCHECK
100
98/* Define to 1 if you want to use the GNU memory allocator. */ 101/* Define to 1 if you want to use the GNU memory allocator. */
99#undef GNU_MALLOC 102#undef GNU_MALLOC
100 103
@@ -203,6 +206,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
203/* Define to 1 if you have the 'dup2' function. */ 206/* Define to 1 if you have the 'dup2' function. */
204#undef HAVE_DUP2 207#undef HAVE_DUP2
205 208
209/* Define to 1 if you have the `endgrent' function. */
210#undef HAVE_ENDGRENT
211
212/* Define to 1 if you have the `endpwent' function. */
213#undef HAVE_ENDPWENT
214
206/* Define to 1 if you have the `euidaccess' function. */ 215/* Define to 1 if you have the `euidaccess' function. */
207#undef HAVE_EUIDACCESS 216#undef HAVE_EUIDACCESS
208 217
@@ -254,6 +263,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
254/* Define to 1 if you have the `getdomainname' function. */ 263/* Define to 1 if you have the `getdomainname' function. */
255#undef HAVE_GETDOMAINNAME 264#undef HAVE_GETDOMAINNAME
256 265
266/* Define to 1 if you have the `getgrent' function. */
267#undef HAVE_GETGRENT
268
257/* Define to 1 if you have the `gethostname' function. */ 269/* Define to 1 if you have the `gethostname' function. */
258#undef HAVE_GETHOSTNAME 270#undef HAVE_GETHOSTNAME
259 271
@@ -278,6 +290,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
278/* Define to 1 if you have the `getpt' function. */ 290/* Define to 1 if you have the `getpt' function. */
279#undef HAVE_GETPT 291#undef HAVE_GETPT
280 292
293/* Define to 1 if you have the `getpwent' function. */
294#undef HAVE_GETPWENT
295
281/* Define to 1 if you have the `getrlimit' function. */ 296/* Define to 1 if you have the `getrlimit' function. */
282#undef HAVE_GETRLIMIT 297#undef HAVE_GETRLIMIT
283 298
@@ -1163,6 +1178,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
1163/* Number of bits in a file offset, on hosts where this is settable. */ 1178/* Number of bits in a file offset, on hosts where this is settable. */
1164#undef _FILE_OFFSET_BITS 1179#undef _FILE_OFFSET_BITS
1165 1180
1181/* enable compile-time and run-time bounds-checking, and some warnings */
1182#undef _FORTIFY_SOURCE
1183
1166/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ 1184/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
1167#undef _LARGEFILE_SOURCE 1185#undef _LARGEFILE_SOURCE
1168 1186
@@ -1270,6 +1288,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
1270# define __GNUC_STDC_INLINE__ 1 1288# define __GNUC_STDC_INLINE__ 1
1271#endif 1289#endif
1272 1290
1291/* Define to 1 if the compiler is checking for lint. */
1292#undef lint
1293
1273/* Define to a type if <wchar.h> does not define. */ 1294/* Define to a type if <wchar.h> does not define. */
1274#undef mbstate_t 1295#undef mbstate_t
1275 1296
diff --git a/autogen/configure b/autogen/configure
index 26b13d971f7..0d9d1abdaa4 100755
--- a/autogen/configure
+++ b/autogen/configure
@@ -1087,7 +1087,7 @@ ns_appdir
1087S_FILE 1087S_FILE
1088M_FILE 1088M_FILE
1089X_TOOLKIT_TYPE 1089X_TOOLKIT_TYPE
1090C_SWITCH_X_SYSTEM 1090GNUSTEP_CFLAGS
1091C_SWITCH_X_SITE 1091C_SWITCH_X_SITE
1092LD_SWITCH_X_SITE 1092LD_SWITCH_X_SITE
1093gameuser 1093gameuser
@@ -1185,7 +1185,9 @@ CANNOT_DUMP
1185HAVE_MAKEINFO 1185HAVE_MAKEINFO
1186GZIP_PROG 1186GZIP_PROG
1187INSTALL_INFO 1187INSTALL_INFO
1188C_WARNINGS_SWITCH 1188GNULIB_WARN_CFLAGS
1189WARN_CFLAGS
1190WERROR_CFLAGS
1189RANLIB 1191RANLIB
1190ARFLAGS 1192ARFLAGS
1191AR 1193AR
@@ -1334,6 +1336,7 @@ enable_profiling
1334enable_autodepend 1336enable_autodepend
1335enable_dependency_tracking 1337enable_dependency_tracking
1336enable_largefile 1338enable_largefile
1339enable_gcc_warnings
1337with_x 1340with_x
1338' 1341'
1339 ac_precious_vars='build_alias 1342 ac_precious_vars='build_alias
@@ -1995,6 +1998,7 @@ Optional Features:
1995 --disable-dependency-tracking speeds up one-time build 1998 --disable-dependency-tracking speeds up one-time build
1996 --enable-dependency-tracking do not reject slow dependency extractors 1999 --enable-dependency-tracking do not reject slow dependency extractors
1997 --disable-largefile omit support for large files 2000 --disable-largefile omit support for large files
2001 --enable-gcc-warnings turn on lots of GCC warnings (for developers)
1998 2002
1999Optional Packages: 2003Optional Packages:
2000 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] 2004 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -7064,12 +7068,50 @@ else
7064 test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS" 7068 test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
7065fi 7069fi
7066 7070
7067### Use -Wdeclaration-after-statement if the compiler supports it 7071# Check whether --enable-gcc-warnings was given.
7068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wdeclaration-after-statement" >&5 7072if test "${enable_gcc_warnings+set}" = set; then :
7069$as_echo_n "checking whether gcc understands -Wdeclaration-after-statement... " >&6; } 7073 enableval=$enable_gcc_warnings; case $enableval in
7070SAVE_CFLAGS="$CFLAGS" 7074 yes|no) ;;
7071CFLAGS="$CFLAGS -Wdeclaration-after-statement" 7075 *) as_fn_error "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
7072cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7076 esac
7077 gl_gcc_warnings=$enableval
7078else
7079 gl_gcc_warnings=no
7080
7081fi
7082
7083
7084# gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
7085# ------------------------------------------------
7086# If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
7087# Otherwise, run RUN-IF-NOT-FOUND.
7088
7089
7090# When compiling with GCC, prefer -isystem to -I when including system
7091# include files, to avoid generating useless diagnostics for the files.
7092if test "$gl_gcc_warnings" != yes; then
7093 isystem='-I'
7094else
7095 isystem='-isystem '
7096
7097 # This, $nw, is the list of warnings we disable.
7098 nw=
7099
7100 case $with_x_toolkit in
7101 lucid | athena | motif)
7102 # Old toolkits mishandle 'const'.
7103 nw="$nw -Wwrite-strings"
7104 ;;
7105 *)
7106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
7107$as_echo_n "checking whether C compiler handles -Werror... " >&6; }
7108if test "${gl_cv_warn_c__Werror+set}" = set; then :
7109 $as_echo_n "(cached) " >&6
7110else
7111
7112 gl_save_compiler_FLAGS="$CFLAGS"
7113 CFLAGS="$CFLAGS -Werror"
7114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7073/* end confdefs.h. */ 7115/* end confdefs.h. */
7074 7116
7075int 7117int
@@ -7081,27 +7123,69 @@ main ()
7081} 7123}
7082_ACEOF 7124_ACEOF
7083if ac_fn_c_try_compile "$LINENO"; then : 7125if ac_fn_c_try_compile "$LINENO"; then :
7084 has_option=yes 7126 gl_cv_warn_c__Werror=yes
7085else 7127else
7086 has_option=no 7128 gl_cv_warn_c__Werror=no
7087fi 7129fi
7088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 7130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7089if test $has_option = yes; then 7131 CFLAGS="$gl_save_compiler_FLAGS"
7090 C_WARNINGS_SWITCH="-Wdeclaration-after-statement $C_WARNINGS_SWITCH" 7132
7091fi 7133fi
7092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5 7134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
7093$as_echo "$has_option" >&6; } 7135$as_echo "$gl_cv_warn_c__Werror" >&6; }
7094CFLAGS="$SAVE_CFLAGS" 7136if test "x$gl_cv_warn_c__Werror" = x""yes; then :
7095unset has_option 7137 as_fn_append WERROR_CFLAGS " -Werror"
7096unset SAVE_CFLAGS 7138fi
7097 7139
7098### Use -Wold-style-definition if the compiler supports it 7140 ;;
7099# This can be removed when conversion to standard C is finished. 7141 esac
7100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wold-style-definition" >&5 7142
7101$as_echo_n "checking whether gcc understands -Wold-style-definition... " >&6; } 7143
7102SAVE_CFLAGS="$CFLAGS" 7144 nw="$nw -Waggregate-return" # anachronistic
7103CFLAGS="$CFLAGS -Wold-style-definition" 7145 nw="$nw -Wlong-long" # C90 is anachronistic (lib/gethrxtime.h)
7104cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7146 nw="$nw -Wc++-compat" # We don't care about C++ compilers
7147 nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib
7148 nw="$nw -Wtraditional" # Warns on #elif which we use often
7149 nw="$nw -Wcast-qual" # Too many warnings for now
7150 nw="$nw -Wconversion" # Too many warnings for now
7151 nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
7152 nw="$nw -Wsign-conversion" # Too many warnings for now
7153 nw="$nw -Woverlength-strings" # Not a problem these days
7154 nw="$nw -Wtraditional-conversion" # Too many warnings for now
7155 nw="$nw -Wpadded" # Our structs are not padded
7156 nw="$nw -Wredundant-decls" # We regularly (re)declare getenv etc.
7157 nw="$nw -Wlogical-op" # any use of fwrite provokes this
7158 nw="$nw -Wformat-nonliteral" # Emacs does this a lot
7159 nw="$nw -Wvla" # warnings in gettext.h
7160 nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__
7161 nw="$nw -Wswitch-enum" # Too many warnings for now
7162 nw="$nw -Wswitch-default" # Too many warnings for now
7163 nw="$nw -Wfloat-equal" # e.g., ftoastr.c
7164 nw="$nw -Winline" # e.g., dispnew.c's inlining of row_equal_p
7165
7166 # Emacs doesn't care about shadowing; see
7167 # <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
7168 nw="$nw -Wshadow"
7169
7170 # The following lines should be removable at some point.
7171 nw="$nw -Wstack-protector"
7172 nw="$nw -Wstrict-overflow"
7173 nw="$nw -Wsuggest-attribute=const"
7174 nw="$nw -Wsuggest-attribute=pure"
7175
7176
7177
7178 if test -n "$GCC"; then
7179
7180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
7181$as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; }
7182 if test "${gl_cv_cc_nomfi_supported+set}" = set; then :
7183 $as_echo_n "(cached) " >&6
7184else
7185
7186 gl_save_CFLAGS="$CFLAGS"
7187 CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
7188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7105/* end confdefs.h. */ 7189/* end confdefs.h. */
7106 7190
7107int 7191int
@@ -7113,26 +7197,430 @@ main ()
7113} 7197}
7114_ACEOF 7198_ACEOF
7115if ac_fn_c_try_compile "$LINENO"; then : 7199if ac_fn_c_try_compile "$LINENO"; then :
7116 has_option=yes 7200 gl_cv_cc_nomfi_supported=yes
7117else 7201else
7118 has_option=no 7202 gl_cv_cc_nomfi_supported=no
7119fi 7203fi
7120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 7204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7121if test $has_option = yes; then 7205 CFLAGS="$gl_save_CFLAGS"
7122 C_WARNINGS_SWITCH="-Wold-style-definition $C_WARNINGS_SWITCH" 7206fi
7123fi 7207
7124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5 7208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
7125$as_echo "$has_option" >&6; } 7209$as_echo "$gl_cv_cc_nomfi_supported" >&6; }
7126CFLAGS="$SAVE_CFLAGS" 7210
7127unset has_option 7211 if test "$gl_cv_cc_nomfi_supported" = yes; then
7128unset SAVE_CFLAGS 7212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
7129 7213$as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; }
7130### Use -Wimplicit-function-declaration if the compiler supports it 7214 if test "${gl_cv_cc_nomfi_needed+set}" = set; then :
7131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wimplicit-function-declaration" >&5 7215 $as_echo_n "(cached) " >&6
7132$as_echo_n "checking whether gcc understands -Wimplicit-function-declaration... " >&6; } 7216else
7133SAVE_CFLAGS="$CFLAGS" 7217
7134CFLAGS="$CFLAGS -Wimplicit-function-declaration" 7218 gl_save_CFLAGS="$CFLAGS"
7135cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7219 CFLAGS="$CFLAGS -W -Werror"
7220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7221/* end confdefs.h. */
7222void f (void)
7223 {
7224 typedef struct { int a; int b; } s_t;
7225 s_t s1 = { 0, };
7226 }
7227
7228int
7229main ()
7230{
7231
7232 ;
7233 return 0;
7234}
7235_ACEOF
7236if ac_fn_c_try_compile "$LINENO"; then :
7237 gl_cv_cc_nomfi_needed=no
7238else
7239 gl_cv_cc_nomfi_needed=yes
7240fi
7241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7242 CFLAGS="$gl_save_CFLAGS"
7243
7244fi
7245
7246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
7247$as_echo "$gl_cv_cc_nomfi_needed" >&6; }
7248 fi
7249 fi
7250
7251 gl_manywarn_set=
7252 for gl_manywarn_item in \
7253 -Wall \
7254 -W \
7255 -Wformat-y2k \
7256 -Wformat-nonliteral \
7257 -Wformat-security \
7258 -Winit-self \
7259 -Wmissing-include-dirs \
7260 -Wswitch-default \
7261 -Wswitch-enum \
7262 -Wunused \
7263 -Wunknown-pragmas \
7264 -Wstrict-aliasing \
7265 -Wstrict-overflow \
7266 -Wsystem-headers \
7267 -Wfloat-equal \
7268 -Wtraditional \
7269 -Wtraditional-conversion \
7270 -Wdeclaration-after-statement \
7271 -Wundef \
7272 -Wshadow \
7273 -Wunsafe-loop-optimizations \
7274 -Wpointer-arith \
7275 -Wbad-function-cast \
7276 -Wc++-compat \
7277 -Wcast-qual \
7278 -Wcast-align \
7279 -Wwrite-strings \
7280 -Wconversion \
7281 -Wsign-conversion \
7282 -Wlogical-op \
7283 -Waggregate-return \
7284 -Wstrict-prototypes \
7285 -Wold-style-definition \
7286 -Wmissing-prototypes \
7287 -Wmissing-declarations \
7288 -Wmissing-noreturn \
7289 -Wmissing-format-attribute \
7290 -Wpacked \
7291 -Wpadded \
7292 -Wredundant-decls \
7293 -Wnested-externs \
7294 -Wunreachable-code \
7295 -Winline \
7296 -Winvalid-pch \
7297 -Wlong-long \
7298 -Wvla \
7299 -Wvolatile-register-var \
7300 -Wdisabled-optimization \
7301 -Wstack-protector \
7302 -Woverlength-strings \
7303 -Wbuiltin-macro-redefined \
7304 -Wmudflap \
7305 -Wpacked-bitfield-compat \
7306 -Wsync-nand \
7307 ; do
7308 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
7309 done
7310 # The following are not documented in the manual but are included in
7311 # output from gcc --help=warnings.
7312 for gl_manywarn_item in \
7313 -Wattributes \
7314 -Wcoverage-mismatch \
7315 -Wmultichar \
7316 -Wunused-macros \
7317 ; do
7318 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
7319 done
7320 # More warnings from gcc 4.6.2 --help=warnings.
7321 for gl_manywarn_item in \
7322 -Wabi \
7323 -Wcpp \
7324 -Wdeprecated \
7325 -Wdeprecated-declarations \
7326 -Wdiv-by-zero \
7327 -Wdouble-promotion \
7328 -Wendif-labels \
7329 -Wextra \
7330 -Wformat-contains-nul \
7331 -Wformat-extra-args \
7332 -Wformat-zero-length \
7333 -Wformat=2 \
7334 -Wmultichar \
7335 -Wnormalized=nfc \
7336 -Woverflow \
7337 -Wpointer-to-int-cast \
7338 -Wpragmas \
7339 -Wsuggest-attribute=const \
7340 -Wsuggest-attribute=noreturn \
7341 -Wsuggest-attribute=pure \
7342 -Wtrampolines \
7343 ; do
7344 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
7345 done
7346
7347 # Disable the missing-field-initializers warning if needed
7348 if test "$gl_cv_cc_nomfi_needed" = yes; then
7349 gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
7350 fi
7351
7352 ws=$gl_manywarn_set
7353
7354
7355 gl_warn_set=
7356 set x $ws; shift
7357 for gl_warn_item
7358 do
7359 case " $nw " in
7360 *" $gl_warn_item "*)
7361 ;;
7362 *)
7363 gl_warn_set="$gl_warn_set $gl_warn_item"
7364 ;;
7365 esac
7366 done
7367 ws=$gl_warn_set
7368
7369 for w in $ws; do
7370 as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh`
7371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
7372$as_echo_n "checking whether C compiler handles $w... " >&6; }
7373if { as_var=$as_gl_Warn; eval "test \"\${$as_var+set}\" = set"; }; then :
7374 $as_echo_n "(cached) " >&6
7375else
7376
7377 gl_save_compiler_FLAGS="$CFLAGS"
7378 CFLAGS="$CFLAGS $w"
7379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7380/* end confdefs.h. */
7381
7382int
7383main ()
7384{
7385
7386 ;
7387 return 0;
7388}
7389_ACEOF
7390if ac_fn_c_try_compile "$LINENO"; then :
7391 eval "$as_gl_Warn=yes"
7392else
7393 eval "$as_gl_Warn=no"
7394fi
7395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7396 CFLAGS="$gl_save_compiler_FLAGS"
7397
7398fi
7399eval ac_res=\$$as_gl_Warn
7400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7401$as_echo "$ac_res" >&6; }
7402eval as_val=\$$as_gl_Warn
7403 if test "x$as_val" = x""yes; then :
7404 as_fn_append WARN_CFLAGS " $w"
7405fi
7406
7407 done
7408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-field-initializers" >&5
7409$as_echo_n "checking whether C compiler handles -Wno-missing-field-initializers... " >&6; }
7410if test "${gl_cv_warn_c__Wno_missing_field_initializers+set}" = set; then :
7411 $as_echo_n "(cached) " >&6
7412else
7413
7414 gl_save_compiler_FLAGS="$CFLAGS"
7415 CFLAGS="$CFLAGS -Wno-missing-field-initializers"
7416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7417/* end confdefs.h. */
7418
7419int
7420main ()
7421{
7422
7423 ;
7424 return 0;
7425}
7426_ACEOF
7427if ac_fn_c_try_compile "$LINENO"; then :
7428 gl_cv_warn_c__Wno_missing_field_initializers=yes
7429else
7430 gl_cv_warn_c__Wno_missing_field_initializers=no
7431fi
7432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7433 CFLAGS="$gl_save_compiler_FLAGS"
7434
7435fi
7436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_missing_field_initializers" >&5
7437$as_echo "$gl_cv_warn_c__Wno_missing_field_initializers" >&6; }
7438if test "x$gl_cv_warn_c__Wno_missing_field_initializers" = x""yes; then :
7439 as_fn_append WARN_CFLAGS " -Wno-missing-field-initializers"
7440fi
7441 # We need this one
7442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
7443$as_echo_n "checking whether C compiler handles -Wno-sign-compare... " >&6; }
7444if test "${gl_cv_warn_c__Wno_sign_compare+set}" = set; then :
7445 $as_echo_n "(cached) " >&6
7446else
7447
7448 gl_save_compiler_FLAGS="$CFLAGS"
7449 CFLAGS="$CFLAGS -Wno-sign-compare"
7450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7451/* end confdefs.h. */
7452
7453int
7454main ()
7455{
7456
7457 ;
7458 return 0;
7459}
7460_ACEOF
7461if ac_fn_c_try_compile "$LINENO"; then :
7462 gl_cv_warn_c__Wno_sign_compare=yes
7463else
7464 gl_cv_warn_c__Wno_sign_compare=no
7465fi
7466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7467 CFLAGS="$gl_save_compiler_FLAGS"
7468
7469fi
7470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
7471$as_echo "$gl_cv_warn_c__Wno_sign_compare" >&6; }
7472if test "x$gl_cv_warn_c__Wno_sign_compare" = x""yes; then :
7473 as_fn_append WARN_CFLAGS " -Wno-sign-compare"
7474fi
7475 # Too many warnings for now
7476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-type-limits" >&5
7477$as_echo_n "checking whether C compiler handles -Wno-type-limits... " >&6; }
7478if test "${gl_cv_warn_c__Wno_type_limits+set}" = set; then :
7479 $as_echo_n "(cached) " >&6
7480else
7481
7482 gl_save_compiler_FLAGS="$CFLAGS"
7483 CFLAGS="$CFLAGS -Wno-type-limits"
7484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7485/* end confdefs.h. */
7486
7487int
7488main ()
7489{
7490
7491 ;
7492 return 0;
7493}
7494_ACEOF
7495if ac_fn_c_try_compile "$LINENO"; then :
7496 gl_cv_warn_c__Wno_type_limits=yes
7497else
7498 gl_cv_warn_c__Wno_type_limits=no
7499fi
7500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7501 CFLAGS="$gl_save_compiler_FLAGS"
7502
7503fi
7504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_type_limits" >&5
7505$as_echo "$gl_cv_warn_c__Wno_type_limits" >&6; }
7506if test "x$gl_cv_warn_c__Wno_type_limits" = x""yes; then :
7507 as_fn_append WARN_CFLAGS " -Wno-type-limits"
7508fi
7509 # Too many warnings for now
7510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-switch" >&5
7511$as_echo_n "checking whether C compiler handles -Wno-switch... " >&6; }
7512if test "${gl_cv_warn_c__Wno_switch+set}" = set; then :
7513 $as_echo_n "(cached) " >&6
7514else
7515
7516 gl_save_compiler_FLAGS="$CFLAGS"
7517 CFLAGS="$CFLAGS -Wno-switch"
7518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7519/* end confdefs.h. */
7520
7521int
7522main ()
7523{
7524
7525 ;
7526 return 0;
7527}
7528_ACEOF
7529if ac_fn_c_try_compile "$LINENO"; then :
7530 gl_cv_warn_c__Wno_switch=yes
7531else
7532 gl_cv_warn_c__Wno_switch=no
7533fi
7534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7535 CFLAGS="$gl_save_compiler_FLAGS"
7536
7537fi
7538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_switch" >&5
7539$as_echo "$gl_cv_warn_c__Wno_switch" >&6; }
7540if test "x$gl_cv_warn_c__Wno_switch" = x""yes; then :
7541 as_fn_append WARN_CFLAGS " -Wno-switch"
7542fi
7543 # Too many warnings for now
7544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
7545$as_echo_n "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
7546if test "${gl_cv_warn_c__Wno_unused_parameter+set}" = set; then :
7547 $as_echo_n "(cached) " >&6
7548else
7549
7550 gl_save_compiler_FLAGS="$CFLAGS"
7551 CFLAGS="$CFLAGS -Wno-unused-parameter"
7552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7553/* end confdefs.h. */
7554
7555int
7556main ()
7557{
7558
7559 ;
7560 return 0;
7561}
7562_ACEOF
7563if ac_fn_c_try_compile "$LINENO"; then :
7564 gl_cv_warn_c__Wno_unused_parameter=yes
7565else
7566 gl_cv_warn_c__Wno_unused_parameter=no
7567fi
7568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7569 CFLAGS="$gl_save_compiler_FLAGS"
7570
7571fi
7572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
7573$as_echo "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
7574if test "x$gl_cv_warn_c__Wno_unused_parameter" = x""yes; then :
7575 as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
7576fi
7577 # Too many warnings for now
7578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
7579$as_echo_n "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
7580if test "${gl_cv_warn_c__Wno_format_nonliteral+set}" = set; then :
7581 $as_echo_n "(cached) " >&6
7582else
7583
7584 gl_save_compiler_FLAGS="$CFLAGS"
7585 CFLAGS="$CFLAGS -Wno-format-nonliteral"
7586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7587/* end confdefs.h. */
7588
7589int
7590main ()
7591{
7592
7593 ;
7594 return 0;
7595}
7596_ACEOF
7597if ac_fn_c_try_compile "$LINENO"; then :
7598 gl_cv_warn_c__Wno_format_nonliteral=yes
7599else
7600 gl_cv_warn_c__Wno_format_nonliteral=no
7601fi
7602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7603 CFLAGS="$gl_save_compiler_FLAGS"
7604
7605fi
7606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
7607$as_echo "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
7608if test "x$gl_cv_warn_c__Wno_format_nonliteral" = x""yes; then :
7609 as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
7610fi
7611
7612
7613 # In spite of excluding -Wlogical-op above, it is enabled, as of
7614 # gcc 4.5.0 20090517.
7615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-logical-op" >&5
7616$as_echo_n "checking whether C compiler handles -Wno-logical-op... " >&6; }
7617if test "${gl_cv_warn_c__Wno_logical_op+set}" = set; then :
7618 $as_echo_n "(cached) " >&6
7619else
7620
7621 gl_save_compiler_FLAGS="$CFLAGS"
7622 CFLAGS="$CFLAGS -Wno-logical-op"
7623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7136/* end confdefs.h. */ 7624/* end confdefs.h. */
7137 7625
7138int 7626int
@@ -7144,21 +7632,125 @@ main ()
7144} 7632}
7145_ACEOF 7633_ACEOF
7146if ac_fn_c_try_compile "$LINENO"; then : 7634if ac_fn_c_try_compile "$LINENO"; then :
7147 has_option=yes 7635 gl_cv_warn_c__Wno_logical_op=yes
7148else 7636else
7149 has_option=no 7637 gl_cv_warn_c__Wno_logical_op=no
7150fi 7638fi
7151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 7639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7152if test $has_option = yes; then 7640 CFLAGS="$gl_save_compiler_FLAGS"
7153 C_WARNINGS_SWITCH="-Wimplicit-function-declaration $C_WARNINGS_SWITCH" 7641
7642fi
7643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_logical_op" >&5
7644$as_echo "$gl_cv_warn_c__Wno_logical_op" >&6; }
7645if test "x$gl_cv_warn_c__Wno_logical_op" = x""yes; then :
7646 as_fn_append WARN_CFLAGS " -Wno-logical-op"
7154fi 7647fi
7155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5
7156$as_echo "$has_option" >&6; }
7157CFLAGS="$SAVE_CFLAGS"
7158unset has_option
7159unset SAVE_CFLAGS
7160 7648
7161 7649
7650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
7651$as_echo_n "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
7652if test "${gl_cv_warn_c__fdiagnostics_show_option+set}" = set; then :
7653 $as_echo_n "(cached) " >&6
7654else
7655
7656 gl_save_compiler_FLAGS="$CFLAGS"
7657 CFLAGS="$CFLAGS -fdiagnostics-show-option"
7658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7659/* end confdefs.h. */
7660
7661int
7662main ()
7663{
7664
7665 ;
7666 return 0;
7667}
7668_ACEOF
7669if ac_fn_c_try_compile "$LINENO"; then :
7670 gl_cv_warn_c__fdiagnostics_show_option=yes
7671else
7672 gl_cv_warn_c__fdiagnostics_show_option=no
7673fi
7674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7675 CFLAGS="$gl_save_compiler_FLAGS"
7676
7677fi
7678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
7679$as_echo "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
7680if test "x$gl_cv_warn_c__fdiagnostics_show_option" = x""yes; then :
7681 as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
7682fi
7683
7684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
7685$as_echo_n "checking whether C compiler handles -funit-at-a-time... " >&6; }
7686if test "${gl_cv_warn_c__funit_at_a_time+set}" = set; then :
7687 $as_echo_n "(cached) " >&6
7688else
7689
7690 gl_save_compiler_FLAGS="$CFLAGS"
7691 CFLAGS="$CFLAGS -funit-at-a-time"
7692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7693/* end confdefs.h. */
7694
7695int
7696main ()
7697{
7698
7699 ;
7700 return 0;
7701}
7702_ACEOF
7703if ac_fn_c_try_compile "$LINENO"; then :
7704 gl_cv_warn_c__funit_at_a_time=yes
7705else
7706 gl_cv_warn_c__funit_at_a_time=no
7707fi
7708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7709 CFLAGS="$gl_save_compiler_FLAGS"
7710
7711fi
7712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
7713$as_echo "$gl_cv_warn_c__funit_at_a_time" >&6; }
7714if test "x$gl_cv_warn_c__funit_at_a_time" = x""yes; then :
7715 as_fn_append WARN_CFLAGS " -funit-at-a-time"
7716fi
7717
7718
7719
7720
7721
7722$as_echo "#define lint 1" >>confdefs.h
7723
7724
7725$as_echo "#define _FORTIFY_SOURCE 2" >>confdefs.h
7726
7727
7728$as_echo "#define GNULIB_PORTCHECK 1" >>confdefs.h
7729
7730
7731 # We use a slightly smaller set of warning options for lib/.
7732 # Remove the following and save the result in GNULIB_WARN_CFLAGS.
7733 nw=
7734 nw="$nw -Wunused-macros"
7735
7736
7737 gl_warn_set=
7738 set x $WARN_CFLAGS; shift
7739 for gl_warn_item
7740 do
7741 case " $nw " in
7742 *" $gl_warn_item "*)
7743 ;;
7744 *)
7745 gl_warn_set="$gl_warn_set $gl_warn_item"
7746 ;;
7747 esac
7748 done
7749 GNULIB_WARN_CFLAGS=$gl_warn_set
7750
7751
7752fi
7753
7162 7754
7163 7755
7164#### Some other nice autoconf tests. 7756#### Some other nice autoconf tests.
@@ -8316,8 +8908,13 @@ $as_echo_n "checking for $ALSA_MODULES... " >&6; }
8316 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5 && 8908 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5 &&
8317 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES" 2>&5` && 8909 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES" 2>&5` &&
8318 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES" 2>&5`; then 8910 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES" 2>&5`; then
8319 8911 edit_cflags="
8320 ALSA_CFLAGS=`$as_echo "$ALSA_CFLAGS" | sed -e 's,///*,/,g'` 8912 s,///*,/,g
8913 s/^/ /
8914 s/ -I/ $isystem/g
8915 s/^ //
8916 "
8917 ALSA_CFLAGS=`$as_echo "$ALSA_CFLAGS" | sed -e "$edit_cflags"`
8321 ALSA_LIBS=`$as_echo "$ALSA_LIBS" | sed -e 's,///*,/,g'` 8918 ALSA_LIBS=`$as_echo "$ALSA_LIBS" | sed -e 's,///*,/,g'`
8322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&5 8919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&5
8323$as_echo "yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&6; } 8920$as_echo "yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&6; }
@@ -9656,15 +10253,6 @@ else
9656 window_system=x11 10253 window_system=x11
9657fi 10254fi
9658 10255
9659## Workaround for bug in autoconf <= 2.62.
9660## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html
9661## No need to do anything special for these standard directories.
9662if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then
9663
9664 x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'`
9665
9666fi
9667
9668LD_SWITCH_X_SITE_AUX= 10256LD_SWITCH_X_SITE_AUX=
9669LD_SWITCH_X_SITE_AUX_RPATH= 10257LD_SWITCH_X_SITE_AUX_RPATH=
9670if test "${x_libraries}" != NONE; then 10258if test "${x_libraries}" != NONE; then
@@ -9698,7 +10286,7 @@ fi
9698 10286
9699 10287
9700if test "${x_includes}" != NONE && test -n "${x_includes}"; then 10288if test "${x_includes}" != NONE && test -n "${x_includes}"; then
9701 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"` 10289 C_SWITCH_X_SITE="$isystem"`echo ${x_includes} | sed -e "s/:/ $isystem/g"`
9702fi 10290fi
9703 10291
9704if test x"${x_includes}" = x; then 10292if test x"${x_includes}" = x; then
@@ -9803,7 +10391,6 @@ else
9803fi 10391fi
9804 10392
9805 10393
9806 NS_HAVE_NSINTEGER=yes
9807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9808/* end confdefs.h. */ 10395/* end confdefs.h. */
9809#include <Foundation/NSObjCRuntime.h> 10396#include <Foundation/NSObjCRuntime.h>
@@ -9821,8 +10408,10 @@ else
9821 ns_have_nsinteger=no 10408 ns_have_nsinteger=no
9822fi 10409fi
9823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 10410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9824 if test $ns_have_nsinteger = no; then 10411 if test $ns_have_nsinteger = yes; then
9825 NS_HAVE_NSINTEGER=no 10412
10413$as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h
10414
9826 fi 10415 fi
9827fi 10416fi
9828 10417
@@ -10752,8 +11341,13 @@ $as_echo_n "checking for $RSVG_MODULE... " >&6; }
10752 if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5 && 11341 if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5 &&
10753 RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE" 2>&5` && 11342 RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE" 2>&5` &&
10754 RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE" 2>&5`; then 11343 RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE" 2>&5`; then
10755 11344 edit_cflags="
10756 RSVG_CFLAGS=`$as_echo "$RSVG_CFLAGS" | sed -e 's,///*,/,g'` 11345 s,///*,/,g
11346 s/^/ /
11347 s/ -I/ $isystem/g
11348 s/^ //
11349 "
11350 RSVG_CFLAGS=`$as_echo "$RSVG_CFLAGS" | sed -e "$edit_cflags"`
10757 RSVG_LIBS=`$as_echo "$RSVG_LIBS" | sed -e 's,///*,/,g'` 11351 RSVG_LIBS=`$as_echo "$RSVG_LIBS" | sed -e 's,///*,/,g'`
10758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&5 11352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&5
10759$as_echo "yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&6; } 11353$as_echo "yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&6; }
@@ -10859,8 +11453,13 @@ $as_echo_n "checking for $IMAGEMAGICK_MODULE... " >&6; }
10859 if $PKG_CONFIG --exists "$IMAGEMAGICK_MODULE" 2>&5 && 11453 if $PKG_CONFIG --exists "$IMAGEMAGICK_MODULE" 2>&5 &&
10860 IMAGEMAGICK_CFLAGS=`$PKG_CONFIG --cflags "$IMAGEMAGICK_MODULE" 2>&5` && 11454 IMAGEMAGICK_CFLAGS=`$PKG_CONFIG --cflags "$IMAGEMAGICK_MODULE" 2>&5` &&
10861 IMAGEMAGICK_LIBS=`$PKG_CONFIG --libs "$IMAGEMAGICK_MODULE" 2>&5`; then 11455 IMAGEMAGICK_LIBS=`$PKG_CONFIG --libs "$IMAGEMAGICK_MODULE" 2>&5`; then
10862 11456 edit_cflags="
10863 IMAGEMAGICK_CFLAGS=`$as_echo "$IMAGEMAGICK_CFLAGS" | sed -e 's,///*,/,g'` 11457 s,///*,/,g
11458 s/^/ /
11459 s/ -I/ $isystem/g
11460 s/^ //
11461 "
11462 IMAGEMAGICK_CFLAGS=`$as_echo "$IMAGEMAGICK_CFLAGS" | sed -e "$edit_cflags"`
10864 IMAGEMAGICK_LIBS=`$as_echo "$IMAGEMAGICK_LIBS" | sed -e 's,///*,/,g'` 11463 IMAGEMAGICK_LIBS=`$as_echo "$IMAGEMAGICK_LIBS" | sed -e 's,///*,/,g'`
10865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&5 11464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&5
10866$as_echo "yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&6; } 11465$as_echo "yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&6; }
@@ -10978,8 +11577,13 @@ $as_echo_n "checking for $GTK_MODULES... " >&6; }
10978 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5 && 11577 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5 &&
10979 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES" 2>&5` && 11578 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES" 2>&5` &&
10980 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES" 2>&5`; then 11579 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES" 2>&5`; then
10981 11580 edit_cflags="
10982 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e 's,///*,/,g'` 11581 s,///*,/,g
11582 s/^/ /
11583 s/ -I/ $isystem/g
11584 s/^ //
11585 "
11586 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
10983 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'` 11587 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
10984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5 11588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
10985$as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; } 11589$as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
@@ -11081,8 +11685,13 @@ $as_echo_n "checking for $GTK_MODULES... " >&6; }
11081 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5 && 11685 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5 &&
11082 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES" 2>&5` && 11686 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES" 2>&5` &&
11083 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES" 2>&5`; then 11687 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES" 2>&5`; then
11084 11688 edit_cflags="
11085 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e 's,///*,/,g'` 11689 s,///*,/,g
11690 s/^/ /
11691 s/ -I/ $isystem/g
11692 s/^ //
11693 "
11694 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
11086 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'` 11695 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
11087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5 11696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
11088$as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; } 11697$as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
@@ -11276,8 +11885,13 @@ $as_echo_n "checking for dbus-1 >= 1.0... " >&6; }
11276 if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5 && 11885 if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5 &&
11277 DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0" 2>&5` && 11886 DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0" 2>&5` &&
11278 DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0" 2>&5`; then 11887 DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0" 2>&5`; then
11279 11888 edit_cflags="
11280 DBUS_CFLAGS=`$as_echo "$DBUS_CFLAGS" | sed -e 's,///*,/,g'` 11889 s,///*,/,g
11890 s/^/ /
11891 s/ -I/ $isystem/g
11892 s/^ //
11893 "
11894 DBUS_CFLAGS=`$as_echo "$DBUS_CFLAGS" | sed -e "$edit_cflags"`
11281 DBUS_LIBS=`$as_echo "$DBUS_LIBS" | sed -e 's,///*,/,g'` 11895 DBUS_LIBS=`$as_echo "$DBUS_LIBS" | sed -e 's,///*,/,g'`
11282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&5 11896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&5
11283$as_echo "yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&6; } 11897$as_echo "yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&6; }
@@ -11386,8 +12000,13 @@ $as_echo_n "checking for gio-2.0 >= 2.26... " >&6; }
11386 if $PKG_CONFIG --exists "gio-2.0 >= 2.26" 2>&5 && 12000 if $PKG_CONFIG --exists "gio-2.0 >= 2.26" 2>&5 &&
11387 GSETTINGS_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0 >= 2.26" 2>&5` && 12001 GSETTINGS_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0 >= 2.26" 2>&5` &&
11388 GSETTINGS_LIBS=`$PKG_CONFIG --libs "gio-2.0 >= 2.26" 2>&5`; then 12002 GSETTINGS_LIBS=`$PKG_CONFIG --libs "gio-2.0 >= 2.26" 2>&5`; then
11389 12003 edit_cflags="
11390 GSETTINGS_CFLAGS=`$as_echo "$GSETTINGS_CFLAGS" | sed -e 's,///*,/,g'` 12004 s,///*,/,g
12005 s/^/ /
12006 s/ -I/ $isystem/g
12007 s/^ //
12008 "
12009 GSETTINGS_CFLAGS=`$as_echo "$GSETTINGS_CFLAGS" | sed -e "$edit_cflags"`
11391 GSETTINGS_LIBS=`$as_echo "$GSETTINGS_LIBS" | sed -e 's,///*,/,g'` 12010 GSETTINGS_LIBS=`$as_echo "$GSETTINGS_LIBS" | sed -e 's,///*,/,g'`
11392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&5 12011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&5
11393$as_echo "yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&6; } 12012$as_echo "yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&6; }
@@ -11484,8 +12103,13 @@ $as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; }
11484 if $PKG_CONFIG --exists "gconf-2.0 >= 2.13" 2>&5 && 12103 if $PKG_CONFIG --exists "gconf-2.0 >= 2.13" 2>&5 &&
11485 GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= 2.13" 2>&5` && 12104 GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= 2.13" 2>&5` &&
11486 GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 >= 2.13" 2>&5`; then 12105 GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 >= 2.13" 2>&5`; then
11487 12106 edit_cflags="
11488 GCONF_CFLAGS=`$as_echo "$GCONF_CFLAGS" | sed -e 's,///*,/,g'` 12107 s,///*,/,g
12108 s/^/ /
12109 s/ -I/ $isystem/g
12110 s/^ //
12111 "
12112 GCONF_CFLAGS=`$as_echo "$GCONF_CFLAGS" | sed -e "$edit_cflags"`
11489 GCONF_LIBS=`$as_echo "$GCONF_LIBS" | sed -e 's,///*,/,g'` 12113 GCONF_LIBS=`$as_echo "$GCONF_LIBS" | sed -e 's,///*,/,g'`
11490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&5 12114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&5
11491$as_echo "yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&6; } 12115$as_echo "yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&6; }
@@ -11660,8 +12284,13 @@ $as_echo_n "checking for gnutls >= 2.6.6... " >&6; }
11660 if $PKG_CONFIG --exists "gnutls >= 2.6.6" 2>&5 && 12284 if $PKG_CONFIG --exists "gnutls >= 2.6.6" 2>&5 &&
11661 LIBGNUTLS_CFLAGS=`$PKG_CONFIG --cflags "gnutls >= 2.6.6" 2>&5` && 12285 LIBGNUTLS_CFLAGS=`$PKG_CONFIG --cflags "gnutls >= 2.6.6" 2>&5` &&
11662 LIBGNUTLS_LIBS=`$PKG_CONFIG --libs "gnutls >= 2.6.6" 2>&5`; then 12286 LIBGNUTLS_LIBS=`$PKG_CONFIG --libs "gnutls >= 2.6.6" 2>&5`; then
11663 12287 edit_cflags="
11664 LIBGNUTLS_CFLAGS=`$as_echo "$LIBGNUTLS_CFLAGS" | sed -e 's,///*,/,g'` 12288 s,///*,/,g
12289 s/^/ /
12290 s/ -I/ $isystem/g
12291 s/^ //
12292 "
12293 LIBGNUTLS_CFLAGS=`$as_echo "$LIBGNUTLS_CFLAGS" | sed -e "$edit_cflags"`
11665 LIBGNUTLS_LIBS=`$as_echo "$LIBGNUTLS_LIBS" | sed -e 's,///*,/,g'` 12294 LIBGNUTLS_LIBS=`$as_echo "$LIBGNUTLS_LIBS" | sed -e 's,///*,/,g'`
11666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&5 12295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&5
11667$as_echo "yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&6; } 12296$as_echo "yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&6; }
@@ -12307,8 +12936,13 @@ $as_echo_n "checking for fontconfig >= 2.2.0... " >&6; }
12307 if $PKG_CONFIG --exists "fontconfig >= 2.2.0" 2>&5 && 12936 if $PKG_CONFIG --exists "fontconfig >= 2.2.0" 2>&5 &&
12308 FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= 2.2.0" 2>&5` && 12937 FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= 2.2.0" 2>&5` &&
12309 FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig >= 2.2.0" 2>&5`; then 12938 FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig >= 2.2.0" 2>&5`; then
12310 12939 edit_cflags="
12311 FONTCONFIG_CFLAGS=`$as_echo "$FONTCONFIG_CFLAGS" | sed -e 's,///*,/,g'` 12940 s,///*,/,g
12941 s/^/ /
12942 s/ -I/ $isystem/g
12943 s/^ //
12944 "
12945 FONTCONFIG_CFLAGS=`$as_echo "$FONTCONFIG_CFLAGS" | sed -e "$edit_cflags"`
12312 FONTCONFIG_LIBS=`$as_echo "$FONTCONFIG_LIBS" | sed -e 's,///*,/,g'` 12946 FONTCONFIG_LIBS=`$as_echo "$FONTCONFIG_LIBS" | sed -e 's,///*,/,g'`
12313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&5 12947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&5
12314$as_echo "yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&6; } 12948$as_echo "yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&6; }
@@ -12402,8 +13036,13 @@ $as_echo_n "checking for xft >= 0.13.0... " >&6; }
12402 if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5 && 13036 if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5 &&
12403 XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0" 2>&5` && 13037 XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0" 2>&5` &&
12404 XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0" 2>&5`; then 13038 XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0" 2>&5`; then
12405 13039 edit_cflags="
12406 XFT_CFLAGS=`$as_echo "$XFT_CFLAGS" | sed -e 's,///*,/,g'` 13040 s,///*,/,g
13041 s/^/ /
13042 s/ -I/ $isystem/g
13043 s/^ //
13044 "
13045 XFT_CFLAGS=`$as_echo "$XFT_CFLAGS" | sed -e "$edit_cflags"`
12407 XFT_LIBS=`$as_echo "$XFT_LIBS" | sed -e 's,///*,/,g'` 13046 XFT_LIBS=`$as_echo "$XFT_LIBS" | sed -e 's,///*,/,g'`
12408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&5 13047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&5
12409$as_echo "yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&6; } 13048$as_echo "yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&6; }
@@ -12606,8 +13245,13 @@ $as_echo_n "checking for freetype2... " >&6; }
12606 if $PKG_CONFIG --exists "freetype2" 2>&5 && 13245 if $PKG_CONFIG --exists "freetype2" 2>&5 &&
12607 FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>&5` && 13246 FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>&5` &&
12608 FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>&5`; then 13247 FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>&5`; then
12609 13248 edit_cflags="
12610 FREETYPE_CFLAGS=`$as_echo "$FREETYPE_CFLAGS" | sed -e 's,///*,/,g'` 13249 s,///*,/,g
13250 s/^/ /
13251 s/ -I/ $isystem/g
13252 s/^ //
13253 "
13254 FREETYPE_CFLAGS=`$as_echo "$FREETYPE_CFLAGS" | sed -e "$edit_cflags"`
12611 FREETYPE_LIBS=`$as_echo "$FREETYPE_LIBS" | sed -e 's,///*,/,g'` 13255 FREETYPE_LIBS=`$as_echo "$FREETYPE_LIBS" | sed -e 's,///*,/,g'`
12612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&5 13256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&5
12613$as_echo "yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&6; } 13257$as_echo "yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&6; }
@@ -12703,8 +13347,13 @@ $as_echo_n "checking for libotf... " >&6; }
12703 if $PKG_CONFIG --exists "libotf" 2>&5 && 13347 if $PKG_CONFIG --exists "libotf" 2>&5 &&
12704 LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf" 2>&5` && 13348 LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf" 2>&5` &&
12705 LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf" 2>&5`; then 13349 LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf" 2>&5`; then
12706 13350 edit_cflags="
12707 LIBOTF_CFLAGS=`$as_echo "$LIBOTF_CFLAGS" | sed -e 's,///*,/,g'` 13351 s,///*,/,g
13352 s/^/ /
13353 s/ -I/ $isystem/g
13354 s/^ //
13355 "
13356 LIBOTF_CFLAGS=`$as_echo "$LIBOTF_CFLAGS" | sed -e "$edit_cflags"`
12708 LIBOTF_LIBS=`$as_echo "$LIBOTF_LIBS" | sed -e 's,///*,/,g'` 13357 LIBOTF_LIBS=`$as_echo "$LIBOTF_LIBS" | sed -e 's,///*,/,g'`
12709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&5 13358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&5
12710$as_echo "yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&6; } 13359$as_echo "yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&6; }
@@ -12848,8 +13497,13 @@ $as_echo_n "checking for m17n-flt... " >&6; }
12848 if $PKG_CONFIG --exists "m17n-flt" 2>&5 && 13497 if $PKG_CONFIG --exists "m17n-flt" 2>&5 &&
12849 M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt" 2>&5` && 13498 M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt" 2>&5` &&
12850 M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt" 2>&5`; then 13499 M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt" 2>&5`; then
12851 13500 edit_cflags="
12852 M17N_FLT_CFLAGS=`$as_echo "$M17N_FLT_CFLAGS" | sed -e 's,///*,/,g'` 13501 s,///*,/,g
13502 s/^/ /
13503 s/ -I/ $isystem/g
13504 s/^ //
13505 "
13506 M17N_FLT_CFLAGS=`$as_echo "$M17N_FLT_CFLAGS" | sed -e "$edit_cflags"`
12853 M17N_FLT_LIBS=`$as_echo "$M17N_FLT_LIBS" | sed -e 's,///*,/,g'` 13507 M17N_FLT_LIBS=`$as_echo "$M17N_FLT_LIBS" | sed -e 's,///*,/,g'`
12854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&5 13508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&5
12855$as_echo "yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&6; } 13509$as_echo "yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&6; }
@@ -13413,7 +14067,7 @@ fi
13413 14067
13414 14068
13415 14069
13416C_SWITCH_X_SYSTEM= 14070GNUSTEP_CFLAGS=
13417### Use NeXTstep API to implement GUI. 14071### Use NeXTstep API to implement GUI.
13418if test "${HAVE_NS}" = "yes"; then 14072if test "${HAVE_NS}" = "yes"; then
13419 14073
@@ -13430,15 +14084,10 @@ $as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h
13430 14084
13431 # See also .m.o rule in Makefile.in */ 14085 # See also .m.o rule in Makefile.in */
13432 # FIXME: are all these flags really needed? Document here why. */ 14086 # FIXME: are all these flags really needed? Document here why. */
13433 C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" 14087 GNUSTEP_CFLAGS="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
13434 ## Extra CFLAGS applied to src/*.m files. 14088 ## Extra CFLAGS applied to src/*.m files.
13435 GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE" 14089 GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE"
13436 fi 14090 fi
13437 if test "${NS_HAVE_NSINTEGER}" = "yes"; then
13438
13439$as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h
13440
13441 fi
13442 # We also have mouse menus. 14091 # We also have mouse menus.
13443 HAVE_MENUS=yes 14092 HAVE_MENUS=yes
13444 OTHER_FILES=ns-app 14093 OTHER_FILES=ns-app
@@ -13568,8 +14217,13 @@ $as_echo_n "checking for libxml-2.0 > 2.6.17... " >&6; }
13568 if $PKG_CONFIG --exists "libxml-2.0 > 2.6.17" 2>&5 && 14217 if $PKG_CONFIG --exists "libxml-2.0 > 2.6.17" 2>&5 &&
13569 LIBXML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 > 2.6.17" 2>&5` && 14218 LIBXML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 > 2.6.17" 2>&5` &&
13570 LIBXML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 > 2.6.17" 2>&5`; then 14219 LIBXML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 > 2.6.17" 2>&5`; then
13571 14220 edit_cflags="
13572 LIBXML2_CFLAGS=`$as_echo "$LIBXML2_CFLAGS" | sed -e 's,///*,/,g'` 14221 s,///*,/,g
14222 s/^/ /
14223 s/ -I/ $isystem/g
14224 s/^ //
14225 "
14226 LIBXML2_CFLAGS=`$as_echo "$LIBXML2_CFLAGS" | sed -e "$edit_cflags"`
13573 LIBXML2_LIBS=`$as_echo "$LIBXML2_LIBS" | sed -e 's,///*,/,g'` 14227 LIBXML2_LIBS=`$as_echo "$LIBXML2_LIBS" | sed -e 's,///*,/,g'`
13574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&5 14228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&5
13575$as_echo "yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&6; } 14229$as_echo "yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&6; }
@@ -13967,6 +14621,7 @@ __fpending mblen mbrlen mbsinit strsignal setitimer ualarm \
13967sendto recvfrom getsockopt setsockopt getsockname getpeername \ 14621sendto recvfrom getsockopt setsockopt getsockname getpeername \
13968gai_strerror mkstemp getline getdelim mremap fsync sync \ 14622gai_strerror mkstemp getline getdelim mremap fsync sync \
13969difftime mempcpy mblen mbrlen posix_memalign \ 14623difftime mempcpy mblen mbrlen posix_memalign \
14624getpwent endpwent getgrent endgrent \
13970cfmakeraw cfsetspeed copysign __executable_start 14625cfmakeraw cfsetspeed copysign __executable_start
13971do : 14626do :
13972 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 14627 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -22211,7 +22866,7 @@ case "$opsys" in
22211 ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM 22866 ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM
22212 ## had different values in configure (in ac_link) and src/Makefile.in. 22867 ## had different values in configure (in ac_link) and src/Makefile.in.
22213 ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS. 22868 ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS.
22214 gnu-linux) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_AUX)" ;; 22869 gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_AUX_RPATH)" ;;
22215 22870
22216 *) LD_SWITCH_SYSTEM_TEMACS= ;; 22871 *) LD_SWITCH_SYSTEM_TEMACS= ;;
22217esac 22872esac
@@ -22410,6 +23065,14 @@ to run if these resources are not installed."
22410 echo 23065 echo
22411fi 23066fi
22412 23067
23068if test "${opsys}" = "cygwin"; then
23069 case `uname -r` in
23070 1.5.*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: building Emacs on Cygwin 1.5 is not supported." >&5
23071$as_echo "$as_me: WARNING: building Emacs on Cygwin 1.5 is not supported." >&2;}
23072 echo
23073 ;;
23074 esac
23075fi
22413 23076
22414# Remove any trailing slashes in these variables. 23077# Remove any trailing slashes in these variables.
22415test "${prefix}" != NONE && 23078test "${prefix}" != NONE &&
@@ -22430,6 +23093,16 @@ if test -f $srcdir/${opt_makefile}.in; then
22430 23093
22431fi 23094fi
22432 23095
23096
23097opt_makefile=admin/unidata/Makefile
23098
23099if test -f $srcdir/${opt_makefile}.in; then
23100 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
23101 ac_config_files="$ac_config_files admin/unidata/Makefile"
23102
23103fi
23104
23105
22433SUBDIR_MAKEFILES_IN=`echo " ${SUBDIR_MAKEFILES}" | sed -e 's| | $(srcdir)/|g' -e 's|Makefile|Makefile.in|g'` 23106SUBDIR_MAKEFILES_IN=`echo " ${SUBDIR_MAKEFILES}" | sed -e 's| | $(srcdir)/|g' -e 's|Makefile|Makefile.in|g'`
22434 23107
22435 23108
@@ -23259,6 +23932,7 @@ do
23259 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;; 23932 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
23260 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;; 23933 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
23261 "test/automated/Makefile") CONFIG_FILES="$CONFIG_FILES test/automated/Makefile" ;; 23934 "test/automated/Makefile") CONFIG_FILES="$CONFIG_FILES test/automated/Makefile" ;;
23935 "admin/unidata/Makefile") CONFIG_FILES="$CONFIG_FILES admin/unidata/Makefile" ;;
23262 "mkdirs") CONFIG_COMMANDS="$CONFIG_COMMANDS mkdirs" ;; 23936 "mkdirs") CONFIG_COMMANDS="$CONFIG_COMMANDS mkdirs" ;;
23263 "epaths") CONFIG_COMMANDS="$CONFIG_COMMANDS epaths" ;; 23937 "epaths") CONFIG_COMMANDS="$CONFIG_COMMANDS epaths" ;;
23264 "gdbinit") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbinit" ;; 23938 "gdbinit") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbinit" ;;
diff --git a/configure.in b/configure.in
index 14a80622cd9..c9592921e75 100644
--- a/configure.in
+++ b/configure.in
@@ -686,47 +686,121 @@ else
686 test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS" 686 test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
687fi 687fi
688 688
689### Use -Wdeclaration-after-statement if the compiler supports it 689AC_ARG_ENABLE([gcc-warnings],
690AC_MSG_CHECKING([whether gcc understands -Wdeclaration-after-statement]) 690 [AS_HELP_STRING([--enable-gcc-warnings],
691SAVE_CFLAGS="$CFLAGS" 691 [turn on lots of GCC warnings (for developers)])],
692CFLAGS="$CFLAGS -Wdeclaration-after-statement" 692 [case $enableval in
693AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], has_option=yes, has_option=no) 693 yes|no) ;;
694if test $has_option = yes; then 694 *) AC_MSG_ERROR([bad value $enableval for gcc-warnings option]) ;;
695 C_WARNINGS_SWITCH="-Wdeclaration-after-statement $C_WARNINGS_SWITCH" 695 esac
696fi 696 gl_gcc_warnings=$enableval],
697AC_MSG_RESULT($has_option) 697 [gl_gcc_warnings=no]
698CFLAGS="$SAVE_CFLAGS" 698)
699unset has_option 699
700unset SAVE_CFLAGS 700# gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
701 701# ------------------------------------------------
702### Use -Wold-style-definition if the compiler supports it 702# If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
703# This can be removed when conversion to standard C is finished. 703# Otherwise, run RUN-IF-NOT-FOUND.
704AC_MSG_CHECKING([whether gcc understands -Wold-style-definition]) 704AC_DEFUN([gl_GCC_VERSION_IFELSE],
705SAVE_CFLAGS="$CFLAGS" 705 [AC_PREPROC_IFELSE(
706CFLAGS="$CFLAGS -Wold-style-definition" 706 [AC_LANG_PROGRAM(
707AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], has_option=yes, has_option=no) 707 [[
708if test $has_option = yes; then 708#if ($1) < __GNUC__ || (($1) == __GNUC__ && ($2) <= __GNUC_MINOR__)
709 C_WARNINGS_SWITCH="-Wold-style-definition $C_WARNINGS_SWITCH" 709/* ok */
710fi 710#else
711AC_MSG_RESULT($has_option) 711# error "your version of gcc is older than $1.$2"
712CFLAGS="$SAVE_CFLAGS" 712#endif
713unset has_option 713 ]]),
714unset SAVE_CFLAGS 714 ], [$3], [$4])
715 715 ]
716### Use -Wimplicit-function-declaration if the compiler supports it 716)
717AC_MSG_CHECKING([whether gcc understands -Wimplicit-function-declaration]) 717
718SAVE_CFLAGS="$CFLAGS" 718# When compiling with GCC, prefer -isystem to -I when including system
719CFLAGS="$CFLAGS -Wimplicit-function-declaration" 719# include files, to avoid generating useless diagnostics for the files.
720AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], has_option=yes, has_option=no) 720if test "$gl_gcc_warnings" != yes; then
721if test $has_option = yes; then 721 isystem='-I'
722 C_WARNINGS_SWITCH="-Wimplicit-function-declaration $C_WARNINGS_SWITCH" 722else
723fi 723 isystem='-isystem '
724AC_MSG_RESULT($has_option) 724
725CFLAGS="$SAVE_CFLAGS" 725 # This, $nw, is the list of warnings we disable.
726unset has_option 726 nw=
727unset SAVE_CFLAGS 727
728 728 case $with_x_toolkit in
729AC_SUBST(C_WARNINGS_SWITCH) 729 lucid | athena | motif)
730 # Old toolkits mishandle 'const'.
731 nw="$nw -Wwrite-strings"
732 ;;
733 *)
734 gl_WARN_ADD([-Werror], [WERROR_CFLAGS])
735 ;;
736 esac
737 AC_SUBST([WERROR_CFLAGS])
738
739 nw="$nw -Waggregate-return" # anachronistic
740 nw="$nw -Wlong-long" # C90 is anachronistic (lib/gethrxtime.h)
741 nw="$nw -Wc++-compat" # We don't care about C++ compilers
742 nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib
743 nw="$nw -Wtraditional" # Warns on #elif which we use often
744 nw="$nw -Wcast-qual" # Too many warnings for now
745 nw="$nw -Wconversion" # Too many warnings for now
746 nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
747 nw="$nw -Wsign-conversion" # Too many warnings for now
748 nw="$nw -Woverlength-strings" # Not a problem these days
749 nw="$nw -Wtraditional-conversion" # Too many warnings for now
750 nw="$nw -Wpadded" # Our structs are not padded
751 nw="$nw -Wredundant-decls" # We regularly (re)declare getenv etc.
752 nw="$nw -Wlogical-op" # any use of fwrite provokes this
753 nw="$nw -Wformat-nonliteral" # Emacs does this a lot
754 nw="$nw -Wvla" # warnings in gettext.h
755 nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__
756 nw="$nw -Wswitch-enum" # Too many warnings for now
757 nw="$nw -Wswitch-default" # Too many warnings for now
758 nw="$nw -Wfloat-equal" # e.g., ftoastr.c
759 nw="$nw -Winline" # e.g., dispnew.c's inlining of row_equal_p
760
761 # Emacs doesn't care about shadowing; see
762 # <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
763 nw="$nw -Wshadow"
764
765 # The following lines should be removable at some point.
766 nw="$nw -Wstack-protector"
767 nw="$nw -Wstrict-overflow"
768 nw="$nw -Wsuggest-attribute=const"
769 nw="$nw -Wsuggest-attribute=pure"
770
771 gl_MANYWARN_ALL_GCC([ws])
772 gl_MANYWARN_COMPLEMENT([ws], [$ws], [$nw])
773 for w in $ws; do
774 gl_WARN_ADD([$w])
775 done
776 gl_WARN_ADD([-Wno-missing-field-initializers]) # We need this one
777 gl_WARN_ADD([-Wno-sign-compare]) # Too many warnings for now
778 gl_WARN_ADD([-Wno-type-limits]) # Too many warnings for now
779 gl_WARN_ADD([-Wno-switch]) # Too many warnings for now
780 gl_WARN_ADD([-Wno-unused-parameter]) # Too many warnings for now
781 gl_WARN_ADD([-Wno-format-nonliteral])
782
783 # In spite of excluding -Wlogical-op above, it is enabled, as of
784 # gcc 4.5.0 20090517.
785 gl_WARN_ADD([-Wno-logical-op])
786
787 gl_WARN_ADD([-fdiagnostics-show-option])
788 gl_WARN_ADD([-funit-at-a-time])
789
790 AC_DEFINE([lint], [1], [Define to 1 if the compiler is checking for lint.])
791 AC_DEFINE([_FORTIFY_SOURCE], [2],
792 [enable compile-time and run-time bounds-checking, and some warnings])
793 AC_DEFINE([GNULIB_PORTCHECK], [1], [enable some gnulib portability checks])
794
795 # We use a slightly smaller set of warning options for lib/.
796 # Remove the following and save the result in GNULIB_WARN_CFLAGS.
797 nw=
798 nw="$nw -Wunused-macros"
799
800 gl_MANYWARN_COMPLEMENT([GNULIB_WARN_CFLAGS], [$WARN_CFLAGS], [$nw])
801 AC_SUBST([GNULIB_WARN_CFLAGS])
802fi
803
730 804
731 805
732#### Some other nice autoconf tests. 806#### Some other nice autoconf tests.
@@ -1127,8 +1201,13 @@ AC_DEFUN([PKG_CHECK_MODULES], [
1127 if $PKG_CONFIG --exists "$2" 2>&AS_MESSAGE_LOG_FD && 1201 if $PKG_CONFIG --exists "$2" 2>&AS_MESSAGE_LOG_FD &&
1128 $1_CFLAGS=`$PKG_CONFIG --cflags "$2" 2>&AS_MESSAGE_LOG_FD` && 1202 $1_CFLAGS=`$PKG_CONFIG --cflags "$2" 2>&AS_MESSAGE_LOG_FD` &&
1129 $1_LIBS=`$PKG_CONFIG --libs "$2" 2>&AS_MESSAGE_LOG_FD`; then 1203 $1_LIBS=`$PKG_CONFIG --libs "$2" 2>&AS_MESSAGE_LOG_FD`; then
1130 1204 edit_cflags="
1131 $1_CFLAGS=`AS_ECHO(["$$1_CFLAGS"]) | sed -e 's,///*,/,g'` 1205 s,///*,/,g
1206 s/^/ /
1207 s/ -I/ $isystem/g
1208 s/^ //
1209 "
1210 $1_CFLAGS=`AS_ECHO(["$$1_CFLAGS"]) | sed -e "$edit_cflags"`
1132 $1_LIBS=`AS_ECHO(["$$1_LIBS"]) | sed -e 's,///*,/,g'` 1211 $1_LIBS=`AS_ECHO(["$$1_LIBS"]) | sed -e 's,///*,/,g'`
1133 AC_MSG_RESULT([yes CFLAGS='$$1_CFLAGS' LIBS='$$1_LIBS']) 1212 AC_MSG_RESULT([yes CFLAGS='$$1_CFLAGS' LIBS='$$1_LIBS'])
1134 succeeded=yes 1213 succeeded=yes
@@ -1421,15 +1500,6 @@ else
1421 window_system=x11 1500 window_system=x11
1422fi 1501fi
1423 1502
1424## Workaround for bug in autoconf <= 2.62.
1425## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html
1426## No need to do anything special for these standard directories.
1427if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then
1428
1429 x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'`
1430
1431fi
1432
1433LD_SWITCH_X_SITE_AUX= 1503LD_SWITCH_X_SITE_AUX=
1434LD_SWITCH_X_SITE_AUX_RPATH= 1504LD_SWITCH_X_SITE_AUX_RPATH=
1435if test "${x_libraries}" != NONE; then 1505if test "${x_libraries}" != NONE; then
@@ -1463,7 +1533,7 @@ AC_SUBST(LD_SWITCH_X_SITE_AUX)
1463AC_SUBST(LD_SWITCH_X_SITE_AUX_RPATH) 1533AC_SUBST(LD_SWITCH_X_SITE_AUX_RPATH)
1464 1534
1465if test "${x_includes}" != NONE && test -n "${x_includes}"; then 1535if test "${x_includes}" != NONE && test -n "${x_includes}"; then
1466 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"` 1536 C_SWITCH_X_SITE="$isystem"`echo ${x_includes} | sed -e "s/:/ $isystem/g"`
1467fi 1537fi
1468 1538
1469if test x"${x_includes}" = x; then 1539if test x"${x_includes}" = x; then
@@ -1550,13 +1620,12 @@ fail;
1550 AC_CHECK_HEADER([AppKit/AppKit.h], [HAVE_NS=yes], 1620 AC_CHECK_HEADER([AppKit/AppKit.h], [HAVE_NS=yes],
1551 [AC_MSG_ERROR([`--with-ns' was specified, but the include 1621 [AC_MSG_ERROR([`--with-ns' was specified, but the include
1552 files are missing or cannot be compiled.])]) 1622 files are missing or cannot be compiled.])])
1553 NS_HAVE_NSINTEGER=yes
1554 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <Foundation/NSObjCRuntime.h>], 1623 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <Foundation/NSObjCRuntime.h>],
1555 [NSInteger i;])], 1624 [NSInteger i;])],
1556 ns_have_nsinteger=yes, 1625 ns_have_nsinteger=yes,
1557 ns_have_nsinteger=no) 1626 ns_have_nsinteger=no)
1558 if test $ns_have_nsinteger = no; then 1627 if test $ns_have_nsinteger = yes; then
1559 NS_HAVE_NSINTEGER=no 1628 AC_DEFINE(NS_HAVE_NSINTEGER, 1, [Define to 1 if `NSInteger' is defined.])
1560 fi 1629 fi
1561fi 1630fi
1562AC_SUBST(TEMACS_LDFLAGS2) 1631AC_SUBST(TEMACS_LDFLAGS2)
@@ -2589,7 +2658,7 @@ AC_SUBST(LIBGPM)
2589dnl Check for malloc/malloc.h on darwin 2658dnl Check for malloc/malloc.h on darwin
2590AC_CHECK_HEADER(malloc/malloc.h, [AC_DEFINE(HAVE_MALLOC_MALLOC_H, 1, [Define to 1 if you have the <malloc/malloc.h> header file.])]) 2659AC_CHECK_HEADER(malloc/malloc.h, [AC_DEFINE(HAVE_MALLOC_MALLOC_H, 1, [Define to 1 if you have the <malloc/malloc.h> header file.])])
2591 2660
2592C_SWITCH_X_SYSTEM= 2661GNUSTEP_CFLAGS=
2593### Use NeXTstep API to implement GUI. 2662### Use NeXTstep API to implement GUI.
2594if test "${HAVE_NS}" = "yes"; then 2663if test "${HAVE_NS}" = "yes"; then
2595 AC_DEFINE(HAVE_NS, 1, [Define to 1 if you are using the NeXTstep API, either GNUstep or Cocoa on Mac OS X.]) 2664 AC_DEFINE(HAVE_NS, 1, [Define to 1 if you are using the NeXTstep API, either GNUstep or Cocoa on Mac OS X.])
@@ -2600,15 +2669,10 @@ if test "${HAVE_NS}" = "yes"; then
2600 AC_DEFINE(NS_IMPL_GNUSTEP, 1, [Define to 1 if you are using NS windowing under GNUstep.]) 2669 AC_DEFINE(NS_IMPL_GNUSTEP, 1, [Define to 1 if you are using NS windowing under GNUstep.])
2601 # See also .m.o rule in Makefile.in */ 2670 # See also .m.o rule in Makefile.in */
2602 # FIXME: are all these flags really needed? Document here why. */ 2671 # FIXME: are all these flags really needed? Document here why. */
2603 dnl FIXME this should be renamed to GNUSTEP_CFLAGS, and only 2672 GNUSTEP_CFLAGS="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
2604 dnl used in src/Makefile.in.
2605 C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
2606 ## Extra CFLAGS applied to src/*.m files. 2673 ## Extra CFLAGS applied to src/*.m files.
2607 GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE" 2674 GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE"
2608 fi 2675 fi
2609 if test "${NS_HAVE_NSINTEGER}" = "yes"; then
2610 AC_DEFINE(NS_HAVE_NSINTEGER, 1, [Define to 1 if `NSInteger' is defined.])
2611 fi
2612 # We also have mouse menus. 2676 # We also have mouse menus.
2613 HAVE_MENUS=yes 2677 HAVE_MENUS=yes
2614 OTHER_FILES=ns-app 2678 OTHER_FILES=ns-app
@@ -2751,6 +2815,7 @@ __fpending mblen mbrlen mbsinit strsignal setitimer ualarm \
2751sendto recvfrom getsockopt setsockopt getsockname getpeername \ 2815sendto recvfrom getsockopt setsockopt getsockname getpeername \
2752gai_strerror mkstemp getline getdelim mremap fsync sync \ 2816gai_strerror mkstemp getline getdelim mremap fsync sync \
2753difftime mempcpy mblen mbrlen posix_memalign \ 2817difftime mempcpy mblen mbrlen posix_memalign \
2818getpwent endpwent getgrent endgrent \
2754cfmakeraw cfsetspeed copysign __executable_start) 2819cfmakeraw cfsetspeed copysign __executable_start)
2755 2820
2756dnl Cannot use AC_CHECK_FUNCS 2821dnl Cannot use AC_CHECK_FUNCS
@@ -3222,7 +3287,7 @@ AC_SUBST(gameuser)
3222## end of LIBX_BASE, but nothing ever set it. 3287## end of LIBX_BASE, but nothing ever set it.
3223AC_SUBST(LD_SWITCH_X_SITE) 3288AC_SUBST(LD_SWITCH_X_SITE)
3224AC_SUBST(C_SWITCH_X_SITE) 3289AC_SUBST(C_SWITCH_X_SITE)
3225AC_SUBST(C_SWITCH_X_SYSTEM) 3290AC_SUBST(GNUSTEP_CFLAGS)
3226AC_SUBST(CFLAGS) 3291AC_SUBST(CFLAGS)
3227## Used in lwlib/Makefile.in. 3292## Used in lwlib/Makefile.in.
3228AC_SUBST(X_TOOLKIT_TYPE) 3293AC_SUBST(X_TOOLKIT_TYPE)
@@ -3443,7 +3508,7 @@ case "$opsys" in
3443 ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM 3508 ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM
3444 ## had different values in configure (in ac_link) and src/Makefile.in. 3509 ## had different values in configure (in ac_link) and src/Makefile.in.
3445 ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS. 3510 ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS.
3446 gnu-linux) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_AUX)" ;; 3511 gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_AUX_RPATH)" ;;
3447 3512
3448 *) LD_SWITCH_SYSTEM_TEMACS= ;; 3513 *) LD_SWITCH_SYSTEM_TEMACS= ;;
3449esac 3514esac
@@ -3802,6 +3867,13 @@ to run if these resources are not installed."
3802 echo 3867 echo
3803fi 3868fi
3804 3869
3870if test "${opsys}" = "cygwin"; then
3871 case `uname -r` in
3872 1.5.*) AC_MSG_WARN([[building Emacs on Cygwin 1.5 is not supported.]])
3873 echo
3874 ;;
3875 esac
3876fi
3805 3877
3806# Remove any trailing slashes in these variables. 3878# Remove any trailing slashes in these variables.
3807[test "${prefix}" != NONE && 3879[test "${prefix}" != NONE &&
@@ -3834,6 +3906,16 @@ if test -f $srcdir/${opt_makefile}.in; then
3834 AC_CONFIG_FILES([test/automated/Makefile]) 3906 AC_CONFIG_FILES([test/automated/Makefile])
3835fi 3907fi
3836 3908
3909
3910dnl admin/ may or may not be present.
3911opt_makefile=admin/unidata/Makefile
3912
3913if test -f $srcdir/${opt_makefile}.in; then
3914 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
3915 AC_CONFIG_FILES([admin/unidata/Makefile])
3916fi
3917
3918
3837SUBDIR_MAKEFILES_IN=`echo " ${SUBDIR_MAKEFILES}" | sed -e 's| | $(srcdir)/|g' -e 's|Makefile|Makefile.in|g'` 3919SUBDIR_MAKEFILES_IN=`echo " ${SUBDIR_MAKEFILES}" | sed -e 's| | $(srcdir)/|g' -e 's|Makefile|Makefile.in|g'`
3838 3920
3839AC_SUBST(SUBDIR_MAKEFILES_IN) 3921AC_SUBST(SUBDIR_MAKEFILES_IN)
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 549b677c4f2..63ccb880d40 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,85 @@
12012-04-15 Chong Yidong <cyd@gnu.org>
2
3 * misc.texi (emacsclient Options): More clarifications.
4
52012-04-15 Glenn Morris <rgm@gnu.org>
6
7 * msdog.texi (Windows Printing): It doesn't set printer-name.
8
9 * mule.texi (Language Environments): Move font info to "Fontsets".
10 (Fontsets): Move intlfonts etc here from "Language Environments".
11 Copyedits.
12 (Defining Fontsets, Modifying Fontsets, Undisplayable Characters)
13 (Unibyte Mode, Charsets, Bidirectional Editing): Copyedits.
14
152012-04-15 Chong Yidong <cyd@gnu.org>
16
17 * glossary.texi (Glossary): Standardize on "text terminal"
18 terminology. All callers changed.
19
20 * misc.texi (emacsclient Options): Document "client frame" concept
21 and its effect on C-x C-c more carefully.
22
232012-04-15 Glenn Morris <rgm@gnu.org>
24
25 * frames.texi (Scroll Bars):
26 * glossary.texi (Glossary): Use consistent case for "X Window System".
27
28 * mule.texi (Select Input Method, Coding Systems):
29 State command names in kbd tables.
30 (Recognize Coding): Add cross-ref.
31 (Output Coding): Don't mention message mode in particular.
32 (Text Coding, Communication Coding, File Name Coding, Terminal Coding):
33 Copyedits.
34
352012-04-14 Glenn Morris <rgm@gnu.org>
36
37 * mule.texi (Select Input Method, Coding Systems, Recognize Coding):
38 Copyedits.
39 (Coding Systems): Mac OS X apparently uses newlines for EOL.
40 (Recognize Coding): Remove old auto-coding-regexp-alist example.
41 auto-coding-functions does not override coding: tags.
42 Remove rmail-decode-mime-charset; it no longer has any effect.
43
442012-04-14 Chong Yidong <cyd@gnu.org>
45
46 * custom.texi (Creating Custom Themes): Add reference to Custom
47 Themes node in Lisp manual.
48
492012-04-14 Glenn Morris <rgm@gnu.org>
50
51 * mule.texi (International): Copyedits.
52 (International Chars): Update C-x = example output.
53 (Disabling Multibyte): Rename from "Enabling Multibyte".
54 Clarify what "unibyte: t" does, and mode-line description.
55 (Unibyte Mode): Update for "Disabling Multibyte" node name change.
56 Use Texinfo recommended convention for quotes+punctuation.
57 (Language Environments): Copyedits.
58 (Input Methods): Copyedits. Use "^" for the postfix example,
59 because it is less confusing inside Info's `quotes'.
60
61 * custom.texi (Specifying File Variables): Fix "unibyte" description.
62 Update for "Disabling Multibyte" node name change.
63 * emacs.texi: Update for "Disabling Multibyte" node name change.
64
65 * abbrevs.texi, arevert-xtra.texi, buffers.texi, building.texi:
66 * cmdargs.texi, custom.texi, entering.texi, files.texi, frames.texi:
67 * glossary.texi, help.texi, macos.texi, maintaining.texi, mini.texi:
68 * misc.texi, package.texi, programs.texi, screen.texi, search.texi:
69 * sending.texi, text.texi, trouble.texi:
70 Use @file for buffers, per the Texinfo manual.
71
72 * entering.texi (Entering Emacs):
73 Do not mention initial-buffer-choice = t.
74
75 * misc.texi (Gnus Startup): Use @env for environment variables.
76
77 * Makefile.in: Replace non-portable use of $< in ordinary rules.
78
792012-04-12 Glenn Morris <rgm@gnu.org>
80
81 * ack.texi (Acknowledgments): Don't mention obsolete mailpost.el.
82
12012-04-07 Glenn Morris <rgm@gnu.org> 832012-04-07 Glenn Morris <rgm@gnu.org>
2 84
3 * emacsver.texi (EMACSVER): Bump version to 24.1.50. 85 * emacsver.texi (EMACSVER): Bump version to 24.1.50.
diff --git a/doc/emacs/Makefile.in b/doc/emacs/Makefile.in
index 2ed265ecd70..b25f6dbe490 100644
--- a/doc/emacs/Makefile.in
+++ b/doc/emacs/Makefile.in
@@ -1,6 +1,6 @@
1#### Makefile for the Emacs Manual 1#### Makefile for the Emacs Manual
2 2
3# Copyright (C) 1994, 1996-2012 Free Software Foundation, Inc. 3# Copyright (C) 1994, 1996-2012 Free Software Foundation, Inc.
4 4
5# This file is part of GNU Emacs. 5# This file is part of GNU Emacs.
6 6
@@ -127,31 +127,31 @@ ps: emacs.ps
127# Note that all the Info targets build the Info files in srcdir. 127# Note that all the Info targets build the Info files in srcdir.
128# There is no provision for Info files to exist in the build directory. 128# There is no provision for Info files to exist in the build directory.
129# In a distribution of Emacs, the Info files should be up to date. 129# In a distribution of Emacs, the Info files should be up to date.
130 130# Note: "<" is not portable in ordinary make rules.
131$(infodir)/emacs: ${EMACSSOURCES} 131$(infodir)/emacs: ${EMACSSOURCES}
132 $(mkinfodir) 132 $(mkinfodir)
133 $(MAKEINFO) $(MAKEINFO_OPTS) -o $@ $< 133 $(MAKEINFO) $(MAKEINFO_OPTS) -o $@ ${srcdir}/emacs.texi
134 134
135emacs.dvi: ${EMACSSOURCES} 135emacs.dvi: ${EMACSSOURCES}
136 $(ENVADD) $(TEXI2DVI) $< 136 $(ENVADD) $(TEXI2DVI) ${srcdir}/emacs.texi
137 137
138emacs.ps: emacs.dvi 138emacs.ps: emacs.dvi
139 $(DVIPS) -o $@ $< 139 $(DVIPS) -o $@ emacs.dvi
140 140
141emacs.pdf: ${EMACSSOURCES} 141emacs.pdf: ${EMACSSOURCES}
142 $(ENVADD) $(TEXI2PDF) $< 142 $(ENVADD) $(TEXI2PDF) ${srcdir}/emacs.texi
143 143
144emacs.html: ${EMACSSOURCES} 144emacs.html: ${EMACSSOURCES}
145 $(MAKEINFO) $(MAKEINFO_OPTS) --html -o $@ $< 145 $(MAKEINFO) $(MAKEINFO_OPTS) --html -o $@ ${srcdir}/emacs.texi
146 146
147emacs-xtra.dvi: $(EMACS_XTRA) 147emacs-xtra.dvi: $(EMACS_XTRA)
148 $(ENVADD) $(TEXI2DVI) $< 148 $(ENVADD) $(TEXI2DVI) ${srcdir}/emacs-xtra.texi
149 149
150emacs-xtra.ps: emacs-xtra.dvi 150emacs-xtra.ps: emacs-xtra.dvi
151 $(DVIPS) -o $@ $< 151 $(DVIPS) -o $@ emacs-xtra.dvi
152 152
153emacs-xtra.pdf: $(EMACS_XTRA) 153emacs-xtra.pdf: $(EMACS_XTRA)
154 $(ENVADD) $(TEXI2PDF) $< 154 $(ENVADD) $(TEXI2PDF) ${srcdir}/emacs-xtra.texi
155 155
156.PHONY: mostlyclean clean distclean maintainer-clean infoclean 156.PHONY: mostlyclean clean distclean maintainer-clean infoclean
157 157
diff --git a/doc/emacs/abbrevs.texi b/doc/emacs/abbrevs.texi
index f3b272c359d..a8a34e62c1f 100644
--- a/doc/emacs/abbrevs.texi
+++ b/doc/emacs/abbrevs.texi
@@ -261,12 +261,12 @@ expands to itself, and save it to your abbrev file.
261 @kbd{M-x edit-abbrevs} allows you to add, change or kill abbrev 261 @kbd{M-x edit-abbrevs} allows you to add, change or kill abbrev
262definitions by editing a list of them in an Emacs buffer. The list has 262definitions by editing a list of them in an Emacs buffer. The list has
263the same format described above. The buffer of abbrevs is called 263the same format described above. The buffer of abbrevs is called
264@samp{*Abbrevs*}, and is in Edit-Abbrevs mode. Type @kbd{C-c C-c} in 264@file{*Abbrevs*}, and is in Edit-Abbrevs mode. Type @kbd{C-c C-c} in
265this buffer to install the abbrev definitions as specified in the 265this buffer to install the abbrev definitions as specified in the
266buffer---and delete any abbrev definitions not listed. 266buffer---and delete any abbrev definitions not listed.
267 267
268 The command @code{edit-abbrevs} is actually the same as 268 The command @code{edit-abbrevs} is actually the same as
269@code{list-abbrevs} except that it selects the buffer @samp{*Abbrevs*} 269@code{list-abbrevs} except that it selects the buffer @file{*Abbrevs*}
270whereas @code{list-abbrevs} merely displays it in another window. 270whereas @code{list-abbrevs} merely displays it in another window.
271 271
272@node Saving Abbrevs 272@node Saving Abbrevs
diff --git a/doc/emacs/ack.texi b/doc/emacs/ack.texi
index be01b05fe19..51f6d70bd90 100644
--- a/doc/emacs/ack.texi
+++ b/doc/emacs/ack.texi
@@ -252,10 +252,6 @@ Vivek Dasmohapatra wrote @file{htmlfontify.el}, to convert a buffer or
252source tree to HTML. 252source tree to HTML.
253 253
254@item 254@item
255Gary Delp wrote @file{mailpost.el}, an interface between RMAIL and the
256@file{/usr/uci/post} mailer.
257
258@item
259Matthieu Devin wrote @file{delsel.el}, a package to make newly-typed 255Matthieu Devin wrote @file{delsel.el}, a package to make newly-typed
260text replace the current selection. 256text replace the current selection.
261 257
@@ -694,8 +690,8 @@ directory-local variables; and the @code{info-finder} feature that
694creates a virtual Info manual of package keywords. 690creates a virtual Info manual of package keywords.
695 691
696@item 692@item
697Károly L@H{o}rentey wrote the ``multi-terminal'' code, which allows Emacs to 693Károly L@H{o}rentey wrote the ``multi-terminal'' code, which allows
698run on graphical and text-only terminals simultaneously. 694Emacs to run on graphical and text terminals simultaneously.
699 695
700@item 696@item
701Martin Lorentzon wrote @file{vc-annotate.el}, support for version 697Martin Lorentzon wrote @file{vc-annotate.el}, support for version
diff --git a/doc/emacs/arevert-xtra.texi b/doc/emacs/arevert-xtra.texi
index 4032c0b9882..55d7646542d 100644
--- a/doc/emacs/arevert-xtra.texi
+++ b/doc/emacs/arevert-xtra.texi
@@ -93,8 +93,8 @@ deleting or changing marks or flags will mark it modified again.
93 93
94Remote Dired buffers are not auto-reverted (because it may be slow). 94Remote Dired buffers are not auto-reverted (because it may be slow).
95Neither are Dired buffers for which you used shell wildcards or file 95Neither are Dired buffers for which you used shell wildcards or file
96arguments to list only some of the files. @samp{*Find*} and 96arguments to list only some of the files. @file{*Find*} and
97@samp{*Locate*} buffers do not auto-revert either. 97@file{*Locate*} buffers do not auto-revert either.
98 98
99@c FIXME? This should be in the elisp manual? 99@c FIXME? This should be in the elisp manual?
100@node Supporting additional buffers 100@node Supporting additional buffers
diff --git a/doc/emacs/basic.texi b/doc/emacs/basic.texi
index 3e768ab54d7..5ad48eb48ef 100644
--- a/doc/emacs/basic.texi
+++ b/doc/emacs/basic.texi
@@ -372,7 +372,7 @@ the text in the region. @xref{Mark}, for a description of the region.
372 On most keyboards, @key{DEL} is labeled @key{Backspace}, but we 372 On most keyboards, @key{DEL} is labeled @key{Backspace}, but we
373refer to it as @key{DEL} in this manual. (Do not confuse @key{DEL} 373refer to it as @key{DEL} in this manual. (Do not confuse @key{DEL}
374with the @key{Delete} key; we will discuss @key{Delete} momentarily.) 374with the @key{Delete} key; we will discuss @key{Delete} momentarily.)
375On some text-only terminals, Emacs may not recognize the @key{DEL} key 375On some text terminals, Emacs may not recognize the @key{DEL} key
376properly. @xref{DEL Does Not Delete}, if you encounter this problem. 376properly. @xref{DEL Does Not Delete}, if you encounter this problem.
377 377
378 The @key{delete} (@code{delete-forward-char}) command deletes in the 378 The @key{delete} (@code{delete-forward-char}) command deletes in the
@@ -530,7 +530,7 @@ too long to fit in the window, and Emacs displays it as two or more
530@dfn{continuation}, and the long logical line is called a 530@dfn{continuation}, and the long logical line is called a
531@dfn{continued line}. On a graphical display, Emacs indicates line 531@dfn{continued line}. On a graphical display, Emacs indicates line
532wrapping with small bent arrows in the left and right window fringes. 532wrapping with small bent arrows in the left and right window fringes.
533On a text-only terminal, Emacs indicates line wrapping by displaying a 533On a text terminal, Emacs indicates line wrapping by displaying a
534@samp{\} character at the right margin. 534@samp{\} character at the right margin.
535 535
536 Most commands that act on lines act on logical lines, not screen 536 Most commands that act on lines act on logical lines, not screen
@@ -545,9 +545,9 @@ and up, respectively, by one screen line (@pxref{Moving Point}).
545continuing them. This means that every logical line occupies a single 545continuing them. This means that every logical line occupies a single
546screen line; if it is longer than the width of the window, the rest of 546screen line; if it is longer than the width of the window, the rest of
547the line is not displayed. On a graphical display, a truncated line 547the line is not displayed. On a graphical display, a truncated line
548is indicated by a small straight arrow in the right fringe; on a 548is indicated by a small straight arrow in the right fringe; on a text
549text-only terminal, it is indicated by a @samp{$} character in the 549terminal, it is indicated by a @samp{$} character in the right margin.
550right margin. @xref{Line Truncation}. 550@xref{Line Truncation}.
551 551
552 By default, continued lines are wrapped at the right window edge. 552 By default, continued lines are wrapped at the right window edge.
553Since the wrapping may occur in the middle of a word, continued lines 553Since the wrapping may occur in the middle of a word, continued lines
diff --git a/doc/emacs/buffers.texi b/doc/emacs/buffers.texi
index d0ec1103580..d2783bcb0ba 100644
--- a/doc/emacs/buffers.texi
+++ b/doc/emacs/buffers.texi
@@ -11,7 +11,7 @@
11the file's text. Each time you invoke Dired, a buffer is used to hold 11the file's text. Each time you invoke Dired, a buffer is used to hold
12the directory listing. If you send a message with @kbd{C-x m}, a 12the directory listing. If you send a message with @kbd{C-x m}, a
13buffer is used to hold the text of the message. When you ask for a 13buffer is used to hold the text of the message. When you ask for a
14command's documentation, that appears in a buffer named @samp{*Help*}. 14command's documentation, that appears in a buffer named @file{*Help*}.
15 15
16 Each buffer has a unique name, which can be of any length. When a 16 Each buffer has a unique name, which can be of any length. When a
17buffer is displayed in a window, its name is shown in the mode line 17buffer is displayed in a window, its name is shown in the mode line
@@ -19,7 +19,7 @@ buffer is displayed in a window, its name is shown in the mode line
19matters in buffer names. Most buffers are made by visiting files, and 19matters in buffer names. Most buffers are made by visiting files, and
20their names are derived from the files' names; however, you can also 20their names are derived from the files' names; however, you can also
21create an empty buffer with any name you want. A newly started Emacs 21create an empty buffer with any name you want. A newly started Emacs
22has several buffers, including one named @samp{*scratch*}, which can 22has several buffers, including one named @file{*scratch*}, which can
23be used for evaluating Lisp expressions and is not associated with any 23be used for evaluating Lisp expressions and is not associated with any
24file (@pxref{Lisp Interaction}). 24file (@pxref{Lisp Interaction}).
25 25
@@ -198,7 +198,7 @@ CRM Buffer Size Mode File
198@end smallexample 198@end smallexample
199 199
200@noindent 200@noindent
201The buffer @samp{*Help*} was made by a help request (@pxref{Help}); it 201The buffer @file{*Help*} was made by a help request (@pxref{Help}); it
202is not visiting any file. The buffer @code{src} was made by Dired on 202is not visiting any file. The buffer @code{src} was made by Dired on
203the directory @file{~/cvs/emacs/src/}. You can list only buffers that 203the directory @file{~/cvs/emacs/src/}. You can list only buffers that
204are visiting files by giving the command a prefix argument, as in 204are visiting files by giving the command a prefix argument, as in
@@ -248,9 +248,9 @@ happens and no renaming is done.
248 @kbd{M-x rename-uniquely} renames the current buffer to a similar 248 @kbd{M-x rename-uniquely} renames the current buffer to a similar
249name with a numeric suffix added to make it both different and unique. 249name with a numeric suffix added to make it both different and unique.
250This command does not need an argument. It is useful for creating 250This command does not need an argument. It is useful for creating
251multiple shell buffers: if you rename the @samp{*shell*} buffer, then 251multiple shell buffers: if you rename the @file{*shell*} buffer, then
252do @kbd{M-x shell} again, it makes a new shell buffer named 252do @kbd{M-x shell} again, it makes a new shell buffer named
253@samp{*shell*}; meanwhile, the old shell buffer continues to exist 253@file{*shell*}; meanwhile, the old shell buffer continues to exist
254under its new name. This method is also good for mail buffers, 254under its new name. This method is also good for mail buffers,
255compilation buffers, and most Emacs features that create special 255compilation buffers, and most Emacs features that create special
256buffers with particular names. (With some of these features, such as 256buffers with particular names. (With some of these features, such as
@@ -354,7 +354,7 @@ operations on buffers, through an interface similar to Dired
354@findex buffer-menu 354@findex buffer-menu
355@findex buffer-menu-other-window 355@findex buffer-menu-other-window
356 To use the buffer menu, type @kbd{C-x C-b} and switch to the window 356 To use the buffer menu, type @kbd{C-x C-b} and switch to the window
357displaying the @samp{*Buffer List*} buffer. You can also type 357displaying the @file{*Buffer List*} buffer. You can also type
358@kbd{M-x buffer-menu} to open the buffer menu in the selected window. 358@kbd{M-x buffer-menu} to open the buffer menu in the selected window.
359Alternatively, the command @kbd{M-x buffer-menu-other-window} opens 359Alternatively, the command @kbd{M-x buffer-menu-other-window} opens
360the buffer menu in another window, and selects that window. 360the buffer menu in another window, and selects that window.
@@ -409,11 +409,11 @@ Quit the buffer menu---immediately display the most recent formerly
409visible buffer in its place. 409visible buffer in its place.
410@item @key{RET} 410@item @key{RET}
411@itemx f 411@itemx f
412Immediately select this line's buffer in place of the @samp{*Buffer 412Immediately select this line's buffer in place of the @file{*Buffer
413List*} buffer. 413List*} buffer.
414@item o 414@item o
415Immediately select this line's buffer in another window as if by 415Immediately select this line's buffer in another window as if by
416@kbd{C-x 4 b}, leaving @samp{*Buffer List*} visible. 416@kbd{C-x 4 b}, leaving @file{*Buffer List*} visible.
417@item C-o 417@item C-o
418Immediately display this line's buffer in another window, but don't 418Immediately display this line's buffer in another window, but don't
419select the window. 419select the window.
@@ -422,7 +422,7 @@ Immediately select this line's buffer in a full-screen window.
422@item 2 422@item 2
423Immediately set up two windows, with this line's buffer selected in 423Immediately set up two windows, with this line's buffer selected in
424one, and the previously current buffer (aside from the buffer 424one, and the previously current buffer (aside from the buffer
425@samp{*Buffer List*}) displayed in the other. 425@file{*Buffer List*}) displayed in the other.
426@item b 426@item b
427Bury the buffer listed on this line. 427Bury the buffer listed on this line.
428@item m 428@item m
@@ -448,19 +448,19 @@ the inclusion of such buffers in the buffer list.
448suitable buffer, and turn on Buffer Menu mode in it. Everything else 448suitable buffer, and turn on Buffer Menu mode in it. Everything else
449described above is implemented by the special commands provided in 449described above is implemented by the special commands provided in
450Buffer Menu mode. One consequence of this is that you can switch from 450Buffer Menu mode. One consequence of this is that you can switch from
451the @samp{*Buffer List*} buffer to another Emacs buffer, and edit 451the @file{*Buffer List*} buffer to another Emacs buffer, and edit
452there. You can reselect the @samp{*Buffer List*} buffer later, to 452there. You can reselect the @file{*Buffer List*} buffer later, to
453perform the operations already requested, or you can kill it, or pay 453perform the operations already requested, or you can kill it, or pay
454no further attention to it. 454no further attention to it.
455 455
456 Normally, the buffer @samp{*Buffer List*} is not updated 456 Normally, the buffer @file{*Buffer List*} is not updated
457automatically when buffers are created and killed; its contents are 457automatically when buffers are created and killed; its contents are
458just text. If you have created, deleted or renamed buffers, the way 458just text. If you have created, deleted or renamed buffers, the way
459to update @samp{*Buffer List*} to show what you have done is to type 459to update @file{*Buffer List*} to show what you have done is to type
460@kbd{g} (@code{revert-buffer}). You can make this happen regularly 460@kbd{g} (@code{revert-buffer}). You can make this happen regularly
461every @code{auto-revert-interval} seconds if you enable Auto Revert 461every @code{auto-revert-interval} seconds if you enable Auto Revert
462mode in this buffer, as long as it is not marked modified. Global 462mode in this buffer, as long as it is not marked modified. Global
463Auto Revert mode applies to the @samp{*Buffer List*} buffer only if 463Auto Revert mode applies to the @file{*Buffer List*} buffer only if
464@code{global-auto-revert-non-file-buffers} is non-@code{nil}. 464@code{global-auto-revert-non-file-buffers} is non-@code{nil}.
465@iftex 465@iftex
466@inforef{Autorevert,, emacs-xtra}, for details. 466@inforef{Autorevert,, emacs-xtra}, for details.
diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi
index 2f977c7d923..fef7d2b2828 100644
--- a/doc/emacs/building.texi
+++ b/doc/emacs/building.texi
@@ -44,7 +44,7 @@ messages and show you where the errors occurred.
44@table @kbd 44@table @kbd
45@item M-x compile 45@item M-x compile
46Run a compiler asynchronously under Emacs, with error messages going to 46Run a compiler asynchronously under Emacs, with error messages going to
47the @samp{*compilation*} buffer. 47the @file{*compilation*} buffer.
48@item M-x recompile 48@item M-x recompile
49Invoke a compiler with the same command as in the last invocation of 49Invoke a compiler with the same command as in the last invocation of
50@kbd{M-x compile}. 50@kbd{M-x compile}.
@@ -57,7 +57,7 @@ Kill the running compilation subprocess.
57compile}. This reads a shell command line using the minibuffer, and 57compile}. This reads a shell command line using the minibuffer, and
58then executes the command by running a shell as a subprocess (or 58then executes the command by running a shell as a subprocess (or
59@dfn{inferior process}) of Emacs. The output is inserted in a buffer 59@dfn{inferior process}) of Emacs. The output is inserted in a buffer
60named @samp{*compilation*}. The current buffer's default directory is 60named @file{*compilation*}. The current buffer's default directory is
61used as the working directory for the execution of the command; 61used as the working directory for the execution of the command;
62normally, therefore, compilation takes place in this directory. 62normally, therefore, compilation takes place in this directory.
63 63
@@ -72,19 +72,19 @@ specified is automatically stored in the variable
72type @kbd{M-x compile}. A file can also specify a file-local value 72type @kbd{M-x compile}. A file can also specify a file-local value
73for @code{compile-command} (@pxref{File Variables}). 73for @code{compile-command} (@pxref{File Variables}).
74 74
75 Starting a compilation displays the @samp{*compilation*} buffer in 75 Starting a compilation displays the @file{*compilation*} buffer in
76another window but does not select it. While the compilation is 76another window but does not select it. While the compilation is
77running, the word @samp{run} is shown in the major mode indicator for 77running, the word @samp{run} is shown in the major mode indicator for
78the @samp{*compilation*} buffer, and the word @samp{Compiling} appears 78the @file{*compilation*} buffer, and the word @samp{Compiling} appears
79in all mode lines. You do not have to keep the @samp{*compilation*} 79in all mode lines. You do not have to keep the @file{*compilation*}
80buffer visible while compilation is running; it continues in any case. 80buffer visible while compilation is running; it continues in any case.
81When the compilation ends, for whatever reason, the mode line of the 81When the compilation ends, for whatever reason, the mode line of the
82@samp{*compilation*} buffer changes to say @samp{exit} (followed by 82@file{*compilation*} buffer changes to say @samp{exit} (followed by
83the exit code: @samp{[0]} for a normal exit), or @samp{signal} (if a 83the exit code: @samp{[0]} for a normal exit), or @samp{signal} (if a
84signal terminated the process). 84signal terminated the process).
85 85
86 If you want to watch the compilation transcript as it appears, 86 If you want to watch the compilation transcript as it appears,
87switch to the @samp{*compilation*} buffer and move point to the end of 87switch to the @file{*compilation*} buffer and move point to the end of
88the buffer. When point is at the end, new compilation output is 88the buffer. When point is at the end, new compilation output is
89inserted above point, which remains at the end. Otherwise, point 89inserted above point, which remains at the end. Otherwise, point
90remains fixed while compilation output is added at the end of the 90remains fixed while compilation output is added at the end of the
@@ -93,7 +93,7 @@ buffer.
93@cindex compilation buffer, keeping point at end 93@cindex compilation buffer, keeping point at end
94@vindex compilation-scroll-output 94@vindex compilation-scroll-output
95 If you change the variable @code{compilation-scroll-output} to a 95 If you change the variable @code{compilation-scroll-output} to a
96non-@code{nil} value, the @samp{*compilation*} buffer scrolls 96non-@code{nil} value, the @file{*compilation*} buffer scrolls
97automatically to follow the output. If the value is 97automatically to follow the output. If the value is
98@code{first-error}, scrolling stops when the first error appears, 98@code{first-error}, scrolling stops when the first error appears,
99leaving point at that error. For any other non-@code{nil} value, 99leaving point at that error. For any other non-@code{nil} value,
@@ -103,22 +103,22 @@ scrolling continues until there is no more output.
103 To rerun the last compilation with the same command, type @kbd{M-x 103 To rerun the last compilation with the same command, type @kbd{M-x
104recompile}. This reuses the compilation command from the last 104recompile}. This reuses the compilation command from the last
105invocation of @kbd{M-x compile}. It also reuses the 105invocation of @kbd{M-x compile}. It also reuses the
106@samp{*compilation*} buffer and starts the compilation in its default 106@file{*compilation*} buffer and starts the compilation in its default
107directory, which is the directory in which the previous compilation 107directory, which is the directory in which the previous compilation
108was started. 108was started.
109 109
110@findex kill-compilation 110@findex kill-compilation
111 Starting a new compilation also kills any compilation already 111 Starting a new compilation also kills any compilation already
112running in @samp{*compilation*}, as the buffer can only handle one 112running in @file{*compilation*}, as the buffer can only handle one
113compilation at any time. However, @kbd{M-x compile} asks for 113compilation at any time. However, @kbd{M-x compile} asks for
114confirmation before actually killing a compilation that is running. 114confirmation before actually killing a compilation that is running.
115You can also kill the compilation process with @kbd{M-x 115You can also kill the compilation process with @kbd{M-x
116kill-compilation}. 116kill-compilation}.
117 117
118 To run two compilations at once, start the first one, then rename 118 To run two compilations at once, start the first one, then rename
119the @samp{*compilation*} buffer (perhaps using @code{rename-uniquely}; 119the @file{*compilation*} buffer (perhaps using @code{rename-uniquely};
120@pxref{Misc Buffer}), then switch buffers and start the other 120@pxref{Misc Buffer}), then switch buffers and start the other
121compilation. This will create a new @samp{*compilation*} buffer. 121compilation. This will create a new @file{*compilation*} buffer.
122 122
123@vindex compilation-environment 123@vindex compilation-environment
124 You can control the environment passed to the compilation command 124 You can control the environment passed to the compilation command
@@ -133,7 +133,7 @@ variable settings override the usual ones.
133@cindex Compilation mode 133@cindex Compilation mode
134@cindex mode, Compilation 134@cindex mode, Compilation
135@cindex locus 135@cindex locus
136 The @samp{*compilation*} buffer uses a major mode called Compilation 136 The @file{*compilation*} buffer uses a major mode called Compilation
137mode. Compilation mode turns each error message in the buffer into a 137mode. Compilation mode turns each error message in the buffer into a
138hyperlink; you can move point to it and type @key{RET}, or click on it 138hyperlink; you can move point to it and type @key{RET}, or click on it
139with the mouse (@pxref{Mouse References}), to visit the @dfn{locus} of 139with the mouse (@pxref{Mouse References}), to visit the @dfn{locus} of
@@ -145,10 +145,10 @@ position in a file where that error occurred.
145 If you change the variable 145 If you change the variable
146@code{compilation-auto-jump-to-first-error} to a non-@code{nil} value, 146@code{compilation-auto-jump-to-first-error} to a non-@code{nil} value,
147Emacs automatically visits the locus of the first error message that 147Emacs automatically visits the locus of the first error message that
148appears in the @samp{*compilation*} buffer. 148appears in the @file{*compilation*} buffer.
149 149
150 Compilation mode provides the following additional commands. These 150 Compilation mode provides the following additional commands. These
151commands can also be used in @samp{*grep*} buffers, where the 151commands can also be used in @file{*grep*} buffers, where the
152hyperlinks are search matches rather than error messages (@pxref{Grep 152hyperlinks are search matches rather than error messages (@pxref{Grep
153Searching}). 153Searching}).
154 154
@@ -190,7 +190,7 @@ mode buffer. The first time you invoke it after a compilation, it
190visits the locus of the first error message. Each subsequent 190visits the locus of the first error message. Each subsequent
191@w{@kbd{C-x `}} visits the next error, in a similar fashion. If you 191@w{@kbd{C-x `}} visits the next error, in a similar fashion. If you
192visit a specific error with @key{RET} or a mouse click in the 192visit a specific error with @key{RET} or a mouse click in the
193@samp{*compilation*} buffer, subsequent @w{@kbd{C-x `}} commands 193@file{*compilation*} buffer, subsequent @w{@kbd{C-x `}} commands
194advance from there. When @w{@kbd{C-x `}} finds no more error messages 194advance from there. When @w{@kbd{C-x `}} finds no more error messages
195to visit, it signals an error. @w{@kbd{C-u C-x `}} starts again from 195to visit, it signals an error. @w{@kbd{C-u C-x `}} starts again from
196the beginning of the compilation buffer, and visits the first locus. 196the beginning of the compilation buffer, and visits the first locus.
@@ -199,8 +199,8 @@ the beginning of the compilation buffer, and visits the first locus.
199through errors in the opposite direction. 199through errors in the opposite direction.
200 200
201 The @code{next-error} and @code{previous-error} commands don't just 201 The @code{next-error} and @code{previous-error} commands don't just
202act on the errors or matches listed in @samp{*compilation*} and 202act on the errors or matches listed in @file{*compilation*} and
203@samp{*grep*} buffers; they also know how to iterate through error or 203@file{*grep*} buffers; they also know how to iterate through error or
204match lists produced by other commands, such as @kbd{M-x occur} 204match lists produced by other commands, such as @kbd{M-x occur}
205(@pxref{Other Repeating Search}). If you are already in a buffer 205(@pxref{Other Repeating Search}). If you are already in a buffer
206containing error messages or matches, those are the ones that are 206containing error messages or matches, those are the ones that are
@@ -224,16 +224,16 @@ highlights the relevant source line. The duration of this highlight
224is determined by the variable @code{next-error-highlight}. 224is determined by the variable @code{next-error-highlight}.
225 225
226@vindex compilation-context-lines 226@vindex compilation-context-lines
227 If the @samp{*compilation*} buffer is shown in a window with a left 227 If the @file{*compilation*} buffer is shown in a window with a left
228fringe (@pxref{Fringes}), the locus-visiting commands put an arrow in 228fringe (@pxref{Fringes}), the locus-visiting commands put an arrow in
229the fringe, pointing to the current error message. If the window has 229the fringe, pointing to the current error message. If the window has
230no left fringe, such as on a text-only terminal, these commands scroll 230no left fringe, such as on a text terminal, these commands scroll the
231the window so that the current message is at the top of the window. 231window so that the current message is at the top of the window. If
232If you change the variable @code{compilation-context-lines} to an 232you change the variable @code{compilation-context-lines} to an integer
233integer value @var{n}, these commands scroll the window so that the 233value @var{n}, these commands scroll the window so that the current
234current error message is @var{n} lines from the top, whether or not 234error message is @var{n} lines from the top, whether or not there is a
235there is a fringe; the default value, @code{nil}, gives the behavior 235fringe; the default value, @code{nil}, gives the behavior described
236described above. 236above.
237 237
238@vindex compilation-error-regexp-alist 238@vindex compilation-error-regexp-alist
239@vindex grep-regexp-alist 239@vindex grep-regexp-alist
@@ -276,7 +276,7 @@ Names}).
276command, but specifies the option for a noninteractive shell. This 276command, but specifies the option for a noninteractive shell. This
277means, in particular, that the shell should start with no prompt. If 277means, in particular, that the shell should start with no prompt. If
278you find your usual shell prompt making an unsightly appearance in the 278you find your usual shell prompt making an unsightly appearance in the
279@samp{*compilation*} buffer, it means you have made a mistake in your 279@file{*compilation*} buffer, it means you have made a mistake in your
280shell's init file by setting the prompt unconditionally. (This init 280shell's init file by setting the prompt unconditionally. (This init
281file may be named @file{.bashrc}, @file{.profile}, @file{.cshrc}, 281file may be named @file{.bashrc}, @file{.profile}, @file{.cshrc},
282@file{.shrc}, etc., depending on what shell you use.) The shell init 282@file{.shrc}, etc., depending on what shell you use.) The shell init
@@ -339,14 +339,14 @@ mode (@pxref{Compilation Mode}).
339@item M-x grep 339@item M-x grep
340@itemx M-x lgrep 340@itemx M-x lgrep
341Run @command{grep} asynchronously under Emacs, listing matching lines in 341Run @command{grep} asynchronously under Emacs, listing matching lines in
342the buffer named @samp{*grep*}. 342the buffer named @file{*grep*}.
343@item M-x grep-find 343@item M-x grep-find
344@itemx M-x find-grep 344@itemx M-x find-grep
345@itemx M-x rgrep 345@itemx M-x rgrep
346Run @command{grep} via @code{find}, and collect output in the 346Run @command{grep} via @code{find}, and collect output in the
347@samp{*grep*} buffer. 347@file{*grep*} buffer.
348@item M-x zrgrep 348@item M-x zrgrep
349Run @code{zgrep} and collect output in the @samp{*grep*} buffer. 349Run @code{zgrep} and collect output in the @file{*grep*} buffer.
350@item M-x kill-grep 350@item M-x kill-grep
351Kill the running @command{grep} subprocess. 351Kill the running @command{grep} subprocess.
352@end table 352@end table
@@ -369,7 +369,7 @@ can chain @command{grep} commands, like this:
369grep -nH -e foo *.el | grep bar | grep toto 369grep -nH -e foo *.el | grep bar | grep toto
370@end example 370@end example
371 371
372 The output from @command{grep} goes in the @samp{*grep*} buffer. You 372 The output from @command{grep} goes in the @file{*grep*} buffer. You
373can find the corresponding lines in the original files using @w{@kbd{C-x 373can find the corresponding lines in the original files using @w{@kbd{C-x
374`}}, @key{RET}, and so forth, just like compilation errors. 374`}}, @key{RET}, and so forth, just like compilation errors.
375 375
@@ -572,12 +572,12 @@ for special commands that can be used in the GUD interaction buffer.
572 572
573 As you debug a program, Emacs displays the relevant source files by 573 As you debug a program, Emacs displays the relevant source files by
574visiting them in Emacs buffers, with an arrow in the left fringe 574visiting them in Emacs buffers, with an arrow in the left fringe
575indicating the current execution line. (On a text-only terminal, the 575indicating the current execution line. (On a text terminal, the arrow
576arrow appears as @samp{=>}, overlaid on the first two text columns.) 576appears as @samp{=>}, overlaid on the first two text columns.) Moving
577Moving point in such a buffer does not move the arrow. You are free 577point in such a buffer does not move the arrow. You are free to edit
578to edit these source files, but note that inserting or deleting lines 578these source files, but note that inserting or deleting lines will
579will throw off the arrow's positioning, as Emacs has no way to figure 579throw off the arrow's positioning, as Emacs has no way to figure out
580out which edited source line corresponds to the line reported by the 580which edited source line corresponds to the line reported by the
581debugger subprocess. To update this information, you typically have 581debugger subprocess. To update this information, you typically have
582to recompile and restart the program. 582to recompile and restart the program.
583 583
@@ -936,7 +936,7 @@ already exists there, the click removes it. A @kbd{C-Mouse-1} click
936enables or disables an existing breakpoint; a breakpoint that is 936enables or disables an existing breakpoint; a breakpoint that is
937disabled, but not unset, is indicated by a gray dot. 937disabled, but not unset, is indicated by a gray dot.
938 938
939 On a text-only terminal, or when fringes are disabled, enabled 939 On a text terminal, or when fringes are disabled, enabled
940breakpoints are indicated with a @samp{B} character in the left margin 940breakpoints are indicated with a @samp{B} character in the left margin
941of the window. Disabled breakpoints are indicated with @samp{b}. 941of the window. Disabled breakpoints are indicated with @samp{b}.
942(The margin is only displayed if a breakpoint is present.) 942(The margin is only displayed if a breakpoint is present.)
@@ -1079,9 +1079,9 @@ debugger}.
1079 1079
1080@findex gdb-frames-select 1080@findex gdb-frames-select
1081 On graphical displays, the selected stack frame is indicated by an 1081 On graphical displays, the selected stack frame is indicated by an
1082arrow in the fringe. On text-only terminals, or when fringes are 1082arrow in the fringe. On text terminals, or when fringes are disabled,
1083disabled, the selected stack frame is displayed in reverse contrast. 1083the selected stack frame is displayed in reverse contrast. To select
1084To select a stack frame, move point in its line and type @key{RET} 1084a stack frame, move point in its line and type @key{RET}
1085(@code{gdb-frames-select}), or click @kbd{Mouse-2} on it. Doing so 1085(@code{gdb-frames-select}), or click @kbd{Mouse-2} on it. Doing so
1086also updates the Locals buffer 1086also updates the Locals buffer
1087@ifnottex 1087@ifnottex
@@ -1506,14 +1506,14 @@ commands are used; its default is @code{t}.
1506@section Lisp Interaction Buffers 1506@section Lisp Interaction Buffers
1507 1507
1508@findex lisp-interaction-mode 1508@findex lisp-interaction-mode
1509 When Emacs starts up, it contains a buffer named @samp{*scratch*}, 1509 When Emacs starts up, it contains a buffer named @file{*scratch*},
1510which is provided for evaluating Emacs Lisp expressions interactively. 1510which is provided for evaluating Emacs Lisp expressions interactively.
1511Its major mode is Lisp Interaction mode. You can also enable Lisp 1511Its major mode is Lisp Interaction mode. You can also enable Lisp
1512Interaction mode by typing @kbd{M-x lisp-interaction-mode}. 1512Interaction mode by typing @kbd{M-x lisp-interaction-mode}.
1513 1513
1514@findex eval-print-last-sexp 1514@findex eval-print-last-sexp
1515@kindex C-j @r{(Lisp Interaction mode)} 1515@kindex C-j @r{(Lisp Interaction mode)}
1516 In the @samp{*scratch*} buffer, and other Lisp Interaction mode 1516 In the @file{*scratch*} buffer, and other Lisp Interaction mode
1517buffers, @kbd{C-j} (@code{eval-print-last-sexp}) evaluates the Lisp 1517buffers, @kbd{C-j} (@code{eval-print-last-sexp}) evaluates the Lisp
1518expression before point, and inserts the value at point. Thus, as you 1518expression before point, and inserts the value at point. Thus, as you
1519type expressions into the buffer followed by @kbd{C-j} after each 1519type expressions into the buffer followed by @kbd{C-j} after each
@@ -1522,7 +1522,7 @@ expressions and their values. All other commands in Lisp Interaction
1522mode are the same as in Emacs Lisp mode. 1522mode are the same as in Emacs Lisp mode.
1523 1523
1524@vindex initial-scratch-message 1524@vindex initial-scratch-message
1525 At startup, the @samp{*scratch*} buffer contains a short message, in 1525 At startup, the @file{*scratch*} buffer contains a short message, in
1526the form of a Lisp comment, that explains what it is for. This 1526the form of a Lisp comment, that explains what it is for. This
1527message is controlled by the variable @code{initial-scratch-message}, 1527message is controlled by the variable @code{initial-scratch-message},
1528which should be either a string, or @code{nil} (which means to 1528which should be either a string, or @code{nil} (which means to
@@ -1533,7 +1533,7 @@ suppress the message).
1533interactively is to use Inferior Emacs Lisp mode, which provides an 1533interactively is to use Inferior Emacs Lisp mode, which provides an
1534interface rather like Shell mode (@pxref{Shell Mode}) for evaluating 1534interface rather like Shell mode (@pxref{Shell Mode}) for evaluating
1535Emacs Lisp expressions. Type @kbd{M-x ielm} to create an 1535Emacs Lisp expressions. Type @kbd{M-x ielm} to create an
1536@samp{*ielm*} buffer which uses this mode. For more information, see 1536@file{*ielm*} buffer which uses this mode. For more information, see
1537that command's documentation. 1537that command's documentation.
1538 1538
1539@node External Lisp 1539@node External Lisp
@@ -1555,13 +1555,13 @@ whose names end in @file{.l}, @file{.lsp}, or @file{.lisp}.
1555evaluated. To begin an external Lisp session, type @kbd{M-x 1555evaluated. To begin an external Lisp session, type @kbd{M-x
1556run-lisp}. This runs the program named @command{lisp}, and sets it up 1556run-lisp}. This runs the program named @command{lisp}, and sets it up
1557so that both input and output go through an Emacs buffer named 1557so that both input and output go through an Emacs buffer named
1558@samp{*inferior-lisp*}. To change the name of the Lisp program run by 1558@file{*inferior-lisp*}. To change the name of the Lisp program run by
1559@kbd{M-x run-lisp}, change the variable @code{inferior-lisp-program}. 1559@kbd{M-x run-lisp}, change the variable @code{inferior-lisp-program}.
1560 1560
1561 The major mode for the @samp{*lisp*} buffer is Inferior Lisp mode, 1561 The major mode for the @file{*lisp*} buffer is Inferior Lisp mode,
1562which combines the characteristics of Lisp mode and Shell mode 1562which combines the characteristics of Lisp mode and Shell mode
1563(@pxref{Shell Mode}). To send input to the Lisp session, go to the 1563(@pxref{Shell Mode}). To send input to the Lisp session, go to the
1564end of the @samp{*lisp*} buffer and type the input, followed by 1564end of the @file{*lisp*} buffer and type the input, followed by
1565@key{RET}. Terminal output from the Lisp session is automatically 1565@key{RET}. Terminal output from the Lisp session is automatically
1566inserted in the buffer. 1566inserted in the buffer.
1567 1567
@@ -1572,7 +1572,7 @@ inserted in the buffer.
1572buffer to a Lisp session that you had started with @kbd{M-x run-lisp}. 1572buffer to a Lisp session that you had started with @kbd{M-x run-lisp}.
1573The expression sent is the top-level Lisp expression at or following 1573The expression sent is the top-level Lisp expression at or following
1574point. The resulting value goes as usual into the 1574point. The resulting value goes as usual into the
1575@samp{*inferior-lisp*} buffer. Note that the effect of @kbd{C-M-x} in 1575@file{*inferior-lisp*} buffer. Note that the effect of @kbd{C-M-x} in
1576Lisp mode is thus very similar to its effect in Emacs Lisp mode 1576Lisp mode is thus very similar to its effect in Emacs Lisp mode
1577(@pxref{Lisp Eval}), except that the expression is sent to a different 1577(@pxref{Lisp Eval}), except that the expression is sent to a different
1578Lisp environment instead of being evaluated in Emacs. 1578Lisp environment instead of being evaluated in Emacs.
@@ -1587,4 +1587,4 @@ to a Scheme subprocess, are very similar. Scheme source files are
1587edited in Scheme mode, which can be explicitly enabled with @kbd{M-x 1587edited in Scheme mode, which can be explicitly enabled with @kbd{M-x
1588scheme-mode}. You can initiate a Scheme session by typing @kbd{M-x 1588scheme-mode}. You can initiate a Scheme session by typing @kbd{M-x
1589run-scheme} (the buffer for interacting with Scheme is named 1589run-scheme} (the buffer for interacting with Scheme is named
1590@samp{*scheme*}), and send expressions to it by typing @kbd{C-M-x}. 1590@file{*scheme*}), and send expressions to it by typing @kbd{C-M-x}.
diff --git a/doc/emacs/cmdargs.texi b/doc/emacs/cmdargs.texi
index 00730cc6510..4c6d6ef7bad 100644
--- a/doc/emacs/cmdargs.texi
+++ b/doc/emacs/cmdargs.texi
@@ -157,7 +157,7 @@ Evaluate Lisp expression @var{expression}.
157@item --insert=@var{file} 157@item --insert=@var{file}
158@opindex --insert 158@opindex --insert
159@cindex insert file contents, command-line argument 159@cindex insert file contents, command-line argument
160Insert the contents of @var{file} into the @samp{*scratch*} buffer 160Insert the contents of @var{file} into the @file{*scratch*} buffer
161(@pxref{Lisp Interaction}). This is like what @kbd{M-x insert-file} 161(@pxref{Lisp Interaction}). This is like what @kbd{M-x insert-file}
162does (@pxref{Misc File Ops}). 162does (@pxref{Misc File Ops}).
163 163
@@ -849,8 +849,8 @@ emacs -ms coral -cr 'slate blue' &
849 You can reverse the foreground and background colors through the 849 You can reverse the foreground and background colors through the
850@samp{-rv} option or with the X resource @samp{reverseVideo}. 850@samp{-rv} option or with the X resource @samp{reverseVideo}.
851 851
852 The @samp{-fg}, @samp{-bg}, and @samp{-rv} options function on 852 The @samp{-fg}, @samp{-bg}, and @samp{-rv} options function on text
853text-only terminals as well as on graphical displays. 853terminals as well as on graphical displays.
854 854
855@node Window Size X 855@node Window Size X
856@appendixsec Options for Window Size and Position 856@appendixsec Options for Window Size and Position
diff --git a/doc/emacs/commands.texi b/doc/emacs/commands.texi
index f2a71b045f8..3285b65e57b 100644
--- a/doc/emacs/commands.texi
+++ b/doc/emacs/commands.texi
@@ -62,7 +62,7 @@ starting with @key{ESC}. Thus, you can enter @kbd{M-a} by typing
62C-a}. Unlike @key{Meta}, @key{ESC} is entered as a separate 62C-a}. Unlike @key{Meta}, @key{ESC} is entered as a separate
63character. You don't hold down @key{ESC} while typing the next 63character. You don't hold down @key{ESC} while typing the next
64character; instead, press @key{ESC} and release it, then enter the 64character; instead, press @key{ESC} and release it, then enter the
65next character. This feature is useful on certain text-only terminals 65next character. This feature is useful on certain text terminals
66where the @key{Meta} key does not function reliably. 66where the @key{Meta} key does not function reliably.
67 67
68@cindex keys stolen by window manager 68@cindex keys stolen by window manager
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi
index a00423a5826..72b4961e209 100644
--- a/doc/emacs/custom.texi
+++ b/doc/emacs/custom.texi
@@ -561,7 +561,7 @@ format of a theme file and how to make one.
561@vindex custom-theme-directory 561@vindex custom-theme-directory
562@cindex color scheme 562@cindex color scheme
563 Type @kbd{M-x customize-themes} to switch to a buffer named 563 Type @kbd{M-x customize-themes} to switch to a buffer named
564@samp{*Custom Themes*}, which lists the Custom themes that Emacs knows 564@file{*Custom Themes*}, which lists the Custom themes that Emacs knows
565about. By default, Emacs looks for theme files in two locations: the 565about. By default, Emacs looks for theme files in two locations: the
566directory specified by the variable @code{custom-theme-directory} 566directory specified by the variable @code{custom-theme-directory}
567(which defaults to @file{~/.emacs.d/}), and a directory named 567(which defaults to @file{~/.emacs.d/}), and a directory named
@@ -580,11 +580,11 @@ add the directory name to the list variable
580@code{custom-theme-directory} has the special meaning of the value of 580@code{custom-theme-directory} has the special meaning of the value of
581the variable @code{custom-theme-directory}, while @code{t} stands for 581the variable @code{custom-theme-directory}, while @code{t} stands for
582the built-in theme directory @file{etc/themes}. The themes listed in 582the built-in theme directory @file{etc/themes}. The themes listed in
583the @samp{*Custom Themes*} buffer are those found in the directories 583the @file{*Custom Themes*} buffer are those found in the directories
584specified by @code{custom-theme-load-path}. 584specified by @code{custom-theme-load-path}.
585 585
586@kindex C-x C-s @r{(Custom Themes buffer)} 586@kindex C-x C-s @r{(Custom Themes buffer)}
587 In the @samp{*Custom Themes*} buffer, you can activate the checkbox 587 In the @file{*Custom Themes*} buffer, you can activate the checkbox
588next to a Custom theme to enable or disable the theme for the current 588next to a Custom theme to enable or disable the theme for the current
589Emacs session. When a Custom theme is enabled, all of its settings 589Emacs session. When a Custom theme is enabled, all of its settings
590(variables and faces) take effect in the Emacs session. To apply the 590(variables and faces) take effect in the Emacs session. To apply the
@@ -608,7 +608,7 @@ always considered safe.
608 Setting or saving Custom themes actually works by customizing the 608 Setting or saving Custom themes actually works by customizing the
609variable @code{custom-enabled-themes}. The value of this variable is 609variable @code{custom-enabled-themes}. The value of this variable is
610a list of Custom theme names (as Lisp symbols, e.g.@: @code{tango}). 610a list of Custom theme names (as Lisp symbols, e.g.@: @code{tango}).
611Instead of using the @samp{*Custom Themes*} buffer to set 611Instead of using the @file{*Custom Themes*} buffer to set
612@code{custom-enabled-themes}, you can customize the variable using the 612@code{custom-enabled-themes}, you can customize the variable using the
613usual customization interface, e.g.@: with @kbd{M-x customize-option}. 613usual customization interface, e.g.@: with @kbd{M-x customize-option}.
614Note that Custom themes are not allowed to set 614Note that Custom themes are not allowed to set
@@ -635,7 +635,7 @@ type @kbd{M-x disable-theme}.
635 635
636@findex describe-theme 636@findex describe-theme
637 To see a description of a Custom theme, type @kbd{?} on its line in 637 To see a description of a Custom theme, type @kbd{?} on its line in
638the @samp{*Custom Themes*} buffer; or type @kbd{M-x describe-theme} 638the @file{*Custom Themes*} buffer; or type @kbd{M-x describe-theme}
639anywhere in Emacs and enter the theme name in the minibuffer. 639anywhere in Emacs and enter the theme name in the minibuffer.
640 640
641@node Creating Custom Themes 641@node Creating Custom Themes
@@ -645,12 +645,12 @@ anywhere in Emacs and enter the theme name in the minibuffer.
645@findex customize-create-theme 645@findex customize-create-theme
646 You can define a Custom theme using an interface similar to the 646 You can define a Custom theme using an interface similar to the
647customization buffer, by typing @kbd{M-x customize-create-theme}. 647customization buffer, by typing @kbd{M-x customize-create-theme}.
648This switches to a buffer named @samp{*Custom Theme*}. It also offers 648This switches to a buffer named @file{*Custom Theme*}. It also offers
649to insert some common Emacs faces into the theme (a convenience, since 649to insert some common Emacs faces into the theme (a convenience, since
650Custom themes are often used to customize faces). If you answer no, 650Custom themes are often used to customize faces). If you answer no,
651the theme will initially contain no settings. 651the theme will initially contain no settings.
652 652
653 Near the top of the @samp{*Custom Theme*} buffer are editable fields 653 Near the top of the @file{*Custom Theme*} buffer are editable fields
654where you can enter the theme's name and description. The name can be 654where you can enter the theme's name and description. The name can be
655anything except @samp{user}. The description is the one that will be 655anything except @samp{user}. The description is the one that will be
656shown when you invoke @kbd{M-x describe-theme} for the theme. Its 656shown when you invoke @kbd{M-x describe-theme} for the theme. Its
@@ -673,7 +673,7 @@ theme, uncheck the checkbox next to its name.
673@file{@var{name}-theme.el} where @var{name} is the theme name, in the 673@file{@var{name}-theme.el} where @var{name} is the theme name, in the
674directory named by @code{custom-theme-directory}. 674directory named by @code{custom-theme-directory}.
675 675
676 From the @samp{*Custom Theme*} buffer, you can view and edit an 676 From the @file{*Custom Theme*} buffer, you can view and edit an
677existing Custom theme by activating the @samp{[Visit Theme]} button 677existing Custom theme by activating the @samp{[Visit Theme]} button
678and specifying the theme name. You can also add the settings of 678and specifying the theme name. You can also add the settings of
679another theme into the buffer, using the @samp{[Merge Theme]} button. 679another theme into the buffer, using the @samp{[Merge Theme]} button.
@@ -683,10 +683,9 @@ the @samp{[Merge Theme]} button and specifying the special theme named
683 683
684 A theme file is simply an Emacs Lisp source file, and loading the 684 A theme file is simply an Emacs Lisp source file, and loading the
685Custom theme works by loading the Lisp file. Therefore, you can edit 685Custom theme works by loading the Lisp file. Therefore, you can edit
686a theme file directly instead of using the @samp{*Custom Theme*} 686a theme file directly instead of using the @file{*Custom Theme*}
687buffer. 687buffer. @xref{Custom Themes,,, elisp, The Emacs Lisp Reference
688@c Add link to the relevant Emacs Lisp Reference manual node, once 688Manual}, for details.
689@c that is written.
690 689
691@node Variables 690@node Variables
692@section Variables 691@section Variables
@@ -809,7 +808,7 @@ can set any variable with a Lisp expression like this:
809@noindent 808@noindent
810To execute such an expression, type @kbd{M-:} (@code{eval-expression}) 809To execute such an expression, type @kbd{M-:} (@code{eval-expression})
811and enter the expression in the minibuffer (@pxref{Lisp Eval}). 810and enter the expression in the minibuffer (@pxref{Lisp Eval}).
812Alternatively, go to the @samp{*scratch*} buffer, type in the 811Alternatively, go to the @file{*scratch*} buffer, type in the
813expression, and then type @kbd{C-j} (@pxref{Lisp Interaction}). 812expression, and then type @kbd{C-j} (@pxref{Lisp Interaction}).
814 813
815 Setting variables, like all means of customizing Emacs except where 814 Setting variables, like all means of customizing Emacs except where
@@ -1163,8 +1162,8 @@ returned by that expression is ignored).
1163conversion of this file. @xref{Coding Systems}. 1162conversion of this file. @xref{Coding Systems}.
1164 1163
1165@item 1164@item
1166@code{unibyte} says to visit the file in a unibyte buffer, if the 1165@code{unibyte} says to load or compile a file of Emacs Lisp in unibyte
1167value is @code{t}. @xref{Enabling Multibyte}. 1166mode, if the value is @code{t}. @xref{Disabling Multibyte}.
1168@end itemize 1167@end itemize
1169 1168
1170@noindent 1169@noindent
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi
index 54dbc0a78e1..da33d352698 100644
--- a/doc/emacs/display.texi
+++ b/doc/emacs/display.texi
@@ -286,8 +286,8 @@ scrolling whenever point moves off the left or right edge of the
286screen. To disable automatic horizontal scrolling, set the variable 286screen. To disable automatic horizontal scrolling, set the variable
287@code{auto-hscroll-mode} to @code{nil}. Note that when the automatic 287@code{auto-hscroll-mode} to @code{nil}. Note that when the automatic
288horizontal scrolling is turned off, if point moves off the edge of the 288horizontal scrolling is turned off, if point moves off the edge of the
289screen, the cursor disappears to indicate that. (On text-only 289screen, the cursor disappears to indicate that. (On text terminals,
290terminals, the cursor is left at the edge instead.) 290the cursor is left at the edge instead.)
291 291
292@vindex hscroll-margin 292@vindex hscroll-margin
293 The variable @code{hscroll-margin} controls how close point can get 293 The variable @code{hscroll-margin} controls how close point can get
@@ -479,9 +479,9 @@ prompts for a regular expression, and displays only faces with names
479matching that regular expression (@pxref{Regexps}). 479matching that regular expression (@pxref{Regexps}).
480 480
481 It's possible for a given face to look different in different 481 It's possible for a given face to look different in different
482frames. For instance, some text-only terminals do not support all 482frames. For instance, some text terminals do not support all face
483face attributes, particularly font, height, and width, and some 483attributes, particularly font, height, and width, and some support a
484support a limited range of colors. 484limited range of colors.
485 485
486@cindex background color 486@cindex background color
487@cindex default face 487@cindex default face
@@ -529,13 +529,13 @@ or an @dfn{RGB triplet}.
529@samp{medium sea green}. To view a list of color names, type @kbd{M-x 529@samp{medium sea green}. To view a list of color names, type @kbd{M-x
530list-colors-display}. To control the order in which colors are shown, 530list-colors-display}. To control the order in which colors are shown,
531customize @code{list-colors-sort}. If you run this command on a 531customize @code{list-colors-sort}. If you run this command on a
532graphical display, it shows the full range of color names known to Emacs 532graphical display, it shows the full range of color names known to
533(these are the standard X11 color names, defined in X's @file{rgb.txt} 533Emacs (these are the standard X11 color names, defined in X's
534file). If you run the command on a text-only terminal, it shows only a 534@file{rgb.txt} file). If you run the command on a text terminal, it
535small subset of colors that can be safely displayed on such terminals. 535shows only a small subset of colors that can be safely displayed on
536However, Emacs understands X11 color names even on text-only terminals; 536such terminals. However, Emacs understands X11 color names even on
537if a face is given a color specified by an X11 color name, it is 537text terminals; if a face is given a color specified by an X11 color
538displayed using the closest-matching terminal color. 538name, it is displayed using the closest-matching terminal color.
539 539
540 An RGB triplet is a string of the form @samp{#RRGGBB}. Each of the 540 An RGB triplet is a string of the form @samp{#RRGGBB}. Each of the
541R, G, and B components is a hexadecimal number specifying the 541R, G, and B components is a hexadecimal number specifying the
@@ -651,8 +651,8 @@ at the top of a window just as the mode line appears at the bottom.
651Most windows do not have a header line---only some special modes, such 651Most windows do not have a header line---only some special modes, such
652Info mode, create one. 652Info mode, create one.
653@item vertical-border 653@item vertical-border
654This face is used for the vertical divider between windows on 654This face is used for the vertical divider between windows on text
655text-only terminals. 655terminals.
656@item minibuffer-prompt 656@item minibuffer-prompt
657@cindex @code{minibuffer-prompt} face 657@cindex @code{minibuffer-prompt} face
658@vindex minibuffer-prompt-properties 658@vindex minibuffer-prompt-properties
@@ -679,9 +679,9 @@ This face determines the color of the mouse pointer.
679@end table 679@end table
680 680
681 The following faces likewise control the appearance of parts of the 681 The following faces likewise control the appearance of parts of the
682Emacs frame, but only on text-only terminals, or when Emacs is built 682Emacs frame, but only on text terminals, or when Emacs is built on X
683on X with no toolkit support. (For all other cases, the appearance of 683with no toolkit support. (For all other cases, the appearance of the
684the respective frame elements is determined by system-wide settings.) 684respective frame elements is determined by system-wide settings.)
685 685
686@table @code 686@table @code
687@item scroll-bar 687@item scroll-bar
@@ -1453,9 +1453,9 @@ global-hl-line-mode} enables or disables the same mode globally.
1453Emacs can display long lines by @dfn{truncation}. This means that all 1453Emacs can display long lines by @dfn{truncation}. This means that all
1454the characters that do not fit in the width of the screen or window do 1454the characters that do not fit in the width of the screen or window do
1455not appear at all. On graphical displays, a small straight arrow in 1455not appear at all. On graphical displays, a small straight arrow in
1456the fringe indicates truncation at either end of the line. On 1456the fringe indicates truncation at either end of the line. On text
1457text-only terminals, this is indicated with @samp{$} signs in the 1457terminals, this is indicated with @samp{$} signs in the leftmost
1458leftmost and/or rightmost columns. 1458and/or rightmost columns.
1459 1459
1460@vindex truncate-lines 1460@vindex truncate-lines
1461@findex toggle-truncate-lines 1461@findex toggle-truncate-lines
@@ -1577,7 +1577,7 @@ of an overline above the text, including the height of the overline
1577itself, in pixels; the default is 2. 1577itself, in pixels; the default is 2.
1578 1578
1579@findex tty-suppress-bold-inverse-default-colors 1579@findex tty-suppress-bold-inverse-default-colors
1580 On some text-only terminals, bold face and inverse video together 1580 On some text terminals, bold face and inverse video together result
1581result in text that is hard to read. Call the function 1581in text that is hard to read. Call the function
1582@code{tty-suppress-bold-inverse-default-colors} with a non-@code{nil} 1582@code{tty-suppress-bold-inverse-default-colors} with a non-@code{nil}
1583argument to suppress the effect of bold-face in this case. 1583argument to suppress the effect of bold-face in this case.
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi
index 152fa73edea..25e5bb2af0d 100644
--- a/doc/emacs/emacs.texi
+++ b/doc/emacs/emacs.texi
@@ -511,12 +511,12 @@ Frames and Graphical Displays
511* Tooltips:: Displaying information at the current mouse position. 511* Tooltips:: Displaying information at the current mouse position.
512* Mouse Avoidance:: Moving the mouse pointer out of the way. 512* Mouse Avoidance:: Moving the mouse pointer out of the way.
513* Non-Window Terminals:: Multiple frames on terminals that show only one. 513* Non-Window Terminals:: Multiple frames on terminals that show only one.
514* Text-Only Mouse:: Using the mouse in text-only terminals. 514* Text-Only Mouse:: Using the mouse in text terminals.
515 515
516International Character Set Support 516International Character Set Support
517 517
518* International Chars:: Basic concepts of multibyte characters. 518* International Chars:: Basic concepts of multibyte characters.
519* Enabling Multibyte:: Controlling whether to use multibyte characters. 519* Disabling Multibyte:: Controlling whether to use multibyte characters.
520* Language Environments:: Setting things up for the language you use. 520* Language Environments:: Setting things up for the language you use.
521* Input Methods:: Entering text characters not on your keyboard. 521* Input Methods:: Entering text characters not on your keyboard.
522* Select Input Method:: Specifying your choice of input methods. 522* Select Input Method:: Specifying your choice of input methods.
diff --git a/doc/emacs/entering.texi b/doc/emacs/entering.texi
index ba7f3132b6b..3ec51ddfb60 100644
--- a/doc/emacs/entering.texi
+++ b/doc/emacs/entering.texi
@@ -63,7 +63,7 @@ certain Lisp files, where to put the initial frame, and so forth.
63 If the variable @code{inhibit-startup-screen} is non-@code{nil}, 63 If the variable @code{inhibit-startup-screen} is non-@code{nil},
64Emacs does not display the startup screen. In that case, if one or 64Emacs does not display the startup screen. In that case, if one or
65more files were specified on the command line, Emacs simply displays 65more files were specified on the command line, Emacs simply displays
66those files; otherwise, it displays a buffer named @samp{*scratch*}, 66those files; otherwise, it displays a buffer named @file{*scratch*},
67which can be used to evaluate Emacs Lisp expressions interactively. 67which can be used to evaluate Emacs Lisp expressions interactively.
68@xref{Lisp Interaction}. You can set the variable 68@xref{Lisp Interaction}. You can set the variable
69@code{inhibit-startup-screen} using the Customize facility 69@code{inhibit-startup-screen} using the Customize facility
@@ -77,9 +77,13 @@ information about @file{site-start.el}.}
77by setting the variable @code{initial-buffer-choice} to a 77by setting the variable @code{initial-buffer-choice} to a
78non-@code{nil} value. (In that case, even if you specify one or more 78non-@code{nil} value. (In that case, even if you specify one or more
79files on the command line, Emacs opens but does not display them.) 79files on the command line, Emacs opens but does not display them.)
80The value of @code{initial-buffer-choice} can be either the name of 80The value of @code{initial-buffer-choice} should be the name of
81the desired file or directory, or @code{t}, which means to display the 81the desired file or directory.
82@samp{*scratch*} buffer. 82@ignore
83@c I do not think this should be mentioned. AFAICS it is just a dodge
84@c around inhibit-startup-screen not being settable on a site-wide basis.
85or @code{t}, which means to display the @file{*scratch*} buffer.
86@end ignore
83 87
84@node Exiting, Basic, Entering Emacs, Top 88@node Exiting, Basic, Entering Emacs, Top
85@section Exiting Emacs 89@section Exiting Emacs
@@ -144,14 +148,14 @@ stopping the program temporarily and returning control to the parent
144process (usually a shell); in most shells, you can resume Emacs after 148process (usually a shell); in most shells, you can resume Emacs after
145suspending it with the shell command @command{%emacs}. 149suspending it with the shell command @command{%emacs}.
146 150
147 Text-only terminals usually listen for certain special characters 151 Text terminals usually listen for certain special characters whose
148whose meaning is to kill or suspend the program you are running. 152meaning is to kill or suspend the program you are running. @b{This
149@b{This terminal feature is turned off while you are in Emacs.} The 153terminal feature is turned off while you are in Emacs.} The meanings
150meanings of @kbd{C-z} and @kbd{C-x C-c} as keys in Emacs were inspired 154of @kbd{C-z} and @kbd{C-x C-c} as keys in Emacs were inspired by the
151by the use of @kbd{C-z} and @kbd{C-c} on several operating systems as 155use of @kbd{C-z} and @kbd{C-c} on several operating systems as the
152the characters for stopping or killing a program, but that is their 156characters for stopping or killing a program, but that is their only
153only relationship with the operating system. You can customize these 157relationship with the operating system. You can customize these keys
154keys to run any commands of your choice (@pxref{Keymaps}). 158to run any commands of your choice (@pxref{Keymaps}).
155 159
156@ifnottex 160@ifnottex
157@lowersections 161@lowersections
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index b0d4e130c67..10ba9ed1fa6 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -976,7 +976,7 @@ are not visiting files are auto-saved only if you request it explicitly;
976when they are auto-saved, the auto-save file name is made by appending 976when they are auto-saved, the auto-save file name is made by appending
977@samp{#} to the front and rear of buffer name, then 977@samp{#} to the front and rear of buffer name, then
978adding digits and letters at the end for uniqueness. For 978adding digits and letters at the end for uniqueness. For
979example, the @samp{*mail*} buffer in which you compose messages to be 979example, the @file{*mail*} buffer in which you compose messages to be
980sent might be auto-saved in a file named @file{#*mail*#704juu}. Auto-save file 980sent might be auto-saved in a file named @file{#*mail*#704juu}. Auto-save file
981names are made this way unless you reprogram parts of Emacs to do 981names are made this way unless you reprogram parts of Emacs to do
982something different (the functions @code{make-auto-save-file-name} and 982something different (the functions @code{make-auto-save-file-name} and
@@ -1245,7 +1245,7 @@ for more information about using the Trash.
1245@vindex diff-switches 1245@vindex diff-switches
1246 The command @kbd{M-x diff} prompts for two file names, using the 1246 The command @kbd{M-x diff} prompts for two file names, using the
1247minibuffer, and displays the differences between the two files in a 1247minibuffer, and displays the differences between the two files in a
1248buffer named @samp{*diff*}. This works by running the @command{diff} 1248buffer named @file{*diff*}. This works by running the @command{diff}
1249program, using options taken from the variable @code{diff-switches}. 1249program, using options taken from the variable @code{diff-switches}.
1250The value of @code{diff-switches} should be a string; the default is 1250The value of @code{diff-switches} should be a string; the default is
1251@code{"-c"} to specify a context diff. @xref{Top,, Diff, diff, 1251@code{"-c"} to specify a context diff. @xref{Top,, Diff, diff,
@@ -1853,7 +1853,7 @@ When typing a file name in the minibuffer, @kbd{C-@key{tab}}
1853(@code{file-cache-minibuffer-complete}) completes it using the file 1853(@code{file-cache-minibuffer-complete}) completes it using the file
1854name cache. If you repeat @kbd{C-@key{tab}}, that cycles through the 1854name cache. If you repeat @kbd{C-@key{tab}}, that cycles through the
1855possible completions of what you had originally typed. (However, note 1855possible completions of what you had originally typed. (However, note
1856that the @kbd{C-@key{tab}} character cannot be typed on most text-only 1856that the @kbd{C-@key{tab}} character cannot be typed on most text
1857terminals.) 1857terminals.)
1858 1858
1859 The file name cache does not fill up automatically. Instead, you 1859 The file name cache does not fill up automatically. Instead, you
diff --git a/doc/emacs/fixit.texi b/doc/emacs/fixit.texi
index 16feb939b33..85fac2b146b 100644
--- a/doc/emacs/fixit.texi
+++ b/doc/emacs/fixit.texi
@@ -57,9 +57,9 @@ Undo one entry in the current buffer's undo records (@code{undo}).
57@kbd{C-x u})@footnote{Aside from @kbd{C-/}, the @code{undo} command is 57@kbd{C-x u})@footnote{Aside from @kbd{C-/}, the @code{undo} command is
58also bound to @kbd{C-x u} because that is more straightforward for 58also bound to @kbd{C-x u} because that is more straightforward for
59beginners to remember: @samp{u} stands for ``undo''. It is also bound 59beginners to remember: @samp{u} stands for ``undo''. It is also bound
60to @kbd{C-_} because typing @kbd{C-/} on some text-only terminals 60to @kbd{C-_} because typing @kbd{C-/} on some text terminals actually
61actually enters @kbd{C-_}.}. This undoes the most recent change in 61enters @kbd{C-_}.}. This undoes the most recent change in the buffer,
62the buffer, and moves point back to where it was before that change. 62and moves point back to where it was before that change.
63 63
64 Consecutive repetitions of @kbd{C-/} (or its aliases) undo earlier 64 Consecutive repetitions of @kbd{C-/} (or its aliases) undo earlier
65and earlier changes in the current buffer. If all the recorded 65and earlier changes in the current buffer. If all the recorded
diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi
index 4cfaffdadb8..9e9909e8bca 100644
--- a/doc/emacs/frames.texi
+++ b/doc/emacs/frames.texi
@@ -27,13 +27,12 @@ displays (@pxref{Exiting}). To close just the selected frame, type
27 27
28 This chapter describes Emacs features specific to graphical displays 28 This chapter describes Emacs features specific to graphical displays
29(particularly mouse commands), and features for managing multiple 29(particularly mouse commands), and features for managing multiple
30frames. On text-only terminals, many of these features are 30frames. On text terminals, many of these features are unavailable.
31unavailable. However, it is still possible to create multiple 31However, it is still possible to create multiple ``frames'' on text
32``frames'' on text-only terminals; such frames are displayed one at a 32terminals; such frames are displayed one at a time, filling the entire
33time, filling the entire terminal screen (@pxref{Non-Window 33terminal screen (@pxref{Non-Window Terminals}). It is also possible
34Terminals}). It is also possible to use the mouse on some text-only 34to use the mouse on some text terminals (@pxref{Text-Only Mouse}, for
35terminals (@pxref{Text-Only Mouse}, for doing so on GNU and Unix 35doing so on GNU and Unix systems; and
36systems; and
37@iftex 36@iftex
38@pxref{MS-DOS Mouse,,,emacs-xtra,Specialized Emacs Features}, 37@pxref{MS-DOS Mouse,,,emacs-xtra,Specialized Emacs Features},
39@end iftex 38@end iftex
@@ -62,7 +61,7 @@ for doing so on MS-DOS).
62* Tooltips:: Displaying information at the current mouse position. 61* Tooltips:: Displaying information at the current mouse position.
63* Mouse Avoidance:: Preventing the mouse pointer from obscuring text. 62* Mouse Avoidance:: Preventing the mouse pointer from obscuring text.
64* Non-Window Terminals:: Multiple frames on terminals that show only one. 63* Non-Window Terminals:: Multiple frames on terminals that show only one.
65* Text-Only Mouse:: Using the mouse in text-only terminals. 64* Text-Only Mouse:: Using the mouse in text terminals.
66@end menu 65@end menu
67 66
68@node Mouse Commands 67@node Mouse Commands
@@ -257,7 +256,7 @@ highlighting.
257@key{RET}, or by clicking either @kbd{Mouse-1} or @kbd{Mouse-2} on the 256@key{RET}, or by clicking either @kbd{Mouse-1} or @kbd{Mouse-2} on the
258button. For example, in a Dired buffer, each file name is a button; 257button. For example, in a Dired buffer, each file name is a button;
259activating it causes Emacs to visit that file (@pxref{Dired}). In a 258activating it causes Emacs to visit that file (@pxref{Dired}). In a
260@samp{*Compilation*} buffer, each error message is a button, and 259@file{*Compilation*} buffer, each error message is a button, and
261activating it visits the source code for that error 260activating it visits the source code for that error
262(@pxref{Compilation}). 261(@pxref{Compilation}).
263 262
@@ -465,9 +464,9 @@ the ordinary, interactive frames are deleted. In this case, @kbd{C-x
465 464
466 The @kbd{C-x 5 1} (@code{delete-other-frames}) command deletes all 465 The @kbd{C-x 5 1} (@code{delete-other-frames}) command deletes all
467other frames on the current terminal (this terminal refers to either a 466other frames on the current terminal (this terminal refers to either a
468graphical display, or a text-only terminal; @pxref{Non-Window 467graphical display, or a text terminal; @pxref{Non-Window Terminals}).
469Terminals}). If the Emacs session has frames open on other graphical 468If the Emacs session has frames open on other graphical displays or
470displays or text terminals, those are not deleted. 469text terminals, those are not deleted.
471 470
472@vindex focus-follows-mouse 471@vindex focus-follows-mouse
473 The @kbd{C-x 5 o} (@code{other-frame}) command selects the next 472 The @kbd{C-x 5 o} (@code{other-frame}) command selects the next
@@ -908,7 +907,7 @@ scroll bars on the right side of windows), @code{left} (put them on
908the left), or @code{nil} (disable scroll bars). By default, Emacs 907the left), or @code{nil} (disable scroll bars). By default, Emacs
909puts scroll bars on the right if it was compiled with GTK+ support on 908puts scroll bars on the right if it was compiled with GTK+ support on
910the X Window System, and on MS-Windows or Mac OS; Emacs puts scroll 909the X Window System, and on MS-Windows or Mac OS; Emacs puts scroll
911bars on the left if compiled on the X Window system without GTK+ 910bars on the left if compiled on the X Window System without GTK+
912support (following the old convention for X applications). 911support (following the old convention for X applications).
913 912
914@vindex scroll-bar-width 913@vindex scroll-bar-width
@@ -953,7 +952,7 @@ the use of menu bars at startup, customize the variable
953@code{menu-bar-mode}. 952@code{menu-bar-mode}.
954 953
955@kindex C-Mouse-3 @r{(when menu bar is disabled)} 954@kindex C-Mouse-3 @r{(when menu bar is disabled)}
956 Expert users often turn off the menu bar, especially on text-only 955 Expert users often turn off the menu bar, especially on text
957terminals, where this makes one additional line available for text. 956terminals, where this makes one additional line available for text.
958If the menu bar is off, you can still pop up a menu of its contents 957If the menu bar is off, you can still pop up a menu of its contents
959with @kbd{C-Mouse-3} on a display which supports pop-up menus. 958with @kbd{C-Mouse-3} on a display which supports pop-up menus.
@@ -1112,9 +1111,9 @@ raises the frame.
1112 1111
1113@node Non-Window Terminals 1112@node Non-Window Terminals
1114@section Non-Window Terminals 1113@section Non-Window Terminals
1115@cindex text-only terminal 1114@cindex text terminal
1116 1115
1117 On a text-only terminal, Emacs can display only one Emacs frame at a 1116 On a text terminal, Emacs can display only one Emacs frame at a
1118time. However, you can still create multiple Emacs frames, and switch 1117time. However, you can still create multiple Emacs frames, and switch
1119between them. Switching frames on these terminals is much like 1118between them. Switching frames on these terminals is much like
1120switching between different window configurations. 1119switching between different window configurations.
@@ -1139,11 +1138,11 @@ to select a frame according to its name. The name you specify appears
1139in the mode line when the frame is selected. 1138in the mode line when the frame is selected.
1140 1139
1141@node Text-Only Mouse 1140@node Text-Only Mouse
1142@section Using a Mouse in Text-only Terminals 1141@section Using a Mouse in Text Terminals
1143@cindex mouse support 1142@cindex mouse support
1144@cindex terminal emulators, mouse support 1143@cindex terminal emulators, mouse support
1145 1144
1146Some text-only terminals support mouse clicks in the terminal window. 1145Some text terminals support mouse clicks in the terminal window.
1147 1146
1148@cindex xterm 1147@cindex xterm
1149 In a terminal emulator which is compatible with @command{xterm}, you 1148 In a terminal emulator which is compatible with @command{xterm}, you
diff --git a/doc/emacs/glossary.texi b/doc/emacs/glossary.texi
index f4ea4f30cd5..44c59eea668 100644
--- a/doc/emacs/glossary.texi
+++ b/doc/emacs/glossary.texi
@@ -181,7 +181,7 @@ Emacs supports a number of character sets, each of which represents a
181particular alphabet or script. @xref{International}. 181particular alphabet or script. @xref{International}.
182 182
183@item Character Terminal 183@item Character Terminal
184@xref{Glossary - Text-only Terminal}. 184@xref{Glossary - Text Terminal}.
185 185
186@item Click Event 186@item Click Event
187A click event is the kind of input event (q.v.@:) generated when you 187A click event is the kind of input event (q.v.@:) generated when you
@@ -193,7 +193,7 @@ press a mouse button and release it without moving the mouse.
193 193
194@item Clipboard 194@item Clipboard
195A clipboard is a buffer provided by the window system for transferring 195A clipboard is a buffer provided by the window system for transferring
196text between applications. On the X Window system, the clipboard is 196text between applications. On the X Window System, the clipboard is
197provided in addition to the primary selection (q.v.@:); on MS-Windows and Mac, 197provided in addition to the primary selection (q.v.@:); on MS-Windows and Mac,
198the clipboard is used @emph{instead} of the primary selection. 198the clipboard is used @emph{instead} of the primary selection.
199@xref{Clipboard}. 199@xref{Clipboard}.
@@ -421,7 +421,7 @@ tell it to. @xref{Bugs}.
421The echo area is the bottom line of the screen, used for echoing the 421The echo area is the bottom line of the screen, used for echoing the
422arguments to commands, for asking questions, and showing brief messages 422arguments to commands, for asking questions, and showing brief messages
423(including error messages). The messages are stored in the buffer 423(including error messages). The messages are stored in the buffer
424@samp{*Messages*} so you can review them later. @xref{Echo Area}. 424@file{*Messages*} so you can review them later. @xref{Echo Area}.
425 425
426@item Echoing 426@item Echoing
427Echoing is acknowledging the receipt of input events by displaying 427Echoing is acknowledging the receipt of input events by displaying
@@ -1329,12 +1329,12 @@ Data consisting of written human language (as opposed to programs),
1329or following the stylistic conventions of human language. 1329or following the stylistic conventions of human language.
1330@end itemize 1330@end itemize
1331 1331
1332@anchor{Glossary - Text-only Terminal} 1332@anchor{Glossary - Text Terminal}
1333@item Text-only Terminal 1333@item Text Terminal
1334A text-only terminal is a display that is limited to displaying text in 1334A text terminal, or character terminal, is a display that is limited
1335character units. Such a terminal cannot control individual pixels it 1335to displaying text in character units. Such a terminal cannot control
1336displays. Emacs supports a subset of display features on text-only 1336individual pixels it displays. Emacs supports a subset of display
1337terminals. 1337features on text terminals.
1338 1338
1339@item Text Properties 1339@item Text Properties
1340Text properties are annotations recorded for particular characters in 1340Text properties are annotations recorded for particular characters in
@@ -1384,7 +1384,7 @@ displaying it. @xref{Continuation Lines,Truncation}, and
1384@ref{Glossary - Continuation Line}. 1384@ref{Glossary - Continuation Line}.
1385 1385
1386@item TTY 1386@item TTY
1387@xref{Glossary - Text-only Terminal}. 1387@xref{Glossary - Text Terminal}.
1388 1388
1389@item Undoing 1389@item Undoing
1390Undoing means making your previous editing go in reverse, bringing 1390Undoing means making your previous editing go in reverse, bringing
diff --git a/doc/emacs/help.texi b/doc/emacs/help.texi
index 84da0a9a681..eef38136583 100644
--- a/doc/emacs/help.texi
+++ b/doc/emacs/help.texi
@@ -102,7 +102,7 @@ to (@code{describe-key-briefly}). Here @kbd{c} stands for
102Display the commands and variables whose documentation matches 102Display the commands and variables whose documentation matches
103@var{topics} (@code{apropos-documentation}). 103@var{topics} (@code{apropos-documentation}).
104@item C-h e 104@item C-h e
105Display the @code{*Messages*} buffer 105Display the @file{*Messages*} buffer
106(@code{view-echo-area-messages}). 106(@code{view-echo-area-messages}).
107@item C-h f @var{function} @key{RET} 107@item C-h f @var{function} @key{RET}
108Display documentation on the Lisp function named @var{function} 108Display documentation on the Lisp function named @var{function}
@@ -168,7 +168,7 @@ programming language you are editing (@code{info-lookup-symbol}).
168@item C-h . 168@item C-h .
169Display the help message for a special text area, if point is in one 169Display the help message for a special text area, if point is in one
170(@code{display-local-help}). (These include, for example, links in 170(@code{display-local-help}). (These include, for example, links in
171@samp{*Help*} buffers.) 171@file{*Help*} buffers.)
172@end table 172@end table
173 173
174@node Key Help 174@node Key Help
@@ -519,7 +519,7 @@ use @kbd{C-h c} to find out what they do.
519@findex view-echo-area-messages 519@findex view-echo-area-messages
520 To review recent echo area messages, use @kbd{C-h e} 520 To review recent echo area messages, use @kbd{C-h e}
521(@code{view-echo-area-messages}). This displays the buffer 521(@code{view-echo-area-messages}). This displays the buffer
522@code{*Messages*}, where those messages are kept. 522@file{*Messages*}, where those messages are kept.
523 523
524@kindex C-h m 524@kindex C-h m
525@findex describe-mode 525@findex describe-mode
diff --git a/doc/emacs/macos.texi b/doc/emacs/macos.texi
index 10293fe7747..695f8f9c6c3 100644
--- a/doc/emacs/macos.texi
+++ b/doc/emacs/macos.texi
@@ -142,7 +142,7 @@ Emacs open a file. A typical reason for this would be a user
142double-clicking a file in the Finder application. By default, Emacs 142double-clicking a file in the Finder application. By default, Emacs
143responds to this event by opening a new frame and visiting the file in 143responds to this event by opening a new frame and visiting the file in
144that frame (@code{ns-find-file}). As an exception, if the selected 144that frame (@code{ns-find-file}). As an exception, if the selected
145buffer is the @samp{*scratch*} buffer, Emacs visits the file in the 145buffer is the @file{*scratch*} buffer, Emacs visits the file in the
146selected frame. 146selected frame.
147 147
148You can change how Emacs responds to a @code{ns-open-file} event by 148You can change how Emacs responds to a @code{ns-open-file} event by
diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi
index e812c9112df..9d56b3bdc6e 100644
--- a/doc/emacs/maintaining.texi
+++ b/doc/emacs/maintaining.texi
@@ -477,7 +477,7 @@ If every work file in the VC fileset is unchanged, do nothing.
477 477
478@item 478@item
479If every work file in the VC fileset has been modified, commit the 479If every work file in the VC fileset has been modified, commit the
480changes. To do this, Emacs pops up a @samp{*vc-log*} buffer; type the 480changes. To do this, Emacs pops up a @file{*vc-log*} buffer; type the
481desired log entry for the new revision, followed by @kbd{C-c C-c} to 481desired log entry for the new revision, followed by @kbd{C-c C-c} to
482commit. @xref{Log Buffer}. 482commit. @xref{Log Buffer}.
483 483
@@ -530,7 +530,7 @@ so that you can begin to edit it.
530 530
531@item 531@item
532If each file is locked by you and contains changes, commit the 532If each file is locked by you and contains changes, commit the
533changes. To do this, Emacs pops up a @samp{*vc-log*} buffer; type the 533changes. To do this, Emacs pops up a @file{*vc-log*} buffer; type the
534desired log entry for the new revision, followed by @kbd{C-c C-c} to 534desired log entry for the new revision, followed by @kbd{C-c C-c} to
535commit (@pxref{Log Buffer}). 535commit (@pxref{Log Buffer}).
536 536
@@ -588,7 +588,7 @@ they use the concept of ``checking out'' individual files.
588@cindex C-c C-c @r{(Log Edit mode)} 588@cindex C-c C-c @r{(Log Edit mode)}
589@findex log-edit-done 589@findex log-edit-done
590 When you tell VC to commit a change, it pops up a buffer named 590 When you tell VC to commit a change, it pops up a buffer named
591@samp{*vc-log*}. In this buffer, you should write a @dfn{log entry} 591@file{*vc-log*}. In this buffer, you should write a @dfn{log entry}
592describing the changes you have made (@pxref{Why Version Control?}). 592describing the changes you have made (@pxref{Why Version Control?}).
593After you are done, type @kbd{C-c C-c} (@code{log-edit-done}) to exit 593After you are done, type @kbd{C-c C-c} (@code{log-edit-done}) to exit
594the buffer and commit the change, together with your log entry. 594the buffer and commit the change, together with your log entry.
@@ -596,12 +596,12 @@ the buffer and commit the change, together with your log entry.
596@cindex Log Edit mode 596@cindex Log Edit mode
597@cindex mode, Log Edit 597@cindex mode, Log Edit
598@vindex vc-log-mode-hook 598@vindex vc-log-mode-hook
599 The major mode for the @samp{*vc-log*} buffer is Log Edit mode, a 599 The major mode for the @file{*vc-log*} buffer is Log Edit mode, a
600variant of Text mode (@pxref{Text Mode}). On entering Log Edit mode, 600variant of Text mode (@pxref{Text Mode}). On entering Log Edit mode,
601Emacs runs the hooks @code{text-mode-hook} and @code{vc-log-mode-hook} 601Emacs runs the hooks @code{text-mode-hook} and @code{vc-log-mode-hook}
602(@pxref{Hooks}). 602(@pxref{Hooks}).
603 603
604 In the @samp{*vc-log*} buffer, you can write one or more @dfn{header 604 In the @file{*vc-log*} buffer, you can write one or more @dfn{header
605lines}, specifying additional information to be supplied to the 605lines}, specifying additional information to be supplied to the
606version control system. Each header line must occupy a single line at 606version control system. Each header line must occupy a single line at
607the top of the buffer; the first line that is not a header line is 607the top of the buffer; the first line that is not a header line is
@@ -626,7 +626,7 @@ support it, the header is treated as part of the log entry.
626@findex log-edit-show-files 626@findex log-edit-show-files
627@kindex C-c C-d @r{(Log Edit mode)} 627@kindex C-c C-d @r{(Log Edit mode)}
628@findex log-edit-show-diff 628@findex log-edit-show-diff
629 While in the @samp{*vc-log*} buffer, the ``current VC fileset'' is 629 While in the @file{*vc-log*} buffer, the ``current VC fileset'' is
630considered to be the fileset that will be committed if you type 630considered to be the fileset that will be committed if you type
631@w{@kbd{C-c C-c}}. To view a list of the files in the VC fileset, 631@w{@kbd{C-c C-c}}. To view a list of the files in the VC fileset,
632type @w{@kbd{C-c C-f}} (@code{log-edit-show-files}). To view a diff 632type @w{@kbd{C-c C-f}} (@code{log-edit-show-files}). To view a diff
@@ -639,7 +639,7 @@ started editing (@pxref{Old Revisions}), type @kbd{C-c C-d}
639 If the VC fileset includes one or more @file{ChangeLog} files 639 If the VC fileset includes one or more @file{ChangeLog} files
640(@pxref{Change Log}), type @kbd{C-c C-a} 640(@pxref{Change Log}), type @kbd{C-c C-a}
641(@code{log-edit-insert-changelog}) to pull the relevant entries into 641(@code{log-edit-insert-changelog}) to pull the relevant entries into
642the @samp{*vc-log*} buffer. If the topmost item in each 642the @file{*vc-log*} buffer. If the topmost item in each
643@file{ChangeLog} was made under your user name on the current date, 643@file{ChangeLog} was made under your user name on the current date,
644this command searches that item for entries matching the file(s) to be 644this command searches that item for entries matching the file(s) to be
645committed, and inserts them. 645committed, and inserts them.
@@ -652,7 +652,7 @@ Edit buffer.
652 To abort a commit, just @strong{don't} type @kbd{C-c C-c} in that 652 To abort a commit, just @strong{don't} type @kbd{C-c C-c} in that
653buffer. You can switch buffers and do other editing. As long as you 653buffer. You can switch buffers and do other editing. As long as you
654don't try to make another commit, the entry you were editing remains 654don't try to make another commit, the entry you were editing remains
655in the @samp{*vc-log*} buffer, and you can go back to that buffer at 655in the @file{*vc-log*} buffer, and you can go back to that buffer at
656any time to complete the commit. 656any time to complete the commit.
657 657
658@kindex M-n @r{(Log Edit mode)} 658@kindex M-n @r{(Log Edit mode)}
@@ -904,10 +904,10 @@ Display the changes that will be sent by the next push operation
904@kindex C-x v l 904@kindex C-x v l
905@findex vc-print-log 905@findex vc-print-log
906 The command @kbd{C-x v l} (@code{vc-print-log}) displays a buffer 906 The command @kbd{C-x v l} (@code{vc-print-log}) displays a buffer
907named @samp{*vc-change-log*}, showing the history of changes made to 907named @file{*vc-change-log*}, showing the history of changes made to
908the current file, including who made the changes, the dates, and the 908the current file, including who made the changes, the dates, and the
909log entry for each change (these are the same log entries you would 909log entry for each change (these are the same log entries you would
910enter via the @samp{*vc-log*} buffer; @pxref{Log Buffer}). Point is 910enter via the @file{*vc-log*} buffer; @pxref{Log Buffer}). Point is
911centered at the revision of the file currently being visited. With a 911centered at the revision of the file currently being visited. With a
912prefix argument, the command prompts for the revision to center on, 912prefix argument, the command prompts for the revision to center on,
913and the maximum number of revisions to display. 913and the maximum number of revisions to display.
@@ -919,7 +919,7 @@ file listed on the current line.
919@findex vc-print-root-log 919@findex vc-print-root-log
920@findex log-view-toggle-entry-display 920@findex log-view-toggle-entry-display
921 @kbd{C-x v L} (@code{vc-print-root-log}) displays a 921 @kbd{C-x v L} (@code{vc-print-root-log}) displays a
922@samp{*vc-change-log*} buffer showing the history of the entire 922@file{*vc-change-log*} buffer showing the history of the entire
923version-controlled directory tree (RCS, SCCS, and CVS do not support 923version-controlled directory tree (RCS, SCCS, and CVS do not support
924this feature). With a prefix argument, the command prompts for the 924this feature). With a prefix argument, the command prompts for the
925maximum number of revisions to display. 925maximum number of revisions to display.
@@ -927,7 +927,7 @@ maximum number of revisions to display.
927 The @kbd{C-x v L} history is shown in a compact form, usually 927 The @kbd{C-x v L} history is shown in a compact form, usually
928showing only the first line of each log entry. However, you can type 928showing only the first line of each log entry. However, you can type
929@key{RET} (@code{log-view-toggle-entry-display}) in the 929@key{RET} (@code{log-view-toggle-entry-display}) in the
930@samp{*vc-change-log*} buffer to reveal the entire log entry for the 930@file{*vc-change-log*} buffer to reveal the entire log entry for the
931revision at point. A second @key{RET} hides it again. 931revision at point. A second @key{RET} hides it again.
932 932
933 On a decentralized version control system, the @kbd{C-x v I} 933 On a decentralized version control system, the @kbd{C-x v I}
@@ -942,7 +942,7 @@ specific repository. Similarly, @kbd{C-x v O}
942another repository, the next time you run the ``push'' command; with a 942another repository, the next time you run the ``push'' command; with a
943prefix argument, it prompts for a specific destination repository. 943prefix argument, it prompts for a specific destination repository.
944 944
945 In the @samp{*vc-change-log*} buffer, you can use the following keys 945 In the @file{*vc-change-log*} buffer, you can use the following keys
946to move between the logs of revisions and of files, and to examine and 946to move between the logs of revisions and of files, and to examine and
947compare past revisions (@pxref{Old Revisions}): 947compare past revisions (@pxref{Old Revisions}):
948 948
@@ -993,11 +993,11 @@ revision at point.
993 993
994@vindex vc-log-show-limit 994@vindex vc-log-show-limit
995Because fetching many log entries can be slow, the 995Because fetching many log entries can be slow, the
996@samp{*vc-change-log*} buffer displays no more than 2000 revisions by 996@file{*vc-change-log*} buffer displays no more than 2000 revisions by
997default. The variable @code{vc-log-show-limit} specifies this limit; 997default. The variable @code{vc-log-show-limit} specifies this limit;
998if you set the value to zero, that removes the limit. You can also 998if you set the value to zero, that removes the limit. You can also
999increase the number of revisions shown in an existing 999increase the number of revisions shown in an existing
1000@samp{*vc-change-log*} buffer by clicking on the @samp{Show 2X 1000@file{*vc-change-log*} buffer by clicking on the @samp{Show 2X
1001entries} or @samp{Show unlimited entries} buttons at the end of the 1001entries} or @samp{Show unlimited entries} buttons at the end of the
1002buffer. However, RCS, SCCS, and CVS do not support this feature. 1002buffer. However, RCS, SCCS, and CVS do not support this feature.
1003 1003
@@ -1045,7 +1045,7 @@ it is used to specify multi-file VC filesets for commands like
1045 To use the VC Directory buffer, type @kbd{C-x v d} (@code{vc-dir}). 1045 To use the VC Directory buffer, type @kbd{C-x v d} (@code{vc-dir}).
1046This reads a directory name using the minibuffer, and switches to a VC 1046This reads a directory name using the minibuffer, and switches to a VC
1047Directory buffer for that directory. By default, the buffer is named 1047Directory buffer for that directory. By default, the buffer is named
1048@samp{*vc-dir*}. Its contents are described 1048@file{*vc-dir*}. Its contents are described
1049@iftex 1049@iftex
1050below. 1050below.
1051@end iftex 1051@end iftex
diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi
index e20d5a347cd..e498516ae7f 100644
--- a/doc/emacs/mini.texi
+++ b/doc/emacs/mini.texi
@@ -197,7 +197,7 @@ set the variable @code{enable-recursive-minibuffers} to @code{t}.
197 197
198@findex minibuffer-inactive-mode 198@findex minibuffer-inactive-mode
199 When not active, the minibuffer is in @code{minibuffer-inactive-mode}, 199 When not active, the minibuffer is in @code{minibuffer-inactive-mode},
200and clicking @kbd{Mouse-1} there shows the @samp{*Messages*} buffer. 200and clicking @kbd{Mouse-1} there shows the @file{*Messages*} buffer.
201If you use a dedicated frame for minibuffers, Emacs also recognizes 201If you use a dedicated frame for minibuffers, Emacs also recognizes
202certain keys there, for example @kbd{n} to make a new frame. 202certain keys there, for example @kbd{n} to make a new frame.
203 203
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi
index 84b9d6ee03b..50b68767991 100644
--- a/doc/emacs/misc.texi
+++ b/doc/emacs/misc.texi
@@ -92,7 +92,7 @@ file named @file{.newsrc} in your home directory which lists your
92Usenet newsgroups and subscriptions (this file is not unique to Gnus; 92Usenet newsgroups and subscriptions (this file is not unique to Gnus;
93it is used by many other newsreader programs). It then tries to 93it is used by many other newsreader programs). It then tries to
94contact the system's default news server, which is typically specified 94contact the system's default news server, which is typically specified
95by the @samp{NNTPSERVER} environment variable. 95by the @env{NNTPSERVER} environment variable.
96 96
97 If your system does not have a default news server, or if you wish 97 If your system does not have a default news server, or if you wish
98to use Gnus for reading email, then before invoking @kbd{M-x gnus} you 98to use Gnus for reading email, then before invoking @kbd{M-x gnus} you
@@ -507,7 +507,7 @@ minibuffer and executes it as a shell command, in a subshell made just
507for that command. Standard input for the command comes from the null 507for that command. Standard input for the command comes from the null
508device. If the shell command produces any output, the output appears 508device. If the shell command produces any output, the output appears
509either in the echo area (if it is short), or in an Emacs buffer named 509either in the echo area (if it is short), or in an Emacs buffer named
510@samp{*Shell Command Output*}, displayed in another window (if the 510@file{*Shell Command Output*}, displayed in another window (if the
511output is long). 511output is long).
512 512
513 For instance, one way to decompress a file named @file{foo.gz} is to 513 For instance, one way to decompress a file named @file{foo.gz} is to
@@ -554,7 +554,7 @@ old region and replaces it with the output from the shell command.
554see what keys are in the buffer. If the buffer contains a GnuPG key, 554see what keys are in the buffer. If the buffer contains a GnuPG key,
555type @kbd{C-x h M-| gpg @key{RET}} to feed the entire buffer contents 555type @kbd{C-x h M-| gpg @key{RET}} to feed the entire buffer contents
556to @command{gpg}. This will output the list of keys to the 556to @command{gpg}. This will output the list of keys to the
557@samp{*Shell Command Output*} buffer. 557@file{*Shell Command Output*} buffer.
558 558
559@vindex shell-file-name 559@vindex shell-file-name
560 The above commands use the shell specified by the variable 560 The above commands use the shell specified by the variable
@@ -577,7 +577,7 @@ inserted into a buffer of that name.
577 577
578@findex shell 578@findex shell
579 To run a subshell interactively, type @kbd{M-x shell}. This creates 579 To run a subshell interactively, type @kbd{M-x shell}. This creates
580(or reuses) a buffer named @samp{*shell*}, and runs a shell subprocess 580(or reuses) a buffer named @file{*shell*}, and runs a shell subprocess
581with input coming from and output going to that buffer. That is to 581with input coming from and output going to that buffer. That is to
582say, any terminal output from the subshell goes into the buffer, 582say, any terminal output from the subshell goes into the buffer,
583advancing point, and any terminal input for the subshell comes from 583advancing point, and any terminal input for the subshell comes from
@@ -600,8 +600,8 @@ easier to distinguish input lines from the shell output.
600 To make multiple subshells, invoke @kbd{M-x shell} with a prefix 600 To make multiple subshells, invoke @kbd{M-x shell} with a prefix
601argument (e.g. @kbd{C-u M-x shell}). Then the command will read a 601argument (e.g. @kbd{C-u M-x shell}). Then the command will read a
602buffer name, and create (or reuse) a subshell in that buffer. You can 602buffer name, and create (or reuse) a subshell in that buffer. You can
603also rename the @samp{*shell*} buffer using @kbd{M-x rename-uniquely}, 603also rename the @file{*shell*} buffer using @kbd{M-x rename-uniquely},
604then create a new @samp{*shell*} buffer using plain @kbd{M-x shell}. 604then create a new @file{*shell*} buffer using plain @kbd{M-x shell}.
605Subshells in different buffers run independently and in parallel. 605Subshells in different buffers run independently and in parallel.
606 606
607@vindex explicit-shell-file-name 607@vindex explicit-shell-file-name
@@ -1183,7 +1183,7 @@ underlying shell, of course.
1183@findex term 1183@findex term
1184 1184
1185 To run a subshell in a terminal emulator, use @kbd{M-x term}. This 1185 To run a subshell in a terminal emulator, use @kbd{M-x term}. This
1186creates (or reuses) a buffer named @samp{*terminal*}, and runs a 1186creates (or reuses) a buffer named @file{*terminal*}, and runs a
1187subshell with input coming from your keyboard, and output going to 1187subshell with input coming from your keyboard, and output going to
1188that buffer. 1188that buffer.
1189 1189
@@ -1212,7 +1212,7 @@ serial port. @xref{Serial Terminal}.
1212 1212
1213 The file name used to load the subshell is determined the same way 1213 The file name used to load the subshell is determined the same way
1214as for Shell mode. To make multiple terminal emulators, rename the 1214as for Shell mode. To make multiple terminal emulators, rename the
1215buffer @samp{*terminal*} to something different using @kbd{M-x 1215buffer @file{*terminal*} to something different using @kbd{M-x
1216rename-uniquely}, just as with Shell mode. 1216rename-uniquely}, just as with Shell mode.
1217 1217
1218 Unlike Shell mode, Term mode does not track the current directory by 1218 Unlike Shell mode, Term mode does not track the current directory by
@@ -1405,7 +1405,7 @@ signaled.) Currently, this feature is mainly useful for developers.
1405the shell command @samp{emacsclient @var{file}}, where @var{file} is a 1405the shell command @samp{emacsclient @var{file}}, where @var{file} is a
1406file name. This connects to an Emacs server, and tells that Emacs 1406file name. This connects to an Emacs server, and tells that Emacs
1407process to visit @var{file} in one of its existing frames---either a 1407process to visit @var{file} in one of its existing frames---either a
1408graphical frame, or one in a text-only terminal (@pxref{Frames}). You 1408graphical frame, or one in a text terminal (@pxref{Frames}). You
1409can then select that frame to begin editing. 1409can then select that frame to begin editing.
1410 1410
1411 If there is no Emacs server, the @command{emacsclient} program halts 1411 If there is no Emacs server, the @command{emacsclient} program halts
@@ -1415,12 +1415,12 @@ Server})---then Emacs opens a frame on the terminal in which you
1415called @command{emacsclient}. 1415called @command{emacsclient}.
1416 1416
1417 You can also force @command{emacsclient} to open a new frame on a 1417 You can also force @command{emacsclient} to open a new frame on a
1418graphical display, or on a text-only terminal, using the @samp{-c} and 1418graphical display, or on a text terminal, using the @samp{-c} and
1419@samp{-t} options. @xref{emacsclient Options}. 1419@samp{-t} options. @xref{emacsclient Options}.
1420 1420
1421 If you are running on a single text-only terminal, you can switch 1421 If you are running on a single text terminal, you can switch between
1422between @command{emacsclient}'s shell and the Emacs server using one 1422@command{emacsclient}'s shell and the Emacs server using one of two
1423of two methods: (i) run the Emacs server and @command{emacsclient} on 1423methods: (i) run the Emacs server and @command{emacsclient} on
1424different virtual terminals, and switch to the Emacs server's virtual 1424different virtual terminals, and switch to the Emacs server's virtual
1425terminal after calling @command{emacsclient}; or (ii) call 1425terminal after calling @command{emacsclient}; or (ii) call
1426@command{emacsclient} from within the Emacs server itself, using Shell 1426@command{emacsclient} from within the Emacs server itself, using Shell
@@ -1502,16 +1502,24 @@ The environment variable @env{ALTERNATE_EDITOR} has the same effect as
1502the @samp{-a} option. If both are present, the latter takes 1502the @samp{-a} option. If both are present, the latter takes
1503precedence. 1503precedence.
1504 1504
1505@cindex client frame
1505@item -c 1506@item -c
1506Create a new graphical frame, instead of using an existing Emacs 1507Create a new graphical @dfn{client frame}, instead of using an
1507frame. Emacs can create a graphical frame even if it was started in a 1508existing Emacs frame. If you omit a filename argument while supplying
1508text-only terminal, provided it is able to connect to a graphical 1509the @samp{-c} option, the new frame displays the @file{*scratch*}
1509display. If Emacs is unable to connect to a graphical display, and on 1510buffer (@pxref{Buffers}). See below for the special behavior of
1510systems, such as MS-Windows (@pxref{Windows Startup, emacsclient}), 1511@kbd{C-x C-c} in a client frame.
1511where it cannot create graphical frames when started from a text-only 1512
1512terminal, it creates a new text-only terminal frame (@pxref{Frames}). 1513If Emacs is unable to create a new graphical frame (e.g.@: if it is
1513If you omit a filename argument while supplying the @samp{-c} option, 1514unable to connect to the X server), it tries to create a text terminal
1514the new frame displays the @samp{*scratch*} buffer (@pxref{Buffers}). 1515client frame, as though you had supplied the @samp{-t} option instead
1516(see below).
1517
1518On MS-Windows, a single Emacs session cannot display frames on both
1519graphical and text terminals, nor on multiple text terminals. Thus,
1520if the Emacs server is running on a text terminal, the @samp{-c}
1521option, like the @samp{-t} option, creates a new frame in the server's
1522current text terminal. @xref{Windows Startup}.
1515 1523
1516@item -F @var{alist} 1524@item -F @var{alist}
1517@itemx --frame-parameters=@var{alist} 1525@itemx --frame-parameters=@var{alist}
@@ -1593,28 +1601,46 @@ server it finds. (This option is not supported on MS-Windows.)
1593@item -t 1601@item -t
1594@itemx --tty 1602@itemx --tty
1595@itemx -nw 1603@itemx -nw
1596Create a new Emacs frame on the current text-only terminal, instead of 1604Create a new client frame on the current text terminal, instead of
1597using an existing Emacs frame. Emacs can open a text-only terminal 1605using an existing Emacs frame. This is similar to the @samp{-c}
1598even if it was started in another text-only terminal, or on a 1606option, above, except that it creates a text terminal frame
1599graphical display. On systems, such as MS-Windows, where this is 1607(@pxref{Non-Window Terminals}). If you omit a filename argument while
1600impossible, Emacs will create a new frame, either GUI or text-only, on 1608supplying this option, the new frame displays the @file{*scratch*}
1601the same terminal where it was started (@pxref{Windows Startup, 1609buffer (@pxref{Buffers}). See below for the special behavior of
1602emacsclient}). If you omit a filename argument while supplying this 1610@kbd{C-x C-c} in a client frame.
1603option, the new frame displays the @samp{*scratch*} buffer. 1611
1604@xref{Buffers}. 1612On MS-Windows, a single Emacs session cannot display frames on both
1613graphical and text terminals, nor on multiple text terminals. Thus,
1614if the Emacs server is using the graphical display, @samp{-t} behaves
1615like @samp{-c} (see above); whereas if the Emacs server is running on
1616a text terminal, it creates a new frame in its current text terminal.
1617@xref{Windows Startup}.
1605@end table 1618@end table
1606 1619
1607 If you type @kbd{C-x C-c} (@code{save-buffers-kill-terminal}) in an 1620 The new graphical or text terminal frames created by the @samp{-c}
1608Emacs frame created with @command{emacsclient}, via the @samp{-c} or 1621or @samp{-t} options are considered @dfn{client frames}. Any new
1609@samp{-t} options, Emacs deletes the frame instead of killing the 1622frame that you create from a client frame is also considered a client
1610Emacs process itself. On a text-only terminal frame created with the 1623frame. If you type @kbd{C-x C-c} (@code{save-buffers-kill-terminal})
1611@samp{-t} option, this returns control to the terminal. Emacs also 1624in a client frame, that command does not kill the Emacs session as it
1612marks all the server buffers for the client as finished, as though you 1625normally does (@pxref{Exiting}). Instead, Emacs deletes the client
1613had typed @kbd{C-x #} in all of them. 1626frame; furthermore, if the client frame has an @command{emacsclient}
1614 1627waiting to regain control (i.e.@: if you did not supply the @samp{-n}
1615 When Emacs is started as a daemon, all frames are considered client 1628option), Emacs deletes all other frames of the same client, and marks
1616frames, so @kbd{C-x C-c} will never kill Emacs. To kill the Emacs 1629the client's server buffers as finished, as though you had typed
1617process, type @kbd{M-x kill-emacs}. 1630@kbd{C-x #} in all of them. If it so happens that there are no
1631remaining frames after the client frame(s) are deleted, the Emacs
1632session exits.
1633
1634 As an exception, when Emacs is started as a daemon, all frames are
1635considered client frames, and @kbd{C-x C-c} never kills Emacs. To
1636kill a daemon session, type @kbd{M-x kill-emacs}.
1637
1638 Note that the @samp{-t} and @samp{-n} options are contradictory:
1639@samp{-t} says to take control of the current text terminal to create
1640a new client frame, while @samp{-n} says not to take control of the
1641text terminal. If you supply both options, Emacs visits the specified
1642files(s) in an existing frame rather than a new client frame, negating
1643the effect of @samp{-t}.
1618 1644
1619@node Printing, Sorting, Emacs Server, Top 1645@node Printing, Sorting, Emacs Server, Top
1620@section Printing Hard Copies 1646@section Printing Hard Copies
@@ -1868,7 +1894,7 @@ init file (@pxref{Init File}), followed by @code{(pr-update-menus)}.
1868This function replaces the usual printing commands in the menu bar 1894This function replaces the usual printing commands in the menu bar
1869with a @samp{Printing} submenu that contains various printing options. 1895with a @samp{Printing} submenu that contains various printing options.
1870You can also type @kbd{M-x pr-interface RET}; this creates a 1896You can also type @kbd{M-x pr-interface RET}; this creates a
1871@samp{*Printing Interface*} buffer, similar to a customization buffer, 1897@file{*Printing Interface*} buffer, similar to a customization buffer,
1872where you can set the printing options. After selecting what and how 1898where you can set the printing options. After selecting what and how
1873to print, you start the print job using the @samp{Print} button (click 1899to print, you start the print job using the @samp{Print} button (click
1874@kbd{mouse-2} on it, or move point over it and type @kbd{RET}). For 1900@kbd{mouse-2} on it, or move point over it and type @kbd{RET}). For
@@ -2482,7 +2508,7 @@ encrypted in a simple monoalphabetic substitution cipher.
2482@findex dissociated-press 2508@findex dissociated-press
2483 @kbd{M-x dissociated-press} scrambles the text in the current Emacs 2509 @kbd{M-x dissociated-press} scrambles the text in the current Emacs
2484buffer, word by word or character by character, writing its output to 2510buffer, word by word or character by character, writing its output to
2485a buffer named @samp{*Dissociation*}. A positive argument tells it to 2511a buffer named @file{*Dissociation*}. A positive argument tells it to
2486operate character by character, and specifies the number of overlap 2512operate character by character, and specifies the number of overlap
2487characters. A negative argument tells it to operate word by word, and 2513characters. A negative argument tells it to operate word by word, and
2488specifies the number of overlap words. Dissociated Press produces 2514specifies the number of overlap words. Dissociated Press produces
diff --git a/doc/emacs/msdog-xtra.texi b/doc/emacs/msdog-xtra.texi
index 2191d799a2b..af8882a1fd4 100644
--- a/doc/emacs/msdog-xtra.texi
+++ b/doc/emacs/msdog-xtra.texi
@@ -247,7 +247,7 @@ begins at the top of the character cell.
247 247
248@cindex frames on MS-DOS 248@cindex frames on MS-DOS
249 The MS-DOS terminal can only display a single frame at a time. The 249 The MS-DOS terminal can only display a single frame at a time. The
250Emacs frame facilities work on MS-DOS much as they do on text-only 250Emacs frame facilities work on MS-DOS much as they do on text
251terminals 251terminals
252@iftex 252@iftex
253(@pxref{Frames,,,emacs, the Emacs Manual}). 253(@pxref{Frames,,,emacs, the Emacs Manual}).
diff --git a/doc/emacs/msdog.texi b/doc/emacs/msdog.texi
index af948f113a4..96a919cfaf8 100644
--- a/doc/emacs/msdog.texi
+++ b/doc/emacs/msdog.texi
@@ -121,8 +121,8 @@ Emacs will always create a new text-mode frame in the same
121created only if the server runs in a GUI session. Similarly, if you 121created only if the server runs in a GUI session. Similarly, if you
122invoke @command{emacsclient} with the @option{-t} option, Emacs will 122invoke @command{emacsclient} with the @option{-t} option, Emacs will
123create a GUI frame if the server runs in a GUI session, or a text-mode 123create a GUI frame if the server runs in a GUI session, or a text-mode
124frame when the session runs in text-only mode in a @dfn{Command 124frame when the session runs in text mode in a @dfn{Command Prompt}
125Prompt} window. @xref{emacsclient Options}. 125window. @xref{emacsclient Options}.
126 126
127@node Text and Binary 127@node Text and Binary
128@section Text Files and Binary Files 128@section Text Files and Binary Files
@@ -729,9 +729,9 @@ Posix-style @code{lpr} program is unavailable. The same Emacs
729variables control printing on all systems, but in some cases they have 729variables control printing on all systems, but in some cases they have
730different default values on MS-DOS and MS-Windows. 730different default values on MS-DOS and MS-Windows.
731 731
732 Emacs on Windows automatically determines your default printer and 732 Emacs on MS Windows attempts to determine your default printer
733sets the variable @code{printer-name} to that printer's name. But in 733automatically (using the function @code{default-printer-name}).
734some rare cases this can fail, or you may wish to use a different 734But in some rare cases this can fail, or you may wish to use a different
735printer from within Emacs. The rest of this section explains how to 735printer from within Emacs. The rest of this section explains how to
736tell Emacs which printer to use. 736tell Emacs which printer to use.
737 737
diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi
index aeaec2c502e..df2d687114b 100644
--- a/doc/emacs/mule.texi
+++ b/doc/emacs/mule.texi
@@ -41,7 +41,7 @@ including European and Vietnamese variants of the Latin alphabet, as
41well as Cyrillic, Devanagari (for Hindi and Marathi), Ethiopic, Greek, 41well as Cyrillic, Devanagari (for Hindi and Marathi), Ethiopic, Greek,
42Han (for Chinese and Japanese), Hangul (for Korean), Hebrew, IPA, 42Han (for Chinese and Japanese), Hangul (for Korean), Hebrew, IPA,
43Kannada, Lao, Malayalam, Tamil, Thai, Tibetan, and Vietnamese scripts. 43Kannada, Lao, Malayalam, Tamil, Thai, Tibetan, and Vietnamese scripts.
44Emacs also supports various encodings of these characters used by 44Emacs also supports various encodings of these characters that are used by
45other internationalized software, such as word processors and mailers. 45other internationalized software, such as word processors and mailers.
46 46
47 Emacs allows editing text with international characters by supporting 47 Emacs allows editing text with international characters by supporting
@@ -60,7 +60,7 @@ for each command; see @ref{Text Coding}.
60@item 60@item
61You can display non-@acronym{ASCII} characters encoded by the various 61You can display non-@acronym{ASCII} characters encoded by the various
62scripts. This works by using appropriate fonts on graphics displays 62scripts. This works by using appropriate fonts on graphics displays
63(@pxref{Defining Fontsets}), and by sending special codes to text-only 63(@pxref{Defining Fontsets}), and by sending special codes to text
64displays (@pxref{Terminal Coding}). If some characters are displayed 64displays (@pxref{Terminal Coding}). If some characters are displayed
65incorrectly, refer to @ref{Undisplayable Characters}, which describes 65incorrectly, refer to @ref{Undisplayable Characters}, which describes
66possible problems and explains how to solve them. 66possible problems and explains how to solve them.
@@ -74,14 +74,14 @@ others.
74@item 74@item
75You can insert non-@acronym{ASCII} characters or search for them. To do that, 75You can insert non-@acronym{ASCII} characters or search for them. To do that,
76you can specify an input method (@pxref{Select Input Method}) suitable 76you can specify an input method (@pxref{Select Input Method}) suitable
77for your language, or use the default input method set up when you set 77for your language, or use the default input method set up when you chose
78your language environment. If 78your language environment. If
79your keyboard can produce non-@acronym{ASCII} characters, you can select an 79your keyboard can produce non-@acronym{ASCII} characters, you can select an
80appropriate keyboard coding system (@pxref{Terminal Coding}), and Emacs 80appropriate keyboard coding system (@pxref{Terminal Coding}), and Emacs
81will accept those characters. Latin-1 characters can also be input by 81will accept those characters. Latin-1 characters can also be input by
82using the @kbd{C-x 8} prefix, see @ref{Unibyte Mode}. 82using the @kbd{C-x 8} prefix, see @ref{Unibyte Mode}.
83 83
84On the X Window System, your locale should be set to an appropriate 84With the X Window System, your locale should be set to an appropriate
85value to make sure Emacs interprets keyboard input correctly; see 85value to make sure Emacs interprets keyboard input correctly; see
86@ref{Language Environments, locales}. 86@ref{Language Environments, locales}.
87@end itemize 87@end itemize
@@ -90,7 +90,7 @@ value to make sure Emacs interprets keyboard input correctly; see
90 90
91@menu 91@menu
92* International Chars:: Basic concepts of multibyte characters. 92* International Chars:: Basic concepts of multibyte characters.
93* Enabling Multibyte:: Controlling whether to use multibyte characters. 93* Disabling Multibyte:: Controlling whether to use multibyte characters.
94* Language Environments:: Setting things up for the language you use. 94* Language Environments:: Setting things up for the language you use.
95* Input Methods:: Entering text characters not on your keyboard. 95* Input Methods:: Entering text characters not on your keyboard.
96* Select Input Method:: Specifying your choice of input methods. 96* Select Input Method:: Specifying your choice of input methods.
@@ -210,7 +210,7 @@ What keys to type to input the character in the current input method
210 210
211@item 211@item
212If you are running Emacs on a graphical display, the font name and 212If you are running Emacs on a graphical display, the font name and
213glyph code for the character. If you are running Emacs on a text-only 213glyph code for the character. If you are running Emacs on a text
214terminal, the code(s) sent to the terminal. 214terminal, the code(s) sent to the terminal.
215 215
216@item 216@item
@@ -224,29 +224,30 @@ faces used to display the character, and any overlays containing it
224in a buffer whose coding system is @code{utf-8-unix}: 224in a buffer whose coding system is @code{utf-8-unix}:
225 225
226@smallexample 226@smallexample
227 character: @`A (192, #o300, #xc0) 227 position: 1 of 1 (0%), column: 0
228preferred charset: unicode (Unicode (ISO10646)) 228 character: @`A (displayed as @`A) (codepoint 192, #o300, #xc0)
229 code point: 0xC0 229 preferred charset: unicode (Unicode (ISO10646))
230 syntax: w which means: word 230code point in charset: 0xC0
231 category: j:Japanese l:Latin v:Vietnamese 231 syntax: w which means: word
232 buffer code: #xC3 #x80 232 category: .:Base, L:Left-to-right (strong),
233 file code: not encodable by coding system undecided-unix 233 j:Japanese, l:Latin, v:Viet
234 display: by this font (glyph code) 234 buffer code: #xC3 #x80
235 file code: not encodable by coding system undecided-unix
236 display: by this font (glyph code)
235 xft:-unknown-DejaVu Sans Mono-normal-normal- 237 xft:-unknown-DejaVu Sans Mono-normal-normal-
236 normal-*-13-*-*-*-m-0-iso10646-1 (#x82) 238 normal-*-13-*-*-*-m-0-iso10646-1 (#x82)
237 239
238Character code properties: customize what to show 240Character code properties: customize what to show
239 name: LATIN CAPITAL LETTER A WITH GRAVE 241 name: LATIN CAPITAL LETTER A WITH GRAVE
242 old-name: LATIN CAPITAL LETTER A GRAVE
240 general-category: Lu (Letter, Uppercase) 243 general-category: Lu (Letter, Uppercase)
241 decomposition: (65 768) ('A' '`') 244 decomposition: (65 768) ('A' '`')
242 old-name: LATIN CAPITAL LETTER A GRAVE
243
244There are text properties here:
245 auto-composed t
246@end smallexample 245@end smallexample
247 246
248@node Enabling Multibyte 247@c FIXME? Does this section even belong in the user manual?
249@section Enabling Multibyte Characters 248@c Seems more appropriate to the lispref?
249@node Disabling Multibyte
250@section Disabling Multibyte Characters
250 251
251 By default, Emacs starts in multibyte mode: it stores the contents 252 By default, Emacs starts in multibyte mode: it stores the contents
252of buffers and strings using an internal encoding that represents 253of buffers and strings using an internal encoding that represents
@@ -275,32 +276,48 @@ Coding}. Unlike @code{find-file-literally}, finding a file as
275@samp{raw-text} doesn't disable format conversion, uncompression, or 276@samp{raw-text} doesn't disable format conversion, uncompression, or
276auto mode selection. 277auto mode selection.
277 278
279@c Not a single file in Emacs uses this feature. Is it really worth
280@c mentioning in the _user_ manual? Also, this duplicates somewhat
281@c "Loading Non-ASCII" from the lispref.
278@cindex Lisp files, and multibyte operation 282@cindex Lisp files, and multibyte operation
279@cindex multibyte operation, and Lisp files 283@cindex multibyte operation, and Lisp files
280@cindex unibyte operation, and Lisp files 284@cindex unibyte operation, and Lisp files
281@cindex init file, and non-@acronym{ASCII} characters 285@cindex init file, and non-@acronym{ASCII} characters
282 Emacs normally loads Lisp files as multibyte. 286 Emacs normally loads Lisp files as multibyte.
283This includes the Emacs initialization 287This includes the Emacs initialization
284file, @file{.emacs}, and the initialization files of Emacs packages 288file, @file{.emacs}, and the initialization files of packages
285such as Gnus. However, you can specify unibyte loading for a 289such as Gnus. However, you can specify unibyte loading for a
286particular Lisp file, by putting @w{@samp{-*-unibyte: t;-*-}} in a 290particular Lisp file, by adding an entry @samp{unibyte: t} in a file
287comment on the first line (@pxref{File Variables}). Then that file is 291local variables section (@pxref{File Variables}). Then that file is
288always loaded as unibyte text. The motivation for these conventions 292always loaded as unibyte text. Note that this does not represent a
289is that it is more reliable to always load any particular Lisp file in 293real @code{unibyte} variable, rather it just acts as an indicator
290the same way. However, you can load a Lisp file as unibyte, on any 294to Emacs in the same way as @code{coding} does (@pxref{Specify Coding}).
291one occasion, by typing @kbd{C-x @key{RET} c raw-text @key{RET}} 295@ignore
292immediately before loading it. 296@c I don't see the point of this statement:
293 297The motivation for these conventions is that it is more reliable to
294 The mode line indicates whether multibyte character support is 298always load any particular Lisp file in the same way.
295enabled in the current buffer. If it is, there are two or more 299@end ignore
296characters (most often two dashes) near the beginning of the mode 300Note also that this feature only applies to @emph{loading} Lisp files
297line, before the indication of the visited file's end-of-line 301for evaluation, not to visiting them for editing. You can also load a
298convention (colon, backslash, etc.). When multibyte characters 302Lisp file as unibyte, on any one occasion, by typing @kbd{C-x
299are not enabled, nothing precedes the colon except a single dash. 303@key{RET} c raw-text @key{RET}} immediately before loading it.
300@xref{Mode Line}, for more details about this. 304
305@c See http://debbugs.gnu.org/11226 for lack of unibyte tooltip.
306@vindex enable-multibyte-characters
307The buffer-local variable @code{enable-multibyte-characters} is
308non-@code{nil} in multibyte buffers, and @code{nil} in unibyte ones.
309The mode line also indicates whether a buffer is multibyte or not.
310@xref{Mode Line}. With a graphical display, in a multibyte buffer,
311the portion of the mode line that indicates the character set has a
312tooltip that (amongst other things) says that the buffer is multibyte.
313In a unibyte buffer, the character set indicator is absent. Thus, in
314a unibyte buffer (when using a graphical display) there is normally
315nothing before the indication of the visited file's end-of-line
316convention (colon, backslash, etc.), unless you are using an input
317method.
301 318
302@findex toggle-enable-multibyte-characters 319@findex toggle-enable-multibyte-characters
303You can turn on multibyte support in a specific buffer by invoking the 320You can turn off multibyte support in a specific buffer by invoking the
304command @code{toggle-enable-multibyte-characters} in that buffer. 321command @code{toggle-enable-multibyte-characters} in that buffer.
305 322
306@node Language Environments 323@node Language Environments
@@ -309,8 +326,8 @@ command @code{toggle-enable-multibyte-characters} in that buffer.
309 326
310 All supported character sets are supported in Emacs buffers whenever 327 All supported character sets are supported in Emacs buffers whenever
311multibyte characters are enabled; there is no need to select a 328multibyte characters are enabled; there is no need to select a
312particular language in order to display its characters in an Emacs 329particular language in order to display its characters.
313buffer. However, it is important to select a @dfn{language 330However, it is important to select a @dfn{language
314environment} in order to set various defaults. Roughly speaking, the 331environment} in order to set various defaults. Roughly speaking, the
315language environment represents a choice of preferred script rather 332language environment represents a choice of preferred script rather
316than a choice of language. 333than a choice of language.
@@ -327,7 +344,8 @@ language environment also specifies a default input method.
327@code{current-language-environment} or use the command @kbd{M-x 344@code{current-language-environment} or use the command @kbd{M-x
328set-language-environment}. It makes no difference which buffer is 345set-language-environment}. It makes no difference which buffer is
329current when you use this command, because the effects apply globally 346current when you use this command, because the effects apply globally
330to the Emacs session. The supported language environments include: 347to the Emacs session. The supported language environments
348(see the variable @code{language-info-alist}) include:
331 349
332@cindex Euro sign 350@cindex Euro sign
333@cindex UTF-8 351@cindex UTF-8
@@ -347,21 +365,8 @@ UTF-8), Ukrainian, Vietnamese, Welsh, and Windows-1255 (for a setup
347which prefers Cyrillic characters and files encoded in Windows-1255). 365which prefers Cyrillic characters and files encoded in Windows-1255).
348@end quotation 366@end quotation
349 367
350@cindex fonts for various scripts
351@cindex Intlfonts package, installation
352 To display the script(s) used by your language environment on a 368 To display the script(s) used by your language environment on a
353graphical display, you need to have a suitable font. If some of the 369graphical display, you need to have suitable fonts.
354characters appear as empty boxes or hex codes, you should install the
355GNU Intlfonts package, which includes fonts for most supported
356scripts.@footnote{If you run Emacs on X, you need to inform the X
357server about the location of the newly installed fonts with the
358following commands:
359
360@example
361 xset fp+ /usr/local/share/emacs/fonts
362 xset fp rehash
363@end example
364}
365@xref{Fontsets}, for more details about setting up your fonts. 370@xref{Fontsets}, for more details about setting up your fonts.
366 371
367@findex set-locale-environment 372@findex set-locale-environment
@@ -370,22 +375,25 @@ following commands:
370@cindex locales 375@cindex locales
371 Some operating systems let you specify the character-set locale you 376 Some operating systems let you specify the character-set locale you
372are using by setting the locale environment variables @env{LC_ALL}, 377are using by setting the locale environment variables @env{LC_ALL},
373@env{LC_CTYPE}, or @env{LANG}.@footnote{If more than one of these is 378@env{LC_CTYPE}, or @env{LANG}. (If more than one of these is
374set, the first one that is nonempty specifies your locale for this 379set, the first one that is nonempty specifies your locale for this
375purpose.} During startup, Emacs looks up your character-set locale's 380purpose.) During startup, Emacs looks up your character-set locale's
376name in the system locale alias table, matches its canonical name 381name in the system locale alias table, matches its canonical name
377against entries in the value of the variables 382against entries in the value of the variables
378@code{locale-charset-language-names} and @code{locale-language-names}, 383@code{locale-charset-language-names} and @code{locale-language-names}
384(the former overrides the latter),
379and selects the corresponding language environment if a match is found. 385and selects the corresponding language environment if a match is found.
380(The former variable overrides the latter.) It also adjusts the display 386It also adjusts the display
381table and terminal coding system, the locale coding system, the 387table and terminal coding system, the locale coding system, the
382preferred coding system as needed for the locale, and---last but not 388preferred coding system as needed for the locale, and---last but not
383least---the way Emacs decodes non-@acronym{ASCII} characters sent by your keyboard. 389least---the way Emacs decodes non-@acronym{ASCII} characters sent by your keyboard.
384 390
391@c This seems unlikely, doesn't it?
385 If you modify the @env{LC_ALL}, @env{LC_CTYPE}, or @env{LANG} 392 If you modify the @env{LC_ALL}, @env{LC_CTYPE}, or @env{LANG}
386environment variables while running Emacs, you may want to invoke the 393environment variables while running Emacs (by using @kbd{M-x setenv}),
387@code{set-locale-environment} function afterwards to readjust the 394you may want to invoke the @code{set-locale-environment}
388language environment from the new locale. 395function afterwards to readjust the language environment from the new
396locale.
389 397
390@vindex locale-preferred-coding-systems 398@vindex locale-preferred-coding-systems
391 The @code{set-locale-environment} function normally uses the preferred 399 The @code{set-locale-environment} function normally uses the preferred
@@ -421,7 +429,7 @@ this command describes the chosen language environment.
421language environment. The hook functions can test for a specific 429language environment. The hook functions can test for a specific
422language environment by checking the variable 430language environment by checking the variable
423@code{current-language-environment}. This hook is where you should 431@code{current-language-environment}. This hook is where you should
424put non-default settings for specific language environment, such as 432put non-default settings for specific language environments, such as
425coding systems for keyboard input and terminal output, the default 433coding systems for keyboard input and terminal output, the default
426input method, etc. 434input method, etc.
427 435
@@ -441,7 +449,7 @@ for that key.
441@cindex input methods 449@cindex input methods
442 An @dfn{input method} is a kind of character conversion designed 450 An @dfn{input method} is a kind of character conversion designed
443specifically for interactive input. In Emacs, typically each language 451specifically for interactive input. In Emacs, typically each language
444has its own input method; sometimes several languages which use the same 452has its own input method; sometimes several languages that use the same
445characters can share one input method. A few languages support several 453characters can share one input method. A few languages support several
446input methods. 454input methods.
447 455
@@ -454,14 +462,14 @@ work this way.
454characters into one letter. Many European input methods use composition 462characters into one letter. Many European input methods use composition
455to produce a single non-@acronym{ASCII} letter from a sequence that consists of a 463to produce a single non-@acronym{ASCII} letter from a sequence that consists of a
456letter followed by accent characters (or vice versa). For example, some 464letter followed by accent characters (or vice versa). For example, some
457methods convert the sequence @kbd{a'} into a single accented letter. 465methods convert the sequence @kbd{o ^} into a single accented letter.
458These input methods have no special commands of their own; all they do 466These input methods have no special commands of their own; all they do
459is compose sequences of printing characters. 467is compose sequences of printing characters.
460 468
461 The input methods for syllabic scripts typically use mapping followed 469 The input methods for syllabic scripts typically use mapping followed
462by composition. The input methods for Thai and Korean work this way. 470by composition. The input methods for Thai and Korean work this way.
463First, letters are mapped into symbols for particular sounds or tone 471First, letters are mapped into symbols for particular sounds or tone
464marks; then, sequences of these which make up a whole syllable are 472marks; then, sequences of these that make up a whole syllable are
465mapped into one syllable sign. 473mapped into one syllable sign.
466 474
467 Chinese and Japanese require more complex methods. In Chinese input 475 Chinese and Japanese require more complex methods. In Chinese input
@@ -471,7 +479,8 @@ portions of the character (input methods @code{chinese-4corner} and
471@code{chinese-sw}, and others). One input sequence typically 479@code{chinese-sw}, and others). One input sequence typically
472corresponds to many possible Chinese characters. You select the one 480corresponds to many possible Chinese characters. You select the one
473you mean using keys such as @kbd{C-f}, @kbd{C-b}, @kbd{C-n}, 481you mean using keys such as @kbd{C-f}, @kbd{C-b}, @kbd{C-n},
474@kbd{C-p}, and digits, which have special meanings in this situation. 482@kbd{C-p} (or the arrow keys), and digits, which have special meanings
483in this situation.
475 484
476 The possible characters are conceptually arranged in several rows, 485 The possible characters are conceptually arranged in several rows,
477with each row holding up to 10 alternatives. Normally, Emacs displays 486with each row holding up to 10 alternatives. Normally, Emacs displays
@@ -485,8 +494,8 @@ the alternatives in the current row. As you do this, Emacs highlights
485the current alternative with a special color; type @code{C-@key{SPC}} 494the current alternative with a special color; type @code{C-@key{SPC}}
486to select the current alternative and use it as input. The 495to select the current alternative and use it as input. The
487alternatives in the row are also numbered; the number appears before 496alternatives in the row are also numbered; the number appears before
488the alternative. Typing a digit @var{n} selects the @var{n}th 497the alternative. Typing a number selects the associated alternative
489alternative of the current row and uses it as input. 498of the current row and uses it as input.
490 499
491 @key{TAB} in these Chinese input methods displays a buffer showing 500 @key{TAB} in these Chinese input methods displays a buffer showing
492all the possible characters at once; then clicking @kbd{Mouse-2} on 501all the possible characters at once; then clicking @kbd{Mouse-2} on
@@ -505,15 +514,15 @@ the alternatives.
505 Sometimes it is useful to cut off input method processing so that the 514 Sometimes it is useful to cut off input method processing so that the
506characters you have just entered will not combine with subsequent 515characters you have just entered will not combine with subsequent
507characters. For example, in input method @code{latin-1-postfix}, the 516characters. For example, in input method @code{latin-1-postfix}, the
508sequence @kbd{e '} combines to form an @samp{e} with an accent. What if 517sequence @kbd{o ^} combines to form an @samp{o} with an accent. What if
509you want to enter them as separate characters? 518you want to enter them as separate characters?
510 519
511 One way is to type the accent twice; this is a special feature for 520 One way is to type the accent twice; this is a special feature for
512entering the separate letter and accent. For example, @kbd{e ' '} gives 521entering the separate letter and accent. For example, @kbd{o ^ ^} gives
513you the two characters @samp{e'}. Another way is to type another letter 522you the two characters @samp{o^}. Another way is to type another letter
514after the @kbd{e}---something that won't combine with that---and 523after the @kbd{o}---something that won't combine with that---and
515immediately delete it. For example, you could type @kbd{e e @key{DEL} 524immediately delete it. For example, you could type @kbd{o o @key{DEL}
516'} to get separate @samp{e} and @samp{'}. 525^} to get separate @samp{o} and @samp{^}.
517 526
518 Another method, more general but not quite as easy to type, is to use 527 Another method, more general but not quite as easy to type, is to use
519@kbd{C-\ C-\} between two characters to stop them from combining. This 528@kbd{C-\ C-\} between two characters to stop them from combining. This
@@ -542,7 +551,7 @@ possible characters to type next is displayed in the echo area (but
542not when you are in the minibuffer). 551not when you are in the minibuffer).
543 552
544 Another facility for typing characters not on your keyboard is by 553 Another facility for typing characters not on your keyboard is by
545using the @kbd{C-x 8 @key{RET}} (@code{ucs-insert}) to insert a single 554using @kbd{C-x 8 @key{RET}} (@code{ucs-insert}) to insert a single
546character based on its Unicode name or code-point; see @ref{Inserting 555character based on its Unicode name or code-point; see @ref{Inserting
547Text}. 556Text}.
548 557
@@ -551,10 +560,10 @@ Text}.
551 560
552@table @kbd 561@table @kbd
553@item C-\ 562@item C-\
554Enable or disable use of the selected input method. 563Enable or disable use of the selected input method (@code{toggle-input-method}).
555 564
556@item C-x @key{RET} C-\ @var{method} @key{RET} 565@item C-x @key{RET} C-\ @var{method} @key{RET}
557Select a new input method for the current buffer. 566Select a new input method for the current buffer (@code{set-input-method}).
558 567
559@item C-h I @var{method} @key{RET} 568@item C-h I @var{method} @key{RET}
560@itemx C-h C-\ @var{method} @key{RET} 569@itemx C-h C-\ @var{method} @key{RET}
@@ -588,7 +597,7 @@ turn off the input method temporarily. To do this, type @kbd{C-\}
588@kbd{C-\} again. 597@kbd{C-\} again.
589 598
590 If you type @kbd{C-\} and you have not yet selected an input method, 599 If you type @kbd{C-\} and you have not yet selected an input method,
591it prompts for you to specify one. This has the same effect as using 600it prompts you to specify one. This has the same effect as using
592@kbd{C-x @key{RET} C-\} to specify an input method. 601@kbd{C-x @key{RET} C-\} to specify an input method.
593 602
594 When invoked with a numeric argument, as in @kbd{C-u C-\}, 603 When invoked with a numeric argument, as in @kbd{C-u C-\},
@@ -631,7 +640,7 @@ automatically. For example:
631@end lisp 640@end lisp
632 641
633@noindent 642@noindent
634This activates the input method ``german-prefix'' automatically in the 643This automatically activates the input method ``german-prefix'' in
635Text mode. 644Text mode.
636 645
637@findex quail-set-keyboard-layout 646@findex quail-set-keyboard-layout
@@ -645,7 +654,7 @@ the command @kbd{M-x quail-set-keyboard-layout}.
645 You can use the command @kbd{M-x quail-show-key} to show what key (or 654 You can use the command @kbd{M-x quail-show-key} to show what key (or
646key sequence) to type in order to input the character following point, 655key sequence) to type in order to input the character following point,
647using the selected keyboard layout. The command @kbd{C-u C-x =} also 656using the selected keyboard layout. The command @kbd{C-u C-x =} also
648shows that information in addition to the other information about the 657shows that information, in addition to other information about the
649character. 658character.
650 659
651@findex list-input-methods 660@findex list-input-methods
@@ -685,11 +694,12 @@ system; for example, to visit a file encoded in codepage 850, type
685 In addition to converting various representations of non-@acronym{ASCII} 694 In addition to converting various representations of non-@acronym{ASCII}
686characters, a coding system can perform end-of-line conversion. Emacs 695characters, a coding system can perform end-of-line conversion. Emacs
687handles three different conventions for how to separate lines in a file: 696handles three different conventions for how to separate lines in a file:
688newline, carriage-return linefeed, and just carriage-return. 697newline (``unix''), carriage-return linefeed (``dos''), and just
698carriage-return (``mac'').
689 699
690@table @kbd 700@table @kbd
691@item C-h C @var{coding} @key{RET} 701@item C-h C @var{coding} @key{RET}
692Describe coding system @var{coding}. 702Describe coding system @var{coding} (@code{describe-coding-system}).
693 703
694@item C-h C @key{RET} 704@item C-h C @key{RET}
695Describe the coding systems currently in use. 705Describe the coding systems currently in use.
@@ -725,27 +735,27 @@ end-of-line conversion to be decided based on the contents of each file.
725For example, if the file appears to use the sequence carriage-return 735For example, if the file appears to use the sequence carriage-return
726linefeed to separate lines, DOS end-of-line conversion will be used. 736linefeed to separate lines, DOS end-of-line conversion will be used.
727 737
728 Each of the listed coding systems has three variants which specify 738 Each of the listed coding systems has three variants, which specify
729exactly what to do for end-of-line conversion: 739exactly what to do for end-of-line conversion:
730 740
731@table @code 741@table @code
732@item @dots{}-unix 742@item @dots{}-unix
733Don't do any end-of-line conversion; assume the file uses 743Don't do any end-of-line conversion; assume the file uses
734newline to separate lines. (This is the convention normally used 744newline to separate lines. (This is the convention normally used
735on Unix and GNU systems.) 745on Unix and GNU systems, and Mac OS X.)
736 746
737@item @dots{}-dos 747@item @dots{}-dos
738Assume the file uses carriage-return linefeed to separate lines, and do 748Assume the file uses carriage-return linefeed to separate lines, and do
739the appropriate conversion. (This is the convention normally used on 749the appropriate conversion. (This is the convention normally used on
740Microsoft systems.@footnote{It is also specified for MIME @samp{text/*} 750Microsoft systems.@footnote{It is also specified for MIME @samp{text/*}
741bodies and in other network transport contexts. It is different 751bodies and in other network transport contexts. It is different
742from the SGML reference syntax record-start/record-end format which 752from the SGML reference syntax record-start/record-end format, which
743Emacs doesn't support directly.}) 753Emacs doesn't support directly.})
744 754
745@item @dots{}-mac 755@item @dots{}-mac
746Assume the file uses carriage-return to separate lines, and do the 756Assume the file uses carriage-return to separate lines, and do the
747appropriate conversion. (This is the convention normally used on the 757appropriate conversion. (This was the convention used on the
748Macintosh system.) 758Macintosh system prior to OS X.)
749@end table 759@end table
750 760
751 These variant coding systems are omitted from the 761 These variant coding systems are omitted from the
@@ -763,7 +773,7 @@ be deduced from the text itself.
763 773
764@cindex @code{raw-text}, coding system 774@cindex @code{raw-text}, coding system
765 The coding system @code{raw-text} is good for a file which is mainly 775 The coding system @code{raw-text} is good for a file which is mainly
766@acronym{ASCII} text, but may contain byte values above 127 which are 776@acronym{ASCII} text, but may contain byte values above 127 that are
767not meant to encode non-@acronym{ASCII} characters. With 777not meant to encode non-@acronym{ASCII} characters. With
768@code{raw-text}, Emacs copies those byte values unchanged, and sets 778@code{raw-text}, Emacs copies those byte values unchanged, and sets
769@code{enable-multibyte-characters} to @code{nil} in the current buffer 779@code{enable-multibyte-characters} to @code{nil} in the current buffer
@@ -880,37 +890,47 @@ the buffer.
880 890
881 The default value of @code{inhibit-iso-escape-detection} is 891 The default value of @code{inhibit-iso-escape-detection} is
882@code{nil}. We recommend that you not change it permanently, only for 892@code{nil}. We recommend that you not change it permanently, only for
883one specific operation. That's because many Emacs Lisp source files 893one specific operation. That's because some Emacs Lisp source files
884in the Emacs distribution contain non-@acronym{ASCII} characters encoded in the 894in the Emacs distribution contain non-@acronym{ASCII} characters encoded in the
885coding system @code{iso-2022-7bit}, and they won't be 895coding system @code{iso-2022-7bit}, and they won't be
886decoded correctly when you visit those files if you suppress the 896decoded correctly when you visit those files if you suppress the
887escape sequence detection. 897escape sequence detection.
898@c I count a grand total of 3 such files, so is the above really true?
888 899
889@vindex auto-coding-alist 900@vindex auto-coding-alist
890@vindex auto-coding-regexp-alist 901@vindex auto-coding-regexp-alist
891@vindex auto-coding-functions 902 The variables @code{auto-coding-alist} and
892 The variables @code{auto-coding-alist}, 903@code{auto-coding-regexp-alist} are
893@code{auto-coding-regexp-alist} and @code{auto-coding-functions} are
894the strongest way to specify the coding system for certain patterns of 904the strongest way to specify the coding system for certain patterns of
895file names, or for files containing certain patterns; these variables 905file names, or for files containing certain patterns, respectively.
896even override @samp{-*-coding:-*-} tags in the file itself. Emacs 906These variables even override @samp{-*-coding:-*-} tags in the file
907itself (@pxref{Specify Coding}). For example, Emacs
897uses @code{auto-coding-alist} for tar and archive files, to prevent it 908uses @code{auto-coding-alist} for tar and archive files, to prevent it
898from being confused by a @samp{-*-coding:-*-} tag in a member of the 909from being confused by a @samp{-*-coding:-*-} tag in a member of the
899archive and thinking it applies to the archive file as a whole. 910archive and thinking it applies to the archive file as a whole.
911@ignore
912@c This describes old-style BABYL files, which are no longer relevant.
900Likewise, Emacs uses @code{auto-coding-regexp-alist} to ensure that 913Likewise, Emacs uses @code{auto-coding-regexp-alist} to ensure that
901RMAIL files, whose names in general don't match any particular 914RMAIL files, whose names in general don't match any particular
902pattern, are decoded correctly. One of the builtin 915pattern, are decoded correctly.
916@end ignore
917
918@vindex auto-coding-functions
919 Another way to specify a coding system is with the variable
920@code{auto-coding-functions}. For example, one of the builtin
903@code{auto-coding-functions} detects the encoding for XML files. 921@code{auto-coding-functions} detects the encoding for XML files.
922Unlike the previous two, this variable does not override any
923@samp{-*-coding:-*-} tag.
904 924
925@c FIXME? This seems somewhat out of place. Move to the Rmail section?
905@vindex rmail-decode-mime-charset 926@vindex rmail-decode-mime-charset
906@vindex rmail-file-coding-system 927@vindex rmail-file-coding-system
907 When you get new mail in Rmail, each message is translated 928 When you get new mail in Rmail, each message is translated
908automatically from the coding system it is written in, as if it were a 929automatically from the coding system it is written in, as if it were a
909separate file. This uses the priority list of coding systems that you 930separate file. This uses the priority list of coding systems that you
910have specified. If a MIME message specifies a character set, Rmail 931have specified. If a MIME message specifies a character set, Rmail
911obeys that specification, unless @code{rmail-decode-mime-charset} is 932obeys that specification. For reading and saving Rmail files
912@code{nil}. For reading and saving Rmail files themselves, Emacs uses 933themselves, Emacs uses the coding system specified by the variable
913the coding system specified by the variable
914@code{rmail-file-coding-system}. The default value is @code{nil}, 934@code{rmail-file-coding-system}. The default value is @code{nil},
915which means that Rmail files are not translated (they are read and 935which means that Rmail files are not translated (they are read and
916written in the Emacs internal character code). 936written in the Emacs internal character code).
@@ -969,6 +989,7 @@ and asks you to choose one of those coding systems.
969 989
970 If you insert the unsuitable characters in a mail message, Emacs 990 If you insert the unsuitable characters in a mail message, Emacs
971behaves a bit differently. It additionally checks whether the 991behaves a bit differently. It additionally checks whether the
992@c What determines this?
972most-preferred coding system is recommended for use in MIME messages; 993most-preferred coding system is recommended for use in MIME messages;
973if not, Emacs tells you that the most-preferred coding system is not 994if not, Emacs tells you that the most-preferred coding system is not
974recommended and prompts you for another coding system. This is so you 995recommended and prompts you for another coding system. This is so you
@@ -977,17 +998,22 @@ recipient's mail software will have difficulty decoding. (You can
977still use an unsuitable coding system if you type its name in response 998still use an unsuitable coding system if you type its name in response
978to the question.) 999to the question.)
979 1000
1001@c It seems that select-message-coding-system does this.
1002@c Both sendmail.el and smptmail.el call it; i.e. smtpmail.el still
1003@c obeys sendmail-coding-system.
980@vindex sendmail-coding-system 1004@vindex sendmail-coding-system
981 When you send a message with Message mode (@pxref{Sending Mail}), 1005 When you send a mail message (@pxref{Sending Mail}),
982Emacs has four different ways to determine the coding system to use 1006Emacs has four different ways to determine the coding system to use
983for encoding the message text. It tries the buffer's own value of 1007for encoding the message text. It tries the buffer's own value of
984@code{buffer-file-coding-system}, if that is non-@code{nil}. 1008@code{buffer-file-coding-system}, if that is non-@code{nil}.
985Otherwise, it uses the value of @code{sendmail-coding-system}, if that 1009Otherwise, it uses the value of @code{sendmail-coding-system}, if that
986is non-@code{nil}. The third way is to use the default coding system 1010is non-@code{nil}. The third way is to use the default coding system
987for new files, which is controlled by your choice of language 1011for new files, which is controlled by your choice of language
1012@c i.e., default-sendmail-coding-system
988environment, if that is non-@code{nil}. If all of these three values 1013environment, if that is non-@code{nil}. If all of these three values
989are @code{nil}, Emacs encodes outgoing mail using the Latin-1 coding 1014are @code{nil}, Emacs encodes outgoing mail using the Latin-1 coding
990system. 1015system.
1016@c FIXME? Where does the Latin-1 default come in?
991 1017
992@node Text Coding 1018@node Text Coding
993@section Specifying a Coding System for File Text 1019@section Specifying a Coding System for File Text
@@ -998,8 +1024,8 @@ one:
998 1024
999@table @kbd 1025@table @kbd
1000@item C-x @key{RET} f @var{coding} @key{RET} 1026@item C-x @key{RET} f @var{coding} @key{RET}
1001Use coding system @var{coding} to save or revisit the visited file in 1027Use coding system @var{coding} to save or revisit the file in
1002the current buffer (@code{set-buffer-file-coding-system}) 1028the current buffer (@code{set-buffer-file-coding-system}).
1003 1029
1004@item C-x @key{RET} c @var{coding} @key{RET} 1030@item C-x @key{RET} c @var{coding} @key{RET}
1005Specify coding system @var{coding} for the immediately following 1031Specify coding system @var{coding} for the immediately following
@@ -1029,8 +1055,8 @@ buffer.
1029 You can also use this command to specify the end-of-line conversion 1055 You can also use this command to specify the end-of-line conversion
1030(@pxref{Coding Systems, end-of-line conversion}) for encoding the 1056(@pxref{Coding Systems, end-of-line conversion}) for encoding the
1031current buffer. For example, @kbd{C-x @key{RET} f dos @key{RET}} will 1057current buffer. For example, @kbd{C-x @key{RET} f dos @key{RET}} will
1032cause Emacs to save the current buffer's text with DOS-style CRLF line 1058cause Emacs to save the current buffer's text with DOS-style
1033endings. 1059carriage-return linefeed line endings.
1034 1060
1035@kindex C-x RET c 1061@kindex C-x RET c
1036@findex universal-coding-system-argument 1062@findex universal-coding-system-argument
@@ -1118,7 +1144,7 @@ coding system for the next selection made in Emacs or read by Emacs.
1118 The variable @code{x-select-request-type} specifies the data type to 1144 The variable @code{x-select-request-type} specifies the data type to
1119request from the X Window System for receiving text selections from 1145request from the X Window System for receiving text selections from
1120other applications. If the value is @code{nil} (the default), Emacs 1146other applications. If the value is @code{nil} (the default), Emacs
1121tries @code{COMPOUND_TEXT} and @code{UTF8_STRING}, in this order, and 1147tries @code{UTF8_STRING} and @code{COMPOUND_TEXT}, in this order, and
1122uses various heuristics to choose the more appropriate of the two 1148uses various heuristics to choose the more appropriate of the two
1123results; if none of these succeed, Emacs falls back on @code{STRING}. 1149results; if none of these succeed, Emacs falls back on @code{STRING}.
1124If the value of @code{x-select-request-type} is one of the symbols 1150If the value of @code{x-select-request-type} is one of the symbols
@@ -1150,8 +1176,8 @@ current language environment.
1150 The variable @code{locale-coding-system} specifies a coding system 1176 The variable @code{locale-coding-system} specifies a coding system
1151to use when encoding and decoding system strings such as system error 1177to use when encoding and decoding system strings such as system error
1152messages and @code{format-time-string} formats and time stamps. That 1178messages and @code{format-time-string} formats and time stamps. That
1153coding system is also used for decoding non-@acronym{ASCII} keyboard input on X 1179coding system is also used for decoding non-@acronym{ASCII} keyboard
1154Window systems. You should choose a coding system that is compatible 1180input on the X Window System. You should choose a coding system that is compatible
1155with the underlying system's text representation, which is normally 1181with the underlying system's text representation, which is normally
1156specified by one of the environment variables @env{LC_ALL}, 1182specified by one of the environment variables @env{LC_ALL},
1157@env{LC_CTYPE}, and @env{LANG}. (The first one, in the order 1183@env{LC_CTYPE}, and @env{LANG}. (The first one, in the order
@@ -1164,27 +1190,29 @@ the text representation.)
1164@table @kbd 1190@table @kbd
1165@item C-x @key{RET} F @var{coding} @key{RET} 1191@item C-x @key{RET} F @var{coding} @key{RET}
1166Use coding system @var{coding} for encoding and decoding file 1192Use coding system @var{coding} for encoding and decoding file
1167@emph{names} (@code{set-file-name-coding-system}). 1193names (@code{set-file-name-coding-system}).
1168@end table 1194@end table
1169 1195
1170@vindex file-name-coding-system
1171@cindex file names with non-@acronym{ASCII} characters
1172 The variable @code{file-name-coding-system} specifies a coding
1173system to use for encoding file names. It has no effect on reading
1174and writing the @emph{contents} of files.
1175
1176@findex set-file-name-coding-system 1196@findex set-file-name-coding-system
1177@kindex C-x @key{RET} F 1197@kindex C-x @key{RET} F
1178 If you set the variable to a coding system name (as a Lisp symbol or 1198@cindex file names with non-@acronym{ASCII} characters
1179a string), Emacs encodes file names using that coding system for all 1199 The command @kbd{C-x @key{RET} F} (@code{set-file-name-coding-system})
1180file operations. This makes it possible to use non-@acronym{ASCII} 1200specifies a coding system to use for encoding file @emph{names}. It
1181characters in file names---or, at least, those non-@acronym{ASCII} 1201has no effect on reading and writing the @emph{contents} of files.
1182characters which the specified coding system can encode. Use @kbd{C-x 1202
1183@key{RET} F} (@code{set-file-name-coding-system}) to specify this 1203@vindex file-name-coding-system
1184interactively. 1204 In fact, all this command does is set the value of the variable
1205@code{file-name-coding-system}. If you set the variable to a coding
1206system name (as a Lisp symbol or a string), Emacs encodes file names
1207using that coding system for all file operations. This makes it
1208possible to use non-@acronym{ASCII} characters in file names---or, at
1209least, those non-@acronym{ASCII} characters that the specified coding
1210system can encode.
1185 1211
1186 If @code{file-name-coding-system} is @code{nil}, Emacs uses a 1212 If @code{file-name-coding-system} is @code{nil}, Emacs uses a
1187default coding system determined by the selected language environment. 1213default coding system determined by the selected language environment,
1214and stored in the @code{default-file-name-coding-system} variable.
1215@c FIXME? Is this correct? What is the "default language environment"?
1188In the default language environment, non-@acronym{ASCII} characters in 1216In the default language environment, non-@acronym{ASCII} characters in
1189file names are not encoded specially; they appear in the file system 1217file names are not encoded specially; they appear in the file system
1190using the internal Emacs representation. 1218using the internal Emacs representation.
@@ -1195,7 +1223,7 @@ result if you have already visited files whose names were encoded using
1195the earlier coding system and cannot be encoded (or are encoded 1223the earlier coding system and cannot be encoded (or are encoded
1196differently) under the new coding system. If you try to save one of 1224differently) under the new coding system. If you try to save one of
1197these buffers under the visited file name, saving may use the wrong file 1225these buffers under the visited file name, saving may use the wrong file
1198name, or it may get an error. If such a problem happens, use @kbd{C-x 1226name, or it may encounter an error. If such a problem happens, use @kbd{C-x
1199C-w} to specify a new file name for that buffer. 1227C-w} to specify a new file name for that buffer.
1200 1228
1201@findex recode-file-name 1229@findex recode-file-name
@@ -1208,13 +1236,13 @@ system, and the coding system to which you wish to convert.
1208@section Coding Systems for Terminal I/O 1236@section Coding Systems for Terminal I/O
1209 1237
1210@table @kbd 1238@table @kbd
1211@item C-x @key{RET} k @var{coding} @key{RET}
1212Use coding system @var{coding} for keyboard input
1213(@code{set-keyboard-coding-system}).
1214
1215@item C-x @key{RET} t @var{coding} @key{RET} 1239@item C-x @key{RET} t @var{coding} @key{RET}
1216Use coding system @var{coding} for terminal output 1240Use coding system @var{coding} for terminal output
1217(@code{set-terminal-coding-system}). 1241(@code{set-terminal-coding-system}).
1242
1243@item C-x @key{RET} k @var{coding} @key{RET}
1244Use coding system @var{coding} for keyboard input
1245(@code{set-keyboard-coding-system}).
1218@end table 1246@end table
1219 1247
1220@kindex C-x RET t 1248@kindex C-x RET t
@@ -1237,8 +1265,8 @@ your locale specification (@pxref{Language Environments}).
1237@kindex C-x RET k 1265@kindex C-x RET k
1238@findex set-keyboard-coding-system 1266@findex set-keyboard-coding-system
1239@vindex keyboard-coding-system 1267@vindex keyboard-coding-system
1240 The command @kbd{C-x @key{RET} k} (@code{set-keyboard-coding-system}) 1268 The command @kbd{C-x @key{RET} k} (@code{set-keyboard-coding-system}),
1241or the variable @code{keyboard-coding-system} specifies the coding 1269or the variable @code{keyboard-coding-system}, specifies the coding
1242system for keyboard input. Character-code translation of keyboard 1270system for keyboard input. Character-code translation of keyboard
1243input is useful for terminals with keys that send non-@acronym{ASCII} 1271input is useful for terminals with keys that send non-@acronym{ASCII}
1244graphic characters---for example, some terminals designed for ISO 1272graphic characters---for example, some terminals designed for ISO
@@ -1273,30 +1301,49 @@ non-graphic characters.
1273 A font typically defines shapes for a single alphabet or script. 1301 A font typically defines shapes for a single alphabet or script.
1274Therefore, displaying the entire range of scripts that Emacs supports 1302Therefore, displaying the entire range of scripts that Emacs supports
1275requires a collection of many fonts. In Emacs, such a collection is 1303requires a collection of many fonts. In Emacs, such a collection is
1276called a @dfn{fontset}. A fontset is defined by a list of font specs, 1304called a @dfn{fontset}. A fontset is defined by a list of font specifications,
1277each assigned to handle a range of character codes, and may fall back 1305each assigned to handle a range of character codes, and may fall back
1278on another fontset for characters which are not covered by the fonts 1306on another fontset for characters that are not covered by the fonts
1279it specifies. 1307it specifies.
1280 1308
1309@cindex fonts for various scripts
1310@cindex Intlfonts package, installation
1281 Each fontset has a name, like a font. However, while fonts are 1311 Each fontset has a name, like a font. However, while fonts are
1282stored in the system and the available font names are defined by the 1312stored in the system and the available font names are defined by the
1283system, fontsets are defined within Emacs itself. Once you have 1313system, fontsets are defined within Emacs itself. Once you have
1284defined a fontset, you can use it within Emacs by specifying its name, 1314defined a fontset, you can use it within Emacs by specifying its name,
1285anywhere that you could use a single font. Of course, Emacs fontsets 1315anywhere that you could use a single font. Of course, Emacs fontsets
1286can use only the fonts that the system supports; if certain characters 1316can use only the fonts that the system supports. If some characters
1287appear on the screen as hollow boxes, this means that the fontset in 1317appear on the screen as empty boxes or hex codes, this means that the
1288use for them has no font for those characters.@footnote{The Emacs 1318fontset in use for them has no font for those characters. In this
1289installation instructions have information on additional font 1319case, or if the characters are shown, but not as well as you would
1290support.} 1320like, you may need to install extra fonts. Your operating system may
1321have optional fonts that you can install; or you can install the GNU
1322Intlfonts package, which includes fonts for most supported
1323scripts.@footnote{If you run Emacs on X, you may need to inform the X
1324server about the location of the newly installed fonts with commands
1325such as:
1326@c FIXME? I feel like this may be out of date.
1327@c Eg the intlfonts tarfile is ~ 10 years old.
1328
1329@example
1330 xset fp+ /usr/local/share/emacs/fonts
1331 xset fp rehash
1332@end example
1333}
1291 1334
1292 Emacs creates three fontsets automatically: the @dfn{standard 1335 Emacs creates three fontsets automatically: the @dfn{standard
1293fontset}, the @dfn{startup fontset} and the @dfn{default fontset}. 1336fontset}, the @dfn{startup fontset} and the @dfn{default fontset}.
1337@c FIXME? The doc of *standard*-fontset-spec says:
1338@c "You have the biggest chance to display international characters
1339@c with correct glyphs by using the *standard* fontset." (my emphasis)
1294The default fontset is most likely to have fonts for a wide variety of 1340The default fontset is most likely to have fonts for a wide variety of
1295non-@acronym{ASCII} characters and is the default fallback for the 1341non-@acronym{ASCII} characters, and is the default fallback for the
1296other two fontsets, and if you set a default font rather than fontset. 1342other two fontsets, and if you set a default font rather than fontset.
1297However it does not specify font family names, so results can be 1343However, it does not specify font family names, so results can be
1298somewhat random if you use it directly. You can specify use of a 1344somewhat random if you use it directly. You can specify use of a
1299specific fontset with the @samp{-fn} option. For example, 1345particular fontset by starting Emacs with the @samp{-fn} option.
1346For example,
1300 1347
1301@example 1348@example
1302emacs -fn fontset-standard 1349emacs -fn fontset-standard
@@ -1335,10 +1382,12 @@ of @code{standard-fontset-spec}. This fontset's name is
1335@noindent 1382@noindent
1336or just @samp{fontset-standard} for short. 1383or just @samp{fontset-standard} for short.
1337 1384
1338 On GNUstep and Mac, fontset-standard is created using the value of 1385 On GNUstep and Mac OS X, the standard fontset is created using the value of
1339@code{ns-standard-fontset-spec}, and on Windows it is 1386@code{ns-standard-fontset-spec}, and on MS Windows it is
1340created using the value of @code{w32-standard-fontset-spec}. 1387created using the value of @code{w32-standard-fontset-spec}.
1341 1388
1389@c FIXME? How does one access these, or do anything with them?
1390@c Does it matter?
1342 Bold, italic, and bold-italic variants of the standard fontset are 1391 Bold, italic, and bold-italic variants of the standard fontset are
1343created automatically. Their names have @samp{bold} instead of 1392created automatically. Their names have @samp{bold} instead of
1344@samp{medium}, or @samp{i} instead of @samp{r}, or both. 1393@samp{medium}, or @samp{i} instead of @samp{r}, or both.
@@ -1353,8 +1402,15 @@ started. This is the @dfn{startup fontset} and its name is
1353@var{charset_encoding} field with @samp{startup}, then using the 1402@var{charset_encoding} field with @samp{startup}, then using the
1354resulting string to specify a fontset. 1403resulting string to specify a fontset.
1355 1404
1356 For instance, if you start Emacs this way, 1405 For instance, if you start Emacs with a font of this form,
1357 1406
1407@c FIXME? I think this is a little misleading, because you cannot (?)
1408@c actually specify a font with wildcards, it has to be a complete spec.
1409@c Also, an X font specification of this form hasn't (?) been
1410@c mentioned before now, and is somewhat obsolete these days.
1411@c People are more likely to use a form like
1412@c emacs -fn "DejaVu Sans Mono-12"
1413@c How does any of this apply in that case?
1358@example 1414@example
1359emacs -fn "*courier-medium-r-normal--14-140-*-iso8859-1" 1415emacs -fn "*courier-medium-r-normal--14-140-*-iso8859-1"
1360@end example 1416@end example
@@ -1367,8 +1423,8 @@ window frame:
1367-*-courier-medium-r-normal-*-14-140-*-*-*-*-fontset-startup 1423-*-courier-medium-r-normal-*-14-140-*-*-*-*-fontset-startup
1368@end example 1424@end example
1369 1425
1370 The startup fontset will use the font that you specify or a variant 1426 The startup fontset will use the font that you specify, or a variant
1371with a different registry and encoding for all the characters which 1427with a different registry and encoding, for all the characters that
1372are supported by that font, and fallback on @samp{fontset-default} for 1428are supported by that font, and fallback on @samp{fontset-default} for
1373other characters. 1429other characters.
1374 1430
@@ -1376,7 +1432,8 @@ other characters.
1376just like an actual font name. But be careful not to specify a fontset 1432just like an actual font name. But be careful not to specify a fontset
1377name in a wildcard resource like @samp{Emacs*Font}---that wildcard 1433name in a wildcard resource like @samp{Emacs*Font}---that wildcard
1378specification matches various other resources, such as for menus, and 1434specification matches various other resources, such as for menus, and
1379menus cannot handle fontsets. 1435@c FIXME is this still true?
1436menus cannot handle fontsets. @xref{X Resources}.
1380 1437
1381 You can specify additional fontsets using X resources named 1438 You can specify additional fontsets using X resources named
1382@samp{Fontset-@var{n}}, where @var{n} is an integer starting from 0. 1439@samp{Fontset-@var{n}}, where @var{n} is an integer starting from 0.
@@ -1387,7 +1444,8 @@ The resource value should have this form:
1387@end smallexample 1444@end smallexample
1388 1445
1389@noindent 1446@noindent
1390@var{fontpattern} should have the form of a standard X font name, except 1447@var{fontpattern} should have the form of a standard X font name (see
1448the previous fontset-startup example), except
1391for the last two fields. They should have the form 1449for the last two fields. They should have the form
1392@samp{fontset-@var{alias}}. 1450@samp{fontset-@var{alias}}.
1393 1451
@@ -1409,7 +1467,7 @@ that describe the character set. For the @acronym{ASCII} character font,
1409 In addition, when several consecutive fields are wildcards, Emacs 1467 In addition, when several consecutive fields are wildcards, Emacs
1410collapses them into a single wildcard. This is to prevent use of 1468collapses them into a single wildcard. This is to prevent use of
1411auto-scaled fonts. Fonts made by scaling larger fonts are not usable 1469auto-scaled fonts. Fonts made by scaling larger fonts are not usable
1412for editing, and scaling a smaller font is not useful because it is 1470for editing, and scaling a smaller font is not also useful, because it is
1413better to use the smaller font in its own size, which is what Emacs 1471better to use the smaller font in its own size, which is what Emacs
1414does. 1472does.
1415 1473
@@ -1435,8 +1493,8 @@ and the font specification for Chinese GB2312 characters would be this:
1435 1493
1436 You may not have any Chinese font matching the above font 1494 You may not have any Chinese font matching the above font
1437specification. Most X distributions include only Chinese fonts that 1495specification. Most X distributions include only Chinese fonts that
1438have @samp{song ti} or @samp{fangsong ti} in @var{family} field. In 1496have @samp{song ti} or @samp{fangsong ti} in the @var{family} field. In
1439such a case, @samp{Fontset-@var{n}} can be specified as below: 1497such a case, @samp{Fontset-@var{n}} can be specified as:
1440 1498
1441@smallexample 1499@smallexample
1442Emacs.Fontset-0: -*-fixed-medium-r-normal-*-24-*-*-*-*-*-fontset-24,\ 1500Emacs.Fontset-0: -*-fixed-medium-r-normal-*-24-*-*-*-*-*-fontset-24,\
@@ -1470,8 +1528,8 @@ script.
1470 1528
1471Fontsets can be modified using the function @code{set-fontset-font}, 1529Fontsets can be modified using the function @code{set-fontset-font},
1472specifying a character, a charset, a script, or a range of characters 1530specifying a character, a charset, a script, or a range of characters
1473to modify the font for, and a font-spec for the font to be used. Some 1531to modify the font for, and a font specification for the font to be
1474examples are: 1532used. Some examples are:
1475 1533
1476@example 1534@example
1477;; Use Liberation Mono for latin-3 charset. 1535;; Use Liberation Mono for latin-3 charset.
@@ -1498,10 +1556,10 @@ examples are:
1498@node Undisplayable Characters 1556@node Undisplayable Characters
1499@section Undisplayable Characters 1557@section Undisplayable Characters
1500 1558
1501 There may be a some non-@acronym{ASCII} characters that your terminal cannot 1559 There may be some non-@acronym{ASCII} characters that your
1502display. Most text-only terminals support just a single character 1560terminal cannot display. Most text terminals support just a single
1503set (use the variable @code{default-terminal-coding-system} 1561character set (use the variable @code{default-terminal-coding-system}
1504(@pxref{Terminal Coding}) to tell Emacs which one); characters which 1562to tell Emacs which one, @ref{Terminal Coding}); characters that
1505can't be encoded in that coding system are displayed as @samp{?} by 1563can't be encoded in that coding system are displayed as @samp{?} by
1506default. 1564default.
1507 1565
@@ -1533,17 +1591,15 @@ the range 0240 to 0377 octal (160 to 255 decimal) to handle the
1533accented letters and punctuation needed by various European languages 1591accented letters and punctuation needed by various European languages
1534(and some non-European ones). Note that Emacs considers bytes with 1592(and some non-European ones). Note that Emacs considers bytes with
1535codes in this range as raw bytes, not as characters, even in a unibyte 1593codes in this range as raw bytes, not as characters, even in a unibyte
1536session, i.e.@: if you disable multibyte characters. However, Emacs 1594buffer, i.e.@: if you disable multibyte characters. However, Emacs
1537can still handle these character codes as if they belonged to 1595can still handle these character codes as if they belonged to
1538@emph{one} of the single-byte character sets at a time. To specify 1596@emph{one} of the single-byte character sets at a time. To specify
1539@emph{which} of these codes to use, invoke @kbd{M-x 1597@emph{which} of these codes to use, invoke @kbd{M-x
1540set-language-environment} and specify a suitable language environment 1598set-language-environment} and specify a suitable language environment
1541such as @samp{Latin-@var{n}}. 1599such as @samp{Latin-@var{n}}.
1542 1600
1543 For more information about unibyte operation, see @ref{Enabling 1601 For more information about unibyte operation, see
1544Multibyte}. Note particularly that you probably want to ensure that 1602@ref{Disabling Multibyte}.
1545your initialization files are read as unibyte if they contain
1546non-@acronym{ASCII} characters.
1547 1603
1548@vindex unibyte-display-via-language-environment 1604@vindex unibyte-display-via-language-environment
1549 Emacs can also display bytes in the range 160 to 255 as readable 1605 Emacs can also display bytes in the range 160 to 255 as readable
@@ -1562,8 +1618,8 @@ them as raw bytes, not as characters.
1562set, Emacs can display these characters as @acronym{ASCII} sequences which at 1618set, Emacs can display these characters as @acronym{ASCII} sequences which at
1563least give you a clear idea of what the characters are. To do this, 1619least give you a clear idea of what the characters are. To do this,
1564load the library @code{iso-ascii}. Similar libraries for other 1620load the library @code{iso-ascii}. Similar libraries for other
1565Latin-@var{n} character sets could be implemented, but we don't have 1621Latin-@var{n} character sets could be implemented, but have not been
1566them yet. 1622so far.
1567 1623
1568@findex standard-display-8bit 1624@findex standard-display-8bit
1569@cindex 8-bit display 1625@cindex 8-bit display
@@ -1587,9 +1643,9 @@ If your keyboard can generate character codes 128 (decimal) and up,
1587representing non-@acronym{ASCII} characters, you can type those character codes 1643representing non-@acronym{ASCII} characters, you can type those character codes
1588directly. 1644directly.
1589 1645
1590On a graphical display, you should not need to do anything special to use 1646On a graphical display, you should not need to do anything special to
1591these keys; they should simply work. On a text-only terminal, you 1647use these keys; they should simply work. On a text terminal, you
1592should use the command @code{M-x set-keyboard-coding-system} or the 1648should use the command @code{M-x set-keyboard-coding-system} or customize the
1593variable @code{keyboard-coding-system} to specify which coding system 1649variable @code{keyboard-coding-system} to specify which coding system
1594your keyboard uses (@pxref{Terminal Coding}). Enabling this feature 1650your keyboard uses (@pxref{Terminal Coding}). Enabling this feature
1595will probably require you to use @kbd{ESC} to type Meta characters; 1651will probably require you to use @kbd{ESC} to type Meta characters;
@@ -1613,7 +1669,7 @@ a key sequence is allowed.
1613library is loaded, the @key{ALT} modifier key, if the keyboard has 1669library is loaded, the @key{ALT} modifier key, if the keyboard has
1614one, serves the same purpose as @kbd{C-x 8}: use @key{ALT} together 1670one, serves the same purpose as @kbd{C-x 8}: use @key{ALT} together
1615with an accent character to modify the following letter. In addition, 1671with an accent character to modify the following letter. In addition,
1616if the keyboard has keys for the Latin-1 ``dead accent characters,'' 1672if the keyboard has keys for the Latin-1 ``dead accent characters'',
1617they too are defined to compose with the following character, once 1673they too are defined to compose with the following character, once
1618@code{iso-transl} is loaded. 1674@code{iso-transl} is loaded.
1619 1675
@@ -1657,8 +1713,9 @@ internal representation within Emacs.
1657@findex list-character-sets 1713@findex list-character-sets
1658 @kbd{M-x list-character-sets} displays a list of all supported 1714 @kbd{M-x list-character-sets} displays a list of all supported
1659charsets. The list gives the names of charsets and additional 1715charsets. The list gives the names of charsets and additional
1660information to identity each charset (see 1716information to identity each charset; see the
1661@url{http://www.itscj.ipsj.or.jp/ISO-IR/} for details). In this list, 1717@url{http://www.itscj.ipsj.or.jp/ISO-IR/, International Register of
1718Coded Character Sets} for more details. In this list,
1662charsets are divided into two categories: @dfn{normal charsets} are 1719charsets are divided into two categories: @dfn{normal charsets} are
1663listed first, followed by @dfn{supplementary charsets}. A 1720listed first, followed by @dfn{supplementary charsets}. A
1664supplementary charset is one that is used to define another charset 1721supplementary charset is one that is used to define another charset
@@ -1678,8 +1735,8 @@ Chars}).
1678Hebrew, whose natural ordering of horizontal text for display is from 1735Hebrew, whose natural ordering of horizontal text for display is from
1679right to left. However, digits and Latin text embedded in these 1736right to left. However, digits and Latin text embedded in these
1680scripts are still displayed left to right. It is also not uncommon to 1737scripts are still displayed left to right. It is also not uncommon to
1681have small portions of text in Arabic or Hebrew embedded in otherwise 1738have small portions of text in Arabic or Hebrew embedded in an otherwise
1682Latin document, e.g., as comments and strings in a program source 1739Latin document; e.g., as comments and strings in a program source
1683file. For these reasons, text that uses these scripts is actually 1740file. For these reasons, text that uses these scripts is actually
1684@dfn{bidirectional}: a mixture of runs of left-to-right and 1741@dfn{bidirectional}: a mixture of runs of left-to-right and
1685right-to-left characters. 1742right-to-left characters.
@@ -1707,6 +1764,7 @@ directionality when they are displayed. The default value is
1707 1764
1708 Each paragraph of bidirectional text can have its own @dfn{base 1765 Each paragraph of bidirectional text can have its own @dfn{base
1709direction}, either right-to-left or left-to-right. (Paragraph 1766direction}, either right-to-left or left-to-right. (Paragraph
1767@c paragraph-separate etc have no influence on this?
1710boundaries are empty lines, i.e.@: lines consisting entirely of 1768boundaries are empty lines, i.e.@: lines consisting entirely of
1711whitespace characters.) Text in left-to-right paragraphs begins at 1769whitespace characters.) Text in left-to-right paragraphs begins at
1712the left margin of the window and is truncated or continued when it 1770the left margin of the window and is truncated or continued when it
@@ -1743,5 +1801,5 @@ commands move point in the logical order, so the cursor will sometimes
1743jump when point traverses reordered bidirectional text. Similarly, a 1801jump when point traverses reordered bidirectional text. Similarly, a
1744highlighted region covering a contiguous range of character positions 1802highlighted region covering a contiguous range of character positions
1745may look discontinuous if the region spans reordered text. This is 1803may look discontinuous if the region spans reordered text. This is
1746normal and similar to behavior of other programs that support 1804normal and similar to the behavior of other programs that support
1747bidirectional text. 1805bidirectional text.
diff --git a/doc/emacs/package.texi b/doc/emacs/package.texi
index 91b25cfa00e..4435590536f 100644
--- a/doc/emacs/package.texi
+++ b/doc/emacs/package.texi
@@ -14,7 +14,7 @@ Emacs includes a facility that lets you easily download and install
14separate Emacs Lisp program, sometimes including other components such 14separate Emacs Lisp program, sometimes including other components such
15as an Info manual. 15as an Info manual.
16 16
17 @kbd{M-x list-packages} brings up a buffer named @samp{*Packages*} 17 @kbd{M-x list-packages} brings up a buffer named @file{*Packages*}
18with a list of all packages. You can install or uninstall packages 18with a list of all packages. You can install or uninstall packages
19via this buffer. @xref{Package Menu}. 19via this buffer. @xref{Package Menu}.
20 20
diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi
index 8217400663f..5f7abcf3881 100644
--- a/doc/emacs/programs.texi
+++ b/doc/emacs/programs.texi
@@ -1130,7 +1130,7 @@ prompts for a topic, with completion (@pxref{Completion}), and runs
1130the @command{man} program to format the corresponding man page. If 1130the @command{man} program to format the corresponding man page. If
1131the system permits, it runs @command{man} asynchronously, so that you 1131the system permits, it runs @command{man} asynchronously, so that you
1132can keep on editing while the page is being formatted. The result 1132can keep on editing while the page is being formatted. The result
1133goes in a buffer named @samp{*Man @var{topic}*}. These buffers use a 1133goes in a buffer named @file{*Man @var{topic}*}. These buffers use a
1134special major mode, Man mode, that facilitates scrolling and jumping 1134special major mode, Man mode, that facilitates scrolling and jumping
1135to other manual pages. For details, type @kbd{C-h m} while in a Man 1135to other manual pages. For details, type @kbd{C-h m} while in a Man
1136mode buffer. 1136mode buffer.
@@ -1165,7 +1165,7 @@ command. Unlike @kbd{M-x man}, it does not run any external programs
1165to format and display the man pages; the formatting is done by Emacs, 1165to format and display the man pages; the formatting is done by Emacs,
1166so it works on systems such as MS-Windows where the @command{man} 1166so it works on systems such as MS-Windows where the @command{man}
1167program may be unavailable. It prompts for a man page, and displays 1167program may be unavailable. It prompts for a man page, and displays
1168it in a buffer named @samp{*WoMan @var{section} @var{topic}}. 1168it in a buffer named @file{*WoMan @var{section} @var{topic}}.
1169 1169
1170 @kbd{M-x woman} computes the completion list for manpages the first 1170 @kbd{M-x woman} computes the completion list for manpages the first
1171time you invoke the command. With a numeric argument, it recomputes 1171time you invoke the command. With a numeric argument, it recomputes
@@ -1705,7 +1705,7 @@ inserted on that line, and any @samp{\} there is deleted.
1705@cindex preprocessor highlighting 1705@cindex preprocessor highlighting
1706@findex cpp-highlight-buffer 1706@findex cpp-highlight-buffer
1707Highlight parts of the text according to its preprocessor conditionals. 1707Highlight parts of the text according to its preprocessor conditionals.
1708This command displays another buffer named @samp{*CPP Edit*}, which 1708This command displays another buffer named @file{*CPP Edit*}, which
1709serves as a graphic menu for selecting how to display particular kinds 1709serves as a graphic menu for selecting how to display particular kinds
1710of conditionals and their contents. After changing various settings, 1710of conditionals and their contents. After changing various settings,
1711click on @samp{[A]pply these settings} (or go to that buffer and type 1711click on @samp{[A]pply these settings} (or go to that buffer and type
diff --git a/doc/emacs/screen.texi b/doc/emacs/screen.texi
index fe3222e198f..fbea52523ba 100644
--- a/doc/emacs/screen.texi
+++ b/doc/emacs/screen.texi
@@ -8,12 +8,12 @@
8@cindex frame 8@cindex frame
9 9
10 On a graphical display, such as on GNU/Linux using the X Window 10 On a graphical display, such as on GNU/Linux using the X Window
11System, Emacs occupies a ``graphical window''. On a text-only 11System, Emacs occupies a ``graphical window''. On a text terminal,
12terminal, Emacs occupies the entire terminal screen. We will use the 12Emacs occupies the entire terminal screen. We will use the term
13term @dfn{frame} to mean a graphical window or terminal screen 13@dfn{frame} to mean a graphical window or terminal screen occupied by
14occupied by Emacs. Emacs behaves very similarly on both kinds of 14Emacs. Emacs behaves very similarly on both kinds of frames. It
15frames. It normally starts out with just one frame, but you can 15normally starts out with just one frame, but you can create additional
16create additional frames if you wish (@pxref{Frames}). 16frames if you wish (@pxref{Frames}).
17 17
18 Each frame consists of several distinct regions. At the top of the 18 Each frame consists of several distinct regions. At the top of the
19frame is a @dfn{menu bar}, which allows you to access commands via a 19frame is a @dfn{menu bar}, which allows you to access commands via a
@@ -131,15 +131,15 @@ Commands that take a long time often display messages ending in
131progress has been made, as a percentage), and add @samp{done} when 131progress has been made, as a percentage), and add @samp{done} when
132they are finished. 132they are finished.
133 133
134@cindex @samp{*Messages*} buffer 134@cindex @file{*Messages*} buffer
135@cindex saved echo area messages 135@cindex saved echo area messages
136@cindex messages saved from echo area 136@cindex messages saved from echo area
137@vindex message-log-max 137@vindex message-log-max
138 Informative echo area messages are saved in a special buffer named 138 Informative echo area messages are saved in a special buffer named
139@samp{*Messages*}. (We have not explained buffers yet; see 139@file{*Messages*}. (We have not explained buffers yet; see
140@ref{Buffers}, for more information about them.) If you miss a 140@ref{Buffers}, for more information about them.) If you miss a
141message that appeared briefly on the screen, you can switch to the 141message that appeared briefly on the screen, you can switch to the
142@samp{*Messages*} buffer to see it again. The @samp{*Messages*} 142@file{*Messages*} buffer to see it again. The @file{*Messages*}
143buffer is limited to a certain number of lines, specified by the 143buffer is limited to a certain number of lines, specified by the
144variable @code{message-log-max}. (We have not explained variables 144variable @code{message-log-max}. (We have not explained variables
145either; see @ref{Variables}, for more information about them.) Beyond 145either; see @ref{Variables}, for more information about them.) Beyond
@@ -178,7 +178,7 @@ unselected windows, in order to make it stand out.
178@end example 178@end example
179 179
180@noindent 180@noindent
181On a text-only terminal, this text is followed by a series of dashes 181On a text terminal, this text is followed by a series of dashes
182extending to the right edge of the window. These dashes are omitted 182extending to the right edge of the window. These dashes are omitted
183on a graphical display. 183on a graphical display.
184 184
@@ -195,7 +195,7 @@ means no conversion whatsoever, and is usually used for files
195containing non-textual data. Other characters represent various 195containing non-textual data. Other characters represent various
196@dfn{coding systems}---for example, @samp{1} represents ISO Latin-1. 196@dfn{coding systems}---for example, @samp{1} represents ISO Latin-1.
197 197
198 On a text-only terminal, @var{cs} is preceded by two additional 198 On a text terminal, @var{cs} is preceded by two additional
199characters that describe the coding systems for keyboard input and 199characters that describe the coding systems for keyboard input and
200terminal output. Furthermore, if you are using an input method, 200terminal output. Furthermore, if you are using an input method,
201@var{cs} is preceded by a string that identifies the input method 201@var{cs} is preceded by a string that identifies the input method
@@ -228,7 +228,7 @@ However, if the default-directory for the current buffer is on a
228remote machine, @samp{@@} is displayed instead (@pxref{File Names}). 228remote machine, @samp{@@} is displayed instead (@pxref{File Names}).
229 229
230 @var{fr} gives the selected frame name (@pxref{Frames}). It appears 230 @var{fr} gives the selected frame name (@pxref{Frames}). It appears
231only on text-only terminals. The initial frame's name is @samp{F1}. 231only on text terminals. The initial frame's name is @samp{F1}.
232 232
233 @var{buf} is the name of the buffer displayed in the window. 233 @var{buf} is the name of the buffer displayed in the window.
234Usually, this is the same as the name of a file you are editing. 234Usually, this is the same as the name of a file you are editing.
@@ -307,13 +307,12 @@ You can then navigate the menus with the arrow keys. To activate a
307selected menu item, press @key{RET}; to cancel menu navigation, press 307selected menu item, press @key{RET}; to cancel menu navigation, press
308@key{ESC}. 308@key{ESC}.
309 309
310 On a text-only terminal, you can use the menu bar by typing 310 On a text terminal, you can use the menu bar by typing @kbd{M-`} or
311@kbd{M-`} or @key{F10} (these run the command @code{tmm-menubar}). 311@key{F10} (these run the command @code{tmm-menubar}). This lets you
312This lets you select a menu item with the keyboard. A provisional 312select a menu item with the keyboard. A provisional choice appears in
313choice appears in the echo area. You can use the up and down arrow 313the echo area. You can use the up and down arrow keys to move through
314keys to move through the menu to different items, and then you can 314the menu to different items, and then you can type @key{RET} to select
315type @key{RET} to select the item. Each menu item is also designated 315the item. Each menu item is also designated by a letter or digit
316by a letter or digit (usually the initial of some word in the item's 316(usually the initial of some word in the item's name). This letter or
317name). This letter or digit is separated from the item name by 317digit is separated from the item name by @samp{=>}. You can type the
318@samp{=>}. You can type the item's letter or digit to select the 318item's letter or digit to select the item.
319item.
diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi
index 877e291ff36..38f00f03532 100644
--- a/doc/emacs/search.texi
+++ b/doc/emacs/search.texi
@@ -1308,7 +1308,7 @@ displayed before and after each matching line.
1308@kindex RET @r{(Occur mode)} 1308@kindex RET @r{(Occur mode)}
1309@kindex o @r{(Occur mode)} 1309@kindex o @r{(Occur mode)}
1310@kindex C-o @r{(Occur mode)} 1310@kindex C-o @r{(Occur mode)}
1311In the @samp{*Occur*} buffer, you can click on each entry, or move 1311In the @file{*Occur*} buffer, you can click on each entry, or move
1312point there and type @key{RET}, to visit the corresponding position in 1312point there and type @key{RET}, to visit the corresponding position in
1313the buffer that was searched. @kbd{o} and @kbd{C-o} display the match 1313the buffer that was searched. @kbd{o} and @kbd{C-o} display the match
1314in another window; @kbd{C-o} does not select it. Alternatively, you 1314in another window; @kbd{C-o} does not select it. Alternatively, you
@@ -1317,7 +1317,7 @@ occurrences one by one (@pxref{Compilation Mode}).
1317 1317
1318@cindex Occur Edit mode 1318@cindex Occur Edit mode
1319@cindex mode, Occur Edit 1319@cindex mode, Occur Edit
1320Typing @kbd{e} in the @samp{*Occur*} buffer switches to Occur Edit 1320Typing @kbd{e} in the @file{*Occur*} buffer switches to Occur Edit
1321mode, in which edits made to the entries are also applied to the text 1321mode, in which edits made to the entries are also applied to the text
1322in the originating buffer. Type @kbd{C-c C-c} to return to Occur 1322in the originating buffer. Type @kbd{C-c C-c} to return to Occur
1323mode. 1323mode.
diff --git a/doc/emacs/sending.texi b/doc/emacs/sending.texi
index 5e80eb10824..bf2b41cdbe0 100644
--- a/doc/emacs/sending.texi
+++ b/doc/emacs/sending.texi
@@ -12,7 +12,7 @@
12@kindex C-x m 12@kindex C-x m
13@findex compose-mail 13@findex compose-mail
14 To send an email message from Emacs, type @kbd{C-x m}. This 14 To send an email message from Emacs, type @kbd{C-x m}. This
15switches to a buffer named @samp{*unsent mail*}, where you can edit 15switches to a buffer named @file{*unsent mail*}, where you can edit
16the text and headers of the message. When done, type @kbd{C-c C-s} or 16the text and headers of the message. When done, type @kbd{C-c C-s} or
17@kbd{C-c C-c} to send it. 17@kbd{C-c C-c} to send it.
18 18
@@ -306,7 +306,7 @@ completion, and inserts its definition at point.
306@cindex Message mode 306@cindex Message mode
307@cindex mode, Message 307@cindex mode, Message
308 308
309 The default major mode for the @samp{*mail*} buffer is called 309 The default major mode for the @file{*mail*} buffer is called
310Message mode. It behaves like Text mode in many ways, but provides 310Message mode. It behaves like Text mode in many ways, but provides
311several additional commands on the @kbd{C-c} prefix, which make 311several additional commands on the @kbd{C-c} prefix, which make
312editing a message more convenient. 312editing a message more convenient.
diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi
index 5363da7d649..e56b00e2723 100644
--- a/doc/emacs/text.texi
+++ b/doc/emacs/text.texi
@@ -1548,7 +1548,7 @@ text that belongs inside. Afterward, use the command @kbd{C-c @}}
1548point, and inserts two newlines to start a new paragraph. It outputs 1548point, and inserts two newlines to start a new paragraph. It outputs
1549a message in the echo area if any mismatch is found. @kbd{M-x 1549a message in the echo area if any mismatch is found. @kbd{M-x
1550tex-validate-region} checks a region, paragraph by paragraph. The 1550tex-validate-region} checks a region, paragraph by paragraph. The
1551errors are listed in an @samp{*Occur*} buffer; you can use the usual 1551errors are listed in an @file{*Occur*} buffer; you can use the usual
1552Occur mode commands in that buffer, such as @kbd{C-c C-c}, to visit a 1552Occur mode commands in that buffer, such as @kbd{C-c C-c}, to visit a
1553particular mismatch (@pxref{Other Repeating Search}). 1553particular mismatch (@pxref{Other Repeating Search}).
1554 1554
@@ -1694,7 +1694,7 @@ name with @samp{*} in the command string. For example,
1694@findex tex-recenter-output-buffer 1694@findex tex-recenter-output-buffer
1695@kindex C-c C-l @r{(@TeX{} mode)} 1695@kindex C-c C-l @r{(@TeX{} mode)}
1696 The terminal output from @TeX{}, including any error messages, 1696 The terminal output from @TeX{}, including any error messages,
1697appears in a buffer called @samp{*tex-shell*}. If @TeX{} gets an 1697appears in a buffer called @file{*tex-shell*}. If @TeX{} gets an
1698error, you can switch to this buffer and feed it input (this works as 1698error, you can switch to this buffer and feed it input (this works as
1699in Shell mode; @pxref{Interactive Shell}). Without switching to this 1699in Shell mode; @pxref{Interactive Shell}). Without switching to this
1700buffer you can scroll it so that its last line is visible by typing 1700buffer you can scroll it so that its last line is visible by typing
diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi
index 1b3f1419af4..b118295ab1a 100644
--- a/doc/emacs/trouble.texi
+++ b/doc/emacs/trouble.texi
@@ -172,20 +172,19 @@ used to delete forwards. If this key deletes backward in Emacs, that
172too suggests Emacs got the wrong information---but in the opposite 172too suggests Emacs got the wrong information---but in the opposite
173sense. 173sense.
174 174
175 On a text-only terminal, if you find that @key{Backspace} prompts 175 On a text terminal, if you find that @key{Backspace} prompts for a
176for a Help command, like @kbd{Control-h}, instead of deleting a 176Help command, like @kbd{Control-h}, instead of deleting a character,
177character, it means that key is actually sending the @key{BS} 177it means that key is actually sending the @key{BS} character. Emacs
178character. Emacs ought to be treating @key{BS} as @key{DEL}, but it 178ought to be treating @key{BS} as @key{DEL}, but it isn't.
179isn't.
180 179
181@findex normal-erase-is-backspace-mode 180@findex normal-erase-is-backspace-mode
182 In all of those cases, the immediate remedy is the same: use the 181 In all of those cases, the immediate remedy is the same: use the
183command @kbd{M-x normal-erase-is-backspace-mode}. This toggles 182command @kbd{M-x normal-erase-is-backspace-mode}. This toggles
184between the two modes that Emacs supports for handling @key{DEL}, so 183between the two modes that Emacs supports for handling @key{DEL}, so
185if Emacs starts in the wrong mode, this should switch to the right 184if Emacs starts in the wrong mode, this should switch to the right
186mode. On a text-only terminal, if you want to ask for help when 185mode. On a text terminal, if you want to ask for help when @key{BS}
187@key{BS} is treated as @key{DEL}, use @key{F1}; @kbd{C-?} may also 186is treated as @key{DEL}, use @key{F1}; @kbd{C-?} may also work, if it
188work, if it sends character code 127. 187sends character code 127.
189 188
190 To fix the problem in every Emacs session, put one of the following 189 To fix the problem in every Emacs session, put one of the following
191lines into your initialization file (@pxref{Init File}). For the 190lines into your initialization file (@pxref{Init File}). For the
@@ -327,8 +326,8 @@ not make a backup of its old contents.
327@node Emergency Escape 326@node Emergency Escape
328@subsection Emergency Escape 327@subsection Emergency Escape
329 328
330 On text-only terminals, the @dfn{emergency escape} feature suspends 329 On text terminals, the @dfn{emergency escape} feature suspends Emacs
331Emacs immediately if you type @kbd{C-g} a second time before Emacs can 330immediately if you type @kbd{C-g} a second time before Emacs can
332actually respond to the first one by quitting. This is so you can 331actually respond to the first one by quitting. This is so you can
333always get out of GNU Emacs no matter how badly it might be hung. 332always get out of GNU Emacs no matter how badly it might be hung.
334When things are working properly, Emacs recognizes and handles the 333When things are working properly, Emacs recognizes and handles the
@@ -636,7 +635,7 @@ Emacs, so you will have to report the bug somewhere else.
636The type of machine you are using, and the operating system name and 635The type of machine you are using, and the operating system name and
637version number (again, automatically included by @kbd{M-x 636version number (again, automatically included by @kbd{M-x
638report-emacs-bug}). @kbd{M-x emacs-version @key{RET}} provides this 637report-emacs-bug}). @kbd{M-x emacs-version @key{RET}} provides this
639information too. Copy its output from the @samp{*Messages*} buffer, 638information too. Copy its output from the @file{*Messages*} buffer,
640so that you get it all and get it accurately. 639so that you get it all and get it accurately.
641 640
642@item 641@item
@@ -699,7 +698,7 @@ The way to collect the terminal output is to execute the Lisp expression
699@end example 698@end example
700 699
701@noindent 700@noindent
702using @kbd{M-:} or from the @samp{*scratch*} buffer just after 701using @kbd{M-:} or from the @file{*scratch*} buffer just after
703starting Emacs. From then on, Emacs copies all terminal output to the 702starting Emacs. From then on, Emacs copies all terminal output to the
704specified termscript file as well, until the Emacs process is killed. 703specified termscript file as well, until the Emacs process is killed.
705If the problem happens when Emacs starts up, put this expression into 704If the problem happens when Emacs starts up, put this expression into
@@ -725,10 +724,10 @@ Alternatively, use the @command{locale} command, if your system has it,
725to display your locale settings. 724to display your locale settings.
726 725
727You can use the @kbd{M-!} command to execute these commands from 726You can use the @kbd{M-!} command to execute these commands from
728Emacs, and then copy the output from the @samp{*Messages*} buffer into 727Emacs, and then copy the output from the @file{*Messages*} buffer into
729the bug report. Alternatively, @kbd{M-x getenv @key{RET} LC_ALL 728the bug report. Alternatively, @kbd{M-x getenv @key{RET} LC_ALL
730@key{RET}} will display the value of @code{LC_ALL} in the echo area, and 729@key{RET}} will display the value of @code{LC_ALL} in the echo area, and
731you can copy its output from the @samp{*Messages*} buffer. 730you can copy its output from the @file{*Messages*} buffer.
732 731
733@item 732@item
734A description of what behavior you observe that you believe is 733A description of what behavior you observe that you believe is
@@ -761,7 +760,7 @@ important to report the precise text of the error message, and a
761backtrace showing how the Lisp program in Emacs arrived at the error. 760backtrace showing how the Lisp program in Emacs arrived at the error.
762 761
763To get the error message text accurately, copy it from the 762To get the error message text accurately, copy it from the
764@samp{*Messages*} buffer into the bug report. Copy all of it, not just 763@file{*Messages*} buffer into the bug report. Copy all of it, not just
765part. 764part.
766 765
767@findex toggle-debug-on-error 766@findex toggle-debug-on-error
diff --git a/doc/emacs/windows.texi b/doc/emacs/windows.texi
index 3733eed3eca..ee0f0027454 100644
--- a/doc/emacs/windows.texi
+++ b/doc/emacs/windows.texi
@@ -36,8 +36,8 @@ has its own value of point.
36 At any time, one Emacs window is the @dfn{selected window}; the 36 At any time, one Emacs window is the @dfn{selected window}; the
37buffer this window is displaying is the current buffer. On graphical 37buffer this window is displaying is the current buffer. On graphical
38displays, the point is indicated by a solid blinking cursor in the 38displays, the point is indicated by a solid blinking cursor in the
39selected window, and by a hollow box in non-selected windows. On 39selected window, and by a hollow box in non-selected windows. On text
40text-only terminals, the cursor is drawn only in the selected window. 40terminals, the cursor is drawn only in the selected window.
41@xref{Cursor Display}. 41@xref{Cursor Display}.
42 42
43 Commands to move point affect the value of point for the selected 43 Commands to move point affect the value of point for the selected
diff --git a/doc/lispintro/ChangeLog b/doc/lispintro/ChangeLog
index adac111f5f9..d9ebf07952c 100644
--- a/doc/lispintro/ChangeLog
+++ b/doc/lispintro/ChangeLog
@@ -1,3 +1,7 @@
12012-04-14 Glenn Morris <rgm@gnu.org>
2
3 * Makefile.in: Replace non-portable use of $< in ordinary rules.
4
12012-02-28 Glenn Morris <rgm@gnu.org> 52012-02-28 Glenn Morris <rgm@gnu.org>
2 6
3 * emacs-lisp-intro.texi: Standardize possessive apostrophe usage. 7 * emacs-lisp-intro.texi: Standardize possessive apostrophe usage.
diff --git a/doc/lispintro/Makefile.in b/doc/lispintro/Makefile.in
index fa9a0a4037c..c638dd6135f 100644
--- a/doc/lispintro/Makefile.in
+++ b/doc/lispintro/Makefile.in
@@ -1,6 +1,6 @@
1#### Makefile for the Emacs Lisp Introduction manual 1#### Makefile for the Emacs Lisp Introduction manual
2 2
3# Copyright (C) 1994-1999, 2001-2012 Free Software Foundation, Inc. 3# Copyright (C) 1994-1999, 2001-2012 Free Software Foundation, Inc.
4 4
5# This file is part of GNU Emacs. 5# This file is part of GNU Emacs.
6 6
@@ -48,21 +48,22 @@ ps: emacs-lisp-intro.ps
48 48
49# The file name eintr must fit within 5 characters, to allow for 49# The file name eintr must fit within 5 characters, to allow for
50# -NN extensions to fit into DOS 8+3 limits without clashing. 50# -NN extensions to fit into DOS 8+3 limits without clashing.
51# Note: "<" is not portable in ordinary make rules.
51${infodir}/eintr: ${srcdir}/emacs-lisp-intro.texi 52${infodir}/eintr: ${srcdir}/emacs-lisp-intro.texi
52 $(mkinfodir) 53 $(mkinfodir)
53 $(MAKEINFO) $(MAKEINFO_OPTS) -o $@ $< 54 $(MAKEINFO) $(MAKEINFO_OPTS) -o $@ ${srcdir}/emacs-lisp-intro.texi
54 55
55emacs-lisp-intro.dvi: ${srcdir}/emacs-lisp-intro.texi 56emacs-lisp-intro.dvi: ${srcdir}/emacs-lisp-intro.texi
56 $(ENVADD) $(TEXI2DVI) $< 57 $(ENVADD) $(TEXI2DVI) ${srcdir}/emacs-lisp-intro.texi
57 58
58emacs-lisp-intro.ps: emacs-lisp-intro.dvi 59emacs-lisp-intro.ps: emacs-lisp-intro.dvi
59 $(DVIPS) -o $@ $< 60 $(DVIPS) -o $@ emacs-lisp-intro.dvi
60 61
61emacs-lisp-intro.pdf: ${srcdir}/emacs-lisp-intro.texi 62emacs-lisp-intro.pdf: ${srcdir}/emacs-lisp-intro.texi
62 $(ENVADD) $(TEXI2PDF) $< 63 $(ENVADD) $(TEXI2PDF) ${srcdir}/emacs-lisp-intro.texi
63 64
64emacs-lisp-intro.html: ${srcdir}/emacs-lisp-intro.texi 65emacs-lisp-intro.html: ${srcdir}/emacs-lisp-intro.texi
65 $(MAKEINFO) $(MAKEINFO_OPTS) --html -o $@ $< 66 $(MAKEINFO) $(MAKEINFO_OPTS) --html -o $@ ${srcdir}/emacs-lisp-intro.texi
66 67
67.PHONY: mostlyclean clean distclean maintainer-clean infoclean 68.PHONY: mostlyclean clean distclean maintainer-clean infoclean
68 69
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 81558bbd248..cc5660653f6 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,133 @@
12012-04-20 Chong Yidong <cyd@gnu.org>
2
3 * processes.texi (Asynchronous Processes): Mention nil argument to
4 start-process.
5
62012-04-20 Glenn Morris <rgm@gnu.org>
7
8 * minibuf.texi (Basic Completion): No need to describe obarrays here.
9 Don't mention obsolete `nospace' argument of all-completions.
10 (Minibuffer Completion, Completion Commands, Reading File Names)
11 (Completion Variables): Copyedits.
12 (Completion Commands): Mention parent keymaps.
13 Remove obsolete minibuffer-local-filename-must-match-map.
14 (High-Level Completion): Remove read-variable's almost
15 word-for-word duplication of read-command.
16 * elisp.texi, vol1.texi, vol2.texi, minibuf.texi (Completion):
17 Update "High-Level Completion" description.
18
19 * minibuf.texi (Minibuffers):
20 * elisp.texi, vol1.texi, vol2.texi: Fix minibuffer subsection order.
21
22 * minibuf.texi: Standardize metasyntactic variables ("history", etc).
23 Use Texinfo-recommended form of quote+punctuation.
24 (Intro to Minibuffers): First minibuffer is #1, not #0.
25 Mention minibuffer-inactive-mode.
26 (Text from Minibuffer): Copyedits.
27 (Minibuffer History, Programmed Completion): Fix @var usage.
28 (Object from Minibuffer): Remove overly pedantic para.
29 (Minibuffer History): Copyedits. Add face-name-history.
30 (Initial Input, Yes-or-No Queries, Multiple Queries)
31 (Minibuffer Windows, Minibuffer Misc): Copyedits.
32 (Yes-or-No Queries): Tweak example.
33 (Minibuffer Commands): Add next-complete-history-element.
34 (Minibuffer Misc): Mention minibuffer-message-timeout, and
35 minibuffer-inactive-mode.
36
37 * processes.texi (Serial Ports, Byte Packing, Bindat Spec)
38 (Bindat Functions): Copyedits.
39
402012-04-20 Christopher Schmidt <christopher@ch.ristopher.com>
41
42 * files.texi (Saving Buffers): Document `visit and `visit-save'
43 values of require-final-newline.
44
452012-04-20 Glenn Morris <rgm@gnu.org>
46
47 * processes.texi (Output from Processes, Filter Functions):
48 Mention waiting-for-user-input-p.
49 (Sentinels, Query Before Exit, System Processes, Transaction Queues):
50 (Network Servers, Datagrams, Network Processes, Network Options)
51 (Network Feature Testing, Serial Ports): Copyedits.
52 (Network): Add encrypted network overview paragraph.
53 Cross-reference the Emacs-GnuTLS manual. Use @acronym.
54
552012-04-20 Chong Yidong <cyd@gnu.org>
56
57 * help.texi (Keys in Documentation): Mention :advertised-binding.
58
59 * keymaps.texi (Menu Bar): Move most of the :advertised-binding
60 description to help.texi.
61
622012-04-20 Glenn Morris <rgm@gnu.org>
63
64 * processes.texi (Process Information, Input to Processes)
65 (Signals to Processes, Output from Processes, Process Buffers)
66 (Filter Functions, Decoding Output): Copyedits.
67 (Accepting Output): Discourage use of `millisec' argument.
68
692012-04-15 Glenn Morris <rgm@gnu.org>
70
71 * processes.texi (Processes, Subprocess Creation, Shell Arguments):
72 (Synchronous Processes, Asynchronous Processes, Deleting Processes):
73 Copyedits.
74 (Subprocess Creation): Discourage modifying exec-path directly.
75 (Synchronous Processes, Asynchronous Processes):
76 Update some example output.
77 (Process Information): Fix typo.
78 (Bindat Spec): Use Texinfo-recommended form of quote+punctuation.
79
802012-04-15 Glenn Morris <rgm@gnu.org>
81
82 * anti.texi (Antinews): Copyedits. Don't @dfn anything here.
83 open-network-stream does exist in Emacs 23, but is simpler.
84
852012-04-15 Chong Yidong <cyd@gnu.org>
86
87 * customize.texi (Custom Themes): Also document load-theme etc.
88
892012-04-14 Chong Yidong <cyd@gnu.org>
90
91 * customize.texi (Applying Customizations):
92 (Custom Themes): New nodes.
93
94 * display.texi (Defining Faces): Reference custom-set-faces.
95
96 * modes.texi (Defining Minor Modes, Defining Minor Modes):
97 * os.texi (Startup Summary): Copyedits.
98
992012-04-14 Glenn Morris <rgm@gnu.org>
100
101 * loading.texi (Loading Non-ASCII): "unibyte:" can also be at the end.
102
103 * strings.texi (Case Tables):
104 * objects.texi (General Escape Syntax):
105 * keymaps.texi (Key Sequences): Use @acronym with "ASCII".
106
107 * buffers.texi, compile.texi, customize.texi, debugging.texi:
108 * display.texi, edebug.texi, eval.texi, help.texi, intro.texi:
109 * keymaps.texi, minibuf.texi, modes.texi, os.texi, processes.texi:
110 * text.texi: Use @file for buffers, per the Texinfo manual.
111
112 * compile.texi (Compiler Errors): Add missing space in buffer name.
113
1142012-04-14 Chong Yidong <cyd@gnu.org>
115
116 * processes.texi (Query Before Exit): Remove obsolete function
117 process-kill-without-query (Bug#11190).
118
1192012-04-14 Glenn Morris <rgm@gnu.org>
120
121 * files.texi, frames.texi, loading.texi, os.texi, processes.texi:
122 Use @env for environment variables.
123
124 * Makefile.in: Replace non-portable use of $< in ordinary rules.
125
1262012-04-12 Jari Aalto <jari.aalto@cante.net>
127
128 * processes.texi (Synchronous Processes): Mention
129 `default-directory' (bug#7515).
130
12012-04-09 Chong Yidong <cyd@gnu.org> 1312012-04-09 Chong Yidong <cyd@gnu.org>
2 132
3 * customize.texi (Variable Definitions): Remove user-variable-p. 133 * customize.texi (Variable Definitions): Remove user-variable-p.
diff --git a/doc/lispref/Makefile.in b/doc/lispref/Makefile.in
index 5094a3f8ab6..10ec236eaee 100644
--- a/doc/lispref/Makefile.in
+++ b/doc/lispref/Makefile.in
@@ -106,21 +106,22 @@ html: elisp.html
106pdf: elisp.pdf 106pdf: elisp.pdf
107ps: elisp.ps 107ps: elisp.ps
108 108
109## Note: "<" is not portable in ordinary make rules.
109$(infodir)/elisp: $(srcs) 110$(infodir)/elisp: $(srcs)
110 $(mkinfodir) 111 $(mkinfodir)
111 $(MAKEINFO) $(MAKEINFO_OPTS) -o $@ $< 112 $(MAKEINFO) $(MAKEINFO_OPTS) -o $@ $(srcdir)/elisp.texi
112 113
113elisp.dvi: $(srcs) 114elisp.dvi: $(srcs)
114 $(ENVADD) $(TEXI2DVI) $< 115 $(ENVADD) $(TEXI2DVI) $(srcdir)/elisp.texi
115 116
116elisp.html: $(srcs) 117elisp.html: $(srcs)
117 $(MAKEINFO) $(MAKEINFO_OPTS) --html -o $@ $< 118 $(MAKEINFO) $(MAKEINFO_OPTS) --html -o $@ $(srcdir)/elisp.texi
118 119
119elisp.ps: elisp.dvi 120elisp.ps: elisp.dvi
120 $(DVIPS) -o $@ $< 121 $(DVIPS) -o $@ elisp.dvi
121 122
122elisp.pdf: $(srcs) 123elisp.pdf: $(srcs)
123 $(ENVADD) $(TEXI2PDF) $< 124 $(ENVADD) $(TEXI2PDF) $(srcdir)/elisp.texi
124 125
125.PHONY: mostlyclean clean distclean maintainer-clean infoclean 126.PHONY: mostlyclean clean distclean maintainer-clean infoclean
126 127
diff --git a/doc/lispref/abbrevs.texi b/doc/lispref/abbrevs.texi
index a64e8a0bd51..ada58c1c9e4 100644
--- a/doc/lispref/abbrevs.texi
+++ b/doc/lispref/abbrevs.texi
@@ -2,7 +2,6 @@
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990-1994, 1999, 2001-2012 Free Software Foundation, Inc. 3@c Copyright (C) 1990-1994, 1999, 2001-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5@setfilename ../../info/abbrevs
6@node Abbrevs, Processes, Syntax Tables, Top 5@node Abbrevs, Processes, Syntax Tables, Top
7@chapter Abbrevs and Abbrev Expansion 6@chapter Abbrevs and Abbrev Expansion
8@cindex abbrev 7@cindex abbrev
diff --git a/doc/lispref/advice.texi b/doc/lispref/advice.texi
index a2f59b2ddc9..23f3d6d95c3 100644
--- a/doc/lispref/advice.texi
+++ b/doc/lispref/advice.texi
@@ -2,7 +2,6 @@
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1998-1999, 2001-2012 Free Software Foundation, Inc. 3@c Copyright (C) 1998-1999, 2001-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5@setfilename ../../info/advising
6@node Advising Functions, Debugging, Byte Compilation, Top 5@node Advising Functions, Debugging, Byte Compilation, Top
7@chapter Advising Emacs Lisp Functions 6@chapter Advising Emacs Lisp Functions
8@cindex advising functions 7@cindex advising functions
diff --git a/doc/lispref/anti.texi b/doc/lispref/anti.texi
index 0e3c9eadeae..59f8f91c855 100644
--- a/doc/lispref/anti.texi
+++ b/doc/lispref/anti.texi
@@ -65,9 +65,9 @@ Emacs windows now have most of their internal state hidden from Lisp.
65Internal windows are no longer visible to Lisp; functions such as 65Internal windows are no longer visible to Lisp; functions such as
66@code{window-parent}, window parameters related to window arrangement, 66@code{window-parent}, window parameters related to window arrangement,
67and window-local buffer lists have all been removed. Functions for 67and window-local buffer lists have all been removed. Functions for
68resizing windows can delete windows if when they become too small. 68resizing windows can delete windows if they become too small.
69 69
70The @dfn{action function} feature for controlling buffer display has 70The ``action function'' feature for controlling buffer display has
71been removed, including @code{display-buffer-overriding-action} and 71been removed, including @code{display-buffer-overriding-action} and
72related variables, as well as the @var{action} argument to 72related variables, as well as the @var{action} argument to
73@code{display-buffer} and other functions. The way to 73@code{display-buffer} and other functions. The way to
@@ -80,7 +80,7 @@ variables.
80The standard completion interface has been simplified, eliminating the 80The standard completion interface has been simplified, eliminating the
81@code{completion-extra-properties} variable, the @code{metadata} 81@code{completion-extra-properties} variable, the @code{metadata}
82action flag for completion functions, and the concept of 82action flag for completion functions, and the concept of
83@dfn{completion categories}. Lisp programmers may now find the choice 83``completion categories''. Lisp programmers may now find the choice
84of methods for tuning completion less bewildering, but if a package 84of methods for tuning completion less bewildering, but if a package
85finds the streamlined interface insufficient for its needs, it must 85finds the streamlined interface insufficient for its needs, it must
86implement its own specialized completion feature. 86implement its own specialized completion feature.
@@ -123,17 +123,19 @@ an additional @var{cache} entry in their definitions, like this:
123The @var{cache} entry is used internally by Emacs to record equivalent 123The @var{cache} entry is used internally by Emacs to record equivalent
124keyboard key sequences for invoking the same command; Lisp programs 124keyboard key sequences for invoking the same command; Lisp programs
125should never use it. 125should never use it.
126@c Not really NEWS-worthy then...
126 127
127@item 128@item
128The @code{open-network-stream} function has been removed, and so has 129The @code{gnutls} library has been removed, and the function
129the @code{gnutls} library. Lisp programs that want an encrypted 130@code{open-network-stream} correspondingly simplified.
130network connection must now call external utilities such as 131Lisp programs that want an encrypted network connection must now call
131@command{starttls} or @command{gnutls-cli}. 132external utilities such as @command{starttls} or @command{gnutls-cli}.
132 133
133@item 134@item
134Tool bars can no longer display separators, which frees up several 135Tool bars can no longer display separators, which frees up several
135pixels of space on each graphical frame. 136pixels of space on each graphical frame.
136 137
137@item 138@item
138Many other functions and variables have been eliminated. 139As part of the ongoing quest for simplicity, many other functions and
140variables have been eliminated.
139@end itemize 141@end itemize
diff --git a/doc/lispref/backups.texi b/doc/lispref/backups.texi
index a1c5f20f28c..01dff70a5a4 100644
--- a/doc/lispref/backups.texi
+++ b/doc/lispref/backups.texi
@@ -1,8 +1,7 @@
1@c -*-texinfo-*- 1@c -*-texinfo-*-
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990-1995, 1999, 2001-2012 Free Software Foundation, Inc. 3@c Copyright (C) 1990-1995, 1999, 2001-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5@setfilename ../../info/backups
6@node Backups and Auto-Saving, Buffers, Files, Top 5@node Backups and Auto-Saving, Buffers, Files, Top
7@chapter Backups and Auto-Saving 6@chapter Backups and Auto-Saving
8@cindex backups and auto-saving 7@cindex backups and auto-saving
diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi
index 125a886ecb2..844b6423a52 100644
--- a/doc/lispref/buffers.texi
+++ b/doc/lispref/buffers.texi
@@ -3,7 +3,6 @@
3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012
4@c Free Software Foundation, Inc. 4@c Free Software Foundation, Inc.
5@c See the file elisp.texi for copying conditions. 5@c See the file elisp.texi for copying conditions.
6@setfilename ../../info/buffers
7@node Buffers, Windows, Backups and Auto-Saving, Top 6@node Buffers, Windows, Backups and Auto-Saving, Top
8@chapter Buffers 7@chapter Buffers
9@cindex buffer 8@cindex buffer
@@ -863,7 +862,7 @@ a buffer visible in any window on any visible frame, except as a last
863resort. If @var{visible-ok} is non-@code{nil}, then it does not matter 862resort. If @var{visible-ok} is non-@code{nil}, then it does not matter
864whether a buffer is displayed somewhere or not. 863whether a buffer is displayed somewhere or not.
865 864
866If no suitable buffer exists, the buffer @samp{*scratch*} is returned 865If no suitable buffer exists, the buffer @file{*scratch*} is returned
867(and created, if necessary). 866(and created, if necessary).
868@end defun 867@end defun
869 868
@@ -874,7 +873,7 @@ selected frame's buffer list.
874 873
875The argument @var{visible-ok} is handled as with @code{other-buffer}, 874The argument @var{visible-ok} is handled as with @code{other-buffer},
876see above. If no suitable buffer can be found, the buffer 875see above. If no suitable buffer can be found, the buffer
877@samp{*scratch*} is returned. 876@file{*scratch*} is returned.
878@end defun 877@end defun
879 878
880@deffn Command bury-buffer &optional buffer-or-name 879@deffn Command bury-buffer &optional buffer-or-name
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi
index 95039d36b7e..bf26d83b7bf 100644
--- a/doc/lispref/commands.texi
+++ b/doc/lispref/commands.texi
@@ -2,7 +2,6 @@
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 Free Software Foundation, Inc. 3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5@setfilename ../../info/commands
6@node Command Loop, Keymaps, Minibuffers, Top 5@node Command Loop, Keymaps, Minibuffers, Top
7@chapter Command Loop 6@chapter Command Loop
8@cindex editor command loop 7@cindex editor command loop
diff --git a/doc/lispref/compile.texi b/doc/lispref/compile.texi
index 90d038c29d6..ead75942b24 100644
--- a/doc/lispref/compile.texi
+++ b/doc/lispref/compile.texi
@@ -1,8 +1,7 @@
1@c -*-texinfo-*- 1@c -*-texinfo-*-
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990-1994, 2001-2012 Free Software Foundation, Inc. 3@c Copyright (C) 1990-1994, 2001-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5@setfilename ../../info/compile
6@node Byte Compilation, Advising Functions, Loading, Top 5@node Byte Compilation, Advising Functions, Loading, Top
7@chapter Byte Compilation 6@chapter Byte Compilation
8@cindex byte compilation 7@cindex byte compilation
@@ -92,7 +91,7 @@ the @code{byte-compile} function. You can compile a whole file with
92 91
93 Sometimes, the byte compiler produces warning and/or error messages 92 Sometimes, the byte compiler produces warning and/or error messages
94(@pxref{Compiler Errors}, for details). These messages are recorded 93(@pxref{Compiler Errors}, for details). These messages are recorded
95in a buffer called @samp{*Compile-Log*}, which uses Compilation mode. 94in a buffer called @file{*Compile-Log*}, which uses Compilation mode.
96@xref{Compilation Mode,,,emacs, The GNU Emacs Manual}. 95@xref{Compilation Mode,,,emacs, The GNU Emacs Manual}.
97 96
98@cindex macro compilation 97@cindex macro compilation
@@ -443,14 +442,14 @@ to what @code{eval-when-compile} does.
443@cindex compiler errors 442@cindex compiler errors
444 443
445 Byte compilation outputs all errors and warnings into the buffer 444 Byte compilation outputs all errors and warnings into the buffer
446@samp{*Compile-Log*}. The messages include file names and line 445@file{*Compile-Log*}. The messages include file names and line
447numbers that identify the location of the problem. The usual Emacs 446numbers that identify the location of the problem. The usual Emacs
448commands for operating on compiler diagnostics work properly on these 447commands for operating on compiler diagnostics work properly on these
449messages. 448messages.
450 449
451 When an error is due to invalid syntax in the program, the byte 450 When an error is due to invalid syntax in the program, the byte
452compiler might get confused about the errors' exact location. One way 451compiler might get confused about the errors' exact location. One way
453to investigate is to switch to the buffer @w{@samp{*Compiler Input*}}. 452to investigate is to switch to the buffer @w{@file{ *Compiler Input*}}.
454(This buffer name starts with a space, so it does not show up in 453(This buffer name starts with a space, so it does not show up in
455@kbd{M-x list-buffers}.) This buffer contains the program being 454@kbd{M-x list-buffers}.) This buffer contains the program being
456compiled, and point shows how far the byte compiler was able to read; 455compiled, and point shows how far the byte compiler was able to read;
@@ -602,7 +601,7 @@ the stack.
602@deffn Command disassemble object &optional buffer-or-name 601@deffn Command disassemble object &optional buffer-or-name
603This command displays the disassembled code for @var{object}. In 602This command displays the disassembled code for @var{object}. In
604interactive use, or if @var{buffer-or-name} is @code{nil} or omitted, 603interactive use, or if @var{buffer-or-name} is @code{nil} or omitted,
605the output goes in a buffer named @samp{*Disassemble*}. If 604the output goes in a buffer named @file{*Disassemble*}. If
606@var{buffer-or-name} is non-@code{nil}, it must be a buffer or the 605@var{buffer-or-name} is non-@code{nil}, it must be a buffer or the
607name of an existing buffer. Then the output goes there, at point, and 606name of an existing buffer. Then the output goes there, at point, and
608point is left before the output. 607point is left before the output.
diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi
index 8c45a1a4faf..aa24291d892 100644
--- a/doc/lispref/control.texi
+++ b/doc/lispref/control.texi
@@ -1,8 +1,7 @@
1@c -*-texinfo-*- 1@c -*-texinfo-*-
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 Free Software Foundation, Inc. 3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5@setfilename ../../info/control
6@node Control Structures, Variables, Evaluation, Top 5@node Control Structures, Variables, Evaluation, Top
7@chapter Control Structures 6@chapter Control Structures
8@cindex special forms for control structures 7@cindex special forms for control structures
diff --git a/doc/lispref/customize.texi b/doc/lispref/customize.texi
index d86aea24fbc..04b3cdd11f0 100644
--- a/doc/lispref/customize.texi
+++ b/doc/lispref/customize.texi
@@ -1,23 +1,27 @@
1@c -*-texinfo-*- 1@c -*-texinfo-*-
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1997-2012 Free Software Foundation, Inc. 3@c Copyright (C) 1997-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5@setfilename ../../info/customize
6@node Customization, Loading, Macros, Top 5@node Customization, Loading, Macros, Top
7@chapter Writing Customization Definitions 6@chapter Customization Settings
8 7
9@cindex customization definitions 8@cindex customization item
10 This chapter describes how to declare user options for customization, 9 This chapter describes how to declare customizable variables and
11and also customization groups for classifying them. We use the term 10customization groups for classifying them. We use the term
12@dfn{customization item} to include both kinds of customization 11@dfn{customization item} to include customizable variables,
13definitions---as well as face definitions (@pxref{Defining Faces}). 12customization groups, as well as faces.
13
14 @xref{Defining Faces}, for the @code{defface} macro, which is used
15for declaring customizable faces.
14 16
15@menu 17@menu
16* Common Keywords:: Common keyword arguments for all kinds of 18* Common Keywords:: Common keyword arguments for all kinds of
17 customization declarations. 19 customization declarations.
18* Group Definitions:: Writing customization group definitions. 20* Group Definitions:: Writing customization group definitions.
19* Variable Definitions:: Declaring user options. 21* Variable Definitions:: Declaring user options.
20* Customization Types:: Specifying the type of a user option. 22* Customization Types:: Specifying the type of a user option.
23* Applying Customizations:: Functions to apply customization settings.
24* Custom Themes:: Writing Custom themes.
21@end menu 25@end menu
22 26
23@node Common Keywords 27@node Common Keywords
@@ -306,7 +310,7 @@ individual types for a description of how to use @code{:options}.
306@item :set @var{setfunction} 310@item :set @var{setfunction}
307@kindex set@r{, @code{defcustom} keyword} 311@kindex set@r{, @code{defcustom} keyword}
308Specify @var{setfunction} as the way to change the value of this 312Specify @var{setfunction} as the way to change the value of this
309option when using the Customize user interface. The function 313option when using the Customize interface. The function
310@var{setfunction} should take two arguments, a symbol (the option 314@var{setfunction} should take two arguments, a symbol (the option
311name) and the new value, and should do whatever is necessary to update 315name) and the new value, and should do whatever is necessary to update
312the value properly for this option (which may not mean simply setting 316the value properly for this option (which may not mean simply setting
@@ -588,7 +592,7 @@ The value must be a coding-system name, and you can do completion with
588@item color 592@item color
589The value must be a valid color name. The widget provides completion 593The value must be a valid color name. The widget provides completion
590for color names, as well as a sample and a button for selecting a 594for color names, as well as a sample and a button for selecting a
591color name from a list of color names shown in a @samp{*Colors*} 595color name from a list of color names shown in a @file{*Colors*}
592buffer. 596buffer.
593@end table 597@end table
594 598
@@ -1242,3 +1246,168 @@ the inferior widgets will convert @emph{their} inferior widgets. If
1242the data structure is itself recursive, this conversion is an infinite 1246the data structure is itself recursive, this conversion is an infinite
1243recursion. The @code{lazy} widget prevents the recursion: it convert 1247recursion. The @code{lazy} widget prevents the recursion: it convert
1244its @code{:type} argument only when needed. 1248its @code{:type} argument only when needed.
1249
1250@node Applying Customizations
1251@section Applying Customizations
1252
1253The following functions are responsible for installing the user's
1254customization settings for variables and faces, respectively. When
1255the user invokes @samp{Save for future sessions} in the Customize
1256interface, that takes effect by writing a @code{custom-set-variables}
1257and/or a @code{custom-set-faces} form into the custom file, to be
1258evaluated the next time Emacs starts up.
1259
1260@defun custom-set-variables &rest args
1261This function installs the variable customizations specified by
1262@var{args}. Each argument in @var{args} should have the form
1263
1264@example
1265(@var{var} @var{expression} [@var{now} [@var{request} [@var{comment}]]])
1266@end example
1267
1268@noindent
1269@var{var} is a variable name (a symbol), and @var{expression} is an
1270expression which evaluates to the desired customized value.
1271
1272If the @code{defcustom} form for @var{var} has been evaluated prior to
1273this @code{custom-set-variables} call, @var{expression} is immediately
1274evaluated, and the variable's value is set to the result. Otherwise,
1275@var{expression} is stored into the variable's @code{saved-value}
1276property, to be evaluated when the relevant @code{defcustom} is called
1277(usually when the library defining that variable is loaded into
1278Emacs).
1279
1280The @var{now}, @var{request}, and @var{comment} entries are for
1281internal use only, and may be omitted. @var{now}, if non-@code{nil},
1282means to set the variable's value now, even if the variable's
1283@code{defcustom} form has not been evaluated. @var{request} is a list
1284of features to be loaded immediately (@pxref{Named Features}).
1285@var{comment} is a string describing the customization.
1286@end defun
1287
1288@defun custom-set-faces &rest args
1289This function installs the face customizations specified by
1290@var{args}. Each argument in @var{args} should have the form
1291
1292@example
1293(@var{face} @var{spec} [@var{now} [@var{comment}]])
1294@end example
1295
1296@noindent
1297@var{face} is a face name (a symbol), and @var{spec} is the customized
1298face specification for that face (@pxref{Defining Faces}).
1299
1300The @var{now} and @var{comment} entries are for internal use only, and
1301may be omitted. @var{now}, if non-@code{nil}, means to install the
1302face specification now, even if the @code{defface} form has not been
1303evaluated. @var{comment} is a string describing the customization.
1304@end defun
1305
1306@node Custom Themes
1307@section Custom Themes
1308
1309 @dfn{Custom themes} are collections of settings that can be enabled
1310or disabled as a unit. @xref{Custom Themes,,, emacs, The GNU Emacs
1311Manual}. Each Custom theme is defined by an Emacs Lisp source file,
1312which should follow the conventions described in this section.
1313(Instead of writing a Custom theme by hand, you can also create one
1314using a Customize-like interface; @pxref{Creating Custom Themes,,,
1315emacs, The GNU Emacs Manual}.)
1316
1317 A Custom theme file should be named @file{@var{foo}-theme.el}, where
1318@var{foo} is the theme name. The first Lisp form in the file should
1319be a call to @code{deftheme}, and the last form should be a call to
1320@code{provide-theme}.
1321
1322@defmac deftheme theme &optional doc
1323This macro declares @var{theme} (a symbol) as the name of a Custom
1324theme. The optional argument @var{doc} should be a string describing
1325the theme; this is the description shown when the user invokes the
1326@code{describe-theme} command or types @kbd{?} in the @samp{*Custom
1327Themes*} buffer.
1328
1329Two special theme names are disallowed: @code{user} is a ``dummy''
1330theme which stores the user's direct customization settings, and
1331@code{changed} is a ``dummy'' theme which stores changes made outside
1332of the Customize system. If you specify either of these as the
1333@var{theme} argument, @code{deftheme} signals an error.
1334@end defmac
1335
1336@defmac provide-theme theme
1337This macro declares that the theme named @var{theme} has been fully
1338specified.
1339@end defmac
1340
1341 In between @code{deftheme} and @code{provide-theme} are Lisp forms
1342specifying the theme settings: usually a call to
1343@code{custom-theme-set-variables} and/or a call to
1344@code{custom-theme-set-faces}.
1345
1346@defun custom-theme-set-variables theme &rest args
1347This function specifies the Custom theme @var{theme}'s variable
1348settings. @var{theme} should be a symbol. Each argument in
1349@var{args} should be a list of the form
1350
1351@example
1352(@var{var} @var{expression} [@var{now} [@var{request} [@var{comment}]]])
1353@end example
1354
1355@noindent
1356where the list entries have the same meanings as in
1357@code{custom-set-variables}. @xref{Applying Customizations}.
1358@end defun
1359
1360@defun custom-theme-set-faces theme &rest args
1361This function specifies the Custom theme @var{theme}'s face settings.
1362@var{theme} should be a symbol. Each argument in @var{args} should be
1363a list of the form
1364
1365@example
1366(@var{face} @var{spec} [@var{now} [@var{comment}]])
1367@end example
1368
1369@noindent
1370where the list entries have the same meanings as in
1371@code{custom-set-faces}. @xref{Applying Customizations}.
1372@end defun
1373
1374 In theory, a theme file can also contain other Lisp forms, which
1375would be evaluated when loading the theme, but that is ``bad form''.
1376To protect against loading themes containing malicious code, Emacs
1377displays the source file and asks for confirmation from the user
1378before loading any non-built-in theme for the first time.
1379
1380 The following functions are useful for programmatically enabling and
1381disabling Custom themes:
1382
1383@defun custom-theme-p theme
1384This function return a non-@code{nil} value if @var{theme} (a symbol)
1385is the name of a Custom theme (i.e.@: a Custom theme which has been
1386loaded into Emacs, whether or not the theme is enabled). Otherwise,
1387it returns @code{nil}.
1388@end defun
1389
1390@deffn Command load-theme theme &optional no-confirm no-enable
1391This function loads the Custom theme named @var{theme} from its source
1392file, looking for the source file in the directories specified by the
1393variable @code{custom-theme-load-path}. @xref{Custom Themes,,, emacs,
1394The GNU Emacs Manual}. It also @dfn{enables} the theme, causing its
1395variable and face settings to take effect.
1396
1397If the optional argument @var{no-confirm} is non-@code{nil}, this
1398skips prompting the user for confirmation before loading the theme.
1399
1400If the optional argument @var{no-enable} is non-@code{nil}, the theme
1401is loaded but not enabled.
1402@end deffn
1403
1404@deffn Command enable-theme theme
1405This function enables the Custom theme named @var{theme}. It signals
1406an error if no such theme has been loaded.
1407@end deffn
1408
1409@deffn Command disable-theme theme
1410This function disables the Custom theme named @var{theme}. The theme
1411remains loaded, so that a subsequent call to @code{enable-theme} will
1412re-enable it.
1413@end deffn
diff --git a/doc/lispref/debugging.texi b/doc/lispref/debugging.texi
index 6e7d0078e07..3c446b07f60 100644
--- a/doc/lispref/debugging.texi
+++ b/doc/lispref/debugging.texi
@@ -2,7 +2,6 @@
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990-1994, 1998-1999, 2001-2012 Free Software Foundation, Inc. 3@c Copyright (C) 1990-1994, 1998-1999, 2001-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5@setfilename ../../info/debugging
6@node Debugging, Read and Print, Advising Functions, Top 5@node Debugging, Read and Print, Advising Functions, Top
7@chapter Debugging Lisp Programs 6@chapter Debugging Lisp Programs
8 7
@@ -303,7 +302,7 @@ an implicit @code{progn} (@pxref{Sequencing}).
303@subsection Using the Debugger 302@subsection Using the Debugger
304 303
305 When the debugger is entered, it displays the previously selected 304 When the debugger is entered, it displays the previously selected
306buffer in one window and a buffer named @samp{*Backtrace*} in another 305buffer in one window and a buffer named @file{*Backtrace*} in another
307window. The backtrace buffer contains one line for each level of Lisp 306window. The backtrace buffer contains one line for each level of Lisp
308function execution currently going on. At the beginning of this buffer 307function execution currently going on. At the beginning of this buffer
309is a message describing the reason that the debugger was invoked (such 308is a message describing the reason that the debugger was invoked (such
@@ -412,7 +411,7 @@ the variable values within the debugger.
412 411
413@item R 412@item R
414Like @kbd{e}, but also save the result of evaluation in the 413Like @kbd{e}, but also save the result of evaluation in the
415buffer @samp{*Debugger-record*}. 414buffer @file{*Debugger-record*}.
416 415
417@item q 416@item q
418Terminate the program being debugged; return to top-level Emacs 417Terminate the program being debugged; return to top-level Emacs
@@ -450,7 +449,7 @@ to invoke the debugger.
450 449
451@defun debug &rest debugger-args 450@defun debug &rest debugger-args
452This function enters the debugger. It switches buffers to a buffer 451This function enters the debugger. It switches buffers to a buffer
453named @samp{*Backtrace*} (or @samp{*Backtrace*<2>} if it is the second 452named @file{*Backtrace*} (or @file{*Backtrace*<2>} if it is the second
454recursive entry to the debugger, etc.), and fills it with information 453recursive entry to the debugger, etc.), and fills it with information
455about the stack of Lisp function calls. It then enters a recursive 454about the stack of Lisp function calls. It then enters a recursive
456edit, showing the backtrace buffer in Debugger mode. 455edit, showing the backtrace buffer in Debugger mode.
@@ -461,7 +460,7 @@ buffer and returns to whatever called @code{debug}. This is the only
461way the function @code{debug} can return to its caller. 460way the function @code{debug} can return to its caller.
462 461
463The use of the @var{debugger-args} is that @code{debug} displays the 462The use of the @var{debugger-args} is that @code{debug} displays the
464rest of its arguments at the top of the @samp{*Backtrace*} buffer, so 463rest of its arguments at the top of the @file{*Backtrace*} buffer, so
465that the user can see them. Except as described below, this is the 464that the user can see them. Except as described below, this is the
466@emph{only} way these arguments are used. 465@emph{only} way these arguments are used.
467 466
@@ -560,7 +559,7 @@ of @code{debug} (@pxref{Invoking the Debugger}).
560@cindex call stack 559@cindex call stack
561This function prints a trace of Lisp function calls currently active. 560This function prints a trace of Lisp function calls currently active.
562This is the function used by @code{debug} to fill up the 561This is the function used by @code{debug} to fill up the
563@samp{*Backtrace*} buffer. It is written in C, since it must have access 562@file{*Backtrace*} buffer. It is written in C, since it must have access
564to the stack to determine which function calls are active. The return 563to the stack to determine which function calls are active. The return
565value is always @code{nil}. 564value is always @code{nil}.
566 565
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 8382c2a1555..0113ae86358 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -2,7 +2,6 @@
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990-1995, 1998-2012 Free Software Foundation, Inc. 3@c Copyright (C) 1990-1995, 1998-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5@setfilename ../../info/display
6@node Display, System Interface, Processes, Top 5@node Display, System Interface, Processes, Top
7@chapter Emacs Display 6@chapter Emacs Display
8 7
@@ -268,7 +267,7 @@ objects for its format specifications, like in the @code{format}
268function (@pxref{Formatting Strings}). The resulting formatted string 267function (@pxref{Formatting Strings}). The resulting formatted string
269is displayed in the echo area; if it contains @code{face} text 268is displayed in the echo area; if it contains @code{face} text
270properties, it is displayed with the specified faces (@pxref{Faces}). 269properties, it is displayed with the specified faces (@pxref{Faces}).
271The string is also added to the @samp{*Messages*} buffer, but without 270The string is also added to the @file{*Messages*} buffer, but without
272text properties (@pxref{Logging Messages}). 271text properties (@pxref{Logging Messages}).
273 272
274In batch mode, the message is printed to the standard error stream, 273In batch mode, the message is printed to the standard error stream,
@@ -341,7 +340,7 @@ buffer is used, the window used to display it.
341 340
342If @var{message} is a string, then the optional argument 341If @var{message} is a string, then the optional argument
343@var{buffer-name} is the name of the buffer used to display it when a 342@var{buffer-name} is the name of the buffer used to display it when a
344pop-up buffer is used, defaulting to @samp{*Message*}. In the case 343pop-up buffer is used, defaulting to @file{*Message*}. In the case
345where @var{message} is a string and displayed in the echo area, it is 344where @var{message} is a string and displayed in the echo area, it is
346not specified whether the contents are inserted into the buffer anyway. 345not specified whether the contents are inserted into the buffer anyway.
347 346
@@ -474,16 +473,16 @@ this macro this way:
474@end defmac 473@end defmac
475 474
476@node Logging Messages 475@node Logging Messages
477@subsection Logging Messages in @samp{*Messages*} 476@subsection Logging Messages in @file{*Messages*}
478@cindex logging echo-area messages 477@cindex logging echo-area messages
479 478
480 Almost all the messages displayed in the echo area are also recorded 479 Almost all the messages displayed in the echo area are also recorded
481in the @samp{*Messages*} buffer so that the user can refer back to 480in the @file{*Messages*} buffer so that the user can refer back to
482them. This includes all the messages that are output with 481them. This includes all the messages that are output with
483@code{message}. 482@code{message}.
484 483
485@defopt message-log-max 484@defopt message-log-max
486This variable specifies how many lines to keep in the @samp{*Messages*} 485This variable specifies how many lines to keep in the @file{*Messages*}
487buffer. The value @code{t} means there is no limit on how many lines to 486buffer. The value @code{t} means there is no limit on how many lines to
488keep. The value @code{nil} disables message logging entirely. Here's 487keep. The value @code{nil} disables message logging entirely. Here's
489how to display a message and prevent it from being logged: 488how to display a message and prevent it from being logged:
@@ -494,7 +493,7 @@ how to display a message and prevent it from being logged:
494@end example 493@end example
495@end defopt 494@end defopt
496 495
497 To make @samp{*Messages*} more convenient for the user, the logging 496 To make @file{*Messages*} more convenient for the user, the logging
498facility combines successive identical messages. It also combines 497facility combines successive identical messages. It also combines
499successive related messages for the sake of two cases: question 498successive related messages for the sake of two cases: question
500followed by answer, and a series of progress messages. 499followed by answer, and a series of progress messages.
@@ -624,7 +623,7 @@ and @var{type} as the warning type. @var{level} should be the
624severity level, with @code{:warning} being the default. 623severity level, with @code{:warning} being the default.
625 624
626@var{buffer-name}, if non-@code{nil}, specifies the name of the buffer 625@var{buffer-name}, if non-@code{nil}, specifies the name of the buffer
627for logging the warning. By default, it is @samp{*Warnings*}. 626for logging the warning. By default, it is @file{*Warnings*}.
628@end defun 627@end defun
629 628
630@defun lwarn type level message &rest args 629@defun lwarn type level message &rest args
@@ -1885,7 +1884,7 @@ in all frames. But you can also assign a face name a special set of
1885attributes in one frame (@pxref{Attribute Functions}). 1884attributes in one frame (@pxref{Attribute Functions}).
1886 1885
1887@menu 1886@menu
1888* Defining Faces:: How to define a face with @code{defface}. 1887* Defining Faces:: How to define a face.
1889* Face Attributes:: What is in a face? 1888* Face Attributes:: What is in a face?
1890* Attribute Functions:: Functions to examine and set face attributes. 1889* Attribute Functions:: Functions to examine and set face attributes.
1891* Displaying Faces:: How Emacs combines the faces specified for a character. 1890* Displaying Faces:: How Emacs combines the faces specified for a character.
@@ -1904,22 +1903,17 @@ attributes in one frame (@pxref{Attribute Functions}).
1904@node Defining Faces 1903@node Defining Faces
1905@subsection Defining Faces 1904@subsection Defining Faces
1906 1905
1907 The way to define a new face is with @code{defface}. This creates a 1906 The @code{defface} macro defines a face and specifies its default
1908kind of customization item which the user can customize using the 1907appearance. The user can subsequently customize the face using the
1909Customization buffer (@pxref{Customization}). 1908Customize interface (@pxref{Customization}).
1910
1911 People are sometimes tempted to create variables whose values specify
1912which faces to use (for example, Font-Lock does this). In the vast
1913majority of cases, this is not necessary, and simply using faces
1914directly is preferable.
1915 1909
1916@defmac defface face spec doc [keyword value]@dots{} 1910@defmac defface face spec doc [keyword value]@dots{}
1917This declares @var{face} as a customizable face whose default 1911This macro declares @var{face} as a customizable face whose default
1918attributes are given by @var{spec}. You should not quote the symbol 1912attributes are given by @var{spec}. You should not quote the symbol
1919@var{face}, and it should not end in @samp{-face} (that would be 1913@var{face}, and it should not end in @samp{-face} (that would be
1920redundant). The argument @var{doc} specifies the face documentation. 1914redundant). The argument @var{doc} is a documentation string for the
1921The keywords you can use in @code{defface} are the same as in 1915face. The additional @var{keyword} arguments have the same meanings
1922@code{defgroup} and @code{defcustom} (@pxref{Common Keywords}). 1916as in @code{defgroup} and @code{defcustom} (@pxref{Common Keywords}).
1923 1917
1924When @code{defface} executes, it defines the face according to 1918When @code{defface} executes, it defines the face according to
1925@var{spec}, then uses any customizations that were read from the 1919@var{spec}, then uses any customizations that were read from the
@@ -1930,12 +1924,14 @@ Lisp mode (@code{eval-defun}), a special feature of @code{eval-defun}
1930overrides any customizations of the face. This way, the face reflects 1924overrides any customizations of the face. This way, the face reflects
1931exactly what the @code{defface} says. 1925exactly what the @code{defface} says.
1932 1926
1933The purpose of @var{spec} is to specify how the face should appear on 1927@cindex face specification
1934different kinds of terminals. It should be an alist whose elements 1928The @var{spec} argument is a @dfn{face specification}, which states
1935have the form @code{(@var{display} @var{atts})}. @var{display} 1929how the face should appear on different kinds of terminals. It should
1936specifies a class of terminals (see below), while @var{atts} is a 1930be an alist whose elements each have the form @code{(@var{display}
1937property list of face attributes and their values, specifying the 1931@var{atts})}. @var{display} specifies a class of terminals (see
1938appearance of the face on matching terminals 1932below), while @var{atts} is a property list of face attributes and
1933their values, specifying the appearance of the face on matching
1934terminals
1939@iftex 1935@iftex
1940(see the next section for details about face attributes). 1936(see the next section for details about face attributes).
1941@end iftex 1937@end iftex
@@ -2022,14 +2018,22 @@ frame must match one of the @var{value}s specified for it in
2022 :group 'basic-faces) 2018 :group 'basic-faces)
2023@end example 2019@end example
2024 2020
2025 Internally, @code{defface} uses the symbol property 2021 Internally, Emacs stores the face's default specification in its
2026@code{face-defface-spec} to record the specified face attributes. The 2022@code{face-defface-spec} symbol property (@pxref{Property Lists}).
2027attributes saved by the user with the customization buffer are 2023The @code{saved-face} property stores the face specification saved by
2028recorded in the symbol property @code{saved-face}; the attributes 2024the user, using the customization buffer; the @code{customized-face}
2029customized by the user for the current session, but not saved, are 2025property stores the face specification customized for the current
2030recorded in the symbol property @code{customized-face}. The 2026session, but not saved; and the @code{theme-face} property stores an
2031documentation string is recorded in the symbol property 2027alist associating the active customization settings and Custom themes
2032@code{face-documentation}. 2028with their specifications for that face. The face's documentation
2029string is stored in the @code{face-documentation} property. But
2030normally you should not try to set any of these properties directly.
2031@xref{Applying Customizations}, for the @code{custom-set-faces}
2032function, which is used to apply customized face settings.
2033
2034 People are sometimes tempted to create variables whose values
2035specify a face to use. In the vast majority of cases, this is not
2036necessary; it is preferable to simply use faces directly.
2033 2037
2034@defopt frame-background-mode 2038@defopt frame-background-mode
2035This option, if non-@code{nil}, specifies the background type to use for 2039This option, if non-@code{nil}, specifies the background type to use for
@@ -2752,7 +2756,7 @@ For text matching a search command.
2752@itemx warning 2756@itemx warning
2753@itemx success 2757@itemx success
2754For text concerning errors, warnings, or successes. For example, 2758For text concerning errors, warnings, or successes. For example,
2755these are used for messages in @samp{*Compilation*} buffers. 2759these are used for messages in @file{*Compilation*} buffers.
2756@end table 2760@end table
2757 2761
2758@node Font Selection 2762@node Font Selection
diff --git a/doc/lispref/edebug.texi b/doc/lispref/edebug.texi
index 245aaf94c6d..9d50f5fb31f 100644
--- a/doc/lispref/edebug.texi
+++ b/doc/lispref/edebug.texi
@@ -622,7 +622,7 @@ back to the stop point in the source code buffer from any buffer using
622saved outside window configuration---so that even if you turn saving 622saved outside window configuration---so that even if you turn saving
623back @emph{on}, the current window configuration remains unchanged when 623back @emph{on}, the current window configuration remains unchanged when
624you next exit Edebug (by continuing the program). However, the 624you next exit Edebug (by continuing the program). However, the
625automatic redisplay of @samp{*edebug*} and @samp{*edebug-trace*} may 625automatic redisplay of @file{*edebug*} and @file{*edebug-trace*} may
626conflict with the buffers you wish to see unless you have enough windows 626conflict with the buffers you wish to see unless you have enough windows
627open. 627open.
628 628
@@ -661,18 +661,18 @@ lexically bound symbols created by the following constructs in
661@node Eval List 661@node Eval List
662@subsection Evaluation List Buffer 662@subsection Evaluation List Buffer
663 663
664 You can use the @dfn{evaluation list buffer}, called @samp{*edebug*}, to 664 You can use the @dfn{evaluation list buffer}, called @file{*edebug*}, to
665evaluate expressions interactively. You can also set up the 665evaluate expressions interactively. You can also set up the
666@dfn{evaluation list} of expressions to be evaluated automatically each 666@dfn{evaluation list} of expressions to be evaluated automatically each
667time Edebug updates the display. 667time Edebug updates the display.
668 668
669@table @kbd 669@table @kbd
670@item E 670@item E
671Switch to the evaluation list buffer @samp{*edebug*} 671Switch to the evaluation list buffer @file{*edebug*}
672(@code{edebug-visit-eval-list}). 672(@code{edebug-visit-eval-list}).
673@end table 673@end table
674 674
675 In the @samp{*edebug*} buffer you can use the commands of Lisp 675 In the @file{*edebug*} buffer you can use the commands of Lisp
676Interaction mode (@pxref{Lisp Interaction,,, emacs, The GNU Emacs 676Interaction mode (@pxref{Lisp Interaction,,, emacs, The GNU Emacs
677Manual}) as well as these special commands: 677Manual}) as well as these special commands:
678 678
@@ -699,7 +699,7 @@ Switch back to the source code buffer at the current stop point
699@end table 699@end table
700 700
701 You can evaluate expressions in the evaluation list window with 701 You can evaluate expressions in the evaluation list window with
702@kbd{C-j} or @kbd{C-x C-e}, just as you would in @samp{*scratch*}; 702@kbd{C-j} or @kbd{C-x C-e}, just as you would in @file{*scratch*};
703but they are evaluated in the context outside of Edebug. 703but they are evaluated in the context outside of Edebug.
704 704
705 The expressions you enter interactively (and their results) are lost 705 The expressions you enter interactively (and their results) are lost
@@ -758,8 +758,8 @@ the expression at a suitable place, insert a new comment line, then type
758@kbd{C-c C-u}. You need not insert dashes in the comment line---its 758@kbd{C-c C-u}. You need not insert dashes in the comment line---its
759contents don't matter. 759contents don't matter.
760 760
761After selecting @samp{*edebug*}, you can return to the source code 761After selecting @file{*edebug*}, you can return to the source code
762buffer with @kbd{C-c C-w}. The @samp{*edebug*} buffer is killed when 762buffer with @kbd{C-c C-w}. The @file{*edebug*} buffer is killed when
763you continue execution, and recreated next time it is needed. 763you continue execution, and recreated next time it is needed.
764 764
765@node Printing in Edebug 765@node Printing in Edebug
@@ -819,7 +819,7 @@ for details.
819@cindex trace buffer 819@cindex trace buffer
820 820
821 Edebug can record an execution trace, storing it in a buffer named 821 Edebug can record an execution trace, storing it in a buffer named
822@samp{*edebug-trace*}. This is a log of function calls and returns, 822@file{*edebug-trace*}. This is a log of function calls and returns,
823showing the function names and their arguments and values. To enable 823showing the function names and their arguments and values. To enable
824trace recording, set @code{edebug-trace} to a non-@code{nil} value. 824trace recording, set @code{edebug-trace} to a non-@code{nil} value.
825 825
@@ -1567,7 +1567,7 @@ The default value is @code{step}.
1567 1567
1568@defopt edebug-trace 1568@defopt edebug-trace
1569If this is non-@code{nil}, trace each function entry and exit. 1569If this is non-@code{nil}, trace each function entry and exit.
1570Tracing output is displayed in a buffer named @samp{*edebug-trace*}, one 1570Tracing output is displayed in a buffer named @file{*edebug-trace*}, one
1571function entry or exit per line, indented by the recursion level. 1571function entry or exit per line, indented by the recursion level.
1572 1572
1573Also see @code{edebug-tracing}, in @ref{Trace Buffer}. 1573Also see @code{edebug-tracing}, in @ref{Trace Buffer}.
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi
index dc835347235..4319d5eddda 100644
--- a/doc/lispref/elisp.texi
+++ b/doc/lispref/elisp.texi
@@ -123,7 +123,7 @@ Cover art by Etienne Suvasa.
123* Functions:: A function is a Lisp program 123* Functions:: A function is a Lisp program
124 that can be invoked from other functions. 124 that can be invoked from other functions.
125* Macros:: Macros are a way to extend the Lisp language. 125* Macros:: Macros are a way to extend the Lisp language.
126* Customization:: Writing customization declarations. 126* Customization:: Making variables and faces customizable.
127 127
128* Loading:: Reading files of Lisp code into Lisp. 128* Loading:: Reading files of Lisp code into Lisp.
129* Byte Compilation:: Compilation makes programs run faster. 129* Byte Compilation:: Compilation makes programs run faster.
@@ -500,6 +500,8 @@ Writing Customization Definitions
500* Group Definitions:: Writing customization group definitions. 500* Group Definitions:: Writing customization group definitions.
501* Variable Definitions:: Declaring user options. 501* Variable Definitions:: Declaring user options.
502* Customization Types:: Specifying the type of a user option. 502* Customization Types:: Specifying the type of a user option.
503* Applying Customizations:: Functions to apply customization settings.
504* Custom Themes:: Writing Custom themes.
503 505
504Customization Types 506Customization Types
505 507
@@ -635,8 +637,8 @@ Minibuffers
635* Multiple Queries:: Asking a series of similar questions. 637* Multiple Queries:: Asking a series of similar questions.
636* Reading a Password:: Reading a password from the terminal. 638* Reading a Password:: Reading a password from the terminal.
637* Minibuffer Commands:: Commands used as key bindings in minibuffers. 639* Minibuffer Commands:: Commands used as key bindings in minibuffers.
638* Minibuffer Contents:: How such commands access the minibuffer text.
639* Minibuffer Windows:: Operating on the special minibuffer windows. 640* Minibuffer Windows:: Operating on the special minibuffer windows.
641* Minibuffer Contents:: How such commands access the minibuffer text.
640* Recursive Mini:: Whether recursive entry to minibuffer is allowed. 642* Recursive Mini:: Whether recursive entry to minibuffer is allowed.
641* Minibuffer Misc:: Various customization hooks and variables. 643* Minibuffer Misc:: Various customization hooks and variables.
642 644
@@ -646,7 +648,7 @@ Completion
646* Minibuffer Completion:: Invoking the minibuffer with completion. 648* Minibuffer Completion:: Invoking the minibuffer with completion.
647* Completion Commands:: Minibuffer commands that do completion. 649* Completion Commands:: Minibuffer commands that do completion.
648* High-Level Completion:: Convenient special cases of completion 650* High-Level Completion:: Convenient special cases of completion
649 (reading buffer name, file name, etc.). 651 (reading buffer names, variable names, etc.).
650* Reading File Names:: Using completion to read file names and 652* Reading File Names:: Using completion to read file names and
651 shell commands. 653 shell commands.
652* Completion Variables:: Variables controlling completion behavior. 654* Completion Variables:: Variables controlling completion behavior.
@@ -1295,7 +1297,7 @@ Overlays
1295 1297
1296Faces 1298Faces
1297 1299
1298* Defining Faces:: How to define a face with @code{defface}. 1300* Defining Faces:: How to define a face.
1299* Face Attributes:: What is in a face? 1301* Face Attributes:: What is in a face?
1300* Attribute Functions:: Functions to examine and set face attributes. 1302* Attribute Functions:: Functions to examine and set face attributes.
1301* Displaying Faces:: How Emacs combines the faces specified for 1303* Displaying Faces:: How Emacs combines the faces specified for
diff --git a/doc/lispref/errors.texi b/doc/lispref/errors.texi
index 76ab8b235f5..8e73535d781 100644
--- a/doc/lispref/errors.texi
+++ b/doc/lispref/errors.texi
@@ -2,7 +2,6 @@
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990-1993, 1999, 2001-2012 Free Software Foundation, Inc. 3@c Copyright (C) 1990-1993, 1999, 2001-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5@setfilename ../../info/errors
6@node Standard Errors, Standard Keymaps, GNU Emacs Internals, Top 5@node Standard Errors, Standard Keymaps, GNU Emacs Internals, Top
7@appendix Standard Errors 6@appendix Standard Errors
8@cindex standard errors 7@cindex standard errors
diff --git a/doc/lispref/eval.texi b/doc/lispref/eval.texi
index 429d999a2c8..4c1150d1a51 100644
--- a/doc/lispref/eval.texi
+++ b/doc/lispref/eval.texi
@@ -1,8 +1,7 @@
1@c -*-texinfo-*- 1@c -*-texinfo-*-
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990-1994, 1998, 2001-2012 Free Software Foundation, Inc. 3@c Copyright (C) 1990-1994, 1998, 2001-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5@setfilename ../../info/eval
6@node Evaluation, Control Structures, Symbols, Top 5@node Evaluation, Control Structures, Symbols, Top
7@chapter Evaluation 6@chapter Evaluation
8@cindex evaluation 7@cindex evaluation
@@ -807,7 +806,7 @@ The value of this variable is a list of the values returned by all the
807expressions that were read, evaluated, and printed from buffers 806expressions that were read, evaluated, and printed from buffers
808(including the minibuffer) by the standard Emacs commands which do 807(including the minibuffer) by the standard Emacs commands which do
809this. (Note that this does @emph{not} include evaluation in 808this. (Note that this does @emph{not} include evaluation in
810@samp{*ielm*} buffers, nor evaluation using @kbd{C-j} in 809@file{*ielm*} buffers, nor evaluation using @kbd{C-j} in
811@code{lisp-interaction-mode}.) The elements are ordered most recent 810@code{lisp-interaction-mode}.) The elements are ordered most recent
812first. 811first.
813 812
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index b49e56158ad..3597d9f80c4 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -3,7 +3,6 @@
3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012
4@c Free Software Foundation, Inc. 4@c Free Software Foundation, Inc.
5@c See the file elisp.texi for copying conditions. 5@c See the file elisp.texi for copying conditions.
6@setfilename ../../info/files
7@node Files, Backups and Auto-Saving, Documentation, Top 6@node Files, Backups and Auto-Saving, Documentation, Top
8@comment node-name, next, previous, up 7@comment node-name, next, previous, up
9@chapter Files 8@chapter Files
@@ -490,11 +489,13 @@ in particular buffers.
490@defopt require-final-newline 489@defopt require-final-newline
491This variable determines whether files may be written out that do 490This variable determines whether files may be written out that do
492@emph{not} end with a newline. If the value of the variable is 491@emph{not} end with a newline. If the value of the variable is
493@code{t}, then @code{save-buffer} silently adds a newline at the end of 492@code{t}, then @code{save-buffer} silently adds a newline at the end
494the file whenever the buffer being saved does not already end in one. 493of the buffer whenever it does not already end in one. If the value
495If the value of the variable is non-@code{nil}, but not @code{t}, then 494is @code{visit}, Emacs adds a missing newline just after it visits the
496@code{save-buffer} asks the user whether to add a newline each time the 495file. If the value is @code{visit-save}, Emacs adds a missing newline
497case arises. 496both on visiting and on saving. For any other non-@code{nil} value,
497@code{save-buffer} asks the user whether to add a newline each time
498the case arises.
498 499
499If the value of the variable is @code{nil}, then @code{save-buffer} 500If the value of the variable is @code{nil}, then @code{save-buffer}
500doesn't add newlines at all. @code{nil} is the default value, but a few 501doesn't add newlines at all. @code{nil} is the default value, but a few
@@ -2154,7 +2155,7 @@ double all @samp{$} characters to prevent subsequent incorrect
2154results. 2155results.
2155 2156
2156@c Wordy to avoid overfull hbox. --rjc 15mar92 2157@c Wordy to avoid overfull hbox. --rjc 15mar92
2157Here we assume that the environment variable @code{HOME}, which holds 2158Here we assume that the environment variable @env{HOME}, which holds
2158the user's home directory name, has value @samp{/xcssun/users/rms}. 2159the user's home directory name, has value @samp{/xcssun/users/rms}.
2159 2160
2160@example 2161@example
@@ -2239,9 +2240,9 @@ non-@code{nil}. To use it, you should expand the prefix against
2239the proper directory before calling @code{make-temp-file}. 2240the proper directory before calling @code{make-temp-file}.
2240 2241
2241@defopt temporary-file-directory 2242@defopt temporary-file-directory
2242@cindex @code{TMPDIR} environment variable 2243@cindex @env{TMPDIR} environment variable
2243@cindex @code{TMP} environment variable 2244@cindex @env{TMP} environment variable
2244@cindex @code{TEMP} environment variable 2245@cindex @env{TEMP} environment variable
2245This variable specifies the directory name for creating temporary files. 2246This variable specifies the directory name for creating temporary files.
2246Its value should be a directory name (@pxref{Directory Names}), but it 2247Its value should be a directory name (@pxref{Directory Names}), but it
2247is good for Lisp programs to cope if the value is a directory's file 2248is good for Lisp programs to cope if the value is a directory's file
@@ -2249,7 +2250,7 @@ name instead. Using the value as the second argument to
2249@code{expand-file-name} is a good way to achieve that. 2250@code{expand-file-name} is a good way to achieve that.
2250 2251
2251The default value is determined in a reasonable way for your operating 2252The default value is determined in a reasonable way for your operating
2252system; it is based on the @code{TMPDIR}, @code{TMP} and @code{TEMP} 2253system; it is based on the @env{TMPDIR}, @env{TMP} and @env{TEMP}
2253environment variables, with a fall-back to a system-dependent name if 2254environment variables, with a fall-back to a system-dependent name if
2254none of these variables is defined. 2255none of these variables is defined.
2255 2256
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi
index 125d6071cab..d824f51e47e 100644
--- a/doc/lispref/frames.texi
+++ b/doc/lispref/frames.texi
@@ -2,7 +2,6 @@
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 Free Software Foundation, Inc. 3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5@setfilename ../../info/frames
6@node Frames, Positions, Windows, Top 5@node Frames, Positions, Windows, Top
7@chapter Frames 6@chapter Frames
8@cindex frame 7@cindex frame
@@ -488,7 +487,7 @@ frame. @code{title} and @code{name} are meaningful on all terminals.
488@item display 487@item display
489The display on which to open this frame. It should be a string of the 488The display on which to open this frame. It should be a string of the
490form @code{"@var{host}:@var{dpy}.@var{screen}"}, just like the 489form @code{"@var{host}:@var{dpy}.@var{screen}"}, just like the
491@code{DISPLAY} environment variable. 490@env{DISPLAY} environment variable.
492 491
493@vindex display-type, a frame parameter 492@vindex display-type, a frame parameter
494@item display-type 493@item display-type
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi
index 9ee94557066..73bdefe19fc 100644
--- a/doc/lispref/functions.texi
+++ b/doc/lispref/functions.texi
@@ -3,7 +3,6 @@
3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012
4@c Free Software Foundation, Inc. 4@c Free Software Foundation, Inc.
5@c See the file elisp.texi for copying conditions. 5@c See the file elisp.texi for copying conditions.
6@setfilename ../../info/functions
7@node Functions, Macros, Variables, Top 6@node Functions, Macros, Variables, Top
8@chapter Functions 7@chapter Functions
9 8
diff --git a/doc/lispref/gpl.texi b/doc/lispref/gpl.texi
index 244f3330d44..0eb877328e1 100644
--- a/doc/lispref/gpl.texi
+++ b/doc/lispref/gpl.texi
@@ -1,5 +1,4 @@
1@c -*-texinfo-*- 1@c -*-texinfo-*-
2@setfilename ../../info/gpl
3 2
4@node GPL, Tips, GNU Free Documentation License, Top 3@node GPL, Tips, GNU Free Documentation License, Top
5@comment node-name, next, previous, up 4@comment node-name, next, previous, up
diff --git a/doc/lispref/hash.texi b/doc/lispref/hash.texi
index 0a2783b6f16..0ca4c915a65 100644
--- a/doc/lispref/hash.texi
+++ b/doc/lispref/hash.texi
@@ -1,8 +1,7 @@
1@c -*-texinfo-*- 1@c -*-texinfo-*-
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1999, 2001-2012 Free Software Foundation, Inc. 3@c Copyright (C) 1999, 2001-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5@setfilename ../../info/hash
6@node Hash Tables, Symbols, Sequences Arrays Vectors, Top 5@node Hash Tables, Symbols, Sequences Arrays Vectors, Top
7@chapter Hash Tables 6@chapter Hash Tables
8@cindex hash tables 7@cindex hash tables
diff --git a/doc/lispref/help.texi b/doc/lispref/help.texi
index c703e7810f8..5dfb2b05ff8 100644
--- a/doc/lispref/help.texi
+++ b/doc/lispref/help.texi
@@ -3,7 +3,6 @@
3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012
4@c Free Software Foundation, Inc. 4@c Free Software Foundation, Inc.
5@c See the file elisp.texi for copying conditions. 5@c See the file elisp.texi for copying conditions.
6@setfilename ../../info/help
7@node Documentation, Files, Modes, Top 6@node Documentation, Files, Modes, Top
8@chapter Documentation 7@chapter Documentation
9@cindex documentation strings 8@cindex documentation strings
@@ -180,7 +179,7 @@ face.
180@c Wordy to prevent overfull hboxes. --rjc 15mar92 179@c Wordy to prevent overfull hboxes. --rjc 15mar92
181Here is an example of using the two functions, @code{documentation} and 180Here is an example of using the two functions, @code{documentation} and
182@code{documentation-property}, to display the documentation strings for 181@code{documentation-property}, to display the documentation strings for
183several symbols in a @samp{*Help*} buffer. 182several symbols in a @file{*Help*} buffer.
184 183
185@anchor{describe-symbols example} 184@anchor{describe-symbols example}
186@smallexample 185@smallexample
@@ -348,6 +347,21 @@ This function scans @var{string} for the above special sequences and
348replaces them by what they stand for, returning the result as a string. 347replaces them by what they stand for, returning the result as a string.
349This permits display of documentation that refers accurately to the 348This permits display of documentation that refers accurately to the
350user's own customized key bindings. 349user's own customized key bindings.
350
351@cindex advertised binding
352If a command has multiple bindings, this function normally uses the
353first one it finds. You can specify one particular key binding by
354assigning an @code{:advertised-binding} symbol property to the
355command, like this:
356
357@smallexample
358(put 'undo :advertised-binding [?\C-/])
359@end smallexample
360
361@noindent
362The @code{:advertised-binding} property also affects the binding shown
363in menu items (@pxref{Menu Bar}). The property is ignored if it
364specifies a key binding that the command does not actually have.
351@end defun 365@end defun
352 366
353 Here are examples of the special sequences: 367 Here are examples of the special sequences:
@@ -535,7 +549,7 @@ seems to be as a match. Each of the remaining elements is a
535documentation string, or @code{nil}, for @var{symbol} as a function, 549documentation string, or @code{nil}, for @var{symbol} as a function,
536variable, etc. 550variable, etc.
537 551
538It also displays the symbols in a buffer named @samp{*Apropos*}, each 552It also displays the symbols in a buffer named @file{*Apropos*}, each
539with a one-line description taken from the beginning of its 553with a one-line description taken from the beginning of its
540documentation string. 554documentation string.
541 555
@@ -648,7 +662,7 @@ certain documentation and text files that come with Emacs.
648 662
649@defun help-buffer 663@defun help-buffer
650This function returns the name of the help buffer, which is normally 664This function returns the name of the help buffer, which is normally
651@samp{*Help*}; if such a buffer does not exist, it is first created. 665@file{*Help*}; if such a buffer does not exist, it is first created.
652@end defun 666@end defun
653 667
654@defmac with-help-window buffer-name body@dots{} 668@defmac with-help-window buffer-name body@dots{}
@@ -662,16 +676,16 @@ scroll the help window.
662@end defmac 676@end defmac
663 677
664@defun help-setup-xref item interactive-p 678@defun help-setup-xref item interactive-p
665This function updates the cross reference data in the @samp{*Help*} 679This function updates the cross reference data in the @file{*Help*}
666buffer, which is used to regenerate the help information when the user 680buffer, which is used to regenerate the help information when the user
667clicks on the @samp{Back} or @samp{Forward} buttons. Most commands 681clicks on the @samp{Back} or @samp{Forward} buttons. Most commands
668that use the @samp{*Help*} buffer should invoke this function before 682that use the @file{*Help*} buffer should invoke this function before
669clearing the buffer. The @var{item} argument should have the form 683clearing the buffer. The @var{item} argument should have the form
670@code{(@var{function} . @var{args})}, where @var{function} is a function 684@code{(@var{function} . @var{args})}, where @var{function} is a function
671to call, with argument list @var{args}, to regenerate the help buffer. 685to call, with argument list @var{args}, to regenerate the help buffer.
672The @var{interactive-p} argument is non-@code{nil} if the calling 686The @var{interactive-p} argument is non-@code{nil} if the calling
673command was invoked interactively; in that case, the stack of items 687command was invoked interactively; in that case, the stack of items
674for the @samp{*Help*} buffer's @samp{Back} buttons is cleared. 688for the @file{*Help*} buffer's @samp{Back} buttons is cleared.
675@end defun 689@end defun
676 690
677@xref{describe-symbols example}, for an example of using 691@xref{describe-symbols example}, for an example of using
diff --git a/doc/lispref/hooks.texi b/doc/lispref/hooks.texi
index 0d29c25c8b1..8aed3c676e2 100644
--- a/doc/lispref/hooks.texi
+++ b/doc/lispref/hooks.texi
@@ -2,7 +2,6 @@
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990-1993, 1998, 2001-2012 Free Software Foundation, Inc. 3@c Copyright (C) 1990-1993, 1998, 2001-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5@setfilename ../../info/hooks
6@node Standard Hooks, Index, Standard Keymaps, Top 5@node Standard Hooks, Index, Standard Keymaps, Top
7@appendix Standard Hooks 6@appendix Standard Hooks
8@cindex standard hooks 7@cindex standard hooks
diff --git a/doc/lispref/index.texi b/doc/lispref/index.texi
index 6cdadf94491..ebdb4eb84b1 100644
--- a/doc/lispref/index.texi
+++ b/doc/lispref/index.texi
@@ -1,5 +1,4 @@
1@c -*-texinfo-*- 1@c -*-texinfo-*-
2@setfilename ../../info/index
3 2
4@c Indexing guidelines 3@c Indexing guidelines
5 4
diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi
index edf892e751a..c9758f8704a 100644
--- a/doc/lispref/internals.texi
+++ b/doc/lispref/internals.texi
@@ -2,7 +2,6 @@
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990-1993, 1998-1999, 2001-2012 Free Software Foundation, Inc. 3@c Copyright (C) 1990-1993, 1998-1999, 2001-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5@setfilename ../../info/internals
6@node GNU Emacs Internals, Standard Errors, Tips, Top 5@node GNU Emacs Internals, Standard Errors, Tips, Top
7@comment node-name, next, previous, up 6@comment node-name, next, previous, up
8@appendix GNU Emacs Internals 7@appendix GNU Emacs Internals
diff --git a/doc/lispref/intro.texi b/doc/lispref/intro.texi
index 365c5f3122e..d3a5b253162 100644
--- a/doc/lispref/intro.texi
+++ b/doc/lispref/intro.texi
@@ -1,8 +1,7 @@
1@c -*-coding: iso-latin-1-*- 1@c -*-coding: iso-latin-1-*-
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990-1994, 2001-2012 Free Software Foundation, Inc. 3@c Copyright (C) 1990-1994, 2001-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5@setfilename ../../info/intro
6 5
7@node Introduction, Lisp Data Types, Top, Top 6@node Introduction, Lisp Data Types, Top, Top
8@comment node-name, next, previous, up 7@comment node-name, next, previous, up
@@ -247,7 +246,7 @@ indicated with @samp{@equiv{}}.
247 246
248 Many of the examples in this manual print text when they are 247 Many of the examples in this manual print text when they are
249evaluated. If you execute example code in a Lisp Interaction buffer 248evaluated. If you execute example code in a Lisp Interaction buffer
250(such as the buffer @samp{*scratch*}), the printed text is inserted into 249(such as the buffer @file{*scratch*}), the printed text is inserted into
251the buffer. If you execute the example by other means (such as by 250the buffer. If you execute the example by other means (such as by
252evaluating the function @code{eval-region}), the printed text is 251evaluating the function @code{eval-region}), the printed text is
253displayed in the echo area. 252displayed in the echo area.
diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi
index 5dd57ccb4ac..b12752fdeea 100644
--- a/doc/lispref/keymaps.texi
+++ b/doc/lispref/keymaps.texi
@@ -2,7 +2,6 @@
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990-1994, 1998-2012 Free Software Foundation, Inc. 3@c Copyright (C) 1990-1994, 1998-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5@setfilename ../../info/keymaps
6@node Keymaps, Modes, Command Loop, Top 5@node Keymaps, Modes, Command Loop, Top
7@chapter Keymaps 6@chapter Keymaps
8@cindex keymap 7@cindex keymap
@@ -64,7 +63,7 @@ constituent events; thus, @code{"\C-xl"} represents the key sequence
64@kbd{C-x l}. 63@kbd{C-x l}.
65 64
66 Key sequences containing function keys, mouse button events, or 65 Key sequences containing function keys, mouse button events, or
67non-ASCII characters such as @kbd{C-=} or @kbd{H-a} cannot be 66non-@acronym{ASCII} characters such as @kbd{C-=} or @kbd{H-a} cannot be
68represented as strings; they have to be represented as vectors. 67represented as strings; they have to be represented as vectors.
69 68
70 In the vector representation, each element of the vector represents 69 In the vector representation, each element of the vector represents
@@ -808,7 +807,7 @@ bindings.
808@defun current-local-map 807@defun current-local-map
809This function returns the current buffer's local keymap, or @code{nil} 808This function returns the current buffer's local keymap, or @code{nil}
810if it has none. In the following example, the keymap for the 809if it has none. In the following example, the keymap for the
811@samp{*scratch*} buffer (using Lisp Interaction mode) is a sparse keymap 810@file{*scratch*} buffer (using Lisp Interaction mode) is a sparse keymap
812in which the entry for @key{ESC}, @acronym{ASCII} code 27, is another sparse 811in which the entry for @key{ESC}, @acronym{ASCII} code 27, is another sparse
813keymap. 812keymap.
814 813
@@ -1922,7 +1921,7 @@ other command. However, if @var{no-remap} is non-@code{nil}.
1922 1921
1923@deffn Command describe-bindings &optional prefix buffer-or-name 1922@deffn Command describe-bindings &optional prefix buffer-or-name
1924This function creates a listing of all current key bindings, and 1923This function creates a listing of all current key bindings, and
1925displays it in a buffer named @samp{*Help*}. The text is grouped by 1924displays it in a buffer named @file{*Help*}. The text is grouped by
1926modes---minor modes first, then the major mode, then global bindings. 1925modes---minor modes first, then the major mode, then global bindings.
1927 1926
1928If @var{prefix} is non-@code{nil}, it should be a prefix key; then the 1927If @var{prefix} is non-@code{nil}, it should be a prefix key; then the
@@ -2549,17 +2548,8 @@ the same command (if such a key binding exists). This serves as a
2549convenient hint for users who do not know the key binding. If a 2548convenient hint for users who do not know the key binding. If a
2550command has multiple bindings, Emacs normally displays the first one 2549command has multiple bindings, Emacs normally displays the first one
2551it finds. You can specify one particular key binding by assigning an 2550it finds. You can specify one particular key binding by assigning an
2552@code{:advertised-binding} symbol property to the command. For 2551@code{:advertised-binding} symbol property to the command. @xref{Keys
2553instance, the following tells Emacs to show @kbd{C-/} for the 2552in Documentation}.
2554@code{undo} menu item:
2555
2556@smallexample
2557(put 'undo :advertised-binding [?\C-/])
2558@end smallexample
2559
2560@noindent
2561If the @code{:advertised-binding} property specifies a key binding
2562that the command does not actually have, it is ignored.
2563 2553
2564@node Tool Bar 2554@node Tool Bar
2565@subsection Tool bars 2555@subsection Tool bars
diff --git a/doc/lispref/lists.texi b/doc/lispref/lists.texi
index c8433c79b54..2325915d76a 100644
--- a/doc/lispref/lists.texi
+++ b/doc/lispref/lists.texi
@@ -1,8 +1,7 @@
1@c -*-texinfo-*- 1@c -*-texinfo-*-
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 Free Software Foundation, Inc. 3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5@setfilename ../../info/lists
6@node Lists, Sequences Arrays Vectors, Strings and Characters, Top 5@node Lists, Sequences Arrays Vectors, Strings and Characters, Top
7@chapter Lists 6@chapter Lists
8@cindex lists 7@cindex lists
diff --git a/doc/lispref/loading.texi b/doc/lispref/loading.texi
index 47a2a39ed63..2bd500d8479 100644
--- a/doc/lispref/loading.texi
+++ b/doc/lispref/loading.texi
@@ -3,7 +3,6 @@
3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012
4@c Free Software Foundation, Inc. 4@c Free Software Foundation, Inc.
5@c See the file elisp.texi for copying conditions. 5@c See the file elisp.texi for copying conditions.
6@setfilename ../../info/loading
7@node Loading, Byte Compilation, Customization, Top 6@node Loading, Byte Compilation, Customization, Top
8@chapter Loading 7@chapter Loading
9@cindex loading 8@cindex loading
@@ -235,7 +234,7 @@ it skips the latter group.
235in a list of directories specified by the variable @code{load-path}. 234in a list of directories specified by the variable @code{load-path}.
236 235
237@defvar load-path 236@defvar load-path
238@cindex @code{EMACSLOADPATH} environment variable 237@cindex @env{EMACSLOADPATH} environment variable
239The value of this variable is a list of directories to search when 238The value of this variable is a list of directories to search when
240loading files with @code{load}. Each element is a string (which must be 239loading files with @code{load}. Each element is a string (which must be
241a directory name) or @code{nil} (which stands for the current working 240a directory name) or @code{nil} (which stands for the current working
@@ -375,7 +374,7 @@ strings are multibyte strings should not be noticeable, since
375inserting them in unibyte buffers converts them to unibyte 374inserting them in unibyte buffers converts them to unibyte
376automatically. However, if this does make a difference, you can force 375automatically. However, if this does make a difference, you can force
377a particular Lisp file to be interpreted as unibyte by writing 376a particular Lisp file to be interpreted as unibyte by writing
378@samp{-*-unibyte: t;-*-} in a comment on the file's first line. With 377@samp{unibyte: t} in a local variables section. With
379that designator, the file will unconditionally be interpreted as 378that designator, the file will unconditionally be interpreted as
380unibyte, even in an ordinary multibyte Emacs session. This can matter 379unibyte, even in an ordinary multibyte Emacs session. This can matter
381when making keybindings to non-@acronym{ASCII} characters written as 380when making keybindings to non-@acronym{ASCII} characters written as
diff --git a/doc/lispref/macros.texi b/doc/lispref/macros.texi
index a71d3379b80..bc4cec3307d 100644
--- a/doc/lispref/macros.texi
+++ b/doc/lispref/macros.texi
@@ -1,8 +1,7 @@
1@c -*-texinfo-*- 1@c -*-texinfo-*-
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990-1995, 1998, 2001-2012 Free Software Foundation, Inc. 3@c Copyright (C) 1990-1995, 1998, 2001-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5@setfilename ../../info/macros
6@node Macros, Customization, Functions, Top 5@node Macros, Customization, Functions, Top
7@chapter Macros 6@chapter Macros
8@cindex macros 7@cindex macros
diff --git a/doc/lispref/maps.texi b/doc/lispref/maps.texi
index b303562028b..cb5734d71d0 100644
--- a/doc/lispref/maps.texi
+++ b/doc/lispref/maps.texi
@@ -2,7 +2,6 @@
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990-1993, 1999, 2001-2012 Free Software Foundation, Inc. 3@c Copyright (C) 1990-1993, 1999, 2001-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5@setfilename ../../info/maps
6@node Standard Keymaps, Standard Hooks, Standard Errors, Top 5@node Standard Keymaps, Standard Hooks, Standard Errors, Top
7@appendix Standard Keymaps 6@appendix Standard Keymaps
8@cindex keymaps, standard 7@cindex keymaps, standard
diff --git a/doc/lispref/markers.texi b/doc/lispref/markers.texi
index 25a9fc88fc5..ba9d429314d 100644
--- a/doc/lispref/markers.texi
+++ b/doc/lispref/markers.texi
@@ -2,7 +2,6 @@
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 Free Software Foundation, Inc. 3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5@setfilename ../../info/markers
6@node Markers, Text, Positions, Top 5@node Markers, Text, Positions, Top
7@chapter Markers 6@chapter Markers
8@cindex markers 7@cindex markers
diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi
index 437a2daa8e3..c840eb6ded0 100644
--- a/doc/lispref/minibuf.texi
+++ b/doc/lispref/minibuf.texi
@@ -3,7 +3,6 @@
3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012
4@c Free Software Foundation, Inc. 4@c Free Software Foundation, Inc.
5@c See the file elisp.texi for copying conditions. 5@c See the file elisp.texi for copying conditions.
6@setfilename ../../info/minibuf
7@node Minibuffers, Command Loop, Read and Print, Top 6@node Minibuffers, Command Loop, Read and Print, Top
8@chapter Minibuffers 7@chapter Minibuffers
9@cindex arguments, reading 8@cindex arguments, reading
@@ -30,8 +29,8 @@ argument.
30* Multiple Queries:: Asking a series of similar questions. 29* Multiple Queries:: Asking a series of similar questions.
31* Reading a Password:: Reading a password from the terminal. 30* Reading a Password:: Reading a password from the terminal.
32* Minibuffer Commands:: Commands used as key bindings in minibuffers. 31* Minibuffer Commands:: Commands used as key bindings in minibuffers.
33* Minibuffer Contents:: How such commands access the minibuffer text.
34* Minibuffer Windows:: Operating on the special minibuffer windows. 32* Minibuffer Windows:: Operating on the special minibuffer windows.
33* Minibuffer Contents:: How such commands access the minibuffer text.
35* Recursive Mini:: Whether recursive entry to minibuffer is allowed. 34* Recursive Mini:: Whether recursive entry to minibuffer is allowed.
36* Minibuffer Misc:: Various customization hooks and variables. 35* Minibuffer Misc:: Various customization hooks and variables.
37@end menu 36@end menu
@@ -60,8 +59,10 @@ boundary between the prompt and the actual text.
60 59
61 The minibuffer's window is normally a single line; it grows 60 The minibuffer's window is normally a single line; it grows
62automatically if the contents require more space. You can explicitly 61automatically if the contents require more space. You can explicitly
62@c FIXME? Works in 23.4, not 24.0.95. (Bug#11276)
63resize it temporarily with the window sizing commands; it reverts to 63resize it temporarily with the window sizing commands; it reverts to
64its normal size when the minibuffer is exited. You can resize it 64its normal size when the minibuffer is exited. You can resize it
65@c FIXME? Doesn't work in any version of Emacs?
65permanently by using the window sizing commands in the frame's other 66permanently by using the window sizing commands in the frame's other
66window, when the minibuffer is not active. If the frame contains just 67window, when the minibuffer is not active. If the frame contains just
67a minibuffer, you can change the minibuffer's size by changing the 68a minibuffer, you can change the minibuffer's size by changing the
@@ -73,9 +74,9 @@ of variables such as @code{this-command} and @code{last-command}
73code that uses the minibuffer, if you do not want that to change them. 74code that uses the minibuffer, if you do not want that to change them.
74 75
75 Under some circumstances, a command can use a minibuffer even if 76 Under some circumstances, a command can use a minibuffer even if
76there is an active minibuffer; such minibuffers are called a 77there is an active minibuffer; such a minibuffer is called a
77@dfn{recursive minibuffer}. The first minibuffer is named 78@dfn{recursive minibuffer}. The first minibuffer is named
78@w{@samp{ *Minibuf-0*}}. Recursive minibuffers are named by 79@w{@samp{ *Minibuf-1*}}. Recursive minibuffers are named by
79incrementing the number at the end of the name. (The names begin with 80incrementing the number at the end of the name. (The names begin with
80a space so that they won't show up in normal buffer lists.) Of 81a space so that they won't show up in normal buffer lists.) Of
81several recursive minibuffers, the innermost (or most recently 82several recursive minibuffers, the innermost (or most recently
@@ -91,6 +92,12 @@ to be done. @xref{Text from Minibuffer}, for the non-completion
91minibuffer local maps. @xref{Completion Commands}, for the minibuffer 92minibuffer local maps. @xref{Completion Commands}, for the minibuffer
92local maps for completion. 93local maps for completion.
93 94
95@cindex inactive minibuffer
96 When a minibuffer is inactive, its major mode is
97@code{minibuffer-inactive-mode}, with keymap
98@code{minibuffer-inactive-mode-map}. This is only really useful if
99the minibuffer is in a separate frame. @xref{Minibuffers and Frames}.
100
94 When Emacs is running in batch mode, any request to read from the 101 When Emacs is running in batch mode, any request to read from the
95minibuffer actually reads a line from the standard input descriptor that 102minibuffer actually reads a line from the standard input descriptor that
96was supplied when Emacs was started. 103was supplied when Emacs was started.
@@ -111,7 +118,7 @@ middle of a Lisp function. Instead, do all minibuffer input as part of
111reading the arguments for a command, in the @code{interactive} 118reading the arguments for a command, in the @code{interactive}
112specification. @xref{Defining Commands}. 119specification. @xref{Defining Commands}.
113 120
114@defun read-from-minibuffer prompt-string &optional initial-contents keymap read hist default inherit-input-method 121@defun read-from-minibuffer prompt &optional initial keymap read history default inherit-input-method
115This function is the most general way to get input from the 122This function is the most general way to get input from the
116minibuffer. By default, it accepts arbitrary text and returns it as a 123minibuffer. By default, it accepts arbitrary text and returns it as a
117string; however, if @var{read} is non-@code{nil}, then it uses 124string; however, if @var{read} is non-@code{nil}, then it uses
@@ -119,8 +126,8 @@ string; however, if @var{read} is non-@code{nil}, then it uses
119Functions}). 126Functions}).
120 127
121The first thing this function does is to activate a minibuffer and 128The first thing this function does is to activate a minibuffer and
122display it with @var{prompt-string} as the prompt. This value must be a 129display it with @var{prompt} (which must be a string) as the
123string. Then the user can edit text in the minibuffer. 130prompt. Then the user can edit text in the minibuffer.
124 131
125When the user types a command to exit the minibuffer, 132When the user types a command to exit the minibuffer,
126@code{read-from-minibuffer} constructs the return value from the text in 133@code{read-from-minibuffer} constructs the return value from the text in
@@ -132,7 +139,7 @@ reads the text and returns the resulting Lisp object, unevaluated.
132The argument @var{default} specifies default values to make available 139The argument @var{default} specifies default values to make available
133through the history commands. It should be a string, a list of 140through the history commands. It should be a string, a list of
134strings, or @code{nil}. The string or strings become the minibuffer's 141strings, or @code{nil}. The string or strings become the minibuffer's
135``future history,'' available to the user with @kbd{M-n}. 142``future history'', available to the user with @kbd{M-n}.
136 143
137If @var{read} is non-@code{nil}, then @var{default} is also used 144If @var{read} is non-@code{nil}, then @var{default} is also used
138as the input to @code{read}, if the user enters empty input. 145as the input to @code{read}, if the user enters empty input.
@@ -149,12 +156,13 @@ value of @code{minibuffer-local-map} is used as the keymap. Specifying
149a keymap is the most important way to customize the minibuffer for 156a keymap is the most important way to customize the minibuffer for
150various applications such as completion. 157various applications such as completion.
151 158
152The argument @var{hist} specifies which history list variable to use 159The argument @var{history} specifies a history list variable to use
153for saving the input and for history commands used in the minibuffer. 160for saving the input and for history commands used in the minibuffer.
154It defaults to @code{minibuffer-history}. @xref{Minibuffer History}. 161It defaults to @code{minibuffer-history}. You can optionally specify
162a starting position in the history list as well. @xref{Minibuffer History}.
155 163
156If the variable @code{minibuffer-allow-text-properties} is 164If the variable @code{minibuffer-allow-text-properties} is
157non-@code{nil}, then the string which is returned includes whatever text 165non-@code{nil}, then the string that is returned includes whatever text
158properties were present in the minibuffer. Otherwise all the text 166properties were present in the minibuffer. Otherwise all the text
159properties are stripped when the value is returned. 167properties are stripped when the value is returned.
160 168
@@ -164,9 +172,9 @@ the setting of @code{enable-multibyte-characters} (@pxref{Text
164Representations}) from whichever buffer was current before entering the 172Representations}) from whichever buffer was current before entering the
165minibuffer. 173minibuffer.
166 174
167Use of @var{initial-contents} is mostly deprecated; we recommend using 175Use of @var{initial} is mostly deprecated; we recommend using
168a non-@code{nil} value only in conjunction with specifying a cons cell 176a non-@code{nil} value only in conjunction with specifying a cons cell
169for @var{hist}. @xref{Initial Input}. 177for @var{history}. @xref{Initial Input}.
170@end defun 178@end defun
171 179
172@defun read-string prompt &optional initial history default inherit-input-method 180@defun read-string prompt &optional initial history default inherit-input-method
@@ -179,11 +187,11 @@ The optional argument @var{default} is used as in
179@code{read-from-minibuffer}, except that, if non-@code{nil}, it also 187@code{read-from-minibuffer}, except that, if non-@code{nil}, it also
180specifies a default value to return if the user enters null input. As 188specifies a default value to return if the user enters null input. As
181in @code{read-from-minibuffer} it should be a string, a list of 189in @code{read-from-minibuffer} it should be a string, a list of
182strings, or @code{nil} which is equivalent to an empty string. When 190strings, or @code{nil}, which is equivalent to an empty string. When
183@var{default} is a string, that string is the default value. When it 191@var{default} is a string, that string is the default value. When it
184is a list of strings, the first string is the default value. (All 192is a list of strings, the first string is the default value. (All
185these strings are available to the user in the ``future minibuffer 193these strings are available to the user in the ``future minibuffer
186history.'') 194history''.)
187 195
188This function works by calling the 196This function works by calling the
189@code{read-from-minibuffer} function: 197@code{read-from-minibuffer} function:
@@ -202,16 +210,16 @@ This function works by calling the
202@end smallexample 210@end smallexample
203@end defun 211@end defun
204 212
205@defun read-regexp prompt &optional default-value 213@defun read-regexp prompt &optional default
206This function reads a regular expression as a string from the 214This function reads a regular expression as a string from the
207minibuffer and returns it. The argument @var{prompt} is used as in 215minibuffer and returns it. The argument @var{prompt} is used as in
208@code{read-from-minibuffer}. The keymap used is 216@code{read-from-minibuffer}. The keymap used is
209@code{minibuffer-local-map}, and @code{regexp-history} is used as the 217@code{minibuffer-local-map}, and @code{regexp-history} is used as the
210history list (@pxref{Minibuffer History, regexp-history}). 218history list (@pxref{Minibuffer History, regexp-history}).
211 219
212The optional argument @var{default-value} specifies a default value to 220The optional argument @var{default} specifies a default value to
213return if the user enters null input; it should be a string, or 221return if the user enters null input; it should be a string, or
214@code{nil} which is equivalent to an empty string. 222@code{nil}, which is equivalent to an empty string.
215 223
216In addition, @code{read-regexp} collects a few useful candidates for 224In addition, @code{read-regexp} collects a few useful candidates for
217input and passes them to @code{read-from-minibuffer}, to make them 225input and passes them to @code{read-from-minibuffer}, to make them
@@ -235,9 +243,9 @@ function, after computing the list of defaults as described above.
235@end defun 243@end defun
236 244
237@defvar minibuffer-allow-text-properties 245@defvar minibuffer-allow-text-properties
238If this variable is @code{nil}, then @code{read-from-minibuffer} strips 246If this variable is @code{nil}, then @code{read-from-minibuffer}
239all text properties from the minibuffer input before returning it. 247and @code{read-string} strip all text properties from the minibuffer
240This variable also affects @code{read-string}. However, 248input before returning it. However,
241@code{read-no-blanks-input} (see below), as well as 249@code{read-no-blanks-input} (see below), as well as
242@code{read-minibuffer} and related functions (@pxref{Object from 250@code{read-minibuffer} and related functions (@pxref{Object from
243Minibuffer,, Reading Lisp Objects With the Minibuffer}), and all 251Minibuffer,, Reading Lisp Objects With the Minibuffer}), and all
@@ -275,6 +283,12 @@ default, it makes the following bindings:
275 283
276@item @kbd{M-r} 284@item @kbd{M-r}
277@code{previous-matching-history-element} 285@code{previous-matching-history-element}
286
287@ignore
288@c Does not seem worth/appropriate mentioning.
289@item @kbd{C-@key{TAB}}
290@code{file-cache-minibuffer-complete}
291@end ignore
278@end table 292@end table
279@end defvar 293@end defvar
280 294
@@ -305,6 +319,8 @@ This function discards text properties, regardless of the value of
305@end smallexample 319@end smallexample
306@end defun 320@end defun
307 321
322@c Slightly unfortunate name, suggesting it might be related to the
323@c Nextstep port...
308@defvar minibuffer-local-ns-map 324@defvar minibuffer-local-ns-map
309This built-in variable is the keymap used as the minibuffer local keymap 325This built-in variable is the keymap used as the minibuffer local keymap
310in the function @code{read-no-blanks-input}. By default, it makes the 326in the function @code{read-no-blanks-input}. By default, it makes the
@@ -389,23 +405,16 @@ This function simply evaluates the result of a call to
389@end defun 405@end defun
390 406
391@defun edit-and-eval-command prompt form 407@defun edit-and-eval-command prompt form
392This function reads a Lisp expression in the minibuffer, and then 408This function reads a Lisp expression in the minibuffer, evaluates it,
393evaluates it. The difference between this command and 409then returns the result. The difference between this command and
394@code{eval-minibuffer} is that here the initial @var{form} is not 410@code{eval-minibuffer} is that here the initial @var{form} is not
395optional and it is treated as a Lisp object to be converted to printed 411optional and it is treated as a Lisp object to be converted to printed
396representation rather than as a string of text. It is printed with 412representation rather than as a string of text. It is printed with
397@code{prin1}, so if it is a string, double-quote characters (@samp{"}) 413@code{prin1}, so if it is a string, double-quote characters (@samp{"})
398appear in the initial text. @xref{Output Functions}. 414appear in the initial text. @xref{Output Functions}.
399 415
400The first thing @code{edit-and-eval-command} does is to activate the
401minibuffer with @var{prompt} as the prompt. Then it inserts the printed
402representation of @var{form} in the minibuffer, and lets the user edit it.
403When the user exits the minibuffer, the edited text is read with
404@code{read} and then evaluated. The resulting value becomes the value
405of @code{edit-and-eval-command}.
406
407In the following example, we offer the user an expression with initial 416In the following example, we offer the user an expression with initial
408text which is a valid form already: 417text that is already a valid form:
409 418
410@smallexample 419@smallexample
411@group 420@group
@@ -425,7 +434,6 @@ Please edit: (forward-word 1)@point{}
425@noindent 434@noindent
426Typing @key{RET} right away would exit the minibuffer and evaluate the 435Typing @key{RET} right away would exit the minibuffer and evaluate the
427expression, thus moving point forward one word. 436expression, thus moving point forward one word.
428@code{edit-and-eval-command} returns @code{nil} in this example.
429@end defun 437@end defun
430 438
431@node Minibuffer History 439@node Minibuffer History
@@ -441,7 +449,7 @@ is a list of strings (previous inputs), most recent first.
441kinds of inputs. It's the Lisp programmer's job to specify the right 449kinds of inputs. It's the Lisp programmer's job to specify the right
442history list for each use of the minibuffer. 450history list for each use of the minibuffer.
443 451
444 You specify a minibuffer history list with the optional @var{hist} 452 You specify a minibuffer history list with the optional @var{history}
445argument to @code{read-from-minibuffer} or @code{completing-read}. 453argument to @code{read-from-minibuffer} or @code{completing-read}.
446Here are the possible values for it: 454Here are the possible values for it:
447 455
@@ -457,7 +465,7 @@ Specifying 0 for @var{startpos} is equivalent to just specifying the
457symbol @var{variable}. @code{previous-history-element} will display 465symbol @var{variable}. @code{previous-history-element} will display
458the most recent element of the history list in the minibuffer. If you 466the most recent element of the history list in the minibuffer. If you
459specify a positive @var{startpos}, the minibuffer history functions 467specify a positive @var{startpos}, the minibuffer history functions
460behave as if @code{(elt @var{variable} (1- @var{STARTPOS}))} were the 468behave as if @code{(elt @var{variable} (1- @var{startpos}))} were the
461history element currently shown in the minibuffer. 469history element currently shown in the minibuffer.
462 470
463For consistency, you should also specify that element of the history 471For consistency, you should also specify that element of the history
@@ -465,7 +473,7 @@ as the initial minibuffer contents, using the @var{initial} argument
465to the minibuffer input function (@pxref{Initial Input}). 473to the minibuffer input function (@pxref{Initial Input}).
466@end table 474@end table
467 475
468 If you don't specify @var{hist}, then the default history list 476 If you don't specify @var{history}, then the default history list
469@code{minibuffer-history} is used. For other standard history lists, 477@code{minibuffer-history} is used. For other standard history lists,
470see below. You can also create your own history list variable; just 478see below. You can also create your own history list variable; just
471initialize it to @code{nil} before the first use. 479initialize it to @code{nil} before the first use.
@@ -504,15 +512,15 @@ If the value of this variable is @code{nil}, standard functions that
504read from the minibuffer don't add new elements to the history list. 512read from the minibuffer don't add new elements to the history list.
505This lets Lisp programs explicitly manage input history by using 513This lets Lisp programs explicitly manage input history by using
506@code{add-to-history}. By default, @code{history-add-new-input} is 514@code{add-to-history}. By default, @code{history-add-new-input} is
507set to a non-@code{nil} value. 515non-@code{nil}.
508@end defvar 516@end defvar
509 517
510@defopt history-length 518@defopt history-length
511The value of this variable specifies the maximum length for all 519The value of this variable specifies the maximum length for all
512history lists that don't specify their own maximum lengths. If the 520history lists that don't specify their own maximum lengths. If the
513value is @code{t}, that means there is no maximum (don't delete old 521value is @code{t}, that means there is no maximum (don't delete old
514elements). The value of @code{history-length} property of the history 522elements). If a history list variable's symbol has a non-@code{nil}
515list variable's symbol, if set, overrides this variable for that 523@code{history-length} property, it overrides this variable for that
516particular history list. 524particular history list.
517@end defopt 525@end defopt
518 526
@@ -556,11 +564,19 @@ A history list for arguments that are shell commands.
556A history list for arguments that are Lisp expressions to evaluate. 564A history list for arguments that are Lisp expressions to evaluate.
557@end defvar 565@end defvar
558 566
567@defvar face-name-history
568A history list for arguments that are faces.
569@end defvar
570
571@c Less common: coding-system-history, input-method-history,
572@c command-history, grep-history, grep-find-history,
573@c read-envvar-name-history, setenv-history, yes-or-no-p-history.
574
559@node Initial Input 575@node Initial Input
560@section Initial Input 576@section Initial Input
561 577
562Several of the functions for minibuffer input have an argument called 578Several of the functions for minibuffer input have an argument called
563@var{initial} or @var{initial-contents}. This is a mostly-deprecated 579@var{initial}. This is a mostly-deprecated
564feature for specifying that the minibuffer should start out with 580feature for specifying that the minibuffer should start out with
565certain text, instead of empty as usual. 581certain text, instead of empty as usual.
566 582
@@ -577,7 +593,7 @@ to offer useful default inputs to the user.
577 593
578There is just one situation where you should specify a string for an 594There is just one situation where you should specify a string for an
579@var{initial} argument. This is when you specify a cons cell for the 595@var{initial} argument. This is when you specify a cons cell for the
580@var{hist} or @var{history} argument. @xref{Minibuffer History}. 596@var{history} argument. @xref{Minibuffer History}.
581 597
582@var{initial} can also be a cons cell of the form @code{(@var{string} 598@var{initial} can also be a cons cell of the form @code{(@var{string}
583. @var{position})}. This means to insert @var{string} in the 599. @var{position})}. This means to insert @var{string} in the
@@ -589,11 +605,10 @@ inconsistently in different functions. In @code{completing-read},
589of 0 means the beginning of the string, 1 means after the first 605of 0 means the beginning of the string, 1 means after the first
590character, etc. In @code{read-minibuffer}, and the other 606character, etc. In @code{read-minibuffer}, and the other
591non-completion minibuffer input functions that support this argument, 607non-completion minibuffer input functions that support this argument,
5921 means the beginning of the string 2 means after the first character, 6081 means the beginning of the string, 2 means after the first character,
593etc. 609etc.
594 610
595Use of a cons cell as the value for @var{initial} arguments is 611Use of a cons cell as the value for @var{initial} arguments is deprecated.
596deprecated in user code.
597 612
598@node Completion 613@node Completion
599@section Completion 614@section Completion
@@ -604,6 +619,7 @@ starting from an abbreviation for it. Completion works by comparing the
604user's input against a list of valid names and determining how much of 619user's input against a list of valid names and determining how much of
605the name is determined uniquely by what the user has typed. For 620the name is determined uniquely by what the user has typed. For
606example, when you type @kbd{C-x b} (@code{switch-to-buffer}) and then 621example, when you type @kbd{C-x b} (@code{switch-to-buffer}) and then
622@c "This is the sort of English up with which I will not put."
607type the first few letters of the name of the buffer to which you wish 623type the first few letters of the name of the buffer to which you wish
608to switch, and then type @key{TAB} (@code{minibuffer-complete}), Emacs 624to switch, and then type @key{TAB} (@code{minibuffer-complete}), Emacs
609extends the name as far as it can. 625extends the name as far as it can.
@@ -628,7 +644,7 @@ for reading certain kinds of names with completion.
628* Minibuffer Completion:: Invoking the minibuffer with completion. 644* Minibuffer Completion:: Invoking the minibuffer with completion.
629* Completion Commands:: Minibuffer commands that do completion. 645* Completion Commands:: Minibuffer commands that do completion.
630* High-Level Completion:: Convenient special cases of completion 646* High-Level Completion:: Convenient special cases of completion
631 (reading buffer name, file name, etc.). 647 (reading buffer names, variable names, etc.).
632* Reading File Names:: Using completion to read file names and 648* Reading File Names:: Using completion to read file names and
633 shell commands. 649 shell commands.
634* Completion Variables:: Variables controlling completion behavior. 650* Completion Variables:: Variables controlling completion behavior.
@@ -663,20 +679,14 @@ If @var{collection} is an alist (@pxref{Association Lists}), the
663permissible completions are the elements of the alist that are either 679permissible completions are the elements of the alist that are either
664strings, or conses whose @sc{car} is a string or symbol. 680strings, or conses whose @sc{car} is a string or symbol.
665Symbols are converted to strings using @code{symbol-name}. Other 681Symbols are converted to strings using @code{symbol-name}. Other
666elements of the alist are ignored. (Remember that in Emacs Lisp, the 682elements of the alist are ignored. (Remember that in Emacs Lisp, the
667elements of alists do not @emph{have} to be conses.) In particular, a 683elements of alists do not @emph{have} to be conses.) In particular, a
668list of strings is allowed, even though we usually do not 684list of strings is allowed, even though we usually do not
669think of such lists as alists. 685think of such lists as alists.
670 686
671@cindex obarray in completion 687@cindex obarray in completion
672If @var{collection} is an obarray (@pxref{Creating Symbols}), the names 688If @var{collection} is an obarray (@pxref{Creating Symbols}), the names
673of all symbols in the obarray form the set of permissible completions. The 689of all symbols in the obarray form the set of permissible completions.
674global variable @code{obarray} holds an obarray containing the names of
675all interned Lisp symbols.
676
677Note that the only valid way to make a new obarray is to create it
678empty and then add symbols to it one by one using @code{intern}.
679Also, you cannot intern a given symbol in more than one obarray.
680 690
681If @var{collection} is a hash table, then the keys that are strings 691If @var{collection} is a hash table, then the keys that are strings
682are the possible completions. Other keys are ignored. 692are the possible completions. Other keys are ignored.
@@ -757,16 +767,20 @@ too short). Both of those begin with the string @samp{foobar}.
757@end smallexample 767@end smallexample
758@end defun 768@end defun
759 769
760@defun all-completions string collection &optional predicate nospace 770@c Removed obsolete argument nospace.
771@defun all-completions string collection &optional predicate
761This function returns a list of all possible completions of 772This function returns a list of all possible completions of
762@var{string}. The arguments to this function (aside from 773@var{string}. The arguments to this function
763@var{nospace}) are the same as those of @code{try-completion}. Also, 774@c (aside from @var{nospace})
764this function uses @code{completion-regexp-list} in the same way that 775are the same as those of @code{try-completion}, and it
776uses @code{completion-regexp-list} in the same way that
765@code{try-completion} does. 777@code{try-completion} does.
766 778
779@ignore
767The optional argument @var{nospace} is obsolete. If it is 780The optional argument @var{nospace} is obsolete. If it is
768non-@code{nil}, completions that start with a space are ignored unless 781non-@code{nil}, completions that start with a space are ignored unless
769@var{string} starts with a space. 782@var{string} starts with a space.
783@end ignore
770 784
771If @var{collection} is a function, it is called with three arguments: 785If @var{collection} is a function, it is called with three arguments:
772@var{string}, @var{predicate} and @code{t}; then @code{all-completions} 786@var{string}, @var{predicate} and @code{t}; then @code{all-completions}
@@ -836,7 +850,7 @@ pertains to the area after @code{"/usr/"} and before @code{"/doc"}.
836@end defun 850@end defun
837 851
838If you store a completion alist in a variable, you should mark the 852If you store a completion alist in a variable, you should mark the
839variable as ``risky'' with a non-@code{nil} 853variable as ``risky'' by giving it a non-@code{nil}
840@code{risky-local-variable} property. @xref{File Local Variables}. 854@code{risky-local-variable} property. @xref{File Local Variables}.
841 855
842@defvar completion-ignore-case 856@defvar completion-ignore-case
@@ -865,7 +879,7 @@ proper value is done the first time you do completion using @var{var}.
865It is done by calling @var{fun} with no arguments. The 879It is done by calling @var{fun} with no arguments. The
866value @var{fun} returns becomes the permanent value of @var{var}. 880value @var{fun} returns becomes the permanent value of @var{var}.
867 881
868Here is a usage example: 882Here is an example:
869 883
870@smallexample 884@smallexample
871(defvar foo (lazy-completion-table foo make-my-alist)) 885(defvar foo (lazy-completion-table foo make-my-alist))
@@ -880,7 +894,7 @@ Here is a usage example:
880 This section describes the basic interface for reading from the 894 This section describes the basic interface for reading from the
881minibuffer with completion. 895minibuffer with completion.
882 896
883@defun completing-read prompt collection &optional predicate require-match initial hist default inherit-input-method 897@defun completing-read prompt collection &optional predicate require-match initial history default inherit-input-method
884This function reads a string in the minibuffer, assisting the user by 898This function reads a string in the minibuffer, assisting the user by
885providing completion. It activates the minibuffer with prompt 899providing completion. It activates the minibuffer with prompt
886@var{prompt}, which must be a string. 900@var{prompt}, which must be a string.
@@ -935,13 +949,13 @@ The function @code{completing-read} uses
935@code{minibuffer-local-must-match-map} if @var{require-match} is 949@code{minibuffer-local-must-match-map} if @var{require-match} is
936non-@code{nil}. @xref{Completion Commands}. 950non-@code{nil}. @xref{Completion Commands}.
937 951
938The argument @var{hist} specifies which history list variable to use for 952The argument @var{history} specifies which history list variable to use for
939saving the input and for minibuffer history commands. It defaults to 953saving the input and for minibuffer history commands. It defaults to
940@code{minibuffer-history}. @xref{Minibuffer History}. 954@code{minibuffer-history}. @xref{Minibuffer History}.
941 955
942The argument @var{initial} is mostly deprecated; we recommend using a 956The argument @var{initial} is mostly deprecated; we recommend using a
943non-@code{nil} value only in conjunction with specifying a cons cell 957non-@code{nil} value only in conjunction with specifying a cons cell
944for @var{hist}. @xref{Initial Input}. For default input, use 958for @var{history}. @xref{Initial Input}. For default input, use
945@var{default} instead. 959@var{default} instead.
946 960
947If the argument @var{inherit-input-method} is non-@code{nil}, then the 961If the argument @var{inherit-input-method} is non-@code{nil}, then the
@@ -950,7 +964,7 @@ Methods}) and the setting of @code{enable-multibyte-characters}
950(@pxref{Text Representations}) from whichever buffer was current before 964(@pxref{Text Representations}) from whichever buffer was current before
951entering the minibuffer. 965entering the minibuffer.
952 966
953If the built-in variable @code{completion-ignore-case} is 967If the variable @code{completion-ignore-case} is
954non-@code{nil}, completion ignores case when comparing the input 968non-@code{nil}, completion ignores case when comparing the input
955against the possible matches. @xref{Basic Completion}. In this mode 969against the possible matches. @xref{Basic Completion}. In this mode
956of operation, @var{predicate} must also ignore case, or you will get 970of operation, @var{predicate} must also ignore case, or you will get
@@ -1062,7 +1076,7 @@ using the value of the variable @code{minibuffer-completion-table} as
1062the @var{collection} argument, and the value of 1076the @var{collection} argument, and the value of
1063@code{minibuffer-completion-predicate} as the @var{predicate} argument. 1077@code{minibuffer-completion-predicate} as the @var{predicate} argument.
1064The list of completions is displayed as text in a buffer named 1078The list of completions is displayed as text in a buffer named
1065@samp{*Completions*}. 1079@file{*Completions*}.
1066@end deffn 1080@end deffn
1067 1081
1068@defun display-completion-list completions &optional common-substring 1082@defun display-completion-list completions &optional common-substring
@@ -1083,8 +1097,8 @@ uses this to highlight text in the completion list for better visual
1083feedback. This is not needed in the minibuffer; for minibuffer 1097feedback. This is not needed in the minibuffer; for minibuffer
1084completion, you can pass @code{nil}. 1098completion, you can pass @code{nil}.
1085 1099
1086This function is called by @code{minibuffer-completion-help}. The 1100This function is called by @code{minibuffer-completion-help}. A
1087most common way to use it is together with 1101common way to use it is together with
1088@code{with-output-to-temp-buffer}, like this: 1102@code{with-output-to-temp-buffer}, like this:
1089 1103
1090@example 1104@example
@@ -1118,7 +1132,7 @@ keymap makes the following bindings:
1118@end table 1132@end table
1119 1133
1120@noindent 1134@noindent
1121with other characters bound as in @code{minibuffer-local-map} 1135and uses @code{minibuffer-local-map} as its parent keymap
1122(@pxref{Definition of minibuffer-local-map}). 1136(@pxref{Definition of minibuffer-local-map}).
1123@end defvar 1137@end defvar
1124 1138
@@ -1130,15 +1144,6 @@ minibuffer unconditionally. By default, this keymap makes the following
1130bindings: 1144bindings:
1131 1145
1132@table @asis 1146@table @asis
1133@item @kbd{?}
1134@code{minibuffer-completion-help}
1135
1136@item @key{SPC}
1137@code{minibuffer-complete-word}
1138
1139@item @key{TAB}
1140@code{minibuffer-complete}
1141
1142@item @kbd{C-j} 1147@item @kbd{C-j}
1143@code{minibuffer-complete-and-exit} 1148@code{minibuffer-complete-and-exit}
1144 1149
@@ -1147,25 +1152,21 @@ bindings:
1147@end table 1152@end table
1148 1153
1149@noindent 1154@noindent
1150with other characters bound as in @code{minibuffer-local-map}. 1155and uses @code{minibuffer-local-completion-map} as its parent keymap.
1151@end defvar 1156@end defvar
1152 1157
1153@defvar minibuffer-local-filename-completion-map 1158@defvar minibuffer-local-filename-completion-map
1154This is like @code{minibuffer-local-completion-map} 1159This is a sparse keymap that simply unbinds @key{SPC}; because
1155except that it does not bind @key{SPC}. This keymap is used by the 1160filenames can contain spaces. The function @code{read-file-name}
1156function @code{read-file-name}. 1161combines this keymap with either @code{minibuffer-local-completion-map}
1162or @code{minibuffer-local-must-match-map}.
1157@end defvar 1163@end defvar
1158 1164
1159@defvar minibuffer-local-filename-must-match-map
1160This is like @code{minibuffer-local-must-match-map}
1161except that it does not bind @key{SPC}. This keymap is used by the
1162function @code{read-file-name}.
1163@end defvar
1164 1165
1165@node High-Level Completion 1166@node High-Level Completion
1166@subsection High-Level Completion Functions 1167@subsection High-Level Completion Functions
1167 1168
1168 This section describes the higher-level convenient functions for 1169 This section describes the higher-level convenience functions for
1169reading certain sorts of names with completion. 1170reading certain sorts of names with completion.
1170 1171
1171 In most cases, you should not call these functions in the middle of a 1172 In most cases, you should not call these functions in the middle of a
@@ -1239,7 +1240,7 @@ for which @code{commandp} returns @code{t}. @xref{Interactive Call}.
1239The argument @var{default} specifies what to return if the user enters 1240The argument @var{default} specifies what to return if the user enters
1240null input. It can be a symbol, a string or a list of strings. If it 1241null input. It can be a symbol, a string or a list of strings. If it
1241is a string, @code{read-command} interns it before returning it. 1242is a string, @code{read-command} interns it before returning it.
1242If it is a list, @code{read-command} returns the first element of this list. 1243If it is a list, @code{read-command} interns the first element of this list.
1243If @var{default} is @code{nil}, that means no default has been 1244If @var{default} is @code{nil}, that means no default has been
1244specified; then if the user enters null input, the return value is 1245specified; then if the user enters null input, the return value is
1245@code{(intern "")}, that is, a symbol whose name is an empty string. 1246@code{(intern "")}, that is, a symbol whose name is an empty string.
@@ -1281,51 +1282,11 @@ complete in the set of extant Lisp symbols, and it uses the
1281 1282
1282@defun read-variable prompt &optional default 1283@defun read-variable prompt &optional default
1283@anchor{Definition of read-variable} 1284@anchor{Definition of read-variable}
1284This function reads the name of a user variable and returns it as a 1285This function reads the name of a customizable variable and returns it
1285symbol. 1286as a symbol. Its arguments have the same form as those of
1286 1287@code{read-command}. It behaves just like @code{read-command}, except
1287The argument @var{default} specifies the default value to return if 1288that it uses the predicate @code{custom-variable-p} instead of
1288the user enters null input. It can be a symbol, a string, or a list 1289@code{commandp}.
1289of strings. If it is a string, @code{read-variable} interns it to
1290make the default value. If it is a list, @code{read-variable} interns
1291the first element. If @var{default} is @code{nil}, that means no
1292default has been specified; then if the user enters null input, the
1293return value is @code{(intern "")}.
1294
1295@example
1296@group
1297(read-variable "Variable name? ")
1298
1299;; @r{After evaluation of the preceding expression,}
1300;; @r{the following prompt appears,}
1301;; @r{with an empty minibuffer:}
1302@end group
1303
1304@group
1305---------- Buffer: Minibuffer ----------
1306Variable name? @point{}
1307---------- Buffer: Minibuffer ----------
1308@end group
1309@end example
1310
1311@noindent
1312If the user then types @kbd{fill-p @key{RET}}, @code{read-variable}
1313returns @code{fill-prefix}.
1314
1315In general, @code{read-variable} is similar to @code{read-command},
1316but uses the predicate @code{custom-variable-p} instead of
1317@code{commandp}:
1318
1319@cindex @code{custom-variable-p} example
1320@example
1321@group
1322(read-variable @var{prompt})
1323@equiv{}
1324(intern
1325 (completing-read @var{prompt} obarray
1326 'custom-variable-p t nil))
1327@end group
1328@end example
1329@end defun 1290@end defun
1330 1291
1331@deffn Command read-color &optional prompt convert allow-empty display 1292@deffn Command read-color &optional prompt convert allow-empty display
@@ -1343,7 +1304,7 @@ minibuffer. However, when called interactively or if the optional
1343argument @var{convert} is non-@code{nil}, it converts any input color 1304argument @var{convert} is non-@code{nil}, it converts any input color
1344name into the corresponding RGB value string and instead returns that. 1305name into the corresponding RGB value string and instead returns that.
1345This function requires a valid color specification to be input. 1306This function requires a valid color specification to be input.
1346Empty color names are allowed when @code{allow-empty} is 1307Empty color names are allowed when @var{allow-empty} is
1347non-@code{nil} and the user enters null input. 1308non-@code{nil} and the user enters null input.
1348 1309
1349Interactively, or when @var{display} is non-@code{nil}, the return 1310Interactively, or when @var{display} is non-@code{nil}, the return
@@ -1361,7 +1322,7 @@ and @code{read-input-method-name}, in @ref{Input Methods}.
1361 1322
1362 The high-level completion functions @code{read-file-name}, 1323 The high-level completion functions @code{read-file-name},
1363@code{read-directory-name}, and @code{read-shell-command} are designed 1324@code{read-directory-name}, and @code{read-shell-command} are designed
1364to read file names, directory names, and shell commands respectively. 1325to read file names, directory names, and shell commands, respectively.
1365They provide special features, including automatic insertion of the 1326They provide special features, including automatic insertion of the
1366default directory. 1327default directory.
1367 1328
@@ -1370,15 +1331,29 @@ This function reads a file name, prompting with @var{prompt} and
1370providing completion. 1331providing completion.
1371 1332
1372As an exception, this function reads a file name using a graphical 1333As an exception, this function reads a file name using a graphical
1373file dialog instead of the minibuffer, if (i) it is invoked via a 1334file dialog instead of the minibuffer, if all of the following are
1374mouse command, and (ii) the selected frame is on a graphical display 1335true:
1375supporting such dialogs, and (iii) the variable @code{use-dialog-box} 1336
1376is non-@code{nil} (@pxref{Dialog Boxes,, Dialog Boxes, emacs, The GNU 1337@enumerate
1377Emacs Manual}), and (iv) the @var{directory} argument, described 1338@item
1378below, does not specify a remote file (@pxref{Remote Files,, Remote 1339It is invoked via a mouse command.
1379Files, emacs, The GNU Emacs Manual}). The exact behavior when using a 1340
1380graphical file dialog is platform-dependent. Here, we simply document 1341@item
1381the behavior when using the minibuffer. 1342The selected frame is on a graphical display supporting such dialogs.
1343
1344@item
1345The variable @code{use-dialog-box} is non-@code{nil}.
1346@xref{Dialog Boxes,, Dialog Boxes, emacs, The GNU Emacs Manual}.
1347
1348@item
1349The @var{directory} argument, described below, does not specify a
1350remote file. @xref{Remote Files,, Remote Files, emacs, The GNU Emacs Manual}.
1351@end enumerate
1352
1353@noindent
1354The exact behavior when using a graphical file dialog is
1355platform-dependent. Here, we simply document the behavior when using
1356the minibuffer.
1382 1357
1383@code{read-file-name} does not automatically expand the returned file 1358@code{read-file-name} does not automatically expand the returned file
1384name. You must call @code{expand-file-name} yourself if an absolute 1359name. You must call @code{expand-file-name} yourself if an absolute
@@ -1389,7 +1364,7 @@ The optional argument @var{require-match} has the same meaning as in
1389 1364
1390The argument @var{directory} specifies the directory to use for 1365The argument @var{directory} specifies the directory to use for
1391completing relative file names. It should be an absolute directory 1366completing relative file names. It should be an absolute directory
1392name. If @code{insert-default-directory} is non-@code{nil}, 1367name. If the variable @code{insert-default-directory} is non-@code{nil},
1393@var{directory} is also inserted in the minibuffer as initial input. 1368@var{directory} is also inserted in the minibuffer as initial input.
1394It defaults to the current buffer's value of @code{default-directory}. 1369It defaults to the current buffer's value of @code{default-directory}.
1395 1370
@@ -1397,9 +1372,9 @@ If you specify @var{initial}, that is an initial file name to insert
1397in the buffer (after @var{directory}, if that is inserted). In this 1372in the buffer (after @var{directory}, if that is inserted). In this
1398case, point goes at the beginning of @var{initial}. The default for 1373case, point goes at the beginning of @var{initial}. The default for
1399@var{initial} is @code{nil}---don't insert any file name. To see what 1374@var{initial} is @code{nil}---don't insert any file name. To see what
1400@var{initial} does, try the command @kbd{C-x C-v}. @strong{Please 1375@var{initial} does, try the command @kbd{C-x C-v} in a buffer visiting
1401note:} we recommend using @var{default} rather than @var{initial} in 1376a file. @strong{Please note:} we recommend using @var{default} rather
1402most cases. 1377than @var{initial} in most cases.
1403 1378
1404If @var{default} is non-@code{nil}, then the function returns 1379If @var{default} is non-@code{nil}, then the function returns
1405@var{default} if the user exits the minibuffer with the same non-empty 1380@var{default} if the user exits the minibuffer with the same non-empty
@@ -1502,7 +1477,7 @@ use the code letters @samp{f} or @samp{F} in their interactive form.
1502@xref{Interactive Codes,, Code Characters for interactive}.) Its 1477@xref{Interactive Codes,, Code Characters for interactive}.) Its
1503value controls whether @code{read-file-name} starts by placing the 1478value controls whether @code{read-file-name} starts by placing the
1504name of the default directory in the minibuffer, plus the initial file 1479name of the default directory in the minibuffer, plus the initial file
1505name if any. If the value of this variable is @code{nil}, then 1480name, if any. If the value of this variable is @code{nil}, then
1506@code{read-file-name} does not place any initial input in the 1481@code{read-file-name} does not place any initial input in the
1507minibuffer (unless you specify initial input with the @var{initial} 1482minibuffer (unless you specify initial input with the @var{initial}
1508argument). In that case, the default directory is still used for 1483argument). In that case, the default directory is still used for
@@ -1545,17 +1520,17 @@ The file is @point{}
1545@end example 1520@end example
1546@end defopt 1521@end defopt
1547 1522
1548@defun read-shell-command prompt &optional initial-contents hist &rest args 1523@defun read-shell-command prompt &optional initial history &rest args
1549This function reads a shell command from the minibuffer, prompting 1524This function reads a shell command from the minibuffer, prompting
1550with @var{prompt} and providing intelligent completion. It completes 1525with @var{prompt} and providing intelligent completion. It completes
1551the first word of the command using candidates that are appropriate 1526the first word of the command using candidates that are appropriate
1552for command names, and the rest of the command words as file names. 1527for command names, and the rest of the command words as file names.
1553 1528
1554This function uses @code{minibuffer-local-shell-command-map} as the 1529This function uses @code{minibuffer-local-shell-command-map} as the
1555keymap for minibuffer input. The @var{hist} argument specifies the 1530keymap for minibuffer input. The @var{history} argument specifies the
1556history list to use; if is omitted or @code{nil}, it defaults to 1531history list to use; if is omitted or @code{nil}, it defaults to
1557@code{shell-command-history} (@pxref{Minibuffer History, 1532@code{shell-command-history} (@pxref{Minibuffer History,
1558shell-command-history}). The optional argument @var{initial-contents} 1533shell-command-history}). The optional argument @var{initial}
1559specifies the initial content of the minibuffer (@pxref{Initial 1534specifies the initial content of the minibuffer (@pxref{Initial
1560Input}). The rest of @var{args}, if present, are used as the 1535Input}). The rest of @var{args}, if present, are used as the
1561@var{default} and @var{inherit-input-method} arguments in 1536@var{default} and @var{inherit-input-method} arguments in
@@ -1564,20 +1539,22 @@ Input}). The rest of @var{args}, if present, are used as the
1564 1539
1565@defvar minibuffer-local-shell-command-map 1540@defvar minibuffer-local-shell-command-map
1566This keymap is used by @code{read-shell-command} for completing 1541This keymap is used by @code{read-shell-command} for completing
1567command and file names that are part of a shell command. 1542command and file names that are part of a shell command. It uses
1543@code{minibuffer-local-map} as its parent keymap, and binds @key{TAB}
1544to @code{completion-at-point}.
1568@end defvar 1545@end defvar
1569 1546
1570@node Completion Variables 1547@node Completion Variables
1571@subsection Completion Variables 1548@subsection Completion Variables
1572 1549
1573 Here are some variables which can be used to alter the default 1550 Here are some variables that can be used to alter the default
1574completion behavior. 1551completion behavior.
1575 1552
1576@cindex completion styles 1553@cindex completion styles
1577@defopt completion-styles 1554@defopt completion-styles
1578The value of this variable is a list of completion style (symbols) to 1555The value of this variable is a list of completion style (symbols) to
1579use for performing completion. A @dfn{completion style} is a set of 1556use for performing completion. A @dfn{completion style} is a set of
1580rules for generating completions. Each symbol in occurring this list 1557rules for generating completions. Each symbol occurring this list
1581must have a corresponding entry in @code{completion-styles-alist}. 1558must have a corresponding entry in @code{completion-styles-alist}.
1582@end defopt 1559@end defopt
1583 1560
@@ -1624,13 +1601,14 @@ description of the available completion styles.
1624@defopt completion-category-overrides 1601@defopt completion-category-overrides
1625This variable specifies special completion styles and other completion 1602This variable specifies special completion styles and other completion
1626behaviors to use when completing certain types of text. Its value 1603behaviors to use when completing certain types of text. Its value
1627should be a list of the form @code{(@var{category} . @var{alist})}. 1604should be an alist with elements of the form @code{(@var{category}
1628@var{category} is a symbol describing what is being completed; 1605. @var{alist})}. @var{category} is a symbol describing what is being
1629currently, the @code{buffer} and @code{file} categories are defined, 1606completed; currently, the @code{buffer}, @code{file}, and
1630but others can be defined via specialized completion functions 1607@code{unicode-name} categories are defined, but others can be defined
1631(@pxref{Programmed Completion}). @var{alist} is an association list 1608via specialized completion functions (@pxref{Programmed Completion}).
1632describing how completion should behave for the corresponding 1609@var{alist} is an association list describing how completion should
1633category. The following alist keys are supported: 1610behave for the corresponding category. The following alist keys are
1611supported:
1634 1612
1635@table @code 1613@table @code
1636@item styles 1614@item styles
@@ -1663,7 +1641,7 @@ the completion.
1663The value should be a function to run after performing completion. 1641The value should be a function to run after performing completion.
1664The function should accept two arguments, @var{string} and 1642The function should accept two arguments, @var{string} and
1665@var{status}, where @var{string} is the text to which the field was 1643@var{status}, where @var{string} is the text to which the field was
1666completed and @var{status} indicates what kind of operation happened: 1644completed, and @var{status} indicates what kind of operation happened:
1667@code{finished} if text is now complete, @code{sole} if the text 1645@code{finished} if text is now complete, @code{sole} if the text
1668cannot be further completed but completion is not finished, or 1646cannot be further completed but completion is not finished, or
1669@code{exact} if the text is a valid completion but may be further 1647@code{exact} if the text is a valid completion but may be further
@@ -1727,9 +1705,10 @@ some completion alternative; @code{nil} otherwise.
1727 1705
1728@item (boundaries . @var{suffix}) 1706@item (boundaries . @var{suffix})
1729This specifies a @code{completion-boundaries} operation. The function 1707This specifies a @code{completion-boundaries} operation. The function
1730should return @code{(boundaries START . END)}, where START is the 1708should return @code{(boundaries @var{start} . @var{end})}, where
1731position of the beginning boundary in the specified string, and END is 1709@var{start} is the position of the beginning boundary in the specified
1732the position of the end boundary in SUFFIX. 1710string, and @var{end} is the position of the end boundary in
1711@var{suffix}.
1733 1712
1734@item metadata 1713@item metadata
1735This specifies a request for information about the state of the 1714This specifies a request for information about the state of the
@@ -1756,7 +1735,7 @@ completion behavior is overridden. @xref{Completion Variables}.
1756The value should be a function for @dfn{annotating} completions. The 1735The value should be a function for @dfn{annotating} completions. The
1757function should take one argument, @var{string}, which is a possible 1736function should take one argument, @var{string}, which is a possible
1758completion. It should return a string, which is displayed after the 1737completion. It should return a string, which is displayed after the
1759completion @var{string} in the @samp{*Completions*} buffer. 1738completion @var{string} in the @file{*Completions*} buffer.
1760 1739
1761@item display-sort-function 1740@item display-sort-function
1762The value should be a function for sorting completions. The function 1741The value should be a function for sorting completions. The function
@@ -1774,7 +1753,7 @@ the same as for @code{display-sort-function}.
1774 1753
1775@defun completion-table-dynamic function 1754@defun completion-table-dynamic function
1776This function is a convenient way to write a function that can act as 1755This function is a convenient way to write a function that can act as
1777programmed completion function. The argument @var{function} should be 1756a programmed completion function. The argument @var{function} should be
1778a function that takes one argument, a string, and returns an alist of 1757a function that takes one argument, a string, and returns an alist of
1779possible completions of it. You can think of 1758possible completions of it. You can think of
1780@code{completion-table-dynamic} as a transducer between that interface 1759@code{completion-table-dynamic} as a transducer between that interface
@@ -1828,7 +1807,7 @@ satisfy.
1828 1807
1829@item :exclusive 1808@item :exclusive
1830If the value is @code{no}, then if the completion table fails to match 1809If the value is @code{no}, then if the completion table fails to match
1831the text at point, then @code{completion-at-point} moves on to the 1810the text at point, @code{completion-at-point} moves on to the
1832next function in @code{completion-at-point-functions} instead of 1811next function in @code{completion-at-point-functions} instead of
1833reporting a completion failure. 1812reporting a completion failure.
1834@end table 1813@end table
@@ -1842,7 +1821,7 @@ old code to using @code{completion-at-point}.
1842The first function in @code{completion-at-point-functions} to return a 1821The first function in @code{completion-at-point-functions} to return a
1843non-@code{nil} value is used by @code{completion-at-point}. The 1822non-@code{nil} value is used by @code{completion-at-point}. The
1844remaining functions are not called. The exception to this is when 1823remaining functions are not called. The exception to this is when
1845there is a @code{:exclusive} specification, as described above. 1824there is an @code{:exclusive} specification, as described above.
1846@end defvar 1825@end defvar
1847 1826
1848 The following function provides a convenient way to perform 1827 The following function provides a convenient way to perform
@@ -1880,7 +1859,7 @@ answer.
1880using the mouse---more precisely, if @code{last-nonmenu-event} 1859using the mouse---more precisely, if @code{last-nonmenu-event}
1881(@pxref{Command Loop Info}) is either @code{nil} or a list---then it 1860(@pxref{Command Loop Info}) is either @code{nil} or a list---then it
1882uses a dialog box or pop-up menu to ask the question. Otherwise, it 1861uses a dialog box or pop-up menu to ask the question. Otherwise, it
1883uses keyboard input. You can force use of the mouse or use of keyboard 1862uses keyboard input. You can force use either of the mouse or of keyboard
1884input by binding @code{last-nonmenu-event} to a suitable value around 1863input by binding @code{last-nonmenu-event} to a suitable value around
1885the call. 1864the call.
1886 1865
@@ -1891,7 +1870,7 @@ the call.
1891This function asks the user a question, expecting input in the echo 1870This function asks the user a question, expecting input in the echo
1892area. It returns @code{t} if the user types @kbd{y}, @code{nil} if the 1871area. It returns @code{t} if the user types @kbd{y}, @code{nil} if the
1893user types @kbd{n}. This function also accepts @key{SPC} to mean yes 1872user types @kbd{n}. This function also accepts @key{SPC} to mean yes
1894and @key{DEL} to mean no. It accepts @kbd{C-]} to mean ``quit,'' like 1873and @key{DEL} to mean no. It accepts @kbd{C-]} to mean ``quit'', like
1895@kbd{C-g}, because the question might look like a minibuffer and for 1874@kbd{C-g}, because the question might look like a minibuffer and for
1896that reason the user might try to use @kbd{C-]} to get out. The answer 1875that reason the user might try to use @kbd{C-]} to get out. The answer
1897is a single character, with no @key{RET} needed to terminate it. Upper 1876is a single character, with no @key{RET} needed to terminate it. Upper
@@ -1915,12 +1894,16 @@ hardwired. The keymap @code{query-replace-map} specifies them.
1915In the following example, the user first types @kbd{q}, which is 1894In the following example, the user first types @kbd{q}, which is
1916invalid. At the next prompt the user types @kbd{y}. 1895invalid. At the next prompt the user types @kbd{y}.
1917 1896
1897@c Need an interactive example, because otherwise the return value
1898@c obscures the display of the valid answer.
1918@smallexample 1899@smallexample
1919@group 1900@group
1920(y-or-n-p "Do you need a lift? ") 1901(defun ask ()
1902 (interactive)
1903 (y-or-n-p "Do you need a lift? "))
1921 1904
1922;; @r{After evaluation of the preceding expression,} 1905;; @r{After evaluation of the preceding definition, @kbd{M-x ask}}
1923;; @r{the following prompt appears in the echo area:} 1906;; @r{causes the following prompt to appear in the echo area:}
1924@end group 1907@end group
1925 1908
1926@group 1909@group
@@ -1952,10 +1935,10 @@ We show successive lines of echo area messages, but only one actually
1952appears on the screen at a time. 1935appears on the screen at a time.
1953@end defun 1936@end defun
1954 1937
1955@defun y-or-n-p-with-timeout prompt seconds default-value 1938@defun y-or-n-p-with-timeout prompt seconds default
1956Like @code{y-or-n-p}, except that if the user fails to answer within 1939Like @code{y-or-n-p}, except that if the user fails to answer within
1957@var{seconds} seconds, this function stops waiting and returns 1940@var{seconds} seconds, this function stops waiting and returns
1958@var{default-value}. It works by setting up a timer; see @ref{Timers}. 1941@var{default}. It works by setting up a timer; see @ref{Timers}.
1959The argument @var{seconds} may be an integer or a floating point number. 1942The argument @var{seconds} may be an integer or a floating point number.
1960@end defun 1943@end defun
1961 1944
@@ -2023,7 +2006,7 @@ single-character answer in the echo area for each one.
2023The value of @var{list} specifies the objects to ask questions about. 2006The value of @var{list} specifies the objects to ask questions about.
2024It should be either a list of objects or a generator function. If it is 2007It should be either a list of objects or a generator function. If it is
2025a function, it should expect no arguments, and should return either the 2008a function, it should expect no arguments, and should return either the
2026next object to ask about, or @code{nil} meaning stop asking questions. 2009next object to ask about, or @code{nil}, meaning to stop asking questions.
2027 2010
2028The argument @var{prompter} specifies how to ask each question. If 2011The argument @var{prompter} specifies how to ask each question. If
2029@var{prompter} is a string, the question text is computed like this: 2012@var{prompter} is a string, the question text is computed like this:
@@ -2039,8 +2022,8 @@ where @var{object} is the next object to ask about (as obtained from
2039If not a string, @var{prompter} should be a function of one argument 2022If not a string, @var{prompter} should be a function of one argument
2040(the next object to ask about) and should return the question text. If 2023(the next object to ask about) and should return the question text. If
2041the value is a string, that is the question to ask the user. The 2024the value is a string, that is the question to ask the user. The
2042function can also return @code{t} meaning do act on this object (and 2025function can also return @code{t}, meaning do act on this object (and
2043don't ask the user), or @code{nil} meaning ignore this object (and don't 2026don't ask the user), or @code{nil}, meaning ignore this object (and don't
2044ask the user). 2027ask the user).
2045 2028
2046The argument @var{actor} says how to act on the answers that the user 2029The argument @var{actor} says how to act on the answers that the user
@@ -2081,7 +2064,7 @@ answer); @var{function} is a function of one argument (an object from
2081 2064
2082When the user responds with @var{char}, @code{map-y-or-n-p} calls 2065When the user responds with @var{char}, @code{map-y-or-n-p} calls
2083@var{function}. If it returns non-@code{nil}, the object is considered 2066@var{function}. If it returns non-@code{nil}, the object is considered
2084``acted upon,'' and @code{map-y-or-n-p} advances to the next object in 2067``acted upon'', and @code{map-y-or-n-p} advances to the next object in
2085@var{list}. If it returns @code{nil}, the prompt is repeated for the 2068@var{list}. If it returns @code{nil}, the prompt is repeated for the
2086same object. 2069same object.
2087 2070
@@ -2093,12 +2076,14 @@ If @code{map-y-or-n-p} is called in a command that was invoked using the
2093mouse---more precisely, if @code{last-nonmenu-event} (@pxref{Command 2076mouse---more precisely, if @code{last-nonmenu-event} (@pxref{Command
2094Loop Info}) is either @code{nil} or a list---then it uses a dialog box 2077Loop Info}) is either @code{nil} or a list---then it uses a dialog box
2095or pop-up menu to ask the question. In this case, it does not use 2078or pop-up menu to ask the question. In this case, it does not use
2096keyboard input or the echo area. You can force use of the mouse or use 2079keyboard input or the echo area. You can force use either of the mouse or
2097of keyboard input by binding @code{last-nonmenu-event} to a suitable 2080of keyboard input by binding @code{last-nonmenu-event} to a suitable
2098value around the call. 2081value around the call.
2099 2082
2100The return value of @code{map-y-or-n-p} is the number of objects acted on. 2083The return value of @code{map-y-or-n-p} is the number of objects acted on.
2101@end defun 2084@end defun
2085@c FIXME An example of this would be more useful than all the
2086@c preceding examples of simple things.
2102 2087
2103@node Reading a Password 2088@node Reading a Password
2104@section Reading a Password 2089@section Reading a Password
@@ -2161,6 +2146,19 @@ This command replaces the minibuffer contents with the value of the
2161regular expression). 2146regular expression).
2162@end deffn 2147@end deffn
2163 2148
2149@deffn Command previous-complete-history-element n
2150This command replaces the minibuffer contents with the value of the
2151@var{n}th previous (older) history element that completes the current
2152contents of the minibuffer before the point.
2153@end deffn
2154
2155@deffn Command next-complete-history-element n
2156This command replaces the minibuffer contents with the value of the
2157@var{n}th next (newer) history element that completes the current
2158contents of the minibuffer before the point.
2159@end deffn
2160
2161
2164@node Minibuffer Windows 2162@node Minibuffer Windows
2165@section Minibuffer Windows 2163@section Minibuffer Windows
2166@cindex minibuffer windows 2164@cindex minibuffer windows
@@ -2170,7 +2168,7 @@ and test whether they are active.
2170 2168
2171@defun active-minibuffer-window 2169@defun active-minibuffer-window
2172This function returns the currently active minibuffer window, or 2170This function returns the currently active minibuffer window, or
2173@code{nil} if none is currently active. 2171@code{nil} if there is none.
2174@end defun 2172@end defun
2175 2173
2176@defun minibuffer-window &optional frame 2174@defun minibuffer-window &optional frame
@@ -2203,8 +2201,8 @@ there can be more than one minibuffer window if there is more than one
2203frame. 2201frame.
2204 2202
2205@defun minibuffer-window-active-p window 2203@defun minibuffer-window-active-p window
2206This function returns non-@code{nil} if @var{window}, assumed to be 2204This function returns non-@code{nil} if @var{window} is the currently
2207a minibuffer window, is currently active. 2205active minibuffer window.
2208@end defun 2206@end defun
2209 2207
2210@node Minibuffer Contents 2208@node Minibuffer Contents
@@ -2319,7 +2317,7 @@ minibuffer, it scrolls this window.
2319@end defvar 2317@end defvar
2320 2318
2321@defun minibuffer-selected-window 2319@defun minibuffer-selected-window
2322This function returns the window which was selected when the 2320This function returns the window that was selected when the
2323minibuffer was entered. If selected window is not a minibuffer 2321minibuffer was entered. If selected window is not a minibuffer
2324window, it returns @code{nil}. 2322window, it returns @code{nil}.
2325@end defun 2323@end defun
@@ -2330,10 +2328,19 @@ windows. If a float, it specifies a fraction of the height of the
2330frame. If an integer, it specifies a number of lines. 2328frame. If an integer, it specifies a number of lines.
2331@end defopt 2329@end defopt
2332 2330
2331@vindex minibuffer-message-timeout
2333@defun minibuffer-message string &rest args 2332@defun minibuffer-message string &rest args
2334This function displays @var{string} temporarily at the end of the 2333This function displays @var{string} temporarily at the end of the
2335minibuffer text, for two seconds, or until the next input event 2334minibuffer text, for a few seconds, or until the next input event
2336arrives, whichever comes first. If @var{args} is non-@code{nil}, the 2335arrives, whichever comes first. The variable
2337actual message is obtained by passing @var{string} and @var{args} 2336@code{minibuffer-message-timeout} specifies the number of seconds to
2338through @code{format}. @xref{Formatting Strings}. 2337wait in the absence of input. It defaults to 2. If @var{args} is
2338non-@code{nil}, the actual message is obtained by passing @var{string}
2339and @var{args} through @code{format}. @xref{Formatting Strings}.
2339@end defun 2340@end defun
2341
2342@deffn Command minibuffer-inactive-mode
2343This is the major mode used in inactive minibuffers. It uses
2344keymap @code{minibuffer-inactive-mode-map}. This can be useful
2345if the minibuffer is in a separate frame. @xref{Minibuffers and Frames}.
2346@end deffn
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index 946dcb91317..aa089aec36b 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -2,7 +2,6 @@
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 Free Software Foundation, Inc. 3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5@setfilename ../../info/modes
6@node Modes, Documentation, Keymaps, Top 5@node Modes, Documentation, Keymaps, Top
7@chapter Major and Minor Modes 6@chapter Major and Minor Modes
8@cindex mode 7@cindex mode
@@ -628,7 +627,7 @@ have set.
628This function sets the major mode of @var{buffer} to the default value of 627This function sets the major mode of @var{buffer} to the default value of
629@code{major-mode}; if that is @code{nil}, it uses the 628@code{major-mode}; if that is @code{nil}, it uses the
630current buffer's major mode (if that is suitable). As an exception, 629current buffer's major mode (if that is suitable). As an exception,
631if @var{buffer}'s name is @samp{*scratch*}, it sets the mode to 630if @var{buffer}'s name is @file{*scratch*}, it sets the mode to
632@code{initial-major-mode}. 631@code{initial-major-mode}.
633 632
634The low-level primitives for creating buffers do not use this function, 633The low-level primitives for creating buffers do not use this function,
@@ -637,9 +636,9 @@ but medium-level commands such as @code{switch-to-buffer} and
637@end defun 636@end defun
638 637
639@defopt initial-major-mode 638@defopt initial-major-mode
640@cindex @samp{*scratch*} 639@cindex @file{*scratch*}
641The value of this variable determines the major mode of the initial 640The value of this variable determines the major mode of the initial
642@samp{*scratch*} buffer. The value should be a symbol that is a major 641@file{*scratch*} buffer. The value should be a symbol that is a major
643mode command. The default value is @code{lisp-interaction-mode}. 642mode command. The default value is @code{lisp-interaction-mode}.
644@end defopt 643@end defopt
645 644
@@ -908,7 +907,7 @@ common bindings, including @kbd{q} for @code{quit-window}, @kbd{z} for
908(@pxref{Reverting}). 907(@pxref{Reverting}).
909 908
910An example of a major mode derived from Special mode is Buffer Menu 909An example of a major mode derived from Special mode is Buffer Menu
911mode, which is used by the @samp{*Buffer List*} buffer. @xref{List 910mode, which is used by the @file{*Buffer List*} buffer. @xref{List
912Buffers,,Listing Existing Buffers, emacs, The GNU Emacs Manual}. 911Buffers,,Listing Existing Buffers, emacs, The GNU Emacs Manual}.
913@end deffn 912@end deffn
914 913
@@ -1571,8 +1570,8 @@ rather than buffer-local. It defaults to @code{nil}.
1571 1570
1572One of the effects of making a minor mode global is that the 1571One of the effects of making a minor mode global is that the
1573@var{mode} variable becomes a customization variable. Toggling it 1572@var{mode} variable becomes a customization variable. Toggling it
1574through the Custom interface turns the mode on and off, and its value 1573through the Customize interface turns the mode on and off, and its
1575can be saved for future Emacs sessions (@pxref{Saving 1574value can be saved for future Emacs sessions (@pxref{Saving
1576Customizations,,, emacs, The GNU Emacs Manual}. For the saved 1575Customizations,,, emacs, The GNU Emacs Manual}. For the saved
1577variable to work, you should ensure that the @code{define-minor-mode} 1576variable to work, you should ensure that the @code{define-minor-mode}
1578form is evaluated each time Emacs starts; for packages that are not 1577form is evaluated each time Emacs starts; for packages that are not
@@ -1691,7 +1690,7 @@ Fundamental mode; but it does not detect the creation of a new buffer
1691in Fundamental mode. 1690in Fundamental mode.
1692 1691
1693This defines the customization option @var{global-mode} (@pxref{Customization}), 1692This defines the customization option @var{global-mode} (@pxref{Customization}),
1694which can be toggled in the Custom interface to turn the minor mode on 1693which can be toggled in the Customize interface to turn the minor mode on
1695and off. As with @code{define-minor-mode}, you should ensure that the 1694and off. As with @code{define-minor-mode}, you should ensure that the
1696@code{define-globalized-minor-mode} form is evaluated each time Emacs 1695@code{define-globalized-minor-mode} form is evaluated each time Emacs
1697starts, for example by providing a @code{:require} keyword. 1696starts, for example by providing a @code{:require} keyword.
@@ -2016,7 +2015,7 @@ identify the mode name in the mode line, use @code{format-mode-line}
2016This buffer-local variable contains the mode line information on process 2015This buffer-local variable contains the mode line information on process
2017status in modes used for communicating with subprocesses. It is 2016status in modes used for communicating with subprocesses. It is
2018displayed immediately following the major mode name, with no intervening 2017displayed immediately following the major mode name, with no intervening
2019space. For example, its value in the @samp{*shell*} buffer is 2018space. For example, its value in the @file{*shell*} buffer is
2020@code{(":%s")}, which allows the shell to display its status along 2019@code{(":%s")}, which allows the shell to display its status along
2021with the major mode as: @samp{(Shell:run)}. Normally this variable 2020with the major mode as: @samp{(Shell:run)}. Normally this variable
2022is @code{nil}. 2021is @code{nil}.
diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi
index c97cd099328..315a25c7e52 100644
--- a/doc/lispref/nonascii.texi
+++ b/doc/lispref/nonascii.texi
@@ -1,8 +1,7 @@
1@c -*-texinfo-*- 1@c -*-texinfo-*-
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1998-1999, 2001-2012 Free Software Foundation, Inc. 3@c Copyright (C) 1998-1999, 2001-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5@setfilename ../../info/characters
6@node Non-ASCII Characters, Searching and Matching, Text, Top 5@node Non-ASCII Characters, Searching and Matching, Text, Top
7@chapter Non-@acronym{ASCII} Characters 6@chapter Non-@acronym{ASCII} Characters
8@cindex multibyte characters 7@cindex multibyte characters
diff --git a/doc/lispref/numbers.texi b/doc/lispref/numbers.texi
index 82336aa537f..66f491b7780 100644
--- a/doc/lispref/numbers.texi
+++ b/doc/lispref/numbers.texi
@@ -3,7 +3,6 @@
3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012
4@c Free Software Foundation, Inc. 4@c Free Software Foundation, Inc.
5@c See the file elisp.texi for copying conditions. 5@c See the file elisp.texi for copying conditions.
6@setfilename ../../info/numbers
7@node Numbers, Strings and Characters, Lisp Data Types, Top 6@node Numbers, Strings and Characters, Lisp Data Types, Top
8@chapter Numbers 7@chapter Numbers
9@cindex integers 8@cindex integers
diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi
index ba4803c73f2..58ceeb02b76 100644
--- a/doc/lispref/objects.texi
+++ b/doc/lispref/objects.texi
@@ -3,7 +3,6 @@
3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012
4@c Free Software Foundation, Inc. 4@c Free Software Foundation, Inc.
5@c See the file elisp.texi for copying conditions. 5@c See the file elisp.texi for copying conditions.
6@setfilename ../../info/objects
7@node Lisp Data Types, Numbers, Introduction, Top 6@node Lisp Data Types, Numbers, Introduction, Top
8@chapter Lisp Data Types 7@chapter Lisp Data Types
9@cindex object 8@cindex object
@@ -352,7 +351,7 @@ following text.)
352 351
353 In addition to the specific escape sequences for special important 352 In addition to the specific escape sequences for special important
354control characters, Emacs provides several types of escape syntax that 353control characters, Emacs provides several types of escape syntax that
355you can use to specify non-ASCII text characters. 354you can use to specify non-@acronym{ASCII} text characters.
356 355
357@cindex unicode character escape 356@cindex unicode character escape
358 You can specify characters by their Unicode values. 357 You can specify characters by their Unicode values.
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index 8a57ed2c1f0..aae2e4434d7 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -3,7 +3,6 @@
3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012
4@c Free Software Foundation, Inc. 4@c Free Software Foundation, Inc.
5@c See the file elisp.texi for copying conditions. 5@c See the file elisp.texi for copying conditions.
6@setfilename ../../info/os
7@node System Interface, Packaging, Display, Top 6@node System Interface, Packaging, Display, Top
8@chapter Operating System Interface 7@chapter Operating System Interface
9 8
@@ -89,7 +88,7 @@ that Emacs is being initialized.
89@c set-locale-environment 88@c set-locale-environment
90@item 89@item
91It sets the language environment and the terminal coding system, 90It sets the language environment and the terminal coding system,
92if requested by environment variables such as @code{LANG}. 91if requested by environment variables such as @env{LANG}.
93 92
94@item 93@item
95It does some basic parsing of the command-line arguments. 94It does some basic parsing of the command-line arguments.
@@ -170,7 +169,7 @@ measurement of how long it took.
170It runs the normal hook @code{after-init-hook}. 169It runs the normal hook @code{after-init-hook}.
171 170
172@item 171@item
173If the buffer @samp{*scratch*} exists and is still in Fundamental mode 172If the buffer @file{*scratch*} exists and is still in Fundamental mode
174(as it should be by default), it sets its major mode according to 173(as it should be by default), it sets its major mode according to
175@code{initial-major-mode}. 174@code{initial-major-mode}.
176 175
@@ -196,7 +195,7 @@ It now exits if the option @code{--batch} was specified.
196 195
197@item 196@item
198If @code{initial-buffer-choice} is a string, it visits the file with 197If @code{initial-buffer-choice} is a string, it visits the file with
199that name. If the @samp{*scratch*} buffer exists and is 198that name. If the @file{*scratch*} buffer exists and is
200empty, it inserts @code{initial-scratch-message} into that buffer. 199empty, it inserts @code{initial-scratch-message} into that buffer.
201 200
202@c To make things nice and confusing, the next three items can be 201@c To make things nice and confusing, the next three items can be
@@ -254,7 +253,7 @@ The following options affect some aspects of the startup sequence.
254 253
255@defopt inhibit-startup-screen 254@defopt inhibit-startup-screen
256This variable, if non-@code{nil}, inhibits the startup screen. In 255This variable, if non-@code{nil}, inhibits the startup screen. In
257that case, Emacs typically displays the @samp{*scratch*} buffer; but 256that case, Emacs typically displays the @file{*scratch*} buffer; but
258see @code{initial-buffer-choice}, below. 257see @code{initial-buffer-choice}, below.
259 258
260Do not set this variable in the init file of a new user, or in a way 259Do not set this variable in the init file of a new user, or in a way
@@ -274,7 +273,7 @@ startup screen.
274@ignore 273@ignore
275@c I do not think this should be mentioned. AFAICS it is just a dodge 274@c I do not think this should be mentioned. AFAICS it is just a dodge
276@c around inhibit-startup-screen not being settable on a site-wide basis. 275@c around inhibit-startup-screen not being settable on a site-wide basis.
277If its value is @code{t}, Emacs displays the @samp{*scratch*} buffer. 276If its value is @code{t}, Emacs displays the @file{*scratch*} buffer.
278@end ignore 277@end ignore
279@end defopt 278@end defopt
280 279
@@ -290,17 +289,17 @@ form to your init file:
290 289
291Emacs explicitly checks for an expression as shown above in your init 290Emacs explicitly checks for an expression as shown above in your init
292file; your login name must appear in the expression as a Lisp string 291file; your login name must appear in the expression as a Lisp string
293constant. You can also use the Custom interface. Other methods of setting 292constant. You can also use the Customize interface. Other methods of
294@code{inhibit-startup-echo-area-message} to the same value do not 293setting @code{inhibit-startup-echo-area-message} to the same value do
295inhibit the startup message. This way, you can easily inhibit the 294not inhibit the startup message. This way, you can easily inhibit the
296message for yourself if you wish, but thoughtless copying of your init 295message for yourself if you wish, but thoughtless copying of your init
297file will not inhibit the message for someone else. 296file will not inhibit the message for someone else.
298@end defopt 297@end defopt
299 298
300@defopt initial-scratch-message 299@defopt initial-scratch-message
301This variable, if non-@code{nil}, should be a string, which is 300This variable, if non-@code{nil}, should be a string, which is
302inserted into the @samp{*scratch*} buffer when Emacs starts up. If it 301inserted into the @file{*scratch*} buffer when Emacs starts up. If it
303is @code{nil}, the @samp{*scratch*} buffer is empty. 302is @code{nil}, the @file{*scratch*} buffer is empty.
304@end defopt 303@end defopt
305 304
306@noindent 305@noindent
@@ -352,8 +351,8 @@ control whether and where to find the init file; @samp{-q} (and the
352stronger @samp{-Q}) says not to load an init file, while @samp{-u 351stronger @samp{-Q}) says not to load an init file, while @samp{-u
353@var{user}} says to load @var{user}'s init file instead of yours. 352@var{user}} says to load @var{user}'s init file instead of yours.
354@xref{Entering Emacs,,, emacs, The GNU Emacs Manual}. If neither 353@xref{Entering Emacs,,, emacs, The GNU Emacs Manual}. If neither
355option is specified, Emacs uses the @code{LOGNAME} environment 354option is specified, Emacs uses the @env{LOGNAME} environment
356variable, or the @code{USER} (most systems) or @code{USERNAME} (MS 355variable, or the @env{USER} (most systems) or @env{USERNAME} (MS
357systems) variable, to find your home directory and thus your init 356systems) variable, to find your home directory and thus your init
358file; this way, even if you have su'd, Emacs still loads your own init 357file; this way, even if you have su'd, Emacs still loads your own init
359file. If those environment variables are absent, though, Emacs uses 358file. If those environment variables are absent, though, Emacs uses
@@ -430,7 +429,7 @@ This variable holds the name of the @file{.emacs.d} directory. It is
430 Each terminal type can have its own Lisp library that Emacs loads when 429 Each terminal type can have its own Lisp library that Emacs loads when
431run on that type of terminal. The library's name is constructed by 430run on that type of terminal. The library's name is constructed by
432concatenating the value of the variable @code{term-file-prefix} and the 431concatenating the value of the variable @code{term-file-prefix} and the
433terminal type (specified by the environment variable @code{TERM}). 432terminal type (specified by the environment variable @env{TERM}).
434Normally, @code{term-file-prefix} has the value 433Normally, @code{term-file-prefix} has the value
435@code{"term/"}; changing this is not recommended. Emacs finds the file 434@code{"term/"}; changing this is not recommended. Emacs finds the file
436in the normal manner, by searching the @code{load-path} directories, and 435in the normal manner, by searching the @code{load-path} directories, and
@@ -468,7 +467,7 @@ use this hook to define initializations for terminals that do not
468have their own libraries. @xref{Hooks}. 467have their own libraries. @xref{Hooks}.
469 468
470@defvar term-file-prefix 469@defvar term-file-prefix
471@cindex @code{TERM} environment variable 470@cindex @env{TERM} environment variable
472If the value of this variable is non-@code{nil}, Emacs loads a 471If the value of this variable is non-@code{nil}, Emacs loads a
473terminal-specific initialization file as follows: 472terminal-specific initialization file as follows:
474 473
@@ -481,7 +480,7 @@ You may set the @code{term-file-prefix} variable to @code{nil} in your
481init file if you do not wish to load the 480init file if you do not wish to load the
482terminal-initialization file. 481terminal-initialization file.
483 482
484On MS-DOS, Emacs sets the @code{TERM} environment variable to @samp{internal}. 483On MS-DOS, Emacs sets the @env{TERM} environment variable to @samp{internal}.
485@end defvar 484@end defvar
486 485
487@defvar term-setup-hook 486@defvar term-setup-hook
@@ -1010,7 +1009,7 @@ value is @code{":"} for Unix and GNU systems, and @code{";"} for MS systems.
1010 1009
1011@defun parse-colon-path path 1010@defun parse-colon-path path
1012This function takes a search path string such as the value of 1011This function takes a search path string such as the value of
1013the @code{PATH} environment variable, and splits it at the separators, 1012the @env{PATH} environment variable, and splits it at the separators,
1014returning a list of directory names. @code{nil} in this list means 1013returning a list of directory names. @code{nil} in this list means
1015the current directory. Although the function's name says 1014the current directory. Although the function's name says
1016``colon'', it actually uses the value of @code{path-separator}. 1015``colon'', it actually uses the value of @code{path-separator}.
@@ -1113,7 +1112,7 @@ want to use the default value.
1113 1112
1114@defun user-login-name &optional uid 1113@defun user-login-name &optional uid
1115This function returns the name under which the user is logged in. 1114This function returns the name under which the user is logged in.
1116It uses the environment variables @code{LOGNAME} or @code{USER} if 1115It uses the environment variables @env{LOGNAME} or @env{USER} if
1117either is set. Otherwise, the value is based on the effective 1116either is set. Otherwise, the value is based on the effective
1118@acronym{UID}, not the real @acronym{UID}. 1117@acronym{UID}, not the real @acronym{UID}.
1119 1118
@@ -1124,12 +1123,12 @@ corresponds to @var{uid}, or @code{nil} if there is no such user.
1124@defun user-real-login-name 1123@defun user-real-login-name
1125This function returns the user name corresponding to Emacs's real 1124This function returns the user name corresponding to Emacs's real
1126@acronym{UID}. This ignores the effective @acronym{UID}, and the 1125@acronym{UID}. This ignores the effective @acronym{UID}, and the
1127environment variables @code{LOGNAME} and @code{USER}. 1126environment variables @env{LOGNAME} and @env{USER}.
1128@end defun 1127@end defun
1129 1128
1130@defun user-full-name &optional uid 1129@defun user-full-name &optional uid
1131This function returns the full name of the logged-in user---or the value 1130This function returns the full name of the logged-in user---or the value
1132of the environment variable @code{NAME}, if that is set. 1131of the environment variable @env{NAME}, if that is set.
1133 1132
1134If the Emacs process's user-id does not correspond to any known user (and 1133If the Emacs process's user-id does not correspond to any known user (and
1135provided @code{NAME} is not set), the result is @code{"unknown"}. 1134provided @code{NAME} is not set), the result is @code{"unknown"}.
@@ -1249,9 +1248,9 @@ The argument @var{time-value}, if given, specifies a time (represented
1249as a list of integers) to analyze instead of the current time. 1248as a list of integers) to analyze instead of the current time.
1250@end defun 1249@end defun
1251 1250
1252The current time zone is determined by the @samp{TZ} environment 1251The current time zone is determined by the @env{TZ} environment
1253variable. @xref{System Environment}. For example, you can tell Emacs 1252variable. @xref{System Environment}. For example, you can tell Emacs
1254to use universal time with @code{(setenv "TZ" "UTC0")}. If @samp{TZ} 1253to use universal time with @code{(setenv "TZ" "UTC0")}. If @env{TZ}
1255is not in the environment, Emacs uses a platform-dependent default 1254is not in the environment, Emacs uses a platform-dependent default
1256time zone. 1255time zone.
1257 1256
@@ -1325,7 +1324,7 @@ yourself before you call @code{encode-time}.
1325The optional argument @var{zone} defaults to the current time zone and 1324The optional argument @var{zone} defaults to the current time zone and
1326its daylight saving time rules. If specified, it can be either a list 1325its daylight saving time rules. If specified, it can be either a list
1327(as you would get from @code{current-time-zone}), a string as in the 1326(as you would get from @code{current-time-zone}), a string as in the
1328@code{TZ} environment variable, @code{t} for Universal Time, or an 1327@env{TZ} environment variable, @code{t} for Universal Time, or an
1329integer (as you would get from @code{decode-time}). The specified 1328integer (as you would get from @code{decode-time}). The specified
1330zone is used without any further alteration for daylight saving time. 1329zone is used without any further alteration for daylight saving time.
1331 1330
@@ -2233,7 +2232,7 @@ non-@code{nil}, Emacs tells the session manager to cancel the
2233shutdown. 2232shutdown.
2234@end defvar 2233@end defvar
2235 2234
2236Here is an example that just inserts some text into @samp{*scratch*} when 2235Here is an example that just inserts some text into @file{*scratch*} when
2237Emacs is restarted by the session manager. 2236Emacs is restarted by the session manager.
2238 2237
2239@example 2238@example
diff --git a/doc/lispref/package.texi b/doc/lispref/package.texi
index b17f13b6b89..7cb260d32b8 100644
--- a/doc/lispref/package.texi
+++ b/doc/lispref/package.texi
@@ -1,8 +1,7 @@
1@c -*-texinfo-*- 1@c -*-texinfo-*-
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 2010-2012 Free Software Foundation, Inc. 3@c Copyright (C) 2010-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5@setfilename ../../info/package
6@node Packaging, Antinews, System Interface, Top 5@node Packaging, Antinews, System Interface, Top
7@chapter Preparing Lisp code for distribution 6@chapter Preparing Lisp code for distribution
8@cindex package 7@cindex package
diff --git a/doc/lispref/positions.texi b/doc/lispref/positions.texi
index 99722c93902..8ad52a8e56d 100644
--- a/doc/lispref/positions.texi
+++ b/doc/lispref/positions.texi
@@ -1,8 +1,7 @@
1@c -*-texinfo-*- 1@c -*-texinfo-*-
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990-1995, 1998-2012 Free Software Foundation, Inc. 3@c Copyright (C) 1990-1995, 1998-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5@setfilename ../../info/positions
6@node Positions, Markers, Frames, Top 5@node Positions, Markers, Frames, Top
7@chapter Positions 6@chapter Positions
8@cindex position (in buffer) 7@cindex position (in buffer)
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi
index 0dae20427c6..71736584865 100644
--- a/doc/lispref/processes.texi
+++ b/doc/lispref/processes.texi
@@ -3,7 +3,6 @@
3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012
4@c Free Software Foundation, Inc. 4@c Free Software Foundation, Inc.
5@c See the file elisp.texi for copying conditions. 5@c See the file elisp.texi for copying conditions.
6@setfilename ../../info/processes
7@node Processes, Display, Abbrevs, Top 6@node Processes, Display, Abbrevs, Top
8@chapter Processes 7@chapter Processes
9@cindex child process 8@cindex child process
@@ -23,7 +22,7 @@ subprocess, the Lisp program waits for the subprocess to terminate
23before continuing execution. When you create an asynchronous 22before continuing execution. When you create an asynchronous
24subprocess, it can run in parallel with the Lisp program. This kind of 23subprocess, it can run in parallel with the Lisp program. This kind of
25subprocess is represented within Emacs by a Lisp object which is also 24subprocess is represented within Emacs by a Lisp object which is also
26called a ``process.'' Lisp programs can use this object to communicate 25called a ``process''. Lisp programs can use this object to communicate
27with the subprocess or to control it. For example, you can send 26with the subprocess or to control it. For example, you can send
28signals, obtain status information, receive output from the process, or 27signals, obtain status information, receive output from the process, or
29send input to it. 28send input to it.
@@ -70,21 +69,23 @@ a program. One of them, @code{start-process}, creates an asynchronous
70process and returns a process object (@pxref{Asynchronous Processes}). 69process and returns a process object (@pxref{Asynchronous Processes}).
71The other two, @code{call-process} and @code{call-process-region}, 70The other two, @code{call-process} and @code{call-process-region},
72create a synchronous process and do not return a process object 71create a synchronous process and do not return a process object
73(@pxref{Synchronous Processes}). 72(@pxref{Synchronous Processes}). There are various higher-level
73functions that make use of these primitives to run particular types of
74process.
74 75
75 Synchronous and asynchronous processes are explained in the following 76 Synchronous and asynchronous processes are explained in the following
76sections. Since the three functions are all called in a similar 77sections. Since the three functions are all called in a similar
77fashion, their common arguments are described here. 78fashion, their common arguments are described here.
78 79
79@cindex execute program 80@cindex execute program
80@cindex @code{PATH} environment variable 81@cindex @env{PATH} environment variable
81@cindex @code{HOME} environment variable 82@cindex @env{HOME} environment variable
82 In all cases, the function's @var{program} argument specifies the 83 In all cases, the function's @var{program} argument specifies the
83program to be run. An error is signaled if the file is not found or 84program to be run. An error is signaled if the file is not found or
84cannot be executed. If the file name is relative, the variable 85cannot be executed. If the file name is relative, the variable
85@code{exec-path} contains a list of directories to search. Emacs 86@code{exec-path} contains a list of directories to search. Emacs
86initializes @code{exec-path} when it starts up, based on the value of 87initializes @code{exec-path} when it starts up, based on the value of
87the environment variable @code{PATH}. The standard file name 88the environment variable @env{PATH}. The standard file name
88constructs, @samp{~}, @samp{.}, and @samp{..}, are interpreted as 89constructs, @samp{~}, @samp{.}, and @samp{..}, are interpreted as
89usual in @code{exec-path}, but environment variable substitutions 90usual in @code{exec-path}, but environment variable substitutions
90(@samp{$HOME}, etc.) are not recognized; use 91(@samp{$HOME}, etc.) are not recognized; use
@@ -104,16 +105,19 @@ system-dependent.
104 105
105 @strong{Please note:} The argument @var{program} contains only the 106 @strong{Please note:} The argument @var{program} contains only the
106name of the program; it may not contain any command-line arguments. You 107name of the program; it may not contain any command-line arguments. You
107must use @var{args} to provide those. 108must use a separate argument, @var{args}, to provide those, as
109described below.
108 110
109 Each of the subprocess-creating functions has a @var{buffer-or-name} 111 Each of the subprocess-creating functions has a @var{buffer-or-name}
110argument which specifies where the standard output from the program will 112argument that specifies where the standard output from the program will
111go. It should be a buffer or a buffer name; if it is a buffer name, 113go. It should be a buffer or a buffer name; if it is a buffer name,
112that will create the buffer if it does not already exist. It can also 114that will create the buffer if it does not already exist. It can also
113be @code{nil}, which says to discard the output unless a filter function 115be @code{nil}, which says to discard the output unless a filter function
114handles it. (@xref{Filter Functions}, and @ref{Read and Print}.) 116handles it. (@xref{Filter Functions}, and @ref{Read and Print}.)
115Normally, you should avoid having multiple processes send output to the 117Normally, you should avoid having multiple processes send output to the
116same buffer because their output would be intermixed randomly. 118same buffer because their output would be intermixed randomly.
119For synchronous processes, you can send the output to a file instead
120of a buffer.
117 121
118@cindex program arguments 122@cindex program arguments
119 All three of the subprocess-creating functions have a @code{&rest} 123 All three of the subprocess-creating functions have a @code{&rest}
@@ -122,18 +126,16 @@ supplied to @var{program} as separate command line arguments. Wildcard
122characters and other shell constructs have no special meanings in these 126characters and other shell constructs have no special meanings in these
123strings, since the strings are passed directly to the specified program. 127strings, since the strings are passed directly to the specified program.
124 128
125 The subprocess gets its current directory from the value of
126@code{default-directory} (@pxref{File Name Expansion}).
127
128@cindex environment variables, subprocesses 129@cindex environment variables, subprocesses
129 The subprocess inherits its environment from Emacs, but you can 130 The subprocess inherits its environment from Emacs, but you can
130specify overrides for it with @code{process-environment}. @xref{System 131specify overrides for it with @code{process-environment}. @xref{System
131Environment}. 132Environment}. The subprocess gets its current directory from the
133value of @code{default-directory}.
132 134
133@defvar exec-directory 135@defvar exec-directory
134@pindex movemail 136@pindex movemail
135The value of this variable is a string, the name of a directory that 137The value of this variable is a string, the name of a directory that
136contains programs that come with GNU Emacs, programs intended for Emacs 138contains programs that come with GNU Emacs and are intended for Emacs
137to invoke. The program @code{movemail} is an example of such a program; 139to invoke. The program @code{movemail} is an example of such a program;
138Rmail uses it to fetch new mail from an inbox. 140Rmail uses it to fetch new mail from an inbox.
139@end defvar 141@end defvar
@@ -148,6 +150,11 @@ directory (which is the value of @code{default-directory}).
148The value of @code{exec-path} is used by @code{call-process} and 150The value of @code{exec-path} is used by @code{call-process} and
149@code{start-process} when the @var{program} argument is not an absolute 151@code{start-process} when the @var{program} argument is not an absolute
150file name. 152file name.
153
154Generally, you should not modify @code{exec-path} directly. Instead,
155ensure that your @env{PATH} environment variable is set appropriately
156before starting Emacs. Trying to modify @code{exec-path}
157independently of @env{PATH} can lead to confusing results.
151@end defopt 158@end defopt
152 159
153@node Shell Arguments 160@node Shell Arguments
@@ -163,7 +170,7 @@ occur in the file name, they will confuse the shell. To handle these
163characters, use the function @code{shell-quote-argument}: 170characters, use the function @code{shell-quote-argument}:
164 171
165@defun shell-quote-argument argument 172@defun shell-quote-argument argument
166This function returns a string which represents, in shell syntax, 173This function returns a string that represents, in shell syntax,
167an argument whose actual contents are @var{argument}. It should 174an argument whose actual contents are @var{argument}. It should
168work reliably to concatenate the return value into a shell command 175work reliably to concatenate the return value into a shell command
169and then pass it to a shell for execution. 176and then pass it to a shell for execution.
@@ -201,10 +208,10 @@ a shell command:
201 The following two functions are useful for combining a list of 208 The following two functions are useful for combining a list of
202individual command-line argument strings into a single string, and 209individual command-line argument strings into a single string, and
203taking a string apart into a list of individual command-line 210taking a string apart into a list of individual command-line
204arguments. These functions are mainly intended to be used for 211arguments. These functions are mainly intended for
205converting user input in the minibuffer, a Lisp string, into a list of 212converting user input in the minibuffer, a Lisp string, into a list of
206string arguments to be passed to @code{call-process} or 213string arguments to be passed to @code{call-process} or
207@code{start-process}, or for the converting such lists of arguments in 214@code{start-process}, or for converting such lists of arguments into
208a single Lisp string to be presented in the minibuffer or echo area. 215a single Lisp string to be presented in the minibuffer or echo area.
209 216
210@defun split-string-and-unquote string &optional separators 217@defun split-string-and-unquote string &optional separators
@@ -268,6 +275,9 @@ system, much like text written into a file. @xref{Coding Systems}.
268@defun call-process program &optional infile destination display &rest args 275@defun call-process program &optional infile destination display &rest args
269This function calls @var{program} and waits for it to finish. 276This function calls @var{program} and waits for it to finish.
270 277
278The current working directory of the subprocess is
279@code{default-directory}.
280
271The standard input for the new process comes from file @var{infile} if 281The standard input for the new process comes from file @var{infile} if
272@var{infile} is not @code{nil}, and from the null device otherwise. 282@var{infile} is not @code{nil}, and from the null device otherwise.
273The argument @var{destination} says where to put the process output. 283The argument @var{destination} says where to put the process output.
@@ -345,7 +355,7 @@ In the examples below, the buffer @samp{foo} is current.
345 @result{} 0 355 @result{} 0
346 356
347---------- Buffer: foo ---------- 357---------- Buffer: foo ----------
348/usr/user/lewis/manual 358/home/lewis/manual
349---------- Buffer: foo ---------- 359---------- Buffer: foo ----------
350@end group 360@end group
351 361
@@ -354,18 +364,18 @@ In the examples below, the buffer @samp{foo} is current.
354 @result{} 0 364 @result{} 0
355 365
356---------- Buffer: bar ---------- 366---------- Buffer: bar ----------
357lewis:5LTsHm66CSWKg:398:21:Bil Lewis:/user/lewis:/bin/csh 367lewis:x:1001:1001:Bil Lewis,,,,:/home/lewis:/bin/bash
358 368
359---------- Buffer: bar ---------- 369---------- Buffer: bar ----------
360@end group 370@end group
361@end smallexample 371@end smallexample
362 372
363Here is a good example of the use of @code{call-process}, which used to 373Here is an example of the use of @code{call-process}, as used to
364be found in the definition of @code{insert-directory}: 374be found in the definition of the @code{insert-directory} function:
365 375
366@smallexample 376@smallexample
367@group 377@group
368(call-process insert-directory-program nil t nil @var{switches} 378(call-process insert-directory-program nil t nil switches
369 (if full-directory-p 379 (if full-directory-p
370 (concat (file-name-as-directory file) ".") 380 (concat (file-name-as-directory file) ".")
371 file)) 381 file))
@@ -375,9 +385,9 @@ be found in the definition of @code{insert-directory}:
375 385
376@defun process-file program &optional infile buffer display &rest args 386@defun process-file program &optional infile buffer display &rest args
377This function processes files synchronously in a separate process. It 387This function processes files synchronously in a separate process. It
378is similar to @code{call-process} but may invoke a file handler based 388is similar to @code{call-process}, but may invoke a file handler based
379on the value of the variable @code{default-directory}. The current 389on the value of the variable @code{default-directory}, which specifies
380working directory of the subprocess is @code{default-directory}. 390the current working directory of the subprocess.
381 391
382The arguments are handled in almost the same way as for 392The arguments are handled in almost the same way as for
383@code{call-process}, with the following differences: 393@code{call-process}, with the following differences:
@@ -390,15 +400,15 @@ file handlers might not support separating standard output and error
390output by way of the @var{buffer} argument. 400output by way of the @var{buffer} argument.
391 401
392If a file handler is invoked, it determines the program to run based 402If a file handler is invoked, it determines the program to run based
393on the first argument @var{program}. For instance, consider that a 403on the first argument @var{program}. For instance, suppose that a
394handler for remote files is invoked. Then the path that is used for 404handler for remote files is invoked. Then the path that is used for
395searching the program might be different than @code{exec-path}. 405searching for the program might be different from @code{exec-path}.
396 406
397The second argument @var{infile} may invoke a file handler. The file 407The second argument @var{infile} may invoke a file handler. The file
398handler could be different from the handler chosen for the 408handler could be different from the handler chosen for the
399@code{process-file} function itself. (For example, 409@code{process-file} function itself. (For example,
400@code{default-directory} could be on a remote host, whereas 410@code{default-directory} could be on one remote host, and
401@var{infile} is on another remote host. Or @code{default-directory} 411@var{infile} on a different remote host. Or @code{default-directory}
402could be non-special, whereas @var{infile} is on a remote host.) 412could be non-special, whereas @var{infile} is on a remote host.)
403 413
404If @var{buffer} is a list of the form @code{(@var{real-destination} 414If @var{buffer} is a list of the form @code{(@var{real-destination}
@@ -415,16 +425,16 @@ file names.
415@end defun 425@end defun
416 426
417@defvar process-file-side-effects 427@defvar process-file-side-effects
418This variable indicates, whether a call of @code{process-file} changes 428This variable indicates whether a call of @code{process-file} changes
419remote files. 429remote files.
420 430
421Per default, this variable is always set to @code{t}, meaning that a 431By default, this variable is always set to @code{t}, meaning that a
422call of @code{process-file} could potentially change any file on a 432call of @code{process-file} could potentially change any file on a
423remote host. When set to @code{nil}, a file handler could optimize 433remote host. When set to @code{nil}, a file handler could optimize
424its behavior with respect to remote file attributes caching. 434its behavior with respect to remote file attribute caching.
425 435
426This variable should never be changed by @code{setq}. Instead of, it 436You should only ever change this variable with a let-binding; never
427shall be set only by let-binding. 437with @code{setq}.
428@end defvar 438@end defvar
429 439
430@defun call-process-region start end program &optional delete destination display &rest args 440@defun call-process-region start end program &optional delete destination display &rest args
@@ -440,7 +450,7 @@ as it comes in. For details, see the description of
440@code{call-process}, above. If @var{destination} is the integer 0, 450@code{call-process}, above. If @var{destination} is the integer 0,
441@code{call-process-region} discards the output and returns @code{nil} 451@code{call-process-region} discards the output and returns @code{nil}
442immediately, without waiting for the subprocess to finish (this only 452immediately, without waiting for the subprocess to finish (this only
443works if asynchronous subprocesses are supported). 453works if asynchronous subprocesses are supported; i.e. not on MS-DOS).
444 454
445The remaining arguments, @var{args}, are strings that specify command 455The remaining arguments, @var{args}, are strings that specify command
446line arguments for the program. 456line arguments for the program.
@@ -474,20 +484,21 @@ inputinput@point{}
474@end group 484@end group
475@end smallexample 485@end smallexample
476 486
477 The @code{shell-command-on-region} command uses 487 For example, the @code{shell-command-on-region} command uses
478@code{call-process-region} like this: 488@code{call-process-region} in a manner similar to this:
479 489
480@smallexample 490@smallexample
481@group 491@group
482(call-process-region 492(call-process-region
483 start end 493 start end
484 shell-file-name ; @r{Name of program.} 494 shell-file-name ; @r{name of program}
485 nil ; @r{Do not delete region.} 495 nil ; @r{do not delete region}
486 buffer ; @r{Send output to @code{buffer}.} 496 buffer ; @r{send output to @code{buffer}}
487 nil ; @r{No redisplay during output.} 497 nil ; @r{no redisplay during output}
488 "-c" command) ; @r{Arguments for the shell.} 498 "-c" command) ; @r{arguments for the shell}
489@end group 499@end group
490@end smallexample 500@end smallexample
501@c It actually uses shell-command-switch, but no need to mention that here.
491@end defun 502@end defun
492 503
493@defun call-process-shell-command command &optional infile destination display &rest args 504@defun call-process-shell-command command &optional infile destination display &rest args
@@ -508,6 +519,9 @@ This function executes @var{command} (a string) as a shell command,
508then returns the command's output as a string. 519then returns the command's output as a string.
509@end defun 520@end defun
510 521
522@c There is also shell-command-on-region, but that is more of a user
523@c command, not something to use in programs.
524
511@defun process-lines program &rest args 525@defun process-lines program &rest args
512This function runs @var{program}, waits for it to finish, and returns 526This function runs @var{program}, waits for it to finish, and returns
513its output as a list of strings. Each string in the list holds a 527its output as a list of strings. Each string in the list holds a
@@ -547,11 +561,17 @@ already exists, then @var{name} is modified (by appending @samp{<1>},
547etc.) to be unique. The buffer @var{buffer-or-name} is the buffer to 561etc.) to be unique. The buffer @var{buffer-or-name} is the buffer to
548associate with the process. 562associate with the process.
549 563
564If @var{program} is @code{nil}, Emacs opens a new pseudoterminal (pty)
565and associates its input and output with @var{buffer-or-name}, without
566creating a subprocess. In that case, the remaining arguments
567@var{args} are ignored.
568
550The remaining arguments, @var{args}, are strings that specify command 569The remaining arguments, @var{args}, are strings that specify command
551line arguments for the program. 570line arguments for the subprocess.
552 571
553In the example below, the first process is started and runs (rather, 572In the example below, the first process is started and runs (rather,
554sleeps) for 100 seconds. Meanwhile, the second process is started, and 573sleeps) for 100 seconds (the output buffer @samp{foo} is created
574immediately). Meanwhile, the second process is started, and
555given the name @samp{my-process<1>} for the sake of uniqueness. It 575given the name @samp{my-process<1>} for the sake of uniqueness. It
556inserts the directory listing at the end of the buffer @samp{foo}, 576inserts the directory listing at the end of the buffer @samp{foo},
557before the first process finishes. Then it finishes, and a message to 577before the first process finishes. Then it finishes, and a message to
@@ -565,13 +585,15 @@ finishes, and another message is inserted in the buffer for it.
565@end group 585@end group
566 586
567@group 587@group
568(start-process "my-process" "foo" "ls" "-l" "/user/lewis/bin") 588(start-process "my-process" "foo" "ls" "-l" "/bin")
569 @result{} #<process my-process<1>> 589 @result{} #<process my-process<1>>
570 590
571---------- Buffer: foo ---------- 591---------- Buffer: foo ----------
572total 2 592total 8336
573lrwxrwxrwx 1 lewis 14 Jul 22 10:12 gnuemacs --> /emacs 593-rwxr-xr-x 1 root root 971384 Mar 30 10:14 bash
574-rwxrwxrwx 1 lewis 19 Jul 30 21:02 lemon 594-rwxr-xr-x 1 root root 146920 Jul 5 2011 bsd-csh
595@dots{}
596-rwxr-xr-x 1 root root 696880 Feb 28 15:55 zsh4
575 597
576Process my-process<1> finished 598Process my-process<1> finished
577 599
@@ -584,45 +606,49 @@ Process my-process finished
584@defun start-file-process name buffer-or-name program &rest args 606@defun start-file-process name buffer-or-name program &rest args
585Like @code{start-process}, this function starts a new asynchronous 607Like @code{start-process}, this function starts a new asynchronous
586subprocess running @var{program} in it, and returns its process 608subprocess running @var{program} in it, and returns its process
587object---when @code{default-directory} is not a magic file name. 609object.
588 610
589If @code{default-directory} is magic, the function invokes its file 611The difference from @code{start-process} is that this function may
590handler instead. This handler ought to run @var{program}, perhaps on 612invoked a file handler based on the value of @code{default-directory}.
591the local host, perhaps on a remote host that corresponds to 613This handler ought to run @var{program}, perhaps on the local host,
592@code{default-directory}. In the latter case, the local part of 614perhaps on a remote host that corresponds to @code{default-directory}.
593@code{default-directory} becomes the working directory of the process. 615In the latter case, the local part of @code{default-directory} becomes
616the working directory of the process.
594 617
595This function does not try to invoke file name handlers for 618This function does not try to invoke file name handlers for
596@var{program} or for the @var{program-args}. 619@var{program} or for the @var{program-args}.
597 620
598Depending on the implementation of the file handler, it might not be 621Depending on the implementation of the file handler, it might not be
599possible to apply @code{process-filter} or @code{process-sentinel} to 622possible to apply @code{process-filter} or @code{process-sentinel} to
600the resulting process object (@pxref{Filter Functions}, @pxref{Sentinels}). 623the resulting process object. @xref{Filter Functions}, and @ref{Sentinels}.
601 624
625@c FIXME Can we find a better example (i.e. a more modern function
626@c that is actually documented).
602Some file handlers may not support @code{start-file-process} (for 627Some file handlers may not support @code{start-file-process} (for
603example @code{ange-ftp-hook-function}). In such cases, the function 628example the function @code{ange-ftp-hook-function}). In such cases,
604does nothing and returns @code{nil}. 629this function does nothing and returns @code{nil}.
605@end defun 630@end defun
606 631
607@defun start-process-shell-command name buffer-or-name command 632@defun start-process-shell-command name buffer-or-name command
608This function is like @code{start-process} except that it uses a shell 633This function is like @code{start-process}, except that it uses a shell
609to execute the specified command. The argument @var{command} is a shell 634to execute the specified command. The argument @var{command} is a shell
610command name. The variable @code{shell-file-name} specifies which shell to 635command name. The variable @code{shell-file-name} specifies which shell to
611use. 636use.
612 637
613The point of running a program through the shell, rather than directly 638The point of running a program through the shell, rather than directly
614with @code{start-process}, is so that you can employ shell features such 639with @code{start-process}, is so that you can employ shell features such
615as wildcards in the arguments. It follows that if you include an 640as wildcards in the arguments. It follows that if you include any
616arbitrary user-specified arguments in the command, you should quote it 641arbitrary user-specified arguments in the command, you should quote them
617with @code{shell-quote-argument} first, so that any special shell 642with @code{shell-quote-argument} first, so that any special shell
618characters do @emph{not} have their special shell meanings. @xref{Shell 643characters do @emph{not} have their special shell meanings. @xref{Shell
619Arguments}. 644Arguments}. Of course, when executing commands based on user input
645you should also consider the security implications.
620@end defun 646@end defun
621 647
622@defun start-file-process-shell-command name buffer-or-name command 648@defun start-file-process-shell-command name buffer-or-name command
623This function is like @code{start-process-shell-command}, but uses 649This function is like @code{start-process-shell-command}, but uses
624@code{start-file-process} internally. By this, @var{command} can be 650@code{start-file-process} internally. Because of this, @var{command}
625executed also on remote hosts, depending on @code{default-directory}. 651can also be executed on remote hosts, depending on @code{default-directory}.
626@end defun 652@end defun
627 653
628@defvar process-connection-type 654@defvar process-connection-type
@@ -647,7 +673,7 @@ with one subprocess by binding the variable around the call to
647 673
648@smallexample 674@smallexample
649@group 675@group
650(let ((process-connection-type nil)) ; @r{Use a pipe.} 676(let ((process-connection-type nil)) ; @r{use a pipe}
651 (start-process @dots{})) 677 (start-process @dots{}))
652@end group 678@end group
653@end smallexample 679@end smallexample
@@ -664,9 +690,9 @@ Information}).
664 @dfn{Deleting a process} disconnects Emacs immediately from the 690 @dfn{Deleting a process} disconnects Emacs immediately from the
665subprocess. Processes are deleted automatically after they terminate, 691subprocess. Processes are deleted automatically after they terminate,
666but not necessarily right away. You can delete a process explicitly 692but not necessarily right away. You can delete a process explicitly
667at any time. If you delete a terminated process explicitly before it 693at any time. If you explicitly delete a terminated process before it
668is deleted automatically, no harm results. Deleting a running 694is deleted automatically, no harm results. Deleting a running
669process sends a signal to terminate it (and its child processes if 695process sends a signal to terminate it (and its child processes, if
670any), and calls the process sentinel if it has one. @xref{Sentinels}. 696any), and calls the process sentinel if it has one. @xref{Sentinels}.
671 697
672 When a process is deleted, the process object itself continues to 698 When a process is deleted, the process object itself continues to
@@ -707,17 +733,17 @@ happen sooner or later).
707@section Process Information 733@section Process Information
708 734
709 Several functions return information about processes. 735 Several functions return information about processes.
710@code{list-processes} is provided for interactive use.
711 736
712@deffn Command list-processes &optional query-only 737@deffn Command list-processes &optional query-only buffer
713This command displays a listing of all living processes. In addition, 738This command displays a listing of all living processes. In addition,
714it finally deletes any process whose status was @samp{Exited} or 739it finally deletes any process whose status was @samp{Exited} or
715@samp{Signaled}. It returns @code{nil}. 740@samp{Signaled}. It returns @code{nil}.
716 741
717The processes are shown in a buffer named @samp{*Process List*}, whose 742The processes are shown in a buffer named @file{*Process List*}
718major mode is named Process Menu mode. 743(unless you specify otherwise using the optional argument @var{buffer}),
744whose major mode is Process Menu mode.
719 745
720If @var{query-only} is non-@code{nil} then it lists only processes 746If @var{query-only} is non-@code{nil}, it only lists processes
721whose query flag is non-@code{nil}. @xref{Query Before Exit}. 747whose query flag is non-@code{nil}. @xref{Query Before Exit}.
722@end deffn 748@end deffn
723 749
@@ -733,8 +759,8 @@ This function returns a list of all processes that have not been deleted.
733@end defun 759@end defun
734 760
735@defun get-process name 761@defun get-process name
736This function returns the process named @var{name}, or @code{nil} if 762This function returns the process named @var{name} (a string), or
737there is none. An error is signaled if @var{name} is not a string. 763@code{nil} if there is none.
738 764
739@smallexample 765@smallexample
740@group 766@group
@@ -753,7 +779,7 @@ were given to the program.
753@smallexample 779@smallexample
754@group 780@group
755(process-command (get-process "shell")) 781(process-command (get-process "shell"))
756 @result{} ("/bin/csh" "-i") 782 @result{} ("bash" "-i")
757@end group 783@end group
758@end smallexample 784@end smallexample
759@end defun 785@end defun
@@ -761,11 +787,10 @@ were given to the program.
761@defun process-contact process &optional key 787@defun process-contact process &optional key
762 788
763This function returns information about how a network or serial 789This function returns information about how a network or serial
764process was set up. For a network process, when @var{key} is 790process was set up. When @var{key} is @code{nil}, it returns
765@code{nil}, it returns @code{(@var{hostname} @var{service})} which 791@code{(@var{hostname} @var{service})} for a network process, and
766specifies what you connected to. For a serial process, when @var{key} 792@code{(@var{port} @var{speed})} for a serial process.
767is @code{nil}, it returns @code{(@var{port} @var{speed})}. For an 793For an ordinary child process, this function always returns @code{t}.
768ordinary child process, this function always returns @code{t}.
769 794
770If @var{key} is @code{t}, the value is the complete status information 795If @var{key} is @code{t}, the value is the complete status information
771for the connection, server, or serial port; that is, the list of 796for the connection, server, or serial port; that is, the list of
@@ -773,7 +798,8 @@ keywords and values specified in @code{make-network-process} or
773@code{make-serial-process}, except that some of the values represent 798@code{make-serial-process}, except that some of the values represent
774the current status instead of what you specified. 799the current status instead of what you specified.
775 800
776For a network process: 801For a network process, the values include (see
802@code{make-network-process} for a complete list):
777 803
778@table @code 804@table @code
779@item :buffer 805@item :buffer
@@ -810,7 +836,7 @@ process is started and remains constant as long as the process exists.
810@end defun 836@end defun
811 837
812@defun process-name process 838@defun process-name process
813This function returns the name of @var{process}. 839This function returns the name of @var{process}, as a string.
814@end defun 840@end defun
815 841
816@defun process-status process-name 842@defun process-status process-name
@@ -850,12 +876,6 @@ if @var{process-name} is not the name of an existing process.
850(process-status (get-buffer "*shell*")) 876(process-status (get-buffer "*shell*"))
851 @result{} run 877 @result{} run
852@end group 878@end group
853@group
854x
855 @result{} #<process xx<1>>
856(process-status x)
857 @result{} exit
858@end group
859@end smallexample 879@end smallexample
860 880
861For a network connection, @code{process-status} returns one of the symbols 881For a network connection, @code{process-status} returns one of the symbols
@@ -864,7 +884,7 @@ closed the connection, or Emacs did @code{delete-process}.
864@end defun 884@end defun
865 885
866@defun process-live-p process 886@defun process-live-p process
867This function returns nin-@code{nil} if @var{process} is alive. A 887This function returns non-@code{nil} if @var{process} is alive. A
868process is considered alive if its status is @code{run}, @code{open}, 888process is considered alive if its status is @code{run}, @code{open},
869@code{listen}, @code{connect} or @code{stop}. 889@code{listen}, @code{connect} or @code{stop}.
870@end defun 890@end defun
@@ -893,13 +913,9 @@ the remote host is provided as process property @code{remote-tty}.
893 913
894@defun process-coding-system process 914@defun process-coding-system process
895@anchor{Coding systems for a subprocess} 915@anchor{Coding systems for a subprocess}
896This function returns a cons cell describing the coding systems in use 916This function returns a cons cell @code{(@var{decode} . @var{encode})},
897for decoding output from @var{process} and for encoding input to 917describing the coding systems in use for decoding output from, and
898@var{process} (@pxref{Coding Systems}). The value has this form: 918encoding input to, @var{process} (@pxref{Coding Systems}).
899
900@example
901(@var{coding-system-for-decoding} . @var{coding-system-for-encoding})
902@end example
903@end defun 919@end defun
904 920
905@defun set-process-coding-system process &optional decoding-system encoding-system 921@defun set-process-coding-system process &optional decoding-system encoding-system
@@ -939,6 +955,7 @@ Emacs, which is done with the functions in this section. You must
939specify the process to send input to, and the input data to send. The 955specify the process to send input to, and the input data to send. The
940data appears on the ``standard input'' of the subprocess. 956data appears on the ``standard input'' of the subprocess.
941 957
958@c FIXME which?
942 Some operating systems have limited space for buffered input in a 959 Some operating systems have limited space for buffered input in a
943@acronym{PTY}. On these systems, Emacs sends an @acronym{EOF} 960@acronym{PTY}. On these systems, Emacs sends an @acronym{EOF}
944periodically amidst the other characters, to force them through. For 961periodically amidst the other characters, to force them through. For
@@ -965,26 +982,14 @@ the current buffer's process.
965 982
966@defun process-send-string process string 983@defun process-send-string process string
967This function sends @var{process} the contents of @var{string} as 984This function sends @var{process} the contents of @var{string} as
968standard input. If it is @code{nil}, the current buffer's process is used. 985standard input. It returns @code{nil}. For example, to make a
969 986Shell buffer list files:
970 The function returns @code{nil}.
971 987
972@smallexample 988@smallexample
973@group 989@group
974(process-send-string "shell<1>" "ls\n") 990(process-send-string "shell<1>" "ls\n")
975 @result{} nil 991 @result{} nil
976@end group 992@end group
977
978
979@group
980---------- Buffer: *shell* ----------
981...
982introduction.texi syntax-tables.texi~
983introduction.texi~ text.texi
984introduction.txt text.texi~
985...
986---------- Buffer: *shell* ----------
987@end group
988@end smallexample 993@end smallexample
989@end defun 994@end defun
990 995
@@ -1000,7 +1005,6 @@ is unimportant which number is larger.)
1000@defun process-send-eof &optional process 1005@defun process-send-eof &optional process
1001This function makes @var{process} see an end-of-file in its 1006This function makes @var{process} see an end-of-file in its
1002input. The @acronym{EOF} comes after any text already sent to it. 1007input. The @acronym{EOF} comes after any text already sent to it.
1003
1004The function returns @var{process}. 1008The function returns @var{process}.
1005 1009
1006@smallexample 1010@smallexample
@@ -1031,7 +1035,7 @@ system. For example, the signal @code{SIGINT} means that the user has
1031typed @kbd{C-c}, or that some analogous thing has happened. 1035typed @kbd{C-c}, or that some analogous thing has happened.
1032 1036
1033 Each signal has a standard effect on the subprocess. Most signals 1037 Each signal has a standard effect on the subprocess. Most signals
1034kill the subprocess, but some stop or resume execution instead. Most 1038kill the subprocess, but some stop (or resume) execution instead. Most
1035signals can optionally be handled by programs; if the program handles 1039signals can optionally be handled by programs; if the program handles
1036the signal, then we can say nothing in general about its effects. 1040the signal, then we can say nothing in general about its effects.
1037 1041
@@ -1040,7 +1044,7 @@ section. Emacs also sends signals automatically at certain times:
1040killing a buffer sends a @code{SIGHUP} signal to all its associated 1044killing a buffer sends a @code{SIGHUP} signal to all its associated
1041processes; killing Emacs sends a @code{SIGHUP} signal to all remaining 1045processes; killing Emacs sends a @code{SIGHUP} signal to all remaining
1042processes. (@code{SIGHUP} is a signal that usually indicates that the 1046processes. (@code{SIGHUP} is a signal that usually indicates that the
1043user hung up the phone.) 1047user ``hung up the phone'', i.e., disconnected.)
1044 1048
1045 Each of the signal-sending functions takes two optional arguments: 1049 Each of the signal-sending functions takes two optional arguments:
1046@var{process} and @var{current-group}. 1050@var{process} and @var{current-group}.
@@ -1084,6 +1088,8 @@ and cannot be handled by the subprocess.
1084@defun quit-process &optional process current-group 1088@defun quit-process &optional process current-group
1085This function sends the signal @code{SIGQUIT} to the process 1089This function sends the signal @code{SIGQUIT} to the process
1086@var{process}. This signal is the one sent by the ``quit 1090@var{process}. This signal is the one sent by the ``quit
1091@c FIXME? Never heard of C-b being used for this. In readline, eg
1092@c bash, that is backward-word.
1087character'' (usually @kbd{C-b} or @kbd{C-\}) when you are not inside 1093character'' (usually @kbd{C-b} or @kbd{C-\}) when you are not inside
1088Emacs. 1094Emacs.
1089@end defun 1095@end defun
@@ -1108,11 +1114,12 @@ stopped previously.
1108 1114
1109@defun signal-process process signal 1115@defun signal-process process signal
1110This function sends a signal to process @var{process}. The argument 1116This function sends a signal to process @var{process}. The argument
1111@var{signal} specifies which signal to send; it should be an integer. 1117@var{signal} specifies which signal to send; it should be an integer,
1118or a symbol whose name is a signal.
1112 1119
1113The @var{process} argument can be a system process @acronym{ID}; that 1120The @var{process} argument can be a system process @acronym{ID} (an
1114allows you to send signals to processes that are not children of 1121integer); that allows you to send signals to processes that are not
1115Emacs. @xref{System Processes}. 1122children of Emacs. @xref{System Processes}.
1116@end defun 1123@end defun
1117 1124
1118@node Output from Processes 1125@node Output from Processes
@@ -1122,10 +1129,10 @@ Emacs. @xref{System Processes}.
1122 1129
1123 There are two ways to receive the output that a subprocess writes to 1130 There are two ways to receive the output that a subprocess writes to
1124its standard output stream. The output can be inserted in a buffer, 1131its standard output stream. The output can be inserted in a buffer,
1125which is called the associated buffer of the process, or a function 1132which is called the associated buffer of the process (@pxref{Process
1126called the @dfn{filter function} can be called to act on the output. If 1133Buffers}), or a function called the @dfn{filter function} can be
1127the process has no buffer and no filter function, its output is 1134called to act on the output. If the process has no buffer and no
1128discarded. 1135filter function, its output is discarded.
1129 1136
1130 When a subprocess terminates, Emacs reads any pending output, 1137 When a subprocess terminates, Emacs reads any pending output,
1131then stops reading output from that subprocess. Therefore, if the 1138then stops reading output from that subprocess. Therefore, if the
@@ -1133,19 +1140,20 @@ subprocess has children that are still live and still producing
1133output, Emacs won't receive that output. 1140output, Emacs won't receive that output.
1134 1141
1135 Output from a subprocess can arrive only while Emacs is waiting: when 1142 Output from a subprocess can arrive only while Emacs is waiting: when
1136reading terminal input, in @code{sit-for} and @code{sleep-for} 1143reading terminal input (see the function @code{waiting-for-user-input-p}),
1137(@pxref{Waiting}), and in @code{accept-process-output} (@pxref{Accepting 1144in @code{sit-for} and @code{sleep-for} (@pxref{Waiting}), and in
1138Output}). This minimizes the problem of timing errors that usually 1145@code{accept-process-output} (@pxref{Accepting Output}). This
1139plague parallel programming. For example, you can safely create a 1146minimizes the problem of timing errors that usually plague parallel
1140process and only then specify its buffer or filter function; no output 1147programming. For example, you can safely create a process and only
1141can arrive before you finish, if the code in between does not call any 1148then specify its buffer or filter function; no output can arrive
1142primitive that waits. 1149before you finish, if the code in between does not call any primitive
1150that waits.
1143 1151
1144@defvar process-adaptive-read-buffering 1152@defvar process-adaptive-read-buffering
1145On some systems, when Emacs reads the output from a subprocess, the 1153On some systems, when Emacs reads the output from a subprocess, the
1146output data is read in very small blocks, potentially resulting in 1154output data is read in very small blocks, potentially resulting in
1147very poor performance. This behavior can be remedied to some extent 1155very poor performance. This behavior can be remedied to some extent
1148by setting the variable @var{process-adaptive-read-buffering} to a 1156by setting the variable @code{process-adaptive-read-buffering} to a
1149non-@code{nil} value (the default), as it will automatically delay reading 1157non-@code{nil} value (the default), as it will automatically delay reading
1150from such processes, thus allowing them to produce more output before 1158from such processes, thus allowing them to produce more output before
1151Emacs tries to read it. 1159Emacs tries to read it.
@@ -1214,9 +1222,9 @@ to insert, and updates it to point after the inserted text. That is why
1214successive batches of output are inserted consecutively. 1222successive batches of output are inserted consecutively.
1215 1223
1216Filter functions normally should use this marker in the same fashion 1224Filter functions normally should use this marker in the same fashion
1217as is done by direct insertion of output in the buffer. A good 1225as is done by direct insertion of output in the buffer. For an
1218example of a filter function that uses @code{process-mark} is found at 1226example of a filter function that uses @code{process-mark},
1219the end of the following section. 1227@pxref{Process Filter Example}.
1220 1228
1221When the user is expected to enter input in the process buffer for 1229When the user is expected to enter input in the process buffer for
1222transmission to the process, the process marker separates the new input 1230transmission to the process, the process marker separates the new input
@@ -1264,14 +1272,16 @@ there is no filter.
1264 1272
1265 The filter function can only be called when Emacs is waiting for 1273 The filter function can only be called when Emacs is waiting for
1266something, because process output arrives only at such times. Emacs 1274something, because process output arrives only at such times. Emacs
1267waits when reading terminal input, in @code{sit-for} and 1275waits when reading terminal input (see the function
1268@code{sleep-for} (@pxref{Waiting}), and in @code{accept-process-output} 1276@code{waiting-for-user-input-p}), in @code{sit-for} and
1269(@pxref{Accepting Output}). 1277@code{sleep-for} (@pxref{Waiting}), and in
1278@code{accept-process-output} (@pxref{Accepting Output}).
1270 1279
1271 A filter function must accept two arguments: the associated process 1280 A filter function must accept two arguments: the associated process
1272and a string, which is output just received from it. The function is 1281and a string, which is output just received from it. The function is
1273then free to do whatever it chooses with the output. 1282then free to do whatever it chooses with the output.
1274 1283
1284@c Note this text is duplicated in the sentinels section.
1275 Quitting is normally inhibited within a filter function---otherwise, 1285 Quitting is normally inhibited within a filter function---otherwise,
1276the effect of typing @kbd{C-g} at command level or to quit a user 1286the effect of typing @kbd{C-g} at command level or to quit a user
1277command would be unpredictable. If you want to permit quitting inside 1287command would be unpredictable. If you want to permit quitting inside
@@ -1282,19 +1292,20 @@ cases, the right way to do this is with the macro
1282 If an error happens during execution of a filter function, it is 1292 If an error happens during execution of a filter function, it is
1283caught automatically, so that it doesn't stop the execution of whatever 1293caught automatically, so that it doesn't stop the execution of whatever
1284program was running when the filter function was started. However, if 1294program was running when the filter function was started. However, if
1285@code{debug-on-error} is non-@code{nil}, the error-catching is turned 1295@code{debug-on-error} is non-@code{nil}, errors are not caught.
1286off. This makes it possible to use the Lisp debugger to debug the 1296This makes it possible to use the Lisp debugger to debug the
1287filter function. @xref{Debugger}. 1297filter function. @xref{Debugger}.
1288 1298
1289 Many filter functions sometimes or always insert the text in the 1299 Many filter functions sometimes (or always) insert the output in the
1290process's buffer, mimicking the actions of Emacs when there is no 1300process's buffer, mimicking the actions of Emacs when there is no
1291filter. Such filter functions need to use @code{set-buffer} in order to 1301filter. Such filter functions need to make sure that they save the
1292be sure to insert in that buffer. To avoid setting the current buffer 1302current buffer, select the correct buffer (if different) before
1293semipermanently, these filter functions must save and restore the 1303inserting output, and then restore the original buffer.
1294current buffer. They should also check whether the buffer is still 1304They should also check whether the buffer is still alive, update the
1295alive, update the process marker, and in some cases update the value 1305process marker, and in some cases update the value of point. Here is
1296of point. Here is how to do these things: 1306how to do these things:
1297 1307
1308@anchor{Process Filter Example}
1298@smallexample 1309@smallexample
1299@group 1310@group
1300(defun ordinary-insertion-filter (proc string) 1311(defun ordinary-insertion-filter (proc string)
@@ -1304,7 +1315,7 @@ of point. Here is how to do these things:
1304@end group 1315@end group
1305@group 1316@group
1306 (save-excursion 1317 (save-excursion
1307 ;; @r{Insert the text, advancing the process marker.} 1318 ;; @r{Insert the text, advancing the process marker.}
1308 (goto-char (process-mark proc)) 1319 (goto-char (process-mark proc))
1309 (insert string) 1320 (insert string)
1310 (set-marker (process-mark proc) (point))) 1321 (set-marker (process-mark proc) (point)))
@@ -1312,14 +1323,8 @@ of point. Here is how to do these things:
1312@end group 1323@end group
1313@end smallexample 1324@end smallexample
1314 1325
1315@noindent
1316The reason to use @code{with-current-buffer}, rather than using
1317@code{save-excursion} to save and restore the current buffer, is so as
1318to preserve the change in point made by the second call to
1319@code{goto-char}.
1320
1321 To make the filter force the process buffer to be visible whenever new 1326 To make the filter force the process buffer to be visible whenever new
1322text arrives, insert the following line just before the 1327text arrives, you could insert a line like the following just before the
1323@code{with-current-buffer} construct: 1328@code{with-current-buffer} construct:
1324 1329
1325@smallexample 1330@smallexample
@@ -1330,12 +1335,16 @@ text arrives, insert the following line just before the
1330previously, eliminate the variable @code{moving} and call 1335previously, eliminate the variable @code{moving} and call
1331@code{goto-char} unconditionally. 1336@code{goto-char} unconditionally.
1332 1337
1338@ignore
1333 In earlier Emacs versions, every filter function that did regular 1339 In earlier Emacs versions, every filter function that did regular
1334expression searching or matching had to explicitly save and restore the 1340expression searching or matching had to explicitly save and restore the
1335match data. Now Emacs does this automatically for filter functions; 1341match data. Now Emacs does this automatically for filter functions;
1336they never need to do it explicitly. @xref{Match Data}. 1342they never need to do it explicitly.
1343@end ignore
1344 Note that Emacs automatically saves and restores the match data
1345while executing filter functions. @xref{Match Data}.
1337 1346
1338 The output to the function may come in chunks of any size. A program 1347 The output to the filter may come in chunks of any size. A program
1339that produces the same output twice in a row may send it as one batch of 1348that produces the same output twice in a row may send it as one batch of
1340200 characters one time, and five batches of 40 characters the next. If 1349200 characters one time, and five batches of 40 characters the next. If
1341the filter looks for certain text strings in the subprocess output, make 1350the filter looks for certain text strings in the subprocess output, make
@@ -1353,7 +1362,7 @@ This function returns the filter function of @var{process}, or @code{nil}
1353if it has none. 1362if it has none.
1354@end defun 1363@end defun
1355 1364
1356 Here is an example of use of a filter function: 1365 Here is an example of the use of a filter function:
1357 1366
1358@smallexample 1367@smallexample
1359@group 1368@group
@@ -1373,7 +1382,7 @@ if it has none.
1373(process-send-string "shell" "ls ~/other\n") 1382(process-send-string "shell" "ls ~/other\n")
1374 @result{} nil 1383 @result{} nil
1375kept 1384kept
1376 @result{} ("lewis@@slug[8] % " 1385 @result{} ("lewis@@slug:$ "
1377@end group 1386@end group
1378@group 1387@group
1379"FINAL-W87-SHORT.MSS backup.otl kolstad.mss~ 1388"FINAL-W87-SHORT.MSS backup.otl kolstad.mss~
@@ -1429,8 +1438,8 @@ bytes, Emacs by default uses @code{no-conversion} for it; see
1429@ref{Lisp and Coding Systems, inhibit-null-byte-detection}, for how to 1438@ref{Lisp and Coding Systems, inhibit-null-byte-detection}, for how to
1430control this behavior. 1439control this behavior.
1431 1440
1432 @strong{Warning:} Coding systems such as @code{undecided} which 1441 @strong{Warning:} Coding systems such as @code{undecided}, which
1433determine the coding system from the data do not work entirely 1442determine the coding system from the data, do not work entirely
1434reliably with asynchronous subprocess output. This is because Emacs 1443reliably with asynchronous subprocess output. This is because Emacs
1435has to process asynchronous subprocess output in batches, as it 1444has to process asynchronous subprocess output in batches, as it
1436arrives. Emacs must try to detect the proper coding system from one 1445arrives. Emacs must try to detect the proper coding system from one
@@ -1448,7 +1457,7 @@ output as a multibyte string or as a unibyte string according to the
1448process's filter coding system. Emacs 1457process's filter coding system. Emacs
1449decodes the output according to the process output coding system, 1458decodes the output according to the process output coding system,
1450which usually produces a multibyte string, except for coding systems 1459which usually produces a multibyte string, except for coding systems
1451such as @code{binary} and @code{raw-text} 1460such as @code{binary} and @code{raw-text}.
1452 1461
1453@node Accepting Output 1462@node Accepting Output
1454@subsection Accepting Output from Processes 1463@subsection Accepting Output from Processes
@@ -1466,7 +1475,6 @@ output is inserted in the associated buffers or given to their filter
1466functions. If @var{process} is non-@code{nil} then this function does 1475functions. If @var{process} is non-@code{nil} then this function does
1467not return until some output has been received from @var{process}. 1476not return until some output has been received from @var{process}.
1468 1477
1469@c Emacs 19 feature
1470The arguments @var{seconds} and @var{millisec} let you specify timeout 1478The arguments @var{seconds} and @var{millisec} let you specify timeout
1471periods. The former specifies a period measured in seconds and the 1479periods. The former specifies a period measured in seconds and the
1472latter specifies one measured in milliseconds. The two time periods 1480latter specifies one measured in milliseconds. The two time periods
@@ -1474,10 +1482,10 @@ thus specified are added together, and @code{accept-process-output}
1474returns after that much time, whether or not there has been any 1482returns after that much time, whether or not there has been any
1475subprocess output. 1483subprocess output.
1476 1484
1477The argument @var{millisec} is semi-obsolete nowadays because 1485The argument @var{millisec} is obsolete (and should not be used),
1478@var{seconds} can be a floating point number to specify waiting a 1486because @var{seconds} can be a floating point number to specify
1479fractional number of seconds. If @var{seconds} is 0, the function 1487waiting a fractional number of seconds. If @var{seconds} is 0, the
1480accepts whatever output is pending but does not wait. 1488function accepts whatever output is pending but does not wait.
1481 1489
1482@c Emacs 22.1 feature 1490@c Emacs 22.1 feature
1483If @var{process} is a process, and the argument @var{just-this-one} is 1491If @var{process} is a process, and the argument @var{just-this-one} is
@@ -1508,6 +1516,7 @@ describing the type of event.
1508 1516
1509 The string describing the event looks like one of the following: 1517 The string describing the event looks like one of the following:
1510 1518
1519@c FIXME? Also "killed\n" - see example below?
1511@itemize @bullet 1520@itemize @bullet
1512@item 1521@item
1513@code{"finished\n"}. 1522@code{"finished\n"}.
@@ -1524,7 +1533,7 @@ describing the type of event.
1524 1533
1525 A sentinel runs only while Emacs is waiting (e.g., for terminal 1534 A sentinel runs only while Emacs is waiting (e.g., for terminal
1526input, or for time to elapse, or for process output). This avoids the 1535input, or for time to elapse, or for process output). This avoids the
1527timing errors that could result from running them at random places in 1536timing errors that could result from running sentinels at random places in
1528the middle of other Lisp programs. A program can wait, so that 1537the middle of other Lisp programs. A program can wait, so that
1529sentinels will run, by calling @code{sit-for} or @code{sleep-for} 1538sentinels will run, by calling @code{sit-for} or @code{sleep-for}
1530(@pxref{Waiting}), or @code{accept-process-output} (@pxref{Accepting 1539(@pxref{Waiting}), or @code{accept-process-output} (@pxref{Accepting
@@ -1548,6 +1557,7 @@ should check whether the buffer is still alive. If it tries to insert
1548into a dead buffer, it will get an error. If the buffer is dead, 1557into a dead buffer, it will get an error. If the buffer is dead,
1549@code{(buffer-name (process-buffer @var{process}))} returns @code{nil}. 1558@code{(buffer-name (process-buffer @var{process}))} returns @code{nil}.
1550 1559
1560@c Note this text is duplicated in the filter functions section.
1551 Quitting is normally inhibited within a sentinel---otherwise, the 1561 Quitting is normally inhibited within a sentinel---otherwise, the
1552effect of typing @kbd{C-g} at command level or to quit a user command 1562effect of typing @kbd{C-g} at command level or to quit a user command
1553would be unpredictable. If you want to permit quitting inside a 1563would be unpredictable. If you want to permit quitting inside a
@@ -1558,8 +1568,8 @@ right way to do this is with the macro @code{with-local-quit}.
1558 If an error happens during execution of a sentinel, it is caught 1568 If an error happens during execution of a sentinel, it is caught
1559automatically, so that it doesn't stop the execution of whatever 1569automatically, so that it doesn't stop the execution of whatever
1560programs was running when the sentinel was started. However, if 1570programs was running when the sentinel was started. However, if
1561@code{debug-on-error} is non-@code{nil}, the error-catching is turned 1571@code{debug-on-error} is non-@code{nil}, errors are not caught.
1562off. This makes it possible to use the Lisp debugger to debug the 1572This makes it possible to use the Lisp debugger to debug the
1563sentinel. @xref{Debugger}. 1573sentinel. @xref{Debugger}.
1564 1574
1565 While a sentinel is running, the process sentinel is temporarily 1575 While a sentinel is running, the process sentinel is temporarily
@@ -1567,10 +1577,14 @@ set to @code{nil} so that the sentinel won't run recursively.
1567For this reason it is not possible for a sentinel to specify 1577For this reason it is not possible for a sentinel to specify
1568a new sentinel. 1578a new sentinel.
1569 1579
1580@ignore
1570 In earlier Emacs versions, every sentinel that did regular expression 1581 In earlier Emacs versions, every sentinel that did regular expression
1571searching or matching had to explicitly save and restore the match data. 1582searching or matching had to explicitly save and restore the match data.
1572Now Emacs does this automatically for sentinels; they never need to do 1583Now Emacs does this automatically for sentinels; they never need to do
1573it explicitly. @xref{Match Data}. 1584it explicitly.
1585@end ignore
1586 Note that Emacs automatically saves and restores the match data
1587while executing sentinels. @xref{Match Data}.
1574 1588
1575@defun set-process-sentinel process sentinel 1589@defun set-process-sentinel process sentinel
1576This function associates @var{sentinel} with @var{process}. If 1590This function associates @var{sentinel} with @var{process}. If
@@ -1578,7 +1592,7 @@ This function associates @var{sentinel} with @var{process}. If
1578The default behavior when there is no sentinel is to insert a message in 1592The default behavior when there is no sentinel is to insert a message in
1579the process's buffer when the process status changes. 1593the process's buffer when the process status changes.
1580 1594
1581Changes in process sentinel take effect immediately---if the sentinel 1595Changes in process sentinels take effect immediately---if the sentinel
1582is slated to be run but has not been called yet, and you specify a new 1596is slated to be run but has not been called yet, and you specify a new
1583sentinel, the eventual call to the sentinel will use the new one. 1597sentinel, the eventual call to the sentinel will use the new one.
1584 1598
@@ -1606,7 +1620,7 @@ has none.
1606@defun waiting-for-user-input-p 1620@defun waiting-for-user-input-p
1607While a sentinel or filter function is running, this function returns 1621While a sentinel or filter function is running, this function returns
1608non-@code{nil} if Emacs was waiting for keyboard input from the user at 1622non-@code{nil} if Emacs was waiting for keyboard input from the user at
1609the time the sentinel or filter function was called, @code{nil} if it 1623the time the sentinel or filter function was called, or @code{nil} if it
1610was not. 1624was not.
1611@end defun 1625@end defun
1612 1626
@@ -1616,7 +1630,7 @@ was not.
1616 When Emacs exits, it terminates all its subprocesses by sending them 1630 When Emacs exits, it terminates all its subprocesses by sending them
1617the @code{SIGHUP} signal. Because subprocesses may be doing 1631the @code{SIGHUP} signal. Because subprocesses may be doing
1618valuable work, Emacs normally asks the user to confirm that it is ok 1632valuable work, Emacs normally asks the user to confirm that it is ok
1619to terminate them. Each process has a query flag which, if 1633to terminate them. Each process has a query flag, which, if
1620non-@code{nil}, says that Emacs should ask for confirmation before 1634non-@code{nil}, says that Emacs should ask for confirmation before
1621exiting and thus killing that process. The default for the query flag 1635exiting and thus killing that process. The default for the query flag
1622is @code{t}, meaning @emph{do} query. 1636is @code{t}, meaning @emph{do} query.
@@ -1629,31 +1643,13 @@ This returns the query flag of @var{process}.
1629This function sets the query flag of @var{process} to @var{flag}. It 1643This function sets the query flag of @var{process} to @var{flag}. It
1630returns @var{flag}. 1644returns @var{flag}.
1631 1645
1632@smallexample 1646Here is an example of using @code{set-process-query-on-exit-flag} on a
1633@group 1647shell process to avoid querying:
1634;; @r{Don't query about the shell process}
1635(set-process-query-on-exit-flag (get-process "shell") nil)
1636 @result{} t
1637@end group
1638@end smallexample
1639@end defun
1640
1641@defun process-kill-without-query process &optional do-query
1642This function clears the query flag of @var{process}, so that
1643Emacs will not query the user on account of that process.
1644
1645Actually, the function does more than that: it returns the old value of
1646the process's query flag, and sets the query flag to @var{do-query}.
1647Please don't use this function to do those things any more---please
1648use the newer, cleaner functions @code{process-query-on-exit-flag} and
1649@code{set-process-query-on-exit-flag} in all but the simplest cases.
1650The only way you should use @code{process-kill-without-query} nowadays
1651is like this:
1652 1648
1653@smallexample 1649@smallexample
1654@group 1650@group
1655;; @r{Don't query about the shell process} 1651(set-process-query-on-exit-flag (get-process "shell") nil)
1656(process-kill-without-query (get-process "shell")) 1652 @result{} nil
1657@end group 1653@end group
1658@end smallexample 1654@end smallexample
1659@end defun 1655@end defun
@@ -1665,7 +1661,7 @@ is like this:
1665 In addition to accessing and manipulating processes that are 1661 In addition to accessing and manipulating processes that are
1666subprocesses of the current Emacs session, Emacs Lisp programs can 1662subprocesses of the current Emacs session, Emacs Lisp programs can
1667also access other processes running on the same machine. We call 1663also access other processes running on the same machine. We call
1668these @dfn{system processes}, to distinguish between them and Emacs 1664these @dfn{system processes}, to distinguish them from Emacs
1669subprocesses. 1665subprocesses.
1670 1666
1671 Emacs provides several primitives for accessing system processes. 1667 Emacs provides several primitives for accessing system processes.
@@ -1685,7 +1681,7 @@ This function returns an alist of attributes for the process specified
1685by its process ID @var{pid}. Each association in the alist is of the 1681by its process ID @var{pid}. Each association in the alist is of the
1686form @code{(@var{key} . @var{value})}, where @var{key} designates the 1682form @code{(@var{key} . @var{value})}, where @var{key} designates the
1687attribute and @var{value} is the value of that attribute. The various 1683attribute and @var{value} is the value of that attribute. The various
1688attribute @var{key}'s that this function can return are listed below. 1684attribute @var{key}s that this function can return are listed below.
1689Not all platforms support all of these attributes; if an attribute is 1685Not all platforms support all of these attributes; if an attribute is
1690not supported, its association will not appear in the returned alist. 1686not supported, its association will not appear in the returned alist.
1691Values that are numbers can be either integer or floating-point, 1687Values that are numbers can be either integer or floating-point,
@@ -1846,6 +1842,8 @@ as @code{shell-command}.
1846@section Transaction Queues 1842@section Transaction Queues
1847@cindex transaction queue 1843@cindex transaction queue
1848 1844
1845@c That's not very informative. What is a transaction, and when might
1846@c I want to use one?
1849You can use a @dfn{transaction queue} to communicate with a subprocess 1847You can use a @dfn{transaction queue} to communicate with a subprocess
1850using transactions. First use @code{tq-create} to create a transaction 1848using transactions. First use @code{tq-create} to create a transaction
1851queue communicating with a specified process. Then you can call 1849queue communicating with a specified process. Then you can call
@@ -1875,8 +1873,11 @@ text at the end of the entire answer, but nothing before; that's how
1875If the argument @var{delay-question} is non-@code{nil}, delay sending 1873If the argument @var{delay-question} is non-@code{nil}, delay sending
1876this question until the process has finished replying to any previous 1874this question until the process has finished replying to any previous
1877questions. This produces more reliable results with some processes. 1875questions. This produces more reliable results with some processes.
1876@ignore
1878 1877
1878@c Let's not mention it then.
1879The return value of @code{tq-enqueue} itself is not meaningful. 1879The return value of @code{tq-enqueue} itself is not meaningful.
1880@end ignore
1880@end defun 1881@end defun
1881 1882
1882@defun tq-close queue 1883@defun tq-close queue
@@ -1894,10 +1895,11 @@ Transaction queues are implemented by means of a filter function.
1894@cindex UDP 1895@cindex UDP
1895 1896
1896 Emacs Lisp programs can open stream (TCP) and datagram (UDP) network 1897 Emacs Lisp programs can open stream (TCP) and datagram (UDP) network
1897connections to other processes on the same machine or other machines. 1898connections (@pxref{Datagrams}) to other processes on the same machine
1899or other machines.
1898A network connection is handled by Lisp much like a subprocess, and is 1900A network connection is handled by Lisp much like a subprocess, and is
1899represented by a process object. However, the process you are 1901represented by a process object. However, the process you are
1900communicating with is not a child of the Emacs process, so it has no 1902communicating with is not a child of the Emacs process, has no
1901process @acronym{ID}, and you can't kill it or send it signals. All you 1903process @acronym{ID}, and you can't kill it or send it signals. All you
1902can do is send and receive data. @code{delete-process} closes the 1904can do is send and receive data. @code{delete-process} closes the
1903connection, but does not kill the program at the other end; that 1905connection, but does not kill the program at the other end; that
@@ -1925,7 +1927,7 @@ network connection or server, @code{serial} for a serial port
1925connection, or @code{real} for a real subprocess. 1927connection, or @code{real} for a real subprocess.
1926 1928
1927 The @code{process-status} function returns @code{open}, 1929 The @code{process-status} function returns @code{open},
1928@code{closed}, @code{connect}, and @code{failed} for network 1930@code{closed}, @code{connect}, or @code{failed} for network
1929connections. For a network server, the status is always 1931connections. For a network server, the status is always
1930@code{listen}. None of those values is possible for a real 1932@code{listen}. None of those values is possible for a real
1931subprocess. @xref{Process Information}. 1933subprocess. @xref{Process Information}.
@@ -1935,35 +1937,48 @@ subprocess. @xref{Process Information}.
1935process, being stopped means not accepting new connections. (Up to 5 1937process, being stopped means not accepting new connections. (Up to 5
1936connection requests will be queued for when you resume the server; you 1938connection requests will be queued for when you resume the server; you
1937can increase this limit, unless it is imposed by the operating 1939can increase this limit, unless it is imposed by the operating
1938system.) For a network stream connection, being stopped means not 1940system---see the @code{:server} keyword of @code{make-network-process},
1939processing input (any arriving input waits until you resume the 1941@ref{Network Processes}.) For a network stream connection, being
1940connection). For a datagram connection, some number of packets may be 1942stopped means not processing input (any arriving input waits until you
1941queued but input may be lost. You can use the function 1943resume the connection). For a datagram connection, some number of
1944packets may be queued but input may be lost. You can use the function
1942@code{process-command} to determine whether a network connection or 1945@code{process-command} to determine whether a network connection or
1943server is stopped; a non-@code{nil} value means yes. 1946server is stopped; a non-@code{nil} value means yes.
1944 1947
1945@cindex network connection, encrypted 1948@cindex network connection, encrypted
1946@cindex encrypted network connections 1949@cindex encrypted network connections
1947@cindex TLS network connections 1950@cindex @acronym{TLS} network connections
1948@cindex STARTTLS network connections 1951@cindex @acronym{STARTTLS} network connections
1949@defun open-network-stream name buffer-or-name host service &rest parameters 1952Emacs can create encrypted network connections, using either built-in
1953or external support. The built-in support uses the GnuTLS
1954(``Transport Layer Security'') library; see
1955@uref{http://www.gnu.org/software/gnutls/, the GnuTLS project page}.
1956If your Emacs was compiled with GnuTLS support, the function
1957@code{gnutls-available-p} is defined and returns non-@code{nil}. For
1958more details, @pxref{Top,, Overview, emacs-gnutls, The Emacs-GnuTLS manual}.
1959The external support uses the @file{starttls.el} library, which
1960requires a helper utility such as @command{gnutls-cli} to be installed
1961on the system. The @code{open-network-stream} function can
1962transparently handle the details of creating encrypted connections for
1963you, using whatever support is available.
1964
1965@defun open-network-stream name buffer host service &rest parameters
1950This function opens a TCP connection, with optional encryption, and 1966This function opens a TCP connection, with optional encryption, and
1951returns a process object that represents the connection. 1967returns a process object that represents the connection.
1952 1968
1953The @var{name} argument specifies the name for the process object. It 1969The @var{name} argument specifies the name for the process object. It
1954is modified as necessary to make it unique. 1970is modified as necessary to make it unique.
1955 1971
1956The @var{buffer-or-name} argument is the buffer to associate with the 1972The @var{buffer} argument is the buffer to associate with the
1957connection. Output from the connection is inserted in the buffer, 1973connection. Output from the connection is inserted in the buffer,
1958unless you specify a filter function to handle the output. If 1974unless you specify a filter function to handle the output. If
1959@var{buffer-or-name} is @code{nil}, it means that the connection is not 1975@var{buffer} is @code{nil}, it means that the connection is not
1960associated with any buffer. 1976associated with any buffer.
1961 1977
1962The arguments @var{host} and @var{service} specify where to connect to; 1978The arguments @var{host} and @var{service} specify where to connect to;
1963@var{host} is the host name (a string), and @var{service} is the name of 1979@var{host} is the host name (a string), and @var{service} is the name of
1964a defined network service (a string) or a port number (an integer). 1980a defined network service (a string) or a port number (an integer).
1965 1981
1966@c FIXME? Is this too lengthy for the printed manual?
1967The remaining arguments @var{parameters} are keyword/argument pairs 1982The remaining arguments @var{parameters} are keyword/argument pairs
1968that are mainly relevant to encrypted connections: 1983that are mainly relevant to encrypted connections:
1969 1984
@@ -1980,14 +1995,15 @@ The type of connection. Options are:
1980An ordinary, unencrypted connection. 1995An ordinary, unencrypted connection.
1981@item tls 1996@item tls
1982@itemx ssl 1997@itemx ssl
1983A TLS (``Transport Layer Security'') connection. 1998A @acronym{TLS} (``Transport Layer Security'') connection.
1984@item nil 1999@item nil
1985@itemx network 2000@itemx network
1986Start with a plain connection, and if parameters @samp{:success} 2001Start with a plain connection, and if parameters @samp{:success}
1987and @samp{:capability-command} are supplied, try to upgrade to an encrypted 2002and @samp{:capability-command} are supplied, try to upgrade to an encrypted
1988connection via STARTTLS. If that fails, retain the unencrypted connection. 2003connection via @acronym{STARTTLS}. If that fails, retain the
2004unencrypted connection.
1989@item starttls 2005@item starttls
1990As for @code{nil}, but if STARTTLS fails drop the connection. 2006As for @code{nil}, but if @acronym{STARTTLS} fails drop the connection.
1991@item shell 2007@item shell
1992A shell connection. 2008A shell connection.
1993@end table 2009@end table
@@ -2006,22 +2022,22 @@ command @var{capability-command}. The latter defaults to the former.
2006 2022
2007@item :starttls-function @var{function} 2023@item :starttls-function @var{function}
2008Function of one argument (the response to @var{capability-command}), 2024Function of one argument (the response to @var{capability-command}),
2009which returns either @code{nil}, or the command to activate STARTTLS 2025which returns either @code{nil}, or the command to activate @acronym{STARTTLS}
2010if supported. 2026if supported.
2011 2027
2012@item :success @var{regexp} 2028@item :success @var{regexp}
2013Regular expression matching a successful STARTTLS negotiation. 2029Regular expression matching a successful @acronym{STARTTLS} negotiation.
2014 2030
2015@item :use-starttls-if-possible @var{boolean} 2031@item :use-starttls-if-possible @var{boolean}
2016If non-@code{nil}, do opportunistic STARTTLS upgrades even if Emacs 2032If non-@code{nil}, do opportunistic @acronym{STARTTLS} upgrades even if Emacs
2017doesn't have built-in TLS support. 2033doesn't have built-in @acronym{TLS} support.
2018 2034
2019@item :client-certificate @var{list-or-t} 2035@item :client-certificate @var{list-or-t}
2020Either a list of the form @code{(@var{key-file} @var{cert-file})}, 2036Either a list of the form @code{(@var{key-file} @var{cert-file})},
2021naming the certificate key file and certificate file itself, or 2037naming the certificate key file and certificate file itself, or
2022@code{t}, meaning to query @code{auth-source} for this information 2038@code{t}, meaning to query @code{auth-source} for this information
2023(@pxref{Top,,auth-source, auth, Emacs auth-source Library}). 2039(@pxref{Top,,Overview, auth, The Auth-Source Manual}).
2024Only used for TLS or STARTTLS. 2040Only used for @acronym{TLS} or @acronym{STARTTLS}.
2025 2041
2026@item :return-list @var{cons-or-nil} 2042@item :return-list @var{cons-or-nil}
2027The return value of this function. If omitted or @code{nil}, return a 2043The return value of this function. If omitted or @code{nil}, return a
@@ -2045,18 +2061,20 @@ The connection type: @samp{plain} or @samp{tls}.
2045@section Network Servers 2061@section Network Servers
2046@cindex network servers 2062@cindex network servers
2047 2063
2048 You create a server by calling @code{make-network-process} with 2064 You create a server by calling @code{make-network-process}
2049@code{:server t}. The server will listen for connection requests from 2065(@pxref{Network Processes}) with @code{:server t}. The server will
2050clients. When it accepts a client connection request, that creates a 2066listen for connection requests from clients. When it accepts a client
2051new network connection, itself a process object, with the following 2067connection request, that creates a new network connection, itself a
2052parameters: 2068process object, with the following parameters:
2053 2069
2054@itemize @bullet 2070@itemize @bullet
2055@item 2071@item
2056The connection's process name is constructed by concatenating the 2072The connection's process name is constructed by concatenating the
2057server process's @var{name} with a client identification string. The 2073server process's @var{name} with a client identification string. The
2074@c FIXME? What about IPv6? Say briefly what the difference is?
2058client identification string for an IPv4 connection looks like 2075client identification string for an IPv4 connection looks like
2059@samp{<@var{a}.@var{b}.@var{c}.@var{d}:@var{p}>}. Otherwise, it is a 2076@samp{<@var{a}.@var{b}.@var{c}.@var{d}:@var{p}>}, which represents an
2077address and port number. Otherwise, it is a
2060unique number in brackets, as in @samp{<@var{nnn}>}. The number 2078unique number in brackets, as in @samp{<@var{nnn}>}. The number
2061is unique for each connection in the Emacs session. 2079is unique for each connection in the Emacs session.
2062 2080
@@ -2077,7 +2095,7 @@ uses its filter and sentinel; their sole purpose is to initialize
2077connections made to the server. 2095connections made to the server.
2078 2096
2079@item 2097@item
2080The connection's process contact info is set according to the client's 2098The connection's process contact information is set according to the client's
2081addressing information (typically an IP address and a port number). 2099addressing information (typically an IP address and a port number).
2082This information is associated with the @code{process-contact} 2100This information is associated with the @code{process-contact}
2083keywords @code{:host}, @code{:service}, @code{:remote}. 2101keywords @code{:host}, @code{:service}, @code{:remote}.
@@ -2094,7 +2112,7 @@ The client process's plist is initialized from the server's plist.
2094@section Datagrams 2112@section Datagrams
2095@cindex datagrams 2113@cindex datagrams
2096 2114
2097 A datagram connection communicates with individual packets rather 2115 A @dfn{datagram} connection communicates with individual packets rather
2098than streams of data. Each call to @code{process-send} sends one 2116than streams of data. Each call to @code{process-send} sends one
2099datagram packet (@pxref{Input to Processes}), and each datagram 2117datagram packet (@pxref{Input to Processes}), and each datagram
2100received results in one call to the filter function. 2118received results in one call to the filter function.
@@ -2147,7 +2165,8 @@ process object that represents it. The arguments @var{args} are a
2147list of keyword/argument pairs. Omitting a keyword is always 2165list of keyword/argument pairs. Omitting a keyword is always
2148equivalent to specifying it with value @code{nil}, except for 2166equivalent to specifying it with value @code{nil}, except for
2149@code{:coding}, @code{:filter-multibyte}, and @code{:reuseaddr}. Here 2167@code{:coding}, @code{:filter-multibyte}, and @code{:reuseaddr}. Here
2150are the meaningful keywords: 2168are the meaningful keywords (those corresponding to network options
2169are listed in the following section):
2151 2170
2152@table @asis 2171@table @asis
2153@item :name @var{name} 2172@item :name @var{name}
@@ -2163,7 +2182,7 @@ connection. Both connections and servers can be of these types.
2163@item :server @var{server-flag} 2182@item :server @var{server-flag}
2164If @var{server-flag} is non-@code{nil}, create a server. Otherwise, 2183If @var{server-flag} is non-@code{nil}, create a server. Otherwise,
2165create a connection. For a stream type server, @var{server-flag} may 2184create a connection. For a stream type server, @var{server-flag} may
2166be an integer which then specifies the length of the queue of pending 2185be an integer, which then specifies the length of the queue of pending
2167connections to the server. The default queue length is 5. 2186connections to the server. The default queue length is 5.
2168 2187
2169@item :host @var{host} 2188@item :host @var{host}
@@ -2174,7 +2193,7 @@ specify a valid address for the local host, and only clients
2174connecting to that address will be accepted. 2193connecting to that address will be accepted.
2175 2194
2176@item :service @var{service} 2195@item :service @var{service}
2177@var{service} specifies a port number to connect to, or, for a server, 2196@var{service} specifies a port number to connect to; or, for a server,
2178the port number to listen on. It should be a service name that 2197the port number to listen on. It should be a service name that
2179translates to a port number, or an integer specifying the port number 2198translates to a port number, or an integer specifying the port number
2180directly. For a server, it can also be @code{t}, which means to let 2199directly. For a server, it can also be @code{t}, which means to let
@@ -2185,18 +2204,18 @@ the system select an unused port number.
2185communication. @code{nil} means determine the proper address family 2204communication. @code{nil} means determine the proper address family
2186automatically for the given @var{host} and @var{service}. 2205automatically for the given @var{host} and @var{service}.
2187@code{local} specifies a Unix socket, in which case @var{host} is 2206@code{local} specifies a Unix socket, in which case @var{host} is
2188ignored. @code{ipv4} and @code{ipv6} specify to use IPv4 and IPv6 2207ignored. @code{ipv4} and @code{ipv6} specify to use IPv4 and IPv6,
2189respectively. 2208respectively.
2190 2209
2191@item :local @var{local-address} 2210@item :local @var{local-address}
2192For a server process, @var{local-address} is the address to listen on. 2211For a server process, @var{local-address} is the address to listen on.
2193It overrides @var{family}, @var{host} and @var{service}, and you 2212It overrides @var{family}, @var{host} and @var{service}, so you
2194may as well not specify them. 2213might as well not specify them.
2195 2214
2196@item :remote @var{remote-address} 2215@item :remote @var{remote-address}
2197For a connection, @var{remote-address} is the address to connect to. 2216For a connection, @var{remote-address} is the address to connect to.
2198It overrides @var{family}, @var{host} and @var{service}, and you 2217It overrides @var{family}, @var{host} and @var{service}, so you
2199may as well not specify them. 2218might as well not specify them.
2200 2219
2201For a datagram server, @var{remote-address} specifies the initial 2220For a datagram server, @var{remote-address} specifies the initial
2202setting of the remote datagram address. 2221setting of the remote datagram address.
@@ -2220,7 +2239,7 @@ integers @code{[@var{a} @var{b} @var{c} @var{d} @var{e} @var{f}
2220port number @var{p}. 2239port number @var{p}.
2221 2240
2222@item 2241@item
2223A local address is represented as a string which specifies the address 2242A local address is represented as a string, which specifies the address
2224in the local address space. 2243in the local address space.
2225 2244
2226@item 2245@item
@@ -2242,8 +2261,8 @@ second argument matching @code{"open"} (if successful) or
2242has succeeded or failed. 2261has succeeded or failed.
2243 2262
2244@item :stop @var{stopped} 2263@item :stop @var{stopped}
2245Start the network connection or server in the `stopped' state if 2264If @var{stopped} is non-@code{nil}, start the network connection or
2246@var{stopped} is non-@code{nil}. 2265server in the ``stopped'' state.
2247 2266
2248@item :buffer @var{buffer} 2267@item :buffer @var{buffer}
2249Use @var{buffer} as the process buffer. 2268Use @var{buffer} as the process buffer.
@@ -2264,6 +2283,11 @@ Initialize the process query flag to @var{query-flag}.
2264@item :filter @var{filter} 2283@item :filter @var{filter}
2265Initialize the process filter to @var{filter}. 2284Initialize the process filter to @var{filter}.
2266 2285
2286@item :filter-multibyte @var{multibyte}
2287If @var{multibyte} is non-@code{nil}, strings given to the process
2288filter are multibyte, otherwise they are unibyte. The default is the
2289default value of @code{enable-multibyte-characters}.
2290
2267@item :sentinel @var{sentinel} 2291@item :sentinel @var{sentinel}
2268Initialize the process sentinel to @var{sentinel}. 2292Initialize the process sentinel to @var{sentinel}.
2269 2293
@@ -2271,7 +2295,7 @@ Initialize the process sentinel to @var{sentinel}.
2271Initialize the log function of a server process to @var{log}. The log 2295Initialize the log function of a server process to @var{log}. The log
2272function is called each time the server accepts a network connection 2296function is called each time the server accepts a network connection
2273from a client. The arguments passed to the log function are 2297from a client. The arguments passed to the log function are
2274@var{server}, @var{connection}, and @var{message}, where @var{server} 2298@var{server}, @var{connection}, and @var{message}; where @var{server}
2275is the server process, @var{connection} is the new process for the 2299is the server process, @var{connection} is the new process for the
2276connection, and @var{message} is a string describing what has 2300connection, and @var{message} is a string describing what has
2277happened. 2301happened.
@@ -2308,7 +2332,7 @@ Using this option may require special privileges on some systems.
2308@item :broadcast @var{broadcast-flag} 2332@item :broadcast @var{broadcast-flag}
2309If @var{broadcast-flag} is non-@code{nil} for a datagram process, the 2333If @var{broadcast-flag} is non-@code{nil} for a datagram process, the
2310process will receive datagram packet sent to a broadcast address, and 2334process will receive datagram packet sent to a broadcast address, and
2311be able to send packets to a broadcast address. Ignored for a stream 2335be able to send packets to a broadcast address. This is ignored for a stream
2312connection. 2336connection.
2313 2337
2314@item :dontroute @var{dontroute-flag} 2338@item :dontroute @var{dontroute-flag}
@@ -2324,10 +2348,11 @@ If @var{linger-arg} is non-@code{nil}, wait for successful
2324transmission of all queued packets on the connection before it is 2348transmission of all queued packets on the connection before it is
2325deleted (see @code{delete-process}). If @var{linger-arg} is an 2349deleted (see @code{delete-process}). If @var{linger-arg} is an
2326integer, it specifies the maximum time in seconds to wait for queued 2350integer, it specifies the maximum time in seconds to wait for queued
2327packets to be sent before closing the connection. Default is 2351packets to be sent before closing the connection. The default is
2328@code{nil} which means to discard unsent queued packets when the 2352@code{nil}, which means to discard unsent queued packets when the
2329process is deleted. 2353process is deleted.
2330 2354
2355@c FIXME Where out-of-band data is ...?
2331@item :oobinline @var{oobinline-flag} 2356@item :oobinline @var{oobinline-flag}
2332If @var{oobinline-flag} is non-@code{nil} for a stream connection, 2357If @var{oobinline-flag} is non-@code{nil} for a stream connection,
2333receive out-of-band data in the normal data stream. Otherwise, ignore 2358receive out-of-band data in the normal data stream. Otherwise, ignore
@@ -2336,7 +2361,7 @@ out-of-band data.
2336@item :priority @var{priority} 2361@item :priority @var{priority}
2337Set the priority for packets sent on this connection to the integer 2362Set the priority for packets sent on this connection to the integer
2338@var{priority}. The interpretation of this number is protocol 2363@var{priority}. The interpretation of this number is protocol
2339specific, such as setting the TOS (type of service) field on IP 2364specific; such as setting the TOS (type of service) field on IP
2340packets sent on this connection. It may also have system dependent 2365packets sent on this connection. It may also have system dependent
2341effects, such as selecting a specific output queue on the network 2366effects, such as selecting a specific output queue on the network
2342interface. 2367interface.
@@ -2344,20 +2369,20 @@ interface.
2344@item :reuseaddr @var{reuseaddr-flag} 2369@item :reuseaddr @var{reuseaddr-flag}
2345If @var{reuseaddr-flag} is non-@code{nil} (the default) for a stream 2370If @var{reuseaddr-flag} is non-@code{nil} (the default) for a stream
2346server process, allow this server to reuse a specific port number (see 2371server process, allow this server to reuse a specific port number (see
2347@code{:service}) unless another process on this host is already 2372@code{:service}), unless another process on this host is already
2348listening on that port. If @var{reuseaddr-flag} is @code{nil}, there 2373listening on that port. If @var{reuseaddr-flag} is @code{nil}, there
2349may be a period of time after the last use of that port (by any 2374may be a period of time after the last use of that port (by any
2350process on the host), where it is not possible to make a new server on 2375process on the host) where it is not possible to make a new server on
2351that port. 2376that port.
2352@end table 2377@end table
2353 2378
2354@defun set-network-process-option process option value &optional no-error 2379@defun set-network-process-option process option value &optional no-error
2355This function sets or modifies a network option for network process 2380This function sets or modifies a network option for network process
2356@var{process}. See @code{make-network-process} for details of options 2381@var{process}. The accepted options and values are as for
2357@var{option} and their corresponding values @var{value}. If 2382@code{make-network-process}. If @var{no-error} is non-@code{nil},
2358@var{no-error} is non-@code{nil}, this function returns @code{nil} 2383this function returns @code{nil} instead of signaling an error if
2359instead of signaling an error if @var{option} is not a supported 2384@var{option} is not a supported option. If the function successfully
2360option. If the function successfully completes, it returns @code{t}. 2385completes, it returns @code{t}.
2361 2386
2362The current setting of an option is available via the 2387The current setting of an option is available via the
2363@code{process-contact} function. 2388@code{process-contact} function.
@@ -2374,11 +2399,9 @@ The current setting of an option is available via the
2374@end example 2399@end example
2375 2400
2376@noindent 2401@noindent
2377The result of the first form is @code{t} if it works to specify 2402The result of this form is @code{t} if it works to specify
2378@var{keyword} with value @var{value} in @code{make-network-process}. 2403@var{keyword} with value @var{value} in @code{make-network-process}.
2379The result of the second form is @code{t} if @var{keyword} is 2404Here are some of the @var{keyword}---@var{value} pairs you can test in
2380supported by @code{make-network-process}. Here are some of the
2381@var{keyword}---@var{value} pairs you can test in
2382this way. 2405this way.
2383 2406
2384@table @code 2407@table @code
@@ -2402,20 +2425,10 @@ Non-@code{nil} if the system can select the port for a server.
2402@end example 2425@end example
2403 2426
2404@noindent 2427@noindent
2405Here are some of the options you can test in this way. 2428The accepted @var{keyword} values are @code{:bindtodevice}, etc.
2406 2429For the complete list, @pxref{Network Options}. This form returns
2407@table @code 2430non-@code{nil} if that particular network option is supported by
2408@item :bindtodevice 2431@code{make-network-process} (or @code{set-network-process-option}).
2409@itemx :broadcast
2410@itemx :dontroute
2411@itemx :keepalive
2412@itemx :linger
2413@itemx :oobinline
2414@itemx :priority
2415@itemx :reuseaddr
2416That particular network option is supported by
2417@code{make-network-process} and @code{set-network-process-option}.
2418@end table
2419 2432
2420@node Misc Network 2433@node Misc Network
2421@section Misc Network Facilities 2434@section Misc Network Facilities
@@ -2487,11 +2500,11 @@ lets you change the speed, bytesize, and other parameters. In a
2487terminal window created by @code{serial-term}, you can click on the 2500terminal window created by @code{serial-term}, you can click on the
2488mode line for configuration. 2501mode line for configuration.
2489 2502
2490 A serial connection is represented by a process object which can be 2503 A serial connection is represented by a process object, which can be
2491used similar to a subprocess or network process. You can send and 2504used in a similar way to a subprocess or network process. You can send and
2492receive data and configure the serial port. A serial process object 2505receive data, and configure the serial port. A serial process object
2493has no process ID, you can't send signals to it, and the status codes 2506has no process ID, however, and you can't send signals to it, and the
2494are different from other types of processes. 2507status codes are different from other types of processes.
2495@code{delete-process} on the process object or @code{kill-buffer} on 2508@code{delete-process} on the process object or @code{kill-buffer} on
2496the process buffer close the connection, but this does not affect the 2509the process buffer close the connection, but this does not affect the
2497device connected to the serial port. 2510device connected to the serial port.
@@ -2499,15 +2512,17 @@ device connected to the serial port.
2499 The function @code{process-type} returns the symbol @code{serial} 2512 The function @code{process-type} returns the symbol @code{serial}
2500for a process object representing a serial port connection. 2513for a process object representing a serial port connection.
2501 2514
2502 Serial ports are available on GNU/Linux, Unix, and Windows systems. 2515 Serial ports are available on GNU/Linux, Unix, and MS Windows systems.
2503 2516
2504@deffn Command serial-term port speed 2517@deffn Command serial-term port speed
2505Start a terminal-emulator for a serial port in a new buffer. 2518Start a terminal-emulator for a serial port in a new buffer.
2506@var{port} is the name of the serial port to which to connect. For 2519@var{port} is the name of the serial port to connect to. For
2507example, this could be @file{/dev/ttyS0} on Unix. On Windows, this 2520example, this could be @file{/dev/ttyS0} on Unix. On MS Windows, this
2508could be @file{COM1}, or @file{\\.\COM10} (double the backslashes in 2521could be @file{COM1}, or @file{\\.\COM10} (double the backslashes in
2509Lisp strings). 2522Lisp strings).
2510 2523
2524@c FIXME is 9600 still the most common value, or is it 115200 now?
2525@c (Same value, 9600, appears below as well.)
2511@var{speed} is the speed of the serial port in bits per second. 9600 2526@var{speed} is the speed of the serial port in bits per second. 9600
2512is a common value. The buffer is in Term mode; see @ref{Term Mode,,, 2527is a common value. The buffer is in Term mode; see @ref{Term Mode,,,
2513emacs, The GNU Emacs Manual}, for the commands to use in that buffer. 2528emacs, The GNU Emacs Manual}, for the commands to use in that buffer.
@@ -2516,25 +2531,27 @@ You can change the speed and the configuration in the mode line menu.
2516 2531
2517@defun make-serial-process &rest args 2532@defun make-serial-process &rest args
2518This function creates a process and a buffer. Arguments are specified 2533This function creates a process and a buffer. Arguments are specified
2519as keyword/argument pairs. Here's the list of the meaningful keywords: 2534as keyword/argument pairs. Here's the list of the meaningful
2535keywords, with the first two (@var{port} and @var{speed}) being mandatory:
2520 2536
2521@table @code 2537@table @code
2522@item :port @var{port}@r{ (mandatory)} 2538@item :port @var{port}
2523This is the name of the serial port. On Unix and GNU systems, this is 2539This is the name of the serial port. On Unix and GNU systems, this is
2524a file name such as @file{/dev/ttyS0}. On Windows, this could be 2540a file name such as @file{/dev/ttyS0}. On Windows, this could be
2525@file{COM1}, or @file{\\.\COM10} for ports higher than @file{COM9} 2541@file{COM1}, or @file{\\.\COM10} for ports higher than @file{COM9}
2526(double the backslashes in Lisp strings). 2542(double the backslashes in Lisp strings).
2527 2543
2528@item :speed @var{speed}@r{ (mandatory)} 2544@item :speed @var{speed}
2529The speed of the serial port in bits per second. This function calls 2545The speed of the serial port in bits per second. This function calls
2530@code{serial-process-configure} to handle the speed. 2546@code{serial-process-configure} to handle the speed; see the
2547following documentation of that function for more details.
2531 2548
2532@item :name @var{name} 2549@item :name @var{name}
2533The name of the process. If @var{name} is not given, @var{port} will 2550The name of the process. If @var{name} is not given, @var{port} will
2534serve as the process name as well. 2551serve as the process name as well.
2535 2552
2536@item :buffer @var{buffer} 2553@item :buffer @var{buffer}
2537The buffer to associate with the process. The value could be either a 2554The buffer to associate with the process. The value can be either a
2538buffer or a string that names a buffer. Process output goes at the 2555buffer or a string that names a buffer. Process output goes at the
2539end of that buffer, unless you specify an output stream or filter 2556end of that buffer, unless you specify an output stream or filter
2540function to handle the output. If @var{buffer} is not given, the 2557function to handle the output. If @var{buffer} is not given, the
@@ -2544,16 +2561,16 @@ keyword.
2544@item :coding @var{coding} 2561@item :coding @var{coding}
2545If @var{coding} is a symbol, it specifies the coding system used for 2562If @var{coding} is a symbol, it specifies the coding system used for
2546both reading and writing for this process. If @var{coding} is a cons 2563both reading and writing for this process. If @var{coding} is a cons
2547@code{(decoding . encoding)}, @var{decoding} is used for reading, and 2564@code{(@var{decoding} . @var{encoding})}, @var{decoding} is used for
2548@var{encoding} is used for writing. If not specified, the default is 2565reading, and @var{encoding} is used for writing. If not specified,
2549to determine the coding systems from data itself. 2566the default is to determine the coding systems from the data itself.
2550 2567
2551@item :noquery @var{query-flag} 2568@item :noquery @var{query-flag}
2552Initialize the process query flag to @var{query-flag}. @xref{Query 2569Initialize the process query flag to @var{query-flag}. @xref{Query
2553Before Exit}. The flags defaults to @code{nil} if unspecified. 2570Before Exit}. The flags defaults to @code{nil} if unspecified.
2554 2571
2555@item :stop @var{bool} 2572@item :stop @var{bool}
2556Start process in the @code{stopped} state if @var{bool} is 2573Start process in the ``stopped'' state if @var{bool} is
2557non-@code{nil}. In the stopped state, a serial process does not 2574non-@code{nil}. In the stopped state, a serial process does not
2558accept incoming data, but you can send outgoing data. The stopped 2575accept incoming data, but you can send outgoing data. The stopped
2559state is cleared by @code{continue-process} and set by 2576state is cleared by @code{continue-process} and set by
@@ -2568,8 +2585,7 @@ Install @var{sentinel} as the process sentinel.
2568@item :plist @var{plist} 2585@item :plist @var{plist}
2569Install @var{plist} as the initial plist of the process. 2586Install @var{plist} as the initial plist of the process.
2570 2587
2571@item :speed 2588@item :bytesize
2572@itemx :bytesize
2573@itemx :parity 2589@itemx :parity
2574@itemx :stopbits 2590@itemx :stopbits
2575@itemx :flowcontrol 2591@itemx :flowcontrol
@@ -2597,7 +2613,7 @@ Here is an example:
2597This functions configures a serial port connection. Arguments are 2613This functions configures a serial port connection. Arguments are
2598specified as keyword/argument pairs. Attributes that are not given 2614specified as keyword/argument pairs. Attributes that are not given
2599are re-initialized from the process's current configuration (available 2615are re-initialized from the process's current configuration (available
2600via the function @code{process-contact}) or set to reasonable default 2616via the function @code{process-contact}), or set to reasonable default
2601values. The following arguments are defined: 2617values. The following arguments are defined:
2602 2618
2603@table @code 2619@table @code
@@ -2615,8 +2631,8 @@ rate}. The value can be any number, but most serial ports work only
2615at a few defined values between 1200 and 115200, with 9600 being the 2631at a few defined values between 1200 and 115200, with 9600 being the
2616most common value. If @var{speed} is @code{nil}, the function ignores 2632most common value. If @var{speed} is @code{nil}, the function ignores
2617all other arguments and does not configure the port. This may be 2633all other arguments and does not configure the port. This may be
2618useful for special serial ports such as Bluetooth-to-serial converters 2634useful for special serial ports such as Bluetooth-to-serial converters,
2619which can only be configured through AT commands sent through the 2635which can only be configured through @samp{AT} commands sent through the
2620connection. The value of @code{nil} for @var{speed} is valid only for 2636connection. The value of @code{nil} for @var{speed} is valid only for
2621connections that were already opened by a previous call to 2637connections that were already opened by a previous call to
2622@code{make-serial-process} or @code{serial-term}. 2638@code{make-serial-process} or @code{serial-term}.
@@ -2643,9 +2659,9 @@ flow control). If @var{flowcontrol} is not given, it defaults to no
2643flow control. 2659flow control.
2644@end table 2660@end table
2645 2661
2646@code{serial-process-configure} is called by 2662Internally, @code{make-serial-process} calls
2647@code{make-serial-process} for the initial configuration of the serial 2663@code{serial-process-configure} for the initial configuration of the
2648port. 2664serial port.
2649@end defun 2665@end defun
2650 2666
2651@node Byte Packing 2667@node Byte Packing
@@ -2655,8 +2671,12 @@ port.
2655 This section describes how to pack and unpack arrays of bytes, 2671 This section describes how to pack and unpack arrays of bytes,
2656usually for binary network protocols. These functions convert byte arrays 2672usually for binary network protocols. These functions convert byte arrays
2657to alists, and vice versa. The byte array can be represented as a 2673to alists, and vice versa. The byte array can be represented as a
2674@c FIXME? No multibyte?
2658unibyte string or as a vector of integers, while the alist associates 2675unibyte string or as a vector of integers, while the alist associates
2659symbols either with fixed-size objects or with recursive sub-alists. 2676symbols either with fixed-size objects or with recursive sub-alists.
2677To use the functions referred to in this section, load the
2678@code{bindat} library.
2679@c It doesn't have any autoloads.
2660 2680
2661@cindex serializing 2681@cindex serializing
2662@cindex deserializing 2682@cindex deserializing
@@ -2677,10 +2697,10 @@ direction is also known as @dfn{serializing} or @dfn{packing}.
2677 2697
2678 To control unpacking and packing, you write a @dfn{data layout 2698 To control unpacking and packing, you write a @dfn{data layout
2679specification}, a special nested list describing named and typed 2699specification}, a special nested list describing named and typed
2680@dfn{fields}. This specification controls length of each field to be 2700@dfn{fields}. This specification controls the length of each field to be
2681processed, and how to pack or unpack it. We normally keep bindat specs 2701processed, and how to pack or unpack it. We normally keep bindat specs
2682in variables whose names end in @samp{-bindat-spec}; that kind of name 2702in variables whose names end in @samp{-bindat-spec}; that kind of name
2683is automatically recognized as ``risky.'' 2703is automatically recognized as ``risky''.
2684 2704
2685@cindex endianness 2705@cindex endianness
2686@cindex big endian 2706@cindex big endian
@@ -2690,7 +2710,7 @@ is automatically recognized as ``risky.''
2690that the field represents and, in the case of multibyte fields, how 2710that the field represents and, in the case of multibyte fields, how
2691the bytes are ordered within the field. The two possible orderings 2711the bytes are ordered within the field. The two possible orderings
2692are ``big endian'' (also known as ``network byte ordering'') and 2712are ``big endian'' (also known as ``network byte ordering'') and
2693``little endian.'' For instance, the number @code{#x23cd} (decimal 2713``little endian''. For instance, the number @code{#x23cd} (decimal
26949165) in big endian would be the two bytes @code{#x23} @code{#xcd}; 27149165) in big endian would be the two bytes @code{#x23} @code{#xcd};
2695and in little endian, @code{#xcd} @code{#x23}. Here are the possible 2715and in little endian, @code{#xcd} @code{#x23}. Here are the possible
2696type values: 2716type values:
@@ -2726,12 +2746,12 @@ String of length @var{len}.
2726Zero-terminated string, in a fixed-size field with length @var{len}. 2746Zero-terminated string, in a fixed-size field with length @var{len}.
2727 2747
2728@item vec @var{len} [@var{type}] 2748@item vec @var{len} [@var{type}]
2729Vector of @var{len} elements of type @var{type}, or bytes if not 2749Vector of @var{len} elements of type @var{type}, defaulting to bytes.
2730@var{type} is specified.
2731The @var{type} is any of the simple types above, or another vector 2750The @var{type} is any of the simple types above, or another vector
2732specified as a list @code{(vec @var{len} [@var{type}])}. 2751specified as a list of the form @code{(vec @var{len} [@var{type}])}.
2733 2752
2734@item ip 2753@item ip
2754@c FIXME? IPv6?
2735Four-byte vector representing an Internet address. For example: 2755Four-byte vector representing an Internet address. For example:
2736@code{[127 0 0 1]} for localhost. 2756@code{[127 0 0 1]} for localhost.
2737 2757
@@ -2759,12 +2779,11 @@ below, or by an expression @code{(eval @var{form})} where @var{form}
2759should evaluate to an integer, specifying the field length. 2779should evaluate to an integer, specifying the field length.
2760 2780
2761A field specification generally has the form @code{([@var{name}] 2781A field specification generally has the form @code{([@var{name}]
2762@var{handler})}. The square braces indicate that @var{name} is 2782@var{handler})}, where @var{name} is optional. Don't use names that
2763optional. (Don't use names that are symbols meaningful as type 2783are symbols meaningful as type specifications (above) or handler
2764specifications (above) or handler specifications (below), since that 2784specifications (below), since that would be ambiguous. @var{name} can
2765would be ambiguous.) @var{name} can be a symbol or the expression 2785be a symbol or an expression @code{(eval @var{form})}, in which case
2766@code{(eval @var{form})}, in which case @var{form} should evaluate to 2786@var{form} should evaluate to a symbol.
2767a symbol.
2768 2787
2769@var{handler} describes how to unpack or pack the field and can be one 2788@var{handler} describes how to unpack or pack the field and can be one
2770of the following: 2789of the following:
@@ -2811,10 +2830,11 @@ of @var{form}. A non-@code{nil} result indicates a match.
2811 2830
2812@item repeat @var{count} @var{field-specs}@dots{} 2831@item repeat @var{count} @var{field-specs}@dots{}
2813Process the @var{field-specs} recursively, in order, then repeat 2832Process the @var{field-specs} recursively, in order, then repeat
2814starting from the first one, processing all the specs @var{count} 2833starting from the first one, processing all the specifications @var{count}
2815times overall. The @var{count} is given using the same formats as a 2834times overall. The @var{count} is given using the same formats as a
2816field length---if an @code{eval} form is used, it is evaluated just once. 2835field length---if an @code{eval} form is used, it is evaluated just once.
2817For correct operation, each spec in @var{field-specs} must include a name. 2836For correct operation, each specification in @var{field-specs} must
2837include a name.
2818@end table 2838@end table
2819 2839
2820For the @code{(eval @var{form})} forms used in a bindat specification, 2840For the @code{(eval @var{form})} forms used in a bindat specification,
@@ -2853,9 +2873,10 @@ specification, @code{bindat-raw} to a byte array, and @var{struct} to an
2853alist representing unpacked field data. 2873alist representing unpacked field data.
2854 2874
2855@defun bindat-unpack spec bindat-raw &optional bindat-idx 2875@defun bindat-unpack spec bindat-raw &optional bindat-idx
2876@c FIXME? Again, no multibyte?
2856This function unpacks data from the unibyte string or byte 2877This function unpacks data from the unibyte string or byte
2857array @code{bindat-raw} 2878array @code{bindat-raw}
2858according to @var{spec}. Normally this starts unpacking at the 2879according to @var{spec}. Normally, this starts unpacking at the
2859beginning of the byte array, but if @var{bindat-idx} is non-@code{nil}, it 2880beginning of the byte array, but if @var{bindat-idx} is non-@code{nil}, it
2860specifies a zero-based starting position to use instead. 2881specifies a zero-based starting position to use instead.
2861 2882
@@ -2891,7 +2912,7 @@ according to @var{spec}.
2891 2912
2892@defun bindat-pack spec struct &optional bindat-raw bindat-idx 2913@defun bindat-pack spec struct &optional bindat-raw bindat-idx
2893This function returns a byte array packed according to @var{spec} from 2914This function returns a byte array packed according to @var{spec} from
2894the data in the alist @var{struct}. Normally it creates and fills a 2915the data in the alist @var{struct}. It normally creates and fills a
2895new byte array starting at the beginning. However, if @var{bindat-raw} 2916new byte array starting at the beginning. However, if @var{bindat-raw}
2896is non-@code{nil}, it specifies a pre-allocated unibyte string or vector to 2917is non-@code{nil}, it specifies a pre-allocated unibyte string or vector to
2897pack into. If @var{bindat-idx} is non-@code{nil}, it specifies the starting 2918pack into. If @var{bindat-idx} is non-@code{nil}, it specifies the starting
@@ -2904,6 +2925,7 @@ meets or exceeds the total length to avoid an out-of-range error.
2904@defun bindat-ip-to-string ip 2925@defun bindat-ip-to-string ip
2905Convert the Internet address vector @var{ip} to a string in the usual 2926Convert the Internet address vector @var{ip} to a string in the usual
2906dotted notation. 2927dotted notation.
2928@c FIXME? Does it do IPv6?
2907 2929
2908@example 2930@example
2909(bindat-ip-to-string [127 0 0 1]) 2931(bindat-ip-to-string [127 0 0 1])
@@ -2913,10 +2935,16 @@ dotted notation.
2913 2935
2914@node Bindat Examples 2936@node Bindat Examples
2915@subsection Examples of Byte Unpacking and Packing 2937@subsection Examples of Byte Unpacking and Packing
2938@c FIXME? This seems a very long example for something that is not used
2939@c very often. As of 24.1, gdb-mi.el is the only user of bindat.el in Emacs.
2940@c Maybe one or both of these examples should just be moved to the
2941@c commentary of bindat.el.
2916 2942
2917 Here is a complete example of byte unpacking and packing: 2943 Here is a complete example of byte unpacking and packing:
2918 2944
2919@lisp 2945@lisp
2946(require 'bindat)
2947
2920(defvar fcookie-index-spec 2948(defvar fcookie-index-spec
2921 '((:version u32) 2949 '((:version u32)
2922 (:count u32) 2950 (:count u32)
@@ -2925,16 +2953,14 @@ dotted notation.
2925 (:flags u32) 2953 (:flags u32)
2926 (:delim u8) 2954 (:delim u8)
2927 (:ignored fill 3) 2955 (:ignored fill 3)
2928 (:offset repeat (:count) 2956 (:offset repeat (:count) (:foo u32)))
2929 (:foo u32)))
2930 "Description of a fortune cookie index file's contents.") 2957 "Description of a fortune cookie index file's contents.")
2931 2958
2932(defun fcookie (cookies &optional index) 2959(defun fcookie (cookies &optional index)
2933 "Display a random fortune cookie from file COOKIES. 2960 "Display a random fortune cookie from file COOKIES.
2934Optional second arg INDEX specifies the associated index 2961Optional second arg INDEX specifies the associated index
2935filename, which is by default constructed by appending 2962filename, by default \"COOKIES.dat\". Display cookie text
2936\".dat\" to COOKIES. Display cookie text in possibly 2963in buffer \"*Fortune Cookie: BASENAME*\", where BASENAME
2937new buffer \"*Fortune Cookie: BASENAME*\" where BASENAME
2938is COOKIES without the directory part." 2964is COOKIES without the directory part."
2939 (interactive "fCookies file: ") 2965 (interactive "fCookies file: ")
2940 (let* ((info (with-temp-buffer 2966 (let* ((info (with-temp-buffer
@@ -2957,10 +2983,9 @@ is COOKIES without the directory part."
2957 2983
2958(defun fcookie-create-index (cookies &optional index delim) 2984(defun fcookie-create-index (cookies &optional index delim)
2959 "Scan file COOKIES, and write out its index file. 2985 "Scan file COOKIES, and write out its index file.
2960Optional second arg INDEX specifies the index filename, 2986Optional arg INDEX specifies the index filename, which by
2961which is by default constructed by appending \".dat\" to 2987default is \"COOKIES.dat\". Optional arg DELIM specifies the
2962COOKIES. Optional third arg DELIM specifies the unibyte 2988unibyte character that, when found on a line of its own in
2963character which, when found on a line of its own in
2964COOKIES, indicates the border between entries." 2989COOKIES, indicates the border between entries."
2965 (interactive "fCookies file: ") 2990 (interactive "fCookies file: ")
2966 (setq delim (or delim ?%)) 2991 (setq delim (or delim ?%))
@@ -2997,8 +3022,8 @@ COOKIES, indicates the border between entries."
2997 (write-file (or index (concat cookies ".dat"))))))) 3022 (write-file (or index (concat cookies ".dat")))))))
2998@end lisp 3023@end lisp
2999 3024
3000Following is an example of defining and unpacking a complex structure. 3025The following is an example of defining and unpacking a complex
3001Consider the following C structures: 3026structure. Consider the following C structures:
3002 3027
3003@example 3028@example
3004struct header @{ 3029struct header @{
@@ -3011,14 +3036,14 @@ struct header @{
3011struct data @{ 3036struct data @{
3012 unsigned char type; 3037 unsigned char type;
3013 unsigned char opcode; 3038 unsigned char opcode;
3014 unsigned short length; /* In network byte order */ 3039 unsigned short length; /* in network byte order */
3015 unsigned char id[8]; /* null-terminated string */ 3040 unsigned char id[8]; /* null-terminated string */
3016 unsigned char data[/* (length + 3) & ~3 */]; 3041 unsigned char data[/* (length + 3) & ~3 */];
3017@}; 3042@};
3018 3043
3019struct packet @{ 3044struct packet @{
3020 struct header header; 3045 struct header header;
3021 unsigned long counters[2]; /* In little endian order */ 3046 unsigned long counters[2]; /* in little endian order */
3022 unsigned char items; 3047 unsigned char items;
3023 unsigned char filler[3]; 3048 unsigned char filler[3];
3024 struct data item[/* items */]; 3049 struct data item[/* items */];
@@ -3026,7 +3051,7 @@ struct packet @{
3026@}; 3051@};
3027@end example 3052@end example
3028 3053
3029The corresponding data layout specification: 3054The corresponding data layout specification is:
3030 3055
3031@lisp 3056@lisp
3032(setq header-spec 3057(setq header-spec
@@ -3038,21 +3063,21 @@ The corresponding data layout specification:
3038(setq data-spec 3063(setq data-spec
3039 '((type u8) 3064 '((type u8)
3040 (opcode u8) 3065 (opcode u8)
3041 (length u16) ;; network byte order 3066 (length u16) ; network byte order
3042 (id strz 8) 3067 (id strz 8)
3043 (data vec (length)) 3068 (data vec (length))
3044 (align 4))) 3069 (align 4)))
3045 3070
3046(setq packet-spec 3071(setq packet-spec
3047 '((header struct header-spec) 3072 '((header struct header-spec)
3048 (counters vec 2 u32r) ;; little endian order 3073 (counters vec 2 u32r) ; little endian order
3049 (items u8) 3074 (items u8)
3050 (fill 3) 3075 (fill 3)
3051 (item repeat (items) 3076 (item repeat (items)
3052 (struct data-spec)))) 3077 (struct data-spec))))
3053@end lisp 3078@end lisp
3054 3079
3055A binary data representation: 3080A binary data representation is:
3056 3081
3057@lisp 3082@lisp
3058(setq binary-data 3083(setq binary-data
@@ -3062,7 +3087,7 @@ A binary data representation:
3062 1 4 0 7 ?B ?C ?D ?E ?F ?G 0 0 6 7 8 9 10 11 12 0 ]) 3087 1 4 0 7 ?B ?C ?D ?E ?F ?G 0 0 6 7 8 9 10 11 12 0 ])
3063@end lisp 3088@end lisp
3064 3089
3065The corresponding decoded structure: 3090The corresponding decoded structure is:
3066 3091
3067@lisp 3092@lisp
3068(setq decoded (bindat-unpack packet-spec binary-data)) 3093(setq decoded (bindat-unpack packet-spec binary-data))
@@ -3086,7 +3111,7 @@ The corresponding decoded structure:
3086 (type . 1)))) 3111 (type . 1))))
3087@end lisp 3112@end lisp
3088 3113
3089Fetching data from this structure: 3114An example of fetching data from this structure:
3090 3115
3091@lisp 3116@lisp
3092(bindat-get-field decoded 'item 1 'id) 3117(bindat-get-field decoded 'item 1 'id)
diff --git a/doc/lispref/searching.texi b/doc/lispref/searching.texi
index e79d361bfeb..786bffc1f84 100644
--- a/doc/lispref/searching.texi
+++ b/doc/lispref/searching.texi
@@ -3,7 +3,6 @@
3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012
4@c Free Software Foundation, Inc. 4@c Free Software Foundation, Inc.
5@c See the file elisp.texi for copying conditions. 5@c See the file elisp.texi for copying conditions.
6@setfilename ../../info/searching
7@node Searching and Matching, Syntax Tables, Non-ASCII Characters, Top 6@node Searching and Matching, Syntax Tables, Non-ASCII Characters, Top
8@chapter Searching and Matching 7@chapter Searching and Matching
9@cindex searching 8@cindex searching
diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi
index 50f75da2de8..16cc5f946d0 100644
--- a/doc/lispref/sequences.texi
+++ b/doc/lispref/sequences.texi
@@ -3,7 +3,6 @@
3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012
4@c Free Software Foundation, Inc. 4@c Free Software Foundation, Inc.
5@c See the file elisp.texi for copying conditions. 5@c See the file elisp.texi for copying conditions.
6@setfilename ../../info/sequences
7@node Sequences Arrays Vectors, Hash Tables, Lists, Top 6@node Sequences Arrays Vectors, Hash Tables, Lists, Top
8@chapter Sequences, Arrays, and Vectors 7@chapter Sequences, Arrays, and Vectors
9@cindex sequence 8@cindex sequence
diff --git a/doc/lispref/streams.texi b/doc/lispref/streams.texi
index 1628f32aa29..7028b6e4e3f 100644
--- a/doc/lispref/streams.texi
+++ b/doc/lispref/streams.texi
@@ -1,8 +1,7 @@
1@c -*-texinfo-*- 1@c -*-texinfo-*-
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990-1994, 1998-1999, 2001-2012 Free Software Foundation, Inc. 3@c Copyright (C) 1990-1994, 1998-1999, 2001-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5@setfilename ../../info/streams
6@node Read and Print, Minibuffers, Debugging, Top 5@node Read and Print, Minibuffers, Debugging, Top
7@comment node-name, next, previous, up 6@comment node-name, next, previous, up
8@chapter Reading and Printing Lisp Objects 7@chapter Reading and Printing Lisp Objects
diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi
index 7813283ade5..cadbc26b910 100644
--- a/doc/lispref/strings.texi
+++ b/doc/lispref/strings.texi
@@ -3,7 +3,6 @@
3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012
4@c Free Software Foundation, Inc. 4@c Free Software Foundation, Inc.
5@c See the file elisp.texi for copying conditions. 5@c See the file elisp.texi for copying conditions.
6@setfilename ../../info/strings
7@node Strings and Characters, Lists, Numbers, Top 6@node Strings and Characters, Lists, Numbers, Top
8@comment node-name, next, previous, up 7@comment node-name, next, previous, up
9@chapter Strings and Characters 8@chapter Strings and Characters
@@ -1117,7 +1116,7 @@ Exits}).
1117@acronym{ASCII} characters; for example, in the Turkish language 1116@acronym{ASCII} characters; for example, in the Turkish language
1118environment, the @acronym{ASCII} character @samp{I} is downcased into 1117environment, the @acronym{ASCII} character @samp{I} is downcased into
1119a Turkish ``dotless i''. This can interfere with code that requires 1118a Turkish ``dotless i''. This can interfere with code that requires
1120ordinary ASCII case conversion, such as implementations of 1119ordinary @acronym{ASCII} case conversion, such as implementations of
1121@acronym{ASCII}-based network protocols. In that case, use the 1120@acronym{ASCII}-based network protocols. In that case, use the
1122@code{with-case-table} macro with the variable @var{ascii-case-table}, 1121@code{with-case-table} macro with the variable @var{ascii-case-table},
1123which stores the unmodified case table for the @acronym{ASCII} 1122which stores the unmodified case table for the @acronym{ASCII}
diff --git a/doc/lispref/symbols.texi b/doc/lispref/symbols.texi
index 0ee22b905b6..ac2cea02040 100644
--- a/doc/lispref/symbols.texi
+++ b/doc/lispref/symbols.texi
@@ -1,8 +1,7 @@
1@c -*-texinfo-*- 1@c -*-texinfo-*-
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 Free Software Foundation, Inc. 3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5@setfilename ../../info/symbols
6@node Symbols, Evaluation, Hash Tables, Top 5@node Symbols, Evaluation, Hash Tables, Top
7@chapter Symbols 6@chapter Symbols
8@cindex symbol 7@cindex symbol
diff --git a/doc/lispref/syntax.texi b/doc/lispref/syntax.texi
index e2fb3238642..830ceeedefd 100644
--- a/doc/lispref/syntax.texi
+++ b/doc/lispref/syntax.texi
@@ -3,7 +3,6 @@
3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012
4@c Free Software Foundation, Inc. 4@c Free Software Foundation, Inc.
5@c See the file elisp.texi for copying conditions. 5@c See the file elisp.texi for copying conditions.
6@setfilename ../../info/syntax
7@node Syntax Tables, Abbrevs, Searching and Matching, Top 6@node Syntax Tables, Abbrevs, Searching and Matching, Top
8@chapter Syntax Tables 7@chapter Syntax Tables
9@cindex parsing buffer text 8@cindex parsing buffer text
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index 770dd5b5777..a9c51fead1b 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -1,8 +1,7 @@
1@c -*-texinfo-*- 1@c -*-texinfo-*-
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990-1995, 1998-2012 Free Software Foundation, Inc. 3@c Copyright (C) 1990-1995, 1998-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5@setfilename ../../info/text
6@node Text, Non-ASCII Characters, Markers, Top 5@node Text, Non-ASCII Characters, Markers, Top
7@chapter Text 6@chapter Text
8@cindex text 7@cindex text
@@ -4345,7 +4344,7 @@ changed text, its length is simply the difference between the first two
4345arguments. 4344arguments.
4346@end defvar 4345@end defvar
4347 4346
4348 Output of messages into the @samp{*Messages*} buffer does not 4347 Output of messages into the @file{*Messages*} buffer does not
4349call these functions. 4348call these functions.
4350 4349
4351@defmac combine-after-change-calls body@dots{} 4350@defmac combine-after-change-calls body@dots{}
diff --git a/doc/lispref/tips.texi b/doc/lispref/tips.texi
index 5874a848807..4ba7dd9dfe9 100644
--- a/doc/lispref/tips.texi
+++ b/doc/lispref/tips.texi
@@ -3,7 +3,6 @@
3@c Copyright (C) 1990-1993, 1995, 1998-1999, 2001-2012 3@c Copyright (C) 1990-1993, 1995, 1998-1999, 2001-2012
4@c Free Software Foundation, Inc. 4@c Free Software Foundation, Inc.
5@c See the file elisp.texi for copying conditions. 5@c See the file elisp.texi for copying conditions.
6@setfilename ../../info/tips
7@node Tips, GNU Emacs Internals, GPL, Top 6@node Tips, GNU Emacs Internals, GPL, Top
8@appendix Tips and Conventions 7@appendix Tips and Conventions
9@cindex tips for writing Lisp 8@cindex tips for writing Lisp
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
index 548d2e99414..e0e629ec9d3 100644
--- a/doc/lispref/variables.texi
+++ b/doc/lispref/variables.texi
@@ -2,7 +2,6 @@
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990-1995, 1998-2012 Free Software Foundation, Inc. 3@c Copyright (C) 1990-1995, 1998-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5@setfilename ../../info/variables
6@node Variables, Functions, Control Structures, Top 5@node Variables, Functions, Control Structures, Top
7@chapter Variables 6@chapter Variables
8@cindex variable 7@cindex variable
diff --git a/doc/lispref/vol1.texi b/doc/lispref/vol1.texi
index df269868e09..25ea8577467 100644
--- a/doc/lispref/vol1.texi
+++ b/doc/lispref/vol1.texi
@@ -141,7 +141,7 @@ Reference Manual, corresponding to GNU Emacs version @value{EMACSVER}.
141* Functions:: A function is a Lisp program 141* Functions:: A function is a Lisp program
142 that can be invoked from other functions. 142 that can be invoked from other functions.
143* Macros:: Macros are a way to extend the Lisp language. 143* Macros:: Macros are a way to extend the Lisp language.
144* Customization:: Writing customization declarations. 144* Customization:: Making variables and faces customizable.
145 145
146* Loading:: Reading files of Lisp code into Lisp. 146* Loading:: Reading files of Lisp code into Lisp.
147* Byte Compilation:: Compilation makes programs run faster. 147* Byte Compilation:: Compilation makes programs run faster.
@@ -520,6 +520,8 @@ Writing Customization Definitions
520* Group Definitions:: Writing customization group definitions. 520* Group Definitions:: Writing customization group definitions.
521* Variable Definitions:: Declaring user options. 521* Variable Definitions:: Declaring user options.
522* Customization Types:: Specifying the type of a user option. 522* Customization Types:: Specifying the type of a user option.
523* Applying Customizations:: Functions to apply customization settings.
524* Custom Themes:: Writing Custom themes.
523 525
524Customization Types 526Customization Types
525 527
@@ -656,8 +658,8 @@ Minibuffers
656* Multiple Queries:: Asking a series of similar questions. 658* Multiple Queries:: Asking a series of similar questions.
657* Reading a Password:: Reading a password from the terminal. 659* Reading a Password:: Reading a password from the terminal.
658* Minibuffer Commands:: Commands used as key bindings in minibuffers. 660* Minibuffer Commands:: Commands used as key bindings in minibuffers.
659* Minibuffer Contents:: How such commands access the minibuffer text.
660* Minibuffer Windows:: Operating on the special minibuffer windows. 661* Minibuffer Windows:: Operating on the special minibuffer windows.
662* Minibuffer Contents:: How such commands access the minibuffer text.
661* Recursive Mini:: Whether recursive entry to minibuffer is allowed. 663* Recursive Mini:: Whether recursive entry to minibuffer is allowed.
662* Minibuffer Misc:: Various customization hooks and variables. 664* Minibuffer Misc:: Various customization hooks and variables.
663 665
@@ -668,7 +670,7 @@ Completion
668* Minibuffer Completion:: Invoking the minibuffer with completion. 670* Minibuffer Completion:: Invoking the minibuffer with completion.
669* Completion Commands:: Minibuffer commands that do completion. 671* Completion Commands:: Minibuffer commands that do completion.
670* High-Level Completion:: Convenient special cases of completion 672* High-Level Completion:: Convenient special cases of completion
671 (reading buffer name, file name, etc.). 673 (reading buffer names, variable names, etc.).
672* Reading File Names:: Using completion to read file names and 674* Reading File Names:: Using completion to read file names and
673 shell commands. 675 shell commands.
674* Completion Variables:: Variables controlling completion behavior. 676* Completion Variables:: Variables controlling completion behavior.
@@ -1317,7 +1319,7 @@ Overlays
1317 1319
1318Faces 1320Faces
1319 1321
1320* Defining Faces:: How to define a face with @code{defface}. 1322* Defining Faces:: How to define a face.
1321* Face Attributes:: What is in a face? 1323* Face Attributes:: What is in a face?
1322* Attribute Functions:: Functions to examine and set face attributes. 1324* Attribute Functions:: Functions to examine and set face attributes.
1323* Displaying Faces:: How Emacs combines the faces specified for 1325* Displaying Faces:: How Emacs combines the faces specified for
diff --git a/doc/lispref/vol2.texi b/doc/lispref/vol2.texi
index 2a2578158bf..2fd2a8d8224 100644
--- a/doc/lispref/vol2.texi
+++ b/doc/lispref/vol2.texi
@@ -140,7 +140,7 @@ Reference Manual, corresponding to GNU Emacs version @value{EMACSVER}.
140* Functions:: A function is a Lisp program 140* Functions:: A function is a Lisp program
141 that can be invoked from other functions. 141 that can be invoked from other functions.
142* Macros:: Macros are a way to extend the Lisp language. 142* Macros:: Macros are a way to extend the Lisp language.
143* Customization:: Writing customization declarations. 143* Customization:: Making variables and faces customizable.
144 144
145* Loading:: Reading files of Lisp code into Lisp. 145* Loading:: Reading files of Lisp code into Lisp.
146* Byte Compilation:: Compilation makes programs run faster. 146* Byte Compilation:: Compilation makes programs run faster.
@@ -519,6 +519,8 @@ Writing Customization Definitions
519* Group Definitions:: Writing customization group definitions. 519* Group Definitions:: Writing customization group definitions.
520* Variable Definitions:: Declaring user options. 520* Variable Definitions:: Declaring user options.
521* Customization Types:: Specifying the type of a user option. 521* Customization Types:: Specifying the type of a user option.
522* Applying Customizations:: Functions to apply customization settings.
523* Custom Themes:: Writing Custom themes.
522 524
523Customization Types 525Customization Types
524 526
@@ -655,8 +657,8 @@ Minibuffers
655* Multiple Queries:: Asking a series of similar questions. 657* Multiple Queries:: Asking a series of similar questions.
656* Reading a Password:: Reading a password from the terminal. 658* Reading a Password:: Reading a password from the terminal.
657* Minibuffer Commands:: Commands used as key bindings in minibuffers. 659* Minibuffer Commands:: Commands used as key bindings in minibuffers.
658* Minibuffer Contents:: How such commands access the minibuffer text.
659* Minibuffer Windows:: Operating on the special minibuffer windows. 660* Minibuffer Windows:: Operating on the special minibuffer windows.
661* Minibuffer Contents:: How such commands access the minibuffer text.
660* Recursive Mini:: Whether recursive entry to minibuffer is allowed. 662* Recursive Mini:: Whether recursive entry to minibuffer is allowed.
661* Minibuffer Misc:: Various customization hooks and variables. 663* Minibuffer Misc:: Various customization hooks and variables.
662 664
@@ -667,7 +669,7 @@ Completion
667* Minibuffer Completion:: Invoking the minibuffer with completion. 669* Minibuffer Completion:: Invoking the minibuffer with completion.
668* Completion Commands:: Minibuffer commands that do completion. 670* Completion Commands:: Minibuffer commands that do completion.
669* High-Level Completion:: Convenient special cases of completion 671* High-Level Completion:: Convenient special cases of completion
670 (reading buffer name, file name, etc.). 672 (reading buffer names, variable names, etc.).
671* Reading File Names:: Using completion to read file names and 673* Reading File Names:: Using completion to read file names and
672 shell commands. 674 shell commands.
673* Completion Variables:: Variables controlling completion behavior. 675* Completion Variables:: Variables controlling completion behavior.
@@ -1316,7 +1318,7 @@ Overlays
1316 1318
1317Faces 1319Faces
1318 1320
1319* Defining Faces:: How to define a face with @code{defface}. 1321* Defining Faces:: How to define a face.
1320* Face Attributes:: What is in a face? 1322* Face Attributes:: What is in a face?
1321* Attribute Functions:: Functions to examine and set face attributes. 1323* Attribute Functions:: Functions to examine and set face attributes.
1322* Displaying Faces:: How Emacs combines the faces specified for 1324* Displaying Faces:: How Emacs combines the faces specified for
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index 8df32785036..a9a25d8e867 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -3,7 +3,6 @@
3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012
4@c Free Software Foundation, Inc. 4@c Free Software Foundation, Inc.
5@c See the file elisp.texi for copying conditions. 5@c See the file elisp.texi for copying conditions.
6@setfilename ../../info/windows
7@node Windows, Frames, Buffers, Top 6@node Windows, Frames, Buffers, Top
8@chapter Windows 7@chapter Windows
9 8
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index be79a9d864d..14f389044bb 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,3 +1,29 @@
12012-04-20 Glenn Morris <rgm@gnu.org>
2
3 * faq.texi (New in Emacs 24): New section.
4 (Packages that do not come with Emacs): Mention M-x list-packages.
5
62012-04-14 Alan Mackenzie <acm@muc.de>
7
8 * cc-mode.texi (c-offsets-alist): Correct a typo.
9
102012-04-14 Jérémie Courrèges-Anglas <jca@wxcvbn.org> (tiny change)
11
12 * org.texi (Deadlines and scheduling): Fix the example: the
13 DEADLINE item should come right after the headline. We enforce
14 this convention, so it is a bug not to illustrate it correctly in
15 the manual.
16
172012-04-14 Ippei FURUHASHI <top.tuna+orgmode@gmail.com> (tiny change)
18
19 * org.texi (Agenda commands): Fix documentation bug by swapping
20 the equivalent keybindings to `org-agenda-next-line' with the ones
21 to `org-agenda-previous-line'.
22
232012-04-14 Glenn Morris <rgm@gnu.org>
24
25 * Makefile.in: Replace non-portable use of $< in ordinary rules.
26
12012-04-09 Eli Zaretskii <eliz@gnu.org> 272012-04-09 Eli Zaretskii <eliz@gnu.org>
2 28
3 * makefile.w32-in (INFO_TARGETS, DVI_TARGETS, clean): Add 29 * makefile.w32-in (INFO_TARGETS, DVI_TARGETS, clean): Add
diff --git a/doc/misc/Makefile.in b/doc/misc/Makefile.in
index 429b84abf8f..390b077bbb0 100644
--- a/doc/misc/Makefile.in
+++ b/doc/misc/Makefile.in
@@ -1,6 +1,6 @@
1#### Makefile for documentation other than the Emacs manual. 1#### Makefile for documentation other than the Emacs manual.
2 2
3# Copyright (C) 1994, 1996-2012 Free Software Foundation, Inc. 3# Copyright (C) 1994, 1996-2012 Free Software Foundation, Inc.
4 4
5# This file is part of GNU Emacs. 5# This file is part of GNU Emacs.
6 6
@@ -227,235 +227,237 @@ pdf: $(PDF_TARGETS)
227# to exist in the build directory. 227# to exist in the build directory.
228# In a distribution of Emacs, the Info files should be up to date. 228# In a distribution of Emacs, the Info files should be up to date.
229 229
230# Note: "<" is not portable in ordinary make rules.
231
230## "short" target names for convenience, to just rebuild one manual. 232## "short" target names for convenience, to just rebuild one manual.
231ada-mode : $(infodir)/ada-mode 233ada-mode : $(infodir)/ada-mode
232$(infodir)/ada-mode: ada-mode.texi 234$(infodir)/ada-mode: ada-mode.texi
233 $(mkinfodir) 235 $(mkinfodir)
234 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 236 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) ada-mode.texi
235ada-mode.dvi: ${srcdir}/ada-mode.texi 237ada-mode.dvi: ${srcdir}/ada-mode.texi
236 $(ENVADD) $(TEXI2DVI) $< 238 $(ENVADD) $(TEXI2DVI) ${srcdir}/ada-mode.texi
237ada-mode.pdf: ${srcdir}/ada-mode.texi 239ada-mode.pdf: ${srcdir}/ada-mode.texi
238 $(ENVADD) $(TEXI2PDF) $< 240 $(ENVADD) $(TEXI2PDF) ${srcdir}/ada-mode.texi
239 241
240auth : $(infodir)/auth 242auth : $(infodir)/auth
241$(infodir)/auth: auth.texi 243$(infodir)/auth: auth.texi
242 $(mkinfodir) 244 $(mkinfodir)
243 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 245 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) auth.texi
244auth.dvi: ${srcdir}/auth.texi 246auth.dvi: ${srcdir}/auth.texi
245 $(ENVADD) $(TEXI2DVI) $< 247 $(ENVADD) $(TEXI2DVI) ${srcdir}/auth.texi
246auth.pdf: ${srcdir}/auth.texi 248auth.pdf: ${srcdir}/auth.texi
247 $(ENVADD) $(TEXI2PDF) $< 249 $(ENVADD) $(TEXI2PDF) ${srcdir}/auth.texi
248 250
249autotype : $(infodir)/autotype 251autotype : $(infodir)/autotype
250$(infodir)/autotype: autotype.texi 252$(infodir)/autotype: autotype.texi
251 $(mkinfodir) 253 $(mkinfodir)
252 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 254 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) autotype.texi
253autotype.dvi: ${srcdir}/autotype.texi 255autotype.dvi: ${srcdir}/autotype.texi
254 $(ENVADD) $(TEXI2DVI) $< 256 $(ENVADD) $(TEXI2DVI) ${srcdir}/autotype.texi
255autotype.pdf: ${srcdir}/autotype.texi 257autotype.pdf: ${srcdir}/autotype.texi
256 $(ENVADD) $(TEXI2PDF) $< 258 $(ENVADD) $(TEXI2PDF) ${srcdir}/autotype.texi
257 259
258calc : $(infodir)/calc 260calc : $(infodir)/calc
259$(infodir)/calc: calc.texi $(emacsdir)/emacsver.texi 261$(infodir)/calc: calc.texi $(emacsdir)/emacsver.texi
260 $(mkinfodir) 262 $(mkinfodir)
261 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 263 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) calc.texi
262calc.dvi: ${srcdir}/calc.texi $(emacsdir)/emacsver.texi 264calc.dvi: ${srcdir}/calc.texi $(emacsdir)/emacsver.texi
263 $(ENVADD) $(TEXI2DVI) $< 265 $(ENVADD) $(TEXI2DVI) ${srcdir}/calc.texi
264calc.pdf: ${srcdir}/calc.texi $(emacsdir)/emacsver.texi 266calc.pdf: ${srcdir}/calc.texi $(emacsdir)/emacsver.texi
265 $(ENVADD) $(TEXI2PDF) $< 267 $(ENVADD) $(TEXI2PDF) ${srcdir}/calc.texi
266 268
267ccmode : $(infodir)/ccmode 269ccmode : $(infodir)/ccmode
268$(infodir)/ccmode: cc-mode.texi 270$(infodir)/ccmode: cc-mode.texi
269 $(mkinfodir) 271 $(mkinfodir)
270 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 272 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) cc-mode.texi
271cc-mode.dvi: ${srcdir}/cc-mode.texi 273cc-mode.dvi: ${srcdir}/cc-mode.texi
272 $(ENVADD) $(TEXI2DVI) $< 274 $(ENVADD) $(TEXI2DVI) ${srcdir}/cc-mode.texi
273cc-mode.pdf: ${srcdir}/cc-mode.texi 275cc-mode.pdf: ${srcdir}/cc-mode.texi
274 $(ENVADD) $(TEXI2PDF) $< 276 $(ENVADD) $(TEXI2PDF) ${srcdir}/cc-mode.texi
275 277
276cl : $(infodir)/cl 278cl : $(infodir)/cl
277$(infodir)/cl: cl.texi 279$(infodir)/cl: cl.texi
278 $(mkinfodir) 280 $(mkinfodir)
279 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 281 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) cl.texi
280cl.dvi: ${srcdir}/cl.texi 282cl.dvi: ${srcdir}/cl.texi
281 $(ENVADD) $(TEXI2DVI) $< 283 $(ENVADD) $(TEXI2DVI) ${srcdir}/cl.texi
282cl.pdf: ${srcdir}/cl.texi 284cl.pdf: ${srcdir}/cl.texi
283 $(ENVADD) $(TEXI2PDF) $< 285 $(ENVADD) $(TEXI2PDF) ${srcdir}/cl.texi
284 286
285dbus : $(infodir)/dbus 287dbus : $(infodir)/dbus
286$(infodir)/dbus: dbus.texi 288$(infodir)/dbus: dbus.texi
287 $(mkinfodir) 289 $(mkinfodir)
288 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 290 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) dbus.texi
289dbus.dvi: ${srcdir}/dbus.texi 291dbus.dvi: ${srcdir}/dbus.texi
290 $(ENVADD) $(TEXI2DVI) $< 292 $(ENVADD) $(TEXI2DVI) ${srcdir}/dbus.texi
291dbus.pdf: ${srcdir}/dbus.texi 293dbus.pdf: ${srcdir}/dbus.texi
292 $(ENVADD) $(TEXI2PDF) $< 294 $(ENVADD) $(TEXI2PDF) ${srcdir}/dbus.texi
293 295
294dired-x : $(infodir)/dired-x 296dired-x : $(infodir)/dired-x
295$(infodir)/dired-x: dired-x.texi $(emacsdir)/emacsver.texi 297$(infodir)/dired-x: dired-x.texi $(emacsdir)/emacsver.texi
296 $(mkinfodir) 298 $(mkinfodir)
297 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 299 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) dired-x.texi
298dired-x.dvi: ${srcdir}/dired-x.texi $(emacsdir)/emacsver.texi 300dired-x.dvi: ${srcdir}/dired-x.texi $(emacsdir)/emacsver.texi
299 $(ENVADD) $(TEXI2DVI) $< 301 $(ENVADD) $(TEXI2DVI) ${srcdir}/dired-x.texi
300dired-x.pdf: ${srcdir}/dired-x.texi $(emacsdir)/emacsver.texi 302dired-x.pdf: ${srcdir}/dired-x.texi $(emacsdir)/emacsver.texi
301 $(ENVADD) $(TEXI2PDF) $< 303 $(ENVADD) $(TEXI2PDF) ${srcdir}/dired-x.texi
302 304
303ebrowse : $(infodir)/ebrowse 305ebrowse : $(infodir)/ebrowse
304$(infodir)/ebrowse: ebrowse.texi 306$(infodir)/ebrowse: ebrowse.texi
305 $(mkinfodir) 307 $(mkinfodir)
306 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 308 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) ebrowse.texi
307ebrowse.dvi: ${srcdir}/ebrowse.texi 309ebrowse.dvi: ${srcdir}/ebrowse.texi
308 $(ENVADD) $(TEXI2DVI) $< 310 $(ENVADD) $(TEXI2DVI) ${srcdir}/ebrowse.texi
309ebrowse.pdf: ${srcdir}/ebrowse.texi 311ebrowse.pdf: ${srcdir}/ebrowse.texi
310 $(ENVADD) $(TEXI2PDF) $< 312 $(ENVADD) $(TEXI2PDF) ${srcdir}/ebrowse.texi
311 313
312ede : $(infodir)/ede 314ede : $(infodir)/ede
313$(infodir)/ede: ede.texi 315$(infodir)/ede: ede.texi
314 $(mkinfodir) 316 $(mkinfodir)
315 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 317 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) ede.texi
316ede.dvi: ${srcdir}/ede.texi 318ede.dvi: ${srcdir}/ede.texi
317 $(ENVADD) $(TEXI2DVI) $< 319 $(ENVADD) $(TEXI2DVI) ${srcdir}/ede.texi
318ede.pdf: ${srcdir}/ede.texi 320ede.pdf: ${srcdir}/ede.texi
319 $(ENVADD) $(TEXI2PDF) $< 321 $(ENVADD) $(TEXI2PDF) ${srcdir}/ede.texi
320 322
321ediff : $(infodir)/ediff 323ediff : $(infodir)/ediff
322$(infodir)/ediff: ediff.texi 324$(infodir)/ediff: ediff.texi
323 $(mkinfodir) 325 $(mkinfodir)
324 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 326 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) ediff.texi
325ediff.dvi: ${srcdir}/ediff.texi 327ediff.dvi: ${srcdir}/ediff.texi
326 $(ENVADD) $(TEXI2DVI) $< 328 $(ENVADD) $(TEXI2DVI) ${srcdir}/ediff.texi
327ediff.pdf: ${srcdir}/ediff.texi 329ediff.pdf: ${srcdir}/ediff.texi
328 $(ENVADD) $(TEXI2PDF) $< 330 $(ENVADD) $(TEXI2PDF) ${srcdir}/ediff.texi
329 331
330edt : $(infodir)/edt 332edt : $(infodir)/edt
331$(infodir)/edt: edt.texi 333$(infodir)/edt: edt.texi
332 $(mkinfodir) 334 $(mkinfodir)
333 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 335 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) edt.texi
334edt.dvi: ${srcdir}/edt.texi 336edt.dvi: ${srcdir}/edt.texi
335 $(ENVADD) $(TEXI2DVI) $< 337 $(ENVADD) $(TEXI2DVI) ${srcdir}/edt.texi
336edt.pdf: ${srcdir}/edt.texi 338edt.pdf: ${srcdir}/edt.texi
337 $(ENVADD) $(TEXI2PDF) $< 339 $(ENVADD) $(TEXI2PDF) ${srcdir}/edt.texi
338 340
339eieio : $(infodir)/eieio 341eieio : $(infodir)/eieio
340$(infodir)/eieio: eieio.texi 342$(infodir)/eieio: eieio.texi
341 $(mkinfodir) 343 $(mkinfodir)
342 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 344 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) eieio.texi
343eieio.dvi: ${srcdir}/eieio.texi 345eieio.dvi: ${srcdir}/eieio.texi
344 $(ENVADD) $(TEXI2DVI) $< 346 $(ENVADD) $(TEXI2DVI) ${srcdir}/eieio.texi
345eieio.pdf: ${srcdir}/eieio.texi 347eieio.pdf: ${srcdir}/eieio.texi
346 $(ENVADD) $(TEXI2PDF) $< 348 $(ENVADD) $(TEXI2PDF) ${srcdir}/eieio.texi
347 349
348emacs-gnutls : $(infodir)/emacs-gnutls 350emacs-gnutls : $(infodir)/emacs-gnutls
349$(infodir)/emacs-gnutls: emacs-gnutls.texi 351$(infodir)/emacs-gnutls: emacs-gnutls.texi
350 $(mkinfodir) 352 $(mkinfodir)
351 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 353 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) emacs-gnutls.texi
352emacs-gnutls.dvi: ${srcdir}/emacs-gnutls.texi 354emacs-gnutls.dvi: ${srcdir}/emacs-gnutls.texi
353 $(ENVADD) $(TEXI2DVI) $< 355 $(ENVADD) $(TEXI2DVI) ${srcdir}/emacs-gnutls.texi
354emacs-gnutls.pdf: ${srcdir}/emacs-gnutls.texi 356emacs-gnutls.pdf: ${srcdir}/emacs-gnutls.texi
355 $(ENVADD) $(TEXI2PDF) $< 357 $(ENVADD) $(TEXI2PDF) ${srcdir}/emacs-gnutls.texi
356 358
357emacs-mime : $(infodir)/emacs-mime 359emacs-mime : $(infodir)/emacs-mime
358$(infodir)/emacs-mime: emacs-mime.texi 360$(infodir)/emacs-mime: emacs-mime.texi
359 $(mkinfodir) 361 $(mkinfodir)
360 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) --enable-encoding $< 362 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) --enable-encoding emacs-mime.texi
361emacs-mime.dvi: ${srcdir}/emacs-mime.texi 363emacs-mime.dvi: ${srcdir}/emacs-mime.texi
362 $(ENVADD) $(TEXI2DVI) $< 364 $(ENVADD) $(TEXI2DVI) ${srcdir}/emacs-mime.texi
363emacs-mime.pdf: ${srcdir}/emacs-mime.texi 365emacs-mime.pdf: ${srcdir}/emacs-mime.texi
364 $(ENVADD) $(TEXI2PDF) $< 366 $(ENVADD) $(TEXI2PDF) ${srcdir}/emacs-mime.texi
365 367
366epa : $(infodir)/epa 368epa : $(infodir)/epa
367$(infodir)/epa: epa.texi 369$(infodir)/epa: epa.texi
368 $(mkinfodir) 370 $(mkinfodir)
369 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 371 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) epa.texi
370epa.dvi: ${srcdir}/epa.texi 372epa.dvi: ${srcdir}/epa.texi
371 $(ENVADD) $(TEXI2DVI) $< 373 $(ENVADD) $(TEXI2DVI) ${srcdir}/epa.texi
372epa.pdf: ${srcdir}/epa.texi 374epa.pdf: ${srcdir}/epa.texi
373 $(ENVADD) $(TEXI2PDF) $< 375 $(ENVADD) $(TEXI2PDF) ${srcdir}/epa.texi
374 376
375erc : $(infodir)/erc 377erc : $(infodir)/erc
376$(infodir)/erc: erc.texi 378$(infodir)/erc: erc.texi
377 $(mkinfodir) 379 $(mkinfodir)
378 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 380 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) erc.texi
379erc.dvi: ${srcdir}/erc.texi 381erc.dvi: ${srcdir}/erc.texi
380 $(ENVADD) $(TEXI2DVI) $< 382 $(ENVADD) $(TEXI2DVI) ${srcdir}/erc.texi
381erc.pdf: ${srcdir}/erc.texi 383erc.pdf: ${srcdir}/erc.texi
382 $(ENVADD) $(TEXI2PDF) $< 384 $(ENVADD) $(TEXI2PDF) ${srcdir}/erc.texi
383 385
384ert : $(infodir)/ert 386ert : $(infodir)/ert
385$(infodir)/ert: ert.texi 387$(infodir)/ert: ert.texi
386 $(mkinfodir) 388 $(mkinfodir)
387 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 389 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) ert.texi
388ert.dvi: ${srcdir}/ert.texi 390ert.dvi: ${srcdir}/ert.texi
389 $(ENVADD) $(TEXI2DVI) $< 391 $(ENVADD) $(TEXI2DVI) ${srcdir}/ert.texi
390ert.pdf: ${srcdir}/ert.texi 392ert.pdf: ${srcdir}/ert.texi
391 $(ENVADD) $(TEXI2PDF) $< 393 $(ENVADD) $(TEXI2PDF) ${srcdir}/ert.texi
392 394
393eshell : $(infodir)/eshell 395eshell : $(infodir)/eshell
394$(infodir)/eshell: eshell.texi 396$(infodir)/eshell: eshell.texi
395 $(mkinfodir) 397 $(mkinfodir)
396 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 398 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) eshell.texi
397eshell.dvi: ${srcdir}/eshell.texi 399eshell.dvi: ${srcdir}/eshell.texi
398 $(ENVADD) $(TEXI2DVI) $< 400 $(ENVADD) $(TEXI2DVI) ${srcdir}/eshell.texi
399eshell.pdf: ${srcdir}/eshell.texi 401eshell.pdf: ${srcdir}/eshell.texi
400 $(ENVADD) $(TEXI2PDF) $< 402 $(ENVADD) $(TEXI2PDF) ${srcdir}/eshell.texi
401 403
402eudc : $(infodir)/eudc 404eudc : $(infodir)/eudc
403$(infodir)/eudc: eudc.texi 405$(infodir)/eudc: eudc.texi
404 $(mkinfodir) 406 $(mkinfodir)
405 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 407 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) eudc.texi
406eudc.dvi: ${srcdir}/eudc.texi 408eudc.dvi: ${srcdir}/eudc.texi
407 $(ENVADD) $(TEXI2DVI) $< 409 $(ENVADD) $(TEXI2DVI) ${srcdir}/eudc.texi
408eudc.pdf: ${srcdir}/eudc.texi 410eudc.pdf: ${srcdir}/eudc.texi
409 $(ENVADD) $(TEXI2PDF) $< 411 $(ENVADD) $(TEXI2PDF) ${srcdir}/eudc.texi
410 412
411efaq : $(infodir)/efaq 413efaq : $(infodir)/efaq
412$(infodir)/efaq: faq.texi $(emacsdir)/emacsver.texi 414$(infodir)/efaq: faq.texi $(emacsdir)/emacsver.texi
413 $(mkinfodir) 415 $(mkinfodir)
414 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 416 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) faq.texi
415faq.dvi: ${srcdir}/faq.texi $(emacsdir)/emacsver.texi 417faq.dvi: ${srcdir}/faq.texi $(emacsdir)/emacsver.texi
416 $(ENVADD) $(TEXI2DVI) $< 418 $(ENVADD) $(TEXI2DVI) ${srcdir}/faq.texi
417faq.pdf: ${srcdir}/faq.texi $(emacsdir)/emacsver.texi 419faq.pdf: ${srcdir}/faq.texi $(emacsdir)/emacsver.texi
418 $(ENVADD) $(TEXI2PDF) $< 420 $(ENVADD) $(TEXI2PDF) ${srcdir}/faq.texi
419## This is the name used on the Emacs web-page. 421## This is the name used on the Emacs web-page.
420## sed fixes up links to point to split version of the manual. 422## sed fixes up links to point to split version of the manual.
421emacs-faq.html: ${srcdir}/faq.texi $(emacsdir)/emacsver.texi 423emacs-faq.html: ${srcdir}/faq.texi $(emacsdir)/emacsver.texi
422 $(MAKEINFO) $(MAKEINFO_OPTS) --no-split \ 424 $(MAKEINFO) $(MAKEINFO_OPTS) --no-split \
423 --css-ref='/layout.css' --html -o $@ $< 425 --css-ref='/layout.css' --html -o $@ ${srcdir}/faq.texi
424 sed -i -e 's|a href="\([a-z]*\)\.html#\([^"]*\)"|a href="manual/html_node/\1/\2.html"|g' \ 426 sed -i -e 's|a href="\([a-z]*\)\.html#\([^"]*\)"|a href="manual/html_node/\1/\2.html"|g' \
425 -e 's|/Top\.html|/|g' $@ 427 -e 's|/Top\.html|/|g' $@
426emacs-faq.text: ${srcdir}/faq.texi $(emacsdir)/emacsver.texi 428emacs-faq.text: ${srcdir}/faq.texi $(emacsdir)/emacsver.texi
427 $(MAKEINFO) $(MAKEINFO_OPTS) --plaintext -o $@ $< 429 $(MAKEINFO) $(MAKEINFO_OPTS) --plaintext -o $@ ${srcdir}/faq.texi
428 430
429flymake : $(infodir)/flymake 431flymake : $(infodir)/flymake
430$(infodir)/flymake: flymake.texi 432$(infodir)/flymake: flymake.texi
431 $(mkinfodir) 433 $(mkinfodir)
432 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 434 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) flymake.texi
433flymake.dvi: ${srcdir}/flymake.texi 435flymake.dvi: ${srcdir}/flymake.texi
434 $(ENVADD) $(TEXI2DVI) $< 436 $(ENVADD) $(TEXI2DVI) ${srcdir}/flymake.texi
435flymake.pdf: ${srcdir}/flymake.texi 437flymake.pdf: ${srcdir}/flymake.texi
436 $(ENVADD) $(TEXI2PDF) $< 438 $(ENVADD) $(TEXI2PDF) ${srcdir}/flymake.texi
437 439
438forms : $(infodir)/forms 440forms : $(infodir)/forms
439$(infodir)/forms: forms.texi 441$(infodir)/forms: forms.texi
440 $(mkinfodir) 442 $(mkinfodir)
441 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 443 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) forms.texi
442forms.dvi: ${srcdir}/forms.texi 444forms.dvi: ${srcdir}/forms.texi
443 $(ENVADD) $(TEXI2DVI) $< 445 $(ENVADD) $(TEXI2DVI) ${srcdir}/forms.texi
444forms.pdf: ${srcdir}/forms.texi 446forms.pdf: ${srcdir}/forms.texi
445 $(ENVADD) $(TEXI2PDF) $< 447 $(ENVADD) $(TEXI2PDF) ${srcdir}/forms.texi
446 448
447# gnus/message/emacs-mime/sieve/pgg are part of Gnus: 449# gnus/message/emacs-mime/sieve/pgg are part of Gnus:
448gnus : $(infodir)/gnus 450gnus : $(infodir)/gnus
449$(infodir)/gnus: gnus.texi gnus-faq.texi 451$(infodir)/gnus: gnus.texi gnus-faq.texi
450 $(mkinfodir) 452 $(mkinfodir)
451 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 453 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) gnus.texi
452gnus.dvi: ${srcdir}/gnus.texi gnus-faq.texi 454gnus.dvi: ${srcdir}/gnus.texi gnus-faq.texi
453 sed -e '/@iflatex/,/@end iflatex/d' $< > gnustmp.texi 455 sed -e '/@iflatex/,/@end iflatex/d' ${srcdir}/gnus.texi > gnustmp.texi
454 $(ENVADD) $(TEXI2DVI) gnustmp.texi 456 $(ENVADD) $(TEXI2DVI) gnustmp.texi
455 cp gnustmp.dvi $*.dvi 457 cp gnustmp.dvi $*.dvi
456 rm gnustmp.* 458 rm gnustmp.*
457gnus.pdf: ${srcdir}/gnus.texi gnus-faq.texi 459gnus.pdf: ${srcdir}/gnus.texi gnus-faq.texi
458 sed -e '/@iflatex/,/@end iflatex/d' $< > gnustmp.texi 460 sed -e '/@iflatex/,/@end iflatex/d' ${srcdir}/gnus.texi > gnustmp.texi
459 $(ENVADD) $(TEXI2PDF) gnustmp.texi 461 $(ENVADD) $(TEXI2PDF) gnustmp.texi
460 cp gnustmp.pdf $@ 462 cp gnustmp.pdf $@
461 rm gnustmp.* 463 rm gnustmp.*
@@ -465,11 +467,11 @@ gnus.pdf: ${srcdir}/gnus.texi gnus-faq.texi
465idlwave : $(infodir)/idlwave 467idlwave : $(infodir)/idlwave
466$(infodir)/idlwave: idlwave.texi 468$(infodir)/idlwave: idlwave.texi
467 $(mkinfodir) 469 $(mkinfodir)
468 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) --no-split $< 470 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) --no-split idlwave.texi
469idlwave.dvi: ${srcdir}/idlwave.texi 471idlwave.dvi: ${srcdir}/idlwave.texi
470 $(ENVADD) $(TEXI2DVI) $< 472 $(ENVADD) $(TEXI2DVI) ${srcdir}/idlwave.texi
471idlwave.pdf: ${srcdir}/idlwave.texi 473idlwave.pdf: ${srcdir}/idlwave.texi
472 $(ENVADD) $(TEXI2PDF) $< 474 $(ENVADD) $(TEXI2PDF) ${srcdir}/idlwave.texi
473 475
474# The following target uses an explicit -o switch to work around 476# The following target uses an explicit -o switch to work around
475# the @setfilename directive in info.texi, which is required for 477# the @setfilename directive in info.texi, which is required for
@@ -477,227 +479,227 @@ idlwave.pdf: ${srcdir}/idlwave.texi
477###info : $(infodir)/info # circular! 479###info : $(infodir)/info # circular!
478$(infodir)/info: info.texi 480$(infodir)/info: info.texi
479 $(mkinfodir) 481 $(mkinfodir)
480 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) --no-split $< -o $@ 482 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) --no-split -o $@ info.texi
481info.dvi: ${srcdir}/info.texi 483info.dvi: ${srcdir}/info.texi
482 $(ENVADD) $(TEXI2DVI) $< 484 $(ENVADD) $(TEXI2DVI) ${srcdir}/info.texi
483info.pdf: ${srcdir}/info.texi 485info.pdf: ${srcdir}/info.texi
484 $(ENVADD) $(TEXI2PDF) $< 486 $(ENVADD) $(TEXI2PDF) ${srcdir}/info.texi
485 487
486mairix-el : $(infodir)/mairix-el 488mairix-el : $(infodir)/mairix-el
487$(infodir)/mairix-el: mairix-el.texi 489$(infodir)/mairix-el: mairix-el.texi
488 $(mkinfodir) 490 $(mkinfodir)
489 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 491 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) mairix-el.texi
490mairix-el.dvi: ${srcdir}/mairix-el.texi 492mairix-el.dvi: ${srcdir}/mairix-el.texi
491 $(ENVADD) $(TEXI2DVI) $< 493 $(ENVADD) $(TEXI2DVI) ${srcdir}/mairix-el.texi
492mairix-el.pdf: ${srcdir}/mairix-el.texi 494mairix-el.pdf: ${srcdir}/mairix-el.texi
493 $(ENVADD) $(TEXI2PDF) $< 495 $(ENVADD) $(TEXI2PDF) ${srcdir}/mairix-el.texi
494 496
495message : $(infodir)/message 497message : $(infodir)/message
496$(infodir)/message: message.texi 498$(infodir)/message: message.texi
497 $(mkinfodir) 499 $(mkinfodir)
498 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 500 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) message.texi
499message.dvi: ${srcdir}/message.texi 501message.dvi: ${srcdir}/message.texi
500 $(ENVADD) $(TEXI2DVI) $< 502 $(ENVADD) $(TEXI2DVI) ${srcdir}/message.texi
501message.pdf: ${srcdir}/message.texi 503message.pdf: ${srcdir}/message.texi
502 $(ENVADD) $(TEXI2PDF) $< 504 $(ENVADD) $(TEXI2PDF) ${srcdir}/message.texi
503 505
504mh-e : $(infodir)/mh-e 506mh-e : $(infodir)/mh-e
505$(infodir)/mh-e: mh-e.texi 507$(infodir)/mh-e: mh-e.texi
506 $(mkinfodir) 508 $(mkinfodir)
507 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 509 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) mh-e.texi
508mh-e.dvi: ${srcdir}/mh-e.texi 510mh-e.dvi: ${srcdir}/mh-e.texi
509 $(ENVADD) $(TEXI2DVI) $< 511 $(ENVADD) $(TEXI2DVI) ${srcdir}/mh-e.texi
510mh-e.pdf: ${srcdir}/mh-e.texi 512mh-e.pdf: ${srcdir}/mh-e.texi
511 $(ENVADD) $(TEXI2PDF) $< 513 $(ENVADD) $(TEXI2PDF) ${srcdir}/mh-e.texi
512 514
513newsticker : $(infodir)/newsticker 515newsticker : $(infodir)/newsticker
514$(infodir)/newsticker: newsticker.texi 516$(infodir)/newsticker: newsticker.texi
515 $(mkinfodir) 517 $(mkinfodir)
516 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 518 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) newsticker.texi
517newsticker.dvi: ${srcdir}/newsticker.texi 519newsticker.dvi: ${srcdir}/newsticker.texi
518 $(ENVADD) $(TEXI2DVI) $< 520 $(ENVADD) $(TEXI2DVI) ${srcdir}/newsticker.texi
519newsticker.pdf: ${srcdir}/newsticker.texi 521newsticker.pdf: ${srcdir}/newsticker.texi
520 $(ENVADD) $(TEXI2PDF) $< 522 $(ENVADD) $(TEXI2PDF) ${srcdir}/newsticker.texi
521 523
522nxml-mode : $(infodir)/nxml-mode 524nxml-mode : $(infodir)/nxml-mode
523$(infodir)/nxml-mode: nxml-mode.texi 525$(infodir)/nxml-mode: nxml-mode.texi
524 $(mkinfodir) 526 $(mkinfodir)
525 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 527 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) nxml-mode.texi
526nxml-mode.dvi: ${srcdir}/nxml-mode.texi 528nxml-mode.dvi: ${srcdir}/nxml-mode.texi
527 $(ENVADD) $(TEXI2DVI) $< 529 $(ENVADD) $(TEXI2DVI) ${srcdir}/nxml-mode.texi
528nxml-mode.pdf: ${srcdir}/nxml-mode.texi 530nxml-mode.pdf: ${srcdir}/nxml-mode.texi
529 $(ENVADD) $(TEXI2PDF) $< 531 $(ENVADD) $(TEXI2PDF) ${srcdir}/nxml-mode.texi
530 532
531org : $(infodir)/org 533org : $(infodir)/org
532$(infodir)/org: org.texi 534$(infodir)/org: org.texi
533 $(mkinfodir) 535 $(mkinfodir)
534 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 536 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) org.texi
535org.dvi: ${srcdir}/org.texi 537org.dvi: ${srcdir}/org.texi
536 $(ENVADD) $(TEXI2DVI) $< 538 $(ENVADD) $(TEXI2DVI) ${srcdir}/org.texi
537org.pdf: ${srcdir}/org.texi 539org.pdf: ${srcdir}/org.texi
538 $(ENVADD) $(TEXI2PDF) $< 540 $(ENVADD) $(TEXI2PDF) ${srcdir}/org.texi
539 541
540pcl-cvs : $(infodir)/pcl-cvs 542pcl-cvs : $(infodir)/pcl-cvs
541$(infodir)/pcl-cvs: pcl-cvs.texi 543$(infodir)/pcl-cvs: pcl-cvs.texi
542 $(mkinfodir) 544 $(mkinfodir)
543 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 545 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) pcl-cvs.texi
544pcl-cvs.dvi: ${srcdir}/pcl-cvs.texi 546pcl-cvs.dvi: ${srcdir}/pcl-cvs.texi
545 $(ENVADD) $(TEXI2DVI) $< 547 $(ENVADD) $(TEXI2DVI) ${srcdir}/pcl-cvs.texi
546pcl-cvs.pdf: ${srcdir}/pcl-cvs.texi 548pcl-cvs.pdf: ${srcdir}/pcl-cvs.texi
547 $(ENVADD) $(TEXI2PDF) $< 549 $(ENVADD) $(TEXI2PDF) ${srcdir}/pcl-cvs.texi
548 550
549pgg : $(infodir)/pgg 551pgg : $(infodir)/pgg
550$(infodir)/pgg: pgg.texi 552$(infodir)/pgg: pgg.texi
551 $(mkinfodir) 553 $(mkinfodir)
552 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 554 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) pgg.texi
553pgg.dvi: ${srcdir}/pgg.texi 555pgg.dvi: ${srcdir}/pgg.texi
554 $(ENVADD) $(TEXI2DVI) $< 556 $(ENVADD) $(TEXI2DVI) ${srcdir}/pgg.texi
555pgg.pdf: ${srcdir}/pgg.texi 557pgg.pdf: ${srcdir}/pgg.texi
556 $(ENVADD) $(TEXI2PDF) $< 558 $(ENVADD) $(TEXI2PDF) ${srcdir}/pgg.texi
557 559
558rcirc : $(infodir)/rcirc 560rcirc : $(infodir)/rcirc
559$(infodir)/rcirc: rcirc.texi 561$(infodir)/rcirc: rcirc.texi
560 $(mkinfodir) 562 $(mkinfodir)
561 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 563 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) rcirc.texi
562rcirc.dvi: ${srcdir}/rcirc.texi 564rcirc.dvi: ${srcdir}/rcirc.texi
563 $(ENVADD) $(TEXI2DVI) $< 565 $(ENVADD) $(TEXI2DVI) ${srcdir}/rcirc.texi
564rcirc.pdf: ${srcdir}/rcirc.texi 566rcirc.pdf: ${srcdir}/rcirc.texi
565 $(ENVADD) $(TEXI2PDF) $< 567 $(ENVADD) $(TEXI2PDF) ${srcdir}/rcirc.texi
566 568
567reftex : $(infodir)/reftex 569reftex : $(infodir)/reftex
568$(infodir)/reftex: reftex.texi 570$(infodir)/reftex: reftex.texi
569 $(mkinfodir) 571 $(mkinfodir)
570 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 572 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) reftex.texi
571reftex.dvi: ${srcdir}/reftex.texi 573reftex.dvi: ${srcdir}/reftex.texi
572 $(ENVADD) $(TEXI2DVI) $< 574 $(ENVADD) $(TEXI2DVI) ${srcdir}/reftex.texi
573reftex.pdf: ${srcdir}/reftex.texi 575reftex.pdf: ${srcdir}/reftex.texi
574 $(ENVADD) $(TEXI2PDF) $< 576 $(ENVADD) $(TEXI2PDF) ${srcdir}/reftex.texi
575 577
576remember : $(infodir)/remember 578remember : $(infodir)/remember
577$(infodir)/remember: remember.texi 579$(infodir)/remember: remember.texi
578 $(mkinfodir) 580 $(mkinfodir)
579 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 581 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) remember.texi
580remember.dvi: ${srcdir}/remember.texi 582remember.dvi: ${srcdir}/remember.texi
581 $(ENVADD) $(TEXI2DVI) $< 583 $(ENVADD) $(TEXI2DVI) ${srcdir}/remember.texi
582remember.pdf: ${srcdir}/remember.texi 584remember.pdf: ${srcdir}/remember.texi
583 $(ENVADD) $(TEXI2PDF) $< 585 $(ENVADD) $(TEXI2PDF) ${srcdir}/remember.texi
584 586
585sasl : $(infodir)/sasl 587sasl : $(infodir)/sasl
586$(infodir)/sasl: sasl.texi 588$(infodir)/sasl: sasl.texi
587 $(mkinfodir) 589 $(mkinfodir)
588 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 590 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) sasl.texi
589sasl.dvi: ${srcdir}/sasl.texi 591sasl.dvi: ${srcdir}/sasl.texi
590 $(ENVADD) $(TEXI2DVI) $< 592 $(ENVADD) $(TEXI2DVI) ${srcdir}/sasl.texi
591sasl.pdf: ${srcdir}/sasl.texi 593sasl.pdf: ${srcdir}/sasl.texi
592 $(ENVADD) $(TEXI2PDF) $< 594 $(ENVADD) $(TEXI2PDF) ${srcdir}/sasl.texi
593 595
594sc : $(infodir)/sc 596sc : $(infodir)/sc
595$(infodir)/sc: sc.texi 597$(infodir)/sc: sc.texi
596 $(mkinfodir) 598 $(mkinfodir)
597 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 599 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) sc.texi
598sc.dvi: ${srcdir}/sc.texi 600sc.dvi: ${srcdir}/sc.texi
599 $(ENVADD) $(TEXI2DVI) $< 601 $(ENVADD) $(TEXI2DVI) ${srcdir}/sc.texi
600sc.pdf: ${srcdir}/sc.texi 602sc.pdf: ${srcdir}/sc.texi
601 $(ENVADD) $(TEXI2PDF) $< 603 $(ENVADD) $(TEXI2PDF) ${srcdir}/sc.texi
602 604
603semantic : $(infodir)/semantic 605semantic : $(infodir)/semantic
604$(infodir)/semantic: semantic.texi sem-user.texi 606$(infodir)/semantic: semantic.texi sem-user.texi
605 $(mkinfodir) 607 $(mkinfodir)
606 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 608 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) semantic.texi
607semantic.dvi: ${srcdir}/semantic.texi sem-user.texi 609semantic.dvi: ${srcdir}/semantic.texi sem-user.texi
608 $(ENVADD) $(TEXI2DVI) $< 610 $(ENVADD) $(TEXI2DVI) ${srcdir}/semantic.texi
609semantic.pdf: ${srcdir}/semantic.texi sem-user.texi 611semantic.pdf: ${srcdir}/semantic.texi sem-user.texi
610 $(ENVADD) $(TEXI2PDF) $< 612 $(ENVADD) $(TEXI2PDF) ${srcdir}/semantic.texi
611 613
612ses : $(infodir)/ses 614ses : $(infodir)/ses
613$(infodir)/ses: ses.texi 615$(infodir)/ses: ses.texi
614 $(mkinfodir) 616 $(mkinfodir)
615 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 617 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) ses.texi
616ses.dvi: ${srcdir}/ses.texi 618ses.dvi: ${srcdir}/ses.texi
617 $(ENVADD) $(TEXI2DVI) $< 619 $(ENVADD) $(TEXI2DVI) ${srcdir}/ses.texi
618ses.pdf: ${srcdir}/ses.texi 620ses.pdf: ${srcdir}/ses.texi
619 $(ENVADD) $(TEXI2PDF) $< 621 $(ENVADD) $(TEXI2PDF) ${srcdir}/ses.texi
620 622
621sieve : $(infodir)/sieve 623sieve : $(infodir)/sieve
622$(infodir)/sieve: sieve.texi 624$(infodir)/sieve: sieve.texi
623 $(mkinfodir) 625 $(mkinfodir)
624 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 626 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) sieve.texi
625sieve.dvi: ${srcdir}/sieve.texi 627sieve.dvi: ${srcdir}/sieve.texi
626 $(ENVADD) $(TEXI2DVI) $< 628 $(ENVADD) $(TEXI2DVI) ${srcdir}/sieve.texi
627sieve.pdf: ${srcdir}/sieve.texi 629sieve.pdf: ${srcdir}/sieve.texi
628 $(ENVADD) $(TEXI2PDF) $< 630 $(ENVADD) $(TEXI2PDF) ${srcdir}/sieve.texi
629 631
630smtpmail : $(infodir)/smtpmail 632smtpmail : $(infodir)/smtpmail
631$(infodir)/smtpmail: smtpmail.texi 633$(infodir)/smtpmail: smtpmail.texi
632 $(mkinfodir) 634 $(mkinfodir)
633 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 635 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) smtpmail.texi
634smtpmail.dvi: ${srcdir}/smtpmail.texi 636smtpmail.dvi: ${srcdir}/smtpmail.texi
635 $(ENVADD) $(TEXI2DVI) $< 637 $(ENVADD) $(TEXI2DVI) ${srcdir}/smtpmail.texi
636smtpmail.pdf: ${srcdir}/smtpmail.texi 638smtpmail.pdf: ${srcdir}/smtpmail.texi
637 $(ENVADD) $(TEXI2PDF) $< 639 $(ENVADD) $(TEXI2PDF) ${srcdir}/smtpmail.texi
638 640
639speedbar : $(infodir)/speedbar 641speedbar : $(infodir)/speedbar
640$(infodir)/speedbar: speedbar.texi 642$(infodir)/speedbar: speedbar.texi
641 $(mkinfodir) 643 $(mkinfodir)
642 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 644 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) speedbar.texi
643speedbar.dvi: ${srcdir}/speedbar.texi 645speedbar.dvi: ${srcdir}/speedbar.texi
644 $(ENVADD) $(TEXI2DVI) $< 646 $(ENVADD) $(TEXI2DVI) ${srcdir}/speedbar.texi
645speedbar.pdf: ${srcdir}/speedbar.texi 647speedbar.pdf: ${srcdir}/speedbar.texi
646 $(ENVADD) $(TEXI2PDF) $< 648 $(ENVADD) $(TEXI2PDF) ${srcdir}/speedbar.texi
647 649
648tramp : $(infodir)/tramp 650tramp : $(infodir)/tramp
649$(infodir)/tramp: tramp.texi trampver.texi 651$(infodir)/tramp: tramp.texi trampver.texi
650 $(mkinfodir) 652 $(mkinfodir)
651 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) -D emacs $< 653 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) -D emacs tramp.texi
652tramp.dvi: ${srcdir}/tramp.texi trampver.texi 654tramp.dvi: ${srcdir}/tramp.texi trampver.texi
653 $(ENVADD) $(TEXI2DVI) $< 655 $(ENVADD) $(TEXI2DVI) ${srcdir}/tramp.texi
654tramp.pdf: ${srcdir}/tramp.texi trampver.texi 656tramp.pdf: ${srcdir}/tramp.texi trampver.texi
655 $(ENVADD) $(TEXI2PDF) $< 657 $(ENVADD) $(TEXI2PDF) ${srcdir}/tramp.texi
656 658
657url : $(infodir)/url 659url : $(infodir)/url
658$(infodir)/url: url.texi 660$(infodir)/url: url.texi
659 $(mkinfodir) 661 $(mkinfodir)
660 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 662 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) url.texi
661url.dvi: ${srcdir}/url.texi 663url.dvi: ${srcdir}/url.texi
662 $(ENVADD) $(TEXI2DVI) $< 664 $(ENVADD) $(TEXI2DVI) ${srcdir}/url.texi
663url.pdf: ${srcdir}/url.texi 665url.pdf: ${srcdir}/url.texi
664 $(ENVADD) $(TEXI2PDF) $< 666 $(ENVADD) $(TEXI2PDF) ${srcdir}/url.texi
665 667
666vip : $(infodir)/vip 668vip : $(infodir)/vip
667$(infodir)/vip: vip.texi 669$(infodir)/vip: vip.texi
668 $(mkinfodir) 670 $(mkinfodir)
669 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 671 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) vip.texi
670vip.dvi: ${srcdir}/vip.texi 672vip.dvi: ${srcdir}/vip.texi
671 $(ENVADD) $(TEXI2DVI) $< 673 $(ENVADD) $(TEXI2DVI) ${srcdir}/vip.texi
672vip.pdf: ${srcdir}/vip.texi 674vip.pdf: ${srcdir}/vip.texi
673 $(ENVADD) $(TEXI2PDF) $< 675 $(ENVADD) $(TEXI2PDF) ${srcdir}/vip.texi
674 676
675viper : $(infodir)/viper 677viper : $(infodir)/viper
676$(infodir)/viper: viper.texi 678$(infodir)/viper: viper.texi
677 $(mkinfodir) 679 $(mkinfodir)
678 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 680 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) viper.texi
679viper.dvi: ${srcdir}/viper.texi 681viper.dvi: ${srcdir}/viper.texi
680 $(ENVADD) $(TEXI2DVI) $< 682 $(ENVADD) $(TEXI2DVI) ${srcdir}/viper.texi
681viper.pdf: ${srcdir}/viper.texi 683viper.pdf: ${srcdir}/viper.texi
682 $(ENVADD) $(TEXI2PDF) $< 684 $(ENVADD) $(TEXI2PDF) ${srcdir}/viper.texi
683 685
684widget : $(infodir)/widget 686widget : $(infodir)/widget
685$(infodir)/widget: widget.texi 687$(infodir)/widget: widget.texi
686 $(mkinfodir) 688 $(mkinfodir)
687 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 689 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) widget.texi
688widget.dvi: ${srcdir}/widget.texi 690widget.dvi: ${srcdir}/widget.texi
689 $(ENVADD) $(TEXI2DVI) $< 691 $(ENVADD) $(TEXI2DVI) ${srcdir}/widget.texi
690widget.pdf: ${srcdir}/widget.texi 692widget.pdf: ${srcdir}/widget.texi
691 $(ENVADD) $(TEXI2PDF) $< 693 $(ENVADD) $(TEXI2PDF) ${srcdir}/widget.texi
692 694
693woman : $(infodir)/woman 695woman : $(infodir)/woman
694$(infodir)/woman: woman.texi 696$(infodir)/woman: woman.texi
695 $(mkinfodir) 697 $(mkinfodir)
696 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< 698 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) woman.texi
697woman.dvi: ${srcdir}/woman.texi 699woman.dvi: ${srcdir}/woman.texi
698 $(ENVADD) $(TEXI2DVI) $< 700 $(ENVADD) $(TEXI2DVI) ${srcdir}/woman.texi
699woman.pdf: ${srcdir}/woman.texi 701woman.pdf: ${srcdir}/woman.texi
700 $(ENVADD) $(TEXI2PDF) $< 702 $(ENVADD) $(TEXI2PDF) ${srcdir}/woman.texi
701 703
702 704
703.PHONY: mostlyclean clean distclean maintainer-clean 705.PHONY: mostlyclean clean distclean maintainer-clean
diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi
index 1a192123c3e..58420bbd99c 100644
--- a/doc/misc/cc-mode.texi
+++ b/doc/misc/cc-mode.texi
@@ -5195,7 +5195,7 @@ indentation.
5195@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 5195@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
5196 5196
5197This section explains the structure and semantics of the style 5197This section explains the structure and semantics of the style
5198variable @code{c-offset-alist}, the principal variable for configuring 5198variable @code{c-offsets-alist}, the principal variable for configuring
5199indentation. Details of how to set it up, and its relationship to 5199indentation. Details of how to set it up, and its relationship to
5200@ccmode{}'s style system are given in @ref{Style Variables}. 5200@ccmode{}'s style system are given in @ref{Style Variables}.
5201 5201
diff --git a/doc/misc/faq.texi b/doc/misc/faq.texi
index 5b7bb7ec9ce..0f20c41c8eb 100644
--- a/doc/misc/faq.texi
+++ b/doc/misc/faq.texi
@@ -942,6 +942,7 @@ status of its latest version.
942@menu 942@menu
943* Origin of the term Emacs:: 943* Origin of the term Emacs::
944* Latest version of Emacs:: 944* Latest version of Emacs::
945* New in Emacs 24::
945* New in Emacs 23:: 946* New in Emacs 23::
946* New in Emacs 22:: 947* New in Emacs 22::
947* New in Emacs 21:: 948* New in Emacs 21::
@@ -1009,12 +1010,84 @@ Emacs, type @kbd{C-h C-n} (@kbd{M-x view-emacs-news}). As of Emacs 22,
1009you can give this command a prefix argument to read about which features 1010you can give this command a prefix argument to read about which features
1010were new in older versions. 1011were new in older versions.
1011 1012
1013@node New in Emacs 24
1014@section What is different about Emacs 24?
1015@cindex Differences between Emacs 23 and Emacs 24
1016@cindex Emacs 24, new features in
1017
1018@itemize
1019@cindex packages, installing more
1020@item
1021Emacs now includes a package manager. Type @kbd{M-x list-packages} to
1022get started. You can use this to download and automatically install
1023many more Lisp packages.
1024
1025@cindex lexical binding
1026@item
1027Emacs Lisp now supports lexical binding on a per-file basis. In
1028@emph{lexical binding}, variable references must be located textually
1029within the binding construct. This contrasts with @emph{dynamic
1030binding}, where programs can refer to variables defined outside their
1031local textual scope. A Lisp file can use a local variable setting of
1032@code{lexical-binding: t} to indicate that the contents should be
1033interpreted using lexical binding. See the Emacs Lisp Reference
1034Manual for more details.
1035
1036@cindex bidirectional display
1037@cindex right-to-left languages
1038@item
1039Some human languages, such as English, are written from left to right.
1040Others, such as Arabic, are written from right to left. Emacs now has
1041support for any mixture of these forms---this is ``bidirectional text''.
1042
1043@item
1044Handling of text selections has been improved, and now integrates
1045better with external clipboards.
1046
1047@cindex themes
1048@item
1049A new command @kbd{customize-themes} allows you to easily change the
1050appearance of your Emacs.
1051
1052@item
1053Emacs can be compiled with the Gtk+ 3 toolkit.
1054
1055@item
1056Support for several new external libraries can be included at compile
1057time:
1058
1059@itemize
1060
1061@item
1062``Security-Enhanced Linux'' (SELinux) is a Linux kernel feature that
1063provides more sophisticated file access controls than ordinary
1064``Unix-style'' file permissions.
1065
1066@item
1067The ImageMagick display library. This allows you to display many more
1068image format in Emacs, as well as carry out transformations such as
1069rotations.
1070
1071@item
1072The GnuTLS library for secure network communications. Emacs uses this
1073transparently for email if your mail server supports it.
1074
1075@item
1076The libxml2 library for parsing XML structures.
1077@end itemize
1078
1079@item
1080Much more flexibility in the handling of windows and buffer display.
1081
1082@end itemize
1083
1084As always, consult the @file{NEWS} file for more information.
1085
1086
1012@node New in Emacs 23 1087@node New in Emacs 23
1013@section What is different about Emacs 23? 1088@section What is different about Emacs 23?
1014@cindex Differences between Emacs 22 and Emacs 23 1089@cindex Differences between Emacs 22 and Emacs 23
1015@cindex Emacs 23, new features in 1090@cindex Emacs 23, new features in
1016@cindex Recently introduced features
1017@cindex Default features
1018 1091
1019@itemize 1092@itemize
1020 1093
@@ -1065,8 +1138,7 @@ Other changes include: support for serial port access; D-Bus bindings; a
1065new Visual Line mode for line-motion; improved completion; a new mode 1138new Visual Line mode for line-motion; improved completion; a new mode
1066(@samp{DocView}) for viewing of PDF, PostScript, and DVI documents; nXML 1139(@samp{DocView}) for viewing of PDF, PostScript, and DVI documents; nXML
1067mode (for editing XML documents) is included; VC has been updated for 1140mode (for editing XML documents) is included; VC has been updated for
1068newer version control systems; etc. As always, consult the @file{NEWS} 1141newer version control systems; etc.
1069file for more information.
1070 1142
1071 1143
1072@node New in Emacs 22 1144@node New in Emacs 22
@@ -3225,6 +3297,14 @@ see @ref{Packages that do not come with Emacs}.
3225@cindex Emacs Lisp List 3297@cindex Emacs Lisp List
3226@cindex Emacs Lisp Archive 3298@cindex Emacs Lisp Archive
3227 3299
3300Your first port of call should be the @kbd{M-x list-packages} command.
3301This connects to the @uref{http:///elpa.gnu.org, GNU ELPA} (``Emacs
3302Lisp Package Archive'') server and fetches the list of additional
3303packages that it offers. These are GNU packages that are available
3304for use with Emacs, but are distributed separately. Select a package
3305to get more details about the features that it offers, and then if you
3306wish, Emacs can download and automatically install it for you.
3307
3228@uref{http://www.damtp.cam.ac.uk/user/sje30/emacs/ell.html, The Emacs Lisp 3308@uref{http://www.damtp.cam.ac.uk/user/sje30/emacs/ell.html, The Emacs Lisp
3229List (ELL)}, maintained by @email{S.J.Eglen@@damtp.cam.ac.uk, Stephen Eglen}, 3309List (ELL)}, maintained by @email{S.J.Eglen@@damtp.cam.ac.uk, Stephen Eglen},
3230aims to provide one compact list with links to all of the current Emacs 3310aims to provide one compact list with links to all of the current Emacs
diff --git a/doc/misc/org.texi b/doc/misc/org.texi
index e033a47aa96..67633e1acac 100644
--- a/doc/misc/org.texi
+++ b/doc/misc/org.texi
@@ -4,8 +4,8 @@
4@setfilename ../../info/org 4@setfilename ../../info/org
5@settitle The Org Manual 5@settitle The Org Manual
6 6
7@set VERSION 7.8.07 7@set VERSION 7.8.09
8@set DATE March 2012 8@set DATE April 2012
9 9
10@c Use proper quote and backtick for code sections in PDF output 10@c Use proper quote and backtick for code sections in PDF output
11@c Cf. Texinfo manual 14.2 11@c Cf. Texinfo manual 14.2
@@ -5698,8 +5698,8 @@ until the entry is marked DONE. An example:
5698 5698
5699@example 5699@example
5700*** TODO write article about the Earth for the Guide 5700*** TODO write article about the Earth for the Guide
5701 The editor in charge is [[bbdb:Ford Prefect]]
5702 DEADLINE: <2004-02-29 Sun> 5701 DEADLINE: <2004-02-29 Sun>
5702 The editor in charge is [[bbdb:Ford Prefect]]
5703@end example 5703@end example
5704 5704
5705You can specify a different lead time for warnings for a specific 5705You can specify a different lead time for warnings for a specific
@@ -7852,9 +7852,9 @@ the other commands, the cursor needs to be in the desired line.
7852@tsubheading{Motion} 7852@tsubheading{Motion}
7853@cindex motion commands in agenda 7853@cindex motion commands in agenda
7854@orgcmd{n,org-agenda-next-line} 7854@orgcmd{n,org-agenda-next-line}
7855Next line (same as @key{up} and @kbd{C-p}). 7855Next line (same as @key{down} and @kbd{C-n}).
7856@orgcmd{p,org-agenda-previous-line} 7856@orgcmd{p,org-agenda-previous-line}
7857Previous line (same as @key{down} and @kbd{C-n}). 7857Previous line (same as @key{up} and @kbd{C-p}).
7858@tsubheading{View/Go to Org file} 7858@tsubheading{View/Go to Org file}
7859@orgcmdkkc{@key{SPC},mouse-3,org-agenda-show-and-scroll-up} 7859@orgcmdkkc{@key{SPC},mouse-3,org-agenda-show-and-scroll-up}
7860Display the original location of the item in another window. 7860Display the original location of the item in another window.
@@ -9537,12 +9537,12 @@ the web, while the XOXO format provides a solid base for exchange with a
9537broad range of other applications. @LaTeX{} export lets you use Org mode and 9537broad range of other applications. @LaTeX{} export lets you use Org mode and
9538its structured editing functions to easily create @LaTeX{} files. DocBook 9538its structured editing functions to easily create @LaTeX{} files. DocBook
9539export makes it possible to convert Org files to many other formats using 9539export makes it possible to convert Org files to many other formats using
9540DocBook tools. OpenDocument Text(ODT) export allows seamless 9540DocBook tools. OpenDocument Text (ODT) export allows seamless
9541collaboration across organizational boundaries. For project management you 9541collaboration across organizational boundaries. For project management you
9542can create gantt and resource charts by using TaskJuggler export. To 9542can create gantt and resource charts by using TaskJuggler export. To
9543incorporate entries with associated times like deadlines or appointments into 9543incorporate entries with associated times like deadlines or appointments into
9544a desktop calendar program like iCal, Org mode can also produce extracts in 9544a desktop calendar program like iCal, Org mode can also produce extracts in
9545the iCalendar format. Currently Org mode only supports export, not import of 9545the iCalendar format. Currently, Org mode only supports export, not import of
9546these different formats. 9546these different formats.
9547 9547
9548Org supports export of selected regions when @code{transient-mark-mode} is 9548Org supports export of selected regions when @code{transient-mark-mode} is
@@ -10869,10 +10869,10 @@ one format (say @samp{csv}) to another format (say @samp{ods} or @samp{xls}).
10869If you have a working installation of LibreOffice, a document converter is 10869If you have a working installation of LibreOffice, a document converter is
10870pre-configured for you and you can use it right away. If you would like to 10870pre-configured for you and you can use it right away. If you would like to
10871use @file{unoconv} as your preferred converter, customize the variable 10871use @file{unoconv} as your preferred converter, customize the variable
10872@code{org-export-odt-convert-process} to point to @code{unoconv}. If you 10872@code{org-export-odt-convert-process} to point to @code{unoconv}. You can
10873would like to use a converter of your own choosing or tweak the default 10873also use your own favorite converter or tweak the default settings of the
10874settings of the default @file{LibreOffice} and @samp{unoconv} converters 10874@file{LibreOffice} and @samp{unoconv} converters. @xref{Configuring a
10875@xref{Configuring a document converter}. 10875document converter}.
10876 10876
10877@subsubsection Automatically exporting to other formats 10877@subsubsection Automatically exporting to other formats
10878@anchor{x-export-to-other-formats} 10878@anchor{x-export-to-other-formats}
@@ -11206,7 +11206,7 @@ that the @file{dvipng} program be available on your system.
11206 11206
11207For various reasons, you may find embedding @LaTeX{} math snippets in an 11207For various reasons, you may find embedding @LaTeX{} math snippets in an
11208ODT document less than reliable. In that case, you can embed a 11208ODT document less than reliable. In that case, you can embed a
11209math equation by linking to its MathML(@file{.mml}) source or its 11209math equation by linking to its MathML (@file{.mml}) source or its
11210OpenDocument formula (@file{.odf}) file as shown below: 11210OpenDocument formula (@file{.odf}) file as shown below:
11211 11211
11212@example 11212@example
@@ -11269,7 +11269,7 @@ Illustration 2: Bell curve
11269Export of literal examples (@pxref{Literal examples}) with full fontification 11269Export of literal examples (@pxref{Literal examples}) with full fontification
11270is supported. Internally, the exporter relies on @file{htmlfontify.el} to 11270is supported. Internally, the exporter relies on @file{htmlfontify.el} to
11271generate all style definitions needed for a fancy listing.@footnote{Your 11271generate all style definitions needed for a fancy listing.@footnote{Your
11272@file{htmlfontify.el} library must atleast be at Emacs 24.1 levels for 11272@file{htmlfontify.el} library must at least be at Emacs 24.1 levels for
11273fontification to be turned on.} The auto-generated styles have @samp{OrgSrc} 11273fontification to be turned on.} The auto-generated styles have @samp{OrgSrc}
11274as prefix and inherit their color from the faces used by Emacs 11274as prefix and inherit their color from the faces used by Emacs
11275@code{font-lock} library for the source language. 11275@code{font-lock} library for the source language.
@@ -11318,10 +11318,9 @@ the variable @code{org-export-odt-convert-processes}. Also specify how the
11318converter can be invoked via command-line to effect the conversion. 11318converter can be invoked via command-line to effect the conversion.
11319 11319
11320@item Configure its capabilities 11320@item Configure its capabilities
11321@vindex org-export-odt-convert-capabilities
11322 11321
11322@vindex org-export-odt-convert-capabilities
11323@anchor{x-odt-converter-capabilities} 11323@anchor{x-odt-converter-capabilities}
11324
11325Specify the set of formats the converter can handle by customizing the 11324Specify the set of formats the converter can handle by customizing the
11326variable @code{org-export-odt-convert-capabilities}. Use the default value 11325variable @code{org-export-odt-convert-capabilities}. Use the default value
11327for this variable as a guide for configuring your converter. As suggested by 11326for this variable as a guide for configuring your converter. As suggested by
@@ -11460,7 +11459,7 @@ regular text.
11460@end example 11459@end example
11461 11460
11462@strong{Hint:} To see the above example in action, edit your 11461@strong{Hint:} To see the above example in action, edit your
11463@file{styles.xml}(@pxref{x-orgodtstyles-xml,,Factory styles}) and add a 11462@file{styles.xml} (@pxref{x-orgodtstyles-xml,,Factory styles}) and add a
11464custom @samp{Highlight} style as shown below. 11463custom @samp{Highlight} style as shown below.
11465 11464
11466@example 11465@example
@@ -11479,7 +11478,7 @@ directive. For example, to force a page break do the following:
11479@end example 11478@end example
11480 11479
11481@strong{Hint:} To see the above example in action, edit your 11480@strong{Hint:} To see the above example in action, edit your
11482@file{styles.xml}(@pxref{x-orgodtstyles-xml,,Factory styles}) and add a 11481@file{styles.xml} (@pxref{x-orgodtstyles-xml,,Factory styles}) and add a
11483custom @samp{PageBreak} style as shown below. 11482custom @samp{PageBreak} style as shown below.
11484 11483
11485@example 11484@example
diff --git a/etc/CONTRIBUTE b/etc/CONTRIBUTE
index 06b9a9e45a5..aff350f9642 100644
--- a/etc/CONTRIBUTE
+++ b/etc/CONTRIBUTE
@@ -1,4 +1,4 @@
1Copyright (C) 2006-2012 Free Software Foundation, Inc. 1Copyright (C) 2006-2012 Free Software Foundation, Inc.
2See end for license conditions. 2See end for license conditions.
3 3
4 4
@@ -44,13 +44,24 @@ Ref: The "Tips" Appendix in the Emacs Lisp Reference.
44 44
45* Copyright Assignment 45* Copyright Assignment
46 46
47We can accept small changes (roughly, fewer than 15 lines) without 47The FSF (Free Software Foundation) is the copyright holder for GNU Emacs.
48legal papers. Anything more substantial requires a copyright 48The FSF is a nonprofit with a worldwide mission to promote computer
49disclaimer or assignment (the latter is preferred, especially for 49user freedom and to defend the rights of all free software users.
50larger changes). Both of these involved filling out a short form and 50For general information, see the website http://www.fsf.org/ .
51filing it with the FSF. The process is straightforward -- contact us 51
52at emacs-devel@gnu.org to obtain the relevant forms. 52Generally speaking, for non-trivial contributions to GNU Emacs we
53require that the copyright be assigned to the FSF. For the reasons
54behind this, see: http://www.gnu.org/licenses/why-assign.html .
53 55
56Copyright assignment is a simple process. If you live in the US, you
57can do it entirely electronically. We can help you get started, and
58answer any questions you may have (or point you to the people with the
59answers), at the emacs-devel@gnu.org mailing list.
60
61A copyright disclaimer is also a possibility, but we prefer an assignment.
62We can accept small changes (roughly, fewer than 15 lines) without
63an assignment. This is a cumulative limit (e.g. three separate 5 line
64patches) over all your contributions.
54 65
55* Getting the Source Code 66* Getting the Source Code
56 67
diff --git a/etc/ChangeLog b/etc/ChangeLog
index adc4c941212..f2cdfb83c44 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,3 +1,13 @@
12012-04-20 Glenn Morris <rgm@gnu.org>
2
3 * CONTRIBUTE: Expand a bit on copyright assignments.
4
5 * MORE.STUFF: General update. Mention list-packages.
6 Remove many old/outdated URLs.
72012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
8
9 * publicsuffix.txt: New file (bug#1401).
10
12012-04-02 Alan Mackenzie <acm@muc.de> 112012-04-02 Alan Mackenzie <acm@muc.de>
2 12
3 * NEWS: Add CC Mode entries. 13 * NEWS: Add CC Mode entries.
diff --git a/etc/MORE.STUFF b/etc/MORE.STUFF
index 84a34d24585..06e0870e4ce 100644
--- a/etc/MORE.STUFF
+++ b/etc/MORE.STUFF
@@ -1,99 +1,87 @@
1More Neat Stuff for your Emacs 1More Neat Stuff for your Emacs
2 2
3Copyright (C) 1993, 1999, 2001-2012 Free Software Foundation, Inc. 3Copyright (C) 1993, 1999, 2001-2012 Free Software Foundation, Inc.
4See the end of the file for license conditions. 4See the end of the file for license conditions.
5 5
6This file describes GNU Emacs programs and resources that are 6The easiest way to add more features to your Emacs is to use the command
7maintained by other people. Some of these may become part of the 7M-x list-packages. This contacts the server at <URL:http://elpa.gnu.org>,
8Emacs distribution in the future. Others we unfortunately can't 8where many Emacs Lisp packages are stored. These are distributed
9distribute, even though they are free software, because we lack legal 9separately from Emacs itself for reasons of space, etc. You can browse
10papers for copyright purposes. Also included are sites where 10the resulting *Packages* buffer to see what is available, and then
11development versions of some packages distributed with Emacs may be 11Emacs can automatically download and install the packages that you
12found. 12select. See the section "Emacs Lisp Packages" in the Emacs manual
13for more details.
13 14
14You might also look at the Emacs web page 15Below we describe some GNU Emacs programs and resources that are
15<URL:http://www.gnu.org/software/emacs/emacs.html>. If you use the 16maintained by other people. Some of these may become part of the
16Windows-32 version of Emacs, see the NTEmacs sites listed in the FAQ. 17Emacs distribution, or GNU ELPA, in the future. Others we unfortunately
18can't distribute, even though they are free software, because we lack
19legal papers for copyright purposes.
17 20
18Please submit a bug report if you find that any of the addresses 21Also listed are sites where development versions of some packages
19listed here fail. 22distributed with Emacs may be found.
20 23
21* The `Emacs Lisp List' at 24It is difficult to keep this file up-to-date, and it only lists a fraction
22 <URL:http://www.damtp.cam.ac.uk/user/eglen/emacs/ell.html> has pointers 25of the Emacs modes that are available. If you are interested in
23 to sources of a large number of packages. 26a particular feature, then after checking Emacs itself and GNU ELPA,
27a web search is often the best way to find results.
24 28
25* gnu.emacs.sources 29* The gnu-emacs-sources mailing list
30 <URL:https://lists.gnu.org/mailman/listinfo/gnu-emacs-sources>
31 which is gatewayed to the gnu.emacs.sources newsgroup (although the
32 connection between the two can be unreliable) is an official
33 place where people can post or announce their extensions to Emacs.
26 34
27Packages posted to the gnu.emacs.sources newsgroup (see 35* The `Emacs Lisp List' at
28etc/MAILINGLISTS) might be archived specifically (try a web search 36 <URL:http://www.damtp.cam.ac.uk/user/sje30/emacs/ell.html> has pointers
29engine) or retrievable from general Usenet archive services. 37 to sources of a large number of packages. Unfortunately, at the time
38 of writing it seems to no longer be updating.
30 39
31* emacswiki.org 40* emacswiki.org
41 The Emacs Wiki has an area for storing elisp files
42 <URL:http://www.emacswiki.org/cgi-bin/wiki/ElispArea>.
32 43
33The Emacs Wiki has an area for storing elisp files 44* WikEmacs
34<URL:http://www.emacswiki.org/cgi-bin/wiki/ElispArea>. 45 <URL:http://wikemacs.org> is an alternative wiki for Emacs.
35
36* Emacs tutorials and manuals
37 46
38 * Emacs slides and tutorials can be found here: 47* Emacs slides and tutorials can be found here:
39 <URL:http://web.psung.name/emacs/> 48 <URL:http://web.psung.name/emacs/>
40 49
41* Maintenance versions of some packages distributed with Emacs 50* Maintenance versions of some packages distributed with Emacs
42 51
43You might find bug-fixes or enhancements in these places. 52You might find bug-fixes or enhancements in these places.
53In many cases, however, development of these packages has shifted to Emacs,
54so you will find the latest version in Emacs.
44 55
45 * Ada-mode: <URL:http://stephe-leake.org/emacs/ada-mode/emacs-ada-mode.html> 56 * Ada-mode: <URL:http://stephe-leake.org/emacs/ada-mode/emacs-ada-mode.html>
46 57
47 * Battery and Info Look: <URL:http://ralph-schleicher.de/emacs.html> 58 * Battery and Info Look: <URL:http://ralph-schleicher.de/emacs.html>
48 59
49 * BS: <URL:http://www.geekware.de/software/emacs/index.html>
50
51 * Calculator: <URL:http://www.barzilay.org/misc/calculator.el>
52
53 * CC mode: <URL:http://cc-mode.sourceforge.net/> 60 * CC mode: <URL:http://cc-mode.sourceforge.net/>
54 61
55 * CPerl: <URL:http://math.berkeley.edu/~ilya/software/emacs/> 62 * CPerl: <URL:http://math.berkeley.edu/~ilya/software/emacs/>
56 63
57 * Ediff and Viper: <URL:http://www.cs.sunysb.edu/~kifer/emacs.html> 64 * Ediff and Viper: <URL:http://www.cs.sunysb.edu/~kifer/emacs.html>
58 65
59 * Eldoc and Rlogin:
60 <URL:http://www.splode.com/~friedman/software/emacs-lisp/>
61
62 * ERC: <URL:http://savannah.gnu.org/projects/erc/> 66 * ERC: <URL:http://savannah.gnu.org/projects/erc/>
63 67
64 * Etags: <URL:http://fly.isti.cnr.it/software/>
65
66 * Gnus: <URL:http://www.gnus.org/> 68 * Gnus: <URL:http://www.gnus.org/>
67 69
68 * Ispell: <URL:http://www.kdstevens.com/stevens/ispell-page.html>
69
70 * MH-E: <URL:http://mh-e.sourceforge.net/> 70 * MH-E: <URL:http://mh-e.sourceforge.net/>
71 71
72 * nXML: <URL:http://www.thaiopensource.com/nxml-mode/> 72 * nXML: <URL:http://www.thaiopensource.com/nxml-mode/>
73 73
74 * Org mode: <URL:http://orgmode.org/> 74 * Org mode: <URL:http://orgmode.org/>
75 75
76 * PS mode: <URL:http://odur.let.rug.nl/%7Ekleiweg/postscript/>
77
78 * PS-print: <URL:http://www.emacswiki.org/cgi-bin/wiki/PsPrintPackage>
79
80 * Python: <URL:http://www.loveshack.ukfsn.org/emacs/>
81
82 * QuickURL: <URL:http://www.davep.org/emacs/>
83
84 * RefTeX: <URL:http://www.gnu.org/software/auctex/reftex.html> 76 * RefTeX: <URL:http://www.gnu.org/software/auctex/reftex.html>
85 77
86 * Remember: <URL:https://gna.org/p/remember-el> 78 * Remember: <URL:https://gna.org/p/remember-el>
87 79
88 * Speedbar, Checkdoc etc: <URL:http://cedet.sourceforge.net/> 80 * CEDET: <URL:http://cedet.sourceforge.net/>
89
90 * SQL: <URL:http://www.emacswiki.org/cgi-bin/wiki/sql.el>
91 81
92 * Tramp: Remote file access via rsh/ssh 82 * Tramp: Remote file access via rsh/ssh
93 <URL:http://savannah.gnu.org/projects/tramp/> 83 <URL:http://savannah.gnu.org/projects/tramp/>
94 84
95 * Webjump: <URL:http://www.neilvandyke.org/webjump>
96
97* Auxiliary files 85* Auxiliary files
98 86
99 * (Tex)info files for use with Info-look that don't come from GNU 87 * (Tex)info files for use with Info-look that don't come from GNU
@@ -114,18 +102,16 @@ Emacs for various reasons, sometimes because their authors haven't made
114a copyright assignment to the FSF. Some of them may be integrated in 102a copyright assignment to the FSF. Some of them may be integrated in
115the future. 103the future.
116 104
117You might like to check whether they are packaged for your system. 105Your operating system distribution may include several of these as optional
118Several are for Debian GNU/Linux in particular. 106packages that you can install.
119 107
120 * AUCTeX: <URL:http://www.gnu.org/software/auctex/> 108 * AUCTeX: <URL:http://www.gnu.org/software/auctex/>
121 An extensible package that supports writing and formatting TeX 109 An extensible package that supports writing and formatting TeX
122 files (including AMS-TeX, LaTeX, Texinfo, ConTeXt, and docTeX). 110 files (including AMS-TeX, LaTeX, Texinfo, ConTeXt, and docTeX).
111 Available from GNU ELPA.
123 112
124 * BBDB: personal Info Rolodex integrated with mail/news: 113 * BBDB: personal Info Rolodex integrated with mail/news:
125 <URL:http://bbdb.sourceforge.net/> 114 <URL:http://savannah.nongnu.org/projects/bbdb>
126 [You might want to set the coding system of your .bbdb file to
127 emacs-mule, say by adding `("\\.bbdb\\'" . emacs-mule)' to
128 `file-coding-system-alist' for non-ASCII characters.]
129 115
130 * Boxquote: <URL:http://www.davep.org/emacs/> 116 * Boxquote: <URL:http://www.davep.org/emacs/>
131 117
@@ -143,13 +129,6 @@ Several are for Debian GNU/Linux in particular.
143 * Ee: categorizing information manager: 129 * Ee: categorizing information manager:
144 <URL:http://www.jurta.org/en/emacs/ee/> 130 <URL:http://www.jurta.org/en/emacs/ee/>
145 131
146 * EFS: enhanced version of ange-ftp:
147 <URL:http://www-pu.informatik.uni-tuebingen.de/users/sperber/software/efs/>
148
149 * Elib library: <URL:http://www.gnu.org/software/elib/elib.html>
150 From GNU distribution mirrors. (Much of this functionality is now
151 in Emacs.)
152
153 * EMacro: <URL:http://emacro.sourceforge.net/> 132 * EMacro: <URL:http://emacro.sourceforge.net/>
154 EMacro is a portable configuration file that configures itself. 133 EMacro is a portable configuration file that configures itself.
155 134
@@ -168,33 +147,19 @@ Several are for Debian GNU/Linux in particular.
168 * Emacs Wiki Mode: <URL:http://mwolson.org/projects/EmacsWikiMode.html> 147 * Emacs Wiki Mode: <URL:http://mwolson.org/projects/EmacsWikiMode.html>
169 A wiki-like publishing tool and personal information manager 148 A wiki-like publishing tool and personal information manager
170 149
171 * Gnuserv:
172 <URL:http://www.hpl.hp.com/personal/ange/gnuserv/home.html>
173 Alternative emacsclient/emacsserver. Also available from this Web
174 page: eiffel-mode.el.
175
176 * Go in a buffer: Go Text Protocol client: 150 * Go in a buffer: Go Text Protocol client:
177 <URL:http://www.gnuvola.org/software/personal-elisp/dist/lisp/diversions/gnugo.el> 151 <URL:http://www.gnuvola.org/software/personal-elisp/dist/lisp/diversions/gnugo.el>
178 A modified version is also bundled with GNU Go: 152 A modified version is also bundled with GNU Go:
179 <URL:http://www.gnu.org/software/gnugo/gnugo.html> 153 <URL:http://www.gnu.org/software/gnugo/gnugo.html>
180 154
181 * hm--html-menus:
182 <URL:ftp://sunsite.unc.edu/pub/Linux/apps/editors/emacs/>
183 HTML-specific editing. Can work with PSGML.
184
185 * Hyperbole: 155 * Hyperbole:
186 <URL:http://directory.fsf.org/hyperbole.html> 156 <URL:http://directory.fsf.org/wiki/Hyperbole>
187 Hyperbole is an open, efficient, programmable information 157 Hyperbole is an open, efficient, programmable information
188 management and hypertext system. 158 management and hypertext system.
189 159
190 * JDEE: <URL:http://jdee.sourceforge.net/> 160 * JDEE: <URL:http://jdee.sourceforge.net/>
191 Provides a Java development environment for Emacs. 161 Provides a Java development environment for Emacs.
192 162
193 * Mailcrypt:
194 <URL:http://mailcrypt.sourceforge.net/>
195 PGP and GPG support. PGP isn't free software, but GPG, the GNU
196 Privacy Guard, is a free replacement <URL:http://www.gnupg.org/>.
197
198 * Mew: <URL:http://www.mew.org/> 163 * Mew: <URL:http://www.mew.org/>
199 A MIME mail reader for Emacs/XEmacs. 164 A MIME mail reader for Emacs/XEmacs.
200 165
@@ -208,9 +173,6 @@ Several are for Debian GNU/Linux in particular.
208 * Preview LaTeX: embed preview LaTeX images in source buffer. 173 * Preview LaTeX: embed preview LaTeX images in source buffer.
209 <URL:http://www.gnu.org/software/auctex/preview-latex.html> 174 <URL:http://www.gnu.org/software/auctex/preview-latex.html>
210 175
211 * PSGML: <URL:http://www.lysator.liu.se/projects/about_psgml.html>
212 DTD-aware serious SGML/XML editing.
213
214 * Quack: <URL:http://www.neilvandyke.org/quack/> 176 * Quack: <URL:http://www.neilvandyke.org/quack/>
215 Quack enhances Emacs support for Scheme. 177 Quack enhances Emacs support for Scheme.
216 178
@@ -227,26 +189,17 @@ Several are for Debian GNU/Linux in particular.
227 * Tamago: Chinese/Japanese/Korean input method 189 * Tamago: Chinese/Japanese/Korean input method
228 <URL:http://www.m17n.org/tamago/index.en.html> 190 <URL:http://www.m17n.org/tamago/index.en.html>
229 Emacs Lisp package to provide input methods for CJK characters. 191 Emacs Lisp package to provide input methods for CJK characters.
230 It can use these background conversion servers:
231 FreeWnn (jserver, cserver, tserver),
232 Wnn6,
233 SJ3 Ver.2
234 192
235 * Tiny Tools: <URL:http://freshmeat.net/projects/emacs-tiny-tools> 193 * Tiny Tools: <URL:https://savannah.nongnu.org/projects/emacs-tiny-tools>
236 194
237 * VM (View Mail): Alternative mail reader 195 * VM (View Mail): Alternative mail reader
238 <URL:http://launchpad.net/vm> 196 <URL:http://launchpad.net/vm>
239 Previously hosted at: <URL:http://www.nongnu.org/viewmail/> 197 Previously hosted at: <URL:http://www.nongnu.org/viewmail/>
240 There are VM newsgroups: <URL:news:gnu.emacs.vm.info>, and
241 <URL:news:gnu.emacs.vm.bug>.
242 198
243 * W3: <URL:http://savannah.gnu.org/projects/w3/> 199 * W3 Web browser: <URL:http://savannah.gnu.org/projects/w3/>
244 Web browser. There's a W3 mail list/newsgroup
245 <URL:http://savannah.gnu.org/mail/?group=w3>.
246 200
247 * Wanderlust: <URL:http://www.gohome.org/wl/> 201 * Wanderlust: <URL:http://www.gohome.org/wl/>
248 Yet Another Message Interface on Emacsen. Wanderlust is a mail/news 202 Wanderlust is a mail/news reader for Emacs.
249 reader supporting IMAP4rev1 for emacsen.
250 203
251 * WhizzyTex: <URL:http://cristal.inria.fr/whizzytex/> 204 * WhizzyTex: <URL:http://cristal.inria.fr/whizzytex/>
252 WhizzyTeX provides a minor mode for Emacs or XEmacs, a (bash) 205 WhizzyTeX provides a minor mode for Emacs or XEmacs, a (bash)
diff --git a/etc/NEWS b/etc/NEWS
index a1ef62c0bd6..b2c487ba15b 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -22,6 +22,13 @@ so we will look at it and add it to the manual.
22 22
23 23
24* Installation Changes in Emacs 24.2 24* Installation Changes in Emacs 24.2
25
26** New configure option '--enable-gcc-warnings', intended for developers.
27If building with GCC, this enables compile-time checks that warn about
28possibly-questionable C code. On a recent GNU system there should be
29no warnings; on older and on non-GNU systems the generated warnings
30may be useful.
31
25 32
26* Startup Changes in Emacs 24.2 33* Startup Changes in Emacs 24.2
27 34
@@ -32,13 +39,60 @@ been adding them there, put them somewhere else, eg site-lisp.
32 39
33* Changes in Emacs 24.2 40* Changes in Emacs 24.2
34 41
42** New functions `system-users', `system-groups' return lists of the user
43name, group names known to the system (where possible).
44
35** If your Emacs was built from a bzr checkout, the new variable 45** If your Emacs was built from a bzr checkout, the new variable
36`emacs-bzr-version' contains information about which bzr revision was used. 46`emacs-bzr-version' contains information about which bzr revision was used.
37 47
48** ImageMagick support, if available, is automatically enabled.
49It is no longer necessary to call `imagemagick-register-types'
50explicitly to install ImageMagick image types; that function is called
51automatically when setting `imagemagick-types-inhibit'.
52
53*** Setting `imagemagick-types-inhibit' to t now disables the use of
54ImageMagick to view images, set
55
56** String values for `initial-buffer-choice' also apply to emacsclient
57frames, if emacsclient is only told to open a new frame without
58specifying any file to visit or expression to evaluate.
59
38 60
39* Editing Changes in Emacs 24.2 61* Editing Changes in Emacs 24.2
62
63** M-x move-to-column, if called interactively with no prefix arg, now
64prompts for a column number.
65
66** `mouse-avoidance-banish-position' can now be used to customize
67`mouse-avoidance-mode' further.
68
69** `C-M-f' and `C-M-b' will now move to the path name separator
70character when doing minibuffer filename prompts.
71
72** `goto-char' is now bound to `M-g c'.
73
40 74
41* Changes in Specialized Modes and Packages in Emacs 24.2 75* Changes in Specialized Modes and Packages in Emacs 24.2
76
77** which-function-mode now applies to all applicable major modes by default.
78
79** erc will look up server/channel names via auth-source and use the
80channel keys found, if any.
81
82** The `server-auth-key' variable can be used to set a permanent
83shared key for Emacs Server.
84
85** In Perl mode, new option `perl-indent-parens-as-block' causes non-block
86closing brackets to be aligned with the line of the opening bracket.
87
88** FIXME something happened to ses.el, 2012-04-17.
89
90** Obsolete packages:
91
92*** mailpost.el
93
94*** mouse-sel.el
95
42 96
43* New Modes and Packages in Emacs 24.2 97* New Modes and Packages in Emacs 24.2
44 98
diff --git a/etc/TODO b/etc/TODO
index db1d50192f2..6aa74df5a79 100644
--- a/etc/TODO
+++ b/etc/TODO
@@ -647,17 +647,29 @@ up on top of all others
647 647
648** Bidirectional editing 648** Bidirectional editing
649 649
650*** Support reordering structured text
651Two important use cases: (1) comments and strings in program sources,
652and (2) text with markup, like HTML or XML.
653
654One idea is to invent a special text property that would instruct the
655display engine to reorder only the parts of buffer text covered by
656that property. The display engine will then push its state onto the
657iterator stack, restrict the bidi iterator to accessing only the
658portion of buffer text covered by the property, reorder the text, then
659pop its state from stack and continue as usual. This will require
660minor changes in the bidi_it structure.
661
662This design requires Lisp-level code to put the text properties on the
663relevant parts of the buffer text. That could be done using JIT
664fontifications, or as a preliminary processing when the file is
665visited. With HTML/XML, the code that puts text properties needs to
666pay attention to the bidi directives embedded in the HTML/XML stream.
667
650*** Allow the user to control the direction of the UI 668*** Allow the user to control the direction of the UI
651 669
652**** Introduce user option to control direction of mode line. 670**** Introduce user option to control direction of mode line.
653This requires to figure out what to do with unibyte strings that are 671One problem is the header line, which is produced by the same routines
654used in constructing the mode line. Currently, unibyte strings are 672as the mode line. While it makes sense to have the mode-line
655not reordered by bidi.c, without which R2L mode line will not display
656correctly. One possibility would be to STRING_SET_MULTIBYTE all Lisp
657strings involved in the mode line, and then pass them through bidi.c.
658
659Another problem is the header line, which is produced by the same
660routines as the mode line. While it makes sense to have the mode-line
661direction controlled by a single global variable, header lines are 673direction controlled by a single global variable, header lines are
662buffer-specific, so they need a separate treatment in this regard. 674buffer-specific, so they need a separate treatment in this regard.
663 675
diff --git a/etc/publicsuffix.txt b/etc/publicsuffix.txt
new file mode 100644
index 00000000000..45cd95aca30
--- /dev/null
+++ b/etc/publicsuffix.txt
@@ -0,0 +1,5189 @@
1// ***** BEGIN LICENSE BLOCK *****
2// Version: MPL 1.1/GPL 2.0/LGPL 2.1
3//
4// The contents of this file are subject to the Mozilla Public License Version
5// 1.1 (the "License"); you may not use this file except in compliance with
6// the License. You may obtain a copy of the License at
7// http://www.mozilla.org/MPL/
8//
9// Software distributed under the License is distributed on an "AS IS" basis,
10// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11// for the specific language governing rights and limitations under the
12// License.
13//
14// The Original Code is the Public Suffix List.
15//
16// The Initial Developer of the Original Code is
17// Jo Hermans <jo.hermans@gmail.com>.
18// Portions created by the Initial Developer are Copyright (C) 2007
19// the Initial Developer. All Rights Reserved.
20//
21// Contributor(s):
22// Ruben Arakelyan <ruben@rubenarakelyan.com>
23// Gervase Markham <gerv@gerv.net>
24// Pamela Greene <pamg.bugs@gmail.com>
25// David Triendl <david@triendl.name>
26// Jothan Frakes <jothan@gmail.com>
27// The kind representatives of many TLD registries
28//
29// Alternatively, the contents of this file may be used under the terms of
30// either the GNU General Public License Version 2 or later (the "GPL"), or
31// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
32// in which case the provisions of the GPL or the LGPL are applicable instead
33// of those above. If you wish to allow use of your version of this file only
34// under the terms of either the GPL or the LGPL, and not to allow others to
35// use your version of this file under the terms of the MPL, indicate your
36// decision by deleting the provisions above and replace them with the notice
37// and other provisions required by the GPL or the LGPL. If you do not delete
38// the provisions above, a recipient may use your version of this file under
39// the terms of any one of the MPL, the GPL or the LGPL.
40//
41// ***** END LICENSE BLOCK *****
42
43// ac : http://en.wikipedia.org/wiki/.ac
44ac
45com.ac
46edu.ac
47gov.ac
48net.ac
49mil.ac
50org.ac
51
52// ad : http://en.wikipedia.org/wiki/.ad
53ad
54nom.ad
55
56// ae : http://en.wikipedia.org/wiki/.ae
57// see also: "Domain Name Eligibility Policy" at http://www.aeda.ae/eng/aepolicy.php
58ae
59co.ae
60net.ae
61org.ae
62sch.ae
63ac.ae
64gov.ae
65mil.ae
66
67// aero : see http://www.information.aero/index.php?id=66
68aero
69accident-investigation.aero
70accident-prevention.aero
71aerobatic.aero
72aeroclub.aero
73aerodrome.aero
74agents.aero
75aircraft.aero
76airline.aero
77airport.aero
78air-surveillance.aero
79airtraffic.aero
80air-traffic-control.aero
81ambulance.aero
82amusement.aero
83association.aero
84author.aero
85ballooning.aero
86broker.aero
87caa.aero
88cargo.aero
89catering.aero
90certification.aero
91championship.aero
92charter.aero
93civilaviation.aero
94club.aero
95conference.aero
96consultant.aero
97consulting.aero
98control.aero
99council.aero
100crew.aero
101design.aero
102dgca.aero
103educator.aero
104emergency.aero
105engine.aero
106engineer.aero
107entertainment.aero
108equipment.aero
109exchange.aero
110express.aero
111federation.aero
112flight.aero
113freight.aero
114fuel.aero
115gliding.aero
116government.aero
117groundhandling.aero
118group.aero
119hanggliding.aero
120homebuilt.aero
121insurance.aero
122journal.aero
123journalist.aero
124leasing.aero
125logistics.aero
126magazine.aero
127maintenance.aero
128marketplace.aero
129media.aero
130microlight.aero
131modelling.aero
132navigation.aero
133parachuting.aero
134paragliding.aero
135passenger-association.aero
136pilot.aero
137press.aero
138production.aero
139recreation.aero
140repbody.aero
141res.aero
142research.aero
143rotorcraft.aero
144safety.aero
145scientist.aero
146services.aero
147show.aero
148skydiving.aero
149software.aero
150student.aero
151taxi.aero
152trader.aero
153trading.aero
154trainer.aero
155union.aero
156workinggroup.aero
157works.aero
158
159// af : http://www.nic.af/help.jsp
160af
161gov.af
162com.af
163org.af
164net.af
165edu.af
166
167// ag : http://www.nic.ag/prices.htm
168ag
169com.ag
170org.ag
171net.ag
172co.ag
173nom.ag
174
175// ai : http://nic.com.ai/
176ai
177off.ai
178com.ai
179net.ai
180org.ai
181
182// al : http://www.ert.gov.al/ert_alb/faq_det.html?Id=31
183al
184com.al
185edu.al
186gov.al
187mil.al
188net.al
189org.al
190
191// am : http://en.wikipedia.org/wiki/.am
192am
193
194// an : http://www.una.an/an_domreg/default.asp
195an
196com.an
197net.an
198org.an
199edu.an
200
201// ao : http://en.wikipedia.org/wiki/.ao
202// http://www.dns.ao/REGISTR.DOC
203ao
204ed.ao
205gv.ao
206og.ao
207co.ao
208pb.ao
209it.ao
210
211// aq : http://en.wikipedia.org/wiki/.aq
212aq
213
214// ar : http://en.wikipedia.org/wiki/.ar
215*.ar
216!congresodelalengua3.ar
217!educ.ar
218!gobiernoelectronico.ar
219!mecon.ar
220!nacion.ar
221!nic.ar
222!promocion.ar
223!retina.ar
224!uba.ar
225
226// arpa : http://en.wikipedia.org/wiki/.arpa
227// Confirmed by registry <iana-questions@icann.org> 2008-06-18
228e164.arpa
229in-addr.arpa
230ip6.arpa
231iris.arpa
232uri.arpa
233urn.arpa
234
235// as : http://en.wikipedia.org/wiki/.as
236as
237gov.as
238
239// asia: http://en.wikipedia.org/wiki/.asia
240asia
241
242// at : http://en.wikipedia.org/wiki/.at
243// Confirmed by registry <it@nic.at> 2008-06-17
244at
245ac.at
246co.at
247gv.at
248or.at
249
250// http://www.info.at/
251biz.at
252info.at
253
254// priv.at : http://www.nic.priv.at/
255// Submitted by registry <lendl@nic.at> 2008-06-09
256priv.at
257
258// au : http://en.wikipedia.org/wiki/.au
259*.au
260// au geographical names (vic.au etc... are covered above)
261act.edu.au
262nsw.edu.au
263nt.edu.au
264qld.edu.au
265sa.edu.au
266tas.edu.au
267vic.edu.au
268wa.edu.au
269act.gov.au
270// Removed at request of Shae.Donelan@services.nsw.gov.au, 2010-03-04
271// nsw.gov.au
272nt.gov.au
273qld.gov.au
274sa.gov.au
275tas.gov.au
276vic.gov.au
277wa.gov.au
278// CGDNs - http://www.aucd.org.au/
279act.au
280nsw.au
281nt.au
282qld.au
283sa.au
284tas.au
285vic.au
286wa.au
287
288// aw : http://en.wikipedia.org/wiki/.aw
289aw
290com.aw
291
292// ax : http://en.wikipedia.org/wiki/.ax
293ax
294
295// az : http://en.wikipedia.org/wiki/.az
296az
297com.az
298net.az
299int.az
300gov.az
301org.az
302edu.az
303info.az
304pp.az
305mil.az
306name.az
307pro.az
308biz.az
309
310// ba : http://en.wikipedia.org/wiki/.ba
311ba
312org.ba
313net.ba
314edu.ba
315gov.ba
316mil.ba
317unsa.ba
318unbi.ba
319co.ba
320com.ba
321rs.ba
322
323// bb : http://en.wikipedia.org/wiki/.bb
324bb
325biz.bb
326com.bb
327edu.bb
328gov.bb
329info.bb
330net.bb
331org.bb
332store.bb
333
334// bd : http://en.wikipedia.org/wiki/.bd
335*.bd
336
337// be : http://en.wikipedia.org/wiki/.be
338// Confirmed by registry <tech@dns.be> 2008-06-08
339be
340ac.be
341
342// bf : http://en.wikipedia.org/wiki/.bf
343bf
344gov.bf
345
346// bg : http://en.wikipedia.org/wiki/.bg
347// https://www.register.bg/user/static/rules/en/index.html
348bg
349a.bg
350b.bg
351c.bg
352d.bg
353e.bg
354f.bg
355g.bg
356h.bg
357i.bg
358j.bg
359k.bg
360l.bg
361m.bg
362n.bg
363o.bg
364p.bg
365q.bg
366r.bg
367s.bg
368t.bg
369u.bg
370v.bg
371w.bg
372x.bg
373y.bg
374z.bg
3750.bg
3761.bg
3772.bg
3783.bg
3794.bg
3805.bg
3816.bg
3827.bg
3838.bg
3849.bg
385
386// bh : http://en.wikipedia.org/wiki/.bh
387bh
388com.bh
389edu.bh
390net.bh
391org.bh
392gov.bh
393
394// bi : http://en.wikipedia.org/wiki/.bi
395// http://whois.nic.bi/
396bi
397co.bi
398com.bi
399edu.bi
400or.bi
401org.bi
402
403// biz : http://en.wikipedia.org/wiki/.biz
404biz
405
406// bj : http://en.wikipedia.org/wiki/.bj
407bj
408asso.bj
409barreau.bj
410gouv.bj
411
412// bm : http://www.bermudanic.bm/dnr-text.txt
413bm
414com.bm
415edu.bm
416gov.bm
417net.bm
418org.bm
419
420// bn : http://en.wikipedia.org/wiki/.bn
421*.bn
422
423// bo : http://www.nic.bo/
424bo
425com.bo
426edu.bo
427gov.bo
428gob.bo
429int.bo
430org.bo
431net.bo
432mil.bo
433tv.bo
434
435// br : http://registro.br/dominio/dpn.html
436// Updated by registry <fneves@registro.br> 2011-03-01
437br
438adm.br
439adv.br
440agr.br
441am.br
442arq.br
443art.br
444ato.br
445b.br
446bio.br
447blog.br
448bmd.br
449can.br
450cim.br
451cng.br
452cnt.br
453com.br
454coop.br
455ecn.br
456edu.br
457emp.br
458eng.br
459esp.br
460etc.br
461eti.br
462far.br
463flog.br
464fm.br
465fnd.br
466fot.br
467fst.br
468g12.br
469ggf.br
470gov.br
471imb.br
472ind.br
473inf.br
474jor.br
475jus.br
476lel.br
477mat.br
478med.br
479mil.br
480mus.br
481net.br
482nom.br
483not.br
484ntr.br
485odo.br
486org.br
487ppg.br
488pro.br
489psc.br
490psi.br
491qsl.br
492radio.br
493rec.br
494slg.br
495srv.br
496taxi.br
497teo.br
498tmp.br
499trd.br
500tur.br
501tv.br
502vet.br
503vlog.br
504wiki.br
505zlg.br
506
507// bs : http://www.nic.bs/rules.html
508bs
509com.bs
510net.bs
511org.bs
512edu.bs
513gov.bs
514
515// bt : http://en.wikipedia.org/wiki/.bt
516bt
517com.bt
518edu.bt
519gov.bt
520net.bt
521org.bt
522
523// bv : No registrations at this time.
524// Submitted by registry <jarle@uninett.no> 2006-06-16
525
526// bw : http://en.wikipedia.org/wiki/.bw
527// http://www.gobin.info/domainname/bw.doc
528// list of other 2nd level tlds ?
529bw
530co.bw
531org.bw
532
533// by : http://en.wikipedia.org/wiki/.by
534// http://tld.by/rules_2006_en.html
535// list of other 2nd level tlds ?
536by
537gov.by
538mil.by
539// Official information does not indicate that com.by is a reserved
540// second-level domain, but it's being used as one (see www.google.com.by and
541// www.yahoo.com.by, for example), so we list it here for safety's sake.
542com.by
543
544// http://hoster.by/
545of.by
546
547// bz : http://en.wikipedia.org/wiki/.bz
548// http://www.belizenic.bz/
549bz
550com.bz
551net.bz
552org.bz
553edu.bz
554gov.bz
555
556// ca : http://en.wikipedia.org/wiki/.ca
557ca
558// ca geographical names
559ab.ca
560bc.ca
561mb.ca
562nb.ca
563nf.ca
564nl.ca
565ns.ca
566nt.ca
567nu.ca
568on.ca
569pe.ca
570qc.ca
571sk.ca
572yk.ca
573// gc.ca: http://en.wikipedia.org/wiki/.gc.ca
574// see also: http://registry.gc.ca/en/SubdomainFAQ
575gc.ca
576
577// cat : http://en.wikipedia.org/wiki/.cat
578cat
579
580// cc : http://en.wikipedia.org/wiki/.cc
581cc
582
583// cd : http://en.wikipedia.org/wiki/.cd
584// see also: https://www.nic.cd/domain/insertDomain_2.jsp?act=1
585cd
586gov.cd
587
588// cf : http://en.wikipedia.org/wiki/.cf
589cf
590
591// cg : http://en.wikipedia.org/wiki/.cg
592cg
593
594// ch : http://en.wikipedia.org/wiki/.ch
595ch
596
597// ci : http://en.wikipedia.org/wiki/.ci
598// http://www.nic.ci/index.php?page=charte
599ci
600org.ci
601or.ci
602com.ci
603co.ci
604edu.ci
605ed.ci
606ac.ci
607net.ci
608go.ci
609asso.ci
610aéroport.ci
611int.ci
612presse.ci
613md.ci
614gouv.ci
615
616// ck : http://en.wikipedia.org/wiki/.ck
617*.ck
618
619// cl : http://en.wikipedia.org/wiki/.cl
620cl
621gov.cl
622gob.cl
623
624// cm : http://en.wikipedia.org/wiki/.cm
625cm
626gov.cm
627
628// cn : http://en.wikipedia.org/wiki/.cn
629// Submitted by registry <tanyaling@cnnic.cn> 2008-06-11
630cn
631ac.cn
632com.cn
633edu.cn
634gov.cn
635net.cn
636org.cn
637mil.cn
638å…¬å¸.cn
639网络.cn
640網絡.cn
641// cn geographic names
642ah.cn
643bj.cn
644cq.cn
645fj.cn
646gd.cn
647gs.cn
648gz.cn
649gx.cn
650ha.cn
651hb.cn
652he.cn
653hi.cn
654hl.cn
655hn.cn
656jl.cn
657js.cn
658jx.cn
659ln.cn
660nm.cn
661nx.cn
662qh.cn
663sc.cn
664sd.cn
665sh.cn
666sn.cn
667sx.cn
668tj.cn
669xj.cn
670xz.cn
671yn.cn
672zj.cn
673hk.cn
674mo.cn
675tw.cn
676
677// co : http://en.wikipedia.org/wiki/.co
678// Submitted by registry <tecnico@uniandes.edu.co> 2008-06-11
679co
680arts.co
681com.co
682edu.co
683firm.co
684gov.co
685info.co
686int.co
687mil.co
688net.co
689nom.co
690org.co
691rec.co
692web.co
693
694// com : http://en.wikipedia.org/wiki/.com
695com
696
697// CentralNic names : http://www.centralnic.com/names/domains
698// Confirmed by registry <gavin.brown@centralnic.com> 2008-06-09
699ar.com
700br.com
701cn.com
702de.com
703eu.com
704gb.com
705hu.com
706jpn.com
707kr.com
708no.com
709qc.com
710ru.com
711sa.com
712se.com
713uk.com
714us.com
715uy.com
716za.com
717
718// Requested by Yngve Pettersen <yngve@opera.com> 2009-11-26
719operaunite.com
720
721// Requested by Eduardo Vela <evn@google.com> 2010-09-06
722appspot.com
723
724// coop : http://en.wikipedia.org/wiki/.coop
725coop
726
727// cr : http://www.nic.cr/niccr_publico/showRegistroDominiosScreen.do
728cr
729ac.cr
730co.cr
731ed.cr
732fi.cr
733go.cr
734or.cr
735sa.cr
736
737// cu : http://en.wikipedia.org/wiki/.cu
738cu
739com.cu
740edu.cu
741org.cu
742net.cu
743gov.cu
744inf.cu
745
746// cv : http://en.wikipedia.org/wiki/.cv
747cv
748
749// cx : http://en.wikipedia.org/wiki/.cx
750// list of other 2nd level tlds ?
751cx
752gov.cx
753
754// cy : http://en.wikipedia.org/wiki/.cy
755*.cy
756
757// cz : http://en.wikipedia.org/wiki/.cz
758cz
759
760// de : http://en.wikipedia.org/wiki/.de
761// Confirmed by registry <ops@denic.de> (with technical
762// reservations) 2008-07-01
763de
764
765// dj : http://en.wikipedia.org/wiki/.dj
766dj
767
768// dk : http://en.wikipedia.org/wiki/.dk
769// Confirmed by registry <robert@dk-hostmaster.dk> 2008-06-17
770dk
771
772// dm : http://en.wikipedia.org/wiki/.dm
773dm
774com.dm
775net.dm
776org.dm
777edu.dm
778gov.dm
779
780// do : http://en.wikipedia.org/wiki/.do
781do
782art.do
783com.do
784edu.do
785gob.do
786gov.do
787mil.do
788net.do
789org.do
790sld.do
791web.do
792
793// dz : http://en.wikipedia.org/wiki/.dz
794dz
795com.dz
796org.dz
797net.dz
798gov.dz
799edu.dz
800asso.dz
801pol.dz
802art.dz
803
804// ec : http://www.nic.ec/reg/paso1.asp
805// Submitted by registry <vabboud@nic.ec> 2008-07-04
806ec
807com.ec
808info.ec
809net.ec
810fin.ec
811k12.ec
812med.ec
813pro.ec
814org.ec
815edu.ec
816gov.ec
817gob.ec
818mil.ec
819
820// edu : http://en.wikipedia.org/wiki/.edu
821edu
822
823// ee : http://www.eenet.ee/EENet/dom_reeglid.html#lisa_B
824ee
825edu.ee
826gov.ee
827riik.ee
828lib.ee
829med.ee
830com.ee
831pri.ee
832aip.ee
833org.ee
834fie.ee
835
836// eg : http://en.wikipedia.org/wiki/.eg
837eg
838com.eg
839edu.eg
840eun.eg
841gov.eg
842mil.eg
843name.eg
844net.eg
845org.eg
846sci.eg
847
848// er : http://en.wikipedia.org/wiki/.er
849*.er
850
851// es : https://www.nic.es/site_ingles/ingles/dominios/index.html
852es
853com.es
854nom.es
855org.es
856gob.es
857edu.es
858
859// et : http://en.wikipedia.org/wiki/.et
860*.et
861
862// eu : http://en.wikipedia.org/wiki/.eu
863eu
864
865// fi : http://en.wikipedia.org/wiki/.fi
866fi
867// aland.fi : http://en.wikipedia.org/wiki/.ax
868// This domain is being phased out in favor of .ax. As there are still many
869// domains under aland.fi, we still keep it on the list until aland.fi is
870// completely removed.
871// TODO: Check for updates (expected to be phased out around Q1/2009)
872aland.fi
873// iki.fi : Submitted by Hannu Aronsson <haa@iki.fi> 2009-11-05
874iki.fi
875
876// fj : http://en.wikipedia.org/wiki/.fj
877*.fj
878
879// fk : http://en.wikipedia.org/wiki/.fk
880*.fk
881
882// fm : http://en.wikipedia.org/wiki/.fm
883fm
884
885// fo : http://en.wikipedia.org/wiki/.fo
886fo
887
888// fr : http://www.afnic.fr/
889// domaines descriptifs : http://www.afnic.fr/obtenir/chartes/nommage-fr/annexe-descriptifs
890fr
891com.fr
892asso.fr
893nom.fr
894prd.fr
895presse.fr
896tm.fr
897// domaines sectoriels : http://www.afnic.fr/obtenir/chartes/nommage-fr/annexe-sectoriels
898aeroport.fr
899assedic.fr
900avocat.fr
901avoues.fr
902cci.fr
903chambagri.fr
904chirurgiens-dentistes.fr
905experts-comptables.fr
906geometre-expert.fr
907gouv.fr
908greta.fr
909huissier-justice.fr
910medecin.fr
911notaires.fr
912pharmacien.fr
913port.fr
914veterinaire.fr
915
916// ga : http://en.wikipedia.org/wiki/.ga
917ga
918
919// gb : This registry is effectively dormant
920// Submitted by registry <Damien.Shaw@ja.net> 2008-06-12
921
922// gd : http://en.wikipedia.org/wiki/.gd
923gd
924
925// ge : http://www.nic.net.ge/policy_en.pdf
926ge
927com.ge
928edu.ge
929gov.ge
930org.ge
931mil.ge
932net.ge
933pvt.ge
934
935// gf : http://en.wikipedia.org/wiki/.gf
936gf
937
938// gg : http://www.channelisles.net/applic/avextn.shtml
939gg
940co.gg
941org.gg
942net.gg
943sch.gg
944gov.gg
945
946// gh : http://en.wikipedia.org/wiki/.gh
947// see also: http://www.nic.gh/reg_now.php
948// Although domains directly at second level are not possible at the moment,
949// they have been possible for some time and may come back.
950gh
951com.gh
952edu.gh
953gov.gh
954org.gh
955mil.gh
956
957// gi : http://www.nic.gi/rules.html
958gi
959com.gi
960ltd.gi
961gov.gi
962mod.gi
963edu.gi
964org.gi
965
966// gl : http://en.wikipedia.org/wiki/.gl
967// http://nic.gl
968gl
969
970// gm : http://www.nic.gm/htmlpages%5Cgm-policy.htm
971gm
972
973// gn : http://psg.com/dns/gn/gn.txt
974// Submitted by registry <randy@psg.com> 2008-06-17
975ac.gn
976com.gn
977edu.gn
978gov.gn
979org.gn
980net.gn
981
982// gov : http://en.wikipedia.org/wiki/.gov
983gov
984
985// gp : http://www.nic.gp/index.php?lang=en
986gp
987com.gp
988net.gp
989mobi.gp
990edu.gp
991org.gp
992asso.gp
993
994// gq : http://en.wikipedia.org/wiki/.gq
995gq
996
997// gr : https://grweb.ics.forth.gr/english/1617-B-2005.html
998// Submitted by registry <segred@ics.forth.gr> 2008-06-09
999gr
1000com.gr
1001edu.gr
1002net.gr
1003org.gr
1004gov.gr
1005
1006// gs : http://en.wikipedia.org/wiki/.gs
1007gs
1008
1009// gt : http://www.gt/politicas.html
1010*.gt
1011
1012// gu : http://gadao.gov.gu/registration.txt
1013*.gu
1014
1015// gw : http://en.wikipedia.org/wiki/.gw
1016gw
1017
1018// gy : http://en.wikipedia.org/wiki/.gy
1019// http://registry.gy/
1020gy
1021co.gy
1022com.gy
1023net.gy
1024
1025// hk : https://www.hkdnr.hk
1026// Submitted by registry <hk.tech@hkirc.hk> 2008-06-11
1027hk
1028com.hk
1029edu.hk
1030gov.hk
1031idv.hk
1032net.hk
1033org.hk
1034å…¬å¸.hk
1035教育.hk
1036敎育.hk
1037政府.hk
1038個人.hk
1039个人.hk
1040箇人.hk
1041網络.hk
1042网络.hk
1043组織.hk
1044網絡.hk
1045网絡.hk
1046组织.hk
1047組織.hk
1048組织.hk
1049
1050// hm : http://en.wikipedia.org/wiki/.hm
1051hm
1052
1053// hn : http://www.nic.hn/politicas/ps02,,05.html
1054hn
1055com.hn
1056edu.hn
1057org.hn
1058net.hn
1059mil.hn
1060gob.hn
1061
1062// hr : http://www.dns.hr/documents/pdf/HRTLD-regulations.pdf
1063hr
1064iz.hr
1065from.hr
1066name.hr
1067com.hr
1068
1069// ht : http://www.nic.ht/info/charte.cfm
1070ht
1071com.ht
1072shop.ht
1073firm.ht
1074info.ht
1075adult.ht
1076net.ht
1077pro.ht
1078org.ht
1079med.ht
1080art.ht
1081coop.ht
1082pol.ht
1083asso.ht
1084edu.ht
1085rel.ht
1086gouv.ht
1087perso.ht
1088
1089// hu : http://www.domain.hu/domain/English/sld.html
1090// Confirmed by registry <pasztor@iszt.hu> 2008-06-12
1091hu
1092co.hu
1093info.hu
1094org.hu
1095priv.hu
1096sport.hu
1097tm.hu
10982000.hu
1099agrar.hu
1100bolt.hu
1101casino.hu
1102city.hu
1103erotica.hu
1104erotika.hu
1105film.hu
1106forum.hu
1107games.hu
1108hotel.hu
1109ingatlan.hu
1110jogasz.hu
1111konyvelo.hu
1112lakas.hu
1113media.hu
1114news.hu
1115reklam.hu
1116sex.hu
1117shop.hu
1118suli.hu
1119szex.hu
1120tozsde.hu
1121utazas.hu
1122video.hu
1123
1124// id : http://en.wikipedia.org/wiki/.id
1125// see also: https://register.pandi.or.id/
1126id
1127ac.id
1128co.id
1129go.id
1130mil.id
1131net.id
1132or.id
1133sch.id
1134web.id
1135
1136// ie : http://en.wikipedia.org/wiki/.ie
1137ie
1138gov.ie
1139
1140// il : http://en.wikipedia.org/wiki/.il
1141*.il
1142
1143// im : https://www.nic.im/pdfs/imfaqs.pdf
1144im
1145co.im
1146ltd.co.im
1147plc.co.im
1148net.im
1149gov.im
1150org.im
1151nic.im
1152ac.im
1153
1154// in : http://en.wikipedia.org/wiki/.in
1155// see also: http://www.inregistry.in/policies/
1156// Please note, that nic.in is not an offical eTLD, but used by most
1157// government institutions.
1158in
1159co.in
1160firm.in
1161net.in
1162org.in
1163gen.in
1164ind.in
1165nic.in
1166ac.in
1167edu.in
1168res.in
1169gov.in
1170mil.in
1171
1172// info : http://en.wikipedia.org/wiki/.info
1173info
1174
1175// int : http://en.wikipedia.org/wiki/.int
1176// Confirmed by registry <iana-questions@icann.org> 2008-06-18
1177int
1178eu.int
1179
1180// io : http://www.nic.io/rules.html
1181// list of other 2nd level tlds ?
1182io
1183com.io
1184
1185// iq : http://www.cmc.iq/english/iq/iqregister1.htm
1186iq
1187gov.iq
1188edu.iq
1189mil.iq
1190com.iq
1191org.iq
1192net.iq
1193
1194// ir : http://www.nic.ir/Terms_and_Conditions_ir,_Appendix_1_Domain_Rules
1195// Also see http://www.nic.ir/Internationalized_Domain_Names
1196// Two <iran>.ir entries added at request of <tech-team@nic.ir>, 2010-04-16
1197ir
1198ac.ir
1199co.ir
1200gov.ir
1201id.ir
1202net.ir
1203org.ir
1204sch.ir
1205// xn--mgba3a4f16a.ir (<iran>.ir, Persian YEH)
1206ایران.ir
1207// xn--mgba3a4fra.ir (<iran>.ir, Arabic YEH)
1208ايران.ir
1209
1210// is : http://www.isnic.is/domain/rules.php
1211// Confirmed by registry <marius@isgate.is> 2008-12-06
1212is
1213net.is
1214com.is
1215edu.is
1216gov.is
1217org.is
1218int.is
1219
1220// it : http://en.wikipedia.org/wiki/.it
1221it
1222gov.it
1223edu.it
1224// list of reserved geo-names :
1225// http://www.nic.it/documenti/regolamenti-e-linee-guida/regolamento-assegnazione-versione-6.0.pdf
1226// (There is also a list of reserved geo-names corresponding to Italian
1227// municipalities : http://www.nic.it/documenti/appendice-c.pdf , but it is
1228// not included here.)
1229agrigento.it
1230ag.it
1231alessandria.it
1232al.it
1233ancona.it
1234an.it
1235aosta.it
1236aoste.it
1237ao.it
1238arezzo.it
1239ar.it
1240ascoli-piceno.it
1241ascolipiceno.it
1242ap.it
1243asti.it
1244at.it
1245avellino.it
1246av.it
1247bari.it
1248ba.it
1249andria-barletta-trani.it
1250andriabarlettatrani.it
1251trani-barletta-andria.it
1252tranibarlettaandria.it
1253barletta-trani-andria.it
1254barlettatraniandria.it
1255andria-trani-barletta.it
1256andriatranibarletta.it
1257trani-andria-barletta.it
1258traniandriabarletta.it
1259bt.it
1260belluno.it
1261bl.it
1262benevento.it
1263bn.it
1264bergamo.it
1265bg.it
1266biella.it
1267bi.it
1268bologna.it
1269bo.it
1270bolzano.it
1271bozen.it
1272balsan.it
1273alto-adige.it
1274altoadige.it
1275suedtirol.it
1276bz.it
1277brescia.it
1278bs.it
1279brindisi.it
1280br.it
1281cagliari.it
1282ca.it
1283caltanissetta.it
1284cl.it
1285campobasso.it
1286cb.it
1287carboniaiglesias.it
1288carbonia-iglesias.it
1289iglesias-carbonia.it
1290iglesiascarbonia.it
1291ci.it
1292caserta.it
1293ce.it
1294catania.it
1295ct.it
1296catanzaro.it
1297cz.it
1298chieti.it
1299ch.it
1300como.it
1301co.it
1302cosenza.it
1303cs.it
1304cremona.it
1305cr.it
1306crotone.it
1307kr.it
1308cuneo.it
1309cn.it
1310dell-ogliastra.it
1311dellogliastra.it
1312ogliastra.it
1313og.it
1314enna.it
1315en.it
1316ferrara.it
1317fe.it
1318fermo.it
1319fm.it
1320firenze.it
1321florence.it
1322fi.it
1323foggia.it
1324fg.it
1325forli-cesena.it
1326forlicesena.it
1327cesena-forli.it
1328cesenaforli.it
1329fc.it
1330frosinone.it
1331fr.it
1332genova.it
1333genoa.it
1334ge.it
1335gorizia.it
1336go.it
1337grosseto.it
1338gr.it
1339imperia.it
1340im.it
1341isernia.it
1342is.it
1343laquila.it
1344aquila.it
1345aq.it
1346la-spezia.it
1347laspezia.it
1348sp.it
1349latina.it
1350lt.it
1351lecce.it
1352le.it
1353lecco.it
1354lc.it
1355livorno.it
1356li.it
1357lodi.it
1358lo.it
1359lucca.it
1360lu.it
1361macerata.it
1362mc.it
1363mantova.it
1364mn.it
1365massa-carrara.it
1366massacarrara.it
1367carrara-massa.it
1368carraramassa.it
1369ms.it
1370matera.it
1371mt.it
1372medio-campidano.it
1373mediocampidano.it
1374campidano-medio.it
1375campidanomedio.it
1376vs.it
1377messina.it
1378me.it
1379milano.it
1380milan.it
1381mi.it
1382modena.it
1383mo.it
1384monza.it
1385monza-brianza.it
1386monzabrianza.it
1387monzaebrianza.it
1388monzaedellabrianza.it
1389monza-e-della-brianza.it
1390mb.it
1391napoli.it
1392naples.it
1393na.it
1394novara.it
1395no.it
1396nuoro.it
1397nu.it
1398oristano.it
1399or.it
1400padova.it
1401padua.it
1402pd.it
1403palermo.it
1404pa.it
1405parma.it
1406pr.it
1407pavia.it
1408pv.it
1409perugia.it
1410pg.it
1411pescara.it
1412pe.it
1413pesaro-urbino.it
1414pesarourbino.it
1415urbino-pesaro.it
1416urbinopesaro.it
1417pu.it
1418piacenza.it
1419pc.it
1420pisa.it
1421pi.it
1422pistoia.it
1423pt.it
1424pordenone.it
1425pn.it
1426potenza.it
1427pz.it
1428prato.it
1429po.it
1430ragusa.it
1431rg.it
1432ravenna.it
1433ra.it
1434reggio-calabria.it
1435reggiocalabria.it
1436rc.it
1437reggio-emilia.it
1438reggioemilia.it
1439re.it
1440rieti.it
1441ri.it
1442rimini.it
1443rn.it
1444roma.it
1445rome.it
1446rm.it
1447rovigo.it
1448ro.it
1449salerno.it
1450sa.it
1451sassari.it
1452ss.it
1453savona.it
1454sv.it
1455siena.it
1456si.it
1457siracusa.it
1458sr.it
1459sondrio.it
1460so.it
1461taranto.it
1462ta.it
1463tempio-olbia.it
1464tempioolbia.it
1465olbia-tempio.it
1466olbiatempio.it
1467ot.it
1468teramo.it
1469te.it
1470terni.it
1471tr.it
1472torino.it
1473turin.it
1474to.it
1475trapani.it
1476tp.it
1477trento.it
1478trentino.it
1479tn.it
1480treviso.it
1481tv.it
1482trieste.it
1483ts.it
1484udine.it
1485ud.it
1486varese.it
1487va.it
1488venezia.it
1489venice.it
1490ve.it
1491verbania.it
1492vb.it
1493vercelli.it
1494vc.it
1495verona.it
1496vr.it
1497vibo-valentia.it
1498vibovalentia.it
1499vv.it
1500vicenza.it
1501vi.it
1502viterbo.it
1503vt.it
1504
1505// je : http://www.channelisles.net/applic/avextn.shtml
1506je
1507co.je
1508org.je
1509net.je
1510sch.je
1511gov.je
1512
1513// jm : http://www.com.jm/register.html
1514*.jm
1515
1516// jo : http://www.dns.jo/Registration_policy.aspx
1517jo
1518com.jo
1519org.jo
1520net.jo
1521edu.jo
1522sch.jo
1523gov.jo
1524mil.jo
1525name.jo
1526
1527// jobs : http://en.wikipedia.org/wiki/.jobs
1528jobs
1529
1530// jp : http://en.wikipedia.org/wiki/.jp
1531// http://jprs.co.jp/en/jpdomain.html
1532// Submitted by registry <yone@jprs.co.jp> 2008-06-11
1533// Updated by registry <yone@jprs.co.jp> 2008-12-04
1534jp
1535// jp organizational type names
1536ac.jp
1537ad.jp
1538co.jp
1539ed.jp
1540go.jp
1541gr.jp
1542lg.jp
1543ne.jp
1544or.jp
1545// jp geographic type names
1546// http://jprs.jp/doc/rule/saisoku-1.html
1547*.aichi.jp
1548*.akita.jp
1549*.aomori.jp
1550*.chiba.jp
1551*.ehime.jp
1552*.fukui.jp
1553*.fukuoka.jp
1554*.fukushima.jp
1555*.gifu.jp
1556*.gunma.jp
1557*.hiroshima.jp
1558*.hokkaido.jp
1559*.hyogo.jp
1560*.ibaraki.jp
1561*.ishikawa.jp
1562*.iwate.jp
1563*.kagawa.jp
1564*.kagoshima.jp
1565*.kanagawa.jp
1566*.kawasaki.jp
1567*.kitakyushu.jp
1568*.kobe.jp
1569*.kochi.jp
1570*.kumamoto.jp
1571*.kyoto.jp
1572*.mie.jp
1573*.miyagi.jp
1574*.miyazaki.jp
1575*.nagano.jp
1576*.nagasaki.jp
1577*.nagoya.jp
1578*.nara.jp
1579*.niigata.jp
1580*.oita.jp
1581*.okayama.jp
1582*.okinawa.jp
1583*.osaka.jp
1584*.saga.jp
1585*.saitama.jp
1586*.sapporo.jp
1587*.sendai.jp
1588*.shiga.jp
1589*.shimane.jp
1590*.shizuoka.jp
1591*.tochigi.jp
1592*.tokushima.jp
1593*.tokyo.jp
1594*.tottori.jp
1595*.toyama.jp
1596*.wakayama.jp
1597*.yamagata.jp
1598*.yamaguchi.jp
1599*.yamanashi.jp
1600*.yokohama.jp
1601!metro.tokyo.jp
1602!pref.aichi.jp
1603!pref.akita.jp
1604!pref.aomori.jp
1605!pref.chiba.jp
1606!pref.ehime.jp
1607!pref.fukui.jp
1608!pref.fukuoka.jp
1609!pref.fukushima.jp
1610!pref.gifu.jp
1611!pref.gunma.jp
1612!pref.hiroshima.jp
1613!pref.hokkaido.jp
1614!pref.hyogo.jp
1615!pref.ibaraki.jp
1616!pref.ishikawa.jp
1617!pref.iwate.jp
1618!pref.kagawa.jp
1619!pref.kagoshima.jp
1620!pref.kanagawa.jp
1621!pref.kochi.jp
1622!pref.kumamoto.jp
1623!pref.kyoto.jp
1624!pref.mie.jp
1625!pref.miyagi.jp
1626!pref.miyazaki.jp
1627!pref.nagano.jp
1628!pref.nagasaki.jp
1629!pref.nara.jp
1630!pref.niigata.jp
1631!pref.oita.jp
1632!pref.okayama.jp
1633!pref.okinawa.jp
1634!pref.osaka.jp
1635!pref.saga.jp
1636!pref.saitama.jp
1637!pref.shiga.jp
1638!pref.shimane.jp
1639!pref.shizuoka.jp
1640!pref.tochigi.jp
1641!pref.tokushima.jp
1642!pref.tottori.jp
1643!pref.toyama.jp
1644!pref.wakayama.jp
1645!pref.yamagata.jp
1646!pref.yamaguchi.jp
1647!pref.yamanashi.jp
1648!city.chiba.jp
1649!city.fukuoka.jp
1650!city.hiroshima.jp
1651!city.kawasaki.jp
1652!city.kitakyushu.jp
1653!city.kobe.jp
1654!city.kyoto.jp
1655!city.nagoya.jp
1656!city.niigata.jp
1657!city.okayama.jp
1658!city.osaka.jp
1659!city.saitama.jp
1660!city.sapporo.jp
1661!city.sendai.jp
1662!city.shizuoka.jp
1663!city.yokohama.jp
1664
1665// ke : http://www.kenic.or.ke/index.php?option=com_content&task=view&id=117&Itemid=145
1666*.ke
1667
1668// kg : http://www.domain.kg/dmn_n.html
1669kg
1670org.kg
1671net.kg
1672com.kg
1673edu.kg
1674gov.kg
1675mil.kg
1676
1677// kh : http://www.mptc.gov.kh/dns_registration.htm
1678*.kh
1679
1680// ki : http://www.ki/dns/index.html
1681ki
1682edu.ki
1683biz.ki
1684net.ki
1685org.ki
1686gov.ki
1687info.ki
1688com.ki
1689
1690// km : http://en.wikipedia.org/wiki/.km
1691// http://www.domaine.km/documents/charte.doc
1692km
1693org.km
1694nom.km
1695gov.km
1696prd.km
1697tm.km
1698edu.km
1699mil.km
1700ass.km
1701com.km
1702// These are only mentioned as proposed suggestions at domaine.km, but
1703// http://en.wikipedia.org/wiki/.km says they're available for registration:
1704coop.km
1705asso.km
1706presse.km
1707medecin.km
1708notaires.km
1709pharmaciens.km
1710veterinaire.km
1711gouv.km
1712
1713// kn : http://en.wikipedia.org/wiki/.kn
1714// http://www.dot.kn/domainRules.html
1715kn
1716net.kn
1717org.kn
1718edu.kn
1719gov.kn
1720
1721// kp : http://www.kcce.kp/en_index.php
1722com.kp
1723edu.kp
1724gov.kp
1725org.kp
1726rep.kp
1727tra.kp
1728
1729// kr : http://en.wikipedia.org/wiki/.kr
1730// see also: http://domain.nida.or.kr/eng/registration.jsp
1731kr
1732ac.kr
1733co.kr
1734es.kr
1735go.kr
1736hs.kr
1737kg.kr
1738mil.kr
1739ms.kr
1740ne.kr
1741or.kr
1742pe.kr
1743re.kr
1744sc.kr
1745// kr geographical names
1746busan.kr
1747chungbuk.kr
1748chungnam.kr
1749daegu.kr
1750daejeon.kr
1751gangwon.kr
1752gwangju.kr
1753gyeongbuk.kr
1754gyeonggi.kr
1755gyeongnam.kr
1756incheon.kr
1757jeju.kr
1758jeonbuk.kr
1759jeonnam.kr
1760seoul.kr
1761ulsan.kr
1762
1763// kw : http://en.wikipedia.org/wiki/.kw
1764*.kw
1765
1766// ky : http://www.icta.ky/da_ky_reg_dom.php
1767// Confirmed by registry <kysupport@perimeterusa.com> 2008-06-17
1768ky
1769edu.ky
1770gov.ky
1771com.ky
1772org.ky
1773net.ky
1774
1775// kz : http://en.wikipedia.org/wiki/.kz
1776// see also: http://www.nic.kz/rules/index.jsp
1777kz
1778org.kz
1779edu.kz
1780net.kz
1781gov.kz
1782mil.kz
1783com.kz
1784
1785// la : http://en.wikipedia.org/wiki/.la
1786// Submitted by registry <gavin.brown@nic.la> 2008-06-10
1787la
1788int.la
1789net.la
1790info.la
1791edu.la
1792gov.la
1793per.la
1794com.la
1795org.la
1796// see http://www.c.la/
1797c.la
1798
1799// lb : http://en.wikipedia.org/wiki/.lb
1800// Submitted by registry <randy@psg.com> 2008-06-17
1801com.lb
1802edu.lb
1803gov.lb
1804net.lb
1805org.lb
1806
1807// lc : http://en.wikipedia.org/wiki/.lc
1808// see also: http://www.nic.lc/rules.htm
1809lc
1810com.lc
1811net.lc
1812co.lc
1813org.lc
1814edu.lc
1815gov.lc
1816
1817// li : http://en.wikipedia.org/wiki/.li
1818li
1819
1820// lk : http://www.nic.lk/seclevpr.html
1821lk
1822gov.lk
1823sch.lk
1824net.lk
1825int.lk
1826com.lk
1827org.lk
1828edu.lk
1829ngo.lk
1830soc.lk
1831web.lk
1832ltd.lk
1833assn.lk
1834grp.lk
1835hotel.lk
1836
1837// local : http://en.wikipedia.org/wiki/.local
1838local
1839
1840// lr : http://psg.com/dns/lr/lr.txt
1841// Submitted by registry <randy@psg.com> 2008-06-17
1842com.lr
1843edu.lr
1844gov.lr
1845org.lr
1846net.lr
1847
1848// ls : http://en.wikipedia.org/wiki/.ls
1849ls
1850co.ls
1851org.ls
1852
1853// lt : http://en.wikipedia.org/wiki/.lt
1854lt
1855// gov.lt : http://www.gov.lt/index_en.php
1856gov.lt
1857
1858// lu : http://www.dns.lu/en/
1859lu
1860
1861// lv : http://www.nic.lv/DNS/En/generic.php
1862lv
1863com.lv
1864edu.lv
1865gov.lv
1866org.lv
1867mil.lv
1868id.lv
1869net.lv
1870asn.lv
1871conf.lv
1872
1873// ly : http://www.nic.ly/regulations.php
1874ly
1875com.ly
1876net.ly
1877gov.ly
1878plc.ly
1879edu.ly
1880sch.ly
1881med.ly
1882org.ly
1883id.ly
1884
1885// ma : http://en.wikipedia.org/wiki/.ma
1886// http://www.anrt.ma/fr/admin/download/upload/file_fr782.pdf
1887ma
1888co.ma
1889net.ma
1890gov.ma
1891org.ma
1892ac.ma
1893press.ma
1894
1895// mc : http://www.nic.mc/
1896mc
1897tm.mc
1898asso.mc
1899
1900// md : http://en.wikipedia.org/wiki/.md
1901md
1902
1903// me : http://en.wikipedia.org/wiki/.me
1904me
1905co.me
1906net.me
1907org.me
1908edu.me
1909ac.me
1910gov.me
1911its.me
1912priv.me
1913
1914// mg : http://www.nic.mg/tarif.htm
1915mg
1916org.mg
1917nom.mg
1918gov.mg
1919prd.mg
1920tm.mg
1921edu.mg
1922mil.mg
1923com.mg
1924
1925// mh : http://en.wikipedia.org/wiki/.mh
1926mh
1927
1928// mil : http://en.wikipedia.org/wiki/.mil
1929mil
1930
1931// mk : http://en.wikipedia.org/wiki/.mk
1932// see also: http://dns.marnet.net.mk/postapka.php
1933mk
1934com.mk
1935org.mk
1936net.mk
1937edu.mk
1938gov.mk
1939inf.mk
1940name.mk
1941
1942// ml : http://www.gobin.info/domainname/ml-template.doc
1943// see also: http://en.wikipedia.org/wiki/.ml
1944ml
1945com.ml
1946edu.ml
1947gouv.ml
1948gov.ml
1949net.ml
1950org.ml
1951presse.ml
1952
1953// mm : http://en.wikipedia.org/wiki/.mm
1954*.mm
1955
1956// mn : http://en.wikipedia.org/wiki/.mn
1957mn
1958gov.mn
1959edu.mn
1960org.mn
1961
1962// mo : http://www.monic.net.mo/
1963mo
1964com.mo
1965net.mo
1966org.mo
1967edu.mo
1968gov.mo
1969
1970// mobi : http://en.wikipedia.org/wiki/.mobi
1971mobi
1972
1973// mp : http://www.dot.mp/
1974// Confirmed by registry <dcamacho@saipan.com> 2008-06-17
1975mp
1976
1977// mq : http://en.wikipedia.org/wiki/.mq
1978mq
1979
1980// mr : http://en.wikipedia.org/wiki/.mr
1981mr
1982gov.mr
1983
1984// ms : http://en.wikipedia.org/wiki/.ms
1985ms
1986
1987// mt : https://www.nic.org.mt/dotmt/
1988*.mt
1989
1990// mu : http://en.wikipedia.org/wiki/.mu
1991mu
1992com.mu
1993net.mu
1994org.mu
1995gov.mu
1996ac.mu
1997co.mu
1998or.mu
1999
2000// museum : http://about.museum/naming/
2001// http://index.museum/
2002museum
2003academy.museum
2004agriculture.museum
2005air.museum
2006airguard.museum
2007alabama.museum
2008alaska.museum
2009amber.museum
2010ambulance.museum
2011american.museum
2012americana.museum
2013americanantiques.museum
2014americanart.museum
2015amsterdam.museum
2016and.museum
2017annefrank.museum
2018anthro.museum
2019anthropology.museum
2020antiques.museum
2021aquarium.museum
2022arboretum.museum
2023archaeological.museum
2024archaeology.museum
2025architecture.museum
2026art.museum
2027artanddesign.museum
2028artcenter.museum
2029artdeco.museum
2030arteducation.museum
2031artgallery.museum
2032arts.museum
2033artsandcrafts.museum
2034asmatart.museum
2035assassination.museum
2036assisi.museum
2037association.museum
2038astronomy.museum
2039atlanta.museum
2040austin.museum
2041australia.museum
2042automotive.museum
2043aviation.museum
2044axis.museum
2045badajoz.museum
2046baghdad.museum
2047bahn.museum
2048bale.museum
2049baltimore.museum
2050barcelona.museum
2051baseball.museum
2052basel.museum
2053baths.museum
2054bauern.museum
2055beauxarts.museum
2056beeldengeluid.museum
2057bellevue.museum
2058bergbau.museum
2059berkeley.museum
2060berlin.museum
2061bern.museum
2062bible.museum
2063bilbao.museum
2064bill.museum
2065birdart.museum
2066birthplace.museum
2067bonn.museum
2068boston.museum
2069botanical.museum
2070botanicalgarden.museum
2071botanicgarden.museum
2072botany.museum
2073brandywinevalley.museum
2074brasil.museum
2075bristol.museum
2076british.museum
2077britishcolumbia.museum
2078broadcast.museum
2079brunel.museum
2080brussel.museum
2081brussels.museum
2082bruxelles.museum
2083building.museum
2084burghof.museum
2085bus.museum
2086bushey.museum
2087cadaques.museum
2088california.museum
2089cambridge.museum
2090can.museum
2091canada.museum
2092capebreton.museum
2093carrier.museum
2094cartoonart.museum
2095casadelamoneda.museum
2096castle.museum
2097castres.museum
2098celtic.museum
2099center.museum
2100chattanooga.museum
2101cheltenham.museum
2102chesapeakebay.museum
2103chicago.museum
2104children.museum
2105childrens.museum
2106childrensgarden.museum
2107chiropractic.museum
2108chocolate.museum
2109christiansburg.museum
2110cincinnati.museum
2111cinema.museum
2112circus.museum
2113civilisation.museum
2114civilization.museum
2115civilwar.museum
2116clinton.museum
2117clock.museum
2118coal.museum
2119coastaldefence.museum
2120cody.museum
2121coldwar.museum
2122collection.museum
2123colonialwilliamsburg.museum
2124coloradoplateau.museum
2125columbia.museum
2126columbus.museum
2127communication.museum
2128communications.museum
2129community.museum
2130computer.museum
2131computerhistory.museum
2132comunicações.museum
2133contemporary.museum
2134contemporaryart.museum
2135convent.museum
2136copenhagen.museum
2137corporation.museum
2138correios-e-telecomunicações.museum
2139corvette.museum
2140costume.museum
2141countryestate.museum
2142county.museum
2143crafts.museum
2144cranbrook.museum
2145creation.museum
2146cultural.museum
2147culturalcenter.museum
2148culture.museum
2149cyber.museum
2150cymru.museum
2151dali.museum
2152dallas.museum
2153database.museum
2154ddr.museum
2155decorativearts.museum
2156delaware.museum
2157delmenhorst.museum
2158denmark.museum
2159depot.museum
2160design.museum
2161detroit.museum
2162dinosaur.museum
2163discovery.museum
2164dolls.museum
2165donostia.museum
2166durham.museum
2167eastafrica.museum
2168eastcoast.museum
2169education.museum
2170educational.museum
2171egyptian.museum
2172eisenbahn.museum
2173elburg.museum
2174elvendrell.museum
2175embroidery.museum
2176encyclopedic.museum
2177england.museum
2178entomology.museum
2179environment.museum
2180environmentalconservation.museum
2181epilepsy.museum
2182essex.museum
2183estate.museum
2184ethnology.museum
2185exeter.museum
2186exhibition.museum
2187family.museum
2188farm.museum
2189farmequipment.museum
2190farmers.museum
2191farmstead.museum
2192field.museum
2193figueres.museum
2194filatelia.museum
2195film.museum
2196fineart.museum
2197finearts.museum
2198finland.museum
2199flanders.museum
2200florida.museum
2201force.museum
2202fortmissoula.museum
2203fortworth.museum
2204foundation.museum
2205francaise.museum
2206frankfurt.museum
2207franziskaner.museum
2208freemasonry.museum
2209freiburg.museum
2210fribourg.museum
2211frog.museum
2212fundacio.museum
2213furniture.museum
2214gallery.museum
2215garden.museum
2216gateway.museum
2217geelvinck.museum
2218gemological.museum
2219geology.museum
2220georgia.museum
2221giessen.museum
2222glas.museum
2223glass.museum
2224gorge.museum
2225grandrapids.museum
2226graz.museum
2227guernsey.museum
2228halloffame.museum
2229hamburg.museum
2230handson.museum
2231harvestcelebration.museum
2232hawaii.museum
2233health.museum
2234heimatunduhren.museum
2235hellas.museum
2236helsinki.museum
2237hembygdsforbund.museum
2238heritage.museum
2239histoire.museum
2240historical.museum
2241historicalsociety.museum
2242historichouses.museum
2243historisch.museum
2244historisches.museum
2245history.museum
2246historyofscience.museum
2247horology.museum
2248house.museum
2249humanities.museum
2250illustration.museum
2251imageandsound.museum
2252indian.museum
2253indiana.museum
2254indianapolis.museum
2255indianmarket.museum
2256intelligence.museum
2257interactive.museum
2258iraq.museum
2259iron.museum
2260isleofman.museum
2261jamison.museum
2262jefferson.museum
2263jerusalem.museum
2264jewelry.museum
2265jewish.museum
2266jewishart.museum
2267jfk.museum
2268journalism.museum
2269judaica.museum
2270judygarland.museum
2271juedisches.museum
2272juif.museum
2273karate.museum
2274karikatur.museum
2275kids.museum
2276koebenhavn.museum
2277koeln.museum
2278kunst.museum
2279kunstsammlung.museum
2280kunstunddesign.museum
2281labor.museum
2282labour.museum
2283lajolla.museum
2284lancashire.museum
2285landes.museum
2286lans.museum
2287läns.museum
2288larsson.museum
2289lewismiller.museum
2290lincoln.museum
2291linz.museum
2292living.museum
2293livinghistory.museum
2294localhistory.museum
2295london.museum
2296losangeles.museum
2297louvre.museum
2298loyalist.museum
2299lucerne.museum
2300luxembourg.museum
2301luzern.museum
2302mad.museum
2303madrid.museum
2304mallorca.museum
2305manchester.museum
2306mansion.museum
2307mansions.museum
2308manx.museum
2309marburg.museum
2310maritime.museum
2311maritimo.museum
2312maryland.museum
2313marylhurst.museum
2314media.museum
2315medical.museum
2316medizinhistorisches.museum
2317meeres.museum
2318memorial.museum
2319mesaverde.museum
2320michigan.museum
2321midatlantic.museum
2322military.museum
2323mill.museum
2324miners.museum
2325mining.museum
2326minnesota.museum
2327missile.museum
2328missoula.museum
2329modern.museum
2330moma.museum
2331money.museum
2332monmouth.museum
2333monticello.museum
2334montreal.museum
2335moscow.museum
2336motorcycle.museum
2337muenchen.museum
2338muenster.museum
2339mulhouse.museum
2340muncie.museum
2341museet.museum
2342museumcenter.museum
2343museumvereniging.museum
2344music.museum
2345national.museum
2346nationalfirearms.museum
2347nationalheritage.museum
2348nativeamerican.museum
2349naturalhistory.museum
2350naturalhistorymuseum.museum
2351naturalsciences.museum
2352nature.museum
2353naturhistorisches.museum
2354natuurwetenschappen.museum
2355naumburg.museum
2356naval.museum
2357nebraska.museum
2358neues.museum
2359newhampshire.museum
2360newjersey.museum
2361newmexico.museum
2362newport.museum
2363newspaper.museum
2364newyork.museum
2365niepce.museum
2366norfolk.museum
2367north.museum
2368nrw.museum
2369nuernberg.museum
2370nuremberg.museum
2371nyc.museum
2372nyny.museum
2373oceanographic.museum
2374oceanographique.museum
2375omaha.museum
2376online.museum
2377ontario.museum
2378openair.museum
2379oregon.museum
2380oregontrail.museum
2381otago.museum
2382oxford.museum
2383pacific.museum
2384paderborn.museum
2385palace.museum
2386paleo.museum
2387palmsprings.museum
2388panama.museum
2389paris.museum
2390pasadena.museum
2391pharmacy.museum
2392philadelphia.museum
2393philadelphiaarea.museum
2394philately.museum
2395phoenix.museum
2396photography.museum
2397pilots.museum
2398pittsburgh.museum
2399planetarium.museum
2400plantation.museum
2401plants.museum
2402plaza.museum
2403portal.museum
2404portland.museum
2405portlligat.museum
2406posts-and-telecommunications.museum
2407preservation.museum
2408presidio.museum
2409press.museum
2410project.museum
2411public.museum
2412pubol.museum
2413quebec.museum
2414railroad.museum
2415railway.museum
2416research.museum
2417resistance.museum
2418riodejaneiro.museum
2419rochester.museum
2420rockart.museum
2421roma.museum
2422russia.museum
2423saintlouis.museum
2424salem.museum
2425salvadordali.museum
2426salzburg.museum
2427sandiego.museum
2428sanfrancisco.museum
2429santabarbara.museum
2430santacruz.museum
2431santafe.museum
2432saskatchewan.museum
2433satx.museum
2434savannahga.museum
2435schlesisches.museum
2436schoenbrunn.museum
2437schokoladen.museum
2438school.museum
2439schweiz.museum
2440science.museum
2441scienceandhistory.museum
2442scienceandindustry.museum
2443sciencecenter.museum
2444sciencecenters.museum
2445science-fiction.museum
2446sciencehistory.museum
2447sciences.museum
2448sciencesnaturelles.museum
2449scotland.museum
2450seaport.museum
2451settlement.museum
2452settlers.museum
2453shell.museum
2454sherbrooke.museum
2455sibenik.museum
2456silk.museum
2457ski.museum
2458skole.museum
2459society.museum
2460sologne.museum
2461soundandvision.museum
2462southcarolina.museum
2463southwest.museum
2464space.museum
2465spy.museum
2466square.museum
2467stadt.museum
2468stalbans.museum
2469starnberg.museum
2470state.museum
2471stateofdelaware.museum
2472station.museum
2473steam.museum
2474steiermark.museum
2475stjohn.museum
2476stockholm.museum
2477stpetersburg.museum
2478stuttgart.museum
2479suisse.museum
2480surgeonshall.museum
2481surrey.museum
2482svizzera.museum
2483sweden.museum
2484sydney.museum
2485tank.museum
2486tcm.museum
2487technology.museum
2488telekommunikation.museum
2489television.museum
2490texas.museum
2491textile.museum
2492theater.museum
2493time.museum
2494timekeeping.museum
2495topology.museum
2496torino.museum
2497touch.museum
2498town.museum
2499transport.museum
2500tree.museum
2501trolley.museum
2502trust.museum
2503trustee.museum
2504uhren.museum
2505ulm.museum
2506undersea.museum
2507university.museum
2508usa.museum
2509usantiques.museum
2510usarts.museum
2511uscountryestate.museum
2512usculture.museum
2513usdecorativearts.museum
2514usgarden.museum
2515ushistory.museum
2516ushuaia.museum
2517uslivinghistory.museum
2518utah.museum
2519uvic.museum
2520valley.museum
2521vantaa.museum
2522versailles.museum
2523viking.museum
2524village.museum
2525virginia.museum
2526virtual.museum
2527virtuel.museum
2528vlaanderen.museum
2529volkenkunde.museum
2530wales.museum
2531wallonie.museum
2532war.museum
2533washingtondc.museum
2534watchandclock.museum
2535watch-and-clock.museum
2536western.museum
2537westfalen.museum
2538whaling.museum
2539wildlife.museum
2540williamsburg.museum
2541windmill.museum
2542workshop.museum
2543york.museum
2544yorkshire.museum
2545yosemite.museum
2546youth.museum
2547zoological.museum
2548zoology.museum
2549ירושלי×.museum
2550иком.museum
2551
2552// mv : http://en.wikipedia.org/wiki/.mv
2553// "mv" included because, contra Wikipedia, google.mv exists.
2554mv
2555aero.mv
2556biz.mv
2557com.mv
2558coop.mv
2559edu.mv
2560gov.mv
2561info.mv
2562int.mv
2563mil.mv
2564museum.mv
2565name.mv
2566net.mv
2567org.mv
2568pro.mv
2569
2570// mw : http://www.registrar.mw/
2571mw
2572ac.mw
2573biz.mw
2574co.mw
2575com.mw
2576coop.mw
2577edu.mw
2578gov.mw
2579int.mw
2580museum.mw
2581net.mw
2582org.mw
2583
2584// mx : http://www.nic.mx/
2585// Submitted by registry <farias@nic.mx> 2008-06-19
2586mx
2587com.mx
2588org.mx
2589gob.mx
2590edu.mx
2591net.mx
2592
2593// my : http://www.mynic.net.my/
2594my
2595com.my
2596net.my
2597org.my
2598gov.my
2599edu.my
2600mil.my
2601name.my
2602
2603// mz : http://www.gobin.info/domainname/mz-template.doc
2604*.mz
2605
2606// na : http://www.na-nic.com.na/
2607// http://www.info.na/domain/
2608na
2609info.na
2610pro.na
2611name.na
2612school.na
2613or.na
2614dr.na
2615us.na
2616mx.na
2617ca.na
2618in.na
2619cc.na
2620tv.na
2621ws.na
2622mobi.na
2623co.na
2624com.na
2625org.na
2626
2627// name : has 2nd-level tlds, but there's no list of them
2628name
2629
2630// nc : http://www.cctld.nc/
2631nc
2632asso.nc
2633
2634// ne : http://en.wikipedia.org/wiki/.ne
2635ne
2636
2637// net : http://en.wikipedia.org/wiki/.net
2638net
2639
2640// CentralNic names : http://www.centralnic.com/names/domains
2641// Submitted by registry <gavin.brown@centralnic.com> 2008-06-17
2642gb.net
2643se.net
2644uk.net
2645
2646// ZaNiC names : http://www.za.net/
2647// Confirmed by registry <hostmaster@nic.za.net> 2009-10-03
2648za.net
2649
2650// nf : http://en.wikipedia.org/wiki/.nf
2651nf
2652com.nf
2653net.nf
2654per.nf
2655rec.nf
2656web.nf
2657arts.nf
2658firm.nf
2659info.nf
2660other.nf
2661store.nf
2662
2663// ng : http://psg.com/dns/ng/
2664// Submitted by registry <randy@psg.com> 2008-06-17
2665ac.ng
2666com.ng
2667edu.ng
2668gov.ng
2669net.ng
2670org.ng
2671
2672// ni : http://www.nic.ni/dominios.htm
2673*.ni
2674
2675// nl : http://www.domain-registry.nl/ace.php/c,728,122,,,,Home.html
2676// Confirmed by registry <Antoin.Verschuren@sidn.nl> (with technical
2677// reservations) 2008-06-08
2678nl
2679
2680// BV.nl will be a registry for dutch BV's (besloten vennootschap)
2681bv.nl
2682
2683// the co.nl domain is managed by CoDNS B.V. Added 2010-05-23.
2684co.nl
2685
2686// no : http://www.norid.no/regelverk/index.en.html
2687// The Norwegian registry has declined to notify us of updates. The web pages
2688// referenced below are the official source of the data. There is also an
2689// announce mailing list:
2690// https://postlister.uninett.no/sympa/info/norid-diskusjon
2691no
2692// Norid generic domains : http://www.norid.no/regelverk/vedlegg-c.en.html
2693fhs.no
2694vgs.no
2695fylkesbibl.no
2696folkebibl.no
2697museum.no
2698idrett.no
2699priv.no
2700// Non-Norid generic domains : http://www.norid.no/regelverk/vedlegg-d.en.html
2701mil.no
2702stat.no
2703dep.no
2704kommune.no
2705herad.no
2706// no geographical names : http://www.norid.no/regelverk/vedlegg-b.en.html
2707// counties
2708aa.no
2709ah.no
2710bu.no
2711fm.no
2712hl.no
2713hm.no
2714jan-mayen.no
2715mr.no
2716nl.no
2717nt.no
2718of.no
2719ol.no
2720oslo.no
2721rl.no
2722sf.no
2723st.no
2724svalbard.no
2725tm.no
2726tr.no
2727va.no
2728vf.no
2729// primary and lower secondary schools per county
2730gs.aa.no
2731gs.ah.no
2732gs.bu.no
2733gs.fm.no
2734gs.hl.no
2735gs.hm.no
2736gs.jan-mayen.no
2737gs.mr.no
2738gs.nl.no
2739gs.nt.no
2740gs.of.no
2741gs.ol.no
2742gs.oslo.no
2743gs.rl.no
2744gs.sf.no
2745gs.st.no
2746gs.svalbard.no
2747gs.tm.no
2748gs.tr.no
2749gs.va.no
2750gs.vf.no
2751// cities
2752akrehamn.no
2753Ã¥krehamn.no
2754algard.no
2755ålgård.no
2756arna.no
2757brumunddal.no
2758bryne.no
2759bronnoysund.no
2760brønnøysund.no
2761drobak.no
2762drøbak.no
2763egersund.no
2764fetsund.no
2765floro.no
2766florø.no
2767fredrikstad.no
2768hokksund.no
2769honefoss.no
2770hønefoss.no
2771jessheim.no
2772jorpeland.no
2773jørpeland.no
2774kirkenes.no
2775kopervik.no
2776krokstadelva.no
2777langevag.no
2778langevåg.no
2779leirvik.no
2780mjondalen.no
2781mjøndalen.no
2782mo-i-rana.no
2783mosjoen.no
2784mosjøen.no
2785nesoddtangen.no
2786orkanger.no
2787osoyro.no
2788osøyro.no
2789raholt.no
2790råholt.no
2791sandnessjoen.no
2792sandnessjøen.no
2793skedsmokorset.no
2794slattum.no
2795spjelkavik.no
2796stathelle.no
2797stavern.no
2798stjordalshalsen.no
2799stjørdalshalsen.no
2800tananger.no
2801tranby.no
2802vossevangen.no
2803// communities
2804afjord.no
2805Ã¥fjord.no
2806agdenes.no
2807al.no
2808Ã¥l.no
2809alesund.no
2810Ã¥lesund.no
2811alstahaug.no
2812alta.no
2813áltá.no
2814alaheadju.no
2815álaheadju.no
2816alvdal.no
2817amli.no
2818Ã¥mli.no
2819amot.no
2820Ã¥mot.no
2821andebu.no
2822andoy.no
2823andøy.no
2824andasuolo.no
2825ardal.no
2826Ã¥rdal.no
2827aremark.no
2828arendal.no
2829Ã¥s.no
2830aseral.no
2831Ã¥seral.no
2832asker.no
2833askim.no
2834askvoll.no
2835askoy.no
2836askøy.no
2837asnes.no
2838Ã¥snes.no
2839audnedaln.no
2840aukra.no
2841aure.no
2842aurland.no
2843aurskog-holand.no
2844aurskog-høland.no
2845austevoll.no
2846austrheim.no
2847averoy.no
2848averøy.no
2849balestrand.no
2850ballangen.no
2851balat.no
2852bálát.no
2853balsfjord.no
2854bahccavuotna.no
2855báhccavuotna.no
2856bamble.no
2857bardu.no
2858beardu.no
2859beiarn.no
2860bajddar.no
2861bájddar.no
2862baidar.no
2863báidár.no
2864berg.no
2865bergen.no
2866berlevag.no
2867berlevåg.no
2868bearalvahki.no
2869bearalváhki.no
2870bindal.no
2871birkenes.no
2872bjarkoy.no
2873bjarkøy.no
2874bjerkreim.no
2875bjugn.no
2876bodo.no
2877bodø.no
2878badaddja.no
2879bådåddjå.no
2880budejju.no
2881bokn.no
2882bremanger.no
2883bronnoy.no
2884brønnøy.no
2885bygland.no
2886bykle.no
2887barum.no
2888bærum.no
2889bo.telemark.no
2890bø.telemark.no
2891bo.nordland.no
2892bø.nordland.no
2893bievat.no
2894bievát.no
2895bomlo.no
2896bømlo.no
2897batsfjord.no
2898båtsfjord.no
2899bahcavuotna.no
2900báhcavuotna.no
2901dovre.no
2902drammen.no
2903drangedal.no
2904dyroy.no
2905dyrøy.no
2906donna.no
2907dønna.no
2908eid.no
2909eidfjord.no
2910eidsberg.no
2911eidskog.no
2912eidsvoll.no
2913eigersund.no
2914elverum.no
2915enebakk.no
2916engerdal.no
2917etne.no
2918etnedal.no
2919evenes.no
2920evenassi.no
2921evenášši.no
2922evje-og-hornnes.no
2923farsund.no
2924fauske.no
2925fuossko.no
2926fuoisku.no
2927fedje.no
2928fet.no
2929finnoy.no
2930finnøy.no
2931fitjar.no
2932fjaler.no
2933fjell.no
2934flakstad.no
2935flatanger.no
2936flekkefjord.no
2937flesberg.no
2938flora.no
2939fla.no
2940flå.no
2941folldal.no
2942forsand.no
2943fosnes.no
2944frei.no
2945frogn.no
2946froland.no
2947frosta.no
2948frana.no
2949fræna.no
2950froya.no
2951frøya.no
2952fusa.no
2953fyresdal.no
2954forde.no
2955førde.no
2956gamvik.no
2957gangaviika.no
2958gáŋgaviika.no
2959gaular.no
2960gausdal.no
2961gildeskal.no
2962gildeskål.no
2963giske.no
2964gjemnes.no
2965gjerdrum.no
2966gjerstad.no
2967gjesdal.no
2968gjovik.no
2969gjøvik.no
2970gloppen.no
2971gol.no
2972gran.no
2973grane.no
2974granvin.no
2975gratangen.no
2976grimstad.no
2977grong.no
2978kraanghke.no
2979kråanghke.no
2980grue.no
2981gulen.no
2982hadsel.no
2983halden.no
2984halsa.no
2985hamar.no
2986hamaroy.no
2987habmer.no
2988hábmer.no
2989hapmir.no
2990hápmir.no
2991hammerfest.no
2992hammarfeasta.no
2993hámmárfeasta.no
2994haram.no
2995hareid.no
2996harstad.no
2997hasvik.no
2998aknoluokta.no
2999ákŋoluokta.no
3000hattfjelldal.no
3001aarborte.no
3002haugesund.no
3003hemne.no
3004hemnes.no
3005hemsedal.no
3006heroy.more-og-romsdal.no
3007herøy.møre-og-romsdal.no
3008heroy.nordland.no
3009herøy.nordland.no
3010hitra.no
3011hjartdal.no
3012hjelmeland.no
3013hobol.no
3014hobøl.no
3015hof.no
3016hol.no
3017hole.no
3018holmestrand.no
3019holtalen.no
3020holtålen.no
3021hornindal.no
3022horten.no
3023hurdal.no
3024hurum.no
3025hvaler.no
3026hyllestad.no
3027hagebostad.no
3028hægebostad.no
3029hoyanger.no
3030høyanger.no
3031hoylandet.no
3032høylandet.no
3033ha.no
3034hå.no
3035ibestad.no
3036inderoy.no
3037inderøy.no
3038iveland.no
3039jevnaker.no
3040jondal.no
3041jolster.no
3042jølster.no
3043karasjok.no
3044karasjohka.no
3045kárášjohka.no
3046karlsoy.no
3047galsa.no
3048gálsá.no
3049karmoy.no
3050karmøy.no
3051kautokeino.no
3052guovdageaidnu.no
3053klepp.no
3054klabu.no
3055klæbu.no
3056kongsberg.no
3057kongsvinger.no
3058kragero.no
3059kragerø.no
3060kristiansand.no
3061kristiansund.no
3062krodsherad.no
3063krødsherad.no
3064kvalsund.no
3065rahkkeravju.no
3066ráhkkerávju.no
3067kvam.no
3068kvinesdal.no
3069kvinnherad.no
3070kviteseid.no
3071kvitsoy.no
3072kvitsøy.no
3073kvafjord.no
3074kvæfjord.no
3075giehtavuoatna.no
3076kvanangen.no
3077kvænangen.no
3078navuotna.no
3079návuotna.no
3080kafjord.no
3081kåfjord.no
3082gaivuotna.no
3083gáivuotna.no
3084larvik.no
3085lavangen.no
3086lavagis.no
3087loabat.no
3088loabát.no
3089lebesby.no
3090davvesiida.no
3091leikanger.no
3092leirfjord.no
3093leka.no
3094leksvik.no
3095lenvik.no
3096leangaviika.no
3097leaŋgaviika.no
3098lesja.no
3099levanger.no
3100lier.no
3101lierne.no
3102lillehammer.no
3103lillesand.no
3104lindesnes.no
3105lindas.no
3106lindås.no
3107lom.no
3108loppa.no
3109lahppi.no
3110láhppi.no
3111lund.no
3112lunner.no
3113luroy.no
3114lurøy.no
3115luster.no
3116lyngdal.no
3117lyngen.no
3118ivgu.no
3119lardal.no
3120lerdal.no
3121lærdal.no
3122lodingen.no
3123lødingen.no
3124lorenskog.no
3125lørenskog.no
3126loten.no
3127løten.no
3128malvik.no
3129masoy.no
3130måsøy.no
3131muosat.no
3132muosát.no
3133mandal.no
3134marker.no
3135marnardal.no
3136masfjorden.no
3137meland.no
3138meldal.no
3139melhus.no
3140meloy.no
3141meløy.no
3142meraker.no
3143meråker.no
3144moareke.no
3145moåreke.no
3146midsund.no
3147midtre-gauldal.no
3148modalen.no
3149modum.no
3150molde.no
3151moskenes.no
3152moss.no
3153mosvik.no
3154malselv.no
3155målselv.no
3156malatvuopmi.no
3157málatvuopmi.no
3158namdalseid.no
3159aejrie.no
3160namsos.no
3161namsskogan.no
3162naamesjevuemie.no
3163nååmesjevuemie.no
3164laakesvuemie.no
3165nannestad.no
3166narvik.no
3167narviika.no
3168naustdal.no
3169nedre-eiker.no
3170nes.akershus.no
3171nes.buskerud.no
3172nesna.no
3173nesodden.no
3174nesseby.no
3175unjarga.no
3176unjárga.no
3177nesset.no
3178nissedal.no
3179nittedal.no
3180nord-aurdal.no
3181nord-fron.no
3182nord-odal.no
3183norddal.no
3184nordkapp.no
3185davvenjarga.no
3186davvenjárga.no
3187nordre-land.no
3188nordreisa.no
3189raisa.no
3190ráisa.no
3191nore-og-uvdal.no
3192notodden.no
3193naroy.no
3194nærøy.no
3195notteroy.no
3196nøtterøy.no
3197odda.no
3198oksnes.no
3199øksnes.no
3200oppdal.no
3201oppegard.no
3202oppegård.no
3203orkdal.no
3204orland.no
3205ørland.no
3206orskog.no
3207ørskog.no
3208orsta.no
3209ørsta.no
3210os.hedmark.no
3211os.hordaland.no
3212osen.no
3213osteroy.no
3214osterøy.no
3215ostre-toten.no
3216østre-toten.no
3217overhalla.no
3218ovre-eiker.no
3219øvre-eiker.no
3220oyer.no
3221øyer.no
3222oygarden.no
3223øygarden.no
3224oystre-slidre.no
3225øystre-slidre.no
3226porsanger.no
3227porsangu.no
3228porsáŋgu.no
3229porsgrunn.no
3230radoy.no
3231radøy.no
3232rakkestad.no
3233rana.no
3234ruovat.no
3235randaberg.no
3236rauma.no
3237rendalen.no
3238rennebu.no
3239rennesoy.no
3240rennesøy.no
3241rindal.no
3242ringebu.no
3243ringerike.no
3244ringsaker.no
3245rissa.no
3246risor.no
3247risør.no
3248roan.no
3249rollag.no
3250rygge.no
3251ralingen.no
3252rælingen.no
3253rodoy.no
3254rødøy.no
3255romskog.no
3256rømskog.no
3257roros.no
3258røros.no
3259rost.no
3260røst.no
3261royken.no
3262røyken.no
3263royrvik.no
3264røyrvik.no
3265rade.no
3266råde.no
3267salangen.no
3268siellak.no
3269saltdal.no
3270salat.no
3271sálát.no
3272sálat.no
3273samnanger.no
3274sande.more-og-romsdal.no
3275sande.møre-og-romsdal.no
3276sande.vestfold.no
3277sandefjord.no
3278sandnes.no
3279sandoy.no
3280sandøy.no
3281sarpsborg.no
3282sauda.no
3283sauherad.no
3284sel.no
3285selbu.no
3286selje.no
3287seljord.no
3288sigdal.no
3289siljan.no
3290sirdal.no
3291skaun.no
3292skedsmo.no
3293ski.no
3294skien.no
3295skiptvet.no
3296skjervoy.no
3297skjervøy.no
3298skierva.no
3299skiervá.no
3300skjak.no
3301skjåk.no
3302skodje.no
3303skanland.no
3304skånland.no
3305skanit.no
3306skánit.no
3307smola.no
3308smøla.no
3309snillfjord.no
3310snasa.no
3311snåsa.no
3312snoasa.no
3313snaase.no
3314snåase.no
3315sogndal.no
3316sokndal.no
3317sola.no
3318solund.no
3319songdalen.no
3320sortland.no
3321spydeberg.no
3322stange.no
3323stavanger.no
3324steigen.no
3325steinkjer.no
3326stjordal.no
3327stjørdal.no
3328stokke.no
3329stor-elvdal.no
3330stord.no
3331stordal.no
3332storfjord.no
3333omasvuotna.no
3334strand.no
3335stranda.no
3336stryn.no
3337sula.no
3338suldal.no
3339sund.no
3340sunndal.no
3341surnadal.no
3342sveio.no
3343svelvik.no
3344sykkylven.no
3345sogne.no
3346søgne.no
3347somna.no
3348sømna.no
3349sondre-land.no
3350søndre-land.no
3351sor-aurdal.no
3352sør-aurdal.no
3353sor-fron.no
3354sør-fron.no
3355sor-odal.no
3356sør-odal.no
3357sor-varanger.no
3358sør-varanger.no
3359matta-varjjat.no
3360mátta-várjjat.no
3361sorfold.no
3362sørfold.no
3363sorreisa.no
3364sørreisa.no
3365sorum.no
3366sørum.no
3367tana.no
3368deatnu.no
3369time.no
3370tingvoll.no
3371tinn.no
3372tjeldsund.no
3373dielddanuorri.no
3374tjome.no
3375tjøme.no
3376tokke.no
3377tolga.no
3378torsken.no
3379tranoy.no
3380tranøy.no
3381tromso.no
3382tromsø.no
3383tromsa.no
3384romsa.no
3385trondheim.no
3386troandin.no
3387trysil.no
3388trana.no
3389træna.no
3390trogstad.no
3391trøgstad.no
3392tvedestrand.no
3393tydal.no
3394tynset.no
3395tysfjord.no
3396divtasvuodna.no
3397divttasvuotna.no
3398tysnes.no
3399tysvar.no
3400tysvær.no
3401tonsberg.no
3402tønsberg.no
3403ullensaker.no
3404ullensvang.no
3405ulvik.no
3406utsira.no
3407vadso.no
3408vadsø.no
3409cahcesuolo.no
3410Äáhcesuolo.no
3411vaksdal.no
3412valle.no
3413vang.no
3414vanylven.no
3415vardo.no
3416vardø.no
3417varggat.no
3418várggát.no
3419vefsn.no
3420vaapste.no
3421vega.no
3422vegarshei.no
3423vegårshei.no
3424vennesla.no
3425verdal.no
3426verran.no
3427vestby.no
3428vestnes.no
3429vestre-slidre.no
3430vestre-toten.no
3431vestvagoy.no
3432vestvågøy.no
3433vevelstad.no
3434vik.no
3435vikna.no
3436vindafjord.no
3437volda.no
3438voss.no
3439varoy.no
3440værøy.no
3441vagan.no
3442vågan.no
3443voagat.no
3444vagsoy.no
3445vågsøy.no
3446vaga.no
3447vågå.no
3448valer.ostfold.no
3449våler.østfold.no
3450valer.hedmark.no
3451våler.hedmark.no
3452
3453// the co.no domain is managed by CoDNS B.V. Added 2010-05-23.
3454co.no
3455
3456// np : http://www.mos.com.np/register.html
3457*.np
3458
3459// nr : http://cenpac.net.nr/dns/index.html
3460// Confirmed by registry <technician@cenpac.net.nr> 2008-06-17
3461nr
3462biz.nr
3463info.nr
3464gov.nr
3465edu.nr
3466org.nr
3467net.nr
3468com.nr
3469
3470// nu : http://en.wikipedia.org/wiki/.nu
3471nu
3472
3473// nz : http://en.wikipedia.org/wiki/.nz
3474*.nz
3475
3476// om : http://en.wikipedia.org/wiki/.om
3477*.om
3478!mediaphone.om
3479!nawrastelecom.om
3480!nawras.om
3481!omanmobile.om
3482!omanpost.om
3483!omantel.om
3484!rakpetroleum.om
3485!siemens.om
3486!songfest.om
3487!statecouncil.om
3488
3489// org : http://en.wikipedia.org/wiki/.org
3490org
3491
3492// CentralNic names : http://www.centralnic.com/names/domains
3493// Submitted by registry <gavin.brown@centralnic.com> 2008-06-17
3494ae.org
3495
3496// ZaNiC names : http://www.za.net/
3497// Confirmed by registry <hostmaster@nic.za.net> 2009-10-03
3498za.org
3499
3500// pa : http://www.nic.pa/
3501// Some additional second level "domains" resolve directly as hostnames, such as
3502// pannet.pa, so we add a rule for "pa".
3503pa
3504ac.pa
3505gob.pa
3506com.pa
3507org.pa
3508sld.pa
3509edu.pa
3510net.pa
3511ing.pa
3512abo.pa
3513med.pa
3514nom.pa
3515
3516// pe : https://www.nic.pe/InformeFinalComision.pdf
3517pe
3518edu.pe
3519gob.pe
3520nom.pe
3521mil.pe
3522org.pe
3523com.pe
3524net.pe
3525
3526// pf : http://www.gobin.info/domainname/formulaire-pf.pdf
3527pf
3528com.pf
3529org.pf
3530edu.pf
3531
3532// pg : http://en.wikipedia.org/wiki/.pg
3533*.pg
3534
3535// ph : http://www.domains.ph/FAQ2.asp
3536// Submitted by registry <jed@email.com.ph> 2008-06-13
3537ph
3538com.ph
3539net.ph
3540org.ph
3541gov.ph
3542edu.ph
3543ngo.ph
3544mil.ph
3545i.ph
3546
3547// pk : http://pk5.pknic.net.pk/pk5/msgNamepk.PK
3548pk
3549com.pk
3550net.pk
3551edu.pk
3552org.pk
3553fam.pk
3554biz.pk
3555web.pk
3556gov.pk
3557gob.pk
3558gok.pk
3559gon.pk
3560gop.pk
3561gos.pk
3562info.pk
3563
3564// pl : http://www.dns.pl/english/
3565pl
3566// NASK functional domains (nask.pl / dns.pl) : http://www.dns.pl/english/dns-funk.html
3567aid.pl
3568agro.pl
3569atm.pl
3570auto.pl
3571biz.pl
3572com.pl
3573edu.pl
3574gmina.pl
3575gsm.pl
3576info.pl
3577mail.pl
3578miasta.pl
3579media.pl
3580mil.pl
3581net.pl
3582nieruchomosci.pl
3583nom.pl
3584org.pl
3585pc.pl
3586powiat.pl
3587priv.pl
3588realestate.pl
3589rel.pl
3590sex.pl
3591shop.pl
3592sklep.pl
3593sos.pl
3594szkola.pl
3595targi.pl
3596tm.pl
3597tourism.pl
3598travel.pl
3599turystyka.pl
3600// ICM functional domains (icm.edu.pl)
36016bone.pl
3602art.pl
3603mbone.pl
3604// Government domains (administered by ippt.gov.pl)
3605gov.pl
3606uw.gov.pl
3607um.gov.pl
3608ug.gov.pl
3609upow.gov.pl
3610starostwo.gov.pl
3611so.gov.pl
3612sr.gov.pl
3613po.gov.pl
3614pa.gov.pl
3615// other functional domains
3616ngo.pl
3617irc.pl
3618usenet.pl
3619// NASK geographical domains : http://www.dns.pl/english/dns-regiony.html
3620augustow.pl
3621babia-gora.pl
3622bedzin.pl
3623beskidy.pl
3624bialowieza.pl
3625bialystok.pl
3626bielawa.pl
3627bieszczady.pl
3628boleslawiec.pl
3629bydgoszcz.pl
3630bytom.pl
3631cieszyn.pl
3632czeladz.pl
3633czest.pl
3634dlugoleka.pl
3635elblag.pl
3636elk.pl
3637glogow.pl
3638gniezno.pl
3639gorlice.pl
3640grajewo.pl
3641ilawa.pl
3642jaworzno.pl
3643jelenia-gora.pl
3644jgora.pl
3645kalisz.pl
3646kazimierz-dolny.pl
3647karpacz.pl
3648kartuzy.pl
3649kaszuby.pl
3650katowice.pl
3651kepno.pl
3652ketrzyn.pl
3653klodzko.pl
3654kobierzyce.pl
3655kolobrzeg.pl
3656konin.pl
3657konskowola.pl
3658kutno.pl
3659lapy.pl
3660lebork.pl
3661legnica.pl
3662lezajsk.pl
3663limanowa.pl
3664lomza.pl
3665lowicz.pl
3666lubin.pl
3667lukow.pl
3668malbork.pl
3669malopolska.pl
3670mazowsze.pl
3671mazury.pl
3672mielec.pl
3673mielno.pl
3674mragowo.pl
3675naklo.pl
3676nowaruda.pl
3677nysa.pl
3678olawa.pl
3679olecko.pl
3680olkusz.pl
3681olsztyn.pl
3682opoczno.pl
3683opole.pl
3684ostroda.pl
3685ostroleka.pl
3686ostrowiec.pl
3687ostrowwlkp.pl
3688pila.pl
3689pisz.pl
3690podhale.pl
3691podlasie.pl
3692polkowice.pl
3693pomorze.pl
3694pomorskie.pl
3695prochowice.pl
3696pruszkow.pl
3697przeworsk.pl
3698pulawy.pl
3699radom.pl
3700rawa-maz.pl
3701rybnik.pl
3702rzeszow.pl
3703sanok.pl
3704sejny.pl
3705siedlce.pl
3706slask.pl
3707slupsk.pl
3708sosnowiec.pl
3709stalowa-wola.pl
3710skoczow.pl
3711starachowice.pl
3712stargard.pl
3713suwalki.pl
3714swidnica.pl
3715swiebodzin.pl
3716swinoujscie.pl
3717szczecin.pl
3718szczytno.pl
3719tarnobrzeg.pl
3720tgory.pl
3721turek.pl
3722tychy.pl
3723ustka.pl
3724walbrzych.pl
3725warmia.pl
3726warszawa.pl
3727waw.pl
3728wegrow.pl
3729wielun.pl
3730wlocl.pl
3731wloclawek.pl
3732wodzislaw.pl
3733wolomin.pl
3734wroclaw.pl
3735zachpomor.pl
3736zagan.pl
3737zarow.pl
3738zgora.pl
3739zgorzelec.pl
3740// TASK geographical domains (www.task.gda.pl/uslugi/dns)
3741gda.pl
3742gdansk.pl
3743gdynia.pl
3744med.pl
3745sopot.pl
3746// other geographical domains
3747gliwice.pl
3748krakow.pl
3749poznan.pl
3750wroc.pl
3751zakopane.pl
3752
3753// co.pl : Mainseek Sp. z o.o. http://www.co.pl
3754co.pl
3755
3756// pn : http://www.government.pn/PnRegistry/policies.htm
3757pn
3758gov.pn
3759co.pn
3760org.pn
3761edu.pn
3762net.pn
3763
3764// pr : http://www.nic.pr/index.asp?f=1
3765pr
3766com.pr
3767net.pr
3768org.pr
3769gov.pr
3770edu.pr
3771isla.pr
3772pro.pr
3773biz.pr
3774info.pr
3775name.pr
3776// these aren't mentioned on nic.pr, but on http://en.wikipedia.org/wiki/.pr
3777est.pr
3778prof.pr
3779ac.pr
3780
3781// pro : http://www.nic.pro/support_faq.htm
3782pro
3783aca.pro
3784bar.pro
3785cpa.pro
3786jur.pro
3787law.pro
3788med.pro
3789eng.pro
3790
3791// ps : http://en.wikipedia.org/wiki/.ps
3792// http://www.nic.ps/registration/policy.html#reg
3793ps
3794edu.ps
3795gov.ps
3796sec.ps
3797plo.ps
3798com.ps
3799org.ps
3800net.ps
3801
3802// pt : http://online.dns.pt/dns/start_dns
3803pt
3804net.pt
3805gov.pt
3806org.pt
3807edu.pt
3808int.pt
3809publ.pt
3810com.pt
3811nome.pt
3812
3813// pw : http://en.wikipedia.org/wiki/.pw
3814pw
3815co.pw
3816ne.pw
3817or.pw
3818ed.pw
3819go.pw
3820belau.pw
3821
3822// py : http://www.nic.py/faq_a.html#faq_b
3823*.py
3824
3825// qa : http://www.qatar.net.qa/services/virtual.htm
3826*.qa
3827
3828// re : http://www.afnic.re/obtenir/chartes/nommage-re/annexe-descriptifs
3829re
3830com.re
3831asso.re
3832nom.re
3833
3834// ro : http://www.rotld.ro/
3835ro
3836com.ro
3837org.ro
3838tm.ro
3839nt.ro
3840nom.ro
3841info.ro
3842rec.ro
3843arts.ro
3844firm.ro
3845store.ro
3846www.ro
3847
3848// rs : http://en.wikipedia.org/wiki/.rs
3849rs
3850co.rs
3851org.rs
3852edu.rs
3853ac.rs
3854gov.rs
3855in.rs
3856
3857// ru : http://www.cctld.ru/ru/docs/aktiv_8.php
3858// Industry domains
3859ru
3860ac.ru
3861com.ru
3862edu.ru
3863int.ru
3864net.ru
3865org.ru
3866pp.ru
3867// Geographical domains
3868adygeya.ru
3869altai.ru
3870amur.ru
3871arkhangelsk.ru
3872astrakhan.ru
3873bashkiria.ru
3874belgorod.ru
3875bir.ru
3876bryansk.ru
3877buryatia.ru
3878cbg.ru
3879chel.ru
3880chelyabinsk.ru
3881chita.ru
3882chukotka.ru
3883chuvashia.ru
3884dagestan.ru
3885dudinka.ru
3886e-burg.ru
3887grozny.ru
3888irkutsk.ru
3889ivanovo.ru
3890izhevsk.ru
3891jar.ru
3892joshkar-ola.ru
3893kalmykia.ru
3894kaluga.ru
3895kamchatka.ru
3896karelia.ru
3897kazan.ru
3898kchr.ru
3899kemerovo.ru
3900khabarovsk.ru
3901khakassia.ru
3902khv.ru
3903kirov.ru
3904koenig.ru
3905komi.ru
3906kostroma.ru
3907krasnoyarsk.ru
3908kuban.ru
3909kurgan.ru
3910kursk.ru
3911lipetsk.ru
3912magadan.ru
3913mari.ru
3914mari-el.ru
3915marine.ru
3916mordovia.ru
3917mosreg.ru
3918msk.ru
3919murmansk.ru
3920nalchik.ru
3921nnov.ru
3922nov.ru
3923novosibirsk.ru
3924nsk.ru
3925omsk.ru
3926orenburg.ru
3927oryol.ru
3928palana.ru
3929penza.ru
3930perm.ru
3931pskov.ru
3932ptz.ru
3933rnd.ru
3934ryazan.ru
3935sakhalin.ru
3936samara.ru
3937saratov.ru
3938simbirsk.ru
3939smolensk.ru
3940spb.ru
3941stavropol.ru
3942stv.ru
3943surgut.ru
3944tambov.ru
3945tatarstan.ru
3946tom.ru
3947tomsk.ru
3948tsaritsyn.ru
3949tsk.ru
3950tula.ru
3951tuva.ru
3952tver.ru
3953tyumen.ru
3954udm.ru
3955udmurtia.ru
3956ulan-ude.ru
3957vladikavkaz.ru
3958vladimir.ru
3959vladivostok.ru
3960volgograd.ru
3961vologda.ru
3962voronezh.ru
3963vrn.ru
3964vyatka.ru
3965yakutia.ru
3966yamal.ru
3967yaroslavl.ru
3968yekaterinburg.ru
3969yuzhno-sakhalinsk.ru
3970// More geographical domains
3971amursk.ru
3972baikal.ru
3973cmw.ru
3974fareast.ru
3975jamal.ru
3976kms.ru
3977k-uralsk.ru
3978kustanai.ru
3979kuzbass.ru
3980magnitka.ru
3981mytis.ru
3982nakhodka.ru
3983nkz.ru
3984norilsk.ru
3985oskol.ru
3986pyatigorsk.ru
3987rubtsovsk.ru
3988snz.ru
3989syzran.ru
3990vdonsk.ru
3991zgrad.ru
3992// State domains
3993gov.ru
3994mil.ru
3995// Technical domains
3996test.ru
3997
3998// rw : http://www.nic.rw/cgi-bin/policy.pl
3999rw
4000gov.rw
4001net.rw
4002edu.rw
4003ac.rw
4004com.rw
4005co.rw
4006int.rw
4007mil.rw
4008gouv.rw
4009
4010// sa : http://www.nic.net.sa/
4011sa
4012com.sa
4013net.sa
4014org.sa
4015gov.sa
4016med.sa
4017pub.sa
4018edu.sa
4019sch.sa
4020
4021// sb : http://www.sbnic.net.sb/
4022// Submitted by registry <lee.humphries@telekom.com.sb> 2008-06-08
4023sb
4024com.sb
4025edu.sb
4026gov.sb
4027net.sb
4028org.sb
4029
4030// sc : http://www.nic.sc/
4031sc
4032com.sc
4033gov.sc
4034net.sc
4035org.sc
4036edu.sc
4037
4038// sd : http://www.isoc.sd/sudanic.isoc.sd/billing_pricing.htm
4039// Submitted by registry <admin@isoc.sd> 2008-06-17
4040sd
4041com.sd
4042net.sd
4043org.sd
4044edu.sd
4045med.sd
4046gov.sd
4047info.sd
4048
4049// se : http://en.wikipedia.org/wiki/.se
4050// Submitted by registry <Patrik.Wallstrom@iis.se> 2008-06-24
4051se
4052a.se
4053ac.se
4054b.se
4055bd.se
4056brand.se
4057c.se
4058d.se
4059e.se
4060f.se
4061fh.se
4062fhsk.se
4063fhv.se
4064g.se
4065h.se
4066i.se
4067k.se
4068komforb.se
4069kommunalforbund.se
4070komvux.se
4071l.se
4072lanbib.se
4073m.se
4074n.se
4075naturbruksgymn.se
4076o.se
4077org.se
4078p.se
4079parti.se
4080pp.se
4081press.se
4082r.se
4083s.se
4084sshn.se
4085t.se
4086tm.se
4087u.se
4088w.se
4089x.se
4090y.se
4091z.se
4092
4093// sg : http://www.nic.net.sg/sub_policies_agreement/2ld.html
4094sg
4095com.sg
4096net.sg
4097org.sg
4098gov.sg
4099edu.sg
4100per.sg
4101
4102// sh : http://www.nic.sh/rules.html
4103// list of 2nd level domains ?
4104sh
4105
4106// si : http://en.wikipedia.org/wiki/.si
4107si
4108
4109// sj : No registrations at this time.
4110// Submitted by registry <jarle@uninett.no> 2008-06-16
4111
4112// sk : http://en.wikipedia.org/wiki/.sk
4113// list of 2nd level domains ?
4114sk
4115
4116// sl : http://www.nic.sl
4117// Submitted by registry <adam@neoip.com> 2008-06-12
4118sl
4119com.sl
4120net.sl
4121edu.sl
4122gov.sl
4123org.sl
4124
4125// sm : http://en.wikipedia.org/wiki/.sm
4126sm
4127
4128// sn : http://en.wikipedia.org/wiki/.sn
4129sn
4130art.sn
4131com.sn
4132edu.sn
4133gouv.sn
4134org.sn
4135perso.sn
4136univ.sn
4137
4138// so : http://www.soregistry.com/
4139so
4140com.so
4141net.so
4142org.so
4143
4144// sr : http://en.wikipedia.org/wiki/.sr
4145sr
4146
4147// st : http://www.nic.st/html/policyrules/
4148st
4149co.st
4150com.st
4151consulado.st
4152edu.st
4153embaixada.st
4154gov.st
4155mil.st
4156net.st
4157org.st
4158principe.st
4159saotome.st
4160store.st
4161
4162// su : http://en.wikipedia.org/wiki/.su
4163su
4164
4165// sv : http://www.svnet.org.sv/svpolicy.html
4166*.sv
4167
4168// sy : http://en.wikipedia.org/wiki/.sy
4169// see also: http://www.gobin.info/domainname/sy.doc
4170sy
4171edu.sy
4172gov.sy
4173net.sy
4174mil.sy
4175com.sy
4176org.sy
4177
4178// sz : http://en.wikipedia.org/wiki/.sz
4179// http://www.sispa.org.sz/
4180sz
4181co.sz
4182ac.sz
4183org.sz
4184
4185// tc : http://en.wikipedia.org/wiki/.tc
4186tc
4187
4188// td : http://en.wikipedia.org/wiki/.td
4189td
4190
4191// tel: http://en.wikipedia.org/wiki/.tel
4192// http://www.telnic.org/
4193tel
4194
4195// tf : http://en.wikipedia.org/wiki/.tf
4196tf
4197
4198// tg : http://en.wikipedia.org/wiki/.tg
4199// http://www.nic.tg/nictg/index.php implies no reserved 2nd-level domains,
4200// although this contradicts wikipedia.
4201tg
4202
4203// th : http://en.wikipedia.org/wiki/.th
4204// Submitted by registry <krit@thains.co.th> 2008-06-17
4205th
4206ac.th
4207co.th
4208go.th
4209in.th
4210mi.th
4211net.th
4212or.th
4213
4214// tj : http://www.nic.tj/policy.htm
4215tj
4216ac.tj
4217biz.tj
4218co.tj
4219com.tj
4220edu.tj
4221go.tj
4222gov.tj
4223int.tj
4224mil.tj
4225name.tj
4226net.tj
4227nic.tj
4228org.tj
4229test.tj
4230web.tj
4231
4232// tk : http://en.wikipedia.org/wiki/.tk
4233tk
4234
4235// tl : http://en.wikipedia.org/wiki/.tl
4236tl
4237gov.tl
4238
4239// tm : http://www.nic.tm/rules.html
4240// list of 2nd level tlds ?
4241tm
4242
4243// tn : http://en.wikipedia.org/wiki/.tn
4244// http://whois.ati.tn/
4245tn
4246com.tn
4247ens.tn
4248fin.tn
4249gov.tn
4250ind.tn
4251intl.tn
4252nat.tn
4253net.tn
4254org.tn
4255info.tn
4256perso.tn
4257tourism.tn
4258edunet.tn
4259rnrt.tn
4260rns.tn
4261rnu.tn
4262mincom.tn
4263agrinet.tn
4264defense.tn
4265turen.tn
4266
4267// to : http://en.wikipedia.org/wiki/.to
4268// Submitted by registry <egullich@colo.to> 2008-06-17
4269to
4270com.to
4271gov.to
4272net.to
4273org.to
4274edu.to
4275mil.to
4276
4277// tr : http://en.wikipedia.org/wiki/.tr
4278*.tr
4279!nic.tr
4280// Used by government in the TRNC
4281// http://en.wikipedia.org/wiki/.nc.tr
4282gov.nc.tr
4283
4284// travel : http://en.wikipedia.org/wiki/.travel
4285travel
4286
4287// tt : http://www.nic.tt/
4288tt
4289co.tt
4290com.tt
4291org.tt
4292net.tt
4293biz.tt
4294info.tt
4295pro.tt
4296int.tt
4297coop.tt
4298jobs.tt
4299mobi.tt
4300travel.tt
4301museum.tt
4302aero.tt
4303name.tt
4304gov.tt
4305edu.tt
4306
4307// tv : http://en.wikipedia.org/wiki/.tv
4308// Not listing any 2LDs as reserved since none seem to exist in practice,
4309// Wikipedia notwithstanding.
4310tv
4311
4312// tw : http://en.wikipedia.org/wiki/.tw
4313tw
4314edu.tw
4315gov.tw
4316mil.tw
4317com.tw
4318net.tw
4319org.tw
4320idv.tw
4321game.tw
4322ebiz.tw
4323club.tw
4324網路.tw
4325組織.tw
4326商業.tw
4327
4328// tz : http://en.wikipedia.org/wiki/.tz
4329// Submitted by registry <randy@psg.com> 2008-06-17
4330// Updated from http://www.tznic.or.tz/index.php/domains.html 2010-10-25
4331ac.tz
4332co.tz
4333go.tz
4334mil.tz
4335ne.tz
4336or.tz
4337sc.tz
4338
4339// ua : http://www.nic.net.ua/
4340ua
4341com.ua
4342edu.ua
4343gov.ua
4344in.ua
4345net.ua
4346org.ua
4347// ua geo-names
4348cherkassy.ua
4349chernigov.ua
4350chernovtsy.ua
4351ck.ua
4352cn.ua
4353crimea.ua
4354cv.ua
4355dn.ua
4356dnepropetrovsk.ua
4357donetsk.ua
4358dp.ua
4359if.ua
4360ivano-frankivsk.ua
4361kh.ua
4362kharkov.ua
4363kherson.ua
4364khmelnitskiy.ua
4365kiev.ua
4366kirovograd.ua
4367km.ua
4368kr.ua
4369ks.ua
4370kv.ua
4371lg.ua
4372lugansk.ua
4373lutsk.ua
4374lviv.ua
4375mk.ua
4376nikolaev.ua
4377od.ua
4378odessa.ua
4379pl.ua
4380poltava.ua
4381rovno.ua
4382rv.ua
4383sebastopol.ua
4384sumy.ua
4385te.ua
4386ternopil.ua
4387uzhgorod.ua
4388vinnica.ua
4389vn.ua
4390zaporizhzhe.ua
4391zp.ua
4392zhitomir.ua
4393zt.ua
4394
4395// ug : http://www.registry.co.ug/
4396ug
4397co.ug
4398ac.ug
4399sc.ug
4400go.ug
4401ne.ug
4402or.ug
4403
4404// uk : http://en.wikipedia.org/wiki/.uk
4405*.uk
4406*.sch.uk
4407!bl.uk
4408!british-library.uk
4409!icnet.uk
4410!jet.uk
4411!mod.uk
4412!nel.uk
4413!nhs.uk
4414!nic.uk
4415!nls.uk
4416!national-library-scotland.uk
4417!parliament.uk
4418!police.uk
4419
4420// us : http://en.wikipedia.org/wiki/.us
4421us
4422dni.us
4423fed.us
4424isa.us
4425kids.us
4426nsn.us
4427// us geographic names
4428ak.us
4429al.us
4430ar.us
4431as.us
4432az.us
4433ca.us
4434co.us
4435ct.us
4436dc.us
4437de.us
4438fl.us
4439ga.us
4440gu.us
4441hi.us
4442ia.us
4443id.us
4444il.us
4445in.us
4446ks.us
4447ky.us
4448la.us
4449ma.us
4450md.us
4451me.us
4452mi.us
4453mn.us
4454mo.us
4455ms.us
4456mt.us
4457nc.us
4458nd.us
4459ne.us
4460nh.us
4461nj.us
4462nm.us
4463nv.us
4464ny.us
4465oh.us
4466ok.us
4467or.us
4468pa.us
4469pr.us
4470ri.us
4471sc.us
4472sd.us
4473tn.us
4474tx.us
4475ut.us
4476vi.us
4477vt.us
4478va.us
4479wa.us
4480wi.us
4481wv.us
4482wy.us
4483// The registrar notes several more specific domains available in each state,
4484// such as state.*.us, dst.*.us, etc., but resolution of these is somewhat
4485// haphazard; in some states these domains resolve as addresses, while in others
4486// only subdomains are available, or even nothing at all. We include the
4487// most common ones where it's clear that different sites are different
4488// entities.
4489k12.ak.us
4490k12.al.us
4491k12.ar.us
4492k12.as.us
4493k12.az.us
4494k12.ca.us
4495k12.co.us
4496k12.ct.us
4497k12.dc.us
4498k12.de.us
4499k12.fl.us
4500k12.ga.us
4501k12.gu.us
4502// k12.hi.us Hawaii has a state-wide DOE login: bug 614565
4503k12.ia.us
4504k12.id.us
4505k12.il.us
4506k12.in.us
4507k12.ks.us
4508k12.ky.us
4509k12.la.us
4510k12.ma.us
4511k12.md.us
4512k12.me.us
4513k12.mi.us
4514k12.mn.us
4515k12.mo.us
4516k12.ms.us
4517k12.mt.us
4518k12.nc.us
4519k12.nd.us
4520k12.ne.us
4521k12.nh.us
4522k12.nj.us
4523k12.nm.us
4524k12.nv.us
4525k12.ny.us
4526k12.oh.us
4527k12.ok.us
4528k12.or.us
4529k12.pa.us
4530k12.pr.us
4531k12.ri.us
4532k12.sc.us
4533k12.sd.us
4534k12.tn.us
4535k12.tx.us
4536k12.ut.us
4537k12.vi.us
4538k12.vt.us
4539k12.va.us
4540k12.wa.us
4541k12.wi.us
4542k12.wv.us
4543k12.wy.us
4544
4545cc.ak.us
4546cc.al.us
4547cc.ar.us
4548cc.as.us
4549cc.az.us
4550cc.ca.us
4551cc.co.us
4552cc.ct.us
4553cc.dc.us
4554cc.de.us
4555cc.fl.us
4556cc.ga.us
4557cc.gu.us
4558cc.hi.us
4559cc.ia.us
4560cc.id.us
4561cc.il.us
4562cc.in.us
4563cc.ks.us
4564cc.ky.us
4565cc.la.us
4566cc.ma.us
4567cc.md.us
4568cc.me.us
4569cc.mi.us
4570cc.mn.us
4571cc.mo.us
4572cc.ms.us
4573cc.mt.us
4574cc.nc.us
4575cc.nd.us
4576cc.ne.us
4577cc.nh.us
4578cc.nj.us
4579cc.nm.us
4580cc.nv.us
4581cc.ny.us
4582cc.oh.us
4583cc.ok.us
4584cc.or.us
4585cc.pa.us
4586cc.pr.us
4587cc.ri.us
4588cc.sc.us
4589cc.sd.us
4590cc.tn.us
4591cc.tx.us
4592cc.ut.us
4593cc.vi.us
4594cc.vt.us
4595cc.va.us
4596cc.wa.us
4597cc.wi.us
4598cc.wv.us
4599cc.wy.us
4600
4601lib.ak.us
4602lib.al.us
4603lib.ar.us
4604lib.as.us
4605lib.az.us
4606lib.ca.us
4607lib.co.us
4608lib.ct.us
4609lib.dc.us
4610lib.de.us
4611lib.fl.us
4612lib.ga.us
4613lib.gu.us
4614lib.hi.us
4615lib.ia.us
4616lib.id.us
4617lib.il.us
4618lib.in.us
4619lib.ks.us
4620lib.ky.us
4621lib.la.us
4622lib.ma.us
4623lib.md.us
4624lib.me.us
4625lib.mi.us
4626lib.mn.us
4627lib.mo.us
4628lib.ms.us
4629lib.mt.us
4630lib.nc.us
4631lib.nd.us
4632lib.ne.us
4633lib.nh.us
4634lib.nj.us
4635lib.nm.us
4636lib.nv.us
4637lib.ny.us
4638lib.oh.us
4639lib.ok.us
4640lib.or.us
4641lib.pa.us
4642lib.pr.us
4643lib.ri.us
4644lib.sc.us
4645lib.sd.us
4646lib.tn.us
4647lib.tx.us
4648lib.ut.us
4649lib.vi.us
4650lib.vt.us
4651lib.va.us
4652lib.wa.us
4653lib.wi.us
4654lib.wv.us
4655lib.wy.us
4656
4657// k12.ma.us contains school districts in Massachusetts. The 4LDs are
4658// managed indepedently except for private (PVT), charter (CHTR) and
4659// parochial (PAROCH) schools. Those are delegated dorectly to the
4660// 5LD operators. <k12-ma-hostmaster _ at _ rsuc.gweep.net>
4661pvt.k12.ma.us
4662chtr.k12.ma.us
4663paroch.k12.ma.us
4664
4665// uy : http://www.antel.com.uy/
4666*.uy
4667
4668// uz : http://www.reg.uz/registerr.html
4669// are there other 2nd level tlds ?
4670uz
4671com.uz
4672co.uz
4673
4674// va : http://en.wikipedia.org/wiki/.va
4675va
4676
4677// vc : http://en.wikipedia.org/wiki/.vc
4678// Submitted by registry <kshah@ca.afilias.info> 2008-06-13
4679vc
4680com.vc
4681net.vc
4682org.vc
4683gov.vc
4684mil.vc
4685edu.vc
4686
4687// ve : http://registro.nic.ve/nicve/registro/index.html
4688*.ve
4689
4690// vg : http://en.wikipedia.org/wiki/.vg
4691vg
4692
4693// vi : http://www.nic.vi/newdomainform.htm
4694// http://www.nic.vi/Domain_Rules/body_domain_rules.html indicates some other
4695// TLDs are "reserved", such as edu.vi and gov.vi, but doesn't actually say they
4696// are available for registration (which they do not seem to be).
4697vi
4698co.vi
4699com.vi
4700k12.vi
4701net.vi
4702org.vi
4703
4704// vn : https://www.dot.vn/vnnic/vnnic/domainregistration.jsp
4705vn
4706com.vn
4707net.vn
4708org.vn
4709edu.vn
4710gov.vn
4711int.vn
4712ac.vn
4713biz.vn
4714info.vn
4715name.vn
4716pro.vn
4717health.vn
4718
4719// vu : http://en.wikipedia.org/wiki/.vu
4720// list of 2nd level tlds ?
4721vu
4722
4723// ws : http://en.wikipedia.org/wiki/.ws
4724// http://samoanic.ws/index.dhtml
4725ws
4726com.ws
4727net.ws
4728org.ws
4729gov.ws
4730edu.ws
4731
4732// IDN ccTLDs
4733// Please sort by ISO 3166 ccTLD, then punicode string
4734// when submitting patches and follow this format:
4735// <Punicode> ("<english word>" <language>) : <ISO 3166 ccTLD>
4736// [optional sponsoring org]
4737// <URL>
4738
4739// xn--mgbaam7a8h ("Emerat" Arabic) : AE
4740//http://nic.ae/english/arabicdomain/rules.jsp
4741امارات
4742
4743// xn--54b7fta0cc ("Bangla" Bangla) : BD
4744বাংলা
4745
4746// xn--fiqs8s ("China" Chinese-Han-Simplified <.Zhonggou>) : CN
4747// CNNIC
4748// http://cnnic.cn/html/Dir/2005/10/11/3218.htm
4749中国
4750
4751// xn--fiqz9s ("China" Chinese-Han-Traditional <.Zhonggou>) : CN
4752// CNNIC
4753// http://cnnic.cn/html/Dir/2005/10/11/3218.htm
4754中國
4755
4756// xn--lgbbat1ad8j ("Algeria / Al Jazair" Arabic) : DZ
4757الجزائر
4758
4759// xn--wgbh1c ("Egypt" Arabic .masr) : EG
4760// http://www.dotmasr.eg/
4761مصر
4762
4763// xn--node ("ge" Georgian (Mkhedruli)) : GE
4764გე
4765
4766// xn--j6w193g ("Hong Kong" Chinese-Han) : HK
4767// https://www2.hkirc.hk/register/rules.jsp
4768香港
4769
4770// xn--h2brj9c ("Bharat" Devanagari) : IN
4771// India
4772भारत
4773
4774// xn--mgbbh1a71e ("Bharat" Arabic) : IN
4775// India
4776بھارت
4777
4778// xn--fpcrj9c3d ("Bharat" Telugu) : IN
4779// India
4780భారతà±
4781
4782// xn--gecrj9c ("Bharat" Gujarati) : IN
4783// India
4784ભારત
4785
4786// xn--s9brj9c ("Bharat" Gurmukhi) : IN
4787// India
4788ਭਾਰਤ
4789
4790// xn--45brj9c ("Bharat" Bengali) : IN
4791// India
4792ভারত
4793
4794// xn--xkc2dl3a5ee0h ("India" Tamil) : IN
4795// India
4796இநà¯à®¤à®¿à®¯à®¾
4797
4798// xn--mgba3a4f16a ("Iran" Persian) : IR
4799ایران
4800
4801// xn--mgba3a4fra ("Iran" Arabic) : IR
4802ايران
4803
4804//xn--mgbayh7gpa ("al-Ordon" Arabic) JO
4805//National Information Technology Center (NITC)
4806//Royal Scientific Society, Al-Jubeiha
4807الاردن
4808
4809// xn--3e0b707e ("Republic of Korea" Hangul) : KR
4810한국
4811
4812// xn--fzc2c9e2c ("Lanka" Sinhalese-Sinhala) : LK
4813// http://nic.lk
4814ලංකà·
4815
4816// xn--xkc2al3hye2a ("Ilangai" Tamil) : LK
4817// http://nic.lk
4818இலஙà¯à®•ை
4819
4820// xn--mgbc0a9azcg ("Morocco / al-Maghrib" Arabic) : MA
4821المغرب
4822
4823// xn--mgb9awbf ("Oman" Arabic) : OM
4824عمان
4825
4826// xn--ygbi2ammx ("Falasteen" Arabic) : PS
4827// The Palestinian National Internet Naming Authority (PNINA)
4828// http://www.pnina.ps
4829Ùلسطين
4830
4831// xn--90a3ac ("srb" Cyrillic) : RS
4832Ñрб
4833
4834// xn--p1ai ("rf" Russian-Cyrillic) : RU
4835// http://www.cctld.ru/en/docs/rulesrf.php
4836рф
4837
4838// xn--wgbl6a ("Qatar" Arabic) : QA
4839// http://www.ict.gov.qa/
4840قطر
4841
4842// xn--mgberp4a5d4ar ("AlSaudiah" Arabic) : SA
4843// http://www.nic.net.sa/
4844السعودية
4845
4846// xn--mgberp4a5d4a87g ("AlSaudiah" Arabic) variant : SA
4847السعودیة
4848
4849// xn--mgbqly7c0a67fbc ("AlSaudiah" Arabic) variant : SA
4850السعودیۃ
4851
4852// xn--mgbqly7cvafr ("AlSaudiah" Arabic) variant : SA
4853السعوديه
4854
4855// xn--ogbpf8fl ("Syria" Arabic) : SY
4856سورية
4857
4858// xn--mgbtf8fl ("Syria" Arabic) variant : SY
4859سوريا
4860
4861// xn--yfro4i67o Singapore ("Singapore" Chinese-Han) : SG
4862新加å¡
4863
4864// xn--clchc0ea0b2g2a9gcd ("Singapore" Tamil) : SG
4865சிஙà¯à®•பà¯à®ªà¯‚à®°à¯
4866
4867// xn--o3cw4h ("Thai" Thai) : TH
4868// http://www.thnic.co.th
4869ไทย
4870
4871// xn--pgbs0dh ("Tunis") : TN
4872// http://nic.tn
4873تونس
4874
4875// xn--kpry57d ("Taiwan" Chinese-Han-Traditional) : TW
4876// http://www.twnic.net/english/dn/dn_07a.htm
4877å°ç£
4878
4879// xn--kprw13d ("Taiwan" Chinese-Han-Simplified) : TW
4880// http://www.twnic.net/english/dn/dn_07a.htm
4881å°æ¹¾
4882
4883// xn--nnx388a ("Taiwan") variant : TW
4884臺ç£
4885
4886// xn--j1amh ("ukr" Cyrillic) : UA
4887укр
4888
4889// xn--mgb2ddes ("AlYemen" Arabic) : YE
4890اليمن
4891
4892// xxx : http://icmregistry.com
4893xxx
4894
4895// ye : http://www.y.net.ye/services/domain_name.htm
4896*.ye
4897
4898// yu : http://www.nic.yu/pravilnik-e.html
4899*.yu
4900
4901// za : http://www.zadna.org.za/slds.html
4902*.za
4903
4904// zm : http://en.wikipedia.org/wiki/.zm
4905*.zm
4906
4907// zw : http://en.wikipedia.org/wiki/.zw
4908*.zw
4909
4910// DynDNS.com Dynamic DNS zones : http://www.dyndns.com/services/dns/dyndns/
4911dyndns-at-home.com
4912dyndns-at-work.com
4913dyndns-blog.com
4914dyndns-free.com
4915dyndns-home.com
4916dyndns-ip.com
4917dyndns-mail.com
4918dyndns-office.com
4919dyndns-pics.com
4920dyndns-remote.com
4921dyndns-server.com
4922dyndns-web.com
4923dyndns-wiki.com
4924dyndns-work.com
4925dyndns.biz
4926dyndns.info
4927dyndns.org
4928dyndns.tv
4929at-band-camp.net
4930ath.cx
4931barrel-of-knowledge.info
4932barrell-of-knowledge.info
4933better-than.tv
4934blogdns.com
4935blogdns.net
4936blogdns.org
4937blogsite.org
4938boldlygoingnowhere.org
4939broke-it.net
4940buyshouses.net
4941cechire.com
4942dnsalias.com
4943dnsalias.net
4944dnsalias.org
4945dnsdojo.com
4946dnsdojo.net
4947dnsdojo.org
4948does-it.net
4949doesntexist.com
4950doesntexist.org
4951dontexist.com
4952dontexist.net
4953dontexist.org
4954doomdns.com
4955doomdns.org
4956dvrdns.org
4957dyn-o-saur.com
4958dynalias.com
4959dynalias.net
4960dynalias.org
4961dynathome.net
4962dyndns.ws
4963endofinternet.net
4964endofinternet.org
4965endoftheinternet.org
4966est-a-la-maison.com
4967est-a-la-masion.com
4968est-le-patron.com
4969est-mon-blogueur.com
4970for-better.biz
4971for-more.biz
4972for-our.info
4973for-some.biz
4974for-the.biz
4975forgot.her.name
4976forgot.his.name
4977from-ak.com
4978from-al.com
4979from-ar.com
4980from-az.net
4981from-ca.com
4982from-co.net
4983from-ct.com
4984from-dc.com
4985from-de.com
4986from-fl.com
4987from-ga.com
4988from-hi.com
4989from-ia.com
4990from-id.com
4991from-il.com
4992from-in.com
4993from-ks.com
4994from-ky.com
4995from-la.net
4996from-ma.com
4997from-md.com
4998from-me.org
4999from-mi.com
5000from-mn.com
5001from-mo.com
5002from-ms.com
5003from-mt.com
5004from-nc.com
5005from-nd.com
5006from-ne.com
5007from-nh.com
5008from-nj.com
5009from-nm.com
5010from-nv.com
5011from-ny.net
5012from-oh.com
5013from-ok.com
5014from-or.com
5015from-pa.com
5016from-pr.com
5017from-ri.com
5018from-sc.com
5019from-sd.com
5020from-tn.com
5021from-tx.com
5022from-ut.com
5023from-va.com
5024from-vt.com
5025from-wa.com
5026from-wi.com
5027from-wv.com
5028from-wy.com
5029ftpaccess.cc
5030fuettertdasnetz.de
5031game-host.org
5032game-server.cc
5033getmyip.com
5034gets-it.net
5035go.dyndns.org
5036gotdns.com
5037gotdns.org
5038groks-the.info
5039groks-this.info
5040ham-radio-op.net
5041here-for-more.info
5042hobby-site.com
5043hobby-site.org
5044home.dyndns.org
5045homedns.org
5046homeftp.net
5047homeftp.org
5048homeip.net
5049homelinux.com
5050homelinux.net
5051homelinux.org
5052homeunix.com
5053homeunix.net
5054homeunix.org
5055iamallama.com
5056in-the-band.net
5057is-a-anarchist.com
5058is-a-blogger.com
5059is-a-bookkeeper.com
5060is-a-bruinsfan.org
5061is-a-bulls-fan.com
5062is-a-candidate.org
5063is-a-caterer.com
5064is-a-celticsfan.org
5065is-a-chef.com
5066is-a-chef.net
5067is-a-chef.org
5068is-a-conservative.com
5069is-a-cpa.com
5070is-a-cubicle-slave.com
5071is-a-democrat.com
5072is-a-designer.com
5073is-a-doctor.com
5074is-a-financialadvisor.com
5075is-a-geek.com
5076is-a-geek.net
5077is-a-geek.org
5078is-a-green.com
5079is-a-guru.com
5080is-a-hard-worker.com
5081is-a-hunter.com
5082is-a-knight.org
5083is-a-landscaper.com
5084is-a-lawyer.com
5085is-a-liberal.com
5086is-a-libertarian.com
5087is-a-linux-user.org
5088is-a-llama.com
5089is-a-musician.com
5090is-a-nascarfan.com
5091is-a-nurse.com
5092is-a-painter.com
5093is-a-patsfan.org
5094is-a-personaltrainer.com
5095is-a-photographer.com
5096is-a-player.com
5097is-a-republican.com
5098is-a-rockstar.com
5099is-a-socialist.com
5100is-a-soxfan.org
5101is-a-student.com
5102is-a-teacher.com
5103is-a-techie.com
5104is-a-therapist.com
5105is-an-accountant.com
5106is-an-actor.com
5107is-an-actress.com
5108is-an-anarchist.com
5109is-an-artist.com
5110is-an-engineer.com
5111is-an-entertainer.com
5112is-by.us
5113is-certified.com
5114is-found.org
5115is-gone.com
5116is-into-anime.com
5117is-into-cars.com
5118is-into-cartoons.com
5119is-into-games.com
5120is-leet.com
5121is-lost.org
5122is-not-certified.com
5123is-saved.org
5124is-slick.com
5125is-uberleet.com
5126is-very-bad.org
5127is-very-evil.org
5128is-very-good.org
5129is-very-nice.org
5130is-very-sweet.org
5131is-with-theband.com
5132isa-geek.com
5133isa-geek.net
5134isa-geek.org
5135isa-hockeynut.com
5136issmarterthanyou.com
5137isteingeek.de
5138istmein.de
5139kicks-ass.net
5140kicks-ass.org
5141knowsitall.info
5142land-4-sale.us
5143lebtimnetz.de
5144leitungsen.de
5145likes-pie.com
5146likescandy.com
5147merseine.nu
5148mine.nu
5149misconfused.org
5150mypets.ws
5151myphotos.cc
5152neat-url.com
5153office-on-the.net
5154on-the-web.tv
5155podzone.net
5156podzone.org
5157readmyblog.org
5158saves-the-whales.com
5159scrapper-site.net
5160scrapping.cc
5161selfip.biz
5162selfip.com
5163selfip.info
5164selfip.net
5165selfip.org
5166sells-for-less.com
5167sells-for-u.com
5168sells-it.net
5169sellsyourhome.org
5170servebbs.com
5171servebbs.net
5172servebbs.org
5173serveftp.net
5174serveftp.org
5175servegame.org
5176shacknet.nu
5177simple-url.com
5178space-to-rent.com
5179stuff-4-sale.org
5180stuff-4-sale.us
5181teaches-yoga.com
5182thruhere.net
5183traeumtgerade.de
5184webhop.biz
5185webhop.info
5186webhop.net
5187webhop.org
5188worse-than.tv
5189writesthisblog.com
diff --git a/etc/refcards/orgcard.pdf b/etc/refcards/orgcard.pdf
index 201bb892dc0..3bedb6f2cf5 100644
--- a/etc/refcards/orgcard.pdf
+++ b/etc/refcards/orgcard.pdf
Binary files differ
diff --git a/etc/refcards/orgcard.tex b/etc/refcards/orgcard.tex
index d78f2a38021..d06afca8083 100644
--- a/etc/refcards/orgcard.tex
+++ b/etc/refcards/orgcard.tex
@@ -1,5 +1,5 @@
1% Reference Card for Org Mode 1% Reference Card for Org Mode
2\def\orgversionnumber{7.8.07} 2\def\orgversionnumber{7.8.09}
3\def\versionyear{2012} % latest update 3\def\versionyear{2012} % latest update
4\def\year{2012} % latest copyright year 4\def\year{2012} % latest copyright year
5 5
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index aad382de6d0..fc6d905cfb2 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,3 +1,28 @@
12012-04-20 Chong Yidong <cyd@gnu.org>
2
3 * emacsclient.c (decode_options): Move -t -n corner case handling
4 into server.el (Bug#11102).
5 (main): Send -tty to Emacs under more circumstanced (Bug#8314).
6
72012-04-18 Paul Eggert <eggert@cs.ucla.edu>
8
9 configure: new option --enable-gcc-warnings (Bug#11207)
10 * Makefile.in (C_WARNINGS_SWITCH): Remove.
11 (WARN_CFLAGS, WERROR_CFLAGS): New macros.
12 (BASE_CFLAGS): Use new macros rather than old.
13
142012-04-16 Paul Eggert <eggert@cs.ucla.edu>
15
16 Assume less-ancient POSIX support.
17 * update-game-score.c: Include <getopt.h> rather than rolling our
18 own decls for optarg, optind, opterr. See
19 <http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html>.
20
212012-04-14 Juanma Barranquero <lekktu@gmail.com>
22
23 * emacsclient.c (decode_options) [WINDOWSNT]:
24 Call ttyname instead of passing its address (typo in 2011-12-04T17:13:01Z!lekktu@gmail.com).
25
12012-04-07 Eli Zaretskii <eliz@gnu.org> 262012-04-07 Eli Zaretskii <eliz@gnu.org>
2 27
3 * makefile.w32-in (obj): Add xml.o. 28 * makefile.w32-in (obj): Add xml.o.
@@ -62,7 +87,7 @@
62 * makefile.w32-in (LOCAL_FLAGS): Add $(EMACS_EXTRA_C_FLAGS). 87 * makefile.w32-in (LOCAL_FLAGS): Add $(EMACS_EXTRA_C_FLAGS).
63 88
64 * emacsclient.c (main) <environ>: Remove declaration, already 89 * emacsclient.c (main) <environ>: Remove declaration, already
65 pulled in by unistd.h on Posix hosts and stdlib.h on MS-Windows. 90 pulled in by unistd.h on POSIX hosts and stdlib.h on MS-Windows.
66 91
672011-11-24 Glenn Morris <rgm@gnu.org> 922011-11-24 Glenn Morris <rgm@gnu.org>
68 93
@@ -6646,7 +6671,7 @@
6646 6671
66471993-08-25 Paul Eggert (eggert@twinsun.com) 66721993-08-25 Paul Eggert (eggert@twinsun.com)
6648 6673
6649 * rcs2log: Change /{/ to /\{/ for Posix ERE compatibility; 6674 * rcs2log: Change /{/ to /\{/ for POSIX ERE compatibility;
6650 otherwise, HP awk complains. 6675 otherwise, HP awk complains.
6651 6676
6652 * vcdiff: Append /usr/ccs/bin and /usr/sccs to PATH, since these 6677 * vcdiff: Append /usr/ccs/bin and /usr/sccs to PATH, since these
@@ -6993,7 +7018,7 @@
6993 7018
6994 * rcs2log: mawk, SunOS 4.1.3 nawk, and Ultrix/MKS nawk all barf on 7019 * rcs2log: mawk, SunOS 4.1.3 nawk, and Ultrix/MKS nawk all barf on
6995 /[/]/, so change it to /[\/]/. This should work on all 7020 /[/]/, so change it to /[\/]/. This should work on all
6996 Posix-compliant awks. It's slightly wrong with traditional awk, 7021 POSIX-compliant awks. It's slightly wrong with traditional awk,
6997 since it matches \ too, but that's a minor problem compared to awk 7022 since it matches \ too, but that's a minor problem compared to awk
6998 syntax errors. 7023 syntax errors.
6999 7024
diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in
index cc1757e4e3b..6732030a648 100644
--- a/lib-src/Makefile.in
+++ b/lib-src/Makefile.in
@@ -36,8 +36,9 @@ configuration=@configuration@
36EXEEXT=@EXEEXT@ 36EXEEXT=@EXEEXT@
37C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@ 37C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@
38C_SWITCH_MACHINE=@C_SWITCH_MACHINE@ 38C_SWITCH_MACHINE=@C_SWITCH_MACHINE@
39C_WARNINGS_SWITCH = @C_WARNINGS_SWITCH@
40PROFILING_CFLAGS = @PROFILING_CFLAGS@ 39PROFILING_CFLAGS = @PROFILING_CFLAGS@
40WARN_CFLAGS = @WARN_CFLAGS@
41WERROR_CFLAGS = @WERROR_CFLAGS@
41 42
42# Program name transformation. 43# Program name transformation.
43TRANSFORM = @program_transform_name@ 44TRANSFORM = @program_transform_name@
@@ -167,7 +168,8 @@ LIBS_SYSTEM = @LIBS_SYSTEM@
167# Those files shared with other GNU utilities need HAVE_CONFIG_H 168# Those files shared with other GNU utilities need HAVE_CONFIG_H
168# defined before they know they can take advantage of the information 169# defined before they know they can take advantage of the information
169# in ../src/config.h. 170# in ../src/config.h.
170BASE_CFLAGS = $(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) ${C_WARNINGS_SWITCH} \ 171BASE_CFLAGS = $(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) \
172 $(WARN_CFLAGS) $(WERROR_CFLAGS) \
171 -DHAVE_CONFIG_H -I. -I../src -I../lib \ 173 -DHAVE_CONFIG_H -I. -I../src -I../lib \
172 -I${srcdir} -I${srcdir}/../src -I${srcdir}/../lib 174 -I${srcdir} -I${srcdir}/../src -I${srcdir}/../lib
173 175
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index 049886ed2ba..ea55398306b 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -638,32 +638,23 @@ decode_options (int argc, char **argv)
638 if (display && strlen (display) == 0) 638 if (display && strlen (display) == 0)
639 display = NULL; 639 display = NULL;
640 640
641#ifdef WINDOWSNT
642 /* Emacs on Windows does not support GUI and console frames in the same
643 instance. So, it makes sense to treat the -t and -c options as
644 equivalent, and open a new frame regardless of whether the running
645 instance is GUI or console. Ideally, we would only set tty = 1 when
646 the instance is running in a console, but alas we don't know that.
647 The simplest workaround is to always ask for a tty frame, and let
648 server.el check whether it makes sense. */
649 if (tty || !current_frame)
650 {
651 display = (const char *) ttyname;
652 current_frame = 0;
653 tty = 1;
654 }
655#endif
656
657 /* If no display is available, new frames are tty frames. */ 641 /* If no display is available, new frames are tty frames. */
658 if (!current_frame && !display) 642 if (!current_frame && !display)
659 tty = 1; 643 tty = 1;
660 644
661 /* --no-wait implies --current-frame on ttys when there are file
662 arguments or expressions given. */
663 if (nowait && tty && argc - optind > 0)
664 current_frame = 1;
665
666#ifdef WINDOWSNT 645#ifdef WINDOWSNT
646 /* Emacs on Windows does not support graphical and text terminal
647 frames in the same instance. So, treat the -t and -c options as
648 equivalent, and open a new frame on the server's terminal.
649 Ideally, we would only set tty = 1 when the serve is running in a
650 console, but alas we don't know that. As a workaround, always
651 ask for a tty frame, and let server.el figure it out. */
652 if (!current_frame)
653 {
654 display = NULL;
655 tty = 1;
656 }
657
667 if (alternate_editor && alternate_editor[0] == '\0') 658 if (alternate_editor && alternate_editor[0] == '\0')
668 { 659 {
669 message (TRUE, "--alternate-editor argument or ALTERNATE_EDITOR variable cannot be\n\ 660 message (TRUE, "--alternate-editor argument or ALTERNATE_EDITOR variable cannot be\n\
@@ -1667,10 +1658,10 @@ main (int argc, char **argv)
1667 send_to_emacs (emacs_socket, " "); 1658 send_to_emacs (emacs_socket, " ");
1668 } 1659 }
1669 1660
1670 /* If using the current frame, send tty information to Emacs anyway. 1661 /* Unless we are certain we don't want to occupy the tty, send our
1671 In daemon mode, Emacs may need to occupy this tty if no other 1662 tty information to Emacs. For example, in daemon mode Emacs may
1672 frame is available. */ 1663 need to occupy this tty if no other frame is available. */
1673 if (tty || (current_frame && !eval)) 1664 if (!current_frame || !eval)
1674 { 1665 {
1675 const char *tty_type, *tty_name; 1666 const char *tty_type, *tty_name;
1676 1667
diff --git a/lib-src/update-game-score.c b/lib-src/update-game-score.c
index a32bd6d8d78..e0c940510be 100644
--- a/lib-src/update-game-score.c
+++ b/lib-src/update-game-score.c
@@ -46,10 +46,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
46#include <fcntl.h> 46#include <fcntl.h>
47#endif 47#endif
48#include <sys/stat.h> 48#include <sys/stat.h>
49 49#include <getopt.h>
50/* Needed for SunOS4, for instance. */
51extern char *optarg;
52extern int optind, opterr;
53 50
54static int usage (int err) NO_RETURN; 51static int usage (int err) NO_RETURN;
55 52
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 220ba713d4e..716510aff92 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -4,6 +4,7 @@ MOSTLYCLEANDIRS =
4MOSTLYCLEANFILES = 4MOSTLYCLEANFILES =
5noinst_LIBRARIES = 5noinst_LIBRARIES =
6 6
7AM_CFLAGS = $(GNULIB_WARN_CFLAGS) $(WERROR_CFLAGS)
7DEFAULT_INCLUDES = -I. -I../src -I$(top_srcdir)/src 8DEFAULT_INCLUDES = -I. -I../src -I$(top_srcdir)/src
8 9
9include gnulib.mk 10include gnulib.mk
diff --git a/lib/gnulib.mk b/lib/gnulib.mk
index 154ae9882da..153ea11efe4 100644
--- a/lib/gnulib.mk
+++ b/lib/gnulib.mk
@@ -21,7 +21,7 @@
21# the same distribution terms as the rest of that program. 21# the same distribution terms as the rest of that program.
22# 22#
23# Generated by gnulib-tool. 23# Generated by gnulib-tool.
24# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=msvc-inval --avoid=msvc-nothrow --avoid=raise --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dup2 filemode getloadavg getopt-gnu ignore-value intprops lstat mktime pthread_sigmask readlink socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat 24# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=msvc-inval --avoid=msvc-nothrow --avoid=raise --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dup2 filemode getloadavg getopt-gnu ignore-value intprops lstat manywarnings mktime pthread_sigmask readlink socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat warnings
25 25
26 26
27MOSTLYCLEANFILES += core *.stackdump 27MOSTLYCLEANFILES += core *.stackdump
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 954daf68510..2ffd9ce77a8 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,7 +1,710 @@
12012-04-21 Juanma Barranquero <lekktu@gmail.com>
2
3 * progmodes/verilog-mode.el (verilog-mode): Check whether
4 which-func-modes is t before adding verilog-mode.
5 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
6
72012-04-21 Leo Liu <sdl.web@gmail.com>
8
9 * net/rcirc.el (rcirc): Avoid error when process-contact returns t.
10
112012-04-21 Michael Vehrs <Michael.Burschik@gmx.de>
12
13 * woman.el: Add support for "T{ T}" tbl syntax, and fix the
14 filling of the last column of a table (Bug#5635).
15 (woman-find-next-control-line): New arg, specifying an additional
16 regexp component for the control line.
17 (woman2-roff-buffer): Use it.
18 (woman-break-table): New function.
19 (woman2-TS): Use it.
20
212012-04-21 Chong Yidong <cyd@gnu.org>
22
23 * woman.el (woman-set-buffer-display-table, woman-decode-region)
24 (woman-horizontal-escapes, woman-negative-vertical-space)
25 (woman-tab-to-tab-stop, woman2-fc, woman2-TS)
26 (WoMan-warn-ignored): Use ?\s instead of ?\ .
27
282012-04-20 Stefan Monnier <monnier@iro.umontreal.ca>
29
30 * minibuffer.el (completion-file-name-table): Complete user names.
31
322012-04-20 Leo Liu <sdl.web@gmail.com>
33
34 * font-lock.el (lisp-font-lock-keywords-2): Add pcase, pcase-let
35 and pcase-let*.
36
372012-04-20 Chong Yidong <cyd@gnu.org>
38
39 * server.el (server-execute): Respect initial-buffer-choice if it
40 is a string and there are no files to open (Bug#2825).
41 (server-create-window-system-frame, server-create-tty-frame):
42 Don't switch buffers here.
43 (server-process-filter): Only try to open a window system frame if
44 compiled with graphical support (Bug#8314).
45
462012-04-20 Dan Nicolaescu <dann@gnu.org>
47
48 * battery.el (battery-echo-area-format): Display remaining time
49 for sysfs backend too (Bug#11269).
50 (battery-linux-sysfs): Fix conditional for the charge.
51
522012-04-20 Chong Yidong <cyd@gnu.org>
53
54 * progmodes/gdb-mi.el (gdb): Revert previous change.
55 (gdb-inferior-io--init-proc): New function.
56 (gdb-init-1): Use it.
57 (gdb-inferior-io-sentinel): New sentinel for the gdb-inferior pty,
58 responsible for allocating a new pty and hooking it to gdb when
59 the old pty gets an EIO due to process exit.
60 (gdb-delchar-or-quit): New command. Bind it in gdb-mi buffers.
61 (gdb-tooltip-print): Don't use obsolete tooltip-use-echo-area.
62 (gdb-inferior-io--maybe-delete-pty): Move into gdb-reset.
63
642012-04-20 Eli Zaretskii <eliz@gnu.org>
65
66 * window.el (window-min-size, window-sizable, window-min-delta)
67 (window-max-delta, window--resizable, window-resizable)
68 (window-total-size, window-full-height-p, window-full-width-p)
69 (window-in-direction, window--resize-mini-window, window-resize)
70 (window--resize-child-windows-normal)
71 (window--resize-child-windows, window--resize-siblings)
72 (window--resize-this-window, adjust-window-trailing-edge)
73 (enlarge-window, shrink-window): Doc fixes.
74
752012-04-20 Chong Yidong <cyd@gnu.org>
76
77 * progmodes/gdb-mi.el (gdb-inferior-io--maybe-delete-pty): New
78 function to call delete-process on the gdb-inferior buffer's pty.
79 (gdb-reset): Use it, instead of relying on kill-buffer to kill the
80 pty process (Bug#11273).
81 (gdb-update): New arg to suppress talking to the gdb process.
82 (gdb-done-or-error): Use it.
83 (gdb-stopped-functions): Rename from gdb-stopped-hooks.
84 (gdb): Call gdb-inferior-io--maybe-delete-pty as a workaround for
85 sentinel not being called.
86
87 * comint.el (make-comint-in-buffer, comint-exec): Doc fix.
88
89 * progmodes/grep.el (grep, rgrep): Doc fix (Bug#11268).
90
912012-04-20 Glenn Morris <rgm@gnu.org>
92
93 * net/network-stream.el (open-network-stream): Doc fix.
94
952012-04-20 Chong Yidong <cyd@gnu.org>
96
97 * emacs-lisp/tabulated-list.el (tabulated-list-print): Fix typos.
98
992012-04-20 Alan Mackenzie <acm@muc.de>
100
101 Ensure searching for keywords is case sensitive.
102
103 * progmodes/cc-cmds.el (c-electric-brace, c-electric-lt-gt)
104 (c-electric-paren, c-beginning-of-defun, c-end-of-defun)
105 (c-defun-name, c-mark-function, c-cpp-define-name)
106 (c-comment-indent, c-scan-conditionals, c-indent-defun)
107 (c-context-line-break): Bind case-fold-search to nil.
108
109 * progmodes/cc-mode.el (c-font-lock-fontify-region): Bind
110 case-fold-search to nil.
111
1122012-04-20 Chong Yidong <cyd@gnu.org>
113
114 * mail/sendmail.el (mail-bury): Call return action with the right
115 Rmail buffer (Bug#11242).
116
117 * server.el (server-process-filter): Handle corner case where both
118 tty and nowait options are present (Bug#11102).
119
1202012-04-20 Eli Zaretskii <eliz@gnu.org>
121
122 * version.el (emacs-bzr-version, emacs-bzr-get-version): Doc fixes.
123 (top level): Put into the executable the ident-style '$Id:' tag on
124 windows-nt as well.
125
1262012-04-19 Stefan Monnier <monnier@iro.umontreal.ca>
127
128 * electric.el (electric-indent-post-self-insert-function): Check that
129 electric-indent-mode is enabled in current buffer.
130
1312012-04-19 Juanma Barranquero <lekktu@gmail.com>
132
133 * imenu.el (imenu-progress-message): Restore; it is "used" in
134 erc/erc-imenu.el and net/snmp-mode.el.
135
1362012-04-19 Juanma Barranquero <lekktu@gmail.com>
137
138 * avoid.el (mouse-avoidance-mode): Mark unused arg.
139 (mouse-avoidance-nudge-mouse): Remove unused binding.
140
141 * bs.el (bs-toggle-readonly): Call `toggle-read-only' interactively.
142
143 * descr-text.el (describe-char):
144 * progmodes/python.el (python-describe-symbol):
145 Don't call `toggle-read-only', set `buffer-read-only'.
146
147 * imenu.el (imenu-default-goto-function): Mark unused args.
148 (imenu-progress-message): Remove obsolete macro; all callers changed.
149
150 * subr.el (keymap-canonicalize): Remove unused binding.
151 (read-passwd): Mark unused arg.
152
153 * tutorial.el (tutorial--display-changes): Remove unused binding.
154 (tutorial--save-tutorial-to): Remove unused variable.
155
156 * emacs-lisp/package.el (define-package, package-menu-mark-delete)
157 (package-menu-mark-install, package-menu-mark-unmark): Mark unused args.
158 (package-generate-autoloads, package-menu--generate)
159 (package-menu--find-upgrades): Remove unused bindings.
160
161 * emulation/cua-rect.el (cua-restrict-regexp-rectangle)
162 (cua-restrict-prefix-rectangle): Doc fixes. Remove unused bindings.
163 (cua--mouse-ignore, cua--delete-rectangle, cua--extract-rectangle)
164 (cua--indent-rectangle, cua-open-rectangle, cua-close-rectangle)
165 (cua-blank-rectangle, cua-string-rectangle, cua-replace-in-rectangle)
166 (cua-incr-rectangle, cua-sequence-rectangle, cua--convert-rectangle-as)
167 (cua--rectangle-aux-replace, cua--left-fill-rectangle)
168 (cua-scroll-rectangle-up, cua-scroll-rectangle-down)
169 (cua-delete-char-rectangle): Mark unused args.
170 (cua-align-rectangle): Remove unused binding.
171
172 * mail/rmail.el (compilation--message->loc)
173 (epa--find-coding-system-for-mime-charset): Declare.
174
175 * net/dbus.el (dbus-register-service): Declare.
176 (dbus-name-owner-changed-handler): Remove unused binding.
177
178 * nxml/nxml-mode.el (nxml-electric-slash, nxml-in-mixed-content-p)
179 (nxml-compute-indent-from-matching-start-tag): Remove unused variables.
180 (nxml-scan-backward-within): Mark unused arg.
181 (nxml-dynamic-markup-word): Remove unused binding.
182
183 * mouse.el (mouse-menu-major-mode-map):
184 * emacs-lisp/authors.el (authors-scan-change-log)
185 (authors-add-to-author-list):
186 * emacs-lisp/avl-tree.el (avl-tree--enter-balance):
187 * emacs-lisp/smie.el (smie-auto-fill):
188 * mail/sendmail.el (mail-bury):
189 * mail/unrmail.el (unrmail):
190 * net/tls.el (open-tls-stream):
191 * textmodes/picture.el (picture-mouse-set-point):
192 Remove unused bindings.
193
1942012-04-19 Michael Albinus <michael.albinus@gmx.de>
195
196 * net/tramp.el (tramp-action-password): Let-bind
197 `enable-recursive-minibuffers' to t.
198
1992012-04-18 Sam Steingold <sds@gnu.org>
200
201 * progmodes/gud.el (gud-key-prefix): Use :type 'key-sequence
202 instead of 'string to accommodate values like [f11].
203 Always use `vconcat' instead of `concat' on it, like in `gud-def'.
204 * progmodes/gdb-mi.el: Likewise.
205
2062012-04-18 Leo Liu <sdl.web@gmail.com>
207
208 * abbrev.el (edit-abbrevs): Move point to the abbrev table of
209 current buffer.
210 (prepare-abbrev-list-buffer): Enter edit-abbrevs-mode only if
211 LOCAL is nil.
212
2132012-04-18 Chong Yidong <cyd@gnu.org>
214
215 * simple.el (line-move): Use forward-line if in batch mode
216 (Bug#11053).
217
2182012-04-18 Christopher Schmidt <christopher@ch.ristopher.com>
219
220 * files.el (after-find-file): Do not try to add a final newline if
221 the buffer is read-only (Bug#11156).
222
2232012-04-17 Richard Stallman <rms@gnu.org>
224
225 * mail/rmail.el (rmail-start-mail):
226 Pass (rmail-mail-return...) for the return-action.
227 Pass (rmail-yank-current-message...) for the yank-action.
228 (rmail-yank-current-message): New function.
229 (rmail-mail): Pass the Rmail buffer, not view buffer, for replybuffer.
230 (rmail-reply): Likewise.
231 (rmail-forward): Pass the Rmail buffer, not nil, for replybuffer.
232
233 * mail/sendmail.el (mail-bury): Choose the first rmail-mode
234 buffer, not the last. Reject temp buffers. Use the rmail-mode
235 buffer, not newbuf.
236
2372012-04-17 Juanma Barranquero <lekktu@gmail.com>
238
239 * server.el (server-ensure-safe-dir): Simplify.
240
2412012-04-17 Stefan Monnier <monnier@iro.umontreal.ca>
242
243 * emacs-lisp/smie.el: Provide smarter auto-filling.
244 (smie-auto-fill): New function.
245 (smie-setup): Use it.
246
247 * newcomment.el (comment-choose-indent): Obey comment-inline-offset.
248
2492012-04-17 Philipp Haselwarter <philipp.haselwarter@gmx.de> (tiny change)
250
251 * newcomment.el (comment-inline-offset): New custom var (bug#11090).
252 (comment-indent): Use it.
253
2542012-04-17 Vincent Belaïche <vincentb1@users.sourceforge.net>
255
256 * ses.el: The overall change is to add cell renaming, that is
257 setting fancy names for cell symbols other than name matching
258 "\\`[A-Z]+[0-9]+\\'" regexp .
259 (ses-localvars): Add ses--renamed-cell-symb-list.
260 (ses-create-cell-variable): New defun.
261 (ses-destroy-cell-variable-range): Respect ses--numrows, ses--numcols.
262 (ses-relocate-formula): Relocate formulas only for cells the
263 symbols of which are not renamed, i.e. symbols whose names do not
264 match regexp "\\`[A-Z]+[0-9]+\\'".
265 (ses-relocate-all): Relocate values only for cells the symbols of
266 which are not renamed.
267 (ses-load): Create cells variables as the (ses-cell ...) are read,
268 in order to check row col consistency with cell symbol name only
269 for cells that are not renamed.
270 (ses-replace-name-in-formula): New defun.
271 (ses-rename-cell): New defun.
272
2732012-04-17 Peter Oliver <bzr@mavit.org.uk> (tiny change)
274
275 * progmodes/perl-mode.el (perl-indent-parens-as-block):
276 New option (bug#11118).
277 (perl-calculate-indent): Respect it.
278
2792012-04-17 Glenn Morris <rgm@gnu.org>
280
281 * dired-aux.el (dired-mark-read-string): Doc fix.
282
2832012-04-17 Dmitry Antipov <dmantipov@yandex.ru>
284
285 * dired-aux.el (dired-mark-read-string): Offer optional completion.
286 (dired-do-chxxx): Complete chown, chgrp over users, groups. (Bug#7900)
287
2882012-04-17 Glenn Morris <rgm@gnu.org>
289
290 * mouse.el (mouse-drag-track):
291 * speedbar.el (speedbar-frame-mode):
292 Use auto-hscroll-mode rather than the alias automatic-hscrolling.
293
2942012-04-16 Leo Liu <sdl.web@gmail.com>
295
296 * progmodes/python.el: Trivial cleanup.
297
2982012-04-16 Glenn Morris <rgm@gnu.org>
299
300 * vc/vc.el (vc-string-prefix-p):
301 * vc/pcvs-util.el (cvs-string-prefix-p):
302 * textmodes/tex-mode.el (latex-string-prefix-p, tex-string-prefix-p):
303 * mpc.el (mpc-string-prefix-p):
304 Make all of these into obsolete aliases for string-prefix-p.
305 Update callers.
306 * vc/pcvs.el, vc/vc-dispatcher.el, vc/vc-dir.el: Update callers.
307
308 * textmodes/two-column.el: Move custom options to the start.
309 (frame-width): Remove compat definition.
310 (2C-associate-buffer, 2C-dissociate):
311 Use with-current-buffer rather than save-excursion.
312 (2C-dissociate): Force a mode-line update.
313 (2C-autoscroll): Use ignore-errors.
314
315 * emacs-lisp/eieio-opt.el (describe-class, describe-generic):
316 Autoload trivia.
317
318 * emacs-lisp/cl-extra.el (*random-state*):
319 Remove unnecessary declaration.
320
321 * calendar/cal-tex.el (cal-tex-end-document): Trivial clarification.
322
323 * play/cookie1.el (cookie-snarf):
324 Give an explicit error if input file cannot be read.
325
326 * play/yow.el (yow-file): Use expand-file-name rather than concat.
327
328 * progmodes/perl-mode.el (c-macro-expand):
329 Remove unnecessary autoload (it is in loaddefs.el).
330
331 * textmodes/picture.el (picture-desired-column)
332 (picture-update-desired-column): Convert comments to doc-strings.
333 (picture-substitute): Remove function.
334 (picture-mode-map): Initialize in the defvar.
335
336 * woman.el: Remove eval-after-load for tar-mode.
337 * tar-mode.el (tar-mode-map): Add woman binding and menu entry.
338 (woman-tar-extract-file): Autoload it.
339
340 * frame.el (automatic-hscrolling): Make this alias obsolete.
341
3422012-04-12 Agustín Martín Domingo <agustin.martin@hispalinux.es>
343
344 * ispell.el (ispell-set-spellchecker-params): Post-process
345 `ispell-dictionary-alist' to use [:alpha:] and utf-8 if possible.
346 (ispell-dictionary-base-alist): Revert to original XEmacs
347 friendly version for default. [:alpha:] will be added in
348 `ispell-set-spellchecker-params' if needed
349
3502012-04-16 Chong Yidong <cyd@gnu.org>
351
352 * image.el (imagemagick--extension-regexp): New variable.
353 (imagemagick-register-types): Use it.
354 (imagemagick-types-inhibit): Add :set function. Allow new value
355 of t to inhibit all types.
356
357 * emacs-lisp/regexp-opt.el (regexp-opt-charset): Avoid cl macros,
358 so we can preload it.
359
360 * loadup.el (fboundp): Preload regexp-opt, needed by
361 imagemagick-register-types.
362
3632012-04-15 Chong Yidong <cyd@gnu.org>
364
365 * frame.el (scrolling): Remove nearly unused customization group.
366
367 * scroll-all.el (scroll-all-mode): Move to windows group.
368
3692012-04-15 Chong Yidong <cyd@gnu.org>
370
371 * bindings.el (goto-map): Bind goto-char to M-g c (Bug#11240).
372
3732012-04-15 Stefan Monnier <monnier@iro.umontreal.ca>
374
375 Avoid the use of ((lambda ...) ...) in lexical-binding code.
376 * emacs-lisp/easy-mmode.el (define-minor-mode): Use funcall (bug#11241).
377
3782012-04-15 Glenn Morris <rgm@gnu.org>
379
380 * simple.el (process-file-side-effects): Doc fix.
381
3822012-04-15 Glenn Morris <rgm@gnu.org>
383
384 * international/mule-cmds.el (set-language-environment): Doc fix.
385
3862012-04-14 Juanma Barranquero <lekktu@gmail.com>
387
388 * server.el (server-auth-key, server-generate-key): Doc fixes.
389 (server-get-auth-key): Doc fix. Use `string-match-p'.
390 (server-start): Reflow docstring.
391
3922012-04-14 Lars Ingebrigtsen <larsi@gnus.org>
393
394 * server.el (server-generate-key): `called-interactively-p'
395 requires a parameter.
396
3972012-04-14 Michal Nazarewicz <mina86@mina86.com>
398
399 * server.el (server-auth-key): New variable.
400 (server-generate-key, server-get-auth-key): New function.
401 (server-start): Use the new variable and functions to allow
402 setting a permanent server key (bug#9423).
403
4042012-04-14 Leo Liu <sdl.web@gmail.com>
405
406 * vc/diff-mode.el (diff-file-prev/next): Fix typo.
407
4082012-04-14 Paul Eggert <eggert@cs.ucla.edu>
409
410 Spelling fixes.
411 * hexl.el (hexl-rulerize): Rename from hexl-rulerise, since
412 Emacs uses American spelling.
413
4142012-04-14 Juanma Barranquero <lekktu@gmail.com>
415
416 * emacs-lock.el (emacs-lock-locked-buffer-functions): New hook.
417 (emacs-lock--exit-locked-buffer): Return the locked buffer. Doc fix.
418 (emacs-lock--kill-emacs-hook, emacs-lock--kill-emacs-query-functions)
419 (emacs-lock--kill-buffer-query-functions): Run new hook. (Bug#11017)
420
4212012-04-14 Stefan Monnier <monnier@iro.umontreal.ca>
422
423 * progmodes/which-func.el (which-func-modes): Change default.
424
4252012-04-14 Kim F. Storm <storm@cua.dk>
426
427 * emulation/cua-base.el (cua-exchange-point-and-mark): Just call
428 exchange-point-and-mark if cua-enable-cua-keys is nil (Bug#11191).
429
4302012-04-14 Chong Yidong <cyd@gnu.org>
431
432 * custom.el (custom-theme-set-variables): Doc fix.
433
4342012-04-14 Glenn Morris <rgm@gnu.org>
435
436 * international/mule.el (set-auto-coding-for-load): Doc fix.
437
4382012-04-14 Alan Mackenzie <acm@muc.de>
439
440 * progmodes/cc-menus.el (cc-imenu-objc-generic-expression): Make
441 imenu work again for Objective C Mode. Correct the *-index values,
442 these having been disturbed by a previous change in 2011-08.
443
444 * progmodes/cc-engine.el (c-before-change-check-<>-operators):
445 Correct two search limits.
446
4472012-04-14 Stefan Monnier <monnier@iro.umontreal.ca>
448
449 * startup.el (command-line-1): Inhibit splash from daemon (bug#10996).
450
4512012-04-14 Andreas Schwab <schwab@linux-m68k.org>
452
453 * international/characters.el: Fix sorting.
454
4552012-04-14 Eli Zaretskii <eliz@gnu.org>
456
457 * international/characters.el: Add more missing Latin case pairs.
458
4592012-04-14 Glenn Morris <rgm@gnu.org>
460
461 * files.el (dir-locals-set-class-variables): Doc fix.
462
4632012-04-14 Eli Zaretskii <eliz@gnu.org>
464
465 * international/characters.el: Add set-case-syntax-pair call for
466 LATIN CAPITAL LETTER Y WITH DIAERESIS RET and its lower-case
467 counterpart. (Bug#11209)
468
469 * simple.el (shell-command-on-region): Doc fix. (Bug#11208)
470
4712012-04-14 Glenn Morris <rgm@gnu.org>
472
473 * calendar/holidays.el (calendar-check-holidays): Doc fix.
474
4752012-04-14 Eli Zaretskii <eliz@gnu.org>
476
477 * textmodes/ispell.el (ispell-dictionary-base-alist):
478 Add data for Hebrew.
479
4802012-04-14 Chong Yidong <cyd@gnu.org>
481
482 * net/rcirc.el (rcirc-cmd-quit):
483 Revert 2012-03-18 change (Bug#11192).
484
4852012-04-14 Glenn Morris <rgm@gnu.org>
486
487 * pcmpl-rpm.el (pcomplete/rpm): Handle -qf.
488
4892012-04-14 Eli Zaretskii <eliz@gnu.org>
490
491 * minibuffer.el (completion-in-region-mode-map):
492 Bind completion-help-at-point to M-? rather than ?. (Bug#11182)
493
4942012-04-13 Vivek Dasmohapatra <vivek@etla.org>
495
496 * hexl.el (hexl-insert-char): Make display sizes other than 16 work.
497
4982012-04-13 Masatake YAMATO <yamato@redhat.com>
499
500 * minibuffer.el (minibuffer-local-filename-syntax): New variable
501 to allow `C-M-f' and `C-M-b' to move to the nearest path
502 separator (bug#9511).
503
5042012-04-13 Lars Ingebrigtsen <larsi@gnus.org>
505
506 * avoid.el: Require cl when compiling. And also move the
507 `provide' to the end.
508
5092012-04-13 Thierry Volpiatto <thierry.volpiatto@gmail.com>
510
511 * avoid.el (mouse-avoidance-banish-position): New variable.
512 (mouse-avoidance-banish-destination): Use it (bug#10165).
513
5142012-04-13 Leo Liu <sdl.web@gmail.com>
515
516 * progmodes/which-func.el (which-func-modes): Add objc-mode.
517
5182012-04-13 Ken Brown <kbrown@cornell.edu>
519
520 * net/browse-url.el (browse-url-file-url): Remove Cygwin hack;
521 this is no longer needed now that cygstart understands file:// URLs.
522 (browse-url-filename-alist): For the same reason, don't modify
523 file:// URLs on Cygwin.
524
5252012-04-13 Stefan Monnier <monnier@iro.umontreal.ca>
526
527 * emulation/cua-base.el (cua--pre-command-handler-1): Don't activate
528 the region on shift if the binding is already shifted (bug#11221).
529
5302012-04-12 Glenn Morris <rgm@gnu.org>
531
532 * mail/mailpost.el: Move to obsolete/.
533
5342012-04-12 Drew Adams <drew.adams@oracle.com>
535
536 * imenu.el (imenu--generic-function): Ignore invisible definitions
537 (bug#10123).
538
5392012-04-12 Vivek Dasmohapatra <vivek@etla.org>
540
541 * hexl.el (hexl-bits): New variable.
542 (hexl-options): Mention the variable in the doc string.
543 (hexl-rulerise, hexl-line-displen): New functions.
544 (hexl-mode): Mention the new variable.
545 (hexl-mode, hexl-current-address, hexl-current-address):
546 Use the displen.
547 (hexl-ascii-start-column): New function.
548 (hexl-address-to-marker, hexl-beginning-of-line, hexl-options)
549 (hexl-insert-char, hexl-mode-ruler): Use the displen (bug#4941).
550
5512012-04-12 Agustín Martín Domingo <agustin.martin@hispalinux.es>
552
553 * textmodes/flyspell.el (flyspell-large-region): For hunspell, use
554 '("-i" ENCODING), in 2 separate command-line arguments, to specify
555 the encoding, as expected by hunspell.
556
5572012-04-12 Stefan Monnier <monnier@iro.umontreal.ca>
558
559 * battery.el (battery--linux-sysfs-regexp): New const.
560 (battery-status-function): Use it. Remove yeeloong special case.
561 (battery-yeeloong-sysfs): Remove.
562 (battery-echo-area-format): Remove yeeloong special case.
563
5642012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
565
566 * imenu.el (imenu-add-to-menubar): `current-local-map' can be nil.
567 Reported by Noah Friedman.
568
569 * subr.el (read-passwd): Use read-string.
570
5712012-04-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
572
573 * vcursor.el (vcursor-move): Increase the priority of the overlay
574 (bug#9663).
575
5762012-04-11 Deniz Dogan <deniz.a.m.dogan@gmail.com>
577
578 * net/rcirc.el (rcirc-kill-channel-buffers): New variable.
579 (rcirc-kill-buffer-hook): Use it to kill channel buffers (bug#5128).
580
5812012-04-11 William Stevenson <yhvh2000@gmail.com>
582
583 * textmodes/artist.el (artist-mode): Convert artist-mode to use
584 define-minor-mode (bug#10760).
585
5862012-04-11 Wolfgang Jenkner <wjenkner@inode.at> (tiny change)
587
588 * progmodes/grep.el (rgrep): Tweak the find command line so
589 that directories matching `grep-find-ignored-files' won't be
590 pruned (bug#10351).
591
5922012-04-11 Chong Yidong <cyd@gnu.org>
593
594 * startup.el (command-line): Remove support for long-obsolete
595 variable font-lock-face-attributes.
596
5972012-04-11 Glenn Morris <rgm@gnu.org>
598
599 * vc/vc-bzr.el (vc-bzr-status): Avoid condition-case-unless-debug.
600
6012012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
602
603 * window.el (window--state-get-1): Obey window-point-insertion-type.
604
6052012-04-11 Lennart Borgman <lennart.borgman@gmail.com>
606
607 * emacs-lisp/lisp.el (narrow-to-defun): `beginning-of-defun' goes
608 to previous function when point is on the first character of a
609 function. Take care of that in `narrow-to-defun' (bug#6157).
610
6112012-04-11 Glenn Morris <rgm@gnu.org>
612
613 * vc/vc-bzr.el (vc-bzr-status): Handle all errors,
614 not just file-errors.
615
616 * vc/vc-bzr.el (vc-bzr-sha1-program, sha1-program): Remove.
617 (vc-bzr-sha1): Use internal sha1.
618
6192012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
620
621 * progmodes/flymake.el (flymake-mode): Beware read-only dirs (bug#8954).
622
6232012-04-10 Sébastien Gross <seb@chezwam.org> (tiny change)
624
625 * progmodes/hideshow.el (hs-hide-all): Don't infloop on comments
626 that start in the middle of the line (bug#10496).
627
6282012-04-10 Dan Nicolaescu <dann@gnu.org>
629
630 * battery.el (battery-linux-proc-acpi): Only one battery is
631 discharged at a time, but that seems to confuse battery.el when
632 computing `rate-type' for the battery not being discharged
633 (bug#10332).
634
6352012-04-10 Stefan Monnier <monnier@iro.umontreal.ca>
636
637 * emacs-lisp/autoload.el (autoload-make-program): Remove, unused.
638
639 * international/quail.el: Use dolist and simplify.
640 (quail-define-package, quail-update-keyboard-layout)
641 (quail-define-rules): Use dolist.
642 (quail-insert-kbd-layout, quail-get-translation): CSE.
643
644 * tmm.el: Use dolist, remove left over hook.
645 (tmm-prompt, tmm-define-keys, tmm-shortcut, tmm-get-keybind):
646 Use dolist.
647 (calendar-load-hook): Don't mess with it.
648
649 * vc/vc-annotate.el (vc-annotate-show-diff-revision-at-line-internal):
650 Use derived-mode-p. Run the diff asynchronously.
651
6522012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
653
654 * obsolete/mouse-sel.el: Add an Obsolete-since header.
655
6562012-04-10 Juanma Barranquero <lekktu@gmail.com>
657
658 * misc.el: Display absolute path of loaded DLLs (bug#10424).
659 (list-dynamic-libraries--loaded): New function.
660 (list-dynamic-libraries--refresh): Use it.
661
6622012-04-10 Nathan Weizenbaum <nweiz@google.com>
663
664 * progmodes/python.el (python-fill-paragraph):
665 Make python-fill-region in a multiline string work when font-lock is
666 disabled (bug#7018).
667
6682012-04-10 Laimonas VÄ—bra <laimonas.vebra@gmail.com> (tiny change)
669
670 * language/european.el (cp775): Add oem/legacy (en)coding on
671 DOS/MS Windows for the Baltic languages. There are still plenty
672 of texts written in this encoding/codepage (bug#6519).
673
6742012-04-10 Glenn Morris <rgm@gnu.org>
675
676 * cus-start.el (eol-mnemonic-unix, eol-mnemonic-dos, eol-mnemonic-mac):
677 Add :standard values, reducing "rogue" customs in emacs -Q a bit more.
678
6792012-04-10 Florian Adamsky <florian@adamsky.it> (tiny change)
680
681 * recentf.el (recentf-dialog-mode-map): Add two keybindings for
682 next-line "n" and previous-line "p" in order to make recentf more
683 consistent with ibuffer, dired or org-mode (bug#9387).
684
6852012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
686
687 * image.el (put-image): Return the overlay created instead of the
688 optional input string (bug#7834). Note that this may break code
689 that is (for some reason or other) depending on `put-image'
690 returning the string.
691
692 * mouse-sel.el (mouse-sel-mode): Mark as obsolete (bug#6174).
693
694 * simple.el (zap-to-char): Allow zapping using input methods
695 (bug#1580).
696
697 * textmodes/fill.el (fill-region): Leave point and mark where they
698 were before filling (bug#5399).
699
7002012-04-09 Glenn Morris <rgm@gnu.org>
701
702 * version.el (emacs-bzr-get-version):
703 Handle lightweight checkouts of local branches.
704
12012-04-09 Andreas Schwab <schwab@linux-m68k.org> 7052012-04-09 Andreas Schwab <schwab@linux-m68k.org>
2 706
3 * international/characters.el: Recover lost case pairs. 707 * international/characters.el: Recover lost case pairs. (Bug#11209)
4 (Bug#11209)
5 708
62012-04-09 Chong Yidong <cyd@gnu.org> 7092012-04-09 Chong Yidong <cyd@gnu.org>
7 710
@@ -156,8 +859,8 @@
1562012-03-30 Agustín Martín Domingo <agustin.martin@hispalinux.es> 8592012-03-30 Agustín Martín Domingo <agustin.martin@hispalinux.es>
157 860
158 * ispell.el (ispell-get-extended-character-mode): Disable 861 * ispell.el (ispell-get-extended-character-mode): Disable
159 extended-char-mode for hunspell. hunspell does not support it and 862 extended-char-mode for hunspell. hunspell does not support it
160 treats ~word as ordinary words in pipe mode. 863 and treats ~word as ordinary words in pipe mode.
161 864
1622012-03-30 Glenn Morris <rgm@gnu.org> 8652012-03-30 Glenn Morris <rgm@gnu.org>
163 866
@@ -387,7 +1090,7 @@
387 (hfy-face-to-css-default): Same as the earlier `hfy-face-to-css'. 1090 (hfy-face-to-css-default): Same as the earlier `hfy-face-to-css'.
388 (hfy-face-to-css): Re-defined to be a variable. 1091 (hfy-face-to-css): Re-defined to be a variable.
389 (hfy-compile-stylesheet): Modify. Allow stylesheet to be built 1092 (hfy-compile-stylesheet): Modify. Allow stylesheet to be built
390 over multiple runs. This is made possible by having the caller let 1093 over multiple runs. This is made possible by having the caller let
391 bind a special variable `hfy-user-sheet-assoc'. 1094 bind a special variable `hfy-user-sheet-assoc'.
392 (htmlfontify-string): New defun. 1095 (htmlfontify-string): New defun.
393 (hfy-compile-face-map): Make sure that the last char in the 1096 (hfy-compile-face-map): Make sure that the last char in the
@@ -620,7 +1323,7 @@
620 1323
6212012-03-09 Michael Albinus <michael.albinus@gmx.de> 13242012-03-09 Michael Albinus <michael.albinus@gmx.de>
622 1325
623 * net/dbus.el: (dbus-property-handler): Return empty array if 1326 * net/dbus.el (dbus-property-handler): Return empty array if
624 there are no properties. 1327 there are no properties.
625 1328
6262012-03-09 Leo Liu <sdl.web@gmail.com> 13292012-03-09 Leo Liu <sdl.web@gmail.com>
@@ -957,10 +1660,6 @@
957 1660
9582012-02-24 Thierry Volpiatto <thierry.volpiatto@gmail.com> 16612012-02-24 Thierry Volpiatto <thierry.volpiatto@gmail.com>
959 1662
960 * files.el (file-subdir-of-p): Fix typo.
961
9622012-02-24 Thierry Volpiatto <thierry.volpiatto@gmail.com>
963
964 * files.el (files-equal-p, file-subdir-of-p): New functions. 1663 * files.el (files-equal-p, file-subdir-of-p): New functions.
965 (copy-directory): Error when trying to copy a directory on itself. 1664 (copy-directory): Error when trying to copy a directory on itself.
966 Add missing copy-contents arg to tramp handler. 1665 Add missing copy-contents arg to tramp handler.
@@ -1224,7 +1923,7 @@
12242012-02-12 Alan Mackenzie <acm@muc.de> 19232012-02-12 Alan Mackenzie <acm@muc.de>
1225 1924
1226 Fix infinite loop with long macros. 1925 Fix infinite loop with long macros.
1227 * cc-engine.el (c-state-safe-place): Handle macros properly. 1926 * progmodes/cc-engine.el (c-state-safe-place): Handle macros properly.
1228 1927
12292012-02-12 Chong Yidong <cyd@gnu.org> 19282012-02-12 Chong Yidong <cyd@gnu.org>
1230 1929
@@ -1487,11 +2186,10 @@
1487 2186
14882012-02-06 Lars Ingebrigtsen <larsi@gnus.org> 21872012-02-06 Lars Ingebrigtsen <larsi@gnus.org>
1489 2188
1490 * progmodes/cc-mode.el 2189 * progmodes/cc-mode.el (c-standard-font-lock-fontify-region-function):
1491 (c-standard-font-lock-fontify-region-function): Set the default at 2190 Set the default at load time, too, so that `font-lock-fontify-buffer'
1492 load time, too, so that `font-lock-fontify-buffer' can be called 2191 can be called without setting up the entire mode first. This fixes
1493 without setting up the entire mode first. This fixes a bug in 2192 a bug in `mm-inline-text' with C MIME parts.
1494 `mm-inline-text' with C MIME parts.
1495 2193
14962012-02-06 Chong Yidong <cyd@gnu.org> 21942012-02-06 Chong Yidong <cyd@gnu.org>
1497 2195
diff --git a/lisp/ChangeLog.11 b/lisp/ChangeLog.11
index 0b4e62f9e91..8ea7d40c004 100644
--- a/lisp/ChangeLog.11
+++ b/lisp/ChangeLog.11
@@ -10889,7 +10889,7 @@
108892004-01-29 Jari Aalto <jari.aalto@poboxes.com> 108892004-01-29 Jari Aalto <jari.aalto@poboxes.com>
10890 10890
10891 * progmodes/executable.el (executable-command-find-posix-p): 10891 * progmodes/executable.el (executable-command-find-posix-p):
10892 New. Check if find handles arguments Posix-style. 10892 New. Check if find handles arguments POSIX-style.
10893 10893
10894 * progmodes/grep.el (grep-compute-defaults): 10894 * progmodes/grep.el (grep-compute-defaults):
10895 Use executable-command-find-posix-p. 10895 Use executable-command-find-posix-p.
diff --git a/lisp/ChangeLog.12 b/lisp/ChangeLog.12
index 9611eaa21b4..2361528abb3 100644
--- a/lisp/ChangeLog.12
+++ b/lisp/ChangeLog.12
@@ -12449,7 +12449,7 @@
12449 12449
12450 * calendar/appt.el (diary-selective-display): Add defvar. 12450 * calendar/appt.el (diary-selective-display): Add defvar.
12451 12451
12452 * sort.el (sort-columns): Use Posix arg syntax for `sort'. 12452 * sort.el (sort-columns): Use POSIX arg syntax for `sort'.
12453 12453
12454 * isearch.el (search-whitespace-regexp): Fix custom type. 12454 * isearch.el (search-whitespace-regexp): Fix custom type.
12455 12455
diff --git a/lisp/ChangeLog.6 b/lisp/ChangeLog.6
index 85301ef78e1..5d79470bd2a 100644
--- a/lisp/ChangeLog.6
+++ b/lisp/ChangeLog.6
@@ -715,7 +715,7 @@
715 715
716 * ediff-diff.el (ediff-setup-fine-diff-regions): 716 * ediff-diff.el (ediff-setup-fine-diff-regions):
717 Allow diff options to be passed to the diff program. 717 Allow diff options to be passed to the diff program.
718 (ediff-make-diff2-buffer): Don't run Posix diff on remote files. 718 (ediff-make-diff2-buffer): Don't run POSIX diff on remote files.
719 (ediff-make-diff2-buffer): Refuses to diff remote files. 719 (ediff-make-diff2-buffer): Refuses to diff remote files.
720 (ediff-make-diff2-buffer, ediff-setup-diff-regions): Changed functions. 720 (ediff-make-diff2-buffer, ediff-setup-diff-regions): Changed functions.
721 (ediff-make-diff2-buffer): New function. 721 (ediff-make-diff2-buffer): New function.
diff --git a/lisp/abbrev.el b/lisp/abbrev.el
index 3845c4ce4e6..7f54d3dc253 100644
--- a/lisp/abbrev.el
+++ b/lisp/abbrev.el
@@ -134,10 +134,13 @@ Otherwise display all abbrevs."
134 (push table empty-tables) 134 (push table empty-tables)
135 (insert-abbrev-table-description table t))) 135 (insert-abbrev-table-description table t)))
136 (dolist (table (nreverse empty-tables)) 136 (dolist (table (nreverse empty-tables))
137 (insert-abbrev-table-description table t)))) 137 (insert-abbrev-table-description table t)))
138 ;; Note: `list-abbrevs' can dispaly only local abbrevs, in
139 ;; which case editing could lose abbrevs of other tables. Thus
140 ;; enter `edit-abbrevs-mode' only if LOCAL is nil.
141 (edit-abbrevs-mode))
138 (goto-char (point-min)) 142 (goto-char (point-min))
139 (set-buffer-modified-p nil) 143 (set-buffer-modified-p nil)
140 (edit-abbrevs-mode)
141 (current-buffer)))) 144 (current-buffer))))
142 145
143(defun edit-abbrevs-mode () 146(defun edit-abbrevs-mode ()
@@ -152,7 +155,8 @@ Otherwise display all abbrevs."
152 155
153(defun edit-abbrevs () 156(defun edit-abbrevs ()
154 "Alter abbrev definitions by editing a list of them. 157 "Alter abbrev definitions by editing a list of them.
155Selects a buffer containing a list of abbrev definitions. 158Selects a buffer containing a list of abbrev definitions with
159point located in the abbrev table of current buffer.
156You can edit them and type \\<edit-abbrevs-map>\\[edit-abbrevs-redefine] to redefine abbrevs 160You can edit them and type \\<edit-abbrevs-map>\\[edit-abbrevs-redefine] to redefine abbrevs
157according to your editing. 161according to your editing.
158Buffer contains a header line for each abbrev table, 162Buffer contains a header line for each abbrev table,
@@ -163,7 +167,12 @@ where NAME and EXPANSION are strings with quotes,
163USECOUNT is an integer, and HOOK is any valid function 167USECOUNT is an integer, and HOOK is any valid function
164or may be omitted (it is usually omitted)." 168or may be omitted (it is usually omitted)."
165 (interactive) 169 (interactive)
166 (switch-to-buffer (prepare-abbrev-list-buffer))) 170 (let ((table-name (abbrev-table-name local-abbrev-table)))
171 (switch-to-buffer (prepare-abbrev-list-buffer))
172 (when (and table-name
173 (search-forward
174 (concat "(" (symbol-name table-name) ")\n\n") nil t))
175 (goto-char (match-end 0)))))
167 176
168(defun edit-abbrevs-redefine () 177(defun edit-abbrevs-redefine ()
169 "Redefine abbrevs according to current buffer contents." 178 "Redefine abbrevs according to current buffer contents."
diff --git a/lisp/avoid.el b/lisp/avoid.el
index 17d99fd6517..bfe15de0ca2 100644
--- a/lisp/avoid.el
+++ b/lisp/avoid.el
@@ -67,7 +67,7 @@
67 67
68;;; Code: 68;;; Code:
69 69
70(provide 'avoid) 70(eval-when-compile (require 'cl))
71 71
72(defgroup avoid nil 72(defgroup avoid nil
73 "Make mouse pointer stay out of the way of editing." 73 "Make mouse pointer stay out of the way of editing."
@@ -80,7 +80,7 @@
80See function `mouse-avoidance-mode' for possible values. 80See function `mouse-avoidance-mode' for possible values.
81Setting this variable directly does not take effect; 81Setting this variable directly does not take effect;
82use either \\[customize] or the function `mouse-avoidance-mode'." 82use either \\[customize] or the function `mouse-avoidance-mode'."
83 :set (lambda (symbol value) 83 :set (lambda (_symbol value)
84 ;; 'none below prevents toggling when value is nil. 84 ;; 'none below prevents toggling when value is nil.
85 (mouse-avoidance-mode (or value 'none))) 85 (mouse-avoidance-mode (or value 'none)))
86 :initialize 'custom-initialize-default 86 :initialize 'custom-initialize-default
@@ -115,6 +115,23 @@ Only applies in Mouse Avoidance modes `animate' and `jump'."
115 :type 'integer 115 :type 'integer
116 :group 'avoid) 116 :group 'avoid)
117 117
118(defcustom mouse-avoidance-banish-position '((frame-or-window . frame)
119 (side . right)
120 (side-pos . 3)
121 (top-or-bottom . top)
122 (top-or-bottom-pos . 0))
123 "Position to which Mouse Avoidance mode `banish' moves the mouse.
124An alist where keywords mean:
125FRAME-OR-WINDOW: banish the mouse to corner of frame or window.
126SIDE: banish the mouse on right or left corner of frame or window.
127SIDE-POS: Distance from right or left edge of frame or window.
128TOP-OR-BOTTOM: banish the mouse to top or bottom of frame or window.
129TOP-OR-BOTTOM-POS: Distance from top or bottom edge of frame or window."
130 :group 'avoid
131 :type '(alist :key-type symbol :value-type symbol)
132 :options '(frame-or-window side (side-pos integer)
133 top-or-bottom (top-or-bottom-pos integer)))
134
118;; Internal variables 135;; Internal variables
119(defvar mouse-avoidance-state nil) 136(defvar mouse-avoidance-state nil)
120(defvar mouse-avoidance-pointer-shapes nil) 137(defvar mouse-avoidance-pointer-shapes nil)
@@ -183,13 +200,45 @@ Acceptable distance is defined by `mouse-avoidance-threshold'."
183 200
184(defun mouse-avoidance-banish-destination () 201(defun mouse-avoidance-banish-destination ()
185 "The position to which Mouse Avoidance mode `banish' moves the mouse. 202 "The position to which Mouse Avoidance mode `banish' moves the mouse.
186You can redefine this if you want the mouse banished to a different corner." 203
187 (let* ((pos (window-edges))) 204If you want the mouse banished to a different corner set
188 (cons (- (nth 2 pos) 2) 205`mouse-avoidance-banish-position' as you need."
189 (nth 1 pos)))) 206 (let* ((fra-or-win (assoc-default
207 'frame-or-window
208 mouse-avoidance-banish-position 'eq))
209 (list-values (case fra-or-win
210 (frame (list 0 0 (frame-width) (frame-height)))
211 (window (window-edges))))
212 (alist (loop for v in list-values
213 for k in '(left top right bottom)
214 collect (cons k v)))
215 (side (assoc-default
216 'side
217 mouse-avoidance-banish-position 'eq))
218 (side-dist (assoc-default
219 'side-pos
220 mouse-avoidance-banish-position 'eq))
221 (top-or-bottom (assoc-default
222 'top-or-bottom
223 mouse-avoidance-banish-position 'eq))
224 (top-or-bottom-dist (assoc-default
225 'top-or-bottom-pos
226 mouse-avoidance-banish-position 'eq))
227 (side-fn (case side
228 (left '+)
229 (right '-)))
230 (top-or-bottom-fn (case top-or-bottom
231 (top '+)
232 (bottom '-))))
233 (cons (funcall side-fn ; -/+
234 (assoc-default side alist 'eq) ; right or left
235 side-dist) ; distance from side
236 (funcall top-or-bottom-fn ; -/+
237 (assoc-default top-or-bottom alist 'eq) ; top/bottom
238 top-or-bottom-dist)))) ; distance from top/bottom
190 239
191(defun mouse-avoidance-banish-mouse () 240(defun mouse-avoidance-banish-mouse ()
192 ;; Put the mouse pointer in the upper-right corner of the current frame. 241 "Put the mouse pointer to `mouse-avoidance-banish-position'."
193 (mouse-avoidance-set-mouse-position (mouse-avoidance-banish-destination))) 242 (mouse-avoidance-set-mouse-position (mouse-avoidance-banish-destination)))
194 243
195(defsubst mouse-avoidance-delta (cur delta dist var min max) 244(defsubst mouse-avoidance-delta (cur delta dist var min max)
@@ -218,7 +267,6 @@ You can redefine this if you want the mouse banished to a different corner."
218 ;; For these modes, state keeps track of the total offset that we've 267 ;; For these modes, state keeps track of the total offset that we've
219 ;; accumulated, and tries to keep it close to zero. 268 ;; accumulated, and tries to keep it close to zero.
220 (let* ((cur (mouse-position)) 269 (let* ((cur (mouse-position))
221 (cur-frame (car cur))
222 (cur-pos (cdr cur)) 270 (cur-pos (cdr cur))
223 (pos (window-edges)) 271 (pos (window-edges))
224 (wleft (pop pos)) 272 (wleft (pop pos))
@@ -408,4 +456,6 @@ definition of \"random distance\".)"
408(if mouse-avoidance-mode 456(if mouse-avoidance-mode
409 (mouse-avoidance-mode mouse-avoidance-mode)) 457 (mouse-avoidance-mode mouse-avoidance-mode))
410 458
459(provide 'avoid)
460
411;;; avoid.el ends here 461;;; avoid.el ends here
diff --git a/lisp/battery.el b/lisp/battery.el
index 586be9e8938..dcfe07121b3 100644
--- a/lisp/battery.el
+++ b/lisp/battery.el
@@ -39,6 +39,9 @@
39 :prefix "battery-" 39 :prefix "battery-"
40 :group 'hardware) 40 :group 'hardware)
41 41
42;; Either BATn or yeeloong-bat, basically.
43(defconst battery--linux-sysfs-regexp "[bB][aA][tT][0-9]?$")
44
42(defcustom battery-status-function 45(defcustom battery-status-function
43 (cond ((and (eq system-type 'gnu/linux) 46 (cond ((and (eq system-type 'gnu/linux)
44 (file-readable-p "/proc/apm")) 47 (file-readable-p "/proc/apm"))
@@ -48,12 +51,9 @@
48 'battery-linux-proc-acpi) 51 'battery-linux-proc-acpi)
49 ((and (eq system-type 'gnu/linux) 52 ((and (eq system-type 'gnu/linux)
50 (file-directory-p "/sys/class/power_supply/") 53 (file-directory-p "/sys/class/power_supply/")
51 (directory-files "/sys/class/power_supply/" nil "BAT[0-9]$")) 54 (directory-files "/sys/class/power_supply/" nil
55 battery--linux-sysfs-regexp))
52 'battery-linux-sysfs) 56 'battery-linux-sysfs)
53 ((and (eq system-type 'gnu/linux)
54 (file-directory-p "/sys/class/power_supply/yeeloong-bat/")
55 (directory-files "/sys/class/power_supply/yeeloong-bat/" nil "charge_"))
56 'battery-yeeloong-sysfs)
57 ((and (eq system-type 'darwin) 57 ((and (eq system-type 'darwin)
58 (condition-case nil 58 (condition-case nil
59 (with-temp-buffer 59 (with-temp-buffer
@@ -78,11 +78,9 @@ introduced by a `%' character in a control string."
78 (cond ((eq battery-status-function 'battery-linux-proc-acpi) 78 (cond ((eq battery-status-function 'battery-linux-proc-acpi)
79 "Power %L, battery %B at %r (%p%% load, remaining time %t)") 79 "Power %L, battery %B at %r (%p%% load, remaining time %t)")
80 ((eq battery-status-function 'battery-linux-sysfs) 80 ((eq battery-status-function 'battery-linux-sysfs)
81 "Power %L, battery %B (%p%% load)") 81 "Power %L, battery %B (%p%% load, remaining time %t)")
82 ((eq battery-status-function 'battery-pmset) 82 ((eq battery-status-function 'battery-pmset)
83 "%L power, battery %B (%p%% load, remaining time %t)") 83 "%L power, battery %B (%p%% load, remaining time %t)")
84 ((eq battery-status-function 'battery-yeeloong-sysfs)
85 "%L power, battery %B (%p%% load, remaining time %t)")
86 (battery-status-function 84 (battery-status-function
87 "Power %L, battery %B (%p%% load, remaining time %t)")) 85 "Power %L, battery %B (%p%% load, remaining time %t)"))
88 "Control string formatting the string to display in the echo area. 86 "Control string formatting the string to display in the echo area.
@@ -344,14 +342,15 @@ The following %-sequences are provided:
344 (setq charging-state (match-string 1))) 342 (setq charging-state (match-string 1)))
345 (when (re-search-forward "present rate: +\\([0-9]+\\) \\(m[AW]\\)$" 343 (when (re-search-forward "present rate: +\\([0-9]+\\) \\(m[AW]\\)$"
346 nil t) 344 nil t)
347 (setq rate (+ (or rate 0) (string-to-number (match-string 1))) 345 (setq rate (+ (or rate 0) (string-to-number (match-string 1))))
348 rate-type (or (and rate-type 346 (when (> rate 0)
347 (setq rate-type (or (and rate-type
349 (if (string= rate-type (match-string 2)) 348 (if (string= rate-type (match-string 2))
350 rate-type 349 rate-type
351 (error 350 (error
352 "Inconsistent rate types (%s vs. %s)" 351 "Inconsistent rate types (%s vs. %s)"
353 rate-type (match-string 2)))) 352 rate-type (match-string 2))))
354 (match-string 2)))) 353 (match-string 2)))))
355 (when (re-search-forward "remaining capacity: +\\([0-9]+\\) m[AW]h$" 354 (when (re-search-forward "remaining capacity: +\\([0-9]+\\) m[AW]h$"
356 nil t) 355 nil t)
357 (setq capacity 356 (setq capacity
@@ -447,7 +446,8 @@ The following %-sequences are provided:
447 (with-temp-buffer 446 (with-temp-buffer
448 (dolist (dir (ignore-errors 447 (dolist (dir (ignore-errors
449 (directory-files 448 (directory-files
450 "/sys/class/power_supply/" t "BAT[0-9]$"))) 449 "/sys/class/power_supply/" t
450 battery--linux-sysfs-regexp)))
451 (erase-buffer) 451 (erase-buffer)
452 (ignore-errors (insert-file-contents 452 (ignore-errors (insert-file-contents
453 (expand-file-name "uevent" dir))) 453 (expand-file-name "uevent" dir)))
@@ -509,7 +509,7 @@ The following %-sequences are provided:
509 "N/A")) 509 "N/A"))
510 (cons ?d (or temperature "N/A")) 510 (cons ?d (or temperature "N/A"))
511 (cons ?B (or charging-state "N/A")) 511 (cons ?B (or charging-state "N/A"))
512 (cons ?p (cond ((> charge-full 0) 512 (cons ?p (cond ((and (> charge-full 0) (> charge-now 0))
513 (format "%.1f" 513 (format "%.1f"
514 (/ (* 100 charge-now) charge-full))) 514 (/ (* 100 charge-now) charge-full)))
515 ((> energy-full 0) 515 ((> energy-full 0)
@@ -524,91 +524,6 @@ The following %-sequences are provided:
524 "AC" 524 "AC"
525 "BAT") 525 "BAT")
526 "N/A"))))) 526 "N/A")))))
527
528(defun battery-yeeloong-sysfs ()
529 "Get ACPI status information from Linux (the kernel).
530This function works only on the Lemote Yeeloong.
531
532The following %-sequences are provided:
533%c Current capacity (mAh)
534%r Current rate
535%B Battery status (verbose)
536%b Battery status, empty means high, `-' means low,
537 `!' means critical, and `+' means charging
538%L AC line status (verbose)
539%p Battery load percentage
540%m Remaining time (to charge or discharge) in minutes
541%h Remaining time (to charge or discharge) in hours
542%t Remaining time (to charge or discharge) in the form `h:min'"
543
544 (let (capacity
545 capacity-level
546 status
547 ac-online
548 hours
549 current-now
550 charge-full
551 charge-now)
552
553 (with-temp-buffer
554 (ignore-errors
555 (insert-file-contents "/sys/class/power_supply/yeeloong-bat/uevent")
556 (goto-char 1)
557 (search-forward "POWER_SUPPLY_CHARGE_NOW=")
558 (setq charge-now (read (current-buffer)))
559 (goto-char 1)
560 (search-forward "POWER_SUPPLY_CHARGE_FULL=")
561 (setq charge-full (read (current-buffer)))
562 (goto-char 1)
563 (search-forward "POWER_SUPPLY_CURRENT_NOW=")
564 (setq current-now (read (current-buffer)))
565 (goto-char 1)
566 (search-forward "POWER_SUPPLY_CAPACITY_LEVEL=")
567 (setq capacity-level (buffer-substring (point) (line-end-position)))
568 (goto-char 1)
569 (search-forward "POWER_SUPPLY_STATUS=")
570 (setq status (buffer-substring (point) (line-end-position))))
571
572 (erase-buffer)
573 (ignore-errors
574 (insert-file-contents
575 "/sys/class/power_supply/yeeloong-ac/online")
576 (goto-char 1)
577 (setq ac-online (read (current-buffer)))
578 (erase-buffer)))
579
580
581 (setq capacity (round (/ (* charge-now 100.0) charge-full)))
582 (when (and current-now (not (= current-now 0)))
583 (if (< current-now 0)
584 ;; Charging
585 (setq hours (/ (- charge-now charge-full) (+ 0.0 current-now)))
586 ;; Discharging
587 (setq hours (/ charge-now (+ 0.0 current-now)))))
588
589 (list (cons ?c (if charge-now
590 (number-to-string charge-now)
591 "N/A"))
592 (cons ?r current-now)
593 (cons ?B (cond ((equal capacity-level "Full") "full")
594 ((equal status "Charging") "charging")
595 ((equal capacity-level "Low") "low")
596 ((equal capacity-level "Critical") "critical")
597 (t "high")))
598 (cons ?b (cond ((equal capacity-level "Full") " ")
599 ((equal status "Charging") "+")
600 ((equal capacity-level "Low") "-")
601 ((equal capacity-level "Critical") "!")
602 (t " ")))
603 (cons ?h (if hours (number-to-string hours) "N/A"))
604 (cons ?m (if hours (number-to-string (* 60 hours)) "N/A"))
605 (cons ?t (if hours
606 (format "%d:%d"
607 (/ (round (* 60 hours)) 60)
608 (% (round (* 60 hours)) 60))
609 "N/A"))
610 (cons ?p (if capacity (number-to-string capacity) "N/A"))
611 (cons ?L (if (eq ac-online 1) "AC" "BAT")))))
612 527
613;;; `pmset' interface for Darwin (OS X). 528;;; `pmset' interface for Darwin (OS X).
614 529
diff --git a/lisp/bindings.el b/lisp/bindings.el
index a87f321c936..8cfeecf5b40 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -868,6 +868,7 @@ if `inhibit-field-text-motion' is non-nil."
868 "Keymap for navigation commands.") 868 "Keymap for navigation commands.")
869(define-key esc-map "g" goto-map) 869(define-key esc-map "g" goto-map)
870 870
871(define-key goto-map "c" 'goto-char)
871(define-key goto-map "g" 'goto-line) 872(define-key goto-map "g" 'goto-line)
872(define-key goto-map "\M-g" 'goto-line) 873(define-key goto-map "\M-g" 'goto-line)
873(define-key goto-map "n" 'next-error) 874(define-key goto-map "n" 'next-error)
diff --git a/lisp/bs.el b/lisp/bs.el
index 64c1183b64d..08d05a946e3 100644
--- a/lisp/bs.el
+++ b/lisp/bs.el
@@ -964,7 +964,7 @@ Default is `bs--current-sort-function'."
964Uses function `toggle-read-only'." 964Uses function `toggle-read-only'."
965 (interactive) 965 (interactive)
966 (with-current-buffer (bs--current-buffer) 966 (with-current-buffer (bs--current-buffer)
967 (toggle-read-only)) 967 (call-interactively 'toggle-read-only))
968 (bs--update-current-line)) 968 (bs--update-current-line))
969 969
970(defun bs-clear-modified () 970(defun bs-clear-modified ()
diff --git a/lisp/calendar/cal-tex.el b/lisp/calendar/cal-tex.el
index 14899431e2a..0ae2b38eaf6 100644
--- a/lisp/calendar/cal-tex.el
+++ b/lisp/calendar/cal-tex.el
@@ -1,6 +1,6 @@
1;;; cal-tex.el --- calendar functions for printing calendars with LaTeX 1;;; cal-tex.el --- calendar functions for printing calendars with LaTeX
2 2
3;; Copyright (C) 1995, 2001-2012 Free Software Foundation, Inc. 3;; Copyright (C) 1995, 2001-2012 Free Software Foundation, Inc.
4 4
5;; Author: Steve Fisk <fisk@bowdoin.edu> 5;; Author: Steve Fisk <fisk@bowdoin.edu>
6;; Edward M. Reingold <reingold@cs.uiuc.edu> 6;; Edward M. Reingold <reingold@cs.uiuc.edu>
@@ -1588,8 +1588,7 @@ informative header, and run HOOK."
1588 (cal-tex-e-document) 1588 (cal-tex-e-document)
1589 (or (and cal-tex-preamble-extra 1589 (or (and cal-tex-preamble-extra
1590 (string-match "inputenc" cal-tex-preamble-extra)) 1590 (string-match "inputenc" cal-tex-preamble-extra))
1591 (not (re-search-backward "[^[:ascii:]]" nil 'move)) 1591 (when (re-search-backward "[^[:ascii:]]" nil 'move)
1592 (progn
1593 (goto-char (point-min)) 1592 (goto-char (point-min))
1594 (when (search-forward "documentclass" nil t) 1593 (when (search-forward "documentclass" nil t)
1595 (forward-line 1) 1594 (forward-line 1)
diff --git a/lisp/calendar/holidays.el b/lisp/calendar/holidays.el
index 37f511f7990..9edd353b889 100644
--- a/lisp/calendar/holidays.el
+++ b/lisp/calendar/holidays.el
@@ -634,7 +634,7 @@ The optional LABEL is used to label the buffer created."
634 "Check the list of holidays for any that occur on DATE. 634 "Check the list of holidays for any that occur on DATE.
635DATE is a list (month day year). This function considers the 635DATE is a list (month day year). This function considers the
636holidays from the list `calendar-holidays', and returns a list of 636holidays from the list `calendar-holidays', and returns a list of
637strings describing those holidays that apply on DATE." 637strings describing those holidays that apply on DATE, or nil if none do."
638 (let ((displayed-month (calendar-extract-month date)) 638 (let ((displayed-month (calendar-extract-month date))
639 (displayed-year (calendar-extract-year date)) 639 (displayed-year (calendar-extract-year date))
640 holiday-list) 640 holiday-list)
diff --git a/lisp/comint.el b/lisp/comint.el
index 68fedeb88a9..10981675971 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -699,16 +699,21 @@ BUFFER can be either a buffer or the name of one."
699(defun make-comint-in-buffer (name buffer program &optional startfile &rest switches) 699(defun make-comint-in-buffer (name buffer program &optional startfile &rest switches)
700 "Make a Comint process NAME in BUFFER, running PROGRAM. 700 "Make a Comint process NAME in BUFFER, running PROGRAM.
701If BUFFER is nil, it defaults to NAME surrounded by `*'s. 701If BUFFER is nil, it defaults to NAME surrounded by `*'s.
702PROGRAM should be either a string denoting an executable program to create 702If there is a running process in BUFFER, it is not restarted.
703via `start-file-process', or a cons pair of the form (HOST . SERVICE) denoting 703
704a TCP connection to be opened via `open-network-stream'. If there is already 704PROGRAM should be one of the following:
705a running process in that buffer, it is not restarted. Optional fourth arg 705- a string, denoting an executable program to create via
706STARTFILE is the name of a file, whose contents are sent to the 706 `start-file-process'
707process as its initial input. 707- a cons pair of the form (HOST . SERVICE), denoting a TCP
708 connection to be opened via `open-network-stream'
709- nil, denoting a newly-allocated pty.
710
711Optional fourth arg STARTFILE is the name of a file, whose
712contents are sent to the process as its initial input.
708 713
709If PROGRAM is a string, any more args are arguments to PROGRAM. 714If PROGRAM is a string, any more args are arguments to PROGRAM.
710 715
711Returns the (possibly newly created) process buffer." 716Return the (possibly newly created) process buffer."
712 (or (fboundp 'start-file-process) 717 (or (fboundp 'start-file-process)
713 (error "Multi-processing is not supported for this system")) 718 (error "Multi-processing is not supported for this system"))
714 (setq buffer (get-buffer-create (or buffer (concat "*" name "*")))) 719 (setq buffer (get-buffer-create (or buffer (concat "*" name "*"))))
@@ -752,9 +757,18 @@ See `make-comint' and `comint-exec'."
752(defun comint-exec (buffer name command startfile switches) 757(defun comint-exec (buffer name command startfile switches)
753 "Start up a process named NAME in buffer BUFFER for Comint modes. 758 "Start up a process named NAME in buffer BUFFER for Comint modes.
754Runs the given COMMAND with SWITCHES, and initial input from STARTFILE. 759Runs the given COMMAND with SWITCHES, and initial input from STARTFILE.
755Blasts any old process running in the buffer. Doesn't set the buffer mode. 760
756You can use this to cheaply run a series of processes in the same Comint 761COMMAND should be one of the following:
757buffer. The hook `comint-exec-hook' is run after each exec." 762- a string, denoting an executable program to create via
763 `start-file-process'
764- a cons pair of the form (HOST . SERVICE), denoting a TCP
765 connection to be opened via `open-network-stream'
766- nil, denoting a newly-allocated pty.
767
768This function blasts any old process running in the buffer, and
769does not set the buffer mode. You can use this to cheaply run a
770series of processes in the same Comint buffer. The hook
771`comint-exec-hook' is run after each exec."
758 (with-current-buffer buffer 772 (with-current-buffer buffer
759 (let ((proc (get-buffer-process buffer))) ; Blast any old process. 773 (let ((proc (get-buffer-process buffer))) ; Blast any old process.
760 (if proc (delete-process proc))) 774 (if proc (delete-process proc)))
diff --git a/lisp/cus-start.el b/lisp/cus-start.el
index fbba49951d1..83973e4a534 100644
--- a/lisp/cus-start.el
+++ b/lisp/cus-start.el
@@ -138,9 +138,18 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
138 ;; coding.c 138 ;; coding.c
139 (inhibit-eol-conversion mule boolean) 139 (inhibit-eol-conversion mule boolean)
140 (eol-mnemonic-undecided mule string) 140 (eol-mnemonic-undecided mule string)
141 (eol-mnemonic-unix mule string) 141 ;; startup.el fiddles with the values. IMO, would be
142 (eol-mnemonic-dos mule string) 142 ;; simpler to just use #ifdefs in coding.c.
143 (eol-mnemonic-mac mule string) 143 (eol-mnemonic-unix mule string nil
144 :standard
145 (if (memq system-type '(ms-dos windows-nt))
146 "(Unix)" ":"))
147 (eol-mnemonic-dos mule string nil
148 :standard
149 (if (memq system-type '(ms-dos windows-nt))
150 "\\" "(DOS)"))
151 (eol-mnemonic-mac mule string nil
152 :standard "(Mac)")
144 (file-coding-system-alist 153 (file-coding-system-alist
145 mule 154 mule
146 (alist 155 (alist
diff --git a/lisp/custom.el b/lisp/custom.el
index d8909f8be92..611d5688f30 100644
--- a/lisp/custom.el
+++ b/lisp/custom.el
@@ -936,16 +936,21 @@ Each of the arguments in ARGS should be a list of this form:
936 936
937 (SYMBOL EXP [NOW [REQUEST [COMMENT]]]) 937 (SYMBOL EXP [NOW [REQUEST [COMMENT]]])
938 938
939This stores EXP (without evaluating it) as the saved value for SYMBOL. 939SYMBOL is the variable name, and EXP is an expression which
940If NOW is present and non-nil, then also evaluate EXP and set 940evaluates to the customized value. EXP will also be stored,
941the default value for the SYMBOL to the value of EXP. 941without evaluating it, in SYMBOL's `saved-value' property, so
942that it can be restored via the Customize interface. It is also
943added to the alist in SYMBOL's `theme-value' property \(by
944calling `custom-push-theme').
942 945
943REQUEST is a list of features we must require in order to 946NOW, if present and non-nil, means to install the variable's
944handle SYMBOL properly. 947value directly now, even if its `defcustom' declaration has not
945COMMENT is a comment string about SYMBOL. 948been executed. This is for internal use only.
949
950REQUEST is a list of features to `require' (which are loaded
951prior to evaluating EXP).
946 952
947EXP itself is saved unevaluated as SYMBOL property `saved-value' and 953COMMENT is a comment string about SYMBOL."
948in SYMBOL's list property `theme-value' \(using `custom-push-theme')."
949 (custom-check-theme theme) 954 (custom-check-theme theme)
950 955
951 ;; Process all the needed autoloads before anything else, so that the 956 ;; Process all the needed autoloads before anything else, so that the
diff --git a/lisp/descr-text.el b/lisp/descr-text.el
index d2995ab790d..50b32fc8f2e 100644
--- a/lisp/descr-text.el
+++ b/lisp/descr-text.el
@@ -806,7 +806,7 @@ relevant to POS."
806 (format " %s: %s\n" elt val))))))) 806 (format " %s: %s\n" elt val)))))))
807 807
808 (if text-props-desc (insert text-props-desc)) 808 (if text-props-desc (insert text-props-desc))
809 (toggle-read-only 1)))))) 809 (setq buffer-read-only t))))))
810 810
811(define-obsolete-function-alias 'describe-char-after 'describe-char "22.1") 811(define-obsolete-function-alias 'describe-char-after 'describe-char "22.1")
812 812
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 0795b0175a2..8a499c47464 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -245,7 +245,11 @@ List has a form of (file-name full-file-name (attribute-list))."
245 " (default now): " 245 " (default now): "
246 ": "))) 246 ": ")))
247 (new-attribute (dired-mark-read-string prompt nil op-symbol 247 (new-attribute (dired-mark-read-string prompt nil op-symbol
248 arg files default)) 248 arg files default
249 (cond ((eq op-symbol 'chown)
250 (system-users))
251 ((eq op-symbol 'chgrp)
252 (system-groups)))))
249 (operation (concat program " " new-attribute)) 253 (operation (concat program " " new-attribute))
250 failures) 254 failures)
251 (setq failures 255 (setq failures
@@ -385,7 +389,7 @@ Uses the shell command coming from variables `lpr-command' and
385 (dired-run-shell-command (dired-shell-stuff-it command file-list nil)))) 389 (dired-run-shell-command (dired-shell-stuff-it command file-list nil))))
386 390
387(defun dired-mark-read-string (prompt initial op-symbol arg files 391(defun dired-mark-read-string (prompt initial op-symbol arg files
388 &optional default-value) 392 &optional default-value collection)
389 "Read args for a Dired marked-files command, prompting with PROMPT. 393 "Read args for a Dired marked-files command, prompting with PROMPT.
390Return the user input (a string). 394Return the user input (a string).
391 395
@@ -397,11 +401,14 @@ FILES should be a list of file names.
397DEFAULT-VALUE, if non-nil, should be a \"standard\" value or list 401DEFAULT-VALUE, if non-nil, should be a \"standard\" value or list
398of such values, available via history commands. Note that if the 402of such values, available via history commands. Note that if the
399user enters empty input, this function returns the empty string, 403user enters empty input, this function returns the empty string,
400not DEFAULT-VALUE." 404not DEFAULT-VALUE.
405
406Optional argument COLLECTION is a collection of possible completions,
407suitable for use by `completing-read'."
401 (dired-mark-pop-up nil op-symbol files 408 (dired-mark-pop-up nil op-symbol files
402 'read-from-minibuffer 409 'completing-read
403 (format prompt (dired-mark-prompt arg files)) 410 (format prompt (dired-mark-prompt arg files))
404 initial nil nil nil default-value)) 411 collection nil nil initial nil default-value nil))
405 412
406;;; Cleaning a directory: flagging some backups for deletion. 413;;; Cleaning a directory: flagging some backups for deletion.
407 414
diff --git a/lisp/dired.el b/lisp/dired.el
index d322752e15f..77fe9cb7614 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -3736,7 +3736,7 @@ Ask means pop up a menu for the user to select one of copy, move or link."
3736;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command 3736;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command
3737;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown 3737;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown
3738;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff 3738;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff
3739;;;;;; dired-diff) "dired-aux" "dired-aux.el" "58d623eb8e68e472e6164a1bcae83360") 3739;;;;;; dired-diff) "dired-aux" "dired-aux.el" "de7e4c64718c8ba8438a6397a460bf23")
3740;;; Generated autoloads from dired-aux.el 3740;;; Generated autoloads from dired-aux.el
3741 3741
3742(autoload 'dired-diff "dired-aux" "\ 3742(autoload 'dired-diff "dired-aux" "\
diff --git a/lisp/electric.el b/lisp/electric.el
index 50c9010a74e..6a31ba1f1d3 100644
--- a/lisp/electric.el
+++ b/lisp/electric.el
@@ -215,6 +215,7 @@ point right after that char, and it should return t to cause indentation,
215 ;; it looks challenging. 215 ;; it looks challenging.
216 (let (pos) 216 (let (pos)
217 (when (and 217 (when (and
218 electric-indent-mode
218 ;; Don't reindent while inserting spaces at beginning of line. 219 ;; Don't reindent while inserting spaces at beginning of line.
219 (or (not (memq last-command-event '(?\s ?\t))) 220 (or (not (memq last-command-event '(?\s ?\t)))
220 (save-excursion (skip-chars-backward " \t") (not (bolp)))) 221 (save-excursion (skip-chars-backward " \t") (not (bolp))))
diff --git a/lisp/emacs-lisp/authors.el b/lisp/emacs-lisp/authors.el
index 6f2c6f73eca..a7f8dad54ed 100644
--- a/lisp/emacs-lisp/authors.el
+++ b/lisp/emacs-lisp/authors.el
@@ -1,4 +1,4 @@
1;;; authors.el --- utility for maintaining Emacs's AUTHORS file -*-coding: utf-8;-*- 1;;; authors.el --- utility for maintaining Emacs's AUTHORS file -*-coding: utf-8 -*-
2 2
3;; Copyright (C) 2000-2012 Free Software Foundation, Inc. 3;; Copyright (C) 2000-2012 Free Software Foundation, Inc.
4 4
@@ -829,7 +829,7 @@ with the file and the number of each action:
829 (enable-local-eval nil) 829 (enable-local-eval nil)
830 (existing-buffer (get-file-buffer log-file)) 830 (existing-buffer (get-file-buffer log-file))
831 (buffer (find-file-noselect log-file)) 831 (buffer (find-file-noselect log-file))
832 authors file pos) 832 authors pos)
833 (with-current-buffer buffer 833 (with-current-buffer buffer
834 (save-restriction 834 (save-restriction
835 (widen) 835 (widen)
@@ -943,8 +943,7 @@ and changed by AUTHOR."
943 (file (car change)) 943 (file (car change))
944 (filestat (if (authors-public-domain-p file) 944 (filestat (if (authors-public-domain-p file)
945 (concat file " (public domain)") 945 (concat file " (public domain)")
946 file)) 946 file)))
947 slot)
948 (cond ((assq :wrote actions) 947 (cond ((assq :wrote actions)
949 (setq wrote-list (cons filestat wrote-list))) 948 (setq wrote-list (cons filestat wrote-list)))
950 ((assq :cowrote actions) 949 ((assq :cowrote actions)
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el
index 5af666b9ded..921b08b10a8 100644
--- a/lisp/emacs-lisp/autoload.el
+++ b/lisp/emacs-lisp/autoload.el
@@ -762,9 +762,6 @@ write its autoloads into the specified file instead."
762(define-obsolete-function-alias 'update-autoloads-from-directories 762(define-obsolete-function-alias 'update-autoloads-from-directories
763 'update-directory-autoloads "22.1") 763 'update-directory-autoloads "22.1")
764 764
765(defvar autoload-make-program (or (getenv "MAKE") "make")
766 "Name of the make program in use during the Emacs build process.")
767
768;;;###autoload 765;;;###autoload
769(defun batch-update-autoloads () 766(defun batch-update-autoloads ()
770 "Update loaddefs.el autoloads in batch mode. 767 "Update loaddefs.el autoloads in batch mode.
diff --git a/lisp/emacs-lisp/avl-tree.el b/lisp/emacs-lisp/avl-tree.el
index 9f348767478..1f00677cd00 100644
--- a/lisp/emacs-lisp/avl-tree.el
+++ b/lisp/emacs-lisp/avl-tree.el
@@ -260,7 +260,7 @@ Return t if the height of the tree has grown."
260 (opp (avl-tree--switch-dir dir)) 260 (opp (avl-tree--switch-dir dir))
261 ;; direction 0,1 -> sign factor -1,+1 261 ;; direction 0,1 -> sign factor -1,+1
262 (sgn (avl-tree--dir-to-sign dir)) 262 (sgn (avl-tree--dir-to-sign dir))
263 p1 p2 b2 result) 263 p1 p2 b2)
264 (cond 264 (cond
265 ((< (* sgn (avl-tree--node-balance br)) 0) 265 ((< (* sgn (avl-tree--node-balance br)) 0)
266 (setf (avl-tree--node-balance br) 0) 266 (setf (avl-tree--node-balance br) 0)
diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el
index 9ac5ce7d2f0..9a3d8cf705b 100644
--- a/lisp/emacs-lisp/cl-extra.el
+++ b/lisp/emacs-lisp/cl-extra.el
@@ -1,6 +1,6 @@
1;;; cl-extra.el --- Common Lisp features, part 2 1;;; cl-extra.el --- Common Lisp features, part 2
2 2
3;; Copyright (C) 1993, 2000-2012 Free Software Foundation, Inc. 3;; Copyright (C) 1993, 2000-2012 Free Software Foundation, Inc.
4 4
5;; Author: Dave Gillespie <daveg@synaptics.com> 5;; Author: Dave Gillespie <daveg@synaptics.com>
6;; Keywords: extensions 6;; Keywords: extensions
@@ -430,7 +430,6 @@ With two arguments, return rounding and remainder of their quotient."
430 430
431;; Random numbers. 431;; Random numbers.
432 432
433(defvar *random-state*)
434;;;###autoload 433;;;###autoload
435(defun random* (lim &optional state) 434(defun random* (lim &optional state)
436 "Return a random nonnegative number less than LIM, an integer or float. 435 "Return a random nonnegative number less than LIM, an integer or float.
diff --git a/lisp/emacs-lisp/cl-loaddefs.el b/lisp/emacs-lisp/cl-loaddefs.el
index 5bb86628bb8..9e0099bb649 100644
--- a/lisp/emacs-lisp/cl-loaddefs.el
+++ b/lisp/emacs-lisp/cl-loaddefs.el
@@ -10,7 +10,7 @@
10;;;;;; ceiling* floor* isqrt lcm gcd cl-progv-before cl-set-frame-visible-p 10;;;;;; ceiling* floor* isqrt lcm gcd cl-progv-before cl-set-frame-visible-p
11;;;;;; cl-map-overlays cl-map-intervals cl-map-keymap-recursively 11;;;;;; cl-map-overlays cl-map-intervals cl-map-keymap-recursively
12;;;;;; notevery notany every some mapcon mapcan mapl maplist map 12;;;;;; notevery notany every some mapcon mapcan mapl maplist map
13;;;;;; cl-mapcar-many equalp coerce) "cl-extra" "cl-extra.el" "c172dda6770ce18b556561481bfefbb2") 13;;;;;; cl-mapcar-many equalp coerce) "cl-extra" "cl-extra.el" "5a8a7f7ec2dc453113b8cbda577f2acb")
14;;; Generated autoloads from cl-extra.el 14;;; Generated autoloads from cl-extra.el
15 15
16(autoload 'coerce "cl-extra" "\ 16(autoload 'coerce "cl-extra" "\
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index 88698a1f069..0d6716a2e63 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -260,7 +260,7 @@ the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'.
260 ;; repeat-command still does the toggling correctly. 260 ;; repeat-command still does the toggling correctly.
261 (interactive (list (or current-prefix-arg 'toggle))) 261 (interactive (list (or current-prefix-arg 'toggle)))
262 (let ((,last-message (current-message))) 262 (let ((,last-message (current-message)))
263 (,@(if setter (list setter) 263 (,@(if setter `(funcall #',setter)
264 (list (if (symbolp mode) 'setq 'setf) mode)) 264 (list (if (symbolp mode) 'setq 'setf) mode))
265 (if (eq arg 'toggle) 265 (if (eq arg 'toggle)
266 (not ,mode) 266 (not ,mode)
diff --git a/lisp/emacs-lisp/eieio-opt.el b/lisp/emacs-lisp/eieio-opt.el
index 10816aaa43c..a899839f68a 100644
--- a/lisp/emacs-lisp/eieio-opt.el
+++ b/lisp/emacs-lisp/eieio-opt.el
@@ -72,8 +72,7 @@ Argument CH-PREFIX is another character prefix to display."
72 72
73;;; CLASS COMPLETION / DOCUMENTATION 73;;; CLASS COMPLETION / DOCUMENTATION
74 74
75;;;###autoload 75;;;###autoload(defalias 'describe-class 'eieio-describe-class)
76(defalias 'describe-class 'eieio-describe-class)
77 76
78;;;###autoload 77;;;###autoload
79(defun eieio-describe-class (class &optional headerfcn) 78(defun eieio-describe-class (class &optional headerfcn)
@@ -305,8 +304,7 @@ are not abstract."
305;;; METHOD COMPLETION / DOC 304;;; METHOD COMPLETION / DOC
306 305
307(defalias 'describe-method 'eieio-describe-generic) 306(defalias 'describe-method 'eieio-describe-generic)
308;;;###autoload 307;;;###autoload(defalias 'describe-generic 'eieio-describe-generic)
309(defalias 'describe-generic 'eieio-describe-generic)
310(defalias 'eieio-describe-method 'eieio-describe-generic) 308(defalias 'eieio-describe-method 'eieio-describe-generic)
311 309
312;;;###autoload 310;;;###autoload
diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el
index f1c1bf8965c..768eba58ee1 100644
--- a/lisp/emacs-lisp/eieio.el
+++ b/lisp/emacs-lisp/eieio.el
@@ -3051,7 +3051,7 @@ Optional argument GROUP is the sub-group of slots to display.
3051 3051
3052;;;### (autoloads (eieio-help-mode-augmentation-maybee eieio-describe-generic 3052;;;### (autoloads (eieio-help-mode-augmentation-maybee eieio-describe-generic
3053;;;;;; eieio-describe-constructor eieio-describe-class eieio-browse) 3053;;;;;; eieio-describe-constructor eieio-describe-class eieio-browse)
3054;;;;;; "eieio-opt" "eieio-opt.el" "e2814881441ad23759409687502f0ee1") 3054;;;;;; "eieio-opt" "eieio-opt.el" "d808328f9c0156ecbd412d77ba8c569e")
3055;;; Generated autoloads from eieio-opt.el 3055;;; Generated autoloads from eieio-opt.el
3056 3056
3057(autoload 'eieio-browse "eieio-opt" "\ 3057(autoload 'eieio-browse "eieio-opt" "\
@@ -3060,7 +3060,6 @@ If optional ROOT-CLASS, then start with that, otherwise start with
3060variable `eieio-default-superclass'. 3060variable `eieio-default-superclass'.
3061 3061
3062\(fn &optional ROOT-CLASS)" t nil) 3062\(fn &optional ROOT-CLASS)" t nil)
3063
3064(defalias 'describe-class 'eieio-describe-class) 3063(defalias 'describe-class 'eieio-describe-class)
3065 3064
3066(autoload 'eieio-describe-class "eieio-opt" "\ 3065(autoload 'eieio-describe-class "eieio-opt" "\
@@ -3075,7 +3074,6 @@ Describe the constructor function FCN.
3075Uses `eieio-describe-class' to describe the class being constructed. 3074Uses `eieio-describe-class' to describe the class being constructed.
3076 3075
3077\(fn FCN)" t nil) 3076\(fn FCN)" t nil)
3078
3079(defalias 'describe-generic 'eieio-describe-generic) 3077(defalias 'describe-generic 'eieio-describe-generic)
3080 3078
3081(autoload 'eieio-describe-generic "eieio-opt" "\ 3079(autoload 'eieio-describe-generic "eieio-opt" "\
diff --git a/lisp/emacs-lisp/ert-x.el b/lisp/emacs-lisp/ert-x.el
index 257d0528cbc..a7916354c91 100644
--- a/lisp/emacs-lisp/ert-x.el
+++ b/lisp/emacs-lisp/ert-x.el
@@ -3,7 +3,7 @@
3;; Copyright (C) 2008, 2010-2012 Free Software Foundation, Inc. 3;; Copyright (C) 2008, 2010-2012 Free Software Foundation, Inc.
4 4
5;; Author: Lennart Borgman (lennart O borgman A gmail O com) 5;; Author: Lennart Borgman (lennart O borgman A gmail O com)
6;; Author: Christian Ohler <ohler@gnu.org> 6;; Christian Ohler <ohler@gnu.org>
7 7
8;; This file is part of GNU Emacs. 8;; This file is part of GNU Emacs.
9 9
diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el
index 4efdc3240cd..bcb7fab026b 100644
--- a/lisp/emacs-lisp/lisp.el
+++ b/lisp/emacs-lisp/lisp.el
@@ -447,7 +447,21 @@ Optional ARG is ignored."
447 ;; Try first in this order for the sake of languages with nested 447 ;; Try first in this order for the sake of languages with nested
448 ;; functions where several can end at the same place as with 448 ;; functions where several can end at the same place as with
449 ;; the offside rule, e.g. Python. 449 ;; the offside rule, e.g. Python.
450 (beginning-of-defun) 450
451 ;; Finding the start of the function is a bit problematic since
452 ;; `beginning-of-defun' when we are on the first character of
453 ;; the function might go to the previous function.
454 ;;
455 ;; Therefore we first move one character forward and then call
456 ;; `beginning-of-defun'. However now we must check that we did
457 ;; not move into the next function.
458 (let ((here (point)))
459 (unless (eolp)
460 (forward-char))
461 (beginning-of-defun)
462 (when (< (point) here)
463 (goto-char here)
464 (beginning-of-defun)))
451 (setq beg (point)) 465 (setq beg (point))
452 (end-of-defun) 466 (end-of-defun)
453 (setq end (point)) 467 (setq end (point))
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 5b158eb994f..4b868f72899 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -524,7 +524,7 @@ Required package `%s-%s' is unavailable"
524 524
525(defun define-package (name-string version-string 525(defun define-package (name-string version-string
526 &optional docstring requirements 526 &optional docstring requirements
527 &rest extra-properties) 527 &rest _extra-properties)
528 "Define a new package. 528 "Define a new package.
529NAME-STRING is the name of the package, as a string. 529NAME-STRING is the name of the package, as a string.
530VERSION-STRING is the version of the package, as a string. 530VERSION-STRING is the version of the package, as a string.
@@ -584,7 +584,7 @@ EXTRA-PROPERTIES is currently unused."
584(defun package-generate-autoloads (name pkg-dir) 584(defun package-generate-autoloads (name pkg-dir)
585 (require 'autoload) ;Load before we let-bind generated-autoload-file! 585 (require 'autoload) ;Load before we let-bind generated-autoload-file!
586 (let* ((auto-name (concat name "-autoloads.el")) 586 (let* ((auto-name (concat name "-autoloads.el"))
587 (ignore-name (concat name "-pkg.el")) 587 ;;(ignore-name (concat name "-pkg.el"))
588 (generated-autoload-file (expand-file-name auto-name pkg-dir)) 588 (generated-autoload-file (expand-file-name auto-name pkg-dir))
589 (version-control 'never)) 589 (version-control 'never))
590 (unless (fboundp 'autoload-ensure-default-file) 590 (unless (fboundp 'autoload-ensure-default-file)
@@ -1389,7 +1389,7 @@ If REMEMBER-POS is non-nil, keep point on the same entry.
1389PACKAGES should be t, which means to display all known packages, 1389PACKAGES should be t, which means to display all known packages,
1390or a list of package names (symbols) to display." 1390or a list of package names (symbols) to display."
1391 ;; Construct list of ((PACKAGE . VERSION) STATUS DESCRIPTION). 1391 ;; Construct list of ((PACKAGE . VERSION) STATUS DESCRIPTION).
1392 (let (info-list name builtin) 1392 (let (info-list name)
1393 ;; Installed packages: 1393 ;; Installed packages:
1394 (dolist (elt package-alist) 1394 (dolist (elt package-alist)
1395 (setq name (car elt)) 1395 (setq name (car elt))
@@ -1474,21 +1474,21 @@ If optional arg BUTTON is non-nil, describe its associated package."
1474 (describe-package package)))) 1474 (describe-package package))))
1475 1475
1476;; fixme numeric argument 1476;; fixme numeric argument
1477(defun package-menu-mark-delete (&optional num) 1477(defun package-menu-mark-delete (&optional _num)
1478 "Mark a package for deletion and move to the next line." 1478 "Mark a package for deletion and move to the next line."
1479 (interactive "p") 1479 (interactive "p")
1480 (if (member (package-menu-get-status) '("installed" "obsolete")) 1480 (if (member (package-menu-get-status) '("installed" "obsolete"))
1481 (tabulated-list-put-tag "D" t) 1481 (tabulated-list-put-tag "D" t)
1482 (forward-line))) 1482 (forward-line)))
1483 1483
1484(defun package-menu-mark-install (&optional num) 1484(defun package-menu-mark-install (&optional _num)
1485 "Mark a package for installation and move to the next line." 1485 "Mark a package for installation and move to the next line."
1486 (interactive "p") 1486 (interactive "p")
1487 (if (string-equal (package-menu-get-status) "available") 1487 (if (string-equal (package-menu-get-status) "available")
1488 (tabulated-list-put-tag "I" t) 1488 (tabulated-list-put-tag "I" t)
1489 (forward-line))) 1489 (forward-line)))
1490 1490
1491(defun package-menu-mark-unmark (&optional num) 1491(defun package-menu-mark-unmark (&optional _num)
1492 "Clear any marks on a package and move to the next line." 1492 "Clear any marks on a package and move to the next line."
1493 (interactive "p") 1493 (interactive "p")
1494 (tabulated-list-put-tag " " t)) 1494 (tabulated-list-put-tag " " t))
@@ -1530,8 +1530,7 @@ If optional arg BUTTON is non-nil, describe its associated package."
1530 (dolist (entry tabulated-list-entries) 1530 (dolist (entry tabulated-list-entries)
1531 ;; ENTRY is ((NAME . VERSION) [NAME VERSION STATUS DOC]) 1531 ;; ENTRY is ((NAME . VERSION) [NAME VERSION STATUS DOC])
1532 (let ((pkg (car entry)) 1532 (let ((pkg (car entry))
1533 (status (aref (cadr entry) 2)) 1533 (status (aref (cadr entry) 2)))
1534 old)
1535 (cond ((equal status "installed") 1534 (cond ((equal status "installed")
1536 (push pkg installed)) 1535 (push pkg installed))
1537 ((equal status "available") 1536 ((equal status "available")
diff --git a/lisp/emacs-lisp/regexp-opt.el b/lisp/emacs-lisp/regexp-opt.el
index 6d12fe19277..72e3c398dc0 100644
--- a/lisp/emacs-lisp/regexp-opt.el
+++ b/lisp/emacs-lisp/regexp-opt.el
@@ -136,9 +136,6 @@ This means the number of non-shy regexp grouping constructs
136 136
137;;; Workhorse functions. 137;;; Workhorse functions.
138 138
139(eval-when-compile
140 (require 'cl))
141
142(defun regexp-opt-group (strings &optional paren lax) 139(defun regexp-opt-group (strings &optional paren lax)
143 "Return a regexp to match a string in the sorted list STRINGS. 140 "Return a regexp to match a string in the sorted list STRINGS.
144If PAREN non-nil, output regexp parentheses around returned regexp. 141If PAREN non-nil, output regexp parentheses around returned regexp.
@@ -248,15 +245,15 @@ Merges keywords to avoid backtracking in Emacs's regexp matcher."
248 ;; 245 ;;
249 ;; Make a character map but extract character set meta characters. 246 ;; Make a character map but extract character set meta characters.
250 (dolist (char chars) 247 (dolist (char chars)
251 (case char 248 (cond
252 (?\] 249 ((eq char ?\])
253 (setq bracket "]")) 250 (setq bracket "]"))
254 (?^ 251 ((eq char ?^)
255 (setq caret "^")) 252 (setq caret "^"))
256 (?- 253 ((eq char ?-)
257 (setq dash "-")) 254 (setq dash "-"))
258 (otherwise 255 (t
259 (aset charmap char t)))) 256 (aset charmap char t))))
260 ;; 257 ;;
261 ;; Make a character set from the map using ranges where applicable. 258 ;; Make a character set from the map using ranges where applicable.
262 (map-char-table 259 (map-char-table
@@ -268,14 +265,14 @@ Merges keywords to avoid backtracking in Emacs's regexp matcher."
268 (setq charset (format "%s%c-%c" charset start end)) 265 (setq charset (format "%s%c-%c" charset start end))
269 (while (>= end start) 266 (while (>= end start)
270 (setq charset (format "%s%c" charset start)) 267 (setq charset (format "%s%c" charset start))
271 (incf start))) 268 (setq start (1+ start))))
272 (setq start (car c) end (cdr c))) 269 (setq start (car c) end (cdr c)))
273 (if (= (1- c) end) (setq end c) 270 (if (= (1- c) end) (setq end c)
274 (if (> end (+ start 2)) 271 (if (> end (+ start 2))
275 (setq charset (format "%s%c-%c" charset start end)) 272 (setq charset (format "%s%c-%c" charset start end))
276 (while (>= end start) 273 (while (>= end start)
277 (setq charset (format "%s%c" charset start)) 274 (setq charset (format "%s%c" charset start))
278 (incf start))) 275 (setq start (1+ start))))
279 (setq start c end c))))) 276 (setq start c end c)))))
280 charmap) 277 charmap)
281 (when (>= end start) 278 (when (>= end start)
@@ -283,7 +280,7 @@ Merges keywords to avoid backtracking in Emacs's regexp matcher."
283 (setq charset (format "%s%c-%c" charset start end)) 280 (setq charset (format "%s%c-%c" charset start end))
284 (while (>= end start) 281 (while (>= end start)
285 (setq charset (format "%s%c" charset start)) 282 (setq charset (format "%s%c" charset start))
286 (incf start)))) 283 (setq start (1+ start)))))
287 ;; 284 ;;
288 ;; Make sure a caret is not first and a dash is first or last. 285 ;; Make sure a caret is not first and a dash is first or last.
289 (if (and (string-equal charset "") (string-equal bracket "")) 286 (if (and (string-equal charset "") (string-equal bracket ""))
diff --git a/lisp/emacs-lisp/smie.el b/lisp/emacs-lisp/smie.el
index 2a12f03e514..cafa1942a09 100644
--- a/lisp/emacs-lisp/smie.el
+++ b/lisp/emacs-lisp/smie.el
@@ -1602,6 +1602,36 @@ to which that point should be aligned, if we were to reindent it.")
1602 (save-excursion (indent-line-to indent)) 1602 (save-excursion (indent-line-to indent))
1603 (indent-line-to indent))))) 1603 (indent-line-to indent)))))
1604 1604
1605(defun smie-auto-fill ()
1606 (let ((fc (current-fill-column)))
1607 (while (and fc (> (current-column) fc))
1608 (cond
1609 ((not (or (nth 8 (save-excursion
1610 (syntax-ppss (line-beginning-position))))
1611 (nth 8 (syntax-ppss))))
1612 (save-excursion
1613 (beginning-of-line)
1614 (smie-indent-forward-token)
1615 (let ((bsf (point))
1616 (gain 0)
1617 curcol)
1618 (while (<= (setq curcol (current-column)) fc)
1619 ;; FIXME? `smie-indent-calculate' can (and often will)
1620 ;; return a result that actually depends on the presence/absence
1621 ;; of a newline, so the gain computed here may not be accurate,
1622 ;; but in practice it seems to works well enough.
1623 (let* ((newcol (smie-indent-calculate))
1624 (newgain (- curcol newcol)))
1625 (when (> newgain gain)
1626 (setq gain newgain)
1627 (setq bsf (point))))
1628 (smie-indent-forward-token))
1629 (when (> gain 0)
1630 (goto-char bsf)
1631 (newline-and-indent)))))
1632 (t (do-auto-fill))))))
1633
1634
1605(defun smie-setup (grammar rules-function &rest keywords) 1635(defun smie-setup (grammar rules-function &rest keywords)
1606 "Setup SMIE navigation and indentation. 1636 "Setup SMIE navigation and indentation.
1607GRAMMAR is a grammar table generated by `smie-prec2->grammar'. 1637GRAMMAR is a grammar table generated by `smie-prec2->grammar'.
@@ -1612,6 +1642,7 @@ KEYWORDS are additional arguments, which can use the following keywords:
1612 (set (make-local-variable 'smie-rules-function) rules-function) 1642 (set (make-local-variable 'smie-rules-function) rules-function)
1613 (set (make-local-variable 'smie-grammar) grammar) 1643 (set (make-local-variable 'smie-grammar) grammar)
1614 (set (make-local-variable 'indent-line-function) 'smie-indent-line) 1644 (set (make-local-variable 'indent-line-function) 'smie-indent-line)
1645 (set (make-local-variable 'normal-auto-fill-function) 'smie-auto-fill)
1615 (set (make-local-variable 'forward-sexp-function) 1646 (set (make-local-variable 'forward-sexp-function)
1616 'smie-forward-sexp-command) 1647 'smie-forward-sexp-command)
1617 (while keywords 1648 (while keywords
diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el
index f17b12da6a0..9439fba2b86 100644
--- a/lisp/emacs-lisp/tabulated-list.el
+++ b/lisp/emacs-lisp/tabulated-list.el
@@ -215,7 +215,7 @@ buffer and inserts the entries with `tabulated-list-printer'.
215Optional argument REMEMBER-POS, if non-nil, means to move point 215Optional argument REMEMBER-POS, if non-nil, means to move point
216to the entry with the same ID element as the current line." 216to the entry with the same ID element as the current line."
217 (let ((inhibit-read-only t) 217 (let ((inhibit-read-only t)
218 (entries (if (functionp 'tabulated-list-entries) 218 (entries (if (functionp tabulated-list-entries)
219 (funcall tabulated-list-entries) 219 (funcall tabulated-list-entries)
220 tabulated-list-entries)) 220 tabulated-list-entries))
221 entry-id saved-pt saved-col) 221 entry-id saved-pt saved-col)
@@ -246,7 +246,7 @@ to the entry with the same ID element as the current line."
246 (setq entries (sort entries sorter)) 246 (setq entries (sort entries sorter))
247 (if (cdr tabulated-list-sort-key) 247 (if (cdr tabulated-list-sort-key)
248 (setq entries (nreverse entries))) 248 (setq entries (nreverse entries)))
249 (unless (functionp 'tabulated-list-entries) 249 (unless (functionp tabulated-list-entries)
250 (setq tabulated-list-entries entries))))) 250 (setq tabulated-list-entries entries)))))
251 ;; Print the resulting list. 251 ;; Print the resulting list.
252 (dolist (elt entries) 252 (dolist (elt entries)
diff --git a/lisp/emacs-lock.el b/lisp/emacs-lock.el
index 743b828326c..f5954564a2f 100644
--- a/lisp/emacs-lock.el
+++ b/lisp/emacs-lock.el
@@ -81,6 +81,13 @@ for both actions (NOT RECOMMENDED)."
81 :group 'emacs-lock 81 :group 'emacs-lock
82 :version "24.1") 82 :version "24.1")
83 83
84(defcustom emacs-lock-locked-buffer-functions nil
85 "Abnormal hook run when Emacs Lock prevents exiting Emacs, or killing a buffer.
86The functions get one argument, the first locked buffer found."
87 :type 'hook
88 :group 'emacs-lock
89 :version "24.2")
90
84(defvar emacs-lock-mode nil 91(defvar emacs-lock-mode nil
85 "If non-nil, the current buffer is locked. 92 "If non-nil, the current buffer is locked.
86It can be one of the following values: 93It can be one of the following values:
@@ -119,40 +126,45 @@ See `emacs-lock-unlockable-modes'."
119 (or (eq unlock 'all) (eq unlock action)))))) 126 (or (eq unlock 'all) (eq unlock action))))))
120 127
121(defun emacs-lock--exit-locked-buffer () 128(defun emacs-lock--exit-locked-buffer ()
122 "Return the name of the first exit-locked buffer found." 129 "Return the first exit-locked buffer found."
123 (save-current-buffer 130 (save-current-buffer
124 (catch :found 131 (catch :found
125 (dolist (buffer (buffer-list)) 132 (dolist (buffer (buffer-list))
126 (set-buffer buffer) 133 (set-buffer buffer)
127 (unless (or (emacs-lock--can-auto-unlock 'exit) 134 (unless (or (emacs-lock--can-auto-unlock 'exit)
128 (memq emacs-lock-mode '(nil kill))) 135 (memq emacs-lock-mode '(nil kill)))
129 (throw :found (buffer-name)))) 136 (throw :found buffer)))
130 nil))) 137 nil)))
131 138
132(defun emacs-lock--kill-emacs-hook () 139(defun emacs-lock--kill-emacs-hook ()
133 "Signal an error if any buffer is exit-locked. 140 "Signal an error if any buffer is exit-locked.
134Used from `kill-emacs-hook' (which see)." 141Used from `kill-emacs-hook' (which see)."
135 (let ((buffer-name (emacs-lock--exit-locked-buffer))) 142 (let ((locked (emacs-lock--exit-locked-buffer)))
136 (when buffer-name 143 (when locked
137 (error "Emacs cannot exit because buffer %S is locked" buffer-name)))) 144 (run-hook-with-args 'emacs-lock-locked-buffer-functions locked)
145 (error "Emacs cannot exit because buffer %S is locked"
146 (buffer-name locked)))))
138 147
139(defun emacs-lock--kill-emacs-query-functions () 148(defun emacs-lock--kill-emacs-query-functions ()
140 "Display a message if any buffer is exit-locked. 149 "Display a message if any buffer is exit-locked.
141Return a value appropriate for `kill-emacs-query-functions' (which see)." 150Return a value appropriate for `kill-emacs-query-functions' (which see)."
142 (let ((locked (emacs-lock--exit-locked-buffer))) 151 (let ((locked (emacs-lock--exit-locked-buffer)))
143 (or (not locked) 152 (if (not locked)
144 (progn 153 t
145 (message "Emacs cannot exit because buffer %S is locked" locked) 154 (run-hook-with-args 'emacs-lock-locked-buffer-functions locked)
146 nil)))) 155 (message "Emacs cannot exit because buffer %S is locked"
156 (buffer-name locked))
157 nil)))
147 158
148(defun emacs-lock--kill-buffer-query-functions () 159(defun emacs-lock--kill-buffer-query-functions ()
149 "Display a message if the current buffer is kill-locked. 160 "Display a message if the current buffer is kill-locked.
150Return a value appropriate for `kill-buffer-query-functions' (which see)." 161Return a value appropriate for `kill-buffer-query-functions' (which see)."
151 (or (emacs-lock--can-auto-unlock 'kill) 162 (if (or (emacs-lock--can-auto-unlock 'kill)
152 (memq emacs-lock-mode '(nil exit)) 163 (memq emacs-lock-mode '(nil exit)))
153 (progn 164 t
154 (message "Buffer %S is locked and cannot be killed" (buffer-name)) 165 (run-hook-with-args 'emacs-lock-locked-buffer-functions (current-buffer))
155 nil))) 166 (message "Buffer %S is locked and cannot be killed" (buffer-name))
167 nil))
156 168
157(defun emacs-lock--set-mode (mode arg) 169(defun emacs-lock--set-mode (mode arg)
158 "Setter function for `emacs-lock-mode'." 170 "Setter function for `emacs-lock-mode'."
diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el
index a918f298a4e..ba6127b4cba 100644
--- a/lisp/emulation/cua-base.el
+++ b/lisp/emulation/cua-base.el
@@ -1002,15 +1002,21 @@ behavior, see `cua-paste-pop-rotate-temporarily'."
1002 (setq this-command 'cua-paste-pop)))) 1002 (setq this-command 'cua-paste-pop))))
1003 1003
1004(defun cua-exchange-point-and-mark (arg) 1004(defun cua-exchange-point-and-mark (arg)
1005 "Exchanges point and mark, but don't activate the mark. 1005 "Exchange point and mark.
1006Activates the mark if a prefix argument is given." 1006Don't activate the mark if `cua-enable-cua-keys' is non-nil.
1007Otherwise, just activate the mark if a prefix ARG is given.
1008
1009See also `exchange-point-and-mark'."
1007 (interactive "P") 1010 (interactive "P")
1008 (if arg 1011 (cond ((null cua-enable-cua-keys)
1009 (setq mark-active t) 1012 (exchange-point-and-mark arg))
1010 (let (mark-active) 1013 (arg
1011 (exchange-point-and-mark) 1014 (setq mark-active t))
1012 (if cua--rectangle 1015 (t
1013 (cua--rectangle-corner 0))))) 1016 (let (mark-active)
1017 (exchange-point-and-mark)
1018 (if cua--rectangle
1019 (cua--rectangle-corner 0))))))
1014 1020
1015;; Typed text that replaced the highlighted region. 1021;; Typed text that replaced the highlighted region.
1016(defvar cua--repeat-replace-text nil) 1022(defvar cua--repeat-replace-text nil)
@@ -1246,22 +1252,7 @@ If ARG is the atom `-', scroll upward by nearly full screen."
1246 ;; (and region not started with C-SPC). 1252 ;; (and region not started with C-SPC).
1247 ;; If rectangle is active, expand rectangle in specified direction and 1253 ;; If rectangle is active, expand rectangle in specified direction and
1248 ;; ignore the movement. 1254 ;; ignore the movement.
1249 ((if window-system 1255 (this-command-keys-shift-translated
1250 ;; Shortcut for window-system, assuming that input-decode-map is empty.
1251 (memq 'shift (event-modifiers
1252 (aref (this-single-command-raw-keys) 0)))
1253 (or
1254 ;; Check if the final key-sequence was shifted.
1255 (memq 'shift (event-modifiers
1256 (aref (this-single-command-keys) 0)))
1257 ;; If not, maybe the raw key-sequence was mapped by input-decode-map
1258 ;; to a shifted key (and then mapped down to its unshifted form).
1259 (let* ((keys (this-single-command-raw-keys))
1260 (ev (lookup-key input-decode-map keys)))
1261 (or (and (vector ev) (memq 'shift (event-modifiers (aref ev 0))))
1262 ;; Or maybe, the raw key-sequence was not an escape sequence
1263 ;; and was shifted (and then mapped down to its unshifted form).
1264 (memq 'shift (event-modifiers (aref keys 0)))))))
1265 (unless mark-active 1256 (unless mark-active
1266 (push-mark-command nil t)) 1257 (push-mark-command nil t))
1267 (setq cua--last-region-shifted t) 1258 (setq cua--last-region-shifted t)
diff --git a/lisp/emulation/cua-rect.el b/lisp/emulation/cua-rect.el
index e3aade760dc..4286afba938 100644
--- a/lisp/emulation/cua-rect.el
+++ b/lisp/emulation/cua-rect.el
@@ -465,7 +465,7 @@ If command is repeated at same position, delete the rectangle."
465 (cua-copy-rectangle arg) 465 (cua-copy-rectangle arg)
466 (setq cua--mouse-last-pos (cons (point) cua--last-killed-rectangle))))) 466 (setq cua--mouse-last-pos (cons (point) cua--last-killed-rectangle)))))
467 467
468(defun cua--mouse-ignore (event) 468(defun cua--mouse-ignore (_event)
469 (interactive "e") 469 (interactive "e")
470 (setq this-command last-command)) 470 (setq this-command last-command))
471 471
@@ -609,12 +609,12 @@ If command is repeated at same position, delete the rectangle."
609 (let ((lines 0)) 609 (let ((lines 0))
610 (if (not (cua--rectangle-virtual-edges)) 610 (if (not (cua--rectangle-virtual-edges))
611 (cua--rectangle-operation nil nil t 2 t 611 (cua--rectangle-operation nil nil t 2 t
612 (lambda (s e l r v) 612 (lambda (s e _l _r _v)
613 (setq lines (1+ lines)) 613 (setq lines (1+ lines))
614 (if (and (> e s) (<= e (point-max))) 614 (if (and (> e s) (<= e (point-max)))
615 (delete-region s e)))) 615 (delete-region s e))))
616 (cua--rectangle-operation nil 1 t nil t 616 (cua--rectangle-operation nil 1 t nil t
617 (lambda (s e l r v) 617 (lambda (s e _l _r _v)
618 (setq lines (1+ lines)) 618 (setq lines (1+ lines))
619 (when (and (> e s) (<= e (point-max))) 619 (when (and (> e s) (<= e (point-max)))
620 (delete-region s e))))) 620 (delete-region s e)))))
@@ -624,10 +624,10 @@ If command is repeated at same position, delete the rectangle."
624 (let (rect) 624 (let (rect)
625 (if (not (cua--rectangle-virtual-edges)) 625 (if (not (cua--rectangle-virtual-edges))
626 (cua--rectangle-operation nil nil nil nil nil ; do not tabify 626 (cua--rectangle-operation nil nil nil nil nil ; do not tabify
627 (lambda (s e l r) 627 (lambda (s e _l _r)
628 (setq rect (cons (cua--filter-buffer-noprops s e) rect)))) 628 (setq rect (cons (cua--filter-buffer-noprops s e) rect))))
629 (cua--rectangle-operation nil 1 nil nil nil ; do not tabify 629 (cua--rectangle-operation nil 1 nil nil nil ; do not tabify
630 (lambda (s e l r v) 630 (lambda (s e l r _v)
631 (let ((copy t) (bs 0) (as 0) row) 631 (let ((copy t) (bs 0) (as 0) row)
632 (if (= s e) (setq e (1+ e))) 632 (if (= s e) (setq e (1+ e)))
633 (goto-char s) 633 (goto-char s)
@@ -840,7 +840,7 @@ If command is repeated at same position, delete the rectangle."
840 (pad (cua--rectangle-virtual-edges)) 840 (pad (cua--rectangle-virtual-edges))
841 indent) 841 indent)
842 (cua--rectangle-operation (if clear 'clear 'corners) nil t pad nil 842 (cua--rectangle-operation (if clear 'clear 'corners) nil t pad nil
843 (lambda (s e l r) 843 (lambda (_s _e l _r)
844 (move-to-column col pad) 844 (move-to-column col pad)
845 (if (and (eolp) 845 (if (and (eolp)
846 (< (current-column) col)) 846 (< (current-column) col))
@@ -905,10 +905,10 @@ With prefix argument, activate previous rectangle if possible."
905 (cua-help-for-region t)))) 905 (cua-help-for-region t))))
906 906
907(defun cua-restrict-regexp-rectangle (arg) 907(defun cua-restrict-regexp-rectangle (arg)
908 "Restrict rectangle to lines (not) matching REGEXP. 908 "Restrict rectangle to lines (not) matching regexp.
909With prefix argument, the toggle restriction." 909With prefix argument, toggle restriction."
910 (interactive "P") 910 (interactive "P")
911 (let ((r (cua--rectangle-restriction)) regexp) 911 (let ((r (cua--rectangle-restriction)))
912 (if (and r (null (car (cdr r)))) 912 (if (and r (null (car (cdr r))))
913 (if arg 913 (if arg
914 (cua--rectangle-restriction (car r) nil (not (car (cdr (cdr r))))) 914 (cua--rectangle-restriction (car r) nil (not (car (cdr (cdr r)))))
@@ -919,9 +919,9 @@ With prefix argument, the toggle restriction."
919 919
920(defun cua-restrict-prefix-rectangle (arg) 920(defun cua-restrict-prefix-rectangle (arg)
921 "Restrict rectangle to lines (not) starting with CHAR. 921 "Restrict rectangle to lines (not) starting with CHAR.
922With prefix argument, the toggle restriction." 922With prefix argument, toggle restriction."
923 (interactive "P") 923 (interactive "P")
924 (let ((r (cua--rectangle-restriction)) regexp) 924 (let ((r (cua--rectangle-restriction)))
925 (if (and r (car (cdr r))) 925 (if (and r (car (cdr r)))
926 (if arg 926 (if arg
927 (cua--rectangle-restriction (car r) t (not (car (cdr (cdr r))))) 927 (cua--rectangle-restriction (car r) t (not (car (cdr (cdr r)))))
@@ -1000,7 +1000,7 @@ The text previously in the region is not overwritten by the blanks,
1000but instead winds up to the right of the rectangle." 1000but instead winds up to the right of the rectangle."
1001 (interactive) 1001 (interactive)
1002 (cua--rectangle-operation 'corners nil t 1 nil 1002 (cua--rectangle-operation 'corners nil t 1 nil
1003 (lambda (s e l r) 1003 (lambda (_s _e l r)
1004 (skip-chars-forward " \t") 1004 (skip-chars-forward " \t")
1005 (let ((ws (- (current-column) l)) 1005 (let ((ws (- (current-column) l))
1006 (p (point))) 1006 (p (point)))
@@ -1015,7 +1015,7 @@ at that column is deleted.
1015With prefix arg, also delete whitespace to the left of that column." 1015With prefix arg, also delete whitespace to the left of that column."
1016 (interactive "P") 1016 (interactive "P")
1017 (cua--rectangle-operation 'clear nil t 1 nil 1017 (cua--rectangle-operation 'clear nil t 1 nil
1018 (lambda (s e l r) 1018 (lambda (s _e _l _r)
1019 (when arg 1019 (when arg
1020 (skip-syntax-backward " " (line-beginning-position)) 1020 (skip-syntax-backward " " (line-beginning-position))
1021 (setq s (point))) 1021 (setq s (point)))
@@ -1027,7 +1027,7 @@ With prefix arg, also delete whitespace to the left of that column."
1027The text previously in the rectangle is overwritten by the blanks." 1027The text previously in the rectangle is overwritten by the blanks."
1028 (interactive) 1028 (interactive)
1029 (cua--rectangle-operation 'keep nil nil 1 nil 1029 (cua--rectangle-operation 'keep nil nil 1 nil
1030 (lambda (s e l r) 1030 (lambda (s e _l _r)
1031 (goto-char e) 1031 (goto-char e)
1032 (skip-syntax-forward " " (line-end-position)) 1032 (skip-syntax-forward " " (line-end-position))
1033 (setq e (point)) 1033 (setq e (point))
@@ -1040,20 +1040,19 @@ The text previously in the rectangle is overwritten by the blanks."
1040(defun cua-align-rectangle () 1040(defun cua-align-rectangle ()
1041 "Align rectangle lines to left column." 1041 "Align rectangle lines to left column."
1042 (interactive) 1042 (interactive)
1043 (let (x) 1043 (cua--rectangle-operation 'clear nil t t nil
1044 (cua--rectangle-operation 'clear nil t t nil 1044 (lambda (s _e l _r)
1045 (lambda (s e l r) 1045 (let ((b (line-beginning-position)))
1046 (let ((b (line-beginning-position))) 1046 (skip-syntax-backward "^ " b)
1047 (skip-syntax-backward "^ " b) 1047 (skip-syntax-backward " " b)
1048 (skip-syntax-backward " " b) 1048 (setq s (point)))
1049 (setq s (point))) 1049 (skip-syntax-forward " " (line-end-position))
1050 (skip-syntax-forward " " (line-end-position)) 1050 (delete-region s (point))
1051 (delete-region s (point)) 1051 (indent-to l))
1052 (indent-to l)) 1052 (lambda (l _r)
1053 (lambda (l r) 1053 (move-to-column l)
1054 (move-to-column l) 1054 ;; (setq cua-save-point (point))
1055 ;; (setq cua-save-point (point)) 1055 )))
1056 ))))
1057 1056
1058(declare-function cua--cut-rectangle-to-global-mark "cua-gmrk" (as-text)) 1057(declare-function cua--cut-rectangle-to-global-mark "cua-gmrk" (as-text))
1059(declare-function cua--copy-rectangle-to-global-mark "cua-gmrk" (as-text)) 1058(declare-function cua--copy-rectangle-to-global-mark "cua-gmrk" (as-text))
@@ -1087,7 +1086,7 @@ The text previously in the rectangle is overwritten by the blanks."
1087The length of STRING need not be the same as the rectangle width." 1086The length of STRING need not be the same as the rectangle width."
1088 (interactive "sString rectangle: ") 1087 (interactive "sString rectangle: ")
1089 (cua--rectangle-operation 'keep nil t t nil 1088 (cua--rectangle-operation 'keep nil t t nil
1090 (lambda (s e l r) 1089 (lambda (s e l _r)
1091 (delete-region s e) 1090 (delete-region s e)
1092 (skip-chars-forward " \t") 1091 (skip-chars-forward " \t")
1093 (let ((ws (- (current-column) l))) 1092 (let ((ws (- (current-column) l)))
@@ -1095,7 +1094,7 @@ The length of STRING need not be the same as the rectangle width."
1095 (insert string) 1094 (insert string)
1096 (indent-to (+ (current-column) ws)))) 1095 (indent-to (+ (current-column) ws))))
1097 (unless (cua--rectangle-restriction) 1096 (unless (cua--rectangle-restriction)
1098 (lambda (l r) 1097 (lambda (l _r)
1099 (cua--rectangle-right (max l (+ l (length string) -1))))))) 1098 (cua--rectangle-right (max l (+ l (length string) -1)))))))
1100 1099
1101(defun cua-fill-char-rectangle (character) 1100(defun cua-fill-char-rectangle (character)
@@ -1113,7 +1112,7 @@ The length of STRING need not be the same as the rectangle width."
1113 (if buffer-read-only 1112 (if buffer-read-only
1114 (message "Cannot replace in read-only buffer") 1113 (message "Cannot replace in read-only buffer")
1115 (cua--rectangle-operation 'keep nil t 1 nil 1114 (cua--rectangle-operation 'keep nil t 1 nil
1116 (lambda (s e l r) 1115 (lambda (_s e _l _r)
1117 (if (re-search-forward regexp e t) 1116 (if (re-search-forward regexp e t)
1118 (replace-match newtext nil nil)))))) 1117 (replace-match newtext nil nil))))))
1119 1118
@@ -1121,7 +1120,7 @@ The length of STRING need not be the same as the rectangle width."
1121 "Increment each line of CUA rectangle by prefix amount." 1120 "Increment each line of CUA rectangle by prefix amount."
1122 (interactive "p") 1121 (interactive "p")
1123 (cua--rectangle-operation 'keep nil t 1 nil 1122 (cua--rectangle-operation 'keep nil t 1 nil
1124 (lambda (s e l r) 1123 (lambda (_s e _l _r)
1125 (cond 1124 (cond
1126 ((re-search-forward "0x\\([0-9a-fA-F]+\\)" e t) 1125 ((re-search-forward "0x\\([0-9a-fA-F]+\\)" e t)
1127 (let* ((txt (cua--filter-buffer-noprops (match-beginning 1) (match-end 1))) 1126 (let* ((txt (cua--filter-buffer-noprops (match-beginning 1) (match-end 1)))
@@ -1154,14 +1153,14 @@ The numbers are formatted according to the FORMAT string."
1154 (setq format cua--rectangle-seq-format) 1153 (setq format cua--rectangle-seq-format)
1155 (setq cua--rectangle-seq-format format)) 1154 (setq cua--rectangle-seq-format format))
1156 (cua--rectangle-operation 'clear nil t 1 nil 1155 (cua--rectangle-operation 'clear nil t 1 nil
1157 (lambda (s e l r) 1156 (lambda (s e _l _r)
1158 (delete-region s e) 1157 (delete-region s e)
1159 (insert (format format first)) 1158 (insert (format format first))
1160 (setq first (+ first incr))))) 1159 (setq first (+ first incr)))))
1161 1160
1162(defmacro cua--convert-rectangle-as (command tabify) 1161(defmacro cua--convert-rectangle-as (command tabify)
1163 `(cua--rectangle-operation 'clear nil nil nil ,tabify 1162 `(cua--rectangle-operation 'clear nil nil nil ,tabify
1164 (lambda (s e l r) 1163 (lambda (s e _l _r)
1165 (,command s e)))) 1164 (,command s e))))
1166 1165
1167(defun cua-upcase-rectangle () 1166(defun cua-upcase-rectangle ()
@@ -1218,7 +1217,7 @@ The numbers are formatted according to the FORMAT string."
1218 (if cua--debug 1217 (if cua--debug
1219 (print z auxbuf)) 1218 (print z auxbuf))
1220 (cua--rectangle-operation nil nil t pad nil 1219 (cua--rectangle-operation nil nil t pad nil
1221 (lambda (s e l r) 1220 (lambda (s e l _r)
1222 (let (cc) 1221 (let (cc)
1223 (goto-char e) 1222 (goto-char e)
1224 (skip-chars-forward " \t") 1223 (skip-chars-forward " \t")
@@ -1249,7 +1248,7 @@ The numbers are formatted according to the FORMAT string."
1249 1248
1250(put 'cua--rectangle-aux-replace 'lisp-indent-function 4) 1249(put 'cua--rectangle-aux-replace 'lisp-indent-function 4)
1251 1250
1252(defun cua--left-fill-rectangle (start end) 1251(defun cua--left-fill-rectangle (_start _end)
1253 (beginning-of-line) 1252 (beginning-of-line)
1254 (while (< (point) (point-max)) 1253 (while (< (point) (point-max))
1255 (delete-horizontal-space nil) 1254 (delete-horizontal-space nil)
@@ -1298,7 +1297,7 @@ With prefix arg, replace rectangle with output from command."
1298 "Remove the first line of the rectangle and scroll remaining lines up." 1297 "Remove the first line of the rectangle and scroll remaining lines up."
1299 (interactive) 1298 (interactive)
1300 (cua--rectangle-aux-replace 0 t t t t 1299 (cua--rectangle-aux-replace 0 t t t t
1301 (lambda (s e) 1300 (lambda (s _e)
1302 (if (= (forward-line 1) 0) 1301 (if (= (forward-line 1) 0)
1303 (delete-region s (point)))))) 1302 (delete-region s (point))))))
1304 1303
@@ -1307,7 +1306,7 @@ With prefix arg, replace rectangle with output from command."
1307The remaining lines are scrolled down, losing the last line." 1306The remaining lines are scrolled down, losing the last line."
1308 (interactive) 1307 (interactive)
1309 (cua--rectangle-aux-replace 0 t t t t 1308 (cua--rectangle-aux-replace 0 t t t t
1310 (lambda (s e) 1309 (lambda (s _e)
1311 (goto-char s) 1310 (goto-char s)
1312 (insert "\n")))) 1311 (insert "\n"))))
1313 1312
@@ -1337,7 +1336,7 @@ With prefix arg, indent to that column."
1337 (pad (cua--rectangle-virtual-edges)) 1336 (pad (cua--rectangle-virtual-edges))
1338 indent) 1337 indent)
1339 (cua--rectangle-operation 'corners nil t pad nil 1338 (cua--rectangle-operation 'corners nil t pad nil
1340 (lambda (s e l r) 1339 (lambda (_s _e l r)
1341 (move-to-column 1340 (move-to-column
1342 (if (cua--rectangle-right-side t) 1341 (if (cua--rectangle-right-side t)
1343 (max (1+ r) col) l) 1342 (max (1+ r) col) l)
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog
index 34aa015d7ac..06c6d42ed39 100644
--- a/lisp/erc/ChangeLog
+++ b/lisp/erc/ChangeLog
@@ -1,3 +1,23 @@
12012-04-11 Vivek Dasmohapatra <vivek@etla.org>
2
3 * erc-services.el (erc-nickserv-passwords): Don't display the
4 password (bug#4459).
5
62012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
7
8 * erc-join.el (erc-server-join-channel): New function to look up
9 the channel password via auth-source.
10 (erc-autojoin-channels): Use it.
11 (erc-autojoin-after-ident): Ditto.
12 (erc-autojoin-channels-alist): Mention auth-source.
13
142012-04-10 Deniz Dogan <deniz@dogan.se> (tiny change)
15
16 * erc.el (erc-display-prompt): Adds the field text property to the
17 ERC prompt. This allows users to use `kill-whole-line' to kill
18 all text back to the prompt given that it's on a single line
19 (bug#10841).
20
12012-04-09 Chong Yidong <cyd@gnu.org> 212012-04-09 Chong Yidong <cyd@gnu.org>
2 22
3 * erc.el (erc-cmd-SET): Call custom-variable-p instead of 23 * erc.el (erc-cmd-SET): Call custom-variable-p instead of
diff --git a/lisp/erc/erc-join.el b/lisp/erc/erc-join.el
index da894ba5977..85d1edf6427 100644
--- a/lisp/erc/erc-join.el
+++ b/lisp/erc/erc-join.el
@@ -32,6 +32,7 @@
32;;; Code: 32;;; Code:
33 33
34(require 'erc) 34(require 'erc)
35(require 'auth-source)
35(eval-when-compile (require 'cl)) 36(eval-when-compile (require 'cl))
36 37
37(defgroup erc-autojoin nil 38(defgroup erc-autojoin nil
@@ -56,6 +57,13 @@ Every element in the alist has the form (SERVER . CHANNELS).
56SERVER is a regexp matching the server, and channels is the 57SERVER is a regexp matching the server, and channels is the
57list of channels to join. 58list of channels to join.
58 59
60If the channel(s) require channel keys for joining, the passwords
61are found via auth-source. For instance, if you use ~/.authinfo
62as your auth-source backend, then put something like the
63following in that file:
64
65machine irc.example.net login \"#fsf\" password sEcReT
66
59Customize this variable to set the value for your first connect. 67Customize this variable to set the value for your first connect.
60Once you are connected and join and part channels, this alist 68Once you are connected and join and part channels, this alist
61keeps track of what channels you are on, and will join them 69keeps track of what channels you are on, and will join them
@@ -131,7 +139,7 @@ This function is run from `erc-nickserv-identified-hook'."
131 (when (string-match (car l) server) 139 (when (string-match (car l) server)
132 (dolist (chan (cdr l)) 140 (dolist (chan (cdr l))
133 (unless (erc-member-ignore-case chan joined) 141 (unless (erc-member-ignore-case chan joined)
134 (erc-server-send (concat "join " chan)))))))) 142 (erc-server-join-channel server chan)))))))
135 nil) 143 nil)
136 144
137(defun erc-autojoin-channels (server nick) 145(defun erc-autojoin-channels (server nick)
@@ -148,10 +156,25 @@ This function is run from `erc-nickserv-identified-hook'."
148 (dolist (l erc-autojoin-channels-alist) 156 (dolist (l erc-autojoin-channels-alist)
149 (when (string-match (car l) server) 157 (when (string-match (car l) server)
150 (dolist (chan (cdr l)) 158 (dolist (chan (cdr l))
151 (erc-server-send (concat "join " chan)))))) 159 (erc-server-join-channel server chan)))))
152 ;; Return nil to avoid stomping on any other hook funcs. 160 ;; Return nil to avoid stomping on any other hook funcs.
153 nil) 161 nil)
154 162
163(defun erc-server-join-channel (server channel)
164 (let* ((secret (plist-get (nth 0 (auth-source-search
165 :max 1
166 :host server
167 :port "irc"
168 :user channel))
169 :secret))
170 (password (if (functionp secret)
171 (funcall secret)
172 secret)))
173 (erc-server-send (concat "join " channel
174 (if password
175 (concat " " password)
176 "")))))
177
155(defun erc-autojoin-add (proc parsed) 178(defun erc-autojoin-add (proc parsed)
156 "Add the channel being joined to `erc-autojoin-channels-alist'." 179 "Add the channel being joined to `erc-autojoin-channels-alist'."
157 (let* ((chnl (erc-response.contents parsed)) 180 (let* ((chnl (erc-response.contents parsed))
diff --git a/lisp/erc/erc-services.el b/lisp/erc/erc-services.el
index 66eb341b47a..5986d81efed 100644
--- a/lisp/erc/erc-services.el
+++ b/lisp/erc/erc-services.el
@@ -195,7 +195,8 @@ Example of use:
195 (repeat :tag "Nickname and password" 195 (repeat :tag "Nickname and password"
196 (cons :tag "Identity" 196 (cons :tag "Identity"
197 (string :tag "Nick") 197 (string :tag "Nick")
198 (string :tag "Password")))))) 198 (string :tag "Password"
199 :secret ?*))))))
199 200
200;; Variables: 201;; Variables:
201 202
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index 62b701204d1..b79c2fd6c5e 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -3646,6 +3646,7 @@ If FACE is non-nil, it will be used to propertize the prompt. If it is nil,
3646 'start-open t ; XEmacs 3646 'start-open t ; XEmacs
3647 'rear-nonsticky t ; Emacs 3647 'rear-nonsticky t ; Emacs
3648 'erc-prompt t 3648 'erc-prompt t
3649 'field t
3649 'front-sticky t 3650 'front-sticky t
3650 'read-only t)) 3651 'read-only t))
3651 (erc-put-text-property 0 (1- (length prompt)) 3652 (erc-put-text-property 0 (1- (length prompt))
diff --git a/lisp/files.el b/lisp/files.el
index e623bc66080..d757e1a277c 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -2152,6 +2152,7 @@ unless NOMODES is non-nil."
2152 (/= (char-after (1- (point-max))) ?\n) 2152 (/= (char-after (1- (point-max))) ?\n)
2153 (not (and (eq selective-display t) 2153 (not (and (eq selective-display t)
2154 (= (char-after (1- (point-max))) ?\r))) 2154 (= (char-after (1- (point-max))) ?\r)))
2155 (not buffer-read-only)
2155 (save-excursion 2156 (save-excursion
2156 (goto-char (point-max)) 2157 (goto-char (point-max))
2157 (insert "\n"))) 2158 (insert "\n")))
@@ -3523,7 +3524,7 @@ LIST is a list of the form accepted by the function.
3523When a file is visited, the file's class is found. A directory 3524When a file is visited, the file's class is found. A directory
3524may be assigned a class using `dir-locals-set-directory-class'. 3525may be assigned a class using `dir-locals-set-directory-class'.
3525Then variables are set in the file's buffer according to the 3526Then variables are set in the file's buffer according to the
3526class' LIST. The list is processed in order. 3527VARIABLES list of the class. The list is processed in order.
3527 3528
3528* If the element is of the form (MAJOR-MODE . ALIST), and the 3529* If the element is of the form (MAJOR-MODE . ALIST), and the
3529 buffer's major mode is derived from MAJOR-MODE (as determined 3530 buffer's major mode is derived from MAJOR-MODE (as determined
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index 910585f21f1..2f76687983b 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -2285,10 +2285,10 @@ in which C preprocessor directives are used. e.g. `asm-mode' and
2285 (,(concat 2285 (,(concat
2286 "(" (regexp-opt 2286 "(" (regexp-opt
2287 '("cond" "if" "while" "while-no-input" "let" "let*" "letrec" 2287 '("cond" "if" "while" "while-no-input" "let" "let*" "letrec"
2288 "prog" "progn" "progv" "prog1" "prog2" "prog*" 2288 "pcase" "pcase-let" "pcase-let*" "prog" "progn" "progv"
2289 "inline" "lambda" "save-restriction" "save-excursion" 2289 "prog1" "prog2" "prog*" "inline" "lambda"
2290 "save-selected-window" "save-window-excursion" 2290 "save-restriction" "save-excursion" "save-selected-window"
2291 "save-match-data" "save-current-buffer" 2291 "save-window-excursion" "save-match-data" "save-current-buffer"
2292 "combine-after-change-calls" "unwind-protect" 2292 "combine-after-change-calls" "unwind-protect"
2293 "condition-case" "condition-case-unless-debug" 2293 "condition-case" "condition-case-unless-debug"
2294 "track-mouse" "eval-after-load" "eval-and-compile" 2294 "track-mouse" "eval-after-load" "eval-and-compile"
diff --git a/lisp/frame.el b/lisp/frame.el
index 1cd6c0cf181..1ee9d966ef1 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -1557,21 +1557,6 @@ left untouched. FRAME nil or omitted means use the selected frame."
1557 'delete-frame-functions "22.1") 1557 'delete-frame-functions "22.1")
1558 1558
1559 1559
1560;; Highlighting trailing whitespace.
1561
1562(make-variable-buffer-local 'show-trailing-whitespace)
1563
1564
1565;; Scrolling
1566
1567(defgroup scrolling nil
1568 "Scrolling windows."
1569 :version "21.1"
1570 :group 'frames)
1571
1572(defvaralias 'automatic-hscrolling 'auto-hscroll-mode)
1573
1574
1575;; Blinking cursor 1560;; Blinking cursor
1576 1561
1577(defgroup cursor nil 1562(defgroup cursor nil
@@ -1663,6 +1648,14 @@ terminals, cursor blinking is controlled by the terminal."
1663(define-key ctl-x-5-map "0" 'delete-frame) 1648(define-key ctl-x-5-map "0" 'delete-frame)
1664(define-key ctl-x-5-map "o" 'other-frame) 1649(define-key ctl-x-5-map "o" 'other-frame)
1665 1650
1651
1652;; Misc.
1653
1654;; Only marked as obsolete in 24.2.
1655(define-obsolete-variable-alias 'automatic-hscrolling 'auto-hscroll-mode "22.1")
1656
1657(make-variable-buffer-local 'show-trailing-whitespace)
1658
1666(provide 'frame) 1659(provide 'frame)
1667 1660
1668;;; frame.el ends here 1661;;; frame.el ends here
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index ef0f1c5c852..52f140d9192 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,23 @@
12012-04-16 Glenn Morris <rgm@gnu.org>
2
3 * nndraft.el (nndraft-request-list): Fix declaration.
4
52012-04-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
6
7 * gnus-msg.el (gnus-inews-insert-gcc): Don't do the alist stuff when we
8 don't have a current group.
9
10 * gnus-msg.el (gnus-inews-insert-gcc): Protect against when we don't
11 have a group name.
12
13 * gnus-art.el (article-wash-html): Ensure that we insert the HTML into
14 a multibyte buffer (bug#7410).
15 (article-wash-html): Parse the original article buffer to get the
16 unencoded data (bug#7410).
17
18 * gnus-start.el (gnus-read-newsrc-el-file): Protect against broken
19 .newsrc.el files.
20
12012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> 212012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org>
2 22
3 * auth-source.el (auth-source-netrc-create): Quote tokens that contain 23 * auth-source.el (auth-source-netrc-create): Quote tokens that contain
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 048f8956567..b04615dc5a9 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -2754,9 +2754,11 @@ If READ-CHARSET, ask for a coding system."
2754 (let ((handles nil) 2754 (let ((handles nil)
2755 (buffer-read-only nil)) 2755 (buffer-read-only nil))
2756 (when (gnus-buffer-live-p gnus-original-article-buffer) 2756 (when (gnus-buffer-live-p gnus-original-article-buffer)
2757 (setq handles (mm-dissect-buffer t t))) 2757 (with-current-buffer gnus-original-article-buffer
2758 (setq handles (mm-dissect-buffer t t))))
2758 (article-goto-body) 2759 (article-goto-body)
2759 (delete-region (point) (point-max)) 2760 (delete-region (point) (point-max))
2761 (mm-enable-multibyte)
2760 (mm-inline-text-html handles))) 2762 (mm-inline-text-html handles)))
2761 2763
2762(defvar gnus-article-browse-html-temp-list nil 2764(defvar gnus-article-browse-html-temp-list nil
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el
index 500ace9e8ff..815bd9e44a6 100644
--- a/lisp/gnus/gnus-msg.el
+++ b/lisp/gnus/gnus-msg.el
@@ -1664,17 +1664,19 @@ this is a reply."
1664 ((functionp var) 1664 ((functionp var)
1665 ;; A function. 1665 ;; A function.
1666 (funcall var group)) 1666 (funcall var group))
1667 (t 1667 (group
1668 ;; An alist of regexps/functions/forms. 1668 ;; An alist of regexps/functions/forms.
1669 (while (and var 1669 (while (and var
1670 (not 1670 (not
1671 (setq result 1671 (setq result
1672 (cond 1672 (cond
1673 ((stringp (caar var)) 1673 ((and group
1674 (stringp (caar var)))
1674 ;; Regexp. 1675 ;; Regexp.
1675 (when (string-match (caar var) group) 1676 (when (string-match (caar var) group)
1676 (cdar var))) 1677 (cdar var)))
1677 ((functionp (car var)) 1678 ((and group
1679 (functionp (car var)))
1678 ;; Function. 1680 ;; Function.
1679 (funcall (car var) group)) 1681 (funcall (car var) group))
1680 (t 1682 (t
diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el
index bb7dd76d590..f025960c348 100644
--- a/lisp/gnus/gnus-start.el
+++ b/lisp/gnus/gnus-start.el
@@ -2442,7 +2442,9 @@ If FORCE is non-nil, the .newsrc file is read."
2442 (when gnus-newsrc-assoc 2442 (when gnus-newsrc-assoc
2443 (setq gnus-newsrc-alist gnus-newsrc-assoc)))) 2443 (setq gnus-newsrc-alist gnus-newsrc-assoc))))
2444 (dolist (elem gnus-newsrc-alist) 2444 (dolist (elem gnus-newsrc-alist)
2445 (setcar elem (mm-string-as-unibyte (car elem)))) 2445 ;; Protect against broken .newsrc.el files.
2446 (when (car elem)
2447 (setcar elem (mm-string-as-unibyte (car elem)))))
2446 (gnus-make-hashtable-from-newsrc-alist) 2448 (gnus-make-hashtable-from-newsrc-alist)
2447 (when (file-newer-than-file-p file ding-file) 2449 (when (file-newer-than-file-p file ding-file)
2448 ;; Old format quick file 2450 ;; Old format quick file
diff --git a/lisp/gnus/nndraft.el b/lisp/gnus/nndraft.el
index 1800d0c02de..da50720ebbe 100644
--- a/lisp/gnus/nndraft.el
+++ b/lisp/gnus/nndraft.el
@@ -37,7 +37,8 @@
37(require 'mm-util) 37(require 'mm-util)
38(eval-when-compile (require 'cl)) 38(eval-when-compile (require 'cl))
39 39
40(declare-function nndraft-request-list "nnmh" (&rest args)) 40;; The nnoo-import at the end, I think.
41(declare-function nndraft-request-list "nndraft" (&rest args) t)
41 42
42(nnoo-declare nndraft 43(nnoo-declare nndraft
43 nnmh) 44 nnmh)
diff --git a/lisp/hexl.el b/lisp/hexl.el
index 538d218e38e..bedcc6b10b9 100644
--- a/lisp/hexl.el
+++ b/lisp/hexl.el
@@ -51,6 +51,14 @@
51 "Edit a file in a hex dump format using the hexl filter." 51 "Edit a file in a hex dump format using the hexl filter."
52 :group 'data) 52 :group 'data)
53 53
54(defcustom hexl-bits 16
55 "The bit grouping that hexl will use."
56 :type '(choice (const 8 )
57 (const 16)
58 (const 32)
59 (const 64))
60 :group 'hexl
61 :version "24.2")
54 62
55(defcustom hexl-program "hexl" 63(defcustom hexl-program "hexl"
56 "The program that will hexlify and dehexlify its stdin. 64 "The program that will hexlify and dehexlify its stdin.
@@ -67,7 +75,9 @@ and \"-de\" when dehexlifying a buffer."
67 75
68(defcustom hexl-options (format "-hex %s" hexl-iso) 76(defcustom hexl-options (format "-hex %s" hexl-iso)
69 "Space separated options to `hexl-program' that suit your needs. 77 "Space separated options to `hexl-program' that suit your needs.
70Quoting cannot be used, so the arguments cannot themselves contain spaces." 78Quoting cannot be used, so the arguments cannot themselves contain spaces.
79If you wish to set the `-group-by-X-bits' options, set `hexl-bits' instead,
80as that will override any bit grouping options set here."
71 :type 'string 81 :type 'string
72 :group 'hexl) 82 :group 'hexl)
73 83
@@ -212,10 +222,34 @@ Quoting cannot be used, so the arguments cannot themselves contain spaces."
212 (2 'hexl-ascii-region t t))) 222 (2 'hexl-ascii-region t t)))
213 "Font lock keywords used in `hexl-mode'.") 223 "Font lock keywords used in `hexl-mode'.")
214 224
225(defun hexl-rulerize (string bits)
226 (let ((size (/ bits 4)) (strlen (length string)) (pos 0) (ruler ""))
227 (while (< pos strlen)
228 (setq ruler (concat ruler " " (substring string pos (+ pos size))))
229 (setq pos (+ pos size)))
230 (substring ruler 1) ))
231
232(defvar hexl-rulers
233 (mapcar
234 (lambda (bits)
235 (cons bits
236 (concat " 87654321 "
237 (hexl-rulerize "00112233445566778899aabbccddeeff" bits)
238 " 0123456789abcdef")))
239 '(8 16 32 64)))
215;; routines 240;; routines
216 241
217(put 'hexl-mode 'mode-class 'special) 242(put 'hexl-mode 'mode-class 'special)
218 243
244;; 10 chars for the "address: "
245;; 32 chars for the hexlified bytes
246;; 1 char for the space
247;; 16 chars for the character display
248;; X chars for the spaces (128 bits divided by the hexl-bits)
249;; 1 char for the newline.
250(defun hexl-line-displen ()
251 "The length of a hexl display line (varies with `hexl-bits')."
252 (+ 60 (/ 128 (or hexl-bits 16))))
219 253
220(defun hexl-mode--minor-mode-p (var) 254(defun hexl-mode--minor-mode-p (var)
221 (memq var '(ruler-mode hl-line-mode))) 255 (memq var '(ruler-mode hl-line-mode)))
@@ -248,7 +282,7 @@ using the function `hexlify-buffer'.
248Each line in the buffer has an \"address\" (displayed in hexadecimal) 282Each line in the buffer has an \"address\" (displayed in hexadecimal)
249representing the offset into the file that the characters on this line 283representing the offset into the file that the characters on this line
250are at and 16 characters from the file (displayed as hexadecimal 284are at and 16 characters from the file (displayed as hexadecimal
251values grouped every 16 bits) and as their ASCII values. 285values grouped every `hexl-bits' bits) and as their ASCII values.
252 286
253If any of the characters (displayed as ASCII characters) are 287If any of the characters (displayed as ASCII characters) are
254unprintable (control or meta characters) they will be replaced as 288unprintable (control or meta characters) they will be replaced as
@@ -330,10 +364,7 @@ You can use \\[hexl-find-file] to visit a file in Hexl mode.
330 (hexlify-buffer) 364 (hexlify-buffer)
331 (restore-buffer-modified-p modified)) 365 (restore-buffer-modified-p modified))
332 (set (make-local-variable 'hexl-max-address) 366 (set (make-local-variable 'hexl-max-address)
333 (let* ((full-lines (/ (buffer-size) 68)) 367 (+ (* (/ (1- (buffer-size)) (hexl-line-displen)) 16) 15))
334 (last-line (% (buffer-size) 68))
335 (last-line-bytes (% last-line 52)))
336 (+ last-line-bytes (* full-lines 16) -1)))
337 (condition-case nil 368 (condition-case nil
338 (hexl-goto-address original-point) 369 (hexl-goto-address original-point)
339 (error nil))) 370 (error nil)))
@@ -510,17 +541,20 @@ Ask the user for confirmation."
510(defun hexl-current-address (&optional validate) 541(defun hexl-current-address (&optional validate)
511 "Return current hexl-address." 542 "Return current hexl-address."
512 (interactive) 543 (interactive)
513 (let ((current-column (- (% (- (point) (point-min) -1) 68) 11)) 544 (let ((current-column
545 (- (% (- (point) (point-min) -1) (hexl-line-displen)) 11))
514 (hexl-address 0)) 546 (hexl-address 0))
515 (if (< current-column 0) 547 (if (< current-column 0)
516 (if validate 548 (if validate
517 (error "Point is not on a character in the file") 549 (error "Point is not on a character in the file")
518 (setq current-column 0))) 550 (setq current-column 0)))
519 (setq hexl-address 551 (setq hexl-address
520 (+ (* (/ (- (point) (point-min) -1) 68) 16) 552 (+ (* (/ (- (point) (point-min) -1)
521 (if (>= current-column 41) 553 (hexl-line-displen)) 16)
522 (- current-column 41) 554 (if (>= current-column (- (hexl-ascii-start-column) 10))
523 (/ (- current-column (/ current-column 5)) 2)))) 555 (- current-column (- (hexl-ascii-start-column) 10))
556 (/ (- current-column
557 (/ current-column (1+ (/ hexl-bits 4)))) 2))))
524 (when (called-interactively-p 'interactive) 558 (when (called-interactively-p 'interactive)
525 (message "Current address is %d/0x%08x" hexl-address hexl-address)) 559 (message "Current address is %d/0x%08x" hexl-address hexl-address))
526 hexl-address)) 560 hexl-address))
@@ -531,10 +565,18 @@ This function is intended to be used as eldoc callback."
531 (let ((addr (hexl-current-address))) 565 (let ((addr (hexl-current-address)))
532 (format "Current address is %d/0x%08x" addr addr))) 566 (format "Current address is %d/0x%08x" addr addr)))
533 567
568(defun hexl-ascii-start-column ()
569 "Column at which the ascii portion of the hexl display starts."
570 (+ 43 (/ 128 hexl-bits)))
571
534(defun hexl-address-to-marker (address) 572(defun hexl-address-to-marker (address)
535 "Return buffer position for ADDRESS." 573 "Return buffer position for ADDRESS."
536 (interactive "nAddress: ") 574 (interactive "nAddress: ")
537 (+ (* (/ address 16) 68) 10 (point-min) (/ (* (% address 16) 5) 2))) 575 (let ((N (* (% address 16) 2)))
576 (+ (* (/ address 16) (hexl-line-displen)) ; hexl line no * display length
577 10 ; 10 chars for the "address: " prefix
578 (point-min) ; base offset (point usually starts at 1, not 0)
579 (+ N (/ N (/ hexl-bits 4))) )) ) ; char offset into hexl display line
538 580
539(defun hexl-goto-address (address) 581(defun hexl-goto-address (address)
540 "Go to hexl-mode (decimal) address ADDRESS. 582 "Go to hexl-mode (decimal) address ADDRESS.
@@ -700,7 +742,7 @@ With prefix arg N, puts point N bytes of the way from the true beginning."
700(defun hexl-beginning-of-line () 742(defun hexl-beginning-of-line ()
701 "Goto beginning of line in hexl mode." 743 "Goto beginning of line in hexl mode."
702 (interactive) 744 (interactive)
703 (goto-char (+ (* (/ (point) 68) 68) 11))) 745 (goto-char (+ (* (/ (point) (hexl-line-displen)) (hexl-line-displen)) 11)))
704 746
705(defun hexl-end-of-line () 747(defun hexl-end-of-line ()
706 "Goto end of line in hexl mode." 748 "Goto end of line in hexl mode."
@@ -776,6 +818,17 @@ You may also type octal digits, to insert a character with that code."
776 818
777;00000000: 0011 2233 4455 6677 8899 aabb ccdd eeff 0123456789ABCDEF 819;00000000: 0011 2233 4455 6677 8899 aabb ccdd eeff 0123456789ABCDEF
778 820
821(defun hexl-options (&optional test)
822 "Combine `hexl-bits' with `hexl-options', altering `hexl-options' as needed
823to produce the command line options to pass to the hexl command."
824 (let ((opts (or test hexl-options)))
825 (when (memq hexl-bits '(8 16 32 64))
826 (when (string-match "\\(.*\\)-group-by-[0-9]+-bits\\(.*\\)" opts)
827 (setq opts (concat (match-string 1 opts)
828 (match-string 2 opts))))
829 (setq opts (format "%s -group-by-%d-bits " opts hexl-bits)) )
830 opts))
831
779;;;###autoload 832;;;###autoload
780(defun hexlify-buffer () 833(defun hexlify-buffer ()
781 "Convert a binary buffer to hexl format. 834 "Convert a binary buffer to hexl format.
@@ -798,7 +851,7 @@ This discards the buffer's undo information."
798 (mapcar (lambda (s) 851 (mapcar (lambda (s)
799 (if (not (multibyte-string-p s)) s 852 (if (not (multibyte-string-p s)) s
800 (encode-coding-string s locale-coding-system))) 853 (encode-coding-string s locale-coding-system)))
801 (split-string hexl-options))) 854 (split-string (hexl-options))))
802 (if (> (point) (hexl-address-to-marker hexl-max-address)) 855 (if (> (point) (hexl-address-to-marker hexl-max-address))
803 (hexl-goto-address hexl-max-address)))) 856 (hexl-goto-address hexl-max-address))))
804 857
@@ -815,7 +868,7 @@ This discards the buffer's undo information."
815 (buffer-undo-list t)) 868 (buffer-undo-list t))
816 (apply 'call-process-region (point-min) (point-max) 869 (apply 'call-process-region (point-min) (point-max)
817 (expand-file-name hexl-program exec-directory) 870 (expand-file-name hexl-program exec-directory)
818 t t nil "-de" (split-string hexl-options)))) 871 t t nil "-de" (split-string (hexl-options)))))
819 872
820(defun hexl-char-after-point () 873(defun hexl-char-after-point ()
821 "Return char for ASCII hex digits at point." 874 "Return char for ASCII hex digits at point."
@@ -911,13 +964,12 @@ CH must be a unibyte character whose value is between 0 and 255."
911 (error "Invalid character 0x%x -- must be in the range [0..255]" ch)) 964 (error "Invalid character 0x%x -- must be in the range [0..255]" ch))
912 (let ((address (hexl-current-address t))) 965 (let ((address (hexl-current-address t)))
913 (while (> num 0) 966 (while (> num 0)
914 (let ((hex-position 967 (let ((hex-position (hexl-address-to-marker address))
915 (+ (* (/ address 16) 68)
916 10 (point-min)
917 (* 2 (% address 16))
918 (/ (% address 16) 2)))
919 (ascii-position 968 (ascii-position
920 (+ (* (/ address 16) 68) 51 (point-min) (% address 16))) 969 (+ (* (/ address 16) (hexl-line-displen))
970 (hexl-ascii-start-column)
971 (point-min)
972 (% address 16)))
921 at-ascii-position) 973 at-ascii-position)
922 (if (= (point) ascii-position) 974 (if (= (point) ascii-position)
923 (setq at-ascii-position t)) 975 (setq at-ascii-position t))
@@ -933,7 +985,7 @@ CH must be a unibyte character whose value is between 0 and 255."
933 (if at-ascii-position 985 (if at-ascii-position
934 (progn 986 (progn
935 (beginning-of-line) 987 (beginning-of-line)
936 (forward-char 51) 988 (forward-char (hexl-ascii-start-column))
937 (forward-char (% address 16))))) 989 (forward-char (% address 16)))))
938 (setq num (1- num))))) 990 (setq num (1- num)))))
939 991
@@ -1041,7 +1093,7 @@ This function is assumed to be used as callback function for `hl-line-mode'."
1041 1093
1042(defun hexl-follow-ascii-find () 1094(defun hexl-follow-ascii-find ()
1043 "Find and highlight the ASCII element corresponding to current point." 1095 "Find and highlight the ASCII element corresponding to current point."
1044 (let ((pos (+ 51 1096 (let ((pos (+ (hexl-ascii-start-column)
1045 (- (point) (current-column)) 1097 (- (point) (current-column))
1046 (mod (hexl-current-address) 16)))) 1098 (mod (hexl-current-address) 16))))
1047 (move-overlay hexl-ascii-overlay pos (1+ pos)) 1099 (move-overlay hexl-ascii-overlay pos (1+ pos))
@@ -1050,7 +1102,7 @@ This function is assumed to be used as callback function for `hl-line-mode'."
1050(defun hexl-mode-ruler () 1102(defun hexl-mode-ruler ()
1051 "Return a string ruler for hexl mode." 1103 "Return a string ruler for hexl mode."
1052 (let* ((highlight (mod (hexl-current-address) 16)) 1104 (let* ((highlight (mod (hexl-current-address) 16))
1053 (s " 87654321 0011 2233 4455 6677 8899 aabb ccdd eeff 0123456789abcdef") 1105 (s (cdr (assq hexl-bits hexl-rulers)))
1054 (pos 0)) 1106 (pos 0))
1055 (set-text-properties 0 (length s) nil s) 1107 (set-text-properties 0 (length s) nil s)
1056 ;; Turn spaces in the header into stretch specs so they work 1108 ;; Turn spaces in the header into stretch specs so they work
@@ -1062,12 +1114,12 @@ This function is assumed to be used as callback function for `hl-line-mode'."
1062 `(space :align-to ,(1- pos)) 1114 `(space :align-to ,(1- pos))
1063 s)) 1115 s))
1064 ;; Highlight the current column. 1116 ;; Highlight the current column.
1065 (put-text-property (+ 11 (/ (* 5 highlight) 2)) 1117 (let ( (offset (+ (* 2 highlight) (/ (* 8 highlight) hexl-bits))) )
1066 (+ 13 (/ (* 5 highlight) 2)) 1118 (put-text-property (+ 11 offset) (+ 13 offset) 'face 'highlight s))
1067 'face 'highlight s)
1068 ;; Highlight the current ascii column 1119 ;; Highlight the current ascii column
1069 (put-text-property (+ 13 39 highlight) (+ 13 40 highlight) 1120 (put-text-property (+ (hexl-ascii-start-column) highlight 1)
1070 'face 'highlight s) 1121 (+ (hexl-ascii-start-column) highlight 2)
1122 'face 'highlight s)
1071 s)) 1123 s))
1072 1124
1073;; startup stuff. 1125;; startup stuff.
diff --git a/lisp/image.el b/lisp/image.el
index be1b1ef8f48..348c208781e 100644
--- a/lisp/image.el
+++ b/lisp/image.el
@@ -412,7 +412,8 @@ means display it in the right marginal area."
412 (prop (if (null area) image (list (list 'margin area) image)))) 412 (prop (if (null area) image (list (list 'margin area) image))))
413 (put-text-property 0 (length string) 'display prop string) 413 (put-text-property 0 (length string) 'display prop string)
414 (overlay-put overlay 'put-image t) 414 (overlay-put overlay 'put-image t)
415 (overlay-put overlay 'before-string string)))) 415 (overlay-put overlay 'before-string string)
416 overlay)))
416 417
417 418
418;;;###autoload 419;;;###autoload
@@ -684,26 +685,16 @@ The minimum delay between successive frames is 0.01s."
684 image n count time-elapsed limit)))) 685 image n count time-elapsed limit))))
685 686
686 687
687(defcustom imagemagick-types-inhibit 688(defvar imagemagick--file-regexp nil
688 '(C HTML HTM TXT PDF) 689 "File extension regexp for ImageMagick files, if any.
689 "ImageMagick types that should not be visited in Image mode. 690This is the extension installed into `auto-mode-alist' and
690This should be a list of symbols, each of which should be one of 691`image-type-file-name-regexps' by `imagemagick-register-types'.")
691the ImageMagick types listed in `imagemagick-types'. These image
692types are not registered by `imagemagick-register-types'.
693
694If Emacs is compiled without ImageMagick support, this variable
695has no effect."
696 :type '(choice (const :tag "Let ImageMagick handle all types it can" nil)
697 (repeat symbol))
698 ;; Ideally, would have a :set function that checks if we already did
699 ;; imagemagick-register-types, and if so undoes it, then redoes it.
700 :version "24.1"
701 :group 'image)
702 692
703;;;###autoload 693;;;###autoload
704(defun imagemagick-register-types () 694(defun imagemagick-register-types ()
705 "Register file types that can be handled by ImageMagick. 695 "Register file types that can be handled by ImageMagick.
706This registers the ImageMagick types listed in `imagemagick-types', 696This function is called at startup, after loading the init file.
697It registers the ImageMagick types listed in `imagemagick-types',
707excluding those listed in `imagemagick-types-inhibit'. 698excluding those listed in `imagemagick-types-inhibit'.
708 699
709Registered image types are added to `auto-mode-alist', so that 700Registered image types are added to `auto-mode-alist', so that
@@ -713,14 +704,45 @@ recognizes these files as having image type `imagemagick'.
713 704
714If Emacs is compiled without ImageMagick support, do nothing." 705If Emacs is compiled without ImageMagick support, do nothing."
715 (when (fboundp 'imagemagick-types) 706 (when (fboundp 'imagemagick-types)
716 (let ((im-types '())) 707 (let ((re (if (eq imagemagick-types-inhibit t)
717 (dolist (im-type (imagemagick-types)) 708 ;; Use a bogus regexp to inhibit matches.
718 (unless (memq im-type imagemagick-types-inhibit) 709 "\\'a"
719 (push (downcase (symbol-name im-type)) im-types))) 710 (let ((types))
720 (let ((extension (concat "\\." (regexp-opt im-types) "\\'"))) 711 (dolist (type (imagemagick-types))
721 (push (cons extension 'image-mode) auto-mode-alist) 712 (unless (memq type imagemagick-types-inhibit)
722 (push (cons extension 'imagemagick) 713 (push (downcase (symbol-name type)) types)))
723 image-type-file-name-regexps))))) 714 (concat "\\." (regexp-opt types) "\\'"))))
715 (ama-elt (car (member (cons imagemagick--file-regexp 'image-mode)
716 auto-mode-alist)))
717 (itfnr-elt (car (member (cons imagemagick--file-regexp 'imagemagick)
718 image-type-file-name-regexps))))
719 (if ama-elt
720 (setcar ama-elt re)
721 (push (cons re 'image-mode) auto-mode-alist))
722 (if itfnr-elt
723 (setcar itfnr-elt re)
724 (push (cons re 'imagemagick) image-type-file-name-regexps))
725 (setq imagemagick--file-regexp re))))
726
727(defcustom imagemagick-types-inhibit
728 '(C HTML HTM TXT PDF)
729 "List of ImageMagick types that should not be treated as images.
730This should be a list of symbols, each of which should be one of
731the ImageMagick types listed in `imagemagick-types'. The listed
732image types are not registered by `imagemagick-register-types'.
733
734If the value is t, inhibit the use of ImageMagick for images.
735
736If Emacs is compiled without ImageMagick support, this variable
737has no effect."
738 :type '(choice (const :tag "Support all ImageMagick types" nil)
739 (const :tag "Disable all ImageMagick types" t)
740 (repeat symbol))
741 :set (lambda (symbol value)
742 (set-default symbol value)
743 (imagemagick-register-types))
744 :version "24.1"
745 :group 'image)
724 746
725(provide 'image) 747(provide 'image)
726 748
diff --git a/lisp/imenu.el b/lisp/imenu.el
index 8363956355b..12ac3540925 100644
--- a/lisp/imenu.el
+++ b/lisp/imenu.el
@@ -280,13 +280,13 @@ The function in this variable is called when selecting a normal index-item.")
280;; `(and 280;; `(and
281;; imenu-scanning-message 281;; imenu-scanning-message
282;; (let ((pos ,(if relpos 282;; (let ((pos ,(if relpos
283;; relpos 283;; relpos
284;; `(imenu--relative-position ,reverse)))) 284;; `(imenu--relative-position ,reverse))))
285;; (if ,(if relpos t 285;; (if ,(if relpos t
286;; `(> pos (+ 5 ,prevpos))) 286;; `(> pos (+ 5 ,prevpos)))
287;; (progn 287;; (progn
288;; (message imenu-scanning-message pos) 288;; (message imenu-scanning-message pos)
289;; (setq ,prevpos pos))))) 289;; (setq ,prevpos pos)))))
290) 290)
291 291
292 292
@@ -338,13 +338,10 @@ Don't move point."
338 (let ((index-alist '()) 338 (let ((index-alist '())
339 (index-var-alist '()) 339 (index-var-alist '())
340 (index-type-alist '()) 340 (index-type-alist '())
341 (index-unknown-alist '()) 341 (index-unknown-alist '()))
342 prev-pos)
343 (goto-char (point-max)) 342 (goto-char (point-max))
344 (imenu-progress-message prev-pos 0)
345 ;; Search for the function 343 ;; Search for the function
346 (while (beginning-of-defun) 344 (while (beginning-of-defun)
347 (imenu-progress-message prev-pos nil t)
348 (save-match-data 345 (save-match-data
349 (and (looking-at "(def") 346 (and (looking-at "(def")
350 (save-excursion 347 (save-excursion
@@ -371,7 +368,6 @@ Don't move point."
371 (forward-sexp 2) 368 (forward-sexp 2)
372 (push (imenu-example--name-and-position) 369 (push (imenu-example--name-and-position)
373 index-unknown-alist))))))) 370 index-unknown-alist)))))))
374 (imenu-progress-message prev-pos 100)
375 (and index-var-alist 371 (and index-var-alist
376 (push (cons "Variables" index-var-alist) 372 (push (cons "Variables" index-var-alist)
377 index-alist)) 373 index-alist))
@@ -396,15 +392,13 @@ Don't move point."
396 392
397(defun imenu-example--create-c-index (&optional regexp) 393(defun imenu-example--create-c-index (&optional regexp)
398 (let ((index-alist '()) 394 (let ((index-alist '())
399 prev-pos char) 395 char)
400 (goto-char (point-min)) 396 (goto-char (point-min))
401 (imenu-progress-message prev-pos 0)
402 ;; Search for the function 397 ;; Search for the function
403 (save-match-data 398 (save-match-data
404 (while (re-search-forward 399 (while (re-search-forward
405 (or regexp imenu-example--function-name-regexp-c) 400 (or regexp imenu-example--function-name-regexp-c)
406 nil t) 401 nil t)
407 (imenu-progress-message prev-pos)
408 (backward-up-list 1) 402 (backward-up-list 1)
409 (save-excursion 403 (save-excursion
410 (goto-char (scan-sexps (point) 1)) 404 (goto-char (scan-sexps (point) 1))
@@ -412,7 +406,6 @@ Don't move point."
412 ;; Skip this function name if it is a prototype declaration. 406 ;; Skip this function name if it is a prototype declaration.
413 (if (not (eq char ?\;)) 407 (if (not (eq char ?\;))
414 (push (imenu-example--name-and-position) index-alist)))) 408 (push (imenu-example--name-and-position) index-alist))))
415 (imenu-progress-message prev-pos 100)
416 (nreverse index-alist))) 409 (nreverse index-alist)))
417(make-obsolete 'imenu-example--create-c-index "your own" "23.2") 410(make-obsolete 'imenu-example--create-c-index "your own" "23.2")
418 411
@@ -684,22 +677,19 @@ The alternate method, which is the one most often used, is to call
684 (cond ((and imenu-prev-index-position-function 677 (cond ((and imenu-prev-index-position-function
685 imenu-extract-index-name-function) 678 imenu-extract-index-name-function)
686 (let ((index-alist '()) (pos (point)) 679 (let ((index-alist '()) (pos (point))
687 prev-pos name) 680 name)
688 (goto-char (point-max)) 681 (goto-char (point-max))
689 (imenu-progress-message prev-pos 0 t)
690 ;; Search for the function 682 ;; Search for the function
691 (while (funcall imenu-prev-index-position-function) 683 (while (funcall imenu-prev-index-position-function)
692 (when (= pos (point)) 684 (when (= pos (point))
693 (error "Infinite loop at %s:%d: imenu-prev-index-position-function does not move point" (buffer-name) pos)) 685 (error "Infinite loop at %s:%d: imenu-prev-index-position-function does not move point" (buffer-name) pos))
694 (setq pos (point)) 686 (setq pos (point))
695 (imenu-progress-message prev-pos nil t)
696 (save-excursion 687 (save-excursion
697 (setq name (funcall imenu-extract-index-name-function))) 688 (setq name (funcall imenu-extract-index-name-function)))
698 (and (stringp name) 689 (and (stringp name)
699 ;; [ydi] updated for imenu-use-markers 690 ;; [ydi] updated for imenu-use-markers
700 (push (cons name (if imenu-use-markers (point-marker) (point))) 691 (push (cons name (if imenu-use-markers (point-marker) (point)))
701 index-alist))) 692 index-alist)))
702 (imenu-progress-message prev-pos 100 t)
703 index-alist)) 693 index-alist))
704 ;; Use generic expression if possible. 694 ;; Use generic expression if possible.
705 ((and imenu-generic-expression) 695 ((and imenu-generic-expression)
@@ -765,7 +755,6 @@ They may also be nested index alists like:
765depending on PATTERNS." 755depending on PATTERNS."
766 756
767 (let ((index-alist (list 'dummy)) 757 (let ((index-alist (list 'dummy))
768 prev-pos
769 (case-fold-search (if (or (local-variable-p 'imenu-case-fold-search) 758 (case-fold-search (if (or (local-variable-p 'imenu-case-fold-search)
770 (not (local-variable-p 'font-lock-defaults))) 759 (not (local-variable-p 'font-lock-defaults)))
771 imenu-case-fold-search 760 imenu-case-fold-search
@@ -782,7 +771,6 @@ depending on PATTERNS."
782 (modify-syntax-entry c (cdr syn) table)) 771 (modify-syntax-entry c (cdr syn) table))
783 (car syn)))) 772 (car syn))))
784 (goto-char (point-max)) 773 (goto-char (point-max))
785 (imenu-progress-message prev-pos 0 t)
786 (unwind-protect ; for syntax table 774 (unwind-protect ; for syntax table
787 (save-match-data 775 (save-match-data
788 (set-syntax-table table) 776 (set-syntax-table table)
@@ -800,7 +788,17 @@ depending on PATTERNS."
800 (goto-char (point-max)) 788 (goto-char (point-max))
801 (while (and (if (functionp regexp) 789 (while (and (if (functionp regexp)
802 (funcall regexp) 790 (funcall regexp)
803 (re-search-backward regexp nil t)) 791 (and
792 (re-search-backward regexp nil t)
793 ;; Do not count invisible definitions.
794 (let ((invis (invisible-p (point))))
795 (or (not invis)
796 (progn
797 (while (and invis
798 (not (bobp)))
799 (setq invis (not (re-search-backward
800 regexp nil 'move))))
801 (not invis))))))
804 ;; Exit the loop if we get an empty match, 802 ;; Exit the loop if we get an empty match,
805 ;; because it means a bad regexp was specified. 803 ;; because it means a bad regexp was specified.
806 (not (= (match-beginning 0) (match-end 0)))) 804 (not (= (match-beginning 0) (match-end 0))))
@@ -810,7 +808,6 @@ depending on PATTERNS."
810 (goto-char (match-beginning index)) 808 (goto-char (match-beginning index))
811 (beginning-of-line) 809 (beginning-of-line)
812 (setq beg (point)) 810 (setq beg (point))
813 (imenu-progress-message prev-pos nil t)
814 ;; Add this sort of submenu only when we've found an 811 ;; Add this sort of submenu only when we've found an
815 ;; item for it, avoiding empty, duff menus. 812 ;; item for it, avoiding empty, duff menus.
816 (unless (assoc menu-title index-alist) 813 (unless (assoc menu-title index-alist)
@@ -835,7 +832,6 @@ depending on PATTERNS."
835 ;; keep making progress backwards. 832 ;; keep making progress backwards.
836 (goto-char start)))) 833 (goto-char start))))
837 (set-syntax-table old-table))) 834 (set-syntax-table old-table)))
838 (imenu-progress-message prev-pos 100 t)
839 ;; Sort each submenu by position. 835 ;; Sort each submenu by position.
840 ;; This is in case one submenu gets items from two different regexps. 836 ;; This is in case one submenu gets items from two different regexps.
841 (dolist (item index-alist) 837 (dolist (item index-alist)
@@ -963,7 +959,8 @@ See the command `imenu' for more information."
963 imenu-generic-expression 959 imenu-generic-expression
964 (not (eq imenu-create-index-function 960 (not (eq imenu-create-index-function
965 'imenu-default-create-index-function))) 961 'imenu-default-create-index-function)))
966 (unless (keymapp (lookup-key (current-local-map) [menu-bar index])) 962 (unless (and (current-local-map)
963 (keymapp (lookup-key (current-local-map) [menu-bar index])))
967 (let ((newmap (make-sparse-keymap))) 964 (let ((newmap (make-sparse-keymap)))
968 (set-keymap-parent newmap (current-local-map)) 965 (set-keymap-parent newmap (current-local-map))
969 (setq imenu--last-menubar-index-alist nil) 966 (setq imenu--last-menubar-index-alist nil)
@@ -1028,7 +1025,7 @@ to `imenu-update-menubar'.")
1028 (imenu item) 1025 (imenu item)
1029 nil)) 1026 nil))
1030 1027
1031(defun imenu-default-goto-function (name position &optional rest) 1028(defun imenu-default-goto-function (_name position &optional _rest)
1032 "Move to the given position. 1029 "Move to the given position.
1033 1030
1034NAME is ignored. POSITION is where to move. REST is also ignored. 1031NAME is ignored. POSITION is where to move. REST is also ignored.
diff --git a/lisp/international/characters.el b/lisp/international/characters.el
index 99985fa72c7..c75ca8106ac 100644
--- a/lisp/international/characters.el
+++ b/lisp/international/characters.el
@@ -577,8 +577,6 @@ with L, LRE, or LRO Unicode bidi character type.")
577 (setq from (+ from 2)))))) 577 (setq from (+ from 2))))))
578 578
579 (set-case-syntax-pair ?Ÿ ?ÿ tbl) 579 (set-case-syntax-pair ?Ÿ ?ÿ tbl)
580 (set-case-syntax-pair #x189 #x256 tbl)
581 (set-case-syntax-pair #x18A #x257 tbl)
582 580
583 ;; In some languages, such as Turkish, U+0049 LATIN CAPITAL LETTER I 581 ;; In some languages, such as Turkish, U+0049 LATIN CAPITAL LETTER I
584 ;; and U+0131 LATIN SMALL LETTER DOTLESS I make a case pair, and so 582 ;; and U+0131 LATIN SMALL LETTER DOTLESS I make a case pair, and so
@@ -594,6 +592,8 @@ with L, LRE, or LRO Unicode bidi character type.")
594 592
595 (set-case-syntax-pair ?Æ ?É“ tbl) 593 (set-case-syntax-pair ?Æ ?É“ tbl)
596 (set-case-syntax-pair ?Ɔ ?ɔ tbl) 594 (set-case-syntax-pair ?Ɔ ?ɔ tbl)
595 (set-case-syntax-pair ?Ɖ ?ɖ tbl)
596 (set-case-syntax-pair ?ÆŠ ?É— tbl)
597 (set-case-syntax-pair ?ÆŽ ?Ç tbl) 597 (set-case-syntax-pair ?ÆŽ ?Ç tbl)
598 (set-case-syntax-pair ?Æ ?É™ tbl) 598 (set-case-syntax-pair ?Æ ?É™ tbl)
599 (set-case-syntax-pair ?Æ ?É› tbl) 599 (set-case-syntax-pair ?Æ ?É› tbl)
@@ -622,6 +622,12 @@ with L, LRE, or LRO Unicode bidi character type.")
622 (set-case-syntax-pair ?Dz ?dz tbl) 622 (set-case-syntax-pair ?Dz ?dz tbl)
623 (set-case-syntax-pair ?Ƕ ?ƕ tbl) 623 (set-case-syntax-pair ?Ƕ ?ƕ tbl)
624 (set-case-syntax-pair ?Ç· ?Æ¿ tbl) 624 (set-case-syntax-pair ?Ç· ?Æ¿ tbl)
625 (set-case-syntax-pair ?Ⱥ ?ⱥ tbl)
626 (set-case-syntax-pair ?Ƚ ?ƚ tbl)
627 (set-case-syntax-pair ?Ⱦ ?ⱦ tbl)
628 (set-case-syntax-pair ?Ƀ ?ƀ tbl)
629 (set-case-syntax-pair ?Ʉ ?ʉ tbl)
630 (set-case-syntax-pair ?Ʌ ?ʌ tbl)
625 631
626 ;; Latin Extended Additional 632 ;; Latin Extended Additional
627 (modify-category-entry '(#x1e00 . #x1ef9) ?l) 633 (modify-category-entry '(#x1e00 . #x1ef9) ?l)
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index 6d609b67d63..02d37f86da0 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -1834,7 +1834,11 @@ The default status is as follows:
1834This sets the coding system priority and the default input method 1834This sets the coding system priority and the default input method
1835and sometimes other things. LANGUAGE-NAME should be a string 1835and sometimes other things. LANGUAGE-NAME should be a string
1836which is the name of a language environment. For example, \"Latin-1\" 1836which is the name of a language environment. For example, \"Latin-1\"
1837specifies the character set for the major languages of Western Europe." 1837specifies the character set for the major languages of Western Europe.
1838
1839If there is a prior value for `current-language-environment', this
1840runs the hook `exit-language-environment-hook'. After setting up
1841the new language environment, it runs `set-language-environment-hook'."
1838 (interactive (list (read-language-name 1842 (interactive (list (read-language-name
1839 nil 1843 nil
1840 "Set language environment (default English): "))) 1844 "Set language environment (default English): ")))
diff --git a/lisp/international/mule.el b/lisp/international/mule.el
index 7bf15009687..1f88df52fd4 100644
--- a/lisp/international/mule.el
+++ b/lisp/international/mule.el
@@ -1754,8 +1754,9 @@ functions, so they won't be called at all."
1754 :type '(repeat function)) 1754 :type '(repeat function))
1755 1755
1756(defvar set-auto-coding-for-load nil 1756(defvar set-auto-coding-for-load nil
1757 "Non-nil means look for `load-coding' property instead of `coding'. 1757 "Non-nil means respect a \"unibyte: t\" entry in file local variables.
1758This is used for loading and byte-compiling Emacs Lisp files.") 1758Emacs binds this variable to t when loading or byte-compiling Emacs Lisp
1759files.")
1759 1760
1760(defun auto-coding-alist-lookup (filename) 1761(defun auto-coding-alist-lookup (filename)
1761 "Return the coding system specified by `auto-coding-alist' for FILENAME." 1762 "Return the coding system specified by `auto-coding-alist' for FILENAME."
diff --git a/lisp/international/quail.el b/lisp/international/quail.el
index 70e6d4b69cb..4d69e2fdbcb 100644
--- a/lisp/international/quail.el
+++ b/lisp/international/quail.el
@@ -486,19 +486,15 @@ non-Quail commands."
486 (setq translation-keymap (copy-keymap 486 (setq translation-keymap (copy-keymap
487 (if simple quail-simple-translation-keymap 487 (if simple quail-simple-translation-keymap
488 quail-translation-keymap))) 488 quail-translation-keymap)))
489 (while translation-keys 489 (dolist (trans translation-keys)
490 (define-key translation-keymap 490 (define-key translation-keymap (car trans) (cdr trans))))
491 (car (car translation-keys)) (cdr (car translation-keys)))
492 (setq translation-keys (cdr translation-keys))))
493 (setq translation-keymap 491 (setq translation-keymap
494 (if simple quail-simple-translation-keymap 492 (if simple quail-simple-translation-keymap
495 quail-translation-keymap))) 493 quail-translation-keymap)))
496 (when conversion-keys 494 (when conversion-keys
497 (setq conversion-keymap (copy-keymap quail-conversion-keymap)) 495 (setq conversion-keymap (copy-keymap quail-conversion-keymap))
498 (while conversion-keys 496 (dolist (conv conversion-keys)
499 (define-key conversion-keymap 497 (define-key conversion-keymap (car conv) (cdr conv))))
500 (car (car conversion-keys)) (cdr (car conversion-keys)))
501 (setq conversion-keys (cdr conversion-keys))))
502 (quail-add-package 498 (quail-add-package
503 (list name title (list nil) guidance (or docstring "") 499 (list name title (list nil) guidance (or docstring "")
504 translation-keymap 500 translation-keymap
@@ -720,12 +716,11 @@ The command `quail-set-keyboard-layout' usually sets this variable."
720 (setq quail-keyboard-layout-substitution subst-list) 716 (setq quail-keyboard-layout-substitution subst-list)
721 ;; If there are additional key locations, map them to missing 717 ;; If there are additional key locations, map them to missing
722 ;; key locations. 718 ;; key locations.
723 (while missing-list 719 (dolist (missing missing-list)
724 (while (and subst-list (cdr (car subst-list))) 720 (while (and subst-list (cdr (car subst-list)))
725 (setq subst-list (cdr subst-list))) 721 (setq subst-list (cdr subst-list)))
726 (if subst-list 722 (if subst-list
727 (setcdr (car subst-list) (car missing-list))) 723 (setcdr (car subst-list) missing))))))
728 (setq missing-list (cdr missing-list))))))
729 724
730(defcustom quail-keyboard-layout-type "standard" 725(defcustom quail-keyboard-layout-type "standard"
731 "Type of keyboard layout used in Quail base input method. 726 "Type of keyboard layout used in Quail base input method.
@@ -806,9 +801,10 @@ The format of KBD-LAYOUT is the same as `quail-keyboard-layout'."
806 (if translation 801 (if translation
807 (progn 802 (progn
808 (if (consp translation) 803 (if (consp translation)
809 (if (> (length (cdr translation)) 0) 804 (setq translation
810 (setq translation (aref (cdr translation) 0)) 805 (if (> (length (cdr translation)) 0)
811 (setq translation " "))) 806 (aref (cdr translation) 0)
807 " ")))
812 (setq done-list (cons translation done-list))) 808 (setq done-list (cons translation done-list)))
813 (setq translation (aref kbd-layout i))) 809 (setq translation (aref kbd-layout i)))
814 (aset layout i translation)) 810 (aset layout i translation))
@@ -834,17 +830,19 @@ The format of KBD-LAYOUT is the same as `quail-keyboard-layout'."
834 (if (< (if (stringp lower) (string-width lower) (char-width lower)) 2) 830 (if (< (if (stringp lower) (string-width lower) (char-width lower)) 2)
835 (insert " ")) 831 (insert " "))
836 (if (characterp lower) 832 (if (characterp lower)
837 (if (eq (get-char-code-property lower 'general-category) 'Mn) 833 (setq lower
838 ;; Pad the left and right of non-spacing characters. 834 (if (eq (get-char-code-property lower 'general-category) 'Mn)
839 (setq lower (compose-string (string lower) 0 1 835 ;; Pad the left and right of non-spacing characters.
840 (format "\t%c\t" lower))) 836 (compose-string (string lower) 0 1
841 (setq lower (string lower)))) 837 (format "\t%c\t" lower))
838 (string lower))))
842 (if (characterp upper) 839 (if (characterp upper)
843 (if (eq (get-char-code-property upper 'general-category) 'Mn) 840 (setq upper
844 ;; Pad the left and right of non-spacing characters. 841 (if (eq (get-char-code-property upper 'general-category) 'Mn)
845 (setq upper (compose-string (string upper) 0 1 842 ;; Pad the left and right of non-spacing characters.
846 (format "\t%c\t" upper))) 843 (compose-string (string upper) 0 1
847 (setq upper (string upper)))) 844 (format "\t%c\t" upper))
845 (string upper))))
848 (insert (bidi-string-mark-left-to-right lower) 846 (insert (bidi-string-mark-left-to-right lower)
849 (propertize " " 'invisible t) 847 (propertize " " 'invisible t)
850 (bidi-string-mark-left-to-right upper)) 848 (bidi-string-mark-left-to-right upper))
@@ -1032,8 +1030,8 @@ the following annotation types are supported.
1032 (let ((map (list nil)) 1030 (let ((map (list nil))
1033 (decode-map (if (not no-decode-map) (list 'decode-map))) 1031 (decode-map (if (not no-decode-map) (list 'decode-map)))
1034 key trans) 1032 key trans)
1035 (while l 1033 (dolist (el l)
1036 (setq key (car (car l)) trans (car (cdr (car l))) l (cdr l)) 1034 (setq key (car el) trans (car (cdr el)))
1037 (quail-defrule-internal key trans map t decode-map props)) 1035 (quail-defrule-internal key trans map t decode-map props))
1038 `(if (prog1 (quail-decode-map) 1036 `(if (prog1 (quail-decode-map)
1039 (quail-install-map ',map)) 1037 (quail-install-map ',map))
@@ -1201,7 +1199,7 @@ function `quail-define-rules' for the detail."
1201 (if (stringp trans) 1199 (if (stringp trans)
1202 (setq trans (string-to-vector trans)))) 1200 (setq trans (string-to-vector trans))))
1203 (let ((new (quail-vunion prevchars trans))) 1201 (let ((new (quail-vunion prevchars trans)))
1204 (setq trans 1202 (setq trans
1205 (if (equal new prevchars) 1203 (if (equal new prevchars)
1206 ;; Nothing to change, get back to orig value. 1204 ;; Nothing to change, get back to orig value.
1207 prev 1205 prev
@@ -1215,10 +1213,8 @@ where VECTOR is a vector of candidates (character or string) for
1215the translation, and INDEX points into VECTOR to specify the currently 1213the translation, and INDEX points into VECTOR to specify the currently
1216selected translation." 1214selected translation."
1217 (if (and def (symbolp def)) 1215 (if (and def (symbolp def))
1218 (if (functionp def) 1216 ;; DEF is a symbol of a function which returns valid translation.
1219 ;; DEF is a symbol of a function which returns valid translation. 1217 (setq def (if (functionp def) (funcall def key len))))
1220 (setq def (funcall def key len))
1221 (setq def nil)))
1222 (if (and (consp def) (not (vectorp (cdr def)))) 1218 (if (and (consp def) (not (vectorp (cdr def))))
1223 (setq def (car def))) 1219 (setq def (car def)))
1224 1220
diff --git a/lisp/language/european.el b/lisp/language/european.el
index b658f93d90f..259c06755a0 100644
--- a/lisp/language/european.el
+++ b/lisp/language/european.el
@@ -324,6 +324,14 @@ Latin-9 is sometimes nicknamed `Latin-0'."))
324 :mime-charset 'windows-1257) 324 :mime-charset 'windows-1257)
325(define-coding-system-alias 'cp1257 'windows-1257) 325(define-coding-system-alias 'cp1257 'windows-1257)
326 326
327(define-coding-system 'cp775
328 "DOS codepage 775 (PC Baltic, MS-DOS Baltic Rim)"
329 :coding-type 'charset
330 :mnemonic ?D
331 :charset-list '(cp775)
332 :mime-charset 'cp775)
333(define-coding-system-alias 'ibm775 'cp775)
334
327(define-coding-system 'cp850 335(define-coding-system 'cp850
328 "DOS codepage 850 (Western European)" 336 "DOS codepage 850 (Western European)"
329 :coding-type 'charset 337 :coding-type 'charset
diff --git a/lisp/loadup.el b/lisp/loadup.el
index 2ba24c8fe37..f7ffa27a9ed 100644
--- a/lisp/loadup.el
+++ b/lisp/loadup.el
@@ -193,6 +193,8 @@
193(if (fboundp 'x-create-frame) 193(if (fboundp 'x-create-frame)
194 (progn 194 (progn
195 (load "fringe") 195 (load "fringe")
196 ;; Needed by `imagemagick-register-types'
197 (load "emacs-lisp/regexp-opt")
196 (load "image") 198 (load "image")
197 (load "international/fontset") 199 (load "international/fontset")
198 (load "dnd") 200 (load "dnd")
diff --git a/lisp/mail/feedmail.el b/lisp/mail/feedmail.el
index 4e76e5cdb64..f35560841e2 100644
--- a/lisp/mail/feedmail.el
+++ b/lisp/mail/feedmail.el
@@ -1586,7 +1586,7 @@ messages to make sure it works as expected."
1586 1586
1587 1587
1588;; feedmail-buffer-to-binmail, feedmail-buffer-to-sendmail, and 1588;; feedmail-buffer-to-binmail, feedmail-buffer-to-sendmail, and
1589;; feedmail-buffer-to-smptmail are the only things provided for values 1589;; feedmail-buffer-to-smtpmail are the only things provided for values
1590;; for the variable feedmail-buffer-eating-function. It's pretty easy 1590;; for the variable feedmail-buffer-eating-function. It's pretty easy
1591;; to write your own, though. 1591;; to write your own, though.
1592(defun feedmail-buffer-to-binmail (prepped errors-to addr-listoid) 1592(defun feedmail-buffer-to-binmail (prepped errors-to addr-listoid)
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 093050229c4..d2b9890805c 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -40,6 +40,9 @@
40(require 'mail-utils) 40(require 'mail-utils)
41(require 'rfc2047) 41(require 'rfc2047)
42 42
43(declare-function compilation--message->loc "compile" (cl-x) t)
44(declare-function epa--find-coding-system-for-mime-charset "epa" (mime-charset))
45
43(defconst rmail-attribute-header "X-RMAIL-ATTRIBUTES" 46(defconst rmail-attribute-header "X-RMAIL-ATTRIBUTES"
44 "The header that stores the Rmail attribute data.") 47 "The header that stores the Rmail attribute data.")
45 48
@@ -3560,6 +3563,16 @@ does not pop any summary buffer."
3560 3563
3561;;;; *** Rmail Mailing Commands *** 3564;;;; *** Rmail Mailing Commands ***
3562 3565
3566(defun rmail-yank-current-message (buffer)
3567 "Yank into the current buffer the current message of Rmail buffer BUFFER.
3568If BUFFER is swapped with its message viewer buffer, yank out of BUFFER.
3569If BUFFER is not swapped, yank out of its message viewer buffer."
3570 (with-current-buffer buffer
3571 (unless (rmail-buffers-swapped-p)
3572 (setq buffer rmail-view-buffer)))
3573 (insert-buffer buffer))
3574
3575
3563(defun rmail-start-mail (&optional noerase to subject in-reply-to cc 3576(defun rmail-start-mail (&optional noerase to subject in-reply-to cc
3564 replybuffer sendactions same-window 3577 replybuffer sendactions same-window
3565 other-headers) 3578 other-headers)
@@ -3571,7 +3584,8 @@ does not pop any summary buffer."
3571 (if replybuffer 3584 (if replybuffer
3572 ;; The function used here must behave like insert-buffer wrt 3585 ;; The function used here must behave like insert-buffer wrt
3573 ;; point and mark (see doc of sc-cite-original). 3586 ;; point and mark (see doc of sc-cite-original).
3574 (setq yank-action (list 'insert-buffer replybuffer))) 3587 (setq yank-action
3588 `(rmail-yank-current-message ,replybuffer)))
3575 (push (cons "cc" cc) other-headers) 3589 (push (cons "cc" cc) other-headers)
3576 (push (cons "in-reply-to" in-reply-to) other-headers) 3590 (push (cons "in-reply-to" in-reply-to) other-headers)
3577 (setq other-headers 3591 (setq other-headers
@@ -3587,7 +3601,7 @@ does not pop any summary buffer."
3587 (prog1 3601 (prog1
3588 (compose-mail to subject other-headers noerase 3602 (compose-mail to subject other-headers noerase
3589 switch-function yank-action sendactions 3603 switch-function yank-action sendactions
3590 `(rmail-mail-return ,replybuffer)) 3604 (if replybuffer `(rmail-mail-return ,replybuffer)))
3591 (if (eq switch-function 'switch-to-buffer-other-frame) 3605 (if (eq switch-function 'switch-to-buffer-other-frame)
3592 ;; This is not a standard frame parameter; nothing except 3606 ;; This is not a standard frame parameter; nothing except
3593 ;; sendmail.el looks at it. 3607 ;; sendmail.el looks at it.
@@ -3644,7 +3658,7 @@ to switch to."
3644While composing the message, use \\[mail-yank-original] to yank the 3658While composing the message, use \\[mail-yank-original] to yank the
3645original message into it." 3659original message into it."
3646 (interactive) 3660 (interactive)
3647 (rmail-start-mail nil nil nil nil nil rmail-view-buffer)) 3661 (rmail-start-mail nil nil nil nil nil rmail-buffer))
3648 3662
3649;; FIXME should complain if there is nothing to continue. 3663;; FIXME should complain if there is nothing to continue.
3650(defun rmail-continue () 3664(defun rmail-continue ()
@@ -3731,9 +3745,7 @@ use \\[mail-yank-original] to yank the original message into it."
3731 (mail-strip-quoted-names 3745 (mail-strip-quoted-names
3732 (if (null cc) to (concat to ", " cc)))))) 3746 (if (null cc) to (concat to ", " cc))))))
3733 (if (string= cc-list "") nil cc-list))) 3747 (if (string= cc-list "") nil cc-list)))
3734 (if (rmail-buffers-swapped-p) 3748 rmail-buffer
3735 rmail-buffer
3736 rmail-view-buffer)
3737 (list (list 'rmail-mark-message 3749 (list (list 'rmail-mark-message
3738 rmail-buffer 3750 rmail-buffer
3739 (with-current-buffer rmail-buffer 3751 (with-current-buffer rmail-buffer
@@ -3835,7 +3847,7 @@ see the documentation of `rmail-resend'."
3835 (or (mail-fetch-field "Subject") "") 3847 (or (mail-fetch-field "Subject") "")
3836 "]"))) 3848 "]")))
3837 (if (rmail-start-mail 3849 (if (rmail-start-mail
3838 nil nil subject nil nil nil 3850 nil nil subject nil nil rmail-buffer
3839 (list (list 'rmail-mark-message 3851 (list (list 'rmail-mark-message
3840 forward-buffer 3852 forward-buffer
3841 (with-current-buffer rmail-buffer 3853 (with-current-buffer rmail-buffer
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index f8958a691b2..cd3862985bd 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -856,15 +856,17 @@ Prefix arg means don't delete this window."
856(defun mail-bury (&optional arg) 856(defun mail-bury (&optional arg)
857 "Bury this mail buffer." 857 "Bury this mail buffer."
858 (let ((newbuf (other-buffer (current-buffer))) 858 (let ((newbuf (other-buffer (current-buffer)))
859 (return-action mail-return-action) 859 (return-action mail-return-action))
860 some-rmail)
861 (bury-buffer (current-buffer)) 860 (bury-buffer (current-buffer))
862 ;; If there is an Rmail buffer, return to it nicely 861 ;; If there is an Rmail buffer, return to it nicely
863 ;; even if this message was not started by an Rmail command. 862 ;; even if this message was not started by an Rmail command.
864 (unless return-action 863 (unless return-action
865 (dolist (buffer (buffer-list)) 864 (dolist (buffer (buffer-list))
866 (if (eq (buffer-local-value 'major-mode buffer) 'rmail-mode) 865 (if (and (eq (buffer-local-value 'major-mode buffer) 'rmail-mode)
867 (setq return-action `(rmail-mail-return ,newbuf))))) 866 (null return-action)
867 ;; Don't match message-viewer buffer.
868 (not (string-match "\\` " (buffer-name buffer))))
869 (setq return-action `(rmail-mail-return ,buffer)))))
868 (if (and (null arg) return-action) 870 (if (and (null arg) return-action)
869 (apply (car return-action) (cdr return-action)) 871 (apply (car return-action) (cdr return-action))
870 (switch-to-buffer newbuf)))) 872 (switch-to-buffer newbuf))))
diff --git a/lisp/mail/unrmail.el b/lisp/mail/unrmail.el
index af16bbf8c73..bf7b9abe2c1 100644
--- a/lisp/mail/unrmail.el
+++ b/lisp/mail/unrmail.el
@@ -61,8 +61,7 @@ For example, invoke `emacs -batch -f batch-unrmail RMAIL'."
61 (error "This file is not in Babyl format")) 61 (error "This file is not in Babyl format"))
62 62
63 ;; Decode the file contents just as Rmail did. 63 ;; Decode the file contents just as Rmail did.
64 (let ((modifiedp (buffer-modified-p)) 64 (let ((coding-system rmail-file-coding-system)
65 (coding-system rmail-file-coding-system)
66 from to) 65 from to)
67 (goto-char (point-min)) 66 (goto-char (point-min))
68 (search-forward "\n\^_" nil t) ; Skip BABYL header. 67 (search-forward "\n\^_" nil t) ; Skip BABYL header.
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog
index 2c3d0dc3803..f98b4a7490e 100644
--- a/lisp/mh-e/ChangeLog
+++ b/lisp/mh-e/ChangeLog
@@ -1,3 +1,8 @@
12012-04-21 Juanma Barranquero <lekktu@gmail.com>
2
3 * mh-folder.el (top): Check whether which-func-modes is t before
4 adding mh-folder-mode.
5
12011-11-20 Bill Wohler <wohler@newt.com> 62011-11-20 Bill Wohler <wohler@newt.com>
2 7
3 * Release MH-E version 8.3.1. 8 * Release MH-E version 8.3.1.
diff --git a/lisp/mh-e/mh-folder.el b/lisp/mh-e/mh-folder.el
index 71ef87385ca..d9e6c74f3f3 100644
--- a/lisp/mh-e/mh-folder.el
+++ b/lisp/mh-e/mh-folder.el
@@ -520,7 +520,7 @@ font-lock is done highlighting.")
520 520
521;; Register mh-folder-mode as supporting which-function-mode... 521;; Register mh-folder-mode as supporting which-function-mode...
522(mh-require 'which-func nil t) 522(mh-require 'which-func nil t)
523(when (boundp 'which-func-modes) 523(when (and (boundp 'which-func-modes) (listp which-func-modes))
524 (add-to-list 'which-func-modes 'mh-folder-mode)) 524 (add-to-list 'which-func-modes 'mh-folder-mode))
525 525
526;; Shush compiler. 526;; Shush compiler.
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index bcc6a808d22..5a990f6ab35 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -1506,7 +1506,7 @@ exit."
1506 (let ((map (make-sparse-keymap))) 1506 (let ((map (make-sparse-keymap)))
1507 ;; FIXME: Only works if completion-in-region-mode was activated via 1507 ;; FIXME: Only works if completion-in-region-mode was activated via
1508 ;; completion-at-point called directly. 1508 ;; completion-at-point called directly.
1509 (define-key map "?" 'completion-help-at-point) 1509 (define-key map "\M-?" 'completion-help-at-point)
1510 (define-key map "\t" 'completion-at-point) 1510 (define-key map "\t" 'completion-at-point)
1511 map) 1511 map)
1512 "Keymap activated during `completion-in-region'.") 1512 "Keymap activated during `completion-in-region'.")
@@ -1817,6 +1817,12 @@ same as `substitute-in-file-name'."
1817 (condition-case nil 1817 (condition-case nil
1818 (cond 1818 (cond
1819 ((eq action 'metadata) '(metadata (category . file))) 1819 ((eq action 'metadata) '(metadata (category . file)))
1820 ((string-match-p "\\`~[^/\\]*\\'" string)
1821 (completion-table-with-context "~"
1822 (mapcar (lambda (u) (concat u "/"))
1823 (system-users))
1824 (substring string 1)
1825 pred action))
1820 ((eq (car-safe action) 'boundaries) 1826 ((eq (car-safe action) 'boundaries)
1821 (let ((start (length (file-name-directory string))) 1827 (let ((start (length (file-name-directory string)))
1822 (end (string-match-p "/" (cdr action)))) 1828 (end (string-match-p "/" (cdr action))))
@@ -2045,6 +2051,21 @@ and `read-file-name-function'."
2045 (funcall (or read-file-name-function #'read-file-name-default) 2051 (funcall (or read-file-name-function #'read-file-name-default)
2046 prompt dir default-filename mustmatch initial predicate)) 2052 prompt dir default-filename mustmatch initial predicate))
2047 2053
2054(defvar minibuffer-local-filename-syntax
2055 (let ((table (make-syntax-table))
2056 (punctuation (car (string-to-syntax "."))))
2057 ;; Convert all punctuation entries to symbol.
2058 (map-char-table (lambda (c syntax)
2059 (when (eq (car syntax) punctuation)
2060 (modify-syntax-entry c "_" table)))
2061 table)
2062 (mapc
2063 (lambda (c)
2064 (modify-syntax-entry c "." table))
2065 '(?/ ?: ?\\))
2066 table)
2067 "Syntax table to be used in minibuffer for reading file name.")
2068
2048;; minibuffer-completing-file-name is a variable used internally in minibuf.c 2069;; minibuffer-completing-file-name is a variable used internally in minibuf.c
2049;; to determine whether to use minibuffer-local-filename-completion-map or 2070;; to determine whether to use minibuffer-local-filename-completion-map or
2050;; minibuffer-local-completion-map. It shouldn't be exported to Elisp. 2071;; minibuffer-local-completion-map. It shouldn't be exported to Elisp.
@@ -2113,7 +2134,8 @@ See `read-file-name' for the meaning of the arguments."
2113 (lambda () 2134 (lambda ()
2114 (with-current-buffer 2135 (with-current-buffer
2115 (window-buffer (minibuffer-selected-window)) 2136 (window-buffer (minibuffer-selected-window))
2116 (read-file-name--defaults dir initial))))) 2137 (read-file-name--defaults dir initial))))
2138 (set-syntax-table minibuffer-local-filename-syntax))
2117 (completing-read prompt 'read-file-name-internal 2139 (completing-read prompt 'read-file-name-internal
2118 pred mustmatch insdef 2140 pred mustmatch insdef
2119 'file-name-history default-filename))) 2141 'file-name-history default-filename)))
diff --git a/lisp/misc.el b/lisp/misc.el
index 4706c918db3..cb52ecbd36e 100644
--- a/lisp/misc.el
+++ b/lisp/misc.el
@@ -138,6 +138,19 @@ variation of `C-x M-c M-butterfly' from url `http://xkcd.com/378/'."
138(defvar list-dynamic-libraries--loaded-only-p) 138(defvar list-dynamic-libraries--loaded-only-p)
139(make-variable-buffer-local 'list-dynamic-libraries--loaded-only-p) 139(make-variable-buffer-local 'list-dynamic-libraries--loaded-only-p)
140 140
141(defun list-dynamic-libraries--loaded (from)
142 "Compute the \"Loaded from\" column.
143Internal use only."
144 (if from
145 (let ((name (car from))
146 (path (or (cdr from) "<unknown>")))
147 ;; This is a roundabout way to change the tooltip without
148 ;; having to replace the default printer function
149 (propertize name
150 'display (propertize name
151 'help-echo (concat "Loaded from: " path))))
152 ""))
153
141(defun list-dynamic-libraries--refresh () 154(defun list-dynamic-libraries--refresh ()
142 "Recompute the list of dynamic libraries. 155 "Recompute the list of dynamic libraries.
143Internal use only." 156Internal use only."
@@ -159,7 +172,7 @@ Internal use only."
159 (when (or from 172 (when (or from
160 (not list-dynamic-libraries--loaded-only-p)) 173 (not list-dynamic-libraries--loaded-only-p))
161 (push (list id (vector (symbol-name id) 174 (push (list id (vector (symbol-name id)
162 (or from "") 175 (list-dynamic-libraries--loaded from)
163 (mapconcat 'identity (cdr lib) ", "))) 176 (mapconcat 'identity (cdr lib) ", ")))
164 tabulated-list-entries))))) 177 tabulated-list-entries)))))
165 178
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 2e119483797..8e08f89f22c 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -1,6 +1,6 @@
1;;; mouse.el --- window system-independent mouse support 1;;; mouse.el --- window system-independent mouse support
2 2
3;; Copyright (C) 1993-1995, 1999-2012 Free Software Foundation, Inc. 3;; Copyright (C) 1993-1995, 1999-2012 Free Software Foundation, Inc.
4 4
5;; Maintainer: FSF 5;; Maintainer: FSF
6;; Keywords: hardware, mouse 6;; Keywords: hardware, mouse
@@ -194,8 +194,7 @@ items `Turn Off' and `Help'."
194 (newmap (if ancestor 194 (newmap (if ancestor
195 (make-sparse-keymap (concat (format-mode-line mode-name) 195 (make-sparse-keymap (concat (format-mode-line mode-name)
196 " Mode")) 196 " Mode"))
197 menu-bar-edit-menu)) 197 menu-bar-edit-menu)))
198 uniq)
199 (if ancestor 198 (if ancestor
200 (set-keymap-parent newmap ancestor)) 199 (set-keymap-parent newmap ancestor))
201 newmap)) 200 newmap))
@@ -805,8 +804,8 @@ DO-MOUSE-DRAG-REGION-POST-PROCESS should only be used by
805 (= click-count 1))) 804 (= click-count 1)))
806 ;; Suppress automatic hscrolling, because that is a nuisance 805 ;; Suppress automatic hscrolling, because that is a nuisance
807 ;; when setting point near the right fringe (but see below). 806 ;; when setting point near the right fringe (but see below).
808 (automatic-hscrolling-saved automatic-hscrolling) 807 (auto-hscroll-mode-saved auto-hscroll-mode)
809 (automatic-hscrolling nil) 808 (auto-hscroll-mode nil)
810 event end end-point) 809 event end end-point)
811 810
812 (setq mouse-selection-click-count click-count) 811 (setq mouse-selection-click-count click-count)
@@ -838,7 +837,7 @@ DO-MOUSE-DRAG-REGION-POST-PROCESS should only be used by
838 ;; Automatic hscrolling did not occur during the call to 837 ;; Automatic hscrolling did not occur during the call to
839 ;; `read-event'; but if the user subsequently drags the 838 ;; `read-event'; but if the user subsequently drags the
840 ;; mouse, go ahead and hscroll. 839 ;; mouse, go ahead and hscroll.
841 (let ((automatic-hscrolling automatic-hscrolling-saved)) 840 (let ((auto-hscroll-mode auto-hscroll-mode-saved))
842 (redisplay)) 841 (redisplay))
843 (setq end (event-end event) 842 (setq end (event-end event)
844 end-point (posn-point end)) 843 end-point (posn-point end))
diff --git a/lisp/mpc.el b/lisp/mpc.el
index 614f2bd6806..d2203a4deab 100644
--- a/lisp/mpc.el
+++ b/lisp/mpc.el
@@ -1,6 +1,6 @@
1;;; mpc.el --- A client for the Music Player Daemon -*- coding: utf-8; lexical-binding: t -*- 1;;; mpc.el --- A client for the Music Player Daemon -*- coding: utf-8; lexical-binding: t -*-
2 2
3;; Copyright (C) 2006-2012 Free Software Foundation, Inc. 3;; Copyright (C) 2006-2012 Free Software Foundation, Inc.
4 4
5;; Author: Stefan Monnier <monnier@iro.umontreal.ca> 5;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
6;; Keywords: multimedia 6;; Keywords: multimedia
@@ -184,10 +184,7 @@ numerically rather than lexicographically."
184 (abs res)) 184 (abs res))
185 res)))))))) 185 res))))))))
186 186
187(defun mpc-string-prefix-p (str1 str2) 187(define-obsolete-function-alias 'mpc-string-prefix-p 'string-prefix-p "24.2")
188 ;; FIXME: copied from pcvs-util.el.
189 "Tell whether STR1 is a prefix of STR2."
190 (eq t (compare-strings str2 nil (length str1) str1 nil nil)))
191 188
192;; This can speed up mpc--song-search significantly. The table may grow 189;; This can speed up mpc--song-search significantly. The table may grow
193;; very large, tho. It's only bounded by the fact that it gets flushed 190;; very large, tho. It's only bounded by the fact that it gets flushed
@@ -1690,7 +1687,7 @@ Return non-nil if a selection was deactivated."
1690 (process-put (mpc-proc) prop 1687 (process-put (mpc-proc) prop
1691 (delq nil 1688 (delq nil
1692 (mapcar (lambda (x) 1689 (mapcar (lambda (x)
1693 (if (mpc-string-prefix-p name x) 1690 (if (string-prefix-p name x)
1694 nil x)) 1691 nil x))
1695 new))))) 1692 new)))))
1696 (mpc-tagbrowser-refresh))) 1693 (mpc-tagbrowser-refresh)))
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index 0bfc8eda3b1..62c0e317a81 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -467,7 +467,7 @@ commands reverses the effect of this variable. Requires Netscape version
467 ;; it in anonymous cases. If it's not anonymous the next regexp 467 ;; it in anonymous cases. If it's not anonymous the next regexp
468 ;; applies. 468 ;; applies.
469 ("^/\\([^:@]+@\\)?\\([^:]+\\):/*" . "ftp://\\1\\2/") 469 ("^/\\([^:@]+@\\)?\\([^:]+\\):/*" . "ftp://\\1\\2/")
470 ,@(if (memq system-type '(windows-nt ms-dos cygwin)) 470 ,@(if (memq system-type '(windows-nt ms-dos))
471 '(("^\\([a-zA-Z]:\\)[\\/]" . "file:///\\1/") 471 '(("^\\([a-zA-Z]:\\)[\\/]" . "file:///\\1/")
472 ("^[\\/][\\/]+" . "file://"))) 472 ("^[\\/][\\/]+" . "file://")))
473 ("^/+" . "file:///")) 473 ("^/+" . "file:///"))
@@ -724,12 +724,6 @@ interactively. Turn the filename into a URL with function
724(defun browse-url-file-url (file) 724(defun browse-url-file-url (file)
725 "Return the URL corresponding to FILE. 725 "Return the URL corresponding to FILE.
726Use variable `browse-url-filename-alist' to map filenames to URLs." 726Use variable `browse-url-filename-alist' to map filenames to URLs."
727 ;; De-munge Cygwin filenames before passing them to Windows browser.
728 (if (eq system-type 'cygwin)
729 (let ((winfile (with-output-to-string
730 (call-process "cygpath" nil standard-output
731 nil "-m" file))))
732 (setq file (substring winfile 0 -1))))
733 (let ((coding (and (default-value 'enable-multibyte-characters) 727 (let ((coding (and (default-value 'enable-multibyte-characters)
734 (or file-name-coding-system 728 (or file-name-coding-system
735 default-file-name-coding-system)))) 729 default-file-name-coding-system))))
diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el
index feef78a305f..e3144a53fab 100644
--- a/lisp/net/dbus.el
+++ b/lisp/net/dbus.el
@@ -37,6 +37,7 @@
37(declare-function dbus-init-bus "dbusbind.c") 37(declare-function dbus-init-bus "dbusbind.c")
38(declare-function dbus-method-return-internal "dbusbind.c") 38(declare-function dbus-method-return-internal "dbusbind.c")
39(declare-function dbus-method-error-internal "dbusbind.c") 39(declare-function dbus-method-error-internal "dbusbind.c")
40(declare-function dbus-register-service "dbusbind.c")
40(declare-function dbus-register-signal "dbusbind.c") 41(declare-function dbus-register-signal "dbusbind.c")
41(declare-function dbus-register-method "dbusbind.c") 42(declare-function dbus-register-method "dbusbind.c")
42(declare-function dbus-send-signal "dbusbind.c") 43(declare-function dbus-send-signal "dbusbind.c")
@@ -275,8 +276,7 @@ usage: (dbus-name-owner-changed-handler service old-owner new-owner)"
275 (stringp (cadr args)) 276 (stringp (cadr args))
276 (stringp (caddr args))) 277 (stringp (caddr args)))
277 (let ((service (car args)) 278 (let ((service (car args))
278 (old-owner (cadr args)) 279 (old-owner (cadr args)))
279 (new-owner (caddr args)))
280 ;; Check whether SERVICE is a known name. 280 ;; Check whether SERVICE is a known name.
281 (when (not (string-match "^:" service)) 281 (when (not (string-match "^:" service))
282 (maphash 282 (maphash
diff --git a/lisp/net/network-stream.el b/lisp/net/network-stream.el
index 7a3d47ef1d1..81d05eabc5a 100644
--- a/lisp/net/network-stream.el
+++ b/lisp/net/network-stream.el
@@ -125,9 +125,8 @@ values:
125 certificate. This parameter will only be used when doing TLS 125 certificate. This parameter will only be used when doing TLS
126 or STARTTLS connections. 126 or STARTTLS connections.
127 127
128If :use-starttls-if-possible is non-nil, do opportunistic 128:use-starttls-if-possible is a boolean that says to do opportunistic
129STARTTLS upgrades even if Emacs doesn't have built-in TLS 129STARTTLS upgrades even if Emacs doesn't have built-in TLS functionality.
130functionality.
131 130
132:nowait is a boolean that says the connection should be made 131:nowait is a boolean that says the connection should be made
133 asynchronously, if possible." 132 asynchronously, if possible."
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index 9d7e8664542..1898b3d074f 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -361,6 +361,14 @@ of a line. The string is passed as the first argument to
361 :type 'string 361 :type 'string
362 :group 'rcirc) 362 :group 'rcirc)
363 363
364(defcustom rcirc-kill-channel-buffers nil
365 "When non-nil, kill channel buffers when the server buffer is killed.
366Only the channel buffers associated with the server in question
367will be killed."
368 :version "24.2"
369 :type 'boolean
370 :group 'rcirc)
371
364(defvar rcirc-nick nil) 372(defvar rcirc-nick nil)
365 373
366(defvar rcirc-prompt-start-marker nil) 374(defvar rcirc-prompt-start-marker nil)
@@ -471,7 +479,8 @@ If ARG is non-nil, instead prompt for connection parameters."
471 rcirc-default-full-name)) 479 rcirc-default-full-name))
472 (channels (plist-get (cdr c) :channels)) 480 (channels (plist-get (cdr c) :channels))
473 (password (plist-get (cdr c) :password)) 481 (password (plist-get (cdr c) :password))
474 (encryption (plist-get (cdr c) :encryption))) 482 (encryption (plist-get (cdr c) :encryption))
483 contact)
475 (when server 484 (when server
476 (let (connected) 485 (let (connected)
477 (dolist (p (rcirc-process-list)) 486 (dolist (p (rcirc-process-list))
@@ -483,10 +492,11 @@ If ARG is non-nil, instead prompt for connection parameters."
483 full-name channels password encryption) 492 full-name channels password encryption)
484 (quit (message "Quit connecting to %s" server))) 493 (quit (message "Quit connecting to %s" server)))
485 (with-current-buffer (process-buffer connected) 494 (with-current-buffer (process-buffer connected)
486 (setq connected-servers 495 (setq contact (process-contact
487 (cons (process-contact (get-buffer-process 496 (get-buffer-process (current-buffer)) :host))
488 (current-buffer)) :host) 497 (setq connected-servers
489 connected-servers)))))))) 498 (cons (if (stringp contact) contact server)
499 connected-servers))))))))
490 (when connected-servers 500 (when connected-servers
491 (message "Already connected to %s" 501 (message "Already connected to %s"
492 (if (cdr connected-servers) 502 (if (cdr connected-servers)
@@ -1088,12 +1098,20 @@ Logfiles are kept in `rcirc-log-directory'."
1088 :group 'rcirc) 1098 :group 'rcirc)
1089 1099
1090(defun rcirc-kill-buffer-hook () 1100(defun rcirc-kill-buffer-hook ()
1091 "Part the channel when killing an rcirc buffer." 1101 "Part the channel when killing an rcirc buffer.
1102
1103If `rcirc-kill-channel-buffers' is non-nil and the killed buffer
1104is a server buffer, kills all of the channel buffers associated
1105with it."
1092 (when (eq major-mode 'rcirc-mode) 1106 (when (eq major-mode 'rcirc-mode)
1093 (when (and rcirc-log-flag 1107 (when (and rcirc-log-flag
1094 rcirc-log-directory) 1108 rcirc-log-directory)
1095 (rcirc-log-write)) 1109 (rcirc-log-write))
1096 (rcirc-clean-up-buffer "Killed buffer"))) 1110 (rcirc-clean-up-buffer "Killed buffer")
1111 (when (and rcirc-buffer-alist ;; it's a server buffer
1112 rcirc-kill-channel-buffers)
1113 (dolist (channel rcirc-buffer-alist)
1114 (kill-buffer (cdr channel))))))
1097 1115
1098(defun rcirc-change-major-mode-hook () 1116(defun rcirc-change-major-mode-hook ()
1099 "Part the channel when changing the major-mode." 1117 "Part the channel when changing the major-mode."
@@ -2165,17 +2183,13 @@ CHANNELS is a comma- or space-separated string of channel names."
2165 (let ((channel (if (> (length channel) 0) channel target))) 2183 (let ((channel (if (> (length channel) 0) channel target)))
2166 (rcirc-send-string process (concat "PART " channel " :" rcirc-id-string)))) 2184 (rcirc-send-string process (concat "PART " channel " :" rcirc-id-string))))
2167 2185
2168(defun-rcirc-command quit (reason all) 2186(defun-rcirc-command quit (reason)
2169 "Send a quit message to server with REASON. 2187 "Send a quit message to server with REASON."
2170When called with prefix, quit all servers." 2188 (interactive "sQuit reason: ")
2171 (interactive "sQuit reason: \nP") 2189 (rcirc-send-string process (concat "QUIT :"
2172 (dolist (p (if all 2190 (if (not (zerop (length reason)))
2173 (rcirc-process-list) 2191 reason
2174 (list process))) 2192 rcirc-id-string))))
2175 (rcirc-send-string p (concat "QUIT :"
2176 (if (not (zerop (length reason)))
2177 reason
2178 rcirc-id-string)))))
2179 2193
2180(defun-rcirc-command nick (nick) 2194(defun-rcirc-command nick (nick)
2181 "Change nick to NICK." 2195 "Change nick to NICK."
diff --git a/lisp/net/tls.el b/lisp/net/tls.el
index d232095444b..75d178e3225 100644
--- a/lisp/net/tls.el
+++ b/lisp/net/tls.el
@@ -231,8 +231,7 @@ Fourth arg PORT is an integer specifying a port to connect to."
231 ?h host 231 ?h host
232 ?p (if (integerp port) 232 ?p (if (integerp port)
233 (int-to-string port) 233 (int-to-string port)
234 port)))) 234 port)))))
235 response)
236 (message "Opening TLS connection with `%s'..." formatted-cmd) 235 (message "Opening TLS connection with `%s'..." formatted-cmd)
237 (setq process (start-process 236 (setq process (start-process
238 name buffer shell-file-name shell-command-switch 237 name buffer shell-file-name shell-command-switch
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 5b4ea1e6f17..95848ac34ea 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -3133,11 +3133,12 @@ beginning of local filename are not substituted."
3133(defun tramp-action-password (proc vec) 3133(defun tramp-action-password (proc vec)
3134 "Query the user for a password." 3134 "Query the user for a password."
3135 (with-current-buffer (process-buffer proc) 3135 (with-current-buffer (process-buffer proc)
3136 (tramp-check-for-regexp proc tramp-password-prompt-regexp) 3136 (let ((enable-recursive-minibuffers t))
3137 (tramp-message vec 3 "Sending %s" (match-string 1)) 3137 (tramp-check-for-regexp proc tramp-password-prompt-regexp)
3138 (tramp-enter-password proc) 3138 (tramp-message vec 3 "Sending %s" (match-string 1))
3139 ;; Hide password prompt. 3139 (tramp-enter-password proc)
3140 (narrow-to-region (point-max) (point-max)))) 3140 ;; Hide password prompt.
3141 (narrow-to-region (point-max) (point-max)))))
3141 3142
3142(defun tramp-action-succeed (proc vec) 3143(defun tramp-action-succeed (proc vec)
3143 "Signal success in finding shell prompt." 3144 "Signal success in finding shell prompt."
diff --git a/lisp/newcomment.el b/lisp/newcomment.el
index 37a76e0309c..0862427c3ba 100644
--- a/lisp/newcomment.el
+++ b/lisp/newcomment.el
@@ -269,6 +269,19 @@ makes the comment easier to read. Default is 1. nil means 0."
269 :type '(choice string integer (const nil)) 269 :type '(choice string integer (const nil))
270 :group 'comment) 270 :group 'comment)
271 271
272(defcustom comment-inline-offset 1
273 "Inline comments have to be preceded by at least this many spaces.
274This is useful when style-conventions require a certain minimal offset.
275Python's PEP8 for example recommends two spaces, so you could do:
276
277\(add-hook 'python-mode-hook
278 (lambda () (set (make-local-variable 'comment-inline-offset) 2)))
279
280See `comment-padding' for whole-line comments."
281 :version "24.2"
282 :type 'integer
283 :group 'comment)
284
272;;;###autoload 285;;;###autoload
273(defcustom comment-multi-line nil 286(defcustom comment-multi-line nil
274 "Non-nil means `comment-indent-new-line' continues comments. 287 "Non-nil means `comment-indent-new-line' continues comments.
@@ -587,7 +600,7 @@ Point is expected to be at the start of the comment."
587 (save-excursion (end-of-line) (current-column))))) 600 (save-excursion (end-of-line) (current-column)))))
588 (other nil) 601 (other nil)
589 (min (save-excursion (skip-chars-backward " \t") 602 (min (save-excursion (skip-chars-backward " \t")
590 (if (bolp) 0 (1+ (current-column)))))) 603 (if (bolp) 0 (+ comment-inline-offset (current-column))))))
591 ;; Fix up the range. 604 ;; Fix up the range.
592 (if (< max min) (setq max min)) 605 (if (< max min) (setq max min))
593 ;; Don't move past the fill column. 606 ;; Don't move past the fill column.
@@ -687,7 +700,8 @@ If CONTINUE is non-nil, use the `comment-continue' markers if any."
687 (save-excursion 700 (save-excursion
688 (skip-chars-backward " \t") 701 (skip-chars-backward " \t")
689 (unless (bolp) 702 (unless (bolp)
690 (setq indent (max indent (1+ (current-column)))))) 703 (setq indent (max indent
704 (+ (current-column) comment-inline-offset)))))
691 ;; If that's different from comment's current position, change it. 705 ;; If that's different from comment's current position, change it.
692 (unless (= (current-column) indent) 706 (unless (= (current-column) indent)
693 (delete-region (point) (progn (skip-chars-backward " \t") (point))) 707 (delete-region (point) (progn (skip-chars-backward " \t") (point)))
diff --git a/lisp/nxml/nxml-mode.el b/lisp/nxml/nxml-mode.el
index f9122e7245e..5adafc3845c 100644
--- a/lisp/nxml/nxml-mode.el
+++ b/lisp/nxml/nxml-mode.el
@@ -1236,7 +1236,7 @@ on the line, reindent the line."
1236 (unless arg 1236 (unless arg
1237 (if nxml-slash-auto-complete-flag 1237 (if nxml-slash-auto-complete-flag
1238 (if end-tag-p 1238 (if end-tag-p
1239 (condition-case err 1239 (condition-case nil
1240 (let ((start-tag-end 1240 (let ((start-tag-end
1241 (nxml-scan-element-backward (1- slash-pos) t))) 1241 (nxml-scan-element-backward (1- slash-pos) t)))
1242 (when start-tag-end 1242 (when start-tag-end
@@ -1434,7 +1434,7 @@ its line. Otherwise return nil."
1434 (nxml-token-after) 1434 (nxml-token-after)
1435 (= xmltok-start bol)) 1435 (= xmltok-start bol))
1436 (eq xmltok-type 'data)) 1436 (eq xmltok-type 'data))
1437 (condition-case err 1437 (condition-case nil
1438 (nxml-scan-element-backward 1438 (nxml-scan-element-backward
1439 (point) 1439 (point)
1440 nil 1440 nil
@@ -1559,8 +1559,7 @@ This expects the xmltok-* variables to be set up as by `xmltok-forward'."
1559 (off 0)) 1559 (off 0))
1560 (if value-boundary 1560 (if value-boundary
1561 ;; inside an attribute value 1561 ;; inside an attribute value
1562 (let ((value-start (car value-boundary)) 1562 (let ((value-start (car value-boundary)))
1563 (value-end (cdr value-boundary)))
1564 (goto-char pos) 1563 (goto-char pos)
1565 (forward-line -1) 1564 (forward-line -1)
1566 (if (< (point) value-start) 1565 (if (< (point) value-start)
@@ -1753,7 +1752,7 @@ single name. A character reference contains a character number."
1753 xmltok-name-end) 1752 xmltok-name-end)
1754 (t end))) 1753 (t end)))
1755 1754
1756(defun nxml-scan-backward-within (end) 1755(defun nxml-scan-backward-within (_end)
1757 (setq xmltok-start 1756 (setq xmltok-start
1758 (+ xmltok-start 1757 (+ xmltok-start
1759 (nxml-start-delimiter-length xmltok-type))) 1758 (nxml-start-delimiter-length xmltok-type)))
@@ -2263,7 +2262,7 @@ ENDP is t in the former case, nil in the latter."
2263 'nxml-in-mixed-content-hook)) 2262 'nxml-in-mixed-content-hook))
2264 nil) 2263 nil)
2265 ;; See if the matching tag does not start or end a line. 2264 ;; See if the matching tag does not start or end a line.
2266 ((condition-case err 2265 ((condition-case nil
2267 (progn 2266 (progn
2268 (setq matching-tag-pos 2267 (setq matching-tag-pos
2269 (xmltok-save 2268 (xmltok-save
@@ -2401,7 +2400,7 @@ Repeating \\[nxml-dynamic-markup-word] immediately after successful
2401\\[nxml-dynamic-markup-word] removes the previously inserted markup 2400\\[nxml-dynamic-markup-word] removes the previously inserted markup
2402and attempts to find another possible way to do the markup." 2401and attempts to find another possible way to do the markup."
2403 (interactive "*") 2402 (interactive "*")
2404 (let (search-start-pos done) 2403 (let (search-start-pos)
2405 (if (and (integerp nxml-dynamic-markup-prev-pos) 2404 (if (and (integerp nxml-dynamic-markup-prev-pos)
2406 (= nxml-dynamic-markup-prev-pos (point)) 2405 (= nxml-dynamic-markup-prev-pos (point))
2407 (eq last-command this-command) 2406 (eq last-command this-command)
diff --git a/lisp/mail/mailpost.el b/lisp/obsolete/mailpost.el
index 7c4bea830d8..158523e8ef2 100644
--- a/lisp/mail/mailpost.el
+++ b/lisp/obsolete/mailpost.el
@@ -9,6 +9,7 @@
9;; Maintainer: FSF 9;; Maintainer: FSF
10;; Created: 13 Jan 1986 10;; Created: 13 Jan 1986
11;; Keywords: mail 11;; Keywords: mail
12;; Obsolete-since: 24.2
12 13
13;;; Commentary: 14;;; Commentary:
14 15
diff --git a/lisp/mouse-sel.el b/lisp/obsolete/mouse-sel.el
index 6323ef03696..45396d30ea5 100644
--- a/lisp/mouse-sel.el
+++ b/lisp/obsolete/mouse-sel.el
@@ -4,6 +4,7 @@
4 4
5;; Author: Mike Williams <mdub@bigfoot.com> 5;; Author: Mike Williams <mdub@bigfoot.com>
6;; Keywords: mouse 6;; Keywords: mouse
7;; Obsolete-since: 24.2
7 8
8;; This file is part of GNU Emacs. 9;; This file is part of GNU Emacs.
9 10
@@ -262,6 +263,8 @@ kill ring; mouse-1 or mouse-3 kills it."
262 interprogram-paste-function 263 interprogram-paste-function
263 mouse-sel-original-interprogram-paste-function)))) 264 mouse-sel-original-interprogram-paste-function))))
264 265
266(make-obsolete 'mouse-sel-mode "use the normal mouse modes" "24.2")
267
265;;=== Internal Variables/Constants ======================================== 268;;=== Internal Variables/Constants ========================================
266 269
267(defvar mouse-sel-primary-thing nil 270(defvar mouse-sel-primary-thing nil
diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog
index 618d5753a46..86f493a0a5b 100644
--- a/lisp/org/ChangeLog
+++ b/lisp/org/ChangeLog
@@ -1,3 +1,49 @@
12012-04-14 Bastien Guerry <bzg@gnu.org>
2
3 * org.el (org-point-at-end-of-empty-headline): Only try to match
4 `org-todo-line-regexp' when the value is non-nil, e.g. in non-org
5 modes.
6 (org-fontify-meta-lines-and-blocks-1): Prevent errors when trying
7 to fontify beyond (point-max).
8
9 * org-clock.el (org-clock-task-overrun-text)
10 (org-task-overrun, org-clock-get-clock-string)
11 (org-clock-update-mode-line)
12 (org-clock-notify-once-if-expired): Rename `org-task-overrun'
13 and `org-task-overrun-text' to `org-clock-task-overrun' and
14 `org-clock-task-overrun-text' respectively.
15 (org-task-overrun-text): New alias.
16
17 * org-table.el (org-table-eval-formula): Fix bug about handling
18 remote references as durations.
19 (org-table-get-range): Fix bug: make sure references to $0 are
20 correctly handled.
21
22 * org-pcomplete.el (pcomplete/org-mode/file-option):
23 Fix bug in `pcomplete/org-mode/file-option'.
24 (org-thing-at-point): Also match line options like LATEX_CLASS
25 when pcompleting from LATEX_.
26
27 * org-agenda.el (org-agenda-filter-make-matcher)
28 (org-agenda-filter-apply): Allow filtering entries out by
29 category. Using `C-u <' from the agenda view will redisplay
30 the agenda without entries from categories of the current line.
31
322012-04-14 Eric Schulte <eric.schulte@gmx.com>
33
34 * ob-C.el (org-babel-C-ensure-main-wrap):
35 Add an explicit return to automatically generated main methods.
36
372012-04-14 Matt Lundin <mdl@imapmail.org>
38
39 * org.el (org-after-todo-state-change-hook):
40 Fix docstring to reflect name change of state to `org-state'.
41
422012-04-14 Mike Sperber <sperber@deinprogramm.de> (tiny change)
43
44 * org-footnote.el (org-footnote-normalize):
45 Correctly pass keyword arguments to `org-export-preprocess-string'.
46
12012-04-03 Bastien Guerry <bzg@gnu.org> 472012-04-03 Bastien Guerry <bzg@gnu.org>
2 48
3 * org.el (org-todo): Fix regression: rename `state' to 49 * org.el (org-todo): Fix regression: rename `state' to
diff --git a/lisp/org/ob-C.el b/lisp/org/ob-C.el
index 5f6c1cb1dd1..583510ac618 100644
--- a/lisp/org/ob-C.el
+++ b/lisp/org/ob-C.el
@@ -152,7 +152,7 @@ it's header arguments."
152 "Wrap body in a \"main\" function call if none exists." 152 "Wrap body in a \"main\" function call if none exists."
153 (if (string-match "^[ \t]*[intvod]+[ \t\n\r]*main[ \t]*(.*)" body) 153 (if (string-match "^[ \t]*[intvod]+[ \t\n\r]*main[ \t]*(.*)" body)
154 body 154 body
155 (format "int main() {\n%s\n}\n" body))) 155 (format "int main() {\n%s\nreturn(0);\n}\n" body)))
156 156
157(defun org-babel-prep-session:C (session params) 157(defun org-babel-prep-session:C (session params)
158 "This function does nothing as C is a compiled language with no 158 "This function does nothing as C is a compiled language with no
diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el
index 324ddd27f9a..3bb0fc84897 100644
--- a/lisp/org/org-agenda.el
+++ b/lisp/org/org-agenda.el
@@ -6365,7 +6365,9 @@ to switch to narrowing."
6365 (dolist (x (delete-dups 6365 (dolist (x (delete-dups
6366 (append (get 'org-agenda-category-filter 6366 (append (get 'org-agenda-category-filter
6367 :preset-filter) org-agenda-category-filter))) 6367 :preset-filter) org-agenda-category-filter)))
6368 (setq f1 (list 'equal (substring x 1) 'cat)) 6368 (if (equal "-" (substring x 0 1))
6369 (setq f1 (list 'not (list 'equal (substring x 1) 'cat)))
6370 (setq f1 (list 'equal (substring x 1) 'cat)))
6369 (push f1 f)) 6371 (push f1 f))
6370 (cons 'and (nreverse f)))) 6372 (cons 'and (nreverse f))))
6371 6373
@@ -6396,9 +6398,13 @@ If the line does not have an effort defined, return nil."
6396 (let (tags cat) 6398 (let (tags cat)
6397 (if (eq type 'tag) 6399 (if (eq type 'tag)
6398 (setq org-agenda-tag-filter filter) 6400 (setq org-agenda-tag-filter filter)
6399 (setq org-agenda-category-filter filter 6401 (setq org-agenda-category-filter filter))
6400 org-agenda-filtered-by-category t))
6401 (setq org-agenda-filter-form (org-agenda-filter-make-matcher)) 6402 (setq org-agenda-filter-form (org-agenda-filter-make-matcher))
6403 (if (and (eq type 'category)
6404 (not (equal (substring (car filter) 0 1) "-")))
6405 ;; Only set `org-agenda-filtered-by-category' to t
6406 ;; when a unique category is used as the filter
6407 (setq org-agenda-filtered-by-category t))
6402 (org-agenda-set-mode-name) 6408 (org-agenda-set-mode-name)
6403 (save-excursion 6409 (save-excursion
6404 (goto-char (point-min)) 6410 (goto-char (point-min))
@@ -6412,7 +6418,7 @@ If the line does not have an effort defined, return nil."
6412 (beginning-of-line 2)) 6418 (beginning-of-line 2))
6413 (beginning-of-line 2)))) 6419 (beginning-of-line 2))))
6414 (if (get-char-property (point) 'invisible) 6420 (if (get-char-property (point) 'invisible)
6415 (org-agenda-previous-line)))) 6421 (ignore-errors (org-agenda-previous-line)))))
6416 6422
6417(defun org-agenda-filter-hide-line (type) 6423(defun org-agenda-filter-hide-line (type)
6418 (let (ov) 6424 (let (ov)
diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el
index 7105bfe13dc..434f6a1d5f6 100644
--- a/lisp/org/org-clock.el
+++ b/lisp/org/org-clock.el
@@ -219,7 +219,8 @@ auto Automatically, either `all', or `repeat' for repeating tasks"
219 (const :tag "All task time" all) 219 (const :tag "All task time" all)
220 (const :tag "Automatically, `all' or since `repeat'" auto))) 220 (const :tag "Automatically, `all' or since `repeat'" auto)))
221 221
222(defcustom org-task-overrun-text nil 222(defvaralias 'org-task-overrun-text 'org-clock-task-overrun-text)
223(defcustom org-clock-task-overrun-text nil
223 "The extra modeline text that should indicate that the clock is overrun. 224 "The extra modeline text that should indicate that the clock is overrun.
224The can be nil to indicate that instead of adding text, the clock time 225The can be nil to indicate that instead of adding text, the clock time
225should get a different face (`org-mode-line-clock-overrun'). 226should get a different face (`org-mode-line-clock-overrun').
@@ -495,7 +496,7 @@ pointing to it."
495 (insert (format "[%c] %-15s %s\n" i cat task)) 496 (insert (format "[%c] %-15s %s\n" i cat task))
496 (cons i marker))))) 497 (cons i marker)))))
497 498
498(defvar org-task-overrun nil 499(defvar org-clock-task-overrun nil
499 "Internal flag indicating if the clock has overrun the planned time.") 500 "Internal flag indicating if the clock has overrun the planned time.")
500(defvar org-clock-update-period 60 501(defvar org-clock-update-period 60
501 "Number of seconds between mode line clock string updates.") 502 "Number of seconds between mode line clock string updates.")
@@ -516,7 +517,7 @@ If not, show simply the clocked time like 01:50."
516 (work-done-str 517 (work-done-str
517 (org-propertize 518 (org-propertize
518 (format org-time-clocksum-format h m) 519 (format org-time-clocksum-format h m)
519 'face (if (and org-task-overrun (not org-task-overrun-text)) 520 'face (if (and org-clock-task-overrun (not org-clock-task-overrun-text))
520 'org-mode-line-clock-overrun 'org-mode-line-clock))) 521 'org-mode-line-clock-overrun 'org-mode-line-clock)))
521 (effort-str (format org-time-clocksum-format effort-h effort-m)) 522 (effort-str (format org-time-clocksum-format effort-h effort-m))
522 (clockstr (org-propertize 523 (clockstr (org-propertize
@@ -532,7 +533,7 @@ If not, show simply the clocked time like 01:50."
532(defun org-clock-update-mode-line () 533(defun org-clock-update-mode-line ()
533 (if org-clock-effort 534 (if org-clock-effort
534 (org-clock-notify-once-if-expired) 535 (org-clock-notify-once-if-expired)
535 (setq org-task-overrun nil)) 536 (setq org-clock-task-overrun nil))
536 (setq org-mode-line-string 537 (setq org-mode-line-string
537 (org-propertize 538 (org-propertize
538 (let ((clock-string (org-clock-get-clock-string)) 539 (let ((clock-string (org-clock-get-clock-string))
@@ -546,10 +547,10 @@ If not, show simply the clocked time like 01:50."
546 'local-map org-clock-mode-line-map 547 'local-map org-clock-mode-line-map
547 'mouse-face (if (featurep 'xemacs) 'highlight 'mode-line-highlight) 548 'mouse-face (if (featurep 'xemacs) 'highlight 'mode-line-highlight)
548 )) 549 ))
549 (if (and org-task-overrun org-task-overrun-text) 550 (if (and org-clock-task-overrun org-clock-task-overrun-text)
550 (setq org-mode-line-string 551 (setq org-mode-line-string
551 (concat (org-propertize 552 (concat (org-propertize
552 org-task-overrun-text 553 org-clock-task-overrun-text
553 'face 'org-mode-line-clock-overrun) org-mode-line-string))) 554 'face 'org-mode-line-clock-overrun) org-mode-line-string)))
554 (force-mode-line-update)) 555 (force-mode-line-update))
555 556
@@ -606,7 +607,7 @@ Notification is shown only once."
606 (when (org-clocking-p) 607 (when (org-clocking-p)
607 (let ((effort-in-minutes (org-duration-string-to-minutes org-clock-effort)) 608 (let ((effort-in-minutes (org-duration-string-to-minutes org-clock-effort))
608 (clocked-time (org-clock-get-clocked-time))) 609 (clocked-time (org-clock-get-clocked-time)))
609 (if (setq org-task-overrun 610 (if (setq org-clock-task-overrun
610 (if (or (null effort-in-minutes) (zerop effort-in-minutes)) 611 (if (or (null effort-in-minutes) (zerop effort-in-minutes))
611 nil 612 nil
612 (>= clocked-time effort-in-minutes))) 613 (>= clocked-time effort-in-minutes)))
diff --git a/lisp/org/org-footnote.el b/lisp/org/org-footnote.el
index 34fc31f39d6..9319e0813c0 100644
--- a/lisp/org/org-footnote.el
+++ b/lisp/org/org-footnote.el
@@ -704,7 +704,7 @@ Additional note on `org-footnote-insert-pos-for-preprocessor':
704 (org-combine-plists 704 (org-combine-plists
705 export-props 705 export-props
706 '(:todo-keywords t :tags t :priority t)))) 706 '(:todo-keywords t :tags t :priority t))))
707 (org-export-preprocess-string def parameters)) 707 (apply #'org-export-preprocess-string def parameters))
708 def) 708 def)
709 ;; Reference beginning position is a marker 709 ;; Reference beginning position is a marker
710 ;; to preserve it during further buffer 710 ;; to preserve it during further buffer
diff --git a/lisp/org/org-pcomplete.el b/lisp/org/org-pcomplete.el
index 0ca8777878c..5950d8e26da 100644
--- a/lisp/org/org-pcomplete.el
+++ b/lisp/org/org-pcomplete.el
@@ -69,7 +69,7 @@ The return value is a string naming the thing at point."
69 (re-search-backward "^[ \t]*#\\+\\([A-Z_]+\\):.*" 69 (re-search-backward "^[ \t]*#\\+\\([A-Z_]+\\):.*"
70 (line-beginning-position) t)) 70 (line-beginning-position) t))
71 (cons "file-option" (match-string-no-properties 1))) 71 (cons "file-option" (match-string-no-properties 1)))
72 ((string-match "\\`[ \t]*#\\+[a-zA-Z]*\\'" line-to-here) 72 ((string-match "\\`[ \t]*#\\+[a-zA-Z_]*\\'" line-to-here)
73 (cons "file-option" nil)) 73 (cons "file-option" nil))
74 ((equal (char-before beg) ?\[) 74 ((equal (char-before beg) ?\[)
75 (cons "link" nil)) 75 (cons "link" nil))
@@ -144,7 +144,7 @@ When completing for #+STARTUP, for example, this function returns
144 (if (string-match "^#\\+\\([A-Z_]+:?\\)" x) 144 (if (string-match "^#\\+\\([A-Z_]+:?\\)" x)
145 (match-string 1 x))) 145 (match-string 1 x)))
146 (org-split-string (org-get-current-options) "\n")) 146 (org-split-string (org-get-current-options) "\n"))
147 org-additional-option-like-keywords))))) 147 (copy-sequence org-additional-option-like-keywords))))))
148 (substring pcomplete-stub 2))) 148 (substring pcomplete-stub 2)))
149 149
150(defvar org-startup-options) 150(defvar org-startup-options)
diff --git a/lisp/org/org-special-blocks.el b/lisp/org/org-special-blocks.el
index 5bf8362357f..43b37c64016 100644
--- a/lisp/org/org-special-blocks.el
+++ b/lisp/org/org-special-blocks.el
@@ -80,17 +80,17 @@ seen. This is run after a few special cases are taken care of."
80(add-hook 'org-export-latex-after-blockquotes-hook 80(add-hook 'org-export-latex-after-blockquotes-hook
81 'org-special-blocks-convert-latex-special-cookies) 81 'org-special-blocks-convert-latex-special-cookies)
82 82
83(defvar org-special-blocks-line) 83(defvar line)
84(defun org-special-blocks-convert-html-special-cookies () 84(defun org-special-blocks-convert-html-special-cookies ()
85 "Converts the special cookies into div blocks." 85 "Converts the special cookies into div blocks."
86 ;; Uses the dynamically-bound variable `org-special-blocks-line'. 86 ;; Uses the dynamically-bound variable `line'.
87 (when (string-match "^ORG-\\(.*\\)-\\(START\\|END\\)$" org-special-blocks-line) 87 (when (string-match "^ORG-\\(.*\\)-\\(START\\|END\\)$" line)
88 (message "%s" (match-string 1)) 88 (message "%s" (match-string 1))
89 (when (equal (match-string 2 org-special-blocks-line) "START") 89 (when (equal (match-string 2 line) "START")
90 (org-close-par-maybe) 90 (org-close-par-maybe)
91 (insert "\n<div class=\"" (match-string 1 org-special-blocks-line) "\">") 91 (insert "\n<div class=\"" (match-string 1 line) "\">")
92 (org-open-par)) 92 (org-open-par))
93 (when (equal (match-string 2 org-special-blocks-line) "END") 93 (when (equal (match-string 2 line) "END")
94 (org-close-par-maybe) 94 (org-close-par-maybe)
95 (insert "\n</div>") 95 (insert "\n</div>")
96 (org-open-par)) 96 (org-open-par))
diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el
index ae12cee2abe..08981b57e49 100644
--- a/lisp/org/org-table.el
+++ b/lisp/org/org-table.el
@@ -2526,8 +2526,13 @@ not overwrite the stored one."
2526 (replace-match 2526 (replace-match
2527 (save-match-data 2527 (save-match-data
2528 (org-table-make-reference 2528 (org-table-make-reference
2529 (org-table-get-remote-range 2529 (let ((rmtrng (org-table-get-remote-range
2530 (match-string 1 form) (match-string 2 form)) 2530 (match-string 1 form) (match-string 2 form))))
2531 (if duration
2532 (if (listp rmtrng)
2533 (mapcar (lambda(x) (org-table-time-string-to-seconds x)) rmtrng)
2534 (org-table-time-string-to-seconds rmtrng))
2535 rmtrng))
2531 keep-empty numbers lispp)) 2536 keep-empty numbers lispp))
2532 t t form))) 2537 t t form)))
2533 ;; Insert complex ranges 2538 ;; Insert complex ranges
@@ -2663,8 +2668,8 @@ in the buffer and column1 and column2 are table column numbers."
2663; (setq r2 (or r2 r1) c2 (or c2 c1)) 2668; (setq r2 (or r2 r1) c2 (or c2 c1))
2664 (if (not r1) (setq r1 thisline)) 2669 (if (not r1) (setq r1 thisline))
2665 (if (not r2) (setq r2 thisline)) 2670 (if (not r2) (setq r2 thisline))
2666 (if (not c1) (setq c1 col)) 2671 (if (or (not c1) (= 0 c1)) (setq c1 col))
2667 (if (not c2) (setq c2 col)) 2672 (if (or (not c2) (= 0 c2)) (setq c2 col))
2668 (if (and (not corners-only) 2673 (if (and (not corners-only)
2669 (or (not rangep) (and (= r1 r2) (= c1 c2)))) 2674 (or (not rangep) (and (= r1 r2) (= c1 c2))))
2670 ;; just one field 2675 ;; just one field
diff --git a/lisp/org/org.el b/lisp/org/org.el
index 0f13223d0c1..c2cc2354439 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -6,7 +6,7 @@
6;; Maintainer: Bastien Guerry <bzg at gnu dot org> 6;; Maintainer: Bastien Guerry <bzg at gnu dot org>
7;; Keywords: outlines, hypermedia, calendar, wp 7;; Keywords: outlines, hypermedia, calendar, wp
8;; Homepage: http://orgmode.org 8;; Homepage: http://orgmode.org
9;; Version: 7.8.08 9;; Version: 7.8.09
10;; 10;;
11;; This file is part of GNU Emacs. 11;; This file is part of GNU Emacs.
12;; 12;;
@@ -206,7 +206,7 @@ identifier."
206 206
207;;; Version 207;;; Version
208 208
209(defconst org-version "7.8.08" 209(defconst org-version "7.8.09"
210 "The version number of the file org.el.") 210 "The version number of the file org.el.")
211 211
212;;;###autoload 212;;;###autoload
@@ -2225,7 +2225,7 @@ property and include the word \"recursive\" into the value."
2225(defcustom org-after-todo-state-change-hook nil 2225(defcustom org-after-todo-state-change-hook nil
2226 "Hook which is run after the state of a TODO item was changed. 2226 "Hook which is run after the state of a TODO item was changed.
2227The new state (a string with a TODO keyword, or nil) is available in the 2227The new state (a string with a TODO keyword, or nil) is available in the
2228Lisp variable `state'." 2228Lisp variable `org-state'."
2229 :group 'org-todo 2229 :group 'org-todo
2230 :type 'hook) 2230 :type 'hook)
2231 2231
@@ -5427,7 +5427,8 @@ will be prompted for."
5427 (when (re-search-forward 5427 (when (re-search-forward
5428 (concat "^[ \t]*#\\+end" (match-string 4) "\\>.*") 5428 (concat "^[ \t]*#\\+end" (match-string 4) "\\>.*")
5429 nil t) ;; on purpose, we look further than LIMIT 5429 nil t) ;; on purpose, we look further than LIMIT
5430 (setq end (match-end 0) end1 (1- (match-beginning 0))) 5430 (setq end (min (point-max) (match-end 0))
5431 end1 (min (point-max) (1- (match-beginning 0))))
5431 (setq block-end (match-beginning 0)) 5432 (setq block-end (match-beginning 0))
5432 (when quoting 5433 (when quoting
5433 (remove-text-properties beg end 5434 (remove-text-properties beg end
@@ -5455,11 +5456,12 @@ will be prompted for."
5455 '(face org-block))) ; end of source block 5456 '(face org-block))) ; end of source block
5456 ((not org-fontify-quote-and-verse-blocks)) 5457 ((not org-fontify-quote-and-verse-blocks))
5457 ((string= block-type "quote") 5458 ((string= block-type "quote")
5458 (add-text-properties beg1 (1+ end1) '(face org-quote))) 5459 (add-text-properties beg1 (min (point-max) (1+ end1)) '(face org-quote)))
5459 ((string= block-type "verse") 5460 ((string= block-type "verse")
5460 (add-text-properties beg1 (1+ end1) '(face org-verse)))) 5461 (add-text-properties beg1 (min (point-max) (1+ end1)) '(face org-verse))))
5461 (add-text-properties beg beg1 '(face org-block-begin-line)) 5462 (add-text-properties beg beg1 '(face org-block-begin-line))
5462 (add-text-properties (1+ end) (1+ end1) '(face org-block-end-line)) 5463 (add-text-properties (min (point-max) (1+ end)) (min (point-max) (1+ end1))
5464 '(face org-block-end-line))
5463 t)) 5465 t))
5464 ((member dc1 '("title:" "author:" "email:" "date:")) 5466 ((member dc1 '("title:" "author:" "email:" "date:"))
5465 (add-text-properties 5467 (add-text-properties
@@ -5475,7 +5477,7 @@ will be prompted for."
5475 ((not (member (char-after beg) '(?\ ?\t))) 5477 ((not (member (char-after beg) '(?\ ?\t)))
5476 ;; just any other in-buffer setting, but not indented 5478 ;; just any other in-buffer setting, but not indented
5477 (add-text-properties 5479 (add-text-properties
5478 beg (1+ (match-end 0)) 5480 beg (match-end 0)
5479 '(font-lock-fontified t face org-meta-line)) 5481 '(font-lock-fontified t face org-meta-line))
5480 t) 5482 t)
5481 ((or (member dc1 '("begin:" "end:" "caption:" "label:" 5483 ((or (member dc1 '("begin:" "end:" "caption:" "label:"
@@ -13422,8 +13424,7 @@ With prefix ARG, realign all tags in headings in the current buffer."
13422 ;; Get a new set of tags from the user 13424 ;; Get a new set of tags from the user
13423 (save-excursion 13425 (save-excursion
13424 (setq table (append org-tag-persistent-alist 13426 (setq table (append org-tag-persistent-alist
13425 org-tag-alist 13427 (or org-tag-alist (org-get-buffer-tags))
13426 (org-get-buffer-tags)
13427 (and 13428 (and
13428 org-complete-tags-always-offer-all-agenda-tags 13429 org-complete-tags-always-offer-all-agenda-tags
13429 (org-global-tags-completion-table 13430 (org-global-tags-completion-table
@@ -13725,11 +13726,9 @@ Returns the new tags string, or nil to not change the current settings."
13725 (condition-case nil 13726 (condition-case nil
13726 (setq tg (org-icompleting-read 13727 (setq tg (org-icompleting-read
13727 "Tag: " 13728 "Tag: "
13728 (delete-dups 13729 (or buffer-tags
13729 (append (or buffer-tags 13730 (with-current-buffer buf
13730 (with-current-buffer buf 13731 (org-get-buffer-tags)))))
13731 (mapcar 'car (org-get-buffer-tags))))
13732 (mapcar 'car table)))))
13733 (quit (setq tg ""))) 13732 (quit (setq tg "")))
13734 (when (string-match "\\S-" tg) 13733 (when (string-match "\\S-" tg)
13735 (add-to-list 'buffer-tags (list tg)) 13734 (add-to-list 'buffer-tags (list tg))
@@ -20775,11 +20774,12 @@ This version does not only check the character property, but also
20775If the heading only contains a TODO keyword, it is still still considered 20774If the heading only contains a TODO keyword, it is still still considered
20776empty." 20775empty."
20777 (and (looking-at "[ \t]*$") 20776 (and (looking-at "[ \t]*$")
20778 (save-excursion 20777 (when org-todo-line-regexp
20779 (beginning-of-line 1) 20778 (save-excursion
20780 (let ((case-fold-search nil)) 20779 (beginning-of-line 1)
20781 (looking-at org-todo-line-regexp))) 20780 (let ((case-fold-search nil))
20782 (string= (match-string 3) ""))) 20781 (looking-at org-todo-line-regexp)
20782 (string= (match-string 3) ""))))))
20783 20783
20784(defun org-at-heading-or-item-p () 20784(defun org-at-heading-or-item-p ()
20785 (or (org-at-heading-p) (org-at-item-p))) 20785 (or (org-at-heading-p) (org-at-item-p)))
diff --git a/lisp/pcmpl-rpm.el b/lisp/pcmpl-rpm.el
index 8019b876562..f28469d791b 100644
--- a/lisp/pcmpl-rpm.el
+++ b/lisp/pcmpl-rpm.el
@@ -1,6 +1,6 @@
1;;; pcmpl-rpm.el --- functions for dealing with rpm completions 1;;; pcmpl-rpm.el --- functions for dealing with rpm completions
2 2
3;; Copyright (C) 1999-2012 Free Software Foundation, Inc. 3;; Copyright (C) 1999-2012 Free Software Foundation, Inc.
4 4
5;; Package: pcomplete 5;; Package: pcomplete
6 6
@@ -29,6 +29,13 @@
29 29
30;; Functions: 30;; Functions:
31 31
32;; FIXME rpm -qa can be slow, so:
33;; Adding --nodigest --nosignature is MUCH faster.
34;; (Probably need to test --help for those options though.)
35;; Consider caching the result (cf woman).
36;; Consider printing an explanatory message before running -qa.
37;;
38;; Seems pointless for this to be a defsubst.
32(defsubst pcmpl-rpm-packages () 39(defsubst pcmpl-rpm-packages ()
33 (split-string (pcomplete-process-result "rpm" "-q" "-a"))) 40 (split-string (pcomplete-process-result "rpm" "-q" "-a")))
34 41
@@ -92,6 +99,7 @@
92 '("--changelog" 99 '("--changelog"
93 "--dbpath" 100 "--dbpath"
94 "--dump" 101 "--dump"
102 "--file"
95 "--ftpport" ;nyi for the next four 103 "--ftpport" ;nyi for the next four
96 "--ftpproxy" 104 "--ftpproxy"
97 "--httpport" 105 "--httpport"
@@ -112,6 +120,8 @@
112 (pcomplete-here*)) 120 (pcomplete-here*))
113 ((pcomplete-test "--rcfile") 121 ((pcomplete-test "--rcfile")
114 (pcomplete-here* (pcomplete-entries))) 122 (pcomplete-here* (pcomplete-entries)))
123 ((pcomplete-test "--file")
124 (pcomplete-here* (pcomplete-entries)))
115 ((pcomplete-test "--root") 125 ((pcomplete-test "--root")
116 (pcomplete-here* (pcomplete-dirs))) 126 (pcomplete-here* (pcomplete-dirs)))
117 ((pcomplete-test "--scripts") 127 ((pcomplete-test "--scripts")
@@ -129,7 +139,9 @@
129 (pcomplete-opt "af.p(pcmpl-rpm-files)ilsdcvR") 139 (pcomplete-opt "af.p(pcmpl-rpm-files)ilsdcvR")
130 (if (pcomplete-test "-[^-]*p" 'first 1) 140 (if (pcomplete-test "-[^-]*p" 'first 1)
131 (pcomplete-here (pcmpl-rpm-files)) 141 (pcomplete-here (pcmpl-rpm-files))
132 (pcomplete-here (pcmpl-rpm-packages)))))) 142 (if (pcomplete-test "-[^-]*f" 'first 1)
143 (pcomplete-here* (pcomplete-entries))
144 (pcomplete-here (pcmpl-rpm-packages)))))))
133 ((pcomplete-test "--pipe") 145 ((pcomplete-test "--pipe")
134 (pcomplete-here* (funcall pcomplete-command-completion-function))) 146 (pcomplete-here* (funcall pcomplete-command-completion-function)))
135 ((pcomplete-test "--rmsource") 147 ((pcomplete-test "--rmsource")
diff --git a/lisp/play/cookie1.el b/lisp/play/cookie1.el
index 06bd962d925..cbf29a26a71 100644
--- a/lisp/play/cookie1.el
+++ b/lisp/play/cookie1.el
@@ -96,6 +96,8 @@ of load, ENDMSG at the end."
96 "Reads in the PHRASE-FILE, returns it as a vector of strings. 96 "Reads in the PHRASE-FILE, returns it as a vector of strings.
97Emit STARTMSG and ENDMSG before and after. Caches the result; second 97Emit STARTMSG and ENDMSG before and after. Caches the result; second
98and subsequent calls on the same file won't go to disk." 98and subsequent calls on the same file won't go to disk."
99 (or (file-readable-p phrase-file)
100 (error "Cannot read file `%s'" phrase-file))
99 (let ((sym (intern-soft phrase-file cookie-cache))) 101 (let ((sym (intern-soft phrase-file cookie-cache)))
100 (and sym (not (equal (symbol-function sym) 102 (and sym (not (equal (symbol-function sym)
101 (nth 5 (file-attributes phrase-file)))) 103 (nth 5 (file-attributes phrase-file))))
diff --git a/lisp/play/yow.el b/lisp/play/yow.el
index fa32fdf8272..cb02a839cde 100644
--- a/lisp/play/yow.el
+++ b/lisp/play/yow.el
@@ -1,6 +1,6 @@
1;;; yow.el --- quote random zippyisms 1;;; yow.el --- quote random zippyisms
2 2
3;; Copyright (C) 1993-1995, 2000-2012 Free Software Foundation, Inc. 3;; Copyright (C) 1993-1995, 2000-2012 Free Software Foundation, Inc.
4 4
5;; Maintainer: FSF 5;; Maintainer: FSF
6;; Author: Richard Mlynarik 6;; Author: Richard Mlynarik
@@ -24,10 +24,6 @@
24;;; Commentary: 24;;; Commentary:
25 25
26;; Important pinheadery for GNU Emacs. 26;; Important pinheadery for GNU Emacs.
27;;
28;; See cookie1.el for implementation. Note --- the `n' argument of yow
29;; from the 18.xx implementation is no longer; we only support *random*
30;; random access now.
31 27
32;;; Code: 28;;; Code:
33 29
@@ -38,7 +34,7 @@
38 :prefix "yow-" 34 :prefix "yow-"
39 :group 'games) 35 :group 'games)
40 36
41(defcustom yow-file (concat data-directory "yow.lines") 37(defcustom yow-file (expand-file-name "yow.lines" data-directory)
42 "File containing pertinent pinhead phrases." 38 "File containing pertinent pinhead phrases."
43 :type 'file 39 :type 'file
44 :group 'yow) 40 :group 'yow)
diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el
index 55ab6c9981c..9cf20ccb516 100644
--- a/lisp/progmodes/cc-cmds.el
+++ b/lisp/progmodes/cc-cmds.el
@@ -679,7 +679,7 @@ settings of `c-cleanup-list' are done."
679 ;; We want to inhibit blinking the paren since this would be 679 ;; We want to inhibit blinking the paren since this would be
680 ;; most disruptive. We'll blink it ourselves later on. 680 ;; most disruptive. We'll blink it ourselves later on.
681 (old-blink-paren blink-paren-function) 681 (old-blink-paren blink-paren-function)
682 blink-paren-function) 682 blink-paren-function case-fold-search)
683 683
684 (c-save-buffer-state () 684 (c-save-buffer-state ()
685 (setq safepos (c-safe-position (point) (c-parse-state)) 685 (setq safepos (c-safe-position (point) (c-parse-state))
@@ -1086,7 +1086,7 @@ numeric argument is supplied, or the point is inside a literal."
1086 1086
1087 (interactive "*P") 1087 (interactive "*P")
1088 (let ((c-echo-syntactic-information-p nil) 1088 (let ((c-echo-syntactic-information-p nil)
1089 final-pos close-paren-inserted found-delim) 1089 final-pos close-paren-inserted found-delim case-fold-search)
1090 1090
1091 (self-insert-command (prefix-numeric-value arg)) 1091 (self-insert-command (prefix-numeric-value arg))
1092 (setq final-pos (point)) 1092 (setq final-pos (point))
@@ -1172,7 +1172,8 @@ newline cleanups are done if appropriate; see the variable `c-cleanup-list'."
1172 (interactive "*P") 1172 (interactive "*P")
1173 (let ((literal (c-save-buffer-state () (c-in-literal))) 1173 (let ((literal (c-save-buffer-state () (c-in-literal)))
1174 ;; shut this up 1174 ;; shut this up
1175 (c-echo-syntactic-information-p nil)) 1175 (c-echo-syntactic-information-p nil)
1176 case-fold-search)
1176 (self-insert-command (prefix-numeric-value arg)) 1177 (self-insert-command (prefix-numeric-value arg))
1177 1178
1178 (if (and (not arg) (not literal)) 1179 (if (and (not arg) (not literal))
@@ -1585,7 +1586,7 @@ defun."
1585 ; structure with other users of c-state-cache. 1586 ; structure with other users of c-state-cache.
1586 (orig-point-min (point-min)) (orig-point-max (point-max)) 1587 (orig-point-min (point-min)) (orig-point-max (point-max))
1587 lim ; Position of { which has been widened to. 1588 lim ; Position of { which has been widened to.
1588 where pos) 1589 where pos case-fold-search)
1589 1590
1590 (save-restriction 1591 (save-restriction
1591 (if (eq c-defun-tactic 'go-outward) 1592 (if (eq c-defun-tactic 'go-outward)
@@ -1709,7 +1710,8 @@ the open-parenthesis that starts a defun; see `beginning-of-defun'."
1709 ; structure with other users of c-state-cache. 1710 ; structure with other users of c-state-cache.
1710 (orig-point-min (point-min)) (orig-point-max (point-max)) 1711 (orig-point-min (point-min)) (orig-point-max (point-max))
1711 lim 1712 lim
1712 where pos) 1713 where pos case-fold-search)
1714
1713 (save-restriction 1715 (save-restriction
1714 (if (eq c-defun-tactic 'go-outward) 1716 (if (eq c-defun-tactic 'go-outward)
1715 (setq lim (c-widen-to-enclosing-decl-scope ; e.g. class, namespace 1717 (setq lim (c-widen-to-enclosing-decl-scope ; e.g. class, namespace
@@ -1769,8 +1771,8 @@ with a brace block."
1769 (interactive) 1771 (interactive)
1770 (c-save-buffer-state 1772 (c-save-buffer-state
1771 (beginning-of-defun-function end-of-defun-function 1773 (beginning-of-defun-function end-of-defun-function
1772 where pos name-end) 1774 where pos name-end case-fold-search)
1773 1775
1774 (save-restriction 1776 (save-restriction
1775 (widen) 1777 (widen)
1776 (save-excursion 1778 (save-excursion
@@ -1969,7 +1971,7 @@ As opposed to \\[c-beginning-of-defun] and \\[c-end-of-defun], this
1969function does not require the declaration to contain a brace block." 1971function does not require the declaration to contain a brace block."
1970 (interactive) 1972 (interactive)
1971 1973
1972 (let (decl-limits) 1974 (let (decl-limits case-fold-search)
1973 (c-save-buffer-state nil 1975 (c-save-buffer-state nil
1974 ;; We try to be line oriented, unless there are several 1976 ;; We try to be line oriented, unless there are several
1975 ;; declarations on the same line. 1977 ;; declarations on the same line.
@@ -2001,11 +2003,12 @@ function does not require the declaration to contain a brace block."
2001(defun c-cpp-define-name () 2003(defun c-cpp-define-name ()
2002 "Return the name of the current CPP macro, or NIL if we're not in one." 2004 "Return the name of the current CPP macro, or NIL if we're not in one."
2003 (interactive) 2005 (interactive)
2004 (save-excursion 2006 (let (case-fold-search)
2005 (and c-opt-cpp-macro-define-start 2007 (save-excursion
2006 (c-beginning-of-macro) 2008 (and c-opt-cpp-macro-define-start
2007 (looking-at c-opt-cpp-macro-define-start) 2009 (c-beginning-of-macro)
2008 (match-string-no-properties 1)))) 2010 (looking-at c-opt-cpp-macro-define-start)
2011 (match-string-no-properties 1)))))
2009 2012
2010 2013
2011;; Movement by statements. 2014;; Movement by statements.
@@ -2888,7 +2891,8 @@ See `c-indent-comment-alist' for a description."
2888 (eq (match-end 0) eot)) 2891 (eq (match-end 0) eot))
2889 'cpp-end-block) 2892 'cpp-end-block)
2890 (t 2893 (t
2891 'other)))) 2894 'other)))
2895 case-fold-search)
2892 (if (and (memq line-type '(anchored-comment empty-line)) 2896 (if (and (memq line-type '(anchored-comment empty-line))
2893 c-indent-comments-syntactically-p) 2897 c-indent-comments-syntactically-p)
2894 (let ((c-syntactic-context (c-guess-basic-syntax))) 2898 (let ((c-syntactic-context (c-guess-basic-syntax)))
@@ -3024,7 +3028,7 @@ are treated as conditional clause limits. Normally they are ignored."
3024 (let* ((forward (> count 0)) 3028 (let* ((forward (> count 0))
3025 (increment (if forward -1 1)) 3029 (increment (if forward -1 1))
3026 (search-function (if forward 're-search-forward 're-search-backward)) 3030 (search-function (if forward 're-search-forward 're-search-backward))
3027 new) 3031 new case-fold-search)
3028 (unless (integerp target-depth) 3032 (unless (integerp target-depth)
3029 (setq target-depth (if target-depth -1 0))) 3033 (setq target-depth (if target-depth -1 0)))
3030 (save-excursion 3034 (save-excursion
@@ -3226,7 +3230,7 @@ balanced expression is found."
3226In the macro case this also has the effect of realigning any line 3230In the macro case this also has the effect of realigning any line
3227continuation backslashes, unless `c-auto-align-backslashes' is nil." 3231continuation backslashes, unless `c-auto-align-backslashes' is nil."
3228 (interactive "*") 3232 (interactive "*")
3229 (let ((here (point-marker)) decl-limits) 3233 (let ((here (point-marker)) decl-limits case-fold-search)
3230 (unwind-protect 3234 (unwind-protect
3231 (progn 3235 (progn
3232 (c-save-buffer-state nil 3236 (c-save-buffer-state nil
@@ -4638,7 +4642,8 @@ inside a preprocessor directive."
4638 4642
4639 (interactive "*") 4643 (interactive "*")
4640 (let* (c-lit-limits c-lit-type 4644 (let* (c-lit-limits c-lit-type
4641 (c-macro-start c-macro-start)) 4645 (c-macro-start c-macro-start)
4646 case-fold-search)
4642 4647
4643 (c-save-buffer-state () 4648 (c-save-buffer-state ()
4644 (setq c-lit-limits (c-literal-limits nil nil t) 4649 (setq c-lit-limits (c-literal-limits nil nil t)
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index cf38001c123..65e28c11e21 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -5382,7 +5382,7 @@ comment at the start of cc-engine.el for more info."
5382 new-beg new-end need-new-beg need-new-end) 5382 new-beg new-end need-new-beg need-new-end)
5383 ;; Locate the barrier before the changed region 5383 ;; Locate the barrier before the changed region
5384 (goto-char (if beg-lit-limits (car beg-lit-limits) beg)) 5384 (goto-char (if beg-lit-limits (car beg-lit-limits) beg))
5385 (c-syntactic-skip-backward "^;{}" (max (- beg 2048) (point-min))) 5385 (c-syntactic-skip-backward "^;{}" (c-determine-limit 512))
5386 (setq new-beg (point)) 5386 (setq new-beg (point))
5387 5387
5388 ;; Remove the syntax-table properties from each pertinent <...> pair. 5388 ;; Remove the syntax-table properties from each pertinent <...> pair.
@@ -5393,8 +5393,7 @@ comment at the start of cc-engine.el for more info."
5393 5393
5394 ;; Locate the barrier after END. 5394 ;; Locate the barrier after END.
5395 (goto-char (if end-lit-limits (cdr end-lit-limits) end)) 5395 (goto-char (if end-lit-limits (cdr end-lit-limits) end))
5396 (c-syntactic-re-search-forward "[;{}]" 5396 (c-syntactic-re-search-forward "[;{}]" (c-determine-+ve-limit 512) 'end)
5397 (min (+ end 2048) (point-max)) 'end)
5398 (setq new-end (point)) 5397 (setq new-end (point))
5399 5398
5400 ;; Remove syntax-table properties from the remaining pertinent <...> 5399 ;; Remove syntax-table properties from the remaining pertinent <...>
diff --git a/lisp/progmodes/cc-menus.el b/lisp/progmodes/cc-menus.el
index f57fcbff5ca..a53d65f6307 100644
--- a/lisp/progmodes/cc-menus.el
+++ b/lisp/progmodes/cc-menus.el
@@ -63,6 +63,20 @@ For example:
63 63
64A sample value might look like: `\\(_P\\|_PROTO\\)'.") 64A sample value might look like: `\\(_P\\|_PROTO\\)'.")
65 65
66;; *Warning for cc-mode developers*
67;;
68;; `cc-imenu-objc-generic-expression' elements depend on
69;; `cc-imenu-c++-generic-expression'. So if you change this
70;; expression, you need to change following variables,
71;; `cc-imenu-objc-generic-expression-*-index',
72;; too. `cc-imenu-objc-function' uses these *-index variables, in
73;; order to know where the each regexp *group \\(foobar\\)* elements
74;; are started.
75;;
76;; *-index variables are initialized during `cc-imenu-objc-generic-expression'
77;; being initialized.
78;;
79
66(defvar cc-imenu-c++-generic-expression 80(defvar cc-imenu-c++-generic-expression
67 `( 81 `(
68 ;; Try to match ::operator definitions first. Otherwise `X::operator new ()' 82 ;; Try to match ::operator definitions first. Otherwise `X::operator new ()'
@@ -187,23 +201,8 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.")
187 ")" 201 ")"
188 "[.," c-alnum " \t\n\r]*" 202 "[.," c-alnum " \t\n\r]*"
189 "{" 203 "{"
190 )) 1)) 204 )) 1))
191 "Imenu generic expression for Java mode. See 205 "Imenu generic expression for Java mode. See `imenu-generic-expression'.")
192`imenu-generic-expression'.")
193
194;; *Warning for cc-mode developers*
195;;
196;; `cc-imenu-objc-generic-expression' elements depend on
197;; `cc-imenu-c++-generic-expression'. So if you change this
198;; expression, you need to change following variables,
199;; `cc-imenu-objc-generic-expression-*-index',
200;; too. `cc-imenu-objc-function' uses these *-index variables, in
201;; order to know where the each regexp *group \\(foobar\\)* elements
202;; are started.
203;;
204;; *-index variables are initialized during `cc-imenu-objc-generic-expression'
205;; being initialized.
206;;
207 206
208;; Internal variables 207;; Internal variables
209(defvar cc-imenu-objc-generic-expression-noreturn-index nil) 208(defvar cc-imenu-objc-generic-expression-noreturn-index nil)
@@ -224,7 +223,7 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.")
224 "\\|" 223 "\\|"
225 ;; > General function name regexp 224 ;; > General function name regexp
226 ;; Pick a token by (match-string 3) 225 ;; Pick a token by (match-string 3)
227 (car (cdr (nth 2 cc-imenu-c++-generic-expression))) ; -> index += 5 226 (car (cdr (nth 2 cc-imenu-c++-generic-expression))) ; -> index += 6
228 (prog2 (setq cc-imenu-objc-generic-expression-general-func-index 3) "") 227 (prog2 (setq cc-imenu-objc-generic-expression-general-func-index 3) "")
229 ;; > Special case for definitions using phony prototype macros like: 228 ;; > Special case for definitions using phony prototype macros like:
230 ;; > `int main _PROTO( (int argc,char *argv[]) )'. 229 ;; > `int main _PROTO( (int argc,char *argv[]) )'.
@@ -233,11 +232,11 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.")
233 (concat 232 (concat
234 "\\|" 233 "\\|"
235 (car (cdr (nth 3 cc-imenu-c++-generic-expression))) ; -> index += 1 234 (car (cdr (nth 3 cc-imenu-c++-generic-expression))) ; -> index += 1
236 (prog2 (setq cc-imenu-objc-generic-expression-objc-base-index 9) "") 235 (prog2 (setq cc-imenu-objc-generic-expression-objc-base-index 10) "")
237 ) 236 )
238 (prog2 (setq cc-imenu-objc-generic-expression-objc-base-index 8) "") 237 (prog2 (setq cc-imenu-objc-generic-expression-objc-base-index 9) "")
239 "") ; -> index += 0 238 "") ; -> index += 0
240 (prog2 (setq cc-imenu-objc-generic-expression-proto-index 8) "") 239 (prog2 (setq cc-imenu-objc-generic-expression-proto-index 9) "")
241 ;; 240 ;;
242 ;; For Objective-C 241 ;; For Objective-C
243 ;; Pick a token by (match-string 8 or 9) 242 ;; Pick a token by (match-string 8 or 9)
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index 7c018feefbb..ff18f56bbe8 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -1170,10 +1170,10 @@ Note that the style variables are always made local to the buffer."
1170 ;; 1170 ;;
1171 ;; 1171 ;;
1172 ;; void myfunc(T* p) {} 1172 ;; void myfunc(T* p) {}
1173 ;; 1173 ;;
1174 ;; Type a space in the first blank line, and the fontification of the next 1174 ;; Type a space in the first blank line, and the fontification of the next
1175 ;; line was fouled up by context fontification. 1175 ;; line was fouled up by context fontification.
1176 (let ((new-beg beg) (new-end end) new-region) 1176 (let ((new-beg beg) (new-end end) new-region case-fold-search)
1177 (if c-in-after-change-fontification 1177 (if c-in-after-change-fontification
1178 (setq c-in-after-change-fontification nil) 1178 (setq c-in-after-change-fontification nil)
1179 (save-restriction 1179 (save-restriction
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 07393c6954d..ed8eb81932e 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -1356,8 +1356,12 @@ if ARG is omitted or nil."
1356 (setq flymake-timer 1356 (setq flymake-timer
1357 (run-at-time nil 1 'flymake-on-timer-event (current-buffer))) 1357 (run-at-time nil 1 'flymake-on-timer-event (current-buffer)))
1358 1358
1359 (when flymake-start-syntax-check-on-find-file 1359 (when (and flymake-start-syntax-check-on-find-file
1360 (flymake-start-syntax-check))))) 1360 ;; Since we write temp files in current dir, there's no point
1361 ;; trying if the directory is read-only (bug#8954).
1362 (file-writable-p (file-name-directory buffer-file-name)))
1363 (with-demoted-errors
1364 (flymake-start-syntax-check))))))
1361 1365
1362 ;; Turning the mode OFF. 1366 ;; Turning the mode OFF.
1363 (t 1367 (t
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index 89450cd2276..1be74ff544b 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -375,9 +375,8 @@ Emacs always switches to the thread which caused the stop."
375 :version "23.2" 375 :version "23.2"
376 :link '(info-link "(gdb)GDB/MI Async Records")) 376 :link '(info-link "(gdb)GDB/MI Async Records"))
377 377
378(defcustom gdb-stopped-hooks nil 378(defcustom gdb-stopped-functions nil
379 "This variable holds a list of functions to be called whenever 379 "List of functions called whenever GDB stops.
380GDB stops.
381 380
382Each function takes one argument, a parsed MI response, which 381Each function takes one argument, a parsed MI response, which
383contains fields of corresponding MI *stopped async record: 382contains fields of corresponding MI *stopped async record:
@@ -818,6 +817,8 @@ detailed description of this mode.
818 nil 'local) 817 nil 'local)
819 (local-set-key "\C-i" 'completion-at-point) 818 (local-set-key "\C-i" 'completion-at-point)
820 819
820 (local-set-key [remap comint-delchar-or-maybe-eof] 'gdb-delchar-or-quit)
821
821 (setq gdb-first-prompt t) 822 (setq gdb-first-prompt t)
822 (setq gud-running nil) 823 (setq gud-running nil)
823 824
@@ -859,15 +860,8 @@ detailed description of this mode.
859 860
860 (gdb-get-buffer-create 'gdb-inferior-io) 861 (gdb-get-buffer-create 'gdb-inferior-io)
861 (gdb-clear-inferior-io) 862 (gdb-clear-inferior-io)
862 (set-process-filter (get-process "gdb-inferior") 'gdb-inferior-filter) 863 (gdb-inferior-io--init-proc (get-process "gdb-inferior"))
863 (gdb-input 864
864 ;; Needs GDB 6.4 onwards
865 (concat "-inferior-tty-set "
866 (or
867 ;; The process can run on a remote host.
868 (process-get (get-process "gdb-inferior") 'remote-tty)
869 (process-tty-name (get-process "gdb-inferior"))))
870 'ignore)
871 (if (eq window-system 'w32) 865 (if (eq window-system 'w32)
872 (gdb-input "-gdb-set new-console off" 'ignore)) 866 (gdb-input "-gdb-set new-console off" 'ignore))
873 (gdb-input "-gdb-set height 0" 'ignore) 867 (gdb-input "-gdb-set height 0" 'ignore)
@@ -905,6 +899,25 @@ detailed description of this mode.
905 (setq gdb-non-stop nil) 899 (setq gdb-non-stop nil)
906 (gdb-input "-gdb-set non-stop 0" 'ignore))) 900 (gdb-input "-gdb-set non-stop 0" 'ignore)))
907 901
902(defun gdb-delchar-or-quit (arg)
903 "Delete ARG characters or send a quit command to GDB.
904Send a quit only if point is at the end of the buffer, there is
905no input, and GDB is waiting for input."
906 (interactive "p")
907 (unless (and (eq (current-buffer) gud-comint-buffer)
908 (eq gud-minor-mode 'gdbmi))
909 (error "Not in a GDB-MI buffer"))
910 (let ((proc (get-buffer-process gud-comint-buffer)))
911 (if (and (eobp) proc (process-live-p proc)
912 (not gud-running)
913 (= (point) (marker-position (process-mark proc))))
914 ;; Sending an EOF does not work with GDB-MI; submit an
915 ;; explicit quit command.
916 (progn
917 (insert "quit")
918 (comint-send-input t t))
919 (delete-char arg))))
920
908(defvar gdb-define-alist nil "Alist of #define directives for GUD tooltips.") 921(defvar gdb-define-alist nil "Alist of #define directives for GUD tooltips.")
909 922
910(defun gdb-create-define-alist () 923(defun gdb-create-define-alist ()
@@ -929,7 +942,6 @@ detailed description of this mode.
929 (push (cons name define) gdb-define-alist)))) 942 (push (cons name define) gdb-define-alist))))
930 943
931(declare-function tooltip-show "tooltip" (text &optional use-echo-area)) 944(declare-function tooltip-show "tooltip" (text &optional use-echo-area))
932(defvar tooltip-use-echo-area)
933 945
934(defun gdb-tooltip-print (expr) 946(defun gdb-tooltip-print (expr)
935 (with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer) 947 (with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer)
@@ -937,7 +949,7 @@ detailed description of this mode.
937 (if (re-search-forward ".*value=\\(\".*\"\\)" nil t) 949 (if (re-search-forward ".*value=\\(\".*\"\\)" nil t)
938 (tooltip-show 950 (tooltip-show
939 (concat expr " = " (read (match-string 1))) 951 (concat expr " = " (read (match-string 1)))
940 (or gud-tooltip-echo-area tooltip-use-echo-area 952 (or gud-tooltip-echo-area
941 (not (display-graphic-p))))))) 953 (not (display-graphic-p)))))))
942 954
943;; If expr is a macro for a function don't print because of possible dangerous 955;; If expr is a macro for a function don't print because of possible dangerous
@@ -1056,7 +1068,7 @@ positive, otherwise don't automatically raise it."
1056 (if gdb-speedbar-auto-raise "en" "dis")))) 1068 (if gdb-speedbar-auto-raise "en" "dis"))))
1057 1069
1058(define-key gud-minor-mode-map "\C-c\C-w" 'gud-watch) 1070(define-key gud-minor-mode-map "\C-c\C-w" 'gud-watch)
1059(define-key global-map (concat gud-key-prefix "\C-w") 'gud-watch) 1071(define-key global-map (vconcat gud-key-prefix "\C-w") 'gud-watch)
1060 1072
1061(declare-function tooltip-identifier-from-point "tooltip" (point)) 1073(declare-function tooltip-identifier-from-point "tooltip" (point))
1062 1074
@@ -1510,6 +1522,31 @@ DOC is an optional documentation string."
1510 (gdb-display-buffer 1522 (gdb-display-buffer
1511 (gdb-get-buffer-create 'gdb-inferior-io) t)) 1523 (gdb-get-buffer-create 'gdb-inferior-io) t))
1512 1524
1525(defun gdb-inferior-io--init-proc (proc)
1526 ;; Set up inferior I/O. Needs GDB 6.4 onwards.
1527 (set-process-filter proc 'gdb-inferior-filter)
1528 (set-process-sentinel proc 'gdb-inferior-io-sentinel)
1529 (gdb-input
1530 (concat "-inferior-tty-set "
1531 ;; The process can run on a remote host.
1532 (or (process-get proc 'remote-tty)
1533 (process-tty-name proc)))
1534 'ignore))
1535
1536(defun gdb-inferior-io-sentinel (proc str)
1537 (when (eq (process-status proc) 'failed)
1538 ;; When the debugged process exits, Emacs gets an EIO error on
1539 ;; read from the pty, and stops listening to it. If the gdb
1540 ;; process is still running, remove the pty, make a new one, and
1541 ;; pass it to gdb.
1542 (let ((gdb-proc (get-buffer-process gud-comint-buffer))
1543 (io-buffer (process-buffer proc)))
1544 (when (and gdb-proc (process-live-p gdb-proc)
1545 (buffer-live-p io-buffer))
1546 ;; `comint-exec' deletes the original process as a side effect.
1547 (comint-exec io-buffer "gdb-inferior" nil nil nil)
1548 (gdb-inferior-io--init-proc (get-buffer-process io-buffer))))))
1549
1513(defconst gdb-frame-parameters 1550(defconst gdb-frame-parameters
1514 '((height . 14) (width . 80) 1551 '((height . 14) (width . 80)
1515 (unsplittable . t) 1552 (unsplittable . t)
@@ -1746,24 +1783,27 @@ If `gdb-thread-number' is nil, just wrap NAME in asterisks."
1746 (setq gdb-output-sink 'user) 1783 (setq gdb-output-sink 'user)
1747 (setq gdb-pending-triggers nil)) 1784 (setq gdb-pending-triggers nil))
1748 1785
1749(defun gdb-update () 1786(defun gdb-update (&optional no-proc)
1750 "Update buffers showing status of debug session." 1787 "Update buffers showing status of debug session.
1788If NO-PROC is non-nil, do not try to contact the GDB process."
1751 (when gdb-first-prompt 1789 (when gdb-first-prompt
1752 (gdb-force-mode-line-update 1790 (gdb-force-mode-line-update
1753 (propertize "initializing..." 'face font-lock-variable-name-face)) 1791 (propertize "initializing..." 'face font-lock-variable-name-face))
1754 (gdb-init-1) 1792 (gdb-init-1)
1755 (setq gdb-first-prompt nil)) 1793 (setq gdb-first-prompt nil))
1756 1794
1757 (gdb-get-main-selected-frame) 1795 (unless no-proc
1796 (gdb-get-main-selected-frame))
1797
1758 ;; We may need to update gdb-threads-list so we can use 1798 ;; We may need to update gdb-threads-list so we can use
1759 (gdb-get-buffer-create 'gdb-threads-buffer) 1799 (gdb-get-buffer-create 'gdb-threads-buffer)
1760 ;; gdb-break-list is maintained in breakpoints handler 1800 ;; gdb-break-list is maintained in breakpoints handler
1761 (gdb-get-buffer-create 'gdb-breakpoints-buffer) 1801 (gdb-get-buffer-create 'gdb-breakpoints-buffer)
1762 1802
1763 (gdb-emit-signal gdb-buf-publisher 'update) 1803 (unless no-proc
1804 (gdb-emit-signal gdb-buf-publisher 'update))
1764 1805
1765 (gdb-get-changed-registers) 1806 (gdb-get-changed-registers)
1766
1767 (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)) 1807 (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame))
1768 (dolist (var gdb-var-list) 1808 (dolist (var gdb-var-list)
1769 (setcar (nthcdr 5 var) nil)) 1809 (setcar (nthcdr 5 var) nil))
@@ -2045,7 +2085,7 @@ current thread and update GDB buffers."
2045 ;; In all-stop this updates gud-running properly as well. 2085 ;; In all-stop this updates gud-running properly as well.
2046 (gdb-update) 2086 (gdb-update)
2047 (setq gdb-first-done-or-error nil)) 2087 (setq gdb-first-done-or-error nil))
2048 (run-hook-with-args 'gdb-stopped-hooks result))) 2088 (run-hook-with-args 'gdb-stopped-functions result)))
2049 2089
2050;; Remove the trimmings from log stream containing debugging messages 2090;; Remove the trimmings from log stream containing debugging messages
2051;; being produced by GDB's internals, use warning face and send to GUD 2091;; being produced by GDB's internals, use warning face and send to GUD
@@ -2085,23 +2125,28 @@ current thread and update GDB buffers."
2085 (setq gdb-output-sink 'emacs)) 2125 (setq gdb-output-sink 'emacs))
2086 2126
2087 (gdb-clear-partial-output) 2127 (gdb-clear-partial-output)
2088 (when gdb-first-done-or-error
2089 (unless (or token-number gud-running)
2090 (setq gdb-filter-output (concat gdb-filter-output gdb-prompt-name)))
2091 (gdb-update)
2092 (setq gdb-first-done-or-error nil))
2093 2128
2094 (setq gdb-filter-output 2129 ;; The process may already be dead (e.g. C-d at the gdb prompt).
2095 (gdb-concat-output gdb-filter-output output-field)) 2130 (let* ((proc (get-buffer-process gud-comint-buffer))
2131 (no-proc (or (null proc)
2132 (memq (process-status proc) '(exit signal)))))
2096 2133
2097 (if token-number 2134 (when gdb-first-done-or-error
2098 (progn 2135 (unless (or token-number gud-running no-proc)
2099 (with-current-buffer 2136 (setq gdb-filter-output (concat gdb-filter-output gdb-prompt-name)))
2100 (gdb-get-buffer-create 'gdb-partial-output-buffer) 2137 (gdb-update no-proc)
2101 (funcall 2138 (setq gdb-first-done-or-error nil))
2102 (cdr (assoc (string-to-number token-number) gdb-handler-alist)))) 2139
2103 (setq gdb-handler-alist 2140 (setq gdb-filter-output
2104 (assq-delete-all token-number gdb-handler-alist))))) 2141 (gdb-concat-output gdb-filter-output output-field))
2142
2143 (when token-number
2144 (with-current-buffer
2145 (gdb-get-buffer-create 'gdb-partial-output-buffer)
2146 (funcall
2147 (cdr (assoc (string-to-number token-number) gdb-handler-alist))))
2148 (setq gdb-handler-alist
2149 (assq-delete-all token-number gdb-handler-alist)))))
2105 2150
2106(defun gdb-concat-output (so-far new) 2151(defun gdb-concat-output (so-far new)
2107 (cond 2152 (cond
@@ -4105,9 +4150,15 @@ This arrangement depends on the value of `gdb-many-windows'."
4105 (gud-find-file gdb-main-file))) 4150 (gud-find-file gdb-main-file)))
4106 (setq gdb-source-window win))))) 4151 (setq gdb-source-window win)))))
4107 4152
4153;; Called from `gud-sentinel' in gud.el:
4108(defun gdb-reset () 4154(defun gdb-reset ()
4109 "Exit a debugging session cleanly. 4155 "Exit a debugging session cleanly.
4110Kills the gdb buffers, and resets variables and the source buffers." 4156Kills the gdb buffers, and resets variables and the source buffers."
4157 ;; The gdb-inferior buffer has a pty hooked up to the main gdb
4158 ;; process. This pty must be deleted explicitly.
4159 (let ((pty (get-process "gdb-inferior")))
4160 (if pty (delete-process pty)))
4161 ;; Find gdb-mi buffers and kill them.
4111 (dolist (buffer (buffer-list)) 4162 (dolist (buffer (buffer-list))
4112 (unless (eq buffer gud-comint-buffer) 4163 (unless (eq buffer gud-comint-buffer)
4113 (with-current-buffer buffer 4164 (with-current-buffer buffer
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index d41364547f2..a6ae42f86b1 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -728,9 +728,9 @@ This function is called from `compilation-filter-hook'."
728(defun grep (command-args) 728(defun grep (command-args)
729 "Run grep, with user-specified args, and collect output in a buffer. 729 "Run grep, with user-specified args, and collect output in a buffer.
730While grep runs asynchronously, you can use \\[next-error] (M-x next-error), 730While grep runs asynchronously, you can use \\[next-error] (M-x next-error),
731or \\<grep-mode-map>\\[compile-goto-error] in the grep \ 731or \\<grep-mode-map>\\[compile-goto-error] in the *grep* \
732output buffer, to go to the lines where grep 732buffer, to go to the lines where grep found
733found matches. 733matches. To kill the grep job before it finishes, type \\[kill-compilation].
734 734
735For doing a recursive `grep', see the `rgrep' command. For running 735For doing a recursive `grep', see the `rgrep' command. For running
736`grep' in a specific directory, see `lgrep'. 736`grep' in a specific directory, see `lgrep'.
@@ -957,10 +957,11 @@ With \\[universal-argument] prefix, you can edit the constructed shell command l
957before it is executed. 957before it is executed.
958With two \\[universal-argument] prefixes, directly edit and run `grep-find-command'. 958With two \\[universal-argument] prefixes, directly edit and run `grep-find-command'.
959 959
960Collect output in a buffer. While find runs asynchronously, you 960Collect output in a buffer. While the recursive grep is running,
961can use \\[next-error] (M-x next-error), or \\<grep-mode-map>\\[compile-goto-error] \ 961you can use \\[next-error] (M-x next-error), or \\<grep-mode-map>\\[compile-goto-error] \
962in the grep output buffer, 962in the grep output buffer,
963to go to the lines where grep found matches. 963to visit the lines where matches were found. To kill the job
964before it finishes, type \\[kill-compilation].
964 965
965This command shares argument histories with \\[lgrep] and \\[grep-find]. 966This command shares argument histories with \\[lgrep] and \\[grep-find].
966 967
@@ -1024,7 +1025,8 @@ to specify a command to run."
1024 (shell-quote-argument ")") 1025 (shell-quote-argument ")")
1025 " -prune -o ")) 1026 " -prune -o "))
1026 (and grep-find-ignored-files 1027 (and grep-find-ignored-files
1027 (concat (shell-quote-argument "(") 1028 (concat (shell-quote-argument "!") " -type d "
1029 (shell-quote-argument "(")
1028 ;; we should use shell-quote-argument here 1030 ;; we should use shell-quote-argument here
1029 " -name " 1031 " -name "
1030 (mapconcat 1032 (mapconcat
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 6b1f891b230..1f60c351252 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -66,10 +66,10 @@ Supported debuggers include gdb, sdb, dbx, xdb, perldb, pdb (Python) and jdb."
66 66
67(defcustom gud-key-prefix "\C-x\C-a" 67(defcustom gud-key-prefix "\C-x\C-a"
68 "Prefix of all GUD commands valid in C buffers." 68 "Prefix of all GUD commands valid in C buffers."
69 :type 'string 69 :type 'key-sequence
70 :group 'gud) 70 :group 'gud)
71 71
72(global-set-key (concat gud-key-prefix "\C-l") 'gud-refresh) 72(global-set-key (vconcat gud-key-prefix "\C-l") 'gud-refresh)
73(define-key ctl-x-map " " 'gud-break) ;; backward compatibility hack 73(define-key ctl-x-map " " 'gud-break) ;; backward compatibility hack
74 74
75(defvar gud-marker-filter nil) 75(defvar gud-marker-filter nil)
diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el
index e2016e206a8..b6d2b5e319c 100644
--- a/lisp/progmodes/hideshow.el
+++ b/lisp/progmodes/hideshow.el
@@ -802,12 +802,15 @@ If `hs-hide-comments-when-hiding-all' is non-nil, also hide the comments."
802 (forward-comment (point-max))) 802 (forward-comment (point-max)))
803 (re-search-forward re (point-max) t)) 803 (re-search-forward re (point-max) t))
804 (if (match-beginning 1) 804 (if (match-beginning 1)
805 ;; we have found a block beginning 805 ;; We have found a block beginning.
806 (progn 806 (progn
807 (goto-char (match-beginning 1)) 807 (goto-char (match-beginning 1))
808 (if hs-hide-all-non-comment-function 808 (unless (if hs-hide-all-non-comment-function
809 (funcall hs-hide-all-non-comment-function) 809 (funcall hs-hide-all-non-comment-function)
810 (hs-hide-block-at-point t))) 810 (hs-hide-block-at-point t))
811 ;; Go to end of matched data to prevent from getting stuck
812 ;; with an endless loop.
813 (goto-char (match-end 0))))
811 ;; found a comment, probably 814 ;; found a comment, probably
812 (let ((c-reg (hs-inside-comment-p))) 815 (let ((c-reg (hs-inside-comment-p)))
813 (when (and c-reg (car c-reg)) 816 (when (and c-reg (car c-reg))
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el
index aab5f8f65a4..9df9943cc00 100644
--- a/lisp/progmodes/perl-mode.el
+++ b/lisp/progmodes/perl-mode.el
@@ -1,6 +1,6 @@
1;;; perl-mode.el --- Perl code editing commands for GNU Emacs 1;;; perl-mode.el --- Perl code editing commands for GNU Emacs
2 2
3;; Copyright (C) 1990, 1994, 2001-2012 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1994, 2001-2012 Free Software Foundation, Inc.
4 4
5;; Author: William F. Mann 5;; Author: William F. Mann
6;; Maintainer: FSF 6;; Maintainer: FSF
@@ -133,11 +133,6 @@
133 map) 133 map)
134 "Keymap used in Perl mode.") 134 "Keymap used in Perl mode.")
135 135
136(autoload 'c-macro-expand "cmacexp"
137 "Display the result of expanding all C macros occurring in the region.
138The expansion is entirely correct because it uses the C preprocessor."
139 t)
140
141(defvar perl-mode-syntax-table 136(defvar perl-mode-syntax-table
142 (let ((st (make-syntax-table (standard-syntax-table)))) 137 (let ((st (make-syntax-table (standard-syntax-table))))
143 (modify-syntax-entry ?\n ">" st) 138 (modify-syntax-entry ?\n ">" st)
@@ -511,6 +506,14 @@ If nil, continued arguments are aligned with the first argument."
511 :type '(choice integer (const nil)) 506 :type '(choice integer (const nil))
512 :group 'perl) 507 :group 'perl)
513 508
509(defcustom perl-indent-parens-as-block nil
510 "Non-nil means that non-block ()-, {}- and []-groups are indented as blocks.
511The closing bracket is aligned with the line of the opening bracket,
512not the contents of the brackets."
513 :version "24.2"
514 :type 'boolean
515 :group 'perl)
516
514(defcustom perl-tab-always-indent tab-always-indent 517(defcustom perl-tab-always-indent tab-always-indent
515 "Non-nil means TAB in Perl mode always indents the current line. 518 "Non-nil means TAB in Perl mode always indents the current line.
516Otherwise it inserts a tab character if you type it past the first 519Otherwise it inserts a tab character if you type it past the first
@@ -853,7 +856,8 @@ Optional argument PARSE-START should be the position of `beginning-of-defun'."
853 (cond ((nth 3 state) 'noindent) ; In a quoted string? 856 (cond ((nth 3 state) 'noindent) ; In a quoted string?
854 ((null containing-sexp) ; Line is at top level. 857 ((null containing-sexp) ; Line is at top level.
855 (skip-chars-forward " \t\f") 858 (skip-chars-forward " \t\f")
856 (if (= (following-char) ?{) 859 (if (memq (following-char)
860 (if perl-indent-parens-as-block '(?\{ ?\( ?\[) '(?\{)))
857 0 ; move to beginning of line if it starts a function body 861 0 ; move to beginning of line if it starts a function body
858 ;; indent a little if this is a continuation line 862 ;; indent a little if this is a continuation line
859 (perl-backward-to-noncomment) 863 (perl-backward-to-noncomment)
@@ -897,7 +901,9 @@ Optional argument PARSE-START should be the position of `beginning-of-defun'."
897 0 perl-continued-statement-offset) 901 0 perl-continued-statement-offset)
898 (current-column) 902 (current-column)
899 (if (save-excursion (goto-char indent-point) 903 (if (save-excursion (goto-char indent-point)
900 (looking-at "[ \t]*{")) 904 (looking-at
905 (if perl-indent-parens-as-block
906 "[ \t]*[{(\[]" "[ \t]*{")))
901 perl-continued-brace-offset 0))) 907 perl-continued-brace-offset 0)))
902 ;; This line starts a new statement. 908 ;; This line starts a new statement.
903 ;; Position at last unclosed open. 909 ;; Position at last unclosed open.
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index f7566c31b41..2922330e6f9 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -69,11 +69,7 @@
69(require 'comint) 69(require 'comint)
70(require 'ansi-color) 70(require 'ansi-color)
71 71
72(eval-when-compile 72(eval-when-compile (require 'compile))
73 (require 'compile)
74 (require 'hippie-exp))
75
76(autoload 'comint-mode "comint")
77 73
78(defgroup python nil 74(defgroup python nil
79 "Silly walks in the Python language." 75 "Silly walks in the Python language."
@@ -1488,8 +1484,6 @@ Don't save anything for STR matching `inferior-python-filter-regexp'."
1488 res) 1484 res)
1489 (t (concat res s))))) 1485 (t (concat res s)))))
1490 1486
1491(autoload 'comint-check-proc "comint")
1492
1493(defvar python-version-checked nil) 1487(defvar python-version-checked nil)
1494(defun python-check-version (cmd) 1488(defun python-check-version (cmd)
1495 "Check that CMD runs a suitable version of Python." 1489 "Check that CMD runs a suitable version of Python."
@@ -1684,8 +1678,6 @@ value to determine defaults."
1684 "Caches (directory . file) pair used in the last `python-load-file' command. 1678 "Caches (directory . file) pair used in the last `python-load-file' command.
1685Used for determining the default in the next one.") 1679Used for determining the default in the next one.")
1686 1680
1687(autoload 'comint-get-source "comint")
1688
1689(defun python-load-file (file-name) 1681(defun python-load-file (file-name)
1690 "Load a Python file FILE-NAME into the inferior Python process. 1682 "Load a Python file FILE-NAME into the inferior Python process.
1691If the file has extension `.py' import or reload it as a module. 1683If the file has extension `.py' import or reload it as a module.
@@ -1776,7 +1768,7 @@ will."
1776 ;; allow C-c C-f in help buffer. 1768 ;; allow C-c C-f in help buffer.
1777 (let ((temp-buffer-show-hook ; avoid xref stuff 1769 (let ((temp-buffer-show-hook ; avoid xref stuff
1778 (lambda () 1770 (lambda ()
1779 (toggle-read-only 1) 1771 (setq buffer-read-only t)
1780 (setq view-return-to-alist 1772 (setq view-return-to-alist
1781 (list (cons (selected-window) help-return-method)))))) 1773 (list (cons (selected-window) help-return-method))))))
1782 (with-output-to-temp-buffer (help-buffer) 1774 (with-output-to-temp-buffer (help-buffer)
@@ -1959,7 +1951,7 @@ the string's indentation."
1959 ;; paragraph in a multi-line string properly, so narrow 1951 ;; paragraph in a multi-line string properly, so narrow
1960 ;; to the string and then fill around (the end of) the 1952 ;; to the string and then fill around (the end of) the
1961 ;; current line. 1953 ;; current line.
1962 ((eq t (nth 3 syntax)) ; in fenced string 1954 ((nth 3 syntax) ; in fenced string
1963 (goto-char (nth 8 syntax)) ; string start 1955 (goto-char (nth 8 syntax)) ; string start
1964 (setq start (line-beginning-position)) 1956 (setq start (line-beginning-position))
1965 (setq end (condition-case () ; for unbalanced quotes 1957 (setq end (condition-case () ; for unbalanced quotes
diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el
index c8ef8f0324c..0139795dd38 100644
--- a/lisp/progmodes/verilog-mode.el
+++ b/lisp/progmodes/verilog-mode.el
@@ -3592,7 +3592,7 @@ Key bindings specific to `verilog-mode-map' are:
3592 (set (make-local-variable 'imenu-generic-expression) 3592 (set (make-local-variable 'imenu-generic-expression)
3593 verilog-imenu-generic-expression) 3593 verilog-imenu-generic-expression)
3594 ;; Tell which-func-modes that imenu knows about verilog 3594 ;; Tell which-func-modes that imenu knows about verilog
3595 (when (boundp 'which-func-modes) 3595 (when (and (boundp 'which-func-modes) (listp which-func-modes))
3596 (add-to-list 'which-func-modes 'verilog-mode)) 3596 (add-to-list 'which-func-modes 'verilog-mode))
3597 ;; hideshow support 3597 ;; hideshow support
3598 (when (boundp 'hs-special-modes-alist) 3598 (when (boundp 'hs-special-modes-alist)
diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el
index 721c610517a..c8435c14ea2 100644
--- a/lisp/progmodes/which-func.el
+++ b/lisp/progmodes/which-func.el
@@ -1,6 +1,6 @@
1;;; which-func.el --- print current function in mode line 1;;; which-func.el --- print current function in mode line
2 2
3;; Copyright (C) 1994, 1997-1998, 2001-2012 Free Software Foundation, Inc. 3;; Copyright (C) 1994, 1997-1998, 2001-2012 Free Software Foundation, Inc.
4 4
5;; Author: Alex Rezinsky <alexr@msil.sps.mot.com> 5;; Author: Alex Rezinsky <alexr@msil.sps.mot.com>
6;; (doesn't seem to be responsive any more) 6;; (doesn't seem to be responsive any more)
@@ -72,14 +72,15 @@
72 :group 'tools 72 :group 'tools
73 :version "20.3") 73 :version "20.3")
74 74
75(defcustom which-func-modes 75(defcustom which-func-modes t
76 '(emacs-lisp-mode c-mode c++-mode perl-mode cperl-mode python-mode 76 ;; '(emacs-lisp-mode c-mode c++-mode objc-mode perl-mode cperl-mode python-mode
77 makefile-mode sh-mode fortran-mode f90-mode ada-mode 77 ;; makefile-mode sh-mode fortran-mode f90-mode ada-mode
78 diff-mode) 78 ;; diff-mode)
79 "List of major modes for which Which Function mode should be used. 79 "List of major modes for which Which Function mode should be used.
80For other modes it is disabled. If this is equal to t, 80For other modes it is disabled. If this is equal to t,
81then Which Function mode is enabled in any major mode that supports it." 81then Which Function mode is enabled in any major mode that supports it."
82 :group 'which-func 82 :group 'which-func
83 :version "24.2" ; explicit list -> t
83 :type '(choice (const :tag "All modes" t) 84 :type '(choice (const :tag "All modes" t)
84 (repeat (symbol :tag "Major mode")))) 85 (repeat (symbol :tag "Major mode"))))
85 86
diff --git a/lisp/recentf.el b/lisp/recentf.el
index 8b0b36cdddc..636110f41de 100644
--- a/lisp/recentf.el
+++ b/lisp/recentf.el
@@ -1061,6 +1061,8 @@ Go to the beginning of buffer if not found."
1061 (let ((km (copy-keymap recentf--shortcuts-keymap))) 1061 (let ((km (copy-keymap recentf--shortcuts-keymap)))
1062 (set-keymap-parent km widget-keymap) 1062 (set-keymap-parent km widget-keymap)
1063 (define-key km "q" 'recentf-cancel-dialog) 1063 (define-key km "q" 'recentf-cancel-dialog)
1064 (define-key km "n" 'next-line)
1065 (define-key km "p" 'previous-line)
1064 (define-key km [follow-link] "\C-m") 1066 (define-key km [follow-link] "\C-m")
1065 km) 1067 km)
1066 "Keymap used in recentf dialogs.") 1068 "Keymap used in recentf dialogs.")
diff --git a/lisp/scroll-all.el b/lisp/scroll-all.el
index 9ff0a61db2f..fed886c2b55 100644
--- a/lisp/scroll-all.el
+++ b/lisp/scroll-all.el
@@ -111,7 +111,6 @@ one window apply to all visible windows in the same frame."
111 nil " *SL*" nil 111 nil " *SL*" nil
112 :global t 112 :global t
113 :group 'windows 113 :group 'windows
114 :group 'scrolling
115 (if scroll-all-mode 114 (if scroll-all-mode
116 (add-hook 'post-command-hook 'scroll-all-check-to-scroll) 115 (add-hook 'post-command-hook 'scroll-all-check-to-scroll)
117 (remove-hook 'post-command-hook 'scroll-all-check-to-scroll))) 116 (remove-hook 'post-command-hook 'scroll-all-check-to-scroll)))
diff --git a/lisp/server.el b/lisp/server.el
index 404bebc4747..1e2f458ac9c 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -139,6 +139,32 @@ directory residing in a NTFS partition instead."
139;;;###autoload 139;;;###autoload
140(put 'server-auth-dir 'risky-local-variable t) 140(put 'server-auth-dir 'risky-local-variable t)
141 141
142(defcustom server-auth-key nil
143 "Server authentication key.
144
145Normally, the authentication key is randomly generated when the
146server starts, which guarantees some level of security. It is
147recommended to leave it that way. Using a long-lived shared key
148will decrease security (especially since the key is transmitted as
149plain text).
150
151In some situations however, it can be difficult to share randomly
152generated passwords with remote hosts (eg. no shared directory),
153so you can set the key with this variable and then copy the
154server file to the remote host (with possible changes to IP
155address and/or port if that applies).
156
157The key must consist of 64 ASCII printable characters except for
158space (this means characters from ! to ~; or from code 33 to 126).
159
160You can use \\[server-generate-key] to get a random authentication
161key."
162 :group 'server
163 :type '(choice
164 (const :tag "Random" nil)
165 (string :tag "Password"))
166 :version "24.2")
167
142(defcustom server-raise-frame t 168(defcustom server-raise-frame t
143 "If non-nil, raise frame when switching to a buffer." 169 "If non-nil, raise frame when switching to a buffer."
144 :group 'server 170 :group 'server
@@ -494,41 +520,62 @@ Creates the directory if necessary and makes sure:
494 ;; Check that it's safe for use. 520 ;; Check that it's safe for use.
495 (let* ((uid (nth 2 attrs)) 521 (let* ((uid (nth 2 attrs))
496 (w32 (eq system-type 'windows-nt)) 522 (w32 (eq system-type 'windows-nt))
497 (safe (catch :safe 523 (safe (cond
498 (unless (eq t (car attrs)) ; is a dir? 524 ((not (eq t (car attrs))) nil) ; is a dir?
499 (throw :safe nil)) 525 ((and w32 (zerop uid)) ; on FAT32?
500 (when (and w32 (zerop uid)) ; on FAT32? 526 (display-warning
501 (display-warning 527 'server
502 'server 528 (format "Using `%s' to store Emacs-server authentication files.
503 (format "Using `%s' to store Emacs-server authentication files.
504Directories on FAT32 filesystems are NOT secure against tampering. 529Directories on FAT32 filesystems are NOT secure against tampering.
505See variable `server-auth-dir' for details." 530See variable `server-auth-dir' for details."
506 (file-name-as-directory dir)) 531 (file-name-as-directory dir))
507 :warning) 532 :warning)
508 (throw :safe t)) 533 t)
509 (unless (or (= uid (user-uid)) ; is the dir ours? 534 ((and (/= uid (user-uid)) ; is the dir ours?
510 (and w32 535 (or (not w32)
511 ;; Files created on Windows by 536 ;; Files created on Windows by Administrator
512 ;; Administrator (RID=500) have 537 ;; (RID=500) have the Administrators (RID=544)
513 ;; the Administrators (RID=544) 538 ;; group recorded as the owner.
514 ;; group recorded as the owner. 539 (/= uid 544) (/= (user-uid) 500)))
515 (= uid 544) (= (user-uid) 500))) 540 nil)
516 (throw :safe nil)) 541 (w32 t) ; on NTFS?
517 (when w32 ; on NTFS? 542 (t ; else, check permissions
518 (throw :safe t)) 543 (zerop (logand ?\077 (file-modes dir)))))))
519 (unless (zerop (logand ?\077 (file-modes dir)))
520 (throw :safe nil))
521 t)))
522 (unless safe 544 (unless safe
523 (error "The directory `%s' is unsafe" dir))))) 545 (error "The directory `%s' is unsafe" dir)))))
524 546
547(defun server-generate-key ()
548 "Generate and return a random authentication key.
549The key is a 64-byte string of random chars in the range `!'..`~'.
550If called interactively, also inserts it into current buffer."
551 (interactive)
552 (let ((auth-key
553 (loop repeat 64
554 collect (+ 33 (random 94)) into auth
555 finally return (concat auth))))
556 (if (called-interactively-p 'interactive)
557 (insert auth-key))
558 auth-key))
559
560(defun server-get-auth-key ()
561 "Return server's authentication key.
562
563If `server-auth-key' is nil, just call `server-generate-key'.
564Otherwise, if `server-auth-key' is a valid key, return it.
565If the key is not valid, signal an error."
566 (if server-auth-key
567 (if (string-match-p "^[!-~]\\{64\\}$" server-auth-key)
568 server-auth-key
569 (error "The key '%s' is invalid" server-auth-key))
570 (server-generate-key)))
571
525;;;###autoload 572;;;###autoload
526(defun server-start (&optional leave-dead inhibit-prompt) 573(defun server-start (&optional leave-dead inhibit-prompt)
527 "Allow this Emacs process to be a server for client processes. 574 "Allow this Emacs process to be a server for client processes.
528This starts a server communications subprocess through which 575This starts a server communications subprocess through which client
529client \"editors\" can send your editing commands to this Emacs 576\"editors\" can send your editing commands to this Emacs job.
530job. To use the server, set up the program `emacsclient' in the 577To use the server, set up the program `emacsclient' in the Emacs
531Emacs distribution as your standard \"editor\". 578distribution as your standard \"editor\".
532 579
533Optional argument LEAVE-DEAD (interactively, a prefix arg) means just 580Optional argument LEAVE-DEAD (interactively, a prefix arg) means just
534kill any existing server communications subprocess. 581kill any existing server communications subprocess.
@@ -615,13 +662,7 @@ server or call `M-x server-force-delete' to forcibly disconnect it.")
615 (unless server-process (error "Could not start server process")) 662 (unless server-process (error "Could not start server process"))
616 (process-put server-process :server-file server-file) 663 (process-put server-process :server-file server-file)
617 (when server-use-tcp 664 (when server-use-tcp
618 (let ((auth-key 665 (let ((auth-key (server-get-auth-key)))
619 (loop
620 ;; The auth key is a 64-byte string of random chars in the
621 ;; range `!'..`~'.
622 repeat 64
623 collect (+ 33 (random 94)) into auth
624 finally return (concat auth))))
625 (process-put server-process :auth-key auth-key) 666 (process-put server-process :auth-key auth-key)
626 (with-temp-file server-file 667 (with-temp-file server-file
627 (set-buffer-multibyte nil) 668 (set-buffer-multibyte nil)
@@ -780,10 +821,6 @@ This handles splitting the command if it would be bigger than
780 (select-frame frame) 821 (select-frame frame)
781 (process-put proc 'frame frame) 822 (process-put proc 'frame frame)
782 (process-put proc 'terminal (frame-terminal frame)) 823 (process-put proc 'terminal (frame-terminal frame))
783
784 ;; Display *scratch* by default.
785 (switch-to-buffer (get-buffer-create "*scratch*") 'norecord)
786
787 frame)) 824 frame))
788 825
789(defun server-create-window-system-frame (display nowait proc parent-id 826(defun server-create-window-system-frame (display nowait proc parent-id
@@ -816,9 +853,6 @@ This handles splitting the command if it would be bigger than
816 (select-frame frame) 853 (select-frame frame)
817 (process-put proc 'frame frame) 854 (process-put proc 'frame frame)
818 (process-put proc 'terminal (frame-terminal frame)) 855 (process-put proc 'terminal (frame-terminal frame))
819
820 ;; Display *scratch* by default.
821 (switch-to-buffer (get-buffer-create "*scratch*") 'norecord)
822 frame))) 856 frame)))
823 857
824(defun server-goto-toplevel (proc) 858(defun server-goto-toplevel (proc)
@@ -1042,8 +1076,9 @@ The following commands are accepted by the client:
1042 1076
1043 ;; -window-system: Open a new X frame. 1077 ;; -window-system: Open a new X frame.
1044 (`"-window-system" 1078 (`"-window-system"
1045 (setq dontkill t) 1079 (if (fboundp 'x-create-frame)
1046 (setq tty-name 'window-system)) 1080 (setq dontkill t
1081 tty-name 'window-system)))
1047 1082
1048 ;; -resume: Resume a suspended tty frame. 1083 ;; -resume: Resume a suspended tty frame.
1049 (`"-resume" 1084 (`"-resume"
@@ -1071,7 +1106,8 @@ The following commands are accepted by the client:
1071 (setq dontkill t) 1106 (setq dontkill t)
1072 (pop args-left)) 1107 (pop args-left))
1073 1108
1074 ;; -tty DEVICE-NAME TYPE: Open a new tty frame at the client. 1109 ;; -tty DEVICE-NAME TYPE: Open a new tty frame.
1110 ;; (But if we see -window-system later, use that.)
1075 (`"-tty" 1111 (`"-tty"
1076 (setq tty-name (pop args-left) 1112 (setq tty-name (pop args-left)
1077 tty-type (pop args-left) 1113 tty-type (pop args-left)
@@ -1133,6 +1169,13 @@ The following commands are accepted by the client:
1133 ;; Unknown command. 1169 ;; Unknown command.
1134 (arg (error "Unknown command: %s" arg)))) 1170 (arg (error "Unknown command: %s" arg))))
1135 1171
1172 ;; If both -no-wait and -tty are given with file or sexp
1173 ;; arguments, use an existing frame.
1174 (and nowait
1175 (not (eq tty-name 'window-system))
1176 (or files commands)
1177 (setq use-current-frame t))
1178
1136 (setq frame 1179 (setq frame
1137 (cond 1180 (cond
1138 ((and use-current-frame 1181 ((and use-current-frame
@@ -1182,12 +1225,17 @@ The following commands are accepted by the client:
1182 ;; including code that needs to wait. 1225 ;; including code that needs to wait.
1183 (with-local-quit 1226 (with-local-quit
1184 (condition-case err 1227 (condition-case err
1185 (let* ((buffers 1228 (let ((buffers (server-visit-files files proc nowait)))
1186 (when files
1187 (server-visit-files files proc nowait))))
1188
1189 (mapc 'funcall (nreverse commands)) 1229 (mapc 'funcall (nreverse commands))
1190 1230
1231 ;; If we were told only to open a new client, obey
1232 ;; `initial-buffer-choice' if it specifies a file.
1233 (unless (or files commands)
1234 (if (stringp initial-buffer-choice)
1235 (find-file initial-buffer-choice)
1236 (switch-to-buffer (get-buffer-create "*scratch*")
1237 'norecord)))
1238
1191 ;; Delete the client if necessary. 1239 ;; Delete the client if necessary.
1192 (cond 1240 (cond
1193 (nowait 1241 (nowait
diff --git a/lisp/ses.el b/lisp/ses.el
index 0638fc344c7..da18046c953 100644
--- a/lisp/ses.el
+++ b/lisp/ses.el
@@ -282,6 +282,9 @@ default printer and then modify its output.")
282 ses--numcols ses--numrows ses--symbolic-formulas 282 ses--numcols ses--numrows ses--symbolic-formulas
283 ses--data-marker ses--params-marker (ses--Dijkstra-attempt-nb . 0) 283 ses--data-marker ses--params-marker (ses--Dijkstra-attempt-nb . 0)
284 ses--Dijkstra-weight-bound 284 ses--Dijkstra-weight-bound
285 ;; This list is useful to speed-up clean-up of symbols when
286 ;; an area containing renamed cell is deleted.
287 ses--renamed-cell-symb-list
285 ;; Global variables that we override 288 ;; Global variables that we override
286 mode-line-process next-line-add-newlines transient-mark-mode) 289 mode-line-process next-line-add-newlines transient-mark-mode)
287 "Buffer-local variables used by SES.") 290 "Buffer-local variables used by SES.")
@@ -674,6 +677,17 @@ for this spreadsheet."
674 (put sym 'ses-cell (cons xrow xcol)) 677 (put sym 'ses-cell (cons xrow xcol))
675 (make-local-variable sym))))) 678 (make-local-variable sym)))))
676 679
680(defun ses-create-cell-variable (sym row col)
681 "Create a buffer-local variable `SYM' for cell at position (ROW, COL).
682
683SYM is the symbol for that variable, ROW and COL are integers for
684row and column of the cell, with numbering starting from 0.
685
686Return nil in case of failure."
687 (unless (local-variable-p sym)
688 (make-local-variable sym)
689 (put sym 'ses-cell (cons row col))))
690
677;; We do not delete the ses-cell properties for the cell-variables, in 691;; We do not delete the ses-cell properties for the cell-variables, in
678;; case a formula that refers to this cell is in the kill-ring and is 692;; case a formula that refers to this cell is in the kill-ring and is
679;; later pasted back in. 693;; later pasted back in.
@@ -682,7 +696,10 @@ for this spreadsheet."
682 (let (sym) 696 (let (sym)
683 (dotimes (row (1+ (- maxrow minrow))) 697 (dotimes (row (1+ (- maxrow minrow)))
684 (dotimes (col (1+ (- maxcol mincol))) 698 (dotimes (col (1+ (- maxcol mincol)))
685 (setq sym (ses-create-cell-symbol (+ row minrow) (+ col mincol))) 699 (let ((xrow (+ row minrow)) (xcol (+ col mincol)))
700 (setq sym (if (and (< xrow ses--numrows) (< xcol ses--numcols))
701 (ses-cell-symbol xrow xcol)
702 (ses-create-cell-symbol xrow xcol))))
686 (if (boundp sym) 703 (if (boundp sym)
687 (push `(apply ses-set-with-undo ,sym ,(symbol-value sym)) 704 (push `(apply ses-set-with-undo ,sym ,(symbol-value sym))
688 buffer-undo-list)) 705 buffer-undo-list))
@@ -1400,7 +1417,8 @@ removed. Example:
1400Sets `ses-relocate-return' to 'delete if cell-references were removed." 1417Sets `ses-relocate-return' to 'delete if cell-references were removed."
1401 (let (rowcol result) 1418 (let (rowcol result)
1402 (if (or (atom formula) (eq (car formula) 'quote)) 1419 (if (or (atom formula) (eq (car formula) 'quote))
1403 (if (setq rowcol (ses-sym-rowcol formula)) 1420 (if (and (setq rowcol (ses-sym-rowcol formula))
1421 (string-match "\\`[A-Z]+[0-9]+\\'" (symbol-name formula)))
1404 (ses-relocate-symbol formula rowcol 1422 (ses-relocate-symbol formula rowcol
1405 startrow startcol rowincr colincr) 1423 startrow startcol rowincr colincr)
1406 formula) ; Pass through as-is. 1424 formula) ; Pass through as-is.
@@ -1508,14 +1526,15 @@ if the range was altered."
1508the rectangle (MINROW,MINCOL)..(NUMROWS,NUMCOLS) by adding ROWINCR and COLINCR 1526the rectangle (MINROW,MINCOL)..(NUMROWS,NUMCOLS) by adding ROWINCR and COLINCR
1509to each symbol." 1527to each symbol."
1510 (let (reform) 1528 (let (reform)
1511 (let (mycell newval) 1529 (let (mycell newval xrow)
1512 (dotimes-with-progress-reporter 1530 (dotimes-with-progress-reporter
1513 (row ses--numrows) "Relocating formulas..." 1531 (row ses--numrows) "Relocating formulas..."
1514 (dotimes (col ses--numcols) 1532 (dotimes (col ses--numcols)
1515 (setq ses-relocate-return nil 1533 (setq ses-relocate-return nil
1516 mycell (ses-get-cell row col) 1534 mycell (ses-get-cell row col)
1517 newval (ses-relocate-formula (ses-cell-formula mycell) 1535 newval (ses-relocate-formula (ses-cell-formula mycell)
1518 minrow mincol rowincr colincr)) 1536 minrow mincol rowincr colincr)
1537 xrow (- row rowincr))
1519 (ses-set-cell row col 'formula newval) 1538 (ses-set-cell row col 'formula newval)
1520 (if (eq ses-relocate-return 'range) 1539 (if (eq ses-relocate-return 'range)
1521 ;; This cell contains a (ses-range X Y) where a cell has been 1540 ;; This cell contains a (ses-range X Y) where a cell has been
@@ -1531,8 +1550,22 @@ to each symbol."
1531 minrow mincol rowincr colincr)) 1550 minrow mincol rowincr colincr))
1532 (ses-set-cell row col 'references newval) 1551 (ses-set-cell row col 'references newval)
1533 (and (>= row minrow) (>= col mincol) 1552 (and (>= row minrow) (>= col mincol)
1534 (ses-set-cell row col 'symbol 1553 (let ((sym (ses-cell-symbol row col))
1535 (ses-create-cell-symbol row col)))))) 1554 (xcol (- col colincr)))
1555 (if (and
1556 sym
1557 (>= xrow 0)
1558 (>= xcol 0)
1559 (null (eq sym
1560 (ses-create-cell-symbol xrow xcol))))
1561 ;; This is a renamed cell, do not update the cell
1562 ;; name, but just update the coordinate property.
1563 (put sym 'ses-cell (cons row col))
1564 (ses-set-cell row col 'symbol
1565 (setq sym (ses-create-cell-symbol row col)))
1566 (unless (and (boundp sym) (local-variable-p sym))
1567 (set (make-local-variable sym) nil)
1568 (put sym 'ses-cell (cons row col)))))) )))
1536 ;; Relocate the cell values. 1569 ;; Relocate the cell values.
1537 (let (oldval myrow mycol xrow xcol) 1570 (let (oldval myrow mycol xrow xcol)
1538 (cond 1571 (cond
@@ -1545,11 +1578,17 @@ to each symbol."
1545 (setq mycol (+ col mincol) 1578 (setq mycol (+ col mincol)
1546 xrow (- myrow rowincr) 1579 xrow (- myrow rowincr)
1547 xcol (- mycol colincr)) 1580 xcol (- mycol colincr))
1548 (if (and (< xrow ses--numrows) (< xcol ses--numcols)) 1581 (let ((sym (ses-cell-symbol myrow mycol))
1549 (setq oldval (ses-cell-value xrow xcol)) 1582 (xsym (ses-create-cell-symbol xrow xcol)))
1550 ;; Cell is off the end of the array. 1583 ;; Make the value relocation only when if the cell is not
1551 (setq oldval (symbol-value (ses-create-cell-symbol xrow xcol)))) 1584 ;; a renamed cell. Otherwise this is not needed.
1552 (ses-set-cell myrow mycol 'value oldval)))) 1585 (and (eq sym xsym)
1586 (ses-set-cell myrow mycol 'value
1587 (if (and (< xrow ses--numrows) (< xcol ses--numcols))
1588 (ses-cell-value xrow xcol)
1589 ;;Cell is off the end of the array
1590 (symbol-value xsym))))))))
1591
1553 ((and (wholenump rowincr) (wholenump colincr)) 1592 ((and (wholenump rowincr) (wholenump colincr))
1554 ;; Insertion of rows and/or columns. Run the loop backwards. 1593 ;; Insertion of rows and/or columns. Run the loop backwards.
1555 (let ((disty (1- ses--numrows)) 1594 (let ((disty (1- ses--numrows))
@@ -1659,7 +1698,6 @@ Does not execute cell formulas or print functions."
1659 (message "Upgrading from SES-1 file format"))) 1698 (message "Upgrading from SES-1 file format")))
1660 (or (= ses--file-format 2) 1699 (or (= ses--file-format 2)
1661 (error "This file needs a newer version of the SES library code")) 1700 (error "This file needs a newer version of the SES library code"))
1662 (ses-create-cell-variable-range 0 (1- ses--numrows) 0 (1- ses--numcols))
1663 ;; Initialize cell array. 1701 ;; Initialize cell array.
1664 (setq ses--cells (make-vector ses--numrows nil)) 1702 (setq ses--cells (make-vector ses--numrows nil))
1665 (dotimes (row ses--numrows) 1703 (dotimes (row ses--numrows)
@@ -1679,11 +1717,10 @@ Does not execute cell formulas or print functions."
1679 (dotimes (row ses--numrows) 1717 (dotimes (row ses--numrows)
1680 (dotimes (col ses--numcols) 1718 (dotimes (col ses--numcols)
1681 (let* ((x (read (current-buffer))) 1719 (let* ((x (read (current-buffer)))
1682 (rowcol (ses-sym-rowcol (car-safe (cdr-safe x))))) 1720 (sym (car-safe (cdr-safe x))))
1683 (or (and (looking-at "\n") 1721 (or (and (looking-at "\n")
1684 (eq (car-safe x) 'ses-cell) 1722 (eq (car-safe x) 'ses-cell)
1685 (eq row (car rowcol)) 1723 (ses-create-cell-variable sym row col))
1686 (eq col (cdr rowcol)))
1687 (error "Cell-def error")) 1724 (error "Cell-def error"))
1688 (eval x))) 1725 (eval x)))
1689 (or (looking-at "\n\n") 1726 (or (looking-at "\n\n")
@@ -3140,6 +3177,63 @@ highlighted range in the spreadsheet."
3140 (mouse-set-point event) 3177 (mouse-set-point event)
3141 (ses-insert-ses-range)) 3178 (ses-insert-ses-range))
3142 3179
3180(defun ses-replace-name-in-formula (formula old-name new-name)
3181 (let ((new-formula formula))
3182 (unless (and (consp formula)
3183 (eq (car-safe formula) 'quote))
3184 (while formula
3185 (let ((elt (car-safe formula)))
3186 (cond
3187 ((consp elt)
3188 (setcar formula (ses-replace-name-in-formula elt old-name new-name)))
3189 ((and (symbolp elt)
3190 (eq (car-safe formula) old-name))
3191 (setcar formula new-name))))
3192 (setq formula (cdr formula))))
3193 new-formula))
3194
3195(defun ses-rename-cell (new-name)
3196 "Rename current cell."
3197 (interactive "*SEnter new name: ")
3198 (ses-check-curcell)
3199 (or
3200 (and (local-variable-p new-name)
3201 (ses-sym-rowcol new-name)
3202 ;; this test is needed because ses-cell property of deleted cells
3203 ;; is not deleted in case of subsequent undo
3204 (memq new-name ses--renamed-cell-symb-list)
3205 (error "Already a cell name"))
3206 (and (boundp new-name)
3207 (null (yes-or-no-p (format "`%S' is already bound outside this buffer, continue? "
3208 new-name)))
3209 (error "Already a bound cell name")))
3210 (let* ((rowcol (ses-sym-rowcol ses--curcell))
3211 (cell (ses-get-cell (car rowcol) (cdr rowcol))))
3212 (put new-name 'ses-cell rowcol)
3213 (dolist (reference (ses-cell-references (car rowcol) (cdr rowcol)))
3214 (let* ((rowcol (ses-sym-rowcol reference))
3215 (cell (ses-get-cell (car rowcol) (cdr rowcol))))
3216 (ses-cell-set-formula (car rowcol)
3217 (cdr rowcol)
3218 (ses-replace-name-in-formula
3219 (ses-cell-formula cell)
3220 ses--curcell
3221 new-name))))
3222 (push new-name ses--renamed-cell-symb-list)
3223 (set new-name (symbol-value ses--curcell))
3224 (aset cell 0 new-name)
3225 (put ses--curcell 'ses-cell nil)
3226 (makunbound ses--curcell)
3227 (setq ses--curcell new-name)
3228 (let* ((pos (point))
3229 (inhibit-read-only t)
3230 (col (current-column))
3231 (end (save-excursion
3232 (move-to-column (1+ col))
3233 (if (eolp)
3234 (+ pos (ses-col-width col) 1)
3235 (point)))))
3236 (put-text-property pos end 'intangible new-name))) )
3143 3237
3144;;---------------------------------------------------------------------------- 3238;;----------------------------------------------------------------------------
3145;; Checking formulas for safety 3239;; Checking formulas for safety
diff --git a/lisp/simple.el b/lisp/simple.el
index 9fab1d6dd86..67f6e4eedf7 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1,6 +1,6 @@
1;;; simple.el --- basic editing commands for Emacs 1;;; simple.el --- basic editing commands for Emacs
2 2
3;; Copyright (C) 1985-1987, 1993-2012 Free Software Foundation, Inc. 3;; Copyright (C) 1985-1987, 1993-2012 Free Software Foundation, Inc.
4 4
5;; Maintainer: FSF 5;; Maintainer: FSF
6;; Keywords: internal 6;; Keywords: internal
@@ -2464,9 +2464,9 @@ COMMAND.
2464To specify a coding system for converting non-ASCII characters 2464To specify a coding system for converting non-ASCII characters
2465in the input and output to the shell command, use \\[universal-coding-system-argument] 2465in the input and output to the shell command, use \\[universal-coding-system-argument]
2466before this command. By default, the input (from the current buffer) 2466before this command. By default, the input (from the current buffer)
2467is encoded in the same coding system that will be used to save the file, 2467is encoded using coding-system specified by `process-coding-system-alist',
2468`buffer-file-coding-system'. If the output is going to replace the region, 2468falling back to `default-process-coding-system' if no match for COMMAND
2469then it is decoded from that same coding system. 2469is found in `process-coding-system-alist'.
2470 2470
2471The noninteractive arguments are START, END, COMMAND, 2471The noninteractive arguments are START, END, COMMAND,
2472OUTPUT-BUFFER, REPLACE, ERROR-BUFFER, and DISPLAY-ERROR-BUFFER. 2472OUTPUT-BUFFER, REPLACE, ERROR-BUFFER, and DISPLAY-ERROR-BUFFER.
@@ -2677,13 +2677,13 @@ value passed."
2677(defvar process-file-side-effects t 2677(defvar process-file-side-effects t
2678 "Whether a call of `process-file' changes remote files. 2678 "Whether a call of `process-file' changes remote files.
2679 2679
2680Per default, this variable is always set to `t', meaning that a 2680By default, this variable is always set to `t', meaning that a
2681call of `process-file' could potentially change any file on a 2681call of `process-file' could potentially change any file on a
2682remote host. When set to `nil', a file handler could optimize 2682remote host. When set to `nil', a file handler could optimize
2683its behavior with respect to remote file attributes caching. 2683its behavior with respect to remote file attribute caching.
2684 2684
2685This variable should never be changed by `setq'. Instead of, it 2685You should only ever change this variable with a let-binding;
2686shall be set only by let-binding.") 2686never with `setq'.")
2687 2687
2688(defun start-file-process (name buffer program &rest program-args) 2688(defun start-file-process (name buffer program &rest program-args)
2689 "Start a program in a subprocess. Return the process object for it. 2689 "Start a program in a subprocess. Return the process object for it.
@@ -3487,14 +3487,14 @@ and KILLP is t if a prefix arg was specified."
3487 "Kill up to and including ARGth occurrence of CHAR. 3487 "Kill up to and including ARGth occurrence of CHAR.
3488Case is ignored if `case-fold-search' is non-nil in the current buffer. 3488Case is ignored if `case-fold-search' is non-nil in the current buffer.
3489Goes backward if ARG is negative; error if CHAR not found." 3489Goes backward if ARG is negative; error if CHAR not found."
3490 (interactive "p\ncZap to char: ") 3490 (interactive (list (prefix-numeric-value current-prefix-arg)
3491 (read-char "Zap to char: " t)))
3491 ;; Avoid "obsolete" warnings for translation-table-for-input. 3492 ;; Avoid "obsolete" warnings for translation-table-for-input.
3492 (with-no-warnings 3493 (with-no-warnings
3493 (if (char-table-p translation-table-for-input) 3494 (if (char-table-p translation-table-for-input)
3494 (setq char (or (aref translation-table-for-input char) char)))) 3495 (setq char (or (aref translation-table-for-input char) char))))
3495 (kill-region (point) (progn 3496 (kill-region (point) (progn
3496 (search-forward (char-to-string char) nil nil arg) 3497 (search-forward (char-to-string char) nil nil arg)
3497; (goto-char (if (> arg 0) (1- (point)) (1+ (point))))
3498 (point)))) 3498 (point))))
3499 3499
3500;; kill-line and its subroutines. 3500;; kill-line and its subroutines.
@@ -4405,23 +4405,25 @@ lines."
4405;; a cleaner solution to the problem of making C-n do something 4405;; a cleaner solution to the problem of making C-n do something
4406;; useful given a tall image. 4406;; useful given a tall image.
4407(defun line-move (arg &optional noerror to-end try-vscroll) 4407(defun line-move (arg &optional noerror to-end try-vscroll)
4408 (unless (and auto-window-vscroll try-vscroll 4408 (if noninteractive
4409 ;; Only vscroll for single line moves 4409 (forward-line arg)
4410 (= (abs arg) 1) 4410 (unless (and auto-window-vscroll try-vscroll
4411 ;; But don't vscroll in a keyboard macro. 4411 ;; Only vscroll for single line moves
4412 (not defining-kbd-macro) 4412 (= (abs arg) 1)
4413 (not executing-kbd-macro) 4413 ;; But don't vscroll in a keyboard macro.
4414 (line-move-partial arg noerror to-end)) 4414 (not defining-kbd-macro)
4415 (set-window-vscroll nil 0 t) 4415 (not executing-kbd-macro)
4416 (if (and line-move-visual 4416 (line-move-partial arg noerror to-end))
4417 ;; Display-based column are incompatible with goal-column. 4417 (set-window-vscroll nil 0 t)
4418 (not goal-column) 4418 (if (and line-move-visual
4419 ;; When the text in the window is scrolled to the left, 4419 ;; Display-based column are incompatible with goal-column.
4420 ;; display-based motion doesn't make sense (because each 4420 (not goal-column)
4421 ;; logical line occupies exactly one screen line). 4421 ;; When the text in the window is scrolled to the left,
4422 (not (> (window-hscroll) 0))) 4422 ;; display-based motion doesn't make sense (because each
4423 (line-move-visual arg noerror) 4423 ;; logical line occupies exactly one screen line).
4424 (line-move-1 arg noerror to-end)))) 4424 (not (> (window-hscroll) 0)))
4425 (line-move-visual arg noerror)
4426 (line-move-1 arg noerror to-end)))))
4425 4427
4426;; Display-based alternative to line-move-1. 4428;; Display-based alternative to line-move-1.
4427;; Arg says how many lines to move. The value is t if we can move the 4429;; Arg says how many lines to move. The value is t if we can move the
diff --git a/lisp/speedbar.el b/lisp/speedbar.el
index bb1debb4552..9065d9ed131 100644
--- a/lisp/speedbar.el
+++ b/lisp/speedbar.el
@@ -1,6 +1,6 @@
1;;; speedbar --- quick access to files and tags in a frame 1;;; speedbar --- quick access to files and tags in a frame
2 2
3;; Copyright (C) 1996-2012 Free Software Foundation, Inc. 3;; Copyright (C) 1996-2012 Free Software Foundation, Inc.
4 4
5;; Author: Eric M. Ludlam <zappo@gnu.org> 5;; Author: Eric M. Ludlam <zappo@gnu.org>
6;; Keywords: file, tags, tools 6;; Keywords: file, tags, tools
@@ -1022,7 +1022,7 @@ supported at a time.
1022 (set (make-local-variable 'dframe-delete-frame-function) 1022 (set (make-local-variable 'dframe-delete-frame-function)
1023 'speedbar-handle-delete-frame) 1023 'speedbar-handle-delete-frame)
1024 ;; hscroll 1024 ;; hscroll
1025 (set (make-local-variable 'automatic-hscrolling) nil) ; Emacs 21 1025 (set (make-local-variable 'auto-hscroll-mode) nil)
1026 ;; reset the selection variable 1026 ;; reset the selection variable
1027 (setq speedbar-last-selected-file nil)) 1027 (setq speedbar-last-selected-file nil))
1028 1028
diff --git a/lisp/startup.el b/lisp/startup.el
index 518b53ccdf1..4a8af55af2f 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -1169,38 +1169,6 @@ the `--debug-init' option to view a complete error backtrace."
1169 (or mail-host-address 1169 (or mail-host-address
1170 (system-name)))))) 1170 (system-name))))))
1171 1171
1172 ;; Originally face attributes were specified via
1173 ;; `font-lock-face-attributes'. Users then changed the default
1174 ;; face attributes by setting that variable. However, we try and
1175 ;; be back-compatible and respect its value if set except for
1176 ;; faces where M-x customize has been used to save changes for the
1177 ;; face.
1178 (when (boundp 'font-lock-face-attributes)
1179 (let ((face-attributes font-lock-face-attributes))
1180 (while face-attributes
1181 (let* ((face-attribute (pop face-attributes))
1182 (face (car face-attribute)))
1183 ;; Rustle up a `defface' SPEC from a
1184 ;; `font-lock-face-attributes' entry.
1185 (unless (get face 'saved-face)
1186 (let ((foreground (nth 1 face-attribute))
1187 (background (nth 2 face-attribute))
1188 (bold-p (nth 3 face-attribute))
1189 (italic-p (nth 4 face-attribute))
1190 (underline-p (nth 5 face-attribute))
1191 face-spec)
1192 (when foreground
1193 (setq face-spec (cons ':foreground (cons foreground face-spec))))
1194 (when background
1195 (setq face-spec (cons ':background (cons background face-spec))))
1196 (when bold-p
1197 (setq face-spec (append '(:weight bold) face-spec)))
1198 (when italic-p
1199 (setq face-spec (append '(:slant italic) face-spec)))
1200 (when underline-p
1201 (setq face-spec (append '(:underline t) face-spec)))
1202 (face-spec-set face (list (list t face-spec)) nil)))))))
1203
1204 ;; If parameter have been changed in the init file which influence 1172 ;; If parameter have been changed in the init file which influence
1205 ;; face realization, clear the face cache so that new faces will 1173 ;; face realization, clear the face cache so that new faces will
1206 ;; be realized. 1174 ;; be realized.
@@ -2348,6 +2316,7 @@ A fancy display is used on graphic displays, normal otherwise."
2348 (if (or inhibit-startup-screen 2316 (if (or inhibit-startup-screen
2349 initial-buffer-choice 2317 initial-buffer-choice
2350 noninteractive 2318 noninteractive
2319 (daemonp)
2351 inhibit-x-resources) 2320 inhibit-x-resources)
2352 2321
2353 ;; Not displaying a startup screen. If 3 or more files 2322 ;; Not displaying a startup screen. If 3 or more files
@@ -2390,9 +2359,7 @@ A fancy display is used on graphic displays, normal otherwise."
2390 ;; (with-no-warnings 2359 ;; (with-no-warnings
2391 ;; (setq menubar-bindings-done t)) 2360 ;; (setq menubar-bindings-done t))
2392 2361
2393 (if (> file-count 0) 2362 (display-startup-screen (> file-count 0)))))
2394 (display-startup-screen t)
2395 (display-startup-screen nil)))))
2396 2363
2397(defun command-line-normalize-file-name (file) 2364(defun command-line-normalize-file-name (file)
2398 "Collapse multiple slashes to one, to handle non-Emacs file names." 2365 "Collapse multiple slashes to one, to handle non-Emacs file names."
diff --git a/lisp/subr.el b/lisp/subr.el
index a6ad67283be..8e296aa7422 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -678,7 +678,6 @@ Subkeymaps may be modified but are not canonicalized."
678 ;; Process the bindings starting from the end. 678 ;; Process the bindings starting from the end.
679 (dolist (binding (prog1 bindings (setq bindings ()))) 679 (dolist (binding (prog1 bindings (setq bindings ())))
680 (let* ((key (car binding)) 680 (let* ((key (car binding))
681 (item (cdr binding))
682 (oldbind (assq key bindings))) 681 (oldbind (assq key bindings)))
683 (push (if (not oldbind) 682 (push (if (not oldbind)
684 ;; The normal case: no duplicate bindings. 683 ;; The normal case: no duplicate bindings.
@@ -871,6 +870,7 @@ The normal global definition of the character C-x indirects to this keymap.")
871(defsubst eventp (obj) 870(defsubst eventp (obj)
872 "True if the argument is an event object." 871 "True if the argument is an event object."
873 (or (and (integerp obj) 872 (or (and (integerp obj)
873 ;; FIXME: Why bother?
874 ;; Filter out integers too large to be events. 874 ;; Filter out integers too large to be events.
875 ;; M is the biggest modifier. 875 ;; M is the biggest modifier.
876 (zerop (logand obj (lognot (1- (lsh ?\M-\^@ 1))))) 876 (zerop (logand obj (lognot (1- (lsh ?\M-\^@ 1)))))
@@ -1888,8 +1888,7 @@ Used from `delayed-warnings-hook' (which see)."
1888 (push warning collapsed))) 1888 (push warning collapsed)))
1889 (setq delayed-warnings-list (nreverse collapsed)))) 1889 (setq delayed-warnings-list (nreverse collapsed))))
1890 1890
1891;; At present this is only really useful for Emacs internals. 1891;; At present this is only used for Emacs internals.
1892;; Document in the lispref if it becomes generally useful.
1893;; Ref http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00085.html 1892;; Ref http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00085.html
1894(defvar delayed-warnings-hook '(collapse-delayed-warnings 1893(defvar delayed-warnings-hook '(collapse-delayed-warnings
1895 display-delayed-warnings) 1894 display-delayed-warnings)
@@ -1989,6 +1988,10 @@ obey the input decoding and translations usually done by `read-key-sequence'.
1989So escape sequences and keyboard encoding are taken into account. 1988So escape sequences and keyboard encoding are taken into account.
1990When there's an ambiguity because the key looks like the prefix of 1989When there's an ambiguity because the key looks like the prefix of
1991some sort of escape sequence, the ambiguity is resolved via `read-key-delay'." 1990some sort of escape sequence, the ambiguity is resolved via `read-key-delay'."
1991 ;; This overriding-terminal-local-map binding also happens to
1992 ;; disable quail's input methods, so although read-key-sequence
1993 ;; always inherits the input method, in practice read-key does not
1994 ;; inherit the input method (at least not if it's based on quail).
1992 (let ((overriding-terminal-local-map read-key-empty-map) 1995 (let ((overriding-terminal-local-map read-key-empty-map)
1993 (overriding-local-map nil) 1996 (overriding-local-map nil)
1994 (echo-keystrokes 0) 1997 (echo-keystrokes 0)
@@ -2093,77 +2096,45 @@ Optional DEFAULT is a default password to use instead of empty input.
2093 2096
2094This function echoes `.' for each character that the user types. 2097This function echoes `.' for each character that the user types.
2095 2098
2096The user ends with RET, LFD, or ESC. DEL or C-h rubs out.
2097C-y yanks the current kill. C-u kills line.
2098C-g quits; if `inhibit-quit' was non-nil around this function,
2099then it returns nil if the user types C-g, but `quit-flag' remains set.
2100
2101Once the caller uses the password, it can erase the password 2099Once the caller uses the password, it can erase the password
2102by doing (clear-string STRING)." 2100by doing (clear-string STRING)."
2103 (with-local-quit 2101 (if confirm
2104 (if confirm 2102 (let (success)
2105 (let (success) 2103 (while (not success)
2106 (while (not success) 2104 (let ((first (read-passwd prompt nil default))
2107 (let ((first (read-passwd prompt nil default)) 2105 (second (read-passwd "Confirm password: " nil default)))
2108 (second (read-passwd "Confirm password: " nil default))) 2106 (if (equal first second)
2109 (if (equal first second) 2107 (progn
2110 (progn 2108 (and (arrayp second) (clear-string second))
2111 (and (arrayp second) (clear-string second)) 2109 (setq success first))
2112 (setq success first)) 2110 (and (arrayp first) (clear-string first))
2113 (and (arrayp first) (clear-string first)) 2111 (and (arrayp second) (clear-string second))
2114 (and (arrayp second) (clear-string second)) 2112 (message "Password not repeated accurately; please start over")
2115 (message "Password not repeated accurately; please start over") 2113 (sit-for 1))))
2116 (sit-for 1)))) 2114 success)
2117 success) 2115 (let (minibuf)
2118 (let ((pass nil) 2116 (minibuffer-with-setup-hook
2119 ;; Copy it so that add-text-properties won't modify 2117 (lambda ()
2120 ;; the object that was passed in by the caller. 2118 (setq minibuf (current-buffer))
2121 (prompt (copy-sequence prompt)) 2119 ;; Turn off electricity.
2122 (c 0) 2120 (set (make-local-variable 'post-self-insert-hook) nil)
2123 (echo-keystrokes 0) 2121 (add-hook 'after-change-functions
2124 (cursor-in-echo-area t) 2122 (lambda (beg end _len)
2125 (message-log-max nil) 2123 (clear-this-command-keys)
2126 (stop-keys (list 'return ?\r ?\n ?\e)) 2124 (setq beg (min end (max (minibuffer-prompt-end)
2127 (rubout-keys (list 'backspace ?\b ?\177))) 2125 beg)))
2128 (add-text-properties 0 (length prompt) 2126 (dotimes (i (- end beg))
2129 minibuffer-prompt-properties prompt) 2127 (put-text-property (+ i beg) (+ 1 i beg)
2130 (while (progn (message "%s%s" 2128 'display (string ?.))))
2131 prompt 2129 nil t))
2132 (make-string (length pass) ?.)) 2130 (unwind-protect
2133 (setq c (read-key)) 2131 (read-string prompt nil
2134 (not (memq c stop-keys))) 2132 (let ((sym (make-symbol "forget-history")))
2135 (clear-this-command-keys) 2133 (set sym nil)
2136 (cond ((memq c rubout-keys) ; rubout 2134 sym)
2137 (when (> (length pass) 0) 2135 default)
2138 (let ((new-pass (substring pass 0 -1))) 2136 (when (buffer-live-p minibuf)
2139 (and (arrayp pass) (clear-string pass)) 2137 (with-current-buffer minibuf (erase-buffer))))))))
2140 (setq pass new-pass))))
2141 ((eq c ?\C-g) (keyboard-quit))
2142 ((not (numberp c)))
2143 ((= c ?\C-u) ; kill line
2144 (and (arrayp pass) (clear-string pass))
2145 (setq pass ""))
2146 ((= c ?\C-y) ; yank
2147 (let* ((str (condition-case nil
2148 (current-kill 0)
2149 (error nil)))
2150 new-pass)
2151 (when str
2152 (setq new-pass
2153 (concat pass
2154 (substring-no-properties str)))
2155 (and (arrayp pass) (clear-string pass))
2156 (setq c ?\0)
2157 (setq pass new-pass))))
2158 ((characterp c) ; insert char
2159 (let* ((new-char (char-to-string c))
2160 (new-pass (concat pass new-char)))
2161 (and (arrayp pass) (clear-string pass))
2162 (clear-string new-char)
2163 (setq c ?\0)
2164 (setq pass new-pass)))))
2165 (message nil)
2166 (or pass default "")))))
2167 2138
2168;; This should be used by `call-interactively' for `n' specs. 2139;; This should be used by `call-interactively' for `n' specs.
2169(defun read-number (prompt &optional default) 2140(defun read-number (prompt &optional default)
@@ -2336,6 +2307,8 @@ is nil and `use-dialog-box' is non-nil."
2336 (discard-input)))) 2307 (discard-input))))
2337 (let ((ret (eq answer 'act))) 2308 (let ((ret (eq answer 'act)))
2338 (unless noninteractive 2309 (unless noninteractive
2310 ;; FIXME this prints one too many spaces, since prompt
2311 ;; already ends in a space. Eg "... (y or n) y".
2339 (message "%s %s" prompt (if ret "y" "n"))) 2312 (message "%s %s" prompt (if ret "y" "n")))
2340 ret))) 2313 ret)))
2341 2314
@@ -3557,8 +3530,7 @@ of STRING.
3557To replace only the first match (if any), make REGEXP match up to \\' 3530To replace only the first match (if any), make REGEXP match up to \\'
3558and replace a sub-expression, e.g. 3531and replace a sub-expression, e.g.
3559 (replace-regexp-in-string \"\\\\(foo\\\\).*\\\\'\" \"bar\" \" foo foo\" nil nil 1) 3532 (replace-regexp-in-string \"\\\\(foo\\\\).*\\\\'\" \"bar\" \" foo foo\" nil nil 1)
3560 => \" bar foo\" 3533 => \" bar foo\""
3561"
3562 3534
3563 ;; To avoid excessive consing from multiple matches in long strings, 3535 ;; To avoid excessive consing from multiple matches in long strings,
3564 ;; don't just call `replace-match' continually. Walk down the 3536 ;; don't just call `replace-match' continually. Walk down the
diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el
index 3eb2be15698..7c95f47e0fb 100644
--- a/lisp/tar-mode.el
+++ b/lisp/tar-mode.el
@@ -549,6 +549,7 @@ MODE should be an integer which is a file mode value."
549 (define-key map "R" 'tar-rename-entry) 549 (define-key map "R" 'tar-rename-entry)
550 (define-key map "u" 'tar-unflag) 550 (define-key map "u" 'tar-unflag)
551 (define-key map "v" 'tar-view) 551 (define-key map "v" 'tar-view)
552 (define-key map "w" 'woman-tar-extract-file)
552 (define-key map "x" 'tar-expunge) 553 (define-key map "x" 'tar-expunge)
553 (define-key map "\177" 'tar-unflag-backwards) 554 (define-key map "\177" 'tar-unflag-backwards)
554 (define-key map "E" 'tar-extract-other-window) 555 (define-key map "E" 'tar-extract-other-window)
@@ -566,6 +567,8 @@ MODE should be an integer which is a file mode value."
566 (define-key map [menu-bar immediate] 567 (define-key map [menu-bar immediate]
567 (cons "Immediate" (make-sparse-keymap "Immediate"))) 568 (cons "Immediate" (make-sparse-keymap "Immediate")))
568 569
570 (define-key map [menu-bar immediate woman]
571 '("Read Man Page (WoMan)" . woman-tar-extract-file))
569 (define-key map [menu-bar immediate view] 572 (define-key map [menu-bar immediate view]
570 '("View This File" . tar-view)) 573 '("View This File" . tar-view))
571 (define-key map [menu-bar immediate display] 574 (define-key map [menu-bar immediate display]
@@ -677,6 +680,8 @@ See also: variables `tar-update-datestamp' and `tar-anal-blocksize'.
677 (fundamental-mode) 680 (fundamental-mode)
678 (signal (car err) (cdr err))))) 681 (signal (car err) (cdr err)))))
679 682
683(autoload 'woman-tar-extract-file "woman"
684 "In tar mode, run the WoMan man-page browser on this file." t)
680 685
681(define-minor-mode tar-subfile-mode 686(define-minor-mode tar-subfile-mode
682 "Minor mode for editing an element of a tar-file. 687 "Minor mode for editing an element of a tar-file.
diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el
index dedbfcbf338..76d03dd164f 100644
--- a/lisp/textmodes/artist.el
+++ b/lisp/textmodes/artist.el
@@ -1197,9 +1197,9 @@ PREV-OP-ARG are used when invoked recursively during the build-up."
1197;;; --------------------------------- 1197;;; ---------------------------------
1198 1198
1199;;;###autoload 1199;;;###autoload
1200(defun artist-mode (&optional state) 1200(define-minor-mode artist-mode
1201 "Toggle Artist mode. 1201 "Toggle Artist mode.
1202With argument STATE, turn Artist mode on if STATE is positive. 1202With argument ARG, turn Artist mode on if ARG is positive.
1203Artist lets you draw lines, squares, rectangles and poly-lines, 1203Artist lets you draw lines, squares, rectangles and poly-lines,
1204ellipses and circles with your mouse and/or keyboard. 1204ellipses and circles with your mouse and/or keyboard.
1205 1205
@@ -1388,36 +1388,24 @@ Variables
1388 1388
1389Hooks 1389Hooks
1390 1390
1391 When entering artist-mode, the hook `artist-mode-init-hook' is called. 1391 Turning the mode on or off runs `artist-mode-hook'.
1392 When quitting artist-mode, the hook `artist-mode-exit-hook' is called.
1393 1392
1394 1393
1395Keymap summary 1394Keymap summary
1396 1395
1397\\{artist-mode-map}" 1396\\{artist-mode-map}"
1398 (interactive) 1397 :init-value nil :group 'artist :lighter artist-mode-name
1399 (if (setq artist-mode 1398 :keymap artist-mode-map
1400 (if (null state) (not artist-mode) 1399 (cond ((null artist-mode)
1401 (> (prefix-numeric-value state) 0))) 1400 ;; Turn mode off
1402 (artist-mode-init) 1401 (artist-mode-exit))
1403 (artist-mode-exit))) 1402 (t
1404 1403 ;; Turn mode on
1405;; insert our minor mode string 1404 (artist-mode-init))))
1406(or (assq 'artist-mode minor-mode-alist)
1407 (setq minor-mode-alist
1408 (cons '(artist-mode artist-mode-name)
1409 minor-mode-alist)))
1410
1411;; insert our minor mode keymap
1412(or (assq 'artist-mode minor-mode-map-alist)
1413 (setq minor-mode-map-alist
1414 (cons (cons 'artist-mode artist-mode-map)
1415 minor-mode-map-alist)))
1416
1417 1405
1418;; Init and exit 1406;; Init and exit
1419(defun artist-mode-init () 1407(defun artist-mode-init ()
1420 "Init Artist mode. This will call the hook `artist-mode-init-hook'." 1408 "Init Artist mode. This will call the hook `artist-mode-hook'."
1421 ;; Set up a conversion table for mapping tabs and new-lines to spaces. 1409 ;; Set up a conversion table for mapping tabs and new-lines to spaces.
1422 ;; the last case, 0, is for the last position in buffer/region, where 1410 ;; the last case, 0, is for the last position in buffer/region, where
1423 ;; the `following-char' function returns 0. 1411 ;; the `following-char' function returns 0.
@@ -1459,15 +1447,13 @@ Keymap summary
1459 (progn 1447 (progn
1460 (picture-mode) 1448 (picture-mode)
1461 (message ""))) 1449 (message "")))
1462 (run-hooks 'artist-mode-init-hook)
1463 (artist-mode-line-show-curr-operation artist-key-is-drawing)) 1450 (artist-mode-line-show-curr-operation artist-key-is-drawing))
1464 1451
1465(defun artist-mode-exit () 1452(defun artist-mode-exit ()
1466 "Exit Artist mode. This will call the hook `artist-mode-exit-hook'." 1453 "Exit Artist mode. This will call the hook `artist-mode-hook'."
1467 (if (and artist-picture-compatibility (eq major-mode 'picture-mode)) 1454 (if (and artist-picture-compatibility (eq major-mode 'picture-mode))
1468 (picture-mode-exit)) 1455 (picture-mode-exit))
1469 (kill-local-variable 'next-line-add-newlines) 1456 (kill-local-variable 'next-line-add-newlines))
1470 (run-hooks 'artist-mode-exit-hook))
1471 1457
1472(defun artist-mode-off () 1458(defun artist-mode-off ()
1473 "Turn Artist mode off." 1459 "Turn Artist mode off."
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el
index 08254c6f5f7..d0e90c99516 100644
--- a/lisp/textmodes/fill.el
+++ b/lisp/textmodes/fill.el
@@ -1011,7 +1011,8 @@ space does not end a sentence, so don't break a line there."
1011 (if current-prefix-arg 'full)))) 1011 (if current-prefix-arg 'full))))
1012 (unless (memq justify '(t nil none full center left right)) 1012 (unless (memq justify '(t nil none full center left right))
1013 (setq justify 'full)) 1013 (setq justify 'full))
1014 (let (max beg fill-pfx) 1014 (let ((start-point (point-marker))
1015 max beg fill-pfx)
1015 (goto-char (max from to)) 1016 (goto-char (max from to))
1016 (when to-eop 1017 (when to-eop
1017 (skip-chars-backward "\n") 1018 (skip-chars-backward "\n")
@@ -1042,6 +1043,8 @@ space does not end a sentence, so don't break a line there."
1042 (setq fill-pfx 1043 (setq fill-pfx
1043 (fill-region-as-paragraph (point) end justify nosqueeze)) 1044 (fill-region-as-paragraph (point) end justify nosqueeze))
1044 (goto-char end)))) 1045 (goto-char end))))
1046 (goto-char start-point)
1047 (set-marker start-point nil)
1045 fill-pfx)) 1048 fill-pfx))
1046 1049
1047 1050
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index 24967ded154..72a3eb474f8 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -1576,10 +1576,11 @@ The buffer to mark them in is `flyspell-large-region-buffer'."
1576 (if ispell-encoding8-command 1576 (if ispell-encoding8-command
1577 (setq args 1577 (setq args
1578 (append args 1578 (append args
1579 (list 1579 (if ispell-really-hunspell
1580 (concat ispell-encoding8-command 1580 (list ispell-encoding8-command
1581 (symbol-name 1581 (upcase (symbol-name encoding)))
1582 encoding)))))) 1582 (list (concat ispell-encoding8-command
1583 (symbol-name encoding)))))))
1583 1584
1584 (let ((process-coding-system-alist (list (cons "\\.*" encoding)))) 1585 (let ((process-coding-system-alist (list (cons "\\.*" encoding))))
1585 (setq c (apply 'ispell-call-process-region beg 1586 (setq c (apply 'ispell-call-process-region beg
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index 74c32817734..53822694698 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -574,12 +574,12 @@ re-start Emacs."
574 574
575 575
576(defvar ispell-dictionary-base-alist 576(defvar ispell-dictionary-base-alist
577 '((nil 577 '((nil ; default
578 ;; The default dictionary. It may be English.aff, or any other 578 ;; The default dictionary. It may be English.aff, or any other
579 ;; dictionary depending on locale and such things. We should probably 579 ;; dictionary depending on locale and such things. We should probably
580 ;; ask ispell what dictionary it's using, but until we do that, let's 580 ;; ask ispell what dictionary it's using, but until we do that, let's
581 ;; just use an approximate regexp. 581 ;; just use a minimal regexp. [:alpha:] will later be set if possible.
582 "[[:alpha:]]" "[^[:alpha:]]" "[']" nil ("-B") nil iso-8859-1) 582 "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil iso-8859-1)
583 ("american" ; Yankee English 583 ("american" ; Yankee English
584 "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil iso-8859-1) 584 "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil iso-8859-1)
585 ("brasileiro" ; Brazilian mode 585 ("brasileiro" ; Brazilian mode
@@ -684,7 +684,8 @@ re-start Emacs."
684 ("svenska" ; Swedish mode 684 ("svenska" ; Swedish mode
685 "[A-Za-z\345\344\366\351\340\374\350\346\370\347\305\304\326\311\300\334\310\306\330\307]" 685 "[A-Za-z\345\344\366\351\340\374\350\346\370\347\305\304\326\311\300\334\310\306\330\307]"
686 "[^A-Za-z\345\344\366\351\340\374\350\346\370\347\305\304\326\311\300\334\310\306\330\307]" 686 "[^A-Za-z\345\344\366\351\340\374\350\346\370\347\305\304\326\311\300\334\310\306\330\307]"
687 "[']" nil ("-C") "~list" iso-8859-1)) 687 "[']" nil ("-C") "~list" iso-8859-1)
688 ("hebrew" "[\340\341\342\343\344\345\346\347\350\351\353\352\354\356\355\360\357\361\362\364\363\367\366\365\370\371\372]" "[^\340\341\342\343\344\345\346\347\350\351\353\352\354\356\355\360\357\361\362\364\363\367\366\365\370\371\372]" "" nil ("-B") nil cp1255))
688 "Base value for `ispell-dictionary-alist'.") 689 "Base value for `ispell-dictionary-alist'.")
689 690
690(defvar ispell-dictionary-alist nil 691(defvar ispell-dictionary-alist nil
@@ -766,6 +767,12 @@ here just for backwards compatibility.")
766(make-obsolete-variable 'ispell-aspell-supports-utf8 767(make-obsolete-variable 'ispell-aspell-supports-utf8
767 'ispell-encoding8-command "23.1") 768 'ispell-encoding8-command "23.1")
768 769
770(defvar ispell-emacs-alpha-regexp
771 (if (string-match "^[[:alpha:]]+$" "abcde")
772 "[[:alpha:]]"
773 nil)
774 "[[:alpha:]] if Emacs supports [:alpha:] regexp, nil
775otherwise (current XEmacs does not support it).")
769 776
770;;; ********************************************************************** 777;;; **********************************************************************
771;;; The following are used by ispell, and should not be changed. 778;;; The following are used by ispell, and should not be changed.
@@ -1091,8 +1098,7 @@ aspell is used along with Emacs).")
1091 (error nil)) 1098 (error nil))
1092 ispell-really-aspell 1099 ispell-really-aspell
1093 ispell-encoding8-command 1100 ispell-encoding8-command
1094 ;; XEmacs does not like [:alpha:] regexps. 1101 ispell-emacs-alpha-regexp)
1095 (string-match "^[[:alpha:]]+$" "abcde"))
1096 (unless ispell-aspell-dictionary-alist 1102 (unless ispell-aspell-dictionary-alist
1097 (ispell-find-aspell-dictionaries))) 1103 (ispell-find-aspell-dictionaries)))
1098 1104
@@ -1116,8 +1122,27 @@ aspell is used along with Emacs).")
1116 ispell-dictionary-base-alist)) 1122 ispell-dictionary-base-alist))
1117 (unless (assoc (car dict) all-dicts-alist) 1123 (unless (assoc (car dict) all-dicts-alist)
1118 (add-to-list 'all-dicts-alist dict))) 1124 (add-to-list 'all-dicts-alist dict)))
1119 (setq ispell-dictionary-alist all-dicts-alist)))) 1125 (setq ispell-dictionary-alist all-dicts-alist))
1120 1126
1127 ;; If Emacs flavor supports [:alpha:] use it for global dicts. If
1128 ;; spellchecker also supports UTF-8 via command-line option use it
1129 ;; in communication. This does not affect definitions in ~/.emacs.
1130 (if ispell-emacs-alpha-regexp
1131 (let (tmp-dicts-alist)
1132 (dolist (adict ispell-dictionary-alist)
1133 (add-to-list 'tmp-dicts-alist
1134 (list
1135 (nth 0 adict) ; dict name
1136 "[[:alpha:]]" ; casechars
1137 "[^[:alpha:]]" ; not-casechars
1138 (nth 3 adict) ; otherchars
1139 (nth 4 adict) ; many-otherchars-p
1140 (nth 5 adict) ; ispell-args
1141 (nth 6 adict) ; extended-character-mode
1142 (if ispell-encoding8-command
1143 'utf-8
1144 (nth 7 adict)))))
1145 (setq ispell-dictionary-alist tmp-dicts-alist)))))
1121 1146
1122(defun ispell-valid-dictionary-list () 1147(defun ispell-valid-dictionary-list ()
1123 "Return a list of valid dictionaries. 1148 "Return a list of valid dictionaries.
diff --git a/lisp/textmodes/picture.el b/lisp/textmodes/picture.el
index 9e8cbb216d1..191e9f3672b 100644
--- a/lisp/textmodes/picture.el
+++ b/lisp/textmodes/picture.el
@@ -63,15 +63,17 @@
63 63
64;; Picture Movement Commands 64;; Picture Movement Commands
65 65
66;; When a cursor is on a wide-column character (e.g. Chinese, 66(defvar picture-desired-column 0
67;; Japanese, Korean), this variable tells the desired current column 67 "Desired current column for Picture mode.
68;; which may be different from (current-column). 68When a cursor is on a wide-column character (e.g. Chinese,
69(defvar picture-desired-column 0) 69Japanese, Korean), this may may be different from `current-column'.")
70 70
71;; If the value of picture-desired-column is far from the current 71
72;; column, or if the arg ADJUST-TO-CURRENT is non-nil, set it to the
73;; current column. Return the current column.
74(defun picture-update-desired-column (adjust-to-current) 72(defun picture-update-desired-column (adjust-to-current)
73 "Maybe update `picture-desired-column'.
74If the value of `picture-desired-column' is more than one column
75from `current-column', or if the argument ADJUST-TO-CURRENT is
76non-nil, set it to the current column. Return `current-column'."
75 (let ((current-column (current-column))) 77 (let ((current-column (current-column)))
76 (if (or adjust-to-current 78 (if (or adjust-to-current
77 (< picture-desired-column (1- current-column)) 79 (< picture-desired-column (1- current-column))
@@ -240,8 +242,7 @@ Use \"\\[command-apropos] picture-movement\" to see commands which control motio
240 (spacing (when (display-graphic-p frame) 242 (spacing (when (display-graphic-p frame)
241 (or (with-current-buffer (window-buffer window) 243 (or (with-current-buffer (window-buffer window)
242 line-spacing) 244 line-spacing)
243 (frame-parameter frame 'line-spacing)))) 245 (frame-parameter frame 'line-spacing)))))
244 rows cols)
245 (cond ((floatp spacing) 246 (cond ((floatp spacing)
246 (setq spacing (truncate (* spacing char-ht)))) 247 (setq spacing (truncate (* spacing char-ht))))
247 ((null spacing) 248 ((null spacing)
@@ -606,64 +607,61 @@ Leaves the region surrounding the rectangle."
606 607
607(defalias 'picture-delete-char 'delete-char) 608(defalias 'picture-delete-char 'delete-char)
608 609
609(defvar picture-mode-map nil) 610(defvar picture-mode-map
610 611 (let ((map (make-keymap)))
611(defun picture-substitute (oldfun newfun) 612 (define-key map [remap self-insert-command] 'picture-self-insert)
612 (define-key picture-mode-map (vector 'remap oldfun) newfun)) 613 (define-key map [remap self-insert-command] 'picture-self-insert)
613 614 (define-key map [remap completion-separator-self-insert-command]
614(if (not picture-mode-map) 615 'picture-self-insert)
615 (progn 616 (define-key map [remap completion-separator-self-insert-autofilling]
616 (setq picture-mode-map (make-keymap)) 617 'picture-self-insert)
617 (picture-substitute 'self-insert-command 'picture-self-insert) 618 (define-key map [remap forward-char] 'picture-forward-column)
618 (picture-substitute 'completion-separator-self-insert-command 619 (define-key map [remap backward-char] 'picture-backward-column)
619 'picture-self-insert) 620 (define-key map [remap delete-char] 'picture-clear-column)
620 (picture-substitute 'completion-separator-self-insert-autofilling 621 ;; There are two possibilities for what is normally on DEL.
621 'picture-self-insert) 622 (define-key map [remap backward-delete-char-untabify]
622 (picture-substitute 'forward-char 'picture-forward-column) 623 'picture-backward-clear-column)
623 (picture-substitute 'backward-char 'picture-backward-column) 624 (define-key map [remap delete-backward-char] 'picture-backward-clear-column)
624 (picture-substitute 'delete-char 'picture-clear-column) 625 (define-key map [remap kill-line] 'picture-clear-line)
625 ;; There are two possibilities for what is normally on DEL. 626 (define-key map [remap open-line] 'picture-open-line)
626 (picture-substitute 'backward-delete-char-untabify 'picture-backward-clear-column) 627 (define-key map [remap newline] 'picture-newline)
627 (picture-substitute 'delete-backward-char 'picture-backward-clear-column) 628 (define-key map [remap newline-and-indent] 'picture-duplicate-line)
628 (picture-substitute 'kill-line 'picture-clear-line) 629 (define-key map [remap next-line] 'picture-move-down)
629 (picture-substitute 'open-line 'picture-open-line) 630 (define-key map [remap previous-line] 'picture-move-up)
630 (picture-substitute 'newline 'picture-newline) 631 (define-key map [remap move-beginning-of-line] 'picture-beginning-of-line)
631 (picture-substitute 'newline-and-indent 'picture-duplicate-line) 632 (define-key map [remap move-end-of-line] 'picture-end-of-line)
632 (picture-substitute 'next-line 'picture-move-down) 633 (define-key map [remap mouse-set-point] 'picture-mouse-set-point)
633 (picture-substitute 'previous-line 'picture-move-up) 634 (define-key map "\C-c\C-d" 'picture-delete-char)
634 (picture-substitute 'move-beginning-of-line 'picture-beginning-of-line) 635 (define-key map "\e\t" 'picture-toggle-tab-state)
635 (picture-substitute 'move-end-of-line 'picture-end-of-line) 636 (define-key map "\t" 'picture-tab)
636 (picture-substitute 'mouse-set-point 'picture-mouse-set-point) 637 (define-key map "\e\t" 'picture-tab-search)
637 638 (define-key map "\C-c\t" 'picture-set-tab-stops)
638 (define-key picture-mode-map "\C-c\C-d" 'picture-delete-char) 639 (define-key map "\C-c\C-k" 'picture-clear-rectangle)
639 (define-key picture-mode-map "\e\t" 'picture-toggle-tab-state) 640 (define-key map "\C-c\C-w" 'picture-clear-rectangle-to-register)
640 (define-key picture-mode-map "\t" 'picture-tab) 641 (define-key map "\C-c\C-y" 'picture-yank-rectangle)
641 (define-key picture-mode-map "\e\t" 'picture-tab-search) 642 (define-key map "\C-c\C-x" 'picture-yank-rectangle-from-register)
642 (define-key picture-mode-map "\C-c\t" 'picture-set-tab-stops) 643 (define-key map "\C-c\C-r" 'picture-draw-rectangle)
643 (define-key picture-mode-map "\C-c\C-k" 'picture-clear-rectangle) 644 (define-key map "\C-c\C-c" 'picture-mode-exit)
644 (define-key picture-mode-map "\C-c\C-w" 'picture-clear-rectangle-to-register) 645 (define-key map "\C-c\C-f" 'picture-motion)
645 (define-key picture-mode-map "\C-c\C-y" 'picture-yank-rectangle) 646 (define-key map "\C-c\C-b" 'picture-motion-reverse)
646 (define-key picture-mode-map "\C-c\C-x" 'picture-yank-rectangle-from-register) 647 (define-key map "\C-c<" 'picture-movement-left)
647 (define-key picture-mode-map "\C-c\C-r" 'picture-draw-rectangle) 648 (define-key map "\C-c>" 'picture-movement-right)
648 (define-key picture-mode-map "\C-c\C-c" 'picture-mode-exit) 649 (define-key map "\C-c^" 'picture-movement-up)
649 (define-key picture-mode-map "\C-c\C-f" 'picture-motion) 650 (define-key map "\C-c." 'picture-movement-down)
650 (define-key picture-mode-map "\C-c\C-b" 'picture-motion-reverse) 651 (define-key map "\C-c`" 'picture-movement-nw)
651 (define-key picture-mode-map "\C-c<" 'picture-movement-left) 652 (define-key map "\C-c'" 'picture-movement-ne)
652 (define-key picture-mode-map "\C-c>" 'picture-movement-right) 653 (define-key map "\C-c/" 'picture-movement-sw)
653 (define-key picture-mode-map "\C-c^" 'picture-movement-up) 654 (define-key map "\C-c\\" 'picture-movement-se)
654 (define-key picture-mode-map "\C-c." 'picture-movement-down) 655 (define-key map [(control ?c) left] 'picture-movement-left)
655 (define-key picture-mode-map "\C-c`" 'picture-movement-nw) 656 (define-key map [(control ?c) right] 'picture-movement-right)
656 (define-key picture-mode-map "\C-c'" 'picture-movement-ne) 657 (define-key map [(control ?c) up] 'picture-movement-up)
657 (define-key picture-mode-map "\C-c/" 'picture-movement-sw) 658 (define-key map [(control ?c) down] 'picture-movement-down)
658 (define-key picture-mode-map "\C-c\\" 'picture-movement-se) 659 (define-key map [(control ?c) home] 'picture-movement-nw)
659 (define-key picture-mode-map [(control ?c) left] 'picture-movement-left) 660 (define-key map [(control ?c) prior] 'picture-movement-ne)
660 (define-key picture-mode-map [(control ?c) right] 'picture-movement-right) 661 (define-key map [(control ?c) end] 'picture-movement-sw)
661 (define-key picture-mode-map [(control ?c) up] 'picture-movement-up) 662 (define-key map [(control ?c) next] 'picture-movement-se)
662 (define-key picture-mode-map [(control ?c) down] 'picture-movement-down) 663 map)
663 (define-key picture-mode-map [(control ?c) home] 'picture-movement-nw) 664 "Keymap used in `picture-mode'.")
664 (define-key picture-mode-map [(control ?c) prior] 'picture-movement-ne)
665 (define-key picture-mode-map [(control ?c) end] 'picture-movement-sw)
666 (define-key picture-mode-map [(control ?c) next] 'picture-movement-se)))
667 665
668(defcustom picture-mode-hook nil 666(defcustom picture-mode-hook nil
669 "If non-nil, its value is called on entry to Picture mode. 667 "If non-nil, its value is called on entry to Picture mode.
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index 9472d7df879..af00531137a 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -1492,8 +1492,8 @@ Puts point on a blank line between them."
1492 1492
1493(defvar latex-complete-bibtex-cache nil) 1493(defvar latex-complete-bibtex-cache nil)
1494 1494
1495(defun latex-string-prefix-p (str1 str2) 1495(define-obsolete-function-alias 'latex-string-prefix-p
1496 (eq t (compare-strings str1 nil nil str2 0 (length str1)))) 1496 'string-prefix-p "24.2")
1497 1497
1498(defvar bibtex-reference-key) 1498(defvar bibtex-reference-key)
1499(declare-function reftex-get-bibfile-list "reftex-cite.el" ()) 1499(declare-function reftex-get-bibfile-list "reftex-cite.el" ())
@@ -1507,7 +1507,7 @@ Puts point on a blank line between them."
1507 keys) 1507 keys)
1508 (if (and (eq (car latex-complete-bibtex-cache) 1508 (if (and (eq (car latex-complete-bibtex-cache)
1509 (reftex-get-bibfile-list)) 1509 (reftex-get-bibfile-list))
1510 (latex-string-prefix-p (nth 1 latex-complete-bibtex-cache) 1510 (string-prefix-p (nth 1 latex-complete-bibtex-cache)
1511 key)) 1511 key))
1512 ;; Use the cache. 1512 ;; Use the cache.
1513 (setq keys (nth 2 latex-complete-bibtex-cache)) 1513 (setq keys (nth 2 latex-complete-bibtex-cache))
@@ -2051,10 +2051,7 @@ IN can be either a string (with the same % escapes in it) indicating
2051OUT describes the output file and is either a %-escaped string 2051OUT describes the output file and is either a %-escaped string
2052 or nil to indicate that there is no output file.") 2052 or nil to indicate that there is no output file.")
2053 2053
2054;; defsubst* gives better byte-code than defsubst. 2054(define-obsolete-function-alias 'tex-string-prefix-p 'string-prefix-p "24.2")
2055(defsubst* tex-string-prefix-p (str1 str2)
2056 "Return non-nil if STR1 is a prefix of STR2"
2057 (eq t (compare-strings str2 nil (length str1) str1 nil nil)))
2058 2055
2059(defun tex-guess-main-file (&optional all) 2056(defun tex-guess-main-file (&optional all)
2060 "Find a likely `tex-main-file'. 2057 "Find a likely `tex-main-file'.
@@ -2069,7 +2066,7 @@ of the current buffer."
2069 (with-current-buffer buf 2066 (with-current-buffer buf
2070 (when (and (cond 2067 (when (and (cond
2071 ((null all) (equal dir default-directory)) 2068 ((null all) (equal dir default-directory))
2072 ((eq all 'sub) (tex-string-prefix-p default-directory dir)) 2069 ((eq all 'sub) (string-prefix-p default-directory dir))
2073 (t)) 2070 (t))
2074 (stringp tex-main-file)) 2071 (stringp tex-main-file))
2075 (throw 'found (expand-file-name tex-main-file))))) 2072 (throw 'found (expand-file-name tex-main-file)))))
@@ -2078,7 +2075,7 @@ of the current buffer."
2078 (with-current-buffer buf 2075 (with-current-buffer buf
2079 (when (and (cond 2076 (when (and (cond
2080 ((null all) (equal dir default-directory)) 2077 ((null all) (equal dir default-directory))
2081 ((eq all 'sub) (tex-string-prefix-p default-directory dir)) 2078 ((eq all 'sub) (string-prefix-p default-directory dir))
2082 (t)) 2079 (t))
2083 buffer-file-name 2080 buffer-file-name
2084 ;; (or (easy-mmode-derived-mode-p 'latex-mode) 2081 ;; (or (easy-mmode-derived-mode-p 'latex-mode)
diff --git a/lisp/textmodes/two-column.el b/lisp/textmodes/two-column.el
index 40cbbc59292..8a4fe4f87fd 100644
--- a/lisp/textmodes/two-column.el
+++ b/lisp/textmodes/two-column.el
@@ -124,15 +124,51 @@
124 124
125 125
126;;; Code: 126;;; Code:
127 127(defgroup two-column nil
128 "Minor mode for editing of two-column text."
129 :prefix "2C-"
130 :group 'frames)
131
132(defcustom 2C-mode-line-format
133 '("-%*- %15b --" (-3 . "%p") "--%[(" mode-name
134 minor-mode-alist "%n" mode-line-process ")%]%-")
135 "Value of `mode-line-format' for a buffer in two-column minor mode."
136 :type 'sexp
137 :group 'two-column)
138
139(defcustom 2C-other-buffer-hook 'text-mode
140 "Hook run in new buffer when it is associated with current one."
141 :type 'function
142 :group 'two-column)
128 143
129;; Lucid patch 144(defcustom 2C-separator ""
130(or (fboundp 'frame-width) 145 "A string inserted between the two columns when merging.
131 (fset 'frame-width 'screen-width)) 146This gets set locally by \\[2C-split]."
147 :type 'string
148 :group 'two-column)
149(put '2C-separator 'permanent-local t)
150
151(defcustom 2C-window-width 40
152 "The width of the first column. (Must be at least `window-min-width'.)
153This value is local for every buffer that sets it."
154 :type 'integer
155 :group 'two-column)
156(make-variable-buffer-local '2C-window-width)
157(put '2C-window-width 'permanent-local t)
132 158
159(defcustom 2C-beyond-fill-column 4
160 "Base for calculating `fill-column' for a buffer in two-column minor mode.
161The value of `fill-column' becomes `2C-window-width' for this buffer
162minus this value."
163 :type 'integer
164 :group 'two-column)
133 165
134;;;;; Set up keymap ;;;;; 166(defcustom 2C-autoscroll t
167 "If non-nil, Emacs attempts to keep the two column's buffers aligned."
168 :type 'boolean
169 :group 'two-column)
135 170
171
136(defvar 2C-mode-map 172(defvar 2C-mode-map
137 (let ((map (make-sparse-keymap))) 173 (let ((map (make-sparse-keymap)))
138 (define-key map "2" '2C-two-columns) 174 (define-key map "2" '2C-two-columns)
@@ -142,8 +178,6 @@
142 map) 178 map)
143 "Keymap for commands for setting up two-column mode.") 179 "Keymap for commands for setting up two-column mode.")
144 180
145
146
147;;;###autoload (autoload '2C-command "two-column" () t 'keymap) 181;;;###autoload (autoload '2C-command "two-column" () t 'keymap)
148(fset '2C-command 2C-mode-map) 182(fset '2C-command 2C-mode-map)
149 183
@@ -154,7 +188,6 @@
154 188
155;;;###autoload (global-set-key [f2] '2C-command) 189;;;###autoload (global-set-key [f2] '2C-command)
156 190
157
158(defvar 2C-minor-mode-map 191(defvar 2C-minor-mode-map
159 (let ((map (make-sparse-keymap))) 192 (let ((map (make-sparse-keymap)))
160 (define-key map "1" '2C-merge) 193 (define-key map "1" '2C-merge)
@@ -167,7 +200,6 @@
167 map) 200 map)
168 "Keymap for commands for use in two-column mode.") 201 "Keymap for commands for use in two-column mode.")
169 202
170
171(setq minor-mode-map-alist 203(setq minor-mode-map-alist
172 (cons (cons '2C-mode 204 (cons (cons '2C-mode
173 (let ((map (make-sparse-keymap))) 205 (let ((map (make-sparse-keymap)))
@@ -181,15 +213,8 @@
181 map (current-global-map)) 213 map (current-global-map))
182 map)) 214 map))
183 minor-mode-map-alist)) 215 minor-mode-map-alist))
184
185;;;;; variable declarations ;;;;;
186
187(defgroup two-column nil
188 "Minor mode for editing of two-column text."
189 :prefix "2C-"
190 :group 'frames)
191
192 216
217
193;; Markers seem to be the only buffer-id not affected by renaming a buffer. 218;; Markers seem to be the only buffer-id not affected by renaming a buffer.
194;; This nevertheless loses when a buffer is killed. The variable-name is 219;; This nevertheless loses when a buffer is killed. The variable-name is
195;; required by `describe-mode'. 220;; required by `describe-mode'.
@@ -198,62 +223,8 @@
198(make-variable-buffer-local '2C-mode) 223(make-variable-buffer-local '2C-mode)
199(put '2C-mode 'permanent-local t) 224(put '2C-mode 'permanent-local t)
200 225
201
202
203(setq minor-mode-alist (cons '(2C-mode " 2C") minor-mode-alist)) 226(setq minor-mode-alist (cons '(2C-mode " 2C") minor-mode-alist))
204 227
205
206
207;; rearranged, so that the pertinent info will show in 40 columns
208(defcustom 2C-mode-line-format
209 '("-%*- %15b --" (-3 . "%p") "--%[(" mode-name
210 minor-mode-alist "%n" mode-line-process ")%]%-")
211 "Value of `mode-line-format' for a buffer in two-column minor mode."
212 :type 'sexp
213 :group 'two-column)
214
215
216(defcustom 2C-other-buffer-hook 'text-mode
217 "Hook run in new buffer when it is associated with current one."
218 :type 'function
219 :group 'two-column)
220
221
222(defcustom 2C-separator ""
223 "A string inserted between the two columns when merging.
224This gets set locally by \\[2C-split]."
225 :type 'string
226 :group 'two-column)
227(put '2C-separator 'permanent-local t)
228
229
230
231(defcustom 2C-window-width 40
232 "The width of the first column. (Must be at least `window-min-width')
233This value is local for every buffer that sets it."
234 :type 'integer
235 :group 'two-column)
236(make-variable-buffer-local '2C-window-width)
237(put '2C-window-width 'permanent-local t)
238
239
240
241(defcustom 2C-beyond-fill-column 4
242 "Base for calculating `fill-column' for a buffer in two-column minor mode.
243The value of `fill-column' becomes `2C-window-width' for this buffer
244minus this value."
245 :type 'integer
246 :group 'two-column)
247
248
249
250(defcustom 2C-autoscroll t
251 "If non-nil, Emacs attempts to keep the two column's buffers aligned."
252 :type 'boolean
253 :group 'two-column)
254
255
256
257(defvar 2C-autoscroll-start nil) 228(defvar 2C-autoscroll-start nil)
258(make-variable-buffer-local '2C-autoscroll-start) 229(make-variable-buffer-local '2C-autoscroll-start)
259 230
@@ -276,7 +247,6 @@ minus this value."
276 (if req (error "You must first set two-column minor mode")))) 247 (if req (error "You must first set two-column minor mode"))))
277 248
278 249
279
280;; function for setting up two-column minor mode in a buffer associated 250;; function for setting up two-column minor mode in a buffer associated
281;; with the buffer pointed to by the marker other. 251;; with the buffer pointed to by the marker other.
282(defun 2C-mode (other) 252(defun 2C-mode (other)
@@ -320,7 +290,6 @@ The appearance of the screen can be customized by the variables
320 (run-hooks '2C-mode-hook)) 290 (run-hooks '2C-mode-hook))
321 291
322 292
323
324;;;###autoload 293;;;###autoload
325(defun 2C-two-columns (&optional buffer) 294(defun 2C-two-columns (&optional buffer)
326 "Split current window vertically for two-column editing. 295 "Split current window vertically for two-column editing.
@@ -356,7 +325,6 @@ first and the associated buffer to its right."
356 (other-window -1))))) 325 (other-window -1)))))
357 326
358 327
359
360;;;###autoload 328;;;###autoload
361(defun 2C-associate-buffer () 329(defun 2C-associate-buffer ()
362 "Associate another buffer with this one in two-column minor mode. 330 "Associate another buffer with this one in two-column minor mode.
@@ -368,9 +336,8 @@ accepting the proposed default buffer.
368 (let ((b1 (current-buffer)) 336 (let ((b1 (current-buffer))
369 (b2 (or (2C-other) 337 (b2 (or (2C-other)
370 (read-buffer "Associate buffer: " (other-buffer))))) 338 (read-buffer "Associate buffer: " (other-buffer)))))
371 (save-excursion 339 (setq 2C-mode nil)
372 (setq 2C-mode nil) 340 (with-current-buffer b2
373 (set-buffer b2)
374 (and (2C-other) 341 (and (2C-other)
375 (not (eq b1 (2C-other))) 342 (not (eq b1 (2C-other)))
376 (error "Buffer already associated with buffer `%s'" 343 (error "Buffer already associated with buffer `%s'"
@@ -382,7 +349,6 @@ accepting the proposed default buffer.
382 (2C-two-columns b2))) 349 (2C-two-columns b2)))
383 350
384 351
385
386;;;###autoload 352;;;###autoload
387(defun 2C-split (arg) 353(defun 2C-split (arg)
388 "Split a two-column text at point, into two buffers in two-column minor mode. 354 "Split a two-column text at point, into two buffers in two-column minor mode.
@@ -454,32 +420,28 @@ First column's text sSs Second column's text
454 (move-to-column column))))) 420 (move-to-column column)))))
455 421
456 422
457
458
459(defun 2C-dissociate () 423(defun 2C-dissociate ()
460 "Turn off two-column minor mode in current and associated buffer. 424 "Turn off two-column minor mode in current and associated buffer.
461If the associated buffer is unmodified and empty, it is killed." 425If the associated buffer is unmodified and empty, it is killed."
462 (interactive) 426 (interactive)
463 (let ((buffer (current-buffer))) 427 (let ((buffer (current-buffer))
464 (save-excursion 428 (other (2C-other)))
465 (and (2C-other) 429 (if other
466 (set-buffer (2C-other)) 430 (with-current-buffer other
467 (or (not (2C-other)) 431 (when (or (not (2C-other)) (eq buffer (2C-other)))
468 (eq buffer (2C-other))) 432 (if (and (not (buffer-modified-p)) (zerop (buffer-size)))
469 (if (and (not (buffer-modified-p)) 433 (kill-buffer)
470 (eobp) (bobp)) 434 (kill-local-variable '2C-mode)
471 (kill-buffer nil) 435 (kill-local-variable '2C-window-width)
472 (kill-local-variable '2C-mode) 436 (kill-local-variable '2C-separator)
473 (kill-local-variable '2C-window-width) 437 (kill-local-variable 'mode-line-format)
474 (kill-local-variable '2C-separator) 438 (kill-local-variable 'fill-column))))))
475 (kill-local-variable 'mode-line-format) 439 (kill-local-variable '2C-mode)
476 (kill-local-variable 'fill-column)))) 440 (kill-local-variable '2C-window-width)
477 (kill-local-variable '2C-mode) 441 (kill-local-variable '2C-separator)
478 (kill-local-variable '2C-window-width) 442 (kill-local-variable 'mode-line-format)
479 (kill-local-variable '2C-separator) 443 (kill-local-variable 'fill-column)
480 (kill-local-variable 'mode-line-format) 444 (force-mode-line-update))
481 (kill-local-variable 'fill-column)))
482
483 445
484 446
485;; this doesn't use yank-rectangle, so that the first column can 447;; this doesn't use yank-rectangle, so that the first column can
@@ -578,7 +540,6 @@ on, this also realigns the two buffers."
578 (message "Autoscrolling is off."))) 540 (message "Autoscrolling is off.")))
579 541
580 542
581
582(defun 2C-autoscroll () 543(defun 2C-autoscroll ()
583 (if 2C-autoscroll 544 (if 2C-autoscroll
584 ;; catch a mouse scroll on non-selected scrollbar 545 ;; catch a mouse scroll on non-selected scrollbar
@@ -590,27 +551,25 @@ on, this also realigns the two buffers."
590 (select-window (car (car (cdr last-command-event))))) 551 (select-window (car (car (cdr last-command-event)))))
591 ;; In some cases scrolling causes an error, but post-command-hook 552 ;; In some cases scrolling causes an error, but post-command-hook
592 ;; shouldn't, and should always stay in the original window 553 ;; shouldn't, and should always stay in the original window
593 (condition-case () 554 (ignore-errors
594 (and (or 2C-autoscroll-start (2C-toggle-autoscroll t) nil) 555 (and (or 2C-autoscroll-start (2C-toggle-autoscroll t) nil)
595 (/= (window-start) 2C-autoscroll-start) 556 (/= (window-start) 2C-autoscroll-start)
596 (2C-other) 557 (2C-other)
597 (get-buffer-window (2C-other)) 558 (get-buffer-window (2C-other))
598 (let ((lines (count-lines (window-start) 559 (let ((lines (count-lines (window-start)
599 2C-autoscroll-start))) 560 2C-autoscroll-start)))
600 (if (< (window-start) 2C-autoscroll-start) 561 (if (< (window-start) 2C-autoscroll-start)
601 (setq lines (- lines))) 562 (setq lines (- lines)))
602 (setq 2C-autoscroll-start (window-start)) 563 (setq 2C-autoscroll-start (window-start))
603 (select-window (get-buffer-window (2C-other))) 564 (select-window (get-buffer-window (2C-other)))
604 ;; make sure that other buffer has enough lines 565 ;; make sure that other buffer has enough lines
605 (save-excursion 566 (save-excursion
606 (insert-char 567 (insert-char
607 ?\n (- lines (count-lines (window-start) 568 ?\n (- lines (count-lines (window-start)
608 (goto-char (point-max))) 569 (goto-char (point-max)))
609 -1))) 570 -1)))
610 (scroll-up lines) 571 (scroll-up lines)
611 (setq 2C-autoscroll-start (window-start)))) 572 (setq 2C-autoscroll-start (window-start)))))))))
612 (error))))))
613
614 573
615 574
616(defun 2C-enlarge-window-horizontally (arg) 575(defun 2C-enlarge-window-horizontally (arg)
@@ -628,7 +587,6 @@ on, this also realigns the two buffers."
628 (2C-enlarge-window-horizontally (- arg))) 587 (2C-enlarge-window-horizontally (- arg)))
629 588
630 589
631
632(provide 'two-column) 590(provide 'two-column)
633 591
634;;; two-column.el ends here 592;;; two-column.el ends here
diff --git a/lisp/tmm.el b/lisp/tmm.el
index 2a0d1d3d7de..776e4335376 100644
--- a/lisp/tmm.el
+++ b/lisp/tmm.el
@@ -165,14 +165,13 @@ Its value should be an event that has a binding in MENU."
165 ;; tmm-km-list is an alist of (STRING . MEANING). 165 ;; tmm-km-list is an alist of (STRING . MEANING).
166 ;; It has no other elements. 166 ;; It has no other elements.
167 ;; The order of elements in tmm-km-list is the order of the menu bar. 167 ;; The order of elements in tmm-km-list is the order of the menu bar.
168 (mapc (lambda (elt) 168 (dolist (elt menu)
169 (cond 169 (cond
170 ((stringp elt) (setq gl-str elt)) 170 ((stringp elt) (setq gl-str elt))
171 ((listp elt) (tmm-get-keymap elt not-menu)) 171 ((listp elt) (tmm-get-keymap elt not-menu))
172 ((vectorp elt) 172 ((vectorp elt)
173 (dotimes (i (length elt)) 173 (dotimes (i (length elt))
174 (tmm-get-keymap (cons i (aref elt i)) not-menu))))) 174 (tmm-get-keymap (cons i (aref elt i)) not-menu)))))
175 menu)
176 ;; Choose an element of tmm-km-list; put it in choice. 175 ;; Choose an element of tmm-km-list; put it in choice.
177 (if (and not-menu (= 1 (length tmm-km-list))) 176 (if (and not-menu (= 1 (length tmm-km-list)))
178 ;; If this is the top-level of an x-popup-menu menu, 177 ;; If this is the top-level of an x-popup-menu menu,
@@ -313,15 +312,13 @@ Stores a list of all the shortcuts in the free variable `tmm-short-cuts'."
313(defun tmm-define-keys (minibuffer) 312(defun tmm-define-keys (minibuffer)
314 (let ((map (make-sparse-keymap))) 313 (let ((map (make-sparse-keymap)))
315 (suppress-keymap map t) 314 (suppress-keymap map t)
316 (mapc 315 (dolist (c tmm-short-cuts)
317 (lambda (c) 316 (if (listp tmm-shortcut-style)
318 (if (listp tmm-shortcut-style) 317 (define-key map (char-to-string c) 'tmm-shortcut)
319 (define-key map (char-to-string c) 'tmm-shortcut) 318 ;; only one kind of letters are shortcuts, so map both upcase and
320 ;; only one kind of letters are shortcuts, so map both upcase and 319 ;; downcase input to the same
321 ;; downcase input to the same 320 (define-key map (char-to-string (downcase c)) 'tmm-shortcut)
322 (define-key map (char-to-string (downcase c)) 'tmm-shortcut) 321 (define-key map (char-to-string (upcase c)) 'tmm-shortcut)))
323 (define-key map (char-to-string (upcase c)) 'tmm-shortcut)))
324 tmm-short-cuts)
325 (if minibuffer 322 (if minibuffer
326 (progn 323 (progn
327 (define-key map [pageup] 'tmm-goto-completions) 324 (define-key map [pageup] 'tmm-goto-completions)
@@ -401,14 +398,13 @@ Stores a list of all the shortcuts in the free variable `tmm-short-cuts'."
401 (choose-completion)) 398 (choose-completion))
402 ;; In minibuffer 399 ;; In minibuffer
403 (delete-region (minibuffer-prompt-end) (point-max)) 400 (delete-region (minibuffer-prompt-end) (point-max))
404 (mapc (lambda (elt) 401 (dolist (elt tmm-km-list)
405 (if (string= 402 (if (string=
406 (substring (car elt) 0 403 (substring (car elt) 0
407 (min (1+ (length tmm-mid-prompt)) 404 (min (1+ (length tmm-mid-prompt))
408 (length (car elt)))) 405 (length (car elt))))
409 (concat (char-to-string c) tmm-mid-prompt)) 406 (concat (char-to-string c) tmm-mid-prompt))
410 (setq s (car elt)))) 407 (setq s (car elt))))
411 tmm-km-list)
412 (insert s) 408 (insert s)
413 (exit-minibuffer))))) 409 (exit-minibuffer)))))
414 410
@@ -540,20 +536,16 @@ of `menu-bar-final-items'."
540 (setq allbind (cons globalbind (cons localbind minorbind))) 536 (setq allbind (cons globalbind (cons localbind minorbind)))
541 537
542 ;; Merge all the elements of ALLBIND into one keymap. 538 ;; Merge all the elements of ALLBIND into one keymap.
543 (mapc (lambda (in) 539 (dolist (in allbind)
544 (if (and (symbolp in) (keymapp in)) 540 (if (and (symbolp in) (keymapp in))
545 (setq in (symbol-function in))) 541 (setq in (symbol-function in)))
546 (and in (keymapp in) 542 (and in (keymapp in)
547 (if (keymapp bind) 543 (setq bind (if (keymapp bind)
548 (setq bind (nconc bind (copy-sequence (cdr in)))) 544 (nconc bind (copy-sequence (cdr in)))
549 (setq bind (copy-sequence in))))) 545 (copy-sequence in)))))
550 allbind)
551 ;; Return that keymap. 546 ;; Return that keymap.
552 bind)))) 547 bind))))
553 548
554;; Huh? What's that about? --Stef
555(add-hook 'calendar-load-hook (lambda () (require 'cal-menu)))
556
557(provide 'tmm) 549(provide 'tmm)
558 550
559;;; tmm.el ends here 551;;; tmm.el ends here
diff --git a/lisp/tutorial.el b/lisp/tutorial.el
index b512700f5b9..e0e2a82fab9 100644
--- a/lisp/tutorial.el
+++ b/lisp/tutorial.el
@@ -585,7 +585,6 @@ with some explanatory links."
585 (not (get-text-property (match-beginning 1) 'tutorial-remark)) 585 (not (get-text-property (match-beginning 1) 'tutorial-remark))
586 (let* ((desc (car changed-key)) 586 (let* ((desc (car changed-key))
587 (ck (cdr changed-key)) 587 (ck (cdr changed-key))
588 (key (nth 0 ck))
589 (def-fun (nth 1 ck)) 588 (def-fun (nth 1 ck))
590 (where (nth 3 ck)) 589 (where (nth 3 ck))
591 s1 s2 help-string) 590 s1 s2 help-string)
@@ -724,7 +723,7 @@ See `tutorial--save-tutorial' for more information."
724 saved-file 723 saved-file
725 (error-message-string err)))) 724 (error-message-string err))))
726 ;; An error is raised here?? Is this a bug? 725 ;; An error is raised here?? Is this a bug?
727 (condition-case err 726 (condition-case nil
728 (undo-only) 727 (undo-only)
729 (error nil)) 728 (error nil))
730 ;; Restore point 729 ;; Restore point
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index d6e25188c69..3c9313e3e7d 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,3 +1,21 @@
12012-04-10 William Xu <william.xwl@gmail.com> (tiny change)
2
3 * url.el (url-retrieve-internal): Hexify multibye URL string first
4 when necessary (bug#7017).
5
62012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
7
8 * url.el (url-retrieve-internal): Mention utf-8 encoding.
9 (url-retrieve): Ditto.
10
112012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
12
13 * url-domsurf.el: New file (bug#1401).
14
15 * url-cookie.el (url-cookie-two-dot-domains): Remove.
16 (url-cookie-host-can-set-p): Use `url-domsuf-cookie-allowed-p'
17 instead of the variable above.
18
12012-03-25 Lars Magne Ingebrigtsen <larsi@gnus.org> 192012-03-25 Lars Magne Ingebrigtsen <larsi@gnus.org>
2 20
3 * url-queue.el (url-queue-kill-job): Check whether the buffer has 21 * url-queue.el (url-queue-kill-job): Check whether the buffer has
diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el
index e6ff9bf7dea..aefe8fffd0a 100644
--- a/lisp/url/url-cookie.el
+++ b/lisp/url/url-cookie.el
@@ -25,6 +25,7 @@
25 25
26(require 'url-util) 26(require 'url-util)
27(require 'url-parse) 27(require 'url-parse)
28(require 'url-domsuf)
28 29
29(eval-when-compile (require 'cl)) ; defstruct 30(eval-when-compile (require 'cl)) ; defstruct
30 31
@@ -211,14 +212,6 @@ telling Microsoft that."
211 (concat retval "\r\n") 212 (concat retval "\r\n")
212 ""))) 213 "")))
213 214
214(defvar url-cookie-two-dot-domains
215 (concat "\\.\\("
216 (mapconcat 'identity (list "com" "edu" "net" "org" "gov" "mil" "int")
217 "\\|")
218 "\\)$")
219 "A regexp of top level domains that only require two matching
220'.'s in the domain name in order to set a cookie.")
221
222(defcustom url-cookie-trusted-urls nil 215(defcustom url-cookie-trusted-urls nil
223 "A list of regular expressions matching URLs to always accept cookies from." 216 "A list of regular expressions matching URLs to always accept cookies from."
224 :type '(repeat regexp) 217 :type '(repeat regexp)
@@ -230,30 +223,18 @@ telling Microsoft that."
230 :group 'url-cookie) 223 :group 'url-cookie)
231 224
232(defun url-cookie-host-can-set-p (host domain) 225(defun url-cookie-host-can-set-p (host domain)
233 (let ((numdots 0) 226 (let ((last nil)
234 (last nil) 227 (case-fold-search t))
235 (case-fold-search t) 228 (if (string= host domain) ; Apparently netscape lets you do this
236 (mindots 3)) 229 t
237 (while (setq last (string-match "\\." domain last)) 230 ;; Remove the dot from wildcard domains before matching.
238 (setq numdots (1+ numdots) 231 (when (eq ?. (aref domain 0))
239 last (1+ last))) 232 (setq domain (substring domain 1)))
240 (if (string-match url-cookie-two-dot-domains domain) 233 (and (url-domsuf-cookie-allowed-p domain)
241 (setq mindots 2)) 234 ;; Need to check and make sure the host is actually _in_ the
242 (cond 235 ;; domain it wants to set a cookie for though.
243 ((string= host domain) ; Apparently netscape lets you do this 236 (string-match (concat (regexp-quote domain)
244 t) 237 "$") host)))))
245 ((>= numdots mindots) ; We have enough dots in domain name
246 ;; Need to check and make sure the host is actually _in_ the
247 ;; domain it wants to set a cookie for though.
248 (string-match (concat (regexp-quote
249 ;; Remove the dot from wildcard domains
250 ;; before matching.
251 (if (eq ?. (aref domain 0))
252 (substring domain 1)
253 domain))
254 "$") host))
255 (t
256 nil))))
257 238
258(defun url-cookie-handle-set-cookie (str) 239(defun url-cookie-handle-set-cookie (str)
259 (setq url-cookies-changed-since-last-save t) 240 (setq url-cookies-changed-since-last-save t)
diff --git a/lisp/url/url-domsuf.el b/lisp/url/url-domsuf.el
new file mode 100644
index 00000000000..29fc166e30b
--- /dev/null
+++ b/lisp/url/url-domsuf.el
@@ -0,0 +1,98 @@
1;;; url-domsuf.el --- Say what domain names can have cookies set.
2
3;; Copyright (C) 2012 Free Software Foundation, Inc.
4
5;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
6
7;; Keywords: comm, data, processes, hypermedia
8
9;; This file is part of GNU Emacs.
10;;
11;; GNU Emacs is free software: you can redistribute it and/or modify
12;; it under the terms of the GNU General Public License as published by
13;; the Free Software Foundation, either version 3 of the License, or
14;; (at your option) any later version.
15
16;; GNU Emacs is distributed in the hope that it will be useful,
17;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19;; GNU General Public License for more details.
20
21;; You should have received a copy of the GNU General Public License
22;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
23
24;;; Commentary:
25
26;; The rules for what domains can have cookies set is defined here:
27;; http://publicsuffix.org/list/
28
29;;; Code:
30
31(defvar url-domsuf-domains nil)
32
33(defun url-domsuf-parse-file ()
34 (with-temp-buffer
35 (insert-file-contents
36 (expand-file-name "publicsuffix.txt" data-directory))
37 (let ((domains nil)
38 domain exception)
39 (while (not (eobp))
40 (when (not (looking-at "[/\n\t ]"))
41 ;; !pref.aichi.jp means that it's allowed.
42 (if (not (eq (following-char) ?!))
43 (setq exception nil)
44 (setq exception t)
45 (forward-char 1))
46 (setq domain (buffer-substring (point) (line-end-position)))
47 (cond
48 ((string-match "\\`\\*\\." domain)
49 (setq domain (substring domain 2))
50 (push (cons domain (1+ (length (split-string domain "[.]"))))
51 domains))
52 (exception
53 (push (cons domain t) domains))
54 (t
55 (push (cons domain nil) domains))))
56 (forward-line 1))
57 (setq url-domsuf-domains (nreverse domains)))))
58
59(defun url-domsuf-cookie-allowed-p (domain)
60 (unless url-domsuf-domains
61 (url-domsuf-parse-file))
62 (let* ((allowedp t)
63 (domain-bits (split-string domain "[.]"))
64 (length (length domain-bits))
65 (upper-domain (mapconcat 'identity (cdr domain-bits) "."))
66 entry modifier)
67 (dolist (elem url-domsuf-domains)
68 (setq entry (car elem)
69 modifier (cdr elem))
70 (cond
71 ;; "com"
72 ((and (null modifier)
73 (string= domain entry))
74 (setq allowedp nil))
75 ;; "!pref.hokkaido.jp"
76 ((and (eq modifier t)
77 (string= domain entry))
78 (setq allowedp t))
79 ;; "*.ar"
80 ((and (numberp modifier)
81 (= length modifier)
82 (string= entry upper-domain))
83 (setq allowedp nil))))
84 allowedp))
85
86;; Tests:
87
88;; (url-domsuf-cookie-allowed-p "com") => nil
89;; (url-domsuf-cookie-allowed-p "foo.bar.ar") => t
90;; (url-domsuf-cookie-allowed-p "bar.ar") => nil
91;; (url-domsuf-cookie-allowed-p "co.uk") => nil
92;; (url-domsuf-cookie-allowed-p "foo.bar.hokkaido.jo") => t
93;; (url-domsuf-cookie-allowed-p "bar.hokkaido.jp") => nil
94;; (url-domsuf-cookie-allowed-p "pref.hokkaido.jp") => t
95
96(provide 'url-domsuf)
97
98;;; url-domsuf.el ends here
diff --git a/lisp/url/url-util.el b/lisp/url/url-util.el
index 848eb66e54b..d12bd5447fa 100644
--- a/lisp/url/url-util.el
+++ b/lisp/url/url-util.el
@@ -330,8 +330,7 @@ forbidden in URL encoding."
330 " ") 330 " ")
331 (t (byte-to-string code)))) 331 (t (byte-to-string code))))
332 str (substring str (match-end 0))))) 332 str (substring str (match-end 0)))))
333 (setq tmp (concat tmp str)) 333 (concat tmp str)))
334 tmp))
335 334
336(defconst url-unreserved-chars 335(defconst url-unreserved-chars
337 '( 336 '(
diff --git a/lisp/url/url.el b/lisp/url/url.el
index 5ced789e4e4..f3ef553bbce 100644
--- a/lisp/url/url.el
+++ b/lisp/url/url.el
@@ -149,7 +149,9 @@ take effect.
149 149
150If SILENT, then don't message progress reports and the like. 150If SILENT, then don't message progress reports and the like.
151If INHIBIT-COOKIES, cookies will neither be stored nor sent to 151If INHIBIT-COOKIES, cookies will neither be stored nor sent to
152the server." 152the server.
153If URL is a multibyte string, it will be encoded as utf-8 and
154URL-encoded before it's used."
153;;; XXX: There is code in Emacs that does dynamic binding 155;;; XXX: There is code in Emacs that does dynamic binding
154;;; of the following variables around url-retrieve: 156;;; of the following variables around url-retrieve:
155;;; url-standalone-mode, url-gateway-unplugged, w3-honor-stylesheets, 157;;; url-standalone-mode, url-gateway-unplugged, w3-honor-stylesheets,
@@ -171,11 +173,16 @@ the list of events, as described in the docstring of `url-retrieve'.
171 173
172If SILENT, don't message progress reports and the like. 174If SILENT, don't message progress reports and the like.
173If INHIBIT-COOKIES, cookies will neither be stored nor sent to 175If INHIBIT-COOKIES, cookies will neither be stored nor sent to
174the server." 176the server.
177If URL is a multibyte string, it will be encoded as utf-8 and
178URL-encoded before it's used."
175 (url-do-setup) 179 (url-do-setup)
176 (url-gc-dead-buffers) 180 (url-gc-dead-buffers)
177 (if (stringp url) 181 (if (stringp url)
178 (set-text-properties 0 (length url) nil url)) 182 (set-text-properties 0 (length url) nil url))
183 (when (multibyte-string-p url)
184 (let ((url-unreserved-chars (append '(?: ?/) url-unreserved-chars)))
185 (setq url (url-hexify-string url))))
179 (if (not (vectorp url)) 186 (if (not (vectorp url))
180 (setq url (url-generic-parse-url url))) 187 (setq url (url-generic-parse-url url)))
181 (if (not (functionp callback)) 188 (if (not (functionp callback))
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el
index 16e33889c31..8b6b85dd22e 100644
--- a/lisp/vc/diff-mode.el
+++ b/lisp/vc/diff-mode.el
@@ -545,7 +545,7 @@ but in the file header instead, in which case move forward to the first hunk."
545 (condition-case-unless-debug nil (diff-refine-hunk) (error nil)))) 545 (condition-case-unless-debug nil (diff-refine-hunk) (error nil))))
546 546
547(easy-mmode-define-navigation 547(easy-mmode-define-navigation
548 diff-file diff-file-header-re "file" diff-end-of-hunk) 548 diff-file diff-file-header-re "file" diff-end-of-file)
549 549
550(defun diff-restrict-view (&optional arg) 550(defun diff-restrict-view (&optional arg)
551 "Restrict the view to the current hunk. 551 "Restrict the view to the current hunk.
diff --git a/lisp/vc/pcvs-util.el b/lisp/vc/pcvs-util.el
index b300247e552..a3c525cb896 100644
--- a/lisp/vc/pcvs-util.el
+++ b/lisp/vc/pcvs-util.el
@@ -182,9 +182,7 @@ arguments. If ARGS is not a list, no argument will be passed."
182 (if oneline (line-end-position) (point-max)))) 182 (if oneline (line-end-position) (point-max))))
183 (file-error nil))) 183 (file-error nil)))
184 184
185(defun cvs-string-prefix-p (str1 str2) 185(define-obsolete-function-alias 'cvs-string-prefix-p 'string-prefix-p "24.2")
186 "Tell whether STR1 is a prefix of STR2."
187 (eq t (compare-strings str2 nil (length str1) str1 nil nil)))
188 186
189;;;; 187;;;;
190;;;; file names 188;;;; file names
diff --git a/lisp/vc/pcvs.el b/lisp/vc/pcvs.el
index 9ba65cda143..6aec24755b5 100644
--- a/lisp/vc/pcvs.el
+++ b/lisp/vc/pcvs.el
@@ -432,8 +432,8 @@ If non-nil, NEW means to create a new buffer no matter what."
432 (case cvs-reuse-cvs-buffer 432 (case cvs-reuse-cvs-buffer
433 (always t) 433 (always t)
434 (subdir 434 (subdir
435 (or (cvs-string-prefix-p default-directory dir) 435 (or (string-prefix-p default-directory dir)
436 (cvs-string-prefix-p dir default-directory))) 436 (string-prefix-p dir default-directory)))
437 (samedir (string= default-directory dir))) 437 (samedir (string= default-directory dir)))
438 (return buffer))))) 438 (return buffer)))))
439 ;; we really have to create a new buffer: 439 ;; we really have to create a new buffer:
@@ -887,7 +887,7 @@ RM-MSGS if non-nil means remove messages."
887 (eq (cvs-fileinfo->type last-fi) 'DIRCHANGE) 887 (eq (cvs-fileinfo->type last-fi) 'DIRCHANGE)
888 (not (when first-dir (setq first-dir nil) t)) 888 (not (when first-dir (setq first-dir nil) t))
889 (or (eq rm-dirs 'all) 889 (or (eq rm-dirs 'all)
890 (not (cvs-string-prefix-p 890 (not (string-prefix-p
891 (cvs-fileinfo->dir last-fi) 891 (cvs-fileinfo->dir last-fi)
892 (cvs-fileinfo->dir fi))) 892 (cvs-fileinfo->dir fi)))
893 (and (eq type 'DIRCHANGE) (eq rm-dirs 'empty)) 893 (and (eq type 'DIRCHANGE) (eq rm-dirs 'empty))
@@ -1839,7 +1839,7 @@ Signal an error if there is no backup file."
1839 (setq buffer-file-name (expand-file-name buffer-file-name)) 1839 (setq buffer-file-name (expand-file-name buffer-file-name))
1840 (let (ret) 1840 (let (ret)
1841 (dolist (fi (or fis (list (cvs-create-fileinfo 'DIRCHANGE "" "." "")))) 1841 (dolist (fi (or fis (list (cvs-create-fileinfo 'DIRCHANGE "" "." ""))))
1842 (when (cvs-string-prefix-p 1842 (when (string-prefix-p
1843 (expand-file-name (cvs-fileinfo->full-name fi) dir) 1843 (expand-file-name (cvs-fileinfo->full-name fi) dir)
1844 buffer-file-name) 1844 buffer-file-name)
1845 (setq ret t))) 1845 (setq ret t)))
@@ -2261,7 +2261,7 @@ With prefix argument, prompt for cvs flags."
2261(defun cvs-dir-member-p (fileinfo dir) 2261(defun cvs-dir-member-p (fileinfo dir)
2262 "Return true if FILEINFO represents a file in directory DIR." 2262 "Return true if FILEINFO represents a file in directory DIR."
2263 (and (not (eq (cvs-fileinfo->type fileinfo) 'DIRCHANGE)) 2263 (and (not (eq (cvs-fileinfo->type fileinfo) 'DIRCHANGE))
2264 (cvs-string-prefix-p dir (cvs-fileinfo->dir fileinfo)))) 2264 (string-prefix-p dir (cvs-fileinfo->dir fileinfo))))
2265 2265
2266(defun cvs-execute-single-file (fi extractor program constant-args) 2266(defun cvs-execute-single-file (fi extractor program constant-args)
2267 "Internal function for `cvs-execute-single-file-list'." 2267 "Internal function for `cvs-execute-single-file-list'."
@@ -2392,7 +2392,7 @@ The exact behavior is determined also by `cvs-dired-use-hook'."
2392 (set-buffer cvs-buf) 2392 (set-buffer cvs-buf)
2393 ;; look for a corresponding pcl-cvs buffer 2393 ;; look for a corresponding pcl-cvs buffer
2394 (when (and (eq major-mode 'cvs-mode) 2394 (when (and (eq major-mode 'cvs-mode)
2395 (cvs-string-prefix-p default-directory dir)) 2395 (string-prefix-p default-directory dir))
2396 (let ((subdir (substring dir (length default-directory)))) 2396 (let ((subdir (substring dir (length default-directory))))
2397 (set-buffer buffer) 2397 (set-buffer buffer)
2398 (set (make-local-variable 'cvs-buffer) cvs-buf) 2398 (set (make-local-variable 'cvs-buffer) cvs-buf)
@@ -2423,7 +2423,7 @@ The exact behavior is determined also by `cvs-dired-use-hook'."
2423 (set-buffer cvs-buf) 2423 (set-buffer cvs-buf)
2424 ;; look for a corresponding pcl-cvs buffer 2424 ;; look for a corresponding pcl-cvs buffer
2425 (when (and (eq major-mode 'cvs-mode) 2425 (when (and (eq major-mode 'cvs-mode)
2426 (cvs-string-prefix-p default-directory file)) 2426 (string-prefix-p default-directory file))
2427 (let* ((file (substring file (length default-directory))) 2427 (let* ((file (substring file (length default-directory)))
2428 (fi (cvs-create-fileinfo 2428 (fi (cvs-create-fileinfo
2429 (if (string= "0" version) 2429 (if (string= "0" version)
diff --git a/lisp/vc/vc-annotate.el b/lisp/vc/vc-annotate.el
index a1dd807d828..f4964ef85cc 100644
--- a/lisp/vc/vc-annotate.el
+++ b/lisp/vc/vc-annotate.el
@@ -522,12 +522,12 @@ the file in question, search for the log entry required and move point."
522 (car rev-at-line) t 1))))))) 522 (car rev-at-line) t 1)))))))
523 523
524(defun vc-annotate-show-diff-revision-at-line-internal (filediff) 524(defun vc-annotate-show-diff-revision-at-line-internal (filediff)
525 (if (not (equal major-mode 'vc-annotate-mode)) 525 (if (not (derived-mode-p 'vc-annotate-mode))
526 (message "Cannot be invoked outside of a vc annotate buffer") 526 (message "Cannot be invoked outside of a vc annotate buffer")
527 (let* ((rev-at-line (vc-annotate-extract-revision-at-line)) 527 (let* ((rev-at-line (vc-annotate-extract-revision-at-line))
528 (prev-rev nil) 528 (prev-rev nil)
529 (rev (car rev-at-line)) 529 (rev (car rev-at-line))
530 (fname (cdr rev-at-line))) 530 (fname (cdr rev-at-line)))
531 (if (not rev-at-line) 531 (if (not rev-at-line)
532 (message "Cannot extract revision number from the current line") 532 (message "Cannot extract revision number from the current line")
533 (setq prev-rev 533 (setq prev-rev
@@ -535,17 +535,15 @@ the file in question, search for the log entry required and move point."
535 (if filediff fname nil) rev)) 535 (if filediff fname nil) rev))
536 (if (not prev-rev) 536 (if (not prev-rev)
537 (message "Cannot diff from any revision prior to %s" rev) 537 (message "Cannot diff from any revision prior to %s" rev)
538 (save-window-excursion 538 (vc-diff-internal
539 (vc-diff-internal 539 t
540 nil 540 ;; The value passed here should follow what
541 ;; The value passed here should follow what 541 ;; `vc-deduce-fileset' returns.
542 ;; `vc-deduce-fileset' returns. 542 (list vc-annotate-backend
543 (list vc-annotate-backend 543 (if filediff
544 (if filediff 544 (list fname)
545 (list fname) 545 nil))
546 nil)) 546 prev-rev rev))))))
547 prev-rev rev))
548 (switch-to-buffer "*vc-diff*"))))))
549 547
550(defun vc-annotate-show-diff-revision-at-line () 548(defun vc-annotate-show-diff-revision-at-line ()
551 "Visit the diff of the revision at line from its previous revision." 549 "Visit the diff of the revision at line from its previous revision."
diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el
index 798131236d5..505e40f46ba 100644
--- a/lisp/vc/vc-bzr.el
+++ b/lisp/vc/vc-bzr.el
@@ -37,7 +37,6 @@
37;; are bzr-versioned, `vc-bzr` presently runs `bzr status` on the 37;; are bzr-versioned, `vc-bzr` presently runs `bzr status` on the
38;; symlink, thereby not detecting whether the actual contents 38;; symlink, thereby not detecting whether the actual contents
39;; (that is, the target contents) are changed. 39;; (that is, the target contents) are changed.
40;; See https://bugs.launchpad.net/vc-bzr/+bug/116607
41 40
42;;; Properties of the backend 41;;; Properties of the backend
43 42
@@ -65,14 +64,6 @@
65 :group 'vc-bzr 64 :group 'vc-bzr
66 :type 'string) 65 :type 'string)
67 66
68(defcustom vc-bzr-sha1-program '("sha1sum")
69 "Name of program to compute SHA1.
70It must be a string \(program name\) or list of strings \(name and its args\)."
71 :type '(repeat string)
72 :group 'vc-bzr)
73
74(define-obsolete-variable-alias 'sha1-program 'vc-bzr-sha1-program "24.1")
75
76(defcustom vc-bzr-diff-switches nil 67(defcustom vc-bzr-diff-switches nil
77 "String or list of strings specifying switches for bzr diff under VC. 68 "String or list of strings specifying switches for bzr diff under VC.
78If nil, use the value of `vc-diff-switches'. If t, use no switches." 69If nil, use the value of `vc-diff-switches'. If t, use no switches."
@@ -190,20 +181,15 @@ in the repository root directory of FILE."
190(defun vc-bzr-sha1 (file) 181(defun vc-bzr-sha1 (file)
191 (with-temp-buffer 182 (with-temp-buffer
192 (set-buffer-multibyte nil) 183 (set-buffer-multibyte nil)
193 (let ((prog vc-bzr-sha1-program) 184 (insert-file-contents-literally file)
194 (args nil) 185 (sha1 (current-buffer))))
195 process-file-side-effects)
196 (when (consp prog)
197 (setq args (cdr prog))
198 (setq prog (car prog)))
199 (apply 'process-file prog (file-relative-name file) t nil args)
200 (buffer-substring (point-min) (+ (point-min) 40)))))
201 186
202(defun vc-bzr-state-heuristic (file) 187(defun vc-bzr-state-heuristic (file)
203 "Like `vc-bzr-state' but hopefully without running Bzr." 188 "Like `vc-bzr-state' but hopefully without running Bzr."
204 ;; `bzr status' was excruciatingly slow with large histories and 189 ;; `bzr status' could be slow with large histories and pending merges,
205 ;; pending merges, so try to avoid using it until they fix their 190 ;; so this tries to avoid calling it if possible. bzr status is
206 ;; performance problems. 191 ;; faster now, so this is not as important as it was.
192 ;;
207 ;; This function tries first to parse Bzr internal file 193 ;; This function tries first to parse Bzr internal file
208 ;; `checkout/dirstate', but it may fail if Bzr internal file format 194 ;; `checkout/dirstate', but it may fail if Bzr internal file format
209 ;; has changed. As a safeguard, the `checkout/dirstate' file is 195 ;; has changed. As a safeguard, the `checkout/dirstate' file is
@@ -299,10 +285,7 @@ in the repository root directory of FILE."
299 'up-to-date) 285 'up-to-date)
300 (t 'edited)) 286 (t 'edited))
301 'unregistered)))) 287 'unregistered))))
302 ;; Either the dirstate file can't be read, or the sha1 288 ;; The dirstate file can't be read, or some other problem.
303 ;; executable is missing, or ...
304 ;; In either case, recent versions of Bzr aren't that slow
305 ;; any more.
306 (error (vc-bzr-state file))))))) 289 (error (vc-bzr-state file)))))))
307 290
308 291
@@ -417,49 +400,56 @@ string or nil, and STATUS is one of the symbols: `added',
417`ignored', `kindchanged', `modified', `removed', `renamed', `unknown', 400`ignored', `kindchanged', `modified', `removed', `renamed', `unknown',
418which directly correspond to `bzr status' output, or 'unchanged 401which directly correspond to `bzr status' output, or 'unchanged
419for files whose copy in the working tree is identical to the one 402for files whose copy in the working tree is identical to the one
420in the branch repository, or nil for files that are not 403in the branch repository (or whose status not be determined)."
421registered with Bzr. 404;; Doc used to also say the following, but AFAICS, it has never been true.
422 405;;
423If any error occurred in running `bzr status', then return nil." 406;; ", or nil for files that are not registered with Bzr.
407;; If any error occurred in running `bzr status', then return nil."
408;;
409;; Rather than returning nil in case of an error, it returns
410;; (unchanged . WARNING). FIXME unchanged is not the best status to
411;; return in case of error.
424 (with-temp-buffer 412 (with-temp-buffer
425 (let ((ret (condition-case nil 413 ;; This is with-demoted-errors without the condition-case-unless-debug
426 (vc-bzr-command "status" t 0 file) 414 ;; annoyance, which makes it fail during ert testing.
427 (file-error nil))) ; vc-bzr-program not found. 415 (let (err)
428 (status 'unchanged)) 416 (condition-case err (vc-bzr-command "status" t 0 file)
429 ;; the only secure status indication in `bzr status' output 417 (error (message "Error: %S" err) nil)))
430 ;; is a couple of lines following the pattern:: 418 (let ((status 'unchanged))
431 ;; | <status>: 419 ;; the only secure status indication in `bzr status' output
432 ;; | <file name> 420 ;; is a couple of lines following the pattern::
433 ;; if the file is up-to-date, we get no status report from `bzr', 421 ;; | <status>:
434 ;; so if the regexp search for the above pattern fails, we consider 422 ;; | <file name>
435 ;; the file to be up-to-date. 423 ;; if the file is up-to-date, we get no status report from `bzr',
436 (goto-char (point-min)) 424 ;; so if the regexp search for the above pattern fails, we consider
437 (when (re-search-forward 425 ;; the file to be up-to-date.
438 ;; bzr prints paths relative to the repository root. 426 (goto-char (point-min))
439 (concat "^\\(" vc-bzr-state-words "\\):[ \t\n]+" 427 (when (re-search-forward
440 (regexp-quote (vc-bzr-file-name-relative file)) 428 ;; bzr prints paths relative to the repository root.
441 ;; Bzr appends a '/' to directory names and 429 (concat "^\\(" vc-bzr-state-words "\\):[ \t\n]+"
442 ;; '*' to executable files 430 (regexp-quote (vc-bzr-file-name-relative file))
443 (if (file-directory-p file) "/?" "\\*?") 431 ;; Bzr appends a '/' to directory names and
444 "[ \t\n]*$") 432 ;; '*' to executable files
445 nil t) 433 (if (file-directory-p file) "/?" "\\*?")
446 (lexical-let ((statusword (match-string 1))) 434 "[ \t\n]*$")
447 ;; Erase the status text that matched. 435 nil t)
448 (delete-region (match-beginning 0) (match-end 0)) 436 (lexical-let ((statusword (match-string 1)))
449 (setq status 437 ;; Erase the status text that matched.
450 (intern (replace-regexp-in-string " " "" statusword))))) 438 (delete-region (match-beginning 0) (match-end 0))
451 (when status 439 (setq status
452 (goto-char (point-min)) 440 (intern (replace-regexp-in-string " " "" statusword)))))
453 (skip-chars-forward " \n\t") ;Throw away spaces. 441 (when status
454 (cons status 442 (goto-char (point-min))
455 ;; "bzr" will output warnings and informational messages to 443 (skip-chars-forward " \n\t") ;Throw away spaces.
456 ;; stderr; due to Emacs's `vc-do-command' (and, it seems, 444 (cons status
457 ;; `start-process' itself) limitations, we cannot catch stderr 445 ;; "bzr" will output warnings and informational messages to
458 ;; and stdout into different buffers. So, if there's anything 446 ;; stderr; due to Emacs's `vc-do-command' (and, it seems,
459 ;; left in the buffer after removing the above status 447 ;; `start-process' itself) limitations, we cannot catch stderr
460 ;; keywords, let us just presume that any other message from 448 ;; and stdout into different buffers. So, if there's anything
461 ;; "bzr" is a user warning, and display it. 449 ;; left in the buffer after removing the above status
462 (unless (eobp) (buffer-substring (point) (point-max)))))))) 450 ;; keywords, let us just presume that any other message from
451 ;; "bzr" is a user warning, and display it.
452 (unless (eobp) (buffer-substring (point) (point-max))))))))
463 453
464(defun vc-bzr-state (file) 454(defun vc-bzr-state (file)
465 (lexical-let ((result (vc-bzr-status file))) 455 (lexical-let ((result (vc-bzr-status file)))
diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el
index 33611b4eafd..4c32eea2f72 100644
--- a/lisp/vc/vc-dir.el
+++ b/lisp/vc/vc-dir.el
@@ -1,6 +1,6 @@
1;;; vc-dir.el --- Directory status display under VC 1;;; vc-dir.el --- Directory status display under VC
2 2
3;; Copyright (C) 2007-2012 Free Software Foundation, Inc. 3;; Copyright (C) 2007-2012 Free Software Foundation, Inc.
4 4
5;; Author: Dan Nicolaescu <dann@ics.uci.edu> 5;; Author: Dan Nicolaescu <dann@ics.uci.edu>
6;; Keywords: vc tools 6;; Keywords: vc tools
@@ -556,7 +556,7 @@ If a prefix argument is given, move by that many lines."
556 (let ((data (ewoc-data crt)) 556 (let ((data (ewoc-data crt))
557 (dir (vc-dir-node-directory crt))) 557 (dir (vc-dir-node-directory crt)))
558 (and (vc-dir-fileinfo->directory data) 558 (and (vc-dir-fileinfo->directory data)
559 (vc-string-prefix-p dir argdir) 559 (string-prefix-p dir argdir)
560 (vc-dir-fileinfo->marked data) 560 (vc-dir-fileinfo->marked data)
561 (setq found data)))) 561 (setq found data))))
562 found)) 562 found))
@@ -818,7 +818,7 @@ child files."
818 data) 818 data)
819 (while 819 (while
820 (and (setq crt (ewoc-next vc-ewoc crt)) 820 (and (setq crt (ewoc-next vc-ewoc crt))
821 (vc-string-prefix-p dir 821 (string-prefix-p dir
822 (progn 822 (progn
823 (setq data (ewoc-data crt)) 823 (setq data (ewoc-data crt))
824 (vc-dir-node-directory crt)))) 824 (vc-dir-node-directory crt))))
@@ -846,7 +846,7 @@ If it is a file, return the corresponding cons for the file itself."
846 data) 846 data)
847 (while 847 (while
848 (and (setq crt (ewoc-next vc-ewoc crt)) 848 (and (setq crt (ewoc-next vc-ewoc crt))
849 (vc-string-prefix-p dir (progn 849 (string-prefix-p dir (progn
850 (setq data (ewoc-data crt)) 850 (setq data (ewoc-data crt))
851 (vc-dir-node-directory crt)))) 851 (vc-dir-node-directory crt))))
852 (unless (vc-dir-fileinfo->directory data) 852 (unless (vc-dir-fileinfo->directory data)
@@ -878,10 +878,10 @@ If it is a file, return the corresponding cons for the file itself."
878 children 878 children
879 dname) 879 dname)
880 ;; Find DIR 880 ;; Find DIR
881 (while (and crt (not (vc-string-prefix-p 881 (while (and crt (not (string-prefix-p
882 dirname (vc-dir-node-directory crt)))) 882 dirname (vc-dir-node-directory crt))))
883 (setq crt (ewoc-next vc-ewoc crt))) 883 (setq crt (ewoc-next vc-ewoc crt)))
884 (while (and crt (vc-string-prefix-p 884 (while (and crt (string-prefix-p
885 dirname 885 dirname
886 (setq dname (vc-dir-node-directory crt)))) 886 (setq dname (vc-dir-node-directory crt))))
887 (let ((data (ewoc-data crt))) 887 (let ((data (ewoc-data crt)))
@@ -915,7 +915,7 @@ If it is a file, return the corresponding cons for the file itself."
915 (if (not (derived-mode-p 'vc-dir-mode)) 915 (if (not (derived-mode-p 'vc-dir-mode))
916 (push status-buf drop) 916 (push status-buf drop)
917 (let ((ddir default-directory)) 917 (let ((ddir default-directory))
918 (when (vc-string-prefix-p ddir file) 918 (when (string-prefix-p ddir file)
919 (if (file-directory-p file) 919 (if (file-directory-p file)
920 (progn 920 (progn
921 (vc-dir-resync-directory-files file) 921 (vc-dir-resync-directory-files file)
diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el
index ec1b127dd19..95c15030953 100644
--- a/lisp/vc/vc-dispatcher.el
+++ b/lisp/vc/vc-dispatcher.el
@@ -537,13 +537,12 @@ editing!"
537 (kill-buffer (current-buffer))))) 537 (kill-buffer (current-buffer)))))
538 538
539(declare-function vc-dir-resynch-file "vc-dir" (&optional fname)) 539(declare-function vc-dir-resynch-file "vc-dir" (&optional fname))
540(declare-function vc-string-prefix-p "vc" (prefix string))
541 540
542(defun vc-resynch-buffers-in-directory (directory &optional keep noquery reset-vc-info) 541(defun vc-resynch-buffers-in-directory (directory &optional keep noquery reset-vc-info)
543 "Resync all buffers that visit files in DIRECTORY." 542 "Resync all buffers that visit files in DIRECTORY."
544 (dolist (buffer (buffer-list)) 543 (dolist (buffer (buffer-list))
545 (let ((fname (buffer-file-name buffer))) 544 (let ((fname (buffer-file-name buffer)))
546 (when (and fname (vc-string-prefix-p directory fname)) 545 (when (and fname (string-prefix-p directory fname))
547 (with-current-buffer buffer 546 (with-current-buffer buffer
548 (vc-resynch-buffer fname keep noquery reset-vc-info)))))) 547 (vc-resynch-buffer fname keep noquery reset-vc-info))))))
549 548
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el
index 52e8051342d..a2728268816 100644
--- a/lisp/vc/vc-hg.el
+++ b/lisp/vc/vc-hg.el
@@ -3,6 +3,7 @@
3;; Copyright (C) 2006-2012 Free Software Foundation, Inc. 3;; Copyright (C) 2006-2012 Free Software Foundation, Inc.
4 4
5;; Author: Ivan Kanis 5;; Author: Ivan Kanis
6;; Maintainer: FSF
6;; Keywords: vc tools 7;; Keywords: vc tools
7;; Package: vc 8;; Package: vc
8 9
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 4cbbf47c2d6..ab7e587eb79 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -1,6 +1,6 @@
1;;; vc.el --- drive a version-control system from within Emacs 1;;; vc.el --- drive a version-control system from within Emacs
2 2
3;; Copyright (C) 1992-1998, 2000-2012 Free Software Foundation, Inc. 3;; Copyright (C) 1992-1998, 2000-2012 Free Software Foundation, Inc.
4 4
5;; Author: FSF (see below for full credits) 5;; Author: FSF (see below for full credits)
6;; Maintainer: Andre Spiegel <spiegel@gnu.org> 6;; Maintainer: Andre Spiegel <spiegel@gnu.org>
@@ -847,7 +847,7 @@ been updated to their corresponding values."
847 (if (file-directory-p file) 847 (if (file-directory-p file)
848 (dolist (buffer (buffer-list)) 848 (dolist (buffer (buffer-list))
849 (let ((fname (buffer-file-name buffer))) 849 (let ((fname (buffer-file-name buffer)))
850 (when (and fname (vc-string-prefix-p file fname)) 850 (when (and fname (string-prefix-p file fname))
851 (push fname flist)))) 851 (push fname flist))))
852 (push file flist))) 852 (push file flist)))
853 ,form 853 ,form
@@ -900,7 +900,7 @@ use."
900 (lambda (arg) 900 (lambda (arg)
901 (message "arg %s" arg) 901 (message "arg %s" arg)
902 (and (file-directory-p arg) 902 (and (file-directory-p arg)
903 (vc-string-prefix-p (expand-file-name arg) def-dir))))))) 903 (string-prefix-p (expand-file-name arg) def-dir)))))))
904 (let ((default-directory repo-dir)) 904 (let ((default-directory repo-dir))
905 (vc-call-backend bk 'create-repo)) 905 (vc-call-backend bk 'create-repo))
906 (throw 'found bk)))) 906 (throw 'found bk))))
@@ -2809,11 +2809,7 @@ to provide the `find-revision' operation instead."
2809 2809
2810 2810
2811;; These things should probably be generally available 2811;; These things should probably be generally available
2812 2812(define-obsolete-function-alias 'vc-string-prefix-p 'string-prefix-p "24.2")
2813(defun vc-string-prefix-p (prefix string)
2814 (let ((lpref (length prefix)))
2815 (and (>= (length string) lpref)
2816 (eq t (compare-strings prefix nil nil string nil lpref)))))
2817 2813
2818(defun vc-file-tree-walk (dirname func &rest args) 2814(defun vc-file-tree-walk (dirname func &rest args)
2819 "Walk recursively through DIRNAME. 2815 "Walk recursively through DIRNAME.
diff --git a/lisp/vcursor.el b/lisp/vcursor.el
index 95928ebe87a..19cb7a9df8d 100644
--- a/lisp/vcursor.el
+++ b/lisp/vcursor.el
@@ -656,12 +656,13 @@ another window. With LEAVE-W, use the current `vcursor-window'."
656 (or window-system 656 (or window-system
657 (display-color-p) 657 (display-color-p)
658 (overlay-put vcursor-overlay 'before-string vcursor-string)) 658 (overlay-put vcursor-overlay 'before-string vcursor-string))
659 (overlay-put vcursor-overlay 'face 'vcursor)) 659 (overlay-put vcursor-overlay 'face 'vcursor)
660 ;; 200 is purely an arbitrary "high" number. See bug#9663.
661 (overlay-put vcursor-overlay 'priority 200))
660 (or leave-w (vcursor-find-window nil t)) 662 (or leave-w (vcursor-find-window nil t))
661 ;; vcursor-window now contains the right buffer 663 ;; vcursor-window now contains the right buffer
662 (or (pos-visible-in-window-p pt vcursor-window) 664 (or (pos-visible-in-window-p pt vcursor-window)
663 (set-window-point vcursor-window pt))) 665 (set-window-point vcursor-window pt))))
664 )
665 666
666(defun vcursor-insert (text) 667(defun vcursor-insert (text)
667 "Insert TEXT, respecting `vcursor-interpret-input'." 668 "Insert TEXT, respecting `vcursor-interpret-input'."
diff --git a/lisp/version.el b/lisp/version.el
index a4bc4fd54a6..d7fb05ea465 100644
--- a/lisp/version.el
+++ b/lisp/version.el
@@ -81,28 +81,45 @@ to the system configuration; look at `system-configuration' instead."
81 81
82;; Set during dumping, this is a defvar so that it can be setq'd. 82;; Set during dumping, this is a defvar so that it can be setq'd.
83(defvar emacs-bzr-version nil "\ 83(defvar emacs-bzr-version nil "\
84String giving the bzr revision number from which this Emacs was built. 84String giving the bzr revision from which this Emacs was built.
85This is nil if Emacs was not built from a bzr checkout, or if we could 85Value is the bzr revision number and a revision ID separated by a blank.
86Value is nil if Emacs was not built from a bzr checkout, or if we could
86not determine the revision.") 87not determine the revision.")
87 88
88(defun emacs-bzr-get-version () "\ 89(defun emacs-bzr-get-version (&optional dir) "\
89Try to return as a string the bzr revision number of the Emacs sources. 90Try to return as a string the bzr revision number of the Emacs sources.
90Returns nil if the sources do not seem to be under bzr, or if we could 91Value is the bzr revision number and a revision ID separated by a blank.
92Value is nil if the sources do not seem to be under bzr, or if we could
91not determine the revision. Note that this reports on the current state 93not determine the revision. Note that this reports on the current state
92of the sources, which may not correspond to the running Emacs." 94of the sources, which may not correspond to the running Emacs.
93 (let ((file (expand-file-name ".bzr/branch/last-revision" source-directory))) 95
94 (if (file-readable-p file) 96Optional argument DIR is a directory to use instead of `source-directory'."
95 (with-temp-buffer 97 (or dir (setq dir source-directory))
96 (insert-file-contents file) 98 (when (file-directory-p (setq dir (expand-file-name ".bzr/branch" dir)))
97 (goto-char (point-max)) 99 (let (file loc)
98 (if (looking-back "\n") 100 (cond ((file-readable-p
99 (delete-char -1)) 101 (setq file (expand-file-name "last-revision" dir)))
100 (buffer-string))))) 102 (with-temp-buffer
103 (insert-file-contents file)
104 (goto-char (point-max))
105 (if (looking-back "\n")
106 (delete-char -1))
107 (buffer-string)))
108 ;; OK, no last-revision. Is it a lightweight checkout?
109 ((file-readable-p
110 (setq file (expand-file-name "location" dir)))
111 ;; If the parent branch is local, try looking there for the revid.
112 (if (setq loc (with-temp-buffer
113 (insert-file-contents file)
114 (if (looking-at "file://\\(.*\\)")
115 (match-string 1))))
116 (emacs-bzr-get-version loc)))
117 ;; Could fall back to eg `bzr testament' at this point.
118 ))))
101 119
102;; We put version info into the executable in the form that `ident' uses. 120;; We put version info into the executable in the form that `ident' uses.
103(or (eq system-type 'windows-nt) 121(purecopy (concat "\n$Id: " (subst-char-in-string ?\n ?\s (emacs-version))
104 (purecopy (concat "\n$Id: " (subst-char-in-string ?\n ?\s (emacs-version)) 122 " $\n"))
105 " $\n")))
106 123
107;; Local Variables: 124;; Local Variables:
108;; version-control: never 125;; version-control: never
diff --git a/lisp/window.el b/lisp/window.el
index c9e2469b0d2..c148f5ee01f 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -514,17 +514,19 @@ window).")
514 (if (window-valid-p ignore) (eq window ignore) ignore)) 514 (if (window-valid-p ignore) (eq window ignore) ignore))
515 515
516(defun window-min-size (&optional window horizontal ignore) 516(defun window-min-size (&optional window horizontal ignore)
517 "Return the minimum number of lines of WINDOW. 517 "Return the minimum size of WINDOW.
518WINDOW can be an arbitrary window and defaults to the selected 518WINDOW can be an arbitrary window and defaults to the selected
519one. Optional argument HORIZONTAL non-nil means return the 519one. Optional argument HORIZONTAL non-nil means return the
520minimum number of columns of WINDOW. 520minimum number of columns of WINDOW; otherwise return the minimum
521number of WINDOW's lines.
521 522
522Optional argument IGNORE non-nil means ignore any restrictions 523Optional argument IGNORE, if non-nil, means ignore restrictions
523imposed by fixed size windows, `window-min-height' or 524imposed by fixed size windows, `window-min-height' or
524`window-min-width' settings. IGNORE equal `safe' means live 525`window-min-width' settings. If IGNORE equals `safe', live
525windows may get as small as `window-safe-min-height' lines and 526windows may get as small as `window-safe-min-height' lines and
526`window-safe-min-width' columns. IGNORE a window means ignore 527`window-safe-min-width' columns. If IGNORE is a window, ignore
527restrictions for that window only." 528restrictions for that window only. Any other non-nil value
529means ignore all of the above restrictions for all windows."
528 (window--min-size-1 530 (window--min-size-1
529 (window-normalize-window window) horizontal ignore)) 531 (window-normalize-window window) horizontal ignore))
530 532
@@ -614,12 +616,13 @@ columns. If WINDOW cannot be shrunk by -DELTA lines or columns,
614return the minimum value in the range DELTA..0 by which WINDOW 616return the minimum value in the range DELTA..0 by which WINDOW
615can be shrunk. 617can be shrunk.
616 618
617Optional argument IGNORE non-nil means ignore any restrictions 619Optional argument IGNORE non-nil means ignore restrictions
618imposed by fixed size windows, `window-min-height' or 620imposed by fixed size windows, `window-min-height' or
619`window-min-width' settings. IGNORE equal `safe' means live 621`window-min-width' settings. If IGNORE equals `safe', live
620windows may get as small as `window-safe-min-height' lines and 622windows may get as small as `window-safe-min-height' lines and
621`window-safe-min-width' columns. IGNORE any window means ignore 623`window-safe-min-width' columns. If IGNORE is a window, ignore
622restrictions for that window only." 624restrictions for that window only. Any other non-nil value means
625ignore all of the above restrictions for all windows."
623 (setq window (window-normalize-window window)) 626 (setq window (window-normalize-window window))
624 (cond 627 (cond
625 ((< delta 0) 628 ((< delta 0)
@@ -734,20 +737,21 @@ window. Return zero if WINDOW cannot be shrunk.
734Optional argument HORIZONTAL non-nil means return number of 737Optional argument HORIZONTAL non-nil means return number of
735columns by which WINDOW can be shrunk. 738columns by which WINDOW can be shrunk.
736 739
737Optional argument IGNORE non-nil means ignore any restrictions 740Optional argument IGNORE non-nil means ignore restrictions
738imposed by fixed size windows, `window-min-height' or 741imposed by fixed size windows, `window-min-height' or
739`window-min-width' settings. IGNORE a window means ignore 742`window-min-width' settings. If IGNORE is a window, ignore
740restrictions for that window only. IGNORE equal `safe' means 743restrictions for that window only. If IGNORE equals `safe',
741live windows may get as small as `window-safe-min-height' lines 744live windows may get as small as `window-safe-min-height' lines
742and `window-safe-min-width' columns. 745and `window-safe-min-width' columns. Any other non-nil value
746means ignore all of the above restrictions for all windows.
743 747
744Optional argument TRAIL `before' means only windows to the left 748Optional argument TRAIL restricts the windows that can be enlarged.
745of or above WINDOW can be enlarged. Optional argument TRAIL 749If its value is `before', only windows to the left of or above WINDOW
746`after' means only windows to the right of or below WINDOW can be 750can be enlarged. If it is `after', only windows to the right of or
747enlarged. 751below WINDOW can be enlarged.
748 752
749Optional argument NOUP non-nil means don't go up in the window 753Optional argument NOUP non-nil means don't go up in the window
750tree but try to enlarge windows within WINDOW's combination only. 754tree, but try to enlarge windows within WINDOW's combination only.
751 755
752Optional argument NODOWN non-nil means don't check whether WINDOW 756Optional argument NODOWN non-nil means don't check whether WINDOW
753itself (and its child windows) can be shrunk; check only whether 757itself (and its child windows) can be shrunk; check only whether
@@ -808,24 +812,25 @@ at least one other window can be enlarged appropriately."
808 (window--max-delta-1 parent delta horizontal ignore trail)))))) 812 (window--max-delta-1 parent delta horizontal ignore trail))))))
809 813
810(defun window-max-delta (&optional window horizontal ignore trail noup nodown) 814(defun window-max-delta (&optional window horizontal ignore trail noup nodown)
811 "Return maximum number of lines WINDOW by which WINDOW can be enlarged. 815 "Return maximum number of lines by which WINDOW can be enlarged.
812WINDOW can be an arbitrary window and defaults to the selected 816WINDOW can be an arbitrary window and defaults to the selected
813window. The return value is zero if WINDOW cannot be enlarged. 817window. The return value is zero if WINDOW cannot be enlarged.
814 818
815Optional argument HORIZONTAL non-nil means return maximum number 819Optional argument HORIZONTAL non-nil means return maximum number
816of columns by which WINDOW can be enlarged. 820of columns by which WINDOW can be enlarged.
817 821
818Optional argument IGNORE non-nil means ignore any restrictions 822Optional argument IGNORE non-nil means ignore restrictions
819imposed by fixed size windows, `window-min-height' or 823imposed by fixed size windows, `window-min-height' or
820`window-min-width' settings. IGNORE a window means ignore 824`window-min-width' settings. If IGNORE is a window, ignore
821restrictions for that window only. IGNORE equal `safe' means 825restrictions for that window only. If IGNORE equals `safe',
822live windows may get as small as `window-safe-min-height' lines 826live windows may get as small as `window-safe-min-height' lines
823and `window-safe-min-width' columns. 827and `window-safe-min-width' columns. Any other non-nil value means
828ignore all of the above restrictions for all windows.
824 829
825Optional argument TRAIL `before' means only windows to the left 830Optional argument TRAIL restricts the windows that can be enlarged.
826of or below WINDOW can be shrunk. Optional argument TRAIL 831If its value is `before', only windows to the left of or above WINDOW
827`after' means only windows to the right of or above WINDOW can be 832can be enlarged. If it is `after', only windows to the right of or
828shrunk. 833below WINDOW can be enlarged.
829 834
830Optional argument NOUP non-nil means don't go up in the window 835Optional argument NOUP non-nil means don't go up in the window
831tree but try to obtain the entire space from windows within 836tree but try to obtain the entire space from windows within
@@ -860,12 +865,13 @@ columns. If WINDOW cannot be shrunk by -DELTA lines or columns,
860return the minimum value in the range DELTA..0 that can be used 865return the minimum value in the range DELTA..0 that can be used
861for shrinking WINDOW. 866for shrinking WINDOW.
862 867
863Optional argument IGNORE non-nil means ignore any restrictions 868Optional argument IGNORE non-nil means ignore restrictions
864imposed by fixed size windows, `window-min-height' or 869imposed by fixed size windows, `window-min-height' or
865`window-min-width' settings. IGNORE a window means ignore 870`window-min-width' settings. If IGNORE is a window, ignore
866restrictions for that window only. IGNORE equal `safe' means 871restrictions for that window only. If IGNORE equals `safe',
867live windows may get as small as `window-safe-min-height' lines 872live windows may get as small as `window-safe-min-height' lines
868and `window-safe-min-width' columns. 873and `window-safe-min-width' columns. Any other non-nil value
874means ignore all of the above restrictions for all windows.
869 875
870Optional argument TRAIL `before' means only windows to the left 876Optional argument TRAIL `before' means only windows to the left
871of or below WINDOW can be shrunk. Optional argument TRAIL 877of or below WINDOW can be shrunk. Optional argument TRAIL
@@ -916,17 +922,18 @@ columns. If WINDOW cannot be shrunk by -DELTA lines or columns,
916return the minimum value in the range DELTA..0 that can be used 922return the minimum value in the range DELTA..0 that can be used
917for shrinking WINDOW. 923for shrinking WINDOW.
918 924
919Optional argument IGNORE non-nil means ignore any restrictions 925Optional argument IGNORE non-nil means ignore restrictions
920imposed by fixed size windows, `window-min-height' or 926imposed by fixed size windows, `window-min-height' or
921`window-min-width' settings. IGNORE a window means ignore 927`window-min-width' settings. If IGNORE is a window, ignore
922restrictions for that window only. IGNORE equal `safe' means 928restrictions for that window only. If IGNORE equals `safe',
923live windows may get as small as `window-safe-min-height' lines 929live windows may get as small as `window-safe-min-height' lines
924and `window-safe-min-width' columns." 930and `window-safe-min-width' columns. Any other non-nil value
931means ignore all of the above restrictions for all windows."
925 (setq window (window-normalize-window window)) 932 (setq window (window-normalize-window window))
926 (window--resizable window delta horizontal ignore)) 933 (window--resizable window delta horizontal ignore))
927 934
928(defun window-total-size (&optional window horizontal) 935(defun window-total-size (&optional window horizontal)
929 "Return the total height or width of window WINDOW. 936 "Return the total height or width of WINDOW.
930If WINDOW is omitted or nil, it defaults to the selected window. 937If WINDOW is omitted or nil, it defaults to the selected window.
931 938
932If HORIZONTAL is omitted or nil, return the total height of 939If HORIZONTAL is omitted or nil, return the total height of
@@ -941,7 +948,7 @@ the total width, in columns, like `window-total-width'."
941 948
942;; See discussion in bug#4543. 949;; See discussion in bug#4543.
943(defun window-full-height-p (&optional window) 950(defun window-full-height-p (&optional window)
944 "Return t if WINDOW is as high as the containing frame. 951 "Return t if WINDOW is as high as its containing frame.
945More precisely, return t if and only if the total height of 952More precisely, return t if and only if the total height of
946WINDOW equals the total height of the root window of WINDOW's 953WINDOW equals the total height of the root window of WINDOW's
947frame. WINDOW can be any window and defaults to the selected 954frame. WINDOW can be any window and defaults to the selected
@@ -951,7 +958,7 @@ one."
951 (window-total-size (frame-root-window window)))) 958 (window-total-size (frame-root-window window))))
952 959
953(defun window-full-width-p (&optional window) 960(defun window-full-width-p (&optional window)
954 "Return t if WINDOW is as wide as the containing frame. 961 "Return t if WINDOW is as wide as its containing frame.
955More precisely, return t if and only if the total width of WINDOW 962More precisely, return t if and only if the total width of WINDOW
956equals the total width of the root window of WINDOW's frame. 963equals the total width of the root window of WINDOW's frame.
957WINDOW can be any window and defaults to the selected one." 964WINDOW can be any window and defaults to the selected one."
@@ -1115,7 +1122,7 @@ SIDE can be any of the symbols `left', `top', `right' or
1115 "Return window in DIRECTION as seen from WINDOW. 1122 "Return window in DIRECTION as seen from WINDOW.
1116DIRECTION must be one of `above', `below', `left' or `right'. 1123DIRECTION must be one of `above', `below', `left' or `right'.
1117WINDOW must be a live window and defaults to the selected one. 1124WINDOW must be a live window and defaults to the selected one.
1118IGNORE, when non-nil means a window can be returned even if its 1125IGNORE non-nil means a window can be returned even if its
1119`no-other-window' parameter is non-nil." 1126`no-other-window' parameter is non-nil."
1120 (setq window (window-normalize-window window t)) 1127 (setq window (window-normalize-window window t))
1121 (unless (memq direction '(above below left right)) 1128 (unless (memq direction '(above below left right))
@@ -1420,7 +1427,7 @@ windows."
1420(defun window--resize-mini-window (window delta) 1427(defun window--resize-mini-window (window delta)
1421 "Resize minibuffer window WINDOW by DELTA lines. 1428 "Resize minibuffer window WINDOW by DELTA lines.
1422If WINDOW cannot be resized by DELTA lines make it as large (or 1429If WINDOW cannot be resized by DELTA lines make it as large (or
1423as small) as possible but don't signal an error." 1430as small) as possible, but don't signal an error."
1424 (when (window-minibuffer-p window) 1431 (when (window-minibuffer-p window)
1425 (let* ((frame (window-frame window)) 1432 (let* ((frame (window-frame window))
1426 (root (frame-root-window frame)) 1433 (root (frame-root-window frame))
@@ -1461,12 +1468,13 @@ horizontally by DELTA columns. In this case a positive DELTA
1461means enlarge WINDOW by DELTA columns. DELTA negative means 1468means enlarge WINDOW by DELTA columns. DELTA negative means
1462WINDOW shall be shrunk by -DELTA columns. 1469WINDOW shall be shrunk by -DELTA columns.
1463 1470
1464Optional argument IGNORE non-nil means ignore any restrictions 1471Optional argument IGNORE non-nil means ignore restrictions
1465imposed by fixed size windows, `window-min-height' or 1472imposed by fixed size windows, `window-min-height' or
1466`window-min-width' settings. IGNORE any window means ignore 1473`window-min-width' settings. If IGNORE is a window, ignore
1467restrictions for that window only. IGNORE equal `safe' means 1474restrictions for that window only. If IGNORE equals `safe',
1468live windows may get as small as `window-safe-min-height' lines 1475live windows may get as small as `window-safe-min-height' lines
1469and `window-safe-min-width' columns. 1476and `window-safe-min-width' columns. Any other non-nil value
1477means ignore all of the above restrictions for all windows.
1470 1478
1471This function resizes other windows proportionally and never 1479This function resizes other windows proportionally and never
1472deletes any windows. If you want to move only the low (right) 1480deletes any windows. If you want to move only the low (right)
@@ -1516,9 +1524,9 @@ HORIZONTAL non-nil means set the new normal width of these
1516windows. WINDOW specifies a child window of PARENT that has been 1524windows. WINDOW specifies a child window of PARENT that has been
1517resized by THIS-DELTA lines (columns). 1525resized by THIS-DELTA lines (columns).
1518 1526
1519Optional argument TRAIL either 'before or 'after means set values 1527Optional argument TRAIL either `before' or `after' means set values
1520for windows before or after WINDOW only. Optional argument 1528only for windows before or after WINDOW. Optional argument
1521OTHER-DELTA a number specifies that this many lines (columns) 1529OTHER-DELTA, a number, specifies that this many lines (columns)
1522have been obtained from (or returned to) an ancestor window of 1530have been obtained from (or returned to) an ancestor window of
1523PARENT in order to resize WINDOW." 1531PARENT in order to resize WINDOW."
1524 (let* ((delta-normal 1532 (let* ((delta-normal
@@ -1618,12 +1626,13 @@ be a horizontally combined internal window.
1618WINDOW, if specified, must denote a child window of PARENT that 1626WINDOW, if specified, must denote a child window of PARENT that
1619is resized by DELTA lines. 1627is resized by DELTA lines.
1620 1628
1621Optional argument IGNORE non-nil means ignore any restrictions 1629Optional argument IGNORE non-nil means ignore restrictions
1622imposed by fixed size windows, `window-min-height' or 1630imposed by fixed size windows, `window-min-height' or
1623`window-min-width' settings. IGNORE equal `safe' means live 1631`window-min-width' settings. If IGNORE equals `safe', live
1624windows may get as small as `window-safe-min-height' lines and 1632windows may get as small as `window-safe-min-height' lines and
1625`window-safe-min-width' columns. IGNORE any window means ignore 1633`window-safe-min-width' columns. If IGNORE is a window, ignore
1626restrictions for that window only. 1634restrictions for that window only. Any other non-nil value means
1635ignore all of the above restrictions for all windows.
1627 1636
1628Optional arguments TRAIL and EDGE, when non-nil, restrict the set 1637Optional arguments TRAIL and EDGE, when non-nil, restrict the set
1629of windows that shall be resized. If TRAIL equals `before', 1638of windows that shall be resized. If TRAIL equals `before',
@@ -1790,12 +1799,13 @@ Optional argument HORIZONTAL non-nil means resize other windows
1790when WINDOW is resized horizontally by DELTA columns. WINDOW 1799when WINDOW is resized horizontally by DELTA columns. WINDOW
1791itself is not resized by this function. 1800itself is not resized by this function.
1792 1801
1793Optional argument IGNORE non-nil means ignore any restrictions 1802Optional argument IGNORE non-nil means ignore restrictions
1794imposed by fixed size windows, `window-min-height' or 1803imposed by fixed size windows, `window-min-height' or
1795`window-min-width' settings. IGNORE equal `safe' means live 1804`window-min-width' settings. If IGNORE equals `safe', live
1796windows may get as small as `window-safe-min-height' lines and 1805windows may get as small as `window-safe-min-height' lines and
1797`window-safe-min-width' columns. IGNORE any window means ignore 1806`window-safe-min-width' columns. If IGNORE is a window, ignore
1798restrictions for that window only. 1807restrictions for that window only. Any other non-nil value means
1808ignore all of the above restrictions for all windows.
1799 1809
1800Optional arguments TRAIL and EDGE, when non-nil, refine the set 1810Optional arguments TRAIL and EDGE, when non-nil, refine the set
1801of windows that shall be resized. If TRAIL equals `before', 1811of windows that shall be resized. If TRAIL equals `before',
@@ -1891,12 +1901,13 @@ preferably only resize windows adjacent to EDGE."
1891Optional argument HORIZONTAL non-nil means resize WINDOW 1901Optional argument HORIZONTAL non-nil means resize WINDOW
1892horizontally by DELTA columns. 1902horizontally by DELTA columns.
1893 1903
1894Optional argument IGNORE non-nil means ignore any restrictions 1904Optional argument IGNORE non-nil means ignore restrictions
1895imposed by fixed size windows, `window-min-height' or 1905imposed by fixed size windows, `window-min-height' or
1896`window-min-width' settings. IGNORE equal `safe' means live 1906`window-min-width' settings. If IGNORE equals `safe', live
1897windows may get as small as `window-safe-min-height' lines and 1907windows may get as small as `window-safe-min-height' lines and
1898`window-safe-min-width' columns. IGNORE any window means ignore 1908`window-safe-min-width' columns. If IGNORE is a window, ignore
1899restrictions for that window only. 1909restrictions for that window only. Any other non-nil value
1910means ignore all of the above restrictions for all windows.
1900 1911
1901Optional argument ADD non-nil means add DELTA to the new total 1912Optional argument ADD non-nil means add DELTA to the new total
1902size of WINDOW. 1913size of WINDOW.
@@ -1986,7 +1997,7 @@ any windows."
1986Optional argument HORIZONTAL non-nil means move WINDOW's right 1997Optional argument HORIZONTAL non-nil means move WINDOW's right
1987edge by DELTA columns. WINDOW defaults to the selected window. 1998edge by DELTA columns. WINDOW defaults to the selected window.
1988 1999
1989If DELTA is greater zero, then move the edge downwards or to the 2000If DELTA is greater than zero, move the edge downwards or to the
1990right. If DELTA is less than zero, move the edge upwards or to 2001right. If DELTA is less than zero, move the edge upwards or to
1991the left. If the edge can't be moved by DELTA lines or columns, 2002the left. If the edge can't be moved by DELTA lines or columns,
1992move it as far as possible in the desired direction." 2003move it as far as possible in the desired direction."
@@ -2091,7 +2102,7 @@ move it as far as possible in the desired direction."
2091 (error "Failed adjusting window %s" window))))))) 2102 (error "Failed adjusting window %s" window)))))))
2092 2103
2093(defun enlarge-window (delta &optional horizontal) 2104(defun enlarge-window (delta &optional horizontal)
2094 "Make selected window DELTA lines taller. 2105 "Make the selected window DELTA lines taller.
2095Interactively, if no argument is given, make the selected window 2106Interactively, if no argument is given, make the selected window
2096one line taller. If optional argument HORIZONTAL is non-nil, 2107one line taller. If optional argument HORIZONTAL is non-nil,
2097make selected window wider by DELTA columns. If DELTA is 2108make selected window wider by DELTA columns. If DELTA is
@@ -2112,7 +2123,7 @@ Return nil."
2112 horizontal)))) 2123 horizontal))))
2113 2124
2114(defun shrink-window (delta &optional horizontal) 2125(defun shrink-window (delta &optional horizontal)
2115 "Make selected window DELTA lines smaller. 2126 "Make the selected window DELTA lines smaller.
2116Interactively, if no argument is given, make the selected window 2127Interactively, if no argument is given, make the selected window
2117one line smaller. If optional argument HORIZONTAL is non-nil, 2128one line smaller. If optional argument HORIZONTAL is non-nil,
2118make selected window narrower by DELTA columns. If DELTA is 2129make selected window narrower by DELTA columns. If DELTA is
@@ -3643,7 +3654,11 @@ specific buffers."
3643 (scroll-bars . ,(window-scroll-bars window)) 3654 (scroll-bars . ,(window-scroll-bars window))
3644 (vscroll . ,(window-vscroll window)) 3655 (vscroll . ,(window-vscroll window))
3645 (dedicated . ,(window-dedicated-p window)) 3656 (dedicated . ,(window-dedicated-p window))
3646 (point . ,(if writable point (copy-marker point))) 3657 (point . ,(if writable point
3658 (copy-marker point
3659 (buffer-local-value
3660 'window-point-insertion-type
3661 buffer))))
3647 (start . ,(if writable start (copy-marker start))))))))) 3662 (start . ,(if writable start (copy-marker start)))))))))
3648 (tail 3663 (tail
3649 (when (memq type '(vc hc)) 3664 (when (memq type '(vc hc))
@@ -5439,7 +5454,7 @@ A value of t means point moves to the beginning or the end of the buffer
5439\(depending on scrolling direction) when no more scrolling possible. 5454\(depending on scrolling direction) when no more scrolling possible.
5440When point is already on that position, then signal an error." 5455When point is already on that position, then signal an error."
5441 :type 'boolean 5456 :type 'boolean
5442 :group 'scrolling 5457 :group 'windows
5443 :version "24.1") 5458 :version "24.1")
5444 5459
5445(defun scroll-up-command (&optional arg) 5460(defun scroll-up-command (&optional arg)
diff --git a/lisp/woman.el b/lisp/woman.el
index c76399a96e5..3ab06a5dd73 100644
--- a/lisp/woman.el
+++ b/lisp/woman.el
@@ -1,6 +1,6 @@
1;;; woman.el --- browse UN*X manual pages `wo (without) man' 1;;; woman.el --- browse UN*X manual pages `wo (without) man'
2 2
3;; Copyright (C) 2000-2012 Free Software Foundation, Inc. 3;; Copyright (C) 2000-2012 Free Software Foundation, Inc.
4 4
5;; Author: Francis J. Wright <F.J.Wright@qmul.ac.uk> 5;; Author: Francis J. Wright <F.J.Wright@qmul.ac.uk>
6;; Maintainer: FSF 6;; Maintainer: FSF
@@ -1595,14 +1595,6 @@ Also make each path-info component into a list.
1595 (woman-process-buffer) 1595 (woman-process-buffer)
1596 (goto-char (point-min))))) 1596 (goto-char (point-min)))))
1597 1597
1598;; There is currently no `tar-mode-hook' so use ...
1599(eval-after-load "tar-mode"
1600 '(progn
1601 (define-key tar-mode-map "w" 'woman-tar-extract-file)
1602 (define-key-after (lookup-key tar-mode-map [menu-bar immediate])
1603 [woman] '("Read Man Page (WoMan)" . woman-tar-extract-file) 'view)))
1604
1605
1606(defvar woman-last-file-name nil 1598(defvar woman-last-file-name nil
1607 "The full pathname of the last file formatted by WoMan.") 1599 "The full pathname of the last file formatted by WoMan.")
1608 1600
@@ -2141,7 +2133,7 @@ European characters."
2141 (copy-sequence standard-display-table) 2133 (copy-sequence standard-display-table)
2142 (make-display-table))) 2134 (make-display-table)))
2143 ;; Display the following internal chars correctly: 2135 ;; Display the following internal chars correctly:
2144 (aset buffer-display-table woman-unpadded-space-char [?\ ]) 2136 (aset buffer-display-table woman-unpadded-space-char [?\s])
2145 (aset buffer-display-table woman-escaped-escape-char [?\\])) 2137 (aset buffer-display-table woman-escaped-escape-char [?\\]))
2146 2138
2147 2139
@@ -2401,10 +2393,12 @@ Currently set only from '\" t in the first line of the source file.")
2401 (progn 2393 (progn
2402 (goto-char from) 2394 (goto-char from)
2403 (while (search-forward woman-escaped-escape-string nil t) 2395 (while (search-forward woman-escaped-escape-string nil t)
2404 (delete-char -1) (insert ?\\)) 2396 (delete-char -1)
2397 (insert ?\\))
2405 (goto-char from) 2398 (goto-char from)
2406 (while (search-forward woman-unpadded-space-string nil t) 2399 (while (search-forward woman-unpadded-space-string nil t)
2407 (delete-char -1) (insert ?\ )))) 2400 (delete-char -1)
2401 (insert ?\s))))
2408 2402
2409 ;; Must return the new end of file if used in format-alist. 2403 ;; Must return the new end of file if used in format-alist.
2410 (point-max))) 2404 (point-max)))
@@ -2445,9 +2439,9 @@ Preserves location of `point'."
2445 ;; first backwards then forwards: 2439 ;; first backwards then forwards:
2446 (while (and 2440 (while (and
2447 (<= (setq N (1+ N)) 0) 2441 (<= (setq N (1+ N)) 0)
2448 (cond ((memq (preceding-char) '(?\ ?\t)) 2442 (cond ((memq (preceding-char) '(?\s ?\t))
2449 (delete-char -1) t) 2443 (delete-char -1) t)
2450 ((memq (following-char) '(?\ ?\t)) 2444 ((memq (following-char) '(?\s ?\t))
2451 (delete-char 1) t) 2445 (delete-char 1) t)
2452 (t nil)))) 2446 (t nil))))
2453 (if (<= N 0) 2447 (if (<= N 0)
@@ -3384,7 +3378,7 @@ Ignore the default face and underline only word characters."
3384;; this used to be globally bound to nil, to avoid an error. Instead 3378;; this used to be globally bound to nil, to avoid an error. Instead
3385;; we can use bound-and-true-p in woman-translate. 3379;; we can use bound-and-true-p in woman-translate.
3386(defvar woman-translations) 3380(defvar woman-translations)
3387;; A list of the form (\"[ace]\" (a . b) (c . d) (e . ?\ )) or nil. 3381;; A list of the form (\"[ace]\" (a . b) (c . d) (e . ?\s)) or nil.
3388 3382
3389(defun woman-get-next-char () 3383(defun woman-get-next-char ()
3390 "Return and delete next char in buffer, including special chars." 3384 "Return and delete next char in buffer, including special chars."
@@ -3719,7 +3713,9 @@ expression in parentheses. Leaves point after the value."
3719 (setq fn 'woman2-format-paragraphs)))) 3713 (setq fn 'woman2-format-paragraphs))))
3720 () 3714 ()
3721 ;; Find next control line: 3715 ;; Find next control line:
3722 (set-marker to (woman-find-next-control-line)) 3716 (if (equal woman-request "TS")
3717 (set-marker to (woman-find-next-control-line "TE"))
3718 (set-marker to (woman-find-next-control-line)))
3723 ;; Call the appropriate function: 3719 ;; Call the appropriate function:
3724 (funcall fn to))) 3720 (funcall fn to)))
3725 (if (not (eobp)) ; This should not happen, but ... 3721 (if (not (eobp)) ; This should not happen, but ...
@@ -3730,12 +3726,13 @@ expression in parentheses. Leaves point after the value."
3730 (fset 'insert-and-inherit insert-and-inherit) 3726 (fset 'insert-and-inherit insert-and-inherit)
3731 (set-marker to nil)))) 3727 (set-marker to nil))))
3732 3728
3733(defun woman-find-next-control-line () 3729(defun woman-find-next-control-line (&optional pat)
3734 "Find and return start of next control line." 3730 "Find and return start of next control line.
3735; (let ((to (save-excursion 3731PAT, if non-nil, specifies an additional component of the control
3736; (re-search-forward "^\\." nil t)))) 3732line regexp to search for, which is appended to the default
3737; (if to (1- to) (point-max))) 3733regexp, \"\\(\\\\c\\)?\\n[.']\"."
3738 (let (to) 3734 (let ((pattern (concat "\\(\\\\c\\)?\n[.']" pat))
3735 to)
3739 (save-excursion 3736 (save-excursion
3740 ;; Must handle 3737 ;; Must handle
3741 ;; ...\c 3738 ;; ...\c
@@ -3744,12 +3741,14 @@ expression in parentheses. Leaves point after the value."
3744 ;; BEWARE THAT THIS CODE MAY BE UNRELIABLE!!!!! 3741 ;; BEWARE THAT THIS CODE MAY BE UNRELIABLE!!!!!
3745 (while 3742 (while
3746 (and 3743 (and
3747 (setq to (re-search-forward "\\(\\\\c\\)?\n[.']" nil t)) 3744 (setq to (re-search-forward pattern nil t))
3748 (match-beginning 1) 3745 (match-beginning 1)
3749 (looking-at "br")) 3746 (looking-at "br"))
3750 (goto-char (match-beginning 0)) 3747 (goto-char (match-beginning 0))
3751 (woman-delete-line 2))) 3748 (woman-delete-line 2)))
3752 (if to (1- to) (point-max)))) 3749 (if to
3750 (- to (+ 1 (length pat)))
3751 (point-max))))
3753 3752
3754(defun woman2-PD (to) 3753(defun woman2-PD (to)
3755 ".PD d -- Set the interparagraph distance to d. 3754 ".PD d -- Set the interparagraph distance to d.
@@ -3893,18 +3892,18 @@ Leave 1 blank line. Format paragraphs upto TO."
3893 (insert (substring overlap i eol)) 3892 (insert (substring overlap i eol))
3894 (setq i (or eol imax))) 3893 (setq i (or eol imax)))
3895 ) 3894 )
3896 ((eq c ?\ ) ; skip 3895 ((eq c ?\s) ; skip
3897 (forward-char)) 3896 (forward-char))
3898 ((eq c ?\t) ; skip 3897 ((eq c ?\t) ; skip
3899 (if (eq (following-char) ?\t) 3898 (if (eq (following-char) ?\t)
3900 (forward-char) ; both tabs, just skip 3899 (forward-char) ; both tabs, just skip
3901 (dotimes (i woman-tab-width) 3900 (dotimes (i woman-tab-width)
3902 (if (eolp) 3901 (if (eolp)
3903 (insert ?\ ) ; extend line 3902 (insert ?\s) ; extend line
3904 (forward-char)) ; skip 3903 (forward-char)) ; skip
3905 ))) 3904 )))
3906 (t 3905 (t
3907 (if (or (eq (following-char) ?\ ) ; overwrite OK 3906 (if (or (eq (following-char) ?\s) ; overwrite OK
3908 overwritten) ; warning only once per ".sp -" 3907 overwritten) ; warning only once per ".sp -"
3909 () 3908 ()
3910 (setq overwritten t) 3909 (setq overwritten t)
@@ -4408,7 +4407,7 @@ tab stop columns or pairs (COLUMN . TYPE) where TYPE is R or C."
4408 tab (- tab (if (eq type ?C) (/ n 2) n))) ) 4407 tab (- tab (if (eq type ?C) (/ n 2) n))) )
4409 (setq n (- tab (current-column))) 4408 (setq n (- tab (current-column)))
4410 (insert-char ?\s n)) 4409 (insert-char ?\s n))
4411 (insert ?\ )))) 4410 (insert ?\s))))
4412 4411
4413(defun woman2-DT (to) 4412(defun woman2-DT (to)
4414 ".DT -- Restore default tabs. Format paragraphs upto TO. 4413 ".DT -- Restore default tabs. Format paragraphs upto TO.
@@ -4426,7 +4425,7 @@ Needs doing properly!"
4426 (if (eolp) 4425 (if (eolp)
4427 (woman-delete-whole-line) ; ignore! 4426 (woman-delete-whole-line) ; ignore!
4428 (let ((delim (following-char)) 4427 (let ((delim (following-char))
4429 (pad ?\ ) end) ; pad defaults to space 4428 (pad ?\s) end) ; pad defaults to space
4430 (forward-char) 4429 (forward-char)
4431 (skip-chars-forward " \t") 4430 (skip-chars-forward " \t")
4432 (or (eolp) (setq pad (following-char))) 4431 (or (eolp) (setq pad (following-char)))
@@ -4457,8 +4456,6 @@ Needs doing properly!"
4457(defun woman2-TS (to) 4456(defun woman2-TS (to)
4458 ".TS -- Start of table code for the tbl processor. 4457 ".TS -- Start of table code for the tbl processor.
4459Format paragraphs upto TO." 4458Format paragraphs upto TO."
4460 ;; This is a preliminary hack that seems to suffice for lilo.8.
4461 (woman-delete-line 1) ; ignore any arguments
4462 (when woman-emulate-tbl 4459 (when woman-emulate-tbl
4463 ;; Assumes column separator is \t and intercolumn spacing is 3. 4460 ;; Assumes column separator is \t and intercolumn spacing is 3.
4464 ;; The first line may optionally be a list of options terminated by 4461 ;; The first line may optionally be a list of options terminated by
@@ -4470,6 +4467,22 @@ Format paragraphs upto TO."
4470 (woman-delete-line 1) 4467 (woman-delete-line 1)
4471 ;; For each column, find its width and align it: 4468 ;; For each column, find its width and align it:
4472 (let ((start (point)) (col 1)) 4469 (let ((start (point)) (col 1))
4470 (WoMan-log "%s" (buffer-substring start (+ start 40)))
4471 ;; change T{ T} to tabs
4472 (while (search-forward "T{\n" to t)
4473 (replace-match "")
4474 (catch 'end
4475 (while (search-forward "\n" to t)
4476 (replace-match " ")
4477 (if (looking-at "T}")
4478 (progn
4479 (delete-char 2)
4480 (throw 'end t))))))
4481 (goto-char start)
4482 ;; strip space and headers
4483 (while (re-search-forward "^\\.TH\\|\\.sp" to t)
4484 (woman-delete-whole-line))
4485 (goto-char start)
4473 (while (prog1 (search-forward "\t" to t) (goto-char start)) 4486 (while (prog1 (search-forward "\t" to t) (goto-char start))
4474 ;; Find current column width: 4487 ;; Find current column width:
4475 (while (< (point) to) 4488 (while (< (point) to)
@@ -4483,8 +4496,25 @@ Format paragraphs upto TO."
4483 (while (< (point) to) 4496 (while (< (point) to)
4484 (when (search-forward "\t" to t) 4497 (when (search-forward "\t" to t)
4485 (delete-char -1) 4498 (delete-char -1)
4486 (insert-char ?\ (- col (current-column)))) 4499 (insert-char ?\s (- col (current-column))))
4487 (forward-line)) 4500 (forward-line))
4501 (goto-char start))
4502 ;; find maximum width
4503 (let ((max-col 0))
4504 (while (search-forward "\n" to t)
4505 (backward-char)
4506 (if (> (current-column) max-col)
4507 (setq max-col (current-column)))
4508 (forward-char))
4509 (goto-char start)
4510 ;; break lines if they are too long
4511 (when (and (> max-col woman-fill-column)
4512 (> woman-fill-column col))
4513 (setq max-col woman-fill-column)
4514 (woman-break-table col to start)
4515 (goto-char start))
4516 (while (re-search-forward "^_$" to t)
4517 (replace-match (make-string max-col ?_)))
4488 (goto-char start)))) 4518 (goto-char start))))
4489 ;; Format table with no filling or adjusting (cf. woman2-nf): 4519 ;; Format table with no filling or adjusting (cf. woman2-nf):
4490 (setq woman-nofill t) 4520 (setq woman-nofill t)
@@ -4494,6 +4524,17 @@ Format paragraphs upto TO."
4494 ;; ".TE -- End of table code for the tbl processor." 4524 ;; ".TE -- End of table code for the tbl processor."
4495 ;; Turn filling and adjusting back on. 4525 ;; Turn filling and adjusting back on.
4496 4526
4527(defun woman-break-table (start-column to start)
4528 (while (< (point) to)
4529 (move-to-column woman-fill-column)
4530 (if (eolp)
4531 (forward-line)
4532 (if (and (search-backward " " start t)
4533 (> (current-column) start-column))
4534 (progn
4535 (insert-char ?\n 1)
4536 (insert-char ?\s (- start-column 5)))
4537 (forward-line)))))
4497 4538
4498;;; WoMan message logging: 4539;;; WoMan message logging:
4499 4540
@@ -4531,7 +4572,7 @@ IGNORED is a string appended to the log message."
4531 (buffer-substring (point) 4572 (buffer-substring (point)
4532 (line-end-position)))) 4573 (line-end-position))))
4533 (if (and (> (length tail) 0) 4574 (if (and (> (length tail) 0)
4534 (/= (string-to-char tail) ?\ )) 4575 (/= (string-to-char tail) ?\s))
4535 (setq tail (concat " " tail))) 4576 (setq tail (concat " " tail)))
4536 (WoMan-log-1 4577 (WoMan-log-1
4537 (concat "** " request tail " request " ignored)))) 4578 (concat "** " request tail " request " ignored))))
diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog
index a4bb243f35d..5451fa38001 100644
--- a/lwlib/ChangeLog
+++ b/lwlib/ChangeLog
@@ -1,3 +1,15 @@
12012-04-18 Paul Eggert <eggert@cs.ucla.edu>
2
3 configure: new option --enable-gcc-warnings (Bug#11207)
4 * Makefile.in (C_WARNINGS_SWITCH): Remove.
5 (WARN_CFLAGS, WERROR_CFLAGS): New macros.
6 (ALL_CFLAGS): Use new macros rather than old.
7
82012-04-11 Glenn Morris <rgm@gnu.org>
9
10 * Makefile.in (C_SWITCH_X_SYSTEM): Remove.
11 (ALL_CFLAGS): Remove C_SWITCH_X_SYSTEM.
12
12011-10-13 Dmitry Antipov <dmantipov@yandex.ru> 132011-10-13 Dmitry Antipov <dmantipov@yandex.ru>
2 14
3 * lwlib-Xaw.c (openFont, xaw_destroy_instance): Replace free with 15 * lwlib-Xaw.c (openFont, xaw_destroy_instance): Replace free with
@@ -1756,7 +1768,7 @@
1756;; coding: utf-8 1768;; coding: utf-8
1757;; End: 1769;; End:
1758 1770
1759 Copyright (C) 1995-1999, 2001-2012 Free Software Foundation, Inc. 1771 Copyright (C) 1995-1999, 2001-2012 Free Software Foundation, Inc.
1760 1772
1761 This file is part of GNU Emacs. 1773 This file is part of GNU Emacs.
1762 1774
diff --git a/lwlib/Makefile.in b/lwlib/Makefile.in
index db108862d70..d43d9ca211e 100644
--- a/lwlib/Makefile.in
+++ b/lwlib/Makefile.in
@@ -1,5 +1,5 @@
1# Copyright (C) 1992, 1993 Lucid, Inc. 1# Copyright (C) 1992, 1993 Lucid, Inc.
2# Copyright (C) 1994, 2001-2012 Free Software Foundation, Inc. 2# Copyright (C) 1994, 2001-2012 Free Software Foundation, Inc.
3# 3#
4# This file is part of the Lucid Widget Library. 4# This file is part of the Lucid Widget Library.
5# 5#
@@ -26,11 +26,11 @@ srcdir=@srcdir@
26VPATH=@srcdir@ 26VPATH=@srcdir@
27@SET_MAKE@ 27@SET_MAKE@
28C_SWITCH_X_SITE=@C_SWITCH_X_SITE@ 28C_SWITCH_X_SITE=@C_SWITCH_X_SITE@
29C_SWITCH_X_SYSTEM=@C_SWITCH_X_SYSTEM@
30C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@ 29C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@
31C_SWITCH_MACHINE=@C_SWITCH_MACHINE@ 30C_SWITCH_MACHINE=@C_SWITCH_MACHINE@
32C_WARNINGS_SWITCH = @C_WARNINGS_SWITCH@
33PROFILING_CFLAGS = @PROFILING_CFLAGS@ 31PROFILING_CFLAGS = @PROFILING_CFLAGS@
32WARN_CFLAGS = `echo @WARN_CFLAGS@ | sed 's/ -Wwrite-strings//'`
33WERROR_CFLAGS = @WERROR_CFLAGS@
34 34
35CC=@CC@ 35CC=@CC@
36CFLAGS=@CFLAGS@ 36CFLAGS=@CFLAGS@
@@ -53,8 +53,8 @@ OBJS = lwlib.o $(TOOLKIT_OBJS) lwlib-utils.o
53## $(srcdir) is where the lwlib sources are. 53## $(srcdir) is where the lwlib sources are.
54## There are no generated lwlib files, hence no need for -I. 54## There are no generated lwlib files, hence no need for -I.
55ALL_CFLAGS= $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \ 55ALL_CFLAGS= $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \
56 $(C_SWITCH_X_SYSTEM) $(C_SWITCH_MACHINE) \ 56 $(C_SWITCH_MACHINE) \
57 $(C_WARNINGS_SWITCH) $(PROFILING_CFLAGS) $(CFLAGS) \ 57 $(WARN_CFLAGS) $(WERROR_CFLAGS) $(PROFILING_CFLAGS) $(CFLAGS) \
58 -DHAVE_CONFIG_H -Demacs -I../src \ 58 -DHAVE_CONFIG_H -Demacs -I../src \
59 -I$(srcdir) -I$(srcdir)/../src -I../lib -I$(srcdir)/../lib 59 -I$(srcdir) -I$(srcdir)/../src -I../lib -I$(srcdir)/../lib
60 60
diff --git a/m4/gl-comp.m4 b/m4/gl-comp.m4
index 4894f840303..73a26c41324 100644
--- a/m4/gl-comp.m4
+++ b/m4/gl-comp.m4
@@ -62,6 +62,7 @@ AC_DEFUN([gl_EARLY],
62 # Code from module largefile: 62 # Code from module largefile:
63 AC_REQUIRE([AC_SYS_LARGEFILE]) 63 AC_REQUIRE([AC_SYS_LARGEFILE])
64 # Code from module lstat: 64 # Code from module lstat:
65 # Code from module manywarnings:
65 # Code from module mktime: 66 # Code from module mktime:
66 # Code from module multiarch: 67 # Code from module multiarch:
67 # Code from module nocrash: 68 # Code from module nocrash:
@@ -100,6 +101,7 @@ AC_DEFUN([gl_EARLY],
100 # Code from module u64: 101 # Code from module u64:
101 # Code from module unistd: 102 # Code from module unistd:
102 # Code from module verify: 103 # Code from module verify:
104 # Code from module warnings:
103]) 105])
104 106
105# This macro should be invoked from ./configure.in, in the section 107# This macro should be invoked from ./configure.in, in the section
@@ -216,6 +218,7 @@ fi
216gl_TIME_MODULE_INDICATOR([time_r]) 218gl_TIME_MODULE_INDICATOR([time_r])
217AC_REQUIRE([AC_C_INLINE]) 219AC_REQUIRE([AC_C_INLINE])
218gl_UNISTD_H 220gl_UNISTD_H
221AC_SUBST([WARN_CFLAGS])
219 gl_gnulib_enabled_dosname=false 222 gl_gnulib_enabled_dosname=false
220 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false 223 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false
221 gl_gnulib_enabled_pathmax=false 224 gl_gnulib_enabled_pathmax=false
@@ -562,6 +565,7 @@ AC_DEFUN([gl_FILE_LIST], [
562 m4/largefile.m4 565 m4/largefile.m4
563 m4/longlong.m4 566 m4/longlong.m4
564 m4/lstat.m4 567 m4/lstat.m4
568 m4/manywarnings.m4
565 m4/md5.m4 569 m4/md5.m4
566 m4/mktime.m4 570 m4/mktime.m4
567 m4/multiarch.m4 571 m4/multiarch.m4
@@ -596,5 +600,6 @@ AC_DEFUN([gl_FILE_LIST], [
596 m4/tm_gmtoff.m4 600 m4/tm_gmtoff.m4
597 m4/unistd_h.m4 601 m4/unistd_h.m4
598 m4/warn-on-use.m4 602 m4/warn-on-use.m4
603 m4/warnings.m4
599 m4/wchar_t.m4 604 m4/wchar_t.m4
600]) 605])
diff --git a/m4/manywarnings.m4 b/m4/manywarnings.m4
new file mode 100644
index 00000000000..fd0e3722d35
--- /dev/null
+++ b/m4/manywarnings.m4
@@ -0,0 +1,184 @@
1# manywarnings.m4 serial 3
2dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6
7dnl From Simon Josefsson
8
9# gl_MANYWARN_COMPLEMENT(OUTVAR, LISTVAR, REMOVEVAR)
10# --------------------------------------------------
11# Copy LISTVAR to OUTVAR except for the entries in REMOVEVAR.
12# Elements separated by whitespace. In set logic terms, the function
13# does OUTVAR = LISTVAR \ REMOVEVAR.
14AC_DEFUN([gl_MANYWARN_COMPLEMENT],
15[
16 gl_warn_set=
17 set x $2; shift
18 for gl_warn_item
19 do
20 case " $3 " in
21 *" $gl_warn_item "*)
22 ;;
23 *)
24 gl_warn_set="$gl_warn_set $gl_warn_item"
25 ;;
26 esac
27 done
28 $1=$gl_warn_set
29])
30
31# gl_MANYWARN_ALL_GCC(VARIABLE)
32# -----------------------------
33# Add all documented GCC warning parameters to variable VARIABLE.
34# Note that you need to test them using gl_WARN_ADD if you want to
35# make sure your gcc understands it.
36AC_DEFUN([gl_MANYWARN_ALL_GCC],
37[
38 dnl First, check if -Wno-missing-field-initializers is needed.
39 dnl -Wmissing-field-initializers is implied by -W, but that issues
40 dnl warnings with GCC version before 4.7, for the common idiom
41 dnl of initializing types on the stack to zero, using { 0, }
42 AC_REQUIRE([AC_PROG_CC])
43 if test -n "$GCC"; then
44
45 dnl First, check -W -Werror -Wno-missing-field-initializers is supported
46 dnl with the current $CC $CFLAGS $CPPFLAGS.
47 AC_MSG_CHECKING([whether -Wno-missing-field-initializers is supported])
48 AC_CACHE_VAL([gl_cv_cc_nomfi_supported], [
49 gl_save_CFLAGS="$CFLAGS"
50 CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
51 AC_COMPILE_IFELSE(
52 [AC_LANG_PROGRAM([[]], [[]])],
53 [gl_cv_cc_nomfi_supported=yes],
54 [gl_cv_cc_nomfi_supported=no])
55 CFLAGS="$gl_save_CFLAGS"])
56 AC_MSG_RESULT([$gl_cv_cc_nomfi_supported])
57
58 if test "$gl_cv_cc_nomfi_supported" = yes; then
59 dnl Now check whether -Wno-missing-field-initializers is needed
60 dnl for the { 0, } construct.
61 AC_MSG_CHECKING([whether -Wno-missing-field-initializers is needed])
62 AC_CACHE_VAL([gl_cv_cc_nomfi_needed], [
63 gl_save_CFLAGS="$CFLAGS"
64 CFLAGS="$CFLAGS -W -Werror"
65 AC_COMPILE_IFELSE(
66 [AC_LANG_PROGRAM(
67 [[void f (void)
68 {
69 typedef struct { int a; int b; } s_t;
70 s_t s1 = { 0, };
71 }
72 ]],
73 [[]])],
74 [gl_cv_cc_nomfi_needed=no],
75 [gl_cv_cc_nomfi_needed=yes])
76 CFLAGS="$gl_save_CFLAGS"
77 ])
78 AC_MSG_RESULT([$gl_cv_cc_nomfi_needed])
79 fi
80 fi
81
82 gl_manywarn_set=
83 for gl_manywarn_item in \
84 -Wall \
85 -W \
86 -Wformat-y2k \
87 -Wformat-nonliteral \
88 -Wformat-security \
89 -Winit-self \
90 -Wmissing-include-dirs \
91 -Wswitch-default \
92 -Wswitch-enum \
93 -Wunused \
94 -Wunknown-pragmas \
95 -Wstrict-aliasing \
96 -Wstrict-overflow \
97 -Wsystem-headers \
98 -Wfloat-equal \
99 -Wtraditional \
100 -Wtraditional-conversion \
101 -Wdeclaration-after-statement \
102 -Wundef \
103 -Wshadow \
104 -Wunsafe-loop-optimizations \
105 -Wpointer-arith \
106 -Wbad-function-cast \
107 -Wc++-compat \
108 -Wcast-qual \
109 -Wcast-align \
110 -Wwrite-strings \
111 -Wconversion \
112 -Wsign-conversion \
113 -Wlogical-op \
114 -Waggregate-return \
115 -Wstrict-prototypes \
116 -Wold-style-definition \
117 -Wmissing-prototypes \
118 -Wmissing-declarations \
119 -Wmissing-noreturn \
120 -Wmissing-format-attribute \
121 -Wpacked \
122 -Wpadded \
123 -Wredundant-decls \
124 -Wnested-externs \
125 -Wunreachable-code \
126 -Winline \
127 -Winvalid-pch \
128 -Wlong-long \
129 -Wvla \
130 -Wvolatile-register-var \
131 -Wdisabled-optimization \
132 -Wstack-protector \
133 -Woverlength-strings \
134 -Wbuiltin-macro-redefined \
135 -Wmudflap \
136 -Wpacked-bitfield-compat \
137 -Wsync-nand \
138 ; do
139 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
140 done
141 # The following are not documented in the manual but are included in
142 # output from gcc --help=warnings.
143 for gl_manywarn_item in \
144 -Wattributes \
145 -Wcoverage-mismatch \
146 -Wmultichar \
147 -Wunused-macros \
148 ; do
149 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
150 done
151 # More warnings from gcc 4.6.2 --help=warnings.
152 for gl_manywarn_item in \
153 -Wabi \
154 -Wcpp \
155 -Wdeprecated \
156 -Wdeprecated-declarations \
157 -Wdiv-by-zero \
158 -Wdouble-promotion \
159 -Wendif-labels \
160 -Wextra \
161 -Wformat-contains-nul \
162 -Wformat-extra-args \
163 -Wformat-zero-length \
164 -Wformat=2 \
165 -Wmultichar \
166 -Wnormalized=nfc \
167 -Woverflow \
168 -Wpointer-to-int-cast \
169 -Wpragmas \
170 -Wsuggest-attribute=const \
171 -Wsuggest-attribute=noreturn \
172 -Wsuggest-attribute=pure \
173 -Wtrampolines \
174 ; do
175 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
176 done
177
178 # Disable the missing-field-initializers warning if needed
179 if test "$gl_cv_cc_nomfi_needed" = yes; then
180 gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
181 fi
182
183 $1=$gl_manywarn_set
184])
diff --git a/m4/warnings.m4 b/m4/warnings.m4
new file mode 100644
index 00000000000..c14c4801e78
--- /dev/null
+++ b/m4/warnings.m4
@@ -0,0 +1,42 @@
1# warnings.m4 serial 6
2dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6
7dnl From Simon Josefsson
8
9# gl_AS_VAR_APPEND(VAR, VALUE)
10# ----------------------------
11# Provide the functionality of AS_VAR_APPEND if Autoconf does not have it.
12m4_ifdef([AS_VAR_APPEND],
13[m4_copy([AS_VAR_APPEND], [gl_AS_VAR_APPEND])],
14[m4_define([gl_AS_VAR_APPEND],
15[AS_VAR_SET([$1], [AS_VAR_GET([$1])$2])])])
16
17
18# gl_WARN_ADD(PARAMETER, [VARIABLE = WARN_CFLAGS])
19# ------------------------------------------------
20# Adds parameter to WARN_CFLAGS if the compiler supports it. For example,
21# gl_WARN_ADD([-Wparentheses]).
22#
23# If VARIABLE is a variable name, AC_SUBST it.
24AC_DEFUN([gl_WARN_ADD],
25dnl FIXME: gl_Warn must be used unquoted until we can assume
26dnl autoconf 2.64 or newer.
27[AS_VAR_PUSHDEF([gl_Warn], [gl_cv_warn_[]_AC_LANG_ABBREV[]_$1])dnl
28AS_VAR_PUSHDEF([gl_Flags], [_AC_LANG_PREFIX[]FLAGS])dnl
29AC_CACHE_CHECK([whether _AC_LANG compiler handles $1], m4_defn([gl_Warn]), [
30 gl_save_compiler_FLAGS="$gl_Flags"
31 gl_Flags="$gl_Flags $1"
32 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
33 [AS_VAR_SET(gl_Warn, [yes])],
34 [AS_VAR_SET(gl_Warn, [no])])
35 gl_Flags="$gl_save_compiler_FLAGS"
36])
37AS_VAR_IF(gl_Warn, [yes],
38 [gl_AS_VAR_APPEND(m4_if([$2], [], [[WARN_CFLAGS]], [[$2]]), [" $1"])])
39AS_VAR_POPDEF([gl_Flags])dnl
40AS_VAR_POPDEF([gl_Warn])dnl
41m4_ifval([$2], [AS_LITERAL_IF([$2], [AC_SUBST([$2])], [])])dnl
42])
diff --git a/msdos/ChangeLog b/msdos/ChangeLog
index 0c00364d6fa..603baa978e0 100644
--- a/msdos/ChangeLog
+++ b/msdos/ChangeLog
@@ -1,3 +1,25 @@
12012-04-21 Eli Zaretskii <eliz@gnu.org>
2
3 * sedleim.inp (RUN_EMACS): Replace BUILT_EMACS with EMACS.
4 Remove stale editing of "else make quail".
5 (.PHONY, compile-targets): Remove targets.
6 (compile-main): Edit into something that can be done without
7 requiring a Unixy shell.
8 (bootstrap-clean): Likewise: edit to not require $(setwins).
9
10 * sed1v2.inp: Edit "cd $(leimdir) && $(MAKE) ..." into the
11 equivalent "$(MAKE) $(MFLAGS) -C $(leimdir) ..." command.
12
132012-04-18 Paul Eggert <eggert@cs.ucla.edu>
14
15 configure: new option --enable-gcc-warnings (Bug#11207)
16 * sed1v2.inp, sed3v2.inp, sedlibmk.inp: GNULIB_WARN_CFLAGS,
17 WARN_CFLAGS, and WERROR_CFLAGS replace C_WARNINGS_SWITCH.
18
192012-04-11 Glenn Morris <rgm@gnu.org>
20
21 * sedlibmk.inp, sed1v2.inp: GNUSTEP_CFLAGS replaces C_SWITCH_X_SYSTEM.
22
12012-04-07 Glenn Morris <rgm@gnu.org> 232012-04-07 Glenn Morris <rgm@gnu.org>
2 24
3 * sed2v2.inp: Bump version to 24.1.50. 25 * sed2v2.inp: Bump version to 24.1.50.
@@ -1312,7 +1334,7 @@
1312;; coding: utf-8 1334;; coding: utf-8
1313;; End: 1335;; End:
1314 1336
1315 Copyright (C) 1994-1999, 2001-2012 Free Software Foundation, Inc. 1337 Copyright (C) 1994-1999, 2001-2012 Free Software Foundation, Inc.
1316 1338
1317 This file is part of GNU Emacs. 1339 This file is part of GNU Emacs.
1318 1340
diff --git a/msdos/sed1v2.inp b/msdos/sed1v2.inp
index c13fbe621f4..b9e94afea51 100644
--- a/msdos/sed1v2.inp
+++ b/msdos/sed1v2.inp
@@ -2,7 +2,7 @@
2# Configuration script for src/Makefile under DJGPP v2.x 2# Configuration script for src/Makefile under DJGPP v2.x
3# ---------------------------------------------------------------------- 3# ----------------------------------------------------------------------
4# 4#
5# Copyright (C) 1996-1997, 1999-2012 Free Software Foundation, Inc. 5# Copyright (C) 1996-1997, 1999-2012 Free Software Foundation, Inc.
6# 6#
7# This file is part of GNU Emacs. 7# This file is part of GNU Emacs.
8# 8#
@@ -39,9 +39,10 @@ s/\.h\.in/.h-in/
39/^LIBOBJS *=/s/@[^@\n]*@// 39/^LIBOBJS *=/s/@[^@\n]*@//
40/^C_SWITCH_MACHINE *=/s/@C_SWITCH_MACHINE@// 40/^C_SWITCH_MACHINE *=/s/@C_SWITCH_MACHINE@//
41/^C_SWITCH_SYSTEM *=/s/@C_SWITCH_SYSTEM@// 41/^C_SWITCH_SYSTEM *=/s/@C_SWITCH_SYSTEM@//
42/^C_SWITCH_X_SYSTEM *=/s/@C_SWITCH_X_SYSTEM@// 42/^GNUSTEP_CFLAGS *=/s/@GNUSTEP_CFLAGS@//
43/^C_SWITCH_X_SITE *=/s/@C_SWITCH_X_SITE@// 43/^C_SWITCH_X_SITE *=/s/@C_SWITCH_X_SITE@//
44/^C_WARNINGS_SWITCH *=/s/@C_WARNINGS_SWITCH@// 44/^WARN_CFLAGS *=/s/@WARN_CFLAGS@//
45/^WERROR_CFLAGS *=/s/@WERROR_CFLAGS@//
45/^PROFILING_CFLAGS *=/s/@PROFILING_CFLAGS@// 46/^PROFILING_CFLAGS *=/s/@PROFILING_CFLAGS@//
46#/^LD_SWITCH_X_SITE *=/s/@LD_SWITCH_X_SITE@// 47#/^LD_SWITCH_X_SITE *=/s/@LD_SWITCH_X_SITE@//
47/^LD_SWITCH_SYSTEM_TEMACS *=/s/@LD_SWITCH_SYSTEM_TEMACS@// 48/^LD_SWITCH_SYSTEM_TEMACS *=/s/@LD_SWITCH_SYSTEM_TEMACS@//
@@ -151,6 +152,8 @@ s/^ [^ ]*move-if-change / update /
151/^ echo[ ][ ]*timestamp/s/echo /djecho / 152/^ echo[ ][ ]*timestamp/s/echo /djecho /
152/^ .*djecho timestamp/a\ 153/^ .*djecho timestamp/a\
153 @rm -f gl-tmp 154 @rm -f gl-tmp
155/^ cd \$(leimdir) && \$(MAKE)/c\
156 $(MAKE) $(MFLAGS) -C $(leimdir) leim-list.el EMACS=$(bootstrap_exe)
154/^ cd \$(lib) && \$(MAKE)/c\ 157/^ cd \$(lib) && \$(MAKE)/c\
155 $(MAKE) $(MFLAGS) -C $(lib) libgnu.a 158 $(MAKE) $(MFLAGS) -C $(lib) libgnu.a
156/^RUN_TEMACS *=/s|`/bin/pwd`|.| 159/^RUN_TEMACS *=/s|`/bin/pwd`|.|
@@ -186,7 +189,7 @@ s/echo.*buildobj.lst/dj&/
186/^ *THEFILE=/s|$|\; cd ../src| 189/^ *THEFILE=/s|$|\; cd ../src|
187/^ echo.* buildobj.h/s|echo |djecho | 190/^ echo.* buildobj.h/s|echo |djecho |
188# Make the GCC command line fit one screen line 191# Make the GCC command line fit one screen line
189/^[ ][ ]*\$(C_SWITCH_X_SYSTEM)/d 192/^[ ][ ]*\$(GNUSTEP_CFLAGS)/d
190/^[ ][ ]*\$(GCONF_CFLAGS)/d 193/^[ ][ ]*\$(GCONF_CFLAGS)/d
191/^[ ][ ]*\$(LIBGNUTLS_CFLAGS)/d 194/^[ ][ ]*\$(LIBGNUTLS_CFLAGS)/d
192s/\$(LIBOTF_CFLAGS) \$(M17N_FLT_CFLAGS) \$(DEPFLAGS) // 195s/\$(LIBOTF_CFLAGS) \$(M17N_FLT_CFLAGS) \$(DEPFLAGS) //
diff --git a/msdos/sed3v2.inp b/msdos/sed3v2.inp
index c147ad64cf9..faa57996a25 100644
--- a/msdos/sed3v2.inp
+++ b/msdos/sed3v2.inp
@@ -38,7 +38,8 @@ s/-DVERSION[^ ]* //
38/^CFLAGS *=/s!=.*$!=-O2 -g! 38/^CFLAGS *=/s!=.*$!=-O2 -g!
39/^C_SWITCH_SYSTEM *=/s!=.*$!=-DMSDOS! 39/^C_SWITCH_SYSTEM *=/s!=.*$!=-DMSDOS!
40/^C_SWITCH_MACHINE *=/s/@C_SWITCH_MACHINE@// 40/^C_SWITCH_MACHINE *=/s/@C_SWITCH_MACHINE@//
41/^C_WARNINGS_SWITCH *=/s/@C_WARNINGS_SWITCH@// 41/^WARN_CFLAGS *=/s/@WARN_CFLAGS@//
42/^WERROR_CFLAGS *=/s/@WERROR_CFLAGS@//
42/^PROFILING_CFLAGS *=/s/@PROFILING_CFLAGS@// 43/^PROFILING_CFLAGS *=/s/@PROFILING_CFLAGS@//
43/^ALLOCA *=/s!@ALLOCA@!! 44/^ALLOCA *=/s!@ALLOCA@!!
44/^EXEEXT *=/s!@EXEEXT@!! 45/^EXEEXT *=/s!@EXEEXT@!!
@@ -51,4 +52,3 @@ s!^ \./! !
51} 52}
52/^insrcdir=/s/^.*$/\#&/ 53/^insrcdir=/s/^.*$/\#&/
53/^ *\$(insrcdir) ||/s,\$(insrcdir) ||,command.com /c if not exist $(<F), 54/^ *\$(insrcdir) ||/s,\$(insrcdir) ||,command.com /c if not exist $(<F),
54
diff --git a/msdos/sedleim.inp b/msdos/sedleim.inp
index 773934e64aa..41f87d92047 100644
--- a/msdos/sedleim.inp
+++ b/msdos/sedleim.inp
@@ -33,14 +33,11 @@ s|\([ ]\)echo|\1djecho|g
33 33
34/RUN_EMACS *=/,/^$/c\ 34/RUN_EMACS *=/,/^$/c\
35export EMACSLOADPATH=${buildlisppath}\ 35export EMACSLOADPATH=${buildlisppath}\
36RUN_EMACS = ${BUILT_EMACS} -batch --no-site-file 36RUN_EMACS = ${EMACS} -batch --no-site-file
37 37
38/^ cd ../c\ 38/^ cd ../c\
39 ${MAKE} -C ../src ${MFLAGS} emacs 39 ${MAKE} -C ../src ${MFLAGS} emacs
40 40
41/else make quail/c\
42 if not exist quail\\nul make quail
43
44/if \[ -f $@ \]\; then true/d 41/if \[ -f $@ \]\; then true/d
45/fi$/s/; fi$// 42/fi$/s/; fi$//
46 43
@@ -51,9 +48,23 @@ RUN_EMACS = ${BUILT_EMACS} -batch --no-site-file
51 /^ --eval/,/; \\$/s|\; \\|| 48 /^ --eval/,/; \\$/s|\; \\||
52} 49}
53 50
51/^setwins=/,/^$/d
52/^\.PHONY: compile-targets/d
53/^compile-targets:/d
54/^compile-main:/,/^$/c\
55compile-main: ${TIT_MISC}\
56 $(MAKE) $(MFLAGS) $(foreach f,$(wildcard ja-dic/*.el),$(basename $f).elc)\
57 $(MAKE) $(MFLAGS) $(foreach f,$(wildcard quail/*.el),$(basename $f).elc)\
58
59
54/^install:/,/^$/c\ 60/^install:/,/^$/c\
55install: all\ 61install: all\
56 62
63/^bootstrap-clean:/,/^$/c\
64bootstrap-clean: clean\
65 rm -f ja-dic/*.elc quail/*.elc\
66
67
57/^ if test -f/d 68/^ if test -f/d
58/^distclean:/,/^$/ { 69/^distclean:/,/^$/ {
59 s|\(rm -f Makefile\)|\1 stamp-subdir| 70 s|\(rm -f Makefile\)|\1 stamp-subdir|
diff --git a/msdos/sedlibmk.inp b/msdos/sedlibmk.inp
index e13464a9b88..4b4b5f24d4c 100644
--- a/msdos/sedlibmk.inp
+++ b/msdos/sedlibmk.inp
@@ -2,7 +2,7 @@
2# Configuration script for lib/Makefile under DJGPP v2.x 2# Configuration script for lib/Makefile under DJGPP v2.x
3# ---------------------------------------------------------------------- 3# ----------------------------------------------------------------------
4# 4#
5# Copyright (C) 2011-2012 Free Software Foundation, Inc. 5# Copyright (C) 2011-2012 Free Software Foundation, Inc.
6# 6#
7# This file is part of GNU Emacs. 7# This file is part of GNU Emacs.
8# 8#
@@ -27,7 +27,7 @@
27# otherwise edit them to zero: 27# otherwise edit them to zero:
28# 28#
29# /^REPLACE_CALLOC *=/s/@REPLACE_CALLOC@/0/ 29# /^REPLACE_CALLOC *=/s/@REPLACE_CALLOC@/0/
30# 30#
31# . If the module is a header or adds headers, edit the corresponding 31# . If the module is a header or adds headers, edit the corresponding
32# variable to either an empty value or to the name of the header. 32# variable to either an empty value or to the name of the header.
33# Examples: 33# Examples:
@@ -124,9 +124,11 @@ am__cd = cd
124/^CYGWIN_OBJ *=/s/@[^@\n]*@// 124/^CYGWIN_OBJ *=/s/@[^@\n]*@//
125/^C_SWITCH_MACHINE *=/s/@C_SWITCH_MACHINE@// 125/^C_SWITCH_MACHINE *=/s/@C_SWITCH_MACHINE@//
126/^C_SWITCH_SYSTEM *=/s/@C_SWITCH_SYSTEM@// 126/^C_SWITCH_SYSTEM *=/s/@C_SWITCH_SYSTEM@//
127/^C_SWITCH_X_SYSTEM *=/s/@C_SWITCH_X_SYSTEM@// 127/^GNUSTEP_CFLAGS *=/s/@GNUSTEP_CFLAGS@//
128/^C_SWITCH_X_SITE *=/s/@C_SWITCH_X_SITE@// 128/^C_SWITCH_X_SITE *=/s/@C_SWITCH_X_SITE@//
129/^C_WARNINGS_SWITCH *=/s/@C_WARNINGS_SWITCH@// 129/^GNULIB_WARN_CFLAGS *=/s/@GNULIB_WARN_CFLAGS@//
130/^WARN_CFLAGS *=/s/@WARN_CFLAGS@//
131/^WERROR_CFLAGS *=/s/@WERROR_CFLAGS@//
130/^DEFS *=/s/@[^@\n]*@/-DHAVE_CONFIG_H/ 132/^DEFS *=/s/@[^@\n]*@/-DHAVE_CONFIG_H/
131/^DEPDIR *=/s/@[^@\n]*@/deps/ 133/^DEPDIR *=/s/@[^@\n]*@/deps/
132/^DEPFLAGS *=/s/@[^@\n]*@/-MMD -MF ${DEPDIR}\/$*.d/ 134/^DEPFLAGS *=/s/@[^@\n]*@/-MMD -MF ${DEPDIR}\/$*.d/
diff --git a/nt/ChangeLog b/nt/ChangeLog
index 349a43fe692..c76695a4a99 100644
--- a/nt/ChangeLog
+++ b/nt/ChangeLog
@@ -1,3 +1,13 @@
12012-04-14 Dani Moncayo <dmoncayo@gmail.com> (tiny change)
2
3 * makefile.w32-in: Fix typo (Bug#10261).
4
52012-04-10 Eli Zaretskii <eliz@gnu.org>
6
7 * makefile.w32-in (emacs, misc, lispref, lispintro): New targets,
8 each runs makeinfo in its own subdirectory of 'doc'.
9 (info-gmake): Depend on these new targets.
10
12012-04-07 Glenn Morris <rgm@gnu.org> 112012-04-07 Glenn Morris <rgm@gnu.org>
2 12
3 * config.nt, makefile.w32-in, emacs.rc, emacsclient.rc: 13 * config.nt, makefile.w32-in, emacs.rc, emacsclient.rc:
@@ -1185,7 +1195,7 @@
11852005-06-05 Eli Zaretskii <eliz@gnu.org> 11952005-06-05 Eli Zaretskii <eliz@gnu.org>
1186 1196
1187 * inc/sys/socket.h: Change arg 4 of sys_setsockopt to 1197 * inc/sys/socket.h: Change arg 4 of sys_setsockopt to
1188 `const void *', for consistency with Posix. 1198 `const void *', for consistency with POSIX.
1189 1199
11902005-06-04 Eli Zaretskii <eliz@gnu.org> 12002005-06-04 Eli Zaretskii <eliz@gnu.org>
1191 1201
diff --git a/nt/makefile.w32-in b/nt/makefile.w32-in
index f090849e6a9..3ddf3a04cb6 100644
--- a/nt/makefile.w32-in
+++ b/nt/makefile.w32-in
@@ -264,10 +264,10 @@ install-shortcuts: $(INSTALL_DIR)/bin
264maybe-copy-distfiles: maybe-copy-distfiles-$(SHELLTYPE) 264maybe-copy-distfiles: maybe-copy-distfiles-$(SHELLTYPE)
265 265
266maybe-copy-distfiles-CMD: create-tmp-dist-dir doit 266maybe-copy-distfiles-CMD: create-tmp-dist-dir doit
267 @if not $(ARGQUOTE)$(DIST_FILES)$(ARGQUOTE)=="" $(CP_DIR) $(DIST_FILES) $(TMP_DIST_DIR)/bin 267 @if not $(ARGQUOTE)$(DIST_FILES)$(ARGQUOTE) == "" $(CP_DIR) $(DIST_FILES) $(TMP_DIST_DIR)/bin
268 268
269maybe-copy-distfiles-SH: create-tmp-dist-dir doit 269maybe-copy-distfiles-SH: create-tmp-dist-dir doit
270 @if [ ! $(ARGQUOTE)$(DIST_FILES)$(ARGQUOTE)=="" ] ; then \ 270 @if [ ! $(ARGQUOTE)$(DIST_FILES)$(ARGQUOTE) == "" ] ; then \
271 $(CP_DIR) $(DIST_FILES) $(TMP_DIST_DIR)/bin ; \ 271 $(CP_DIR) $(DIST_FILES) $(TMP_DIST_DIR)/bin ; \
272 fi 272 fi
273 273
@@ -307,11 +307,11 @@ info-nmake:
307 $(MAKE) $(MFLAGS) info 307 $(MAKE) $(MFLAGS) info
308 cd $(MAKEDIR) 308 cd $(MAKEDIR)
309 309
310info-gmake: 310info-gmake: emacs misc lispref lispintro
311 $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../doc/emacs info 311
312 $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../doc/misc info 312emacs misc lispref lispintro:
313 $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../doc/lispref info 313 $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../doc/$@ info
314 $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../doc/lispintro info 314
315# 315#
316# Maintenance 316# Maintenance
317# 317#
diff --git a/oldXMenu/ChangeLog b/oldXMenu/ChangeLog
index 1d3091c6bb4..b1eb200416b 100644
--- a/oldXMenu/ChangeLog
+++ b/oldXMenu/ChangeLog
@@ -1,3 +1,15 @@
12012-04-18 Paul Eggert <eggert@cs.ucla.edu>
2
3 configure: new option --enable-gcc-warnings (Bug#11207)
4 * Makefile.in (C_WARNINGS_SWITCH): Remove.
5 (WARN_CFLAGS, WERROR_CFLAGS): New macros.
6 (ALL_CFLAGS): Use new macros rather than old.
7
82012-04-11 Glenn Morris <rgm@gnu.org>
9
10 * Makefile.in (C_SWITCH_X_SYSTEM): Remove.
11 (ALL_CFLAGS): Remove C_SWITCH_X_SYSTEM.
12
12011-04-16 Paul Eggert <eggert@cs.ucla.edu> 132011-04-16 Paul Eggert <eggert@cs.ucla.edu>
2 14
3 Static checks with GCC 4.6.0 and non-default toolkits. 15 Static checks with GCC 4.6.0 and non-default toolkits.
@@ -615,7 +627,7 @@
615;; coding: utf-8 627;; coding: utf-8
616;; End: 628;; End:
617 629
618 Copyright (C) 1993-1999, 2001-2012 Free Software Foundation, Inc. 630 Copyright (C) 1993-1999, 2001-2012 Free Software Foundation, Inc.
619 631
620 This file is part of GNU Emacs. 632 This file is part of GNU Emacs.
621 633
diff --git a/oldXMenu/Makefile.in b/oldXMenu/Makefile.in
index 94c49fb9966..01855f6585b 100644
--- a/oldXMenu/Makefile.in
+++ b/oldXMenu/Makefile.in
@@ -1,4 +1,4 @@
1## Makefile for oldXMenu 1## Makefile for oldXMenu
2 2
3## Copyright 1985, 1986, 1987 by the Massachusetts Institute of Technology 3## Copyright 1985, 1986, 1987 by the Massachusetts Institute of Technology
4 4
@@ -15,7 +15,7 @@
15## without express or implied warranty. 15## without express or implied warranty.
16 16
17 17
18## Copyright (C) 2001-2012 Free Software Foundation, Inc. 18## Copyright (C) 2001-2012 Free Software Foundation, Inc.
19 19
20## This program is free software: you can redistribute it and/or modify 20## This program is free software: you can redistribute it and/or modify
21## it under the terms of the GNU General Public License as published by 21## it under the terms of the GNU General Public License as published by
@@ -45,11 +45,11 @@
45srcdir=@srcdir@ 45srcdir=@srcdir@
46VPATH=@srcdir@ 46VPATH=@srcdir@
47C_SWITCH_X_SITE=@C_SWITCH_X_SITE@ 47C_SWITCH_X_SITE=@C_SWITCH_X_SITE@
48C_SWITCH_X_SYSTEM=@C_SWITCH_X_SYSTEM@
49C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@ 48C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@
50C_SWITCH_MACHINE=@C_SWITCH_MACHINE@ 49C_SWITCH_MACHINE=@C_SWITCH_MACHINE@
51C_WARNINGS_SWITCH = @C_WARNINGS_SWITCH@
52PROFILING_CFLAGS = @PROFILING_CFLAGS@ 50PROFILING_CFLAGS = @PROFILING_CFLAGS@
51WARN_CFLAGS = @WARN_CFLAGS@
52WERROR_CFLAGS = @WERROR_CFLAGS@
53 53
54EXTRA=insque.o 54EXTRA=insque.o
55CC=@CC@ 55CC=@CC@
@@ -88,8 +88,8 @@ OBJS = Activate.o \
88all:: libXMenu11.a 88all:: libXMenu11.a
89 89
90ALL_CFLAGS=$(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) \ 90ALL_CFLAGS=$(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) \
91 $(C_SWITCH_X_SITE) $(C_SWITCH_X_SYSTEM) \ 91 $(C_SWITCH_X_SITE) \
92 ${C_WARNINGS_SWITCH} ${PROFILING_CFLAGS} \ 92 $(WARN_CFLAGS) $(WERROR_CFLAGS) ${PROFILING_CFLAGS} \
93 $(CPPFLAGS) $(CFLAGS) -DEMACS_BITMAP_FILES \ 93 $(CPPFLAGS) $(CFLAGS) -DEMACS_BITMAP_FILES \
94 -I../src -I${srcdir} -I${srcdir}/../src 94 -I../src -I${srcdir} -I${srcdir}/../src
95 95
diff --git a/src/ChangeLog b/src/ChangeLog
index 71fb5d9ab2a..ae8ab9420a8 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,4 +1,4 @@
12012-04-09 Paul Eggert <eggert@cs.ucla.edu> 12012-04-21 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 Fix integer width and related bugs (Bug#9874). 3 Fix integer width and related bugs (Bug#9874).
4 * alloc.c (pure_bytes_used_lisp, pure_bytes_used_non_lisp): 4 * alloc.c (pure_bytes_used_lisp, pure_bytes_used_non_lisp):
@@ -790,6 +790,187 @@
790 rather than rolling our own approximation. 790 rather than rolling our own approximation.
791 (SCROLL_BAR_VEC_SIZE): Remove; not used. 791 (SCROLL_BAR_VEC_SIZE): Remove; not used.
792 792
7932012-04-21 Eduard Wiebe <usenet@pusto.de>
794
795 * sysdep.c (list_system_processes, system_process_attributes): Add
796 implementation for FreeBSD (Bug#5243).
797
7982012-04-21 Andreas Schwab <schwab@linux-m68k.org>
799
800 * lisp.mk (lisp): Update.
801
8022012-04-20 Paul Eggert <eggert@cs.ucla.edu>
803
804 * keyboard.c (process_pending_signals): Define only if SYNC_INPUT.
805 It is never used otherwise.
806
8072012-04-20 Stefan Monnier <monnier@iro.umontreal.ca>
808
809 * print.c (print_preprocess): Only check print_depth if print-circle
810 is nil.
811 (print_object): Check for cycles even when print-circle is nil and
812 print-gensym is t, but only check print_depth if print-circle is nil.
813
8142012-04-20 Chong Yidong <cyd@gnu.org>
815
816 * process.c (wait_reading_process_output): If EIO occurs on a pty,
817 set the status to "failed" and ensure that sentinel is run.
818
8192012-04-20 Glenn Morris <rgm@gnu.org>
820
821 * process.c (Fset_process_inherit_coding_system_flag)
822 (Fset_process_query_on_exit_flag): Doc fix (mention return value).
823 (Fmake_network_process, Fmake_serial_process): Doc fix.
824
8252012-04-20 Eli Zaretskii <eliz@gnu.org>
826
827 * xdisp.c (string_buffer_position_lim): Limit starting position to
828 BEGV.
829 (set_cursor_from_row): If called for a mode-line or header-line
830 row, return zero immediately.
831 (try_cursor_movement): If inside continuation line, don't back up
832 farther than the first row after the header line, if any.
833 Don't consider the header-line row as "partially visible", even if
834 MATRIX_ROW_PARTIALLY_VISIBLE_P returns non-zero. (Bug#11261)
835
8362012-04-20 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
837
838 * lread.c (lisp_file_lexically_bound_p): Fix hang at ";-*-\n"
839 (bug#11238).
840
8412012-04-20 Teodor Zlatanov <tzz@lifelogs.com>
8422012-04-18 Paul Eggert <eggert@cs.ucla.edu>
843
844 configure: new option --enable-gcc-warnings (Bug#11207)
845 * Makefile.in (C_WARNINGS_SWITCH): Remove.
846 (WARN_CFLAGS, WERROR_CFLAGS): New macros.
847 (ALL_CFLAGS): Use new macros rather than old.
848 * process.c: Ignore -Wstrict-overflow to work around GCC bug 52904.
849 * regex.c: Ignore -Wstrict-overflow. If !emacs, also ignore
850 -Wunused-but-set-variable, -Wunused-function, -Wunused-macros,
851 -Wunused-result, -Wunused-variable. This should go away once
852 the Emacs and Gnulib regex code is merged.
853 (xmalloc, xrealloc): Now static.
854
8552012-04-17 Paul Eggert <eggert@cs.ucla.edu>
856
857 * dired.c (Fsystem_groups): Remove unused local.
858
8592012-04-17 Glenn Morris <rgm@gnu.org>
860
861 * dired.c (Fsystem_users): Doc fix.
862
8632012-04-17 Dmitry Antipov <dmantipov@yandex.ru>
864
865 * dired.c (Fsystem_users, Fsystem_groups): New functions. (Bug#7900)
866 (syms_of_dired): Add them.
867
8682012-04-16 Paul Eggert <eggert@cs.ucla.edu>
869
870 Fix minor alloc.c problems found by static checking.
871 * alloc.c (_malloc_internal, _free_internal) [!DOUG_LEA_MALLOC]:
872 New extern decls, to avoid calling undeclared functions.
873 (dont_register_blocks): Define if ((!SYSTEM_MALLOC && !SYNC_INPUT)
874 && GC_MALLOC_CHECK), not if ((GC_MARK_STACK || defined
875 GC_MALLOC_CHECK) && GC_MALLOC_CHECK), to match when it's used.
876 (NEED_MEM_INSERT): New macro.
877 (mem_insert, mem_insert_fixup) [!NEED_MEM_INSERT]: Remove; unused.
878 Remove one incorrect comment and fix another.
879
880 Fix minor ralloc.c problems found by static checking.
881 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
882 * ralloc.c (ALIGNED, ROUND_TO_PAGE, HEAP_PTR_SIZE)
883 (r_alloc_size_in_use, r_alloc_freeze, r_alloc_thaw): Remove; unused.
884 (r_alloc_sbrk): Now static.
885
886 Improve ralloc.c interface checking.
887 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
888 * buffer.c (ralloc_reset_variable, r_alloc, r_re_alloc)
889 (r_alloc_free) [REL_ALLOC]: Move decls from here ...
890 * lisp.h (r_alloc, r_alloc_free, r_re_alloc, r_alloc_reset_variable)
891 [REL_ALLOC]: ... to here, to check interface.
892 * m/ia64.h (r_alloc, r_alloc_free) [REL_ALLOC && !_MALLOC_INTERNAL]:
893 Remove decls. This fixes an "It stinks!".
894
895 * alloc.c (which_symbols): Fix alignment issue / type clash.
896
8972012-04-15 Andreas Schwab <schwab@linux-m68k.org>
898
899 * lisp.h (struct Lisp_Symbol): Remove explicit padding.
900 (struct Lisp_Misc_Any): Likewise.
901 (struct Lisp_Free): Likewise.
902 * alloc.c (union aligned_Lisp_Symbol): Define.
903 (SYMBOL_BLOCK_SIZE, struct symbol_block): Use union
904 aligned_Lisp_Symbol instead of struct Lisp_Symbol.
905 (union aligned_Lisp_Misc): Define.
906 (MARKER_BLOCK_SIZE, struct marker_block): Use union
907 aligned_Lisp_Misc instead of union Lisp_Misc.
908 (Fmake_symbol, allocate_misc, gc_sweep): Adjust.
909
9102012-04-14 Paul Eggert <eggert@cs.ucla.edu>
911
912 Make GC_MAKE_GCPROS_NOOPS the default (Bug#9926).
913 * lisp.h (GC_MARK_STACK): Default to GC_MAKE_GCPROS_NOOPS.
914 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/gnu.h, s/irix6-5.h, s/msdos.h:
915 * s/netbsd.h, s/sol2-6.h:
916 Remove definition of GC_MARK_STACK, since the default now works.
917 * s/aix4-2.h, s/hpux10-20.h, s/unixware.h:
918 Define GC_MARK_STACK to GC_USE_GCPROS_AS_BEFORE, since that's
919 no longer the default.
920 * s/gnu-linux.h (GC_MARK_STACK): Adjust to change in default.
921
9222012-04-14 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
923
924 * lread.c (lisp_file_lexically_bound_p):
925 Fix hang at ";-*-\n" (bug#11238).
926
9272012-04-14 Eli Zaretskii <eliz@gnu.org>
928
929 * xdisp.c (find_last_unchanged_at_beg_row): Don't consider a row
930 "unchanged" if its end.pos is beyond ZV. (Bug#11199)
931
9322012-04-14 Jan Djärv <jan.h.d@swipnet.se>
933
934 * nsterm.m (constrainFrameRect): Always constrain when there is only
935 one screen (Bug#10962).
936
9372012-04-13 Ken Brown <kbrown@cornell.edu>
938
939 * s/cygwin.h (PTY_OPEN): Don't try to close a bogus file descriptor.
940
9412012-04-13 Reuben Thomas <rrt@sc3d.org>
942
943 * indent.c (Fmove_to_column): Change interactive spec (Bug#739).
944
9452012-04-11 Daniel Colascione <dancol@dancol.org>
946
947 * s/cygwin.h: The vfork the #define in cygwin.h was protecting
948 against is gone. It's better to use vfork now so that when Cygwin
949 gains a new, working vfork, we use it automatically (bug#10398).
950
9512012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
952
953 * window.c (save_window_save): Obey window-point-insertion-type.
954
9552012-04-11 Glenn Morris <rgm@gnu.org>
956
957 * Makefile.in (GNUSTEP_CFLAGS): Rename from C_SWITCH_X_SYSTEM.
958
9592012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
960
961 * alloc.c (lisp_align_malloc): Remove unneeded prototype.
962
9632012-04-10 Jason S. Cornez <jcornez@ravenpack.com> (tiny change)
964
965 * keyboard.c: Override inhibit-quit after the third C-g (bug#6585).
966 (force_quit_count): New var.
967 (handle_interrupt): Use it.
968
9692012-04-10 Juanma Barranquero <lekktu@gmail.com>
970
971 * w32.c (w32_delayed_load): Record the full path of the library
972 being loaded (bug#10424).
973
7932012-04-09 Glenn Morris <rgm@gnu.org> 9742012-04-09 Glenn Morris <rgm@gnu.org>
794 975
795 * doc.c (Fsnarf_documentation): Check variables, functions are bound, 976 * doc.c (Fsnarf_documentation): Check variables, functions are bound,
@@ -804,8 +985,8 @@
804 * process.h: Add integer `gnutls_handshakes_tried' member to 985 * process.h: Add integer `gnutls_handshakes_tried' member to
805 process struct. 986 process struct.
806 987
807 * gnutls.h: Add `GNUTLS_EMACS_HANDSHAKES_LIMIT' upper limit. Add 988 * gnutls.h: Add `GNUTLS_EMACS_HANDSHAKES_LIMIT' upper limit.
808 convenience `GNUTLS_LOG2i' macro. 989 Add convenience `GNUTLS_LOG2i' macro.
809 990
810 * gnutls.c (gnutls_log_function2i): Convenience log function. 991 * gnutls.c (gnutls_log_function2i): Convenience log function.
811 (emacs_gnutls_read): Use new log functions, 992 (emacs_gnutls_read): Use new log functions,
@@ -891,8 +1072,8 @@
891 (xml_cleanup_parser): New function, export for fn_xmlCleanupParser. 1072 (xml_cleanup_parser): New function, export for fn_xmlCleanupParser.
892 Calls xmlCleanupParser only if libxml2 was loaded (or statically 1073 Calls xmlCleanupParser only if libxml2 was loaded (or statically
893 linked in). 1074 linked in).
894 (Flibxml_parse_html_region, Flibxml_parse_xml_region): Call 1075 (Flibxml_parse_html_region, Flibxml_parse_xml_region):
895 init_libxml2_functions before calling libxml2 functions. 1076 Call init_libxml2_functions before calling libxml2 functions.
896 (syms_of_xml) <Qlibxml2_dll>: DEFSYM it. 1077 (syms_of_xml) <Qlibxml2_dll>: DEFSYM it.
897 1078
898 * emacs.c: Don't include libxml/parser.h. 1079 * emacs.c: Don't include libxml/parser.h.
@@ -2278,7 +2459,7 @@
2278 * xfns.c (unwind_create_frame): Fix comment. 2459 * xfns.c (unwind_create_frame): Fix comment.
2279 (Fx_create_frame, x_create_tip_frame): 2460 (Fx_create_frame, x_create_tip_frame):
2280 Move terminal->reference_count++ just before making the frame 2461 Move terminal->reference_count++ just before making the frame
2281 official. Move initialization of image_cache_refcount and 2462 official. Move initialization of image_cache_refcount and
2282 dpyinfo_refcount before calling init_frame_faces (Bug#9943). 2463 dpyinfo_refcount before calling init_frame_faces (Bug#9943).
2283 2464
22842011-11-05 Eli Zaretskii <eliz@gnu.org> 24652011-11-05 Eli Zaretskii <eliz@gnu.org>
@@ -8051,7 +8232,7 @@
8051 * xfaces.c <Qunspecified>: Make extern again. 8232 * xfaces.c <Qunspecified>: Make extern again.
8052 8233
8053 * syntax.c: Include sys/types.h before including regex.h, as 8234 * syntax.c: Include sys/types.h before including regex.h, as
8054 required by Posix. 8235 required by POSIX.
8055 8236
8056 * doc.c (get_doc_string): Improve the format passed to `error'. 8237 * doc.c (get_doc_string): Improve the format passed to `error'.
8057 8238
@@ -10515,7 +10696,7 @@ See ChangeLog.11 for earlier changes.
10515;; coding: utf-8 10696;; coding: utf-8
10516;; End: 10697;; End:
10517 10698
10518 Copyright (C) 2011-2012 Free Software Foundation, Inc. 10699 Copyright (C) 2011-2012 Free Software Foundation, Inc.
10519 10700
10520 This file is part of GNU Emacs. 10701 This file is part of GNU Emacs.
10521 10702
diff --git a/src/ChangeLog.10 b/src/ChangeLog.10
index 10de7e53794..cf62ec29bbc 100644
--- a/src/ChangeLog.10
+++ b/src/ChangeLog.10
@@ -23215,7 +23215,7 @@
23215 23215
23216 * macterm.c (do_ae_open_documents) [MAC_OSX]: Call FSpMakeFSRef 23216 * macterm.c (do_ae_open_documents) [MAC_OSX]: Call FSpMakeFSRef
23217 and FSRefMakePath to convert FSSpec returned with Apple Event to 23217 and FSRefMakePath to convert FSSpec returned with Apple Event to
23218 Posix pathname. 23218 POSIX pathname.
23219 (mac_initialize) [TARGET_API_MAC_CARBON]: 23219 (mac_initialize) [TARGET_API_MAC_CARBON]:
23220 Call init_required_apple_events and disable the `Quit' menu item 23220 Call init_required_apple_events and disable the `Quit' menu item
23221 provided automatically by the Carbon Toolbox. 23221 provided automatically by the Carbon Toolbox.
diff --git a/src/ChangeLog.11 b/src/ChangeLog.11
index 97d5a65281a..781027ee8ae 100644
--- a/src/ChangeLog.11
+++ b/src/ChangeLog.11
@@ -9641,7 +9641,7 @@
9641 9641
96422010-03-12 Eli Zaretskii <eliz@gnu.org> 96422010-03-12 Eli Zaretskii <eliz@gnu.org>
9643 9643
9644 These changes remove termcap.c from the build on Posix platforms. 9644 These changes remove termcap.c from the build on POSIX platforms.
9645 * Makefile.in (termcapobj): Move termcap.o from here... 9645 * Makefile.in (termcapobj): Move termcap.o from here...
9646 (MSDOS_OBJ): ...to here. 9646 (MSDOS_OBJ): ...to here.
9647 (termcapobj) [!LIBS_TERMCAP]: Remove specialized value, as it is 9647 (termcapobj) [!LIBS_TERMCAP]: Remove specialized value, as it is
diff --git a/src/ChangeLog.6 b/src/ChangeLog.6
index 91c20681157..3aa1a23818e 100644
--- a/src/ChangeLog.6
+++ b/src/ChangeLog.6
@@ -3236,7 +3236,7 @@
3236 3236
32371995-12-12 Paul Eggert <eggert@twinsun.com> 32371995-12-12 Paul Eggert <eggert@twinsun.com>
3238 3238
3239 * process.c (create_process): Use Posix signal handling to 3239 * process.c (create_process): Use POSIX signal handling to
3240 block signals, if available. If HAVE_VFORK, save and restore 3240 block signals, if available. If HAVE_VFORK, save and restore
3241 signal handlers that the child might change, since in many 3241 signal handlers that the child might change, since in many
3242 systems (e.g. Solaris 2.4) if the child changes the signal 3242 systems (e.g. Solaris 2.4) if the child changes the signal
diff --git a/src/Makefile.in b/src/Makefile.in
index a90fd5841e4..37480f8269d 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -68,23 +68,21 @@ OTHER_FILES = @OTHER_FILES@
68PROFILING_CFLAGS = @PROFILING_CFLAGS@ 68PROFILING_CFLAGS = @PROFILING_CFLAGS@
69 69
70## Flags to pass to the compiler to enable build warnings 70## Flags to pass to the compiler to enable build warnings
71C_WARNINGS_SWITCH = @C_WARNINGS_SWITCH@ 71WARN_CFLAGS = @WARN_CFLAGS@
72WERROR_CFLAGS = @WERROR_CFLAGS@
72 73
73## Machine-specific CFLAGS. 74## Machine-specific CFLAGS.
74C_SWITCH_MACHINE=@C_SWITCH_MACHINE@ 75C_SWITCH_MACHINE=@C_SWITCH_MACHINE@
75## System-specific CFLAGS. 76## System-specific CFLAGS.
76C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@ 77C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@
77 78
78## Currently only set if NS_IMPL_GNUSTEP. 79GNUSTEP_CFLAGS=@GNUSTEP_CFLAGS@
79## C_SWITCH_X_SITE may override this.
80C_SWITCH_X_SYSTEM=@C_SWITCH_X_SYSTEM@
81 80
82## Define C_SWITCH_X_SITE to contain any special flags your compiler 81## Define C_SWITCH_X_SITE to contain any special flags your compiler
83## may need to deal with X Windows. For instance, if you've defined 82## may need to deal with X Windows. For instance, if you've defined
84## HAVE_X_WINDOWS and your X include files aren't in a place that your 83## HAVE_X_WINDOWS and your X include files aren't in a place that your
85## compiler can find on its own, you might want to add "-I/..." or 84## compiler can find on its own, you might want to add "-I/..." or
86## something similar. This is normally set by configure. 85## something similar. This is normally set by configure.
87## This is used before C_SWITCH_X_SYSTEM and may override it.
88C_SWITCH_X_SITE=@C_SWITCH_X_SITE@ 86C_SWITCH_X_SITE=@C_SWITCH_X_SITE@
89 87
90## Define LD_SWITCH_X_SITE to contain any special flags your loader 88## Define LD_SWITCH_X_SITE to contain any special flags your loader
@@ -302,19 +300,16 @@ MKDEPDIR=@MKDEPDIR@
302## -DHAVE_CONFIG_H is needed for some other files to take advantage of 300## -DHAVE_CONFIG_H is needed for some other files to take advantage of
303## the information in `config.h'. 301## the information in `config.h'.
304## 302##
305## C_SWITCH_X_SITE must come before C_SWITCH_X_SYSTEM
306## since it may have -I options that should override those.
307##
308## FIXME? MYCPPFLAGS only referenced in etc/DEBUG. 303## FIXME? MYCPPFLAGS only referenced in etc/DEBUG.
309ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(MYCPPFLAGS) -I. -I$(srcdir) \ 304ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(MYCPPFLAGS) -I. -I$(srcdir) \
310 -I$(lib) -I$(srcdir)/../lib \ 305 -I$(lib) -I$(srcdir)/../lib \
311 $(C_SWITCH_MACHINE) $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \ 306 $(C_SWITCH_MACHINE) $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \
312 $(C_SWITCH_X_SYSTEM) $(CFLAGS_SOUND) $(RSVG_CFLAGS) $(IMAGEMAGICK_CFLAGS) \ 307 $(GNUSTEP_CFLAGS) $(CFLAGS_SOUND) $(RSVG_CFLAGS) $(IMAGEMAGICK_CFLAGS) \
313 $(LIBXML2_CFLAGS) $(DBUS_CFLAGS) \ 308 $(LIBXML2_CFLAGS) $(DBUS_CFLAGS) \
314 $(SETTINGS_CFLAGS) $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) \ 309 $(SETTINGS_CFLAGS) $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) \
315 $(LIBOTF_CFLAGS) $(M17N_FLT_CFLAGS) $(DEPFLAGS) $(PROFILING_CFLAGS) \ 310 $(LIBOTF_CFLAGS) $(M17N_FLT_CFLAGS) $(DEPFLAGS) $(PROFILING_CFLAGS) \
316 $(LIBGNUTLS_CFLAGS) \ 311 $(LIBGNUTLS_CFLAGS) \
317 $(C_WARNINGS_SWITCH) $(CFLAGS) 312 $(WARN_CFLAGS) $(WERROR_CFLAGS) $(CFLAGS)
318ALL_OBJC_CFLAGS=$(ALL_CFLAGS) $(GNU_OBJC_CFLAGS) 313ALL_OBJC_CFLAGS=$(ALL_CFLAGS) $(GNU_OBJC_CFLAGS)
319 314
320.SUFFIXES: .m 315.SUFFIXES: .m
diff --git a/src/alloc.c b/src/alloc.c
index 27118c91c9c..c07d5c929f9 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -82,6 +82,8 @@ extern POINTER_TYPE *sbrk ();
82 82
83extern size_t _bytes_used; 83extern size_t _bytes_used;
84extern size_t __malloc_extra_blocks; 84extern size_t __malloc_extra_blocks;
85extern void *_malloc_internal (size_t);
86extern void _free_internal (void *);
85 87
86#endif /* not DOUG_LEA_MALLOC */ 88#endif /* not DOUG_LEA_MALLOC */
87 89
@@ -296,7 +298,6 @@ enum mem_type
296 MEM_TYPE_VECTORLIKE 298 MEM_TYPE_VECTORLIKE
297}; 299};
298 300
299static POINTER_TYPE *lisp_align_malloc (size_t, enum mem_type);
300static POINTER_TYPE *lisp_malloc (size_t, enum mem_type); 301static POINTER_TYPE *lisp_malloc (size_t, enum mem_type);
301 302
302 303
@@ -315,7 +316,6 @@ static Lisp_Object Vdead;
315#ifdef GC_MALLOC_CHECK 316#ifdef GC_MALLOC_CHECK
316 317
317enum mem_type allocated_mem_type; 318enum mem_type allocated_mem_type;
318static int dont_register_blocks;
319 319
320#endif /* GC_MALLOC_CHECK */ 320#endif /* GC_MALLOC_CHECK */
321 321
@@ -392,8 +392,13 @@ static int live_misc_p (struct mem_node *, void *);
392static void mark_maybe_object (Lisp_Object); 392static void mark_maybe_object (Lisp_Object);
393static void mark_memory (void *, void *); 393static void mark_memory (void *, void *);
394static void mem_init (void); 394static void mem_init (void);
395#if (defined GC_MALLOC_CHECK \
396 ? !defined SYSTEM_MALLOC && !defined SYNC_INPUT \
397 : GC_MARK_STACK)
398# define NEED_MEM_INSERT
395static struct mem_node *mem_insert (void *, void *, enum mem_type); 399static struct mem_node *mem_insert (void *, void *, enum mem_type);
396static void mem_insert_fixup (struct mem_node *); 400static void mem_insert_fixup (struct mem_node *);
401#endif
397static void mem_rotate_left (struct mem_node *); 402static void mem_rotate_left (struct mem_node *);
398static void mem_rotate_right (struct mem_node *); 403static void mem_rotate_right (struct mem_node *);
399static void mem_delete (struct mem_node *); 404static void mem_delete (struct mem_node *);
@@ -938,13 +943,11 @@ lisp_free (POINTER_TYPE *block)
938 MALLOC_UNBLOCK_INPUT; 943 MALLOC_UNBLOCK_INPUT;
939} 944}
940 945
941/* Allocation of aligned blocks of memory to store Lisp data. */ 946/***** Allocation of aligned blocks of memory to store Lisp data. *****/
942/* The entry point is lisp_align_malloc which returns blocks of at most */ 947
943/* BLOCK_BYTES and guarantees they are aligned on a BLOCK_ALIGN boundary. */ 948/* The entry point is lisp_align_malloc which returns blocks of at most
949 BLOCK_BYTES and guarantees they are aligned on a BLOCK_ALIGN boundary. */
944 950
945/* Use posix_memalloc if the system has it and we're using the system's
946 malloc (because our gmalloc.c routines don't have posix_memalign although
947 its memalloc could be used). */
948#if defined (HAVE_POSIX_MEMALIGN) && defined (SYSTEM_MALLOC) 951#if defined (HAVE_POSIX_MEMALIGN) && defined (SYSTEM_MALLOC)
949#define USE_POSIX_MEMALIGN 1 952#define USE_POSIX_MEMALIGN 1
950#endif 953#endif
@@ -1001,7 +1004,7 @@ struct ablocks
1001 struct ablock blocks[ABLOCKS_SIZE]; 1004 struct ablock blocks[ABLOCKS_SIZE];
1002}; 1005};
1003 1006
1004/* Size of the block requested from malloc or memalign. */ 1007/* Size of the block requested from malloc or posix_memalign. */
1005#define ABLOCKS_BYTES (sizeof (struct ablocks) - BLOCK_PADDING) 1008#define ABLOCKS_BYTES (sizeof (struct ablocks) - BLOCK_PADDING)
1006 1009
1007#define ABLOCK_ABASE(block) \ 1010#define ABLOCK_ABASE(block) \
@@ -1099,7 +1102,7 @@ lisp_align_malloc (size_t nbytes, enum mem_type type)
1099#endif 1102#endif
1100 1103
1101 /* Initialize the blocks and put them on the free list. 1104 /* Initialize the blocks and put them on the free list.
1102 Is `base' was not properly aligned, we can't use the last block. */ 1105 If `base' was not properly aligned, we can't use the last block. */
1103 for (i = 0; i < (aligned ? ABLOCKS_SIZE : ABLOCKS_SIZE - 1); i++) 1106 for (i = 0; i < (aligned ? ABLOCKS_SIZE : ABLOCKS_SIZE - 1); i++)
1104 { 1107 {
1105 abase->blocks[i].abase = abase; 1108 abase->blocks[i].abase = abase;
@@ -1146,8 +1149,8 @@ lisp_align_free (POINTER_TYPE *block)
1146 ablock->x.next_free = free_ablock; 1149 ablock->x.next_free = free_ablock;
1147 free_ablock = ablock; 1150 free_ablock = ablock;
1148 /* Update busy count. */ 1151 /* Update busy count. */
1149 ABLOCKS_BUSY (abase) = 1152 ABLOCKS_BUSY (abase)
1150 (struct ablocks *) (-2 + (intptr_t) ABLOCKS_BUSY (abase)); 1153 = (struct ablocks *) (-2 + (intptr_t) ABLOCKS_BUSY (abase));
1151 1154
1152 if (2 > (intptr_t) ABLOCKS_BUSY (abase)) 1155 if (2 > (intptr_t) ABLOCKS_BUSY (abase))
1153 { /* All the blocks are free. */ 1156 { /* All the blocks are free. */
@@ -1223,6 +1226,10 @@ static void (*old_free_hook) (void*, const void*);
1223# define BYTES_USED _bytes_used 1226# define BYTES_USED _bytes_used
1224#endif 1227#endif
1225 1228
1229#ifdef GC_MALLOC_CHECK
1230static int dont_register_blocks;
1231#endif
1232
1226static size_t bytes_used_when_reconsidered; 1233static size_t bytes_used_when_reconsidered;
1227 1234
1228/* Value of _bytes_used, when spare_memory was freed. */ 1235/* Value of _bytes_used, when spare_memory was freed. */
@@ -3137,17 +3144,29 @@ usage: (make-byte-code ARGLIST BYTE-CODE CONSTANTS DEPTH &optional DOCSTRING INT
3137 Symbol Allocation 3144 Symbol Allocation
3138 ***********************************************************************/ 3145 ***********************************************************************/
3139 3146
3147/* Like struct Lisp_Symbol, but padded so that the size is a multiple
3148 of the required alignment if LSB tags are used. */
3149
3150union aligned_Lisp_Symbol
3151{
3152 struct Lisp_Symbol s;
3153#ifdef USE_LSB_TAG
3154 unsigned char c[(sizeof (struct Lisp_Symbol) + (1 << GCTYPEBITS) - 1)
3155 & -(1 << GCTYPEBITS)];
3156#endif
3157};
3158
3140/* Each symbol_block is just under 1020 bytes long, since malloc 3159/* Each symbol_block is just under 1020 bytes long, since malloc
3141 really allocates in units of powers of two and uses 4 bytes for its 3160 really allocates in units of powers of two and uses 4 bytes for its
3142 own overhead. */ 3161 own overhead. */
3143 3162
3144#define SYMBOL_BLOCK_SIZE \ 3163#define SYMBOL_BLOCK_SIZE \
3145 ((1020 - sizeof (struct symbol_block *)) / sizeof (struct Lisp_Symbol)) 3164 ((1020 - sizeof (struct symbol_block *)) / sizeof (union aligned_Lisp_Symbol))
3146 3165
3147struct symbol_block 3166struct symbol_block
3148{ 3167{
3149 /* Place `symbols' first, to preserve alignment. */ 3168 /* Place `symbols' first, to preserve alignment. */
3150 struct Lisp_Symbol symbols[SYMBOL_BLOCK_SIZE]; 3169 union aligned_Lisp_Symbol symbols[SYMBOL_BLOCK_SIZE];
3151 struct symbol_block *next; 3170 struct symbol_block *next;
3152}; 3171};
3153 3172
@@ -3203,7 +3222,7 @@ Its value and function definition are void, and its property list is nil. */)
3203 symbol_block = new; 3222 symbol_block = new;
3204 symbol_block_index = 0; 3223 symbol_block_index = 0;
3205 } 3224 }
3206 XSETSYMBOL (val, &symbol_block->symbols[symbol_block_index]); 3225 XSETSYMBOL (val, &symbol_block->symbols[symbol_block_index].s);
3207 symbol_block_index++; 3226 symbol_block_index++;
3208 } 3227 }
3209 3228
@@ -3231,16 +3250,28 @@ Its value and function definition are void, and its property list is nil. */)
3231 Marker (Misc) Allocation 3250 Marker (Misc) Allocation
3232 ***********************************************************************/ 3251 ***********************************************************************/
3233 3252
3253/* Like union Lisp_Misc, but padded so that its size is a multiple of
3254 the required alignment when LSB tags are used. */
3255
3256union aligned_Lisp_Misc
3257{
3258 union Lisp_Misc m;
3259#ifdef USE_LSB_TAG
3260 unsigned char c[(sizeof (union Lisp_Misc) + (1 << GCTYPEBITS) - 1)
3261 & -(1 << GCTYPEBITS)];
3262#endif
3263};
3264
3234/* Allocation of markers and other objects that share that structure. 3265/* Allocation of markers and other objects that share that structure.
3235 Works like allocation of conses. */ 3266 Works like allocation of conses. */
3236 3267
3237#define MARKER_BLOCK_SIZE \ 3268#define MARKER_BLOCK_SIZE \
3238 ((1020 - sizeof (struct marker_block *)) / sizeof (union Lisp_Misc)) 3269 ((1020 - sizeof (struct marker_block *)) / sizeof (union aligned_Lisp_Misc))
3239 3270
3240struct marker_block 3271struct marker_block
3241{ 3272{
3242 /* Place `markers' first, to preserve alignment. */ 3273 /* Place `markers' first, to preserve alignment. */
3243 union Lisp_Misc markers[MARKER_BLOCK_SIZE]; 3274 union aligned_Lisp_Misc markers[MARKER_BLOCK_SIZE];
3244 struct marker_block *next; 3275 struct marker_block *next;
3245}; 3276};
3246 3277
@@ -3285,7 +3316,7 @@ allocate_misc (void)
3285 marker_block_index = 0; 3316 marker_block_index = 0;
3286 total_free_markers += MARKER_BLOCK_SIZE; 3317 total_free_markers += MARKER_BLOCK_SIZE;
3287 } 3318 }
3288 XSETMISC (val, &marker_block->markers[marker_block_index]); 3319 XSETMISC (val, &marker_block->markers[marker_block_index].m);
3289 marker_block_index++; 3320 marker_block_index++;
3290 } 3321 }
3291 3322
@@ -3548,6 +3579,8 @@ mem_find (void *start)
3548} 3579}
3549 3580
3550 3581
3582#ifdef NEED_MEM_INSERT
3583
3551/* Insert a new node into the tree for a block of memory with start 3584/* Insert a new node into the tree for a block of memory with start
3552 address START, end address END, and type TYPE. Value is a 3585 address START, end address END, and type TYPE. Value is a
3553 pointer to the node that was inserted. */ 3586 pointer to the node that was inserted. */
@@ -3695,6 +3728,8 @@ mem_insert_fixup (struct mem_node *x)
3695 mem_root->color = MEM_BLACK; 3728 mem_root->color = MEM_BLACK;
3696} 3729}
3697 3730
3731#endif /* NEED_MEM_INSERT */
3732
3698 3733
3699/* (x) (y) 3734/* (x) (y)
3700 / \ / \ 3735 / \ / \
@@ -6071,22 +6106,22 @@ gc_sweep (void)
6071 for (sblk = symbol_block; sblk; sblk = *sprev) 6106 for (sblk = symbol_block; sblk; sblk = *sprev)
6072 { 6107 {
6073 int this_free = 0; 6108 int this_free = 0;
6074 struct Lisp_Symbol *sym = sblk->symbols; 6109 union aligned_Lisp_Symbol *sym = sblk->symbols;
6075 struct Lisp_Symbol *end = sym + lim; 6110 union aligned_Lisp_Symbol *end = sym + lim;
6076 6111
6077 for (; sym < end; ++sym) 6112 for (; sym < end; ++sym)
6078 { 6113 {
6079 /* Check if the symbol was created during loadup. In such a case 6114 /* Check if the symbol was created during loadup. In such a case
6080 it might be pointed to by pure bytecode which we don't trace, 6115 it might be pointed to by pure bytecode which we don't trace,
6081 so we conservatively assume that it is live. */ 6116 so we conservatively assume that it is live. */
6082 int pure_p = PURE_POINTER_P (XSTRING (sym->xname)); 6117 int pure_p = PURE_POINTER_P (XSTRING (sym->s.xname));
6083 6118
6084 if (!sym->gcmarkbit && !pure_p) 6119 if (!sym->s.gcmarkbit && !pure_p)
6085 { 6120 {
6086 if (sym->redirect == SYMBOL_LOCALIZED) 6121 if (sym->s.redirect == SYMBOL_LOCALIZED)
6087 xfree (SYMBOL_BLV (sym)); 6122 xfree (SYMBOL_BLV (&sym->s));
6088 sym->next = symbol_free_list; 6123 sym->s.next = symbol_free_list;
6089 symbol_free_list = sym; 6124 symbol_free_list = &sym->s;
6090#if GC_MARK_STACK 6125#if GC_MARK_STACK
6091 symbol_free_list->function = Vdead; 6126 symbol_free_list->function = Vdead;
6092#endif 6127#endif
@@ -6096,8 +6131,8 @@ gc_sweep (void)
6096 { 6131 {
6097 ++num_used; 6132 ++num_used;
6098 if (!pure_p) 6133 if (!pure_p)
6099 UNMARK_STRING (XSTRING (sym->xname)); 6134 UNMARK_STRING (XSTRING (sym->s.xname));
6100 sym->gcmarkbit = 0; 6135 sym->s.gcmarkbit = 0;
6101 } 6136 }
6102 } 6137 }
6103 6138
@@ -6109,7 +6144,7 @@ gc_sweep (void)
6109 { 6144 {
6110 *sprev = sblk->next; 6145 *sprev = sblk->next;
6111 /* Unhook from the free list. */ 6146 /* Unhook from the free list. */
6112 symbol_free_list = sblk->symbols[0].next; 6147 symbol_free_list = sblk->symbols[0].s.next;
6113 lisp_free (sblk); 6148 lisp_free (sblk);
6114 } 6149 }
6115 else 6150 else
@@ -6139,22 +6174,22 @@ gc_sweep (void)
6139 6174
6140 for (i = 0; i < lim; i++) 6175 for (i = 0; i < lim; i++)
6141 { 6176 {
6142 if (!mblk->markers[i].u_any.gcmarkbit) 6177 if (!mblk->markers[i].m.u_any.gcmarkbit)
6143 { 6178 {
6144 if (mblk->markers[i].u_any.type == Lisp_Misc_Marker) 6179 if (mblk->markers[i].m.u_any.type == Lisp_Misc_Marker)
6145 unchain_marker (&mblk->markers[i].u_marker); 6180 unchain_marker (&mblk->markers[i].m.u_marker);
6146 /* Set the type of the freed object to Lisp_Misc_Free. 6181 /* Set the type of the freed object to Lisp_Misc_Free.
6147 We could leave the type alone, since nobody checks it, 6182 We could leave the type alone, since nobody checks it,
6148 but this might catch bugs faster. */ 6183 but this might catch bugs faster. */
6149 mblk->markers[i].u_marker.type = Lisp_Misc_Free; 6184 mblk->markers[i].m.u_marker.type = Lisp_Misc_Free;
6150 mblk->markers[i].u_free.chain = marker_free_list; 6185 mblk->markers[i].m.u_free.chain = marker_free_list;
6151 marker_free_list = &mblk->markers[i]; 6186 marker_free_list = &mblk->markers[i].m;
6152 this_free++; 6187 this_free++;
6153 } 6188 }
6154 else 6189 else
6155 { 6190 {
6156 num_used++; 6191 num_used++;
6157 mblk->markers[i].u_any.gcmarkbit = 0; 6192 mblk->markers[i].m.u_any.gcmarkbit = 0;
6158 } 6193 }
6159 } 6194 }
6160 lim = MARKER_BLOCK_SIZE; 6195 lim = MARKER_BLOCK_SIZE;
@@ -6165,7 +6200,7 @@ gc_sweep (void)
6165 { 6200 {
6166 *mprev = mblk->next; 6201 *mprev = mblk->next;
6167 /* Unhook from the free list. */ 6202 /* Unhook from the free list. */
6168 marker_free_list = mblk->markers[0].u_free.chain; 6203 marker_free_list = mblk->markers[0].m.u_free.chain;
6169 lisp_free (mblk); 6204 lisp_free (mblk);
6170 } 6205 }
6171 else 6206 else
@@ -6297,11 +6332,12 @@ which_symbols (Lisp_Object obj, EMACS_INT find_max)
6297 { 6332 {
6298 for (sblk = symbol_block; sblk; sblk = sblk->next) 6333 for (sblk = symbol_block; sblk; sblk = sblk->next)
6299 { 6334 {
6300 struct Lisp_Symbol *sym = sblk->symbols; 6335 union aligned_Lisp_Symbol *aligned_sym = sblk->symbols;
6301 int bn; 6336 int bn;
6302 6337
6303 for (bn = 0; bn < SYMBOL_BLOCK_SIZE; bn++, sym++) 6338 for (bn = 0; bn < SYMBOL_BLOCK_SIZE; bn++, aligned_sym++)
6304 { 6339 {
6340 struct Lisp_Symbol *sym = &aligned_sym->s;
6305 Lisp_Object val; 6341 Lisp_Object val;
6306 Lisp_Object tem; 6342 Lisp_Object tem;
6307 6343
diff --git a/src/buffer.c b/src/buffer.c
index 8cb68317bed..d3d5bd268a2 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -2005,10 +2005,6 @@ advance_to_char_boundary (ptrdiff_t byte_pos)
2005 return byte_pos; 2005 return byte_pos;
2006} 2006}
2007 2007
2008#ifdef REL_ALLOC
2009extern void r_alloc_reset_variable (POINTER_TYPE *, POINTER_TYPE *);
2010#endif /* REL_ALLOC */
2011
2012DEFUN ("buffer-swap-text", Fbuffer_swap_text, Sbuffer_swap_text, 2008DEFUN ("buffer-swap-text", Fbuffer_swap_text, Sbuffer_swap_text,
2013 1, 1, 0, 2009 1, 1, 0,
2014 doc: /* Swap the text between current buffer and BUFFER. */) 2010 doc: /* Swap the text between current buffer and BUFFER. */)
@@ -4770,13 +4766,6 @@ mmap_realloc (POINTER_TYPE **var, size_t nbytes)
4770 Buffer-text Allocation 4766 Buffer-text Allocation
4771 ***********************************************************************/ 4767 ***********************************************************************/
4772 4768
4773#ifdef REL_ALLOC
4774extern POINTER_TYPE *r_alloc (POINTER_TYPE **, size_t);
4775extern POINTER_TYPE *r_re_alloc (POINTER_TYPE **, size_t);
4776extern void r_alloc_free (POINTER_TYPE **ptr);
4777#endif /* REL_ALLOC */
4778
4779
4780/* Allocate NBYTES bytes for buffer B's text buffer. */ 4769/* Allocate NBYTES bytes for buffer B's text buffer. */
4781 4770
4782static void 4771static void
diff --git a/src/character.h b/src/character.h
index d2a7a11fa56..8a0f2d4c3f6 100644
--- a/src/character.h
+++ b/src/character.h
@@ -316,7 +316,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
316 Note: This macro returns the actual length of the character's 316 Note: This macro returns the actual length of the character's
317 multibyte sequence as it is stored in a buffer or string. The 317 multibyte sequence as it is stored in a buffer or string. The
318 character it returns might have a different codepoint that has a 318 character it returns might have a different codepoint that has a
319 different multibyte sequence of a different legth, due to possible 319 different multibyte sequence of a different length, due to possible
320 unification of CJK characters inside string_char. Therefore do NOT 320 unification of CJK characters inside string_char. Therefore do NOT
321 assume that the length returned by this macro is identical to the 321 assume that the length returned by this macro is identical to the
322 length of the multibyte sequence of the character it returns. */ 322 length of the multibyte sequence of the character it returns. */
diff --git a/src/dired.c b/src/dired.c
index 6eedc824231..38dfa23c1bf 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -1018,6 +1018,45 @@ Comparison is in lexicographic order and case is significant. */)
1018 return Fstring_lessp (Fcar (f1), Fcar (f2)); 1018 return Fstring_lessp (Fcar (f1), Fcar (f2));
1019} 1019}
1020 1020
1021
1022DEFUN ("system-users", Fsystem_users, Ssystem_users, 0, 0, 0,
1023 doc: /* Return a list of user names currently registered in the system.
1024If we don't know how to determine that on this platform, just
1025return a list with one element, taken from `user-real-login-name'. */)
1026 (void)
1027{
1028 Lisp_Object users = Qnil;
1029#if defined HAVE_GETPWENT && defined HAVE_ENDPWENT
1030 struct passwd *pw;
1031
1032 while ((pw = getpwent ()))
1033 users = Fcons (DECODE_SYSTEM (build_string (pw->pw_name)), users);
1034
1035 endpwent ();
1036#endif
1037 if (EQ (users, Qnil))
1038 /* At least current user is always known. */
1039 users = Fcons (Vuser_real_login_name, Qnil);
1040 return users;
1041}
1042
1043DEFUN ("system-groups", Fsystem_groups, Ssystem_groups, 0, 0, 0,
1044 doc: /* Return a list of user group names currently registered in the system.
1045The value may be nil if not supported on this platform. */)
1046 (void)
1047{
1048 Lisp_Object groups = Qnil;
1049#if defined HAVE_GETGRENT && defined HAVE_ENDGRENT
1050 struct group *gr;
1051
1052 while ((gr = getgrent ()))
1053 groups = Fcons (DECODE_SYSTEM (build_string (gr->gr_name)), groups);
1054
1055 endgrent ();
1056#endif
1057 return groups;
1058}
1059
1021void 1060void
1022syms_of_dired (void) 1061syms_of_dired (void)
1023{ 1062{
@@ -1035,6 +1074,8 @@ syms_of_dired (void)
1035 defsubr (&Sfile_name_all_completions); 1074 defsubr (&Sfile_name_all_completions);
1036 defsubr (&Sfile_attributes); 1075 defsubr (&Sfile_attributes);
1037 defsubr (&Sfile_attributes_lessp); 1076 defsubr (&Sfile_attributes_lessp);
1077 defsubr (&Ssystem_users);
1078 defsubr (&Ssystem_groups);
1038 1079
1039 DEFVAR_LISP ("completion-ignored-extensions", Vcompletion_ignored_extensions, 1080 DEFVAR_LISP ("completion-ignored-extensions", Vcompletion_ignored_extensions,
1040 doc: /* Completion ignores file names ending in any string in this list. 1081 doc: /* Completion ignores file names ending in any string in this list.
diff --git a/src/indent.c b/src/indent.c
index 22b0bb2c668..32533438e2a 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -962,7 +962,8 @@ indented_beyond_p (ptrdiff_t pos, ptrdiff_t pos_byte, EMACS_INT column)
962 return val >= column; 962 return val >= column;
963} 963}
964 964
965DEFUN ("move-to-column", Fmove_to_column, Smove_to_column, 1, 2, "p", 965DEFUN ("move-to-column", Fmove_to_column, Smove_to_column, 1, 2,
966 "NMove to column: ",
966 doc: /* Move point to column COLUMN in the current line. 967 doc: /* Move point to column COLUMN in the current line.
967Interactively, COLUMN is the value of prefix numeric argument. 968Interactively, COLUMN is the value of prefix numeric argument.
968The column of a character is calculated by adding together the widths 969The column of a character is calculated by adding together the widths
diff --git a/src/keyboard.c b/src/keyboard.c
index bad91ea3f72..79d9e7a18e8 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -7200,6 +7200,7 @@ handle_async_input (void)
7200#endif 7200#endif
7201} 7201}
7202 7202
7203#ifdef SYNC_INPUT
7203void 7204void
7204process_pending_signals (void) 7205process_pending_signals (void)
7205{ 7206{
@@ -7207,6 +7208,7 @@ process_pending_signals (void)
7207 handle_async_input (); 7208 handle_async_input ();
7208 do_pending_atimers (); 7209 do_pending_atimers ();
7209} 7210}
7211#endif
7210 7212
7211#ifdef SIGIO /* for entire page */ 7213#ifdef SIGIO /* for entire page */
7212/* Note SIGIO has been undef'd if FIONREAD is missing. */ 7214/* Note SIGIO has been undef'd if FIONREAD is missing. */
@@ -10218,7 +10220,7 @@ DEFUN ("read-key-sequence-vector", Fread_key_sequence_vector,
10218 10220
10219 memset (keybuf, 0, sizeof keybuf); 10221 memset (keybuf, 0, sizeof keybuf);
10220 GCPRO1 (keybuf[0]); 10222 GCPRO1 (keybuf[0]);
10221 gcpro1.nvars = (sizeof keybuf/sizeof (keybuf[0])); 10223 gcpro1.nvars = (sizeof keybuf / sizeof (keybuf[0]));
10222 10224
10223 if (NILP (continue_echo)) 10225 if (NILP (continue_echo))
10224 { 10226 {
@@ -10232,7 +10234,7 @@ DEFUN ("read-key-sequence-vector", Fread_key_sequence_vector,
10232 cancel_hourglass (); 10234 cancel_hourglass ();
10233#endif 10235#endif
10234 10236
10235 i = read_key_sequence (keybuf, (sizeof keybuf/sizeof (keybuf[0])), 10237 i = read_key_sequence (keybuf, (sizeof keybuf / sizeof (keybuf[0])),
10236 prompt, ! NILP (dont_downcase_last), 10238 prompt, ! NILP (dont_downcase_last),
10237 ! NILP (can_return_switch_frame), 0); 10239 ! NILP (can_return_switch_frame), 0);
10238 10240
@@ -10923,6 +10925,11 @@ interrupt_signal (int signalnum) /* If we don't have an argument, some */
10923 errno = old_errno; 10925 errno = old_errno;
10924} 10926}
10925 10927
10928/* If Emacs is stuck because `inhibit-quit' is true, then keep track
10929 of the number of times C-g has been requested. If C-g is pressed
10930 enough times, then quit anyway. See bug#6585. */
10931static int force_quit_count;
10932
10926/* This routine is called at interrupt level in response to C-g. 10933/* This routine is called at interrupt level in response to C-g.
10927 10934
10928 It is called from the SIGINT handler or kbd_buffer_store_event. 10935 It is called from the SIGINT handler or kbd_buffer_store_event.
@@ -11041,8 +11048,16 @@ handle_interrupt (void)
11041 UNGCPRO; 11048 UNGCPRO;
11042 } 11049 }
11043 else 11050 else
11044 /* Else request quit when it's safe */ 11051 { /* Else request quit when it's safe. */
11045 Vquit_flag = Qt; 11052 if (NILP (Vquit_flag))
11053 force_quit_count = 0;
11054 if (++force_quit_count == 3)
11055 {
11056 immediate_quit = 1;
11057 Vinhibit_quit = Qnil;
11058 }
11059 Vquit_flag = Qt;
11060 }
11046 } 11061 }
11047 11062
11048/* TODO: The longjmp in this call throws the NS event loop integration off, 11063/* TODO: The longjmp in this call throws the NS event loop integration off,
diff --git a/src/lisp.h b/src/lisp.h
index 864346d85c2..66e449b0039 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -1139,8 +1139,6 @@ struct Lisp_Symbol
1139 special (with `defvar' etc), and shouldn't be lexically bound. */ 1139 special (with `defvar' etc), and shouldn't be lexically bound. */
1140 unsigned declared_special : 1; 1140 unsigned declared_special : 1;
1141 1141
1142 unsigned spacer : 23;
1143
1144 /* The symbol's name, as a Lisp string. 1142 /* The symbol's name, as a Lisp string.
1145 The name "xname" is used to intentionally break code referring to 1143 The name "xname" is used to intentionally break code referring to
1146 the old field "name" of type pointer to struct Lisp_String. */ 1144 the old field "name" of type pointer to struct Lisp_String. */
@@ -1342,8 +1340,6 @@ struct Lisp_Misc_Any /* Supertype of all Misc types. */
1342 ENUM_BF (Lisp_Misc_Type) type : 16; /* = Lisp_Misc_??? */ 1340 ENUM_BF (Lisp_Misc_Type) type : 16; /* = Lisp_Misc_??? */
1343 unsigned gcmarkbit : 1; 1341 unsigned gcmarkbit : 1;
1344 int spacer : 15; 1342 int spacer : 15;
1345 /* Make it as long as "Lisp_Free without padding". */
1346 void *fill;
1347}; 1343};
1348 1344
1349struct Lisp_Marker 1345struct Lisp_Marker
@@ -1535,13 +1531,6 @@ struct Lisp_Free
1535 unsigned gcmarkbit : 1; 1531 unsigned gcmarkbit : 1;
1536 int spacer : 15; 1532 int spacer : 15;
1537 union Lisp_Misc *chain; 1533 union Lisp_Misc *chain;
1538#ifdef USE_LSB_TAG
1539 /* Try to make sure that sizeof(Lisp_Misc) preserves TYPEBITS-alignment.
1540 This assumes that Lisp_Marker is the largest of the alternatives and
1541 that Lisp_Misc_Any has the same size as "Lisp_Free w/o padding". */
1542 char padding[((((sizeof (struct Lisp_Marker) - 1) >> GCTYPEBITS) + 1)
1543 << GCTYPEBITS) - sizeof (struct Lisp_Misc_Any)];
1544#endif
1545 }; 1534 };
1546 1535
1547/* To get the type field of a union Lisp_Misc, use XMISCTYPE. 1536/* To get the type field of a union Lisp_Misc, use XMISCTYPE.
@@ -1550,19 +1539,19 @@ struct Lisp_Free
1550union Lisp_Misc 1539union Lisp_Misc
1551 { 1540 {
1552 struct Lisp_Misc_Any u_any; /* Supertype of all Misc types. */ 1541 struct Lisp_Misc_Any u_any; /* Supertype of all Misc types. */
1553 struct Lisp_Free u_free; /* Includes padding to force alignment. */ 1542 struct Lisp_Free u_free;
1554 struct Lisp_Marker u_marker; /* 5 */ 1543 struct Lisp_Marker u_marker;
1555 struct Lisp_Overlay u_overlay; /* 5 */ 1544 struct Lisp_Overlay u_overlay;
1556 struct Lisp_Save_Value u_save_value; /* 3 */ 1545 struct Lisp_Save_Value u_save_value;
1557 }; 1546 };
1558 1547
1559union Lisp_Fwd 1548union Lisp_Fwd
1560 { 1549 {
1561 struct Lisp_Intfwd u_intfwd; /* 2 */ 1550 struct Lisp_Intfwd u_intfwd;
1562 struct Lisp_Boolfwd u_boolfwd; /* 2 */ 1551 struct Lisp_Boolfwd u_boolfwd;
1563 struct Lisp_Objfwd u_objfwd; /* 2 */ 1552 struct Lisp_Objfwd u_objfwd;
1564 struct Lisp_Buffer_Objfwd u_buffer_objfwd; /* 2 */ 1553 struct Lisp_Buffer_Objfwd u_buffer_objfwd;
1565 struct Lisp_Kboard_Objfwd u_kboard_objfwd; /* 2 */ 1554 struct Lisp_Kboard_Objfwd u_kboard_objfwd;
1566 }; 1555 };
1567 1556
1568/* Lisp floating point type */ 1557/* Lisp floating point type */
@@ -2253,7 +2242,7 @@ struct gcpro
2253#define GC_USE_GCPROS_CHECK_ZOMBIES 3 2242#define GC_USE_GCPROS_CHECK_ZOMBIES 3
2254 2243
2255#ifndef GC_MARK_STACK 2244#ifndef GC_MARK_STACK
2256#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE 2245#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
2257#endif 2246#endif
2258 2247
2259/* Whether we do the stack marking manually. */ 2248/* Whether we do the stack marking manually. */
@@ -2876,6 +2865,14 @@ extern void syms_of_alloc (void);
2876extern struct buffer * allocate_buffer (void); 2865extern struct buffer * allocate_buffer (void);
2877extern int valid_lisp_object_p (Lisp_Object); 2866extern int valid_lisp_object_p (Lisp_Object);
2878 2867
2868#ifdef REL_ALLOC
2869/* Defined in ralloc.c */
2870extern void *r_alloc (void **, size_t);
2871extern void r_alloc_free (void **);
2872extern void *r_re_alloc (void **, size_t);
2873extern void r_alloc_reset_variable (void **, void **);
2874#endif
2875
2879/* Defined in chartab.c */ 2876/* Defined in chartab.c */
2880EXFUN (Fmake_char_table, 2); 2877EXFUN (Fmake_char_table, 2);
2881EXFUN (Fset_char_table_parent, 2); 2878EXFUN (Fset_char_table_parent, 2);
diff --git a/src/lisp.mk b/src/lisp.mk
index c082630f717..4895ca40959 100644
--- a/src/lisp.mk
+++ b/src/lisp.mk
@@ -131,6 +131,7 @@ lisp = \
131 $(lispsource)/replace.elc \ 131 $(lispsource)/replace.elc \
132 $(lispsource)/buff-menu.elc \ 132 $(lispsource)/buff-menu.elc \
133 $(lispsource)/fringe.elc \ 133 $(lispsource)/fringe.elc \
134 $(lispsource)/emacs-lisp/regexp-opt.elc \
134 $(lispsource)/image.elc \ 135 $(lispsource)/image.elc \
135 $(lispsource)/international/fontset.elc \ 136 $(lispsource)/international/fontset.elc \
136 $(lispsource)/dnd.elc \ 137 $(lispsource)/dnd.elc \
diff --git a/src/lread.c b/src/lread.c
index 48849cccd2b..a2a18921bdc 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -842,7 +842,7 @@ lisp_file_lexically_bound_p (Lisp_Object readcharfun)
842 } 842 }
843 843
844 /* Stop scanning if no colon was found before end marker. */ 844 /* Stop scanning if no colon was found before end marker. */
845 if (!in_file_vars) 845 if (!in_file_vars || ch == '\n' || ch == EOF)
846 break; 846 break;
847 847
848 while (i > 0 && (var[i - 1] == ' ' || var[i - 1] == '\t')) 848 while (i > 0 && (var[i - 1] == ' ' || var[i - 1] == '\t'))
@@ -866,8 +866,7 @@ lisp_file_lexically_bound_p (Lisp_Object readcharfun)
866 ch = READCHAR; 866 ch = READCHAR;
867 } 867 }
868 if (! in_file_vars) 868 if (! in_file_vars)
869 /* The value was terminated by an end-marker, which 869 /* The value was terminated by an end-marker, which remove. */
870 remove. */
871 i -= 3; 870 i -= 3;
872 while (i > 0 && (val[i - 1] == ' ' || val[i - 1] == '\t')) 871 while (i > 0 && (val[i - 1] == ' ' || val[i - 1] == '\t'))
873 i--; 872 i--;
diff --git a/src/m/ia64.h b/src/m/ia64.h
index 2ddc2fdfb17..47df94cedd0 100644
--- a/src/m/ia64.h
+++ b/src/m/ia64.h
@@ -30,13 +30,3 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
30#define EMACS_INT long 30#define EMACS_INT long
31#define pI "l" 31#define pI "l"
32#define EMACS_UINT unsigned long 32#define EMACS_UINT unsigned long
33
34#ifdef REL_ALLOC
35#ifndef _MALLOC_INTERNAL
36/* "char *" because ralloc.c defines it that way. gmalloc.c thinks it
37 is allowed to prototype these as "void *" so we don't prototype in
38 that case. You're right: it stinks! */
39extern char *r_alloc (), *r_re_alloc ();
40extern void r_alloc_free ();
41#endif /* not _MALLOC_INTERNAL */
42#endif /* REL_ALLOC */
diff --git a/src/nsterm.m b/src/nsterm.m
index a45792fd645..7cbaf991311 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -6038,11 +6038,15 @@ ns_term_shutdown (int sig)
6038 restrict the height to just one monitor. So we override this. */ 6038 restrict the height to just one monitor. So we override this. */
6039- (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen *)screen 6039- (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen *)screen
6040{ 6040{
6041 /* When making the frame visible for the first time, we want to 6041 /* When making the frame visible for the first time or if there is just
6042 constrain. Other times not. */ 6042 one screen, we want to constrain. Other times not. */
6043 NSUInteger nr_screens = [[NSScreen screens] count];
6043 struct frame *f = ((EmacsView *)[self delegate])->emacsframe; 6044 struct frame *f = ((EmacsView *)[self delegate])->emacsframe;
6044 NSTRACE (constrainFrameRect); 6045 NSTRACE (constrainFrameRect);
6045 6046
6047 if (nr_screens == 1)
6048 return [super constrainFrameRect:frameRect toScreen:screen];
6049
6046 if (f->output_data.ns->dont_constrain 6050 if (f->output_data.ns->dont_constrain
6047 || ns_menu_bar_should_be_hidden ()) 6051 || ns_menu_bar_should_be_hidden ())
6048 return frameRect; 6052 return frameRect;
diff --git a/src/print.c b/src/print.c
index 868d61ba2f1..92e62520954 100644
--- a/src/print.c
+++ b/src/print.c
@@ -93,14 +93,14 @@ static void print_interval (INTERVAL interval, Lisp_Object printcharfun);
93int print_output_debug_flag EXTERNALLY_VISIBLE = 1; 93int print_output_debug_flag EXTERNALLY_VISIBLE = 1;
94 94
95 95
96/* Low level output routines for characters and strings */ 96/* Low level output routines for characters and strings. */
97 97
98/* Lisp functions to do output using a stream 98/* Lisp functions to do output using a stream
99 must have the stream in a variable called printcharfun 99 must have the stream in a variable called printcharfun
100 and must start with PRINTPREPARE, end with PRINTFINISH, 100 and must start with PRINTPREPARE, end with PRINTFINISH,
101 and use PRINTDECLARE to declare common variables. 101 and use PRINTDECLARE to declare common variables.
102 Use PRINTCHAR to output one character, 102 Use PRINTCHAR to output one character,
103 or call strout to output a block of characters. */ 103 or call strout to output a block of characters. */
104 104
105#define PRINTDECLARE \ 105#define PRINTDECLARE \
106 struct buffer *old = current_buffer; \ 106 struct buffer *old = current_buffer; \
@@ -1122,15 +1122,15 @@ print_preprocess (Lisp_Object obj)
1122 int loop_count = 0; 1122 int loop_count = 0;
1123 Lisp_Object halftail; 1123 Lisp_Object halftail;
1124 1124
1125 /* Give up if we go so deep that print_object will get an error. */
1126 /* See similar code in print_object. */
1127 if (print_depth >= PRINT_CIRCLE)
1128 error ("Apparently circular structure being printed");
1129
1130 /* Avoid infinite recursion for circular nested structure 1125 /* Avoid infinite recursion for circular nested structure
1131 in the case where Vprint_circle is nil. */ 1126 in the case where Vprint_circle is nil. */
1132 if (NILP (Vprint_circle)) 1127 if (NILP (Vprint_circle))
1133 { 1128 {
1129 /* Give up if we go so deep that print_object will get an error. */
1130 /* See similar code in print_object. */
1131 if (print_depth >= PRINT_CIRCLE)
1132 error ("Apparently circular structure being printed");
1133
1134 for (i = 0; i < print_depth; i++) 1134 for (i = 0; i < print_depth; i++)
1135 if (EQ (obj, being_printed[i])) 1135 if (EQ (obj, being_printed[i]))
1136 return; 1136 return;
@@ -1232,7 +1232,7 @@ static void print_check_string_charset_prop (INTERVAL interval, Lisp_Object stri
1232#define PRINT_STRING_NON_CHARSET_FOUND 1 1232#define PRINT_STRING_NON_CHARSET_FOUND 1
1233#define PRINT_STRING_UNSAFE_CHARSET_FOUND 2 1233#define PRINT_STRING_UNSAFE_CHARSET_FOUND 2
1234 1234
1235/* Bitwise or of the above macros. */ 1235/* Bitwise or of the above macros. */
1236static int print_check_string_result; 1236static int print_check_string_result;
1237 1237
1238static void 1238static void
@@ -1315,48 +1315,46 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
1315 1315
1316 QUIT; 1316 QUIT;
1317 1317
1318 /* See similar code in print_preprocess. */
1319 if (print_depth >= PRINT_CIRCLE)
1320 error ("Apparently circular structure being printed");
1321
1322 /* Detect circularities and truncate them. */ 1318 /* Detect circularities and truncate them. */
1323 if (PRINT_CIRCLE_CANDIDATE_P (obj)) 1319 if (NILP (Vprint_circle))
1324 { 1320 {
1325 if (NILP (Vprint_circle) && NILP (Vprint_gensym)) 1321 /* Simple but incomplete way. */
1326 { 1322 int i;
1327 /* Simple but incomplete way. */ 1323
1328 int i; 1324 /* See similar code in print_preprocess. */
1329 for (i = 0; i < print_depth; i++) 1325 if (print_depth >= PRINT_CIRCLE)
1330 if (EQ (obj, being_printed[i])) 1326 error ("Apparently circular structure being printed");
1331 { 1327
1332 sprintf (buf, "#%d", i); 1328 for (i = 0; i < print_depth; i++)
1333 strout (buf, -1, -1, printcharfun); 1329 if (EQ (obj, being_printed[i]))
1334 return; 1330 {
1335 } 1331 sprintf (buf, "#%d", i);
1336 being_printed[print_depth] = obj; 1332 strout (buf, -1, -1, printcharfun);
1337 } 1333 return;
1338 else 1334 }
1335 being_printed[print_depth] = obj;
1336 }
1337 else if (PRINT_CIRCLE_CANDIDATE_P (obj))
1338 {
1339 /* With the print-circle feature. */
1340 Lisp_Object num = Fgethash (obj, Vprint_number_table, Qnil);
1341 if (INTEGERP (num))
1339 { 1342 {
1340 /* With the print-circle feature. */ 1343 EMACS_INT n = XINT (num);
1341 Lisp_Object num = Fgethash (obj, Vprint_number_table, Qnil); 1344 if (n < 0)
1342 if (INTEGERP (num)) 1345 { /* Add a prefix #n= if OBJ has not yet been printed;
1346 that is, its status field is nil. */
1347 sprintf (buf, "#%"pI"d=", -n);
1348 strout (buf, -1, -1, printcharfun);
1349 /* OBJ is going to be printed. Remember that fact. */
1350 Fputhash (obj, make_number (- n), Vprint_number_table);
1351 }
1352 else
1343 { 1353 {
1344 EMACS_INT n = XINT (num); 1354 /* Just print #n# if OBJ has already been printed. */
1345 if (n < 0) 1355 sprintf (buf, "#%"pI"d#", n);
1346 { /* Add a prefix #n= if OBJ has not yet been printed; 1356 strout (buf, -1, -1, printcharfun);
1347 that is, its status field is nil. */ 1357 return;
1348 sprintf (buf, "#%"pI"d=", -n);
1349 strout (buf, -1, -1, printcharfun);
1350 /* OBJ is going to be printed. Remember that fact. */
1351 Fputhash (obj, make_number (- n), Vprint_number_table);
1352 }
1353 else
1354 {
1355 /* Just print #n# if OBJ has already been printed. */
1356 sprintf (buf, "#%"pI"d#", n);
1357 strout (buf, -1, -1, printcharfun);
1358 return;
1359 }
1360 } 1358 }
1361 } 1359 }
1362 } 1360 }
diff --git a/src/process.c b/src/process.c
index 9ccc77e1d83..a84dac144d8 100644
--- a/src/process.c
+++ b/src/process.c
@@ -120,6 +120,13 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
120#include "nsterm.h" 120#include "nsterm.h"
121#endif 121#endif
122 122
123/* Work around GCC 4.7.0 bug with strict overflow checking; see
124 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52904>.
125 These lines can be removed once the GCC bug is fixed. */
126#if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__
127# pragma GCC diagnostic ignored "-Wstrict-overflow"
128#endif
129
123Lisp_Object Qeuid, Qegid, Qcomm, Qstate, Qppid, Qpgrp, Qsess, Qttname, Qtpgid; 130Lisp_Object Qeuid, Qegid, Qcomm, Qstate, Qppid, Qpgrp, Qsess, Qttname, Qtpgid;
124Lisp_Object Qminflt, Qmajflt, Qcminflt, Qcmajflt, Qutime, Qstime, Qcstime; 131Lisp_Object Qminflt, Qmajflt, Qcminflt, Qcmajflt, Qutime, Qstime, Qcstime;
125Lisp_Object Qcutime, Qpri, Qnice, Qthcount, Qstart, Qvsize, Qrss, Qargs; 132Lisp_Object Qcutime, Qpri, Qnice, Qthcount, Qstart, Qvsize, Qrss, Qargs;
@@ -1066,7 +1073,9 @@ is more appropriate for saving the process buffer.
1066 1073
1067Binding the variable `inherit-process-coding-system' to non-nil before 1074Binding the variable `inherit-process-coding-system' to non-nil before
1068starting the process is an alternative way of setting the inherit flag 1075starting the process is an alternative way of setting the inherit flag
1069for the process which will run. */) 1076for the process which will run.
1077
1078This function returns FLAG. */)
1070 (register Lisp_Object process, Lisp_Object flag) 1079 (register Lisp_Object process, Lisp_Object flag)
1071{ 1080{
1072 CHECK_PROCESS (process); 1081 CHECK_PROCESS (process);
@@ -1079,7 +1088,8 @@ DEFUN ("set-process-query-on-exit-flag",
1079 2, 2, 0, 1088 2, 2, 0,
1080 doc: /* Specify if query is needed for PROCESS when Emacs is exited. 1089 doc: /* Specify if query is needed for PROCESS when Emacs is exited.
1081If the second argument FLAG is non-nil, Emacs will query the user before 1090If the second argument FLAG is non-nil, Emacs will query the user before
1082exiting or killing a buffer if PROCESS is running. */) 1091exiting or killing a buffer if PROCESS is running. This function
1092returns FLAG. */)
1083 (register Lisp_Object process, Lisp_Object flag) 1093 (register Lisp_Object process, Lisp_Object flag)
1084{ 1094{
1085 CHECK_PROCESS (process); 1095 CHECK_PROCESS (process);
@@ -2521,7 +2531,7 @@ could be "COM1", or "\\\\.\\COM10" for ports higher than COM9 (double
2521the backslashes in strings). 2531the backslashes in strings).
2522 2532
2523:speed SPEED -- (mandatory) is handled by `serial-process-configure', 2533:speed SPEED -- (mandatory) is handled by `serial-process-configure',
2524which is called by `make-serial-process'. 2534which this function calls.
2525 2535
2526:name NAME -- NAME is the name of the process. If NAME is not given, 2536:name NAME -- NAME is the name of the process. If NAME is not given,
2527the value of PORT is used. 2537the value of PORT is used.
@@ -2550,13 +2560,12 @@ but you can send outgoing data. The stopped state is cleared by
2550 2560
2551:plist PLIST -- Install PLIST as the initial plist of the process. 2561:plist PLIST -- Install PLIST as the initial plist of the process.
2552 2562
2553:speed
2554:bytesize 2563:bytesize
2555:parity 2564:parity
2556:stopbits 2565:stopbits
2557:flowcontrol 2566:flowcontrol
2558-- These arguments are handled by `serial-process-configure', which is 2567-- This function calls `serial-process-configure' to handle these
2559called by `make-serial-process'. 2568arguments.
2560 2569
2561The original argument list, possibly modified by later configuration, 2570The original argument list, possibly modified by later configuration,
2562is available via the function `process-contact'. 2571is available via the function `process-contact'.
@@ -2790,7 +2799,7 @@ The stopped state is cleared by `continue-process' and set by
2790:filter-multibyte BOOL -- If BOOL is non-nil, strings given to the 2799:filter-multibyte BOOL -- If BOOL is non-nil, strings given to the
2791process filter are multibyte, otherwise they are unibyte. 2800process filter are multibyte, otherwise they are unibyte.
2792If this keyword is not specified, the strings are multibyte if 2801If this keyword is not specified, the strings are multibyte if
2793`default-enable-multibyte-characters' is non-nil. 2802the default value of `enable-multibyte-characters' is non-nil.
2794 2803
2795:sentinel SENTINEL -- Install SENTINEL as the process sentinel. 2804:sentinel SENTINEL -- Install SENTINEL as the process sentinel.
2796 2805
@@ -4877,16 +4886,23 @@ wait_reading_process_output (int time_limit, int microsecs, int read_kbd,
4877 It can't hurt. */ 4886 It can't hurt. */
4878 else if (nread == -1 && errno == EIO) 4887 else if (nread == -1 && errno == EIO)
4879 { 4888 {
4880 /* Don't do anything if only a pty, with no associated 4889 struct Lisp_Process *p = XPROCESS (proc);
4881 process (bug#10933). */ 4890
4882 if (XPROCESS (proc)->pid != -2) { 4891 /* Clear the descriptor now, so we only raise the
4883 /* Clear the descriptor now, so we only raise the signal 4892 signal once. */
4884 once. */ 4893 FD_CLR (channel, &input_wait_mask);
4885 FD_CLR (channel, &input_wait_mask); 4894 FD_CLR (channel, &non_keyboard_wait_mask);
4886 FD_CLR (channel, &non_keyboard_wait_mask); 4895
4887 4896 if (p->pid == -2)
4888 kill (getpid (), SIGCHLD); 4897 {
4889 } 4898 /* If the EIO occurs on a pty, sigchld_handler's
4899 wait3() will not find the process object to
4900 delete. Do it here. */
4901 p->tick = ++process_tick;
4902 p->status = Qfailed;
4903 }
4904 else
4905 kill (getpid (), SIGCHLD);
4890 } 4906 }
4891#endif /* HAVE_PTYS */ 4907#endif /* HAVE_PTYS */
4892 /* If we can detect process termination, don't consider the 4908 /* If we can detect process termination, don't consider the
diff --git a/src/ralloc.c b/src/ralloc.c
index 896ad9f3155..4bb2f240438 100644
--- a/src/ralloc.c
+++ b/src/ralloc.c
@@ -95,10 +95,8 @@ static int extra_bytes;
95/* Macros for rounding. Note that rounding to any value is possible 95/* Macros for rounding. Note that rounding to any value is possible
96 by changing the definition of PAGE. */ 96 by changing the definition of PAGE. */
97#define PAGE (getpagesize ()) 97#define PAGE (getpagesize ())
98#define ALIGNED(addr) (((unsigned long int) (addr) & (page_size - 1)) == 0)
99#define ROUNDUP(size) (((unsigned long int) (size) + page_size - 1) \ 98#define ROUNDUP(size) (((unsigned long int) (size) + page_size - 1) \
100 & ~(page_size - 1)) 99 & ~(page_size - 1))
101#define ROUND_TO_PAGE(addr) (addr & (~(page_size - 1)))
102 100
103#define MEM_ALIGN sizeof (double) 101#define MEM_ALIGN sizeof (double)
104#define MEM_ROUNDUP(addr) (((unsigned long int)(addr) + MEM_ALIGN - 1) \ 102#define MEM_ROUNDUP(addr) (((unsigned long int)(addr) + MEM_ALIGN - 1) \
@@ -151,7 +149,6 @@ typedef struct heap
151} *heap_ptr; 149} *heap_ptr;
152 150
153#define NIL_HEAP ((heap_ptr) 0) 151#define NIL_HEAP ((heap_ptr) 0)
154#define HEAP_PTR_SIZE (sizeof (struct heap))
155 152
156/* This is the first heap object. 153/* This is the first heap object.
157 If we need additional heap objects, each one resides at the beginning of 154 If we need additional heap objects, each one resides at the beginning of
@@ -366,15 +363,6 @@ relinquish (void)
366 } 363 }
367 } 364 }
368} 365}
369
370/* Return the total size in use by relocating allocator,
371 above where malloc gets space. */
372
373long
374r_alloc_size_in_use (void)
375{
376 return (char *) break_value - (char *) virtual_break_value;
377}
378 366
379/* The meat - allocating, freeing, and relocating blocs. */ 367/* The meat - allocating, freeing, and relocating blocs. */
380 368
@@ -748,7 +736,7 @@ free_bloc (bloc_ptr bloc)
748 __morecore hook values - in particular, __default_morecore in the 736 __morecore hook values - in particular, __default_morecore in the
749 GNU malloc package. */ 737 GNU malloc package. */
750 738
751POINTER 739static POINTER
752r_alloc_sbrk (long int size) 740r_alloc_sbrk (long int size)
753{ 741{
754 register bloc_ptr b; 742 register bloc_ptr b;
@@ -1014,52 +1002,6 @@ r_re_alloc (POINTER *ptr, SIZE size)
1014 return *ptr; 1002 return *ptr;
1015} 1003}
1016 1004
1017/* Disable relocations, after making room for at least SIZE bytes
1018 of non-relocatable heap if possible. The relocatable blocs are
1019 guaranteed to hold still until thawed, even if this means that
1020 malloc must return a null pointer. */
1021
1022void
1023r_alloc_freeze (long int size)
1024{
1025 if (! r_alloc_initialized)
1026 r_alloc_init ();
1027
1028 /* If already frozen, we can't make any more room, so don't try. */
1029 if (r_alloc_freeze_level > 0)
1030 size = 0;
1031 /* If we can't get the amount requested, half is better than nothing. */
1032 while (size > 0 && r_alloc_sbrk (size) == 0)
1033 size /= 2;
1034 ++r_alloc_freeze_level;
1035 if (size > 0)
1036 r_alloc_sbrk (-size);
1037}
1038
1039void
1040r_alloc_thaw (void)
1041{
1042
1043 if (! r_alloc_initialized)
1044 r_alloc_init ();
1045
1046 if (--r_alloc_freeze_level < 0)
1047 abort ();
1048
1049 /* This frees all unused blocs. It is not too inefficient, as the resize
1050 and memcpy is done only once. Afterwards, all unreferenced blocs are
1051 already shrunk to zero size. */
1052 if (!r_alloc_freeze_level)
1053 {
1054 bloc_ptr *b = &first_bloc;
1055 while (*b)
1056 if (!(*b)->variable)
1057 free_bloc (*b);
1058 else
1059 b = &(*b)->next;
1060 }
1061}
1062
1063 1005
1064#if defined (emacs) && defined (DOUG_LEA_MALLOC) 1006#if defined (emacs) && defined (DOUG_LEA_MALLOC)
1065 1007
diff --git a/src/regex.c b/src/regex.c
index 0f9150193ec..d16a5148054 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -33,6 +33,19 @@
33 #pragma alloca 33 #pragma alloca
34#endif 34#endif
35 35
36/* Ignore some GCC warnings for now. This section should go away
37 once the Emacs and Gnulib regex code is merged. */
38#if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__
39# pragma GCC diagnostic ignored "-Wstrict-overflow"
40# ifndef emacs
41# pragma GCC diagnostic ignored "-Wunused-but-set-variable"
42# pragma GCC diagnostic ignored "-Wunused-function"
43# pragma GCC diagnostic ignored "-Wunused-macros"
44# pragma GCC diagnostic ignored "-Wunused-result"
45# pragma GCC diagnostic ignored "-Wunused-variable"
46# endif
47#endif
48
36#ifdef HAVE_CONFIG_H 49#ifdef HAVE_CONFIG_H
37# include <config.h> 50# include <config.h>
38#endif 51#endif
@@ -198,7 +211,7 @@
198 211
199/* When used in Emacs's lib-src, we need xmalloc and xrealloc. */ 212/* When used in Emacs's lib-src, we need xmalloc and xrealloc. */
200 213
201void * 214static void *
202xmalloc (size_t size) 215xmalloc (size_t size)
203{ 216{
204 register void *val; 217 register void *val;
@@ -211,7 +224,7 @@ xmalloc (size_t size)
211 return val; 224 return val;
212} 225}
213 226
214void * 227static void *
215xrealloc (void *block, size_t size) 228xrealloc (void *block, size_t size)
216{ 229{
217 register void *val; 230 register void *val;
diff --git a/src/s/aix4-2.h b/src/s/aix4-2.h
index 37b041396f9..354ffda0988 100644
--- a/src/s/aix4-2.h
+++ b/src/s/aix4-2.h
@@ -75,3 +75,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
75 Emacs currently calls xrealloc on the results of get_current_dir name, 75 Emacs currently calls xrealloc on the results of get_current_dir name,
76 to avoid a crash just use the Emacs implementation for that function. */ 76 to avoid a crash just use the Emacs implementation for that function. */
77#define BROKEN_GET_CURRENT_DIR_NAME 1 77#define BROKEN_GET_CURRENT_DIR_NAME 1
78
79/* Conservative garbage collection has not been tested, so for now
80 play it safe and stick with the old-fashioned way of marking. */
81#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE
diff --git a/src/s/cygwin.h b/src/s/cygwin.h
index 9a371829eaa..9310890351e 100644
--- a/src/s/cygwin.h
+++ b/src/s/cygwin.h
@@ -58,7 +58,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
58 if (-1 == openpty (&fd, &dummy, pty_name, 0, 0)) \ 58 if (-1 == openpty (&fd, &dummy, pty_name, 0, 0)) \
59 fd = -1; \ 59 fd = -1; \
60 sigsetmask (mask); \ 60 sigsetmask (mask); \
61 emacs_close (dummy); \ 61 if (fd >= 0) \
62 emacs_close (dummy); \
62 } \ 63 } \
63 while (0) 64 while (0)
64 65
@@ -81,16 +82,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
81 82
82#define HAVE_SOCKETS 83#define HAVE_SOCKETS
83 84
84/* vfork() interacts badly with setsid(), causing ptys to fail to
85 change their controlling terminal */
86#define vfork fork
87
88/* This should work (at least when compiling with gcc). But I have no way
89 or intention to verify or even test it. If you encounter a problem with
90 it, feel free to change this setting, but please add a comment here about
91 why it needed to be changed. */
92#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
93
94/* Emacs supplies its own malloc, but glib (part of Gtk+) calls 85/* Emacs supplies its own malloc, but glib (part of Gtk+) calls
95 memalign and on Cygwin, that becomes the Cygwin-supplied memalign. 86 memalign and on Cygwin, that becomes the Cygwin-supplied memalign.
96 As malloc is not the Cygwin malloc, the Cygwin memalign always 87 As malloc is not the Cygwin malloc, the Cygwin memalign always
diff --git a/src/s/darwin.h b/src/s/darwin.h
index 9ac9e91fd9d..7c8e26f46cc 100644
--- a/src/s/darwin.h
+++ b/src/s/darwin.h
@@ -145,6 +145,3 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
145 It is already a controlling terminal of subprocess, because we did 145 It is already a controlling terminal of subprocess, because we did
146 ioctl TIOCSCTTY. */ 146 ioctl TIOCSCTTY. */
147#define DONT_REOPEN_PTY 147#define DONT_REOPEN_PTY
148
149/* Use the GC_MAKE_GCPROS_NOOPS (see lisp.h) method for marking the stack. */
150#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
diff --git a/src/s/freebsd.h b/src/s/freebsd.h
index c74605fe366..05be07695cb 100644
--- a/src/s/freebsd.h
+++ b/src/s/freebsd.h
@@ -58,6 +58,3 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
58/* Tell that garbage collector that setjmp is known to save all 58/* Tell that garbage collector that setjmp is known to save all
59 registers relevant for conservative garbage collection in the jmp_buf. */ 59 registers relevant for conservative garbage collection in the jmp_buf. */
60#define GC_SETJMP_WORKS 1 60#define GC_SETJMP_WORKS 1
61
62/* Use the GC_MAKE_GCPROS_NOOPS (see lisp.h) method for marking the stack. */
63#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
diff --git a/src/s/gnu-linux.h b/src/s/gnu-linux.h
index c1233c0e6ce..d04ea33068a 100644
--- a/src/s/gnu-linux.h
+++ b/src/s/gnu-linux.h
@@ -145,7 +145,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
145 || defined __arm__ || defined __powerpc__ || defined __amd64__ \ 145 || defined __arm__ || defined __powerpc__ || defined __amd64__ \
146 || defined __ia64__ || defined __sh__ 146 || defined __ia64__ || defined __sh__
147#define GC_SETJMP_WORKS 1 147#define GC_SETJMP_WORKS 1
148#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
149#ifdef __ia64__ 148#ifdef __ia64__
150#define GC_MARK_SECONDARY_STACK() \ 149#define GC_MARK_SECONDARY_STACK() \
151 do { \ 150 do { \
@@ -155,4 +154,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
155 __builtin_ia64_bsp ()); \ 154 __builtin_ia64_bsp ()); \
156 } while (0) 155 } while (0)
157#endif 156#endif
157#else
158#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE
158#endif 159#endif
diff --git a/src/s/gnu.h b/src/s/gnu.h
index 37aaa1357cc..a09e0e824c9 100644
--- a/src/s/gnu.h
+++ b/src/s/gnu.h
@@ -45,6 +45,3 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
45#endif /* emacs */ 45#endif /* emacs */
46 46
47#define POSIX_SIGNALS 1 47#define POSIX_SIGNALS 1
48
49/* Use the GC_MAKE_GCPROS_NOOPS (see lisp.h) method for marking the stack. */
50#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
diff --git a/src/s/hpux10-20.h b/src/s/hpux10-20.h
index becb5d3464e..3e25b1bd0d9 100644
--- a/src/s/hpux10-20.h
+++ b/src/s/hpux10-20.h
@@ -100,6 +100,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
100 header sections which lose when `static' is defined away, as it is 100 header sections which lose when `static' is defined away, as it is
101 on HP-UX. (You get duplicate symbol errors on linking). */ 101 on HP-UX. (You get duplicate symbol errors on linking). */
102#undef _FILE_OFFSET_BITS 102#undef _FILE_OFFSET_BITS
103
104/* Conservative garbage collection has not been tested, so for now
105 play it safe and stick with the old-fashioned way of marking. */
106#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE
103 107
104/* The data segment on this machine always starts at address 0x40000000. */ 108/* The data segment on this machine always starts at address 0x40000000. */
105#define DATA_SEG_BITS 0x40000000 109#define DATA_SEG_BITS 0x40000000
diff --git a/src/s/irix6-5.h b/src/s/irix6-5.h
index 32374498fe7..e5d90c1bd5d 100644
--- a/src/s/irix6-5.h
+++ b/src/s/irix6-5.h
@@ -95,7 +95,6 @@ char *_getpty();
95 95
96/* Tested on Irix 6.5. SCM worked on earlier versions. */ 96/* Tested on Irix 6.5. SCM worked on earlier versions. */
97#define GC_SETJMP_WORKS 1 97#define GC_SETJMP_WORKS 1
98#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
99 98
100 99
101/* DATA_SEG_BITS forces extra bits to be or'd in with any pointers which 100/* DATA_SEG_BITS forces extra bits to be or'd in with any pointers which
diff --git a/src/s/msdos.h b/src/s/msdos.h
index cde24147c57..add2902d5f3 100644
--- a/src/s/msdos.h
+++ b/src/s/msdos.h
@@ -137,4 +137,3 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */
137/* Tell the garbage collector that setjmp is known to save all 137/* Tell the garbage collector that setjmp is known to save all
138 registers relevant for conservative garbage collection in the jmp_buf. */ 138 registers relevant for conservative garbage collection in the jmp_buf. */
139#define GC_SETJMP_WORKS 1 139#define GC_SETJMP_WORKS 1
140#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
diff --git a/src/s/netbsd.h b/src/s/netbsd.h
index f25023fb615..ce3b2afa1bb 100644
--- a/src/s/netbsd.h
+++ b/src/s/netbsd.h
@@ -38,6 +38,3 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
38/* Tell that garbage collector that setjmp is known to save all 38/* Tell that garbage collector that setjmp is known to save all
39 registers relevant for conservative garbage collection in the jmp_buf. */ 39 registers relevant for conservative garbage collection in the jmp_buf. */
40#define GC_SETJMP_WORKS 1 40#define GC_SETJMP_WORKS 1
41
42/* Use the GC_MAKE_GCPROS_NOOPS (see lisp.h) method. */
43#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
diff --git a/src/s/sol2-6.h b/src/s/sol2-6.h
index a9fefcb1992..bb7a9859b7d 100644
--- a/src/s/sol2-6.h
+++ b/src/s/sol2-6.h
@@ -59,4 +59,3 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
59 } 59 }
60 60
61#define GC_SETJMP_WORKS 1 61#define GC_SETJMP_WORKS 1
62#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
diff --git a/src/s/unixware.h b/src/s/unixware.h
index 22c396a060e..63c36ee40c2 100644
--- a/src/s/unixware.h
+++ b/src/s/unixware.h
@@ -50,3 +50,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
50 } 50 }
51 51
52#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->__ptr - (FILE)->__base) 52#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->__ptr - (FILE)->__base)
53
54/* Conservative garbage collection has not been tested, so for now
55 play it safe and stick with the old-fashioned way of marking. */
56#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE
diff --git a/src/sysdep.c b/src/sysdep.c
index 426c6832347..4df1f50a096 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -37,6 +37,13 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
37#include "sysselect.h" 37#include "sysselect.h"
38#include "blockinput.h" 38#include "blockinput.h"
39 39
40#ifdef __FreeBSD__
41#include <sys/sysctl.h>
42#include <sys/user.h>
43#include <sys/resource.h> */
44#include <math.h>
45#endif
46
40#ifdef WINDOWSNT 47#ifdef WINDOWSNT
41#define read sys_read 48#define read sys_read
42#define write sys_write 49#define write sys_write
@@ -2530,6 +2537,40 @@ list_system_processes (void)
2530 return proclist; 2537 return proclist;
2531} 2538}
2532 2539
2540#elif defined (__FreeBSD__)
2541
2542Lisp_Object
2543list_system_processes ()
2544{
2545 int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_PROC};
2546 size_t len;
2547 struct kinfo_proc *procs;
2548 size_t i;
2549
2550 struct gcpro gcpro1;
2551 Lisp_Object proclist = Qnil;
2552
2553 if (sysctl (mib, 3, NULL, &len, NULL, 0) != 0)
2554 return proclist;
2555
2556 procs = xmalloc (len);
2557 if (sysctl (mib, 3, procs, &len, NULL, 0) != 0)
2558 {
2559 xfree (procs);
2560 return proclist;
2561 }
2562
2563 GCPRO1 (proclist);
2564 len /= sizeof (struct kinfo_proc);
2565 for (i = 0; i < len; i++)
2566 proclist = Fcons (make_fixnum_or_float (procs[i].ki_pid), proclist);
2567 UNGCPRO;
2568
2569 xfree (procs);
2570
2571 return proclist;
2572}
2573
2533/* The WINDOWSNT implementation is in w32.c. 2574/* The WINDOWSNT implementation is in w32.c.
2534 The MSDOS implementation is in dosfns.c. */ 2575 The MSDOS implementation is in dosfns.c. */
2535#elif !defined (WINDOWSNT) && !defined (MSDOS) 2576#elif !defined (WINDOWSNT) && !defined (MSDOS)
@@ -3077,6 +3118,176 @@ system_process_attributes (Lisp_Object pid)
3077 return attrs; 3118 return attrs;
3078} 3119}
3079 3120
3121#elif defined(__FreeBSD__)
3122
3123Lisp_Object
3124system_process_attributes (Lisp_Object pid)
3125{
3126 int proc_id;
3127 int pagesize = getpagesize();
3128 int npages;
3129 int fscale;
3130 struct passwd *pw;
3131 struct group *gr;
3132 char *ttyname;
3133 size_t len;
3134 char args[MAXPATHLEN];
3135 EMACS_TIME t, now;
3136
3137 int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_PID};
3138 struct kinfo_proc proc;
3139 size_t proclen = sizeof(proc);
3140
3141 struct gcpro gcpro1, gcpro2;
3142 Lisp_Object attrs = Qnil;
3143 Lisp_Object decoded_comm;
3144
3145 CHECK_NUMBER_OR_FLOAT (pid);
3146 proc_id = FLOATP (pid) ? XFLOAT_DATA (pid) : XINT (pid);
3147 mib[3] = proc_id;
3148
3149 if (sysctl (mib, 4, &proc, &proclen, NULL, 0) != 0)
3150 return attrs;
3151
3152 GCPRO2 (attrs, decoded_comm);
3153
3154 attrs = Fcons (Fcons (Qeuid, make_fixnum_or_float(proc.ki_uid)), attrs);
3155
3156 BLOCK_INPUT;
3157 pw = getpwuid (proc.ki_uid);
3158 UNBLOCK_INPUT;
3159 if (pw)
3160 attrs = Fcons (Fcons (Quser, build_string (pw->pw_name)), attrs);
3161
3162 attrs = Fcons (Fcons (Qegid, make_fixnum_or_float(proc.ki_svgid)), attrs);
3163
3164 BLOCK_INPUT;
3165 gr = getgrgid (proc.ki_svgid);
3166 UNBLOCK_INPUT;
3167 if (gr)
3168 attrs = Fcons (Fcons (Qgroup, build_string (gr->gr_name)), attrs);
3169
3170 decoded_comm = code_convert_string_norecord
3171 (make_unibyte_string (proc.ki_comm, strlen (proc.ki_comm)),
3172 Vlocale_coding_system, 0);
3173
3174 attrs = Fcons (Fcons (Qcomm, decoded_comm), attrs);
3175 {
3176 char state[2] = {'\0', '\0'};
3177 switch (proc.ki_stat)
3178 {
3179 case SRUN:
3180 state[0] = 'R';
3181 break;
3182
3183 case SSLEEP:
3184 state[0] = 'S';
3185 break;
3186
3187 case SLOCK:
3188 state[0] = 'D';
3189 break;
3190
3191 case SZOMB:
3192 state[0] = 'Z';
3193 break;
3194
3195 case SSTOP:
3196 state[0] = 'T';
3197 break;
3198 }
3199 attrs = Fcons (Fcons (Qstate, build_string (state)), attrs);
3200 }
3201
3202 attrs = Fcons (Fcons (Qppid, make_fixnum_or_float (proc.ki_ppid)), attrs);
3203 attrs = Fcons (Fcons (Qpgrp, make_fixnum_or_float (proc.ki_pgid)), attrs);
3204 attrs = Fcons (Fcons (Qsess, make_fixnum_or_float (proc.ki_sid)), attrs);
3205
3206 BLOCK_INPUT;
3207 ttyname = proc.ki_tdev == NODEV ? NULL : devname (proc.ki_tdev, S_IFCHR);
3208 UNBLOCK_INPUT;
3209 if (ttyname)
3210 attrs = Fcons (Fcons (Qtty, build_string (ttyname)), attrs);
3211
3212 attrs = Fcons (Fcons (Qtpgid, make_fixnum_or_float (proc.ki_tpgid)), attrs);
3213 attrs = Fcons (Fcons (Qminflt, make_fixnum_or_float (proc.ki_rusage.ru_minflt)), attrs);
3214 attrs = Fcons (Fcons (Qmajflt, make_fixnum_or_float (proc.ki_rusage.ru_majflt)), attrs);
3215 attrs = Fcons (Fcons (Qcminflt, make_number (proc.ki_rusage_ch.ru_minflt)), attrs);
3216 attrs = Fcons (Fcons (Qcmajflt, make_number (proc.ki_rusage_ch.ru_majflt)), attrs);
3217
3218#define TIMELIST(ts) \
3219 list3 (make_number (EMACS_SECS (ts) >> 16 & 0xffff), \
3220 make_number (EMACS_SECS (ts) & 0xffff), \
3221 make_number (EMACS_USECS (ts)))
3222
3223 attrs = Fcons (Fcons (Qutime, TIMELIST(proc.ki_rusage.ru_utime)), attrs);
3224 attrs = Fcons (Fcons (Qstime, TIMELIST(proc.ki_rusage.ru_stime)), attrs);
3225 EMACS_ADD_TIME (t, proc.ki_rusage.ru_utime, proc.ki_rusage.ru_stime);
3226 attrs = Fcons (Fcons (Qtime, TIMELIST(t)), attrs);
3227
3228 attrs = Fcons (Fcons (Qcutime, TIMELIST(proc.ki_rusage_ch.ru_utime)), attrs);
3229 attrs = Fcons (Fcons (Qcstime, TIMELIST(proc.ki_rusage_ch.ru_utime)), attrs);
3230 EMACS_ADD_TIME (t, proc.ki_rusage_ch.ru_utime, proc.ki_rusage_ch.ru_stime);
3231 attrs = Fcons (Fcons (Qctime, TIMELIST(t)), attrs);
3232
3233 attrs = Fcons (Fcons (Qthcount, make_fixnum_or_float (proc.ki_numthreads)), attrs);
3234 attrs = Fcons (Fcons (Qpri, make_number (proc.ki_pri.pri_native)), attrs);
3235 attrs = Fcons (Fcons (Qnice, make_number (proc.ki_nice)), attrs);
3236 attrs = Fcons (Fcons (Qstart, TIMELIST(proc.ki_start)), attrs);
3237 attrs = Fcons (Fcons (Qvsize, make_number (proc.ki_size >> 10)), attrs);
3238 attrs = Fcons (Fcons (Qrss, make_number (proc.ki_rssize * pagesize >> 10)), attrs);
3239
3240 EMACS_GET_TIME (now);
3241 EMACS_SUB_TIME (t, now, proc.ki_start);
3242 attrs = Fcons (Fcons (Qetime, TIMELIST(t)), attrs);
3243
3244#undef TIMELIST
3245
3246 len = sizeof(fscale);
3247 if (sysctlbyname ("kern.fscale", &fscale, &len, NULL, 0) == 0)
3248 {
3249 float pcpu;
3250 fixpt_t ccpu;
3251 len = sizeof (ccpu);
3252 if (sysctlbyname ("kern.ccpu", &ccpu, &len, NULL, 0) == 0)
3253 {
3254 pcpu = 100.0 * ((double) proc.ki_pctcpu / fscale)
3255 / (1.0 - exp(proc.ki_swtime * log((double) ccpu / fscale)));
3256 attrs = Fcons (Fcons (Qpcpu, make_fixnum_or_float(pcpu)), attrs);
3257 }
3258 }
3259
3260 len = sizeof(npages);
3261 if (sysctlbyname ("hw.availpages", &npages, &len, NULL, 0) == 0)
3262 {
3263 float pmem = proc.ki_flag & P_INMEM
3264 ? 100.0 * ((float) proc.ki_rssize / npages)
3265 : 0.0;
3266 attrs = Fcons (Fcons (Qpmem, make_fixnum_or_float(pmem)), attrs);
3267 }
3268
3269 mib[2] = KERN_PROC_ARGS;
3270 len = MAXPATHLEN;
3271 if (sysctl (mib, 4, args, &len, NULL, 0) == 0)
3272 {
3273 int i;
3274 for (i = 0; i < len; i++)
3275 {
3276 if (! args[i] && i < len - 1)
3277 args[i] = ' ';
3278 }
3279
3280 decoded_comm = code_convert_string_norecord
3281 (make_unibyte_string (args, strlen (args)),
3282 Vlocale_coding_system, 0);
3283
3284 attrs = Fcons (Fcons (Qargs, decoded_comm), attrs);
3285 }
3286
3287 UNGCPRO;
3288 return attrs;
3289}
3290
3080/* The WINDOWSNT implementation is in w32.c. 3291/* The WINDOWSNT implementation is in w32.c.
3081 The MSDOS implementation is in dosfns.c. */ 3292 The MSDOS implementation is in dosfns.c. */
3082#elif !defined (WINDOWSNT) && !defined (MSDOS) 3293#elif !defined (WINDOWSNT) && !defined (MSDOS)
diff --git a/src/w32.c b/src/w32.c
index 3d3d33453c6..248a91463e8 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -5816,7 +5816,15 @@ w32_delayed_load (Lisp_Object libraries, Lisp_Object library_id)
5816 CHECK_STRING_CAR (dlls); 5816 CHECK_STRING_CAR (dlls);
5817 if ((library_dll = LoadLibrary (SDATA (XCAR (dlls))))) 5817 if ((library_dll = LoadLibrary (SDATA (XCAR (dlls)))))
5818 { 5818 {
5819 found = XCAR (dlls); 5819 char name[MAX_PATH];
5820 DWORD len;
5821
5822 len = GetModuleFileNameA (library_dll, name, sizeof (name));
5823 found = Fcons (XCAR (dlls),
5824 (len > 0)
5825 /* Possibly truncated */
5826 ? make_specified_string (name, -1, len, 1)
5827 : Qnil);
5820 break; 5828 break;
5821 } 5829 }
5822 } 5830 }
diff --git a/src/window.c b/src/window.c
index 7fda1b3bc54..19f27ec5320 100644
--- a/src/window.c
+++ b/src/window.c
@@ -5947,6 +5947,8 @@ save_window_save (Lisp_Object window, struct Lisp_Vector *vector, int i)
5947 } 5947 }
5948 else 5948 else
5949 p->pointm = Fcopy_marker (w->pointm, Qnil); 5949 p->pointm = Fcopy_marker (w->pointm, Qnil);
5950 XMARKER (p->pointm)->insertion_type
5951 = !NILP (Vwindow_point_insertion_type);
5950 5952
5951 p->start = Fcopy_marker (w->start, Qnil); 5953 p->start = Fcopy_marker (w->start, Qnil);
5952 p->start_at_line_beg = w->start_at_line_beg; 5954 p->start_at_line_beg = w->start_at_line_beg;
diff --git a/src/xdisp.c b/src/xdisp.c
index d051e88e6bb..43b92bcf536 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -4982,7 +4982,7 @@ string_buffer_position_lim (Lisp_Object string,
4982 Lisp_Object limit, prop, pos; 4982 Lisp_Object limit, prop, pos;
4983 int found = 0; 4983 int found = 0;
4984 4984
4985 pos = make_number (from); 4985 pos = make_number (max (from, BEGV));
4986 4986
4987 if (!back_p) /* looking forward */ 4987 if (!back_p) /* looking forward */
4988 { 4988 {
@@ -13697,6 +13697,13 @@ set_cursor_from_row (struct window *w, struct glyph_row *row,
13697 comes from a text property, not from an overlay. */ 13697 comes from a text property, not from an overlay. */
13698 int string_from_text_prop = 0; 13698 int string_from_text_prop = 0;
13699 13699
13700 /* Don't even try doing anything if called for a mode-line or
13701 header-line row, since the rest of the code isn't prepared to
13702 deal with such calamities. */
13703 xassert (!row->mode_line_p);
13704 if (row->mode_line_p)
13705 return 0;
13706
13700 /* Skip over glyphs not having an object at the start and the end of 13707 /* Skip over glyphs not having an object at the start and the end of
13701 the row. These are special glyphs like truncation marks on 13708 the row. These are special glyphs like truncation marks on
13702 terminal frames. */ 13709 terminal frames. */
@@ -14917,6 +14924,8 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste
14917 else if (rc != CURSOR_MOVEMENT_SUCCESS 14924 else if (rc != CURSOR_MOVEMENT_SUCCESS
14918 && !NILP (BVAR (XBUFFER (w->buffer), bidi_display_reordering))) 14925 && !NILP (BVAR (XBUFFER (w->buffer), bidi_display_reordering)))
14919 { 14926 {
14927 struct glyph_row *row1;
14928
14920 /* If rows are bidi-reordered and point moved, back up 14929 /* If rows are bidi-reordered and point moved, back up
14921 until we find a row that does not belong to a 14930 until we find a row that does not belong to a
14922 continuation line. This is because we must consider 14931 continuation line. This is because we must consider
@@ -14927,24 +14936,28 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste
14927 /* FIXME: Revisit this when glyph ``spilling'' in 14936 /* FIXME: Revisit this when glyph ``spilling'' in
14928 continuation lines' rows is implemented for 14937 continuation lines' rows is implemented for
14929 bidi-reordered rows. */ 14938 bidi-reordered rows. */
14930 while (MATRIX_ROW_CONTINUATION_LINE_P (row)) 14939 for (row1 = MATRIX_FIRST_TEXT_ROW (w->current_matrix);
14940 MATRIX_ROW_CONTINUATION_LINE_P (row);
14941 --row)
14931 { 14942 {
14932 /* If we hit the beginning of the displayed portion 14943 /* If we hit the beginning of the displayed portion
14933 without finding the first row of a continued 14944 without finding the first row of a continued
14934 line, give up. */ 14945 line, give up. */
14935 if (row <= w->current_matrix->rows) 14946 if (row <= row1)
14936 { 14947 {
14937 rc = CURSOR_MOVEMENT_MUST_SCROLL; 14948 rc = CURSOR_MOVEMENT_MUST_SCROLL;
14938 break; 14949 break;
14939 } 14950 }
14940 xassert (row->enabled_p); 14951 xassert (row->enabled_p);
14941 --row;
14942 } 14952 }
14943 } 14953 }
14944 if (must_scroll) 14954 if (must_scroll)
14945 ; 14955 ;
14946 else if (rc != CURSOR_MOVEMENT_SUCCESS 14956 else if (rc != CURSOR_MOVEMENT_SUCCESS
14947 && MATRIX_ROW_PARTIALLY_VISIBLE_P (w, row) 14957 && MATRIX_ROW_PARTIALLY_VISIBLE_P (w, row)
14958 /* Make sure this isn't a header line by any chance, since
14959 then MATRIX_ROW_PARTIALLY_VISIBLE_P might yield non-zero. */
14960 && !row->mode_line_p
14948 && make_cursor_line_fully_visible_p) 14961 && make_cursor_line_fully_visible_p)
14949 { 14962 {
14950 if (PT == MATRIX_ROW_END_CHARPOS (row) 14963 if (PT == MATRIX_ROW_END_CHARPOS (row)
@@ -16613,7 +16626,15 @@ find_last_unchanged_at_beg_row (struct window *w)
16613 continued. */ 16626 continued. */
16614 && !(MATRIX_ROW_END_CHARPOS (row) == first_changed_pos 16627 && !(MATRIX_ROW_END_CHARPOS (row) == first_changed_pos
16615 && (row->continued_p 16628 && (row->continued_p
16616 || row->exact_window_width_line_p))) 16629 || row->exact_window_width_line_p))
16630 /* If ROW->end is beyond ZV, then ROW->end is outdated and
16631 needs to be recomputed, so don't consider this row as
16632 unchanged. This happens when the last line was
16633 bidi-reordered and was killed immediately before this
16634 redisplay cycle. In that case, ROW->end stores the
16635 buffer position of the first visual-order character of
16636 the killed text, which is now beyond ZV. */
16637 && CHARPOS (row->end.pos) <= ZV)
16617 row_found = row; 16638 row_found = row;
16618 16639
16619 /* Stop if last visible row. */ 16640 /* Stop if last visible row. */
diff --git a/test/ChangeLog b/test/ChangeLog
index f44b09102d9..66f8592c79c 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,7 @@
12012-04-11 Glenn Morris <rgm@gnu.org>
2
3 * automated/vc-bzr.el (vc-bzr-test-faulty-bzr-autoloads): New test.
4
12012-02-13 Teodor Zlatanov <tzz@lifelogs.com> 52012-02-13 Teodor Zlatanov <tzz@lifelogs.com>
2 6
3 * automated/url-future-tests.el (url-future-tests): Move from 7 * automated/url-future-tests.el (url-future-tests): Move from
diff --git a/test/automated/vc-bzr.el b/test/automated/vc-bzr.el
index 904ab4d1304..94f8502b882 100644
--- a/test/automated/vc-bzr.el
+++ b/test/automated/vc-bzr.el
@@ -1,6 +1,6 @@
1;;; vc-bzr.el --- tests for vc/vc-bzr.el 1;;; vc-bzr.el --- tests for vc/vc-bzr.el
2 2
3;; Copyright (C) 2011-2012 Free Software Foundation, Inc. 3;; Copyright (C) 2011-2012 Free Software Foundation, Inc.
4 4
5;; Author: Glenn Morris <rgm@gnu.org> 5;; Author: Glenn Morris <rgm@gnu.org>
6 6
@@ -98,4 +98,31 @@
98 (should (get-buffer "*vc-log*"))) 98 (should (get-buffer "*vc-log*")))
99 (delete-directory tempdir t)))) 99 (delete-directory tempdir t))))
100 100
101;; http://lists.gnu.org/archive/html/help-gnu-emacs/2012-04/msg00145.html
102(ert-deftest vc-bzr-test-faulty-bzr-autoloads ()
103 "Test we can generate autoloads in a bzr directory when bzr is faulty."
104 :expected-result (if (executable-find vc-bzr-program) :passed :failed)
105 (should (executable-find vc-bzr-program))
106 (let* ((tempdir (make-temp-file "vc-bzr-test" t))
107 (file (expand-file-name "foo.el" tempdir))
108 (default-directory (file-name-as-directory tempdir))
109 (generated-autoload-file (expand-file-name "loaddefs.el" tempdir)))
110 (unwind-protect
111 (progn
112 (call-process vc-bzr-program nil nil nil "init")
113 (with-temp-buffer
114 (insert ";;;###autoload
115\(defun foo () \"foo\" (interactive) (message \"foo!\"))")
116 (write-region nil nil file nil 'silent))
117 (call-process vc-bzr-program nil nil nil "add")
118 (call-process vc-bzr-program nil nil nil "commit" "-m" "Commit 1")
119 ;; Deleting dirstate ensures both that vc-bzr's status heuristic
120 ;; fails, so it has to call the external bzr status, and
121 ;; causes bzr status to fail. This simulates a broken bzr
122 ;; installation.
123 (delete-file ".bzr/checkout/dirstate")
124 (should (progn (update-directory-autoloads default-directory)
125 t)))
126 (delete-directory tempdir t))))
127
101;;; vc-bzr.el ends here 128;;; vc-bzr.el ends here